From bd6d1ead4e7a2a09e27b737a6dc4c47fc86bcb5f Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:52:06 -0600 Subject: [PATCH 1/7] lvgl: build against LVGL 9.6 Pin LVGL to release/v9.6 (d8a4e1d, 9.6.0 plus 24 fixes) and bring the binding up on it: - lv_conf.h uses 9.6's option names, so no deprecation #warning breaks a -Werror build. Asserts are now off unless LV_USE_ASSERT is set; it is set here, with the same NULL and malloc checks as before, and LV_USE_CHECK_ARG is set explicitly. - Ports and scripts read 9.6's headers from include/lvgl/, falling back to the 9.5 paths, and the TLSF pool turns on LV_USE_TLSF itself. - The generated C tolerates the deprecated functions it still binds. - The CPython jpegio decoder follows micropython-pydevices' moved include. - The API baseline records 9.6's renames and additions as upstream changes. - tools/lvgl_bench.py measures heap and refresh time the same way on every interpreter, to compare LVGL versions. Removed from Python, renamed upstream: draw_sw_rgb565_swap is now draw_rgb565_swap, draw_sw_rotate is draw_rotate, draw_sw_i1_* is draw_i1_*, display.delete_event is display.remove_event, obj.is_valid is obj.is_in_widget_tree, observer.remove is observer.delete and subject.copy_string is subject.set_string. --- binding/api_model.py | 1 + binding/emit_c_cpython.py | 8 + binding/emit_c_micropython_style.py | 8 + binding/emit_pyi.py | 1 + ...-bindings-api-baseline-classification.json | 292 + generated/api.json | 58334 ++++++++--- generated/lvgl.pp | 7967 +- generated/lvgl.pyi | 548 +- generated/lvgl_circuitpython.c | 37955 ++++--- generated/lvgl_micropython.c | 36450 ++++--- generated/lvgl_python.c | 86394 +++++++++------- lv_conf.h | 32 +- lvgl | 2 +- .../src/lv_mem_core_circuitpython.c | 2 +- ports/cpython/JPEGIO_COMMIT | 2 +- ports/cpython/src/jpegio/lvgl_decoder.c | 9 +- ports/cpython/src/jpegio/lvgl_decoder.h | 2 +- ports/cpython/src/jpegio/tjpgd/LICENSE | 8 + ports/cpython/src/jpegio/tjpgd/ORIGIN.txt | 22 + ports/cpython/src/jpegio/tjpgd/tjpgd.c | 2 +- ports/cpython/src/jpegio/tjpgd/tjpgd.h | 2 +- .../micropython/src/lv_mem_core_micropython.c | 2 +- ports/micropython/src/lvmp_tlsf.c | 18 +- scripts/next_release_version.sh | 2 +- scripts/verify_bindings.sh | 5 +- tools/lvgl_bench.py | 358 + 26 files changed, 139358 insertions(+), 89068 deletions(-) create mode 100644 ports/cpython/src/jpegio/tjpgd/LICENSE create mode 100644 ports/cpython/src/jpegio/tjpgd/ORIGIN.txt create mode 100644 tools/lvgl_bench.py diff --git a/binding/api_model.py b/binding/api_model.py index 0b27890..dbbb672 100644 --- a/binding/api_model.py +++ b/binding/api_model.py @@ -38,6 +38,7 @@ _MODULE_ENUM_NAME_OVERRIDES = { "animimg_part_t": "ANIM_IMAGE_PART", "cache_reserve_cond_res_t": "CACHE_RESERVE_COND", + "lru_res_t": "LRU", "indev_gesture_type_t": "INDEV_GESTURE", "event_code_t": "EVENT", "align_t": "ALIGN", diff --git a/binding/emit_c_cpython.py b/binding/emit_c_cpython.py index b415566..5fca9f6 100644 --- a/binding/emit_c_cpython.py +++ b/binding/emit_c_cpython.py @@ -146,6 +146,14 @@ def emit_c(ctx): */ {lv_headers} + +/* + * The binding keeps every function LVGL marks deprecated callable until LVGL + * removes it, so a call to one here is not a warning (LVGL 9.6 and later). + */ +#ifdef LV_DEPRECATIONS_IGNORE_BEGIN +LV_DEPRECATIONS_IGNORE_BEGIN +#endif """.format( module_name=module_name, target_banner=_target_banner, diff --git a/binding/emit_c_micropython_style.py b/binding/emit_c_micropython_style.py index 3845282..4afad05 100644 --- a/binding/emit_c_micropython_style.py +++ b/binding/emit_c_micropython_style.py @@ -170,6 +170,14 @@ def emit_c(ctx): */ {lv_headers} + +/* + * The binding keeps every function LVGL marks deprecated callable until LVGL + * removes it, so a call to one here is not a warning (LVGL 9.6 and later). + */ +#ifdef LV_DEPRECATIONS_IGNORE_BEGIN +LV_DEPRECATIONS_IGNORE_BEGIN +#endif """.format( module_name=module_name, target_banner=_target_banner, diff --git a/binding/emit_pyi.py b/binding/emit_pyi.py index 35c155a..171b793 100644 --- a/binding/emit_pyi.py +++ b/binding/emit_pyi.py @@ -25,6 +25,7 @@ def read_lvgl_version_major_minor(repo_root: Optional[Path] = None) -> str: repo_root = (repo_root or Path(__file__).resolve().parent.parent).resolve() for version_file in ( + repo_root / "lvgl" / "include" / "lvgl" / "lv_version.h", repo_root / "lvgl" / "lv_version.h", repo_root / "lvgl" / "lvgl.h", ): diff --git a/docs/baseline/lvgl-bindings-api-baseline-classification.json b/docs/baseline/lvgl-bindings-api-baseline-classification.json index 953ac0e..3b0b789 100644 --- a/docs/baseline/lvgl-bindings-api-baseline-classification.json +++ b/docs/baseline/lvgl-bindings-api-baseline-classification.json @@ -35,6 +35,298 @@ "patterns": ["module.function.tjpgd_init", "module.function.tjpgd_deinit"], "classification": "target_exception", "reason": "LV_USE_TJPGD is 0 on MicroPython (the compared view) and CircuitPython: the JPEG decoder there is jpegio's, registered through lv_image_decoder_create by displayif / lvgl-circuitpython, one TJpgDec per firmware (displayif#23, lvgl-bindings#14). CPython registers the same decoder from lvgl-python (lvgl-python#23), so both names remain in the canonical model with a target exception on every target in binding/api_policy.json." + }, + { + "id": "lvgl-9.6-renames", + "side": "missing", + "patterns": ["module.function.draw_sw_i1_*", "module.function.draw_sw_rgb565_swap", "module.function.draw_sw_rotate", "object.*.is_valid"], + "classification": "upstream_change", + "reason": "LVGL 9.6 renamed these (lv_draw_i1_*, lv_draw_rgb565_swap, lv_draw_rotate, lv_obj_is_in_widget_tree) and keeps the old names only as C macros, which a binding cannot export." + }, + { + "id": "lvgl-9.6-additions", + "side": "extra", + "patterns": [ + "module.function.bidi_calculate_align_internal", + "module.function.color_16_16_mix_inlined", + "module.function.draw_i1_convert_to_vtiled", + "module.function.draw_i1_invert", + "module.function.draw_i1_to_argb8888", + "module.function.draw_layer_dealloc_buf", + "module.function.draw_layer_deinit", + "module.function.draw_layer_delete", + "module.function.draw_rgb565_swap", + "module.function.draw_rotate", + "module.function.draw_sw_grad_color_calculate", + "module.function.draw_sw_grad_get", + "module.function.lru_create", + "module.function.pending_create", + "module.function.subject_create", + "module.function.subject_global_deinit", + "module.function.subject_global_init", + "module.function.text_get_line_width", + "module.function.text_get_size_internal", + "module.function.text_is_hanging_space", + "module.function.timer_get_time_to_next", + "object.*.UPDATE_MODE", + "object.*.add_child", + "object.*.add_delete_cb", + "object.*.bind_bool", + "object.*.bind_color", + "object.*.bind_float", + "object.*.bind_image_needle_value", + "object.*.bind_int", + "object.*.bind_line_needle_value", + "object.*.bind_pointer", + "object.*.bind_string", + "object.*.calculate_style_text_align_internal", + "object.*.get_max_lines", + "object.*.get_style_align_internal", + "object.*.get_style_anim_duration_internal", + "object.*.get_style_anim_internal", + "object.*.get_style_arc_color_filtered_internal", + "object.*.get_style_arc_color_internal", + "object.*.get_style_arc_image_src_internal", + "object.*.get_style_arc_opa_internal", + "object.*.get_style_arc_rounded_internal", + "object.*.get_style_arc_width_internal", + "object.*.get_style_base_dir_internal", + "object.*.get_style_bg_color_filtered_internal", + "object.*.get_style_bg_color_internal", + "object.*.get_style_bg_grad_color_filtered_internal", + "object.*.get_style_bg_grad_color_internal", + "object.*.get_style_bg_grad_dir_internal", + "object.*.get_style_bg_grad_internal", + "object.*.get_style_bg_grad_opa_internal", + "object.*.get_style_bg_grad_stop_internal", + "object.*.get_style_bg_image_opa_internal", + "object.*.get_style_bg_image_recolor_filtered_internal", + "object.*.get_style_bg_image_recolor_internal", + "object.*.get_style_bg_image_recolor_opa_internal", + "object.*.get_style_bg_image_src_internal", + "object.*.get_style_bg_image_tiled_internal", + "object.*.get_style_bg_main_opa_internal", + "object.*.get_style_bg_main_stop_internal", + "object.*.get_style_bg_opa_internal", + "object.*.get_style_bitmap_mask_src_internal", + "object.*.get_style_blend_mode_internal", + "object.*.get_style_blur_backdrop_internal", + "object.*.get_style_blur_quality_internal", + "object.*.get_style_blur_radius_internal", + "object.*.get_style_border_color_filtered_internal", + "object.*.get_style_border_color_internal", + "object.*.get_style_border_opa_internal", + "object.*.get_style_border_post_internal", + "object.*.get_style_border_side_internal", + "object.*.get_style_border_width_internal", + "object.*.get_style_clip_corner_internal", + "object.*.get_style_color_filter_dsc_internal", + "object.*.get_style_color_filter_opa_internal", + "object.*.get_style_drop_shadow_color_filtered_internal", + "object.*.get_style_drop_shadow_color_internal", + "object.*.get_style_drop_shadow_offset_x_internal", + "object.*.get_style_drop_shadow_offset_y_internal", + "object.*.get_style_drop_shadow_opa_internal", + "object.*.get_style_drop_shadow_quality_internal", + "object.*.get_style_drop_shadow_radius_internal", + "object.*.get_style_enabled", + "object.*.get_style_flex_cross_place_internal", + "object.*.get_style_flex_flow_internal", + "object.*.get_style_flex_grow_internal", + "object.*.get_style_flex_main_place_internal", + "object.*.get_style_flex_track_place_internal", + "object.*.get_style_grid_cell_column_pos_internal", + "object.*.get_style_grid_cell_column_span_internal", + "object.*.get_style_grid_cell_row_pos_internal", + "object.*.get_style_grid_cell_row_span_internal", + "object.*.get_style_grid_cell_x_align_internal", + "object.*.get_style_grid_cell_y_align_internal", + "object.*.get_style_grid_column_align_internal", + "object.*.get_style_grid_column_dsc_array_internal", + "object.*.get_style_grid_row_align_internal", + "object.*.get_style_grid_row_dsc_array_internal", + "object.*.get_style_height_internal", + "object.*.get_style_image_colorkey_internal", + "object.*.get_style_image_opa_internal", + "object.*.get_style_image_recolor_filtered_internal", + "object.*.get_style_image_recolor_internal", + "object.*.get_style_image_recolor_opa_internal", + "object.*.get_style_layout_internal", + "object.*.get_style_length_internal", + "object.*.get_style_line_color_filtered_internal", + "object.*.get_style_line_color_internal", + "object.*.get_style_line_dash_gap_internal", + "object.*.get_style_line_dash_width_internal", + "object.*.get_style_line_opa_internal", + "object.*.get_style_line_rounded_internal", + "object.*.get_style_line_width_internal", + "object.*.get_style_margin_bottom_internal", + "object.*.get_style_margin_left_internal", + "object.*.get_style_margin_right_internal", + "object.*.get_style_margin_top_internal", + "object.*.get_style_max_height_internal", + "object.*.get_style_max_width_internal", + "object.*.get_style_min_height_internal", + "object.*.get_style_min_width_internal", + "object.*.get_style_opa_internal", + "object.*.get_style_opa_layered_internal", + "object.*.get_style_outline_color_filtered_internal", + "object.*.get_style_outline_color_internal", + "object.*.get_style_outline_opa_internal", + "object.*.get_style_outline_pad_internal", + "object.*.get_style_outline_width_internal", + "object.*.get_style_pad_bottom_internal", + "object.*.get_style_pad_column_internal", + "object.*.get_style_pad_left_internal", + "object.*.get_style_pad_radial_internal", + "object.*.get_style_pad_right_internal", + "object.*.get_style_pad_row_internal", + "object.*.get_style_pad_top_internal", + "object.*.get_style_prop_internal", + "object.*.get_style_radial_offset_internal", + "object.*.get_style_radius_internal", + "object.*.get_style_recolor_internal", + "object.*.get_style_recolor_opa_internal", + "object.*.get_style_rotary_sensitivity_internal", + "object.*.get_style_shadow_color_filtered_internal", + "object.*.get_style_shadow_color_internal", + "object.*.get_style_shadow_offset_x_internal", + "object.*.get_style_shadow_offset_y_internal", + "object.*.get_style_shadow_opa_internal", + "object.*.get_style_shadow_spread_internal", + "object.*.get_style_shadow_width_internal", + "object.*.get_style_space_bottom_internal", + "object.*.get_style_space_left_internal", + "object.*.get_style_space_right_internal", + "object.*.get_style_space_top_internal", + "object.*.get_style_text_align_internal", + "object.*.get_style_text_color_filtered_internal", + "object.*.get_style_text_color_internal", + "object.*.get_style_text_decor_internal", + "object.*.get_style_text_font_internal", + "object.*.get_style_text_leading_trim", + "object.*.get_style_text_leading_trim_internal", + "object.*.get_style_text_letter_space_internal", + "object.*.get_style_text_line_space_internal", + "object.*.get_style_text_opa_internal", + "object.*.get_style_text_outline_stroke_color_filtered_internal", + "object.*.get_style_text_outline_stroke_color_internal", + "object.*.get_style_text_outline_stroke_opa_internal", + "object.*.get_style_text_outline_stroke_width_internal", + "object.*.get_style_transform_height_internal", + "object.*.get_style_transform_pivot_x_internal", + "object.*.get_style_transform_pivot_y_internal", + "object.*.get_style_transform_rotation_internal", + "object.*.get_style_transform_scale_x_internal", + "object.*.get_style_transform_scale_x_safe_internal", + "object.*.get_style_transform_scale_y_internal", + "object.*.get_style_transform_scale_y_safe_internal", + "object.*.get_style_transform_skew_x_internal", + "object.*.get_style_transform_skew_y_internal", + "object.*.get_style_transform_width_internal", + "object.*.get_style_transition_internal", + "object.*.get_style_translate_radial_internal", + "object.*.get_style_translate_x_internal", + "object.*.get_style_translate_y_internal", + "object.*.get_style_width_internal", + "object.*.get_style_x_internal", + "object.*.get_style_y_internal", + "object.*.get_update_mode", + "object.*.get_user_flag", + "object.*.invalidate_expand_blur", + "object.*.is_adv_hittest", + "object.*.is_alt", + "object.*.is_checkable", + "object.*.is_checked", + "object.*.is_click_focusable", + "object.*.is_clickable", + "object.*.is_disabled", + "object.*.is_edited", + "object.*.is_event_bubble", + "object.*.is_event_trickle", + "object.*.is_flex_in_new_track", + "object.*.is_floating", + "object.*.is_focus_key", + "object.*.is_focused", + "object.*.is_gesture_bubble", + "object.*.is_hidden", + "object.*.is_hovered", + "object.*.is_ignore_layout", + "object.*.is_in_widget_tree", + "object.*.is_overflow_visible", + "object.*.is_press_lock", + "object.*.is_pressed", + "object.*.is_render_valid", + "object.*.is_scroll_chain_hor", + "object.*.is_scroll_chain_ver", + "object.*.is_scroll_elastic", + "object.*.is_scroll_momentum", + "object.*.is_scroll_on_focus", + "object.*.is_scroll_one", + "object.*.is_scroll_with_arrow", + "object.*.is_scrollable", + "object.*.is_scrolled", + "object.*.is_send_draw_task_events", + "object.*.is_snappable", + "object.*.is_state_trickle", + "object.*.is_state_user_1", + "object.*.is_state_user_2", + "object.*.is_state_user_3", + "object.*.is_state_user_4", + "object.*.is_style_any_height_content", + "object.*.is_style_any_width_content", + "object.*.remove_child", + "object.*.remove_delete_cb", + "object.*.render", + "object.*.set_adv_hittest", + "object.*.set_alt", + "object.*.set_checkable", + "object.*.set_checked", + "object.*.set_click_focusable", + "object.*.set_clickable", + "object.*.set_disabled", + "object.*.set_edited", + "object.*.set_event_bubble", + "object.*.set_event_trickle", + "object.*.set_ext_draw_size", + "object.*.set_flex_in_new_track", + "object.*.set_floating", + "object.*.set_focus_key", + "object.*.set_focused", + "object.*.set_gesture_bubble", + "object.*.set_hidden", + "object.*.set_hovered", + "object.*.set_ignore_layout", + "object.*.set_max_lines", + "object.*.set_overflow_visible", + "object.*.set_press_lock", + "object.*.set_pressed", + "object.*.set_scroll_chain", + "object.*.set_scroll_chain_hor", + "object.*.set_scroll_chain_ver", + "object.*.set_scroll_elastic", + "object.*.set_scroll_momentum", + "object.*.set_scroll_on_focus", + "object.*.set_scroll_one", + "object.*.set_scroll_with_arrow", + "object.*.set_scrollable", + "object.*.set_scrolled", + "object.*.set_send_draw_task_events", + "object.*.set_snappable", + "object.*.set_state_trickle", + "object.*.set_state_user_1", + "object.*.set_state_user_2", + "object.*.set_state_user_3", + "object.*.set_state_user_4", + "object.*.set_style_enabled", + "object.*.set_style_text_leading_trim", + "object.*.set_update_mode", + "object.*.set_user_flag", + "object.*.style_apply_color_filter_internal", + "object.*.update_blur_status" + ], + "classification": "upstream_change", + "reason": "Functions and methods LVGL 9.6 added: a setter and getter for each object flag and state, bindings to subjects, label line limits, render control for barcodes and QR codes, and the inline helpers its private headers now declare." } ] } diff --git a/generated/api.json b/generated/api.json index 0089f43..4735482 100644 --- a/generated/api.json +++ b/generated/api.json @@ -1,5 +1,5 @@ { - "api_hash": "f6f18df630dbff7f78808bb702151933750f376dbbaeb91d7b70d2b7f1c2553f", + "api_hash": "3a06d8cf5faf1688f83f0d4a1ced36659d59f4881285bd53c2969e40061ae103", "constants": [ { "available_on": [ @@ -11,7 +11,7 @@ "location": { "column": 1, "file": "", - "line": 547 + "line": 372 }, "python_name": "ANIM_PLAYTIME_INFINITE", "value": "0xFFFFFFFF", @@ -27,7 +27,7 @@ "location": { "column": 1, "file": "", - "line": 546 + "line": 371 }, "python_name": "ANIM_REPEAT_INFINITE", "value": "0xFFFFFFFF", @@ -43,7 +43,7 @@ "location": { "column": 1, "file": "", - "line": 4300 + "line": 3711 }, "python_name": "BUTTONMATRIX_BUTTON_NONE", "value": "0xFFFF", @@ -59,7 +59,7 @@ "location": { "column": 1, "file": "", - "line": 4392 + "line": 3787 }, "python_name": "CHART_POINT_NONE", "value": "INT32_MAX", @@ -75,7 +75,7 @@ "location": { "column": 1, "file": "", - "line": 766 + "line": 826 }, "python_name": "COLOR_DEPTH", "value": "16", @@ -139,7 +139,7 @@ "location": { "column": 1, "file": "", - "line": 4466 + "line": 3861 }, "python_name": "DROPDOWN_POS_LAST", "value": "0xFFFF", @@ -155,7 +155,7 @@ "location": { "column": 1, "file": "", - "line": 1410 + "line": 1349 }, "python_name": "GRID_CONTENT", "value": "((1 << 29U) - 1) - 101", @@ -171,7 +171,7 @@ "location": { "column": 1, "file": "", - "line": 1411 + "line": 1350 }, "python_name": "GRID_TEMPLATE_LAST", "value": "(1 << 29U) - 1", @@ -187,7 +187,7 @@ "location": { "column": 1, "file": "", - "line": 937 + "line": 1019 }, "python_name": "IMAGE_HEADER_MAGIC", "value": "0x19", @@ -203,7 +203,7 @@ "location": { "column": 1, "file": "", - "line": 4240 + "line": 3608 }, "python_name": "LABEL_DOT_NUM", "value": "3", @@ -219,7 +219,7 @@ "location": { "column": 1, "file": "", - "line": 4241 + "line": 3609 }, "python_name": "LABEL_POS_LAST", "value": "0xFFFF", @@ -235,7 +235,7 @@ "location": { "column": 1, "file": "", - "line": 4242 + "line": 3610 }, "python_name": "LABEL_TEXT_SELECTION_OFF", "value": "0xFFFF", @@ -251,7 +251,7 @@ "location": { "column": 1, "file": "", - "line": 4787 + "line": 4230 }, "python_name": "PART_TEXTAREA_PLACEHOLDER", "value": "LV_PART_CUSTOM_FIRST", @@ -267,7 +267,7 @@ "location": { "column": 1, "file": "", - "line": 3382 + "line": 2455 }, "python_name": "RADIUS_CIRCLE", "value": "0x7FFF", @@ -283,7 +283,7 @@ "location": { "column": 1, "file": "", - "line": 4658 + "line": 4096 }, "python_name": "SCALE_LABEL_ENABLED_DEFAULT", "value": "1U", @@ -299,7 +299,7 @@ "location": { "column": 1, "file": "", - "line": 4669 + "line": 4107 }, "python_name": "SCALE_LABEL_ROTATE_KEEP_UPRIGHT", "value": "0x80000", @@ -315,7 +315,7 @@ "location": { "column": 1, "file": "", - "line": 4668 + "line": 4106 }, "python_name": "SCALE_LABEL_ROTATE_MATCH_TICKS", "value": "0x100000", @@ -331,7 +331,7 @@ "location": { "column": 1, "file": "", - "line": 4657 + "line": 4095 }, "python_name": "SCALE_MAJOR_TICK_EVERY_DEFAULT", "value": "5U", @@ -347,7 +347,7 @@ "location": { "column": 1, "file": "", - "line": 1427 + "line": 1366 }, "python_name": "SCALE_NONE", "value": "256", @@ -363,7 +363,7 @@ "location": { "column": 1, "file": "", - "line": 4670 + "line": 4108 }, "python_name": "SCALE_ROTATION_ANGLE_MASK", "value": "0x7FFFF", @@ -379,7 +379,7 @@ "location": { "column": 1, "file": "", - "line": 4656 + "line": 4094 }, "python_name": "SCALE_TOTAL_TICK_COUNT_DEFAULT", "value": "11U", @@ -395,7 +395,7 @@ "location": { "column": 1, "file": "", - "line": 763 + "line": 565 }, "python_name": "SIZE_CONTENT", "value": "((1 << 29U) - 1) | (1 << 29U)", @@ -411,7 +411,7 @@ "location": { "column": 1, "file": "", - "line": 990 + "line": 1072 }, "python_name": "STRIDE_AUTO", "value": "0", @@ -427,7 +427,7 @@ "location": { "column": 1, "file": "", - "line": 4869 + "line": 4313 }, "python_name": "TABLE_CELL_NONE", "value": "0XFFFF", @@ -443,7 +443,7 @@ "location": { "column": 1, "file": "", - "line": 4786 + "line": 4229 }, "python_name": "TEXTAREA_CURSOR_LAST", "value": "0x7FFF", @@ -462,7 +462,7 @@ "location": { "column": 9, "file": "", - "line": 700 + "line": 508 }, "member_type": "int", "members": [ @@ -574,7 +574,7 @@ "location": { "column": 9, "file": "", - "line": 4142 + "line": 3510 }, "member_type": "int", "members": [ @@ -602,7 +602,7 @@ "location": { "column": 9, "file": "", - "line": 4196 + "line": 3564 }, "member_type": "int", "members": [ @@ -639,7 +639,7 @@ "location": { "column": 9, "file": "", - "line": 4206 + "line": 3574 }, "member_type": "int", "members": [ @@ -680,7 +680,7 @@ "location": { "column": 9, "file": "", - "line": 4200 + "line": 3568 }, "member_type": "int", "members": [ @@ -725,7 +725,7 @@ "location": { "column": 9, "file": "", - "line": 4161 + "line": 3529 }, "member_type": "int", "members": [ @@ -766,7 +766,7 @@ "location": { "column": 9, "file": "", - "line": 4924 + "line": 3684 }, "member_type": "int", "members": [ @@ -803,7 +803,44 @@ "location": { "column": 9, "file": "", - "line": 4271 + "line": 3688 + }, + "member_type": "int", + "members": [ + { + "name": "IMMEDIATE", + "value": "0" + }, + { + "name": "DEFERRED", + "value": null + } + ], + "module_name": null, + "owners": [ + { + "name": "UPDATE_MODE", + "object": "barcode" + } + ], + "python_name": "BARCODE_UPDATE_MODE", + "typedef_names": [ + "lv_barcode_update_mode_t" + ], + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "location": { + "column": 9, + "file": "", + "line": 3641 }, "member_type": "int", "members": [ @@ -844,7 +881,7 @@ "location": { "column": 9, "file": "", - "line": 4276 + "line": 3646 }, "member_type": "int", "members": [ @@ -885,7 +922,7 @@ "location": { "column": 9, "file": "", - "line": 1307 + "line": 1250 }, "member_type": "int", "members": [ @@ -929,7 +966,7 @@ "location": { "column": 9, "file": "", - "line": 1428 + "line": 1367 }, "member_type": "int", "members": [ @@ -973,7 +1010,7 @@ "location": { "column": 9, "file": "", - "line": 1449 + "line": 1388 }, "member_type": "int", "members": [ @@ -1009,7 +1046,7 @@ "location": { "column": 9, "file": "", - "line": 1440 + "line": 1379 }, "member_type": "int", "members": [ @@ -1061,7 +1098,7 @@ "location": { "column": 9, "file": "", - "line": 4301 + "line": 3712 }, "member_type": "int", "members": [ @@ -1202,7 +1239,7 @@ "location": { "column": 9, "file": "", - "line": 5246 + "line": 4515 }, "member_type": "int", "members": [ @@ -1242,7 +1279,7 @@ "location": { "column": 9, "file": "", - "line": 4405 + "line": 3800 }, "member_type": "int", "members": [ @@ -1291,7 +1328,7 @@ "location": { "column": 9, "file": "", - "line": 4393 + "line": 3788 }, "member_type": "int", "members": [ @@ -1344,7 +1381,7 @@ "location": { "column": 9, "file": "", - "line": 4401 + "line": 3796 }, "member_type": "int", "members": [ @@ -1381,7 +1418,7 @@ "location": { "column": 9, "file": "", - "line": 807 + "line": 867 }, "member_type": "int", "members": [ @@ -1556,14 +1593,6 @@ { "name": "NEMA_TSC_END", "value": "LV_COLOR_FORMAT_NEMA_TSC12A" - }, - { - "name": "NATIVE", - "value": "LV_COLOR_FORMAT_RGB565" - }, - { - "name": "NATIVE_WITH_ALPHA", - "value": "LV_COLOR_FORMAT_RGB565A8" } ], "module_name": "COLOR_FORMAT", @@ -1585,7 +1614,7 @@ "location": { "column": 1, "file": "", - "line": 761 + "line": 563 }, "member_type": "int", "members": [ @@ -1615,7 +1644,7 @@ "location": { "column": 9, "file": "", - "line": 3771 + "line": 2911 }, "member_type": "int", "members": [ @@ -1651,7 +1680,7 @@ "location": { "column": 9, "file": "", - "line": 724 + "line": 532 }, "member_type": "int", "members": [ @@ -1707,7 +1736,7 @@ "location": { "column": 9, "file": "", - "line": 1957 + "line": 1753 }, "member_type": "int", "members": [ @@ -1743,7 +1772,7 @@ "location": { "column": 9, "file": "", - "line": 1951 + "line": 1747 }, "member_type": "int", "members": [ @@ -1783,7 +1812,7 @@ "location": { "column": 9, "file": "", - "line": 5043 + "line": 4757 }, "member_type": "int", "members": [ @@ -1823,7 +1852,7 @@ "location": { "column": 9, "file": "", - "line": 5030 + "line": 4744 }, "member_type": "int", "members": [ @@ -1863,7 +1892,7 @@ "location": { "column": 9, "file": "", - "line": 5036 + "line": 4750 }, "member_type": "int", "members": [ @@ -1907,7 +1936,7 @@ "location": { "column": 9, "file": "", - "line": 3317 + "line": 2384 }, "member_type": "int", "members": [ @@ -1930,6 +1959,10 @@ { "name": "FINISHED", "value": null + }, + { + "name": "FAILED", + "value": null } ], "module_name": "DRAW_TASK_STATE", @@ -1951,7 +1984,7 @@ "location": { "column": 9, "file": "", - "line": 3301 + "line": 2368 }, "member_type": "int", "members": [ @@ -2031,7 +2064,7 @@ "location": { "column": 9, "file": "", - "line": 1852 + "line": 569 }, "member_type": "int", "members": [ @@ -2103,6 +2136,22 @@ "name": "GESTURE", "value": null }, + { + "name": "GESTURE_UP", + "value": null + }, + { + "name": "GESTURE_DOWN", + "value": null + }, + { + "name": "GESTURE_LEFT", + "value": null + }, + { + "name": "GESTURE_RIGHT", + "value": null + }, { "name": "KEY", "value": null @@ -2199,6 +2248,14 @@ "name": "STATE_CHANGED", "value": null }, + { + "name": "CHECKED", + "value": null + }, + { + "name": "UNCHECKED", + "value": null + }, { "name": "CREATE", "value": null @@ -2299,6 +2356,22 @@ "name": "FLUSH_WAIT_FINISH", "value": null }, + { + "name": "SYNC_START", + "value": null + }, + { + "name": "SYNC_FINISH", + "value": null + }, + { + "name": "SYNC_WAIT_START", + "value": null + }, + { + "name": "SYNC_WAIT_FINISH", + "value": null + }, { "name": "UPDATE_LAYOUT_COMPLETED", "value": null @@ -2315,6 +2388,10 @@ "name": "LAST", "value": null }, + { + "name": "LAST_CUSTOM", + "value": "0x7FFF" + }, { "name": "PREPROCESS", "value": "0x8000" @@ -2343,7 +2420,7 @@ "location": { "column": 9, "file": "", - "line": 1387 + "line": 1326 }, "member_type": "int", "members": [ @@ -2391,7 +2468,7 @@ "location": { "column": 9, "file": "", - "line": 1395 + "line": 1334 }, "member_type": "int", "members": [ @@ -2447,7 +2524,7 @@ "location": { "column": 9, "file": "", - "line": 4061 + "line": 3379 }, "member_type": "int", "members": [ @@ -2483,7 +2560,7 @@ "location": { "column": 9, "file": "", - "line": 4033 + "line": 3351 }, "member_type": "int", "members": [ @@ -2523,7 +2600,7 @@ "location": { "column": 9, "file": "", - "line": 1205 + "line": 1134 }, "member_type": "int", "members": [ @@ -2587,7 +2664,7 @@ "location": { "column": 9, "file": "", - "line": 1242 + "line": 1170 }, "member_type": "int", "members": [ @@ -2619,7 +2696,7 @@ "location": { "column": 9, "file": "", - "line": 1236 + "line": 1164 }, "member_type": "int", "members": [ @@ -2659,7 +2736,7 @@ "location": { "column": 9, "file": "", - "line": 3205 + "line": 2601 }, "member_type": "int", "members": [ @@ -2691,7 +2768,7 @@ "location": { "column": 9, "file": "", - "line": 3189 + "line": 2585 }, "member_type": "int", "members": [ @@ -2771,7 +2848,7 @@ "location": { "column": 9, "file": "", - "line": 3209 + "line": 2605 }, "member_type": "int", "members": [ @@ -2807,7 +2884,7 @@ "location": { "column": 9, "file": "", - "line": 1320 + "line": 1258 }, "member_type": "int", "members": [ @@ -2855,7 +2932,7 @@ "location": { "column": 9, "file": "", - "line": 1328 + "line": 1266 }, "member_type": "int", "members": [ @@ -2891,7 +2968,7 @@ "location": { "column": 9, "file": "", - "line": 1412 + "line": 1351 }, "member_type": "int", "members": [ @@ -2943,7 +3020,7 @@ "location": { "column": 9, "file": "", - "line": 3647 + "line": 690 }, "member_type": "int", "members": [ @@ -2975,7 +3052,7 @@ "location": { "column": 9, "file": "", - "line": 4508 + "line": 3903 }, "member_type": "int", "members": [ @@ -3032,7 +3109,7 @@ "location": { "column": 9, "file": "", - "line": 4092 + "line": 3459 }, "member_type": "int", "members": [ @@ -3092,6 +3169,10 @@ "name": "CONTAIN", "value": null }, + { + "name": "CONTAIN_DOWNSCALE", + "value": null + }, { "name": "COVER", "value": null @@ -3121,7 +3202,7 @@ "location": { "column": 9, "file": "", - "line": 953 + "line": 1035 }, "member_type": "int", "members": [ @@ -3162,7 +3243,7 @@ "location": { "column": 9, "file": "", - "line": 938 + "line": 1020 }, "member_type": "int", "members": [ @@ -3243,7 +3324,7 @@ "location": { "column": 9, "file": "", - "line": 3270 + "line": 2666 }, "member_type": "int", "members": [ @@ -3288,7 +3369,7 @@ "location": { "column": 9, "file": "", - "line": 3966 + "line": 3275 }, "member_type": "int", "members": [ @@ -3332,7 +3413,7 @@ "location": { "column": 9, "file": "", - "line": 3696 + "line": 2831 }, "member_type": "int", "members": [ @@ -3384,7 +3465,7 @@ "location": { "column": 9, "file": "", - "line": 3691 + "line": 2826 }, "member_type": "int", "members": [ @@ -3420,7 +3501,7 @@ "location": { "column": 9, "file": "", - "line": 3687 + "line": 2822 }, "member_type": "int", "members": [ @@ -3452,7 +3533,7 @@ "location": { "column": 9, "file": "", - "line": 3680 + "line": 2815 }, "member_type": "int", "members": [ @@ -3496,7 +3577,7 @@ "location": { "column": 9, "file": "", - "line": 3631 + "line": 674 }, "member_type": "int", "members": [ @@ -3568,7 +3649,7 @@ "location": { "column": 9, "file": "", - "line": 4529 + "line": 3924 }, "member_type": "int", "members": [ @@ -3629,7 +3710,7 @@ "location": { "column": 9, "file": "", - "line": 4243 + "line": 3611 }, "member_type": "int", "members": [ @@ -3678,7 +3759,7 @@ "location": { "column": 9, "file": "", - "line": 3599 + "line": 2782 }, "member_type": "int", "members": [ @@ -3714,7 +3795,7 @@ "location": { "column": 9, "file": "", - "line": 1379 + "line": 1317 }, "member_type": "int", "members": [ @@ -3754,7 +3835,7 @@ "location": { "column": 1, "file": "", - "line": 414 + "line": 790 }, "member_type": "int", "members": [ @@ -3789,6 +3870,54 @@ "typedef_names": [], "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "location": { + "column": 9, + "file": "", + "line": 6564 + }, + "member_type": "int", + "members": [ + { + "name": "OK", + "value": "0" + }, + { + "name": "MISSING_CACHE", + "value": null + }, + { + "name": "MISSING_KEY", + "value": null + }, + { + "name": "MISSING_VALUE", + "value": null + }, + { + "name": "LOCK_ERROR", + "value": null + }, + { + "name": "VALUE_TOO_LARGE", + "value": null + } + ], + "module_name": "LRU", + "owners": [], + "python_name": "LRU_RES", + "typedef_names": [ + "lv_lru_res_t" + ], + "visibility": "public" + }, { "available_on": [ "micropython", @@ -3849,7 +3978,7 @@ "location": { "column": 9, "file": "", - "line": 4580 + "line": 3980 }, "member_type": "int", "members": [ @@ -3890,7 +4019,7 @@ "location": { "column": 9, "file": "", - "line": 4585 + "line": 3985 }, "member_type": "int", "members": [ @@ -3927,7 +4056,7 @@ "location": { "column": 9, "file": "", - "line": 3612 + "line": 2796 }, "member_type": "int", "members": [ @@ -3968,7 +4097,7 @@ "location": { "column": 9, "file": "", - "line": 3617 + "line": 2801 }, "member_type": "int", "members": [ @@ -4009,7 +4138,7 @@ "location": { "column": 9, "file": "", - "line": 3622 + "line": 2806 }, "member_type": "int", "members": [ @@ -4046,7 +4175,7 @@ "location": { "column": 9, "file": "", - "line": 3800 + "line": 2941 }, "member_type": "int", "members": [ @@ -4207,7 +4336,7 @@ "location": { "column": 9, "file": "", - "line": 2094 + "line": 1899 }, "member_type": "int", "members": [ @@ -4252,7 +4381,7 @@ "location": { "column": 9, "file": "", - "line": 2065 + "line": 1870 }, "member_type": "int", "members": [ @@ -4293,7 +4422,7 @@ "location": { "column": 1, "file": "", - "line": 767 + "line": 827 }, "member_type": "int", "members": [ @@ -4367,7 +4496,7 @@ "location": { "column": 9, "file": "", - "line": 898 + "line": 956 }, "member_type": "int", "members": [ @@ -4475,7 +4604,7 @@ "location": { "column": 9, "file": "", - "line": 2217 + "line": 2024 }, "member_type": "int", "members": [ @@ -4535,7 +4664,44 @@ "location": { "column": 9, "file": "", - "line": 668 + "line": 4062 + }, + "member_type": "int", + "members": [ + { + "name": "IMMEDIATE", + "value": "0" + }, + { + "name": "DEFERRED", + "value": null + } + ], + "module_name": null, + "owners": [ + { + "name": "UPDATE_MODE", + "object": "qrcode" + } + ], + "python_name": "QRCODE_UPDATE_MODE", + "typedef_names": [ + "lv_qrcode_update_mode_t" + ], + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "location": { + "column": 9, + "file": "", + "line": 6604 }, "member_type": "int", "members": [ @@ -4599,7 +4765,7 @@ "location": { "column": 9, "file": "", - "line": 4640 + "line": 4078 }, "member_type": "int", "members": [ @@ -4636,7 +4802,7 @@ "location": { "column": 9, "file": "", - "line": 4659 + "line": 4097 }, "member_type": "int", "members": [ @@ -4693,7 +4859,7 @@ "location": { "column": 9, "file": "", - "line": 1962 + "line": 1758 }, "member_type": "int", "members": [ @@ -4781,7 +4947,7 @@ "location": { "column": 9, "file": "", - "line": 2160 + "line": 1967 }, "member_type": "int", "members": [ @@ -4821,7 +4987,7 @@ "location": { "column": 9, "file": "", - "line": 2166 + "line": 1973 }, "member_type": "int", "members": [ @@ -4861,7 +5027,7 @@ "location": { "column": 9, "file": "", - "line": 4707 + "line": 4149 }, "member_type": "int", "members": [ @@ -4902,7 +5068,7 @@ "location": { "column": 9, "file": "", - "line": 4712 + "line": 4154 }, "member_type": "int", "members": [ @@ -4943,7 +5109,7 @@ "location": { "column": 9, "file": "", - "line": 4740 + "line": 4182 }, "member_type": "int", "members": [ @@ -4983,7 +5149,7 @@ "location": { "column": 9, "file": "", - "line": 4735 + "line": 4177 }, "member_type": "int", "members": [ @@ -5019,7 +5185,7 @@ "location": { "column": 9, "file": "", - "line": 2200 + "line": 2007 }, "member_type": "int", "members": [ @@ -5103,7 +5269,7 @@ "location": { "column": 1, "file": "", - "line": 1141 + "line": 726 }, "member_type": "int", "members": [ @@ -5374,7 +5540,7 @@ "location": { "column": 1, "file": "", - "line": 1463 + "line": 1402 }, "member_type": "int", "members": [ @@ -5894,6 +6060,10 @@ "name": "GRID_CELL_Y_ALIGN", "value": null }, + { + "name": "TEXT_LEADING_TRIM", + "value": "176" + }, { "name": "LAST_BUILT_IN_PROP", "value": null @@ -5928,7 +6098,7 @@ "location": { "column": 9, "file": "", - "line": 1598 + "line": 1538 }, "member_type": "int", "members": [ @@ -5960,7 +6130,7 @@ "location": { "column": 9, "file": "", - "line": 2228 + "line": 2035 }, "member_type": "int", "members": [ @@ -6000,7 +6170,7 @@ "location": { "column": 9, "file": "", - "line": 3867 + "line": 3109 }, "member_type": "int", "members": [ @@ -6056,7 +6226,7 @@ "location": { "column": 9, "file": "", - "line": 4861 + "line": 4305 }, "member_type": "int", "members": [ @@ -6097,7 +6267,7 @@ "location": { "column": 1, "file": "", - "line": 1141 + "line": 726 }, "member_type": "str", "members": [ @@ -6367,7 +6537,7 @@ "location": { "column": 9, "file": "", - "line": 4870 + "line": 4314 }, "member_type": "int", "members": [ @@ -6424,7 +6594,7 @@ "location": { "column": 9, "file": "", - "line": 1299 + "line": 1233 }, "member_type": "int", "members": [ @@ -6464,7 +6634,7 @@ "location": { "column": 9, "file": "", - "line": 5640 + "line": 6632 }, "member_type": "int", "members": [ @@ -6500,7 +6670,7 @@ "location": { "column": 9, "file": "", - "line": 1435 + "line": 1374 }, "member_type": "int", "members": [ @@ -6536,7 +6706,7 @@ "location": { "column": 9, "file": "", - "line": 1292 + "line": 1226 }, "member_type": "int", "members": [ @@ -6580,7 +6750,51 @@ "location": { "column": 9, "file": "", - "line": 5109 + "line": 1239 + }, + "member_type": "int", + "members": [ + { + "name": "NONE", + "value": "0" + }, + { + "name": "CAPITAL_BASELINE", + "value": null + }, + { + "name": "LOWER_BASELINE", + "value": null + }, + { + "name": "CAPITAL", + "value": null + }, + { + "name": "LOWER", + "value": null + } + ], + "module_name": "TEXT_LEADING_TRIM", + "owners": [], + "python_name": "TEXT_LEADING_TRIM", + "typedef_names": [ + "lv_text_leading_trim_t" + ], + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "location": { + "column": 9, + "file": "", + "line": 4426 }, "member_type": "int", "members": [ @@ -6624,7 +6838,7 @@ "location": { "column": 1, "file": "", - "line": 1120 + "line": 6770 }, "member_type": "int", "members": [ @@ -6656,7 +6870,7 @@ "location": { "column": 6, "file": "", - "line": 5218 + "line": 4711 }, "parameters": [], "python_name": "anim_core_deinit", @@ -6686,7 +6900,7 @@ "location": { "column": 6, "file": "", - "line": 5217 + "line": 4710 }, "parameters": [], "python_name": "anim_core_init", @@ -6716,7 +6930,7 @@ "location": { "column": 10, "file": "", - "line": 629 + "line": 454 }, "parameters": [], "python_name": "anim_count_running", @@ -6746,14 +6960,14 @@ "location": { "column": 6, "file": "", - "line": 627 + "line": 452 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 627 + "line": 452 }, "name": "a", "type": { @@ -6773,7 +6987,7 @@ "location": { "column": 68, "file": "", - "line": 627 + "line": 452 }, "name": "exec_cb", "type": { @@ -6815,14 +7029,14 @@ "location": { "column": 13, "file": "", - "line": 628 + "line": 453 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 628 + "line": 453 }, "name": "a", "type": { @@ -6842,7 +7056,7 @@ "location": { "column": 72, "file": "", - "line": 628 + "line": 453 }, "name": "exec_cb", "type": { @@ -6887,14 +7101,14 @@ "location": { "column": 6, "file": "", - "line": 623 + "line": 448 }, "parameters": [ { "location": { "column": 26, "file": "", - "line": 623 + "line": 448 }, "name": "var", "type": { @@ -6914,7 +7128,7 @@ "location": { "column": 52, "file": "", - "line": 623 + "line": 448 }, "name": "exec_cb", "type": { @@ -6955,7 +7169,7 @@ "location": { "column": 6, "file": "", - "line": 624 + "line": 449 }, "parameters": [], "python_name": "anim_delete_all", @@ -6985,14 +7199,14 @@ "location": { "column": 6, "file": "", - "line": 5219 + "line": 4712 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 5219 + "line": 4712 }, "name": "enable", "type": { @@ -7033,14 +7247,14 @@ "location": { "column": 13, "file": "", - "line": 625 + "line": 450 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 625 + "line": 450 }, "name": "var", "type": { @@ -7060,7 +7274,7 @@ "location": { "column": 56, "file": "", - "line": 625 + "line": 450 }, "name": "exec_cb", "type": { @@ -7104,14 +7318,14 @@ "location": { "column": 10, "file": "", - "line": 618 + "line": 443 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 618 + "line": 443 }, "name": "a", "type": { @@ -7159,14 +7373,14 @@ "location": { "column": 10, "file": "", - "line": 619 + "line": 444 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 619 + "line": 444 }, "name": "a", "type": { @@ -7214,14 +7428,14 @@ "location": { "column": 10, "file": "", - "line": 621 + "line": 446 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 621 + "line": 446 }, "name": "a", "type": { @@ -7269,14 +7483,14 @@ "location": { "column": 10, "file": "", - "line": 620 + "line": 445 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 620 + "line": 445 }, "name": "a", "type": { @@ -7324,7 +7538,7 @@ "location": { "column": 14, "file": "", - "line": 626 + "line": 451 }, "parameters": [], "python_name": "anim_get_timer", @@ -7357,14 +7571,14 @@ "location": { "column": 8, "file": "", - "line": 622 + "line": 447 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 622 + "line": 447 }, "name": "a", "type": { @@ -7415,14 +7629,14 @@ "location": { "column": 6, "file": "", - "line": 593 + "line": 418 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 593 + "line": 418 }, "name": "a", "type": { @@ -7467,14 +7681,14 @@ "location": { "column": 6, "file": "", - "line": 601 + "line": 426 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 601 + "line": 426 }, "name": "a", "type": { @@ -7519,14 +7733,14 @@ "location": { "column": 9, "file": "", - "line": 640 + "line": 465 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 640 + "line": 465 }, "name": "a", "type": { @@ -7574,14 +7788,14 @@ "location": { "column": 9, "file": "", - "line": 642 + "line": 467 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 642 + "line": 467 }, "name": "a", "type": { @@ -7629,14 +7843,14 @@ "location": { "column": 9, "file": "", - "line": 636 + "line": 461 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 636 + "line": 461 }, "name": "a", "type": { @@ -7684,14 +7898,14 @@ "location": { "column": 9, "file": "", - "line": 638 + "line": 463 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 638 + "line": 463 }, "name": "a", "type": { @@ -7739,14 +7953,14 @@ "location": { "column": 9, "file": "", - "line": 637 + "line": 462 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 637 + "line": 462 }, "name": "a", "type": { @@ -7794,14 +8008,14 @@ "location": { "column": 9, "file": "", - "line": 635 + "line": 460 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 635 + "line": 460 }, "name": "a", "type": { @@ -7849,14 +8063,14 @@ "location": { "column": 9, "file": "", - "line": 639 + "line": 464 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 639 + "line": 464 }, "name": "a", "type": { @@ -7904,14 +8118,14 @@ "location": { "column": 9, "file": "", - "line": 641 + "line": 466 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 641 + "line": 466 }, "name": "a", "type": { @@ -7959,14 +8173,14 @@ "location": { "column": 6, "file": "", - "line": 599 + "line": 424 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 599 + "line": 424 }, "name": "a", "type": { @@ -8011,14 +8225,14 @@ "location": { "column": 6, "file": "", - "line": 600 + "line": 425 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 600 + "line": 425 }, "name": "a", "type": { @@ -8038,7 +8252,7 @@ "location": { "column": 48, "file": "", - "line": 600 + "line": 425 }, "name": "ms", "type": { @@ -8080,7 +8294,7 @@ "location": { "column": 6, "file": "", - "line": 634 + "line": 459 }, "parameters": [], "python_name": "anim_refr_now", @@ -8110,16 +8324,16 @@ "location": { "column": 10, "file": "", - "line": 632 + "line": 457 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 632 + "line": 457 }, - "name": "speed", + "name": "speed_or_time", "type": { "kind": "identifier", "name": "uint32_t" @@ -8132,9 +8346,9 @@ }, { "location": { - "column": 56, + "column": 64, "file": "", - "line": 632 + "line": 457 }, "name": "start", "type": { @@ -8149,9 +8363,9 @@ }, { "location": { - "column": 71, + "column": 79, "file": "", - "line": 632 + "line": 457 }, "name": "end", "type": { @@ -8192,14 +8406,14 @@ "location": { "column": 6, "file": "", - "line": 598 + "line": 423 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 598 + "line": 423 }, "name": "a", "type": { @@ -8244,14 +8458,14 @@ "location": { "column": 6, "file": "", - "line": 616 + "line": 441 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 616 + "line": 441 }, "name": "a", "type": { @@ -8271,7 +8485,7 @@ "location": { "column": 55, "file": "", - "line": 616 + "line": 441 }, "name": "x1", "type": { @@ -8288,7 +8502,7 @@ "location": { "column": 67, "file": "", - "line": 616 + "line": 441 }, "name": "y1", "type": { @@ -8305,7 +8519,7 @@ "location": { "column": 79, "file": "", - "line": 616 + "line": 441 }, "name": "x2", "type": { @@ -8322,7 +8536,7 @@ "location": { "column": 91, "file": "", - "line": 616 + "line": 441 }, "name": "y2", "type": { @@ -8364,14 +8578,14 @@ "location": { "column": 6, "file": "", - "line": 607 + "line": 432 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 607 + "line": 432 }, "name": "a", "type": { @@ -8391,7 +8605,7 @@ "location": { "column": 69, "file": "", - "line": 607 + "line": 432 }, "name": "completed_cb", "type": { @@ -8433,14 +8647,14 @@ "location": { "column": 6, "file": "", - "line": 603 + "line": 428 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 603 + "line": 428 }, "name": "a", "type": { @@ -8460,7 +8674,7 @@ "location": { "column": 73, "file": "", - "line": 603 + "line": 428 }, "name": "exec_cb", "type": { @@ -8502,14 +8716,14 @@ "location": { "column": 6, "file": "", - "line": 597 + "line": 422 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 597 + "line": 422 }, "name": "a", "type": { @@ -8529,7 +8743,7 @@ "location": { "column": 48, "file": "", - "line": 597 + "line": 422 }, "name": "delay", "type": { @@ -8571,14 +8785,14 @@ "location": { "column": 6, "file": "", - "line": 608 + "line": 433 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 608 + "line": 433 }, "name": "a", "type": { @@ -8598,7 +8812,7 @@ "location": { "column": 65, "file": "", - "line": 608 + "line": 433 }, "name": "deleted_cb", "type": { @@ -8640,14 +8854,14 @@ "location": { "column": 6, "file": "", - "line": 596 + "line": 421 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 596 + "line": 421 }, "name": "a", "type": { @@ -8667,7 +8881,7 @@ "location": { "column": 51, "file": "", - "line": 596 + "line": 421 }, "name": "duration", "type": { @@ -8709,14 +8923,14 @@ "location": { "column": 6, "file": "", - "line": 614 + "line": 439 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 614 + "line": 439 }, "name": "a", "type": { @@ -8736,7 +8950,7 @@ "location": { "column": 50, "file": "", - "line": 614 + "line": 439 }, "name": "en", "type": { @@ -8778,14 +8992,14 @@ "location": { "column": 6, "file": "", - "line": 595 + "line": 420 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 595 + "line": 420 }, "name": "a", "type": { @@ -8805,7 +9019,7 @@ "location": { "column": 60, "file": "", - "line": 595 + "line": 420 }, "name": "exec_cb", "type": { @@ -8847,14 +9061,14 @@ "location": { "column": 6, "file": "", - "line": 606 + "line": 431 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 606 + "line": 431 }, "name": "a", "type": { @@ -8874,7 +9088,7 @@ "location": { "column": 69, "file": "", - "line": 606 + "line": 431 }, "name": "get_value_cb", "type": { @@ -8916,14 +9130,14 @@ "location": { "column": 6, "file": "", - "line": 604 + "line": 429 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 604 + "line": 429 }, "name": "a", "type": { @@ -8943,7 +9157,7 @@ "location": { "column": 59, "file": "", - "line": 604 + "line": 429 }, "name": "path_cb", "type": { @@ -8985,14 +9199,14 @@ "location": { "column": 6, "file": "", - "line": 612 + "line": 437 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 612 + "line": 437 }, "name": "a", "type": { @@ -9012,7 +9226,7 @@ "location": { "column": 55, "file": "", - "line": 612 + "line": 437 }, "name": "cnt", "type": { @@ -9054,14 +9268,14 @@ "location": { "column": 6, "file": "", - "line": 613 + "line": 438 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 613 + "line": 438 }, "name": "a", "type": { @@ -9081,7 +9295,7 @@ "location": { "column": 55, "file": "", - "line": 613 + "line": 438 }, "name": "delay", "type": { @@ -9123,14 +9337,14 @@ "location": { "column": 6, "file": "", - "line": 611 + "line": 436 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 611 + "line": 436 }, "name": "a", "type": { @@ -9150,7 +9364,7 @@ "location": { "column": 56, "file": "", - "line": 611 + "line": 436 }, "name": "delay", "type": { @@ -9192,14 +9406,14 @@ "location": { "column": 6, "file": "", - "line": 609 + "line": 434 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 609 + "line": 434 }, "name": "a", "type": { @@ -9219,7 +9433,7 @@ "location": { "column": 59, "file": "", - "line": 609 + "line": 434 }, "name": "duration", "type": { @@ -9261,14 +9475,14 @@ "location": { "column": 6, "file": "", - "line": 610 + "line": 435 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 610 + "line": 435 }, "name": "a", "type": { @@ -9288,7 +9502,7 @@ "location": { "column": 55, "file": "", - "line": 610 + "line": 435 }, "name": "duration", "type": { @@ -9330,14 +9544,14 @@ "location": { "column": 6, "file": "", - "line": 605 + "line": 430 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 605 + "line": 430 }, "name": "a", "type": { @@ -9357,7 +9571,7 @@ "location": { "column": 61, "file": "", - "line": 605 + "line": 430 }, "name": "start_cb", "type": { @@ -9399,14 +9613,14 @@ "location": { "column": 6, "file": "", - "line": 615 + "line": 440 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 615 + "line": 440 }, "name": "a", "type": { @@ -9426,7 +9640,7 @@ "location": { "column": 48, "file": "", - "line": 615 + "line": 440 }, "name": "user_data", "type": { @@ -9471,14 +9685,14 @@ "location": { "column": 6, "file": "", - "line": 602 + "line": 427 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 602 + "line": 427 }, "name": "a", "type": { @@ -9498,7 +9712,7 @@ "location": { "column": 48, "file": "", - "line": 602 + "line": 427 }, "name": "start", "type": { @@ -9515,7 +9729,7 @@ "location": { "column": 63, "file": "", - "line": 602 + "line": 427 }, "name": "end", "type": { @@ -9557,14 +9771,14 @@ "location": { "column": 6, "file": "", - "line": 594 + "line": 419 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 594 + "line": 419 }, "name": "a", "type": { @@ -9584,7 +9798,7 @@ "location": { "column": 42, "file": "", - "line": 594 + "line": 419 }, "name": "var", "type": { @@ -9629,14 +9843,14 @@ "location": { "column": 10, "file": "", - "line": 630 + "line": 455 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 630 + "line": 455 }, "name": "speed", "type": { @@ -9677,14 +9891,14 @@ "location": { "column": 10, "file": "", - "line": 631 + "line": 456 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 631 + "line": 456 }, "name": "speed", "type": { @@ -9701,7 +9915,7 @@ "location": { "column": 57, "file": "", - "line": 631 + "line": 456 }, "name": "min_time", "type": { @@ -9718,7 +9932,7 @@ "location": { "column": 76, "file": "", - "line": 631 + "line": 456 }, "name": "max_time", "type": { @@ -9759,14 +9973,14 @@ "location": { "column": 10, "file": "", - "line": 633 + "line": 458 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 633 + "line": 458 }, "name": "speed", "type": { @@ -9783,7 +9997,7 @@ "location": { "column": 56, "file": "", - "line": 633 + "line": 458 }, "name": "start", "type": { @@ -9800,7 +10014,7 @@ "location": { "column": 71, "file": "", - "line": 633 + "line": 458 }, "name": "end", "type": { @@ -9841,14 +10055,14 @@ "location": { "column": 13, "file": "", - "line": 617 + "line": 442 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 617 + "line": 442 }, "name": "a", "type": { @@ -9899,14 +10113,14 @@ "location": { "column": 6, "file": "", - "line": 651 + "line": 476 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 651 + "line": 476 }, "name": "at", "type": { @@ -9926,7 +10140,7 @@ "location": { "column": 61, "file": "", - "line": 651 + "line": 476 }, "name": "start_time", "type": { @@ -9943,7 +10157,7 @@ "location": { "column": 89, "file": "", - "line": 651 + "line": 476 }, "name": "a", "type": { @@ -9991,7 +10205,7 @@ "location": { "column": 22, "file": "", - "line": 649 + "line": 474 }, "parameters": [], "python_name": "anim_timeline_create", @@ -10024,14 +10238,14 @@ "location": { "column": 6, "file": "", - "line": 650 + "line": 475 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 650 + "line": 475 }, "name": "at", "type": { @@ -10076,14 +10290,14 @@ "location": { "column": 10, "file": "", - "line": 662 + "line": 488 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 662 + "line": 488 }, "name": "at", "type": { @@ -10128,14 +10342,14 @@ "location": { "column": 10, "file": "", - "line": 660 + "line": 486 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 660 + "line": 486 }, "name": "at", "type": { @@ -10180,14 +10394,14 @@ "location": { "column": 10, "file": "", - "line": 663 + "line": 489 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 663 + "line": 489 }, "name": "at", "type": { @@ -10232,14 +10446,14 @@ "location": { "column": 10, "file": "", - "line": 664 + "line": 490 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 664 + "line": 490 }, "name": "at", "type": { @@ -10284,14 +10498,14 @@ "location": { "column": 10, "file": "", - "line": 665 + "line": 491 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 665 + "line": 491 }, "name": "at", "type": { @@ -10336,14 +10550,14 @@ "location": { "column": 6, "file": "", - "line": 661 + "line": 487 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 661 + "line": 487 }, "name": "at", "type": { @@ -10388,14 +10602,14 @@ "location": { "column": 8, "file": "", - "line": 666 + "line": 492 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 666 + "line": 492 }, "name": "at", "type": { @@ -10443,14 +10657,14 @@ "location": { "column": 6, "file": "", - "line": 667 + "line": 493 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 667 + "line": 493 }, "name": "dest", "type": { @@ -10470,7 +10684,7 @@ "location": { "column": 81, "file": "", - "line": 667 + "line": 493 }, "name": "src", "type": { @@ -10493,7 +10707,7 @@ "location": { "column": 96, "file": "", - "line": 667 + "line": 493 }, "name": "delay", "type": { @@ -10535,14 +10749,14 @@ "location": { "column": 6, "file": "", - "line": 653 + "line": 479 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 653 + "line": 479 }, "name": "at", "type": { @@ -10576,6 +10790,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_anim_timeline_restart", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 478 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 478 + }, + "name": "at", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_anim_timeline_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "anim_timeline_t" + } + } + ], + "python_name": "restart", + "receiver": "anim_timeline_t", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -10587,14 +10853,14 @@ "location": { "column": 6, "file": "", - "line": 655 + "line": 481 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 655 + "line": 481 }, "name": "at", "type": { @@ -10614,7 +10880,7 @@ "location": { "column": 67, "file": "", - "line": 655 + "line": 481 }, "name": "delay", "type": { @@ -10656,14 +10922,14 @@ "location": { "column": 6, "file": "", - "line": 658 + "line": 484 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 658 + "line": 484 }, "name": "at", "type": { @@ -10683,7 +10949,7 @@ "location": { "column": 70, "file": "", - "line": 658 + "line": 484 }, "name": "progress", "type": { @@ -10725,14 +10991,14 @@ "location": { "column": 6, "file": "", - "line": 656 + "line": 482 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 656 + "line": 482 }, "name": "at", "type": { @@ -10752,7 +11018,7 @@ "location": { "column": 74, "file": "", - "line": 656 + "line": 482 }, "name": "cnt", "type": { @@ -10794,14 +11060,14 @@ "location": { "column": 6, "file": "", - "line": 657 + "line": 483 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 657 + "line": 483 }, "name": "at", "type": { @@ -10821,7 +11087,7 @@ "location": { "column": 74, "file": "", - "line": 657 + "line": 483 }, "name": "delay", "type": { @@ -10863,14 +11129,14 @@ "location": { "column": 6, "file": "", - "line": 654 + "line": 480 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 654 + "line": 480 }, "name": "at", "type": { @@ -10890,7 +11156,7 @@ "location": { "column": 65, "file": "", - "line": 654 + "line": 480 }, "name": "reverse", "type": { @@ -10932,14 +11198,14 @@ "location": { "column": 6, "file": "", - "line": 659 + "line": 485 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 659 + "line": 485 }, "name": "at", "type": { @@ -10959,7 +11225,7 @@ "location": { "column": 67, "file": "", - "line": 659 + "line": 485 }, "name": "user_data", "type": { @@ -11004,14 +11270,14 @@ "location": { "column": 10, "file": "", - "line": 652 + "line": 477 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 652 + "line": 477 }, "name": "at", "type": { @@ -11056,14 +11322,14 @@ "location": { "column": 12, "file": "", - "line": 4145 + "line": 3513 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4145 + "line": 3513 }, "name": "parent", "type": { @@ -11111,14 +11377,14 @@ "location": { "column": 6, "file": "", - "line": 4149 + "line": 3517 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4149 + "line": 3517 }, "name": "obj", "type": { @@ -11163,14 +11429,14 @@ "location": { "column": 13, "file": "", - "line": 4160 + "line": 3528 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4160 + "line": 3528 }, "name": "obj", "type": { @@ -11218,14 +11484,14 @@ "location": { "column": 10, "file": "", - "line": 4158 + "line": 3526 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4158 + "line": 3526 }, "name": "obj", "type": { @@ -11270,14 +11536,14 @@ "location": { "column": 10, "file": "", - "line": 4159 + "line": 3527 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4159 + "line": 3527 }, "name": "obj", "type": { @@ -11322,14 +11588,14 @@ "location": { "column": 15, "file": "", - "line": 4156 + "line": 3524 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4156 + "line": 3524 }, "name": "obj", "type": { @@ -11383,14 +11649,14 @@ "location": { "column": 9, "file": "", - "line": 4157 + "line": 3525 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4157 + "line": 3525 }, "name": "obj", "type": { @@ -11435,14 +11701,14 @@ "location": { "column": 6, "file": "", - "line": 4155 + "line": 3523 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4155 + "line": 3523 }, "name": "obj", "type": { @@ -11462,7 +11728,7 @@ "location": { "column": 73, "file": "", - "line": 4155 + "line": 3523 }, "name": "completed_cb", "type": { @@ -11504,14 +11770,14 @@ "location": { "column": 6, "file": "", - "line": 4150 + "line": 3518 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4150 + "line": 3518 }, "name": "obj", "type": { @@ -11531,7 +11797,7 @@ "location": { "column": 55, "file": "", - "line": 4150 + "line": 3518 }, "name": "duration", "type": { @@ -11573,14 +11839,14 @@ "location": { "column": 6, "file": "", - "line": 4151 + "line": 3519 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4151 + "line": 3519 }, "name": "obj", "type": { @@ -11600,7 +11866,7 @@ "location": { "column": 59, "file": "", - "line": 4151 + "line": 3519 }, "name": "count", "type": { @@ -11642,14 +11908,14 @@ "location": { "column": 6, "file": "", - "line": 4153 + "line": 3521 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4153 + "line": 3521 }, "name": "obj", "type": { @@ -11669,7 +11935,7 @@ "location": { "column": 60, "file": "", - "line": 4153 + "line": 3521 }, "name": "duration", "type": { @@ -11711,14 +11977,14 @@ "location": { "column": 6, "file": "", - "line": 4152 + "line": 3520 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4152 + "line": 3520 }, "name": "obj", "type": { @@ -11738,7 +12004,7 @@ "location": { "column": 63, "file": "", - "line": 4152 + "line": 3520 }, "name": "duration", "type": { @@ -11780,14 +12046,14 @@ "location": { "column": 6, "file": "", - "line": 4146 + "line": 3514 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4146 + "line": 3514 }, "name": "obj", "type": { @@ -11807,7 +12073,7 @@ "location": { "column": 54, "file": "", - "line": 4146 + "line": 3514 }, "name": "dsc", "type": { @@ -11836,7 +12102,7 @@ "location": { "column": 68, "file": "", - "line": 4146 + "line": 3514 }, "name": "num", "type": { @@ -11878,14 +12144,14 @@ "location": { "column": 6, "file": "", - "line": 4147 + "line": 3515 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4147 + "line": 3515 }, "name": "obj", "type": { @@ -11905,7 +12171,7 @@ "location": { "column": 62, "file": "", - "line": 4147 + "line": 3515 }, "name": "dsc", "type": { @@ -11934,7 +12200,7 @@ "location": { "column": 76, "file": "", - "line": 4147 + "line": 3515 }, "name": "num", "type": { @@ -11976,14 +12242,14 @@ "location": { "column": 6, "file": "", - "line": 4154 + "line": 3522 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4154 + "line": 3522 }, "name": "obj", "type": { @@ -12003,7 +12269,7 @@ "location": { "column": 65, "file": "", - "line": 4154 + "line": 3522 }, "name": "start_cb", "type": { @@ -12045,14 +12311,14 @@ "location": { "column": 6, "file": "", - "line": 4148 + "line": 3516 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4148 + "line": 3516 }, "name": "obj", "type": { @@ -12097,14 +12363,14 @@ "location": { "column": 6, "file": "", - "line": 4194 + "line": 3562 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4194 + "line": 3562 }, "name": "obj", "type": { @@ -12127,7 +12393,7 @@ "location": { "column": 63, "file": "", - "line": 4194 + "line": 3562 }, "name": "obj_to_align", "type": { @@ -12147,7 +12413,7 @@ "location": { "column": 87, "file": "", - "line": 4194 + "line": 3562 }, "name": "r_offset", "type": { @@ -12189,14 +12455,14 @@ "location": { "column": 17, "file": "", - "line": 4193 + "line": 3561 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4193 + "line": 3561 }, "name": "obj", "type": { @@ -12216,7 +12482,7 @@ "location": { "column": 64, "file": "", - "line": 4193 + "line": 3561 }, "name": "subject", "type": { @@ -12264,14 +12530,14 @@ "location": { "column": 12, "file": "", - "line": 4167 + "line": 3535 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4167 + "line": 3535 }, "name": "parent", "type": { @@ -12319,14 +12585,14 @@ "location": { "column": 20, "file": "", - "line": 4183 + "line": 3551 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4183 + "line": 3551 }, "name": "obj", "type": { @@ -12371,14 +12637,14 @@ "location": { "column": 20, "file": "", - "line": 4182 + "line": 3550 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4182 + "line": 3550 }, "name": "obj", "type": { @@ -12423,14 +12689,14 @@ "location": { "column": 20, "file": "", - "line": 4185 + "line": 3553 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4185 + "line": 3553 }, "name": "obj", "type": { @@ -12475,14 +12741,14 @@ "location": { "column": 20, "file": "", - "line": 4184 + "line": 3552 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 4184 + "line": 3552 }, "name": "obj", "type": { @@ -12527,14 +12793,14 @@ "location": { "column": 10, "file": "", - "line": 4192 + "line": 3560 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4192 + "line": 3560 }, "name": "obj", "type": { @@ -12579,14 +12845,14 @@ "location": { "column": 9, "file": "", - "line": 4191 + "line": 3559 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4191 + "line": 3559 }, "name": "obj", "type": { @@ -12634,14 +12900,14 @@ "location": { "column": 9, "file": "", - "line": 4188 + "line": 3556 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4188 + "line": 3556 }, "name": "obj", "type": { @@ -12689,14 +12955,14 @@ "location": { "column": 9, "file": "", - "line": 4187 + "line": 3555 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4187 + "line": 3555 }, "name": "obj", "type": { @@ -12744,14 +13010,14 @@ "location": { "column": 15, "file": "", - "line": 4189 + "line": 3557 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4189 + "line": 3557 }, "name": "obj", "type": { @@ -12799,14 +13065,14 @@ "location": { "column": 9, "file": "", - "line": 4190 + "line": 3558 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4190 + "line": 3558 }, "name": "obj", "type": { @@ -12854,14 +13120,14 @@ "location": { "column": 9, "file": "", - "line": 4186 + "line": 3554 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4186 + "line": 3554 }, "name": "obj", "type": { @@ -12909,14 +13175,14 @@ "location": { "column": 6, "file": "", - "line": 4195 + "line": 3563 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4195 + "line": 3563 }, "name": "obj", "type": { @@ -12939,7 +13205,7 @@ "location": { "column": 64, "file": "", - "line": 4195 + "line": 3563 }, "name": "obj_to_rotate", "type": { @@ -12959,7 +13225,7 @@ "location": { "column": 89, "file": "", - "line": 4195 + "line": 3563 }, "name": "r_offset", "type": { @@ -13001,14 +13267,14 @@ "location": { "column": 6, "file": "", - "line": 4170 + "line": 3538 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4170 + "line": 3538 }, "name": "obj", "type": { @@ -13028,7 +13294,7 @@ "location": { "column": 59, "file": "", - "line": 4170 + "line": 3538 }, "name": "start", "type": { @@ -13045,7 +13311,7 @@ "location": { "column": 85, "file": "", - "line": 4170 + "line": 3538 }, "name": "end", "type": { @@ -13087,14 +13353,14 @@ "location": { "column": 6, "file": "", - "line": 4173 + "line": 3541 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4173 + "line": 3541 }, "name": "obj", "type": { @@ -13114,7 +13380,7 @@ "location": { "column": 62, "file": "", - "line": 4173 + "line": 3541 }, "name": "start", "type": { @@ -13131,7 +13397,7 @@ "location": { "column": 88, "file": "", - "line": 4173 + "line": 3541 }, "name": "end", "type": { @@ -13173,14 +13439,14 @@ "location": { "column": 6, "file": "", - "line": 4172 + "line": 3540 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4172 + "line": 3540 }, "name": "obj", "type": { @@ -13200,7 +13466,7 @@ "location": { "column": 65, "file": "", - "line": 4172 + "line": 3540 }, "name": "end", "type": { @@ -13242,14 +13508,14 @@ "location": { "column": 6, "file": "", - "line": 4171 + "line": 3539 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4171 + "line": 3539 }, "name": "obj", "type": { @@ -13269,7 +13535,7 @@ "location": { "column": 67, "file": "", - "line": 4171 + "line": 3539 }, "name": "start", "type": { @@ -13311,14 +13577,14 @@ "location": { "column": 6, "file": "", - "line": 4180 + "line": 3548 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4180 + "line": 3548 }, "name": "obj", "type": { @@ -13338,7 +13604,7 @@ "location": { "column": 54, "file": "", - "line": 4180 + "line": 3548 }, "name": "rate", "type": { @@ -13380,14 +13646,14 @@ "location": { "column": 6, "file": "", - "line": 4169 + "line": 3537 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4169 + "line": 3537 }, "name": "obj", "type": { @@ -13407,7 +13673,7 @@ "location": { "column": 62, "file": "", - "line": 4169 + "line": 3537 }, "name": "end", "type": { @@ -13449,14 +13715,14 @@ "location": { "column": 6, "file": "", - "line": 4181 + "line": 3549 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4181 + "line": 3549 }, "name": "obj", "type": { @@ -13476,7 +13742,7 @@ "location": { "column": 53, "file": "", - "line": 4181 + "line": 3549 }, "name": "offset", "type": { @@ -13518,14 +13784,14 @@ "location": { "column": 6, "file": "", - "line": 4179 + "line": 3547 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4179 + "line": 3547 }, "name": "obj", "type": { @@ -13545,7 +13811,7 @@ "location": { "column": 51, "file": "", - "line": 4179 + "line": 3547 }, "name": "max", "type": { @@ -13587,14 +13853,14 @@ "location": { "column": 6, "file": "", - "line": 4178 + "line": 3546 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4178 + "line": 3546 }, "name": "obj", "type": { @@ -13614,7 +13880,7 @@ "location": { "column": 51, "file": "", - "line": 4178 + "line": 3546 }, "name": "min", "type": { @@ -13656,14 +13922,14 @@ "location": { "column": 6, "file": "", - "line": 4175 + "line": 3543 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 4175 + "line": 3543 }, "name": "obj", "type": { @@ -13683,7 +13949,7 @@ "location": { "column": 52, "file": "", - "line": 4175 + "line": 3543 }, "name": "type", "type": { @@ -13725,14 +13991,14 @@ "location": { "column": 6, "file": "", - "line": 4177 + "line": 3545 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4177 + "line": 3545 }, "name": "obj", "type": { @@ -13752,7 +14018,7 @@ "location": { "column": 47, "file": "", - "line": 4177 + "line": 3545 }, "name": "min", "type": { @@ -13769,7 +14035,7 @@ "location": { "column": 60, "file": "", - "line": 4177 + "line": 3545 }, "name": "max", "type": { @@ -13811,14 +14077,14 @@ "location": { "column": 6, "file": "", - "line": 4174 + "line": 3542 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4174 + "line": 3542 }, "name": "obj", "type": { @@ -13838,7 +14104,7 @@ "location": { "column": 50, "file": "", - "line": 4174 + "line": 3542 }, "name": "rotation", "type": { @@ -13880,14 +14146,14 @@ "location": { "column": 6, "file": "", - "line": 4168 + "line": 3536 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4168 + "line": 3536 }, "name": "obj", "type": { @@ -13907,7 +14173,7 @@ "location": { "column": 64, "file": "", - "line": 4168 + "line": 3536 }, "name": "start", "type": { @@ -13949,14 +14215,14 @@ "location": { "column": 6, "file": "", - "line": 4176 + "line": 3544 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4176 + "line": 3544 }, "name": "obj", "type": { @@ -13976,7 +14242,7 @@ "location": { "column": 47, "file": "", - "line": 4176 + "line": 3544 }, "name": "value", "type": { @@ -14018,14 +14284,14 @@ "location": { "column": 12, "file": "", - "line": 4212 + "line": 3580 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4212 + "line": 3580 }, "name": "parent", "type": { @@ -14073,14 +14339,14 @@ "location": { "column": 20, "file": "", - "line": 4229 + "line": 3597 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4229 + "line": 3597 }, "name": "obj", "type": { @@ -14125,14 +14391,14 @@ "location": { "column": 20, "file": "", - "line": 4228 + "line": 3596 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4228 + "line": 3596 }, "name": "obj", "type": { @@ -14177,14 +14443,14 @@ "location": { "column": 10, "file": "", - "line": 4233 + "line": 3601 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4233 + "line": 3601 }, "name": "obj", "type": { @@ -14229,14 +14495,14 @@ "location": { "column": 10, "file": "", - "line": 4234 + "line": 3602 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4234 + "line": 3602 }, "name": "obj", "type": { @@ -14281,14 +14547,14 @@ "location": { "column": 19, "file": "", - "line": 4230 + "line": 3598 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4230 + "line": 3598 }, "name": "obj", "type": { @@ -14336,14 +14602,14 @@ "location": { "column": 6, "file": "", - "line": 4238 + "line": 3606 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4238 + "line": 3606 }, "name": "obj", "type": { @@ -14388,14 +14654,14 @@ "location": { "column": 24, "file": "", - "line": 4237 + "line": 3605 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 4237 + "line": 3605 }, "name": "obj", "type": { @@ -14440,14 +14706,14 @@ "location": { "column": 10, "file": "", - "line": 4232 + "line": 3600 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4232 + "line": 3600 }, "name": "obj", "type": { @@ -14492,14 +14758,14 @@ "location": { "column": 6, "file": "", - "line": 4231 + "line": 3599 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4231 + "line": 3599 }, "name": "obj", "type": { @@ -14544,14 +14810,14 @@ "location": { "column": 20, "file": "", - "line": 4239 + "line": 3607 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4239 + "line": 3607 }, "name": "obj", "type": { @@ -14596,14 +14862,14 @@ "location": { "column": 26, "file": "", - "line": 4236 + "line": 3604 }, "parameters": [ { "location": { "column": 73, "file": "", - "line": 4236 + "line": 3604 }, "name": "obj", "type": { @@ -14648,14 +14914,14 @@ "location": { "column": 26, "file": "", - "line": 4235 + "line": 3603 }, "parameters": [ { "location": { "column": 71, "file": "", - "line": 4235 + "line": 3603 }, "name": "obj", "type": { @@ -14700,14 +14966,14 @@ "location": { "column": 6, "file": "", - "line": 4217 + "line": 3585 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4217 + "line": 3585 }, "name": "obj", "type": { @@ -14727,7 +14993,7 @@ "location": { "column": 68, "file": "", - "line": 4217 + "line": 3585 }, "name": "size", "type": { @@ -14769,14 +15035,14 @@ "location": { "column": 6, "file": "", - "line": 4216 + "line": 3584 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4216 + "line": 3584 }, "name": "obj", "type": { @@ -14796,7 +15062,7 @@ "location": { "column": 69, "file": "", - "line": 4216 + "line": 3584 }, "name": "start", "type": { @@ -14838,14 +15104,14 @@ "location": { "column": 6, "file": "", - "line": 4222 + "line": 3590 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4222 + "line": 3590 }, "name": "obj", "type": { @@ -14865,7 +15131,7 @@ "location": { "column": 63, "file": "", - "line": 4222 + "line": 3590 }, "name": "x", "type": { @@ -14907,14 +15173,14 @@ "location": { "column": 6, "file": "", - "line": 4223 + "line": 3591 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4223 + "line": 3591 }, "name": "obj", "type": { @@ -14934,7 +15200,7 @@ "location": { "column": 63, "file": "", - "line": 4223 + "line": 3591 }, "name": "y", "type": { @@ -14976,14 +15242,14 @@ "location": { "column": 6, "file": "", - "line": 4219 + "line": 3587 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4219 + "line": 3587 }, "name": "obj", "type": { @@ -15003,7 +15269,7 @@ "location": { "column": 60, "file": "", - "line": 4219 + "line": 3587 }, "name": "dir", "type": { @@ -15045,14 +15311,14 @@ "location": { "column": 6, "file": "", - "line": 4227 + "line": 3595 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4227 + "line": 3595 }, "name": "obj", "type": { @@ -15072,7 +15338,7 @@ "location": { "column": 55, "file": "", - "line": 4227 + "line": 3595 }, "name": "overlap", "type": { @@ -15114,14 +15380,14 @@ "location": { "column": 6, "file": "", - "line": 4218 + "line": 3586 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4218 + "line": 3586 }, "name": "obj", "type": { @@ -15141,7 +15407,7 @@ "location": { "column": 53, "file": "", - "line": 4218 + "line": 3586 }, "name": "offset", "type": { @@ -15183,14 +15449,14 @@ "location": { "column": 6, "file": "", - "line": 4226 + "line": 3594 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4226 + "line": 3594 }, "name": "obj", "type": { @@ -15210,7 +15476,7 @@ "location": { "column": 70, "file": "", - "line": 4226 + "line": 3594 }, "name": "overflow", "type": { @@ -15252,14 +15518,14 @@ "location": { "column": 6, "file": "", - "line": 4221 + "line": 3589 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4221 + "line": 3589 }, "name": "obj", "type": { @@ -15279,7 +15545,7 @@ "location": { "column": 54, "file": "", - "line": 4221 + "line": 3589 }, "name": "radius", "type": { @@ -15321,14 +15587,14 @@ "location": { "column": 6, "file": "", - "line": 4220 + "line": 3588 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4220 + "line": 3588 }, "name": "obj", "type": { @@ -15348,7 +15614,7 @@ "location": { "column": 51, "file": "", - "line": 4220 + "line": 3588 }, "name": "en", "type": { @@ -15390,14 +15656,14 @@ "location": { "column": 6, "file": "", - "line": 4213 + "line": 3581 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4213 + "line": 3581 }, "name": "obj", "type": { @@ -15417,7 +15683,7 @@ "location": { "column": 54, "file": "", - "line": 4213 + "line": 3581 }, "name": "text", "type": { @@ -15465,14 +15731,14 @@ "location": { "column": 6, "file": "", - "line": 4214 + "line": 3582 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4214 + "line": 3582 }, "name": "obj", "type": { @@ -15492,7 +15758,7 @@ "location": { "column": 58, "file": "", - "line": 4214 + "line": 3582 }, "name": "fmt", "type": { @@ -15540,14 +15806,14 @@ "location": { "column": 6, "file": "", - "line": 4225 + "line": 3593 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4225 + "line": 3593 }, "name": "obj", "type": { @@ -15567,7 +15833,7 @@ "location": { "column": 85, "file": "", - "line": 4225 + "line": 3593 }, "name": "align", "type": { @@ -15609,14 +15875,14 @@ "location": { "column": 6, "file": "", - "line": 4215 + "line": 3583 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4215 + "line": 3583 }, "name": "obj", "type": { @@ -15636,7 +15902,7 @@ "location": { "column": 61, "file": "", - "line": 4215 + "line": 3583 }, "name": "text", "type": { @@ -15684,14 +15950,14 @@ "location": { "column": 6, "file": "", - "line": 4224 + "line": 3592 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4224 + "line": 3592 }, "name": "obj", "type": { @@ -15711,7 +15977,7 @@ "location": { "column": 83, "file": "", - "line": 4224 + "line": 3592 }, "name": "align", "type": { @@ -15753,14 +16019,14 @@ "location": { "column": 6, "file": "", - "line": 749 + "line": 551 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 749 + "line": 551 }, "name": "base", "type": { @@ -15783,7 +16049,7 @@ "location": { "column": 54, "file": "", - "line": 749 + "line": 551 }, "name": "to_align", "type": { @@ -15803,7 +16069,7 @@ "location": { "column": 77, "file": "", - "line": 749 + "line": 551 }, "name": "align", "type": { @@ -15820,7 +16086,7 @@ "location": { "column": 92, "file": "", - "line": 749 + "line": 551 }, "name": "ofs_x", "type": { @@ -15837,7 +16103,7 @@ "location": { "column": 107, "file": "", - "line": 749 + "line": 551 }, "name": "ofs_y", "type": { @@ -15875,20 +16141,18 @@ "cpython" ], "c_name": "lv_area_copy", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 735 + "line": 543 }, "parameters": [ { "location": { - "column": 43, + "column": 29, "file": "", - "line": 735 + "line": 543 }, "name": "dest", "type": { @@ -15906,9 +16170,9 @@ }, { "location": { - "column": 67, + "column": 53, "file": "", - "line": 735 + "line": 543 }, "name": "src", "type": { @@ -15941,9 +16205,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -15958,14 +16220,14 @@ "location": { "column": 8, "file": "", - "line": 6037 + "line": 6135 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 6037 + "line": 6135 }, "name": "res_p", "type": { @@ -15988,7 +16250,7 @@ "location": { "column": 56, "file": "", - "line": 6037 + "line": 6135 }, "name": "a1_p", "type": { @@ -16011,7 +16273,7 @@ "location": { "column": 80, "file": "", - "line": 6037 + "line": 6135 }, "name": "a2_p", "type": { @@ -16059,14 +16321,14 @@ "location": { "column": 9, "file": "", - "line": 743 + "line": 545 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 743 + "line": 545 }, "name": "area_p", "type": { @@ -16114,14 +16376,14 @@ "location": { "column": 10, "file": "", - "line": 746 + "line": 548 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 746 + "line": 548 }, "name": "area_p", "type": { @@ -16169,14 +16431,14 @@ "location": { "column": 9, "file": "", - "line": 742 + "line": 544 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 742 + "line": 544 }, "name": "area_p", "type": { @@ -16224,14 +16486,14 @@ "location": { "column": 6, "file": "", - "line": 747 + "line": 549 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 747 + "line": 549 }, "name": "area", "type": { @@ -16251,7 +16513,7 @@ "location": { "column": 49, "file": "", - "line": 747 + "line": 549 }, "name": "w_extra", "type": { @@ -16268,7 +16530,7 @@ "location": { "column": 66, "file": "", - "line": 747 + "line": 549 }, "name": "h_extra", "type": { @@ -16310,14 +16572,14 @@ "location": { "column": 6, "file": "", - "line": 6036 + "line": 6134 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 6036 + "line": 6134 }, "name": "res_p", "type": { @@ -16337,7 +16599,7 @@ "location": { "column": 59, "file": "", - "line": 6036 + "line": 6134 }, "name": "a1_p", "type": { @@ -16360,7 +16622,7 @@ "location": { "column": 83, "file": "", - "line": 6036 + "line": 6134 }, "name": "a2_p", "type": { @@ -16408,14 +16670,14 @@ "location": { "column": 6, "file": "", - "line": 6043 + "line": 6141 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 6043 + "line": 6141 }, "name": "a", "type": { @@ -16438,7 +16700,7 @@ "location": { "column": 60, "file": "", - "line": 6043 + "line": 6141 }, "name": "b", "type": { @@ -16486,14 +16748,14 @@ "location": { "column": 6, "file": "", - "line": 6041 + "line": 6139 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 6041 + "line": 6139 }, "name": "ain_p", "type": { @@ -16516,7 +16778,7 @@ "location": { "column": 61, "file": "", - "line": 6041 + "line": 6139 }, "name": "aholder_p", "type": { @@ -16539,7 +16801,7 @@ "location": { "column": 82, "file": "", - "line": 6041 + "line": 6139 }, "name": "radius", "type": { @@ -16581,14 +16843,14 @@ "location": { "column": 6, "file": "", - "line": 6040 + "line": 6138 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 6040 + "line": 6138 }, "name": "a1_p", "type": { @@ -16611,7 +16873,7 @@ "location": { "column": 60, "file": "", - "line": 6040 + "line": 6138 }, "name": "a2_p", "type": { @@ -16659,14 +16921,14 @@ "location": { "column": 6, "file": "", - "line": 6042 + "line": 6140 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 6042 + "line": 6140 }, "name": "aout_p", "type": { @@ -16689,7 +16951,7 @@ "location": { "column": 63, "file": "", - "line": 6042 + "line": 6140 }, "name": "aholder_p", "type": { @@ -16712,7 +16974,7 @@ "location": { "column": 84, "file": "", - "line": 6042 + "line": 6140 }, "name": "radius", "type": { @@ -16754,14 +17016,14 @@ "location": { "column": 6, "file": "", - "line": 6039 + "line": 6137 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 6039 + "line": 6137 }, "name": "a_p", "type": { @@ -16784,7 +17046,7 @@ "location": { "column": 66, "file": "", - "line": 6039 + "line": 6137 }, "name": "p_p", "type": { @@ -16807,7 +17069,7 @@ "location": { "column": 81, "file": "", - "line": 6039 + "line": 6137 }, "name": "radius", "type": { @@ -16849,14 +17111,14 @@ "location": { "column": 6, "file": "", - "line": 6038 + "line": 6136 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 6038 + "line": 6136 }, "name": "a_res_p", "type": { @@ -16876,7 +17138,7 @@ "location": { "column": 56, "file": "", - "line": 6038 + "line": 6136 }, "name": "a1_p", "type": { @@ -16899,7 +17161,7 @@ "location": { "column": 80, "file": "", - "line": 6038 + "line": 6136 }, "name": "a2_p", "type": { @@ -16947,14 +17209,14 @@ "location": { "column": 6, "file": "", - "line": 748 + "line": 550 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 748 + "line": 550 }, "name": "area", "type": { @@ -16974,7 +17236,7 @@ "location": { "column": 45, "file": "", - "line": 748 + "line": 550 }, "name": "x_ofs", "type": { @@ -16991,7 +17253,7 @@ "location": { "column": 60, "file": "", - "line": 748 + "line": 550 }, "name": "y_ofs", "type": { @@ -17033,14 +17295,14 @@ "location": { "column": 6, "file": "", - "line": 734 + "line": 542 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 734 + "line": 542 }, "name": "area_p", "type": { @@ -17060,7 +17322,7 @@ "location": { "column": 46, "file": "", - "line": 734 + "line": 542 }, "name": "x1", "type": { @@ -17077,7 +17339,7 @@ "location": { "column": 58, "file": "", - "line": 734 + "line": 542 }, "name": "y1", "type": { @@ -17094,7 +17356,7 @@ "location": { "column": 70, "file": "", - "line": 734 + "line": 542 }, "name": "x2", "type": { @@ -17111,7 +17373,7 @@ "location": { "column": 82, "file": "", - "line": 734 + "line": 542 }, "name": "y2", "type": { @@ -17153,14 +17415,14 @@ "location": { "column": 6, "file": "", - "line": 745 + "line": 547 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 745 + "line": 547 }, "name": "area_p", "type": { @@ -17180,7 +17442,7 @@ "location": { "column": 53, "file": "", - "line": 745 + "line": 547 }, "name": "h", "type": { @@ -17222,14 +17484,14 @@ "location": { "column": 6, "file": "", - "line": 6035 + "line": 6133 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 6035 + "line": 6133 }, "name": "area_p", "type": { @@ -17249,7 +17511,7 @@ "location": { "column": 50, "file": "", - "line": 6035 + "line": 6133 }, "name": "x", "type": { @@ -17266,7 +17528,7 @@ "location": { "column": 61, "file": "", - "line": 6035 + "line": 6133 }, "name": "y", "type": { @@ -17308,14 +17570,14 @@ "location": { "column": 6, "file": "", - "line": 744 + "line": 546 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 744 + "line": 546 }, "name": "area_p", "type": { @@ -17335,7 +17597,7 @@ "location": { "column": 52, "file": "", - "line": 744 + "line": 546 }, "name": "w", "type": { @@ -17377,14 +17639,14 @@ "location": { "column": 13, "file": "", - "line": 533 + "line": 4982 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 533 + "line": 4982 }, "name": "array", "type": { @@ -17404,7 +17666,7 @@ "location": { "column": 58, "file": "", - "line": 533 + "line": 4982 }, "name": "index", "type": { @@ -17421,7 +17683,7 @@ "location": { "column": 76, "file": "", - "line": 533 + "line": 4982 }, "name": "value", "type": { @@ -17469,14 +17731,14 @@ "location": { "column": 8, "file": "", - "line": 534 + "line": 4983 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 534 + "line": 4983 }, "name": "array", "type": { @@ -17499,7 +17761,7 @@ "location": { "column": 55, "file": "", - "line": 534 + "line": 4983 }, "name": "index", "type": { @@ -17546,14 +17808,14 @@ "location": { "column": 22, "file": "", - "line": 539 + "line": 4988 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 539 + "line": 4988 }, "name": "array", "type": { @@ -17608,14 +17870,14 @@ "location": { "column": 24, "file": "", - "line": 510 + "line": 4959 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 510 + "line": 4959 }, "name": "array", "type": { @@ -17667,14 +17929,14 @@ "location": { "column": 20, "file": "", - "line": 523 + "line": 4972 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 523 + "line": 4972 }, "name": "array", "type": { @@ -17721,14 +17983,14 @@ "location": { "column": 13, "file": "", - "line": 531 + "line": 4980 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 531 + "line": 4980 }, "name": "array", "type": { @@ -17748,7 +18010,7 @@ "location": { "column": 66, "file": "", - "line": 531 + "line": 4980 }, "name": "other", "type": { @@ -17796,14 +18058,14 @@ "location": { "column": 6, "file": "", - "line": 522 + "line": 4971 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 522 + "line": 4971 }, "name": "target", "type": { @@ -17823,7 +18085,7 @@ "location": { "column": 58, "file": "", - "line": 522 + "line": 4971 }, "name": "source", "type": { @@ -17871,14 +18133,14 @@ "location": { "column": 6, "file": "", - "line": 505 + "line": 4954 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 505 + "line": 4954 }, "name": "array", "type": { @@ -17923,14 +18185,14 @@ "location": { "column": 13, "file": "", - "line": 530 + "line": 4979 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 530 + "line": 4979 }, "name": "array", "type": { @@ -17950,7 +18212,7 @@ "location": { "column": 57, "file": "", - "line": 530 + "line": 4979 }, "name": "start", "type": { @@ -17967,7 +18229,7 @@ "location": { "column": 73, "file": "", - "line": 530 + "line": 4979 }, "name": "end", "type": { @@ -18011,14 +18273,14 @@ "location": { "column": 22, "file": "", - "line": 535 + "line": 4984 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 535 + "line": 4984 }, "name": "array", "type": { @@ -18069,16 +18331,16 @@ "c_name": "lv_array_init", "function_specifiers": [], "location": { - "column": 6, + "column": 13, "file": "", - "line": 502 + "line": 4951 }, "parameters": [ { "location": { - "column": 31, + "column": 38, "file": "", - "line": 502 + "line": 4951 }, "name": "array", "type": { @@ -18096,9 +18358,9 @@ }, { "location": { - "column": 49, + "column": 56, "file": "", - "line": 502 + "line": 4951 }, "name": "capacity", "type": { @@ -18113,9 +18375,9 @@ }, { "location": { - "column": 68, + "column": 75, "file": "", - "line": 502 + "line": 4951 }, "name": "element_size", "type": { @@ -18132,13 +18394,13 @@ "python_name": "init", "receiver": "array_t", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_result_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" }, "role": "struct_method", "static": false, @@ -18157,14 +18419,14 @@ "location": { "column": 6, "file": "", - "line": 503 + "line": 4952 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 503 + "line": 4952 }, "name": "array", "type": { @@ -18184,7 +18446,7 @@ "location": { "column": 54, "file": "", - "line": 503 + "line": 4952 }, "name": "buf", "type": { @@ -18204,7 +18466,7 @@ "location": { "column": 70, "file": "", - "line": 503 + "line": 4952 }, "name": "capacity", "type": { @@ -18221,7 +18483,7 @@ "location": { "column": 89, "file": "", - "line": 503 + "line": 4952 }, "name": "element_size", "type": { @@ -18265,14 +18527,14 @@ "location": { "column": 20, "file": "", - "line": 514 + "line": 4963 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 514 + "line": 4963 }, "name": "array", "type": { @@ -18324,14 +18586,14 @@ "location": { "column": 20, "file": "", - "line": 518 + "line": 4967 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 518 + "line": 4967 }, "name": "array", "type": { @@ -18381,14 +18643,14 @@ "location": { "column": 13, "file": "", - "line": 532 + "line": 4981 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 532 + "line": 4981 }, "name": "array", "type": { @@ -18408,7 +18670,7 @@ "location": { "column": 63, "file": "", - "line": 532 + "line": 4981 }, "name": "element", "type": { @@ -18456,14 +18718,14 @@ "location": { "column": 13, "file": "", - "line": 528 + "line": 4977 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 528 + "line": 4977 }, "name": "array", "type": { @@ -18483,7 +18745,7 @@ "location": { "column": 58, "file": "", - "line": 528 + "line": 4977 }, "name": "index", "type": { @@ -18525,14 +18787,14 @@ "location": { "column": 13, "file": "", - "line": 529 + "line": 4978 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 529 + "line": 4978 }, "name": "array", "type": { @@ -18552,7 +18814,7 @@ "location": { "column": 68, "file": "", - "line": 529 + "line": 4978 }, "name": "index", "type": { @@ -18594,14 +18856,14 @@ "location": { "column": 6, "file": "", - "line": 504 + "line": 4953 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 504 + "line": 4953 }, "name": "array", "type": { @@ -18621,7 +18883,7 @@ "location": { "column": 51, "file": "", - "line": 504 + "line": 4953 }, "name": "new_capacity", "type": { @@ -18663,14 +18925,14 @@ "location": { "column": 6, "file": "", - "line": 527 + "line": 4976 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 527 + "line": 4976 }, "name": "array", "type": { @@ -18717,14 +18979,14 @@ "location": { "column": 24, "file": "", - "line": 506 + "line": 4955 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 506 + "line": 4955 }, "name": "array", "type": { @@ -18774,14 +19036,14 @@ "location": { "column": 13, "file": "", - "line": 544 + "line": 3422 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 544 + "line": 3422 }, "name": "async_xcb", "type": { @@ -18798,7 +19060,7 @@ "location": { "column": 57, "file": "", - "line": 544 + "line": 3422 }, "name": "user_data", "type": { @@ -18842,14 +19104,14 @@ "location": { "column": 13, "file": "", - "line": 545 + "line": 3423 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 545 + "line": 3423 }, "name": "async_xcb", "type": { @@ -18866,7 +19128,7 @@ "location": { "column": 64, "file": "", - "line": 545 + "line": 3423 }, "name": "user_data", "type": { @@ -18910,14 +19172,14 @@ "location": { "column": 10, "file": "", - "line": 484 + "line": 360 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 484 + "line": 360 }, "name": "x", "type": { @@ -18934,7 +19196,7 @@ "location": { "column": 30, "file": "", - "line": 484 + "line": 360 }, "name": "y", "type": { @@ -18975,14 +19237,14 @@ "location": { "column": 17, "file": "", - "line": 4297 + "line": 3667 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4297 + "line": 3667 }, "name": "obj", "type": { @@ -19002,7 +19264,7 @@ "location": { "column": 64, "file": "", - "line": 4297 + "line": 3667 }, "name": "subject", "type": { @@ -19050,14 +19312,14 @@ "location": { "column": 12, "file": "", - "line": 4282 + "line": 3652 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4282 + "line": 3652 }, "name": "parent", "type": { @@ -19105,14 +19367,14 @@ "location": { "column": 9, "file": "", - "line": 4293 + "line": 3663 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4293 + "line": 3663 }, "name": "obj", "type": { @@ -19160,14 +19422,14 @@ "location": { "column": 9, "file": "", - "line": 4292 + "line": 3662 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4292 + "line": 3662 }, "name": "obj", "type": { @@ -19215,14 +19477,14 @@ "location": { "column": 15, "file": "", - "line": 4294 + "line": 3664 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4294 + "line": 3664 }, "name": "obj", "type": { @@ -19267,14 +19529,14 @@ "location": { "column": 22, "file": "", - "line": 4295 + "line": 3665 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4295 + "line": 3665 }, "name": "obj", "type": { @@ -19319,14 +19581,14 @@ "location": { "column": 9, "file": "", - "line": 4291 + "line": 3661 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4291 + "line": 3661 }, "name": "obj", "type": { @@ -19374,14 +19636,14 @@ "location": { "column": 9, "file": "", - "line": 4290 + "line": 3660 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4290 + "line": 3660 }, "name": "obj", "type": { @@ -19429,14 +19691,14 @@ "location": { "column": 6, "file": "", - "line": 4296 + "line": 3666 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4296 + "line": 3666 }, "name": "obj", "type": { @@ -19481,14 +19743,14 @@ "location": { "column": 6, "file": "", - "line": 4287 + "line": 3657 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4287 + "line": 3657 }, "name": "obj", "type": { @@ -19508,7 +19770,7 @@ "location": { "column": 51, "file": "", - "line": 4287 + "line": 3657 }, "name": "max", "type": { @@ -19550,14 +19812,14 @@ "location": { "column": 6, "file": "", - "line": 4286 + "line": 3656 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4286 + "line": 3656 }, "name": "obj", "type": { @@ -19577,7 +19839,7 @@ "location": { "column": 51, "file": "", - "line": 4286 + "line": 3656 }, "name": "min", "type": { @@ -19619,14 +19881,14 @@ "location": { "column": 6, "file": "", - "line": 4288 + "line": 3658 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 4288 + "line": 3658 }, "name": "obj", "type": { @@ -19646,7 +19908,7 @@ "location": { "column": 52, "file": "", - "line": 4288 + "line": 3658 }, "name": "mode", "type": { @@ -19688,14 +19950,14 @@ "location": { "column": 6, "file": "", - "line": 4289 + "line": 3659 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4289 + "line": 3659 }, "name": "obj", "type": { @@ -19715,7 +19977,7 @@ "location": { "column": 66, "file": "", - "line": 4289 + "line": 3659 }, "name": "orientation", "type": { @@ -19757,14 +20019,14 @@ "location": { "column": 6, "file": "", - "line": 4285 + "line": 3655 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4285 + "line": 3655 }, "name": "obj", "type": { @@ -19784,7 +20046,7 @@ "location": { "column": 47, "file": "", - "line": 4285 + "line": 3655 }, "name": "min", "type": { @@ -19801,7 +20063,7 @@ "location": { "column": 60, "file": "", - "line": 4285 + "line": 3655 }, "name": "max", "type": { @@ -19843,14 +20105,14 @@ "location": { "column": 6, "file": "", - "line": 4284 + "line": 3654 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4284 + "line": 3654 }, "name": "obj", "type": { @@ -19870,7 +20132,7 @@ "location": { "column": 53, "file": "", - "line": 4284 + "line": 3654 }, "name": "start_value", "type": { @@ -19887,7 +20149,7 @@ "location": { "column": 83, "file": "", - "line": 4284 + "line": 3654 }, "name": "anim", "type": { @@ -19929,14 +20191,14 @@ "location": { "column": 6, "file": "", - "line": 4283 + "line": 3653 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4283 + "line": 3653 }, "name": "obj", "type": { @@ -19956,7 +20218,7 @@ "location": { "column": 47, "file": "", - "line": 4283 + "line": 3653 }, "name": "value", "type": { @@ -19973,7 +20235,7 @@ "location": { "column": 71, "file": "", - "line": 4283 + "line": 3653 }, "name": "anim", "type": { @@ -20015,14 +20277,14 @@ "location": { "column": 12, "file": "", - "line": 4929 + "line": 3693 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4929 + "line": 3693 }, "name": "parent", "type": { @@ -20070,14 +20332,14 @@ "location": { "column": 12, "file": "", - "line": 4937 + "line": 3705 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4937 + "line": 3705 }, "name": "obj", "type": { @@ -20122,14 +20384,14 @@ "location": { "column": 23, "file": "", - "line": 4940 + "line": 3708 }, "parameters": [ { "location": { "column": 62, "file": "", - "line": 4940 + "line": 3708 }, "name": "obj", "type": { @@ -20177,14 +20439,14 @@ "location": { "column": 12, "file": "", - "line": 4938 + "line": 3706 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4938 + "line": 3706 }, "name": "obj", "type": { @@ -20229,14 +20491,14 @@ "location": { "column": 10, "file": "", - "line": 4939 + "line": 3707 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4939 + "line": 3707 }, "name": "obj", "type": { @@ -20276,19 +20538,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_barcode_set_dark_color", + "c_name": "lv_barcode_get_update_mode", "function_specifiers": [], "location": { - "column": 6, + "column": 26, "file": "", - "line": 4930 + "line": 3703 }, "parameters": [ { "location": { - "column": 41, + "column": 62, "file": "", - "line": 4930 + "line": 3703 }, "name": "obj", "type": { @@ -20303,35 +20565,18 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 59, - "file": "", - "line": 4930 - }, - "name": "color", - "type": { - "kind": "identifier", - "name": "lv_color_t" - }, - "view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" - } } ], - "python_name": "set_dark_color", + "python_name": "get_update_mode", "receiver": "barcode", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_barcode_update_mode_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "enum", + "conversion": "enum_int", + "python_type": "barcode.UPDATE_MODE | int" }, "role": "object_method", "static": false, @@ -20345,19 +20590,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_barcode_set_direction", + "c_name": "lv_barcode_is_render_valid", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4933 + "line": 3704 }, "parameters": [ { "location": { - "column": 40, + "column": 42, "file": "", - "line": 4933 + "line": 3704 }, "name": "obj", "type": { @@ -20372,35 +20617,18 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 56, - "file": "", - "line": 4933 - }, - "name": "direction", - "type": { - "kind": "identifier", - "name": "lv_dir_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "DIR | int" - } } ], - "python_name": "set_direction", + "python_name": "is_render_valid", "receiver": "barcode", "return_type": { "kind": "primitive", - "name": "void" + "name": "bool" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -20414,19 +20642,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_barcode_set_encoding", + "c_name": "lv_barcode_render", "function_specifiers": [], "location": { - "column": 6, + "column": 13, "file": "", - "line": 4935 + "line": 3701 }, "parameters": [ { "location": { - "column": 39, + "column": 40, "file": "", - "line": 4935 + "line": 3701 }, "name": "obj", "type": { @@ -20441,35 +20669,18 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 68, - "file": "", - "line": 4935 - }, - "name": "encoding", - "type": { - "kind": "identifier", - "name": "lv_barcode_encoding_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "barcode.ENCODING_CODE128 | int" - } } ], - "python_name": "set_encoding", + "python_name": "render", "receiver": "barcode", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_result_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" }, "role": "object_method", "static": false, @@ -20483,19 +20694,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_barcode_set_light_color", + "c_name": "lv_barcode_set_dark_color", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4931 + "line": 3694 }, "parameters": [ { "location": { - "column": 42, + "column": 41, "file": "", - "line": 4931 + "line": 3694 }, "name": "obj", "type": { @@ -20513,9 +20724,9 @@ }, { "location": { - "column": 60, + "column": 59, "file": "", - "line": 4931 + "line": 3694 }, "name": "color", "type": { @@ -20529,7 +20740,7 @@ } } ], - "python_name": "set_light_color", + "python_name": "set_dark_color", "receiver": "barcode", "return_type": { "kind": "primitive", @@ -20552,19 +20763,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_barcode_set_scale", + "c_name": "lv_barcode_set_direction", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4932 + "line": 3697 }, "parameters": [ { "location": { - "column": 36, + "column": 40, "file": "", - "line": 4932 + "line": 3697 }, "name": "obj", "type": { @@ -20582,23 +20793,23 @@ }, { "location": { - "column": 52, + "column": 56, "file": "", - "line": 4932 + "line": 3697 }, - "name": "scale", + "name": "direction", "type": { "kind": "identifier", - "name": "uint16_t" + "name": "lv_dir_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "DIR | int" } } ], - "python_name": "set_scale", + "python_name": "set_direction", "receiver": "barcode", "return_type": { "kind": "primitive", @@ -20621,19 +20832,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_barcode_set_tiled", + "c_name": "lv_barcode_set_encoding", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4934 + "line": 3699 }, "parameters": [ { "location": { - "column": 36, + "column": 39, "file": "", - "line": 4934 + "line": 3699 }, "name": "obj", "type": { @@ -20651,23 +20862,299 @@ }, { "location": { - "column": 48, + "column": 68, "file": "", - "line": 4934 + "line": 3699 }, - "name": "tiled", + "name": "encoding", "type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "lv_barcode_encoding_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "barcode.ENCODING_CODE128 | int" } } ], - "python_name": "set_tiled", + "python_name": "set_encoding", + "receiver": "barcode", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_barcode_set_light_color", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3695 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 3695 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 3695 + }, + "name": "color", + "type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + } + } + ], + "python_name": "set_light_color", + "receiver": "barcode", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_barcode_set_scale", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3696 + }, + "parameters": [ + { + "location": { + "column": 36, + "file": "", + "line": 3696 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 52, + "file": "", + "line": 3696 + }, + "name": "scale", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_scale", + "receiver": "barcode", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_barcode_set_tiled", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3698 + }, + "parameters": [ + { + "location": { + "column": 36, + "file": "", + "line": 3698 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 48, + "file": "", + "line": 3698 + }, + "name": "tiled", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_tiled", + "receiver": "barcode", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_barcode_set_update_mode", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3702 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 3702 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 74, + "file": "", + "line": 3702 + }, + "name": "mode", + "type": { + "kind": "identifier", + "name": "lv_barcode_update_mode_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "barcode.UPDATE_MODE | int" + } + } + ], + "python_name": "set_update_mode", "receiver": "barcode", "return_type": { "kind": "primitive", @@ -20695,14 +21182,14 @@ "location": { "column": 13, "file": "", - "line": 4936 + "line": 3700 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4936 + "line": 3700 }, "name": "obj", "type": { @@ -20722,7 +21209,7 @@ "location": { "column": 58, "file": "", - "line": 4936 + "line": 3700 }, "name": "data", "type": { @@ -20770,14 +21257,14 @@ "location": { "column": 9, "file": "", - "line": 483 + "line": 359 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 483 + "line": 359 }, "name": "t", "type": { @@ -20794,7 +21281,7 @@ "location": { "column": 39, "file": "", - "line": 483 + "line": 359 }, "name": "u0", "type": { @@ -20811,7 +21298,7 @@ "location": { "column": 52, "file": "", - "line": 483 + "line": 359 }, "name": "u1", "type": { @@ -20828,7 +21315,7 @@ "location": { "column": 64, "file": "", - "line": 483 + "line": 359 }, "name": "u2", "type": { @@ -20845,7 +21332,7 @@ "location": { "column": 76, "file": "", - "line": 483 + "line": 359 }, "name": "u3", "type": { @@ -20882,20 +21369,114 @@ "cpython" ], "c_name": "lv_bidi_calculate_align", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1257 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 1257 + }, + "name": "align", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_text_align_t" + } + }, + "view": { + "category": "enum_pointer", + "conversion": "enum_pointer", + "python_type": "TEXT_ALIGN | int" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 1257 + }, + "name": "base_dir", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_base_dir_t" + } + }, + "view": { + "category": "enum_pointer", + "conversion": "enum_pointer", + "python_type": "BASE_DIR | int" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 1257 + }, + "name": "txt", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + } + ], + "python_name": "bidi_calculate_align", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_bidi_calculate_align_internal", "function_specifiers": [ "inline" ], "location": { "column": 20, "file": "", - "line": 1314 + "line": 6534 }, "parameters": [ { "location": { - "column": 60, + "column": 69, "file": "", - "line": 1314 + "line": 6534 }, "name": "align", "type": { @@ -20913,9 +21494,9 @@ }, { "location": { - "column": 83, + "column": 92, "file": "", - "line": 1314 + "line": 6534 }, "name": "base_dir", "type": { @@ -20933,9 +21514,9 @@ }, { "location": { - "column": 106, + "column": 64, "file": "", - "line": 1314 + "line": 6535 }, "name": "txt", "type": { @@ -20955,7 +21536,7 @@ } } ], - "python_name": "bidi_calculate_align", + "python_name": "bidi_calculate_align_internal", "return_type": { "kind": "primitive", "name": "void" @@ -20984,14 +21565,14 @@ "location": { "column": 6, "file": "", - "line": 4946 + "line": 3416 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4946 + "line": 3416 }, "name": "decoder", "type": { @@ -21011,7 +21592,7 @@ "location": { "column": 80, "file": "", - "line": 4946 + "line": 3416 }, "name": "dsc", "type": { @@ -21055,14 +21636,14 @@ "location": { "column": 13, "file": "", - "line": 4943 + "line": 3413 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4943 + "line": 3413 }, "name": "decoder", "type": { @@ -21082,7 +21663,7 @@ "location": { "column": 90, "file": "", - "line": 4943 + "line": 3413 }, "name": "dsc", "type": { @@ -21102,7 +21683,7 @@ "location": { "column": 53, "file": "", - "line": 4944 + "line": 3414 }, "name": "full_area", "type": { @@ -21125,7 +21706,7 @@ "location": { "column": 76, "file": "", - "line": 4944 + "line": 3414 }, "name": "decoded_area", "type": { @@ -21169,14 +21750,14 @@ "location": { "column": 13, "file": "", - "line": 4942 + "line": 3412 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4942 + "line": 3412 }, "name": "decoder", "type": { @@ -21196,7 +21777,7 @@ "location": { "column": 86, "file": "", - "line": 4942 + "line": 3412 }, "name": "dsc", "type": { @@ -21216,7 +21797,7 @@ "location": { "column": 111, "file": "", - "line": 4942 + "line": 3412 }, "name": "header", "type": { @@ -21260,7 +21841,7 @@ "location": { "column": 6, "file": "", - "line": 4941 + "line": 3411 }, "parameters": [], "python_name": "bin_decoder_init", @@ -21290,14 +21871,14 @@ "location": { "column": 13, "file": "", - "line": 4945 + "line": 3415 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4945 + "line": 3415 }, "name": "decoder", "type": { @@ -21317,7 +21898,7 @@ "location": { "column": 86, "file": "", - "line": 4945 + "line": 3415 }, "name": "dsc", "type": { @@ -21361,14 +21942,14 @@ "location": { "column": 13, "file": "", - "line": 4022 + "line": 3338 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4022 + "line": 3338 }, "name": "path", "type": { @@ -21407,6 +21988,64 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_binfont_create_ex", + "function_specifiers": [], + "location": { + "column": 13, + "file": "", + "line": 3339 + }, + "parameters": [ + { + "location": { + "column": 57, + "file": "", + "line": 3339 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_binfont_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "binfont_dsc_t" + } + } + ], + "python_name": "create_ex", + "receiver": "binfont_dsc_t", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -21418,14 +22057,14 @@ "location": { "column": 13, "file": "", - "line": 4023 + "line": 3340 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4023 + "line": 3340 }, "name": "buffer", "type": { @@ -21445,7 +22084,7 @@ "location": { "column": 67, "file": "", - "line": 4023 + "line": 3340 }, "name": "size", "type": { @@ -21489,14 +22128,14 @@ "location": { "column": 6, "file": "", - "line": 4024 + "line": 3341 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4024 + "line": 3341 }, "name": "font", "type": { @@ -21540,14 +22179,14 @@ "location": { "column": 12, "file": "", - "line": 4299 + "line": 3710 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4299 + "line": 3710 }, "name": "parent", "type": { @@ -21595,14 +22234,14 @@ "location": { "column": 6, "file": "", - "line": 4339 + "line": 3750 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4339 + "line": 3750 }, "name": "obj", "type": { @@ -21622,7 +22261,7 @@ "location": { "column": 65, "file": "", - "line": 4339 + "line": 3750 }, "name": "btn_id", "type": { @@ -21639,7 +22278,7 @@ "location": { "column": 96, "file": "", - "line": 4339 + "line": 3750 }, "name": "ctrl", "type": { @@ -21681,14 +22320,14 @@ "location": { "column": 6, "file": "", - "line": 4341 + "line": 3752 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4341 + "line": 3752 }, "name": "obj", "type": { @@ -21708,7 +22347,7 @@ "location": { "column": 83, "file": "", - "line": 4341 + "line": 3752 }, "name": "ctrl", "type": { @@ -21750,14 +22389,14 @@ "location": { "column": 12, "file": "", - "line": 4334 + "line": 3745 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4334 + "line": 3745 }, "name": "parent", "type": { @@ -21805,14 +22444,14 @@ "location": { "column": 14, "file": "", - "line": 4346 + "line": 3757 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 4346 + "line": 3757 }, "name": "obj", "type": { @@ -21835,7 +22474,7 @@ "location": { "column": 77, "file": "", - "line": 4346 + "line": 3757 }, "name": "btn_id", "type": { @@ -21883,14 +22522,14 @@ "location": { "column": 22, "file": "", - "line": 4344 + "line": 3755 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 4344 + "line": 3755 }, "name": "obj", "type": { @@ -21950,14 +22589,14 @@ "location": { "column": 6, "file": "", - "line": 4348 + "line": 3759 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4348 + "line": 3759 }, "name": "obj", "type": { @@ -22005,14 +22644,14 @@ "location": { "column": 10, "file": "", - "line": 4345 + "line": 3756 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 4345 + "line": 3756 }, "name": "obj", "type": { @@ -22060,14 +22699,14 @@ "location": { "column": 6, "file": "", - "line": 4347 + "line": 3758 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4347 + "line": 3758 }, "name": "obj", "type": { @@ -22087,7 +22726,7 @@ "location": { "column": 63, "file": "", - "line": 4347 + "line": 3758 }, "name": "btn_id", "type": { @@ -22104,7 +22743,7 @@ "location": { "column": 94, "file": "", - "line": 4347 + "line": 3758 }, "name": "ctrl", "type": { @@ -22146,14 +22785,14 @@ "location": { "column": 6, "file": "", - "line": 4338 + "line": 3749 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4338 + "line": 3749 }, "name": "obj", "type": { @@ -22173,7 +22812,7 @@ "location": { "column": 63, "file": "", - "line": 4338 + "line": 3749 }, "name": "btn_id", "type": { @@ -22190,7 +22829,7 @@ "location": { "column": 94, "file": "", - "line": 4338 + "line": 3749 }, "name": "ctrl", "type": { @@ -22232,14 +22871,14 @@ "location": { "column": 6, "file": "", - "line": 4340 + "line": 3751 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4340 + "line": 3751 }, "name": "obj", "type": { @@ -22259,7 +22898,7 @@ "location": { "column": 81, "file": "", - "line": 4340 + "line": 3751 }, "name": "ctrl", "type": { @@ -22301,14 +22940,14 @@ "location": { "column": 6, "file": "", - "line": 4342 + "line": 3753 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4342 + "line": 3753 }, "name": "obj", "type": { @@ -22328,7 +22967,7 @@ "location": { "column": 64, "file": "", - "line": 4342 + "line": 3753 }, "name": "btn_id", "type": { @@ -22345,7 +22984,7 @@ "location": { "column": 81, "file": "", - "line": 4342 + "line": 3753 }, "name": "width", "type": { @@ -22387,14 +23026,14 @@ "location": { "column": 6, "file": "", - "line": 4336 + "line": 3747 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4336 + "line": 3747 }, "name": "obj", "type": { @@ -22414,7 +23053,7 @@ "location": { "column": 80, "file": "", - "line": 4336 + "line": 3747 }, "name": "ctrl_map", "type": { @@ -22465,14 +23104,14 @@ "location": { "column": 6, "file": "", - "line": 4335 + "line": 3746 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4335 + "line": 3746 }, "name": "obj", "type": { @@ -22492,7 +23131,7 @@ "location": { "column": 65, "file": "", - "line": 4335 + "line": 3746 }, "name": "map", "type": { @@ -22549,14 +23188,14 @@ "location": { "column": 6, "file": "", - "line": 4343 + "line": 3754 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4343 + "line": 3754 }, "name": "obj", "type": { @@ -22576,7 +23215,7 @@ "location": { "column": 59, "file": "", - "line": 4343 + "line": 3754 }, "name": "en", "type": { @@ -22618,14 +23257,14 @@ "location": { "column": 6, "file": "", - "line": 4337 + "line": 3748 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4337 + "line": 3748 }, "name": "obj", "type": { @@ -22645,7 +23284,7 @@ "location": { "column": 67, "file": "", - "line": 4337 + "line": 3748 }, "name": "btn_id", "type": { @@ -22687,14 +23326,14 @@ "location": { "column": 20, "file": "", - "line": 5327 + "line": 4575 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 5327 + "line": 4575 }, "name": "cache", "type": { @@ -22714,7 +23353,7 @@ "location": { "column": 68, "file": "", - "line": 5327 + "line": 4575 }, "name": "key", "type": { @@ -22737,7 +23376,7 @@ "location": { "column": 80, "file": "", - "line": 5327 + "line": 4575 }, "name": "user_data", "type": { @@ -22785,14 +23424,14 @@ "location": { "column": 20, "file": "", - "line": 5328 + "line": 4576 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 5328 + "line": 4576 }, "name": "cache", "type": { @@ -22812,7 +23451,7 @@ "location": { "column": 78, "file": "", - "line": 5328 + "line": 4576 }, "name": "key", "type": { @@ -22835,7 +23474,7 @@ "location": { "column": 90, "file": "", - "line": 5328 + "line": 4576 }, "name": "user_data", "type": { @@ -22883,14 +23522,14 @@ "location": { "column": 20, "file": "", - "line": 5329 + "line": 4577 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 5329 + "line": 4577 }, "name": "cache", "type": { @@ -22910,7 +23549,7 @@ "location": { "column": 64, "file": "", - "line": 5329 + "line": 4577 }, "name": "key", "type": { @@ -22933,7 +23572,7 @@ "location": { "column": 76, "file": "", - "line": 5329 + "line": 4577 }, "name": "user_data", "type": { @@ -22981,14 +23620,14 @@ "location": { "column": 14, "file": "", - "line": 5323 + "line": 4571 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 5323 + "line": 4571 }, "name": "cache_class", "type": { @@ -23011,7 +23650,7 @@ "location": { "column": 37, "file": "", - "line": 5324 + "line": 4572 }, "name": "node_size", "type": { @@ -23028,7 +23667,7 @@ "location": { "column": 55, "file": "", - "line": 5324 + "line": 4572 }, "name": "max_size", "type": { @@ -23045,7 +23684,7 @@ "location": { "column": 45, "file": "", - "line": 5325 + "line": 4573 }, "name": "ops", "type": { @@ -23090,14 +23729,14 @@ "location": { "column": 6, "file": "", - "line": 5326 + "line": 4574 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 5326 + "line": 4574 }, "name": "cache", "type": { @@ -23117,7 +23756,7 @@ "location": { "column": 48, "file": "", - "line": 5326 + "line": 4574 }, "name": "user_data", "type": { @@ -23162,14 +23801,14 @@ "location": { "column": 6, "file": "", - "line": 5332 + "line": 4580 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 5332 + "line": 4580 }, "name": "cache", "type": { @@ -23189,7 +23828,7 @@ "location": { "column": 51, "file": "", - "line": 5332 + "line": 4580 }, "name": "key", "type": { @@ -23212,7 +23851,7 @@ "location": { "column": 63, "file": "", - "line": 5332 + "line": 4580 }, "name": "user_data", "type": { @@ -23257,14 +23896,14 @@ "location": { "column": 6, "file": "", - "line": 5333 + "line": 4581 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 5333 + "line": 4581 }, "name": "cache", "type": { @@ -23284,7 +23923,7 @@ "location": { "column": 49, "file": "", - "line": 5333 + "line": 4581 }, "name": "user_data", "type": { @@ -23329,14 +23968,14 @@ "location": { "column": 8, "file": "", - "line": 5737 + "line": 6518 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 5737 + "line": 6518 }, "name": "entry", "type": { @@ -23384,14 +24023,14 @@ "location": { "column": 20, "file": "", - "line": 5243 + "line": 4595 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 5243 + "line": 4595 }, "name": "node_size", "type": { @@ -23411,7 +24050,7 @@ "location": { "column": 84, "file": "", - "line": 5243 + "line": 4595 }, "name": "cache", "type": { @@ -23461,14 +24100,14 @@ "location": { "column": 6, "file": "", - "line": 5734 + "line": 6515 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 5734 + "line": 6515 }, "name": "entry", "type": { @@ -23513,14 +24152,14 @@ "location": { "column": 6, "file": "", - "line": 5245 + "line": 4597 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 5245 + "line": 4597 }, "name": "entry", "type": { @@ -23565,14 +24204,14 @@ "location": { "column": 20, "file": "", - "line": 5241 + "line": 4594 }, "parameters": [ { "location": { "column": 68, "file": "", - "line": 5241 + "line": 4594 }, "name": "entry", "type": { @@ -23626,14 +24265,14 @@ "location": { "column": 8, "file": "", - "line": 5240 + "line": 4612 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 5240 + "line": 4612 }, "name": "entry", "type": { @@ -23681,14 +24320,14 @@ "location": { "column": 20, "file": "", - "line": 5242 + "line": 4613 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 5242 + "line": 4613 }, "name": "data", "type": { @@ -23708,7 +24347,7 @@ "location": { "column": 73, "file": "", - "line": 5242 + "line": 4613 }, "name": "node_size", "type": { @@ -23755,14 +24394,14 @@ "location": { "column": 10, "file": "", - "line": 5238 + "line": 4610 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 5238 + "line": 4610 }, "name": "entry", "type": { @@ -23807,14 +24446,14 @@ "location": { "column": 9, "file": "", - "line": 5237 + "line": 4609 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 5237 + "line": 4609 }, "name": "entry", "type": { @@ -23859,14 +24498,14 @@ "location": { "column": 10, "file": "", - "line": 5236 + "line": 4608 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 5236 + "line": 4608 }, "name": "node_size", "type": { @@ -23910,14 +24549,14 @@ "location": { "column": 6, "file": "", - "line": 5741 + "line": 6522 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 5741 + "line": 6522 }, "name": "entry", "type": { @@ -23937,7 +24576,7 @@ "location": { "column": 64, "file": "", - "line": 5741 + "line": 6522 }, "name": "flags", "type": { @@ -23979,14 +24618,14 @@ "location": { "column": 6, "file": "", - "line": 5733 + "line": 6514 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 5733 + "line": 6514 }, "name": "entry", "type": { @@ -24031,14 +24670,14 @@ "location": { "column": 6, "file": "", - "line": 5244 + "line": 4596 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 5244 + "line": 4596 }, "name": "entry", "type": { @@ -24058,7 +24697,7 @@ "location": { "column": 69, "file": "", - "line": 5244 + "line": 4596 }, "name": "cache", "type": { @@ -24081,7 +24720,7 @@ "location": { "column": 93, "file": "", - "line": 5244 + "line": 4596 }, "name": "node_size", "type": { @@ -24126,14 +24765,14 @@ "location": { "column": 6, "file": "", - "line": 5239 + "line": 4611 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 5239 + "line": 4611 }, "name": "entry", "type": { @@ -24178,14 +24817,14 @@ "location": { "column": 6, "file": "", - "line": 5738 + "line": 6519 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 5738 + "line": 6519 }, "name": "entry", "type": { @@ -24205,7 +24844,7 @@ "location": { "column": 65, "file": "", - "line": 5738 + "line": 6519 }, "name": "user_data", "type": { @@ -24250,14 +24889,14 @@ "location": { "column": 6, "file": "", - "line": 5740 + "line": 6521 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 5740 + "line": 6521 }, "name": "entry", "type": { @@ -24277,7 +24916,7 @@ "location": { "column": 67, "file": "", - "line": 5740 + "line": 6521 }, "name": "flags", "type": { @@ -24319,14 +24958,14 @@ "location": { "column": 6, "file": "", - "line": 5732 + "line": 6513 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 5732 + "line": 6513 }, "name": "entry", "type": { @@ -24371,14 +25010,14 @@ "location": { "column": 6, "file": "", - "line": 5736 + "line": 6517 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 5736 + "line": 6517 }, "name": "entry", "type": { @@ -24398,7 +25037,7 @@ "location": { "column": 74, "file": "", - "line": 5736 + "line": 6517 }, "name": "cache", "type": { @@ -24446,14 +25085,14 @@ "location": { "column": 6, "file": "", - "line": 5739 + "line": 6520 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 5739 + "line": 6520 }, "name": "entry", "type": { @@ -24473,7 +25112,7 @@ "location": { "column": 64, "file": "", - "line": 5739 + "line": 6520 }, "name": "flags", "type": { @@ -24515,14 +25154,14 @@ "location": { "column": 6, "file": "", - "line": 5735 + "line": 6516 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 5735 + "line": 6516 }, "name": "entry", "type": { @@ -24542,7 +25181,7 @@ "location": { "column": 70, "file": "", - "line": 5735 + "line": 6516 }, "name": "node_size", "type": { @@ -24584,14 +25223,14 @@ "location": { "column": 6, "file": "", - "line": 5334 + "line": 4582 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 5334 + "line": 4582 }, "name": "cache", "type": { @@ -24611,7 +25250,7 @@ "location": { "column": 50, "file": "", - "line": 5334 + "line": 4582 }, "name": "user_data", "type": { @@ -24656,14 +25295,14 @@ "location": { "column": 8, "file": "", - "line": 5338 + "line": 4586 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 5338 + "line": 4586 }, "name": "cache", "type": { @@ -24683,7 +25322,7 @@ "location": { "column": 56, "file": "", - "line": 5338 + "line": 4586 }, "name": "user_data", "type": { @@ -24728,14 +25367,14 @@ "location": { "column": 8, "file": "", - "line": 5336 + "line": 4584 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 5336 + "line": 4584 }, "name": "cache", "type": { @@ -24755,7 +25394,7 @@ "location": { "column": 55, "file": "", - "line": 5336 + "line": 4584 }, "name": "user_data", "type": { @@ -24800,14 +25439,14 @@ "location": { "column": 14, "file": "", - "line": 5344 + "line": 4592 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 5344 + "line": 4592 }, "name": "cache", "type": { @@ -24858,14 +25497,14 @@ "location": { "column": 8, "file": "", - "line": 5337 + "line": 4585 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 5337 + "line": 4585 }, "name": "cache", "type": { @@ -24885,7 +25524,7 @@ "location": { "column": 51, "file": "", - "line": 5337 + "line": 4585 }, "name": "user_data", "type": { @@ -24930,14 +25569,14 @@ "location": { "column": 6, "file": "", - "line": 5339 + "line": 4587 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 5339 + "line": 4587 }, "name": "cache", "type": { @@ -24982,14 +25621,14 @@ "location": { "column": 13, "file": "", - "line": 5345 + "line": 4593 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 5345 + "line": 4593 }, "name": "cache", "type": { @@ -25037,14 +25676,14 @@ "location": { "column": 6, "file": "", - "line": 5330 + "line": 4578 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 5330 + "line": 4578 }, "name": "cache", "type": { @@ -25064,7 +25703,7 @@ "location": { "column": 60, "file": "", - "line": 5330 + "line": 4578 }, "name": "entry", "type": { @@ -25084,7 +25723,7 @@ "location": { "column": 74, "file": "", - "line": 5330 + "line": 4578 }, "name": "user_data", "type": { @@ -25129,14 +25768,14 @@ "location": { "column": 6, "file": "", - "line": 5331 + "line": 4579 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 5331 + "line": 4579 }, "name": "cache", "type": { @@ -25156,7 +25795,7 @@ "location": { "column": 52, "file": "", - "line": 5331 + "line": 4579 }, "name": "reserved_size", "type": { @@ -25173,7 +25812,7 @@ "location": { "column": 72, "file": "", - "line": 5331 + "line": 4579 }, "name": "user_data", "type": { @@ -25218,14 +25857,14 @@ "location": { "column": 6, "file": "", - "line": 5340 + "line": 4588 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 5340 + "line": 4588 }, "name": "cache", "type": { @@ -25245,7 +25884,7 @@ "location": { "column": 72, "file": "", - "line": 5340 + "line": 4588 }, "name": "compare_cb", "type": { @@ -25262,7 +25901,7 @@ "location": { "column": 89, "file": "", - "line": 5340 + "line": 4588 }, "name": "user_data", "type": { @@ -25307,14 +25946,14 @@ "location": { "column": 6, "file": "", - "line": 5341 + "line": 4589 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 5341 + "line": 4589 }, "name": "cache", "type": { @@ -25334,7 +25973,7 @@ "location": { "column": 70, "file": "", - "line": 5341 + "line": 4589 }, "name": "alloc_cb", "type": { @@ -25351,7 +25990,7 @@ "location": { "column": 85, "file": "", - "line": 5341 + "line": 4589 }, "name": "user_data", "type": { @@ -25396,14 +26035,14 @@ "location": { "column": 6, "file": "", - "line": 5342 + "line": 4590 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 5342 + "line": 4590 }, "name": "cache", "type": { @@ -25423,7 +26062,7 @@ "location": { "column": 66, "file": "", - "line": 5342 + "line": 4590 }, "name": "free_cb", "type": { @@ -25440,7 +26079,7 @@ "location": { "column": 80, "file": "", - "line": 5342 + "line": 4590 }, "name": "user_data", "type": { @@ -25485,14 +26124,14 @@ "location": { "column": 6, "file": "", - "line": 5335 + "line": 4583 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 5335 + "line": 4583 }, "name": "cache", "type": { @@ -25512,7 +26151,7 @@ "location": { "column": 55, "file": "", - "line": 5335 + "line": 4583 }, "name": "max_size", "type": { @@ -25529,7 +26168,7 @@ "location": { "column": 70, "file": "", - "line": 5335 + "line": 4583 }, "name": "user_data", "type": { @@ -25574,14 +26213,14 @@ "location": { "column": 6, "file": "", - "line": 5343 + "line": 4591 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 5343 + "line": 4591 }, "name": "cache", "type": { @@ -25601,7 +26240,7 @@ "location": { "column": 55, "file": "", - "line": 5343 + "line": 4591 }, "name": "name", "type": { @@ -25649,14 +26288,14 @@ "location": { "column": 12, "file": "", - "line": 4372 + "line": 3783 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4372 + "line": 3783 }, "name": "parent", "type": { @@ -25704,14 +26343,14 @@ "location": { "column": 12, "file": "", - "line": 4374 + "line": 3785 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4374 + "line": 3785 }, "name": "parent", "type": { @@ -25759,14 +26398,14 @@ "location": { "column": 12, "file": "", - "line": 4355 + "line": 3766 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4355 + "line": 3766 }, "name": "parent", "type": { @@ -25814,14 +26453,14 @@ "location": { "column": 12, "file": "", - "line": 4365 + "line": 3776 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4365 + "line": 3776 }, "name": "obj", "type": { @@ -25872,16 +26511,16 @@ "location": { "column": 22, "file": "", - "line": 4368 + "line": 3779 }, "parameters": [ { "location": { "column": 71, "file": "", - "line": 4368 + "line": 3779 }, - "name": "calendar", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -25930,16 +26569,16 @@ "location": { "column": 8, "file": "", - "line": 4369 + "line": 3780 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 4369 + "line": 3780 }, - "name": "calendar", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -25985,16 +26624,16 @@ "location": { "column": 13, "file": "", - "line": 4370 + "line": 3781 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4370 + "line": 3781 }, - "name": "calendar", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -26013,9 +26652,9 @@ }, { "location": { - "column": 88, + "column": 83, "file": "", - "line": 4370 + "line": 3781 }, "name": "date", "type": { @@ -26060,16 +26699,16 @@ "location": { "column": 28, "file": "", - "line": 4367 + "line": 3778 }, "parameters": [ { "location": { "column": 71, "file": "", - "line": 4367 + "line": 3778 }, - "name": "calendar", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -26121,16 +26760,16 @@ "location": { "column": 28, "file": "", - "line": 4366 + "line": 3777 }, "parameters": [ { "location": { "column": 70, "file": "", - "line": 4366 + "line": 3777 }, - "name": "calendar", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -26182,14 +26821,14 @@ "location": { "column": 6, "file": "", - "line": 4375 + "line": 3786 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4375 + "line": 3786 }, "name": "parent", "type": { @@ -26209,7 +26848,7 @@ "location": { "column": 78, "file": "", - "line": 4375 + "line": 3786 }, "name": "years_list", "type": { @@ -26257,14 +26896,14 @@ "location": { "column": 6, "file": "", - "line": 4364 + "line": 3775 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4364 + "line": 3775 }, "name": "obj", "type": { @@ -26284,7 +26923,7 @@ "location": { "column": 60, "file": "", - "line": 4364 + "line": 3775 }, "name": "day_names", "type": { @@ -26335,14 +26974,14 @@ "location": { "column": 6, "file": "", - "line": 4363 + "line": 3774 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4363 + "line": 3774 }, "name": "obj", "type": { @@ -26362,7 +27001,7 @@ "location": { "column": 75, "file": "", - "line": 4363 + "line": 3774 }, "name": "highlighted", "type": { @@ -26385,7 +27024,7 @@ "location": { "column": 97, "file": "", - "line": 4363 + "line": 3774 }, "name": "date_num", "type": { @@ -26427,14 +27066,14 @@ "location": { "column": 6, "file": "", - "line": 4360 + "line": 3771 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4360 + "line": 3771 }, "name": "obj", "type": { @@ -26454,7 +27093,7 @@ "location": { "column": 59, "file": "", - "line": 4360 + "line": 3771 }, "name": "year", "type": { @@ -26471,7 +27110,7 @@ "location": { "column": 74, "file": "", - "line": 4360 + "line": 3771 }, "name": "month", "type": { @@ -26513,14 +27152,14 @@ "location": { "column": 6, "file": "", - "line": 4362 + "line": 3773 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4362 + "line": 3773 }, "name": "obj", "type": { @@ -26540,7 +27179,7 @@ "location": { "column": 59, "file": "", - "line": 4362 + "line": 3773 }, "name": "month", "type": { @@ -26582,14 +27221,14 @@ "location": { "column": 6, "file": "", - "line": 4361 + "line": 3772 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4361 + "line": 3772 }, "name": "obj", "type": { @@ -26609,7 +27248,7 @@ "location": { "column": 58, "file": "", - "line": 4361 + "line": 3772 }, "name": "year", "type": { @@ -26651,14 +27290,14 @@ "location": { "column": 6, "file": "", - "line": 4356 + "line": 3767 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4356 + "line": 3767 }, "name": "obj", "type": { @@ -26678,7 +27317,7 @@ "location": { "column": 58, "file": "", - "line": 4356 + "line": 3767 }, "name": "year", "type": { @@ -26695,7 +27334,7 @@ "location": { "column": 73, "file": "", - "line": 4356 + "line": 3767 }, "name": "month", "type": { @@ -26712,7 +27351,7 @@ "location": { "column": 89, "file": "", - "line": 4356 + "line": 3767 }, "name": "day", "type": { @@ -26754,14 +27393,14 @@ "location": { "column": 6, "file": "", - "line": 4359 + "line": 3770 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4359 + "line": 3770 }, "name": "obj", "type": { @@ -26781,7 +27420,7 @@ "location": { "column": 57, "file": "", - "line": 4359 + "line": 3770 }, "name": "day", "type": { @@ -26823,14 +27462,14 @@ "location": { "column": 6, "file": "", - "line": 4358 + "line": 3769 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4358 + "line": 3769 }, "name": "obj", "type": { @@ -26850,7 +27489,7 @@ "location": { "column": 59, "file": "", - "line": 4358 + "line": 3769 }, "name": "month", "type": { @@ -26892,14 +27531,14 @@ "location": { "column": 6, "file": "", - "line": 4357 + "line": 3768 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4357 + "line": 3768 }, "name": "obj", "type": { @@ -26919,7 +27558,7 @@ "location": { "column": 58, "file": "", - "line": 4357 + "line": 3768 }, "name": "year", "type": { @@ -26961,14 +27600,14 @@ "location": { "column": 8, "file": "", - "line": 399 + "line": 813 }, "parameters": [ { "location": { "column": 25, "file": "", - "line": 399 + "line": 813 }, "name": "num", "type": { @@ -26985,7 +27624,7 @@ "location": { "column": 37, "file": "", - "line": 399 + "line": 813 }, "name": "size", "type": { @@ -27029,14 +27668,14 @@ "location": { "column": 10, "file": "", - "line": 4391 + "line": 3683 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4391 + "line": 3683 }, "name": "w", "type": { @@ -27053,7 +27692,7 @@ "location": { "column": 48, "file": "", - "line": 4391 + "line": 3683 }, "name": "h", "type": { @@ -27070,7 +27709,7 @@ "location": { "column": 59, "file": "", - "line": 4391 + "line": 3683 }, "name": "bpp", "type": { @@ -27087,7 +27726,7 @@ "location": { "column": 72, "file": "", - "line": 4391 + "line": 3683 }, "name": "stride", "type": { @@ -27129,14 +27768,14 @@ "location": { "column": 6, "file": "", - "line": 4386 + "line": 3678 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4386 + "line": 3678 }, "name": "obj", "type": { @@ -27156,7 +27795,7 @@ "location": { "column": 57, "file": "", - "line": 4386 + "line": 3678 }, "name": "canvas_area", "type": { @@ -27179,7 +27818,7 @@ "location": { "column": 86, "file": "", - "line": 4386 + "line": 3678 }, "name": "src_buf", "type": { @@ -27199,7 +27838,7 @@ "location": { "column": 41, "file": "", - "line": 4387 + "line": 3679 }, "name": "src_area", "type": { @@ -27247,14 +27886,14 @@ "location": { "column": 12, "file": "", - "line": 4377 + "line": 3669 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4377 + "line": 3669 }, "name": "parent", "type": { @@ -27302,14 +27941,14 @@ "location": { "column": 6, "file": "", - "line": 4388 + "line": 3680 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4388 + "line": 3680 }, "name": "obj", "type": { @@ -27329,7 +27968,7 @@ "location": { "column": 51, "file": "", - "line": 4388 + "line": 3680 }, "name": "color", "type": { @@ -27346,7 +27985,7 @@ "location": { "column": 67, "file": "", - "line": 4388 + "line": 3680 }, "name": "opa", "type": { @@ -27388,14 +28027,14 @@ "location": { "column": 6, "file": "", - "line": 4390 + "line": 3682 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4390 + "line": 3682 }, "name": "canvas", "type": { @@ -27415,7 +28054,7 @@ "location": { "column": 59, "file": "", - "line": 4390 + "line": 3682 }, "name": "layer", "type": { @@ -27460,16 +28099,16 @@ "location": { "column": 14, "file": "", - "line": 4385 + "line": 3677 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4385 + "line": 3677 }, - "name": "canvas", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -27518,14 +28157,14 @@ "location": { "column": 17, "file": "", - "line": 4382 + "line": 3674 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4382 + "line": 3674 }, "name": "obj", "type": { @@ -27573,16 +28212,16 @@ "location": { "column": 18, "file": "", - "line": 4384 + "line": 3676 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4384 + "line": 3676 }, - "name": "canvas", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -27628,14 +28267,14 @@ "location": { "column": 14, "file": "", - "line": 4383 + "line": 3675 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4383 + "line": 3675 }, "name": "obj", "type": { @@ -27655,7 +28294,7 @@ "location": { "column": 55, "file": "", - "line": 4383 + "line": 3675 }, "name": "x", "type": { @@ -27672,7 +28311,7 @@ "location": { "column": 66, "file": "", - "line": 4383 + "line": 3675 }, "name": "y", "type": { @@ -27714,16 +28353,16 @@ "location": { "column": 6, "file": "", - "line": 4389 + "line": 3681 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4389 + "line": 3681 }, - "name": "canvas", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -27739,9 +28378,9 @@ }, { "location": { - "column": 57, + "column": 54, "file": "", - "line": 4389 + "line": 3681 }, "name": "layer", "type": { @@ -27786,14 +28425,14 @@ "location": { "column": 6, "file": "", - "line": 4378 + "line": 3670 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4378 + "line": 3670 }, "name": "obj", "type": { @@ -27813,7 +28452,7 @@ "location": { "column": 48, "file": "", - "line": 4378 + "line": 3670 }, "name": "buf", "type": { @@ -27833,7 +28472,7 @@ "location": { "column": 63, "file": "", - "line": 4378 + "line": 3670 }, "name": "w", "type": { @@ -27850,7 +28489,7 @@ "location": { "column": 74, "file": "", - "line": 4378 + "line": 3670 }, "name": "h", "type": { @@ -27867,7 +28506,7 @@ "location": { "column": 95, "file": "", - "line": 4378 + "line": 3670 }, "name": "cf", "type": { @@ -27909,14 +28548,14 @@ "location": { "column": 6, "file": "", - "line": 4379 + "line": 3671 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4379 + "line": 3671 }, "name": "obj", "type": { @@ -27936,7 +28575,7 @@ "location": { "column": 59, "file": "", - "line": 4379 + "line": 3671 }, "name": "draw_buf", "type": { @@ -27981,14 +28620,14 @@ "location": { "column": 6, "file": "", - "line": 4381 + "line": 3673 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4381 + "line": 3673 }, "name": "obj", "type": { @@ -28008,7 +28647,7 @@ "location": { "column": 52, "file": "", - "line": 4381 + "line": 3673 }, "name": "index", "type": { @@ -28025,7 +28664,7 @@ "location": { "column": 72, "file": "", - "line": 4381 + "line": 3673 }, "name": "color", "type": { @@ -28067,14 +28706,14 @@ "location": { "column": 6, "file": "", - "line": 4380 + "line": 3672 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4380 + "line": 3672 }, "name": "obj", "type": { @@ -28094,7 +28733,7 @@ "location": { "column": 47, "file": "", - "line": 4380 + "line": 3672 }, "name": "x", "type": { @@ -28111,7 +28750,7 @@ "location": { "column": 58, "file": "", - "line": 4380 + "line": 3672 }, "name": "y", "type": { @@ -28128,7 +28767,7 @@ "location": { "column": 72, "file": "", - "line": 4380 + "line": 3672 }, "name": "color", "type": { @@ -28145,7 +28784,7 @@ "location": { "column": 88, "file": "", - "line": 4380 + "line": 3672 }, "name": "opa", "type": { @@ -28187,14 +28826,14 @@ "location": { "column": 21, "file": "", - "line": 4438 + "line": 3833 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4438 + "line": 3833 }, "name": "obj", "type": { @@ -28214,7 +28853,7 @@ "location": { "column": 68, "file": "", - "line": 4438 + "line": 3833 }, "name": "color", "type": { @@ -28231,7 +28870,7 @@ "location": { "column": 84, "file": "", - "line": 4438 + "line": 3833 }, "name": "dir", "type": { @@ -28276,14 +28915,14 @@ "location": { "column": 21, "file": "", - "line": 4431 + "line": 3826 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4431 + "line": 3826 }, "name": "obj", "type": { @@ -28303,7 +28942,7 @@ "location": { "column": 68, "file": "", - "line": 4431 + "line": 3826 }, "name": "color", "type": { @@ -28320,7 +28959,7 @@ "location": { "column": 91, "file": "", - "line": 4431 + "line": 3826 }, "name": "axis", "type": { @@ -28365,14 +29004,14 @@ "location": { "column": 12, "file": "", - "line": 4413 + "line": 3808 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4413 + "line": 3808 }, "name": "parent", "type": { @@ -28420,14 +29059,14 @@ "location": { "column": 12, "file": "", - "line": 4445 + "line": 3840 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4445 + "line": 3840 }, "name": "chart", "type": { @@ -28447,7 +29086,7 @@ "location": { "column": 74, "file": "", - "line": 4445 + "line": 3840 }, "name": "cursor", "type": { @@ -28492,14 +29131,14 @@ "location": { "column": 9, "file": "", - "line": 4460 + "line": 3855 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4460 + "line": 3855 }, "name": "obj", "type": { @@ -28544,14 +29183,14 @@ "location": { "column": 10, "file": "", - "line": 4426 + "line": 3821 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4426 + "line": 3821 }, "name": "obj", "type": { @@ -28599,14 +29238,14 @@ "location": { "column": 10, "file": "", - "line": 4424 + "line": 3819 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4424 + "line": 3819 }, "name": "obj", "type": { @@ -28654,14 +29293,14 @@ "location": { "column": 6, "file": "", - "line": 4429 + "line": 3824 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4429 + "line": 3824 }, "name": "obj", "type": { @@ -28681,7 +29320,7 @@ "location": { "column": 69, "file": "", - "line": 4429 + "line": 3824 }, "name": "ser", "type": { @@ -28701,7 +29340,7 @@ "location": { "column": 85, "file": "", - "line": 4429 + "line": 3824 }, "name": "id", "type": { @@ -28718,7 +29357,7 @@ "location": { "column": 100, "file": "", - "line": 4429 + "line": 3824 }, "name": "p_out", "type": { @@ -28763,14 +29402,14 @@ "location": { "column": 10, "file": "", - "line": 4459 + "line": 3854 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4459 + "line": 3854 }, "name": "obj", "type": { @@ -28818,14 +29457,14 @@ "location": { "column": 12, "file": "", - "line": 4435 + "line": 3830 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4435 + "line": 3830 }, "name": "chart", "type": { @@ -28845,7 +29484,7 @@ "location": { "column": 80, "file": "", - "line": 4435 + "line": 3830 }, "name": "series", "type": { @@ -28893,16 +29532,16 @@ "location": { "column": 21, "file": "", - "line": 4437 + "line": 3832 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 4437 + "line": 3832 }, - "name": "chart", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -28921,9 +29560,9 @@ }, { "location": { - "column": 94, + "column": 92, "file": "", - "line": 4437 + "line": 3832 }, "name": "ser", "type": { @@ -28974,14 +29613,14 @@ "location": { "column": 11, "file": "", - "line": 4458 + "line": 3853 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4458 + "line": 3853 }, "name": "obj", "type": { @@ -29004,7 +29643,7 @@ "location": { "column": 79, "file": "", - "line": 4458 + "line": 3853 }, "name": "ser", "type": { @@ -29052,14 +29691,14 @@ "location": { "column": 11, "file": "", - "line": 4457 + "line": 3852 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4457 + "line": 3852 }, "name": "obj", "type": { @@ -29082,7 +29721,7 @@ "location": { "column": 79, "file": "", - "line": 4457 + "line": 3852 }, "name": "ser", "type": { @@ -29130,14 +29769,14 @@ "location": { "column": 17, "file": "", - "line": 4423 + "line": 3818 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4423 + "line": 3818 }, "name": "obj", "type": { @@ -29185,14 +29824,14 @@ "location": { "column": 24, "file": "", - "line": 4425 + "line": 3820 }, "parameters": [ { "location": { "column": 64, "file": "", - "line": 4425 + "line": 3820 }, "name": "obj", "type": { @@ -29240,14 +29879,14 @@ "location": { "column": 10, "file": "", - "line": 4427 + "line": 3822 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4427 + "line": 3822 }, "name": "obj", "type": { @@ -29295,14 +29934,14 @@ "location": { "column": 10, "file": "", - "line": 4428 + "line": 3823 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4428 + "line": 3823 }, "name": "obj", "type": { @@ -29325,7 +29964,7 @@ "location": { "column": 77, "file": "", - "line": 4428 + "line": 3823 }, "name": "ser", "type": { @@ -29370,14 +30009,14 @@ "location": { "column": 6, "file": "", - "line": 4433 + "line": 3828 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4433 + "line": 3828 }, "name": "chart", "type": { @@ -29397,7 +30036,7 @@ "location": { "column": 63, "file": "", - "line": 4433 + "line": 3828 }, "name": "series", "type": { @@ -29417,7 +30056,7 @@ "location": { "column": 78, "file": "", - "line": 4433 + "line": 3828 }, "name": "hide", "type": { @@ -29459,14 +30098,14 @@ "location": { "column": 6, "file": "", - "line": 4430 + "line": 3825 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4430 + "line": 3825 }, "name": "obj", "type": { @@ -29511,14 +30150,14 @@ "location": { "column": 6, "file": "", - "line": 4439 + "line": 3834 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4439 + "line": 3834 }, "name": "obj", "type": { @@ -29538,7 +30177,7 @@ "location": { "column": 63, "file": "", - "line": 4439 + "line": 3834 }, "name": "cursor", "type": { @@ -29583,14 +30222,14 @@ "location": { "column": 6, "file": "", - "line": 4432 + "line": 3827 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4432 + "line": 3827 }, "name": "obj", "type": { @@ -29610,7 +30249,7 @@ "location": { "column": 63, "file": "", - "line": 4432 + "line": 3827 }, "name": "series", "type": { @@ -29655,14 +30294,14 @@ "location": { "column": 6, "file": "", - "line": 4446 + "line": 3841 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4446 + "line": 3841 }, "name": "obj", "type": { @@ -29682,7 +30321,7 @@ "location": { "column": 64, "file": "", - "line": 4446 + "line": 3841 }, "name": "ser", "type": { @@ -29702,7 +30341,7 @@ "location": { "column": 79, "file": "", - "line": 4446 + "line": 3841 }, "name": "value", "type": { @@ -29744,14 +30383,14 @@ "location": { "column": 6, "file": "", - "line": 4418 + "line": 3813 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4418 + "line": 3813 }, "name": "obj", "type": { @@ -29771,7 +30410,7 @@ "location": { "column": 66, "file": "", - "line": 4418 + "line": 3813 }, "name": "axis", "type": { @@ -29788,7 +30427,7 @@ "location": { "column": 80, "file": "", - "line": 4418 + "line": 3813 }, "name": "max", "type": { @@ -29830,14 +30469,14 @@ "location": { "column": 6, "file": "", - "line": 4417 + "line": 3812 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4417 + "line": 3812 }, "name": "obj", "type": { @@ -29857,7 +30496,7 @@ "location": { "column": 66, "file": "", - "line": 4417 + "line": 3812 }, "name": "axis", "type": { @@ -29874,7 +30513,7 @@ "location": { "column": 80, "file": "", - "line": 4417 + "line": 3812 }, "name": "min", "type": { @@ -29916,14 +30555,14 @@ "location": { "column": 6, "file": "", - "line": 4416 + "line": 3811 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4416 + "line": 3811 }, "name": "obj", "type": { @@ -29943,7 +30582,7 @@ "location": { "column": 62, "file": "", - "line": 4416 + "line": 3811 }, "name": "axis", "type": { @@ -29960,7 +30599,7 @@ "location": { "column": 76, "file": "", - "line": 4416 + "line": 3811 }, "name": "min", "type": { @@ -29977,7 +30616,7 @@ "location": { "column": 89, "file": "", - "line": 4416 + "line": 3811 }, "name": "max", "type": { @@ -30019,14 +30658,14 @@ "location": { "column": 6, "file": "", - "line": 4443 + "line": 3838 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4443 + "line": 3838 }, "name": "chart", "type": { @@ -30046,7 +30685,7 @@ "location": { "column": 68, "file": "", - "line": 4443 + "line": 3838 }, "name": "cursor", "type": { @@ -30066,7 +30705,7 @@ "location": { "column": 96, "file": "", - "line": 4443 + "line": 3838 }, "name": "ser", "type": { @@ -30086,7 +30725,7 @@ "location": { "column": 41, "file": "", - "line": 4444 + "line": 3839 }, "name": "point_id", "type": { @@ -30128,14 +30767,14 @@ "location": { "column": 6, "file": "", - "line": 4440 + "line": 3835 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4440 + "line": 3835 }, "name": "chart", "type": { @@ -30155,7 +30794,7 @@ "location": { "column": 66, "file": "", - "line": 4440 + "line": 3835 }, "name": "cursor", "type": { @@ -30175,7 +30814,7 @@ "location": { "column": 87, "file": "", - "line": 4440 + "line": 3835 }, "name": "pos", "type": { @@ -30220,14 +30859,14 @@ "location": { "column": 6, "file": "", - "line": 4441 + "line": 3836 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4441 + "line": 3836 }, "name": "chart", "type": { @@ -30247,7 +30886,7 @@ "location": { "column": 68, "file": "", - "line": 4441 + "line": 3836 }, "name": "cursor", "type": { @@ -30267,7 +30906,7 @@ "location": { "column": 86, "file": "", - "line": 4441 + "line": 3836 }, "name": "x", "type": { @@ -30309,14 +30948,14 @@ "location": { "column": 6, "file": "", - "line": 4442 + "line": 3837 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4442 + "line": 3837 }, "name": "chart", "type": { @@ -30336,7 +30975,7 @@ "location": { "column": 68, "file": "", - "line": 4442 + "line": 3837 }, "name": "cursor", "type": { @@ -30356,7 +30995,7 @@ "location": { "column": 86, "file": "", - "line": 4442 + "line": 3837 }, "name": "y", "type": { @@ -30398,14 +31037,14 @@ "location": { "column": 6, "file": "", - "line": 4420 + "line": 3815 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4420 + "line": 3815 }, "name": "obj", "type": { @@ -30425,7 +31064,7 @@ "location": { "column": 59, "file": "", - "line": 4420 + "line": 3815 }, "name": "hdiv", "type": { @@ -30442,7 +31081,7 @@ "location": { "column": 74, "file": "", - "line": 4420 + "line": 3815 }, "name": "vdiv", "type": { @@ -30484,14 +31123,14 @@ "location": { "column": 6, "file": "", - "line": 4421 + "line": 3816 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4421 + "line": 3816 }, "name": "obj", "type": { @@ -30511,7 +31150,7 @@ "location": { "column": 63, "file": "", - "line": 4421 + "line": 3816 }, "name": "cnt", "type": { @@ -30553,14 +31192,14 @@ "location": { "column": 6, "file": "", - "line": 4447 + "line": 3842 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4447 + "line": 3842 }, "name": "obj", "type": { @@ -30580,7 +31219,7 @@ "location": { "column": 64, "file": "", - "line": 4447 + "line": 3842 }, "name": "ser", "type": { @@ -30600,7 +31239,7 @@ "location": { "column": 79, "file": "", - "line": 4447 + "line": 3842 }, "name": "value", "type": { @@ -30642,14 +31281,14 @@ "location": { "column": 6, "file": "", - "line": 4448 + "line": 3843 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4448 + "line": 3843 }, "name": "obj", "type": { @@ -30669,7 +31308,7 @@ "location": { "column": 65, "file": "", - "line": 4448 + "line": 3843 }, "name": "ser", "type": { @@ -30689,7 +31328,7 @@ "location": { "column": 80, "file": "", - "line": 4448 + "line": 3843 }, "name": "x_value", "type": { @@ -30706,7 +31345,7 @@ "location": { "column": 97, "file": "", - "line": 4448 + "line": 3843 }, "name": "y_value", "type": { @@ -30748,14 +31387,14 @@ "location": { "column": 6, "file": "", - "line": 4415 + "line": 3810 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4415 + "line": 3810 }, "name": "obj", "type": { @@ -30775,7 +31414,7 @@ "location": { "column": 56, "file": "", - "line": 4415 + "line": 3810 }, "name": "cnt", "type": { @@ -30817,14 +31456,14 @@ "location": { "column": 6, "file": "", - "line": 4434 + "line": 3829 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4434 + "line": 3829 }, "name": "chart", "type": { @@ -30844,7 +31483,7 @@ "location": { "column": 68, "file": "", - "line": 4434 + "line": 3829 }, "name": "series", "type": { @@ -30864,7 +31503,7 @@ "location": { "column": 89, "file": "", - "line": 4434 + "line": 3829 }, "name": "color", "type": { @@ -30906,14 +31545,14 @@ "location": { "column": 6, "file": "", - "line": 4456 + "line": 3851 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4456 + "line": 3851 }, "name": "obj", "type": { @@ -30933,7 +31572,7 @@ "location": { "column": 72, "file": "", - "line": 4456 + "line": 3851 }, "name": "ser", "type": { @@ -30953,7 +31592,7 @@ "location": { "column": 87, "file": "", - "line": 4456 + "line": 3851 }, "name": "array", "type": { @@ -31001,14 +31640,14 @@ "location": { "column": 6, "file": "", - "line": 4455 + "line": 3850 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4455 + "line": 3850 }, "name": "obj", "type": { @@ -31028,7 +31667,7 @@ "location": { "column": 72, "file": "", - "line": 4455 + "line": 3850 }, "name": "ser", "type": { @@ -31048,7 +31687,7 @@ "location": { "column": 87, "file": "", - "line": 4455 + "line": 3850 }, "name": "array", "type": { @@ -31096,14 +31735,14 @@ "location": { "column": 6, "file": "", - "line": 4452 + "line": 3847 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4452 + "line": 3847 }, "name": "obj", "type": { @@ -31123,7 +31762,7 @@ "location": { "column": 72, "file": "", - "line": 4452 + "line": 3847 }, "name": "ser", "type": { @@ -31143,7 +31782,7 @@ "location": { "column": 88, "file": "", - "line": 4452 + "line": 3847 }, "name": "id", "type": { @@ -31160,7 +31799,7 @@ "location": { "column": 100, "file": "", - "line": 4452 + "line": 3847 }, "name": "value", "type": { @@ -31202,14 +31841,14 @@ "location": { "column": 6, "file": "", - "line": 4453 + "line": 3848 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4453 + "line": 3848 }, "name": "obj", "type": { @@ -31229,7 +31868,7 @@ "location": { "column": 73, "file": "", - "line": 4453 + "line": 3848 }, "name": "ser", "type": { @@ -31249,7 +31888,7 @@ "location": { "column": 89, "file": "", - "line": 4453 + "line": 3848 }, "name": "id", "type": { @@ -31266,7 +31905,7 @@ "location": { "column": 101, "file": "", - "line": 4453 + "line": 3848 }, "name": "x_value", "type": { @@ -31283,7 +31922,7 @@ "location": { "column": 47, "file": "", - "line": 4454 + "line": 3849 }, "name": "y_value", "type": { @@ -31325,14 +31964,14 @@ "location": { "column": 6, "file": "", - "line": 4449 + "line": 3844 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4449 + "line": 3844 }, "name": "obj", "type": { @@ -31352,7 +31991,7 @@ "location": { "column": 67, "file": "", - "line": 4449 + "line": 3844 }, "name": "ser", "type": { @@ -31372,7 +32011,7 @@ "location": { "column": 88, "file": "", - "line": 4449 + "line": 3844 }, "name": "values", "type": { @@ -31398,7 +32037,7 @@ "location": { "column": 105, "file": "", - "line": 4449 + "line": 3844 }, "name": "values_cnt", "type": { @@ -31440,14 +32079,14 @@ "location": { "column": 6, "file": "", - "line": 4450 + "line": 3845 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4450 + "line": 3845 }, "name": "obj", "type": { @@ -31467,7 +32106,7 @@ "location": { "column": 68, "file": "", - "line": 4450 + "line": 3845 }, "name": "ser", "type": { @@ -31487,7 +32126,7 @@ "location": { "column": 89, "file": "", - "line": 4450 + "line": 3845 }, "name": "x_values", "type": { @@ -31513,7 +32152,7 @@ "location": { "column": 48, "file": "", - "line": 4451 + "line": 3846 }, "name": "y_values", "type": { @@ -31539,7 +32178,7 @@ "location": { "column": 67, "file": "", - "line": 4451 + "line": 3846 }, "name": "values_cnt", "type": { @@ -31581,14 +32220,14 @@ "location": { "column": 6, "file": "", - "line": 4414 + "line": 3809 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4414 + "line": 3809 }, "name": "obj", "type": { @@ -31608,7 +32247,7 @@ "location": { "column": 56, "file": "", - "line": 4414 + "line": 3809 }, "name": "type", "type": { @@ -31650,14 +32289,14 @@ "location": { "column": 6, "file": "", - "line": 4419 + "line": 3814 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4419 + "line": 3814 }, "name": "obj", "type": { @@ -31677,7 +32316,7 @@ "location": { "column": 70, "file": "", - "line": 4419 + "line": 3814 }, "name": "update_mode", "type": { @@ -31719,14 +32358,14 @@ "location": { "column": 6, "file": "", - "line": 4422 + "line": 3817 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4422 + "line": 3817 }, "name": "obj", "type": { @@ -31746,7 +32385,7 @@ "location": { "column": 63, "file": "", - "line": 4422 + "line": 3817 }, "name": "cnt", "type": { @@ -31788,14 +32427,14 @@ "location": { "column": 6, "file": "", - "line": 4436 + "line": 3831 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4436 + "line": 3831 }, "name": "obj", "type": { @@ -31815,7 +32454,7 @@ "location": { "column": 67, "file": "", - "line": 4436 + "line": 3831 }, "name": "ser", "type": { @@ -31835,7 +32474,7 @@ "location": { "column": 83, "file": "", - "line": 4436 + "line": 3831 }, "name": "id", "type": { @@ -31877,14 +32516,14 @@ "location": { "column": 12, "file": "", - "line": 4462 + "line": 3857 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4462 + "line": 3857 }, "name": "parent", "type": { @@ -31932,14 +32571,14 @@ "location": { "column": 14, "file": "", - "line": 4465 + "line": 3860 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4465 + "line": 3860 }, "name": "obj", "type": { @@ -31993,14 +32632,14 @@ "location": { "column": 6, "file": "", - "line": 4463 + "line": 3858 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4463 + "line": 3858 }, "name": "obj", "type": { @@ -32020,7 +32659,7 @@ "location": { "column": 54, "file": "", - "line": 4463 + "line": 3858 }, "name": "txt", "type": { @@ -32068,14 +32707,14 @@ "location": { "column": 6, "file": "", - "line": 4464 + "line": 3859 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4464 + "line": 3859 }, "name": "obj", "type": { @@ -32095,7 +32734,7 @@ "location": { "column": 61, "file": "", - "line": 4464 + "line": 3859 }, "name": "txt", "type": { @@ -32143,14 +32782,14 @@ "location": { "column": 10, "file": "", - "line": 1089 + "line": 6550 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 1089 + "line": 6550 }, "name": "circle_buf", "type": { @@ -32198,14 +32837,14 @@ "location": { "column": 19, "file": "", - "line": 1083 + "line": 6544 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1083 + "line": 6544 }, "name": "capacity", "type": { @@ -32222,7 +32861,7 @@ "location": { "column": 68, "file": "", - "line": 1083 + "line": 6544 }, "name": "element_size", "type": { @@ -32266,14 +32905,14 @@ "location": { "column": 19, "file": "", - "line": 1085 + "line": 6546 }, "parameters": [ { "location": { "column": 68, "file": "", - "line": 1085 + "line": 6546 }, "name": "array", "type": { @@ -32323,14 +32962,14 @@ "location": { "column": 19, "file": "", - "line": 1084 + "line": 6545 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 1084 + "line": 6545 }, "name": "buf", "type": { @@ -32350,7 +32989,7 @@ "location": { "column": 70, "file": "", - "line": 1084 + "line": 6545 }, "name": "capacity", "type": { @@ -32367,7 +33006,7 @@ "location": { "column": 89, "file": "", - "line": 1084 + "line": 6545 }, "name": "element_size", "type": { @@ -32411,14 +33050,14 @@ "location": { "column": 6, "file": "", - "line": 1087 + "line": 6548 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1087 + "line": 6548 }, "name": "circle_buf", "type": { @@ -32463,14 +33102,14 @@ "location": { "column": 10, "file": "", - "line": 1098 + "line": 6559 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1098 + "line": 6559 }, "name": "circle_buf", "type": { @@ -32490,7 +33129,7 @@ "location": { "column": 68, "file": "", - "line": 1098 + "line": 6559 }, "name": "count", "type": { @@ -32507,7 +33146,7 @@ "location": { "column": 99, "file": "", - "line": 1098 + "line": 6559 }, "name": "fill_cb", "type": { @@ -32524,7 +33163,7 @@ "location": { "column": 34, "file": "", - "line": 1099 + "line": 6560 }, "name": "user_data", "type": { @@ -32569,14 +33208,14 @@ "location": { "column": 8, "file": "", - "line": 1094 + "line": 6555 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1094 + "line": 6555 }, "name": "circle_buf", "type": { @@ -32627,14 +33266,14 @@ "location": { "column": 6, "file": "", - "line": 1091 + "line": 6552 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1091 + "line": 6552 }, "name": "circle_buf", "type": { @@ -32682,14 +33321,14 @@ "location": { "column": 6, "file": "", - "line": 1092 + "line": 6553 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1092 + "line": 6553 }, "name": "circle_buf", "type": { @@ -32737,14 +33376,14 @@ "location": { "column": 13, "file": "", - "line": 1101 + "line": 6562 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 1101 + "line": 6562 }, "name": "circle_buf", "type": { @@ -32767,7 +33406,7 @@ "location": { "column": 73, "file": "", - "line": 1101 + "line": 6562 }, "name": "data", "type": { @@ -32812,14 +33451,14 @@ "location": { "column": 13, "file": "", - "line": 1102 + "line": 6563 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 1102 + "line": 6563 }, "name": "circle_buf", "type": { @@ -32842,7 +33481,7 @@ "location": { "column": 80, "file": "", - "line": 1102 + "line": 6563 }, "name": "index", "type": { @@ -32859,7 +33498,7 @@ "location": { "column": 92, "file": "", - "line": 1102 + "line": 6563 }, "name": "data", "type": { @@ -32904,14 +33543,14 @@ "location": { "column": 13, "file": "", - "line": 1096 + "line": 6557 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1096 + "line": 6557 }, "name": "circle_buf", "type": { @@ -32931,7 +33570,7 @@ "location": { "column": 67, "file": "", - "line": 1096 + "line": 6557 }, "name": "data", "type": { @@ -32976,14 +33615,14 @@ "location": { "column": 10, "file": "", - "line": 1090 + "line": 6551 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 1090 + "line": 6551 }, "name": "circle_buf", "type": { @@ -33031,14 +33670,14 @@ "location": { "column": 6, "file": "", - "line": 1093 + "line": 6554 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1093 + "line": 6554 }, "name": "circle_buf", "type": { @@ -33083,14 +33722,14 @@ "location": { "column": 13, "file": "", - "line": 1086 + "line": 6547 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1086 + "line": 6547 }, "name": "circle_buf", "type": { @@ -33110,7 +33749,7 @@ "location": { "column": 73, "file": "", - "line": 1086 + "line": 6547 }, "name": "capacity", "type": { @@ -33152,14 +33791,14 @@ "location": { "column": 10, "file": "", - "line": 1088 + "line": 6549 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1088 + "line": 6549 }, "name": "circle_buf", "type": { @@ -33207,14 +33846,14 @@ "location": { "column": 13, "file": "", - "line": 1100 + "line": 6561 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1100 + "line": 6561 }, "name": "circle_buf", "type": { @@ -33259,14 +33898,14 @@ "location": { "column": 8, "file": "", - "line": 1095 + "line": 6556 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1095 + "line": 6556 }, "name": "circle_buf", "type": { @@ -33317,14 +33956,14 @@ "location": { "column": 13, "file": "", - "line": 1097 + "line": 6558 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1097 + "line": 6558 }, "name": "circle_buf", "type": { @@ -33344,7 +33983,7 @@ "location": { "column": 74, "file": "", - "line": 1097 + "line": 6558 }, "name": "data", "type": { @@ -33392,14 +34031,14 @@ "location": { "column": 9, "file": "", - "line": 2157 + "line": 1964 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 2157 + "line": 1964 }, "name": "height", "type": { @@ -33416,7 +34055,7 @@ "location": { "column": 49, "file": "", - "line": 2157 + "line": 1964 }, "name": "min_height", "type": { @@ -33433,7 +34072,7 @@ "location": { "column": 69, "file": "", - "line": 2157 + "line": 1964 }, "name": "max_height", "type": { @@ -33450,7 +34089,7 @@ "location": { "column": 89, "file": "", - "line": 2157 + "line": 1964 }, "name": "ref_height", "type": { @@ -33491,14 +34130,14 @@ "location": { "column": 9, "file": "", - "line": 2156 + "line": 1963 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 2156 + "line": 1963 }, "name": "width", "type": { @@ -33515,7 +34154,7 @@ "location": { "column": 47, "file": "", - "line": 2156 + "line": 1963 }, "name": "min_width", "type": { @@ -33532,7 +34171,7 @@ "location": { "column": 66, "file": "", - "line": 2156 + "line": 1963 }, "name": "max_width", "type": { @@ -33549,7 +34188,7 @@ "location": { "column": 85, "file": "", - "line": 2156 + "line": 1963 }, "name": "ref_width", "type": { @@ -33590,14 +34229,14 @@ "location": { "column": 9, "file": "", - "line": 891 + "line": 949 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 891 + "line": 949 }, "name": "c", "type": { @@ -33642,14 +34281,14 @@ "location": { "column": 6, "file": "", - "line": 889 + "line": 947 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 889 + "line": 947 }, "name": "c", "type": { @@ -33669,7 +34308,7 @@ "location": { "column": 56, "file": "", - "line": 889 + "line": 947 }, "name": "a", "type": { @@ -33713,14 +34352,14 @@ "location": { "column": 26, "file": "", - "line": 874 + "line": 932 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 874 + "line": 932 }, "name": "c", "type": { @@ -33764,14 +34403,14 @@ "location": { "column": 9, "file": "", - "line": 892 + "line": 950 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 892 + "line": 950 }, "name": "c", "type": { @@ -33818,14 +34457,14 @@ "location": { "column": 6, "file": "", - "line": 860 + "line": 918 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 860 + "line": 918 }, "name": "c1", "type": { @@ -33842,7 +34481,7 @@ "location": { "column": 50, "file": "", - "line": 860 + "line": 918 }, "name": "c2", "type": { @@ -33873,6 +34512,76 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_color32_lumi_of", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 6211 + }, + "parameters": [ + { + "location": { + "column": 55, + "file": "", + "line": 6211 + }, + "name": "c", + "type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + } + }, + { + "location": { + "column": 63, + "file": "", + "line": 6211 + }, + "name": "premultiplied", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "lumi_of", + "receiver": "color32_t", + "return_type": { + "kind": "identifier", + "name": "uint8_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -33884,14 +34593,14 @@ "location": { "column": 9, "file": "", - "line": 893 + "line": 951 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 893 + "line": 951 }, "name": "c", "type": { @@ -33933,14 +34642,14 @@ "location": { "column": 14, "file": "", - "line": 863 + "line": 921 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 863 + "line": 921 }, "name": "r", "type": { @@ -33957,7 +34666,7 @@ "location": { "column": 49, "file": "", - "line": 863 + "line": 921 }, "name": "g", "type": { @@ -33974,7 +34683,7 @@ "location": { "column": 60, "file": "", - "line": 863 + "line": 921 }, "name": "b", "type": { @@ -33991,7 +34700,7 @@ "location": { "column": 71, "file": "", - "line": 863 + "line": 921 }, "name": "a", "type": { @@ -34021,6 +34730,59 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_color32_unpremultiply", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 28, + "file": "", + "line": 6193 + }, + "parameters": [ + { + "location": { + "column": 66, + "file": "", + "line": 6193 + }, + "name": "c", + "type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + } + } + ], + "python_name": "unpremultiply", + "receiver": "color32_t", + "return_type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -34032,14 +34794,14 @@ "location": { "column": 10, "file": "", - "line": 880 + "line": 938 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 880 + "line": 938 }, "name": "c1", "type": { @@ -34056,7 +34818,7 @@ "location": { "column": 51, "file": "", - "line": 880 + "line": 938 }, "name": "c2", "type": { @@ -34073,7 +34835,7 @@ "location": { "column": 63, "file": "", - "line": 880 + "line": 938 }, "name": "mix", "type": { @@ -34103,6 +34865,92 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_color_16_16_mix_inlined", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 6217 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 6217 + }, + "name": "c1", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 73, + "file": "", + "line": 6217 + }, + "name": "c2", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 85, + "file": "", + "line": 6217 + }, + "name": "mix", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "color_16_16_mix_inlined", + "return_type": { + "kind": "identifier", + "name": "uint16_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -34114,7 +34962,7 @@ "location": { "column": 12, "file": "", - "line": 887 + "line": 945 }, "parameters": [], "python_name": "color_black", @@ -34144,14 +34992,14 @@ "location": { "column": 9, "file": "", - "line": 933 + "line": 991 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 933 + "line": 991 }, "name": "c", "type": { @@ -34193,14 +35041,14 @@ "location": { "column": 12, "file": "", - "line": 882 + "line": 940 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 882 + "line": 940 }, "name": "c", "type": { @@ -34217,7 +35065,7 @@ "location": { "column": 51, "file": "", - "line": 882 + "line": 940 }, "name": "lvl", "type": { @@ -34259,14 +35107,14 @@ "location": { "column": 6, "file": "", - "line": 859 + "line": 917 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 859 + "line": 917 }, "name": "c1", "type": { @@ -34283,7 +35131,7 @@ "location": { "column": 44, "file": "", - "line": 859 + "line": 917 }, "name": "c2", "type": { @@ -34325,14 +35173,14 @@ "location": { "column": 6, "file": "", - "line": 934 + "line": 992 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 934 + "line": 992 }, "name": "dsc", "type": { @@ -34352,7 +35200,7 @@ "location": { "column": 81, "file": "", - "line": 934 + "line": 992 }, "name": "cb", "type": { @@ -34394,14 +35242,14 @@ "location": { "column": 9, "file": "", - "line": 854 + "line": 912 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 854 + "line": 912 }, "name": "cf", "type": { @@ -34442,14 +35290,14 @@ "location": { "column": 9, "file": "", - "line": 855 + "line": 913 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 855 + "line": 913 }, "name": "cf", "type": { @@ -34490,14 +35338,14 @@ "location": { "column": 6, "file": "", - "line": 856 + "line": 914 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 856 + "line": 914 }, "name": "src_cf", "type": { @@ -34538,14 +35386,14 @@ "location": { "column": 12, "file": "", - "line": 861 + "line": 919 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 861 + "line": 919 }, "name": "c", "type": { @@ -34586,14 +35434,14 @@ "location": { "column": 12, "file": "", - "line": 864 + "line": 922 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 864 + "line": 922 }, "name": "c", "type": { @@ -34634,14 +35482,14 @@ "location": { "column": 12, "file": "", - "line": 883 + "line": 941 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 883 + "line": 941 }, "name": "h", "type": { @@ -34658,7 +35506,7 @@ "location": { "column": 52, "file": "", - "line": 883 + "line": 941 }, "name": "s", "type": { @@ -34675,7 +35523,7 @@ "location": { "column": 63, "file": "", - "line": 883 + "line": 941 }, "name": "v", "type": { @@ -34718,14 +35566,14 @@ "location": { "column": 20, "file": "", - "line": 865 + "line": 923 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 865 + "line": 923 }, "name": "color", "type": { @@ -34742,7 +35590,7 @@ "location": { "column": 70, "file": "", - "line": 865 + "line": 923 }, "name": "l_color", "type": { @@ -34759,7 +35607,7 @@ "location": { "column": 90, "file": "", - "line": 865 + "line": 923 }, "name": "h_color", "type": { @@ -34803,14 +35651,14 @@ "location": { "column": 12, "file": "", - "line": 881 + "line": 939 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 881 + "line": 939 }, "name": "c", "type": { @@ -34827,7 +35675,7 @@ "location": { "column": 52, "file": "", - "line": 881 + "line": 939 }, "name": "lvl", "type": { @@ -34869,14 +35717,14 @@ "location": { "column": 9, "file": "", - "line": 890 + "line": 948 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 890 + "line": 948 }, "name": "c", "type": { @@ -34918,14 +35766,14 @@ "location": { "column": 12, "file": "", - "line": 862 + "line": 920 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 862 + "line": 920 }, "name": "r", "type": { @@ -34942,7 +35790,7 @@ "location": { "column": 45, "file": "", - "line": 862 + "line": 920 }, "name": "g", "type": { @@ -34959,7 +35807,7 @@ "location": { "column": 56, "file": "", - "line": 862 + "line": 920 }, "name": "b", "type": { @@ -35000,14 +35848,14 @@ "location": { "column": 12, "file": "", - "line": 930 + "line": 988 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 930 + "line": 988 }, "name": "c1", "type": { @@ -35024,7 +35872,7 @@ "location": { "column": 51, "file": "", - "line": 930 + "line": 988 }, "name": "c2", "type": { @@ -35041,7 +35889,7 @@ "location": { "column": 63, "file": "", - "line": 930 + "line": 988 }, "name": "mix", "type": { @@ -35083,14 +35931,14 @@ "location": { "column": 14, "file": "", - "line": 931 + "line": 989 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 931 + "line": 989 }, "name": "fg", "type": { @@ -35107,7 +35955,7 @@ "location": { "column": 59, "file": "", - "line": 931 + "line": 989 }, "name": "bg", "type": { @@ -35138,6 +35986,76 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_color_mix32_inlined", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 28, + "file": "", + "line": 6228 + }, + "parameters": [ + { + "location": { + "column": 64, + "file": "", + "line": 6228 + }, + "name": "fg", + "type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 6228 + }, + "name": "bg", + "type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + } + } + ], + "python_name": "color_mix32_inlined", + "receiver": "color32_t", + "return_type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -35149,14 +36067,14 @@ "location": { "column": 14, "file": "", - "line": 932 + "line": 990 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 932 + "line": 990 }, "name": "fg", "type": { @@ -35173,7 +36091,7 @@ "location": { "column": 73, "file": "", - "line": 932 + "line": 990 }, "name": "bg", "type": { @@ -35204,6 +36122,76 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_color_mix32_premultiplied_inlined", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 28, + "file": "", + "line": 6243 + }, + "parameters": [ + { + "location": { + "column": 78, + "file": "", + "line": 6243 + }, + "name": "fg", + "type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 6244 + }, + "name": "bg", + "type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + } + } + ], + "python_name": "color_mix32_premultiplied_inlined", + "receiver": "color32_t", + "return_type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -35215,14 +36203,14 @@ "location": { "column": 14, "file": "", - "line": 935 + "line": 993 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 935 + "line": 993 }, "name": "fg", "type": { @@ -35239,7 +36227,7 @@ "location": { "column": 60, "file": "", - "line": 935 + "line": 993 }, "name": "bg", "type": { @@ -35281,14 +36269,14 @@ "location": { "column": 6, "file": "", - "line": 888 + "line": 946 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 888 + "line": 946 }, "name": "c", "type": { @@ -35333,14 +36321,14 @@ "location": { "column": 16, "file": "", - "line": 884 + "line": 942 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 884 + "line": 942 }, "name": "r8", "type": { @@ -35357,7 +36345,7 @@ "location": { "column": 56, "file": "", - "line": 884 + "line": 942 }, "name": "g8", "type": { @@ -35374,7 +36362,7 @@ "location": { "column": 68, "file": "", - "line": 884 + "line": 942 }, "name": "b8", "type": { @@ -35417,14 +36405,14 @@ "location": { "column": 24, "file": "", - "line": 894 + "line": 952 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 894 + "line": 952 }, "name": "c", "type": { @@ -35467,14 +36455,14 @@ "location": { "column": 14, "file": "", - "line": 857 + "line": 915 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 857 + "line": 915 }, "name": "color", "type": { @@ -35491,7 +36479,7 @@ "location": { "column": 56, "file": "", - "line": 857 + "line": 915 }, "name": "opa", "type": { @@ -35533,14 +36521,14 @@ "location": { "column": 16, "file": "", - "line": 885 + "line": 943 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 885 + "line": 943 }, "name": "color", "type": { @@ -35582,14 +36570,14 @@ "location": { "column": 10, "file": "", - "line": 858 + "line": 916 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 858 + "line": 916 }, "name": "c", "type": { @@ -35631,14 +36619,14 @@ "location": { "column": 10, "file": "", - "line": 878 + "line": 936 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 878 + "line": 936 }, "name": "color", "type": { @@ -35680,14 +36668,14 @@ "location": { "column": 10, "file": "", - "line": 879 + "line": 937 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 879 + "line": 937 }, "name": "color", "type": { @@ -35729,7 +36717,7 @@ "location": { "column": 12, "file": "", - "line": 886 + "line": 944 }, "parameters": [], "python_name": "color_white", @@ -35759,14 +36747,14 @@ "location": { "column": 9, "file": "", - "line": 482 + "line": 358 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 482 + "line": 358 }, "name": "x", "type": { @@ -35783,7 +36771,7 @@ "location": { "column": 44, "file": "", - "line": 482 + "line": 358 }, "name": "x1", "type": { @@ -35800,7 +36788,7 @@ "location": { "column": 56, "file": "", - "line": 482 + "line": 358 }, "name": "y1", "type": { @@ -35817,7 +36805,7 @@ "location": { "column": 68, "file": "", - "line": 482 + "line": 358 }, "name": "x2", "type": { @@ -35834,7 +36822,7 @@ "location": { "column": 80, "file": "", - "line": 482 + "line": 358 }, "name": "y2", "type": { @@ -35875,7 +36863,7 @@ "location": { "column": 6, "file": "", - "line": 357 + "line": 724 }, "parameters": [], "python_name": "deinit", @@ -35905,14 +36893,14 @@ "location": { "column": 6, "file": "", - "line": 427 + "line": 3454 }, "parameters": [ { "location": { "column": 27, "file": "", - "line": 427 + "line": 3454 }, "name": "ms", "type": { @@ -35953,14 +36941,14 @@ "location": { "column": 6, "file": "", - "line": 428 + "line": 3455 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 428 + "line": 3455 }, "name": "cb", "type": { @@ -35999,16 +36987,16 @@ "c_name": "lv_display_add_event_cb", "function_specifiers": [], "location": { - "column": 6, + "column": 18, "file": "", - "line": 2036 + "line": 1839 }, "parameters": [ { "location": { - "column": 43, + "column": 55, "file": "", - "line": 2036 + "line": 1839 }, "name": "disp", "type": { @@ -36026,9 +37014,9 @@ }, { "location": { - "column": 65, + "column": 77, "file": "", - "line": 2036 + "line": 1839 }, "name": "event_cb", "type": { @@ -36043,9 +37031,9 @@ }, { "location": { - "column": 91, + "column": 103, "file": "", - "line": 2036 + "line": 1839 }, "name": "filter", "type": { @@ -36060,9 +37048,9 @@ }, { "location": { - "column": 104, + "column": 47, "file": "", - "line": 2036 + "line": 1840 }, "name": "user_data", "type": { @@ -36082,13 +37070,16 @@ "python_name": "add_event_cb", "receiver": "display_t", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_event_dsc_t" + } }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "event_dsc_t" }, "role": "struct_method", "static": false, @@ -36107,14 +37098,14 @@ "location": { "column": 16, "file": "", - "line": 1982 + "line": 1780 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1982 + "line": 1780 }, "name": "hor_res", "type": { @@ -36131,7 +37122,7 @@ "location": { "column": 59, "file": "", - "line": 1982 + "line": 1780 }, "name": "ver_res", "type": { @@ -36175,14 +37166,14 @@ "location": { "column": 6, "file": "", - "line": 1983 + "line": 1781 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 1983 + "line": 1781 }, "name": "disp", "type": { @@ -36216,75 +37207,6 @@ "variadic": false, "visibility": "public" }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_display_delete_event", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 2039 - }, - "parameters": [ - { - "location": { - "column": 43, - "file": "", - "line": 2039 - }, - "name": "disp", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_display_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "display_t" - } - }, - { - "location": { - "column": 60, - "file": "", - "line": 2039 - }, - "name": "index", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - } - ], - "python_name": "delete_event", - "receiver": "display_t", - "return_type": { - "kind": "primitive", - "name": "bool" - }, - "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - }, - "role": "struct_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, { "available_on": [ "micropython", @@ -36296,14 +37218,14 @@ "location": { "column": 6, "file": "", - "line": 2050 + "line": 1854 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 2050 + "line": 1854 }, "name": "disp", "type": { @@ -36348,14 +37270,14 @@ "location": { "column": 9, "file": "", - "line": 2064 + "line": 1869 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2064 + "line": 1869 }, "name": "disp", "type": { @@ -36378,7 +37300,7 @@ "location": { "column": 59, "file": "", - "line": 2064 + "line": 1869 }, "name": "n", "type": { @@ -36420,14 +37342,14 @@ "location": { "column": 6, "file": "", - "line": 2047 + "line": 1851 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2047 + "line": 1851 }, "name": "disp", "type": { @@ -36447,7 +37369,7 @@ "location": { "column": 63, "file": "", - "line": 2047 + "line": 1851 }, "name": "en", "type": { @@ -36489,14 +37411,14 @@ "location": { "column": 7, "file": "", - "line": 2020 + "line": 1821 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 2020 + "line": 1821 }, "name": "disp", "type": { @@ -36541,14 +37463,14 @@ "location": { "column": 7, "file": "", - "line": 2019 + "line": 1820 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2019 + "line": 1820 }, "name": "disp", "type": { @@ -36593,14 +37515,14 @@ "location": { "column": 6, "file": "", - "line": 2018 + "line": 1819 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 2018 + "line": 1819 }, "name": "disp", "type": { @@ -36645,14 +37567,14 @@ "location": { "column": 17, "file": "", - "line": 2058 + "line": 1862 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 2058 + "line": 1862 }, "name": "disp", "type": { @@ -36700,14 +37622,14 @@ "location": { "column": 19, "file": "", - "line": 2014 + "line": 1815 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 2014 + "line": 1815 }, "name": "disp", "type": { @@ -36752,7 +37674,7 @@ "location": { "column": 16, "file": "", - "line": 1985 + "line": 1783 }, "parameters": [], "python_name": "display_get_default", @@ -36785,14 +37707,14 @@ "location": { "column": 9, "file": "", - "line": 2003 + "line": 1801 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 2003 + "line": 1801 }, "name": "disp", "type": { @@ -36840,14 +37762,14 @@ "location": { "column": 10, "file": "", - "line": 2061 + "line": 1866 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 2061 + "line": 1866 }, "name": "disp", "type": { @@ -36892,14 +37814,14 @@ "location": { "column": 8, "file": "", - "line": 2057 + "line": 1861 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 2057 + "line": 1861 }, "name": "disp", "type": { @@ -36947,14 +37869,14 @@ "location": { "column": 10, "file": "", - "line": 2037 + "line": 1841 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2037 + "line": 1841 }, "name": "disp", "type": { @@ -36999,14 +37921,14 @@ "location": { "column": 18, "file": "", - "line": 2038 + "line": 1842 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 2038 + "line": 1842 }, "name": "disp", "type": { @@ -37026,7 +37948,7 @@ "location": { "column": 73, "file": "", - "line": 2038 + "line": 1842 }, "name": "index", "type": { @@ -37060,6 +37982,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_get_flush_cb", + "function_specifiers": [], + "location": { + "column": 23, + "file": "", + "line": 1810 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 1810 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + } + ], + "python_name": "get_flush_cb", + "receiver": "display_t", + "return_type": { + "kind": "identifier", + "name": "lv_display_flush_cb_t" + }, + "return_view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t, area_t, Any], None]" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -37071,14 +38045,14 @@ "location": { "column": 9, "file": "", - "line": 1993 + "line": 1791 }, "parameters": [ { "location": { "column": 65, "file": "", - "line": 1993 + "line": 1791 }, "name": "disp", "type": { @@ -37126,14 +38100,14 @@ "location": { "column": 10, "file": "", - "line": 2045 + "line": 1849 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 2045 + "line": 1849 }, "name": "disp", "type": { @@ -37181,14 +38155,14 @@ "location": { "column": 10, "file": "", - "line": 2062 + "line": 1867 }, "parameters": [ { "location": { "column": 64, "file": "", - "line": 2062 + "line": 1867 }, "name": "disp", "type": { @@ -37208,7 +38182,7 @@ "location": { "column": 81, "file": "", - "line": 2062 + "line": 1867 }, "name": "width", "type": { @@ -37225,7 +38199,7 @@ "location": { "column": 97, "file": "", - "line": 2062 + "line": 1867 }, "name": "height", "type": { @@ -37267,14 +38241,14 @@ "location": { "column": 12, "file": "", - "line": 2028 + "line": 1831 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 2028 + "line": 1831 }, "name": "disp", "type": { @@ -37322,14 +38296,14 @@ "location": { "column": 12, "file": "", - "line": 2027 + "line": 1830 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2027 + "line": 1830 }, "name": "disp", "type": { @@ -37377,14 +38351,14 @@ "location": { "column": 12, "file": "", - "line": 2026 + "line": 1829 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2026 + "line": 1829 }, "name": "disp", "type": { @@ -37432,14 +38406,14 @@ "location": { "column": 6, "file": "", - "line": 2002 + "line": 1800 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2002 + "line": 1800 }, "name": "disp", "type": { @@ -37484,14 +38458,14 @@ "location": { "column": 16, "file": "", - "line": 1986 + "line": 1784 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1986 + "line": 1784 }, "name": "disp", "type": { @@ -37539,14 +38513,14 @@ "location": { "column": 9, "file": "", - "line": 1999 + "line": 1797 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 1999 + "line": 1797 }, "name": "disp", "type": { @@ -37594,14 +38568,14 @@ "location": { "column": 9, "file": "", - "line": 2000 + "line": 1798 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 2000 + "line": 1798 }, "name": "disp", "type": { @@ -37649,14 +38623,14 @@ "location": { "column": 9, "file": "", - "line": 1995 + "line": 1793 }, "parameters": [ { "location": { "column": 74, "file": "", - "line": 1995 + "line": 1793 }, "name": "disp", "type": { @@ -37704,14 +38678,14 @@ "location": { "column": 9, "file": "", - "line": 1996 + "line": 1794 }, "parameters": [ { "location": { "column": 72, "file": "", - "line": 1996 + "line": 1794 }, "name": "disp", "type": { @@ -37759,14 +38733,14 @@ "location": { "column": 9, "file": "", - "line": 1997 + "line": 1795 }, "parameters": [ { "location": { "column": 74, "file": "", - "line": 1997 + "line": 1795 }, "name": "disp", "type": { @@ -37814,14 +38788,14 @@ "location": { "column": 9, "file": "", - "line": 1998 + "line": 1796 }, "parameters": [ { "location": { "column": 72, "file": "", - "line": 1998 + "line": 1796 }, "name": "disp", "type": { @@ -37869,14 +38843,14 @@ "location": { "column": 14, "file": "", - "line": 2049 + "line": 1853 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 2049 + "line": 1853 }, "name": "disp", "type": { @@ -37924,14 +38898,14 @@ "location": { "column": 26, "file": "", - "line": 2022 + "line": 1825 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 2022 + "line": 1825 }, "name": "disp", "type": { @@ -37976,14 +38950,14 @@ "location": { "column": 23, "file": "", - "line": 2001 + "line": 1799 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 2001 + "line": 1799 }, "name": "disp", "type": { @@ -38028,14 +39002,14 @@ "location": { "column": 12, "file": "", - "line": 2023 + "line": 1826 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 2023 + "line": 1826 }, "name": "disp", "type": { @@ -38083,14 +39057,14 @@ "location": { "column": 12, "file": "", - "line": 2025 + "line": 1828 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 2025 + "line": 1828 }, "name": "disp", "type": { @@ -38138,14 +39112,14 @@ "location": { "column": 12, "file": "", - "line": 2024 + "line": 1827 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 2024 + "line": 1827 }, "name": "disp", "type": { @@ -38193,14 +39167,14 @@ "location": { "column": 14, "file": "", - "line": 2044 + "line": 1848 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 2044 + "line": 1848 }, "name": "disp", "type": { @@ -38248,14 +39222,14 @@ "location": { "column": 10, "file": "", - "line": 2016 + "line": 1817 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 2016 + "line": 1817 }, "name": "disp", "type": { @@ -38300,14 +39274,14 @@ "location": { "column": 8, "file": "", - "line": 2056 + "line": 1860 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 2056 + "line": 1860 }, "name": "disp", "type": { @@ -38355,14 +39329,14 @@ "location": { "column": 9, "file": "", - "line": 1994 + "line": 1792 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 1994 + "line": 1792 }, "name": "disp", "type": { @@ -38410,14 +39384,14 @@ "location": { "column": 6, "file": "", - "line": 2021 + "line": 1824 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 2021 + "line": 1824 }, "name": "disp", "type": { @@ -38462,14 +39436,14 @@ "location": { "column": 6, "file": "", - "line": 2048 + "line": 1852 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 2048 + "line": 1852 }, "name": "disp", "type": { @@ -38514,14 +39488,14 @@ "location": { "column": 6, "file": "", - "line": 3866 + "line": 3239 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3866 + "line": 3239 }, "name": "timer", "type": { @@ -38565,14 +39539,14 @@ "location": { "column": 6, "file": "", - "line": 2051 + "line": 1855 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 2051 + "line": 1855 }, "name": "disp", "type": { @@ -38592,7 +39566,7 @@ "location": { "column": 73, "file": "", - "line": 2051 + "line": 1855 }, "name": "event_cb", "type": { @@ -38609,7 +39583,7 @@ "location": { "column": 88, "file": "", - "line": 2051 + "line": 1855 }, "name": "user_data", "type": { @@ -38643,6 +39617,75 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_remove_event", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1843 + }, + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 1843 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 1843 + }, + "name": "index", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "remove_event", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -38654,14 +39697,14 @@ "location": { "column": 10, "file": "", - "line": 2040 + "line": 1844 }, "parameters": [ { "location": { "column": 65, "file": "", - "line": 2040 + "line": 1844 }, "name": "disp", "type": { @@ -38681,7 +39724,7 @@ "location": { "column": 87, "file": "", - "line": 2040 + "line": 1844 }, "name": "event_cb", "type": { @@ -38698,7 +39741,7 @@ "location": { "column": 102, "file": "", - "line": 2040 + "line": 1844 }, "name": "user_data", "type": { @@ -38743,14 +39786,14 @@ "location": { "column": 6, "file": "", - "line": 2059 + "line": 1863 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 2059 + "line": 1863 }, "name": "disp", "type": { @@ -38770,7 +39813,7 @@ "location": { "column": 60, "file": "", - "line": 2059 + "line": 1863 }, "name": "area", "type": { @@ -38815,14 +39858,14 @@ "location": { "column": 6, "file": "", - "line": 2060 + "line": 1864 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2060 + "line": 1864 }, "name": "disp", "type": { @@ -38842,7 +39885,7 @@ "location": { "column": 62, "file": "", - "line": 2060 + "line": 1864 }, "name": "point", "type": { @@ -38876,6 +39919,78 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_rotate_point_ccw", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1865 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 1865 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + }, + { + "location": { + "column": 66, + "file": "", + "line": 1865 + }, + "name": "point", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_point_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "point_t" + } + } + ], + "python_name": "rotate_point_ccw", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -38887,14 +40002,14 @@ "location": { "column": 13, "file": "", - "line": 2041 + "line": 1845 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 2041 + "line": 1845 }, "name": "disp", "type": { @@ -38914,7 +40029,7 @@ "location": { "column": 72, "file": "", - "line": 2041 + "line": 1845 }, "name": "code", "type": { @@ -38931,7 +40046,7 @@ "location": { "column": 83, "file": "", - "line": 2041 + "line": 1845 }, "name": "param", "type": { @@ -38976,14 +40091,14 @@ "location": { "column": 13, "file": "", - "line": 2053 + "line": 1857 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 2053 + "line": 1857 }, "name": "disp", "type": { @@ -39003,7 +40118,7 @@ "location": { "column": 67, "file": "", - "line": 2053 + "line": 1857 }, "name": "param", "type": { @@ -39048,14 +40163,14 @@ "location": { "column": 6, "file": "", - "line": 2009 + "line": 1807 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2009 + "line": 1807 }, "name": "disp", "type": { @@ -39075,7 +40190,7 @@ "location": { "column": 72, "file": "", - "line": 2009 + "line": 1807 }, "name": "buf3", "type": { @@ -39120,14 +40235,14 @@ "location": { "column": 6, "file": "", - "line": 2017 + "line": 1818 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 2017 + "line": 1818 }, "name": "disp", "type": { @@ -39147,7 +40262,7 @@ "location": { "column": 60, "file": "", - "line": 2017 + "line": 1818 }, "name": "en", "type": { @@ -39189,14 +40304,14 @@ "location": { "column": 6, "file": "", - "line": 2004 + "line": 1802 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 2004 + "line": 1802 }, "name": "disp", "type": { @@ -39216,7 +40331,7 @@ "location": { "column": 55, "file": "", - "line": 2004 + "line": 1802 }, "name": "buf1", "type": { @@ -39236,7 +40351,7 @@ "location": { "column": 68, "file": "", - "line": 2004 + "line": 1802 }, "name": "buf2", "type": { @@ -39256,7 +40371,7 @@ "location": { "column": 85, "file": "", - "line": 2004 + "line": 1802 }, "name": "buf_size", "type": { @@ -39273,7 +40388,7 @@ "location": { "column": 54, "file": "", - "line": 2005 + "line": 1803 }, "name": "render_mode", "type": { @@ -39315,14 +40430,14 @@ "location": { "column": 6, "file": "", - "line": 2006 + "line": 1804 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 2006 + "line": 1804 }, "name": "disp", "type": { @@ -39342,7 +40457,7 @@ "location": { "column": 67, "file": "", - "line": 2006 + "line": 1804 }, "name": "buf1", "type": { @@ -39362,7 +40477,7 @@ "location": { "column": 80, "file": "", - "line": 2006 + "line": 1804 }, "name": "buf2", "type": { @@ -39382,7 +40497,7 @@ "location": { "column": 97, "file": "", - "line": 2006 + "line": 1804 }, "name": "buf_size", "type": { @@ -39399,7 +40514,7 @@ "location": { "column": 50, "file": "", - "line": 2007 + "line": 1805 }, "name": "stride", "type": { @@ -39416,7 +40531,7 @@ "location": { "column": 83, "file": "", - "line": 2007 + "line": 1805 }, "name": "render_mode", "type": { @@ -39458,14 +40573,14 @@ "location": { "column": 6, "file": "", - "line": 2013 + "line": 1814 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 2013 + "line": 1814 }, "name": "disp", "type": { @@ -39485,7 +40600,7 @@ "location": { "column": 73, "file": "", - "line": 2013 + "line": 1814 }, "name": "color_format", "type": { @@ -39527,14 +40642,14 @@ "location": { "column": 6, "file": "", - "line": 1984 + "line": 1782 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1984 + "line": 1782 }, "name": "disp", "type": { @@ -39579,14 +40694,14 @@ "location": { "column": 6, "file": "", - "line": 1992 + "line": 1790 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1992 + "line": 1790 }, "name": "disp", "type": { @@ -39606,7 +40721,7 @@ "location": { "column": 54, "file": "", - "line": 1992 + "line": 1790 }, "name": "dpi", "type": { @@ -39643,19 +40758,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_display_set_draw_buffers", + "c_name": "lv_display_set_draw_buf_handlers", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2008 + "line": 6096 }, "parameters": [ { "location": { - "column": 47, + "column": 52, "file": "", - "line": 2008 + "line": 6096 }, "name": "disp", "type": { @@ -39673,46 +40788,29 @@ }, { "location": { - "column": 69, - "file": "", - "line": 2008 - }, - "name": "buf1", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_draw_buf_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_buf_t" - } - }, - { - "location": { - "column": 91, + "column": 89, "file": "", - "line": 2008 + "line": 6096 }, - "name": "buf2", + "name": "handlers", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_buf_t" + "name": "lv_draw_buf_handlers_t", + "qualifiers": [ + "const" + ] } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_buf_t" + "python_type": "draw_buf_handlers_t" } } ], - "python_name": "set_draw_buffers", + "python_name": "set_draw_buf_handlers", "receiver": "display_t", "return_type": { "kind": "primitive", @@ -39735,19 +40833,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_display_set_driver_data", + "c_name": "lv_display_set_draw_buffers", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2055 + "line": 1806 }, "parameters": [ { "location": { - "column": 46, + "column": 47, "file": "", - "line": 2055 + "line": 1806 }, "name": "disp", "type": { @@ -39765,95 +40863,46 @@ }, { "location": { - "column": 59, + "column": 69, "file": "", - "line": 2055 + "line": 1806 }, - "name": "driver_data", + "name": "buf1", "type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_draw_buf_t" } }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_buf_t" } - } - ], - "python_name": "set_driver_data", - "receiver": "display_t", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "struct_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_display_set_flush_cb", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 2011 - }, - "parameters": [ + }, { "location": { - "column": 43, + "column": 91, "file": "", - "line": 2011 + "line": 1806 }, - "name": "disp", + "name": "buf2", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_display_t" + "name": "lv_draw_buf_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "display_t" - } - }, - { - "location": { - "column": 73, - "file": "", - "line": 2011 - }, - "name": "flush_cb", - "type": { - "kind": "identifier", - "name": "lv_display_flush_cb_t" - }, - "view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[display_t, area_t, Any], None]" + "python_type": "draw_buf_t" } } ], - "python_name": "set_flush_cb", + "python_name": "set_draw_buffers", "receiver": "display_t", "return_type": { "kind": "primitive", @@ -39876,19 +40925,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_display_set_flush_wait_cb", + "c_name": "lv_display_set_driver_data", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2012 + "line": 1859 }, "parameters": [ { "location": { - "column": 48, + "column": 46, "file": "", - "line": 2012 + "line": 1859 }, "name": "disp", "type": { @@ -39906,23 +40955,26 @@ }, { "location": { - "column": 83, + "column": 59, "file": "", - "line": 2012 + "line": 1859 }, - "name": "wait_cb", + "name": "driver_data", "type": { - "kind": "identifier", - "name": "lv_display_flush_wait_cb_t" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } }, "view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[display_t], None]" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } } ], - "python_name": "set_flush_wait_cb", + "python_name": "set_driver_data", "receiver": "display_t", "return_type": { "kind": "primitive", @@ -39945,19 +40997,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_display_set_matrix_rotation", + "c_name": "lv_display_set_flush_cb", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 1991 + "line": 1809 }, "parameters": [ { "location": { - "column": 50, + "column": 43, "file": "", - "line": 1991 + "line": 1809 }, "name": "disp", "type": { @@ -39975,23 +41027,161 @@ }, { "location": { - "column": 63, + "column": 73, "file": "", - "line": 1991 + "line": 1809 }, - "name": "enable", + "name": "flush_cb", "type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "lv_display_flush_cb_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t, area_t, Any], None]" } } ], - "python_name": "set_matrix_rotation", + "python_name": "set_flush_cb", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_set_flush_wait_cb", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1811 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 1811 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + }, + { + "location": { + "column": 83, + "file": "", + "line": 1811 + }, + "name": "wait_cb", + "type": { + "kind": "identifier", + "name": "lv_display_flush_wait_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t], None]" + } + } + ], + "python_name": "set_flush_wait_cb", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_set_matrix_rotation", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1789 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 1789 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + }, + { + "location": { + "column": 63, + "file": "", + "line": 1789 + }, + "name": "enable", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_matrix_rotation", "receiver": "display_t", "return_type": { "kind": "primitive", @@ -40019,14 +41209,14 @@ "location": { "column": 6, "file": "", - "line": 1989 + "line": 1787 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1989 + "line": 1787 }, "name": "disp", "type": { @@ -40046,7 +41236,7 @@ "location": { "column": 57, "file": "", - "line": 1989 + "line": 1787 }, "name": "x", "type": { @@ -40063,7 +41253,7 @@ "location": { "column": 68, "file": "", - "line": 1989 + "line": 1787 }, "name": "y", "type": { @@ -40105,14 +41295,14 @@ "location": { "column": 6, "file": "", - "line": 1988 + "line": 1786 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 1988 + "line": 1786 }, "name": "disp", "type": { @@ -40132,7 +41322,7 @@ "location": { "column": 70, "file": "", - "line": 1988 + "line": 1786 }, "name": "hor_res", "type": { @@ -40149,7 +41339,7 @@ "location": { "column": 87, "file": "", - "line": 1988 + "line": 1786 }, "name": "ver_res", "type": { @@ -40191,14 +41381,14 @@ "location": { "column": 6, "file": "", - "line": 2010 + "line": 1808 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 2010 + "line": 1808 }, "name": "disp", "type": { @@ -40218,7 +41408,7 @@ "location": { "column": 79, "file": "", - "line": 2010 + "line": 1808 }, "name": "render_mode", "type": { @@ -40260,14 +41450,14 @@ "location": { "column": 6, "file": "", - "line": 1987 + "line": 1785 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1987 + "line": 1785 }, "name": "disp", "type": { @@ -40287,7 +41477,7 @@ "location": { "column": 61, "file": "", - "line": 1987 + "line": 1785 }, "name": "hor_res", "type": { @@ -40304,7 +41494,7 @@ "location": { "column": 78, "file": "", - "line": 1987 + "line": 1785 }, "name": "ver_res", "type": { @@ -40346,14 +41536,14 @@ "location": { "column": 6, "file": "", - "line": 1990 + "line": 1788 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1990 + "line": 1788 }, "name": "disp", "type": { @@ -40373,7 +41563,7 @@ "location": { "column": 73, "file": "", - "line": 1990 + "line": 1788 }, "name": "rotation", "type": { @@ -40410,19 +41600,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_display_set_theme", + "c_name": "lv_display_set_sync_cb", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2043 + "line": 1812 }, "parameters": [ { "location": { - "column": 40, + "column": 42, "file": "", - "line": 2043 + "line": 1812 }, "name": "disp", "type": { @@ -40440,26 +41630,92 @@ }, { "location": { - "column": 59, + "column": 71, "file": "", - "line": 2043 + "line": 1812 }, - "name": "th", + "name": "sync_cb", + "type": { + "kind": "identifier", + "name": "lv_display_sync_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t, area_t], None]" + } + } + ], + "python_name": "set_sync_cb", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_set_sync_wait_cb", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1813 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 1813 + }, + "name": "disp", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_theme_t" + "name": "lv_display_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "theme_t" + "python_type": "display_t" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 1813 + }, + "name": "wait_cb", + "type": { + "kind": "identifier", + "name": "lv_display_sync_wait_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t], None]" } } ], - "python_name": "set_theme", + "python_name": "set_sync_wait_cb", "receiver": "display_t", "return_type": { "kind": "primitive", @@ -40482,19 +41738,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_display_set_tile_cnt", + "c_name": "lv_display_set_theme", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2015 + "line": 1847 }, "parameters": [ { "location": { - "column": 43, + "column": 40, "file": "", - "line": 2015 + "line": 1847 }, "name": "disp", "type": { @@ -40512,23 +41768,95 @@ }, { "location": { - "column": 60, + "column": 59, "file": "", - "line": 2015 + "line": 1847 }, - "name": "tile_cnt", + "name": "th", "type": { - "kind": "identifier", - "name": "uint32_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_theme_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "theme_t" } } ], - "python_name": "set_tile_cnt", + "python_name": "set_theme", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_set_tile_cnt", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1816 + }, + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 1816 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 1816 + }, + "name": "tile_cnt", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_tile_cnt", "receiver": "display_t", "return_type": { "kind": "primitive", @@ -40556,14 +41884,14 @@ "location": { "column": 6, "file": "", - "line": 2054 + "line": 1858 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 2054 + "line": 1858 }, "name": "disp", "type": { @@ -40583,7 +41911,7 @@ "location": { "column": 57, "file": "", - "line": 2054 + "line": 1858 }, "name": "user_data", "type": { @@ -40617,6 +41945,110 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_sync_is_last", + "function_specifiers": [], + "location": { + "column": 7, + "file": "", + "line": 1823 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 1823 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + } + ], + "python_name": "sync_is_last", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_sync_ready", + "function_specifiers": [], + "location": { + "column": 7, + "file": "", + "line": 1822 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 1822 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + } + ], + "python_name": "sync_ready", + "receiver": "display_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -40628,14 +42060,14 @@ "location": { "column": 6, "file": "", - "line": 2046 + "line": 1850 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 2046 + "line": 1850 }, "name": "disp", "type": { @@ -40680,14 +42112,14 @@ "location": { "column": 6, "file": "", - "line": 2052 + "line": 1856 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 2052 + "line": 1856 }, "name": "disp", "type": { @@ -40707,7 +42139,7 @@ "location": { "column": 75, "file": "", - "line": 2052 + "line": 1856 }, "name": "event_cb", "type": { @@ -40724,7 +42156,7 @@ "location": { "column": 90, "file": "", - "line": 2052 + "line": 1856 }, "name": "user_data", "type": { @@ -40769,14 +42201,14 @@ "location": { "column": 9, "file": "", - "line": 2063 + "line": 1868 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 2063 + "line": 1868 }, "name": "n", "type": { @@ -40817,14 +42249,14 @@ "location": { "column": 18, "file": "", - "line": 3357 + "line": 2427 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3357 + "line": 2427 }, "name": "layer", "type": { @@ -40844,7 +42276,7 @@ "location": { "column": 71, "file": "", - "line": 3357 + "line": 2427 }, "name": "coords", "type": { @@ -40867,7 +42299,7 @@ "location": { "column": 101, "file": "", - "line": 3357 + "line": 2427 }, "name": "type", "type": { @@ -40911,14 +42343,14 @@ "location": { "column": 6, "file": "", - "line": 3576 + "line": 2759 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 3576 + "line": 2759 }, "name": "layer", "type": { @@ -40938,7 +42370,7 @@ "location": { "column": 62, "file": "", - "line": 3576 + "line": 2759 }, "name": "dsc", "type": { @@ -40985,14 +42417,14 @@ "location": { "column": 6, "file": "", - "line": 3574 + "line": 2757 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3574 + "line": 2757 }, "name": "dsc", "type": { @@ -41037,14 +42469,14 @@ "location": { "column": 6, "file": "", - "line": 3577 + "line": 2760 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3577 + "line": 2760 }, "name": "x", "type": { @@ -41061,7 +42493,7 @@ "location": { "column": 46, "file": "", - "line": 3577 + "line": 2760 }, "name": "y", "type": { @@ -41078,7 +42510,7 @@ "location": { "column": 58, "file": "", - "line": 3577 + "line": 2760 }, "name": "radius", "type": { @@ -41095,7 +42527,7 @@ "location": { "column": 85, "file": "", - "line": 3577 + "line": 2760 }, "name": "start_angle", "type": { @@ -41112,7 +42544,7 @@ "location": { "column": 46, "file": "", - "line": 3578 + "line": 2761 }, "name": "end_angle", "type": { @@ -41129,7 +42561,7 @@ "location": { "column": 35, "file": "", - "line": 3579 + "line": 2762 }, "name": "w", "type": { @@ -41146,7 +42578,7 @@ "location": { "column": 43, "file": "", - "line": 3579 + "line": 2762 }, "name": "rounded", "type": { @@ -41163,7 +42595,7 @@ "location": { "column": 62, "file": "", - "line": 3579 + "line": 2762 }, "name": "area", "type": { @@ -41207,14 +42639,14 @@ "location": { "column": 6, "file": "", - "line": 3598 + "line": 2781 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 3598 + "line": 2781 }, "name": "layer", "type": { @@ -41234,7 +42666,7 @@ "location": { "column": 64, "file": "", - "line": 3598 + "line": 2781 }, "name": "dsc", "type": { @@ -41257,7 +42689,7 @@ "location": { "column": 87, "file": "", - "line": 3598 + "line": 2781 }, "name": "coords", "type": { @@ -41304,14 +42736,14 @@ "location": { "column": 6, "file": "", - "line": 3596 + "line": 2779 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3596 + "line": 2779 }, "name": "dsc", "type": { @@ -41356,14 +42788,14 @@ "location": { "column": 6, "file": "", - "line": 3444 + "line": 2517 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 3444 + "line": 2517 }, "name": "layer", "type": { @@ -41383,7 +42815,7 @@ "location": { "column": 68, "file": "", - "line": 3444 + "line": 2517 }, "name": "dsc", "type": { @@ -41406,7 +42838,7 @@ "location": { "column": 91, "file": "", - "line": 3444 + "line": 2517 }, "name": "coords", "type": { @@ -41453,14 +42885,14 @@ "location": { "column": 6, "file": "", - "line": 3442 + "line": 2515 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3442 + "line": 2515 }, "name": "dsc", "type": { @@ -41505,14 +42937,14 @@ "location": { "column": 6, "file": "", - "line": 3447 + "line": 2520 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 3447 + "line": 2520 }, "name": "layer", "type": { @@ -41532,7 +42964,7 @@ "location": { "column": 76, "file": "", - "line": 3447 + "line": 2520 }, "name": "dsc", "type": { @@ -41555,7 +42987,7 @@ "location": { "column": 99, "file": "", - "line": 3447 + "line": 2520 }, "name": "coords", "type": { @@ -41602,14 +43034,14 @@ "location": { "column": 6, "file": "", - "line": 3445 + "line": 2518 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 3445 + "line": 2518 }, "name": "dsc", "type": { @@ -41654,14 +43086,14 @@ "location": { "column": 13, "file": "", - "line": 1038 + "line": 1122 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 1038 + "line": 1122 }, "name": "src", "type": { @@ -41681,7 +43113,7 @@ "location": { "column": 69, "file": "", - "line": 1038 + "line": 1122 }, "name": "stride", "type": { @@ -41723,14 +43155,14 @@ "location": { "column": 8, "file": "", - "line": 1017 + "line": 1100 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 1017 + "line": 1100 }, "name": "buf", "type": { @@ -41750,7 +43182,7 @@ "location": { "column": 56, "file": "", - "line": 1017 + "line": 1100 }, "name": "color_format", "type": { @@ -41794,14 +43226,14 @@ "location": { "column": 8, "file": "", - "line": 1018 + "line": 1101 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 1018 + "line": 1101 }, "name": "handlers", "type": { @@ -41824,7 +43256,7 @@ "location": { "column": 75, "file": "", - "line": 1018 + "line": 1101 }, "name": "buf", "type": { @@ -41844,7 +43276,7 @@ "location": { "column": 100, "file": "", - "line": 1018 + "line": 1101 }, "name": "color_format", "type": { @@ -41889,14 +43321,14 @@ "location": { "column": 6, "file": "", - "line": 1024 + "line": 1107 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1024 + "line": 1107 }, "name": "draw_buf", "type": { @@ -41916,7 +43348,7 @@ "location": { "column": 66, "file": "", - "line": 1024 + "line": 1107 }, "name": "a", "type": { @@ -41959,21 +43391,114 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_buf_clear_flag", - "function_specifiers": [ - "inline" + "c_name": "lv_draw_buf_clear_ex", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4730 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 4730 + }, + "name": "draw_buf", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_buf_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_buf_t" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 4730 + }, + "name": "a", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + }, + { + "location": { + "column": 85, + "file": "", + "line": 4730 + }, + "name": "layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + } + ], + "python_name": "clear_ex", + "receiver": "draw_buf_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" ], + "c_name": "lv_draw_buf_clear_flag", + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1048 + "line": 1126 }, "parameters": [ { "location": { - "column": 57, + "column": 43, "file": "", - "line": 1048 + "line": 1126 }, "name": "draw_buf", "type": { @@ -41991,9 +43516,9 @@ }, { "location": { - "column": 86, + "column": 72, "file": "", - "line": 1048 + "line": 1126 }, "name": "flag", "type": { @@ -42020,9 +43545,59 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" ], + "c_name": "lv_draw_buf_convert_premultiply", + "function_specifiers": [], + "location": { + "column": 13, + "file": "", + "line": 6097 + }, + "parameters": [ + { + "location": { + "column": 59, + "file": "", + "line": 6097 + }, + "name": "draw_buf", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_buf_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_buf_t" + } + } + ], + "python_name": "convert_premultiply", + "receiver": "draw_buf_t", + "return_type": { + "kind": "identifier", + "name": "lv_result_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" + }, + "role": "struct_method", + "static": false, + "storage": [], "variadic": false, "visibility": "public" }, @@ -42037,14 +43612,14 @@ "location": { "column": 6, "file": "", - "line": 1035 + "line": 1118 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 1035 + "line": 1118 }, "name": "dest", "type": { @@ -42064,7 +43639,7 @@ "location": { "column": 61, "file": "", - "line": 1035 + "line": 1118 }, "name": "dest_area", "type": { @@ -42087,7 +43662,7 @@ "location": { "column": 43, "file": "", - "line": 1036 + "line": 1119 }, "name": "src", "type": { @@ -42110,7 +43685,7 @@ "location": { "column": 66, "file": "", - "line": 1036 + "line": 1119 }, "name": "src_area", "type": { @@ -42158,14 +43733,14 @@ "location": { "column": 17, "file": "", - "line": 1025 + "line": 1108 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1025 + "line": 1108 }, "name": "w", "type": { @@ -42182,7 +43757,7 @@ "location": { "column": 57, "file": "", - "line": 1025 + "line": 1108 }, "name": "h", "type": { @@ -42199,7 +43774,7 @@ "location": { "column": 78, "file": "", - "line": 1025 + "line": 1108 }, "name": "cf", "type": { @@ -42216,7 +43791,7 @@ "location": { "column": 91, "file": "", - "line": 1025 + "line": 1108 }, "name": "stride", "type": { @@ -42260,14 +43835,14 @@ "location": { "column": 17, "file": "", - "line": 1026 + "line": 1109 }, "parameters": [ { "location": { "column": 68, "file": "", - "line": 1026 + "line": 1109 }, "name": "handlers", "type": { @@ -42290,7 +43865,7 @@ "location": { "column": 89, "file": "", - "line": 1026 + "line": 1109 }, "name": "w", "type": { @@ -42307,7 +43882,7 @@ "location": { "column": 101, "file": "", - "line": 1026 + "line": 1109 }, "name": "h", "type": { @@ -42324,7 +43899,7 @@ "location": { "column": 57, "file": "", - "line": 1027 + "line": 1110 }, "name": "cf", "type": { @@ -42341,7 +43916,7 @@ "location": { "column": 70, "file": "", - "line": 1027 + "line": 1110 }, "name": "stride", "type": { @@ -42386,14 +43961,14 @@ "location": { "column": 6, "file": "", - "line": 1034 + "line": 1117 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1034 + "line": 1117 }, "name": "draw_buf", "type": { @@ -42438,14 +44013,14 @@ "location": { "column": 17, "file": "", - "line": 1028 + "line": 1111 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 1028 + "line": 1111 }, "name": "draw_buf", "type": { @@ -42496,14 +44071,14 @@ "location": { "column": 17, "file": "", - "line": 1029 + "line": 1112 }, "parameters": [ { "location": { "column": 65, "file": "", - "line": 1029 + "line": 1112 }, "name": "handlers", "type": { @@ -42526,7 +44101,7 @@ "location": { "column": 97, "file": "", - "line": 1029 + "line": 1112 }, "name": "draw_buf", "type": { @@ -42577,14 +44152,14 @@ "location": { "column": 6, "file": "", - "line": 1020 + "line": 1103 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1020 + "line": 1103 }, "name": "draw_buf", "type": { @@ -42607,7 +44182,7 @@ "location": { "column": 78, "file": "", - "line": 1020 + "line": 1103 }, "name": "area", "type": { @@ -42655,14 +44230,14 @@ "location": { "column": 13, "file": "", - "line": 1052 + "line": 1127 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1052 + "line": 1127 }, "name": "buf", "type": { @@ -42682,7 +44257,7 @@ "location": { "column": 78, "file": "", - "line": 1052 + "line": 1127 }, "name": "img", "type": { @@ -42730,7 +44305,7 @@ "location": { "column": 26, "file": "", - "line": 1015 + "line": 1098 }, "parameters": [], "python_name": "draw_buf_get_font_handlers", @@ -42763,7 +44338,7 @@ "location": { "column": 26, "file": "", - "line": 1014 + "line": 1097 }, "parameters": [], "python_name": "draw_buf_get_handlers", @@ -42796,7 +44371,7 @@ "location": { "column": 26, "file": "", - "line": 1016 + "line": 1099 }, "parameters": [], "python_name": "draw_buf_get_image_handlers", @@ -42829,14 +44404,14 @@ "location": { "column": 8, "file": "", - "line": 1037 + "line": 1120 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1037 + "line": 1120 }, "name": "buf", "type": { @@ -42859,7 +44434,7 @@ "location": { "column": 64, "file": "", - "line": 1037 + "line": 1120 }, "name": "x", "type": { @@ -42876,7 +44451,7 @@ "location": { "column": 76, "file": "", - "line": 1037 + "line": 1120 }, "name": "y", "type": { @@ -42921,14 +44496,14 @@ "location": { "column": 6, "file": "", - "line": 1006 + "line": 1089 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 1006 + "line": 1089 }, "name": "handlers", "type": { @@ -42948,7 +44523,7 @@ "location": { "column": 56, "file": "", - "line": 1007 + "line": 1090 }, "name": "buf_malloc_cb", "type": { @@ -42965,7 +44540,7 @@ "location": { "column": 54, "file": "", - "line": 1008 + "line": 1091 }, "name": "buf_free_cb", "type": { @@ -42982,7 +44557,7 @@ "location": { "column": 54, "file": "", - "line": 1009 + "line": 1092 }, "name": "buf_copy_cb", "type": { @@ -42999,7 +44574,7 @@ "location": { "column": 55, "file": "", - "line": 1010 + "line": 1093 }, "name": "align_pointer_cb", "type": { @@ -43016,7 +44591,7 @@ "location": { "column": 65, "file": "", - "line": 1011 + "line": 1094 }, "name": "invalidate_cache_cb", "type": { @@ -43033,7 +44608,7 @@ "location": { "column": 65, "file": "", - "line": 1012 + "line": 1095 }, "name": "flush_cache_cb", "type": { @@ -43050,7 +44625,7 @@ "location": { "column": 65, "file": "", - "line": 1013 + "line": 1096 }, "name": "width_to_stride_cb", "type": { @@ -43088,20 +44663,18 @@ "cpython" ], "c_name": "lv_draw_buf_has_flag", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1040 + "line": 1124 }, "parameters": [ { "location": { - "column": 61, + "column": 47, "file": "", - "line": 1040 + "line": 1124 }, "name": "draw_buf", "type": { @@ -43122,9 +44695,9 @@ }, { "location": { - "column": 90, + "column": 76, "file": "", - "line": 1040 + "line": 1124 }, "name": "flag", "type": { @@ -43151,9 +44724,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -43168,14 +44739,14 @@ "location": { "column": 13, "file": "", - "line": 1030 + "line": 1113 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1030 + "line": 1113 }, "name": "draw_buf", "type": { @@ -43195,7 +44766,7 @@ "location": { "column": 65, "file": "", - "line": 1030 + "line": 1113 }, "name": "w", "type": { @@ -43212,7 +44783,7 @@ "location": { "column": 77, "file": "", - "line": 1030 + "line": 1113 }, "name": "h", "type": { @@ -43229,7 +44800,7 @@ "location": { "column": 98, "file": "", - "line": 1030 + "line": 1113 }, "name": "cf", "type": { @@ -43246,7 +44817,7 @@ "location": { "column": 111, "file": "", - "line": 1030 + "line": 1113 }, "name": "stride", "type": { @@ -43263,7 +44834,7 @@ "location": { "column": 35, "file": "", - "line": 1031 + "line": 1114 }, "name": "data", "type": { @@ -43283,7 +44854,7 @@ "location": { "column": 52, "file": "", - "line": 1031 + "line": 1114 }, "name": "data_size", "type": { @@ -43325,7 +44896,7 @@ "location": { "column": 6, "file": "", - "line": 5235 + "line": 4729 }, "parameters": [], "python_name": "draw_buf_init_handlers", @@ -43355,14 +44926,14 @@ "location": { "column": 6, "file": "", - "line": 1005 + "line": 1088 }, "parameters": [ { "location": { "column": 68, "file": "", - "line": 1005 + "line": 1088 }, "name": "handlers", "type": { @@ -43407,14 +44978,14 @@ "location": { "column": 6, "file": "", - "line": 1019 + "line": 1102 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 1019 + "line": 1102 }, "name": "draw_buf", "type": { @@ -43437,7 +45008,7 @@ "location": { "column": 83, "file": "", - "line": 1019 + "line": 1102 }, "name": "area", "type": { @@ -43474,6 +45045,95 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_buf_is_position_valid", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1121 + }, + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 1121 + }, + "name": "buf", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_buf_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_buf_t" + } + }, + { + "location": { + "column": 72, + "file": "", + "line": 1121 + }, + "name": "x", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 1121 + }, + "name": "y", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "is_position_valid", + "receiver": "draw_buf_t", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -43485,14 +45145,14 @@ "location": { "column": 13, "file": "", - "line": 1039 + "line": 1123 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1039 + "line": 1123 }, "name": "draw_buf", "type": { @@ -43537,14 +45197,14 @@ "location": { "column": 17, "file": "", - "line": 1032 + "line": 1115 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1032 + "line": 1115 }, "name": "draw_buf", "type": { @@ -43564,7 +45224,7 @@ "location": { "column": 81, "file": "", - "line": 1032 + "line": 1115 }, "name": "cf", "type": { @@ -43581,7 +45241,7 @@ "location": { "column": 94, "file": "", - "line": 1032 + "line": 1115 }, "name": "w", "type": { @@ -43598,7 +45258,7 @@ "location": { "column": 106, "file": "", - "line": 1032 + "line": 1115 }, "name": "h", "type": { @@ -43615,7 +45275,7 @@ "location": { "column": 46, "file": "", - "line": 1033 + "line": 1116 }, "name": "stride", "type": { @@ -43660,14 +45320,14 @@ "location": { "column": 13, "file": "", - "line": 1059 + "line": 6789 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 1059 + "line": 6789 }, "name": "draw_buf", "type": { @@ -43690,7 +45350,7 @@ "location": { "column": 81, "file": "", - "line": 1059 + "line": 6789 }, "name": "path", "type": { @@ -43734,20 +45394,18 @@ "cpython" ], "c_name": "lv_draw_buf_set_flag", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1044 + "line": 1125 }, "parameters": [ { "location": { - "column": 55, + "column": 41, "file": "", - "line": 1044 + "line": 1125 }, "name": "draw_buf", "type": { @@ -43765,9 +45423,9 @@ }, { "location": { - "column": 84, + "column": 70, "file": "", - "line": 1044 + "line": 1125 }, "name": "flag", "type": { @@ -43794,9 +45452,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -43811,14 +45467,14 @@ "location": { "column": 6, "file": "", - "line": 1054 + "line": 1129 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1054 + "line": 1129 }, "name": "draw_buf", "type": { @@ -43838,7 +45494,7 @@ "location": { "column": 64, "file": "", - "line": 1054 + "line": 1129 }, "name": "index", "type": { @@ -43855,7 +45511,7 @@ "location": { "column": 84, "file": "", - "line": 1054 + "line": 1129 }, "name": "color", "type": { @@ -43897,14 +45553,14 @@ "location": { "column": 6, "file": "", - "line": 1053 + "line": 1128 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1053 + "line": 1128 }, "name": "buf", "type": { @@ -43927,7 +45583,7 @@ "location": { "column": 69, "file": "", - "line": 1053 + "line": 1128 }, "name": "img", "type": { @@ -43972,14 +45628,14 @@ "location": { "column": 10, "file": "", - "line": 1021 + "line": 1104 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1021 + "line": 1104 }, "name": "w", "type": { @@ -43996,7 +45652,7 @@ "location": { "column": 68, "file": "", - "line": 1021 + "line": 1104 }, "name": "color_format", "type": { @@ -44037,14 +45693,14 @@ "location": { "column": 10, "file": "", - "line": 1022 + "line": 1105 }, "parameters": [ { "location": { "column": 70, "file": "", - "line": 1022 + "line": 1105 }, "name": "handlers", "type": { @@ -44067,7 +45723,7 @@ "location": { "column": 91, "file": "", - "line": 1022 + "line": 1105 }, "name": "w", "type": { @@ -44084,7 +45740,7 @@ "location": { "column": 59, "file": "", - "line": 1023 + "line": 1106 }, "name": "color_format", "type": { @@ -44126,14 +45782,14 @@ "location": { "column": 6, "file": "", - "line": 3504 + "line": 2577 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3504 + "line": 2577 }, "name": "layer", "type": { @@ -44153,7 +45809,7 @@ "location": { "column": 64, "file": "", - "line": 3504 + "line": 2577 }, "name": "dsc", "type": { @@ -44173,7 +45829,7 @@ "location": { "column": 69, "file": "", - "line": 3505 + "line": 2578 }, "name": "point", "type": { @@ -44196,7 +45852,7 @@ "location": { "column": 87, "file": "", - "line": 3505 + "line": 2578 }, "name": "unicode_letter", "type": { @@ -44226,6 +45882,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_cleanup_task", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4649 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 4649 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + } + ], + "python_name": "cleanup_task", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -44237,14 +45945,14 @@ "location": { "column": 8, "file": "", - "line": 3356 + "line": 2426 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3356 + "line": 2426 }, "name": "size", "type": { @@ -44288,7 +45996,7 @@ "location": { "column": 6, "file": "", - "line": 3355 + "line": 2425 }, "parameters": [], "python_name": "draw_deinit", @@ -44318,7 +46026,7 @@ "location": { "column": 6, "file": "", - "line": 3359 + "line": 2429 }, "parameters": [], "python_name": "draw_dispatch", @@ -44348,14 +46056,14 @@ "location": { "column": 6, "file": "", - "line": 3360 + "line": 2430 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3360 + "line": 2430 }, "name": "disp", "type": { @@ -44375,7 +46083,7 @@ "location": { "column": 61, "file": "", - "line": 3360 + "line": 2430 }, "name": "layer", "type": { @@ -44420,7 +46128,7 @@ "location": { "column": 6, "file": "", - "line": 3363 + "line": 2433 }, "parameters": [], "python_name": "draw_dispatch_request", @@ -44450,7 +46158,7 @@ "location": { "column": 6, "file": "", - "line": 3361 + "line": 2431 }, "parameters": [], "python_name": "draw_dispatch_wait_for_request", @@ -44480,14 +46188,14 @@ "location": { "column": 6, "file": "", - "line": 3441 + "line": 2514 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 3441 + "line": 2514 }, "name": "layer", "type": { @@ -44507,7 +46215,7 @@ "location": { "column": 64, "file": "", - "line": 3441 + "line": 2514 }, "name": "dsc", "type": { @@ -44530,7 +46238,7 @@ "location": { "column": 87, "file": "", - "line": 3441 + "line": 2514 }, "name": "coords", "type": { @@ -44577,14 +46285,14 @@ "location": { "column": 6, "file": "", - "line": 3439 + "line": 2512 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3439 + "line": 2512 }, "name": "dsc", "type": { @@ -44629,14 +46337,14 @@ "location": { "column": 6, "file": "", - "line": 3358 + "line": 2428 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3358 + "line": 2428 }, "name": "layer", "type": { @@ -44656,7 +46364,7 @@ "location": { "column": 72, "file": "", - "line": 3358 + "line": 2428 }, "name": "t", "type": { @@ -44700,14 +46408,14 @@ "location": { "column": 18, "file": "", - "line": 3365 + "line": 2435 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 3365 + "line": 2435 }, "name": "layer", "type": { @@ -44727,7 +46435,7 @@ "location": { "column": 80, "file": "", - "line": 3365 + "line": 2435 }, "name": "t_prev", "type": { @@ -44747,7 +46455,7 @@ "location": { "column": 98, "file": "", - "line": 3365 + "line": 2435 }, "name": "draw_unit_id", "type": { @@ -44791,14 +46499,14 @@ "location": { "column": 10, "file": "", - "line": 3367 + "line": 2437 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3367 + "line": 2437 }, "name": "t_check", "type": { @@ -44843,14 +46551,14 @@ "location": { "column": 18, "file": "", - "line": 3366 + "line": 2436 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 3366 + "line": 2436 }, "name": "layer", "type": { @@ -44870,7 +46578,7 @@ "location": { "column": 85, "file": "", - "line": 3366 + "line": 2436 }, "name": "t_prev", "type": { @@ -44890,7 +46598,7 @@ "location": { "column": 103, "file": "", - "line": 3366 + "line": 2436 }, "name": "draw_unit_id", "type": { @@ -44934,7 +46642,7 @@ "location": { "column": 10, "file": "", - "line": 3364 + "line": 2434 }, "parameters": [], "python_name": "draw_get_unit_count", @@ -44964,14 +46672,14 @@ "location": { "column": 6, "file": "", - "line": 3501 + "line": 2574 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3501 + "line": 2574 }, "name": "dsc", "type": { @@ -45011,82 +46719,485 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_image", + "c_name": "lv_draw_i1_convert_to_vtiled", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3539 + "line": 3263 }, "parameters": [ { "location": { - "column": 31, + "column": 46, "file": "", - "line": 3539 + "line": 3263 }, - "name": "layer", + "name": "buf", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_layer_t" + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "layer_t" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } }, { "location": { - "column": 66, + "column": 62, "file": "", - "line": 3539 + "line": 3263 }, - "name": "dsc", + "name": "buf_size", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 3263 + }, + "name": "width", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 3263 + }, + "name": "height", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 40, + "file": "", + "line": 3264 + }, + "name": "out_buf", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_draw_image_dsc_t", - "qualifiers": [ - "const" - ] + "kind": "primitive", + "name": "void" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_image_dsc_t" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } }, { "location": { - "column": 89, + "column": 44, "file": "", - "line": 3539 + "line": 3265 }, - "name": "coords", + "name": "out_buf_size", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 63, + "file": "", + "line": 3265 + }, + "name": "bit_order_lsb", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "draw_i1_convert_to_vtiled", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_i1_invert", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3262 + }, + "parameters": [ + { + "location": { + "column": 29, + "file": "", + "line": 3262 + }, + "name": "buf", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_area_t", + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "location": { + "column": 45, + "file": "", + "line": 3262 + }, + "name": "buf_size", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "draw_i1_invert", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_i1_to_argb8888", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3259 + }, + "parameters": [ + { + "location": { + "column": 40, + "file": "", + "line": 3259 + }, + "name": "buf_i1", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", "qualifiers": [ "const" ] } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "location": { + "column": 55, + "file": "", + "line": 3259 + }, + "name": "buf_argb8888", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 3259 + }, + "name": "width", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 3259 + }, + "name": "height", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 38, + "file": "", + "line": 3260 + }, + "name": "buf_i1_stride", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 62, + "file": "", + "line": 3260 + }, + "name": "buf_argb8888_stride", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 3260 + }, + "name": "index0_color", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 115, + "file": "", + "line": 3260 + }, + "name": "index1_color", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "draw_image", + "python_name": "draw_i1_to_argb8888", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_image", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2722 + }, + "parameters": [ + { + "location": { + "column": 31, + "file": "", + "line": 2722 + }, + "name": "layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + }, + { + "location": { + "column": 66, + "file": "", + "line": 2722 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_image_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_image_dsc_t" + } + }, + { + "location": { + "column": 89, + "file": "", + "line": 2722 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "draw_image", "return_type": { "kind": "primitive", "name": "void" @@ -45113,14 +47224,14 @@ "location": { "column": 6, "file": "", - "line": 3537 + "line": 2720 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3537 + "line": 2720 }, "name": "dsc", "type": { @@ -45165,14 +47276,14 @@ "location": { "column": 6, "file": "", - "line": 5823 + "line": 6103 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 5823 + "line": 6103 }, "name": "t", "type": { @@ -45192,7 +47303,7 @@ "location": { "column": 80, "file": "", - "line": 5823 + "line": 6103 }, "name": "draw_dsc", "type": { @@ -45215,7 +47326,7 @@ "location": { "column": 50, "file": "", - "line": 5824 + "line": 6104 }, "name": "coords", "type": { @@ -45238,7 +47349,7 @@ "location": { "column": 82, "file": "", - "line": 5824 + "line": 6104 }, "name": "draw_core_cb", "type": { @@ -45255,7 +47366,7 @@ "location": { "column": 64, "file": "", - "line": 5825 + "line": 6105 }, "name": "decoder_args", "type": { @@ -45303,14 +47414,14 @@ "location": { "column": 6, "file": "", - "line": 5826 + "line": 6106 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 5826 + "line": 6106 }, "name": "t", "type": { @@ -45330,7 +47441,7 @@ "location": { "column": 79, "file": "", - "line": 5826 + "line": 6106 }, "name": "draw_dsc", "type": { @@ -45353,7 +47464,7 @@ "location": { "column": 49, "file": "", - "line": 5827 + "line": 6107 }, "name": "coords", "type": { @@ -45376,7 +47487,7 @@ "location": { "column": 81, "file": "", - "line": 5827 + "line": 6107 }, "name": "draw_core_cb", "type": { @@ -45393,7 +47504,7 @@ "location": { "column": 63, "file": "", - "line": 5828 + "line": 6108 }, "name": "decoder_args", "type": { @@ -45441,7 +47552,7 @@ "location": { "column": 6, "file": "", - "line": 3354 + "line": 2424 }, "parameters": [], "python_name": "draw_init", @@ -45471,14 +47582,14 @@ "location": { "column": 6, "file": "", - "line": 3502 + "line": 2575 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 3502 + "line": 2575 }, "name": "layer", "type": { @@ -45498,7 +47609,7 @@ "location": { "column": 66, "file": "", - "line": 3502 + "line": 2575 }, "name": "dsc", "type": { @@ -45521,7 +47632,7 @@ "location": { "column": 64, "file": "", - "line": 3503 + "line": 2576 }, "name": "coords", "type": { @@ -45568,14 +47679,14 @@ "location": { "column": 6, "file": "", - "line": 3499 + "line": 2572 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3499 + "line": 2572 }, "name": "dsc", "type": { @@ -45620,14 +47731,14 @@ "location": { "column": 6, "file": "", - "line": 3508 + "line": 2581 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3508 + "line": 2581 }, "name": "t", "type": { @@ -45647,7 +47758,7 @@ "location": { "column": 85, "file": "", - "line": 3508 + "line": 2581 }, "name": "dsc", "type": { @@ -45670,7 +47781,7 @@ "location": { "column": 55, "file": "", - "line": 3509 + "line": 2582 }, "name": "coords", "type": { @@ -45693,7 +47804,7 @@ "location": { "column": 84, "file": "", - "line": 3509 + "line": 2582 }, "name": "cb", "type": { @@ -45735,14 +47846,14 @@ "location": { "column": 6, "file": "", - "line": 3540 + "line": 2723 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 3540 + "line": 2723 }, "name": "layer", "type": { @@ -45762,7 +47873,7 @@ "location": { "column": 66, "file": "", - "line": 3540 + "line": 2723 }, "name": "dsc", "type": { @@ -45785,7 +47896,7 @@ "location": { "column": 89, "file": "", - "line": 3540 + "line": 2723 }, "name": "coords", "type": { @@ -45832,14 +47943,14 @@ "location": { "column": 8, "file": "", - "line": 3374 + "line": 2444 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3374 + "line": 2444 }, "name": "layer", "type": { @@ -45886,14 +47997,14 @@ "location": { "column": 14, "file": "", - "line": 3371 + "line": 2441 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3371 + "line": 2441 }, "name": "parent_layer", "type": { @@ -45913,7 +48024,7 @@ "location": { "column": 80, "file": "", - "line": 3371 + "line": 2441 }, "name": "color_format", "type": { @@ -45930,7 +48041,7 @@ "location": { "column": 110, "file": "", - "line": 3371 + "line": 2441 }, "name": "area", "type": { @@ -45980,14 +48091,14 @@ "location": { "column": 14, "file": "", - "line": 3379 + "line": 2449 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3379 + "line": 2449 }, "name": "parent_layer", "type": { @@ -46007,7 +48118,7 @@ "location": { "column": 99, "file": "", - "line": 3379 + "line": 2449 }, "name": "base", "type": { @@ -46030,7 +48141,7 @@ "location": { "column": 63, "file": "", - "line": 3380 + "line": 2450 }, "name": "area", "type": { @@ -46075,21 +48186,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_layer_finish_drop_shadow", + "c_name": "lv_draw_layer_dealloc_buf", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3381 + "line": 2452 }, "parameters": [ { "location": { - "column": 50, + "column": 43, "file": "", - "line": 3381 + "line": 2452 }, - "name": "drop_shadow_layer", + "name": "layer", "type": { "kind": "pointer", "target": { @@ -46102,32 +48213,9 @@ "conversion": "struct_pointer", "python_type": "layer_t" } - }, - { - "location": { - "column": 96, - "file": "", - "line": 3381 - }, - "name": "base", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_draw_dsc_base_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_dsc_base_t" - } } ], - "python_name": "draw_layer_finish_drop_shadow", + "python_name": "draw_layer_dealloc_buf", "return_type": { "kind": "primitive", "name": "void" @@ -46149,19 +48237,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_layer_go_to_xy", + "c_name": "lv_draw_layer_deinit", "function_specifiers": [], "location": { - "column": 8, + "column": 6, "file": "", - "line": 3375 + "line": 2453 }, "parameters": [ { "location": { - "column": 42, + "column": 38, "file": "", - "line": 3375 + "line": 2453 }, "name": "layer", "type": { @@ -46176,54 +48264,17 @@ "conversion": "struct_pointer", "python_type": "layer_t" } - }, - { - "location": { - "column": 59, - "file": "", - "line": 3375 - }, - "name": "x", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 70, - "file": "", - "line": 3375 - }, - "name": "y", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } } ], - "python_name": "draw_layer_go_to_xy", + "python_name": "draw_layer_deinit", "return_type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "module", "static": false, @@ -46237,19 +48288,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_layer_init", + "c_name": "lv_draw_layer_delete", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3372 + "line": 2454 }, "parameters": [ { "location": { - "column": 36, + "column": 38, "file": "", - "line": 3372 + "line": 2454 }, "name": "layer", "type": { @@ -46264,69 +48315,282 @@ "conversion": "struct_pointer", "python_type": "layer_t" } - }, - { - "location": { - "column": 56, - "file": "", - "line": 3372 - }, - "name": "parent_layer", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_layer_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "layer_t" - } - }, - { - "location": { - "column": 90, - "file": "", - "line": 3372 - }, - "name": "color_format", - "type": { - "kind": "identifier", - "name": "lv_color_format_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "COLOR_FORMAT | int" - } - }, - { - "location": { - "column": 41, - "file": "", - "line": 3373 - }, - "name": "area", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" - } } ], - "python_name": "draw_layer_init", + "python_name": "draw_layer_delete", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_layer_finish_drop_shadow", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2451 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 2451 + }, + "name": "drop_shadow_layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 2451 + }, + "name": "base", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_dsc_base_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_dsc_base_t" + } + } + ], + "python_name": "draw_layer_finish_drop_shadow", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_layer_go_to_xy", + "function_specifiers": [], + "location": { + "column": 8, + "file": "", + "line": 2445 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 2445 + }, + "name": "layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + }, + { + "location": { + "column": 59, + "file": "", + "line": 2445 + }, + "name": "x", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2445 + }, + "name": "y", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "draw_layer_go_to_xy", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_layer_init", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2442 + }, + "parameters": [ + { + "location": { + "column": 36, + "file": "", + "line": 2442 + }, + "name": "layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + }, + { + "location": { + "column": 56, + "file": "", + "line": 2442 + }, + "name": "parent_layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 2442 + }, + "name": "color_format", + "type": { + "kind": "identifier", + "name": "lv_color_format_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "COLOR_FORMAT | int" + } + }, + { + "location": { + "column": 41, + "file": "", + "line": 2443 + }, + "name": "area", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "draw_layer_init", "return_type": { "kind": "primitive", "name": "void" @@ -46353,14 +48617,14 @@ "location": { "column": 6, "file": "", - "line": 3506 + "line": 2579 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 3506 + "line": 2579 }, "name": "layer", "type": { @@ -46380,7 +48644,7 @@ "location": { "column": 62, "file": "", - "line": 3506 + "line": 2579 }, "name": "dsc", "type": { @@ -46400,7 +48664,7 @@ "location": { "column": 66, "file": "", - "line": 3507 + "line": 2580 }, "name": "point", "type": { @@ -46447,14 +48711,14 @@ "location": { "column": 6, "file": "", - "line": 3498 + "line": 2571 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3498 + "line": 2571 }, "name": "dsc", "type": { @@ -46499,14 +48763,14 @@ "location": { "column": 6, "file": "", - "line": 3559 + "line": 2742 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 3559 + "line": 2742 }, "name": "layer", "type": { @@ -46526,7 +48790,7 @@ "location": { "column": 64, "file": "", - "line": 3559 + "line": 2742 }, "name": "dsc", "type": { @@ -46573,14 +48837,14 @@ "location": { "column": 6, "file": "", - "line": 3557 + "line": 2740 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3557 + "line": 2740 }, "name": "dsc", "type": { @@ -46625,14 +48889,14 @@ "location": { "column": 6, "file": "", - "line": 3560 + "line": 2743 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3560 + "line": 2743 }, "name": "t", "type": { @@ -46652,7 +48916,7 @@ "location": { "column": 66, "file": "", - "line": 3560 + "line": 2743 }, "name": "dsc", "type": { @@ -46672,7 +48936,7 @@ "location": { "column": 33, "file": "", - "line": 3561 + "line": 2744 }, "name": "draw_line_cb", "type": { @@ -46684,7 +48948,7 @@ "location": { "column": 63, "file": "", - "line": 3561 + "line": 2744 }, "name": "t", "type": { @@ -46699,7 +48963,7 @@ "location": { "column": 93, "file": "", - "line": 3561 + "line": 2744 }, "name": "dsc", "type": { @@ -46755,14 +49019,14 @@ "location": { "column": 6, "file": "", - "line": 5029 + "line": 3248 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 5029 + "line": 3248 }, "name": "layer", "type": { @@ -46782,7 +49046,7 @@ "location": { "column": 74, "file": "", - "line": 5029 + "line": 3248 }, "name": "dsc", "type": { @@ -46829,14 +49093,14 @@ "location": { "column": 6, "file": "", - "line": 5027 + "line": 3246 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 5027 + "line": 3246 }, "name": "dsc", "type": { @@ -46881,14 +49145,14 @@ "location": { "column": 6, "file": "", - "line": 3448 + "line": 2521 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 3448 + "line": 2521 }, "name": "layer", "type": { @@ -46908,7 +49172,7 @@ "location": { "column": 64, "file": "", - "line": 3448 + "line": 2521 }, "name": "dsc", "type": { @@ -46931,7 +49195,7 @@ "location": { "column": 87, "file": "", - "line": 3448 + "line": 2521 }, "name": "coords", "type": { @@ -46978,14 +49242,14 @@ "location": { "column": 6, "file": "", - "line": 3438 + "line": 2511 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3438 + "line": 2511 }, "name": "dsc", "type": { @@ -47025,83 +49289,53 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_arc", + "c_name": "lv_draw_rgb565_swap", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5087 + "line": 3261 }, "parameters": [ { "location": { - "column": 36, - "file": "", - "line": 5087 - }, - "name": "t", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_draw_task_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_task_t" - } - }, - { - "location": { - "column": 65, + "column": 31, "file": "", - "line": 5087 + "line": 3261 }, - "name": "dsc", + "name": "buf", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_draw_arc_dsc_t", - "qualifiers": [ - "const" - ] + "kind": "primitive", + "name": "void" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_arc_dsc_t" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } }, { "location": { - "column": 88, + "column": 47, "file": "", - "line": 5087 + "line": 3261 }, - "name": "coords", + "name": "buf_size_px", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "uint32_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "sw_arc", - "receiver": "draw_task_t", + "python_name": "draw_rgb565_swap", "return_type": { "kind": "primitive", "name": "void" @@ -47111,7 +49345,7 @@ "conversion": "none", "python_type": "None" }, - "role": "struct_method", + "role": "module", "static": false, "storage": [], "variadic": false, @@ -47123,60 +49357,161 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_blend", + "c_name": "lv_draw_rotate", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5077 + "line": 3266 }, "parameters": [ { "location": { - "column": 38, + "column": 32, "file": "", - "line": 5077 + "line": 3266 }, - "name": "t", + "name": "src", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_draw_task_t" + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_task_t" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } }, { "location": { - "column": 72, + "column": 44, "file": "", - "line": 5077 + "line": 3266 }, - "name": "dsc", + "name": "dest", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_draw_sw_blend_dsc_t", - "qualifiers": [ - "const" - ] + "kind": "primitive", + "name": "void" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_sw_blend_dsc_t" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 3266 + }, + "name": "src_width", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 3266 + }, + "name": "src_height", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 99, + "file": "", + "line": 3266 + }, + "name": "src_stride", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 29, + "file": "", + "line": 3267 + }, + "name": "dest_stride", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 64, + "file": "", + "line": 3267 + }, + "name": "rotation", + "type": { + "kind": "identifier", + "name": "lv_display_rotation_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "DISPLAY_ROTATION | int" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 3267 + }, + "name": "color_format", + "type": { + "kind": "identifier", + "name": "lv_color_format_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "COLOR_FORMAT | int" } } ], - "python_name": "sw_blend", - "receiver": "draw_task_t", + "python_name": "draw_rotate", "return_type": { "kind": "primitive", "name": "void" @@ -47186,7 +49521,7 @@ "conversion": "none", "python_type": "None" }, - "role": "struct_method", + "role": "module", "static": false, "storage": [], "variadic": false, @@ -47198,19 +49533,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_blur", + "c_name": "lv_draw_sw_arc", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5091 + "line": 4665 }, "parameters": [ { "location": { - "column": 37, + "column": 36, "file": "", - "line": 5091 + "line": 4665 }, "name": "t", "type": { @@ -47228,16 +49563,16 @@ }, { "location": { - "column": 67, + "column": 65, "file": "", - "line": 5091 + "line": 4665 }, "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_blur_dsc_t", + "name": "lv_draw_arc_dsc_t", "qualifiers": [ "const" ] @@ -47246,14 +49581,14 @@ "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_blur_dsc_t" + "python_type": "draw_arc_dsc_t" } }, { "location": { - "column": 90, + "column": 88, "file": "", - "line": 5091 + "line": 4665 }, "name": "coords", "type": { @@ -47273,7 +49608,7 @@ } } ], - "python_name": "sw_blur", + "python_name": "sw_arc", "receiver": "draw_task_t", "return_type": { "kind": "primitive", @@ -47296,19 +49631,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_border", + "c_name": "lv_draw_sw_blend", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5081 + "line": 4655 }, "parameters": [ { "location": { - "column": 39, + "column": 38, "file": "", - "line": 5081 + "line": 4655 }, "name": "t", "type": { @@ -47326,39 +49661,16 @@ }, { "location": { - "column": 71, + "column": 72, "file": "", - "line": 5081 + "line": 4655 }, "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_border_dsc_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_border_dsc_t" - } - }, - { - "location": { - "column": 94, - "file": "", - "line": 5081 - }, - "name": "coords", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t", + "name": "lv_draw_sw_blend_dsc_t", "qualifiers": [ "const" ] @@ -47367,11 +49679,11 @@ "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "area_t" + "python_type": "draw_sw_blend_dsc_t" } } ], - "python_name": "sw_border", + "python_name": "sw_blend", "receiver": "draw_task_t", "return_type": { "kind": "primitive", @@ -47394,83 +49706,141 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_box_shadow", + "c_name": "lv_draw_sw_blend_color_to_a8", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5082 + "line": 6258 }, "parameters": [ { "location": { - "column": 43, + "column": 63, "file": "", - "line": 5082 + "line": 6258 }, - "name": "t", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_task_t" + "name": "lv_draw_sw_blend_fill_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_task_t" + "python_type": "draw_sw_blend_fill_dsc_t" } - }, + } + ], + "python_name": "color_to_a8", + "receiver": "draw_sw_blend_fill_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_color_to_al88", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6260 + }, + "parameters": [ { "location": { - "column": 79, + "column": 65, "file": "", - "line": 5082 + "line": 6260 }, "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_box_shadow_dsc_t", - "qualifiers": [ - "const" - ] + "name": "lv_draw_sw_blend_fill_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_box_shadow_dsc_t" + "python_type": "draw_sw_blend_fill_dsc_t" } - }, + } + ], + "python_name": "color_to_al88", + "receiver": "draw_sw_blend_fill_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_color_to_argb8888", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6262 + }, + "parameters": [ { "location": { - "column": 102, + "column": 69, "file": "", - "line": 5082 + "line": 6262 }, - "name": "coords", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] + "name": "lv_draw_sw_blend_fill_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "area_t" + "python_type": "draw_sw_blend_fill_dsc_t" } } ], - "python_name": "sw_box_shadow", - "receiver": "draw_task_t", + "python_name": "color_to_argb8888", + "receiver": "draw_sw_blend_fill_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -47492,15 +49862,37 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_deinit", + "c_name": "lv_draw_sw_blend_color_to_argb8888_premultiplied", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5079 + "line": 6264 }, - "parameters": [], - "python_name": "draw_sw_deinit", + "parameters": [ + { + "location": { + "column": 83, + "file": "", + "line": 6264 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_sw_blend_fill_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_blend_fill_dsc_t" + } + } + ], + "python_name": "color_to_argb8888_premultiplied", + "receiver": "draw_sw_blend_fill_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -47510,7 +49902,7 @@ "conversion": "none", "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -47522,80 +49914,141 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_fill", + "c_name": "lv_draw_sw_blend_color_to_i1", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5080 + "line": 6266 }, "parameters": [ { "location": { - "column": 37, + "column": 63, "file": "", - "line": 5080 + "line": 6266 }, - "name": "t", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_task_t" + "name": "lv_draw_sw_blend_fill_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_task_t" + "python_type": "draw_sw_blend_fill_dsc_t" } - }, + } + ], + "python_name": "color_to_i1", + "receiver": "draw_sw_blend_fill_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_color_to_l8", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6268 + }, + "parameters": [ { "location": { - "column": 61, + "column": 63, "file": "", - "line": 5080 + "line": 6268 }, "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_fill_dsc_t" + "name": "lv_draw_sw_blend_fill_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_fill_dsc_t" + "python_type": "draw_sw_blend_fill_dsc_t" } - }, + } + ], + "python_name": "color_to_l8", + "receiver": "draw_sw_blend_fill_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_color_to_rgb565", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6270 + }, + "parameters": [ { "location": { - "column": 84, + "column": 67, "file": "", - "line": 5080 + "line": 6270 }, - "name": "coords", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] + "name": "lv_draw_sw_blend_fill_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "area_t" + "python_type": "draw_sw_blend_fill_dsc_t" } } ], - "python_name": "sw_fill", - "receiver": "draw_task_t", + "python_name": "color_to_rgb565", + "receiver": "draw_sw_blend_fill_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -47617,43 +50070,47 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_get_blend_handler", + "c_name": "lv_draw_sw_blend_color_to_rgb565_swapped", "function_specifiers": [], "location": { - "column": 28, + "column": 6, "file": "", - "line": 5098 + "line": 6272 }, "parameters": [ { "location": { "column": 75, "file": "", - "line": 5098 + "line": 6272 }, - "name": "dest_cf", + "name": "dsc", "type": { - "kind": "identifier", - "name": "lv_color_format_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_sw_blend_fill_dsc_t" + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "COLOR_FORMAT | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_blend_fill_dsc_t" } } ], - "python_name": "draw_sw_get_blend_handler", + "python_name": "color_to_rgb565_swapped", + "receiver": "draw_sw_blend_fill_dsc_t", "return_type": { - "kind": "identifier", - "name": "lv_draw_sw_blend_handler_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[draw_task_t, draw_sw_blend_dsc_t], None]" + "category": "void", + "conversion": "none", + "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -47665,115 +50122,41 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_i1_convert_to_vtiled", + "c_name": "lv_draw_sw_blend_color_to_rgb888", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4964 + "line": 6274 }, "parameters": [ { "location": { - "column": 49, - "file": "", - "line": 4964 - }, - "name": "buf", - "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - } - }, - { - "location": { - "column": 65, - "file": "", - "line": 4964 - }, - "name": "buf_size", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 84, - "file": "", - "line": 4964 - }, - "name": "width", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 100, - "file": "", - "line": 4964 - }, - "name": "height", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 43, + "column": 67, "file": "", - "line": 4965 + "line": 6274 }, - "name": "out_buf", + "name": "dsc", "type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_draw_sw_blend_fill_dsc_t" } }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_blend_fill_dsc_t" } }, { "location": { - "column": 47, + "column": 76, "file": "", - "line": 4966 + "line": 6275 }, - "name": "out_buf_size", + "name": "dest_px_size", "type": { "kind": "identifier", "name": "uint32_t" @@ -47783,26 +50166,10 @@ "conversion": "integer", "python_type": "int" } - }, - { - "location": { - "column": 66, - "file": "", - "line": 4966 - }, - "name": "bit_order_lsb", - "type": { - "kind": "primitive", - "name": "bool" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } } ], - "python_name": "draw_sw_i1_convert_to_vtiled", + "python_name": "color_to_rgb888", + "receiver": "draw_sw_blend_fill_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -47812,7 +50179,7 @@ "conversion": "none", "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -47824,53 +50191,37 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_i1_invert", + "c_name": "lv_draw_sw_blend_image_to_a8", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4963 + "line": 6259 }, "parameters": [ { "location": { - "column": 32, + "column": 64, "file": "", - "line": 4963 + "line": 6259 }, - "name": "buf", + "name": "dsc", "type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - } - }, - { - "location": { - "column": 48, - "file": "", - "line": 4963 - }, - "name": "buf_size", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_blend_image_dsc_t" } } ], - "python_name": "draw_sw_i1_invert", + "python_name": "to_a8", + "receiver": "draw_sw_blend_image_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -47880,7 +50231,7 @@ "conversion": "none", "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -47892,161 +50243,89 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_i1_to_argb8888", + "c_name": "lv_draw_sw_blend_image_to_al88", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4960 + "line": 6261 }, "parameters": [ { "location": { - "column": 43, + "column": 66, "file": "", - "line": 4960 + "line": 6261 }, - "name": "buf_i1", + "name": "dsc", "type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "void", - "qualifiers": [ - "const" - ] + "kind": "identifier", + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_blend_image_dsc_t" } - }, + } + ], + "python_name": "to_al88", + "receiver": "draw_sw_blend_image_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_image_to_argb8888", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6263 + }, + "parameters": [ { "location": { - "column": 58, + "column": 70, "file": "", - "line": 4960 + "line": 6263 }, - "name": "buf_argb8888", + "name": "dsc", "type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - } - }, - { - "location": { - "column": 83, - "file": "", - "line": 4960 - }, - "name": "width", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 99, - "file": "", - "line": 4960 - }, - "name": "height", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 41, - "file": "", - "line": 4961 - }, - "name": "buf_i1_stride", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 65, - "file": "", - "line": 4961 - }, - "name": "buf_argb8888_stride", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 95, - "file": "", - "line": 4961 - }, - "name": "index0_color", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 118, - "file": "", - "line": 4961 - }, - "name": "index1_color", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_blend_image_dsc_t" } } ], - "python_name": "draw_sw_i1_to_argb8888", + "python_name": "to_argb8888", + "receiver": "draw_sw_blend_image_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -48056,7 +50335,7 @@ "conversion": "none", "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -48068,83 +50347,141 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_image", + "c_name": "lv_draw_sw_blend_image_to_argb8888_premultiplied", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5083 + "line": 6265 }, "parameters": [ { "location": { - "column": 38, + "column": 84, "file": "", - "line": 5083 + "line": 6265 }, - "name": "t", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_task_t" + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_task_t" + "python_type": "draw_sw_blend_image_dsc_t" } - }, + } + ], + "python_name": "to_argb8888_premultiplied", + "receiver": "draw_sw_blend_image_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_image_to_i1", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6267 + }, + "parameters": [ { "location": { - "column": 69, + "column": 64, "file": "", - "line": 5083 + "line": 6267 }, - "name": "draw_dsc", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_image_dsc_t", - "qualifiers": [ - "const" - ] + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_image_dsc_t" + "python_type": "draw_sw_blend_image_dsc_t" } - }, + } + ], + "python_name": "to_i1", + "receiver": "draw_sw_blend_image_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_image_to_l8", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6269 + }, + "parameters": [ { "location": { - "column": 39, + "column": 64, "file": "", - "line": 5084 + "line": 6269 }, - "name": "coords", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "area_t" + "python_type": "draw_sw_blend_image_dsc_t" } } ], - "python_name": "sw_image", - "receiver": "draw_task_t", + "python_name": "to_l8", + "receiver": "draw_sw_blend_image_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -48166,15 +50503,37 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_init", + "c_name": "lv_draw_sw_blend_image_to_rgb565", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5078 + "line": 6271 }, - "parameters": [], - "python_name": "draw_sw_init", + "parameters": [ + { + "location": { + "column": 68, + "file": "", + "line": 6271 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_sw_blend_image_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_blend_image_dsc_t" + } + } + ], + "python_name": "to_rgb565", + "receiver": "draw_sw_blend_image_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -48184,7 +50543,7 @@ "conversion": "none", "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -48196,83 +50555,106 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_label", + "c_name": "lv_draw_sw_blend_image_to_rgb565_swapped", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5086 + "line": 6273 }, "parameters": [ { "location": { - "column": 38, + "column": 76, "file": "", - "line": 5086 + "line": 6273 }, - "name": "t", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_task_t" + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_task_t" + "python_type": "draw_sw_blend_image_dsc_t" } - }, + } + ], + "python_name": "to_rgb565_swapped", + "receiver": "draw_sw_blend_image_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_blend_image_to_rgb888", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6276 + }, + "parameters": [ { "location": { - "column": 69, + "column": 68, "file": "", - "line": 5086 + "line": 6276 }, "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_label_dsc_t", - "qualifiers": [ - "const" - ] + "name": "lv_draw_sw_blend_image_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_label_dsc_t" + "python_type": "draw_sw_blend_image_dsc_t" } }, { "location": { - "column": 92, + "column": 76, "file": "", - "line": 5086 + "line": 6277 }, - "name": "coords", + "name": "dest_px_size", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "uint32_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "sw_label", - "receiver": "draw_task_t", + "python_name": "to_rgb888", + "receiver": "draw_sw_blend_image_dsc_t", "return_type": { "kind": "primitive", "name": "void" @@ -48294,19 +50676,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_layer", + "c_name": "lv_draw_sw_blur", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5089 + "line": 4669 }, "parameters": [ { "location": { - "column": 38, + "column": 37, "file": "", - "line": 5089 + "line": 4669 }, "name": "t", "type": { @@ -48324,16 +50706,16 @@ }, { "location": { - "column": 69, + "column": 67, "file": "", - "line": 5089 + "line": 4669 }, - "name": "draw_dsc", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_image_dsc_t", + "name": "lv_draw_blur_dsc_t", "qualifiers": [ "const" ] @@ -48342,14 +50724,14 @@ "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_image_dsc_t" + "python_type": "draw_blur_dsc_t" } }, { "location": { - "column": 97, + "column": 90, "file": "", - "line": 5089 + "line": 4669 }, "name": "coords", "type": { @@ -48369,7 +50751,7 @@ } } ], - "python_name": "sw_layer", + "python_name": "sw_blur", "receiver": "draw_task_t", "return_type": { "kind": "primitive", @@ -48392,19 +50774,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_letter", + "c_name": "lv_draw_sw_border", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5085 + "line": 4659 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 5085 + "line": 4659 }, "name": "t", "type": { @@ -48424,14 +50806,14 @@ "location": { "column": 71, "file": "", - "line": 5085 + "line": 4659 }, "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_letter_dsc_t", + "name": "lv_draw_border_dsc_t", "qualifiers": [ "const" ] @@ -48440,14 +50822,14 @@ "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_letter_dsc_t" + "python_type": "draw_border_dsc_t" } }, { "location": { "column": 94, "file": "", - "line": 5085 + "line": 4659 }, "name": "coords", "type": { @@ -48467,7 +50849,7 @@ } } ], - "python_name": "sw_letter", + "python_name": "sw_border", "receiver": "draw_task_t", "return_type": { "kind": "primitive", @@ -48490,19 +50872,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_line", + "c_name": "lv_draw_sw_box_shadow", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5088 + "line": 4660 }, "parameters": [ { "location": { - "column": 37, + "column": 43, "file": "", - "line": 5088 + "line": 4660 }, "name": "t", "type": { @@ -48520,16 +50902,16 @@ }, { "location": { - "column": 67, + "column": 79, "file": "", - "line": 5088 + "line": 4660 }, "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_line_dsc_t", + "name": "lv_draw_box_shadow_dsc_t", "qualifiers": [ "const" ] @@ -48538,27 +50920,991 @@ "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_line_dsc_t" + "python_type": "draw_box_shadow_dsc_t" } - } - ], - "python_name": "sw_line", - "receiver": "draw_task_t", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "struct_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, + }, + { + "location": { + "column": 102, + "file": "", + "line": 4660 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "sw_box_shadow", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_deinit", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4657 + }, + "parameters": [], + "python_name": "draw_sw_deinit", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_fill", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4658 + }, + "parameters": [ + { + "location": { + "column": 37, + "file": "", + "line": 4658 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + }, + { + "location": { + "column": 61, + "file": "", + "line": 4658 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_fill_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_fill_dsc_t" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 4658 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "sw_fill", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_get_blend_handler", + "function_specifiers": [], + "location": { + "column": 28, + "file": "", + "line": 4676 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 4676 + }, + "name": "dest_cf", + "type": { + "kind": "identifier", + "name": "lv_color_format_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "COLOR_FORMAT | int" + } + } + ], + "python_name": "draw_sw_get_blend_handler", + "return_type": { + "kind": "identifier", + "name": "lv_draw_sw_blend_handler_t" + }, + "return_view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[draw_task_t, draw_sw_blend_dsc_t], None]" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_grad_cleanup", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6286 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 6286 + }, + "name": "grad", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_sw_grad_calc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_grad_calc_t" + } + } + ], + "python_name": "cleanup", + "receiver": "draw_sw_grad_calc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_grad_color_calculate", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6283 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 6283 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_grad_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "grad_dsc_t" + } + }, + { + "location": { + "column": 73, + "file": "", + "line": 6283 + }, + "name": "range", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 74, + "file": "", + "line": 6284 + }, + "name": "frac", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 6284 + }, + "name": "color_out", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_color_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "color_t" + } + }, + { + "location": { + "column": 113, + "file": "", + "line": 6284 + }, + "name": "opa_out", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_opa_t" + } + }, + "view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + } + } + ], + "python_name": "draw_sw_grad_color_calculate", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_grad_get", + "function_specifiers": [], + "location": { + "column": 26, + "file": "", + "line": 6285 + }, + "parameters": [ + { + "location": { + "column": 66, + "file": "", + "line": 6285 + }, + "name": "gradient", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_grad_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "grad_dsc_t" + } + }, + { + "location": { + "column": 86, + "file": "", + "line": 6285 + }, + "name": "w", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 6285 + }, + "name": "h", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "draw_sw_grad_get", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_sw_grad_calc_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_sw_grad_calc_t" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_image", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4661 + }, + "parameters": [ + { + "location": { + "column": 38, + "file": "", + "line": 4661 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 4661 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_image_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_image_dsc_t" + } + }, + { + "location": { + "column": 39, + "file": "", + "line": 4662 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "sw_image", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_init", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4656 + }, + "parameters": [], + "python_name": "draw_sw_init", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_label", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4664 + }, + "parameters": [ + { + "location": { + "column": 38, + "file": "", + "line": 4664 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 4664 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_label_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_label_dsc_t" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 4664 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "sw_label", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_layer", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4667 + }, + "parameters": [ + { + "location": { + "column": 38, + "file": "", + "line": 4667 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 4667 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_image_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_image_dsc_t" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 4667 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "sw_layer", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_letter", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4663 + }, + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 4663 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 4663 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_letter_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_letter_dsc_t" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 4663 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "sw_letter", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_line", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4666 + }, + "parameters": [ + { + "location": { + "column": 37, + "file": "", + "line": 4666 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 4666 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_line_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_line_dsc_t" + } + } + ], + "python_name": "sw_line", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -48570,14 +51916,14 @@ "location": { "column": 6, "file": "", - "line": 5064 + "line": 4778 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 5064 + "line": 4778 }, "name": "param", "type": { @@ -48597,7 +51943,7 @@ "location": { "column": 80, "file": "", - "line": 5064 + "line": 4778 }, "name": "vertex_x", "type": { @@ -48614,7 +51960,7 @@ "location": { "column": 98, "file": "", - "line": 5064 + "line": 4778 }, "name": "vertex_y", "type": { @@ -48631,7 +51977,7 @@ "location": { "column": 41, "file": "", - "line": 5065 + "line": 4779 }, "name": "start_angle", "type": { @@ -48648,7 +51994,7 @@ "location": { "column": 62, "file": "", - "line": 5065 + "line": 4779 }, "name": "end_angle", "type": { @@ -48690,14 +52036,14 @@ "location": { "column": 23, "file": "", - "line": 5054 + "line": 4768 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 5054 + "line": 4768 }, "name": "masks", "type": { @@ -48723,7 +52069,7 @@ "location": { "column": 70, "file": "", - "line": 5054 + "line": 4768 }, "name": "mask_buf", "type": { @@ -48743,7 +52089,7 @@ "location": { "column": 81, "file": "", - "line": 5055 + "line": 4769 }, "name": "abs_x", "type": { @@ -48760,7 +52106,7 @@ "location": { "column": 81, "file": "", - "line": 5056 + "line": 4770 }, "name": "abs_y", "type": { @@ -48777,7 +52123,7 @@ "location": { "column": 81, "file": "", - "line": 5057 + "line": 4771 }, "name": "len", "type": { @@ -48818,7 +52164,7 @@ "location": { "column": 6, "file": "", - "line": 5461 + "line": 4852 }, "parameters": [], "python_name": "draw_sw_mask_cleanup", @@ -48848,7 +52194,7 @@ "location": { "column": 6, "file": "", - "line": 5053 + "line": 4767 }, "parameters": [], "python_name": "draw_sw_mask_deinit", @@ -48878,14 +52224,14 @@ "location": { "column": 6, "file": "", - "line": 5068 + "line": 4782 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 5068 + "line": 4782 }, "name": "param", "type": { @@ -48905,7 +52251,7 @@ "location": { "column": 86, "file": "", - "line": 5068 + "line": 4782 }, "name": "coords", "type": { @@ -48928,7 +52274,7 @@ "location": { "column": 105, "file": "", - "line": 5068 + "line": 4782 }, "name": "opa_top", "type": { @@ -48945,7 +52291,7 @@ "location": { "column": 40, "file": "", - "line": 5069 + "line": 4783 }, "name": "y_top", "type": { @@ -48962,7 +52308,7 @@ "location": { "column": 41, "file": "", - "line": 5070 + "line": 4784 }, "name": "opa_bottom", "type": { @@ -48979,7 +52325,7 @@ "location": { "column": 61, "file": "", - "line": 5070 + "line": 4784 }, "name": "y_bottom", "type": { @@ -49021,14 +52367,14 @@ "location": { "column": 6, "file": "", - "line": 5058 + "line": 4772 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 5058 + "line": 4772 }, "name": "p", "type": { @@ -49072,7 +52418,7 @@ "location": { "column": 6, "file": "", - "line": 5052 + "line": 4766 }, "parameters": [], "python_name": "draw_sw_mask_init", @@ -49102,14 +52448,14 @@ "location": { "column": 6, "file": "", - "line": 5062 + "line": 4776 }, "parameters": [ { "location": { "column": 67, "file": "", - "line": 5062 + "line": 4776 }, "name": "param", "type": { @@ -49129,7 +52475,7 @@ "location": { "column": 84, "file": "", - "line": 5062 + "line": 4776 }, "name": "px", "type": { @@ -49146,7 +52492,7 @@ "location": { "column": 96, "file": "", - "line": 5062 + "line": 4776 }, "name": "py", "type": { @@ -49163,7 +52509,7 @@ "location": { "column": 108, "file": "", - "line": 5062 + "line": 4776 }, "name": "angle", "type": { @@ -49180,7 +52526,7 @@ "location": { "column": 66, "file": "", - "line": 5063 + "line": 4777 }, "name": "side", "type": { @@ -49222,14 +52568,14 @@ "location": { "column": 6, "file": "", - "line": 5059 + "line": 4773 }, "parameters": [ { "location": { "column": 68, "file": "", - "line": 5059 + "line": 4773 }, "name": "param", "type": { @@ -49249,7 +52595,7 @@ "location": { "column": 85, "file": "", - "line": 5059 + "line": 4773 }, "name": "p1x", "type": { @@ -49266,7 +52612,7 @@ "location": { "column": 98, "file": "", - "line": 5059 + "line": 4773 }, "name": "p1y", "type": { @@ -49283,7 +52629,7 @@ "location": { "column": 47, "file": "", - "line": 5060 + "line": 4774 }, "name": "p2x", "type": { @@ -49300,7 +52646,7 @@ "location": { "column": 47, "file": "", - "line": 5061 + "line": 4775 }, "name": "p2y", "type": { @@ -49317,7 +52663,7 @@ "location": { "column": 80, "file": "", - "line": 5061 + "line": 4775 }, "name": "side", "type": { @@ -49359,14 +52705,14 @@ "location": { "column": 6, "file": "", - "line": 5071 + "line": 4785 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 5071 + "line": 4785 }, "name": "param", "type": { @@ -49386,7 +52732,7 @@ "location": { "column": 84, "file": "", - "line": 5071 + "line": 4785 }, "name": "coords", "type": { @@ -49409,7 +52755,7 @@ "location": { "column": 109, "file": "", - "line": 5071 + "line": 4785 }, "name": "map", "type": { @@ -49455,16 +52801,16 @@ "c_name": "lv_draw_sw_mask_radius_init", "function_specifiers": [], "location": { - "column": 6, + "column": 13, "file": "", - "line": 5066 + "line": 4780 }, "parameters": [ { "location": { - "column": 65, + "column": 72, "file": "", - "line": 5066 + "line": 4780 }, "name": "param", "type": { @@ -49482,9 +52828,9 @@ }, { "location": { - "column": 90, + "column": 97, "file": "", - "line": 5066 + "line": 4780 }, "name": "rect", "type": { @@ -49505,9 +52851,9 @@ }, { "location": { - "column": 106, + "column": 113, "file": "", - "line": 5066 + "line": 4780 }, "name": "radius", "type": { @@ -49522,9 +52868,9 @@ }, { "location": { - "column": 39, + "column": 46, "file": "", - "line": 5067 + "line": 4781 }, "name": "inv", "type": { @@ -49541,13 +52887,13 @@ "python_name": "init", "receiver": "draw_sw_mask_radius_param_t", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_result_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" }, "role": "struct_method", "static": false, @@ -49566,14 +52912,14 @@ "location": { "column": 6, "file": "", - "line": 5092 + "line": 4670 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 5092 + "line": 4670 }, "name": "t", "type": { @@ -49593,7 +52939,7 @@ "location": { "column": 77, "file": "", - "line": 5092 + "line": 4670 }, "name": "dsc", "type": { @@ -49641,14 +52987,14 @@ "location": { "column": 6, "file": "", - "line": 5096 + "line": 4674 }, "parameters": [ { "location": { "column": 74, "file": "", - "line": 5096 + "line": 4674 }, "name": "handler", "type": { @@ -49688,286 +53034,42 @@ "circuitpython", "cpython" ], - "c_name": "lv_draw_sw_rgb565_swap", + "c_name": "lv_draw_sw_transform", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 4962 + "line": 4671 }, "parameters": [ { "location": { - "column": 34, + "column": 43, "file": "", - "line": 4962 + "line": 4671 }, - "name": "buf", + "name": "dest_area", "type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] } }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" } }, { "location": { - "column": 50, + "column": 67, "file": "", - "line": 4962 - }, - "name": "buf_size_px", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - } - ], - "python_name": "draw_sw_rgb565_swap", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_draw_sw_rotate", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 4967 - }, - "parameters": [ - { - "location": { - "column": 35, - "file": "", - "line": 4967 - }, - "name": "src", - "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - } - }, - { - "location": { - "column": 47, - "file": "", - "line": 4967 - }, - "name": "dest", - "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } - }, - "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - } - }, - { - "location": { - "column": 63, - "file": "", - "line": 4967 - }, - "name": "src_width", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 82, - "file": "", - "line": 4967 - }, - "name": "src_height", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 102, - "file": "", - "line": 4967 - }, - "name": "src_stride", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 32, - "file": "", - "line": 4968 - }, - "name": "dest_stride", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 67, - "file": "", - "line": 4968 - }, - "name": "rotation", - "type": { - "kind": "identifier", - "name": "lv_display_rotation_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "DISPLAY_ROTATION | int" - } - }, - { - "location": { - "column": 95, - "file": "", - "line": 4968 - }, - "name": "color_format", - "type": { - "kind": "identifier", - "name": "lv_color_format_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "COLOR_FORMAT | int" - } - } - ], - "python_name": "draw_sw_rotate", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_draw_sw_transform", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 5093 - }, - "parameters": [ - { - "location": { - "column": 43, - "file": "", - "line": 5093 - }, - "name": "dest_area", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" - } - }, - { - "location": { - "column": 67, - "file": "", - "line": 5093 + "line": 4671 }, "name": "src_buf", "type": { @@ -49990,7 +53092,7 @@ "location": { "column": 35, "file": "", - "line": 5094 + "line": 4672 }, "name": "src_w", "type": { @@ -50007,7 +53109,7 @@ "location": { "column": 50, "file": "", - "line": 5094 + "line": 4672 }, "name": "src_h", "type": { @@ -50024,7 +53126,7 @@ "location": { "column": 65, "file": "", - "line": 5094 + "line": 4672 }, "name": "src_stride", "type": { @@ -50041,7 +53143,7 @@ "location": { "column": 53, "file": "", - "line": 5095 + "line": 4673 }, "name": "draw_dsc", "type": { @@ -50064,7 +53166,7 @@ "location": { "column": 91, "file": "", - "line": 5095 + "line": 4673 }, "name": "sup", "type": { @@ -50087,9 +53189,9 @@ "location": { "column": 116, "file": "", - "line": 5095 + "line": 4673 }, - "name": "cf", + "name": "src_cf", "type": { "kind": "identifier", "name": "lv_color_format_t" @@ -50102,9 +53204,9 @@ }, { "location": { - "column": 125, + "column": 129, "file": "", - "line": 5095 + "line": 4673 }, "name": "dest_buf", "type": { @@ -50148,14 +53250,14 @@ "location": { "column": 6, "file": "", - "line": 5090 + "line": 4668 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 5090 + "line": 4668 }, "name": "t", "type": { @@ -50175,7 +53277,7 @@ "location": { "column": 75, "file": "", - "line": 5090 + "line": 4668 }, "name": "dsc", "type": { @@ -50223,14 +53325,14 @@ "location": { "column": 6, "file": "", - "line": 5097 + "line": 4675 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 5097 + "line": 4675 }, "name": "dest_cf", "type": { @@ -50271,14 +53373,14 @@ "location": { "column": 21, "file": "", - "line": 3575 + "line": 2758 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 3575 + "line": 2758 }, "name": "task", "type": { @@ -50326,14 +53428,14 @@ "location": { "column": 6, "file": "", - "line": 3378 + "line": 2448 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3378 + "line": 2448 }, "name": "t", "type": { @@ -50356,7 +53458,7 @@ "location": { "column": 64, "file": "", - "line": 3378 + "line": 2448 }, "name": "area", "type": { @@ -50401,14 +53503,14 @@ "location": { "column": 22, "file": "", - "line": 3597 + "line": 2780 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 3597 + "line": 2780 }, "name": "task", "type": { @@ -50456,14 +53558,14 @@ "location": { "column": 24, "file": "", - "line": 3443 + "line": 2516 }, "parameters": [ { "location": { "column": 67, "file": "", - "line": 3443 + "line": 2516 }, "name": "task", "type": { @@ -50511,14 +53613,14 @@ "location": { "column": 28, "file": "", - "line": 3446 + "line": 2519 }, "parameters": [ { "location": { "column": 75, "file": "", - "line": 3446 + "line": 2519 }, "name": "task", "type": { @@ -50566,14 +53668,14 @@ "location": { "column": 8, "file": "", - "line": 3377 + "line": 2447 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 3377 + "line": 2447 }, "name": "t", "type": { @@ -50624,14 +53726,14 @@ "location": { "column": 22, "file": "", - "line": 3440 + "line": 2513 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 3440 + "line": 2513 }, "name": "task", "type": { @@ -50679,14 +53781,14 @@ "location": { "column": 23, "file": "", - "line": 3538 + "line": 2721 }, "parameters": [ { "location": { "column": 65, "file": "", - "line": 3538 + "line": 2721 }, "name": "task", "type": { @@ -50734,14 +53836,14 @@ "location": { "column": 23, "file": "", - "line": 3500 + "line": 2573 }, "parameters": [ { "location": { "column": 65, "file": "", - "line": 3500 + "line": 2573 }, "name": "task", "type": { @@ -50789,14 +53891,14 @@ "location": { "column": 22, "file": "", - "line": 3558 + "line": 2741 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 3558 + "line": 2741 }, "name": "task", "type": { @@ -50844,14 +53946,14 @@ "location": { "column": 27, "file": "", - "line": 5028 + "line": 3247 }, "parameters": [ { "location": { "column": 73, "file": "", - "line": 5028 + "line": 3247 }, "name": "task", "type": { @@ -50899,14 +54001,14 @@ "location": { "column": 26, "file": "", - "line": 3588 + "line": 2771 }, "parameters": [ { "location": { "column": 71, "file": "", - "line": 3588 + "line": 2771 }, "name": "task", "type": { @@ -50954,14 +54056,14 @@ "location": { "column": 21, "file": "", - "line": 3376 + "line": 2446 }, "parameters": [ { "location": { "column": 64, "file": "", - "line": 3376 + "line": 2446 }, "name": "t", "type": { @@ -51009,14 +54111,14 @@ "location": { "column": 6, "file": "", - "line": 3589 + "line": 2772 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 3589 + "line": 2772 }, "name": "layer", "type": { @@ -51036,7 +54138,7 @@ "location": { "column": 72, "file": "", - "line": 3589 + "line": 2772 }, "name": "draw_dsc", "type": { @@ -51083,14 +54185,14 @@ "location": { "column": 6, "file": "", - "line": 3587 + "line": 2770 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 3587 + "line": 2770 }, "name": "draw_dsc", "type": { @@ -51135,14 +54237,14 @@ "location": { "column": 6, "file": "", - "line": 3510 + "line": 2583 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3510 + "line": 2583 }, "name": "t", "type": { @@ -51162,7 +54264,7 @@ "location": { "column": 71, "file": "", - "line": 3510 + "line": 2583 }, "name": "dsc", "type": { @@ -51182,7 +54284,7 @@ "location": { "column": 95, "file": "", - "line": 3510 + "line": 2583 }, "name": "pos", "type": { @@ -51205,7 +54307,7 @@ "location": { "column": 47, "file": "", - "line": 3511 + "line": 2584 }, "name": "font", "type": { @@ -51228,7 +54330,7 @@ "location": { "column": 64, "file": "", - "line": 3511 + "line": 2584 }, "name": "letter", "type": { @@ -51245,7 +54347,7 @@ "location": { "column": 91, "file": "", - "line": 3511 + "line": 2584 }, "name": "cb", "type": { @@ -51276,6 +54378,158 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_unit_draw_letter_internal", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6131 + }, + "parameters": [ + { + "location": { + "column": 55, + "file": "", + "line": 6131 + }, + "name": "t", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_task_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_task_t" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 6131 + }, + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_glyph_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_glyph_dsc_t" + } + }, + { + "location": { + "column": 104, + "file": "", + "line": 6131 + }, + "name": "pos", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_point_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "point_t" + } + }, + { + "location": { + "column": 56, + "file": "", + "line": 6132 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 73, + "file": "", + "line": 6132 + }, + "name": "letter", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 6132 + }, + "name": "cb", + "type": { + "kind": "identifier", + "name": "lv_draw_glyph_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[draw_task_t, draw_glyph_dsc_t, draw_fill_dsc_t, area_t], None]" + } + } + ], + "python_name": "unit_draw_letter_internal", + "receiver": "draw_task_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -51287,14 +54541,14 @@ "location": { "column": 6, "file": "", - "line": 3368 + "line": 2438 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3368 + "line": 2438 }, "name": "name", "type": { @@ -51317,7 +54571,7 @@ "location": { "column": 65, "file": "", - "line": 3368 + "line": 2438 }, "name": "code", "type": { @@ -51334,7 +54588,7 @@ "location": { "column": 76, "file": "", - "line": 3368 + "line": 2438 }, "name": "param", "type": { @@ -51378,7 +54632,7 @@ "location": { "column": 6, "file": "", - "line": 3362 + "line": 2432 }, "parameters": [], "python_name": "draw_wait_for_finish", @@ -51408,14 +54662,14 @@ "location": { "column": 6, "file": "", - "line": 4474 + "line": 3869 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4474 + "line": 3869 }, "name": "obj", "type": { @@ -51435,7 +54689,7 @@ "location": { "column": 56, "file": "", - "line": 4474 + "line": 3869 }, "name": "option", "type": { @@ -51458,7 +54712,7 @@ "location": { "column": 75, "file": "", - "line": 4474 + "line": 3869 }, "name": "pos", "type": { @@ -51500,14 +54754,14 @@ "location": { "column": 17, "file": "", - "line": 4493 + "line": 3888 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4493 + "line": 3888 }, "name": "obj", "type": { @@ -51527,7 +54781,7 @@ "location": { "column": 69, "file": "", - "line": 4493 + "line": 3888 }, "name": "subject", "type": { @@ -51575,14 +54829,14 @@ "location": { "column": 6, "file": "", - "line": 4475 + "line": 3870 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4475 + "line": 3870 }, "name": "obj", "type": { @@ -51627,14 +54881,14 @@ "location": { "column": 6, "file": "", - "line": 4491 + "line": 3886 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4491 + "line": 3886 }, "name": "obj", "type": { @@ -51679,14 +54933,14 @@ "location": { "column": 12, "file": "", - "line": 4469 + "line": 3864 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4469 + "line": 3864 }, "name": "parent", "type": { @@ -51734,14 +54988,14 @@ "location": { "column": 10, "file": "", - "line": 4489 + "line": 3884 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4489 + "line": 3884 }, "name": "obj", "type": { @@ -51789,14 +55043,14 @@ "location": { "column": 12, "file": "", - "line": 4480 + "line": 3875 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4480 + "line": 3875 }, "name": "obj", "type": { @@ -51844,14 +55098,14 @@ "location": { "column": 10, "file": "", - "line": 4484 + "line": 3879 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4484 + "line": 3879 }, "name": "obj", "type": { @@ -51899,14 +55153,14 @@ "location": { "column": 9, "file": "", - "line": 4486 + "line": 3881 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4486 + "line": 3881 }, "name": "obj", "type": { @@ -51926,7 +55180,7 @@ "location": { "column": 65, "file": "", - "line": 4486 + "line": 3881 }, "name": "option", "type": { @@ -51974,14 +55228,14 @@ "location": { "column": 14, "file": "", - "line": 4482 + "line": 3877 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4482 + "line": 3877 }, "name": "obj", "type": { @@ -52035,14 +55289,14 @@ "location": { "column": 10, "file": "", - "line": 4483 + "line": 3878 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4483 + "line": 3878 }, "name": "obj", "type": { @@ -52090,14 +55344,14 @@ "location": { "column": 6, "file": "", - "line": 4488 + "line": 3883 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4488 + "line": 3883 }, "name": "obj", "type": { @@ -52142,14 +55396,14 @@ "location": { "column": 6, "file": "", - "line": 4485 + "line": 3880 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4485 + "line": 3880 }, "name": "obj", "type": { @@ -52172,7 +55426,7 @@ "location": { "column": 62, "file": "", - "line": 4485 + "line": 3880 }, "name": "buf", "type": { @@ -52192,7 +55446,7 @@ "location": { "column": 78, "file": "", - "line": 4485 + "line": 3880 }, "name": "buf_size", "type": { @@ -52234,14 +55488,14 @@ "location": { "column": 14, "file": "", - "line": 4487 + "line": 3882 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4487 + "line": 3882 }, "name": "obj", "type": { @@ -52292,14 +55546,14 @@ "location": { "column": 14, "file": "", - "line": 4481 + "line": 3876 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4481 + "line": 3876 }, "name": "obj", "type": { @@ -52350,14 +55604,14 @@ "location": { "column": 6, "file": "", - "line": 4492 + "line": 3887 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4492 + "line": 3887 }, "name": "obj", "type": { @@ -52402,14 +55656,14 @@ "location": { "column": 6, "file": "", - "line": 4490 + "line": 3885 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4490 + "line": 3885 }, "name": "dropdown_obj", "type": { @@ -52454,14 +55708,14 @@ "location": { "column": 6, "file": "", - "line": 4477 + "line": 3872 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4477 + "line": 3872 }, "name": "obj", "type": { @@ -52481,7 +55735,7 @@ "location": { "column": 51, "file": "", - "line": 4477 + "line": 3872 }, "name": "dir", "type": { @@ -52523,14 +55777,14 @@ "location": { "column": 6, "file": "", - "line": 4472 + "line": 3867 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4472 + "line": 3867 }, "name": "obj", "type": { @@ -52550,7 +55804,7 @@ "location": { "column": 57, "file": "", - "line": 4472 + "line": 3867 }, "name": "options", "type": { @@ -52598,14 +55852,14 @@ "location": { "column": 6, "file": "", - "line": 4473 + "line": 3868 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4473 + "line": 3868 }, "name": "obj", "type": { @@ -52625,7 +55879,7 @@ "location": { "column": 64, "file": "", - "line": 4473 + "line": 3868 }, "name": "options", "type": { @@ -52673,14 +55927,14 @@ "location": { "column": 6, "file": "", - "line": 4476 + "line": 3871 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4476 + "line": 3871 }, "name": "obj", "type": { @@ -52700,7 +55954,7 @@ "location": { "column": 56, "file": "", - "line": 4476 + "line": 3871 }, "name": "sel_opt", "type": { @@ -52742,14 +55996,14 @@ "location": { "column": 6, "file": "", - "line": 4479 + "line": 3874 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4479 + "line": 3874 }, "name": "obj", "type": { @@ -52769,7 +56023,7 @@ "location": { "column": 62, "file": "", - "line": 4479 + "line": 3874 }, "name": "en", "type": { @@ -52811,14 +56065,14 @@ "location": { "column": 6, "file": "", - "line": 4478 + "line": 3873 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4478 + "line": 3873 }, "name": "obj", "type": { @@ -52838,7 +56092,7 @@ "location": { "column": 56, "file": "", - "line": 4478 + "line": 3873 }, "name": "symbol", "type": { @@ -52886,14 +56140,14 @@ "location": { "column": 6, "file": "", - "line": 4470 + "line": 3865 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4470 + "line": 3865 }, "name": "obj", "type": { @@ -52913,7 +56167,7 @@ "location": { "column": 54, "file": "", - "line": 4470 + "line": 3865 }, "name": "text", "type": { @@ -52961,14 +56215,14 @@ "location": { "column": 6, "file": "", - "line": 4471 + "line": 3866 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4471 + "line": 3866 }, "name": "obj", "type": { @@ -52988,7 +56242,7 @@ "location": { "column": 61, "file": "", - "line": 4471 + "line": 3866 }, "name": "text", "type": { @@ -53036,14 +56290,14 @@ "location": { "column": 18, "file": "", - "line": 1932 + "line": 655 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1932 + "line": 655 }, "name": "list", "type": { @@ -53063,7 +56317,7 @@ "location": { "column": 69, "file": "", - "line": 1932 + "line": 655 }, "name": "cb", "type": { @@ -53080,7 +56334,7 @@ "location": { "column": 89, "file": "", - "line": 1932 + "line": 655 }, "name": "filter", "type": { @@ -53097,7 +56351,7 @@ "location": { "column": 102, "file": "", - "line": 1932 + "line": 655 }, "name": "user_data", "type": { @@ -53145,14 +56399,14 @@ "location": { "column": 14, "file": "", - "line": 1950 + "line": 673 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 1950 + "line": 673 }, "name": "code", "type": { @@ -53199,14 +56453,14 @@ "location": { "column": 15, "file": "", - "line": 1936 + "line": 659 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1936 + "line": 659 }, "name": "dsc", "type": { @@ -53251,14 +56505,14 @@ "location": { "column": 8, "file": "", - "line": 1937 + "line": 660 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1937 + "line": 660 }, "name": "dsc", "type": { @@ -53306,14 +56560,14 @@ "location": { "column": 6, "file": "", - "line": 1948 + "line": 671 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1948 + "line": 671 }, "name": "e", "type": { @@ -53358,14 +56612,14 @@ "location": { "column": 17, "file": "", - "line": 1942 + "line": 665 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1942 + "line": 665 }, "name": "e", "type": { @@ -53410,14 +56664,14 @@ "location": { "column": 10, "file": "", - "line": 1934 + "line": 657 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1934 + "line": 657 }, "name": "list", "type": { @@ -53462,14 +56716,14 @@ "location": { "column": 19, "file": "", - "line": 3796 + "line": 2936 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3796 + "line": 2936 }, "name": "e", "type": { @@ -53520,14 +56774,14 @@ "location": { "column": 8, "file": "", - "line": 1941 + "line": 664 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1941 + "line": 664 }, "name": "e", "type": { @@ -53575,14 +56829,14 @@ "location": { "column": 12, "file": "", - "line": 3778 + "line": 2918 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 3778 + "line": 2918 }, "name": "e", "type": { @@ -53630,14 +56884,14 @@ "location": { "column": 18, "file": "", - "line": 3798 + "line": 2938 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3798 + "line": 2938 }, "name": "e", "type": { @@ -53685,14 +56939,14 @@ "location": { "column": 18, "file": "", - "line": 1935 + "line": 658 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1935 + "line": 658 }, "name": "list", "type": { @@ -53712,7 +56966,7 @@ "location": { "column": 68, "file": "", - "line": 1935 + "line": 658 }, "name": "index", "type": { @@ -53757,14 +57011,14 @@ "location": { "column": 26, "file": "", - "line": 4009 + "line": 3318 }, "parameters": [ { "location": { "column": 64, "file": "", - "line": 4009 + "line": 3318 }, "name": "gesture_event", "type": { @@ -53784,7 +57038,7 @@ "location": { "column": 105, "file": "", - "line": 4009 + "line": 3318 }, "name": "type", "type": { @@ -53826,14 +57080,14 @@ "location": { "column": 25, "file": "", - "line": 4010 + "line": 3319 }, "parameters": [ { "location": { "column": 62, "file": "", - "line": 4010 + "line": 3319 }, "name": "gesture_event", "type": { @@ -53878,14 +57132,14 @@ "location": { "column": 22, "file": "", - "line": 3795 + "line": 2935 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 3795 + "line": 2935 }, "name": "e", "type": { @@ -53933,14 +57187,14 @@ "location": { "column": 14, "file": "", - "line": 3787 + "line": 2927 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3787 + "line": 2927 }, "name": "e", "type": { @@ -53988,14 +57242,14 @@ "location": { "column": 13, "file": "", - "line": 2042 + "line": 1846 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 2042 + "line": 1846 }, "name": "e", "type": { @@ -54043,14 +57297,14 @@ "location": { "column": 10, "file": "", - "line": 3790 + "line": 2930 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3790 + "line": 2930 }, "name": "e", "type": { @@ -54095,14 +57349,14 @@ "location": { "column": 14, "file": "", - "line": 3788 + "line": 2928 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3788 + "line": 2928 }, "name": "e", "type": { @@ -54150,14 +57404,14 @@ "location": { "column": 19, "file": "", - "line": 3789 + "line": 2929 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3789 + "line": 2929 }, "name": "e", "type": { @@ -54208,14 +57462,14 @@ "location": { "column": 8, "file": "", - "line": 1943 + "line": 666 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1943 + "line": 666 }, "name": "e", "type": { @@ -54263,14 +57517,14 @@ "location": { "column": 7, "file": "", - "line": 4002 + "line": 3311 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4002 + "line": 3311 }, "name": "gesture_event", "type": { @@ -54315,14 +57569,14 @@ "location": { "column": 12, "file": "", - "line": 3799 + "line": 2939 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3799 + "line": 2939 }, "name": "e", "type": { @@ -54367,14 +57621,14 @@ "location": { "column": 9, "file": "", - "line": 3791 + "line": 2931 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3791 + "line": 2931 }, "name": "e", "type": { @@ -54419,14 +57673,14 @@ "location": { "column": 7, "file": "", - "line": 4003 + "line": 3312 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4003 + "line": 3312 }, "name": "gesture_event", "type": { @@ -54471,14 +57725,14 @@ "location": { "column": 13, "file": "", - "line": 3792 + "line": 2932 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3792 + "line": 2932 }, "name": "e", "type": { @@ -54526,14 +57780,14 @@ "location": { "column": 14, "file": "", - "line": 3794 + "line": 2934 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3794 + "line": 2934 }, "name": "e", "type": { @@ -54581,14 +57835,14 @@ "location": { "column": 8, "file": "", - "line": 1940 + "line": 663 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1940 + "line": 663 }, "name": "e", "type": { @@ -54636,14 +57890,14 @@ "location": { "column": 12, "file": "", - "line": 3779 + "line": 2919 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3779 + "line": 2919 }, "name": "e", "type": { @@ -54691,14 +57945,14 @@ "location": { "column": 10, "file": "", - "line": 4005 + "line": 3314 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4005 + "line": 3314 }, "name": "gesture_event", "type": { @@ -54743,14 +57997,14 @@ "location": { "column": 7, "file": "", - "line": 4004 + "line": 3313 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 4004 + "line": 3313 }, "name": "gesture_event", "type": { @@ -54795,14 +58049,14 @@ "location": { "column": 8, "file": "", - "line": 1944 + "line": 667 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1944 + "line": 667 }, "name": "e", "type": { @@ -54850,14 +58104,14 @@ "location": { "column": 6, "file": "", - "line": 6073 + "line": 5018 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 6073 + "line": 5018 }, "name": "target", "type": { @@ -54901,14 +58155,14 @@ "location": { "column": 6, "file": "", - "line": 6070 + "line": 5015 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 6070 + "line": 5015 }, "name": "e", "type": { @@ -54953,14 +58207,14 @@ "location": { "column": 6, "file": "", - "line": 6069 + "line": 5014 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 6069 + "line": 5014 }, "name": "e", "type": { @@ -55005,14 +58259,14 @@ "location": { "column": 13, "file": "", - "line": 6071 + "line": 5016 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 6071 + "line": 5016 }, "name": "event_list", "type": { @@ -55032,7 +58286,7 @@ "location": { "column": 82, "file": "", - "line": 6071 + "line": 5016 }, "name": "code", "type": { @@ -55049,7 +58303,7 @@ "location": { "column": 93, "file": "", - "line": 6071 + "line": 5016 }, "name": "original_target", "type": { @@ -55069,7 +58323,7 @@ "location": { "column": 41, "file": "", - "line": 6072 + "line": 5017 }, "name": "param", "type": { @@ -55114,7 +58368,7 @@ "location": { "column": 10, "file": "", - "line": 1949 + "line": 672 }, "parameters": [], "python_name": "event_register_id", @@ -55144,14 +58398,14 @@ "location": { "column": 6, "file": "", - "line": 1938 + "line": 661 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1938 + "line": 661 }, "name": "list", "type": { @@ -55171,7 +58425,7 @@ "location": { "column": 55, "file": "", - "line": 1938 + "line": 661 }, "name": "index", "type": { @@ -55213,14 +58467,14 @@ "location": { "column": 6, "file": "", - "line": 1939 + "line": 662 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1939 + "line": 662 }, "name": "list", "type": { @@ -55265,14 +58519,14 @@ "location": { "column": 6, "file": "", - "line": 1933 + "line": 656 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1933 + "line": 656 }, "name": "list", "type": { @@ -55292,7 +58546,7 @@ "location": { "column": 65, "file": "", - "line": 1933 + "line": 656 }, "name": "dsc", "type": { @@ -55337,14 +58591,14 @@ "location": { "column": 13, "file": "", - "line": 1931 + "line": 654 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1931 + "line": 654 }, "name": "list", "type": { @@ -55364,7 +58618,7 @@ "location": { "column": 62, "file": "", - "line": 1931 + "line": 654 }, "name": "e", "type": { @@ -55384,7 +58638,7 @@ "location": { "column": 72, "file": "", - "line": 1931 + "line": 654 }, "name": "preprocess", "type": { @@ -55426,14 +58680,14 @@ "location": { "column": 6, "file": "", - "line": 3797 + "line": 2937 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3797 + "line": 2937 }, "name": "e", "type": { @@ -55453,7 +58707,7 @@ "location": { "column": 60, "file": "", - "line": 3797 + "line": 2937 }, "name": "res", "type": { @@ -55495,14 +58749,14 @@ "location": { "column": 6, "file": "", - "line": 3793 + "line": 2933 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3793 + "line": 2933 }, "name": "e", "type": { @@ -55522,7 +58776,7 @@ "location": { "column": 57, "file": "", - "line": 3793 + "line": 2933 }, "name": "size", "type": { @@ -55564,14 +58818,14 @@ "location": { "column": 6, "file": "", - "line": 1945 + "line": 668 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1945 + "line": 668 }, "name": "e", "type": { @@ -55616,14 +58870,14 @@ "location": { "column": 6, "file": "", - "line": 1947 + "line": 670 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1947 + "line": 670 }, "name": "e", "type": { @@ -55668,14 +58922,14 @@ "location": { "column": 6, "file": "", - "line": 1946 + "line": 669 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1946 + "line": 669 }, "name": "e", "type": { @@ -55720,7 +58974,7 @@ "location": { "column": 6, "file": "", - "line": 1405 + "line": 1344 }, "parameters": [], "python_name": "flex_init", @@ -55750,14 +59004,14 @@ "location": { "column": 14, "file": "", - "line": 4083 + "line": 3402 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 4083 + "line": 3402 }, "name": "g_dsc", "type": { @@ -55777,7 +59031,7 @@ "location": { "column": 84, "file": "", - "line": 4083 + "line": 3402 }, "name": "draw_buf", "type": { @@ -55817,6 +59071,154 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_bottom_trim", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1247 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 1247 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 1247 + }, + "name": "trim", + "type": { + "kind": "identifier", + "name": "lv_text_leading_trim_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" + } + } + ], + "python_name": "get_bottom_trim", + "receiver": "font_t", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_bottom_trim_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 6718 + }, + "parameters": [ + { + "location": { + "column": 72, + "file": "", + "line": 6718 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 103, + "file": "", + "line": 6718 + }, + "name": "trim", + "type": { + "kind": "identifier", + "name": "lv_text_leading_trim_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" + } + } + ], + "python_name": "get_bottom_trim_internal", + "receiver": "font_t", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -55828,7 +59230,7 @@ "location": { "column": 19, "file": "", - "line": 1283 + "line": 1215 }, "parameters": [], "python_name": "font_get_default", @@ -55864,14 +59266,14 @@ "location": { "column": 14, "file": "", - "line": 1275 + "line": 1207 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 1275 + "line": 1207 }, "name": "g_dsc", "type": { @@ -55891,7 +59293,7 @@ "location": { "column": 82, "file": "", - "line": 1275 + "line": 1207 }, "name": "draw_buf", "type": { @@ -55931,6 +59333,84 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_glyph_bitmap_internal", + "function_specifiers": [], + "location": { + "column": 14, + "file": "", + "line": 6292 + }, + "parameters": [ + { + "location": { + "column": 68, + "file": "", + "line": 6292 + }, + "name": "g_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_glyph_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_glyph_dsc_t" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 6292 + }, + "name": "draw_buf", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_buf_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_buf_t" + } + } + ], + "python_name": "get_glyph_bitmap_internal", + "receiver": "font_glyph_dsc_t", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -55942,14 +59422,14 @@ "location": { "column": 6, "file": "", - "line": 1277 + "line": 1209 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1277 + "line": 1209 }, "name": "font", "type": { @@ -55972,7 +59452,7 @@ "location": { "column": 72, "file": "", - "line": 1277 + "line": 1209 }, "name": "dsc_out", "type": { @@ -55992,7 +59472,7 @@ "location": { "column": 92, "file": "", - "line": 1277 + "line": 1209 }, "name": "letter", "type": { @@ -56009,7 +59489,7 @@ "location": { "column": 37, "file": "", - "line": 1278 + "line": 1210 }, "name": "letter_next", "type": { @@ -56051,14 +59531,14 @@ "location": { "column": 6, "file": "", - "line": 4084 + "line": 3403 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4084 + "line": 3403 }, "name": "font", "type": { @@ -56081,7 +59561,7 @@ "location": { "column": 80, "file": "", - "line": 4084 + "line": 3403 }, "name": "dsc_out", "type": { @@ -56101,7 +59581,7 @@ "location": { "column": 100, "file": "", - "line": 4084 + "line": 3403 }, "name": "unicode_letter", "type": { @@ -56118,7 +59598,7 @@ "location": { "column": 45, "file": "", - "line": 4085 + "line": 3404 }, "name": "unicode_letter_next", "type": { @@ -56149,6 +59629,115 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_glyph_dsc_internal", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6295 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 6295 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 6295 + }, + "name": "dsc_out", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_glyph_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_glyph_dsc_t" + } + }, + { + "location": { + "column": 101, + "file": "", + "line": 6295 + }, + "name": "letter", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 46, + "file": "", + "line": 6296 + }, + "name": "letter_next", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "get_glyph_dsc_internal", + "receiver": "font_t", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -56160,14 +59749,14 @@ "location": { "column": 14, "file": "", - "line": 1276 + "line": 1208 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 1276 + "line": 1208 }, "name": "g_dsc", "type": { @@ -56207,6 +59796,64 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_glyph_static_bitmap_internal", + "function_specifiers": [], + "location": { + "column": 14, + "file": "", + "line": 6293 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 6293 + }, + "name": "g_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_glyph_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_glyph_dsc_t" + } + } + ], + "python_name": "get_glyph_static_bitmap_internal", + "receiver": "font_glyph_dsc_t", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -56218,14 +59865,14 @@ "location": { "column": 10, "file": "", - "line": 1280 + "line": 1212 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1280 + "line": 1212 }, "name": "font", "type": { @@ -56248,7 +59895,7 @@ "location": { "column": 67, "file": "", - "line": 1280 + "line": 1212 }, "name": "letter", "type": { @@ -56265,7 +59912,7 @@ "location": { "column": 84, "file": "", - "line": 1280 + "line": 1212 }, "name": "letter_next", "type": { @@ -56296,6 +59943,95 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_glyph_width_internal", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 6297 + }, + "parameters": [ + { + "location": { + "column": 59, + "file": "", + "line": 6297 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 76, + "file": "", + "line": 6297 + }, + "name": "letter", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 6297 + }, + "name": "letter_next", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "get_glyph_width_internal", + "receiver": "font_t", + "return_type": { + "kind": "identifier", + "name": "uint16_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -56307,14 +60043,14 @@ "location": { "column": 9, "file": "", - "line": 1281 + "line": 1213 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1281 + "line": 1213 }, "name": "font", "type": { @@ -56351,6 +60087,291 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_line_height_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 6298 + }, + "parameters": [ + { + "location": { + "column": 72, + "file": "", + "line": 6298 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + } + ], + "python_name": "get_line_height_internal", + "receiver": "font_t", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_top_trim", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1246 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 1246 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 1246 + }, + "name": "trim", + "type": { + "kind": "identifier", + "name": "lv_text_leading_trim_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" + } + } + ], + "python_name": "get_top_trim", + "receiver": "font_t", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_get_top_trim_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 6732 + }, + "parameters": [ + { + "location": { + "column": 69, + "file": "", + "line": 6732 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 6732 + }, + "name": "trim", + "type": { + "kind": "identifier", + "name": "lv_text_leading_trim_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" + } + } + ], + "python_name": "get_top_trim_internal", + "receiver": "font_t", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_glyph_dsc_compare", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 6291 + }, + "parameters": [ + { + "location": { + "column": 61, + "file": "", + "line": 6291 + }, + "name": "lhs", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_glyph_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_glyph_dsc_t" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 6291 + }, + "name": "rhs", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_glyph_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_glyph_dsc_t" + } + } + ], + "python_name": "compare", + "receiver": "font_glyph_dsc_t", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -56362,14 +60383,14 @@ "location": { "column": 6, "file": "", - "line": 1279 + "line": 1211 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 1279 + "line": 1211 }, "name": "g_dsc", "type": { @@ -56403,6 +60424,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_glyph_release_draw_data_internal", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6294 + }, + "parameters": [ + { + "location": { + "column": 67, + "file": "", + "line": 6294 + }, + "name": "g_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_glyph_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_glyph_dsc_t" + } + } + ], + "python_name": "release_draw_data_internal", + "receiver": "font_glyph_dsc_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -56414,14 +60487,14 @@ "location": { "column": 6, "file": "", - "line": 1285 + "line": 1217 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1285 + "line": 1217 }, "name": "font", "type": { @@ -56458,6 +60531,65 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_has_static_bitmap_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 6303 + }, + "parameters": [ + { + "location": { + "column": 71, + "file": "", + "line": 6303 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + } + ], + "python_name": "has_static_bitmap_internal", + "receiver": "font_t", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -56469,14 +60601,14 @@ "location": { "column": 6, "file": "", - "line": 1284 + "line": 1216 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1284 + "line": 1216 }, "name": "ft_info_1", "type": { @@ -56499,7 +60631,7 @@ "location": { "column": 83, "file": "", - "line": 1284 + "line": 1216 }, "name": "ft_info_2", "type": { @@ -56547,14 +60679,14 @@ "location": { "column": 6, "file": "", - "line": 1282 + "line": 1214 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 1282 + "line": 1214 }, "name": "font", "type": { @@ -56574,7 +60706,7 @@ "location": { "column": 62, "file": "", - "line": 1282 + "line": 1214 }, "name": "kerning", "type": { @@ -56616,14 +60748,14 @@ "location": { "column": 6, "file": "", - "line": 402 + "line": 816 }, "parameters": [ { "location": { "column": 19, "file": "", - "line": 402 + "line": 816 }, "name": "data", "type": { @@ -56667,14 +60799,14 @@ "location": { "column": 6, "file": "", - "line": 406 + "line": 820 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 406 + "line": 820 }, "name": "p", "type": { @@ -56718,14 +60850,14 @@ "location": { "column": 13, "file": "", - "line": 3253 + "line": 2649 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3253 + "line": 2649 }, "name": "file_p", "type": { @@ -56770,7 +60902,7 @@ "location": { "column": 6, "file": "", - "line": 6051 + "line": 6315 }, "parameters": [], "python_name": "fs_deinit", @@ -56800,14 +60932,14 @@ "location": { "column": 13, "file": "", - "line": 3264 + "line": 2660 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3264 + "line": 2660 }, "name": "rddir_p", "type": { @@ -56852,14 +60984,14 @@ "location": { "column": 13, "file": "", - "line": 3262 + "line": 2658 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3262 + "line": 2658 }, "name": "rddir_p", "type": { @@ -56879,7 +61011,7 @@ "location": { "column": 62, "file": "", - "line": 3262 + "line": 2658 }, "name": "path", "type": { @@ -56927,14 +61059,14 @@ "location": { "column": 13, "file": "", - "line": 3263 + "line": 2659 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3263 + "line": 2659 }, "name": "rddir_p", "type": { @@ -56954,7 +61086,7 @@ "location": { "column": 56, "file": "", - "line": 3263 + "line": 2659 }, "name": "fn", "type": { @@ -56974,7 +61106,7 @@ "location": { "column": 71, "file": "", - "line": 3263 + "line": 2659 }, "name": "fn_len", "type": { @@ -57016,14 +61148,14 @@ "location": { "column": 6, "file": "", - "line": 3244 + "line": 2640 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 3244 + "line": 2640 }, "name": "drv", "type": { @@ -57068,14 +61200,14 @@ "location": { "column": 6, "file": "", - "line": 3245 + "line": 2641 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3245 + "line": 2641 }, "name": "drv", "type": { @@ -57120,14 +61252,14 @@ "location": { "column": 13, "file": "", - "line": 3252 + "line": 2648 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 3252 + "line": 2648 }, "name": "path", "type": { @@ -57147,7 +61279,7 @@ "location": { "column": 70, "file": "", - "line": 3252 + "line": 2648 }, "name": "buffer", "type": { @@ -57170,7 +61302,7 @@ "location": { "column": 89, "file": "", - "line": 3252 + "line": 2648 }, "name": "size", "type": { @@ -57215,14 +61347,14 @@ "location": { "column": 15, "file": "", - "line": 3246 + "line": 2642 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 3246 + "line": 2642 }, "name": "letter", "type": { @@ -57266,14 +61398,14 @@ "location": { "column": 14, "file": "", - "line": 3266 + "line": 2662 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3266 + "line": 2662 }, "name": "fn", "type": { @@ -57326,14 +61458,14 @@ "location": { "column": 14, "file": "", - "line": 3268 + "line": 2664 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3268 + "line": 2664 }, "name": "path", "type": { @@ -57386,14 +61518,14 @@ "location": { "column": 8, "file": "", - "line": 3265 + "line": 2661 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 3265 + "line": 2661 }, "name": "buf", "type": { @@ -57440,14 +61572,14 @@ "location": { "column": 13, "file": "", - "line": 3258 + "line": 2654 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3258 + "line": 2654 }, "name": "file_p", "type": { @@ -57467,7 +61599,7 @@ "location": { "column": 60, "file": "", - "line": 3258 + "line": 2654 }, "name": "size_res", "type": { @@ -57512,7 +61644,7 @@ "location": { "column": 6, "file": "", - "line": 6050 + "line": 6314 }, "parameters": [], "python_name": "fs_init", @@ -57542,14 +61674,14 @@ "location": { "column": 6, "file": "", - "line": 3248 + "line": 2644 }, "parameters": [ { "location": { "column": 26, "file": "", - "line": 3248 + "line": 2644 }, "name": "letter", "type": { @@ -57590,14 +61722,14 @@ "location": { "column": 13, "file": "", - "line": 3260 + "line": 2656 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 3260 + "line": 2656 }, "name": "buf", "type": { @@ -57617,7 +61749,7 @@ "location": { "column": 52, "file": "", - "line": 3260 + "line": 2656 }, "name": "buf_size", "type": { @@ -57634,7 +61766,7 @@ "location": { "column": 73, "file": "", - "line": 3260 + "line": 2656 }, "name": "path", "type": { @@ -57681,14 +61813,14 @@ "location": { "column": 8, "file": "", - "line": 3261 + "line": 2657 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3261 + "line": 2657 }, "name": "path", "type": { @@ -57711,7 +61843,7 @@ "location": { "column": 58, "file": "", - "line": 3261 + "line": 2657 }, "name": "size", "type": { @@ -57758,14 +61890,14 @@ "location": { "column": 6, "file": "", - "line": 3250 + "line": 2646 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3250 + "line": 2646 }, "name": "path", "type": { @@ -57785,7 +61917,7 @@ "location": { "column": 63, "file": "", - "line": 3250 + "line": 2646 }, "name": "letter", "type": { @@ -57802,7 +61934,7 @@ "location": { "column": 82, "file": "", - "line": 3250 + "line": 2646 }, "name": "buf", "type": { @@ -57825,7 +61957,7 @@ "location": { "column": 98, "file": "", - "line": 3250 + "line": 2646 }, "name": "size", "type": { @@ -57842,7 +61974,7 @@ "location": { "column": 45, "file": "", - "line": 3251 + "line": 2647 }, "name": "ext", "type": { @@ -57890,7 +62022,7 @@ "location": { "column": 6, "file": "", - "line": 4947 + "line": 3410 }, "parameters": [], "python_name": "fs_memfs_init", @@ -57920,14 +62052,14 @@ "location": { "column": 13, "file": "", - "line": 3249 + "line": 2645 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3249 + "line": 2645 }, "name": "file_p", "type": { @@ -57947,7 +62079,7 @@ "location": { "column": 58, "file": "", - "line": 3249 + "line": 2645 }, "name": "path", "type": { @@ -57970,7 +62102,7 @@ "location": { "column": 79, "file": "", - "line": 3249 + "line": 2645 }, "name": "mode", "type": { @@ -58012,14 +62144,14 @@ "location": { "column": 13, "file": "", - "line": 3259 + "line": 2655 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3259 + "line": 2655 }, "name": "path", "type": { @@ -58042,7 +62174,7 @@ "location": { "column": 61, "file": "", - "line": 3259 + "line": 2655 }, "name": "size_res", "type": { @@ -58086,14 +62218,14 @@ "location": { "column": 5, "file": "", - "line": 3269 + "line": 2665 }, "parameters": [ { "location": { "column": 26, "file": "", - "line": 3269 + "line": 2665 }, "name": "buf", "type": { @@ -58113,7 +62245,7 @@ "location": { "column": 40, "file": "", - "line": 3269 + "line": 2665 }, "name": "buf_sz", "type": { @@ -58130,7 +62262,7 @@ "location": { "column": 59, "file": "", - "line": 3269 + "line": 2665 }, "name": "base", "type": { @@ -58153,7 +62285,7 @@ "location": { "column": 78, "file": "", - "line": 3269 + "line": 2665 }, "name": "end", "type": { @@ -58200,14 +62332,14 @@ "location": { "column": 13, "file": "", - "line": 3254 + "line": 2650 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3254 + "line": 2650 }, "name": "file_p", "type": { @@ -58227,7 +62359,7 @@ "location": { "column": 52, "file": "", - "line": 3254 + "line": 2650 }, "name": "buf", "type": { @@ -58247,7 +62379,7 @@ "location": { "column": 68, "file": "", - "line": 3254 + "line": 2650 }, "name": "btr", "type": { @@ -58264,7 +62396,7 @@ "location": { "column": 82, "file": "", - "line": 3254 + "line": 2650 }, "name": "br", "type": { @@ -58309,14 +62441,14 @@ "location": { "column": 6, "file": "", - "line": 3247 + "line": 2643 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 3247 + "line": 2643 }, "name": "letter", "type": { @@ -58357,14 +62489,14 @@ "location": { "column": 13, "file": "", - "line": 3256 + "line": 2652 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3256 + "line": 2652 }, "name": "file_p", "type": { @@ -58384,7 +62516,7 @@ "location": { "column": 56, "file": "", - "line": 3256 + "line": 2652 }, "name": "pos", "type": { @@ -58401,7 +62533,7 @@ "location": { "column": 76, "file": "", - "line": 3256 + "line": 2652 }, "name": "whence", "type": { @@ -58443,14 +62575,14 @@ "location": { "column": 13, "file": "", - "line": 3257 + "line": 2653 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3257 + "line": 2653 }, "name": "file_p", "type": { @@ -58470,7 +62602,7 @@ "location": { "column": 56, "file": "", - "line": 3257 + "line": 2653 }, "name": "pos", "type": { @@ -58515,14 +62647,14 @@ "location": { "column": 8, "file": "", - "line": 3267 + "line": 2663 }, "parameters": [ { "location": { "column": 22, "file": "", - "line": 3267 + "line": 2663 }, "name": "path", "type": { @@ -58569,14 +62701,14 @@ "location": { "column": 13, "file": "", - "line": 3255 + "line": 2651 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3255 + "line": 2651 }, "name": "file_p", "type": { @@ -58596,7 +62728,7 @@ "location": { "column": 59, "file": "", - "line": 3255 + "line": 2651 }, "name": "buf", "type": { @@ -58619,7 +62751,7 @@ "location": { "column": 75, "file": "", - "line": 3255 + "line": 2651 }, "name": "btw", "type": { @@ -58636,7 +62768,7 @@ "location": { "column": 89, "file": "", - "line": 3255 + "line": 2651 }, "name": "bw", "type": { @@ -58681,14 +62813,14 @@ "location": { "column": 12, "file": "", - "line": 4495 + "line": 3890 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4495 + "line": 3890 }, "name": "parent", "type": { @@ -58736,14 +62868,14 @@ "location": { "column": 9, "file": "", - "line": 4507 + "line": 3902 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4507 + "line": 3902 }, "name": "obj", "type": { @@ -58788,14 +62920,14 @@ "location": { "column": 9, "file": "", - "line": 4506 + "line": 3901 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4506 + "line": 3901 }, "name": "obj", "type": { @@ -58840,14 +62972,14 @@ "location": { "column": 9, "file": "", - "line": 4502 + "line": 3897 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4502 + "line": 3897 }, "name": "obj", "type": { @@ -58892,14 +63024,14 @@ "location": { "column": 6, "file": "", - "line": 4505 + "line": 3900 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4505 + "line": 3900 }, "name": "src", "type": { @@ -58922,7 +63054,7 @@ "location": { "column": 49, "file": "", - "line": 4505 + "line": 3900 }, "name": "w", "type": { @@ -58942,7 +63074,7 @@ "location": { "column": 63, "file": "", - "line": 4505 + "line": 3900 }, "name": "h", "type": { @@ -58987,14 +63119,14 @@ "location": { "column": 6, "file": "", - "line": 4501 + "line": 3896 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4501 + "line": 3896 }, "name": "obj", "type": { @@ -59039,14 +63171,14 @@ "location": { "column": 6, "file": "", - "line": 4499 + "line": 3894 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 4499 + "line": 3894 }, "name": "obj", "type": { @@ -59091,14 +63223,14 @@ "location": { "column": 6, "file": "", - "line": 4498 + "line": 3893 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 4498 + "line": 3893 }, "name": "obj", "type": { @@ -59143,14 +63275,14 @@ "location": { "column": 6, "file": "", - "line": 4500 + "line": 3895 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 4500 + "line": 3895 }, "name": "obj", "type": { @@ -59195,14 +63327,14 @@ "location": { "column": 6, "file": "", - "line": 4504 + "line": 3899 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4504 + "line": 3899 }, "name": "obj", "type": { @@ -59222,7 +63354,7 @@ "location": { "column": 59, "file": "", - "line": 4504 + "line": 3899 }, "name": "auto_pause", "type": { @@ -59264,14 +63396,14 @@ "location": { "column": 6, "file": "", - "line": 4496 + "line": 3891 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4496 + "line": 3891 }, "name": "obj", "type": { @@ -59291,7 +63423,7 @@ "location": { "column": 64, "file": "", - "line": 4496 + "line": 3891 }, "name": "color_format", "type": { @@ -59333,14 +63465,14 @@ "location": { "column": 6, "file": "", - "line": 4503 + "line": 3898 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4503 + "line": 3898 }, "name": "obj", "type": { @@ -59360,7 +63492,7 @@ "location": { "column": 52, "file": "", - "line": 4503 + "line": 3898 }, "name": "count", "type": { @@ -59402,14 +63534,14 @@ "location": { "column": 6, "file": "", - "line": 4497 + "line": 3892 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 4497 + "line": 3892 }, "name": "obj", "type": { @@ -59429,7 +63561,7 @@ "location": { "column": 48, "file": "", - "line": 4497 + "line": 3892 }, "name": "src", "type": { @@ -59477,7 +63609,7 @@ "location": { "column": 15, "file": "", - "line": 5512 + "line": 4905 }, "parameters": [], "policy_reason": "Returns LVGL's private process-global state, whose implementation fields are deliberately not part of the Python API.", @@ -59511,14 +63643,14 @@ "location": { "column": 6, "file": "", - "line": 1371 + "line": 1309 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1371 + "line": 1309 }, "name": "dsc", "type": { @@ -59538,7 +63670,7 @@ "location": { "column": 56, "file": "", - "line": 1371 + "line": 1309 }, "name": "center_x", "type": { @@ -59555,7 +63687,7 @@ "location": { "column": 74, "file": "", - "line": 1371 + "line": 1309 }, "name": "center_y", "type": { @@ -59572,7 +63704,7 @@ "location": { "column": 92, "file": "", - "line": 1371 + "line": 1309 }, "name": "start_angle", "type": { @@ -59589,7 +63721,7 @@ "location": { "column": 35, "file": "", - "line": 1372 + "line": 1310 }, "name": "end_angle", "type": { @@ -59606,7 +63738,7 @@ "location": { "column": 63, "file": "", - "line": 1372 + "line": 1310 }, "name": "extend", "type": { @@ -59648,14 +63780,14 @@ "location": { "column": 6, "file": "", - "line": 1364 + "line": 1302 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1364 + "line": 1302 }, "name": "dsc", "type": { @@ -59700,14 +63832,14 @@ "location": { "column": 6, "file": "", - "line": 1362 + "line": 1300 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1362 + "line": 1300 }, "name": "grad", "type": { @@ -59727,7 +63859,7 @@ "location": { "column": 64, "file": "", - "line": 1362 + "line": 1300 }, "name": "colors", "type": { @@ -59753,7 +63885,7 @@ "location": { "column": 89, "file": "", - "line": 1362 + "line": 1300 }, "name": "opa", "type": { @@ -59779,7 +63911,7 @@ "location": { "column": 39, "file": "", - "line": 1363 + "line": 1301 }, "name": "fracs", "type": { @@ -59805,7 +63937,7 @@ "location": { "column": 52, "file": "", - "line": 1363 + "line": 1301 }, "name": "num_stops", "type": { @@ -59847,14 +63979,14 @@ "location": { "column": 6, "file": "", - "line": 1366 + "line": 1304 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1366 + "line": 1304 }, "name": "dsc", "type": { @@ -59874,7 +64006,7 @@ "location": { "column": 55, "file": "", - "line": 1366 + "line": 1304 }, "name": "from_x", "type": { @@ -59891,7 +64023,7 @@ "location": { "column": 71, "file": "", - "line": 1366 + "line": 1304 }, "name": "from_y", "type": { @@ -59908,7 +64040,7 @@ "location": { "column": 87, "file": "", - "line": 1366 + "line": 1304 }, "name": "to_x", "type": { @@ -59925,7 +64057,7 @@ "location": { "column": 101, "file": "", - "line": 1366 + "line": 1304 }, "name": "to_y", "type": { @@ -59942,7 +64074,7 @@ "location": { "column": 43, "file": "", - "line": 1367 + "line": 1305 }, "name": "extend", "type": { @@ -59984,14 +64116,14 @@ "location": { "column": 6, "file": "", - "line": 1368 + "line": 1306 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1368 + "line": 1306 }, "name": "dsc", "type": { @@ -60011,7 +64143,7 @@ "location": { "column": 55, "file": "", - "line": 1368 + "line": 1306 }, "name": "center_x", "type": { @@ -60028,7 +64160,7 @@ "location": { "column": 73, "file": "", - "line": 1368 + "line": 1306 }, "name": "center_y", "type": { @@ -60045,7 +64177,7 @@ "location": { "column": 91, "file": "", - "line": 1368 + "line": 1306 }, "name": "to_x", "type": { @@ -60062,7 +64194,7 @@ "location": { "column": 105, "file": "", - "line": 1368 + "line": 1306 }, "name": "to_y", "type": { @@ -60079,7 +64211,7 @@ "location": { "column": 43, "file": "", - "line": 1369 + "line": 1307 }, "name": "extend", "type": { @@ -60121,14 +64253,14 @@ "location": { "column": 6, "file": "", - "line": 1370 + "line": 1308 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1370 + "line": 1308 }, "name": "dsc", "type": { @@ -60148,7 +64280,7 @@ "location": { "column": 60, "file": "", - "line": 1370 + "line": 1308 }, "name": "center_x", "type": { @@ -60165,7 +64297,7 @@ "location": { "column": 78, "file": "", - "line": 1370 + "line": 1308 }, "name": "center_y", "type": { @@ -60182,7 +64314,7 @@ "location": { "column": 96, "file": "", - "line": 1370 + "line": 1308 }, "name": "radius", "type": { @@ -60224,14 +64356,14 @@ "location": { "column": 6, "file": "", - "line": 1365 + "line": 1303 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1365 + "line": 1303 }, "name": "dsc", "type": { @@ -60276,14 +64408,14 @@ "location": { "column": 9, "file": "", - "line": 1426 + "line": 1365 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 1426 + "line": 1365 }, "name": "x", "type": { @@ -60324,7 +64456,7 @@ "location": { "column": 6, "file": "", - "line": 1421 + "line": 1360 }, "parameters": [], "python_name": "grid_init", @@ -60354,14 +64486,14 @@ "location": { "column": 6, "file": "", - "line": 3655 + "line": 698 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 3655 + "line": 698 }, "name": "group", "type": { @@ -60381,7 +64513,7 @@ "location": { "column": 52, "file": "", - "line": 3655 + "line": 698 }, "name": "obj", "type": { @@ -60426,14 +64558,14 @@ "location": { "column": 14, "file": "", - "line": 3677 + "line": 720 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3677 + "line": 720 }, "name": "index", "type": { @@ -60477,7 +64609,7 @@ "location": { "column": 14, "file": "", - "line": 3651 + "line": 694 }, "parameters": [], "python_name": "group_create", @@ -60510,7 +64642,7 @@ "location": { "column": 6, "file": "", - "line": 6010 + "line": 4918 }, "parameters": [], "python_name": "group_deinit", @@ -60540,14 +64672,14 @@ "location": { "column": 6, "file": "", - "line": 3652 + "line": 695 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 3652 + "line": 695 }, "name": "group", "type": { @@ -60592,14 +64724,14 @@ "location": { "column": 6, "file": "", - "line": 3662 + "line": 705 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3662 + "line": 705 }, "name": "group", "type": { @@ -60619,7 +64751,7 @@ "location": { "column": 53, "file": "", - "line": 3662 + "line": 705 }, "name": "en", "type": { @@ -60661,14 +64793,14 @@ "location": { "column": 6, "file": "", - "line": 3660 + "line": 703 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3660 + "line": 703 }, "name": "group", "type": { @@ -60713,14 +64845,14 @@ "location": { "column": 6, "file": "", - "line": 3659 + "line": 702 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 3659 + "line": 702 }, "name": "obj", "type": { @@ -60764,14 +64896,14 @@ "location": { "column": 6, "file": "", - "line": 3661 + "line": 704 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3661 + "line": 704 }, "name": "group", "type": { @@ -60816,7 +64948,7 @@ "location": { "column": 10, "file": "", - "line": 3676 + "line": 719 }, "parameters": [], "python_name": "group_get_count", @@ -60846,7 +64978,7 @@ "location": { "column": 14, "file": "", - "line": 3654 + "line": 697 }, "parameters": [], "python_name": "group_get_default", @@ -60879,14 +65011,14 @@ "location": { "column": 20, "file": "", - "line": 3671 + "line": 714 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3671 + "line": 714 }, "name": "group", "type": { @@ -60934,14 +65066,14 @@ "location": { "column": 6, "file": "", - "line": 3672 + "line": 715 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3672 + "line": 715 }, "name": "group", "type": { @@ -60989,14 +65121,14 @@ "location": { "column": 21, "file": "", - "line": 3670 + "line": 713 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 3670 + "line": 713 }, "name": "group", "type": { @@ -61044,14 +65176,14 @@ "location": { "column": 12, "file": "", - "line": 3669 + "line": 712 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3669 + "line": 712 }, "name": "group", "type": { @@ -61102,14 +65234,14 @@ "location": { "column": 12, "file": "", - "line": 3675 + "line": 718 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3675 + "line": 718 }, "name": "group", "type": { @@ -61129,7 +65261,7 @@ "location": { "column": 67, "file": "", - "line": 3675 + "line": 718 }, "name": "index", "type": { @@ -61174,14 +65306,14 @@ "location": { "column": 10, "file": "", - "line": 3674 + "line": 717 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3674 + "line": 717 }, "name": "group", "type": { @@ -61226,14 +65358,14 @@ "location": { "column": 8, "file": "", - "line": 3679 + "line": 722 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3679 + "line": 722 }, "name": "group", "type": { @@ -61284,14 +65416,14 @@ "location": { "column": 6, "file": "", - "line": 3673 + "line": 716 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3673 + "line": 716 }, "name": "group", "type": { @@ -61336,7 +65468,7 @@ "location": { "column": 6, "file": "", - "line": 6009 + "line": 4917 }, "parameters": [], "python_name": "group_init", @@ -61366,14 +65498,14 @@ "location": { "column": 6, "file": "", - "line": 3658 + "line": 701 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3658 + "line": 701 }, "name": "group", "type": { @@ -61418,14 +65550,14 @@ "location": { "column": 6, "file": "", - "line": 3657 + "line": 700 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3657 + "line": 700 }, "name": "obj", "type": { @@ -61469,14 +65601,14 @@ "location": { "column": 13, "file": "", - "line": 3663 + "line": 706 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3663 + "line": 706 }, "name": "group", "type": { @@ -61496,7 +65628,7 @@ "location": { "column": 61, "file": "", - "line": 3663 + "line": 706 }, "name": "c", "type": { @@ -61538,14 +65670,14 @@ "location": { "column": 6, "file": "", - "line": 3653 + "line": 696 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3653 + "line": 696 }, "name": "group", "type": { @@ -61590,14 +65722,14 @@ "location": { "column": 6, "file": "", - "line": 3665 + "line": 708 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3665 + "line": 708 }, "name": "group", "type": { @@ -61617,7 +65749,7 @@ "location": { "column": 66, "file": "", - "line": 3665 + "line": 708 }, "name": "edge_cb", "type": { @@ -61659,14 +65791,14 @@ "location": { "column": 6, "file": "", - "line": 3667 + "line": 710 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3667 + "line": 710 }, "name": "group", "type": { @@ -61686,7 +65818,7 @@ "location": { "column": 52, "file": "", - "line": 3667 + "line": 710 }, "name": "edit", "type": { @@ -61728,14 +65860,14 @@ "location": { "column": 6, "file": "", - "line": 3664 + "line": 707 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3664 + "line": 707 }, "name": "group", "type": { @@ -61755,7 +65887,7 @@ "location": { "column": 68, "file": "", - "line": 3664 + "line": 707 }, "name": "focus_cb", "type": { @@ -61797,14 +65929,14 @@ "location": { "column": 6, "file": "", - "line": 3666 + "line": 709 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3666 + "line": 709 }, "name": "group", "type": { @@ -61824,7 +65956,7 @@ "location": { "column": 80, "file": "", - "line": 3666 + "line": 709 }, "name": "policy", "type": { @@ -61866,14 +65998,14 @@ "location": { "column": 6, "file": "", - "line": 3678 + "line": 721 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3678 + "line": 721 }, "name": "group", "type": { @@ -61893,7 +66025,7 @@ "location": { "column": 54, "file": "", - "line": 3678 + "line": 721 }, "name": "user_data", "type": { @@ -61938,14 +66070,14 @@ "location": { "column": 6, "file": "", - "line": 3668 + "line": 711 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3668 + "line": 711 }, "name": "group", "type": { @@ -61965,7 +66097,7 @@ "location": { "column": 49, "file": "", - "line": 3668 + "line": 711 }, "name": "en", "type": { @@ -62007,14 +66139,14 @@ "location": { "column": 6, "file": "", - "line": 3656 + "line": 699 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 3656 + "line": 699 }, "name": "obj1", "type": { @@ -62034,7 +66166,7 @@ "location": { "column": 50, "file": "", - "line": 3656 + "line": 699 }, "name": "obj2", "type": { @@ -62078,14 +66210,14 @@ "location": { "column": 17, "file": "", - "line": 4140 + "line": 3508 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4140 + "line": 3508 }, "name": "obj", "type": { @@ -62105,7 +66237,7 @@ "location": { "column": 64, "file": "", - "line": 4140 + "line": 3508 }, "name": "subject", "type": { @@ -62153,14 +66285,14 @@ "location": { "column": 6, "file": "", - "line": 1056 + "line": 1133 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1056 + "line": 1133 }, "name": "dsc", "type": { @@ -62205,14 +66337,14 @@ "location": { "column": 6, "file": "", - "line": 5829 + "line": 6109 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 5829 + "line": 6109 }, "name": "res", "type": { @@ -62232,7 +66364,7 @@ "location": { "column": 65, "file": "", - "line": 5829 + "line": 6109 }, "name": "w", "type": { @@ -62249,7 +66381,7 @@ "location": { "column": 76, "file": "", - "line": 5829 + "line": 6109 }, "name": "h", "type": { @@ -62266,7 +66398,7 @@ "location": { "column": 87, "file": "", - "line": 5829 + "line": 6109 }, "name": "angle", "type": { @@ -62283,7 +66415,7 @@ "location": { "column": 49, "file": "", - "line": 5830 + "line": 6110 }, "name": "scale_x", "type": { @@ -62300,7 +66432,7 @@ "location": { "column": 67, "file": "", - "line": 5830 + "line": 6110 }, "name": "scale_y", "type": { @@ -62317,7 +66449,7 @@ "location": { "column": 93, "file": "", - "line": 5830 + "line": 6110 }, "name": "pivot", "type": { @@ -62365,14 +66497,14 @@ "location": { "column": 6, "file": "", - "line": 1055 + "line": 1131 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1055 + "line": 1131 }, "name": "dsc", "type": { @@ -62392,7 +66524,7 @@ "location": { "column": 61, "file": "", - "line": 1055 + "line": 1131 }, "name": "id", "type": { @@ -62409,7 +66541,7 @@ "location": { "column": 78, "file": "", - "line": 1055 + "line": 1131 }, "name": "c", "type": { @@ -62451,14 +66583,14 @@ "location": { "column": 6, "file": "", - "line": 5319 + "line": 2694 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 5319 + "line": 2694 }, "name": "src", "type": { @@ -62506,7 +66638,7 @@ "location": { "column": 6, "file": "", - "line": 5322 + "line": 4607 }, "parameters": [], "python_name": "cache_dump", @@ -62537,14 +66669,14 @@ "location": { "column": 13, "file": "", - "line": 5317 + "line": 4603 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 5317 + "line": 4603 }, "name": "size", "type": { @@ -62586,7 +66718,7 @@ "location": { "column": 6, "file": "", - "line": 5320 + "line": 4605 }, "parameters": [], "python_name": "cache_is_enabled", @@ -62617,7 +66749,7 @@ "location": { "column": 13, "file": "", - "line": 5321 + "line": 4606 }, "parameters": [], "python_name": "cache_iter_create", @@ -62651,14 +66783,14 @@ "location": { "column": 6, "file": "", - "line": 5318 + "line": 4604 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 5318 + "line": 4604 }, "name": "new_size", "type": { @@ -62675,7 +66807,7 @@ "location": { "column": 52, "file": "", - "line": 5318 + "line": 4604 }, "name": "evict_now", "type": { @@ -62717,14 +66849,14 @@ "location": { "column": 12, "file": "", - "line": 4109 + "line": 3477 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4109 + "line": 3477 }, "name": "parent", "type": { @@ -62772,14 +66904,14 @@ "location": { "column": 20, "file": "", - "line": 3297 + "line": 6364 }, "parameters": [ { "location": { "column": 69, "file": "", - "line": 3297 + "line": 6364 }, "name": "decoder", "type": { @@ -62799,7 +66931,7 @@ "location": { "column": 72, "file": "", - "line": 3298 + "line": 6365 }, "name": "search_key", "type": { @@ -62819,7 +66951,7 @@ "location": { "column": 70, "file": "", - "line": 3299 + "line": 6366 }, "name": "decoded", "type": { @@ -62842,7 +66974,7 @@ "location": { "column": 86, "file": "", - "line": 3299 + "line": 6366 }, "name": "user_data", "type": { @@ -62890,14 +67022,14 @@ "location": { "column": 6, "file": "", - "line": 3289 + "line": 2685 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3289 + "line": 2685 }, "name": "dsc", "type": { @@ -62942,7 +67074,7 @@ "location": { "column": 22, "file": "", - "line": 3290 + "line": 2686 }, "parameters": [], "python_name": "decoder_create", @@ -62976,7 +67108,7 @@ "location": { "column": 6, "file": "", - "line": 5878 + "line": 6363 }, "parameters": [], "python_name": "decoder_deinit", @@ -63007,14 +67139,14 @@ "location": { "column": 6, "file": "", - "line": 3291 + "line": 2687 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3291 + "line": 2687 }, "name": "decoder", "type": { @@ -63059,14 +67191,14 @@ "location": { "column": 13, "file": "", - "line": 3287 + "line": 2683 }, "parameters": [ { "location": { "column": 62, "file": "", - "line": 3287 + "line": 2683 }, "name": "dsc", "type": { @@ -63086,7 +67218,7 @@ "location": { "column": 85, "file": "", - "line": 3287 + "line": 2683 }, "name": "full_area", "type": { @@ -63109,7 +67241,7 @@ "location": { "column": 49, "file": "", - "line": 3288 + "line": 2684 }, "name": "decoded_area", "type": { @@ -63154,14 +67286,14 @@ "location": { "column": 13, "file": "", - "line": 3285 + "line": 2681 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3285 + "line": 2681 }, "name": "src", "type": { @@ -63184,7 +67316,7 @@ "location": { "column": 75, "file": "", - "line": 3285 + "line": 2681 }, "name": "header", "type": { @@ -63229,14 +67361,14 @@ "location": { "column": 22, "file": "", - "line": 3292 + "line": 2688 }, "parameters": [ { "location": { "column": 67, "file": "", - "line": 3292 + "line": 2688 }, "name": "decoder", "type": { @@ -63284,14 +67416,14 @@ "location": { "column": 6, "file": "", - "line": 5877 + "line": 6362 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 5877 + "line": 6362 }, "name": "image_cache_size", "type": { @@ -63308,7 +67440,7 @@ "location": { "column": 64, "file": "", - "line": 5877 + "line": 6362 }, "name": "image_header_count", "type": { @@ -63350,14 +67482,14 @@ "location": { "column": 13, "file": "", - "line": 3286 + "line": 2682 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3286 + "line": 2682 }, "name": "dsc", "type": { @@ -63377,7 +67509,7 @@ "location": { "column": 76, "file": "", - "line": 3286 + "line": 2682 }, "name": "src", "type": { @@ -63400,7 +67532,7 @@ "location": { "column": 113, "file": "", - "line": 3286 + "line": 2682 }, "name": "args", "type": { @@ -63448,14 +67580,14 @@ "location": { "column": 17, "file": "", - "line": 3300 + "line": 2693 }, "parameters": [ { "location": { "column": 70, "file": "", - "line": 3300 + "line": 2693 }, "name": "dsc", "type": { @@ -63475,7 +67607,7 @@ "location": { "column": 91, "file": "", - "line": 3300 + "line": 2693 }, "name": "decoded", "type": { @@ -63523,14 +67655,14 @@ "location": { "column": 6, "file": "", - "line": 3296 + "line": 2692 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 3296 + "line": 2692 }, "name": "decoder", "type": { @@ -63550,7 +67682,7 @@ "location": { "column": 93, "file": "", - "line": 3296 + "line": 2692 }, "name": "close_cb", "type": { @@ -63592,14 +67724,14 @@ "location": { "column": 6, "file": "", - "line": 3295 + "line": 2691 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3295 + "line": 2691 }, "name": "decoder", "type": { @@ -63619,9 +67751,9 @@ "location": { "column": 100, "file": "", - "line": 3295 + "line": 2691 }, - "name": "read_line_cb", + "name": "get_area_cb", "type": { "kind": "identifier", "name": "lv_image_decoder_get_area_cb_t" @@ -63661,14 +67793,14 @@ "location": { "column": 6, "file": "", - "line": 3293 + "line": 2689 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3293 + "line": 2689 }, "name": "decoder", "type": { @@ -63688,7 +67820,7 @@ "location": { "column": 91, "file": "", - "line": 3293 + "line": 2689 }, "name": "info_cb", "type": { @@ -63730,14 +67862,14 @@ "location": { "column": 6, "file": "", - "line": 3294 + "line": 2690 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3294 + "line": 2690 }, "name": "decoder", "type": { @@ -63757,7 +67889,7 @@ "location": { "column": 91, "file": "", - "line": 3294 + "line": 2690 }, "name": "open_cb", "type": { @@ -63799,14 +67931,14 @@ "location": { "column": 6, "file": "", - "line": 4137 + "line": 3505 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4137 + "line": 3505 }, "name": "obj", "type": { @@ -63851,14 +67983,14 @@ "location": { "column": 24, "file": "", - "line": 4139 + "line": 3507 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 4139 + "line": 3507 }, "name": "obj", "type": { @@ -63909,14 +68041,14 @@ "location": { "column": 17, "file": "", - "line": 4136 + "line": 3504 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4136 + "line": 3504 }, "name": "obj", "type": { @@ -63961,14 +68093,14 @@ "location": { "column": 18, "file": "", - "line": 4138 + "line": 3506 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4138 + "line": 3506 }, "name": "obj", "type": { @@ -64013,14 +68145,14 @@ "location": { "column": 9, "file": "", - "line": 4125 + "line": 3493 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4125 + "line": 3493 }, "name": "obj", "type": { @@ -64065,14 +68197,14 @@ "location": { "column": 9, "file": "", - "line": 4126 + "line": 3494 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4126 + "line": 3494 }, "name": "obj", "type": { @@ -64117,14 +68249,14 @@ "location": { "column": 6, "file": "", - "line": 4128 + "line": 3496 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4128 + "line": 3496 }, "name": "obj", "type": { @@ -64144,7 +68276,7 @@ "location": { "column": 52, "file": "", - "line": 4128 + "line": 3496 }, "name": "pivot", "type": { @@ -64189,14 +68321,14 @@ "location": { "column": 9, "file": "", - "line": 4127 + "line": 3495 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4127 + "line": 3495 }, "name": "obj", "type": { @@ -64241,14 +68373,14 @@ "location": { "column": 9, "file": "", - "line": 4129 + "line": 3497 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4129 + "line": 3497 }, "name": "obj", "type": { @@ -64293,14 +68425,14 @@ "location": { "column": 9, "file": "", - "line": 4130 + "line": 3498 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4130 + "line": 3498 }, "name": "obj", "type": { @@ -64345,14 +68477,14 @@ "location": { "column": 9, "file": "", - "line": 4131 + "line": 3499 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4131 + "line": 3499 }, "name": "obj", "type": { @@ -64397,14 +68529,14 @@ "location": { "column": 14, "file": "", - "line": 4124 + "line": 3492 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4124 + "line": 3492 }, "name": "obj", "type": { @@ -64455,14 +68587,14 @@ "location": { "column": 9, "file": "", - "line": 4133 + "line": 3501 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4133 + "line": 3501 }, "name": "obj", "type": { @@ -64507,14 +68639,14 @@ "location": { "column": 9, "file": "", - "line": 4132 + "line": 3500 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4132 + "line": 3500 }, "name": "obj", "type": { @@ -64559,14 +68691,14 @@ "location": { "column": 9, "file": "", - "line": 4135 + "line": 3503 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4135 + "line": 3503 }, "name": "obj", "type": { @@ -64611,14 +68743,14 @@ "location": { "column": 9, "file": "", - "line": 4134 + "line": 3502 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4134 + "line": 3502 }, "name": "obj", "type": { @@ -64663,14 +68795,14 @@ "location": { "column": 6, "file": "", - "line": 5313 + "line": 6503 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 5313 + "line": 6503 }, "name": "src", "type": { @@ -64718,7 +68850,7 @@ "location": { "column": 6, "file": "", - "line": 5316 + "line": 6506 }, "parameters": [], "python_name": "header_cache_dump", @@ -64749,14 +68881,14 @@ "location": { "column": 13, "file": "", - "line": 5311 + "line": 6501 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 5311 + "line": 6501 }, "name": "count", "type": { @@ -64798,7 +68930,7 @@ "location": { "column": 6, "file": "", - "line": 5314 + "line": 6504 }, "parameters": [], "python_name": "header_cache_is_enabled", @@ -64829,7 +68961,7 @@ "location": { "column": 13, "file": "", - "line": 5315 + "line": 6505 }, "parameters": [], "python_name": "header_cache_iter_create", @@ -64863,14 +68995,14 @@ "location": { "column": 6, "file": "", - "line": 5312 + "line": 6502 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 5312 + "line": 6502 }, "name": "count", "type": { @@ -64887,7 +69019,7 @@ "location": { "column": 56, "file": "", - "line": 5312 + "line": 6502 }, "name": "evict_now", "type": { @@ -64929,14 +69061,14 @@ "location": { "column": 6, "file": "", - "line": 4121 + "line": 3489 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4121 + "line": 3489 }, "name": "obj", "type": { @@ -64956,7 +69088,7 @@ "location": { "column": 50, "file": "", - "line": 4121 + "line": 3489 }, "name": "antialias", "type": { @@ -64998,14 +69130,14 @@ "location": { "column": 6, "file": "", - "line": 4123 + "line": 3491 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4123 + "line": 3491 }, "name": "obj", "type": { @@ -65025,7 +69157,7 @@ "location": { "column": 71, "file": "", - "line": 4123 + "line": 3491 }, "name": "src", "type": { @@ -65073,14 +69205,14 @@ "location": { "column": 6, "file": "", - "line": 4120 + "line": 3488 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4120 + "line": 3488 }, "name": "obj", "type": { @@ -65100,7 +69232,7 @@ "location": { "column": 62, "file": "", - "line": 4120 + "line": 3488 }, "name": "blend_mode", "type": { @@ -65142,14 +69274,14 @@ "location": { "column": 6, "file": "", - "line": 4122 + "line": 3490 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4122 + "line": 3490 }, "name": "obj", "type": { @@ -65169,7 +69301,7 @@ "location": { "column": 64, "file": "", - "line": 4122 + "line": 3490 }, "name": "align", "type": { @@ -65211,14 +69343,14 @@ "location": { "column": 6, "file": "", - "line": 4111 + "line": 3479 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4111 + "line": 3479 }, "name": "obj", "type": { @@ -65238,7 +69370,7 @@ "location": { "column": 52, "file": "", - "line": 4111 + "line": 3479 }, "name": "x", "type": { @@ -65280,14 +69412,14 @@ "location": { "column": 6, "file": "", - "line": 4112 + "line": 3480 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4112 + "line": 3480 }, "name": "obj", "type": { @@ -65307,7 +69439,7 @@ "location": { "column": 52, "file": "", - "line": 4112 + "line": 3480 }, "name": "y", "type": { @@ -65349,14 +69481,14 @@ "location": { "column": 6, "file": "", - "line": 4114 + "line": 3482 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4114 + "line": 3482 }, "name": "obj", "type": { @@ -65376,7 +69508,7 @@ "location": { "column": 49, "file": "", - "line": 4114 + "line": 3482 }, "name": "x", "type": { @@ -65393,7 +69525,7 @@ "location": { "column": 60, "file": "", - "line": 4114 + "line": 3482 }, "name": "y", "type": { @@ -65435,14 +69567,14 @@ "location": { "column": 6, "file": "", - "line": 4115 + "line": 3483 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4115 + "line": 3483 }, "name": "obj", "type": { @@ -65462,7 +69594,7 @@ "location": { "column": 51, "file": "", - "line": 4115 + "line": 3483 }, "name": "x", "type": { @@ -65504,14 +69636,14 @@ "location": { "column": 6, "file": "", - "line": 4116 + "line": 3484 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4116 + "line": 3484 }, "name": "obj", "type": { @@ -65531,7 +69663,7 @@ "location": { "column": 51, "file": "", - "line": 4116 + "line": 3484 }, "name": "y", "type": { @@ -65573,14 +69705,14 @@ "location": { "column": 6, "file": "", - "line": 4113 + "line": 3481 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4113 + "line": 3481 }, "name": "obj", "type": { @@ -65600,7 +69732,7 @@ "location": { "column": 52, "file": "", - "line": 4113 + "line": 3481 }, "name": "angle", "type": { @@ -65642,14 +69774,14 @@ "location": { "column": 6, "file": "", - "line": 4117 + "line": 3485 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4117 + "line": 3485 }, "name": "obj", "type": { @@ -65669,7 +69801,7 @@ "location": { "column": 50, "file": "", - "line": 4117 + "line": 3485 }, "name": "zoom", "type": { @@ -65711,14 +69843,14 @@ "location": { "column": 6, "file": "", - "line": 4118 + "line": 3486 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4118 + "line": 3486 }, "name": "obj", "type": { @@ -65738,7 +69870,7 @@ "location": { "column": 52, "file": "", - "line": 4118 + "line": 3486 }, "name": "zoom", "type": { @@ -65780,14 +69912,14 @@ "location": { "column": 6, "file": "", - "line": 4119 + "line": 3487 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4119 + "line": 3487 }, "name": "obj", "type": { @@ -65807,7 +69939,7 @@ "location": { "column": 52, "file": "", - "line": 4119 + "line": 3487 }, "name": "zoom", "type": { @@ -65849,14 +69981,14 @@ "location": { "column": 6, "file": "", - "line": 4110 + "line": 3478 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4110 + "line": 3478 }, "name": "obj", "type": { @@ -65876,7 +70008,7 @@ "location": { "column": 50, "file": "", - "line": 4110 + "line": 3478 }, "name": "src", "type": { @@ -65924,14 +70056,14 @@ "location": { "column": 16, "file": "", - "line": 3541 + "line": 2724 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3541 + "line": 2724 }, "name": "src", "type": { @@ -65979,14 +70111,14 @@ "location": { "column": 12, "file": "", - "line": 4518 + "line": 3913 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4518 + "line": 3913 }, "name": "parent", "type": { @@ -66034,14 +70166,14 @@ "location": { "column": 14, "file": "", - "line": 4526 + "line": 3921 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4526 + "line": 3921 }, "name": "obj", "type": { @@ -66061,7 +70193,7 @@ "location": { "column": 81, "file": "", - "line": 4526 + "line": 3921 }, "name": "state", "type": { @@ -66109,14 +70241,14 @@ "location": { "column": 14, "file": "", - "line": 4527 + "line": 3922 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4527 + "line": 3922 }, "name": "obj", "type": { @@ -66136,7 +70268,7 @@ "location": { "column": 83, "file": "", - "line": 4527 + "line": 3922 }, "name": "state", "type": { @@ -66184,14 +70316,14 @@ "location": { "column": 14, "file": "", - "line": 4528 + "line": 3923 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4528 + "line": 3923 }, "name": "obj", "type": { @@ -66211,7 +70343,7 @@ "location": { "column": 82, "file": "", - "line": 4528 + "line": 3923 }, "name": "state", "type": { @@ -66259,14 +70391,14 @@ "location": { "column": 6, "file": "", - "line": 4519 + "line": 3914 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4519 + "line": 3914 }, "name": "obj", "type": { @@ -66286,7 +70418,7 @@ "location": { "column": 68, "file": "", - "line": 4519 + "line": 3914 }, "name": "state", "type": { @@ -66303,7 +70435,7 @@ "location": { "column": 86, "file": "", - "line": 4519 + "line": 3914 }, "name": "src_left", "type": { @@ -66326,7 +70458,7 @@ "location": { "column": 40, "file": "", - "line": 4520 + "line": 3915 }, "name": "src_mid", "type": { @@ -66349,7 +70481,7 @@ "location": { "column": 40, "file": "", - "line": 4521 + "line": 3916 }, "name": "src_right", "type": { @@ -66397,14 +70529,14 @@ "location": { "column": 6, "file": "", - "line": 4522 + "line": 3917 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4522 + "line": 3917 }, "name": "obj", "type": { @@ -66424,7 +70556,7 @@ "location": { "column": 73, "file": "", - "line": 4522 + "line": 3917 }, "name": "state", "type": { @@ -66441,7 +70573,7 @@ "location": { "column": 91, "file": "", - "line": 4522 + "line": 3917 }, "name": "src_left", "type": { @@ -66489,14 +70621,14 @@ "location": { "column": 6, "file": "", - "line": 4524 + "line": 3919 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4524 + "line": 3919 }, "name": "obj", "type": { @@ -66516,7 +70648,7 @@ "location": { "column": 72, "file": "", - "line": 4524 + "line": 3919 }, "name": "state", "type": { @@ -66533,7 +70665,7 @@ "location": { "column": 90, "file": "", - "line": 4524 + "line": 3919 }, "name": "src_mid", "type": { @@ -66581,14 +70713,14 @@ "location": { "column": 6, "file": "", - "line": 4523 + "line": 3918 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4523 + "line": 3918 }, "name": "obj", "type": { @@ -66608,7 +70740,7 @@ "location": { "column": 74, "file": "", - "line": 4523 + "line": 3918 }, "name": "state", "type": { @@ -66625,7 +70757,7 @@ "location": { "column": 92, "file": "", - "line": 4523 + "line": 3918 }, "name": "src_right", "type": { @@ -66673,14 +70805,14 @@ "location": { "column": 6, "file": "", - "line": 4525 + "line": 3920 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4525 + "line": 3920 }, "name": "obj", "type": { @@ -66700,7 +70832,7 @@ "location": { "column": 70, "file": "", - "line": 4525 + "line": 3920 }, "name": "state", "type": { @@ -66742,14 +70874,14 @@ "location": { "column": 13, "file": "", - "line": 4089 + "line": 3408 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4089 + "line": 3408 }, "name": "height", "type": { @@ -66766,7 +70898,7 @@ "location": { "column": 73, "file": "", - "line": 4089 + "line": 3408 }, "name": "path_cb", "type": { @@ -66783,7 +70915,7 @@ "location": { "column": 87, "file": "", - "line": 4089 + "line": 3408 }, "name": "user_data", "type": { @@ -66830,14 +70962,14 @@ "location": { "column": 6, "file": "", - "line": 4090 + "line": 3409 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4090 + "line": 3409 }, "name": "font", "type": { @@ -66881,7 +71013,7 @@ "location": { "column": 14, "file": "", - "line": 3724 + "line": 2859 }, "parameters": [], "python_name": "indev_active", @@ -66912,16 +71044,16 @@ "c_name": "lv_indev_add_event_cb", "function_specifiers": [], "location": { - "column": 6, + "column": 18, "file": "", - "line": 3764 + "line": 2900 }, "parameters": [ { "location": { - "column": 39, + "column": 51, "file": "", - "line": 3764 + "line": 2900 }, "name": "indev", "type": { @@ -66939,9 +71071,9 @@ }, { "location": { - "column": 62, + "column": 74, "file": "", - "line": 3764 + "line": 2900 }, "name": "event_cb", "type": { @@ -66956,9 +71088,9 @@ }, { "location": { - "column": 88, + "column": 100, "file": "", - "line": 3764 + "line": 2900 }, "name": "filter", "type": { @@ -66973,9 +71105,9 @@ }, { "location": { - "column": 101, + "column": 45, "file": "", - "line": 3764 + "line": 2901 }, "name": "user_data", "type": { @@ -66994,6 +71126,61 @@ ], "python_name": "add_event_cb", "receiver": "indev_t", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_event_dsc_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "event_dsc_t" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_indev_clear_ccw", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2909 + }, + "parameters": [ + { + "location": { + "column": 36, + "file": "", + "line": 2909 + }, + "name": "indev", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_indev_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "indev_t" + } + } + ], + "python_name": "clear_ccw", + "receiver": "indev_t", "return_type": { "kind": "primitive", "name": "void" @@ -67020,7 +71207,7 @@ "location": { "column": 14, "file": "", - "line": 3718 + "line": 2853 }, "parameters": [], "python_name": "indev_create", @@ -67053,14 +71240,14 @@ "location": { "column": 6, "file": "", - "line": 3719 + "line": 2854 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 3719 + "line": 2854 }, "name": "indev", "type": { @@ -67105,14 +71292,14 @@ "location": { "column": 6, "file": "", - "line": 3723 + "line": 2858 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 3723 + "line": 2858 }, "name": "indev", "type": { @@ -67132,7 +71319,7 @@ "location": { "column": 47, "file": "", - "line": 3723 + "line": 2858 }, "name": "enable", "type": { @@ -67174,14 +71361,14 @@ "location": { "column": 12, "file": "", - "line": 5639 + "line": 6467 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 5639 + "line": 6467 }, "name": "indev", "type": { @@ -67229,14 +71416,14 @@ "location": { "column": 6, "file": "", - "line": 3992 + "line": 3301 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 3992 + "line": 3301 }, "name": "recognizer", "type": { @@ -67256,7 +71443,7 @@ "location": { "column": 102, "file": "", - "line": 3992 + "line": 3301 }, "name": "touches", "type": { @@ -67276,7 +71463,7 @@ "location": { "column": 45, "file": "", - "line": 3993 + "line": 3302 }, "name": "touch_cnt", "type": { @@ -67318,14 +71505,14 @@ "location": { "column": 6, "file": "", - "line": 3994 + "line": 3303 }, "parameters": [ { "location": { "column": 69, "file": "", - "line": 3994 + "line": 3303 }, "name": "recognizer", "type": { @@ -67345,7 +71532,7 @@ "location": { "column": 105, "file": "", - "line": 3994 + "line": 3303 }, "name": "touches", "type": { @@ -67365,7 +71552,7 @@ "location": { "column": 48, "file": "", - "line": 3995 + "line": 3304 }, "name": "touch_cnt", "type": { @@ -67407,14 +71594,14 @@ "location": { "column": 6, "file": "", - "line": 3996 + "line": 3305 }, "parameters": [ { "location": { "column": 78, "file": "", - "line": 3996 + "line": 3305 }, "name": "recognizer", "type": { @@ -67434,7 +71621,7 @@ "location": { "column": 70, "file": "", - "line": 3997 + "line": 3306 }, "name": "touches", "type": { @@ -67454,7 +71641,7 @@ "location": { "column": 57, "file": "", - "line": 3998 + "line": 3307 }, "name": "touch_cnt", "type": { @@ -67496,14 +71683,14 @@ "location": { "column": 6, "file": "", - "line": 3991 + "line": 3300 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3991 + "line": 3300 }, "name": "indev", "type": { @@ -67548,14 +71735,14 @@ "location": { "column": 6, "file": "", - "line": 4014 + "line": 3323 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 4014 + "line": 3323 }, "name": "indev", "type": { @@ -67575,7 +71762,7 @@ "location": { "column": 80, "file": "", - "line": 4014 + "line": 3323 }, "name": "data", "type": { @@ -67620,14 +71807,14 @@ "location": { "column": 6, "file": "", - "line": 4013 + "line": 3322 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4013 + "line": 3322 }, "name": "indev", "type": { @@ -67647,7 +71834,7 @@ "location": { "column": 84, "file": "", - "line": 4013 + "line": 3322 }, "name": "touches", "type": { @@ -67667,7 +71854,7 @@ "location": { "column": 104, "file": "", - "line": 4013 + "line": 3322 }, "name": "touch_cnt", "type": { @@ -67709,7 +71896,7 @@ "location": { "column": 12, "file": "", - "line": 3759 + "line": 2895 }, "parameters": [], "python_name": "indev_get_active_obj", @@ -67731,6 +71918,61 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_indev_get_ccw", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2910 + }, + "parameters": [ + { + "location": { + "column": 40, + "file": "", + "line": 2910 + }, + "name": "indev", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_indev_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "indev_t" + } + } + ], + "python_name": "get_ccw", + "receiver": "indev_t", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -67742,14 +71984,14 @@ "location": { "column": 12, "file": "", - "line": 3757 + "line": 2893 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3757 + "line": 2893 }, "name": "indev", "type": { @@ -67797,14 +72039,14 @@ "location": { "column": 16, "file": "", - "line": 3740 + "line": 2876 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3740 + "line": 2876 }, "name": "indev", "type": { @@ -67855,14 +72097,14 @@ "location": { "column": 8, "file": "", - "line": 3742 + "line": 2878 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3742 + "line": 2878 }, "name": "indev", "type": { @@ -67913,14 +72155,14 @@ "location": { "column": 10, "file": "", - "line": 3765 + "line": 2902 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3765 + "line": 2902 }, "name": "indev", "type": { @@ -67965,14 +72207,14 @@ "location": { "column": 18, "file": "", - "line": 3766 + "line": 2903 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3766 + "line": 2903 }, "name": "indev", "type": { @@ -67992,7 +72234,7 @@ "location": { "column": 70, "file": "", - "line": 3766 + "line": 2903 }, "name": "index", "type": { @@ -68037,14 +72279,14 @@ "location": { "column": 6, "file": "", - "line": 4008 + "line": 3317 }, "parameters": [ { "location": { "column": 70, "file": "", - "line": 4008 + "line": 3317 }, "name": "recognizer", "type": { @@ -68064,7 +72306,7 @@ "location": { "column": 95, "file": "", - "line": 4008 + "line": 3317 }, "name": "point", "type": { @@ -68109,14 +72351,14 @@ "location": { "column": 10, "file": "", - "line": 3751 + "line": 2887 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3751 + "line": 2887 }, "name": "indev", "type": { @@ -68164,14 +72406,14 @@ "location": { "column": 6, "file": "", - "line": 4011 + "line": 3320 }, "parameters": [ { "location": { "column": 71, "file": "", - "line": 4011 + "line": 3320 }, "name": "recognizer", "type": { @@ -68191,7 +72433,7 @@ "location": { "column": 96, "file": "", - "line": 4011 + "line": 3320 }, "name": "point", "type": { @@ -68236,14 +72478,14 @@ "location": { "column": 14, "file": "", - "line": 3739 + "line": 2875 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3739 + "line": 2875 }, "name": "indev", "type": { @@ -68294,14 +72536,14 @@ "location": { "column": 10, "file": "", - "line": 3752 + "line": 2888 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3752 + "line": 2888 }, "name": "indev", "type": { @@ -68349,14 +72591,14 @@ "location": { "column": 17, "file": "", - "line": 3762 + "line": 2898 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3762 + "line": 2898 }, "name": "indev", "type": { @@ -68401,14 +72643,14 @@ "location": { "column": 14, "file": "", - "line": 3720 + "line": 2855 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3720 + "line": 2855 }, "name": "indev", "type": { @@ -68456,14 +72698,14 @@ "location": { "column": 6, "file": "", - "line": 3750 + "line": 2886 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3750 + "line": 2886 }, "name": "indev", "type": { @@ -68486,7 +72728,7 @@ "location": { "column": 62, "file": "", - "line": 3750 + "line": 2886 }, "name": "point", "type": { @@ -68531,14 +72773,14 @@ "location": { "column": 6, "file": "", - "line": 3743 + "line": 2879 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3743 + "line": 2879 }, "name": "indev", "type": { @@ -68586,14 +72828,14 @@ "location": { "column": 20, "file": "", - "line": 3737 + "line": 2873 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3737 + "line": 2873 }, "name": "indev", "type": { @@ -68638,14 +72880,14 @@ "location": { "column": 14, "file": "", - "line": 3760 + "line": 2896 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3760 + "line": 2896 }, "name": "indev", "type": { @@ -68693,14 +72935,14 @@ "location": { "column": 10, "file": "", - "line": 3754 + "line": 2890 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3754 + "line": 2890 }, "name": "indev", "type": { @@ -68748,14 +72990,14 @@ "location": { "column": 12, "file": "", - "line": 3755 + "line": 2891 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3755 + "line": 2891 }, "name": "indev", "type": { @@ -68806,14 +73048,14 @@ "location": { "column": 9, "file": "", - "line": 3753 + "line": 2889 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3753 + "line": 2889 }, "name": "indev", "type": { @@ -68861,14 +73103,14 @@ "location": { "column": 18, "file": "", - "line": 3738 + "line": 2874 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3738 + "line": 2874 }, "name": "indev", "type": { @@ -68916,14 +73158,14 @@ "location": { "column": 17, "file": "", - "line": 3736 + "line": 2872 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3736 + "line": 2872 }, "name": "indev", "type": { @@ -68971,14 +73213,14 @@ "location": { "column": 8, "file": "", - "line": 3741 + "line": 2877 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3741 + "line": 2877 }, "name": "indev", "type": { @@ -69029,14 +73271,14 @@ "location": { "column": 6, "file": "", - "line": 3756 + "line": 2892 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3756 + "line": 2892 }, "name": "indev", "type": { @@ -69059,7 +73301,7 @@ "location": { "column": 61, "file": "", - "line": 3756 + "line": 2892 }, "name": "point", "type": { @@ -69104,14 +73346,14 @@ "location": { "column": 6, "file": "", - "line": 3721 + "line": 2856 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 3721 + "line": 2856 }, "name": "indev", "type": { @@ -69156,14 +73398,14 @@ "location": { "column": 6, "file": "", - "line": 3722 + "line": 2857 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3722 + "line": 2857 }, "name": "timer", "type": { @@ -69207,14 +73449,14 @@ "location": { "column": 6, "file": "", - "line": 4012 + "line": 3321 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 4012 + "line": 3321 }, "name": "recognizer", "type": { @@ -69259,14 +73501,14 @@ "location": { "column": 6, "file": "", - "line": 3767 + "line": 2904 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3767 + "line": 2904 }, "name": "indev", "type": { @@ -69286,7 +73528,7 @@ "location": { "column": 57, "file": "", - "line": 3767 + "line": 2904 }, "name": "index", "type": { @@ -69328,14 +73570,14 @@ "location": { "column": 10, "file": "", - "line": 3768 + "line": 2905 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 3768 + "line": 2905 }, "name": "indev", "type": { @@ -69355,7 +73597,7 @@ "location": { "column": 84, "file": "", - "line": 3768 + "line": 2905 }, "name": "event_cb", "type": { @@ -69372,7 +73614,7 @@ "location": { "column": 99, "file": "", - "line": 3768 + "line": 2905 }, "name": "user_data", "type": { @@ -69417,14 +73659,14 @@ "location": { "column": 6, "file": "", - "line": 3744 + "line": 2880 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 3744 + "line": 2880 }, "name": "indev", "type": { @@ -69444,7 +73686,7 @@ "location": { "column": 50, "file": "", - "line": 3744 + "line": 2880 }, "name": "obj", "type": { @@ -69489,14 +73731,14 @@ "location": { "column": 6, "file": "", - "line": 3746 + "line": 2882 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3746 + "line": 2882 }, "name": "indev", "type": { @@ -69541,14 +73783,14 @@ "location": { "column": 6, "file": "", - "line": 5571 + "line": 6397 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 5571 + "line": 6397 }, "name": "obj", "type": { @@ -69568,7 +73810,7 @@ "location": { "column": 63, "file": "", - "line": 5571 + "line": 6397 }, "name": "p", "type": { @@ -69612,14 +73854,14 @@ "location": { "column": 6, "file": "", - "line": 5568 + "line": 6394 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 5568 + "line": 6394 }, "name": "indev", "type": { @@ -69664,14 +73906,14 @@ "location": { "column": 6, "file": "", - "line": 5569 + "line": 6395 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 5569 + "line": 6395 }, "name": "indev", "type": { @@ -69716,14 +73958,14 @@ "location": { "column": 9, "file": "", - "line": 5570 + "line": 6396 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 5570 + "line": 6396 }, "name": "indev", "type": { @@ -69743,7 +73985,7 @@ "location": { "column": 68, "file": "", - "line": 5570 + "line": 6396 }, "name": "dir", "type": { @@ -69785,14 +74027,14 @@ "location": { "column": 12, "file": "", - "line": 3763 + "line": 2899 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3763 + "line": 2899 }, "name": "obj", "type": { @@ -69812,7 +74054,7 @@ "location": { "column": 59, "file": "", - "line": 3763 + "line": 2899 }, "name": "point", "type": { @@ -69859,14 +74101,14 @@ "location": { "column": 13, "file": "", - "line": 3769 + "line": 2906 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3769 + "line": 2906 }, "name": "indev", "type": { @@ -69886,7 +74128,7 @@ "location": { "column": 69, "file": "", - "line": 3769 + "line": 2906 }, "name": "code", "type": { @@ -69903,7 +74145,7 @@ "location": { "column": 80, "file": "", - "line": 3769 + "line": 2906 }, "name": "param", "type": { @@ -69948,14 +74190,14 @@ "location": { "column": 6, "file": "", - "line": 3749 + "line": 2885 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3749 + "line": 2885 }, "name": "indev", "type": { @@ -69975,7 +74217,7 @@ "location": { "column": 70, "file": "", - "line": 3749 + "line": 2885 }, "name": "points", "type": { @@ -70015,6 +74257,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_indev_set_ccw", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2908 + }, + "parameters": [ + { + "location": { + "column": 34, + "file": "", + "line": 2908 + }, + "name": "indev", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_indev_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "indev_t" + } + } + ], + "python_name": "set_ccw", + "receiver": "indev_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -70026,14 +74320,14 @@ "location": { "column": 6, "file": "", - "line": 3747 + "line": 2883 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3747 + "line": 2883 }, "name": "indev", "type": { @@ -70053,7 +74347,7 @@ "location": { "column": 55, "file": "", - "line": 3747 + "line": 2883 }, "name": "cur_obj", "type": { @@ -70098,14 +74392,14 @@ "location": { "column": 6, "file": "", - "line": 3729 + "line": 2864 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3729 + "line": 2864 }, "name": "indev", "type": { @@ -70125,7 +74419,7 @@ "location": { "column": 68, "file": "", - "line": 3729 + "line": 2864 }, "name": "disp", "type": { @@ -70159,6 +74453,75 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_indev_set_double_click_time", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2867 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 2867 + }, + "name": "indev", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_indev_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "indev_t" + } + }, + { + "location": { + "column": 66, + "file": "", + "line": 2867 + }, + "name": "double_click_time", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_double_click_time", + "receiver": "indev_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -70170,14 +74533,14 @@ "location": { "column": 6, "file": "", - "line": 3728 + "line": 2863 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3728 + "line": 2863 }, "name": "indev", "type": { @@ -70197,7 +74560,7 @@ "location": { "column": 56, "file": "", - "line": 3728 + "line": 2863 }, "name": "driver_data", "type": { @@ -70242,14 +74605,14 @@ "location": { "column": 6, "file": "", - "line": 4006 + "line": 3315 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4006 + "line": 3315 }, "name": "data", "type": { @@ -70269,7 +74632,7 @@ "location": { "column": 86, "file": "", - "line": 4006 + "line": 3315 }, "name": "recognizer", "type": { @@ -70289,7 +74652,7 @@ "location": { "column": 56, "file": "", - "line": 4007 + "line": 3316 }, "name": "type", "type": { @@ -70331,14 +74694,14 @@ "location": { "column": 6, "file": "", - "line": 3735 + "line": 2871 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3735 + "line": 2871 }, "name": "indev", "type": { @@ -70358,7 +74721,7 @@ "location": { "column": 68, "file": "", - "line": 3735 + "line": 2871 }, "name": "min_distance", "type": { @@ -70400,14 +74763,14 @@ "location": { "column": 6, "file": "", - "line": 3734 + "line": 2870 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3734 + "line": 2870 }, "name": "indev", "type": { @@ -70427,7 +74790,7 @@ "location": { "column": 68, "file": "", - "line": 3734 + "line": 2870 }, "name": "min_velocity", "type": { @@ -70469,14 +74832,14 @@ "location": { "column": 6, "file": "", - "line": 3748 + "line": 2884 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 3748 + "line": 2884 }, "name": "indev", "type": { @@ -70496,7 +74859,7 @@ "location": { "column": 56, "file": "", - "line": 3748 + "line": 2884 }, "name": "group", "type": { @@ -70541,14 +74904,14 @@ "location": { "column": 6, "file": "", - "line": 3770 + "line": 2907 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3770 + "line": 2907 }, "name": "indev", "type": { @@ -70568,7 +74931,7 @@ "location": { "column": 76, "file": "", - "line": 3770 + "line": 2907 }, "name": "remap_cb", "type": { @@ -70610,14 +74973,14 @@ "location": { "column": 6, "file": "", - "line": 3731 + "line": 2866 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3731 + "line": 2866 }, "name": "indev", "type": { @@ -70637,7 +75000,7 @@ "location": { "column": 71, "file": "", - "line": 3731 + "line": 2866 }, "name": "long_press_repeat_time", "type": { @@ -70679,14 +75042,14 @@ "location": { "column": 6, "file": "", - "line": 3730 + "line": 2865 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3730 + "line": 2865 }, "name": "indev", "type": { @@ -70706,7 +75069,7 @@ "location": { "column": 64, "file": "", - "line": 3730 + "line": 2865 }, "name": "long_press_time", "type": { @@ -70748,14 +75111,14 @@ "location": { "column": 6, "file": "", - "line": 3761 + "line": 2897 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3761 + "line": 2897 }, "name": "indev", "type": { @@ -70775,7 +75138,7 @@ "location": { "column": 60, "file": "", - "line": 3761 + "line": 2897 }, "name": "mode", "type": { @@ -70817,14 +75180,14 @@ "location": { "column": 6, "file": "", - "line": 4000 + "line": 3309 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4000 + "line": 3309 }, "name": "indev", "type": { @@ -70844,7 +75207,7 @@ "location": { "column": 66, "file": "", - "line": 4000 + "line": 3309 }, "name": "threshold", "type": { @@ -70886,14 +75249,14 @@ "location": { "column": 6, "file": "", - "line": 3999 + "line": 3308 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3999 + "line": 3308 }, "name": "indev", "type": { @@ -70913,7 +75276,7 @@ "location": { "column": 64, "file": "", - "line": 3999 + "line": 3308 }, "name": "threshold", "type": { @@ -70955,14 +75318,14 @@ "location": { "column": 6, "file": "", - "line": 3726 + "line": 2861 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 3726 + "line": 2861 }, "name": "indev", "type": { @@ -70982,7 +75345,7 @@ "location": { "column": 66, "file": "", - "line": 3726 + "line": 2861 }, "name": "read_cb", "type": { @@ -71024,14 +75387,14 @@ "location": { "column": 6, "file": "", - "line": 4001 + "line": 3310 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4001 + "line": 3310 }, "name": "indev", "type": { @@ -71051,7 +75414,7 @@ "location": { "column": 68, "file": "", - "line": 4001 + "line": 3310 }, "name": "threshold", "type": { @@ -71093,14 +75456,14 @@ "location": { "column": 6, "file": "", - "line": 3732 + "line": 2868 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3732 + "line": 2868 }, "name": "indev", "type": { @@ -71120,7 +75483,7 @@ "location": { "column": 60, "file": "", - "line": 3732 + "line": 2868 }, "name": "scroll_limit", "type": { @@ -71162,14 +75525,14 @@ "location": { "column": 6, "file": "", - "line": 3733 + "line": 2869 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3733 + "line": 2869 }, "name": "indev", "type": { @@ -71189,7 +75552,7 @@ "location": { "column": 60, "file": "", - "line": 3733 + "line": 2869 }, "name": "scroll_throw", "type": { @@ -71231,14 +75594,14 @@ "location": { "column": 6, "file": "", - "line": 3725 + "line": 2860 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3725 + "line": 2860 }, "name": "indev", "type": { @@ -71258,7 +75621,7 @@ "location": { "column": 60, "file": "", - "line": 3725 + "line": 2860 }, "name": "indev_type", "type": { @@ -71300,14 +75663,14 @@ "location": { "column": 6, "file": "", - "line": 3727 + "line": 2862 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3727 + "line": 2862 }, "name": "indev", "type": { @@ -71327,7 +75690,7 @@ "location": { "column": 54, "file": "", - "line": 3727 + "line": 2862 }, "name": "user_data", "type": { @@ -71372,14 +75735,14 @@ "location": { "column": 6, "file": "", - "line": 3745 + "line": 2881 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3745 + "line": 2881 }, "name": "indev", "type": { @@ -71424,14 +75787,14 @@ "location": { "column": 6, "file": "", - "line": 3758 + "line": 2894 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3758 + "line": 2894 }, "name": "indev", "type": { @@ -71476,7 +75839,7 @@ "location": { "column": 6, "file": "", - "line": 356 + "line": 723 }, "parameters": [], "python_name": "init", @@ -71506,14 +75869,14 @@ "location": { "column": 13, "file": "", - "line": 5953 + "line": 5134 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 5953 + "line": 5134 }, "name": "disp", "type": { @@ -71533,7 +75896,7 @@ "location": { "column": 62, "file": "", - "line": 5953 + "line": 5134 }, "name": "area_p", "type": { @@ -71580,7 +75943,7 @@ "location": { "column": 6, "file": "", - "line": 358 + "line": 725 }, "parameters": [], "python_name": "is_initialized", @@ -71610,14 +75973,14 @@ "location": { "column": 13, "file": "", - "line": 1073 + "line": 4504 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 1073 + "line": 4504 }, "name": "instance", "type": { @@ -71637,7 +76000,7 @@ "location": { "column": 54, "file": "", - "line": 1073 + "line": 4504 }, "name": "elem_size", "type": { @@ -71654,7 +76017,7 @@ "location": { "column": 74, "file": "", - "line": 1073 + "line": 4504 }, "name": "context_size", "type": { @@ -71671,7 +76034,7 @@ "location": { "column": 104, "file": "", - "line": 1073 + "line": 4504 }, "name": "next_cb", "type": { @@ -71715,14 +76078,14 @@ "location": { "column": 6, "file": "", - "line": 1075 + "line": 4506 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 1075 + "line": 4506 }, "name": "iter", "type": { @@ -71767,14 +76130,14 @@ "location": { "column": 8, "file": "", - "line": 1074 + "line": 4505 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1074 + "line": 4505 }, "name": "iter", "type": { @@ -71825,14 +76188,14 @@ "location": { "column": 6, "file": "", - "line": 1081 + "line": 4512 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 1081 + "line": 4512 }, "name": "iter", "type": { @@ -71852,7 +76215,7 @@ "location": { "column": 59, "file": "", - "line": 1081 + "line": 4512 }, "name": "inspect_cb", "type": { @@ -71894,14 +76257,14 @@ "location": { "column": 6, "file": "", - "line": 1077 + "line": 4508 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1077 + "line": 4508 }, "name": "iter", "type": { @@ -71921,7 +76284,7 @@ "location": { "column": 55, "file": "", - "line": 1077 + "line": 4508 }, "name": "capacity", "type": { @@ -71963,14 +76326,14 @@ "location": { "column": 13, "file": "", - "line": 1076 + "line": 4507 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 1076 + "line": 4507 }, "name": "iter", "type": { @@ -71990,7 +76353,7 @@ "location": { "column": 49, "file": "", - "line": 1076 + "line": 4507 }, "name": "elem", "type": { @@ -72035,14 +76398,14 @@ "location": { "column": 13, "file": "", - "line": 1078 + "line": 4509 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 1078 + "line": 4509 }, "name": "iter", "type": { @@ -72062,7 +76425,7 @@ "location": { "column": 49, "file": "", - "line": 1078 + "line": 4509 }, "name": "elem", "type": { @@ -72107,14 +76470,14 @@ "location": { "column": 13, "file": "", - "line": 1079 + "line": 4510 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1079 + "line": 4510 }, "name": "iter", "type": { @@ -72159,14 +76522,14 @@ "location": { "column": 13, "file": "", - "line": 1080 + "line": 4511 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1080 + "line": 4511 }, "name": "iter", "type": { @@ -72211,14 +76574,14 @@ "location": { "column": 12, "file": "", - "line": 4540 + "line": 3935 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4540 + "line": 3935 }, "name": "parent", "type": { @@ -72266,14 +76629,14 @@ "location": { "column": 6, "file": "", - "line": 4552 + "line": 3947 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4552 + "line": 3947 }, "name": "e", "type": { @@ -72318,14 +76681,14 @@ "location": { "column": 14, "file": "", - "line": 4551 + "line": 3946 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4551 + "line": 3946 }, "name": "obj", "type": { @@ -72348,7 +76711,7 @@ "location": { "column": 73, "file": "", - "line": 4551 + "line": 3946 }, "name": "btn_id", "type": { @@ -72396,14 +76759,14 @@ "location": { "column": 22, "file": "", - "line": 4549 + "line": 3944 }, "parameters": [ { "location": { "column": 63, "file": "", - "line": 4549 + "line": 3944 }, "name": "kb", "type": { @@ -72463,16 +76826,16 @@ "location": { "column": 20, "file": "", - "line": 4547 + "line": 3942 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4547 + "line": 3942 }, - "name": "kb", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -72518,14 +76881,14 @@ "location": { "column": 6, "file": "", - "line": 4548 + "line": 3943 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4548 + "line": 3943 }, "name": "obj", "type": { @@ -72573,14 +76936,14 @@ "location": { "column": 10, "file": "", - "line": 4550 + "line": 3945 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4550 + "line": 3945 }, "name": "obj", "type": { @@ -72628,16 +76991,16 @@ "location": { "column": 12, "file": "", - "line": 4546 + "line": 3941 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4546 + "line": 3941 }, - "name": "kb", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -72686,16 +77049,16 @@ "location": { "column": 6, "file": "", - "line": 4544 + "line": 3939 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4544 + "line": 3939 }, - "name": "kb", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -72711,9 +77074,9 @@ }, { "location": { - "column": 60, + "column": 61, "file": "", - "line": 4544 + "line": 3939 }, "name": "mode", "type": { @@ -72728,9 +77091,9 @@ }, { "location": { - "column": 85, + "column": 86, "file": "", - "line": 4544 + "line": 3939 }, "name": "map", "type": { @@ -72762,7 +77125,7 @@ "location": { "column": 55, "file": "", - "line": 4545 + "line": 3940 }, "name": "ctrl_map", "type": { @@ -72813,16 +77176,16 @@ "location": { "column": 6, "file": "", - "line": 4542 + "line": 3937 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4542 + "line": 3937 }, - "name": "kb", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -72838,9 +77201,9 @@ }, { "location": { - "column": 61, + "column": 62, "file": "", - "line": 4542 + "line": 3937 }, "name": "mode", "type": { @@ -72882,16 +77245,16 @@ "location": { "column": 6, "file": "", - "line": 4543 + "line": 3938 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4543 + "line": 3938 }, - "name": "kb", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -72907,9 +77270,9 @@ }, { "location": { - "column": 51, + "column": 52, "file": "", - "line": 4543 + "line": 3938 }, "name": "en", "type": { @@ -72951,16 +77314,16 @@ "location": { "column": 6, "file": "", - "line": 4541 + "line": 3936 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4541 + "line": 3936 }, - "name": "kb", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -72976,9 +77339,9 @@ }, { "location": { - "column": 55, + "column": 56, "file": "", - "line": 4541 + "line": 3936 }, "name": "ta", "type": { @@ -73023,14 +77386,14 @@ "location": { "column": 17, "file": "", - "line": 4268 + "line": 3638 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4268 + "line": 3638 }, "name": "obj", "type": { @@ -73050,7 +77413,7 @@ "location": { "column": 65, "file": "", - "line": 4268 + "line": 3638 }, "name": "subject", "type": { @@ -73070,7 +77433,7 @@ "location": { "column": 87, "file": "", - "line": 4268 + "line": 3638 }, "name": "fmt", "type": { @@ -73121,14 +77484,14 @@ "location": { "column": 12, "file": "", - "line": 4251 + "line": 3619 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4251 + "line": 3619 }, "name": "parent", "type": { @@ -73176,14 +77539,14 @@ "location": { "column": 6, "file": "", - "line": 4270 + "line": 3640 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4270 + "line": 3640 }, "name": "obj", "type": { @@ -73203,7 +77566,7 @@ "location": { "column": 49, "file": "", - "line": 4270 + "line": 3640 }, "name": "pos", "type": { @@ -73220,7 +77583,7 @@ "location": { "column": 63, "file": "", - "line": 4270 + "line": 3640 }, "name": "cnt", "type": { @@ -73262,14 +77625,14 @@ "location": { "column": 10, "file": "", - "line": 4263 + "line": 3633 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4263 + "line": 3633 }, "name": "obj", "type": { @@ -73292,7 +77655,7 @@ "location": { "column": 66, "file": "", - "line": 4263 + "line": 3633 }, "name": "pos_in", "type": { @@ -73312,7 +77675,7 @@ "location": { "column": 81, "file": "", - "line": 4263 + "line": 3633 }, "name": "bidi", "type": { @@ -73354,14 +77717,14 @@ "location": { "column": 6, "file": "", - "line": 4262 + "line": 3632 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4262 + "line": 3632 }, "name": "obj", "type": { @@ -73384,7 +77747,7 @@ "location": { "column": 61, "file": "", - "line": 4262 + "line": 3632 }, "name": "char_id", "type": { @@ -73401,7 +77764,7 @@ "location": { "column": 81, "file": "", - "line": 4262 + "line": 3632 }, "name": "pos", "type": { @@ -73446,14 +77809,14 @@ "location": { "column": 22, "file": "", - "line": 4261 + "line": 3630 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 4261 + "line": 3630 }, "name": "obj", "type": { @@ -73490,6 +77853,61 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_label_get_max_lines", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 3631 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 3631 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_max_lines", + "receiver": "label", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -73501,14 +77919,14 @@ "location": { "column": 6, "file": "", - "line": 4267 + "line": 3637 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4267 + "line": 3637 }, "name": "obj", "type": { @@ -73556,14 +77974,14 @@ "location": { "column": 8, "file": "", - "line": 4260 + "line": 3629 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4260 + "line": 3629 }, "name": "obj", "type": { @@ -73614,14 +78032,14 @@ "location": { "column": 10, "file": "", - "line": 4266 + "line": 3636 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4266 + "line": 3636 }, "name": "obj", "type": { @@ -73669,14 +78087,14 @@ "location": { "column": 10, "file": "", - "line": 4265 + "line": 3635 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 4265 + "line": 3635 }, "name": "obj", "type": { @@ -73724,14 +78142,14 @@ "location": { "column": 6, "file": "", - "line": 4269 + "line": 3639 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4269 + "line": 3639 }, "name": "obj", "type": { @@ -73751,7 +78169,7 @@ "location": { "column": 49, "file": "", - "line": 4269 + "line": 3639 }, "name": "pos", "type": { @@ -73768,7 +78186,7 @@ "location": { "column": 65, "file": "", - "line": 4269 + "line": 3639 }, "name": "txt", "type": { @@ -73816,14 +78234,14 @@ "location": { "column": 6, "file": "", - "line": 4264 + "line": 3634 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4264 + "line": 3634 }, "name": "obj", "type": { @@ -73846,7 +78264,7 @@ "location": { "column": 66, "file": "", - "line": 4264 + "line": 3634 }, "name": "pos", "type": { @@ -73891,14 +78309,14 @@ "location": { "column": 6, "file": "", - "line": 4256 + "line": 3624 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4256 + "line": 3624 }, "name": "obj", "type": { @@ -73918,7 +78336,7 @@ "location": { "column": 66, "file": "", - "line": 4256 + "line": 3624 }, "name": "long_mode", "type": { @@ -73949,6 +78367,75 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_label_set_max_lines", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3625 + }, + "parameters": [ + { + "location": { + "column": 38, + "file": "", + "line": 3625 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 53, + "file": "", + "line": 3625 + }, + "name": "lines", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_max_lines", + "receiver": "label", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -73960,14 +78447,14 @@ "location": { "column": 6, "file": "", - "line": 4259 + "line": 3628 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4259 + "line": 3628 }, "name": "obj", "type": { @@ -73987,7 +78474,7 @@ "location": { "column": 48, "file": "", - "line": 4259 + "line": 3628 }, "name": "en", "type": { @@ -74029,14 +78516,14 @@ "location": { "column": 6, "file": "", - "line": 4252 + "line": 3620 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4252 + "line": 3620 }, "name": "obj", "type": { @@ -74056,7 +78543,7 @@ "location": { "column": 51, "file": "", - "line": 4252 + "line": 3620 }, "name": "text", "type": { @@ -74104,14 +78591,14 @@ "location": { "column": 6, "file": "", - "line": 4253 + "line": 3621 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4253 + "line": 3621 }, "name": "obj", "type": { @@ -74131,7 +78618,7 @@ "location": { "column": 55, "file": "", - "line": 4253 + "line": 3621 }, "name": "fmt", "type": { @@ -74179,14 +78666,14 @@ "location": { "column": 6, "file": "", - "line": 4258 + "line": 3627 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4258 + "line": 3627 }, "name": "obj", "type": { @@ -74206,7 +78693,7 @@ "location": { "column": 63, "file": "", - "line": 4258 + "line": 3627 }, "name": "index", "type": { @@ -74248,14 +78735,14 @@ "location": { "column": 6, "file": "", - "line": 4257 + "line": 3626 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4257 + "line": 3626 }, "name": "obj", "type": { @@ -74275,7 +78762,7 @@ "location": { "column": 65, "file": "", - "line": 4257 + "line": 3626 }, "name": "index", "type": { @@ -74317,14 +78804,14 @@ "location": { "column": 6, "file": "", - "line": 4255 + "line": 3623 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4255 + "line": 3623 }, "name": "obj", "type": { @@ -74344,7 +78831,7 @@ "location": { "column": 58, "file": "", - "line": 4255 + "line": 3623 }, "name": "text", "type": { @@ -74392,14 +78879,14 @@ "location": { "column": 6, "file": "", - "line": 4254 + "line": 3622 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4254 + "line": 3622 }, "name": "obj", "type": { @@ -74419,7 +78906,7 @@ "location": { "column": 56, "file": "", - "line": 4254 + "line": 3622 }, "name": "fmt", "type": { @@ -74442,7 +78929,7 @@ "location": { "column": 71, "file": "", - "line": 4254 + "line": 3622 }, "name": "args", "type": { @@ -74484,7 +78971,7 @@ "location": { "column": 12, "file": "", - "line": 2035 + "line": 1838 }, "parameters": [], "python_name": "layer_bottom", @@ -74517,14 +79004,14 @@ "location": { "column": 6, "file": "", - "line": 3369 + "line": 2439 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 3369 + "line": 2439 }, "name": "layer", "type": { @@ -74569,14 +79056,14 @@ "location": { "column": 6, "file": "", - "line": 3370 + "line": 2440 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 3370 + "line": 2440 }, "name": "layer", "type": { @@ -74621,7 +79108,7 @@ "location": { "column": 12, "file": "", - "line": 2034 + "line": 1837 }, "parameters": [], "python_name": "layer_sys", @@ -74654,7 +79141,7 @@ "location": { "column": 12, "file": "", - "line": 2033 + "line": 1836 }, "parameters": [], "python_name": "layer_top", @@ -74687,14 +79174,14 @@ "location": { "column": 6, "file": "", - "line": 5469 + "line": 4860 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 5469 + "line": 4860 }, "name": "obj", "type": { @@ -74738,14 +79225,14 @@ "location": { "column": 10, "file": "", - "line": 1385 + "line": 1323 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1385 + "line": 1323 }, "name": "callbacks", "type": { @@ -74762,7 +79249,7 @@ "location": { "column": 65, "file": "", - "line": 1385 + "line": 1323 }, "name": "user_data", "type": { @@ -74807,7 +79294,7 @@ "location": { "column": 6, "file": "", - "line": 5467 + "line": 4858 }, "parameters": [], "python_name": "layout_deinit", @@ -74837,14 +79324,14 @@ "location": { "column": 6, "file": "", - "line": 5468 + "line": 4859 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 5468 + "line": 4859 }, "name": "obj", "type": { @@ -74864,7 +79351,7 @@ "location": { "column": 53, "file": "", - "line": 5468 + "line": 4859 }, "name": "size", "type": { @@ -74884,7 +79371,7 @@ "location": { "column": 66, "file": "", - "line": 5468 + "line": 4859 }, "name": "width", "type": { @@ -74925,7 +79412,7 @@ "location": { "column": 6, "file": "", - "line": 5466 + "line": 4857 }, "parameters": [], "python_name": "layout_init", @@ -74955,14 +79442,14 @@ "location": { "column": 10, "file": "", - "line": 1386 + "line": 1325 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1386 + "line": 1325 }, "name": "cb", "type": { @@ -74979,7 +79466,7 @@ "location": { "column": 60, "file": "", - "line": 1386 + "line": 1325 }, "name": "user_data", "type": { @@ -75023,14 +79510,14 @@ "location": { "column": 12, "file": "", - "line": 4554 + "line": 3949 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4554 + "line": 3949 }, "name": "parent", "type": { @@ -75078,14 +79565,14 @@ "location": { "column": 9, "file": "", - "line": 4560 + "line": 3955 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4560 + "line": 3955 }, "name": "obj", "type": { @@ -75133,14 +79620,14 @@ "location": { "column": 12, "file": "", - "line": 4561 + "line": 3956 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4561 + "line": 3956 }, "name": "obj", "type": { @@ -75188,14 +79675,14 @@ "location": { "column": 6, "file": "", - "line": 4558 + "line": 3953 }, "parameters": [ { "location": { "column": 26, "file": "", - "line": 4558 + "line": 3953 }, "name": "led", "type": { @@ -75240,14 +79727,14 @@ "location": { "column": 6, "file": "", - "line": 4557 + "line": 3952 }, "parameters": [ { "location": { "column": 25, "file": "", - "line": 4557 + "line": 3952 }, "name": "led", "type": { @@ -75292,16 +79779,16 @@ "location": { "column": 6, "file": "", - "line": 4556 + "line": 3951 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4556 + "line": 3951 }, - "name": "led", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -75319,7 +79806,7 @@ "location": { "column": 52, "file": "", - "line": 4556 + "line": 3951 }, "name": "bright", "type": { @@ -75361,16 +79848,16 @@ "location": { "column": 6, "file": "", - "line": 4555 + "line": 3950 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4555 + "line": 3950 }, - "name": "led", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -75388,7 +79875,7 @@ "location": { "column": 50, "file": "", - "line": 4555 + "line": 3950 }, "name": "color", "type": { @@ -75430,16 +79917,16 @@ "location": { "column": 6, "file": "", - "line": 4559 + "line": 3954 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 4559 + "line": 3954 }, - "name": "led", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -75482,14 +79969,14 @@ "location": { "column": 12, "file": "", - "line": 4563 + "line": 3958 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4563 + "line": 3958 }, "name": "parent", "type": { @@ -75537,14 +80024,14 @@ "location": { "column": 10, "file": "", - "line": 4568 + "line": 3963 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4568 + "line": 3963 }, "name": "obj", "type": { @@ -75589,14 +80076,14 @@ "location": { "column": 28, "file": "", - "line": 4567 + "line": 3962 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4567 + "line": 3962 }, "name": "obj", "type": { @@ -75647,14 +80134,14 @@ "location": { "column": 22, "file": "", - "line": 4570 + "line": 3965 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 4570 + "line": 3965 }, "name": "obj", "type": { @@ -75702,14 +80189,14 @@ "location": { "column": 6, "file": "", - "line": 4571 + "line": 3966 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4571 + "line": 3966 }, "name": "obj", "type": { @@ -75757,14 +80244,14 @@ "location": { "column": 6, "file": "", - "line": 4569 + "line": 3964 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4569 + "line": 3964 }, "name": "obj", "type": { @@ -75809,14 +80296,14 @@ "location": { "column": 6, "file": "", - "line": 4564 + "line": 3959 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4564 + "line": 3959 }, "name": "obj", "type": { @@ -75836,7 +80323,7 @@ "location": { "column": 66, "file": "", - "line": 4564 + "line": 3959 }, "name": "points", "type": { @@ -75862,7 +80349,7 @@ "location": { "column": 85, "file": "", - "line": 4564 + "line": 3959 }, "name": "point_num", "type": { @@ -75904,14 +80391,14 @@ "location": { "column": 6, "file": "", - "line": 4565 + "line": 3960 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4565 + "line": 3960 }, "name": "obj", "type": { @@ -75931,7 +80418,7 @@ "location": { "column": 68, "file": "", - "line": 4565 + "line": 3960 }, "name": "points", "type": { @@ -75954,7 +80441,7 @@ "location": { "column": 87, "file": "", - "line": 4565 + "line": 3960 }, "name": "point_num", "type": { @@ -75996,14 +80483,14 @@ "location": { "column": 6, "file": "", - "line": 4566 + "line": 3961 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4566 + "line": 3961 }, "name": "obj", "type": { @@ -76023,7 +80510,7 @@ "location": { "column": 48, "file": "", - "line": 4566 + "line": 3961 }, "name": "en", "type": { @@ -76065,14 +80552,14 @@ "location": { "column": 12, "file": "", - "line": 4577 + "line": 3975 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4577 + "line": 3975 }, "name": "list", "type": { @@ -76092,7 +80579,7 @@ "location": { "column": 59, "file": "", - "line": 4577 + "line": 3975 }, "name": "icon", "type": { @@ -76115,7 +80602,7 @@ "location": { "column": 78, "file": "", - "line": 4577 + "line": 3975 }, "name": "txt", "type": { @@ -76166,14 +80653,14 @@ "location": { "column": 12, "file": "", - "line": 4576 + "line": 3973 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4576 + "line": 3973 }, "name": "list", "type": { @@ -76193,7 +80680,7 @@ "location": { "column": 57, "file": "", - "line": 4576 + "line": 3973 }, "name": "txt", "type": { @@ -76244,14 +80731,14 @@ "location": { "column": 12, "file": "", - "line": 4575 + "line": 3971 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4575 + "line": 3971 }, "name": "parent", "type": { @@ -76299,14 +80786,14 @@ "location": { "column": 14, "file": "", - "line": 4578 + "line": 3977 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4578 + "line": 3977 }, "name": "list", "type": { @@ -76326,7 +80813,7 @@ "location": { "column": 64, "file": "", - "line": 4578 + "line": 3977 }, "name": "btn", "type": { @@ -76377,14 +80864,14 @@ "location": { "column": 6, "file": "", - "line": 4579 + "line": 3979 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4579 + "line": 3979 }, "name": "list", "type": { @@ -76404,7 +80891,7 @@ "location": { "column": 56, "file": "", - "line": 4579 + "line": 3979 }, "name": "btn", "type": { @@ -76424,7 +80911,7 @@ "location": { "column": 74, "file": "", - "line": 4579 + "line": 3979 }, "name": "txt", "type": { @@ -76472,14 +80959,14 @@ "location": { "column": 6, "file": "", - "line": 444 + "line": 3101 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 444 + "line": 3101 }, "name": "ll_ori_p", "type": { @@ -76499,7 +80986,7 @@ "location": { "column": 49, "file": "", - "line": 444 + "line": 3101 }, "name": "ll_new_p", "type": { @@ -76519,7 +81006,7 @@ "location": { "column": 66, "file": "", - "line": 444 + "line": 3101 }, "name": "node", "type": { @@ -76539,7 +81026,7 @@ "location": { "column": 79, "file": "", - "line": 444 + "line": 3101 }, "name": "head", "type": { @@ -76581,14 +81068,14 @@ "location": { "column": 6, "file": "", - "line": 443 + "line": 3100 }, "parameters": [ { "location": { "column": 26, "file": "", - "line": 443 + "line": 3100 }, "name": "ll_p", "type": { @@ -76633,14 +81120,14 @@ "location": { "column": 6, "file": "", - "line": 442 + "line": 3099 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 442 + "line": 3099 }, "name": "ll_p", "type": { @@ -76660,7 +81147,7 @@ "location": { "column": 46, "file": "", - "line": 442 + "line": 3099 }, "name": "cleanup", "type": { @@ -76672,7 +81159,7 @@ "location": { "column": 56, "file": "", - "line": 442 + "line": 3099 }, "name": null, "type": { @@ -76725,14 +81212,14 @@ "location": { "column": 8, "file": "", - "line": 445 + "line": 3102 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 445 + "line": 3102 }, "name": "ll_p", "type": { @@ -76783,14 +81270,14 @@ "location": { "column": 10, "file": "", - "line": 449 + "line": 3106 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 449 + "line": 3106 }, "name": "ll_p", "type": { @@ -76838,14 +81325,14 @@ "location": { "column": 8, "file": "", - "line": 447 + "line": 3104 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 447 + "line": 3104 }, "name": "ll_p", "type": { @@ -76868,7 +81355,7 @@ "location": { "column": 56, "file": "", - "line": 447 + "line": 3104 }, "name": "n_act", "type": { @@ -76919,14 +81406,14 @@ "location": { "column": 8, "file": "", - "line": 448 + "line": 3105 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 448 + "line": 3105 }, "name": "ll_p", "type": { @@ -76949,7 +81436,7 @@ "location": { "column": 56, "file": "", - "line": 448 + "line": 3105 }, "name": "n_act", "type": { @@ -77000,14 +81487,14 @@ "location": { "column": 8, "file": "", - "line": 446 + "line": 3103 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 446 + "line": 3103 }, "name": "ll_p", "type": { @@ -77058,14 +81545,14 @@ "location": { "column": 6, "file": "", - "line": 437 + "line": 3094 }, "parameters": [ { "location": { "column": 25, "file": "", - "line": 437 + "line": 3094 }, "name": "ll_p", "type": { @@ -77085,7 +81572,7 @@ "location": { "column": 42, "file": "", - "line": 437 + "line": 3094 }, "name": "node_size", "type": { @@ -77127,14 +81614,14 @@ "location": { "column": 8, "file": "", - "line": 438 + "line": 3095 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 438 + "line": 3095 }, "name": "ll_p", "type": { @@ -77182,14 +81669,14 @@ "location": { "column": 8, "file": "", - "line": 439 + "line": 3096 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 439 + "line": 3096 }, "name": "ll_p", "type": { @@ -77209,7 +81696,7 @@ "location": { "column": 44, "file": "", - "line": 439 + "line": 3096 }, "name": "n_act", "type": { @@ -77257,14 +81744,14 @@ "location": { "column": 8, "file": "", - "line": 440 + "line": 3097 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 440 + "line": 3097 }, "name": "ll_p", "type": { @@ -77312,14 +81799,14 @@ "location": { "column": 6, "file": "", - "line": 451 + "line": 3108 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 451 + "line": 3108 }, "name": "ll_p", "type": { @@ -77364,14 +81851,14 @@ "location": { "column": 6, "file": "", - "line": 450 + "line": 3107 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 450 + "line": 3107 }, "name": "ll_p", "type": { @@ -77391,7 +81878,7 @@ "location": { "column": 45, "file": "", - "line": 450 + "line": 3107 }, "name": "n_act", "type": { @@ -77411,7 +81898,7 @@ "location": { "column": 59, "file": "", - "line": 450 + "line": 3107 }, "name": "n_after", "type": { @@ -77456,14 +81943,14 @@ "location": { "column": 6, "file": "", - "line": 441 + "line": 3098 }, "parameters": [ { "location": { "column": 27, "file": "", - "line": 441 + "line": 3098 }, "name": "ll_p", "type": { @@ -77483,7 +81970,7 @@ "location": { "column": 40, "file": "", - "line": 441 + "line": 3098 }, "name": "node_p", "type": { @@ -77528,7 +82015,7 @@ "location": { "column": 6, "file": "", - "line": 1137 + "line": 3424 }, "parameters": [], "python_name": "lock", @@ -77558,7 +82045,7 @@ "location": { "column": 13, "file": "", - "line": 1138 + "line": 3425 }, "parameters": [], "python_name": "lock_isr", @@ -77588,7 +82075,7 @@ "location": { "column": 6, "file": "", - "line": 4949 + "line": 3418 }, "parameters": [], "python_name": "lodepng_deinit", @@ -77618,7 +82105,7 @@ "location": { "column": 6, "file": "", - "line": 4948 + "line": 3417 }, "parameters": [], "python_name": "lodepng_init", @@ -77643,21 +82130,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_malloc", + "c_name": "lv_lru_create", "function_specifiers": [], "location": { - "column": 8, + "column": 12, "file": "", - "line": 398 + "line": 6586 }, "parameters": [ { "location": { - "column": 25, + "column": 33, "file": "", - "line": 398 + "line": 6586 }, - "name": "size", + "name": "cache_size", "type": { "kind": "identifier", "name": "size_t" @@ -77667,48 +82154,14 @@ "conversion": "integer", "python_type": "int" } - } - ], - "python_name": "malloc", - "return_type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } - }, - "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_malloc_core", - "function_specifiers": [], - "location": { - "column": 8, - "file": "", - "line": 405 - }, - "parameters": [ + }, { "location": { - "column": 30, + "column": 52, "file": "", - "line": 405 + "line": 6586 }, - "name": "size", + "name": "average_length", "type": { "kind": "identifier", "name": "size_t" @@ -77718,20 +82171,54 @@ "conversion": "integer", "python_type": "int" } + }, + { + "location": { + "column": 85, + "file": "", + "line": 6586 + }, + "name": "value_free", + "type": { + "kind": "identifier", + "name": "lv_lru_free_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any], None]" + } + }, + { + "location": { + "column": 43, + "file": "", + "line": 6587 + }, + "name": "key_free", + "type": { + "kind": "identifier", + "name": "lv_lru_free_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any], None]" + } } ], - "python_name": "malloc_core", + "python_name": "lru_create", "return_type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_lru_t" } }, "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "lru_t" }, "role": "module", "static": false, @@ -77745,46 +82232,47 @@ "circuitpython", "cpython" ], - "c_name": "lv_malloc_zeroed", + "c_name": "lv_lru_delete", "function_specifiers": [], "location": { - "column": 8, + "column": 6, "file": "", - "line": 401 + "line": 6588 }, "parameters": [ { "location": { - "column": 32, + "column": 29, "file": "", - "line": 401 + "line": 6588 }, - "name": "size", + "name": "cache", "type": { - "kind": "identifier", - "name": "size_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_lru_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "lru_t" } } ], - "python_name": "malloc_zeroed", + "python_name": "delete", + "receiver": "lru_t", "return_type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "void", + "conversion": "none", + "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -77796,75 +82284,67 @@ "circuitpython", "cpython" ], - "c_name": "lv_map", + "c_name": "lv_lru_get", "function_specifiers": [], "location": { - "column": 9, + "column": 14, "file": "", - "line": 492 + "line": 6590 }, "parameters": [ { "location": { - "column": 24, - "file": "", - "line": 492 - }, - "name": "x", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 35, + "column": 34, "file": "", - "line": 492 + "line": 6590 }, - "name": "min_in", + "name": "cache", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_lru_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "lru_t" } }, { "location": { - "column": 51, + "column": 54, "file": "", - "line": 492 + "line": 6590 }, - "name": "max_in", + "name": "key", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } }, { "location": { - "column": 67, + "column": 68, "file": "", - "line": 492 + "line": 6590 }, - "name": "min_out", + "name": "key_size", "type": { "kind": "identifier", - "name": "int32_t" + "name": "size_t" }, "view": { "category": "scalar", @@ -77876,31 +82356,38 @@ "location": { "column": 84, "file": "", - "line": 492 + "line": 6590 }, - "name": "max_out", + "name": "value", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "pointer", + "conversion": "pointer", + "python_type": "Any" } } ], - "python_name": "map", + "python_name": "get", + "receiver": "lru_t", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_lru_res_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "LRU | int" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -77912,26 +82399,49 @@ "circuitpython", "cpython" ], - "c_name": "lv_mem_add_pool", + "c_name": "lv_lru_remove", "function_specifiers": [], "location": { - "column": 15, + "column": 14, "file": "", - "line": 396 + "line": 6591 }, "parameters": [ { "location": { - "column": 36, + "column": 37, "file": "", - "line": 396 + "line": 6591 }, - "name": "mem", + "name": "cache", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_lru_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "lru_t" + } + }, + { + "location": { + "column": 57, + "file": "", + "line": 6591 + }, + "name": "key", "type": { "kind": "pointer", "target": { "kind": "primitive", - "name": "void" + "name": "void", + "qualifiers": [ + "const" + ] } }, "view": { @@ -77942,11 +82452,11 @@ }, { "location": { - "column": 50, + "column": 71, "file": "", - "line": 396 + "line": 6591 }, - "name": "bytes", + "name": "key_size", "type": { "kind": "identifier", "name": "size_t" @@ -77958,77 +82468,18 @@ } } ], - "python_name": "mem_add_pool", + "python_name": "remove", + "receiver": "lru_t", "return_type": { "kind": "identifier", - "name": "lv_mem_pool_t" - }, - "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_mem_deinit", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 395 - }, - "parameters": [], - "python_name": "mem_deinit", - "return_type": { - "kind": "primitive", - "name": "void" + "name": "lv_lru_res_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_mem_init", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 394 - }, - "parameters": [], - "python_name": "mem_init", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "enum", + "conversion": "enum_int", + "python_type": "LRU | int" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -78040,37 +82491,615 @@ "circuitpython", "cpython" ], - "c_name": "lv_mem_monitor", + "c_name": "lv_lru_remove_lru_item", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 411 + "line": 6592 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 411 + "line": 6592 }, - "name": "mon_p", + "name": "cache", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_mem_monitor_t" + "name": "lv_lru_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "mem_monitor_t" + "python_type": "lru_t" } } ], - "python_name": "monitor", - "receiver": "mem_monitor_t", + "python_name": "remove_lru_item", + "receiver": "lru_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_lru_set", + "function_specifiers": [], + "location": { + "column": 14, + "file": "", + "line": 6589 + }, + "parameters": [ + { + "location": { + "column": 34, + "file": "", + "line": 6589 + }, + "name": "cache", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_lru_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "lru_t" + } + }, + { + "location": { + "column": 54, + "file": "", + "line": 6589 + }, + "name": "key", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 6589 + }, + "name": "key_length", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 85, + "file": "", + "line": 6589 + }, + "name": "value", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "location": { + "column": 101, + "file": "", + "line": 6589 + }, + "name": "value_length", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set", + "receiver": "lru_t", + "return_type": { + "kind": "identifier", + "name": "lv_lru_res_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "LRU | int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_malloc", + "function_specifiers": [], + "location": { + "column": 8, + "file": "", + "line": 812 + }, + "parameters": [ + { + "location": { + "column": 25, + "file": "", + "line": 812 + }, + "name": "size", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "malloc", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_malloc_core", + "function_specifiers": [], + "location": { + "column": 8, + "file": "", + "line": 819 + }, + "parameters": [ + { + "location": { + "column": 30, + "file": "", + "line": 819 + }, + "name": "size", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "malloc_core", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_malloc_zeroed", + "function_specifiers": [], + "location": { + "column": 8, + "file": "", + "line": 815 + }, + "parameters": [ + { + "location": { + "column": 32, + "file": "", + "line": 815 + }, + "name": "size", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "malloc_zeroed", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_map", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 368 + }, + "parameters": [ + { + "location": { + "column": 24, + "file": "", + "line": 368 + }, + "name": "x", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 35, + "file": "", + "line": 368 + }, + "name": "min_in", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 51, + "file": "", + "line": 368 + }, + "name": "max_in", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 368 + }, + "name": "min_out", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 368 + }, + "name": "max_out", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "map", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_mem_add_pool", + "function_specifiers": [], + "location": { + "column": 15, + "file": "", + "line": 810 + }, + "parameters": [ + { + "location": { + "column": 36, + "file": "", + "line": 810 + }, + "name": "mem", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "location": { + "column": 50, + "file": "", + "line": 810 + }, + "name": "bytes", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "mem_add_pool", + "return_type": { + "kind": "identifier", + "name": "lv_mem_pool_t" + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_mem_deinit", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 809 + }, + "parameters": [], + "python_name": "mem_deinit", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_mem_init", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 808 + }, + "parameters": [], + "python_name": "mem_init", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_mem_monitor", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 825 + }, + "parameters": [ + { + "location": { + "column": 38, + "file": "", + "line": 825 + }, + "name": "mon_p", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_mem_monitor_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "mem_monitor_t" + } + } + ], + "python_name": "monitor", + "receiver": "mem_monitor_t", "return_type": { "kind": "primitive", "name": "void" @@ -78097,14 +83126,14 @@ "location": { "column": 6, "file": "", - "line": 408 + "line": 822 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 408 + "line": 822 }, "name": "mon_p", "type": { @@ -78149,14 +83178,14 @@ "location": { "column": 6, "file": "", - "line": 397 + "line": 811 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 397 + "line": 811 }, "name": "pool", "type": { @@ -78197,7 +83226,7 @@ "location": { "column": 13, "file": "", - "line": 410 + "line": 824 }, "parameters": [], "python_name": "mem_test", @@ -78227,7 +83256,7 @@ "location": { "column": 13, "file": "", - "line": 409 + "line": 823 }, "parameters": [], "python_name": "mem_test_core", @@ -78257,14 +83286,14 @@ "location": { "column": 5, "file": "", - "line": 362 + "line": 998 }, "parameters": [ { "location": { "column": 26, "file": "", - "line": 362 + "line": 998 }, "name": "p1", "type": { @@ -78287,7 +83316,7 @@ "location": { "column": 43, "file": "", - "line": 362 + "line": 998 }, "name": "p2", "type": { @@ -78310,7 +83339,7 @@ "location": { "column": 56, "file": "", - "line": 362 + "line": 998 }, "name": "len", "type": { @@ -78351,14 +83380,14 @@ "location": { "column": 8, "file": "", - "line": 359 + "line": 995 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 359 + "line": 995 }, "name": "dst", "type": { @@ -78378,7 +83407,7 @@ "location": { "column": 41, "file": "", - "line": 359 + "line": 995 }, "name": "src", "type": { @@ -78401,7 +83430,7 @@ "location": { "column": 55, "file": "", - "line": 359 + "line": 995 }, "name": "len", "type": { @@ -78445,14 +83474,14 @@ "location": { "column": 8, "file": "", - "line": 361 + "line": 997 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 361 + "line": 997 }, "name": "dst", "type": { @@ -78472,7 +83501,7 @@ "location": { "column": 42, "file": "", - "line": 361 + "line": 997 }, "name": "src", "type": { @@ -78495,7 +83524,7 @@ "location": { "column": 56, "file": "", - "line": 361 + "line": 997 }, "name": "len", "type": { @@ -78539,14 +83568,14 @@ "location": { "column": 6, "file": "", - "line": 360 + "line": 996 }, "parameters": [ { "location": { "column": 21, "file": "", - "line": 360 + "line": 996 }, "name": "dst", "type": { @@ -78566,7 +83595,7 @@ "location": { "column": 36, "file": "", - "line": 360 + "line": 996 }, "name": "v", "type": { @@ -78583,7 +83612,7 @@ "location": { "column": 46, "file": "", - "line": 360 + "line": 996 }, "name": "len", "type": { @@ -78626,14 +83655,14 @@ "location": { "column": 20, "file": "", - "line": 363 + "line": 999 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 363 + "line": 999 }, "name": "dst", "type": { @@ -78653,7 +83682,7 @@ "location": { "column": 50, "file": "", - "line": 363 + "line": 999 }, "name": "len", "type": { @@ -78696,14 +83725,14 @@ "location": { "column": 6, "file": "", - "line": 4616 + "line": 4035 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4616 + "line": 4035 }, "name": "menu", "type": { @@ -78723,7 +83752,7 @@ "location": { "column": 60, "file": "", - "line": 4616 + "line": 4035 }, "name": "obj", "type": { @@ -78768,14 +83797,14 @@ "location": { "column": 6, "file": "", - "line": 4619 + "line": 4041 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4619 + "line": 4041 }, "name": "obj", "type": { @@ -78820,14 +83849,14 @@ "location": { "column": 12, "file": "", - "line": 4600 + "line": 4003 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4600 + "line": 4003 }, "name": "parent", "type": { @@ -78875,14 +83904,14 @@ "location": { "column": 12, "file": "", - "line": 4598 + "line": 3999 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4598 + "line": 3999 }, "name": "parent", "type": { @@ -78930,14 +83959,14 @@ "location": { "column": 12, "file": "", - "line": 4610 + "line": 4023 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4610 + "line": 4023 }, "name": "obj", "type": { @@ -78985,14 +84014,14 @@ "location": { "column": 12, "file": "", - "line": 4611 + "line": 4025 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4611 + "line": 4025 }, "name": "obj", "type": { @@ -79040,14 +84069,14 @@ "location": { "column": 12, "file": "", - "line": 4612 + "line": 4027 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4612 + "line": 4027 }, "name": "obj", "type": { @@ -79095,14 +84124,14 @@ "location": { "column": 12, "file": "", - "line": 4613 + "line": 4029 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 4613 + "line": 4029 }, "name": "obj", "type": { @@ -79150,14 +84179,14 @@ "location": { "column": 23, "file": "", - "line": 4617 + "line": 4037 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4617 + "line": 4037 }, "name": "obj", "type": { @@ -79202,14 +84231,14 @@ "location": { "column": 33, "file": "", - "line": 4618 + "line": 4039 }, "parameters": [ { "location": { "column": 76, "file": "", - "line": 4618 + "line": 4039 }, "name": "obj", "type": { @@ -79254,14 +84283,14 @@ "location": { "column": 12, "file": "", - "line": 4614 + "line": 4031 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4614 + "line": 4031 }, "name": "obj", "type": { @@ -79309,14 +84338,14 @@ "location": { "column": 12, "file": "", - "line": 4615 + "line": 4033 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 4615 + "line": 4033 }, "name": "obj", "type": { @@ -79364,14 +84393,14 @@ "location": { "column": 12, "file": "", - "line": 4599 + "line": 4001 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4599 + "line": 4001 }, "name": "menu", "type": { @@ -79391,7 +84420,7 @@ "location": { "column": 60, "file": "", - "line": 4599 + "line": 4001 }, "name": "title", "type": { @@ -79445,14 +84474,14 @@ "location": { "column": 12, "file": "", - "line": 4601 + "line": 4005 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4601 + "line": 4005 }, "name": "parent", "type": { @@ -79500,14 +84529,14 @@ "location": { "column": 12, "file": "", - "line": 4602 + "line": 4007 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4602 + "line": 4007 }, "name": "parent", "type": { @@ -79555,14 +84584,14 @@ "location": { "column": 6, "file": "", - "line": 4609 + "line": 4021 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4609 + "line": 4021 }, "name": "menu", "type": { @@ -79582,7 +84611,7 @@ "location": { "column": 60, "file": "", - "line": 4609 + "line": 4021 }, "name": "obj", "type": { @@ -79602,7 +84631,7 @@ "location": { "column": 76, "file": "", - "line": 4609 + "line": 4021 }, "name": "page", "type": { @@ -79647,14 +84676,14 @@ "location": { "column": 6, "file": "", - "line": 4607 + "line": 4017 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4607 + "line": 4017 }, "name": "obj", "type": { @@ -79674,7 +84703,7 @@ "location": { "column": 68, "file": "", - "line": 4607 + "line": 4017 }, "name": "mode", "type": { @@ -79716,14 +84745,14 @@ "location": { "column": 6, "file": "", - "line": 4608 + "line": 4019 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4608 + "line": 4019 }, "name": "obj", "type": { @@ -79743,7 +84772,7 @@ "location": { "column": 88, "file": "", - "line": 4608 + "line": 4019 }, "name": "mode", "type": { @@ -79785,14 +84814,14 @@ "location": { "column": 6, "file": "", - "line": 4603 + "line": 4009 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 4603 + "line": 4009 }, "name": "obj", "type": { @@ -79812,7 +84841,7 @@ "location": { "column": 48, "file": "", - "line": 4603 + "line": 4009 }, "name": "page", "type": { @@ -79857,16 +84886,16 @@ "location": { "column": 6, "file": "", - "line": 4604 + "line": 4011 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4604 + "line": 4011 }, - "name": "page", + "name": "page_obj", "type": { "kind": "pointer", "target": { @@ -79882,9 +84911,9 @@ }, { "location": { - "column": 57, + "column": 61, "file": "", - "line": 4604 + "line": 4011 }, "name": "title", "type": { @@ -79935,16 +84964,16 @@ "location": { "column": 6, "file": "", - "line": 4605 + "line": 4013 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4605 + "line": 4013 }, - "name": "page", + "name": "page_obj", "type": { "kind": "pointer", "target": { @@ -79960,9 +84989,9 @@ }, { "location": { - "column": 64, + "column": 68, "file": "", - "line": 4605 + "line": 4013 }, "name": "title", "type": { @@ -80013,14 +85042,14 @@ "location": { "column": 6, "file": "", - "line": 4606 + "line": 4015 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4606 + "line": 4015 }, "name": "obj", "type": { @@ -80040,7 +85069,7 @@ "location": { "column": 56, "file": "", - "line": 4606 + "line": 4015 }, "name": "page", "type": { @@ -80085,14 +85114,14 @@ "location": { "column": 12, "file": "", - "line": 4633 + "line": 4055 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4633 + "line": 4055 }, "name": "obj", "type": { @@ -80140,14 +85169,14 @@ "location": { "column": 12, "file": "", - "line": 4632 + "line": 4054 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4632 + "line": 4054 }, "name": "obj", "type": { @@ -80167,7 +85196,7 @@ "location": { "column": 67, "file": "", - "line": 4632 + "line": 4054 }, "name": "text", "type": { @@ -80218,14 +85247,14 @@ "location": { "column": 12, "file": "", - "line": 4629 + "line": 4051 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4629 + "line": 4051 }, "name": "obj", "type": { @@ -80245,7 +85274,7 @@ "location": { "column": 67, "file": "", - "line": 4629 + "line": 4051 }, "name": "icon", "type": { @@ -80296,14 +85325,14 @@ "location": { "column": 12, "file": "", - "line": 4630 + "line": 4052 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4630 + "line": 4052 }, "name": "obj", "type": { @@ -80323,7 +85352,7 @@ "location": { "column": 58, "file": "", - "line": 4630 + "line": 4052 }, "name": "text", "type": { @@ -80374,14 +85403,14 @@ "location": { "column": 12, "file": "", - "line": 4631 + "line": 4053 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4631 + "line": 4053 }, "name": "obj", "type": { @@ -80401,7 +85430,7 @@ "location": { "column": 62, "file": "", - "line": 4631 + "line": 4053 }, "name": "fmt", "type": { @@ -80452,14 +85481,14 @@ "location": { "column": 12, "file": "", - "line": 4628 + "line": 4050 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4628 + "line": 4050 }, "name": "obj", "type": { @@ -80479,7 +85508,7 @@ "location": { "column": 59, "file": "", - "line": 4628 + "line": 4050 }, "name": "title", "type": { @@ -80530,16 +85559,16 @@ "location": { "column": 6, "file": "", - "line": 4638 + "line": 4060 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 4638 + "line": 4060 }, - "name": "mbox", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -80582,16 +85611,16 @@ "location": { "column": 6, "file": "", - "line": 4639 + "line": 4061 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4639 + "line": 4061 }, - "name": "mbox", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -80634,14 +85663,14 @@ "location": { "column": 12, "file": "", - "line": 4627 + "line": 4049 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4627 + "line": 4049 }, "name": "parent", "type": { @@ -80689,14 +85718,14 @@ "location": { "column": 12, "file": "", - "line": 4636 + "line": 4058 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4636 + "line": 4058 }, "name": "obj", "type": { @@ -80744,14 +85773,14 @@ "location": { "column": 12, "file": "", - "line": 4635 + "line": 4057 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4635 + "line": 4057 }, "name": "obj", "type": { @@ -80799,14 +85828,14 @@ "location": { "column": 12, "file": "", - "line": 4634 + "line": 4056 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4634 + "line": 4056 }, "name": "obj", "type": { @@ -80854,14 +85883,14 @@ "location": { "column": 12, "file": "", - "line": 4637 + "line": 4059 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4637 + "line": 4059 }, "name": "obj", "type": { @@ -80911,14 +85940,14 @@ "location": { "column": 27, "file": "", - "line": 5154 + "line": 4471 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 5154 + "line": 4471 }, "name": "mutex", "type": { @@ -80966,14 +85995,14 @@ "location": { "column": 27, "file": "", - "line": 5134 + "line": 4451 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 5134 + "line": 4451 }, "name": "mutex", "type": { @@ -81021,14 +86050,14 @@ "location": { "column": 27, "file": "", - "line": 5139 + "line": 4456 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 5139 + "line": 4456 }, "name": "mutex", "type": { @@ -81076,14 +86105,14 @@ "location": { "column": 27, "file": "", - "line": 5144 + "line": 4461 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 5144 + "line": 4461 }, "name": "mutex", "type": { @@ -81131,14 +86160,14 @@ "location": { "column": 27, "file": "", - "line": 5149 + "line": 4466 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 5149 + "line": 4466 }, "name": "mutex", "type": { @@ -81173,6 +86202,170 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_add_child", + "function_specifiers": [], + "location": { + "column": 13, + "file": "", + "line": 5083 + }, + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 5083 + }, + "name": "parent", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 58, + "file": "", + "line": 5083 + }, + "name": "child", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "add_child", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_result_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_add_delete_cb", + "function_specifiers": [], + "location": { + "column": 19, + "file": "", + "line": 3080 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 3080 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 3080 + }, + "name": "cb", + "type": { + "kind": "identifier", + "name": "lv_delete_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any], None]" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 3080 + }, + "name": "user_data", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + } + ], + "python_name": "add_delete_cb", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_delete_dsc_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "delete_dsc_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -81184,14 +86377,14 @@ "location": { "column": 18, "file": "", - "line": 3780 + "line": 2920 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3780 + "line": 2920 }, "name": "obj", "type": { @@ -81211,7 +86404,7 @@ "location": { "column": 68, "file": "", - "line": 3780 + "line": 2920 }, "name": "event_cb", "type": { @@ -81228,7 +86421,7 @@ "location": { "column": 94, "file": "", - "line": 3780 + "line": 2920 }, "name": "filter", "type": { @@ -81245,7 +86438,7 @@ "location": { "column": 107, "file": "", - "line": 3780 + "line": 2920 }, "name": "user_data", "type": { @@ -81293,14 +86486,14 @@ "location": { "column": 6, "file": "", - "line": 3837 + "line": 2979 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 3837 + "line": 2979 }, "name": "obj", "type": { @@ -81320,7 +86513,7 @@ "location": { "column": 52, "file": "", - "line": 3837 + "line": 2979 }, "name": "f", "type": { @@ -81362,14 +86555,14 @@ "location": { "column": 6, "file": "", - "line": 3862 + "line": 3086 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3862 + "line": 3086 }, "name": "obj", "type": { @@ -81389,7 +86582,7 @@ "location": { "column": 69, "file": "", - "line": 3862 + "line": 3086 }, "name": "trigger", "type": { @@ -81406,7 +86599,7 @@ "location": { "column": 97, "file": "", - "line": 3862 + "line": 3086 }, "name": "at", "type": { @@ -81426,7 +86619,7 @@ "location": { "column": 112, "file": "", - "line": 3862 + "line": 3086 }, "name": "delay", "type": { @@ -81443,7 +86636,7 @@ "location": { "column": 42, "file": "", - "line": 3863 + "line": 3087 }, "name": "reverse", "type": { @@ -81485,14 +86678,14 @@ "location": { "column": 6, "file": "", - "line": 3860 + "line": 3084 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3860 + "line": 3084 }, "name": "obj", "type": { @@ -81512,7 +86705,7 @@ "location": { "column": 69, "file": "", - "line": 3860 + "line": 3084 }, "name": "trigger", "type": { @@ -81529,7 +86722,7 @@ "location": { "column": 100, "file": "", - "line": 3860 + "line": 3084 }, "name": "screen_create_cb", "type": { @@ -81546,7 +86739,7 @@ "location": { "column": 59, "file": "", - "line": 3861 + "line": 3085 }, "name": "anim_type", "type": { @@ -81563,7 +86756,7 @@ "location": { "column": 79, "file": "", - "line": 3861 + "line": 3085 }, "name": "duration", "type": { @@ -81580,7 +86773,7 @@ "location": { "column": 98, "file": "", - "line": 3861 + "line": 3085 }, "name": "delay", "type": { @@ -81622,14 +86815,14 @@ "location": { "column": 6, "file": "", - "line": 3858 + "line": 3082 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3858 + "line": 3082 }, "name": "obj", "type": { @@ -81649,7 +86842,7 @@ "location": { "column": 67, "file": "", - "line": 3858 + "line": 3082 }, "name": "trigger", "type": { @@ -81666,7 +86859,7 @@ "location": { "column": 85, "file": "", - "line": 3858 + "line": 3082 }, "name": "screen", "type": { @@ -81686,7 +86879,7 @@ "location": { "column": 57, "file": "", - "line": 3859 + "line": 3083 }, "name": "anim_type", "type": { @@ -81703,7 +86896,7 @@ "location": { "column": 77, "file": "", - "line": 3859 + "line": 3083 }, "name": "duration", "type": { @@ -81720,7 +86913,7 @@ "location": { "column": 96, "file": "", - "line": 3859 + "line": 3083 }, "name": "delay", "type": { @@ -81762,14 +86955,14 @@ "location": { "column": 6, "file": "", - "line": 3840 + "line": 3010 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 3840 + "line": 3010 }, "name": "obj", "type": { @@ -81789,7 +86982,7 @@ "location": { "column": 50, "file": "", - "line": 3840 + "line": 3010 }, "name": "state", "type": { @@ -81831,14 +87024,14 @@ "location": { "column": 6, "file": "", - "line": 2235 + "line": 2042 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 2235 + "line": 2042 }, "name": "obj", "type": { @@ -81858,7 +87051,7 @@ "location": { "column": 56, "file": "", - "line": 2235 + "line": 2042 }, "name": "style", "type": { @@ -81881,7 +87074,7 @@ "location": { "column": 85, "file": "", - "line": 2235 + "line": 2042 }, "name": "selector", "type": { @@ -81923,14 +87116,14 @@ "location": { "column": 30, "file": "", - "line": 3934 + "line": 3194 }, "parameters": [ { "location": { "column": 74, "file": "", - "line": 3934 + "line": 3194 }, "name": "obj", "type": { @@ -81950,7 +87143,7 @@ "location": { "column": 94, "file": "", - "line": 3934 + "line": 3194 }, "name": "subject", "type": { @@ -81970,7 +87163,7 @@ "location": { "column": 81, "file": "", - "line": 3935 + "line": 3195 }, "name": "trigger", "type": { @@ -81987,7 +87180,7 @@ "location": { "column": 98, "file": "", - "line": 3935 + "line": 3195 }, "name": "step", "type": { @@ -82032,14 +87225,14 @@ "location": { "column": 6, "file": "", - "line": 3941 + "line": 3201 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3941 + "line": 3201 }, "name": "obj", "type": { @@ -82059,7 +87252,7 @@ "location": { "column": 70, "file": "", - "line": 3941 + "line": 3201 }, "name": "subject", "type": { @@ -82079,7 +87272,7 @@ "location": { "column": 97, "file": "", - "line": 3941 + "line": 3201 }, "name": "trigger", "type": { @@ -82096,7 +87289,7 @@ "location": { "column": 112, "file": "", - "line": 3941 + "line": 3201 }, "name": "value", "type": { @@ -82138,14 +87331,14 @@ "location": { "column": 6, "file": "", - "line": 3940 + "line": 3200 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3940 + "line": 3200 }, "name": "obj", "type": { @@ -82165,7 +87358,7 @@ "location": { "column": 68, "file": "", - "line": 3940 + "line": 3200 }, "name": "subject", "type": { @@ -82185,7 +87378,7 @@ "location": { "column": 95, "file": "", - "line": 3940 + "line": 3200 }, "name": "trigger", "type": { @@ -82202,7 +87395,7 @@ "location": { "column": 112, "file": "", - "line": 3940 + "line": 3200 }, "name": "value", "type": { @@ -82244,14 +87437,14 @@ "location": { "column": 6, "file": "", - "line": 3942 + "line": 3202 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3942 + "line": 3202 }, "name": "obj", "type": { @@ -82271,7 +87464,7 @@ "location": { "column": 71, "file": "", - "line": 3942 + "line": 3202 }, "name": "subject", "type": { @@ -82291,7 +87484,7 @@ "location": { "column": 98, "file": "", - "line": 3942 + "line": 3202 }, "name": "trigger", "type": { @@ -82308,7 +87501,7 @@ "location": { "column": 53, "file": "", - "line": 3943 + "line": 3203 }, "name": "value", "type": { @@ -82356,14 +87549,14 @@ "location": { "column": 6, "file": "", - "line": 3939 + "line": 3199 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3939 + "line": 3199 }, "name": "obj", "type": { @@ -82383,7 +87576,7 @@ "location": { "column": 67, "file": "", - "line": 3939 + "line": 3199 }, "name": "subject", "type": { @@ -82403,7 +87596,7 @@ "location": { "column": 94, "file": "", - "line": 3939 + "line": 3199 }, "name": "trigger", "type": { @@ -82445,14 +87638,14 @@ "location": { "column": 6, "file": "", - "line": 2114 + "line": 1919 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 2114 + "line": 1919 }, "name": "obj", "type": { @@ -82472,7 +87665,7 @@ "location": { "column": 46, "file": "", - "line": 2114 + "line": 1919 }, "name": "align", "type": { @@ -82489,7 +87682,7 @@ "location": { "column": 61, "file": "", - "line": 2114 + "line": 1919 }, "name": "x_ofs", "type": { @@ -82506,7 +87699,7 @@ "location": { "column": 76, "file": "", - "line": 2114 + "line": 1919 }, "name": "y_ofs", "type": { @@ -82548,14 +87741,14 @@ "location": { "column": 6, "file": "", - "line": 2115 + "line": 1920 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 2115 + "line": 1920 }, "name": "obj", "type": { @@ -82575,7 +87768,7 @@ "location": { "column": 53, "file": "", - "line": 2115 + "line": 1920 }, "name": "base", "type": { @@ -82598,7 +87791,7 @@ "location": { "column": 72, "file": "", - "line": 2115 + "line": 1920 }, "name": "align", "type": { @@ -82615,7 +87808,7 @@ "location": { "column": 87, "file": "", - "line": 2115 + "line": 1920 }, "name": "x_ofs", "type": { @@ -82632,7 +87825,7 @@ "location": { "column": 30, "file": "", - "line": 2116 + "line": 1921 }, "name": "y_ofs", "type": { @@ -82672,16 +87865,16 @@ "c_name": "lv_obj_allocate_spec_attr", "function_specifiers": [], "location": { - "column": 6, + "column": 22, "file": "", - "line": 3852 + "line": 5082 }, "parameters": [ { "location": { - "column": 41, + "column": 57, "file": "", - "line": 3852 + "line": 5082 }, "name": "obj", "type": { @@ -82701,13 +87894,16 @@ "python_name": "allocate_spec_attr", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_spec_attr_t" + } }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "Any" }, "role": "object_method", "static": false, @@ -82726,14 +87922,14 @@ "location": { "column": 6, "file": "", - "line": 2151 + "line": 1958 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 2151 + "line": 1958 }, "name": "obj", "type": { @@ -82756,7 +87952,7 @@ "location": { "column": 61, "file": "", - "line": 2151 + "line": 1958 }, "name": "area", "type": { @@ -82796,19 +87992,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_checked", + "c_name": "lv_obj_bind_bool", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3958 + "line": 3204 }, "parameters": [ { "location": { - "column": 46, + "column": 43, "file": "", - "line": 3958 + "line": 3204 }, "name": "obj", "type": { @@ -82826,9 +88022,9 @@ }, { "location": { - "column": 66, + "column": 63, "file": "", - "line": 3958 + "line": 3204 }, "name": "subject", "type": { @@ -82843,9 +88039,26 @@ "conversion": "struct_pointer", "python_type": "subject_t" } + }, + { + "location": { + "column": 92, + "file": "", + "line": 3204 + }, + "name": "set_bool_cb", + "type": { + "kind": "identifier", + "name": "lv_obj_set_bool_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, int], None]" + } } ], - "python_name": "bind_checked", + "python_name": "bind_bool", "receiver": "obj", "return_type": { "kind": "pointer", @@ -82871,19 +88084,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_flag_if_eq", + "c_name": "lv_obj_bind_checked", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3944 + "line": 3236 }, "parameters": [ { "location": { - "column": 49, + "column": 46, "file": "", - "line": 3944 + "line": 3236 }, "name": "obj", "type": { @@ -82901,9 +88114,9 @@ }, { "location": { - "column": 69, + "column": 66, "file": "", - "line": 3944 + "line": 3236 }, "name": "subject", "type": { @@ -82918,43 +88131,101 @@ "conversion": "struct_pointer", "python_type": "subject_t" } + } + ], + "python_name": "bind_checked", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_bind_color", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 3208 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 3208 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } }, { "location": { - "column": 94, + "column": 64, "file": "", - "line": 3944 + "line": 3208 }, - "name": "flag", + "name": "subject", "type": { - "kind": "identifier", - "name": "lv_obj_flag_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "OBJ_FLAG | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" } }, { "location": { - "column": 108, + "column": 94, "file": "", - "line": 3944 + "line": 3208 }, - "name": "ref_value", + "name": "set_color_cb", "type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_obj_set_color_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, color_t], None]" } } ], - "python_name": "bind_flag_if_eq", + "python_name": "bind_color", "receiver": "obj", "return_type": { "kind": "pointer", @@ -82980,19 +88251,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_flag_if_ge", + "c_name": "lv_obj_bind_flag_if_eq", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3948 + "line": 3211 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3948 + "line": 3211 }, "name": "obj", "type": { @@ -83012,7 +88283,7 @@ "location": { "column": 69, "file": "", - "line": 3948 + "line": 3211 }, "name": "subject", "type": { @@ -83032,7 +88303,7 @@ "location": { "column": 94, "file": "", - "line": 3948 + "line": 3211 }, "name": "flag", "type": { @@ -83049,7 +88320,7 @@ "location": { "column": 108, "file": "", - "line": 3948 + "line": 3211 }, "name": "ref_value", "type": { @@ -83063,7 +88334,7 @@ } } ], - "python_name": "bind_flag_if_ge", + "python_name": "bind_flag_if_eq", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83089,19 +88360,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_flag_if_gt", + "c_name": "lv_obj_bind_flag_if_ge", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3947 + "line": 3218 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3947 + "line": 3218 }, "name": "obj", "type": { @@ -83121,7 +88392,7 @@ "location": { "column": 69, "file": "", - "line": 3947 + "line": 3218 }, "name": "subject", "type": { @@ -83141,7 +88412,7 @@ "location": { "column": 94, "file": "", - "line": 3947 + "line": 3218 }, "name": "flag", "type": { @@ -83158,7 +88429,7 @@ "location": { "column": 108, "file": "", - "line": 3947 + "line": 3218 }, "name": "ref_value", "type": { @@ -83172,7 +88443,7 @@ } } ], - "python_name": "bind_flag_if_gt", + "python_name": "bind_flag_if_ge", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83198,19 +88469,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_flag_if_le", + "c_name": "lv_obj_bind_flag_if_gt", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3950 + "line": 3216 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3950 + "line": 3216 }, "name": "obj", "type": { @@ -83230,7 +88501,7 @@ "location": { "column": 69, "file": "", - "line": 3950 + "line": 3216 }, "name": "subject", "type": { @@ -83250,7 +88521,7 @@ "location": { "column": 94, "file": "", - "line": 3950 + "line": 3216 }, "name": "flag", "type": { @@ -83267,7 +88538,7 @@ "location": { "column": 108, "file": "", - "line": 3950 + "line": 3216 }, "name": "ref_value", "type": { @@ -83281,7 +88552,7 @@ } } ], - "python_name": "bind_flag_if_le", + "python_name": "bind_flag_if_gt", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83307,19 +88578,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_flag_if_lt", + "c_name": "lv_obj_bind_flag_if_le", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3949 + "line": 3222 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3949 + "line": 3222 }, "name": "obj", "type": { @@ -83339,7 +88610,7 @@ "location": { "column": 69, "file": "", - "line": 3949 + "line": 3222 }, "name": "subject", "type": { @@ -83359,7 +88630,7 @@ "location": { "column": 94, "file": "", - "line": 3949 + "line": 3222 }, "name": "flag", "type": { @@ -83376,7 +88647,7 @@ "location": { "column": 108, "file": "", - "line": 3949 + "line": 3222 }, "name": "ref_value", "type": { @@ -83390,7 +88661,7 @@ } } ], - "python_name": "bind_flag_if_lt", + "python_name": "bind_flag_if_le", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83416,19 +88687,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_flag_if_not_eq", + "c_name": "lv_obj_bind_flag_if_lt", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3945 + "line": 3220 }, "parameters": [ { "location": { - "column": 53, + "column": 49, "file": "", - "line": 3945 + "line": 3220 }, "name": "obj", "type": { @@ -83446,9 +88717,9 @@ }, { "location": { - "column": 73, + "column": 69, "file": "", - "line": 3945 + "line": 3220 }, "name": "subject", "type": { @@ -83466,9 +88737,9 @@ }, { "location": { - "column": 98, + "column": 94, "file": "", - "line": 3945 + "line": 3220 }, "name": "flag", "type": { @@ -83483,9 +88754,9 @@ }, { "location": { - "column": 52, + "column": 108, "file": "", - "line": 3946 + "line": 3220 }, "name": "ref_value", "type": { @@ -83499,7 +88770,7 @@ } } ], - "python_name": "bind_flag_if_not_eq", + "python_name": "bind_flag_if_lt", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83525,19 +88796,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_state_if_eq", + "c_name": "lv_obj_bind_flag_if_not_eq", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3951 + "line": 3213 }, "parameters": [ { "location": { - "column": 50, + "column": 53, "file": "", - "line": 3951 + "line": 3213 }, "name": "obj", "type": { @@ -83555,9 +88826,9 @@ }, { "location": { - "column": 70, + "column": 73, "file": "", - "line": 3951 + "line": 3213 }, "name": "subject", "type": { @@ -83575,26 +88846,26 @@ }, { "location": { - "column": 92, + "column": 98, "file": "", - "line": 3951 + "line": 3213 }, - "name": "state", + "name": "flag", "type": { "kind": "identifier", - "name": "lv_state_t" + "name": "lv_obj_flag_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "STATE | int" + "python_type": "OBJ_FLAG | int" } }, { "location": { - "column": 107, + "column": 52, "file": "", - "line": 3951 + "line": 3214 }, "name": "ref_value", "type": { @@ -83608,7 +88879,7 @@ } } ], - "python_name": "bind_state_if_eq", + "python_name": "bind_flag_if_not_eq", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83634,19 +88905,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_state_if_ge", + "c_name": "lv_obj_bind_float", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3955 + "line": 3206 }, "parameters": [ { "location": { - "column": 50, + "column": 44, "file": "", - "line": 3955 + "line": 3206 }, "name": "obj", "type": { @@ -83664,9 +88935,9 @@ }, { "location": { - "column": 70, + "column": 64, "file": "", - "line": 3955 + "line": 3206 }, "name": "subject", "type": { @@ -83684,40 +88955,115 @@ }, { "location": { - "column": 92, + "column": 94, "file": "", - "line": 3955 + "line": 3206 }, - "name": "state", + "name": "set_float_cb", "type": { "kind": "identifier", - "name": "lv_state_t" + "name": "lv_obj_set_float_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "STATE | int" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, float], None]" + } + } + ], + "python_name": "bind_float", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_bind_int", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 3205 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 3205 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 107, + "column": 62, "file": "", - "line": 3955 + "line": 3205 }, - "name": "ref_value", + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 3205 + }, + "name": "set_int_cb", "type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_obj_set_int_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, int], None]" } } ], - "python_name": "bind_state_if_ge", + "python_name": "bind_int", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83743,19 +89089,111 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_state_if_gt", + "c_name": "lv_obj_bind_pointer", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3954 + "line": 3209 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 3209 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 66, + "file": "", + "line": 3209 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 98, + "file": "", + "line": 3209 + }, + "name": "set_pointer_cb", + "type": { + "kind": "identifier", + "name": "lv_obj_set_pointer_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, Any], None]" + } + } + ], + "python_name": "bind_pointer", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_bind_state_if_eq", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 3224 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3954 + "line": 3224 }, "name": "obj", "type": { @@ -83775,7 +89213,7 @@ "location": { "column": 70, "file": "", - "line": 3954 + "line": 3224 }, "name": "subject", "type": { @@ -83795,7 +89233,7 @@ "location": { "column": 92, "file": "", - "line": 3954 + "line": 3224 }, "name": "state", "type": { @@ -83812,7 +89250,7 @@ "location": { "column": 107, "file": "", - "line": 3954 + "line": 3224 }, "name": "ref_value", "type": { @@ -83826,7 +89264,7 @@ } } ], - "python_name": "bind_state_if_gt", + "python_name": "bind_state_if_eq", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83852,19 +89290,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_state_if_le", + "c_name": "lv_obj_bind_state_if_ge", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3957 + "line": 3231 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3957 + "line": 3231 }, "name": "obj", "type": { @@ -83884,7 +89322,7 @@ "location": { "column": 70, "file": "", - "line": 3957 + "line": 3231 }, "name": "subject", "type": { @@ -83904,7 +89342,7 @@ "location": { "column": 92, "file": "", - "line": 3957 + "line": 3231 }, "name": "state", "type": { @@ -83921,7 +89359,7 @@ "location": { "column": 107, "file": "", - "line": 3957 + "line": 3231 }, "name": "ref_value", "type": { @@ -83935,7 +89373,7 @@ } } ], - "python_name": "bind_state_if_le", + "python_name": "bind_state_if_ge", "receiver": "obj", "return_type": { "kind": "pointer", @@ -83961,19 +89399,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_state_if_lt", + "c_name": "lv_obj_bind_state_if_gt", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3956 + "line": 3229 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3956 + "line": 3229 }, "name": "obj", "type": { @@ -83993,7 +89431,7 @@ "location": { "column": 70, "file": "", - "line": 3956 + "line": 3229 }, "name": "subject", "type": { @@ -84013,7 +89451,7 @@ "location": { "column": 92, "file": "", - "line": 3956 + "line": 3229 }, "name": "state", "type": { @@ -84030,7 +89468,7 @@ "location": { "column": 107, "file": "", - "line": 3956 + "line": 3229 }, "name": "ref_value", "type": { @@ -84044,7 +89482,7 @@ } } ], - "python_name": "bind_state_if_lt", + "python_name": "bind_state_if_gt", "receiver": "obj", "return_type": { "kind": "pointer", @@ -84070,19 +89508,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_state_if_not_eq", + "c_name": "lv_obj_bind_state_if_le", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3952 + "line": 3235 }, "parameters": [ { "location": { - "column": 54, + "column": 50, "file": "", - "line": 3952 + "line": 3235 }, "name": "obj", "type": { @@ -84100,9 +89538,9 @@ }, { "location": { - "column": 74, + "column": 70, "file": "", - "line": 3952 + "line": 3235 }, "name": "subject", "type": { @@ -84120,9 +89558,9 @@ }, { "location": { - "column": 96, + "column": 92, "file": "", - "line": 3952 + "line": 3235 }, "name": "state", "type": { @@ -84137,9 +89575,9 @@ }, { "location": { - "column": 53, + "column": 107, "file": "", - "line": 3953 + "line": 3235 }, "name": "ref_value", "type": { @@ -84153,7 +89591,7 @@ } } ], - "python_name": "bind_state_if_not_eq", + "python_name": "bind_state_if_le", "receiver": "obj", "return_type": { "kind": "pointer", @@ -84179,19 +89617,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_bind_style", + "c_name": "lv_obj_bind_state_if_lt", "function_specifiers": [], "location": { "column": 17, "file": "", - "line": 3185 + "line": 3233 }, "parameters": [ { "location": { - "column": 44, + "column": 50, "file": "", - "line": 3185 + "line": 3233 }, "name": "obj", "type": { @@ -84209,69 +89647,46 @@ }, { "location": { - "column": 68, + "column": 70, "file": "", - "line": 3185 + "line": 3233 }, - "name": "style", + "name": "subject", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_style_t", - "qualifiers": [ - "const" - ] + "name": "lv_subject_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "style_t" + "python_type": "subject_t" } }, { "location": { - "column": 97, + "column": 92, "file": "", - "line": 3185 + "line": 3233 }, - "name": "selector", + "name": "state", "type": { "kind": "identifier", - "name": "lv_style_selector_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 48, - "file": "", - "line": 3186 - }, - "name": "subject", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_subject_t" - } + "name": "lv_state_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "subject_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "STATE | int" } }, { "location": { - "column": 67, + "column": 107, "file": "", - "line": 3186 + "line": 3233 }, "name": "ref_value", "type": { @@ -84285,7 +89700,340 @@ } } ], - "python_name": "bind_style", + "python_name": "bind_state_if_lt", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_bind_state_if_not_eq", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 3226 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 3226 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 74, + "file": "", + "line": 3226 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 3226 + }, + "name": "state", + "type": { + "kind": "identifier", + "name": "lv_state_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "STATE | int" + } + }, + { + "location": { + "column": 53, + "file": "", + "line": 3227 + }, + "name": "ref_value", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "bind_state_if_not_eq", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_bind_string", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 3207 + }, + "parameters": [ + { + "location": { + "column": 45, + "file": "", + "line": 3207 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 65, + "file": "", + "line": 3207 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 3207 + }, + "name": "set_string_cb", + "type": { + "kind": "identifier", + "name": "lv_obj_set_string_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, str], None]" + } + } + ], + "python_name": "bind_string", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_bind_style", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2364 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 2364 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 2364 + }, + "name": "style", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 2364 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 48, + "file": "", + "line": 2365 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 2365 + }, + "name": "ref_value", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "bind_style", "receiver": "obj", "return_type": { "kind": "pointer", @@ -84316,14 +90064,14 @@ "location": { "column": 17, "file": "", - "line": 3187 + "line": 2366 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3187 + "line": 2366 }, "name": "obj", "type": { @@ -84343,7 +90091,7 @@ "location": { "column": 72, "file": "", - "line": 3187 + "line": 2366 }, "name": "prop", "type": { @@ -84360,7 +90108,7 @@ "location": { "column": 98, "file": "", - "line": 3187 + "line": 2366 }, "name": "selector", "type": { @@ -84377,7 +90125,7 @@ "location": { "column": 53, "file": "", - "line": 3188 + "line": 2367 }, "name": "subject", "type": { @@ -84425,14 +90173,14 @@ "location": { "column": 9, "file": "", - "line": 2159 + "line": 1966 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 2159 + "line": 1966 }, "name": "obj", "type": { @@ -84452,7 +90200,7 @@ "location": { "column": 68, "file": "", - "line": 2159 + "line": 1966 }, "name": "prop", "type": { @@ -84494,14 +90242,14 @@ "location": { "column": 9, "file": "", - "line": 2158 + "line": 1965 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 2158 + "line": 1965 }, "name": "obj", "type": { @@ -84521,7 +90269,7 @@ "location": { "column": 67, "file": "", - "line": 2158 + "line": 1965 }, "name": "prop", "type": { @@ -84563,14 +90311,14 @@ "location": { "column": 9, "file": "", - "line": 3610 + "line": 2794 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3610 + "line": 2794 }, "name": "obj", "type": { @@ -84590,7 +90338,7 @@ "location": { "column": 66, "file": "", - "line": 3610 + "line": 2794 }, "name": "part", "type": { @@ -84632,14 +90380,14 @@ "location": { "column": 17, "file": "", - "line": 3171 + "line": 2358 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 3171 + "line": 2358 }, "name": "obj", "type": { @@ -84662,7 +90410,7 @@ "location": { "column": 83, "file": "", - "line": 3171 + "line": 2358 }, "name": "part", "type": { @@ -84679,7 +90427,7 @@ "location": { "column": 100, "file": "", - "line": 3171 + "line": 2358 }, "name": "txt", "type": { @@ -84716,6 +90464,105 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_calculate_style_text_align_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5985 + }, + "parameters": [ + { + "location": { + "column": 89, + "file": "", + "line": 5985 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 106, + "file": "", + "line": 5985 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + }, + { + "location": { + "column": 85, + "file": "", + "line": 5986 + }, + "name": "txt", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + } + ], + "python_name": "calculate_style_text_align_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_text_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -84727,14 +90574,14 @@ "location": { "column": 6, "file": "", - "line": 2117 + "line": 1922 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 2117 + "line": 1922 }, "name": "obj", "type": { @@ -84779,14 +90626,14 @@ "location": { "column": 6, "file": "", - "line": 3853 + "line": 3075 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3853 + "line": 3075 }, "name": "obj", "type": { @@ -84809,7 +90656,7 @@ "location": { "column": 67, "file": "", - "line": 3853 + "line": 3075 }, "name": "class_p", "type": { @@ -84857,14 +90704,14 @@ "location": { "column": 12, "file": "", - "line": 3627 + "line": 2811 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 3627 + "line": 2811 }, "name": "class_p", "type": { @@ -84887,7 +90734,7 @@ "location": { "column": 77, "file": "", - "line": 3627 + "line": 2811 }, "name": "parent", "type": { @@ -84935,14 +90782,14 @@ "location": { "column": 6, "file": "", - "line": 3628 + "line": 2812 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3628 + "line": 2812 }, "name": "obj", "type": { @@ -84987,14 +90834,14 @@ "location": { "column": 6, "file": "", - "line": 2072 + "line": 1877 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 2072 + "line": 1877 }, "name": "obj", "type": { @@ -85039,14 +90886,14 @@ "location": { "column": 12, "file": "", - "line": 3836 + "line": 2977 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3836 + "line": 2977 }, "name": "parent", "type": { @@ -85094,14 +90941,14 @@ "location": { "column": 6, "file": "", - "line": 2071 + "line": 1876 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 2071 + "line": 1876 }, "name": "obj", "type": { @@ -85146,14 +90993,14 @@ "location": { "column": 6, "file": "", - "line": 2074 + "line": 1879 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 2074 + "line": 1879 }, "name": "a", "type": { @@ -85164,26 +91011,16757 @@ } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "anim_t" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "anim_t" + } + } + ], + "python_name": "delete_anim_completed_cb", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": true, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_delete_async", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1880 + }, + "parameters": [ + { + "location": { + "column": 35, + "file": "", + "line": 1880 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "delete_async", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_delete_delayed", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1878 + }, + "parameters": [ + { + "location": { + "column": 37, + "file": "", + "line": 1878 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 53, + "file": "", + "line": 1878 + }, + "name": "delay_ms", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "delete_delayed", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_destruct", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4933 + }, + "parameters": [ + { + "location": { + "column": 31, + "file": "", + "line": 4933 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "destruct", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_dump_tree", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1898 + }, + "parameters": [ + { + "location": { + "column": 32, + "file": "", + "line": 1898 + }, + "name": "start_obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "dump_tree", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_enable_style_refresh", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2056 + }, + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 2056 + }, + "name": "en", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "enable_style_refresh", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": true, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_event_base", + "function_specifiers": [], + "location": { + "column": 13, + "file": "", + "line": 2917 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 2917 + }, + "name": "class_p", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_class_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "obj_class_t" + } + }, + { + "location": { + "column": 74, + "file": "", + "line": 2917 + }, + "name": "e", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_event_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "event_t" + } + } + ], + "python_name": "event_base", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_result_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" + }, + "role": "object_method", + "static": true, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_fade_in", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2065 + }, + "parameters": [ + { + "location": { + "column": 30, + "file": "", + "line": 2065 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 46, + "file": "", + "line": 2065 + }, + "name": "time", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 61, + "file": "", + "line": 2065 + }, + "name": "delay", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "fade_in", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_fade_out", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2066 + }, + "parameters": [ + { + "location": { + "column": 31, + "file": "", + "line": 2066 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 47, + "file": "", + "line": 2066 + }, + "name": "time", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 62, + "file": "", + "line": 2066 + }, + "name": "delay", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "fade_out", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_child", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 1887 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 1887 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 59, + "file": "", + "line": 1887 + }, + "name": "idx", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "get_child", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "return_view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_child_by_type", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 1888 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 1888 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 1888 + }, + "name": "idx", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 58, + "file": "", + "line": 1889 + }, + "name": "class_p", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_class_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "obj_class_t" + } + } + ], + "python_name": "get_child_by_type", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "return_view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_child_count", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 1893 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 1893 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_child_count", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_child_count_by_type", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 1894 + }, + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 1894 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 1894 + }, + "name": "class_p", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_class_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "obj_class_t" + } + } + ], + "python_name": "get_child_count_by_type", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_class", + "function_specifiers": [], + "location": { + "column": 24, + "file": "", + "line": 3077 + }, + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 3077 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_class", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_class_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "obj_class_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_click_area", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1961 + }, + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 1961 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 1961 + }, + "name": "area", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "get_click_area", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_content_coords", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1936 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 1936 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 64, + "file": "", + "line": 1936 + }, + "name": "area", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "get_content_coords", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_content_height", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1935 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 1935 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_content_height", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_content_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1934 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 1934 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_content_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_coords", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1925 + }, + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 1925 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 56, + "file": "", + "line": 1925 + }, + "name": "coords", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "get_coords", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_display", + "function_specifiers": [], + "location": { + "column": 16, + "file": "", + "line": 1885 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 1885 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_display", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_event_count", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2921 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 2921 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_event_count", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_event_dsc", + "function_specifiers": [], + "location": { + "column": 18, + "file": "", + "line": 2922 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 2922 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 64, + "file": "", + "line": 2922 + }, + "name": "index", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "get_event_dsc", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_event_dsc_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "event_dsc_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_ext_draw_size", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 4934 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 4934 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_ext_draw_size", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_group", + "function_specifiers": [], + "location": { + "column": 14, + "file": "", + "line": 3072 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 3072 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_group", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_group_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "group_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_height", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1933 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 1933 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_height", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_index", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1895 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 1895 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_index", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_index_by_type", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1896 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 1896 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 1896 + }, + "name": "class_p", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_class_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "obj_class_t" + } + } + ], + "python_name": "get_index_by_type", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_layer_type", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 4935 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 4935 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_layer_type", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_layer_type_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "LAYER_TYPE | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_local_style_prop", + "function_specifiers": [], + "location": { + "column": 16, + "file": "", + "line": 2061 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 2061 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 76, + "file": "", + "line": 2061 + }, + "name": "prop", + "type": { + "kind": "identifier", + "name": "lv_style_prop_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 99, + "file": "", + "line": 2061 + }, + "name": "value", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_value_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_value_t" + } + }, + { + "location": { + "column": 64, + "file": "", + "line": 2062 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "get_local_style_prop", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_style_res_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "STYLE_RES | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_parent", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 1886 + }, + "parameters": [ + { + "location": { + "column": 45, + "file": "", + "line": 1886 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_parent", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "return_view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_screen", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 1884 + }, + "parameters": [ + { + "location": { + "column": 45, + "file": "", + "line": 1884 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_screen", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "return_view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_bottom", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1990 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 1990 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_bottom", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_dir", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 1984 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 1984 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_dir", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_dir_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "DIR | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_end", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1993 + }, + "parameters": [ + { + "location": { + "column": 37, + "file": "", + "line": 1993 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 55, + "file": "", + "line": 1993 + }, + "name": "end", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_point_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "point_t" + } + } + ], + "python_name": "get_scroll_end", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_left", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1991 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 1991 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_left", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_right", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1992 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 1992 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_right", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_snap_x", + "function_specifiers": [], + "location": { + "column": 18, + "file": "", + "line": 1985 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 1985 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_snap_x", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_scroll_snap_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "SCROLL_SNAP | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_snap_y", + "function_specifiers": [], + "location": { + "column": 18, + "file": "", + "line": 1986 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 1986 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_snap_y", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_scroll_snap_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "SCROLL_SNAP | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_top", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1989 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 1989 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_top", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_x", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1987 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 1987 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_x", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scroll_y", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1988 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 1988 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scroll_y", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scrollbar_area", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2004 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 2004 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 58, + "file": "", + "line": 2004 + }, + "name": "hor_area", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 2004 + }, + "name": "ver_area", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + } + ], + "python_name": "get_scrollbar_area", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_scrollbar_mode", + "function_specifiers": [], + "location": { + "column": 21, + "file": "", + "line": 1983 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 1983 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_scrollbar_mode", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_scrollbar_mode_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "SCROLLBAR_MODE | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_self_height", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1938 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 1938 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_self_height", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_self_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1937 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 1937 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_self_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_sibling", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 1890 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 1890 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 61, + "file": "", + "line": 1890 + }, + "name": "idx", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "get_sibling", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "return_view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_sibling_by_type", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 1891 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 1891 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 1891 + }, + "name": "idx", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 1892 + }, + "name": "class_p", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_class_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "obj_class_t" + } + } + ], + "python_name": "get_sibling_by_type", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "return_view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_state", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 3057 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 3057 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_state", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_state_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "STATE | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_align", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2084 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 2084 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 2084 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_align", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_align_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5193 + }, + "parameters": [ + { + "location": { + "column": 73, + "file": "", + "line": 5193 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 5193 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_align_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_anim", + "function_specifiers": [], + "location": { + "column": 19, + "file": "", + "line": 2193 + }, + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 2193 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 73, + "file": "", + "line": 2193 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_anim", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_anim_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "anim_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_anim_duration", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2194 + }, + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 2194 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 73, + "file": "", + "line": 2194 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_anim_duration", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_anim_duration_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5853 + }, + "parameters": [ + { + "location": { + "column": 79, + "file": "", + "line": 5853 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 5853 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_anim_duration_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_anim_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 33, + "file": "", + "line": 5847 + }, + "parameters": [ + { + "location": { + "column": 79, + "file": "", + "line": 5847 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 5847 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_anim_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_anim_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "anim_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_color", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2157 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2157 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2157 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_color", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_color_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2158 + }, + "parameters": [ + { + "location": { + "column": 63, + "file": "", + "line": 2158 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 2158 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_color_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_color_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5637 + }, + "parameters": [ + { + "location": { + "column": 86, + "file": "", + "line": 5637 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 103, + "file": "", + "line": 5637 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_color_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_color_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5631 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5631 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5631 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_color_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_image_src", + "function_specifiers": [], + "location": { + "column": 14, + "file": "", + "line": 2160 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 2160 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 2160 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_image_src", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_image_src_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 28, + "file": "", + "line": 5649 + }, + "parameters": [ + { + "location": { + "column": 83, + "file": "", + "line": 5649 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 5649 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_image_src_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2159 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 2159 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 2159 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5643 + }, + "parameters": [ + { + "location": { + "column": 73, + "file": "", + "line": 5643 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 5643 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_rounded", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2156 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 2156 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 2156 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_rounded", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_rounded_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 5625 + }, + "parameters": [ + { + "location": { + "column": 73, + "file": "", + "line": 5625 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 5625 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_rounded_internal", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2155 + }, + "parameters": [ + { + "location": { + "column": 51, + "file": "", + "line": 2155 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 2155 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_arc_width_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5619 + }, + "parameters": [ + { + "location": { + "column": 74, + "file": "", + "line": 5619 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5619 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_arc_width_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_base_dir", + "function_specifiers": [], + "location": { + "column": 15, + "file": "", + "line": 2198 + }, + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 2198 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 73, + "file": "", + "line": 2198 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_base_dir", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_base_dir_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BASE_DIR | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_base_dir_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 29, + "file": "", + "line": 5877 + }, + "parameters": [ + { + "location": { + "column": 79, + "file": "", + "line": 5877 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 5877 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_base_dir_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_base_dir_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BASE_DIR | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_color", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2108 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 2108 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2108 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_color", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_color_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2109 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 2109 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 2109 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_color_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_color_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5343 + }, + "parameters": [ + { + "location": { + "column": 85, + "file": "", + "line": 5343 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 5343 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_color_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_color_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5337 + }, + "parameters": [ + { + "location": { + "column": 76, + "file": "", + "line": 5337 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 5337 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_color_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad", + "function_specifiers": [], + "location": { + "column": 23, + "file": "", + "line": 2118 + }, + "parameters": [ + { + "location": { + "column": 63, + "file": "", + "line": 2118 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 2118 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_grad_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "grad_dsc_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_color", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2111 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 2111 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 75, + "file": "", + "line": 2111 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_color", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_color_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2112 + }, + "parameters": [ + { + "location": { + "column": 67, + "file": "", + "line": 2112 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 2112 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_color_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_color_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5361 + }, + "parameters": [ + { + "location": { + "column": 90, + "file": "", + "line": 5361 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 107, + "file": "", + "line": 5361 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_color_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_color_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5355 + }, + "parameters": [ + { + "location": { + "column": 81, + "file": "", + "line": 5355 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 98, + "file": "", + "line": 5355 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_color_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_dir", + "function_specifiers": [], + "location": { + "column": 15, + "file": "", + "line": 2113 + }, + "parameters": [ + { + "location": { + "column": 59, + "file": "", + "line": 2113 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 76, + "file": "", + "line": 2113 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_dir", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grad_dir_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRAD_DIR | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_dir_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 29, + "file": "", + "line": 5367 + }, + "parameters": [ + { + "location": { + "column": 82, + "file": "", + "line": 5367 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 99, + "file": "", + "line": 5367 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_dir_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grad_dir_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRAD_DIR | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 37, + "file": "", + "line": 5397 + }, + "parameters": [ + { + "location": { + "column": 86, + "file": "", + "line": 5397 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 103, + "file": "", + "line": 5397 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_grad_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "grad_dsc_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2117 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2117 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2117 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5391 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5391 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5391 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_stop", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2115 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2115 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2115 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_stop", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_grad_stop_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5379 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5379 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5379 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_grad_stop_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2120 + }, + "parameters": [ + { + "location": { + "column": 55, + "file": "", + "line": 2120 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 72, + "file": "", + "line": 2120 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5409 + }, + "parameters": [ + { + "location": { + "column": 78, + "file": "", + "line": 5409 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 95, + "file": "", + "line": 5409 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_recolor", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2121 + }, + "parameters": [ + { + "location": { + "column": 61, + "file": "", + "line": 2121 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 78, + "file": "", + "line": 2121 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_recolor", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_recolor_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2122 + }, + "parameters": [ + { + "location": { + "column": 70, + "file": "", + "line": 2122 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 87, + "file": "", + "line": 2122 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_recolor_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_recolor_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5421 + }, + "parameters": [ + { + "location": { + "column": 93, + "file": "", + "line": 5421 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 110, + "file": "", + "line": 5421 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_recolor_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_recolor_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5415 + }, + "parameters": [ + { + "location": { + "column": 84, + "file": "", + "line": 5415 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 101, + "file": "", + "line": 5415 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_recolor_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_recolor_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2123 + }, + "parameters": [ + { + "location": { + "column": 63, + "file": "", + "line": 2123 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 2123 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_recolor_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_recolor_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5427 + }, + "parameters": [ + { + "location": { + "column": 86, + "file": "", + "line": 5427 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 103, + "file": "", + "line": 5427 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_recolor_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_src", + "function_specifiers": [], + "location": { + "column": 14, + "file": "", + "line": 2119 + }, + "parameters": [ + { + "location": { + "column": 59, + "file": "", + "line": 2119 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 76, + "file": "", + "line": 2119 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_src", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_src_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 28, + "file": "", + "line": 5403 + }, + "parameters": [ + { + "location": { + "column": 82, + "file": "", + "line": 5403 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 99, + "file": "", + "line": 5403 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_src_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_tiled", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2124 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 2124 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2124 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_tiled", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_image_tiled_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 5433 + }, + "parameters": [ + { + "location": { + "column": 76, + "file": "", + "line": 5433 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 5433 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_image_tiled_internal", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_main_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2116 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2116 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2116 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_main_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_main_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5385 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5385 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5385 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_main_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_main_stop", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2114 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2114 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2114 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_main_stop", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_main_stop_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5373 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5373 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5373 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_main_stop_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2110 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 2110 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 66, + "file": "", + "line": 2110 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bg_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5349 + }, + "parameters": [ + { + "location": { + "column": 72, + "file": "", + "line": 5349 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 89, + "file": "", + "line": 5349 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bg_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bitmap_mask_src", + "function_specifiers": [], + "location": { + "column": 14, + "file": "", + "line": 2199 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 2199 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 2199 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bitmap_mask_src", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_bitmap_mask_src_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 28, + "file": "", + "line": 5883 + }, + "parameters": [ + { + "location": { + "column": 85, + "file": "", + "line": 5883 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 5883 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_bitmap_mask_src_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blend_mode", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2196 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 2196 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 2196 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blend_mode", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_blend_mode_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BLEND_MODE | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blend_mode_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5865 + }, + "parameters": [ + { + "location": { + "column": 83, + "file": "", + "line": 5865 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 5865 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blend_mode_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_blend_mode_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BLEND_MODE | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blur_backdrop", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2175 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 2175 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 2175 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blur_backdrop", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blur_backdrop_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 5739 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 5739 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 5739 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blur_backdrop_internal", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blur_quality", + "function_specifiers": [], + "location": { + "column": 19, + "file": "", + "line": 2176 + }, + "parameters": [ + { + "location": { + "column": 64, + "file": "", + "line": 2176 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 2176 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blur_quality", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_blur_quality_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BLUR_QUALITY | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blur_quality_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 33, + "file": "", + "line": 5745 + }, + "parameters": [ + { + "location": { + "column": 87, + "file": "", + "line": 5745 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 104, + "file": "", + "line": 5745 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blur_quality_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_blur_quality_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BLUR_QUALITY | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blur_radius", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2174 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 2174 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2174 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blur_radius", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_blur_radius_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5733 + }, + "parameters": [ + { + "location": { + "column": 76, + "file": "", + "line": 5733 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 5733 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_blur_radius_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_color", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2125 + }, + "parameters": [ + { + "location": { + "column": 57, + "file": "", + "line": 2125 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 74, + "file": "", + "line": 2125 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_color", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_color_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2126 + }, + "parameters": [ + { + "location": { + "column": 66, + "file": "", + "line": 2126 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 83, + "file": "", + "line": 2126 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_color_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_color_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5445 + }, + "parameters": [ + { + "location": { + "column": 89, + "file": "", + "line": 5445 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 106, + "file": "", + "line": 5445 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_color_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_color_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5439 + }, + "parameters": [ + { + "location": { + "column": 80, + "file": "", + "line": 5439 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 5439 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_color_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2127 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 2127 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2127 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5451 + }, + "parameters": [ + { + "location": { + "column": 76, + "file": "", + "line": 5451 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 5451 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_post", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2130 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 2130 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 2130 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_post", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_post_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 5469 + }, + "parameters": [ + { + "location": { + "column": 73, + "file": "", + "line": 5469 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 5469 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_post_internal", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_side", + "function_specifiers": [], + "location": { + "column": 18, + "file": "", + "line": 2129 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 2129 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 2129 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_side", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_border_side_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BORDER_SIDE | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_side_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 32, + "file": "", + "line": 5463 + }, + "parameters": [ + { + "location": { + "column": 85, + "file": "", + "line": 5463 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 5463 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_side_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_border_side_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BORDER_SIDE | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2128 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2128 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2128 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_border_width_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5457 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5457 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5457 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_border_width_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_clamped_height", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1940 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 1940 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_style_clamped_height", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_clamped_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 1939 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 1939 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_style_clamped_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_clip_corner", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2186 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 2186 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 2186 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_clip_corner", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_clip_corner_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 5805 + }, + "parameters": [ + { + "location": { + "column": 73, + "file": "", + "line": 5805 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 5805 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_clip_corner_internal", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_color_filter_dsc", + "function_specifiers": [], + "location": { + "column": 31, + "file": "", + "line": 2189 + }, + "parameters": [ + { + "location": { + "column": 80, + "file": "", + "line": 2189 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 2189 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_color_filter_dsc", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_color_filter_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "color_filter_dsc_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_color_filter_dsc_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 45, + "file": "", + "line": 5823 + }, + "parameters": [ + { + "location": { + "column": 103, + "file": "", + "line": 5823 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 120, + "file": "", + "line": 5823 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_color_filter_dsc_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_color_filter_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "color_filter_dsc_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_color_filter_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2190 + }, + "parameters": [ + { + "location": { + "column": 59, + "file": "", + "line": 2190 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 76, + "file": "", + "line": 2190 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_color_filter_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_color_filter_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5829 + }, + "parameters": [ + { + "location": { + "column": 82, + "file": "", + "line": 5829 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 99, + "file": "", + "line": 5829 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_color_filter_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_color", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2180 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 2180 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 2180 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_color", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_color_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2181 + }, + "parameters": [ + { + "location": { + "column": 71, + "file": "", + "line": 2181 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 88, + "file": "", + "line": 2181 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_color_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_color_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5775 + }, + "parameters": [ + { + "location": { + "column": 94, + "file": "", + "line": 5775 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 111, + "file": "", + "line": 5775 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_color_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_color_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5769 + }, + "parameters": [ + { + "location": { + "column": 85, + "file": "", + "line": 5769 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 5769 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_color_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_offset_x", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2178 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 2178 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 2178 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_offset_x", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_offset_x_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5757 + }, + "parameters": [ + { + "location": { + "column": 85, + "file": "", + "line": 5757 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 5757 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_offset_x_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_offset_y", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2179 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 2179 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 2179 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_offset_y", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_offset_y_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5763 + }, + "parameters": [ + { + "location": { + "column": 85, + "file": "", + "line": 5763 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 5763 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_offset_y_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2182 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 2182 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 75, + "file": "", + "line": 2182 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5781 + }, + "parameters": [ + { + "location": { + "column": 81, + "file": "", + "line": 5781 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 98, + "file": "", + "line": 5781 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_quality", + "function_specifiers": [], + "location": { + "column": 19, + "file": "", + "line": 2183 + }, + "parameters": [ + { + "location": { + "column": 71, + "file": "", + "line": 2183 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 88, + "file": "", + "line": 2183 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_quality", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_blur_quality_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BLUR_QUALITY | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_quality_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 33, + "file": "", + "line": 5787 + }, + "parameters": [ + { + "location": { + "column": 94, + "file": "", + "line": 5787 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 111, + "file": "", + "line": 5787 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_quality_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_blur_quality_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "BLUR_QUALITY | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_radius", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2177 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 2177 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 2177 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_radius", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_drop_shadow_radius_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5751 + }, + "parameters": [ + { + "location": { + "column": 83, + "file": "", + "line": 5751 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 5751 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_drop_shadow_radius_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_enabled", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2051 + }, + "parameters": [ + { + "location": { + "column": 40, + "file": "", + "line": 2051 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 64, + "file": "", + "line": 2051 + }, + "name": "style", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 2051 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "get_style_enabled", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_cross_place", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2203 + }, + "parameters": [ + { + "location": { + "column": 66, + "file": "", + "line": 2203 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 83, + "file": "", + "line": 2203 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_cross_place", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_cross_place_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5907 + }, + "parameters": [ + { + "location": { + "column": 89, + "file": "", + "line": 5907 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 106, + "file": "", + "line": 5907 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_cross_place_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_flow", + "function_specifiers": [], + "location": { + "column": 16, + "file": "", + "line": 2201 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 2201 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 75, + "file": "", + "line": 2201 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_flow", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_flow_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_FLOW | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_flow_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 30, + "file": "", + "line": 5895 + }, + "parameters": [ + { + "location": { + "column": 81, + "file": "", + "line": 5895 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 98, + "file": "", + "line": 5895 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_flow_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_flow_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_FLOW | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_grow", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2205 + }, + "parameters": [ + { + "location": { + "column": 51, + "file": "", + "line": 2205 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 2205 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_grow", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint8_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_grow_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5919 + }, + "parameters": [ + { + "location": { + "column": 74, + "file": "", + "line": 5919 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5919 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_grow_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint8_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_main_place", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2202 + }, + "parameters": [ + { + "location": { + "column": 65, + "file": "", + "line": 2202 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 82, + "file": "", + "line": 2202 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_main_place", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_main_place_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5901 + }, + "parameters": [ + { + "location": { + "column": 88, + "file": "", + "line": 5901 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 105, + "file": "", + "line": 5901 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_main_place_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_track_place", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2204 + }, + "parameters": [ + { + "location": { + "column": 66, + "file": "", + "line": 2204 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 83, + "file": "", + "line": 2204 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_track_place", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_flex_track_place_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5913 + }, + "parameters": [ + { + "location": { + "column": 89, + "file": "", + "line": 5913 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 106, + "file": "", + "line": 5913 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_flex_track_place_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_flex_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_column_pos", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2210 + }, + "parameters": [ + { + "location": { + "column": 62, + "file": "", + "line": 2210 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 2210 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_column_pos", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_column_pos_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5949 + }, + "parameters": [ + { + "location": { + "column": 85, + "file": "", + "line": 5949 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 5949 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_column_pos_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_column_span", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2212 + }, + "parameters": [ + { + "location": { + "column": 63, + "file": "", + "line": 2212 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 2212 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_column_span", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_column_span_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5961 + }, + "parameters": [ + { + "location": { + "column": 86, + "file": "", + "line": 5961 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 103, + "file": "", + "line": 5961 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_column_span_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_row_pos", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2213 + }, + "parameters": [ + { + "location": { + "column": 59, + "file": "", + "line": 2213 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 76, + "file": "", + "line": 2213 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_row_pos", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_row_pos_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5967 + }, + "parameters": [ + { + "location": { + "column": 82, + "file": "", + "line": 5967 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 99, + "file": "", + "line": 5967 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_row_pos_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_row_span", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2215 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 2215 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 2215 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_row_span", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_row_span_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5979 + }, + "parameters": [ + { + "location": { + "column": 83, + "file": "", + "line": 5979 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 5979 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_row_span_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_x_align", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2211 + }, + "parameters": [ + { + "location": { + "column": 67, + "file": "", + "line": 2211 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 2211 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_x_align", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_x_align_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5955 + }, + "parameters": [ + { + "location": { + "column": 90, + "file": "", + "line": 5955 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 107, + "file": "", + "line": 5955 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_x_align_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_y_align", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2214 + }, + "parameters": [ + { + "location": { + "column": 67, + "file": "", + "line": 2214 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 2214 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_y_align", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_cell_y_align_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5973 + }, + "parameters": [ + { + "location": { + "column": 90, + "file": "", + "line": 5973 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 107, + "file": "", + "line": 5973 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_cell_y_align_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_column_align", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2207 + }, + "parameters": [ + { + "location": { + "column": 67, + "file": "", + "line": 2207 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 2207 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_column_align", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_column_align_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5931 + }, + "parameters": [ + { + "location": { + "column": 90, + "file": "", + "line": 5931 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 107, + "file": "", + "line": 5931 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_column_align_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_column_dsc_array", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2206 + }, + "parameters": [ + { + "location": { + "column": 71, + "file": "", + "line": 2206 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 88, + "file": "", + "line": 2206 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_column_dsc_array", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "int32_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_column_dsc_array_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5925 + }, + "parameters": [ + { + "location": { + "column": 94, + "file": "", + "line": 5925 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 111, + "file": "", + "line": 5925 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_column_dsc_array_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "int32_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_row_align", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2209 + }, + "parameters": [ + { + "location": { + "column": 64, + "file": "", + "line": 2209 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 2209 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_row_align", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_row_align_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5943 + }, + "parameters": [ + { + "location": { + "column": 87, + "file": "", + "line": 5943 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 104, + "file": "", + "line": 5943 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_row_align_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_row_dsc_array", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2208 + }, + "parameters": [ + { + "location": { + "column": 68, + "file": "", + "line": 2208 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 85, + "file": "", + "line": 2208 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_row_dsc_array", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "int32_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_grid_row_dsc_array_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 31, + "file": "", + "line": 5937 + }, + "parameters": [ + { + "location": { + "column": 91, + "file": "", + "line": 5937 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 108, + "file": "", + "line": 5937 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_grid_row_dsc_array_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "int32_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_height", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2078 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 2078 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 65, + "file": "", + "line": 2078 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_height", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_height_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5157 + }, + "parameters": [ + { + "location": { + "column": 71, + "file": "", + "line": 5157 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 88, + "file": "", + "line": 5157 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_height_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_colorkey", + "function_specifiers": [], + "location": { + "column": 29, + "file": "", + "line": 2147 + }, + "parameters": [ + { + "location": { + "column": 76, + "file": "", + "line": 2147 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 2147 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_colorkey", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_image_colorkey_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "image_colorkey_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_colorkey_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 43, + "file": "", + "line": 5571 + }, + "parameters": [ + { + "location": { + "column": 99, + "file": "", + "line": 5571 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 116, + "file": "", + "line": 5571 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_colorkey_internal", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_image_colorkey_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "image_colorkey_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2143 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 2143 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 2143 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5547 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 5547 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 5547 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_recolor", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2144 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 2144 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 75, + "file": "", + "line": 2144 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_recolor", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_recolor_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2145 + }, + "parameters": [ + { + "location": { + "column": 67, + "file": "", + "line": 2145 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 2145 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_recolor_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_recolor_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5559 + }, + "parameters": [ + { + "location": { + "column": 90, + "file": "", + "line": 5559 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 107, + "file": "", + "line": 5559 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_recolor_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_recolor_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5553 + }, + "parameters": [ + { + "location": { + "column": 81, + "file": "", + "line": 5553 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 98, + "file": "", + "line": 5553 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_recolor_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_recolor_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2146 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 2146 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 2146 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_recolor_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_image_recolor_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5565 + }, + "parameters": [ + { + "location": { + "column": 83, + "file": "", + "line": 5565 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 100, + "file": "", + "line": 5565 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_image_recolor_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_layout", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2197 + }, + "parameters": [ + { + "location": { + "column": 49, + "file": "", + "line": 2197 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 66, + "file": "", + "line": 2197 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_layout", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint16_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_layout_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5871 + }, + "parameters": [ + { + "location": { + "column": 72, + "file": "", + "line": 5871 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 89, + "file": "", + "line": 5871 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_layout_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "uint16_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_length", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2081 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 2081 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 65, + "file": "", + "line": 2081 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_length", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_length_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5175 + }, + "parameters": [ + { + "location": { + "column": 71, + "file": "", + "line": 5175 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 88, + "file": "", + "line": 5175 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_length_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_color", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2152 + }, + "parameters": [ + { + "location": { + "column": 55, + "file": "", + "line": 2152 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 72, + "file": "", + "line": 2152 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_color", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_color_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2153 + }, + "parameters": [ + { + "location": { + "column": 64, + "file": "", + "line": 2153 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 2153 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_color_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_color_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5607 + }, + "parameters": [ + { + "location": { + "column": 87, + "file": "", + "line": 5607 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 104, + "file": "", + "line": 5607 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_color_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_color_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5601 + }, + "parameters": [ + { + "location": { + "column": 78, + "file": "", + "line": 5601 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 95, + "file": "", + "line": 5601 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_color_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_dash_gap", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2150 + }, + "parameters": [ + { + "location": { + "column": 55, + "file": "", + "line": 2150 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 72, + "file": "", + "line": 2150 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_dash_gap", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_dash_gap_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5589 + }, + "parameters": [ + { + "location": { + "column": 78, + "file": "", + "line": 5589 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 95, + "file": "", + "line": 5589 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_dash_gap_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_dash_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2149 + }, + "parameters": [ + { + "location": { + "column": 57, + "file": "", + "line": 2149 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 74, + "file": "", + "line": 2149 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_dash_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_dash_width_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5583 + }, + "parameters": [ + { + "location": { + "column": 80, + "file": "", + "line": 5583 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 5583 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_dash_width_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2154 + }, + "parameters": [ + { + "location": { + "column": 51, + "file": "", + "line": 2154 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 2154 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5613 + }, + "parameters": [ + { + "location": { + "column": 74, + "file": "", + "line": 5613 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5613 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_rounded", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2151 + }, + "parameters": [ + { + "location": { + "column": 51, + "file": "", + "line": 2151 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 2151 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_rounded", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_rounded_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 5595 + }, + "parameters": [ + { + "location": { + "column": 74, + "file": "", + "line": 5595 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5595 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_rounded_internal", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2148 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 2148 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 2148 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_line_width_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5577 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 5577 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 5577 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_line_width_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_bottom", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2105 + }, + "parameters": [ + { + "location": { + "column": 55, + "file": "", + "line": 2105 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 72, + "file": "", + "line": 2105 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_bottom", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_bottom_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5319 + }, + "parameters": [ + { + "location": { + "column": 78, + "file": "", + "line": 5319 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 95, + "file": "", + "line": 5319 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_bottom_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_left", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2106 + }, + "parameters": [ + { + "location": { + "column": 53, + "file": "", + "line": 2106 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2106 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_left", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_left_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5325 + }, + "parameters": [ + { + "location": { + "column": 76, + "file": "", + "line": 5325 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 5325 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_left_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_right", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2107 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2107 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2107 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_right", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_right_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5331 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5331 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5331 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_right_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_top", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2104 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 2104 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 2104 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_top", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_margin_top_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5313 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 5313 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 5313 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_margin_top_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_max_height", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2080 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 2080 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 2080 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_max_height", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_max_height_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5169 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 5169 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 5169 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_max_height_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_max_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2077 + }, + "parameters": [ + { + "location": { + "column": 51, + "file": "", + "line": 2077 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 2077 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_max_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_max_width_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5151 + }, + "parameters": [ + { + "location": { + "column": 74, + "file": "", + "line": 5151 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5151 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_max_width_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_min_height", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2079 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 2079 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 2079 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_min_height", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_min_height_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5163 + }, + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 5163 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 5163 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_min_height_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_min_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 2076 + }, + "parameters": [ + { + "location": { + "column": 51, + "file": "", + "line": 2076 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 68, + "file": "", + "line": 2076 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_min_width", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_min_width_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 23, + "file": "", + "line": 5145 + }, + "parameters": [ + { + "location": { + "column": 74, + "file": "", + "line": 5145 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5145 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_min_width_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_opa", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2187 + }, + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 2187 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 63, + "file": "", + "line": 2187 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_opa", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_opa_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5811 + }, + "parameters": [ + { + "location": { + "column": 69, + "file": "", + "line": 5811 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 86, + "file": "", + "line": 5811 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_opa_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_opa_layered", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2188 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 2188 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2188 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_opa_layered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_opa_layered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 24, + "file": "", + "line": 5817 + }, + "parameters": [ + { + "location": { + "column": 77, + "file": "", + "line": 5817 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5817 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_opa_layered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_opa_recursive", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 2361 + }, + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 2361 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 73, + "file": "", + "line": 2361 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_opa_recursive", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_opa_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_outline_color", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2132 + }, + "parameters": [ + { + "location": { + "column": 58, + "file": "", + "line": 2132 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 75, + "file": "", + "line": 2132 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_outline_color", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_outline_color_filtered", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 2133 + }, + "parameters": [ + { + "location": { + "column": 67, + "file": "", + "line": 2133 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 84, + "file": "", + "line": 2133 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_outline_color_filtered", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_outline_color_filtered_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5487 + }, + "parameters": [ + { + "location": { + "column": 90, + "file": "", + "line": 5487 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 107, + "file": "", + "line": 5487 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_outline_color_filtered_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "object_method", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_outline_color_internal", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 26, + "file": "", + "line": 5481 + }, + "parameters": [ + { + "location": { + "column": 81, + "file": "", + "line": 5481 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 98, + "file": "", + "line": 5481 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "delete_anim_completed_cb", + "python_name": "get_style_outline_color_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_color_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", - "static": true, - "storage": [], + "static": false, + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -85193,26 +107771,29 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_delete_async", + "c_name": "lv_obj_get_style_outline_opa", "function_specifiers": [], "location": { - "column": 6, + "column": 10, "file": "", - "line": 2075 + "line": 2134 }, "parameters": [ { "location": { - "column": 35, + "column": 54, "file": "", - "line": 2075 + "line": 2134 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -85220,18 +107801,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2134 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "delete_async", + "python_name": "get_style_outline_opa", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_opa_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -85245,26 +107843,31 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_delete_delayed", - "function_specifiers": [], + "c_name": "lv_obj_get_style_outline_opa_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 6, + "column": 24, "file": "", - "line": 2073 + "line": 5493 }, "parameters": [ { "location": { - "column": 37, + "column": 77, "file": "", - "line": 2073 + "line": 5493 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -85275,36 +107878,38 @@ }, { "location": { - "column": 53, + "column": 94, "file": "", - "line": 2073 + "line": 5493 }, - "name": "delay_ms", + "name": "part", "type": { "kind": "identifier", - "name": "uint32_t" + "name": "lv_part_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "delete_delayed", + "python_name": "get_style_outline_opa_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_opa_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -85314,26 +107919,29 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_destruct", + "c_name": "lv_obj_get_style_outline_pad", "function_specifiers": [], "location": { - "column": 6, + "column": 9, "file": "", - "line": 5997 + "line": 2135 }, "parameters": [ { "location": { - "column": 31, + "column": 53, "file": "", - "line": 5997 + "line": 2135 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -85341,18 +107949,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2135 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "destruct", + "python_name": "get_style_outline_pad", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -85366,26 +107991,31 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_dump_tree", - "function_specifiers": [], + "c_name": "lv_obj_get_style_outline_pad_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 6, + "column": 23, "file": "", - "line": 2093 + "line": 5499 }, "parameters": [ { "location": { - "column": 32, + "column": 76, "file": "", - "line": 2093 + "line": 5499 }, - "name": "start_obj", + "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -85393,22 +108023,41 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 93, + "file": "", + "line": 5499 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "dump_tree", + "python_name": "get_style_outline_pad_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -85418,45 +108067,68 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_enable_style_refresh", + "c_name": "lv_obj_get_style_outline_width", "function_specifiers": [], "location": { - "column": 6, + "column": 9, "file": "", - "line": 2245 + "line": 2131 }, "parameters": [ { "location": { - "column": 39, + "column": 55, "file": "", - "line": 2245 + "line": 2131 }, - "name": "en", + "name": "obj", "type": { - "kind": "primitive", - "name": "bool" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 72, + "file": "", + "line": 2131 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "enable_style_refresh", + "python_name": "get_style_outline_width", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", - "static": true, + "static": false, "storage": [], "variadic": false, "visibility": "public" @@ -85467,72 +108139,73 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_event_base", - "function_specifiers": [], + "c_name": "lv_obj_get_style_outline_width_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 13, + "column": 23, "file": "", - "line": 3777 + "line": 5475 }, "parameters": [ { "location": { - "column": 52, + "column": 78, "file": "", - "line": 3777 + "line": 5475 }, - "name": "class_p", + "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_class_t", + "name": "lv_obj_t", "qualifiers": [ "const" ] } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "obj_class_t" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 74, + "column": 95, "file": "", - "line": 3777 + "line": 5475 }, - "name": "e", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_event_t" - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "event_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "event_base", + "python_name": "get_style_outline_width_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_result_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "RESULT | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", - "static": true, - "storage": [], + "static": false, + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -85542,26 +108215,29 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_fade_in", + "c_name": "lv_obj_get_style_pad_bottom", "function_specifiers": [], "location": { - "column": 6, + "column": 9, "file": "", - "line": 2254 + "line": 2098 }, "parameters": [ { "location": { - "column": 30, + "column": 52, "file": "", - "line": 2254 + "line": 2098 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -85572,49 +108248,32 @@ }, { "location": { - "column": 46, - "file": "", - "line": 2254 - }, - "name": "time", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 61, + "column": 69, "file": "", - "line": 2254 + "line": 2098 }, - "name": "delay", + "name": "part", "type": { "kind": "identifier", - "name": "uint32_t" + "name": "lv_part_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "fade_in", + "python_name": "get_style_pad_bottom", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -85628,26 +108287,31 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_fade_out", - "function_specifiers": [], + "c_name": "lv_obj_get_style_pad_bottom_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 6, + "column": 23, "file": "", - "line": 2255 + "line": 5277 }, "parameters": [ { "location": { - "column": 31, + "column": 75, "file": "", - "line": 2255 + "line": 5277 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -85658,53 +108322,38 @@ }, { "location": { - "column": 47, - "file": "", - "line": 2255 - }, - "name": "time", - "type": { - "kind": "identifier", - "name": "uint32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 62, + "column": 92, "file": "", - "line": 2255 + "line": 5277 }, - "name": "delay", + "name": "part", "type": { "kind": "identifier", - "name": "uint32_t" + "name": "lv_part_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "fade_out", + "python_name": "get_style_pad_bottom_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -85714,19 +108363,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_child", + "c_name": "lv_obj_get_style_pad_column", "function_specifiers": [], "location": { - "column": 12, + "column": 9, "file": "", - "line": 2082 + "line": 2102 }, "parameters": [ { "location": { - "column": 44, + "column": 52, "file": "", - "line": 2082 + "line": 2102 }, "name": "obj", "type": { @@ -85747,35 +108396,32 @@ }, { "location": { - "column": 59, + "column": 69, "file": "", - "line": 2082 + "line": 2102 }, - "name": "idx", + "name": "part", "type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_part_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_child", + "python_name": "get_style_pad_column", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -85789,19 +108435,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_child_by_type", - "function_specifiers": [], + "c_name": "lv_obj_get_style_pad_column_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 12, + "column": 23, "file": "", - "line": 2083 + "line": 5301 }, "parameters": [ { "location": { - "column": 52, + "column": 75, "file": "", - "line": 2083 + "line": 5301 }, "name": "obj", "type": { @@ -85822,62 +108470,38 @@ }, { "location": { - "column": 67, + "column": 92, "file": "", - "line": 2083 + "line": 5301 }, - "name": "idx", + "name": "part", "type": { "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 58, - "file": "", - "line": 2084 - }, - "name": "class_p", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_class_t", - "qualifiers": [ - "const" - ] - } + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "obj_class_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_child_by_type", + "python_name": "get_style_pad_column_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -85887,19 +108511,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_child_count", + "c_name": "lv_obj_get_style_pad_left", "function_specifiers": [], "location": { - "column": 10, + "column": 9, "file": "", - "line": 2088 + "line": 2099 }, "parameters": [ { "location": { - "column": 48, + "column": 50, "file": "", - "line": 2088 + "line": 2099 }, "name": "obj", "type": { @@ -85917,13 +108541,30 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 67, + "file": "", + "line": 2099 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_child_count", + "python_name": "get_style_pad_left", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "uint32_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -85942,19 +108583,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_child_count_by_type", - "function_specifiers": [], + "c_name": "lv_obj_get_style_pad_left_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 10, + "column": 23, "file": "", - "line": 2089 + "line": 5283 }, "parameters": [ { "location": { - "column": 56, + "column": 73, "file": "", - "line": 2089 + "line": 5283 }, "name": "obj", "type": { @@ -85975,33 +108618,27 @@ }, { "location": { - "column": 84, + "column": 90, "file": "", - "line": 2089 + "line": 5283 }, - "name": "class_p", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_class_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "obj_class_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_child_count_by_type", + "python_name": "get_style_pad_left_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "uint32_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -86010,7 +108647,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -86020,19 +108659,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_class", + "c_name": "lv_obj_get_style_pad_radial", "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 3855 + "line": 2103 }, "parameters": [ { "location": { - "column": 56, + "column": 52, "file": "", - "line": 3855 + "line": 2103 }, "name": "obj", "type": { @@ -86050,24 +108689,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 69, + "file": "", + "line": 2103 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_class", + "python_name": "get_style_pad_radial", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_class_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "obj_class_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -86081,19 +108731,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_click_area", - "function_specifiers": [], + "c_name": "lv_obj_get_style_pad_radial_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 6, + "column": 23, "file": "", - "line": 2154 + "line": 5307 }, "parameters": [ { "location": { - "column": 43, + "column": 75, "file": "", - "line": 2154 + "line": 5307 }, "name": "obj", "type": { @@ -86114,39 +108766,38 @@ }, { "location": { - "column": 60, + "column": 92, "file": "", - "line": 2154 + "line": 5307 }, - "name": "area", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t" - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_click_area", + "python_name": "get_style_pad_radial_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -86156,19 +108807,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_content_coords", + "c_name": "lv_obj_get_style_pad_right", "function_specifiers": [], "location": { - "column": 6, + "column": 9, "file": "", - "line": 2131 + "line": 2100 }, "parameters": [ { "location": { - "column": 47, + "column": 51, "file": "", - "line": 2131 + "line": 2100 }, "name": "obj", "type": { @@ -86189,35 +108840,32 @@ }, { "location": { - "column": 64, + "column": 68, "file": "", - "line": 2131 + "line": 2100 }, - "name": "area", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t" - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_content_coords", + "python_name": "get_style_pad_right", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -86231,19 +108879,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_content_height", - "function_specifiers": [], + "c_name": "lv_obj_get_style_pad_right_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 9, + "column": 23, "file": "", - "line": 2130 + "line": 5289 }, "parameters": [ { "location": { - "column": 50, + "column": 74, "file": "", - "line": 2130 + "line": 5289 }, "name": "obj", "type": { @@ -86261,9 +108911,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5289 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_content_height", + "python_name": "get_style_pad_right_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -86276,7 +108943,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -86286,19 +108955,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_content_width", + "c_name": "lv_obj_get_style_pad_row", "function_specifiers": [], "location": { "column": 9, "file": "", - "line": 2129 + "line": 2101 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 2129 + "line": 2101 }, "name": "obj", "type": { @@ -86316,9 +108985,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 66, + "file": "", + "line": 2101 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_content_width", + "python_name": "get_style_pad_row", "receiver": "obj", "return_type": { "kind": "identifier", @@ -86341,19 +109027,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_coords", - "function_specifiers": [], + "c_name": "lv_obj_get_style_pad_row_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 6, + "column": 23, "file": "", - "line": 2120 + "line": 5295 }, "parameters": [ { "location": { - "column": 39, + "column": 72, "file": "", - "line": 2120 + "line": 5295 }, "name": "obj", "type": { @@ -86374,39 +109062,38 @@ }, { "location": { - "column": 56, + "column": 89, "file": "", - "line": 2120 + "line": 5295 }, - "name": "coords", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t" - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_coords", + "python_name": "get_style_pad_row_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -86416,19 +109103,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_display", + "c_name": "lv_obj_get_style_pad_top", "function_specifiers": [], "location": { - "column": 16, + "column": 9, "file": "", - "line": 2080 + "line": 2097 }, "parameters": [ { "location": { - "column": 50, + "column": 49, "file": "", - "line": 2080 + "line": 2097 }, "name": "obj", "type": { @@ -86446,21 +109133,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 66, + "file": "", + "line": 2097 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_display", + "python_name": "get_style_pad_top", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_display_t" - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "display_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -86474,26 +109175,31 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_event_count", - "function_specifiers": [], + "c_name": "lv_obj_get_style_pad_top_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 10, + "column": 23, "file": "", - "line": 3781 + "line": 5271 }, "parameters": [ { "location": { - "column": 42, + "column": 72, "file": "", - "line": 3781 + "line": 5271 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -86501,13 +109207,30 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 89, + "file": "", + "line": 5271 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_event_count", + "python_name": "get_style_pad_top_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "uint32_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -86516,7 +109239,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -86526,26 +109251,29 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_event_dsc", + "c_name": "lv_obj_get_style_prop", "function_specifiers": [], "location": { "column": 18, "file": "", - "line": 3782 + "line": 2057 }, "parameters": [ { "location": { - "column": 48, + "column": 55, "file": "", - "line": 3782 + "line": 2057 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -86556,14 +109284,31 @@ }, { "location": { - "column": 64, + "column": 72, "file": "", - "line": 3782 + "line": 2057 }, - "name": "index", + "name": "part", "type": { "kind": "identifier", - "name": "uint32_t" + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 2057 + }, + "name": "prop", + "type": { + "kind": "identifier", + "name": "lv_style_prop_t" }, "view": { "category": "scalar", @@ -86572,19 +109317,16 @@ } } ], - "python_name": "get_event_dsc", + "python_name": "get_style_prop", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_event_dsc_t" - } + "kind": "identifier", + "name": "lv_style_value_t" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "event_dsc_t" + "category": "struct", + "conversion": "struct_value", + "python_type": "style_value_t" }, "role": "object_method", "static": false, @@ -86598,19 +109340,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_ext_draw_size", + "c_name": "lv_obj_get_style_prop_internal", "function_specifiers": [], "location": { - "column": 9, + "column": 18, "file": "", - "line": 5981 + "line": 5110 }, "parameters": [ { "location": { - "column": 49, + "column": 64, "file": "", - "line": 5981 + "line": 5110 }, "name": "obj", "type": { @@ -86628,76 +109370,52 @@ "conversion": "object_handle", "python_type": "obj" } - } - ], - "python_name": "get_ext_draw_size", - "receiver": "obj", - "return_type": { - "kind": "identifier", - "name": "int32_t" - }, - "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - }, - "role": "object_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_obj_get_group", - "function_specifiers": [], - "location": { - "column": 14, - "file": "", - "line": 3850 - }, - "parameters": [ + }, { "location": { - "column": 46, + "column": 81, + "file": "", + "line": 5110 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + }, + { + "location": { + "column": 103, "file": "", - "line": 3850 + "line": 5110 }, - "name": "obj", + "name": "prop", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "lv_style_prop_t" }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "get_group", + "python_name": "get_style_prop_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_group_t" - } + "kind": "identifier", + "name": "lv_style_value_t" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "group_t" + "category": "struct", + "conversion": "struct_value", + "python_type": "style_value_t" }, "role": "object_method", "static": false, @@ -86711,19 +109429,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_height", + "c_name": "lv_obj_get_style_radial_offset", "function_specifiers": [], "location": { "column": 9, "file": "", - "line": 2128 + "line": 2185 }, "parameters": [ { "location": { - "column": 42, + "column": 55, "file": "", - "line": 2128 + "line": 2185 }, "name": "obj", "type": { @@ -86741,9 +109459,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 72, + "file": "", + "line": 2185 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_height", + "python_name": "get_style_radial_offset", "receiver": "obj", "return_type": { "kind": "identifier", @@ -86766,19 +109501,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_index", - "function_specifiers": [], + "c_name": "lv_obj_get_style_radial_offset_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 9, + "column": 23, "file": "", - "line": 2090 + "line": 5799 }, "parameters": [ { "location": { - "column": 41, + "column": 78, "file": "", - "line": 2090 + "line": 5799 }, "name": "obj", "type": { @@ -86796,9 +109533,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 95, + "file": "", + "line": 5799 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_index", + "python_name": "get_style_radial_offset_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -86811,7 +109565,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -86821,19 +109577,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_index_by_type", + "c_name": "lv_obj_get_style_radius", "function_specifiers": [], "location": { "column": 9, "file": "", - "line": 2091 + "line": 2184 }, "parameters": [ { "location": { - "column": 49, + "column": 48, "file": "", - "line": 2091 + "line": 2184 }, "name": "obj", "type": { @@ -86854,29 +109610,23 @@ }, { "location": { - "column": 77, + "column": 65, "file": "", - "line": 2091 + "line": 2184 }, - "name": "class_p", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_class_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "obj_class_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_index_by_type", + "python_name": "get_style_radius", "receiver": "obj", "return_type": { "kind": "identifier", @@ -86899,19 +109649,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_layer_type", - "function_specifiers": [], + "c_name": "lv_obj_get_style_radius_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 17, + "column": 23, "file": "", - "line": 5982 + "line": 5793 }, "parameters": [ { "location": { - "column": 54, + "column": 71, "file": "", - "line": 5982 + "line": 5793 }, "name": "obj", "type": { @@ -86929,22 +109681,41 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 88, + "file": "", + "line": 5793 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_layer_type", + "python_name": "get_style_radius_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_layer_type_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "LAYER_TYPE | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -86954,26 +109725,29 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_local_style_prop", + "c_name": "lv_obj_get_style_recolor", "function_specifiers": [], "location": { - "column": 16, + "column": 12, "file": "", - "line": 2250 + "line": 2191 }, "parameters": [ { "location": { - "column": 53, + "column": 52, "file": "", - "line": 2250 + "line": 2191 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -86984,69 +109758,32 @@ }, { "location": { - "column": 76, - "file": "", - "line": 2250 - }, - "name": "prop", - "type": { - "kind": "identifier", - "name": "lv_style_prop_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 99, - "file": "", - "line": 2250 - }, - "name": "value", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_style_value_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "style_value_t" - } - }, - { - "location": { - "column": 64, + "column": 69, "file": "", - "line": 2251 + "line": 2191 }, - "name": "selector", + "name": "part", "type": { "kind": "identifier", - "name": "lv_style_selector_t" + "name": "lv_part_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_local_style_prop", + "python_name": "get_style_recolor", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_style_res_t" + "name": "lv_color_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "STYLE_RES | int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, @@ -87060,19 +109797,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_parent", - "function_specifiers": [], + "c_name": "lv_obj_get_style_recolor_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 12, + "column": 26, "file": "", - "line": 2081 + "line": 5835 }, "parameters": [ { "location": { - "column": 45, + "column": 75, "file": "", - "line": 2081 + "line": 5835 }, "name": "obj", "type": { @@ -87090,25 +109829,41 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 92, + "file": "", + "line": 5835 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_parent", + "python_name": "get_style_recolor_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "identifier", + "name": "lv_color_t" }, "return_view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -87118,19 +109873,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_screen", + "c_name": "lv_obj_get_style_recolor_opa", "function_specifiers": [], "location": { - "column": 12, + "column": 10, "file": "", - "line": 2079 + "line": 2192 }, "parameters": [ { "location": { - "column": 45, + "column": 54, "file": "", - "line": 2079 + "line": 2192 }, "name": "obj", "type": { @@ -87148,21 +109903,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2192 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_screen", + "python_name": "get_style_recolor_opa", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "identifier", + "name": "lv_opa_t" }, "return_view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -87176,19 +109945,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_bottom", - "function_specifiers": [], + "c_name": "lv_obj_get_style_recolor_opa_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 9, + "column": 24, "file": "", - "line": 2183 + "line": 5841 }, "parameters": [ { "location": { - "column": 49, + "column": 77, "file": "", - "line": 2183 + "line": 5841 }, "name": "obj", "type": { @@ -87206,13 +109977,30 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 94, + "file": "", + "line": 5841 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_bottom", + "python_name": "get_style_recolor_opa_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_opa_t" }, "return_view": { "category": "scalar", @@ -87221,7 +110009,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -87231,19 +110021,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_dir", + "c_name": "lv_obj_get_style_recolor_recursive", "function_specifiers": [], "location": { - "column": 10, + "column": 14, "file": "", - "line": 2177 + "line": 2363 }, "parameters": [ { "location": { - "column": 47, + "column": 64, "file": "", - "line": 2177 + "line": 2363 }, "name": "obj", "type": { @@ -87261,18 +110051,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 81, + "file": "", + "line": 2363 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_dir", + "python_name": "get_style_recolor_recursive", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_dir_t" + "name": "lv_color32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "DIR | int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" }, "role": "object_method", "static": false, @@ -87286,26 +110093,29 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_end", + "c_name": "lv_obj_get_style_rotary_sensitivity", "function_specifiers": [], "location": { - "column": 6, + "column": 10, "file": "", - "line": 2186 + "line": 2200 }, "parameters": [ { "location": { - "column": 37, + "column": 61, "file": "", - "line": 2186 + "line": 2200 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -87316,35 +110126,32 @@ }, { "location": { - "column": 55, + "column": 78, "file": "", - "line": 2186 + "line": 2200 }, - "name": "end", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_point_t" - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "point_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_scroll_end", + "python_name": "get_style_rotary_sensitivity", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "uint32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -87358,19 +110165,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_left", - "function_specifiers": [], + "c_name": "lv_obj_get_style_rotary_sensitivity_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 9, + "column": 24, "file": "", - "line": 2184 + "line": 5889 }, "parameters": [ { "location": { - "column": 47, + "column": 84, "file": "", - "line": 2184 + "line": 5889 }, "name": "obj", "type": { @@ -87388,13 +110197,30 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 101, + "file": "", + "line": 5889 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_left", + "python_name": "get_style_rotary_sensitivity_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "uint32_t" }, "return_view": { "category": "scalar", @@ -87403,7 +110229,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -87413,19 +110241,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_right", + "c_name": "lv_obj_get_style_shadow_color", "function_specifiers": [], "location": { - "column": 9, + "column": 12, "file": "", - "line": 2185 + "line": 2140 }, "parameters": [ { "location": { - "column": 48, + "column": 57, "file": "", - "line": 2185 + "line": 2140 }, "name": "obj", "type": { @@ -87443,18 +110271,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 74, + "file": "", + "line": 2140 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_right", + "python_name": "get_style_shadow_color", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_color_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, @@ -87468,19 +110313,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_snap_x", + "c_name": "lv_obj_get_style_shadow_color_filtered", "function_specifiers": [], "location": { - "column": 18, + "column": 12, "file": "", - "line": 2178 + "line": 2141 }, "parameters": [ { "location": { - "column": 58, + "column": 66, "file": "", - "line": 2178 + "line": 2141 }, "name": "obj", "type": { @@ -87498,18 +110343,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 83, + "file": "", + "line": 2141 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_snap_x", + "python_name": "get_style_shadow_color_filtered", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_scroll_snap_t" + "name": "lv_color_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "SCROLL_SNAP | int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, @@ -87523,19 +110385,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_snap_y", - "function_specifiers": [], + "c_name": "lv_obj_get_style_shadow_color_filtered_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 18, + "column": 26, "file": "", - "line": 2179 + "line": 5535 }, "parameters": [ { "location": { - "column": 58, + "column": 89, "file": "", - "line": 2179 + "line": 5535 }, "name": "obj", "type": { @@ -87553,22 +110417,41 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 106, + "file": "", + "line": 5535 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_snap_y", + "python_name": "get_style_shadow_color_filtered_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_scroll_snap_t" + "name": "lv_color_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "SCROLL_SNAP | int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -87578,19 +110461,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_top", - "function_specifiers": [], + "c_name": "lv_obj_get_style_shadow_color_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 9, + "column": 26, "file": "", - "line": 2182 + "line": 5529 }, "parameters": [ { "location": { - "column": 46, + "column": 80, "file": "", - "line": 2182 + "line": 5529 }, "name": "obj", "type": { @@ -87608,22 +110493,41 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 97, + "file": "", + "line": 5529 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_top", + "python_name": "get_style_shadow_color_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_color_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -87633,19 +110537,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_x", + "c_name": "lv_obj_get_style_shadow_offset_x", "function_specifiers": [], "location": { "column": 9, "file": "", - "line": 2180 + "line": 2137 }, "parameters": [ { "location": { - "column": 44, + "column": 57, "file": "", - "line": 2180 + "line": 2137 }, "name": "obj", "type": { @@ -87663,9 +110567,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 74, + "file": "", + "line": 2137 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_x", + "python_name": "get_style_shadow_offset_x", "receiver": "obj", "return_type": { "kind": "identifier", @@ -87688,19 +110609,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scroll_y", - "function_specifiers": [], + "c_name": "lv_obj_get_style_shadow_offset_x_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 9, + "column": 23, "file": "", - "line": 2181 + "line": 5511 }, "parameters": [ { "location": { - "column": 44, + "column": 80, "file": "", - "line": 2181 + "line": 5511 }, "name": "obj", "type": { @@ -87718,9 +110641,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 97, + "file": "", + "line": 5511 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scroll_y", + "python_name": "get_style_shadow_offset_x_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -87733,7 +110673,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -87743,26 +110685,29 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scrollbar_area", + "c_name": "lv_obj_get_style_shadow_offset_y", "function_specifiers": [], "location": { - "column": 6, + "column": 9, "file": "", - "line": 2197 + "line": 2138 }, "parameters": [ { "location": { - "column": 41, + "column": 57, "file": "", - "line": 2197 + "line": 2138 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] } }, "view": { @@ -87773,55 +110718,32 @@ }, { "location": { - "column": 58, - "file": "", - "line": 2197 - }, - "name": "hor", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" - } - }, - { - "location": { - "column": 75, + "column": 74, "file": "", - "line": 2197 + "line": 2138 }, - "name": "ver", + "name": "part", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t" - } + "kind": "identifier", + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_scrollbar_area", + "python_name": "get_style_shadow_offset_y", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -87835,19 +110757,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_scrollbar_mode", - "function_specifiers": [], + "c_name": "lv_obj_get_style_shadow_offset_y_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 21, + "column": 23, "file": "", - "line": 2176 + "line": 5517 }, "parameters": [ { "location": { - "column": 62, + "column": 80, "file": "", - "line": 2176 + "line": 5517 }, "name": "obj", "type": { @@ -87865,22 +110789,41 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 97, + "file": "", + "line": 5517 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_scrollbar_mode", + "python_name": "get_style_shadow_offset_y_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_scrollbar_mode_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "SCROLLBAR_MODE | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -87890,19 +110833,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_self_height", + "c_name": "lv_obj_get_style_shadow_opa", "function_specifiers": [], "location": { - "column": 9, + "column": 10, "file": "", - "line": 2133 + "line": 2142 }, "parameters": [ { "location": { - "column": 47, + "column": 53, "file": "", - "line": 2133 + "line": 2142 }, "name": "obj", "type": { @@ -87920,13 +110863,30 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 70, + "file": "", + "line": 2142 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_self_height", + "python_name": "get_style_shadow_opa", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_opa_t" }, "return_view": { "category": "scalar", @@ -87945,19 +110905,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_self_width", - "function_specifiers": [], + "c_name": "lv_obj_get_style_shadow_opa_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 9, + "column": 24, "file": "", - "line": 2132 + "line": 5541 }, "parameters": [ { "location": { - "column": 46, + "column": 76, "file": "", - "line": 2132 + "line": 5541 }, "name": "obj", "type": { @@ -87975,13 +110937,30 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 93, + "file": "", + "line": 5541 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_self_width", + "python_name": "get_style_shadow_opa_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_opa_t" }, "return_view": { "category": "scalar", @@ -87990,7 +110969,9 @@ }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -88000,19 +110981,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_sibling", + "c_name": "lv_obj_get_style_shadow_spread", "function_specifiers": [], "location": { - "column": 12, + "column": 9, "file": "", - "line": 2085 + "line": 2139 }, "parameters": [ { "location": { - "column": 46, + "column": 55, "file": "", - "line": 2085 + "line": 2139 }, "name": "obj", "type": { @@ -88033,35 +111014,32 @@ }, { "location": { - "column": 61, + "column": 72, "file": "", - "line": 2085 + "line": 2139 }, - "name": "idx", + "name": "part", "type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_part_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_sibling", + "python_name": "get_style_shadow_spread", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -88075,19 +111053,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_sibling_by_type", - "function_specifiers": [], + "c_name": "lv_obj_get_style_shadow_spread_internal", + "function_specifiers": [ + "inline" + ], "location": { - "column": 12, + "column": 23, "file": "", - "line": 2086 + "line": 5523 }, "parameters": [ { "location": { - "column": 54, + "column": 78, "file": "", - "line": 2086 + "line": 5523 }, "name": "obj", "type": { @@ -88108,62 +111088,38 @@ }, { "location": { - "column": 69, + "column": 95, "file": "", - "line": 2086 + "line": 5523 }, - "name": "idx", + "name": "part", "type": { "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 60, - "file": "", - "line": 2087 - }, - "name": "class_p", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_class_t", - "qualifiers": [ - "const" - ] - } + "name": "lv_part_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "obj_class_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" } } ], - "python_name": "get_sibling_by_type", + "python_name": "get_style_shadow_spread_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -88173,19 +111129,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_state", + "c_name": "lv_obj_get_style_shadow_width", "function_specifiers": [], "location": { - "column": 12, + "column": 9, "file": "", - "line": 3847 + "line": 2136 }, "parameters": [ { "location": { - "column": 44, + "column": 54, "file": "", - "line": 3847 + "line": 2136 }, "name": "obj", "type": { @@ -88203,18 +111159,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2136 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } } ], - "python_name": "get_state", + "python_name": "get_style_shadow_width", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_state_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "STATE | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -88228,21 +111201,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_align", + "c_name": "lv_obj_get_style_shadow_width_internal", "function_specifiers": [ "inline" ], "location": { - "column": 26, + "column": 23, "file": "", - "line": 2309 + "line": 5505 }, "parameters": [ { "location": { - "column": 64, + "column": 77, "file": "", - "line": 2309 + "line": 5505 }, "name": "obj", "type": { @@ -88263,9 +111236,9 @@ }, { "location": { - "column": 81, + "column": 94, "file": "", - "line": 2309 + "line": 5505 }, "name": "part", "type": { @@ -88279,16 +111252,16 @@ } } ], - "python_name": "get_style_align", + "python_name": "get_style_shadow_width_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_align_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -88304,21 +111277,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_anim", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_space_bottom", + "function_specifiers": [], "location": { - "column": 33, + "column": 9, "file": "", - "line": 2849 + "line": 2357 }, "parameters": [ { "location": { - "column": 70, + "column": 54, "file": "", - "line": 2849 + "line": 2357 }, "name": "obj", "type": { @@ -88339,9 +111310,9 @@ }, { "location": { - "column": 87, + "column": 71, "file": "", - "line": 2849 + "line": 2357 }, "name": "part", "type": { @@ -88355,28 +111326,20 @@ } } ], - "python_name": "get_style_anim", + "python_name": "get_style_space_bottom", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_anim_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "anim_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -88386,21 +111349,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_anim_duration", + "c_name": "lv_obj_get_style_space_bottom_internal", "function_specifiers": [ "inline" ], "location": { - "column": 24, + "column": 23, "file": "", - "line": 2854 + "line": 6019 }, "parameters": [ { "location": { - "column": 70, + "column": 77, "file": "", - "line": 2854 + "line": 6019 }, "name": "obj", "type": { @@ -88421,9 +111384,9 @@ }, { "location": { - "column": 87, + "column": 94, "file": "", - "line": 2854 + "line": 6019 }, "name": "part", "type": { @@ -88437,11 +111400,11 @@ } } ], - "python_name": "get_style_anim_duration", + "python_name": "get_style_space_bottom_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "uint32_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -88462,21 +111425,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_arc_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_space_left", + "function_specifiers": [], "location": { - "column": 26, + "column": 9, "file": "", - "line": 2674 + "line": 2354 }, "parameters": [ { "location": { - "column": 68, + "column": 52, "file": "", - "line": 2674 + "line": 2354 }, "name": "obj", "type": { @@ -88497,9 +111458,9 @@ }, { "location": { - "column": 85, + "column": 69, "file": "", - "line": 2674 + "line": 2354 }, "name": "part", "type": { @@ -88513,22 +111474,20 @@ } } ], - "python_name": "get_style_arc_color", + "python_name": "get_style_space_left", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "int32_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -88538,21 +111497,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_arc_color_filtered", + "c_name": "lv_obj_get_style_space_left_internal", "function_specifiers": [ "inline" ], "location": { - "column": 26, + "column": 23, "file": "", - "line": 2679 + "line": 5995 }, "parameters": [ { "location": { - "column": 77, + "column": 75, "file": "", - "line": 2679 + "line": 5995 }, "name": "obj", "type": { @@ -88573,9 +111532,9 @@ }, { "location": { - "column": 94, + "column": 92, "file": "", - "line": 2679 + "line": 5995 }, "name": "part", "type": { @@ -88589,16 +111548,16 @@ } } ], - "python_name": "get_style_arc_color_filtered", + "python_name": "get_style_space_left_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "int32_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -88614,21 +111573,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_arc_image_src", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_space_right", + "function_specifiers": [], "location": { - "column": 28, + "column": 9, "file": "", - "line": 2689 + "line": 2355 }, "parameters": [ { "location": { - "column": 74, + "column": 53, "file": "", - "line": 2689 + "line": 2355 }, "name": "obj", "type": { @@ -88649,9 +111606,9 @@ }, { "location": { - "column": 91, + "column": 70, "file": "", - "line": 2689 + "line": 2355 }, "name": "part", "type": { @@ -88665,28 +111622,20 @@ } } ], - "python_name": "get_style_arc_image_src", + "python_name": "get_style_space_right", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -88696,21 +111645,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_arc_opa", + "c_name": "lv_obj_get_style_space_right_internal", "function_specifiers": [ "inline" ], "location": { - "column": 24, + "column": 23, "file": "", - "line": 2684 + "line": 6003 }, "parameters": [ { "location": { - "column": 64, + "column": 76, "file": "", - "line": 2684 + "line": 6003 }, "name": "obj", "type": { @@ -88731,9 +111680,9 @@ }, { "location": { - "column": 81, + "column": 93, "file": "", - "line": 2684 + "line": 6003 }, "name": "part", "type": { @@ -88747,11 +111696,11 @@ } } ], - "python_name": "get_style_arc_opa", + "python_name": "get_style_space_right_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -88772,21 +111721,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_arc_rounded", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_space_top", + "function_specifiers": [], "location": { - "column": 20, + "column": 9, "file": "", - "line": 2669 + "line": 2356 }, "parameters": [ { "location": { - "column": 64, + "column": 51, "file": "", - "line": 2669 + "line": 2356 }, "name": "obj", "type": { @@ -88807,9 +111754,9 @@ }, { "location": { - "column": 81, + "column": 68, "file": "", - "line": 2669 + "line": 2356 }, "name": "part", "type": { @@ -88823,11 +111770,11 @@ } } ], - "python_name": "get_style_arc_rounded", + "python_name": "get_style_space_top", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -88836,9 +111783,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -88848,21 +111793,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_arc_width", + "c_name": "lv_obj_get_style_space_top_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2664 + "line": 6011 }, "parameters": [ { "location": { - "column": 65, + "column": 74, "file": "", - "line": 2664 + "line": 6011 }, "name": "obj", "type": { @@ -88883,9 +111828,9 @@ }, { "location": { - "column": 82, + "column": 91, "file": "", - "line": 2664 + "line": 6011 }, "name": "part", "type": { @@ -88899,7 +111844,7 @@ } } ], - "python_name": "get_style_arc_width", + "python_name": "get_style_space_top_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -88924,21 +111869,93 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_base_dir", + "c_name": "lv_obj_get_style_text_align", + "function_specifiers": [], + "location": { + "column": 17, + "file": "", + "line": 2168 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 2168 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 77, + "file": "", + "line": 2168 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_text_align", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_text_align_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_ALIGN | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_text_align_internal", "function_specifiers": [ "inline" ], "location": { - "column": 29, + "column": 31, "file": "", - "line": 2874 + "line": 5697 }, "parameters": [ { "location": { - "column": 70, + "column": 83, "file": "", - "line": 2874 + "line": 5697 }, "name": "obj", "type": { @@ -88959,9 +111976,9 @@ }, { "location": { - "column": 87, + "column": 100, "file": "", - "line": 2874 + "line": 5697 }, "name": "part", "type": { @@ -88975,16 +111992,16 @@ } } ], - "python_name": "get_style_base_dir", + "python_name": "get_style_text_align_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_base_dir_t" + "name": "lv_text_align_t" }, "return_view": { "category": "enum", "conversion": "enum_int", - "python_type": "BASE_DIR | int" + "python_type": "TEXT_ALIGN | int" }, "role": "object_method", "static": false, @@ -89000,21 +112017,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_color", + "function_specifiers": [], "location": { - "column": 26, + "column": 12, "file": "", - "line": 2429 + "line": 2161 }, "parameters": [ { "location": { - "column": 67, + "column": 55, "file": "", - "line": 2429 + "line": 2161 }, "name": "obj", "type": { @@ -89035,9 +112050,9 @@ }, { "location": { - "column": 84, + "column": 72, "file": "", - "line": 2429 + "line": 2161 }, "name": "part", "type": { @@ -89051,7 +112066,7 @@ } } ], - "python_name": "get_style_bg_color", + "python_name": "get_style_text_color", "receiver": "obj", "return_type": { "kind": "identifier", @@ -89064,9 +112079,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -89076,21 +112089,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_color_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_color_filtered", + "function_specifiers": [], "location": { - "column": 26, + "column": 12, "file": "", - "line": 2434 + "line": 2162 }, "parameters": [ { "location": { - "column": 76, + "column": 64, "file": "", - "line": 2434 + "line": 2162 }, "name": "obj", "type": { @@ -89111,9 +112122,9 @@ }, { "location": { - "column": 93, + "column": 81, "file": "", - "line": 2434 + "line": 2162 }, "name": "part", "type": { @@ -89127,7 +112138,7 @@ } } ], - "python_name": "get_style_bg_color_filtered", + "python_name": "get_style_text_color_filtered", "receiver": "obj", "return_type": { "kind": "identifier", @@ -89140,91 +112151,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_obj_get_style_bg_grad", - "function_specifiers": [ - "inline" - ], - "location": { - "column": 37, - "file": "", - "line": 2479 - }, - "parameters": [ - { - "location": { - "column": 77, - "file": "", - "line": 2479 - }, - "name": "obj", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" - } - }, - { - "location": { - "column": 94, - "file": "", - "line": 2479 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } - } - ], - "python_name": "get_style_bg_grad", - "receiver": "obj", - "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_grad_dsc_t", - "qualifiers": [ - "const" - ] - } - }, - "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "grad_dsc_t" - }, - "role": "object_method", - "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -89234,21 +112161,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_grad_color", + "c_name": "lv_obj_get_style_text_color_filtered_internal", "function_specifiers": [ "inline" ], "location": { "column": 26, "file": "", - "line": 2444 + "line": 5661 }, "parameters": [ { "location": { - "column": 72, + "column": 87, "file": "", - "line": 2444 + "line": 5661 }, "name": "obj", "type": { @@ -89269,9 +112196,9 @@ }, { "location": { - "column": 89, + "column": 104, "file": "", - "line": 2444 + "line": 5661 }, "name": "part", "type": { @@ -89285,7 +112212,7 @@ } } ], - "python_name": "get_style_bg_grad_color", + "python_name": "get_style_text_color_filtered_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -89310,21 +112237,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_grad_color_filtered", + "c_name": "lv_obj_get_style_text_color_internal", "function_specifiers": [ "inline" ], "location": { "column": 26, "file": "", - "line": 2449 + "line": 5655 }, "parameters": [ { "location": { - "column": 81, + "column": 78, "file": "", - "line": 2449 + "line": 5655 }, "name": "obj", "type": { @@ -89345,9 +112272,9 @@ }, { "location": { - "column": 98, + "column": 95, "file": "", - "line": 2449 + "line": 5655 }, "name": "part", "type": { @@ -89361,7 +112288,7 @@ } } ], - "python_name": "get_style_bg_grad_color_filtered", + "python_name": "get_style_text_color_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -89386,21 +112313,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_grad_dir", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_decor", + "function_specifiers": [], "location": { - "column": 29, + "column": 17, "file": "", - "line": 2454 + "line": 2167 }, "parameters": [ { "location": { - "column": 73, + "column": 60, "file": "", - "line": 2454 + "line": 2167 }, "name": "obj", "type": { @@ -89421,9 +112346,9 @@ }, { "location": { - "column": 90, + "column": 77, "file": "", - "line": 2454 + "line": 2167 }, "name": "part", "type": { @@ -89437,22 +112362,20 @@ } } ], - "python_name": "get_style_bg_grad_dir", + "python_name": "get_style_text_decor", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_grad_dir_t" + "name": "lv_text_decor_t" }, "return_view": { "category": "enum", "conversion": "enum_int", - "python_type": "GRAD_DIR | int" + "python_type": "TEXT_DECOR | int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -89462,21 +112385,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_grad_opa", + "c_name": "lv_obj_get_style_text_decor_internal", "function_specifiers": [ "inline" ], "location": { - "column": 24, + "column": 31, "file": "", - "line": 2474 + "line": 5691 }, "parameters": [ { "location": { - "column": 68, + "column": 83, "file": "", - "line": 2474 + "line": 5691 }, "name": "obj", "type": { @@ -89497,9 +112420,9 @@ }, { "location": { - "column": 85, + "column": 100, "file": "", - "line": 2474 + "line": 5691 }, "name": "part", "type": { @@ -89513,16 +112436,16 @@ } } ], - "python_name": "get_style_bg_grad_opa", + "python_name": "get_style_text_decor_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "lv_text_decor_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_DECOR | int" }, "role": "object_method", "static": false, @@ -89538,21 +112461,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_grad_stop", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_font", + "function_specifiers": [], "location": { - "column": 23, + "column": 19, "file": "", - "line": 2464 + "line": 2164 }, "parameters": [ { "location": { - "column": 68, + "column": 61, "file": "", - "line": 2464 + "line": 2164 }, "name": "obj", "type": { @@ -89573,9 +112494,9 @@ }, { "location": { - "column": 85, + "column": 78, "file": "", - "line": 2464 + "line": 2164 }, "name": "part", "type": { @@ -89589,22 +112510,26 @@ } } ], - "python_name": "get_style_bg_grad_stop", + "python_name": "get_style_text_font", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -89614,21 +112539,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_image_opa", + "c_name": "lv_obj_get_style_text_font_internal", "function_specifiers": [ "inline" ], "location": { - "column": 24, + "column": 33, "file": "", - "line": 2489 + "line": 5673 }, "parameters": [ { "location": { - "column": 69, + "column": 84, "file": "", - "line": 2489 + "line": 5673 }, "name": "obj", "type": { @@ -89649,9 +112574,9 @@ }, { "location": { - "column": 86, + "column": 101, "file": "", - "line": 2489 + "line": 5673 }, "name": "part", "type": { @@ -89665,16 +112590,22 @@ } } ], - "python_name": "get_style_bg_image_opa", + "python_name": "get_style_text_font_internal", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" }, "role": "object_method", "static": false, @@ -89690,21 +112621,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_image_recolor", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_leading_trim", + "function_specifiers": [], "location": { - "column": 26, + "column": 24, "file": "", - "line": 2494 + "line": 2173 }, "parameters": [ { "location": { - "column": 75, + "column": 74, "file": "", - "line": 2494 + "line": 2173 }, "name": "obj", "type": { @@ -89725,9 +112654,9 @@ }, { "location": { - "column": 92, + "column": 91, "file": "", - "line": 2494 + "line": 2173 }, "name": "part", "type": { @@ -89741,22 +112670,20 @@ } } ], - "python_name": "get_style_bg_image_recolor", + "python_name": "get_style_text_leading_trim", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "lv_text_leading_trim_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -89766,21 +112693,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_image_recolor_filtered", + "c_name": "lv_obj_get_style_text_leading_trim_internal", "function_specifiers": [ "inline" ], "location": { - "column": 26, + "column": 38, "file": "", - "line": 2499 + "line": 5727 }, "parameters": [ { "location": { - "column": 84, + "column": 97, "file": "", - "line": 2499 + "line": 5727 }, "name": "obj", "type": { @@ -89801,9 +112728,9 @@ }, { "location": { - "column": 101, + "column": 114, "file": "", - "line": 2499 + "line": 5727 }, "name": "part", "type": { @@ -89817,16 +112744,16 @@ } } ], - "python_name": "get_style_bg_image_recolor_filtered", + "python_name": "get_style_text_leading_trim_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "lv_text_leading_trim_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" }, "role": "object_method", "static": false, @@ -89842,21 +112769,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_image_recolor_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_letter_space", + "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 2504 + "line": 2165 }, "parameters": [ { "location": { - "column": 77, + "column": 59, "file": "", - "line": 2504 + "line": 2165 }, "name": "obj", "type": { @@ -89877,9 +112802,9 @@ }, { "location": { - "column": 94, + "column": 76, "file": "", - "line": 2504 + "line": 2165 }, "name": "part", "type": { @@ -89893,11 +112818,11 @@ } } ], - "python_name": "get_style_bg_image_recolor_opa", + "python_name": "get_style_text_letter_space", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -89906,91 +112831,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_obj_get_style_bg_image_src", - "function_specifiers": [ - "inline" - ], - "location": { - "column": 28, - "file": "", - "line": 2484 - }, - "parameters": [ - { - "location": { - "column": 73, - "file": "", - "line": 2484 - }, - "name": "obj", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" - } - }, - { - "location": { - "column": 90, - "file": "", - "line": 2484 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } - } - ], - "python_name": "get_style_bg_image_src", - "receiver": "obj", - "return_type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void", - "qualifiers": [ - "const" - ] - } - }, - "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - }, - "role": "object_method", - "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -90000,21 +112841,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_image_tiled", + "c_name": "lv_obj_get_style_text_letter_space_internal", "function_specifiers": [ "inline" ], "location": { - "column": 20, + "column": 23, "file": "", - "line": 2509 + "line": 5679 }, "parameters": [ { "location": { - "column": 67, + "column": 82, "file": "", - "line": 2509 + "line": 5679 }, "name": "obj", "type": { @@ -90035,9 +112876,9 @@ }, { "location": { - "column": 84, + "column": 99, "file": "", - "line": 2509 + "line": 5679 }, "name": "part", "type": { @@ -90051,11 +112892,11 @@ } } ], - "python_name": "get_style_bg_image_tiled", + "python_name": "get_style_text_letter_space_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -90076,21 +112917,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_main_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_line_space", + "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 2469 + "line": 2166 }, "parameters": [ { "location": { - "column": 68, + "column": 57, "file": "", - "line": 2469 + "line": 2166 }, "name": "obj", "type": { @@ -90111,9 +112950,9 @@ }, { "location": { - "column": 85, + "column": 74, "file": "", - "line": 2469 + "line": 2166 }, "name": "part", "type": { @@ -90127,11 +112966,11 @@ } } ], - "python_name": "get_style_bg_main_opa", + "python_name": "get_style_text_line_space", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -90140,9 +112979,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -90152,21 +112989,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_main_stop", + "c_name": "lv_obj_get_style_text_line_space_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2459 + "line": 5685 }, "parameters": [ { "location": { - "column": 68, + "column": 80, "file": "", - "line": 2459 + "line": 5685 }, "name": "obj", "type": { @@ -90187,9 +113024,9 @@ }, { "location": { - "column": 85, + "column": 97, "file": "", - "line": 2459 + "line": 5685 }, "name": "part", "type": { @@ -90203,7 +113040,7 @@ } } ], - "python_name": "get_style_bg_main_stop", + "python_name": "get_style_text_line_space_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -90228,21 +113065,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bg_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_opa", + "function_specifiers": [], "location": { - "column": 24, + "column": 10, "file": "", - "line": 2439 + "line": 2163 }, "parameters": [ { "location": { - "column": 63, + "column": 51, "file": "", - "line": 2439 + "line": 2163 }, "name": "obj", "type": { @@ -90263,9 +113098,9 @@ }, { "location": { - "column": 80, + "column": 68, "file": "", - "line": 2439 + "line": 2163 }, "name": "part", "type": { @@ -90279,7 +113114,7 @@ } } ], - "python_name": "get_style_bg_opa", + "python_name": "get_style_text_opa", "receiver": "obj", "return_type": { "kind": "identifier", @@ -90292,9 +113127,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -90304,21 +113137,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_bitmap_mask_src", + "c_name": "lv_obj_get_style_text_opa_internal", "function_specifiers": [ "inline" ], "location": { - "column": 28, + "column": 24, "file": "", - "line": 2879 + "line": 5667 }, "parameters": [ { "location": { - "column": 76, + "column": 74, "file": "", - "line": 2879 + "line": 5667 }, "name": "obj", "type": { @@ -90339,9 +113172,9 @@ }, { "location": { - "column": 93, + "column": 91, "file": "", - "line": 2879 + "line": 5667 }, "name": "part", "type": { @@ -90355,22 +113188,16 @@ } } ], - "python_name": "get_style_bitmap_mask_src", + "python_name": "get_style_text_opa_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "lv_opa_t" }, "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -90386,21 +113213,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_blend_mode", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_outline_stroke_color", + "function_specifiers": [], "location": { - "column": 31, + "column": 12, "file": "", - "line": 2864 + "line": 2169 }, "parameters": [ { "location": { - "column": 74, + "column": 70, "file": "", - "line": 2864 + "line": 2169 }, "name": "obj", "type": { @@ -90421,9 +113246,9 @@ }, { "location": { - "column": 91, + "column": 87, "file": "", - "line": 2864 + "line": 2169 }, "name": "part", "type": { @@ -90437,22 +113262,20 @@ } } ], - "python_name": "get_style_blend_mode", + "python_name": "get_style_text_outline_stroke_color", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_blend_mode_t" + "name": "lv_color_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "BLEND_MODE | int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -90462,21 +113285,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_blur_backdrop", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_outline_stroke_color_filtered", + "function_specifiers": [], "location": { - "column": 20, + "column": 12, "file": "", - "line": 2759 + "line": 2170 }, "parameters": [ { "location": { - "column": 66, + "column": 79, "file": "", - "line": 2759 + "line": 2170 }, "name": "obj", "type": { @@ -90497,9 +113318,9 @@ }, { "location": { - "column": 83, + "column": 96, "file": "", - "line": 2759 + "line": 2170 }, "name": "part", "type": { @@ -90513,22 +113334,20 @@ } } ], - "python_name": "get_style_blur_backdrop", + "python_name": "get_style_text_outline_stroke_color_filtered", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "lv_color_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -90538,21 +113357,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_blur_quality", + "c_name": "lv_obj_get_style_text_outline_stroke_color_filtered_internal", "function_specifiers": [ "inline" ], "location": { - "column": 33, + "column": 26, "file": "", - "line": 2764 + "line": 5709 }, "parameters": [ { "location": { - "column": 78, + "column": 102, "file": "", - "line": 2764 + "line": 5709 }, "name": "obj", "type": { @@ -90573,9 +113392,9 @@ }, { "location": { - "column": 95, + "column": 119, "file": "", - "line": 2764 + "line": 5709 }, "name": "part", "type": { @@ -90589,16 +113408,16 @@ } } ], - "python_name": "get_style_blur_quality", + "python_name": "get_style_text_outline_stroke_color_filtered_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_blur_quality_t" + "name": "lv_color_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "BLUR_QUALITY | int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, @@ -90614,21 +113433,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_blur_radius", + "c_name": "lv_obj_get_style_text_outline_stroke_color_internal", "function_specifiers": [ "inline" ], "location": { - "column": 23, + "column": 26, "file": "", - "line": 2754 + "line": 5703 }, "parameters": [ { "location": { - "column": 67, + "column": 93, "file": "", - "line": 2754 + "line": 5703 }, "name": "obj", "type": { @@ -90649,9 +113468,9 @@ }, { "location": { - "column": 84, + "column": 110, "file": "", - "line": 2754 + "line": 5703 }, "name": "part", "type": { @@ -90665,16 +113484,16 @@ } } ], - "python_name": "get_style_blur_radius", + "python_name": "get_style_text_outline_stroke_color_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_color_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" }, "role": "object_method", "static": false, @@ -90690,21 +113509,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_border_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_outline_stroke_opa", + "function_specifiers": [], "location": { - "column": 26, + "column": 10, "file": "", - "line": 2514 + "line": 2172 }, "parameters": [ { "location": { - "column": 71, + "column": 66, "file": "", - "line": 2514 + "line": 2172 }, "name": "obj", "type": { @@ -90725,9 +113542,9 @@ }, { "location": { - "column": 88, + "column": 83, "file": "", - "line": 2514 + "line": 2172 }, "name": "part", "type": { @@ -90741,22 +113558,20 @@ } } ], - "python_name": "get_style_border_color", + "python_name": "get_style_text_outline_stroke_opa", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "lv_opa_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -90766,21 +113581,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_border_color_filtered", + "c_name": "lv_obj_get_style_text_outline_stroke_opa_internal", "function_specifiers": [ "inline" ], "location": { - "column": 26, + "column": 24, "file": "", - "line": 2519 + "line": 5721 }, "parameters": [ { "location": { - "column": 80, + "column": 89, "file": "", - "line": 2519 + "line": 5721 }, "name": "obj", "type": { @@ -90801,9 +113616,9 @@ }, { "location": { - "column": 97, + "column": 106, "file": "", - "line": 2519 + "line": 5721 }, "name": "part", "type": { @@ -90817,16 +113632,16 @@ } } ], - "python_name": "get_style_border_color_filtered", + "python_name": "get_style_text_outline_stroke_opa_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "lv_opa_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -90842,21 +113657,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_border_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_text_outline_stroke_width", + "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 2524 + "line": 2171 }, "parameters": [ { "location": { "column": 67, "file": "", - "line": 2524 + "line": 2171 }, "name": "obj", "type": { @@ -90879,7 +113692,7 @@ "location": { "column": 84, "file": "", - "line": 2524 + "line": 2171 }, "name": "part", "type": { @@ -90893,11 +113706,11 @@ } } ], - "python_name": "get_style_border_opa", + "python_name": "get_style_text_outline_stroke_width", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -90906,9 +113719,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -90918,21 +113729,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_border_post", + "c_name": "lv_obj_get_style_text_outline_stroke_width_internal", "function_specifiers": [ "inline" ], "location": { - "column": 20, + "column": 23, "file": "", - "line": 2539 + "line": 5715 }, "parameters": [ { "location": { - "column": 64, + "column": 90, "file": "", - "line": 2539 + "line": 5715 }, "name": "obj", "type": { @@ -90953,9 +113764,9 @@ }, { "location": { - "column": 81, + "column": 107, "file": "", - "line": 2539 + "line": 5715 }, "name": "part", "type": { @@ -90969,11 +113780,11 @@ } } ], - "python_name": "get_style_border_post", + "python_name": "get_style_text_outline_stroke_width_internal", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -90994,21 +113805,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_border_side", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_height", + "function_specifiers": [], "location": { - "column": 32, + "column": 9, "file": "", - "line": 2534 + "line": 2086 }, "parameters": [ { "location": { - "column": 76, + "column": 58, "file": "", - "line": 2534 + "line": 2086 }, "name": "obj", "type": { @@ -91029,9 +113838,9 @@ }, { "location": { - "column": 93, + "column": 75, "file": "", - "line": 2534 + "line": 2086 }, "name": "part", "type": { @@ -91045,22 +113854,20 @@ } } ], - "python_name": "get_style_border_side", + "python_name": "get_style_transform_height", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_border_side_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "BORDER_SIDE | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -91070,21 +113877,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_border_width", + "c_name": "lv_obj_get_style_transform_height_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2529 + "line": 5205 }, "parameters": [ { "location": { - "column": 68, + "column": 81, "file": "", - "line": 2529 + "line": 5205 }, "name": "obj", "type": { @@ -91105,9 +113912,9 @@ }, { "location": { - "column": 85, + "column": 98, "file": "", - "line": 2529 + "line": 5205 }, "name": "part", "type": { @@ -91121,7 +113928,7 @@ } } ], - "python_name": "get_style_border_width", + "python_name": "get_style_transform_height_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -91146,125 +113953,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_clamped_height", - "function_specifiers": [], - "location": { - "column": 9, - "file": "", - "line": 2135 - }, - "parameters": [ - { - "location": { - "column": 50, - "file": "", - "line": 2135 - }, - "name": "obj", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } - }, - "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" - } - } - ], - "python_name": "get_style_clamped_height", - "receiver": "obj", - "return_type": { - "kind": "identifier", - "name": "int32_t" - }, - "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - }, - "role": "object_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_obj_get_style_clamped_width", + "c_name": "lv_obj_get_style_transform_pivot_x", "function_specifiers": [], "location": { "column": 9, "file": "", - "line": 2134 - }, - "parameters": [ - { - "location": { - "column": 49, - "file": "", - "line": 2134 - }, - "name": "obj", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } - }, - "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" - } - } - ], - "python_name": "get_style_clamped_width", - "receiver": "obj", - "return_type": { - "kind": "identifier", - "name": "int32_t" - }, - "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - }, - "role": "object_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_obj_get_style_clip_corner", - "function_specifiers": [ - "inline" - ], - "location": { - "column": 20, - "file": "", - "line": 2814 + "line": 2093 }, "parameters": [ { "location": { - "column": 64, + "column": 59, "file": "", - "line": 2814 + "line": 2093 }, "name": "obj", "type": { @@ -91285,9 +113986,9 @@ }, { "location": { - "column": 81, + "column": 76, "file": "", - "line": 2814 + "line": 2093 }, "name": "part", "type": { @@ -91301,11 +114002,11 @@ } } ], - "python_name": "get_style_clip_corner", + "python_name": "get_style_transform_pivot_x", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -91314,9 +114015,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -91326,21 +114025,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_color_filter_dsc", + "c_name": "lv_obj_get_style_transform_pivot_x_internal", "function_specifiers": [ "inline" ], "location": { - "column": 45, + "column": 23, "file": "", - "line": 2829 + "line": 5247 }, "parameters": [ { "location": { - "column": 94, + "column": 82, "file": "", - "line": 2829 + "line": 5247 }, "name": "obj", "type": { @@ -91361,9 +114060,9 @@ }, { "location": { - "column": 111, + "column": 99, "file": "", - "line": 2829 + "line": 5247 }, "name": "part", "type": { @@ -91377,22 +114076,16 @@ } } ], - "python_name": "get_style_color_filter_dsc", + "python_name": "get_style_transform_pivot_x_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_color_filter_dsc_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "color_filter_dsc_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -91408,21 +114101,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_color_filter_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_pivot_y", + "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 2834 + "line": 2094 }, "parameters": [ { "location": { - "column": 73, + "column": 59, "file": "", - "line": 2834 + "line": 2094 }, "name": "obj", "type": { @@ -91443,9 +114134,9 @@ }, { "location": { - "column": 90, + "column": 76, "file": "", - "line": 2834 + "line": 2094 }, "name": "part", "type": { @@ -91459,11 +114150,11 @@ } } ], - "python_name": "get_style_color_filter_opa", + "python_name": "get_style_transform_pivot_y", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -91472,9 +114163,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -91484,21 +114173,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_drop_shadow_color", + "c_name": "lv_obj_get_style_transform_pivot_y_internal", "function_specifiers": [ "inline" ], "location": { - "column": 26, + "column": 23, "file": "", - "line": 2784 + "line": 5253 }, "parameters": [ { "location": { - "column": 76, + "column": 82, "file": "", - "line": 2784 + "line": 5253 }, "name": "obj", "type": { @@ -91519,9 +114208,9 @@ }, { "location": { - "column": 93, + "column": 99, "file": "", - "line": 2784 + "line": 5253 }, "name": "part", "type": { @@ -91535,16 +114224,16 @@ } } ], - "python_name": "get_style_drop_shadow_color", + "python_name": "get_style_transform_pivot_y_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "int32_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -91560,21 +114249,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_drop_shadow_color_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_rotation", + "function_specifiers": [], "location": { - "column": 26, + "column": 9, "file": "", - "line": 2789 + "line": 2092 }, "parameters": [ { "location": { - "column": 85, + "column": 60, "file": "", - "line": 2789 + "line": 2092 }, "name": "obj", "type": { @@ -91595,9 +114282,9 @@ }, { "location": { - "column": 102, + "column": 77, "file": "", - "line": 2789 + "line": 2092 }, "name": "part", "type": { @@ -91611,22 +114298,20 @@ } } ], - "python_name": "get_style_drop_shadow_color_filtered", + "python_name": "get_style_transform_rotation", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "int32_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -91636,21 +114321,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_drop_shadow_offset_x", + "c_name": "lv_obj_get_style_transform_rotation_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2774 + "line": 5241 }, "parameters": [ { "location": { - "column": 76, + "column": 83, "file": "", - "line": 2774 + "line": 5241 }, "name": "obj", "type": { @@ -91671,9 +114356,9 @@ }, { "location": { - "column": 93, + "column": 100, "file": "", - "line": 2774 + "line": 5241 }, "name": "part", "type": { @@ -91687,7 +114372,7 @@ } } ], - "python_name": "get_style_drop_shadow_offset_x", + "python_name": "get_style_transform_rotation_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -91712,21 +114397,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_drop_shadow_offset_y", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_scale_x", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2779 + "line": 2090 }, "parameters": [ { "location": { - "column": 76, + "column": 59, "file": "", - "line": 2779 + "line": 2090 }, "name": "obj", "type": { @@ -91747,9 +114430,9 @@ }, { "location": { - "column": 93, + "column": 76, "file": "", - "line": 2779 + "line": 2090 }, "name": "part", "type": { @@ -91763,7 +114446,7 @@ } } ], - "python_name": "get_style_drop_shadow_offset_y", + "python_name": "get_style_transform_scale_x", "receiver": "obj", "return_type": { "kind": "identifier", @@ -91776,9 +114459,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -91788,21 +114469,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_drop_shadow_opa", + "c_name": "lv_obj_get_style_transform_scale_x_internal", "function_specifiers": [ "inline" ], "location": { - "column": 24, + "column": 23, "file": "", - "line": 2794 + "line": 5229 }, "parameters": [ { "location": { - "column": 72, + "column": 82, "file": "", - "line": 2794 + "line": 5229 }, "name": "obj", "type": { @@ -91823,9 +114504,9 @@ }, { "location": { - "column": 89, + "column": 99, "file": "", - "line": 2794 + "line": 5229 }, "name": "part", "type": { @@ -91839,11 +114520,11 @@ } } ], - "python_name": "get_style_drop_shadow_opa", + "python_name": "get_style_transform_scale_x_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -91864,21 +114545,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_drop_shadow_quality", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_scale_x_safe", + "function_specifiers": [], "location": { - "column": 33, + "column": 9, "file": "", - "line": 2799 + "line": 2359 }, "parameters": [ { "location": { - "column": 85, + "column": 64, "file": "", - "line": 2799 + "line": 2359 }, "name": "obj", "type": { @@ -91899,9 +114578,9 @@ }, { "location": { - "column": 102, + "column": 81, "file": "", - "line": 2799 + "line": 2359 }, "name": "part", "type": { @@ -91915,22 +114594,20 @@ } } ], - "python_name": "get_style_drop_shadow_quality", + "python_name": "get_style_transform_scale_x_safe", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_blur_quality_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "BLUR_QUALITY | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -91940,21 +114617,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_drop_shadow_radius", + "c_name": "lv_obj_get_style_transform_scale_x_safe_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2769 + "line": 6027 }, "parameters": [ { "location": { - "column": 74, + "column": 87, "file": "", - "line": 2769 + "line": 6027 }, "name": "obj", "type": { @@ -91975,9 +114652,9 @@ }, { "location": { - "column": 91, + "column": 104, "file": "", - "line": 2769 + "line": 6027 }, "name": "part", "type": { @@ -91991,7 +114668,7 @@ } } ], - "python_name": "get_style_drop_shadow_radius", + "python_name": "get_style_transform_scale_x_safe_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -92016,21 +114693,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_flex_cross_place", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_scale_y", + "function_specifiers": [], "location": { - "column": 31, + "column": 9, "file": "", - "line": 2899 + "line": 2091 }, "parameters": [ { "location": { - "column": 80, + "column": 59, "file": "", - "line": 2899 + "line": 2091 }, "name": "obj", "type": { @@ -92051,9 +114726,9 @@ }, { "location": { - "column": 97, + "column": 76, "file": "", - "line": 2899 + "line": 2091 }, "name": "part", "type": { @@ -92067,22 +114742,20 @@ } } ], - "python_name": "get_style_flex_cross_place", + "python_name": "get_style_transform_scale_y", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_flex_align_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FLEX_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -92092,21 +114765,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_flex_flow", + "c_name": "lv_obj_get_style_transform_scale_y_internal", "function_specifiers": [ "inline" ], "location": { - "column": 30, + "column": 23, "file": "", - "line": 2889 + "line": 5235 }, "parameters": [ { "location": { - "column": 72, + "column": 82, "file": "", - "line": 2889 + "line": 5235 }, "name": "obj", "type": { @@ -92127,9 +114800,9 @@ }, { "location": { - "column": 89, + "column": 99, "file": "", - "line": 2889 + "line": 5235 }, "name": "part", "type": { @@ -92143,16 +114816,16 @@ } } ], - "python_name": "get_style_flex_flow", + "python_name": "get_style_transform_scale_y_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_flex_flow_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FLEX_FLOW | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -92168,21 +114841,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_flex_grow", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_scale_y_safe", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2909 + "line": 2360 }, "parameters": [ { "location": { - "column": 65, + "column": 64, "file": "", - "line": 2909 + "line": 2360 }, "name": "obj", "type": { @@ -92203,9 +114874,9 @@ }, { "location": { - "column": 82, + "column": 81, "file": "", - "line": 2909 + "line": 2360 }, "name": "part", "type": { @@ -92219,11 +114890,11 @@ } } ], - "python_name": "get_style_flex_grow", + "python_name": "get_style_transform_scale_y_safe", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "uint8_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -92232,9 +114903,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -92244,21 +114913,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_flex_main_place", + "c_name": "lv_obj_get_style_transform_scale_y_safe_internal", "function_specifiers": [ "inline" ], "location": { - "column": 31, + "column": 23, "file": "", - "line": 2894 + "line": 6033 }, "parameters": [ { "location": { - "column": 79, + "column": 87, "file": "", - "line": 2894 + "line": 6033 }, "name": "obj", "type": { @@ -92279,9 +114948,9 @@ }, { "location": { - "column": 96, + "column": 104, "file": "", - "line": 2894 + "line": 6033 }, "name": "part", "type": { @@ -92295,16 +114964,16 @@ } } ], - "python_name": "get_style_flex_main_place", + "python_name": "get_style_transform_scale_y_safe_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_flex_align_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FLEX_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -92320,21 +114989,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_flex_track_place", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_skew_x", + "function_specifiers": [], "location": { - "column": 31, + "column": 9, "file": "", - "line": 2904 + "line": 2095 }, "parameters": [ { "location": { - "column": 80, + "column": 58, "file": "", - "line": 2904 + "line": 2095 }, "name": "obj", "type": { @@ -92355,9 +115022,9 @@ }, { "location": { - "column": 97, + "column": 75, "file": "", - "line": 2904 + "line": 2095 }, "name": "part", "type": { @@ -92371,22 +115038,20 @@ } } ], - "python_name": "get_style_flex_track_place", + "python_name": "get_style_transform_skew_x", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_flex_align_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FLEX_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -92396,21 +115061,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_cell_column_pos", + "c_name": "lv_obj_get_style_transform_skew_x_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2934 + "line": 5259 }, "parameters": [ { "location": { - "column": 76, + "column": 81, "file": "", - "line": 2934 + "line": 5259 }, "name": "obj", "type": { @@ -92431,9 +115096,9 @@ }, { "location": { - "column": 93, + "column": 98, "file": "", - "line": 2934 + "line": 5259 }, "name": "part", "type": { @@ -92447,7 +115112,7 @@ } } ], - "python_name": "get_style_grid_cell_column_pos", + "python_name": "get_style_transform_skew_x_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -92472,21 +115137,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_cell_column_span", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_skew_y", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2944 + "line": 2096 }, "parameters": [ { "location": { - "column": 77, + "column": 58, "file": "", - "line": 2944 + "line": 2096 }, "name": "obj", "type": { @@ -92507,9 +115170,9 @@ }, { "location": { - "column": 94, + "column": 75, "file": "", - "line": 2944 + "line": 2096 }, "name": "part", "type": { @@ -92523,7 +115186,7 @@ } } ], - "python_name": "get_style_grid_cell_column_span", + "python_name": "get_style_transform_skew_y", "receiver": "obj", "return_type": { "kind": "identifier", @@ -92536,9 +115199,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -92548,21 +115209,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_cell_row_pos", + "c_name": "lv_obj_get_style_transform_skew_y_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2949 + "line": 5265 }, "parameters": [ { "location": { - "column": 73, + "column": 81, "file": "", - "line": 2949 + "line": 5265 }, "name": "obj", "type": { @@ -92583,9 +115244,9 @@ }, { "location": { - "column": 90, + "column": 98, "file": "", - "line": 2949 + "line": 5265 }, "name": "part", "type": { @@ -92599,7 +115260,7 @@ } } ], - "python_name": "get_style_grid_cell_row_pos", + "python_name": "get_style_transform_skew_y_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -92624,21 +115285,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_cell_row_span", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_transform_width", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2959 + "line": 2085 }, "parameters": [ { "location": { - "column": 74, + "column": 57, "file": "", - "line": 2959 + "line": 2085 }, "name": "obj", "type": { @@ -92659,9 +115318,9 @@ }, { "location": { - "column": 91, + "column": 74, "file": "", - "line": 2959 + "line": 2085 }, "name": "part", "type": { @@ -92675,7 +115334,7 @@ } } ], - "python_name": "get_style_grid_cell_row_span", + "python_name": "get_style_transform_width", "receiver": "obj", "return_type": { "kind": "identifier", @@ -92688,9 +115347,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -92700,21 +115357,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_cell_x_align", + "c_name": "lv_obj_get_style_transform_width_internal", "function_specifiers": [ "inline" ], "location": { - "column": 31, + "column": 23, "file": "", - "line": 2939 + "line": 5199 }, "parameters": [ { "location": { - "column": 81, + "column": 80, "file": "", - "line": 2939 + "line": 5199 }, "name": "obj", "type": { @@ -92735,9 +115392,9 @@ }, { "location": { - "column": 98, + "column": 97, "file": "", - "line": 2939 + "line": 5199 }, "name": "part", "type": { @@ -92751,16 +115408,16 @@ } } ], - "python_name": "get_style_grid_cell_x_align", + "python_name": "get_style_transform_width_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_grid_align_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -92776,21 +115433,99 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_cell_y_align", + "c_name": "lv_obj_get_style_transition", + "function_specifiers": [], + "location": { + "column": 35, + "file": "", + "line": 2195 + }, + "parameters": [ + { + "location": { + "column": 78, + "file": "", + "line": 2195 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 95, + "file": "", + "line": 2195 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + } + ], + "python_name": "get_style_transition", + "receiver": "obj", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_transition_dsc_t", + "qualifiers": [ + "const" + ] + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_transition_dsc_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_get_style_transition_internal", "function_specifiers": [ "inline" ], "location": { - "column": 31, + "column": 49, "file": "", - "line": 2954 + "line": 5859 }, "parameters": [ { "location": { - "column": 81, + "column": 101, "file": "", - "line": 2954 + "line": 5859 }, "name": "obj", "type": { @@ -92811,9 +115546,9 @@ }, { "location": { - "column": 98, + "column": 118, "file": "", - "line": 2954 + "line": 5859 }, "name": "part", "type": { @@ -92827,16 +115562,22 @@ } } ], - "python_name": "get_style_grid_cell_y_align", + "python_name": "get_style_transition_internal", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_grid_align_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_transition_dsc_t", + "qualifiers": [ + "const" + ] + } }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_transition_dsc_t" }, "role": "object_method", "static": false, @@ -92852,21 +115593,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_column_align", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_translate_radial", + "function_specifiers": [], "location": { - "column": 31, + "column": 9, "file": "", - "line": 2919 + "line": 2089 }, "parameters": [ { "location": { - "column": 81, + "column": 58, "file": "", - "line": 2919 + "line": 2089 }, "name": "obj", "type": { @@ -92887,9 +115626,9 @@ }, { "location": { - "column": 98, + "column": 75, "file": "", - "line": 2919 + "line": 2089 }, "name": "part", "type": { @@ -92903,22 +115642,20 @@ } } ], - "python_name": "get_style_grid_column_align", + "python_name": "get_style_translate_radial", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_grid_align_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -92928,21 +115665,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_column_dsc_array", + "c_name": "lv_obj_get_style_translate_radial_internal", "function_specifiers": [ "inline" ], "location": { - "column": 31, + "column": 23, "file": "", - "line": 2914 + "line": 5223 }, "parameters": [ { "location": { - "column": 85, + "column": 81, "file": "", - "line": 2914 + "line": 5223 }, "name": "obj", "type": { @@ -92963,9 +115700,9 @@ }, { "location": { - "column": 102, + "column": 98, "file": "", - "line": 2914 + "line": 5223 }, "name": "part", "type": { @@ -92979,22 +115716,16 @@ } } ], - "python_name": "get_style_grid_column_dsc_array", + "python_name": "get_style_translate_radial_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "int32_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "typed_buffer", - "conversion": "typed_buffer", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -93010,21 +115741,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_row_align", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_translate_x", + "function_specifiers": [], "location": { - "column": 31, + "column": 9, "file": "", - "line": 2929 + "line": 2087 }, "parameters": [ { "location": { - "column": 78, + "column": 53, "file": "", - "line": 2929 + "line": 2087 }, "name": "obj", "type": { @@ -93045,9 +115774,9 @@ }, { "location": { - "column": 95, + "column": 70, "file": "", - "line": 2929 + "line": 2087 }, "name": "part", "type": { @@ -93061,22 +115790,20 @@ } } ], - "python_name": "get_style_grid_row_align", + "python_name": "get_style_translate_x", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_grid_align_t" + "name": "int32_t" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -93086,21 +115813,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_grid_row_dsc_array", + "c_name": "lv_obj_get_style_translate_x_internal", "function_specifiers": [ "inline" ], "location": { - "column": 31, + "column": 23, "file": "", - "line": 2924 + "line": 5211 }, "parameters": [ { "location": { - "column": 82, + "column": 76, "file": "", - "line": 2924 + "line": 5211 }, "name": "obj", "type": { @@ -93121,9 +115848,9 @@ }, { "location": { - "column": 99, + "column": 93, "file": "", - "line": 2924 + "line": 5211 }, "name": "part", "type": { @@ -93137,22 +115864,16 @@ } } ], - "python_name": "get_style_grid_row_dsc_array", + "python_name": "get_style_translate_x_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "int32_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "typed_buffer", - "conversion": "typed_buffer", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -93168,21 +115889,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_height", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_translate_y", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2279 + "line": 2088 }, "parameters": [ { "location": { - "column": 62, + "column": 53, "file": "", - "line": 2279 + "line": 2088 }, "name": "obj", "type": { @@ -93203,9 +115922,9 @@ }, { "location": { - "column": 79, + "column": 70, "file": "", - "line": 2279 + "line": 2088 }, "name": "part", "type": { @@ -93219,7 +115938,7 @@ } } ], - "python_name": "get_style_height", + "python_name": "get_style_translate_y", "receiver": "obj", "return_type": { "kind": "identifier", @@ -93232,9 +115951,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -93244,21 +115961,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_image_colorkey", + "c_name": "lv_obj_get_style_translate_y_internal", "function_specifiers": [ "inline" ], "location": { - "column": 43, + "column": 23, "file": "", - "line": 2624 + "line": 5217 }, "parameters": [ { "location": { - "column": 90, + "column": 76, "file": "", - "line": 2624 + "line": 5217 }, "name": "obj", "type": { @@ -93279,9 +115996,9 @@ }, { "location": { - "column": 107, + "column": 93, "file": "", - "line": 2624 + "line": 5217 }, "name": "part", "type": { @@ -93295,22 +116012,16 @@ } } ], - "python_name": "get_style_image_colorkey", + "python_name": "get_style_translate_y_internal", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_image_colorkey_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int32_t" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "image_colorkey_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -93326,21 +116037,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_image_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_width", + "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 2604 + "line": 2075 }, "parameters": [ { "location": { - "column": 66, + "column": 47, "file": "", - "line": 2604 + "line": 2075 }, "name": "obj", "type": { @@ -93361,9 +116070,9 @@ }, { "location": { - "column": 83, + "column": 64, "file": "", - "line": 2604 + "line": 2075 }, "name": "part", "type": { @@ -93377,11 +116086,11 @@ } } ], - "python_name": "get_style_image_opa", + "python_name": "get_style_width", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -93390,9 +116099,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -93402,21 +116109,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_image_recolor", + "c_name": "lv_obj_get_style_width_internal", "function_specifiers": [ "inline" ], "location": { - "column": 26, + "column": 23, "file": "", - "line": 2609 + "line": 5139 }, "parameters": [ { "location": { - "column": 72, + "column": 70, "file": "", - "line": 2609 + "line": 5139 }, "name": "obj", "type": { @@ -93437,9 +116144,9 @@ }, { "location": { - "column": 89, + "column": 87, "file": "", - "line": 2609 + "line": 5139 }, "name": "part", "type": { @@ -93453,16 +116160,16 @@ } } ], - "python_name": "get_style_image_recolor", + "python_name": "get_style_width_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "int32_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -93478,21 +116185,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_image_recolor_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_x", + "function_specifiers": [], "location": { - "column": 26, + "column": 9, "file": "", - "line": 2614 + "line": 2082 }, "parameters": [ { "location": { - "column": 81, + "column": 43, "file": "", - "line": 2614 + "line": 2082 }, "name": "obj", "type": { @@ -93513,9 +116218,9 @@ }, { "location": { - "column": 98, + "column": 60, "file": "", - "line": 2614 + "line": 2082 }, "name": "part", "type": { @@ -93529,22 +116234,20 @@ } } ], - "python_name": "get_style_image_recolor_filtered", + "python_name": "get_style_x", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_color_t" + "name": "int32_t" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -93554,21 +116257,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_image_recolor_opa", + "c_name": "lv_obj_get_style_x_internal", "function_specifiers": [ "inline" ], "location": { - "column": 24, + "column": 23, "file": "", - "line": 2619 + "line": 5181 }, "parameters": [ { "location": { - "column": 74, + "column": 66, "file": "", - "line": 2619 + "line": 5181 }, "name": "obj", "type": { @@ -93589,9 +116292,9 @@ }, { "location": { - "column": 91, + "column": 83, "file": "", - "line": 2619 + "line": 5181 }, "name": "part", "type": { @@ -93605,11 +116308,11 @@ } } ], - "python_name": "get_style_image_recolor_opa", + "python_name": "get_style_x_internal", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -93630,21 +116333,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_layout", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_style_y", + "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 2869 + "line": 2083 }, "parameters": [ { "location": { - "column": 63, + "column": 43, "file": "", - "line": 2869 + "line": 2083 }, "name": "obj", "type": { @@ -93665,9 +116366,9 @@ }, { "location": { - "column": 80, + "column": 60, "file": "", - "line": 2869 + "line": 2083 }, "name": "part", "type": { @@ -93681,11 +116382,11 @@ } } ], - "python_name": "get_style_layout", + "python_name": "get_style_y", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "uint16_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -93694,9 +116395,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -93706,21 +116405,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_length", + "c_name": "lv_obj_get_style_y_internal", "function_specifiers": [ "inline" ], "location": { "column": 23, "file": "", - "line": 2294 + "line": 5187 }, "parameters": [ { "location": { - "column": 62, + "column": 66, "file": "", - "line": 2294 + "line": 5187 }, "name": "obj", "type": { @@ -93741,9 +116440,9 @@ }, { "location": { - "column": 79, + "column": 83, "file": "", - "line": 2294 + "line": 5187 }, "name": "part", "type": { @@ -93757,7 +116456,7 @@ } } ], - "python_name": "get_style_length", + "python_name": "get_style_y_internal", "receiver": "obj", "return_type": { "kind": "identifier", @@ -93782,21 +116481,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_line_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_transform", + "function_specifiers": [], "location": { - "column": 26, + "column": 21, "file": "", - "line": 2649 + "line": 1951 }, "parameters": [ { "location": { - "column": 69, + "column": 57, "file": "", - "line": 2649 + "line": 1951 }, "name": "obj", "type": { @@ -93814,41 +116511,28 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 86, - "file": "", - "line": 2649 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_line_color", + "python_name": "get_transform", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_matrix_t", + "qualifiers": [ + "const" + ] + } }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "matrix_t" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -93858,21 +116542,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_line_color_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_transformed_area", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2654 + "line": 1955 }, "parameters": [ { "location": { - "column": 78, + "column": 49, "file": "", - "line": 2654 + "line": 1955 }, "name": "obj", "type": { @@ -93893,38 +116575,56 @@ }, { "location": { - "column": 95, + "column": 66, "file": "", - "line": 2654 + "line": 1955 }, - "name": "part", + "name": "area", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" + } + }, + { + "location": { + "column": 104, + "file": "", + "line": 1955 + }, + "name": "flags", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_obj_point_transform_flag_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "PART | int" + "python_type": "obj.POINT_TRANSFORM_FLAG | int" } } ], - "python_name": "get_style_line_color_filtered", + "python_name": "get_transformed_area", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -93934,31 +116634,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_line_dash_gap", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_user_data", + "function_specifiers": [], "location": { - "column": 23, + "column": 8, "file": "", - "line": 2639 + "line": 3073 }, "parameters": [ { "location": { - "column": 69, + "column": 38, "file": "", - "line": 2639 + "line": 3073 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -93966,41 +116661,25 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 86, - "file": "", - "line": 2639 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_line_dash_gap", + "python_name": "get_user_data", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94010,31 +116689,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_line_dash_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_user_flag", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2634 + "line": 3074 }, "parameters": [ { "location": { - "column": 71, + "column": 36, "file": "", - "line": 2634 + "line": 3074 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -94045,27 +116719,27 @@ }, { "location": { - "column": 88, + "column": 52, "file": "", - "line": 2634 + "line": 3074 }, - "name": "part", + "name": "bit", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "uint32_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "get_style_line_dash_width", + "python_name": "get_user_flag", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -94074,9 +116748,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94086,21 +116758,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_line_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_width", + "function_specifiers": [], "location": { - "column": 24, + "column": 9, "file": "", - "line": 2659 + "line": 1932 }, "parameters": [ { "location": { - "column": 65, + "column": 41, "file": "", - "line": 2659 + "line": 1932 }, "name": "obj", "type": { @@ -94118,30 +116788,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 82, - "file": "", - "line": 2659 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_line_opa", + "python_name": "get_width", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "lv_opa_t" + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -94150,9 +116803,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94162,21 +116813,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_line_rounded", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_x", + "function_specifiers": [], "location": { - "column": 20, + "column": 9, "file": "", - "line": 2644 + "line": 1926 }, "parameters": [ { "location": { - "column": 65, + "column": 37, "file": "", - "line": 2644 + "line": 1926 }, "name": "obj", "type": { @@ -94194,30 +116843,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 82, - "file": "", - "line": 2644 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_line_rounded", + "python_name": "get_x", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "int32_t" }, "return_view": { "category": "scalar", @@ -94226,9 +116858,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94238,21 +116868,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_line_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_x2", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2629 + "line": 1927 }, "parameters": [ { "location": { - "column": 66, + "column": 38, "file": "", - "line": 2629 + "line": 1927 }, "name": "obj", "type": { @@ -94270,26 +116898,9 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 83, - "file": "", - "line": 2629 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_line_width", + "python_name": "get_x2", "receiver": "obj", "return_type": { "kind": "identifier", @@ -94302,9 +116913,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94314,21 +116923,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_margin_bottom", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_x_aligned", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2414 + "line": 1930 }, "parameters": [ { "location": { - "column": 69, + "column": 45, "file": "", - "line": 2414 + "line": 1930 }, "name": "obj", "type": { @@ -94346,26 +116953,9 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 86, - "file": "", - "line": 2414 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_margin_bottom", + "python_name": "get_x_aligned", "receiver": "obj", "return_type": { "kind": "identifier", @@ -94378,9 +116968,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94390,21 +116978,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_margin_left", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_y", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2419 + "line": 1928 }, "parameters": [ { "location": { - "column": 67, + "column": 37, "file": "", - "line": 2419 + "line": 1928 }, "name": "obj", "type": { @@ -94422,26 +117008,9 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 84, - "file": "", - "line": 2419 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_margin_left", + "python_name": "get_y", "receiver": "obj", "return_type": { "kind": "identifier", @@ -94454,9 +117023,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94466,21 +117033,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_margin_right", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_y2", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2424 + "line": 1929 }, "parameters": [ { "location": { - "column": 68, + "column": 38, "file": "", - "line": 2424 + "line": 1929 }, "name": "obj", "type": { @@ -94498,26 +117063,9 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 85, - "file": "", - "line": 2424 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_margin_right", + "python_name": "get_y2", "receiver": "obj", "return_type": { "kind": "identifier", @@ -94530,9 +117078,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94542,21 +117088,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_margin_top", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_get_y_aligned", + "function_specifiers": [], "location": { - "column": 23, + "column": 9, "file": "", - "line": 2409 + "line": 1931 }, "parameters": [ { "location": { - "column": 66, + "column": 45, "file": "", - "line": 2409 + "line": 1931 }, "name": "obj", "type": { @@ -94574,26 +117118,9 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 83, - "file": "", - "line": 2409 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_margin_top", + "python_name": "get_y_aligned", "receiver": "obj", "return_type": { "kind": "identifier", @@ -94606,9 +117133,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94618,21 +117143,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_max_height", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_has_class", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2289 + "line": 3076 }, "parameters": [ { "location": { - "column": 66, + "column": 38, "file": "", - "line": 2289 + "line": 3076 }, "name": "obj", "type": { @@ -94653,27 +117176,33 @@ }, { "location": { - "column": 83, + "column": 66, "file": "", - "line": 2289 + "line": 3076 }, - "name": "part", + "name": "class_p", "type": { - "kind": "identifier", - "name": "lv_part_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_class_t", + "qualifiers": [ + "const" + ] + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "obj_class_t" } } ], - "python_name": "get_style_max_height", + "python_name": "has_class", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -94682,9 +117211,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94694,21 +117221,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_max_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_has_flag", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2274 + "line": 3029 }, "parameters": [ { "location": { - "column": 65, + "column": 37, "file": "", - "line": 2274 + "line": 3029 }, "name": "obj", "type": { @@ -94729,27 +117254,27 @@ }, { "location": { - "column": 82, + "column": 58, "file": "", - "line": 2274 + "line": 3029 }, - "name": "part", + "name": "f", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_obj_flag_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "PART | int" + "python_type": "OBJ_FLAG | int" } } ], - "python_name": "get_style_max_width", + "python_name": "has_flag", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -94758,9 +117283,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94770,21 +117293,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_min_height", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_has_flag_any", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2284 + "line": 3031 }, "parameters": [ { "location": { - "column": 66, + "column": 41, "file": "", - "line": 2284 + "line": 3031 }, "name": "obj", "type": { @@ -94805,27 +117326,27 @@ }, { "location": { - "column": 83, + "column": 62, "file": "", - "line": 2284 + "line": 3031 }, - "name": "part", + "name": "f", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_obj_flag_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "PART | int" + "python_type": "OBJ_FLAG | int" } } ], - "python_name": "get_style_min_height", + "python_name": "has_flag_any", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -94834,9 +117355,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94846,21 +117365,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_min_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_has_state", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2269 + "line": 3058 }, "parameters": [ { "location": { - "column": 65, + "column": 38, "file": "", - "line": 2269 + "line": 3058 }, "name": "obj", "type": { @@ -94881,27 +117398,27 @@ }, { "location": { - "column": 82, + "column": 56, "file": "", - "line": 2269 + "line": 3058 }, - "name": "part", + "name": "state", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_state_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "PART | int" + "python_type": "STATE | int" } } ], - "python_name": "get_style_min_width", + "python_name": "has_state", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -94910,9 +117427,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94922,21 +117437,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_has_style_prop", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2819 + "line": 2058 }, "parameters": [ { "location": { - "column": 60, + "column": 43, "file": "", - "line": 2819 + "line": 2058 }, "name": "obj", "type": { @@ -94957,27 +117470,44 @@ }, { "location": { - "column": 77, + "column": 70, "file": "", - "line": 2819 + "line": 2058 }, - "name": "part", + "name": "selector", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_style_selector_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 96, + "file": "", + "line": 2058 + }, + "name": "prop", + "type": { + "kind": "identifier", + "name": "lv_style_prop_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "get_style_opa", + "python_name": "has_style_prop", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -94986,9 +117516,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -94998,31 +117526,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_opa_layered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_hit_test", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2824 + "line": 1962 }, "parameters": [ { "location": { - "column": 68, + "column": 31, "file": "", - "line": 2824 + "line": 1962 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -95033,27 +117556,33 @@ }, { "location": { - "column": 85, + "column": 55, "file": "", - "line": 2824 + "line": 1962 }, - "name": "part", + "name": "point", "type": { - "kind": "identifier", - "name": "lv_part_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_point_t", + "qualifiers": [ + "const" + ] + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "point_t" } } ], - "python_name": "get_style_opa_layered", + "python_name": "hit_test", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -95062,9 +117591,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95074,29 +117601,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_opa_recursive", + "c_name": "lv_obj_init_draw_arc_dsc", "function_specifiers": [], "location": { - "column": 10, + "column": 6, "file": "", - "line": 3182 + "line": 2791 }, "parameters": [ { "location": { - "column": 56, + "column": 40, "file": "", - "line": 3182 + "line": 2791 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -95107,9 +117631,9 @@ }, { "location": { - "column": 73, + "column": 57, "file": "", - "line": 3182 + "line": 2791 }, "name": "part", "type": { @@ -95121,18 +117645,38 @@ "conversion": "enum_int", "python_type": "PART | int" } + }, + { + "location": { + "column": 81, + "file": "", + "line": 2791 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_arc_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_arc_dsc_t" + } } ], - "python_name": "get_style_opa_recursive", + "python_name": "init_draw_arc_dsc", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -95146,31 +117690,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_outline_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_init_draw_blur_dsc", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2549 + "line": 2792 }, "parameters": [ { "location": { - "column": 72, + "column": 41, "file": "", - "line": 2549 + "line": 2792 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -95181,9 +117720,9 @@ }, { "location": { - "column": 89, + "column": 58, "file": "", - "line": 2549 + "line": 2792 }, "name": "part", "type": { @@ -95195,24 +117734,42 @@ "conversion": "enum_int", "python_type": "PART | int" } + }, + { + "location": { + "column": 83, + "file": "", + "line": 2792 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_blur_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_blur_dsc_t" + } } ], - "python_name": "get_style_outline_color", + "python_name": "init_draw_blur_dsc", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95222,31 +117779,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_outline_color_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_init_draw_image_dsc", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2554 + "line": 2789 }, "parameters": [ { "location": { - "column": 81, + "column": 42, "file": "", - "line": 2554 + "line": 2789 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -95257,9 +117809,9 @@ }, { "location": { - "column": 98, + "column": 59, "file": "", - "line": 2554 + "line": 2789 }, "name": "part", "type": { @@ -95271,24 +117823,42 @@ "conversion": "enum_int", "python_type": "PART | int" } + }, + { + "location": { + "column": 85, + "file": "", + "line": 2789 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_image_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_image_dsc_t" + } } ], - "python_name": "get_style_outline_color_filtered", + "python_name": "init_draw_image_dsc", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95298,31 +117868,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_outline_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_init_draw_label_dsc", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2559 + "line": 2788 }, "parameters": [ { "location": { - "column": 68, + "column": 42, "file": "", - "line": 2559 + "line": 2788 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -95333,9 +117898,9 @@ }, { "location": { - "column": 85, + "column": 59, "file": "", - "line": 2559 + "line": 2788 }, "name": "part", "type": { @@ -95347,24 +117912,42 @@ "conversion": "enum_int", "python_type": "PART | int" } + }, + { + "location": { + "column": 85, + "file": "", + "line": 2788 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_label_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_label_dsc_t" + } } ], - "python_name": "get_style_outline_opa", + "python_name": "init_draw_label_dsc", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95374,31 +117957,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_outline_pad", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_init_draw_line_dsc", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2564 + "line": 2790 }, "parameters": [ { "location": { - "column": 67, + "column": 41, "file": "", - "line": 2564 + "line": 2790 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -95409,9 +117987,9 @@ }, { "location": { - "column": 84, + "column": 58, "file": "", - "line": 2564 + "line": 2790 }, "name": "part", "type": { @@ -95423,24 +118001,42 @@ "conversion": "enum_int", "python_type": "PART | int" } + }, + { + "location": { + "column": 83, + "file": "", + "line": 2790 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_line_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_line_dsc_t" + } } ], - "python_name": "get_style_outline_pad", + "python_name": "init_draw_line_dsc", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95450,31 +118046,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_outline_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_init_draw_rect_dsc", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2544 + "line": 2787 }, "parameters": [ { "location": { - "column": 69, + "column": 41, "file": "", - "line": 2544 + "line": 2787 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -95485,9 +118076,9 @@ }, { "location": { - "column": 86, + "column": 58, "file": "", - "line": 2544 + "line": 2787 }, "name": "part", "type": { @@ -95499,24 +118090,42 @@ "conversion": "enum_int", "python_type": "PART | int" } + }, + { + "location": { + "column": 83, + "file": "", + "line": 2787 + }, + "name": "draw_dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_rect_dsc_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "draw_rect_dsc_t" + } } ], - "python_name": "get_style_outline_width", + "python_name": "init_draw_rect_dsc", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95526,21 +118135,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_pad_bottom", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_invalidate", + "function_specifiers": [], "location": { - "column": 23, + "column": 13, "file": "", - "line": 2379 + "line": 1957 }, "parameters": [ { "location": { - "column": 66, + "column": 46, "file": "", - "line": 2379 + "line": 1957 }, "name": "obj", "type": { @@ -95558,41 +118165,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 83, - "file": "", - "line": 2379 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_pad_bottom", + "python_name": "invalidate", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_result_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95602,21 +118190,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_pad_column", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_invalidate_area", + "function_specifiers": [], "location": { - "column": 23, + "column": 13, "file": "", - "line": 2399 + "line": 1956 }, "parameters": [ { "location": { - "column": 66, + "column": 51, "file": "", - "line": 2399 + "line": 1956 }, "name": "obj", "type": { @@ -95637,38 +118223,42 @@ }, { "location": { - "column": 83, + "column": 74, "file": "", - "line": 2399 + "line": 1956 }, - "name": "part", + "name": "area", "type": { - "kind": "identifier", - "name": "lv_part_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "area_t" } } ], - "python_name": "get_style_pad_column", + "python_name": "invalidate_area", "receiver": "obj", "return_type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_result_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95678,73 +118268,49 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_pad_left", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_invalidate_expand_blur", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2384 + "line": 5085 }, "parameters": [ { "location": { - "column": 64, + "column": 49, "file": "", - "line": 2384 + "line": 5085 }, - "name": "obj", + "name": "disp", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_display_t" } }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" - } - }, - { - "location": { - "column": 81, - "file": "", - "line": 2384 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" } } ], - "python_name": "get_style_pad_left", + "python_name": "invalidate_expand_blur", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", - "static": false, - "storage": [ - "static" - ], + "static": true, + "storage": [], "variadic": false, "visibility": "public" }, @@ -95754,21 +118320,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_pad_radial", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_adv_hittest", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2404 + "line": 3048 }, "parameters": [ { "location": { - "column": 66, + "column": 43, "file": "", - "line": 2404 + "line": 3048 }, "name": "obj", "type": { @@ -95786,30 +118350,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 83, - "file": "", - "line": 2404 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_pad_radial", + "python_name": "is_adv_hittest", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -95818,9 +118365,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95830,21 +118375,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_pad_right", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_alt", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2389 + "line": 3059 }, "parameters": [ { "location": { - "column": 65, + "column": 35, "file": "", - "line": 2389 + "line": 3059 }, "name": "obj", "type": { @@ -95862,30 +118405,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 82, - "file": "", - "line": 2389 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_pad_right", + "python_name": "is_alt", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -95894,9 +118420,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95906,21 +118430,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_pad_row", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_checkable", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2394 + "line": 3035 }, "parameters": [ { "location": { - "column": 63, + "column": 41, "file": "", - "line": 2394 + "line": 3035 }, "name": "obj", "type": { @@ -95938,30 +118460,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 80, - "file": "", - "line": 2394 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_pad_row", + "python_name": "is_checkable", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -95970,9 +118475,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -95982,21 +118485,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_pad_top", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_checked", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2374 + "line": 3060 }, "parameters": [ { "location": { - "column": 63, + "column": 39, "file": "", - "line": 2374 + "line": 3060 }, "name": "obj", "type": { @@ -96014,30 +118515,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 80, - "file": "", - "line": 2374 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_pad_top", + "python_name": "is_checked", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96046,9 +118530,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96058,19 +118540,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_prop", + "c_name": "lv_obj_is_click_focusable", "function_specifiers": [], "location": { - "column": 18, + "column": 6, "file": "", - "line": 2246 + "line": 3034 }, "parameters": [ { "location": { - "column": 55, + "column": 47, "file": "", - "line": 2246 + "line": 3034 }, "name": "obj", "type": { @@ -96088,52 +118570,18 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 72, - "file": "", - "line": 2246 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } - }, - { - "location": { - "column": 94, - "file": "", - "line": 2246 - }, - "name": "prop", - "type": { - "kind": "identifier", - "name": "lv_style_prop_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } } ], - "python_name": "get_style_prop", + "python_name": "is_click_focusable", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_style_value_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "style_value_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -96147,21 +118595,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_radial_offset", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_clickable", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2809 + "line": 3033 }, "parameters": [ { "location": { - "column": 69, + "column": 41, "file": "", - "line": 2809 + "line": 3033 }, "name": "obj", "type": { @@ -96179,30 +118625,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 86, - "file": "", - "line": 2809 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_radial_offset", + "python_name": "is_clickable", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96211,9 +118640,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96223,21 +118650,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_radius", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_disabled", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2804 + "line": 3067 }, "parameters": [ { "location": { - "column": 62, + "column": 40, "file": "", - "line": 2804 + "line": 3067 }, "name": "obj", "type": { @@ -96255,30 +118680,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 79, - "file": "", - "line": 2804 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_radius", + "python_name": "is_disabled", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96287,9 +118695,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96299,21 +118705,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_recolor", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_editable", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2839 + "line": 2813 }, "parameters": [ { "location": { - "column": 66, + "column": 40, "file": "", - "line": 2839 + "line": 2813 }, "name": "obj", "type": { @@ -96331,41 +118735,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 83, - "file": "", - "line": 2839 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_recolor", + "python_name": "is_editable", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96375,21 +118760,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_recolor_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_edited", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2844 + "line": 3063 }, "parameters": [ { "location": { - "column": 68, + "column": 38, "file": "", - "line": 2844 + "line": 3063 }, "name": "obj", "type": { @@ -96407,30 +118790,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 85, - "file": "", - "line": 2844 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_recolor_opa", + "python_name": "is_edited", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96439,9 +118805,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96451,19 +118815,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_recolor_recursive", + "c_name": "lv_obj_is_event_bubble", "function_specifiers": [], "location": { - "column": 14, + "column": 6, "file": "", - "line": 3184 + "line": 3046 }, "parameters": [ { "location": { - "column": 64, + "column": 44, "file": "", - "line": 3184 + "line": 3046 }, "name": "obj", "type": { @@ -96481,35 +118845,18 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 81, - "file": "", - "line": 3184 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_recolor_recursive", + "python_name": "is_event_bubble", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color32_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -96523,21 +118870,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_rotary_sensitivity", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_event_trickle", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2884 + "line": 3053 }, "parameters": [ { "location": { - "column": 75, + "column": 45, "file": "", - "line": 2884 + "line": 3053 }, "name": "obj", "type": { @@ -96555,30 +118900,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 92, - "file": "", - "line": 2884 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_rotary_sensitivity", + "python_name": "is_event_trickle", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "uint32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96587,9 +118915,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96599,21 +118925,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_shadow_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_flex_in_new_track", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2589 + "line": 3056 }, "parameters": [ { "location": { - "column": 71, + "column": 49, "file": "", - "line": 2589 + "line": 3056 }, "name": "obj", "type": { @@ -96631,41 +118955,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 88, - "file": "", - "line": 2589 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_shadow_color", + "python_name": "is_flex_in_new_track", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96675,21 +118980,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_shadow_color_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_floating", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2594 + "line": 3050 }, "parameters": [ { "location": { - "column": 80, + "column": 40, "file": "", - "line": 2594 + "line": 3050 }, "name": "obj", "type": { @@ -96707,41 +119010,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 97, - "file": "", - "line": 2594 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_shadow_color_filtered", + "python_name": "is_floating", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96751,21 +119035,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_shadow_offset_x", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_focus_key", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2574 + "line": 3062 }, "parameters": [ { "location": { - "column": 71, + "column": 41, "file": "", - "line": 2574 + "line": 3062 }, "name": "obj", "type": { @@ -96783,30 +119065,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 88, - "file": "", - "line": 2574 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_shadow_offset_x", + "python_name": "is_focus_key", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96815,9 +119080,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96827,21 +119090,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_shadow_offset_y", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_focused", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2579 + "line": 3061 }, "parameters": [ { "location": { - "column": 71, + "column": 39, "file": "", - "line": 2579 + "line": 3061 }, "name": "obj", "type": { @@ -96859,30 +119120,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 88, - "file": "", - "line": 2579 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_shadow_offset_y", + "python_name": "is_focused", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96891,9 +119135,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96903,21 +119145,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_shadow_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_gesture_bubble", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2599 + "line": 3047 }, "parameters": [ { "location": { - "column": 67, + "column": 46, "file": "", - "line": 2599 + "line": 3047 }, "name": "obj", "type": { @@ -96935,30 +119175,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 84, - "file": "", - "line": 2599 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_shadow_opa", + "python_name": "is_gesture_bubble", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -96967,9 +119190,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -96979,21 +119200,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_shadow_spread", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_group_def", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2584 + "line": 2814 }, "parameters": [ { "location": { - "column": 69, + "column": 41, "file": "", - "line": 2584 + "line": 2814 }, "name": "obj", "type": { @@ -97011,30 +119230,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 86, - "file": "", - "line": 2584 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_shadow_spread", + "python_name": "is_group_def", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97043,9 +119245,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97055,31 +119255,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_shadow_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_height_max", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2569 + "line": 1946 }, "parameters": [ { "location": { - "column": 68, + "column": 36, "file": "", - "line": 2569 + "line": 1946 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -97087,30 +119282,65 @@ "conversion": "object_handle", "python_type": "obj" } - }, + } + ], + "python_name": "is_height_max", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_is_height_min", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1944 + }, + "parameters": [ { "location": { - "column": 85, + "column": 36, "file": "", - "line": 2569 + "line": 1944 }, - "name": "part", + "name": "obj", "type": { - "kind": "identifier", - "name": "lv_part_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } } ], - "python_name": "get_style_shadow_width", + "python_name": "is_height_min", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97119,9 +119349,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97131,21 +119359,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_space_bottom", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_hidden", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 3164 + "line": 3032 }, "parameters": [ { "location": { - "column": 68, + "column": 38, "file": "", - "line": 3164 + "line": 3032 }, "name": "obj", "type": { @@ -97163,30 +119389,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 85, - "file": "", - "line": 3164 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_space_bottom", + "python_name": "is_hidden", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97195,9 +119404,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97207,21 +119414,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_space_left", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_hovered", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 3143 + "line": 3064 }, "parameters": [ { "location": { - "column": 66, + "column": 39, "file": "", - "line": 3143 + "line": 3064 }, "name": "obj", "type": { @@ -97239,30 +119444,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 83, - "file": "", - "line": 3143 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_space_left", + "python_name": "is_hovered", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97271,9 +119459,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97283,21 +119469,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_space_right", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_ignore_layout", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 3150 + "line": 3049 }, "parameters": [ { "location": { - "column": 67, + "column": 45, "file": "", - "line": 3150 + "line": 3049 }, "name": "obj", "type": { @@ -97315,30 +119499,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 84, - "file": "", - "line": 3150 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_space_right", + "python_name": "is_ignore_layout", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97347,9 +119514,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97359,21 +119524,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_space_top", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_in_widget_tree", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 3157 + "line": 3078 }, "parameters": [ { "location": { - "column": 65, + "column": 46, "file": "", - "line": 3157 + "line": 3078 }, "name": "obj", "type": { @@ -97391,30 +119554,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 82, - "file": "", - "line": 3157 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_space_top", + "python_name": "is_in_widget_tree", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97423,9 +119569,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97435,21 +119579,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_align", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_layout_positioned", + "function_specifiers": [], "location": { - "column": 31, + "column": 6, "file": "", - "line": 2729 + "line": 1915 }, "parameters": [ { "location": { - "column": 74, + "column": 49, "file": "", - "line": 2729 + "line": 1915 }, "name": "obj", "type": { @@ -97467,41 +119609,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 91, - "file": "", - "line": 2729 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_align", + "python_name": "is_layout_positioned", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_text_align_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "TEXT_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97511,21 +119634,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_overflow_visible", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2694 + "line": 3052 }, "parameters": [ { "location": { - "column": 69, + "column": 48, "file": "", - "line": 2694 + "line": 3052 }, "name": "obj", "type": { @@ -97543,41 +119664,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 86, - "file": "", - "line": 2694 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_color", + "python_name": "is_overflow_visible", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97587,21 +119689,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_color_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_press_lock", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2699 + "line": 3045 }, "parameters": [ { "location": { - "column": 78, + "column": 42, "file": "", - "line": 2699 + "line": 3045 }, "name": "obj", "type": { @@ -97619,41 +119719,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 95, - "file": "", - "line": 2699 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_color_filtered", + "python_name": "is_press_lock", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97663,21 +119744,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_decor", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_pressed", + "function_specifiers": [], "location": { - "column": 31, + "column": 6, "file": "", - "line": 2724 + "line": 3065 }, "parameters": [ { "location": { - "column": 74, + "column": 39, "file": "", - "line": 2724 + "line": 3065 }, "name": "obj", "type": { @@ -97695,41 +119774,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 91, - "file": "", - "line": 2724 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_decor", + "python_name": "is_pressed", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_text_decor_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "TEXT_DECOR | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97739,21 +119799,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_font", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_radio_button", + "function_specifiers": [], "location": { - "column": 33, + "column": 6, "file": "", - "line": 2709 + "line": 3055 }, "parameters": [ { "location": { - "column": 75, + "column": 44, "file": "", - "line": 2709 + "line": 3055 }, "name": "obj", "type": { @@ -97771,47 +119829,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 92, - "file": "", - "line": 2709 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_font", + "python_name": "is_radio_button", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_font_t", - "qualifiers": [ - "const" - ] - } + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "font_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97821,21 +119854,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_letter_space", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scroll_chain_hor", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2714 + "line": 3040 }, "parameters": [ { "location": { - "column": 73, + "column": 48, "file": "", - "line": 2714 + "line": 3040 }, "name": "obj", "type": { @@ -97853,30 +119884,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 90, - "file": "", - "line": 2714 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_letter_space", + "python_name": "is_scroll_chain_hor", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97885,9 +119899,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97897,21 +119909,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_line_space", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scroll_chain_ver", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2719 + "line": 3041 }, "parameters": [ { "location": { - "column": 71, + "column": 48, "file": "", - "line": 2719 + "line": 3041 }, "name": "obj", "type": { @@ -97929,30 +119939,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 88, - "file": "", - "line": 2719 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_line_space", + "python_name": "is_scroll_chain_ver", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -97961,9 +119954,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -97973,21 +119964,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scroll_elastic", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2704 + "line": 3037 }, "parameters": [ { "location": { - "column": 65, + "column": 46, "file": "", - "line": 2704 + "line": 3037 }, "name": "obj", "type": { @@ -98005,30 +119994,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 82, - "file": "", - "line": 2704 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_opa", + "python_name": "is_scroll_elastic", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98037,9 +120009,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98049,21 +120019,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_outline_stroke_color", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scroll_momentum", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2734 + "line": 3038 }, "parameters": [ { "location": { - "column": 84, + "column": 47, "file": "", - "line": 2734 + "line": 3038 }, "name": "obj", "type": { @@ -98081,41 +120049,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 101, - "file": "", - "line": 2734 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_outline_stroke_color", + "python_name": "is_scroll_momentum", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98125,21 +120074,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_outline_stroke_color_filtered", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scroll_on_focus", + "function_specifiers": [], "location": { - "column": 26, + "column": 6, "file": "", - "line": 2739 + "line": 3042 }, "parameters": [ { "location": { - "column": 93, + "column": 47, "file": "", - "line": 2739 + "line": 3042 }, "name": "obj", "type": { @@ -98157,41 +120104,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 110, - "file": "", - "line": 2739 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_outline_stroke_color_filtered", + "python_name": "is_scroll_on_focus", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98201,21 +120129,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_outline_stroke_opa", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scroll_one", + "function_specifiers": [], "location": { - "column": 24, + "column": 6, "file": "", - "line": 2749 + "line": 3039 }, "parameters": [ { "location": { - "column": 80, + "column": 42, "file": "", - "line": 2749 + "line": 3039 }, "name": "obj", "type": { @@ -98233,30 +120159,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 97, - "file": "", - "line": 2749 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_outline_stroke_opa", + "python_name": "is_scroll_one", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_opa_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98265,9 +120174,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98277,21 +120184,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_text_outline_stroke_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scroll_with_arrow", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2744 + "line": 3043 }, "parameters": [ { "location": { - "column": 81, + "column": 49, "file": "", - "line": 2744 + "line": 3043 }, "name": "obj", "type": { @@ -98309,30 +120214,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 98, - "file": "", - "line": 2744 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_text_outline_stroke_width", + "python_name": "is_scroll_with_arrow", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98341,9 +120229,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98353,21 +120239,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_height", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scrollable", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2319 + "line": 3036 }, "parameters": [ { "location": { - "column": 72, + "column": 42, "file": "", - "line": 2319 + "line": 3036 }, "name": "obj", "type": { @@ -98385,30 +120269,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 89, - "file": "", - "line": 2319 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_height", + "python_name": "is_scrollable", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98417,9 +120284,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98429,21 +120294,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_pivot_x", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scrolled", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2354 + "line": 3066 }, "parameters": [ { "location": { - "column": 73, + "column": 40, "file": "", - "line": 2354 + "line": 3066 }, "name": "obj", "type": { @@ -98461,30 +120324,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 90, - "file": "", - "line": 2354 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_pivot_x", + "python_name": "is_scrolled", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98493,9 +120339,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98505,21 +120349,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_pivot_y", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_scrolling", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2359 + "line": 2001 }, "parameters": [ { "location": { - "column": 73, + "column": 41, "file": "", - "line": 2359 + "line": 2001 }, "name": "obj", "type": { @@ -98537,30 +120379,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 90, - "file": "", - "line": 2359 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_pivot_y", + "python_name": "is_scrolling", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98569,9 +120394,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98581,21 +120404,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_rotation", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_send_draw_task_events", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2349 + "line": 3051 }, "parameters": [ { "location": { - "column": 74, + "column": 53, "file": "", - "line": 2349 + "line": 3051 }, "name": "obj", "type": { @@ -98613,30 +120434,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 91, - "file": "", - "line": 2349 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_rotation", + "python_name": "is_send_draw_task_events", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98645,9 +120449,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98657,21 +120459,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_scale_x", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_snappable", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2339 + "line": 3044 }, "parameters": [ { "location": { - "column": 73, + "column": 41, "file": "", - "line": 2339 + "line": 3044 }, "name": "obj", "type": { @@ -98689,30 +120489,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 90, - "file": "", - "line": 2339 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_scale_x", + "python_name": "is_snappable", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98721,9 +120504,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98733,21 +120514,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_scale_x_safe", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_state_trickle", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 3172 + "line": 3054 }, "parameters": [ { "location": { - "column": 78, + "column": 45, "file": "", - "line": 3172 + "line": 3054 }, "name": "obj", "type": { @@ -98765,30 +120544,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 95, - "file": "", - "line": 3172 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_scale_x_safe", + "python_name": "is_state_trickle", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98797,9 +120559,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98809,21 +120569,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_scale_y", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_state_user_1", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2344 + "line": 3068 }, "parameters": [ { "location": { - "column": 73, + "column": 44, "file": "", - "line": 2344 + "line": 3068 }, "name": "obj", "type": { @@ -98841,30 +120599,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 90, - "file": "", - "line": 2344 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_scale_y", + "python_name": "is_state_user_1", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98873,9 +120614,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98885,21 +120624,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_scale_y_safe", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_state_user_2", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 3177 + "line": 3069 }, "parameters": [ { "location": { - "column": 78, + "column": 44, "file": "", - "line": 3177 + "line": 3069 }, "name": "obj", "type": { @@ -98917,30 +120654,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 95, - "file": "", - "line": 3177 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_scale_y_safe", + "python_name": "is_state_user_2", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -98949,9 +120669,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -98961,21 +120679,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_skew_x", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_state_user_3", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2364 + "line": 3070 }, "parameters": [ { "location": { - "column": 72, + "column": 44, "file": "", - "line": 2364 + "line": 3070 }, "name": "obj", "type": { @@ -98993,30 +120709,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 89, - "file": "", - "line": 2364 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_skew_x", + "python_name": "is_state_user_3", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -99025,9 +120724,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99037,21 +120734,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_skew_y", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_state_user_4", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2369 + "line": 3071 }, "parameters": [ { "location": { - "column": 72, + "column": 44, "file": "", - "line": 2369 + "line": 3071 }, "name": "obj", "type": { @@ -99069,30 +120764,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 89, - "file": "", - "line": 2369 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_skew_y", + "python_name": "is_state_user_4", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -99101,9 +120779,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99113,31 +120789,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transform_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_style_any_height_content", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2314 + "line": 1942 }, "parameters": [ { "location": { - "column": 71, + "column": 50, "file": "", - "line": 2314 + "line": 1942 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99145,30 +120816,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 88, - "file": "", - "line": 2314 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transform_width", + "python_name": "is_style_any_height_content", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -99177,9 +120831,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99189,31 +120841,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_transition", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_style_any_width_content", + "function_specifiers": [], "location": { - "column": 49, + "column": 6, "file": "", - "line": 2859 + "line": 1941 }, "parameters": [ { "location": { - "column": 92, + "column": 49, "file": "", - "line": 2859 + "line": 1941 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99221,47 +120868,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 109, - "file": "", - "line": 2859 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_transition", + "python_name": "is_style_any_width_content", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_style_transition_dsc_t", - "qualifiers": [ - "const" - ] - } + "kind": "primitive", + "name": "bool" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "style_transition_dsc_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99271,21 +120893,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_translate_radial", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_visible", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2334 + "line": 1959 }, "parameters": [ { "location": { - "column": 72, + "column": 39, "file": "", - "line": 2334 + "line": 1959 }, "name": "obj", "type": { @@ -99303,30 +120923,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 89, - "file": "", - "line": 2334 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_translate_radial", + "python_name": "is_visible", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -99335,9 +120938,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99347,31 +120948,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_translate_x", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_width_max", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2324 + "line": 1945 }, "parameters": [ { "location": { - "column": 67, + "column": 35, "file": "", - "line": 2324 + "line": 1945 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99379,30 +120975,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 84, - "file": "", - "line": 2324 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_translate_x", + "python_name": "is_width_max", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -99411,9 +120990,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99423,31 +121000,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_translate_y", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_is_width_min", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2329 + "line": 1943 }, "parameters": [ { "location": { - "column": 67, + "column": 35, "file": "", - "line": 2329 + "line": 1943 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99455,30 +121027,13 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 84, - "file": "", - "line": 2329 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_translate_y", + "python_name": "is_width_min", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -99487,9 +121042,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99499,31 +121052,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_width", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_mark_layout_as_dirty", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2264 + "line": 1916 }, "parameters": [ { "location": { - "column": 61, + "column": 43, "file": "", - "line": 2264 + "line": 1916 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99531,41 +121079,22 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 78, - "file": "", - "line": 2264 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_width", + "python_name": "mark_layout_as_dirty", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99575,31 +121104,28 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_x", + "c_name": "lv_obj_move_background", "function_specifiers": [ "inline" ], "location": { - "column": 23, + "column": 20, "file": "", - "line": 2299 + "line": 4395 }, "parameters": [ { "location": { - "column": 57, + "column": 52, "file": "", - "line": 2299 + "line": 4395 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99607,35 +121133,18 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 74, - "file": "", - "line": 2299 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } } ], - "python_name": "get_style_x", + "python_name": "move_background", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -99651,31 +121160,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_style_y", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_move_children_by", + "function_specifiers": [], "location": { - "column": 23, + "column": 6, "file": "", - "line": 2304 + "line": 1950 }, "parameters": [ { "location": { - "column": 57, + "column": 39, "file": "", - "line": 2304 + "line": 1950 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99686,38 +121190,70 @@ }, { "location": { - "column": 74, + "column": 54, "file": "", - "line": 2304 + "line": 1950 }, - "name": "part", + "name": "x_diff", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "int32_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 70, + "file": "", + "line": 1950 + }, + "name": "y_diff", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 83, + "file": "", + "line": 1950 + }, + "name": "ignore_floating", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "get_style_y", + "python_name": "move_children_by", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -99727,29 +121263,28 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_transform", - "function_specifiers": [], + "c_name": "lv_obj_move_foreground", + "function_specifiers": [ + "inline" + ], "location": { - "column": 21, + "column": 20, "file": "", - "line": 2144 + "line": 4386 }, "parameters": [ { "location": { - "column": 57, + "column": 52, "file": "", - "line": 2144 + "line": 4386 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99759,26 +121294,22 @@ } } ], - "python_name": "get_transform", + "python_name": "move_foreground", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_matrix_t", - "qualifiers": [ - "const" - ] - } + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "matrix_t" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, - "storage": [], + "storage": [ + "static" + ], "variadic": false, "visibility": "public" }, @@ -99788,29 +121319,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_transformed_area", + "c_name": "lv_obj_move_to", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2148 + "line": 1949 }, "parameters": [ { "location": { - "column": 49, + "column": 30, "file": "", - "line": 2148 + "line": 1949 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -99821,43 +121349,40 @@ }, { "location": { - "column": 66, + "column": 45, "file": "", - "line": 2148 + "line": 1949 }, - "name": "area", + "name": "x", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t" - } + "kind": "identifier", + "name": "int32_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } }, { "location": { - "column": 104, + "column": 56, "file": "", - "line": 2148 + "line": 1949 }, - "name": "flags", + "name": "y", "type": { "kind": "identifier", - "name": "lv_obj_point_transform_flag_t" + "name": "int32_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "obj.POINT_TRANSFORM_FLAG | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "get_transformed_area", + "python_name": "move_to", "receiver": "obj", "return_type": { "kind": "primitive", @@ -99880,19 +121405,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_user_data", + "c_name": "lv_obj_move_to_index", "function_specifiers": [], "location": { - "column": 8, + "column": 6, "file": "", - "line": 3851 + "line": 1883 }, "parameters": [ { "location": { - "column": 38, + "column": 36, "file": "", - "line": 3851 + "line": 1883 }, "name": "obj", "type": { @@ -99907,21 +121432,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 51, + "file": "", + "line": 1883 + }, + "name": "index", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "get_user_data", + "python_name": "move_to_index", "receiver": "obj", "return_type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -99935,51 +121474,51 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_width", + "c_name": "lv_obj_null_on_delete", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 2127 + "line": 3079 }, "parameters": [ { "location": { - "column": 41, + "column": 38, "file": "", - "line": 2127 + "line": 3079 }, - "name": "obj", + "name": "obj_ptr", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } } }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "pointer", + "conversion": "pointer", + "python_type": "Any" } } ], - "python_name": "get_width", + "python_name": "null_on_delete", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", - "static": false, + "static": true, "storage": [], "variadic": false, "visibility": "public" @@ -99990,29 +121529,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_x", + "c_name": "lv_obj_readjust_scroll", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 2121 + "line": 2006 }, "parameters": [ { "location": { - "column": 37, + "column": 38, "file": "", - "line": 2121 + "line": 2006 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100020,18 +121556,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 62, + "file": "", + "line": 2006 + }, + "name": "anim_en", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "get_x", + "python_name": "readjust_scroll", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -100045,29 +121598,46 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_x2", + "c_name": "lv_obj_redraw", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 2122 + "line": 3238 }, "parameters": [ { "location": { - "column": 38, + "column": 31, "file": "", - "line": 2122 + "line": 3238 + }, + "name": "layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + }, + { + "location": { + "column": 49, + "file": "", + "line": 3238 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100077,19 +121647,19 @@ } } ], - "python_name": "get_x2", + "python_name": "redraw", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", - "static": false, + "static": true, "storage": [], "variadic": false, "visibility": "public" @@ -100100,29 +121670,46 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_x_aligned", + "c_name": "lv_obj_refr", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 2125 + "line": 5138 }, "parameters": [ { "location": { - "column": 45, + "column": 29, "file": "", - "line": 2125 + "line": 5138 + }, + "name": "layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "layer_t" + } + }, + { + "location": { + "column": 47, + "file": "", + "line": 5138 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100132,19 +121719,19 @@ } } ], - "python_name": "get_x_aligned", + "python_name": "refr", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", - "static": false, + "static": true, "storage": [], "variadic": false, "visibility": "public" @@ -100155,29 +121742,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_y", + "c_name": "lv_obj_refr_pos", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 2123 + "line": 1948 }, "parameters": [ { "location": { - "column": 37, + "column": 31, "file": "", - "line": 2123 + "line": 1948 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100187,16 +121771,16 @@ } } ], - "python_name": "get_y", + "python_name": "refr_pos", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -100210,29 +121794,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_y2", + "c_name": "lv_obj_refr_size", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 2124 + "line": 1909 }, "parameters": [ { "location": { - "column": 38, + "column": 32, "file": "", - "line": 2124 + "line": 1909 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100242,11 +121823,11 @@ } } ], - "python_name": "get_y2", + "python_name": "refr_size", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "return_view": { "category": "scalar", @@ -100265,29 +121846,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_get_y_aligned", + "c_name": "lv_obj_refresh_ext_draw_size", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 2126 + "line": 2795 }, "parameters": [ { "location": { - "column": 45, + "column": 44, "file": "", - "line": 2126 + "line": 2795 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100297,16 +121875,16 @@ } } ], - "python_name": "get_y_aligned", + "python_name": "refresh_ext_draw_size", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -100320,29 +121898,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_has_class", + "c_name": "lv_obj_refresh_self_size", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3854 + "line": 1947 }, "parameters": [ { "location": { - "column": 38, + "column": 40, "file": "", - "line": 3854 + "line": 1947 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100350,32 +121925,9 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 66, - "file": "", - "line": 3854 - }, - "name": "class_p", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_class_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "obj_class_t" - } } ], - "python_name": "has_class", + "python_name": "refresh_self_size", "receiver": "obj", "return_type": { "kind": "primitive", @@ -100398,29 +121950,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_has_flag", + "c_name": "lv_obj_refresh_style", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3845 + "line": 2049 }, "parameters": [ { "location": { - "column": 37, + "column": 36, "file": "", - "line": 3845 + "line": 2049 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100431,32 +121980,49 @@ }, { "location": { - "column": 58, + "column": 53, "file": "", - "line": 3845 + "line": 2049 }, - "name": "f", + "name": "part", "type": { "kind": "identifier", - "name": "lv_obj_flag_t" + "name": "lv_part_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "OBJ_FLAG | int" + "python_type": "PART | int" + } + }, + { + "location": { + "column": 75, + "file": "", + "line": 2049 + }, + "name": "prop", + "type": { + "kind": "identifier", + "name": "lv_style_prop_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "has_flag", + "python_name": "refresh_style", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -100470,29 +122036,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_has_flag_any", + "c_name": "lv_obj_remove_child", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3846 + "line": 5084 }, "parameters": [ { "location": { - "column": 41, + "column": 35, "file": "", - "line": 3846 + "line": 5084 }, - "name": "obj", + "name": "parent", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100503,32 +122066,35 @@ }, { "location": { - "column": 62, + "column": 54, "file": "", - "line": 3846 + "line": 5084 }, - "name": "f", + "name": "child", "type": { - "kind": "identifier", - "name": "lv_obj_flag_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "OBJ_FLAG | int" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } } ], - "python_name": "has_flag_any", + "python_name": "remove_child", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -100542,68 +122108,48 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_has_state", + "c_name": "lv_obj_remove_delete_cb", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3848 + "line": 3081 }, "parameters": [ { "location": { - "column": 38, + "column": 46, "file": "", - "line": 3848 + "line": 3081 }, - "name": "obj", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_delete_dsc_t" } }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" - } - }, - { - "location": { - "column": 56, - "file": "", - "line": 3848 - }, - "name": "state", - "type": { - "kind": "identifier", - "name": "lv_state_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "STATE | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "delete_dsc_t" } } ], - "python_name": "has_state", + "python_name": "remove_delete_cb", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", - "static": false, + "static": true, "storage": [], "variadic": false, "visibility": "public" @@ -100614,29 +122160,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_has_style_prop", + "c_name": "lv_obj_remove_event", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2247 + "line": 2923 }, "parameters": [ { "location": { - "column": 43, + "column": 35, "file": "", - "line": 2247 + "line": 2923 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -100647,31 +122190,14 @@ }, { "location": { - "column": 70, - "file": "", - "line": 2247 - }, - "name": "selector", - "type": { - "kind": "identifier", - "name": "lv_style_selector_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 96, + "column": 51, "file": "", - "line": 2247 + "line": 2923 }, - "name": "prop", + "name": "index", "type": { "kind": "identifier", - "name": "lv_style_prop_t" + "name": "uint32_t" }, "view": { "category": "scalar", @@ -100680,7 +122206,7 @@ } } ], - "python_name": "has_style_prop", + "python_name": "remove_event", "receiver": "obj", "return_type": { "kind": "primitive", @@ -100703,19 +122229,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_hit_test", + "c_name": "lv_obj_remove_event_cb", "function_specifiers": [], "location": { - "column": 6, + "column": 10, "file": "", - "line": 2155 + "line": 2925 }, "parameters": [ { "location": { - "column": 31, + "column": 42, "file": "", - "line": 2155 + "line": 2925 }, "name": "obj", "type": { @@ -100733,33 +122259,27 @@ }, { "location": { - "column": 55, + "column": 63, "file": "", - "line": 2155 + "line": 2925 }, - "name": "point", + "name": "event_cb", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_point_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "lv_event_cb_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "point_t" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[event_t], None]" } } ], - "python_name": "hit_test", + "python_name": "remove_event_cb", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "uint32_t" }, "return_view": { "category": "scalar", @@ -100778,19 +122298,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_init_draw_arc_dsc", + "c_name": "lv_obj_remove_event_cb_with_user_data", "function_specifiers": [], "location": { - "column": 6, + "column": 10, "file": "", - "line": 3608 + "line": 2926 }, "parameters": [ { "location": { - "column": 40, + "column": 57, "file": "", - "line": 3608 + "line": 2926 }, "name": "obj", "type": { @@ -100808,52 +122328,52 @@ }, { "location": { - "column": 57, + "column": 78, "file": "", - "line": 3608 + "line": 2926 }, - "name": "part", + "name": "event_cb", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_event_cb_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[event_t], None]" } }, { "location": { - "column": 81, + "column": 93, "file": "", - "line": 3608 + "line": 2926 }, - "name": "draw_dsc", + "name": "user_data", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_draw_arc_dsc_t" + "kind": "primitive", + "name": "void" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_arc_dsc_t" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } } ], - "python_name": "init_draw_arc_dsc", + "python_name": "remove_event_cb_with_user_data", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "uint32_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -100867,19 +122387,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_init_draw_blur_dsc", + "c_name": "lv_obj_remove_event_dsc", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3609 + "line": 2924 }, "parameters": [ { "location": { - "column": 41, + "column": 39, "file": "", - "line": 3609 + "line": 2924 }, "name": "obj", "type": { @@ -100897,52 +122417,35 @@ }, { "location": { - "column": 58, - "file": "", - "line": 3609 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } - }, - { - "location": { - "column": 83, + "column": 61, "file": "", - "line": 3609 + "line": 2924 }, - "name": "draw_dsc", + "name": "dsc", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_blur_dsc_t" + "name": "lv_event_dsc_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_blur_dsc_t" + "python_type": "event_dsc_t" } } ], - "python_name": "init_draw_blur_dsc", + "python_name": "remove_event_dsc", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "void" + "name": "bool" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -100956,19 +122459,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_init_draw_image_dsc", + "c_name": "lv_obj_remove_flag", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3606 + "line": 2981 }, "parameters": [ { "location": { - "column": 42, + "column": 34, "file": "", - "line": 3606 + "line": 2981 }, "name": "obj", "type": { @@ -100986,43 +122489,23 @@ }, { "location": { - "column": 59, + "column": 55, "file": "", - "line": 3606 + "line": 2981 }, - "name": "part", + "name": "f", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_obj_flag_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "PART | int" - } - }, - { - "location": { - "column": 85, - "file": "", - "line": 3606 - }, - "name": "draw_dsc", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_draw_image_dsc_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_image_dsc_t" + "python_type": "OBJ_FLAG | int" } } ], - "python_name": "init_draw_image_dsc", + "python_name": "remove_flag", "receiver": "obj", "return_type": { "kind": "primitive", @@ -101045,19 +122528,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_init_draw_label_dsc", + "c_name": "lv_obj_remove_from_subject", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3605 + "line": 3188 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3605 + "line": 3188 }, "name": "obj", "type": { @@ -101075,43 +122558,26 @@ }, { "location": { - "column": 59, - "file": "", - "line": 3605 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } - }, - { - "location": { - "column": 85, + "column": 62, "file": "", - "line": 3605 + "line": 3188 }, - "name": "draw_dsc", + "name": "subject", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_draw_label_dsc_t" + "name": "lv_subject_t" } }, "view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "draw_label_dsc_t" + "python_type": "subject_t" } } ], - "python_name": "init_draw_label_dsc", + "python_name": "remove_from_subject", "receiver": "obj", "return_type": { "kind": "primitive", @@ -101134,19 +122600,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_init_draw_line_dsc", + "c_name": "lv_obj_remove_local_style_prop", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3607 + "line": 2063 }, "parameters": [ { "location": { - "column": 41, + "column": 46, "file": "", - "line": 3607 + "line": 2063 }, "name": "obj", "type": { @@ -101164,52 +122630,49 @@ }, { "location": { - "column": 58, + "column": 69, "file": "", - "line": 3607 + "line": 2063 }, - "name": "part", + "name": "prop", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_style_prop_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } }, { "location": { - "column": 83, + "column": 95, "file": "", - "line": 3607 + "line": 2063 }, - "name": "draw_dsc", + "name": "selector", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_draw_line_dsc_t" - } + "kind": "identifier", + "name": "lv_style_selector_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_line_dsc_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "init_draw_line_dsc", + "python_name": "remove_local_style_prop", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "void" + "name": "bool" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "scalar", + "conversion": "integer", + "python_type": "int" }, "role": "object_method", "static": false, @@ -101223,19 +122686,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_init_draw_rect_dsc", + "c_name": "lv_obj_remove_state", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3604 + "line": 3011 }, "parameters": [ { "location": { - "column": 41, + "column": 35, "file": "", - "line": 3604 + "line": 3011 }, "name": "obj", "type": { @@ -101253,43 +122716,23 @@ }, { "location": { - "column": 58, + "column": 53, "file": "", - "line": 3604 + "line": 3011 }, - "name": "part", + "name": "state", "type": { "kind": "identifier", - "name": "lv_part_t" + "name": "lv_state_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "PART | int" - } - }, - { - "location": { - "column": 83, - "file": "", - "line": 3604 - }, - "name": "draw_dsc", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_draw_rect_dsc_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "draw_rect_dsc_t" + "python_type": "STATE | int" } } ], - "python_name": "init_draw_rect_dsc", + "python_name": "remove_state", "receiver": "obj", "return_type": { "kind": "primitive", @@ -101312,29 +122755,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_invalidate", + "c_name": "lv_obj_remove_style", "function_specifiers": [], "location": { - "column": 13, + "column": 6, "file": "", - "line": 2150 + "line": 2045 }, "parameters": [ { "location": { - "column": 46, + "column": 35, "file": "", - "line": 2150 + "line": 2045 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -101342,96 +122782,58 @@ "conversion": "object_handle", "python_type": "obj" } - } - ], - "python_name": "invalidate", - "receiver": "obj", - "return_type": { - "kind": "identifier", - "name": "lv_result_t" - }, - "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "RESULT | int" - }, - "role": "object_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_obj_invalidate_area", - "function_specifiers": [], - "location": { - "column": 13, - "file": "", - "line": 2149 - }, - "parameters": [ + }, { "location": { - "column": 51, + "column": 59, "file": "", - "line": 2149 + "line": 2045 }, - "name": "obj", + "name": "style", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", + "name": "lv_style_t", "qualifiers": [ "const" ] } }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" } }, { "location": { - "column": 74, + "column": 88, "file": "", - "line": 2149 + "line": 2045 }, - "name": "area", + "name": "selector", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_area_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "lv_style_selector_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "area_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "invalidate_area", + "python_name": "remove_style", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_result_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "RESULT | int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -101445,19 +122847,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_editable", + "c_name": "lv_obj_remove_style_all", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3629 + "line": 2047 }, "parameters": [ { "location": { - "column": 34, + "column": 39, "file": "", - "line": 3629 + "line": 2047 }, "name": "obj", "type": { @@ -101474,16 +122876,16 @@ } } ], - "python_name": "is_editable", + "python_name": "remove_style_all", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -101497,19 +122899,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_group_def", + "c_name": "lv_obj_remove_theme", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3630 + "line": 2046 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 3630 + "line": 2046 }, "name": "obj", "type": { @@ -101524,18 +122926,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 62, + "file": "", + "line": 2046 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "is_group_def", + "python_name": "remove_theme", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -101549,19 +122968,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_height_max", + "c_name": "lv_obj_replace_style", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2139 + "line": 2043 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 2139 + "line": 2043 }, "name": "obj", "type": { @@ -101576,61 +122995,72 @@ "conversion": "object_handle", "python_type": "obj" } - } - ], - "python_name": "is_height_max", - "receiver": "obj", - "return_type": { - "kind": "primitive", - "name": "bool" - }, - "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - }, - "role": "object_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_obj_is_height_min", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 2137 - }, - "parameters": [ + }, { "location": { - "column": 36, + "column": 60, "file": "", - "line": 2137 + "line": 2043 }, - "name": "obj", + "name": "old_style", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t" + "name": "lv_style_t", + "qualifiers": [ + "const" + ] } }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 2043 + }, + "name": "new_style", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" + } + }, + { + "location": { + "column": 47, + "file": "", + "line": 2044 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "is_height_min", + "python_name": "replace_style", "receiver": "obj", "return_type": { "kind": "primitive", @@ -101653,51 +123083,48 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_layout_positioned", + "c_name": "lv_obj_report_style_change", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2110 + "line": 2048 }, "parameters": [ { "location": { - "column": 49, + "column": 44, "file": "", - "line": 2110 + "line": 2048 }, - "name": "obj", + "name": "style", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_style_t" } }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" } } ], - "python_name": "is_layout_positioned", + "python_name": "report_style_change", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", - "static": false, + "static": true, "storage": [], "variadic": false, "visibility": "public" @@ -101708,29 +123135,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_radio_button", + "c_name": "lv_obj_reset_transform", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3849 + "line": 1924 }, "parameters": [ { "location": { - "column": 44, + "column": 38, "file": "", - "line": 3849 + "line": 1924 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -101740,16 +123164,16 @@ } } ], - "python_name": "is_radio_button", + "python_name": "reset_transform", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -101763,29 +123187,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_scrolling", + "c_name": "lv_obj_scroll_by", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2194 + "line": 1994 }, "parameters": [ { "location": { - "column": 41, + "column": 32, "file": "", - "line": 2194 + "line": 1994 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -101793,18 +123214,69 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 47, + "file": "", + "line": 1994 + }, + "name": "dx", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 59, + "file": "", + "line": 1994 + }, + "name": "dy", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 1994 + }, + "name": "anim_en", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "is_scrolling", + "python_name": "scroll_by", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -101818,29 +123290,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_valid", + "c_name": "lv_obj_scroll_by_bounded", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3856 + "line": 1995 }, "parameters": [ { "location": { - "column": 37, + "column": 40, "file": "", - "line": 3856 + "line": 1995 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -101848,18 +123317,69 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 55, + "file": "", + "line": 1995 + }, + "name": "dx", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 1995 + }, + "name": "dy", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 88, + "file": "", + "line": 1995 + }, + "name": "anim_en", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "is_valid", + "python_name": "scroll_by_bounded", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -101873,29 +123393,26 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_visible", + "c_name": "lv_obj_scroll_by_raw", "function_specifiers": [], "location": { - "column": 6, + "column": 13, "file": "", - "line": 2152 + "line": 5086 }, "parameters": [ { "location": { - "column": 39, + "column": 43, "file": "", - "line": 2152 + "line": 5086 }, "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_obj_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { @@ -101903,18 +123420,52 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 58, + "file": "", + "line": 5086 + }, + "name": "x", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 5086 + }, + "name": "y", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "is_visible", + "python_name": "scroll_by_raw", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "lv_result_t" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" }, "role": "object_method", "static": false, @@ -101928,19 +123479,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_width_max", + "c_name": "lv_obj_scroll_to", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2138 + "line": 1996 }, "parameters": [ { "location": { - "column": 35, + "column": 32, "file": "", - "line": 2138 + "line": 1996 }, "name": "obj", "type": { @@ -101955,18 +123506,69 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 47, + "file": "", + "line": 1996 + }, + "name": "x", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 58, + "file": "", + "line": 1996 + }, + "name": "y", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 78, + "file": "", + "line": 1996 + }, + "name": "anim_en", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "is_width_max", + "python_name": "scroll_to", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -101980,19 +123582,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_is_width_min", + "c_name": "lv_obj_scroll_to_view", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2136 + "line": 1999 }, "parameters": [ { "location": { - "column": 35, + "column": 37, "file": "", - "line": 2136 + "line": 1999 }, "name": "obj", "type": { @@ -102007,18 +123609,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 61, + "file": "", + "line": 1999 + }, + "name": "anim_en", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "is_width_min", + "python_name": "scroll_to_view", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -102032,19 +123651,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_mark_layout_as_dirty", + "c_name": "lv_obj_scroll_to_view_recursive", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2111 + "line": 2000 }, "parameters": [ { "location": { - "column": 43, + "column": 47, "file": "", - "line": 2111 + "line": 2000 }, "name": "obj", "type": { @@ -102059,9 +123678,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 71, + "file": "", + "line": 2000 + }, + "name": "anim_en", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "mark_layout_as_dirty", + "python_name": "scroll_to_view_recursive", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102084,21 +123720,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_move_background", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_scroll_to_x", + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 5017 + "line": 1997 }, "parameters": [ { "location": { - "column": 52, + "column": 34, "file": "", - "line": 5017 + "line": 1997 }, "name": "obj", "type": { @@ -102113,9 +123747,43 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 49, + "file": "", + "line": 1997 + }, + "name": "x", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 69, + "file": "", + "line": 1997 + }, + "name": "anim_en", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "move_background", + "python_name": "scroll_to_x", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102128,9 +123796,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -102140,19 +123806,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_move_children_by", + "c_name": "lv_obj_scroll_to_y", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2143 + "line": 1998 }, "parameters": [ { "location": { - "column": 39, + "column": 34, "file": "", - "line": 2143 + "line": 1998 }, "name": "obj", "type": { @@ -102170,11 +123836,11 @@ }, { "location": { - "column": 54, + "column": 49, "file": "", - "line": 2143 + "line": 1998 }, - "name": "x_diff", + "name": "y", "type": { "kind": "identifier", "name": "int32_t" @@ -102187,31 +123853,14 @@ }, { "location": { - "column": 70, + "column": 69, "file": "", - "line": 2143 + "line": 1998 }, - "name": "y_diff", + "name": "anim_en", "type": { "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 83, - "file": "", - "line": 2143 - }, - "name": "ignore_floating", - "type": { - "kind": "primitive", - "name": "bool" + "name": "lv_anim_enable_t" }, "view": { "category": "scalar", @@ -102220,7 +123869,7 @@ } } ], - "python_name": "move_children_by", + "python_name": "scroll_to_y", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102243,21 +123892,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_move_foreground", - "function_specifiers": [ - "inline" - ], + "c_name": "lv_obj_scrollbar_invalidate", + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 5008 + "line": 2005 }, "parameters": [ { "location": { - "column": 52, + "column": 43, "file": "", - "line": 5008 + "line": 2005 }, "name": "obj", "type": { @@ -102274,7 +123921,7 @@ } } ], - "python_name": "move_foreground", + "python_name": "scrollbar_invalidate", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102287,9 +123934,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -102299,19 +123944,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_move_to", + "c_name": "lv_obj_send_event", "function_specifiers": [], "location": { - "column": 6, + "column": 13, "file": "", - "line": 2142 + "line": 2916 }, "parameters": [ { "location": { - "column": 30, + "column": 40, "file": "", - "line": 2142 + "line": 2916 }, "name": "obj", "type": { @@ -102329,49 +123974,52 @@ }, { "location": { - "column": 45, + "column": 63, "file": "", - "line": 2142 + "line": 2916 }, - "name": "x", + "name": "event_code", "type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_event_code_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "EVENT | int" } }, { "location": { - "column": 56, + "column": 80, "file": "", - "line": 2142 + "line": 2916 }, - "name": "y", + "name": "param", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } } ], - "python_name": "move_to", + "python_name": "send_event", "receiver": "obj", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "identifier", + "name": "lv_result_t" }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" }, "role": "object_method", "static": false, @@ -102385,19 +124033,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_move_to_index", + "c_name": "lv_obj_set_adv_hittest", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2078 + "line": 3001 }, "parameters": [ { "location": { - "column": 36, + "column": 38, "file": "", - "line": 2078 + "line": 3001 }, "name": "obj", "type": { @@ -102415,14 +124063,14 @@ }, { "location": { - "column": 51, + "column": 50, "file": "", - "line": 2078 + "line": 3001 }, - "name": "index", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -102431,7 +124079,7 @@ } } ], - "python_name": "move_to_index", + "python_name": "set_adv_hittest", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102454,39 +124102,53 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_null_on_delete", + "c_name": "lv_obj_set_align", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3857 + "line": 1918 }, "parameters": [ { "location": { - "column": 38, + "column": 32, "file": "", - "line": 3857 + "line": 1918 }, - "name": "obj_ptr", + "name": "obj", "type": { "kind": "pointer", "target": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "identifier", + "name": "lv_obj_t" } }, "view": { - "category": "pointer", - "conversion": "pointer", - "python_type": "Any" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 50, + "file": "", + "line": 1918 + }, + "name": "align", + "type": { + "kind": "identifier", + "name": "lv_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "ALIGN | int" } } ], - "python_name": "null_on_delete", + "python_name": "set_align", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102498,7 +124160,7 @@ "python_type": "None" }, "role": "object_method", - "static": true, + "static": false, "storage": [], "variadic": false, "visibility": "public" @@ -102509,19 +124171,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_readjust_scroll", + "c_name": "lv_obj_set_alt", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2199 + "line": 3013 }, "parameters": [ { "location": { - "column": 38, + "column": 30, "file": "", - "line": 2199 + "line": 3013 }, "name": "obj", "type": { @@ -102539,14 +124201,14 @@ }, { "location": { - "column": 62, + "column": 42, "file": "", - "line": 2199 + "line": 3013 }, - "name": "anim_en", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_anim_enable_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -102555,7 +124217,7 @@ } } ], - "python_name": "readjust_scroll", + "python_name": "set_alt", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102578,56 +124240,53 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_redraw", + "c_name": "lv_obj_set_checkable", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3865 + "line": 2987 }, "parameters": [ { "location": { - "column": 31, + "column": 36, "file": "", - "line": 3865 + "line": 2987 }, - "name": "layer", + "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_layer_t" + "name": "lv_obj_t" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "layer_t" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 49, + "column": 48, "file": "", - "line": 3865 + "line": 2987 }, - "name": "obj", + "name": "en", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "primitive", + "name": "bool" }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "redraw", + "python_name": "set_checkable", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102639,7 +124298,7 @@ "python_type": "None" }, "role": "object_method", - "static": true, + "static": false, "storage": [], "variadic": false, "visibility": "public" @@ -102650,56 +124309,53 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_refr", + "c_name": "lv_obj_set_checked", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5957 + "line": 3014 }, "parameters": [ { "location": { - "column": 29, + "column": 34, "file": "", - "line": 5957 + "line": 3014 }, - "name": "layer", + "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_layer_t" + "name": "lv_obj_t" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "layer_t" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 47, + "column": 46, "file": "", - "line": 5957 + "line": 3014 }, - "name": "obj", + "name": "en", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "primitive", + "name": "bool" }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "refr", + "python_name": "set_checked", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102711,7 +124367,7 @@ "python_type": "None" }, "role": "object_method", - "static": true, + "static": false, "storage": [], "variadic": false, "visibility": "public" @@ -102722,19 +124378,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_refr_pos", + "c_name": "lv_obj_set_click_focusable", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2141 + "line": 2986 }, "parameters": [ { "location": { - "column": 31, + "column": 42, "file": "", - "line": 2141 + "line": 2986 }, "name": "obj", "type": { @@ -102749,9 +124405,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 54, + "file": "", + "line": 2986 + }, + "name": "en", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "refr_pos", + "python_name": "set_click_focusable", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102774,19 +124447,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_refr_size", + "c_name": "lv_obj_set_clickable", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2104 + "line": 2985 }, "parameters": [ { "location": { - "column": 32, + "column": 36, "file": "", - "line": 2104 + "line": 2985 }, "name": "obj", "type": { @@ -102801,18 +124474,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 48, + "file": "", + "line": 2985 + }, + "name": "en", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "refr_size", + "python_name": "set_clickable", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -102826,19 +124516,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_refresh_ext_draw_size", + "c_name": "lv_obj_set_content_height", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3611 + "line": 1913 }, "parameters": [ { "location": { - "column": 44, + "column": 41, "file": "", - "line": 3611 + "line": 1913 }, "name": "obj", "type": { @@ -102853,9 +124543,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 56, + "file": "", + "line": 1913 + }, + "name": "h", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "refresh_ext_draw_size", + "python_name": "set_content_height", "receiver": "obj", "return_type": { "kind": "primitive", @@ -102878,19 +124585,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_refresh_self_size", + "c_name": "lv_obj_set_content_width", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2140 + "line": 1912 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 2140 + "line": 1912 }, "name": "obj", "type": { @@ -102905,18 +124612,35 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 55, + "file": "", + "line": 1912 + }, + "name": "w", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "refresh_self_size", + "python_name": "set_content_width", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -102930,19 +124654,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_refresh_style", + "c_name": "lv_obj_set_disabled", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2242 + "line": 3021 }, "parameters": [ { "location": { - "column": 36, + "column": 35, "file": "", - "line": 2242 + "line": 3021 }, "name": "obj", "type": { @@ -102960,31 +124684,14 @@ }, { "location": { - "column": 53, - "file": "", - "line": 2242 - }, - "name": "part", - "type": { - "kind": "identifier", - "name": "lv_part_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PART | int" - } - }, - { - "location": { - "column": 75, + "column": 47, "file": "", - "line": 2242 + "line": 3021 }, - "name": "prop", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_style_prop_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -102993,7 +124700,7 @@ } } ], - "python_name": "refresh_style", + "python_name": "set_disabled", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103016,19 +124723,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_event", + "c_name": "lv_obj_set_edited", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3783 + "line": 3017 }, "parameters": [ { "location": { - "column": 35, + "column": 33, "file": "", - "line": 3783 + "line": 3017 }, "name": "obj", "type": { @@ -103046,14 +124753,14 @@ }, { "location": { - "column": 51, + "column": 45, "file": "", - "line": 3783 + "line": 3017 }, - "name": "index", + "name": "en", "type": { - "kind": "identifier", - "name": "uint32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -103062,16 +124769,16 @@ } } ], - "python_name": "remove_event", + "python_name": "set_edited", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -103085,19 +124792,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_event_cb", + "c_name": "lv_obj_set_event_bubble", "function_specifiers": [], "location": { - "column": 10, + "column": 6, "file": "", - "line": 3785 + "line": 2999 }, "parameters": [ { "location": { - "column": 42, + "column": 39, "file": "", - "line": 3785 + "line": 2999 }, "name": "obj", "type": { @@ -103115,32 +124822,32 @@ }, { "location": { - "column": 63, + "column": 51, "file": "", - "line": 3785 + "line": 2999 }, - "name": "event_cb", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_event_cb_t" + "kind": "primitive", + "name": "bool" }, "view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[event_t], None]" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "remove_event_cb", + "python_name": "set_event_bubble", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "uint32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -103154,19 +124861,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_event_cb_with_user_data", + "c_name": "lv_obj_set_event_trickle", "function_specifiers": [], "location": { - "column": 10, + "column": 6, "file": "", - "line": 3786 + "line": 3006 }, "parameters": [ { "location": { - "column": 57, + "column": 40, "file": "", - "line": 3786 + "line": 3006 }, "name": "obj", "type": { @@ -103184,52 +124891,32 @@ }, { "location": { - "column": 78, - "file": "", - "line": 3786 - }, - "name": "event_cb", - "type": { - "kind": "identifier", - "name": "lv_event_cb_t" - }, - "view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[event_t], None]" - } - }, - { - "location": { - "column": 93, + "column": 52, "file": "", - "line": 3786 + "line": 3006 }, - "name": "user_data", + "name": "en", "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "primitive", + "name": "bool" }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "remove_event_cb_with_user_data", + "python_name": "set_event_trickle", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "uint32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -103243,19 +124930,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_event_dsc", + "c_name": "lv_obj_set_ext_click_area", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3784 + "line": 1960 }, "parameters": [ { "location": { - "column": 39, + "column": 41, "file": "", - "line": 3784 + "line": 1960 }, "name": "obj", "type": { @@ -103273,35 +124960,32 @@ }, { "location": { - "column": 61, + "column": 56, "file": "", - "line": 3784 + "line": 1960 }, - "name": "dsc", + "name": "size", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_event_dsc_t" - } + "kind": "identifier", + "name": "int32_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "event_dsc_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "remove_event_dsc", + "python_name": "set_ext_click_area", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -103315,19 +124999,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_flag", + "c_name": "lv_obj_set_ext_draw_size", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3838 + "line": 2793 }, "parameters": [ { "location": { - "column": 34, + "column": 40, "file": "", - "line": 3838 + "line": 2793 }, "name": "obj", "type": { @@ -103347,21 +125031,21 @@ "location": { "column": 55, "file": "", - "line": 3838 + "line": 2793 }, - "name": "f", + "name": "size", "type": { "kind": "identifier", - "name": "lv_obj_flag_t" + "name": "int32_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "OBJ_FLAG | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "remove_flag", + "python_name": "set_ext_draw_size", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103384,19 +125068,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_from_subject", + "c_name": "lv_obj_set_flag", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3929 + "line": 2983 }, "parameters": [ { "location": { - "column": 42, + "column": 31, "file": "", - "line": 3929 + "line": 2983 }, "name": "obj", "type": { @@ -103414,26 +125098,40 @@ }, { "location": { - "column": 62, + "column": 52, "file": "", - "line": 3929 + "line": 2983 }, - "name": "subject", + "name": "f", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_subject_t" - } + "kind": "identifier", + "name": "lv_obj_flag_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "subject_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "OBJ_FLAG | int" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 2983 + }, + "name": "v", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "remove_from_subject", + "python_name": "set_flag", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103456,19 +125154,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_local_style_prop", + "c_name": "lv_obj_set_flex_align", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2252 + "line": 1346 }, "parameters": [ { "location": { - "column": 46, + "column": 37, "file": "", - "line": 2252 + "line": 1346 }, "name": "obj", "type": { @@ -103486,49 +125184,66 @@ }, { "location": { - "column": 69, + "column": 60, "file": "", - "line": 2252 + "line": 1346 }, - "name": "prop", + "name": "main_place", "type": { "kind": "identifier", - "name": "lv_style_prop_t" + "name": "lv_flex_align_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" } }, { "location": { - "column": 95, + "column": 88, "file": "", - "line": 2252 + "line": 1346 }, - "name": "selector", + "name": "cross_place", "type": { "kind": "identifier", - "name": "lv_style_selector_t" + "name": "lv_flex_align_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" + } + }, + { + "location": { + "column": 44, + "file": "", + "line": 1347 + }, + "name": "track_cross_place", + "type": { + "kind": "identifier", + "name": "lv_flex_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FLEX_ALIGN | int" } } ], - "python_name": "remove_local_style_prop", + "python_name": "set_flex_align", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -103542,19 +125257,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_state", + "c_name": "lv_obj_set_flex_flow", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3841 + "line": 1345 }, "parameters": [ { "location": { - "column": 35, + "column": 36, "file": "", - "line": 3841 + "line": 1345 }, "name": "obj", "type": { @@ -103572,23 +125287,23 @@ }, { "location": { - "column": 53, + "column": 58, "file": "", - "line": 3841 + "line": 1345 }, - "name": "state", + "name": "flow", "type": { "kind": "identifier", - "name": "lv_state_t" + "name": "lv_flex_flow_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "STATE | int" + "python_type": "FLEX_FLOW | int" } } ], - "python_name": "remove_state", + "python_name": "set_flex_flow", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103611,19 +125326,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_style", + "c_name": "lv_obj_set_flex_grow", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2238 + "line": 1348 }, "parameters": [ { "location": { - "column": 35, + "column": 36, "file": "", - "line": 2238 + "line": 1348 }, "name": "obj", "type": { @@ -103641,37 +125356,14 @@ }, { "location": { - "column": 59, - "file": "", - "line": 2238 - }, - "name": "style", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_style_t", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "style_t" - } - }, - { - "location": { - "column": 88, + "column": 51, "file": "", - "line": 2238 + "line": 1348 }, - "name": "selector", + "name": "grow", "type": { "kind": "identifier", - "name": "lv_style_selector_t" + "name": "uint8_t" }, "view": { "category": "scalar", @@ -103680,7 +125372,7 @@ } } ], - "python_name": "remove_style", + "python_name": "set_flex_grow", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103703,19 +125395,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_style_all", + "c_name": "lv_obj_set_flex_in_new_track", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2240 + "line": 3009 }, "parameters": [ { "location": { - "column": 39, + "column": 44, "file": "", - "line": 2240 + "line": 3009 }, "name": "obj", "type": { @@ -103730,9 +125422,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 56, + "file": "", + "line": 3009 + }, + "name": "en", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], - "python_name": "remove_style_all", + "python_name": "set_flex_in_new_track", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103755,19 +125464,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_remove_theme", + "c_name": "lv_obj_set_floating", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2239 + "line": 3003 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 2239 + "line": 3003 }, "name": "obj", "type": { @@ -103785,14 +125494,14 @@ }, { "location": { - "column": 62, + "column": 47, "file": "", - "line": 2239 + "line": 3003 }, - "name": "selector", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_style_selector_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -103801,7 +125510,7 @@ } } ], - "python_name": "remove_theme", + "python_name": "set_floating", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103824,19 +125533,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_replace_style", + "c_name": "lv_obj_set_focus_key", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2236 + "line": 3016 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 2236 + "line": 3016 }, "name": "obj", "type": { @@ -103854,60 +125563,83 @@ }, { "location": { - "column": 60, + "column": 48, "file": "", - "line": 2236 + "line": 3016 }, - "name": "old_style", + "name": "en", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_style_t", - "qualifiers": [ - "const" - ] - } + "kind": "primitive", + "name": "bool" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "style_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } - }, + } + ], + "python_name": "set_focus_key", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_focused", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3015 + }, + "parameters": [ { "location": { - "column": 90, + "column": 34, "file": "", - "line": 2236 + "line": 3015 }, - "name": "new_style", + "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_style_t", - "qualifiers": [ - "const" - ] + "name": "lv_obj_t" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "style_t" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 47, + "column": 46, "file": "", - "line": 2237 + "line": 3015 }, - "name": "selector", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_style_selector_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -103916,16 +125648,16 @@ } } ], - "python_name": "replace_style", + "python_name": "set_focused", "receiver": "obj", "return_type": { "kind": "primitive", - "name": "bool" + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -103939,36 +125671,53 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_report_style_change", + "c_name": "lv_obj_set_gesture_bubble", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2241 + "line": 3000 }, "parameters": [ { "location": { - "column": 44, + "column": 41, "file": "", - "line": 2241 + "line": 3000 }, - "name": "style", + "name": "obj", "type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_style_t" + "name": "lv_obj_t" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "style_t" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 53, + "file": "", + "line": 3000 + }, + "name": "en", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "report_style_change", + "python_name": "set_gesture_bubble", "receiver": "obj", "return_type": { "kind": "primitive", @@ -103980,7 +125729,7 @@ "python_type": "None" }, "role": "object_method", - "static": true, + "static": false, "storage": [], "variadic": false, "visibility": "public" @@ -103991,19 +125740,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_reset_transform", + "c_name": "lv_obj_set_grid_align", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2119 + "line": 1362 }, "parameters": [ { "location": { - "column": 38, + "column": 37, "file": "", - "line": 2119 + "line": 1362 }, "name": "obj", "type": { @@ -104018,9 +125767,43 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 60, + "file": "", + "line": 1362 + }, + "name": "column_align", + "type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + } + }, + { + "location": { + "column": 90, + "file": "", + "line": 1362 + }, + "name": "row_align", + "type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + } } ], - "python_name": "reset_transform", + "python_name": "set_grid_align", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104043,19 +125826,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_by", + "c_name": "lv_obj_set_grid_cell", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2187 + "line": 1363 }, "parameters": [ { "location": { - "column": 32, + "column": 36, "file": "", - "line": 2187 + "line": 1363 }, "name": "obj", "type": { @@ -104073,11 +125856,28 @@ }, { "location": { - "column": 47, + "column": 59, "file": "", - "line": 2187 + "line": 1363 }, - "name": "dx", + "name": "column_align", + "type": { + "kind": "identifier", + "name": "lv_grid_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + } + }, + { + "location": { + "column": 81, + "file": "", + "line": 1363 + }, + "name": "col_pos", "type": { "kind": "identifier", "name": "int32_t" @@ -104090,11 +125890,11 @@ }, { "location": { - "column": 59, + "column": 98, "file": "", - "line": 2187 + "line": 1363 }, - "name": "dy", + "name": "col_span", "type": { "kind": "identifier", "name": "int32_t" @@ -104107,14 +125907,48 @@ }, { "location": { - "column": 80, + "column": 43, "file": "", - "line": 2187 + "line": 1364 }, - "name": "anim_en", + "name": "row_align", "type": { "kind": "identifier", - "name": "lv_anim_enable_t" + "name": "lv_grid_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "GRID_ALIGN | int" + } + }, + { + "location": { + "column": 62, + "file": "", + "line": 1364 + }, + "name": "row_pos", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 79, + "file": "", + "line": 1364 + }, + "name": "row_span", + "type": { + "kind": "identifier", + "name": "int32_t" }, "view": { "category": "scalar", @@ -104123,7 +125957,7 @@ } } ], - "python_name": "scroll_by", + "python_name": "set_grid_cell", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104146,19 +125980,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_by_bounded", + "c_name": "lv_obj_set_grid_dsc_array", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2188 + "line": 1361 }, "parameters": [ { "location": { - "column": 40, + "column": 41, "file": "", - "line": 2188 + "line": 1361 }, "name": "obj", "type": { @@ -104176,57 +126010,58 @@ }, { "location": { - "column": 55, - "file": "", - "line": 2188 - }, - "name": "dx", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 67, + "column": 62, "file": "", - "line": 2188 + "line": 1361 }, - "name": "dy", + "name": "col_dsc", "type": { - "kind": "identifier", - "name": "int32_t" + "dimensions": [ + "" + ], + "element": { + "kind": "identifier", + "name": "int32_t", + "qualifiers": [ + "const" + ] + }, + "kind": "array" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "array", + "conversion": "array", + "python_type": "Sequence[int]" } }, { "location": { - "column": 88, + "column": 87, "file": "", - "line": 2188 + "line": 1361 }, - "name": "anim_en", + "name": "row_dsc", "type": { - "kind": "identifier", - "name": "lv_anim_enable_t" + "dimensions": [ + "" + ], + "element": { + "kind": "identifier", + "name": "int32_t", + "qualifiers": [ + "const" + ] + }, + "kind": "array" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "array", + "conversion": "array", + "python_type": "Sequence[int]" } } ], - "python_name": "scroll_by_bounded", + "python_name": "set_grid_dsc_array", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104249,19 +126084,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_by_raw", + "c_name": "lv_obj_set_height", "function_specifiers": [], "location": { - "column": 13, + "column": 6, "file": "", - "line": 5980 + "line": 1911 }, "parameters": [ { "location": { - "column": 43, + "column": 33, "file": "", - "line": 5980 + "line": 1911 }, "name": "obj", "type": { @@ -104279,28 +126114,11 @@ }, { "location": { - "column": 58, - "file": "", - "line": 5980 - }, - "name": "x", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 69, + "column": 48, "file": "", - "line": 5980 + "line": 1911 }, - "name": "y", + "name": "h", "type": { "kind": "identifier", "name": "int32_t" @@ -104312,16 +126130,16 @@ } } ], - "python_name": "scroll_by_raw", + "python_name": "set_height", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_result_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "RESULT | int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -104335,19 +126153,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_to", + "c_name": "lv_obj_set_hidden", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2189 + "line": 2984 }, "parameters": [ { "location": { - "column": 32, + "column": 33, "file": "", - "line": 2189 + "line": 2984 }, "name": "obj", "type": { @@ -104365,48 +126183,83 @@ }, { "location": { - "column": 47, + "column": 45, "file": "", - "line": 2189 + "line": 2984 }, - "name": "x", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", "conversion": "integer", "python_type": "int" } - }, + } + ], + "python_name": "set_hidden", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_hovered", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3018 + }, + "parameters": [ { "location": { - "column": 58, + "column": 34, "file": "", - "line": 2189 + "line": 3018 }, - "name": "y", + "name": "obj", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 78, + "column": 46, "file": "", - "line": 2189 + "line": 3018 }, - "name": "anim_en", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_anim_enable_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -104415,7 +126268,7 @@ } } ], - "python_name": "scroll_to", + "python_name": "set_hovered", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104438,19 +126291,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_to_view", + "c_name": "lv_obj_set_ignore_layout", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2192 + "line": 3002 }, "parameters": [ { "location": { - "column": 37, + "column": 40, "file": "", - "line": 2192 + "line": 3002 }, "name": "obj", "type": { @@ -104468,14 +126321,14 @@ }, { "location": { - "column": 61, + "column": 52, "file": "", - "line": 2192 + "line": 3002 }, - "name": "anim_en", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_anim_enable_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -104484,7 +126337,7 @@ } } ], - "python_name": "scroll_to_view", + "python_name": "set_ignore_layout", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104507,19 +126360,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_to_view_recursive", + "c_name": "lv_obj_set_layout", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2193 + "line": 1914 }, "parameters": [ { "location": { - "column": 47, + "column": 33, "file": "", - "line": 2193 + "line": 1914 }, "name": "obj", "type": { @@ -104537,14 +126390,14 @@ }, { "location": { - "column": 71, + "column": 49, "file": "", - "line": 2193 + "line": 1914 }, - "name": "anim_en", + "name": "layout", "type": { "kind": "identifier", - "name": "lv_anim_enable_t" + "name": "uint32_t" }, "view": { "category": "scalar", @@ -104553,7 +126406,7 @@ } } ], - "python_name": "scroll_to_view_recursive", + "python_name": "set_layout", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104576,19 +126429,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_to_x", + "c_name": "lv_obj_set_local_style_prop", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2190 + "line": 2059 }, "parameters": [ { "location": { - "column": 34, + "column": 43, "file": "", - "line": 2190 + "line": 2059 }, "name": "obj", "type": { @@ -104606,14 +126459,14 @@ }, { "location": { - "column": 49, + "column": 66, "file": "", - "line": 2190 + "line": 2059 }, - "name": "x", + "name": "prop", "type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_style_prop_t" }, "view": { "category": "scalar", @@ -104623,14 +126476,31 @@ }, { "location": { - "column": 69, + "column": 89, "file": "", - "line": 2190 + "line": 2059 }, - "name": "anim_en", + "name": "value", "type": { "kind": "identifier", - "name": "lv_anim_enable_t" + "name": "lv_style_value_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "style_value_t" + } + }, + { + "location": { + "column": 54, + "file": "", + "line": 2060 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" }, "view": { "category": "scalar", @@ -104639,7 +126509,7 @@ } } ], - "python_name": "scroll_to_x", + "python_name": "set_local_style_prop", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104662,19 +126532,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scroll_to_y", + "c_name": "lv_obj_set_overflow_visible", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2191 + "line": 3005 }, "parameters": [ { "location": { - "column": 34, + "column": 43, "file": "", - "line": 2191 + "line": 3005 }, "name": "obj", "type": { @@ -104692,31 +126562,14 @@ }, { "location": { - "column": 49, - "file": "", - "line": 2191 - }, - "name": "y", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 69, + "column": 55, "file": "", - "line": 2191 + "line": 3005 }, - "name": "anim_en", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_anim_enable_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -104725,7 +126578,7 @@ } } ], - "python_name": "scroll_to_y", + "python_name": "set_overflow_visible", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104748,19 +126601,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_scrollbar_invalidate", + "c_name": "lv_obj_set_parent", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2198 + "line": 1881 }, "parameters": [ { "location": { - "column": 43, + "column": 33, "file": "", - "line": 2198 + "line": 1881 }, "name": "obj", "type": { @@ -104775,9 +126628,29 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 49, + "file": "", + "line": 1881 + }, + "name": "parent", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } } ], - "python_name": "scrollbar_invalidate", + "python_name": "set_parent", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104800,19 +126673,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_send_event", + "c_name": "lv_obj_set_pos", "function_specifiers": [], "location": { - "column": 13, + "column": 6, "file": "", - "line": 3776 + "line": 1905 }, "parameters": [ { "location": { - "column": 40, + "column": 30, "file": "", - "line": 3776 + "line": 1905 }, "name": "obj", "type": { @@ -104830,52 +126703,49 @@ }, { "location": { - "column": 63, + "column": 45, "file": "", - "line": 3776 + "line": 1905 }, - "name": "event_code", + "name": "x", "type": { "kind": "identifier", - "name": "lv_event_code_t" + "name": "int32_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "EVENT | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } }, { "location": { - "column": 80, + "column": 56, "file": "", - "line": 3776 + "line": 1905 }, - "name": "param", + "name": "y", "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "identifier", + "name": "int32_t" }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "send_event", + "python_name": "set_pos", "receiver": "obj", "return_type": { - "kind": "identifier", - "name": "lv_result_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "RESULT | int" + "category": "void", + "conversion": "none", + "python_type": "None" }, "role": "object_method", "static": false, @@ -104889,19 +126759,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_align", + "c_name": "lv_obj_set_press_lock", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2113 + "line": 2998 }, "parameters": [ { "location": { - "column": 32, + "column": 37, "file": "", - "line": 2113 + "line": 2998 }, "name": "obj", "type": { @@ -104919,23 +126789,23 @@ }, { "location": { - "column": 50, + "column": 49, "file": "", - "line": 2113 + "line": 2998 }, - "name": "align", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_align_t" + "kind": "primitive", + "name": "bool" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_align", + "python_name": "set_press_lock", "receiver": "obj", "return_type": { "kind": "primitive", @@ -104958,19 +126828,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_content_height", + "c_name": "lv_obj_set_pressed", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2108 + "line": 3019 }, "parameters": [ { "location": { - "column": 41, + "column": 34, "file": "", - "line": 2108 + "line": 3019 }, "name": "obj", "type": { @@ -104988,14 +126858,14 @@ }, { "location": { - "column": 56, + "column": 46, "file": "", - "line": 2108 + "line": 3019 }, - "name": "h", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -105004,7 +126874,7 @@ } } ], - "python_name": "set_content_height", + "python_name": "set_pressed", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105027,19 +126897,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_content_width", + "c_name": "lv_obj_set_radio_button", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2107 + "line": 3008 }, "parameters": [ { "location": { - "column": 40, + "column": 39, "file": "", - "line": 2107 + "line": 3008 }, "name": "obj", "type": { @@ -105057,14 +126927,14 @@ }, { "location": { - "column": 55, + "column": 51, "file": "", - "line": 2107 + "line": 3008 }, - "name": "w", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -105073,7 +126943,7 @@ } } ], - "python_name": "set_content_width", + "python_name": "set_radio_button", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105096,19 +126966,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_ext_click_area", + "c_name": "lv_obj_set_scroll_chain", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2153 + "line": 2992 }, "parameters": [ { "location": { - "column": 41, + "column": 39, "file": "", - "line": 2153 + "line": 2992 }, "name": "obj", "type": { @@ -105126,14 +126996,14 @@ }, { "location": { - "column": 56, + "column": 51, "file": "", - "line": 2153 + "line": 2992 }, - "name": "size", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -105142,7 +127012,7 @@ } } ], - "python_name": "set_ext_click_area", + "python_name": "set_scroll_chain", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105165,19 +127035,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_flag", + "c_name": "lv_obj_set_scroll_chain_hor", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3839 + "line": 2993 }, "parameters": [ { "location": { - "column": 31, + "column": 43, "file": "", - "line": 3839 + "line": 2993 }, "name": "obj", "type": { @@ -105195,28 +127065,11 @@ }, { "location": { - "column": 52, - "file": "", - "line": 3839 - }, - "name": "f", - "type": { - "kind": "identifier", - "name": "lv_obj_flag_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "OBJ_FLAG | int" - } - }, - { - "location": { - "column": 60, + "column": 55, "file": "", - "line": 3839 + "line": 2993 }, - "name": "v", + "name": "en", "type": { "kind": "primitive", "name": "bool" @@ -105228,7 +127081,7 @@ } } ], - "python_name": "set_flag", + "python_name": "set_scroll_chain_hor", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105251,19 +127104,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_flex_align", + "c_name": "lv_obj_set_scroll_chain_ver", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 1407 + "line": 2994 }, "parameters": [ { "location": { - "column": 37, + "column": 43, "file": "", - "line": 1407 + "line": 2994 }, "name": "obj", "type": { @@ -105281,57 +127134,23 @@ }, { "location": { - "column": 60, - "file": "", - "line": 1407 - }, - "name": "main_place", - "type": { - "kind": "identifier", - "name": "lv_flex_align_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FLEX_ALIGN | int" - } - }, - { - "location": { - "column": 88, - "file": "", - "line": 1407 - }, - "name": "cross_place", - "type": { - "kind": "identifier", - "name": "lv_flex_align_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FLEX_ALIGN | int" - } - }, - { - "location": { - "column": 44, + "column": 55, "file": "", - "line": 1408 + "line": 2994 }, - "name": "track_cross_place", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_flex_align_t" + "kind": "primitive", + "name": "bool" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FLEX_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_flex_align", + "python_name": "set_scroll_chain_ver", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105354,19 +127173,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_flex_flow", + "c_name": "lv_obj_set_scroll_dir", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 1406 + "line": 1980 }, "parameters": [ { "location": { - "column": 36, + "column": 37, "file": "", - "line": 1406 + "line": 1980 }, "name": "obj", "type": { @@ -105384,23 +127203,23 @@ }, { "location": { - "column": 58, + "column": 53, "file": "", - "line": 1406 + "line": 1980 }, - "name": "flow", + "name": "dir", "type": { "kind": "identifier", - "name": "lv_flex_flow_t" + "name": "lv_dir_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "FLEX_FLOW | int" + "python_type": "DIR | int" } } ], - "python_name": "set_flex_flow", + "python_name": "set_scroll_dir", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105423,19 +127242,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_flex_grow", + "c_name": "lv_obj_set_scroll_elastic", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 1409 + "line": 2989 }, "parameters": [ { "location": { - "column": 36, + "column": 41, "file": "", - "line": 1409 + "line": 2989 }, "name": "obj", "type": { @@ -105453,14 +127272,14 @@ }, { "location": { - "column": 51, + "column": 53, "file": "", - "line": 1409 + "line": 2989 }, - "name": "grow", + "name": "en", "type": { - "kind": "identifier", - "name": "uint8_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -105469,7 +127288,7 @@ } } ], - "python_name": "set_flex_grow", + "python_name": "set_scroll_elastic", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105492,19 +127311,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_grid_align", + "c_name": "lv_obj_set_scroll_momentum", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 1423 + "line": 2990 }, "parameters": [ { "location": { - "column": 37, + "column": 42, "file": "", - "line": 1423 + "line": 2990 }, "name": "obj", "type": { @@ -105522,40 +127341,23 @@ }, { "location": { - "column": 60, - "file": "", - "line": 1423 - }, - "name": "column_align", - "type": { - "kind": "identifier", - "name": "lv_grid_align_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" - } - }, - { - "location": { - "column": 90, + "column": 54, "file": "", - "line": 1423 + "line": 2990 }, - "name": "row_align", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_grid_align_t" + "kind": "primitive", + "name": "bool" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_grid_align", + "python_name": "set_scroll_momentum", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105578,19 +127380,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_grid_cell", + "c_name": "lv_obj_set_scroll_on_focus", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 1424 + "line": 2995 }, "parameters": [ { "location": { - "column": 36, + "column": 42, "file": "", - "line": 1424 + "line": 2995 }, "name": "obj", "type": { @@ -105608,99 +127410,83 @@ }, { "location": { - "column": 59, - "file": "", - "line": 1424 - }, - "name": "column_align", - "type": { - "kind": "identifier", - "name": "lv_grid_align_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" - } - }, - { - "location": { - "column": 81, - "file": "", - "line": 1424 - }, - "name": "col_pos", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 98, + "column": 54, "file": "", - "line": 1424 + "line": 2995 }, - "name": "col_span", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", "conversion": "integer", "python_type": "int" } - }, - { - "location": { - "column": 43, - "file": "", - "line": 1425 - }, - "name": "row_align", - "type": { - "kind": "identifier", - "name": "lv_grid_align_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "GRID_ALIGN | int" - } - }, + } + ], + "python_name": "set_scroll_on_focus", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_scroll_one", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2991 + }, + "parameters": [ { "location": { - "column": 62, + "column": 37, "file": "", - "line": 1425 + "line": 2991 }, - "name": "row_pos", + "name": "obj", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 79, + "column": 49, "file": "", - "line": 1425 + "line": 2991 }, - "name": "row_span", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -105709,7 +127495,7 @@ } } ], - "python_name": "set_grid_cell", + "python_name": "set_scroll_one", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105732,19 +127518,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_grid_dsc_array", + "c_name": "lv_obj_set_scroll_snap_x", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 1422 + "line": 1981 }, "parameters": [ { "location": { - "column": 41, + "column": 40, "file": "", - "line": 1422 + "line": 1981 }, "name": "obj", "type": { @@ -105762,58 +127548,23 @@ }, { "location": { - "column": 62, - "file": "", - "line": 1422 - }, - "name": "col_dsc", - "type": { - "dimensions": [ - "" - ], - "element": { - "kind": "identifier", - "name": "int32_t", - "qualifiers": [ - "const" - ] - }, - "kind": "array" - }, - "view": { - "category": "array", - "conversion": "array", - "python_type": "Sequence[int]" - } - }, - { - "location": { - "column": 87, + "column": 64, "file": "", - "line": 1422 + "line": 1981 }, - "name": "row_dsc", + "name": "align", "type": { - "dimensions": [ - "" - ], - "element": { - "kind": "identifier", - "name": "int32_t", - "qualifiers": [ - "const" - ] - }, - "kind": "array" + "kind": "identifier", + "name": "lv_scroll_snap_t" }, "view": { - "category": "array", - "conversion": "array", - "python_type": "Sequence[int]" + "category": "enum", + "conversion": "enum_int", + "python_type": "SCROLL_SNAP | int" } } ], - "python_name": "set_grid_dsc_array", + "python_name": "set_scroll_snap_x", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105836,19 +127587,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_height", + "c_name": "lv_obj_set_scroll_snap_y", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2106 + "line": 1982 }, "parameters": [ { "location": { - "column": 33, + "column": 40, "file": "", - "line": 2106 + "line": 1982 }, "name": "obj", "type": { @@ -105866,23 +127617,23 @@ }, { "location": { - "column": 48, + "column": 64, "file": "", - "line": 2106 + "line": 1982 }, - "name": "h", + "name": "align", "type": { "kind": "identifier", - "name": "int32_t" + "name": "lv_scroll_snap_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "SCROLL_SNAP | int" } } ], - "python_name": "set_height", + "python_name": "set_scroll_snap_y", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105905,19 +127656,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_layout", + "c_name": "lv_obj_set_scroll_with_arrow", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2109 + "line": 2996 }, "parameters": [ { "location": { - "column": 33, + "column": 44, "file": "", - "line": 2109 + "line": 2996 }, "name": "obj", "type": { @@ -105935,14 +127686,14 @@ }, { "location": { - "column": 49, + "column": 56, "file": "", - "line": 2109 + "line": 2996 }, - "name": "layout", + "name": "en", "type": { - "kind": "identifier", - "name": "uint32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -105951,7 +127702,7 @@ } } ], - "python_name": "set_layout", + "python_name": "set_scroll_with_arrow", "receiver": "obj", "return_type": { "kind": "primitive", @@ -105974,19 +127725,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_local_style_prop", + "c_name": "lv_obj_set_scrollable", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2248 + "line": 2988 }, "parameters": [ { "location": { - "column": 43, + "column": 37, "file": "", - "line": 2248 + "line": 2988 }, "name": "obj", "type": { @@ -106004,57 +127755,92 @@ }, { "location": { - "column": 66, + "column": 49, "file": "", - "line": 2248 + "line": 2988 }, - "name": "prop", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_style_prop_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", "conversion": "integer", "python_type": "int" } - }, + } + ], + "python_name": "set_scrollable", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_scrollbar_mode", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1979 + }, + "parameters": [ { "location": { - "column": 89, + "column": 41, "file": "", - "line": 2248 + "line": 1979 }, - "name": "value", + "name": "obj", "type": { - "kind": "identifier", - "name": "lv_style_value_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } }, "view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "style_value_t" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" } }, { "location": { - "column": 54, + "column": 68, "file": "", - "line": 2249 + "line": 1979 }, - "name": "selector", + "name": "mode", "type": { "kind": "identifier", - "name": "lv_style_selector_t" + "name": "lv_scrollbar_mode_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "enum", + "conversion": "enum_int", + "python_type": "SCROLLBAR_MODE | int" } } ], - "python_name": "set_local_style_prop", + "python_name": "set_scrollbar_mode", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106077,19 +127863,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_parent", + "c_name": "lv_obj_set_scrolled", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2076 + "line": 3020 }, "parameters": [ { "location": { - "column": 33, + "column": 35, "file": "", - "line": 2076 + "line": 3020 }, "name": "obj", "type": { @@ -106107,26 +127893,23 @@ }, { "location": { - "column": 49, + "column": 47, "file": "", - "line": 2076 + "line": 3020 }, - "name": "parent", + "name": "en", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_obj_t" - } + "kind": "primitive", + "name": "bool" }, "view": { - "category": "object_pointer", - "conversion": "object_handle", - "python_type": "obj" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_parent", + "python_name": "set_scrolled", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106149,19 +127932,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_pos", + "c_name": "lv_obj_set_send_draw_task_events", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2100 + "line": 3004 }, "parameters": [ { "location": { - "column": 30, + "column": 48, "file": "", - "line": 2100 + "line": 3004 }, "name": "obj", "type": { @@ -106179,31 +127962,14 @@ }, { "location": { - "column": 45, - "file": "", - "line": 2100 - }, - "name": "x", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 56, + "column": 60, "file": "", - "line": 2100 + "line": 3004 }, - "name": "y", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -106212,7 +127978,7 @@ } } ], - "python_name": "set_pos", + "python_name": "set_send_draw_task_events", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106235,19 +128001,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_radio_button", + "c_name": "lv_obj_set_size", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3844 + "line": 1908 }, "parameters": [ { "location": { - "column": 39, + "column": 31, "file": "", - "line": 3844 + "line": 1908 }, "name": "obj", "type": { @@ -106265,14 +128031,31 @@ }, { "location": { - "column": 51, + "column": 46, "file": "", - "line": 3844 + "line": 1908 }, - "name": "en", + "name": "w", "type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 57, + "file": "", + "line": 1908 + }, + "name": "h", + "type": { + "kind": "identifier", + "name": "int32_t" }, "view": { "category": "scalar", @@ -106281,7 +128064,7 @@ } } ], - "python_name": "set_radio_button", + "python_name": "set_size", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106304,19 +128087,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_scroll_dir", + "c_name": "lv_obj_set_snappable", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2173 + "line": 2997 }, "parameters": [ { "location": { - "column": 37, + "column": 36, "file": "", - "line": 2173 + "line": 2997 }, "name": "obj", "type": { @@ -106334,23 +128117,23 @@ }, { "location": { - "column": 53, + "column": 48, "file": "", - "line": 2173 + "line": 2997 }, - "name": "dir", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_dir_t" + "kind": "primitive", + "name": "bool" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "DIR | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_scroll_dir", + "python_name": "set_snappable", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106373,19 +128156,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_scroll_snap_x", + "c_name": "lv_obj_set_state", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2174 + "line": 3012 }, "parameters": [ { "location": { - "column": 40, + "column": 32, "file": "", - "line": 2174 + "line": 3012 }, "name": "obj", "type": { @@ -106403,23 +128186,40 @@ }, { "location": { - "column": 64, + "column": 50, "file": "", - "line": 2174 + "line": 3012 }, - "name": "align", + "name": "state", "type": { "kind": "identifier", - "name": "lv_scroll_snap_t" + "name": "lv_state_t" }, "view": { "category": "enum", "conversion": "enum_int", - "python_type": "SCROLL_SNAP | int" + "python_type": "STATE | int" + } + }, + { + "location": { + "column": 62, + "file": "", + "line": 3012 + }, + "name": "v", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_scroll_snap_x", + "python_name": "set_state", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106442,19 +128242,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_scroll_snap_y", + "c_name": "lv_obj_set_state_trickle", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2175 + "line": 3007 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 2175 + "line": 3007 }, "name": "obj", "type": { @@ -106472,23 +128272,23 @@ }, { "location": { - "column": 64, + "column": 52, "file": "", - "line": 2175 + "line": 3007 }, - "name": "align", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_scroll_snap_t" + "kind": "primitive", + "name": "bool" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "SCROLL_SNAP | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_scroll_snap_y", + "python_name": "set_state_trickle", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106511,19 +128311,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_scrollbar_mode", + "c_name": "lv_obj_set_state_user_1", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2172 + "line": 3022 }, "parameters": [ { "location": { - "column": 41, + "column": 39, "file": "", - "line": 2172 + "line": 3022 }, "name": "obj", "type": { @@ -106541,23 +128341,23 @@ }, { "location": { - "column": 68, + "column": 51, "file": "", - "line": 2172 + "line": 3022 }, - "name": "mode", + "name": "en", "type": { - "kind": "identifier", - "name": "lv_scrollbar_mode_t" + "kind": "primitive", + "name": "bool" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "SCROLLBAR_MODE | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_scrollbar_mode", + "python_name": "set_state_user_1", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106580,19 +128380,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_size", + "c_name": "lv_obj_set_state_user_2", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 2103 + "line": 3023 }, "parameters": [ { "location": { - "column": 31, + "column": 39, "file": "", - "line": 2103 + "line": 3023 }, "name": "obj", "type": { @@ -106610,31 +128410,83 @@ }, { "location": { - "column": 46, + "column": 51, "file": "", - "line": 2103 + "line": 3023 }, - "name": "w", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", "conversion": "integer", "python_type": "int" } + } + ], + "python_name": "set_state_user_2", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_state_user_3", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3024 + }, + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 3024 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } }, { "location": { - "column": 57, + "column": 51, "file": "", - "line": 2103 + "line": 3024 }, - "name": "h", + "name": "en", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "bool" }, "view": { "category": "scalar", @@ -106643,7 +128495,7 @@ } } ], - "python_name": "set_size", + "python_name": "set_state_user_3", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106666,19 +128518,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_obj_set_state", + "c_name": "lv_obj_set_state_user_4", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3842 + "line": 3025 }, "parameters": [ { "location": { - "column": 32, + "column": 39, "file": "", - "line": 3842 + "line": 3025 }, "name": "obj", "type": { @@ -106696,28 +128548,11 @@ }, { "location": { - "column": 50, - "file": "", - "line": 3842 - }, - "name": "state", - "type": { - "kind": "identifier", - "name": "lv_state_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "STATE | int" - } - }, - { - "location": { - "column": 62, + "column": 51, "file": "", - "line": 3842 + "line": 3025 }, - "name": "v", + "name": "en", "type": { "kind": "primitive", "name": "bool" @@ -106729,7 +128564,7 @@ } } ], - "python_name": "set_state", + "python_name": "set_state_user_4", "receiver": "obj", "return_type": { "kind": "primitive", @@ -106757,14 +128592,14 @@ "location": { "column": 6, "file": "", - "line": 2973 + "line": 2225 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 2973 + "line": 2225 }, "name": "obj", "type": { @@ -106784,7 +128619,7 @@ "location": { "column": 56, "file": "", - "line": 2973 + "line": 2225 }, "name": "value", "type": { @@ -106801,7 +128636,7 @@ "location": { "column": 83, "file": "", - "line": 2973 + "line": 2225 }, "name": "selector", "type": { @@ -106843,14 +128678,14 @@ "location": { "column": 6, "file": "", - "line": 3069 + "line": 2322 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3069 + "line": 2322 }, "name": "obj", "type": { @@ -106870,7 +128705,7 @@ "location": { "column": 60, "file": "", - "line": 3069 + "line": 2322 }, "name": "value", "type": { @@ -106893,7 +128728,7 @@ "location": { "column": 89, "file": "", - "line": 3069 + "line": 2322 }, "name": "selector", "type": { @@ -106935,14 +128770,14 @@ "location": { "column": 6, "file": "", - "line": 3070 + "line": 2323 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3070 + "line": 2323 }, "name": "obj", "type": { @@ -106962,7 +128797,7 @@ "location": { "column": 62, "file": "", - "line": 3070 + "line": 2323 }, "name": "value", "type": { @@ -106979,7 +128814,7 @@ "location": { "column": 89, "file": "", - "line": 3070 + "line": 2323 }, "name": "selector", "type": { @@ -107021,14 +128856,14 @@ "location": { "column": 6, "file": "", - "line": 3038 + "line": 2290 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3038 + "line": 2290 }, "name": "obj", "type": { @@ -107048,7 +128883,7 @@ "location": { "column": 60, "file": "", - "line": 3038 + "line": 2290 }, "name": "value", "type": { @@ -107065,7 +128900,7 @@ "location": { "column": 87, "file": "", - "line": 3038 + "line": 2290 }, "name": "selector", "type": { @@ -107107,14 +128942,14 @@ "location": { "column": 6, "file": "", - "line": 3040 + "line": 2292 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3040 + "line": 2292 }, "name": "obj", "type": { @@ -107134,7 +128969,7 @@ "location": { "column": 64, "file": "", - "line": 3040 + "line": 2292 }, "name": "value", "type": { @@ -107157,7 +128992,7 @@ "location": { "column": 93, "file": "", - "line": 3040 + "line": 2292 }, "name": "selector", "type": { @@ -107199,14 +129034,14 @@ "location": { "column": 6, "file": "", - "line": 3039 + "line": 2291 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3039 + "line": 2291 }, "name": "obj", "type": { @@ -107226,7 +129061,7 @@ "location": { "column": 56, "file": "", - "line": 3039 + "line": 2291 }, "name": "value", "type": { @@ -107243,7 +129078,7 @@ "location": { "column": 83, "file": "", - "line": 3039 + "line": 2291 }, "name": "selector", "type": { @@ -107285,14 +129120,14 @@ "location": { "column": 6, "file": "", - "line": 3037 + "line": 2289 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3037 + "line": 2289 }, "name": "obj", "type": { @@ -107312,7 +129147,7 @@ "location": { "column": 56, "file": "", - "line": 3037 + "line": 2289 }, "name": "value", "type": { @@ -107329,7 +129164,7 @@ "location": { "column": 83, "file": "", - "line": 3037 + "line": 2289 }, "name": "selector", "type": { @@ -107371,14 +129206,14 @@ "location": { "column": 6, "file": "", - "line": 3036 + "line": 2288 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3036 + "line": 2288 }, "name": "obj", "type": { @@ -107398,7 +129233,7 @@ "location": { "column": 57, "file": "", - "line": 3036 + "line": 2288 }, "name": "value", "type": { @@ -107415,7 +129250,7 @@ "location": { "column": 84, "file": "", - "line": 3036 + "line": 2288 }, "name": "selector", "type": { @@ -107457,14 +129292,14 @@ "location": { "column": 6, "file": "", - "line": 3074 + "line": 2327 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3074 + "line": 2327 }, "name": "obj", "type": { @@ -107484,7 +129319,7 @@ "location": { "column": 62, "file": "", - "line": 3074 + "line": 2327 }, "name": "value", "type": { @@ -107501,7 +129336,7 @@ "location": { "column": 89, "file": "", - "line": 3074 + "line": 2327 }, "name": "selector", "type": { @@ -107543,14 +129378,14 @@ "location": { "column": 6, "file": "", - "line": 2997 + "line": 2249 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 2997 + "line": 2249 }, "name": "obj", "type": { @@ -107570,7 +129405,7 @@ "location": { "column": 59, "file": "", - "line": 2997 + "line": 2249 }, "name": "value", "type": { @@ -107587,7 +129422,7 @@ "location": { "column": 86, "file": "", - "line": 2997 + "line": 2249 }, "name": "selector", "type": { @@ -107629,14 +129464,14 @@ "location": { "column": 6, "file": "", - "line": 3005 + "line": 2257 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3005 + "line": 2257 }, "name": "obj", "type": { @@ -107656,7 +129491,7 @@ "location": { "column": 67, "file": "", - "line": 3005 + "line": 2257 }, "name": "value", "type": { @@ -107679,7 +129514,7 @@ "location": { "column": 96, "file": "", - "line": 3005 + "line": 2257 }, "name": "selector", "type": { @@ -107721,14 +129556,14 @@ "location": { "column": 6, "file": "", - "line": 2999 + "line": 2251 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 2999 + "line": 2251 }, "name": "obj", "type": { @@ -107748,7 +129583,7 @@ "location": { "column": 64, "file": "", - "line": 2999 + "line": 2251 }, "name": "value", "type": { @@ -107765,7 +129600,7 @@ "location": { "column": 91, "file": "", - "line": 2999 + "line": 2251 }, "name": "selector", "type": { @@ -107807,14 +129642,14 @@ "location": { "column": 6, "file": "", - "line": 3000 + "line": 2252 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3000 + "line": 2252 }, "name": "obj", "type": { @@ -107834,7 +129669,7 @@ "location": { "column": 65, "file": "", - "line": 3000 + "line": 2252 }, "name": "value", "type": { @@ -107851,7 +129686,7 @@ "location": { "column": 92, "file": "", - "line": 3000 + "line": 2252 }, "name": "selector", "type": { @@ -107893,14 +129728,14 @@ "location": { "column": 6, "file": "", - "line": 3004 + "line": 2256 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3004 + "line": 2256 }, "name": "obj", "type": { @@ -107920,7 +129755,7 @@ "location": { "column": 60, "file": "", - "line": 3004 + "line": 2256 }, "name": "value", "type": { @@ -107937,7 +129772,7 @@ "location": { "column": 87, "file": "", - "line": 3004 + "line": 2256 }, "name": "selector", "type": { @@ -107979,14 +129814,14 @@ "location": { "column": 6, "file": "", - "line": 3002 + "line": 2254 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3002 + "line": 2254 }, "name": "obj", "type": { @@ -108006,7 +129841,7 @@ "location": { "column": 60, "file": "", - "line": 3002 + "line": 2254 }, "name": "value", "type": { @@ -108023,7 +129858,7 @@ "location": { "column": 87, "file": "", - "line": 3002 + "line": 2254 }, "name": "selector", "type": { @@ -108065,14 +129900,14 @@ "location": { "column": 6, "file": "", - "line": 3007 + "line": 2259 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3007 + "line": 2259 }, "name": "obj", "type": { @@ -108092,7 +129927,7 @@ "location": { "column": 61, "file": "", - "line": 3007 + "line": 2259 }, "name": "value", "type": { @@ -108109,7 +129944,7 @@ "location": { "column": 88, "file": "", - "line": 3007 + "line": 2259 }, "name": "selector", "type": { @@ -108151,14 +129986,14 @@ "location": { "column": 6, "file": "", - "line": 3008 + "line": 2260 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3008 + "line": 2260 }, "name": "obj", "type": { @@ -108178,7 +130013,7 @@ "location": { "column": 67, "file": "", - "line": 3008 + "line": 2260 }, "name": "value", "type": { @@ -108195,7 +130030,7 @@ "location": { "column": 94, "file": "", - "line": 3008 + "line": 2260 }, "name": "selector", "type": { @@ -108237,14 +130072,14 @@ "location": { "column": 6, "file": "", - "line": 3009 + "line": 2261 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3009 + "line": 2261 }, "name": "obj", "type": { @@ -108264,7 +130099,7 @@ "location": { "column": 69, "file": "", - "line": 3009 + "line": 2261 }, "name": "value", "type": { @@ -108281,7 +130116,7 @@ "location": { "column": 96, "file": "", - "line": 3009 + "line": 2261 }, "name": "selector", "type": { @@ -108323,14 +130158,14 @@ "location": { "column": 6, "file": "", - "line": 3006 + "line": 2258 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3006 + "line": 2258 }, "name": "obj", "type": { @@ -108350,7 +130185,7 @@ "location": { "column": 63, "file": "", - "line": 3006 + "line": 2258 }, "name": "value", "type": { @@ -108373,7 +130208,7 @@ "location": { "column": 92, "file": "", - "line": 3006 + "line": 2258 }, "name": "selector", "type": { @@ -108415,14 +130250,14 @@ "location": { "column": 6, "file": "", - "line": 3010 + "line": 2262 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3010 + "line": 2262 }, "name": "obj", "type": { @@ -108442,7 +130277,7 @@ "location": { "column": 59, "file": "", - "line": 3010 + "line": 2262 }, "name": "value", "type": { @@ -108459,7 +130294,7 @@ "location": { "column": 86, "file": "", - "line": 3010 + "line": 2262 }, "name": "selector", "type": { @@ -108501,14 +130336,14 @@ "location": { "column": 6, "file": "", - "line": 3003 + "line": 2255 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3003 + "line": 2255 }, "name": "obj", "type": { @@ -108528,7 +130363,7 @@ "location": { "column": 60, "file": "", - "line": 3003 + "line": 2255 }, "name": "value", "type": { @@ -108545,7 +130380,7 @@ "location": { "column": 87, "file": "", - "line": 3003 + "line": 2255 }, "name": "selector", "type": { @@ -108587,14 +130422,14 @@ "location": { "column": 6, "file": "", - "line": 3001 + "line": 2253 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3001 + "line": 2253 }, "name": "obj", "type": { @@ -108614,7 +130449,7 @@ "location": { "column": 60, "file": "", - "line": 3001 + "line": 2253 }, "name": "value", "type": { @@ -108631,7 +130466,7 @@ "location": { "column": 87, "file": "", - "line": 3001 + "line": 2253 }, "name": "selector", "type": { @@ -108673,14 +130508,14 @@ "location": { "column": 6, "file": "", - "line": 2998 + "line": 2250 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 2998 + "line": 2250 }, "name": "obj", "type": { @@ -108700,7 +130535,7 @@ "location": { "column": 55, "file": "", - "line": 2998 + "line": 2250 }, "name": "value", "type": { @@ -108717,7 +130552,7 @@ "location": { "column": 82, "file": "", - "line": 2998 + "line": 2250 }, "name": "selector", "type": { @@ -108759,14 +130594,14 @@ "location": { "column": 6, "file": "", - "line": 3075 + "line": 2328 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3075 + "line": 2328 }, "name": "obj", "type": { @@ -108786,7 +130621,7 @@ "location": { "column": 66, "file": "", - "line": 3075 + "line": 2328 }, "name": "value", "type": { @@ -108809,7 +130644,7 @@ "location": { "column": 95, "file": "", - "line": 3075 + "line": 2328 }, "name": "selector", "type": { @@ -108851,14 +130686,14 @@ "location": { "column": 6, "file": "", - "line": 3072 + "line": 2325 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3072 + "line": 2325 }, "name": "obj", "type": { @@ -108878,7 +130713,7 @@ "location": { "column": 66, "file": "", - "line": 3072 + "line": 2325 }, "name": "value", "type": { @@ -108895,7 +130730,7 @@ "location": { "column": 93, "file": "", - "line": 3072 + "line": 2325 }, "name": "selector", "type": { @@ -108937,14 +130772,14 @@ "location": { "column": 6, "file": "", - "line": 3052 + "line": 2305 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3052 + "line": 2305 }, "name": "obj", "type": { @@ -108964,7 +130799,7 @@ "location": { "column": 58, "file": "", - "line": 3052 + "line": 2305 }, "name": "value", "type": { @@ -108981,7 +130816,7 @@ "location": { "column": 85, "file": "", - "line": 3052 + "line": 2305 }, "name": "selector", "type": { @@ -109023,14 +130858,14 @@ "location": { "column": 6, "file": "", - "line": 3053 + "line": 2306 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3053 + "line": 2306 }, "name": "obj", "type": { @@ -109050,7 +130885,7 @@ "location": { "column": 70, "file": "", - "line": 3053 + "line": 2306 }, "name": "value", "type": { @@ -109067,7 +130902,7 @@ "location": { "column": 97, "file": "", - "line": 3053 + "line": 2306 }, "name": "selector", "type": { @@ -109109,14 +130944,14 @@ "location": { "column": 6, "file": "", - "line": 3051 + "line": 2304 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3051 + "line": 2304 }, "name": "obj", "type": { @@ -109136,7 +130971,7 @@ "location": { "column": 59, "file": "", - "line": 3051 + "line": 2304 }, "name": "value", "type": { @@ -109153,7 +130988,7 @@ "location": { "column": 86, "file": "", - "line": 3051 + "line": 2304 }, "name": "selector", "type": { @@ -109195,14 +131030,14 @@ "location": { "column": 6, "file": "", - "line": 3011 + "line": 2263 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3011 + "line": 2263 }, "name": "obj", "type": { @@ -109222,7 +131057,7 @@ "location": { "column": 63, "file": "", - "line": 3011 + "line": 2263 }, "name": "value", "type": { @@ -109239,7 +131074,7 @@ "location": { "column": 90, "file": "", - "line": 3011 + "line": 2263 }, "name": "selector", "type": { @@ -109281,14 +131116,14 @@ "location": { "column": 6, "file": "", - "line": 3012 + "line": 2264 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3012 + "line": 2264 }, "name": "obj", "type": { @@ -109308,7 +131143,7 @@ "location": { "column": 59, "file": "", - "line": 3012 + "line": 2264 }, "name": "value", "type": { @@ -109325,7 +131160,7 @@ "location": { "column": 86, "file": "", - "line": 3012 + "line": 2264 }, "name": "selector", "type": { @@ -109367,14 +131202,14 @@ "location": { "column": 6, "file": "", - "line": 3015 + "line": 2267 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3015 + "line": 2267 }, "name": "obj", "type": { @@ -109394,7 +131229,7 @@ "location": { "column": 56, "file": "", - "line": 3015 + "line": 2267 }, "name": "value", "type": { @@ -109411,7 +131246,7 @@ "location": { "column": 83, "file": "", - "line": 3015 + "line": 2267 }, "name": "selector", "type": { @@ -109453,14 +131288,14 @@ "location": { "column": 6, "file": "", - "line": 3014 + "line": 2266 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3014 + "line": 2266 }, "name": "obj", "type": { @@ -109480,7 +131315,7 @@ "location": { "column": 68, "file": "", - "line": 3014 + "line": 2266 }, "name": "value", "type": { @@ -109497,7 +131332,7 @@ "location": { "column": 95, "file": "", - "line": 3014 + "line": 2266 }, "name": "selector", "type": { @@ -109539,14 +131374,14 @@ "location": { "column": 6, "file": "", - "line": 3013 + "line": 2265 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3013 + "line": 2265 }, "name": "obj", "type": { @@ -109566,7 +131401,7 @@ "location": { "column": 60, "file": "", - "line": 3013 + "line": 2265 }, "name": "value", "type": { @@ -109583,7 +131418,7 @@ "location": { "column": 87, "file": "", - "line": 3013 + "line": 2265 }, "name": "selector", "type": { @@ -109625,14 +131460,14 @@ "location": { "column": 6, "file": "", - "line": 3062 + "line": 2315 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3062 + "line": 2315 }, "name": "obj", "type": { @@ -109652,7 +131487,7 @@ "location": { "column": 56, "file": "", - "line": 3062 + "line": 2315 }, "name": "value", "type": { @@ -109669,7 +131504,7 @@ "location": { "column": 83, "file": "", - "line": 3062 + "line": 2315 }, "name": "selector", "type": { @@ -109711,14 +131546,14 @@ "location": { "column": 6, "file": "", - "line": 3065 + "line": 2318 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3065 + "line": 2318 }, "name": "obj", "type": { @@ -109738,7 +131573,7 @@ "location": { "column": 84, "file": "", - "line": 3065 + "line": 2318 }, "name": "value", "type": { @@ -109761,7 +131596,7 @@ "location": { "column": 113, "file": "", - "line": 3065 + "line": 2318 }, "name": "selector", "type": { @@ -109803,14 +131638,14 @@ "location": { "column": 6, "file": "", - "line": 3066 + "line": 2319 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3066 + "line": 2319 }, "name": "obj", "type": { @@ -109830,7 +131665,7 @@ "location": { "column": 65, "file": "", - "line": 3066 + "line": 2319 }, "name": "value", "type": { @@ -109847,7 +131682,7 @@ "location": { "column": 92, "file": "", - "line": 3066 + "line": 2319 }, "name": "selector", "type": { @@ -109889,14 +131724,14 @@ "location": { "column": 6, "file": "", - "line": 3057 + "line": 2310 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3057 + "line": 2310 }, "name": "obj", "type": { @@ -109916,7 +131751,7 @@ "location": { "column": 68, "file": "", - "line": 3057 + "line": 2310 }, "name": "value", "type": { @@ -109933,7 +131768,7 @@ "location": { "column": 95, "file": "", - "line": 3057 + "line": 2310 }, "name": "selector", "type": { @@ -109975,14 +131810,14 @@ "location": { "column": 6, "file": "", - "line": 3055 + "line": 2308 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3055 + "line": 2308 }, "name": "obj", "type": { @@ -110002,7 +131837,7 @@ "location": { "column": 68, "file": "", - "line": 3055 + "line": 2308 }, "name": "value", "type": { @@ -110019,7 +131854,7 @@ "location": { "column": 95, "file": "", - "line": 3055 + "line": 2308 }, "name": "selector", "type": { @@ -110061,14 +131896,14 @@ "location": { "column": 6, "file": "", - "line": 3056 + "line": 2309 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3056 + "line": 2309 }, "name": "obj", "type": { @@ -110088,7 +131923,7 @@ "location": { "column": 68, "file": "", - "line": 3056 + "line": 2309 }, "name": "value", "type": { @@ -110105,7 +131940,7 @@ "location": { "column": 95, "file": "", - "line": 3056 + "line": 2309 }, "name": "selector", "type": { @@ -110147,14 +131982,14 @@ "location": { "column": 6, "file": "", - "line": 3058 + "line": 2311 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3058 + "line": 2311 }, "name": "obj", "type": { @@ -110174,7 +132009,7 @@ "location": { "column": 64, "file": "", - "line": 3058 + "line": 2311 }, "name": "value", "type": { @@ -110191,7 +132026,7 @@ "location": { "column": 91, "file": "", - "line": 3058 + "line": 2311 }, "name": "selector", "type": { @@ -110233,14 +132068,14 @@ "location": { "column": 6, "file": "", - "line": 3059 + "line": 2312 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 3059 + "line": 2312 }, "name": "obj", "type": { @@ -110260,7 +132095,7 @@ "location": { "column": 77, "file": "", - "line": 3059 + "line": 2312 }, "name": "value", "type": { @@ -110277,7 +132112,7 @@ "location": { "column": 104, "file": "", - "line": 3059 + "line": 2312 }, "name": "selector", "type": { @@ -110319,14 +132154,14 @@ "location": { "column": 6, "file": "", - "line": 3054 + "line": 2307 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3054 + "line": 2307 }, "name": "obj", "type": { @@ -110346,7 +132181,7 @@ "location": { "column": 66, "file": "", - "line": 3054 + "line": 2307 }, "name": "value", "type": { @@ -110363,7 +132198,7 @@ "location": { "column": 93, "file": "", - "line": 3054 + "line": 2307 }, "name": "selector", "type": { @@ -110394,6 +132229,115 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_style_enabled", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2050 + }, + "parameters": [ + { + "location": { + "column": 40, + "file": "", + "line": 2050 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 64, + "file": "", + "line": 2050 + }, + "name": "style", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" + } + }, + { + "location": { + "column": 93, + "file": "", + "line": 2050 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 108, + "file": "", + "line": 2050 + }, + "name": "en", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_style_enabled", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -110405,14 +132349,14 @@ "location": { "column": 6, "file": "", - "line": 3079 + "line": 2332 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3079 + "line": 2332 }, "name": "obj", "type": { @@ -110432,7 +132376,7 @@ "location": { "column": 72, "file": "", - "line": 3079 + "line": 2332 }, "name": "value", "type": { @@ -110449,7 +132393,7 @@ "location": { "column": 99, "file": "", - "line": 3079 + "line": 2332 }, "name": "selector", "type": { @@ -110491,14 +132435,14 @@ "location": { "column": 6, "file": "", - "line": 3077 + "line": 2330 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3077 + "line": 2330 }, "name": "obj", "type": { @@ -110518,7 +132462,7 @@ "location": { "column": 64, "file": "", - "line": 3077 + "line": 2330 }, "name": "value", "type": { @@ -110535,7 +132479,7 @@ "location": { "column": 91, "file": "", - "line": 3077 + "line": 2330 }, "name": "selector", "type": { @@ -110577,14 +132521,14 @@ "location": { "column": 6, "file": "", - "line": 3081 + "line": 2334 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3081 + "line": 2334 }, "name": "obj", "type": { @@ -110604,7 +132548,7 @@ "location": { "column": 57, "file": "", - "line": 3081 + "line": 2334 }, "name": "value", "type": { @@ -110621,7 +132565,7 @@ "location": { "column": 84, "file": "", - "line": 3081 + "line": 2334 }, "name": "selector", "type": { @@ -110663,14 +132607,14 @@ "location": { "column": 6, "file": "", - "line": 3078 + "line": 2331 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3078 + "line": 2331 }, "name": "obj", "type": { @@ -110690,7 +132634,7 @@ "location": { "column": 71, "file": "", - "line": 3078 + "line": 2331 }, "name": "value", "type": { @@ -110707,7 +132651,7 @@ "location": { "column": 98, "file": "", - "line": 3078 + "line": 2331 }, "name": "selector", "type": { @@ -110749,14 +132693,14 @@ "location": { "column": 6, "file": "", - "line": 3080 + "line": 2333 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3080 + "line": 2333 }, "name": "obj", "type": { @@ -110776,7 +132720,7 @@ "location": { "column": 72, "file": "", - "line": 3080 + "line": 2333 }, "name": "value", "type": { @@ -110793,7 +132737,7 @@ "location": { "column": 99, "file": "", - "line": 3080 + "line": 2333 }, "name": "selector", "type": { @@ -110835,14 +132779,14 @@ "location": { "column": 6, "file": "", - "line": 3086 + "line": 2339 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3086 + "line": 2339 }, "name": "obj", "type": { @@ -110862,7 +132806,7 @@ "location": { "column": 68, "file": "", - "line": 3086 + "line": 2339 }, "name": "value", "type": { @@ -110879,7 +132823,7 @@ "location": { "column": 95, "file": "", - "line": 3086 + "line": 2339 }, "name": "selector", "type": { @@ -110921,14 +132865,14 @@ "location": { "column": 6, "file": "", - "line": 3088 + "line": 2341 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3088 + "line": 2341 }, "name": "obj", "type": { @@ -110948,7 +132892,7 @@ "location": { "column": 69, "file": "", - "line": 3088 + "line": 2341 }, "name": "value", "type": { @@ -110965,7 +132909,7 @@ "location": { "column": 96, "file": "", - "line": 3088 + "line": 2341 }, "name": "selector", "type": { @@ -111007,14 +132951,14 @@ "location": { "column": 6, "file": "", - "line": 3089 + "line": 2342 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3089 + "line": 2342 }, "name": "obj", "type": { @@ -111034,7 +132978,7 @@ "location": { "column": 65, "file": "", - "line": 3089 + "line": 2342 }, "name": "value", "type": { @@ -111051,7 +132995,7 @@ "location": { "column": 92, "file": "", - "line": 3089 + "line": 2342 }, "name": "selector", "type": { @@ -111093,14 +133037,14 @@ "location": { "column": 6, "file": "", - "line": 3091 + "line": 2344 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3091 + "line": 2344 }, "name": "obj", "type": { @@ -111120,7 +133064,7 @@ "location": { "column": 66, "file": "", - "line": 3091 + "line": 2344 }, "name": "value", "type": { @@ -111137,7 +133081,7 @@ "location": { "column": 93, "file": "", - "line": 3091 + "line": 2344 }, "name": "selector", "type": { @@ -111179,14 +133123,14 @@ "location": { "column": 6, "file": "", - "line": 3087 + "line": 2340 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3087 + "line": 2340 }, "name": "obj", "type": { @@ -111206,7 +133150,7 @@ "location": { "column": 73, "file": "", - "line": 3087 + "line": 2340 }, "name": "value", "type": { @@ -111223,7 +133167,7 @@ "location": { "column": 100, "file": "", - "line": 3087 + "line": 2340 }, "name": "selector", "type": { @@ -111265,14 +133209,14 @@ "location": { "column": 6, "file": "", - "line": 3090 + "line": 2343 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3090 + "line": 2343 }, "name": "obj", "type": { @@ -111292,7 +133236,7 @@ "location": { "column": 73, "file": "", - "line": 3090 + "line": 2343 }, "name": "value", "type": { @@ -111309,7 +133253,7 @@ "location": { "column": 100, "file": "", - "line": 3090 + "line": 2343 }, "name": "selector", "type": { @@ -111351,14 +133295,14 @@ "location": { "column": 6, "file": "", - "line": 3083 + "line": 2336 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3083 + "line": 2336 }, "name": "obj", "type": { @@ -111378,7 +133322,7 @@ "location": { "column": 73, "file": "", - "line": 3083 + "line": 2336 }, "name": "value", "type": { @@ -111395,7 +133339,7 @@ "location": { "column": 100, "file": "", - "line": 3083 + "line": 2336 }, "name": "selector", "type": { @@ -111437,14 +133381,14 @@ "location": { "column": 6, "file": "", - "line": 3082 + "line": 2335 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3082 + "line": 2335 }, "name": "obj", "type": { @@ -111464,7 +133408,7 @@ "location": { "column": 75, "file": "", - "line": 3082 + "line": 2335 }, "name": "value", "type": { @@ -111487,7 +133431,7 @@ "location": { "column": 104, "file": "", - "line": 3082 + "line": 2335 }, "name": "selector", "type": { @@ -111529,14 +133473,14 @@ "location": { "column": 6, "file": "", - "line": 3085 + "line": 2338 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3085 + "line": 2338 }, "name": "obj", "type": { @@ -111556,7 +133500,7 @@ "location": { "column": 70, "file": "", - "line": 3085 + "line": 2338 }, "name": "value", "type": { @@ -111573,7 +133517,7 @@ "location": { "column": 97, "file": "", - "line": 3085 + "line": 2338 }, "name": "selector", "type": { @@ -111615,14 +133559,14 @@ "location": { "column": 6, "file": "", - "line": 3084 + "line": 2337 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3084 + "line": 2337 }, "name": "obj", "type": { @@ -111642,7 +133586,7 @@ "location": { "column": 72, "file": "", - "line": 3084 + "line": 2337 }, "name": "value", "type": { @@ -111665,7 +133609,7 @@ "location": { "column": 101, "file": "", - "line": 3084 + "line": 2337 }, "name": "selector", "type": { @@ -111707,14 +133651,14 @@ "location": { "column": 6, "file": "", - "line": 2967 + "line": 2219 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 2967 + "line": 2219 }, "name": "obj", "type": { @@ -111734,7 +133678,7 @@ "location": { "column": 54, "file": "", - "line": 2967 + "line": 2219 }, "name": "value", "type": { @@ -111751,7 +133695,7 @@ "location": { "column": 81, "file": "", - "line": 2967 + "line": 2219 }, "name": "selector", "type": { @@ -111793,14 +133737,14 @@ "location": { "column": 6, "file": "", - "line": 3029 + "line": 2281 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 3029 + "line": 2281 }, "name": "obj", "type": { @@ -111820,7 +133764,7 @@ "location": { "column": 80, "file": "", - "line": 3029 + "line": 2281 }, "name": "value", "type": { @@ -111843,7 +133787,7 @@ "location": { "column": 109, "file": "", - "line": 3029 + "line": 2281 }, "name": "selector", "type": { @@ -111885,14 +133829,14 @@ "location": { "column": 6, "file": "", - "line": 3026 + "line": 2278 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3026 + "line": 2278 }, "name": "obj", "type": { @@ -111912,7 +133856,7 @@ "location": { "column": 58, "file": "", - "line": 3026 + "line": 2278 }, "name": "value", "type": { @@ -111929,7 +133873,7 @@ "location": { "column": 85, "file": "", - "line": 3026 + "line": 2278 }, "name": "selector", "type": { @@ -111971,14 +133915,14 @@ "location": { "column": 6, "file": "", - "line": 3027 + "line": 2279 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3027 + "line": 2279 }, "name": "obj", "type": { @@ -111998,7 +133942,7 @@ "location": { "column": 64, "file": "", - "line": 3027 + "line": 2279 }, "name": "value", "type": { @@ -112015,7 +133959,7 @@ "location": { "column": 91, "file": "", - "line": 3027 + "line": 2279 }, "name": "selector", "type": { @@ -112057,14 +134001,14 @@ "location": { "column": 6, "file": "", - "line": 3028 + "line": 2280 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3028 + "line": 2280 }, "name": "obj", "type": { @@ -112084,7 +134028,7 @@ "location": { "column": 66, "file": "", - "line": 3028 + "line": 2280 }, "name": "value", "type": { @@ -112101,7 +134045,7 @@ "location": { "column": 93, "file": "", - "line": 3028 + "line": 2280 }, "name": "selector", "type": { @@ -112143,14 +134087,14 @@ "location": { "column": 6, "file": "", - "line": 3073 + "line": 2326 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3073 + "line": 2326 }, "name": "obj", "type": { @@ -112170,7 +134114,7 @@ "location": { "column": 55, "file": "", - "line": 3073 + "line": 2326 }, "name": "value", "type": { @@ -112187,7 +134131,7 @@ "location": { "column": 82, "file": "", - "line": 3073 + "line": 2326 }, "name": "selector", "type": { @@ -112229,14 +134173,14 @@ "location": { "column": 6, "file": "", - "line": 2970 + "line": 2222 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 2970 + "line": 2222 }, "name": "obj", "type": { @@ -112256,7 +134200,7 @@ "location": { "column": 54, "file": "", - "line": 2970 + "line": 2222 }, "name": "value", "type": { @@ -112273,7 +134217,7 @@ "location": { "column": 81, "file": "", - "line": 2970 + "line": 2222 }, "name": "selector", "type": { @@ -112315,14 +134259,14 @@ "location": { "column": 6, "file": "", - "line": 3034 + "line": 2286 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3034 + "line": 2286 }, "name": "obj", "type": { @@ -112342,7 +134286,7 @@ "location": { "column": 61, "file": "", - "line": 3034 + "line": 2286 }, "name": "value", "type": { @@ -112359,7 +134303,7 @@ "location": { "column": 88, "file": "", - "line": 3034 + "line": 2286 }, "name": "selector", "type": { @@ -112401,14 +134345,14 @@ "location": { "column": 6, "file": "", - "line": 3032 + "line": 2284 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3032 + "line": 2284 }, "name": "obj", "type": { @@ -112428,7 +134372,7 @@ "location": { "column": 61, "file": "", - "line": 3032 + "line": 2284 }, "name": "value", "type": { @@ -112445,7 +134389,7 @@ "location": { "column": 88, "file": "", - "line": 3032 + "line": 2284 }, "name": "selector", "type": { @@ -112487,14 +134431,14 @@ "location": { "column": 6, "file": "", - "line": 3031 + "line": 2283 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3031 + "line": 2283 }, "name": "obj", "type": { @@ -112514,7 +134458,7 @@ "location": { "column": 63, "file": "", - "line": 3031 + "line": 2283 }, "name": "value", "type": { @@ -112531,7 +134475,7 @@ "location": { "column": 90, "file": "", - "line": 3031 + "line": 2283 }, "name": "selector", "type": { @@ -112573,14 +134517,14 @@ "location": { "column": 6, "file": "", - "line": 3035 + "line": 2287 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3035 + "line": 2287 }, "name": "obj", "type": { @@ -112600,7 +134544,7 @@ "location": { "column": 57, "file": "", - "line": 3035 + "line": 2287 }, "name": "value", "type": { @@ -112617,7 +134561,7 @@ "location": { "column": 84, "file": "", - "line": 3035 + "line": 2287 }, "name": "selector", "type": { @@ -112659,14 +134603,14 @@ "location": { "column": 6, "file": "", - "line": 3033 + "line": 2285 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3033 + "line": 2285 }, "name": "obj", "type": { @@ -112686,7 +134630,7 @@ "location": { "column": 57, "file": "", - "line": 3033 + "line": 2285 }, "name": "value", "type": { @@ -112703,7 +134647,7 @@ "location": { "column": 84, "file": "", - "line": 3033 + "line": 2285 }, "name": "selector", "type": { @@ -112745,14 +134689,14 @@ "location": { "column": 6, "file": "", - "line": 3030 + "line": 2282 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3030 + "line": 2282 }, "name": "obj", "type": { @@ -112772,7 +134716,7 @@ "location": { "column": 58, "file": "", - "line": 3030 + "line": 2282 }, "name": "value", "type": { @@ -112789,7 +134733,7 @@ "location": { "column": 85, "file": "", - "line": 3030 + "line": 2282 }, "name": "selector", "type": { @@ -112827,20 +134771,18 @@ "cpython" ], "c_name": "lv_obj_set_style_margin_all", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3109 + "line": 2348 }, "parameters": [ { "location": { - "column": 57, + "column": 43, "file": "", - "line": 3109 + "line": 2348 }, "name": "obj", "type": { @@ -112858,9 +134800,9 @@ }, { "location": { - "column": 72, + "column": 58, "file": "", - "line": 3109 + "line": 2348 }, "name": "value", "type": { @@ -112875,9 +134817,9 @@ }, { "location": { - "column": 99, + "column": 85, "file": "", - "line": 3109 + "line": 2348 }, "name": "selector", "type": { @@ -112904,9 +134846,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -112921,14 +134861,14 @@ "location": { "column": 6, "file": "", - "line": 2994 + "line": 2246 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 2994 + "line": 2246 }, "name": "obj", "type": { @@ -112948,7 +134888,7 @@ "location": { "column": 61, "file": "", - "line": 2994 + "line": 2246 }, "name": "value", "type": { @@ -112965,7 +134905,7 @@ "location": { "column": 88, "file": "", - "line": 2994 + "line": 2246 }, "name": "selector", "type": { @@ -113003,20 +134943,18 @@ "cpython" ], "c_name": "lv_obj_set_style_margin_hor", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3116 + "line": 2349 }, "parameters": [ { "location": { - "column": 57, + "column": 43, "file": "", - "line": 3116 + "line": 2349 }, "name": "obj", "type": { @@ -113034,9 +134972,9 @@ }, { "location": { - "column": 72, + "column": 58, "file": "", - "line": 3116 + "line": 2349 }, "name": "value", "type": { @@ -113051,9 +134989,9 @@ }, { "location": { - "column": 99, + "column": 85, "file": "", - "line": 3116 + "line": 2349 }, "name": "selector", "type": { @@ -113080,9 +135018,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -113097,14 +135033,14 @@ "location": { "column": 6, "file": "", - "line": 2995 + "line": 2247 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 2995 + "line": 2247 }, "name": "obj", "type": { @@ -113124,7 +135060,7 @@ "location": { "column": 59, "file": "", - "line": 2995 + "line": 2247 }, "name": "value", "type": { @@ -113141,7 +135077,7 @@ "location": { "column": 86, "file": "", - "line": 2995 + "line": 2247 }, "name": "selector", "type": { @@ -113183,14 +135119,14 @@ "location": { "column": 6, "file": "", - "line": 2996 + "line": 2248 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 2996 + "line": 2248 }, "name": "obj", "type": { @@ -113210,7 +135146,7 @@ "location": { "column": 60, "file": "", - "line": 2996 + "line": 2248 }, "name": "value", "type": { @@ -113227,7 +135163,7 @@ "location": { "column": 87, "file": "", - "line": 2996 + "line": 2248 }, "name": "selector", "type": { @@ -113269,14 +135205,14 @@ "location": { "column": 6, "file": "", - "line": 2993 + "line": 2245 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2993 + "line": 2245 }, "name": "obj", "type": { @@ -113296,7 +135232,7 @@ "location": { "column": 58, "file": "", - "line": 2993 + "line": 2245 }, "name": "value", "type": { @@ -113313,7 +135249,7 @@ "location": { "column": 85, "file": "", - "line": 2993 + "line": 2245 }, "name": "selector", "type": { @@ -113351,20 +135287,18 @@ "cpython" ], "c_name": "lv_obj_set_style_margin_ver", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3121 + "line": 2350 }, "parameters": [ { "location": { - "column": 57, + "column": 43, "file": "", - "line": 3121 + "line": 2350 }, "name": "obj", "type": { @@ -113382,9 +135316,9 @@ }, { "location": { - "column": 72, + "column": 58, "file": "", - "line": 3121 + "line": 2350 }, "name": "value", "type": { @@ -113399,9 +135333,9 @@ }, { "location": { - "column": 99, + "column": 85, "file": "", - "line": 3121 + "line": 2350 }, "name": "selector", "type": { @@ -113428,9 +135362,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -113445,14 +135377,14 @@ "location": { "column": 6, "file": "", - "line": 2969 + "line": 2221 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2969 + "line": 2221 }, "name": "obj", "type": { @@ -113472,7 +135404,7 @@ "location": { "column": 58, "file": "", - "line": 2969 + "line": 2221 }, "name": "value", "type": { @@ -113489,7 +135421,7 @@ "location": { "column": 85, "file": "", - "line": 2969 + "line": 2221 }, "name": "selector", "type": { @@ -113531,14 +135463,14 @@ "location": { "column": 6, "file": "", - "line": 2966 + "line": 2218 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 2966 + "line": 2218 }, "name": "obj", "type": { @@ -113558,7 +135490,7 @@ "location": { "column": 57, "file": "", - "line": 2966 + "line": 2218 }, "name": "value", "type": { @@ -113575,7 +135507,7 @@ "location": { "column": 84, "file": "", - "line": 2966 + "line": 2218 }, "name": "selector", "type": { @@ -113617,14 +135549,14 @@ "location": { "column": 6, "file": "", - "line": 2968 + "line": 2220 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2968 + "line": 2220 }, "name": "obj", "type": { @@ -113644,7 +135576,7 @@ "location": { "column": 58, "file": "", - "line": 2968 + "line": 2220 }, "name": "value", "type": { @@ -113661,7 +135593,7 @@ "location": { "column": 85, "file": "", - "line": 2968 + "line": 2220 }, "name": "selector", "type": { @@ -113703,14 +135635,14 @@ "location": { "column": 6, "file": "", - "line": 2965 + "line": 2217 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 2965 + "line": 2217 }, "name": "obj", "type": { @@ -113730,7 +135662,7 @@ "location": { "column": 57, "file": "", - "line": 2965 + "line": 2217 }, "name": "value", "type": { @@ -113747,7 +135679,7 @@ "location": { "column": 84, "file": "", - "line": 2965 + "line": 2217 }, "name": "selector", "type": { @@ -113789,14 +135721,14 @@ "location": { "column": 6, "file": "", - "line": 3063 + "line": 2316 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 3063 + "line": 2316 }, "name": "obj", "type": { @@ -113816,7 +135748,7 @@ "location": { "column": 52, "file": "", - "line": 3063 + "line": 2316 }, "name": "value", "type": { @@ -113833,7 +135765,7 @@ "location": { "column": 79, "file": "", - "line": 3063 + "line": 2316 }, "name": "selector", "type": { @@ -113875,14 +135807,14 @@ "location": { "column": 6, "file": "", - "line": 3064 + "line": 2317 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3064 + "line": 2317 }, "name": "obj", "type": { @@ -113902,7 +135834,7 @@ "location": { "column": 60, "file": "", - "line": 3064 + "line": 2317 }, "name": "value", "type": { @@ -113919,7 +135851,7 @@ "location": { "column": 87, "file": "", - "line": 3064 + "line": 2317 }, "name": "selector", "type": { @@ -113961,14 +135893,14 @@ "location": { "column": 6, "file": "", - "line": 3017 + "line": 2269 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3017 + "line": 2269 }, "name": "obj", "type": { @@ -113988,7 +135920,7 @@ "location": { "column": 64, "file": "", - "line": 3017 + "line": 2269 }, "name": "value", "type": { @@ -114005,7 +135937,7 @@ "location": { "column": 91, "file": "", - "line": 3017 + "line": 2269 }, "name": "selector", "type": { @@ -114047,14 +135979,14 @@ "location": { "column": 6, "file": "", - "line": 3018 + "line": 2270 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3018 + "line": 2270 }, "name": "obj", "type": { @@ -114074,7 +136006,7 @@ "location": { "column": 60, "file": "", - "line": 3018 + "line": 2270 }, "name": "value", "type": { @@ -114091,7 +136023,7 @@ "location": { "column": 87, "file": "", - "line": 3018 + "line": 2270 }, "name": "selector", "type": { @@ -114133,14 +136065,14 @@ "location": { "column": 6, "file": "", - "line": 3019 + "line": 2271 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3019 + "line": 2271 }, "name": "obj", "type": { @@ -114160,7 +136092,7 @@ "location": { "column": 59, "file": "", - "line": 3019 + "line": 2271 }, "name": "value", "type": { @@ -114177,7 +136109,7 @@ "location": { "column": 86, "file": "", - "line": 3019 + "line": 2271 }, "name": "selector", "type": { @@ -114219,14 +136151,14 @@ "location": { "column": 6, "file": "", - "line": 3016 + "line": 2268 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3016 + "line": 2268 }, "name": "obj", "type": { @@ -114246,7 +136178,7 @@ "location": { "column": 61, "file": "", - "line": 3016 + "line": 2268 }, "name": "value", "type": { @@ -114263,7 +136195,7 @@ "location": { "column": 88, "file": "", - "line": 3016 + "line": 2268 }, "name": "selector", "type": { @@ -114301,20 +136233,18 @@ "cpython" ], "c_name": "lv_obj_set_style_pad_all", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3092 + "line": 2345 }, "parameters": [ { "location": { - "column": 54, + "column": 40, "file": "", - "line": 3092 + "line": 2345 }, "name": "obj", "type": { @@ -114332,9 +136262,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 3092 + "line": 2345 }, "name": "value", "type": { @@ -114349,9 +136279,9 @@ }, { "location": { - "column": 96, + "column": 82, "file": "", - "line": 3092 + "line": 2345 }, "name": "selector", "type": { @@ -114378,9 +136308,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -114395,14 +136323,14 @@ "location": { "column": 6, "file": "", - "line": 2987 + "line": 2239 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2987 + "line": 2239 }, "name": "obj", "type": { @@ -114422,7 +136350,7 @@ "location": { "column": 58, "file": "", - "line": 2987 + "line": 2239 }, "name": "value", "type": { @@ -114439,7 +136367,7 @@ "location": { "column": 85, "file": "", - "line": 2987 + "line": 2239 }, "name": "selector", "type": { @@ -114481,14 +136409,14 @@ "location": { "column": 6, "file": "", - "line": 2991 + "line": 2243 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2991 + "line": 2243 }, "name": "obj", "type": { @@ -114508,7 +136436,7 @@ "location": { "column": 58, "file": "", - "line": 2991 + "line": 2243 }, "name": "value", "type": { @@ -114525,7 +136453,7 @@ "location": { "column": 85, "file": "", - "line": 2991 + "line": 2243 }, "name": "selector", "type": { @@ -114563,20 +136491,18 @@ "cpython" ], "c_name": "lv_obj_set_style_pad_gap", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3126 + "line": 2351 }, "parameters": [ { "location": { - "column": 54, + "column": 40, "file": "", - "line": 3126 + "line": 2351 }, "name": "obj", "type": { @@ -114594,9 +136520,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 3126 + "line": 2351 }, "name": "value", "type": { @@ -114611,9 +136537,9 @@ }, { "location": { - "column": 96, + "column": 82, "file": "", - "line": 3126 + "line": 2351 }, "name": "selector", "type": { @@ -114640,9 +136566,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -114653,20 +136577,18 @@ "cpython" ], "c_name": "lv_obj_set_style_pad_hor", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3099 + "line": 2346 }, "parameters": [ { "location": { - "column": 54, + "column": 40, "file": "", - "line": 3099 + "line": 2346 }, "name": "obj", "type": { @@ -114684,9 +136606,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 3099 + "line": 2346 }, "name": "value", "type": { @@ -114701,9 +136623,9 @@ }, { "location": { - "column": 96, + "column": 82, "file": "", - "line": 3099 + "line": 2346 }, "name": "selector", "type": { @@ -114730,9 +136652,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -114747,14 +136667,14 @@ "location": { "column": 6, "file": "", - "line": 2988 + "line": 2240 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 2988 + "line": 2240 }, "name": "obj", "type": { @@ -114774,7 +136694,7 @@ "location": { "column": 56, "file": "", - "line": 2988 + "line": 2240 }, "name": "value", "type": { @@ -114791,7 +136711,7 @@ "location": { "column": 83, "file": "", - "line": 2988 + "line": 2240 }, "name": "selector", "type": { @@ -114833,14 +136753,14 @@ "location": { "column": 6, "file": "", - "line": 2992 + "line": 2244 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 2992 + "line": 2244 }, "name": "obj", "type": { @@ -114860,7 +136780,7 @@ "location": { "column": 58, "file": "", - "line": 2992 + "line": 2244 }, "name": "value", "type": { @@ -114877,7 +136797,7 @@ "location": { "column": 85, "file": "", - "line": 2992 + "line": 2244 }, "name": "selector", "type": { @@ -114919,14 +136839,14 @@ "location": { "column": 6, "file": "", - "line": 2989 + "line": 2241 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 2989 + "line": 2241 }, "name": "obj", "type": { @@ -114946,7 +136866,7 @@ "location": { "column": 57, "file": "", - "line": 2989 + "line": 2241 }, "name": "value", "type": { @@ -114963,7 +136883,7 @@ "location": { "column": 84, "file": "", - "line": 2989 + "line": 2241 }, "name": "selector", "type": { @@ -115005,14 +136925,14 @@ "location": { "column": 6, "file": "", - "line": 2990 + "line": 2242 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 2990 + "line": 2242 }, "name": "obj", "type": { @@ -115032,7 +136952,7 @@ "location": { "column": 55, "file": "", - "line": 2990 + "line": 2242 }, "name": "value", "type": { @@ -115049,7 +136969,7 @@ "location": { "column": 82, "file": "", - "line": 2990 + "line": 2242 }, "name": "selector", "type": { @@ -115091,14 +137011,14 @@ "location": { "column": 6, "file": "", - "line": 2986 + "line": 2238 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 2986 + "line": 2238 }, "name": "obj", "type": { @@ -115118,7 +137038,7 @@ "location": { "column": 55, "file": "", - "line": 2986 + "line": 2238 }, "name": "value", "type": { @@ -115135,7 +137055,7 @@ "location": { "column": 82, "file": "", - "line": 2986 + "line": 2238 }, "name": "selector", "type": { @@ -115173,20 +137093,18 @@ "cpython" ], "c_name": "lv_obj_set_style_pad_ver", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3104 + "line": 2347 }, "parameters": [ { "location": { - "column": 54, + "column": 40, "file": "", - "line": 3104 + "line": 2347 }, "name": "obj", "type": { @@ -115204,9 +137122,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 3104 + "line": 2347 }, "name": "value", "type": { @@ -115221,9 +137139,9 @@ }, { "location": { - "column": 96, + "column": 82, "file": "", - "line": 3104 + "line": 2347 }, "name": "selector", "type": { @@ -115250,9 +137168,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -115267,14 +137183,14 @@ "location": { "column": 6, "file": "", - "line": 3061 + "line": 2314 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3061 + "line": 2314 }, "name": "obj", "type": { @@ -115294,7 +137210,7 @@ "location": { "column": 61, "file": "", - "line": 3061 + "line": 2314 }, "name": "value", "type": { @@ -115311,7 +137227,7 @@ "location": { "column": 88, "file": "", - "line": 3061 + "line": 2314 }, "name": "selector", "type": { @@ -115353,14 +137269,14 @@ "location": { "column": 6, "file": "", - "line": 3060 + "line": 2313 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3060 + "line": 2313 }, "name": "obj", "type": { @@ -115380,7 +137296,7 @@ "location": { "column": 54, "file": "", - "line": 3060 + "line": 2313 }, "name": "value", "type": { @@ -115397,7 +137313,7 @@ "location": { "column": 81, "file": "", - "line": 3060 + "line": 2313 }, "name": "selector", "type": { @@ -115439,14 +137355,14 @@ "location": { "column": 6, "file": "", - "line": 3067 + "line": 2320 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3067 + "line": 2320 }, "name": "obj", "type": { @@ -115466,7 +137382,7 @@ "location": { "column": 58, "file": "", - "line": 3067 + "line": 2320 }, "name": "value", "type": { @@ -115483,7 +137399,7 @@ "location": { "column": 85, "file": "", - "line": 3067 + "line": 2320 }, "name": "selector", "type": { @@ -115525,14 +137441,14 @@ "location": { "column": 6, "file": "", - "line": 3068 + "line": 2321 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 3068 + "line": 2321 }, "name": "obj", "type": { @@ -115552,7 +137468,7 @@ "location": { "column": 60, "file": "", - "line": 3068 + "line": 2321 }, "name": "value", "type": { @@ -115569,7 +137485,7 @@ "location": { "column": 87, "file": "", - "line": 3068 + "line": 2321 }, "name": "selector", "type": { @@ -115611,14 +137527,14 @@ "location": { "column": 6, "file": "", - "line": 3076 + "line": 2329 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 3076 + "line": 2329 }, "name": "obj", "type": { @@ -115638,7 +137554,7 @@ "location": { "column": 67, "file": "", - "line": 3076 + "line": 2329 }, "name": "value", "type": { @@ -115655,7 +137571,7 @@ "location": { "column": 94, "file": "", - "line": 3076 + "line": 2329 }, "name": "selector", "type": { @@ -115697,14 +137613,14 @@ "location": { "column": 6, "file": "", - "line": 3024 + "line": 2276 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3024 + "line": 2276 }, "name": "obj", "type": { @@ -115724,7 +137640,7 @@ "location": { "column": 63, "file": "", - "line": 3024 + "line": 2276 }, "name": "value", "type": { @@ -115741,7 +137657,7 @@ "location": { "column": 90, "file": "", - "line": 3024 + "line": 2276 }, "name": "selector", "type": { @@ -115783,14 +137699,14 @@ "location": { "column": 6, "file": "", - "line": 3021 + "line": 2273 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3021 + "line": 2273 }, "name": "obj", "type": { @@ -115810,7 +137726,7 @@ "location": { "column": 63, "file": "", - "line": 3021 + "line": 2273 }, "name": "value", "type": { @@ -115827,7 +137743,7 @@ "location": { "column": 90, "file": "", - "line": 3021 + "line": 2273 }, "name": "selector", "type": { @@ -115869,14 +137785,14 @@ "location": { "column": 6, "file": "", - "line": 3022 + "line": 2274 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3022 + "line": 2274 }, "name": "obj", "type": { @@ -115896,7 +137812,7 @@ "location": { "column": 63, "file": "", - "line": 3022 + "line": 2274 }, "name": "value", "type": { @@ -115913,7 +137829,7 @@ "location": { "column": 90, "file": "", - "line": 3022 + "line": 2274 }, "name": "selector", "type": { @@ -115955,14 +137871,14 @@ "location": { "column": 6, "file": "", - "line": 3025 + "line": 2277 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3025 + "line": 2277 }, "name": "obj", "type": { @@ -115982,7 +137898,7 @@ "location": { "column": 59, "file": "", - "line": 3025 + "line": 2277 }, "name": "value", "type": { @@ -115999,7 +137915,7 @@ "location": { "column": 86, "file": "", - "line": 3025 + "line": 2277 }, "name": "selector", "type": { @@ -116041,14 +137957,14 @@ "location": { "column": 6, "file": "", - "line": 3023 + "line": 2275 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3023 + "line": 2275 }, "name": "obj", "type": { @@ -116068,7 +137984,7 @@ "location": { "column": 61, "file": "", - "line": 3023 + "line": 2275 }, "name": "value", "type": { @@ -116085,7 +138001,7 @@ "location": { "column": 88, "file": "", - "line": 3023 + "line": 2275 }, "name": "selector", "type": { @@ -116127,14 +138043,14 @@ "location": { "column": 6, "file": "", - "line": 3020 + "line": 2272 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3020 + "line": 2272 }, "name": "obj", "type": { @@ -116154,7 +138070,7 @@ "location": { "column": 60, "file": "", - "line": 3020 + "line": 2272 }, "name": "value", "type": { @@ -116171,7 +138087,7 @@ "location": { "column": 87, "file": "", - "line": 3020 + "line": 2272 }, "name": "selector", "type": { @@ -116209,20 +138125,18 @@ "cpython" ], "c_name": "lv_obj_set_style_size", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3131 + "line": 2352 }, "parameters": [ { "location": { - "column": 51, + "column": 37, "file": "", - "line": 3131 + "line": 2352 }, "name": "obj", "type": { @@ -116240,9 +138154,9 @@ }, { "location": { - "column": 66, + "column": 52, "file": "", - "line": 3131 + "line": 2352 }, "name": "width", "type": { @@ -116257,9 +138171,9 @@ }, { "location": { - "column": 81, + "column": 67, "file": "", - "line": 3131 + "line": 2352 }, "name": "height", "type": { @@ -116274,9 +138188,9 @@ }, { "location": { - "column": 62, + "column": 95, "file": "", - "line": 3132 + "line": 2352 }, "name": "selector", "type": { @@ -116303,9 +138217,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -116320,14 +138232,14 @@ "location": { "column": 6, "file": "", - "line": 3047 + "line": 2299 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3047 + "line": 2299 }, "name": "obj", "type": { @@ -116347,7 +138259,7 @@ "location": { "column": 66, "file": "", - "line": 3047 + "line": 2299 }, "name": "value", "type": { @@ -116364,7 +138276,7 @@ "location": { "column": 93, "file": "", - "line": 3047 + "line": 2299 }, "name": "selector", "type": { @@ -116406,14 +138318,14 @@ "location": { "column": 6, "file": "", - "line": 3041 + "line": 2293 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3041 + "line": 2293 }, "name": "obj", "type": { @@ -116433,7 +138345,7 @@ "location": { "column": 61, "file": "", - "line": 3041 + "line": 2293 }, "name": "value", "type": { @@ -116450,7 +138362,7 @@ "location": { "column": 88, "file": "", - "line": 3041 + "line": 2293 }, "name": "selector", "type": { @@ -116492,14 +138404,14 @@ "location": { "column": 6, "file": "", - "line": 3046 + "line": 2298 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3046 + "line": 2298 }, "name": "obj", "type": { @@ -116519,7 +138431,7 @@ "location": { "column": 66, "file": "", - "line": 3046 + "line": 2298 }, "name": "value", "type": { @@ -116536,7 +138448,7 @@ "location": { "column": 93, "file": "", - "line": 3046 + "line": 2298 }, "name": "selector", "type": { @@ -116578,14 +138490,14 @@ "location": { "column": 6, "file": "", - "line": 3043 + "line": 2295 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3043 + "line": 2295 }, "name": "obj", "type": { @@ -116605,7 +138517,7 @@ "location": { "column": 65, "file": "", - "line": 3043 + "line": 2295 }, "name": "value", "type": { @@ -116628,7 +138540,7 @@ "location": { "column": 94, "file": "", - "line": 3043 + "line": 2295 }, "name": "selector", "type": { @@ -116659,6 +138571,92 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_style_text_leading_trim", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 2303 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 2303 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 2303 + }, + "name": "value", + "type": { + "kind": "identifier", + "name": "lv_text_leading_trim_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" + } + }, + { + "location": { + "column": 107, + "file": "", + "line": 2303 + }, + "name": "selector", + "type": { + "kind": "identifier", + "name": "lv_style_selector_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_style_text_leading_trim", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -116670,14 +138668,14 @@ "location": { "column": 6, "file": "", - "line": 3044 + "line": 2296 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3044 + "line": 2296 }, "name": "obj", "type": { @@ -116697,7 +138695,7 @@ "location": { "column": 65, "file": "", - "line": 3044 + "line": 2296 }, "name": "value", "type": { @@ -116714,7 +138712,7 @@ "location": { "column": 92, "file": "", - "line": 3044 + "line": 2296 }, "name": "selector", "type": { @@ -116756,14 +138754,14 @@ "location": { "column": 6, "file": "", - "line": 3045 + "line": 2297 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 3045 + "line": 2297 }, "name": "obj", "type": { @@ -116783,7 +138781,7 @@ "location": { "column": 63, "file": "", - "line": 3045 + "line": 2297 }, "name": "value", "type": { @@ -116800,7 +138798,7 @@ "location": { "column": 90, "file": "", - "line": 3045 + "line": 2297 }, "name": "selector", "type": { @@ -116842,14 +138840,14 @@ "location": { "column": 6, "file": "", - "line": 3042 + "line": 2294 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3042 + "line": 2294 }, "name": "obj", "type": { @@ -116869,7 +138867,7 @@ "location": { "column": 57, "file": "", - "line": 3042 + "line": 2294 }, "name": "value", "type": { @@ -116886,7 +138884,7 @@ "location": { "column": 84, "file": "", - "line": 3042 + "line": 2294 }, "name": "selector", "type": { @@ -116928,14 +138926,14 @@ "location": { "column": 6, "file": "", - "line": 3048 + "line": 2300 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3048 + "line": 2300 }, "name": "obj", "type": { @@ -116955,7 +138953,7 @@ "location": { "column": 76, "file": "", - "line": 3048 + "line": 2300 }, "name": "value", "type": { @@ -116972,7 +138970,7 @@ "location": { "column": 103, "file": "", - "line": 3048 + "line": 2300 }, "name": "selector", "type": { @@ -117014,14 +139012,14 @@ "location": { "column": 6, "file": "", - "line": 3050 + "line": 2302 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 3050 + "line": 2302 }, "name": "obj", "type": { @@ -117041,7 +139039,7 @@ "location": { "column": 72, "file": "", - "line": 3050 + "line": 2302 }, "name": "value", "type": { @@ -117058,7 +139056,7 @@ "location": { "column": 99, "file": "", - "line": 3050 + "line": 2302 }, "name": "selector", "type": { @@ -117100,14 +139098,14 @@ "location": { "column": 6, "file": "", - "line": 3049 + "line": 2301 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3049 + "line": 2301 }, "name": "obj", "type": { @@ -117127,7 +139125,7 @@ "location": { "column": 73, "file": "", - "line": 3049 + "line": 2301 }, "name": "value", "type": { @@ -117144,7 +139142,7 @@ "location": { "column": 100, "file": "", - "line": 3049 + "line": 2301 }, "name": "selector", "type": { @@ -117186,14 +139184,14 @@ "location": { "column": 6, "file": "", - "line": 2975 + "line": 2227 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 2975 + "line": 2227 }, "name": "obj", "type": { @@ -117213,7 +139211,7 @@ "location": { "column": 64, "file": "", - "line": 2975 + "line": 2227 }, "name": "value", "type": { @@ -117230,7 +139228,7 @@ "location": { "column": 91, "file": "", - "line": 2975 + "line": 2227 }, "name": "selector", "type": { @@ -117272,14 +139270,14 @@ "location": { "column": 6, "file": "", - "line": 2982 + "line": 2234 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2982 + "line": 2234 }, "name": "obj", "type": { @@ -117299,7 +139297,7 @@ "location": { "column": 65, "file": "", - "line": 2982 + "line": 2234 }, "name": "value", "type": { @@ -117316,7 +139314,7 @@ "location": { "column": 92, "file": "", - "line": 2982 + "line": 2234 }, "name": "selector", "type": { @@ -117358,14 +139356,14 @@ "location": { "column": 6, "file": "", - "line": 2983 + "line": 2235 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2983 + "line": 2235 }, "name": "obj", "type": { @@ -117385,7 +139383,7 @@ "location": { "column": 65, "file": "", - "line": 2983 + "line": 2235 }, "name": "value", "type": { @@ -117402,7 +139400,7 @@ "location": { "column": 92, "file": "", - "line": 2983 + "line": 2235 }, "name": "selector", "type": { @@ -117444,14 +139442,14 @@ "location": { "column": 6, "file": "", - "line": 2981 + "line": 2233 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 2981 + "line": 2233 }, "name": "obj", "type": { @@ -117471,7 +139469,7 @@ "location": { "column": 66, "file": "", - "line": 2981 + "line": 2233 }, "name": "value", "type": { @@ -117488,7 +139486,7 @@ "location": { "column": 93, "file": "", - "line": 2981 + "line": 2233 }, "name": "selector", "type": { @@ -117526,20 +139524,18 @@ "cpython" ], "c_name": "lv_obj_set_style_transform_scale", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 3137 + "line": 2353 }, "parameters": [ { "location": { - "column": 62, + "column": 48, "file": "", - "line": 3137 + "line": 2353 }, "name": "obj", "type": { @@ -117557,9 +139553,9 @@ }, { "location": { - "column": 77, + "column": 63, "file": "", - "line": 3137 + "line": 2353 }, "name": "value", "type": { @@ -117574,9 +139570,9 @@ }, { "location": { - "column": 73, + "column": 90, "file": "", - "line": 3138 + "line": 2353 }, "name": "selector", "type": { @@ -117603,9 +139599,7 @@ }, "role": "object_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -117620,14 +139614,14 @@ "location": { "column": 6, "file": "", - "line": 2979 + "line": 2231 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2979 + "line": 2231 }, "name": "obj", "type": { @@ -117647,7 +139641,7 @@ "location": { "column": 65, "file": "", - "line": 2979 + "line": 2231 }, "name": "value", "type": { @@ -117664,7 +139658,7 @@ "location": { "column": 92, "file": "", - "line": 2979 + "line": 2231 }, "name": "selector", "type": { @@ -117706,14 +139700,14 @@ "location": { "column": 6, "file": "", - "line": 2980 + "line": 2232 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2980 + "line": 2232 }, "name": "obj", "type": { @@ -117733,7 +139727,7 @@ "location": { "column": 65, "file": "", - "line": 2980 + "line": 2232 }, "name": "value", "type": { @@ -117750,7 +139744,7 @@ "location": { "column": 92, "file": "", - "line": 2980 + "line": 2232 }, "name": "selector", "type": { @@ -117792,14 +139786,14 @@ "location": { "column": 6, "file": "", - "line": 2984 + "line": 2236 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 2984 + "line": 2236 }, "name": "obj", "type": { @@ -117819,7 +139813,7 @@ "location": { "column": 64, "file": "", - "line": 2984 + "line": 2236 }, "name": "value", "type": { @@ -117836,7 +139830,7 @@ "location": { "column": 91, "file": "", - "line": 2984 + "line": 2236 }, "name": "selector", "type": { @@ -117878,14 +139872,14 @@ "location": { "column": 6, "file": "", - "line": 2985 + "line": 2237 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 2985 + "line": 2237 }, "name": "obj", "type": { @@ -117905,7 +139899,7 @@ "location": { "column": 64, "file": "", - "line": 2985 + "line": 2237 }, "name": "value", "type": { @@ -117922,7 +139916,7 @@ "location": { "column": 91, "file": "", - "line": 2985 + "line": 2237 }, "name": "selector", "type": { @@ -117964,14 +139958,14 @@ "location": { "column": 6, "file": "", - "line": 2974 + "line": 2226 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 2974 + "line": 2226 }, "name": "obj", "type": { @@ -117991,7 +139985,7 @@ "location": { "column": 63, "file": "", - "line": 2974 + "line": 2226 }, "name": "value", "type": { @@ -118008,7 +140002,7 @@ "location": { "column": 90, "file": "", - "line": 2974 + "line": 2226 }, "name": "selector", "type": { @@ -118050,14 +140044,14 @@ "location": { "column": 6, "file": "", - "line": 3071 + "line": 2324 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3071 + "line": 2324 }, "name": "obj", "type": { @@ -118077,7 +140071,7 @@ "location": { "column": 82, "file": "", - "line": 3071 + "line": 2324 }, "name": "value", "type": { @@ -118100,7 +140094,7 @@ "location": { "column": 111, "file": "", - "line": 3071 + "line": 2324 }, "name": "selector", "type": { @@ -118142,14 +140136,14 @@ "location": { "column": 6, "file": "", - "line": 2978 + "line": 2230 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 2978 + "line": 2230 }, "name": "obj", "type": { @@ -118169,7 +140163,7 @@ "location": { "column": 64, "file": "", - "line": 2978 + "line": 2230 }, "name": "value", "type": { @@ -118186,7 +140180,7 @@ "location": { "column": 91, "file": "", - "line": 2978 + "line": 2230 }, "name": "selector", "type": { @@ -118228,14 +140222,14 @@ "location": { "column": 6, "file": "", - "line": 2976 + "line": 2228 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 2976 + "line": 2228 }, "name": "obj", "type": { @@ -118255,7 +140249,7 @@ "location": { "column": 59, "file": "", - "line": 2976 + "line": 2228 }, "name": "value", "type": { @@ -118272,7 +140266,7 @@ "location": { "column": 86, "file": "", - "line": 2976 + "line": 2228 }, "name": "selector", "type": { @@ -118314,14 +140308,14 @@ "location": { "column": 6, "file": "", - "line": 2977 + "line": 2229 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 2977 + "line": 2229 }, "name": "obj", "type": { @@ -118341,7 +140335,7 @@ "location": { "column": 59, "file": "", - "line": 2977 + "line": 2229 }, "name": "value", "type": { @@ -118358,7 +140352,7 @@ "location": { "column": 86, "file": "", - "line": 2977 + "line": 2229 }, "name": "selector", "type": { @@ -118400,14 +140394,14 @@ "location": { "column": 6, "file": "", - "line": 2964 + "line": 2216 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 2964 + "line": 2216 }, "name": "obj", "type": { @@ -118427,7 +140421,7 @@ "location": { "column": 53, "file": "", - "line": 2964 + "line": 2216 }, "name": "value", "type": { @@ -118444,7 +140438,7 @@ "location": { "column": 80, "file": "", - "line": 2964 + "line": 2216 }, "name": "selector", "type": { @@ -118486,14 +140480,14 @@ "location": { "column": 6, "file": "", - "line": 2971 + "line": 2223 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 2971 + "line": 2223 }, "name": "obj", "type": { @@ -118513,7 +140507,7 @@ "location": { "column": 49, "file": "", - "line": 2971 + "line": 2223 }, "name": "value", "type": { @@ -118530,7 +140524,7 @@ "location": { "column": 76, "file": "", - "line": 2971 + "line": 2223 }, "name": "selector", "type": { @@ -118572,14 +140566,14 @@ "location": { "column": 6, "file": "", - "line": 2972 + "line": 2224 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 2972 + "line": 2224 }, "name": "obj", "type": { @@ -118599,7 +140593,7 @@ "location": { "column": 49, "file": "", - "line": 2972 + "line": 2224 }, "name": "value", "type": { @@ -118616,7 +140610,7 @@ "location": { "column": 76, "file": "", - "line": 2972 + "line": 2224 }, "name": "selector", "type": { @@ -118658,14 +140652,14 @@ "location": { "column": 6, "file": "", - "line": 3937 + "line": 3197 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 3937 + "line": 3197 }, "name": "obj", "type": { @@ -118685,7 +140679,7 @@ "location": { "column": 94, "file": "", - "line": 3937 + "line": 3197 }, "name": "dsc", "type": { @@ -118705,7 +140699,7 @@ "location": { "column": 109, "file": "", - "line": 3937 + "line": 3197 }, "name": "max_value", "type": { @@ -118747,14 +140741,14 @@ "location": { "column": 6, "file": "", - "line": 3936 + "line": 3196 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 3936 + "line": 3196 }, "name": "obj", "type": { @@ -118774,7 +140768,7 @@ "location": { "column": 94, "file": "", - "line": 3936 + "line": 3196 }, "name": "dsc", "type": { @@ -118794,7 +140788,7 @@ "location": { "column": 109, "file": "", - "line": 3936 + "line": 3196 }, "name": "min_value", "type": { @@ -118836,14 +140830,14 @@ "location": { "column": 6, "file": "", - "line": 3938 + "line": 3198 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 3938 + "line": 3198 }, "name": "obj", "type": { @@ -118863,7 +140857,7 @@ "location": { "column": 93, "file": "", - "line": 3938 + "line": 3198 }, "name": "dsc", "type": { @@ -118883,7 +140877,7 @@ "location": { "column": 105, "file": "", - "line": 3938 + "line": 3198 }, "name": "rollover", "type": { @@ -118925,14 +140919,14 @@ "location": { "column": 6, "file": "", - "line": 2118 + "line": 1923 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 2118 + "line": 1923 }, "name": "obj", "type": { @@ -118952,7 +140946,7 @@ "location": { "column": 61, "file": "", - "line": 2118 + "line": 1923 }, "name": "matrix", "type": { @@ -119000,14 +140994,14 @@ "location": { "column": 6, "file": "", - "line": 3843 + "line": 3026 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 3843 + "line": 3026 }, "name": "obj", "type": { @@ -119027,7 +141021,7 @@ "location": { "column": 48, "file": "", - "line": 3843 + "line": 3026 }, "name": "user_data", "type": { @@ -119061,6 +141055,92 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_user_flag", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3027 + }, + "parameters": [ + { + "location": { + "column": 36, + "file": "", + "line": 3027 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 52, + "file": "", + "line": 3027 + }, + "name": "bit", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 62, + "file": "", + "line": 3027 + }, + "name": "v", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_user_flag", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -119072,14 +141152,14 @@ "location": { "column": 6, "file": "", - "line": 2105 + "line": 1910 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 2105 + "line": 1910 }, "name": "obj", "type": { @@ -119099,7 +141179,7 @@ "location": { "column": 47, "file": "", - "line": 2105 + "line": 1910 }, "name": "w", "type": { @@ -119141,14 +141221,14 @@ "location": { "column": 6, "file": "", - "line": 2101 + "line": 1906 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 2101 + "line": 1906 }, "name": "obj", "type": { @@ -119168,7 +141248,7 @@ "location": { "column": 43, "file": "", - "line": 2101 + "line": 1906 }, "name": "x", "type": { @@ -119210,14 +141290,14 @@ "location": { "column": 6, "file": "", - "line": 2102 + "line": 1907 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 2102 + "line": 1907 }, "name": "obj", "type": { @@ -119237,7 +141317,7 @@ "location": { "column": 43, "file": "", - "line": 2102 + "line": 1907 }, "name": "y", "type": { @@ -119279,14 +141359,14 @@ "location": { "column": 6, "file": "", - "line": 2195 + "line": 2002 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 2195 + "line": 2002 }, "name": "obj", "type": { @@ -119334,14 +141414,14 @@ "location": { "column": 18, "file": "", - "line": 2253 + "line": 2064 }, "parameters": [ { "location": { "column": 65, "file": "", - "line": 2253 + "line": 2064 }, "name": "obj", "type": { @@ -119364,7 +141444,7 @@ "location": { "column": 82, "file": "", - "line": 2253 + "line": 2064 }, "name": "part", "type": { @@ -119381,7 +141461,7 @@ "location": { "column": 105, "file": "", - "line": 2253 + "line": 2064 }, "name": "v", "type": { @@ -119412,6 +141492,95 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_style_apply_color_filter_internal", + "function_specifiers": [], + "location": { + "column": 18, + "file": "", + "line": 5111 + }, + "parameters": [ + { + "location": { + "column": 74, + "file": "", + "line": 5111 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 91, + "file": "", + "line": 5111 + }, + "name": "part", + "type": { + "kind": "identifier", + "name": "lv_part_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PART | int" + } + }, + { + "location": { + "column": 114, + "file": "", + "line": 5111 + }, + "name": "v", + "type": { + "kind": "identifier", + "name": "lv_style_value_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "style_value_t" + } + } + ], + "python_name": "style_apply_color_filter_internal", + "receiver": "obj", + "return_type": { + "kind": "identifier", + "name": "lv_style_value_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "style_value_t" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -119423,14 +141592,14 @@ "location": { "column": 14, "file": "", - "line": 3183 + "line": 2362 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 3183 + "line": 2362 }, "name": "obj", "type": { @@ -119453,7 +141622,7 @@ "location": { "column": 73, "file": "", - "line": 3183 + "line": 2362 }, "name": "part", "type": { @@ -119470,7 +141639,7 @@ "location": { "column": 92, "file": "", - "line": 3183 + "line": 2362 }, "name": "color", "type": { @@ -119512,14 +141681,14 @@ "location": { "column": 6, "file": "", - "line": 5976 + "line": 5105 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 5976 + "line": 5105 }, "name": "obj", "type": { @@ -119539,7 +141708,7 @@ "location": { "column": 63, "file": "", - "line": 5976 + "line": 5105 }, "name": "part", "type": { @@ -119556,7 +141725,7 @@ "location": { "column": 80, "file": "", - "line": 5976 + "line": 5105 }, "name": "prev_state", "type": { @@ -119573,7 +141742,7 @@ "location": { "column": 48, "file": "", - "line": 5977 + "line": 5106 }, "name": "new_state", "type": { @@ -119590,9 +141759,9 @@ "location": { "column": 95, "file": "", - "line": 5977 + "line": 5106 }, - "name": "tr", + "name": "tr_dsc", "type": { "kind": "pointer", "target": { @@ -119638,7 +141807,7 @@ "location": { "column": 6, "file": "", - "line": 5975 + "line": 5104 }, "parameters": [], "python_name": "style_deinit", @@ -119669,14 +141838,14 @@ "location": { "column": 6, "file": "", - "line": 2244 + "line": 2055 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 2244 + "line": 2055 }, "name": "obj", "type": { @@ -119696,7 +141865,7 @@ "location": { "column": 65, "file": "", - "line": 2244 + "line": 2055 }, "name": "style", "type": { @@ -119719,7 +141888,7 @@ "location": { "column": 94, "file": "", - "line": 2244 + "line": 2055 }, "name": "selector", "type": { @@ -119763,14 +141932,14 @@ "location": { "column": 25, "file": "", - "line": 2260 + "line": 2071 }, "parameters": [ { "location": { "column": 76, "file": "", - "line": 2260 + "line": 2071 }, "name": "selector", "type": { @@ -119816,14 +141985,14 @@ "location": { "column": 26, "file": "", - "line": 2256 + "line": 2067 }, "parameters": [ { "location": { "column": 78, "file": "", - "line": 2256 + "line": 2067 }, "name": "selector", "type": { @@ -119867,7 +142036,7 @@ "location": { "column": 6, "file": "", - "line": 5974 + "line": 5103 }, "parameters": [], "python_name": "style_init", @@ -119898,14 +142067,14 @@ "location": { "column": 6, "file": "", - "line": 2243 + "line": 2053 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 2243 + "line": 2053 }, "name": "obj", "type": { @@ -119925,7 +142094,7 @@ "location": { "column": 65, "file": "", - "line": 2243 + "line": 2053 }, "name": "style", "type": { @@ -119948,7 +142117,7 @@ "location": { "column": 94, "file": "", - "line": 2243 + "line": 2053 }, "name": "selector", "type": { @@ -119965,7 +142134,7 @@ "location": { "column": 109, "file": "", - "line": 2243 + "line": 2053 }, "name": "dis", "type": { @@ -120007,14 +142176,14 @@ "location": { "column": 22, "file": "", - "line": 5978 + "line": 5107 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 5978 + "line": 5107 }, "name": "obj", "type": { @@ -120034,7 +142203,7 @@ "location": { "column": 76, "file": "", - "line": 5978 + "line": 5107 }, "name": "state1", "type": { @@ -120051,7 +142220,7 @@ "location": { "column": 95, "file": "", - "line": 5978 + "line": 5107 }, "name": "state2", "type": { @@ -120063,6 +142232,26 @@ "conversion": "enum_int", "python_type": "STATE | int" } + }, + { + "location": { + "column": 59, + "file": "", + "line": 5108 + }, + "name": "changed_part", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_part_t" + } + }, + "view": { + "category": "enum_pointer", + "conversion": "enum_pointer", + "python_type": "PART | int" + } } ], "python_name": "style_state_compare", @@ -120093,14 +142282,14 @@ "location": { "column": 6, "file": "", - "line": 2077 + "line": 1882 }, "parameters": [ { "location": { "column": 27, "file": "", - "line": 2077 + "line": 1882 }, "name": "obj1", "type": { @@ -120120,7 +142309,7 @@ "location": { "column": 44, "file": "", - "line": 2077 + "line": 1882 }, "name": "obj2", "type": { @@ -120165,14 +142354,14 @@ "location": { "column": 6, "file": "", - "line": 2145 + "line": 1952 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 2145 + "line": 1952 }, "name": "obj", "type": { @@ -120195,7 +142384,7 @@ "location": { "column": 62, "file": "", - "line": 2145 + "line": 1952 }, "name": "p", "type": { @@ -120215,7 +142404,7 @@ "location": { "column": 97, "file": "", - "line": 2145 + "line": 1952 }, "name": "flags", "type": { @@ -120257,14 +142446,14 @@ "location": { "column": 6, "file": "", - "line": 2146 + "line": 1953 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 2146 + "line": 1953 }, "name": "obj", "type": { @@ -120287,7 +142476,7 @@ "location": { "column": 68, "file": "", - "line": 2146 + "line": 1953 }, "name": "points", "type": { @@ -120310,7 +142499,7 @@ "location": { "column": 85, "file": "", - "line": 2146 + "line": 1953 }, "name": "count", "type": { @@ -120327,7 +142516,7 @@ "location": { "column": 65, "file": "", - "line": 2147 + "line": 1954 }, "name": "flags", "type": { @@ -120369,14 +142558,14 @@ "location": { "column": 6, "file": "", - "line": 2092 + "line": 1897 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 2092 + "line": 1897 }, "name": "start_obj", "type": { @@ -120396,7 +142585,7 @@ "location": { "column": 67, "file": "", - "line": 2092 + "line": 1897 }, "name": "cb", "type": { @@ -120413,7 +142602,7 @@ "location": { "column": 76, "file": "", - "line": 2092 + "line": 1897 }, "name": "user_data", "type": { @@ -120447,6 +142636,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_update_blur_status", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 5112 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 5112 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "update_blur_status", + "receiver": "obj", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -120458,14 +142699,14 @@ "location": { "column": 6, "file": "", - "line": 5979 + "line": 5109 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 5979 + "line": 5109 }, "name": "obj", "type": { @@ -120510,14 +142751,14 @@ "location": { "column": 6, "file": "", - "line": 2112 + "line": 1917 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 2112 + "line": 1917 }, "name": "obj", "type": { @@ -120565,14 +142806,14 @@ "location": { "column": 6, "file": "", - "line": 2196 + "line": 2003 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 2196 + "line": 2003 }, "name": "obj", "type": { @@ -120592,7 +142833,7 @@ "location": { "column": 58, "file": "", - "line": 2196 + "line": 2003 }, "name": "anim_en", "type": { @@ -120623,6 +142864,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_observer_delete", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3187 + }, + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 3187 + }, + "name": "observer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" + } + } + ], + "python_name": "delete", + "receiver": "observer_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -120634,14 +142927,14 @@ "location": { "column": 8, "file": "", - "line": 3930 + "line": 3189 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 3930 + "line": 3189 }, "name": "observer", "type": { @@ -120689,14 +142982,14 @@ "location": { "column": 12, "file": "", - "line": 3931 + "line": 3190 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 3931 + "line": 3190 }, "name": "observer", "type": { @@ -120744,14 +143037,14 @@ "location": { "column": 8, "file": "", - "line": 3932 + "line": 3191 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3932 + "line": 3191 }, "name": "observer", "type": { @@ -120797,19 +143090,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_observer_remove", + "c_name": "lv_observer_set_user_data", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3928 + "line": 3192 }, "parameters": [ { "location": { - "column": 39, + "column": 46, "file": "", - "line": 3928 + "line": 3192 }, "name": "observer", "type": { @@ -120824,9 +143117,29 @@ "conversion": "struct_pointer", "python_type": "observer_t" } + }, + { + "location": { + "column": 63, + "file": "", + "line": 3192 + }, + "name": "user_data", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } } ], - "python_name": "remove", + "python_name": "set_user_data", "receiver": "observer_t", "return_type": { "kind": "primitive", @@ -120849,120 +143162,590 @@ "circuitpython", "cpython" ], - "c_name": "lv_os_get_idle_percent", - "function_specifiers": [], - "location": { - "column": 10, - "file": "", - "line": 5117 - }, - "parameters": [], - "python_name": "os_get_idle_percent", - "return_type": { - "kind": "identifier", - "name": "uint32_t" - }, - "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_os_init", + "c_name": "lv_os_get_idle_percent", + "function_specifiers": [], + "location": { + "column": 10, + "file": "", + "line": 4434 + }, + "parameters": [], + "python_name": "os_get_idle_percent", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_os_init", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4433 + }, + "parameters": [], + "python_name": "os_init", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_palette_darken", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 981 + }, + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 981 + }, + "name": "p", + "type": { + "kind": "identifier", + "name": "lv_palette_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PALETTE | int" + } + }, + { + "location": { + "column": 54, + "file": "", + "line": 981 + }, + "name": "lvl", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "palette_darken", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_palette_lighten", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 980 + }, + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 980 + }, + "name": "p", + "type": { + "kind": "identifier", + "name": "lv_palette_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PALETTE | int" + } + }, + { + "location": { + "column": 55, + "file": "", + "line": 980 + }, + "name": "lvl", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "palette_lighten", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_palette_main", + "function_specifiers": [], + "location": { + "column": 12, + "file": "", + "line": 979 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 979 + }, + "name": "p", + "type": { + "kind": "identifier", + "name": "lv_palette_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "PALETTE | int" + } + } + ], + "python_name": "palette_main", + "return_type": { + "kind": "identifier", + "name": "lv_color_t" + }, + "return_view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color_t" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pct", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 566 + }, + "parameters": [ + { + "location": { + "column": 24, + "file": "", + "line": 566 + }, + "name": "x", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "pct", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pct_to_px", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 567 + }, + "parameters": [ + { + "location": { + "column": 30, + "file": "", + "line": 567 + }, + "name": "v", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 41, + "file": "", + "line": 567 + }, + "name": "base", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "pct_to_px", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pending_add", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6599 + }, + "parameters": [ + { + "location": { + "column": 34, + "file": "", + "line": 6599 + }, + "name": "pending", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_pending_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "pending_t" + } + }, + { + "location": { + "column": 50, + "file": "", + "line": 6599 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + } + ], + "python_name": "add", + "receiver": "pending_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pending_create", + "function_specifiers": [], + "location": { + "column": 16, + "file": "", + "line": 6595 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 6595 + }, + "name": "obj_size", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 6595 + }, + "name": "capacity_default", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "pending_create", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_pending_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "pending_t" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pending_destroy", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6596 + }, + "parameters": [ + { + "location": { + "column": 38, + "file": "", + "line": 6596 + }, + "name": "pending", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_pending_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "pending_t" + } + } + ], + "python_name": "destroy", + "receiver": "pending_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pending_remove_all", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 5116 - }, - "parameters": [], - "python_name": "os_init", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_palette_darken", - "function_specifiers": [], - "location": { - "column": 12, - "file": "", - "line": 923 + "line": 6600 }, "parameters": [ { "location": { - "column": 43, - "file": "", - "line": 923 - }, - "name": "p", - "type": { - "kind": "identifier", - "name": "lv_palette_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PALETTE | int" - } - }, - { - "location": { - "column": 54, + "column": 41, "file": "", - "line": 923 + "line": 6600 }, - "name": "lvl", + "name": "pending", "type": { - "kind": "identifier", - "name": "uint8_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_pending_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "pending_t" } } ], - "python_name": "palette_darken", + "python_name": "remove_all", + "receiver": "pending_t", "return_type": { - "kind": "identifier", - "name": "lv_color_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" + "category": "void", + "conversion": "none", + "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -120974,156 +143757,84 @@ "circuitpython", "cpython" ], - "c_name": "lv_palette_lighten", + "c_name": "lv_pending_set_free_cb", "function_specifiers": [], "location": { - "column": 12, + "column": 6, "file": "", - "line": 922 + "line": 6597 }, "parameters": [ { "location": { - "column": 44, + "column": 42, "file": "", - "line": 922 + "line": 6597 }, - "name": "p", + "name": "pending", "type": { - "kind": "identifier", - "name": "lv_palette_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_pending_t" + } }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PALETTE | int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "pending_t" } }, { "location": { - "column": 55, - "file": "", - "line": 922 - }, - "name": "lvl", - "type": { - "kind": "identifier", - "name": "uint8_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - } - ], - "python_name": "palette_lighten", - "return_type": { - "kind": "identifier", - "name": "lv_color_t" - }, - "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_palette_main", - "function_specifiers": [], - "location": { - "column": 12, - "file": "", - "line": 921 - }, - "parameters": [ - { - "location": { - "column": 41, + "column": 74, "file": "", - "line": 921 + "line": 6597 }, - "name": "p", + "name": "free_cb", "type": { "kind": "identifier", - "name": "lv_palette_t" + "name": "lv_pending_free_cb_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "PALETTE | int" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any, Any], None]" } - } - ], - "python_name": "palette_main", - "return_type": { - "kind": "identifier", - "name": "lv_color_t" - }, - "return_view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "color_t" - }, - "role": "module", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_pct", - "function_specifiers": [], - "location": { - "column": 9, - "file": "", - "line": 764 - }, - "parameters": [ + }, { "location": { - "column": 24, + "column": 34, "file": "", - "line": 764 + "line": 6598 }, - "name": "x", + "name": "user_data", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } } ], - "python_name": "pct", + "python_name": "set_free_cb", + "receiver": "pending_t", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -121135,60 +143846,47 @@ "circuitpython", "cpython" ], - "c_name": "lv_pct_to_px", + "c_name": "lv_pending_swap", "function_specifiers": [], "location": { - "column": 9, + "column": 6, "file": "", - "line": 765 + "line": 6601 }, "parameters": [ { "location": { - "column": 30, - "file": "", - "line": 765 - }, - "name": "v", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "location": { - "column": 41, + "column": 35, "file": "", - "line": 765 + "line": 6601 }, - "name": "base", + "name": "pending", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_pending_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "pending_t" } } ], - "python_name": "pct_to_px", + "python_name": "swap", + "receiver": "pending_t", "return_type": { - "kind": "identifier", - "name": "int32_t" + "kind": "primitive", + "name": "void" }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "void", + "conversion": "none", + "python_type": "None" }, - "role": "module", + "role": "struct_method", "static": false, "storage": [], "variadic": false, @@ -121205,14 +143903,14 @@ "location": { "column": 6, "file": "", - "line": 752 + "line": 554 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 752 + "line": 554 }, "name": "points", "type": { @@ -121232,7 +143930,7 @@ "location": { "column": 59, "file": "", - "line": 752 + "line": 554 }, "name": "count", "type": { @@ -121249,7 +143947,7 @@ "location": { "column": 74, "file": "", - "line": 752 + "line": 554 }, "name": "angle", "type": { @@ -121266,7 +143964,7 @@ "location": { "column": 89, "file": "", - "line": 752 + "line": 554 }, "name": "scale_x", "type": { @@ -121283,7 +143981,7 @@ "location": { "column": 106, "file": "", - "line": 752 + "line": 554 }, "name": "scale_y", "type": { @@ -121300,7 +143998,7 @@ "location": { "column": 48, "file": "", - "line": 753 + "line": 555 }, "name": "pivot", "type": { @@ -121323,7 +144021,7 @@ "location": { "column": 36, "file": "", - "line": 754 + "line": 556 }, "name": "zoom_first", "type": { @@ -121365,14 +144063,14 @@ "location": { "column": 12, "file": "", - "line": 755 + "line": 557 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 755 + "line": 557 }, "name": "p", "type": { @@ -121420,14 +144118,14 @@ "location": { "column": 6, "file": "", - "line": 758 + "line": 560 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 758 + "line": 560 }, "name": "p", "type": { @@ -121447,7 +144145,7 @@ "location": { "column": 70, "file": "", - "line": 758 + "line": 560 }, "name": "x", "type": { @@ -121464,7 +144162,7 @@ "location": { "column": 92, "file": "", - "line": 758 + "line": 560 }, "name": "y", "type": { @@ -121506,14 +144204,14 @@ "location": { "column": 6, "file": "", - "line": 760 + "line": 562 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 760 + "line": 562 }, "name": "p1", "type": { @@ -121533,7 +144231,7 @@ "location": { "column": 72, "file": "", - "line": 760 + "line": 562 }, "name": "p2", "type": { @@ -121578,14 +144276,14 @@ "location": { "column": 6, "file": "", - "line": 757 + "line": 559 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 757 + "line": 559 }, "name": "p", "type": { @@ -121605,7 +144303,7 @@ "location": { "column": 43, "file": "", - "line": 757 + "line": 559 }, "name": "x", "type": { @@ -121622,7 +144320,7 @@ "location": { "column": 54, "file": "", - "line": 757 + "line": 559 }, "name": "y", "type": { @@ -121664,14 +144362,14 @@ "location": { "column": 6, "file": "", - "line": 759 + "line": 561 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 759 + "line": 561 }, "name": "p1", "type": { @@ -121691,7 +144389,7 @@ "location": { "column": 48, "file": "", - "line": 759 + "line": 561 }, "name": "p2", "type": { @@ -121736,14 +144434,14 @@ "location": { "column": 20, "file": "", - "line": 756 + "line": 558 }, "parameters": [ { "location": { "column": 57, "file": "", - "line": 756 + "line": 558 }, "name": "p", "type": { @@ -121791,14 +144489,14 @@ "location": { "column": 6, "file": "", - "line": 750 + "line": 552 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 750 + "line": 552 }, "name": "point", "type": { @@ -121818,7 +144516,7 @@ "location": { "column": 53, "file": "", - "line": 750 + "line": 552 }, "name": "angle", "type": { @@ -121835,7 +144533,7 @@ "location": { "column": 68, "file": "", - "line": 750 + "line": 552 }, "name": "scale_x", "type": { @@ -121852,7 +144550,7 @@ "location": { "column": 85, "file": "", - "line": 750 + "line": 552 }, "name": "scale_y", "type": { @@ -121869,7 +144567,7 @@ "location": { "column": 111, "file": "", - "line": 750 + "line": 552 }, "name": "pivot", "type": { @@ -121892,7 +144590,7 @@ "location": { "column": 30, "file": "", - "line": 751 + "line": 553 }, "name": "zoom_first", "type": { @@ -121934,14 +144632,14 @@ "location": { "column": 9, "file": "", - "line": 491 + "line": 367 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 491 + "line": 367 }, "name": "base", "type": { @@ -121958,7 +144656,7 @@ "location": { "column": 37, "file": "", - "line": 491 + "line": 367 }, "name": "exp", "type": { @@ -121999,14 +144697,14 @@ "location": { "column": 12, "file": "", - "line": 4951 + "line": 4067 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4951 + "line": 4067 }, "name": "parent", "type": { @@ -122043,6 +144741,162 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_qrcode_get_update_mode", + "function_specifiers": [], + "location": { + "column": 25, + "file": "", + "line": 4076 + }, + "parameters": [ + { + "location": { + "column": 60, + "file": "", + "line": 4076 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "get_update_mode", + "receiver": "qrcode", + "return_type": { + "kind": "identifier", + "name": "lv_qrcode_update_mode_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "qrcode.UPDATE_MODE | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_qrcode_is_render_valid", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4077 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 4077 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "is_render_valid", + "receiver": "qrcode", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_qrcode_render", + "function_specifiers": [], + "location": { + "column": 13, + "file": "", + "line": 4073 + }, + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 4073 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + } + ], + "python_name": "render", + "receiver": "qrcode", + "return_type": { + "kind": "identifier", + "name": "lv_result_t" + }, + "return_view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "RESULT | int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -122054,14 +144908,14 @@ "location": { "column": 6, "file": "", - "line": 4953 + "line": 4069 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4953 + "line": 4069 }, "name": "obj", "type": { @@ -122081,7 +144935,7 @@ "location": { "column": 58, "file": "", - "line": 4953 + "line": 4069 }, "name": "color", "type": { @@ -122123,14 +144977,14 @@ "location": { "column": 6, "file": "", - "line": 4956 + "line": 4072 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4956 + "line": 4072 }, "name": "obj", "type": { @@ -122150,7 +145004,7 @@ "location": { "column": 52, "file": "", - "line": 4956 + "line": 4072 }, "name": "data", "type": { @@ -122198,14 +145052,14 @@ "location": { "column": 6, "file": "", - "line": 4954 + "line": 4070 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4954 + "line": 4070 }, "name": "obj", "type": { @@ -122225,7 +145079,7 @@ "location": { "column": 59, "file": "", - "line": 4954 + "line": 4070 }, "name": "color", "type": { @@ -122267,14 +145121,14 @@ "location": { "column": 6, "file": "", - "line": 4957 + "line": 4074 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4957 + "line": 4074 }, "name": "obj", "type": { @@ -122294,7 +145148,7 @@ "location": { "column": 52, "file": "", - "line": 4957 + "line": 4074 }, "name": "enable", "type": { @@ -122336,14 +145190,14 @@ "location": { "column": 6, "file": "", - "line": 4952 + "line": 4068 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4952 + "line": 4068 }, "name": "obj", "type": { @@ -122363,7 +145217,7 @@ "location": { "column": 49, "file": "", - "line": 4952 + "line": 4068 }, "name": "size", "type": { @@ -122394,6 +145248,75 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_qrcode_set_update_mode", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4075 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 4075 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 72, + "file": "", + "line": 4075 + }, + "name": "mode", + "type": { + "kind": "identifier", + "name": "lv_qrcode_update_mode_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "qrcode.UPDATE_MODE | int" + } + } + ], + "python_name": "set_update_mode", + "receiver": "qrcode", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -122405,14 +145328,14 @@ "location": { "column": 13, "file": "", - "line": 4955 + "line": 4071 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4955 + "line": 4071 }, "name": "obj", "type": { @@ -122432,7 +145355,7 @@ "location": { "column": 57, "file": "", - "line": 4955 + "line": 4071 }, "name": "data", "type": { @@ -122455,7 +145378,7 @@ "location": { "column": 74, "file": "", - "line": 4955 + "line": 4071 }, "name": "data_len", "type": { @@ -122497,14 +145420,14 @@ "location": { "column": 10, "file": "", - "line": 494 + "line": 370 }, "parameters": [ { "location": { "column": 27, "file": "", - "line": 494 + "line": 370 }, "name": "min", "type": { @@ -122521,7 +145444,7 @@ "location": { "column": 41, "file": "", - "line": 494 + "line": 370 }, "name": "max", "type": { @@ -122562,14 +145485,14 @@ "location": { "column": 6, "file": "", - "line": 493 + "line": 369 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 493 + "line": 369 }, "name": "seed", "type": { @@ -122610,14 +145533,14 @@ "location": { "column": 6, "file": "", - "line": 685 + "line": 6631 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 685 + "line": 6631 }, "name": "tree", "type": { @@ -122662,14 +145585,14 @@ "location": { "column": 6, "file": "", - "line": 680 + "line": 6626 }, "parameters": [ { "location": { "column": 25, "file": "", - "line": 680 + "line": 6626 }, "name": "tree", "type": { @@ -122689,7 +145612,7 @@ "location": { "column": 44, "file": "", - "line": 680 + "line": 6626 }, "name": "key", "type": { @@ -122737,14 +145660,14 @@ "location": { "column": 6, "file": "", - "line": 679 + "line": 6625 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 679 + "line": 6625 }, "name": "tree", "type": { @@ -122764,7 +145687,7 @@ "location": { "column": 51, "file": "", - "line": 679 + "line": 6625 }, "name": "node", "type": { @@ -122809,14 +145732,14 @@ "location": { "column": 16, "file": "", - "line": 676 + "line": 6622 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 676 + "line": 6622 }, "name": "tree", "type": { @@ -122836,7 +145759,7 @@ "location": { "column": 54, "file": "", - "line": 676 + "line": 6622 }, "name": "key", "type": { @@ -122887,14 +145810,14 @@ "location": { "column": 6, "file": "", - "line": 674 + "line": 6620 }, "parameters": [ { "location": { "column": 25, "file": "", - "line": 674 + "line": 6620 }, "name": "tree", "type": { @@ -122914,7 +145837,7 @@ "location": { "column": 49, "file": "", - "line": 674 + "line": 6620 }, "name": "compare", "type": { @@ -122931,7 +145854,7 @@ "location": { "column": 65, "file": "", - "line": 674 + "line": 6620 }, "name": "node_size", "type": { @@ -122973,14 +145896,14 @@ "location": { "column": 16, "file": "", - "line": 675 + "line": 6621 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 675 + "line": 6621 }, "name": "tree", "type": { @@ -123000,7 +145923,7 @@ "location": { "column": 50, "file": "", - "line": 675 + "line": 6621 }, "name": "key", "type": { @@ -123048,14 +145971,14 @@ "location": { "column": 16, "file": "", - "line": 682 + "line": 6628 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 682 + "line": 6628 }, "name": "node", "type": { @@ -123103,14 +146026,14 @@ "location": { "column": 16, "file": "", - "line": 684 + "line": 6630 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 684 + "line": 6630 }, "name": "node", "type": { @@ -123158,14 +146081,14 @@ "location": { "column": 16, "file": "", - "line": 681 + "line": 6627 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 681 + "line": 6627 }, "name": "node", "type": { @@ -123213,14 +146136,14 @@ "location": { "column": 16, "file": "", - "line": 683 + "line": 6629 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 683 + "line": 6629 }, "name": "node", "type": { @@ -123268,14 +146191,14 @@ "location": { "column": 8, "file": "", - "line": 678 + "line": 6624 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 678 + "line": 6624 }, "name": "tree", "type": { @@ -123295,7 +146218,7 @@ "location": { "column": 48, "file": "", - "line": 678 + "line": 6624 }, "name": "key", "type": { @@ -123346,14 +146269,14 @@ "location": { "column": 8, "file": "", - "line": 677 + "line": 6623 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 677 + "line": 6623 }, "name": "tree", "type": { @@ -123373,7 +146296,7 @@ "location": { "column": 55, "file": "", - "line": 677 + "line": 6623 }, "name": "node", "type": { @@ -123421,14 +146344,14 @@ "location": { "column": 8, "file": "", - "line": 403 + "line": 817 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 403 + "line": 817 }, "name": "data_p", "type": { @@ -123448,7 +146371,7 @@ "location": { "column": 41, "file": "", - "line": 403 + "line": 817 }, "name": "new_size", "type": { @@ -123492,14 +146415,14 @@ "location": { "column": 8, "file": "", - "line": 407 + "line": 821 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 407 + "line": 821 }, "name": "p", "type": { @@ -123519,7 +146442,7 @@ "location": { "column": 41, "file": "", - "line": 407 + "line": 821 }, "name": "new_size", "type": { @@ -123563,14 +146486,14 @@ "location": { "column": 8, "file": "", - "line": 404 + "line": 818 }, "parameters": [ { "location": { "column": 25, "file": "", - "line": 404 + "line": 818 }, "name": "data_p", "type": { @@ -123590,7 +146513,7 @@ "location": { "column": 42, "file": "", - "line": 404 + "line": 818 }, "name": "new_size", "type": { @@ -123634,7 +146557,7 @@ "location": { "column": 6, "file": "", - "line": 5952 + "line": 5133 }, "parameters": [], "python_name": "refr_deinit", @@ -123664,7 +146587,7 @@ "location": { "column": 16, "file": "", - "line": 5954 + "line": 5135 }, "parameters": [], "python_name": "refr_get_disp_refreshing", @@ -123697,14 +146620,14 @@ "location": { "column": 12, "file": "", - "line": 5956 + "line": 5137 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 5956 + "line": 5137 }, "name": "area_p", "type": { @@ -123727,7 +146650,7 @@ "location": { "column": 67, "file": "", - "line": 5956 + "line": 5137 }, "name": "obj", "type": { @@ -123774,7 +146697,7 @@ "location": { "column": 6, "file": "", - "line": 5951 + "line": 5132 }, "parameters": [], "python_name": "refr_init", @@ -123804,14 +146727,14 @@ "location": { "column": 6, "file": "", - "line": 3864 + "line": 3237 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 3864 + "line": 3237 }, "name": "disp", "type": { @@ -123855,14 +146778,14 @@ "location": { "column": 6, "file": "", - "line": 5955 + "line": 5136 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 5955 + "line": 5136 }, "name": "disp", "type": { @@ -123906,14 +146829,14 @@ "location": { "column": 17, "file": "", - "line": 4655 + "line": 4093 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4655 + "line": 4093 }, "name": "obj", "type": { @@ -123933,7 +146856,7 @@ "location": { "column": 67, "file": "", - "line": 4655 + "line": 4093 }, "name": "subject", "type": { @@ -123981,14 +146904,14 @@ "location": { "column": 12, "file": "", - "line": 4645 + "line": 4083 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4645 + "line": 4083 }, "name": "parent", "type": { @@ -124036,14 +146959,14 @@ "location": { "column": 10, "file": "", - "line": 4653 + "line": 4091 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4653 + "line": 4091 }, "name": "obj", "type": { @@ -124091,14 +147014,14 @@ "location": { "column": 13, "file": "", - "line": 4654 + "line": 4092 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4654 + "line": 4092 }, "name": "obj", "type": { @@ -124121,7 +147044,7 @@ "location": { "column": 69, "file": "", - "line": 4654 + "line": 4092 }, "name": "option", "type": { @@ -124138,7 +147061,7 @@ "location": { "column": 82, "file": "", - "line": 4654 + "line": 4092 }, "name": "buf", "type": { @@ -124158,7 +147081,7 @@ "location": { "column": 98, "file": "", - "line": 4654 + "line": 4092 }, "name": "buf_size", "type": { @@ -124200,14 +147123,14 @@ "location": { "column": 14, "file": "", - "line": 4652 + "line": 4090 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4652 + "line": 4090 }, "name": "obj", "type": { @@ -124261,14 +147184,14 @@ "location": { "column": 10, "file": "", - "line": 4650 + "line": 4088 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4650 + "line": 4088 }, "name": "obj", "type": { @@ -124316,14 +147239,14 @@ "location": { "column": 6, "file": "", - "line": 4651 + "line": 4089 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4651 + "line": 4089 }, "name": "obj", "type": { @@ -124346,7 +147269,7 @@ "location": { "column": 60, "file": "", - "line": 4651 + "line": 4089 }, "name": "buf", "type": { @@ -124366,7 +147289,7 @@ "location": { "column": 76, "file": "", - "line": 4651 + "line": 4089 }, "name": "buf_size", "type": { @@ -124408,14 +147331,14 @@ "location": { "column": 6, "file": "", - "line": 4646 + "line": 4084 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4646 + "line": 4084 }, "name": "obj", "type": { @@ -124435,7 +147358,7 @@ "location": { "column": 55, "file": "", - "line": 4646 + "line": 4084 }, "name": "options", "type": { @@ -124458,7 +147381,7 @@ "location": { "column": 83, "file": "", - "line": 4646 + "line": 4084 }, "name": "mode", "type": { @@ -124500,14 +147423,14 @@ "location": { "column": 6, "file": "", - "line": 4647 + "line": 4085 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4647 + "line": 4085 }, "name": "obj", "type": { @@ -124527,7 +147450,7 @@ "location": { "column": 54, "file": "", - "line": 4647 + "line": 4085 }, "name": "sel_opt", "type": { @@ -124544,7 +147467,7 @@ "location": { "column": 80, "file": "", - "line": 4647 + "line": 4085 }, "name": "anim", "type": { @@ -124581,19 +147504,180 @@ "circuitpython", "cpython" ], - "c_name": "lv_roller_set_selected_str", + "c_name": "lv_roller_set_selected_str", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4086 + }, + "parameters": [ + { + "location": { + "column": 42, + "file": "", + "line": 4086 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 4086 + }, + "name": "sel_opt", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + }, + { + "location": { + "column": 88, + "file": "", + "line": 4086 + }, + "name": "anim", + "type": { + "kind": "identifier", + "name": "lv_anim_enable_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_selected_str", + "receiver": "roller", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_roller_set_visible_row_count", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 4087 + }, + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 4087 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 63, + "file": "", + "line": 4087 + }, + "name": "row_cnt", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_visible_row_count", + "receiver": "roller", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "object_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_scale_add_section", "function_specifiers": [], "location": { - "column": 6, + "column": 22, "file": "", - "line": 4648 + "line": 4126 }, "parameters": [ { "location": { - "column": 42, + "column": 52, "file": "", - "line": 4648 + "line": 4126 }, "name": "obj", "type": { @@ -124608,58 +147692,21 @@ "conversion": "object_handle", "python_type": "obj" } - }, - { - "location": { - "column": 60, - "file": "", - "line": 4648 - }, - "name": "sel_opt", - "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "char", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "string", - "conversion": "string", - "python_type": "str" - } - }, - { - "location": { - "column": 88, - "file": "", - "line": 4648 - }, - "name": "anim", - "type": { - "kind": "identifier", - "name": "lv_anim_enable_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } } ], - "python_name": "set_selected_str", - "receiver": "roller", + "python_name": "add_section", + "receiver": "scale", "return_type": { - "kind": "primitive", - "name": "bool" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_scale_section_t" + } }, "return_view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "scale_section_t" }, "role": "object_method", "static": false, @@ -124673,19 +147720,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_roller_set_visible_row_count", + "c_name": "lv_scale_bind_image_needle_value", "function_specifiers": [], "location": { - "column": 6, + "column": 17, "file": "", - "line": 4649 + "line": 4148 }, "parameters": [ { "location": { - "column": 47, + "column": 59, "file": "", - "line": 4649 + "line": 4148 }, "name": "obj", "type": { @@ -124703,32 +147750,58 @@ }, { "location": { - "column": 63, + "column": 75, "file": "", - "line": 4649 + "line": 4148 }, - "name": "row_cnt", + "name": "needle_img", "type": { - "kind": "identifier", - "name": "uint32_t" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 102, + "file": "", + "line": 4148 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" } } ], - "python_name": "set_visible_row_count", - "receiver": "roller", + "python_name": "bind_image_needle_value", + "receiver": "scale", "return_type": { - "kind": "primitive", - "name": "void" + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_observer_t" + } }, "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "observer_t" }, "role": "object_method", "static": false, @@ -124742,19 +147815,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_scale_add_section", + "c_name": "lv_scale_bind_line_needle_value", "function_specifiers": [], "location": { - "column": 22, + "column": 17, "file": "", - "line": 4688 + "line": 4146 }, "parameters": [ { "location": { - "column": 52, + "column": 58, "file": "", - "line": 4688 + "line": 4146 }, "name": "obj", "type": { @@ -124769,21 +147842,78 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "location": { + "column": 74, + "file": "", + "line": 4146 + }, + "name": "needle_line", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + }, + "view": { + "category": "object_pointer", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "location": { + "column": 97, + "file": "", + "line": 4146 + }, + "name": "needle_length", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 62, + "file": "", + "line": 4147 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } } ], - "python_name": "add_section", + "python_name": "bind_line_needle_value", "receiver": "scale", "return_type": { "kind": "pointer", "target": { "kind": "identifier", - "name": "lv_scale_section_t" + "name": "lv_observer_t" } }, "return_view": { "category": "struct_pointer", "conversion": "struct_pointer", - "python_type": "scale_section_t" + "python_type": "observer_t" }, "role": "object_method", "static": false, @@ -124802,14 +147932,14 @@ "location": { "column": 17, "file": "", - "line": 4706 + "line": 4145 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 4706 + "line": 4145 }, "name": "obj", "type": { @@ -124829,7 +147959,7 @@ "location": { "column": 84, "file": "", - "line": 4706 + "line": 4145 }, "name": "section", "type": { @@ -124849,7 +147979,7 @@ "location": { "column": 108, "file": "", - "line": 4706 + "line": 4145 }, "name": "subject", "type": { @@ -124897,14 +148027,14 @@ "location": { "column": 17, "file": "", - "line": 4705 + "line": 4144 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 4705 + "line": 4144 }, "name": "obj", "type": { @@ -124924,7 +148054,7 @@ "location": { "column": 84, "file": "", - "line": 4705 + "line": 4144 }, "name": "section", "type": { @@ -124944,7 +148074,7 @@ "location": { "column": 108, "file": "", - "line": 4705 + "line": 4144 }, "name": "subject", "type": { @@ -124992,14 +148122,14 @@ "location": { "column": 12, "file": "", - "line": 4672 + "line": 4110 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4672 + "line": 4110 }, "name": "parent", "type": { @@ -125047,14 +148177,14 @@ "location": { "column": 10, "file": "", - "line": 4702 + "line": 4141 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4702 + "line": 4141 }, "name": "obj", "type": { @@ -125099,14 +148229,14 @@ "location": { "column": 6, "file": "", - "line": 4701 + "line": 4140 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4701 + "line": 4140 }, "name": "obj", "type": { @@ -125151,14 +148281,14 @@ "location": { "column": 9, "file": "", - "line": 4699 + "line": 4138 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4699 + "line": 4138 }, "name": "obj", "type": { @@ -125203,14 +148333,14 @@ "location": { "column": 17, "file": "", - "line": 4697 + "line": 4136 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4697 + "line": 4136 }, "name": "obj", "type": { @@ -125255,14 +148385,14 @@ "location": { "column": 9, "file": "", - "line": 4704 + "line": 4143 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4704 + "line": 4143 }, "name": "obj", "type": { @@ -125307,14 +148437,14 @@ "location": { "column": 9, "file": "", - "line": 4703 + "line": 4142 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4703 + "line": 4142 }, "name": "obj", "type": { @@ -125359,14 +148489,14 @@ "location": { "column": 9, "file": "", - "line": 4700 + "line": 4139 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4700 + "line": 4139 }, "name": "obj", "type": { @@ -125411,14 +148541,14 @@ "location": { "column": 9, "file": "", - "line": 4698 + "line": 4137 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4698 + "line": 4137 }, "name": "obj", "type": { @@ -125463,14 +148593,14 @@ "location": { "column": 6, "file": "", - "line": 4689 + "line": 4127 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4689 + "line": 4127 }, "name": "section", "type": { @@ -125490,7 +148620,7 @@ "location": { "column": 71, "file": "", - "line": 4689 + "line": 4127 }, "name": "min", "type": { @@ -125507,7 +148637,7 @@ "location": { "column": 84, "file": "", - "line": 4689 + "line": 4127 }, "name": "max", "type": { @@ -125549,14 +148679,14 @@ "location": { "column": 6, "file": "", - "line": 4693 + "line": 4132 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4693 + "line": 4132 }, "name": "section", "type": { @@ -125576,7 +148706,7 @@ "location": { "column": 73, "file": "", - "line": 4693 + "line": 4132 }, "name": "part", "type": { @@ -125593,7 +148723,7 @@ "location": { "column": 90, "file": "", - "line": 4693 + "line": 4132 }, "name": "section_part_style", "type": { @@ -125638,14 +148768,14 @@ "location": { "column": 6, "file": "", - "line": 4680 + "line": 4118 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4680 + "line": 4118 }, "name": "obj", "type": { @@ -125665,7 +148795,7 @@ "location": { "column": 56, "file": "", - "line": 4680 + "line": 4118 }, "name": "angle_range", "type": { @@ -125707,14 +148837,14 @@ "location": { "column": 6, "file": "", - "line": 4687 + "line": 4125 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4687 + "line": 4125 }, "name": "obj", "type": { @@ -125734,7 +148864,7 @@ "location": { "column": 58, "file": "", - "line": 4687 + "line": 4125 }, "name": "en", "type": { @@ -125776,14 +148906,14 @@ "location": { "column": 6, "file": "", - "line": 4684 + "line": 4122 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4684 + "line": 4122 }, "name": "obj", "type": { @@ -125803,7 +148933,7 @@ "location": { "column": 63, "file": "", - "line": 4684 + "line": 4122 }, "name": "needle_img", "type": { @@ -125823,7 +148953,7 @@ "location": { "column": 85, "file": "", - "line": 4684 + "line": 4122 }, "name": "value", "type": { @@ -125865,14 +148995,14 @@ "location": { "column": 6, "file": "", - "line": 4676 + "line": 4114 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4676 + "line": 4114 }, "name": "obj", "type": { @@ -125892,7 +149022,7 @@ "location": { "column": 51, "file": "", - "line": 4676 + "line": 4114 }, "name": "show_label", "type": { @@ -125934,14 +149064,14 @@ "location": { "column": 6, "file": "", - "line": 4682 + "line": 4120 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4682 + "line": 4120 }, "name": "obj", "type": { @@ -125961,7 +149091,7 @@ "location": { "column": 62, "file": "", - "line": 4682 + "line": 4120 }, "name": "needle_line", "type": { @@ -125981,7 +149111,7 @@ "location": { "column": 85, "file": "", - "line": 4682 + "line": 4120 }, "name": "needle_length", "type": { @@ -125998,7 +149128,7 @@ "location": { "column": 45, "file": "", - "line": 4683 + "line": 4121 }, "name": "value", "type": { @@ -126040,14 +149170,14 @@ "location": { "column": 6, "file": "", - "line": 4675 + "line": 4113 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4675 + "line": 4113 }, "name": "obj", "type": { @@ -126067,7 +149197,7 @@ "location": { "column": 61, "file": "", - "line": 4675 + "line": 4113 }, "name": "major_tick_every", "type": { @@ -126109,14 +149239,14 @@ "location": { "column": 6, "file": "", - "line": 4679 + "line": 4117 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4679 + "line": 4117 }, "name": "obj", "type": { @@ -126136,7 +149266,7 @@ "location": { "column": 53, "file": "", - "line": 4679 + "line": 4117 }, "name": "max", "type": { @@ -126178,14 +149308,14 @@ "location": { "column": 6, "file": "", - "line": 4678 + "line": 4116 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4678 + "line": 4116 }, "name": "obj", "type": { @@ -126205,7 +149335,7 @@ "location": { "column": 53, "file": "", - "line": 4678 + "line": 4116 }, "name": "min", "type": { @@ -126247,14 +149377,14 @@ "location": { "column": 6, "file": "", - "line": 4673 + "line": 4111 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4673 + "line": 4111 }, "name": "obj", "type": { @@ -126274,7 +149404,7 @@ "location": { "column": 56, "file": "", - "line": 4673 + "line": 4111 }, "name": "mode", "type": { @@ -126316,14 +149446,14 @@ "location": { "column": 6, "file": "", - "line": 4686 + "line": 4124 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4686 + "line": 4124 }, "name": "obj", "type": { @@ -126343,7 +149473,7 @@ "location": { "column": 50, "file": "", - "line": 4686 + "line": 4124 }, "name": "en", "type": { @@ -126385,14 +149515,14 @@ "location": { "column": 6, "file": "", - "line": 4677 + "line": 4115 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4677 + "line": 4115 }, "name": "obj", "type": { @@ -126412,7 +149542,7 @@ "location": { "column": 49, "file": "", - "line": 4677 + "line": 4115 }, "name": "min", "type": { @@ -126429,7 +149559,7 @@ "location": { "column": 62, "file": "", - "line": 4677 + "line": 4115 }, "name": "max", "type": { @@ -126471,14 +149601,14 @@ "location": { "column": 6, "file": "", - "line": 4681 + "line": 4119 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4681 + "line": 4119 }, "name": "obj", "type": { @@ -126498,7 +149628,7 @@ "location": { "column": 52, "file": "", - "line": 4681 + "line": 4119 }, "name": "rotation", "type": { @@ -126540,14 +149670,14 @@ "location": { "column": 6, "file": "", - "line": 4692 + "line": 4130 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4692 + "line": 4130 }, "name": "scale", "type": { @@ -126567,7 +149697,7 @@ "location": { "column": 74, "file": "", - "line": 4692 + "line": 4130 }, "name": "section", "type": { @@ -126587,7 +149717,7 @@ "location": { "column": 93, "file": "", - "line": 4692 + "line": 4130 }, "name": "max", "type": { @@ -126629,14 +149759,14 @@ "location": { "column": 6, "file": "", - "line": 4691 + "line": 4129 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4691 + "line": 4129 }, "name": "scale", "type": { @@ -126656,7 +149786,7 @@ "location": { "column": 74, "file": "", - "line": 4691 + "line": 4129 }, "name": "section", "type": { @@ -126676,7 +149806,7 @@ "location": { "column": 93, "file": "", - "line": 4691 + "line": 4129 }, "name": "min", "type": { @@ -126718,14 +149848,14 @@ "location": { "column": 6, "file": "", - "line": 4690 + "line": 4128 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4690 + "line": 4128 }, "name": "scale", "type": { @@ -126745,7 +149875,7 @@ "location": { "column": 70, "file": "", - "line": 4690 + "line": 4128 }, "name": "section", "type": { @@ -126765,7 +149895,7 @@ "location": { "column": 89, "file": "", - "line": 4690 + "line": 4128 }, "name": "min", "type": { @@ -126782,7 +149912,7 @@ "location": { "column": 102, "file": "", - "line": 4690 + "line": 4128 }, "name": "max", "type": { @@ -126824,14 +149954,14 @@ "location": { "column": 6, "file": "", - "line": 4695 + "line": 4134 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4695 + "line": 4134 }, "name": "scale", "type": { @@ -126851,7 +149981,7 @@ "location": { "column": 80, "file": "", - "line": 4695 + "line": 4134 }, "name": "section", "type": { @@ -126871,7 +150001,7 @@ "location": { "column": 108, "file": "", - "line": 4695 + "line": 4134 }, "name": "style", "type": { @@ -126919,14 +150049,14 @@ "location": { "column": 6, "file": "", - "line": 4696 + "line": 4135 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4696 + "line": 4135 }, "name": "scale", "type": { @@ -126946,7 +150076,7 @@ "location": { "column": 76, "file": "", - "line": 4696 + "line": 4135 }, "name": "section", "type": { @@ -126966,7 +150096,7 @@ "location": { "column": 104, "file": "", - "line": 4696 + "line": 4135 }, "name": "style", "type": { @@ -127014,14 +150144,14 @@ "location": { "column": 6, "file": "", - "line": 4694 + "line": 4133 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4694 + "line": 4133 }, "name": "scale", "type": { @@ -127041,7 +150171,7 @@ "location": { "column": 75, "file": "", - "line": 4694 + "line": 4133 }, "name": "section", "type": { @@ -127061,7 +150191,7 @@ "location": { "column": 103, "file": "", - "line": 4694 + "line": 4133 }, "name": "style", "type": { @@ -127109,14 +150239,14 @@ "location": { "column": 6, "file": "", - "line": 4685 + "line": 4123 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4685 + "line": 4123 }, "name": "obj", "type": { @@ -127136,7 +150266,7 @@ "location": { "column": 57, "file": "", - "line": 4685 + "line": 4123 }, "name": "txt_src", "type": { @@ -127190,14 +150320,14 @@ "location": { "column": 6, "file": "", - "line": 4674 + "line": 4112 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4674 + "line": 4112 }, "name": "obj", "type": { @@ -127217,7 +150347,7 @@ "location": { "column": 61, "file": "", - "line": 4674 + "line": 4112 }, "name": "total_tick_count", "type": { @@ -127259,7 +150389,7 @@ "location": { "column": 12, "file": "", - "line": 2032 + "line": 1835 }, "parameters": [], "python_name": "screen_active", @@ -127292,21 +150422,21 @@ "location": { "column": 6, "file": "", - "line": 2029 + "line": 1832 }, "parameters": [ { "location": { - "column": 38, + "column": 30, "file": "", - "line": 2029 + "line": 1832 }, "name": "scr", "type": { "kind": "pointer", "target": { - "kind": "struct", - "name": "_lv_obj_t" + "kind": "identifier", + "name": "lv_obj_t" } }, "view": { @@ -127343,14 +150473,14 @@ "location": { "column": 6, "file": "", - "line": 2030 + "line": 1833 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 2030 + "line": 1833 }, "name": "scr", "type": { @@ -127370,7 +150500,7 @@ "location": { "column": 64, "file": "", - "line": 2030 + "line": 1833 }, "name": "anim_type", "type": { @@ -127387,7 +150517,7 @@ "location": { "column": 84, "file": "", - "line": 2030 + "line": 1833 }, "name": "time", "type": { @@ -127404,7 +150534,7 @@ "location": { "column": 99, "file": "", - "line": 2030 + "line": 1833 }, "name": "delay", "type": { @@ -127421,7 +150551,7 @@ "location": { "column": 31, "file": "", - "line": 2031 + "line": 1834 }, "name": "auto_del", "type": { @@ -127462,14 +150592,14 @@ "location": { "column": 6, "file": "", - "line": 1140 + "line": 3427 }, "parameters": [ { "location": { "column": 27, "file": "", - "line": 1140 + "line": 3427 }, "name": "ms", "type": { @@ -127510,14 +150640,14 @@ "location": { "column": 17, "file": "", - "line": 4734 + "line": 4176 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4734 + "line": 4176 }, "name": "obj", "type": { @@ -127537,7 +150667,7 @@ "location": { "column": 67, "file": "", - "line": 4734 + "line": 4176 }, "name": "subject", "type": { @@ -127585,14 +150715,14 @@ "location": { "column": 12, "file": "", - "line": 4718 + "line": 4160 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4718 + "line": 4160 }, "name": "parent", "type": { @@ -127640,14 +150770,14 @@ "location": { "column": 9, "file": "", - "line": 4727 + "line": 4169 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4727 + "line": 4169 }, "name": "obj", "type": { @@ -127695,14 +150825,14 @@ "location": { "column": 9, "file": "", - "line": 4729 + "line": 4171 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4729 + "line": 4171 }, "name": "obj", "type": { @@ -127750,14 +150880,14 @@ "location": { "column": 9, "file": "", - "line": 4728 + "line": 4170 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4728 + "line": 4170 }, "name": "obj", "type": { @@ -127805,14 +150935,14 @@ "location": { "column": 18, "file": "", - "line": 4731 + "line": 4173 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4731 + "line": 4173 }, "name": "slider", "type": { @@ -127857,16 +150987,16 @@ "location": { "column": 25, "file": "", - "line": 4732 + "line": 4174 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 4732 + "line": 4174 }, - "name": "slider", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -127909,14 +151039,14 @@ "location": { "column": 9, "file": "", - "line": 4726 + "line": 4168 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4726 + "line": 4168 }, "name": "obj", "type": { @@ -127964,14 +151094,14 @@ "location": { "column": 6, "file": "", - "line": 4730 + "line": 4172 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4730 + "line": 4172 }, "name": "obj", "type": { @@ -128019,14 +151149,14 @@ "location": { "column": 6, "file": "", - "line": 4733 + "line": 4175 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4733 + "line": 4175 }, "name": "obj", "type": { @@ -128071,14 +151201,14 @@ "location": { "column": 6, "file": "", - "line": 4723 + "line": 4165 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4723 + "line": 4165 }, "name": "obj", "type": { @@ -128098,7 +151228,7 @@ "location": { "column": 54, "file": "", - "line": 4723 + "line": 4165 }, "name": "max", "type": { @@ -128140,14 +151270,14 @@ "location": { "column": 6, "file": "", - "line": 4722 + "line": 4164 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4722 + "line": 4164 }, "name": "obj", "type": { @@ -128167,7 +151297,7 @@ "location": { "column": 54, "file": "", - "line": 4722 + "line": 4164 }, "name": "min", "type": { @@ -128209,14 +151339,14 @@ "location": { "column": 6, "file": "", - "line": 4724 + "line": 4166 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 4724 + "line": 4166 }, "name": "obj", "type": { @@ -128236,7 +151366,7 @@ "location": { "column": 58, "file": "", - "line": 4724 + "line": 4166 }, "name": "mode", "type": { @@ -128278,14 +151408,14 @@ "location": { "column": 6, "file": "", - "line": 4725 + "line": 4167 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4725 + "line": 4167 }, "name": "obj", "type": { @@ -128305,7 +151435,7 @@ "location": { "column": 72, "file": "", - "line": 4725 + "line": 4167 }, "name": "orientation", "type": { @@ -128347,14 +151477,14 @@ "location": { "column": 6, "file": "", - "line": 4721 + "line": 4163 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4721 + "line": 4163 }, "name": "obj", "type": { @@ -128374,7 +151504,7 @@ "location": { "column": 50, "file": "", - "line": 4721 + "line": 4163 }, "name": "min", "type": { @@ -128391,7 +151521,7 @@ "location": { "column": 63, "file": "", - "line": 4721 + "line": 4163 }, "name": "max", "type": { @@ -128433,14 +151563,14 @@ "location": { "column": 6, "file": "", - "line": 4720 + "line": 4162 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4720 + "line": 4162 }, "name": "obj", "type": { @@ -128460,7 +151590,7 @@ "location": { "column": 56, "file": "", - "line": 4720 + "line": 4162 }, "name": "value", "type": { @@ -128477,7 +151607,7 @@ "location": { "column": 80, "file": "", - "line": 4720 + "line": 4162 }, "name": "anim", "type": { @@ -128519,14 +151649,14 @@ "location": { "column": 6, "file": "", - "line": 4719 + "line": 4161 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4719 + "line": 4161 }, "name": "obj", "type": { @@ -128546,7 +151676,7 @@ "location": { "column": 50, "file": "", - "line": 4719 + "line": 4161 }, "name": "value", "type": { @@ -128563,7 +151693,7 @@ "location": { "column": 74, "file": "", - "line": 4719 + "line": 4161 }, "name": "anim", "type": { @@ -128605,14 +151735,14 @@ "location": { "column": 17, "file": "", - "line": 4970 + "line": 3250 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4970 + "line": 3250 }, "name": "obj", "type": { @@ -128632,7 +151762,7 @@ "location": { "column": 79, "file": "", - "line": 4970 + "line": 3250 }, "name": "cf", "type": { @@ -128676,14 +151806,14 @@ "location": { "column": 6, "file": "", - "line": 4973 + "line": 3254 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4973 + "line": 3254 }, "name": "dsc", "type": { @@ -128727,14 +151857,14 @@ "location": { "column": 13, "file": "", - "line": 4971 + "line": 3251 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4971 + "line": 3251 }, "name": "obj", "type": { @@ -128754,7 +151884,7 @@ "location": { "column": 72, "file": "", - "line": 4971 + "line": 3251 }, "name": "draw_buf", "type": { @@ -128798,14 +151928,14 @@ "location": { "column": 17, "file": "", - "line": 4969 + "line": 3249 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4969 + "line": 3249 }, "name": "obj", "type": { @@ -128825,7 +151955,7 @@ "location": { "column": 68, "file": "", - "line": 4969 + "line": 3249 }, "name": "cf", "type": { @@ -128869,14 +151999,14 @@ "location": { "column": 13, "file": "", - "line": 4974 + "line": 3256 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4974 + "line": 3256 }, "name": "obj", "type": { @@ -128896,7 +152026,7 @@ "location": { "column": 71, "file": "", - "line": 4974 + "line": 3256 }, "name": "cf", "type": { @@ -128913,7 +152043,7 @@ "location": { "column": 90, "file": "", - "line": 4974 + "line": 3256 }, "name": "dsc", "type": { @@ -128933,7 +152063,7 @@ "location": { "column": 42, "file": "", - "line": 4975 + "line": 3257 }, "name": "buf", "type": { @@ -128953,7 +152083,7 @@ "location": { "column": 46, "file": "", - "line": 4976 + "line": 3258 }, "name": "buf_size", "type": { @@ -128994,14 +152124,14 @@ "location": { "column": 13, "file": "", - "line": 4972 + "line": 3252 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4972 + "line": 3252 }, "name": "obj", "type": { @@ -129021,7 +152151,7 @@ "location": { "column": 76, "file": "", - "line": 4972 + "line": 3252 }, "name": "cf", "type": { @@ -129038,7 +152168,7 @@ "location": { "column": 94, "file": "", - "line": 4972 + "line": 3252 }, "name": "draw_buf", "type": { @@ -129082,14 +152212,14 @@ "location": { "column": 5, "file": "", - "line": 412 + "line": 1224 }, "parameters": [ { "location": { "column": 22, "file": "", - "line": 412 + "line": 1224 }, "name": "buffer", "type": { @@ -129109,7 +152239,7 @@ "location": { "column": 39, "file": "", - "line": 412 + "line": 1224 }, "name": "count", "type": { @@ -129126,7 +152256,7 @@ "location": { "column": 57, "file": "", - "line": 412 + "line": 1224 }, "name": "format", "type": { @@ -129174,14 +152304,14 @@ "location": { "column": 14, "file": "", - "line": 4770 + "line": 4213 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4770 + "line": 4213 }, "name": "span", "type": { @@ -129229,14 +152359,14 @@ "location": { "column": 14, "file": "", - "line": 4771 + "line": 4214 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4771 + "line": 4214 }, "name": "span", "type": { @@ -129287,14 +152417,14 @@ "location": { "column": 6, "file": "", - "line": 4757 + "line": 4199 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4757 + "line": 4199 }, "name": "span", "type": { @@ -129314,7 +152444,7 @@ "location": { "column": 52, "file": "", - "line": 4757 + "line": 4199 }, "name": "text", "type": { @@ -129362,14 +152492,14 @@ "location": { "column": 6, "file": "", - "line": 4758 + "line": 4200 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4758 + "line": 4200 }, "name": "span", "type": { @@ -129389,7 +152519,7 @@ "location": { "column": 56, "file": "", - "line": 4758 + "line": 4200 }, "name": "fmt", "type": { @@ -129438,14 +152568,14 @@ "location": { "column": 6, "file": "", - "line": 4759 + "line": 4201 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4759 + "line": 4201 }, "name": "span", "type": { @@ -129465,7 +152595,7 @@ "location": { "column": 59, "file": "", - "line": 4759 + "line": 4201 }, "name": "text", "type": { @@ -129513,7 +152643,7 @@ "location": { "column": 6, "file": "", - "line": 4753 + "line": 4195 }, "parameters": [], "python_name": "span_stack_deinit", @@ -129543,7 +152673,7 @@ "location": { "column": 6, "file": "", - "line": 4752 + "line": 4194 }, "parameters": [], "python_name": "span_stack_init", @@ -129573,14 +152703,14 @@ "location": { "column": 13, "file": "", - "line": 4755 + "line": 4197 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4755 + "line": 4197 }, "name": "obj", "type": { @@ -129628,14 +152758,14 @@ "location": { "column": 17, "file": "", - "line": 4785 + "line": 4228 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4785 + "line": 4228 }, "name": "obj", "type": { @@ -129655,7 +152785,7 @@ "location": { "column": 71, "file": "", - "line": 4785 + "line": 4228 }, "name": "span", "type": { @@ -129675,7 +152805,7 @@ "location": { "column": 92, "file": "", - "line": 4785 + "line": 4228 }, "name": "subject", "type": { @@ -129695,7 +152825,7 @@ "location": { "column": 114, "file": "", - "line": 4785 + "line": 4228 }, "name": "fmt", "type": { @@ -129746,14 +152876,14 @@ "location": { "column": 12, "file": "", - "line": 4754 + "line": 4196 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4754 + "line": 4196 }, "name": "parent", "type": { @@ -129801,14 +152931,14 @@ "location": { "column": 6, "file": "", - "line": 4756 + "line": 4198 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4756 + "line": 4198 }, "name": "obj", "type": { @@ -129828,7 +152958,7 @@ "location": { "column": 57, "file": "", - "line": 4756 + "line": 4198 }, "name": "span", "type": { @@ -129873,14 +153003,14 @@ "location": { "column": 17, "file": "", - "line": 4774 + "line": 4217 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4774 + "line": 4217 }, "name": "obj", "type": { @@ -129925,14 +153055,14 @@ "location": { "column": 13, "file": "", - "line": 4772 + "line": 4215 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4772 + "line": 4215 }, "name": "obj", "type": { @@ -129955,7 +153085,7 @@ "location": { "column": 66, "file": "", - "line": 4772 + "line": 4215 }, "name": "id", "type": { @@ -130000,14 +153130,14 @@ "location": { "column": 9, "file": "", - "line": 4781 + "line": 4224 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4781 + "line": 4224 }, "name": "obj", "type": { @@ -130027,7 +153157,7 @@ "location": { "column": 64, "file": "", - "line": 4781 + "line": 4224 }, "name": "width", "type": { @@ -130069,14 +153199,14 @@ "location": { "column": 10, "file": "", - "line": 4780 + "line": 4223 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4780 + "line": 4223 }, "name": "obj", "type": { @@ -130096,7 +153226,7 @@ "location": { "column": 65, "file": "", - "line": 4780 + "line": 4223 }, "name": "max_width", "type": { @@ -130138,14 +153268,14 @@ "location": { "column": 9, "file": "", - "line": 4776 + "line": 4219 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4776 + "line": 4219 }, "name": "obj", "type": { @@ -130190,14 +153320,14 @@ "location": { "column": 9, "file": "", - "line": 4779 + "line": 4222 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4779 + "line": 4222 }, "name": "obj", "type": { @@ -130242,14 +153372,14 @@ "location": { "column": 9, "file": "", - "line": 4778 + "line": 4221 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4778 + "line": 4221 }, "name": "obj", "type": { @@ -130294,14 +153424,14 @@ "location": { "column": 16, "file": "", - "line": 4777 + "line": 4220 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4777 + "line": 4220 }, "name": "obj", "type": { @@ -130346,14 +153476,14 @@ "location": { "column": 20, "file": "", - "line": 4775 + "line": 4218 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 4775 + "line": 4218 }, "name": "obj", "type": { @@ -130398,14 +153528,14 @@ "location": { "column": 13, "file": "", - "line": 4783 + "line": 4226 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4783 + "line": 4226 }, "name": "obj", "type": { @@ -130425,9 +153555,9 @@ "location": { "column": 77, "file": "", - "line": 4783 + "line": 4226 }, - "name": "point", + "name": "p", "type": { "kind": "pointer", "target": { @@ -130476,14 +153606,14 @@ "location": { "column": 18, "file": "", - "line": 4782 + "line": 4225 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4782 + "line": 4225 }, "name": "obj", "type": { @@ -130503,7 +153633,7 @@ "location": { "column": 79, "file": "", - "line": 4782 + "line": 4225 }, "name": "span", "type": { @@ -130551,14 +153681,14 @@ "location": { "column": 10, "file": "", - "line": 4773 + "line": 4216 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4773 + "line": 4216 }, "name": "obj", "type": { @@ -130606,14 +153736,14 @@ "location": { "column": 6, "file": "", - "line": 4784 + "line": 4227 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4784 + "line": 4227 }, "name": "obj", "type": { @@ -130658,14 +153788,14 @@ "location": { "column": 6, "file": "", - "line": 4765 + "line": 4207 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4765 + "line": 4207 }, "name": "obj", "type": { @@ -130685,7 +153815,7 @@ "location": { "column": 61, "file": "", - "line": 4765 + "line": 4207 }, "name": "align", "type": { @@ -130727,14 +153857,14 @@ "location": { "column": 6, "file": "", - "line": 4767 + "line": 4209 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4767 + "line": 4209 }, "name": "obj", "type": { @@ -130754,7 +153884,7 @@ "location": { "column": 54, "file": "", - "line": 4767 + "line": 4209 }, "name": "indent", "type": { @@ -130796,14 +153926,14 @@ "location": { "column": 6, "file": "", - "line": 4769 + "line": 4212 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4769 + "line": 4212 }, "name": "obj", "type": { @@ -130823,7 +153953,7 @@ "location": { "column": 57, "file": "", - "line": 4769 + "line": 4212 }, "name": "lines", "type": { @@ -130865,14 +153995,14 @@ "location": { "column": 6, "file": "", - "line": 4768 + "line": 4211 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4768 + "line": 4211 }, "name": "obj", "type": { @@ -130892,7 +154022,7 @@ "location": { "column": 59, "file": "", - "line": 4768 + "line": 4211 }, "name": "mode", "type": { @@ -130934,14 +154064,14 @@ "location": { "column": 6, "file": "", - "line": 4766 + "line": 4208 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4766 + "line": 4208 }, "name": "obj", "type": { @@ -130961,7 +154091,7 @@ "location": { "column": 67, "file": "", - "line": 4766 + "line": 4208 }, "name": "overflow", "type": { @@ -131003,14 +154133,14 @@ "location": { "column": 6, "file": "", - "line": 4764 + "line": 4205 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4764 + "line": 4205 }, "name": "obj", "type": { @@ -131030,7 +154160,7 @@ "location": { "column": 60, "file": "", - "line": 4764 + "line": 4205 }, "name": "span", "type": { @@ -131050,7 +154180,7 @@ "location": { "column": 85, "file": "", - "line": 4764 + "line": 4205 }, "name": "style", "type": { @@ -131098,14 +154228,14 @@ "location": { "column": 6, "file": "", - "line": 4760 + "line": 4202 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4760 + "line": 4202 }, "name": "obj", "type": { @@ -131125,7 +154255,7 @@ "location": { "column": 59, "file": "", - "line": 4760 + "line": 4202 }, "name": "span", "type": { @@ -131145,7 +154275,7 @@ "location": { "column": 78, "file": "", - "line": 4760 + "line": 4202 }, "name": "text", "type": { @@ -131193,14 +154323,14 @@ "location": { "column": 6, "file": "", - "line": 4762 + "line": 4204 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4762 + "line": 4204 }, "name": "obj", "type": { @@ -131220,7 +154350,7 @@ "location": { "column": 63, "file": "", - "line": 4762 + "line": 4204 }, "name": "span", "type": { @@ -131240,7 +154370,7 @@ "location": { "column": 82, "file": "", - "line": 4762 + "line": 4204 }, "name": "fmt", "type": { @@ -131288,14 +154418,14 @@ "location": { "column": 6, "file": "", - "line": 4761 + "line": 4203 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4761 + "line": 4203 }, "name": "obj", "type": { @@ -131315,7 +154445,7 @@ "location": { "column": 66, "file": "", - "line": 4761 + "line": 4203 }, "name": "span", "type": { @@ -131335,7 +154465,7 @@ "location": { "column": 85, "file": "", - "line": 4761 + "line": 4203 }, "name": "text", "type": { @@ -131383,14 +154513,14 @@ "location": { "column": 17, "file": "", - "line": 4852 + "line": 4296 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4852 + "line": 4296 }, "name": "obj", "type": { @@ -131410,7 +154540,7 @@ "location": { "column": 68, "file": "", - "line": 4852 + "line": 4296 }, "name": "subject", "type": { @@ -131458,14 +154588,14 @@ "location": { "column": 12, "file": "", - "line": 4828 + "line": 4272 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4828 + "line": 4272 }, "name": "parent", "type": { @@ -131513,14 +154643,14 @@ "location": { "column": 6, "file": "", - "line": 4851 + "line": 4295 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4851 + "line": 4295 }, "name": "obj", "type": { @@ -131565,14 +154695,14 @@ "location": { "column": 10, "file": "", - "line": 4844 + "line": 4288 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4844 + "line": 4288 }, "name": "obj", "type": { @@ -131617,14 +154747,14 @@ "location": { "column": 10, "file": "", - "line": 4843 + "line": 4287 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4843 + "line": 4287 }, "name": "obj", "type": { @@ -131669,14 +154799,14 @@ "location": { "column": 10, "file": "", - "line": 4847 + "line": 4291 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 4847 + "line": 4291 }, "name": "obj", "type": { @@ -131721,14 +154851,14 @@ "location": { "column": 9, "file": "", - "line": 4846 + "line": 4290 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4846 + "line": 4290 }, "name": "obj", "type": { @@ -131773,14 +154903,14 @@ "location": { "column": 9, "file": "", - "line": 4845 + "line": 4289 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4845 + "line": 4289 }, "name": "obj", "type": { @@ -131825,14 +154955,14 @@ "location": { "column": 6, "file": "", - "line": 4840 + "line": 4284 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4840 + "line": 4284 }, "name": "obj", "type": { @@ -131877,14 +155007,14 @@ "location": { "column": 9, "file": "", - "line": 4842 + "line": 4286 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4842 + "line": 4286 }, "name": "obj", "type": { @@ -131929,14 +155059,14 @@ "location": { "column": 9, "file": "", - "line": 4841 + "line": 4285 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4841 + "line": 4285 }, "name": "obj", "type": { @@ -131981,14 +155111,14 @@ "location": { "column": 6, "file": "", - "line": 4850 + "line": 4294 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4850 + "line": 4294 }, "name": "obj", "type": { @@ -132033,14 +155163,14 @@ "location": { "column": 6, "file": "", - "line": 4838 + "line": 4282 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4838 + "line": 4282 }, "name": "obj", "type": { @@ -132060,7 +155190,7 @@ "location": { "column": 57, "file": "", - "line": 4838 + "line": 4282 }, "name": "pos", "type": { @@ -132102,14 +155232,14 @@ "location": { "column": 6, "file": "", - "line": 4833 + "line": 4277 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4833 + "line": 4277 }, "name": "obj", "type": { @@ -132129,7 +155259,7 @@ "location": { "column": 60, "file": "", - "line": 4833 + "line": 4277 }, "name": "dec_point_pos", "type": { @@ -132171,14 +155301,14 @@ "location": { "column": 6, "file": "", - "line": 4832 + "line": 4276 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4832 + "line": 4276 }, "name": "obj", "type": { @@ -132198,7 +155328,7 @@ "location": { "column": 58, "file": "", - "line": 4832 + "line": 4276 }, "name": "digit_count", "type": { @@ -132240,14 +155370,14 @@ "location": { "column": 6, "file": "", - "line": 4831 + "line": 4275 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4831 + "line": 4275 }, "name": "obj", "type": { @@ -132267,7 +155397,7 @@ "location": { "column": 59, "file": "", - "line": 4831 + "line": 4275 }, "name": "digit_count", "type": { @@ -132284,7 +155414,7 @@ "location": { "column": 81, "file": "", - "line": 4831 + "line": 4275 }, "name": "sep_pos", "type": { @@ -132326,14 +155456,14 @@ "location": { "column": 6, "file": "", - "line": 4839 + "line": 4283 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4839 + "line": 4283 }, "name": "obj", "type": { @@ -132353,7 +155483,7 @@ "location": { "column": 67, "file": "", - "line": 4839 + "line": 4283 }, "name": "direction", "type": { @@ -132395,14 +155525,14 @@ "location": { "column": 6, "file": "", - "line": 4837 + "line": 4281 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4837 + "line": 4281 }, "name": "obj", "type": { @@ -132422,7 +155552,7 @@ "location": { "column": 55, "file": "", - "line": 4837 + "line": 4281 }, "name": "max_value", "type": { @@ -132464,14 +155594,14 @@ "location": { "column": 6, "file": "", - "line": 4836 + "line": 4280 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4836 + "line": 4280 }, "name": "obj", "type": { @@ -132491,7 +155621,7 @@ "location": { "column": 55, "file": "", - "line": 4836 + "line": 4280 }, "name": "min_value", "type": { @@ -132533,14 +155663,14 @@ "location": { "column": 6, "file": "", - "line": 4835 + "line": 4279 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4835 + "line": 4279 }, "name": "obj", "type": { @@ -132560,7 +155690,7 @@ "location": { "column": 51, "file": "", - "line": 4835 + "line": 4279 }, "name": "min_value", "type": { @@ -132577,7 +155707,7 @@ "location": { "column": 70, "file": "", - "line": 4835 + "line": 4279 }, "name": "max_value", "type": { @@ -132619,14 +155749,14 @@ "location": { "column": 6, "file": "", - "line": 4830 + "line": 4274 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4830 + "line": 4274 }, "name": "obj", "type": { @@ -132646,7 +155776,7 @@ "location": { "column": 51, "file": "", - "line": 4830 + "line": 4274 }, "name": "rollover", "type": { @@ -132688,14 +155818,14 @@ "location": { "column": 6, "file": "", - "line": 4834 + "line": 4278 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4834 + "line": 4278 }, "name": "obj", "type": { @@ -132715,7 +155845,7 @@ "location": { "column": 51, "file": "", - "line": 4834 + "line": 4278 }, "name": "step", "type": { @@ -132757,14 +155887,14 @@ "location": { "column": 6, "file": "", - "line": 4829 + "line": 4273 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4829 + "line": 4273 }, "name": "obj", "type": { @@ -132784,7 +155914,7 @@ "location": { "column": 51, "file": "", - "line": 4829 + "line": 4273 }, "name": "v", "type": { @@ -132826,14 +155956,14 @@ "location": { "column": 6, "file": "", - "line": 4848 + "line": 4292 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4848 + "line": 4292 }, "name": "obj", "type": { @@ -132878,14 +156008,14 @@ "location": { "column": 6, "file": "", - "line": 4849 + "line": 4293 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4849 + "line": 4293 }, "name": "obj", "type": { @@ -132930,14 +156060,14 @@ "location": { "column": 12, "file": "", - "line": 4854 + "line": 4298 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4854 + "line": 4298 }, "name": "parent", "type": { @@ -132985,14 +156115,14 @@ "location": { "column": 10, "file": "", - "line": 4858 + "line": 4302 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4858 + "line": 4302 }, "name": "obj", "type": { @@ -133037,14 +156167,14 @@ "location": { "column": 10, "file": "", - "line": 4859 + "line": 4303 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4859 + "line": 4303 }, "name": "obj", "type": { @@ -133089,14 +156219,14 @@ "location": { "column": 6, "file": "", - "line": 4856 + "line": 4300 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4856 + "line": 4300 }, "name": "obj", "type": { @@ -133116,7 +156246,7 @@ "location": { "column": 60, "file": "", - "line": 4856 + "line": 4300 }, "name": "t", "type": { @@ -133158,14 +156288,14 @@ "location": { "column": 6, "file": "", - "line": 4855 + "line": 4299 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4855 + "line": 4299 }, "name": "obj", "type": { @@ -133185,7 +156315,7 @@ "location": { "column": 58, "file": "", - "line": 4855 + "line": 4299 }, "name": "t", "type": { @@ -133202,7 +156332,7 @@ "location": { "column": 70, "file": "", - "line": 4855 + "line": 4299 }, "name": "angle", "type": { @@ -133244,14 +156374,14 @@ "location": { "column": 6, "file": "", - "line": 4857 + "line": 4301 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4857 + "line": 4301 }, "name": "obj", "type": { @@ -133271,7 +156401,7 @@ "location": { "column": 56, "file": "", - "line": 4857 + "line": 4301 }, "name": "angle", "type": { @@ -133315,14 +156445,14 @@ "location": { "column": 23, "file": "", - "line": 487 + "line": 363 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 487 + "line": 363 }, "name": "x", "type": { @@ -133365,14 +156495,14 @@ "location": { "column": 6, "file": "", - "line": 485 + "line": 361 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 485 + "line": 361 }, "name": "x", "type": { @@ -133389,7 +156519,7 @@ "location": { "column": 40, "file": "", - "line": 485 + "line": 361 }, "name": "q", "type": { @@ -133409,7 +156539,7 @@ "location": { "column": 54, "file": "", - "line": 485 + "line": 361 }, "name": "mask", "type": { @@ -133450,14 +156580,14 @@ "location": { "column": 9, "file": "", - "line": 486 + "line": 362 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 486 + "line": 362 }, "name": "x", "type": { @@ -133498,14 +156628,14 @@ "location": { "column": 8, "file": "", - "line": 380 + "line": 1016 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 380 + "line": 1016 }, "name": "dst", "type": { @@ -133525,7 +156655,7 @@ "location": { "column": 41, "file": "", - "line": 380 + "line": 1016 }, "name": "src", "type": { @@ -133575,14 +156705,14 @@ "location": { "column": 8, "file": "", - "line": 382 + "line": 1018 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 382 + "line": 1018 }, "name": "str", "type": { @@ -133605,7 +156735,7 @@ "location": { "column": 40, "file": "", - "line": 382 + "line": 1018 }, "name": "c", "type": { @@ -133649,14 +156779,14 @@ "location": { "column": 5, "file": "", - "line": 372 + "line": 1008 }, "parameters": [ { "location": { "column": 26, "file": "", - "line": 372 + "line": 1008 }, "name": "s1", "type": { @@ -133679,7 +156809,7 @@ "location": { "column": 43, "file": "", - "line": 372 + "line": 1008 }, "name": "s2", "type": { @@ -133726,14 +156856,14 @@ "location": { "column": 8, "file": "", - "line": 371 + "line": 1007 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 371 + "line": 1007 }, "name": "dst", "type": { @@ -133753,7 +156883,7 @@ "location": { "column": 41, "file": "", - "line": 371 + "line": 1007 }, "name": "src", "type": { @@ -133803,14 +156933,14 @@ "location": { "column": 8, "file": "", - "line": 378 + "line": 1014 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 378 + "line": 1014 }, "name": "src", "type": { @@ -133862,14 +156992,14 @@ "location": { "column": 20, "file": "", - "line": 374 + "line": 1010 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 374 + "line": 1010 }, "name": "s1", "type": { @@ -133892,7 +157022,7 @@ "location": { "column": 57, "file": "", - "line": 374 + "line": 1010 }, "name": "s2", "type": { @@ -133941,14 +157071,14 @@ "location": { "column": 8, "file": "", - "line": 369 + "line": 1005 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 369 + "line": 1005 }, "name": "dst", "type": { @@ -133968,7 +157098,7 @@ "location": { "column": 42, "file": "", - "line": 369 + "line": 1005 }, "name": "src", "type": { @@ -133991,7 +157121,7 @@ "location": { "column": 56, "file": "", - "line": 369 + "line": 1005 }, "name": "dst_size", "type": { @@ -134032,14 +157162,14 @@ "location": { "column": 8, "file": "", - "line": 367 + "line": 1003 }, "parameters": [ { "location": { "column": 29, "file": "", - "line": 367 + "line": 1003 }, "name": "str", "type": { @@ -134086,14 +157216,14 @@ "location": { "column": 8, "file": "", - "line": 381 + "line": 1017 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 381 + "line": 1017 }, "name": "dst", "type": { @@ -134113,7 +157243,7 @@ "location": { "column": 42, "file": "", - "line": 381 + "line": 1017 }, "name": "src", "type": { @@ -134136,7 +157266,7 @@ "location": { "column": 56, "file": "", - "line": 381 + "line": 1017 }, "name": "src_len", "type": { @@ -134180,14 +157310,14 @@ "location": { "column": 5, "file": "", - "line": 373 + "line": 1009 }, "parameters": [ { "location": { "column": 27, "file": "", - "line": 373 + "line": 1009 }, "name": "s1", "type": { @@ -134210,7 +157340,7 @@ "location": { "column": 44, "file": "", - "line": 373 + "line": 1009 }, "name": "s2", "type": { @@ -134233,7 +157363,7 @@ "location": { "column": 57, "file": "", - "line": 373 + "line": 1009 }, "name": "len", "type": { @@ -134274,14 +157404,14 @@ "location": { "column": 8, "file": "", - "line": 370 + "line": 1006 }, "parameters": [ { "location": { "column": 24, "file": "", - "line": 370 + "line": 1006 }, "name": "dst", "type": { @@ -134301,7 +157431,7 @@ "location": { "column": 42, "file": "", - "line": 370 + "line": 1006 }, "name": "src", "type": { @@ -134324,7 +157454,7 @@ "location": { "column": 56, "file": "", - "line": 370 + "line": 1006 }, "name": "dest_size", "type": { @@ -134368,14 +157498,14 @@ "location": { "column": 8, "file": "", - "line": 379 + "line": 1015 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 379 + "line": 1015 }, "name": "src", "type": { @@ -134398,7 +157528,7 @@ "location": { "column": 44, "file": "", - "line": 379 + "line": 1015 }, "name": "max_len", "type": { @@ -134442,14 +157572,14 @@ "location": { "column": 8, "file": "", - "line": 368 + "line": 1004 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 368 + "line": 1004 }, "name": "str", "type": { @@ -134472,7 +157602,7 @@ "location": { "column": 44, "file": "", - "line": 368 + "line": 1004 }, "name": "max_len", "type": { @@ -134513,14 +157643,14 @@ "location": { "column": 6, "file": "", - "line": 1620 + "line": 1560 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 1620 + "line": 1560 }, "name": "dst", "type": { @@ -134540,7 +157670,7 @@ "location": { "column": 55, "file": "", - "line": 1620 + "line": 1560 }, "name": "src", "type": { @@ -134588,7 +157718,7 @@ "location": { "column": 17, "file": "", - "line": 1628 + "line": 1564 }, "parameters": [], "python_name": "style_get_num_custom_props", @@ -134618,14 +157748,14 @@ "location": { "column": 16, "file": "", - "line": 1631 + "line": 1567 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1631 + "line": 1567 }, "name": "style", "type": { @@ -134648,7 +157778,7 @@ "location": { "column": 76, "file": "", - "line": 1631 + "line": 1567 }, "name": "prop", "type": { @@ -134665,7 +157795,7 @@ "location": { "column": 99, "file": "", - "line": 1631 + "line": 1567 }, "name": "value", "type": { @@ -134712,14 +157842,14 @@ "location": { "column": 24, "file": "", - "line": 1662 + "line": 1572 }, "parameters": [ { "location": { "column": 64, "file": "", - "line": 1662 + "line": 1572 }, "name": "prop", "type": { @@ -134757,21 +157887,21 @@ "circuitpython", "cpython" ], - "c_name": "lv_style_get_prop_inlined", + "c_name": "lv_style_get_prop_internal", "function_specifiers": [ "inline" ], "location": { "column": 30, "file": "", - "line": 1635 + "line": 6473 }, "parameters": [ { "location": { - "column": 73, + "column": 74, "file": "", - "line": 1635 + "line": 6473 }, "name": "style", "type": { @@ -134792,9 +157922,9 @@ }, { "location": { - "column": 98, + "column": 99, "file": "", - "line": 1635 + "line": 6473 }, "name": "prop", "type": { @@ -134809,9 +157939,9 @@ }, { "location": { - "column": 73, + "column": 74, "file": "", - "line": 1636 + "line": 6474 }, "name": "value", "type": { @@ -134828,7 +157958,7 @@ } } ], - "python_name": "get_prop_inlined", + "python_name": "get_prop_internal", "receiver": "style_t", "return_type": { "kind": "identifier", @@ -134858,14 +157988,14 @@ "location": { "column": 6, "file": "", - "line": 1618 + "line": 1558 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 1618 + "line": 1558 }, "name": "style", "type": { @@ -134906,20 +158036,75 @@ "cpython" ], "c_name": "lv_style_is_const", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1562 + }, + "parameters": [ + { + "location": { + "column": 41, + "file": "", + "line": 1562 + }, + "name": "style", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" + } + } + ], + "python_name": "is_const", + "receiver": "style_t", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_style_is_const_internal", "function_specifiers": [ "inline" ], "location": { "column": 20, "file": "", - "line": 1622 + "line": 6468 }, "parameters": [ { "location": { - "column": 55, + "column": 64, "file": "", - "line": 1622 + "line": 6468 }, "name": "style", "type": { @@ -134939,7 +158124,7 @@ } } ], - "python_name": "is_const", + "python_name": "is_const_internal", "receiver": "style_t", "return_type": { "kind": "primitive", @@ -134969,14 +158154,14 @@ "location": { "column": 6, "file": "", - "line": 1661 + "line": 1571 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1661 + "line": 1571 }, "name": "style", "type": { @@ -135024,14 +158209,14 @@ "location": { "column": 6, "file": "", - "line": 1621 + "line": 1561 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 1621 + "line": 1561 }, "name": "dst", "type": { @@ -135051,7 +158236,7 @@ "location": { "column": 56, "file": "", - "line": 1621 + "line": 1561 }, "name": "src", "type": { @@ -135099,14 +158284,14 @@ "location": { "column": 18, "file": "", - "line": 1634 + "line": 1570 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 1634 + "line": 1570 }, "name": "prop", "type": { @@ -135149,14 +158334,14 @@ "location": { "column": 20, "file": "", - "line": 1846 + "line": 1717 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 1846 + "line": 1717 }, "name": "prop", "type": { @@ -135173,7 +158358,7 @@ "location": { "column": 73, "file": "", - "line": 1846 + "line": 1717 }, "name": "flag", "type": { @@ -135216,14 +158401,14 @@ "location": { "column": 9, "file": "", - "line": 1668 + "line": 1578 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 1668 + "line": 1578 }, "name": "prop", "type": { @@ -135264,14 +158449,14 @@ "location": { "column": 17, "file": "", - "line": 1627 + "line": 1563 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1627 + "line": 1563 }, "name": "flag", "type": { @@ -135312,14 +158497,14 @@ "location": { "column": 6, "file": "", - "line": 1629 + "line": 1565 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1629 + "line": 1565 }, "name": "style", "type": { @@ -135339,7 +158524,7 @@ "location": { "column": 63, "file": "", - "line": 1629 + "line": 1565 }, "name": "prop", "type": { @@ -135381,14 +158566,14 @@ "location": { "column": 6, "file": "", - "line": 1619 + "line": 1559 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 1619 + "line": 1559 }, "name": "style", "type": { @@ -135433,14 +158618,14 @@ "location": { "column": 6, "file": "", - "line": 1678 + "line": 1588 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 1678 + "line": 1588 }, "name": "style", "type": { @@ -135460,7 +158645,7 @@ "location": { "column": 56, "file": "", - "line": 1678 + "line": 1588 }, "name": "value", "type": { @@ -135502,14 +158687,14 @@ "location": { "column": 6, "file": "", - "line": 1774 + "line": 1685 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 1774 + "line": 1685 }, "name": "style", "type": { @@ -135529,7 +158714,7 @@ "location": { "column": 60, "file": "", - "line": 1774 + "line": 1685 }, "name": "value", "type": { @@ -135577,14 +158762,14 @@ "location": { "column": 6, "file": "", - "line": 1775 + "line": 1686 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1775 + "line": 1686 }, "name": "style", "type": { @@ -135604,7 +158789,7 @@ "location": { "column": 62, "file": "", - "line": 1775 + "line": 1686 }, "name": "value", "type": { @@ -135646,14 +158831,14 @@ "location": { "column": 6, "file": "", - "line": 1743 + "line": 1653 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1743 + "line": 1653 }, "name": "style", "type": { @@ -135673,7 +158858,7 @@ "location": { "column": 60, "file": "", - "line": 1743 + "line": 1653 }, "name": "value", "type": { @@ -135715,14 +158900,14 @@ "location": { "column": 6, "file": "", - "line": 1745 + "line": 1655 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1745 + "line": 1655 }, "name": "style", "type": { @@ -135742,7 +158927,7 @@ "location": { "column": 64, "file": "", - "line": 1745 + "line": 1655 }, "name": "value", "type": { @@ -135790,14 +158975,14 @@ "location": { "column": 6, "file": "", - "line": 1744 + "line": 1654 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1744 + "line": 1654 }, "name": "style", "type": { @@ -135817,7 +159002,7 @@ "location": { "column": 56, "file": "", - "line": 1744 + "line": 1654 }, "name": "value", "type": { @@ -135859,14 +159044,14 @@ "location": { "column": 6, "file": "", - "line": 1742 + "line": 1652 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1742 + "line": 1652 }, "name": "style", "type": { @@ -135886,7 +159071,7 @@ "location": { "column": 56, "file": "", - "line": 1742 + "line": 1652 }, "name": "value", "type": { @@ -135928,14 +159113,14 @@ "location": { "column": 6, "file": "", - "line": 1741 + "line": 1651 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1741 + "line": 1651 }, "name": "style", "type": { @@ -135955,7 +159140,7 @@ "location": { "column": 57, "file": "", - "line": 1741 + "line": 1651 }, "name": "value", "type": { @@ -135997,14 +159182,14 @@ "location": { "column": 6, "file": "", - "line": 1779 + "line": 1690 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1779 + "line": 1690 }, "name": "style", "type": { @@ -136024,7 +159209,7 @@ "location": { "column": 62, "file": "", - "line": 1779 + "line": 1690 }, "name": "value", "type": { @@ -136066,14 +159251,14 @@ "location": { "column": 6, "file": "", - "line": 1702 + "line": 1612 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1702 + "line": 1612 }, "name": "style", "type": { @@ -136093,7 +159278,7 @@ "location": { "column": 59, "file": "", - "line": 1702 + "line": 1612 }, "name": "value", "type": { @@ -136135,14 +159320,14 @@ "location": { "column": 6, "file": "", - "line": 1710 + "line": 1620 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1710 + "line": 1620 }, "name": "style", "type": { @@ -136162,7 +159347,7 @@ "location": { "column": 67, "file": "", - "line": 1710 + "line": 1620 }, "name": "value", "type": { @@ -136210,14 +159395,14 @@ "location": { "column": 6, "file": "", - "line": 1704 + "line": 1614 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1704 + "line": 1614 }, "name": "style", "type": { @@ -136237,7 +159422,7 @@ "location": { "column": 64, "file": "", - "line": 1704 + "line": 1614 }, "name": "value", "type": { @@ -136279,14 +159464,14 @@ "location": { "column": 6, "file": "", - "line": 1705 + "line": 1615 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1705 + "line": 1615 }, "name": "style", "type": { @@ -136306,7 +159491,7 @@ "location": { "column": 65, "file": "", - "line": 1705 + "line": 1615 }, "name": "value", "type": { @@ -136348,14 +159533,14 @@ "location": { "column": 6, "file": "", - "line": 1709 + "line": 1619 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1709 + "line": 1619 }, "name": "style", "type": { @@ -136375,7 +159560,7 @@ "location": { "column": 60, "file": "", - "line": 1709 + "line": 1619 }, "name": "value", "type": { @@ -136417,14 +159602,14 @@ "location": { "column": 6, "file": "", - "line": 1707 + "line": 1617 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1707 + "line": 1617 }, "name": "style", "type": { @@ -136444,7 +159629,7 @@ "location": { "column": 60, "file": "", - "line": 1707 + "line": 1617 }, "name": "value", "type": { @@ -136486,14 +159671,14 @@ "location": { "column": 6, "file": "", - "line": 1712 + "line": 1622 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1712 + "line": 1622 }, "name": "style", "type": { @@ -136513,7 +159698,7 @@ "location": { "column": 61, "file": "", - "line": 1712 + "line": 1622 }, "name": "value", "type": { @@ -136555,14 +159740,14 @@ "location": { "column": 6, "file": "", - "line": 1713 + "line": 1623 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1713 + "line": 1623 }, "name": "style", "type": { @@ -136582,7 +159767,7 @@ "location": { "column": 67, "file": "", - "line": 1713 + "line": 1623 }, "name": "value", "type": { @@ -136624,14 +159809,14 @@ "location": { "column": 6, "file": "", - "line": 1714 + "line": 1624 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1714 + "line": 1624 }, "name": "style", "type": { @@ -136651,7 +159836,7 @@ "location": { "column": 69, "file": "", - "line": 1714 + "line": 1624 }, "name": "value", "type": { @@ -136693,14 +159878,14 @@ "location": { "column": 6, "file": "", - "line": 1711 + "line": 1621 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1711 + "line": 1621 }, "name": "style", "type": { @@ -136720,7 +159905,7 @@ "location": { "column": 63, "file": "", - "line": 1711 + "line": 1621 }, "name": "value", "type": { @@ -136768,14 +159953,14 @@ "location": { "column": 6, "file": "", - "line": 1715 + "line": 1625 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1715 + "line": 1625 }, "name": "style", "type": { @@ -136795,7 +159980,7 @@ "location": { "column": 59, "file": "", - "line": 1715 + "line": 1625 }, "name": "value", "type": { @@ -136837,14 +160022,14 @@ "location": { "column": 6, "file": "", - "line": 1708 + "line": 1618 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1708 + "line": 1618 }, "name": "style", "type": { @@ -136864,7 +160049,7 @@ "location": { "column": 60, "file": "", - "line": 1708 + "line": 1618 }, "name": "value", "type": { @@ -136906,14 +160091,14 @@ "location": { "column": 6, "file": "", - "line": 1706 + "line": 1616 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1706 + "line": 1616 }, "name": "style", "type": { @@ -136933,7 +160118,7 @@ "location": { "column": 60, "file": "", - "line": 1706 + "line": 1616 }, "name": "value", "type": { @@ -136975,14 +160160,14 @@ "location": { "column": 6, "file": "", - "line": 1703 + "line": 1613 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 1703 + "line": 1613 }, "name": "style", "type": { @@ -137002,7 +160187,7 @@ "location": { "column": 55, "file": "", - "line": 1703 + "line": 1613 }, "name": "value", "type": { @@ -137044,14 +160229,14 @@ "location": { "column": 6, "file": "", - "line": 1780 + "line": 1691 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1780 + "line": 1691 }, "name": "style", "type": { @@ -137071,7 +160256,7 @@ "location": { "column": 66, "file": "", - "line": 1780 + "line": 1691 }, "name": "value", "type": { @@ -137119,14 +160304,14 @@ "location": { "column": 6, "file": "", - "line": 1777 + "line": 1688 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1777 + "line": 1688 }, "name": "style", "type": { @@ -137146,7 +160331,7 @@ "location": { "column": 66, "file": "", - "line": 1777 + "line": 1688 }, "name": "value", "type": { @@ -137188,14 +160373,14 @@ "location": { "column": 6, "file": "", - "line": 1757 + "line": 1668 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1757 + "line": 1668 }, "name": "style", "type": { @@ -137215,7 +160400,7 @@ "location": { "column": 58, "file": "", - "line": 1757 + "line": 1668 }, "name": "value", "type": { @@ -137257,14 +160442,14 @@ "location": { "column": 6, "file": "", - "line": 1758 + "line": 1669 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1758 + "line": 1669 }, "name": "style", "type": { @@ -137284,7 +160469,7 @@ "location": { "column": 70, "file": "", - "line": 1758 + "line": 1669 }, "name": "value", "type": { @@ -137326,14 +160511,14 @@ "location": { "column": 6, "file": "", - "line": 1756 + "line": 1667 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1756 + "line": 1667 }, "name": "style", "type": { @@ -137353,7 +160538,7 @@ "location": { "column": 59, "file": "", - "line": 1756 + "line": 1667 }, "name": "value", "type": { @@ -137395,14 +160580,14 @@ "location": { "column": 6, "file": "", - "line": 1716 + "line": 1626 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1716 + "line": 1626 }, "name": "style", "type": { @@ -137422,7 +160607,7 @@ "location": { "column": 63, "file": "", - "line": 1716 + "line": 1626 }, "name": "value", "type": { @@ -137464,14 +160649,14 @@ "location": { "column": 6, "file": "", - "line": 1717 + "line": 1627 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1717 + "line": 1627 }, "name": "style", "type": { @@ -137491,7 +160676,7 @@ "location": { "column": 59, "file": "", - "line": 1717 + "line": 1627 }, "name": "value", "type": { @@ -137533,14 +160718,14 @@ "location": { "column": 6, "file": "", - "line": 1720 + "line": 1630 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1720 + "line": 1630 }, "name": "style", "type": { @@ -137560,7 +160745,7 @@ "location": { "column": 56, "file": "", - "line": 1720 + "line": 1630 }, "name": "value", "type": { @@ -137602,14 +160787,14 @@ "location": { "column": 6, "file": "", - "line": 1719 + "line": 1629 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1719 + "line": 1629 }, "name": "style", "type": { @@ -137629,7 +160814,7 @@ "location": { "column": 68, "file": "", - "line": 1719 + "line": 1629 }, "name": "value", "type": { @@ -137671,14 +160856,14 @@ "location": { "column": 6, "file": "", - "line": 1718 + "line": 1628 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1718 + "line": 1628 }, "name": "style", "type": { @@ -137698,7 +160883,7 @@ "location": { "column": 60, "file": "", - "line": 1718 + "line": 1628 }, "name": "value", "type": { @@ -137740,14 +160925,14 @@ "location": { "column": 6, "file": "", - "line": 1767 + "line": 1678 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1767 + "line": 1678 }, "name": "style", "type": { @@ -137767,7 +160952,7 @@ "location": { "column": 56, "file": "", - "line": 1767 + "line": 1678 }, "name": "value", "type": { @@ -137809,14 +160994,14 @@ "location": { "column": 6, "file": "", - "line": 1770 + "line": 1681 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1770 + "line": 1681 }, "name": "style", "type": { @@ -137836,7 +161021,7 @@ "location": { "column": 84, "file": "", - "line": 1770 + "line": 1681 }, "name": "value", "type": { @@ -137884,14 +161069,14 @@ "location": { "column": 6, "file": "", - "line": 1771 + "line": 1682 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1771 + "line": 1682 }, "name": "style", "type": { @@ -137911,7 +161096,7 @@ "location": { "column": 65, "file": "", - "line": 1771 + "line": 1682 }, "name": "value", "type": { @@ -137953,14 +161138,14 @@ "location": { "column": 6, "file": "", - "line": 1762 + "line": 1673 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1762 + "line": 1673 }, "name": "style", "type": { @@ -137980,7 +161165,7 @@ "location": { "column": 68, "file": "", - "line": 1762 + "line": 1673 }, "name": "value", "type": { @@ -138022,14 +161207,14 @@ "location": { "column": 6, "file": "", - "line": 1760 + "line": 1671 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1760 + "line": 1671 }, "name": "style", "type": { @@ -138049,7 +161234,7 @@ "location": { "column": 68, "file": "", - "line": 1760 + "line": 1671 }, "name": "value", "type": { @@ -138091,14 +161276,14 @@ "location": { "column": 6, "file": "", - "line": 1761 + "line": 1672 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1761 + "line": 1672 }, "name": "style", "type": { @@ -138118,7 +161303,7 @@ "location": { "column": 68, "file": "", - "line": 1761 + "line": 1672 }, "name": "value", "type": { @@ -138160,14 +161345,14 @@ "location": { "column": 6, "file": "", - "line": 1763 + "line": 1674 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1763 + "line": 1674 }, "name": "style", "type": { @@ -138187,7 +161372,7 @@ "location": { "column": 64, "file": "", - "line": 1763 + "line": 1674 }, "name": "value", "type": { @@ -138229,14 +161414,14 @@ "location": { "column": 6, "file": "", - "line": 1764 + "line": 1675 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1764 + "line": 1675 }, "name": "style", "type": { @@ -138256,7 +161441,7 @@ "location": { "column": 77, "file": "", - "line": 1764 + "line": 1675 }, "name": "value", "type": { @@ -138298,14 +161483,14 @@ "location": { "column": 6, "file": "", - "line": 1759 + "line": 1670 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1759 + "line": 1670 }, "name": "style", "type": { @@ -138325,7 +161510,7 @@ "location": { "column": 66, "file": "", - "line": 1759 + "line": 1670 }, "name": "value", "type": { @@ -138367,14 +161552,14 @@ "location": { "column": 6, "file": "", - "line": 1784 + "line": 1695 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1784 + "line": 1695 }, "name": "style", "type": { @@ -138394,7 +161579,7 @@ "location": { "column": 72, "file": "", - "line": 1784 + "line": 1695 }, "name": "value", "type": { @@ -138436,14 +161621,14 @@ "location": { "column": 6, "file": "", - "line": 1782 + "line": 1693 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1782 + "line": 1693 }, "name": "style", "type": { @@ -138463,7 +161648,7 @@ "location": { "column": 64, "file": "", - "line": 1782 + "line": 1693 }, "name": "value", "type": { @@ -138505,14 +161690,14 @@ "location": { "column": 6, "file": "", - "line": 1786 + "line": 1697 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1786 + "line": 1697 }, "name": "style", "type": { @@ -138532,7 +161717,7 @@ "location": { "column": 57, "file": "", - "line": 1786 + "line": 1697 }, "name": "value", "type": { @@ -138574,14 +161759,14 @@ "location": { "column": 6, "file": "", - "line": 1783 + "line": 1694 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1783 + "line": 1694 }, "name": "style", "type": { @@ -138601,7 +161786,7 @@ "location": { "column": 71, "file": "", - "line": 1783 + "line": 1694 }, "name": "value", "type": { @@ -138643,14 +161828,14 @@ "location": { "column": 6, "file": "", - "line": 1785 + "line": 1696 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1785 + "line": 1696 }, "name": "style", "type": { @@ -138670,7 +161855,7 @@ "location": { "column": 72, "file": "", - "line": 1785 + "line": 1696 }, "name": "value", "type": { @@ -138712,14 +161897,14 @@ "location": { "column": 6, "file": "", - "line": 1791 + "line": 1702 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 1791 + "line": 1702 }, "name": "style", "type": { @@ -138739,7 +161924,7 @@ "location": { "column": 68, "file": "", - "line": 1791 + "line": 1702 }, "name": "value", "type": { @@ -138781,14 +161966,14 @@ "location": { "column": 6, "file": "", - "line": 1793 + "line": 1704 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 1793 + "line": 1704 }, "name": "style", "type": { @@ -138808,7 +161993,7 @@ "location": { "column": 69, "file": "", - "line": 1793 + "line": 1704 }, "name": "value", "type": { @@ -138850,14 +162035,14 @@ "location": { "column": 6, "file": "", - "line": 1794 + "line": 1705 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1794 + "line": 1705 }, "name": "style", "type": { @@ -138877,7 +162062,7 @@ "location": { "column": 65, "file": "", - "line": 1794 + "line": 1705 }, "name": "value", "type": { @@ -138919,14 +162104,14 @@ "location": { "column": 6, "file": "", - "line": 1796 + "line": 1707 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1796 + "line": 1707 }, "name": "style", "type": { @@ -138946,7 +162131,7 @@ "location": { "column": 66, "file": "", - "line": 1796 + "line": 1707 }, "name": "value", "type": { @@ -138988,14 +162173,14 @@ "location": { "column": 6, "file": "", - "line": 1792 + "line": 1703 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1792 + "line": 1703 }, "name": "style", "type": { @@ -139015,7 +162200,7 @@ "location": { "column": 73, "file": "", - "line": 1792 + "line": 1703 }, "name": "value", "type": { @@ -139057,14 +162242,14 @@ "location": { "column": 6, "file": "", - "line": 1795 + "line": 1706 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1795 + "line": 1706 }, "name": "style", "type": { @@ -139084,7 +162269,7 @@ "location": { "column": 73, "file": "", - "line": 1795 + "line": 1706 }, "name": "value", "type": { @@ -139126,14 +162311,14 @@ "location": { "column": 6, "file": "", - "line": 1788 + "line": 1699 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1788 + "line": 1699 }, "name": "style", "type": { @@ -139153,7 +162338,7 @@ "location": { "column": 73, "file": "", - "line": 1788 + "line": 1699 }, "name": "value", "type": { @@ -139195,14 +162380,14 @@ "location": { "column": 6, "file": "", - "line": 1787 + "line": 1698 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 1787 + "line": 1698 }, "name": "style", "type": { @@ -139222,7 +162407,7 @@ "location": { "column": 75, "file": "", - "line": 1787 + "line": 1698 }, "name": "value", "type": { @@ -139270,14 +162455,14 @@ "location": { "column": 6, "file": "", - "line": 1790 + "line": 1701 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1790 + "line": 1701 }, "name": "style", "type": { @@ -139297,7 +162482,7 @@ "location": { "column": 70, "file": "", - "line": 1790 + "line": 1701 }, "name": "value", "type": { @@ -139339,14 +162524,14 @@ "location": { "column": 6, "file": "", - "line": 1789 + "line": 1700 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1789 + "line": 1700 }, "name": "style", "type": { @@ -139366,7 +162551,7 @@ "location": { "column": 72, "file": "", - "line": 1789 + "line": 1700 }, "name": "value", "type": { @@ -139414,14 +162599,14 @@ "location": { "column": 6, "file": "", - "line": 1672 + "line": 1582 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 1672 + "line": 1582 }, "name": "style", "type": { @@ -139441,7 +162626,7 @@ "location": { "column": 54, "file": "", - "line": 1672 + "line": 1582 }, "name": "value", "type": { @@ -139483,14 +162668,14 @@ "location": { "column": 6, "file": "", - "line": 1734 + "line": 1644 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 1734 + "line": 1644 }, "name": "style", "type": { @@ -139510,7 +162695,7 @@ "location": { "column": 80, "file": "", - "line": 1734 + "line": 1644 }, "name": "value", "type": { @@ -139558,14 +162743,14 @@ "location": { "column": 6, "file": "", - "line": 1731 + "line": 1641 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1731 + "line": 1641 }, "name": "style", "type": { @@ -139585,7 +162770,7 @@ "location": { "column": 58, "file": "", - "line": 1731 + "line": 1641 }, "name": "value", "type": { @@ -139627,14 +162812,14 @@ "location": { "column": 6, "file": "", - "line": 1732 + "line": 1642 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1732 + "line": 1642 }, "name": "style", "type": { @@ -139654,7 +162839,7 @@ "location": { "column": 64, "file": "", - "line": 1732 + "line": 1642 }, "name": "value", "type": { @@ -139696,14 +162881,14 @@ "location": { "column": 6, "file": "", - "line": 1733 + "line": 1643 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1733 + "line": 1643 }, "name": "style", "type": { @@ -139723,7 +162908,7 @@ "location": { "column": 66, "file": "", - "line": 1733 + "line": 1643 }, "name": "value", "type": { @@ -139765,14 +162950,14 @@ "location": { "column": 6, "file": "", - "line": 1778 + "line": 1689 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 1778 + "line": 1689 }, "name": "style", "type": { @@ -139792,7 +162977,7 @@ "location": { "column": 55, "file": "", - "line": 1778 + "line": 1689 }, "name": "value", "type": { @@ -139834,14 +163019,14 @@ "location": { "column": 6, "file": "", - "line": 1675 + "line": 1585 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 1675 + "line": 1585 }, "name": "style", "type": { @@ -139861,7 +163046,7 @@ "location": { "column": 54, "file": "", - "line": 1675 + "line": 1585 }, "name": "value", "type": { @@ -139903,14 +163088,14 @@ "location": { "column": 6, "file": "", - "line": 1739 + "line": 1649 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1739 + "line": 1649 }, "name": "style", "type": { @@ -139930,7 +163115,7 @@ "location": { "column": 61, "file": "", - "line": 1739 + "line": 1649 }, "name": "value", "type": { @@ -139972,14 +163157,14 @@ "location": { "column": 6, "file": "", - "line": 1737 + "line": 1647 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1737 + "line": 1647 }, "name": "style", "type": { @@ -139999,7 +163184,7 @@ "location": { "column": 61, "file": "", - "line": 1737 + "line": 1647 }, "name": "value", "type": { @@ -140041,14 +163226,14 @@ "location": { "column": 6, "file": "", - "line": 1736 + "line": 1646 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1736 + "line": 1646 }, "name": "style", "type": { @@ -140068,7 +163253,7 @@ "location": { "column": 63, "file": "", - "line": 1736 + "line": 1646 }, "name": "value", "type": { @@ -140110,14 +163295,14 @@ "location": { "column": 6, "file": "", - "line": 1740 + "line": 1650 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1740 + "line": 1650 }, "name": "style", "type": { @@ -140137,7 +163322,7 @@ "location": { "column": 57, "file": "", - "line": 1740 + "line": 1650 }, "name": "value", "type": { @@ -140179,14 +163364,14 @@ "location": { "column": 6, "file": "", - "line": 1738 + "line": 1648 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1738 + "line": 1648 }, "name": "style", "type": { @@ -140206,7 +163391,7 @@ "location": { "column": 57, "file": "", - "line": 1738 + "line": 1648 }, "name": "value", "type": { @@ -140248,14 +163433,14 @@ "location": { "column": 6, "file": "", - "line": 1735 + "line": 1645 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1735 + "line": 1645 }, "name": "style", "type": { @@ -140275,7 +163460,7 @@ "location": { "column": 58, "file": "", - "line": 1735 + "line": 1645 }, "name": "value", "type": { @@ -140313,20 +163498,18 @@ "cpython" ], "c_name": "lv_style_set_margin_all", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1834 + "line": 1715 }, "parameters": [ { "location": { - "column": 55, + "column": 41, "file": "", - "line": 1834 + "line": 1715 }, "name": "style", "type": { @@ -140344,9 +163527,9 @@ }, { "location": { - "column": 72, + "column": 58, "file": "", - "line": 1834 + "line": 1715 }, "name": "value", "type": { @@ -140373,9 +163556,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -140390,14 +163571,14 @@ "location": { "column": 6, "file": "", - "line": 1699 + "line": 1609 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1699 + "line": 1609 }, "name": "style", "type": { @@ -140417,7 +163598,7 @@ "location": { "column": 61, "file": "", - "line": 1699 + "line": 1609 }, "name": "value", "type": { @@ -140455,20 +163636,18 @@ "cpython" ], "c_name": "lv_style_set_margin_hor", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1824 + "line": 1713 }, "parameters": [ { "location": { - "column": 55, + "column": 41, "file": "", - "line": 1824 + "line": 1713 }, "name": "style", "type": { @@ -140486,9 +163665,9 @@ }, { "location": { - "column": 72, + "column": 58, "file": "", - "line": 1824 + "line": 1713 }, "name": "value", "type": { @@ -140515,9 +163694,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -140532,14 +163709,14 @@ "location": { "column": 6, "file": "", - "line": 1700 + "line": 1610 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1700 + "line": 1610 }, "name": "style", "type": { @@ -140559,7 +163736,7 @@ "location": { "column": 59, "file": "", - "line": 1700 + "line": 1610 }, "name": "value", "type": { @@ -140601,14 +163778,14 @@ "location": { "column": 6, "file": "", - "line": 1701 + "line": 1611 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1701 + "line": 1611 }, "name": "style", "type": { @@ -140628,7 +163805,7 @@ "location": { "column": 60, "file": "", - "line": 1701 + "line": 1611 }, "name": "value", "type": { @@ -140670,14 +163847,14 @@ "location": { "column": 6, "file": "", - "line": 1698 + "line": 1608 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1698 + "line": 1608 }, "name": "style", "type": { @@ -140697,7 +163874,7 @@ "location": { "column": 58, "file": "", - "line": 1698 + "line": 1608 }, "name": "value", "type": { @@ -140735,20 +163912,18 @@ "cpython" ], "c_name": "lv_style_set_margin_ver", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1829 + "line": 1714 }, "parameters": [ { "location": { - "column": 55, + "column": 41, "file": "", - "line": 1829 + "line": 1714 }, "name": "style", "type": { @@ -140766,9 +163941,9 @@ }, { "location": { - "column": 72, + "column": 58, "file": "", - "line": 1829 + "line": 1714 }, "name": "value", "type": { @@ -140795,9 +163970,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -140812,14 +163985,14 @@ "location": { "column": 6, "file": "", - "line": 1674 + "line": 1584 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1674 + "line": 1584 }, "name": "style", "type": { @@ -140839,7 +164012,7 @@ "location": { "column": 58, "file": "", - "line": 1674 + "line": 1584 }, "name": "value", "type": { @@ -140881,14 +164054,14 @@ "location": { "column": 6, "file": "", - "line": 1671 + "line": 1581 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1671 + "line": 1581 }, "name": "style", "type": { @@ -140908,7 +164081,7 @@ "location": { "column": 57, "file": "", - "line": 1671 + "line": 1581 }, "name": "value", "type": { @@ -140950,14 +164123,14 @@ "location": { "column": 6, "file": "", - "line": 1673 + "line": 1583 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1673 + "line": 1583 }, "name": "style", "type": { @@ -140977,7 +164150,7 @@ "location": { "column": 58, "file": "", - "line": 1673 + "line": 1583 }, "name": "value", "type": { @@ -141019,14 +164192,14 @@ "location": { "column": 6, "file": "", - "line": 1670 + "line": 1580 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1670 + "line": 1580 }, "name": "style", "type": { @@ -141046,7 +164219,7 @@ "location": { "column": 57, "file": "", - "line": 1670 + "line": 1580 }, "name": "value", "type": { @@ -141088,14 +164261,14 @@ "location": { "column": 6, "file": "", - "line": 1768 + "line": 1679 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 1768 + "line": 1679 }, "name": "style", "type": { @@ -141115,7 +164288,7 @@ "location": { "column": 52, "file": "", - "line": 1768 + "line": 1679 }, "name": "value", "type": { @@ -141157,14 +164330,14 @@ "location": { "column": 6, "file": "", - "line": 1769 + "line": 1680 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1769 + "line": 1680 }, "name": "style", "type": { @@ -141184,7 +164357,7 @@ "location": { "column": 60, "file": "", - "line": 1769 + "line": 1680 }, "name": "value", "type": { @@ -141226,14 +164399,14 @@ "location": { "column": 6, "file": "", - "line": 1722 + "line": 1632 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1722 + "line": 1632 }, "name": "style", "type": { @@ -141253,7 +164426,7 @@ "location": { "column": 64, "file": "", - "line": 1722 + "line": 1632 }, "name": "value", "type": { @@ -141295,14 +164468,14 @@ "location": { "column": 6, "file": "", - "line": 1723 + "line": 1633 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1723 + "line": 1633 }, "name": "style", "type": { @@ -141322,7 +164495,7 @@ "location": { "column": 60, "file": "", - "line": 1723 + "line": 1633 }, "name": "value", "type": { @@ -141364,14 +164537,14 @@ "location": { "column": 6, "file": "", - "line": 1724 + "line": 1634 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1724 + "line": 1634 }, "name": "style", "type": { @@ -141391,7 +164564,7 @@ "location": { "column": 59, "file": "", - "line": 1724 + "line": 1634 }, "name": "value", "type": { @@ -141433,14 +164606,14 @@ "location": { "column": 6, "file": "", - "line": 1721 + "line": 1631 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1721 + "line": 1631 }, "name": "style", "type": { @@ -141460,7 +164633,7 @@ "location": { "column": 61, "file": "", - "line": 1721 + "line": 1631 }, "name": "value", "type": { @@ -141498,20 +164671,18 @@ "cpython" ], "c_name": "lv_style_set_pad_all", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1802 + "line": 1709 }, "parameters": [ { "location": { - "column": 52, + "column": 38, "file": "", - "line": 1802 + "line": 1709 }, "name": "style", "type": { @@ -141529,9 +164700,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 1802 + "line": 1709 }, "name": "value", "type": { @@ -141558,9 +164729,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -141575,14 +164744,14 @@ "location": { "column": 6, "file": "", - "line": 1692 + "line": 1602 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1692 + "line": 1602 }, "name": "style", "type": { @@ -141602,7 +164771,7 @@ "location": { "column": 58, "file": "", - "line": 1692 + "line": 1602 }, "name": "value", "type": { @@ -141644,14 +164813,14 @@ "location": { "column": 6, "file": "", - "line": 1696 + "line": 1606 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1696 + "line": 1606 }, "name": "style", "type": { @@ -141671,7 +164840,7 @@ "location": { "column": 58, "file": "", - "line": 1696 + "line": 1606 }, "name": "value", "type": { @@ -141709,20 +164878,18 @@ "cpython" ], "c_name": "lv_style_set_pad_gap", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1819 + "line": 1712 }, "parameters": [ { "location": { - "column": 52, + "column": 38, "file": "", - "line": 1819 + "line": 1712 }, "name": "style", "type": { @@ -141740,9 +164907,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 1819 + "line": 1712 }, "name": "value", "type": { @@ -141769,9 +164936,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -141782,20 +164947,18 @@ "cpython" ], "c_name": "lv_style_set_pad_hor", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1809 + "line": 1710 }, "parameters": [ { "location": { - "column": 52, + "column": 38, "file": "", - "line": 1809 + "line": 1710 }, "name": "style", "type": { @@ -141813,9 +164976,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 1809 + "line": 1710 }, "name": "value", "type": { @@ -141842,9 +165005,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -141859,14 +165020,14 @@ "location": { "column": 6, "file": "", - "line": 1693 + "line": 1603 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1693 + "line": 1603 }, "name": "style", "type": { @@ -141886,7 +165047,7 @@ "location": { "column": 56, "file": "", - "line": 1693 + "line": 1603 }, "name": "value", "type": { @@ -141928,14 +165089,14 @@ "location": { "column": 6, "file": "", - "line": 1697 + "line": 1607 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1697 + "line": 1607 }, "name": "style", "type": { @@ -141955,7 +165116,7 @@ "location": { "column": 58, "file": "", - "line": 1697 + "line": 1607 }, "name": "value", "type": { @@ -141997,14 +165158,14 @@ "location": { "column": 6, "file": "", - "line": 1694 + "line": 1604 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1694 + "line": 1604 }, "name": "style", "type": { @@ -142024,7 +165185,7 @@ "location": { "column": 57, "file": "", - "line": 1694 + "line": 1604 }, "name": "value", "type": { @@ -142066,14 +165227,14 @@ "location": { "column": 6, "file": "", - "line": 1695 + "line": 1605 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1695 + "line": 1605 }, "name": "style", "type": { @@ -142093,7 +165254,7 @@ "location": { "column": 55, "file": "", - "line": 1695 + "line": 1605 }, "name": "value", "type": { @@ -142135,14 +165296,14 @@ "location": { "column": 6, "file": "", - "line": 1691 + "line": 1601 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1691 + "line": 1601 }, "name": "style", "type": { @@ -142162,7 +165323,7 @@ "location": { "column": 55, "file": "", - "line": 1691 + "line": 1601 }, "name": "value", "type": { @@ -142200,20 +165361,18 @@ "cpython" ], "c_name": "lv_style_set_pad_ver", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1814 + "line": 1711 }, "parameters": [ { "location": { - "column": 52, + "column": 38, "file": "", - "line": 1814 + "line": 1711 }, "name": "style", "type": { @@ -142231,9 +165390,9 @@ }, { "location": { - "column": 69, + "column": 55, "file": "", - "line": 1814 + "line": 1711 }, "name": "value", "type": { @@ -142260,9 +165419,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -142277,14 +165434,14 @@ "location": { "column": 6, "file": "", - "line": 1630 + "line": 1566 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 1630 + "line": 1566 }, "name": "style", "type": { @@ -142304,7 +165461,7 @@ "location": { "column": 60, "file": "", - "line": 1630 + "line": 1566 }, "name": "prop", "type": { @@ -142321,7 +165478,7 @@ "location": { "column": 83, "file": "", - "line": 1630 + "line": 1566 }, "name": "value", "type": { @@ -142363,14 +165520,14 @@ "location": { "column": 6, "file": "", - "line": 1766 + "line": 1677 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1766 + "line": 1677 }, "name": "style", "type": { @@ -142390,7 +165547,7 @@ "location": { "column": 61, "file": "", - "line": 1766 + "line": 1677 }, "name": "value", "type": { @@ -142432,14 +165589,14 @@ "location": { "column": 6, "file": "", - "line": 1765 + "line": 1676 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 1765 + "line": 1676 }, "name": "style", "type": { @@ -142459,7 +165616,7 @@ "location": { "column": 54, "file": "", - "line": 1765 + "line": 1676 }, "name": "value", "type": { @@ -142501,14 +165658,14 @@ "location": { "column": 6, "file": "", - "line": 1772 + "line": 1683 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 1772 + "line": 1683 }, "name": "style", "type": { @@ -142528,7 +165685,7 @@ "location": { "column": 58, "file": "", - "line": 1772 + "line": 1683 }, "name": "value", "type": { @@ -142570,14 +165727,14 @@ "location": { "column": 6, "file": "", - "line": 1773 + "line": 1684 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1773 + "line": 1684 }, "name": "style", "type": { @@ -142597,7 +165754,7 @@ "location": { "column": 60, "file": "", - "line": 1773 + "line": 1684 }, "name": "value", "type": { @@ -142639,14 +165796,14 @@ "location": { "column": 6, "file": "", - "line": 1781 + "line": 1692 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1781 + "line": 1692 }, "name": "style", "type": { @@ -142666,7 +165823,7 @@ "location": { "column": 67, "file": "", - "line": 1781 + "line": 1692 }, "name": "value", "type": { @@ -142708,14 +165865,14 @@ "location": { "column": 6, "file": "", - "line": 1729 + "line": 1639 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1729 + "line": 1639 }, "name": "style", "type": { @@ -142735,7 +165892,7 @@ "location": { "column": 63, "file": "", - "line": 1729 + "line": 1639 }, "name": "value", "type": { @@ -142777,14 +165934,14 @@ "location": { "column": 6, "file": "", - "line": 1726 + "line": 1636 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1726 + "line": 1636 }, "name": "style", "type": { @@ -142804,7 +165961,7 @@ "location": { "column": 63, "file": "", - "line": 1726 + "line": 1636 }, "name": "value", "type": { @@ -142846,14 +166003,14 @@ "location": { "column": 6, "file": "", - "line": 1727 + "line": 1637 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1727 + "line": 1637 }, "name": "style", "type": { @@ -142873,7 +166030,7 @@ "location": { "column": 63, "file": "", - "line": 1727 + "line": 1637 }, "name": "value", "type": { @@ -142915,14 +166072,14 @@ "location": { "column": 6, "file": "", - "line": 1730 + "line": 1640 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1730 + "line": 1640 }, "name": "style", "type": { @@ -142942,7 +166099,7 @@ "location": { "column": 59, "file": "", - "line": 1730 + "line": 1640 }, "name": "value", "type": { @@ -142984,14 +166141,14 @@ "location": { "column": 6, "file": "", - "line": 1728 + "line": 1638 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 1728 + "line": 1638 }, "name": "style", "type": { @@ -143011,7 +166168,7 @@ "location": { "column": 61, "file": "", - "line": 1728 + "line": 1638 }, "name": "value", "type": { @@ -143053,14 +166210,14 @@ "location": { "column": 6, "file": "", - "line": 1725 + "line": 1635 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 1725 + "line": 1635 }, "name": "style", "type": { @@ -143080,7 +166237,7 @@ "location": { "column": 60, "file": "", - "line": 1725 + "line": 1635 }, "name": "value", "type": { @@ -143118,20 +166275,18 @@ "cpython" ], "c_name": "lv_style_set_size", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1797 + "line": 1708 }, "parameters": [ { "location": { - "column": 49, + "column": 35, "file": "", - "line": 1797 + "line": 1708 }, "name": "style", "type": { @@ -143149,9 +166304,9 @@ }, { "location": { - "column": 66, + "column": 52, "file": "", - "line": 1797 + "line": 1708 }, "name": "width", "type": { @@ -143166,9 +166321,9 @@ }, { "location": { - "column": 81, + "column": 67, "file": "", - "line": 1797 + "line": 1708 }, "name": "height", "type": { @@ -143195,9 +166350,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -143212,14 +166365,14 @@ "location": { "column": 6, "file": "", - "line": 1752 + "line": 1662 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1752 + "line": 1662 }, "name": "style", "type": { @@ -143239,7 +166392,7 @@ "location": { "column": 66, "file": "", - "line": 1752 + "line": 1662 }, "name": "value", "type": { @@ -143281,14 +166434,14 @@ "location": { "column": 6, "file": "", - "line": 1746 + "line": 1656 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1746 + "line": 1656 }, "name": "style", "type": { @@ -143308,7 +166461,7 @@ "location": { "column": 61, "file": "", - "line": 1746 + "line": 1656 }, "name": "value", "type": { @@ -143350,14 +166503,14 @@ "location": { "column": 6, "file": "", - "line": 1751 + "line": 1661 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1751 + "line": 1661 }, "name": "style", "type": { @@ -143377,7 +166530,7 @@ "location": { "column": 66, "file": "", - "line": 1751 + "line": 1661 }, "name": "value", "type": { @@ -143419,14 +166572,14 @@ "location": { "column": 6, "file": "", - "line": 1748 + "line": 1658 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1748 + "line": 1658 }, "name": "style", "type": { @@ -143446,7 +166599,7 @@ "location": { "column": 65, "file": "", - "line": 1748 + "line": 1658 }, "name": "value", "type": { @@ -143483,6 +166636,75 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_style_set_text_leading_trim", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 1666 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 1666 + }, + "name": "style", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_style_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "style_t" + } + }, + { + "location": { + "column": 80, + "file": "", + "line": 1666 + }, + "name": "value", + "type": { + "kind": "identifier", + "name": "lv_text_leading_trim_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" + } + } + ], + "python_name": "set_text_leading_trim", + "receiver": "style_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -143494,14 +166716,14 @@ "location": { "column": 6, "file": "", - "line": 1749 + "line": 1659 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1749 + "line": 1659 }, "name": "style", "type": { @@ -143521,7 +166743,7 @@ "location": { "column": 65, "file": "", - "line": 1749 + "line": 1659 }, "name": "value", "type": { @@ -143563,14 +166785,14 @@ "location": { "column": 6, "file": "", - "line": 1750 + "line": 1660 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1750 + "line": 1660 }, "name": "style", "type": { @@ -143590,7 +166812,7 @@ "location": { "column": 63, "file": "", - "line": 1750 + "line": 1660 }, "name": "value", "type": { @@ -143632,14 +166854,14 @@ "location": { "column": 6, "file": "", - "line": 1747 + "line": 1657 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 1747 + "line": 1657 }, "name": "style", "type": { @@ -143659,7 +166881,7 @@ "location": { "column": 57, "file": "", - "line": 1747 + "line": 1657 }, "name": "value", "type": { @@ -143701,14 +166923,14 @@ "location": { "column": 6, "file": "", - "line": 1753 + "line": 1663 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 1753 + "line": 1663 }, "name": "style", "type": { @@ -143728,7 +166950,7 @@ "location": { "column": 76, "file": "", - "line": 1753 + "line": 1663 }, "name": "value", "type": { @@ -143770,14 +166992,14 @@ "location": { "column": 6, "file": "", - "line": 1755 + "line": 1665 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 1755 + "line": 1665 }, "name": "style", "type": { @@ -143797,7 +167019,7 @@ "location": { "column": 72, "file": "", - "line": 1755 + "line": 1665 }, "name": "value", "type": { @@ -143839,14 +167061,14 @@ "location": { "column": 6, "file": "", - "line": 1754 + "line": 1664 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 1754 + "line": 1664 }, "name": "style", "type": { @@ -143866,7 +167088,7 @@ "location": { "column": 73, "file": "", - "line": 1754 + "line": 1664 }, "name": "value", "type": { @@ -143908,14 +167130,14 @@ "location": { "column": 6, "file": "", - "line": 1680 + "line": 1590 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1680 + "line": 1590 }, "name": "style", "type": { @@ -143935,7 +167157,7 @@ "location": { "column": 64, "file": "", - "line": 1680 + "line": 1590 }, "name": "value", "type": { @@ -143977,14 +167199,14 @@ "location": { "column": 6, "file": "", - "line": 1687 + "line": 1597 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1687 + "line": 1597 }, "name": "style", "type": { @@ -144004,7 +167226,7 @@ "location": { "column": 65, "file": "", - "line": 1687 + "line": 1597 }, "name": "value", "type": { @@ -144046,14 +167268,14 @@ "location": { "column": 6, "file": "", - "line": 1688 + "line": 1598 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1688 + "line": 1598 }, "name": "style", "type": { @@ -144073,7 +167295,7 @@ "location": { "column": 65, "file": "", - "line": 1688 + "line": 1598 }, "name": "value", "type": { @@ -144115,14 +167337,14 @@ "location": { "column": 6, "file": "", - "line": 1686 + "line": 1596 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 1686 + "line": 1596 }, "name": "style", "type": { @@ -144142,7 +167364,7 @@ "location": { "column": 66, "file": "", - "line": 1686 + "line": 1596 }, "name": "value", "type": { @@ -144180,20 +167402,18 @@ "cpython" ], "c_name": "lv_style_set_transform_scale", - "function_specifiers": [ - "inline" - ], + "function_specifiers": [], "location": { - "column": 20, + "column": 6, "file": "", - "line": 1841 + "line": 1716 }, "parameters": [ { "location": { - "column": 60, + "column": 46, "file": "", - "line": 1841 + "line": 1716 }, "name": "style", "type": { @@ -144211,9 +167431,9 @@ }, { "location": { - "column": 77, + "column": 63, "file": "", - "line": 1841 + "line": 1716 }, "name": "value", "type": { @@ -144240,9 +167460,7 @@ }, "role": "struct_method", "static": false, - "storage": [ - "static" - ], + "storage": [], "variadic": false, "visibility": "public" }, @@ -144257,14 +167475,14 @@ "location": { "column": 6, "file": "", - "line": 1684 + "line": 1594 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1684 + "line": 1594 }, "name": "style", "type": { @@ -144284,7 +167502,7 @@ "location": { "column": 65, "file": "", - "line": 1684 + "line": 1594 }, "name": "value", "type": { @@ -144326,14 +167544,14 @@ "location": { "column": 6, "file": "", - "line": 1685 + "line": 1595 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 1685 + "line": 1595 }, "name": "style", "type": { @@ -144353,7 +167571,7 @@ "location": { "column": 65, "file": "", - "line": 1685 + "line": 1595 }, "name": "value", "type": { @@ -144395,14 +167613,14 @@ "location": { "column": 6, "file": "", - "line": 1689 + "line": 1599 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1689 + "line": 1599 }, "name": "style", "type": { @@ -144422,7 +167640,7 @@ "location": { "column": 64, "file": "", - "line": 1689 + "line": 1599 }, "name": "value", "type": { @@ -144464,14 +167682,14 @@ "location": { "column": 6, "file": "", - "line": 1690 + "line": 1600 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1690 + "line": 1600 }, "name": "style", "type": { @@ -144491,7 +167709,7 @@ "location": { "column": 64, "file": "", - "line": 1690 + "line": 1600 }, "name": "value", "type": { @@ -144533,14 +167751,14 @@ "location": { "column": 6, "file": "", - "line": 1679 + "line": 1589 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 1679 + "line": 1589 }, "name": "style", "type": { @@ -144560,7 +167778,7 @@ "location": { "column": 63, "file": "", - "line": 1679 + "line": 1589 }, "name": "value", "type": { @@ -144602,14 +167820,14 @@ "location": { "column": 6, "file": "", - "line": 1776 + "line": 1687 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1776 + "line": 1687 }, "name": "style", "type": { @@ -144629,7 +167847,7 @@ "location": { "column": 82, "file": "", - "line": 1776 + "line": 1687 }, "name": "value", "type": { @@ -144677,14 +167895,14 @@ "location": { "column": 6, "file": "", - "line": 1683 + "line": 1593 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 1683 + "line": 1593 }, "name": "style", "type": { @@ -144704,7 +167922,7 @@ "location": { "column": 64, "file": "", - "line": 1683 + "line": 1593 }, "name": "value", "type": { @@ -144746,14 +167964,14 @@ "location": { "column": 6, "file": "", - "line": 1681 + "line": 1591 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1681 + "line": 1591 }, "name": "style", "type": { @@ -144773,7 +167991,7 @@ "location": { "column": 59, "file": "", - "line": 1681 + "line": 1591 }, "name": "value", "type": { @@ -144815,14 +168033,14 @@ "location": { "column": 6, "file": "", - "line": 1682 + "line": 1592 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 1682 + "line": 1592 }, "name": "style", "type": { @@ -144842,7 +168060,7 @@ "location": { "column": 59, "file": "", - "line": 1682 + "line": 1592 }, "name": "value", "type": { @@ -144884,14 +168102,14 @@ "location": { "column": 6, "file": "", - "line": 1669 + "line": 1579 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 1669 + "line": 1579 }, "name": "style", "type": { @@ -144911,7 +168129,7 @@ "location": { "column": 53, "file": "", - "line": 1669 + "line": 1579 }, "name": "value", "type": { @@ -144953,14 +168171,14 @@ "location": { "column": 6, "file": "", - "line": 1676 + "line": 1586 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 1676 + "line": 1586 }, "name": "style", "type": { @@ -144980,7 +168198,7 @@ "location": { "column": 49, "file": "", - "line": 1676 + "line": 1586 }, "name": "value", "type": { @@ -145022,14 +168240,14 @@ "location": { "column": 6, "file": "", - "line": 1677 + "line": 1587 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 1677 + "line": 1587 }, "name": "style", "type": { @@ -145049,7 +168267,7 @@ "location": { "column": 49, "file": "", - "line": 1677 + "line": 1587 }, "name": "value", "type": { @@ -145091,14 +168309,14 @@ "location": { "column": 6, "file": "", - "line": 1632 + "line": 1568 }, "parameters": [ { "location": { "column": 61, "file": "", - "line": 1632 + "line": 1568 }, "name": "tr", "type": { @@ -145118,7 +168336,7 @@ "location": { "column": 89, "file": "", - "line": 1632 + "line": 1568 }, "name": "props", "type": { @@ -145144,7 +168362,7 @@ "location": { "column": 53, "file": "", - "line": 1633 + "line": 1569 }, "name": "path_cb", "type": { @@ -145161,7 +168379,7 @@ "location": { "column": 71, "file": "", - "line": 1633 + "line": 1569 }, "name": "time", "type": { @@ -145178,7 +168396,7 @@ "location": { "column": 86, "file": "", - "line": 1633 + "line": 1569 }, "name": "delay", "type": { @@ -145195,7 +168413,7 @@ "location": { "column": 98, "file": "", - "line": 1633 + "line": 1569 }, "name": "user_data", "type": { @@ -145240,14 +168458,14 @@ "location": { "column": 17, "file": "", - "line": 3923 + "line": 3182 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 3923 + "line": 3182 }, "name": "subject", "type": { @@ -145267,7 +168485,7 @@ "location": { "column": 82, "file": "", - "line": 3923 + "line": 3182 }, "name": "observer_cb", "type": { @@ -145284,7 +168502,7 @@ "location": { "column": 100, "file": "", - "line": 3923 + "line": 3182 }, "name": "user_data", "type": { @@ -145332,14 +168550,14 @@ "location": { "column": 17, "file": "", - "line": 3924 + "line": 3183 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3924 + "line": 3183 }, "name": "subject", "type": { @@ -145359,7 +168577,7 @@ "location": { "column": 86, "file": "", - "line": 3924 + "line": 3183 }, "name": "observer_cb", "type": { @@ -145376,7 +168594,7 @@ "location": { "column": 108, "file": "", - "line": 3924 + "line": 3183 }, "name": "obj", "type": { @@ -145396,7 +168614,7 @@ "location": { "column": 50, "file": "", - "line": 3925 + "line": 3184 }, "name": "user_data", "type": { @@ -145444,14 +168662,14 @@ "location": { "column": 17, "file": "", - "line": 3926 + "line": 3185 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 3926 + "line": 3185 }, "name": "subject", "type": { @@ -145471,7 +168689,7 @@ "location": { "column": 94, "file": "", - "line": 3926 + "line": 3185 }, "name": "observer_cb", "type": { @@ -145488,7 +168706,7 @@ "location": { "column": 58, "file": "", - "line": 3927 + "line": 3186 }, "name": "target", "type": { @@ -145508,7 +168726,7 @@ "location": { "column": 73, "file": "", - "line": 3927 + "line": 3186 }, "name": "user_data", "type": { @@ -145551,59 +168769,87 @@ "circuitpython", "cpython" ], - "c_name": "lv_subject_copy_string", + "c_name": "lv_subject_create", "function_specifiers": [], "location": { - "column": 6, + "column": 16, "file": "", - "line": 3908 + "line": 3143 }, "parameters": [ { "location": { - "column": 42, + "column": 52, "file": "", - "line": 3908 + "line": 3143 }, - "name": "subject", + "name": "type", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_subject_t" - } + "kind": "identifier", + "name": "lv_subject_type_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "subject_t" + "category": "enum", + "conversion": "enum_int", + "python_type": "SUBJECT_TYPE | int" } - }, + } + ], + "python_name": "subject_create", + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "return_view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_deinit", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3180 + }, + "parameters": [ { "location": { - "column": 64, + "column": 37, "file": "", - "line": 3908 + "line": 3180 }, - "name": "buf", + "name": "subject", "type": { "kind": "pointer", "target": { - "kind": "primitive", - "name": "char", - "qualifiers": [ - "const" - ] + "kind": "identifier", + "name": "lv_subject_t" } }, "view": { - "category": "string", - "conversion": "string", - "python_type": "str" + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" } } ], - "python_name": "copy_string", + "python_name": "deinit", "receiver": "subject_t", "return_type": { "kind": "primitive", @@ -145626,19 +168872,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_subject_deinit", + "c_name": "lv_subject_delete", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3921 + "line": 3144 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3921 + "line": 3144 }, "name": "subject", "type": { @@ -145655,7 +168901,7 @@ } } ], - "python_name": "deinit", + "python_name": "delete", "receiver": "subject_t", "return_type": { "kind": "primitive", @@ -145683,14 +168929,14 @@ "location": { "column": 12, "file": "", - "line": 3918 + "line": 3174 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 3918 + "line": 3174 }, "name": "subject", "type": { @@ -145735,14 +168981,14 @@ "location": { "column": 7, "file": "", - "line": 3903 + "line": 3155 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3903 + "line": 3155 }, "name": "subject", "type": { @@ -145787,14 +169033,14 @@ "location": { "column": 16, "file": "", - "line": 3922 + "line": 3181 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3922 + "line": 3181 }, "name": "subject", "type": { @@ -145814,7 +169060,7 @@ "location": { "column": 77, "file": "", - "line": 3922 + "line": 3181 }, "name": "index", "type": { @@ -145859,14 +169105,14 @@ "location": { "column": 9, "file": "", - "line": 3897 + "line": 3148 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3897 + "line": 3148 }, "name": "subject", "type": { @@ -145911,14 +169157,14 @@ "location": { "column": 14, "file": "", - "line": 3914 + "line": 3169 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3914 + "line": 3169 }, "name": "subject", "type": { @@ -145969,14 +169215,14 @@ "location": { "column": 12, "file": "", - "line": 3919 + "line": 3175 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 3919 + "line": 3175 }, "name": "subject", "type": { @@ -146021,14 +169267,14 @@ "location": { "column": 7, "file": "", - "line": 3904 + "line": 3156 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3904 + "line": 3156 }, "name": "subject", "type": { @@ -146073,14 +169319,14 @@ "location": { "column": 9, "file": "", - "line": 3898 + "line": 3149 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 3898 + "line": 3149 }, "name": "subject", "type": { @@ -146125,14 +169371,14 @@ "location": { "column": 14, "file": "", - "line": 3915 + "line": 3170 }, "parameters": [ { "location": { "column": 59, "file": "", - "line": 3915 + "line": 3170 }, "name": "subject", "type": { @@ -146183,14 +169429,14 @@ "location": { "column": 14, "file": "", - "line": 3911 + "line": 3165 }, "parameters": [ { "location": { "column": 58, "file": "", - "line": 3911 + "line": 3165 }, "name": "subject", "type": { @@ -146241,14 +169487,14 @@ "location": { "column": 14, "file": "", - "line": 3910 + "line": 3164 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 3910 + "line": 3164 }, "name": "subject", "type": { @@ -146288,6 +169534,66 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_global_deinit", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 5131 + }, + "parameters": [], + "python_name": "subject_global_deinit", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_global_init", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 5130 + }, + "parameters": [], + "python_name": "subject_global_init", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -146299,14 +169605,14 @@ "location": { "column": 6, "file": "", - "line": 3916 + "line": 3172 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3916 + "line": 3172 }, "name": "subject", "type": { @@ -146326,7 +169632,7 @@ "location": { "column": 63, "file": "", - "line": 3916 + "line": 3172 }, "name": "color", "type": { @@ -146368,14 +169674,14 @@ "location": { "column": 6, "file": "", - "line": 3901 + "line": 3153 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3901 + "line": 3153 }, "name": "subject", "type": { @@ -146395,7 +169701,7 @@ "location": { "column": 58, "file": "", - "line": 3901 + "line": 3153 }, "name": "value", "type": { @@ -146437,14 +169743,14 @@ "location": { "column": 6, "file": "", - "line": 3920 + "line": 3177 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 3920 + "line": 3177 }, "name": "group_subject", "type": { @@ -146464,7 +169770,7 @@ "location": { "column": 73, "file": "", - "line": 3920 + "line": 3177 }, "name": "list", "type": { @@ -146490,7 +169796,7 @@ "location": { "column": 90, "file": "", - "line": 3920 + "line": 3177 }, "name": "list_len", "type": { @@ -146532,14 +169838,14 @@ "location": { "column": 6, "file": "", - "line": 3895 + "line": 3146 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3895 + "line": 3146 }, "name": "subject", "type": { @@ -146559,7 +169865,7 @@ "location": { "column": 58, "file": "", - "line": 3895 + "line": 3146 }, "name": "value", "type": { @@ -146601,14 +169907,14 @@ "location": { "column": 6, "file": "", - "line": 3912 + "line": 3167 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 3912 + "line": 3167 }, "name": "subject", "type": { @@ -146628,7 +169934,7 @@ "location": { "column": 59, "file": "", - "line": 3912 + "line": 3167 }, "name": "value", "type": { @@ -146673,14 +169979,14 @@ "location": { "column": 6, "file": "", - "line": 3907 + "line": 3160 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 3907 + "line": 3160 }, "name": "subject", "type": { @@ -146700,7 +170006,7 @@ "location": { "column": 58, "file": "", - "line": 3907 + "line": 3160 }, "name": "buf", "type": { @@ -146720,7 +170026,7 @@ "location": { "column": 70, "file": "", - "line": 3907 + "line": 3160 }, "name": "prev_buf", "type": { @@ -146740,7 +170046,7 @@ "location": { "column": 89, "file": "", - "line": 3907 + "line": 3160 }, "name": "size", "type": { @@ -146757,7 +170063,7 @@ "location": { "column": 106, "file": "", - "line": 3907 + "line": 3160 }, "name": "value", "type": { @@ -146805,14 +170111,14 @@ "location": { "column": 6, "file": "", - "line": 3933 + "line": 3193 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 3933 + "line": 3193 }, "name": "subject", "type": { @@ -146857,14 +170163,14 @@ "location": { "column": 6, "file": "", - "line": 3917 + "line": 3173 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 3917 + "line": 3173 }, "name": "subject", "type": { @@ -146884,7 +170190,7 @@ "location": { "column": 62, "file": "", - "line": 3917 + "line": 3173 }, "name": "color", "type": { @@ -146921,19 +170227,390 @@ "circuitpython", "cpython" ], - "c_name": "lv_subject_set_float", + "c_name": "lv_subject_set_float", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3154 + }, + "parameters": [ + { + "location": { + "column": 40, + "file": "", + "line": 3154 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 57, + "file": "", + "line": 3154 + }, + "name": "value", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + } + ], + "python_name": "set_float", + "receiver": "subject_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_set_group_list_static", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3178 + }, + "parameters": [ + { + "location": { + "column": 52, + "file": "", + "line": 3178 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 78, + "file": "", + "line": 3178 + }, + "name": "list", + "type": { + "dimensions": [ + "" + ], + "element": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[subject_t]" + } + }, + { + "location": { + "column": 95, + "file": "", + "line": 3178 + }, + "name": "list_len", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_group_list_static", + "receiver": "subject_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_set_int", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3147 + }, + "parameters": [ + { + "location": { + "column": 38, + "file": "", + "line": 3147 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 57, + "file": "", + "line": 3147 + }, + "name": "value", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_int", + "receiver": "subject_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_set_max_value_float", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3158 + }, + "parameters": [ + { + "location": { + "column": 50, + "file": "", + "line": 3158 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 3158 + }, + "name": "max_value", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + } + ], + "python_name": "set_max_value_float", + "receiver": "subject_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_set_max_value_int", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3151 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 3151 + }, + "name": "subject", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_subject_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "subject_t" + } + }, + { + "location": { + "column": 67, + "file": "", + "line": 3151 + }, + "name": "max_value", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "set_max_value_int", + "receiver": "subject_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_subject_set_min_value_float", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3902 + "line": 3157 }, "parameters": [ { "location": { - "column": 40, + "column": 50, "file": "", - "line": 3902 + "line": 3157 }, "name": "subject", "type": { @@ -146951,11 +170628,11 @@ }, { "location": { - "column": 57, + "column": 67, "file": "", - "line": 3902 + "line": 3157 }, - "name": "value", + "name": "min_value", "type": { "kind": "primitive", "name": "float" @@ -146967,7 +170644,7 @@ } } ], - "python_name": "set_float", + "python_name": "set_min_value_float", "receiver": "subject_t", "return_type": { "kind": "primitive", @@ -146990,19 +170667,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_subject_set_int", + "c_name": "lv_subject_set_min_value_int", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3896 + "line": 3150 }, "parameters": [ { "location": { - "column": 38, + "column": 48, "file": "", - "line": 3896 + "line": 3150 }, "name": "subject", "type": { @@ -147020,11 +170697,11 @@ }, { "location": { - "column": 57, + "column": 67, "file": "", - "line": 3896 + "line": 3150 }, - "name": "value", + "name": "min_value", "type": { "kind": "identifier", "name": "int32_t" @@ -147036,7 +170713,7 @@ } } ], - "python_name": "set_int", + "python_name": "set_min_value_int", "receiver": "subject_t", "return_type": { "kind": "primitive", @@ -147059,19 +170736,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_subject_set_max_value_float", + "c_name": "lv_subject_set_pointer", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3906 + "line": 3168 }, "parameters": [ { "location": { - "column": 50, + "column": 42, "file": "", - "line": 3906 + "line": 3168 }, "name": "subject", "type": { @@ -147089,23 +170766,26 @@ }, { "location": { - "column": 67, + "column": 58, "file": "", - "line": 3906 + "line": 3168 }, - "name": "max_value", + "name": "ptr", "type": { - "kind": "primitive", - "name": "float" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } }, "view": { - "category": "scalar", - "conversion": "float", - "python_type": "float" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } } ], - "python_name": "set_max_value_float", + "python_name": "set_pointer", "receiver": "subject_t", "return_type": { "kind": "primitive", @@ -147128,19 +170808,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_subject_set_max_value_int", + "c_name": "lv_subject_set_string", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3900 + "line": 3162 }, "parameters": [ { "location": { - "column": 48, + "column": 41, "file": "", - "line": 3900 + "line": 3162 }, "name": "subject", "type": { @@ -147158,23 +170838,29 @@ }, { "location": { - "column": 67, + "column": 63, "file": "", - "line": 3900 + "line": 3162 }, - "name": "max_value", + "name": "buf", "type": { - "kind": "identifier", - "name": "int32_t" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "string", + "conversion": "string", + "python_type": "str" } } ], - "python_name": "set_max_value_int", + "python_name": "set_string", "receiver": "subject_t", "return_type": { "kind": "primitive", @@ -147197,19 +170883,19 @@ "circuitpython", "cpython" ], - "c_name": "lv_subject_set_min_value_float", + "c_name": "lv_subject_set_string_buffer_static", "function_specifiers": [], "location": { "column": 6, "file": "", - "line": 3905 + "line": 3161 }, "parameters": [ { "location": { - "column": 50, + "column": 55, "file": "", - "line": 3905 + "line": 3161 }, "name": "subject", "type": { @@ -147227,164 +170913,63 @@ }, { "location": { - "column": 67, - "file": "", - "line": 3905 - }, - "name": "min_value", - "type": { - "kind": "primitive", - "name": "float" - }, - "view": { - "category": "scalar", - "conversion": "float", - "python_type": "float" - } - } - ], - "python_name": "set_min_value_float", - "receiver": "subject_t", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "struct_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_subject_set_min_value_int", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 3899 - }, - "parameters": [ - { - "location": { - "column": 48, + "column": 71, "file": "", - "line": 3899 + "line": 3161 }, - "name": "subject", + "name": "buf", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_subject_t" + "kind": "primitive", + "name": "char" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "subject_t" + "category": "string", + "conversion": "string", + "python_type": "str" } }, { "location": { - "column": 67, - "file": "", - "line": 3899 - }, - "name": "min_value", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - } - ], - "python_name": "set_min_value_int", - "receiver": "subject_t", - "return_type": { - "kind": "primitive", - "name": "void" - }, - "return_view": { - "category": "void", - "conversion": "none", - "python_type": "None" - }, - "role": "struct_method", - "static": false, - "storage": [], - "variadic": false, - "visibility": "public" - }, - { - "available_on": [ - "micropython", - "circuitpython", - "cpython" - ], - "c_name": "lv_subject_set_pointer", - "function_specifiers": [], - "location": { - "column": 6, - "file": "", - "line": 3913 - }, - "parameters": [ - { - "location": { - "column": 42, + "column": 83, "file": "", - "line": 3913 + "line": 3161 }, - "name": "subject", + "name": "prev_buf", "type": { "kind": "pointer", "target": { - "kind": "identifier", - "name": "lv_subject_t" + "kind": "primitive", + "name": "char" } }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "subject_t" + "category": "string", + "conversion": "string", + "python_type": "str" } }, { "location": { - "column": 58, + "column": 102, "file": "", - "line": 3913 + "line": 3161 }, - "name": "ptr", + "name": "size", "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "identifier", + "name": "size_t" }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], - "python_name": "set_pointer", + "python_name": "set_string_buffer_static", "receiver": "subject_t", "return_type": { "kind": "primitive", @@ -147412,14 +170997,14 @@ "location": { "column": 6, "file": "", - "line": 3909 + "line": 3163 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 3909 + "line": 3163 }, "name": "subject", "type": { @@ -147439,7 +171024,7 @@ "location": { "column": 61, "file": "", - "line": 3909 + "line": 3163 }, "name": "format", "type": { @@ -147490,14 +171075,14 @@ "location": { "column": 24, "file": "", - "line": 1067 + "line": 6797 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1067 + "line": 6797 }, "name": "x", "type": { @@ -147542,14 +171127,14 @@ "location": { "column": 24, "file": "", - "line": 1060 + "line": 6790 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 1060 + "line": 6790 }, "name": "x", "type": { @@ -147592,14 +171177,14 @@ "location": { "column": 12, "file": "", - "line": 4866 + "line": 4310 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4866 + "line": 4310 }, "name": "parent", "type": { @@ -147647,14 +171232,14 @@ "location": { "column": 25, "file": "", - "line": 4868 + "line": 4312 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 4868 + "line": 4312 }, "name": "obj", "type": { @@ -147699,14 +171284,14 @@ "location": { "column": 6, "file": "", - "line": 4867 + "line": 4311 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4867 + "line": 4311 }, "name": "obj", "type": { @@ -147726,7 +171311,7 @@ "location": { "column": 72, "file": "", - "line": 4867 + "line": 4311 }, "name": "orientation", "type": { @@ -147768,14 +171353,14 @@ "location": { "column": 6, "file": "", - "line": 4888 + "line": 4332 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4888 + "line": 4332 }, "name": "obj", "type": { @@ -147795,7 +171380,7 @@ "location": { "column": 56, "file": "", - "line": 4888 + "line": 4332 }, "name": "row", "type": { @@ -147812,7 +171397,7 @@ "location": { "column": 70, "file": "", - "line": 4888 + "line": 4332 }, "name": "col", "type": { @@ -147829,7 +171414,7 @@ "location": { "column": 96, "file": "", - "line": 4888 + "line": 4332 }, "name": "ctrl", "type": { @@ -147871,14 +171456,14 @@ "location": { "column": 12, "file": "", - "line": 4880 + "line": 4324 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4880 + "line": 4324 }, "name": "parent", "type": { @@ -147926,14 +171511,14 @@ "location": { "column": 8, "file": "", - "line": 4897 + "line": 4341 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4897 + "line": 4341 }, "name": "obj", "type": { @@ -147953,7 +171538,7 @@ "location": { "column": 61, "file": "", - "line": 4897 + "line": 4341 }, "name": "row", "type": { @@ -147970,7 +171555,7 @@ "location": { "column": 75, "file": "", - "line": 4897 + "line": 4341 }, "name": "col", "type": { @@ -148015,14 +171600,14 @@ "location": { "column": 14, "file": "", - "line": 4891 + "line": 4335 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4891 + "line": 4335 }, "name": "obj", "type": { @@ -148042,7 +171627,7 @@ "location": { "column": 63, "file": "", - "line": 4891 + "line": 4335 }, "name": "row", "type": { @@ -148059,7 +171644,7 @@ "location": { "column": 77, "file": "", - "line": 4891 + "line": 4335 }, "name": "col", "type": { @@ -148107,14 +171692,14 @@ "location": { "column": 10, "file": "", - "line": 4893 + "line": 4337 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4893 + "line": 4337 }, "name": "obj", "type": { @@ -148159,14 +171744,14 @@ "location": { "column": 9, "file": "", - "line": 4894 + "line": 4338 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4894 + "line": 4338 }, "name": "obj", "type": { @@ -148186,7 +171771,7 @@ "location": { "column": 60, "file": "", - "line": 4894 + "line": 4338 }, "name": "col", "type": { @@ -148228,14 +171813,14 @@ "location": { "column": 10, "file": "", - "line": 4892 + "line": 4336 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4892 + "line": 4336 }, "name": "obj", "type": { @@ -148280,14 +171865,14 @@ "location": { "column": 6, "file": "", - "line": 4896 + "line": 4340 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4896 + "line": 4340 }, "name": "obj", "type": { @@ -148307,7 +171892,7 @@ "location": { "column": 58, "file": "", - "line": 4896 + "line": 4340 }, "name": "row", "type": { @@ -148327,7 +171912,7 @@ "location": { "column": 74, "file": "", - "line": 4896 + "line": 4340 }, "name": "col", "type": { @@ -148372,14 +171957,14 @@ "location": { "column": 6, "file": "", - "line": 4895 + "line": 4339 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4895 + "line": 4339 }, "name": "obj", "type": { @@ -148399,7 +171984,7 @@ "location": { "column": 54, "file": "", - "line": 4895 + "line": 4339 }, "name": "row", "type": { @@ -148416,7 +172001,7 @@ "location": { "column": 68, "file": "", - "line": 4895 + "line": 4339 }, "name": "col", "type": { @@ -148433,7 +172018,7 @@ "location": { "column": 94, "file": "", - "line": 4895 + "line": 4339 }, "name": "ctrl", "type": { @@ -148475,14 +172060,14 @@ "location": { "column": 6, "file": "", - "line": 4887 + "line": 4331 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4887 + "line": 4331 }, "name": "obj", "type": { @@ -148502,7 +172087,7 @@ "location": { "column": 54, "file": "", - "line": 4887 + "line": 4331 }, "name": "row", "type": { @@ -148519,7 +172104,7 @@ "location": { "column": 68, "file": "", - "line": 4887 + "line": 4331 }, "name": "col", "type": { @@ -148536,7 +172121,7 @@ "location": { "column": 94, "file": "", - "line": 4887 + "line": 4331 }, "name": "ctrl", "type": { @@ -148578,14 +172163,14 @@ "location": { "column": 6, "file": "", - "line": 4889 + "line": 4333 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4889 + "line": 4333 }, "name": "obj", "type": { @@ -148605,7 +172190,7 @@ "location": { "column": 59, "file": "", - "line": 4889 + "line": 4333 }, "name": "row", "type": { @@ -148622,7 +172207,7 @@ "location": { "column": 73, "file": "", - "line": 4889 + "line": 4333 }, "name": "col", "type": { @@ -148639,7 +172224,7 @@ "location": { "column": 83, "file": "", - "line": 4889 + "line": 4333 }, "name": "user_data", "type": { @@ -148684,14 +172269,14 @@ "location": { "column": 6, "file": "", - "line": 4881 + "line": 4325 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4881 + "line": 4325 }, "name": "obj", "type": { @@ -148711,7 +172296,7 @@ "location": { "column": 55, "file": "", - "line": 4881 + "line": 4325 }, "name": "row", "type": { @@ -148728,7 +172313,7 @@ "location": { "column": 69, "file": "", - "line": 4881 + "line": 4325 }, "name": "col", "type": { @@ -148745,7 +172330,7 @@ "location": { "column": 85, "file": "", - "line": 4881 + "line": 4325 }, "name": "txt", "type": { @@ -148793,14 +172378,14 @@ "location": { "column": 6, "file": "", - "line": 4882 + "line": 4326 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4882 + "line": 4326 }, "name": "obj", "type": { @@ -148820,7 +172405,7 @@ "location": { "column": 59, "file": "", - "line": 4882 + "line": 4326 }, "name": "row", "type": { @@ -148837,7 +172422,7 @@ "location": { "column": 73, "file": "", - "line": 4882 + "line": 4326 }, "name": "col", "type": { @@ -148854,7 +172439,7 @@ "location": { "column": 89, "file": "", - "line": 4882 + "line": 4326 }, "name": "fmt", "type": { @@ -148902,14 +172487,14 @@ "location": { "column": 6, "file": "", - "line": 4885 + "line": 4329 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4885 + "line": 4329 }, "name": "obj", "type": { @@ -148929,7 +172514,7 @@ "location": { "column": 57, "file": "", - "line": 4885 + "line": 4329 }, "name": "col_cnt", "type": { @@ -148971,14 +172556,14 @@ "location": { "column": 6, "file": "", - "line": 4886 + "line": 4330 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 4886 + "line": 4330 }, "name": "obj", "type": { @@ -148998,7 +172583,7 @@ "location": { "column": 57, "file": "", - "line": 4886 + "line": 4330 }, "name": "col_id", "type": { @@ -149015,7 +172600,7 @@ "location": { "column": 73, "file": "", - "line": 4886 + "line": 4330 }, "name": "w", "type": { @@ -149057,14 +172642,14 @@ "location": { "column": 6, "file": "", - "line": 4884 + "line": 4328 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4884 + "line": 4328 }, "name": "obj", "type": { @@ -149084,7 +172669,7 @@ "location": { "column": 54, "file": "", - "line": 4884 + "line": 4328 }, "name": "row_cnt", "type": { @@ -149126,14 +172711,14 @@ "location": { "column": 6, "file": "", - "line": 4890 + "line": 4334 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4890 + "line": 4334 }, "name": "obj", "type": { @@ -149153,7 +172738,7 @@ "location": { "column": 58, "file": "", - "line": 4890 + "line": 4334 }, "name": "row", "type": { @@ -149170,7 +172755,7 @@ "location": { "column": 72, "file": "", - "line": 4890 + "line": 4334 }, "name": "col", "type": { @@ -149212,14 +172797,14 @@ "location": { "column": 12, "file": "", - "line": 4900 + "line": 4344 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4900 + "line": 4344 }, "name": "obj", "type": { @@ -149239,7 +172824,7 @@ "location": { "column": 58, "file": "", - "line": 4900 + "line": 4344 }, "name": "name", "type": { @@ -149290,14 +172875,14 @@ "location": { "column": 12, "file": "", - "line": 4899 + "line": 4343 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4899 + "line": 4343 }, "name": "parent", "type": { @@ -149345,14 +172930,14 @@ "location": { "column": 12, "file": "", - "line": 4908 + "line": 4352 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4908 + "line": 4352 }, "name": "obj", "type": { @@ -149400,14 +172985,14 @@ "location": { "column": 10, "file": "", - "line": 4906 + "line": 4350 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4906 + "line": 4350 }, "name": "obj", "type": { @@ -149452,14 +173037,14 @@ "location": { "column": 12, "file": "", - "line": 4909 + "line": 4353 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4909 + "line": 4353 }, "name": "obj", "type": { @@ -149507,14 +173092,14 @@ "location": { "column": 10, "file": "", - "line": 4910 + "line": 4354 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4910 + "line": 4354 }, "name": "obj", "type": { @@ -149559,14 +173144,14 @@ "location": { "column": 12, "file": "", - "line": 4907 + "line": 4351 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4907 + "line": 4351 }, "name": "obj", "type": { @@ -149586,7 +173171,7 @@ "location": { "column": 62, "file": "", - "line": 4907 + "line": 4351 }, "name": "idx", "type": { @@ -149631,14 +173216,14 @@ "location": { "column": 10, "file": "", - "line": 4905 + "line": 4349 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 4905 + "line": 4349 }, "name": "obj", "type": { @@ -149683,14 +173268,14 @@ "location": { "column": 6, "file": "", - "line": 4902 + "line": 4346 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4902 + "line": 4346 }, "name": "obj", "type": { @@ -149710,7 +173295,7 @@ "location": { "column": 53, "file": "", - "line": 4902 + "line": 4346 }, "name": "idx", "type": { @@ -149727,7 +173312,7 @@ "location": { "column": 75, "file": "", - "line": 4902 + "line": 4346 }, "name": "anim_en", "type": { @@ -149769,14 +173354,14 @@ "location": { "column": 6, "file": "", - "line": 4903 + "line": 4347 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4903 + "line": 4347 }, "name": "obj", "type": { @@ -149796,7 +173381,7 @@ "location": { "column": 63, "file": "", - "line": 4903 + "line": 4347 }, "name": "dir", "type": { @@ -149838,14 +173423,14 @@ "location": { "column": 6, "file": "", - "line": 4904 + "line": 4348 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4904 + "line": 4348 }, "name": "obj", "type": { @@ -149865,7 +173450,7 @@ "location": { "column": 58, "file": "", - "line": 4904 + "line": 4348 }, "name": "size", "type": { @@ -149907,14 +173492,14 @@ "location": { "column": 6, "file": "", - "line": 4901 + "line": 4345 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4901 + "line": 4345 }, "name": "obj", "type": { @@ -149934,7 +173519,7 @@ "location": { "column": 55, "file": "", - "line": 4901 + "line": 4345 }, "name": "idx", "type": { @@ -149951,7 +173536,7 @@ "location": { "column": 71, "file": "", - "line": 4901 + "line": 4345 }, "name": "new_name", "type": { @@ -150001,7 +173586,7 @@ "location": { "column": 24, "file": "", - "line": 5004 + "line": 4382 }, "parameters": [], "python_name": "task_handler", @@ -150033,14 +173618,14 @@ "location": { "column": 6, "file": "", - "line": 5651 + "line": 6643 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 5651 + "line": 6643 }, "name": "attributes", "type": { @@ -150085,14 +173670,14 @@ "location": { "column": 6, "file": "", - "line": 5660 + "line": 6654 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 5660 + "line": 6654 }, "name": "txt", "type": { @@ -150112,7 +173697,7 @@ "location": { "column": 39, "file": "", - "line": 5660 + "line": 6654 }, "name": "pos", "type": { @@ -150129,7 +173714,7 @@ "location": { "column": 53, "file": "", - "line": 5660 + "line": 6654 }, "name": "len", "type": { @@ -150170,14 +173755,14 @@ "location": { "column": 6, "file": "", - "line": 5662 + "line": 6656 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 5662 + "line": 6656 }, "name": "txt", "type": { @@ -150200,7 +173785,7 @@ "location": { "column": 63, "file": "", - "line": 5662 + "line": 6656 }, "name": "letter", "type": { @@ -150220,7 +173805,7 @@ "location": { "column": 82, "file": "", - "line": 5662 + "line": 6656 }, "name": "letter_next", "type": { @@ -150240,7 +173825,7 @@ "location": { "column": 106, "file": "", - "line": 5662 + "line": 6656 }, "name": "ofs", "type": { @@ -150273,6 +173858,123 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_text_get_line_width", + "function_specifiers": [], + "location": { + "column": 9, + "file": "", + "line": 6648 + }, + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 6648 + }, + "name": "txt", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + }, + { + "location": { + "column": 59, + "file": "", + "line": 6648 + }, + "name": "length", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 83, + "file": "", + "line": 6648 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 59, + "file": "", + "line": 6649 + }, + "name": "attributes", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_text_attributes_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "text_attributes_t" + } + } + ], + "python_name": "text_get_line_width", + "return_type": { + "kind": "identifier", + "name": "int32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -150284,14 +173986,14 @@ "location": { "column": 10, "file": "", - "line": 5657 + "line": 6651 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 5657 + "line": 6651 }, "name": "txt", "type": { @@ -150314,7 +174016,7 @@ "location": { "column": 59, "file": "", - "line": 5657 + "line": 6651 }, "name": "len", "type": { @@ -150331,7 +174033,7 @@ "location": { "column": 80, "file": "", - "line": 5657 + "line": 6651 }, "name": "font", "type": { @@ -150354,7 +174056,7 @@ "location": { "column": 96, "file": "", - "line": 5657 + "line": 6651 }, "name": "used_width", "type": { @@ -150374,7 +174076,7 @@ "location": { "column": 53, "file": "", - "line": 5658 + "line": 6652 }, "name": "attributes", "type": { @@ -150418,14 +174120,14 @@ "location": { "column": 6, "file": "", - "line": 1305 + "line": 1248 }, "parameters": [ { "location": { "column": 34, "file": "", - "line": 1305 + "line": 1248 }, "name": "size_res", "type": { @@ -150445,7 +174147,7 @@ "location": { "column": 57, "file": "", - "line": 1305 + "line": 1248 }, "name": "text", "type": { @@ -150468,7 +174170,7 @@ "location": { "column": 81, "file": "", - "line": 1305 + "line": 1248 }, "name": "font", "type": { @@ -150491,7 +174193,7 @@ "location": { "column": 97, "file": "", - "line": 1305 + "line": 1248 }, "name": "letter_space", "type": { @@ -150508,7 +174210,7 @@ "location": { "column": 31, "file": "", - "line": 1306 + "line": 1249 }, "name": "line_space", "type": { @@ -150525,7 +174227,7 @@ "location": { "column": 51, "file": "", - "line": 1306 + "line": 1249 }, "name": "max_width", "type": { @@ -150542,7 +174244,7 @@ "location": { "column": 77, "file": "", - "line": 1306 + "line": 1249 }, "name": "flag", "type": { @@ -150583,14 +174285,14 @@ "location": { "column": 6, "file": "", - "line": 5652 + "line": 6644 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 5652 + "line": 6644 }, "name": "size_res", "type": { @@ -150610,7 +174312,124 @@ "location": { "column": 68, "file": "", - "line": 5652 + "line": 6644 + }, + "name": "text", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + }, + { + "location": { + "column": 92, + "file": "", + "line": 6644 + }, + "name": "font", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "location": { + "column": 55, + "file": "", + "line": 6645 + }, + "name": "attributes", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_text_attributes_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "text_attributes_t" + } + } + ], + "python_name": "text_get_size_attributes", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_text_get_size_internal", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 6657 + }, + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 6657 + }, + "name": "size_res", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_point_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "point_t" + } + }, + { + "location": { + "column": 66, + "file": "", + "line": 6657 }, "name": "text", "type": { @@ -150631,9 +174450,9 @@ }, { "location": { - "column": 92, + "column": 90, "file": "", - "line": 5652 + "line": 6657 }, "name": "font", "type": { @@ -150654,26 +174473,74 @@ }, { "location": { - "column": 55, + "column": 106, "file": "", - "line": 5653 + "line": 6657 }, - "name": "attributes", + "name": "letter_space", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_text_attributes_t" - } + "kind": "identifier", + "name": "int32_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "text_attributes_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 40, + "file": "", + "line": 6658 + }, + "name": "line_space", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 60, + "file": "", + "line": 6658 + }, + "name": "max_width", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "location": { + "column": 86, + "file": "", + "line": 6658 + }, + "name": "flag", + "type": { + "kind": "identifier", + "name": "lv_text_flag_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_FLAG | int" } } ], - "python_name": "text_get_size_attributes", + "python_name": "text_get_size_internal", "return_type": { "kind": "primitive", "name": "void" @@ -150700,14 +174567,14 @@ "location": { "column": 9, "file": "", - "line": 5654 + "line": 6646 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 5654 + "line": 6646 }, "name": "txt", "type": { @@ -150730,7 +174597,7 @@ "location": { "column": 54, "file": "", - "line": 5654 + "line": 6646 }, "name": "length", "type": { @@ -150747,7 +174614,7 @@ "location": { "column": 78, "file": "", - "line": 5654 + "line": 6646 }, "name": "font", "type": { @@ -150770,7 +174637,7 @@ "location": { "column": 54, "file": "", - "line": 5655 + "line": 6647 }, "name": "attributes", "type": { @@ -150817,14 +174684,14 @@ "location": { "column": 6, "file": "", - "line": 5659 + "line": 6653 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 5659 + "line": 6653 }, "name": "txt_buf", "type": { @@ -150844,7 +174711,7 @@ "location": { "column": 43, "file": "", - "line": 5659 + "line": 6653 }, "name": "pos", "type": { @@ -150861,7 +174728,7 @@ "location": { "column": 59, "file": "", - "line": 5659 + "line": 6653 }, "name": "ins_txt", "type": { @@ -150910,14 +174777,14 @@ "location": { "column": 20, "file": "", - "line": 5675 + "line": 6675 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 5675 + "line": 6675 }, "name": "letter", "type": { @@ -150962,14 +174829,14 @@ "location": { "column": 20, "file": "", - "line": 5663 + "line": 6659 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 5663 + "line": 6659 }, "name": "letter", "type": { @@ -151012,14 +174879,14 @@ "location": { "column": 6, "file": "", - "line": 5656 + "line": 6650 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 5656 + "line": 6650 }, "name": "state", "type": { @@ -151039,7 +174906,7 @@ "location": { "column": 59, "file": "", - "line": 5656 + "line": 6650 }, "name": "c", "type": { @@ -151069,6 +174936,58 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_text_is_hanging_space", + "function_specifiers": [ + "inline" + ], + "location": { + "column": 20, + "file": "", + "line": 6671 + }, + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 6671 + }, + "name": "letter", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "python_name": "text_is_hanging_space", + "return_type": { + "kind": "primitive", + "name": "bool" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [ + "static" + ], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -151082,14 +175001,14 @@ "location": { "column": 20, "file": "", - "line": 5704 + "line": 6704 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 5704 + "line": 6704 }, "name": "letter", "type": { @@ -151132,14 +175051,14 @@ "location": { "column": 8, "file": "", - "line": 5661 + "line": 6655 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 5661 + "line": 6655 }, "name": "fmt", "type": { @@ -151162,7 +175081,7 @@ "location": { "column": 56, "file": "", - "line": 5661 + "line": 6655 }, "name": "ap", "type": { @@ -151207,14 +175126,14 @@ "location": { "column": 6, "file": "", - "line": 4790 + "line": 4233 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4790 + "line": 4233 }, "name": "obj", "type": { @@ -151234,7 +175153,7 @@ "location": { "column": 52, "file": "", - "line": 4790 + "line": 4233 }, "name": "c", "type": { @@ -151276,14 +175195,14 @@ "location": { "column": 6, "file": "", - "line": 4791 + "line": 4234 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4791 + "line": 4234 }, "name": "obj", "type": { @@ -151303,7 +175222,7 @@ "location": { "column": 54, "file": "", - "line": 4791 + "line": 4234 }, "name": "txt", "type": { @@ -151351,14 +175270,14 @@ "location": { "column": 6, "file": "", - "line": 4822 + "line": 4266 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 4822 + "line": 4266 }, "name": "obj", "type": { @@ -151403,14 +175322,14 @@ "location": { "column": 12, "file": "", - "line": 4789 + "line": 4232 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4789 + "line": 4232 }, "name": "parent", "type": { @@ -151458,14 +175377,14 @@ "location": { "column": 6, "file": "", - "line": 4825 + "line": 4269 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4825 + "line": 4269 }, "name": "obj", "type": { @@ -151510,14 +175429,14 @@ "location": { "column": 6, "file": "", - "line": 4824 + "line": 4268 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4824 + "line": 4268 }, "name": "obj", "type": { @@ -151562,14 +175481,14 @@ "location": { "column": 6, "file": "", - "line": 4823 + "line": 4267 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4823 + "line": 4267 }, "name": "obj", "type": { @@ -151614,14 +175533,14 @@ "location": { "column": 6, "file": "", - "line": 4826 + "line": 4270 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4826 + "line": 4270 }, "name": "obj", "type": { @@ -151666,14 +175585,14 @@ "location": { "column": 6, "file": "", - "line": 4792 + "line": 4235 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4792 + "line": 4235 }, "name": "obj", "type": { @@ -151718,14 +175637,14 @@ "location": { "column": 6, "file": "", - "line": 4793 + "line": 4236 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4793 + "line": 4236 }, "name": "obj", "type": { @@ -151770,14 +175689,14 @@ "location": { "column": 14, "file": "", - "line": 4816 + "line": 4260 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4816 + "line": 4260 }, "name": "obj", "type": { @@ -151828,14 +175747,14 @@ "location": { "column": 10, "file": "", - "line": 4821 + "line": 4265 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4821 + "line": 4265 }, "name": "obj", "type": { @@ -151880,14 +175799,14 @@ "location": { "column": 6, "file": "", - "line": 4812 + "line": 4256 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4812 + "line": 4256 }, "name": "obj", "type": { @@ -151932,14 +175851,14 @@ "location": { "column": 10, "file": "", - "line": 4811 + "line": 4255 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4811 + "line": 4255 }, "name": "obj", "type": { @@ -151987,14 +175906,14 @@ "location": { "column": 12, "file": "", - "line": 4810 + "line": 4254 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4810 + "line": 4254 }, "name": "obj", "type": { @@ -152045,14 +175964,14 @@ "location": { "column": 10, "file": "", - "line": 4817 + "line": 4261 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4817 + "line": 4261 }, "name": "obj", "type": { @@ -152097,14 +176016,14 @@ "location": { "column": 6, "file": "", - "line": 4815 + "line": 4259 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4815 + "line": 4259 }, "name": "obj", "type": { @@ -152152,14 +176071,14 @@ "location": { "column": 14, "file": "", - "line": 4814 + "line": 4258 }, "parameters": [ { "location": { "column": 55, "file": "", - "line": 4814 + "line": 4258 }, "name": "obj", "type": { @@ -152210,14 +176129,14 @@ "location": { "column": 6, "file": "", - "line": 4813 + "line": 4257 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 4813 + "line": 4257 }, "name": "obj", "type": { @@ -152265,14 +176184,14 @@ "location": { "column": 10, "file": "", - "line": 4820 + "line": 4264 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 4820 + "line": 4264 }, "name": "obj", "type": { @@ -152317,14 +176236,14 @@ "location": { "column": 14, "file": "", - "line": 4809 + "line": 4253 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 4809 + "line": 4253 }, "name": "obj", "type": { @@ -152375,14 +176294,14 @@ "location": { "column": 14, "file": "", - "line": 4808 + "line": 4252 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4808 + "line": 4252 }, "name": "obj", "type": { @@ -152436,14 +176355,14 @@ "location": { "column": 6, "file": "", - "line": 4819 + "line": 4263 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4819 + "line": 4263 }, "name": "obj", "type": { @@ -152488,14 +176407,14 @@ "location": { "column": 6, "file": "", - "line": 4801 + "line": 4244 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4801 + "line": 4244 }, "name": "obj", "type": { @@ -152515,7 +176434,7 @@ "location": { "column": 64, "file": "", - "line": 4801 + "line": 4244 }, "name": "list", "type": { @@ -152563,14 +176482,14 @@ "location": { "column": 6, "file": "", - "line": 4802 + "line": 4245 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4802 + "line": 4245 }, "name": "obj", "type": { @@ -152590,7 +176509,7 @@ "location": { "column": 71, "file": "", - "line": 4802 + "line": 4245 }, "name": "list", "type": { @@ -152638,14 +176557,14 @@ "location": { "column": 6, "file": "", - "line": 4807 + "line": 4251 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4807 + "line": 4251 }, "name": "obj", "type": { @@ -152665,7 +176584,7 @@ "location": { "column": 60, "file": "", - "line": 4807 + "line": 4251 }, "name": "align", "type": { @@ -152707,14 +176626,14 @@ "location": { "column": 6, "file": "", - "line": 4797 + "line": 4240 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4797 + "line": 4240 }, "name": "obj", "type": { @@ -152734,7 +176653,7 @@ "location": { "column": 60, "file": "", - "line": 4797 + "line": 4240 }, "name": "en", "type": { @@ -152776,14 +176695,14 @@ "location": { "column": 6, "file": "", - "line": 4796 + "line": 4239 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4796 + "line": 4239 }, "name": "obj", "type": { @@ -152803,7 +176722,7 @@ "location": { "column": 57, "file": "", - "line": 4796 + "line": 4239 }, "name": "pos", "type": { @@ -152845,14 +176764,14 @@ "location": { "column": 6, "file": "", - "line": 4804 + "line": 4247 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4804 + "line": 4247 }, "name": "obj", "type": { @@ -152872,7 +176791,7 @@ "location": { "column": 64, "file": "", - "line": 4804 + "line": 4247 }, "name": "txt", "type": { @@ -152920,14 +176839,14 @@ "location": { "column": 6, "file": "", - "line": 4803 + "line": 4246 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4803 + "line": 4246 }, "name": "obj", "type": { @@ -152947,7 +176866,7 @@ "location": { "column": 58, "file": "", - "line": 4803 + "line": 4246 }, "name": "num", "type": { @@ -152989,14 +176908,14 @@ "location": { "column": 6, "file": "", - "line": 4800 + "line": 4243 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4800 + "line": 4243 }, "name": "obj", "type": { @@ -153016,7 +176935,7 @@ "location": { "column": 52, "file": "", - "line": 4800 + "line": 4243 }, "name": "en", "type": { @@ -153058,14 +176977,14 @@ "location": { "column": 6, "file": "", - "line": 4799 + "line": 4242 }, "parameters": [ { "location": { "column": 47, "file": "", - "line": 4799 + "line": 4242 }, "name": "obj", "type": { @@ -153085,7 +177004,7 @@ "location": { "column": 65, "file": "", - "line": 4799 + "line": 4242 }, "name": "bullet", "type": { @@ -153133,14 +177052,14 @@ "location": { "column": 6, "file": "", - "line": 4798 + "line": 4241 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4798 + "line": 4241 }, "name": "obj", "type": { @@ -153160,7 +177079,7 @@ "location": { "column": 57, "file": "", - "line": 4798 + "line": 4241 }, "name": "en", "type": { @@ -153202,14 +177121,14 @@ "location": { "column": 6, "file": "", - "line": 4806 + "line": 4249 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4806 + "line": 4249 }, "name": "obj", "type": { @@ -153229,7 +177148,7 @@ "location": { "column": 66, "file": "", - "line": 4806 + "line": 4249 }, "name": "time", "type": { @@ -153271,14 +177190,14 @@ "location": { "column": 6, "file": "", - "line": 4795 + "line": 4238 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4795 + "line": 4238 }, "name": "obj", "type": { @@ -153298,7 +177217,7 @@ "location": { "column": 66, "file": "", - "line": 4795 + "line": 4238 }, "name": "txt", "type": { @@ -153346,14 +177265,14 @@ "location": { "column": 6, "file": "", - "line": 4794 + "line": 4237 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4794 + "line": 4237 }, "name": "obj", "type": { @@ -153373,7 +177292,7 @@ "location": { "column": 54, "file": "", - "line": 4794 + "line": 4237 }, "name": "txt", "type": { @@ -153421,14 +177340,14 @@ "location": { "column": 6, "file": "", - "line": 4805 + "line": 4248 }, "parameters": [ { "location": { "column": 46, "file": "", - "line": 4805 + "line": 4248 }, "name": "obj", "type": { @@ -153448,7 +177367,7 @@ "location": { "column": 58, "file": "", - "line": 4805 + "line": 4248 }, "name": "en", "type": { @@ -153490,14 +177409,14 @@ "location": { "column": 6, "file": "", - "line": 4818 + "line": 4262 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4818 + "line": 4262 }, "name": "obj", "type": { @@ -153545,14 +177464,14 @@ "location": { "column": 6, "file": "", - "line": 4981 + "line": 3432 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 4981 + "line": 3432 }, "name": "obj", "type": { @@ -153596,14 +177515,14 @@ "location": { "column": 6, "file": "", - "line": 4979 + "line": 3430 }, "parameters": [ { "location": { "column": 31, "file": "", - "line": 4979 + "line": 3430 }, "name": "dst", "type": { @@ -153623,7 +177542,7 @@ "location": { "column": 55, "file": "", - "line": 4979 + "line": 3430 }, "name": "src", "type": { @@ -153671,7 +177590,7 @@ "location": { "column": 14, "file": "", - "line": 4978 + "line": 3429 }, "parameters": [], "python_name": "theme_create", @@ -153704,7 +177623,7 @@ "location": { "column": 6, "file": "", - "line": 4994 + "line": 3447 }, "parameters": [], "python_name": "theme_default_deinit", @@ -153734,7 +177653,7 @@ "location": { "column": 14, "file": "", - "line": 4993 + "line": 3446 }, "parameters": [], "python_name": "theme_default_get", @@ -153767,14 +177686,14 @@ "location": { "column": 14, "file": "", - "line": 4990 + "line": 3443 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4990 + "line": 3443 }, "name": "disp", "type": { @@ -153794,7 +177713,7 @@ "location": { "column": 68, "file": "", - "line": 4990 + "line": 3443 }, "name": "color_primary", "type": { @@ -153811,7 +177730,7 @@ "location": { "column": 94, "file": "", - "line": 4990 + "line": 3443 }, "name": "color_secondary", "type": { @@ -153828,7 +177747,7 @@ "location": { "column": 116, "file": "", - "line": 4990 + "line": 3443 }, "name": "dark", "type": { @@ -153845,7 +177764,7 @@ "location": { "column": 52, "file": "", - "line": 4991 + "line": 3444 }, "name": "font", "type": { @@ -153895,7 +177814,7 @@ "location": { "column": 6, "file": "", - "line": 4992 + "line": 3445 }, "parameters": [], "python_name": "theme_default_is_inited", @@ -153925,14 +177844,14 @@ "location": { "column": 6, "file": "", - "line": 4989 + "line": 3442 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 4989 + "line": 3442 }, "name": "theme", "type": { @@ -153977,14 +177896,14 @@ "location": { "column": 12, "file": "", - "line": 4987 + "line": 3439 }, "parameters": [ { "location": { "column": 48, "file": "", - "line": 4987 + "line": 3439 }, "name": "obj", "type": { @@ -154028,14 +177947,14 @@ "location": { "column": 12, "file": "", - "line": 4988 + "line": 3440 }, "parameters": [ { "location": { "column": 50, "file": "", - "line": 4988 + "line": 3440 }, "name": "obj", "type": { @@ -154079,14 +177998,14 @@ "location": { "column": 19, "file": "", - "line": 4986 + "line": 3438 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4986 + "line": 3438 }, "name": "obj", "type": { @@ -154136,14 +178055,14 @@ "location": { "column": 19, "file": "", - "line": 4985 + "line": 3437 }, "parameters": [ { "location": { "column": 53, "file": "", - "line": 4985 + "line": 3437 }, "name": "obj", "type": { @@ -154193,14 +178112,14 @@ "location": { "column": 19, "file": "", - "line": 4984 + "line": 3436 }, "parameters": [ { "location": { "column": 52, "file": "", - "line": 4984 + "line": 3436 }, "name": "obj", "type": { @@ -154250,14 +178169,14 @@ "location": { "column": 14, "file": "", - "line": 4980 + "line": 3431 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4980 + "line": 3431 }, "name": "obj", "type": { @@ -154293,6 +178212,64 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_theme_get_user_data", + "function_specifiers": [], + "location": { + "column": 8, + "file": "", + "line": 3441 + }, + "parameters": [ + { + "location": { + "column": 48, + "file": "", + "line": 3441 + }, + "name": "theme", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_theme_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "theme_t" + } + } + ], + "python_name": "get_user_data", + "receiver": "theme_t", + "return_type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "return_view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -154304,14 +178281,14 @@ "location": { "column": 6, "file": "", - "line": 4983 + "line": 3434 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4983 + "line": 3434 }, "name": "theme", "type": { @@ -154331,7 +178308,7 @@ "location": { "column": 68, "file": "", - "line": 4983 + "line": 3434 }, "name": "apply_cb", "type": { @@ -154373,14 +178350,14 @@ "location": { "column": 6, "file": "", - "line": 4982 + "line": 3433 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 4982 + "line": 3433 }, "name": "theme", "type": { @@ -154400,7 +178377,7 @@ "location": { "column": 57, "file": "", - "line": 4982 + "line": 3433 }, "name": "parent", "type": { @@ -154434,6 +178411,78 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_theme_set_user_data", + "function_specifiers": [], + "location": { + "column": 6, + "file": "", + "line": 3435 + }, + "parameters": [ + { + "location": { + "column": 40, + "file": "", + "line": 3435 + }, + "name": "theme", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_theme_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "theme_t" + } + }, + { + "location": { + "column": 54, + "file": "", + "line": 3435 + }, + "name": "user_data", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + } + ], + "python_name": "set_user_data", + "receiver": "theme_t", + "return_type": { + "kind": "primitive", + "name": "void" + }, + "return_view": { + "category": "void", + "conversion": "none", + "python_type": "None" + }, + "role": "struct_method", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -154447,14 +178496,14 @@ "location": { "column": 27, "file": "", - "line": 5129 + "line": 4446 }, "parameters": [ { "location": { "column": 56, "file": "", - "line": 5129 + "line": 4446 }, "name": "thread", "type": { @@ -154502,14 +178551,14 @@ "location": { "column": 27, "file": "", - "line": 5118 + "line": 4435 }, "parameters": [ { "location": { "column": 54, "file": "", - "line": 5118 + "line": 4435 }, "name": "thread", "type": { @@ -154529,7 +178578,7 @@ "location": { "column": 75, "file": "", - "line": 5118 + "line": 4435 }, "name": "name", "type": { @@ -154555,7 +178604,7 @@ "location": { "column": 106, "file": "", - "line": 5118 + "line": 4435 }, "name": "prio", "type": { @@ -154572,7 +178621,7 @@ "location": { "column": 48, "file": "", - "line": 5119 + "line": 4436 }, "name": "callback", "type": { @@ -154584,7 +178633,7 @@ "location": { "column": 59, "file": "", - "line": 5119 + "line": 4436 }, "name": null, "type": { @@ -154612,7 +178661,7 @@ "location": { "column": 75, "file": "", - "line": 5119 + "line": 4436 }, "name": "stack_size", "type": { @@ -154629,7 +178678,7 @@ "location": { "column": 92, "file": "", - "line": 5119 + "line": 4436 }, "name": "user_data", "type": { @@ -154677,14 +178726,14 @@ "location": { "column": 27, "file": "", - "line": 5179 + "line": 4496 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 5179 + "line": 4496 }, "name": "sync", "type": { @@ -154732,14 +178781,14 @@ "location": { "column": 27, "file": "", - "line": 5159 + "line": 4476 }, "parameters": [ { "location": { "column": 64, "file": "", - "line": 5159 + "line": 4476 }, "name": "sync", "type": { @@ -154787,14 +178836,14 @@ "location": { "column": 27, "file": "", - "line": 5169 + "line": 4486 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 5169 + "line": 4486 }, "name": "sync", "type": { @@ -154842,14 +178891,14 @@ "location": { "column": 27, "file": "", - "line": 5174 + "line": 4491 }, "parameters": [ { "location": { "column": 70, "file": "", - "line": 5174 + "line": 4491 }, "name": "sync", "type": { @@ -154897,14 +178946,14 @@ "location": { "column": 27, "file": "", - "line": 5164 + "line": 4481 }, "parameters": [ { "location": { "column": 64, "file": "", - "line": 5164 + "line": 4481 }, "name": "sync", "type": { @@ -154950,14 +178999,14 @@ "location": { "column": 10, "file": "", - "line": 426 + "line": 3453 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 426 + "line": 3453 }, "name": "tick", "type": { @@ -154974,7 +179023,7 @@ "location": { "column": 47, "file": "", - "line": 426 + "line": 3453 }, "name": "prev_tick", "type": { @@ -155015,14 +179064,14 @@ "location": { "column": 10, "file": "", - "line": 425 + "line": 3452 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 425 + "line": 3452 }, "name": "prev_tick", "type": { @@ -155063,7 +179112,7 @@ "location": { "column": 10, "file": "", - "line": 424 + "line": 3451 }, "parameters": [], "python_name": "tick_get", @@ -155093,7 +179142,7 @@ "location": { "column": 18, "file": "", - "line": 430 + "line": 3457 }, "parameters": [], "python_name": "tick_get_cb", @@ -155123,14 +179172,14 @@ "location": { "column": 7, "file": "", - "line": 423 + "line": 3450 }, "parameters": [ { "location": { "column": 28, "file": "", - "line": 423 + "line": 3450 }, "name": "tick_period", "type": { @@ -155171,14 +179220,14 @@ "location": { "column": 6, "file": "", - "line": 429 + "line": 3456 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 429 + "line": 3456 }, "name": "cb", "type": { @@ -155219,14 +179268,14 @@ "location": { "column": 12, "file": "", - "line": 4914 + "line": 4358 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 4914 + "line": 4358 }, "name": "tv", "type": { @@ -155246,7 +179295,7 @@ "location": { "column": 56, "file": "", - "line": 4914 + "line": 4358 }, "name": "col_id", "type": { @@ -155263,7 +179312,7 @@ "location": { "column": 72, "file": "", - "line": 4914 + "line": 4358 }, "name": "row_id", "type": { @@ -155280,7 +179329,7 @@ "location": { "column": 89, "file": "", - "line": 4914 + "line": 4358 }, "name": "dir", "type": { @@ -155325,14 +179374,14 @@ "location": { "column": 12, "file": "", - "line": 4913 + "line": 4357 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4913 + "line": 4357 }, "name": "parent", "type": { @@ -155380,14 +179429,14 @@ "location": { "column": 12, "file": "", - "line": 4917 + "line": 4361 }, "parameters": [ { "location": { "column": 49, "file": "", - "line": 4917 + "line": 4361 }, "name": "obj", "type": { @@ -155435,16 +179484,16 @@ "location": { "column": 6, "file": "", - "line": 4915 + "line": 4359 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 4915 + "line": 4359 }, - "name": "tv", + "name": "obj", "type": { "kind": "pointer", "target": { @@ -155460,9 +179509,9 @@ }, { "location": { - "column": 51, + "column": 52, "file": "", - "line": 4915 + "line": 4359 }, "name": "tile_obj", "type": { @@ -155480,9 +179529,9 @@ }, { "location": { - "column": 80, + "column": 81, "file": "", - "line": 4915 + "line": 4359 }, "name": "anim_en", "type": { @@ -155524,14 +179573,14 @@ "location": { "column": 6, "file": "", - "line": 4916 + "line": 4360 }, "parameters": [ { "location": { "column": 45, "file": "", - "line": 4916 + "line": 4360 }, "name": "tv", "type": { @@ -155551,7 +179600,7 @@ "location": { "column": 60, "file": "", - "line": 4916 + "line": 4360 }, "name": "col_id", "type": { @@ -155568,7 +179617,7 @@ "location": { "column": 77, "file": "", - "line": 4916 + "line": 4360 }, "name": "row_id", "type": { @@ -155585,7 +179634,7 @@ "location": { "column": 102, "file": "", - "line": 4916 + "line": 4360 }, "name": "anim_en", "type": { @@ -155627,7 +179676,7 @@ "location": { "column": 6, "file": "", - "line": 5209 + "line": 4702 }, "parameters": [], "python_name": "timer_core_deinit", @@ -155657,7 +179706,7 @@ "location": { "column": 6, "file": "", - "line": 5208 + "line": 4701 }, "parameters": [], "python_name": "timer_core_init", @@ -155687,14 +179736,14 @@ "location": { "column": 14, "file": "", - "line": 459 + "line": 1730 }, "parameters": [ { "location": { "column": 44, "file": "", - "line": 459 + "line": 1730 }, "name": "timer_xcb", "type": { @@ -155711,7 +179760,7 @@ "location": { "column": 64, "file": "", - "line": 459 + "line": 1730 }, "name": "period", "type": { @@ -155728,7 +179777,7 @@ "location": { "column": 77, "file": "", - "line": 459 + "line": 1730 }, "name": "user_data", "type": { @@ -155775,7 +179824,7 @@ "location": { "column": 14, "file": "", - "line": 458 + "line": 1729 }, "parameters": [], "python_name": "timer_create_basic", @@ -155808,14 +179857,14 @@ "location": { "column": 6, "file": "", - "line": 460 + "line": 1731 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 460 + "line": 1731 }, "name": "timer", "type": { @@ -155860,14 +179909,14 @@ "location": { "column": 6, "file": "", - "line": 470 + "line": 1741 }, "parameters": [ { "location": { "column": 27, "file": "", - "line": 470 + "line": 1741 }, "name": "en", "type": { @@ -155908,7 +179957,7 @@ "location": { "column": 10, "file": "", - "line": 471 + "line": 1742 }, "parameters": [], "python_name": "timer_get_idle", @@ -155938,14 +179987,14 @@ "location": { "column": 14, "file": "", - "line": 473 + "line": 1744 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 473 + "line": 1744 }, "name": "timer", "type": { @@ -155993,14 +180042,14 @@ "location": { "column": 6, "file": "", - "line": 475 + "line": 1746 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 475 + "line": 1746 }, "name": "timer", "type": { @@ -156034,6 +180083,36 @@ "variadic": false, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_timer_get_time_to_next", + "function_specifiers": [], + "location": { + "column": 11, + "file": "", + "line": 1726 + }, + "parameters": [], + "python_name": "timer_get_time_to_next", + "return_type": { + "kind": "identifier", + "name": "uint32_t" + }, + "return_view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + }, + "role": "module", + "static": false, + "storage": [], + "variadic": false, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -156045,7 +180124,7 @@ "location": { "column": 10, "file": "", - "line": 472 + "line": 1743 }, "parameters": [], "python_name": "timer_get_time_until_next", @@ -156075,14 +180154,14 @@ "location": { "column": 8, "file": "", - "line": 474 + "line": 1745 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 474 + "line": 1745 }, "name": "timer", "type": { @@ -156130,7 +180209,7 @@ "location": { "column": 11, "file": "", - "line": 454 + "line": 1724 }, "parameters": [], "python_name": "timer_handler", @@ -156160,14 +180239,14 @@ "location": { "column": 11, "file": "", - "line": 455 + "line": 1725 }, "parameters": [ { "location": { "column": 51, "file": "", - "line": 455 + "line": 1725 }, "name": "period", "type": { @@ -156208,14 +180287,14 @@ "location": { "column": 6, "file": "", - "line": 457 + "line": 1728 }, "parameters": [ { "location": { "column": 66, "file": "", - "line": 457 + "line": 1728 }, "name": "cb", "type": { @@ -156232,7 +180311,7 @@ "location": { "column": 75, "file": "", - "line": 457 + "line": 1728 }, "name": "data", "type": { @@ -156276,14 +180355,14 @@ "location": { "column": 6, "file": "", - "line": 461 + "line": 1732 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 461 + "line": 1732 }, "name": "timer", "type": { @@ -156328,7 +180407,7 @@ "location": { "column": 7, "file": "", - "line": 456 + "line": 1727 }, "parameters": [], "python_name": "timer_periodic_handler", @@ -156358,14 +180437,14 @@ "location": { "column": 6, "file": "", - "line": 465 + "line": 1736 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 465 + "line": 1736 }, "name": "timer", "type": { @@ -156410,14 +180489,14 @@ "location": { "column": 6, "file": "", - "line": 469 + "line": 1740 }, "parameters": [ { "location": { "column": 32, "file": "", - "line": 469 + "line": 1740 }, "name": "timer", "type": { @@ -156462,14 +180541,14 @@ "location": { "column": 6, "file": "", - "line": 462 + "line": 1733 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 462 + "line": 1733 }, "name": "timer", "type": { @@ -156514,14 +180593,14 @@ "location": { "column": 6, "file": "", - "line": 467 + "line": 1738 }, "parameters": [ { "location": { "column": 42, "file": "", - "line": 467 + "line": 1738 }, "name": "timer", "type": { @@ -156541,7 +180620,7 @@ "location": { "column": 56, "file": "", - "line": 467 + "line": 1738 }, "name": "auto_delete", "type": { @@ -156583,14 +180662,14 @@ "location": { "column": 6, "file": "", - "line": 463 + "line": 1734 }, "parameters": [ { "location": { "column": 33, "file": "", - "line": 463 + "line": 1734 }, "name": "timer", "type": { @@ -156610,7 +180689,7 @@ "location": { "column": 56, "file": "", - "line": 463 + "line": 1734 }, "name": "timer_cb", "type": { @@ -156652,14 +180731,14 @@ "location": { "column": 6, "file": "", - "line": 464 + "line": 1735 }, "parameters": [ { "location": { "column": 37, "file": "", - "line": 464 + "line": 1735 }, "name": "timer", "type": { @@ -156679,7 +180758,7 @@ "location": { "column": 55, "file": "", - "line": 464 + "line": 1735 }, "name": "period", "type": { @@ -156721,14 +180800,14 @@ "location": { "column": 6, "file": "", - "line": 466 + "line": 1737 }, "parameters": [ { "location": { "column": 43, "file": "", - "line": 466 + "line": 1737 }, "name": "timer", "type": { @@ -156748,7 +180827,7 @@ "location": { "column": 60, "file": "", - "line": 466 + "line": 1737 }, "name": "repeat_count", "type": { @@ -156790,14 +180869,14 @@ "location": { "column": 6, "file": "", - "line": 468 + "line": 1739 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 468 + "line": 1739 }, "name": "timer", "type": { @@ -156817,7 +180896,7 @@ "location": { "column": 54, "file": "", - "line": 468 + "line": 1739 }, "name": "user_data", "type": { @@ -156862,7 +180941,7 @@ "location": { "column": 6, "file": "", - "line": 4959 + "line": 3420 }, "parameters": [], "policy_reason": "LV_USE_TJPGD is 0 on every target: the JPEG decoder is jpegio's, registered through lv_image_decoder_create by displayif (MicroPython), lvgl-circuitpython (CircuitPython) and lvgl-python (CPython); one TJpgDec per build (displayif#23, lvgl-bindings#14, lvgl-python#23).", @@ -156893,7 +180972,7 @@ "location": { "column": 6, "file": "", - "line": 4958 + "line": 3419 }, "parameters": [], "policy_reason": "LV_USE_TJPGD is 0 on every target: the JPEG decoder is jpegio's, registered through lv_image_decoder_create by displayif (MicroPython), lvgl-circuitpython (CircuitPython) and lvgl-python (CPython); one TJpgDec per build (displayif#23, lvgl-bindings#14, lvgl-python#23).", @@ -156924,14 +181003,14 @@ "location": { "column": 18, "file": "", - "line": 1129 + "line": 6779 }, "parameters": [ { "location": { "column": 60, "file": "", - "line": 1129 + "line": 6779 }, "name": "class_p", "type": { @@ -156954,7 +181033,7 @@ "location": { "column": 86, "file": "", - "line": 1129 + "line": 6779 }, "name": "parent", "type": { @@ -157002,14 +181081,14 @@ "location": { "column": 6, "file": "", - "line": 1130 + "line": 6780 }, "parameters": [ { "location": { "column": 41, "file": "", - "line": 1130 + "line": 6780 }, "name": "node", "type": { @@ -157054,14 +181133,14 @@ "location": { "column": 6, "file": "", - "line": 1131 + "line": 6781 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 1131 + "line": 6781 }, "name": "node", "type": { @@ -157084,7 +181163,7 @@ "location": { "column": 39, "file": "", - "line": 1132 + "line": 6782 }, "name": "mode", "type": { @@ -157101,7 +181180,7 @@ "location": { "column": 41, "file": "", - "line": 1133 + "line": 6783 }, "name": "cb", "type": { @@ -157118,7 +181197,7 @@ "location": { "column": 39, "file": "", - "line": 1134 + "line": 6784 }, "name": "bcb", "type": { @@ -157135,7 +181214,7 @@ "location": { "column": 38, "file": "", - "line": 1135 + "line": 6785 }, "name": "acb", "type": { @@ -157152,7 +181231,7 @@ "location": { "column": 24, "file": "", - "line": 1136 + "line": 6786 }, "name": "user_data", "type": { @@ -157197,14 +181276,14 @@ "location": { "column": 9, "file": "", - "line": 481 + "line": 357 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 481 + "line": 357 }, "name": "angle", "type": { @@ -157245,14 +181324,14 @@ "location": { "column": 9, "file": "", - "line": 480 + "line": 356 }, "parameters": [ { "location": { "column": 30, "file": "", - "line": 480 + "line": 356 }, "name": "angle", "type": { @@ -157293,7 +181372,7 @@ "location": { "column": 6, "file": "", - "line": 1139 + "line": 3426 }, "parameters": [], "python_name": "unlock", @@ -157323,14 +181402,14 @@ "location": { "column": 8, "file": "", - "line": 1057 + "line": 6787 }, "parameters": [ { "location": { "column": 36, "file": "", - "line": 1057 + "line": 6787 }, "name": "key", "type": { @@ -157353,7 +181432,7 @@ "location": { "column": 54, "file": "", - "line": 1057 + "line": 6787 }, "name": "base", "type": { @@ -157376,7 +181455,7 @@ "location": { "column": 69, "file": "", - "line": 1057 + "line": 6787 }, "name": "n", "type": { @@ -157393,7 +181472,7 @@ "location": { "column": 79, "file": "", - "line": 1057 + "line": 6787 }, "name": "size", "type": { @@ -157410,7 +181489,7 @@ "location": { "column": 30, "file": "", - "line": 1058 + "line": 6788 }, "name": "cmp", "type": { @@ -157422,7 +181501,7 @@ "location": { "column": 47, "file": "", - "line": 1058 + "line": 6788 }, "name": "pRef", "type": { @@ -157440,7 +181519,7 @@ "location": { "column": 66, "file": "", - "line": 1058 + "line": 6788 }, "name": "pElement", "type": { @@ -157500,7 +181579,7 @@ "location": { "column": 28, "file": "", - "line": 6474 + "line": 4412 }, "parameters": [], "python_name": "version_info", @@ -157540,7 +181619,7 @@ "location": { "column": 19, "file": "", - "line": 6462 + "line": 4400 }, "parameters": [], "python_name": "version_major", @@ -157574,7 +181653,7 @@ "location": { "column": 19, "file": "", - "line": 6466 + "line": 4404 }, "parameters": [], "python_name": "version_minor", @@ -157608,7 +181687,7 @@ "location": { "column": 19, "file": "", - "line": 6470 + "line": 4408 }, "parameters": [], "python_name": "version_patch", @@ -157640,14 +181719,14 @@ "location": { "column": 5, "file": "", - "line": 413 + "line": 1225 }, "parameters": [ { "location": { "column": 23, "file": "", - "line": 413 + "line": 1225 }, "name": "buffer", "type": { @@ -157667,7 +181746,7 @@ "location": { "column": 40, "file": "", - "line": 413 + "line": 1225 }, "name": "count", "type": { @@ -157684,7 +181763,7 @@ "location": { "column": 58, "file": "", - "line": 413 + "line": 1225 }, "name": "format", "type": { @@ -157707,7 +181786,7 @@ "location": { "column": 76, "file": "", - "line": 413 + "line": 1225 }, "name": "va", "type": { @@ -157749,14 +181828,14 @@ "location": { "column": 12, "file": "", - "line": 4921 + "line": 4368 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4921 + "line": 4368 }, "name": "win", "type": { @@ -157776,7 +181855,7 @@ "location": { "column": 57, "file": "", - "line": 4921 + "line": 4368 }, "name": "icon", "type": { @@ -157799,7 +181878,7 @@ "location": { "column": 73, "file": "", - "line": 4921 + "line": 4368 }, "name": "btn_w", "type": { @@ -157844,14 +181923,14 @@ "location": { "column": 12, "file": "", - "line": 4920 + "line": 4366 }, "parameters": [ { "location": { "column": 38, "file": "", - "line": 4920 + "line": 4366 }, "name": "win", "type": { @@ -157871,7 +181950,7 @@ "location": { "column": 56, "file": "", - "line": 4920 + "line": 4366 }, "name": "txt", "type": { @@ -157922,14 +182001,14 @@ "location": { "column": 12, "file": "", - "line": 4919 + "line": 4364 }, "parameters": [ { "location": { "column": 35, "file": "", - "line": 4919 + "line": 4364 }, "name": "parent", "type": { @@ -157977,14 +182056,14 @@ "location": { "column": 12, "file": "", - "line": 4923 + "line": 4372 }, "parameters": [ { "location": { "column": 40, "file": "", - "line": 4923 + "line": 4372 }, "name": "win", "type": { @@ -158032,14 +182111,14 @@ "location": { "column": 12, "file": "", - "line": 4922 + "line": 4370 }, "parameters": [ { "location": { "column": 39, "file": "", - "line": 4922 + "line": 4370 }, "name": "win", "type": { @@ -158087,14 +182166,14 @@ "location": { "column": 8, "file": "", - "line": 400 + "line": 814 }, "parameters": [ { "location": { "column": 25, "file": "", - "line": 400 + "line": 814 }, "name": "size", "type": { @@ -158384,12 +182463,16 @@ "get_encoding", "get_light_color", "get_scale", + "get_update_mode", + "is_render_valid", + "render", "set_dark_color", "set_direction", "set_encoding", "set_light_color", "set_scale", "set_tiled", + "set_update_mode", "update" ], "parent": "obj", @@ -158770,6 +182853,7 @@ "get_letter_on", "get_letter_pos", "get_long_mode", + "get_max_lines", "get_recolor", "get_text", "get_text_selection_end", @@ -158777,6 +182861,7 @@ "ins_text", "is_char_under_pos", "set_long_mode", + "set_max_lines", "set_recolor", "set_text", "set_text_selection_end", @@ -158965,6 +183050,8 @@ "c_type": "lv_obj_t", "constructor": "lv_obj_create", "methods": [ + "add_child", + "add_delete_cb", "add_event_cb", "add_flag", "add_play_timeline_event", @@ -158981,25 +183068,32 @@ "align_to", "allocate_spec_attr", "area_is_visible", + "bind_bool", "bind_checked", + "bind_color", "bind_flag_if_eq", "bind_flag_if_ge", "bind_flag_if_gt", "bind_flag_if_le", "bind_flag_if_lt", "bind_flag_if_not_eq", + "bind_float", + "bind_int", + "bind_pointer", "bind_state_if_eq", "bind_state_if_ge", "bind_state_if_gt", "bind_state_if_le", "bind_state_if_lt", "bind_state_if_not_eq", + "bind_string", "bind_style", "bind_style_prop", "calc_dynamic_height", "calc_dynamic_width", "calculate_ext_draw_size", "calculate_style_text_align", + "calculate_style_text_align_internal", "center", "check_type", "class_create_obj", @@ -159055,159 +183149,310 @@ "get_sibling_by_type", "get_state", "get_style_align", + "get_style_align_internal", "get_style_anim", "get_style_anim_duration", + "get_style_anim_duration_internal", + "get_style_anim_internal", "get_style_arc_color", "get_style_arc_color_filtered", + "get_style_arc_color_filtered_internal", + "get_style_arc_color_internal", "get_style_arc_image_src", + "get_style_arc_image_src_internal", "get_style_arc_opa", + "get_style_arc_opa_internal", "get_style_arc_rounded", + "get_style_arc_rounded_internal", "get_style_arc_width", + "get_style_arc_width_internal", "get_style_base_dir", + "get_style_base_dir_internal", "get_style_bg_color", "get_style_bg_color_filtered", + "get_style_bg_color_filtered_internal", + "get_style_bg_color_internal", "get_style_bg_grad", "get_style_bg_grad_color", "get_style_bg_grad_color_filtered", + "get_style_bg_grad_color_filtered_internal", + "get_style_bg_grad_color_internal", "get_style_bg_grad_dir", + "get_style_bg_grad_dir_internal", + "get_style_bg_grad_internal", "get_style_bg_grad_opa", + "get_style_bg_grad_opa_internal", "get_style_bg_grad_stop", + "get_style_bg_grad_stop_internal", "get_style_bg_image_opa", + "get_style_bg_image_opa_internal", "get_style_bg_image_recolor", "get_style_bg_image_recolor_filtered", + "get_style_bg_image_recolor_filtered_internal", + "get_style_bg_image_recolor_internal", "get_style_bg_image_recolor_opa", + "get_style_bg_image_recolor_opa_internal", "get_style_bg_image_src", + "get_style_bg_image_src_internal", "get_style_bg_image_tiled", + "get_style_bg_image_tiled_internal", "get_style_bg_main_opa", + "get_style_bg_main_opa_internal", "get_style_bg_main_stop", + "get_style_bg_main_stop_internal", "get_style_bg_opa", + "get_style_bg_opa_internal", "get_style_bitmap_mask_src", + "get_style_bitmap_mask_src_internal", "get_style_blend_mode", + "get_style_blend_mode_internal", "get_style_blur_backdrop", + "get_style_blur_backdrop_internal", "get_style_blur_quality", + "get_style_blur_quality_internal", "get_style_blur_radius", + "get_style_blur_radius_internal", "get_style_border_color", "get_style_border_color_filtered", + "get_style_border_color_filtered_internal", + "get_style_border_color_internal", "get_style_border_opa", + "get_style_border_opa_internal", "get_style_border_post", + "get_style_border_post_internal", "get_style_border_side", + "get_style_border_side_internal", "get_style_border_width", + "get_style_border_width_internal", "get_style_clamped_height", "get_style_clamped_width", "get_style_clip_corner", + "get_style_clip_corner_internal", "get_style_color_filter_dsc", + "get_style_color_filter_dsc_internal", "get_style_color_filter_opa", + "get_style_color_filter_opa_internal", "get_style_drop_shadow_color", "get_style_drop_shadow_color_filtered", + "get_style_drop_shadow_color_filtered_internal", + "get_style_drop_shadow_color_internal", "get_style_drop_shadow_offset_x", + "get_style_drop_shadow_offset_x_internal", "get_style_drop_shadow_offset_y", + "get_style_drop_shadow_offset_y_internal", "get_style_drop_shadow_opa", + "get_style_drop_shadow_opa_internal", "get_style_drop_shadow_quality", + "get_style_drop_shadow_quality_internal", "get_style_drop_shadow_radius", + "get_style_drop_shadow_radius_internal", + "get_style_enabled", "get_style_flex_cross_place", + "get_style_flex_cross_place_internal", "get_style_flex_flow", + "get_style_flex_flow_internal", "get_style_flex_grow", + "get_style_flex_grow_internal", "get_style_flex_main_place", + "get_style_flex_main_place_internal", "get_style_flex_track_place", + "get_style_flex_track_place_internal", "get_style_grid_cell_column_pos", + "get_style_grid_cell_column_pos_internal", "get_style_grid_cell_column_span", + "get_style_grid_cell_column_span_internal", "get_style_grid_cell_row_pos", + "get_style_grid_cell_row_pos_internal", "get_style_grid_cell_row_span", + "get_style_grid_cell_row_span_internal", "get_style_grid_cell_x_align", + "get_style_grid_cell_x_align_internal", "get_style_grid_cell_y_align", + "get_style_grid_cell_y_align_internal", "get_style_grid_column_align", + "get_style_grid_column_align_internal", "get_style_grid_column_dsc_array", + "get_style_grid_column_dsc_array_internal", "get_style_grid_row_align", + "get_style_grid_row_align_internal", "get_style_grid_row_dsc_array", + "get_style_grid_row_dsc_array_internal", "get_style_height", + "get_style_height_internal", "get_style_image_colorkey", + "get_style_image_colorkey_internal", "get_style_image_opa", + "get_style_image_opa_internal", "get_style_image_recolor", "get_style_image_recolor_filtered", + "get_style_image_recolor_filtered_internal", + "get_style_image_recolor_internal", "get_style_image_recolor_opa", + "get_style_image_recolor_opa_internal", "get_style_layout", + "get_style_layout_internal", "get_style_length", + "get_style_length_internal", "get_style_line_color", "get_style_line_color_filtered", + "get_style_line_color_filtered_internal", + "get_style_line_color_internal", "get_style_line_dash_gap", + "get_style_line_dash_gap_internal", "get_style_line_dash_width", + "get_style_line_dash_width_internal", "get_style_line_opa", + "get_style_line_opa_internal", "get_style_line_rounded", + "get_style_line_rounded_internal", "get_style_line_width", + "get_style_line_width_internal", "get_style_margin_bottom", + "get_style_margin_bottom_internal", "get_style_margin_left", + "get_style_margin_left_internal", "get_style_margin_right", + "get_style_margin_right_internal", "get_style_margin_top", + "get_style_margin_top_internal", "get_style_max_height", + "get_style_max_height_internal", "get_style_max_width", + "get_style_max_width_internal", "get_style_min_height", + "get_style_min_height_internal", "get_style_min_width", + "get_style_min_width_internal", "get_style_opa", + "get_style_opa_internal", "get_style_opa_layered", + "get_style_opa_layered_internal", "get_style_opa_recursive", "get_style_outline_color", "get_style_outline_color_filtered", + "get_style_outline_color_filtered_internal", + "get_style_outline_color_internal", "get_style_outline_opa", + "get_style_outline_opa_internal", "get_style_outline_pad", + "get_style_outline_pad_internal", "get_style_outline_width", + "get_style_outline_width_internal", "get_style_pad_bottom", + "get_style_pad_bottom_internal", "get_style_pad_column", + "get_style_pad_column_internal", "get_style_pad_left", + "get_style_pad_left_internal", "get_style_pad_radial", + "get_style_pad_radial_internal", "get_style_pad_right", + "get_style_pad_right_internal", "get_style_pad_row", + "get_style_pad_row_internal", "get_style_pad_top", + "get_style_pad_top_internal", "get_style_prop", + "get_style_prop_internal", "get_style_radial_offset", + "get_style_radial_offset_internal", "get_style_radius", + "get_style_radius_internal", "get_style_recolor", + "get_style_recolor_internal", "get_style_recolor_opa", + "get_style_recolor_opa_internal", "get_style_recolor_recursive", "get_style_rotary_sensitivity", + "get_style_rotary_sensitivity_internal", "get_style_shadow_color", "get_style_shadow_color_filtered", + "get_style_shadow_color_filtered_internal", + "get_style_shadow_color_internal", "get_style_shadow_offset_x", + "get_style_shadow_offset_x_internal", "get_style_shadow_offset_y", + "get_style_shadow_offset_y_internal", "get_style_shadow_opa", + "get_style_shadow_opa_internal", "get_style_shadow_spread", + "get_style_shadow_spread_internal", "get_style_shadow_width", + "get_style_shadow_width_internal", "get_style_space_bottom", + "get_style_space_bottom_internal", "get_style_space_left", + "get_style_space_left_internal", "get_style_space_right", + "get_style_space_right_internal", "get_style_space_top", + "get_style_space_top_internal", "get_style_text_align", + "get_style_text_align_internal", "get_style_text_color", "get_style_text_color_filtered", + "get_style_text_color_filtered_internal", + "get_style_text_color_internal", "get_style_text_decor", + "get_style_text_decor_internal", "get_style_text_font", + "get_style_text_font_internal", + "get_style_text_leading_trim", + "get_style_text_leading_trim_internal", "get_style_text_letter_space", + "get_style_text_letter_space_internal", "get_style_text_line_space", + "get_style_text_line_space_internal", "get_style_text_opa", + "get_style_text_opa_internal", "get_style_text_outline_stroke_color", "get_style_text_outline_stroke_color_filtered", + "get_style_text_outline_stroke_color_filtered_internal", + "get_style_text_outline_stroke_color_internal", "get_style_text_outline_stroke_opa", + "get_style_text_outline_stroke_opa_internal", "get_style_text_outline_stroke_width", + "get_style_text_outline_stroke_width_internal", "get_style_transform_height", + "get_style_transform_height_internal", "get_style_transform_pivot_x", + "get_style_transform_pivot_x_internal", "get_style_transform_pivot_y", + "get_style_transform_pivot_y_internal", "get_style_transform_rotation", + "get_style_transform_rotation_internal", "get_style_transform_scale_x", + "get_style_transform_scale_x_internal", "get_style_transform_scale_x_safe", + "get_style_transform_scale_x_safe_internal", "get_style_transform_scale_y", + "get_style_transform_scale_y_internal", "get_style_transform_scale_y_safe", + "get_style_transform_scale_y_safe_internal", "get_style_transform_skew_x", + "get_style_transform_skew_x_internal", "get_style_transform_skew_y", + "get_style_transform_skew_y_internal", "get_style_transform_width", + "get_style_transform_width_internal", "get_style_transition", + "get_style_transition_internal", "get_style_translate_radial", + "get_style_translate_radial_internal", "get_style_translate_x", + "get_style_translate_x_internal", "get_style_translate_y", + "get_style_translate_y_internal", "get_style_width", + "get_style_width_internal", "get_style_x", + "get_style_x_internal", "get_style_y", + "get_style_y_internal", "get_transform", "get_transformed_area", "get_user_data", + "get_user_flag", "get_width", "get_x", "get_x2", @@ -159229,14 +183474,54 @@ "init_draw_rect_dsc", "invalidate", "invalidate_area", + "invalidate_expand_blur", + "is_adv_hittest", + "is_alt", + "is_checkable", + "is_checked", + "is_click_focusable", + "is_clickable", + "is_disabled", "is_editable", + "is_edited", + "is_event_bubble", + "is_event_trickle", + "is_flex_in_new_track", + "is_floating", + "is_focus_key", + "is_focused", + "is_gesture_bubble", "is_group_def", "is_height_max", "is_height_min", + "is_hidden", + "is_hovered", + "is_ignore_layout", + "is_in_widget_tree", "is_layout_positioned", + "is_overflow_visible", + "is_press_lock", + "is_pressed", "is_radio_button", + "is_scroll_chain_hor", + "is_scroll_chain_ver", + "is_scroll_elastic", + "is_scroll_momentum", + "is_scroll_on_focus", + "is_scroll_one", + "is_scroll_with_arrow", + "is_scrollable", + "is_scrolled", "is_scrolling", - "is_valid", + "is_send_draw_task_events", + "is_snappable", + "is_state_trickle", + "is_state_user_1", + "is_state_user_2", + "is_state_user_3", + "is_state_user_4", + "is_style_any_height_content", + "is_style_any_width_content", "is_visible", "is_width_max", "is_width_min", @@ -159255,6 +183540,8 @@ "refresh_ext_draw_size", "refresh_self_size", "refresh_style", + "remove_child", + "remove_delete_cb", "remove_event", "remove_event_cb", "remove_event_cb_with_user_data", @@ -159279,29 +183566,68 @@ "scroll_to_y", "scrollbar_invalidate", "send_event", + "set_adv_hittest", "set_align", + "set_alt", + "set_checkable", + "set_checked", + "set_click_focusable", + "set_clickable", "set_content_height", "set_content_width", + "set_disabled", + "set_edited", + "set_event_bubble", + "set_event_trickle", "set_ext_click_area", + "set_ext_draw_size", "set_flag", "set_flex_align", "set_flex_flow", "set_flex_grow", + "set_flex_in_new_track", + "set_floating", + "set_focus_key", + "set_focused", + "set_gesture_bubble", "set_grid_align", "set_grid_cell", "set_grid_dsc_array", "set_height", + "set_hidden", + "set_hovered", + "set_ignore_layout", "set_layout", "set_local_style_prop", + "set_overflow_visible", "set_parent", "set_pos", + "set_press_lock", + "set_pressed", "set_radio_button", + "set_scroll_chain", + "set_scroll_chain_hor", + "set_scroll_chain_ver", "set_scroll_dir", + "set_scroll_elastic", + "set_scroll_momentum", + "set_scroll_on_focus", + "set_scroll_one", "set_scroll_snap_x", "set_scroll_snap_y", + "set_scroll_with_arrow", + "set_scrollable", "set_scrollbar_mode", + "set_scrolled", + "set_send_draw_task_events", "set_size", + "set_snappable", "set_state", + "set_state_trickle", + "set_state_user_1", + "set_state_user_2", + "set_state_user_3", + "set_state_user_4", "set_style_align", "set_style_anim", "set_style_anim_duration", @@ -159344,6 +183670,7 @@ "set_style_drop_shadow_opa", "set_style_drop_shadow_quality", "set_style_drop_shadow_radius", + "set_style_enabled", "set_style_flex_cross_place", "set_style_flex_flow", "set_style_flex_grow", @@ -159416,6 +183743,7 @@ "set_style_text_color", "set_style_text_decor", "set_style_text_font", + "set_style_text_leading_trim", "set_style_text_letter_space", "set_style_text_line_space", "set_style_text_opa", @@ -159444,11 +183772,13 @@ "set_subject_increment_event_rollover", "set_transform", "set_user_data", + "set_user_flag", "set_width", "set_x", "set_y", "stop_scroll_anim", "style_apply_color_filter", + "style_apply_color_filter_internal", "style_apply_recolor", "style_create_transition", "style_deinit", @@ -159462,6 +183792,7 @@ "transform_point", "transform_point_array", "tree_walk", + "update_blur_status", "update_layer_type", "update_layout", "update_snap" @@ -159479,11 +183810,15 @@ "c_type": "lv_qrcode_t", "constructor": "lv_qrcode_create", "methods": [ + "get_update_mode", + "is_render_valid", + "render", "set_dark_color", "set_data", "set_light_color", "set_quiet_zone", "set_size", + "set_update_mode", "update" ], "parent": "obj", @@ -159524,6 +183859,8 @@ "constructor": "lv_scale_create", "methods": [ "add_section", + "bind_image_needle_value", + "bind_line_needle_value", "bind_section_max_value", "bind_section_min_value", "get_angle_range", @@ -160066,7 +184403,7 @@ "location": { "column": 16, "file": "", - "line": 309 + "line": 306 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -160089,7 +184426,7 @@ "location": { "column": 8, "file": "", - "line": 5470 + "line": 4861 }, "methods": [], "policy_reason": "outside module prefix", @@ -160159,7 +184496,7 @@ "location": { "column": 16, "file": "", - "line": 556 + "line": 381 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -160246,7 +184583,7 @@ "location": { "column": 16, "file": "", - "line": 5210 + "line": 4703 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -160605,7 +184942,7 @@ "location": { "column": 8, "file": "", - "line": 562 + "line": 387 }, "methods": [ "custom_delete", @@ -160719,7 +185056,7 @@ "location": { "column": 16, "file": "", - "line": 643 + "line": 468 }, "methods": [], "python_name": "anim_timeline_dsc_t", @@ -160844,7 +185181,7 @@ "location": { "column": 8, "file": "", - "line": 6087 + "line": 6524 }, "methods": [ "add", @@ -160858,6 +185195,7 @@ "get_user_data", "merge", "pause", + "restart", "set_delay", "set_progress", "set_repeat_count", @@ -160943,7 +185281,7 @@ "location": { "column": 8, "file": "", - "line": 6242 + "line": 6830 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -161175,7 +185513,7 @@ "location": { "column": 8, "file": "", - "line": 6383 + "line": 6836 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -161192,13 +185530,219 @@ "cpython" ], "c_name": "_lv_arclabel_t", - "complete": false, - "fields": [], + "complete": true, + "fields": [ + { + "name": "obj", + "type": { + "kind": "identifier", + "name": "lv_obj_t" + }, + "view": { + "category": "object", + "conversion": "object_handle", + "python_type": "obj" + } + }, + { + "name": "text", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char" + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + }, + { + "name": "dot", + "type": { + "dimensions": [ + "3 + 1" + ], + "element": { + "kind": "primitive", + "name": "char" + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[int]" + } + }, + { + "name": "dot_begin", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "angle_start", + "type": { + "kind": "identifier", + "name": "lv_value_precise_t" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "angle_size", + "type": { + "kind": "identifier", + "name": "lv_value_precise_t" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "offset", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "radius", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "center_offset", + "type": { + "kind": "identifier", + "name": "lv_point_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "point_t" + } + }, + { + "name": "dir", + "type": { + "kind": "identifier", + "name": "lv_arclabel_dir_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "arclabel.DIR | int" + } + }, + { + "name": "text_align_v", + "type": { + "kind": "identifier", + "name": "lv_arclabel_text_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "arclabel.TEXT_ALIGN | int" + } + }, + { + "name": "text_align_h", + "type": { + "kind": "identifier", + "name": "lv_arclabel_text_align_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "arclabel.TEXT_ALIGN | int" + } + }, + { + "bit_width": "1", + "name": "static_txt", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "recolor", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "2", + "name": "overflow", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "end_overlap", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], "kind": "struct", "location": { - "column": 16, + "column": 8, "file": "", - "line": 269 + "line": 6855 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -161270,7 +185814,7 @@ "location": { "column": 16, "file": "", - "line": 694 + "line": 502 }, "methods": [ "align", @@ -161374,9 +185918,9 @@ ], "kind": "struct", "location": { - "column": 8, + "column": 16, "file": "", - "line": 495 + "line": 4944 }, "methods": [ "assign", @@ -161507,7 +186051,7 @@ "location": { "column": 8, "file": "", - "line": 6115 + "line": 6873 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -161665,7 +186209,7 @@ "location": { "column": 8, "file": "", - "line": 6121 + "line": 6879 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -161720,6 +186264,48 @@ "python_type": "color_t" } }, + { + "name": "data", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char" + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + }, + { + "name": "pattern", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "uint8_t" + } + }, + "view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + } + }, + { + "name": "bar_count", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, { "name": "scale", "type": { @@ -161745,10 +186331,23 @@ } }, { + "name": "encoding", + "type": { + "kind": "identifier", + "name": "lv_barcode_encoding_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "barcode.ENCODING_CODE128 | int" + } + }, + { + "bit_width": "1", "name": "tiled", "type": { - "kind": "primitive", - "name": "bool" + "kind": "identifier", + "name": "uint8_t" }, "view": { "category": "scalar", @@ -161757,15 +186356,55 @@ } }, { - "name": "encoding", + "bit_width": "1", + "name": "update_mode", "type": { "kind": "identifier", - "name": "lv_barcode_encoding_t" + "name": "uint8_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "barcode.ENCODING_CODE128 | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "needs_update", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "render_valid", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "fitting", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], @@ -161773,7 +186412,7 @@ "location": { "column": 8, "file": "", - "line": 5809 + "line": 6897 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -161783,6 +186422,91 @@ ], "visibility": "private" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "fields": [ + { + "name": "path", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "string", + "conversion": "string", + "python_type": "str" + } + }, + { + "name": "buffer", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "name": "buffer_size", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "dynamic_glyph_load", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "kind": "struct", + "location": { + "column": 16, + "file": "", + "line": 3331 + }, + "methods": [ + "create_ex" + ], + "python_name": "binfont_dsc_t", + "typedef_names": [ + "lv_binfont_dsc_t" + ], + "visibility": "public" + }, { "available_on": [ "micropython", @@ -161851,13 +186575,25 @@ "conversion": "integer", "python_type": "int" } + }, + { + "name": "dynamic_glyph_load", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], "kind": "struct", "location": { "column": 16, "file": "", - "line": 4015 + "line": 3324 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -161911,7 +186647,7 @@ "location": { "column": 16, "file": "", - "line": 4078 + "line": 3397 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -161947,7 +186683,7 @@ "location": { "column": 8, "file": "", - "line": 6336 + "line": 6913 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -162099,7 +186835,7 @@ "location": { "column": 8, "file": "", - "line": 6104 + "line": 6916 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -162253,9 +186989,9 @@ ], "kind": "struct", "location": { - "column": 16, + "column": 8, "file": "", - "line": 5257 + "line": 4553 }, "methods": [ "create" @@ -162334,7 +187070,7 @@ "location": { "column": 8, "file": "", - "line": 5726 + "line": 6507 }, "methods": [ "acquire_data", @@ -162409,9 +187145,9 @@ ], "kind": "struct", "location": { - "column": 16, + "column": 8, "file": "", - "line": 5256 + "line": 4539 }, "methods": [], "python_name": "cache_ops_t", @@ -162446,7 +187182,7 @@ "location": { "column": 16, "file": "", - "line": 5302 + "line": 4567 }, "methods": [], "python_name": "cache_slot_size_t", @@ -162565,7 +187301,7 @@ "location": { "column": 8, "file": "", - "line": 5279 + "line": 4544 }, "methods": [ "acquire", @@ -162645,7 +187381,7 @@ "location": { "column": 16, "file": "", - "line": 4349 + "line": 3760 }, "methods": [], "python_name": "calendar_date_t", @@ -162806,7 +187542,7 @@ "location": { "column": 8, "file": "", - "line": 6148 + "line": 6927 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -162869,7 +187605,7 @@ "location": { "column": 8, "file": "", - "line": 5798 + "line": 6892 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -162969,7 +187705,7 @@ "location": { "column": 8, "file": "", - "line": 6313 + "line": 6949 }, "methods": [], "python_name": "chart_cursor_t", @@ -163111,7 +187847,7 @@ "location": { "column": 8, "file": "", - "line": 6302 + "line": 6938 }, "methods": [], "python_name": "chart_series_t", @@ -163316,7 +188052,7 @@ "location": { "column": 8, "file": "", - "line": 6321 + "line": 6957 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -163380,7 +188116,7 @@ "location": { "column": 8, "file": "", - "line": 6209 + "line": 6972 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -163403,7 +188139,7 @@ "location": { "column": 16, "file": "", - "line": 354 + "line": 6542 }, "methods": [ "capacity", @@ -163482,7 +188218,7 @@ "location": { "column": 16, "file": "", - "line": 787 + "line": 847 }, "methods": [ "luminance", @@ -163533,7 +188269,7 @@ "location": { "column": 16, "file": "", - "line": 803 + "line": 863 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -163605,15 +188341,19 @@ "location": { "column": 16, "file": "", - "line": 792 + "line": 852 }, "methods": [ "color_mix32", + "color_mix32_inlined", "color_mix32_premultiplied", + "color_mix32_premultiplied_inlined", "color_over32", "color_premultiply", "eq", - "luminance" + "lumi_of", + "luminance", + "unpremultiply" ], "python_name": "color32_t", "typedef_names": [ @@ -163662,7 +188402,7 @@ "location": { "column": 8, "file": "", - "line": 926 + "line": 984 }, "methods": [ "init" @@ -163723,7 +188463,7 @@ "location": { "column": 16, "file": "", - "line": 798 + "line": 858 }, "methods": [], "python_name": "color_hsv_t", @@ -163782,7 +188522,7 @@ "location": { "column": 16, "file": "", - "line": 782 + "line": 842 }, "methods": [ "brightness", @@ -163848,7 +188588,7 @@ "location": { "column": 8, "file": "", - "line": 6015 + "line": 4940 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -163858,6 +188598,28 @@ ], "visibility": "private" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "_lv_delete_dsc_t", + "complete": false, + "fields": [], + "kind": "struct", + "location": { + "column": 16, + "file": "", + "line": 224 + }, + "methods": [], + "python_name": "delete_dsc_t", + "typedef_names": [ + "lv_delete_dsc_t" + ], + "visibility": "public" + }, { "available_on": [ "micropython", @@ -164097,6 +188859,72 @@ "python_type": "int" } }, + { + "name": "sync_cb", + "type": { + "kind": "identifier", + "name": "lv_display_sync_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t, area_t], None]" + } + }, + { + "name": "sync_wait_cb", + "type": { + "kind": "identifier", + "name": "lv_display_sync_wait_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t], None]" + } + }, + { + "name": "syncing", + "type": { + "kind": "primitive", + "name": "int", + "qualifiers": [ + "volatile" + ] + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "syncing_last", + "type": { + "kind": "primitive", + "name": "int", + "qualifiers": [ + "volatile" + ] + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "sync_areas", + "type": { + "kind": "identifier", + "name": "lv_ll_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "ll_t" + } + }, { "name": "render_mode", "type": { @@ -164233,18 +189061,6 @@ "python_type": "int" } }, - { - "name": "sync_areas", - "type": { - "kind": "identifier", - "name": "lv_ll_t" - }, - "view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "ll_t" - } - }, { "name": "_static_buf1", "type": { @@ -164284,106 +189100,6 @@ "python_type": "layer_t" } }, - { - "name": "layer_init", - "type": { - "kind": "pointer", - "target": { - "kind": "function", - "parameters": [ - { - "location": { - "column": 37, - "file": "", - "line": 5545 - }, - "name": "disp", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_display_t" - } - } - }, - { - "location": { - "column": 56, - "file": "", - "line": 5545 - }, - "name": "layer", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_layer_t" - } - } - } - ], - "return_type": { - "kind": "primitive", - "name": "void" - } - } - }, - "view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[display_t, layer_t], None]" - } - }, - { - "name": "layer_deinit", - "type": { - "kind": "pointer", - "target": { - "kind": "function", - "parameters": [ - { - "location": { - "column": 39, - "file": "", - "line": 5546 - }, - "name": "disp", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_display_t" - } - } - }, - { - "location": { - "column": 58, - "file": "", - "line": 5546 - }, - "name": "layer", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_layer_t" - } - } - } - ], - "return_type": { - "kind": "primitive", - "name": "void" - } - } - }, - "view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[display_t, layer_t], None]" - } - }, { "name": "screens", "type": { @@ -164669,12 +189385,11 @@ "location": { "column": 8, "file": "", - "line": 5513 + "line": 6039 }, "methods": [ "add_event_cb", "delete", - "delete_event", "delete_refr_timer", "dpx", "draw_dispatch_layer", @@ -164689,6 +189404,7 @@ "get_driver_data", "get_event_count", "get_event_dsc", + "get_flush_cb", "get_horizontal_resolution", "get_inactive_time", "get_invalidated_draw_buf_size", @@ -164716,9 +189432,11 @@ "is_double_buffered", "is_invalidation_enabled", "register_vsync_event", + "remove_event", "remove_event_cb_with_user_data", "rotate_area", "rotate_point", + "rotate_point_ccw", "send_event", "send_vsync_event", "set_3rd_draw_buffer", @@ -164728,6 +189446,7 @@ "set_color_format", "set_default", "set_dpi", + "set_draw_buf_handlers", "set_draw_buffers", "set_driver_data", "set_flush_cb", @@ -164738,9 +189457,13 @@ "set_render_mode", "set_resolution", "set_rotation", + "set_sync_cb", + "set_sync_wait_cb", "set_theme", "set_tile_cnt", "set_user_data", + "sync_is_last", + "sync_ready", "trigger_activity", "unregister_vsync_event" ], @@ -164891,7 +189614,7 @@ "location": { "column": 16, "file": "", - "line": 3562 + "line": 2745 }, "methods": [ "init" @@ -164964,7 +189687,7 @@ "location": { "column": 16, "file": "", - "line": 3590 + "line": 2773 }, "methods": [ "init" @@ -165062,7 +189785,7 @@ "location": { "column": 16, "file": "", - "line": 3419 + "line": 2492 }, "methods": [ "init" @@ -165196,7 +189919,7 @@ "location": { "column": 16, "file": "", - "line": 3427 + "line": 2500 }, "methods": [ "init" @@ -165299,13 +190022,25 @@ "conversion": "callback", "python_type": "Callable[[int, COLOR_FORMAT | int], int]" } + }, + { + "name": "buf_clear_cb", + "type": { + "kind": "identifier", + "name": "lv_draw_buf_clear_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[draw_buf_t, area_t, layer_t], None]" + } } ], "kind": "struct", "location": { "column": 8, "file": "", - "line": 5226 + "line": 4719 }, "methods": [ "align_ex", @@ -165407,12 +190142,14 @@ "location": { "column": 8, "file": "", - "line": 998 + "line": 1081 }, "methods": [ "adjust_stride", "clear", + "clear_ex", "clear_flag", + "convert_premultiply", "copy", "destroy", "dup", @@ -165422,6 +190159,7 @@ "has_flag", "init", "invalidate_cache", + "is_position_valid", "premultiply", "reshape", "save_to_file", @@ -165616,7 +190354,7 @@ "location": { "column": 16, "file": "", - "line": 3339 + "line": 2409 }, "methods": [], "python_name": "draw_dsc_base_t", @@ -165699,7 +190437,7 @@ "location": { "column": 16, "file": "", - "line": 3412 + "line": 2485 }, "methods": [ "init" @@ -165802,7 +190540,7 @@ "location": { "column": 16, "file": "", - "line": 5374 + "line": 4641 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -166006,7 +190744,7 @@ "location": { "column": 8, "file": "", - "line": 5884 + "line": 6116 }, "methods": [ "init" @@ -166295,7 +191033,7 @@ "location": { "column": 8, "file": "", - "line": 3512 + "line": 2695 }, "methods": [ "init" @@ -166363,7 +191101,7 @@ "location": { "column": 8, "file": "", - "line": 5818 + "line": 6098 }, "methods": [], "python_name": "draw_image_sup_t", @@ -166730,7 +191468,7 @@ "location": { "column": 16, "file": "", - "line": 3449 + "line": 2522 }, "methods": [ "init" @@ -166791,7 +191529,7 @@ "location": { "column": 8, "file": "", - "line": 5879 + "line": 6111 }, "methods": [], "python_name": "draw_label_hint_t", @@ -167014,7 +191752,7 @@ "location": { "column": 16, "file": "", - "line": 3478 + "line": 2551 }, "methods": [ "init" @@ -167201,7 +191939,7 @@ "location": { "column": 16, "file": "", - "line": 3542 + "line": 2725 }, "methods": [ "init" @@ -167275,7 +192013,7 @@ "location": { "column": 8, "file": "", - "line": 5021 + "line": 3240 }, "methods": [ "init" @@ -167315,7 +192053,7 @@ "location": { "column": 8, "file": "", - "line": 5361 + "line": 4628 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -167683,7 +192421,7 @@ "location": { "column": 16, "file": "", - "line": 3383 + "line": 2456 }, "methods": [ "init" @@ -167882,7 +192620,7 @@ "location": { "column": 8, "file": "", - "line": 5899 + "line": 6142 }, "methods": [], "python_name": "draw_sw_blend_dsc_t", @@ -168022,15 +192760,24 @@ "location": { "column": 8, "file": "", - "line": 5913 + "line": 6156 }, - "methods": [], - "policy_reason": "not reachable from a public binding boundary", + "methods": [ + "color_to_a8", + "color_to_al88", + "color_to_argb8888", + "color_to_argb8888_premultiplied", + "color_to_i1", + "color_to_l8", + "color_to_rgb565", + "color_to_rgb565_swapped", + "color_to_rgb888" + ], "python_name": "draw_sw_blend_fill_dsc_t", "typedef_names": [ "lv_draw_sw_blend_fill_dsc_t" ], - "visibility": "private" + "visibility": "public" }, { "available_on": [ @@ -168217,15 +192964,24 @@ "location": { "column": 8, "file": "", - "line": 5924 + "line": 6167 }, - "methods": [], - "policy_reason": "not reachable from a public binding boundary", + "methods": [ + "to_a8", + "to_al88", + "to_argb8888", + "to_argb8888_premultiplied", + "to_i1", + "to_l8", + "to_rgb565", + "to_rgb565_swapped", + "to_rgb888" + ], "python_name": "draw_sw_blend_image_dsc_t", "typedef_names": [ "lv_draw_sw_blend_image_dsc_t" ], - "visibility": "private" + "visibility": "public" }, { "available_on": [ @@ -168265,7 +193021,7 @@ "location": { "column": 16, "file": "", - "line": 5073 + "line": 4651 }, "methods": [ "register_blend_handler" @@ -168276,6 +193032,139 @@ ], "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "fields": [ + { + "name": "color_map", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_color_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "color_t" + } + }, + { + "name": "opa_map", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_opa_t" + } + }, + "view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + } + }, + { + "name": "size", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "kind": "struct", + "location": { + "column": 16, + "file": "", + "line": 6278 + }, + "methods": [ + "cleanup" + ], + "python_name": "draw_sw_grad_calc_t", + "typedef_names": [ + "lv_draw_sw_grad_calc_t" + ], + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "fields": [ + { + "name": "u16", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "u8", + "type": { + "dimensions": [ + "2" + ], + "element": { + "kind": "identifier", + "name": "uint8_t" + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[int]" + } + }, + { + "name": "c16", + "type": { + "kind": "identifier", + "name": "lv_color16_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color16_t" + } + } + ], + "kind": "union", + "location": { + "column": 15, + "file": "", + "line": 6188 + }, + "methods": [], + "policy_reason": "not reachable from a public binding boundary", + "python_name": "draw_sw_halfword_t", + "typedef_names": [ + "lv_draw_sw_halfword_t" + ], + "visibility": "private" + }, { "available_on": [ "micropython", @@ -168349,7 +193238,7 @@ "location": { "column": 8, "file": "", - "line": 5423 + "line": 4814 }, "methods": [ "init" @@ -168398,7 +193287,7 @@ "location": { "column": 8, "file": "", - "line": 5404 + "line": 4795 }, "methods": [], "python_name": "draw_sw_mask_common_dsc_t", @@ -168444,7 +193333,7 @@ "location": { "column": 8, "file": "", - "line": 5443 + "line": 4834 }, "methods": [ "init" @@ -168578,7 +193467,7 @@ "location": { "column": 8, "file": "", - "line": 5408 + "line": 4799 }, "methods": [ "angle_init", @@ -168627,7 +193516,7 @@ "location": { "column": 8, "file": "", - "line": 5453 + "line": 4844 }, "methods": [ "init" @@ -168748,7 +193637,7 @@ "location": { "column": 16, "file": "", - "line": 5395 + "line": 4786 }, "methods": [], "python_name": "draw_sw_mask_radius_circle_dsc_t", @@ -168809,7 +193698,7 @@ "location": { "column": 8, "file": "", - "line": 5434 + "line": 4825 }, "methods": [ "init" @@ -168833,6 +193722,9 @@ "name": "task_act", "type": { "kind": "pointer", + "qualifiers": [ + "volatile" + ], "target": { "kind": "identifier", "name": "lv_draw_task_t" @@ -168857,7 +193749,19 @@ } }, { - "name": "sync", + "name": "new_task_sync", + "type": { + "kind": "identifier", + "name": "lv_thread_sync_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "task_done_sync", "type": { "kind": "identifier", "name": "lv_thread_sync_t" @@ -168895,21 +193799,6 @@ "python_type": "int" } }, - { - "name": "inited", - "type": { - "kind": "primitive", - "name": "bool", - "qualifiers": [ - "volatile" - ] - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, { "name": "exit_status", "type": { @@ -168930,7 +193819,7 @@ "location": { "column": 16, "file": "", - "line": 5382 + "line": 4731 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -168981,7 +193870,7 @@ "location": { "column": 8, "file": "", - "line": 5391 + "line": 4740 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -168991,6 +193880,90 @@ ], "visibility": "private" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": null, + "complete": true, + "fields": [ + { + "name": "u32", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "u16", + "type": { + "dimensions": [ + "2" + ], + "element": { + "kind": "identifier", + "name": "uint16_t" + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[int]" + } + }, + { + "name": "u8", + "type": { + "dimensions": [ + "4" + ], + "element": { + "kind": "identifier", + "name": "uint8_t" + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[int]" + } + }, + { + "name": "c32", + "type": { + "kind": "identifier", + "name": "lv_color32_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "color32_t" + } + } + ], + "kind": "union", + "location": { + "column": 15, + "file": "", + "line": 6182 + }, + "methods": [], + "policy_reason": "not reachable from a public binding boundary", + "python_name": "draw_sw_word_t", + "typedef_names": [ + "lv_draw_sw_word_t" + ], + "visibility": "private" + }, { "available_on": [ "micropython", @@ -169051,18 +194024,6 @@ "python_type": "area_t" } }, - { - "name": "clip_area_original", - "type": { - "kind": "identifier", - "name": "lv_area_t" - }, - "view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "area_t" - } - }, { "name": "clip_area", "type": { @@ -169176,9 +194137,10 @@ "location": { "column": 8, "file": "", - "line": 5346 + "line": 4614 }, "methods": [ + "cleanup_task", "get_arc_dsc", "get_area", "get_blur_dsc", @@ -169210,7 +194172,8 @@ "sw_line", "sw_mask_rect", "sw_triangle", - "unit_draw_letter" + "unit_draw_letter", + "unit_draw_letter_internal" ], "python_name": "draw_task_t", "typedef_names": [ @@ -169298,7 +194261,7 @@ "location": { "column": 16, "file": "", - "line": 3580 + "line": 2763 }, "methods": [ "init" @@ -169374,7 +194337,7 @@ "location": { "column": 43, "file": "", - "line": 5368 + "line": 4635 }, "name": "draw_unit", "type": { @@ -169389,7 +194352,7 @@ "location": { "column": 67, "file": "", - "line": 5368 + "line": 4635 }, "name": "layer", "type": { @@ -169424,7 +194387,7 @@ "location": { "column": 43, "file": "", - "line": 5369 + "line": 4636 }, "name": "draw_unit", "type": { @@ -169439,7 +194402,7 @@ "location": { "column": 71, "file": "", - "line": 5369 + "line": 4636 }, "name": "task", "type": { @@ -169474,7 +194437,7 @@ "location": { "column": 50, "file": "", - "line": 5370 + "line": 4637 }, "name": "draw_unit", "type": { @@ -169509,7 +194472,7 @@ "location": { "column": 41, "file": "", - "line": 5371 + "line": 4638 }, "name": "draw_unit", "type": { @@ -169544,7 +194507,7 @@ "location": { "column": 33, "file": "", - "line": 5372 + "line": 4639 }, "name": "event", "type": { @@ -169573,7 +194536,7 @@ "location": { "column": 8, "file": "", - "line": 5364 + "line": 4631 }, "methods": [], "python_name": "draw_unit_t", @@ -169595,7 +194558,7 @@ "location": { "column": 16, "file": "", - "line": 332 + "line": 329 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -169646,7 +194609,7 @@ "location": { "column": 8, "file": "", - "line": 6263 + "line": 6992 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -169845,7 +194808,7 @@ "location": { "column": 8, "file": "", - "line": 6248 + "line": 6977 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -169908,7 +194871,7 @@ "location": { "column": 8, "file": "", - "line": 6052 + "line": 4992 }, "methods": [ "get_cb", @@ -169926,7 +194889,7 @@ "circuitpython", "cpython" ], - "c_name": null, + "c_name": "_lv_event_list_t", "complete": true, "fields": [ { @@ -169970,9 +194933,9 @@ ], "kind": "struct", "location": { - "column": 16, + "column": 8, "file": "", - "line": 1926 + "line": 5009 }, "methods": [ "add", @@ -170143,7 +195106,7 @@ "location": { "column": 8, "file": "", - "line": 6057 + "line": 4997 }, "methods": [ "free_user_data_cb", @@ -170199,7 +195162,7 @@ "location": { "column": 16, "file": "", - "line": 348 + "line": 345 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -170222,7 +195185,7 @@ "location": { "column": 16, "file": "", - "line": 320 + "line": 317 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -170252,7 +195215,7 @@ "location": { "column": 51, "file": "", - "line": 1262 + "line": 1193 }, "name": "info", "type": { @@ -170270,7 +195233,7 @@ "location": { "column": 70, "file": "", - "line": 1262 + "line": 1193 }, "name": "src", "type": { @@ -170311,7 +195274,7 @@ "location": { "column": 33, "file": "", - "line": 1263 + "line": 1194 }, "name": "font", "type": { @@ -170346,7 +195309,7 @@ "location": { "column": 37, "file": "", - "line": 1264 + "line": 1195 }, "name": "src", "type": { @@ -170387,7 +195350,7 @@ "location": { "column": 30, "file": "", - "line": 1265 + "line": 1196 }, "name": "src", "type": { @@ -170416,7 +195379,7 @@ "location": { "column": 8, "file": "", - "line": 1261 + "line": 1192 }, "methods": [], "python_name": "font_class_t", @@ -170535,7 +195498,7 @@ "location": { "column": 16, "file": "", - "line": 4039 + "line": 3357 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -170639,7 +195602,6 @@ } }, { - "bit_width": "9", "name": "cmap_num", "type": { "kind": "identifier", @@ -170656,7 +195618,7 @@ "name": "bpp", "type": { "kind": "identifier", - "name": "uint16_t" + "name": "uint8_t" }, "view": { "category": "scalar", @@ -170669,7 +195631,7 @@ "name": "kern_classes", "type": { "kind": "identifier", - "name": "uint16_t" + "name": "uint8_t" }, "view": { "category": "scalar", @@ -170682,7 +195644,7 @@ "name": "bitmap_format", "type": { "kind": "identifier", - "name": "uint16_t" + "name": "uint8_t" }, "view": { "category": "scalar", @@ -170701,13 +195663,25 @@ "conversion": "integer", "python_type": "int" } + }, + { + "name": "are_glyphs_dynamic_loaded", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], "kind": "struct", "location": { "column": 16, "file": "", - "line": 4066 + "line": 3384 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -170805,7 +195779,7 @@ "location": { "column": 16, "file": "", - "line": 4025 + "line": 3343 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -170815,6 +195789,95 @@ ], "visibility": "private" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "_lv_font_fmt_txt_glyph_loader_t", + "complete": true, + "fields": [ + { + "name": "get_glyph_bitmap_cb", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 75, + "file": "", + "line": 6288 + }, + "name": "loader", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_fmt_txt_glyph_loader_t" + } + } + }, + { + "location": { + "column": 94, + "file": "", + "line": 6288 + }, + "name": "gid", + "type": { + "kind": "identifier", + "name": "uint32_t" + } + } + ], + "return_type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "uint8_t", + "qualifiers": [ + "const" + ] + } + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any, int], Any]" + } + }, + { + "name": "lock", + "type": { + "kind": "identifier", + "name": "lv_mutex_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], + "kind": "struct", + "location": { + "column": 8, + "file": "", + "line": 6287 + }, + "methods": [], + "policy_reason": "not reachable from a public binding boundary", + "python_name": "font_fmt_txt_glyph_loader_t", + "typedef_names": [ + "lv_font_fmt_txt_glyph_loader_t" + ], + "visibility": "private" + }, { "available_on": [ "micropython", @@ -170907,7 +195970,7 @@ "location": { "column": 16, "file": "", - "line": 4054 + "line": 3372 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -170993,7 +196056,7 @@ "location": { "column": 16, "file": "", - "line": 4048 + "line": 3366 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171030,6 +196093,56 @@ "python_type": "font_t" } }, + { + "name": "entry", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "name": "gid", + "type": { + "kind": "union" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "Any" + } + }, + { + "name": "format", + "type": { + "kind": "identifier", + "name": "lv_font_glyph_format_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "FONT_GLYPH_FORMAT | int" + } + }, + { + "name": "outline_stroke_width", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, { "name": "adv_w", "type": { @@ -171102,18 +196215,6 @@ "python_type": "int" } }, - { - "name": "format", - "type": { - "kind": "identifier", - "name": "lv_font_glyph_format_t" - }, - "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "FONT_GLYPH_FORMAT | int" - } - }, { "bit_width": "1", "name": "is_placeholder", @@ -171139,57 +196240,23 @@ "conversion": "integer", "python_type": "int" } - }, - { - "name": "outline_stroke_width", - "type": { - "kind": "identifier", - "name": "int32_t" - }, - "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" - } - }, - { - "name": "gid", - "type": { - "kind": "union" - }, - "view": { - "category": "struct", - "conversion": "struct_value", - "python_type": "Any" - } - }, - { - "name": "entry", - "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_cache_entry_t" - } - }, - "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "cache_entry_t" - } } ], "kind": "struct", "location": { "column": 16, "file": "", - "line": 1217 + "line": 1146 }, "methods": [ + "compare", "get_bitmap_fmt_txt", "get_glyph_bitmap", + "get_glyph_bitmap_internal", "get_glyph_static_bitmap", - "release_draw_data" + "get_glyph_static_bitmap_internal", + "release_draw_data", + "release_draw_data_internal" ], "python_name": "font_glyph_dsc_t", "typedef_names": [ @@ -171278,6 +196345,18 @@ "python_type": "int" } }, + { + "name": "weight", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, { "name": "kerning", "type": { @@ -171295,7 +196374,7 @@ "location": { "column": 8, "file": "", - "line": 1267 + "line": 1198 }, "methods": [ "is_equal" @@ -171319,7 +196398,7 @@ "location": { "column": 16, "file": "", - "line": 238 + "line": 240 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171338,6 +196417,57 @@ "c_name": "_lv_font_t", "complete": true, "fields": [ + { + "name": "dsc", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, + { + "name": "fallback", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_font_t", + "qualifiers": [ + "const" + ] + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "font_t" + } + }, + { + "name": "user_data", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + }, + "view": { + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" + } + }, { "name": "get_glyph_dsc", "type": { @@ -171347,11 +196477,11 @@ "parameters": [ { "location": { - "column": 27, + "column": 43, "file": "", - "line": 1247 + "line": 1178 }, - "name": null, + "name": "font", "type": { "kind": "pointer", "target": { @@ -171365,11 +196495,11 @@ }, { "location": { - "column": 46, + "column": 71, "file": "", - "line": 1247 + "line": 1178 }, - "name": null, + "name": "dsc_out", "type": { "kind": "pointer", "target": { @@ -171380,9 +196510,9 @@ }, { "location": { - "column": 78, + "column": 36, "file": "", - "line": 1247 + "line": 1179 }, "name": "letter", "type": { @@ -171392,9 +196522,9 @@ }, { "location": { - "column": 95, + "column": 53, "file": "", - "line": 1247 + "line": 1179 }, "name": "letter_next", "type": { @@ -171424,11 +196554,11 @@ "parameters": [ { "location": { - "column": 38, + "column": 58, "file": "", - "line": 1248 + "line": 1180 }, - "name": null, + "name": "g_dsc", "type": { "kind": "pointer", "target": { @@ -171439,11 +196569,11 @@ }, { "location": { - "column": 61, + "column": 81, "file": "", - "line": 1248 + "line": 1180 }, - "name": null, + "name": "draw_buf", "type": { "kind": "pointer", "target": { @@ -171480,11 +196610,11 @@ "parameters": [ { "location": { - "column": 27, + "column": 43, "file": "", - "line": 1249 + "line": 1181 }, - "name": null, + "name": "font", "type": { "kind": "pointer", "target": { @@ -171498,11 +196628,11 @@ }, { "location": { - "column": 46, + "column": 71, "file": "", - "line": 1249 + "line": 1181 }, - "name": null, + "name": "g_dsc", "type": { "kind": "pointer", "target": { @@ -171549,11 +196679,10 @@ } }, { - "bit_width": "2", - "name": "subpx", + "name": "cap_height", "type": { "kind": "identifier", - "name": "uint8_t" + "name": "int32_t" }, "view": { "category": "scalar", @@ -171562,11 +196691,10 @@ } }, { - "bit_width": "1", - "name": "kerning", + "name": "x_height", "type": { "kind": "identifier", - "name": "uint8_t" + "name": "int32_t" }, "view": { "category": "scalar", @@ -171575,8 +196703,8 @@ } }, { - "bit_width": "1", - "name": "static_bitmap", + "bit_width": "2", + "name": "subpx", "type": { "kind": "identifier", "name": "uint8_t" @@ -171588,10 +196716,11 @@ } }, { - "name": "underline_position", + "bit_width": "1", + "name": "kerning", "type": { "kind": "identifier", - "name": "int8_t" + "name": "uint8_t" }, "view": { "category": "scalar", @@ -171600,10 +196729,11 @@ } }, { - "name": "underline_thickness", + "bit_width": "1", + "name": "static_bitmap", "type": { "kind": "identifier", - "name": "int8_t" + "name": "uint8_t" }, "view": { "category": "scalar", @@ -171612,54 +196742,27 @@ } }, { - "name": "dsc", - "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void", - "qualifiers": [ - "const" - ] - } - }, - "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" - } - }, - { - "name": "fallback", + "name": "underline_position", "type": { - "kind": "pointer", - "target": { - "kind": "identifier", - "name": "lv_font_t", - "qualifiers": [ - "const" - ] - } + "kind": "identifier", + "name": "int8_t" }, "view": { - "category": "struct_pointer", - "conversion": "struct_pointer", - "python_type": "font_t" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } }, { - "name": "user_data", + "name": "underline_thickness", "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "identifier", + "name": "int8_t" }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], @@ -171667,14 +196770,22 @@ "location": { "column": 8, "file": "", - "line": 1246 + "line": 1174 }, "methods": [ + "get_bottom_trim", + "get_bottom_trim_internal", "get_glyph_dsc", "get_glyph_dsc_fmt_txt", + "get_glyph_dsc_internal", "get_glyph_width", + "get_glyph_width_internal", "get_line_height", + "get_line_height_internal", + "get_top_trim", + "get_top_trim_internal", "has_static_bitmap", + "has_static_bitmap_internal", "set_kerning" ], "python_name": "font_t", @@ -171696,7 +196807,7 @@ "location": { "column": 16, "file": "", - "line": 325 + "line": 322 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171719,7 +196830,7 @@ "location": { "column": 16, "file": "", - "line": 243 + "line": 245 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171742,7 +196853,7 @@ "location": { "column": 16, "file": "", - "line": 244 + "line": 246 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171765,7 +196876,7 @@ "location": { "column": 16, "file": "", - "line": 242 + "line": 244 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171788,7 +196899,7 @@ "location": { "column": 16, "file": "", - "line": 324 + "line": 321 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171811,7 +196922,7 @@ "location": { "column": 16, "file": "", - "line": 323 + "line": 320 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -171865,7 +196976,7 @@ "location": { "column": 16, "file": "", - "line": 3237 + "line": 2633 }, "methods": [ "close", @@ -171922,7 +197033,7 @@ "location": { "column": 34, "file": "", - "line": 3219 + "line": 2615 }, "name": "drv", "type": { @@ -171957,7 +197068,7 @@ "location": { "column": 34, "file": "", - "line": 3220 + "line": 2616 }, "name": "drv", "type": { @@ -171992,7 +197103,7 @@ "location": { "column": 35, "file": "", - "line": 3221 + "line": 2617 }, "name": "drv", "type": { @@ -172007,7 +197118,7 @@ "location": { "column": 53, "file": "", - "line": 3221 + "line": 2617 }, "name": "path", "type": { @@ -172025,7 +197136,7 @@ "location": { "column": 74, "file": "", - "line": 3221 + "line": 2617 }, "name": "mode", "type": { @@ -172060,7 +197171,7 @@ "location": { "column": 41, "file": "", - "line": 3222 + "line": 2618 }, "name": "drv", "type": { @@ -172075,7 +197186,7 @@ "location": { "column": 53, "file": "", - "line": 3222 + "line": 2618 }, "name": "file_p", "type": { @@ -172110,7 +197221,7 @@ "location": { "column": 40, "file": "", - "line": 3223 + "line": 2619 }, "name": "drv", "type": { @@ -172125,7 +197236,7 @@ "location": { "column": 52, "file": "", - "line": 3223 + "line": 2619 }, "name": "file_p", "type": { @@ -172140,7 +197251,7 @@ "location": { "column": 67, "file": "", - "line": 3223 + "line": 2619 }, "name": "buf", "type": { @@ -172155,7 +197266,7 @@ "location": { "column": 83, "file": "", - "line": 3223 + "line": 2619 }, "name": "btr", "type": { @@ -172167,7 +197278,7 @@ "location": { "column": 97, "file": "", - "line": 3223 + "line": 2619 }, "name": "br", "type": { @@ -172202,7 +197313,7 @@ "location": { "column": 41, "file": "", - "line": 3224 + "line": 2620 }, "name": "drv", "type": { @@ -172217,7 +197328,7 @@ "location": { "column": 53, "file": "", - "line": 3224 + "line": 2620 }, "name": "file_p", "type": { @@ -172232,7 +197343,7 @@ "location": { "column": 74, "file": "", - "line": 3224 + "line": 2620 }, "name": "buf", "type": { @@ -172250,7 +197361,7 @@ "location": { "column": 90, "file": "", - "line": 3224 + "line": 2620 }, "name": "btw", "type": { @@ -172262,7 +197373,7 @@ "location": { "column": 104, "file": "", - "line": 3224 + "line": 2620 }, "name": "bw", "type": { @@ -172297,7 +197408,7 @@ "location": { "column": 40, "file": "", - "line": 3225 + "line": 2621 }, "name": "drv", "type": { @@ -172312,7 +197423,7 @@ "location": { "column": 52, "file": "", - "line": 3225 + "line": 2621 }, "name": "file_p", "type": { @@ -172327,7 +197438,7 @@ "location": { "column": 71, "file": "", - "line": 3225 + "line": 2621 }, "name": "pos", "type": { @@ -172339,7 +197450,7 @@ "location": { "column": 91, "file": "", - "line": 3225 + "line": 2621 }, "name": "whence", "type": { @@ -172371,7 +197482,7 @@ "location": { "column": 40, "file": "", - "line": 3226 + "line": 2622 }, "name": "drv", "type": { @@ -172386,7 +197497,7 @@ "location": { "column": 52, "file": "", - "line": 3226 + "line": 2622 }, "name": "file_p", "type": { @@ -172401,7 +197512,7 @@ "location": { "column": 71, "file": "", - "line": 3226 + "line": 2622 }, "name": "pos_p", "type": { @@ -172436,7 +197547,7 @@ "location": { "column": 39, "file": "", - "line": 3227 + "line": 2623 }, "name": "drv", "type": { @@ -172451,7 +197562,7 @@ "location": { "column": 57, "file": "", - "line": 3227 + "line": 2623 }, "name": "path", "type": { @@ -172492,7 +197603,7 @@ "location": { "column": 44, "file": "", - "line": 3228 + "line": 2624 }, "name": "drv", "type": { @@ -172507,7 +197618,7 @@ "location": { "column": 56, "file": "", - "line": 3228 + "line": 2624 }, "name": "rddir_p", "type": { @@ -172522,7 +197633,7 @@ "location": { "column": 72, "file": "", - "line": 3228 + "line": 2624 }, "name": "fn", "type": { @@ -172537,7 +197648,7 @@ "location": { "column": 87, "file": "", - "line": 3228 + "line": 2624 }, "name": "fn_len", "type": { @@ -172569,7 +197680,7 @@ "location": { "column": 45, "file": "", - "line": 3229 + "line": 2625 }, "name": "drv", "type": { @@ -172584,7 +197695,7 @@ "location": { "column": 57, "file": "", - "line": 3229 + "line": 2625 }, "name": "rddir_p", "type": { @@ -172628,7 +197739,7 @@ "location": { "column": 16, "file": "", - "line": 3215 + "line": 2611 }, "methods": [ "init", @@ -172705,7 +197816,7 @@ "location": { "column": 8, "file": "", - "line": 6044 + "line": 6308 }, "methods": [], "python_name": "fs_file_cache_t", @@ -172773,7 +197884,7 @@ "location": { "column": 16, "file": "", - "line": 3232 + "line": 2628 }, "methods": [ "close", @@ -172822,7 +197933,7 @@ "location": { "column": 16, "file": "", - "line": 3241 + "line": 2637 }, "methods": [ "get_buffer_from_path", @@ -172948,6 +198059,18 @@ "python_type": "int" } }, + { + "name": "blur_obj_cnt", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, { "name": "style_custom_table_size", "type": { @@ -173284,6 +198407,18 @@ "python_type": "ll_t" } }, + { + "name": "subject_ll", + "type": { + "kind": "identifier", + "name": "lv_ll_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "ll_t" + } + }, { "name": "sw_circle_cache", "type": { @@ -173355,7 +198490,7 @@ "location": { "column": 16, "file": "", - "line": 5471 + "line": 4862 }, "methods": [], "policy_reason": "Process-global LVGL state is an implementation detail, not a public struct wrapper.", @@ -173378,7 +198513,7 @@ "location": { "column": 16, "file": "", - "line": 313 + "line": 310 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -173401,7 +198536,7 @@ "location": { "column": 16, "file": "", - "line": 314 + "line": 311 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -173424,7 +198559,7 @@ "location": { "column": 16, "file": "", - "line": 312 + "line": 309 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -173447,7 +198582,7 @@ "location": { "column": 16, "file": "", - "line": 311 + "line": 308 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -173470,7 +198605,7 @@ "location": { "column": 16, "file": "", - "line": 310 + "line": 307 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -173576,7 +198711,7 @@ "location": { "column": 16, "file": "", - "line": 1338 + "line": 1276 }, "methods": [ "conical_init", @@ -173643,7 +198778,7 @@ "location": { "column": 16, "file": "", - "line": 1333 + "line": 1271 }, "methods": [], "python_name": "grad_stop_t", @@ -173787,7 +198922,7 @@ "location": { "column": 8, "file": "", - "line": 5998 + "line": 4906 }, "methods": [ "add_obj", @@ -173863,7 +198998,7 @@ "location": { "column": 8, "file": "", - "line": 6011 + "line": 4936 }, "methods": [], "python_name": "hit_test_info_t", @@ -173979,7 +199114,7 @@ "location": { "column": 8, "file": "", - "line": 5847 + "line": 6332 }, "methods": [], "python_name": "image_cache_data_t", @@ -174026,7 +199161,7 @@ "location": { "column": 16, "file": "", - "line": 1454 + "line": 1393 }, "methods": [], "python_name": "image_colorkey_t", @@ -174109,7 +199244,7 @@ "location": { "column": 8, "file": "", - "line": 5831 + "line": 6316 }, "methods": [], "python_name": "image_decoder_args_t", @@ -174336,7 +199471,7 @@ "location": { "column": 8, "file": "", - "line": 5861 + "line": 6346 }, "methods": [ "decoder_close", @@ -174457,7 +199592,7 @@ "location": { "column": 8, "file": "", - "line": 5838 + "line": 6323 }, "methods": [ "decoder_add_to_cache", @@ -174566,7 +199701,7 @@ "location": { "column": 16, "file": "", - "line": 983 + "line": 1065 }, "methods": [ "buf_free", @@ -174649,7 +199784,7 @@ "location": { "column": 8, "file": "", - "line": 5855 + "line": 6340 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -174764,7 +199899,7 @@ "location": { "column": 16, "file": "", - "line": 958 + "line": 1040 }, "methods": [], "python_name": "image_header_t", @@ -174984,7 +200119,7 @@ "location": { "column": 8, "file": "", - "line": 5781 + "line": 6813 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -175038,7 +200173,7 @@ "location": { "column": 8, "file": "", - "line": 6159 + "line": 6996 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -175128,7 +200263,7 @@ "location": { "column": 8, "file": "", - "line": 6163 + "line": 7000 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -175151,7 +200286,7 @@ "location": { "column": 16, "file": "", - "line": 319 + "line": 316 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -175298,7 +200433,7 @@ "location": { "column": 16, "file": "", - "line": 3705 + "line": 2840 }, "methods": [ "set_gesture_data" @@ -175316,13 +200451,50 @@ "cpython" ], "c_name": "lv_indev_gesture_configuration", - "complete": false, - "fields": [], + "complete": true, + "fields": [ + { + "name": "pinch_up_threshold", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "pinch_down_threshold", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "rotation_angle_rad_threshold", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + } + ], "kind": "struct", "location": { - "column": 8, + "column": 16, "file": "", - "line": 3960 + "line": 3273 }, "methods": [], "python_name": "indev_gesture_configuration_t", @@ -175331,6 +200503,77 @@ ], "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_indev_gesture_motion", + "complete": true, + "fields": [ + { + "name": "finger", + "type": { + "kind": "identifier", + "name": "int8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "start_point", + "type": { + "kind": "identifier", + "name": "lv_point_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "point_t" + } + }, + { + "name": "point", + "type": { + "kind": "identifier", + "name": "lv_point_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "point_t" + } + }, + { + "name": "state", + "type": { + "kind": "identifier", + "name": "lv_indev_state_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "INDEV_STATE | int" + } + } + ], + "kind": "struct", + "location": { + "column": 8, + "file": "", + "line": 6367 + }, + "methods": [], + "python_name": "indev_gesture_motion_t", + "typedef_names": [ + "lv_indev_gesture_motion_t" + ], + "visibility": "public" + }, { "available_on": [ "micropython", @@ -175471,7 +200714,7 @@ "location": { "column": 8, "file": "", - "line": 3979 + "line": 3288 }, "methods": [ "detect_pinch", @@ -175494,13 +200737,188 @@ "cpython" ], "c_name": "lv_indev_gesture", - "complete": false, - "fields": [], + "complete": true, + "fields": [ + { + "name": "motions", + "type": { + "dimensions": [ + "2" + ], + "element": { + "kind": "identifier", + "name": "lv_indev_gesture_motion_t" + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[indev_gesture_motion_t]" + } + }, + { + "name": "center", + "type": { + "kind": "identifier", + "name": "lv_point_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "point_t" + } + }, + { + "name": "scale", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "p_scale", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "scale_factors_x", + "type": { + "dimensions": [ + "2" + ], + "element": { + "kind": "primitive", + "name": "float" + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[float]" + } + }, + { + "name": "scale_factors_y", + "type": { + "dimensions": [ + "2" + ], + "element": { + "kind": "primitive", + "name": "float" + }, + "kind": "array" + }, + "view": { + "category": "array", + "conversion": "array", + "python_type": "Sequence[float]" + } + }, + { + "name": "delta_x", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "delta_y", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "p_delta_x", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "p_delta_y", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "rotation", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "p_rotation", + "type": { + "kind": "primitive", + "name": "float" + }, + "view": { + "category": "scalar", + "conversion": "float", + "python_type": "float" + } + }, + { + "name": "finger_cnt", + "type": { + "kind": "identifier", + "name": "uint8_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], "kind": "struct", "location": { - "column": 8, + "column": 16, "file": "", - "line": 3959 + "line": 3272 }, "methods": [], "python_name": "indev_gesture_t", @@ -175799,6 +201217,18 @@ "python_type": "int" } }, + { + "name": "double_click_time", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, { "name": "long_press_repeat_time", "type": { @@ -176006,16 +201436,18 @@ "location": { "column": 8, "file": "", - "line": 5572 + "line": 6398 }, "methods": [ "add_event_cb", + "clear_ccw", "delete", "enable", "find_scroll_obj", "gesture_init", "gesture_recognizers_set_data", "gesture_recognizers_update", + "get_ccw", "get_cursor", "get_display", "get_driver_data", @@ -176047,8 +201479,10 @@ "scroll_throw_predict", "send_event", "set_button_points", + "set_ccw", "set_cursor", "set_display", + "set_double_click_time", "set_driver_data", "set_gesture_min_distance", "set_gesture_min_velocity", @@ -176136,7 +201570,7 @@ "location": { "column": 8, "file": "", - "line": 3973 + "line": 3282 }, "methods": [], "python_name": "indev_touch_data_t", @@ -176158,7 +201592,7 @@ "location": { "column": 16, "file": "", - "line": 353 + "line": 4501 }, "methods": [ "destroy", @@ -176242,7 +201676,7 @@ "location": { "column": 8, "file": "", - "line": 6226 + "line": 7006 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -176318,6 +201752,18 @@ "python_type": "int" } }, + { + "name": "max_lines", + "type": { + "kind": "identifier", + "name": "int32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, { "name": "hint", "type": { @@ -176473,7 +201919,7 @@ "location": { "column": 8, "file": "", - "line": 6438 + "line": 7012 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -176522,6 +201968,21 @@ "python_type": "draw_task_t" } }, + { + "name": "display", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "display_t" + } + }, { "name": "parent", "type": { @@ -176662,13 +202123,25 @@ "conversion": "integer", "python_type": "int" } + }, + { + "name": "buffer_owned", + "type": { + "kind": "primitive", + "name": "bool" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], "kind": "struct", "location": { "column": 8, "file": "", - "line": 3324 + "line": 2392 }, "methods": [ "init", @@ -176718,7 +202191,7 @@ "location": { "column": 16, "file": "", - "line": 1375 + "line": 1313 }, "methods": [ "create" @@ -176770,7 +202243,7 @@ "location": { "column": 16, "file": "", - "line": 5462 + "line": 4853 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -176830,7 +202303,7 @@ "location": { "column": 8, "file": "", - "line": 6378 + "line": 7031 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -176853,7 +202326,7 @@ "location": { "column": 16, "file": "", - "line": 334 + "line": 331 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -176876,7 +202349,7 @@ "location": { "column": 16, "file": "", - "line": 335 + "line": 332 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -176961,7 +202434,7 @@ "location": { "column": 8, "file": "", - "line": 6232 + "line": 7036 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -177014,7 +202487,7 @@ "location": { "column": 15, "file": "", - "line": 5099 + "line": 4416 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -177080,7 +202553,7 @@ "location": { "column": 16, "file": "", - "line": 432 + "line": 3089 }, "methods": [ "chg_list", @@ -177105,6 +202578,186 @@ ], "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "_lv_lru_item_t", + "complete": false, + "fields": [], + "kind": "struct", + "location": { + "column": 16, + "file": "", + "line": 6573 + }, + "methods": [], + "python_name": "lru_item_t", + "typedef_names": [ + "lv_lru_item_t" + ], + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "_lv_lru_t", + "complete": true, + "fields": [ + { + "name": "items", + "type": { + "kind": "pointer", + "target": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_lru_item_t" + } + } + }, + "view": { + "category": "pointer", + "conversion": "pointer", + "python_type": "Any" + } + }, + { + "name": "access_count", + "type": { + "kind": "identifier", + "name": "uint64_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "free_memory", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "total_memory", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "average_item_length", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "hash_table_size", + "type": { + "kind": "identifier", + "name": "size_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "seed", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "value_free", + "type": { + "kind": "identifier", + "name": "lv_lru_free_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any], None]" + } + }, + { + "name": "key_free", + "type": { + "kind": "identifier", + "name": "lv_lru_free_cb_t" + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any], None]" + } + }, + { + "name": "free_items", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_lru_item_t" + } + }, + "view": { + "category": "struct_pointer", + "conversion": "struct_pointer", + "python_type": "lru_item_t" + } + } + ], + "kind": "struct", + "location": { + "column": 16, + "file": "", + "line": 6574 + }, + "methods": [ + "delete", + "get", + "remove", + "remove_lru_item", + "set" + ], + "python_name": "lru_t", + "typedef_names": [ + "lv_lru_t" + ], + "visibility": "public" + }, { "available_on": [ "micropython", @@ -177118,7 +202771,7 @@ "location": { "column": 16, "file": "", - "line": 326 + "line": 323 }, "methods": [], "python_name": "matrix_t", @@ -177237,7 +202890,7 @@ "location": { "column": 16, "file": "", - "line": 384 + "line": 798 }, "methods": [ "core", @@ -177278,7 +202931,7 @@ "location": { "column": 8, "file": "", - "line": 6271 + "line": 7050 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -177332,7 +202985,7 @@ "location": { "column": 8, "file": "", - "line": 6267 + "line": 7046 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -177395,7 +203048,7 @@ "location": { "column": 8, "file": "", - "line": 6297 + "line": 7076 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -177686,7 +203339,7 @@ "location": { "column": 8, "file": "", - "line": 6274 + "line": 7053 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -177709,7 +203362,7 @@ "location": { "column": 16, "file": "", - "line": 318 + "line": 315 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -177799,13 +203452,26 @@ "conversion": "object_handle", "python_type": "obj" } + }, + { + "bit_width": "1", + "name": "auto_parent", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], "kind": "struct", "location": { "column": 8, "file": "", - "line": 6097 + "line": 7081 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -177853,7 +203519,7 @@ "location": { "column": 49, "file": "", - "line": 5985 + "line": 4921 }, "name": "class_p", "type": { @@ -177871,7 +203537,7 @@ "location": { "column": 69, "file": "", - "line": 5985 + "line": 4921 }, "name": "obj", "type": { @@ -177906,7 +203572,7 @@ "location": { "column": 48, "file": "", - "line": 5986 + "line": 4922 }, "name": "class_p", "type": { @@ -177924,7 +203590,7 @@ "location": { "column": 68, "file": "", - "line": 5986 + "line": 4922 }, "name": "obj", "type": { @@ -177959,7 +203625,7 @@ "location": { "column": 43, "file": "", - "line": 5987 + "line": 4923 }, "name": "class_p", "type": { @@ -177977,7 +203643,7 @@ "location": { "column": 65, "file": "", - "line": 5987 + "line": 4923 }, "name": "e", "type": { @@ -178115,7 +203781,7 @@ "location": { "column": 8, "file": "", - "line": 5983 + "line": 4919 }, "methods": [ "class_create_obj", @@ -178306,13 +203972,26 @@ "conversion": "integer", "python_type": "int" } + }, + { + "bit_width": "8", + "name": "user_flags", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } } ], "kind": "struct", "location": { - "column": 8, + "column": 16, "file": "", - "line": 5742 + "line": 5019 }, "methods": [], "policy_reason": "Private object storage reached only through LVGL's internal object implementation.", @@ -178419,7 +204098,7 @@ "location": { "column": 8, "file": "", - "line": 5958 + "line": 5087 }, "methods": [], "policy_reason": "Private object style storage reached only through LVGL's internal object implementation.", @@ -178439,27 +204118,30 @@ "complete": true, "fields": [ { - "name": "time", + "name": "path_cb", "type": { "kind": "identifier", - "name": "uint16_t" + "name": "lv_anim_path_cb_t" }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[anim_t], int]" } }, { - "name": "delay", + "name": "user_data", "type": { - "kind": "identifier", - "name": "uint16_t" + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } }, "view": { - "category": "scalar", - "conversion": "integer", - "python_type": "int" + "category": "opaque_pointer", + "conversion": "opaque", + "python_type": "Any" } }, { @@ -178475,10 +204157,10 @@ } }, { - "name": "prop", + "name": "time", "type": { "kind": "identifier", - "name": "lv_style_prop_t" + "name": "uint16_t" }, "view": { "category": "scalar", @@ -178487,30 +204169,27 @@ } }, { - "name": "path_cb", + "name": "delay", "type": { "kind": "identifier", - "name": "lv_anim_path_cb_t" + "name": "uint16_t" }, "view": { - "category": "callback", - "conversion": "callback", - "python_type": "Callable[[anim_t], int]" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } }, { - "name": "user_data", + "name": "prop", "type": { - "kind": "pointer", - "target": { - "kind": "primitive", - "name": "void" - } + "kind": "identifier", + "name": "lv_style_prop_t" }, "view": { - "category": "opaque_pointer", - "conversion": "opaque", - "python_type": "Any" + "category": "scalar", + "conversion": "integer", + "python_type": "int" } } ], @@ -178518,7 +204197,7 @@ "location": { "column": 8, "file": "", - "line": 5966 + "line": 5095 }, "methods": [], "python_name": "obj_style_transition_dsc_t", @@ -178651,15 +204330,315 @@ } }, { - "name": "flags", + "bit_width": "1", + "name": "hidden", "type": { "kind": "identifier", - "name": "lv_obj_flag_t" + "name": "uint32_t" }, "view": { - "category": "enum", - "conversion": "enum_int", - "python_type": "OBJ_FLAG | int" + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "clickable", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "click_focusable", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "checkable", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scrollable", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scroll_elastic", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scroll_momentum", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scroll_one", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scroll_chain_hor", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scroll_chain_ver", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scroll_on_focus", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "scroll_with_arrow", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "snappable", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "press_lock", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "event_bubble", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "gesture_bubble", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "adv_hittest", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "ignore_layout", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "floating", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "send_draw_task_events", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "overflow_visible", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "event_trickle", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "state_trickle", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "radio_button", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" } }, { @@ -178806,7 +204785,7 @@ }, { "bit_width": "1", - "name": "radio_button", + "name": "rendered", "type": { "kind": "identifier", "name": "uint16_t" @@ -178819,7 +204798,7 @@ }, { "bit_width": "1", - "name": "rendered", + "name": "has_blur", "type": { "kind": "identifier", "name": "uint16_t" @@ -178835,9 +204814,11 @@ "location": { "column": 8, "file": "", - "line": 5757 + "line": 5035 }, "methods": [ + "add_child", + "add_delete_cb", "add_event_cb", "add_flag", "add_play_timeline_event", @@ -178854,25 +204835,32 @@ "align_to", "allocate_spec_attr", "area_is_visible", + "bind_bool", "bind_checked", + "bind_color", "bind_flag_if_eq", "bind_flag_if_ge", "bind_flag_if_gt", "bind_flag_if_le", "bind_flag_if_lt", "bind_flag_if_not_eq", + "bind_float", + "bind_int", + "bind_pointer", "bind_state_if_eq", "bind_state_if_ge", "bind_state_if_gt", "bind_state_if_le", "bind_state_if_lt", "bind_state_if_not_eq", + "bind_string", "bind_style", "bind_style_prop", "calc_dynamic_height", "calc_dynamic_width", "calculate_ext_draw_size", "calculate_style_text_align", + "calculate_style_text_align_internal", "center", "check_type", "class_init_obj", @@ -178925,159 +204913,310 @@ "get_sibling_by_type", "get_state", "get_style_align", + "get_style_align_internal", "get_style_anim", "get_style_anim_duration", + "get_style_anim_duration_internal", + "get_style_anim_internal", "get_style_arc_color", "get_style_arc_color_filtered", + "get_style_arc_color_filtered_internal", + "get_style_arc_color_internal", "get_style_arc_image_src", + "get_style_arc_image_src_internal", "get_style_arc_opa", + "get_style_arc_opa_internal", "get_style_arc_rounded", + "get_style_arc_rounded_internal", "get_style_arc_width", + "get_style_arc_width_internal", "get_style_base_dir", + "get_style_base_dir_internal", "get_style_bg_color", "get_style_bg_color_filtered", + "get_style_bg_color_filtered_internal", + "get_style_bg_color_internal", "get_style_bg_grad", "get_style_bg_grad_color", "get_style_bg_grad_color_filtered", + "get_style_bg_grad_color_filtered_internal", + "get_style_bg_grad_color_internal", "get_style_bg_grad_dir", + "get_style_bg_grad_dir_internal", + "get_style_bg_grad_internal", "get_style_bg_grad_opa", + "get_style_bg_grad_opa_internal", "get_style_bg_grad_stop", + "get_style_bg_grad_stop_internal", "get_style_bg_image_opa", + "get_style_bg_image_opa_internal", "get_style_bg_image_recolor", "get_style_bg_image_recolor_filtered", + "get_style_bg_image_recolor_filtered_internal", + "get_style_bg_image_recolor_internal", "get_style_bg_image_recolor_opa", + "get_style_bg_image_recolor_opa_internal", "get_style_bg_image_src", + "get_style_bg_image_src_internal", "get_style_bg_image_tiled", + "get_style_bg_image_tiled_internal", "get_style_bg_main_opa", + "get_style_bg_main_opa_internal", "get_style_bg_main_stop", + "get_style_bg_main_stop_internal", "get_style_bg_opa", + "get_style_bg_opa_internal", "get_style_bitmap_mask_src", + "get_style_bitmap_mask_src_internal", "get_style_blend_mode", + "get_style_blend_mode_internal", "get_style_blur_backdrop", + "get_style_blur_backdrop_internal", "get_style_blur_quality", + "get_style_blur_quality_internal", "get_style_blur_radius", + "get_style_blur_radius_internal", "get_style_border_color", "get_style_border_color_filtered", + "get_style_border_color_filtered_internal", + "get_style_border_color_internal", "get_style_border_opa", + "get_style_border_opa_internal", "get_style_border_post", + "get_style_border_post_internal", "get_style_border_side", + "get_style_border_side_internal", "get_style_border_width", + "get_style_border_width_internal", "get_style_clamped_height", "get_style_clamped_width", "get_style_clip_corner", + "get_style_clip_corner_internal", "get_style_color_filter_dsc", + "get_style_color_filter_dsc_internal", "get_style_color_filter_opa", + "get_style_color_filter_opa_internal", "get_style_drop_shadow_color", "get_style_drop_shadow_color_filtered", + "get_style_drop_shadow_color_filtered_internal", + "get_style_drop_shadow_color_internal", "get_style_drop_shadow_offset_x", + "get_style_drop_shadow_offset_x_internal", "get_style_drop_shadow_offset_y", + "get_style_drop_shadow_offset_y_internal", "get_style_drop_shadow_opa", + "get_style_drop_shadow_opa_internal", "get_style_drop_shadow_quality", + "get_style_drop_shadow_quality_internal", "get_style_drop_shadow_radius", + "get_style_drop_shadow_radius_internal", + "get_style_enabled", "get_style_flex_cross_place", + "get_style_flex_cross_place_internal", "get_style_flex_flow", + "get_style_flex_flow_internal", "get_style_flex_grow", + "get_style_flex_grow_internal", "get_style_flex_main_place", + "get_style_flex_main_place_internal", "get_style_flex_track_place", + "get_style_flex_track_place_internal", "get_style_grid_cell_column_pos", + "get_style_grid_cell_column_pos_internal", "get_style_grid_cell_column_span", + "get_style_grid_cell_column_span_internal", "get_style_grid_cell_row_pos", + "get_style_grid_cell_row_pos_internal", "get_style_grid_cell_row_span", + "get_style_grid_cell_row_span_internal", "get_style_grid_cell_x_align", + "get_style_grid_cell_x_align_internal", "get_style_grid_cell_y_align", + "get_style_grid_cell_y_align_internal", "get_style_grid_column_align", + "get_style_grid_column_align_internal", "get_style_grid_column_dsc_array", + "get_style_grid_column_dsc_array_internal", "get_style_grid_row_align", + "get_style_grid_row_align_internal", "get_style_grid_row_dsc_array", + "get_style_grid_row_dsc_array_internal", "get_style_height", + "get_style_height_internal", "get_style_image_colorkey", + "get_style_image_colorkey_internal", "get_style_image_opa", + "get_style_image_opa_internal", "get_style_image_recolor", "get_style_image_recolor_filtered", + "get_style_image_recolor_filtered_internal", + "get_style_image_recolor_internal", "get_style_image_recolor_opa", + "get_style_image_recolor_opa_internal", "get_style_layout", + "get_style_layout_internal", "get_style_length", + "get_style_length_internal", "get_style_line_color", "get_style_line_color_filtered", + "get_style_line_color_filtered_internal", + "get_style_line_color_internal", "get_style_line_dash_gap", + "get_style_line_dash_gap_internal", "get_style_line_dash_width", + "get_style_line_dash_width_internal", "get_style_line_opa", + "get_style_line_opa_internal", "get_style_line_rounded", + "get_style_line_rounded_internal", "get_style_line_width", + "get_style_line_width_internal", "get_style_margin_bottom", + "get_style_margin_bottom_internal", "get_style_margin_left", + "get_style_margin_left_internal", "get_style_margin_right", + "get_style_margin_right_internal", "get_style_margin_top", + "get_style_margin_top_internal", "get_style_max_height", + "get_style_max_height_internal", "get_style_max_width", + "get_style_max_width_internal", "get_style_min_height", + "get_style_min_height_internal", "get_style_min_width", + "get_style_min_width_internal", "get_style_opa", + "get_style_opa_internal", "get_style_opa_layered", + "get_style_opa_layered_internal", "get_style_opa_recursive", "get_style_outline_color", "get_style_outline_color_filtered", + "get_style_outline_color_filtered_internal", + "get_style_outline_color_internal", "get_style_outline_opa", + "get_style_outline_opa_internal", "get_style_outline_pad", + "get_style_outline_pad_internal", "get_style_outline_width", + "get_style_outline_width_internal", "get_style_pad_bottom", + "get_style_pad_bottom_internal", "get_style_pad_column", + "get_style_pad_column_internal", "get_style_pad_left", + "get_style_pad_left_internal", "get_style_pad_radial", + "get_style_pad_radial_internal", "get_style_pad_right", + "get_style_pad_right_internal", "get_style_pad_row", + "get_style_pad_row_internal", "get_style_pad_top", + "get_style_pad_top_internal", "get_style_prop", + "get_style_prop_internal", "get_style_radial_offset", + "get_style_radial_offset_internal", "get_style_radius", + "get_style_radius_internal", "get_style_recolor", + "get_style_recolor_internal", "get_style_recolor_opa", + "get_style_recolor_opa_internal", "get_style_recolor_recursive", "get_style_rotary_sensitivity", + "get_style_rotary_sensitivity_internal", "get_style_shadow_color", "get_style_shadow_color_filtered", + "get_style_shadow_color_filtered_internal", + "get_style_shadow_color_internal", "get_style_shadow_offset_x", + "get_style_shadow_offset_x_internal", "get_style_shadow_offset_y", + "get_style_shadow_offset_y_internal", "get_style_shadow_opa", + "get_style_shadow_opa_internal", "get_style_shadow_spread", + "get_style_shadow_spread_internal", "get_style_shadow_width", + "get_style_shadow_width_internal", "get_style_space_bottom", + "get_style_space_bottom_internal", "get_style_space_left", + "get_style_space_left_internal", "get_style_space_right", + "get_style_space_right_internal", "get_style_space_top", + "get_style_space_top_internal", "get_style_text_align", + "get_style_text_align_internal", "get_style_text_color", "get_style_text_color_filtered", + "get_style_text_color_filtered_internal", + "get_style_text_color_internal", "get_style_text_decor", + "get_style_text_decor_internal", "get_style_text_font", + "get_style_text_font_internal", + "get_style_text_leading_trim", + "get_style_text_leading_trim_internal", "get_style_text_letter_space", + "get_style_text_letter_space_internal", "get_style_text_line_space", + "get_style_text_line_space_internal", "get_style_text_opa", + "get_style_text_opa_internal", "get_style_text_outline_stroke_color", "get_style_text_outline_stroke_color_filtered", + "get_style_text_outline_stroke_color_filtered_internal", + "get_style_text_outline_stroke_color_internal", "get_style_text_outline_stroke_opa", + "get_style_text_outline_stroke_opa_internal", "get_style_text_outline_stroke_width", + "get_style_text_outline_stroke_width_internal", "get_style_transform_height", + "get_style_transform_height_internal", "get_style_transform_pivot_x", + "get_style_transform_pivot_x_internal", "get_style_transform_pivot_y", + "get_style_transform_pivot_y_internal", "get_style_transform_rotation", + "get_style_transform_rotation_internal", "get_style_transform_scale_x", + "get_style_transform_scale_x_internal", "get_style_transform_scale_x_safe", + "get_style_transform_scale_x_safe_internal", "get_style_transform_scale_y", + "get_style_transform_scale_y_internal", "get_style_transform_scale_y_safe", + "get_style_transform_scale_y_safe_internal", "get_style_transform_skew_x", + "get_style_transform_skew_x_internal", "get_style_transform_skew_y", + "get_style_transform_skew_y_internal", "get_style_transform_width", + "get_style_transform_width_internal", "get_style_transition", + "get_style_transition_internal", "get_style_translate_radial", + "get_style_translate_radial_internal", "get_style_translate_x", + "get_style_translate_x_internal", "get_style_translate_y", + "get_style_translate_y_internal", "get_style_width", + "get_style_width_internal", "get_style_x", + "get_style_x_internal", "get_style_y", + "get_style_y_internal", "get_transform", "get_transformed_area", "get_user_data", + "get_user_flag", "get_width", "get_x", "get_x2", @@ -179099,14 +205238,53 @@ "init_draw_rect_dsc", "invalidate", "invalidate_area", + "is_adv_hittest", + "is_alt", + "is_checkable", + "is_checked", + "is_click_focusable", + "is_clickable", + "is_disabled", "is_editable", + "is_edited", + "is_event_bubble", + "is_event_trickle", + "is_flex_in_new_track", + "is_floating", + "is_focus_key", + "is_focused", + "is_gesture_bubble", "is_group_def", "is_height_max", "is_height_min", + "is_hidden", + "is_hovered", + "is_ignore_layout", + "is_in_widget_tree", "is_layout_positioned", + "is_overflow_visible", + "is_press_lock", + "is_pressed", "is_radio_button", + "is_scroll_chain_hor", + "is_scroll_chain_ver", + "is_scroll_elastic", + "is_scroll_momentum", + "is_scroll_on_focus", + "is_scroll_one", + "is_scroll_with_arrow", + "is_scrollable", + "is_scrolled", "is_scrolling", - "is_valid", + "is_send_draw_task_events", + "is_snappable", + "is_state_trickle", + "is_state_user_1", + "is_state_user_2", + "is_state_user_3", + "is_state_user_4", + "is_style_any_height_content", + "is_style_any_width_content", "is_visible", "is_width_max", "is_width_min", @@ -179122,6 +205300,7 @@ "refresh_ext_draw_size", "refresh_self_size", "refresh_style", + "remove_child", "remove_event", "remove_event_cb", "remove_event_cb_with_user_data", @@ -179145,29 +205324,68 @@ "scroll_to_y", "scrollbar_invalidate", "send_event", + "set_adv_hittest", "set_align", + "set_alt", + "set_checkable", + "set_checked", + "set_click_focusable", + "set_clickable", "set_content_height", "set_content_width", + "set_disabled", + "set_edited", + "set_event_bubble", + "set_event_trickle", "set_ext_click_area", + "set_ext_draw_size", "set_flag", "set_flex_align", "set_flex_flow", "set_flex_grow", + "set_flex_in_new_track", + "set_floating", + "set_focus_key", + "set_focused", + "set_gesture_bubble", "set_grid_align", "set_grid_cell", "set_grid_dsc_array", "set_height", + "set_hidden", + "set_hovered", + "set_ignore_layout", "set_layout", "set_local_style_prop", + "set_overflow_visible", "set_parent", "set_pos", + "set_press_lock", + "set_pressed", "set_radio_button", + "set_scroll_chain", + "set_scroll_chain_hor", + "set_scroll_chain_ver", "set_scroll_dir", + "set_scroll_elastic", + "set_scroll_momentum", + "set_scroll_on_focus", + "set_scroll_one", "set_scroll_snap_x", "set_scroll_snap_y", + "set_scroll_with_arrow", + "set_scrollable", "set_scrollbar_mode", + "set_scrolled", + "set_send_draw_task_events", "set_size", + "set_snappable", "set_state", + "set_state_trickle", + "set_state_user_1", + "set_state_user_2", + "set_state_user_3", + "set_state_user_4", "set_style_align", "set_style_anim", "set_style_anim_duration", @@ -179210,6 +205428,7 @@ "set_style_drop_shadow_opa", "set_style_drop_shadow_quality", "set_style_drop_shadow_radius", + "set_style_enabled", "set_style_flex_cross_place", "set_style_flex_flow", "set_style_flex_grow", @@ -179282,6 +205501,7 @@ "set_style_text_color", "set_style_text_decor", "set_style_text_font", + "set_style_text_leading_trim", "set_style_text_letter_space", "set_style_text_line_space", "set_style_text_opa", @@ -179310,11 +205530,13 @@ "set_subject_increment_event_rollover", "set_transform", "set_user_data", + "set_user_flag", "set_width", "set_x", "set_y", "stop_scroll_anim", "style_apply_color_filter", + "style_apply_color_filter_internal", "style_apply_recolor", "style_create_transition", "style_get_disabled", @@ -179324,6 +205546,7 @@ "transform_point", "transform_point_array", "tree_walk", + "update_blur_status", "update_layer_type", "update_layout", "update_snap" @@ -179401,6 +205624,24 @@ "python_type": "Any" } }, + { + "name": "user_cb", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[], None]" + } + }, { "bit_width": "1", "name": "auto_free_user_data", @@ -179445,13 +205686,14 @@ "location": { "column": 8, "file": "", - "line": 6019 + "line": 5113 }, "methods": [ + "delete", "get_target", "get_target_obj", "get_user_data", - "remove" + "set_user_data" ], "python_name": "observer_t", "typedef_names": [ @@ -179472,7 +205714,7 @@ "location": { "column": 16, "file": "", - "line": 349 + "line": 346 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -179495,7 +205737,7 @@ "location": { "column": 16, "file": "", - "line": 350 + "line": 347 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -179505,6 +205747,34 @@ ], "visibility": "private" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "_lv_pending_t", + "complete": false, + "fields": [], + "kind": "struct", + "location": { + "column": 16, + "file": "", + "line": 6593 + }, + "methods": [ + "add", + "destroy", + "remove_all", + "set_free_cb", + "swap" + ], + "python_name": "pending_t", + "typedef_names": [ + "lv_pending_t" + ], + "visibility": "public" + }, { "available_on": [ "micropython", @@ -179543,7 +205813,7 @@ "location": { "column": 16, "file": "", - "line": 690 + "line": 498 }, "methods": [ "from_precise", @@ -179594,7 +205864,7 @@ "location": { "column": 16, "file": "", - "line": 686 + "line": 494 }, "methods": [ "array_transform", @@ -179622,7 +205892,7 @@ "location": { "column": 16, "file": "", - "line": 245 + "line": 247 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -179678,10 +205948,78 @@ } }, { + "name": "data", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "uint8_t" + } + }, + "view": { + "category": "typed_buffer", + "conversion": "typed_buffer", + "python_type": "Any" + } + }, + { + "bit_width": "12", + "name": "data_len", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", "name": "quiet_zone", "type": { "kind": "identifier", - "name": "int32_t" + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "update_mode", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "needs_update", + "type": { + "kind": "identifier", + "name": "uint16_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "bit_width": "1", + "name": "render_valid", + "type": { + "kind": "identifier", + "name": "uint16_t" }, "view": { "category": "scalar", @@ -179694,7 +206032,7 @@ "location": { "column": 8, "file": "", - "line": 5803 + "line": 7089 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -179788,9 +206126,9 @@ ], "kind": "struct", "location": { - "column": 8, + "column": 16, "file": "", - "line": 6074 + "line": 6608 }, "methods": [ "maximum_from", @@ -179853,9 +206191,9 @@ ], "kind": "struct", "location": { - "column": 8, + "column": 16, "file": "", - "line": 6081 + "line": 6615 }, "methods": [ "destroy", @@ -179888,7 +206226,7 @@ "location": { "column": 16, "file": "", - "line": 347 + "line": 344 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -179998,7 +206336,7 @@ "location": { "column": 8, "file": "", - "line": 6214 + "line": 7100 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -180061,7 +206399,7 @@ "location": { "column": 16, "file": "", - "line": 6354 + "line": 7124 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -180261,7 +206599,7 @@ "location": { "column": 8, "file": "", - "line": 6339 + "line": 7109 }, "methods": [ "section_set_range", @@ -180505,7 +206843,7 @@ "location": { "column": 8, "file": "", - "line": 6359 + "line": 7129 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -180618,7 +206956,7 @@ "location": { "column": 8, "file": "", - "line": 6134 + "line": 7148 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -180678,7 +207016,7 @@ "location": { "column": 16, "file": "", - "line": 4746 + "line": 4188 }, "methods": [], "python_name": "span_coords_t", @@ -180765,7 +207103,7 @@ "location": { "column": 8, "file": "", - "line": 6421 + "line": 7157 }, "methods": [ "get_style", @@ -180892,7 +207230,7 @@ "location": { "column": 8, "file": "", - "line": 6428 + "line": 7164 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -181028,7 +207366,7 @@ "location": { "column": 8, "file": "", - "line": 6410 + "line": 7200 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -181045,13 +207383,50 @@ "cpython" ], "c_name": "_lv_spinner_t", - "complete": false, - "fields": [], + "complete": true, + "fields": [ + { + "name": "arc", + "type": { + "kind": "identifier", + "name": "lv_arc_t" + }, + "view": { + "category": "object", + "conversion": "object_handle", + "python_type": "arc" + } + }, + { + "name": "duration", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + }, + { + "name": "angle", + "type": { + "kind": "identifier", + "name": "uint32_t" + }, + "view": { + "category": "scalar", + "conversion": "integer", + "python_type": "int" + } + } + ], "kind": "struct", "location": { - "column": 16, + "column": 8, "file": "", - "line": 308 + "line": 7211 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -181099,7 +207474,7 @@ "location": { "column": 16, "file": "", - "line": 476 + "line": 352 }, "methods": [], "python_name": "sqrt_res_t", @@ -181146,7 +207521,7 @@ "location": { "column": 16, "file": "", - "line": 1609 + "line": 1549 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -181209,14 +207584,15 @@ "location": { "column": 16, "file": "", - "line": 1613 + "line": 1553 }, "methods": [ "copy", "get_prop", - "get_prop_inlined", + "get_prop_internal", "init", "is_const", + "is_const_internal", "is_empty", "merge", "remove_prop", @@ -181336,6 +207712,7 @@ "set_text_color", "set_text_decor", "set_text_font", + "set_text_leading_trim", "set_text_letter_space", "set_text_line_space", "set_text_opa", @@ -181449,7 +207826,7 @@ "location": { "column": 16, "file": "", - "line": 1602 + "line": 1542 }, "methods": [ "init" @@ -181516,7 +207893,7 @@ "location": { "column": 15, "file": "", - "line": 1458 + "line": 1397 }, "methods": [], "python_name": "style_value_t", @@ -181602,7 +207979,7 @@ "location": { "column": 8, "file": "", - "line": 6028 + "line": 5123 }, "methods": [], "python_name": "subject_increment_dsc_t", @@ -181739,14 +208116,14 @@ "location": { "column": 8, "file": "", - "line": 3883 + "line": 3125 }, "methods": [ "add_observer", "add_observer_obj", "add_observer_with_target", - "copy_string", "deinit", + "delete", "get_color", "get_float", "get_group_element", @@ -181767,12 +208144,15 @@ "notify", "set_color", "set_float", + "set_group_list_static", "set_int", "set_max_value_float", "set_max_value_int", "set_min_value_float", "set_min_value_int", "set_pointer", + "set_string", + "set_string_buffer_static", "snprintf" ], "python_name": "subject_t", @@ -181849,7 +208229,7 @@ "location": { "column": 15, "file": "", - "line": 3877 + "line": 3119 }, "methods": [], "python_name": "subject_value_t", @@ -181909,7 +208289,7 @@ "location": { "column": 8, "file": "", - "line": 6143 + "line": 7216 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -181978,7 +208358,7 @@ "location": { "column": 8, "file": "", - "line": 6194 + "line": 7221 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -182110,7 +208490,7 @@ "location": { "column": 8, "file": "", - "line": 6199 + "line": 7226 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -182182,7 +208562,7 @@ "location": { "column": 8, "file": "", - "line": 6456 + "line": 7236 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -182254,7 +208634,7 @@ "location": { "column": 16, "file": "", - "line": 5645 + "line": 6637 }, "methods": [ "init" @@ -182316,6 +208696,18 @@ "python_type": "str" } }, + { + "name": "placeholder_txt_size", + "type": { + "kind": "identifier", + "name": "lv_point_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "point_t" + } + }, { "name": "pwd_tmp", "type": { @@ -182490,7 +208882,7 @@ "location": { "column": 8, "file": "", - "line": 6169 + "line": 7174 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -182661,13 +209053,15 @@ "location": { "column": 8, "file": "", - "line": 5939 + "line": 6801 }, "methods": [ "copy", "delete", + "get_user_data", "set_apply_cb", - "set_parent" + "set_parent", + "set_user_data" ], "python_name": "theme_t", "typedef_names": [ @@ -182743,7 +209137,7 @@ "location": { "column": 16, "file": "", - "line": 5220 + "line": 4713 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -182794,7 +209188,7 @@ "location": { "column": 8, "file": "", - "line": 6402 + "line": 7242 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -182842,7 +209236,7 @@ "location": { "column": 8, "file": "", - "line": 6406 + "line": 7246 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183028,7 +209422,7 @@ "location": { "column": 16, "file": "", - "line": 5193 + "line": 4686 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183143,7 +209537,7 @@ "location": { "column": 8, "file": "", - "line": 5184 + "line": 4677 }, "methods": [ "delete", @@ -183234,7 +209628,7 @@ "location": { "column": 8, "file": "", - "line": 1107 + "line": 6757 }, "methods": [ "node_create" @@ -183334,7 +209728,7 @@ "location": { "column": 8, "file": "", - "line": 1113 + "line": 6763 }, "methods": [ "delete", @@ -183359,7 +209753,7 @@ "location": { "column": 16, "file": "", - "line": 329 + "line": 326 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183382,7 +209776,7 @@ "location": { "column": 16, "file": "", - "line": 328 + "line": 325 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183405,7 +209799,7 @@ "location": { "column": 16, "file": "", - "line": 331 + "line": 328 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183428,7 +209822,7 @@ "location": { "column": 16, "file": "", - "line": 327 + "line": 324 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183451,7 +209845,7 @@ "location": { "column": 16, "file": "", - "line": 330 + "line": 327 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183487,7 +209881,7 @@ "location": { "column": 8, "file": "", - "line": 6223 + "line": 7250 }, "methods": [], "policy_reason": "represented by an LVGL object wrapper", @@ -183533,7 +209927,7 @@ "location": { "column": 16, "file": "", - "line": 333 + "line": 330 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183591,7 +209985,7 @@ "location": { "column": 15, "file": "", - "line": 971 + "line": 1053 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -183642,7 +210036,7 @@ "location": { "column": 16, "file": "", - "line": 967 + "line": 1049 }, "methods": [], "policy_reason": "not reachable from a public binding boundary", @@ -184012,7 +210406,7 @@ "location": { "column": 32, "file": "", - "line": 309 + "line": 306 }, "name": "_3dtexture_t", "type": { @@ -185285,7 +211679,7 @@ "location": { "column": 3, "file": "", - "line": 723 + "line": 531 }, "name": "align_t", "type": { @@ -185309,7 +211703,7 @@ "location": { "column": 3, "file": "", - "line": 561 + "line": 386 }, "name": "anim_bezier3_para_t", "type": { @@ -185333,7 +211727,7 @@ "location": { "column": 15, "file": "", - "line": 552 + "line": 377 }, "name": "anim_completed_cb_t", "type": { @@ -185345,7 +211739,7 @@ "location": { "column": 40, "file": "", - "line": 552 + "line": 377 }, "name": null, "type": { @@ -185381,7 +211775,7 @@ "location": { "column": 15, "file": "", - "line": 551 + "line": 376 }, "name": "anim_custom_exec_cb_t", "type": { @@ -185393,7 +211787,7 @@ "location": { "column": 42, "file": "", - "line": 551 + "line": 376 }, "name": null, "type": { @@ -185408,7 +211802,7 @@ "location": { "column": 55, "file": "", - "line": 551 + "line": 376 }, "name": null, "type": { @@ -185441,7 +211835,7 @@ "location": { "column": 15, "file": "", - "line": 555 + "line": 380 }, "name": "anim_deleted_cb_t", "type": { @@ -185453,7 +211847,7 @@ "location": { "column": 38, "file": "", - "line": 555 + "line": 380 }, "name": null, "type": { @@ -185489,7 +211883,7 @@ "location": { "column": 14, "file": "", - "line": 548 + "line": 373 }, "name": "anim_enable_t", "type": { @@ -185514,7 +211908,7 @@ "location": { "column": 15, "file": "", - "line": 550 + "line": 375 }, "name": "anim_exec_xcb_t", "type": { @@ -185526,7 +211920,7 @@ "location": { "column": 36, "file": "", - "line": 550 + "line": 375 }, "name": null, "type": { @@ -185541,7 +211935,7 @@ "location": { "column": 44, "file": "", - "line": 550 + "line": 375 }, "name": null, "type": { @@ -185574,7 +211968,7 @@ "location": { "column": 18, "file": "", - "line": 554 + "line": 379 }, "name": "anim_get_value_cb_t", "type": { @@ -185586,7 +211980,7 @@ "location": { "column": 43, "file": "", - "line": 554 + "line": 379 }, "name": null, "type": { @@ -185622,7 +212016,7 @@ "location": { "column": 18, "file": "", - "line": 549 + "line": 374 }, "name": "anim_path_cb_t", "type": { @@ -185634,7 +212028,7 @@ "location": { "column": 38, "file": "", - "line": 549 + "line": 374 }, "name": null, "type": { @@ -185673,7 +212067,7 @@ "location": { "column": 32, "file": "", - "line": 5001 + "line": 4379 }, "name": "anim_ready_cb_t", "type": { @@ -185698,7 +212092,7 @@ "location": { "column": 15, "file": "", - "line": 553 + "line": 378 }, "name": "anim_start_cb_t", "type": { @@ -185710,7 +212104,7 @@ "location": { "column": 36, "file": "", - "line": 553 + "line": 378 }, "name": null, "type": { @@ -185746,7 +212140,7 @@ "location": { "column": 3, "file": "", - "line": 5216 + "line": 4709 }, "name": "anim_state_t", "type": { @@ -185770,7 +212164,7 @@ "location": { "column": 27, "file": "", - "line": 233 + "line": 235 }, "name": "anim_t", "type": { @@ -185795,7 +212189,7 @@ "location": { "column": 3, "file": "", - "line": 648 + "line": 473 }, "name": "anim_timeline_dsc_t", "type": { @@ -185820,7 +212214,7 @@ "location": { "column": 36, "file": "", - "line": 234 + "line": 236 }, "name": "anim_timeline_t", "type": { @@ -185845,7 +212239,7 @@ "location": { "column": 3, "file": "", - "line": 4144 + "line": 3512 }, "name": "animimg_part_t", "type": { @@ -185869,7 +212263,7 @@ "location": { "column": 30, "file": "", - "line": 267 + "line": 264 }, "name": "animimg_t", "type": { @@ -185894,7 +212288,7 @@ "location": { "column": 3, "file": "", - "line": 4165 + "line": 3533 }, "name": "arc_mode_t", "type": { @@ -185918,7 +212312,7 @@ "location": { "column": 26, "file": "", - "line": 268 + "line": 265 }, "name": "arc_t", "type": { @@ -185943,7 +212337,7 @@ "location": { "column": 3, "file": "", - "line": 4199 + "line": 3567 }, "name": "arclabel_dir_t", "type": { @@ -185967,7 +212361,7 @@ "location": { "column": 3, "file": "", - "line": 4210 + "line": 3578 }, "name": "arclabel_overflow_t", "type": { @@ -185991,7 +212385,7 @@ "location": { "column": 31, "file": "", - "line": 269 + "line": 266 }, "name": "arclabel_t", "type": { @@ -186016,7 +212410,7 @@ "location": { "column": 3, "file": "", - "line": 4205 + "line": 3573 }, "name": "arclabel_text_align_t", "type": { @@ -186040,7 +212434,7 @@ "location": { "column": 3, "file": "", - "line": 699 + "line": 507 }, "name": "area_t", "type": { @@ -186062,9 +212456,9 @@ "c_name": "lv_array_t", "callback": false, "location": { - "column": 28, + "column": 3, "file": "", - "line": 352 + "line": 4950 }, "name": "array_t", "type": { @@ -186089,7 +212483,7 @@ "location": { "column": 15, "file": "", - "line": 543 + "line": 3421 }, "name": "async_cb_t", "type": { @@ -186101,7 +212495,7 @@ "location": { "column": 31, "file": "", - "line": 543 + "line": 3421 }, "name": null, "type": { @@ -187236,7 +213630,7 @@ "location": { "column": 31, "file": "", - "line": 271 + "line": 268 }, "name": "bar_anim_t", "type": { @@ -187261,7 +213655,7 @@ "location": { "column": 3, "file": "", - "line": 4275 + "line": 3645 }, "name": "bar_mode_t", "type": { @@ -187285,7 +213679,7 @@ "location": { "column": 3, "file": "", - "line": 4280 + "line": 3650 }, "name": "bar_orientation_t", "type": { @@ -187309,7 +213703,7 @@ "location": { "column": 26, "file": "", - "line": 272 + "line": 269 }, "name": "bar_t", "type": { @@ -187334,7 +213728,7 @@ "location": { "column": 3, "file": "", - "line": 4927 + "line": 3687 }, "name": "barcode_encoding_t", "type": { @@ -187358,7 +213752,7 @@ "location": { "column": 30, "file": "", - "line": 321 + "line": 318 }, "name": "barcode_t", "type": { @@ -187372,6 +213766,30 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_barcode_update_mode_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 3691 + }, + "name": "barcode_update_mode_t", + "type": { + "kind": "enum" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "barcode.UPDATE_MODE | int" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -187383,7 +213801,7 @@ "location": { "column": 3, "file": "", - "line": 1313 + "line": 1256 }, "name": "base_dir_t", "type": { @@ -187396,6 +213814,30 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_binfont_dsc_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 3336 + }, + "name": "binfont_dsc_t", + "type": { + "kind": "struct" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "binfont_dsc_t" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -187407,7 +213849,7 @@ "location": { "column": 3, "file": "", - "line": 4020 + "line": 3330 }, "name": "binfont_font_src_t", "type": { @@ -187431,7 +213873,7 @@ "location": { "column": 3, "file": "", - "line": 1434 + "line": 1373 }, "name": "blend_mode_t", "type": { @@ -187455,7 +213897,7 @@ "location": { "column": 3, "file": "", - "line": 1453 + "line": 1392 }, "name": "blur_quality_t", "type": { @@ -187505,7 +213947,7 @@ "location": { "column": 3, "file": "", - "line": 1448 + "line": 1387 }, "name": "border_side_t", "type": { @@ -187529,7 +213971,7 @@ "location": { "column": 32, "file": "", - "line": 5003 + "line": 4381 }, "name": "btnmatrix_ctrl_t", "type": { @@ -187554,7 +213996,7 @@ "location": { "column": 3, "file": "", - "line": 4081 + "line": 3400 }, "name": "builtin_font_src_t", "type": { @@ -187578,7 +214020,7 @@ "location": { "column": 29, "file": "", - "line": 273 + "line": 270 }, "name": "button_t", "type": { @@ -187603,7 +214045,7 @@ "location": { "column": 15, "file": "", - "line": 4331 + "line": 3742 }, "name": "buttonmatrix_button_draw_cb_t", "type": { @@ -187615,7 +214057,7 @@ "location": { "column": 59, "file": "", - "line": 4331 + "line": 3742 }, "name": "btnm", "type": { @@ -187630,7 +214072,7 @@ "location": { "column": 76, "file": "", - "line": 4331 + "line": 3742 }, "name": "btn_id", "type": { @@ -187642,7 +214084,7 @@ "location": { "column": 100, "file": "", - "line": 4331 + "line": 3742 }, "name": "draw_area", "type": { @@ -187660,7 +214102,7 @@ "location": { "column": 66, "file": "", - "line": 4332 + "line": 3743 }, "name": "clip_area", "type": { @@ -187699,7 +214141,7 @@ "location": { "column": 3, "file": "", - "line": 4330 + "line": 3741 }, "name": "buttonmatrix_ctrl_t", "type": { @@ -187723,7 +214165,7 @@ "location": { "column": 35, "file": "", - "line": 274 + "line": 271 }, "name": "buttonmatrix_t", "type": { @@ -187748,7 +214190,7 @@ "location": { "column": 29, "file": "", - "line": 5266 + "line": 4531 }, "name": "cache_add_cb_t", "type": { @@ -187760,7 +214202,7 @@ "location": { "column": 60, "file": "", - "line": 5266 + "line": 4531 }, "name": "cache", "type": { @@ -187775,7 +214217,7 @@ "location": { "column": 80, "file": "", - "line": 5266 + "line": 4531 }, "name": "key", "type": { @@ -187793,7 +214235,7 @@ "location": { "column": 92, "file": "", - "line": 5266 + "line": 4531 }, "name": "user_data", "type": { @@ -187832,7 +214274,7 @@ "location": { "column": 17, "file": "", - "line": 5262 + "line": 4527 }, "name": "cache_alloc_cb_t", "type": { @@ -187866,7 +214308,7 @@ "location": { "column": 34, "file": "", - "line": 5257 + "line": 4522 }, "name": "cache_class_t", "type": { @@ -187891,7 +214333,7 @@ "location": { "column": 33, "file": "", - "line": 5261 + "line": 4526 }, "name": "cache_compare_cb_t", "type": { @@ -187903,7 +214345,7 @@ "location": { "column": 68, "file": "", - "line": 5261 + "line": 4526 }, "name": "a", "type": { @@ -187921,7 +214363,7 @@ "location": { "column": 84, "file": "", - "line": 5261 + "line": 4526 }, "name": "b", "type": { @@ -187960,7 +214402,7 @@ "location": { "column": 17, "file": "", - "line": 5258 + "line": 4523 }, "name": "cache_compare_res_t", "type": { @@ -187985,7 +214427,7 @@ "location": { "column": 15, "file": "", - "line": 5259 + "line": 4524 }, "name": "cache_create_cb_t", "type": { @@ -187997,7 +214439,7 @@ "location": { "column": 43, "file": "", - "line": 5259 + "line": 4524 }, "name": "node", "type": { @@ -188012,7 +214454,7 @@ "location": { "column": 56, "file": "", - "line": 5259 + "line": 4524 }, "name": "user_data", "type": { @@ -188048,7 +214490,7 @@ "location": { "column": 15, "file": "", - "line": 5264 + "line": 4529 }, "name": "cache_destroy_cb_t", "type": { @@ -188060,7 +214502,7 @@ "location": { "column": 50, "file": "", - "line": 5264 + "line": 4529 }, "name": "cache", "type": { @@ -188075,7 +214517,7 @@ "location": { "column": 64, "file": "", - "line": 5264 + "line": 4529 }, "name": "user_data", "type": { @@ -188111,7 +214553,7 @@ "location": { "column": 15, "file": "", - "line": 5269 + "line": 4534 }, "name": "cache_drop_all_cb_t", "type": { @@ -188123,7 +214565,7 @@ "location": { "column": 51, "file": "", - "line": 5269 + "line": 4534 }, "name": "cache", "type": { @@ -188138,7 +214580,7 @@ "location": { "column": 65, "file": "", - "line": 5269 + "line": 4534 }, "name": "user_data", "type": { @@ -188174,7 +214616,7 @@ "location": { "column": 15, "file": "", - "line": 5268 + "line": 4533 }, "name": "cache_drop_cb_t", "type": { @@ -188186,7 +214628,7 @@ "location": { "column": 47, "file": "", - "line": 5268 + "line": 4533 }, "name": "cache", "type": { @@ -188201,7 +214643,7 @@ "location": { "column": 67, "file": "", - "line": 5268 + "line": 4533 }, "name": "key", "type": { @@ -188219,7 +214661,7 @@ "location": { "column": 79, "file": "", - "line": 5268 + "line": 4533 }, "name": "user_data", "type": { @@ -188255,7 +214697,7 @@ "location": { "column": 34, "file": "", - "line": 251 + "line": 4513 }, "name": "cache_entry_t", "type": { @@ -188280,7 +214722,7 @@ "location": { "column": 15, "file": "", - "line": 5260 + "line": 4525 }, "name": "cache_free_cb_t", "type": { @@ -188292,7 +214734,7 @@ "location": { "column": 41, "file": "", - "line": 5260 + "line": 4525 }, "name": "node", "type": { @@ -188307,7 +214749,7 @@ "location": { "column": 54, "file": "", - "line": 5260 + "line": 4525 }, "name": "user_data", "type": { @@ -188343,7 +214785,7 @@ "location": { "column": 29, "file": "", - "line": 5265 + "line": 4530 }, "name": "cache_get_cb_t", "type": { @@ -188355,7 +214797,7 @@ "location": { "column": 60, "file": "", - "line": 5265 + "line": 4530 }, "name": "cache", "type": { @@ -188370,7 +214812,7 @@ "location": { "column": 80, "file": "", - "line": 5265 + "line": 4530 }, "name": "key", "type": { @@ -188388,7 +214830,7 @@ "location": { "column": 92, "file": "", - "line": 5265 + "line": 4530 }, "name": "user_data", "type": { @@ -188427,7 +214869,7 @@ "location": { "column": 29, "file": "", - "line": 5270 + "line": 4535 }, "name": "cache_get_victim_cb", "type": { @@ -188439,7 +214881,7 @@ "location": { "column": 65, "file": "", - "line": 5270 + "line": 4535 }, "name": "cache", "type": { @@ -188454,7 +214896,7 @@ "location": { "column": 79, "file": "", - "line": 5270 + "line": 4535 }, "name": "user_data", "type": { @@ -188493,7 +214935,7 @@ "location": { "column": 15, "file": "", - "line": 5263 + "line": 4528 }, "name": "cache_init_cb_t", "type": { @@ -188505,7 +214947,7 @@ "location": { "column": 47, "file": "", - "line": 5263 + "line": 4528 }, "name": "cache", "type": { @@ -188541,7 +214983,7 @@ "location": { "column": 22, "file": "", - "line": 5273 + "line": 4538 }, "name": "cache_iter_create_cb", "type": { @@ -188553,7 +214995,7 @@ "location": { "column": 59, "file": "", - "line": 5273 + "line": 4538 }, "name": "cache", "type": { @@ -188592,7 +215034,7 @@ "location": { "column": 32, "file": "", - "line": 5256 + "line": 4521 }, "name": "cache_ops_t", "type": { @@ -188617,7 +215059,7 @@ "location": { "column": 15, "file": "", - "line": 5267 + "line": 4532 }, "name": "cache_remove_cb_t", "type": { @@ -188629,7 +215071,7 @@ "location": { "column": 49, "file": "", - "line": 5267 + "line": 4532 }, "name": "cache", "type": { @@ -188644,7 +215086,7 @@ "location": { "column": 75, "file": "", - "line": 5267 + "line": 4532 }, "name": "entry", "type": { @@ -188659,7 +215101,7 @@ "location": { "column": 89, "file": "", - "line": 5267 + "line": 4532 }, "name": "user_data", "type": { @@ -188695,7 +215137,7 @@ "location": { "column": 38, "file": "", - "line": 5271 + "line": 4536 }, "name": "cache_reserve_cond_cb", "type": { @@ -188707,7 +215149,7 @@ "location": { "column": 76, "file": "", - "line": 5271 + "line": 4536 }, "name": "cache", "type": { @@ -188722,7 +215164,7 @@ "location": { "column": 96, "file": "", - "line": 5271 + "line": 4536 }, "name": "key", "type": { @@ -188740,7 +215182,7 @@ "location": { "column": 110, "file": "", - "line": 5271 + "line": 4536 }, "name": "size", "type": { @@ -188752,7 +215194,7 @@ "location": { "column": 70, "file": "", - "line": 5272 + "line": 4537 }, "name": "user_data", "type": { @@ -188788,7 +215230,7 @@ "location": { "column": 3, "file": "", - "line": 5251 + "line": 4520 }, "name": "cache_reserve_cond_res_t", "type": { @@ -188812,7 +215254,7 @@ "location": { "column": 38, "file": "", - "line": 5302 + "line": 4567 }, "name": "cache_slot_size_t", "type": { @@ -188837,7 +215279,7 @@ "location": { "column": 28, "file": "", - "line": 250 + "line": 4514 }, "name": "cache_t", "type": { @@ -188888,7 +215330,7 @@ "location": { "column": 3, "file": "", - "line": 4353 + "line": 3764 }, "name": "calendar_date_t", "type": { @@ -188912,7 +215354,7 @@ "location": { "column": 31, "file": "", - "line": 275 + "line": 272 }, "name": "calendar_t", "type": { @@ -188937,7 +215379,7 @@ "location": { "column": 29, "file": "", - "line": 276 + "line": 273 }, "name": "canvas_t", "type": { @@ -189014,7 +215456,7 @@ "location": { "column": 3, "file": "", - "line": 4411 + "line": 3806 }, "name": "chart_axis_t", "type": { @@ -189038,7 +215480,7 @@ "location": { "column": 35, "file": "", - "line": 278 + "line": 275 }, "name": "chart_cursor_t", "type": { @@ -189063,7 +215505,7 @@ "location": { "column": 35, "file": "", - "line": 277 + "line": 274 }, "name": "chart_series_t", "type": { @@ -189088,7 +215530,7 @@ "location": { "column": 28, "file": "", - "line": 279 + "line": 276 }, "name": "chart_t", "type": { @@ -189113,7 +215555,7 @@ "location": { "column": 3, "file": "", - "line": 4400 + "line": 3795 }, "name": "chart_type_t", "type": { @@ -189137,7 +215579,7 @@ "location": { "column": 3, "file": "", - "line": 4404 + "line": 3799 }, "name": "chart_update_mode_t", "type": { @@ -189161,7 +215603,7 @@ "location": { "column": 31, "file": "", - "line": 280 + "line": 277 }, "name": "checkbox_t", "type": { @@ -189186,7 +215628,7 @@ "location": { "column": 15, "file": "", - "line": 1082 + "line": 6543 }, "name": "circle_buf_fill_cb_t", "type": { @@ -189198,7 +215640,7 @@ "location": { "column": 46, "file": "", - "line": 1082 + "line": 6543 }, "name": "buf", "type": { @@ -189213,7 +215655,7 @@ "location": { "column": 62, "file": "", - "line": 1082 + "line": 6543 }, "name": "buff_len", "type": { @@ -189225,7 +215667,7 @@ "location": { "column": 80, "file": "", - "line": 1082 + "line": 6543 }, "name": "index", "type": { @@ -189237,7 +215679,7 @@ "location": { "column": 92, "file": "", - "line": 1082 + "line": 6543 }, "name": "user_data", "type": { @@ -189273,7 +215715,7 @@ "location": { "column": 33, "file": "", - "line": 354 + "line": 6542 }, "name": "circle_buf_t", "type": { @@ -189350,7 +215792,7 @@ "location": { "column": 3, "file": "", - "line": 791 + "line": 851 }, "name": "color16_t", "type": { @@ -189374,7 +215816,7 @@ "location": { "column": 3, "file": "", - "line": 806 + "line": 866 }, "name": "color16a_t", "type": { @@ -189398,7 +215840,7 @@ "location": { "column": 3, "file": "", - "line": 797 + "line": 857 }, "name": "color32_t", "type": { @@ -189422,7 +215864,7 @@ "location": { "column": 21, "file": "", - "line": 925 + "line": 983 }, "name": "color_filter_cb_t", "type": { @@ -189434,7 +215876,7 @@ "location": { "column": 44, "file": "", - "line": 925 + "line": 983 }, "name": null, "type": { @@ -189452,7 +215894,7 @@ "location": { "column": 83, "file": "", - "line": 925 + "line": 983 }, "name": null, "type": { @@ -189464,7 +215906,7 @@ "location": { "column": 95, "file": "", - "line": 925 + "line": 983 }, "name": null, "type": { @@ -189522,7 +215964,7 @@ "location": { "column": 3, "file": "", - "line": 853 + "line": 911 }, "name": "color_format_t", "type": { @@ -189546,7 +215988,7 @@ "location": { "column": 3, "file": "", - "line": 802 + "line": 862 }, "name": "color_hsv_t", "type": { @@ -189570,7 +216012,7 @@ "location": { "column": 3, "file": "", - "line": 786 + "line": 846 }, "name": "color_t", "type": { @@ -189724,7 +216166,7 @@ "location": { "column": 17, "file": "", - "line": 4995 + "line": 4373 }, "name": "coord_t", "type": { @@ -189749,7 +216191,7 @@ "location": { "column": 39, "file": "", - "line": 264 + "line": 262 }, "name": "cover_check_info_t", "type": { @@ -189774,7 +216216,7 @@ "location": { "column": 3, "file": "", - "line": 3775 + "line": 2915 }, "name": "cover_res_t", "type": { @@ -189824,7 +216266,7 @@ "location": { "column": 15, "file": "", - "line": 422 + "line": 3449 }, "name": "delay_cb_t", "type": { @@ -189836,7 +216278,7 @@ "location": { "column": 40, "file": "", - "line": 422 + "line": 3449 }, "name": "ms", "type": { @@ -189858,6 +216300,79 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_delete_cb_t", + "callback": true, + "location": { + "column": 14, + "file": "", + "line": 2940 + }, + "name": "delete_cb_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 36, + "file": "", + "line": 2940 + }, + "name": "user_data", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_delete_dsc_t", + "callback": false, + "location": { + "column": 33, + "file": "", + "line": 224 + }, + "name": "delete_dsc_t", + "type": { + "kind": "struct", + "name": "_lv_delete_dsc_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "delete_dsc_t" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -189895,7 +216410,7 @@ "location": { "column": 3, "file": "", - "line": 733 + "line": 541 }, "name": "dir_t", "type": { @@ -189919,7 +216434,7 @@ "location": { "column": 34, "file": "", - "line": 5000 + "line": 4378 }, "name": "disp_render_t", "type": { @@ -189933,6 +216448,31 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_disp_rot_t", + "callback": false, + "location": { + "column": 31, + "file": "", + "line": 4377 + }, + "name": "disp_rot_t", + "type": { + "kind": "identifier", + "name": "lv_display_rotation_t" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "DISPLAY_ROTATION | int" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -189944,7 +216484,7 @@ "location": { "column": 31, "file": "", - "line": 4999 + "line": 4399 }, "name": "disp_rotation_t", "type": { @@ -189969,7 +216509,7 @@ "location": { "column": 22, "file": "", - "line": 4998 + "line": 4376 }, "name": "disp_t", "type": { @@ -189994,7 +216534,7 @@ "location": { "column": 15, "file": "", - "line": 1980 + "line": 1776 }, "name": "display_flush_cb_t", "type": { @@ -190006,7 +216546,7 @@ "location": { "column": 52, "file": "", - "line": 1980 + "line": 1776 }, "name": "disp", "type": { @@ -190021,7 +216561,7 @@ "location": { "column": 76, "file": "", - "line": 1980 + "line": 1776 }, "name": "area", "type": { @@ -190039,7 +216579,7 @@ "location": { "column": 92, "file": "", - "line": 1980 + "line": 1776 }, "name": "px_map", "type": { @@ -190075,7 +216615,7 @@ "location": { "column": 15, "file": "", - "line": 1981 + "line": 1777 }, "name": "display_flush_wait_cb_t", "type": { @@ -190087,7 +216627,7 @@ "location": { "column": 57, "file": "", - "line": 1981 + "line": 1777 }, "name": "disp", "type": { @@ -190123,7 +216663,7 @@ "location": { "column": 3, "file": "", - "line": 1961 + "line": 1757 }, "name": "display_render_mode_t", "type": { @@ -190147,7 +216687,7 @@ "location": { "column": 3, "file": "", - "line": 1956 + "line": 1752 }, "name": "display_rotation_t", "type": { @@ -190160,6 +216700,120 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_sync_cb_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 1778 + }, + "name": "display_sync_cb_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 51, + "file": "", + "line": 1778 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + } + }, + { + "location": { + "column": 75, + "file": "", + "line": 1778 + }, + "name": "area", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t, area_t], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_display_sync_wait_cb_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 1779 + }, + "name": "display_sync_wait_cb_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 56, + "file": "", + "line": 1779 + }, + "name": "disp", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_display_t" + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[display_t], None]" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -190171,7 +216825,7 @@ "location": { "column": 30, "file": "", - "line": 225 + "line": 226 }, "name": "display_t", "type": { @@ -190222,7 +216876,7 @@ "location": { "column": 3, "file": "", - "line": 3573 + "line": 2756 }, "name": "draw_arc_dsc_t", "type": { @@ -190246,7 +216900,7 @@ "location": { "column": 3, "file": "", - "line": 3595 + "line": 2778 }, "name": "draw_blur_dsc_t", "type": { @@ -190270,7 +216924,7 @@ "location": { "column": 3, "file": "", - "line": 3426 + "line": 2499 }, "name": "draw_border_dsc_t", "type": { @@ -190294,7 +216948,7 @@ "location": { "column": 3, "file": "", - "line": 3437 + "line": 2510 }, "name": "draw_box_shadow_dsc_t", "type": { @@ -190318,7 +216972,7 @@ "location": { "column": 17, "file": "", - "line": 995 + "line": 1077 }, "name": "draw_buf_align_cb_t", "type": { @@ -190330,7 +216984,7 @@ "location": { "column": 47, "file": "", - "line": 995 + "line": 1077 }, "name": "buf", "type": { @@ -190345,7 +216999,7 @@ "location": { "column": 72, "file": "", - "line": 995 + "line": 1077 }, "name": "color_format", "type": { @@ -190381,7 +217035,7 @@ "location": { "column": 15, "file": "", - "line": 996 + "line": 1078 }, "name": "draw_buf_cache_operation_cb_t", "type": { @@ -190393,7 +217047,7 @@ "location": { "column": 70, "file": "", - "line": 996 + "line": 1078 }, "name": "draw_buf", "type": { @@ -190411,7 +217065,7 @@ "location": { "column": 98, "file": "", - "line": 996 + "line": 1078 }, "name": "area", "type": { @@ -190439,6 +217093,87 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_buf_clear_cb_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 1080 + }, + "name": "draw_buf_clear_cb_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 54, + "file": "", + "line": 1080 + }, + "name": "draw_buf", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_draw_buf_t" + } + } + }, + { + "location": { + "column": 82, + "file": "", + "line": 1080 + }, + "name": "a", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_area_t", + "qualifiers": [ + "const" + ] + } + } + }, + { + "location": { + "column": 98, + "file": "", + "line": 1080 + }, + "name": "layer", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_layer_t" + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[draw_buf_t, area_t, layer_t], None]" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -190450,7 +217185,7 @@ "location": { "column": 15, "file": "", - "line": 993 + "line": 1075 }, "name": "draw_buf_copy_cb_t", "type": { @@ -190462,7 +217197,7 @@ "location": { "column": 53, "file": "", - "line": 993 + "line": 1075 }, "name": "dest", "type": { @@ -190477,7 +217212,7 @@ "location": { "column": 77, "file": "", - "line": 993 + "line": 1075 }, "name": "dest_area", "type": { @@ -190495,7 +217230,7 @@ "location": { "column": 59, "file": "", - "line": 994 + "line": 1076 }, "name": "src", "type": { @@ -190513,7 +217248,7 @@ "location": { "column": 82, "file": "", - "line": 994 + "line": 1076 }, "name": "src_area", "type": { @@ -190552,7 +217287,7 @@ "location": { "column": 15, "file": "", - "line": 992 + "line": 1074 }, "name": "draw_buf_free_cb_t", "type": { @@ -190564,7 +217299,7 @@ "location": { "column": 44, "file": "", - "line": 992 + "line": 1074 }, "name": "draw_buf", "type": { @@ -190600,7 +217335,7 @@ "location": { "column": 40, "file": "", - "line": 346 + "line": 343 }, "name": "draw_buf_handlers_t", "type": { @@ -190625,7 +217360,7 @@ "location": { "column": 17, "file": "", - "line": 991 + "line": 1073 }, "name": "draw_buf_malloc_cb_t", "type": { @@ -190637,7 +217372,7 @@ "location": { "column": 50, "file": "", - "line": 991 + "line": 1073 }, "name": "size", "type": { @@ -190649,7 +217384,7 @@ "location": { "column": 74, "file": "", - "line": 991 + "line": 1073 }, "name": "color_format", "type": { @@ -190685,7 +217420,7 @@ "location": { "column": 31, "file": "", - "line": 355 + "line": 351 }, "name": "draw_buf_t", "type": { @@ -190710,7 +217445,7 @@ "location": { "column": 19, "file": "", - "line": 997 + "line": 1079 }, "name": "draw_buf_width_to_stride_cb_t", "type": { @@ -190722,7 +217457,7 @@ "location": { "column": 63, "file": "", - "line": 997 + "line": 1079 }, "name": "w", "type": { @@ -190734,7 +217469,7 @@ "location": { "column": 84, "file": "", - "line": 997 + "line": 1079 }, "name": "color_format", "type": { @@ -190767,7 +217502,7 @@ "location": { "column": 3, "file": "", - "line": 3353 + "line": 2423 }, "name": "draw_dsc_base_t", "type": { @@ -190791,7 +217526,7 @@ "location": { "column": 3, "file": "", - "line": 3418 + "line": 2491 }, "name": "draw_fill_dsc_t", "type": { @@ -190815,7 +217550,7 @@ "location": { "column": 3, "file": "", - "line": 5381 + "line": 4648 }, "name": "draw_global_info_t", "type": { @@ -190839,7 +217574,7 @@ "location": { "column": 14, "file": "", - "line": 3496 + "line": 2569 }, "name": "draw_glyph_cb_t", "type": { @@ -190851,7 +217586,7 @@ "location": { "column": 50, "file": "", - "line": 3496 + "line": 2569 }, "name": "t", "type": { @@ -190866,7 +217601,7 @@ "location": { "column": 75, "file": "", - "line": 3496 + "line": 2569 }, "name": "dsc", "type": { @@ -190881,7 +217616,7 @@ "location": { "column": 101, "file": "", - "line": 3496 + "line": 2569 }, "name": "fill_dsc", "type": { @@ -190896,7 +217631,7 @@ "location": { "column": 51, "file": "", - "line": 3497 + "line": 2570 }, "name": "fill_area", "type": { @@ -190935,7 +217670,7 @@ "location": { "column": 37, "file": "", - "line": 258 + "line": 256 }, "name": "draw_glyph_dsc_t", "type": { @@ -190960,7 +217695,7 @@ "location": { "column": 15, "file": "", - "line": 3534 + "line": 2717 }, "name": "draw_image_core_cb", "type": { @@ -190972,7 +217707,7 @@ "location": { "column": 54, "file": "", - "line": 3534 + "line": 2717 }, "name": "t", "type": { @@ -190987,7 +217722,7 @@ "location": { "column": 85, "file": "", - "line": 3534 + "line": 2717 }, "name": "draw_dsc", "type": { @@ -191005,7 +217740,7 @@ "location": { "column": 68, "file": "", - "line": 3535 + "line": 2718 }, "name": "decoder_dsc", "type": { @@ -191023,7 +217758,7 @@ "location": { "column": 103, "file": "", - "line": 3535 + "line": 2718 }, "name": "sup", "type": { @@ -191038,7 +217773,7 @@ "location": { "column": 55, "file": "", - "line": 3536 + "line": 2719 }, "name": "img_coords", "type": { @@ -191056,7 +217791,7 @@ "location": { "column": 85, "file": "", - "line": 3536 + "line": 2719 }, "name": "clipped_img_area", "type": { @@ -191095,7 +217830,7 @@ "location": { "column": 37, "file": "", - "line": 241 + "line": 243 }, "name": "draw_image_dsc_t", "type": { @@ -191120,7 +217855,7 @@ "location": { "column": 37, "file": "", - "line": 259 + "line": 257 }, "name": "draw_image_sup_t", "type": { @@ -191145,7 +217880,7 @@ "location": { "column": 3, "file": "", - "line": 3477 + "line": 2550 }, "name": "draw_label_dsc_t", "type": { @@ -191169,7 +217904,7 @@ "location": { "column": 38, "file": "", - "line": 257 + "line": 255 }, "name": "draw_label_hint_t", "type": { @@ -191194,7 +217929,7 @@ "location": { "column": 3, "file": "", - "line": 3495 + "line": 2568 }, "name": "draw_letter_dsc_t", "type": { @@ -191218,7 +217953,7 @@ "location": { "column": 3, "file": "", - "line": 3556 + "line": 2739 }, "name": "draw_line_dsc_t", "type": { @@ -191242,7 +217977,7 @@ "location": { "column": 41, "file": "", - "line": 260 + "line": 258 }, "name": "draw_mask_rect_dsc_t", "type": { @@ -191267,7 +218002,7 @@ "location": { "column": 32, "file": "", - "line": 256 + "line": 254 }, "name": "draw_mask_t", "type": { @@ -191292,7 +218027,7 @@ "location": { "column": 3, "file": "", - "line": 3411 + "line": 2484 }, "name": "draw_rect_dsc_t", "type": { @@ -191316,7 +218051,7 @@ "location": { "column": 40, "file": "", - "line": 343 + "line": 340 }, "name": "draw_sw_blend_dsc_t", "type": { @@ -191341,7 +218076,7 @@ "location": { "column": 45, "file": "", - "line": 344 + "line": 341 }, "name": "draw_sw_blend_fill_dsc_t", "type": { @@ -191351,7 +218086,7 @@ "view": { "category": "struct", "conversion": "struct_value", - "python_type": "Any" + "python_type": "draw_sw_blend_fill_dsc_t" }, "visibility": "public" }, @@ -191366,7 +218101,7 @@ "location": { "column": 15, "file": "", - "line": 5072 + "line": 4650 }, "name": "draw_sw_blend_handler_t", "type": { @@ -191378,7 +218113,7 @@ "location": { "column": 59, "file": "", - "line": 5072 + "line": 4650 }, "name": "t", "type": { @@ -191393,7 +218128,7 @@ "location": { "column": 93, "file": "", - "line": 5072 + "line": 4650 }, "name": "dsc", "type": { @@ -191432,7 +218167,7 @@ "location": { "column": 46, "file": "", - "line": 345 + "line": 342 }, "name": "draw_sw_blend_image_dsc_t", "type": { @@ -191442,7 +218177,7 @@ "view": { "category": "struct", "conversion": "struct_value", - "python_type": "Any" + "python_type": "draw_sw_blend_image_dsc_t" }, "visibility": "public" }, @@ -191457,7 +218192,7 @@ "location": { "column": 3, "file": "", - "line": 5076 + "line": 4654 }, "name": "draw_sw_custom_blend_handler_t", "type": { @@ -191470,6 +218205,54 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_grad_calc_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 6282 + }, + "name": "draw_sw_grad_calc_t", + "type": { + "kind": "struct" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "draw_sw_grad_calc_t" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_halfword_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 6192 + }, + "name": "draw_sw_halfword_t", + "type": { + "kind": "union" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "Any" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -191481,7 +218264,7 @@ "location": { "column": 47, "file": "", - "line": 339 + "line": 336 }, "name": "draw_sw_mask_angle_param_t", "type": { @@ -191506,7 +218289,7 @@ "location": { "column": 46, "file": "", - "line": 337 + "line": 334 }, "name": "draw_sw_mask_common_dsc_t", "type": { @@ -191531,7 +218314,7 @@ "location": { "column": 46, "file": "", - "line": 341 + "line": 338 }, "name": "draw_sw_mask_fade_param_t", "type": { @@ -191556,7 +218339,7 @@ "location": { "column": 46, "file": "", - "line": 338 + "line": 335 }, "name": "draw_sw_mask_line_param_t", "type": { @@ -191581,7 +218364,7 @@ "location": { "column": 3, "file": "", - "line": 5048 + "line": 4762 }, "name": "draw_sw_mask_line_side_t", "type": { @@ -191605,7 +218388,7 @@ "location": { "column": 45, "file": "", - "line": 342 + "line": 339 }, "name": "draw_sw_mask_map_param_t", "type": { @@ -191630,7 +218413,7 @@ "location": { "column": 45, "file": "", - "line": 5460 + "line": 4851 }, "name": "draw_sw_mask_radius_circle_dsc_arr_t", "type": { @@ -191661,7 +218444,7 @@ "location": { "column": 3, "file": "", - "line": 5403 + "line": 4794 }, "name": "draw_sw_mask_radius_circle_dsc_t", "type": { @@ -191685,7 +218468,7 @@ "location": { "column": 48, "file": "", - "line": 340 + "line": 337 }, "name": "draw_sw_mask_radius_param_t", "type": { @@ -191710,7 +218493,7 @@ "location": { "column": 3, "file": "", - "line": 5035 + "line": 4749 }, "name": "draw_sw_mask_res_t", "type": { @@ -191734,7 +218517,7 @@ "location": { "column": 3, "file": "", - "line": 5042 + "line": 4756 }, "name": "draw_sw_mask_type_t", "type": { @@ -191758,7 +218541,7 @@ "location": { "column": 32, "file": "", - "line": 5049 + "line": 4763 }, "name": "draw_sw_mask_xcb_t", "type": { @@ -191770,7 +218553,7 @@ "location": { "column": 65, "file": "", - "line": 5049 + "line": 4763 }, "name": "mask_buf", "type": { @@ -191785,7 +218568,7 @@ "location": { "column": 85, "file": "", - "line": 5049 + "line": 4763 }, "name": "abs_x", "type": { @@ -191797,7 +218580,7 @@ "location": { "column": 100, "file": "", - "line": 5049 + "line": 4763 }, "name": "abs_y", "type": { @@ -191809,7 +218592,7 @@ "location": { "column": 64, "file": "", - "line": 5050 + "line": 4764 }, "name": "len", "type": { @@ -191821,7 +218604,7 @@ "location": { "column": 61, "file": "", - "line": 5051 + "line": 4765 }, "name": "p", "type": { @@ -191857,7 +218640,7 @@ "location": { "column": 3, "file": "", - "line": 5390 + "line": 4739 }, "name": "draw_sw_thread_dsc_t", "type": { @@ -191881,7 +218664,7 @@ "location": { "column": 35, "file": "", - "line": 336 + "line": 333 }, "name": "draw_sw_unit_t", "type": { @@ -191895,6 +218678,30 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_draw_sw_word_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 6187 + }, + "name": "draw_sw_word_t", + "type": { + "kind": "union" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "Any" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -191906,7 +218713,7 @@ "location": { "column": 3, "file": "", - "line": 3323 + "line": 2391 }, "name": "draw_task_state_t", "type": { @@ -191930,7 +218737,7 @@ "location": { "column": 32, "file": "", - "line": 228 + "line": 229 }, "name": "draw_task_t", "type": { @@ -191955,7 +218762,7 @@ "location": { "column": 3, "file": "", - "line": 3316 + "line": 2383 }, "name": "draw_task_type_t", "type": { @@ -191979,7 +218786,7 @@ "location": { "column": 3, "file": "", - "line": 3586 + "line": 2769 }, "name": "draw_triangle_dsc_t", "type": { @@ -192003,7 +218810,7 @@ "location": { "column": 32, "file": "", - "line": 227 + "line": 228 }, "name": "draw_unit_t", "type": { @@ -192028,7 +218835,7 @@ "location": { "column": 38, "file": "", - "line": 332 + "line": 329 }, "name": "draw_vector_dsc_t", "type": { @@ -192053,7 +218860,7 @@ "location": { "column": 36, "file": "", - "line": 282 + "line": 279 }, "name": "dropdown_list_t", "type": { @@ -192078,7 +218885,7 @@ "location": { "column": 31, "file": "", - "line": 281 + "line": 278 }, "name": "dropdown_t", "type": { @@ -192103,7 +218910,7 @@ "location": { "column": 15, "file": "", - "line": 1851 + "line": 568 }, "name": "event_cb_t", "type": { @@ -192115,7 +218922,7 @@ "location": { "column": 42, "file": "", - "line": 1851 + "line": 568 }, "name": "e", "type": { @@ -192151,7 +218958,7 @@ "location": { "column": 3, "file": "", - "line": 1925 + "line": 653 }, "name": "event_code_t", "type": { @@ -192198,13 +219005,14 @@ "c_name": "lv_event_list_t", "callback": false, "location": { - "column": 3, + "column": 33, "file": "", - "line": 1930 + "line": 232 }, "name": "event_list_t", "type": { - "kind": "struct" + "kind": "struct", + "name": "_lv_event_list_t" }, "view": { "category": "struct", @@ -192224,7 +219032,7 @@ "location": { "column": 28, "file": "", - "line": 230 + "line": 231 }, "name": "event_t", "type": { @@ -192275,7 +219083,7 @@ "location": { "column": 36, "file": "", - "line": 348 + "line": 345 }, "name": "ffmpeg_player_t", "type": { @@ -192300,7 +219108,7 @@ "location": { "column": 36, "file": "", - "line": 320 + "line": 317 }, "name": "file_explorer_t", "type": { @@ -192325,7 +219133,7 @@ "location": { "column": 3, "file": "", - "line": 1394 + "line": 1333 }, "name": "flex_align_t", "type": { @@ -192349,7 +219157,7 @@ "location": { "column": 3, "file": "", - "line": 1404 + "line": 1343 }, "name": "flex_flow_t", "type": { @@ -192373,7 +219181,7 @@ "location": { "column": 33, "file": "", - "line": 236 + "line": 238 }, "name": "font_class_t", "type": { @@ -192398,7 +219206,7 @@ "location": { "column": 3, "file": "", - "line": 4065 + "line": 3383 }, "name": "font_fmt_txt_bitmap_format_t", "type": { @@ -192422,7 +219230,7 @@ "location": { "column": 3, "file": "", - "line": 4047 + "line": 3365 }, "name": "font_fmt_txt_cmap_t", "type": { @@ -192446,7 +219254,7 @@ "location": { "column": 3, "file": "", - "line": 4038 + "line": 3356 }, "name": "font_fmt_txt_cmap_type_t", "type": { @@ -192470,7 +219278,7 @@ "location": { "column": 3, "file": "", - "line": 4077 + "line": 3396 }, "name": "font_fmt_txt_dsc_t", "type": { @@ -192494,7 +219302,7 @@ "location": { "column": 3, "file": "", - "line": 4032 + "line": 3350 }, "name": "font_fmt_txt_glyph_dsc_t", "type": { @@ -192507,6 +219315,31 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_font_fmt_txt_glyph_loader_t", + "callback": false, + "location": { + "column": 48, + "file": "", + "line": 3342 + }, + "name": "font_fmt_txt_glyph_loader_t", + "type": { + "kind": "struct", + "name": "_lv_font_fmt_txt_glyph_loader_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "Any" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -192518,7 +219351,7 @@ "location": { "column": 3, "file": "", - "line": 4060 + "line": 3378 }, "name": "font_fmt_txt_kern_classes_t", "type": { @@ -192542,7 +219375,7 @@ "location": { "column": 3, "file": "", - "line": 4053 + "line": 3371 }, "name": "font_fmt_txt_kern_pair_t", "type": { @@ -192566,7 +219399,7 @@ "location": { "column": 3, "file": "", - "line": 1235 + "line": 1163 }, "name": "font_glyph_dsc_t", "type": { @@ -192590,7 +219423,7 @@ "location": { "column": 3, "file": "", - "line": 1216 + "line": 1145 }, "name": "font_glyph_format_t", "type": { @@ -192614,7 +219447,7 @@ "location": { "column": 32, "file": "", - "line": 237 + "line": 239 }, "name": "font_info_t", "type": { @@ -192639,7 +219472,7 @@ "location": { "column": 3, "file": "", - "line": 1245 + "line": 1173 }, "name": "font_kerning_t", "type": { @@ -192663,7 +219496,7 @@ "location": { "column": 35, "file": "", - "line": 238 + "line": 240 }, "name": "font_manager_t", "type": { @@ -192688,7 +219521,7 @@ "location": { "column": 3, "file": "", - "line": 1241 + "line": 1169 }, "name": "font_subpx_t", "type": { @@ -192712,7 +219545,7 @@ "location": { "column": 27, "file": "", - "line": 235 + "line": 237 }, "name": "font_t", "type": { @@ -192737,7 +219570,7 @@ "location": { "column": 29, "file": "", - "line": 325 + "line": 322 }, "name": "fpoint_t", "type": { @@ -192788,7 +219621,7 @@ "location": { "column": 37, "file": "", - "line": 243 + "line": 245 }, "name": "fragment_class_t", "type": { @@ -192813,7 +219646,7 @@ "location": { "column": 46, "file": "", - "line": 244 + "line": 246 }, "name": "fragment_managed_states_t", "type": { @@ -192838,7 +219671,7 @@ "location": { "column": 31, "file": "", - "line": 242 + "line": 244 }, "name": "fragment_t", "type": { @@ -192863,7 +219696,7 @@ "location": { "column": 51, "file": "", - "line": 324 + "line": 321 }, "name": "freetype_outline_event_param_t", "type": { @@ -192888,7 +219721,7 @@ "location": { "column": 46, "file": "", - "line": 323 + "line": 320 }, "name": "freetype_outline_vector_t", "type": { @@ -192913,7 +219746,7 @@ "location": { "column": 3, "file": "", - "line": 3240 + "line": 2636 }, "name": "fs_dir_t", "type": { @@ -192937,7 +219770,7 @@ "location": { "column": 29, "file": "", - "line": 3215 + "line": 2611 }, "name": "fs_drv_t", "type": { @@ -192962,7 +219795,7 @@ "location": { "column": 36, "file": "", - "line": 252 + "line": 250 }, "name": "fs_file_cache_t", "type": { @@ -192987,7 +219820,7 @@ "location": { "column": 3, "file": "", - "line": 3236 + "line": 2632 }, "name": "fs_file_t", "type": { @@ -193011,7 +219844,7 @@ "location": { "column": 3, "file": "", - "line": 3208 + "line": 2604 }, "name": "fs_mode_t", "type": { @@ -193035,7 +219868,7 @@ "location": { "column": 3, "file": "", - "line": 3243 + "line": 2639 }, "name": "fs_path_ex_t", "type": { @@ -193059,7 +219892,7 @@ "location": { "column": 3, "file": "", - "line": 3204 + "line": 2600 }, "name": "fs_res_t", "type": { @@ -193083,7 +219916,7 @@ "location": { "column": 3, "file": "", - "line": 3213 + "line": 2609 }, "name": "fs_whence_t", "type": { @@ -193133,7 +219966,7 @@ "location": { "column": 3, "file": "", - "line": 5511 + "line": 4904 }, "name": "global_t", "type": { @@ -193158,7 +219991,7 @@ "location": { "column": 37, "file": "", - "line": 313 + "line": 310 }, "name": "gltf_environment_t", "type": { @@ -193183,7 +220016,7 @@ "location": { "column": 37, "file": "", - "line": 314 + "line": 311 }, "name": "gltf_ibl_sampler_t", "type": { @@ -193208,7 +220041,7 @@ "location": { "column": 38, "file": "", - "line": 312 + "line": 309 }, "name": "gltf_model_node_t", "type": { @@ -193233,7 +220066,7 @@ "location": { "column": 33, "file": "", - "line": 311 + "line": 308 }, "name": "gltf_model_t", "type": { @@ -193258,7 +220091,7 @@ "location": { "column": 27, "file": "", - "line": 310 + "line": 307 }, "name": "gltf_t", "type": { @@ -193283,7 +220116,7 @@ "location": { "column": 3, "file": "", - "line": 1327 + "line": 1265 }, "name": "grad_dir_t", "type": { @@ -193307,7 +220140,7 @@ "location": { "column": 3, "file": "", - "line": 1361 + "line": 1299 }, "name": "grad_dsc_t", "type": { @@ -193331,7 +220164,7 @@ "location": { "column": 3, "file": "", - "line": 1332 + "line": 1270 }, "name": "grad_extend_t", "type": { @@ -193355,7 +220188,7 @@ "location": { "column": 3, "file": "", - "line": 1337 + "line": 1275 }, "name": "grad_stop_t", "type": { @@ -193379,7 +220212,7 @@ "location": { "column": 3, "file": "", - "line": 1420 + "line": 1359 }, "name": "grid_align_t", "type": { @@ -193403,7 +220236,7 @@ "location": { "column": 15, "file": "", - "line": 3646 + "line": 689 }, "name": "group_edge_cb_t", "type": { @@ -193415,7 +220248,7 @@ "location": { "column": 36, "file": "", - "line": 3646 + "line": 689 }, "name": null, "type": { @@ -193430,7 +220263,7 @@ "location": { "column": 50, "file": "", - "line": 3646 + "line": 689 }, "name": null, "type": { @@ -193463,7 +220296,7 @@ "location": { "column": 15, "file": "", - "line": 3645 + "line": 688 }, "name": "group_focus_cb_t", "type": { @@ -193475,7 +220308,7 @@ "location": { "column": 37, "file": "", - "line": 3645 + "line": 688 }, "name": null, "type": { @@ -193511,7 +220344,7 @@ "location": { "column": 3, "file": "", - "line": 3650 + "line": 693 }, "name": "group_refocus_policy_t", "type": { @@ -193535,7 +220368,7 @@ "location": { "column": 28, "file": "", - "line": 224 + "line": 225 }, "name": "group_t", "type": { @@ -193560,7 +220393,7 @@ "location": { "column": 36, "file": "", - "line": 263 + "line": 261 }, "name": "hit_test_info_t", "type": { @@ -193585,7 +220418,7 @@ "location": { "column": 3, "file": "", - "line": 4108 + "line": 3476 }, "name": "image_align_t", "type": { @@ -193609,7 +220442,7 @@ "location": { "column": 39, "file": "", - "line": 254 + "line": 252 }, "name": "image_cache_data_t", "type": { @@ -193634,7 +220467,7 @@ "location": { "column": 3, "file": "", - "line": 1457 + "line": 1396 }, "name": "image_colorkey_t", "type": { @@ -193658,7 +220491,7 @@ "location": { "column": 3, "file": "", - "line": 957 + "line": 1039 }, "name": "image_compress_t", "type": { @@ -193682,7 +220515,7 @@ "location": { "column": 41, "file": "", - "line": 253 + "line": 251 }, "name": "image_decoder_args_t", "type": { @@ -193707,7 +220540,7 @@ "location": { "column": 15, "file": "", - "line": 3282 + "line": 2678 }, "name": "image_decoder_close_f_t", "type": { @@ -193719,7 +220552,7 @@ "location": { "column": 63, "file": "", - "line": 3282 + "line": 2678 }, "name": "decoder", "type": { @@ -193734,7 +220567,7 @@ "location": { "column": 97, "file": "", - "line": 3282 + "line": 2678 }, "name": "dsc", "type": { @@ -193770,7 +220603,7 @@ "location": { "column": 15, "file": "", - "line": 3283 + "line": 2679 }, "name": "image_decoder_custom_draw_t", "type": { @@ -193782,7 +220615,7 @@ "location": { "column": 59, "file": "", - "line": 3283 + "line": 2679 }, "name": "layer", "type": { @@ -193797,7 +220630,7 @@ "location": { "column": 97, "file": "", - "line": 3283 + "line": 2679 }, "name": "dsc", "type": { @@ -193815,7 +220648,7 @@ "location": { "column": 64, "file": "", - "line": 3284 + "line": 2680 }, "name": "coords", "type": { @@ -193833,7 +220666,7 @@ "location": { "column": 100, "file": "", - "line": 3284 + "line": 2680 }, "name": "draw_dsc", "type": { @@ -193851,7 +220684,7 @@ "location": { "column": 128, "file": "", - "line": 3284 + "line": 2680 }, "name": "clip_area", "type": { @@ -193890,7 +220723,7 @@ "location": { "column": 40, "file": "", - "line": 240 + "line": 242 }, "name": "image_decoder_dsc_t", "type": { @@ -193915,7 +220748,7 @@ "location": { "column": 22, "file": "", - "line": 3279 + "line": 2675 }, "name": "image_decoder_get_area_cb_t", "type": { @@ -193927,7 +220760,7 @@ "location": { "column": 74, "file": "", - "line": 3279 + "line": 2675 }, "name": "decoder", "type": { @@ -193942,7 +220775,7 @@ "location": { "column": 78, "file": "", - "line": 3280 + "line": 2676 }, "name": "dsc", "type": { @@ -193957,7 +220790,7 @@ "location": { "column": 71, "file": "", - "line": 3281 + "line": 2677 }, "name": "full_area", "type": { @@ -193975,7 +220808,7 @@ "location": { "column": 94, "file": "", - "line": 3281 + "line": 2677 }, "name": "decoded_area", "type": { @@ -194011,7 +220844,7 @@ "location": { "column": 22, "file": "", - "line": 3276 + "line": 2672 }, "name": "image_decoder_info_f_t", "type": { @@ -194023,7 +220856,7 @@ "location": { "column": 69, "file": "", - "line": 3276 + "line": 2672 }, "name": "decoder", "type": { @@ -194038,7 +220871,7 @@ "location": { "column": 103, "file": "", - "line": 3276 + "line": 2672 }, "name": "dsc", "type": { @@ -194053,7 +220886,7 @@ "location": { "column": 68, "file": "", - "line": 3277 + "line": 2673 }, "name": "header", "type": { @@ -194089,7 +220922,7 @@ "location": { "column": 22, "file": "", - "line": 3278 + "line": 2674 }, "name": "image_decoder_open_f_t", "type": { @@ -194101,7 +220934,7 @@ "location": { "column": 69, "file": "", - "line": 3278 + "line": 2674 }, "name": "decoder", "type": { @@ -194116,7 +220949,7 @@ "location": { "column": 103, "file": "", - "line": 3278 + "line": 2674 }, "name": "dsc", "type": { @@ -194152,7 +220985,7 @@ "location": { "column": 36, "file": "", - "line": 239 + "line": 241 }, "name": "image_decoder_t", "type": { @@ -194177,7 +221010,7 @@ "location": { "column": 3, "file": "", - "line": 989 + "line": 1071 }, "name": "image_dsc_t", "type": { @@ -194201,7 +221034,7 @@ "location": { "column": 3, "file": "", - "line": 952 + "line": 1034 }, "name": "image_flags_t", "type": { @@ -194226,7 +221059,7 @@ "location": { "column": 46, "file": "", - "line": 255 + "line": 253 }, "name": "image_header_cache_data_t", "type": { @@ -194251,7 +221084,7 @@ "location": { "column": 3, "file": "", - "line": 966 + "line": 1048 }, "name": "image_header_t", "type": { @@ -194275,7 +221108,7 @@ "location": { "column": 3, "file": "", - "line": 3275 + "line": 2671 }, "name": "image_src_t", "type": { @@ -194299,7 +221132,7 @@ "location": { "column": 28, "file": "", - "line": 266 + "line": 263 }, "name": "image_t", "type": { @@ -194324,7 +221157,7 @@ "location": { "column": 43, "file": "", - "line": 283 + "line": 280 }, "name": "imagebutton_src_info_t", "type": { @@ -194349,7 +221182,7 @@ "location": { "column": 3, "file": "", - "line": 4516 + "line": 3911 }, "name": "imagebutton_state_t", "type": { @@ -194373,7 +221206,7 @@ "location": { "column": 34, "file": "", - "line": 284 + "line": 281 }, "name": "imagebutton_t", "type": { @@ -194398,7 +221231,7 @@ "location": { "column": 33, "file": "", - "line": 319 + "line": 316 }, "name": "ime_pinyin_t", "type": { @@ -194423,7 +221256,7 @@ "location": { "column": 24, "file": "", - "line": 4997 + "line": 4375 }, "name": "img_dsc_t", "type": { @@ -194448,7 +221281,7 @@ "location": { "column": 23, "file": "", - "line": 4086 + "line": 3405 }, "name": "imgfont_get_path_cb_t", "type": { @@ -194460,7 +221293,7 @@ "location": { "column": 66, "file": "", - "line": 4086 + "line": 3405 }, "name": "font", "type": { @@ -194478,7 +221311,7 @@ "location": { "column": 59, "file": "", - "line": 4087 + "line": 3406 }, "name": "unicode", "type": { @@ -194490,7 +221323,7 @@ "location": { "column": 77, "file": "", - "line": 4087 + "line": 3406 }, "name": "unicode_next", "type": { @@ -194502,7 +221335,7 @@ "location": { "column": 58, "file": "", - "line": 4088 + "line": 3407 }, "name": "offset_y", "type": { @@ -194517,7 +221350,7 @@ "location": { "column": 75, "file": "", - "line": 4088 + "line": 3407 }, "name": "user_data", "type": { @@ -194559,7 +221392,7 @@ "location": { "column": 3, "file": "", - "line": 3715 + "line": 2850 }, "name": "indev_data_t", "type": { @@ -194583,7 +221416,7 @@ "location": { "column": 47, "file": "", - "line": 3964 + "line": 3273 }, "name": "indev_gesture_configuration_t", "type": { @@ -194597,6 +221430,31 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_indev_gesture_motion_t", + "callback": false, + "location": { + "column": 40, + "file": "", + "line": 6373 + }, + "name": "indev_gesture_motion_t", + "type": { + "kind": "struct", + "name": "lv_indev_gesture_motion" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "indev_gesture_motion_t" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -194608,7 +221466,7 @@ "location": { "column": 44, "file": "", - "line": 3961 + "line": 3270 }, "name": "indev_gesture_recognizer_t", "type": { @@ -194633,7 +221491,7 @@ "location": { "column": 3, "file": "", - "line": 3972 + "line": 3281 }, "name": "indev_gesture_state_t", "type": { @@ -194657,7 +221515,7 @@ "location": { "column": 33, "file": "", - "line": 3963 + "line": 3272 }, "name": "indev_gesture_t", "type": { @@ -194682,7 +221540,7 @@ "location": { "column": 3, "file": "", - "line": 3704 + "line": 2839 }, "name": "indev_gesture_type_t", "type": { @@ -194706,7 +221564,7 @@ "location": { "column": 19, "file": "", - "line": 3717 + "line": 2852 }, "name": "indev_key_remap_cb_t", "type": { @@ -194718,7 +221576,7 @@ "location": { "column": 56, "file": "", - "line": 3717 + "line": 2852 }, "name": "indev", "type": { @@ -194733,7 +221591,7 @@ "location": { "column": 74, "file": "", - "line": 3717 + "line": 2852 }, "name": "key", "type": { @@ -194766,7 +221624,7 @@ "location": { "column": 3, "file": "", - "line": 3695 + "line": 2830 }, "name": "indev_mode_t", "type": { @@ -194790,7 +221648,7 @@ "location": { "column": 15, "file": "", - "line": 3716 + "line": 2851 }, "name": "indev_read_cb_t", "type": { @@ -194802,7 +221660,7 @@ "location": { "column": 47, "file": "", - "line": 3716 + "line": 2851 }, "name": "indev", "type": { @@ -194817,7 +221675,7 @@ "location": { "column": 72, "file": "", - "line": 3716 + "line": 2851 }, "name": "data", "type": { @@ -194853,7 +221711,7 @@ "location": { "column": 3, "file": "", - "line": 3690 + "line": 2825 }, "name": "indev_state_t", "type": { @@ -194877,7 +221735,7 @@ "location": { "column": 28, "file": "", - "line": 229 + "line": 230 }, "name": "indev_t", "type": { @@ -194902,7 +221760,7 @@ "location": { "column": 36, "file": "", - "line": 3962 + "line": 3271 }, "name": "indev_touch_data_t", "type": { @@ -194927,7 +221785,7 @@ "location": { "column": 3, "file": "", - "line": 3686 + "line": 2821 }, "name": "indev_type_t", "type": { @@ -195366,7 +222224,7 @@ "location": { "column": 15, "file": "", - "line": 1072 + "line": 4503 }, "name": "iter_inspect_cb", "type": { @@ -195378,7 +222236,7 @@ "location": { "column": 41, "file": "", - "line": 1072 + "line": 4503 }, "name": "elem", "type": { @@ -195414,7 +222272,7 @@ "location": { "column": 22, "file": "", - "line": 1071 + "line": 4502 }, "name": "iter_next_cb", "type": { @@ -195426,7 +222284,7 @@ "location": { "column": 45, "file": "", - "line": 1071 + "line": 4502 }, "name": "instance", "type": { @@ -195441,7 +222299,7 @@ "location": { "column": 62, "file": "", - "line": 1071 + "line": 4502 }, "name": "context", "type": { @@ -195456,7 +222314,7 @@ "location": { "column": 78, "file": "", - "line": 1071 + "line": 4502 }, "name": "elem", "type": { @@ -195492,7 +222350,7 @@ "location": { "column": 27, "file": "", - "line": 353 + "line": 4501 }, "name": "iter_t", "type": { @@ -195569,7 +222427,7 @@ "location": { "column": 3, "file": "", - "line": 3644 + "line": 687 }, "name": "key_t", "type": { @@ -195593,7 +222451,7 @@ "location": { "column": 3, "file": "", - "line": 4538 + "line": 3933 }, "name": "keyboard_mode_t", "type": { @@ -195617,7 +222475,7 @@ "location": { "column": 31, "file": "", - "line": 285 + "line": 282 }, "name": "keyboard_t", "type": { @@ -195642,7 +222500,7 @@ "location": { "column": 3, "file": "", - "line": 4249 + "line": 3617 }, "name": "label_long_mode_t", "type": { @@ -195666,7 +222524,7 @@ "location": { "column": 28, "file": "", - "line": 270 + "line": 267 }, "name": "label_t", "type": { @@ -195691,7 +222549,7 @@ "location": { "column": 28, "file": "", - "line": 226 + "line": 227 }, "name": "layer_t", "type": { @@ -195716,7 +222574,7 @@ "location": { "column": 3, "file": "", - "line": 3603 + "line": 2786 }, "name": "layer_type_t", "type": { @@ -195740,7 +222598,7 @@ "location": { "column": 3, "file": "", - "line": 1378 + "line": 1316 }, "name": "layout_callbacks_t", "type": { @@ -195764,7 +222622,7 @@ "location": { "column": 3, "file": "", - "line": 5465 + "line": 4856 }, "name": "layout_dsc_t", "type": { @@ -195788,7 +222646,7 @@ "location": { "column": 15, "file": "", - "line": 1374 + "line": 1312 }, "name": "layout_get_min_size_cb_t", "type": { @@ -195800,7 +222658,7 @@ "location": { "column": 45, "file": "", - "line": 1374 + "line": 1312 }, "name": null, "type": { @@ -195815,7 +222673,7 @@ "location": { "column": 65, "file": "", - "line": 1374 + "line": 1312 }, "name": "req_size", "type": { @@ -195830,7 +222688,7 @@ "location": { "column": 82, "file": "", - "line": 1374 + "line": 1312 }, "name": "width", "type": { @@ -195842,7 +222700,7 @@ "location": { "column": 94, "file": "", - "line": 1374 + "line": 1312 }, "name": "user_data", "type": { @@ -195878,7 +222736,7 @@ "location": { "column": 3, "file": "", - "line": 1384 + "line": 1322 }, "name": "layout_t", "type": { @@ -195902,7 +222760,7 @@ "location": { "column": 15, "file": "", - "line": 1373 + "line": 1311 }, "name": "layout_update_cb_t", "type": { @@ -195914,7 +222772,7 @@ "location": { "column": 39, "file": "", - "line": 1373 + "line": 1311 }, "name": null, "type": { @@ -195929,7 +222787,7 @@ "location": { "column": 56, "file": "", - "line": 1373 + "line": 1311 }, "name": "user_data", "type": { @@ -195991,7 +222849,7 @@ "location": { "column": 26, "file": "", - "line": 286 + "line": 283 }, "name": "led_t", "type": { @@ -196016,7 +222874,7 @@ "location": { "column": 37, "file": "", - "line": 334 + "line": 331 }, "name": "libinput_event_t", "type": { @@ -196041,7 +222899,7 @@ "location": { "column": 31, "file": "", - "line": 335 + "line": 332 }, "name": "libinput_t", "type": { @@ -196066,7 +222924,7 @@ "location": { "column": 27, "file": "", - "line": 287 + "line": 284 }, "name": "line_t", "type": { @@ -196091,7 +222949,7 @@ "location": { "column": 3, "file": "", - "line": 5105 + "line": 4422 }, "name": "linux_proc_stat_t", "type": { @@ -196115,7 +222973,7 @@ "location": { "column": 17, "file": "", - "line": 431 + "line": 3088 }, "name": "ll_node_t", "type": { @@ -196140,7 +222998,7 @@ "location": { "column": 3, "file": "", - "line": 436 + "line": 3093 }, "name": "ll_t", "type": { @@ -196190,7 +223048,7 @@ "location": { "column": 16, "file": "", - "line": 420 + "line": 796 }, "name": "log_level_t", "type": { @@ -196204,6 +223062,128 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_lru_free_cb_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 6572 + }, + "name": "lru_free_cb_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 39, + "file": "", + "line": 6572 + }, + "name": "v", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_lru_item_t", + "callback": false, + "location": { + "column": 31, + "file": "", + "line": 6573 + }, + "name": "lru_item_t", + "type": { + "kind": "struct", + "name": "_lv_lru_item_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "lru_item_t" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_lru_res_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 6571 + }, + "name": "lru_res_t", + "type": { + "kind": "enum" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "LRU | int" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_lru_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 6585 + }, + "name": "lru_t", + "type": { + "kind": "struct", + "name": "_lv_lru_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "lru_t" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -196215,7 +223195,7 @@ "location": { "column": 29, "file": "", - "line": 326 + "line": 323 }, "name": "matrix_t", "type": { @@ -196266,7 +223246,7 @@ "location": { "column": 3, "file": "", - "line": 393 + "line": 807 }, "name": "mem_monitor_t", "type": { @@ -196290,7 +223270,7 @@ "location": { "column": 14, "file": "", - "line": 383 + "line": 797 }, "name": "mem_pool_t", "type": { @@ -196344,7 +223324,7 @@ "location": { "column": 35, "file": "", - "line": 289 + "line": 286 }, "name": "menu_history_t", "type": { @@ -196369,7 +223349,7 @@ "location": { "column": 48, "file": "", - "line": 288 + "line": 285 }, "name": "menu_load_page_event_data_t", "type": { @@ -196394,7 +223374,7 @@ "location": { "column": 3, "file": "", - "line": 4584 + "line": 3984 }, "name": "menu_mode_header_t", "type": { @@ -196418,7 +223398,7 @@ "location": { "column": 3, "file": "", - "line": 4588 + "line": 3988 }, "name": "menu_mode_root_back_button_t", "type": { @@ -196442,7 +223422,7 @@ "location": { "column": 32, "file": "", - "line": 291 + "line": 288 }, "name": "menu_page_t", "type": { @@ -196467,7 +223447,7 @@ "location": { "column": 27, "file": "", - "line": 290 + "line": 287 }, "name": "menu_t", "type": { @@ -196518,7 +223498,7 @@ "location": { "column": 36, "file": "", - "line": 318 + "line": 315 }, "name": "monkey_config_t", "type": { @@ -196543,7 +223523,7 @@ "location": { "column": 29, "file": "", - "line": 292 + "line": 289 }, "name": "msgbox_t", "type": { @@ -196568,7 +223548,7 @@ "location": { "column": 13, "file": "", - "line": 5106 + "line": 4423 }, "name": "mutex_t", "type": { @@ -196619,7 +223599,7 @@ "location": { "column": 3, "file": "", - "line": 3616 + "line": 2800 }, "name": "obj_class_editable_t", "type": { @@ -196643,7 +223623,7 @@ "location": { "column": 15, "file": "", - "line": 3626 + "line": 2810 }, "name": "obj_class_event_cb_t", "type": { @@ -196655,7 +223635,7 @@ "location": { "column": 56, "file": "", - "line": 3626 + "line": 2810 }, "name": "class_p", "type": { @@ -196670,7 +223650,7 @@ "location": { "column": 78, "file": "", - "line": 3626 + "line": 2810 }, "name": "e", "type": { @@ -196706,7 +223686,7 @@ "location": { "column": 3, "file": "", - "line": 3621 + "line": 2805 }, "name": "obj_class_group_def_t", "type": { @@ -196755,7 +223735,7 @@ "location": { "column": 3, "file": "", - "line": 3625 + "line": 2809 }, "name": "obj_class_theme_inheritable_t", "type": { @@ -196779,7 +223759,7 @@ "location": { "column": 3, "file": "", - "line": 3834 + "line": 2975 }, "name": "obj_flag_t", "type": { @@ -196803,7 +223783,7 @@ "location": { "column": 3, "file": "", - "line": 2099 + "line": 1904 }, "name": "obj_point_transform_flag_t", "type": { @@ -196816,6 +223796,378 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_bool_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 3137 + }, + "name": "obj_set_bool_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 44, + "file": "", + "line": 3137 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + } + }, + { + "location": { + "column": 56, + "file": "", + "line": 3137 + }, + "name": "value", + "type": { + "kind": "primitive", + "name": "bool" + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, int], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_color_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 3141 + }, + "name": "obj_set_color_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 45, + "file": "", + "line": 3141 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + } + }, + { + "location": { + "column": 63, + "file": "", + "line": 3141 + }, + "name": "value", + "type": { + "kind": "identifier", + "name": "lv_color_t" + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, color_t], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_float_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 3139 + }, + "name": "obj_set_float_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 45, + "file": "", + "line": 3139 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + } + }, + { + "location": { + "column": 58, + "file": "", + "line": 3139 + }, + "name": "value", + "type": { + "kind": "primitive", + "name": "float" + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, float], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_int_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 3138 + }, + "name": "obj_set_int_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 3138 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + } + }, + { + "location": { + "column": 58, + "file": "", + "line": 3138 + }, + "name": "value", + "type": { + "kind": "identifier", + "name": "int32_t" + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, int], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_pointer_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 3142 + }, + "name": "obj_set_pointer_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 47, + "file": "", + "line": 3142 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + } + }, + { + "location": { + "column": 65, + "file": "", + "line": 3142 + }, + "name": "value", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void", + "qualifiers": [ + "const" + ] + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, Any], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_obj_set_string_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 3140 + }, + "name": "obj_set_string_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 46, + "file": "", + "line": 3140 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "identifier", + "name": "lv_obj_t" + } + } + }, + { + "location": { + "column": 64, + "file": "", + "line": 3140 + }, + "name": "value", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "char", + "qualifiers": [ + "const" + ] + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[obj, str], None]" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -196825,9 +224177,9 @@ "c_name": "lv_obj_spec_attr_t", "callback": false, "location": { - "column": 36, + "column": 3, "file": "", - "line": 265 + "line": 5034 }, "name": "obj_spec_attr_t", "type": { @@ -196852,7 +224204,7 @@ "location": { "column": 32, "file": "", - "line": 261 + "line": 259 }, "name": "obj_style_t", "type": { @@ -196877,7 +224229,7 @@ "location": { "column": 47, "file": "", - "line": 262 + "line": 260 }, "name": "obj_style_transition_dsc_t", "type": { @@ -196927,7 +224279,7 @@ "location": { "column": 33, "file": "", - "line": 2070 + "line": 1875 }, "name": "obj_tree_walk_cb_t", "type": { @@ -196939,7 +224291,7 @@ "location": { "column": 57, "file": "", - "line": 2070 + "line": 1875 }, "name": null, "type": { @@ -196954,7 +224306,7 @@ "location": { "column": 69, "file": "", - "line": 2070 + "line": 1875 }, "name": null, "type": { @@ -196990,7 +224342,7 @@ "location": { "column": 3, "file": "", - "line": 2069 + "line": 1874 }, "name": "obj_tree_walk_res_t", "type": { @@ -197014,7 +224366,7 @@ "location": { "column": 15, "file": "", - "line": 3894 + "line": 3136 }, "name": "observer_cb_t", "type": { @@ -197026,7 +224378,7 @@ "location": { "column": 48, "file": "", - "line": 3894 + "line": 3136 }, "name": "observer", "type": { @@ -197041,7 +224393,7 @@ "location": { "column": 73, "file": "", - "line": 3894 + "line": 3136 }, "name": "subject", "type": { @@ -197077,7 +224429,7 @@ "location": { "column": 31, "file": "", - "line": 316 + "line": 313 }, "name": "observer_t", "type": { @@ -197153,7 +224505,7 @@ "location": { "column": 38, "file": "", - "line": 349 + "line": 346 }, "name": "opengles_window_t", "type": { @@ -197178,7 +224530,7 @@ "location": { "column": 46, "file": "", - "line": 350 + "line": 347 }, "name": "opengles_window_texture_t", "type": { @@ -197203,7 +224555,7 @@ "location": { "column": 3, "file": "", - "line": 920 + "line": 978 }, "name": "palette_t", "type": { @@ -197227,7 +224579,7 @@ "location": { "column": 3, "file": "", - "line": 2227 + "line": 2034 }, "name": "part_t", "type": { @@ -197240,6 +224592,94 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pending_free_cb_t", + "callback": true, + "location": { + "column": 15, + "file": "", + "line": 6594 + }, + "name": "pending_free_cb_t", + "type": { + "kind": "pointer", + "target": { + "kind": "function", + "parameters": [ + { + "location": { + "column": 43, + "file": "", + "line": 6594 + }, + "name": "obj", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + } + }, + { + "location": { + "column": 55, + "file": "", + "line": 6594 + }, + "name": "user_data", + "type": { + "kind": "pointer", + "target": { + "kind": "primitive", + "name": "void" + } + } + } + ], + "return_type": { + "kind": "primitive", + "name": "void" + } + } + }, + "view": { + "category": "callback", + "conversion": "callback", + "python_type": "Callable[[Any, Any], None]" + }, + "visibility": "public" + }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_pending_t", + "callback": false, + "location": { + "column": 30, + "file": "", + "line": 6593 + }, + "name": "pending_t", + "type": { + "kind": "struct", + "name": "_lv_pending_t" + }, + "view": { + "category": "struct", + "conversion": "struct_value", + "python_type": "pending_t" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -197277,7 +224717,7 @@ "location": { "column": 3, "file": "", - "line": 693 + "line": 501 }, "name": "point_precise_t", "type": { @@ -197301,7 +224741,7 @@ "location": { "column": 3, "file": "", - "line": 689 + "line": 497 }, "name": "point_t", "type": { @@ -197325,7 +224765,7 @@ "location": { "column": 46, "file": "", - "line": 245 + "line": 247 }, "name": "profiler_builtin_config_t", "type": { @@ -197350,7 +224790,7 @@ "location": { "column": 18, "file": "", - "line": 351 + "line": 350 }, "name": "prop_id_t", "type": { @@ -197739,7 +225179,7 @@ "location": { "column": 29, "file": "", - "line": 322 + "line": 319 }, "name": "qrcode_t", "type": { @@ -197753,6 +225193,30 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_qrcode_update_mode_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 4065 + }, + "name": "qrcode_update_mode_t", + "type": { + "kind": "enum" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "qrcode.UPDATE_MODE | int" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -197764,7 +225228,7 @@ "location": { "column": 3, "file": "", - "line": 671 + "line": 6607 }, "name": "rb_color_t", "type": { @@ -197788,7 +225252,7 @@ "location": { "column": 17, "file": "", - "line": 672 + "line": 6602 }, "name": "rb_compare_res_t", "type": { @@ -197813,7 +225277,7 @@ "location": { "column": 30, "file": "", - "line": 673 + "line": 6603 }, "name": "rb_compare_t", "type": { @@ -197825,7 +225289,7 @@ "location": { "column": 59, "file": "", - "line": 673 + "line": 6603 }, "name": "a", "type": { @@ -197843,7 +225307,7 @@ "location": { "column": 75, "file": "", - "line": 673 + "line": 6603 }, "name": "b", "type": { @@ -197880,9 +225344,9 @@ "c_name": "lv_rb_node_t", "callback": false, "location": { - "column": 30, + "column": 3, "file": "", - "line": 246 + "line": 6614 }, "name": "rb_node_t", "type": { @@ -197905,9 +225369,9 @@ "c_name": "lv_rb_t", "callback": false, "location": { - "column": 25, + "column": 3, "file": "", - "line": 247 + "line": 6619 }, "name": "rb_t", "type": { @@ -197932,7 +225396,7 @@ "location": { "column": 15, "file": "", - "line": 3965 + "line": 3274 }, "name": "recognizer_func_t", "type": { @@ -197944,7 +225408,7 @@ "location": { "column": 38, "file": "", - "line": 3965 + "line": 3274 }, "name": null, "type": { @@ -197959,7 +225423,7 @@ "location": { "column": 71, "file": "", - "line": 3965 + "line": 3274 }, "name": null, "type": { @@ -197974,7 +225438,7 @@ "location": { "column": 96, "file": "", - "line": 3965 + "line": 3274 }, "name": null, "type": { @@ -198007,7 +225471,7 @@ "location": { "column": 21, "file": "", - "line": 4996 + "line": 4374 }, "name": "res_t", "type": { @@ -198082,7 +225546,7 @@ "location": { "column": 30, "file": "", - "line": 347 + "line": 344 }, "name": "rlottie_t", "type": { @@ -198107,7 +225571,7 @@ "location": { "column": 3, "file": "", - "line": 4643 + "line": 4081 }, "name": "roller_mode_t", "type": { @@ -198131,7 +225595,7 @@ "location": { "column": 29, "file": "", - "line": 293 + "line": 290 }, "name": "roller_t", "type": { @@ -198182,7 +225646,7 @@ "location": { "column": 3, "file": "", - "line": 4667 + "line": 4105 }, "name": "scale_mode_t", "type": { @@ -198206,7 +225670,7 @@ "location": { "column": 3, "file": "", - "line": 6358 + "line": 7128 }, "name": "scale_needle_t", "type": { @@ -198230,7 +225694,7 @@ "location": { "column": 36, "file": "", - "line": 294 + "line": 291 }, "name": "scale_section_t", "type": { @@ -198255,7 +225719,7 @@ "location": { "column": 28, "file": "", - "line": 295 + "line": 292 }, "name": "scale_t", "type": { @@ -198280,7 +225744,7 @@ "location": { "column": 31, "file": "", - "line": 5002 + "line": 4380 }, "name": "scr_load_anim_t", "type": { @@ -198339,7 +225803,7 @@ "location": { "column": 3, "file": "", - "line": 1979 + "line": 1775 }, "name": "screen_load_anim_t", "type": { @@ -198363,7 +225827,7 @@ "location": { "column": 3, "file": "", - "line": 2171 + "line": 1978 }, "name": "scroll_snap_t", "type": { @@ -198387,7 +225851,7 @@ "location": { "column": 3, "file": "", - "line": 2165 + "line": 1972 }, "name": "scrollbar_mode_t", "type": { @@ -198567,7 +226031,7 @@ "location": { "column": 3, "file": "", - "line": 4711 + "line": 4153 }, "name": "slider_mode_t", "type": { @@ -198591,7 +226055,7 @@ "location": { "column": 3, "file": "", - "line": 4716 + "line": 4158 }, "name": "slider_orientation_t", "type": { @@ -198615,7 +226079,7 @@ "location": { "column": 29, "file": "", - "line": 296 + "line": 293 }, "name": "slider_t", "type": { @@ -198666,7 +226130,7 @@ "location": { "column": 3, "file": "", - "line": 4750 + "line": 4192 }, "name": "span_coords_t", "type": { @@ -198691,7 +226155,7 @@ "location": { "column": 3, "file": "", - "line": 4745 + "line": 4187 }, "name": "span_mode_t", "type": { @@ -198715,7 +226179,7 @@ "location": { "column": 3, "file": "", - "line": 4739 + "line": 4181 }, "name": "span_overflow_t", "type": { @@ -198739,7 +226203,7 @@ "location": { "column": 27, "file": "", - "line": 297 + "line": 294 }, "name": "span_t", "type": { @@ -198764,7 +226228,7 @@ "location": { "column": 32, "file": "", - "line": 298 + "line": 295 }, "name": "spangroup_t", "type": { @@ -198789,7 +226253,7 @@ "location": { "column": 30, "file": "", - "line": 300 + "line": 297 }, "name": "spinbox_t", "type": { @@ -198814,7 +226278,7 @@ "location": { "column": 30, "file": "", - "line": 308 + "line": 305 }, "name": "spinner_t", "type": { @@ -198839,7 +226303,7 @@ "location": { "column": 3, "file": "", - "line": 479 + "line": 355 }, "name": "sqrt_res_t", "type": { @@ -198915,7 +226379,7 @@ "location": { "column": 3, "file": "", - "line": 2216 + "line": 2023 }, "name": "state_t", "type": { @@ -198939,7 +226403,7 @@ "location": { "column": 3, "file": "", - "line": 1612 + "line": 1552 }, "name": "style_const_prop_t", "type": { @@ -198988,7 +226452,7 @@ "location": { "column": 3, "file": "", - "line": 1601 + "line": 1541 }, "name": "style_res_t", "type": { @@ -199012,7 +226476,7 @@ "location": { "column": 18, "file": "", - "line": 2234 + "line": 2041 }, "name": "style_selector_t", "type": { @@ -199037,7 +226501,7 @@ "location": { "column": 3, "file": "", - "line": 2233 + "line": 2040 }, "name": "style_state_cmp_t", "type": { @@ -199061,7 +226525,7 @@ "location": { "column": 3, "file": "", - "line": 1617 + "line": 1557 }, "name": "style_t", "type": { @@ -199085,7 +226549,7 @@ "location": { "column": 3, "file": "", - "line": 1608 + "line": 1548 }, "name": "style_transition_dsc_t", "type": { @@ -199109,7 +226573,7 @@ "location": { "column": 3, "file": "", - "line": 1462 + "line": 1401 }, "name": "style_value_t", "type": { @@ -199133,7 +226597,7 @@ "location": { "column": 44, "file": "", - "line": 317 + "line": 314 }, "name": "subject_increment_dsc_t", "type": { @@ -199158,7 +226622,7 @@ "location": { "column": 30, "file": "", - "line": 315 + "line": 312 }, "name": "subject_t", "type": { @@ -199183,7 +226647,7 @@ "location": { "column": 3, "file": "", - "line": 3876 + "line": 3118 }, "name": "subject_type_t", "type": { @@ -199207,7 +226671,7 @@ "location": { "column": 3, "file": "", - "line": 3882 + "line": 3124 }, "name": "subject_value_t", "type": { @@ -199257,7 +226721,7 @@ "location": { "column": 3, "file": "", - "line": 4865 + "line": 4309 }, "name": "switch_orientation_t", "type": { @@ -199281,7 +226745,7 @@ "location": { "column": 29, "file": "", - "line": 301 + "line": 298 }, "name": "switch_t", "type": { @@ -199306,7 +226770,7 @@ "location": { "column": 3, "file": "", - "line": 4878 + "line": 4322 }, "name": "table_cell_ctrl_t", "type": { @@ -199330,7 +226794,7 @@ "location": { "column": 33, "file": "", - "line": 302 + "line": 299 }, "name": "table_cell_t", "type": { @@ -199355,7 +226819,7 @@ "location": { "column": 28, "file": "", - "line": 303 + "line": 300 }, "name": "table_t", "type": { @@ -199380,7 +226844,7 @@ "location": { "column": 30, "file": "", - "line": 304 + "line": 301 }, "name": "tabview_t", "type": { @@ -199405,7 +226869,7 @@ "location": { "column": 3, "file": "", - "line": 1304 + "line": 1238 }, "name": "text_align_t", "type": { @@ -199429,7 +226893,7 @@ "location": { "column": 3, "file": "", - "line": 5650 + "line": 6642 }, "name": "text_attributes_t", "type": { @@ -199453,7 +226917,7 @@ "location": { "column": 3, "file": "", - "line": 5644 + "line": 6636 }, "name": "text_cmd_state_t", "type": { @@ -199477,7 +226941,7 @@ "location": { "column": 3, "file": "", - "line": 1439 + "line": 1378 }, "name": "text_decor_t", "type": { @@ -199501,7 +226965,7 @@ "location": { "column": 3, "file": "", - "line": 1298 + "line": 1232 }, "name": "text_flag_t", "type": { @@ -199514,6 +226978,30 @@ }, "visibility": "public" }, + { + "available_on": [ + "micropython", + "circuitpython", + "cpython" + ], + "c_name": "lv_text_leading_trim_t", + "callback": false, + "location": { + "column": 3, + "file": "", + "line": 1245 + }, + "name": "text_leading_trim_t", + "type": { + "kind": "enum" + }, + "view": { + "category": "enum", + "conversion": "enum_int", + "python_type": "TEXT_LEADING_TRIM | int" + }, + "visibility": "public" + }, { "available_on": [ "micropython", @@ -199525,7 +227013,7 @@ "location": { "column": 31, "file": "", - "line": 299 + "line": 296 }, "name": "textarea_t", "type": { @@ -199550,7 +227038,7 @@ "location": { "column": 15, "file": "", - "line": 4977 + "line": 3428 }, "name": "theme_apply_cb_t", "type": { @@ -199562,7 +227050,7 @@ "location": { "column": 37, "file": "", - "line": 4977 + "line": 3428 }, "name": null, "type": { @@ -199577,7 +227065,7 @@ "location": { "column": 51, "file": "", - "line": 4977 + "line": 3428 }, "name": null, "type": { @@ -199613,7 +227101,7 @@ "location": { "column": 28, "file": "", - "line": 232 + "line": 234 }, "name": "theme_t", "type": { @@ -199638,7 +227126,7 @@ "location": { "column": 3, "file": "", - "line": 5115 + "line": 4432 }, "name": "thread_prio_t", "type": { @@ -199662,7 +227150,7 @@ "location": { "column": 13, "file": "", - "line": 5108 + "line": 4425 }, "name": "thread_sync_t", "type": { @@ -199687,7 +227175,7 @@ "location": { "column": 13, "file": "", - "line": 5107 + "line": 4424 }, "name": "thread_t", "type": { @@ -199712,7 +227200,7 @@ "location": { "column": 19, "file": "", - "line": 421 + "line": 3448 }, "name": "tick_get_cb_t", "type": { @@ -199743,7 +227231,7 @@ "location": { "column": 3, "file": "", - "line": 5225 + "line": 4718 }, "name": "tick_state_t", "type": { @@ -199767,7 +227255,7 @@ "location": { "column": 31, "file": "", - "line": 305 + "line": 302 }, "name": "tileview_t", "type": { @@ -199792,7 +227280,7 @@ "location": { "column": 36, "file": "", - "line": 306 + "line": 303 }, "name": "tileview_tile_t", "type": { @@ -199843,7 +227331,7 @@ "location": { "column": 15, "file": "", - "line": 452 + "line": 1722 }, "name": "timer_cb_t", "type": { @@ -199855,7 +227343,7 @@ "location": { "column": 31, "file": "", - "line": 452 + "line": 1722 }, "name": null, "type": { @@ -199891,7 +227379,7 @@ "location": { "column": 15, "file": "", - "line": 453 + "line": 1723 }, "name": "timer_handler_resume_cb_t", "type": { @@ -199903,7 +227391,7 @@ "location": { "column": 51, "file": "", - "line": 453 + "line": 1723 }, "name": "data", "type": { @@ -199939,7 +227427,7 @@ "location": { "column": 3, "file": "", - "line": 5207 + "line": 4700 }, "name": "timer_state_t", "type": { @@ -199989,7 +227477,7 @@ "location": { "column": 28, "file": "", - "line": 231 + "line": 233 }, "name": "timer_t", "type": { @@ -200014,7 +227502,7 @@ "location": { "column": 15, "file": "", - "line": 1127 + "line": 6777 }, "name": "tree_after_cb_t", "type": { @@ -200026,7 +227514,7 @@ "location": { "column": 57, "file": "", - "line": 1127 + "line": 6777 }, "name": "node", "type": { @@ -200044,7 +227532,7 @@ "location": { "column": 70, "file": "", - "line": 1127 + "line": 6777 }, "name": "user_data", "type": { @@ -200080,7 +227568,7 @@ "location": { "column": 15, "file": "", - "line": 1126 + "line": 6776 }, "name": "tree_before_cb_t", "type": { @@ -200092,7 +227580,7 @@ "location": { "column": 58, "file": "", - "line": 1126 + "line": 6776 }, "name": "node", "type": { @@ -200110,7 +227598,7 @@ "location": { "column": 71, "file": "", - "line": 1126 + "line": 6776 }, "name": "user_data", "type": { @@ -200146,7 +227634,7 @@ "location": { "column": 33, "file": "", - "line": 1103 + "line": 348 }, "name": "tree_class_t", "type": { @@ -200171,7 +227659,7 @@ "location": { "column": 15, "file": "", - "line": 1105 + "line": 6755 }, "name": "tree_constructor_cb_t", "type": { @@ -200183,7 +227671,7 @@ "location": { "column": 64, "file": "", - "line": 1105 + "line": 6755 }, "name": "class_p", "type": { @@ -200201,7 +227689,7 @@ "location": { "column": 90, "file": "", - "line": 1105 + "line": 6755 }, "name": "node", "type": { @@ -200237,7 +227725,7 @@ "location": { "column": 15, "file": "", - "line": 1106 + "line": 6756 }, "name": "tree_destructor_cb_t", "type": { @@ -200249,7 +227737,7 @@ "location": { "column": 63, "file": "", - "line": 1106 + "line": 6756 }, "name": "class_p", "type": { @@ -200267,7 +227755,7 @@ "location": { "column": 89, "file": "", - "line": 1106 + "line": 6756 }, "name": "node", "type": { @@ -200303,7 +227791,7 @@ "location": { "column": 32, "file": "", - "line": 1104 + "line": 349 }, "name": "tree_node_t", "type": { @@ -200328,7 +227816,7 @@ "location": { "column": 15, "file": "", - "line": 1125 + "line": 6775 }, "name": "tree_traverse_cb_t", "type": { @@ -200340,7 +227828,7 @@ "location": { "column": 60, "file": "", - "line": 1125 + "line": 6775 }, "name": "node", "type": { @@ -200358,7 +227846,7 @@ "location": { "column": 73, "file": "", - "line": 1125 + "line": 6775 }, "name": "user_data", "type": { @@ -200394,7 +227882,7 @@ "location": { "column": 17, "file": "", - "line": 1124 + "line": 6774 }, "name": "tree_walk_mode_t", "type": { @@ -201067,7 +228555,7 @@ "location": { "column": 38, "file": "", - "line": 329 + "line": 326 }, "name": "vector_fill_dsc_t", "type": { @@ -201092,7 +228580,7 @@ "location": { "column": 38, "file": "", - "line": 328 + "line": 325 }, "name": "vector_gradient_t", "type": { @@ -201117,7 +228605,7 @@ "location": { "column": 38, "file": "", - "line": 331 + "line": 328 }, "name": "vector_path_ctx_t", "type": { @@ -201142,7 +228630,7 @@ "location": { "column": 34, "file": "", - "line": 327 + "line": 324 }, "name": "vector_path_t", "type": { @@ -201167,7 +228655,7 @@ "location": { "column": 40, "file": "", - "line": 330 + "line": 327 }, "name": "vector_stroke_dsc_t", "type": { @@ -201218,7 +228706,7 @@ "location": { "column": 26, "file": "", - "line": 307 + "line": 304 }, "name": "win_t", "type": { @@ -201347,7 +228835,7 @@ "location": { "column": 26, "file": "", - "line": 333 + "line": 330 }, "name": "xkb_t", "type": { @@ -201372,7 +228860,7 @@ "location": { "column": 3, "file": "", - "line": 982 + "line": 1064 }, "name": "yuv_buf_t", "type": { @@ -201396,7 +228884,7 @@ "location": { "column": 3, "file": "", - "line": 970 + "line": 1052 }, "name": "yuv_plane_t", "type": { @@ -201470,7 +228958,7 @@ "location": { "column": 30, "file": "", - "line": 4141 + "line": 3509 }, "python_name": "animimg_class", "storage": [ @@ -201500,7 +228988,7 @@ "location": { "column": 30, "file": "", - "line": 4166 + "line": 3534 }, "python_name": "arc_class", "storage": [ @@ -201530,7 +229018,7 @@ "location": { "column": 30, "file": "", - "line": 4211 + "line": 3579 }, "python_name": "arclabel_class", "storage": [ @@ -201560,7 +229048,7 @@ "location": { "column": 30, "file": "", - "line": 4281 + "line": 3651 }, "python_name": "bar_class", "storage": [ @@ -201590,7 +229078,7 @@ "location": { "column": 30, "file": "", - "line": 4928 + "line": 3692 }, "python_name": "barcode_class", "storage": [ @@ -201620,7 +229108,7 @@ "location": { "column": 31, "file": "", - "line": 4021 + "line": 3337 }, "python_name": "binfont_font_class", "storage": [ @@ -201650,7 +229138,7 @@ "location": { "column": 31, "file": "", - "line": 4082 + "line": 3401 }, "python_name": "builtin_font_class", "storage": [ @@ -201680,7 +229168,7 @@ "location": { "column": 30, "file": "", - "line": 4298 + "line": 3709 }, "python_name": "button_class", "storage": [ @@ -201710,7 +229198,7 @@ "location": { "column": 30, "file": "", - "line": 4333 + "line": 3744 }, "python_name": "buttonmatrix_class", "storage": [ @@ -201740,7 +229228,7 @@ "location": { "column": 32, "file": "", - "line": 5308 + "line": 4600 }, "python_name": "cache_class_lru_ll_count", "storage": [ @@ -201770,7 +229258,7 @@ "location": { "column": 32, "file": "", - "line": 5309 + "line": 4601 }, "python_name": "cache_class_lru_ll_size", "storage": [ @@ -201800,7 +229288,7 @@ "location": { "column": 32, "file": "", - "line": 5306 + "line": 4598 }, "python_name": "cache_class_lru_rb_count", "storage": [ @@ -201830,7 +229318,7 @@ "location": { "column": 32, "file": "", - "line": 5307 + "line": 4599 }, "python_name": "cache_class_lru_rb_size", "storage": [ @@ -201860,7 +229348,7 @@ "location": { "column": 32, "file": "", - "line": 5310 + "line": 4602 }, "python_name": "cache_class_sc_da", "storage": [ @@ -201890,7 +229378,7 @@ "location": { "column": 30, "file": "", - "line": 4354 + "line": 3765 }, "python_name": "calendar_class", "storage": [ @@ -201920,7 +229408,7 @@ "location": { "column": 30, "file": "", - "line": 4371 + "line": 3782 }, "python_name": "calendar_header_arrow_class", "storage": [ @@ -201950,7 +229438,7 @@ "location": { "column": 30, "file": "", - "line": 4373 + "line": 3784 }, "python_name": "calendar_header_dropdown_class", "storage": [ @@ -201980,7 +229468,7 @@ "location": { "column": 30, "file": "", - "line": 4376 + "line": 3668 }, "python_name": "canvas_class", "storage": [ @@ -202010,7 +229498,7 @@ "location": { "column": 30, "file": "", - "line": 4412 + "line": 3807 }, "python_name": "chart_class", "storage": [ @@ -202040,7 +229528,7 @@ "location": { "column": 30, "file": "", - "line": 4461 + "line": 3856 }, "python_name": "checkbox_class", "storage": [ @@ -202070,7 +229558,7 @@ "location": { "column": 37, "file": "", - "line": 936 + "line": 994 }, "python_name": "color_filter_shade", "storage": [ @@ -202100,7 +229588,7 @@ "location": { "column": 30, "file": "", - "line": 4467 + "line": 3862 }, "python_name": "dropdown_class", "storage": [ @@ -202130,7 +229618,7 @@ "location": { "column": 30, "file": "", - "line": 4468 + "line": 3863 }, "python_name": "dropdownlist_class", "storage": [ @@ -202160,7 +229648,7 @@ "location": { "column": 25, "file": "", - "line": 1286 + "line": 1218 }, "python_name": "font_montserrat_14", "storage": [ @@ -202190,7 +229678,7 @@ "location": { "column": 25, "file": "", - "line": 1287 + "line": 1219 }, "python_name": "font_montserrat_16", "storage": [ @@ -202220,7 +229708,7 @@ "location": { "column": 25, "file": "", - "line": 1288 + "line": 1220 }, "python_name": "font_montserrat_24", "storage": [ @@ -202250,7 +229738,7 @@ "location": { "column": 25, "file": "", - "line": 1289 + "line": 1221 }, "python_name": "font_montserrat_32", "storage": [ @@ -202280,7 +229768,7 @@ "location": { "column": 25, "file": "", - "line": 1290 + "line": 1222 }, "python_name": "font_montserrat_40", "storage": [ @@ -202310,7 +229798,7 @@ "location": { "column": 30, "file": "", - "line": 4494 + "line": 3889 }, "python_name": "gif_class", "storage": [ @@ -202340,7 +229828,7 @@ "location": { "column": 30, "file": "", - "line": 4091 + "line": 3458 }, "python_name": "image_class", "storage": [ @@ -202370,7 +229858,7 @@ "location": { "column": 30, "file": "", - "line": 4517 + "line": 3912 }, "python_name": "imagebutton_class", "storage": [ @@ -202400,7 +229888,7 @@ "location": { "column": 30, "file": "", - "line": 4539 + "line": 3934 }, "python_name": "keyboard_class", "storage": [ @@ -202430,7 +229918,7 @@ "location": { "column": 30, "file": "", - "line": 4250 + "line": 3618 }, "python_name": "label_class", "storage": [ @@ -202460,7 +229948,7 @@ "location": { "column": 30, "file": "", - "line": 4553 + "line": 3948 }, "python_name": "led_class", "storage": [ @@ -202490,7 +229978,7 @@ "location": { "column": 30, "file": "", - "line": 4562 + "line": 3957 }, "python_name": "line_class", "storage": [ @@ -202520,7 +230008,7 @@ "location": { "column": 30, "file": "", - "line": 4574 + "line": 3969 }, "python_name": "list_button_class", "storage": [ @@ -202550,7 +230038,7 @@ "location": { "column": 30, "file": "", - "line": 4572 + "line": 3967 }, "python_name": "list_class", "storage": [ @@ -202580,7 +230068,7 @@ "location": { "column": 30, "file": "", - "line": 4573 + "line": 3968 }, "python_name": "list_text_class", "storage": [ @@ -202610,7 +230098,7 @@ "location": { "column": 30, "file": "", - "line": 4589 + "line": 3989 }, "python_name": "menu_class", "storage": [ @@ -202640,7 +230128,7 @@ "location": { "column": 30, "file": "", - "line": 4591 + "line": 3991 }, "python_name": "menu_cont_class", "storage": [ @@ -202670,7 +230158,7 @@ "location": { "column": 30, "file": "", - "line": 4595 + "line": 3995 }, "python_name": "menu_main_cont_class", "storage": [ @@ -202700,7 +230188,7 @@ "location": { "column": 30, "file": "", - "line": 4597 + "line": 3997 }, "python_name": "menu_main_header_cont_class", "storage": [ @@ -202730,7 +230218,7 @@ "location": { "column": 30, "file": "", - "line": 4590 + "line": 3990 }, "python_name": "menu_page_class", "storage": [ @@ -202760,7 +230248,7 @@ "location": { "column": 30, "file": "", - "line": 4592 + "line": 3992 }, "python_name": "menu_section_class", "storage": [ @@ -202790,7 +230278,7 @@ "location": { "column": 30, "file": "", - "line": 4593 + "line": 3993 }, "python_name": "menu_separator_class", "storage": [ @@ -202820,7 +230308,7 @@ "location": { "column": 30, "file": "", - "line": 4594 + "line": 3994 }, "python_name": "menu_sidebar_cont_class", "storage": [ @@ -202850,7 +230338,7 @@ "location": { "column": 30, "file": "", - "line": 4596 + "line": 3996 }, "python_name": "menu_sidebar_header_cont_class", "storage": [ @@ -202880,7 +230368,7 @@ "location": { "column": 30, "file": "", - "line": 4626 + "line": 4048 }, "python_name": "msgbox_backdrop_class", "storage": [ @@ -202910,7 +230398,7 @@ "location": { "column": 30, "file": "", - "line": 4620 + "line": 4042 }, "python_name": "msgbox_class", "storage": [ @@ -202940,7 +230428,7 @@ "location": { "column": 30, "file": "", - "line": 4622 + "line": 4044 }, "python_name": "msgbox_content_class", "storage": [ @@ -202970,7 +230458,7 @@ "location": { "column": 30, "file": "", - "line": 4625 + "line": 4047 }, "python_name": "msgbox_footer_button_class", "storage": [ @@ -203000,7 +230488,7 @@ "location": { "column": 30, "file": "", - "line": 4623 + "line": 4045 }, "python_name": "msgbox_footer_class", "storage": [ @@ -203030,7 +230518,7 @@ "location": { "column": 30, "file": "", - "line": 4624 + "line": 4046 }, "python_name": "msgbox_header_button_class", "storage": [ @@ -203060,7 +230548,7 @@ "location": { "column": 30, "file": "", - "line": 4621 + "line": 4043 }, "python_name": "msgbox_header_class", "storage": [ @@ -203090,7 +230578,7 @@ "location": { "column": 30, "file": "", - "line": 3835 + "line": 2976 }, "python_name": "obj_class", "storage": [ @@ -203120,7 +230608,7 @@ "location": { "column": 30, "file": "", - "line": 4950 + "line": 4066 }, "python_name": "qrcode_class", "storage": [ @@ -203150,7 +230638,7 @@ "location": { "column": 30, "file": "", - "line": 4644 + "line": 4082 }, "python_name": "roller_class", "storage": [ @@ -203180,7 +230668,7 @@ "location": { "column": 30, "file": "", - "line": 4671 + "line": 4109 }, "python_name": "scale_class", "storage": [ @@ -203210,7 +230698,7 @@ "location": { "column": 30, "file": "", - "line": 4717 + "line": 4159 }, "python_name": "slider_class", "storage": [ @@ -203240,7 +230728,7 @@ "location": { "column": 30, "file": "", - "line": 4751 + "line": 4193 }, "python_name": "spangroup_class", "storage": [ @@ -203270,7 +230758,7 @@ "location": { "column": 30, "file": "", - "line": 4827 + "line": 4271 }, "python_name": "spinbox_class", "storage": [ @@ -203300,7 +230788,7 @@ "location": { "column": 30, "file": "", - "line": 4853 + "line": 4297 }, "python_name": "spinner_class", "storage": [ @@ -203330,7 +230818,7 @@ "location": { "column": 31, "file": "", - "line": 1850 + "line": 1721 }, "python_name": "style_const_prop_id_inv", "storage": [ @@ -203360,7 +230848,7 @@ "location": { "column": 30, "file": "", - "line": 4860 + "line": 4304 }, "python_name": "switch_class", "storage": [ @@ -203390,7 +230878,7 @@ "location": { "column": 30, "file": "", - "line": 4879 + "line": 4323 }, "python_name": "table_class", "storage": [ @@ -203420,7 +230908,7 @@ "location": { "column": 30, "file": "", - "line": 4898 + "line": 4342 }, "python_name": "tabview_class", "storage": [ @@ -203450,7 +230938,7 @@ "location": { "column": 18, "file": "", - "line": 5720 + "line": 6749 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_encoded_conv_wc", @@ -203469,7 +230957,7 @@ "location": { "column": 59, "file": "", - "line": 5720 + "line": 6749 }, "name": "c", "type": { @@ -203501,7 +230989,7 @@ "location": { "column": 18, "file": "", - "line": 5723 + "line": 6752 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_encoded_get_byte_id", @@ -203520,7 +231008,7 @@ "location": { "column": 65, "file": "", - "line": 5723 + "line": 6752 }, "name": "txt", "type": { @@ -203538,7 +231026,7 @@ "location": { "column": 81, "file": "", - "line": 5723 + "line": 6752 }, "name": "utf8_id", "type": { @@ -203570,7 +231058,7 @@ "location": { "column": 18, "file": "", - "line": 5724 + "line": 6753 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_encoded_get_char_id", @@ -203589,7 +231077,7 @@ "location": { "column": 65, "file": "", - "line": 5724 + "line": 6753 }, "name": "txt", "type": { @@ -203607,7 +231095,7 @@ "location": { "column": 81, "file": "", - "line": 5724 + "line": 6753 }, "name": "byte_id", "type": { @@ -203639,7 +231127,7 @@ "location": { "column": 18, "file": "", - "line": 5721 + "line": 6750 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_encoded_next", @@ -203658,7 +231146,7 @@ "location": { "column": 58, "file": "", - "line": 5721 + "line": 6750 }, "name": "txt", "type": { @@ -203676,7 +231164,7 @@ "location": { "column": 74, "file": "", - "line": 5721 + "line": 6750 }, "name": "i_start", "type": { @@ -203711,7 +231199,7 @@ "location": { "column": 18, "file": "", - "line": 5722 + "line": 6751 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_encoded_prev", @@ -203730,7 +231218,7 @@ "location": { "column": 58, "file": "", - "line": 5722 + "line": 6751 }, "name": "txt", "type": { @@ -203748,7 +231236,7 @@ "location": { "column": 74, "file": "", - "line": 5722 + "line": 6751 }, "name": "i_start", "type": { @@ -203783,7 +231271,7 @@ "location": { "column": 17, "file": "", - "line": 5718 + "line": 6747 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_encoded_size", @@ -203802,7 +231290,7 @@ "location": { "column": 57, "file": "", - "line": 5718 + "line": 6747 }, "name": "txt", "type": { @@ -203840,7 +231328,7 @@ "location": { "column": 18, "file": "", - "line": 5725 + "line": 6754 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_get_encoded_length", @@ -203859,7 +231347,7 @@ "location": { "column": 64, "file": "", - "line": 5725 + "line": 6754 }, "name": "txt", "type": { @@ -203897,7 +231385,7 @@ "location": { "column": 18, "file": "", - "line": 5719 + "line": 6748 }, "policy_reason": "Internal text codec callback hook; the binding does not export callback globals.", "python_name": "text_unicode_to_encoded", @@ -203916,7 +231404,7 @@ "location": { "column": 62, "file": "", - "line": 5719 + "line": 6748 }, "name": "letter_uni", "type": { @@ -203948,7 +231436,7 @@ "location": { "column": 30, "file": "", - "line": 4788 + "line": 4231 }, "python_name": "textarea_class", "storage": [ @@ -203978,7 +231466,7 @@ "location": { "column": 30, "file": "", - "line": 4911 + "line": 4355 }, "python_name": "tileview_class", "storage": [ @@ -204008,7 +231496,7 @@ "location": { "column": 30, "file": "", - "line": 4912 + "line": 4356 }, "python_name": "tileview_tile_class", "storage": [ @@ -204038,7 +231526,7 @@ "location": { "column": 30, "file": "", - "line": 1128 + "line": 6778 }, "python_name": "tree_node_class", "storage": [ @@ -204068,7 +231556,7 @@ "location": { "column": 30, "file": "", - "line": 4918 + "line": 4362 }, "python_name": "win_class", "storage": [ diff --git a/generated/lvgl.pp b/generated/lvgl.pp index 476dffa..1e5aa71 100644 --- a/generated/lvgl.pp +++ b/generated/lvgl.pp @@ -221,6 +221,7 @@ typedef uint8_t lv_opa_t; typedef uint8_t lv_style_prop_t; typedef struct _lv_obj_class_t lv_obj_class_t; +typedef struct _lv_delete_dsc_t lv_delete_dsc_t; typedef struct _lv_group_t lv_group_t; typedef struct _lv_display_t lv_display_t; typedef struct _lv_layer_t lv_layer_t; @@ -228,6 +229,7 @@ typedef struct _lv_draw_task_t lv_draw_task_t; typedef struct _lv_indev_t lv_indev_t; typedef struct _lv_event_t lv_event_t; +typedef struct _lv_event_list_t lv_event_list_t; typedef struct _lv_timer_t lv_timer_t; typedef struct _lv_theme_t lv_theme_t; typedef struct _lv_anim_t lv_anim_t; @@ -243,12 +245,8 @@ typedef struct _lv_fragment_class_t lv_fragment_class_t; typedef struct _lv_fragment_managed_states_t lv_fragment_managed_states_t; typedef struct _lv_profiler_builtin_config_t lv_profiler_builtin_config_t; -typedef struct _lv_rb_node_t lv_rb_node_t; -typedef struct _lv_rb_t lv_rb_t; typedef struct _lv_color_filter_dsc_t lv_color_filter_dsc_t; typedef struct _lv_event_dsc_t lv_event_dsc_t; -typedef struct _lv_cache_t lv_cache_t; -typedef struct _lv_cache_entry_t lv_cache_entry_t; typedef struct _lv_fs_file_cache_t lv_fs_file_cache_t; typedef struct _lv_image_decoder_args_t lv_image_decoder_args_t; typedef struct _lv_image_cache_data_t lv_image_cache_data_t; @@ -262,7 +260,6 @@ typedef struct _lv_obj_style_transition_dsc_t lv_obj_style_transition_dsc_t; typedef struct _lv_hit_test_info_t lv_hit_test_info_t; typedef struct _lv_cover_check_info_t lv_cover_check_info_t; -typedef struct _lv_obj_spec_attr_t lv_obj_spec_attr_t; typedef struct _lv_image_t lv_image_t; typedef struct _lv_animimg_t lv_animimg_t; typedef struct _lv_arc_t lv_arc_t; @@ -348,131 +345,10 @@ typedef struct _lv_ffmpeg_player_t lv_ffmpeg_player_t; typedef struct _lv_opengles_window_t lv_opengles_window_t; typedef struct _lv_opengles_window_texture_t lv_opengles_window_texture_t; +typedef struct _lv_tree_class_t lv_tree_class_t; +typedef struct _lv_tree_node_t lv_tree_node_t; typedef uint32_t lv_prop_id_t; -typedef struct _lv_array_t lv_array_t; -typedef struct _lv_iter_t lv_iter_t; -typedef struct _lv_circle_buf_t lv_circle_buf_t; typedef struct _lv_draw_buf_t lv_draw_buf_t; -void lv_init(void); -void lv_deinit(void); -bool lv_is_initialized(void); -void * lv_memcpy(void * dst, const void * src, size_t len); -void lv_memset(void * dst, uint8_t v, size_t len); -void * lv_memmove(void * dst, const void * src, size_t len); -int lv_memcmp(const void * p1, const void * p2, size_t len); -static inline void lv_memzero(void * dst, size_t len) -{ - lv_memset(dst, 0x00, len); -} -size_t lv_strlen(const char * str); -size_t lv_strnlen(const char * str, size_t max_len); -size_t lv_strlcpy(char * dst, const char * src, size_t dst_size); -char * lv_strncpy(char * dst, const char * src, size_t dest_size); -char * lv_strcpy(char * dst, const char * src); -int lv_strcmp(const char * s1, const char * s2); -int lv_strncmp(const char * s1, const char * s2, size_t len); -static inline bool lv_streq(const char * s1, const char * s2) -{ - return lv_strcmp(s1, s2) == 0; -} -char * lv_strdup(const char * src); -char * lv_strndup(const char * src, size_t max_len); -char * lv_strcat(char * dst, const char * src); -char * lv_strncat(char * dst, const char * src, size_t src_len); -char * lv_strchr(const char * str, int c); -typedef void * lv_mem_pool_t; -typedef struct { - size_t total_size; - size_t free_cnt; - size_t free_size; - size_t free_biggest_size; - size_t used_cnt; - size_t max_used; - uint8_t used_pct; - uint8_t frag_pct; -} lv_mem_monitor_t; -void lv_mem_init(void); -void lv_mem_deinit(void); -lv_mem_pool_t lv_mem_add_pool(void * mem, size_t bytes); -void lv_mem_remove_pool(lv_mem_pool_t pool); -void * lv_malloc(size_t size); -void * lv_calloc(size_t num, size_t size); -void * lv_zalloc(size_t size); -void * lv_malloc_zeroed(size_t size); -void lv_free(void * data); -void * lv_realloc(void * data_p, size_t new_size); -void * lv_reallocf(void * data_p, size_t new_size); -void * lv_malloc_core(size_t size); -void lv_free_core(void * p); -void * lv_realloc_core(void * p, size_t new_size); -void lv_mem_monitor_core(lv_mem_monitor_t * mon_p); -lv_result_t lv_mem_test_core(void); -lv_result_t lv_mem_test(void); -void lv_mem_monitor(lv_mem_monitor_t * mon_p); -int lv_snprintf(char * buffer, size_t count, const char * format, ...); -int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va); -enum {ENUM_LV_LOG_LEVEL_TRACE = 0}; -enum {ENUM_LV_LOG_LEVEL_INFO = 1}; -enum {ENUM_LV_LOG_LEVEL_WARN = 2}; -enum {ENUM_LV_LOG_LEVEL_ERROR = 3}; -enum {ENUM_LV_LOG_LEVEL_USER = 4}; -enum {ENUM_LV_LOG_LEVEL_NONE = 5}; -typedef int8_t lv_log_level_t; -typedef uint32_t (*lv_tick_get_cb_t)(void); -typedef void (*lv_delay_cb_t)(uint32_t ms); - void lv_tick_inc(uint32_t tick_period); -uint32_t lv_tick_get(void); -uint32_t lv_tick_elaps(uint32_t prev_tick); -uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick); -void lv_delay_ms(uint32_t ms); -void lv_delay_set_cb(lv_delay_cb_t cb); -void lv_tick_set_cb(lv_tick_get_cb_t cb); -lv_tick_get_cb_t lv_tick_get_cb(void); -typedef uint8_t lv_ll_node_t; -typedef struct { - uint32_t n_size; - lv_ll_node_t * head; - lv_ll_node_t * tail; -} lv_ll_t; -void lv_ll_init(lv_ll_t * ll_p, uint32_t node_size); -void * lv_ll_ins_head(lv_ll_t * ll_p); -void * lv_ll_ins_prev(lv_ll_t * ll_p, void * n_act); -void * lv_ll_ins_tail(lv_ll_t * ll_p); -void lv_ll_remove(lv_ll_t * ll_p, void * node_p); -void lv_ll_clear_custom(lv_ll_t * ll_p, void(*cleanup)(void *)); -void lv_ll_clear(lv_ll_t * ll_p); -void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node, bool head); -void * lv_ll_get_head(const lv_ll_t * ll_p); -void * lv_ll_get_tail(const lv_ll_t * ll_p); -void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act); -void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act); -uint32_t lv_ll_get_len(const lv_ll_t * ll_p); -void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after); -bool lv_ll_is_empty(lv_ll_t * ll_p); -typedef void (*lv_timer_cb_t)(lv_timer_t *); -typedef void (*lv_timer_handler_resume_cb_t)(void * data); - uint32_t lv_timer_handler(void); - uint32_t lv_timer_handler_run_in_period(uint32_t period); - void lv_timer_periodic_handler(void); -void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void * data); -lv_timer_t * lv_timer_create_basic(void); -lv_timer_t * lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void * user_data); -void lv_timer_delete(lv_timer_t * timer); -void lv_timer_pause(lv_timer_t * timer); -void lv_timer_resume(lv_timer_t * timer); -void lv_timer_set_cb(lv_timer_t * timer, lv_timer_cb_t timer_cb); -void lv_timer_set_period(lv_timer_t * timer, uint32_t period); -void lv_timer_ready(lv_timer_t * timer); -void lv_timer_set_repeat_count(lv_timer_t * timer, int32_t repeat_count); -void lv_timer_set_auto_delete(lv_timer_t * timer, bool auto_delete); -void lv_timer_set_user_data(lv_timer_t * timer, void * user_data); -void lv_timer_reset(lv_timer_t * timer); -void lv_timer_enable(bool en); -uint32_t lv_timer_get_idle(void); -uint32_t lv_timer_get_time_until_next(void); -lv_timer_t * lv_timer_get_next(lv_timer_t * timer); -void * lv_timer_get_user_data(lv_timer_t * timer); -bool lv_timer_get_paused(lv_timer_t * timer); typedef struct { uint16_t i; uint16_t f; @@ -492,57 +368,6 @@ int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out); void lv_rand_set_seed(uint32_t seed); uint32_t lv_rand(uint32_t min, uint32_t max); -struct _lv_array_t { - uint8_t * data; - uint32_t size; - uint32_t capacity; - uint32_t element_size; - bool inner_alloc; -}; -void lv_array_init(lv_array_t * array, uint32_t capacity, uint32_t element_size); -void lv_array_init_from_buf(lv_array_t * array, void * buf, uint32_t capacity, uint32_t element_size); -bool lv_array_resize(lv_array_t * array, uint32_t new_capacity); -void lv_array_deinit(lv_array_t * array); -static inline uint32_t lv_array_size(const lv_array_t * array) -{ - return array->size; -} -static inline uint32_t lv_array_capacity(const lv_array_t * array) -{ - return array->capacity; -} -static inline bool lv_array_is_empty(const lv_array_t * array) -{ - return array->size == 0; -} -static inline bool lv_array_is_full(const lv_array_t * array) -{ - return array->size == array->capacity; -} -void lv_array_copy(lv_array_t * target, const lv_array_t * source); -static inline void lv_array_clear(lv_array_t * array) -{ - array->size = 0; -} -void lv_array_shrink(lv_array_t * array); -lv_result_t lv_array_remove(lv_array_t * array, uint32_t index); -lv_result_t lv_array_remove_unordered(lv_array_t * array, uint32_t index); -lv_result_t lv_array_erase(lv_array_t * array, uint32_t start, uint32_t end); -lv_result_t lv_array_concat(lv_array_t * array, const lv_array_t * other); -lv_result_t lv_array_push_back(lv_array_t * array, const void * element); -lv_result_t lv_array_assign(lv_array_t * array, uint32_t index, const void * value); -void * lv_array_at(const lv_array_t * array, uint32_t index); -static inline void * lv_array_front(const lv_array_t * array) -{ - return lv_array_at(array, 0); -} -static inline void * lv_array_back(const lv_array_t * array) -{ - return lv_array_at(array, lv_array_size(array) - 1); -} -typedef void (*lv_async_cb_t)(void *); -lv_result_t lv_async_call(lv_async_cb_t async_xcb, void * user_data); -lv_result_t lv_async_call_cancel(lv_async_cb_t async_xcb, void * user_data); enum {ENUM_LV_ANIM_REPEAT_INFINITE = 0xFFFFFFFF}; enum {ENUM_LV_ANIM_PLAYTIME_INFINITE = 0xFFFFFFFF}; typedef bool lv_anim_enable_t; @@ -629,7 +454,7 @@ uint16_t lv_anim_count_running(void); uint32_t lv_anim_speed(uint32_t speed); uint32_t lv_anim_speed_clamped(uint32_t speed, uint32_t min_time, uint32_t max_time); -uint32_t lv_anim_resolve_speed(uint32_t speed, int32_t start, int32_t end); +uint32_t lv_anim_resolve_speed(uint32_t speed_or_time, int32_t start, int32_t end); uint32_t lv_anim_speed_to_time(uint32_t speed, int32_t start, int32_t end); void lv_anim_refr_now(void); int32_t lv_anim_path_linear(const lv_anim_t * a); @@ -650,6 +475,7 @@ void lv_anim_timeline_delete(lv_anim_timeline_t * at); void lv_anim_timeline_add(lv_anim_timeline_t * at, uint32_t start_time, const lv_anim_t * a); uint32_t lv_anim_timeline_start(lv_anim_timeline_t * at); +uint32_t lv_anim_timeline_restart(lv_anim_timeline_t * at); void lv_anim_timeline_pause(lv_anim_timeline_t * at); void lv_anim_timeline_set_reverse(lv_anim_timeline_t * at, bool reverse); void lv_anim_timeline_set_delay(lv_anim_timeline_t * at, uint32_t delay); @@ -665,24 +491,6 @@ uint32_t lv_anim_timeline_get_repeat_delay(lv_anim_timeline_t * at); void * lv_anim_timeline_get_user_data(lv_anim_timeline_t * at); void lv_anim_timeline_merge(lv_anim_timeline_t * dest, const lv_anim_timeline_t * src, int32_t delay); -typedef enum { - LV_RB_COLOR_RED, - LV_RB_COLOR_BLACK -} lv_rb_color_t; -typedef int32_t lv_rb_compare_res_t; -typedef lv_rb_compare_res_t (*lv_rb_compare_t)(const void * a, const void * b); -bool lv_rb_init(lv_rb_t * tree, lv_rb_compare_t compare, size_t node_size); -lv_rb_node_t * lv_rb_insert(lv_rb_t * tree, void * key); -lv_rb_node_t * lv_rb_find(lv_rb_t * tree, const void * key); -void * lv_rb_remove_node(lv_rb_t * tree, lv_rb_node_t * node); -void * lv_rb_remove(lv_rb_t * tree, const void * key); -bool lv_rb_drop_node(lv_rb_t * tree, lv_rb_node_t * node); -bool lv_rb_drop(lv_rb_t * tree, const void * key); -lv_rb_node_t * lv_rb_minimum(lv_rb_t * node); -lv_rb_node_t * lv_rb_maximum(lv_rb_t * node); -lv_rb_node_t * lv_rb_minimum_from(lv_rb_node_t * node); -lv_rb_node_t * lv_rb_maximum_from(lv_rb_node_t * node); -void lv_rb_destroy(lv_rb_t * tree); typedef struct { int32_t x; int32_t y; @@ -732,13 +540,7 @@ LV_DIR_ALL = LV_DIR_HOR | LV_DIR_VER, } lv_dir_t; void lv_area_set(lv_area_t * area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2); -inline static void lv_area_copy(lv_area_t * dest, const lv_area_t * src) -{ - dest->x1 = src->x1; - dest->y1 = src->y1; - dest->x2 = src->x2; - dest->y2 = src->y2; -} +void lv_area_copy(lv_area_t * dest, const lv_area_t * src); int32_t lv_area_get_width(const lv_area_t * area_p); int32_t lv_area_get_height(const lv_area_t * area_p); void lv_area_set_width(lv_area_t * area_p, int32_t w); @@ -763,381 +565,164 @@ enum {ENUM_LV_SIZE_CONTENT = ((((1 << (29U)) - 1)) | (1 << (29U)))}; int32_t lv_pct(int32_t x); int32_t lv_pct_to_px(int32_t v, int32_t base); -enum {ENUM_LV_COLOR_DEPTH = 16}; -enum _lv_opacity_level_t { - LV_OPA_TRANSP = 0, - LV_OPA_0 = 0, - LV_OPA_10 = 25, - LV_OPA_20 = 51, - LV_OPA_30 = 76, - LV_OPA_40 = 102, - LV_OPA_50 = 127, - LV_OPA_60 = 153, - LV_OPA_70 = 178, - LV_OPA_80 = 204, - LV_OPA_90 = 229, - LV_OPA_100 = 255, - LV_OPA_COVER = 255, -}; -typedef struct { - uint8_t blue; - uint8_t green; - uint8_t red; -} lv_color_t; -typedef struct { - uint16_t blue : 5; - uint16_t green : 6; - uint16_t red : 5; -} lv_color16_t; -typedef struct { - uint8_t blue; - uint8_t green; - uint8_t red; - uint8_t alpha; -} lv_color32_t; -typedef struct { - uint16_t h; - uint8_t s; - uint8_t v; -} lv_color_hsv_t; -typedef struct { - uint8_t lumi; - uint8_t alpha; -} lv_color16a_t; +typedef void (*lv_event_cb_t)(lv_event_t * e); typedef enum { - LV_COLOR_FORMAT_UNKNOWN = 0, - LV_COLOR_FORMAT_RAW = 0x01, - LV_COLOR_FORMAT_RAW_ALPHA = 0x02, - LV_COLOR_FORMAT_L8 = 0x06, - LV_COLOR_FORMAT_I1 = 0x07, - LV_COLOR_FORMAT_I2 = 0x08, - LV_COLOR_FORMAT_I4 = 0x09, - LV_COLOR_FORMAT_I8 = 0x0A, - LV_COLOR_FORMAT_A8 = 0x0E, - LV_COLOR_FORMAT_RGB565 = 0x12, - LV_COLOR_FORMAT_ARGB8565 = 0x13, - LV_COLOR_FORMAT_RGB565A8 = 0x14, - LV_COLOR_FORMAT_AL88 = 0x15, - LV_COLOR_FORMAT_RGB565_SWAPPED = 0x1B, - LV_COLOR_FORMAT_RGB888 = 0x0F, - LV_COLOR_FORMAT_ARGB8888 = 0x10, - LV_COLOR_FORMAT_XRGB8888 = 0x11, - LV_COLOR_FORMAT_ARGB8888_PREMULTIPLIED = 0x1A, - LV_COLOR_FORMAT_A1 = 0x0B, - LV_COLOR_FORMAT_A2 = 0x0C, - LV_COLOR_FORMAT_A4 = 0x0D, - LV_COLOR_FORMAT_ARGB1555 = 0x16, - LV_COLOR_FORMAT_ARGB4444 = 0x17, - LV_COLOR_FORMAT_ARGB2222 = 0X18, - LV_COLOR_FORMAT_YUV_START = 0x20, - LV_COLOR_FORMAT_I420 = LV_COLOR_FORMAT_YUV_START, - LV_COLOR_FORMAT_I422 = 0x21, - LV_COLOR_FORMAT_I444 = 0x22, - LV_COLOR_FORMAT_I400 = 0x23, - LV_COLOR_FORMAT_NV21 = 0x24, - LV_COLOR_FORMAT_NV12 = 0x25, - LV_COLOR_FORMAT_YUY2 = 0x26, - LV_COLOR_FORMAT_UYVY = 0x27, - LV_COLOR_FORMAT_YUV_END = LV_COLOR_FORMAT_UYVY, - LV_COLOR_FORMAT_PROPRIETARY_START = 0x30, - LV_COLOR_FORMAT_NEMA_TSC_START = LV_COLOR_FORMAT_PROPRIETARY_START, - LV_COLOR_FORMAT_NEMA_TSC4 = LV_COLOR_FORMAT_NEMA_TSC_START, - LV_COLOR_FORMAT_NEMA_TSC6 = 0x31, - LV_COLOR_FORMAT_NEMA_TSC6A = 0x32, - LV_COLOR_FORMAT_NEMA_TSC6AP = 0x33, - LV_COLOR_FORMAT_NEMA_TSC12 = 0x34, - LV_COLOR_FORMAT_NEMA_TSC12A = 0x35, - LV_COLOR_FORMAT_NEMA_TSC_END = LV_COLOR_FORMAT_NEMA_TSC12A, - LV_COLOR_FORMAT_NATIVE = LV_COLOR_FORMAT_RGB565, - LV_COLOR_FORMAT_NATIVE_WITH_ALPHA = LV_COLOR_FORMAT_RGB565A8, -} lv_color_format_t; -uint8_t lv_color_format_get_bpp(lv_color_format_t cf); -uint8_t lv_color_format_get_size(lv_color_format_t cf); -bool lv_color_format_has_alpha(lv_color_format_t src_cf); -lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa); -uint32_t lv_color_to_int(lv_color_t c); -bool lv_color_eq(lv_color_t c1, lv_color_t c2); -bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2); -lv_color_t lv_color_hex(uint32_t c); -lv_color_t lv_color_make(uint8_t r, uint8_t g, uint8_t b); -lv_color32_t lv_color32_make(uint8_t r, uint8_t g, uint8_t b, uint8_t a); -lv_color_t lv_color_hex3(uint32_t c); -static inline bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) -{ - return (color.red <= h_color.red && - color.green <= h_color.green && - color.blue <= h_color.blue && - color.red >= l_color.red && - color.green >= l_color.green && - color.blue >= l_color.blue); -} -static inline lv_color_t lv_color16_to_color(lv_color16_t c) -{ - return lv_color_make(c.red << 3, c.green << 2, c.blue << 3); -} -uint16_t lv_color_to_u16(lv_color_t color); -uint32_t lv_color_to_u32(lv_color_t color); -uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix); -lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl); -lv_color_t lv_color_darken(lv_color_t c, lv_opa_t lvl); -lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v); -lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8); -lv_color_hsv_t lv_color_to_hsv(lv_color_t color); -lv_color_t lv_color_white(void); -lv_color_t lv_color_black(void); -void lv_color_premultiply(lv_color32_t * c); -void lv_color16_premultiply(lv_color16_t * c, lv_opa_t a); -uint8_t lv_color_luminance(lv_color_t c); -uint8_t lv_color16_luminance(const lv_color16_t c); -uint8_t lv_color24_luminance(const uint8_t * c); -uint8_t lv_color32_luminance(lv_color32_t c); -static inline uint16_t lv_color_swap_16(uint16_t c) -{ - return (c >> 8) | (c << 8); -} + LV_EVENT_ALL = 0, + LV_EVENT_PRESSED, + LV_EVENT_PRESSING, + LV_EVENT_PRESS_LOST, + LV_EVENT_SHORT_CLICKED, + LV_EVENT_SINGLE_CLICKED, + LV_EVENT_DOUBLE_CLICKED, + LV_EVENT_TRIPLE_CLICKED, + LV_EVENT_LONG_PRESSED, + LV_EVENT_LONG_PRESSED_REPEAT, + LV_EVENT_CLICKED, + LV_EVENT_RELEASED, + LV_EVENT_SCROLL_BEGIN, + LV_EVENT_SCROLL_THROW_BEGIN, + LV_EVENT_SCROLL_END, + LV_EVENT_SCROLL, + LV_EVENT_GESTURE, + LV_EVENT_GESTURE_UP, + LV_EVENT_GESTURE_DOWN, + LV_EVENT_GESTURE_LEFT, + LV_EVENT_GESTURE_RIGHT, + LV_EVENT_KEY, + LV_EVENT_ROTARY, + LV_EVENT_FOCUSED, + LV_EVENT_DEFOCUSED, + LV_EVENT_LEAVE, + LV_EVENT_HIT_TEST, + LV_EVENT_INDEV_RESET, + LV_EVENT_HOVER_OVER, + LV_EVENT_HOVER_LEAVE, + LV_EVENT_COVER_CHECK, + LV_EVENT_REFR_EXT_DRAW_SIZE, + LV_EVENT_DRAW_MAIN_BEGIN, + LV_EVENT_DRAW_MAIN, + LV_EVENT_DRAW_MAIN_END, + LV_EVENT_DRAW_POST_BEGIN, + LV_EVENT_DRAW_POST, + LV_EVENT_DRAW_POST_END, + LV_EVENT_DRAW_TASK_ADDED, + LV_EVENT_VALUE_CHANGED, + LV_EVENT_INSERT, + LV_EVENT_REFRESH, + LV_EVENT_READY, + LV_EVENT_CANCEL, + LV_EVENT_STATE_CHANGED, + LV_EVENT_CHECKED, + LV_EVENT_UNCHECKED, + LV_EVENT_CREATE, + LV_EVENT_DELETE, + LV_EVENT_CHILD_CHANGED, + LV_EVENT_CHILD_CREATED, + LV_EVENT_CHILD_DELETED, + LV_EVENT_SCREEN_UNLOAD_START, + LV_EVENT_SCREEN_LOAD_START, + LV_EVENT_SCREEN_LOADED, + LV_EVENT_SCREEN_UNLOADED, + LV_EVENT_SIZE_CHANGED, + LV_EVENT_STYLE_CHANGED, + LV_EVENT_LAYOUT_CHANGED, + LV_EVENT_GET_SELF_SIZE, + LV_EVENT_INVALIDATE_AREA, + LV_EVENT_RESOLUTION_CHANGED, + LV_EVENT_COLOR_FORMAT_CHANGED, + LV_EVENT_REFR_REQUEST, + LV_EVENT_REFR_START, + LV_EVENT_REFR_READY, + LV_EVENT_RENDER_START, + LV_EVENT_RENDER_READY, + LV_EVENT_FLUSH_START, + LV_EVENT_FLUSH_FINISH, + LV_EVENT_FLUSH_WAIT_START, + LV_EVENT_FLUSH_WAIT_FINISH, + LV_EVENT_SYNC_START, + LV_EVENT_SYNC_FINISH, + LV_EVENT_SYNC_WAIT_START, + LV_EVENT_SYNC_WAIT_FINISH, + LV_EVENT_UPDATE_LAYOUT_COMPLETED, + LV_EVENT_VSYNC, + LV_EVENT_VSYNC_REQUEST, + LV_EVENT_LAST, + LV_EVENT_LAST_CUSTOM = 0x7FFF, + LV_EVENT_PREPROCESS = 0x8000, + LV_EVENT_MARKED_DELETING = 0x10000, +} lv_event_code_t; +lv_result_t lv_event_send(lv_event_list_t * list, lv_event_t * e, bool preprocess); +lv_event_dsc_t * lv_event_add(lv_event_list_t * list, lv_event_cb_t cb, lv_event_code_t filter, void * user_data); +bool lv_event_remove_dsc(lv_event_list_t * list, lv_event_dsc_t * dsc); +uint32_t lv_event_get_count(lv_event_list_t * list); +lv_event_dsc_t * lv_event_get_dsc(lv_event_list_t * list, uint32_t index); +lv_event_cb_t lv_event_dsc_get_cb(lv_event_dsc_t * dsc); +void * lv_event_dsc_get_user_data(lv_event_dsc_t * dsc); +bool lv_event_remove(lv_event_list_t * list, uint32_t index); +void lv_event_remove_all(lv_event_list_t * list); +void * lv_event_get_target(lv_event_t * e); +void * lv_event_get_current_target(lv_event_t * e); +lv_event_code_t lv_event_get_code(lv_event_t * e); +void * lv_event_get_param(lv_event_t * e); +void * lv_event_get_user_data(lv_event_t * e); +void lv_event_stop_bubbling(lv_event_t * e); +void lv_event_stop_trickling(lv_event_t * e); +void lv_event_stop_processing(lv_event_t * e); +void lv_event_free_user_data_cb(lv_event_t * e); +uint32_t lv_event_register_id(void); +const char * lv_event_code_get_name(lv_event_code_t code); typedef enum { - LV_PALETTE_RED, - LV_PALETTE_PINK, - LV_PALETTE_PURPLE, - LV_PALETTE_DEEP_PURPLE, - LV_PALETTE_INDIGO, - LV_PALETTE_BLUE, - LV_PALETTE_LIGHT_BLUE, - LV_PALETTE_CYAN, - LV_PALETTE_TEAL, - LV_PALETTE_GREEN, - LV_PALETTE_LIGHT_GREEN, - LV_PALETTE_LIME, - LV_PALETTE_YELLOW, - LV_PALETTE_AMBER, - LV_PALETTE_ORANGE, - LV_PALETTE_DEEP_ORANGE, - LV_PALETTE_BROWN, - LV_PALETTE_BLUE_GREY, - LV_PALETTE_GREY, - LV_PALETTE_LAST, - LV_PALETTE_NONE = 0xff, -} lv_palette_t; -lv_color_t lv_palette_main(lv_palette_t p); -lv_color_t lv_palette_lighten(lv_palette_t p, uint8_t lvl); -lv_color_t lv_palette_darken(lv_palette_t p, uint8_t lvl); -struct _lv_color_filter_dsc_t; -typedef lv_color_t (*lv_color_filter_cb_t)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); -struct _lv_color_filter_dsc_t { - lv_color_filter_cb_t filter_cb; - void * user_data; -}; -lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix); -lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg); -lv_color32_t lv_color_mix32_premultiplied(lv_color32_t fg, lv_color32_t bg); -uint8_t lv_color_brightness(lv_color_t c); -void lv_color_filter_dsc_init(lv_color_filter_dsc_t * dsc, lv_color_filter_cb_t cb); -lv_color32_t lv_color_over32(lv_color32_t fg, lv_color32_t bg); - extern const lv_color_filter_dsc_t lv_color_filter_shade; -enum {ENUM_LV_IMAGE_HEADER_MAGIC = (0x19)}; -typedef enum _lvimage_flags_t { - LV_IMAGE_FLAGS_PREMULTIPLIED = 0x0001, - LV_IMAGE_FLAGS_COMPRESSED = 0x0008, - LV_IMAGE_FLAGS_ALLOCATED = 0x0010, - LV_IMAGE_FLAGS_MODIFIABLE = 0x0020, - LV_IMAGE_FLAGS_CUSTOM_DRAW = 0x0040, - LV_IMAGE_FLAGS_USER1 = 0x0100, - LV_IMAGE_FLAGS_USER2 = 0x0200, - LV_IMAGE_FLAGS_USER3 = 0x0400, - LV_IMAGE_FLAGS_USER4 = 0x0800, - LV_IMAGE_FLAGS_USER5 = 0x1000, - LV_IMAGE_FLAGS_USER6 = 0x2000, - LV_IMAGE_FLAGS_USER7 = 0x4000, - LV_IMAGE_FLAGS_USER8 = 0x8000, -} lv_image_flags_t; + LV_KEY_UP = 17, + LV_KEY_DOWN = 18, + LV_KEY_RIGHT = 19, + LV_KEY_LEFT = 20, + LV_KEY_ESC = 27, + LV_KEY_DEL = 127, + LV_KEY_BACKSPACE = 8, + LV_KEY_ENTER = 10, + LV_KEY_NEXT = 9, + LV_KEY_PREV = 11, + LV_KEY_HOME = 2, + LV_KEY_END = 3, +} lv_key_t; +typedef void (*lv_group_focus_cb_t)(lv_group_t *); +typedef void (*lv_group_edge_cb_t)(lv_group_t *, bool); typedef enum { - LV_IMAGE_COMPRESS_NONE = 0, - LV_IMAGE_COMPRESS_RLE, - LV_IMAGE_COMPRESS_LZ4, -} lv_image_compress_t; -typedef struct { - uint32_t magic: 8; - uint32_t cf : 8; - uint32_t flags: 16; - uint32_t w: 16; - uint32_t h: 16; - uint32_t stride: 16; - uint32_t reserved_2: 16; -} lv_image_header_t; -typedef struct { - void * buf; - uint32_t stride; -} lv_yuv_plane_t; -typedef union { - lv_yuv_plane_t yuv; - struct { - lv_yuv_plane_t y; - lv_yuv_plane_t u; - lv_yuv_plane_t v; - } planar; - struct { - lv_yuv_plane_t y; - lv_yuv_plane_t uv; - } semi_planar; -} lv_yuv_buf_t; -typedef struct { - lv_image_header_t header; - uint32_t data_size; - const uint8_t * data; - const void * reserved; - const void * reserved_2; -} lv_image_dsc_t; -enum {ENUM_LV_STRIDE_AUTO = 0}; -typedef void * (*lv_draw_buf_malloc_cb_t)(size_t size, lv_color_format_t color_format); -typedef void (*lv_draw_buf_free_cb_t)(void * draw_buf); -typedef void (*lv_draw_buf_copy_cb_t)(lv_draw_buf_t * dest, const lv_area_t * dest_area, - const lv_draw_buf_t * src, const lv_area_t * src_area); -typedef void * (*lv_draw_buf_align_cb_t)(void * buf, lv_color_format_t color_format); -typedef void (*lv_draw_buf_cache_operation_cb_t)(const lv_draw_buf_t * draw_buf, const lv_area_t * area); -typedef uint32_t (*lv_draw_buf_width_to_stride_cb_t)(uint32_t w, lv_color_format_t color_format); -struct _lv_draw_buf_t { - lv_image_header_t header; - uint32_t data_size; - uint8_t * data; - void * unaligned_data; - const lv_draw_buf_handlers_t * handlers; -}; -void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t * handlers); -void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t * handlers, - lv_draw_buf_malloc_cb_t buf_malloc_cb, - lv_draw_buf_free_cb_t buf_free_cb, - lv_draw_buf_copy_cb_t buf_copy_cb, - lv_draw_buf_align_cb_t align_pointer_cb, - lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, - lv_draw_buf_cache_operation_cb_t flush_cache_cb, - lv_draw_buf_width_to_stride_cb_t width_to_stride_cb); -lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void); -lv_draw_buf_handlers_t * lv_draw_buf_get_font_handlers(void); -lv_draw_buf_handlers_t * lv_draw_buf_get_image_handlers(void); -void * lv_draw_buf_align(void * buf, lv_color_format_t color_format); -void * lv_draw_buf_align_ex(const lv_draw_buf_handlers_t * handlers, void * buf, lv_color_format_t color_format); -void lv_draw_buf_invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area); -void lv_draw_buf_flush_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area); -uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format); -uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t * handlers, uint32_t w, - lv_color_format_t color_format); -void lv_draw_buf_clear(lv_draw_buf_t * draw_buf, const lv_area_t * a); -lv_draw_buf_t * lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride); -lv_draw_buf_t * lv_draw_buf_create_ex(const lv_draw_buf_handlers_t * handlers, uint32_t w, uint32_t h, - lv_color_format_t cf, uint32_t stride); -lv_draw_buf_t * lv_draw_buf_dup(const lv_draw_buf_t * draw_buf); -lv_draw_buf_t * lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t * handlers, const lv_draw_buf_t * draw_buf); -lv_result_t lv_draw_buf_init(lv_draw_buf_t * draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, - void * data, uint32_t data_size); -lv_draw_buf_t * lv_draw_buf_reshape(lv_draw_buf_t * draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, - uint32_t stride); -void lv_draw_buf_destroy(lv_draw_buf_t * draw_buf); -void lv_draw_buf_copy(lv_draw_buf_t * dest, const lv_area_t * dest_area, - const lv_draw_buf_t * src, const lv_area_t * src_area); -void * lv_draw_buf_goto_xy(const lv_draw_buf_t * buf, uint32_t x, uint32_t y); -lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t * src, uint32_t stride); -lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t * draw_buf); -static inline bool lv_draw_buf_has_flag(const lv_draw_buf_t * draw_buf, lv_image_flags_t flag) -{ - return draw_buf->header.flags & flag; -} -static inline void lv_draw_buf_set_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag) -{ - draw_buf->header.flags |= flag; -} -static inline void lv_draw_buf_clear_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag) -{ - draw_buf->header.flags &= ~flag; -} -lv_result_t lv_draw_buf_from_image(lv_draw_buf_t * buf, const lv_image_dsc_t * img); -void lv_draw_buf_to_image(const lv_draw_buf_t * buf, lv_image_dsc_t * img); -void lv_draw_buf_set_palette(lv_draw_buf_t * draw_buf, uint8_t index, lv_color32_t color); -void lv_image_buf_set_palette(lv_image_dsc_t * dsc, uint8_t id, lv_color32_t c); -void lv_image_buf_free(lv_image_dsc_t * dsc); -void * lv_utils_bsearch(const void * key, const void * base, size_t n, size_t size, - int (*cmp)(const void * pRef, const void * pElement)); -lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t * draw_buf, const char * path); -static inline uint32_t lv_swap_bytes_32(uint32_t x) -{ - return (x << 24) - | ((x & 0x0000ff00U) << 8) - | ((x & 0x00ff0000U) >> 8) - | (x >> 24); -} -static inline uint16_t lv_swap_bytes_16(uint16_t x) -{ - return (x << 8) | (x >> 8); -} -typedef lv_result_t (*lv_iter_next_cb)(void * instance, void * context, void * elem); -typedef void (*lv_iter_inspect_cb)(void * elem); -lv_iter_t * lv_iter_create(void * instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb); -void * lv_iter_get_context(const lv_iter_t * iter); -void lv_iter_destroy(lv_iter_t * iter); -lv_result_t lv_iter_next(lv_iter_t * iter, void * elem); -void lv_iter_make_peekable(lv_iter_t * iter, uint32_t capacity); -lv_result_t lv_iter_peek(lv_iter_t * iter, void * elem); -lv_result_t lv_iter_peek_advance(lv_iter_t * iter); -lv_result_t lv_iter_peek_reset(lv_iter_t * iter); -void lv_iter_inspect(lv_iter_t * iter, lv_iter_inspect_cb inspect_cb); -typedef bool (*lv_circle_buf_fill_cb_t)(void * buf, uint32_t buff_len, int32_t index, void * user_data); -lv_circle_buf_t * lv_circle_buf_create(uint32_t capacity, uint32_t element_size); -lv_circle_buf_t * lv_circle_buf_create_from_buf(void * buf, uint32_t capacity, uint32_t element_size); -lv_circle_buf_t * lv_circle_buf_create_from_array(const lv_array_t * array); -lv_result_t lv_circle_buf_resize(lv_circle_buf_t * circle_buf, uint32_t capacity); -void lv_circle_buf_destroy(lv_circle_buf_t * circle_buf); -uint32_t lv_circle_buf_size(const lv_circle_buf_t * circle_buf); -uint32_t lv_circle_buf_capacity(const lv_circle_buf_t * circle_buf); -uint32_t lv_circle_buf_remain(const lv_circle_buf_t * circle_buf); -bool lv_circle_buf_is_empty(const lv_circle_buf_t * circle_buf); -bool lv_circle_buf_is_full(const lv_circle_buf_t * circle_buf); -void lv_circle_buf_reset(lv_circle_buf_t * circle_buf); -void * lv_circle_buf_head(const lv_circle_buf_t * circle_buf); -void * lv_circle_buf_tail(const lv_circle_buf_t * circle_buf); -lv_result_t lv_circle_buf_read(lv_circle_buf_t * circle_buf, void * data); -lv_result_t lv_circle_buf_write(lv_circle_buf_t * circle_buf, const void * data); -uint32_t lv_circle_buf_fill(lv_circle_buf_t * circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, - void * user_data); -lv_result_t lv_circle_buf_skip(lv_circle_buf_t * circle_buf); -lv_result_t lv_circle_buf_peek(const lv_circle_buf_t * circle_buf, void * data); -lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t * circle_buf, uint32_t index, void * data); -typedef struct _lv_tree_class_t lv_tree_class_t; -typedef struct _lv_tree_node_t lv_tree_node_t; -typedef void (*lv_tree_constructor_cb_t)(const lv_tree_class_t * class_p, lv_tree_node_t * node); -typedef void (*lv_tree_destructor_cb_t)(const lv_tree_class_t * class_p, lv_tree_node_t * node); -struct _lv_tree_class_t { - const lv_tree_class_t * base_class; - uint32_t instance_size; - lv_tree_constructor_cb_t constructor_cb; - lv_tree_destructor_cb_t destructor_cb; -}; -struct _lv_tree_node_t { - lv_tree_node_t * parent; - lv_tree_node_t ** children; - uint32_t child_cnt; - uint32_t child_cap; - const lv_tree_class_t * class_p; -}; -enum _lv_tree_walk_mode_t { - LV_TREE_WALK_PRE_ORDER = 0, - LV_TREE_WALK_POST_ORDER, -}; -typedef uint8_t lv_tree_walk_mode_t; -typedef bool (*lv_tree_traverse_cb_t)(const lv_tree_node_t * node, void * user_data); -typedef bool (*lv_tree_before_cb_t)(const lv_tree_node_t * node, void * user_data); -typedef void (*lv_tree_after_cb_t)(const lv_tree_node_t * node, void * user_data); -extern const lv_tree_class_t lv_tree_node_class; -lv_tree_node_t * lv_tree_node_create(const lv_tree_class_t * class_p, lv_tree_node_t * parent); -void lv_tree_node_delete(lv_tree_node_t * node); -bool lv_tree_walk(const lv_tree_node_t * node, - lv_tree_walk_mode_t mode, - lv_tree_traverse_cb_t cb, - lv_tree_before_cb_t bcb, - lv_tree_after_cb_t acb, - void * user_data); -void lv_lock(void); -lv_result_t lv_lock_isr(void); -void lv_unlock(void); -void lv_sleep_ms(uint32_t ms); + LV_GROUP_REFOCUS_POLICY_NEXT = 0, + LV_GROUP_REFOCUS_POLICY_PREV = 1 +} lv_group_refocus_policy_t; +lv_group_t * lv_group_create(void); +void lv_group_delete(lv_group_t * group); +void lv_group_set_default(lv_group_t * group); +lv_group_t * lv_group_get_default(void); +void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj); +void lv_group_swap_obj(lv_obj_t * obj1, lv_obj_t * obj2); +void lv_group_remove_obj(lv_obj_t * obj); +void lv_group_remove_all_objs(lv_group_t * group); +void lv_group_focus_obj(lv_obj_t * obj); +void lv_group_focus_next(lv_group_t * group); +void lv_group_focus_prev(lv_group_t * group); +void lv_group_focus_freeze(lv_group_t * group, bool en); +lv_result_t lv_group_send_data(lv_group_t * group, uint32_t c); +void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb); +void lv_group_set_edge_cb(lv_group_t * group, lv_group_edge_cb_t edge_cb); +void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy); +void lv_group_set_editing(lv_group_t * group, bool edit); +void lv_group_set_wrap(lv_group_t * group, bool en); +lv_obj_t * lv_group_get_focused(const lv_group_t * group); +lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group); +lv_group_edge_cb_t lv_group_get_edge_cb(const lv_group_t * group); +bool lv_group_get_editing(const lv_group_t * group); +bool lv_group_get_wrap(lv_group_t * group); +uint32_t lv_group_get_obj_count(lv_group_t * group); +lv_obj_t * lv_group_get_obj_by_index(lv_group_t * group, uint32_t index); +uint32_t lv_group_get_count(void); +lv_group_t * lv_group_by_index(uint32_t index); +void lv_group_set_user_data(lv_group_t * group, void * user_data); +void * lv_group_get_user_data(const lv_group_t * group); +void lv_init(void); +void lv_deinit(void); +bool lv_is_initialized(void); enum _lv_str_symbol_id_t { LV_STR_SYMBOL_BULLET, LV_STR_SYMBOL_AUDIO, @@ -1202,1765 +787,1432 @@ LV_STR_SYMBOL_NEW_LINE, LV_STR_SYMBOL_DUMMY, }; -typedef enum { - LV_FONT_GLYPH_FORMAT_NONE = 0, - LV_FONT_GLYPH_FORMAT_A1 = 0x01, - LV_FONT_GLYPH_FORMAT_A2 = 0x02, - LV_FONT_GLYPH_FORMAT_A3 = 0x03, - LV_FONT_GLYPH_FORMAT_A4 = 0x04, - LV_FONT_GLYPH_FORMAT_A8 = 0x08, - LV_FONT_GLYPH_FORMAT_IMAGE = 0x19, - LV_FONT_GLYPH_FORMAT_VECTOR = 0x1A, - LV_FONT_GLYPH_FORMAT_SVG = 0x1B, - LV_FONT_GLYPH_FORMAT_CUSTOM = 0xFF, -} lv_font_glyph_format_t; +enum {ENUM_LV_LOG_LEVEL_TRACE = 0}; +enum {ENUM_LV_LOG_LEVEL_INFO = 1}; +enum {ENUM_LV_LOG_LEVEL_WARN = 2}; +enum {ENUM_LV_LOG_LEVEL_ERROR = 3}; +enum {ENUM_LV_LOG_LEVEL_USER = 4}; +enum {ENUM_LV_LOG_LEVEL_NONE = 5}; +typedef int8_t lv_log_level_t; +typedef void * lv_mem_pool_t; typedef struct { - const lv_font_t * - resolved_font; - uint16_t adv_w; - uint16_t box_w; - uint16_t box_h; - int16_t ofs_x; - int16_t ofs_y; - uint16_t stride; - lv_font_glyph_format_t format; - uint8_t is_placeholder: 1; - uint8_t req_raw_bitmap: 1; - int32_t outline_stroke_width; - union { - uint32_t index; - const void * src; - } gid; - lv_cache_entry_t * entry; -} lv_font_glyph_dsc_t; -typedef enum { - LV_FONT_SUBPX_NONE, - LV_FONT_SUBPX_HOR, - LV_FONT_SUBPX_VER, - LV_FONT_SUBPX_BOTH, -} lv_font_subpx_t; -typedef enum { - LV_FONT_KERNING_NORMAL, - LV_FONT_KERNING_NONE, -} lv_font_kerning_t; -struct _lv_font_t { - bool (*get_glyph_dsc)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); - const void * (*get_glyph_bitmap)(lv_font_glyph_dsc_t *, lv_draw_buf_t *); - void (*release_glyph)(const lv_font_t *, lv_font_glyph_dsc_t *); - int32_t line_height; - int32_t base_line; - uint8_t subpx : 2; - uint8_t kerning : 1; - uint8_t static_bitmap : 1; - int8_t underline_position; - int8_t underline_thickness; - const void * dsc; - const lv_font_t * fallback; - void * user_data; -}; -struct _lv_font_class_t { - lv_font_t * (*create_cb)(const lv_font_info_t * info, const void * src); - void (*delete_cb)(lv_font_t * font); - void * (*dup_src_cb)(const void * src); - void (*free_src_cb)(void * src); -}; -struct _lv_font_info_t { - const char * name; - const lv_font_class_t * class_p; - uint32_t size; - uint32_t render_mode; - uint32_t style; - lv_font_kerning_t kerning; + size_t total_size; + size_t free_cnt; + size_t free_size; + size_t free_biggest_size; + size_t used_cnt; + size_t max_used; + uint8_t used_pct; + uint8_t frag_pct; +} lv_mem_monitor_t; +void lv_mem_init(void); +void lv_mem_deinit(void); +lv_mem_pool_t lv_mem_add_pool(void * mem, size_t bytes); +void lv_mem_remove_pool(lv_mem_pool_t pool); +void * lv_malloc(size_t size); +void * lv_calloc(size_t num, size_t size); +void * lv_zalloc(size_t size); +void * lv_malloc_zeroed(size_t size); +void lv_free(void * data); +void * lv_realloc(void * data_p, size_t new_size); +void * lv_reallocf(void * data_p, size_t new_size); +void * lv_malloc_core(size_t size); +void lv_free_core(void * p); +void * lv_realloc_core(void * p, size_t new_size); +void lv_mem_monitor_core(lv_mem_monitor_t * mon_p); +lv_result_t lv_mem_test_core(void); +lv_result_t lv_mem_test(void); +void lv_mem_monitor(lv_mem_monitor_t * mon_p); +enum {ENUM_LV_COLOR_DEPTH = 16}; +enum _lv_opacity_level_t { + LV_OPA_TRANSP = 0, + LV_OPA_0 = 0, + LV_OPA_10 = 25, + LV_OPA_20 = 51, + LV_OPA_30 = 76, + LV_OPA_40 = 102, + LV_OPA_50 = 127, + LV_OPA_60 = 153, + LV_OPA_70 = 178, + LV_OPA_80 = 204, + LV_OPA_90 = 229, + LV_OPA_100 = 255, + LV_OPA_COVER = 255, }; -const void * lv_font_get_glyph_bitmap(lv_font_glyph_dsc_t * g_dsc, lv_draw_buf_t * draw_buf); -const void * lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t * g_dsc); -bool lv_font_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t letter, - uint32_t letter_next); -void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t * g_dsc); -uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next); -int32_t lv_font_get_line_height(const lv_font_t * font); -void lv_font_set_kerning(lv_font_t * font, lv_font_kerning_t kerning); -const lv_font_t * lv_font_get_default(void); -bool lv_font_info_is_equal(const lv_font_info_t * ft_info_1, const lv_font_info_t * ft_info_2); -bool lv_font_has_static_bitmap(const lv_font_t * font); - extern const lv_font_t lv_font_montserrat_14; - extern const lv_font_t lv_font_montserrat_16; - extern const lv_font_t lv_font_montserrat_24; - extern const lv_font_t lv_font_montserrat_32; - extern const lv_font_t lv_font_montserrat_40; - -typedef enum { - LV_TEXT_FLAG_NONE = 0x00, - LV_TEXT_FLAG_EXPAND = 0x01, - LV_TEXT_FLAG_FIT = 0x02, - LV_TEXT_FLAG_BREAK_ALL = 0x04, - LV_TEXT_FLAG_RECOLOR = 0x08, -} lv_text_flag_t; -typedef enum { - LV_TEXT_ALIGN_AUTO, - LV_TEXT_ALIGN_LEFT, - LV_TEXT_ALIGN_CENTER, - LV_TEXT_ALIGN_RIGHT, -} lv_text_align_t; -void lv_text_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, int32_t letter_space, - int32_t line_space, int32_t max_width, lv_text_flag_t flag); -typedef enum { - LV_BASE_DIR_LTR = 0x00, - LV_BASE_DIR_RTL = 0x01, - LV_BASE_DIR_AUTO = 0x02, - LV_BASE_DIR_NEUTRAL = 0x20, - LV_BASE_DIR_WEAK = 0x21, -} lv_base_dir_t; -static inline void lv_bidi_calculate_align(lv_text_align_t * align, lv_base_dir_t * base_dir, const char * txt) -{ - ((void)txt); - ((void)base_dir); - if(*align == LV_TEXT_ALIGN_AUTO) * align = LV_TEXT_ALIGN_LEFT; -} -typedef enum { - LV_GRAD_DIR_NONE, - LV_GRAD_DIR_VER, - LV_GRAD_DIR_HOR, - LV_GRAD_DIR_LINEAR, - LV_GRAD_DIR_RADIAL, - LV_GRAD_DIR_CONICAL, -} lv_grad_dir_t; -typedef enum { - LV_GRAD_EXTEND_PAD, - LV_GRAD_EXTEND_REPEAT, - LV_GRAD_EXTEND_REFLECT, -} lv_grad_extend_t; typedef struct { - lv_color_t color; - lv_opa_t opa; - uint8_t frac; -} lv_grad_stop_t; + uint8_t blue; + uint8_t green; + uint8_t red; +} lv_color_t; typedef struct { - lv_grad_stop_t stops[2]; - uint8_t stops_count; - lv_grad_dir_t dir : 4; - lv_grad_extend_t extend : 3; - union { - struct { - lv_point_t start; - lv_point_t end; - } linear; - struct { - lv_point_t focal; - lv_point_t focal_extent; - lv_point_t end; - lv_point_t end_extent; - } radial; - struct { - lv_point_t center; - int16_t start_angle; - int16_t end_angle; - } conical; - } params; - void * state; -} lv_grad_dsc_t; -void lv_grad_init_stops(lv_grad_dsc_t * grad, const lv_color_t colors[], const lv_opa_t opa[], - const uint8_t fracs[], int num_stops); -void lv_grad_horizontal_init(lv_grad_dsc_t * dsc); -void lv_grad_vertical_init(lv_grad_dsc_t * dsc); -void lv_grad_linear_init(lv_grad_dsc_t * dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, - lv_grad_extend_t extend); -void lv_grad_radial_init(lv_grad_dsc_t * dsc, int32_t center_x, int32_t center_y, int32_t to_x, int32_t to_y, - lv_grad_extend_t extend); -void lv_grad_radial_set_focal(lv_grad_dsc_t * dsc, int32_t center_x, int32_t center_y, int32_t radius); -void lv_grad_conical_init(lv_grad_dsc_t * dsc, int32_t center_x, int32_t center_y, int32_t start_angle, - int32_t end_angle, lv_grad_extend_t extend); -typedef void (*lv_layout_update_cb_t)(lv_obj_t *, void * user_data); -typedef bool (*lv_layout_get_min_size_cb_t)(lv_obj_t *, int32_t * req_size, bool width, void * user_data); + uint16_t blue : 5; + uint16_t green : 6; + uint16_t red : 5; +} lv_color16_t; typedef struct { - lv_layout_update_cb_t layout_update_cb; - lv_layout_get_min_size_cb_t get_min_size_cb; -} lv_layout_callbacks_t; -typedef enum { - LV_LAYOUT_NONE = 0, - LV_LAYOUT_FLEX, - LV_LAYOUT_GRID, - LV_LAYOUT_LAST -} lv_layout_t; -uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void * user_data); -uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data); -typedef enum { - LV_FLEX_ALIGN_START, - LV_FLEX_ALIGN_END, - LV_FLEX_ALIGN_CENTER, - LV_FLEX_ALIGN_SPACE_EVENLY, - LV_FLEX_ALIGN_SPACE_AROUND, - LV_FLEX_ALIGN_SPACE_BETWEEN, -} lv_flex_align_t; -typedef enum { - LV_FLEX_FLOW_ROW = 0x00, - LV_FLEX_FLOW_COLUMN = (1 << 0), - LV_FLEX_FLOW_ROW_WRAP = LV_FLEX_FLOW_ROW | (1 << 2), - LV_FLEX_FLOW_ROW_REVERSE = LV_FLEX_FLOW_ROW | (1 << 3), - LV_FLEX_FLOW_ROW_WRAP_REVERSE = LV_FLEX_FLOW_ROW | (1 << 2) | (1 << 3), - LV_FLEX_FLOW_COLUMN_WRAP = LV_FLEX_FLOW_COLUMN | (1 << 2), - LV_FLEX_FLOW_COLUMN_REVERSE = LV_FLEX_FLOW_COLUMN | (1 << 3), - LV_FLEX_FLOW_COLUMN_WRAP_REVERSE = LV_FLEX_FLOW_COLUMN | (1 << 2) | (1 << 3), -} lv_flex_flow_t; -void lv_flex_init(void); -void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow); -void lv_obj_set_flex_align(lv_obj_t * obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, - lv_flex_align_t track_cross_place); -void lv_obj_set_flex_grow(lv_obj_t * obj, uint8_t grow); -enum {ENUM_LV_GRID_CONTENT = (((1 << (29U)) - 1) - 101)}; -enum {ENUM_LV_GRID_TEMPLATE_LAST = (((1 << (29U)) - 1))}; -typedef enum { - LV_GRID_ALIGN_START, - LV_GRID_ALIGN_CENTER, - LV_GRID_ALIGN_END, - LV_GRID_ALIGN_STRETCH, - LV_GRID_ALIGN_SPACE_EVENLY, - LV_GRID_ALIGN_SPACE_AROUND, - LV_GRID_ALIGN_SPACE_BETWEEN, -} lv_grid_align_t; -void lv_grid_init(void); -void lv_obj_set_grid_dsc_array(lv_obj_t * obj, const int32_t col_dsc[], const int32_t row_dsc[]); -void lv_obj_set_grid_align(lv_obj_t * obj, lv_grid_align_t column_align, lv_grid_align_t row_align); -void lv_obj_set_grid_cell(lv_obj_t * obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, - lv_grid_align_t row_align, int32_t row_pos, int32_t row_span); -int32_t lv_grid_fr(uint8_t x); -enum {ENUM_LV_SCALE_NONE = 256}; -typedef enum { - LV_BLEND_MODE_NORMAL, - LV_BLEND_MODE_ADDITIVE, - LV_BLEND_MODE_SUBTRACTIVE, - LV_BLEND_MODE_MULTIPLY, - LV_BLEND_MODE_DIFFERENCE, -} lv_blend_mode_t; -typedef enum { - LV_TEXT_DECOR_NONE = 0x00, - LV_TEXT_DECOR_UNDERLINE = 0x01, - LV_TEXT_DECOR_STRIKETHROUGH = 0x02, -} lv_text_decor_t; -typedef enum { - LV_BORDER_SIDE_NONE = 0x00, - LV_BORDER_SIDE_BOTTOM = 0x01, - LV_BORDER_SIDE_TOP = 0x02, - LV_BORDER_SIDE_LEFT = 0x04, - LV_BORDER_SIDE_RIGHT = 0x08, - LV_BORDER_SIDE_FULL = 0x0F, - LV_BORDER_SIDE_INTERNAL = 0x10, -} lv_border_side_t; -typedef enum { - LV_BLUR_QUALITY_AUTO = 0, - LV_BLUR_QUALITY_SPEED, - LV_BLUR_QUALITY_PRECISION, -} lv_blur_quality_t; + uint8_t blue; + uint8_t green; + uint8_t red; + uint8_t alpha; +} lv_color32_t; typedef struct { - lv_color_t low; - lv_color_t high; -} lv_image_colorkey_t; -typedef union { - int32_t num; - const void * ptr; - lv_color_t color; -} lv_style_value_t; -enum _lv_style_id_t { - LV_STYLE_PROP_INV = 0, - LV_STYLE_WIDTH = 1, - LV_STYLE_HEIGHT, - LV_STYLE_LENGTH, - LV_STYLE_TRANSFORM_WIDTH, - LV_STYLE_TRANSFORM_HEIGHT, - LV_STYLE_MIN_WIDTH = 8, - LV_STYLE_MAX_WIDTH, - LV_STYLE_MIN_HEIGHT, - LV_STYLE_MAX_HEIGHT, - LV_STYLE_TRANSLATE_X, - LV_STYLE_TRANSLATE_Y, - LV_STYLE_RADIAL_OFFSET, - LV_STYLE_X = 16, - LV_STYLE_Y, - LV_STYLE_ALIGN, - LV_STYLE_PAD_TOP = 24, - LV_STYLE_PAD_BOTTOM, - LV_STYLE_PAD_LEFT, - LV_STYLE_PAD_RIGHT, - LV_STYLE_PAD_RADIAL, - LV_STYLE_PAD_ROW, - LV_STYLE_PAD_COLUMN, - LV_STYLE_MARGIN_TOP = 32, - LV_STYLE_MARGIN_BOTTOM, - LV_STYLE_MARGIN_LEFT, - LV_STYLE_MARGIN_RIGHT, - LV_STYLE_BG_GRAD = 40, - LV_STYLE_BG_GRAD_DIR, - LV_STYLE_BG_MAIN_OPA, - LV_STYLE_BG_GRAD_OPA, - LV_STYLE_BG_GRAD_COLOR, - LV_STYLE_BG_MAIN_STOP, - LV_STYLE_BG_GRAD_STOP, - LV_STYLE_BG_IMAGE_SRC = 48, - LV_STYLE_BG_IMAGE_OPA, - LV_STYLE_BG_IMAGE_RECOLOR_OPA, - LV_STYLE_BG_IMAGE_TILED, - LV_STYLE_BG_IMAGE_RECOLOR, - LV_STYLE_BORDER_WIDTH = 56, - LV_STYLE_BORDER_COLOR, - LV_STYLE_BORDER_OPA, - LV_STYLE_BORDER_POST, - LV_STYLE_BORDER_SIDE, - LV_STYLE_OUTLINE_WIDTH = 64, - LV_STYLE_OUTLINE_COLOR, - LV_STYLE_OUTLINE_OPA, - LV_STYLE_OUTLINE_PAD, - LV_STYLE_BG_OPA = 72, - LV_STYLE_BG_COLOR, - LV_STYLE_SHADOW_WIDTH, - LV_STYLE_LINE_WIDTH, - LV_STYLE_ARC_WIDTH, - LV_STYLE_TEXT_FONT, - LV_STYLE_IMAGE_RECOLOR_OPA, - LV_STYLE_IMAGE_OPA = 80, - LV_STYLE_SHADOW_OPA, - LV_STYLE_LINE_OPA, - LV_STYLE_ARC_OPA, - LV_STYLE_TEXT_OPA, - LV_STYLE_SHADOW_COLOR = 88, - LV_STYLE_IMAGE_RECOLOR, - LV_STYLE_LINE_COLOR, - LV_STYLE_ARC_COLOR, - LV_STYLE_TEXT_COLOR, - LV_STYLE_ARC_IMAGE_SRC = 96, - LV_STYLE_SHADOW_OFFSET_X, - LV_STYLE_SHADOW_OFFSET_Y, - LV_STYLE_SHADOW_SPREAD, - LV_STYLE_LINE_DASH_WIDTH, - LV_STYLE_TEXT_ALIGN, - LV_STYLE_TEXT_LETTER_SPACE, - LV_STYLE_TEXT_LINE_SPACE, - LV_STYLE_LINE_DASH_GAP = 104, - LV_STYLE_LINE_ROUNDED, - LV_STYLE_IMAGE_COLORKEY, - LV_STYLE_TEXT_OUTLINE_STROKE_WIDTH, - LV_STYLE_TEXT_OUTLINE_STROKE_OPA, - LV_STYLE_TEXT_OUTLINE_STROKE_COLOR, - LV_STYLE_TEXT_DECOR, - LV_STYLE_ARC_ROUNDED, - LV_STYLE_OPA = 112, - LV_STYLE_OPA_LAYERED, - LV_STYLE_COLOR_FILTER_DSC, - LV_STYLE_COLOR_FILTER_OPA, - LV_STYLE_ANIM, - LV_STYLE_ANIM_DURATION, - LV_STYLE_TRANSITION, - LV_STYLE_RADIUS = 120, - LV_STYLE_BITMAP_MASK_SRC, - LV_STYLE_BLEND_MODE, - LV_STYLE_ROTARY_SENSITIVITY, - LV_STYLE_TRANSLATE_RADIAL, - LV_STYLE_CLIP_CORNER = 128, - LV_STYLE_BASE_DIR, - LV_STYLE_RECOLOR, - LV_STYLE_RECOLOR_OPA, - LV_STYLE_LAYOUT, - LV_STYLE_BLUR_RADIUS = 136, - LV_STYLE_BLUR_BACKDROP, - LV_STYLE_BLUR_QUALITY, - LV_STYLE_DROP_SHADOW_RADIUS = 144, - LV_STYLE_DROP_SHADOW_OFFSET_X, - LV_STYLE_DROP_SHADOW_OFFSET_Y, - LV_STYLE_DROP_SHADOW_COLOR, - LV_STYLE_DROP_SHADOW_OPA, - LV_STYLE_DROP_SHADOW_QUALITY, - LV_STYLE_TRANSFORM_SCALE_X = 152, - LV_STYLE_TRANSFORM_SCALE_Y, - LV_STYLE_TRANSFORM_PIVOT_X, - LV_STYLE_TRANSFORM_PIVOT_Y, - LV_STYLE_TRANSFORM_ROTATION, - LV_STYLE_TRANSFORM_SKEW_X, - LV_STYLE_TRANSFORM_SKEW_Y, - LV_STYLE_FLEX_FLOW = 160, - LV_STYLE_FLEX_MAIN_PLACE, - LV_STYLE_FLEX_CROSS_PLACE, - LV_STYLE_FLEX_TRACK_PLACE, - LV_STYLE_FLEX_GROW, - LV_STYLE_GRID_COLUMN_DSC_ARRAY, - LV_STYLE_GRID_ROW_DSC_ARRAY, - LV_STYLE_GRID_COLUMN_ALIGN = 168, - LV_STYLE_GRID_ROW_ALIGN, - LV_STYLE_GRID_CELL_COLUMN_POS, - LV_STYLE_GRID_CELL_COLUMN_SPAN, - LV_STYLE_GRID_CELL_X_ALIGN, - LV_STYLE_GRID_CELL_ROW_POS, - LV_STYLE_GRID_CELL_ROW_SPAN, - LV_STYLE_GRID_CELL_Y_ALIGN, - LV_STYLE_LAST_BUILT_IN_PROP, - LV_STYLE_NUM_BUILT_IN_PROPS = LV_STYLE_LAST_BUILT_IN_PROP + 1, - LV_STYLE_PROP_ANY = 0xFF, - LV_STYLE_PROP_CONST = 0xFF -}; -typedef enum { - LV_STYLE_RES_NOT_FOUND, - LV_STYLE_RES_FOUND, -} lv_style_res_t; -typedef struct { - const lv_style_prop_t * props; - void * user_data; - lv_anim_path_cb_t path_xcb; - uint32_t time; - uint32_t delay; -} lv_style_transition_dsc_t; -typedef struct { - lv_style_prop_t prop; - lv_style_value_t value; -} lv_style_const_prop_t; + uint16_t h; + uint8_t s; + uint8_t v; +} lv_color_hsv_t; typedef struct { - void * values_and_props; - uint32_t has_group; - uint8_t prop_cnt; -} lv_style_t; -void lv_style_init(lv_style_t * style); -void lv_style_reset(lv_style_t * style); -void lv_style_copy(lv_style_t * dst, const lv_style_t * src); -void lv_style_merge(lv_style_t * dst, const lv_style_t * src); -static inline bool lv_style_is_const(const lv_style_t * style) -{ - if(style->prop_cnt == 255) return 1; - return 0; -} -lv_style_prop_t lv_style_register_prop(uint8_t flag); -lv_style_prop_t lv_style_get_num_custom_props(void); -bool lv_style_remove_prop(lv_style_t * style, lv_style_prop_t prop); -void lv_style_set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t value); -lv_style_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value); -void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style_prop_t props[], - lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void * user_data); -lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop); -static inline lv_style_res_t lv_style_get_prop_inlined(const lv_style_t * style, lv_style_prop_t prop, - lv_style_value_t * value) + uint8_t lumi; + uint8_t alpha; +} lv_color16a_t; +typedef enum { + LV_COLOR_FORMAT_UNKNOWN = 0, + LV_COLOR_FORMAT_RAW = 0x01, + LV_COLOR_FORMAT_RAW_ALPHA = 0x02, + LV_COLOR_FORMAT_L8 = 0x06, + LV_COLOR_FORMAT_I1 = 0x07, + LV_COLOR_FORMAT_I2 = 0x08, + LV_COLOR_FORMAT_I4 = 0x09, + LV_COLOR_FORMAT_I8 = 0x0A, + LV_COLOR_FORMAT_A8 = 0x0E, + LV_COLOR_FORMAT_RGB565 = 0x12, + LV_COLOR_FORMAT_ARGB8565 = 0x13, + LV_COLOR_FORMAT_RGB565A8 = 0x14, + LV_COLOR_FORMAT_AL88 = 0x15, + LV_COLOR_FORMAT_RGB565_SWAPPED = 0x1B, + LV_COLOR_FORMAT_RGB888 = 0x0F, + LV_COLOR_FORMAT_ARGB8888 = 0x10, + LV_COLOR_FORMAT_XRGB8888 = 0x11, + LV_COLOR_FORMAT_ARGB8888_PREMULTIPLIED = 0x1A, + LV_COLOR_FORMAT_A1 = 0x0B, + LV_COLOR_FORMAT_A2 = 0x0C, + LV_COLOR_FORMAT_A4 = 0x0D, + LV_COLOR_FORMAT_ARGB1555 = 0x16, + LV_COLOR_FORMAT_ARGB4444 = 0x17, + LV_COLOR_FORMAT_ARGB2222 = 0X18, + LV_COLOR_FORMAT_YUV_START = 0x20, + LV_COLOR_FORMAT_I420 = LV_COLOR_FORMAT_YUV_START, + LV_COLOR_FORMAT_I422 = 0x21, + LV_COLOR_FORMAT_I444 = 0x22, + LV_COLOR_FORMAT_I400 = 0x23, + LV_COLOR_FORMAT_NV21 = 0x24, + LV_COLOR_FORMAT_NV12 = 0x25, + LV_COLOR_FORMAT_YUY2 = 0x26, + LV_COLOR_FORMAT_UYVY = 0x27, + LV_COLOR_FORMAT_YUV_END = LV_COLOR_FORMAT_UYVY, + LV_COLOR_FORMAT_PROPRIETARY_START = 0x30, + LV_COLOR_FORMAT_NEMA_TSC_START = LV_COLOR_FORMAT_PROPRIETARY_START, + LV_COLOR_FORMAT_NEMA_TSC4 = LV_COLOR_FORMAT_NEMA_TSC_START, + LV_COLOR_FORMAT_NEMA_TSC6 = 0x31, + LV_COLOR_FORMAT_NEMA_TSC6A = 0x32, + LV_COLOR_FORMAT_NEMA_TSC6AP = 0x33, + LV_COLOR_FORMAT_NEMA_TSC12 = 0x34, + LV_COLOR_FORMAT_NEMA_TSC12A = 0x35, + LV_COLOR_FORMAT_NEMA_TSC_END = LV_COLOR_FORMAT_NEMA_TSC12A, +} lv_color_format_t; +uint8_t lv_color_format_get_bpp(lv_color_format_t cf); +uint8_t lv_color_format_get_size(lv_color_format_t cf); +bool lv_color_format_has_alpha(lv_color_format_t src_cf); +lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa); +uint32_t lv_color_to_int(lv_color_t c); +bool lv_color_eq(lv_color_t c1, lv_color_t c2); +bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2); +lv_color_t lv_color_hex(uint32_t c); +lv_color_t lv_color_make(uint8_t r, uint8_t g, uint8_t b); +lv_color32_t lv_color32_make(uint8_t r, uint8_t g, uint8_t b, uint8_t a); +lv_color_t lv_color_hex3(uint32_t c); +static inline bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) { - if(lv_style_is_const(style)) { - lv_style_const_prop_t * props = (lv_style_const_prop_t *)style->values_and_props; - uint32_t i; - for(i = 0; props[i].prop != LV_STYLE_PROP_INV; i++) { - if(props[i].prop == prop) { - *value = props[i].value; - return LV_STYLE_RES_FOUND; - } - } - } - else { - lv_style_prop_t * props = (lv_style_prop_t *)style->values_and_props + style->prop_cnt * sizeof(lv_style_value_t); - uint32_t i; - for(i = 0; i < style->prop_cnt; i++) { - if(props[i] == prop) { - lv_style_value_t * values = (lv_style_value_t *)style->values_and_props; - *value = values[i]; - return LV_STYLE_RES_FOUND; - } - } - } - return LV_STYLE_RES_NOT_FOUND; + return (color.red <= h_color.red && + color.green <= h_color.green && + color.blue <= h_color.blue && + color.red >= l_color.red && + color.green >= l_color.green && + color.blue >= l_color.blue); } -bool lv_style_is_empty(const lv_style_t * style); -static inline uint32_t lv_style_get_prop_group(lv_style_prop_t prop) +static inline lv_color_t lv_color16_to_color(lv_color16_t c) { - uint32_t group = prop >> 2; - if(group > 30) group = 31; - return group; + return lv_color_make((uint8_t)(c.red << 3), (uint8_t)(c.green << 2), (uint8_t)(c.blue << 3)); } -uint8_t lv_style_prop_lookup_flags(lv_style_prop_t prop); -void lv_style_set_width(lv_style_t * style, int32_t value); -void lv_style_set_min_width(lv_style_t * style, int32_t value); -void lv_style_set_max_width(lv_style_t * style, int32_t value); -void lv_style_set_height(lv_style_t * style, int32_t value); -void lv_style_set_min_height(lv_style_t * style, int32_t value); -void lv_style_set_max_height(lv_style_t * style, int32_t value); -void lv_style_set_length(lv_style_t * style, int32_t value); -void lv_style_set_x(lv_style_t * style, int32_t value); -void lv_style_set_y(lv_style_t * style, int32_t value); -void lv_style_set_align(lv_style_t * style, lv_align_t value); -void lv_style_set_transform_width(lv_style_t * style, int32_t value); -void lv_style_set_transform_height(lv_style_t * style, int32_t value); -void lv_style_set_translate_x(lv_style_t * style, int32_t value); -void lv_style_set_translate_y(lv_style_t * style, int32_t value); -void lv_style_set_translate_radial(lv_style_t * style, int32_t value); -void lv_style_set_transform_scale_x(lv_style_t * style, int32_t value); -void lv_style_set_transform_scale_y(lv_style_t * style, int32_t value); -void lv_style_set_transform_rotation(lv_style_t * style, int32_t value); -void lv_style_set_transform_pivot_x(lv_style_t * style, int32_t value); -void lv_style_set_transform_pivot_y(lv_style_t * style, int32_t value); -void lv_style_set_transform_skew_x(lv_style_t * style, int32_t value); -void lv_style_set_transform_skew_y(lv_style_t * style, int32_t value); -void lv_style_set_pad_top(lv_style_t * style, int32_t value); -void lv_style_set_pad_bottom(lv_style_t * style, int32_t value); -void lv_style_set_pad_left(lv_style_t * style, int32_t value); -void lv_style_set_pad_right(lv_style_t * style, int32_t value); -void lv_style_set_pad_row(lv_style_t * style, int32_t value); -void lv_style_set_pad_column(lv_style_t * style, int32_t value); -void lv_style_set_pad_radial(lv_style_t * style, int32_t value); -void lv_style_set_margin_top(lv_style_t * style, int32_t value); -void lv_style_set_margin_bottom(lv_style_t * style, int32_t value); -void lv_style_set_margin_left(lv_style_t * style, int32_t value); -void lv_style_set_margin_right(lv_style_t * style, int32_t value); -void lv_style_set_bg_color(lv_style_t * style, lv_color_t value); -void lv_style_set_bg_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_bg_grad_color(lv_style_t * style, lv_color_t value); -void lv_style_set_bg_grad_dir(lv_style_t * style, lv_grad_dir_t value); -void lv_style_set_bg_main_stop(lv_style_t * style, int32_t value); -void lv_style_set_bg_grad_stop(lv_style_t * style, int32_t value); -void lv_style_set_bg_main_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_bg_grad_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_bg_grad(lv_style_t * style, const lv_grad_dsc_t * value); -void lv_style_set_bg_image_src(lv_style_t * style, const void * value); -void lv_style_set_bg_image_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_bg_image_recolor(lv_style_t * style, lv_color_t value); -void lv_style_set_bg_image_recolor_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_bg_image_tiled(lv_style_t * style, bool value); -void lv_style_set_border_color(lv_style_t * style, lv_color_t value); -void lv_style_set_border_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_border_width(lv_style_t * style, int32_t value); -void lv_style_set_border_side(lv_style_t * style, lv_border_side_t value); -void lv_style_set_border_post(lv_style_t * style, bool value); -void lv_style_set_outline_width(lv_style_t * style, int32_t value); -void lv_style_set_outline_color(lv_style_t * style, lv_color_t value); -void lv_style_set_outline_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_outline_pad(lv_style_t * style, int32_t value); -void lv_style_set_shadow_width(lv_style_t * style, int32_t value); -void lv_style_set_shadow_offset_x(lv_style_t * style, int32_t value); -void lv_style_set_shadow_offset_y(lv_style_t * style, int32_t value); -void lv_style_set_shadow_spread(lv_style_t * style, int32_t value); -void lv_style_set_shadow_color(lv_style_t * style, lv_color_t value); -void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_image_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_image_recolor(lv_style_t * style, lv_color_t value); -void lv_style_set_image_recolor_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_image_colorkey(lv_style_t * style, const lv_image_colorkey_t * value); -void lv_style_set_line_width(lv_style_t * style, int32_t value); -void lv_style_set_line_dash_width(lv_style_t * style, int32_t value); -void lv_style_set_line_dash_gap(lv_style_t * style, int32_t value); -void lv_style_set_line_rounded(lv_style_t * style, bool value); -void lv_style_set_line_color(lv_style_t * style, lv_color_t value); -void lv_style_set_line_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_arc_width(lv_style_t * style, int32_t value); -void lv_style_set_arc_rounded(lv_style_t * style, bool value); -void lv_style_set_arc_color(lv_style_t * style, lv_color_t value); -void lv_style_set_arc_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_arc_image_src(lv_style_t * style, const void * value); -void lv_style_set_text_color(lv_style_t * style, lv_color_t value); -void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value); -void lv_style_set_text_letter_space(lv_style_t * style, int32_t value); -void lv_style_set_text_line_space(lv_style_t * style, int32_t value); -void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value); -void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value); -void lv_style_set_text_outline_stroke_color(lv_style_t * style, lv_color_t value); -void lv_style_set_text_outline_stroke_width(lv_style_t * style, int32_t value); -void lv_style_set_text_outline_stroke_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_blur_radius(lv_style_t * style, int32_t value); -void lv_style_set_blur_backdrop(lv_style_t * style, bool value); -void lv_style_set_blur_quality(lv_style_t * style, lv_blur_quality_t value); -void lv_style_set_drop_shadow_radius(lv_style_t * style, int32_t value); -void lv_style_set_drop_shadow_offset_x(lv_style_t * style, int32_t value); -void lv_style_set_drop_shadow_offset_y(lv_style_t * style, int32_t value); -void lv_style_set_drop_shadow_color(lv_style_t * style, lv_color_t value); -void lv_style_set_drop_shadow_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_drop_shadow_quality(lv_style_t * style, lv_blur_quality_t value); -void lv_style_set_radius(lv_style_t * style, int32_t value); -void lv_style_set_radial_offset(lv_style_t * style, int32_t value); -void lv_style_set_clip_corner(lv_style_t * style, bool value); -void lv_style_set_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_opa_layered(lv_style_t * style, lv_opa_t value); -void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value); -void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_recolor(lv_style_t * style, lv_color_t value); -void lv_style_set_recolor_opa(lv_style_t * style, lv_opa_t value); -void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value); -void lv_style_set_anim_duration(lv_style_t * style, uint32_t value); -void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value); -void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value); -void lv_style_set_layout(lv_style_t * style, uint16_t value); -void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value); -void lv_style_set_bitmap_mask_src(lv_style_t * style, const void * value); -void lv_style_set_rotary_sensitivity(lv_style_t * style, uint32_t value); -void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value); -void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value); -void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value); -void lv_style_set_flex_track_place(lv_style_t * style, lv_flex_align_t value); -void lv_style_set_flex_grow(lv_style_t * style, uint8_t value); -void lv_style_set_grid_column_dsc_array(lv_style_t * style, const int32_t * value); -void lv_style_set_grid_column_align(lv_style_t * style, lv_grid_align_t value); -void lv_style_set_grid_row_dsc_array(lv_style_t * style, const int32_t * value); -void lv_style_set_grid_row_align(lv_style_t * style, lv_grid_align_t value); -void lv_style_set_grid_cell_column_pos(lv_style_t * style, int32_t value); -void lv_style_set_grid_cell_x_align(lv_style_t * style, lv_grid_align_t value); -void lv_style_set_grid_cell_column_span(lv_style_t * style, int32_t value); -void lv_style_set_grid_cell_row_pos(lv_style_t * style, int32_t value); -void lv_style_set_grid_cell_y_align(lv_style_t * style, lv_grid_align_t value); -void lv_style_set_grid_cell_row_span(lv_style_t * style, int32_t value); -static inline void lv_style_set_size(lv_style_t * style, int32_t width, int32_t height) -{ - lv_style_set_width(style, width); - lv_style_set_height(style, height); -} -static inline void lv_style_set_pad_all(lv_style_t * style, int32_t value) -{ - lv_style_set_pad_left(style, value); - lv_style_set_pad_right(style, value); - lv_style_set_pad_top(style, value); - lv_style_set_pad_bottom(style, value); -} -static inline void lv_style_set_pad_hor(lv_style_t * style, int32_t value) -{ - lv_style_set_pad_left(style, value); - lv_style_set_pad_right(style, value); -} -static inline void lv_style_set_pad_ver(lv_style_t * style, int32_t value) -{ - lv_style_set_pad_top(style, value); - lv_style_set_pad_bottom(style, value); -} -static inline void lv_style_set_pad_gap(lv_style_t * style, int32_t value) -{ - lv_style_set_pad_row(style, value); - lv_style_set_pad_column(style, value); -} -static inline void lv_style_set_margin_hor(lv_style_t * style, int32_t value) -{ - lv_style_set_margin_left(style, value); - lv_style_set_margin_right(style, value); -} -static inline void lv_style_set_margin_ver(lv_style_t * style, int32_t value) -{ - lv_style_set_margin_top(style, value); - lv_style_set_margin_bottom(style, value); -} -static inline void lv_style_set_margin_all(lv_style_t * style, int32_t value) +uint16_t lv_color_to_u16(lv_color_t color); +uint32_t lv_color_to_u32(lv_color_t color); +uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix); +lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl); +lv_color_t lv_color_darken(lv_color_t c, lv_opa_t lvl); +lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v); +lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8); +lv_color_hsv_t lv_color_to_hsv(lv_color_t color); +lv_color_t lv_color_white(void); +lv_color_t lv_color_black(void); +void lv_color_premultiply(lv_color32_t * c); +void lv_color16_premultiply(lv_color16_t * c, lv_opa_t a); +uint8_t lv_color_luminance(lv_color_t c); +uint8_t lv_color16_luminance(const lv_color16_t c); +uint8_t lv_color24_luminance(const uint8_t * c); +uint8_t lv_color32_luminance(lv_color32_t c); +static inline uint16_t lv_color_swap_16(uint16_t c) { - lv_style_set_margin_left(style, value); - lv_style_set_margin_right(style, value); - lv_style_set_margin_top(style, value); - lv_style_set_margin_bottom(style, value); + return (c >> 8) | (c << 8); } -static inline void lv_style_set_transform_scale(lv_style_t * style, int32_t value) +typedef enum { + LV_PALETTE_RED, + LV_PALETTE_PINK, + LV_PALETTE_PURPLE, + LV_PALETTE_DEEP_PURPLE, + LV_PALETTE_INDIGO, + LV_PALETTE_BLUE, + LV_PALETTE_LIGHT_BLUE, + LV_PALETTE_CYAN, + LV_PALETTE_TEAL, + LV_PALETTE_GREEN, + LV_PALETTE_LIGHT_GREEN, + LV_PALETTE_LIME, + LV_PALETTE_YELLOW, + LV_PALETTE_AMBER, + LV_PALETTE_ORANGE, + LV_PALETTE_DEEP_ORANGE, + LV_PALETTE_BROWN, + LV_PALETTE_BLUE_GREY, + LV_PALETTE_GREY, + LV_PALETTE_LAST, + LV_PALETTE_NONE = 0xff, +} lv_palette_t; +lv_color_t lv_palette_main(lv_palette_t p); +lv_color_t lv_palette_lighten(lv_palette_t p, uint8_t lvl); +lv_color_t lv_palette_darken(lv_palette_t p, uint8_t lvl); +struct _lv_color_filter_dsc_t; +typedef lv_color_t (*lv_color_filter_cb_t)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); +struct _lv_color_filter_dsc_t { + lv_color_filter_cb_t filter_cb; + void * user_data; +}; +lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix); +lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg); +lv_color32_t lv_color_mix32_premultiplied(lv_color32_t fg, lv_color32_t bg); +uint8_t lv_color_brightness(lv_color_t c); +void lv_color_filter_dsc_init(lv_color_filter_dsc_t * dsc, lv_color_filter_cb_t cb); +lv_color32_t lv_color_over32(lv_color32_t fg, lv_color32_t bg); + extern const lv_color_filter_dsc_t lv_color_filter_shade; +void * lv_memcpy(void * dst, const void * src, size_t len); +void lv_memset(void * dst, uint8_t v, size_t len); +void * lv_memmove(void * dst, const void * src, size_t len); +int lv_memcmp(const void * p1, const void * p2, size_t len); +static inline void lv_memzero(void * dst, size_t len) { - lv_style_set_transform_scale_x(style, value); - lv_style_set_transform_scale_y(style, value); + lv_memset(dst, 0x00, len); } -static inline bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) +size_t lv_strlen(const char * str); +size_t lv_strnlen(const char * str, size_t max_len); +size_t lv_strlcpy(char * dst, const char * src, size_t dst_size); +char * lv_strncpy(char * dst, const char * src, size_t dest_size); +char * lv_strcpy(char * dst, const char * src); +int lv_strcmp(const char * s1, const char * s2); +int lv_strncmp(const char * s1, const char * s2, size_t len); +static inline bool lv_streq(const char * s1, const char * s2) { - return lv_style_prop_lookup_flags(prop) & flag; + return lv_strcmp(s1, s2) == 0; } - extern const lv_style_prop_t lv_style_const_prop_id_inv; -typedef void (*lv_event_cb_t)(lv_event_t * e); +char * lv_strdup(const char * src); +char * lv_strndup(const char * src, size_t max_len); +char * lv_strcat(char * dst, const char * src); +char * lv_strncat(char * dst, const char * src, size_t src_len); +char * lv_strchr(const char * str, int c); +enum {ENUM_LV_IMAGE_HEADER_MAGIC = (0x19)}; +typedef enum _lvimage_flags_t { + LV_IMAGE_FLAGS_PREMULTIPLIED = 0x0001, + LV_IMAGE_FLAGS_COMPRESSED = 0x0008, + LV_IMAGE_FLAGS_ALLOCATED = 0x0010, + LV_IMAGE_FLAGS_MODIFIABLE = 0x0020, + LV_IMAGE_FLAGS_CUSTOM_DRAW = 0x0040, + LV_IMAGE_FLAGS_USER1 = 0x0100, + LV_IMAGE_FLAGS_USER2 = 0x0200, + LV_IMAGE_FLAGS_USER3 = 0x0400, + LV_IMAGE_FLAGS_USER4 = 0x0800, + LV_IMAGE_FLAGS_USER5 = 0x1000, + LV_IMAGE_FLAGS_USER6 = 0x2000, + LV_IMAGE_FLAGS_USER7 = 0x4000, + LV_IMAGE_FLAGS_USER8 = 0x8000, +} lv_image_flags_t; typedef enum { - LV_EVENT_ALL = 0, - LV_EVENT_PRESSED, - LV_EVENT_PRESSING, - LV_EVENT_PRESS_LOST, - LV_EVENT_SHORT_CLICKED, - LV_EVENT_SINGLE_CLICKED, - LV_EVENT_DOUBLE_CLICKED, - LV_EVENT_TRIPLE_CLICKED, - LV_EVENT_LONG_PRESSED, - LV_EVENT_LONG_PRESSED_REPEAT, - LV_EVENT_CLICKED, - LV_EVENT_RELEASED, - LV_EVENT_SCROLL_BEGIN, - LV_EVENT_SCROLL_THROW_BEGIN, - LV_EVENT_SCROLL_END, - LV_EVENT_SCROLL, - LV_EVENT_GESTURE, - LV_EVENT_KEY, - LV_EVENT_ROTARY, - LV_EVENT_FOCUSED, - LV_EVENT_DEFOCUSED, - LV_EVENT_LEAVE, - LV_EVENT_HIT_TEST, - LV_EVENT_INDEV_RESET, - LV_EVENT_HOVER_OVER, - LV_EVENT_HOVER_LEAVE, - LV_EVENT_COVER_CHECK, - LV_EVENT_REFR_EXT_DRAW_SIZE, - LV_EVENT_DRAW_MAIN_BEGIN, - LV_EVENT_DRAW_MAIN, - LV_EVENT_DRAW_MAIN_END, - LV_EVENT_DRAW_POST_BEGIN, - LV_EVENT_DRAW_POST, - LV_EVENT_DRAW_POST_END, - LV_EVENT_DRAW_TASK_ADDED, - LV_EVENT_VALUE_CHANGED, - LV_EVENT_INSERT, - LV_EVENT_REFRESH, - LV_EVENT_READY, - LV_EVENT_CANCEL, - LV_EVENT_STATE_CHANGED, - LV_EVENT_CREATE, - LV_EVENT_DELETE, - LV_EVENT_CHILD_CHANGED, - LV_EVENT_CHILD_CREATED, - LV_EVENT_CHILD_DELETED, - LV_EVENT_SCREEN_UNLOAD_START, - LV_EVENT_SCREEN_LOAD_START, - LV_EVENT_SCREEN_LOADED, - LV_EVENT_SCREEN_UNLOADED, - LV_EVENT_SIZE_CHANGED, - LV_EVENT_STYLE_CHANGED, - LV_EVENT_LAYOUT_CHANGED, - LV_EVENT_GET_SELF_SIZE, - LV_EVENT_INVALIDATE_AREA, - LV_EVENT_RESOLUTION_CHANGED, - LV_EVENT_COLOR_FORMAT_CHANGED, - LV_EVENT_REFR_REQUEST, - LV_EVENT_REFR_START, - LV_EVENT_REFR_READY, - LV_EVENT_RENDER_START, - LV_EVENT_RENDER_READY, - LV_EVENT_FLUSH_START, - LV_EVENT_FLUSH_FINISH, - LV_EVENT_FLUSH_WAIT_START, - LV_EVENT_FLUSH_WAIT_FINISH, - LV_EVENT_UPDATE_LAYOUT_COMPLETED, - LV_EVENT_VSYNC, - LV_EVENT_VSYNC_REQUEST, - LV_EVENT_LAST, - LV_EVENT_PREPROCESS = 0x8000, - LV_EVENT_MARKED_DELETING = 0x10000, -} lv_event_code_t; + LV_IMAGE_COMPRESS_NONE = 0, + LV_IMAGE_COMPRESS_RLE, + LV_IMAGE_COMPRESS_LZ4, +} lv_image_compress_t; typedef struct { - lv_array_t array; - uint8_t is_traversing: 1; - uint8_t has_marked_deleting: 1; -} lv_event_list_t; -lv_result_t lv_event_send(lv_event_list_t * list, lv_event_t * e, bool preprocess); -lv_event_dsc_t * lv_event_add(lv_event_list_t * list, lv_event_cb_t cb, lv_event_code_t filter, void * user_data); -bool lv_event_remove_dsc(lv_event_list_t * list, lv_event_dsc_t * dsc); -uint32_t lv_event_get_count(lv_event_list_t * list); -lv_event_dsc_t * lv_event_get_dsc(lv_event_list_t * list, uint32_t index); -lv_event_cb_t lv_event_dsc_get_cb(lv_event_dsc_t * dsc); -void * lv_event_dsc_get_user_data(lv_event_dsc_t * dsc); -bool lv_event_remove(lv_event_list_t * list, uint32_t index); -void lv_event_remove_all(lv_event_list_t * list); -void * lv_event_get_target(lv_event_t * e); -void * lv_event_get_current_target(lv_event_t * e); -lv_event_code_t lv_event_get_code(lv_event_t * e); -void * lv_event_get_param(lv_event_t * e); -void * lv_event_get_user_data(lv_event_t * e); -void lv_event_stop_bubbling(lv_event_t * e); -void lv_event_stop_trickling(lv_event_t * e); -void lv_event_stop_processing(lv_event_t * e); -void lv_event_free_user_data_cb(lv_event_t * e); -uint32_t lv_event_register_id(void); -const char * lv_event_code_get_name(lv_event_code_t code); + uint32_t magic: 8; + uint32_t cf : 8; + uint32_t flags: 16; + uint32_t w: 16; + uint32_t h: 16; + uint32_t stride: 16; + uint32_t reserved_2: 16; +} lv_image_header_t; +typedef struct { + void * buf; + uint32_t stride; +} lv_yuv_plane_t; +typedef union { + lv_yuv_plane_t yuv; + struct { + lv_yuv_plane_t y; + lv_yuv_plane_t u; + lv_yuv_plane_t v; + } planar; + struct { + lv_yuv_plane_t y; + lv_yuv_plane_t uv; + } semi_planar; +} lv_yuv_buf_t; +typedef struct { + lv_image_header_t header; + uint32_t data_size; + const uint8_t * data; + const void * reserved; + const void * reserved_2; +} lv_image_dsc_t; +enum {ENUM_LV_STRIDE_AUTO = 0}; +typedef void * (*lv_draw_buf_malloc_cb_t)(size_t size, lv_color_format_t color_format); +typedef void (*lv_draw_buf_free_cb_t)(void * draw_buf); +typedef void (*lv_draw_buf_copy_cb_t)(lv_draw_buf_t * dest, const lv_area_t * dest_area, + const lv_draw_buf_t * src, const lv_area_t * src_area); +typedef void * (*lv_draw_buf_align_cb_t)(void * buf, lv_color_format_t color_format); +typedef void (*lv_draw_buf_cache_operation_cb_t)(const lv_draw_buf_t * draw_buf, const lv_area_t * area); +typedef uint32_t (*lv_draw_buf_width_to_stride_cb_t)(uint32_t w, lv_color_format_t color_format); +typedef void (*lv_draw_buf_clear_cb_t)(lv_draw_buf_t * draw_buf, const lv_area_t * a, lv_layer_t * layer); +struct _lv_draw_buf_t { + lv_image_header_t header; + uint32_t data_size; + uint8_t * data; + void * unaligned_data; + const lv_draw_buf_handlers_t * handlers; +}; +void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t * handlers); +void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t * handlers, + lv_draw_buf_malloc_cb_t buf_malloc_cb, + lv_draw_buf_free_cb_t buf_free_cb, + lv_draw_buf_copy_cb_t buf_copy_cb, + lv_draw_buf_align_cb_t align_pointer_cb, + lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, + lv_draw_buf_cache_operation_cb_t flush_cache_cb, + lv_draw_buf_width_to_stride_cb_t width_to_stride_cb); +lv_draw_buf_handlers_t * lv_draw_buf_get_handlers(void); +lv_draw_buf_handlers_t * lv_draw_buf_get_font_handlers(void); +lv_draw_buf_handlers_t * lv_draw_buf_get_image_handlers(void); +void * lv_draw_buf_align(void * buf, lv_color_format_t color_format); +void * lv_draw_buf_align_ex(const lv_draw_buf_handlers_t * handlers, void * buf, lv_color_format_t color_format); +void lv_draw_buf_invalidate_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area); +void lv_draw_buf_flush_cache(const lv_draw_buf_t * draw_buf, const lv_area_t * area); +uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format); +uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t * handlers, uint32_t w, + lv_color_format_t color_format); +void lv_draw_buf_clear(lv_draw_buf_t * draw_buf, const lv_area_t * a); +lv_draw_buf_t * lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride); +lv_draw_buf_t * lv_draw_buf_create_ex(const lv_draw_buf_handlers_t * handlers, uint32_t w, uint32_t h, + lv_color_format_t cf, uint32_t stride); +lv_draw_buf_t * lv_draw_buf_dup(const lv_draw_buf_t * draw_buf); +lv_draw_buf_t * lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t * handlers, const lv_draw_buf_t * draw_buf); +lv_result_t lv_draw_buf_init(lv_draw_buf_t * draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, + void * data, uint32_t data_size); +lv_draw_buf_t * lv_draw_buf_reshape(lv_draw_buf_t * draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, + uint32_t stride); +void lv_draw_buf_destroy(lv_draw_buf_t * draw_buf); +void lv_draw_buf_copy(lv_draw_buf_t * dest, const lv_area_t * dest_area, + const lv_draw_buf_t * src, const lv_area_t * src_area); +void * lv_draw_buf_goto_xy(const lv_draw_buf_t * buf, uint32_t x, uint32_t y); +bool lv_draw_buf_is_position_valid(const lv_draw_buf_t * buf, uint32_t x, uint32_t y); +lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t * src, uint32_t stride); +lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t * draw_buf); +bool lv_draw_buf_has_flag(const lv_draw_buf_t * draw_buf, lv_image_flags_t flag); +void lv_draw_buf_set_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag); +void lv_draw_buf_clear_flag(lv_draw_buf_t * draw_buf, lv_image_flags_t flag); +lv_result_t lv_draw_buf_from_image(lv_draw_buf_t * buf, const lv_image_dsc_t * img); +void lv_draw_buf_to_image(const lv_draw_buf_t * buf, lv_image_dsc_t * img); +void lv_draw_buf_set_palette(lv_draw_buf_t * draw_buf, uint8_t index, lv_color32_t color); + +void lv_image_buf_set_palette(lv_image_dsc_t * dsc, uint8_t id, lv_color32_t c); + +void lv_image_buf_free(lv_image_dsc_t * dsc); typedef enum { - LV_DISPLAY_ROTATION_0 = 0, - LV_DISPLAY_ROTATION_90, - LV_DISPLAY_ROTATION_180, - LV_DISPLAY_ROTATION_270 -} lv_display_rotation_t; + LV_FONT_GLYPH_FORMAT_NONE = 0, + LV_FONT_GLYPH_FORMAT_A1 = 0x01, + LV_FONT_GLYPH_FORMAT_A2 = 0x02, + LV_FONT_GLYPH_FORMAT_A3 = 0x03, + LV_FONT_GLYPH_FORMAT_A4 = 0x04, + LV_FONT_GLYPH_FORMAT_A8 = 0x08, + LV_FONT_GLYPH_FORMAT_IMAGE = 0x19, + LV_FONT_GLYPH_FORMAT_VECTOR = 0x1A, + LV_FONT_GLYPH_FORMAT_SVG = 0x1B, + LV_FONT_GLYPH_FORMAT_CUSTOM = 0xFF, +} lv_font_glyph_format_t; +typedef struct { + const lv_font_t * resolved_font; + void * entry; + union { + uint32_t index; + const void * src; + } gid; + lv_font_glyph_format_t format; + int32_t outline_stroke_width; + uint16_t adv_w; + uint16_t box_w; + uint16_t box_h; + int16_t ofs_x; + int16_t ofs_y; + uint16_t stride; + uint8_t is_placeholder: 1; + uint8_t req_raw_bitmap: 1; +} lv_font_glyph_dsc_t; typedef enum { - LV_DISPLAY_RENDER_MODE_PARTIAL, - LV_DISPLAY_RENDER_MODE_DIRECT, - LV_DISPLAY_RENDER_MODE_FULL, -} lv_display_render_mode_t; + LV_FONT_SUBPX_NONE, + LV_FONT_SUBPX_HOR, + LV_FONT_SUBPX_VER, + LV_FONT_SUBPX_BOTH, +} lv_font_subpx_t; typedef enum { - LV_SCREEN_LOAD_ANIM_NONE, - LV_SCREEN_LOAD_ANIM_OVER_LEFT, - LV_SCREEN_LOAD_ANIM_OVER_RIGHT, - LV_SCREEN_LOAD_ANIM_OVER_TOP, - LV_SCREEN_LOAD_ANIM_OVER_BOTTOM, - LV_SCREEN_LOAD_ANIM_MOVE_LEFT, - LV_SCREEN_LOAD_ANIM_MOVE_RIGHT, - LV_SCREEN_LOAD_ANIM_MOVE_TOP, - LV_SCREEN_LOAD_ANIM_MOVE_BOTTOM, - LV_SCREEN_LOAD_ANIM_FADE_IN, - LV_SCREEN_LOAD_ANIM_FADE_ON = LV_SCREEN_LOAD_ANIM_FADE_IN, - LV_SCREEN_LOAD_ANIM_FADE_OUT, - LV_SCREEN_LOAD_ANIM_OUT_LEFT, - LV_SCREEN_LOAD_ANIM_OUT_RIGHT, - LV_SCREEN_LOAD_ANIM_OUT_TOP, - LV_SCREEN_LOAD_ANIM_OUT_BOTTOM, -} lv_screen_load_anim_t; -typedef void (*lv_display_flush_cb_t)(lv_display_t * disp, const lv_area_t * area, uint8_t * px_map); -typedef void (*lv_display_flush_wait_cb_t)(lv_display_t * disp); -lv_display_t * lv_display_create(int32_t hor_res, int32_t ver_res); -void lv_display_delete(lv_display_t * disp); -void lv_display_set_default(lv_display_t * disp); -lv_display_t * lv_display_get_default(void); -lv_display_t * lv_display_get_next(lv_display_t * disp); -void lv_display_set_resolution(lv_display_t * disp, int32_t hor_res, int32_t ver_res); -void lv_display_set_physical_resolution(lv_display_t * disp, int32_t hor_res, int32_t ver_res); -void lv_display_set_offset(lv_display_t * disp, int32_t x, int32_t y); -void lv_display_set_rotation(lv_display_t * disp, lv_display_rotation_t rotation); -void lv_display_set_matrix_rotation(lv_display_t * disp, bool enable); -void lv_display_set_dpi(lv_display_t * disp, int32_t dpi); -int32_t lv_display_get_horizontal_resolution(const lv_display_t * disp); -int32_t lv_display_get_vertical_resolution(const lv_display_t * disp); -int32_t lv_display_get_original_horizontal_resolution(const lv_display_t * disp); -int32_t lv_display_get_original_vertical_resolution(const lv_display_t * disp); -int32_t lv_display_get_physical_horizontal_resolution(const lv_display_t * disp); -int32_t lv_display_get_physical_vertical_resolution(const lv_display_t * disp); -int32_t lv_display_get_offset_x(const lv_display_t * disp); -int32_t lv_display_get_offset_y(const lv_display_t * disp); -lv_display_rotation_t lv_display_get_rotation(lv_display_t * disp); -bool lv_display_get_matrix_rotation(lv_display_t * disp); -int32_t lv_display_get_dpi(const lv_display_t * disp); -void lv_display_set_buffers(lv_display_t * disp, void * buf1, void * buf2, uint32_t buf_size, - lv_display_render_mode_t render_mode); -void lv_display_set_buffers_with_stride(lv_display_t * disp, void * buf1, void * buf2, uint32_t buf_size, - uint32_t stride, lv_display_render_mode_t render_mode); -void lv_display_set_draw_buffers(lv_display_t * disp, lv_draw_buf_t * buf1, lv_draw_buf_t * buf2); -void lv_display_set_3rd_draw_buffer(lv_display_t * disp, lv_draw_buf_t * buf3); -void lv_display_set_render_mode(lv_display_t * disp, lv_display_render_mode_t render_mode); -void lv_display_set_flush_cb(lv_display_t * disp, lv_display_flush_cb_t flush_cb); -void lv_display_set_flush_wait_cb(lv_display_t * disp, lv_display_flush_wait_cb_t wait_cb); -void lv_display_set_color_format(lv_display_t * disp, lv_color_format_t color_format); -lv_color_format_t lv_display_get_color_format(lv_display_t * disp); -void lv_display_set_tile_cnt(lv_display_t * disp, uint32_t tile_cnt); -uint32_t lv_display_get_tile_cnt(lv_display_t * disp); -void lv_display_set_antialiasing(lv_display_t * disp, bool en); -bool lv_display_get_antialiasing(lv_display_t * disp); - void lv_display_flush_ready(lv_display_t * disp); - bool lv_display_flush_is_last(lv_display_t * disp); -bool lv_display_is_double_buffered(lv_display_t * disp); -lv_display_render_mode_t lv_display_get_render_mode(lv_display_t * disp); -lv_obj_t * lv_display_get_screen_active(lv_display_t * disp); -lv_obj_t * lv_display_get_screen_prev(lv_display_t * disp); -lv_obj_t * lv_display_get_screen_loading(lv_display_t * disp); -lv_obj_t * lv_display_get_layer_top(lv_display_t * disp); -lv_obj_t * lv_display_get_layer_sys(lv_display_t * disp); -lv_obj_t * lv_display_get_layer_bottom(lv_display_t * disp); -void lv_screen_load(struct _lv_obj_t * scr); -void lv_screen_load_anim(lv_obj_t * scr, lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay, - bool auto_del); -lv_obj_t * lv_screen_active(void); -lv_obj_t * lv_layer_top(void); -lv_obj_t * lv_layer_sys(void); -lv_obj_t * lv_layer_bottom(void); -void lv_display_add_event_cb(lv_display_t * disp, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data); -uint32_t lv_display_get_event_count(lv_display_t * disp); -lv_event_dsc_t * lv_display_get_event_dsc(lv_display_t * disp, uint32_t index); -bool lv_display_delete_event(lv_display_t * disp, uint32_t index); -uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t * disp, lv_event_cb_t event_cb, void * user_data); -lv_result_t lv_display_send_event(lv_display_t * disp, lv_event_code_t code, void * param); -lv_area_t * lv_event_get_invalidated_area(lv_event_t * e); -void lv_display_set_theme(lv_display_t * disp, lv_theme_t * th); -lv_theme_t * lv_display_get_theme(lv_display_t * disp); -uint32_t lv_display_get_inactive_time(const lv_display_t * disp); -void lv_display_trigger_activity(lv_display_t * disp); -void lv_display_enable_invalidation(lv_display_t * disp, bool en); -bool lv_display_is_invalidation_enabled(lv_display_t * disp); -lv_timer_t * lv_display_get_refr_timer(lv_display_t * disp); -void lv_display_delete_refr_timer(lv_display_t * disp); -bool lv_display_register_vsync_event(lv_display_t * disp, lv_event_cb_t event_cb, void * user_data); -bool lv_display_unregister_vsync_event(lv_display_t * disp, lv_event_cb_t event_cb, void * user_data); -lv_result_t lv_display_send_vsync_event(lv_display_t * disp, void * param); -void lv_display_set_user_data(lv_display_t * disp, void * user_data); -void lv_display_set_driver_data(lv_display_t * disp, void * driver_data); -void * lv_display_get_user_data(lv_display_t * disp); -void * lv_display_get_driver_data(lv_display_t * disp); -lv_draw_buf_t * lv_display_get_buf_active(lv_display_t * disp); -void lv_display_rotate_area(lv_display_t * disp, lv_area_t * area); -void lv_display_rotate_point(lv_display_t * disp, lv_point_t * point); -uint32_t lv_display_get_draw_buf_size(lv_display_t * disp); -uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t * disp, uint32_t width, uint32_t height); -int32_t lv_dpx(int32_t n); -int32_t lv_display_dpx(const lv_display_t * disp, int32_t n); + LV_FONT_KERNING_NORMAL, + LV_FONT_KERNING_NONE, +} lv_font_kerning_t; +struct _lv_font_t { + const void * dsc; + const lv_font_t * fallback; + void * user_data; + bool (*get_glyph_dsc)(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, + uint32_t letter, uint32_t letter_next); + const void * (*get_glyph_bitmap)(lv_font_glyph_dsc_t * g_dsc, lv_draw_buf_t * draw_buf); + void (*release_glyph)(const lv_font_t * font, lv_font_glyph_dsc_t * g_dsc); + int32_t line_height; + int32_t base_line; + int32_t cap_height; + int32_t x_height; + uint8_t subpx : 2; + uint8_t kerning : 1; + uint8_t static_bitmap : 1; + int8_t underline_position; + int8_t underline_thickness; +}; +struct _lv_font_class_t { + lv_font_t * (*create_cb)(const lv_font_info_t * info, const void * src); + void (*delete_cb)(lv_font_t * font); + void * (*dup_src_cb)(const void * src); + void (*free_src_cb)(void * src); +}; +struct _lv_font_info_t { + const char * name; + const lv_font_class_t * class_p; + uint32_t size; + uint32_t render_mode; + uint32_t style; + int32_t weight; + lv_font_kerning_t kerning; +}; +const void * lv_font_get_glyph_bitmap(lv_font_glyph_dsc_t * g_dsc, lv_draw_buf_t * draw_buf); +const void * lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t * g_dsc); +bool lv_font_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t letter, + uint32_t letter_next); +void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t * g_dsc); +uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next); +int32_t lv_font_get_line_height(const lv_font_t * font); +void lv_font_set_kerning(lv_font_t * font, lv_font_kerning_t kerning); +const lv_font_t * lv_font_get_default(void); +bool lv_font_info_is_equal(const lv_font_info_t * ft_info_1, const lv_font_info_t * ft_info_2); +bool lv_font_has_static_bitmap(const lv_font_t * font); + extern const lv_font_t lv_font_montserrat_14; + extern const lv_font_t lv_font_montserrat_16; + extern const lv_font_t lv_font_montserrat_24; + extern const lv_font_t lv_font_montserrat_32; + extern const lv_font_t lv_font_montserrat_40; + +int lv_snprintf(char * buffer, size_t count, const char * format, ...); +int lv_vsnprintf(char * buffer, size_t count, const char * format, va_list va); typedef enum { - LV_OBJ_TREE_WALK_NEXT, - LV_OBJ_TREE_WALK_SKIP_CHILDREN, - LV_OBJ_TREE_WALK_END, -} lv_obj_tree_walk_res_t; -typedef lv_obj_tree_walk_res_t (*lv_obj_tree_walk_cb_t)(lv_obj_t *, void *); -void lv_obj_delete(lv_obj_t * obj); -void lv_obj_clean(lv_obj_t * obj); -void lv_obj_delete_delayed(lv_obj_t * obj, uint32_t delay_ms); -void lv_obj_delete_anim_completed_cb(lv_anim_t * a); -void lv_obj_delete_async(lv_obj_t * obj); -void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent); -void lv_obj_swap(lv_obj_t * obj1, lv_obj_t * obj2); -void lv_obj_move_to_index(lv_obj_t * obj, int32_t index); -lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj); -lv_display_t * lv_obj_get_display(const lv_obj_t * obj); -lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj); -lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, int32_t idx); -lv_obj_t * lv_obj_get_child_by_type(const lv_obj_t * obj, int32_t idx, - const lv_obj_class_t * class_p); -lv_obj_t * lv_obj_get_sibling(const lv_obj_t * obj, int32_t idx); -lv_obj_t * lv_obj_get_sibling_by_type(const lv_obj_t * obj, int32_t idx, - const lv_obj_class_t * class_p); -uint32_t lv_obj_get_child_count(const lv_obj_t * obj); -uint32_t lv_obj_get_child_count_by_type(const lv_obj_t * obj, const lv_obj_class_t * class_p); -int32_t lv_obj_get_index(const lv_obj_t * obj); -int32_t lv_obj_get_index_by_type(const lv_obj_t * obj, const lv_obj_class_t * class_p); -void lv_obj_tree_walk(lv_obj_t * start_obj, lv_obj_tree_walk_cb_t cb, void * user_data); -void lv_obj_dump_tree(lv_obj_t * start_obj); + LV_TEXT_FLAG_NONE = 0x00, + LV_TEXT_FLAG_EXPAND = 0x01, + LV_TEXT_FLAG_FIT = 0x02, + LV_TEXT_FLAG_BREAK_ALL = 0x04, + LV_TEXT_FLAG_RECOLOR = 0x08, +} lv_text_flag_t; typedef enum { - LV_OBJ_POINT_TRANSFORM_FLAG_NONE = 0x00, - LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE = 0x01, - LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE = 0x02, - LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE_RECURSIVE = 0x03, -} lv_obj_point_transform_flag_t; -void lv_obj_set_pos(lv_obj_t * obj, int32_t x, int32_t y); -void lv_obj_set_x(lv_obj_t * obj, int32_t x); -void lv_obj_set_y(lv_obj_t * obj, int32_t y); -void lv_obj_set_size(lv_obj_t * obj, int32_t w, int32_t h); -bool lv_obj_refr_size(lv_obj_t * obj); -void lv_obj_set_width(lv_obj_t * obj, int32_t w); -void lv_obj_set_height(lv_obj_t * obj, int32_t h); -void lv_obj_set_content_width(lv_obj_t * obj, int32_t w); -void lv_obj_set_content_height(lv_obj_t * obj, int32_t h); -void lv_obj_set_layout(lv_obj_t * obj, uint32_t layout); -bool lv_obj_is_layout_positioned(const lv_obj_t * obj); -void lv_obj_mark_layout_as_dirty(lv_obj_t * obj); -void lv_obj_update_layout(const lv_obj_t * obj); -void lv_obj_set_align(lv_obj_t * obj, lv_align_t align); -void lv_obj_align(lv_obj_t * obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs); -void lv_obj_align_to(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, int32_t x_ofs, - int32_t y_ofs); -void lv_obj_center(lv_obj_t * obj); -void lv_obj_set_transform(lv_obj_t * obj, const lv_matrix_t * matrix); -void lv_obj_reset_transform(lv_obj_t * obj); -void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * coords); -int32_t lv_obj_get_x(const lv_obj_t * obj); -int32_t lv_obj_get_x2(const lv_obj_t * obj); -int32_t lv_obj_get_y(const lv_obj_t * obj); -int32_t lv_obj_get_y2(const lv_obj_t * obj); -int32_t lv_obj_get_x_aligned(const lv_obj_t * obj); -int32_t lv_obj_get_y_aligned(const lv_obj_t * obj); -int32_t lv_obj_get_width(const lv_obj_t * obj); -int32_t lv_obj_get_height(const lv_obj_t * obj); -int32_t lv_obj_get_content_width(const lv_obj_t * obj); -int32_t lv_obj_get_content_height(const lv_obj_t * obj); -void lv_obj_get_content_coords(const lv_obj_t * obj, lv_area_t * area); -int32_t lv_obj_get_self_width(const lv_obj_t * obj); -int32_t lv_obj_get_self_height(const lv_obj_t * obj); -int32_t lv_obj_get_style_clamped_width(lv_obj_t * obj); -int32_t lv_obj_get_style_clamped_height(lv_obj_t * obj); -bool lv_obj_is_width_min(lv_obj_t * obj); -bool lv_obj_is_height_min(lv_obj_t * obj); -bool lv_obj_is_width_max(lv_obj_t * obj); -bool lv_obj_is_height_max(lv_obj_t * obj); -bool lv_obj_refresh_self_size(lv_obj_t * obj); -void lv_obj_refr_pos(lv_obj_t * obj); -void lv_obj_move_to(lv_obj_t * obj, int32_t x, int32_t y); -void lv_obj_move_children_by(lv_obj_t * obj, int32_t x_diff, int32_t y_diff, bool ignore_floating); -const lv_matrix_t * lv_obj_get_transform(const lv_obj_t * obj); -void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, lv_obj_point_transform_flag_t flags); -void lv_obj_transform_point_array(const lv_obj_t * obj, lv_point_t points[], size_t count, - lv_obj_point_transform_flag_t flags); -void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, lv_obj_point_transform_flag_t flags); -lv_result_t lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area); -lv_result_t lv_obj_invalidate(const lv_obj_t * obj); -bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area); -bool lv_obj_is_visible(const lv_obj_t * obj); -void lv_obj_set_ext_click_area(lv_obj_t * obj, int32_t size); -void lv_obj_get_click_area(const lv_obj_t * obj, lv_area_t * area); -bool lv_obj_hit_test(lv_obj_t * obj, const lv_point_t * point); -int32_t lv_clamp_width(int32_t width, int32_t min_width, int32_t max_width, int32_t ref_width); -int32_t lv_clamp_height(int32_t height, int32_t min_height, int32_t max_height, int32_t ref_height); -int32_t lv_obj_calc_dynamic_width(lv_obj_t * obj, lv_style_prop_t prop); -int32_t lv_obj_calc_dynamic_height(lv_obj_t * obj, lv_style_prop_t prop); + LV_TEXT_ALIGN_AUTO, + LV_TEXT_ALIGN_LEFT, + LV_TEXT_ALIGN_CENTER, + LV_TEXT_ALIGN_RIGHT, +} lv_text_align_t; typedef enum { - LV_SCROLLBAR_MODE_OFF, - LV_SCROLLBAR_MODE_ON, - LV_SCROLLBAR_MODE_ACTIVE, - LV_SCROLLBAR_MODE_AUTO, -} lv_scrollbar_mode_t; + LV_TEXT_LEADING_TRIM_NONE = 0, + LV_TEXT_LEADING_TRIM_CAPITAL_BASELINE, + LV_TEXT_LEADING_TRIM_LOWER_BASELINE, + LV_TEXT_LEADING_TRIM_CAPITAL, + LV_TEXT_LEADING_TRIM_LOWER, +} lv_text_leading_trim_t; +int32_t lv_font_get_top_trim(const lv_font_t * font, lv_text_leading_trim_t trim); +int32_t lv_font_get_bottom_trim(const lv_font_t * font, lv_text_leading_trim_t trim); +void lv_text_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, int32_t letter_space, + int32_t line_space, int32_t max_width, lv_text_flag_t flag); typedef enum { - LV_SCROLL_SNAP_NONE, - LV_SCROLL_SNAP_START, - LV_SCROLL_SNAP_END, - LV_SCROLL_SNAP_CENTER -} lv_scroll_snap_t; -void lv_obj_set_scrollbar_mode(lv_obj_t * obj, lv_scrollbar_mode_t mode); -void lv_obj_set_scroll_dir(lv_obj_t * obj, lv_dir_t dir); -void lv_obj_set_scroll_snap_x(lv_obj_t * obj, lv_scroll_snap_t align); -void lv_obj_set_scroll_snap_y(lv_obj_t * obj, lv_scroll_snap_t align); -lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t * obj); -lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t * obj); -lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t * obj); -lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t * obj); -int32_t lv_obj_get_scroll_x(const lv_obj_t * obj); -int32_t lv_obj_get_scroll_y(const lv_obj_t * obj); -int32_t lv_obj_get_scroll_top(const lv_obj_t * obj); -int32_t lv_obj_get_scroll_bottom(const lv_obj_t * obj); -int32_t lv_obj_get_scroll_left(const lv_obj_t * obj); -int32_t lv_obj_get_scroll_right(const lv_obj_t * obj); -void lv_obj_get_scroll_end(lv_obj_t * obj, lv_point_t * end); -void lv_obj_scroll_by(lv_obj_t * obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en); -void lv_obj_scroll_by_bounded(lv_obj_t * obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en); -void lv_obj_scroll_to(lv_obj_t * obj, int32_t x, int32_t y, lv_anim_enable_t anim_en); -void lv_obj_scroll_to_x(lv_obj_t * obj, int32_t x, lv_anim_enable_t anim_en); -void lv_obj_scroll_to_y(lv_obj_t * obj, int32_t y, lv_anim_enable_t anim_en); -void lv_obj_scroll_to_view(lv_obj_t * obj, lv_anim_enable_t anim_en); -void lv_obj_scroll_to_view_recursive(lv_obj_t * obj, lv_anim_enable_t anim_en); -bool lv_obj_is_scrolling(const lv_obj_t * obj); -void lv_obj_stop_scroll_anim(const lv_obj_t * obj); -void lv_obj_update_snap(lv_obj_t * obj, lv_anim_enable_t anim_en); -void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor, lv_area_t * ver); -void lv_obj_scrollbar_invalidate(lv_obj_t * obj); -void lv_obj_readjust_scroll(lv_obj_t * obj, lv_anim_enable_t anim_en); + LV_BASE_DIR_LTR = 0x00, + LV_BASE_DIR_RTL = 0x01, + LV_BASE_DIR_AUTO = 0x02, + LV_BASE_DIR_NEUTRAL = 0x20, + LV_BASE_DIR_WEAK = 0x21, +} lv_base_dir_t; +void lv_bidi_calculate_align(lv_text_align_t * align, lv_base_dir_t * base_dir, const char * txt); typedef enum { - LV_STATE_DEFAULT = 0, - LV_STATE_ALT = 1 << 0, - LV_STATE_CHECKED = 1 << 2, - LV_STATE_FOCUSED = 1 << 3, - LV_STATE_FOCUS_KEY = 1 << 4, - LV_STATE_EDITED = 1 << 5, - LV_STATE_HOVERED = 1 << 6, - LV_STATE_PRESSED = 1 << 7, - LV_STATE_SCROLLED = 1 << 8, - LV_STATE_DISABLED = 1 << 9, - LV_STATE_USER_1 = 1 << 12, - LV_STATE_USER_2 = 1 << 13, - LV_STATE_USER_3 = 1 << 14, - LV_STATE_USER_4 = 1 << 15, - LV_STATE_ANY = 0xFFFF, -} lv_state_t; + LV_GRAD_DIR_NONE, + LV_GRAD_DIR_VER, + LV_GRAD_DIR_HOR, + LV_GRAD_DIR_LINEAR, + LV_GRAD_DIR_RADIAL, + LV_GRAD_DIR_CONICAL, +} lv_grad_dir_t; typedef enum { - LV_PART_MAIN = 0x000000, - LV_PART_SCROLLBAR = 0x010000, - LV_PART_INDICATOR = 0x020000, - LV_PART_KNOB = 0x030000, - LV_PART_SELECTED = 0x040000, - LV_PART_ITEMS = 0x050000, - LV_PART_CURSOR = 0x060000, - LV_PART_CUSTOM_FIRST = 0x080000, - LV_PART_ANY = 0x0F0000, -} lv_part_t; + LV_GRAD_EXTEND_PAD, + LV_GRAD_EXTEND_REPEAT, + LV_GRAD_EXTEND_REFLECT, +} lv_grad_extend_t; +typedef struct { + lv_color_t color; + lv_opa_t opa; + uint8_t frac; +} lv_grad_stop_t; +typedef struct { + lv_grad_stop_t stops[2]; + uint8_t stops_count; + lv_grad_dir_t dir : 4; + lv_grad_extend_t extend : 3; + union { + struct { + lv_point_t start; + lv_point_t end; + } linear; + struct { + lv_point_t focal; + lv_point_t focal_extent; + lv_point_t end; + lv_point_t end_extent; + } radial; + struct { + lv_point_t center; + int16_t start_angle; + int16_t end_angle; + } conical; + } params; + void * state; +} lv_grad_dsc_t; +void lv_grad_init_stops(lv_grad_dsc_t * grad, const lv_color_t colors[], const lv_opa_t opa[], + const uint8_t fracs[], int num_stops); +void lv_grad_horizontal_init(lv_grad_dsc_t * dsc); +void lv_grad_vertical_init(lv_grad_dsc_t * dsc); +void lv_grad_linear_init(lv_grad_dsc_t * dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, + lv_grad_extend_t extend); +void lv_grad_radial_init(lv_grad_dsc_t * dsc, int32_t center_x, int32_t center_y, int32_t to_x, int32_t to_y, + lv_grad_extend_t extend); +void lv_grad_radial_set_focal(lv_grad_dsc_t * dsc, int32_t center_x, int32_t center_y, int32_t radius); +void lv_grad_conical_init(lv_grad_dsc_t * dsc, int32_t center_x, int32_t center_y, int32_t start_angle, + int32_t end_angle, lv_grad_extend_t extend); +typedef void (*lv_layout_update_cb_t)(lv_obj_t *, void * user_data); +typedef bool (*lv_layout_get_min_size_cb_t)(lv_obj_t *, int32_t * req_size, bool width, void * user_data); +typedef struct { + lv_layout_update_cb_t layout_update_cb; + lv_layout_get_min_size_cb_t get_min_size_cb; +} lv_layout_callbacks_t; typedef enum { - LV_STYLE_STATE_CMP_SAME, - LV_STYLE_STATE_CMP_DIFF_REDRAW, - LV_STYLE_STATE_CMP_DIFF_DRAW_PAD, - LV_STYLE_STATE_CMP_DIFF_LAYOUT, -} lv_style_state_cmp_t; -typedef uint32_t lv_style_selector_t; -void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); -bool lv_obj_replace_style(lv_obj_t * obj, const lv_style_t * old_style, const lv_style_t * new_style, - lv_style_selector_t selector); -void lv_obj_remove_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); -void lv_obj_remove_theme(lv_obj_t * obj, lv_style_selector_t selector); -void lv_obj_remove_style_all(lv_obj_t * obj); -void lv_obj_report_style_change(lv_style_t * style); -void lv_obj_refresh_style(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop); -void lv_obj_style_set_disabled(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector, bool dis); -bool lv_obj_style_get_disabled(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); -void lv_obj_enable_style_refresh(bool en); -lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop); -bool lv_obj_has_style_prop(const lv_obj_t * obj, lv_style_selector_t selector, lv_style_prop_t prop); -void lv_obj_set_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t value, - lv_style_selector_t selector); -lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value, - lv_style_selector_t selector); -bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_selector_t selector); -lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t * obj, lv_part_t part, lv_style_value_t v); -void lv_obj_fade_in(lv_obj_t * obj, uint32_t time, uint32_t delay); -void lv_obj_fade_out(lv_obj_t * obj, uint32_t time, uint32_t delay); -static inline lv_state_t lv_obj_style_get_selector_state(lv_style_selector_t selector) -{ - return (lv_state_t)(selector & 0xFFFF); -} -static inline lv_part_t lv_obj_style_get_selector_part(lv_style_selector_t selector) -{ - return (lv_part_t)(selector & 0xFF0000); -} -static inline int32_t lv_obj_get_style_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_WIDTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_min_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MIN_WIDTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_max_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MAX_WIDTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_height(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_HEIGHT); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_min_height(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MIN_HEIGHT); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_max_height(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MAX_HEIGHT); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_length(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LENGTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_x(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_X); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_y(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_Y); - return (int32_t)v.num; -} -static inline lv_align_t lv_obj_get_style_align(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ALIGN); - return (lv_align_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_WIDTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_height(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_HEIGHT); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_translate_x(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSLATE_X); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_translate_y(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSLATE_Y); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_translate_radial(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSLATE_RADIAL); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_scale_x(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_SCALE_X); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_scale_y(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_SCALE_Y); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_rotation(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_ROTATION); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_pivot_x(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_PIVOT_X); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_pivot_y(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_PIVOT_Y); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_skew_x(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_SKEW_X); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_transform_skew_y(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSFORM_SKEW_Y); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_pad_top(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_TOP); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_pad_bottom(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_BOTTOM); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_pad_left(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_LEFT); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_pad_right(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_RIGHT); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_pad_row(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_ROW); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_pad_column(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_COLUMN); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_pad_radial(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_PAD_RADIAL); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_margin_top(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MARGIN_TOP); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_margin_bottom(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MARGIN_BOTTOM); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_margin_left(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MARGIN_LEFT); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_margin_right(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_MARGIN_RIGHT); - return (int32_t)v.num; -} -static inline lv_color_t lv_obj_get_style_bg_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_bg_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_OPA); - return (lv_opa_t)v.num; -} -static inline lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR)); - return v.color; -} -static inline lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_DIR); - return (lv_grad_dir_t)v.num; -} -static inline int32_t lv_obj_get_style_bg_main_stop(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_MAIN_STOP); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_bg_grad_stop(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_STOP); - return (int32_t)v.num; -} -static inline lv_opa_t lv_obj_get_style_bg_main_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_MAIN_OPA); - return (lv_opa_t)v.num; -} -static inline lv_opa_t lv_obj_get_style_bg_grad_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_OPA); - return (lv_opa_t)v.num; -} -static inline const lv_grad_dsc_t * lv_obj_get_style_bg_grad(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD); - return (const lv_grad_dsc_t *)v.ptr; -} -static inline const void * lv_obj_get_style_bg_image_src(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_SRC); - return (const void *)v.ptr; -} -static inline lv_opa_t lv_obj_get_style_bg_image_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_OPA); - return (lv_opa_t)v.num; -} -static inline lv_color_t lv_obj_get_style_bg_image_recolor(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_bg_image_recolor_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR_OPA); - return (lv_opa_t)v.num; -} -static inline bool lv_obj_get_style_bg_image_tiled(const lv_obj_t * obj, lv_part_t part) + LV_LAYOUT_NONE = 0, + LV_LAYOUT_FLEX, + LV_LAYOUT_GRID, + LV_LAYOUT_LAST +} lv_layout_t; +uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void * user_data); + +uint32_t lv_layout_register(lv_layout_update_cb_t cb, void * user_data); +typedef enum { + LV_FLEX_ALIGN_START, + LV_FLEX_ALIGN_END, + LV_FLEX_ALIGN_CENTER, + LV_FLEX_ALIGN_SPACE_EVENLY, + LV_FLEX_ALIGN_SPACE_AROUND, + LV_FLEX_ALIGN_SPACE_BETWEEN, +} lv_flex_align_t; +typedef enum { + LV_FLEX_FLOW_ROW = 0x00, + LV_FLEX_FLOW_COLUMN = (1 << 0), + LV_FLEX_FLOW_ROW_WRAP = LV_FLEX_FLOW_ROW | (1 << 2), + LV_FLEX_FLOW_ROW_REVERSE = LV_FLEX_FLOW_ROW | (1 << 3), + LV_FLEX_FLOW_ROW_WRAP_REVERSE = LV_FLEX_FLOW_ROW | (1 << 2) | (1 << 3), + LV_FLEX_FLOW_COLUMN_WRAP = LV_FLEX_FLOW_COLUMN | (1 << 2), + LV_FLEX_FLOW_COLUMN_REVERSE = LV_FLEX_FLOW_COLUMN | (1 << 3), + LV_FLEX_FLOW_COLUMN_WRAP_REVERSE = LV_FLEX_FLOW_COLUMN | (1 << 2) | (1 << 3), +} lv_flex_flow_t; +void lv_flex_init(void); +void lv_obj_set_flex_flow(lv_obj_t * obj, lv_flex_flow_t flow); +void lv_obj_set_flex_align(lv_obj_t * obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, + lv_flex_align_t track_cross_place); +void lv_obj_set_flex_grow(lv_obj_t * obj, uint8_t grow); +enum {ENUM_LV_GRID_CONTENT = (((1 << (29U)) - 1) - 101)}; +enum {ENUM_LV_GRID_TEMPLATE_LAST = (((1 << (29U)) - 1))}; +typedef enum { + LV_GRID_ALIGN_START, + LV_GRID_ALIGN_CENTER, + LV_GRID_ALIGN_END, + LV_GRID_ALIGN_STRETCH, + LV_GRID_ALIGN_SPACE_EVENLY, + LV_GRID_ALIGN_SPACE_AROUND, + LV_GRID_ALIGN_SPACE_BETWEEN, +} lv_grid_align_t; +void lv_grid_init(void); +void lv_obj_set_grid_dsc_array(lv_obj_t * obj, const int32_t col_dsc[], const int32_t row_dsc[]); +void lv_obj_set_grid_align(lv_obj_t * obj, lv_grid_align_t column_align, lv_grid_align_t row_align); +void lv_obj_set_grid_cell(lv_obj_t * obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, + lv_grid_align_t row_align, int32_t row_pos, int32_t row_span); +int32_t lv_grid_fr(uint8_t x); +enum {ENUM_LV_SCALE_NONE = 256}; +typedef enum { + LV_BLEND_MODE_NORMAL, + LV_BLEND_MODE_ADDITIVE, + LV_BLEND_MODE_SUBTRACTIVE, + LV_BLEND_MODE_MULTIPLY, + LV_BLEND_MODE_DIFFERENCE, +} lv_blend_mode_t; +typedef enum { + LV_TEXT_DECOR_NONE = 0x00, + LV_TEXT_DECOR_UNDERLINE = 0x01, + LV_TEXT_DECOR_STRIKETHROUGH = 0x02, +} lv_text_decor_t; +typedef enum { + LV_BORDER_SIDE_NONE = 0x00, + LV_BORDER_SIDE_BOTTOM = 0x01, + LV_BORDER_SIDE_TOP = 0x02, + LV_BORDER_SIDE_LEFT = 0x04, + LV_BORDER_SIDE_RIGHT = 0x08, + LV_BORDER_SIDE_FULL = 0x0F, + LV_BORDER_SIDE_INTERNAL = 0x10, +} lv_border_side_t; +typedef enum { + LV_BLUR_QUALITY_AUTO = 0, + LV_BLUR_QUALITY_SPEED, + LV_BLUR_QUALITY_PRECISION, +} lv_blur_quality_t; +typedef struct { + lv_color_t low; + lv_color_t high; +} lv_image_colorkey_t; +typedef union { + int32_t num; + const void * ptr; + lv_color_t color; +} lv_style_value_t; +enum _lv_style_id_t { + LV_STYLE_PROP_INV = 0, + LV_STYLE_WIDTH = 1, + LV_STYLE_HEIGHT, + LV_STYLE_LENGTH, + LV_STYLE_TRANSFORM_WIDTH, + LV_STYLE_TRANSFORM_HEIGHT, + LV_STYLE_MIN_WIDTH = 8, + LV_STYLE_MAX_WIDTH, + LV_STYLE_MIN_HEIGHT, + LV_STYLE_MAX_HEIGHT, + LV_STYLE_TRANSLATE_X, + LV_STYLE_TRANSLATE_Y, + LV_STYLE_RADIAL_OFFSET, + LV_STYLE_X = 16, + LV_STYLE_Y, + LV_STYLE_ALIGN, + LV_STYLE_PAD_TOP = 24, + LV_STYLE_PAD_BOTTOM, + LV_STYLE_PAD_LEFT, + LV_STYLE_PAD_RIGHT, + LV_STYLE_PAD_RADIAL, + LV_STYLE_PAD_ROW, + LV_STYLE_PAD_COLUMN, + LV_STYLE_MARGIN_TOP = 32, + LV_STYLE_MARGIN_BOTTOM, + LV_STYLE_MARGIN_LEFT, + LV_STYLE_MARGIN_RIGHT, + LV_STYLE_BG_GRAD = 40, + LV_STYLE_BG_GRAD_DIR, + LV_STYLE_BG_MAIN_OPA, + LV_STYLE_BG_GRAD_OPA, + LV_STYLE_BG_GRAD_COLOR, + LV_STYLE_BG_MAIN_STOP, + LV_STYLE_BG_GRAD_STOP, + LV_STYLE_BG_IMAGE_SRC = 48, + LV_STYLE_BG_IMAGE_OPA, + LV_STYLE_BG_IMAGE_RECOLOR_OPA, + LV_STYLE_BG_IMAGE_TILED, + LV_STYLE_BG_IMAGE_RECOLOR, + LV_STYLE_BORDER_WIDTH = 56, + LV_STYLE_BORDER_COLOR, + LV_STYLE_BORDER_OPA, + LV_STYLE_BORDER_POST, + LV_STYLE_BORDER_SIDE, + LV_STYLE_OUTLINE_WIDTH = 64, + LV_STYLE_OUTLINE_COLOR, + LV_STYLE_OUTLINE_OPA, + LV_STYLE_OUTLINE_PAD, + LV_STYLE_BG_OPA = 72, + LV_STYLE_BG_COLOR, + LV_STYLE_SHADOW_WIDTH, + LV_STYLE_LINE_WIDTH, + LV_STYLE_ARC_WIDTH, + LV_STYLE_TEXT_FONT, + LV_STYLE_IMAGE_RECOLOR_OPA, + LV_STYLE_IMAGE_OPA = 80, + LV_STYLE_SHADOW_OPA, + LV_STYLE_LINE_OPA, + LV_STYLE_ARC_OPA, + LV_STYLE_TEXT_OPA, + LV_STYLE_SHADOW_COLOR = 88, + LV_STYLE_IMAGE_RECOLOR, + LV_STYLE_LINE_COLOR, + LV_STYLE_ARC_COLOR, + LV_STYLE_TEXT_COLOR, + LV_STYLE_ARC_IMAGE_SRC = 96, + LV_STYLE_SHADOW_OFFSET_X, + LV_STYLE_SHADOW_OFFSET_Y, + LV_STYLE_SHADOW_SPREAD, + LV_STYLE_LINE_DASH_WIDTH, + LV_STYLE_TEXT_ALIGN, + LV_STYLE_TEXT_LETTER_SPACE, + LV_STYLE_TEXT_LINE_SPACE, + LV_STYLE_LINE_DASH_GAP = 104, + LV_STYLE_LINE_ROUNDED, + LV_STYLE_IMAGE_COLORKEY, + LV_STYLE_TEXT_OUTLINE_STROKE_WIDTH, + LV_STYLE_TEXT_OUTLINE_STROKE_OPA, + LV_STYLE_TEXT_OUTLINE_STROKE_COLOR, + LV_STYLE_TEXT_DECOR, + LV_STYLE_ARC_ROUNDED, + LV_STYLE_OPA = 112, + LV_STYLE_OPA_LAYERED, + LV_STYLE_COLOR_FILTER_DSC, + LV_STYLE_COLOR_FILTER_OPA, + LV_STYLE_ANIM, + LV_STYLE_ANIM_DURATION, + LV_STYLE_TRANSITION, + LV_STYLE_RADIUS = 120, + LV_STYLE_BITMAP_MASK_SRC, + LV_STYLE_BLEND_MODE, + LV_STYLE_ROTARY_SENSITIVITY, + LV_STYLE_TRANSLATE_RADIAL, + LV_STYLE_CLIP_CORNER = 128, + LV_STYLE_BASE_DIR, + LV_STYLE_RECOLOR, + LV_STYLE_RECOLOR_OPA, + LV_STYLE_LAYOUT, + LV_STYLE_BLUR_RADIUS = 136, + LV_STYLE_BLUR_BACKDROP, + LV_STYLE_BLUR_QUALITY, + LV_STYLE_DROP_SHADOW_RADIUS = 144, + LV_STYLE_DROP_SHADOW_OFFSET_X, + LV_STYLE_DROP_SHADOW_OFFSET_Y, + LV_STYLE_DROP_SHADOW_COLOR, + LV_STYLE_DROP_SHADOW_OPA, + LV_STYLE_DROP_SHADOW_QUALITY, + LV_STYLE_TRANSFORM_SCALE_X = 152, + LV_STYLE_TRANSFORM_SCALE_Y, + LV_STYLE_TRANSFORM_PIVOT_X, + LV_STYLE_TRANSFORM_PIVOT_Y, + LV_STYLE_TRANSFORM_ROTATION, + LV_STYLE_TRANSFORM_SKEW_X, + LV_STYLE_TRANSFORM_SKEW_Y, + LV_STYLE_FLEX_FLOW = 160, + LV_STYLE_FLEX_MAIN_PLACE, + LV_STYLE_FLEX_CROSS_PLACE, + LV_STYLE_FLEX_TRACK_PLACE, + LV_STYLE_FLEX_GROW, + LV_STYLE_GRID_COLUMN_DSC_ARRAY, + LV_STYLE_GRID_ROW_DSC_ARRAY, + LV_STYLE_GRID_COLUMN_ALIGN = 168, + LV_STYLE_GRID_ROW_ALIGN, + LV_STYLE_GRID_CELL_COLUMN_POS, + LV_STYLE_GRID_CELL_COLUMN_SPAN, + LV_STYLE_GRID_CELL_X_ALIGN, + LV_STYLE_GRID_CELL_ROW_POS, + LV_STYLE_GRID_CELL_ROW_SPAN, + LV_STYLE_GRID_CELL_Y_ALIGN, + LV_STYLE_TEXT_LEADING_TRIM = 176, + LV_STYLE_LAST_BUILT_IN_PROP, + LV_STYLE_NUM_BUILT_IN_PROPS = LV_STYLE_LAST_BUILT_IN_PROP + 1, + LV_STYLE_PROP_ANY = 0xFF, + LV_STYLE_PROP_CONST = 0xFF +}; +typedef enum { + LV_STYLE_RES_NOT_FOUND, + LV_STYLE_RES_FOUND, +} lv_style_res_t; +typedef struct { + const lv_style_prop_t * props; + void * user_data; + lv_anim_path_cb_t path_xcb; + uint32_t time; + uint32_t delay; +} lv_style_transition_dsc_t; +typedef struct { + lv_style_prop_t prop; + lv_style_value_t value; +} lv_style_const_prop_t; +typedef struct { + void * values_and_props; + uint32_t has_group; + uint8_t prop_cnt; +} lv_style_t; +void lv_style_init(lv_style_t * style); +void lv_style_reset(lv_style_t * style); +void lv_style_copy(lv_style_t * dst, const lv_style_t * src); +void lv_style_merge(lv_style_t * dst, const lv_style_t * src); +bool lv_style_is_const(const lv_style_t * style); +lv_style_prop_t lv_style_register_prop(uint8_t flag); +lv_style_prop_t lv_style_get_num_custom_props(void); +bool lv_style_remove_prop(lv_style_t * style, lv_style_prop_t prop); +void lv_style_set_prop(lv_style_t * style, lv_style_prop_t prop, lv_style_value_t value); +lv_style_res_t lv_style_get_prop(const lv_style_t * style, lv_style_prop_t prop, lv_style_value_t * value); +void lv_style_transition_dsc_init(lv_style_transition_dsc_t * tr, const lv_style_prop_t props[], + lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void * user_data); +lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop); +bool lv_style_is_empty(const lv_style_t * style); +static inline uint32_t lv_style_get_prop_group(lv_style_prop_t prop) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_TILED); - return (bool)v.num; -} -static inline lv_color_t lv_obj_get_style_border_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_border_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_border_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_OPA); - return (lv_opa_t)v.num; -} -static inline int32_t lv_obj_get_style_border_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_WIDTH); - return (int32_t)v.num; -} -static inline lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_SIDE); - return (lv_border_side_t)v.num; -} -static inline bool lv_obj_get_style_border_post(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_POST); - return (bool)v.num; -} -static inline int32_t lv_obj_get_style_outline_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_WIDTH); - return (int32_t)v.num; -} -static inline lv_color_t lv_obj_get_style_outline_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_outline_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_outline_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_OPA); - return (lv_opa_t)v.num; -} -static inline int32_t lv_obj_get_style_outline_pad(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_PAD); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_shadow_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_WIDTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_shadow_offset_x(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFFSET_X); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_shadow_offset_y(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OFFSET_Y); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_shadow_spread(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_SPREAD); - return (int32_t)v.num; -} -static inline lv_color_t lv_obj_get_style_shadow_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_shadow_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_shadow_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_OPA); - return (lv_opa_t)v.num; -} -static inline lv_opa_t lv_obj_get_style_image_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_OPA); - return (lv_opa_t)v.num; -} -static inline lv_color_t lv_obj_get_style_image_recolor(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_image_recolor_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_image_recolor_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR_OPA); - return (lv_opa_t)v.num; -} -static inline const lv_image_colorkey_t * lv_obj_get_style_image_colorkey(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_COLORKEY); - return (const lv_image_colorkey_t *)v.ptr; -} -static inline int32_t lv_obj_get_style_line_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_WIDTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_line_dash_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_DASH_WIDTH); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_line_dash_gap(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_DASH_GAP); - return (int32_t)v.num; -} -static inline bool lv_obj_get_style_line_rounded(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_ROUNDED); - return (bool)v.num; -} -static inline lv_color_t lv_obj_get_style_line_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_line_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_line_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_OPA); - return (lv_opa_t)v.num; -} -static inline int32_t lv_obj_get_style_arc_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_WIDTH); - return (int32_t)v.num; -} -static inline bool lv_obj_get_style_arc_rounded(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_ROUNDED); - return (bool)v.num; -} -static inline lv_color_t lv_obj_get_style_arc_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_arc_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_arc_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_OPA); - return (lv_opa_t)v.num; -} -static inline const void * lv_obj_get_style_arc_image_src(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_IMAGE_SRC); - return (const void *)v.ptr; -} -static inline lv_color_t lv_obj_get_style_text_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_text_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_text_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OPA); - return (lv_opa_t)v.num; -} -static inline const lv_font_t * lv_obj_get_style_text_font(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_FONT); - return (const lv_font_t *)v.ptr; + uint32_t group = prop >> 2; + if(group > 30) group = 31; + return group; } -static inline int32_t lv_obj_get_style_text_letter_space(const lv_obj_t * obj, lv_part_t part) +uint8_t lv_style_prop_lookup_flags(lv_style_prop_t prop); +void lv_style_set_width(lv_style_t * style, int32_t value); +void lv_style_set_min_width(lv_style_t * style, int32_t value); +void lv_style_set_max_width(lv_style_t * style, int32_t value); +void lv_style_set_height(lv_style_t * style, int32_t value); +void lv_style_set_min_height(lv_style_t * style, int32_t value); +void lv_style_set_max_height(lv_style_t * style, int32_t value); +void lv_style_set_length(lv_style_t * style, int32_t value); +void lv_style_set_x(lv_style_t * style, int32_t value); +void lv_style_set_y(lv_style_t * style, int32_t value); +void lv_style_set_align(lv_style_t * style, lv_align_t value); +void lv_style_set_transform_width(lv_style_t * style, int32_t value); +void lv_style_set_transform_height(lv_style_t * style, int32_t value); +void lv_style_set_translate_x(lv_style_t * style, int32_t value); +void lv_style_set_translate_y(lv_style_t * style, int32_t value); +void lv_style_set_translate_radial(lv_style_t * style, int32_t value); +void lv_style_set_transform_scale_x(lv_style_t * style, int32_t value); +void lv_style_set_transform_scale_y(lv_style_t * style, int32_t value); +void lv_style_set_transform_rotation(lv_style_t * style, int32_t value); +void lv_style_set_transform_pivot_x(lv_style_t * style, int32_t value); +void lv_style_set_transform_pivot_y(lv_style_t * style, int32_t value); +void lv_style_set_transform_skew_x(lv_style_t * style, int32_t value); +void lv_style_set_transform_skew_y(lv_style_t * style, int32_t value); +void lv_style_set_pad_top(lv_style_t * style, int32_t value); +void lv_style_set_pad_bottom(lv_style_t * style, int32_t value); +void lv_style_set_pad_left(lv_style_t * style, int32_t value); +void lv_style_set_pad_right(lv_style_t * style, int32_t value); +void lv_style_set_pad_row(lv_style_t * style, int32_t value); +void lv_style_set_pad_column(lv_style_t * style, int32_t value); +void lv_style_set_pad_radial(lv_style_t * style, int32_t value); +void lv_style_set_margin_top(lv_style_t * style, int32_t value); +void lv_style_set_margin_bottom(lv_style_t * style, int32_t value); +void lv_style_set_margin_left(lv_style_t * style, int32_t value); +void lv_style_set_margin_right(lv_style_t * style, int32_t value); +void lv_style_set_bg_color(lv_style_t * style, lv_color_t value); +void lv_style_set_bg_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_bg_grad_color(lv_style_t * style, lv_color_t value); +void lv_style_set_bg_grad_dir(lv_style_t * style, lv_grad_dir_t value); +void lv_style_set_bg_main_stop(lv_style_t * style, int32_t value); +void lv_style_set_bg_grad_stop(lv_style_t * style, int32_t value); +void lv_style_set_bg_main_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_bg_grad_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_bg_grad(lv_style_t * style, const lv_grad_dsc_t * value); +void lv_style_set_bg_image_src(lv_style_t * style, const void * value); +void lv_style_set_bg_image_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_bg_image_recolor(lv_style_t * style, lv_color_t value); +void lv_style_set_bg_image_recolor_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_bg_image_tiled(lv_style_t * style, bool value); +void lv_style_set_border_color(lv_style_t * style, lv_color_t value); +void lv_style_set_border_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_border_width(lv_style_t * style, int32_t value); +void lv_style_set_border_side(lv_style_t * style, lv_border_side_t value); +void lv_style_set_border_post(lv_style_t * style, bool value); +void lv_style_set_outline_width(lv_style_t * style, int32_t value); +void lv_style_set_outline_color(lv_style_t * style, lv_color_t value); +void lv_style_set_outline_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_outline_pad(lv_style_t * style, int32_t value); +void lv_style_set_shadow_width(lv_style_t * style, int32_t value); +void lv_style_set_shadow_offset_x(lv_style_t * style, int32_t value); +void lv_style_set_shadow_offset_y(lv_style_t * style, int32_t value); +void lv_style_set_shadow_spread(lv_style_t * style, int32_t value); +void lv_style_set_shadow_color(lv_style_t * style, lv_color_t value); +void lv_style_set_shadow_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_image_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_image_recolor(lv_style_t * style, lv_color_t value); +void lv_style_set_image_recolor_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_image_colorkey(lv_style_t * style, const lv_image_colorkey_t * value); +void lv_style_set_line_width(lv_style_t * style, int32_t value); +void lv_style_set_line_dash_width(lv_style_t * style, int32_t value); +void lv_style_set_line_dash_gap(lv_style_t * style, int32_t value); +void lv_style_set_line_rounded(lv_style_t * style, bool value); +void lv_style_set_line_color(lv_style_t * style, lv_color_t value); +void lv_style_set_line_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_arc_width(lv_style_t * style, int32_t value); +void lv_style_set_arc_rounded(lv_style_t * style, bool value); +void lv_style_set_arc_color(lv_style_t * style, lv_color_t value); +void lv_style_set_arc_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_arc_image_src(lv_style_t * style, const void * value); +void lv_style_set_text_color(lv_style_t * style, lv_color_t value); +void lv_style_set_text_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_text_font(lv_style_t * style, const lv_font_t * value); +void lv_style_set_text_letter_space(lv_style_t * style, int32_t value); +void lv_style_set_text_line_space(lv_style_t * style, int32_t value); +void lv_style_set_text_decor(lv_style_t * style, lv_text_decor_t value); +void lv_style_set_text_align(lv_style_t * style, lv_text_align_t value); +void lv_style_set_text_outline_stroke_color(lv_style_t * style, lv_color_t value); +void lv_style_set_text_outline_stroke_width(lv_style_t * style, int32_t value); +void lv_style_set_text_outline_stroke_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_text_leading_trim(lv_style_t * style, lv_text_leading_trim_t value); +void lv_style_set_blur_radius(lv_style_t * style, int32_t value); +void lv_style_set_blur_backdrop(lv_style_t * style, bool value); +void lv_style_set_blur_quality(lv_style_t * style, lv_blur_quality_t value); +void lv_style_set_drop_shadow_radius(lv_style_t * style, int32_t value); +void lv_style_set_drop_shadow_offset_x(lv_style_t * style, int32_t value); +void lv_style_set_drop_shadow_offset_y(lv_style_t * style, int32_t value); +void lv_style_set_drop_shadow_color(lv_style_t * style, lv_color_t value); +void lv_style_set_drop_shadow_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_drop_shadow_quality(lv_style_t * style, lv_blur_quality_t value); +void lv_style_set_radius(lv_style_t * style, int32_t value); +void lv_style_set_radial_offset(lv_style_t * style, int32_t value); +void lv_style_set_clip_corner(lv_style_t * style, bool value); +void lv_style_set_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_opa_layered(lv_style_t * style, lv_opa_t value); +void lv_style_set_color_filter_dsc(lv_style_t * style, const lv_color_filter_dsc_t * value); +void lv_style_set_color_filter_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_recolor(lv_style_t * style, lv_color_t value); +void lv_style_set_recolor_opa(lv_style_t * style, lv_opa_t value); +void lv_style_set_anim(lv_style_t * style, const lv_anim_t * value); +void lv_style_set_anim_duration(lv_style_t * style, uint32_t value); +void lv_style_set_transition(lv_style_t * style, const lv_style_transition_dsc_t * value); +void lv_style_set_blend_mode(lv_style_t * style, lv_blend_mode_t value); +void lv_style_set_layout(lv_style_t * style, uint16_t value); +void lv_style_set_base_dir(lv_style_t * style, lv_base_dir_t value); +void lv_style_set_bitmap_mask_src(lv_style_t * style, const void * value); +void lv_style_set_rotary_sensitivity(lv_style_t * style, uint32_t value); +void lv_style_set_flex_flow(lv_style_t * style, lv_flex_flow_t value); +void lv_style_set_flex_main_place(lv_style_t * style, lv_flex_align_t value); +void lv_style_set_flex_cross_place(lv_style_t * style, lv_flex_align_t value); +void lv_style_set_flex_track_place(lv_style_t * style, lv_flex_align_t value); +void lv_style_set_flex_grow(lv_style_t * style, uint8_t value); +void lv_style_set_grid_column_dsc_array(lv_style_t * style, const int32_t * value); +void lv_style_set_grid_column_align(lv_style_t * style, lv_grid_align_t value); +void lv_style_set_grid_row_dsc_array(lv_style_t * style, const int32_t * value); +void lv_style_set_grid_row_align(lv_style_t * style, lv_grid_align_t value); +void lv_style_set_grid_cell_column_pos(lv_style_t * style, int32_t value); +void lv_style_set_grid_cell_x_align(lv_style_t * style, lv_grid_align_t value); +void lv_style_set_grid_cell_column_span(lv_style_t * style, int32_t value); +void lv_style_set_grid_cell_row_pos(lv_style_t * style, int32_t value); +void lv_style_set_grid_cell_y_align(lv_style_t * style, lv_grid_align_t value); +void lv_style_set_grid_cell_row_span(lv_style_t * style, int32_t value); +void lv_style_set_size(lv_style_t * style, int32_t width, int32_t height); +void lv_style_set_pad_all(lv_style_t * style, int32_t value); +void lv_style_set_pad_hor(lv_style_t * style, int32_t value); +void lv_style_set_pad_ver(lv_style_t * style, int32_t value); +void lv_style_set_pad_gap(lv_style_t * style, int32_t value); +void lv_style_set_margin_hor(lv_style_t * style, int32_t value); +void lv_style_set_margin_ver(lv_style_t * style, int32_t value); +void lv_style_set_margin_all(lv_style_t * style, int32_t value); +void lv_style_set_transform_scale(lv_style_t * style, int32_t value); +static inline bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LETTER_SPACE); - return (int32_t)v.num; + return lv_style_prop_lookup_flags(prop) & flag; } -static inline int32_t lv_obj_get_style_text_line_space(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_LINE_SPACE); - return (int32_t)v.num; -} -static inline lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_DECOR); - return (lv_text_decor_t)v.num; -} -static inline lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_ALIGN); - return (lv_text_align_t)v.num; -} -static inline lv_color_t lv_obj_get_style_text_outline_stroke_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_text_outline_stroke_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_COLOR)); - return v.color; -} -static inline int32_t lv_obj_get_style_text_outline_stroke_width(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_WIDTH); - return (int32_t)v.num; -} -static inline lv_opa_t lv_obj_get_style_text_outline_stroke_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_OPA); - return (lv_opa_t)v.num; -} -static inline int32_t lv_obj_get_style_blur_radius(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLUR_RADIUS); - return (int32_t)v.num; -} -static inline bool lv_obj_get_style_blur_backdrop(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLUR_BACKDROP); - return (bool)v.num; -} -static inline lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLUR_QUALITY); - return (lv_blur_quality_t)v.num; -} -static inline int32_t lv_obj_get_style_drop_shadow_radius(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_RADIUS); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_drop_shadow_offset_x(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_OFFSET_X); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_drop_shadow_offset_y(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_OFFSET_Y); - return (int32_t)v.num; -} -static inline lv_color_t lv_obj_get_style_drop_shadow_color(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_COLOR); - return v.color; -} -static inline lv_color_t lv_obj_get_style_drop_shadow_color_filtered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_style_apply_color_filter(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_COLOR)); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_drop_shadow_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_OPA); - return (lv_opa_t)v.num; -} -static inline lv_blur_quality_t lv_obj_get_style_drop_shadow_quality(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_QUALITY); - return (lv_blur_quality_t)v.num; -} -static inline int32_t lv_obj_get_style_radius(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RADIUS); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_radial_offset(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RADIAL_OFFSET); - return (int32_t)v.num; -} -static inline bool lv_obj_get_style_clip_corner(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_CLIP_CORNER); - return (bool)v.num; -} -static inline lv_opa_t lv_obj_get_style_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA); - return (lv_opa_t)v.num; -} -static inline lv_opa_t lv_obj_get_style_opa_layered(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_OPA_LAYERED); - return (lv_opa_t)v.num; -} -static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_DSC); - return (const lv_color_filter_dsc_t *)v.ptr; -} -static inline lv_opa_t lv_obj_get_style_color_filter_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_COLOR_FILTER_OPA); - return (lv_opa_t)v.num; -} -static inline lv_color_t lv_obj_get_style_recolor(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RECOLOR); - return v.color; -} -static inline lv_opa_t lv_obj_get_style_recolor_opa(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_RECOLOR_OPA); - return (lv_opa_t)v.num; -} -static inline const lv_anim_t * lv_obj_get_style_anim(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM); - return (const lv_anim_t *)v.ptr; -} -static inline uint32_t lv_obj_get_style_anim_duration(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ANIM_DURATION); - return (uint32_t)v.num; -} -static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_TRANSITION); - return (const lv_style_transition_dsc_t *)v.ptr; -} -static inline lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BLEND_MODE); - return (lv_blend_mode_t)v.num; -} -static inline uint16_t lv_obj_get_style_layout(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_LAYOUT); - return (uint16_t)v.num; -} -static inline lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BASE_DIR); - return (lv_base_dir_t)v.num; -} -static inline const void * lv_obj_get_style_bitmap_mask_src(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_BITMAP_MASK_SRC); - return (const void *)v.ptr; -} -static inline uint32_t lv_obj_get_style_rotary_sensitivity(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_ROTARY_SENSITIVITY); - return (uint32_t)v.num; -} -static inline lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_FLOW); - return (lv_flex_flow_t)v.num; -} -static inline lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_MAIN_PLACE); - return (lv_flex_align_t)v.num; -} -static inline lv_flex_align_t lv_obj_get_style_flex_cross_place(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_CROSS_PLACE); - return (lv_flex_align_t)v.num; -} -static inline lv_flex_align_t lv_obj_get_style_flex_track_place(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_TRACK_PLACE); - return (lv_flex_align_t)v.num; -} -static inline uint8_t lv_obj_get_style_flex_grow(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_FLEX_GROW); - return (uint8_t)v.num; -} -static inline const int32_t * lv_obj_get_style_grid_column_dsc_array(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_DSC_ARRAY); - return (const int32_t *)v.ptr; -} -static inline lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_COLUMN_ALIGN); - return (lv_grid_align_t)v.num; -} -static inline const int32_t * lv_obj_get_style_grid_row_dsc_array(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_ROW_DSC_ARRAY); - return (const int32_t *)v.ptr; -} -static inline lv_grid_align_t lv_obj_get_style_grid_row_align(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_ROW_ALIGN); - return (lv_grid_align_t)v.num; -} -static inline int32_t lv_obj_get_style_grid_cell_column_pos(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_COLUMN_POS); - return (int32_t)v.num; -} -static inline lv_grid_align_t lv_obj_get_style_grid_cell_x_align(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_X_ALIGN); - return (lv_grid_align_t)v.num; -} -static inline int32_t lv_obj_get_style_grid_cell_column_span(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_COLUMN_SPAN); - return (int32_t)v.num; -} -static inline int32_t lv_obj_get_style_grid_cell_row_pos(const lv_obj_t * obj, lv_part_t part) -{ - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_ROW_POS); - return (int32_t)v.num; -} -static inline lv_grid_align_t lv_obj_get_style_grid_cell_y_align(const lv_obj_t * obj, lv_part_t part) + extern const lv_style_prop_t lv_style_const_prop_id_inv; +typedef void (*lv_timer_cb_t)(lv_timer_t *); +typedef void (*lv_timer_handler_resume_cb_t)(void * data); + uint32_t lv_timer_handler(void); + uint32_t lv_timer_handler_run_in_period(uint32_t period); + uint32_t lv_timer_get_time_to_next(void); + void lv_timer_periodic_handler(void); +void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void * data); +lv_timer_t * lv_timer_create_basic(void); +lv_timer_t * lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void * user_data); +void lv_timer_delete(lv_timer_t * timer); +void lv_timer_pause(lv_timer_t * timer); +void lv_timer_resume(lv_timer_t * timer); +void lv_timer_set_cb(lv_timer_t * timer, lv_timer_cb_t timer_cb); +void lv_timer_set_period(lv_timer_t * timer, uint32_t period); +void lv_timer_ready(lv_timer_t * timer); +void lv_timer_set_repeat_count(lv_timer_t * timer, int32_t repeat_count); +void lv_timer_set_auto_delete(lv_timer_t * timer, bool auto_delete); +void lv_timer_set_user_data(lv_timer_t * timer, void * user_data); +void lv_timer_reset(lv_timer_t * timer); +void lv_timer_enable(bool en); +uint32_t lv_timer_get_idle(void); +uint32_t lv_timer_get_time_until_next(void); +lv_timer_t * lv_timer_get_next(lv_timer_t * timer); +void * lv_timer_get_user_data(lv_timer_t * timer); +bool lv_timer_get_paused(lv_timer_t * timer); +typedef enum { + LV_DISPLAY_ROTATION_0 = 0, + LV_DISPLAY_ROTATION_90, + LV_DISPLAY_ROTATION_180, + LV_DISPLAY_ROTATION_270 +} lv_display_rotation_t; +typedef enum { + LV_DISPLAY_RENDER_MODE_PARTIAL, + LV_DISPLAY_RENDER_MODE_DIRECT, + LV_DISPLAY_RENDER_MODE_FULL, +} lv_display_render_mode_t; +typedef enum { + LV_SCREEN_LOAD_ANIM_NONE, + LV_SCREEN_LOAD_ANIM_OVER_LEFT, + LV_SCREEN_LOAD_ANIM_OVER_RIGHT, + LV_SCREEN_LOAD_ANIM_OVER_TOP, + LV_SCREEN_LOAD_ANIM_OVER_BOTTOM, + LV_SCREEN_LOAD_ANIM_MOVE_LEFT, + LV_SCREEN_LOAD_ANIM_MOVE_RIGHT, + LV_SCREEN_LOAD_ANIM_MOVE_TOP, + LV_SCREEN_LOAD_ANIM_MOVE_BOTTOM, + LV_SCREEN_LOAD_ANIM_FADE_IN, + LV_SCREEN_LOAD_ANIM_FADE_ON = LV_SCREEN_LOAD_ANIM_FADE_IN, + LV_SCREEN_LOAD_ANIM_FADE_OUT, + LV_SCREEN_LOAD_ANIM_OUT_LEFT, + LV_SCREEN_LOAD_ANIM_OUT_RIGHT, + LV_SCREEN_LOAD_ANIM_OUT_TOP, + LV_SCREEN_LOAD_ANIM_OUT_BOTTOM, +} lv_screen_load_anim_t; +typedef void (*lv_display_flush_cb_t)(lv_display_t * disp, const lv_area_t * area, uint8_t * px_map); +typedef void (*lv_display_flush_wait_cb_t)(lv_display_t * disp); +typedef void (*lv_display_sync_cb_t)(lv_display_t * disp, const lv_area_t * area); +typedef void (*lv_display_sync_wait_cb_t)(lv_display_t * disp); +lv_display_t * lv_display_create(int32_t hor_res, int32_t ver_res); +void lv_display_delete(lv_display_t * disp); +void lv_display_set_default(lv_display_t * disp); +lv_display_t * lv_display_get_default(void); +lv_display_t * lv_display_get_next(lv_display_t * disp); +void lv_display_set_resolution(lv_display_t * disp, int32_t hor_res, int32_t ver_res); +void lv_display_set_physical_resolution(lv_display_t * disp, int32_t hor_res, int32_t ver_res); +void lv_display_set_offset(lv_display_t * disp, int32_t x, int32_t y); +void lv_display_set_rotation(lv_display_t * disp, lv_display_rotation_t rotation); +void lv_display_set_matrix_rotation(lv_display_t * disp, bool enable); +void lv_display_set_dpi(lv_display_t * disp, int32_t dpi); +int32_t lv_display_get_horizontal_resolution(const lv_display_t * disp); +int32_t lv_display_get_vertical_resolution(const lv_display_t * disp); +int32_t lv_display_get_original_horizontal_resolution(const lv_display_t * disp); +int32_t lv_display_get_original_vertical_resolution(const lv_display_t * disp); +int32_t lv_display_get_physical_horizontal_resolution(const lv_display_t * disp); +int32_t lv_display_get_physical_vertical_resolution(const lv_display_t * disp); +int32_t lv_display_get_offset_x(const lv_display_t * disp); +int32_t lv_display_get_offset_y(const lv_display_t * disp); +lv_display_rotation_t lv_display_get_rotation(lv_display_t * disp); +bool lv_display_get_matrix_rotation(lv_display_t * disp); +int32_t lv_display_get_dpi(const lv_display_t * disp); +void lv_display_set_buffers(lv_display_t * disp, void * buf1, void * buf2, uint32_t buf_size, + lv_display_render_mode_t render_mode); +void lv_display_set_buffers_with_stride(lv_display_t * disp, void * buf1, void * buf2, uint32_t buf_size, + uint32_t stride, lv_display_render_mode_t render_mode); +void lv_display_set_draw_buffers(lv_display_t * disp, lv_draw_buf_t * buf1, lv_draw_buf_t * buf2); +void lv_display_set_3rd_draw_buffer(lv_display_t * disp, lv_draw_buf_t * buf3); +void lv_display_set_render_mode(lv_display_t * disp, lv_display_render_mode_t render_mode); +void lv_display_set_flush_cb(lv_display_t * disp, lv_display_flush_cb_t flush_cb); +lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t * disp); +void lv_display_set_flush_wait_cb(lv_display_t * disp, lv_display_flush_wait_cb_t wait_cb); +void lv_display_set_sync_cb(lv_display_t * disp, lv_display_sync_cb_t sync_cb); +void lv_display_set_sync_wait_cb(lv_display_t * disp, lv_display_sync_wait_cb_t wait_cb); +void lv_display_set_color_format(lv_display_t * disp, lv_color_format_t color_format); +lv_color_format_t lv_display_get_color_format(lv_display_t * disp); +void lv_display_set_tile_cnt(lv_display_t * disp, uint32_t tile_cnt); +uint32_t lv_display_get_tile_cnt(lv_display_t * disp); +void lv_display_set_antialiasing(lv_display_t * disp, bool en); +bool lv_display_get_antialiasing(lv_display_t * disp); + void lv_display_flush_ready(lv_display_t * disp); + bool lv_display_flush_is_last(lv_display_t * disp); + void lv_display_sync_ready(lv_display_t * disp); + bool lv_display_sync_is_last(lv_display_t * disp); +bool lv_display_is_double_buffered(lv_display_t * disp); +lv_display_render_mode_t lv_display_get_render_mode(lv_display_t * disp); +lv_obj_t * lv_display_get_screen_active(lv_display_t * disp); +lv_obj_t * lv_display_get_screen_prev(lv_display_t * disp); +lv_obj_t * lv_display_get_screen_loading(lv_display_t * disp); +lv_obj_t * lv_display_get_layer_top(lv_display_t * disp); +lv_obj_t * lv_display_get_layer_sys(lv_display_t * disp); +lv_obj_t * lv_display_get_layer_bottom(lv_display_t * disp); +void lv_screen_load(lv_obj_t * scr); +void lv_screen_load_anim(lv_obj_t * scr, lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay, + bool auto_del); +lv_obj_t * lv_screen_active(void); +lv_obj_t * lv_layer_top(void); +lv_obj_t * lv_layer_sys(void); +lv_obj_t * lv_layer_bottom(void); +lv_event_dsc_t * lv_display_add_event_cb(lv_display_t * disp, lv_event_cb_t event_cb, lv_event_code_t filter, + void * user_data); +uint32_t lv_display_get_event_count(lv_display_t * disp); +lv_event_dsc_t * lv_display_get_event_dsc(lv_display_t * disp, uint32_t index); +bool lv_display_remove_event(lv_display_t * disp, uint32_t index); +uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t * disp, lv_event_cb_t event_cb, void * user_data); +lv_result_t lv_display_send_event(lv_display_t * disp, lv_event_code_t code, void * param); +lv_area_t * lv_event_get_invalidated_area(lv_event_t * e); +void lv_display_set_theme(lv_display_t * disp, lv_theme_t * th); +lv_theme_t * lv_display_get_theme(lv_display_t * disp); +uint32_t lv_display_get_inactive_time(const lv_display_t * disp); +void lv_display_trigger_activity(lv_display_t * disp); +void lv_display_enable_invalidation(lv_display_t * disp, bool en); +bool lv_display_is_invalidation_enabled(lv_display_t * disp); +lv_timer_t * lv_display_get_refr_timer(lv_display_t * disp); +void lv_display_delete_refr_timer(lv_display_t * disp); +bool lv_display_register_vsync_event(lv_display_t * disp, lv_event_cb_t event_cb, void * user_data); +bool lv_display_unregister_vsync_event(lv_display_t * disp, lv_event_cb_t event_cb, void * user_data); +lv_result_t lv_display_send_vsync_event(lv_display_t * disp, void * param); +void lv_display_set_user_data(lv_display_t * disp, void * user_data); +void lv_display_set_driver_data(lv_display_t * disp, void * driver_data); +void * lv_display_get_user_data(lv_display_t * disp); +void * lv_display_get_driver_data(lv_display_t * disp); +lv_draw_buf_t * lv_display_get_buf_active(lv_display_t * disp); +void lv_display_rotate_area(lv_display_t * disp, lv_area_t * area); +void lv_display_rotate_point(lv_display_t * disp, lv_point_t * point); +void lv_display_rotate_point_ccw(lv_display_t * disp, lv_point_t * point); +uint32_t lv_display_get_draw_buf_size(lv_display_t * disp); +uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t * disp, uint32_t width, uint32_t height); +int32_t lv_dpx(int32_t n); +int32_t lv_display_dpx(const lv_display_t * disp, int32_t n); +typedef enum { + LV_OBJ_TREE_WALK_NEXT, + LV_OBJ_TREE_WALK_SKIP_CHILDREN, + LV_OBJ_TREE_WALK_END, +} lv_obj_tree_walk_res_t; +typedef lv_obj_tree_walk_res_t (*lv_obj_tree_walk_cb_t)(lv_obj_t *, void *); +void lv_obj_delete(lv_obj_t * obj); +void lv_obj_clean(lv_obj_t * obj); +void lv_obj_delete_delayed(lv_obj_t * obj, uint32_t delay_ms); +void lv_obj_delete_anim_completed_cb(lv_anim_t * a); +void lv_obj_delete_async(lv_obj_t * obj); +void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent); +void lv_obj_swap(lv_obj_t * obj1, lv_obj_t * obj2); +void lv_obj_move_to_index(lv_obj_t * obj, int32_t index); +lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj); +lv_display_t * lv_obj_get_display(const lv_obj_t * obj); +lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj); +lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, int32_t idx); +lv_obj_t * lv_obj_get_child_by_type(const lv_obj_t * obj, int32_t idx, + const lv_obj_class_t * class_p); +lv_obj_t * lv_obj_get_sibling(const lv_obj_t * obj, int32_t idx); +lv_obj_t * lv_obj_get_sibling_by_type(const lv_obj_t * obj, int32_t idx, + const lv_obj_class_t * class_p); +uint32_t lv_obj_get_child_count(const lv_obj_t * obj); +uint32_t lv_obj_get_child_count_by_type(const lv_obj_t * obj, const lv_obj_class_t * class_p); +int32_t lv_obj_get_index(const lv_obj_t * obj); +int32_t lv_obj_get_index_by_type(const lv_obj_t * obj, const lv_obj_class_t * class_p); +void lv_obj_tree_walk(lv_obj_t * start_obj, lv_obj_tree_walk_cb_t cb, void * user_data); +void lv_obj_dump_tree(lv_obj_t * start_obj); +typedef enum { + LV_OBJ_POINT_TRANSFORM_FLAG_NONE = 0x00, + LV_OBJ_POINT_TRANSFORM_FLAG_RECURSIVE = 0x01, + LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE = 0x02, + LV_OBJ_POINT_TRANSFORM_FLAG_INVERSE_RECURSIVE = 0x03, +} lv_obj_point_transform_flag_t; +void lv_obj_set_pos(lv_obj_t * obj, int32_t x, int32_t y); +void lv_obj_set_x(lv_obj_t * obj, int32_t x); +void lv_obj_set_y(lv_obj_t * obj, int32_t y); +void lv_obj_set_size(lv_obj_t * obj, int32_t w, int32_t h); +bool lv_obj_refr_size(lv_obj_t * obj); +void lv_obj_set_width(lv_obj_t * obj, int32_t w); +void lv_obj_set_height(lv_obj_t * obj, int32_t h); +void lv_obj_set_content_width(lv_obj_t * obj, int32_t w); +void lv_obj_set_content_height(lv_obj_t * obj, int32_t h); +void lv_obj_set_layout(lv_obj_t * obj, uint32_t layout); +bool lv_obj_is_layout_positioned(const lv_obj_t * obj); +void lv_obj_mark_layout_as_dirty(lv_obj_t * obj); +void lv_obj_update_layout(const lv_obj_t * obj); +void lv_obj_set_align(lv_obj_t * obj, lv_align_t align); +void lv_obj_align(lv_obj_t * obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs); +void lv_obj_align_to(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, int32_t x_ofs, + int32_t y_ofs); +void lv_obj_center(lv_obj_t * obj); +void lv_obj_set_transform(lv_obj_t * obj, const lv_matrix_t * matrix); +void lv_obj_reset_transform(lv_obj_t * obj); +void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * coords); +int32_t lv_obj_get_x(const lv_obj_t * obj); +int32_t lv_obj_get_x2(const lv_obj_t * obj); +int32_t lv_obj_get_y(const lv_obj_t * obj); +int32_t lv_obj_get_y2(const lv_obj_t * obj); +int32_t lv_obj_get_x_aligned(const lv_obj_t * obj); +int32_t lv_obj_get_y_aligned(const lv_obj_t * obj); +int32_t lv_obj_get_width(const lv_obj_t * obj); +int32_t lv_obj_get_height(const lv_obj_t * obj); +int32_t lv_obj_get_content_width(const lv_obj_t * obj); +int32_t lv_obj_get_content_height(const lv_obj_t * obj); +void lv_obj_get_content_coords(const lv_obj_t * obj, lv_area_t * area); +int32_t lv_obj_get_self_width(const lv_obj_t * obj); +int32_t lv_obj_get_self_height(const lv_obj_t * obj); +int32_t lv_obj_get_style_clamped_width(lv_obj_t * obj); +int32_t lv_obj_get_style_clamped_height(lv_obj_t * obj); +bool lv_obj_is_style_any_width_content(lv_obj_t * obj); +bool lv_obj_is_style_any_height_content(lv_obj_t * obj); +bool lv_obj_is_width_min(lv_obj_t * obj); +bool lv_obj_is_height_min(lv_obj_t * obj); +bool lv_obj_is_width_max(lv_obj_t * obj); +bool lv_obj_is_height_max(lv_obj_t * obj); +bool lv_obj_refresh_self_size(lv_obj_t * obj); +void lv_obj_refr_pos(lv_obj_t * obj); +void lv_obj_move_to(lv_obj_t * obj, int32_t x, int32_t y); +void lv_obj_move_children_by(lv_obj_t * obj, int32_t x_diff, int32_t y_diff, bool ignore_floating); +const lv_matrix_t * lv_obj_get_transform(const lv_obj_t * obj); +void lv_obj_transform_point(const lv_obj_t * obj, lv_point_t * p, lv_obj_point_transform_flag_t flags); +void lv_obj_transform_point_array(const lv_obj_t * obj, lv_point_t points[], size_t count, + lv_obj_point_transform_flag_t flags); +void lv_obj_get_transformed_area(const lv_obj_t * obj, lv_area_t * area, lv_obj_point_transform_flag_t flags); +lv_result_t lv_obj_invalidate_area(const lv_obj_t * obj, const lv_area_t * area); +lv_result_t lv_obj_invalidate(const lv_obj_t * obj); +bool lv_obj_area_is_visible(const lv_obj_t * obj, lv_area_t * area); +bool lv_obj_is_visible(const lv_obj_t * obj); +void lv_obj_set_ext_click_area(lv_obj_t * obj, int32_t size); +void lv_obj_get_click_area(const lv_obj_t * obj, lv_area_t * area); +bool lv_obj_hit_test(lv_obj_t * obj, const lv_point_t * point); +int32_t lv_clamp_width(int32_t width, int32_t min_width, int32_t max_width, int32_t ref_width); +int32_t lv_clamp_height(int32_t height, int32_t min_height, int32_t max_height, int32_t ref_height); +int32_t lv_obj_calc_dynamic_width(lv_obj_t * obj, lv_style_prop_t prop); +int32_t lv_obj_calc_dynamic_height(lv_obj_t * obj, lv_style_prop_t prop); +typedef enum { + LV_SCROLLBAR_MODE_OFF, + LV_SCROLLBAR_MODE_ON, + LV_SCROLLBAR_MODE_ACTIVE, + LV_SCROLLBAR_MODE_AUTO, +} lv_scrollbar_mode_t; +typedef enum { + LV_SCROLL_SNAP_NONE, + LV_SCROLL_SNAP_START, + LV_SCROLL_SNAP_END, + LV_SCROLL_SNAP_CENTER +} lv_scroll_snap_t; +void lv_obj_set_scrollbar_mode(lv_obj_t * obj, lv_scrollbar_mode_t mode); +void lv_obj_set_scroll_dir(lv_obj_t * obj, lv_dir_t dir); +void lv_obj_set_scroll_snap_x(lv_obj_t * obj, lv_scroll_snap_t align); +void lv_obj_set_scroll_snap_y(lv_obj_t * obj, lv_scroll_snap_t align); +lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t * obj); +lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t * obj); +lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t * obj); +lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t * obj); +int32_t lv_obj_get_scroll_x(const lv_obj_t * obj); +int32_t lv_obj_get_scroll_y(const lv_obj_t * obj); +int32_t lv_obj_get_scroll_top(const lv_obj_t * obj); +int32_t lv_obj_get_scroll_bottom(const lv_obj_t * obj); +int32_t lv_obj_get_scroll_left(const lv_obj_t * obj); +int32_t lv_obj_get_scroll_right(const lv_obj_t * obj); +void lv_obj_get_scroll_end(lv_obj_t * obj, lv_point_t * end); +void lv_obj_scroll_by(lv_obj_t * obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en); +void lv_obj_scroll_by_bounded(lv_obj_t * obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en); +void lv_obj_scroll_to(lv_obj_t * obj, int32_t x, int32_t y, lv_anim_enable_t anim_en); +void lv_obj_scroll_to_x(lv_obj_t * obj, int32_t x, lv_anim_enable_t anim_en); +void lv_obj_scroll_to_y(lv_obj_t * obj, int32_t y, lv_anim_enable_t anim_en); +void lv_obj_scroll_to_view(lv_obj_t * obj, lv_anim_enable_t anim_en); +void lv_obj_scroll_to_view_recursive(lv_obj_t * obj, lv_anim_enable_t anim_en); +bool lv_obj_is_scrolling(const lv_obj_t * obj); +void lv_obj_stop_scroll_anim(const lv_obj_t * obj); +void lv_obj_update_snap(lv_obj_t * obj, lv_anim_enable_t anim_en); +void lv_obj_get_scrollbar_area(lv_obj_t * obj, lv_area_t * hor_area, lv_area_t * ver_area); +void lv_obj_scrollbar_invalidate(lv_obj_t * obj); +void lv_obj_readjust_scroll(lv_obj_t * obj, lv_anim_enable_t anim_en); +typedef enum { + LV_STATE_DEFAULT = 0, + LV_STATE_ALT = 1 << 0, + LV_STATE_CHECKED = 1 << 2, + LV_STATE_FOCUSED = 1 << 3, + LV_STATE_FOCUS_KEY = 1 << 4, + LV_STATE_EDITED = 1 << 5, + LV_STATE_HOVERED = 1 << 6, + LV_STATE_PRESSED = 1 << 7, + LV_STATE_SCROLLED = 1 << 8, + LV_STATE_DISABLED = 1 << 9, + LV_STATE_USER_1 = 1 << 12, + LV_STATE_USER_2 = 1 << 13, + LV_STATE_USER_3 = 1 << 14, + LV_STATE_USER_4 = 1 << 15, + LV_STATE_ANY = 0xFFFF, +} lv_state_t; +typedef enum { + LV_PART_MAIN = 0x000000, + LV_PART_SCROLLBAR = 0x010000, + LV_PART_INDICATOR = 0x020000, + LV_PART_KNOB = 0x030000, + LV_PART_SELECTED = 0x040000, + LV_PART_ITEMS = 0x050000, + LV_PART_CURSOR = 0x060000, + LV_PART_CUSTOM_FIRST = 0x080000, + LV_PART_ANY = 0x0F0000, +} lv_part_t; +typedef enum { + LV_STYLE_STATE_CMP_SAME, + LV_STYLE_STATE_CMP_DIFF_REDRAW, + LV_STYLE_STATE_CMP_DIFF_DRAW_PAD, + LV_STYLE_STATE_CMP_DIFF_LAYOUT, +} lv_style_state_cmp_t; +typedef uint32_t lv_style_selector_t; +void lv_obj_add_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); +bool lv_obj_replace_style(lv_obj_t * obj, const lv_style_t * old_style, const lv_style_t * new_style, + lv_style_selector_t selector); +void lv_obj_remove_style(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); +void lv_obj_remove_theme(lv_obj_t * obj, lv_style_selector_t selector); +void lv_obj_remove_style_all(lv_obj_t * obj); +void lv_obj_report_style_change(lv_style_t * style); +void lv_obj_refresh_style(lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop); +void lv_obj_set_style_enabled(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector, bool en); +bool lv_obj_get_style_enabled(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); + +void lv_obj_style_set_disabled(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector, bool dis); + +bool lv_obj_style_get_disabled(lv_obj_t * obj, const lv_style_t * style, lv_style_selector_t selector); +void lv_obj_enable_style_refresh(bool en); +lv_style_value_t lv_obj_get_style_prop(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop); +bool lv_obj_has_style_prop(const lv_obj_t * obj, lv_style_selector_t selector, lv_style_prop_t prop); +void lv_obj_set_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t value, + lv_style_selector_t selector); +lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_value_t * value, + lv_style_selector_t selector); +bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_selector_t selector); +lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t * obj, lv_part_t part, lv_style_value_t v); +void lv_obj_fade_in(lv_obj_t * obj, uint32_t time, uint32_t delay); +void lv_obj_fade_out(lv_obj_t * obj, uint32_t time, uint32_t delay); +static inline lv_state_t lv_obj_style_get_selector_state(lv_style_selector_t selector) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_Y_ALIGN); - return (lv_grid_align_t)v.num; + return (lv_state_t)(selector & 0xFFFF); } -static inline int32_t lv_obj_get_style_grid_cell_row_span(const lv_obj_t * obj, lv_part_t part) +static inline lv_part_t lv_obj_style_get_selector_part(lv_style_selector_t selector) { - lv_style_value_t v = lv_obj_get_style_prop(obj, part, LV_STYLE_GRID_CELL_ROW_SPAN); - return (int32_t)v.num; + return (lv_part_t)(selector & 0xFF0000); } +int32_t lv_obj_get_style_width(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_min_width(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_max_width(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_height(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_min_height(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_max_height(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_length(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_x(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_y(const lv_obj_t * obj, lv_part_t part); +lv_align_t lv_obj_get_style_align(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_width(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_height(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_translate_x(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_translate_y(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_translate_radial(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_scale_x(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_scale_y(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_rotation(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_pivot_x(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_pivot_y(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_skew_x(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_skew_y(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_pad_top(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_pad_bottom(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_pad_left(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_pad_right(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_pad_row(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_pad_column(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_pad_radial(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_margin_top(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_margin_bottom(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_margin_left(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_margin_right(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_bg_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_bg_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_bg_main_stop(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_bg_grad_stop(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_bg_main_opa(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_bg_grad_opa(const lv_obj_t * obj, lv_part_t part); +const lv_grad_dsc_t * lv_obj_get_style_bg_grad(const lv_obj_t * obj, lv_part_t part); +const void * lv_obj_get_style_bg_image_src(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_bg_image_opa(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_bg_image_recolor(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_bg_image_recolor_opa(const lv_obj_t * obj, lv_part_t part); +bool lv_obj_get_style_bg_image_tiled(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_border_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_border_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_border_opa(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_border_width(const lv_obj_t * obj, lv_part_t part); +lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t * obj, lv_part_t part); +bool lv_obj_get_style_border_post(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_outline_width(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_outline_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_outline_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_outline_opa(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_outline_pad(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_shadow_width(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_shadow_offset_x(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_shadow_offset_y(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_shadow_spread(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_shadow_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_shadow_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_shadow_opa(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_image_opa(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_image_recolor(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_image_recolor_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_image_recolor_opa(const lv_obj_t * obj, lv_part_t part); +const lv_image_colorkey_t * lv_obj_get_style_image_colorkey(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_line_width(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_line_dash_width(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_line_dash_gap(const lv_obj_t * obj, lv_part_t part); +bool lv_obj_get_style_line_rounded(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_line_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_line_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_line_opa(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_arc_width(const lv_obj_t * obj, lv_part_t part); +bool lv_obj_get_style_arc_rounded(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_arc_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_arc_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_arc_opa(const lv_obj_t * obj, lv_part_t part); +const void * lv_obj_get_style_arc_image_src(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_text_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_text_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_text_opa(const lv_obj_t * obj, lv_part_t part); +const lv_font_t * lv_obj_get_style_text_font(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_text_letter_space(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_text_line_space(const lv_obj_t * obj, lv_part_t part); +lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t * obj, lv_part_t part); +lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_text_outline_stroke_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_text_outline_stroke_color_filtered(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_text_outline_stroke_width(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_text_outline_stroke_opa(const lv_obj_t * obj, lv_part_t part); +lv_text_leading_trim_t lv_obj_get_style_text_leading_trim(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_blur_radius(const lv_obj_t * obj, lv_part_t part); +bool lv_obj_get_style_blur_backdrop(const lv_obj_t * obj, lv_part_t part); +lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_drop_shadow_radius(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_drop_shadow_offset_x(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_drop_shadow_offset_y(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_drop_shadow_color(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_drop_shadow_color_filtered(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_drop_shadow_opa(const lv_obj_t * obj, lv_part_t part); +lv_blur_quality_t lv_obj_get_style_drop_shadow_quality(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_radius(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_radial_offset(const lv_obj_t * obj, lv_part_t part); +bool lv_obj_get_style_clip_corner(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_opa(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_opa_layered(const lv_obj_t * obj, lv_part_t part); +const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_color_filter_opa(const lv_obj_t * obj, lv_part_t part); +lv_color_t lv_obj_get_style_recolor(const lv_obj_t * obj, lv_part_t part); +lv_opa_t lv_obj_get_style_recolor_opa(const lv_obj_t * obj, lv_part_t part); +const lv_anim_t * lv_obj_get_style_anim(const lv_obj_t * obj, lv_part_t part); +uint32_t lv_obj_get_style_anim_duration(const lv_obj_t * obj, lv_part_t part); +const lv_style_transition_dsc_t * lv_obj_get_style_transition(const lv_obj_t * obj, lv_part_t part); +lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t * obj, lv_part_t part); +uint16_t lv_obj_get_style_layout(const lv_obj_t * obj, lv_part_t part); +lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t * obj, lv_part_t part); +const void * lv_obj_get_style_bitmap_mask_src(const lv_obj_t * obj, lv_part_t part); +uint32_t lv_obj_get_style_rotary_sensitivity(const lv_obj_t * obj, lv_part_t part); +lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t * obj, lv_part_t part); +lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t * obj, lv_part_t part); +lv_flex_align_t lv_obj_get_style_flex_cross_place(const lv_obj_t * obj, lv_part_t part); +lv_flex_align_t lv_obj_get_style_flex_track_place(const lv_obj_t * obj, lv_part_t part); +uint8_t lv_obj_get_style_flex_grow(const lv_obj_t * obj, lv_part_t part); +const int32_t * lv_obj_get_style_grid_column_dsc_array(const lv_obj_t * obj, lv_part_t part); +lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t * obj, lv_part_t part); +const int32_t * lv_obj_get_style_grid_row_dsc_array(const lv_obj_t * obj, lv_part_t part); +lv_grid_align_t lv_obj_get_style_grid_row_align(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_grid_cell_column_pos(const lv_obj_t * obj, lv_part_t part); +lv_grid_align_t lv_obj_get_style_grid_cell_x_align(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_grid_cell_column_span(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_grid_cell_row_pos(const lv_obj_t * obj, lv_part_t part); +lv_grid_align_t lv_obj_get_style_grid_cell_y_align(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_grid_cell_row_span(const lv_obj_t * obj, lv_part_t part); void lv_obj_set_style_width(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_min_width(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_max_width(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); @@ -3048,6 +2300,7 @@ void lv_obj_set_style_text_outline_stroke_color(lv_obj_t * obj, lv_color_t value, lv_style_selector_t selector); void lv_obj_set_style_text_outline_stroke_width(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_text_outline_stroke_opa(lv_obj_t * obj, lv_opa_t value, lv_style_selector_t selector); +void lv_obj_set_style_text_leading_trim(lv_obj_t * obj, lv_text_leading_trim_t value, lv_style_selector_t selector); void lv_obj_set_style_blur_radius(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_blur_backdrop(lv_obj_t * obj, bool value, lv_style_selector_t selector); void lv_obj_set_style_blur_quality(lv_obj_t * obj, lv_blur_quality_t value, lv_style_selector_t selector); @@ -3089,96 +2342,22 @@ void lv_obj_set_style_grid_cell_row_pos(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_y_align(lv_obj_t * obj, lv_grid_align_t value, lv_style_selector_t selector); void lv_obj_set_style_grid_cell_row_span(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); -static inline void lv_obj_set_style_pad_all(lv_obj_t * obj, int32_t value, lv_style_selector_t selector) -{ - lv_obj_set_style_pad_left(obj, value, selector); - lv_obj_set_style_pad_right(obj, value, selector); - lv_obj_set_style_pad_top(obj, value, selector); - lv_obj_set_style_pad_bottom(obj, value, selector); -} -static inline void lv_obj_set_style_pad_hor(lv_obj_t * obj, int32_t value, lv_style_selector_t selector) -{ - lv_obj_set_style_pad_left(obj, value, selector); - lv_obj_set_style_pad_right(obj, value, selector); -} -static inline void lv_obj_set_style_pad_ver(lv_obj_t * obj, int32_t value, lv_style_selector_t selector) -{ - lv_obj_set_style_pad_top(obj, value, selector); - lv_obj_set_style_pad_bottom(obj, value, selector); -} -static inline void lv_obj_set_style_margin_all(lv_obj_t * obj, int32_t value, lv_style_selector_t selector) -{ - lv_obj_set_style_margin_left(obj, value, selector); - lv_obj_set_style_margin_right(obj, value, selector); - lv_obj_set_style_margin_top(obj, value, selector); - lv_obj_set_style_margin_bottom(obj, value, selector); -} -static inline void lv_obj_set_style_margin_hor(lv_obj_t * obj, int32_t value, lv_style_selector_t selector) -{ - lv_obj_set_style_margin_left(obj, value, selector); - lv_obj_set_style_margin_right(obj, value, selector); -} -static inline void lv_obj_set_style_margin_ver(lv_obj_t * obj, int32_t value, lv_style_selector_t selector) -{ - lv_obj_set_style_margin_top(obj, value, selector); - lv_obj_set_style_margin_bottom(obj, value, selector); -} -static inline void lv_obj_set_style_pad_gap(lv_obj_t * obj, int32_t value, lv_style_selector_t selector) -{ - lv_obj_set_style_pad_row(obj, value, selector); - lv_obj_set_style_pad_column(obj, value, selector); -} -static inline void lv_obj_set_style_size(lv_obj_t * obj, int32_t width, int32_t height, - lv_style_selector_t selector) -{ - lv_obj_set_style_width(obj, width, selector); - lv_obj_set_style_height(obj, height, selector); -} -static inline void lv_obj_set_style_transform_scale(lv_obj_t * obj, int32_t value, - lv_style_selector_t selector) -{ - lv_obj_set_style_transform_scale_x(obj, value, selector); - lv_obj_set_style_transform_scale_y(obj, value, selector); -} -static inline int32_t lv_obj_get_style_space_left(const lv_obj_t * obj, lv_part_t part) -{ - int32_t padding = lv_obj_get_style_pad_left(obj, part); - int32_t border_width = lv_obj_get_style_border_width(obj, part); - lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); - return (border_side & LV_BORDER_SIDE_LEFT) ? padding + border_width : padding; -} -static inline int32_t lv_obj_get_style_space_right(const lv_obj_t * obj, lv_part_t part) -{ - int32_t padding = lv_obj_get_style_pad_right(obj, part); - int32_t border_width = lv_obj_get_style_border_width(obj, part); - lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); - return (border_side & LV_BORDER_SIDE_RIGHT) ? padding + border_width : padding; -} -static inline int32_t lv_obj_get_style_space_top(const lv_obj_t * obj, lv_part_t part) -{ - int32_t padding = lv_obj_get_style_pad_top(obj, part); - int32_t border_width = lv_obj_get_style_border_width(obj, part); - lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); - return (border_side & LV_BORDER_SIDE_TOP) ? padding + border_width : padding; -} -static inline int32_t lv_obj_get_style_space_bottom(const lv_obj_t * obj, lv_part_t part) -{ - int32_t padding = lv_obj_get_style_pad_bottom(obj, part); - int32_t border_width = lv_obj_get_style_border_width(obj, part); - lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); - return (border_side & LV_BORDER_SIDE_BOTTOM) ? padding + border_width : padding; -} +void lv_obj_set_style_pad_all(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +void lv_obj_set_style_pad_hor(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +void lv_obj_set_style_pad_ver(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +void lv_obj_set_style_margin_all(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +void lv_obj_set_style_margin_hor(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +void lv_obj_set_style_margin_ver(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +void lv_obj_set_style_pad_gap(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +void lv_obj_set_style_size(lv_obj_t * obj, int32_t width, int32_t height, lv_style_selector_t selector); +void lv_obj_set_style_transform_scale(lv_obj_t * obj, int32_t value, lv_style_selector_t selector); +int32_t lv_obj_get_style_space_left(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_space_right(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_space_top(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_space_bottom(const lv_obj_t * obj, lv_part_t part); lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t * obj, lv_part_t part, const char * txt); -static inline int32_t lv_obj_get_style_transform_scale_x_safe(const lv_obj_t * obj, lv_part_t part) -{ - int32_t scale = lv_obj_get_style_transform_scale_x(obj, part); - return scale > 0 ? scale : 1; -} -static inline int32_t lv_obj_get_style_transform_scale_y_safe(const lv_obj_t * obj, lv_part_t part) -{ - int32_t scale = lv_obj_get_style_transform_scale_y(obj, part); - return scale > 0 ? scale : 1; -} +int32_t lv_obj_get_style_transform_scale_x_safe(const lv_obj_t * obj, lv_part_t part); +int32_t lv_obj_get_style_transform_scale_y_safe(const lv_obj_t * obj, lv_part_t part); lv_opa_t lv_obj_get_style_opa_recursive(const lv_obj_t * obj, lv_part_t part); lv_color32_t lv_obj_style_apply_recolor(const lv_obj_t * obj, lv_part_t part, lv_color32_t color); lv_color32_t lv_obj_get_style_recolor_recursive(const lv_obj_t * obj, lv_part_t part); @@ -3186,118 +2365,6 @@ lv_subject_t * subject, int32_t ref_value); lv_observer_t * lv_obj_bind_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_style_selector_t selector, lv_subject_t * subject); -typedef enum { - LV_FS_RES_OK = 0, - LV_FS_RES_HW_ERR, - LV_FS_RES_FS_ERR, - LV_FS_RES_NOT_EX, - LV_FS_RES_FULL, - LV_FS_RES_LOCKED, - LV_FS_RES_DENIED, - LV_FS_RES_BUSY, - LV_FS_RES_TOUT, - LV_FS_RES_NOT_IMP, - LV_FS_RES_OUT_OF_MEM, - LV_FS_RES_INV_PARAM, - LV_FS_RES_DRIVE_LETTER_ALREADY_USED, - LV_FS_RES_UNKNOWN, -} lv_fs_res_t; -typedef enum { - LV_FS_MODE_WR = 0x01, - LV_FS_MODE_RD = 0x02, -} lv_fs_mode_t; -typedef enum { - LV_FS_SEEK_SET = 0x00, - LV_FS_SEEK_CUR = 0x01, - LV_FS_SEEK_END = 0x02, -} lv_fs_whence_t; -struct _lv_fs_drv_t; -typedef struct _lv_fs_drv_t lv_fs_drv_t; -struct _lv_fs_drv_t { - char letter; - uint32_t cache_size; - bool (*ready_cb)(lv_fs_drv_t * drv); - void(*remove_cb)(lv_fs_drv_t * drv); - void * (*open_cb)(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode); - lv_fs_res_t (*close_cb)(lv_fs_drv_t * drv, void * file_p); - lv_fs_res_t (*read_cb)(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); - lv_fs_res_t (*write_cb)(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw); - lv_fs_res_t (*seek_cb)(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); - lv_fs_res_t (*tell_cb)(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); - void * (*dir_open_cb)(lv_fs_drv_t * drv, const char * path); - lv_fs_res_t (*dir_read_cb)(lv_fs_drv_t * drv, void * rddir_p, char * fn, uint32_t fn_len); - lv_fs_res_t (*dir_close_cb)(lv_fs_drv_t * drv, void * rddir_p); - void * user_data; -}; -typedef struct { - void * file_d; - lv_fs_drv_t * drv; - lv_fs_file_cache_t * cache; -} lv_fs_file_t; -typedef struct { - void * dir_d; - lv_fs_drv_t * drv; -} lv_fs_dir_t; -typedef struct { - char path[64]; -} lv_fs_path_ex_t; -void lv_fs_drv_init(lv_fs_drv_t * drv); -void lv_fs_drv_register(lv_fs_drv_t * drv); -lv_fs_drv_t * lv_fs_get_drv(char letter); -void lv_fs_remove_drive(char letter); -bool lv_fs_is_ready(char letter); -lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode); -void lv_fs_make_path_from_buffer(lv_fs_path_ex_t * path, char letter, const void * buf, uint32_t size, - const char * ext); -lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t * path, void ** buffer, uint32_t * size); -lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p); -lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br); -lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, uint32_t * bw); -lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence); -lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos); -lv_fs_res_t lv_fs_get_size(lv_fs_file_t * file_p, uint32_t * size_res); -lv_fs_res_t lv_fs_path_get_size(const char * path, uint32_t * size_res); -lv_fs_res_t lv_fs_load_to_buf(void * buf, uint32_t buf_size, const char * path); -void * lv_fs_load_with_alloc(const char * path, uint32_t * size); -lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path); -lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn, uint32_t fn_len); -lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p); -char * lv_fs_get_letters(char * buf); -const char * lv_fs_get_ext(const char * fn); -char * lv_fs_up(char * path); -const char * lv_fs_get_last(const char * path); -int lv_fs_path_join(char * buf, size_t buf_sz, const char * base, const char * end); -typedef enum { - LV_IMAGE_SRC_VARIABLE, - LV_IMAGE_SRC_FILE, - LV_IMAGE_SRC_SYMBOL, - LV_IMAGE_SRC_UNKNOWN, -} lv_image_src_t; -typedef lv_result_t (*lv_image_decoder_info_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, - lv_image_header_t * header); -typedef lv_result_t (*lv_image_decoder_open_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); -typedef lv_result_t (*lv_image_decoder_get_area_cb_t)(lv_image_decoder_t * decoder, - lv_image_decoder_dsc_t * dsc, - const lv_area_t * full_area, lv_area_t * decoded_area); -typedef void (*lv_image_decoder_close_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); -typedef void (*lv_image_decoder_custom_draw_t)(lv_layer_t * layer, const lv_image_decoder_dsc_t * dsc, - const lv_area_t * coords, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * clip_area); -lv_result_t lv_image_decoder_get_info(const void * src, lv_image_header_t * header); -lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src, const lv_image_decoder_args_t * args); -lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t * dsc, const lv_area_t * full_area, - lv_area_t * decoded_area); -void lv_image_decoder_close(lv_image_decoder_dsc_t * dsc); -lv_image_decoder_t * lv_image_decoder_create(void); -void lv_image_decoder_delete(lv_image_decoder_t * decoder); -lv_image_decoder_t * lv_image_decoder_get_next(lv_image_decoder_t * decoder); -void lv_image_decoder_set_info_cb(lv_image_decoder_t * decoder, lv_image_decoder_info_f_t info_cb); -void lv_image_decoder_set_open_cb(lv_image_decoder_t * decoder, lv_image_decoder_open_f_t open_cb); -void lv_image_decoder_set_get_area_cb(lv_image_decoder_t * decoder, lv_image_decoder_get_area_cb_t read_line_cb); -void lv_image_decoder_set_close_cb(lv_image_decoder_t * decoder, lv_image_decoder_close_f_t close_cb); -lv_cache_entry_t * lv_image_decoder_add_to_cache(lv_image_decoder_t * decoder, - lv_image_cache_data_t * search_key, - const lv_draw_buf_t * decoded, void * user_data); -lv_draw_buf_t * lv_image_decoder_post_process(lv_image_decoder_dsc_t * dsc, lv_draw_buf_t * decoded); typedef enum { LV_DRAW_TASK_TYPE_NONE = 0, LV_DRAW_TASK_TYPE_FILL, @@ -3320,10 +2387,12 @@ LV_DRAW_TASK_STATE_QUEUED, LV_DRAW_TASK_STATE_IN_PROGRESS, LV_DRAW_TASK_STATE_FINISHED, + LV_DRAW_TASK_STATE_FAILED, } lv_draw_task_state_t; struct _lv_layer_t { lv_draw_buf_t * draw_buf; lv_draw_task_t * draw_task_head; + lv_display_t * display; lv_layer_t * parent; lv_layer_t * next; void * user_data; @@ -3335,6 +2404,7 @@ lv_color_format_t color_format; bool all_tasks_added; lv_opa_t opa; + bool buffer_owned; }; typedef struct { lv_obj_t * obj; @@ -3379,6 +2449,9 @@ lv_layer_t * lv_draw_layer_create_drop_shadow(lv_layer_t * parent_layer, const lv_draw_dsc_base_t * base, const lv_area_t * area); void lv_draw_layer_finish_drop_shadow(lv_layer_t * drop_shadow_layer, const lv_draw_dsc_base_t * base); +void lv_draw_layer_dealloc_buf(lv_layer_t * layer); +void lv_draw_layer_deinit(lv_layer_t * layer); +void lv_draw_layer_delete(lv_layer_t * layer); enum {ENUM_LV_RADIUS_CIRCLE = 0x7FFF}; typedef struct { lv_draw_dsc_base_t base; @@ -3476,39 +2549,149 @@ int32_t outline_stroke_width; } lv_draw_label_dsc_t; typedef struct { - lv_draw_dsc_base_t base; - uint32_t unicode; - const lv_font_t * font; - lv_color_t color; - int32_t rotation; - int32_t scale_x; - int32_t scale_y; - int32_t skew_x; - int32_t skew_y; - lv_point_t pivot; - lv_opa_t opa; - lv_text_decor_t decor : 3; - lv_blend_mode_t blend_mode : 4; - lv_opa_t outline_stroke_opa; - int32_t outline_stroke_width; - lv_color_t outline_stroke_color; -} lv_draw_letter_dsc_t; -typedef void(*lv_draw_glyph_cb_t)(lv_draw_task_t * t, lv_draw_glyph_dsc_t * dsc, lv_draw_fill_dsc_t * fill_dsc, - const lv_area_t * fill_area); -void lv_draw_letter_dsc_init(lv_draw_letter_dsc_t * dsc); -void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc); -lv_draw_label_dsc_t * lv_draw_task_get_label_dsc(lv_draw_task_t * task); -void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t * dsc); -void lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc, - const lv_area_t * coords); -void lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc, - const lv_point_t * point, uint32_t unicode_letter); -void lv_draw_letter(lv_layer_t * layer, lv_draw_letter_dsc_t * dsc, - const lv_point_t * point); -void lv_draw_label_iterate_characters(lv_draw_task_t * t, const lv_draw_label_dsc_t * dsc, - const lv_area_t * coords, lv_draw_glyph_cb_t cb); -void lv_draw_unit_draw_letter(lv_draw_task_t * t, lv_draw_glyph_dsc_t * dsc, const lv_point_t * pos, - const lv_font_t * font, uint32_t letter, lv_draw_glyph_cb_t cb); + lv_draw_dsc_base_t base; + uint32_t unicode; + const lv_font_t * font; + lv_color_t color; + int32_t rotation; + int32_t scale_x; + int32_t scale_y; + int32_t skew_x; + int32_t skew_y; + lv_point_t pivot; + lv_opa_t opa; + lv_text_decor_t decor : 3; + lv_blend_mode_t blend_mode : 4; + lv_opa_t outline_stroke_opa; + int32_t outline_stroke_width; + lv_color_t outline_stroke_color; +} lv_draw_letter_dsc_t; +typedef void(*lv_draw_glyph_cb_t)(lv_draw_task_t * t, lv_draw_glyph_dsc_t * dsc, lv_draw_fill_dsc_t * fill_dsc, + const lv_area_t * fill_area); +void lv_draw_letter_dsc_init(lv_draw_letter_dsc_t * dsc); +void lv_draw_label_dsc_init(lv_draw_label_dsc_t * dsc); +lv_draw_label_dsc_t * lv_draw_task_get_label_dsc(lv_draw_task_t * task); +void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t * dsc); +void lv_draw_label(lv_layer_t * layer, const lv_draw_label_dsc_t * dsc, + const lv_area_t * coords); +void lv_draw_character(lv_layer_t * layer, lv_draw_label_dsc_t * dsc, + const lv_point_t * point, uint32_t unicode_letter); +void lv_draw_letter(lv_layer_t * layer, lv_draw_letter_dsc_t * dsc, + const lv_point_t * point); +void lv_draw_label_iterate_characters(lv_draw_task_t * t, const lv_draw_label_dsc_t * dsc, + const lv_area_t * coords, lv_draw_glyph_cb_t cb); +void lv_draw_unit_draw_letter(lv_draw_task_t * t, lv_draw_glyph_dsc_t * dsc, const lv_point_t * pos, + const lv_font_t * font, uint32_t letter, lv_draw_glyph_cb_t cb); +typedef enum { + LV_FS_RES_OK = 0, + LV_FS_RES_HW_ERR, + LV_FS_RES_FS_ERR, + LV_FS_RES_NOT_EX, + LV_FS_RES_FULL, + LV_FS_RES_LOCKED, + LV_FS_RES_DENIED, + LV_FS_RES_BUSY, + LV_FS_RES_TOUT, + LV_FS_RES_NOT_IMP, + LV_FS_RES_OUT_OF_MEM, + LV_FS_RES_INV_PARAM, + LV_FS_RES_DRIVE_LETTER_ALREADY_USED, + LV_FS_RES_UNKNOWN, +} lv_fs_res_t; +typedef enum { + LV_FS_MODE_WR = 0x01, + LV_FS_MODE_RD = 0x02, +} lv_fs_mode_t; +typedef enum { + LV_FS_SEEK_SET = 0x00, + LV_FS_SEEK_CUR = 0x01, + LV_FS_SEEK_END = 0x02, +} lv_fs_whence_t; +struct _lv_fs_drv_t; +typedef struct _lv_fs_drv_t lv_fs_drv_t; +struct _lv_fs_drv_t { + char letter; + uint32_t cache_size; + bool (*ready_cb)(lv_fs_drv_t * drv); + void(*remove_cb)(lv_fs_drv_t * drv); + void * (*open_cb)(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode); + lv_fs_res_t (*close_cb)(lv_fs_drv_t * drv, void * file_p); + lv_fs_res_t (*read_cb)(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); + lv_fs_res_t (*write_cb)(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw); + lv_fs_res_t (*seek_cb)(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence); + lv_fs_res_t (*tell_cb)(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); + void * (*dir_open_cb)(lv_fs_drv_t * drv, const char * path); + lv_fs_res_t (*dir_read_cb)(lv_fs_drv_t * drv, void * rddir_p, char * fn, uint32_t fn_len); + lv_fs_res_t (*dir_close_cb)(lv_fs_drv_t * drv, void * rddir_p); + void * user_data; +}; +typedef struct { + void * file_d; + lv_fs_drv_t * drv; + lv_fs_file_cache_t * cache; +} lv_fs_file_t; +typedef struct { + void * dir_d; + lv_fs_drv_t * drv; +} lv_fs_dir_t; +typedef struct { + char path[64]; +} lv_fs_path_ex_t; +void lv_fs_drv_init(lv_fs_drv_t * drv); +void lv_fs_drv_register(lv_fs_drv_t * drv); +lv_fs_drv_t * lv_fs_get_drv(char letter); +void lv_fs_remove_drive(char letter); +bool lv_fs_is_ready(char letter); +lv_fs_res_t lv_fs_open(lv_fs_file_t * file_p, const char * path, lv_fs_mode_t mode); +void lv_fs_make_path_from_buffer(lv_fs_path_ex_t * path, char letter, const void * buf, uint32_t size, + const char * ext); +lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t * path, void ** buffer, uint32_t * size); +lv_fs_res_t lv_fs_close(lv_fs_file_t * file_p); +lv_fs_res_t lv_fs_read(lv_fs_file_t * file_p, void * buf, uint32_t btr, uint32_t * br); +lv_fs_res_t lv_fs_write(lv_fs_file_t * file_p, const void * buf, uint32_t btw, uint32_t * bw); +lv_fs_res_t lv_fs_seek(lv_fs_file_t * file_p, uint32_t pos, lv_fs_whence_t whence); +lv_fs_res_t lv_fs_tell(lv_fs_file_t * file_p, uint32_t * pos); +lv_fs_res_t lv_fs_get_size(lv_fs_file_t * file_p, uint32_t * size_res); +lv_fs_res_t lv_fs_path_get_size(const char * path, uint32_t * size_res); +lv_fs_res_t lv_fs_load_to_buf(void * buf, uint32_t buf_size, const char * path); +void * lv_fs_load_with_alloc(const char * path, uint32_t * size); +lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t * rddir_p, const char * path); +lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t * rddir_p, char * fn, uint32_t fn_len); +lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p); +char * lv_fs_get_letters(char * buf); +const char * lv_fs_get_ext(const char * fn); +char * lv_fs_up(char * path); +const char * lv_fs_get_last(const char * path); +int lv_fs_path_join(char * buf, size_t buf_sz, const char * base, const char * end); +typedef enum { + LV_IMAGE_SRC_VARIABLE, + LV_IMAGE_SRC_FILE, + LV_IMAGE_SRC_SYMBOL, + LV_IMAGE_SRC_UNKNOWN, +} lv_image_src_t; +typedef lv_result_t (*lv_image_decoder_info_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, + lv_image_header_t * header); +typedef lv_result_t (*lv_image_decoder_open_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); +typedef lv_result_t (*lv_image_decoder_get_area_cb_t)(lv_image_decoder_t * decoder, + lv_image_decoder_dsc_t * dsc, + const lv_area_t * full_area, lv_area_t * decoded_area); +typedef void (*lv_image_decoder_close_f_t)(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); +typedef void (*lv_image_decoder_custom_draw_t)(lv_layer_t * layer, const lv_image_decoder_dsc_t * dsc, + const lv_area_t * coords, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * clip_area); +lv_result_t lv_image_decoder_get_info(const void * src, lv_image_header_t * header); +lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t * dsc, const void * src, const lv_image_decoder_args_t * args); +lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t * dsc, const lv_area_t * full_area, + lv_area_t * decoded_area); +void lv_image_decoder_close(lv_image_decoder_dsc_t * dsc); +lv_image_decoder_t * lv_image_decoder_create(void); +void lv_image_decoder_delete(lv_image_decoder_t * decoder); +lv_image_decoder_t * lv_image_decoder_get_next(lv_image_decoder_t * decoder); +void lv_image_decoder_set_info_cb(lv_image_decoder_t * decoder, lv_image_decoder_info_f_t info_cb); +void lv_image_decoder_set_open_cb(lv_image_decoder_t * decoder, lv_image_decoder_open_f_t open_cb); +void lv_image_decoder_set_get_area_cb(lv_image_decoder_t * decoder, lv_image_decoder_get_area_cb_t get_area_cb); +void lv_image_decoder_set_close_cb(lv_image_decoder_t * decoder, lv_image_decoder_close_f_t close_cb); +lv_draw_buf_t * lv_image_decoder_post_process(lv_image_decoder_dsc_t * dsc, lv_draw_buf_t * decoded); +void lv_image_cache_drop(const void * src); struct _lv_draw_image_dsc_t { lv_draw_dsc_base_t base; const void * src; @@ -3607,6 +2790,7 @@ void lv_obj_init_draw_line_dsc(lv_obj_t * obj, lv_part_t part, lv_draw_line_dsc_t * draw_dsc); void lv_obj_init_draw_arc_dsc(lv_obj_t * obj, lv_part_t part, lv_draw_arc_dsc_t * draw_dsc); void lv_obj_init_draw_blur_dsc(lv_obj_t * obj, lv_part_t part, lv_draw_blur_dsc_t * draw_dsc); +void lv_obj_set_ext_draw_size(lv_obj_t * obj, int32_t size); int32_t lv_obj_calculate_ext_draw_size(lv_obj_t * obj, lv_part_t part); void lv_obj_refresh_ext_draw_size(lv_obj_t * obj); typedef enum { @@ -3626,57 +2810,8 @@ typedef void (*lv_obj_class_event_cb_t)(lv_obj_class_t * class_p, lv_event_t * e); lv_obj_t * lv_obj_class_create_obj(const lv_obj_class_t * class_p, lv_obj_t * parent); void lv_obj_class_init_obj(lv_obj_t * obj); -bool lv_obj_is_editable(lv_obj_t * obj); -bool lv_obj_is_group_def(lv_obj_t * obj); -typedef enum { - LV_KEY_UP = 17, - LV_KEY_DOWN = 18, - LV_KEY_RIGHT = 19, - LV_KEY_LEFT = 20, - LV_KEY_ESC = 27, - LV_KEY_DEL = 127, - LV_KEY_BACKSPACE = 8, - LV_KEY_ENTER = 10, - LV_KEY_NEXT = 9, - LV_KEY_PREV = 11, - LV_KEY_HOME = 2, - LV_KEY_END = 3, -} lv_key_t; -typedef void (*lv_group_focus_cb_t)(lv_group_t *); -typedef void (*lv_group_edge_cb_t)(lv_group_t *, bool); -typedef enum { - LV_GROUP_REFOCUS_POLICY_NEXT = 0, - LV_GROUP_REFOCUS_POLICY_PREV = 1 -} lv_group_refocus_policy_t; -lv_group_t * lv_group_create(void); -void lv_group_delete(lv_group_t * group); -void lv_group_set_default(lv_group_t * group); -lv_group_t * lv_group_get_default(void); -void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj); -void lv_group_swap_obj(lv_obj_t * obj1, lv_obj_t * obj2); -void lv_group_remove_obj(lv_obj_t * obj); -void lv_group_remove_all_objs(lv_group_t * group); -void lv_group_focus_obj(lv_obj_t * obj); -void lv_group_focus_next(lv_group_t * group); -void lv_group_focus_prev(lv_group_t * group); -void lv_group_focus_freeze(lv_group_t * group, bool en); -lv_result_t lv_group_send_data(lv_group_t * group, uint32_t c); -void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb); -void lv_group_set_edge_cb(lv_group_t * group, lv_group_edge_cb_t edge_cb); -void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy); -void lv_group_set_editing(lv_group_t * group, bool edit); -void lv_group_set_wrap(lv_group_t * group, bool en); -lv_obj_t * lv_group_get_focused(const lv_group_t * group); -lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group); -lv_group_edge_cb_t lv_group_get_edge_cb(const lv_group_t * group); -bool lv_group_get_editing(const lv_group_t * group); -bool lv_group_get_wrap(lv_group_t * group); -uint32_t lv_group_get_obj_count(lv_group_t * group); -lv_obj_t * lv_group_get_obj_by_index(lv_group_t * group, uint32_t index); -uint32_t lv_group_get_count(void); -lv_group_t * lv_group_by_index(uint32_t index); -void lv_group_set_user_data(lv_group_t * group, void * user_data); -void * lv_group_get_user_data(const lv_group_t * group); +bool lv_obj_is_editable(const lv_obj_t * obj); +bool lv_obj_is_group_def(const lv_obj_t * obj); typedef enum { LV_INDEV_TYPE_NONE, LV_INDEV_TYPE_POINTER, @@ -3729,6 +2864,7 @@ void lv_indev_set_display(lv_indev_t * indev, struct _lv_display_t * disp); void lv_indev_set_long_press_time(lv_indev_t * indev, uint16_t long_press_time); void lv_indev_set_long_press_repeat_time(lv_indev_t * indev, uint16_t long_press_repeat_time); +void lv_indev_set_double_click_time(lv_indev_t * indev, uint16_t double_click_time); void lv_indev_set_scroll_limit(lv_indev_t * indev, uint8_t scroll_limit); void lv_indev_set_scroll_throw(lv_indev_t * indev, uint8_t scroll_throw); void lv_indev_set_gesture_min_velocity(lv_indev_t * indev, uint8_t min_velocity); @@ -3761,13 +2897,17 @@ void lv_indev_set_mode(lv_indev_t * indev, lv_indev_mode_t mode); lv_indev_mode_t lv_indev_get_mode(lv_indev_t * indev); lv_obj_t * lv_indev_search_obj(lv_obj_t * obj, lv_point_t * point); -void lv_indev_add_event_cb(lv_indev_t * indev, lv_event_cb_t event_cb, lv_event_code_t filter, void * user_data); +lv_event_dsc_t * lv_indev_add_event_cb(lv_indev_t * indev, lv_event_cb_t event_cb, lv_event_code_t filter, + void * user_data); uint32_t lv_indev_get_event_count(lv_indev_t * indev); lv_event_dsc_t * lv_indev_get_event_dsc(lv_indev_t * indev, uint32_t index); bool lv_indev_remove_event(lv_indev_t * indev, uint32_t index); uint32_t lv_indev_remove_event_cb_with_user_data(lv_indev_t * indev, lv_event_cb_t event_cb, void * user_data); lv_result_t lv_indev_send_event(lv_indev_t * indev, lv_event_code_t code, void * param); void lv_indev_set_key_remap_cb(lv_indev_t * indev, lv_indev_key_remap_cb_t remap_cb); +void lv_indev_set_ccw(lv_indev_t * indev); +void lv_indev_clear_ccw(lv_indev_t * indev); +bool lv_indev_get_ccw(const lv_indev_t * indev); typedef enum { LV_COVER_RES_COVER = 0, LV_COVER_RES_NOT_COVER = 1, @@ -3797,6 +2937,7 @@ void lv_event_set_cover_res(lv_event_t * e, lv_cover_res_t res); lv_draw_task_t * lv_event_get_draw_task(lv_event_t * e); lv_state_t lv_event_get_prev_state(lv_event_t * e); +typedef void(*lv_delete_cb_t)(void * user_data); typedef enum { LV_OBJ_FLAG_HIDDEN = (1u << 0), LV_OBJ_FLAG_CLICKABLE = (1u << 1), @@ -3834,36 +2975,137 @@ } lv_obj_flag_t; extern const lv_obj_class_t lv_obj_class; lv_obj_t * lv_obj_create(lv_obj_t * parent); + void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f); + void lv_obj_remove_flag(lv_obj_t * obj, lv_obj_flag_t f); + void lv_obj_set_flag(lv_obj_t * obj, lv_obj_flag_t f, bool v); +void lv_obj_set_hidden(lv_obj_t * obj, bool en); +void lv_obj_set_clickable(lv_obj_t * obj, bool en); +void lv_obj_set_click_focusable(lv_obj_t * obj, bool en); +void lv_obj_set_checkable(lv_obj_t * obj, bool en); +void lv_obj_set_scrollable(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_elastic(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_momentum(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_one(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_chain(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_chain_hor(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_chain_ver(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_on_focus(lv_obj_t * obj, bool en); +void lv_obj_set_scroll_with_arrow(lv_obj_t * obj, bool en); +void lv_obj_set_snappable(lv_obj_t * obj, bool en); +void lv_obj_set_press_lock(lv_obj_t * obj, bool en); +void lv_obj_set_event_bubble(lv_obj_t * obj, bool en); +void lv_obj_set_gesture_bubble(lv_obj_t * obj, bool en); +void lv_obj_set_adv_hittest(lv_obj_t * obj, bool en); +void lv_obj_set_ignore_layout(lv_obj_t * obj, bool en); +void lv_obj_set_floating(lv_obj_t * obj, bool en); +void lv_obj_set_send_draw_task_events(lv_obj_t * obj, bool en); +void lv_obj_set_overflow_visible(lv_obj_t * obj, bool en); +void lv_obj_set_event_trickle(lv_obj_t * obj, bool en); +void lv_obj_set_state_trickle(lv_obj_t * obj, bool en); +void lv_obj_set_radio_button(lv_obj_t * obj, bool en); +void lv_obj_set_flex_in_new_track(lv_obj_t * obj, bool en); void lv_obj_add_state(lv_obj_t * obj, lv_state_t state); void lv_obj_remove_state(lv_obj_t * obj, lv_state_t state); void lv_obj_set_state(lv_obj_t * obj, lv_state_t state, bool v); +void lv_obj_set_alt(lv_obj_t * obj, bool en); +void lv_obj_set_checked(lv_obj_t * obj, bool en); +void lv_obj_set_focused(lv_obj_t * obj, bool en); +void lv_obj_set_focus_key(lv_obj_t * obj, bool en); +void lv_obj_set_edited(lv_obj_t * obj, bool en); +void lv_obj_set_hovered(lv_obj_t * obj, bool en); +void lv_obj_set_pressed(lv_obj_t * obj, bool en); +void lv_obj_set_scrolled(lv_obj_t * obj, bool en); +void lv_obj_set_disabled(lv_obj_t * obj, bool en); +void lv_obj_set_state_user_1(lv_obj_t * obj, bool en); +void lv_obj_set_state_user_2(lv_obj_t * obj, bool en); +void lv_obj_set_state_user_3(lv_obj_t * obj, bool en); +void lv_obj_set_state_user_4(lv_obj_t * obj, bool en); void lv_obj_set_user_data(lv_obj_t * obj, void * user_data); -void lv_obj_set_radio_button(lv_obj_t * obj, bool en); +void lv_obj_set_user_flag(lv_obj_t * obj, uint32_t bit, bool v); + bool lv_obj_has_flag(const lv_obj_t * obj, lv_obj_flag_t f); + bool lv_obj_has_flag_any(const lv_obj_t * obj, lv_obj_flag_t f); +bool lv_obj_is_hidden(const lv_obj_t * obj); +bool lv_obj_is_clickable(const lv_obj_t * obj); +bool lv_obj_is_click_focusable(const lv_obj_t * obj); +bool lv_obj_is_checkable(const lv_obj_t * obj); +bool lv_obj_is_scrollable(const lv_obj_t * obj); +bool lv_obj_is_scroll_elastic(const lv_obj_t * obj); +bool lv_obj_is_scroll_momentum(const lv_obj_t * obj); +bool lv_obj_is_scroll_one(const lv_obj_t * obj); +bool lv_obj_is_scroll_chain_hor(const lv_obj_t * obj); +bool lv_obj_is_scroll_chain_ver(const lv_obj_t * obj); +bool lv_obj_is_scroll_on_focus(const lv_obj_t * obj); +bool lv_obj_is_scroll_with_arrow(const lv_obj_t * obj); +bool lv_obj_is_snappable(const lv_obj_t * obj); +bool lv_obj_is_press_lock(const lv_obj_t * obj); +bool lv_obj_is_event_bubble(const lv_obj_t * obj); +bool lv_obj_is_gesture_bubble(const lv_obj_t * obj); +bool lv_obj_is_adv_hittest(const lv_obj_t * obj); +bool lv_obj_is_ignore_layout(const lv_obj_t * obj); +bool lv_obj_is_floating(const lv_obj_t * obj); +bool lv_obj_is_send_draw_task_events(const lv_obj_t * obj); +bool lv_obj_is_overflow_visible(const lv_obj_t * obj); +bool lv_obj_is_event_trickle(const lv_obj_t * obj); +bool lv_obj_is_state_trickle(const lv_obj_t * obj); +bool lv_obj_is_radio_button(const lv_obj_t * obj); +bool lv_obj_is_flex_in_new_track(const lv_obj_t * obj); lv_state_t lv_obj_get_state(const lv_obj_t * obj); bool lv_obj_has_state(const lv_obj_t * obj, lv_state_t state); -bool lv_obj_is_radio_button(const lv_obj_t * obj); +bool lv_obj_is_alt(const lv_obj_t * obj); +bool lv_obj_is_checked(const lv_obj_t * obj); +bool lv_obj_is_focused(const lv_obj_t * obj); +bool lv_obj_is_focus_key(const lv_obj_t * obj); +bool lv_obj_is_edited(const lv_obj_t * obj); +bool lv_obj_is_hovered(const lv_obj_t * obj); +bool lv_obj_is_pressed(const lv_obj_t * obj); +bool lv_obj_is_scrolled(const lv_obj_t * obj); +bool lv_obj_is_disabled(const lv_obj_t * obj); +bool lv_obj_is_state_user_1(const lv_obj_t * obj); +bool lv_obj_is_state_user_2(const lv_obj_t * obj); +bool lv_obj_is_state_user_3(const lv_obj_t * obj); +bool lv_obj_is_state_user_4(const lv_obj_t * obj); lv_group_t * lv_obj_get_group(const lv_obj_t * obj); void * lv_obj_get_user_data(lv_obj_t * obj); -void lv_obj_allocate_spec_attr(lv_obj_t * obj); +bool lv_obj_get_user_flag(lv_obj_t * obj, uint32_t bit); bool lv_obj_check_type(const lv_obj_t * obj, const lv_obj_class_t * class_p); bool lv_obj_has_class(const lv_obj_t * obj, const lv_obj_class_t * class_p); const lv_obj_class_t * lv_obj_get_class(const lv_obj_t * obj); -bool lv_obj_is_valid(const lv_obj_t * obj); +bool lv_obj_is_in_widget_tree(const lv_obj_t * obj); void lv_obj_null_on_delete(lv_obj_t ** obj_ptr); +lv_delete_dsc_t * lv_obj_add_delete_cb(lv_obj_t * obj, lv_delete_cb_t cb, void * user_data); +void lv_obj_remove_delete_cb(lv_delete_dsc_t * dsc); void lv_obj_add_screen_load_event(lv_obj_t * obj, lv_event_code_t trigger, lv_obj_t * screen, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay); void lv_obj_add_screen_create_event(lv_obj_t * obj, lv_event_code_t trigger, lv_screen_create_cb_t screen_create_cb, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay); void lv_obj_add_play_timeline_event(lv_obj_t * obj, lv_event_code_t trigger, lv_anim_timeline_t * at, uint32_t delay, bool reverse); -void lv_refr_now(lv_display_t * disp); -void lv_obj_redraw(lv_layer_t * layer, lv_obj_t * obj); -void lv_display_refr_timer(lv_timer_t * timer); +typedef uint8_t lv_ll_node_t; +typedef struct { + uint32_t n_size; + lv_ll_node_t * head; + lv_ll_node_t * tail; +} lv_ll_t; +void lv_ll_init(lv_ll_t * ll_p, uint32_t node_size); +void * lv_ll_ins_head(lv_ll_t * ll_p); +void * lv_ll_ins_prev(lv_ll_t * ll_p, void * n_act); +void * lv_ll_ins_tail(lv_ll_t * ll_p); +void lv_ll_remove(lv_ll_t * ll_p, void * node_p); +void lv_ll_clear_custom(lv_ll_t * ll_p, void(*cleanup)(void *)); +void lv_ll_clear(lv_ll_t * ll_p); +void lv_ll_chg_list(lv_ll_t * ll_ori_p, lv_ll_t * ll_new_p, void * node, bool head); +void * lv_ll_get_head(const lv_ll_t * ll_p); +void * lv_ll_get_tail(const lv_ll_t * ll_p); +void * lv_ll_get_next(const lv_ll_t * ll_p, const void * n_act); +void * lv_ll_get_prev(const lv_ll_t * ll_p, const void * n_act); +uint32_t lv_ll_get_len(const lv_ll_t * ll_p); +void lv_ll_move_before(lv_ll_t * ll_p, void * n_act, void * n_after); +bool lv_ll_is_empty(lv_ll_t * ll_p); typedef enum { LV_SUBJECT_TYPE_INVALID = 0, LV_SUBJECT_TYPE_NONE = 1, @@ -3892,32 +3134,49 @@ uint32_t notify_restart_query : 1; }; typedef void (*lv_observer_cb_t)(lv_observer_t * observer, lv_subject_t * subject); +typedef void (*lv_obj_set_bool_t)(lv_obj_t * obj, bool value); +typedef void (*lv_obj_set_int_t)(lv_obj_t * obj, int32_t value); +typedef void (*lv_obj_set_float_t)(lv_obj_t * obj, float value); +typedef void (*lv_obj_set_string_t)(lv_obj_t * obj, const char * value); +typedef void (*lv_obj_set_color_t)(lv_obj_t * obj, lv_color_t value); +typedef void (*lv_obj_set_pointer_t)(lv_obj_t * obj, const void * value); +lv_subject_t * lv_subject_create(lv_subject_type_t type); +void lv_subject_delete(lv_subject_t * subject); + void lv_subject_init_int(lv_subject_t * subject, int32_t value); void lv_subject_set_int(lv_subject_t * subject, int32_t value); int32_t lv_subject_get_int(lv_subject_t * subject); int32_t lv_subject_get_previous_int(lv_subject_t * subject); void lv_subject_set_min_value_int(lv_subject_t * subject, int32_t min_value); void lv_subject_set_max_value_int(lv_subject_t * subject, int32_t max_value); + void lv_subject_init_float(lv_subject_t * subject, float value); void lv_subject_set_float(lv_subject_t * subject, float value); float lv_subject_get_float(lv_subject_t * subject); float lv_subject_get_previous_float(lv_subject_t * subject); void lv_subject_set_min_value_float(lv_subject_t * subject, float min_value); void lv_subject_set_max_value_float(lv_subject_t * subject, float max_value); + void lv_subject_init_string(lv_subject_t * subject, char * buf, char * prev_buf, size_t size, const char * value); -void lv_subject_copy_string(lv_subject_t * subject, const char * buf); +void lv_subject_set_string_buffer_static(lv_subject_t * subject, char * buf, char * prev_buf, size_t size); +void lv_subject_set_string(lv_subject_t * subject, const char * buf); void lv_subject_snprintf(lv_subject_t * subject, const char * format, ...) ; const char * lv_subject_get_string(lv_subject_t * subject); const char * lv_subject_get_previous_string(lv_subject_t * subject); + void lv_subject_init_pointer(lv_subject_t * subject, void * value); void lv_subject_set_pointer(lv_subject_t * subject, void * ptr); const void * lv_subject_get_pointer(lv_subject_t * subject); const void * lv_subject_get_previous_pointer(lv_subject_t * subject); + void lv_subject_init_color(lv_subject_t * subject, lv_color_t color); void lv_subject_set_color(lv_subject_t * subject, lv_color_t color); lv_color_t lv_subject_get_color(lv_subject_t * subject); lv_color_t lv_subject_get_previous_color(lv_subject_t * subject); + void lv_subject_init_group(lv_subject_t * group_subject, lv_subject_t * list[], uint32_t list_len); +void lv_subject_set_group_list_static(lv_subject_t * subject, lv_subject_t * list[], uint32_t list_len); + void lv_subject_deinit(lv_subject_t * subject); lv_subject_t * lv_subject_get_group_element(lv_subject_t * subject, int32_t index); lv_observer_t * lv_subject_add_observer(lv_subject_t * subject, lv_observer_cb_t observer_cb, void * user_data); @@ -3925,11 +3184,12 @@ void * user_data); lv_observer_t * lv_subject_add_observer_with_target(lv_subject_t * subject, lv_observer_cb_t observer_cb, void * target, void * user_data); -void lv_observer_remove(lv_observer_t * observer); +void lv_observer_delete(lv_observer_t * observer); void lv_obj_remove_from_subject(lv_obj_t * obj, lv_subject_t * subject); void * lv_observer_get_target(lv_observer_t * observer); lv_obj_t * lv_observer_get_target_obj(lv_observer_t * observer); void * lv_observer_get_user_data(const lv_observer_t * observer); +void lv_observer_set_user_data(lv_observer_t * observer, void * user_data); void lv_subject_notify(lv_subject_t * subject); lv_subject_increment_dsc_t * lv_obj_add_subject_increment_event(lv_obj_t * obj, lv_subject_t * subject, lv_event_code_t trigger, int32_t step); @@ -3941,21 +3201,70 @@ void lv_obj_add_subject_set_float_event(lv_obj_t * obj, lv_subject_t * subject, lv_event_code_t trigger, float value); void lv_obj_add_subject_set_string_event(lv_obj_t * obj, lv_subject_t * subject, lv_event_code_t trigger, const char * value); +lv_observer_t * lv_obj_bind_bool(lv_obj_t * obj, lv_subject_t * subject, lv_obj_set_bool_t set_bool_cb); +lv_observer_t * lv_obj_bind_int(lv_obj_t * obj, lv_subject_t * subject, lv_obj_set_int_t set_int_cb); +lv_observer_t * lv_obj_bind_float(lv_obj_t * obj, lv_subject_t * subject, lv_obj_set_float_t set_float_cb); +lv_observer_t * lv_obj_bind_string(lv_obj_t * obj, lv_subject_t * subject, lv_obj_set_string_t set_string_cb); +lv_observer_t * lv_obj_bind_color(lv_obj_t * obj, lv_subject_t * subject, lv_obj_set_color_t set_color_cb); +lv_observer_t * lv_obj_bind_pointer(lv_obj_t * obj, lv_subject_t * subject, lv_obj_set_pointer_t set_pointer_cb); + lv_observer_t * lv_obj_bind_flag_if_eq(lv_obj_t * obj, lv_subject_t * subject, lv_obj_flag_t flag, int32_t ref_value); + lv_observer_t * lv_obj_bind_flag_if_not_eq(lv_obj_t * obj, lv_subject_t * subject, lv_obj_flag_t flag, int32_t ref_value); + lv_observer_t * lv_obj_bind_flag_if_gt(lv_obj_t * obj, lv_subject_t * subject, lv_obj_flag_t flag, int32_t ref_value); + lv_observer_t * lv_obj_bind_flag_if_ge(lv_obj_t * obj, lv_subject_t * subject, lv_obj_flag_t flag, int32_t ref_value); + lv_observer_t * lv_obj_bind_flag_if_lt(lv_obj_t * obj, lv_subject_t * subject, lv_obj_flag_t flag, int32_t ref_value); + lv_observer_t * lv_obj_bind_flag_if_le(lv_obj_t * obj, lv_subject_t * subject, lv_obj_flag_t flag, int32_t ref_value); + lv_observer_t * lv_obj_bind_state_if_eq(lv_obj_t * obj, lv_subject_t * subject, lv_state_t state, int32_t ref_value); + lv_observer_t * lv_obj_bind_state_if_not_eq(lv_obj_t * obj, lv_subject_t * subject, lv_state_t state, int32_t ref_value); + lv_observer_t * lv_obj_bind_state_if_gt(lv_obj_t * obj, lv_subject_t * subject, lv_state_t state, int32_t ref_value); + lv_observer_t * lv_obj_bind_state_if_ge(lv_obj_t * obj, lv_subject_t * subject, lv_state_t state, int32_t ref_value); + lv_observer_t * lv_obj_bind_state_if_lt(lv_obj_t * obj, lv_subject_t * subject, lv_state_t state, int32_t ref_value); + lv_observer_t * lv_obj_bind_state_if_le(lv_obj_t * obj, lv_subject_t * subject, lv_state_t state, int32_t ref_value); lv_observer_t * lv_obj_bind_checked(lv_obj_t * obj, lv_subject_t * subject); +void lv_refr_now(lv_display_t * disp); +void lv_obj_redraw(lv_layer_t * layer, lv_obj_t * obj); +void lv_display_refr_timer(lv_timer_t * timer); +struct _lv_draw_mask_rect_dsc_t { + lv_draw_dsc_base_t base; + lv_area_t area; + int32_t radius; + uint32_t keep_outside : 1; +}; +void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc); +lv_draw_mask_rect_dsc_t * lv_draw_task_get_mask_rect_dsc(lv_draw_task_t * task); +void lv_draw_mask_rect(lv_layer_t * layer, const lv_draw_mask_rect_dsc_t * dsc); +lv_draw_buf_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf); +lv_draw_buf_t * lv_snapshot_create_draw_buf(lv_obj_t * obj, lv_color_format_t cf); +lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t * obj, lv_draw_buf_t * draw_buf); +lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t * obj, lv_color_format_t cf, lv_draw_buf_t * draw_buf); + +void lv_snapshot_free(lv_image_dsc_t * dsc); + +lv_result_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_image_dsc_t * dsc, + void * buf, + uint32_t buf_size); +void lv_draw_i1_to_argb8888(const void * buf_i1, void * buf_argb8888, uint32_t width, uint32_t height, + uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color); +void lv_draw_rgb565_swap(void * buf, uint32_t buf_size_px); +void lv_draw_i1_invert(void * buf, uint32_t buf_size); +void lv_draw_i1_convert_to_vtiled(const void * buf, uint32_t buf_size, uint32_t width, uint32_t height, + void * out_buf, + uint32_t out_buf_size, bool bit_order_lsb); +void lv_draw_rotate(const void * src, void * dest, int32_t src_width, int32_t src_height, int32_t src_stride, + int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format); struct lv_indev_gesture; struct lv_indev_gesture_configuration; typedef struct lv_indev_gesture_recognizer lv_indev_gesture_recognizer_t; @@ -4017,11 +3326,20 @@ const char * path; const void * buffer; uint32_t buffer_size; + bool dynamic_glyph_load; } lv_binfont_font_src_t; +typedef struct { + const char * path; + const void * buffer; + uint32_t buffer_size; + bool dynamic_glyph_load; +} lv_binfont_dsc_t; extern const lv_font_class_t lv_binfont_font_class; lv_font_t * lv_binfont_create(const char * path); +lv_font_t * lv_binfont_create_ex(const lv_binfont_dsc_t * dsc); lv_font_t * lv_binfont_create_from_buffer(void * buffer, uint32_t size); void lv_binfont_destroy(lv_font_t * font); +typedef struct _lv_font_fmt_txt_glyph_loader_t lv_font_fmt_txt_glyph_loader_t; typedef struct { uint32_t bitmap_index : 20; uint32_t adv_w : 12; @@ -4069,11 +3387,12 @@ const lv_font_fmt_txt_cmap_t * cmaps; const void * kern_dsc; uint16_t kern_scale; - uint16_t cmap_num : 9; - uint16_t bpp : 4; - uint16_t kern_classes : 1; - uint16_t bitmap_format : 2; + uint16_t cmap_num; + uint8_t bpp : 4; + uint8_t kern_classes : 1; + uint8_t bitmap_format : 2; uint8_t stride; + bool are_glyphs_dynamic_loaded; } lv_font_fmt_txt_dsc_t; typedef struct { const lv_font_t * font_p; @@ -4088,6 +3407,54 @@ int32_t * offset_y, void * user_data); lv_font_t * lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void * user_data); void lv_imgfont_destroy(lv_font_t * font); +void lv_fs_memfs_init(void); +void lv_bin_decoder_init(void); +lv_result_t lv_bin_decoder_info(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, lv_image_header_t * header); +lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, + const lv_area_t * full_area, lv_area_t * decoded_area); +lv_result_t lv_bin_decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); +void lv_bin_decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); +void lv_lodepng_init(void); +void lv_lodepng_deinit(void); +void lv_tjpgd_init(void); +void lv_tjpgd_deinit(void); +typedef void (*lv_async_cb_t)(void *); +lv_result_t lv_async_call(lv_async_cb_t async_xcb, void * user_data); +lv_result_t lv_async_call_cancel(lv_async_cb_t async_xcb, void * user_data); +void lv_lock(void); +lv_result_t lv_lock_isr(void); +void lv_unlock(void); +void lv_sleep_ms(uint32_t ms); +typedef void (*lv_theme_apply_cb_t)(lv_theme_t *, lv_obj_t *); +lv_theme_t * lv_theme_create(void); +void lv_theme_copy(lv_theme_t * dst, const lv_theme_t * src); +lv_theme_t * lv_theme_get_from_obj(lv_obj_t * obj); +void lv_theme_apply(lv_obj_t * obj); +void lv_theme_set_parent(lv_theme_t * theme, lv_theme_t * parent); +void lv_theme_set_apply_cb(lv_theme_t * theme, lv_theme_apply_cb_t apply_cb); +void lv_theme_set_user_data(lv_theme_t * theme, void * user_data); +const lv_font_t * lv_theme_get_font_small(lv_obj_t * obj); +const lv_font_t * lv_theme_get_font_normal(lv_obj_t * obj); +const lv_font_t * lv_theme_get_font_large(lv_obj_t * obj); +lv_color_t lv_theme_get_color_primary(lv_obj_t * obj); +lv_color_t lv_theme_get_color_secondary(lv_obj_t * obj); +void * lv_theme_get_user_data(const lv_theme_t * theme); +void lv_theme_delete(lv_theme_t * theme); +lv_theme_t * lv_theme_default_init(lv_display_t * disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, + const lv_font_t * font); +bool lv_theme_default_is_inited(void); +lv_theme_t * lv_theme_default_get(void); +void lv_theme_default_deinit(void); +typedef uint32_t (*lv_tick_get_cb_t)(void); +typedef void (*lv_delay_cb_t)(uint32_t ms); + void lv_tick_inc(uint32_t tick_period); +uint32_t lv_tick_get(void); +uint32_t lv_tick_elaps(uint32_t prev_tick); +uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick); +void lv_delay_ms(uint32_t ms); +void lv_delay_set_cb(lv_delay_cb_t cb); +void lv_tick_set_cb(lv_tick_get_cb_t cb); +lv_tick_get_cb_t lv_tick_get_cb(void); extern const lv_obj_class_t lv_image_class; typedef enum { LV_IMAGE_ALIGN_DEFAULT = 0, @@ -4104,6 +3471,7 @@ LV_IMAGE_ALIGN_STRETCH, LV_IMAGE_ALIGN_TILE, LV_IMAGE_ALIGN_CONTAIN, + LV_IMAGE_ALIGN_CONTAIN_DOWNSCALE, LV_IMAGE_ALIGN_COVER, } lv_image_align_t; lv_obj_t * lv_image_create(lv_obj_t * parent); @@ -4254,11 +3622,13 @@ void lv_label_set_text_vfmt(lv_obj_t * obj, const char * fmt, va_list args); void lv_label_set_text_static(lv_obj_t * obj, const char * text); void lv_label_set_long_mode(lv_obj_t * obj, lv_label_long_mode_t long_mode); +void lv_label_set_max_lines(lv_obj_t * obj, int32_t lines); void lv_label_set_text_selection_start(lv_obj_t * obj, uint32_t index); void lv_label_set_text_selection_end(lv_obj_t * obj, uint32_t index); void lv_label_set_recolor(lv_obj_t * obj, bool en); char * lv_label_get_text(const lv_obj_t * obj); lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t * obj); +int32_t lv_label_get_max_lines(const lv_obj_t * obj); void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t * pos); uint32_t lv_label_get_letter_on(const lv_obj_t * obj, lv_point_t * pos_in, bool bidi); bool lv_label_is_char_under_pos(const lv_obj_t * obj, lv_point_t * pos); @@ -4295,6 +3665,47 @@ lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t * obj); bool lv_bar_is_symmetrical(lv_obj_t * obj); lv_observer_t * lv_bar_bind_value(lv_obj_t * obj, lv_subject_t * subject); + extern const lv_obj_class_t lv_canvas_class; +lv_obj_t * lv_canvas_create(lv_obj_t * parent); +void lv_canvas_set_buffer(lv_obj_t * obj, void * buf, int32_t w, int32_t h, lv_color_format_t cf); +void lv_canvas_set_draw_buf(lv_obj_t * obj, lv_draw_buf_t * draw_buf); +void lv_canvas_set_px(lv_obj_t * obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa); +void lv_canvas_set_palette(lv_obj_t * obj, uint8_t index, lv_color32_t color); +lv_draw_buf_t * lv_canvas_get_draw_buf(lv_obj_t * obj); +lv_color32_t lv_canvas_get_px(lv_obj_t * obj, int32_t x, int32_t y); +lv_image_dsc_t * lv_canvas_get_image(lv_obj_t * obj); +const void * lv_canvas_get_buf(lv_obj_t * obj); +void lv_canvas_copy_buf(lv_obj_t * obj, const lv_area_t * canvas_area, lv_draw_buf_t * src_buf, + const lv_area_t * src_area); +void lv_canvas_fill_bg(lv_obj_t * obj, lv_color_t color, lv_opa_t opa); +void lv_canvas_init_layer(lv_obj_t * obj, lv_layer_t * layer); +void lv_canvas_finish_layer(lv_obj_t * canvas, lv_layer_t * layer); +uint32_t lv_canvas_buf_size(int32_t w, int32_t h, uint8_t bpp, uint8_t stride); +typedef enum { + LV_BARCODE_ENCODING_CODE128_GS1, + LV_BARCODE_ENCODING_CODE128_RAW, +} lv_barcode_encoding_t; +typedef enum { + LV_BARCODE_UPDATE_MODE_IMMEDIATE = 0, + LV_BARCODE_UPDATE_MODE_DEFERRED, +} lv_barcode_update_mode_t; + extern const lv_obj_class_t lv_barcode_class; +lv_obj_t * lv_barcode_create(lv_obj_t * parent); +void lv_barcode_set_dark_color(lv_obj_t * obj, lv_color_t color); +void lv_barcode_set_light_color(lv_obj_t * obj, lv_color_t color); +void lv_barcode_set_scale(lv_obj_t * obj, uint16_t scale); +void lv_barcode_set_direction(lv_obj_t * obj, lv_dir_t direction); +void lv_barcode_set_tiled(lv_obj_t * obj, bool tiled); +void lv_barcode_set_encoding(lv_obj_t * obj, lv_barcode_encoding_t encoding); +lv_result_t lv_barcode_update(lv_obj_t * obj, const char * data); +lv_result_t lv_barcode_render(lv_obj_t * obj); +void lv_barcode_set_update_mode(lv_obj_t * obj, lv_barcode_update_mode_t mode); +lv_barcode_update_mode_t lv_barcode_get_update_mode(lv_obj_t * obj); +bool lv_barcode_is_render_valid(lv_obj_t * obj); +lv_color_t lv_barcode_get_dark_color(lv_obj_t * obj); +lv_color_t lv_barcode_get_light_color(lv_obj_t * obj); +uint16_t lv_barcode_get_scale(lv_obj_t * obj); +lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t * obj); extern const lv_obj_class_t lv_button_class; lv_obj_t * lv_button_create(lv_obj_t * parent); enum {ENUM_LV_BUTTONMATRIX_BUTTON_NONE = 0xFFFF}; @@ -4363,32 +3774,16 @@ void lv_calendar_set_highlighted_dates(lv_obj_t * obj, lv_calendar_date_t highlighted[], size_t date_num); void lv_calendar_set_day_names(lv_obj_t * obj, const char ** day_names); lv_obj_t * lv_calendar_get_btnmatrix(const lv_obj_t * obj); -const lv_calendar_date_t * lv_calendar_get_today_date(const lv_obj_t * calendar); -const lv_calendar_date_t * lv_calendar_get_showed_date(const lv_obj_t * calendar); -lv_calendar_date_t * lv_calendar_get_highlighted_dates(const lv_obj_t * calendar); -size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t * calendar); -lv_result_t lv_calendar_get_pressed_date(const lv_obj_t * calendar, lv_calendar_date_t * date); +const lv_calendar_date_t * lv_calendar_get_today_date(const lv_obj_t * obj); +const lv_calendar_date_t * lv_calendar_get_showed_date(const lv_obj_t * obj); +lv_calendar_date_t * lv_calendar_get_highlighted_dates(const lv_obj_t * obj); +size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t * obj); +lv_result_t lv_calendar_get_pressed_date(const lv_obj_t * obj, lv_calendar_date_t * date); extern const lv_obj_class_t lv_calendar_header_arrow_class; lv_obj_t * lv_calendar_add_header_arrow(lv_obj_t * parent); extern const lv_obj_class_t lv_calendar_header_dropdown_class; lv_obj_t * lv_calendar_add_header_dropdown(lv_obj_t * parent); void lv_calendar_header_dropdown_set_year_list(lv_obj_t * parent, const char * years_list); - extern const lv_obj_class_t lv_canvas_class; -lv_obj_t * lv_canvas_create(lv_obj_t * parent); -void lv_canvas_set_buffer(lv_obj_t * obj, void * buf, int32_t w, int32_t h, lv_color_format_t cf); -void lv_canvas_set_draw_buf(lv_obj_t * obj, lv_draw_buf_t * draw_buf); -void lv_canvas_set_px(lv_obj_t * obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa); -void lv_canvas_set_palette(lv_obj_t * obj, uint8_t index, lv_color32_t color); -lv_draw_buf_t * lv_canvas_get_draw_buf(lv_obj_t * obj); -lv_color32_t lv_canvas_get_px(lv_obj_t * obj, int32_t x, int32_t y); -lv_image_dsc_t * lv_canvas_get_image(lv_obj_t * canvas); -const void * lv_canvas_get_buf(lv_obj_t * canvas); -void lv_canvas_copy_buf(lv_obj_t * obj, const lv_area_t * canvas_area, lv_draw_buf_t * src_buf, - const lv_area_t * src_area); -void lv_canvas_fill_bg(lv_obj_t * obj, lv_color_t color, lv_opa_t opa); -void lv_canvas_init_layer(lv_obj_t * canvas, lv_layer_t * layer); -void lv_canvas_finish_layer(lv_obj_t * canvas, lv_layer_t * layer); -uint32_t lv_canvas_buf_size(int32_t w, int32_t h, uint8_t bpp, uint8_t stride); enum {ENUM_LV_CHART_POINT_NONE = (INT32_MAX)}; typedef enum { LV_CHART_TYPE_NONE, @@ -4434,7 +3829,7 @@ void lv_chart_set_series_color(lv_obj_t * chart, lv_chart_series_t * series, lv_color_t color); lv_color_t lv_chart_get_series_color(lv_obj_t * chart, const lv_chart_series_t * series); void lv_chart_set_x_start_point(lv_obj_t * obj, lv_chart_series_t * ser, uint32_t id); -lv_chart_series_t * lv_chart_get_series_next(const lv_obj_t * chart, const lv_chart_series_t * ser); +lv_chart_series_t * lv_chart_get_series_next(const lv_obj_t * obj, const lv_chart_series_t * ser); lv_chart_cursor_t * lv_chart_add_cursor(lv_obj_t * obj, lv_color_t color, lv_dir_t dir); void lv_chart_remove_cursor(lv_obj_t * obj, lv_chart_cursor_t * cursor); void lv_chart_set_cursor_pos(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_point_t * pos); @@ -4538,13 +3933,13 @@ } lv_keyboard_mode_t; extern const lv_obj_class_t lv_keyboard_class; lv_obj_t * lv_keyboard_create(lv_obj_t * parent); -void lv_keyboard_set_textarea(lv_obj_t * kb, lv_obj_t * ta); -void lv_keyboard_set_mode(lv_obj_t * kb, lv_keyboard_mode_t mode); -void lv_keyboard_set_popovers(lv_obj_t * kb, bool en); -void lv_keyboard_set_map(lv_obj_t * kb, lv_keyboard_mode_t mode, const char * const map[], +void lv_keyboard_set_textarea(lv_obj_t * obj, lv_obj_t * ta); +void lv_keyboard_set_mode(lv_obj_t * obj, lv_keyboard_mode_t mode); +void lv_keyboard_set_popovers(lv_obj_t * obj, bool en); +void lv_keyboard_set_map(lv_obj_t * obj, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[]); -lv_obj_t * lv_keyboard_get_textarea(const lv_obj_t * kb); -lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t * kb); +lv_obj_t * lv_keyboard_get_textarea(const lv_obj_t * obj); +lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t * obj); bool lv_keyboard_get_popovers(const lv_obj_t * obj); const char * const * lv_keyboard_get_map_array(const lv_obj_t * kb); uint32_t lv_keyboard_get_selected_button(const lv_obj_t * obj); @@ -4552,11 +3947,11 @@ void lv_keyboard_def_event_cb(lv_event_t * e); extern const lv_obj_class_t lv_led_class; lv_obj_t * lv_led_create(lv_obj_t * parent); -void lv_led_set_color(lv_obj_t * led, lv_color_t color); -void lv_led_set_brightness(lv_obj_t * led, uint8_t bright); +void lv_led_set_color(lv_obj_t * obj, lv_color_t color); +void lv_led_set_brightness(lv_obj_t * obj, uint8_t bright); void lv_led_on(lv_obj_t * led); void lv_led_off(lv_obj_t * led); -void lv_led_toggle(lv_obj_t * led); +void lv_led_toggle(lv_obj_t * obj); uint8_t lv_led_get_brightness(const lv_obj_t * obj); lv_color_t lv_led_get_color(const lv_obj_t * obj); extern const lv_obj_class_t lv_line_class; @@ -4572,10 +3967,15 @@ extern const lv_obj_class_t lv_list_class; extern const lv_obj_class_t lv_list_text_class; extern const lv_obj_class_t lv_list_button_class; + lv_obj_t * lv_list_create(lv_obj_t * parent); + lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt); + lv_obj_t * lv_list_add_button(lv_obj_t * list, const void * icon, const char * txt); + const char * lv_list_get_button_text(lv_obj_t * list, lv_obj_t * btn); + void lv_list_set_button_text(lv_obj_t * list, lv_obj_t * btn, const char * txt); typedef enum { LV_MENU_HEADER_TOP_FIXED, @@ -4595,27 +3995,49 @@ extern const lv_obj_class_t lv_menu_main_cont_class; extern const lv_obj_class_t lv_menu_sidebar_header_cont_class; extern const lv_obj_class_t lv_menu_main_header_cont_class; + lv_obj_t * lv_menu_create(lv_obj_t * parent); + lv_obj_t * lv_menu_page_create(lv_obj_t * menu, char const * const title); + lv_obj_t * lv_menu_cont_create(lv_obj_t * parent); + lv_obj_t * lv_menu_section_create(lv_obj_t * parent); + lv_obj_t * lv_menu_separator_create(lv_obj_t * parent); + void lv_menu_set_page(lv_obj_t * obj, lv_obj_t * page); -void lv_menu_set_page_title(lv_obj_t * page, char const * const title); -void lv_menu_set_page_title_static(lv_obj_t * page, char const * const title); + +void lv_menu_set_page_title(lv_obj_t * page_obj, char const * const title); + +void lv_menu_set_page_title_static(lv_obj_t * page_obj, char const * const title); + void lv_menu_set_sidebar_page(lv_obj_t * obj, lv_obj_t * page); + void lv_menu_set_mode_header(lv_obj_t * obj, lv_menu_mode_header_t mode); + void lv_menu_set_mode_root_back_button(lv_obj_t * obj, lv_menu_mode_root_back_button_t mode); + void lv_menu_set_load_page_event(lv_obj_t * menu, lv_obj_t * obj, lv_obj_t * page); + lv_obj_t * lv_menu_get_cur_main_page(lv_obj_t * obj); + lv_obj_t * lv_menu_get_cur_sidebar_page(lv_obj_t * obj); + lv_obj_t * lv_menu_get_main_header(lv_obj_t * obj); + lv_obj_t * lv_menu_get_main_header_back_button(lv_obj_t * obj); + lv_obj_t * lv_menu_get_sidebar_header(lv_obj_t * obj); + lv_obj_t * lv_menu_get_sidebar_header_back_button(lv_obj_t * obj); + bool lv_menu_back_button_is_root(lv_obj_t * menu, lv_obj_t * obj); + lv_menu_mode_header_t lv_menu_get_mode_header(lv_obj_t * obj); + lv_menu_mode_root_back_button_t lv_menu_get_mode_root_back_button(lv_obj_t * obj); + void lv_menu_clear_history(lv_obj_t * obj); extern const lv_obj_class_t lv_msgbox_class; extern const lv_obj_class_t lv_msgbox_header_class; @@ -4635,8 +4057,24 @@ lv_obj_t * lv_msgbox_get_footer(lv_obj_t * obj); lv_obj_t * lv_msgbox_get_content(lv_obj_t * obj); lv_obj_t * lv_msgbox_get_title(lv_obj_t * obj); -void lv_msgbox_close(lv_obj_t * mbox); -void lv_msgbox_close_async(lv_obj_t * mbox); +void lv_msgbox_close(lv_obj_t * obj); +void lv_msgbox_close_async(lv_obj_t * obj); +typedef enum { + LV_QRCODE_UPDATE_MODE_IMMEDIATE = 0, + LV_QRCODE_UPDATE_MODE_DEFERRED, +} lv_qrcode_update_mode_t; + extern const lv_obj_class_t lv_qrcode_class; +lv_obj_t * lv_qrcode_create(lv_obj_t * parent); +void lv_qrcode_set_size(lv_obj_t * obj, int32_t size); +void lv_qrcode_set_dark_color(lv_obj_t * obj, lv_color_t color); +void lv_qrcode_set_light_color(lv_obj_t * obj, lv_color_t color); +lv_result_t lv_qrcode_update(lv_obj_t * obj, const void * data, uint32_t data_len); +void lv_qrcode_set_data(lv_obj_t * obj, const char * data); +lv_result_t lv_qrcode_render(lv_obj_t * obj); +void lv_qrcode_set_quiet_zone(lv_obj_t * obj, bool enable); +void lv_qrcode_set_update_mode(lv_obj_t * obj, lv_qrcode_update_mode_t mode); +lv_qrcode_update_mode_t lv_qrcode_get_update_mode(lv_obj_t * obj); +bool lv_qrcode_is_render_valid(lv_obj_t * obj); typedef enum { LV_ROLLER_MODE_NORMAL, LV_ROLLER_MODE_INFINITE, @@ -4690,6 +4128,7 @@ void lv_scale_set_section_range(lv_obj_t * scale, lv_scale_section_t * section, int32_t min, int32_t max); void lv_scale_set_section_min_value(lv_obj_t * scale, lv_scale_section_t * section, int32_t min); void lv_scale_set_section_max_value(lv_obj_t * scale, lv_scale_section_t * section, int32_t max); + void lv_scale_section_set_style(lv_scale_section_t * section, lv_part_t part, lv_style_t * section_part_style); void lv_scale_set_section_style_main(lv_obj_t * scale, lv_scale_section_t * section, const lv_style_t * style); void lv_scale_set_section_style_indicator(lv_obj_t * scale, lv_scale_section_t * section, const lv_style_t * style); @@ -4704,6 +4143,9 @@ int32_t lv_scale_get_range_max_value(lv_obj_t * obj); lv_observer_t * lv_scale_bind_section_min_value(lv_obj_t * obj, lv_scale_section_t * section, lv_subject_t * subject); lv_observer_t * lv_scale_bind_section_max_value(lv_obj_t * obj, lv_scale_section_t * section, lv_subject_t * subject); +lv_observer_t * lv_scale_bind_line_needle_value(lv_obj_t * obj, lv_obj_t * needle_line, int32_t needle_length, + lv_subject_t * subject); +lv_observer_t * lv_scale_bind_image_needle_value(lv_obj_t * obj, lv_obj_t * needle_img, lv_subject_t * subject); typedef enum { LV_SLIDER_MODE_NORMAL = LV_BAR_MODE_NORMAL, LV_SLIDER_MODE_SYMMETRICAL = LV_BAR_MODE_SYMMETRICAL, @@ -4729,7 +4171,7 @@ int32_t lv_slider_get_max_value(const lv_obj_t * obj); bool lv_slider_is_dragged(const lv_obj_t * obj); lv_slider_mode_t lv_slider_get_mode(lv_obj_t * slider); -lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t * slider); +lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t * obj); bool lv_slider_is_symmetrical(lv_obj_t * obj); lv_observer_t * lv_slider_bind_value(lv_obj_t * obj, lv_subject_t * subject); typedef enum { @@ -4760,11 +4202,12 @@ void lv_spangroup_set_span_text(lv_obj_t * obj, lv_span_t * span, const char * text); void lv_spangroup_set_span_text_static(lv_obj_t * obj, lv_span_t * span, const char * text); void lv_spangroup_set_span_text_fmt(lv_obj_t * obj, lv_span_t * span, const char * fmt, ...) ; -void lv_span_set_text_static(lv_span_t * span, const char * text); void lv_spangroup_set_span_style(lv_obj_t * obj, lv_span_t * span, const lv_style_t * style); + void lv_spangroup_set_align(lv_obj_t * obj, lv_text_align_t align); void lv_spangroup_set_overflow(lv_obj_t * obj, lv_span_overflow_t overflow); void lv_spangroup_set_indent(lv_obj_t * obj, int32_t indent); + void lv_spangroup_set_mode(lv_obj_t * obj, lv_span_mode_t mode); void lv_spangroup_set_max_lines(lv_obj_t * obj, int32_t lines); lv_style_t * lv_span_get_style(lv_span_t * span); @@ -4780,7 +4223,7 @@ uint32_t lv_spangroup_get_expand_width(lv_obj_t * obj, uint32_t max_width); int32_t lv_spangroup_get_expand_height(lv_obj_t * obj, int32_t width); lv_span_coords_t lv_spangroup_get_span_coords(lv_obj_t * obj, const lv_span_t * span); -lv_span_t * lv_spangroup_get_span_by_point(lv_obj_t * obj, const lv_point_t * point); +lv_span_t * lv_spangroup_get_span_by_point(lv_obj_t * obj, const lv_point_t * p); void lv_spangroup_refresh(lv_obj_t * obj); lv_observer_t * lv_spangroup_bind_span_text(lv_obj_t * obj, lv_span_t * span, lv_subject_t * subject, const char * fmt); enum {ENUM_LV_TEXTAREA_CURSOR_LAST = (0x7FFF)}; @@ -4804,6 +4247,7 @@ void lv_textarea_set_insert_replace(lv_obj_t * obj, const char * txt); void lv_textarea_set_text_selection(lv_obj_t * obj, bool en); void lv_textarea_set_password_show_time(lv_obj_t * obj, uint32_t time); + void lv_textarea_set_align(lv_obj_t * obj, lv_text_align_t align); const char * lv_textarea_get_text(const lv_obj_t * obj); const char * lv_textarea_get_placeholder_text(lv_obj_t * obj); @@ -4912,190 +4356,63 @@ extern const lv_obj_class_t lv_tileview_tile_class; lv_obj_t * lv_tileview_create(lv_obj_t * parent); lv_obj_t * lv_tileview_add_tile(lv_obj_t * tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir); -void lv_tileview_set_tile(lv_obj_t * tv, lv_obj_t * tile_obj, lv_anim_enable_t anim_en); +void lv_tileview_set_tile(lv_obj_t * obj, lv_obj_t * tile_obj, lv_anim_enable_t anim_en); void lv_tileview_set_tile_by_index(lv_obj_t * tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en); lv_obj_t * lv_tileview_get_tile_active(lv_obj_t * obj); extern const lv_obj_class_t lv_win_class; + lv_obj_t * lv_win_create(lv_obj_t * parent); + lv_obj_t * lv_win_add_title(lv_obj_t * win, const char * txt); + lv_obj_t * lv_win_add_button(lv_obj_t * win, const void * icon, int32_t btn_w); + lv_obj_t * lv_win_get_header(lv_obj_t * win); + lv_obj_t * lv_win_get_content(lv_obj_t * win); -typedef enum { - LV_BARCODE_ENCODING_CODE128_GS1, - LV_BARCODE_ENCODING_CODE128_RAW, -} lv_barcode_encoding_t; - extern const lv_obj_class_t lv_barcode_class; -lv_obj_t * lv_barcode_create(lv_obj_t * parent); -void lv_barcode_set_dark_color(lv_obj_t * obj, lv_color_t color); -void lv_barcode_set_light_color(lv_obj_t * obj, lv_color_t color); -void lv_barcode_set_scale(lv_obj_t * obj, uint16_t scale); -void lv_barcode_set_direction(lv_obj_t * obj, lv_dir_t direction); -void lv_barcode_set_tiled(lv_obj_t * obj, bool tiled); -void lv_barcode_set_encoding(lv_obj_t * obj, lv_barcode_encoding_t encoding); -lv_result_t lv_barcode_update(lv_obj_t * obj, const char * data); -lv_color_t lv_barcode_get_dark_color(lv_obj_t * obj); -lv_color_t lv_barcode_get_light_color(lv_obj_t * obj); -uint16_t lv_barcode_get_scale(lv_obj_t * obj); -lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t * obj); -void lv_bin_decoder_init(void); -lv_result_t lv_bin_decoder_info(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, lv_image_header_t * header); -lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc, - const lv_area_t * full_area, lv_area_t * decoded_area); -lv_result_t lv_bin_decoder_open(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); -void lv_bin_decoder_close(lv_image_decoder_t * decoder, lv_image_decoder_dsc_t * dsc); -void lv_fs_memfs_init(void); -void lv_lodepng_init(void); -void lv_lodepng_deinit(void); - extern const lv_obj_class_t lv_qrcode_class; -lv_obj_t * lv_qrcode_create(lv_obj_t * parent); -void lv_qrcode_set_size(lv_obj_t * obj, int32_t size); -void lv_qrcode_set_dark_color(lv_obj_t * obj, lv_color_t color); -void lv_qrcode_set_light_color(lv_obj_t * obj, lv_color_t color); -lv_result_t lv_qrcode_update(lv_obj_t * obj, const void * data, uint32_t data_len); -void lv_qrcode_set_data(lv_obj_t * obj, const char * data); -void lv_qrcode_set_quiet_zone(lv_obj_t * obj, bool enable); -void lv_tjpgd_init(void); -void lv_tjpgd_deinit(void); -void lv_draw_sw_i1_to_argb8888(const void * buf_i1, void * buf_argb8888, uint32_t width, uint32_t height, - uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color); -void lv_draw_sw_rgb565_swap(void * buf, uint32_t buf_size_px); -void lv_draw_sw_i1_invert(void * buf, uint32_t buf_size); -void lv_draw_sw_i1_convert_to_vtiled(const void * buf, uint32_t buf_size, uint32_t width, uint32_t height, - void * out_buf, - uint32_t out_buf_size, bool bit_order_lsb); -void lv_draw_sw_rotate(const void * src, void * dest, int32_t src_width, int32_t src_height, int32_t src_stride, - int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format); -lv_draw_buf_t * lv_snapshot_take(lv_obj_t * obj, lv_color_format_t cf); -lv_draw_buf_t * lv_snapshot_create_draw_buf(lv_obj_t * obj, lv_color_format_t cf); -lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t * obj, lv_draw_buf_t * draw_buf); -lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t * obj, lv_color_format_t cf, lv_draw_buf_t * draw_buf); -void lv_snapshot_free(lv_image_dsc_t * dsc); -lv_result_t lv_snapshot_take_to_buf(lv_obj_t * obj, lv_color_format_t cf, lv_image_dsc_t * dsc, - void * buf, - uint32_t buf_size); -typedef void (*lv_theme_apply_cb_t)(lv_theme_t *, lv_obj_t *); -lv_theme_t * lv_theme_create(void); -void lv_theme_copy(lv_theme_t * dst, const lv_theme_t * src); -lv_theme_t * lv_theme_get_from_obj(lv_obj_t * obj); -void lv_theme_apply(lv_obj_t * obj); -void lv_theme_set_parent(lv_theme_t * theme, lv_theme_t * parent); -void lv_theme_set_apply_cb(lv_theme_t * theme, lv_theme_apply_cb_t apply_cb); -const lv_font_t * lv_theme_get_font_small(lv_obj_t * obj); -const lv_font_t * lv_theme_get_font_normal(lv_obj_t * obj); -const lv_font_t * lv_theme_get_font_large(lv_obj_t * obj); -lv_color_t lv_theme_get_color_primary(lv_obj_t * obj); -lv_color_t lv_theme_get_color_secondary(lv_obj_t * obj); -void lv_theme_delete(lv_theme_t * theme); -lv_theme_t * lv_theme_default_init(lv_display_t * disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, - const lv_font_t * font); -bool lv_theme_default_is_inited(void); -lv_theme_t * lv_theme_default_get(void); -void lv_theme_default_deinit(void); typedef int32_t lv_coord_t; typedef lv_result_t lv_res_t; -typedef lv_image_dsc_t lv_img_dsc_t; -typedef lv_display_t lv_disp_t; -typedef lv_display_rotation_t lv_disp_rotation_t; -typedef lv_display_render_mode_t lv_disp_render_t; -typedef lv_anim_completed_cb_t lv_anim_ready_cb_t; -typedef lv_screen_load_anim_t lv_scr_load_anim_t; -typedef lv_buttonmatrix_ctrl_t lv_btnmatrix_ctrl_t; -static inline uint32_t lv_task_handler(void) -{ - return lv_timer_handler(); -} -static inline void lv_obj_move_foreground(lv_obj_t * obj) -{ - lv_obj_t * parent = lv_obj_get_parent(obj); - if(!parent) { - do {}while(0); - return; - } - lv_obj_move_to_index(obj, lv_obj_get_child_count(parent) - 1); -} -static inline void lv_obj_move_background(lv_obj_t * obj) -{ - lv_obj_move_to_index(obj, 0); -} -struct _lv_draw_mask_rect_dsc_t { - lv_draw_dsc_base_t base; - lv_area_t area; - int32_t radius; - uint32_t keep_outside : 1; -}; -void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t * dsc); -lv_draw_mask_rect_dsc_t * lv_draw_task_get_mask_rect_dsc(lv_draw_task_t * task); -void lv_draw_mask_rect(lv_layer_t * layer, const lv_draw_mask_rect_dsc_t * dsc); -typedef enum { - LV_DRAW_SW_MASK_RES_TRANSP, - LV_DRAW_SW_MASK_RES_FULL_COVER, - LV_DRAW_SW_MASK_RES_CHANGED, - LV_DRAW_SW_MASK_RES_UNKNOWN -} lv_draw_sw_mask_res_t; -typedef enum { - LV_DRAW_SW_MASK_TYPE_LINE, - LV_DRAW_SW_MASK_TYPE_ANGLE, - LV_DRAW_SW_MASK_TYPE_RADIUS, - LV_DRAW_SW_MASK_TYPE_FADE, - LV_DRAW_SW_MASK_TYPE_MAP, -} lv_draw_sw_mask_type_t; -typedef enum { - LV_DRAW_SW_MASK_LINE_SIDE_LEFT = 0, - LV_DRAW_SW_MASK_LINE_SIDE_RIGHT, - LV_DRAW_SW_MASK_LINE_SIDE_TOP, - LV_DRAW_SW_MASK_LINE_SIDE_BOTTOM, -} lv_draw_sw_mask_line_side_t; -typedef lv_draw_sw_mask_res_t (*lv_draw_sw_mask_xcb_t)(lv_opa_t * mask_buf, int32_t abs_x, int32_t abs_y, - int32_t len, - void * p); -void lv_draw_sw_mask_init(void); -void lv_draw_sw_mask_deinit(void); -lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void * masks[], lv_opa_t * mask_buf, - int32_t abs_x, - int32_t abs_y, - int32_t len); -void lv_draw_sw_mask_free_param(void * p); -void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t * param, int32_t p1x, int32_t p1y, - int32_t p2x, - int32_t p2y, lv_draw_sw_mask_line_side_t side); -void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t * param, int32_t px, int32_t py, int16_t angle, - lv_draw_sw_mask_line_side_t side); -void lv_draw_sw_mask_angle_init(lv_draw_sw_mask_angle_param_t * param, int32_t vertex_x, int32_t vertex_y, - int32_t start_angle, int32_t end_angle); -void lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t * param, const lv_area_t * rect, int32_t radius, - bool inv); -void lv_draw_sw_mask_fade_init(lv_draw_sw_mask_fade_param_t * param, const lv_area_t * coords, lv_opa_t opa_top, - int32_t y_top, - lv_opa_t opa_bottom, int32_t y_bottom); -void lv_draw_sw_mask_map_init(lv_draw_sw_mask_map_param_t * param, const lv_area_t * coords, const lv_opa_t * map); -typedef void (*lv_draw_sw_blend_handler_t)(lv_draw_task_t * t, const lv_draw_sw_blend_dsc_t * dsc); -typedef struct { - lv_color_format_t dest_cf; - lv_draw_sw_blend_handler_t handler; -} lv_draw_sw_custom_blend_handler_t; -void lv_draw_sw_blend(lv_draw_task_t * t, const lv_draw_sw_blend_dsc_t * dsc); -void lv_draw_sw_init(void); -void lv_draw_sw_deinit(void); -void lv_draw_sw_fill(lv_draw_task_t * t, lv_draw_fill_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_border(lv_draw_task_t * t, const lv_draw_border_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_box_shadow(lv_draw_task_t * t, const lv_draw_box_shadow_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_image(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, - const lv_area_t * coords); -void lv_draw_sw_letter(lv_draw_task_t * t, const lv_draw_letter_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_label(lv_draw_task_t * t, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_arc(lv_draw_task_t * t, const lv_draw_arc_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_line(lv_draw_task_t * t, const lv_draw_line_dsc_t * dsc); -void lv_draw_sw_layer(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords); -void lv_draw_sw_triangle(lv_draw_task_t * t, const lv_draw_triangle_dsc_t * dsc); -void lv_draw_sw_blur(lv_draw_task_t * t, const lv_draw_blur_dsc_t * dsc, const lv_area_t * coords); -void lv_draw_sw_mask_rect(lv_draw_task_t * t, const lv_draw_mask_rect_dsc_t * dsc); -void lv_draw_sw_transform(const lv_area_t * dest_area, const void * src_buf, - int32_t src_w, int32_t src_h, int32_t src_stride, - const lv_draw_image_dsc_t * draw_dsc, const lv_draw_image_sup_t * sup, lv_color_format_t cf, void * dest_buf); -bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t * handler); -bool lv_draw_sw_unregister_blend_handler(lv_color_format_t dest_cf); -lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf); +typedef lv_image_dsc_t lv_img_dsc_t; +typedef lv_display_t lv_disp_t; +typedef lv_display_rotation_t lv_disp_rot_t; +typedef lv_display_render_mode_t lv_disp_render_t; +typedef lv_anim_completed_cb_t lv_anim_ready_cb_t; +typedef lv_screen_load_anim_t lv_scr_load_anim_t; +typedef lv_buttonmatrix_ctrl_t lv_btnmatrix_ctrl_t; +static inline uint32_t lv_task_handler(void) +{ + return lv_timer_handler(); +} +static inline void lv_obj_move_foreground(lv_obj_t * obj) +{ + lv_obj_t * parent = lv_obj_get_parent(obj); + if(!parent) { + do {}while(0); + return; + } + lv_obj_move_to_index(obj, (int32_t)lv_obj_get_child_count(parent) - 1); +} +static inline void lv_obj_move_background(lv_obj_t * obj) +{ + lv_obj_move_to_index(obj, 0); +} +typedef lv_display_rotation_t lv_disp_rotation_t; +static inline int lv_version_major(void) +{ + return 9; +} +static inline int lv_version_minor(void) +{ + return 6; +} +static inline int lv_version_patch(void) +{ + return 0; +} +static inline const char * lv_version_info(void) +{ + return ""; +} typedef union { struct { uint32_t user, nice, system, idle, irq, softirq, @@ -5181,78 +4498,26 @@ ((void)sync); return LV_RESULT_INVALID; } -struct _lv_timer_t { - uint32_t period; - uint32_t last_run; - lv_timer_cb_t timer_cb; - void * user_data; - int32_t repeat_count; - volatile int paused; - uint32_t auto_delete : 1; -}; -typedef struct { - lv_ll_t timer_ll; - bool lv_timer_run; - uint8_t idle_last; - bool timer_deleted; - bool timer_created; - volatile uint32_t timer_time_until_next; - bool already_running; - uint32_t periodic_last_tick; - uint32_t busy_time; - uint32_t idle_period_start; - uint32_t run_cnt; - lv_timer_handler_resume_cb_t resume_cb; - void * resume_data; -} lv_timer_state_t; -void lv_timer_core_init(void); -void lv_timer_core_deinit(void); -typedef struct { - bool anim_list_changed; - bool anim_run_round; - bool anim_vsync_registered; - lv_timer_t * timer; - lv_ll_t anim_ll; -} lv_anim_state_t; -void lv_anim_core_init(void); -void lv_anim_core_deinit(void); -void lv_anim_enable_vsync_mode(bool enable); -typedef struct { - volatile uint32_t sys_time; - volatile uint8_t sys_irq_flag; - lv_tick_get_cb_t tick_get_cb; - lv_delay_cb_t delay_cb; -} lv_tick_state_t; -struct _lv_draw_buf_handlers_t { - lv_draw_buf_malloc_cb_t buf_malloc_cb; - lv_draw_buf_free_cb_t buf_free_cb; - lv_draw_buf_copy_cb_t buf_copy_cb; - lv_draw_buf_align_cb_t align_pointer_cb; - lv_draw_buf_cache_operation_cb_t invalidate_cache_cb; - lv_draw_buf_cache_operation_cb_t flush_cache_cb; - lv_draw_buf_width_to_stride_cb_t width_to_stride_cb; -}; -void lv_draw_buf_init_handlers(void); -uint32_t lv_cache_entry_get_size(const uint32_t node_size); -int32_t lv_cache_entry_get_ref(lv_cache_entry_t * entry); -uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t * entry); -bool lv_cache_entry_is_invalid(lv_cache_entry_t * entry); -void * lv_cache_entry_get_data(lv_cache_entry_t * entry); -const lv_cache_t * lv_cache_entry_get_cache(const lv_cache_entry_t * entry); -lv_cache_entry_t * lv_cache_entry_get_entry(void * data, const uint32_t node_size); -lv_cache_entry_t * lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t * cache); -void lv_cache_entry_init(lv_cache_entry_t * entry, const lv_cache_t * cache, const uint32_t node_size); -void lv_cache_entry_delete(lv_cache_entry_t * entry); +typedef struct _lv_iter_t lv_iter_t; +typedef lv_result_t (*lv_iter_next_cb)(void * instance, void * context, void * elem); +typedef void (*lv_iter_inspect_cb)(void * elem); +lv_iter_t * lv_iter_create(void * instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb); +void * lv_iter_get_context(const lv_iter_t * iter); +void lv_iter_destroy(lv_iter_t * iter); +lv_result_t lv_iter_next(lv_iter_t * iter, void * elem); +void lv_iter_make_peekable(lv_iter_t * iter, uint32_t capacity); +lv_result_t lv_iter_peek(lv_iter_t * iter, void * elem); +lv_result_t lv_iter_peek_advance(lv_iter_t * iter); +lv_result_t lv_iter_peek_reset(lv_iter_t * iter); +void lv_iter_inspect(lv_iter_t * iter, lv_iter_inspect_cb inspect_cb); +typedef struct _lv_cache_entry_t lv_cache_entry_t; +typedef struct _lv_cache_t lv_cache_t; typedef enum { LV_CACHE_RESERVE_COND_OK, LV_CACHE_RESERVE_COND_TOO_LARGE, LV_CACHE_RESERVE_COND_NEED_VICTIM, LV_CACHE_RESERVE_COND_ERROR } lv_cache_reserve_cond_res_t; -struct _lv_cache_ops_t; -struct _lv_cache_t; -struct _lv_cache_class_t; -struct _lv_cache_entry_t; typedef struct _lv_cache_ops_t lv_cache_ops_t; typedef struct _lv_cache_class_t lv_cache_class_t; typedef int32_t lv_cache_compare_res_t; @@ -5303,23 +4568,6 @@ struct _lv_cache_slot_size_t { size_t size; }; - extern const lv_cache_class_t lv_cache_class_lru_rb_count; - extern const lv_cache_class_t lv_cache_class_lru_rb_size; - extern const lv_cache_class_t lv_cache_class_lru_ll_count; - extern const lv_cache_class_t lv_cache_class_lru_ll_size; - extern const lv_cache_class_t lv_cache_class_sc_da; -lv_result_t lv_image_header_cache_init(uint32_t count); -void lv_image_header_cache_resize(uint32_t count, bool evict_now); -void lv_image_header_cache_drop(const void * src); -bool lv_image_header_cache_is_enabled(void); -lv_iter_t * lv_image_header_cache_iter_create(void); -void lv_image_header_cache_dump(void); -lv_result_t lv_image_cache_init(uint32_t size); -void lv_image_cache_resize(uint32_t new_size, bool evict_now); -void lv_image_cache_drop(const void * src); -bool lv_image_cache_is_enabled(void); -lv_iter_t * lv_image_cache_iter_create(void); -void lv_image_cache_dump(void); lv_cache_t * lv_cache_create(const lv_cache_class_t * cache_class, size_t node_size, size_t max_size, lv_cache_ops_t ops); @@ -5343,12 +4591,31 @@ void lv_cache_set_name(lv_cache_t * cache, const char * name); const char * lv_cache_get_name(lv_cache_t * cache); lv_iter_t * lv_cache_iter_create(lv_cache_t * cache); +const lv_cache_t * lv_cache_entry_get_cache(const lv_cache_entry_t * entry); +lv_cache_entry_t * lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t * cache); +void lv_cache_entry_init(lv_cache_entry_t * entry, const lv_cache_t * cache, const uint32_t node_size); +void lv_cache_entry_delete(lv_cache_entry_t * entry); + extern const lv_cache_class_t lv_cache_class_lru_rb_count; + extern const lv_cache_class_t lv_cache_class_lru_rb_size; + extern const lv_cache_class_t lv_cache_class_lru_ll_count; + extern const lv_cache_class_t lv_cache_class_lru_ll_size; + extern const lv_cache_class_t lv_cache_class_sc_da; +lv_result_t lv_image_cache_init(uint32_t size); +void lv_image_cache_resize(uint32_t new_size, bool evict_now); +bool lv_image_cache_is_enabled(void); +lv_iter_t * lv_image_cache_iter_create(void); +void lv_image_cache_dump(void); +uint32_t lv_cache_entry_get_size(const uint32_t node_size); +int32_t lv_cache_entry_get_ref(lv_cache_entry_t * entry); +uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t * entry); +bool lv_cache_entry_is_invalid(lv_cache_entry_t * entry); +void * lv_cache_entry_get_data(lv_cache_entry_t * entry); +lv_cache_entry_t * lv_cache_entry_get_entry(void * data, const uint32_t node_size); struct _lv_draw_task_t { lv_draw_task_t * next; lv_draw_task_type_t type; lv_area_t area; lv_area_t _real_area; - lv_area_t clip_area_original; lv_area_t clip_area; lv_layer_t * target_layer; lv_draw_unit_t * draw_unit; @@ -5379,19 +4646,143 @@ lv_mutex_t circle_cache_mutex; bool task_running; } lv_draw_global_info_t; +void lv_draw_cleanup_task(lv_draw_task_t * t); +typedef void (*lv_draw_sw_blend_handler_t)(lv_draw_task_t * t, const lv_draw_sw_blend_dsc_t * dsc); typedef struct { - lv_draw_task_t * task_act; + lv_color_format_t dest_cf; + lv_draw_sw_blend_handler_t handler; +} lv_draw_sw_custom_blend_handler_t; +void lv_draw_sw_blend(lv_draw_task_t * t, const lv_draw_sw_blend_dsc_t * dsc); +void lv_draw_sw_init(void); +void lv_draw_sw_deinit(void); +void lv_draw_sw_fill(lv_draw_task_t * t, lv_draw_fill_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_border(lv_draw_task_t * t, const lv_draw_border_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_box_shadow(lv_draw_task_t * t, const lv_draw_box_shadow_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_image(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, + const lv_area_t * coords); +void lv_draw_sw_letter(lv_draw_task_t * t, const lv_draw_letter_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_label(lv_draw_task_t * t, const lv_draw_label_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_arc(lv_draw_task_t * t, const lv_draw_arc_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_line(lv_draw_task_t * t, const lv_draw_line_dsc_t * dsc); +void lv_draw_sw_layer(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, const lv_area_t * coords); +void lv_draw_sw_triangle(lv_draw_task_t * t, const lv_draw_triangle_dsc_t * dsc); +void lv_draw_sw_blur(lv_draw_task_t * t, const lv_draw_blur_dsc_t * dsc, const lv_area_t * coords); +void lv_draw_sw_mask_rect(lv_draw_task_t * t, const lv_draw_mask_rect_dsc_t * dsc); +void lv_draw_sw_transform(const lv_area_t * dest_area, const void * src_buf, + int32_t src_w, int32_t src_h, int32_t src_stride, + const lv_draw_image_dsc_t * draw_dsc, const lv_draw_image_sup_t * sup, lv_color_format_t src_cf, void * dest_buf); +bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t * handler); +bool lv_draw_sw_unregister_blend_handler(lv_color_format_t dest_cf); +lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf); +struct _lv_timer_t { + uint32_t period; + uint32_t last_run; + lv_timer_cb_t timer_cb; + void * user_data; + int32_t repeat_count; + volatile int paused; + uint32_t auto_delete : 1; +}; +typedef struct { + lv_ll_t timer_ll; + bool lv_timer_run; + uint8_t idle_last; + bool timer_deleted; + bool timer_created; + volatile uint32_t timer_time_until_next; + bool already_running; + uint32_t periodic_last_tick; + uint32_t busy_time; + uint32_t idle_period_start; + uint32_t run_cnt; + lv_timer_handler_resume_cb_t resume_cb; + void * resume_data; +} lv_timer_state_t; +void lv_timer_core_init(void); +void lv_timer_core_deinit(void); +typedef struct { + bool anim_list_changed; + bool anim_run_round; + bool anim_vsync_registered; + lv_timer_t * timer; + lv_ll_t anim_ll; +} lv_anim_state_t; +void lv_anim_core_init(void); +void lv_anim_core_deinit(void); +void lv_anim_enable_vsync_mode(bool enable); +typedef struct { + volatile uint32_t sys_time; + volatile uint8_t sys_irq_flag; + lv_tick_get_cb_t tick_get_cb; + lv_delay_cb_t delay_cb; +} lv_tick_state_t; +struct _lv_draw_buf_handlers_t { + lv_draw_buf_malloc_cb_t buf_malloc_cb; + lv_draw_buf_free_cb_t buf_free_cb; + lv_draw_buf_copy_cb_t buf_copy_cb; + lv_draw_buf_align_cb_t align_pointer_cb; + lv_draw_buf_cache_operation_cb_t invalidate_cache_cb; + lv_draw_buf_cache_operation_cb_t flush_cache_cb; + lv_draw_buf_width_to_stride_cb_t width_to_stride_cb; + lv_draw_buf_clear_cb_t buf_clear_cb; +}; +void lv_draw_buf_init_handlers(void); +void lv_draw_buf_clear_ex(lv_draw_buf_t * draw_buf, const lv_area_t * a, lv_layer_t * layer); +typedef struct { + lv_draw_task_t * volatile task_act; lv_thread_t thread; - lv_thread_sync_t sync; + lv_thread_sync_t new_task_sync; + lv_thread_sync_t task_done_sync; lv_draw_unit_t * draw_unit; uint32_t idx; - volatile bool inited; volatile bool exit_status; } lv_draw_sw_thread_dsc_t; struct _lv_draw_sw_unit_t { lv_draw_unit_t base_unit; lv_draw_task_t * task_act; }; +typedef enum { + LV_DRAW_SW_MASK_RES_TRANSP, + LV_DRAW_SW_MASK_RES_FULL_COVER, + LV_DRAW_SW_MASK_RES_CHANGED, + LV_DRAW_SW_MASK_RES_UNKNOWN +} lv_draw_sw_mask_res_t; +typedef enum { + LV_DRAW_SW_MASK_TYPE_LINE, + LV_DRAW_SW_MASK_TYPE_ANGLE, + LV_DRAW_SW_MASK_TYPE_RADIUS, + LV_DRAW_SW_MASK_TYPE_FADE, + LV_DRAW_SW_MASK_TYPE_MAP, +} lv_draw_sw_mask_type_t; +typedef enum { + LV_DRAW_SW_MASK_LINE_SIDE_LEFT = 0, + LV_DRAW_SW_MASK_LINE_SIDE_RIGHT, + LV_DRAW_SW_MASK_LINE_SIDE_TOP, + LV_DRAW_SW_MASK_LINE_SIDE_BOTTOM, +} lv_draw_sw_mask_line_side_t; +typedef lv_draw_sw_mask_res_t (*lv_draw_sw_mask_xcb_t)(lv_opa_t * mask_buf, int32_t abs_x, int32_t abs_y, + int32_t len, + void * p); +void lv_draw_sw_mask_init(void); +void lv_draw_sw_mask_deinit(void); +lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void * masks[], lv_opa_t * mask_buf, + int32_t abs_x, + int32_t abs_y, + int32_t len); +void lv_draw_sw_mask_free_param(void * p); +void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t * param, int32_t p1x, int32_t p1y, + int32_t p2x, + int32_t p2y, lv_draw_sw_mask_line_side_t side); +void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t * param, int32_t px, int32_t py, int16_t angle, + lv_draw_sw_mask_line_side_t side); +void lv_draw_sw_mask_angle_init(lv_draw_sw_mask_angle_param_t * param, int32_t vertex_x, int32_t vertex_y, + int32_t start_angle, int32_t end_angle); +lv_result_t lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t * param, const lv_area_t * rect, int32_t radius, + bool inv); +void lv_draw_sw_mask_fade_init(lv_draw_sw_mask_fade_param_t * param, const lv_area_t * coords, lv_opa_t opa_top, + int32_t y_top, + lv_opa_t opa_bottom, int32_t y_bottom); +void lv_draw_sw_mask_map_init(lv_draw_sw_mask_map_param_t * param, const lv_area_t * coords, const lv_opa_t * map); typedef struct { uint8_t * buf; lv_opa_t * cir_opa; @@ -5477,6 +4868,7 @@ lv_display_t * disp_default; lv_ll_t style_trans_ll; bool style_refresh; + uint32_t blur_obj_cnt; uint32_t style_custom_table_size; uint32_t style_last_custom_prop_id; uint8_t * style_custom_prop_flag_lookup_table; @@ -5503,6 +4895,7 @@ lv_cache_t * img_header_cache; lv_draw_global_info_t draw_info; lv_ll_t draw_sw_blend_handler_ll; + lv_ll_t subject_ll; lv_draw_sw_mask_radius_circle_dsc_arr_t sw_circle_cache; void * theme_default; lv_ll_t fsdrv_ll; @@ -5510,372 +4903,1211 @@ lv_linux_proc_stat_t linux_last_proc_stat; } lv_global_t; lv_global_t * lv_global_default(void); -struct _lv_display_t { - int32_t hor_res; - int32_t ver_res; - int32_t physical_hor_res; - int32_t physical_ver_res; - int32_t offset_x; - int32_t offset_y; - uint32_t dpi; - lv_draw_buf_t * buf_1; - lv_draw_buf_t * buf_2; - lv_draw_buf_t * buf_3; - lv_draw_buf_t * buf_act; - lv_display_flush_cb_t flush_cb; - lv_display_flush_wait_cb_t flush_wait_cb; - volatile int flushing; - volatile int flushing_last; - volatile uint32_t last_area : 1; - volatile uint32_t last_part : 1; - lv_display_render_mode_t render_mode; - uint32_t antialiasing : 1; - uint32_t tile_cnt : 8; - uint32_t stride_is_auto : 1; - uint32_t rendering_in_progress : 1; - lv_color_format_t color_format; - lv_area_t inv_areas[32]; - uint8_t inv_area_joined[32]; - uint32_t inv_p; - int32_t inv_en_cnt; - lv_ll_t sync_areas; - lv_draw_buf_t _static_buf1; - lv_draw_buf_t _static_buf2; - lv_layer_t * layer_head; - void (*layer_init)(lv_display_t * disp, lv_layer_t * layer); - void (*layer_deinit)(lv_display_t * disp, lv_layer_t * layer); - lv_obj_t ** screens; - lv_obj_t * sys_layer; - lv_obj_t * top_layer; - lv_obj_t * act_scr; - lv_obj_t * bottom_layer; - lv_obj_t * prev_scr; - lv_obj_t * scr_to_load; - uint32_t screen_cnt; - uint8_t draw_prev_over_act : 1; - uint8_t del_prev : 1; - void * driver_data; +struct _lv_group_t { + lv_ll_t obj_ll; + lv_obj_t ** obj_focus; + lv_group_focus_cb_t focus_cb; + lv_group_edge_cb_t edge_cb; void * user_data; - lv_event_list_t event_list; - uint32_t rotation : 3; - uint32_t matrix_rotation : 1; - lv_theme_t * theme; - lv_timer_t * refr_timer; - uint32_t last_activity_time; - lv_area_t refreshed_area; - uint32_t vsync_count; + uint8_t frozen : 1; + uint8_t editing : 1; + uint8_t refocus_policy : 1; + uint8_t wrap : 1; }; -void lv_indev_scroll_handler(lv_indev_t * indev); -void lv_indev_scroll_throw_handler(lv_indev_t * indev); -int32_t lv_indev_scroll_throw_predict(lv_indev_t * indev, lv_dir_t dir); -void lv_indev_scroll_get_snap_dist(lv_obj_t * obj, lv_point_t * p); -struct _lv_indev_t { - lv_indev_type_t type; - lv_indev_read_cb_t read_cb; - lv_indev_state_t state; - lv_indev_state_t prev_state; - lv_indev_mode_t mode; - uint8_t long_pr_sent : 1; - uint8_t reset_query : 1; - uint8_t enabled : 1; - uint8_t wait_until_release : 1; - uint8_t stop_processing_query : 1; - uint32_t timestamp; - uint32_t pr_timestamp; - uint32_t longpr_rep_timestamp; - void * driver_data; +void lv_group_init(void); +void lv_group_deinit(void); +struct _lv_obj_class_t { + const lv_obj_class_t * base_class; + void (*constructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj); + void (*destructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj); + void (*event_cb)(const lv_obj_class_t * class_p, lv_event_t * e); void * user_data; - lv_display_t * disp; - lv_timer_t * read_timer; - uint8_t scroll_limit; - uint8_t scroll_throw; - uint8_t gesture_min_velocity; - uint8_t gesture_min_distance; - uint16_t long_press_time; - uint16_t long_press_repeat_time; - int32_t rotary_sensitivity; - struct { - lv_point_t act_point; - lv_point_t last_point; - lv_point_t last_raw_point; - lv_point_t vect; - lv_point_t vect_hist[8]; - uint32_t vect_hist_timestamp[8]; - uint8_t vect_hist_index; - lv_point_t scroll_sum; - lv_point_t scroll_throw_vect; - lv_point_t scroll_throw_vect_ori; - lv_obj_t * act_obj; - lv_obj_t * scroll_obj; - lv_obj_t * last_pressed; - lv_obj_t * last_hovered; - lv_area_t scroll_area; - lv_point_t gesture_sum; - int32_t diff; - uint8_t short_click_streak; - lv_point_t last_short_click_point; - uint32_t last_short_click_timestamp; - uint8_t scroll_dir : 4; - uint8_t gesture_dir : 4; - uint8_t gesture_sent : 1; - uint8_t press_moved : 1; - uint8_t pressed : 1; - } pointer; - struct { - lv_indev_state_t last_state; - uint32_t last_key; - } keypad; - lv_obj_t * cursor; - lv_group_t * group; - const lv_point_t * btn_points; + const char * name; + int32_t width_def; + int32_t height_def; + uint32_t editable : 2; + uint32_t group_def : 2; + uint32_t instance_size : 16; + uint32_t theme_inheritable : 1; +}; +void lv_obj_destruct(lv_obj_t * obj); +int32_t lv_obj_get_ext_draw_size(const lv_obj_t * obj); +lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t * obj); +struct _lv_hit_test_info_t { + const lv_point_t * point; + bool res; +}; +struct _lv_cover_check_info_t { + lv_cover_res_t res; + const lv_area_t * area; +}; +typedef struct _lv_array_t { + uint8_t * data; + uint32_t size; + uint32_t capacity; + uint32_t element_size; + bool inner_alloc; +} lv_array_t; +lv_result_t lv_array_init(lv_array_t * array, uint32_t capacity, uint32_t element_size); +void lv_array_init_from_buf(lv_array_t * array, void * buf, uint32_t capacity, uint32_t element_size); +bool lv_array_resize(lv_array_t * array, uint32_t new_capacity); +void lv_array_deinit(lv_array_t * array); +static inline uint32_t lv_array_size(const lv_array_t * array) +{ + return array->size; +} +static inline uint32_t lv_array_capacity(const lv_array_t * array) +{ + return array->capacity; +} +static inline bool lv_array_is_empty(const lv_array_t * array) +{ + return array->size == 0; +} +static inline bool lv_array_is_full(const lv_array_t * array) +{ + return array->size == array->capacity; +} +void lv_array_copy(lv_array_t * target, const lv_array_t * source); +static inline void lv_array_clear(lv_array_t * array) +{ + array->size = 0; +} +void lv_array_shrink(lv_array_t * array); +lv_result_t lv_array_remove(lv_array_t * array, uint32_t index); +lv_result_t lv_array_remove_unordered(lv_array_t * array, uint32_t index); +lv_result_t lv_array_erase(lv_array_t * array, uint32_t start, uint32_t end); +lv_result_t lv_array_concat(lv_array_t * array, const lv_array_t * other); +lv_result_t lv_array_push_back(lv_array_t * array, const void * element); +lv_result_t lv_array_assign(lv_array_t * array, uint32_t index, const void * value); +void * lv_array_at(const lv_array_t * array, uint32_t index); +static inline void * lv_array_front(const lv_array_t * array) +{ + return lv_array_at(array, 0); +} +static inline void * lv_array_back(const lv_array_t * array) +{ + return lv_array_at(array, lv_array_size(array) - 1); +} +struct _lv_event_dsc_t { + lv_event_cb_t cb; + void * user_data; + uint32_t filter; +}; +struct _lv_event_t { + void * current_target; + void * original_target; + lv_event_code_t code; + void * user_data; + void * param; + lv_event_t * prev; + uint8_t deleted : 1; + uint8_t stop_processing : 1; + uint8_t stop_bubbling : 1; + uint8_t stop_trickling : 1; +}; +struct _lv_event_list_t { + lv_array_t array; + uint8_t is_traversing: 1; + uint8_t has_marked_deleting: 1; +}; +void lv_event_push(lv_event_t * e); +void lv_event_pop(lv_event_t * e); +lv_result_t lv_event_push_and_send(lv_event_list_t * event_list, lv_event_code_t code, void * original_target, + void * param); +void lv_event_mark_deleted(void * target); +typedef struct _lv_obj_spec_attr_t { + lv_obj_t ** children; + lv_group_t * group_p; lv_event_list_t event_list; - lv_anim_t * scroll_throw_anim; - lv_indev_key_remap_cb_t key_remap_cb; - lv_indev_gesture_recognizer_t recognizers[LV_INDEV_GESTURE_CNT]; - lv_indev_gesture_type_t cur_gesture; - void * gesture_data[LV_INDEV_GESTURE_CNT]; - lv_indev_gesture_type_t gesture_type[LV_INDEV_GESTURE_CNT]; + lv_point_t scroll; + int32_t ext_click_pad; + int32_t ext_draw_size; + uint16_t child_cnt; + uint16_t scrollbar_mode : 2; + uint16_t scroll_snap_x : 2; + uint16_t scroll_snap_y : 2; + uint16_t scroll_dir : 4; + uint16_t layer_type : 2; + uint16_t name_static : 1; + uint16_t user_flags : 8; +} lv_obj_spec_attr_t; +struct _lv_obj_t { + const lv_obj_class_t * class_p; + lv_obj_t * parent; + lv_obj_spec_attr_t * spec_attr; + lv_obj_style_t * styles; + uint32_t style_main_prop_is_set; + uint32_t style_other_prop_is_set; + void * user_data; + lv_area_t coords; + uint32_t hidden : 1; + uint32_t clickable : 1; + uint32_t click_focusable : 1; + uint32_t checkable : 1; + uint32_t scrollable : 1; + uint32_t scroll_elastic : 1; + uint32_t scroll_momentum : 1; + uint32_t scroll_one : 1; + uint32_t scroll_chain_hor : 1; + uint32_t scroll_chain_ver : 1; + uint32_t scroll_on_focus : 1; + uint32_t scroll_with_arrow : 1; + uint32_t snappable : 1; + uint32_t press_lock : 1; + uint32_t event_bubble : 1; + uint32_t gesture_bubble : 1; + uint32_t adv_hittest : 1; + uint32_t ignore_layout : 1; + uint32_t floating : 1; + uint32_t send_draw_task_events : 1; + uint32_t overflow_visible : 1; + uint32_t event_trickle : 1; + uint32_t state_trickle : 1; + uint32_t radio_button : 1; + uint16_t state; + uint16_t layout_inv : 1; + uint16_t readjust_scroll_after_layout : 1; + uint16_t scr_layout_inv : 1; + uint16_t skip_trans : 1; + uint16_t style_cnt : 6; + uint16_t h_layout : 1; + uint16_t w_layout : 1; + uint16_t h_ignore_size : 1; + uint16_t w_ignore_size : 1; + uint16_t is_deleting : 1; + uint16_t rendered : 1; + uint16_t has_blur : 1; }; -lv_obj_t * lv_indev_find_scroll_obj(lv_indev_t * indev); -typedef enum { - LV_TEXT_CMD_STATE_WAIT, - LV_TEXT_CMD_STATE_PAR, - LV_TEXT_CMD_STATE_IN, -} lv_text_cmd_state_t; -typedef struct { - int32_t letter_space; - int32_t line_space; - int32_t max_width; - lv_text_flag_t text_flags; -} lv_text_attributes_t; -void lv_text_attributes_init(lv_text_attributes_t * attributes); -void lv_text_get_size_attributes(lv_point_t * size_res, const char * text, const lv_font_t * font, - lv_text_attributes_t * attributes); -int32_t lv_text_get_width(const char * txt, uint32_t length, const lv_font_t * font, - const lv_text_attributes_t * attributes); -bool lv_text_is_cmd(lv_text_cmd_state_t * state, uint32_t c); -uint32_t lv_text_get_next_line(const char * txt, uint32_t len, const lv_font_t * font, int32_t * used_width, - lv_text_attributes_t * attributes); -void lv_text_ins(char * txt_buf, uint32_t pos, const char * ins_txt); -void lv_text_cut(char * txt, uint32_t pos, uint32_t len); -char * lv_text_set_text_vfmt(const char * fmt, va_list ap) ; -void lv_text_encoded_letter_next_2(const char * txt, uint32_t * letter, uint32_t * letter_next, uint32_t * ofs); -static inline bool lv_text_is_break_char(uint32_t letter) +lv_obj_spec_attr_t * lv_obj_allocate_spec_attr(lv_obj_t * obj); +lv_result_t lv_obj_add_child(lv_obj_t * parent, lv_obj_t * child); +void lv_obj_remove_child(lv_obj_t * parent, lv_obj_t * child); +void lv_obj_invalidate_expand_blur(lv_display_t * disp); +lv_result_t lv_obj_scroll_by_raw(lv_obj_t * obj, int32_t x, int32_t y); +struct _lv_obj_style_t { + const lv_style_t * style; + uint32_t selector : 24; + uint32_t is_local : 1; + uint32_t is_trans : 1; + uint32_t is_disabled : 1; + uint32_t is_theme : 1; +}; +struct _lv_obj_style_transition_dsc_t { + lv_anim_path_cb_t path_cb; + void * user_data; + lv_style_selector_t selector; + uint16_t time; + uint16_t delay; + lv_style_prop_t prop; +}; +void lv_obj_style_init(void); +void lv_obj_style_deinit(void); +void lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, + lv_state_t new_state, const lv_obj_style_transition_dsc_t * tr_dsc); +lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t * obj, lv_state_t state1, lv_state_t state2, + lv_part_t * changed_part); +void lv_obj_update_layer_type(lv_obj_t * obj); +lv_style_value_t lv_obj_get_style_prop_internal(const lv_obj_t * obj, lv_part_t part, lv_style_prop_t prop); +lv_style_value_t lv_obj_style_apply_color_filter_internal(const lv_obj_t * obj, lv_part_t part, lv_style_value_t v); +void lv_obj_update_blur_status(lv_obj_t * obj); +struct _lv_observer_t { + lv_subject_t * subject; + lv_observer_cb_t cb; + void * target; + void * user_data; + void (*user_cb)(void); + uint32_t auto_free_user_data : 1; + uint32_t notified : 1; + uint32_t for_obj : 1; +}; +struct _lv_subject_increment_dsc_t { + lv_subject_t * subject; + int32_t step; + bool rollover; + int32_t min_value; + int32_t max_value; +}; +void lv_subject_global_init(void); +void lv_subject_global_deinit(void); +void lv_refr_init(void); +void lv_refr_deinit(void); +lv_result_t lv_inv_area(lv_display_t * disp, const lv_area_t * area_p); +lv_display_t * lv_refr_get_disp_refreshing(void); +void lv_refr_set_disp_refreshing(lv_display_t * disp); +lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj); +void lv_obj_refr(lv_layer_t * layer, lv_obj_t * obj); +static inline int32_t lv_obj_get_style_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 30); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_WIDTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_min_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 44); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MIN_WIDTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_max_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 58); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MAX_WIDTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_height_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 72); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_HEIGHT); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_min_height_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 86); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MIN_HEIGHT); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_max_height_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 100); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MAX_HEIGHT); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_length_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 114); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LENGTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_x_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 129); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_X); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_y_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 144); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_Y); + return (int32_t)v.num; +} +static inline lv_align_t lv_obj_get_style_align_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 162); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ALIGN); + return (lv_align_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 176); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_WIDTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_height_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 190); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_HEIGHT); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_translate_x_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 205); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSLATE_X); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_translate_y_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 220); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSLATE_Y); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_translate_radial_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 234); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSLATE_RADIAL); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_scale_x_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 248); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_SCALE_X); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_scale_y_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 262); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_SCALE_Y); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_rotation_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 275); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_ROTATION); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_pivot_x_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 288); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_PIVOT_X); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_pivot_y_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 301); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_PIVOT_Y); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_skew_x_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 315); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_SKEW_X); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_transform_skew_y_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 329); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSFORM_SKEW_Y); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_pad_top_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 342); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_PAD_TOP); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_pad_bottom_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 355); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_PAD_BOTTOM); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_pad_left_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 368); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_PAD_LEFT); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_pad_right_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 381); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_PAD_RIGHT); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_pad_row_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 394); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_PAD_ROW); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_pad_column_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 407); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_PAD_COLUMN); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_pad_radial_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 420); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_PAD_RADIAL); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_margin_top_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 433); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MARGIN_TOP); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_margin_bottom_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 446); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MARGIN_BOTTOM); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_margin_left_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 459); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MARGIN_LEFT); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_margin_right_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 472); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_MARGIN_RIGHT); + return (int32_t)v.num; +} +static inline lv_color_t lv_obj_get_style_bg_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 485); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_bg_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 498); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_bg_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 513); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_OPA); + return (lv_opa_t)v.num; +} +static inline lv_color_t lv_obj_get_style_bg_grad_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 526); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_GRAD_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_bg_grad_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 539); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_GRAD_COLOR)); + return v.color; +} +static inline lv_grad_dir_t lv_obj_get_style_bg_grad_dir_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 553); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_GRAD_DIR); + return (lv_grad_dir_t)v.num; +} +static inline int32_t lv_obj_get_style_bg_main_stop_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 567); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_MAIN_STOP); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_bg_grad_stop_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 581); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_GRAD_STOP); + return (int32_t)v.num; +} +static inline lv_opa_t lv_obj_get_style_bg_main_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 594); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_MAIN_OPA); + return (lv_opa_t)v.num; +} +static inline lv_opa_t lv_obj_get_style_bg_grad_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 607); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_GRAD_OPA); + return (lv_opa_t)v.num; +} +static inline const lv_grad_dsc_t * lv_obj_get_style_bg_grad_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 623); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_GRAD); + return (const lv_grad_dsc_t *)v.ptr; +} +static inline const void * lv_obj_get_style_bg_image_src_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 637); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_IMAGE_SRC); + return (const void *)v.ptr; +} +static inline lv_opa_t lv_obj_get_style_bg_image_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 652); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_IMAGE_OPA); + return (lv_opa_t)v.num; +} +static inline lv_color_t lv_obj_get_style_bg_image_recolor_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 665); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_IMAGE_RECOLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_bg_image_recolor_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 678); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BG_IMAGE_RECOLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_bg_image_recolor_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 694); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_IMAGE_RECOLOR_OPA); + return (lv_opa_t)v.num; +} +static inline bool lv_obj_get_style_bg_image_tiled_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 707); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BG_IMAGE_TILED); + return (bool)v.num; +} +static inline lv_color_t lv_obj_get_style_border_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 720); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BORDER_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_border_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 733); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_BORDER_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_border_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 748); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BORDER_OPA); + return (lv_opa_t)v.num; +} +static inline int32_t lv_obj_get_style_border_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 761); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BORDER_WIDTH); + return (int32_t)v.num; +} +static inline lv_border_side_t lv_obj_get_style_border_side_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 776); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BORDER_SIDE); + return (lv_border_side_t)v.num; +} +static inline bool lv_obj_get_style_border_post_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 790); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BORDER_POST); + return (bool)v.num; +} +static inline int32_t lv_obj_get_style_outline_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 803); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_OUTLINE_WIDTH); + return (int32_t)v.num; +} +static inline lv_color_t lv_obj_get_style_outline_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 816); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_OUTLINE_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_outline_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 829); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_OUTLINE_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_outline_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 844); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_OUTLINE_OPA); + return (lv_opa_t)v.num; +} +static inline int32_t lv_obj_get_style_outline_pad_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 857); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_OUTLINE_PAD); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_shadow_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 870); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_SHADOW_WIDTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_shadow_offset_x_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 883); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_SHADOW_OFFSET_X); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_shadow_offset_y_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 896); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_SHADOW_OFFSET_Y); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_shadow_spread_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 910); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_SHADOW_SPREAD); + return (int32_t)v.num; +} +static inline lv_color_t lv_obj_get_style_shadow_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 923); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_SHADOW_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_shadow_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 936); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_SHADOW_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_shadow_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 951); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_SHADOW_OPA); + return (lv_opa_t)v.num; +} +static inline lv_opa_t lv_obj_get_style_image_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 966); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_IMAGE_OPA); + return (lv_opa_t)v.num; +} +static inline lv_color_t lv_obj_get_style_image_recolor_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 979); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_IMAGE_RECOLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_image_recolor_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 992); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_IMAGE_RECOLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_image_recolor_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1007); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_IMAGE_RECOLOR_OPA); + return (lv_opa_t)v.num; +} +static inline const lv_image_colorkey_t * lv_obj_get_style_image_colorkey_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1022); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_IMAGE_COLORKEY); + return (const lv_image_colorkey_t *)v.ptr; +} +static inline int32_t lv_obj_get_style_line_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1035); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LINE_WIDTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_line_dash_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1048); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LINE_DASH_WIDTH); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_line_dash_gap_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1062); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LINE_DASH_GAP); + return (int32_t)v.num; +} +static inline bool lv_obj_get_style_line_rounded_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1075); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LINE_ROUNDED); + return (bool)v.num; +} +static inline lv_color_t lv_obj_get_style_line_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1088); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LINE_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_line_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1101); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_LINE_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_line_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1114); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LINE_OPA); + return (lv_opa_t)v.num; +} +static inline int32_t lv_obj_get_style_arc_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1127); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ARC_WIDTH); + return (int32_t)v.num; +} +static inline bool lv_obj_get_style_arc_rounded_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1140); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ARC_ROUNDED); + return (bool)v.num; +} +static inline lv_color_t lv_obj_get_style_arc_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1153); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ARC_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_arc_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1166); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_ARC_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_arc_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1179); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ARC_OPA); + return (lv_opa_t)v.num; +} +static inline const void * lv_obj_get_style_arc_image_src_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1193); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ARC_IMAGE_SRC); + return (const void *)v.ptr; +} +static inline lv_color_t lv_obj_get_style_text_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1206); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_text_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1219); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_text_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1234); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_OPA); + return (lv_opa_t)v.num; +} +static inline const lv_font_t * lv_obj_get_style_text_font_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1247); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_FONT); + return (const lv_font_t *)v.ptr; +} +static inline int32_t lv_obj_get_style_text_letter_space_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1260); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_LETTER_SPACE); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_text_line_space_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1273); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_LINE_SPACE); + return (int32_t)v.num; +} +static inline lv_text_decor_t lv_obj_get_style_text_decor_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1287); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_DECOR); + return (lv_text_decor_t)v.num; +} +static inline lv_text_align_t lv_obj_get_style_text_align_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1303); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_ALIGN); + return (lv_text_align_t)v.num; +} +static inline lv_color_t lv_obj_get_style_text_outline_stroke_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1316); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_text_outline_stroke_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1329); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_COLOR)); + return v.color; +} +static inline int32_t lv_obj_get_style_text_outline_stroke_width_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1342); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_WIDTH); + return (int32_t)v.num; +} +static inline lv_opa_t lv_obj_get_style_text_outline_stroke_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1357); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_OUTLINE_STROKE_OPA); + return (lv_opa_t)v.num; +} +static inline lv_text_leading_trim_t lv_obj_get_style_text_leading_trim_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1372); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TEXT_LEADING_TRIM); + return (lv_text_leading_trim_t)v.num; +} +static inline int32_t lv_obj_get_style_blur_radius_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1386); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BLUR_RADIUS); + return (int32_t)v.num; +} +static inline bool lv_obj_get_style_blur_backdrop_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1401); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BLUR_BACKDROP); + return (bool)v.num; +} +static inline lv_blur_quality_t lv_obj_get_style_blur_quality_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1416); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BLUR_QUALITY); + return (lv_blur_quality_t)v.num; +} +static inline int32_t lv_obj_get_style_drop_shadow_radius_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1430); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_DROP_SHADOW_RADIUS); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_drop_shadow_offset_x_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1443); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_DROP_SHADOW_OFFSET_X); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_drop_shadow_offset_y_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1456); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_DROP_SHADOW_OFFSET_Y); + return (int32_t)v.num; +} +static inline lv_color_t lv_obj_get_style_drop_shadow_color_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1469); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_DROP_SHADOW_COLOR); + return v.color; +} +static inline lv_color_t lv_obj_get_style_drop_shadow_color_filtered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1482); } } while(0); + lv_style_value_t v = lv_obj_style_apply_color_filter_internal(obj, part, lv_obj_get_style_prop(obj, part, LV_STYLE_DROP_SHADOW_COLOR)); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_drop_shadow_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1495); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_DROP_SHADOW_OPA); + return (lv_opa_t)v.num; +} +static inline lv_blur_quality_t lv_obj_get_style_drop_shadow_quality_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1510); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_DROP_SHADOW_QUALITY); + return (lv_blur_quality_t)v.num; +} +static inline int32_t lv_obj_get_style_radius_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1524); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_RADIUS); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_radial_offset_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1537); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_RADIAL_OFFSET); + return (int32_t)v.num; +} +static inline bool lv_obj_get_style_clip_corner_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1551); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_CLIP_CORNER); + return (bool)v.num; +} +static inline lv_opa_t lv_obj_get_style_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1566); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_OPA); + return (lv_opa_t)v.num; +} +static inline lv_opa_t lv_obj_get_style_opa_layered_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1582); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_OPA_LAYERED); + return (lv_opa_t)v.num; +} +static inline const lv_color_filter_dsc_t * lv_obj_get_style_color_filter_dsc_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1595); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_COLOR_FILTER_DSC); + return (const lv_color_filter_dsc_t *)v.ptr; +} +static inline lv_opa_t lv_obj_get_style_color_filter_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1608); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_COLOR_FILTER_OPA); + return (lv_opa_t)v.num; +} +static inline lv_color_t lv_obj_get_style_recolor_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1621); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_RECOLOR); + return v.color; +} +static inline lv_opa_t lv_obj_get_style_recolor_opa_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1637); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_RECOLOR_OPA); + return (lv_opa_t)v.num; +} +static inline const lv_anim_t * lv_obj_get_style_anim_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1653); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ANIM); + return (const lv_anim_t *)v.ptr; +} +static inline uint32_t lv_obj_get_style_anim_duration_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1668); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ANIM_DURATION); + return (uint32_t)v.num; +} +static inline const lv_style_transition_dsc_t * lv_obj_get_style_transition_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1681); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_TRANSITION); + return (const lv_style_transition_dsc_t *)v.ptr; +} +static inline lv_blend_mode_t lv_obj_get_style_blend_mode_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1695); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BLEND_MODE); + return (lv_blend_mode_t)v.num; +} +static inline uint16_t lv_obj_get_style_layout_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1709); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_LAYOUT); + return (uint16_t)v.num; +} +static inline lv_base_dir_t lv_obj_get_style_base_dir_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1722); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BASE_DIR); + return (lv_base_dir_t)v.num; +} +static inline const void * lv_obj_get_style_bitmap_mask_src_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1736); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_BITMAP_MASK_SRC); + return (const void *)v.ptr; +} +static inline uint32_t lv_obj_get_style_rotary_sensitivity_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1750); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_ROTARY_SENSITIVITY); + return (uint32_t)v.num; +} +static inline lv_flex_flow_t lv_obj_get_style_flex_flow_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1764); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_FLEX_FLOW); + return (lv_flex_flow_t)v.num; +} +static inline lv_flex_align_t lv_obj_get_style_flex_main_place_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1777); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_FLEX_MAIN_PLACE); + return (lv_flex_align_t)v.num; +} +static inline lv_flex_align_t lv_obj_get_style_flex_cross_place_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1790); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_FLEX_CROSS_PLACE); + return (lv_flex_align_t)v.num; +} +static inline lv_flex_align_t lv_obj_get_style_flex_track_place_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1803); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_FLEX_TRACK_PLACE); + return (lv_flex_align_t)v.num; +} +static inline uint8_t lv_obj_get_style_flex_grow_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1816); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_FLEX_GROW); + return (uint8_t)v.num; +} +static inline const int32_t * lv_obj_get_style_grid_column_dsc_array_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1832); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_COLUMN_DSC_ARRAY); + return (const int32_t *)v.ptr; +} +static inline lv_grid_align_t lv_obj_get_style_grid_column_align_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1845); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_COLUMN_ALIGN); + return (lv_grid_align_t)v.num; +} +static inline const int32_t * lv_obj_get_style_grid_row_dsc_array_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1858); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_ROW_DSC_ARRAY); + return (const int32_t *)v.ptr; +} +static inline lv_grid_align_t lv_obj_get_style_grid_row_align_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1871); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_ROW_ALIGN); + return (lv_grid_align_t)v.num; +} +static inline int32_t lv_obj_get_style_grid_cell_column_pos_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1884); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_CELL_COLUMN_POS); + return (int32_t)v.num; +} +static inline lv_grid_align_t lv_obj_get_style_grid_cell_x_align_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1897); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_CELL_X_ALIGN); + return (lv_grid_align_t)v.num; +} +static inline int32_t lv_obj_get_style_grid_cell_column_span_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1910); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_CELL_COLUMN_SPAN); + return (int32_t)v.num; +} +static inline int32_t lv_obj_get_style_grid_cell_row_pos_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1923); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_CELL_ROW_POS); + return (int32_t)v.num; +} +static inline lv_grid_align_t lv_obj_get_style_grid_cell_y_align_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1936); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_CELL_Y_ALIGN); + return (lv_grid_align_t)v.num; +} +static inline int32_t lv_obj_get_style_grid_cell_row_span_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal_gen.h", 1949); } } while(0); + lv_style_value_t v = lv_obj_get_style_prop_internal(obj, part, LV_STYLE_GRID_CELL_ROW_SPAN); + return (int32_t)v.num; +} +static inline lv_text_align_t lv_obj_calculate_style_text_align_internal(const lv_obj_t * obj, lv_part_t part, + const char * txt) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 31); } } while(0); + do { if(!(txt != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 32); } } while(0); + lv_text_align_t align = lv_obj_get_style_text_align_internal(obj, part); + lv_base_dir_t base_dir = lv_obj_get_style_base_dir_internal(obj, part); + lv_bidi_calculate_align(&align, &base_dir, txt); + return align; +} +static inline int32_t lv_obj_get_style_space_left_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 42); } } while(0); + int32_t padding = lv_obj_get_style_pad_left(obj, part); + int32_t border_width = lv_obj_get_style_border_width(obj, part); + lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); + return (border_side & LV_BORDER_SIDE_LEFT) ? padding + border_width : padding; +} +static inline int32_t lv_obj_get_style_space_right_internal(const lv_obj_t * obj, lv_part_t part) { - uint8_t i; - bool ret = 0; - for(i = 0; " ,.;:-_)]}"[i] != '\0'; i++) { - if(letter == (uint32_t)" ,.;:-_)]}"[i]) { - ret = 1; - break; - } - } - return ret; + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 51); } } while(0); + int32_t padding = lv_obj_get_style_pad_right(obj, part); + int32_t border_width = lv_obj_get_style_border_width(obj, part); + lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); + return (border_side & LV_BORDER_SIDE_RIGHT) ? padding + border_width : padding; } -static inline bool lv_text_is_a_word(uint32_t letter) +static inline int32_t lv_obj_get_style_space_top_internal(const lv_obj_t * obj, lv_part_t part) { - if(letter == 0) return 0; - if(letter >= 0x4E00 && letter <= 0x9FFF) { - return 1; - } - if(letter >= 0xFF01 && letter <= 0xFF5E) { - return 1; - } - if(letter >= 0x3000 && letter <= 0x303F) { - return 1; - } - if(letter >= 0x2E80 && letter <= 0x2EFF) { - return 1; - } - if(letter >= 0x31C0 && letter <= 0x31EF) { - return 1; - } - if(letter >= 0x3040 && letter <= 0x30FF) { - return 1; - } - if(letter >= 0xFE10 && letter <= 0xFE1F) { - return 1; - } - if(letter >= 0xFE30 && letter <= 0xFE4F) { - return 1; - } - return 0; + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 60); } } while(0); + int32_t padding = lv_obj_get_style_pad_top(obj, part); + int32_t border_width = lv_obj_get_style_border_width(obj, part); + lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); + return (border_side & LV_BORDER_SIDE_TOP) ? padding + border_width : padding; } -static inline bool lv_text_is_marker(uint32_t letter) +static inline int32_t lv_obj_get_style_space_bottom_internal(const lv_obj_t * obj, lv_part_t part) { - if(letter < 0x20) return 1; - if(letter == 0x061C) return 1; - if(letter == 0x115F) return 1; - if(letter == 0x1160) return 1; - if(letter >= 0x180B && letter <= 0x180E) return 1; - if(letter >= 0x200B && letter <= 0x200F) return 1; - if(letter >= 0x2028 && letter <= 0x202F) return 1; - if(letter >= 0x205F && letter <= 0x206F) return 1; - if(letter == 0xFEFF) return 1; - if(letter == 0xF8FF) return 1; - return 0; + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 69); } } while(0); + int32_t padding = lv_obj_get_style_pad_bottom(obj, part); + int32_t border_width = lv_obj_get_style_border_width(obj, part); + lv_border_side_t border_side = lv_obj_get_style_border_side(obj, part); + return (border_side & LV_BORDER_SIDE_BOTTOM) ? padding + border_width : padding; } -extern uint8_t (*const lv_text_encoded_size)(const char * txt); -extern uint32_t (*const lv_text_unicode_to_encoded)(uint32_t letter_uni); -extern uint32_t (*const lv_text_encoded_conv_wc)(uint32_t c); -extern uint32_t (*const lv_text_encoded_next)(const char * txt, uint32_t * i_start); -extern uint32_t (*const lv_text_encoded_prev)(const char * txt, uint32_t * i_start); -extern uint32_t (*const lv_text_encoded_get_byte_id)(const char * txt, uint32_t utf8_id); -extern uint32_t (*const lv_text_encoded_get_char_id)(const char * txt, uint32_t byte_id); -extern uint32_t (*const lv_text_get_encoded_length)(const char * txt); -struct _lv_cache_entry_t { - const lv_cache_t * cache; - int32_t ref_cnt; - uint32_t node_size; - uint8_t flags; -}; -void lv_cache_entry_reset_ref(lv_cache_entry_t * entry); -void lv_cache_entry_inc_ref(lv_cache_entry_t * entry); -void lv_cache_entry_dec_ref(lv_cache_entry_t * entry); -void lv_cache_entry_set_node_size(lv_cache_entry_t * entry, uint32_t node_size); -void lv_cache_entry_set_cache(lv_cache_entry_t * entry, const lv_cache_t * cache); -void * lv_cache_entry_acquire_data(lv_cache_entry_t * entry); -void lv_cache_entry_release_data(lv_cache_entry_t * entry, void * user_data); -void lv_cache_entry_set_flag(lv_cache_entry_t * entry, uint8_t flags); -void lv_cache_entry_remove_flag(lv_cache_entry_t * entry, uint8_t flags); -bool lv_cache_entry_has_flag(lv_cache_entry_t * entry, uint8_t flags); -struct _lv_obj_spec_attr_t { - lv_obj_t ** children; - lv_group_t * group_p; - lv_event_list_t event_list; - lv_point_t scroll; - int32_t ext_click_pad; - int32_t ext_draw_size; - uint16_t child_cnt; - uint16_t scrollbar_mode : 2; - uint16_t scroll_snap_x : 2; - uint16_t scroll_snap_y : 2; - uint16_t scroll_dir : 4; - uint16_t layer_type : 2; - uint16_t name_static : 1; -}; -struct _lv_obj_t { - const lv_obj_class_t * class_p; - lv_obj_t * parent; - lv_obj_spec_attr_t * spec_attr; - lv_obj_style_t * styles; - uint32_t style_main_prop_is_set; - uint32_t style_other_prop_is_set; - void * user_data; - lv_area_t coords; - lv_obj_flag_t flags; - uint16_t state; - uint16_t layout_inv : 1; - uint16_t readjust_scroll_after_layout : 1; - uint16_t scr_layout_inv : 1; - uint16_t skip_trans : 1; - uint16_t style_cnt : 6; - uint16_t h_layout : 1; - uint16_t w_layout : 1; - uint16_t h_ignore_size : 1; - uint16_t w_ignore_size : 1; - uint16_t is_deleting : 1; - uint16_t radio_button : 1; - uint16_t rendered : 1; -}; -struct _lv_image_t { - lv_obj_t obj; - const void * src; - const lv_image_dsc_t * bitmap_mask_src; - lv_point_t offset; - int32_t w; - int32_t h; - uint32_t rotation; - uint32_t scale_x; - uint32_t scale_y; - lv_point_t pivot; - uint32_t src_type : 2; - uint32_t cf : 5; - uint32_t antialias : 1; - uint32_t align: 4; - uint32_t blend_mode: 4; -}; -struct _lv_canvas_t { - lv_image_t img; - lv_draw_buf_t * draw_buf; - lv_draw_buf_t static_buf; -}; -struct _lv_qrcode_t { - lv_canvas_t canvas; - lv_color_t dark_color; - lv_color_t light_color; - int32_t quiet_zone; -}; -struct _lv_barcode_t { - lv_canvas_t canvas; - lv_color_t dark_color; - lv_color_t light_color; - uint16_t scale; - lv_dir_t direction; - bool tiled; - lv_barcode_encoding_t encoding; -}; -struct _lv_draw_image_sup_t { - lv_color_t alpha_color; - const lv_color32_t * palette; - uint32_t palette_size : 9; -}; -void lv_draw_image_normal_helper(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, - const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb, - const lv_image_decoder_args_t * decoder_args); -void lv_draw_image_tiled_helper(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, - const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb, - const lv_image_decoder_args_t * decoder_args); -void lv_image_buf_get_transformed_area(lv_area_t * res, int32_t w, int32_t h, int32_t angle, - uint16_t scale_x, uint16_t scale_y, const lv_point_t * pivot); -struct _lv_image_decoder_args_t { - bool stride_align; - bool premultiply; - bool no_cache; - bool use_indexed; - bool flush_cache; -}; -struct _lv_image_decoder_t { - lv_image_decoder_info_f_t info_cb; - lv_image_decoder_open_f_t open_cb; - lv_image_decoder_get_area_cb_t get_area_cb; - lv_image_decoder_close_f_t close_cb; - lv_image_decoder_custom_draw_t custom_draw_cb; - const char * name; - void * user_data; -}; -struct _lv_image_cache_data_t { - lv_cache_slot_size_t slot; - const void * src; - lv_image_src_t src_type; - const lv_draw_buf_t * decoded; - const lv_image_decoder_t * decoder; +static inline int32_t lv_obj_get_style_transform_scale_x_safe_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 78); } } while(0); + int32_t scale = lv_obj_get_style_transform_scale_x(obj, part); + return scale > 0 ? scale : 1; +} +static inline int32_t lv_obj_get_style_transform_scale_y_safe_internal(const lv_obj_t * obj, lv_part_t part) +{ + do { if(!(obj != 0)) { do {}while(0); lv_micropython_assert_failed("lv_obj_style_internal.h", 85); } } while(0); + int32_t scale = lv_obj_get_style_transform_scale_y(obj, part); + return scale > 0 ? scale : 1; +} +struct _lv_display_t { + int32_t hor_res; + int32_t ver_res; + int32_t physical_hor_res; + int32_t physical_ver_res; + int32_t offset_x; + int32_t offset_y; + uint32_t dpi; + lv_draw_buf_t * buf_1; + lv_draw_buf_t * buf_2; + lv_draw_buf_t * buf_3; + lv_draw_buf_t * buf_act; + lv_display_flush_cb_t flush_cb; + lv_display_flush_wait_cb_t flush_wait_cb; + volatile int flushing; + volatile int flushing_last; + volatile uint32_t last_area : 1; + volatile uint32_t last_part : 1; + lv_display_sync_cb_t sync_cb; + lv_display_sync_wait_cb_t sync_wait_cb; + volatile int syncing; + volatile int syncing_last; + lv_ll_t sync_areas; + lv_display_render_mode_t render_mode; + uint32_t antialiasing : 1; + uint32_t tile_cnt : 8; + uint32_t stride_is_auto : 1; + uint32_t rendering_in_progress : 1; + lv_color_format_t color_format; + lv_area_t inv_areas[32]; + uint8_t inv_area_joined[32]; + uint32_t inv_p; + int32_t inv_en_cnt; + lv_draw_buf_t _static_buf1; + lv_draw_buf_t _static_buf2; + lv_layer_t * layer_head; + lv_obj_t ** screens; + lv_obj_t * sys_layer; + lv_obj_t * top_layer; + lv_obj_t * act_scr; + lv_obj_t * bottom_layer; + lv_obj_t * prev_scr; + lv_obj_t * scr_to_load; + uint32_t screen_cnt; + uint8_t draw_prev_over_act : 1; + uint8_t del_prev : 1; + void * driver_data; void * user_data; + lv_event_list_t event_list; + uint32_t rotation : 3; + uint32_t matrix_rotation : 1; + lv_theme_t * theme; + lv_timer_t * refr_timer; + uint32_t last_activity_time; + lv_area_t refreshed_area; + uint32_t vsync_count; }; -struct _lv_image_header_cache_data_t { - const void * src; - lv_image_src_t src_type; - lv_image_header_t header; - lv_image_decoder_t * decoder; -}; -struct _lv_image_decoder_dsc_t { - lv_image_decoder_t * decoder; - lv_image_decoder_args_t args; - const void * src; - lv_image_src_t src_type; - lv_fs_file_t file; - lv_image_header_t header; - const lv_draw_buf_t * decoded; +void lv_display_set_draw_buf_handlers(lv_display_t * disp, const lv_draw_buf_handlers_t * handlers); +lv_result_t lv_draw_buf_convert_premultiply(lv_draw_buf_t * draw_buf); +struct _lv_draw_image_sup_t { + lv_color_t alpha_color; const lv_color32_t * palette; - uint32_t palette_size; - uint32_t time_to_open; - const char * error_msg; - lv_cache_t * cache; - lv_cache_entry_t * cache_entry; - void * user_data; + uint32_t palette_size : 9; }; -void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count); -void lv_image_decoder_deinit(void); +void lv_draw_image_normal_helper(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, + const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb, + const lv_image_decoder_args_t * decoder_args); +void lv_draw_image_tiled_helper(lv_draw_task_t * t, const lv_draw_image_dsc_t * draw_dsc, + const lv_area_t * coords, lv_draw_image_core_cb draw_core_cb, + const lv_image_decoder_args_t * decoder_args); +void lv_image_buf_get_transformed_area(lv_area_t * res, int32_t w, int32_t h, int32_t angle, + uint16_t scale_x, uint16_t scale_y, const lv_point_t * pivot); struct _lv_draw_label_hint_t { int32_t line_start; int32_t y; @@ -5896,6 +6128,17 @@ lv_point_t pivot; lv_draw_buf_t * _draw_buf; }; +void lv_draw_unit_draw_letter_internal(lv_draw_task_t * t, lv_draw_glyph_dsc_t * dsc, const lv_point_t * pos, + const lv_font_t * font, uint32_t letter, lv_draw_glyph_cb_t cb); +void lv_area_set_pos(lv_area_t * area_p, int32_t x, int32_t y); +bool lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p); +int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t * a1_p, const lv_area_t * a2_p); +void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * a2_p); +bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, int32_t radius); +bool lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p); +bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p, int32_t radius); +bool lv_area_is_out(const lv_area_t * aout_p, const lv_area_t * aholder_p, int32_t radius); +bool lv_area_is_equal(const lv_area_t * a, const lv_area_t * b); struct _lv_draw_sw_blend_dsc_t { const lv_area_t * blend_area; const void * src_buf; @@ -5936,181 +6179,696 @@ lv_area_t relative_area; lv_area_t src_area; }; -struct _lv_theme_t { - lv_theme_apply_cb_t apply_cb; - lv_theme_t * parent; - void * user_data; - lv_display_t * disp; - lv_color_t color_primary; - lv_color_t color_secondary; - const lv_font_t * font_small; - const lv_font_t * font_normal; - const lv_font_t * font_large; - uint32_t flags; +typedef union { + uint32_t u32; + uint16_t u16[2]; + uint8_t u8[4]; + lv_color32_t c32; +} lv_draw_sw_word_t; +typedef union { + uint16_t u16; + uint8_t u8[2]; + lv_color16_t c16; +} lv_draw_sw_halfword_t; +static inline lv_color32_t lv_color32_unpremultiply(lv_color32_t c) +{ + if(c.alpha == 0) { + c.red = 0; + c.green = 0; + c.blue = 0; + } + else if(c.alpha != LV_OPA_COVER) { + uint32_t reciprocal = (255u * 256u) / c.alpha; + uint32_t r = (c.red * reciprocal) >> 8; + uint32_t g = (c.green * reciprocal) >> 8; + uint32_t b = (c.blue * reciprocal) >> 8; + c.red = (uint8_t)(r > 255 ? 255 : r); + c.green = (uint8_t)(g > 255 ? 255 : g); + c.blue = (uint8_t)(b > 255 ? 255 : b); + } + return c; +} +static inline uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) +{ + if(!premultiplied || c.alpha == 0 || c.alpha == LV_OPA_COVER) return lv_color32_luminance(c); + uint32_t lumi = (lv_color32_luminance(c) * ((255u * 256u) / c.alpha)) >> 8; + return (uint8_t)(lumi > 255 ? 255 : lumi); +} +static inline uint16_t lv_color_16_16_mix_inlined(uint16_t c1, uint16_t c2, uint8_t mix) +{ + if(mix == 255) return c1; + if(mix == 0) return c2; + if(c1 == c2) return c1; + uint32_t mix5 = ((uint32_t)mix + 4) >> 3; + uint32_t bg = (uint32_t)(c2 | ((uint32_t)c2 << 16)) & 0x7E0F81F; + uint32_t fg = (uint32_t)(c1 | ((uint32_t)c1 << 16)) & 0x7E0F81F; + uint32_t result = ((((fg - bg) * mix5) >> 5) + bg) & 0x7E0F81F; + return (uint16_t)((result >> 16) | result); +} +static inline lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) +{ + if(fg.alpha >= 253) { + fg.alpha = bg.alpha; + return fg; + } + if(fg.alpha <= 2) { + return bg; + } + uint32_t mix_inv = 255 - fg.alpha; + bg.red = (uint8_t)((((uint32_t)fg.red * fg.alpha + (uint32_t)bg.red * mix_inv) * 0x8081U) >> 0x17); + bg.green = (uint8_t)((((uint32_t)fg.green * fg.alpha + (uint32_t)bg.green * mix_inv) * 0x8081U) >> 0x17); + bg.blue = (uint8_t)((((uint32_t)fg.blue * fg.alpha + (uint32_t)bg.blue * mix_inv) * 0x8081U) >> 0x17); + return bg; +} +static inline lv_color32_t lv_color_mix32_premultiplied_inlined(lv_color32_t fg, + lv_color32_t bg) +{ + if(fg.alpha >= 253) { + return fg; + } + if(fg.alpha <= 2) { + return bg; + } + uint32_t mix_inv = 253 - fg.alpha; + bg.red = (uint8_t)(fg.red + (((uint32_t)bg.red * mix_inv) >> 8)); + bg.green = (uint8_t)(fg.green + (((uint32_t)bg.green * mix_inv) >> 8)); + bg.blue = (uint8_t)(fg.blue + (((uint32_t)bg.blue * mix_inv) >> 8)); + return bg; +} +void lv_draw_sw_blend_color_to_a8(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_a8(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_al88(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_al88(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_argb8888(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_argb8888(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_argb8888_premultiplied(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_argb8888_premultiplied(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_i1(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_i1(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_l8(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_l8(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_rgb565(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_rgb565(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_rgb565_swapped(lv_draw_sw_blend_fill_dsc_t * dsc); +void lv_draw_sw_blend_image_to_rgb565_swapped(lv_draw_sw_blend_image_dsc_t * dsc); +void lv_draw_sw_blend_color_to_rgb888(lv_draw_sw_blend_fill_dsc_t * dsc, + uint32_t dest_px_size); +void lv_draw_sw_blend_image_to_rgb888(lv_draw_sw_blend_image_dsc_t * dsc, + uint32_t dest_px_size); +typedef struct { + lv_color_t * color_map; + lv_opa_t * opa_map; + uint32_t size; +} lv_draw_sw_grad_calc_t; +void lv_draw_sw_grad_color_calculate(const lv_grad_dsc_t * dsc, int32_t range, + int32_t frac, lv_color_t * color_out, lv_opa_t * opa_out); +lv_draw_sw_grad_calc_t * lv_draw_sw_grad_get(const lv_grad_dsc_t * gradient, int32_t w, int32_t h); +void lv_draw_sw_grad_cleanup(lv_draw_sw_grad_calc_t * grad); +struct _lv_font_fmt_txt_glyph_loader_t { + const uint8_t * (*get_glyph_bitmap_cb)(lv_font_fmt_txt_glyph_loader_t * loader, uint32_t gid); + lv_mutex_t lock; }; -void lv_refr_init(void); -void lv_refr_deinit(void); -lv_result_t lv_inv_area(lv_display_t * disp, const lv_area_t * area_p); -lv_display_t * lv_refr_get_disp_refreshing(void); -void lv_refr_set_disp_refreshing(lv_display_t * disp); -lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj); -void lv_obj_refr(lv_layer_t * layer, lv_obj_t * obj); -struct _lv_obj_style_t { - const lv_style_t * style; - uint32_t selector : 24; - uint32_t is_local : 1; - uint32_t is_trans : 1; - uint32_t is_disabled : 1; - uint32_t is_theme : 1; +int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t * lhs, const lv_font_glyph_dsc_t * rhs); +const void * lv_font_get_glyph_bitmap_internal(lv_font_glyph_dsc_t * g_dsc, lv_draw_buf_t * draw_buf); +const void * lv_font_get_glyph_static_bitmap_internal(lv_font_glyph_dsc_t * g_dsc); +void lv_font_glyph_release_draw_data_internal(lv_font_glyph_dsc_t * g_dsc); +bool lv_font_get_glyph_dsc_internal(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t letter, + uint32_t letter_next); +uint16_t lv_font_get_glyph_width_internal(const lv_font_t * font, uint32_t letter, uint32_t letter_next); +static inline int32_t lv_font_get_line_height_internal(const lv_font_t * font) +{ + do { if(!(font)) { do {}while(0); lv_micropython_assert_failed("lv_font_private.h", 63); } } while(0); + return font->line_height; +} +static inline bool lv_font_has_static_bitmap_internal(const lv_font_t * font) +{ + do { if(!(font)) { do {}while(0); lv_micropython_assert_failed("lv_font_private.h", 72); } } while(0); + return font->static_bitmap; +} +struct _lv_fs_file_cache_t { + uint32_t start; + uint32_t end; + uint32_t file_position; + void * buffer; }; -struct _lv_obj_style_transition_dsc_t { - uint16_t time; - uint16_t delay; - lv_style_selector_t selector; - lv_style_prop_t prop; - lv_anim_path_cb_t path_cb; - void * user_data; +void lv_fs_init(void); +void lv_fs_deinit(void); +struct _lv_image_decoder_args_t { + bool stride_align; + bool premultiply; + bool no_cache; + bool use_indexed; + bool flush_cache; }; -void lv_obj_style_init(void); -void lv_obj_style_deinit(void); -void lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, - lv_state_t new_state, const lv_obj_style_transition_dsc_t * tr); -lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t * obj, lv_state_t state1, lv_state_t state2); -void lv_obj_update_layer_type(lv_obj_t * obj); -lv_result_t lv_obj_scroll_by_raw(lv_obj_t * obj, int32_t x, int32_t y); -int32_t lv_obj_get_ext_draw_size(const lv_obj_t * obj); -lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t * obj); -struct _lv_obj_class_t { - const lv_obj_class_t * base_class; - void (*constructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj); - void (*destructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj); - void (*event_cb)(const lv_obj_class_t * class_p, lv_event_t * e); - void * user_data; +struct _lv_image_decoder_t { + lv_image_decoder_info_f_t info_cb; + lv_image_decoder_open_f_t open_cb; + lv_image_decoder_get_area_cb_t get_area_cb; + lv_image_decoder_close_f_t close_cb; + lv_image_decoder_custom_draw_t custom_draw_cb; const char * name; - int32_t width_def; - int32_t height_def; - uint32_t editable : 2; - uint32_t group_def : 2; - uint32_t instance_size : 16; - uint32_t theme_inheritable : 1; -}; -void lv_obj_destruct(lv_obj_t * obj); -struct _lv_group_t { - lv_ll_t obj_ll; - lv_obj_t ** obj_focus; - lv_group_focus_cb_t focus_cb; - lv_group_edge_cb_t edge_cb; void * user_data; - uint8_t frozen : 1; - uint8_t editing : 1; - uint8_t refocus_policy : 1; - uint8_t wrap : 1; }; -void lv_group_init(void); -void lv_group_deinit(void); -struct _lv_hit_test_info_t { - const lv_point_t * point; - bool res; +struct _lv_image_cache_data_t { + lv_cache_slot_size_t slot; + const void * src; + lv_image_src_t src_type; + const lv_draw_buf_t * decoded; + const lv_image_decoder_t * decoder; + void * user_data; }; -struct _lv_cover_check_info_t { - lv_cover_res_t res; - const lv_area_t * area; +struct _lv_image_header_cache_data_t { + const void * src; + lv_image_src_t src_type; + lv_image_header_t header; + lv_image_decoder_t * decoder; }; -struct _lv_observer_t { - lv_subject_t * subject; - lv_observer_cb_t cb; - void * target; +struct _lv_image_decoder_dsc_t { + lv_image_decoder_t * decoder; + lv_image_decoder_args_t args; + const void * src; + lv_image_src_t src_type; + lv_fs_file_t file; + lv_image_header_t header; + const lv_draw_buf_t * decoded; + const lv_color32_t * palette; + uint32_t palette_size; + uint32_t time_to_open; + const char * error_msg; + lv_cache_t * cache; + lv_cache_entry_t * cache_entry; void * user_data; - uint32_t auto_free_user_data : 1; - uint32_t notified : 1; - uint32_t for_obj : 1; }; -struct _lv_subject_increment_dsc_t { - lv_subject_t * subject; - int32_t step; - bool rollover; - int32_t min_value; - int32_t max_value; +void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count); +void lv_image_decoder_deinit(void); +lv_cache_entry_t * lv_image_decoder_add_to_cache(lv_image_decoder_t * decoder, + lv_image_cache_data_t * search_key, + const lv_draw_buf_t * decoded, void * user_data); +struct lv_indev_gesture_motion { + int8_t finger; + lv_point_t start_point; + lv_point_t point; + lv_indev_state_t state; }; -void lv_area_set_pos(lv_area_t * area_p, int32_t x, int32_t y); -bool lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p); -int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t * a1_p, const lv_area_t * a2_p); -void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * a2_p); -bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p, int32_t radius); -bool lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p); -bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p, int32_t radius); -bool lv_area_is_out(const lv_area_t * aout_p, const lv_area_t * aholder_p, int32_t radius); -bool lv_area_is_equal(const lv_area_t * a, const lv_area_t * b); -struct _lv_fs_file_cache_t { - uint32_t start; - uint32_t end; - uint32_t file_position; - void * buffer; +typedef struct lv_indev_gesture_motion lv_indev_gesture_motion_t; +struct lv_indev_gesture { + lv_indev_gesture_motion_t motions[2]; + lv_point_t center; + float scale; + float p_scale; + float scale_factors_x[2]; + float scale_factors_y[2]; + float delta_x; + float delta_y; + float p_delta_x; + float p_delta_y; + float rotation; + float p_rotation; + uint8_t finger_cnt; +}; +struct lv_indev_gesture_configuration { + float pinch_up_threshold; + float pinch_down_threshold; + float rotation_angle_rad_threshold; +}; +void lv_indev_scroll_handler(lv_indev_t * indev); +void lv_indev_scroll_throw_handler(lv_indev_t * indev); +int32_t lv_indev_scroll_throw_predict(lv_indev_t * indev, lv_dir_t dir); +void lv_indev_scroll_get_snap_dist(lv_obj_t * obj, lv_point_t * p); +struct _lv_indev_t { + lv_indev_type_t type; + lv_indev_read_cb_t read_cb; + lv_indev_state_t state; + lv_indev_state_t prev_state; + lv_indev_mode_t mode; + uint8_t long_pr_sent : 1; + uint8_t reset_query : 1; + uint8_t enabled : 1; + uint8_t wait_until_release : 1; + uint8_t stop_processing_query : 1; + uint32_t timestamp; + uint32_t pr_timestamp; + uint32_t longpr_rep_timestamp; + void * driver_data; + void * user_data; + lv_display_t * disp; + lv_timer_t * read_timer; + uint8_t scroll_limit; + uint8_t scroll_throw; + uint8_t gesture_min_velocity; + uint8_t gesture_min_distance; + uint16_t long_press_time; + uint16_t double_click_time; + uint16_t long_press_repeat_time; + int32_t rotary_sensitivity; + struct { + lv_point_t act_point; + lv_point_t last_point; + lv_point_t last_raw_point; + lv_point_t vect; + lv_point_t vect_hist[8]; + uint32_t vect_hist_timestamp[8]; + uint8_t vect_hist_index; + lv_point_t scroll_sum; + lv_point_t scroll_throw_vect; + lv_point_t scroll_throw_vect_ori; + lv_obj_t * act_obj; + lv_obj_t * scroll_obj; + lv_obj_t * last_pressed; + lv_obj_t * last_hovered; + lv_area_t scroll_area; + lv_point_t gesture_sum; + int32_t diff; + uint8_t short_click_streak; + lv_point_t last_short_click_point; + uint32_t last_short_click_timestamp; + uint8_t scroll_dir : 4; + uint8_t gesture_dir : 4; + uint8_t gesture_sent : 1; + uint8_t press_moved : 1; + uint8_t pressed : 1; + uint8_t ccw_rotation : 1; + } pointer; + struct { + lv_indev_state_t last_state; + uint32_t last_key; + } keypad; + lv_obj_t * cursor; + lv_group_t * group; + const lv_point_t * btn_points; + lv_event_list_t event_list; + lv_anim_t * scroll_throw_anim; + lv_indev_key_remap_cb_t key_remap_cb; + lv_indev_gesture_recognizer_t recognizers[LV_INDEV_GESTURE_CNT]; + lv_indev_gesture_type_t cur_gesture; + void * gesture_data[LV_INDEV_GESTURE_CNT]; + lv_indev_gesture_type_t gesture_type[LV_INDEV_GESTURE_CNT]; }; -void lv_fs_init(void); -void lv_fs_deinit(void); -struct _lv_event_dsc_t { - lv_event_cb_t cb; - void * user_data; - uint32_t filter; +lv_obj_t * lv_indev_find_scroll_obj(lv_indev_t * indev); +static inline bool lv_style_is_const_internal(const lv_style_t * style) +{ + do { if(!(style != 0)) { do {}while(0); lv_micropython_assert_failed("lv_style_private.h", 32); } } while(0); + return style->prop_cnt == 255; +} +static inline lv_style_res_t lv_style_get_prop_internal(const lv_style_t * style, lv_style_prop_t prop, + lv_style_value_t * value) +{ + do { if(!(style != 0)) { do {}while(0); lv_micropython_assert_failed("lv_style_private.h", 39); } } while(0); + do { if(!(value != 0)) { do {}while(0); lv_micropython_assert_failed("lv_style_private.h", 40); } } while(0); + if(lv_style_is_const_internal(style)) { + lv_style_const_prop_t * props = (lv_style_const_prop_t *)style->values_and_props; + uint32_t i; + for(i = 0; props[i].prop != LV_STYLE_PROP_INV; i++) { + if(props[i].prop == prop) { + *value = props[i].value; + return LV_STYLE_RES_FOUND; + } + } + } + else { + lv_style_prop_t * props = (lv_style_prop_t *)style->values_and_props + style->prop_cnt * sizeof(lv_style_value_t); + uint32_t i; + for(i = 0; i < style->prop_cnt; i++) { + if(props[i] == prop) { + lv_style_value_t * values = (lv_style_value_t *)style->values_and_props; + *value = values[i]; + return LV_STYLE_RES_FOUND; + } + } + } + return LV_STYLE_RES_NOT_FOUND; +} +lv_result_t lv_image_header_cache_init(uint32_t count); +void lv_image_header_cache_resize(uint32_t count, bool evict_now); +void lv_image_header_cache_drop(const void * src); +bool lv_image_header_cache_is_enabled(void); +lv_iter_t * lv_image_header_cache_iter_create(void); +void lv_image_header_cache_dump(void); +struct _lv_cache_entry_t { + const lv_cache_t * cache; + int32_t ref_cnt; + uint32_t node_size; + uint8_t flags; }; -struct _lv_event_t { - void * current_target; - void * original_target; - lv_event_code_t code; +void lv_cache_entry_reset_ref(lv_cache_entry_t * entry); +void lv_cache_entry_inc_ref(lv_cache_entry_t * entry); +void lv_cache_entry_dec_ref(lv_cache_entry_t * entry); +void lv_cache_entry_set_node_size(lv_cache_entry_t * entry, uint32_t node_size); +void lv_cache_entry_set_cache(lv_cache_entry_t * entry, const lv_cache_t * cache); +void * lv_cache_entry_acquire_data(lv_cache_entry_t * entry); +void lv_cache_entry_release_data(lv_cache_entry_t * entry, void * user_data); +void lv_cache_entry_set_flag(lv_cache_entry_t * entry, uint8_t flags); +void lv_cache_entry_remove_flag(lv_cache_entry_t * entry, uint8_t flags); +bool lv_cache_entry_has_flag(lv_cache_entry_t * entry, uint8_t flags); +struct _lv_anim_timeline_dsc_t; +struct _lv_anim_timeline_t { + struct _lv_anim_timeline_dsc_t * anim_dsc; + uint32_t anim_dsc_cnt; + uint32_t act_time; + bool reverse; + uint32_t delay; + uint32_t repeat_count; + uint32_t repeat_delay; void * user_data; - void * param; - lv_event_t * prev; - uint8_t deleted : 1; - uint8_t stop_processing : 1; - uint8_t stop_bubbling : 1; - uint8_t stop_trickling : 1; }; -void lv_event_push(lv_event_t * e); -void lv_event_pop(lv_event_t * e); -lv_result_t lv_event_push_and_send(lv_event_list_t * event_list, lv_event_code_t code, void * original_target, - void * param); -void lv_event_mark_deleted(void * target); -struct _lv_rb_node_t { +static inline void lv_bidi_calculate_align_internal(lv_text_align_t * align, lv_base_dir_t * base_dir, + const char * txt) +{ + ((void)txt); + ((void)base_dir); + do { if(!(align != 0)) { do {}while(0); lv_micropython_assert_failed("lv_bidi_private.h", 118); } } while(0); + if(*align == LV_TEXT_ALIGN_AUTO) * align = LV_TEXT_ALIGN_LEFT; +} +typedef struct _lv_circle_buf_t lv_circle_buf_t; +typedef bool (*lv_circle_buf_fill_cb_t)(void * buf, uint32_t buff_len, int32_t index, void * user_data); +lv_circle_buf_t * lv_circle_buf_create(uint32_t capacity, uint32_t element_size); +lv_circle_buf_t * lv_circle_buf_create_from_buf(void * buf, uint32_t capacity, uint32_t element_size); +lv_circle_buf_t * lv_circle_buf_create_from_array(const lv_array_t * array); +lv_result_t lv_circle_buf_resize(lv_circle_buf_t * circle_buf, uint32_t capacity); +void lv_circle_buf_destroy(lv_circle_buf_t * circle_buf); +uint32_t lv_circle_buf_size(const lv_circle_buf_t * circle_buf); +uint32_t lv_circle_buf_capacity(const lv_circle_buf_t * circle_buf); +uint32_t lv_circle_buf_remain(const lv_circle_buf_t * circle_buf); +bool lv_circle_buf_is_empty(const lv_circle_buf_t * circle_buf); +bool lv_circle_buf_is_full(const lv_circle_buf_t * circle_buf); +void lv_circle_buf_reset(lv_circle_buf_t * circle_buf); +void * lv_circle_buf_head(const lv_circle_buf_t * circle_buf); +void * lv_circle_buf_tail(const lv_circle_buf_t * circle_buf); +lv_result_t lv_circle_buf_read(lv_circle_buf_t * circle_buf, void * data); +lv_result_t lv_circle_buf_write(lv_circle_buf_t * circle_buf, const void * data); +uint32_t lv_circle_buf_fill(lv_circle_buf_t * circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, + void * user_data); +lv_result_t lv_circle_buf_skip(lv_circle_buf_t * circle_buf); +lv_result_t lv_circle_buf_peek(const lv_circle_buf_t * circle_buf, void * data); +lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t * circle_buf, uint32_t index, void * data); +typedef enum { + LV_LRU_OK = 0, + LV_LRU_MISSING_CACHE, + LV_LRU_MISSING_KEY, + LV_LRU_MISSING_VALUE, + LV_LRU_LOCK_ERROR, + LV_LRU_VALUE_TOO_LARGE +} lv_lru_res_t; +typedef void (*lv_lru_free_cb_t)(void * v); +typedef struct _lv_lru_item_t lv_lru_item_t; +typedef struct _lv_lru_t { + lv_lru_item_t ** items; + uint64_t access_count; + size_t free_memory; + size_t total_memory; + size_t average_item_length; + size_t hash_table_size; + uint32_t seed; + lv_lru_free_cb_t value_free; + lv_lru_free_cb_t key_free; + lv_lru_item_t * free_items; +} lv_lru_t; +lv_lru_t * lv_lru_create(size_t cache_size, size_t average_length, lv_lru_free_cb_t value_free, + lv_lru_free_cb_t key_free); +void lv_lru_delete(lv_lru_t * cache); +lv_lru_res_t lv_lru_set(lv_lru_t * cache, const void * key, size_t key_length, void * value, size_t value_length); +lv_lru_res_t lv_lru_get(lv_lru_t * cache, const void * key, size_t key_size, void ** value); +lv_lru_res_t lv_lru_remove(lv_lru_t * cache, const void * key, size_t key_size); +void lv_lru_remove_lru_item(lv_lru_t * cache); +typedef struct _lv_pending_t lv_pending_t; +typedef void (*lv_pending_free_cb_t)(void * obj, void * user_data); +lv_pending_t * lv_pending_create(size_t obj_size, uint32_t capacity_default); +void lv_pending_destroy(lv_pending_t * pending); +void lv_pending_set_free_cb(lv_pending_t * pending, lv_pending_free_cb_t free_cb, + void * user_data); +void lv_pending_add(lv_pending_t * pending, void * obj); +void lv_pending_remove_all(lv_pending_t * pending); +void lv_pending_swap(lv_pending_t * pending); +typedef int32_t lv_rb_compare_res_t; +typedef lv_rb_compare_res_t (*lv_rb_compare_t)(const void * a, const void * b); +typedef enum { + LV_RB_COLOR_RED, + LV_RB_COLOR_BLACK +} lv_rb_color_t; +typedef struct _lv_rb_node_t { struct _lv_rb_node_t * parent; struct _lv_rb_node_t * left; struct _lv_rb_node_t * right; lv_rb_color_t color; void * data; +} lv_rb_node_t; +typedef struct _lv_rb_t { + lv_rb_node_t * root; + lv_rb_compare_t compare; + size_t size; +} lv_rb_t; +bool lv_rb_init(lv_rb_t * tree, lv_rb_compare_t compare, size_t node_size); +lv_rb_node_t * lv_rb_insert(lv_rb_t * tree, void * key); +lv_rb_node_t * lv_rb_find(lv_rb_t * tree, const void * key); +void * lv_rb_remove_node(lv_rb_t * tree, lv_rb_node_t * node); +void * lv_rb_remove(lv_rb_t * tree, const void * key); +bool lv_rb_drop_node(lv_rb_t * tree, lv_rb_node_t * node); +bool lv_rb_drop(lv_rb_t * tree, const void * key); +lv_rb_node_t * lv_rb_minimum(lv_rb_t * node); +lv_rb_node_t * lv_rb_maximum(lv_rb_t * node); +lv_rb_node_t * lv_rb_minimum_from(lv_rb_node_t * node); +lv_rb_node_t * lv_rb_maximum_from(lv_rb_node_t * node); +void lv_rb_destroy(lv_rb_t * tree); +typedef enum { + LV_TEXT_CMD_STATE_WAIT, + LV_TEXT_CMD_STATE_PAR, + LV_TEXT_CMD_STATE_IN, +} lv_text_cmd_state_t; +typedef struct { + int32_t letter_space; + int32_t line_space; + int32_t max_width; + lv_text_flag_t text_flags; +} lv_text_attributes_t; +void lv_text_attributes_init(lv_text_attributes_t * attributes); +void lv_text_get_size_attributes(lv_point_t * size_res, const char * text, const lv_font_t * font, + lv_text_attributes_t * attributes); +int32_t lv_text_get_width(const char * txt, uint32_t length, const lv_font_t * font, + const lv_text_attributes_t * attributes); +int32_t lv_text_get_line_width(const char * txt, uint32_t length, const lv_font_t * font, + const lv_text_attributes_t * attributes); +bool lv_text_is_cmd(lv_text_cmd_state_t * state, uint32_t c); +uint32_t lv_text_get_next_line(const char * txt, uint32_t len, const lv_font_t * font, int32_t * used_width, + lv_text_attributes_t * attributes); +void lv_text_ins(char * txt_buf, uint32_t pos, const char * ins_txt); +void lv_text_cut(char * txt, uint32_t pos, uint32_t len); +char * lv_text_set_text_vfmt(const char * fmt, va_list ap) ; +void lv_text_encoded_letter_next_2(const char * txt, uint32_t * letter, uint32_t * letter_next, uint32_t * ofs); +void lv_text_get_size_internal(lv_point_t * size_res, const char * text, const lv_font_t * font, int32_t letter_space, + int32_t line_space, int32_t max_width, lv_text_flag_t flag); +static inline bool lv_text_is_break_char(uint32_t letter) +{ + uint8_t i; + bool ret = 0; + for(i = 0; " ,.;:-_)]}"[i] != '\0'; i++) { + if(letter == (uint32_t)" ,.;:-_)]}"[i]) { + ret = 1; + break; + } + } + return ret; +} +static inline bool lv_text_is_hanging_space(uint32_t letter) +{ + return letter == ' ' || letter == '\n' || letter == '\r'; +} +static inline bool lv_text_is_a_word(uint32_t letter) +{ + if(letter == 0) return 0; + if(letter >= 0x4E00 && letter <= 0x9FFF) { + return 1; + } + if(letter >= 0xFF01 && letter <= 0xFF5E) { + return 1; + } + if(letter >= 0x3000 && letter <= 0x303F) { + return 1; + } + if(letter >= 0x2E80 && letter <= 0x2EFF) { + return 1; + } + if(letter >= 0x31C0 && letter <= 0x31EF) { + return 1; + } + if(letter >= 0x3040 && letter <= 0x30FF) { + return 1; + } + if(letter >= 0xFE10 && letter <= 0xFE1F) { + return 1; + } + if(letter >= 0xFE30 && letter <= 0xFE4F) { + return 1; + } + return 0; +} +static inline bool lv_text_is_marker(uint32_t letter) +{ + if(letter < 0x20) return 1; + if(letter == 0x061C) return 1; + if(letter == 0x115F) return 1; + if(letter == 0x1160) return 1; + if(letter >= 0x180B && letter <= 0x180E) return 1; + if(letter >= 0x200B && letter <= 0x200F) return 1; + if(letter >= 0x2028 && letter <= 0x202F) return 1; + if(letter >= 0x205F && letter <= 0x206F) return 1; + if(letter == 0xFEFF) return 1; + if(letter == 0xF8FF) return 1; + return 0; +} +static inline int32_t lv_font_get_bottom_trim_internal(const lv_font_t * font, lv_text_leading_trim_t trim) +{ + do { if(!(font != 0)) { do {}while(0); lv_micropython_assert_failed("lv_text_private.h", 279); } } while(0); + switch(trim) { + case LV_TEXT_LEADING_TRIM_CAPITAL_BASELINE: + case LV_TEXT_LEADING_TRIM_LOWER_BASELINE: + return font->base_line; + case LV_TEXT_LEADING_TRIM_NONE: + case LV_TEXT_LEADING_TRIM_CAPITAL: + case LV_TEXT_LEADING_TRIM_LOWER: + return 0; + } + __builtin_unreachable(); +} +static inline int32_t lv_font_get_top_trim_internal(const lv_font_t * font, lv_text_leading_trim_t trim) +{ + do { if(!(font != 0)) { do {}while(0); lv_micropython_assert_failed("lv_text_private.h", 294); } } while(0); + switch(trim) { + case LV_TEXT_LEADING_TRIM_CAPITAL_BASELINE: + case LV_TEXT_LEADING_TRIM_CAPITAL: + return (font->line_height - font->base_line) - font->cap_height; + case LV_TEXT_LEADING_TRIM_LOWER_BASELINE: + case LV_TEXT_LEADING_TRIM_LOWER: + return (font->line_height - font->base_line) - font->x_height; + case LV_TEXT_LEADING_TRIM_NONE: + return 0; + } + __builtin_unreachable(); +} +extern uint8_t (*const lv_text_encoded_size)(const char * txt); +extern uint32_t (*const lv_text_unicode_to_encoded)(uint32_t letter_uni); +extern uint32_t (*const lv_text_encoded_conv_wc)(uint32_t c); +extern uint32_t (*const lv_text_encoded_next)(const char * txt, uint32_t * i_start); +extern uint32_t (*const lv_text_encoded_prev)(const char * txt, uint32_t * i_start); +extern uint32_t (*const lv_text_encoded_get_byte_id)(const char * txt, uint32_t utf8_id); +extern uint32_t (*const lv_text_encoded_get_char_id)(const char * txt, uint32_t byte_id); +extern uint32_t (*const lv_text_get_encoded_length)(const char * txt); +typedef void (*lv_tree_constructor_cb_t)(const lv_tree_class_t * class_p, lv_tree_node_t * node); +typedef void (*lv_tree_destructor_cb_t)(const lv_tree_class_t * class_p, lv_tree_node_t * node); +struct _lv_tree_class_t { + const lv_tree_class_t * base_class; + uint32_t instance_size; + lv_tree_constructor_cb_t constructor_cb; + lv_tree_destructor_cb_t destructor_cb; +}; +struct _lv_tree_node_t { + lv_tree_node_t * parent; + lv_tree_node_t ** children; + uint32_t child_cnt; + uint32_t child_cap; + const lv_tree_class_t * class_p; }; -struct _lv_rb_t { - lv_rb_node_t * root; - lv_rb_compare_t compare; - size_t size; +enum _lv_tree_walk_mode_t { + LV_TREE_WALK_PRE_ORDER = 0, + LV_TREE_WALK_POST_ORDER, }; -struct _lv_anim_timeline_dsc_t; -struct _lv_anim_timeline_t { - struct _lv_anim_timeline_dsc_t * anim_dsc; - uint32_t anim_dsc_cnt; - uint32_t act_time; - bool reverse; - uint32_t delay; - uint32_t repeat_count; - uint32_t repeat_delay; +typedef uint8_t lv_tree_walk_mode_t; +typedef bool (*lv_tree_traverse_cb_t)(const lv_tree_node_t * node, void * user_data); +typedef bool (*lv_tree_before_cb_t)(const lv_tree_node_t * node, void * user_data); +typedef void (*lv_tree_after_cb_t)(const lv_tree_node_t * node, void * user_data); +extern const lv_tree_class_t lv_tree_node_class; +lv_tree_node_t * lv_tree_node_create(const lv_tree_class_t * class_p, lv_tree_node_t * parent); +void lv_tree_node_delete(lv_tree_node_t * node); +bool lv_tree_walk(const lv_tree_node_t * node, + lv_tree_walk_mode_t mode, + lv_tree_traverse_cb_t cb, + lv_tree_before_cb_t bcb, + lv_tree_after_cb_t acb, + void * user_data); +void * lv_utils_bsearch(const void * key, const void * base, size_t n, size_t size, + int (*cmp)(const void * pRef, const void * pElement)); +lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t * draw_buf, const char * path); +static inline uint32_t lv_swap_bytes_32(uint32_t x) +{ + return (x << 24) + | ((x & 0x0000ff00U) << 8) + | ((x & 0x00ff0000U) >> 8) + | (x >> 24); +} +static inline uint16_t lv_swap_bytes_16(uint16_t x) +{ + return (uint16_t)(x << 8) | (x >> 8); +} +struct _lv_theme_t { + lv_theme_apply_cb_t apply_cb; + lv_theme_t * parent; void * user_data; + lv_display_t * disp; + lv_color_t color_primary; + lv_color_t color_secondary; + const lv_font_t * font_small; + const lv_font_t * font_normal; + const lv_font_t * font_large; + uint32_t flags; }; -struct _lv_msgbox_t { +struct _lv_image_t { lv_obj_t obj; - lv_obj_t * header; - lv_obj_t * content; - lv_obj_t * footer; - lv_obj_t * title; + const void * src; + const lv_image_dsc_t * bitmap_mask_src; + lv_point_t offset; + int32_t w; + int32_t h; + uint32_t rotation; + uint32_t scale_x; + uint32_t scale_y; + lv_point_t pivot; + uint32_t src_type : 2; + uint32_t cf : 5; + uint32_t antialias : 1; + uint32_t align: 4; + uint32_t blend_mode: 4; }; -struct _lv_buttonmatrix_t { +struct _lv_animimg_t { + lv_image_t img; + lv_anim_t anim; + const void ** dsc; + int8_t pic_count; +}; +struct _lv_arc_t { lv_obj_t obj; - const char * const * map_p; - lv_area_t * button_areas; - lv_buttonmatrix_ctrl_t * ctrl_bits; - uint32_t btn_cnt; - uint32_t row_cnt; - uint32_t btn_id_sel; - uint32_t one_check : 1; - uint32_t auto_free_map : 1; + int32_t rotation; + lv_value_precise_t indic_angle_start; + lv_value_precise_t indic_angle_end; + lv_value_precise_t bg_angle_start; + lv_value_precise_t bg_angle_end; + int32_t value; + int32_t min_value; + int32_t max_value; + uint32_t dragging : 1; + uint32_t type : 2; + uint32_t min_close : 1; + uint32_t in_out : 1; + uint32_t chg_rate; + uint32_t last_tick; + lv_value_precise_t last_angle; + int16_t knob_offset; +}; +struct _lv_arclabel_t { + lv_obj_t obj; + char * text; + char dot[3 + 1]; + uint32_t dot_begin; + lv_value_precise_t angle_start; + lv_value_precise_t angle_size; + uint32_t offset; + uint32_t radius; + lv_point_t center_offset; + lv_arclabel_dir_t dir; + lv_arclabel_text_align_t text_align_v; + lv_arclabel_text_align_t text_align_h; + uint8_t static_txt : 1; + uint8_t recolor : 1; + uint8_t overflow : 2; + bool end_overlap : 1; }; struct _lv_bar_anim_t { lv_obj_t * bar; @@ -6131,19 +6889,40 @@ lv_bar_mode_t mode : 3; lv_bar_orientation_t orientation : 3; }; -struct _lv_slider_t { - lv_bar_t bar; - lv_area_t left_knob_area; - lv_area_t right_knob_area; - lv_point_t pressed_point; - int32_t * value_to_set; - uint8_t dragging : 1; - uint8_t left_knob_focus : 1; +struct _lv_canvas_t { + lv_image_t img; + lv_draw_buf_t * draw_buf; + lv_draw_buf_t static_buf; }; -struct _lv_switch_t { +struct _lv_barcode_t { + lv_canvas_t canvas; + lv_color_t dark_color; + lv_color_t light_color; + char * data; + uint8_t * pattern; + int32_t bar_count; + uint16_t scale; + lv_dir_t direction; + lv_barcode_encoding_t encoding; + uint8_t tiled : 1; + uint8_t update_mode : 1; + uint8_t needs_update : 1; + uint8_t render_valid : 1; + uint8_t fitting : 1; +}; +struct _lv_button_t { lv_obj_t obj; - int32_t anim_state; - lv_switch_orientation_t orientation : 3; +}; +struct _lv_buttonmatrix_t { + lv_obj_t obj; + const char * const * map_p; + lv_area_t * button_areas; + lv_buttonmatrix_ctrl_t * ctrl_bits; + uint32_t btn_cnt; + uint32_t row_cnt; + uint32_t btn_id_sel; + uint32_t one_check : 1; + uint32_t auto_free_map : 1; }; struct _lv_calendar_t { lv_obj_t obj; @@ -6156,94 +6935,44 @@ bool use_chinese_calendar; char nums [7 * 6][20]; }; -struct _lv_imagebutton_src_info_t { - const void * img_src; - lv_image_header_t header; -}; -struct _lv_imagebutton_t { - lv_obj_t obj; - lv_imagebutton_src_info_t src_mid[LV_IMAGEBUTTON_STATE_NUM]; - lv_imagebutton_src_info_t src_left[LV_IMAGEBUTTON_STATE_NUM]; - lv_imagebutton_src_info_t src_right[LV_IMAGEBUTTON_STATE_NUM]; -}; -struct _lv_textarea_t { - lv_obj_t obj; - lv_obj_t * label; - char * placeholder_txt; - char * pwd_tmp; - char * pwd_bullet; - char * accepted_chars; - uint32_t max_length; - uint32_t pwd_show_time; - struct { - int32_t valid_x; - uint32_t pos; - lv_area_t area; - uint32_t txt_byte_pos; - uint8_t show : 1; - uint8_t click_pos : 1; - } cursor; - uint32_t sel_start; - uint32_t sel_end; - uint8_t text_sel_in_prog : 1; - uint8_t text_sel_en : 1; - uint8_t pwd_mode : 1; - uint8_t one_line : 1; - uint8_t static_accepted_chars : 1; -}; -struct _lv_table_cell_t { - lv_table_cell_ctrl_t ctrl; - void * user_data; - char txt[1]; -}; -struct _lv_table_t { - lv_obj_t obj; - uint32_t col_cnt; - uint32_t row_cnt; - lv_table_cell_t ** cell_data; - int32_t * row_h; - int32_t * col_w; - uint32_t col_act; - uint32_t row_act; -}; -struct _lv_checkbox_t { - lv_obj_t obj; - char * txt; - uint32_t static_txt : 1; -}; -struct _lv_roller_t { - lv_obj_t obj; - uint32_t option_cnt; - uint32_t sel_opt_id; - uint32_t sel_opt_id_ori; - uint32_t inf_page_cnt; - lv_roller_mode_t mode : 2; - uint32_t moved : 1; -}; -struct _lv_win_t { - lv_obj_t obj; +struct _lv_chart_series_t { + int32_t * x_points; + int32_t * y_points; + lv_color_t color; + uint32_t start_point; + uint32_t hidden : 1; + uint32_t x_ext_buf_assigned : 1; + uint32_t y_ext_buf_assigned : 1; + uint32_t x_axis_sec : 1; + uint32_t y_axis_sec : 1; }; -struct _lv_keyboard_t { - lv_buttonmatrix_t btnm; - lv_obj_t * ta; - lv_keyboard_mode_t mode; - uint8_t popovers : 1; +struct _lv_chart_cursor_t { + lv_point_t pos; + int32_t point_id; + lv_color_t color; + lv_chart_series_t * ser; + lv_dir_t dir; + uint32_t pos_set: 1; }; -struct _lv_line_t { +struct _lv_chart_t { lv_obj_t obj; - union { - const lv_point_precise_t * constant; - lv_point_precise_t * mut; - } point_array; - uint32_t point_num; - uint32_t y_inv : 1; - uint32_t point_array_is_mutable : 1; + lv_ll_t series_ll; + lv_ll_t cursor_ll; + int32_t ymin[2]; + int32_t ymax[2]; + int32_t xmin[2]; + int32_t xmax[2]; + int32_t pressed_point_id; + uint32_t hdiv_cnt; + uint32_t vdiv_cnt; + uint32_t point_cnt; + lv_chart_type_t type : 4; + lv_chart_update_mode_t update_mode : 2; }; -struct _lv_animimg_t { - lv_image_t img; - lv_anim_t anim; - const void ** dsc; - int8_t pic_count; +struct _lv_checkbox_t { + lv_obj_t obj; + char * txt; + uint32_t static_txt : 1; }; struct _lv_dropdown_t { lv_obj_t obj; @@ -6264,6 +6993,56 @@ lv_obj_t obj; lv_obj_t * dropdown; }; +struct _lv_imagebutton_src_info_t { + const void * img_src; + lv_image_header_t header; +}; +struct _lv_imagebutton_t { + lv_obj_t obj; + lv_imagebutton_src_info_t src_mid[LV_IMAGEBUTTON_STATE_NUM]; + lv_imagebutton_src_info_t src_left[LV_IMAGEBUTTON_STATE_NUM]; + lv_imagebutton_src_info_t src_right[LV_IMAGEBUTTON_STATE_NUM]; +}; +struct _lv_keyboard_t { + lv_buttonmatrix_t btnm; + lv_obj_t * ta; + lv_keyboard_mode_t mode; + uint8_t popovers : 1; +}; +struct _lv_label_t { + lv_obj_t obj; + char * text; + char dot[3 + 1]; + uint32_t dot_begin; + int32_t max_lines; + lv_draw_label_hint_t hint; + uint32_t sel_start; + uint32_t sel_end; + lv_point_t size_cache; + lv_point_t offset; + lv_label_long_mode_t long_mode : 4; + uint8_t static_txt : 1; + uint8_t recolor : 1; + uint8_t expand : 1; + uint8_t invalid_size_cache : 1; + uint8_t need_refr_text : 1; + lv_point_t text_size; +}; +struct _lv_led_t { + lv_obj_t obj; + lv_color_t color; + uint8_t bright; +}; +struct _lv_line_t { + lv_obj_t obj; + union { + const lv_point_precise_t * constant; + lv_point_precise_t * mut; + } point_array; + uint32_t point_num; + uint32_t y_inv : 1; + uint32_t point_array_is_mutable : 1; +}; struct _lv_menu_load_page_event_data_t { lv_obj_t * menu; lv_obj_t * page; @@ -6299,42 +7078,33 @@ char * title; bool static_title; }; -struct _lv_chart_series_t { - int32_t * x_points; - int32_t * y_points; - lv_color_t color; - uint32_t start_point; - uint32_t hidden : 1; - uint32_t x_ext_buf_assigned : 1; - uint32_t y_ext_buf_assigned : 1; - uint32_t x_axis_sec : 1; - uint32_t y_axis_sec : 1; -}; -struct _lv_chart_cursor_t { - lv_point_t pos; - int32_t point_id; - lv_color_t color; - lv_chart_series_t * ser; - lv_dir_t dir; - uint32_t pos_set: 1; -}; -struct _lv_chart_t { +struct _lv_msgbox_t { lv_obj_t obj; - lv_ll_t series_ll; - lv_ll_t cursor_ll; - int32_t ymin[2]; - int32_t ymax[2]; - int32_t xmin[2]; - int32_t xmax[2]; - int32_t pressed_point_id; - uint32_t hdiv_cnt; - uint32_t vdiv_cnt; - uint32_t point_cnt; - lv_chart_type_t type : 4; - lv_chart_update_mode_t update_mode : 2; + lv_obj_t * header; + lv_obj_t * content; + lv_obj_t * footer; + lv_obj_t * title; + uint32_t auto_parent : 1; }; -struct _lv_button_t { +struct _lv_qrcode_t { + lv_canvas_t canvas; + lv_color_t dark_color; + lv_color_t light_color; + uint8_t * data; + uint16_t data_len : 12; + uint16_t quiet_zone : 1; + uint16_t update_mode : 1; + uint16_t needs_update : 1; + uint16_t render_valid : 1; +}; +struct _lv_roller_t { lv_obj_t obj; + uint32_t option_cnt; + uint32_t sel_opt_id; + uint32_t sel_opt_id_ori; + uint32_t inf_page_cnt; + lv_roller_mode_t mode : 2; + uint32_t moved : 1; }; struct _lv_scale_section_t { const lv_style_t * main_style; @@ -6375,48 +7145,14 @@ int32_t first_tick_width; lv_array_t needles; }; -struct _lv_led_t { - lv_obj_t obj; - lv_color_t color; - uint8_t bright; -}; -struct _lv_arc_t { - lv_obj_t obj; - int32_t rotation; - lv_value_precise_t indic_angle_start; - lv_value_precise_t indic_angle_end; - lv_value_precise_t bg_angle_start; - lv_value_precise_t bg_angle_end; - int32_t value; - int32_t min_value; - int32_t max_value; - uint32_t dragging : 1; - uint32_t type : 2; - uint32_t min_close : 1; - uint32_t in_out : 1; - uint32_t chg_rate; - uint32_t last_tick; - lv_value_precise_t last_angle; - int16_t knob_offset; -}; -struct _lv_tileview_t { - lv_obj_t obj; - lv_obj_t * tile_act; -}; -struct _lv_tileview_tile_t { - lv_obj_t obj; - lv_dir_t dir; -}; -struct _lv_spinbox_t { - lv_textarea_t ta; - int32_t value; - int32_t range_max; - int32_t range_min; - int32_t step; - uint32_t digit_count : 4; - uint32_t dec_point_pos : 4; - uint32_t rollover : 1; - uint32_t digit_step_dir : 2; +struct _lv_slider_t { + lv_bar_t bar; + lv_area_t left_knob_area; + lv_area_t right_knob_area; + lv_point_t pressed_point; + int32_t * value_to_set; + uint8_t dragging : 1; + uint8_t left_knob_focus : 1; }; struct _lv_span_t { char * txt; @@ -6435,23 +7171,67 @@ uint32_t overflow : 1; uint32_t refresh : 1; }; -struct _lv_label_t { +struct _lv_textarea_t { lv_obj_t obj; - char * text; - char dot[3 + 1]; - uint32_t dot_begin; - lv_draw_label_hint_t hint; + lv_obj_t * label; + char * placeholder_txt; + lv_point_t placeholder_txt_size; + char * pwd_tmp; + char * pwd_bullet; + char * accepted_chars; + uint32_t max_length; + uint32_t pwd_show_time; + struct { + int32_t valid_x; + uint32_t pos; + lv_area_t area; + uint32_t txt_byte_pos; + uint8_t show : 1; + uint8_t click_pos : 1; + } cursor; uint32_t sel_start; uint32_t sel_end; - lv_point_t size_cache; - lv_point_t offset; - lv_label_long_mode_t long_mode : 4; - uint8_t static_txt : 1; - uint8_t recolor : 1; - uint8_t expand : 1; - uint8_t invalid_size_cache : 1; - uint8_t need_refr_text : 1; - lv_point_t text_size; + uint8_t text_sel_in_prog : 1; + uint8_t text_sel_en : 1; + uint8_t pwd_mode : 1; + uint8_t one_line : 1; + uint8_t static_accepted_chars : 1; +}; +struct _lv_spinbox_t { + lv_textarea_t ta; + int32_t value; + int32_t range_max; + int32_t range_min; + int32_t step; + uint32_t digit_count : 4; + uint32_t dec_point_pos : 4; + uint32_t rollover : 1; + uint32_t digit_step_dir : 2; +}; +struct _lv_spinner_t { + lv_arc_t arc; + uint32_t duration; + uint32_t angle; +}; +struct _lv_switch_t { + lv_obj_t obj; + int32_t anim_state; + lv_switch_orientation_t orientation : 3; +}; +struct _lv_table_cell_t { + lv_table_cell_ctrl_t ctrl; + void * user_data; + char txt[1]; +}; +struct _lv_table_t { + lv_obj_t obj; + uint32_t col_cnt; + uint32_t row_cnt; + lv_table_cell_t ** cell_data; + int32_t * row_h; + int32_t * col_w; + uint32_t col_act; + uint32_t row_act; }; struct _lv_tabview_t { lv_obj_t obj; @@ -6459,19 +7239,14 @@ lv_dir_t tab_pos; int32_t tab_bar_size; }; -static inline int lv_version_major(void) -{ - return 9; -} -static inline int lv_version_minor(void) -{ - return 5; -} -static inline int lv_version_patch(void) -{ - return 0; -} -static inline const char * lv_version_info(void) -{ - return ""; -} +struct _lv_tileview_t { + lv_obj_t obj; + lv_obj_t * tile_act; +}; +struct _lv_tileview_tile_t { + lv_obj_t obj; + lv_dir_t dir; +}; +struct _lv_win_t { + lv_obj_t obj; +}; diff --git a/generated/lvgl.pyi b/generated/lvgl.pyi index 8a4a36c..e138f54 100644 --- a/generated/lvgl.pyi +++ b/generated/lvgl.pyi @@ -1,4 +1,4 @@ -# LVGL 9.5 +# LVGL 9.6 # Naming: upstream-compatible """Type stubs for LVGL Python bindings (auto-generated).""" from __future__ import annotations @@ -140,8 +140,6 @@ class COLOR_FORMAT: NEMA_TSC12: int NEMA_TSC12A: int NEMA_TSC_END: int - NATIVE: int - NATIVE_WITH_ALPHA: int class COORD: MAX: int @@ -198,6 +196,7 @@ class DRAW_TASK_STATE: QUEUED: int IN_PROGRESS: int FINISHED: int + FAILED: int class DRAW_TASK_TYPE: NONE: int @@ -233,6 +232,10 @@ class EVENT: SCROLL_END: int SCROLL: int GESTURE: int + GESTURE_UP: int + GESTURE_DOWN: int + GESTURE_LEFT: int + GESTURE_RIGHT: int KEY: int ROTARY: int FOCUSED: int @@ -257,6 +260,8 @@ class EVENT: READY: int CANCEL: int STATE_CHANGED: int + CHECKED: int + UNCHECKED: int CREATE: int DELETE: int CHILD_CHANGED: int @@ -282,10 +287,15 @@ class EVENT: FLUSH_FINISH: int FLUSH_WAIT_START: int FLUSH_WAIT_FINISH: int + SYNC_START: int + SYNC_FINISH: int + SYNC_WAIT_START: int + SYNC_WAIT_FINISH: int UPDATE_LAYOUT_COMPLETED: int VSYNC: int VSYNC_REQUEST: int LAST: int + LAST_CUSTOM: int PREPROCESS: int MARKED_DELETING: int @@ -456,6 +466,14 @@ class LOG_LEVEL: USER: int NONE: int +class LRU: + OK: int + MISSING_CACHE: int + MISSING_KEY: int + MISSING_VALUE: int + LOCK_ERROR: int + VALUE_TOO_LARGE: int + class OBJ_FLAG: HIDDEN: int CLICKABLE: int @@ -736,6 +754,7 @@ class STYLE: GRID_CELL_ROW_POS: int GRID_CELL_ROW_SPAN: int GRID_CELL_Y_ALIGN: int + TEXT_LEADING_TRIM: int LAST_BUILT_IN_PROP: int NUM_BUILT_IN_PROPS: int PROP_ANY: int @@ -848,6 +867,13 @@ class TEXT_FLAG: BREAK_ALL: int RECOLOR: int +class TEXT_LEADING_TRIM: + NONE: int + CAPITAL_BASELINE: int + LOWER_BASELINE: int + CAPITAL: int + LOWER: int + class THREAD_PRIO: LOWEST: int LOW: int @@ -953,6 +979,7 @@ class anim_timeline_t(_Struct): def get_user_data(self) -> Any: ... def merge(self, src: anim_timeline_t, delay: int) -> None: ... def pause(self) -> None: ... + def restart(self) -> int: ... def set_delay(self, delay: int) -> None: ... def set_progress(self, progress: int) -> None: ... def set_repeat_count(self, cnt: int) -> None: ... @@ -1001,7 +1028,7 @@ class array_t(_Struct): def deinit(self) -> None: ... def erase(self, start: int, end: int) -> RESULT | int: ... def front(self) -> Any: ... - def init(self, capacity: int, element_size: int) -> None: ... + def init(self, capacity: int, element_size: int) -> RESULT | int: ... def init_from_buf(self, buf: Any, capacity: int, element_size: int) -> None: ... def is_empty(self) -> int: ... def is_full(self) -> int: ... @@ -1011,6 +1038,13 @@ class array_t(_Struct): def resize(self, new_capacity: int) -> int: ... def shrink(self) -> None: ... +class binfont_dsc_t(_Struct): + path: str + buffer: Any + buffer_size: int + dynamic_glyph_load: int + def create_ex(self) -> font_t: ... + class cache_class_t(_Struct): alloc_cb: Callable[[], Any] init_cb: Callable[[cache_t], int] @@ -1141,11 +1175,15 @@ class color32_t(_Struct): red: int alpha: int def color_mix32(self, bg: color32_t) -> color32_t: ... + def color_mix32_inlined(self, bg: color32_t) -> color32_t: ... def color_mix32_premultiplied(self, bg: color32_t) -> color32_t: ... + def color_mix32_premultiplied_inlined(self, bg: color32_t) -> color32_t: ... def color_over32(self, bg: color32_t) -> color32_t: ... def color_premultiply(self) -> None: ... def eq(self, c2: color32_t) -> int: ... + def lumi_of(self, premultiplied: int) -> int: ... def luminance(self) -> int: ... + def unpremultiply(self) -> color32_t: ... class color_filter_dsc_t(_Struct): filter_cb: Callable[[color_filter_dsc_t, color_t, int], color_t] @@ -1174,6 +1212,9 @@ class color_t(_Struct): def to_u16(self) -> int: ... def to_u32(self) -> int: ... +class delete_dsc_t(_Struct): + ... + class display_t(_Struct): hor_res: int ver_res: int @@ -1192,6 +1233,11 @@ class display_t(_Struct): flushing_last: int last_area: int last_part: int + sync_cb: Callable[[display_t, area_t], None] + sync_wait_cb: Callable[[display_t], None] + syncing: int + syncing_last: int + sync_areas: ll_t render_mode: DISPLAY_RENDER_MODE | int antialiasing: int tile_cnt: int @@ -1202,12 +1248,9 @@ class display_t(_Struct): inv_area_joined: Sequence[int] inv_p: int inv_en_cnt: int - sync_areas: ll_t _static_buf1: draw_buf_t _static_buf2: draw_buf_t layer_head: layer_t - layer_init: Callable[[display_t, layer_t], None] - layer_deinit: Callable[[display_t, layer_t], None] screens: Any sys_layer: obj top_layer: obj @@ -1228,9 +1271,8 @@ class display_t(_Struct): last_activity_time: int refreshed_area: area_t vsync_count: int - def add_event_cb(self, event_cb: Callable[[event_t], None], filter: EVENT | int, user_data: Any) -> None: ... + def add_event_cb(self, event_cb: Callable[[event_t], None], filter: EVENT | int, user_data: Any) -> event_dsc_t: ... def delete(self) -> None: ... - def delete_event(self, index: int) -> int: ... def delete_refr_timer(self) -> None: ... def dpx(self, n: int) -> int: ... def draw_dispatch_layer(self, layer: layer_t) -> int: ... @@ -1245,6 +1287,7 @@ class display_t(_Struct): def get_driver_data(self) -> Any: ... def get_event_count(self) -> int: ... def get_event_dsc(self, index: int) -> event_dsc_t: ... + def get_flush_cb(self) -> Callable[[display_t, area_t, Any], None]: ... def get_horizontal_resolution(self) -> int: ... def get_inactive_time(self) -> int: ... def get_invalidated_draw_buf_size(self, width: int, height: int) -> int: ... @@ -1272,9 +1315,11 @@ class display_t(_Struct): def is_double_buffered(self) -> int: ... def is_invalidation_enabled(self) -> int: ... def register_vsync_event(self, event_cb: Callable[[event_t], None], user_data: Any) -> int: ... + def remove_event(self, index: int) -> int: ... def remove_event_cb_with_user_data(self, event_cb: Callable[[event_t], None], user_data: Any) -> int: ... def rotate_area(self, area: area_t) -> None: ... def rotate_point(self, point: point_t) -> None: ... + def rotate_point_ccw(self, point: point_t) -> None: ... def send_event(self, code: EVENT | int, param: Any) -> RESULT | int: ... def send_vsync_event(self, param: Any) -> RESULT | int: ... def set_3rd_draw_buffer(self, buf3: draw_buf_t) -> None: ... @@ -1284,6 +1329,7 @@ class display_t(_Struct): def set_color_format(self, color_format: COLOR_FORMAT | int) -> None: ... def set_default(self) -> None: ... def set_dpi(self, dpi: int) -> None: ... + def set_draw_buf_handlers(self, handlers: draw_buf_handlers_t) -> None: ... def set_draw_buffers(self, buf1: draw_buf_t, buf2: draw_buf_t) -> None: ... def set_driver_data(self, driver_data: Any) -> None: ... def set_flush_cb(self, flush_cb: Callable[[display_t, area_t, Any], None]) -> None: ... @@ -1294,9 +1340,13 @@ class display_t(_Struct): def set_render_mode(self, render_mode: DISPLAY_RENDER_MODE | int) -> None: ... def set_resolution(self, hor_res: int, ver_res: int) -> None: ... def set_rotation(self, rotation: DISPLAY_ROTATION | int) -> None: ... + def set_sync_cb(self, sync_cb: Callable[[display_t, area_t], None]) -> None: ... + def set_sync_wait_cb(self, wait_cb: Callable[[display_t], None]) -> None: ... def set_theme(self, th: theme_t) -> None: ... def set_tile_cnt(self, tile_cnt: int) -> None: ... def set_user_data(self, user_data: Any) -> None: ... + def sync_is_last(self) -> int: ... + def sync_ready(self) -> None: ... def trigger_activity(self) -> None: ... def unregister_vsync_event(self, event_cb: Callable[[event_t], None], user_data: Any) -> int: ... @@ -1349,6 +1399,7 @@ class draw_buf_handlers_t(_Struct): invalidate_cache_cb: Callable[[draw_buf_t, area_t], None] flush_cache_cb: Callable[[draw_buf_t, area_t], None] width_to_stride_cb: Callable[[int, COLOR_FORMAT | int], int] + buf_clear_cb: Callable[[draw_buf_t, area_t, layer_t], None] def align_ex(self, buf: Any, color_format: COLOR_FORMAT | int) -> Any: ... def create_ex(self, w: int, h: int, cf: COLOR_FORMAT | int, stride: int) -> draw_buf_t: ... def dup_ex(self, draw_buf: draw_buf_t) -> draw_buf_t: ... @@ -1364,7 +1415,9 @@ class draw_buf_t(_Struct): handlers: draw_buf_handlers_t def adjust_stride(self, stride: int) -> RESULT | int: ... def clear(self, a: area_t) -> None: ... + def clear_ex(self, a: area_t, layer: layer_t) -> None: ... def clear_flag(self, flag: image.FLAGS | int) -> None: ... + def convert_premultiply(self) -> RESULT | int: ... def copy(self, dest_area: area_t, src: draw_buf_t, src_area: area_t) -> None: ... def destroy(self) -> None: ... def dup(self) -> draw_buf_t: ... @@ -1374,6 +1427,7 @@ class draw_buf_t(_Struct): def has_flag(self, flag: image.FLAGS | int) -> int: ... def init(self, w: int, h: int, cf: COLOR_FORMAT | int, stride: int, data: Any, data_size: int) -> RESULT | int: ... def invalidate_cache(self, area: area_t) -> None: ... + def is_position_valid(self, x: int, y: int) -> int: ... def premultiply(self) -> RESULT | int: ... def reshape(self, cf: COLOR_FORMAT | int, w: int, h: int, stride: int) -> draw_buf_t: ... def save_to_file(self, path: str) -> RESULT | int: ... @@ -1570,11 +1624,61 @@ class draw_sw_blend_dsc_t(_Struct): mask_stride: int blend_mode: BLEND_MODE | int +class draw_sw_blend_fill_dsc_t(_Struct): + dest_buf: Any + dest_w: int + dest_h: int + dest_stride: int + mask_buf: Any + mask_stride: int + color: color_t + opa: int + relative_area: area_t + def color_to_a8(self) -> None: ... + def color_to_al88(self) -> None: ... + def color_to_argb8888(self) -> None: ... + def color_to_argb8888_premultiplied(self) -> None: ... + def color_to_i1(self) -> None: ... + def color_to_l8(self) -> None: ... + def color_to_rgb565(self) -> None: ... + def color_to_rgb565_swapped(self) -> None: ... + def color_to_rgb888(self, dest_px_size: int) -> None: ... + +class draw_sw_blend_image_dsc_t(_Struct): + dest_buf: Any + dest_w: int + dest_h: int + dest_stride: int + mask_buf: Any + mask_stride: int + src_buf: Any + src_stride: int + src_color_format: COLOR_FORMAT | int + opa: int + blend_mode: BLEND_MODE | int + relative_area: area_t + src_area: area_t + def to_a8(self) -> None: ... + def to_al88(self) -> None: ... + def to_argb8888(self) -> None: ... + def to_argb8888_premultiplied(self) -> None: ... + def to_i1(self) -> None: ... + def to_l8(self) -> None: ... + def to_rgb565(self) -> None: ... + def to_rgb565_swapped(self) -> None: ... + def to_rgb888(self, dest_px_size: int) -> None: ... + class draw_sw_custom_blend_handler_t(_Struct): dest_cf: COLOR_FORMAT | int handler: Callable[[draw_task_t, draw_sw_blend_dsc_t], None] def register_blend_handler(self) -> int: ... +class draw_sw_grad_calc_t(_Struct): + color_map: color_t + opa_map: Any + size: int + def cleanup(self) -> None: ... + class draw_sw_mask_angle_param_t(_Struct): dsc: draw_sw_mask_common_dsc_t cfg: Any @@ -1623,14 +1727,13 @@ class draw_sw_mask_radius_param_t(_Struct): dsc: draw_sw_mask_common_dsc_t cfg: Any circle: draw_sw_mask_radius_circle_dsc_t - def init(self, rect: area_t, radius: int, inv: int) -> None: ... + def init(self, rect: area_t, radius: int, inv: int) -> RESULT | int: ... class draw_task_t(_Struct): next: draw_task_t _type: DRAW_TASK_TYPE | int area: area_t _real_area: area_t - clip_area_original: area_t clip_area: area_t target_layer: layer_t draw_unit: draw_unit_t @@ -1639,6 +1742,7 @@ class draw_task_t(_Struct): opa: int preferred_draw_unit_id: int preference_score: int + def cleanup_task(self) -> None: ... def get_arc_dsc(self) -> draw_arc_dsc_t: ... def get_area(self, area: area_t) -> None: ... def get_blur_dsc(self) -> draw_blur_dsc_t: ... @@ -1671,6 +1775,7 @@ class draw_task_t(_Struct): def sw_mask_rect(self, dsc: draw_mask_rect_dsc_t) -> None: ... def sw_triangle(self, dsc: draw_triangle_dsc_t) -> None: ... def unit_draw_letter(self, dsc: draw_glyph_dsc_t, pos: point_t, font: font_t, letter: int, cb: Callable[[draw_task_t, draw_glyph_dsc_t, draw_fill_dsc_t, area_t], None]) -> None: ... + def unit_draw_letter_internal(self, dsc: draw_glyph_dsc_t, pos: point_t, font: font_t, letter: int, cb: Callable[[draw_task_t, draw_glyph_dsc_t, draw_fill_dsc_t, area_t], None]) -> None: ... class draw_triangle_dsc_t(_Struct): base: draw_dsc_base_t @@ -1760,22 +1865,26 @@ class font_class_t(_Struct): class font_glyph_dsc_t(_Struct): resolved_font: font_t + entry: Any + gid: Any + format: FONT_GLYPH_FORMAT | int + outline_stroke_width: int adv_w: int box_w: int box_h: int ofs_x: int ofs_y: int stride: int - format: FONT_GLYPH_FORMAT | int is_placeholder: int req_raw_bitmap: int - outline_stroke_width: int - gid: Any - entry: cache_entry_t + def compare(self, rhs: font_glyph_dsc_t) -> int: ... def get_bitmap_fmt_txt(self, draw_buf: draw_buf_t) -> Any: ... def get_glyph_bitmap(self, draw_buf: draw_buf_t) -> Any: ... + def get_glyph_bitmap_internal(self, draw_buf: draw_buf_t) -> Any: ... def get_glyph_static_bitmap(self) -> Any: ... + def get_glyph_static_bitmap_internal(self) -> Any: ... def release_draw_data(self) -> None: ... + def release_draw_data_internal(self) -> None: ... class font_info_t(_Struct): name: str @@ -1783,27 +1892,38 @@ class font_info_t(_Struct): size: int render_mode: int style: int + weight: int kerning: FONT_KERNING | int def is_equal(self, ft_info_2: font_info_t) -> int: ... class font_t(_Struct): + dsc: Any + fallback: font_t + user_data: Any get_glyph_dsc: Callable[[font_t, font_glyph_dsc_t, int, int], int] get_glyph_bitmap: Callable[[font_glyph_dsc_t, draw_buf_t], Any] release_glyph: Callable[[font_t, font_glyph_dsc_t], None] line_height: int base_line: int + cap_height: int + x_height: int subpx: int kerning: int static_bitmap: int underline_position: int underline_thickness: int - dsc: Any - fallback: font_t - user_data: Any + def get_bottom_trim(self, trim: TEXT_LEADING_TRIM | int) -> int: ... + def get_bottom_trim_internal(self, trim: TEXT_LEADING_TRIM | int) -> int: ... def get_glyph_dsc_fmt_txt(self, dsc_out: font_glyph_dsc_t, unicode_letter: int, unicode_letter_next: int) -> int: ... + def get_glyph_dsc_internal(self, dsc_out: font_glyph_dsc_t, letter: int, letter_next: int) -> int: ... def get_glyph_width(self, letter: int, letter_next: int) -> int: ... + def get_glyph_width_internal(self, letter: int, letter_next: int) -> int: ... def get_line_height(self) -> int: ... + def get_line_height_internal(self) -> int: ... + def get_top_trim(self, trim: TEXT_LEADING_TRIM | int) -> int: ... + def get_top_trim_internal(self, trim: TEXT_LEADING_TRIM | int) -> int: ... def has_static_bitmap(self) -> int: ... + def has_static_bitmap_internal(self) -> int: ... def set_kerning(self, kerning: FONT_KERNING | int) -> None: ... class fs_dir_t(_Struct): @@ -1984,7 +2104,15 @@ class indev_data_t(_Struct): def set_gesture_data(self, recognizer: indev_gesture_recognizer_t, _type: INDEV_GESTURE | int) -> None: ... class indev_gesture_configuration_t(_Struct): - ... + pinch_up_threshold: float + pinch_down_threshold: float + rotation_angle_rad_threshold: float + +class indev_gesture_motion_t(_Struct): + finger: int + start_point: point_t + point: point_t + state: INDEV_STATE | int class indev_gesture_recognizer_t(_Struct): _type: INDEV_GESTURE | int @@ -2005,7 +2133,19 @@ class indev_gesture_recognizer_t(_Struct): def recognizer_is_active(self) -> int: ... class indev_gesture_t(_Struct): - ... + motions: Sequence[indev_gesture_motion_t] + center: point_t + scale: float + p_scale: float + scale_factors_x: Sequence[float] + scale_factors_y: Sequence[float] + delta_x: float + delta_y: float + p_delta_x: float + p_delta_y: float + rotation: float + p_rotation: float + finger_cnt: int class indev_t(_Struct): _type: INDEV_TYPE | int @@ -2030,6 +2170,7 @@ class indev_t(_Struct): gesture_min_velocity: int gesture_min_distance: int long_press_time: int + double_click_time: int long_press_repeat_time: int rotary_sensitivity: int pointer: Any @@ -2044,13 +2185,15 @@ class indev_t(_Struct): cur_gesture: INDEV_GESTURE | int gesture_data: Sequence[Any] gesture_type: Sequence[INDEV_GESTURE | int] - def add_event_cb(self, event_cb: Callable[[event_t], None], filter: EVENT | int, user_data: Any) -> None: ... + def add_event_cb(self, event_cb: Callable[[event_t], None], filter: EVENT | int, user_data: Any) -> event_dsc_t: ... + def clear_ccw(self) -> None: ... def delete(self) -> None: ... def enable(self, enable: int) -> None: ... def find_scroll_obj(self) -> obj: ... def gesture_init(self) -> None: ... def gesture_recognizers_set_data(self, data: indev_data_t) -> None: ... def gesture_recognizers_update(self, touches: indev_touch_data_t, touch_cnt: int) -> None: ... + def get_ccw(self) -> int: ... def get_cursor(self) -> obj: ... def get_display(self) -> display_t: ... def get_driver_data(self) -> Any: ... @@ -2082,8 +2225,10 @@ class indev_t(_Struct): def scroll_throw_predict(self, dir: DIR | int) -> int: ... def send_event(self, code: EVENT | int, param: Any) -> RESULT | int: ... def set_button_points(self, points: point_t) -> None: ... + def set_ccw(self) -> None: ... def set_cursor(self, cur_obj: obj) -> None: ... def set_display(self, disp: display_t) -> None: ... + def set_double_click_time(self, double_click_time: int) -> None: ... def set_driver_data(self, driver_data: Any) -> None: ... def set_gesture_min_distance(self, min_distance: int) -> None: ... def set_gesture_min_velocity(self, min_velocity: int) -> None: ... @@ -2122,6 +2267,7 @@ class iter_t(_Struct): class layer_t(_Struct): draw_buf: draw_buf_t draw_task_head: draw_task_t + display: display_t parent: layer_t next: layer_t user_data: Any @@ -2133,6 +2279,7 @@ class layer_t(_Struct): color_format: COLOR_FORMAT | int all_tasks_added: int opa: int + buffer_owned: int def init(self) -> None: ... def reset(self) -> None: ... @@ -2161,6 +2308,26 @@ class ll_t(_Struct): def move_before(self, n_act: Any, n_after: Any) -> None: ... def remove(self, node_p: Any) -> None: ... +class lru_item_t(_Struct): + ... + +class lru_t(_Struct): + items: Any + access_count: int + free_memory: int + total_memory: int + average_item_length: int + hash_table_size: int + seed: int + value_free: Callable[[Any], None] + key_free: Callable[[Any], None] + free_items: lru_item_t + def delete(self) -> None: ... + def get(self, key: Any, key_size: int, value: Any) -> LRU | int: ... + def remove(self, key: Any, key_size: int) -> LRU | int: ... + def remove_lru_item(self) -> None: ... + def set(self, key: Any, key_length: int, value: Any, value_length: int) -> LRU | int: ... + class matrix_t(_Struct): ... @@ -2191,25 +2358,34 @@ class obj_class_t(_Struct): theme_inheritable: int class obj_style_transition_dsc_t(_Struct): + path_cb: Callable[[anim_t], int] + user_data: Any + selector: int time: int delay: int - selector: int prop: int - path_cb: Callable[[anim_t], int] - user_data: Any class observer_t(_Struct): subject: subject_t cb: Callable[[observer_t, subject_t], None] target: Any user_data: Any + user_cb: Callable[[], None] auto_free_user_data: int notified: int for_obj: int + def delete(self) -> None: ... def get_target(self) -> Any: ... def get_target_obj(self) -> obj: ... def get_user_data(self) -> Any: ... - def remove(self) -> None: ... + def set_user_data(self, user_data: Any) -> None: ... + +class pending_t(_Struct): + def add(self, obj: Any) -> None: ... + def destroy(self) -> None: ... + def remove_all(self) -> None: ... + def set_free_cb(self, free_cb: Callable[[Any, Any], None], user_data: Any) -> None: ... + def swap(self) -> None: ... class point_precise_t(_Struct): x: float @@ -2292,9 +2468,10 @@ class style_t(_Struct): prop_cnt: int def copy(self, src: style_t) -> None: ... def get_prop(self, prop: int, value: style_value_t) -> STYLE_RES | int: ... - def get_prop_inlined(self, prop: int, value: style_value_t) -> STYLE_RES | int: ... + def get_prop_internal(self, prop: int, value: style_value_t) -> STYLE_RES | int: ... def init(self) -> None: ... def is_const(self) -> int: ... + def is_const_internal(self) -> int: ... def is_empty(self) -> int: ... def merge(self, src: style_t) -> None: ... def remove_prop(self, prop: int) -> int: ... @@ -2414,6 +2591,7 @@ class style_t(_Struct): def set_text_color(self, value: color_t) -> None: ... def set_text_decor(self, value: TEXT_DECOR | int) -> None: ... def set_text_font(self, value: font_t) -> None: ... + def set_text_leading_trim(self, value: TEXT_LEADING_TRIM | int) -> None: ... def set_text_letter_space(self, value: int) -> None: ... def set_text_line_space(self, value: int) -> None: ... def set_text_opa(self, value: int) -> None: ... @@ -2471,8 +2649,8 @@ class subject_t(_Struct): def add_observer(self, observer_cb: Callable[[observer_t, subject_t], None], user_data: Any) -> observer_t: ... def add_observer_obj(self, observer_cb: Callable[[observer_t, subject_t], None], obj: obj, user_data: Any) -> observer_t: ... def add_observer_with_target(self, observer_cb: Callable[[observer_t, subject_t], None], target: Any, user_data: Any) -> observer_t: ... - def copy_string(self, buf: str) -> None: ... def deinit(self) -> None: ... + def delete(self) -> None: ... def get_color(self) -> color_t: ... def get_float(self) -> float: ... def get_group_element(self, index: int) -> subject_t: ... @@ -2493,12 +2671,15 @@ class subject_t(_Struct): def notify(self) -> None: ... def set_color(self, color: color_t) -> None: ... def set_float(self, value: float) -> None: ... + def set_group_list_static(self, list: Sequence[subject_t], list_len: int) -> None: ... def set_int(self, value: int) -> None: ... def set_max_value_float(self, max_value: float) -> None: ... def set_max_value_int(self, max_value: int) -> None: ... def set_min_value_float(self, min_value: float) -> None: ... def set_min_value_int(self, min_value: int) -> None: ... def set_pointer(self, ptr: Any) -> None: ... + def set_string(self, buf: str) -> None: ... + def set_string_buffer_static(self, buf: str, prev_buf: str, size: int) -> None: ... class subject_value_t(_Struct): num: int @@ -2526,8 +2707,10 @@ class theme_t(_Struct): flags: int def copy(self, src: theme_t) -> None: ... def delete(self) -> None: ... + def get_user_data(self) -> Any: ... def set_apply_cb(self, apply_cb: Callable[[theme_t, obj], None]) -> None: ... def set_parent(self, parent: theme_t) -> None: ... + def set_user_data(self, user_data: Any) -> None: ... class timer_t(_Struct): period: int @@ -2690,17 +2873,24 @@ class barcode(obj): class ENCODING_CODE128: GS1: int RAW: int + class UPDATE_MODE: + IMMEDIATE: int + DEFERRED: int def __init__(self, parent: obj | None = ...) -> None: ... def get_dark_color(self) -> color_t: ... def get_encoding(self) -> barcode.ENCODING_CODE128 | int: ... def get_light_color(self) -> color_t: ... def get_scale(self) -> int: ... + def get_update_mode(self) -> barcode.UPDATE_MODE | int: ... + def is_render_valid(self) -> int: ... + def render(self) -> RESULT | int: ... def set_dark_color(self, color: color_t) -> None: ... def set_direction(self, direction: DIR | int) -> None: ... def set_encoding(self, encoding: barcode.ENCODING_CODE128 | int) -> None: ... def set_light_color(self, color: color_t) -> None: ... def set_scale(self, scale: int) -> None: ... def set_tiled(self, tiled: int) -> None: ... + def set_update_mode(self, mode: barcode.UPDATE_MODE | int) -> None: ... def update(self, data: str) -> RESULT | int: ... class button(obj): @@ -2917,6 +3107,7 @@ class image(obj): STRETCH: int TILE: int CONTAIN: int + CONTAIN_DOWNSCALE: int COVER: int class COMPRESS: NONE: int @@ -2986,7 +3177,7 @@ class image(obj): @staticmethod def decoder_set_close_cb(decoder: image_decoder_t, close_cb: Callable[[image_decoder_t, image_decoder_dsc_t], None]) -> None: ... @staticmethod - def decoder_set_get_area_cb(decoder: image_decoder_t, read_line_cb: Callable[[image_decoder_t, image_decoder_dsc_t, area_t, area_t], RESULT | int]) -> None: ... + def decoder_set_get_area_cb(decoder: image_decoder_t, get_area_cb: Callable[[image_decoder_t, image_decoder_dsc_t, area_t, area_t], RESULT | int]) -> None: ... @staticmethod def decoder_set_info_cb(decoder: image_decoder_t, info_cb: Callable[[image_decoder_t, image_decoder_dsc_t, image_header_t], RESULT | int]) -> None: ... @staticmethod @@ -3091,6 +3282,7 @@ class label(obj): def get_letter_on(self, pos_in: point_t, bidi: int) -> int: ... def get_letter_pos(self, char_id: int, pos: point_t) -> None: ... def get_long_mode(self) -> label.LONG_MODE | int: ... + def get_max_lines(self) -> int: ... def get_recolor(self) -> int: ... def get_text(self) -> str: ... def get_text_selection_end(self) -> int: ... @@ -3098,6 +3290,7 @@ class label(obj): def ins_text(self, pos: int, txt: str) -> None: ... def is_char_under_pos(self, pos: point_t) -> int: ... def set_long_mode(self, long_mode: label.LONG_MODE | int) -> None: ... + def set_max_lines(self, lines: int) -> None: ... def set_recolor(self, en: int) -> None: ... def set_text(self, text: str) -> None: ... def set_text_selection_end(self, index: int) -> None: ... @@ -3241,6 +3434,8 @@ class obj(_Struct): SKIP_CHILDREN: int END: int def __init__(self, parent: obj | None = ...) -> None: ... + def add_child(self, child: obj) -> RESULT | int: ... + def add_delete_cb(self, cb: Callable[[Any], None], user_data: Any) -> delete_dsc_t: ... def add_event_cb(self, event_cb: Callable[[event_t], None], filter: EVENT | int, user_data: Any) -> event_dsc_t: ... def add_flag(self, f: OBJ_FLAG | int) -> None: ... def add_play_timeline_event(self, trigger: EVENT | int, at: anim_timeline_t, delay: int, reverse: int) -> None: ... @@ -3255,27 +3450,34 @@ class obj(_Struct): def add_subject_toggle_event(self, subject: subject_t, trigger: EVENT | int) -> None: ... def align(self, align: ALIGN | int, x_ofs: int, y_ofs: int) -> None: ... def align_to(self, base: obj, align: ALIGN | int, x_ofs: int, y_ofs: int) -> None: ... - def allocate_spec_attr(self) -> None: ... + def allocate_spec_attr(self) -> Any: ... def area_is_visible(self, area: area_t) -> int: ... + def bind_bool(self, subject: subject_t, set_bool_cb: Callable[[obj, int], None]) -> observer_t: ... def bind_checked(self, subject: subject_t) -> observer_t: ... + def bind_color(self, subject: subject_t, set_color_cb: Callable[[obj, color_t], None]) -> observer_t: ... def bind_flag_if_eq(self, subject: subject_t, flag: OBJ_FLAG | int, ref_value: int) -> observer_t: ... def bind_flag_if_ge(self, subject: subject_t, flag: OBJ_FLAG | int, ref_value: int) -> observer_t: ... def bind_flag_if_gt(self, subject: subject_t, flag: OBJ_FLAG | int, ref_value: int) -> observer_t: ... def bind_flag_if_le(self, subject: subject_t, flag: OBJ_FLAG | int, ref_value: int) -> observer_t: ... def bind_flag_if_lt(self, subject: subject_t, flag: OBJ_FLAG | int, ref_value: int) -> observer_t: ... def bind_flag_if_not_eq(self, subject: subject_t, flag: OBJ_FLAG | int, ref_value: int) -> observer_t: ... + def bind_float(self, subject: subject_t, set_float_cb: Callable[[obj, float], None]) -> observer_t: ... + def bind_int(self, subject: subject_t, set_int_cb: Callable[[obj, int], None]) -> observer_t: ... + def bind_pointer(self, subject: subject_t, set_pointer_cb: Callable[[obj, Any], None]) -> observer_t: ... def bind_state_if_eq(self, subject: subject_t, state: STATE | int, ref_value: int) -> observer_t: ... def bind_state_if_ge(self, subject: subject_t, state: STATE | int, ref_value: int) -> observer_t: ... def bind_state_if_gt(self, subject: subject_t, state: STATE | int, ref_value: int) -> observer_t: ... def bind_state_if_le(self, subject: subject_t, state: STATE | int, ref_value: int) -> observer_t: ... def bind_state_if_lt(self, subject: subject_t, state: STATE | int, ref_value: int) -> observer_t: ... def bind_state_if_not_eq(self, subject: subject_t, state: STATE | int, ref_value: int) -> observer_t: ... + def bind_string(self, subject: subject_t, set_string_cb: Callable[[obj, str], None]) -> observer_t: ... def bind_style(self, style: style_t, selector: int, subject: subject_t, ref_value: int) -> observer_t: ... def bind_style_prop(self, prop: int, selector: int, subject: subject_t) -> observer_t: ... def calc_dynamic_height(self, prop: int) -> int: ... def calc_dynamic_width(self, prop: int) -> int: ... def calculate_ext_draw_size(self, part: PART | int) -> int: ... def calculate_style_text_align(self, part: PART | int, txt: str) -> TEXT_ALIGN | int: ... + def calculate_style_text_align_internal(self, part: PART | int, txt: str) -> TEXT_ALIGN | int: ... def center(self) -> None: ... def check_type(self, class_p: obj_class_t) -> int: ... @staticmethod @@ -3327,7 +3529,7 @@ class obj(_Struct): def get_scroll_top(self) -> int: ... def get_scroll_x(self) -> int: ... def get_scroll_y(self) -> int: ... - def get_scrollbar_area(self, hor: area_t, ver: area_t) -> None: ... + def get_scrollbar_area(self, hor_area: area_t, ver_area: area_t) -> None: ... def get_scrollbar_mode(self) -> SCROLLBAR_MODE | int: ... def get_self_height(self) -> int: ... def get_self_width(self) -> int: ... @@ -3335,159 +3537,310 @@ class obj(_Struct): def get_sibling_by_type(self, idx: int, class_p: obj_class_t) -> obj: ... def get_state(self) -> STATE | int: ... def get_style_align(self, part: PART | int) -> ALIGN | int: ... + def get_style_align_internal(self, part: PART | int) -> ALIGN | int: ... def get_style_anim(self, part: PART | int) -> anim_t: ... def get_style_anim_duration(self, part: PART | int) -> int: ... + def get_style_anim_duration_internal(self, part: PART | int) -> int: ... + def get_style_anim_internal(self, part: PART | int) -> anim_t: ... def get_style_arc_color(self, part: PART | int) -> color_t: ... def get_style_arc_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_arc_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_arc_color_internal(self, part: PART | int) -> color_t: ... def get_style_arc_image_src(self, part: PART | int) -> Any: ... + def get_style_arc_image_src_internal(self, part: PART | int) -> Any: ... def get_style_arc_opa(self, part: PART | int) -> int: ... + def get_style_arc_opa_internal(self, part: PART | int) -> int: ... def get_style_arc_rounded(self, part: PART | int) -> int: ... + def get_style_arc_rounded_internal(self, part: PART | int) -> int: ... def get_style_arc_width(self, part: PART | int) -> int: ... + def get_style_arc_width_internal(self, part: PART | int) -> int: ... def get_style_base_dir(self, part: PART | int) -> BASE_DIR | int: ... + def get_style_base_dir_internal(self, part: PART | int) -> BASE_DIR | int: ... def get_style_bg_color(self, part: PART | int) -> color_t: ... def get_style_bg_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_bg_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_bg_color_internal(self, part: PART | int) -> color_t: ... def get_style_bg_grad(self, part: PART | int) -> grad_dsc_t: ... def get_style_bg_grad_color(self, part: PART | int) -> color_t: ... def get_style_bg_grad_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_bg_grad_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_bg_grad_color_internal(self, part: PART | int) -> color_t: ... def get_style_bg_grad_dir(self, part: PART | int) -> GRAD_DIR | int: ... + def get_style_bg_grad_dir_internal(self, part: PART | int) -> GRAD_DIR | int: ... + def get_style_bg_grad_internal(self, part: PART | int) -> grad_dsc_t: ... def get_style_bg_grad_opa(self, part: PART | int) -> int: ... + def get_style_bg_grad_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_grad_stop(self, part: PART | int) -> int: ... + def get_style_bg_grad_stop_internal(self, part: PART | int) -> int: ... def get_style_bg_image_opa(self, part: PART | int) -> int: ... + def get_style_bg_image_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_image_recolor(self, part: PART | int) -> color_t: ... def get_style_bg_image_recolor_filtered(self, part: PART | int) -> color_t: ... + def get_style_bg_image_recolor_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_bg_image_recolor_internal(self, part: PART | int) -> color_t: ... def get_style_bg_image_recolor_opa(self, part: PART | int) -> int: ... + def get_style_bg_image_recolor_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_image_src(self, part: PART | int) -> Any: ... + def get_style_bg_image_src_internal(self, part: PART | int) -> Any: ... def get_style_bg_image_tiled(self, part: PART | int) -> int: ... + def get_style_bg_image_tiled_internal(self, part: PART | int) -> int: ... def get_style_bg_main_opa(self, part: PART | int) -> int: ... + def get_style_bg_main_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_main_stop(self, part: PART | int) -> int: ... + def get_style_bg_main_stop_internal(self, part: PART | int) -> int: ... def get_style_bg_opa(self, part: PART | int) -> int: ... + def get_style_bg_opa_internal(self, part: PART | int) -> int: ... def get_style_bitmap_mask_src(self, part: PART | int) -> Any: ... + def get_style_bitmap_mask_src_internal(self, part: PART | int) -> Any: ... def get_style_blend_mode(self, part: PART | int) -> BLEND_MODE | int: ... + def get_style_blend_mode_internal(self, part: PART | int) -> BLEND_MODE | int: ... def get_style_blur_backdrop(self, part: PART | int) -> int: ... + def get_style_blur_backdrop_internal(self, part: PART | int) -> int: ... def get_style_blur_quality(self, part: PART | int) -> BLUR_QUALITY | int: ... + def get_style_blur_quality_internal(self, part: PART | int) -> BLUR_QUALITY | int: ... def get_style_blur_radius(self, part: PART | int) -> int: ... + def get_style_blur_radius_internal(self, part: PART | int) -> int: ... def get_style_border_color(self, part: PART | int) -> color_t: ... def get_style_border_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_border_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_border_color_internal(self, part: PART | int) -> color_t: ... def get_style_border_opa(self, part: PART | int) -> int: ... + def get_style_border_opa_internal(self, part: PART | int) -> int: ... def get_style_border_post(self, part: PART | int) -> int: ... + def get_style_border_post_internal(self, part: PART | int) -> int: ... def get_style_border_side(self, part: PART | int) -> BORDER_SIDE | int: ... + def get_style_border_side_internal(self, part: PART | int) -> BORDER_SIDE | int: ... def get_style_border_width(self, part: PART | int) -> int: ... + def get_style_border_width_internal(self, part: PART | int) -> int: ... def get_style_clamped_height(self) -> int: ... def get_style_clamped_width(self) -> int: ... def get_style_clip_corner(self, part: PART | int) -> int: ... + def get_style_clip_corner_internal(self, part: PART | int) -> int: ... def get_style_color_filter_dsc(self, part: PART | int) -> color_filter_dsc_t: ... + def get_style_color_filter_dsc_internal(self, part: PART | int) -> color_filter_dsc_t: ... def get_style_color_filter_opa(self, part: PART | int) -> int: ... + def get_style_color_filter_opa_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_color(self, part: PART | int) -> color_t: ... def get_style_drop_shadow_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_drop_shadow_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_drop_shadow_color_internal(self, part: PART | int) -> color_t: ... def get_style_drop_shadow_offset_x(self, part: PART | int) -> int: ... + def get_style_drop_shadow_offset_x_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_offset_y(self, part: PART | int) -> int: ... + def get_style_drop_shadow_offset_y_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_opa(self, part: PART | int) -> int: ... + def get_style_drop_shadow_opa_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_quality(self, part: PART | int) -> BLUR_QUALITY | int: ... + def get_style_drop_shadow_quality_internal(self, part: PART | int) -> BLUR_QUALITY | int: ... def get_style_drop_shadow_radius(self, part: PART | int) -> int: ... + def get_style_drop_shadow_radius_internal(self, part: PART | int) -> int: ... + def get_style_enabled(self, style: style_t, selector: int) -> int: ... def get_style_flex_cross_place(self, part: PART | int) -> FLEX_ALIGN | int: ... + def get_style_flex_cross_place_internal(self, part: PART | int) -> FLEX_ALIGN | int: ... def get_style_flex_flow(self, part: PART | int) -> FLEX_FLOW | int: ... + def get_style_flex_flow_internal(self, part: PART | int) -> FLEX_FLOW | int: ... def get_style_flex_grow(self, part: PART | int) -> int: ... + def get_style_flex_grow_internal(self, part: PART | int) -> int: ... def get_style_flex_main_place(self, part: PART | int) -> FLEX_ALIGN | int: ... + def get_style_flex_main_place_internal(self, part: PART | int) -> FLEX_ALIGN | int: ... def get_style_flex_track_place(self, part: PART | int) -> FLEX_ALIGN | int: ... + def get_style_flex_track_place_internal(self, part: PART | int) -> FLEX_ALIGN | int: ... def get_style_grid_cell_column_pos(self, part: PART | int) -> int: ... + def get_style_grid_cell_column_pos_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_column_span(self, part: PART | int) -> int: ... + def get_style_grid_cell_column_span_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_row_pos(self, part: PART | int) -> int: ... + def get_style_grid_cell_row_pos_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_row_span(self, part: PART | int) -> int: ... + def get_style_grid_cell_row_span_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_x_align(self, part: PART | int) -> GRID_ALIGN | int: ... + def get_style_grid_cell_x_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_cell_y_align(self, part: PART | int) -> GRID_ALIGN | int: ... + def get_style_grid_cell_y_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_column_align(self, part: PART | int) -> GRID_ALIGN | int: ... + def get_style_grid_column_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_column_dsc_array(self, part: PART | int) -> Any: ... + def get_style_grid_column_dsc_array_internal(self, part: PART | int) -> Any: ... def get_style_grid_row_align(self, part: PART | int) -> GRID_ALIGN | int: ... + def get_style_grid_row_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_row_dsc_array(self, part: PART | int) -> Any: ... + def get_style_grid_row_dsc_array_internal(self, part: PART | int) -> Any: ... def get_style_height(self, part: PART | int) -> int: ... + def get_style_height_internal(self, part: PART | int) -> int: ... def get_style_image_colorkey(self, part: PART | int) -> image_colorkey_t: ... + def get_style_image_colorkey_internal(self, part: PART | int) -> image_colorkey_t: ... def get_style_image_opa(self, part: PART | int) -> int: ... + def get_style_image_opa_internal(self, part: PART | int) -> int: ... def get_style_image_recolor(self, part: PART | int) -> color_t: ... def get_style_image_recolor_filtered(self, part: PART | int) -> color_t: ... + def get_style_image_recolor_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_image_recolor_internal(self, part: PART | int) -> color_t: ... def get_style_image_recolor_opa(self, part: PART | int) -> int: ... + def get_style_image_recolor_opa_internal(self, part: PART | int) -> int: ... def get_style_layout(self, part: PART | int) -> int: ... + def get_style_layout_internal(self, part: PART | int) -> int: ... def get_style_length(self, part: PART | int) -> int: ... + def get_style_length_internal(self, part: PART | int) -> int: ... def get_style_line_color(self, part: PART | int) -> color_t: ... def get_style_line_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_line_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_line_color_internal(self, part: PART | int) -> color_t: ... def get_style_line_dash_gap(self, part: PART | int) -> int: ... + def get_style_line_dash_gap_internal(self, part: PART | int) -> int: ... def get_style_line_dash_width(self, part: PART | int) -> int: ... + def get_style_line_dash_width_internal(self, part: PART | int) -> int: ... def get_style_line_opa(self, part: PART | int) -> int: ... + def get_style_line_opa_internal(self, part: PART | int) -> int: ... def get_style_line_rounded(self, part: PART | int) -> int: ... + def get_style_line_rounded_internal(self, part: PART | int) -> int: ... def get_style_line_width(self, part: PART | int) -> int: ... + def get_style_line_width_internal(self, part: PART | int) -> int: ... def get_style_margin_bottom(self, part: PART | int) -> int: ... + def get_style_margin_bottom_internal(self, part: PART | int) -> int: ... def get_style_margin_left(self, part: PART | int) -> int: ... + def get_style_margin_left_internal(self, part: PART | int) -> int: ... def get_style_margin_right(self, part: PART | int) -> int: ... + def get_style_margin_right_internal(self, part: PART | int) -> int: ... def get_style_margin_top(self, part: PART | int) -> int: ... + def get_style_margin_top_internal(self, part: PART | int) -> int: ... def get_style_max_height(self, part: PART | int) -> int: ... + def get_style_max_height_internal(self, part: PART | int) -> int: ... def get_style_max_width(self, part: PART | int) -> int: ... + def get_style_max_width_internal(self, part: PART | int) -> int: ... def get_style_min_height(self, part: PART | int) -> int: ... + def get_style_min_height_internal(self, part: PART | int) -> int: ... def get_style_min_width(self, part: PART | int) -> int: ... + def get_style_min_width_internal(self, part: PART | int) -> int: ... def get_style_opa(self, part: PART | int) -> int: ... + def get_style_opa_internal(self, part: PART | int) -> int: ... def get_style_opa_layered(self, part: PART | int) -> int: ... + def get_style_opa_layered_internal(self, part: PART | int) -> int: ... def get_style_opa_recursive(self, part: PART | int) -> int: ... def get_style_outline_color(self, part: PART | int) -> color_t: ... def get_style_outline_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_outline_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_outline_color_internal(self, part: PART | int) -> color_t: ... def get_style_outline_opa(self, part: PART | int) -> int: ... + def get_style_outline_opa_internal(self, part: PART | int) -> int: ... def get_style_outline_pad(self, part: PART | int) -> int: ... + def get_style_outline_pad_internal(self, part: PART | int) -> int: ... def get_style_outline_width(self, part: PART | int) -> int: ... + def get_style_outline_width_internal(self, part: PART | int) -> int: ... def get_style_pad_bottom(self, part: PART | int) -> int: ... + def get_style_pad_bottom_internal(self, part: PART | int) -> int: ... def get_style_pad_column(self, part: PART | int) -> int: ... + def get_style_pad_column_internal(self, part: PART | int) -> int: ... def get_style_pad_left(self, part: PART | int) -> int: ... + def get_style_pad_left_internal(self, part: PART | int) -> int: ... def get_style_pad_radial(self, part: PART | int) -> int: ... + def get_style_pad_radial_internal(self, part: PART | int) -> int: ... def get_style_pad_right(self, part: PART | int) -> int: ... + def get_style_pad_right_internal(self, part: PART | int) -> int: ... def get_style_pad_row(self, part: PART | int) -> int: ... + def get_style_pad_row_internal(self, part: PART | int) -> int: ... def get_style_pad_top(self, part: PART | int) -> int: ... + def get_style_pad_top_internal(self, part: PART | int) -> int: ... def get_style_prop(self, part: PART | int, prop: int) -> style_value_t: ... + def get_style_prop_internal(self, part: PART | int, prop: int) -> style_value_t: ... def get_style_radial_offset(self, part: PART | int) -> int: ... + def get_style_radial_offset_internal(self, part: PART | int) -> int: ... def get_style_radius(self, part: PART | int) -> int: ... + def get_style_radius_internal(self, part: PART | int) -> int: ... def get_style_recolor(self, part: PART | int) -> color_t: ... + def get_style_recolor_internal(self, part: PART | int) -> color_t: ... def get_style_recolor_opa(self, part: PART | int) -> int: ... + def get_style_recolor_opa_internal(self, part: PART | int) -> int: ... def get_style_recolor_recursive(self, part: PART | int) -> color32_t: ... def get_style_rotary_sensitivity(self, part: PART | int) -> int: ... + def get_style_rotary_sensitivity_internal(self, part: PART | int) -> int: ... def get_style_shadow_color(self, part: PART | int) -> color_t: ... def get_style_shadow_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_shadow_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_shadow_color_internal(self, part: PART | int) -> color_t: ... def get_style_shadow_offset_x(self, part: PART | int) -> int: ... + def get_style_shadow_offset_x_internal(self, part: PART | int) -> int: ... def get_style_shadow_offset_y(self, part: PART | int) -> int: ... + def get_style_shadow_offset_y_internal(self, part: PART | int) -> int: ... def get_style_shadow_opa(self, part: PART | int) -> int: ... + def get_style_shadow_opa_internal(self, part: PART | int) -> int: ... def get_style_shadow_spread(self, part: PART | int) -> int: ... + def get_style_shadow_spread_internal(self, part: PART | int) -> int: ... def get_style_shadow_width(self, part: PART | int) -> int: ... + def get_style_shadow_width_internal(self, part: PART | int) -> int: ... def get_style_space_bottom(self, part: PART | int) -> int: ... + def get_style_space_bottom_internal(self, part: PART | int) -> int: ... def get_style_space_left(self, part: PART | int) -> int: ... + def get_style_space_left_internal(self, part: PART | int) -> int: ... def get_style_space_right(self, part: PART | int) -> int: ... + def get_style_space_right_internal(self, part: PART | int) -> int: ... def get_style_space_top(self, part: PART | int) -> int: ... + def get_style_space_top_internal(self, part: PART | int) -> int: ... def get_style_text_align(self, part: PART | int) -> TEXT_ALIGN | int: ... + def get_style_text_align_internal(self, part: PART | int) -> TEXT_ALIGN | int: ... def get_style_text_color(self, part: PART | int) -> color_t: ... def get_style_text_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_text_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_text_color_internal(self, part: PART | int) -> color_t: ... def get_style_text_decor(self, part: PART | int) -> TEXT_DECOR | int: ... + def get_style_text_decor_internal(self, part: PART | int) -> TEXT_DECOR | int: ... def get_style_text_font(self, part: PART | int) -> font_t: ... + def get_style_text_font_internal(self, part: PART | int) -> font_t: ... + def get_style_text_leading_trim(self, part: PART | int) -> TEXT_LEADING_TRIM | int: ... + def get_style_text_leading_trim_internal(self, part: PART | int) -> TEXT_LEADING_TRIM | int: ... def get_style_text_letter_space(self, part: PART | int) -> int: ... + def get_style_text_letter_space_internal(self, part: PART | int) -> int: ... def get_style_text_line_space(self, part: PART | int) -> int: ... + def get_style_text_line_space_internal(self, part: PART | int) -> int: ... def get_style_text_opa(self, part: PART | int) -> int: ... + def get_style_text_opa_internal(self, part: PART | int) -> int: ... def get_style_text_outline_stroke_color(self, part: PART | int) -> color_t: ... def get_style_text_outline_stroke_color_filtered(self, part: PART | int) -> color_t: ... + def get_style_text_outline_stroke_color_filtered_internal(self, part: PART | int) -> color_t: ... + def get_style_text_outline_stroke_color_internal(self, part: PART | int) -> color_t: ... def get_style_text_outline_stroke_opa(self, part: PART | int) -> int: ... + def get_style_text_outline_stroke_opa_internal(self, part: PART | int) -> int: ... def get_style_text_outline_stroke_width(self, part: PART | int) -> int: ... + def get_style_text_outline_stroke_width_internal(self, part: PART | int) -> int: ... def get_style_transform_height(self, part: PART | int) -> int: ... + def get_style_transform_height_internal(self, part: PART | int) -> int: ... def get_style_transform_pivot_x(self, part: PART | int) -> int: ... + def get_style_transform_pivot_x_internal(self, part: PART | int) -> int: ... def get_style_transform_pivot_y(self, part: PART | int) -> int: ... + def get_style_transform_pivot_y_internal(self, part: PART | int) -> int: ... def get_style_transform_rotation(self, part: PART | int) -> int: ... + def get_style_transform_rotation_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_x(self, part: PART | int) -> int: ... + def get_style_transform_scale_x_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_x_safe(self, part: PART | int) -> int: ... + def get_style_transform_scale_x_safe_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_y(self, part: PART | int) -> int: ... + def get_style_transform_scale_y_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_y_safe(self, part: PART | int) -> int: ... + def get_style_transform_scale_y_safe_internal(self, part: PART | int) -> int: ... def get_style_transform_skew_x(self, part: PART | int) -> int: ... + def get_style_transform_skew_x_internal(self, part: PART | int) -> int: ... def get_style_transform_skew_y(self, part: PART | int) -> int: ... + def get_style_transform_skew_y_internal(self, part: PART | int) -> int: ... def get_style_transform_width(self, part: PART | int) -> int: ... + def get_style_transform_width_internal(self, part: PART | int) -> int: ... def get_style_transition(self, part: PART | int) -> style_transition_dsc_t: ... + def get_style_transition_internal(self, part: PART | int) -> style_transition_dsc_t: ... def get_style_translate_radial(self, part: PART | int) -> int: ... + def get_style_translate_radial_internal(self, part: PART | int) -> int: ... def get_style_translate_x(self, part: PART | int) -> int: ... + def get_style_translate_x_internal(self, part: PART | int) -> int: ... def get_style_translate_y(self, part: PART | int) -> int: ... + def get_style_translate_y_internal(self, part: PART | int) -> int: ... def get_style_width(self, part: PART | int) -> int: ... + def get_style_width_internal(self, part: PART | int) -> int: ... def get_style_x(self, part: PART | int) -> int: ... + def get_style_x_internal(self, part: PART | int) -> int: ... def get_style_y(self, part: PART | int) -> int: ... + def get_style_y_internal(self, part: PART | int) -> int: ... def get_transform(self) -> matrix_t: ... def get_transformed_area(self, area: area_t, flags: obj.POINT_TRANSFORM_FLAG | int) -> None: ... def get_user_data(self) -> Any: ... + def get_user_flag(self, bit: int) -> int: ... def get_width(self) -> int: ... def get_x(self) -> int: ... def get_x2(self) -> int: ... @@ -3509,14 +3862,55 @@ class obj(_Struct): def init_draw_rect_dsc(self, part: PART | int, draw_dsc: draw_rect_dsc_t) -> None: ... def invalidate(self) -> RESULT | int: ... def invalidate_area(self, area: area_t) -> RESULT | int: ... + @staticmethod + def invalidate_expand_blur(disp: display_t) -> None: ... + def is_adv_hittest(self) -> int: ... + def is_alt(self) -> int: ... + def is_checkable(self) -> int: ... + def is_checked(self) -> int: ... + def is_click_focusable(self) -> int: ... + def is_clickable(self) -> int: ... + def is_disabled(self) -> int: ... def is_editable(self) -> int: ... + def is_edited(self) -> int: ... + def is_event_bubble(self) -> int: ... + def is_event_trickle(self) -> int: ... + def is_flex_in_new_track(self) -> int: ... + def is_floating(self) -> int: ... + def is_focus_key(self) -> int: ... + def is_focused(self) -> int: ... + def is_gesture_bubble(self) -> int: ... def is_group_def(self) -> int: ... def is_height_max(self) -> int: ... def is_height_min(self) -> int: ... + def is_hidden(self) -> int: ... + def is_hovered(self) -> int: ... + def is_ignore_layout(self) -> int: ... + def is_in_widget_tree(self) -> int: ... def is_layout_positioned(self) -> int: ... + def is_overflow_visible(self) -> int: ... + def is_press_lock(self) -> int: ... + def is_pressed(self) -> int: ... def is_radio_button(self) -> int: ... + def is_scroll_chain_hor(self) -> int: ... + def is_scroll_chain_ver(self) -> int: ... + def is_scroll_elastic(self) -> int: ... + def is_scroll_momentum(self) -> int: ... + def is_scroll_on_focus(self) -> int: ... + def is_scroll_one(self) -> int: ... + def is_scroll_with_arrow(self) -> int: ... + def is_scrollable(self) -> int: ... + def is_scrolled(self) -> int: ... def is_scrolling(self) -> int: ... - def is_valid(self) -> int: ... + def is_send_draw_task_events(self) -> int: ... + def is_snappable(self) -> int: ... + def is_state_trickle(self) -> int: ... + def is_state_user_1(self) -> int: ... + def is_state_user_2(self) -> int: ... + def is_state_user_3(self) -> int: ... + def is_state_user_4(self) -> int: ... + def is_style_any_height_content(self) -> int: ... + def is_style_any_width_content(self) -> int: ... def is_visible(self) -> int: ... def is_width_max(self) -> int: ... def is_width_min(self) -> int: ... @@ -3538,6 +3932,9 @@ class obj(_Struct): def refresh_ext_draw_size(self) -> None: ... def refresh_self_size(self) -> int: ... def refresh_style(self, part: PART | int, prop: int) -> None: ... + def remove_child(self, child: obj) -> None: ... + @staticmethod + def remove_delete_cb(dsc: delete_dsc_t) -> None: ... def remove_event(self, index: int) -> int: ... def remove_event_cb(self, event_cb: Callable[[event_t], None]) -> int: ... def remove_event_cb_with_user_data(self, event_cb: Callable[[event_t], None], user_data: Any) -> int: ... @@ -3563,29 +3960,68 @@ class obj(_Struct): def scroll_to_y(self, y: int, anim_en: int) -> None: ... def scrollbar_invalidate(self) -> None: ... def send_event(self, event_code: EVENT | int, param: Any) -> RESULT | int: ... + def set_adv_hittest(self, en: int) -> None: ... def set_align(self, align: ALIGN | int) -> None: ... + def set_alt(self, en: int) -> None: ... + def set_checkable(self, en: int) -> None: ... + def set_checked(self, en: int) -> None: ... + def set_click_focusable(self, en: int) -> None: ... + def set_clickable(self, en: int) -> None: ... def set_content_height(self, h: int) -> None: ... def set_content_width(self, w: int) -> None: ... + def set_disabled(self, en: int) -> None: ... + def set_edited(self, en: int) -> None: ... + def set_event_bubble(self, en: int) -> None: ... + def set_event_trickle(self, en: int) -> None: ... def set_ext_click_area(self, size: int) -> None: ... + def set_ext_draw_size(self, size: int) -> None: ... def set_flag(self, f: OBJ_FLAG | int, v: int) -> None: ... def set_flex_align(self, main_place: FLEX_ALIGN | int, cross_place: FLEX_ALIGN | int, track_cross_place: FLEX_ALIGN | int) -> None: ... def set_flex_flow(self, flow: FLEX_FLOW | int) -> None: ... def set_flex_grow(self, grow: int) -> None: ... + def set_flex_in_new_track(self, en: int) -> None: ... + def set_floating(self, en: int) -> None: ... + def set_focus_key(self, en: int) -> None: ... + def set_focused(self, en: int) -> None: ... + def set_gesture_bubble(self, en: int) -> None: ... def set_grid_align(self, column_align: GRID_ALIGN | int, row_align: GRID_ALIGN | int) -> None: ... def set_grid_cell(self, column_align: GRID_ALIGN | int, col_pos: int, col_span: int, row_align: GRID_ALIGN | int, row_pos: int, row_span: int) -> None: ... def set_grid_dsc_array(self, col_dsc: Sequence[int], row_dsc: Sequence[int]) -> None: ... def set_height(self, h: int) -> None: ... + def set_hidden(self, en: int) -> None: ... + def set_hovered(self, en: int) -> None: ... + def set_ignore_layout(self, en: int) -> None: ... def set_layout(self, layout: int) -> None: ... def set_local_style_prop(self, prop: int, value: style_value_t, selector: int) -> None: ... + def set_overflow_visible(self, en: int) -> None: ... def set_parent(self, parent: obj) -> None: ... def set_pos(self, x: int, y: int) -> None: ... + def set_press_lock(self, en: int) -> None: ... + def set_pressed(self, en: int) -> None: ... def set_radio_button(self, en: int) -> None: ... + def set_scroll_chain(self, en: int) -> None: ... + def set_scroll_chain_hor(self, en: int) -> None: ... + def set_scroll_chain_ver(self, en: int) -> None: ... def set_scroll_dir(self, dir: DIR | int) -> None: ... + def set_scroll_elastic(self, en: int) -> None: ... + def set_scroll_momentum(self, en: int) -> None: ... + def set_scroll_on_focus(self, en: int) -> None: ... + def set_scroll_one(self, en: int) -> None: ... def set_scroll_snap_x(self, align: SCROLL_SNAP | int) -> None: ... def set_scroll_snap_y(self, align: SCROLL_SNAP | int) -> None: ... + def set_scroll_with_arrow(self, en: int) -> None: ... + def set_scrollable(self, en: int) -> None: ... def set_scrollbar_mode(self, mode: SCROLLBAR_MODE | int) -> None: ... + def set_scrolled(self, en: int) -> None: ... + def set_send_draw_task_events(self, en: int) -> None: ... def set_size(self, w: int, h: int) -> None: ... + def set_snappable(self, en: int) -> None: ... def set_state(self, state: STATE | int, v: int) -> None: ... + def set_state_trickle(self, en: int) -> None: ... + def set_state_user_1(self, en: int) -> None: ... + def set_state_user_2(self, en: int) -> None: ... + def set_state_user_3(self, en: int) -> None: ... + def set_state_user_4(self, en: int) -> None: ... def set_style_align(self, value: ALIGN | int, selector: int) -> None: ... def set_style_anim(self, value: anim_t, selector: int) -> None: ... def set_style_anim_duration(self, value: int, selector: int) -> None: ... @@ -3628,6 +4064,7 @@ class obj(_Struct): def set_style_drop_shadow_opa(self, value: int, selector: int) -> None: ... def set_style_drop_shadow_quality(self, value: BLUR_QUALITY | int, selector: int) -> None: ... def set_style_drop_shadow_radius(self, value: int, selector: int) -> None: ... + def set_style_enabled(self, style: style_t, selector: int, en: int) -> None: ... def set_style_flex_cross_place(self, value: FLEX_ALIGN | int, selector: int) -> None: ... def set_style_flex_flow(self, value: FLEX_FLOW | int, selector: int) -> None: ... def set_style_flex_grow(self, value: int, selector: int) -> None: ... @@ -3700,6 +4137,7 @@ class obj(_Struct): def set_style_text_color(self, value: color_t, selector: int) -> None: ... def set_style_text_decor(self, value: TEXT_DECOR | int, selector: int) -> None: ... def set_style_text_font(self, value: font_t, selector: int) -> None: ... + def set_style_text_leading_trim(self, value: TEXT_LEADING_TRIM | int, selector: int) -> None: ... def set_style_text_letter_space(self, value: int, selector: int) -> None: ... def set_style_text_line_space(self, value: int, selector: int) -> None: ... def set_style_text_opa(self, value: int, selector: int) -> None: ... @@ -3728,13 +4166,15 @@ class obj(_Struct): def set_subject_increment_event_rollover(self, dsc: subject_increment_dsc_t, rollover: int) -> None: ... def set_transform(self, matrix: matrix_t) -> None: ... def set_user_data(self, user_data: Any) -> None: ... + def set_user_flag(self, bit: int, v: int) -> None: ... def set_width(self, w: int) -> None: ... def set_x(self, x: int) -> None: ... def set_y(self, y: int) -> None: ... def stop_scroll_anim(self) -> None: ... def style_apply_color_filter(self, part: PART | int, v: style_value_t) -> style_value_t: ... + def style_apply_color_filter_internal(self, part: PART | int, v: style_value_t) -> style_value_t: ... def style_apply_recolor(self, part: PART | int, color: color32_t) -> color32_t: ... - def style_create_transition(self, part: PART | int, prev_state: STATE | int, new_state: STATE | int, tr: obj_style_transition_dsc_t) -> None: ... + def style_create_transition(self, part: PART | int, prev_state: STATE | int, new_state: STATE | int, tr_dsc: obj_style_transition_dsc_t) -> None: ... @staticmethod def style_deinit() -> None: ... def style_get_disabled(self, style: style_t, selector: int) -> int: ... @@ -3745,22 +4185,30 @@ class obj(_Struct): @staticmethod def style_init() -> None: ... def style_set_disabled(self, style: style_t, selector: int, dis: int) -> None: ... - def style_state_compare(self, state1: STATE | int, state2: STATE | int) -> STYLE_STATE_CMP | int: ... + def style_state_compare(self, state1: STATE | int, state2: STATE | int, changed_part: PART | int) -> STYLE_STATE_CMP | int: ... def swap(self, obj2: obj) -> None: ... def transform_point(self, p: point_t, flags: obj.POINT_TRANSFORM_FLAG | int) -> None: ... def transform_point_array(self, points: point_t, count: int, flags: obj.POINT_TRANSFORM_FLAG | int) -> None: ... def tree_walk(self, cb: Callable[[obj, Any], obj.TREE_WALK | int], user_data: Any) -> None: ... + def update_blur_status(self) -> None: ... def update_layer_type(self) -> None: ... def update_layout(self) -> None: ... def update_snap(self, anim_en: int) -> None: ... class qrcode(obj): + class UPDATE_MODE: + IMMEDIATE: int + DEFERRED: int def __init__(self, parent: obj | None = ...) -> None: ... + def get_update_mode(self) -> qrcode.UPDATE_MODE | int: ... + def is_render_valid(self) -> int: ... + def render(self) -> RESULT | int: ... def set_dark_color(self, color: color_t) -> None: ... def set_data(self, data: str) -> None: ... def set_light_color(self, color: color_t) -> None: ... def set_quiet_zone(self, enable: int) -> None: ... def set_size(self, size: int) -> None: ... # type: ignore[override] + def set_update_mode(self, mode: qrcode.UPDATE_MODE | int) -> None: ... def update(self, data: Any, data_len: int) -> RESULT | int: ... class roller(obj): @@ -3790,6 +4238,8 @@ class scale(obj): LAST: int def __init__(self, parent: obj | None = ...) -> None: ... def add_section(self) -> scale_section_t: ... + def bind_image_needle_value(self, needle_img: obj, subject: subject_t) -> observer_t: ... + def bind_line_needle_value(self, needle_line: obj, needle_length: int, subject: subject_t) -> observer_t: ... def bind_section_max_value(self, section: scale_section_t, subject: subject_t) -> observer_t: ... def bind_section_min_value(self, section: scale_section_t, subject: subject_t) -> observer_t: ... def get_angle_range(self) -> int: ... @@ -3866,7 +4316,7 @@ class spangroup(obj): def get_max_lines(self) -> int: ... def get_mode(self) -> SPAN_MODE | int: ... def get_overflow(self) -> SPAN_OVERFLOW | int: ... - def get_span_by_point(self, point: point_t) -> span_t: ... + def get_span_by_point(self, p: point_t) -> span_t: ... def get_span_coords(self, span: span_t) -> span_coords_t: ... def get_span_count(self) -> int: ... def refresh(self) -> None: ... @@ -4099,7 +4549,7 @@ def anim_enable_vsync_mode(enable: int) -> None: ... def anim_get(var: Any, exec_cb: Callable[[Any, int], None]) -> anim_t: ... def anim_get_timer() -> timer_t: ... def anim_refr_now() -> None: ... -def anim_resolve_speed(speed: int, start: int, end: int) -> int: ... +def anim_resolve_speed(speed_or_time: int, start: int, end: int) -> int: ... def anim_speed(speed: int) -> int: ... def anim_speed_clamped(speed: int, min_time: int, max_time: int) -> int: ... def anim_speed_to_time(speed: int, start: int, end: int) -> int: ... @@ -4109,6 +4559,7 @@ def async_call_cancel(async_xcb: Callable[[Any], None], user_data: Any) -> RESUL def atan2(x: int, y: int) -> int: ... def bezier3(t: int, u0: int, u1: int, u2: int, u3: int) -> int: ... def bidi_calculate_align(align: TEXT_ALIGN | int, base_dir: BASE_DIR | int, txt: str) -> None: ... +def bidi_calculate_align_internal(align: TEXT_ALIGN | int, base_dir: BASE_DIR | int, txt: str) -> None: ... def bin_decoder_close(decoder: image_decoder_t, dsc: image_decoder_dsc_t) -> None: ... def bin_decoder_get_area(decoder: image_decoder_t, dsc: image_decoder_dsc_t, full_area: area_t, decoded_area: area_t) -> RESULT | int: ... def bin_decoder_info(decoder: image_decoder_t, dsc: image_decoder_dsc_t, header: image_header_t) -> RESULT | int: ... @@ -4129,6 +4580,7 @@ def clamp_width(width: int, min_width: int, max_width: int, ref_width: int) -> i def color24_luminance(c: Any) -> int: ... def color32_make(r: int, g: int, b: int, a: int) -> color32_t: ... def color_16_16_mix(c1: int, c2: int, mix: int) -> int: ... +def color_16_16_mix_inlined(c1: int, c2: int, mix: int) -> int: ... def color_black() -> color_t: ... def color_format_get_bpp(cf: COLOR_FORMAT | int) -> int: ... def color_format_get_size(cf: COLOR_FORMAT | int) -> int: ... @@ -4172,6 +4624,9 @@ def draw_finalize_task_creation(layer: layer_t, t: draw_task_t) -> None: ... def draw_get_available_task(layer: layer_t, t_prev: draw_task_t, draw_unit_id: int) -> draw_task_t: ... def draw_get_next_available_task(layer: layer_t, t_prev: draw_task_t, draw_unit_id: int) -> draw_task_t: ... def draw_get_unit_count() -> int: ... +def draw_i1_convert_to_vtiled(buf: Any, buf_size: int, width: int, height: int, out_buf: Any, out_buf_size: int, bit_order_lsb: int) -> None: ... +def draw_i1_invert(buf: Any, buf_size: int) -> None: ... +def draw_i1_to_argb8888(buf_i1: Any, buf_argb8888: Any, width: int, height: int, buf_i1_stride: int, buf_argb8888_stride: int, index0_color: int, index1_color: int) -> None: ... def draw_image(layer: layer_t, dsc: draw_image_dsc_t, coords: area_t) -> None: ... def draw_init() -> None: ... def draw_label(layer: layer_t, dsc: draw_label_dsc_t, coords: area_t) -> None: ... @@ -4179,6 +4634,9 @@ def draw_layer(layer: layer_t, dsc: draw_image_dsc_t, coords: area_t) -> None: . def draw_layer_alloc_buf(layer: layer_t) -> Any: ... def draw_layer_create(parent_layer: layer_t, color_format: COLOR_FORMAT | int, area: area_t) -> layer_t: ... def draw_layer_create_drop_shadow(parent_layer: layer_t, base: draw_dsc_base_t, area: area_t) -> layer_t: ... +def draw_layer_dealloc_buf(layer: layer_t) -> None: ... +def draw_layer_deinit(layer: layer_t) -> None: ... +def draw_layer_delete(layer: layer_t) -> None: ... def draw_layer_finish_drop_shadow(drop_shadow_layer: layer_t, base: draw_dsc_base_t) -> None: ... def draw_layer_go_to_xy(layer: layer_t, x: int, y: int) -> Any: ... def draw_layer_init(layer: layer_t, parent_layer: layer_t, color_format: COLOR_FORMAT | int, area: area_t) -> None: ... @@ -4186,20 +4644,19 @@ def draw_letter(layer: layer_t, dsc: draw_letter_dsc_t, point: point_t) -> None: def draw_line(layer: layer_t, dsc: draw_line_dsc_t) -> None: ... def draw_mask_rect(layer: layer_t, dsc: draw_mask_rect_dsc_t) -> None: ... def draw_rect(layer: layer_t, dsc: draw_rect_dsc_t, coords: area_t) -> None: ... +def draw_rgb565_swap(buf: Any, buf_size_px: int) -> None: ... +def draw_rotate(src: Any, dest: Any, src_width: int, src_height: int, src_stride: int, dest_stride: int, rotation: DISPLAY_ROTATION | int, color_format: COLOR_FORMAT | int) -> None: ... def draw_sw_deinit() -> None: ... def draw_sw_get_blend_handler(dest_cf: COLOR_FORMAT | int) -> Callable[[draw_task_t, draw_sw_blend_dsc_t], None]: ... -def draw_sw_i1_convert_to_vtiled(buf: Any, buf_size: int, width: int, height: int, out_buf: Any, out_buf_size: int, bit_order_lsb: int) -> None: ... -def draw_sw_i1_invert(buf: Any, buf_size: int) -> None: ... -def draw_sw_i1_to_argb8888(buf_i1: Any, buf_argb8888: Any, width: int, height: int, buf_i1_stride: int, buf_argb8888_stride: int, index0_color: int, index1_color: int) -> None: ... +def draw_sw_grad_color_calculate(dsc: grad_dsc_t, range: int, frac: int, color_out: color_t, opa_out: Any) -> None: ... +def draw_sw_grad_get(gradient: grad_dsc_t, w: int, h: int) -> draw_sw_grad_calc_t: ... def draw_sw_init() -> None: ... def draw_sw_mask_apply(masks: Sequence[Any], mask_buf: Any, abs_x: int, abs_y: int, len: int) -> DRAW_SW_MASK_RES | int: ... def draw_sw_mask_cleanup() -> None: ... def draw_sw_mask_deinit() -> None: ... def draw_sw_mask_free_param(p: Any) -> None: ... def draw_sw_mask_init() -> None: ... -def draw_sw_rgb565_swap(buf: Any, buf_size_px: int) -> None: ... -def draw_sw_rotate(src: Any, dest: Any, src_width: int, src_height: int, src_stride: int, dest_stride: int, rotation: DISPLAY_ROTATION | int, color_format: COLOR_FORMAT | int) -> None: ... -def draw_sw_transform(dest_area: area_t, src_buf: Any, src_w: int, src_h: int, src_stride: int, draw_dsc: draw_image_dsc_t, sup: draw_image_sup_t, cf: COLOR_FORMAT | int, dest_buf: Any) -> None: ... +def draw_sw_transform(dest_area: area_t, src_buf: Any, src_w: int, src_h: int, src_stride: int, draw_dsc: draw_image_dsc_t, sup: draw_image_sup_t, src_cf: COLOR_FORMAT | int, dest_buf: Any) -> None: ... def draw_sw_unregister_blend_handler(dest_cf: COLOR_FORMAT | int) -> int: ... def draw_triangle(layer: layer_t, draw_dsc: draw_triangle_dsc_t) -> None: ... def draw_unit_send_event(name: str, code: EVENT | int, param: Any) -> None: ... @@ -4260,6 +4717,7 @@ def lock() -> None: ... def lock_isr() -> RESULT | int: ... def lodepng_deinit() -> None: ... def lodepng_init() -> None: ... +def lru_create(cache_size: int, average_length: int, value_free: Callable[[Any], None], key_free: Callable[[Any], None]) -> lru_t: ... def malloc(size: int) -> Any: ... def malloc_core(size: int) -> Any: ... def malloc_zeroed(size: int) -> Any: ... @@ -4287,6 +4745,7 @@ def palette_lighten(p: PALETTE | int, lvl: int) -> color_t: ... def palette_main(p: PALETTE | int) -> color_t: ... def pct(x: int) -> int: ... def pct_to_px(v: int, base: int) -> int: ... +def pending_create(obj_size: int, capacity_default: int) -> pending_t: ... def pow(base: int, exp: int) -> int: ... def rand(min: int, max: int) -> int: ... def rand_set_seed(seed: int) -> None: ... @@ -4333,19 +4792,25 @@ def style_prop_get_default(prop: int) -> style_value_t: ... def style_prop_has_flag(prop: int, flag: int) -> int: ... def style_prop_lookup_flags(prop: int) -> int: ... def style_register_prop(flag: int) -> int: ... +def subject_create(_type: SUBJECT_TYPE | int) -> subject_t: ... +def subject_global_deinit() -> None: ... +def subject_global_init() -> None: ... def swap_bytes_16(x: int) -> int: ... def swap_bytes_32(x: int) -> int: ... def task_handler() -> int: ... def text_cut(txt: str, pos: int, len: int) -> None: ... def text_encoded_letter_next_2(txt: str, letter: Any, letter_next: Any, ofs: Any) -> None: ... +def text_get_line_width(txt: str, length: int, font: font_t, attributes: text_attributes_t) -> int: ... def text_get_next_line(txt: str, len: int, font: font_t, used_width: Any, attributes: text_attributes_t) -> int: ... def text_get_size(size_res: point_t, text: str, font: font_t, letter_space: int, line_space: int, max_width: int, flag: TEXT_FLAG | int) -> None: ... def text_get_size_attributes(size_res: point_t, text: str, font: font_t, attributes: text_attributes_t) -> None: ... +def text_get_size_internal(size_res: point_t, text: str, font: font_t, letter_space: int, line_space: int, max_width: int, flag: TEXT_FLAG | int) -> None: ... def text_get_width(txt: str, length: int, font: font_t, attributes: text_attributes_t) -> int: ... def text_ins(txt_buf: str, pos: int, ins_txt: str) -> None: ... def text_is_a_word(letter: int) -> int: ... def text_is_break_char(letter: int) -> int: ... def text_is_cmd(state: TEXT_CMD_STATE | int, c: int) -> int: ... +def text_is_hanging_space(letter: int) -> int: ... def text_is_marker(letter: int) -> int: ... def theme_apply(obj: obj) -> None: ... def theme_create() -> theme_t: ... @@ -4378,6 +4843,7 @@ def timer_create(timer_xcb: Callable[[timer_t], None], period: int, user_data: A def timer_create_basic() -> timer_t: ... def timer_enable(en: int) -> None: ... def timer_get_idle() -> int: ... +def timer_get_time_to_next() -> int: ... def timer_get_time_until_next() -> int: ... def timer_handler() -> int: ... def timer_handler_run_in_period(period: int) -> int: ... diff --git a/generated/lvgl_circuitpython.c b/generated/lvgl_circuitpython.c index 93448d6..8405cf2 100644 --- a/generated/lvgl_circuitpython.c +++ b/generated/lvgl_circuitpython.c @@ -10,7 +10,7 @@ * Preprocessing command: * Preprocessing was disabled. * - * Generating Objects: obj(None), image(obj), animimg(obj), arc(obj), arclabel(obj), label(obj), bar(obj), button(obj), buttonmatrix(obj), calendar(obj), canvas(obj), chart(obj), checkbox(obj), dropdown(obj), gif(obj), imagebutton(obj), keyboard(obj), led(obj), line(obj), list(obj), menu(obj), menu_page(obj), menu_cont(obj), menu_section(obj), menu_separator(obj), msgbox(obj), roller(obj), scale(obj), slider(obj), spangroup(obj), textarea(obj), spinbox(obj), spinner(obj), switch(obj), table(obj), tabview(obj), tileview(obj), win(obj), barcode(obj), qrcode(obj) + * Generating Objects: obj(None), image(obj), animimg(obj), arc(obj), arclabel(obj), label(obj), bar(obj), canvas(obj), barcode(obj), button(obj), buttonmatrix(obj), calendar(obj), chart(obj), checkbox(obj), dropdown(obj), gif(obj), imagebutton(obj), keyboard(obj), led(obj), line(obj), list(obj), menu(obj), menu_page(obj), menu_cont(obj), menu_section(obj), menu_separator(obj), msgbox(obj), qrcode(obj), roller(obj), scale(obj), slider(obj), spangroup(obj), textarea(obj), spinbox(obj), spinner(obj), switch(obj), table(obj), tabview(obj), tileview(obj), win(obj) */ /* @@ -36,6 +36,14 @@ #include "lvgl/lvgl.h" #include "lvgl/src/lvgl_private.h" +/* + * The binding keeps every function LVGL marks deprecated callable until LVGL + * removes it, so a call to one here is not a warning (LVGL 9.6 and later). + */ +#ifdef LV_DEPRECATIONS_IGNORE_BEGIN +LV_DEPRECATIONS_IGNORE_BEGIN +#endif + #define LV_OBJ_T lv_obj_t @@ -1338,45 +1346,6 @@ static inline const mp_obj_type_t *get_mp_C_Pointer_type(void) */ -/* - * lvgl ENUM_LV_LOG_LEVEL object definitions - */ - -static const mp_rom_map_elem_t ENUM_LV_LOG_LEVEL_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_TRACE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_TRACE)) }, - { MP_ROM_QSTR(MP_QSTR_INFO), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_INFO)) }, - { MP_ROM_QSTR(MP_QSTR_WARN), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_WARN)) }, - { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_ERROR)) }, - { MP_ROM_QSTR(MP_QSTR_USER), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_USER)) }, - { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_NONE)) } -}; - -static MP_DEFINE_CONST_DICT(ENUM_LV_LOG_LEVEL_locals_dict, ENUM_LV_LOG_LEVEL_locals_dict_table); - -static void ENUM_LV_LOG_LEVEL_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl ENUM_LV_LOG_LEVEL"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_ENUM_LV_LOG_LEVEL_type_base, - MP_QSTR_ENUM_LV_LOG_LEVEL, - MP_TYPE_FLAG_NONE, - print, ENUM_LV_LOG_LEVEL_print, - attr, call_parent_methods, - locals_dict, &ENUM_LV_LOG_LEVEL_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_ENUM_LV_LOG_LEVEL_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_ENUM_LV_LOG_LEVEL_type_base, -}; - - /* * lvgl ENUM_LV_COORD object definitions */ @@ -1412,87 +1381,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_ENUM_LV_COORD_type = { }; -/* - * lvgl LV_OPA object definitions - */ - -static const mp_rom_map_elem_t LV_OPA_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_TRANSP), MP_ROM_PTR(MP_ROM_INT(LV_OPA_TRANSP)) }, - { MP_ROM_QSTR(MP_QSTR__0), MP_ROM_PTR(MP_ROM_INT(LV_OPA_0)) }, - { MP_ROM_QSTR(MP_QSTR__10), MP_ROM_PTR(MP_ROM_INT(LV_OPA_10)) }, - { MP_ROM_QSTR(MP_QSTR__20), MP_ROM_PTR(MP_ROM_INT(LV_OPA_20)) }, - { MP_ROM_QSTR(MP_QSTR__30), MP_ROM_PTR(MP_ROM_INT(LV_OPA_30)) }, - { MP_ROM_QSTR(MP_QSTR__40), MP_ROM_PTR(MP_ROM_INT(LV_OPA_40)) }, - { MP_ROM_QSTR(MP_QSTR__50), MP_ROM_PTR(MP_ROM_INT(LV_OPA_50)) }, - { MP_ROM_QSTR(MP_QSTR__60), MP_ROM_PTR(MP_ROM_INT(LV_OPA_60)) }, - { MP_ROM_QSTR(MP_QSTR__70), MP_ROM_PTR(MP_ROM_INT(LV_OPA_70)) }, - { MP_ROM_QSTR(MP_QSTR__80), MP_ROM_PTR(MP_ROM_INT(LV_OPA_80)) }, - { MP_ROM_QSTR(MP_QSTR__90), MP_ROM_PTR(MP_ROM_INT(LV_OPA_90)) }, - { MP_ROM_QSTR(MP_QSTR__100), MP_ROM_PTR(MP_ROM_INT(LV_OPA_100)) }, - { MP_ROM_QSTR(MP_QSTR_COVER), MP_ROM_PTR(MP_ROM_INT(LV_OPA_COVER)) } -}; - -static MP_DEFINE_CONST_DICT(LV_OPA_locals_dict, LV_OPA_locals_dict_table); - -static void LV_OPA_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_OPA"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_OPA_type_base, - MP_QSTR_LV_OPA, - MP_TYPE_FLAG_NONE, - print, LV_OPA_print, - attr, call_parent_methods, - locals_dict, &LV_OPA_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_OPA_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_OPA_type_base, -}; - - -/* - * lvgl LV_TREE_WALK object definitions - */ - -static const mp_rom_map_elem_t LV_TREE_WALK_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_PRE_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_PRE_ORDER)) }, - { MP_ROM_QSTR(MP_QSTR_POST_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_POST_ORDER)) } -}; - -static MP_DEFINE_CONST_DICT(LV_TREE_WALK_locals_dict, LV_TREE_WALK_locals_dict_table); - -static void LV_TREE_WALK_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_TREE_WALK"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_TREE_WALK_type_base, - MP_QSTR_LV_TREE_WALK, - MP_TYPE_FLAG_NONE, - print, LV_TREE_WALK_print, - attr, call_parent_methods, - locals_dict, &LV_TREE_WALK_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TREE_WALK_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_TREE_WALK_type_base, -}; - - /* * lvgl LV_STR_SYMBOL object definitions */ @@ -1588,6 +1476,91 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STR_SYMBOL_type = { }; +/* + * lvgl ENUM_LV_LOG_LEVEL object definitions + */ + +static const mp_rom_map_elem_t ENUM_LV_LOG_LEVEL_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_TRACE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_TRACE)) }, + { MP_ROM_QSTR(MP_QSTR_INFO), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_INFO)) }, + { MP_ROM_QSTR(MP_QSTR_WARN), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_WARN)) }, + { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_ERROR)) }, + { MP_ROM_QSTR(MP_QSTR_USER), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_USER)) }, + { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_NONE)) } +}; + +static MP_DEFINE_CONST_DICT(ENUM_LV_LOG_LEVEL_locals_dict, ENUM_LV_LOG_LEVEL_locals_dict_table); + +static void ENUM_LV_LOG_LEVEL_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl ENUM_LV_LOG_LEVEL"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_ENUM_LV_LOG_LEVEL_type_base, + MP_QSTR_ENUM_LV_LOG_LEVEL, + MP_TYPE_FLAG_NONE, + print, ENUM_LV_LOG_LEVEL_print, + attr, call_parent_methods, + locals_dict, &ENUM_LV_LOG_LEVEL_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_ENUM_LV_LOG_LEVEL_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_ENUM_LV_LOG_LEVEL_type_base, +}; + + +/* + * lvgl LV_OPA object definitions + */ + +static const mp_rom_map_elem_t LV_OPA_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_TRANSP), MP_ROM_PTR(MP_ROM_INT(LV_OPA_TRANSP)) }, + { MP_ROM_QSTR(MP_QSTR__0), MP_ROM_PTR(MP_ROM_INT(LV_OPA_0)) }, + { MP_ROM_QSTR(MP_QSTR__10), MP_ROM_PTR(MP_ROM_INT(LV_OPA_10)) }, + { MP_ROM_QSTR(MP_QSTR__20), MP_ROM_PTR(MP_ROM_INT(LV_OPA_20)) }, + { MP_ROM_QSTR(MP_QSTR__30), MP_ROM_PTR(MP_ROM_INT(LV_OPA_30)) }, + { MP_ROM_QSTR(MP_QSTR__40), MP_ROM_PTR(MP_ROM_INT(LV_OPA_40)) }, + { MP_ROM_QSTR(MP_QSTR__50), MP_ROM_PTR(MP_ROM_INT(LV_OPA_50)) }, + { MP_ROM_QSTR(MP_QSTR__60), MP_ROM_PTR(MP_ROM_INT(LV_OPA_60)) }, + { MP_ROM_QSTR(MP_QSTR__70), MP_ROM_PTR(MP_ROM_INT(LV_OPA_70)) }, + { MP_ROM_QSTR(MP_QSTR__80), MP_ROM_PTR(MP_ROM_INT(LV_OPA_80)) }, + { MP_ROM_QSTR(MP_QSTR__90), MP_ROM_PTR(MP_ROM_INT(LV_OPA_90)) }, + { MP_ROM_QSTR(MP_QSTR__100), MP_ROM_PTR(MP_ROM_INT(LV_OPA_100)) }, + { MP_ROM_QSTR(MP_QSTR_COVER), MP_ROM_PTR(MP_ROM_INT(LV_OPA_COVER)) } +}; + +static MP_DEFINE_CONST_DICT(LV_OPA_locals_dict, LV_OPA_locals_dict_table); + +static void LV_OPA_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_OPA"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_OPA_type_base, + MP_QSTR_LV_OPA, + MP_TYPE_FLAG_NONE, + print, LV_OPA_print, + attr, call_parent_methods, + locals_dict, &LV_OPA_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_OPA_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_OPA_type_base, +}; + + /* * lvgl LV_STYLE object definitions */ @@ -1722,6 +1695,7 @@ static const mp_rom_map_elem_t LV_STYLE_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_GRID_CELL_ROW_POS), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_GRID_CELL_ROW_POS)) }, { MP_ROM_QSTR(MP_QSTR_GRID_CELL_ROW_SPAN), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_GRID_CELL_ROW_SPAN)) }, { MP_ROM_QSTR(MP_QSTR_GRID_CELL_Y_ALIGN), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_GRID_CELL_Y_ALIGN)) }, + { MP_ROM_QSTR(MP_QSTR_TEXT_LEADING_TRIM), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_TEXT_LEADING_TRIM)) }, { MP_ROM_QSTR(MP_QSTR_LAST_BUILT_IN_PROP), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_LAST_BUILT_IN_PROP)) }, { MP_ROM_QSTR(MP_QSTR_NUM_BUILT_IN_PROPS), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_NUM_BUILT_IN_PROPS)) }, { MP_ROM_QSTR(MP_QSTR_PROP_ANY), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_PROP_ANY)) }, @@ -1755,72 +1729,72 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STYLE_type = { /* - * lvgl LV_RESULT object definitions + * lvgl LV_TREE_WALK object definitions */ -static const mp_rom_map_elem_t LV_RESULT_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_INVALID), MP_ROM_PTR(MP_ROM_INT(LV_RESULT_INVALID)) }, - { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_RESULT_OK)) } +static const mp_rom_map_elem_t LV_TREE_WALK_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_PRE_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_PRE_ORDER)) }, + { MP_ROM_QSTR(MP_QSTR_POST_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_POST_ORDER)) } }; -static MP_DEFINE_CONST_DICT(LV_RESULT_locals_dict, LV_RESULT_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_TREE_WALK_locals_dict, LV_TREE_WALK_locals_dict_table); -static void LV_RESULT_print(const mp_print_t *print, +static void LV_TREE_WALK_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_RESULT"); + mp_printf(print, "lvgl LV_TREE_WALK"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_RESULT_type_base, - MP_QSTR_LV_RESULT, + mp_lv_LV_TREE_WALK_type_base, + MP_QSTR_LV_TREE_WALK, MP_TYPE_FLAG_NONE, - print, LV_RESULT_print, + print, LV_TREE_WALK_print, attr, call_parent_methods, - locals_dict, &LV_RESULT_locals_dict + locals_dict, &LV_TREE_WALK_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_RESULT_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TREE_WALK_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_RESULT_type_base, + .mp_obj_type = &mp_lv_LV_TREE_WALK_type_base, }; /* - * lvgl LV_RB_COLOR object definitions + * lvgl LV_RESULT object definitions */ -static const mp_rom_map_elem_t LV_RB_COLOR_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_RED)) }, - { MP_ROM_QSTR(MP_QSTR_BLACK), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_BLACK)) } +static const mp_rom_map_elem_t LV_RESULT_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_INVALID), MP_ROM_PTR(MP_ROM_INT(LV_RESULT_INVALID)) }, + { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_RESULT_OK)) } }; -static MP_DEFINE_CONST_DICT(LV_RB_COLOR_locals_dict, LV_RB_COLOR_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_RESULT_locals_dict, LV_RESULT_locals_dict_table); -static void LV_RB_COLOR_print(const mp_print_t *print, +static void LV_RESULT_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_RB_COLOR"); + mp_printf(print, "lvgl LV_RESULT"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_RB_COLOR_type_base, - MP_QSTR_LV_RB_COLOR, + mp_lv_LV_RESULT_type_base, + MP_QSTR_LV_RESULT, MP_TYPE_FLAG_NONE, - print, LV_RB_COLOR_print, + print, LV_RESULT_print, attr, call_parent_methods, - locals_dict, &LV_RB_COLOR_locals_dict + locals_dict, &LV_RESULT_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_RB_COLOR_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_RESULT_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_RB_COLOR_type_base, + .mp_obj_type = &mp_lv_LV_RESULT_type_base, }; @@ -1920,6 +1894,202 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DIR_type = { }; +/* + * lvgl LV_EVENT object definitions + */ + +static const mp_rom_map_elem_t LV_EVENT_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ALL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ALL)) }, + { MP_ROM_QSTR(MP_QSTR_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSED)) }, + { MP_ROM_QSTR(MP_QSTR_PRESSING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSING)) }, + { MP_ROM_QSTR(MP_QSTR_PRESS_LOST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESS_LOST)) }, + { MP_ROM_QSTR(MP_QSTR_SHORT_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SHORT_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_SINGLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SINGLE_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_DOUBLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DOUBLE_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_TRIPLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_TRIPLE_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED)) }, + { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED_REPEAT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED_REPEAT)) }, + { MP_ROM_QSTR(MP_QSTR_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_RELEASED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RELEASED)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL_THROW_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_THROW_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_END)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_UP), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_UP)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_DOWN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_DOWN)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_LEFT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_LEFT)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_RIGHT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_RIGHT)) }, + { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_KEY)) }, + { MP_ROM_QSTR(MP_QSTR_ROTARY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ROTARY)) }, + { MP_ROM_QSTR(MP_QSTR_FOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FOCUSED)) }, + { MP_ROM_QSTR(MP_QSTR_DEFOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DEFOCUSED)) }, + { MP_ROM_QSTR(MP_QSTR_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LEAVE)) }, + { MP_ROM_QSTR(MP_QSTR_HIT_TEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HIT_TEST)) }, + { MP_ROM_QSTR(MP_QSTR_INDEV_RESET), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INDEV_RESET)) }, + { MP_ROM_QSTR(MP_QSTR_HOVER_OVER), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_OVER)) }, + { MP_ROM_QSTR(MP_QSTR_HOVER_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_LEAVE)) }, + { MP_ROM_QSTR(MP_QSTR_COVER_CHECK), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COVER_CHECK)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_EXT_DRAW_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_EXT_DRAW_SIZE)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_END)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_POST_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_POST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_POST_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_END)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_ADDED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_TASK_ADDED)) }, + { MP_ROM_QSTR(MP_QSTR_VALUE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VALUE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_INSERT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INSERT)) }, + { MP_ROM_QSTR(MP_QSTR_REFRESH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFRESH)) }, + { MP_ROM_QSTR(MP_QSTR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_READY)) }, + { MP_ROM_QSTR(MP_QSTR_CANCEL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CANCEL)) }, + { MP_ROM_QSTR(MP_QSTR_STATE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STATE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_CHECKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHECKED)) }, + { MP_ROM_QSTR(MP_QSTR_UNCHECKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_UNCHECKED)) }, + { MP_ROM_QSTR(MP_QSTR_CREATE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CREATE)) }, + { MP_ROM_QSTR(MP_QSTR_DELETE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DELETE)) }, + { MP_ROM_QSTR(MP_QSTR_CHILD_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_CHILD_CREATED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CREATED)) }, + { MP_ROM_QSTR(MP_QSTR_CHILD_DELETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_DELETED)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOAD_START)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_LOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOAD_START)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_LOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOADED)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOADED)) }, + { MP_ROM_QSTR(MP_QSTR_SIZE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SIZE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_STYLE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STYLE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_LAYOUT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAYOUT_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_GET_SELF_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GET_SELF_SIZE)) }, + { MP_ROM_QSTR(MP_QSTR_INVALIDATE_AREA), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INVALIDATE_AREA)) }, + { MP_ROM_QSTR(MP_QSTR_RESOLUTION_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RESOLUTION_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_COLOR_FORMAT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COLOR_FORMAT_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_REQUEST)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_START)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_READY)) }, + { MP_ROM_QSTR(MP_QSTR_RENDER_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_START)) }, + { MP_ROM_QSTR(MP_QSTR_RENDER_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_READY)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_START)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_START)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_START)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_WAIT_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_WAIT_START)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_WAIT_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_WAIT_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_LAYOUT_COMPLETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_UPDATE_LAYOUT_COMPLETED)) }, + { MP_ROM_QSTR(MP_QSTR_VSYNC), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC)) }, + { MP_ROM_QSTR(MP_QSTR_VSYNC_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC_REQUEST)) }, + { MP_ROM_QSTR(MP_QSTR_LAST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAST)) }, + { MP_ROM_QSTR(MP_QSTR_LAST_CUSTOM), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAST_CUSTOM)) }, + { MP_ROM_QSTR(MP_QSTR_PREPROCESS), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PREPROCESS)) }, + { MP_ROM_QSTR(MP_QSTR_MARKED_DELETING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_MARKED_DELETING)) } +}; + +static MP_DEFINE_CONST_DICT(LV_EVENT_locals_dict, LV_EVENT_locals_dict_table); + +static void LV_EVENT_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_EVENT"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_EVENT_type_base, + MP_QSTR_LV_EVENT, + MP_TYPE_FLAG_NONE, + print, LV_EVENT_print, + attr, call_parent_methods, + locals_dict, &LV_EVENT_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_EVENT_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_EVENT_type_base, +}; + + +/* + * lvgl LV_KEY object definitions + */ + +static const mp_rom_map_elem_t LV_KEY_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_UP), MP_ROM_PTR(MP_ROM_INT(LV_KEY_UP)) }, + { MP_ROM_QSTR(MP_QSTR_DOWN), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DOWN)) }, + { MP_ROM_QSTR(MP_QSTR_RIGHT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_RIGHT)) }, + { MP_ROM_QSTR(MP_QSTR_LEFT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_LEFT)) }, + { MP_ROM_QSTR(MP_QSTR_ESC), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ESC)) }, + { MP_ROM_QSTR(MP_QSTR_DEL), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DEL)) }, + { MP_ROM_QSTR(MP_QSTR_BACKSPACE), MP_ROM_PTR(MP_ROM_INT(LV_KEY_BACKSPACE)) }, + { MP_ROM_QSTR(MP_QSTR_ENTER), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ENTER)) }, + { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_NEXT)) }, + { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_KEY_PREV)) }, + { MP_ROM_QSTR(MP_QSTR_HOME), MP_ROM_PTR(MP_ROM_INT(LV_KEY_HOME)) }, + { MP_ROM_QSTR(MP_QSTR_END), MP_ROM_PTR(MP_ROM_INT(LV_KEY_END)) } +}; + +static MP_DEFINE_CONST_DICT(LV_KEY_locals_dict, LV_KEY_locals_dict_table); + +static void LV_KEY_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_KEY"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_KEY_type_base, + MP_QSTR_LV_KEY, + MP_TYPE_FLAG_NONE, + print, LV_KEY_print, + attr, call_parent_methods, + locals_dict, &LV_KEY_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_KEY_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_KEY_type_base, +}; + + +/* + * lvgl LV_GROUP_REFOCUS_POLICY object definitions + */ + +static const mp_rom_map_elem_t LV_GROUP_REFOCUS_POLICY_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_NEXT)) }, + { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_PREV)) } +}; + +static MP_DEFINE_CONST_DICT(LV_GROUP_REFOCUS_POLICY_locals_dict, LV_GROUP_REFOCUS_POLICY_locals_dict_table); + +static void LV_GROUP_REFOCUS_POLICY_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_GROUP_REFOCUS_POLICY"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, + MP_QSTR_LV_GROUP_REFOCUS_POLICY, + MP_TYPE_FLAG_NONE, + print, LV_GROUP_REFOCUS_POLICY_print, + attr, call_parent_methods, + locals_dict, &LV_GROUP_REFOCUS_POLICY_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_GROUP_REFOCUS_POLICY_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, +}; + + /* * lvgl LV_COLOR_FORMAT object definitions */ @@ -1967,9 +2137,7 @@ static const mp_rom_map_elem_t LV_COLOR_FORMAT_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEMA_TSC6AP), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC6AP)) }, { MP_ROM_QSTR(MP_QSTR_NEMA_TSC12), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC12)) }, { MP_ROM_QSTR(MP_QSTR_NEMA_TSC12A), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC12A)) }, - { MP_ROM_QSTR(MP_QSTR_NEMA_TSC_END), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC_END)) }, - { MP_ROM_QSTR(MP_QSTR_NATIVE), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NATIVE)) }, - { MP_ROM_QSTR(MP_QSTR_NATIVE_WITH_ALPHA), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NATIVE_WITH_ALPHA)) } + { MP_ROM_QSTR(MP_QSTR_NEMA_TSC_END), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC_END)) } }; static MP_DEFINE_CONST_DICT(LV_COLOR_FORMAT_locals_dict, LV_COLOR_FORMAT_locals_dict_table); @@ -2324,6 +2492,44 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TEXT_ALIGN_type = { }; +/* + * lvgl LV_TEXT_LEADING_TRIM object definitions + */ + +static const mp_rom_map_elem_t LV_TEXT_LEADING_TRIM_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_NONE)) }, + { MP_ROM_QSTR(MP_QSTR_CAPITAL_BASELINE), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_CAPITAL_BASELINE)) }, + { MP_ROM_QSTR(MP_QSTR_LOWER_BASELINE), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_LOWER_BASELINE)) }, + { MP_ROM_QSTR(MP_QSTR_CAPITAL), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_CAPITAL)) }, + { MP_ROM_QSTR(MP_QSTR_LOWER), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_LOWER)) } +}; + +static MP_DEFINE_CONST_DICT(LV_TEXT_LEADING_TRIM_locals_dict, LV_TEXT_LEADING_TRIM_locals_dict_table); + +static void LV_TEXT_LEADING_TRIM_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_TEXT_LEADING_TRIM"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_TEXT_LEADING_TRIM_type_base, + MP_QSTR_LV_TEXT_LEADING_TRIM, + MP_TYPE_FLAG_NONE, + print, LV_TEXT_LEADING_TRIM_print, + attr, call_parent_methods, + locals_dict, &LV_TEXT_LEADING_TRIM_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TEXT_LEADING_TRIM_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_TEXT_LEADING_TRIM_type_base, +}; + + /* * lvgl LV_BASE_DIR object definitions */ @@ -2779,111 +2985,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STYLE_RES_type = { }; -/* - * lvgl LV_EVENT object definitions - */ - -static const mp_rom_map_elem_t LV_EVENT_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ALL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ALL)) }, - { MP_ROM_QSTR(MP_QSTR_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSED)) }, - { MP_ROM_QSTR(MP_QSTR_PRESSING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSING)) }, - { MP_ROM_QSTR(MP_QSTR_PRESS_LOST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESS_LOST)) }, - { MP_ROM_QSTR(MP_QSTR_SHORT_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SHORT_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_SINGLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SINGLE_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_DOUBLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DOUBLE_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_TRIPLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_TRIPLE_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED)) }, - { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED_REPEAT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED_REPEAT)) }, - { MP_ROM_QSTR(MP_QSTR_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_RELEASED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RELEASED)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL_THROW_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_THROW_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_END)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL)) }, - { MP_ROM_QSTR(MP_QSTR_GESTURE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE)) }, - { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_KEY)) }, - { MP_ROM_QSTR(MP_QSTR_ROTARY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ROTARY)) }, - { MP_ROM_QSTR(MP_QSTR_FOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FOCUSED)) }, - { MP_ROM_QSTR(MP_QSTR_DEFOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DEFOCUSED)) }, - { MP_ROM_QSTR(MP_QSTR_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LEAVE)) }, - { MP_ROM_QSTR(MP_QSTR_HIT_TEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HIT_TEST)) }, - { MP_ROM_QSTR(MP_QSTR_INDEV_RESET), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INDEV_RESET)) }, - { MP_ROM_QSTR(MP_QSTR_HOVER_OVER), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_OVER)) }, - { MP_ROM_QSTR(MP_QSTR_HOVER_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_LEAVE)) }, - { MP_ROM_QSTR(MP_QSTR_COVER_CHECK), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COVER_CHECK)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_EXT_DRAW_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_EXT_DRAW_SIZE)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_END)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_POST_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_POST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_POST_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_END)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_ADDED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_TASK_ADDED)) }, - { MP_ROM_QSTR(MP_QSTR_VALUE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VALUE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_INSERT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INSERT)) }, - { MP_ROM_QSTR(MP_QSTR_REFRESH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFRESH)) }, - { MP_ROM_QSTR(MP_QSTR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_READY)) }, - { MP_ROM_QSTR(MP_QSTR_CANCEL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CANCEL)) }, - { MP_ROM_QSTR(MP_QSTR_STATE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STATE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_CREATE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CREATE)) }, - { MP_ROM_QSTR(MP_QSTR_DELETE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DELETE)) }, - { MP_ROM_QSTR(MP_QSTR_CHILD_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_CHILD_CREATED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CREATED)) }, - { MP_ROM_QSTR(MP_QSTR_CHILD_DELETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_DELETED)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOAD_START)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_LOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOAD_START)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_LOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOADED)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOADED)) }, - { MP_ROM_QSTR(MP_QSTR_SIZE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SIZE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_STYLE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STYLE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_LAYOUT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAYOUT_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_GET_SELF_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GET_SELF_SIZE)) }, - { MP_ROM_QSTR(MP_QSTR_INVALIDATE_AREA), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INVALIDATE_AREA)) }, - { MP_ROM_QSTR(MP_QSTR_RESOLUTION_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RESOLUTION_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_COLOR_FORMAT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COLOR_FORMAT_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_REQUEST)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_START)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_READY)) }, - { MP_ROM_QSTR(MP_QSTR_RENDER_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_START)) }, - { MP_ROM_QSTR(MP_QSTR_RENDER_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_READY)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_START)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_FINISH)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_START)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_FINISH)) }, - { MP_ROM_QSTR(MP_QSTR_UPDATE_LAYOUT_COMPLETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_UPDATE_LAYOUT_COMPLETED)) }, - { MP_ROM_QSTR(MP_QSTR_VSYNC), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC)) }, - { MP_ROM_QSTR(MP_QSTR_VSYNC_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC_REQUEST)) }, - { MP_ROM_QSTR(MP_QSTR_LAST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAST)) }, - { MP_ROM_QSTR(MP_QSTR_PREPROCESS), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PREPROCESS)) }, - { MP_ROM_QSTR(MP_QSTR_MARKED_DELETING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_MARKED_DELETING)) } -}; - -static MP_DEFINE_CONST_DICT(LV_EVENT_locals_dict, LV_EVENT_locals_dict_table); - -static void LV_EVENT_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_EVENT"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_EVENT_type_base, - MP_QSTR_LV_EVENT, - MP_TYPE_FLAG_NONE, - print, LV_EVENT_print, - attr, call_parent_methods, - locals_dict, &LV_EVENT_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_EVENT_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_EVENT_type_base, -}; - - /* * lvgl LV_DISPLAY_ROTATION object definitions */ @@ -3280,6 +3381,92 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STYLE_STATE_CMP_type = { }; +/* + * lvgl LV_DRAW_TASK_TYPE object definitions + */ + +static const mp_rom_map_elem_t LV_DRAW_TASK_TYPE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_NONE)) }, + { MP_ROM_QSTR(MP_QSTR_FILL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_FILL)) }, + { MP_ROM_QSTR(MP_QSTR_BORDER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BORDER)) }, + { MP_ROM_QSTR(MP_QSTR_BOX_SHADOW), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BOX_SHADOW)) }, + { MP_ROM_QSTR(MP_QSTR_LETTER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LETTER)) }, + { MP_ROM_QSTR(MP_QSTR_LABEL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LABEL)) }, + { MP_ROM_QSTR(MP_QSTR_IMAGE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_IMAGE)) }, + { MP_ROM_QSTR(MP_QSTR_LAYER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LAYER)) }, + { MP_ROM_QSTR(MP_QSTR_LINE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LINE)) }, + { MP_ROM_QSTR(MP_QSTR_ARC), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_ARC)) }, + { MP_ROM_QSTR(MP_QSTR_TRIANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_TRIANGLE)) }, + { MP_ROM_QSTR(MP_QSTR_MASK_RECTANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_RECTANGLE)) }, + { MP_ROM_QSTR(MP_QSTR_MASK_BITMAP), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_BITMAP)) }, + { MP_ROM_QSTR(MP_QSTR_BLUR), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BLUR)) } +}; + +static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_TYPE_locals_dict, LV_DRAW_TASK_TYPE_locals_dict_table); + +static void LV_DRAW_TASK_TYPE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_DRAW_TASK_TYPE"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_DRAW_TASK_TYPE_type_base, + MP_QSTR_LV_DRAW_TASK_TYPE, + MP_TYPE_FLAG_NONE, + print, LV_DRAW_TASK_TYPE_print, + attr, call_parent_methods, + locals_dict, &LV_DRAW_TASK_TYPE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_TYPE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_DRAW_TASK_TYPE_type_base, +}; + + +/* + * lvgl LV_DRAW_TASK_STATE object definitions + */ + +static const mp_rom_map_elem_t LV_DRAW_TASK_STATE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_BLOCKED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_BLOCKED)) }, + { MP_ROM_QSTR(MP_QSTR_WAITING), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_WAITING)) }, + { MP_ROM_QSTR(MP_QSTR_QUEUED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_QUEUED)) }, + { MP_ROM_QSTR(MP_QSTR_IN_PROGRESS), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_IN_PROGRESS)) }, + { MP_ROM_QSTR(MP_QSTR_FINISHED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_FINISHED)) }, + { MP_ROM_QSTR(MP_QSTR_FAILED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_FAILED)) } +}; + +static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_STATE_locals_dict, LV_DRAW_TASK_STATE_locals_dict_table); + +static void LV_DRAW_TASK_STATE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_DRAW_TASK_STATE"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_DRAW_TASK_STATE_type_base, + MP_QSTR_LV_DRAW_TASK_STATE, + MP_TYPE_FLAG_NONE, + print, LV_DRAW_TASK_STATE_print, + attr, call_parent_methods, + locals_dict, &LV_DRAW_TASK_STATE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_STATE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_DRAW_TASK_STATE_type_base, +}; + + /* * lvgl LV_FS_RES object definitions */ @@ -3435,91 +3622,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_IMAGE_SRC_type = { }; -/* - * lvgl LV_DRAW_TASK_TYPE object definitions - */ - -static const mp_rom_map_elem_t LV_DRAW_TASK_TYPE_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_NONE)) }, - { MP_ROM_QSTR(MP_QSTR_FILL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_FILL)) }, - { MP_ROM_QSTR(MP_QSTR_BORDER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BORDER)) }, - { MP_ROM_QSTR(MP_QSTR_BOX_SHADOW), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BOX_SHADOW)) }, - { MP_ROM_QSTR(MP_QSTR_LETTER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LETTER)) }, - { MP_ROM_QSTR(MP_QSTR_LABEL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LABEL)) }, - { MP_ROM_QSTR(MP_QSTR_IMAGE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_IMAGE)) }, - { MP_ROM_QSTR(MP_QSTR_LAYER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LAYER)) }, - { MP_ROM_QSTR(MP_QSTR_LINE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LINE)) }, - { MP_ROM_QSTR(MP_QSTR_ARC), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_ARC)) }, - { MP_ROM_QSTR(MP_QSTR_TRIANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_TRIANGLE)) }, - { MP_ROM_QSTR(MP_QSTR_MASK_RECTANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_RECTANGLE)) }, - { MP_ROM_QSTR(MP_QSTR_MASK_BITMAP), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_BITMAP)) }, - { MP_ROM_QSTR(MP_QSTR_BLUR), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BLUR)) } -}; - -static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_TYPE_locals_dict, LV_DRAW_TASK_TYPE_locals_dict_table); - -static void LV_DRAW_TASK_TYPE_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_DRAW_TASK_TYPE"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_DRAW_TASK_TYPE_type_base, - MP_QSTR_LV_DRAW_TASK_TYPE, - MP_TYPE_FLAG_NONE, - print, LV_DRAW_TASK_TYPE_print, - attr, call_parent_methods, - locals_dict, &LV_DRAW_TASK_TYPE_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_TYPE_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_DRAW_TASK_TYPE_type_base, -}; - - -/* - * lvgl LV_DRAW_TASK_STATE object definitions - */ - -static const mp_rom_map_elem_t LV_DRAW_TASK_STATE_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_BLOCKED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_BLOCKED)) }, - { MP_ROM_QSTR(MP_QSTR_WAITING), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_WAITING)) }, - { MP_ROM_QSTR(MP_QSTR_QUEUED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_QUEUED)) }, - { MP_ROM_QSTR(MP_QSTR_IN_PROGRESS), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_IN_PROGRESS)) }, - { MP_ROM_QSTR(MP_QSTR_FINISHED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_FINISHED)) } -}; - -static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_STATE_locals_dict, LV_DRAW_TASK_STATE_locals_dict_table); - -static void LV_DRAW_TASK_STATE_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_DRAW_TASK_STATE"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_DRAW_TASK_STATE_type_base, - MP_QSTR_LV_DRAW_TASK_STATE, - MP_TYPE_FLAG_NONE, - print, LV_DRAW_TASK_STATE_print, - attr, call_parent_methods, - locals_dict, &LV_DRAW_TASK_STATE_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_STATE_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_DRAW_TASK_STATE_type_base, -}; - - /* * lvgl LV_LAYER_TYPE object definitions */ @@ -3663,86 +3765,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_OBJ_CLASS_THEME_INHERITABLE }; -/* - * lvgl LV_KEY object definitions - */ - -static const mp_rom_map_elem_t LV_KEY_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_UP), MP_ROM_PTR(MP_ROM_INT(LV_KEY_UP)) }, - { MP_ROM_QSTR(MP_QSTR_DOWN), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DOWN)) }, - { MP_ROM_QSTR(MP_QSTR_RIGHT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_RIGHT)) }, - { MP_ROM_QSTR(MP_QSTR_LEFT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_LEFT)) }, - { MP_ROM_QSTR(MP_QSTR_ESC), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ESC)) }, - { MP_ROM_QSTR(MP_QSTR_DEL), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DEL)) }, - { MP_ROM_QSTR(MP_QSTR_BACKSPACE), MP_ROM_PTR(MP_ROM_INT(LV_KEY_BACKSPACE)) }, - { MP_ROM_QSTR(MP_QSTR_ENTER), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ENTER)) }, - { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_NEXT)) }, - { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_KEY_PREV)) }, - { MP_ROM_QSTR(MP_QSTR_HOME), MP_ROM_PTR(MP_ROM_INT(LV_KEY_HOME)) }, - { MP_ROM_QSTR(MP_QSTR_END), MP_ROM_PTR(MP_ROM_INT(LV_KEY_END)) } -}; - -static MP_DEFINE_CONST_DICT(LV_KEY_locals_dict, LV_KEY_locals_dict_table); - -static void LV_KEY_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_KEY"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_KEY_type_base, - MP_QSTR_LV_KEY, - MP_TYPE_FLAG_NONE, - print, LV_KEY_print, - attr, call_parent_methods, - locals_dict, &LV_KEY_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_KEY_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_KEY_type_base, -}; - - -/* - * lvgl LV_GROUP_REFOCUS_POLICY object definitions - */ - -static const mp_rom_map_elem_t LV_GROUP_REFOCUS_POLICY_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_NEXT)) }, - { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_PREV)) } -}; - -static MP_DEFINE_CONST_DICT(LV_GROUP_REFOCUS_POLICY_locals_dict, LV_GROUP_REFOCUS_POLICY_locals_dict_table); - -static void LV_GROUP_REFOCUS_POLICY_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_GROUP_REFOCUS_POLICY"); -} - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, - MP_QSTR_LV_GROUP_REFOCUS_POLICY, - MP_TYPE_FLAG_NONE, - print, LV_GROUP_REFOCUS_POLICY_print, - attr, call_parent_methods, - locals_dict, &LV_GROUP_REFOCUS_POLICY_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_GROUP_REFOCUS_POLICY_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, -}; - - /* * lvgl LV_INDEV_TYPE object definitions */ @@ -4164,6 +4186,7 @@ static const mp_rom_map_elem_t LV_IMAGE_ALIGN_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_STRETCH), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_STRETCH)) }, { MP_ROM_QSTR(MP_QSTR_TILE), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_TILE)) }, { MP_ROM_QSTR(MP_QSTR_CONTAIN), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_CONTAIN)) }, + { MP_ROM_QSTR(MP_QSTR_CONTAIN_DOWNSCALE), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_CONTAIN_DOWNSCALE)) }, { MP_ROM_QSTR(MP_QSTR_COVER), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_COVER)) } }; @@ -4481,6 +4504,76 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BAR_ORIENTATION_type = { }; +/* + * lvgl LV_BARCODE_ENCODING_CODE128 object definitions + */ + +static const mp_rom_map_elem_t LV_BARCODE_ENCODING_CODE128_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_GS1), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_GS1)) }, + { MP_ROM_QSTR(MP_QSTR_RAW), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_RAW)) } +}; + +static MP_DEFINE_CONST_DICT(LV_BARCODE_ENCODING_CODE128_locals_dict, LV_BARCODE_ENCODING_CODE128_locals_dict_table); + +static void LV_BARCODE_ENCODING_CODE128_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_BARCODE_ENCODING_CODE128"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, + MP_QSTR_LV_BARCODE_ENCODING_CODE128, + MP_TYPE_FLAG_NONE, + print, LV_BARCODE_ENCODING_CODE128_print, + attr, call_parent_methods, + locals_dict, &LV_BARCODE_ENCODING_CODE128_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BARCODE_ENCODING_CODE128_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, +}; + + +/* + * lvgl LV_BARCODE_UPDATE_MODE object definitions + */ + +static const mp_rom_map_elem_t LV_BARCODE_UPDATE_MODE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IMMEDIATE), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_UPDATE_MODE_IMMEDIATE)) }, + { MP_ROM_QSTR(MP_QSTR_DEFERRED), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_UPDATE_MODE_DEFERRED)) } +}; + +static MP_DEFINE_CONST_DICT(LV_BARCODE_UPDATE_MODE_locals_dict, LV_BARCODE_UPDATE_MODE_locals_dict_table); + +static void LV_BARCODE_UPDATE_MODE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_BARCODE_UPDATE_MODE"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_BARCODE_UPDATE_MODE_type_base, + MP_QSTR_LV_BARCODE_UPDATE_MODE, + MP_TYPE_FLAG_NONE, + print, LV_BARCODE_UPDATE_MODE_print, + attr, call_parent_methods, + locals_dict, &LV_BARCODE_UPDATE_MODE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BARCODE_UPDATE_MODE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_BARCODE_UPDATE_MODE_type_base, +}; + + /* * lvgl LV_BUTTONMATRIX_CTRL object definitions */ @@ -4806,6 +4899,41 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_MENU_ROOT_BACK_BUTTON_type }; +/* + * lvgl LV_QRCODE_UPDATE_MODE object definitions + */ + +static const mp_rom_map_elem_t LV_QRCODE_UPDATE_MODE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IMMEDIATE), MP_ROM_PTR(MP_ROM_INT(LV_QRCODE_UPDATE_MODE_IMMEDIATE)) }, + { MP_ROM_QSTR(MP_QSTR_DEFERRED), MP_ROM_PTR(MP_ROM_INT(LV_QRCODE_UPDATE_MODE_DEFERRED)) } +}; + +static MP_DEFINE_CONST_DICT(LV_QRCODE_UPDATE_MODE_locals_dict, LV_QRCODE_UPDATE_MODE_locals_dict_table); + +static void LV_QRCODE_UPDATE_MODE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_QRCODE_UPDATE_MODE"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_QRCODE_UPDATE_MODE_type_base, + MP_QSTR_LV_QRCODE_UPDATE_MODE, + MP_TYPE_FLAG_NONE, + print, LV_QRCODE_UPDATE_MODE_print, + attr, call_parent_methods, + locals_dict, &LV_QRCODE_UPDATE_MODE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_QRCODE_UPDATE_MODE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_QRCODE_UPDATE_MODE_type_base, +}; + + /* * lvgl LV_ROLLER_MODE object definitions */ @@ -5103,37 +5231,77 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TABLE_CELL_CTRL_type = { /* - * lvgl LV_BARCODE_ENCODING_CODE128 object definitions + * lvgl LV_THREAD_PRIO object definitions */ -static const mp_rom_map_elem_t LV_BARCODE_ENCODING_CODE128_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_GS1), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_GS1)) }, - { MP_ROM_QSTR(MP_QSTR_RAW), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_RAW)) } +static const mp_rom_map_elem_t LV_THREAD_PRIO_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_LOWEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOWEST)) }, + { MP_ROM_QSTR(MP_QSTR_LOW), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOW)) }, + { MP_ROM_QSTR(MP_QSTR_MID), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_MID)) }, + { MP_ROM_QSTR(MP_QSTR_HIGH), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGH)) }, + { MP_ROM_QSTR(MP_QSTR_HIGHEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGHEST)) } }; -static MP_DEFINE_CONST_DICT(LV_BARCODE_ENCODING_CODE128_locals_dict, LV_BARCODE_ENCODING_CODE128_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_THREAD_PRIO_locals_dict, LV_THREAD_PRIO_locals_dict_table); -static void LV_BARCODE_ENCODING_CODE128_print(const mp_print_t *print, +static void LV_THREAD_PRIO_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_BARCODE_ENCODING_CODE128"); + mp_printf(print, "lvgl LV_THREAD_PRIO"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, - MP_QSTR_LV_BARCODE_ENCODING_CODE128, + mp_lv_LV_THREAD_PRIO_type_base, + MP_QSTR_LV_THREAD_PRIO, MP_TYPE_FLAG_NONE, - print, LV_BARCODE_ENCODING_CODE128_print, + print, LV_THREAD_PRIO_print, attr, call_parent_methods, - locals_dict, &LV_BARCODE_ENCODING_CODE128_locals_dict + locals_dict, &LV_THREAD_PRIO_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BARCODE_ENCODING_CODE128_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_THREAD_PRIO_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, + .mp_obj_type = &mp_lv_LV_THREAD_PRIO_type_base, +}; + + +/* + * lvgl LV_CACHE_RESERVE_COND object definitions + */ + +static const mp_rom_map_elem_t LV_CACHE_RESERVE_COND_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_OK)) }, + { MP_ROM_QSTR(MP_QSTR_TOO_LARGE), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_TOO_LARGE)) }, + { MP_ROM_QSTR(MP_QSTR_NEED_VICTIM), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_NEED_VICTIM)) }, + { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_ERROR)) } +}; + +static MP_DEFINE_CONST_DICT(LV_CACHE_RESERVE_COND_locals_dict, LV_CACHE_RESERVE_COND_locals_dict_table); + +static void LV_CACHE_RESERVE_COND_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_CACHE_RESERVE_COND"); +} + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_CACHE_RESERVE_COND_type_base, + MP_QSTR_LV_CACHE_RESERVE_COND, + MP_TYPE_FLAG_NONE, + print, LV_CACHE_RESERVE_COND_print, + attr, call_parent_methods, + locals_dict, &LV_CACHE_RESERVE_COND_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_CACHE_RESERVE_COND_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_CACHE_RESERVE_COND_type_base, }; @@ -5250,77 +5418,76 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_SW_MASK_LINE_SIDE_type /* - * lvgl LV_THREAD_PRIO object definitions + * lvgl LV_LRU object definitions */ -static const mp_rom_map_elem_t LV_THREAD_PRIO_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_LOWEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOWEST)) }, - { MP_ROM_QSTR(MP_QSTR_LOW), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOW)) }, - { MP_ROM_QSTR(MP_QSTR_MID), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_MID)) }, - { MP_ROM_QSTR(MP_QSTR_HIGH), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGH)) }, - { MP_ROM_QSTR(MP_QSTR_HIGHEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGHEST)) } +static const mp_rom_map_elem_t LV_LRU_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_LRU_OK)) }, + { MP_ROM_QSTR(MP_QSTR_MISSING_CACHE), MP_ROM_PTR(MP_ROM_INT(LV_LRU_MISSING_CACHE)) }, + { MP_ROM_QSTR(MP_QSTR_MISSING_KEY), MP_ROM_PTR(MP_ROM_INT(LV_LRU_MISSING_KEY)) }, + { MP_ROM_QSTR(MP_QSTR_MISSING_VALUE), MP_ROM_PTR(MP_ROM_INT(LV_LRU_MISSING_VALUE)) }, + { MP_ROM_QSTR(MP_QSTR_LOCK_ERROR), MP_ROM_PTR(MP_ROM_INT(LV_LRU_LOCK_ERROR)) }, + { MP_ROM_QSTR(MP_QSTR_VALUE_TOO_LARGE), MP_ROM_PTR(MP_ROM_INT(LV_LRU_VALUE_TOO_LARGE)) } }; -static MP_DEFINE_CONST_DICT(LV_THREAD_PRIO_locals_dict, LV_THREAD_PRIO_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_LRU_locals_dict, LV_LRU_locals_dict_table); -static void LV_THREAD_PRIO_print(const mp_print_t *print, +static void LV_LRU_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_THREAD_PRIO"); + mp_printf(print, "lvgl LV_LRU"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_THREAD_PRIO_type_base, - MP_QSTR_LV_THREAD_PRIO, + mp_lv_LV_LRU_type_base, + MP_QSTR_LV_LRU, MP_TYPE_FLAG_NONE, - print, LV_THREAD_PRIO_print, + print, LV_LRU_print, attr, call_parent_methods, - locals_dict, &LV_THREAD_PRIO_locals_dict + locals_dict, &LV_LRU_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_THREAD_PRIO_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_LRU_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_THREAD_PRIO_type_base, + .mp_obj_type = &mp_lv_LV_LRU_type_base, }; /* - * lvgl LV_CACHE_RESERVE_COND object definitions + * lvgl LV_RB_COLOR object definitions */ -static const mp_rom_map_elem_t LV_CACHE_RESERVE_COND_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_OK)) }, - { MP_ROM_QSTR(MP_QSTR_TOO_LARGE), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_TOO_LARGE)) }, - { MP_ROM_QSTR(MP_QSTR_NEED_VICTIM), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_NEED_VICTIM)) }, - { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_ERROR)) } +static const mp_rom_map_elem_t LV_RB_COLOR_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_RED)) }, + { MP_ROM_QSTR(MP_QSTR_BLACK), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_BLACK)) } }; -static MP_DEFINE_CONST_DICT(LV_CACHE_RESERVE_COND_locals_dict, LV_CACHE_RESERVE_COND_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_RB_COLOR_locals_dict, LV_RB_COLOR_locals_dict_table); -static void LV_CACHE_RESERVE_COND_print(const mp_print_t *print, +static void LV_RB_COLOR_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_CACHE_RESERVE_COND"); + mp_printf(print, "lvgl LV_RB_COLOR"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_CACHE_RESERVE_COND_type_base, - MP_QSTR_LV_CACHE_RESERVE_COND, + mp_lv_LV_RB_COLOR_type_base, + MP_QSTR_LV_RB_COLOR, MP_TYPE_FLAG_NONE, - print, LV_CACHE_RESERVE_COND_print, + print, LV_RB_COLOR_print, attr, call_parent_methods, - locals_dict, &LV_CACHE_RESERVE_COND_locals_dict + locals_dict, &LV_RB_COLOR_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_CACHE_RESERVE_COND_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_RB_COLOR_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_CACHE_RESERVE_COND_type_base, + .mp_obj_type = &mp_lv_LV_RB_COLOR_type_base, }; @@ -5491,10 +5658,31 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_get_selector_part_m /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) + * inline static void lv_obj_move_foreground(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_move_foreground(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + ((void (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_foreground_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_foreground); + +/* Reusing lv_obj_move_foreground for lv_obj_move_background */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_background_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_background); + + +/* + * lvgl extension definition for: + * inline static int32_t lv_obj_get_style_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_width_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -5504,47 +5692,47 @@ static mp_obj_t mp_lv_obj_get_style_width(size_t mp_n_args, const mp_obj_t *mp_a -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_length */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_length); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y_internal); /* * lvgl extension definition for: - * inline static lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_align_t lv_obj_get_style_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -5554,99 +5742,99 @@ static mp_obj_t mp_lv_obj_get_style_align(size_t mp_n_args, const mp_obj_t *mp_a -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align, lv_obj_get_style_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_internal_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_radial */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_rotation */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_top */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_bottom */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_left */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_right */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_row */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_row); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_column */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_column); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_radial */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_top */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_bottom */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_left */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_right */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right_internal); /* @@ -5733,10 +5921,10 @@ static inline const mp_obj_type_t *get_mp_lv_color_t_type(void) /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_color_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -5746,19 +5934,19 @@ static mp_obj_t mp_lv_obj_get_style_bg_color(size_t mp_n_args, const mp_obj_t *m -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered_internal); /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_bg_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_opa_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -5768,23 +5956,23 @@ static mp_obj_t mp_lv_obj_get_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered_internal); /* * lvgl extension definition for: - * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -5794,23 +5982,23 @@ static mp_obj_t mp_lv_obj_get_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir, lv_obj_get_style_bg_grad_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_main_stop */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_main_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_grad_stop */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_grad_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_main_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_main_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_grad_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_grad_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa_internal); /* @@ -6432,10 +6620,10 @@ static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void) /* * lvgl extension definition for: - * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6445,15 +6633,15 @@ static mp_obj_t mp_lv_obj_get_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad, lv_obj_get_style_bg_grad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad_internal); /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bg_image_src(const lv_obj_t *obj, lv_part_t part) + * inline static const void *lv_obj_get_style_bg_image_src_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_src_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6463,31 +6651,31 @@ static mp_obj_t mp_lv_obj_get_style_bg_image_src(size_t mp_n_args, const mp_obj_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bg_image_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_recolor_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_recolor_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa_internal); /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_bg_image_tiled(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_bg_image_tiled_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_tiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_tiled_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6497,31 +6685,31 @@ static mp_obj_t mp_lv_obj_get_style_bg_image_tiled(size_t mp_n_args, const mp_ob -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_bg_image_tiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_border_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_border_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_border_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_border_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width_internal); /* * lvgl extension definition for: - * inline static lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t *obj, lv_part_t part) + * inline static lv_border_side_t lv_obj_get_style_border_side_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_border_side(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_border_side_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6531,75 +6719,75 @@ static mp_obj_t mp_lv_obj_get_style_border_side(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side, lv_obj_get_style_border_side); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_internal_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_border_post */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_border_post); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_outline_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_outline_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_pad */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_pad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_spread */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_spread); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_shadow_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_shadow_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_recolor_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_recolor_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa_internal); /* @@ -6684,10 +6872,10 @@ static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void) /* * lvgl extension definition for: - * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_image_colorkey(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_image_colorkey_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6697,71 +6885,71 @@ static mp_obj_t mp_lv_obj_get_style_image_colorkey(size_t mp_n_args, const mp_ob -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey, lv_obj_get_style_image_colorkey); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_internal_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_gap */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_gap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_line_rounded */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_line_rounded); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_line_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_line_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_arc_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_arc_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_arc_rounded */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_arc_rounded); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_arc_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_arc_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa_internal); -/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_arc_image_src */ +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_arc_image_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa_internal); #define funcptr_get_glyph_dsc NULL @@ -6846,290 +7034,318 @@ static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void) return &mp_lv_font_glyph_dsc_gid_t_type; } -#define funcptr_lv_cache_alloc_cb_t NULL - /* - * lvgl extension definition for: - * void *lv_cache_alloc_cb_t(void) + * Struct lv_font_glyph_dsc_t */ -static mp_obj_t mp_funcptr_lv_cache_alloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) { - - void * _res = ((void *(*)(void))lv_func_ptr)(); - return ptr_to_mp((void*)_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); + return (lv_font_glyph_dsc_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_alloc_cb_t_mpobj, 0, mp_funcptr_lv_cache_alloc_cb_t, funcptr_lv_cache_alloc_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_alloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_alloc_cb_callback' - * lv_cache_alloc_cb_t alloc_cb - */ - -#define funcptr_lv_cache_init_cb_t NULL - - -/* - * lvgl extension definition for: - * bool lv_cache_init_cb_t(lv_cache_t *cache) - */ +#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) -static mp_obj_t mp_funcptr_lv_cache_init_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) { - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - bool _res = ((bool (*)(lv_cache_t *))lv_func_ptr)(cache); - return convert_to_bool(_res); + return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_init_cb_t_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, funcptr_lv_cache_init_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_init_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - +#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) +#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_init_cb_callback' - * lv_cache_init_cb_t init_cb - */ - -#define funcptr_lv_cache_destroy_cb_t NULL +static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; + case MP_QSTR_entry: dest[0] = ptr_to_mp((void*)data->entry); break; // converting from void *; + case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; + case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; + case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; + case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; + case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; + case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; + case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_entry: data->entry = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_funcptr_lv_cache_destroy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - ((void (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); - return mp_const_none; + mp_printf(print, "struct lv_font_glyph_dsc_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_destroy_cb_t_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, funcptr_lv_cache_destroy_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_destroy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_font_glyph_dsc_t_type, + MP_QSTR_lv_font_glyph_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_font_glyph_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_font_glyph_dsc_t_attr, + locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_destroy_cb_callback' - * lv_cache_destroy_cb_t destroy_cb - */ +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) +{ + return &mp_lv_font_glyph_dsc_t_type; +} -#define funcptr_lv_cache_get_cb_t NULL - /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static mp_obj_t mp_funcptr_lv_cache_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); - return ptr_to_mp((void*)_res); + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(font, dsc_out, letter, letter_next); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_cb_t_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, funcptr_lv_cache_get_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } +static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); +#define funcptr_get_glyph_bitmap NULL -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_cb_callback' - * lv_cache_get_cb_t get_cb - */ - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_add_cb_callback' - * lv_cache_add_cb_t add_cb + * Struct lv_image_header_t */ - -#define funcptr_lv_cache_remove_cb_t NULL +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); -/* - * lvgl extension definition for: - * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) - */ - -static mp_obj_t mp_funcptr_lv_cache_remove_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) { - void *user_data = mp_to_ptr(mp_args[2]); - lv_cache_entry_t *entry = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_entry_t *, void *))lv_func_ptr)(cache, entry, user_data); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); + return (lv_image_header_t*)self->data; } - +#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_remove_cb_t_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, funcptr_lv_cache_remove_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_remove_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); +} +#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) +#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_remove_cb_callback' - * lv_cache_remove_cb_t remove_cb - */ - -#define funcptr_lv_cache_drop_cb_t NULL +static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; + case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; + case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; + case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; + case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_funcptr_lv_cache_drop_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_image_header_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - void *user_data = mp_to_ptr(mp_args[2]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - ((void (*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); - return mp_const_none; + mp_printf(print, "struct lv_image_header_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_drop_cb_t_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, funcptr_lv_cache_drop_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_drop_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - +static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_cb_callback' - * lv_cache_drop_cb_t drop_cb - */ - +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_image_header_t_type, + MP_QSTR_lv_image_header_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_image_header_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_image_header_t_attr, + locals_dict, &mp_lv_image_header_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_all_cb_callback' - * lv_cache_drop_all_cb_t drop_all_cb - */ +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) +{ + return &mp_lv_image_header_t_type; +} -#define funcptr_lv_cache_get_victim_cb NULL +#define funcptr_lv_draw_buf_malloc_cb_t NULL /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) + * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) */ -static mp_obj_t mp_funcptr_lv_cache_get_victim_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + size_t size = (size_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_victim_cb_mpobj, 2, mp_funcptr_lv_cache_get_victim_cb, funcptr_lv_cache_get_victim_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_victim_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_victim_cb_callback' - * lv_cache_get_victim_cb get_victim_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' + * lv_draw_buf_malloc_cb_t buf_malloc_cb */ -#define funcptr_lv_cache_reserve_cond_cb NULL +#define funcptr_lv_draw_buf_free_cb_t NULL /* * lvgl extension definition for: - * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) + * void lv_draw_buf_free_cb_t(void *draw_buf) */ -static mp_obj_t mp_funcptr_lv_cache_reserve_cond_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - size_t size = (size_t)mp_obj_get_int(mp_args[2]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_cache_reserve_cond_res_t _res = ((lv_cache_reserve_cond_res_t (*)(lv_cache_t *, const void *, size_t, void *))lv_func_ptr)(cache, key, size, user_data); - return mp_obj_new_int(_res); + void *draw_buf = mp_to_ptr(mp_args[0]); + ((void (*)(void *))lv_func_ptr)(draw_buf); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_reserve_cond_cb_mpobj, 4, mp_funcptr_lv_cache_reserve_cond_cb, funcptr_lv_cache_reserve_cond_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_reserve_cond_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_reserve_cond_cb_callback' - * lv_cache_reserve_cond_cb reserve_cond_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' + * lv_draw_buf_free_cb_t buf_free_cb */ -#define funcptr_lv_cache_iter_create_cb NULL +#define funcptr_lv_draw_buf_copy_cb_t NULL /* - * Struct lv_iter_t + * Struct lv_area_t */ -static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_iter_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_iter_t_type())); - return (lv_iter_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); + return (lv_area_t*)self->data; } -#define mp_write_lv_iter_t(struct_obj) *((lv_iter_t*)mp_write_ptr_lv_iter_t(struct_obj)) +#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_iter_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) { - return lv_to_mp_struct(get_mp_lv_iter_t_type(), field); + return lv_to_mp_struct(get_mp_lv_area_t_type(), field); } -#define mp_read_lv_iter_t(field) mp_read_ptr_lv_iter_t(copy_buffer(&field, sizeof(lv_iter_t))) -#define mp_read_byref_lv_iter_t(field) mp_read_ptr_lv_iter_t(&field) +#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) +#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) -static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_iter_t *data = (lv_iter_t*)self->data; + GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; + case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; + case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; + case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7138,7 +7354,10 @@ static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - ; + case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -7147,280 +7366,296 @@ static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_iter_t_print(const mp_print_t *print, +static void mp_lv_area_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_iter_t"); + mp_printf(print, "struct lv_area_t"); } -static const mp_obj_dict_t mp_lv_iter_t_locals_dict; +static const mp_obj_dict_t mp_lv_area_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_iter_t_type, - MP_QSTR_lv_iter_t, + mp_lv_area_t_type, + MP_QSTR_lv_area_t, MP_TYPE_FLAG_NONE, - print, mp_lv_iter_t_print, + print, mp_lv_area_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_iter_t_attr, - locals_dict, &mp_lv_iter_t_locals_dict, + attr, mp_lv_area_t_attr, + locals_dict, &mp_lv_area_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) { - return &mp_lv_iter_t_type; + return &mp_lv_area_t_type; } /* * lvgl extension definition for: - * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) + * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) */ -static mp_obj_t mp_funcptr_lv_cache_iter_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_iter_t * _res = ((lv_iter_t *(*)(lv_cache_t *))lv_func_ptr)(cache); - return mp_read_ptr_lv_iter_t((void*)_res); + lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_iter_create_cb_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, funcptr_lv_cache_iter_create_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_iter_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_iter_create_cb_callback' - * lv_cache_iter_create_cb iter_create_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' + * lv_draw_buf_copy_cb_t buf_copy_cb */ +#define funcptr_lv_draw_buf_align_cb_t NULL + /* - * Struct lv_cache_class_t + * lvgl extension definition for: + * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) */ -static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_class_t(mp_obj_t self_in) +static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_class_t_type())); - return (lv_cache_class_t*)self->data; + void *buf = mp_to_ptr(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); + return ptr_to_mp((void*)_res); } -#define mp_write_lv_cache_class_t(struct_obj) *((lv_cache_class_t*)mp_write_ptr_lv_cache_class_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_class_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_cache_class_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -#define mp_read_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(copy_buffer(&field, sizeof(lv_cache_class_t))) -#define mp_read_byref_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(&field) -static void mp_lv_cache_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_class_t *data = (lv_cache_class_t*)self->data; +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' + * lv_draw_buf_align_cb_t align_pointer_cb + */ + +#define funcptr_lv_draw_buf_cache_operation_cb_t NULL - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_alloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, data->alloc_cb, NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL); break; // converting from callback lv_cache_alloc_cb_t; - case MP_QSTR_init_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, data->init_cb, NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL); break; // converting from callback lv_cache_init_cb_t; - case MP_QSTR_destroy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->destroy_cb, NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL); break; // converting from callback lv_cache_destroy_cb_t; - case MP_QSTR_get_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->get_cb, NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL); break; // converting from callback lv_cache_get_cb_t; - case MP_QSTR_add_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->add_cb, NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL); break; // converting from callback lv_cache_add_cb_t; - case MP_QSTR_remove_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, data->remove_cb, NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL); break; // converting from callback lv_cache_remove_cb_t; - case MP_QSTR_drop_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, data->drop_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL); break; // converting from callback lv_cache_drop_cb_t; - case MP_QSTR_drop_all_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->drop_all_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL); break; // converting from callback lv_cache_drop_all_cb_t; - case MP_QSTR_get_victim_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, data->get_victim_cb, NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL); break; // converting from callback lv_cache_get_victim_cb; - case MP_QSTR_reserve_cond_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, data->reserve_cond_cb, NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL); break; // converting from callback lv_cache_reserve_cond_cb; - case MP_QSTR_iter_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, data->iter_create_cb, NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL); break; // converting from callback lv_cache_iter_create_cb; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_alloc_cb: data->alloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_alloc_cb_t; - case MP_QSTR_init_cb: data->init_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_init_cb_t; - case MP_QSTR_destroy_cb: data->destroy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_destroy_cb_t; - case MP_QSTR_get_cb: data->get_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_cb_t; - case MP_QSTR_add_cb: data->add_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_add_cb_t; - case MP_QSTR_remove_cb: data->remove_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_remove_cb_t; - case MP_QSTR_drop_cb: data->drop_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_cb_t; - case MP_QSTR_drop_all_cb: data->drop_all_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_all_cb_t; - case MP_QSTR_get_victim_cb: data->get_victim_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_victim_cb; - case MP_QSTR_reserve_cond_cb: data->reserve_cond_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_reserve_cond_cb; - case MP_QSTR_iter_create_cb: data->iter_create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_iter_create_cb; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + */ -static void mp_lv_cache_class_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_cache_class_t"); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_cache_class_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_class_t_type, - MP_QSTR_lv_cache_class_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_cache_class_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_cache_class_t_attr, - locals_dict, &mp_lv_cache_class_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void) + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ + +#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL + + +/* + * lvgl extension definition for: + * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) + */ + +static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_cache_class_t_type; + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); + return mp_obj_new_int_from_uint(_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); -#define funcptr_lv_cache_compare_cb_t NULL +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ + +#define funcptr_lv_draw_buf_clear_cb_t NULL + +#define funcptr_dispatch_cb NULL /* * lvgl extension definition for: - * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) */ -static mp_obj_t mp_funcptr_lv_cache_compare_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *a = (const void *)mp_to_ptr(mp_args[0]); - const void *b = (const void *)mp_to_ptr(mp_args[1]); - lv_cache_compare_res_t _res = ((lv_cache_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_layer_t *layer = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_compare_cb_t_mpobj, 2, mp_funcptr_lv_cache_compare_cb_t, funcptr_lv_cache_compare_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_compare_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_compare_cb_callback' - * lv_cache_compare_cb_t compare_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' + * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) */ -#define funcptr_lv_cache_create_cb_t NULL +#define funcptr_evaluate_cb NULL /* * lvgl extension definition for: - * bool lv_cache_create_cb_t(void *node, void *user_data) + * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) */ -static mp_obj_t mp_funcptr_lv_cache_create_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - void *node = mp_to_ptr(mp_args[0]); - bool _res = ((bool (*)(void *, void *))lv_func_ptr)(node, user_data); - return convert_to_bool(_res); + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_draw_task_t *task = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_create_cb_t_mpobj, 2, mp_funcptr_lv_cache_create_cb_t, funcptr_lv_cache_create_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_create_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_create_cb_callback' - * lv_cache_create_cb_t create_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' + * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) */ -#define funcptr_lv_cache_free_cb_t NULL +#define funcptr_wait_for_finish_cb NULL /* * lvgl extension definition for: - * void lv_cache_free_cb_t(void *node, void *user_data) + * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) */ -static mp_obj_t mp_funcptr_lv_cache_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - void *node = mp_to_ptr(mp_args[0]); - ((void (*)(void *, void *))lv_func_ptr)(node, user_data); - return mp_const_none; + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_free_cb_t_mpobj, 2, mp_funcptr_lv_cache_free_cb_t, funcptr_lv_cache_free_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_free_cb_callback' - * lv_cache_free_cb_t free_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' + * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) */ /* - * Struct lv_cache_ops_t + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' + * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) */ + +#define funcptr_event_cb NULL -static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_ops_t(mp_obj_t self_in) +/* + * Struct lv_event_t + */ + +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_ops_t_type())); - return (lv_cache_ops_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); + return (lv_event_t*)self->data; } -#define mp_write_lv_cache_ops_t(struct_obj) *((lv_cache_ops_t*)mp_write_ptr_lv_cache_ops_t(struct_obj)) +#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_ops_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_ops_t_type(), field); + return lv_to_mp_struct(get_mp_lv_event_t_type(), field); } -#define mp_read_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(copy_buffer(&field, sizeof(lv_cache_ops_t))) -#define mp_read_byref_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(&field) +#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) +#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) -static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_ops_t *data = (lv_cache_ops_t*)self->data; + GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_compare_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, data->compare_cb, NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL); break; // converting from callback lv_cache_compare_cb_t; - case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, data->create_cb, NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL); break; // converting from callback lv_cache_create_cb_t; - case MP_QSTR_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, data->free_cb, NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL); break; // converting from callback lv_cache_free_cb_t; + case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; + case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; + case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; + case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; + case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; + case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; + case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; + case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7429,9 +7664,16 @@ static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_compare_cb: data->compare_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_compare_cb_t; - case MP_QSTR_create_cb: data->create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_create_cb_t; - case MP_QSTR_free_cb: data->free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_free_cb_t; + case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; + case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -7440,73 +7682,100 @@ static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_cache_ops_t_print(const mp_print_t *print, +static void mp_lv_event_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_ops_t"); + mp_printf(print, "struct lv_event_t"); } -static const mp_obj_dict_t mp_lv_cache_ops_t_locals_dict; +static const mp_obj_dict_t mp_lv_event_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_ops_t_type, - MP_QSTR_lv_cache_ops_t, + mp_lv_event_t_type, + MP_QSTR_lv_event_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_ops_t_print, + print, mp_lv_event_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_ops_t_attr, - locals_dict, &mp_lv_cache_ops_t_locals_dict, + attr, mp_lv_event_t_attr, + locals_dict, &mp_lv_event_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) { - return &mp_lv_cache_ops_t_type; + return &mp_lv_event_t_type; } /* - * Struct lv_cache_t + * lvgl extension definition for: + * void event_cb(lv_event_t *event) */ -static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void); +static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); + ((void (*)(lv_event_t *))lv_func_ptr)(event); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' + * void (*event_cb)(lv_event_t *event) + */ + + +/* + * Struct lv_draw_unit_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_t_type())); - return (lv_cache_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); + return (lv_draw_unit_t*)self->data; } -#define mp_write_lv_cache_t(struct_obj) *((lv_cache_t*)mp_write_ptr_lv_cache_t(struct_obj)) +#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); } -#define mp_read_lv_cache_t(field) mp_read_ptr_lv_cache_t(copy_buffer(&field, sizeof(lv_cache_t))) -#define mp_read_byref_lv_cache_t(field) mp_read_ptr_lv_cache_t(&field) +#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) +#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) -static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_t *data = (lv_cache_t*)self->data; + GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_clz: dest[0] = mp_read_ptr_lv_cache_class_t((void*)data->clz); break; // converting from lv_cache_class_t *; - case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; - case MP_QSTR_max_size: dest[0] = mp_obj_new_int_from_uint(data->max_size); break; // converting from uint32_t; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; - case MP_QSTR_ops: dest[0] = mp_read_byref_lv_cache_ops_t(data->ops); break; // converting from lv_cache_ops_t; - case MP_QSTR_lock: dest[0] = mp_obj_new_int(data->lock); break; // converting from lv_mutex_t; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; + case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7515,13 +7784,14 @@ static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_clz: data->clz = (void*)mp_write_ptr_lv_cache_class_t(dest[1]); break; // converting to lv_cache_class_t *; - case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_max_size: data->max_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_ops: data->ops = mp_write_lv_cache_ops_t(dest[1]); break; // converting to lv_cache_ops_t; - case MP_QSTR_lock: data->lock = (int)mp_obj_get_int(dest[1]); break; // converting to lv_mutex_t; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); default: return; } @@ -7530,70 +7800,78 @@ static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_cache_t_print(const mp_print_t *print, +static void mp_lv_draw_unit_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_t"); + mp_printf(print, "struct lv_draw_unit_t"); } -static const mp_obj_dict_t mp_lv_cache_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_t_type, - MP_QSTR_lv_cache_t, + mp_lv_draw_unit_t_type, + MP_QSTR_lv_draw_unit_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_t_print, + print, mp_lv_draw_unit_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_t_attr, - locals_dict, &mp_lv_cache_t_locals_dict, + attr, mp_lv_draw_unit_t_attr, + locals_dict, &mp_lv_draw_unit_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) { - return &mp_lv_cache_t_type; + return &mp_lv_draw_unit_t_type; } /* - * Struct lv_cache_entry_t + * Struct lv_draw_task_t */ -static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_entry_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_entry_t_type())); - return (lv_cache_entry_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); + return (lv_draw_task_t*)self->data; } -#define mp_write_lv_cache_entry_t(struct_obj) *((lv_cache_entry_t*)mp_write_ptr_lv_cache_entry_t(struct_obj)) +#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_entry_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_entry_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); } -#define mp_read_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(copy_buffer(&field, sizeof(lv_cache_entry_t))) -#define mp_read_byref_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(&field) +#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) +#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) -static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_entry_t *data = (lv_cache_entry_t*)self->data; + GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_cache: dest[0] = mp_read_ptr_lv_cache_t((void*)data->cache); break; // converting from lv_cache_t *; - case MP_QSTR_ref_cnt: dest[0] = mp_obj_new_int(data->ref_cnt); break; // converting from int32_t; - case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint8_t; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; + case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; + case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; + case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; + case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; + case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; + case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7602,10 +7880,18 @@ static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest // store attribute switch(attr) { - case MP_QSTR_cache: data->cache = (void*)mp_write_ptr_lv_cache_t(dest[1]); break; // converting to lv_cache_t *; - case MP_QSTR_ref_cnt: data->ref_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_flags: data->flags = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; + case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -7614,79 +7900,139 @@ static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest } } -static void mp_lv_cache_entry_t_print(const mp_print_t *print, +static void mp_lv_draw_task_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_entry_t"); + mp_printf(print, "struct lv_draw_task_t"); } -static const mp_obj_dict_t mp_lv_cache_entry_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_entry_t_type, - MP_QSTR_lv_cache_entry_t, + mp_lv_draw_task_t_type, + MP_QSTR_lv_draw_task_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_entry_t_print, + print, mp_lv_draw_task_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_entry_t_attr, - locals_dict, &mp_lv_cache_entry_t_locals_dict, + attr, mp_lv_draw_task_t_attr, + locals_dict, &mp_lv_draw_task_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) { - return &mp_lv_cache_entry_t_type; + return &mp_lv_draw_task_t_type; } +#define funcptr_lv_display_flush_cb_t NULL + /* - * Struct lv_font_glyph_dsc_t + * lvgl extension definition for: + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) */ -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); + ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); +#define funcptr_lv_display_flush_wait_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ + +static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); - return (lv_font_glyph_dsc_t*)self->data; + lv_display_t *disp = mp_to_ptr(mp_args[0]); + ((void (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_const_none; } -#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); +#define funcptr_lv_display_sync_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) + */ + +static mp_obj_t mp_funcptr_lv_display_sync_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area); + return mp_const_none; } -#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) -#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) + -static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_sync_cb_t_mpobj, 2, mp_funcptr_lv_display_sync_cb_t, funcptr_lv_display_sync_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); +static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); + +/* + * Struct lv_ll_t + */ + +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); + return (lv_ll_t*)self->data; +} + +#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); +} + +#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) +#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) + +static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; + GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; - case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; - case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; - case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; - case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; - case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; - case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; - case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; - case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; - case MP_QSTR_entry: dest[0] = mp_read_ptr_lv_cache_entry_t((void*)data->entry); break; // converting from lv_cache_entry_t *; + case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; + case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; + case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7695,19 +8041,9 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; - case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; - case MP_QSTR_entry: data->entry = (void*)mp_write_ptr_lv_cache_entry_t(dest[1]); break; // converting to lv_cache_entry_t *; + case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; + case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; default: return; } @@ -7716,98 +8052,143 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, +static void mp_lv_ll_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_glyph_dsc_t"); + mp_printf(print, "struct lv_ll_t"); } -static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_ll_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_glyph_dsc_t_type, - MP_QSTR_lv_font_glyph_dsc_t, + mp_lv_ll_t_type, + MP_QSTR_lv_ll_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_glyph_dsc_t_print, + print, mp_lv_ll_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_glyph_dsc_t_attr, - locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, + attr, mp_lv_ll_t_attr, + locals_dict, &mp_lv_ll_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) { - return &mp_lv_font_glyph_dsc_t_type; + return &mp_lv_ll_t_type; } /* - * lvgl extension definition for: - * bool get_glyph_dsc(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next) + * Array convertors for lv_area_t [32] */ -static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t___32__(mp_obj_t mp_arr) { - const lv_font_t *arg0 = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *arg1 = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(arg0, arg1, letter, letter_next); - return convert_to_bool(_res); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_area_t(item); + } + return (lv_area_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t___32__(lv_area_t *arr) +{ + mp_obj_t obj_arr[32]; + for (size_t i=0; i<32; i++){ + obj_arr[i] = mp_read_lv_area_t(arr[i]); + } + return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } -static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); -#define funcptr_get_glyph_bitmap NULL +/* + * Array convertors for uint8_t [32] + */ + +GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t___32__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (uint8_t *)lv_arr; +} + +GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t___32__(uint8_t *arr) +{ + mp_obj_t obj_arr[32]; + for (size_t i=0; i<32; i++){ + obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); + } + return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! +} +/* Already started generating lv_draw_buf_t! skipping field '_static_buf1' */ +/* Already started generating lv_draw_buf_t! skipping field '_static_buf2' */ /* - * Struct lv_image_header_t + * Struct lv_array_t */ -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_array_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_array_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); - return (lv_image_header_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_array_t_type())); + return (lv_array_t*)self->data; } -#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) +#define mp_write_lv_array_t(struct_obj) *((lv_array_t*)mp_write_ptr_lv_array_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_array_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); + return lv_to_mp_struct(get_mp_lv_array_t_type(), field); } -#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) -#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) +#define mp_read_lv_array_t(field) mp_read_ptr_lv_array_t(copy_buffer(&field, sizeof(lv_array_t))) +#define mp_read_byref_lv_array_t(field) mp_read_ptr_lv_array_t(&field) -static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_array_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; + GENMPY_UNUSED lv_array_t *data = (lv_array_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; - case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; - case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; - case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; - case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; + case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; + case MP_QSTR_capacity: dest[0] = mp_obj_new_int_from_uint(data->capacity); break; // converting from uint32_t; + case MP_QSTR_element_size: dest[0] = mp_obj_new_int_from_uint(data->element_size); break; // converting from uint32_t; + case MP_QSTR_inner_alloc: dest[0] = convert_to_bool(data->inner_alloc); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7816,13 +8197,11 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des // store attribute switch(attr) { - case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_capacity: data->capacity = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_element_size: data->element_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_inner_alloc: data->inner_alloc = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -7831,129 +8210,181 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des } } -static void mp_lv_image_header_t_print(const mp_print_t *print, +static void mp_lv_array_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_header_t"); + mp_printf(print, "struct lv_array_t"); } -static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; +static const mp_obj_dict_t mp_lv_array_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_header_t_type, - MP_QSTR_lv_image_header_t, + mp_lv_array_t_type, + MP_QSTR_lv_array_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_header_t_print, + print, mp_lv_array_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_header_t_attr, - locals_dict, &mp_lv_image_header_t_locals_dict, + attr, mp_lv_array_t_attr, + locals_dict, &mp_lv_array_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_array_t_type(void) { - return &mp_lv_image_header_t_type; + return &mp_lv_array_t_type; } -#define funcptr_lv_draw_buf_malloc_cb_t NULL - /* - * lvgl extension definition for: - * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) + * Struct lv_event_list_t */ -static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_list_t(mp_obj_t self_in) { - size_t size = (size_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); - return ptr_to_mp((void*)_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_list_t_type())); + return (lv_event_list_t*)self->data; } - +#define mp_write_lv_event_list_t(struct_obj) *((lv_event_list_t*)mp_write_ptr_lv_event_list_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_list_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_event_list_t_type(), field); +} + +#define mp_read_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(copy_buffer(&field, sizeof(lv_event_list_t))) +#define mp_read_byref_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(&field) +static void mp_lv_event_list_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_event_list_t *data = (lv_event_list_t*)self->data; -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_array: dest[0] = mp_read_byref_lv_array_t(data->array); break; // converting from lv_array_t; + case MP_QSTR_is_traversing: dest[0] = mp_obj_new_int_from_uint(data->is_traversing); break; // converting from uint8_t; + case MP_QSTR_has_marked_deleting: dest[0] = mp_obj_new_int_from_uint(data->has_marked_deleting); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_array: data->array = mp_write_lv_array_t(dest[1]); break; // converting to lv_array_t; + case MP_QSTR_is_traversing: data->is_traversing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_has_marked_deleting: data->has_marked_deleting = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_event_list_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_event_list_t"); +} + +static const mp_obj_dict_t mp_lv_event_list_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_event_list_t_type, + MP_QSTR_lv_event_list_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_event_list_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_event_list_t_attr, + locals_dict, &mp_lv_event_list_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void) +{ + return &mp_lv_event_list_t_type; +} -#define funcptr_lv_draw_buf_free_cb_t NULL +#define funcptr_lv_theme_apply_cb_t NULL /* * lvgl extension definition for: - * void lv_draw_buf_free_cb_t(void *draw_buf) + * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) */ -static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_theme_apply_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *draw_buf = mp_to_ptr(mp_args[0]); - ((void (*)(void *))lv_func_ptr)(draw_buf); + lv_theme_t *arg0 = mp_to_ptr(mp_args[0]); + lv_obj_t *arg1 = mp_to_lv(mp_args[1]); + ((void (*)(lv_theme_t *, lv_obj_t *))lv_func_ptr)(arg0, arg1); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' - * lv_draw_buf_free_cb_t buf_free_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_theme_apply_cb_t_mpobj, 2, mp_funcptr_lv_theme_apply_cb_t, funcptr_lv_theme_apply_cb_t); -#define funcptr_lv_draw_buf_copy_cb_t NULL +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_theme_apply_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); /* - * Struct lv_area_t + * Struct lv_theme_t */ -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); - return (lv_area_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); + return (lv_theme_t*)self->data; } -#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) +#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) { - return lv_to_mp_struct(get_mp_lv_area_t_type(), field); + return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); } -#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) -#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) +#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) +#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) -static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; + GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; - case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; - case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; - case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; + case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; + case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; + case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; + case MP_QSTR_font_small: dest[0] = ptr_to_mp((void*)data->font_small); break; // converting from lv_font_t *; + case MP_QSTR_font_normal: dest[0] = ptr_to_mp((void*)data->font_normal); break; // converting from lv_font_t *; + case MP_QSTR_font_large: dest[0] = ptr_to_mp((void*)data->font_large); break; // converting from lv_font_t *; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7962,10 +8393,16 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_font_small: data->font_small = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_normal: data->font_normal = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_large: data->font_large = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -7974,155 +8411,544 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_area_t_print(const mp_print_t *print, +static void mp_lv_theme_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_area_t"); + mp_printf(print, "struct lv_theme_t"); } -static const mp_obj_dict_t mp_lv_area_t_locals_dict; +static const mp_obj_dict_t mp_lv_theme_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_area_t_type, - MP_QSTR_lv_area_t, + mp_lv_theme_t_type, + MP_QSTR_lv_theme_t, MP_TYPE_FLAG_NONE, - print, mp_lv_area_t_print, + print, mp_lv_theme_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_area_t_attr, - locals_dict, &mp_lv_area_t_locals_dict, + attr, mp_lv_theme_t_attr, + locals_dict, &mp_lv_theme_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) { - return &mp_lv_area_t_type; + return &mp_lv_theme_t_type; } +#define funcptr_lv_timer_cb_t NULL + /* * lvgl extension definition for: - * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * void lv_timer_cb_t(lv_timer_t *) */ -static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); + lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); + ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +static void lv_timer_t_timer_cb_callback(lv_timer_t *); /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' - * lv_draw_buf_copy_cb_t buf_copy_cb + * Struct lv_timer_t */ - -#define funcptr_lv_draw_buf_align_cb_t NULL +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); -/* - * lvgl extension definition for: - * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) { - void *buf = mp_to_ptr(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); - return ptr_to_mp((void*)_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); + return (lv_timer_t*)self->data; } - +#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); +} +#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) +#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' - * lv_draw_buf_align_cb_t align_pointer_cb - */ - -#define funcptr_lv_draw_buf_cache_operation_cb_t NULL +static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; + case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; + case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; + case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; + case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_timer_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_timer_t"); +} + +static const mp_obj_dict_t mp_lv_timer_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_timer_t_type, + MP_QSTR_lv_timer_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_timer_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_timer_t_attr, + locals_dict, &mp_lv_timer_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) +{ + return &mp_lv_timer_t_type; +} + /* - * lvgl extension definition for: - * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * Struct lv_display_t */ -static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); + return (lv_display_t*)self->data; } - +#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_display_t_type(), field); +} + +#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) +#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) + +static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; + case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; + case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; + case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; + case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; + case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; + case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; + case MP_QSTR_buf_1: dest[0] = ptr_to_mp((void*)data->buf_1); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_2: dest[0] = ptr_to_mp((void*)data->buf_2); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_3: dest[0] = ptr_to_mp((void*)data->buf_3); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_act: dest[0] = ptr_to_mp((void*)data->buf_act); break; // converting from lv_draw_buf_t *; + case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; + case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; + case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; + case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; + case MP_QSTR_sync_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, data->sync_cb, lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, data->user_data); break; // converting from callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, data->user_data); break; // converting from callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: dest[0] = mp_obj_new_int(data->syncing); break; // converting from int; + case MP_QSTR_syncing_last: dest[0] = mp_obj_new_int(data->syncing_last); break; // converting from int; + case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; + case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; + case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; + case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; + case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; + case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; + case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; + case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; + case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; + case MP_QSTR_layer_head: dest[0] = ptr_to_mp((void*)data->layer_head); break; // converting from lv_layer_t *; + case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; + case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; + case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; + case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; + case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; + case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; + case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; + case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; + case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; + case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; + case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; + case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; + case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; + case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; + case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; + case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; + case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_buf_1: data->buf_1 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_2: data->buf_2 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_3: data->buf_3 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_act: data->buf_act = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_sync_cb: data->sync_cb = mp_lv_callback(dest[1], lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: data->sync_wait_cb = mp_lv_callback(dest[1], lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: data->syncing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_syncing_last: data->syncing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; + case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; + case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; + case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; + case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_layer_head: data->layer_head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; + case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; + case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; + case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_display_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_display_t"); +} + +static const mp_obj_dict_t mp_lv_display_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_display_t_type, + MP_QSTR_lv_display_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_display_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_display_t_attr, + locals_dict, &mp_lv_display_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) +{ + return &mp_lv_display_t_type; +} + /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + * Struct lv_color32_t */ + +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); + return (lv_color32_t*)self->data; +} + +#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); +} + +#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) +#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) + +static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; + case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_color32_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_color32_t"); +} + +static const mp_obj_dict_t mp_lv_color32_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color32_t_type, + MP_QSTR_lv_color32_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color32_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color32_t_attr, + locals_dict, &mp_lv_color32_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) +{ + return &mp_lv_color32_t_type; +} /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t flush_cache_cb + * Struct lv_layer_t */ - -#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); + return (lv_layer_t*)self->data; +} + +#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); +} + +#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) +#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) + +static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_draw_buf: dest[0] = ptr_to_mp((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; + case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; + case MP_QSTR_display: dest[0] = mp_read_ptr_lv_display_t((void*)data->display); break; // converting from lv_display_t *; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; + case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; + case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; + case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; + case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_buffer_owned: dest[0] = convert_to_bool(data->buffer_owned); break; // converting from bool; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_display: data->display = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_buffer_owned: data->buffer_owned = mp_obj_is_true(dest[1]); break; // converting to bool; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_layer_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_layer_t"); +} + +static const mp_obj_dict_t mp_lv_layer_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_layer_t_type, + MP_QSTR_lv_layer_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_layer_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_layer_t_attr, + locals_dict, &mp_lv_layer_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) +{ + return &mp_lv_layer_t_type; +} + /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ -static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_clear_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); - return mp_obj_new_int_from_uint(_res); + lv_draw_buf_t *draw_buf = mp_to_ptr(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_func_ptr)(draw_buf, a, layer); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, funcptr_lv_draw_buf_clear_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_clear_cb_callback' + * lv_draw_buf_clear_cb_t buf_clear_cb */ @@ -8164,6 +8990,7 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t case MP_QSTR_invalidate_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->invalidate_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; case MP_QSTR_flush_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->flush_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; case MP_QSTR_width_to_stride_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, data->width_to_stride_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL); break; // converting from callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, data->buf_clear_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL); break; // converting from callback lv_draw_buf_clear_cb_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8179,6 +9006,7 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t case MP_QSTR_invalidate_cache_cb: data->invalidate_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; case MP_QSTR_flush_cache_cb: data->flush_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; case MP_QSTR_width_to_stride_cb: data->width_to_stride_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: data->buf_clear_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_clear_cb_t; default: return; } @@ -8304,14 +9132,14 @@ static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void) /* * lvgl extension definition for: - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ static mp_obj_t mp_funcptr_get_glyph_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_glyph_dsc_t *arg0 = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - lv_draw_buf_t *arg1 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(arg0, arg1); + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(g_dsc, draw_buf); return ptr_to_mp((void*)_res); } @@ -8325,7 +9153,7 @@ GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ /* * Function NOT generated: * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_t_get_glyph_bitmap_callback' - * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *, lv_draw_buf_t *) + * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ #define funcptr_release_glyph NULL @@ -8333,14 +9161,14 @@ GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ /* * lvgl extension definition for: - * void release_glyph(const lv_font_t *, lv_font_glyph_dsc_t *) + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) */ static mp_obj_t mp_funcptr_release_glyph(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *arg0 = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *arg1 = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(arg0, arg1); + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(font, g_dsc); return mp_const_none; } @@ -8350,7 +9178,7 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_release_glyph_mpobj, 2, GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, func, NULL, MP_QSTR_, NULL); } -static void lv_font_t_release_glyph_callback(const lv_font_t *, lv_font_glyph_dsc_t *); +static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); /* * Struct lv_font_t @@ -8383,19 +9211,21 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // load attribute switch(attr) { - case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *); - case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *, lv_font_glyph_dsc_t *); + case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; + case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); case MP_QSTR_line_height: dest[0] = mp_obj_new_int(data->line_height); break; // converting from int32_t; case MP_QSTR_base_line: dest[0] = mp_obj_new_int(data->base_line); break; // converting from int32_t; + case MP_QSTR_cap_height: dest[0] = mp_obj_new_int(data->cap_height); break; // converting from int32_t; + case MP_QSTR_x_height: dest[0] = mp_obj_new_int(data->x_height); break; // converting from int32_t; case MP_QSTR_subpx: dest[0] = mp_obj_new_int_from_uint(data->subpx); break; // converting from uint8_t; case MP_QSTR_kerning: dest[0] = mp_obj_new_int_from_uint(data->kerning); break; // converting from uint8_t; case MP_QSTR_static_bitmap: dest[0] = mp_obj_new_int_from_uint(data->static_bitmap); break; // converting from uint8_t; case MP_QSTR_underline_position: dest[0] = mp_obj_new_int(data->underline_position); break; // converting from int8_t; case MP_QSTR_underline_thickness: dest[0] = mp_obj_new_int(data->underline_thickness); break; // converting from int8_t; - case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; - case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8404,19 +9234,21 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *); - case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *, lv_font_glyph_dsc_t *); + case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); case MP_QSTR_line_height: data->line_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; case MP_QSTR_base_line: data->base_line = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_cap_height: data->cap_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x_height: data->x_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; case MP_QSTR_subpx: data->subpx = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; case MP_QSTR_kerning: data->kerning = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; case MP_QSTR_static_bitmap: data->static_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; case MP_QSTR_underline_position: data->underline_position = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; case MP_QSTR_underline_thickness: data->underline_thickness = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; - case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -8456,10 +9288,10 @@ static inline const mp_obj_type_t *get_mp_lv_font_t_type(void) /* * lvgl extension definition for: - * inline static const lv_font_t *lv_obj_get_style_text_font(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_font_t *lv_obj_get_style_text_font_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_text_font(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_font_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -8469,23 +9301,23 @@ static mp_obj_t mp_lv_obj_get_style_text_font(size_t mp_n_args, const mp_obj_t * -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font, lv_obj_get_style_text_font); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_internal_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_letter_space */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_letter_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_line_space */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_line_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space_internal); /* * lvgl extension definition for: - * inline static lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_decor_t lv_obj_get_style_text_decor_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_text_decor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_decor_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -8495,15 +9327,15 @@ static mp_obj_t mp_lv_obj_get_style_text_decor(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor, lv_obj_get_style_text_decor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_internal_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor_internal); /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_align_t lv_obj_get_style_text_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -8513,39 +9345,57 @@ static mp_obj_t mp_lv_obj_get_style_text_align(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align, lv_obj_get_style_text_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_internal_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_outline_stroke_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_outline_stroke_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_outline_stroke_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa_internal); + + +/* + * lvgl extension definition for: + * inline static lv_text_leading_trim_t lv_obj_get_style_text_leading_trim_internal(const lv_obj_t *obj, lv_part_t part) + */ + +static mp_obj_t mp_lv_obj_get_style_text_leading_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_text_leading_trim_t _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} + + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_outline_stroke_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_internal_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_blur_radius */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_blur_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_blur_backdrop */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_blur_backdrop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop_internal); /* * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t *obj, lv_part_t part) + * inline static lv_blur_quality_t lv_obj_get_style_blur_quality_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_blur_quality_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -8555,55 +9405,55 @@ static mp_obj_t mp_lv_obj_get_style_blur_quality(size_t mp_n_args, const mp_obj_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_blur_quality); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_radius */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_drop_shadow_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_drop_shadow_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa_internal); -/* Reusing lv_obj_get_style_blur_quality for lv_obj_get_style_drop_shadow_quality */ +/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_drop_shadow_quality); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_radius */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_radial_offset */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_clip_corner */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_clip_corner); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_layered */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_layered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered_internal); #define funcptr_lv_color_filter_cb_t NULL @@ -8712,10 +9562,10 @@ static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void) /* * lvgl extension definition for: - * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_color_filter_dsc_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -8725,19 +9575,19 @@ static mp_obj_t mp_lv_obj_get_style_color_filter_dsc(size_t mp_n_args, const mp_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc, lv_obj_get_style_color_filter_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_internal_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_color_filter_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_color_filter_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_recolor */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_recolor_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_recolor_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa_internal); #define funcptr_lv_anim_exec_xcb_t NULL @@ -9134,10 +9984,10 @@ static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void) /* * lvgl extension definition for: - * inline static const lv_anim_t *lv_obj_get_style_anim(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_anim_t *lv_obj_get_style_anim_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_anim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9147,15 +9997,15 @@ static mp_obj_t mp_lv_obj_get_style_anim(size_t mp_n_args, const mp_obj_t *mp_ar -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim, lv_obj_get_style_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_internal_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim_internal); /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_anim_duration(const lv_obj_t *obj, lv_part_t part) + * inline static uint32_t lv_obj_get_style_anim_duration_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_anim_duration_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9165,7 +10015,7 @@ static mp_obj_t mp_lv_obj_get_style_anim_duration(size_t mp_n_args, const mp_obj -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_anim_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration_internal); /* @@ -9263,10 +10113,10 @@ static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void) /* * lvgl extension definition for: - * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_transition_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9276,15 +10126,15 @@ static mp_obj_t mp_lv_obj_get_style_transition(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition, lv_obj_get_style_transition); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_internal_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition_internal); /* * lvgl extension definition for: - * inline static lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t *obj, lv_part_t part) + * inline static lv_blend_mode_t lv_obj_get_style_blend_mode_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_blend_mode_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9294,15 +10144,15 @@ static mp_obj_t mp_lv_obj_get_style_blend_mode(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode, lv_obj_get_style_blend_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_internal_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode_internal); /* * lvgl extension definition for: - * inline static uint16_t lv_obj_get_style_layout(const lv_obj_t *obj, lv_part_t part) + * inline static uint16_t lv_obj_get_style_layout_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_layout_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9312,15 +10162,15 @@ static mp_obj_t mp_lv_obj_get_style_layout(size_t mp_n_args, const mp_obj_t *mp_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout, lv_obj_get_style_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_internal_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout_internal); /* * lvgl extension definition for: - * inline static lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t *obj, lv_part_t part) + * inline static lv_base_dir_t lv_obj_get_style_base_dir_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_base_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9330,23 +10180,23 @@ static mp_obj_t mp_lv_obj_get_style_base_dir(size_t mp_n_args, const mp_obj_t *m -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir, lv_obj_get_style_base_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_internal_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir_internal); -/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_bitmap_mask_src */ +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bitmap_mask_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src_internal); -/* Reusing lv_obj_get_style_anim_duration for lv_obj_get_style_rotary_sensitivity */ +/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_rotary_sensitivity); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity_internal); /* * lvgl extension definition for: - * inline static lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t *obj, lv_part_t part) + * inline static lv_flex_flow_t lv_obj_get_style_flex_flow_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_flex_flow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9356,15 +10206,15 @@ static mp_obj_t mp_lv_obj_get_style_flex_flow(size_t mp_n_args, const mp_obj_t * -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow, lv_obj_get_style_flex_flow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_internal_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow_internal); /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t *obj, lv_part_t part) + * inline static lv_flex_align_t lv_obj_get_style_flex_main_place_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_flex_main_place_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9374,23 +10224,23 @@ static mp_obj_t mp_lv_obj_get_style_flex_main_place(size_t mp_n_args, const mp_o -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_main_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place_internal); -/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_cross_place */ +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_cross_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place_internal); -/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_track_place */ +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_track_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place_internal); /* * lvgl extension definition for: - * inline static uint8_t lv_obj_get_style_flex_grow(const lv_obj_t *obj, lv_part_t part) + * inline static uint8_t lv_obj_get_style_flex_grow_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_flex_grow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9400,15 +10250,15 @@ static mp_obj_t mp_lv_obj_get_style_flex_grow(size_t mp_n_args, const mp_obj_t * -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow, lv_obj_get_style_flex_grow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_internal_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow_internal); /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array(const lv_obj_t *obj, lv_part_t part) + * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9418,15 +10268,15 @@ static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array(size_t mp_n_args, cons -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_column_dsc_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array_internal); /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grid_align_t lv_obj_get_style_grid_column_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_grid_column_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -9436,151 +10286,82 @@ static mp_obj_t mp_lv_obj_get_style_grid_column_align(size_t mp_n_args, const mp -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_column_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align_internal); -/* Reusing lv_obj_get_style_grid_column_dsc_array for lv_obj_get_style_grid_row_dsc_array */ +/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_row_dsc_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array_internal); -/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_row_align */ +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_row_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_pos */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos_internal); -/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_x_align */ +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_x_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_span */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_pos */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos_internal); -/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_y_align */ +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_y_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_span */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span_internal); /* * lvgl extension definition for: - * inline static void lv_obj_set_style_pad_all(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static lv_text_align_t lv_obj_calculate_style_text_align_internal(const lv_obj_t *obj, lv_part_t part, const char *txt) */ -static mp_obj_t mp_lv_obj_set_style_pad_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_calculate_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_all_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_all); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_hor_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_hor); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_ver_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_ver); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_all */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_all_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_all); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_hor_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_hor); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_ver_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_ver); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_gap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_gap_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_gap); - - -/* - * lvgl extension definition for: - * inline static void lv_obj_set_style_size(lv_obj_t *obj, int32_t width, int32_t height, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_style_selector_t))lv_func_ptr)(obj, width, height, selector); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_size_mpobj, 4, mp_lv_obj_set_style_size, lv_obj_set_style_size); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_scale */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_scale); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_left */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_left); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_internal_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_top */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_bottom */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x_safe */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x_safe); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y_safe */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y_safe); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom_internal); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe_internal */ -/* - * lvgl extension definition for: - * inline static void lv_obj_move_foreground(lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_move_foreground(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - ((void (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_foreground_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_foreground); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe_internal); -/* Reusing lv_obj_move_foreground for lv_obj_move_background */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_background_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_background); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe_internal); /* @@ -9821,157 +10602,136 @@ static mp_obj_t mp_lv_obj_get_screen(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_screen_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_screen); -#define funcptr_lv_display_flush_cb_t NULL - /* * lvgl extension definition for: - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) + * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_display(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); - ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_display_t * _res = ((lv_display_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_display_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_display_mpobj, 1, mp_lv_obj_get_display, lv_obj_get_display); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); -#define funcptr_lv_display_flush_wait_cb_t NULL +/* Reusing lv_obj_get_screen for lv_obj_get_parent */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_parent_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_parent); + /* * lvgl extension definition for: - * void lv_display_flush_wait_cb_t(lv_display_t *disp) + * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) */ -static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_to_ptr(mp_args[0]); - ((void (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_child); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +#define funcptr_constructor_cb NULL -static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); /* - * Array convertors for lv_area_t [32] + * lvgl extension definition for: + * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) */ -GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t___32__(mp_obj_t mp_arr) +static mp_obj_t mp_funcptr_constructor_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_area_t(item); - } - return (lv_area_t *)lv_arr; + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + ((void (*)(const lv_obj_class_t *, lv_obj_t *))lv_func_ptr)(class_p, obj); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t___32__(lv_area_t *arr) -{ - mp_obj_t obj_arr[32]; - for (size_t i=0; i<32; i++){ - obj_arr[i] = mp_read_lv_area_t(arr[i]); - } - return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! -} + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_constructor_cb_mpobj, 2, mp_funcptr_constructor_cb, funcptr_constructor_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +#define funcptr_event_cb_1 NULL /* - * Array convertors for uint8_t [32] + * lvgl extension definition for: + * void event_cb(const lv_obj_class_t *class_p, lv_event_t *e) */ -GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t___32__(mp_obj_t mp_arr) +static mp_obj_t mp_funcptr_event_cb_1(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (uint8_t *)lv_arr; + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); + ((void (*)(const lv_obj_class_t *, lv_event_t *))lv_func_ptr)(class_p, e); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t___32__(uint8_t *arr) -{ - mp_obj_t obj_arr[32]; - for (size_t i=0; i<32; i++){ - obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); - } - return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! -} + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_1_mpobj, 2, mp_funcptr_event_cb_1, funcptr_event_cb_1); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, func, NULL, MP_QSTR_, NULL); } +static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); /* - * Struct lv_ll_t + * Struct lv_obj_class_t */ -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_class_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); - return (lv_ll_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_class_t_type())); + return (lv_obj_class_t*)self->data; } -#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) +#define mp_write_lv_obj_class_t(struct_obj) *((lv_obj_class_t*)mp_write_ptr_lv_obj_class_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_class_t(void *field) { - return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); + return lv_to_mp_struct(get_mp_lv_obj_class_t_type(), field); } -#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) -#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) +#define mp_read_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(copy_buffer(&field, sizeof(lv_obj_class_t))) +#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) -static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; + GENMPY_UNUSED lv_obj_class_t *data = (lv_obj_class_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; - case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; - case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; + case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_obj_class_t *; + case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, (void*)data->event_cb, lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_width_def: dest[0] = mp_obj_new_int(data->width_def); break; // converting from int32_t; + case MP_QSTR_height_def: dest[0] = mp_obj_new_int(data->height_def); break; // converting from int32_t; + case MP_QSTR_editable: dest[0] = mp_obj_new_int_from_uint(data->editable); break; // converting from uint32_t; + case MP_QSTR_group_def: dest[0] = mp_obj_new_int_from_uint(data->group_def); break; // converting from uint32_t; + case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; + case MP_QSTR_theme_inheritable: dest[0] = mp_obj_new_int_from_uint(data->theme_inheritable); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9980,9 +10740,18 @@ static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; - case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; + case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_class_t *; + case MP_QSTR_constructor_cb: data->constructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_destructor_cb: data->destructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_width_def: data->width_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_height_def: data->height_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_editable: data->editable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_group_def: data->group_def = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_theme_inheritable: data->theme_inheritable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -9991,574 +10760,372 @@ static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_ll_t_print(const mp_print_t *print, +static void mp_lv_obj_class_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_ll_t"); + mp_printf(print, "struct lv_obj_class_t"); } -static const mp_obj_dict_t mp_lv_ll_t_locals_dict; +static const mp_obj_dict_t mp_lv_obj_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_ll_t_type, - MP_QSTR_lv_ll_t, + mp_lv_obj_class_t_type, + MP_QSTR_lv_obj_class_t, MP_TYPE_FLAG_NONE, - print, mp_lv_ll_t_print, + print, mp_lv_obj_class_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_ll_t_attr, - locals_dict, &mp_lv_ll_t_locals_dict, + attr, mp_lv_obj_class_t_attr, + locals_dict, &mp_lv_obj_class_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void) { - return &mp_lv_ll_t_type; + return &mp_lv_obj_class_t_type; } -#define funcptr_dispatch_cb NULL - /* * lvgl extension definition for: - * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_layer_t *layer = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[2]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_func_ptr)(obj, idx, class_p); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_child_by_type); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - +/* Reusing lv_obj_get_child for lv_obj_get_sibling */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' - * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_sibling); -#define funcptr_evaluate_cb NULL +/* Reusing lv_obj_get_child_by_type for lv_obj_get_sibling_by_type */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_sibling_by_type); + /* * lvgl extension definition for: - * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_draw_task_t *task = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' - * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_mpobj, 1, mp_lv_obj_get_child_count, lv_obj_get_child_count); -#define funcptr_wait_for_finish_cb NULL - /* * lvgl extension definition for: - * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_count_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_by_type_mpobj, 2, mp_lv_obj_get_child_count_by_type, lv_obj_get_child_count_by_type); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' - * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) + * lvgl extension definition for: + * int32_t lv_obj_get_index(const lv_obj_t *obj) */ - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' - * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) - */ - -#define funcptr_event_cb NULL +static mp_obj_t mp_lv_obj_get_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_index); + /* - * Struct lv_event_t + * lvgl extension definition for: + * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_get_index_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); - return (lv_event_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); + return mp_obj_new_int(_res); } -#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_event_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_by_type_mpobj, 2, mp_lv_obj_get_index_by_type, lv_obj_get_index_by_type); + -#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) -#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) +/* + * Callback function lv_obj_tree_walk_cb + * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) + */ -static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_tree_walk_cb)), 2, mp_args); + return (int)mp_obj_get_int(callback_result); +} - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; - case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; - case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; - case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; - case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; - case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; - case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; - case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; - case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) + */ -static void mp_lv_event_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_event_t"); + void *user_data = mp_to_ptr(mp_args[2]); + void *cb = mp_lv_callback(mp_args[1], &lv_obj_tree_walk_cb_callback, MP_QSTR_lv_obj_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_obj_t *start_obj = mp_to_lv(mp_args[0]); + ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_func_ptr)(start_obj, cb, user_data); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_event_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_event_t_type, - MP_QSTR_lv_event_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_event_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_event_t_attr, - locals_dict, &mp_lv_event_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_tree_walk_mpobj, 3, mp_lv_obj_tree_walk, lv_obj_tree_walk); + +/* Reusing lv_obj_move_foreground for lv_obj_dump_tree */ -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) -{ - return &mp_lv_event_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_dump_tree_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_dump_tree); /* * lvgl extension definition for: - * void event_cb(lv_event_t *event) + * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) */ -static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); - ((void (*)(lv_event_t *))lv_func_ptr)(event); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pos_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_pos); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_move_to_index for lv_obj_set_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_x_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_x); + +/* Reusing lv_obj_move_to_index for lv_obj_set_y */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_y_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_y); + +/* Reusing lv_obj_set_pos for lv_obj_set_size */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' - * void (*event_cb)(lv_event_t *event) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_size_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_size); /* - * Struct lv_draw_unit_t + * lvgl extension definition for: + * bool lv_obj_refr_size(lv_obj_t *obj) */ -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_refr_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); - return (lv_draw_unit_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(lv_obj_t *))lv_func_ptr)(obj); + return convert_to_bool(_res); } -#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); -} + -#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) -#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) - -static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; - case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refr_size); + +/* Reusing lv_obj_move_to_index for lv_obj_set_width */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_width); + +/* Reusing lv_obj_move_to_index for lv_obj_set_height */ -static void mp_lv_draw_unit_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_draw_unit_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_height); + +/* Reusing lv_obj_move_to_index for lv_obj_set_content_width */ -static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_width); + +/* Reusing lv_obj_move_to_index for lv_obj_set_content_height */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_unit_t_type, - MP_QSTR_lv_draw_unit_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_unit_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_unit_t_attr, - locals_dict, &mp_lv_draw_unit_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_height); + +/* Reusing lv_obj_delete_delayed for lv_obj_set_layout */ -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) -{ - return &mp_lv_draw_unit_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_layout_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_set_layout); /* - * Struct lv_draw_task_t + * lvgl extension definition for: + * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) */ -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); - return (lv_draw_task_t*)self->data; -} - -#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) +static mp_obj_t mp_lv_obj_is_layout_positioned(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(const lv_obj_t *))lv_func_ptr)(obj); + return convert_to_bool(_res); } -#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) -#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) + -static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_layout_positioned_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_layout_positioned); + +/* Reusing lv_obj_move_foreground for lv_obj_mark_layout_as_dirty */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; - case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; - case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; - case MP_QSTR_clip_area_original: dest[0] = mp_read_byref_lv_area_t(data->clip_area_original); break; // converting from lv_area_t; - case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; - case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; - case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; - case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; - case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; - case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_clip_area_original: data->clip_area_original = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_mark_layout_as_dirty_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_mark_layout_as_dirty); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_obj_update_layout(const lv_obj_t *obj) + */ -static void mp_lv_draw_task_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_update_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_draw_task_t"); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + ((void (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_task_t_type, - MP_QSTR_lv_draw_task_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_task_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_task_t_attr, - locals_dict, &mp_lv_draw_task_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) -{ - return &mp_lv_draw_task_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layout_mpobj, 1, mp_lv_obj_update_layout, lv_obj_update_layout); /* - * Struct lv_color32_t + * lvgl extension definition for: + * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) */ -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); - return (lv_color32_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_align_t))lv_func_ptr)(obj, align); + return mp_const_none; } -#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_align_mpobj, 2, mp_lv_obj_set_align, lv_obj_set_align); + -#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) -#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) +/* + * lvgl extension definition for: + * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + */ -static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static mp_obj_t mp_lv_obj_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_align_t align = (int)mp_obj_get_int(mp_args[1]); + int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, align, x_ofs, y_ofs); + return mp_const_none; +} - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; - case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_mpobj, 4, mp_lv_obj_align, lv_obj_align); + -static void mp_lv_color32_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +/* + * lvgl extension definition for: + * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + */ + +static mp_obj_t mp_lv_obj_align_to(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_color32_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(mp_args[1]); + lv_align_t align = (int)mp_obj_get_int(mp_args[2]); + int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, base, align, x_ofs, y_ofs); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_color32_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color32_t_type, - MP_QSTR_lv_color32_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_color32_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_color32_t_attr, - locals_dict, &mp_lv_color32_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_to_mpobj, 5, mp_lv_obj_align_to, lv_obj_align_to); + +/* Reusing lv_obj_move_foreground for lv_obj_center */ -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) -{ - return &mp_lv_color32_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_center_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_center); /* - * Struct lv_layer_t + * Struct lv_matrix_t */ -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_matrix_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); - return (lv_layer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_matrix_t_type())); + return (lv_matrix_t*)self->data; } -#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) +#define mp_write_lv_matrix_t(struct_obj) *((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_matrix_t(void *field) { - return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_matrix_t_type(), field); } -#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) -#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) +#define mp_read_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(copy_buffer(&field, sizeof(lv_matrix_t))) +#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) -static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; + GENMPY_UNUSED lv_matrix_t *data = (lv_matrix_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_draw_buf: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; - case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; - case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; - case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; - case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; - case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -10567,19 +11134,7 @@ static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + ; default: return; } @@ -10588,769 +11143,716 @@ static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_layer_t_print(const mp_print_t *print, +static void mp_lv_matrix_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_layer_t"); + mp_printf(print, "struct lv_matrix_t"); } -static const mp_obj_dict_t mp_lv_layer_t_locals_dict; +static const mp_obj_dict_t mp_lv_matrix_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_layer_t_type, - MP_QSTR_lv_layer_t, + mp_lv_matrix_t_type, + MP_QSTR_lv_matrix_t, MP_TYPE_FLAG_NONE, - print, mp_lv_layer_t_print, + print, mp_lv_matrix_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_layer_t_attr, - locals_dict, &mp_lv_layer_t_locals_dict, + attr, mp_lv_matrix_t_attr, + locals_dict, &mp_lv_matrix_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void) { - return &mp_lv_layer_t_type; + return &mp_lv_matrix_t_type; } -#define funcptr_layer_init NULL - /* * lvgl extension definition for: - * void layer_init(lv_display_t *disp, lv_layer_t *layer) + * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) */ -static mp_obj_t mp_funcptr_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_to_ptr(mp_args[0]); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_layer_t *))lv_func_ptr)(disp, layer); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(mp_args[1]); + ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_func_ptr)(obj, matrix); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_layer_init_mpobj, 2, mp_funcptr_layer_init, funcptr_layer_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_transform_mpobj, 2, mp_lv_obj_set_transform, lv_obj_set_transform); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_layer_init(void *func){ return mp_lv_funcptr(&mp_funcptr_layer_init_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_move_foreground for lv_obj_reset_transform */ -static void lv_display_t_layer_init_callback(lv_display_t *disp, lv_layer_t *layer); -static void lv_display_t_layer_deinit_callback(lv_display_t *disp, lv_layer_t *layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_reset_transform_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_reset_transform); + /* - * Struct lv_array_t + * lvgl extension definition for: + * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) */ -static inline const mp_obj_type_t *get_mp_lv_array_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_array_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_get_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_array_t_type())); - return (lv_array_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_area_t *coords = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, coords); + return mp_const_none; } -#define mp_write_lv_array_t(struct_obj) *((lv_array_t*)mp_write_ptr_lv_array_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_array_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_array_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_coords); + +/* Reusing lv_obj_get_index for lv_obj_get_x */ -#define mp_read_lv_array_t(field) mp_read_ptr_lv_array_t(copy_buffer(&field, sizeof(lv_array_t))) -#define mp_read_byref_lv_array_t(field) mp_read_ptr_lv_array_t(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x); + +/* Reusing lv_obj_get_index for lv_obj_get_x2 */ -static void mp_lv_array_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_array_t *data = (lv_array_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x2); + +/* Reusing lv_obj_get_index for lv_obj_get_y */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; - case MP_QSTR_capacity: dest[0] = mp_obj_new_int_from_uint(data->capacity); break; // converting from uint32_t; - case MP_QSTR_element_size: dest[0] = mp_obj_new_int_from_uint(data->element_size); break; // converting from uint32_t; - case MP_QSTR_inner_alloc: dest[0] = convert_to_bool(data->inner_alloc); break; // converting from bool; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; - case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_capacity: data->capacity = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_element_size: data->element_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_inner_alloc: data->inner_alloc = mp_obj_is_true(dest[1]); break; // converting to bool; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y); + +/* Reusing lv_obj_get_index for lv_obj_get_y2 */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y2); + +/* Reusing lv_obj_get_index for lv_obj_get_x_aligned */ -static void mp_lv_array_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_array_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x_aligned); + +/* Reusing lv_obj_get_index for lv_obj_get_y_aligned */ -static const mp_obj_dict_t mp_lv_array_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y_aligned); + +/* Reusing lv_obj_get_index for lv_obj_get_width */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_array_t_type, - MP_QSTR_lv_array_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_array_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_array_t_attr, - locals_dict, &mp_lv_array_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_width); + +/* Reusing lv_obj_get_index for lv_obj_get_height */ -static inline const mp_obj_type_t *get_mp_lv_array_t_type(void) -{ - return &mp_lv_array_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_height); + +/* Reusing lv_obj_get_index for lv_obj_get_content_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_width); + +/* Reusing lv_obj_get_index for lv_obj_get_content_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_height); + +/* Reusing lv_obj_get_coords for lv_obj_get_content_coords */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_content_coords); + +/* Reusing lv_obj_get_index for lv_obj_get_self_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_width); + +/* Reusing lv_obj_get_index for lv_obj_get_self_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_height); /* - * Struct lv_event_list_t + * lvgl extension definition for: + * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) */ -static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_list_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_get_style_clamped_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_list_t_type())); - return (lv_event_list_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -#define mp_write_lv_event_list_t(struct_obj) *((lv_event_list_t*)mp_write_ptr_lv_event_list_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_list_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_width); + +/* Reusing lv_obj_get_style_clamped_width for lv_obj_get_style_clamped_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_height); + +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_width_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_width_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_width_content); + +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_height_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_height_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_height_content); + +/* Reusing lv_obj_refr_size for lv_obj_is_width_min */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_min); + +/* Reusing lv_obj_refr_size for lv_obj_is_height_min */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_min); + +/* Reusing lv_obj_refr_size for lv_obj_is_width_max */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_max); + +/* Reusing lv_obj_refr_size for lv_obj_is_height_max */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_max); + +/* Reusing lv_obj_refr_size for lv_obj_refresh_self_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_self_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refresh_self_size); + +/* Reusing lv_obj_move_foreground for lv_obj_refr_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_pos_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_refr_pos); + +/* Reusing lv_obj_set_pos for lv_obj_move_to */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_mpobj, 3, mp_lv_obj_set_pos, lv_obj_move_to); + + +/* + * lvgl extension definition for: + * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) + */ + +static mp_obj_t mp_lv_obj_move_children_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_event_list_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x_diff = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y_diff = (int32_t)mp_obj_get_int(mp_args[2]); + bool ignore_floating = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_func_ptr)(obj, x_diff, y_diff, ignore_floating); + return mp_const_none; } -#define mp_read_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(copy_buffer(&field, sizeof(lv_event_list_t))) -#define mp_read_byref_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(&field) + -static void mp_lv_event_list_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_children_by_mpobj, 4, mp_lv_obj_move_children_by, lv_obj_move_children_by); + + +/* + * lvgl extension definition for: + * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_get_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_event_list_t *data = (lv_event_list_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_matrix_t * _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_matrix_t((void*)_res); +} - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_array: dest[0] = mp_read_byref_lv_array_t(data->array); break; // converting from lv_array_t; - case MP_QSTR_is_traversing: dest[0] = mp_obj_new_int_from_uint(data->is_traversing); break; // converting from uint8_t; - case MP_QSTR_has_marked_deleting: dest[0] = mp_obj_new_int_from_uint(data->has_marked_deleting); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_array: data->array = mp_write_lv_array_t(dest[1]); break; // converting to lv_array_t; - case MP_QSTR_is_traversing: data->is_traversing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_has_marked_deleting: data->has_marked_deleting = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } + - dest[0] = MP_OBJ_NULL; // indicate success - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transform_mpobj, 1, mp_lv_obj_get_transform, lv_obj_get_transform); + + +/* + * lvgl extension definition for: + * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) + */ + +static mp_obj_t mp_lv_obj_transform_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[1]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, p, flags); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_mpobj, 3, mp_lv_obj_transform_point, lv_obj_transform_point); + + +/* + * Array convertors for lv_point_t [] + */ + +GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_point_t(item); } + return (lv_point_t *)lv_arr; } -static void mp_lv_event_list_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t_____(lv_point_t *arr) { - mp_printf(print, "struct lv_event_list_t"); + return mp_read_ptr_lv_point_t((void*)arr); } -static const mp_obj_dict_t mp_lv_event_list_t_locals_dict; -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_event_list_t_type, - MP_QSTR_lv_event_list_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_event_list_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_event_list_t_attr, - locals_dict, &mp_lv_event_list_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +/* + * lvgl extension definition for: + * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) + */ -static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void) +static mp_obj_t mp_lv_obj_transform_point_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_event_list_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *points = mp_arr_to_lv_point_t_____(mp_args[1]); + size_t count = (size_t)mp_obj_get_int(mp_args[2]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, points, count, flags); + return mp_const_none; } - -#define funcptr_lv_theme_apply_cb_t NULL + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_array_mpobj, 4, mp_lv_obj_transform_point_array, lv_obj_transform_point_array); + /* * lvgl extension definition for: - * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) + * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) */ -static mp_obj_t mp_funcptr_lv_theme_apply_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *arg0 = mp_to_ptr(mp_args[0]); - lv_obj_t *arg1 = mp_to_lv(mp_args[1]); - ((void (*)(lv_theme_t *, lv_obj_t *))lv_func_ptr)(arg0, arg1); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, area, flags); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_theme_apply_cb_t_mpobj, 2, mp_funcptr_lv_theme_apply_cb_t, funcptr_lv_theme_apply_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transformed_area_mpobj, 3, mp_lv_obj_get_transformed_area, lv_obj_get_transformed_area); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_theme_apply_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); /* - * Struct lv_theme_t + * lvgl extension definition for: + * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) */ -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_invalidate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); - return (lv_theme_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_func_ptr)(obj, area); + return mp_obj_new_int(_res); } -#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_area_mpobj, 2, mp_lv_obj_invalidate_area, lv_obj_invalidate_area); + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_invalidate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) -#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) + -static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_mpobj, 1, mp_lv_obj_invalidate, lv_obj_invalidate); + - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; - case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; - case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; - case MP_QSTR_font_small: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_small); break; // converting from lv_font_t *; - case MP_QSTR_font_normal: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_normal); break; // converting from lv_font_t *; - case MP_QSTR_font_large: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_large); break; // converting from lv_font_t *; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_font_small: data->font_small = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_normal: data->font_normal = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_large: data->font_large = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } +/* + * lvgl extension definition for: + * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) + */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } +static mp_obj_t mp_lv_obj_area_is_visible(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + bool _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, area); + return convert_to_bool(_res); } -static void mp_lv_theme_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_area_is_visible_mpobj, 2, mp_lv_obj_area_is_visible, lv_obj_area_is_visible); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_visible */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_visible); + +/* Reusing lv_obj_move_to_index for lv_obj_set_ext_click_area */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_click_area_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_click_area); + +/* Reusing lv_obj_get_coords for lv_obj_get_click_area */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_click_area_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_click_area); + + +/* + * lvgl extension definition for: + * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) + */ + +static mp_obj_t mp_lv_obj_hit_test(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_theme_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + bool _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); + return convert_to_bool(_res); } -static const mp_obj_dict_t mp_lv_theme_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_theme_t_type, - MP_QSTR_lv_theme_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_theme_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_theme_t_attr, - locals_dict, &mp_lv_theme_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_hit_test_mpobj, 2, mp_lv_obj_hit_test, lv_obj_hit_test); + -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) +/* + * lvgl extension definition for: + * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) + */ + +static mp_obj_t mp_lv_obj_calc_dynamic_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_theme_t_type; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_func_ptr)(obj, prop); + return mp_obj_new_int(_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_width_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_width); -#define funcptr_lv_timer_cb_t NULL +/* Reusing lv_obj_calc_dynamic_width for lv_obj_calc_dynamic_height */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_height_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_height); + /* * lvgl extension definition for: - * void lv_timer_cb_t(lv_timer_t *) + * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) */ -static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); - ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollbar_mode_mpobj, 2, mp_lv_obj_set_scrollbar_mode, lv_obj_set_scrollbar_mode); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_timer_t_timer_cb_callback(lv_timer_t *); /* - * Struct lv_timer_t + * lvgl extension definition for: + * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) */ -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_set_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); - return (lv_timer_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_dir_t dir = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_dir_t))lv_func_ptr)(obj, dir); + return mp_const_none; } -#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_obj_set_scroll_dir); + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) + */ + +static mp_obj_t mp_lv_obj_set_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scroll_snap_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_func_ptr)(obj, align); + return mp_const_none; } -#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) -#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) + -static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_x_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_x); + +/* Reusing lv_obj_set_scroll_snap_x for lv_obj_set_scroll_snap_y */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; - case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; - case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; - case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; - case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_y_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_y); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) + */ -static void mp_lv_timer_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_get_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_timer_t"); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_scrollbar_mode_t _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static const mp_obj_dict_t mp_lv_timer_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_timer_t_type, - MP_QSTR_lv_timer_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_timer_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_timer_t_attr, - locals_dict, &mp_lv_timer_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_mode_mpobj, 1, mp_lv_obj_get_scrollbar_mode, lv_obj_get_scrollbar_mode); + -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) +/* + * lvgl extension definition for: + * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_get_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_timer_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_dir_t _res = ((lv_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_obj_get_scroll_dir); /* - * Struct lv_display_t + * lvgl extension definition for: + * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) */ -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_get_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); - return (lv_display_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_scroll_snap_t _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_display_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_x_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_x); + +/* Reusing lv_obj_get_scroll_snap_x for lv_obj_get_scroll_snap_y */ -#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) -#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_y_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_y); + +/* Reusing lv_obj_get_index for lv_obj_get_scroll_x */ -static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_x); + +/* Reusing lv_obj_get_index for lv_obj_get_scroll_y */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; - case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; - case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; - case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; - case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; - case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; - case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; - case MP_QSTR_buf_1: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_1); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_2: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_2); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_3: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_3); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_act: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_act); break; // converting from lv_draw_buf_t *; - case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; - case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; - case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; - case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; - case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; - case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; - case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; - case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; - case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; - case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; - case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; - case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; - case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; - case MP_QSTR__static_buf1: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf1); break; // converting from lv_draw_buf_t; - case MP_QSTR__static_buf2: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf2); break; // converting from lv_draw_buf_t; - case MP_QSTR_layer_head: dest[0] = mp_read_ptr_lv_layer_t((void*)data->layer_head); break; // converting from lv_layer_t *; - case MP_QSTR_layer_init: dest[0] = mp_lv_funcptr(&mp_funcptr_layer_init_mpobj, (void*)data->layer_init, lv_display_t_layer_init_callback ,MP_QSTR_lv_display_t_layer_init, data->user_data); break; // converting from callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_layer_deinit: dest[0] = mp_lv_funcptr(&mp_funcptr_layer_init_mpobj, (void*)data->layer_deinit, lv_display_t_layer_deinit_callback ,MP_QSTR_lv_display_t_layer_deinit, data->user_data); break; // converting from callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; - case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; - case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; - case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; - case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; - case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; - case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; - case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; - case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; - case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; - case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; - case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; - case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; - case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; - case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; - case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; - case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_buf_1: data->buf_1 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_2: data->buf_2 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_3: data->buf_3 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_act: data->buf_act = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; - case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; - case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; - case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; - case MP_QSTR__static_buf1: data->_static_buf1 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; - case MP_QSTR__static_buf2: data->_static_buf2 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; - case MP_QSTR_layer_head: data->layer_head = (void*)mp_write_ptr_lv_layer_t(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_layer_init: data->layer_init = (void*)mp_lv_callback(dest[1], lv_display_t_layer_init_callback ,MP_QSTR_lv_display_t_layer_init, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_layer_deinit: data->layer_deinit = (void*)mp_lv_callback(dest[1], lv_display_t_layer_deinit_callback ,MP_QSTR_lv_display_t_layer_deinit, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; - case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; - case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; - case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_y); + +/* Reusing lv_obj_get_index for lv_obj_get_scroll_top */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_top_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_top); + +/* Reusing lv_obj_get_index for lv_obj_get_scroll_bottom */ -static void mp_lv_display_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_display_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_bottom_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_bottom); + +/* Reusing lv_obj_get_index for lv_obj_get_scroll_left */ -static const mp_obj_dict_t mp_lv_display_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_left_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_left); + +/* Reusing lv_obj_get_index for lv_obj_get_scroll_right */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_display_t_type, - MP_QSTR_lv_display_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_display_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_display_t_attr, - locals_dict, &mp_lv_display_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_right_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_right); + -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) +/* + * lvgl extension definition for: + * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) + */ + +static mp_obj_t mp_lv_obj_get_scroll_end(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_display_t_type; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_point_t *end = mp_write_ptr_lv_point_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, end); + return mp_const_none; } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_end_mpobj, 2, mp_lv_obj_get_scroll_end, lv_obj_get_scroll_end); /* * lvgl extension definition for: - * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) + * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) */ -static mp_obj_t mp_lv_obj_get_display(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_scroll_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_display_t * _res = ((lv_display_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_display_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t dx = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t dy = (int32_t)mp_obj_get_int(mp_args[2]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, dx, dy, anim_en); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_display_mpobj, 1, mp_lv_obj_get_display, lv_obj_get_display); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by); -/* Reusing lv_obj_get_screen for lv_obj_get_parent */ +/* Reusing lv_obj_scroll_by for lv_obj_scroll_by_bounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_parent_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_parent); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_bounded_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by_bounded); + +/* Reusing lv_obj_scroll_by for lv_obj_scroll_to */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_to); /* * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) + * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) */ -static mp_obj_t mp_lv_obj_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_scroll_to_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, x, anim_en); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_child); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_x_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_x); -#define funcptr_constructor_cb NULL +/* Reusing lv_obj_scroll_to_x for lv_obj_scroll_to_y */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_y_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_y); + /* * lvgl extension definition for: - * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) + * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) */ -static mp_obj_t mp_funcptr_constructor_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_scroll_to_view(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - ((void (*)(const lv_obj_class_t *, lv_obj_t *))lv_func_ptr)(class_p, obj); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, anim_en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_constructor_cb_mpobj, 2, mp_funcptr_constructor_cb, funcptr_constructor_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_scroll_to_view for lv_obj_scroll_to_view_recursive */ -static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -#define funcptr_event_cb_1 NULL +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_recursive_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view_recursive); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolling */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolling_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolling); + +/* Reusing lv_obj_update_layout for lv_obj_stop_scroll_anim */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_stop_scroll_anim_mpobj, 1, mp_lv_obj_update_layout, lv_obj_stop_scroll_anim); + +/* Reusing lv_obj_scroll_to_view for lv_obj_update_snap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_snap_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_update_snap); + /* * lvgl extension definition for: - * void event_cb(const lv_obj_class_t *class_p, lv_event_t *e) + * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) */ -static mp_obj_t mp_funcptr_event_cb_1(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scrollbar_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); - ((void (*)(const lv_obj_class_t *, lv_event_t *))lv_func_ptr)(class_p, e); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_area_t *hor_area = mp_write_ptr_lv_area_t(mp_args[1]); + lv_area_t *ver_area = mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor_area, ver_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_1_mpobj, 2, mp_funcptr_event_cb_1, funcptr_event_cb_1); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_area_mpobj, 3, mp_lv_obj_get_scrollbar_area, lv_obj_get_scrollbar_area); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_move_foreground for lv_obj_scrollbar_invalidate */ -static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scrollbar_invalidate_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_scrollbar_invalidate); + +/* Reusing lv_obj_scroll_to_view for lv_obj_readjust_scroll */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_readjust_scroll_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_readjust_scroll); + /* - * Struct lv_obj_class_t + * Struct lv_style_t */ -static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_style_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_class_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_class_t_type())); - return (lv_obj_class_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_t_type())); + return (lv_style_t*)self->data; } -#define mp_write_lv_obj_class_t(struct_obj) *((lv_obj_class_t*)mp_write_ptr_lv_obj_class_t(struct_obj)) +#define mp_write_lv_style_t(struct_obj) *((lv_style_t*)mp_write_ptr_lv_style_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_class_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_t(void *field) { - return lv_to_mp_struct(get_mp_lv_obj_class_t_type(), field); + return lv_to_mp_struct(get_mp_lv_style_t_type(), field); } -#define mp_read_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(copy_buffer(&field, sizeof(lv_obj_class_t))) -#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) +#define mp_read_lv_style_t(field) mp_read_ptr_lv_style_t(copy_buffer(&field, sizeof(lv_style_t))) +#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) -static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_obj_class_t *data = (lv_obj_class_t*)self->data; + GENMPY_UNUSED lv_style_t *data = (lv_style_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_obj_class_t *; - case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, (void*)data->event_cb, lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_width_def: dest[0] = mp_obj_new_int(data->width_def); break; // converting from int32_t; - case MP_QSTR_height_def: dest[0] = mp_obj_new_int(data->height_def); break; // converting from int32_t; - case MP_QSTR_editable: dest[0] = mp_obj_new_int_from_uint(data->editable); break; // converting from uint32_t; - case MP_QSTR_group_def: dest[0] = mp_obj_new_int_from_uint(data->group_def); break; // converting from uint32_t; - case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; - case MP_QSTR_theme_inheritable: dest[0] = mp_obj_new_int_from_uint(data->theme_inheritable); break; // converting from uint32_t; + case MP_QSTR_values_and_props: dest[0] = ptr_to_mp((void*)data->values_and_props); break; // converting from void *; + case MP_QSTR_has_group: dest[0] = mp_obj_new_int_from_uint(data->has_group); break; // converting from uint32_t; + case MP_QSTR_prop_cnt: dest[0] = mp_obj_new_int_from_uint(data->prop_cnt); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -11359,18 +11861,9 @@ static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_class_t *; - case MP_QSTR_constructor_cb: data->constructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_destructor_cb: data->destructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_width_def: data->width_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_height_def: data->height_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_editable: data->editable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_group_def: data->group_def = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_theme_inheritable: data->theme_inheritable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_values_and_props: data->values_and_props = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_has_group: data->has_group = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_prop_cnt: data->prop_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -11379,372 +11872,234 @@ static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_obj_class_t_print(const mp_print_t *print, +static void mp_lv_style_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_obj_class_t"); + mp_printf(print, "struct lv_style_t"); } -static const mp_obj_dict_t mp_lv_obj_class_t_locals_dict; +static const mp_obj_dict_t mp_lv_style_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_obj_class_t_type, - MP_QSTR_lv_obj_class_t, + mp_lv_style_t_type, + MP_QSTR_lv_style_t, MP_TYPE_FLAG_NONE, - print, mp_lv_obj_class_t_print, + print, mp_lv_style_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_obj_class_t_attr, - locals_dict, &mp_lv_obj_class_t_locals_dict, + attr, mp_lv_style_t_attr, + locals_dict, &mp_lv_style_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_style_t_type(void) { - return &mp_lv_obj_class_t_type; + return &mp_lv_style_t_type; } /* * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) + * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_child_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_add_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[2]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_func_ptr)(obj, idx, class_p); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_child_by_type); - -/* Reusing lv_obj_get_child for lv_obj_get_sibling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_sibling); - -/* Reusing lv_obj_get_child_by_type for lv_obj_get_sibling_by_type */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_sibling_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_add_style); /* * lvgl extension definition for: - * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) + * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_child_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_replace_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, old_style, new_style, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_mpobj, 1, mp_lv_obj_get_child_count, lv_obj_get_child_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_replace_style_mpobj, 4, mp_lv_obj_replace_style, lv_obj_replace_style); +/* Reusing lv_obj_add_style for lv_obj_remove_style */ -/* - * lvgl extension definition for: - * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) - */ - -static mp_obj_t mp_lv_obj_get_child_count_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_by_type_mpobj, 2, mp_lv_obj_get_child_count_by_type, lv_obj_get_child_count_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_remove_style); /* * lvgl extension definition for: - * int32_t lv_obj_get_index(const lv_obj_t *obj) + * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_remove_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_style_selector_t))lv_func_ptr)(obj, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_theme_mpobj, 2, mp_lv_obj_remove_theme, lv_obj_remove_theme); + +/* Reusing lv_obj_move_foreground for lv_obj_remove_style_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_all_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_remove_style_all); /* * lvgl extension definition for: - * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) + * void lv_obj_report_style_change(lv_style_t *style) */ -static mp_obj_t mp_lv_obj_get_index_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_report_style_change(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); - return mp_obj_new_int(_res); + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + ((void (*)(lv_style_t *))lv_func_ptr)(style); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_by_type_mpobj, 2, mp_lv_obj_get_index_by_type, lv_obj_get_index_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_report_style_change_mpobj, 1, mp_lv_obj_report_style_change, lv_obj_report_style_change); -/* - * Callback function lv_obj_tree_walk_cb - * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) - */ - -GENMPY_UNUSED static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = lv_to_mp((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_tree_walk_cb)), 2, mp_args); - return (int)mp_obj_get_int(callback_result); -} - - /* * lvgl extension definition for: - * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) + * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_refresh_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *cb = mp_lv_callback(mp_args[1], &lv_obj_tree_walk_cb_callback, MP_QSTR_lv_obj_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_obj_t *start_obj = mp_to_lv(mp_args[0]); - ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_func_ptr)(start_obj, cb, user_data); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_tree_walk_mpobj, 3, mp_lv_obj_tree_walk, lv_obj_tree_walk); - -/* Reusing lv_obj_move_foreground for lv_obj_dump_tree */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_dump_tree_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_dump_tree); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_style_mpobj, 3, mp_lv_obj_refresh_style, lv_obj_refresh_style); /* * lvgl extension definition for: - * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) + * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) */ -static mp_obj_t mp_lv_obj_set_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pos_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_pos); - -/* Reusing lv_obj_move_to_index for lv_obj_set_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_x_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_x); - -/* Reusing lv_obj_move_to_index for lv_obj_set_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_y_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_y); - -/* Reusing lv_obj_set_pos for lv_obj_set_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_size_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_enabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_set_style_enabled); /* * lvgl extension definition for: - * bool lv_obj_refr_size(lv_obj_t *obj) + * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_refr_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - bool _res = ((bool (*)(lv_obj_t *))lv_func_ptr)(obj); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refr_size); - -/* Reusing lv_obj_move_to_index for lv_obj_set_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_width); - -/* Reusing lv_obj_move_to_index for lv_obj_set_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_height); - -/* Reusing lv_obj_move_to_index for lv_obj_set_content_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_enabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_get_style_enabled); -/* Reusing lv_obj_move_to_index for lv_obj_set_content_height */ +/* Reusing lv_obj_set_style_enabled for lv_obj_style_set_disabled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_style_set_disabled); -/* Reusing lv_obj_delete_delayed for lv_obj_set_layout */ +/* Reusing lv_obj_get_style_enabled for lv_obj_style_get_disabled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_layout_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_set_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_style_get_disabled); /* * lvgl extension definition for: - * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) + * void lv_obj_enable_style_refresh(bool en) */ -static mp_obj_t mp_lv_obj_is_layout_positioned(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_enable_style_refresh(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - bool _res = ((bool (*)(const lv_obj_t *))lv_func_ptr)(obj); - return convert_to_bool(_res); + bool en = mp_obj_is_true(mp_args[0]); + ((void (*)(bool))lv_func_ptr)(en); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_layout_positioned_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_layout_positioned); - -/* Reusing lv_obj_move_foreground for lv_obj_mark_layout_as_dirty */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_mark_layout_as_dirty_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_mark_layout_as_dirty); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_enable_style_refresh_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_obj_enable_style_refresh); /* - * lvgl extension definition for: - * void lv_obj_update_layout(const lv_obj_t *obj) + * Struct lv_style_value_t */ -static mp_obj_t mp_lv_obj_update_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_value_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - ((void (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_value_t_type())); + return (lv_style_value_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layout_mpobj, 1, mp_lv_obj_update_layout, lv_obj_update_layout); - +#define mp_write_lv_style_value_t(struct_obj) *((lv_style_value_t*)mp_write_ptr_lv_style_value_t(struct_obj)) -/* - * lvgl extension definition for: - * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) - */ - -static mp_obj_t mp_lv_obj_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_align_t))lv_func_ptr)(obj, align); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_align_mpobj, 2, mp_lv_obj_set_align, lv_obj_set_align); - - -/* - * lvgl extension definition for: - * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) - */ - -static mp_obj_t mp_lv_obj_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t align = (int)mp_obj_get_int(mp_args[1]); - int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, align, x_ofs, y_ofs); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_mpobj, 4, mp_lv_obj_align, lv_obj_align); - - -/* - * lvgl extension definition for: - * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) - */ - -static mp_obj_t mp_lv_obj_align_to(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(mp_args[1]); - lv_align_t align = (int)mp_obj_get_int(mp_args[2]); - int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, base, align, x_ofs, y_ofs); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_to_mpobj, 5, mp_lv_obj_align_to, lv_obj_align_to); - -/* Reusing lv_obj_move_foreground for lv_obj_center */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_center_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_center); - - -/* - * Struct lv_matrix_t - */ - -static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_matrix_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_matrix_t_type())); - return (lv_matrix_t*)self->data; -} - -#define mp_write_lv_matrix_t(struct_obj) *((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_matrix_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_value_t(void *field) { - return lv_to_mp_struct(get_mp_lv_matrix_t_type(), field); + return lv_to_mp_struct(get_mp_lv_style_value_t_type(), field); } -#define mp_read_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(copy_buffer(&field, sizeof(lv_matrix_t))) -#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) +#define mp_read_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(copy_buffer(&field, sizeof(lv_style_value_t))) +#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) -static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_matrix_t *data = (lv_matrix_t*)self->data; + GENMPY_UNUSED lv_style_value_t *data = (lv_style_value_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_num: dest[0] = mp_obj_new_int(data->num); break; // converting from int32_t; + case MP_QSTR_ptr: dest[0] = ptr_to_mp((void*)data->ptr); break; // converting from void *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -11753,7 +12108,9 @@ static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - ; + case MP_QSTR_num: data->num = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ptr: data->ptr = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; default: return; } @@ -11762,1492 +12119,1111 @@ static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_matrix_t_print(const mp_print_t *print, +static void mp_lv_style_value_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_matrix_t"); + mp_printf(print, "struct lv_style_value_t"); } -static const mp_obj_dict_t mp_lv_matrix_t_locals_dict; +static const mp_obj_dict_t mp_lv_style_value_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_matrix_t_type, - MP_QSTR_lv_matrix_t, + mp_lv_style_value_t_type, + MP_QSTR_lv_style_value_t, MP_TYPE_FLAG_NONE, - print, mp_lv_matrix_t_print, + print, mp_lv_style_value_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_matrix_t_attr, - locals_dict, &mp_lv_matrix_t_locals_dict, + attr, mp_lv_style_value_t_attr, + locals_dict, &mp_lv_style_value_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void) { - return &mp_lv_matrix_t_type; + return &mp_lv_style_value_t_type; } /* * lvgl extension definition for: - * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) + * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_set_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(mp_args[1]); - ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_func_ptr)(obj, matrix); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); + return mp_read_lv_style_value_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_transform_mpobj, 2, mp_lv_obj_set_transform, lv_obj_set_transform); - -/* Reusing lv_obj_move_foreground for lv_obj_reset_transform */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_reset_transform_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_reset_transform); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop); /* * lvgl extension definition for: - * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) + * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_get_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_has_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *coords = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, coords); - return mp_const_none; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_func_ptr)(obj, selector, prop); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_coords); - -/* Reusing lv_obj_get_index for lv_obj_get_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x); - -/* Reusing lv_obj_get_index for lv_obj_get_x2 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x2); - -/* Reusing lv_obj_get_index for lv_obj_get_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y); - -/* Reusing lv_obj_get_index for lv_obj_get_y2 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y2); - -/* Reusing lv_obj_get_index for lv_obj_get_x_aligned */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x_aligned); - -/* Reusing lv_obj_get_index for lv_obj_get_y_aligned */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y_aligned); - -/* Reusing lv_obj_get_index for lv_obj_get_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_width); - -/* Reusing lv_obj_get_index for lv_obj_get_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_height); - -/* Reusing lv_obj_get_index for lv_obj_get_content_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_style_prop_mpobj, 3, mp_lv_obj_has_style_prop, lv_obj_has_style_prop); -/* Reusing lv_obj_get_index for lv_obj_get_content_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_height); - -/* Reusing lv_obj_get_coords for lv_obj_get_content_coords */ +/* + * lvgl extension definition for: + * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_content_coords); - -/* Reusing lv_obj_get_index for lv_obj_get_self_width */ +static mp_obj_t mp_lv_obj_set_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_value_t value = mp_write_lv_style_value_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_width); - -/* Reusing lv_obj_get_index for lv_obj_get_self_height */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_local_style_prop_mpobj, 4, mp_lv_obj_set_local_style_prop, lv_obj_set_local_style_prop); /* * lvgl extension definition for: - * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) + * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_style_clamped_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_obj_t *))lv_func_ptr)(obj); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_value_t *value = mp_write_ptr_lv_style_value_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_style_res_t _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_width); - -/* Reusing lv_obj_get_style_clamped_width for lv_obj_get_style_clamped_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_height); - -/* Reusing lv_obj_refr_size for lv_obj_is_width_min */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_min); - -/* Reusing lv_obj_refr_size for lv_obj_is_height_min */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_min); - -/* Reusing lv_obj_refr_size for lv_obj_is_width_max */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_max); - -/* Reusing lv_obj_refr_size for lv_obj_is_height_max */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_max); - -/* Reusing lv_obj_refr_size for lv_obj_refresh_self_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_self_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refresh_self_size); - -/* Reusing lv_obj_move_foreground for lv_obj_refr_pos */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_pos_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_refr_pos); - -/* Reusing lv_obj_set_pos for lv_obj_move_to */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_mpobj, 3, mp_lv_obj_set_pos, lv_obj_move_to); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_local_style_prop_mpobj, 4, mp_lv_obj_get_local_style_prop, lv_obj_get_local_style_prop); /* * lvgl extension definition for: - * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) + * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_move_children_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_remove_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x_diff = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y_diff = (int32_t)mp_obj_get_int(mp_args[2]); - bool ignore_floating = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_func_ptr)(obj, x_diff, y_diff, ignore_floating); - return mp_const_none; + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_func_ptr)(obj, prop, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_children_by_mpobj, 4, mp_lv_obj_move_children_by, lv_obj_move_children_by); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_local_style_prop_mpobj, 3, mp_lv_obj_remove_local_style_prop, lv_obj_remove_local_style_prop); /* * lvgl extension definition for: - * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) + * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) */ -static mp_obj_t mp_lv_obj_get_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_style_apply_color_filter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_matrix_t * _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_matrix_t((void*)_res); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_value_t v = mp_write_lv_style_value_t(mp_args[2]); + lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_func_ptr)(obj, part, v); + return mp_read_lv_style_value_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transform_mpobj, 1, mp_lv_obj_get_transform, lv_obj_get_transform); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter); /* * lvgl extension definition for: - * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) + * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) */ -static mp_obj_t mp_lv_obj_transform_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_fade_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[1]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, p, flags); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t time = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, time, delay); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_mpobj, 3, mp_lv_obj_transform_point, lv_obj_transform_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_in_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_in); +/* Reusing lv_obj_fade_in for lv_obj_fade_out */ -/* - * Array convertors for lv_point_t [] - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_out_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_out); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_width */ -GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width); - lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_t(item); - } - return (lv_point_t *)lv_arr; -} +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width */ -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t_____(lv_point_t *arr) -{ - return mp_read_ptr_lv_point_t((void*)arr); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height */ -/* - * lvgl extension definition for: - * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height */ -static mp_obj_t mp_lv_obj_transform_point_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *points = mp_arr_to_lv_point_t_____(mp_args[1]); - size_t count = (size_t)mp_obj_get_int(mp_args[2]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, points, count, flags); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_array_mpobj, 4, mp_lv_obj_transform_point_array, lv_obj_transform_point_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x */ -/* - * lvgl extension definition for: - * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y */ -static mp_obj_t mp_lv_obj_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, area, flags); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y); + +/* Reusing lv_obj_get_style_align_internal for lv_obj_get_style_align */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transformed_area_mpobj, 3, mp_lv_obj_get_transformed_area, lv_obj_get_transformed_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height */ -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x */ -static mp_obj_t mp_lv_obj_invalidate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_func_ptr)(obj, area); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_area_mpobj, 2, mp_lv_obj_invalidate_area, lv_obj_invalidate_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x */ -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y */ -static mp_obj_t mp_lv_obj_invalidate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_mpobj, 1, mp_lv_obj_invalidate, lv_obj_invalidate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y */ -/* - * lvgl extension definition for: - * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x */ -static mp_obj_t mp_lv_obj_area_is_visible(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - bool _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, area); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_area_is_visible_mpobj, 2, mp_lv_obj_area_is_visible, lv_obj_area_is_visible); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top); -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_visible */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_visible); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom); -/* Reusing lv_obj_move_to_index for lv_obj_set_ext_click_area */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_click_area_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_click_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left); -/* Reusing lv_obj_get_coords for lv_obj_get_click_area */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_click_area_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_click_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row */ -/* - * lvgl extension definition for: - * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column */ -static mp_obj_t mp_lv_obj_hit_test(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - bool _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_hit_test_mpobj, 2, mp_lv_obj_hit_test, lv_obj_hit_test); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom */ -/* - * lvgl extension definition for: - * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left */ -static mp_obj_t mp_lv_obj_calc_dynamic_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_func_ptr)(obj, prop); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_width_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color); -/* Reusing lv_obj_calc_dynamic_width for lv_obj_calc_dynamic_height */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_height_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered); +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_opa */ -/* - * lvgl extension definition for: - * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color */ -static mp_obj_t mp_lv_obj_set_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered); + +/* Reusing lv_obj_get_style_bg_grad_dir_internal for lv_obj_get_style_bg_grad_dir */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollbar_mode_mpobj, 2, mp_lv_obj_set_scrollbar_mode, lv_obj_set_scrollbar_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop */ -/* - * lvgl extension definition for: - * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop */ -static mp_obj_t mp_lv_obj_set_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_dir_t dir = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_dir_t))lv_func_ptr)(obj, dir); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_obj_set_scroll_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa); +/* Reusing lv_obj_get_style_bg_grad_internal for lv_obj_get_style_bg_grad */ -/* - * lvgl extension definition for: - * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad); + +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bg_image_src */ -static mp_obj_t mp_lv_obj_set_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scroll_snap_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_func_ptr)(obj, align); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_x_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor); -/* Reusing lv_obj_set_scroll_snap_x for lv_obj_set_scroll_snap_y */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_y_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered); +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa */ -/* - * lvgl extension definition for: - * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_bg_image_tiled */ -static mp_obj_t mp_lv_obj_get_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_scrollbar_mode_t _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_mode_mpobj, 1, mp_lv_obj_get_scrollbar_mode, lv_obj_get_scrollbar_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered); +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa */ -/* - * lvgl extension definition for: - * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width */ -static mp_obj_t mp_lv_obj_get_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width); + +/* Reusing lv_obj_get_style_border_side_internal for lv_obj_get_style_border_side */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_obj_get_scroll_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width */ -/* - * lvgl extension definition for: - * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color */ -static mp_obj_t mp_lv_obj_get_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_scroll_snap_t _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_x_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa); -/* Reusing lv_obj_get_scroll_snap_x for lv_obj_get_scroll_snap_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_y_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad); -/* Reusing lv_obj_get_index for lv_obj_get_scroll_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width); -/* Reusing lv_obj_get_index for lv_obj_get_scroll_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x); -/* Reusing lv_obj_get_index for lv_obj_get_scroll_top */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_top_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y); -/* Reusing lv_obj_get_index for lv_obj_get_scroll_bottom */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_bottom_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread); -/* Reusing lv_obj_get_index for lv_obj_get_scroll_left */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_left_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color); -/* Reusing lv_obj_get_index for lv_obj_get_scroll_right */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_right_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered); +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa */ -/* - * lvgl extension definition for: - * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa */ -static mp_obj_t mp_lv_obj_get_scroll_end(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_t *end = mp_write_ptr_lv_point_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, end); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_end_mpobj, 2, mp_lv_obj_get_scroll_end, lv_obj_get_scroll_end); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered); +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa */ -/* - * lvgl extension definition for: - * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa); + +/* Reusing lv_obj_get_style_image_colorkey_internal for lv_obj_get_style_image_colorkey */ -static mp_obj_t mp_lv_obj_scroll_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t dx = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t dy = (int32_t)mp_obj_get_int(mp_args[2]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, dx, dy, anim_en); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width); -/* Reusing lv_obj_scroll_by for lv_obj_scroll_by_bounded */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_bounded_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by_bounded); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap); -/* Reusing lv_obj_scroll_by for lv_obj_scroll_to */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_to); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded); +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color */ -/* - * lvgl extension definition for: - * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered */ -static mp_obj_t mp_lv_obj_scroll_to_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, x, anim_en); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_x_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width); -/* Reusing lv_obj_scroll_to_x for lv_obj_scroll_to_y */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_y_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa); + +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa); + +/* Reusing lv_obj_get_style_text_font_internal for lv_obj_get_style_text_font */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space); + +/* Reusing lv_obj_get_style_text_decor_internal for lv_obj_get_style_text_decor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor); + +/* Reusing lv_obj_get_style_text_align_internal for lv_obj_get_style_text_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa); + +/* Reusing lv_obj_get_style_text_leading_trim_internal for lv_obj_get_style_text_leading_trim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop); + +/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_blur_quality */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa); + +/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered); + +/* Reusing lv_obj_get_style_color_filter_dsc_internal for lv_obj_get_style_color_filter_dsc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa); + +/* Reusing lv_obj_get_style_anim_internal for lv_obj_get_style_anim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim); + +/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_anim_duration */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration); + +/* Reusing lv_obj_get_style_transition_internal for lv_obj_get_style_transition */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition); + +/* Reusing lv_obj_get_style_blend_mode_internal for lv_obj_get_style_blend_mode */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode); + +/* Reusing lv_obj_get_style_layout_internal for lv_obj_get_style_layout */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout); + +/* Reusing lv_obj_get_style_base_dir_internal for lv_obj_get_style_base_dir */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir); + +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src); + +/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity); + +/* Reusing lv_obj_get_style_flex_flow_internal for lv_obj_get_style_flex_flow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_main_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place); + +/* Reusing lv_obj_get_style_flex_grow_internal for lv_obj_get_style_flex_grow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow); + +/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_column_dsc_array */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_column_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align); + +/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span); /* * lvgl extension definition for: - * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) + * void lv_obj_set_style_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_scroll_to_view(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, anim_en); + int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_width); -/* Reusing lv_obj_scroll_to_view for lv_obj_scroll_to_view_recursive */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_min_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_recursive_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view_recursive); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_min_width); -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolling */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_max_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolling_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolling); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_max_width); -/* Reusing lv_obj_update_layout for lv_obj_stop_scroll_anim */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_stop_scroll_anim_mpobj, 1, mp_lv_obj_update_layout, lv_obj_stop_scroll_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_height); -/* Reusing lv_obj_scroll_to_view for lv_obj_update_snap */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_min_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_snap_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_update_snap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_min_height); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_max_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_max_height); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_length */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_length_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_length); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_x); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_y); /* * lvgl extension definition for: - * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor, lv_area_t *ver) + * void lv_obj_set_style_align(lv_obj_t *obj, lv_align_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_scrollbar_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_area_t *hor = mp_write_ptr_lv_area_t(mp_args[1]); - lv_area_t *ver = mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor, ver); + lv_align_t value = (int)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_align_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_area_mpobj, 3, mp_lv_obj_get_scrollbar_area, lv_obj_get_scrollbar_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_align_mpobj, 3, mp_lv_obj_set_style_align, lv_obj_set_style_align); -/* Reusing lv_obj_move_foreground for lv_obj_scrollbar_invalidate */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scrollbar_invalidate_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_scrollbar_invalidate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_width); -/* Reusing lv_obj_scroll_to_view for lv_obj_readjust_scroll */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_readjust_scroll_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_readjust_scroll); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_height); +/* Reusing lv_obj_set_style_width for lv_obj_set_style_translate_x */ -/* - * Struct lv_style_t - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_translate_x); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_translate_y */ -static inline const mp_obj_type_t *get_mp_lv_style_t_type(void); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_translate_y); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_translate_radial */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_t_type())); - return (lv_style_t*)self->data; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_radial_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_translate_radial); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_scale_x */ -#define mp_write_lv_style_t(struct_obj) *((lv_style_t*)mp_write_ptr_lv_style_t(struct_obj)) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale_x); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_scale_y */ -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_style_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale_y); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_rotation */ -#define mp_read_lv_style_t(field) mp_read_ptr_lv_style_t(copy_buffer(&field, sizeof(lv_style_t))) -#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_rotation_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_rotation); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_pivot_x */ -static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_t *data = (lv_style_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_pivot_x); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_pivot_y */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_values_and_props: dest[0] = ptr_to_mp((void*)data->values_and_props); break; // converting from void *; - case MP_QSTR_has_group: dest[0] = mp_obj_new_int_from_uint(data->has_group); break; // converting from uint32_t; - case MP_QSTR_prop_cnt: dest[0] = mp_obj_new_int_from_uint(data->prop_cnt); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_values_and_props: data->values_and_props = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_has_group: data->has_group = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_prop_cnt: data->prop_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_pivot_y); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_skew_x */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_skew_x); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_skew_y */ -static void mp_lv_style_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_style_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_skew_y); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_top */ -static const mp_obj_dict_t mp_lv_style_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_top_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_top); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_bottom */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_t_type, - MP_QSTR_lv_style_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_style_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_style_t_attr, - locals_dict, &mp_lv_style_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_bottom_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_bottom); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_left */ -static inline const mp_obj_type_t *get_mp_lv_style_t_type(void) -{ - return &mp_lv_style_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_left_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_left); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_right_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_right); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_row */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_row_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_row); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_column */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_column_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_column); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_radial */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_radial_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_radial); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_top_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_top); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_bottom_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_bottom); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_left_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_left); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_right_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_right); /* * lvgl extension definition for: - * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + * void lv_obj_set_style_bg_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_add_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_bg_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_color_t value = mp_write_lv_color_t(mp_args[1]); lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_add_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_bg_color); /* * lvgl extension definition for: - * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) + * void lv_obj_set_style_bg_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_replace_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, old_style, new_style, selector); - return convert_to_bool(_res); + lv_opa_t value = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_replace_style_mpobj, 4, mp_lv_obj_replace_style, lv_obj_replace_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_opa); -/* Reusing lv_obj_add_style for lv_obj_remove_style */ +/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_bg_grad_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_remove_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_bg_grad_color); /* * lvgl extension definition for: - * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) + * void lv_obj_set_style_bg_grad_dir(lv_obj_t *obj, lv_grad_dir_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_remove_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_style_selector_t))lv_func_ptr)(obj, selector); + lv_grad_dir_t value = (int)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_grad_dir_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_theme_mpobj, 2, mp_lv_obj_remove_theme, lv_obj_remove_theme); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_dir_mpobj, 3, mp_lv_obj_set_style_bg_grad_dir, lv_obj_set_style_bg_grad_dir); -/* Reusing lv_obj_move_foreground for lv_obj_remove_style_all */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_bg_main_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_all_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_remove_style_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_main_stop_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_bg_main_stop); +/* Reusing lv_obj_set_style_width for lv_obj_set_style_bg_grad_stop */ -/* - * lvgl extension definition for: - * void lv_obj_report_style_change(lv_style_t *style) - */ - -static mp_obj_t mp_lv_obj_report_style_change(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - ((void (*)(lv_style_t *))lv_func_ptr)(style); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_stop_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_bg_grad_stop); + +/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_main_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_main_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_main_opa); + +/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_grad_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_report_style_change_mpobj, 1, mp_lv_obj_report_style_change, lv_obj_report_style_change); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_grad_opa); /* * lvgl extension definition for: - * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) + * void lv_obj_set_style_bg_grad(lv_obj_t *obj, const lv_grad_dsc_t *value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_refresh_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); + const lv_grad_dsc_t *value = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const lv_grad_dsc_t *, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_style_mpobj, 3, mp_lv_obj_refresh_style, lv_obj_refresh_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_mpobj, 3, mp_lv_obj_set_style_bg_grad, lv_obj_set_style_bg_grad); /* * lvgl extension definition for: - * void lv_obj_style_set_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool dis) + * void lv_obj_set_style_bg_image_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_style_set_disabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_bg_image_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + const void *value = (const void *)mp_to_ptr(mp_args[1]); lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool dis = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, dis); + ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_style_set_disabled, lv_obj_style_set_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_src_mpobj, 3, mp_lv_obj_set_style_bg_image_src, lv_obj_set_style_bg_image_src); + +/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_image_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_image_opa); + +/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_bg_image_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_recolor_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_bg_image_recolor); + +/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_image_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_recolor_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_image_recolor_opa); /* * lvgl extension definition for: - * bool lv_obj_style_get_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + * void lv_obj_set_style_bg_image_tiled(lv_obj_t *obj, bool value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_style_get_disabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_bg_image_tiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + bool value = mp_obj_is_true(mp_args[1]); lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); - return convert_to_bool(_res); + ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_func_ptr)(obj, value, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_style_get_disabled, lv_obj_style_get_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_tiled_mpobj, 3, mp_lv_obj_set_style_bg_image_tiled, lv_obj_set_style_bg_image_tiled); + +/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_border_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_border_color); + +/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_border_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_border_opa); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_border_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_border_width); /* * lvgl extension definition for: - * void lv_obj_enable_style_refresh(bool en) + * void lv_obj_set_style_border_side(lv_obj_t *obj, lv_border_side_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_enable_style_refresh(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_border_side(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - bool en = mp_obj_is_true(mp_args[0]); - ((void (*)(bool))lv_func_ptr)(en); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_border_side_t value = (int)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_border_side_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_enable_style_refresh_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_obj_enable_style_refresh); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_side_mpobj, 3, mp_lv_obj_set_style_border_side, lv_obj_set_style_border_side); +/* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_border_post */ -/* - * Struct lv_style_value_t - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_post_mpobj, 3, mp_lv_obj_set_style_bg_image_tiled, lv_obj_set_style_border_post); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_outline_width */ -static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_outline_width); + +/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_outline_color */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_value_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_value_t_type())); - return (lv_style_value_t*)self->data; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_outline_color); + +/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_outline_opa */ -#define mp_write_lv_style_value_t(struct_obj) *((lv_style_value_t*)mp_write_ptr_lv_style_value_t(struct_obj)) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_outline_opa); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_outline_pad */ -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_value_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_style_value_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_pad_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_outline_pad); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_width */ -#define mp_read_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(copy_buffer(&field, sizeof(lv_style_value_t))) -#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_width); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_offset_x */ -static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_value_t *data = (lv_style_value_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_offset_x); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_offset_y */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_num: dest[0] = mp_obj_new_int(data->num); break; // converting from int32_t; - case MP_QSTR_ptr: dest[0] = ptr_to_mp((void*)data->ptr); break; // converting from void *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_num: data->num = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ptr: data->ptr = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_style_value_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_style_value_t"); -} - -static const mp_obj_dict_t mp_lv_style_value_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_value_t_type, - MP_QSTR_lv_style_value_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_style_value_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_style_value_t_attr, - locals_dict, &mp_lv_style_value_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void) -{ - return &mp_lv_style_value_t_type; -} - - -/* - * lvgl extension definition for: - * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) - */ - -static mp_obj_t mp_lv_obj_get_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); - return mp_read_lv_style_value_t(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop); - - -/* - * lvgl extension definition for: - * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) - */ - -static mp_obj_t mp_lv_obj_has_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_func_ptr)(obj, selector, prop); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_style_prop_mpobj, 3, mp_lv_obj_has_style_prop, lv_obj_has_style_prop); - - -/* - * lvgl extension definition for: - * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_value_t value = mp_write_lv_style_value_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_local_style_prop_mpobj, 4, mp_lv_obj_set_local_style_prop, lv_obj_set_local_style_prop); - - -/* - * lvgl extension definition for: - * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_get_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_value_t *value = mp_write_ptr_lv_style_value_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_style_res_t _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_local_style_prop_mpobj, 4, mp_lv_obj_get_local_style_prop, lv_obj_get_local_style_prop); - - -/* - * lvgl extension definition for: - * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_remove_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_func_ptr)(obj, prop, selector); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_local_style_prop_mpobj, 3, mp_lv_obj_remove_local_style_prop, lv_obj_remove_local_style_prop); - - -/* - * lvgl extension definition for: - * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) - */ - -static mp_obj_t mp_lv_obj_style_apply_color_filter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_value_t v = mp_write_lv_style_value_t(mp_args[2]); - lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_func_ptr)(obj, part, v); - return mp_read_lv_style_value_t(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter); - - -/* - * lvgl extension definition for: - * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) - */ - -static mp_obj_t mp_lv_obj_fade_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t time = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, time, delay); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_in_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_in); - -/* Reusing lv_obj_fade_in for lv_obj_fade_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_out_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_out); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_width); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_min_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_min_width); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_max_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_max_width); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_height); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_min_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_min_height); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_max_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_max_height); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_length */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_length_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_length); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_y); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_align(lv_obj_t *obj, lv_align_t value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t value = (int)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_align_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_align_mpobj, 3, mp_lv_obj_set_style_align, lv_obj_set_style_align); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_width); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_height); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_translate_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_translate_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_translate_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_translate_y); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_translate_radial */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_radial_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_translate_radial); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_scale_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_scale_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_scale_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_scale_y); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_rotation_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_rotation); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_pivot_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_pivot_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_pivot_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_pivot_y); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_skew_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_skew_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_skew_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_skew_y); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_top */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_top_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_top); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_bottom */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_bottom_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_bottom); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_left */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_left_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_left); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_right_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_right); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_row */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_row_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_row); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_column */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_column_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_column); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_radial */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_radial_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_radial); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_top */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_top_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_top); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_bottom */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_bottom_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_bottom); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_left */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_left_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_left); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_right_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_right); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_bg_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_bg_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_t value = mp_write_lv_color_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_bg_color); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_bg_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_opa_t value = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_opa); - -/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_bg_grad_color */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_bg_grad_color); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_bg_grad_dir(lv_obj_t *obj, lv_grad_dir_t value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_grad_dir_t value = (int)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_grad_dir_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_dir_mpobj, 3, mp_lv_obj_set_style_bg_grad_dir, lv_obj_set_style_bg_grad_dir); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_bg_main_stop */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_main_stop_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_bg_main_stop); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_bg_grad_stop */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_stop_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_bg_grad_stop); - -/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_main_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_main_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_main_opa); - -/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_grad_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_grad_opa); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_bg_grad(lv_obj_t *obj, const lv_grad_dsc_t *value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_grad_dsc_t *value = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const lv_grad_dsc_t *, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_mpobj, 3, mp_lv_obj_set_style_bg_grad, lv_obj_set_style_bg_grad); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_bg_image_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_bg_image_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void *value = (const void *)mp_to_ptr(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_src_mpobj, 3, mp_lv_obj_set_style_bg_image_src, lv_obj_set_style_bg_image_src); - -/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_image_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_image_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_offset_y); -/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_bg_image_recolor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_recolor_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_bg_image_recolor); - -/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_image_recolor_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_recolor_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_bg_image_recolor_opa); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_bg_image_tiled(lv_obj_t *obj, bool value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_bg_image_tiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - bool value = mp_obj_is_true(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_image_tiled_mpobj, 3, mp_lv_obj_set_style_bg_image_tiled, lv_obj_set_style_bg_image_tiled); - -/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_border_color */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_border_color); - -/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_border_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_border_opa); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_border_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_border_width); - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_border_side(lv_obj_t *obj, lv_border_side_t value, lv_style_selector_t selector) - */ - -static mp_obj_t mp_lv_obj_set_style_border_side(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_border_side_t value = (int)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_border_side_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_side_mpobj, 3, mp_lv_obj_set_style_border_side, lv_obj_set_style_border_side); - -/* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_border_post */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_post_mpobj, 3, mp_lv_obj_set_style_bg_image_tiled, lv_obj_set_style_border_post); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_outline_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_outline_width); - -/* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_outline_color */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_outline_color); - -/* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_outline_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_outline_opa); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_outline_pad */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_pad_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_outline_pad); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_width); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_offset_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_offset_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_offset_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_offset_y); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_spread */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_spread_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_spread); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_spread_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_spread); /* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_shadow_color */ @@ -13288,17 +13264,17 @@ static mp_obj_t mp_lv_obj_set_style_image_colorkey(size_t mp_n_args, const mp_ob static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_image_colorkey_mpobj, 3, mp_lv_obj_set_style_image_colorkey, lv_obj_set_style_image_colorkey); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_line_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_line_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_line_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_line_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_line_dash_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_line_dash_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_line_dash_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_line_dash_gap */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_gap_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_line_dash_gap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_gap_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_line_dash_gap); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_line_rounded */ @@ -13312,9 +13288,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_color_mpobj, 3, m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_line_opa); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_arc_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_arc_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_arc_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_arc_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_arc_width); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_arc_rounded */ @@ -13359,13 +13335,13 @@ static mp_obj_t mp_lv_obj_set_style_text_font(size_t mp_n_args, const mp_obj_t * static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_font_mpobj, 3, mp_lv_obj_set_style_text_font, lv_obj_set_style_text_font); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_text_letter_space */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_text_letter_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_letter_space_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_text_letter_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_letter_space_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_text_letter_space); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_text_line_space */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_text_line_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_line_space_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_text_line_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_line_space_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_text_line_space); /* @@ -13409,17 +13385,36 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_align_mpobj, 3, m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_text_outline_stroke_color); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_text_outline_stroke_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_text_outline_stroke_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_text_outline_stroke_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_text_outline_stroke_width); /* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_text_outline_stroke_opa */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_text_outline_stroke_opa); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_blur_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_blur_radius_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_blur_radius); +/* + * lvgl extension definition for: + * void lv_obj_set_style_text_leading_trim(lv_obj_t *obj, lv_text_leading_trim_t value, lv_style_selector_t selector) + */ + +static mp_obj_t mp_lv_obj_set_style_text_leading_trim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_text_leading_trim_t value = (int)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_text_leading_trim_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_leading_trim_mpobj, 3, mp_lv_obj_set_style_text_leading_trim, lv_obj_set_style_text_leading_trim); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_blur_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_blur_radius_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_blur_radius); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_blur_backdrop */ @@ -13444,17 +13439,17 @@ static mp_obj_t mp_lv_obj_set_style_blur_quality(size_t mp_n_args, const mp_obj_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_blur_quality_mpobj, 3, mp_lv_obj_set_style_blur_quality, lv_obj_set_style_blur_quality); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_drop_shadow_radius */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_drop_shadow_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_radius_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_drop_shadow_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_radius_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_drop_shadow_radius); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_drop_shadow_offset_x */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_drop_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_drop_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_drop_shadow_offset_x); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_drop_shadow_offset_y */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_drop_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_drop_shadow_offset_y); /* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_drop_shadow_color */ @@ -13468,13 +13463,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_opa_mpobj, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_quality_mpobj, 3, mp_lv_obj_set_style_blur_quality, lv_obj_set_style_drop_shadow_quality); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_radius */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radius_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radius_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_radius); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_radial_offset */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_radial_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radial_offset_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radial_offset_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_radial_offset); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_clip_corner */ @@ -13752,75 +13747,136 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_row_dsc_array_mpo static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_row_align_mpobj, 3, mp_lv_obj_set_style_grid_column_align, lv_obj_set_style_grid_row_align); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_column_pos */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_column_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_pos_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_column_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_pos_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_column_pos); /* Reusing lv_obj_set_style_grid_column_align for lv_obj_set_style_grid_cell_x_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_x_align_mpobj, 3, mp_lv_obj_set_style_grid_column_align, lv_obj_set_style_grid_cell_x_align); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_column_span */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_column_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_span_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_column_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_span_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_column_span); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_row_pos */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_row_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_pos_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_row_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_pos_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_row_pos); /* Reusing lv_obj_set_style_grid_column_align for lv_obj_set_style_grid_cell_y_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_y_align_mpobj, 3, mp_lv_obj_set_style_grid_column_align, lv_obj_set_style_grid_cell_y_align); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_row_span */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_row_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_span_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_row_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_span_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_row_span); +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_all */ -/* - * lvgl extension definition for: - * lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t *obj, lv_part_t part, const char *txt) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_all_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_all); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_hor */ -static mp_obj_t mp_lv_obj_calculate_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_hor_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_hor); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_ver */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_ver_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_ver); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_all_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_all); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_hor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align, lv_obj_calculate_style_text_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_hor_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_hor); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_recursive */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_ver */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_recursive); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_ver_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_ver); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_gap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_gap_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_gap); /* * lvgl extension definition for: - * lv_color32_t lv_obj_style_apply_recolor(const lv_obj_t *obj, lv_part_t part, lv_color32_t color) + * void lv_obj_set_style_size(lv_obj_t *obj, int32_t width, int32_t height, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_style_apply_recolor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); - lv_color32_t _res = ((lv_color32_t (*)(const lv_obj_t *, lv_part_t, lv_color32_t))lv_func_ptr)(obj, part, color); - return mp_read_lv_color32_t(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_style_selector_t))lv_func_ptr)(obj, width, height, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_recolor_mpobj, 3, mp_lv_obj_style_apply_recolor, lv_obj_style_apply_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_size_mpobj, 4, mp_lv_obj_set_style_size, lv_obj_set_style_size); +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_scale */ -/* - * lvgl extension definition for: +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom); + +/* Reusing lv_obj_calculate_style_text_align_internal for lv_obj_calculate_style_text_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_recursive */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_recursive); + + +/* + * lvgl extension definition for: + * lv_color32_t lv_obj_style_apply_recolor(const lv_obj_t *obj, lv_part_t part, lv_color32_t color) + */ + +static mp_obj_t mp_lv_obj_style_apply_recolor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); + lv_color32_t _res = ((lv_color32_t (*)(const lv_obj_t *, lv_part_t, lv_color32_t))lv_func_ptr)(obj, part, color); + return mp_read_lv_color32_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_recolor_mpobj, 3, mp_lv_obj_style_apply_recolor, lv_obj_style_apply_recolor); + + +/* + * lvgl extension definition for: * lv_color32_t lv_obj_get_style_recolor_recursive(const lv_obj_t *obj, lv_part_t part) */ @@ -14037,6 +14093,34 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_observer_cb_t_mpobj, GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_observer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_observer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } static void lv_observer_t_cb_callback(lv_observer_t *observer, lv_subject_t *subject); +#define funcptr_user_cb NULL + + +/* + * lvgl extension definition for: + * void user_cb(void) + */ + +static mp_obj_t mp_funcptr_user_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + ((void (*)(void))lv_func_ptr)(); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_user_cb_mpobj, 0, mp_funcptr_user_cb, funcptr_user_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_user_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_user_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_observer_t_user_cb_callback' + * void (*user_cb)(void) + */ + /* * Struct lv_observer_t @@ -14073,6 +14157,7 @@ static void mp_lv_observer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) case MP_QSTR_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_observer_cb_t_mpobj, data->cb, lv_observer_t_cb_callback ,MP_QSTR_lv_observer_t_cb, data->user_data); break; // converting from callback lv_observer_cb_t; case MP_QSTR_target: dest[0] = ptr_to_mp((void*)data->target); break; // converting from void *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_user_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_user_cb_mpobj, (void*)data->user_cb, NULL ,MP_QSTR_lv_observer_t_user_cb, NULL); break; // converting from callback void (*)(void); case MP_QSTR_auto_free_user_data: dest[0] = mp_obj_new_int_from_uint(data->auto_free_user_data); break; // converting from uint32_t; case MP_QSTR_notified: dest[0] = mp_obj_new_int_from_uint(data->notified); break; // converting from uint32_t; case MP_QSTR_for_obj: dest[0] = mp_obj_new_int_from_uint(data->for_obj); break; // converting from uint32_t; @@ -14088,6 +14173,7 @@ static void mp_lv_observer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) case MP_QSTR_cb: data->cb = mp_lv_callback(dest[1], lv_observer_t_cb_callback ,MP_QSTR_lv_observer_t_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_observer_cb_t; case MP_QSTR_target: data->target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_user_cb: data->user_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_observer_t_user_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(void); case MP_QSTR_auto_free_user_data: data->auto_free_user_data = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; case MP_QSTR_notified: data->notified = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; case MP_QSTR_for_obj: data->for_obj = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; @@ -15372,6 +15458,10 @@ static mp_obj_t mp_lv_obj_init_draw_blur_dsc(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_init_draw_blur_dsc_mpobj, 3, mp_lv_obj_init_draw_blur_dsc, lv_obj_init_draw_blur_dsc); +/* Reusing lv_obj_move_to_index for lv_obj_set_ext_draw_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_draw_size_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_draw_size); + /* * lvgl extension definition for: @@ -15416,13 +15506,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_class_create_obj_mpobj, 2, mp_lv static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_class_init_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_class_init_obj); -/* Reusing lv_obj_refr_size for lv_obj_is_editable */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_editable */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_editable_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_editable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_editable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_editable); -/* Reusing lv_obj_refr_size for lv_obj_is_group_def */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_group_def */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_group_def_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_group_def); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_group_def_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_group_def); /* @@ -15773,6 +15863,124 @@ static mp_obj_t mp_lv_obj_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, vo static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flag_mpobj, 3, mp_lv_obj_set_flag, lv_obj_set_flag); +/* + * lvgl extension definition for: + * void lv_obj_set_hidden(lv_obj_t *obj, bool en) + */ + +static mp_obj_t mp_lv_obj_set_hidden(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + bool en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_obj_t *, bool))lv_func_ptr)(obj, en); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_hidden_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_hidden); + +/* Reusing lv_obj_set_hidden for lv_obj_set_clickable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_clickable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_clickable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_click_focusable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_click_focusable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_click_focusable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_checkable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_checkable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_checkable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scrollable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scrollable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_elastic */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_elastic_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_elastic); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_momentum */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_momentum_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_momentum); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_one */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_one_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_one); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_chain */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_chain_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_chain); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_chain_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_chain_hor_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_chain_hor); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_chain_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_chain_ver_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_chain_ver); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_on_focus */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_on_focus_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_on_focus); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_with_arrow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_with_arrow_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_with_arrow); + +/* Reusing lv_obj_set_hidden for lv_obj_set_snappable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_snappable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_snappable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_press_lock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_press_lock_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_press_lock); + +/* Reusing lv_obj_set_hidden for lv_obj_set_event_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_event_bubble_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_event_bubble); + +/* Reusing lv_obj_set_hidden for lv_obj_set_gesture_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_gesture_bubble_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_gesture_bubble); + +/* Reusing lv_obj_set_hidden for lv_obj_set_adv_hittest */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_adv_hittest_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_adv_hittest); + +/* Reusing lv_obj_set_hidden for lv_obj_set_ignore_layout */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ignore_layout_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_ignore_layout); + +/* Reusing lv_obj_set_hidden for lv_obj_set_floating */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_floating_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_floating); + +/* Reusing lv_obj_set_hidden for lv_obj_set_send_draw_task_events */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_send_draw_task_events_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_send_draw_task_events); + +/* Reusing lv_obj_set_hidden for lv_obj_set_overflow_visible */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_overflow_visible_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_overflow_visible); + +/* Reusing lv_obj_set_hidden for lv_obj_set_event_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_event_trickle_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_event_trickle); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_trickle_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_trickle); + +/* Reusing lv_obj_set_hidden for lv_obj_set_radio_button */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_radio_button_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_radio_button); + +/* Reusing lv_obj_set_hidden for lv_obj_set_flex_in_new_track */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_in_new_track_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_flex_in_new_track); + + /* * lvgl extension definition for: * void lv_obj_add_state(lv_obj_t *obj, lv_state_t state) @@ -15813,6 +16021,58 @@ static mp_obj_t mp_lv_obj_set_state(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_mpobj, 3, mp_lv_obj_set_state, lv_obj_set_state); +/* Reusing lv_obj_set_hidden for lv_obj_set_alt */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_alt_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_alt); + +/* Reusing lv_obj_set_hidden for lv_obj_set_checked */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_checked_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_checked); + +/* Reusing lv_obj_set_hidden for lv_obj_set_focused */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_focused_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_focused); + +/* Reusing lv_obj_set_hidden for lv_obj_set_focus_key */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_focus_key_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_focus_key); + +/* Reusing lv_obj_set_hidden for lv_obj_set_edited */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_edited_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_edited); + +/* Reusing lv_obj_set_hidden for lv_obj_set_hovered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_hovered_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_hovered); + +/* Reusing lv_obj_set_hidden for lv_obj_set_pressed */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pressed_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_pressed); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scrolled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrolled_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scrolled); + +/* Reusing lv_obj_set_hidden for lv_obj_set_disabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_disabled_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_disabled); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_1 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_1_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_1); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_2 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_2_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_2); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_3 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_3_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_3); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_4 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_4_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_4); + /* * lvgl extension definition for: @@ -15834,20 +16094,21 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_user_data_mpobj, 2, mp_lv_ob /* * lvgl extension definition for: - * void lv_obj_set_radio_button(lv_obj_t *obj, bool en) + * void lv_obj_set_user_flag(lv_obj_t *obj, uint32_t bit, bool v) */ -static mp_obj_t mp_lv_obj_set_radio_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_user_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - bool en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_obj_t *, bool))lv_func_ptr)(obj, en); + uint32_t bit = (uint32_t)mp_obj_get_int(mp_args[1]); + bool v = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, bool))lv_func_ptr)(obj, bit, v); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_radio_button_mpobj, 2, mp_lv_obj_set_radio_button, lv_obj_set_radio_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_user_flag_mpobj, 3, mp_lv_obj_set_user_flag, lv_obj_set_user_flag); /* @@ -15871,6 +16132,106 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_flag_mpobj, 2, mp_lv_obj_has static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_flag_any_mpobj, 2, mp_lv_obj_has_flag, lv_obj_has_flag_any); +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_hidden */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_hidden_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_hidden); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_clickable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_clickable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_clickable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_click_focusable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_click_focusable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_click_focusable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_checkable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_checkable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_checkable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrollable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrollable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrollable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_elastic */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_elastic_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_elastic); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_momentum */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_momentum_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_momentum); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_one */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_one_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_one); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_chain_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_chain_hor_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_chain_hor); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_chain_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_chain_ver_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_chain_ver); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_on_focus */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_on_focus_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_on_focus); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_with_arrow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_with_arrow_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_with_arrow); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_snappable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_snappable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_snappable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_press_lock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_press_lock_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_press_lock); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_event_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_event_bubble_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_event_bubble); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_gesture_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_gesture_bubble_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_gesture_bubble); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_adv_hittest */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_adv_hittest_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_adv_hittest); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_ignore_layout */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_ignore_layout_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_ignore_layout); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_floating */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_floating_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_floating); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_send_draw_task_events */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_send_draw_task_events_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_send_draw_task_events); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_overflow_visible */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_overflow_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_overflow_visible); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_event_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_event_trickle_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_event_trickle); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_trickle_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_trickle); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_radio_button */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_radio_button_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_radio_button); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_flex_in_new_track */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_flex_in_new_track_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_flex_in_new_track); + /* * lvgl extension definition for: @@ -15906,9 +16267,57 @@ static mp_obj_t mp_lv_obj_has_state(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_state_mpobj, 2, mp_lv_obj_has_state, lv_obj_has_state); -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_radio_button */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_alt */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_radio_button_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_radio_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_alt_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_alt); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_checked */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_checked_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_checked); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_focused */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_focused_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_focused); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_focus_key */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_focus_key_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_focus_key); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_edited */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_edited_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_edited); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_hovered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_hovered_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_hovered); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_pressed */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_pressed_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_pressed); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolled_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolled); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_disabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_disabled_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_disabled); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_1 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_1_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_1); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_2 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_2_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_2); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_3 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_3_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_3); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_4 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_4_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_4); #define funcptr_lv_group_focus_cb_t NULL @@ -16083,9 +16492,9 @@ static mp_obj_t mp_lv_obj_get_user_data(size_t mp_n_args, const mp_obj_t *mp_arg static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_user_data_mpobj, 1, mp_lv_obj_get_user_data, lv_obj_get_user_data); -/* Reusing lv_obj_move_foreground for lv_obj_allocate_spec_attr */ +/* Reusing lv_obj_remove_event for lv_obj_get_user_flag */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_allocate_spec_attr_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_allocate_spec_attr); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_user_flag_mpobj, 2, mp_lv_obj_remove_event, lv_obj_get_user_flag); /* @@ -16126,9 +16535,9 @@ static mp_obj_t mp_lv_obj_get_class(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_class_mpobj, 1, mp_lv_obj_get_class, lv_obj_get_class); -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_valid */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_in_widget_tree */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_valid_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_valid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_in_widget_tree_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_in_widget_tree); /* @@ -16148,6 +16557,135 @@ static mp_obj_t mp_lv_obj_null_on_delete(size_t mp_n_args, const mp_obj_t *mp_ar static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_null_on_delete_mpobj, 1, mp_lv_obj_null_on_delete, lv_obj_null_on_delete); +/* + * Struct lv_delete_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_delete_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_delete_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_delete_dsc_t_type())); + return (lv_delete_dsc_t*)self->data; +} + +#define mp_write_lv_delete_dsc_t(struct_obj) *((lv_delete_dsc_t*)mp_write_ptr_lv_delete_dsc_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_delete_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_delete_dsc_t_type(), field); +} + +#define mp_read_lv_delete_dsc_t(field) mp_read_ptr_lv_delete_dsc_t(copy_buffer(&field, sizeof(lv_delete_dsc_t))) +#define mp_read_byref_lv_delete_dsc_t(field) mp_read_ptr_lv_delete_dsc_t(&field) + +static void mp_lv_delete_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_delete_dsc_t *data = (lv_delete_dsc_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + ; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + ; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_delete_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_delete_dsc_t"); +} + +static const mp_obj_dict_t mp_lv_delete_dsc_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_delete_dsc_t_type, + MP_QSTR_lv_delete_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_delete_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_delete_dsc_t_attr, + locals_dict, &mp_lv_delete_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_delete_dsc_t_type(void) +{ + return &mp_lv_delete_dsc_t_type; +} + + +/* + * Callback function lv_obj_add_delete_cb_cb + * void lv_delete_cb_t(void *user_data) + */ + +GENMPY_UNUSED static void lv_obj_add_delete_cb_cb_callback(void *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_add_delete_cb_cb)), 1, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_delete_dsc_t *lv_obj_add_delete_cb(lv_obj_t *obj, lv_delete_cb_t cb, void *user_data) + */ + +static mp_obj_t mp_lv_obj_add_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + void *cb = mp_lv_callback(mp_args[1], &lv_obj_add_delete_cb_cb_callback, MP_QSTR_lv_obj_add_delete_cb_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_delete_dsc_t * _res = ((lv_delete_dsc_t *(*)(lv_obj_t *, lv_delete_cb_t, void *))lv_func_ptr)(obj, cb, user_data); + return mp_read_ptr_lv_delete_dsc_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_delete_cb_mpobj, 3, mp_lv_obj_add_delete_cb, lv_obj_add_delete_cb); + + +/* + * lvgl extension definition for: + * void lv_obj_remove_delete_cb(lv_delete_dsc_t *dsc) + */ + +static mp_obj_t mp_lv_obj_remove_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_delete_dsc_t *dsc = mp_write_ptr_lv_delete_dsc_t(mp_args[0]); + ((void (*)(lv_delete_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_remove_delete_cb_mpobj, 1, mp_lv_obj_remove_delete_cb, lv_obj_remove_delete_cb); + + /* * lvgl extension definition for: * void lv_obj_add_screen_load_event(lv_obj_t *obj, lv_event_code_t trigger, lv_obj_t *screen, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay) @@ -16417,24 +16955,6 @@ static mp_obj_t mp_lv_obj_add_play_timeline_event(size_t mp_n_args, const mp_obj static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_play_timeline_event_mpobj, 5, mp_lv_obj_add_play_timeline_event, lv_obj_add_play_timeline_event); -/* - * lvgl extension definition for: - * void lv_obj_redraw(lv_layer_t *layer, lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_redraw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - ((void (*)(lv_layer_t *, lv_obj_t *))lv_func_ptr)(layer, obj); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_redraw_mpobj, 2, mp_lv_obj_redraw, lv_obj_redraw); - - /* * lvgl extension definition for: * void lv_obj_remove_from_subject(lv_obj_t *obj, lv_subject_t *subject) @@ -16680,6 +17200,216 @@ static mp_obj_t mp_lv_obj_add_subject_set_string_event(size_t mp_n_args, const m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_subject_set_string_event_mpobj, 4, mp_lv_obj_add_subject_set_string_event, lv_obj_add_subject_set_string_event); +/* + * Callback function lv_obj_t_set_bool_cb + * void lv_obj_set_bool_t(lv_obj_t *obj, bool value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_bool_cb_callback(lv_obj_t *arg0, bool arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = convert_to_bool(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_bool_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_bool(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_bool_t set_bool_cb) + */ + +static mp_obj_t mp_lv_obj_bind_bool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_bool_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_bool_cb_callback, MP_QSTR_lv_obj_t_set_bool_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_bool_t))lv_func_ptr)(obj, subject, set_bool_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_bool_mpobj, 3, mp_lv_obj_bind_bool, lv_obj_bind_bool); + + +/* + * Callback function lv_obj_t_set_int_cb + * void lv_obj_set_int_t(lv_obj_t *obj, int32_t value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_int_cb_callback(lv_obj_t *arg0, int32_t arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_int_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_int(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_int_t set_int_cb) + */ + +static mp_obj_t mp_lv_obj_bind_int(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_int_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_int_cb_callback, MP_QSTR_lv_obj_t_set_int_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_int_t))lv_func_ptr)(obj, subject, set_int_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_int_mpobj, 3, mp_lv_obj_bind_int, lv_obj_bind_int); + + +/* + * Callback function lv_obj_t_set_float_cb + * void lv_obj_set_float_t(lv_obj_t *obj, float value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_float_cb_callback(lv_obj_t *arg0, float arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = mp_obj_new_float_from_f(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_float_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_float(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_float_t set_float_cb) + */ + +static mp_obj_t mp_lv_obj_bind_float(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_float_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_float_cb_callback, MP_QSTR_lv_obj_t_set_float_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_float_t))lv_func_ptr)(obj, subject, set_float_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_float_mpobj, 3, mp_lv_obj_bind_float, lv_obj_bind_float); + + +/* + * Callback function lv_obj_t_set_string_cb + * void lv_obj_set_string_t(lv_obj_t *obj, const char *value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_string_cb_callback(lv_obj_t *arg0, const char *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = convert_to_str((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_string_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_string(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_string_t set_string_cb) + */ + +static mp_obj_t mp_lv_obj_bind_string(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_string_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_string_cb_callback, MP_QSTR_lv_obj_t_set_string_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_string_t))lv_func_ptr)(obj, subject, set_string_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_string_mpobj, 3, mp_lv_obj_bind_string, lv_obj_bind_string); + + +/* + * Callback function lv_obj_t_set_color_cb + * void lv_obj_set_color_t(lv_obj_t *obj, lv_color_t value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_color_cb_callback(lv_obj_t *arg0, lv_color_t arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_color_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_color(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_color_t set_color_cb) + */ + +static mp_obj_t mp_lv_obj_bind_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_color_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_color_cb_callback, MP_QSTR_lv_obj_t_set_color_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_color_t))lv_func_ptr)(obj, subject, set_color_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_color_mpobj, 3, mp_lv_obj_bind_color, lv_obj_bind_color); + + +/* + * Callback function lv_obj_t_set_pointer_cb + * void lv_obj_set_pointer_t(lv_obj_t *obj, const void *value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_pointer_cb_callback(lv_obj_t *arg0, const void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_pointer_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_pointer(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_pointer_t set_pointer_cb) + */ + +static mp_obj_t mp_lv_obj_bind_pointer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_pointer_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_pointer_cb_callback, MP_QSTR_lv_obj_t_set_pointer_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_pointer_t))lv_func_ptr)(obj, subject, set_pointer_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_pointer_mpobj, 3, mp_lv_obj_bind_pointer, lv_obj_bind_pointer); + + /* * lvgl extension definition for: * lv_observer_t *lv_obj_bind_flag_if_eq(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) @@ -16777,30 +17507,222 @@ static mp_obj_t mp_lv_obj_bind_checked(size_t mp_n_args, const mp_obj_t *mp_args static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_checked_mpobj, 2, mp_lv_obj_bind_checked, lv_obj_bind_checked); -/* Reusing lv_obj_redraw for lv_obj_refr */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_refr_mpobj, 2, mp_lv_obj_redraw, lv_obj_refr); +/* + * lvgl extension definition for: + * void lv_obj_redraw(lv_layer_t *layer, lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_redraw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + ((void (*)(lv_layer_t *, lv_obj_t *))lv_func_ptr)(layer, obj); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_redraw_mpobj, 2, mp_lv_obj_redraw, lv_obj_redraw); + +/* Reusing lv_obj_move_foreground for lv_obj_destruct */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_destruct_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_destruct); + +/* Reusing lv_obj_get_index for lv_obj_get_ext_draw_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_ext_draw_size_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_ext_draw_size); /* * lvgl extension definition for: - * void lv_obj_style_init(void) + * lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_style_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_layer_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_layer_type_t _res = ((lv_layer_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_layer_type_mpobj, 1, mp_lv_obj_get_layer_type, lv_obj_get_layer_type); - ((void (*)(void))lv_func_ptr)(); - return mp_const_none; + +/* + * Struct lv_obj_spec_attr_t + */ + +static inline const mp_obj_type_t *get_mp_lv_obj_spec_attr_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_spec_attr_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_spec_attr_t_type())); + return (lv_obj_spec_attr_t*)self->data; +} + +#define mp_write_lv_obj_spec_attr_t(struct_obj) *((lv_obj_spec_attr_t*)mp_write_ptr_lv_obj_spec_attr_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_spec_attr_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_obj_spec_attr_t_type(), field); +} + +#define mp_read_lv_obj_spec_attr_t(field) mp_read_ptr_lv_obj_spec_attr_t(copy_buffer(&field, sizeof(lv_obj_spec_attr_t))) +#define mp_read_byref_lv_obj_spec_attr_t(field) mp_read_ptr_lv_obj_spec_attr_t(&field) + +static void mp_lv_obj_spec_attr_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_obj_spec_attr_t *data = (lv_obj_spec_attr_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_children: dest[0] = ptr_to_mp((void*)data->children); break; // converting from lv_obj_t **; + case MP_QSTR_group_p: dest[0] = mp_read_ptr_lv_group_t((void*)data->group_p); break; // converting from lv_group_t *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_scroll: dest[0] = mp_read_byref_lv_point_t(data->scroll); break; // converting from lv_point_t; + case MP_QSTR_ext_click_pad: dest[0] = mp_obj_new_int(data->ext_click_pad); break; // converting from int32_t; + case MP_QSTR_ext_draw_size: dest[0] = mp_obj_new_int(data->ext_draw_size); break; // converting from int32_t; + case MP_QSTR_child_cnt: dest[0] = mp_obj_new_int_from_uint(data->child_cnt); break; // converting from uint16_t; + case MP_QSTR_scrollbar_mode: dest[0] = mp_obj_new_int_from_uint(data->scrollbar_mode); break; // converting from uint16_t; + case MP_QSTR_scroll_snap_x: dest[0] = mp_obj_new_int_from_uint(data->scroll_snap_x); break; // converting from uint16_t; + case MP_QSTR_scroll_snap_y: dest[0] = mp_obj_new_int_from_uint(data->scroll_snap_y); break; // converting from uint16_t; + case MP_QSTR_scroll_dir: dest[0] = mp_obj_new_int_from_uint(data->scroll_dir); break; // converting from uint16_t; + case MP_QSTR_layer_type: dest[0] = mp_obj_new_int_from_uint(data->layer_type); break; // converting from uint16_t; + case MP_QSTR_name_static: dest[0] = mp_obj_new_int_from_uint(data->name_static); break; // converting from uint16_t; + case MP_QSTR_user_flags: dest[0] = mp_obj_new_int_from_uint(data->user_flags); break; // converting from uint16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_children: data->children = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; + case MP_QSTR_group_p: data->group_p = (void*)mp_write_ptr_lv_group_t(dest[1]); break; // converting to lv_group_t *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_scroll: data->scroll = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_ext_click_pad: data->ext_click_pad = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ext_draw_size: data->ext_draw_size = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_child_cnt: data->child_cnt = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scrollbar_mode: data->scrollbar_mode = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scroll_snap_x: data->scroll_snap_x = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scroll_snap_y: data->scroll_snap_y = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scroll_dir: data->scroll_dir = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_layer_type: data->layer_type = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_name_static: data->name_static = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_user_flags: data->user_flags = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_obj_spec_attr_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_obj_spec_attr_t"); +} + +static const mp_obj_dict_t mp_lv_obj_spec_attr_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_obj_spec_attr_t_type, + MP_QSTR_lv_obj_spec_attr_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_obj_spec_attr_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_obj_spec_attr_t_attr, + locals_dict, &mp_lv_obj_spec_attr_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_obj_spec_attr_t_type(void) +{ + return &mp_lv_obj_spec_attr_t_type; +} + + +/* + * lvgl extension definition for: + * lv_obj_spec_attr_t *lv_obj_allocate_spec_attr(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_allocate_spec_attr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_spec_attr_t * _res = ((lv_obj_spec_attr_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_obj_spec_attr_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_allocate_spec_attr_mpobj, 1, mp_lv_obj_allocate_spec_attr, lv_obj_allocate_spec_attr); + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_add_child(lv_obj_t *parent, lv_obj_t *child) + */ + +static mp_obj_t mp_lv_obj_add_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *parent = mp_to_lv(mp_args[0]); + lv_obj_t *child = mp_to_lv(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(parent, child); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_child_mpobj, 2, mp_lv_obj_add_child, lv_obj_add_child); + +/* Reusing lv_obj_set_parent for lv_obj_remove_child */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_child_mpobj, 2, mp_lv_obj_set_parent, lv_obj_remove_child); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_obj_invalidate_expand_blur */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_invalidate_expand_blur_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_obj_invalidate_expand_blur); + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_scroll_by_raw(lv_obj_t *obj, int32_t x, int32_t y) + */ + +static mp_obj_t mp_lv_obj_scroll_by_raw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_init_mpobj, 0, mp_lv_obj_style_init, lv_obj_style_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_raw_mpobj, 3, mp_lv_obj_scroll_by_raw, lv_obj_scroll_by_raw); + +/* Reusing funcptr_user_cb for lv_obj_style_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_init_mpobj, 0, mp_funcptr_user_cb, lv_obj_style_init); -/* Reusing lv_obj_style_init for lv_obj_style_deinit */ +/* Reusing funcptr_user_cb for lv_obj_style_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_deinit_mpobj, 0, mp_lv_obj_style_init, lv_obj_style_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_deinit_mpobj, 0, mp_funcptr_user_cb, lv_obj_style_deinit); /* @@ -16841,12 +17763,12 @@ static void mp_lv_obj_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, m // load attribute switch(attr) { + case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_selector: dest[0] = mp_obj_new_int_from_uint(data->selector); break; // converting from lv_style_selector_t; case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint16_t; case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint16_t; - case MP_QSTR_selector: dest[0] = mp_obj_new_int_from_uint(data->selector); break; // converting from lv_style_selector_t; case MP_QSTR_prop: dest[0] = mp_obj_new_int_from_uint(data->prop); break; // converting from lv_style_prop_t; - case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -16855,12 +17777,12 @@ static void mp_lv_obj_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, m // store attribute switch(attr) { + case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_selector: data->selector = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to lv_style_selector_t; case MP_QSTR_time: data->time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; case MP_QSTR_delay: data->delay = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_selector: data->selector = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to lv_style_selector_t; case MP_QSTR_prop: data->prop = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_style_prop_t; - case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -16900,7 +17822,7 @@ static inline const mp_obj_type_t *get_mp_lv_obj_style_transition_dsc_t_type(voi /* * lvgl extension definition for: - * void lv_obj_style_create_transition(lv_obj_t *obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const lv_obj_style_transition_dsc_t *tr) + * void lv_obj_style_create_transition(lv_obj_t *obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const lv_obj_style_transition_dsc_t *tr_dsc) */ static mp_obj_t mp_lv_obj_style_create_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -16909,8 +17831,8 @@ static mp_obj_t mp_lv_obj_style_create_transition(size_t mp_n_args, const mp_obj lv_part_t part = (int)mp_obj_get_int(mp_args[1]); lv_state_t prev_state = (int)mp_obj_get_int(mp_args[2]); lv_state_t new_state = (int)mp_obj_get_int(mp_args[3]); - const lv_obj_style_transition_dsc_t *tr = (const lv_obj_style_transition_dsc_t *)mp_write_ptr_lv_obj_style_transition_dsc_t(mp_args[4]); - ((void (*)(lv_obj_t *, lv_part_t, lv_state_t, lv_state_t, const lv_obj_style_transition_dsc_t *))lv_func_ptr)(obj, part, prev_state, new_state, tr); + const lv_obj_style_transition_dsc_t *tr_dsc = (const lv_obj_style_transition_dsc_t *)mp_write_ptr_lv_obj_style_transition_dsc_t(mp_args[4]); + ((void (*)(lv_obj_t *, lv_part_t, lv_state_t, lv_state_t, const lv_obj_style_transition_dsc_t *))lv_func_ptr)(obj, part, prev_state, new_state, tr_dsc); return mp_const_none; } @@ -16921,7 +17843,7 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_create_transition_mpobj, 5 /* * lvgl extension definition for: - * lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t *obj, lv_state_t state1, lv_state_t state2) + * lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t *obj, lv_state_t state1, lv_state_t state2, lv_part_t *changed_part) */ static mp_obj_t mp_lv_obj_style_state_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -16929,61 +17851,34 @@ static mp_obj_t mp_lv_obj_style_state_compare(size_t mp_n_args, const mp_obj_t * lv_obj_t *obj = mp_to_lv(mp_args[0]); lv_state_t state1 = (int)mp_obj_get_int(mp_args[1]); lv_state_t state2 = (int)mp_obj_get_int(mp_args[2]); - lv_style_state_cmp_t _res = ((lv_style_state_cmp_t (*)(lv_obj_t *, lv_state_t, lv_state_t))lv_func_ptr)(obj, state1, state2); + lv_part_t *changed_part = mp_array_to_i32ptr(mp_args[3]); + lv_style_state_cmp_t _res = ((lv_style_state_cmp_t (*)(lv_obj_t *, lv_state_t, lv_state_t, lv_part_t *))lv_func_ptr)(obj, state1, state2, changed_part); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_state_compare_mpobj, 3, mp_lv_obj_style_state_compare, lv_obj_style_state_compare); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_state_compare_mpobj, 4, mp_lv_obj_style_state_compare, lv_obj_style_state_compare); /* Reusing lv_obj_move_foreground for lv_obj_update_layer_type */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layer_type_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_layer_type); +/* Reusing lv_obj_get_style_prop for lv_obj_get_style_prop_internal */ -/* - * lvgl extension definition for: - * lv_result_t lv_obj_scroll_by_raw(lv_obj_t *obj, int32_t x, int32_t y) - */ - -static mp_obj_t mp_lv_obj_scroll_by_raw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_raw_mpobj, 3, mp_lv_obj_scroll_by_raw, lv_obj_scroll_by_raw); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_internal_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop_internal); -/* Reusing lv_obj_get_index for lv_obj_get_ext_draw_size */ +/* Reusing lv_obj_style_apply_color_filter for lv_obj_style_apply_color_filter_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_ext_draw_size_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_ext_draw_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_internal_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter_internal); +/* Reusing lv_obj_move_foreground for lv_obj_update_blur_status */ -/* - * lvgl extension definition for: - * lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_get_layer_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_layer_type_t _res = ((lv_layer_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_layer_type_mpobj, 1, mp_lv_obj_get_layer_type, lv_obj_get_layer_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_blur_status_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_blur_status); -/* Reusing lv_obj_move_foreground for lv_obj_destruct */ +/* Reusing lv_obj_redraw for lv_obj_refr */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_destruct_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_destruct); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_refr_mpobj, 2, mp_lv_obj_redraw, lv_obj_refr); /* @@ -17011,6 +17906,289 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_create_mpobj, 1, mp_lv_obj_creat static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_style_get_selector_state), MP_ROM_PTR(&mp_lv_obj_style_get_selector_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_get_selector_part), MP_ROM_PTR(&mp_lv_obj_style_get_selector_part_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_foreground), MP_ROM_PTR(&mp_lv_obj_move_foreground_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_background), MP_ROM_PTR(&mp_lv_obj_move_background_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_min_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_max_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_min_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_max_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_length_internal), MP_ROM_PTR(&mp_lv_obj_get_style_length_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_translate_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_translate_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_translate_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_radial_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_rotation_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_rotation_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_top_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_bottom_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_left_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_right_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_row_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_row_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_column_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_column_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_radial_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_top_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_bottom_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_left_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_right_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_dir_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_stop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_stop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_src_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_tiled_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_tiled_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_side_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_side_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_post_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_post_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_pad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_pad_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_spread_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_spread_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_colorkey_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_colorkey_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_gap_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_gap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_rounded_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_rounded_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_image_src_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_font_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_font_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_letter_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_letter_space_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_line_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_line_space_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_decor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_decor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_leading_trim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_leading_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blur_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_radius_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blur_backdrop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_backdrop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blur_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_quality_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radius_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_radial_offset_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radial_offset_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_clip_corner_internal), MP_ROM_PTR(&mp_lv_obj_get_style_clip_corner_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_opa_layered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_layered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_dsc_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_dsc_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_anim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_anim_duration_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_duration_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transition_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transition_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blend_mode_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blend_mode_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_layout_internal), MP_ROM_PTR(&mp_lv_obj_get_style_layout_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_base_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_base_dir_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bitmap_mask_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_rotary_sensitivity_internal), MP_ROM_PTR(&mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_flow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_flow_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_main_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_main_place_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_cross_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_cross_place_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_track_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_track_place_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_grow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_grow_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_x_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_y_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calculate_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_calculate_style_text_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_obj_set_flex_flow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_align), MP_ROM_PTR(&mp_lv_obj_set_flex_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_obj_set_flex_grow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_dsc_array), MP_ROM_PTR(&mp_lv_obj_set_grid_dsc_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_align), MP_ROM_PTR(&mp_lv_obj_set_grid_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell), MP_ROM_PTR(&mp_lv_obj_set_grid_cell_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_obj_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clean), MP_ROM_PTR(&mp_lv_obj_clean_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_delayed), MP_ROM_PTR(&mp_lv_obj_delete_delayed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_anim_completed_cb), MP_ROM_PTR(&mp_lv_obj_delete_anim_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_async), MP_ROM_PTR(&mp_lv_obj_delete_async_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_obj_set_parent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_obj_swap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_to_index), MP_ROM_PTR(&mp_lv_obj_move_to_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen), MP_ROM_PTR(&mp_lv_obj_get_screen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_display), MP_ROM_PTR(&mp_lv_obj_get_display_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_parent), MP_ROM_PTR(&mp_lv_obj_get_parent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_obj_get_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sibling), MP_ROM_PTR(&mp_lv_obj_get_sibling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sibling_by_type), MP_ROM_PTR(&mp_lv_obj_get_sibling_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child_count), MP_ROM_PTR(&mp_lv_obj_get_child_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child_count_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_count_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_index), MP_ROM_PTR(&mp_lv_obj_get_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_index_by_type), MP_ROM_PTR(&mp_lv_obj_get_index_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tree_walk), MP_ROM_PTR(&mp_lv_obj_tree_walk_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dump_tree), MP_ROM_PTR(&mp_lv_obj_dump_tree_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_obj_set_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_obj_set_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_obj_set_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_obj_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refr_size), MP_ROM_PTR(&mp_lv_obj_refr_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_obj_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_obj_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_content_width), MP_ROM_PTR(&mp_lv_obj_set_content_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_content_height), MP_ROM_PTR(&mp_lv_obj_set_content_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_obj_set_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_layout_positioned), MP_ROM_PTR(&mp_lv_obj_is_layout_positioned_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mark_layout_as_dirty), MP_ROM_PTR(&mp_lv_obj_mark_layout_as_dirty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update_layout), MP_ROM_PTR(&mp_lv_obj_update_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_obj_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_obj_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_to), MP_ROM_PTR(&mp_lv_obj_align_to_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_center), MP_ROM_PTR(&mp_lv_obj_center_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform), MP_ROM_PTR(&mp_lv_obj_set_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset_transform), MP_ROM_PTR(&mp_lv_obj_reset_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_coords), MP_ROM_PTR(&mp_lv_obj_get_coords_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x), MP_ROM_PTR(&mp_lv_obj_get_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x2), MP_ROM_PTR(&mp_lv_obj_get_x2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y), MP_ROM_PTR(&mp_lv_obj_get_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y2), MP_ROM_PTR(&mp_lv_obj_get_y2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x_aligned), MP_ROM_PTR(&mp_lv_obj_get_x_aligned_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y_aligned), MP_ROM_PTR(&mp_lv_obj_get_y_aligned_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_obj_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_obj_get_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content_width), MP_ROM_PTR(&mp_lv_obj_get_content_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content_height), MP_ROM_PTR(&mp_lv_obj_get_content_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content_coords), MP_ROM_PTR(&mp_lv_obj_get_content_coords_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_width), MP_ROM_PTR(&mp_lv_obj_get_self_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_height), MP_ROM_PTR(&mp_lv_obj_get_self_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_clamped_width), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_clamped_height), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_style_any_width_content), MP_ROM_PTR(&mp_lv_obj_is_style_any_width_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_style_any_height_content), MP_ROM_PTR(&mp_lv_obj_is_style_any_height_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_width_min), MP_ROM_PTR(&mp_lv_obj_is_width_min_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_height_min), MP_ROM_PTR(&mp_lv_obj_is_height_min_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_width_max), MP_ROM_PTR(&mp_lv_obj_is_width_max_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_height_max), MP_ROM_PTR(&mp_lv_obj_is_height_max_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh_self_size), MP_ROM_PTR(&mp_lv_obj_refresh_self_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refr_pos), MP_ROM_PTR(&mp_lv_obj_refr_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_to), MP_ROM_PTR(&mp_lv_obj_move_to_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_children_by), MP_ROM_PTR(&mp_lv_obj_move_children_by_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transform), MP_ROM_PTR(&mp_lv_obj_get_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_transform_point), MP_ROM_PTR(&mp_lv_obj_transform_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_transform_point_array), MP_ROM_PTR(&mp_lv_obj_transform_point_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transformed_area), MP_ROM_PTR(&mp_lv_obj_get_transformed_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_area), MP_ROM_PTR(&mp_lv_obj_invalidate_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_invalidate), MP_ROM_PTR(&mp_lv_obj_invalidate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_area_is_visible), MP_ROM_PTR(&mp_lv_obj_area_is_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_visible), MP_ROM_PTR(&mp_lv_obj_is_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_click_area), MP_ROM_PTR(&mp_lv_obj_set_ext_click_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_click_area), MP_ROM_PTR(&mp_lv_obj_get_click_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_hit_test), MP_ROM_PTR(&mp_lv_obj_hit_test_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calc_dynamic_width), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calc_dynamic_height), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_set_scrollbar_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_dir), MP_ROM_PTR(&mp_lv_obj_set_scroll_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_dir), MP_ROM_PTR(&mp_lv_obj_get_scroll_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_top), MP_ROM_PTR(&mp_lv_obj_get_scroll_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_bottom), MP_ROM_PTR(&mp_lv_obj_get_scroll_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_left), MP_ROM_PTR(&mp_lv_obj_get_scroll_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_right), MP_ROM_PTR(&mp_lv_obj_get_scroll_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_end), MP_ROM_PTR(&mp_lv_obj_get_scroll_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_by), MP_ROM_PTR(&mp_lv_obj_scroll_by_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_by_bounded), MP_ROM_PTR(&mp_lv_obj_scroll_by_bounded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to), MP_ROM_PTR(&mp_lv_obj_scroll_to_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_x), MP_ROM_PTR(&mp_lv_obj_scroll_to_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_y), MP_ROM_PTR(&mp_lv_obj_scroll_to_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_view), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_view_recursive), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_recursive_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scrolling), MP_ROM_PTR(&mp_lv_obj_is_scrolling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_scroll_anim), MP_ROM_PTR(&mp_lv_obj_stop_scroll_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update_snap), MP_ROM_PTR(&mp_lv_obj_update_snap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scrollbar_area), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scrollbar_invalidate), MP_ROM_PTR(&mp_lv_obj_scrollbar_invalidate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_readjust_scroll), MP_ROM_PTR(&mp_lv_obj_readjust_scroll_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_style), MP_ROM_PTR(&mp_lv_obj_add_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_replace_style), MP_ROM_PTR(&mp_lv_obj_replace_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_style), MP_ROM_PTR(&mp_lv_obj_remove_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_theme), MP_ROM_PTR(&mp_lv_obj_remove_theme_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_style_all), MP_ROM_PTR(&mp_lv_obj_remove_style_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_report_style_change), MP_ROM_PTR(&mp_lv_obj_report_style_change_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh_style), MP_ROM_PTR(&mp_lv_obj_refresh_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_enabled), MP_ROM_PTR(&mp_lv_obj_set_style_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_enabled), MP_ROM_PTR(&mp_lv_obj_get_style_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_set_disabled), MP_ROM_PTR(&mp_lv_obj_style_set_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_get_disabled), MP_ROM_PTR(&mp_lv_obj_style_get_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_enable_style_refresh), MP_ROM_PTR(&mp_lv_obj_enable_style_refresh_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_prop), MP_ROM_PTR(&mp_lv_obj_get_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_style_prop), MP_ROM_PTR(&mp_lv_obj_has_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_local_style_prop), MP_ROM_PTR(&mp_lv_obj_set_local_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_local_style_prop), MP_ROM_PTR(&mp_lv_obj_get_local_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_local_style_prop), MP_ROM_PTR(&mp_lv_obj_remove_local_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fade_in), MP_ROM_PTR(&mp_lv_obj_fade_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fade_out), MP_ROM_PTR(&mp_lv_obj_fade_out_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_width), MP_ROM_PTR(&mp_lv_obj_get_style_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_min_width), MP_ROM_PTR(&mp_lv_obj_get_style_min_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_max_width), MP_ROM_PTR(&mp_lv_obj_get_style_max_width_mpobj) }, @@ -17109,6 +18287,7 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_filtered), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_leading_trim), MP_ROM_PTR(&mp_lv_obj_get_style_text_leading_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_blur_radius), MP_ROM_PTR(&mp_lv_obj_get_style_blur_radius_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_blur_backdrop), MP_ROM_PTR(&mp_lv_obj_get_style_blur_backdrop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_blur_quality), MP_ROM_PTR(&mp_lv_obj_get_style_blur_quality_mpobj) }, @@ -17151,152 +18330,6 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_pos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_y_align), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_y_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_span), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_all), MP_ROM_PTR(&mp_lv_obj_set_style_pad_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_hor), MP_ROM_PTR(&mp_lv_obj_set_style_pad_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_ver), MP_ROM_PTR(&mp_lv_obj_set_style_pad_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_margin_all), MP_ROM_PTR(&mp_lv_obj_set_style_margin_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_margin_hor), MP_ROM_PTR(&mp_lv_obj_set_style_margin_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_margin_ver), MP_ROM_PTR(&mp_lv_obj_set_style_margin_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_gap), MP_ROM_PTR(&mp_lv_obj_set_style_pad_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_size), MP_ROM_PTR(&mp_lv_obj_set_style_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_transform_scale), MP_ROM_PTR(&mp_lv_obj_set_style_transform_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_left), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_right), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_top), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_foreground), MP_ROM_PTR(&mp_lv_obj_move_foreground_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_background), MP_ROM_PTR(&mp_lv_obj_move_background_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_obj_set_flex_flow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_align), MP_ROM_PTR(&mp_lv_obj_set_flex_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_obj_set_flex_grow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_dsc_array), MP_ROM_PTR(&mp_lv_obj_set_grid_dsc_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_align), MP_ROM_PTR(&mp_lv_obj_set_grid_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell), MP_ROM_PTR(&mp_lv_obj_set_grid_cell_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_obj_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clean), MP_ROM_PTR(&mp_lv_obj_clean_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_delayed), MP_ROM_PTR(&mp_lv_obj_delete_delayed_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_anim_completed_cb), MP_ROM_PTR(&mp_lv_obj_delete_anim_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_async), MP_ROM_PTR(&mp_lv_obj_delete_async_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_obj_set_parent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_obj_swap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_to_index), MP_ROM_PTR(&mp_lv_obj_move_to_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen), MP_ROM_PTR(&mp_lv_obj_get_screen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_display), MP_ROM_PTR(&mp_lv_obj_get_display_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_parent), MP_ROM_PTR(&mp_lv_obj_get_parent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_obj_get_child_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sibling), MP_ROM_PTR(&mp_lv_obj_get_sibling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sibling_by_type), MP_ROM_PTR(&mp_lv_obj_get_sibling_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child_count), MP_ROM_PTR(&mp_lv_obj_get_child_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child_count_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_count_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_index), MP_ROM_PTR(&mp_lv_obj_get_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_index_by_type), MP_ROM_PTR(&mp_lv_obj_get_index_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tree_walk), MP_ROM_PTR(&mp_lv_obj_tree_walk_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dump_tree), MP_ROM_PTR(&mp_lv_obj_dump_tree_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_obj_set_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_obj_set_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_obj_set_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_obj_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refr_size), MP_ROM_PTR(&mp_lv_obj_refr_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_obj_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_obj_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_content_width), MP_ROM_PTR(&mp_lv_obj_set_content_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_content_height), MP_ROM_PTR(&mp_lv_obj_set_content_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_obj_set_layout_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_layout_positioned), MP_ROM_PTR(&mp_lv_obj_is_layout_positioned_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mark_layout_as_dirty), MP_ROM_PTR(&mp_lv_obj_mark_layout_as_dirty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update_layout), MP_ROM_PTR(&mp_lv_obj_update_layout_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_obj_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_obj_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_to), MP_ROM_PTR(&mp_lv_obj_align_to_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_center), MP_ROM_PTR(&mp_lv_obj_center_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform), MP_ROM_PTR(&mp_lv_obj_set_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset_transform), MP_ROM_PTR(&mp_lv_obj_reset_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_coords), MP_ROM_PTR(&mp_lv_obj_get_coords_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x), MP_ROM_PTR(&mp_lv_obj_get_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x2), MP_ROM_PTR(&mp_lv_obj_get_x2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y), MP_ROM_PTR(&mp_lv_obj_get_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y2), MP_ROM_PTR(&mp_lv_obj_get_y2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x_aligned), MP_ROM_PTR(&mp_lv_obj_get_x_aligned_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y_aligned), MP_ROM_PTR(&mp_lv_obj_get_y_aligned_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_obj_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_obj_get_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content_width), MP_ROM_PTR(&mp_lv_obj_get_content_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content_height), MP_ROM_PTR(&mp_lv_obj_get_content_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content_coords), MP_ROM_PTR(&mp_lv_obj_get_content_coords_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_width), MP_ROM_PTR(&mp_lv_obj_get_self_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_height), MP_ROM_PTR(&mp_lv_obj_get_self_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_clamped_width), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_clamped_height), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_width_min), MP_ROM_PTR(&mp_lv_obj_is_width_min_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_height_min), MP_ROM_PTR(&mp_lv_obj_is_height_min_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_width_max), MP_ROM_PTR(&mp_lv_obj_is_width_max_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_height_max), MP_ROM_PTR(&mp_lv_obj_is_height_max_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh_self_size), MP_ROM_PTR(&mp_lv_obj_refresh_self_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refr_pos), MP_ROM_PTR(&mp_lv_obj_refr_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_to), MP_ROM_PTR(&mp_lv_obj_move_to_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_children_by), MP_ROM_PTR(&mp_lv_obj_move_children_by_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transform), MP_ROM_PTR(&mp_lv_obj_get_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_transform_point), MP_ROM_PTR(&mp_lv_obj_transform_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_transform_point_array), MP_ROM_PTR(&mp_lv_obj_transform_point_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transformed_area), MP_ROM_PTR(&mp_lv_obj_get_transformed_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_invalidate_area), MP_ROM_PTR(&mp_lv_obj_invalidate_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_invalidate), MP_ROM_PTR(&mp_lv_obj_invalidate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_area_is_visible), MP_ROM_PTR(&mp_lv_obj_area_is_visible_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_visible), MP_ROM_PTR(&mp_lv_obj_is_visible_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ext_click_area), MP_ROM_PTR(&mp_lv_obj_set_ext_click_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_click_area), MP_ROM_PTR(&mp_lv_obj_get_click_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_hit_test), MP_ROM_PTR(&mp_lv_obj_hit_test_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calc_dynamic_width), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calc_dynamic_height), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_set_scrollbar_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scroll_dir), MP_ROM_PTR(&mp_lv_obj_set_scroll_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_dir), MP_ROM_PTR(&mp_lv_obj_get_scroll_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_top), MP_ROM_PTR(&mp_lv_obj_get_scroll_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_bottom), MP_ROM_PTR(&mp_lv_obj_get_scroll_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_left), MP_ROM_PTR(&mp_lv_obj_get_scroll_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_right), MP_ROM_PTR(&mp_lv_obj_get_scroll_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_end), MP_ROM_PTR(&mp_lv_obj_get_scroll_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_by), MP_ROM_PTR(&mp_lv_obj_scroll_by_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_by_bounded), MP_ROM_PTR(&mp_lv_obj_scroll_by_bounded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to), MP_ROM_PTR(&mp_lv_obj_scroll_to_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_x), MP_ROM_PTR(&mp_lv_obj_scroll_to_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_y), MP_ROM_PTR(&mp_lv_obj_scroll_to_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_view), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_view_recursive), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_recursive_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_scrolling), MP_ROM_PTR(&mp_lv_obj_is_scrolling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_scroll_anim), MP_ROM_PTR(&mp_lv_obj_stop_scroll_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update_snap), MP_ROM_PTR(&mp_lv_obj_update_snap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scrollbar_area), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scrollbar_invalidate), MP_ROM_PTR(&mp_lv_obj_scrollbar_invalidate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_readjust_scroll), MP_ROM_PTR(&mp_lv_obj_readjust_scroll_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_style), MP_ROM_PTR(&mp_lv_obj_add_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_replace_style), MP_ROM_PTR(&mp_lv_obj_replace_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_style), MP_ROM_PTR(&mp_lv_obj_remove_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_theme), MP_ROM_PTR(&mp_lv_obj_remove_theme_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_style_all), MP_ROM_PTR(&mp_lv_obj_remove_style_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_report_style_change), MP_ROM_PTR(&mp_lv_obj_report_style_change_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh_style), MP_ROM_PTR(&mp_lv_obj_refresh_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_set_disabled), MP_ROM_PTR(&mp_lv_obj_style_set_disabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_get_disabled), MP_ROM_PTR(&mp_lv_obj_style_get_disabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_enable_style_refresh), MP_ROM_PTR(&mp_lv_obj_enable_style_refresh_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_prop), MP_ROM_PTR(&mp_lv_obj_get_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_style_prop), MP_ROM_PTR(&mp_lv_obj_has_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_local_style_prop), MP_ROM_PTR(&mp_lv_obj_set_local_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_local_style_prop), MP_ROM_PTR(&mp_lv_obj_get_local_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_local_style_prop), MP_ROM_PTR(&mp_lv_obj_remove_local_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fade_in), MP_ROM_PTR(&mp_lv_obj_fade_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fade_out), MP_ROM_PTR(&mp_lv_obj_fade_out_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_width), MP_ROM_PTR(&mp_lv_obj_set_style_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_min_width), MP_ROM_PTR(&mp_lv_obj_set_style_min_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_max_width), MP_ROM_PTR(&mp_lv_obj_set_style_max_width_mpobj) }, @@ -17384,6 +18417,7 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_style_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_obj_set_style_text_outline_stroke_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_obj_set_style_text_outline_stroke_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_obj_set_style_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_text_leading_trim), MP_ROM_PTR(&mp_lv_obj_set_style_text_leading_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_blur_radius), MP_ROM_PTR(&mp_lv_obj_set_style_blur_radius_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_blur_backdrop), MP_ROM_PTR(&mp_lv_obj_set_style_blur_backdrop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_blur_quality), MP_ROM_PTR(&mp_lv_obj_set_style_blur_quality_mpobj) }, @@ -17425,7 +18459,22 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_style_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_obj_set_style_grid_cell_row_pos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_grid_cell_y_align), MP_ROM_PTR(&mp_lv_obj_set_style_grid_cell_y_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_grid_cell_row_span), MP_ROM_PTR(&mp_lv_obj_set_style_grid_cell_row_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_all), MP_ROM_PTR(&mp_lv_obj_set_style_pad_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_hor), MP_ROM_PTR(&mp_lv_obj_set_style_pad_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_ver), MP_ROM_PTR(&mp_lv_obj_set_style_pad_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_margin_all), MP_ROM_PTR(&mp_lv_obj_set_style_margin_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_margin_hor), MP_ROM_PTR(&mp_lv_obj_set_style_margin_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_margin_ver), MP_ROM_PTR(&mp_lv_obj_set_style_margin_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_gap), MP_ROM_PTR(&mp_lv_obj_set_style_pad_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_size), MP_ROM_PTR(&mp_lv_obj_set_style_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_transform_scale), MP_ROM_PTR(&mp_lv_obj_set_style_transform_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_left), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_right), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_top), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_mpobj) }, { MP_ROM_QSTR(MP_QSTR_calculate_style_text_align), MP_ROM_PTR(&mp_lv_obj_calculate_style_text_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_opa_recursive), MP_ROM_PTR(&mp_lv_obj_get_style_opa_recursive_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_apply_recolor), MP_ROM_PTR(&mp_lv_obj_style_apply_recolor_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_recolor_recursive), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_recursive_mpobj) }, @@ -17437,6 +18486,7 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_init_draw_line_dsc), MP_ROM_PTR(&mp_lv_obj_init_draw_line_dsc_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_draw_arc_dsc), MP_ROM_PTR(&mp_lv_obj_init_draw_arc_dsc_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_draw_blur_dsc), MP_ROM_PTR(&mp_lv_obj_init_draw_blur_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_set_ext_draw_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_calculate_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_calculate_ext_draw_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refresh_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_refresh_ext_draw_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_class_create_obj), MP_ROM_PTR(&mp_lv_obj_class_create_obj_mpobj) }, @@ -17455,28 +18505,105 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_add_flag), MP_ROM_PTR(&mp_lv_obj_add_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_flag), MP_ROM_PTR(&mp_lv_obj_remove_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_obj_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_hidden), MP_ROM_PTR(&mp_lv_obj_set_hidden_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_clickable), MP_ROM_PTR(&mp_lv_obj_set_clickable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_click_focusable), MP_ROM_PTR(&mp_lv_obj_set_click_focusable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_checkable), MP_ROM_PTR(&mp_lv_obj_set_checkable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scrollable), MP_ROM_PTR(&mp_lv_obj_set_scrollable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_elastic), MP_ROM_PTR(&mp_lv_obj_set_scroll_elastic_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_momentum), MP_ROM_PTR(&mp_lv_obj_set_scroll_momentum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_one), MP_ROM_PTR(&mp_lv_obj_set_scroll_one_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_chain), MP_ROM_PTR(&mp_lv_obj_set_scroll_chain_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_chain_hor), MP_ROM_PTR(&mp_lv_obj_set_scroll_chain_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_chain_ver), MP_ROM_PTR(&mp_lv_obj_set_scroll_chain_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_on_focus), MP_ROM_PTR(&mp_lv_obj_set_scroll_on_focus_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_with_arrow), MP_ROM_PTR(&mp_lv_obj_set_scroll_with_arrow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_snappable), MP_ROM_PTR(&mp_lv_obj_set_snappable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_press_lock), MP_ROM_PTR(&mp_lv_obj_set_press_lock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_event_bubble), MP_ROM_PTR(&mp_lv_obj_set_event_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_gesture_bubble), MP_ROM_PTR(&mp_lv_obj_set_gesture_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_adv_hittest), MP_ROM_PTR(&mp_lv_obj_set_adv_hittest_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ignore_layout), MP_ROM_PTR(&mp_lv_obj_set_ignore_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_floating), MP_ROM_PTR(&mp_lv_obj_set_floating_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_send_draw_task_events), MP_ROM_PTR(&mp_lv_obj_set_send_draw_task_events_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_overflow_visible), MP_ROM_PTR(&mp_lv_obj_set_overflow_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_event_trickle), MP_ROM_PTR(&mp_lv_obj_set_event_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_trickle), MP_ROM_PTR(&mp_lv_obj_set_state_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radio_button), MP_ROM_PTR(&mp_lv_obj_set_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_in_new_track), MP_ROM_PTR(&mp_lv_obj_set_flex_in_new_track_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_state), MP_ROM_PTR(&mp_lv_obj_add_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_state), MP_ROM_PTR(&mp_lv_obj_remove_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_state), MP_ROM_PTR(&mp_lv_obj_set_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_alt), MP_ROM_PTR(&mp_lv_obj_set_alt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_checked), MP_ROM_PTR(&mp_lv_obj_set_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_focused), MP_ROM_PTR(&mp_lv_obj_set_focused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_focus_key), MP_ROM_PTR(&mp_lv_obj_set_focus_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_edited), MP_ROM_PTR(&mp_lv_obj_set_edited_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_hovered), MP_ROM_PTR(&mp_lv_obj_set_hovered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pressed), MP_ROM_PTR(&mp_lv_obj_set_pressed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scrolled), MP_ROM_PTR(&mp_lv_obj_set_scrolled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_disabled), MP_ROM_PTR(&mp_lv_obj_set_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_1), MP_ROM_PTR(&mp_lv_obj_set_state_user_1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_2), MP_ROM_PTR(&mp_lv_obj_set_state_user_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_3), MP_ROM_PTR(&mp_lv_obj_set_state_user_3_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_4), MP_ROM_PTR(&mp_lv_obj_set_state_user_4_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_obj_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radio_button), MP_ROM_PTR(&mp_lv_obj_set_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_flag), MP_ROM_PTR(&mp_lv_obj_set_user_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_obj_has_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_flag_any), MP_ROM_PTR(&mp_lv_obj_has_flag_any_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_hidden), MP_ROM_PTR(&mp_lv_obj_is_hidden_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_clickable), MP_ROM_PTR(&mp_lv_obj_is_clickable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_click_focusable), MP_ROM_PTR(&mp_lv_obj_is_click_focusable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_checkable), MP_ROM_PTR(&mp_lv_obj_is_checkable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scrollable), MP_ROM_PTR(&mp_lv_obj_is_scrollable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_elastic), MP_ROM_PTR(&mp_lv_obj_is_scroll_elastic_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_momentum), MP_ROM_PTR(&mp_lv_obj_is_scroll_momentum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_one), MP_ROM_PTR(&mp_lv_obj_is_scroll_one_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_chain_hor), MP_ROM_PTR(&mp_lv_obj_is_scroll_chain_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_chain_ver), MP_ROM_PTR(&mp_lv_obj_is_scroll_chain_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_on_focus), MP_ROM_PTR(&mp_lv_obj_is_scroll_on_focus_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_with_arrow), MP_ROM_PTR(&mp_lv_obj_is_scroll_with_arrow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_snappable), MP_ROM_PTR(&mp_lv_obj_is_snappable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_press_lock), MP_ROM_PTR(&mp_lv_obj_is_press_lock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_event_bubble), MP_ROM_PTR(&mp_lv_obj_is_event_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_gesture_bubble), MP_ROM_PTR(&mp_lv_obj_is_gesture_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_adv_hittest), MP_ROM_PTR(&mp_lv_obj_is_adv_hittest_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_ignore_layout), MP_ROM_PTR(&mp_lv_obj_is_ignore_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_floating), MP_ROM_PTR(&mp_lv_obj_is_floating_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_send_draw_task_events), MP_ROM_PTR(&mp_lv_obj_is_send_draw_task_events_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_overflow_visible), MP_ROM_PTR(&mp_lv_obj_is_overflow_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_event_trickle), MP_ROM_PTR(&mp_lv_obj_is_event_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_trickle), MP_ROM_PTR(&mp_lv_obj_is_state_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_radio_button), MP_ROM_PTR(&mp_lv_obj_is_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_flex_in_new_track), MP_ROM_PTR(&mp_lv_obj_is_flex_in_new_track_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_state), MP_ROM_PTR(&mp_lv_obj_get_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_state), MP_ROM_PTR(&mp_lv_obj_has_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_radio_button), MP_ROM_PTR(&mp_lv_obj_is_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_alt), MP_ROM_PTR(&mp_lv_obj_is_alt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_checked), MP_ROM_PTR(&mp_lv_obj_is_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_focused), MP_ROM_PTR(&mp_lv_obj_is_focused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_focus_key), MP_ROM_PTR(&mp_lv_obj_is_focus_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_edited), MP_ROM_PTR(&mp_lv_obj_is_edited_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_hovered), MP_ROM_PTR(&mp_lv_obj_is_hovered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_pressed), MP_ROM_PTR(&mp_lv_obj_is_pressed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scrolled), MP_ROM_PTR(&mp_lv_obj_is_scrolled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_disabled), MP_ROM_PTR(&mp_lv_obj_is_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_1), MP_ROM_PTR(&mp_lv_obj_is_state_user_1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_2), MP_ROM_PTR(&mp_lv_obj_is_state_user_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_3), MP_ROM_PTR(&mp_lv_obj_is_state_user_3_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_4), MP_ROM_PTR(&mp_lv_obj_is_state_user_4_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_group), MP_ROM_PTR(&mp_lv_obj_get_group_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_obj_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_allocate_spec_attr), MP_ROM_PTR(&mp_lv_obj_allocate_spec_attr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_flag), MP_ROM_PTR(&mp_lv_obj_get_user_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_check_type), MP_ROM_PTR(&mp_lv_obj_check_type_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_class), MP_ROM_PTR(&mp_lv_obj_has_class_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_class), MP_ROM_PTR(&mp_lv_obj_get_class_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_valid), MP_ROM_PTR(&mp_lv_obj_is_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_in_widget_tree), MP_ROM_PTR(&mp_lv_obj_is_in_widget_tree_mpobj) }, { MP_ROM_QSTR(MP_QSTR_null_on_delete), MP_ROM_PTR(&mp_lv_obj_null_on_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_delete_cb), MP_ROM_PTR(&mp_lv_obj_add_delete_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_delete_cb), MP_ROM_PTR(&mp_lv_obj_remove_delete_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_screen_load_event), MP_ROM_PTR(&mp_lv_obj_add_screen_load_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_screen_create_event), MP_ROM_PTR(&mp_lv_obj_add_screen_create_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_play_timeline_event), MP_ROM_PTR(&mp_lv_obj_add_play_timeline_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_redraw), MP_ROM_PTR(&mp_lv_obj_redraw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_from_subject), MP_ROM_PTR(&mp_lv_obj_remove_from_subject_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_subject_increment_event), MP_ROM_PTR(&mp_lv_obj_add_subject_increment_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_subject_increment_event_min_value), MP_ROM_PTR(&mp_lv_obj_set_subject_increment_event_min_value_mpobj) }, @@ -17486,6 +18613,12 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_add_subject_set_int_event), MP_ROM_PTR(&mp_lv_obj_add_subject_set_int_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_subject_set_float_event), MP_ROM_PTR(&mp_lv_obj_add_subject_set_float_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_subject_set_string_event), MP_ROM_PTR(&mp_lv_obj_add_subject_set_string_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_bool), MP_ROM_PTR(&mp_lv_obj_bind_bool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_int), MP_ROM_PTR(&mp_lv_obj_bind_int_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_float), MP_ROM_PTR(&mp_lv_obj_bind_float_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_string), MP_ROM_PTR(&mp_lv_obj_bind_string_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_color), MP_ROM_PTR(&mp_lv_obj_bind_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_pointer), MP_ROM_PTR(&mp_lv_obj_bind_pointer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_flag_if_eq), MP_ROM_PTR(&mp_lv_obj_bind_flag_if_eq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_flag_if_not_eq), MP_ROM_PTR(&mp_lv_obj_bind_flag_if_not_eq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_flag_if_gt), MP_ROM_PTR(&mp_lv_obj_bind_flag_if_gt_mpobj) }, @@ -17499,16 +18632,24 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_bind_state_if_lt), MP_ROM_PTR(&mp_lv_obj_bind_state_if_lt_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_state_if_le), MP_ROM_PTR(&mp_lv_obj_bind_state_if_le_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_checked), MP_ROM_PTR(&mp_lv_obj_bind_checked_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refr), MP_ROM_PTR(&mp_lv_obj_refr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_redraw), MP_ROM_PTR(&mp_lv_obj_redraw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destruct), MP_ROM_PTR(&mp_lv_obj_destruct_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_get_ext_draw_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_type), MP_ROM_PTR(&mp_lv_obj_get_layer_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_allocate_spec_attr), MP_ROM_PTR(&mp_lv_obj_allocate_spec_attr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_child), MP_ROM_PTR(&mp_lv_obj_add_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_child), MP_ROM_PTR(&mp_lv_obj_remove_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_expand_blur), MP_ROM_PTR(&mp_lv_obj_invalidate_expand_blur_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_by_raw), MP_ROM_PTR(&mp_lv_obj_scroll_by_raw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_init), MP_ROM_PTR(&mp_lv_obj_style_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_deinit), MP_ROM_PTR(&mp_lv_obj_style_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_create_transition), MP_ROM_PTR(&mp_lv_obj_style_create_transition_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_state_compare), MP_ROM_PTR(&mp_lv_obj_style_state_compare_mpobj) }, { MP_ROM_QSTR(MP_QSTR_update_layer_type), MP_ROM_PTR(&mp_lv_obj_update_layer_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_by_raw), MP_ROM_PTR(&mp_lv_obj_scroll_by_raw_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_get_ext_draw_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_type), MP_ROM_PTR(&mp_lv_obj_get_layer_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destruct), MP_ROM_PTR(&mp_lv_obj_destruct_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_prop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_prop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter_internal), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update_blur_status), MP_ROM_PTR(&mp_lv_obj_update_blur_status_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refr), MP_ROM_PTR(&mp_lv_obj_refr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_OBJ_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_POINT_TRANSFORM_FLAG), MP_ROM_PTR(&mp_lv_LV_OBJ_POINT_TRANSFORM_FLAG_type_base) }, { MP_ROM_QSTR(MP_QSTR_CLASS_EDITABLE), MP_ROM_PTR(&mp_lv_LV_OBJ_CLASS_EDITABLE_type_base) }, @@ -18434,52 +19575,129 @@ static inline const mp_obj_type_t *get_mp_lv_fs_file_t_type(void) return &mp_lv_fs_file_t_type; } +#define funcptr_lv_cache_alloc_cb_t NULL + /* - * Struct lv_image_decoder_dsc_t + * lvgl extension definition for: + * void *lv_cache_alloc_cb_t(void) */ -static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_cache_alloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + void * _res = ((void *(*)(void))lv_func_ptr)(); + return ptr_to_mp((void*)_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_decoder_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_alloc_cb_t_mpobj, 0, mp_funcptr_lv_cache_alloc_cb_t, funcptr_lv_cache_alloc_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_alloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_alloc_cb_callback' + * lv_cache_alloc_cb_t alloc_cb + */ + +#define funcptr_lv_cache_init_cb_t NULL + + +/* + * lvgl extension definition for: + * bool lv_cache_init_cb_t(lv_cache_t *cache) + */ + +static mp_obj_t mp_funcptr_lv_cache_init_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_decoder_dsc_t_type())); - return (lv_image_decoder_dsc_t*)self->data; + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + bool _res = ((bool (*)(lv_cache_t *))lv_func_ptr)(cache); + return convert_to_bool(_res); } -#define mp_write_lv_image_decoder_dsc_t(struct_obj) *((lv_image_decoder_dsc_t*)mp_write_ptr_lv_image_decoder_dsc_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_decoder_dsc_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_init_cb_t_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, funcptr_lv_cache_init_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_init_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_init_cb_callback' + * lv_cache_init_cb_t init_cb + */ + +#define funcptr_lv_cache_destroy_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) + */ + +static mp_obj_t mp_funcptr_lv_cache_destroy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_image_decoder_dsc_t_type(), field); + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + ((void (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return mp_const_none; } -#define mp_read_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(copy_buffer(&field, sizeof(lv_image_decoder_dsc_t))) -#define mp_read_byref_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(&field) + -static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_destroy_cb_t_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, funcptr_lv_cache_destroy_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_destroy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_destroy_cb_callback' + * lv_cache_destroy_cb_t destroy_cb + */ + +#define funcptr_lv_cache_get_cb_t NULL + + +/* + * Struct lv_cache_entry_t + */ + +static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_entry_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_entry_t_type())); + return (lv_cache_entry_t*)self->data; +} + +#define mp_write_lv_cache_entry_t(struct_obj) *((lv_cache_entry_t*)mp_write_ptr_lv_cache_entry_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_entry_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_cache_entry_t_type(), field); +} + +#define mp_read_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(copy_buffer(&field, sizeof(lv_cache_entry_t))) +#define mp_read_byref_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(&field) + +static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)self->data; + GENMPY_UNUSED lv_cache_entry_t *data = (lv_cache_entry_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; - case MP_QSTR_args: dest[0] = mp_read_byref_lv_image_decoder_args_t(data->args); break; // converting from lv_image_decoder_args_t; - case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; - case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; - case MP_QSTR_file: dest[0] = mp_read_byref_lv_fs_file_t(data->file); break; // converting from lv_fs_file_t; - case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; - case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; - case MP_QSTR_palette: dest[0] = mp_read_ptr_lv_color32_t((void*)data->palette); break; // converting from lv_color32_t *; - case MP_QSTR_palette_size: dest[0] = mp_obj_new_int_from_uint(data->palette_size); break; // converting from uint32_t; - case MP_QSTR_time_to_open: dest[0] = mp_obj_new_int_from_uint(data->time_to_open); break; // converting from uint32_t; - case MP_QSTR_error_msg: dest[0] = convert_to_str((void*)data->error_msg); break; // converting from char *; - case MP_QSTR_cache: dest[0] = mp_read_ptr_lv_cache_t((void*)data->cache); break; // converting from lv_cache_t *; - case MP_QSTR_cache_entry: dest[0] = mp_read_ptr_lv_cache_entry_t((void*)data->cache_entry); break; // converting from lv_cache_entry_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_cache: dest[0] = ptr_to_mp((void*)data->cache); break; // converting from lv_cache_t *; + case MP_QSTR_ref_cnt: dest[0] = mp_obj_new_int(data->ref_cnt); break; // converting from int32_t; + case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -18488,20 +19706,10 @@ static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; - case MP_QSTR_args: data->args = mp_write_lv_image_decoder_args_t(dest[1]); break; // converting to lv_image_decoder_args_t; - case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; - case MP_QSTR_file: data->file = mp_write_lv_fs_file_t(dest[1]); break; // converting to lv_fs_file_t; - case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; - case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_palette: data->palette = (void*)mp_write_ptr_lv_color32_t(dest[1]); break; // converting to lv_color32_t *; - case MP_QSTR_palette_size: data->palette_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_time_to_open: data->time_to_open = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_error_msg: data->error_msg = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_cache: data->cache = (void*)mp_write_ptr_lv_cache_t(dest[1]); break; // converting to lv_cache_t *; - case MP_QSTR_cache_entry: data->cache_entry = (void*)mp_write_ptr_lv_cache_entry_t(dest[1]); break; // converting to lv_cache_entry_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_cache: data->cache = (void*)mp_to_ptr(dest[1]); break; // converting to lv_cache_t *; + case MP_QSTR_ref_cnt: data->ref_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_flags: data->flags = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -18510,312 +19718,231 @@ static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_image_decoder_dsc_t_print(const mp_print_t *print, +static void mp_lv_cache_entry_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_decoder_dsc_t"); + mp_printf(print, "struct lv_cache_entry_t"); } -static const mp_obj_dict_t mp_lv_image_decoder_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_cache_entry_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_decoder_dsc_t_type, - MP_QSTR_lv_image_decoder_dsc_t, + mp_lv_cache_entry_t_type, + MP_QSTR_lv_cache_entry_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_decoder_dsc_t_print, + print, mp_lv_cache_entry_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_decoder_dsc_t_attr, - locals_dict, &mp_lv_image_decoder_dsc_t_locals_dict, + attr, mp_lv_cache_entry_t_attr, + locals_dict, &mp_lv_cache_entry_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void) { - return &mp_lv_image_decoder_dsc_t_type; + return &mp_lv_cache_entry_t_type; } /* * lvgl extension definition for: - * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) + * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_func_ptr)(dsc, src, args); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[2]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_open_mpobj, 3, mp_lv_image_decoder_open, lv_image_decoder_open); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_cb_t_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, funcptr_lv_cache_get_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * lvgl extension definition for: - * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_cb_callback' + * lv_cache_get_cb_t get_cb */ + -static mp_obj_t mp_lv_image_decoder_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_area_t *decoded_area = mp_write_ptr_lv_area_t(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_func_ptr)(dsc, full_area, decoded_area); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_area_mpobj, 3, mp_lv_image_decoder_get_area, lv_image_decoder_get_area); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_add_cb_callback' + * lv_cache_add_cb_t add_cb + */ +#define funcptr_lv_cache_remove_cb_t NULL + /* * lvgl extension definition for: - * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) + * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_remove_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - ((void (*)(lv_image_decoder_dsc_t *))lv_func_ptr)(dsc); + void *user_data = mp_to_ptr(mp_args[2]); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_entry_t *, void *))lv_func_ptr)(cache, entry, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_close_mpobj, 1, mp_lv_image_decoder_close, lv_image_decoder_close); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_remove_cb_t_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, funcptr_lv_cache_remove_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_remove_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * lvgl extension definition for: - * lv_image_decoder_t *lv_image_decoder_create(void) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_remove_cb_callback' + * lv_cache_remove_cb_t remove_cb */ - -static mp_obj_t mp_lv_image_decoder_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_image_decoder_t((void*)_res); -} - - +#define funcptr_lv_cache_drop_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_create_mpobj, 0, mp_lv_image_decoder_create, lv_image_decoder_create); - /* * lvgl extension definition for: - * void lv_image_decoder_delete(lv_image_decoder_t *decoder) + * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_drop_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - ((void (*)(lv_image_decoder_t *))lv_func_ptr)(decoder); + void *user_data = mp_to_ptr(mp_args[2]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + ((void (*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_delete_mpobj, 1, mp_lv_image_decoder_delete, lv_image_decoder_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_drop_cb_t_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, funcptr_lv_cache_drop_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_drop_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * lvgl extension definition for: - * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_cb_callback' + * lv_cache_drop_cb_t drop_cb */ - -static mp_obj_t mp_lv_image_decoder_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_func_ptr)(decoder); - return mp_read_ptr_lv_image_decoder_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_next_mpobj, 1, mp_lv_image_decoder_get_next, lv_image_decoder_get_next); /* - * Callback function lv_image_decoder_t_info_cb - * lv_result_t lv_image_decoder_info_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_all_cb_callback' + * lv_cache_drop_all_cb_t drop_all_cb */ - -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, lv_image_header_t *arg2) -{ - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_args[2] = mp_read_ptr_lv_image_header_t((void*)arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_info_cb)), 3, mp_args); - return (int)mp_obj_get_int(callback_result); -} + +#define funcptr_lv_cache_get_victim_cb NULL /* * lvgl extension definition for: - * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) + * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_set_info_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_get_victim_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *info_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_info_cb_callback, MP_QSTR_lv_image_decoder_t_info_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_func_ptr)(decoder, info_cb); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_info_cb_mpobj, 2, mp_lv_image_decoder_set_info_cb, lv_image_decoder_set_info_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_victim_cb_mpobj, 2, mp_funcptr_lv_cache_get_victim_cb, funcptr_lv_cache_get_victim_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_victim_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * Callback function lv_image_decoder_t_open_cb - * lv_result_t lv_image_decoder_open_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_victim_cb_callback' + * lv_cache_get_victim_cb get_victim_cb */ - -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_open_cb)), 2, mp_args); - return (int)mp_obj_get_int(callback_result); -} + +#define funcptr_lv_cache_reserve_cond_cb NULL /* * lvgl extension definition for: - * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) + * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_set_open_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_reserve_cond_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *open_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_open_cb_callback, MP_QSTR_lv_image_decoder_t_open_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_func_ptr)(decoder, open_cb); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[3]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t size = (size_t)mp_obj_get_int(mp_args[2]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_cache_reserve_cond_res_t _res = ((lv_cache_reserve_cond_res_t (*)(lv_cache_t *, const void *, size_t, void *))lv_func_ptr)(cache, key, size, user_data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_open_cb_mpobj, 2, mp_lv_image_decoder_set_open_cb, lv_image_decoder_set_open_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_reserve_cond_cb_mpobj, 4, mp_funcptr_lv_cache_reserve_cond_cb, funcptr_lv_cache_reserve_cond_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_reserve_cond_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * Callback function lv_image_decoder_t_read_line_cb - * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_reserve_cond_cb_callback' + * lv_cache_reserve_cond_cb reserve_cond_cb */ - -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_read_line_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) -{ - mp_obj_t mp_args[4]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_args[2] = mp_read_ptr_lv_area_t((void*)arg2); - mp_args[3] = mp_read_ptr_lv_area_t((void*)arg3); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_read_line_cb)), 4, mp_args); - return (int)mp_obj_get_int(callback_result); -} + +#define funcptr_lv_cache_iter_create_cb NULL /* - * lvgl extension definition for: - * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t read_line_cb) - */ - -static mp_obj_t mp_lv_image_decoder_set_get_area_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *read_line_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_read_line_cb_callback, MP_QSTR_lv_image_decoder_t_read_line_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_func_ptr)(decoder, read_line_cb); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_get_area_cb_mpobj, 2, mp_lv_image_decoder_set_get_area_cb, lv_image_decoder_set_get_area_cb); - - -/* - * Callback function lv_image_decoder_t_close_cb - * void lv_image_decoder_close_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) - */ - -GENMPY_UNUSED static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_close_cb)), 2, mp_args); - return; -} - - -/* - * lvgl extension definition for: - * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) - */ - -static mp_obj_t mp_lv_image_decoder_set_close_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *close_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_close_cb_callback, MP_QSTR_lv_image_decoder_t_close_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_func_ptr)(decoder, close_cb); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_close_cb_mpobj, 2, mp_lv_image_decoder_set_close_cb, lv_image_decoder_set_close_cb); - - -/* - * Struct lv_cache_slot_size_t + * Struct lv_iter_t */ -static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_slot_size_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_iter_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_slot_size_t_type())); - return (lv_cache_slot_size_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_iter_t_type())); + return (lv_iter_t*)self->data; } -#define mp_write_lv_cache_slot_size_t(struct_obj) *((lv_cache_slot_size_t*)mp_write_ptr_lv_cache_slot_size_t(struct_obj)) +#define mp_write_lv_iter_t(struct_obj) *((lv_iter_t*)mp_write_ptr_lv_iter_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_slot_size_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_iter_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_slot_size_t_type(), field); + return lv_to_mp_struct(get_mp_lv_iter_t_type(), field); } -#define mp_read_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(copy_buffer(&field, sizeof(lv_cache_slot_size_t))) -#define mp_read_byref_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(&field) +#define mp_read_lv_iter_t(field) mp_read_ptr_lv_iter_t(copy_buffer(&field, sizeof(lv_iter_t))) +#define mp_read_byref_lv_iter_t(field) mp_read_ptr_lv_iter_t(&field) -static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)self->data; + GENMPY_UNUSED lv_iter_t *data = (lv_iter_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -18824,7 +19951,7 @@ static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * // store attribute switch(attr) { - case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + ; default: return; } @@ -18833,72 +19960,103 @@ static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * } } -static void mp_lv_cache_slot_size_t_print(const mp_print_t *print, +static void mp_lv_iter_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_slot_size_t"); + mp_printf(print, "struct lv_iter_t"); } -static const mp_obj_dict_t mp_lv_cache_slot_size_t_locals_dict; +static const mp_obj_dict_t mp_lv_iter_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_slot_size_t_type, - MP_QSTR_lv_cache_slot_size_t, + mp_lv_iter_t_type, + MP_QSTR_lv_iter_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_slot_size_t_print, + print, mp_lv_iter_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_slot_size_t_attr, - locals_dict, &mp_lv_cache_slot_size_t_locals_dict, + attr, mp_lv_iter_t_attr, + locals_dict, &mp_lv_iter_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void) { - return &mp_lv_cache_slot_size_t_type; + return &mp_lv_iter_t_type; } /* - * Struct lv_image_cache_data_t + * lvgl extension definition for: + * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) */ -static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void); +static mp_obj_t mp_funcptr_lv_cache_iter_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_iter_t * _res = ((lv_iter_t *(*)(lv_cache_t *))lv_func_ptr)(cache); + return mp_read_ptr_lv_iter_t((void*)_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_cache_data_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_iter_create_cb_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, funcptr_lv_cache_iter_create_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_iter_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_iter_create_cb_callback' + * lv_cache_iter_create_cb iter_create_cb + */ + + +/* + * Struct lv_cache_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_class_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_cache_data_t_type())); - return (lv_image_cache_data_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_class_t_type())); + return (lv_cache_class_t*)self->data; } -#define mp_write_lv_image_cache_data_t(struct_obj) *((lv_image_cache_data_t*)mp_write_ptr_lv_image_cache_data_t(struct_obj)) +#define mp_write_lv_cache_class_t(struct_obj) *((lv_cache_class_t*)mp_write_ptr_lv_cache_class_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_cache_data_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_class_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_cache_data_t_type(), field); + return lv_to_mp_struct(get_mp_lv_cache_class_t_type(), field); } -#define mp_read_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(copy_buffer(&field, sizeof(lv_image_cache_data_t))) -#define mp_read_byref_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(&field) +#define mp_read_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(copy_buffer(&field, sizeof(lv_cache_class_t))) +#define mp_read_byref_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(&field) -static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_cache_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_cache_data_t *data = (lv_image_cache_data_t*)self->data; + GENMPY_UNUSED lv_cache_class_t *data = (lv_cache_class_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_slot: dest[0] = mp_read_byref_lv_cache_slot_size_t(data->slot); break; // converting from lv_cache_slot_size_t; - case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; - case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; - case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; - case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_alloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, data->alloc_cb, NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL); break; // converting from callback lv_cache_alloc_cb_t; + case MP_QSTR_init_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, data->init_cb, NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL); break; // converting from callback lv_cache_init_cb_t; + case MP_QSTR_destroy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->destroy_cb, NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL); break; // converting from callback lv_cache_destroy_cb_t; + case MP_QSTR_get_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->get_cb, NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL); break; // converting from callback lv_cache_get_cb_t; + case MP_QSTR_add_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->add_cb, NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL); break; // converting from callback lv_cache_add_cb_t; + case MP_QSTR_remove_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, data->remove_cb, NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL); break; // converting from callback lv_cache_remove_cb_t; + case MP_QSTR_drop_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, data->drop_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL); break; // converting from callback lv_cache_drop_cb_t; + case MP_QSTR_drop_all_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->drop_all_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL); break; // converting from callback lv_cache_drop_all_cb_t; + case MP_QSTR_get_victim_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, data->get_victim_cb, NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL); break; // converting from callback lv_cache_get_victim_cb; + case MP_QSTR_reserve_cond_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, data->reserve_cond_cb, NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL); break; // converting from callback lv_cache_reserve_cond_cb; + case MP_QSTR_iter_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, data->iter_create_cb, NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL); break; // converting from callback lv_cache_iter_create_cb; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -18907,12 +20065,17 @@ static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_slot: data->slot = mp_write_lv_cache_slot_size_t(dest[1]); break; // converting to lv_cache_slot_size_t; - case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; - case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_alloc_cb: data->alloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_alloc_cb_t; + case MP_QSTR_init_cb: data->init_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_init_cb_t; + case MP_QSTR_destroy_cb: data->destroy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_destroy_cb_t; + case MP_QSTR_get_cb: data->get_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_cb_t; + case MP_QSTR_add_cb: data->add_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_add_cb_t; + case MP_QSTR_remove_cb: data->remove_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_remove_cb_t; + case MP_QSTR_drop_cb: data->drop_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_cb_t; + case MP_QSTR_drop_all_cb: data->drop_all_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_all_cb_t; + case MP_QSTR_get_victim_cb: data->get_victim_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_victim_cb; + case MP_QSTR_reserve_cond_cb: data->reserve_cond_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_reserve_cond_cb; + case MP_QSTR_iter_create_cb: data->iter_create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_iter_create_cb; default: return; } @@ -18921,8436 +20084,7932 @@ static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_image_cache_data_t_print(const mp_print_t *print, +static void mp_lv_cache_class_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_cache_data_t"); + mp_printf(print, "struct lv_cache_class_t"); } -static const mp_obj_dict_t mp_lv_image_cache_data_t_locals_dict; +static const mp_obj_dict_t mp_lv_cache_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_cache_data_t_type, - MP_QSTR_lv_image_cache_data_t, + mp_lv_cache_class_t_type, + MP_QSTR_lv_cache_class_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_cache_data_t_print, + print, mp_lv_cache_class_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_cache_data_t_attr, - locals_dict, &mp_lv_image_cache_data_t_locals_dict, + attr, mp_lv_cache_class_t_attr, + locals_dict, &mp_lv_cache_class_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void) { - return &mp_lv_image_cache_data_t_type; + return &mp_lv_cache_class_t_type; } +#define funcptr_lv_cache_compare_cb_t NULL -/* - * lvgl extension definition for: - * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) - */ - -static mp_obj_t mp_lv_image_decoder_add_to_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *user_data = mp_to_ptr(mp_args[3]); - lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(mp_args[1]); - const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[2]); - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_func_ptr)(decoder, search_key, decoded, user_data); - return mp_read_ptr_lv_cache_entry_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_add_to_cache_mpobj, 4, mp_lv_image_decoder_add_to_cache, lv_image_decoder_add_to_cache); - /* * lvgl extension definition for: - * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) + * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) */ -static mp_obj_t mp_lv_image_decoder_post_process(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_compare_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(dsc, decoded); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const void *a = (const void *)mp_to_ptr(mp_args[0]); + const void *b = (const void *)mp_to_ptr(mp_args[1]); + lv_cache_compare_res_t _res = ((lv_cache_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_post_process_mpobj, 2, mp_lv_image_decoder_post_process, lv_image_decoder_post_process); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_compare_cb_t_mpobj, 2, mp_funcptr_lv_cache_compare_cb_t, funcptr_lv_cache_compare_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_compare_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * lvgl extension definition for: - * lv_image_src_t lv_image_src_get_type(const void *src) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_compare_cb_callback' + * lv_cache_compare_cb_t compare_cb */ - -static mp_obj_t mp_lv_image_src_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const void *src = (const void *)mp_to_ptr(mp_args[0]); - lv_image_src_t _res = ((lv_image_src_t (*)(const void *))lv_func_ptr)(src); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_src_get_type_mpobj, 1, mp_lv_image_src_get_type, lv_image_src_get_type); +#define funcptr_lv_cache_create_cb_t NULL + /* * lvgl extension definition for: - * void lv_image_set_src(lv_obj_t *obj, const void *src) + * bool lv_cache_create_cb_t(void *node, void *user_data) */ -static mp_obj_t mp_lv_image_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_create_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - ((void (*)(lv_obj_t *, const void *))lv_func_ptr)(obj, src); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[1]); + void *node = mp_to_ptr(mp_args[0]); + bool _res = ((bool (*)(void *, void *))lv_func_ptr)(node, user_data); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_src_mpobj, 2, mp_lv_image_set_src, lv_image_set_src); - -/* Reusing lv_obj_move_to_index for lv_image_set_offset_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_x); - -/* Reusing lv_obj_move_to_index for lv_image_set_offset_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_y); - -/* Reusing lv_obj_move_to_index for lv_image_set_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_rotation); - -/* Reusing lv_obj_set_pos for lv_image_set_pivot */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_mpobj, 3, mp_lv_obj_set_pos, lv_image_set_pivot); - -/* Reusing lv_obj_move_to_index for lv_image_set_pivot_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_x); - -/* Reusing lv_obj_move_to_index for lv_image_set_pivot_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_create_cb_t_mpobj, 2, mp_funcptr_lv_cache_create_cb_t, funcptr_lv_cache_create_cb_t); -/* Reusing lv_obj_delete_delayed for lv_image_set_scale */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_create_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale); - -/* Reusing lv_obj_delete_delayed for lv_image_set_scale_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_x); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_create_cb_callback' + * lv_cache_create_cb_t create_cb + */ -/* Reusing lv_obj_delete_delayed for lv_image_set_scale_y */ +#define funcptr_lv_cache_free_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_y); - /* * lvgl extension definition for: - * void lv_image_set_blend_mode(lv_obj_t *obj, lv_blend_mode_t blend_mode) + * void lv_cache_free_cb_t(void *node, void *user_data) */ -static mp_obj_t mp_lv_image_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_blend_mode_t blend_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_blend_mode_t))lv_func_ptr)(obj, blend_mode); + void *user_data = mp_to_ptr(mp_args[1]); + void *node = mp_to_ptr(mp_args[0]); + ((void (*)(void *, void *))lv_func_ptr)(node, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_blend_mode_mpobj, 2, mp_lv_image_set_blend_mode, lv_image_set_blend_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_free_cb_t_mpobj, 2, mp_funcptr_lv_cache_free_cb_t, funcptr_lv_cache_free_cb_t); -/* Reusing lv_obj_set_radio_button for lv_image_set_antialias */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_antialias_mpobj, 2, mp_lv_obj_set_radio_button, lv_image_set_antialias); - /* - * lvgl extension definition for: - * void lv_image_set_inner_align(lv_obj_t *obj, lv_image_align_t align) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_free_cb_callback' + * lv_cache_free_cb_t free_cb */ - -static mp_obj_t mp_lv_image_set_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_image_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_image_align_t))lv_func_ptr)(obj, align); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_inner_align_mpobj, 2, mp_lv_image_set_inner_align, lv_image_set_inner_align); /* - * lvgl extension definition for: - * void lv_image_set_bitmap_map_src(lv_obj_t *obj, const lv_image_dsc_t *src) + * Struct lv_cache_ops_t */ -static mp_obj_t mp_lv_image_set_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_ops_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_image_dsc_t *src = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); - ((void (*)(lv_obj_t *, const lv_image_dsc_t *))lv_func_ptr)(obj, src); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_ops_t_type())); + return (lv_cache_ops_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_bitmap_map_src_mpobj, 2, mp_lv_image_set_bitmap_map_src, lv_image_set_bitmap_map_src); - - -/* - * lvgl extension definition for: - * const void *lv_image_get_src(lv_obj_t *obj) - */ +#define mp_write_lv_cache_ops_t(struct_obj) *((lv_cache_ops_t*)mp_write_ptr_lv_cache_ops_t(struct_obj)) -static mp_obj_t mp_lv_image_get_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_ops_t(void *field) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void * _res = ((const void *(*)(lv_obj_t *))lv_func_ptr)(obj); - return ptr_to_mp((void*)_res); + return lv_to_mp_struct(get_mp_lv_cache_ops_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_mpobj, 1, mp_lv_image_get_src, lv_image_get_src); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_x); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_y); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_rotation); - -/* Reusing lv_obj_get_scroll_end for lv_image_get_pivot */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_pivot_mpobj, 2, mp_lv_obj_get_scroll_end, lv_image_get_pivot); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_x); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_y); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_width); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_height); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_width */ +#define mp_read_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(copy_buffer(&field, sizeof(lv_cache_ops_t))) +#define mp_read_byref_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_width); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_height */ +static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_cache_ops_t *data = (lv_cache_ops_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_height); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_compare_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, data->compare_cb, NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL); break; // converting from callback lv_cache_compare_cb_t; + case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, data->create_cb, NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL); break; // converting from callback lv_cache_create_cb_t; + case MP_QSTR_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, data->free_cb, NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL); break; // converting from callback lv_cache_free_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_compare_cb: data->compare_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_compare_cb_t; + case MP_QSTR_create_cb: data->create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_create_cb_t; + case MP_QSTR_free_cb: data->free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_free_cb_t; + default: return; + } -/* - * lvgl extension definition for: - * lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t *obj) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_image_get_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_cache_ops_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_blend_mode_t _res = ((lv_blend_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_cache_ops_t"); } - +static const mp_obj_dict_t mp_lv_cache_ops_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_blend_mode_mpobj, 1, mp_lv_image_get_blend_mode, lv_image_get_blend_mode); - -/* Reusing lv_obj_refr_size for lv_image_get_antialias */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_cache_ops_t_type, + MP_QSTR_lv_cache_ops_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_cache_ops_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_cache_ops_t_attr, + locals_dict, &mp_lv_cache_ops_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_antialias_mpobj, 1, mp_lv_obj_refr_size, lv_image_get_antialias); +static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void) +{ + return &mp_lv_cache_ops_t_type; +} /* - * lvgl extension definition for: - * lv_image_align_t lv_image_get_inner_align(lv_obj_t *obj) + * Struct lv_cache_t */ -static mp_obj_t mp_lv_image_get_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_image_align_t _res = ((lv_image_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_t_type())); + return (lv_cache_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_inner_align_mpobj, 1, mp_lv_image_get_inner_align, lv_image_get_inner_align); - - -/* - * lvgl extension definition for: - * const lv_image_dsc_t *lv_image_get_bitmap_map_src(lv_obj_t *obj) - */ +#define mp_write_lv_cache_t(struct_obj) *((lv_cache_t*)mp_write_ptr_lv_cache_t(struct_obj)) -static mp_obj_t mp_lv_image_get_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_t(void *field) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_image_dsc_t * _res = ((const lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_image_dsc_t((void*)_res); + return lv_to_mp_struct(get_mp_lv_cache_t_type(), field); } - +#define mp_read_lv_cache_t(field) mp_read_ptr_lv_cache_t(copy_buffer(&field, sizeof(lv_cache_t))) +#define mp_read_byref_lv_cache_t(field) mp_read_ptr_lv_cache_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_bitmap_map_src_mpobj, 1, mp_lv_image_get_bitmap_map_src, lv_image_get_bitmap_map_src); - -/* Reusing lv_obj_bind_checked for lv_image_bind_src */ +static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_cache_t *data = (lv_cache_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_bind_src_mpobj, 2, mp_lv_obj_bind_checked, lv_image_bind_src); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_clz: dest[0] = mp_read_ptr_lv_cache_class_t((void*)data->clz); break; // converting from lv_cache_class_t *; + case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; + case MP_QSTR_max_size: dest[0] = mp_obj_new_int_from_uint(data->max_size); break; // converting from uint32_t; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; + case MP_QSTR_ops: dest[0] = mp_read_byref_lv_cache_ops_t(data->ops); break; // converting from lv_cache_ops_t; + case MP_QSTR_lock: dest[0] = mp_obj_new_int(data->lock); break; // converting from lv_mutex_t; + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_clz: data->clz = (void*)mp_write_ptr_lv_cache_class_t(dest[1]); break; // converting to lv_cache_class_t *; + case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_max_size: data->max_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_ops: data->ops = mp_write_lv_cache_ops_t(dest[1]); break; // converting to lv_cache_ops_t; + case MP_QSTR_lock: data->lock = (int)mp_obj_get_int(dest[1]); break; // converting to lv_mutex_t; + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + default: return; + } -/* - * lvgl extension definition for: - * lv_result_t lv_image_header_cache_init(uint32_t count) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_image_header_cache_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_cache_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - uint32_t count = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(uint32_t))lv_func_ptr)(count); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_cache_t"); } - +static const mp_obj_dict_t mp_lv_cache_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_cache_t_type, + MP_QSTR_lv_cache_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_cache_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_cache_t_attr, + locals_dict, &mp_lv_cache_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_init_mpobj, 1, mp_lv_image_header_cache_init, lv_image_header_cache_init); +static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void) +{ + return &mp_lv_cache_t_type; +} /* - * lvgl extension definition for: - * void lv_image_header_cache_resize(uint32_t count, bool evict_now) + * Struct lv_image_decoder_dsc_t */ -static mp_obj_t mp_lv_image_header_cache_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_decoder_dsc_t(mp_obj_t self_in) { - uint32_t count = (uint32_t)mp_obj_get_int(mp_args[0]); - bool evict_now = mp_obj_is_true(mp_args[1]); - ((void (*)(uint32_t, bool))lv_func_ptr)(count, evict_now); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_decoder_dsc_t_type())); + return (lv_image_decoder_dsc_t*)self->data; } - +#define mp_write_lv_image_decoder_dsc_t(struct_obj) *((lv_image_decoder_dsc_t*)mp_write_ptr_lv_image_decoder_dsc_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_decoder_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_image_decoder_dsc_t_type(), field); +} + +#define mp_read_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(copy_buffer(&field, sizeof(lv_image_decoder_dsc_t))) +#define mp_read_byref_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(&field) + +static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; + case MP_QSTR_args: dest[0] = mp_read_byref_lv_image_decoder_args_t(data->args); break; // converting from lv_image_decoder_args_t; + case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; + case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; + case MP_QSTR_file: dest[0] = mp_read_byref_lv_fs_file_t(data->file); break; // converting from lv_fs_file_t; + case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; + case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; + case MP_QSTR_palette: dest[0] = mp_read_ptr_lv_color32_t((void*)data->palette); break; // converting from lv_color32_t *; + case MP_QSTR_palette_size: dest[0] = mp_obj_new_int_from_uint(data->palette_size); break; // converting from uint32_t; + case MP_QSTR_time_to_open: dest[0] = mp_obj_new_int_from_uint(data->time_to_open); break; // converting from uint32_t; + case MP_QSTR_error_msg: dest[0] = convert_to_str((void*)data->error_msg); break; // converting from char *; + case MP_QSTR_cache: dest[0] = mp_read_ptr_lv_cache_t((void*)data->cache); break; // converting from lv_cache_t *; + case MP_QSTR_cache_entry: dest[0] = mp_read_ptr_lv_cache_entry_t((void*)data->cache_entry); break; // converting from lv_cache_entry_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; + case MP_QSTR_args: data->args = mp_write_lv_image_decoder_args_t(dest[1]); break; // converting to lv_image_decoder_args_t; + case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; + case MP_QSTR_file: data->file = mp_write_lv_fs_file_t(dest[1]); break; // converting to lv_fs_file_t; + case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; + case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_palette: data->palette = (void*)mp_write_ptr_lv_color32_t(dest[1]); break; // converting to lv_color32_t *; + case MP_QSTR_palette_size: data->palette_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_time_to_open: data->time_to_open = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_error_msg: data->error_msg = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_cache: data->cache = (void*)mp_write_ptr_lv_cache_t(dest[1]); break; // converting to lv_cache_t *; + case MP_QSTR_cache_entry: data->cache_entry = (void*)mp_write_ptr_lv_cache_entry_t(dest[1]); break; // converting to lv_cache_entry_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_image_decoder_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_image_decoder_dsc_t"); +} + +static const mp_obj_dict_t mp_lv_image_decoder_dsc_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_image_decoder_dsc_t_type, + MP_QSTR_lv_image_decoder_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_image_decoder_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_image_decoder_dsc_t_attr, + locals_dict, &mp_lv_image_decoder_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_resize_mpobj, 2, mp_lv_image_header_cache_resize, lv_image_header_cache_resize); +static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void) +{ + return &mp_lv_image_decoder_dsc_t_type; +} /* * lvgl extension definition for: - * void lv_image_header_cache_drop(const void *src) + * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) */ -static mp_obj_t mp_lv_image_header_cache_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *src = (const void *)mp_to_ptr(mp_args[0]); - ((void (*)(const void *))lv_func_ptr)(src); - return mp_const_none; + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_func_ptr)(dsc, src, args); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_drop_mpobj, 1, mp_lv_image_header_cache_drop, lv_image_header_cache_drop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_open_mpobj, 3, mp_lv_image_decoder_open, lv_image_decoder_open); /* * lvgl extension definition for: - * bool lv_image_header_cache_is_enabled(void) + * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) */ -static mp_obj_t mp_lv_image_header_cache_is_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - bool _res = ((bool (*)(void))lv_func_ptr)(); - return convert_to_bool(_res); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_area_t *decoded_area = mp_write_ptr_lv_area_t(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_func_ptr)(dsc, full_area, decoded_area); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_is_enabled_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_image_header_cache_is_enabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_area_mpobj, 3, mp_lv_image_decoder_get_area, lv_image_decoder_get_area); /* * lvgl extension definition for: - * lv_iter_t *lv_image_header_cache_iter_create(void) + * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) */ -static mp_obj_t mp_lv_image_header_cache_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_iter_t * _res = ((lv_iter_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_iter_t((void*)_res); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + ((void (*)(lv_image_decoder_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_iter_create_mpobj, 0, mp_lv_image_header_cache_iter_create, lv_image_header_cache_iter_create); - -/* Reusing lv_obj_style_init for lv_image_header_cache_dump */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_dump_mpobj, 0, mp_lv_obj_style_init, lv_image_header_cache_dump); - -/* Reusing lv_image_header_cache_init for lv_image_cache_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_init_mpobj, 1, mp_lv_image_header_cache_init, lv_image_cache_init); - -/* Reusing lv_image_header_cache_resize for lv_image_cache_resize */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_resize_mpobj, 2, mp_lv_image_header_cache_resize, lv_image_cache_resize); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_close_mpobj, 1, mp_lv_image_decoder_close, lv_image_decoder_close); -/* Reusing lv_image_header_cache_drop for lv_image_cache_drop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_drop_mpobj, 1, mp_lv_image_header_cache_drop, lv_image_cache_drop); - -/* Reusing lv_image_header_cache_is_enabled for lv_image_cache_is_enabled */ +/* + * lvgl extension definition for: + * lv_image_decoder_t *lv_image_decoder_create(void) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_is_enabled_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_image_cache_is_enabled); +static mp_obj_t mp_lv_image_decoder_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ -/* Reusing lv_image_header_cache_iter_create for lv_image_cache_iter_create */ + lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_image_decoder_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_iter_create_mpobj, 0, mp_lv_image_header_cache_iter_create, lv_image_cache_iter_create); - -/* Reusing lv_obj_style_init for lv_image_cache_dump */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_dump_mpobj, 0, mp_lv_obj_style_init, lv_image_cache_dump); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_create_mpobj, 0, mp_lv_image_decoder_create, lv_image_decoder_create); /* * lvgl extension definition for: - * void lv_image_buf_get_transformed_area(lv_area_t *res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x, uint16_t scale_y, const lv_point_t *pivot) + * void lv_image_decoder_delete(lv_image_decoder_t *decoder) */ -static mp_obj_t mp_lv_image_buf_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t h = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t angle = (int32_t)mp_obj_get_int(mp_args[3]); - uint16_t scale_x = (uint16_t)mp_obj_get_int(mp_args[4]); - uint16_t scale_y = (uint16_t)mp_obj_get_int(mp_args[5]); - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[6]); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, uint16_t, uint16_t, const lv_point_t *))lv_func_ptr)(res, w, h, angle, scale_x, scale_y, pivot); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + ((void (*)(lv_image_decoder_t *))lv_func_ptr)(decoder); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_buf_get_transformed_area_mpobj, 7, mp_lv_image_buf_get_transformed_area, lv_image_buf_get_transformed_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_delete_mpobj, 1, mp_lv_image_decoder_delete, lv_image_decoder_delete); /* * lvgl extension definition for: - * void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count) + * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) */ -static mp_obj_t mp_lv_image_decoder_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t image_cache_size = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t image_header_count = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(uint32_t, uint32_t))lv_func_ptr)(image_cache_size, image_header_count); - return mp_const_none; + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_func_ptr)(decoder); + return mp_read_ptr_lv_image_decoder_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_init_mpobj, 2, mp_lv_image_decoder_init, lv_image_decoder_init); - -/* Reusing lv_obj_style_init for lv_image_decoder_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_deinit_mpobj, 0, mp_lv_obj_style_init, lv_image_decoder_deinit); - -/* Reusing lv_obj_create for lv_image_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_create_mpobj, 1, mp_lv_obj_create, lv_image_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_next_mpobj, 1, mp_lv_image_decoder_get_next, lv_image_decoder_get_next); /* - * lvgl image object definitions + * Callback function lv_image_decoder_t_info_cb + * lv_result_t lv_image_decoder_info_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) */ - - -static const mp_rom_map_elem_t image_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_buf_set_palette), MP_ROM_PTR(&mp_lv_image_buf_set_palette_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_buf_free), MP_ROM_PTR(&mp_lv_image_buf_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_get_info), MP_ROM_PTR(&mp_lv_image_decoder_get_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_open), MP_ROM_PTR(&mp_lv_image_decoder_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_get_area), MP_ROM_PTR(&mp_lv_image_decoder_get_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_close), MP_ROM_PTR(&mp_lv_image_decoder_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_create), MP_ROM_PTR(&mp_lv_image_decoder_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_delete), MP_ROM_PTR(&mp_lv_image_decoder_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_get_next), MP_ROM_PTR(&mp_lv_image_decoder_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_info_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_info_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_open_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_open_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_get_area_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_get_area_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_close_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_close_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_add_to_cache), MP_ROM_PTR(&mp_lv_image_decoder_add_to_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_post_process), MP_ROM_PTR(&mp_lv_image_decoder_post_process_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_src_get_type), MP_ROM_PTR(&mp_lv_image_src_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_image_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset_x), MP_ROM_PTR(&mp_lv_image_set_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset_y), MP_ROM_PTR(&mp_lv_image_set_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_image_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pivot), MP_ROM_PTR(&mp_lv_image_set_pivot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pivot_x), MP_ROM_PTR(&mp_lv_image_set_pivot_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pivot_y), MP_ROM_PTR(&mp_lv_image_set_pivot_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_image_set_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale_x), MP_ROM_PTR(&mp_lv_image_set_scale_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale_y), MP_ROM_PTR(&mp_lv_image_set_scale_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_image_set_blend_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_antialias), MP_ROM_PTR(&mp_lv_image_set_antialias_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_inner_align), MP_ROM_PTR(&mp_lv_image_set_inner_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_set_bitmap_map_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src), MP_ROM_PTR(&mp_lv_image_get_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_image_get_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_image_get_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_image_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pivot), MP_ROM_PTR(&mp_lv_image_get_pivot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_image_get_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale_x), MP_ROM_PTR(&mp_lv_image_get_scale_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale_y), MP_ROM_PTR(&mp_lv_image_get_scale_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_width), MP_ROM_PTR(&mp_lv_image_get_src_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_height), MP_ROM_PTR(&mp_lv_image_get_src_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transformed_width), MP_ROM_PTR(&mp_lv_image_get_transformed_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transformed_height), MP_ROM_PTR(&mp_lv_image_get_transformed_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_blend_mode), MP_ROM_PTR(&mp_lv_image_get_blend_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_antialias), MP_ROM_PTR(&mp_lv_image_get_antialias_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_inner_align), MP_ROM_PTR(&mp_lv_image_get_inner_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_get_bitmap_map_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_src), MP_ROM_PTR(&mp_lv_image_bind_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_init), MP_ROM_PTR(&mp_lv_image_header_cache_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_resize), MP_ROM_PTR(&mp_lv_image_header_cache_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_drop), MP_ROM_PTR(&mp_lv_image_header_cache_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_header_cache_is_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_iter_create), MP_ROM_PTR(&mp_lv_image_header_cache_iter_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_dump), MP_ROM_PTR(&mp_lv_image_header_cache_dump_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_init), MP_ROM_PTR(&mp_lv_image_cache_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_resize), MP_ROM_PTR(&mp_lv_image_cache_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_drop), MP_ROM_PTR(&mp_lv_image_cache_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_cache_is_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_iter_create), MP_ROM_PTR(&mp_lv_image_cache_iter_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_dump), MP_ROM_PTR(&mp_lv_image_cache_dump_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_buf_get_transformed_area), MP_ROM_PTR(&mp_lv_image_buf_get_transformed_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_init), MP_ROM_PTR(&mp_lv_image_decoder_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_deinit), MP_ROM_PTR(&mp_lv_image_decoder_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_FLAGS), MP_ROM_PTR(&mp_lv_LV_IMAGE_FLAGS_type_base) }, - { MP_ROM_QSTR(MP_QSTR_COMPRESS), MP_ROM_PTR(&mp_lv_LV_IMAGE_COMPRESS_type_base) }, - { MP_ROM_QSTR(MP_QSTR_SRC), MP_ROM_PTR(&mp_lv_LV_IMAGE_SRC_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ALIGN), MP_ROM_PTR(&mp_lv_LV_IMAGE_ALIGN_type_base) } -}; -static MP_DEFINE_CONST_DICT(image_locals_dict, image_locals_dict_table); - -static void image_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, lv_image_header_t *arg2) { - mp_printf(print, "lvgl image"); + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + mp_args[2] = mp_read_ptr_lv_image_header_t((void*)arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_info_cb)), 3, mp_args); + return (int)mp_obj_get_int(callback_result); } -static mp_obj_t image_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +/* + * lvgl extension definition for: + * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) + */ + +static mp_obj_t mp_lv_image_decoder_set_info_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_image_create_mpobj, type, n_args, n_kw, args); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *info_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_info_cb_callback, MP_QSTR_lv_image_decoder_t_info_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_func_ptr)(decoder, info_cb); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_type_base, - MP_QSTR_image, - MP_TYPE_FLAG_NONE, - print, image_print, - make_new, image_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &image_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_image_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_image_class, -#endif - .mp_obj_type = &mp_lv_image_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_info_cb_mpobj, 2, mp_lv_image_decoder_set_info_cb, lv_image_decoder_set_info_cb); /* - * Array convertors for void *[] + * Callback function lv_image_decoder_t_open_cb + * lv_result_t lv_image_decoder_open_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) */ -GENMPY_UNUSED static void * *mp_arr_to_void_ptr____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - void * *lv_arr = (void **)m_malloc(len * sizeof(void *)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_to_ptr(item); - } - return (void * *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_void_ptr____(const void * *arr) +GENMPY_UNUSED static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) { - return ptr_to_mp((void*)arr); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_open_cb)), 2, mp_args); + return (int)mp_obj_get_int(callback_result); } /* * lvgl extension definition for: - * void lv_animimg_set_src(lv_obj_t *obj, const void *dsc[], size_t num) + * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) */ -static mp_obj_t mp_lv_animimg_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_set_open_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void **dsc = (const void **)mp_arr_to_void_ptr____(mp_args[1]); - size_t num = (size_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const void *[], size_t))lv_func_ptr)(obj, dsc, num); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *open_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_open_cb_callback, MP_QSTR_lv_image_decoder_t_open_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_func_ptr)(decoder, open_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src); - -/* Reusing lv_animimg_set_src for lv_animimg_set_src_reverse */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_reverse_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src_reverse); - -/* Reusing lv_obj_move_foreground for lv_animimg_start */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_start_mpobj, 1, mp_lv_obj_move_foreground, lv_animimg_start); - -/* Reusing lv_obj_refr_size for lv_animimg_delete */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_delete_mpobj, 1, mp_lv_obj_refr_size, lv_animimg_delete); - -/* Reusing lv_obj_delete_delayed for lv_animimg_set_duration */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_duration); - -/* Reusing lv_obj_delete_delayed for lv_animimg_set_repeat_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_repeat_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_repeat_count); - -/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_duration */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_duration); - -/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_delay */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_delay_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_open_cb_mpobj, 2, mp_lv_image_decoder_set_open_cb, lv_image_decoder_set_open_cb); /* - * Callback function lv_obj_t_start_cb - * void lv_anim_start_cb_t(lv_anim_t *) + * Callback function lv_image_decoder_t_get_area_cb + * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) */ -GENMPY_UNUSED static void lv_obj_t_start_cb_callback(lv_anim_t *arg0) +GENMPY_UNUSED static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t mp_args[4]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + mp_args[2] = mp_read_ptr_lv_area_t((void*)arg2); + mp_args[3] = mp_read_ptr_lv_area_t((void*)arg3); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_start_cb)), 1, mp_args); - return; + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_get_area_cb)), 4, mp_args); + return (int)mp_obj_get_int(callback_result); } /* * lvgl extension definition for: - * void lv_animimg_set_start_cb(lv_obj_t *obj, lv_anim_start_cb_t start_cb) + * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t get_area_cb) */ -static mp_obj_t mp_lv_animimg_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_set_get_area_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - void *start_cb = mp_lv_callback(mp_args[1], &lv_obj_t_start_cb_callback, MP_QSTR_lv_obj_t_start_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_obj_t *, lv_anim_start_cb_t))lv_func_ptr)(obj, start_cb); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *get_area_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_get_area_cb_callback, MP_QSTR_lv_image_decoder_t_get_area_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_func_ptr)(decoder, get_area_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_start_cb_mpobj, 2, mp_lv_animimg_set_start_cb, lv_animimg_set_start_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_get_area_cb_mpobj, 2, mp_lv_image_decoder_set_get_area_cb, lv_image_decoder_set_get_area_cb); /* - * Callback function lv_obj_t_completed_cb - * void lv_anim_completed_cb_t(lv_anim_t *) + * Callback function lv_image_decoder_t_close_cb + * void lv_image_decoder_close_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) */ -GENMPY_UNUSED static void lv_obj_t_completed_cb_callback(lv_anim_t *arg0) +GENMPY_UNUSED static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_completed_cb)), 1, mp_args); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_close_cb)), 2, mp_args); return; } /* * lvgl extension definition for: - * void lv_animimg_set_completed_cb(lv_obj_t *obj, lv_anim_completed_cb_t completed_cb) + * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) */ -static mp_obj_t mp_lv_animimg_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_set_close_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - void *completed_cb = mp_lv_callback(mp_args[1], &lv_obj_t_completed_cb_callback, MP_QSTR_lv_obj_t_completed_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_obj_t *, lv_anim_completed_cb_t))lv_func_ptr)(obj, completed_cb); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *close_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_close_cb_callback, MP_QSTR_lv_image_decoder_t_close_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_func_ptr)(decoder, close_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_completed_cb_mpobj, 2, mp_lv_animimg_set_completed_cb, lv_animimg_set_completed_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_close_cb_mpobj, 2, mp_lv_image_decoder_set_close_cb, lv_image_decoder_set_close_cb); /* * lvgl extension definition for: - * uint8_t lv_animimg_get_src_count(lv_obj_t *obj) + * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) */ -static mp_obj_t mp_lv_animimg_get_src_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_post_process(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint8_t _res = ((uint8_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(dsc, decoded); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_src_count_mpobj, 1, mp_lv_animimg_get_src_count, lv_animimg_get_src_count); - -/* Reusing lv_obj_get_event_count for lv_animimg_get_duration */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_duration); - -/* Reusing lv_obj_get_event_count for lv_animimg_get_repeat_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_repeat_count_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_post_process_mpobj, 2, mp_lv_image_decoder_post_process, lv_image_decoder_post_process); /* * lvgl extension definition for: - * lv_anim_t *lv_animimg_get_anim(lv_obj_t *obj) + * void lv_image_cache_drop(const void *src) */ -static mp_obj_t mp_lv_animimg_get_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_anim_t((void*)_res); + const void *src = (const void *)mp_to_ptr(mp_args[0]); + ((void (*)(const void *))lv_func_ptr)(src); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_anim_mpobj, 1, mp_lv_animimg_get_anim, lv_animimg_get_anim); - -/* Reusing lv_obj_create for lv_animimg_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_create_mpobj, 1, mp_lv_obj_create, lv_animimg_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_drop_mpobj, 1, mp_lv_image_cache_drop, lv_image_cache_drop); /* - * lvgl animimg object definitions + * lvgl extension definition for: + * lv_image_src_t lv_image_src_get_type(const void *src) */ - - -static const mp_rom_map_elem_t animimg_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_animimg_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_reverse), MP_ROM_PTR(&mp_lv_animimg_set_src_reverse_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_animimg_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_animimg_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_animimg_set_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_animimg_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_animimg_set_reverse_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_animimg_set_reverse_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_animimg_set_start_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_animimg_set_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_count), MP_ROM_PTR(&mp_lv_animimg_get_src_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_duration), MP_ROM_PTR(&mp_lv_animimg_get_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_animimg_get_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_anim), MP_ROM_PTR(&mp_lv_animimg_get_anim_mpobj) } -}; - -static MP_DEFINE_CONST_DICT(animimg_locals_dict, animimg_locals_dict_table); - -static void animimg_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl animimg"); -} - -static mp_obj_t animimg_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_image_src_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_animimg_create_mpobj, type, n_args, n_kw, args); + const void *src = (const void *)mp_to_ptr(mp_args[0]); + lv_image_src_t _res = ((lv_image_src_t (*)(const void *))lv_func_ptr)(src); + return mp_obj_new_int(_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_animimg_type_base, - MP_QSTR_animimg, - MP_TYPE_FLAG_NONE, - print, animimg_print, - make_new, animimg_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &animimg_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_animimg_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_animimg_class, -#endif - .mp_obj_type = &mp_lv_animimg_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_src_get_type_mpobj, 1, mp_lv_image_src_get_type, lv_image_src_get_type); /* * lvgl extension definition for: - * void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start) + * void lv_image_set_src(lv_obj_t *obj, const void *src) */ -static mp_obj_t mp_lv_arc_set_start_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_func_ptr)(obj, start); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + ((void (*)(lv_obj_t *, const void *))lv_func_ptr)(obj, src); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_start_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_src_mpobj, 2, mp_lv_image_set_src, lv_image_set_src); -/* Reusing lv_arc_set_start_angle for lv_arc_set_end_angle */ +/* Reusing lv_obj_move_to_index for lv_image_set_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_end_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_x); +/* Reusing lv_obj_move_to_index for lv_image_set_offset_y */ -/* - * lvgl extension definition for: - * void lv_arc_set_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_y); + +/* Reusing lv_obj_move_to_index for lv_image_set_rotation */ -static mp_obj_t mp_lv_arc_set_angles(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); - lv_value_precise_t end = (float)mp_obj_get_float(mp_args[2]); - ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_func_ptr)(obj, start, end); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_rotation); + +/* Reusing lv_obj_set_pos for lv_image_set_pivot */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_mpobj, 3, mp_lv_obj_set_pos, lv_image_set_pivot); + +/* Reusing lv_obj_move_to_index for lv_image_set_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_angles); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_x); -/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_start_angle */ +/* Reusing lv_obj_move_to_index for lv_image_set_pivot_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_start_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_y); -/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_end_angle */ +/* Reusing lv_obj_delete_delayed for lv_image_set_scale */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_end_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale); -/* Reusing lv_arc_set_angles for lv_arc_set_bg_angles */ +/* Reusing lv_obj_delete_delayed for lv_image_set_scale_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_bg_angles); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_x); -/* Reusing lv_obj_move_to_index for lv_arc_set_rotation */ +/* Reusing lv_obj_delete_delayed for lv_image_set_scale_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_y); /* * lvgl extension definition for: - * void lv_arc_set_mode(lv_obj_t *obj, lv_arc_mode_t type) + * void lv_image_set_blend_mode(lv_obj_t *obj, lv_blend_mode_t blend_mode) */ -static mp_obj_t mp_lv_arc_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arc_mode_t type = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arc_mode_t))lv_func_ptr)(obj, type); + lv_blend_mode_t blend_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_blend_mode_t))lv_func_ptr)(obj, blend_mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_mode_mpobj, 2, mp_lv_arc_set_mode, lv_arc_set_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_blend_mode_mpobj, 2, mp_lv_image_set_blend_mode, lv_image_set_blend_mode); -/* Reusing lv_obj_move_to_index for lv_arc_set_value */ +/* Reusing lv_obj_set_hidden for lv_image_set_antialias */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_antialias_mpobj, 2, mp_lv_obj_set_hidden, lv_image_set_antialias); -/* Reusing lv_obj_set_pos for lv_arc_set_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_arc_set_range); - -/* Reusing lv_obj_move_to_index for lv_arc_set_min_value */ +/* + * lvgl extension definition for: + * void lv_image_set_inner_align(lv_obj_t *obj, lv_image_align_t align) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_min_value); - -/* Reusing lv_obj_move_to_index for lv_arc_set_max_value */ +static mp_obj_t mp_lv_image_set_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_image_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_image_align_t))lv_func_ptr)(obj, align); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_max_value); - -/* Reusing lv_obj_delete_delayed for lv_arc_set_change_rate */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_change_rate_mpobj, 2, mp_lv_obj_delete_delayed, lv_arc_set_change_rate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_inner_align_mpobj, 2, mp_lv_image_set_inner_align, lv_image_set_inner_align); -/* Reusing lv_obj_move_to_index for lv_arc_set_knob_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_knob_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_knob_offset); +/* + * lvgl extension definition for: + * void lv_image_set_bitmap_map_src(lv_obj_t *obj, const lv_image_dsc_t *src) + */ + +static mp_obj_t mp_lv_image_set_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_image_dsc_t *src = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); + ((void (*)(lv_obj_t *, const lv_image_dsc_t *))lv_func_ptr)(obj, src); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_bitmap_map_src_mpobj, 2, mp_lv_image_set_bitmap_map_src, lv_image_set_bitmap_map_src); /* * lvgl extension definition for: - * lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj) + * const void *lv_image_get_src(lv_obj_t *obj) */ -static mp_obj_t mp_lv_arc_get_angle_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_get_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_value_precise_t _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_float_from_f(_res); + const void * _res = ((const void *(*)(lv_obj_t *))lv_func_ptr)(obj); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_mpobj, 1, mp_lv_image_get_src, lv_image_get_src); -/* Reusing lv_arc_get_angle_start for lv_arc_get_angle_end */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_end); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_x); -/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_start */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_y); -/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_end */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_end); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_rotation); -/* Reusing lv_obj_get_index for lv_arc_get_value */ +/* Reusing lv_obj_get_scroll_end for lv_image_get_pivot */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_pivot_mpobj, 2, mp_lv_obj_get_scroll_end, lv_image_get_pivot); -/* Reusing lv_obj_get_index for lv_arc_get_min_value */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale); -/* Reusing lv_obj_get_index for lv_arc_get_max_value */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_x); +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_y */ -/* - * lvgl extension definition for: - * lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_arc_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_arc_mode_t _res = ((lv_arc_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_mode_mpobj, 1, mp_lv_arc_get_mode, lv_arc_get_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_y); -/* Reusing lv_obj_get_index for lv_arc_get_rotation */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_rotation_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_width); -/* Reusing lv_obj_get_index for lv_arc_get_knob_offset */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_knob_offset_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_knob_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_height); -/* Reusing lv_obj_get_event_count for lv_arc_get_change_rate */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_change_rate_mpobj, 1, mp_lv_obj_get_event_count, lv_arc_get_change_rate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_width); -/* Reusing lv_obj_bind_checked for lv_arc_bind_value */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_arc_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_height); /* * lvgl extension definition for: - * void lv_arc_align_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_align, int32_t r_offset) + * lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_arc_align_obj_to_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_get_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_obj_t *obj_to_align = mp_to_lv(mp_args[1]); - int32_t r_offset = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, obj_to_align, r_offset); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_blend_mode_t _res = ((lv_blend_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_align_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_align_obj_to_angle); - -/* Reusing lv_arc_align_obj_to_angle for lv_arc_rotate_obj_to_angle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_rotate_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_rotate_obj_to_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_blend_mode_mpobj, 1, mp_lv_image_get_blend_mode, lv_image_get_blend_mode); -/* Reusing lv_obj_create for lv_arc_create */ +/* Reusing lv_obj_refr_size for lv_image_get_antialias */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_create_mpobj, 1, mp_lv_obj_create, lv_arc_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_antialias_mpobj, 1, mp_lv_obj_refr_size, lv_image_get_antialias); /* - * lvgl arc object definitions + * lvgl extension definition for: + * lv_image_align_t lv_image_get_inner_align(lv_obj_t *obj) */ - - -static const mp_rom_map_elem_t arc_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_start_angle), MP_ROM_PTR(&mp_lv_arc_set_start_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_end_angle), MP_ROM_PTR(&mp_lv_arc_set_end_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angles), MP_ROM_PTR(&mp_lv_arc_set_angles_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_start_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_start_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_end_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_end_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_angles), MP_ROM_PTR(&mp_lv_arc_set_bg_angles_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_arc_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_arc_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_arc_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_arc_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_arc_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_arc_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_change_rate), MP_ROM_PTR(&mp_lv_arc_set_change_rate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_knob_offset), MP_ROM_PTR(&mp_lv_arc_set_knob_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arc_get_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_end), MP_ROM_PTR(&mp_lv_arc_get_angle_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bg_angle_start), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bg_angle_end), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_arc_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_arc_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_arc_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_arc_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_arc_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_knob_offset), MP_ROM_PTR(&mp_lv_arc_get_knob_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_change_rate), MP_ROM_PTR(&mp_lv_arc_get_change_rate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_arc_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_align_obj_to_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_rotate_obj_to_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ARC_MODE_type_base) } -}; - -static MP_DEFINE_CONST_DICT(arc_locals_dict, arc_locals_dict_table); -static void arc_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl arc"); -} - - -static mp_obj_t arc_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_image_get_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_arc_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_image_align_t _res = ((lv_image_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_arc_type_base, - MP_QSTR_arc, - MP_TYPE_FLAG_NONE, - print, arc_print, - make_new, arc_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &arc_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arc_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_arc_class, -#endif - .mp_obj_type = &mp_lv_arc_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_inner_align_mpobj, 1, mp_lv_image_get_inner_align, lv_image_get_inner_align); /* * lvgl extension definition for: - * void lv_arclabel_set_text(lv_obj_t *obj, const char *text) + * const lv_image_dsc_t *lv_image_get_bitmap_map_src(lv_obj_t *obj) */ -static mp_obj_t mp_lv_arclabel_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_get_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *text = (const char *)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, text); - return mp_const_none; + const lv_image_dsc_t * _res = ((const lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_image_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text); - -/* Reusing lv_arclabel_set_text for lv_arclabel_set_text_static */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text_static); - -/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_start */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_start_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_start); - -/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_size_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_bitmap_map_src_mpobj, 1, mp_lv_image_get_bitmap_map_src, lv_image_get_bitmap_map_src); -/* Reusing lv_obj_move_to_index for lv_arclabel_set_offset */ +/* Reusing lv_obj_bind_checked for lv_image_bind_src */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arclabel_set_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_bind_src_mpobj, 2, mp_lv_obj_bind_checked, lv_image_bind_src); /* * lvgl extension definition for: - * void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir) + * lv_result_t lv_image_cache_init(uint32_t size) */ -static mp_obj_t mp_lv_arclabel_set_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_dir_t dir = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arclabel_dir_t))lv_func_ptr)(obj, dir); - return mp_const_none; + uint32_t size = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(uint32_t))lv_func_ptr)(size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_dir_mpobj, 2, mp_lv_arclabel_set_dir, lv_arclabel_set_dir); - -/* Reusing lv_obj_set_radio_button for lv_arclabel_set_recolor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_recolor_mpobj, 2, mp_lv_obj_set_radio_button, lv_arclabel_set_recolor); - -/* Reusing lv_obj_delete_delayed for lv_arclabel_set_radius */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_radius_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_radius); - -/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_x); - -/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_init_mpobj, 1, mp_lv_image_cache_init, lv_image_cache_init); /* * lvgl extension definition for: - * void lv_arclabel_set_text_vertical_align(lv_obj_t *obj, lv_arclabel_text_align_t align) + * void lv_image_cache_resize(uint32_t new_size, bool evict_now) */ -static mp_obj_t mp_lv_arclabel_set_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_text_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_func_ptr)(obj, align); + uint32_t new_size = (uint32_t)mp_obj_get_int(mp_args[0]); + bool evict_now = mp_obj_is_true(mp_args[1]); + ((void (*)(uint32_t, bool))lv_func_ptr)(new_size, evict_now); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_vertical_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_vertical_align); - -/* Reusing lv_arclabel_set_text_vertical_align for lv_arclabel_set_text_horizontal_align */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_horizontal_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_horizontal_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_resize_mpobj, 2, mp_lv_image_cache_resize, lv_image_cache_resize); /* * lvgl extension definition for: - * void lv_arclabel_set_overflow(lv_obj_t *obj, lv_arclabel_overflow_t overflow) + * bool lv_image_cache_is_enabled(void) */ -static mp_obj_t mp_lv_arclabel_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_is_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arclabel_overflow_t))lv_func_ptr)(obj, overflow); - return mp_const_none; + + bool _res = ((bool (*)(void))lv_func_ptr)(); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_overflow_mpobj, 2, mp_lv_arclabel_set_overflow, lv_arclabel_set_overflow); - -/* Reusing lv_obj_set_radio_button for lv_arclabel_set_end_overlap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_end_overlap_mpobj, 2, mp_lv_obj_set_radio_button, lv_arclabel_set_end_overlap); - -/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_start */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_start); - -/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_size_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_is_enabled_mpobj, 0, mp_lv_image_cache_is_enabled, lv_image_cache_is_enabled); /* * lvgl extension definition for: - * lv_arclabel_dir_t lv_arclabel_get_dir(const lv_obj_t *obj) + * lv_iter_t *lv_image_cache_iter_create(void) */ -static mp_obj_t mp_lv_arclabel_get_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_arclabel_dir_t _res = ((lv_arclabel_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + + lv_iter_t * _res = ((lv_iter_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_iter_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_dir_mpobj, 1, mp_lv_arclabel_get_dir, lv_arclabel_get_dir); - -/* Reusing lv_obj_refr_size for lv_arclabel_get_recolor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_recolor_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_recolor); - -/* Reusing lv_obj_get_event_count for lv_arclabel_get_radius */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_radius_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_radius); - -/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_x_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_iter_create_mpobj, 0, mp_lv_image_cache_iter_create, lv_image_cache_iter_create); -/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_y */ +/* Reusing funcptr_user_cb for lv_image_cache_dump */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_y_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_dump_mpobj, 0, mp_funcptr_user_cb, lv_image_cache_dump); /* * lvgl extension definition for: - * lv_arclabel_text_align_t lv_arclabel_get_text_vertical_align(lv_obj_t *obj) + * void lv_image_buf_get_transformed_area(lv_area_t *res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x, uint16_t scale_y, const lv_point_t *pivot) */ -static mp_obj_t mp_lv_arclabel_get_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_buf_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_text_align_t _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_area_t *res = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t angle = (int32_t)mp_obj_get_int(mp_args[3]); + uint16_t scale_x = (uint16_t)mp_obj_get_int(mp_args[4]); + uint16_t scale_y = (uint16_t)mp_obj_get_int(mp_args[5]); + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[6]); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, uint16_t, uint16_t, const lv_point_t *))lv_func_ptr)(res, w, h, angle, scale_x, scale_y, pivot); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_vertical_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_vertical_align); - -/* Reusing lv_arclabel_get_text_vertical_align for lv_arclabel_get_text_horizontal_align */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_horizontal_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_horizontal_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_buf_get_transformed_area_mpobj, 7, mp_lv_image_buf_get_transformed_area, lv_image_buf_get_transformed_area); /* * lvgl extension definition for: - * lv_arclabel_overflow_t lv_arclabel_get_overflow(lv_obj_t *obj) + * void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count) */ -static mp_obj_t mp_lv_arclabel_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_overflow_t _res = ((lv_arclabel_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + uint32_t image_cache_size = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t image_header_count = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(uint32_t, uint32_t))lv_func_ptr)(image_cache_size, image_header_count); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_overflow_mpobj, 1, mp_lv_arclabel_get_overflow, lv_arclabel_get_overflow); - -/* Reusing lv_obj_refr_size for lv_arclabel_get_end_overlap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_end_overlap_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_end_overlap); - -/* Reusing lv_arc_get_angle_start for lv_arclabel_get_text_angle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_angle_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_text_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_init_mpobj, 2, mp_lv_image_decoder_init, lv_image_decoder_init); -/* Reusing lv_obj_create for lv_arclabel_create */ +/* Reusing funcptr_user_cb for lv_image_decoder_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_create_mpobj, 1, mp_lv_obj_create, lv_arclabel_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_deinit_mpobj, 0, mp_funcptr_user_cb, lv_image_decoder_deinit); /* - * lvgl arclabel object definitions + * Struct lv_cache_slot_size_t */ - -static const mp_rom_map_elem_t arclabel_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_arclabel_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_arclabel_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angle_start), MP_ROM_PTR(&mp_lv_arclabel_set_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angle_size), MP_ROM_PTR(&mp_lv_arclabel_set_angle_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_arclabel_set_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_arclabel_set_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_arclabel_set_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_arclabel_set_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_vertical_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_horizontal_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_arclabel_set_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_set_end_overlap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arclabel_get_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_size), MP_ROM_PTR(&mp_lv_arclabel_get_angle_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_arclabel_get_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_arclabel_get_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_radius), MP_ROM_PTR(&mp_lv_arclabel_get_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_vertical_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_horizontal_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_arclabel_get_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_get_end_overlap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_angle), MP_ROM_PTR(&mp_lv_arclabel_get_text_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_DIR), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_DIR_type_base) }, - { MP_ROM_QSTR(MP_QSTR_TEXT_ALIGN), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_TEXT_ALIGN_type_base) }, - { MP_ROM_QSTR(MP_QSTR_OVERFLOW), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_OVERFLOW_type_base) } -}; - -static MP_DEFINE_CONST_DICT(arclabel_locals_dict, arclabel_locals_dict_table); +static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void); -static void arclabel_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_slot_size_t(mp_obj_t self_in) { - mp_printf(print, "lvgl arclabel"); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_slot_size_t_type())); + return (lv_cache_slot_size_t*)self->data; } +#define mp_write_lv_cache_slot_size_t(struct_obj) *((lv_cache_slot_size_t*)mp_write_ptr_lv_cache_slot_size_t(struct_obj)) -static mp_obj_t arclabel_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_slot_size_t(void *field) { - return make_new(&mp_lv_arclabel_create_mpobj, type, n_args, n_kw, args); + return lv_to_mp_struct(get_mp_lv_cache_slot_size_t_type(), field); } +#define mp_read_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(copy_buffer(&field, sizeof(lv_cache_slot_size_t))) +#define mp_read_byref_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(&field) -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_arclabel_type_base, - MP_QSTR_arclabel, - MP_TYPE_FLAG_NONE, - print, arclabel_print, - make_new, arclabel_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &arclabel_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arclabel_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_arclabel_class, -#endif - .mp_obj_type = &mp_lv_arclabel_type_base, -}; - -/* Reusing lv_arclabel_set_text for lv_label_set_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text); - -/* Reusing lv_arclabel_set_text for lv_label_set_text_static */ +static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text_static); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_label_set_long_mode(lv_obj_t *obj, lv_label_long_mode_t long_mode) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_label_set_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_cache_slot_size_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_label_long_mode_t long_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_label_long_mode_t))lv_func_ptr)(obj, long_mode); - return mp_const_none; + mp_printf(print, "struct lv_cache_slot_size_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_long_mode_mpobj, 2, mp_lv_label_set_long_mode, lv_label_set_long_mode); - -/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_start */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_start_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_start); - -/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_end */ +static const mp_obj_dict_t mp_lv_cache_slot_size_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_end_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_end); - -/* Reusing lv_obj_set_radio_button for lv_label_set_recolor */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_cache_slot_size_t_type, + MP_QSTR_lv_cache_slot_size_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_cache_slot_size_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_cache_slot_size_t_attr, + locals_dict, &mp_lv_cache_slot_size_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_recolor_mpobj, 2, mp_lv_obj_set_radio_button, lv_label_set_recolor); +static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void) +{ + return &mp_lv_cache_slot_size_t_type; +} /* - * lvgl extension definition for: - * char *lv_label_get_text(const lv_obj_t *obj) + * Struct lv_image_cache_data_t */ -static mp_obj_t mp_lv_label_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_cache_data_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - char * _res = ((char *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return convert_to_str((void*)_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_cache_data_t_type())); + return (lv_image_cache_data_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_mpobj, 1, mp_lv_label_get_text, lv_label_get_text); - - -/* - * lvgl extension definition for: - * lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t *obj) - */ +#define mp_write_lv_image_cache_data_t(struct_obj) *((lv_image_cache_data_t*)mp_write_ptr_lv_image_cache_data_t(struct_obj)) -static mp_obj_t mp_lv_label_get_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_cache_data_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_label_long_mode_t _res = ((lv_label_long_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + return lv_to_mp_struct(get_mp_lv_image_cache_data_t_type(), field); } - +#define mp_read_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(copy_buffer(&field, sizeof(lv_image_cache_data_t))) +#define mp_read_byref_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_long_mode_mpobj, 1, mp_lv_label_get_long_mode, lv_label_get_long_mode); - +static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_image_cache_data_t *data = (lv_image_cache_data_t*)self->data; -/* - * lvgl extension definition for: - * void lv_label_get_letter_pos(const lv_obj_t *obj, uint32_t char_id, lv_point_t *pos) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_slot: dest[0] = mp_read_byref_lv_cache_slot_size_t(data->slot); break; // converting from lv_cache_slot_size_t; + case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; + case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; + case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; + case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_slot: data->slot = mp_write_lv_cache_slot_size_t(dest[1]); break; // converting to lv_cache_slot_size_t; + case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; + case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + default: return; + } -static mp_obj_t mp_lv_label_get_letter_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t char_id = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); - ((void (*)(const lv_obj_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, char_id, pos); - return mp_const_none; + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - +static void mp_lv_image_cache_data_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_image_cache_data_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_pos_mpobj, 3, mp_lv_label_get_letter_pos, lv_label_get_letter_pos); - +static const mp_obj_dict_t mp_lv_image_cache_data_t_locals_dict; -/* - * lvgl extension definition for: - * uint32_t lv_label_get_letter_on(const lv_obj_t *obj, lv_point_t *pos_in, bool bidi) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_image_cache_data_t_type, + MP_QSTR_lv_image_cache_data_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_image_cache_data_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_image_cache_data_t_attr, + locals_dict, &mp_lv_image_cache_data_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_label_get_letter_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *pos_in = mp_write_ptr_lv_point_t(mp_args[1]); - bool bidi = mp_obj_is_true(mp_args[2]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_point_t *, bool))lv_func_ptr)(obj, pos_in, bidi); - return mp_obj_new_int_from_uint(_res); + return &mp_lv_image_cache_data_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_on_mpobj, 3, mp_lv_label_get_letter_on, lv_label_get_letter_on); /* * lvgl extension definition for: - * bool lv_label_is_char_under_pos(const lv_obj_t *obj, lv_point_t *pos) + * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) */ -static mp_obj_t mp_lv_label_is_char_under_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_add_to_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[1]); - bool _res = ((bool (*)(const lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, pos); - return convert_to_bool(_res); + void *user_data = mp_to_ptr(mp_args[3]); + lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(mp_args[1]); + const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[2]); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_func_ptr)(decoder, search_key, decoded, user_data); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_is_char_under_pos_mpobj, 2, mp_lv_label_is_char_under_pos, lv_label_is_char_under_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_add_to_cache_mpobj, 4, mp_lv_image_decoder_add_to_cache, lv_image_decoder_add_to_cache); -/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_start */ +/* Reusing lv_image_cache_init for lv_image_header_cache_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_start_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_init_mpobj, 1, mp_lv_image_cache_init, lv_image_header_cache_init); -/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_end */ +/* Reusing lv_image_cache_resize for lv_image_header_cache_resize */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_end_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_end); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_resize_mpobj, 2, mp_lv_image_cache_resize, lv_image_header_cache_resize); -/* Reusing lv_obj_is_layout_positioned for lv_label_get_recolor */ +/* Reusing lv_image_cache_drop for lv_image_header_cache_drop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_recolor_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_label_get_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_drop_mpobj, 1, mp_lv_image_cache_drop, lv_image_header_cache_drop); +/* Reusing lv_image_cache_is_enabled for lv_image_header_cache_is_enabled */ -/* - * lvgl extension definition for: - * lv_observer_t *lv_label_bind_text(lv_obj_t *obj, lv_subject_t *subject, const char *fmt) - */ - -static mp_obj_t mp_lv_label_bind_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); - const char *fmt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, subject, fmt); - return mp_read_ptr_lv_observer_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_bind_text_mpobj, 3, mp_lv_label_bind_text, lv_label_bind_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_is_enabled_mpobj, 0, mp_lv_image_cache_is_enabled, lv_image_header_cache_is_enabled); +/* Reusing lv_image_cache_iter_create for lv_image_header_cache_iter_create */ -/* - * lvgl extension definition for: - * void lv_label_ins_text(lv_obj_t *obj, uint32_t pos, const char *txt) - */ - -static mp_obj_t mp_lv_label_ins_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, const char *))lv_func_ptr)(obj, pos, txt); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_ins_text_mpobj, 3, mp_lv_label_ins_text, lv_label_ins_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_iter_create_mpobj, 0, mp_lv_image_cache_iter_create, lv_image_header_cache_iter_create); -/* Reusing lv_obj_fade_in for lv_label_cut_text */ +/* Reusing funcptr_user_cb for lv_image_header_cache_dump */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_cut_text_mpobj, 3, mp_lv_obj_fade_in, lv_label_cut_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_dump_mpobj, 0, mp_funcptr_user_cb, lv_image_header_cache_dump); -/* Reusing lv_obj_create for lv_label_create */ +/* Reusing lv_obj_create for lv_image_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_create_mpobj, 1, mp_lv_obj_create, lv_label_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_create_mpobj, 1, mp_lv_obj_create, lv_image_create); /* - * lvgl label object definitions + * lvgl image object definitions */ -static const mp_rom_map_elem_t label_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_label_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_label_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_long_mode), MP_ROM_PTR(&mp_lv_label_set_long_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_selection_start), MP_ROM_PTR(&mp_lv_label_set_text_selection_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_selection_end), MP_ROM_PTR(&mp_lv_label_set_text_selection_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_label_set_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_label_get_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_long_mode), MP_ROM_PTR(&mp_lv_label_get_long_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_letter_pos), MP_ROM_PTR(&mp_lv_label_get_letter_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_letter_on), MP_ROM_PTR(&mp_lv_label_get_letter_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_char_under_pos), MP_ROM_PTR(&mp_lv_label_is_char_under_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_selection_start), MP_ROM_PTR(&mp_lv_label_get_text_selection_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_selection_end), MP_ROM_PTR(&mp_lv_label_get_text_selection_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_label_get_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_text), MP_ROM_PTR(&mp_lv_label_bind_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_text), MP_ROM_PTR(&mp_lv_label_ins_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cut_text), MP_ROM_PTR(&mp_lv_label_cut_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_LONG_MODE), MP_ROM_PTR(&mp_lv_LV_LABEL_LONG_MODE_type_base) } +static const mp_rom_map_elem_t image_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_buf_set_palette), MP_ROM_PTR(&mp_lv_image_buf_set_palette_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_buf_free), MP_ROM_PTR(&mp_lv_image_buf_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_get_info), MP_ROM_PTR(&mp_lv_image_decoder_get_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_open), MP_ROM_PTR(&mp_lv_image_decoder_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_get_area), MP_ROM_PTR(&mp_lv_image_decoder_get_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_close), MP_ROM_PTR(&mp_lv_image_decoder_close_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_create), MP_ROM_PTR(&mp_lv_image_decoder_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_delete), MP_ROM_PTR(&mp_lv_image_decoder_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_get_next), MP_ROM_PTR(&mp_lv_image_decoder_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_info_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_info_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_open_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_open_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_get_area_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_get_area_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_close_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_close_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_post_process), MP_ROM_PTR(&mp_lv_image_decoder_post_process_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_drop), MP_ROM_PTR(&mp_lv_image_cache_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_src_get_type), MP_ROM_PTR(&mp_lv_image_src_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_image_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset_x), MP_ROM_PTR(&mp_lv_image_set_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset_y), MP_ROM_PTR(&mp_lv_image_set_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_image_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pivot), MP_ROM_PTR(&mp_lv_image_set_pivot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pivot_x), MP_ROM_PTR(&mp_lv_image_set_pivot_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pivot_y), MP_ROM_PTR(&mp_lv_image_set_pivot_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_image_set_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale_x), MP_ROM_PTR(&mp_lv_image_set_scale_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale_y), MP_ROM_PTR(&mp_lv_image_set_scale_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_image_set_blend_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_antialias), MP_ROM_PTR(&mp_lv_image_set_antialias_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_inner_align), MP_ROM_PTR(&mp_lv_image_set_inner_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_set_bitmap_map_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src), MP_ROM_PTR(&mp_lv_image_get_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_image_get_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_image_get_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_image_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pivot), MP_ROM_PTR(&mp_lv_image_get_pivot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_image_get_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale_x), MP_ROM_PTR(&mp_lv_image_get_scale_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale_y), MP_ROM_PTR(&mp_lv_image_get_scale_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_width), MP_ROM_PTR(&mp_lv_image_get_src_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_height), MP_ROM_PTR(&mp_lv_image_get_src_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transformed_width), MP_ROM_PTR(&mp_lv_image_get_transformed_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transformed_height), MP_ROM_PTR(&mp_lv_image_get_transformed_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_blend_mode), MP_ROM_PTR(&mp_lv_image_get_blend_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_antialias), MP_ROM_PTR(&mp_lv_image_get_antialias_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_inner_align), MP_ROM_PTR(&mp_lv_image_get_inner_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_get_bitmap_map_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_src), MP_ROM_PTR(&mp_lv_image_bind_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_init), MP_ROM_PTR(&mp_lv_image_cache_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_resize), MP_ROM_PTR(&mp_lv_image_cache_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_cache_is_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_iter_create), MP_ROM_PTR(&mp_lv_image_cache_iter_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_dump), MP_ROM_PTR(&mp_lv_image_cache_dump_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_buf_get_transformed_area), MP_ROM_PTR(&mp_lv_image_buf_get_transformed_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_init), MP_ROM_PTR(&mp_lv_image_decoder_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_deinit), MP_ROM_PTR(&mp_lv_image_decoder_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_add_to_cache), MP_ROM_PTR(&mp_lv_image_decoder_add_to_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_init), MP_ROM_PTR(&mp_lv_image_header_cache_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_resize), MP_ROM_PTR(&mp_lv_image_header_cache_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_drop), MP_ROM_PTR(&mp_lv_image_header_cache_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_header_cache_is_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_iter_create), MP_ROM_PTR(&mp_lv_image_header_cache_iter_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_dump), MP_ROM_PTR(&mp_lv_image_header_cache_dump_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_FLAGS), MP_ROM_PTR(&mp_lv_LV_IMAGE_FLAGS_type_base) }, + { MP_ROM_QSTR(MP_QSTR_COMPRESS), MP_ROM_PTR(&mp_lv_LV_IMAGE_COMPRESS_type_base) }, + { MP_ROM_QSTR(MP_QSTR_SRC), MP_ROM_PTR(&mp_lv_LV_IMAGE_SRC_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ALIGN), MP_ROM_PTR(&mp_lv_LV_IMAGE_ALIGN_type_base) } }; -static MP_DEFINE_CONST_DICT(label_locals_dict, label_locals_dict_table); +static MP_DEFINE_CONST_DICT(image_locals_dict, image_locals_dict_table); -static void label_print(const mp_print_t *print, +static void image_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl label"); + mp_printf(print, "lvgl image"); } -static mp_obj_t label_make_new( +static mp_obj_t image_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_label_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_image_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_label_type_base, - MP_QSTR_label, + mp_lv_image_type_base, + MP_QSTR_image, MP_TYPE_FLAG_NONE, - print, label_print, - make_new, label_make_new, + print, image_print, + make_new, image_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &label_locals_dict + locals_dict, &image_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_label_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_image_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_label_class, + .lv_obj_class = &lv_image_class, #endif - .mp_obj_type = &mp_lv_label_type_base, + .mp_obj_type = &mp_lv_image_type_base, }; -/* Reusing lv_obj_scroll_to_x for lv_bar_set_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_value); - -/* Reusing lv_obj_scroll_to_x for lv_bar_set_start_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_start_value); - -/* Reusing lv_obj_set_pos for lv_bar_set_range */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_bar_set_range); - -/* Reusing lv_obj_move_to_index for lv_bar_set_min_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_min_value); - -/* Reusing lv_obj_move_to_index for lv_bar_set_max_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_max_value); - /* - * lvgl extension definition for: - * void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode) + * Array convertors for void *[] */ -static mp_obj_t mp_lv_bar_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void * *mp_arr_to_void_ptr____(mp_obj_t mp_arr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_bar_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + void * *lv_arr = (void **)m_malloc(len * sizeof(void *)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_to_ptr(item); + } + return (void * *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_void_ptr____(const void * *arr) +{ + return ptr_to_mp((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_mode_mpobj, 2, mp_lv_bar_set_mode, lv_bar_set_mode); - /* * lvgl extension definition for: - * void lv_bar_set_orientation(lv_obj_t *obj, lv_bar_orientation_t orientation) + * void lv_animimg_set_src(lv_obj_t *obj, const void *dsc[], size_t num) */ -static mp_obj_t mp_lv_bar_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_bar_orientation_t))lv_func_ptr)(obj, orientation); + const void **dsc = (const void **)mp_arr_to_void_ptr____(mp_args[1]); + size_t num = (size_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const void *[], size_t))lv_func_ptr)(obj, dsc, num); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_orientation_mpobj, 2, mp_lv_bar_set_orientation, lv_bar_set_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src); -/* Reusing lv_obj_get_index for lv_bar_get_value */ +/* Reusing lv_animimg_set_src for lv_animimg_set_src_reverse */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_reverse_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src_reverse); -/* Reusing lv_obj_get_index for lv_bar_get_start_value */ +/* Reusing lv_obj_move_foreground for lv_animimg_start */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_start_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_start_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_start_mpobj, 1, mp_lv_obj_move_foreground, lv_animimg_start); -/* Reusing lv_obj_get_index for lv_bar_get_min_value */ +/* Reusing lv_obj_refr_size for lv_animimg_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_delete_mpobj, 1, mp_lv_obj_refr_size, lv_animimg_delete); -/* Reusing lv_obj_get_index for lv_bar_get_max_value */ +/* Reusing lv_obj_delete_delayed for lv_animimg_set_duration */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_duration); + +/* Reusing lv_obj_delete_delayed for lv_animimg_set_repeat_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_repeat_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_repeat_count); + +/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_duration */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_duration); + +/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_delay */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_delay_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_delay); +/* + * Callback function lv_obj_t_start_cb + * void lv_anim_start_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static void lv_obj_t_start_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_start_cb)), 1, mp_args); + return; +} + + /* * lvgl extension definition for: - * lv_bar_mode_t lv_bar_get_mode(lv_obj_t *obj) + * void lv_animimg_set_start_cb(lv_obj_t *obj, lv_anim_start_cb_t start_cb) */ -static mp_obj_t mp_lv_bar_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_mode_t _res = ((lv_bar_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + void *start_cb = mp_lv_callback(mp_args[1], &lv_obj_t_start_cb_callback, MP_QSTR_lv_obj_t_start_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_obj_t *, lv_anim_start_cb_t))lv_func_ptr)(obj, start_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_mode_mpobj, 1, mp_lv_bar_get_mode, lv_bar_get_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_start_cb_mpobj, 2, mp_lv_animimg_set_start_cb, lv_animimg_set_start_cb); +/* + * Callback function lv_obj_t_completed_cb + * void lv_anim_completed_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static void lv_obj_t_completed_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_completed_cb)), 1, mp_args); + return; +} + + /* * lvgl extension definition for: - * lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t *obj) + * void lv_animimg_set_completed_cb(lv_obj_t *obj, lv_anim_completed_cb_t completed_cb) */ -static mp_obj_t mp_lv_bar_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_orientation_t _res = ((lv_bar_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + void *completed_cb = mp_lv_callback(mp_args[1], &lv_obj_t_completed_cb_callback, MP_QSTR_lv_obj_t_completed_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_obj_t *, lv_anim_completed_cb_t))lv_func_ptr)(obj, completed_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_orientation_mpobj, 1, mp_lv_bar_get_orientation, lv_bar_get_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_completed_cb_mpobj, 2, mp_lv_animimg_set_completed_cb, lv_animimg_set_completed_cb); -/* Reusing lv_obj_refr_size for lv_bar_is_symmetrical */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_bar_is_symmetrical); +/* + * lvgl extension definition for: + * uint8_t lv_animimg_get_src_count(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_animimg_get_src_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint8_t _res = ((uint8_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_src_count_mpobj, 1, mp_lv_animimg_get_src_count, lv_animimg_get_src_count); -/* Reusing lv_obj_bind_checked for lv_bar_bind_value */ +/* Reusing lv_obj_get_event_count for lv_animimg_get_duration */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_bar_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_duration); -/* Reusing lv_obj_create for lv_bar_create */ +/* Reusing lv_obj_get_event_count for lv_animimg_get_repeat_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_create_mpobj, 1, mp_lv_obj_create, lv_bar_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_repeat_count_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_repeat_count); /* - * lvgl bar object definitions + * lvgl extension definition for: + * lv_anim_t *lv_animimg_get_anim(lv_obj_t *obj) */ - -static const mp_rom_map_elem_t bar_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_bar_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_bar_set_start_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_bar_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_bar_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_bar_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_bar_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_bar_set_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_bar_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_start_value), MP_ROM_PTR(&mp_lv_bar_get_start_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_bar_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_bar_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_bar_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_bar_get_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_bar_is_symmetrical_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_bar_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_BAR_MODE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_BAR_ORIENTATION_type_base) } -}; - -static MP_DEFINE_CONST_DICT(bar_locals_dict, bar_locals_dict_table); - -static void bar_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl bar"); -} - - -static mp_obj_t bar_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_animimg_get_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_bar_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_anim_t((void*)_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_bar_type_base, - MP_QSTR_bar, - MP_TYPE_FLAG_NONE, - print, bar_print, - make_new, bar_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &bar_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_bar_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_bar_class, -#endif - .mp_obj_type = &mp_lv_bar_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_anim_mpobj, 1, mp_lv_animimg_get_anim, lv_animimg_get_anim); -/* Reusing lv_obj_create for lv_button_create */ +/* Reusing lv_obj_create for lv_animimg_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_button_create_mpobj, 1, mp_lv_obj_create, lv_button_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_create_mpobj, 1, mp_lv_obj_create, lv_animimg_create); /* - * lvgl button object definitions + * lvgl animimg object definitions */ -static const mp_rom_map_elem_t button_locals_dict_table[] = { - +static const mp_rom_map_elem_t animimg_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_animimg_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_reverse), MP_ROM_PTR(&mp_lv_animimg_set_src_reverse_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_animimg_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_animimg_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_animimg_set_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_animimg_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_animimg_set_reverse_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_animimg_set_reverse_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_animimg_set_start_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_animimg_set_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_count), MP_ROM_PTR(&mp_lv_animimg_get_src_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_duration), MP_ROM_PTR(&mp_lv_animimg_get_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_animimg_get_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_anim), MP_ROM_PTR(&mp_lv_animimg_get_anim_mpobj) } }; -static MP_DEFINE_CONST_DICT(button_locals_dict, button_locals_dict_table); +static MP_DEFINE_CONST_DICT(animimg_locals_dict, animimg_locals_dict_table); -static void button_print(const mp_print_t *print, +static void animimg_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl button"); + mp_printf(print, "lvgl animimg"); } -static mp_obj_t button_make_new( +static mp_obj_t animimg_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_button_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_animimg_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_button_type_base, - MP_QSTR_button, + mp_lv_animimg_type_base, + MP_QSTR_animimg, MP_TYPE_FLAG_NONE, - print, button_print, - make_new, button_make_new, + print, animimg_print, + make_new, animimg_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &button_locals_dict + locals_dict, &animimg_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_button_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_animimg_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_button_class, + .lv_obj_class = &lv_animimg_class, #endif - .mp_obj_type = &mp_lv_button_type_base, + .mp_obj_type = &mp_lv_animimg_type_base, }; /* - * Array convertors for char *[] + * lvgl extension definition for: + * void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start) */ -GENMPY_UNUSED static char * *mp_arr_to_char_ptr____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_arc_set_start_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - char * *lv_arr = (char **)m_malloc(len * sizeof(char *)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (char*)convert_from_str(item); - } - return (char * *)lv_arr; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_func_ptr)(obj, start); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_char_ptr____(const char * const *arr) -{ - return mp_read_ptr_C_Pointer((void*)arr); -} + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_start_angle); + +/* Reusing lv_arc_set_start_angle for lv_arc_set_end_angle */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_end_angle); + /* * lvgl extension definition for: - * void lv_buttonmatrix_set_map(lv_obj_t *obj, const char * const map[]) + * void lv_arc_set_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) */ -static mp_obj_t mp_lv_buttonmatrix_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_set_angles(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[1]); - ((void (*)(lv_obj_t *, const char * const []))lv_func_ptr)(obj, map); + lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); + lv_value_precise_t end = (float)mp_obj_get_float(mp_args[2]); + ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_func_ptr)(obj, start, end); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_map_mpobj, 2, mp_lv_buttonmatrix_set_map, lv_buttonmatrix_set_map); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_angles); +/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_start_angle */ -/* - * Array convertors for lv_buttonmatrix_ctrl_t [] - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_start_angle); + +/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_end_angle */ -GENMPY_UNUSED static lv_buttonmatrix_ctrl_t *mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_end_angle); - lv_buttonmatrix_ctrl_t *lv_arr = (lv_buttonmatrix_ctrl_t*)m_malloc(len * sizeof(lv_buttonmatrix_ctrl_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (int)mp_obj_get_int(item); - } - return (lv_buttonmatrix_ctrl_t *)lv_arr; -} +/* Reusing lv_arc_set_angles for lv_arc_set_bg_angles */ -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_buttonmatrix_ctrl_t_____(const lv_buttonmatrix_ctrl_t *arr) -{ - return mp_array_from_i32ptr((void*)arr); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_bg_angles); + +/* Reusing lv_obj_move_to_index for lv_arc_set_rotation */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_rotation); + /* * lvgl extension definition for: - * void lv_buttonmatrix_set_ctrl_map(lv_obj_t *obj, const lv_buttonmatrix_ctrl_t ctrl_map[]) + * void lv_arc_set_mode(lv_obj_t *obj, lv_arc_mode_t type) */ -static mp_obj_t mp_lv_buttonmatrix_set_ctrl_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[1]); - ((void (*)(lv_obj_t *, const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(obj, ctrl_map); + lv_arc_mode_t type = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arc_mode_t))lv_func_ptr)(obj, type); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_ctrl_map_mpobj, 2, mp_lv_buttonmatrix_set_ctrl_map, lv_buttonmatrix_set_ctrl_map); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_mode_mpobj, 2, mp_lv_arc_set_mode, lv_arc_set_mode); -/* Reusing lv_obj_delete_delayed for lv_buttonmatrix_set_selected_button */ +/* Reusing lv_obj_move_to_index for lv_arc_set_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_selected_button_mpobj, 2, mp_lv_obj_delete_delayed, lv_buttonmatrix_set_selected_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_value); +/* Reusing lv_obj_set_pos for lv_arc_set_range */ -/* - * lvgl extension definition for: - * void lv_buttonmatrix_set_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_arc_set_range); + +/* Reusing lv_obj_move_to_index for lv_arc_set_min_value */ -static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_min_value); + +/* Reusing lv_obj_move_to_index for lv_arc_set_max_value */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_max_value); + +/* Reusing lv_obj_delete_delayed for lv_arc_set_change_rate */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_set_button_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_change_rate_mpobj, 2, mp_lv_obj_delete_delayed, lv_arc_set_change_rate); -/* Reusing lv_buttonmatrix_set_button_ctrl for lv_buttonmatrix_clear_button_ctrl */ +/* Reusing lv_obj_move_to_index for lv_arc_set_knob_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_clear_button_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_knob_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_knob_offset); /* * lvgl extension definition for: - * void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) + * lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj) */ -static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_get_angle_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, ctrl); - return mp_const_none; + lv_value_precise_t _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_float_from_f(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_set_button_ctrl_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_start); -/* Reusing lv_buttonmatrix_set_button_ctrl_all for lv_buttonmatrix_clear_button_ctrl_all */ +/* Reusing lv_arc_get_angle_start for lv_arc_get_angle_end */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_clear_button_ctrl_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_end); -/* Reusing lv_obj_fade_in for lv_buttonmatrix_set_button_width */ +/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_start */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_width_mpobj, 3, mp_lv_obj_fade_in, lv_buttonmatrix_set_button_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_start); -/* Reusing lv_obj_set_radio_button for lv_buttonmatrix_set_one_checked */ +/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_end */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_one_checked_mpobj, 2, mp_lv_obj_set_radio_button, lv_buttonmatrix_set_one_checked); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_end); -/* Reusing lv_obj_get_child_count for lv_buttonmatrix_get_selected_button */ +/* Reusing lv_obj_get_index for lv_arc_get_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_buttonmatrix_get_selected_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_value); + +/* Reusing lv_obj_get_index for lv_arc_get_min_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_min_value); + +/* Reusing lv_obj_get_index for lv_arc_get_max_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_max_value); /* * lvgl extension definition for: - * const char *lv_buttonmatrix_get_button_text(const lv_obj_t *obj, uint32_t btn_id) + * lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_buttonmatrix_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); - const char * _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_func_ptr)(obj, btn_id); - return convert_to_str((void*)_res); + lv_arc_mode_t _res = ((lv_arc_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_buttonmatrix_get_button_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_mode_mpobj, 1, mp_lv_arc_get_mode, lv_arc_get_mode); + +/* Reusing lv_obj_get_index for lv_arc_get_rotation */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_rotation_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_rotation); + +/* Reusing lv_obj_get_index for lv_arc_get_knob_offset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_knob_offset_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_knob_offset); + +/* Reusing lv_obj_get_event_count for lv_arc_get_change_rate */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_change_rate_mpobj, 1, mp_lv_obj_get_event_count, lv_arc_get_change_rate); + +/* Reusing lv_obj_bind_checked for lv_arc_bind_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_arc_bind_value); /* * lvgl extension definition for: - * bool lv_buttonmatrix_has_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) + * void lv_arc_align_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_align, int32_t r_offset) */ -static mp_obj_t mp_lv_buttonmatrix_has_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_align_obj_to_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); - return convert_to_bool(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_obj_t *obj_to_align = mp_to_lv(mp_args[1]); + int32_t r_offset = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, obj_to_align, r_offset); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_has_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_has_button_ctrl, lv_buttonmatrix_has_button_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_align_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_align_obj_to_angle); -/* Reusing lv_obj_is_layout_positioned for lv_buttonmatrix_get_one_checked */ +/* Reusing lv_arc_align_obj_to_angle for lv_arc_rotate_obj_to_angle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_one_checked_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_buttonmatrix_get_one_checked); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_rotate_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_rotate_obj_to_angle); -/* Reusing lv_obj_create for lv_buttonmatrix_create */ +/* Reusing lv_obj_create for lv_arc_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_create_mpobj, 1, mp_lv_obj_create, lv_buttonmatrix_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_create_mpobj, 1, mp_lv_obj_create, lv_arc_create); /* - * lvgl buttonmatrix object definitions + * lvgl arc object definitions */ -static const mp_rom_map_elem_t buttonmatrix_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_map_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ctrl_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_ctrl_map_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_set_selected_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_width), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_set_one_checked_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_get_selected_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_buttonmatrix_get_button_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_has_button_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_get_one_checked_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_CTRL), MP_ROM_PTR(&mp_lv_LV_BUTTONMATRIX_CTRL_type_base) } +static const mp_rom_map_elem_t arc_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_start_angle), MP_ROM_PTR(&mp_lv_arc_set_start_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_end_angle), MP_ROM_PTR(&mp_lv_arc_set_end_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angles), MP_ROM_PTR(&mp_lv_arc_set_angles_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_start_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_start_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_end_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_end_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_angles), MP_ROM_PTR(&mp_lv_arc_set_bg_angles_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_arc_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_arc_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_arc_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_arc_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_arc_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_arc_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_change_rate), MP_ROM_PTR(&mp_lv_arc_set_change_rate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_knob_offset), MP_ROM_PTR(&mp_lv_arc_set_knob_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arc_get_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_end), MP_ROM_PTR(&mp_lv_arc_get_angle_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bg_angle_start), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bg_angle_end), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_arc_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_arc_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_arc_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_arc_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_arc_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_knob_offset), MP_ROM_PTR(&mp_lv_arc_get_knob_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_change_rate), MP_ROM_PTR(&mp_lv_arc_get_change_rate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_arc_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_align_obj_to_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_rotate_obj_to_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ARC_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(buttonmatrix_locals_dict, buttonmatrix_locals_dict_table); +static MP_DEFINE_CONST_DICT(arc_locals_dict, arc_locals_dict_table); -static void buttonmatrix_print(const mp_print_t *print, +static void arc_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl buttonmatrix"); + mp_printf(print, "lvgl arc"); } -static mp_obj_t buttonmatrix_make_new( +static mp_obj_t arc_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_buttonmatrix_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_arc_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_buttonmatrix_type_base, - MP_QSTR_buttonmatrix, + mp_lv_arc_type_base, + MP_QSTR_arc, MP_TYPE_FLAG_NONE, - print, buttonmatrix_print, - make_new, buttonmatrix_make_new, + print, arc_print, + make_new, arc_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &buttonmatrix_locals_dict + locals_dict, &arc_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_buttonmatrix_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arc_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_buttonmatrix_class, + .lv_obj_class = &lv_arc_class, #endif - .mp_obj_type = &mp_lv_buttonmatrix_type_base, + .mp_obj_type = &mp_lv_arc_type_base, }; /* * lvgl extension definition for: - * void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day) + * void lv_arclabel_set_text(lv_obj_t *obj, const char *text) */ -static mp_obj_t mp_lv_calendar_set_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t year = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t month = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t day = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, uint32_t))lv_func_ptr)(obj, year, month, day); + const char *text = (const char *)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, text); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_date_mpobj, 4, mp_lv_calendar_set_today_date, lv_calendar_set_today_date); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text); -/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_year */ +/* Reusing lv_arclabel_set_text for lv_arclabel_set_text_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_year); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text_static); -/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_month */ +/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_start */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_month); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_start_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_start); -/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_day */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_day_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_day); - -/* Reusing lv_obj_fade_in for lv_calendar_set_month_shown */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_month_shown_mpobj, 3, mp_lv_obj_fade_in, lv_calendar_set_month_shown); - -/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_year */ +/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_size */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_year); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_size_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_size); -/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_month */ +/* Reusing lv_obj_move_to_index for lv_arclabel_set_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_month); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arclabel_set_offset); /* - * Struct lv_calendar_date_t + * lvgl extension definition for: + * void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir) */ -static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_calendar_date_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_calendar_date_t_type())); - return (lv_calendar_date_t*)self->data; -} - -#define mp_write_lv_calendar_date_t(struct_obj) *((lv_calendar_date_t*)mp_write_ptr_lv_calendar_date_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_calendar_date_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_calendar_date_t_type(), field); -} - -#define mp_read_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(copy_buffer(&field, sizeof(lv_calendar_date_t))) -#define mp_read_byref_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(&field) - -static void mp_lv_calendar_date_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_calendar_date_t *data = (lv_calendar_date_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_year: dest[0] = mp_obj_new_int_from_uint(data->year); break; // converting from uint16_t; - case MP_QSTR_month: dest[0] = mp_obj_new_int_from_uint(data->month); break; // converting from uint8_t; - case MP_QSTR_day: dest[0] = mp_obj_new_int_from_uint(data->day); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_year: data->year = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_month: data->month = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_day: data->day = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_calendar_date_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_arclabel_set_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_calendar_date_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_arclabel_dir_t dir = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arclabel_dir_t))lv_func_ptr)(obj, dir); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_calendar_date_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_calendar_date_t_type, - MP_QSTR_lv_calendar_date_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_calendar_date_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_calendar_date_t_attr, - locals_dict, &mp_lv_calendar_date_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void) -{ - return &mp_lv_calendar_date_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_dir_mpobj, 2, mp_lv_arclabel_set_dir, lv_arclabel_set_dir); +/* Reusing lv_obj_set_hidden for lv_arclabel_set_recolor */ -/* - * Array convertors for lv_calendar_date_t [] - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_recolor_mpobj, 2, mp_lv_obj_set_hidden, lv_arclabel_set_recolor); + +/* Reusing lv_obj_delete_delayed for lv_arclabel_set_radius */ -GENMPY_UNUSED static lv_calendar_date_t *mp_arr_to_lv_calendar_date_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_radius_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_radius); - lv_calendar_date_t *lv_arr = (lv_calendar_date_t*)m_malloc(len * sizeof(lv_calendar_date_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_calendar_date_t(item); - } - return (lv_calendar_date_t *)lv_arr; -} +/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_x */ -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_calendar_date_t_____(lv_calendar_date_t *arr) -{ - return mp_read_ptr_lv_calendar_date_t((void*)arr); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_x); + +/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_y */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_y); + /* * lvgl extension definition for: - * void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], size_t date_num) + * void lv_arclabel_set_text_vertical_align(lv_obj_t *obj, lv_arclabel_text_align_t align) */ -static mp_obj_t mp_lv_calendar_set_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_set_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_calendar_date_t *highlighted = mp_arr_to_lv_calendar_date_t_____(mp_args[1]); - size_t date_num = (size_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_calendar_date_t [], size_t))lv_func_ptr)(obj, highlighted, date_num); + lv_arclabel_text_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_func_ptr)(obj, align); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_highlighted_dates_mpobj, 3, mp_lv_calendar_set_highlighted_dates, lv_calendar_set_highlighted_dates); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_vertical_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_vertical_align); + +/* Reusing lv_arclabel_set_text_vertical_align for lv_arclabel_set_text_horizontal_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_horizontal_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_horizontal_align); /* * lvgl extension definition for: - * void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names) + * void lv_arclabel_set_overflow(lv_obj_t *obj, lv_arclabel_overflow_t overflow) */ -static mp_obj_t mp_lv_calendar_set_day_names(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char **day_names = (const char **)mp_write_ptr_C_Pointer(mp_args[1]); - ((void (*)(lv_obj_t *, const char **))lv_func_ptr)(obj, day_names); + lv_arclabel_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arclabel_overflow_t))lv_func_ptr)(obj, overflow); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_day_names_mpobj, 2, mp_lv_calendar_set_day_names, lv_calendar_set_day_names); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_overflow_mpobj, 2, mp_lv_arclabel_set_overflow, lv_arclabel_set_overflow); -/* Reusing lv_obj_get_screen for lv_calendar_get_btnmatrix */ +/* Reusing lv_obj_set_hidden for lv_arclabel_set_end_overlap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_btnmatrix_mpobj, 1, mp_lv_obj_get_screen, lv_calendar_get_btnmatrix); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_end_overlap_mpobj, 2, mp_lv_obj_set_hidden, lv_arclabel_set_end_overlap); + +/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_start */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_start); + +/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_size_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_size); /* * lvgl extension definition for: - * const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *calendar) + * lv_arclabel_dir_t lv_arclabel_get_dir(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_calendar_get_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_get_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_calendar_date_t * _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(calendar); - return mp_read_ptr_lv_calendar_date_t((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_arclabel_dir_t _res = ((lv_arclabel_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_today_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_today_date); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_dir_mpobj, 1, mp_lv_arclabel_get_dir, lv_arclabel_get_dir); -/* Reusing lv_calendar_get_today_date for lv_calendar_get_showed_date */ +/* Reusing lv_obj_refr_size for lv_arclabel_get_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_showed_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_showed_date); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_recolor_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_recolor); +/* Reusing lv_obj_get_event_count for lv_arclabel_get_radius */ -/* - * lvgl extension definition for: - * lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *calendar) - */ - -static mp_obj_t mp_lv_calendar_get_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_calendar_date_t * _res = ((lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(calendar); - return mp_read_ptr_lv_calendar_date_t((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_radius_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_radius); + +/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_x */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_x_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_x); + +/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_mpobj, 1, mp_lv_calendar_get_highlighted_dates, lv_calendar_get_highlighted_dates); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_y_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_y); /* * lvgl extension definition for: - * size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *calendar) + * lv_arclabel_text_align_t lv_arclabel_get_text_vertical_align(lv_obj_t *obj) */ -static mp_obj_t mp_lv_calendar_get_highlighted_dates_num(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_get_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - size_t _res = ((size_t (*)(const lv_obj_t *))lv_func_ptr)(calendar); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_arclabel_text_align_t _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_num_mpobj, 1, mp_lv_calendar_get_highlighted_dates_num, lv_calendar_get_highlighted_dates_num); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_vertical_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_vertical_align); + +/* Reusing lv_arclabel_get_text_vertical_align for lv_arclabel_get_text_horizontal_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_horizontal_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_horizontal_align); /* * lvgl extension definition for: - * lv_result_t lv_calendar_get_pressed_date(const lv_obj_t *calendar, lv_calendar_date_t *date) + * lv_arclabel_overflow_t lv_arclabel_get_overflow(lv_obj_t *obj) */ -static mp_obj_t mp_lv_calendar_get_pressed_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_calendar_date_t *date = mp_write_ptr_lv_calendar_date_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, lv_calendar_date_t *))lv_func_ptr)(calendar, date); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_arclabel_overflow_t _res = ((lv_arclabel_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_pressed_date_mpobj, 2, mp_lv_calendar_get_pressed_date, lv_calendar_get_pressed_date); - -/* Reusing lv_obj_create for lv_calendar_add_header_arrow */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_arrow_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_arrow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_overflow_mpobj, 1, mp_lv_arclabel_get_overflow, lv_arclabel_get_overflow); -/* Reusing lv_obj_create for lv_calendar_add_header_dropdown */ +/* Reusing lv_obj_refr_size for lv_arclabel_get_end_overlap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_dropdown_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_dropdown); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_end_overlap_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_end_overlap); -/* Reusing lv_arclabel_set_text for lv_calendar_header_dropdown_set_year_list */ +/* Reusing lv_arc_get_angle_start for lv_arclabel_get_text_angle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_header_dropdown_set_year_list_mpobj, 2, mp_lv_arclabel_set_text, lv_calendar_header_dropdown_set_year_list); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_angle_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_text_angle); -/* Reusing lv_obj_create for lv_calendar_create */ +/* Reusing lv_obj_create for lv_arclabel_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_create_mpobj, 1, mp_lv_obj_create, lv_calendar_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_create_mpobj, 1, mp_lv_obj_create, lv_arclabel_create); /* - * lvgl calendar object definitions + * lvgl arclabel object definitions */ -static const mp_rom_map_elem_t calendar_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_today_date), MP_ROM_PTR(&mp_lv_calendar_set_today_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_today_year), MP_ROM_PTR(&mp_lv_calendar_set_today_year_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_today_month), MP_ROM_PTR(&mp_lv_calendar_set_today_month_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_today_day), MP_ROM_PTR(&mp_lv_calendar_set_today_day_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_month_shown), MP_ROM_PTR(&mp_lv_calendar_set_month_shown_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shown_year), MP_ROM_PTR(&mp_lv_calendar_set_shown_year_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shown_month), MP_ROM_PTR(&mp_lv_calendar_set_shown_month_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_set_highlighted_dates_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_day_names), MP_ROM_PTR(&mp_lv_calendar_set_day_names_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_btnmatrix), MP_ROM_PTR(&mp_lv_calendar_get_btnmatrix_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_today_date), MP_ROM_PTR(&mp_lv_calendar_get_today_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_showed_date), MP_ROM_PTR(&mp_lv_calendar_get_showed_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates_num), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_num_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pressed_date), MP_ROM_PTR(&mp_lv_calendar_get_pressed_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_header_arrow), MP_ROM_PTR(&mp_lv_calendar_add_header_arrow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_header_dropdown), MP_ROM_PTR(&mp_lv_calendar_add_header_dropdown_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_dropdown_set_year_list), MP_ROM_PTR(&mp_lv_calendar_header_dropdown_set_year_list_mpobj) } +static const mp_rom_map_elem_t arclabel_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_arclabel_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_arclabel_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angle_start), MP_ROM_PTR(&mp_lv_arclabel_set_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angle_size), MP_ROM_PTR(&mp_lv_arclabel_set_angle_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_arclabel_set_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_arclabel_set_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_arclabel_set_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_arclabel_set_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_vertical_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_horizontal_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_arclabel_set_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_set_end_overlap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arclabel_get_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_size), MP_ROM_PTR(&mp_lv_arclabel_get_angle_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_arclabel_get_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_arclabel_get_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_radius), MP_ROM_PTR(&mp_lv_arclabel_get_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_vertical_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_horizontal_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_arclabel_get_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_get_end_overlap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_angle), MP_ROM_PTR(&mp_lv_arclabel_get_text_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_DIR), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_DIR_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TEXT_ALIGN), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_TEXT_ALIGN_type_base) }, + { MP_ROM_QSTR(MP_QSTR_OVERFLOW), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_OVERFLOW_type_base) } }; -static MP_DEFINE_CONST_DICT(calendar_locals_dict, calendar_locals_dict_table); +static MP_DEFINE_CONST_DICT(arclabel_locals_dict, arclabel_locals_dict_table); -static void calendar_print(const mp_print_t *print, +static void arclabel_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl calendar"); + mp_printf(print, "lvgl arclabel"); } -static mp_obj_t calendar_make_new( +static mp_obj_t arclabel_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_calendar_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_arclabel_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_calendar_type_base, - MP_QSTR_calendar, + mp_lv_arclabel_type_base, + MP_QSTR_arclabel, MP_TYPE_FLAG_NONE, - print, calendar_print, - make_new, calendar_make_new, + print, arclabel_print, + make_new, arclabel_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &calendar_locals_dict + locals_dict, &arclabel_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_calendar_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arclabel_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_calendar_class, + .lv_obj_class = &lv_arclabel_class, #endif - .mp_obj_type = &mp_lv_calendar_type_base, + .mp_obj_type = &mp_lv_arclabel_type_base, }; +/* Reusing lv_arclabel_set_text for lv_label_set_text */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text); + +/* Reusing lv_arclabel_set_text for lv_label_set_text_static */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text_static); + /* * lvgl extension definition for: - * void lv_canvas_set_buffer(lv_obj_t *obj, void *buf, int32_t w, int32_t h, lv_color_format_t cf) + * void lv_label_set_long_mode(lv_obj_t *obj, lv_label_long_mode_t long_mode) */ -static mp_obj_t mp_lv_canvas_set_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_set_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - void *buf = mp_to_ptr(mp_args[1]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t h = (int32_t)mp_obj_get_int(mp_args[3]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, void *, int32_t, int32_t, lv_color_format_t))lv_func_ptr)(obj, buf, w, h, cf); + lv_label_long_mode_t long_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_label_long_mode_t))lv_func_ptr)(obj, long_mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_buffer_mpobj, 5, mp_lv_canvas_set_buffer, lv_canvas_set_buffer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_long_mode_mpobj, 2, mp_lv_label_set_long_mode, lv_label_set_long_mode); +/* Reusing lv_obj_move_to_index for lv_label_set_max_lines */ -/* - * lvgl extension definition for: - * void lv_canvas_set_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_max_lines_mpobj, 2, mp_lv_obj_move_to_index, lv_label_set_max_lines); + +/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_start */ -static mp_obj_t mp_lv_canvas_set_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_draw_buf_t *))lv_func_ptr)(obj, draw_buf); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_start_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_start); + +/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_end */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_end_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_end); + +/* Reusing lv_obj_set_hidden for lv_label_set_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_draw_buf_mpobj, 2, mp_lv_canvas_set_draw_buf, lv_canvas_set_draw_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_recolor_mpobj, 2, mp_lv_obj_set_hidden, lv_label_set_recolor); /* * lvgl extension definition for: - * void lv_canvas_set_px(lv_obj_t *obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa) + * char *lv_label_get_text(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_canvas_set_px(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - lv_color_t color = mp_write_lv_color_t(mp_args[3]); - lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_color_t, lv_opa_t))lv_func_ptr)(obj, x, y, color, opa); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + char * _res = ((char *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_px_mpobj, 5, mp_lv_canvas_set_px, lv_canvas_set_px); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_mpobj, 1, mp_lv_label_get_text, lv_label_get_text); /* * lvgl extension definition for: - * void lv_canvas_set_palette(lv_obj_t *obj, uint8_t index, lv_color32_t color) + * lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_canvas_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_get_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); - ((void (*)(lv_obj_t *, uint8_t, lv_color32_t))lv_func_ptr)(obj, index, color); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_label_long_mode_t _res = ((lv_label_long_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_palette_mpobj, 3, mp_lv_canvas_set_palette, lv_canvas_set_palette); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_long_mode_mpobj, 1, mp_lv_label_get_long_mode, lv_label_get_long_mode); + +/* Reusing lv_obj_get_index for lv_label_get_max_lines */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_max_lines_mpobj, 1, mp_lv_obj_get_index, lv_label_get_max_lines); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_canvas_get_draw_buf(lv_obj_t *obj) + * void lv_label_get_letter_pos(const lv_obj_t *obj, uint32_t char_id, lv_point_t *pos) */ -static mp_obj_t mp_lv_canvas_get_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_get_letter_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint32_t char_id = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); + ((void (*)(const lv_obj_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, char_id, pos); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_draw_buf_mpobj, 1, mp_lv_canvas_get_draw_buf, lv_canvas_get_draw_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_pos_mpobj, 3, mp_lv_label_get_letter_pos, lv_label_get_letter_pos); /* * lvgl extension definition for: - * lv_color32_t lv_canvas_get_px(lv_obj_t *obj, int32_t x, int32_t y) + * uint32_t lv_label_get_letter_on(const lv_obj_t *obj, lv_point_t *pos_in, bool bidi) */ -static mp_obj_t mp_lv_canvas_get_px(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_get_letter_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - lv_color32_t _res = ((lv_color32_t (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); - return mp_read_lv_color32_t(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *pos_in = mp_write_ptr_lv_point_t(mp_args[1]); + bool bidi = mp_obj_is_true(mp_args[2]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_point_t *, bool))lv_func_ptr)(obj, pos_in, bidi); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_px_mpobj, 3, mp_lv_canvas_get_px, lv_canvas_get_px); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_on_mpobj, 3, mp_lv_label_get_letter_on, lv_label_get_letter_on); /* * lvgl extension definition for: - * lv_image_dsc_t *lv_canvas_get_image(lv_obj_t *canvas) + * bool lv_label_is_char_under_pos(const lv_obj_t *obj, lv_point_t *pos) */ -static mp_obj_t mp_lv_canvas_get_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_is_char_under_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *canvas = mp_to_lv(mp_args[0]); - lv_image_dsc_t * _res = ((lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(canvas); - return mp_read_ptr_lv_image_dsc_t((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[1]); + bool _res = ((bool (*)(const lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, pos); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_image_mpobj, 1, mp_lv_canvas_get_image, lv_canvas_get_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_is_char_under_pos_mpobj, 2, mp_lv_label_is_char_under_pos, lv_label_is_char_under_pos); -/* Reusing lv_image_get_src for lv_canvas_get_buf */ +/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_start */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_buf_mpobj, 1, mp_lv_image_get_src, lv_canvas_get_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_start_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_start); +/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_end */ -/* - * lvgl extension definition for: - * void lv_canvas_copy_buf(lv_obj_t *obj, const lv_area_t *canvas_area, lv_draw_buf_t *src_buf, const lv_area_t *src_area) - */ - -static mp_obj_t mp_lv_canvas_copy_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_area_t *canvas_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_draw_buf_t *src_buf = mp_write_ptr_lv_draw_buf_t(mp_args[2]); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_obj_t *, const lv_area_t *, lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(obj, canvas_area, src_buf, src_area); - return mp_const_none; -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_end_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_end); + +/* Reusing lv_obj_is_layout_positioned for lv_label_get_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_copy_buf_mpobj, 4, mp_lv_canvas_copy_buf, lv_canvas_copy_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_recolor_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_label_get_recolor); /* * lvgl extension definition for: - * void lv_canvas_fill_bg(lv_obj_t *obj, lv_color_t color, lv_opa_t opa) + * lv_observer_t *lv_label_bind_text(lv_obj_t *obj, lv_subject_t *subject, const char *fmt) */ -static mp_obj_t mp_lv_canvas_fill_bg(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_bind_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_t color = mp_write_lv_color_t(mp_args[1]); - lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_color_t, lv_opa_t))lv_func_ptr)(obj, color, opa); - return mp_const_none; + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + const char *fmt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, subject, fmt); + return mp_read_ptr_lv_observer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_fill_bg_mpobj, 3, mp_lv_canvas_fill_bg, lv_canvas_fill_bg); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_bind_text_mpobj, 3, mp_lv_label_bind_text, lv_label_bind_text); /* * lvgl extension definition for: - * void lv_canvas_init_layer(lv_obj_t *canvas, lv_layer_t *layer) + * void lv_label_ins_text(lv_obj_t *obj, uint32_t pos, const char *txt) */ -static mp_obj_t mp_lv_canvas_init_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_ins_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *canvas = mp_to_lv(mp_args[0]); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_layer_t *))lv_func_ptr)(canvas, layer); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, const char *))lv_func_ptr)(obj, pos, txt); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_init_layer_mpobj, 2, mp_lv_canvas_init_layer, lv_canvas_init_layer); - -/* Reusing lv_canvas_init_layer for lv_canvas_finish_layer */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_finish_layer_mpobj, 2, mp_lv_canvas_init_layer, lv_canvas_finish_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_ins_text_mpobj, 3, mp_lv_label_ins_text, lv_label_ins_text); +/* Reusing lv_obj_fade_in for lv_label_cut_text */ -/* - * lvgl extension definition for: - * uint32_t lv_canvas_buf_size(int32_t w, int32_t h, uint8_t bpp, uint8_t stride) - */ - -static mp_obj_t mp_lv_canvas_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - int32_t w = (int32_t)mp_obj_get_int(mp_args[0]); - int32_t h = (int32_t)mp_obj_get_int(mp_args[1]); - uint8_t bpp = (uint8_t)mp_obj_get_int(mp_args[2]); - uint8_t stride = (uint8_t)mp_obj_get_int(mp_args[3]); - uint32_t _res = ((uint32_t (*)(int32_t, int32_t, uint8_t, uint8_t))lv_func_ptr)(w, h, bpp, stride); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_canvas_buf_size_mpobj, 4, mp_lv_canvas_buf_size, lv_canvas_buf_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_cut_text_mpobj, 3, mp_lv_obj_fade_in, lv_label_cut_text); -/* Reusing lv_obj_create for lv_canvas_create */ +/* Reusing lv_obj_create for lv_label_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_create_mpobj, 1, mp_lv_obj_create, lv_canvas_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_create_mpobj, 1, mp_lv_obj_create, lv_label_create); /* - * lvgl canvas object definitions + * lvgl label object definitions */ -static const mp_rom_map_elem_t canvas_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_buffer), MP_ROM_PTR(&mp_lv_canvas_set_buffer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_draw_buf), MP_ROM_PTR(&mp_lv_canvas_set_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_px), MP_ROM_PTR(&mp_lv_canvas_set_px_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_canvas_set_palette_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_buf), MP_ROM_PTR(&mp_lv_canvas_get_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_px), MP_ROM_PTR(&mp_lv_canvas_get_px_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_image), MP_ROM_PTR(&mp_lv_canvas_get_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_buf), MP_ROM_PTR(&mp_lv_canvas_get_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy_buf), MP_ROM_PTR(&mp_lv_canvas_copy_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fill_bg), MP_ROM_PTR(&mp_lv_canvas_fill_bg_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init_layer), MP_ROM_PTR(&mp_lv_canvas_init_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_finish_layer), MP_ROM_PTR(&mp_lv_canvas_finish_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_buf_size), MP_ROM_PTR(&mp_lv_canvas_buf_size_mpobj) } +static const mp_rom_map_elem_t label_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_label_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_label_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_long_mode), MP_ROM_PTR(&mp_lv_label_set_long_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_lines), MP_ROM_PTR(&mp_lv_label_set_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_selection_start), MP_ROM_PTR(&mp_lv_label_set_text_selection_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_selection_end), MP_ROM_PTR(&mp_lv_label_set_text_selection_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_label_set_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_label_get_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_long_mode), MP_ROM_PTR(&mp_lv_label_get_long_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_lines), MP_ROM_PTR(&mp_lv_label_get_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_letter_pos), MP_ROM_PTR(&mp_lv_label_get_letter_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_letter_on), MP_ROM_PTR(&mp_lv_label_get_letter_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_char_under_pos), MP_ROM_PTR(&mp_lv_label_is_char_under_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_selection_start), MP_ROM_PTR(&mp_lv_label_get_text_selection_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_selection_end), MP_ROM_PTR(&mp_lv_label_get_text_selection_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_label_get_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_text), MP_ROM_PTR(&mp_lv_label_bind_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_text), MP_ROM_PTR(&mp_lv_label_ins_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cut_text), MP_ROM_PTR(&mp_lv_label_cut_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_LONG_MODE), MP_ROM_PTR(&mp_lv_LV_LABEL_LONG_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(canvas_locals_dict, canvas_locals_dict_table); +static MP_DEFINE_CONST_DICT(label_locals_dict, label_locals_dict_table); -static void canvas_print(const mp_print_t *print, +static void label_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl canvas"); + mp_printf(print, "lvgl label"); } -static mp_obj_t canvas_make_new( +static mp_obj_t label_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_canvas_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_label_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_canvas_type_base, - MP_QSTR_canvas, + mp_lv_label_type_base, + MP_QSTR_label, MP_TYPE_FLAG_NONE, - print, canvas_print, - make_new, canvas_make_new, + print, label_print, + make_new, label_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &canvas_locals_dict + locals_dict, &label_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_canvas_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_label_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_canvas_class, + .lv_obj_class = &lv_label_class, #endif - .mp_obj_type = &mp_lv_canvas_type_base, + .mp_obj_type = &mp_lv_label_type_base, }; +/* Reusing lv_obj_scroll_to_x for lv_bar_set_value */ -/* - * lvgl extension definition for: - * void lv_chart_set_type(lv_obj_t *obj, lv_chart_type_t type) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_value); + +/* Reusing lv_obj_scroll_to_x for lv_bar_set_start_value */ -static mp_obj_t mp_lv_chart_set_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_type_t type = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_type_t))lv_func_ptr)(obj, type); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_start_value); + +/* Reusing lv_obj_set_pos for lv_bar_set_range */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_bar_set_range); + +/* Reusing lv_obj_move_to_index for lv_bar_set_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_type_mpobj, 2, mp_lv_chart_set_type, lv_chart_set_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_min_value); -/* Reusing lv_obj_delete_delayed for lv_chart_set_point_count */ +/* Reusing lv_obj_move_to_index for lv_bar_set_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_point_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_point_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_max_value); /* * lvgl extension definition for: - * void lv_chart_set_axis_range(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min, int32_t max) + * void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode) */ -static mp_obj_t mp_lv_chart_set_axis_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bar_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t, int32_t))lv_func_ptr)(obj, axis, min, max); + lv_bar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_bar_mode_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_range_mpobj, 4, mp_lv_chart_set_axis_range, lv_chart_set_axis_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_mode_mpobj, 2, mp_lv_bar_set_mode, lv_bar_set_mode); /* * lvgl extension definition for: - * void lv_chart_set_axis_min_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min) + * void lv_bar_set_orientation(lv_obj_t *obj, lv_bar_orientation_t orientation) */ -static mp_obj_t mp_lv_chart_set_axis_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bar_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_func_ptr)(obj, axis, min); + lv_bar_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_bar_orientation_t))lv_func_ptr)(obj, orientation); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_min_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_min_value); - -/* Reusing lv_chart_set_axis_min_value for lv_chart_set_axis_max_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_max_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_orientation_mpobj, 2, mp_lv_bar_set_orientation, lv_bar_set_orientation); +/* Reusing lv_obj_get_index for lv_bar_get_value */ -/* - * lvgl extension definition for: - * void lv_chart_set_update_mode(lv_obj_t *obj, lv_chart_update_mode_t update_mode) - */ - -static mp_obj_t mp_lv_chart_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_update_mode_t update_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_update_mode_t))lv_func_ptr)(obj, update_mode); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_update_mode_mpobj, 2, mp_lv_chart_set_update_mode, lv_chart_set_update_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_value); -/* Reusing lv_obj_fade_in for lv_chart_set_div_line_count */ +/* Reusing lv_obj_get_index for lv_bar_get_start_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_div_line_count_mpobj, 3, mp_lv_obj_fade_in, lv_chart_set_div_line_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_start_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_start_value); -/* Reusing lv_obj_delete_delayed for lv_chart_set_hor_div_line_count */ +/* Reusing lv_obj_get_index for lv_bar_get_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_hor_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_hor_div_line_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_min_value); -/* Reusing lv_obj_delete_delayed for lv_chart_set_ver_div_line_count */ +/* Reusing lv_obj_get_index for lv_bar_get_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_ver_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_ver_div_line_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_max_value); /* * lvgl extension definition for: - * lv_chart_type_t lv_chart_get_type(const lv_obj_t *obj) + * lv_bar_mode_t lv_bar_get_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bar_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_type_t _res = ((lv_chart_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_bar_mode_t _res = ((lv_bar_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_type_mpobj, 1, mp_lv_chart_get_type, lv_chart_get_type); - -/* Reusing lv_obj_get_child_count for lv_chart_get_point_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_point_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_mode_mpobj, 1, mp_lv_bar_get_mode, lv_bar_get_mode); /* * lvgl extension definition for: - * lv_chart_update_mode_t lv_chart_get_update_mode(const lv_obj_t *obj) + * lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bar_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_update_mode_t _res = ((lv_chart_update_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_bar_orientation_t _res = ((lv_bar_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_update_mode_mpobj, 1, mp_lv_chart_get_update_mode, lv_chart_get_update_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_orientation_mpobj, 1, mp_lv_bar_get_orientation, lv_bar_get_orientation); -/* Reusing lv_obj_get_child_count for lv_chart_get_hor_div_line_count */ +/* Reusing lv_obj_refr_size for lv_bar_is_symmetrical */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_hor_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_hor_div_line_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_bar_is_symmetrical); -/* Reusing lv_obj_get_child_count for lv_chart_get_ver_div_line_count */ +/* Reusing lv_obj_bind_checked for lv_bar_bind_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_ver_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_ver_div_line_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_bar_bind_value); + +/* Reusing lv_obj_create for lv_bar_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_create_mpobj, 1, mp_lv_obj_create, lv_bar_create); /* - * Struct lv_chart_series_t + * lvgl bar object definitions */ + -static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void); +static const mp_rom_map_elem_t bar_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_bar_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_bar_set_start_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_bar_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_bar_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_bar_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_bar_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_bar_set_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_bar_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_start_value), MP_ROM_PTR(&mp_lv_bar_get_start_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_bar_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_bar_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_bar_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_bar_get_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_bar_is_symmetrical_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_bar_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_BAR_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_BAR_ORIENTATION_type_base) } +}; -GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_series_t(mp_obj_t self_in) +static MP_DEFINE_CONST_DICT(bar_locals_dict, bar_locals_dict_table); + +static void bar_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_series_t_type())); - return (lv_chart_series_t*)self->data; + mp_printf(print, "lvgl bar"); } -#define mp_write_lv_chart_series_t(struct_obj) *((lv_chart_series_t*)mp_write_ptr_lv_chart_series_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_series_t(void *field) +static mp_obj_t bar_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - return lv_to_mp_struct(get_mp_lv_chart_series_t_type(), field); + return make_new(&mp_lv_bar_create_mpobj, type, n_args, n_kw, args); } -#define mp_read_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(copy_buffer(&field, sizeof(lv_chart_series_t))) -#define mp_read_byref_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(&field) -static void mp_lv_chart_series_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_chart_series_t *data = (lv_chart_series_t*)self->data; +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_bar_type_base, + MP_QSTR_bar, + MP_TYPE_FLAG_NONE, + print, bar_print, + make_new, bar_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &bar_locals_dict +); - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_x_points: dest[0] = mp_array_from_i32ptr((void*)data->x_points); break; // converting from int32_t *; - case MP_QSTR_y_points: dest[0] = mp_array_from_i32ptr((void*)data->y_points); break; // converting from int32_t *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_start_point: dest[0] = mp_obj_new_int_from_uint(data->start_point); break; // converting from uint32_t; - case MP_QSTR_hidden: dest[0] = mp_obj_new_int_from_uint(data->hidden); break; // converting from uint32_t; - case MP_QSTR_x_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->x_ext_buf_assigned); break; // converting from uint32_t; - case MP_QSTR_y_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->y_ext_buf_assigned); break; // converting from uint32_t; - case MP_QSTR_x_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->x_axis_sec); break; // converting from uint32_t; - case MP_QSTR_y_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->y_axis_sec); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_x_points: data->x_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; - case MP_QSTR_y_points: data->y_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_start_point: data->start_point = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_hidden: data->hidden = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_x_ext_buf_assigned: data->x_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_y_ext_buf_assigned: data->y_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_x_axis_sec: data->x_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_y_axis_sec: data->y_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_bar_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_bar_class, +#endif + .mp_obj_type = &mp_lv_bar_type_base, +}; + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_canvas_set_buffer(lv_obj_t *obj, void *buf, int32_t w, int32_t h, lv_color_format_t cf) + */ -static void mp_lv_chart_series_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_canvas_set_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_chart_series_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + void *buf = mp_to_ptr(mp_args[1]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t h = (int32_t)mp_obj_get_int(mp_args[3]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, void *, int32_t, int32_t, lv_color_format_t))lv_func_ptr)(obj, buf, w, h, cf); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_chart_series_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_chart_series_t_type, - MP_QSTR_lv_chart_series_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_chart_series_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_chart_series_t_attr, - locals_dict, &mp_lv_chart_series_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_buffer_mpobj, 5, mp_lv_canvas_set_buffer, lv_canvas_set_buffer); + -static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void) +/* + * lvgl extension definition for: + * void lv_canvas_set_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) + */ + +static mp_obj_t mp_lv_canvas_set_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_chart_series_t_type; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_draw_buf_t *))lv_func_ptr)(obj, draw_buf); + return mp_const_none; } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_draw_buf_mpobj, 2, mp_lv_canvas_set_draw_buf, lv_canvas_set_draw_buf); /* * lvgl extension definition for: - * uint32_t lv_chart_get_x_start_point(const lv_obj_t *obj, lv_chart_series_t *ser) + * void lv_canvas_set_px(lv_obj_t *obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa) */ -static mp_obj_t mp_lv_chart_get_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_set_px(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + lv_color_t color = mp_write_lv_color_t(mp_args[3]); + lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_color_t, lv_opa_t))lv_func_ptr)(obj, x, y, color, opa); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_x_start_point_mpobj, 2, mp_lv_chart_get_x_start_point, lv_chart_get_x_start_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_px_mpobj, 5, mp_lv_canvas_set_px, lv_canvas_set_px); /* * lvgl extension definition for: - * void lv_chart_get_point_pos_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, lv_point_t *p_out) + * void lv_canvas_set_palette(lv_obj_t *obj, uint8_t index, lv_color32_t color) */ -static mp_obj_t mp_lv_chart_get_point_pos_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_point_t *p_out = mp_write_ptr_lv_point_t(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, ser, id, p_out); + uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); + ((void (*)(lv_obj_t *, uint8_t, lv_color32_t))lv_func_ptr)(obj, index, color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_pos_by_id_mpobj, 4, mp_lv_chart_get_point_pos_by_id, lv_chart_get_point_pos_by_id); - -/* Reusing lv_obj_move_foreground for lv_chart_refresh */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_chart_refresh); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_set_palette_mpobj, 3, mp_lv_canvas_set_palette, lv_canvas_set_palette); /* * lvgl extension definition for: - * lv_chart_series_t *lv_chart_add_series(lv_obj_t *obj, lv_color_t color, lv_chart_axis_t axis) + * lv_draw_buf_t *lv_canvas_get_draw_buf(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_add_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_get_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_t color = mp_write_lv_color_t(mp_args[1]); - lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[2]); - lv_chart_series_t * _res = ((lv_chart_series_t *(*)(lv_obj_t *, lv_color_t, lv_chart_axis_t))lv_func_ptr)(obj, color, axis); - return mp_read_ptr_lv_chart_series_t((void*)_res); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_series_mpobj, 3, mp_lv_chart_add_series, lv_chart_add_series); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_draw_buf_mpobj, 1, mp_lv_canvas_get_draw_buf, lv_canvas_get_draw_buf); /* * lvgl extension definition for: - * void lv_chart_remove_series(lv_obj_t *obj, lv_chart_series_t *series) + * lv_color32_t lv_canvas_get_px(lv_obj_t *obj, int32_t x, int32_t y) */ -static mp_obj_t mp_lv_chart_remove_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_get_px(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, series); - return mp_const_none; + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + lv_color32_t _res = ((lv_color32_t (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_series_mpobj, 2, mp_lv_chart_remove_series, lv_chart_remove_series); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_px_mpobj, 3, mp_lv_canvas_get_px, lv_canvas_get_px); /* * lvgl extension definition for: - * void lv_chart_hide_series(lv_obj_t *chart, lv_chart_series_t *series, bool hide) + * lv_image_dsc_t *lv_canvas_get_image(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_hide_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_get_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); - bool hide = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, bool))lv_func_ptr)(chart, series, hide); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_image_dsc_t * _res = ((lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_image_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_hide_series_mpobj, 3, mp_lv_chart_hide_series, lv_chart_hide_series); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_image_mpobj, 1, mp_lv_canvas_get_image, lv_canvas_get_image); + +/* Reusing lv_image_get_src for lv_canvas_get_buf */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_buf_mpobj, 1, mp_lv_image_get_src, lv_canvas_get_buf); /* * lvgl extension definition for: - * void lv_chart_set_series_color(lv_obj_t *chart, lv_chart_series_t *series, lv_color_t color) + * void lv_canvas_copy_buf(lv_obj_t *obj, const lv_area_t *canvas_area, lv_draw_buf_t *src_buf, const lv_area_t *src_area) */ -static mp_obj_t mp_lv_chart_set_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_copy_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); - lv_color_t color = mp_write_lv_color_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, lv_color_t))lv_func_ptr)(chart, series, color); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_area_t *canvas_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_draw_buf_t *src_buf = mp_write_ptr_lv_draw_buf_t(mp_args[2]); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_obj_t *, const lv_area_t *, lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(obj, canvas_area, src_buf, src_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_color_mpobj, 3, mp_lv_chart_set_series_color, lv_chart_set_series_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_copy_buf_mpobj, 4, mp_lv_canvas_copy_buf, lv_canvas_copy_buf); /* * lvgl extension definition for: - * lv_color_t lv_chart_get_series_color(lv_obj_t *chart, const lv_chart_series_t *series) + * void lv_canvas_fill_bg(lv_obj_t *obj, lv_color_t color, lv_opa_t opa) */ -static mp_obj_t mp_lv_chart_get_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_fill_bg(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - const lv_chart_series_t *series = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); - lv_color_t _res = ((lv_color_t (*)(lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(chart, series); - return mp_read_lv_color_t(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_t color = mp_write_lv_color_t(mp_args[1]); + lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_color_t, lv_opa_t))lv_func_ptr)(obj, color, opa); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_color_mpobj, 2, mp_lv_chart_get_series_color, lv_chart_get_series_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_fill_bg_mpobj, 3, mp_lv_canvas_fill_bg, lv_canvas_fill_bg); /* * lvgl extension definition for: - * void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id) + * void lv_canvas_init_layer(lv_obj_t *obj, lv_layer_t *layer) */ -static mp_obj_t mp_lv_chart_set_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_init_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(obj, ser, id); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_layer_t *))lv_func_ptr)(obj, layer); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_x_start_point_mpobj, 3, mp_lv_chart_set_x_start_point, lv_chart_set_x_start_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_init_layer_mpobj, 2, mp_lv_canvas_init_layer, lv_canvas_init_layer); + +/* Reusing lv_canvas_init_layer for lv_canvas_finish_layer */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_finish_layer_mpobj, 2, mp_lv_canvas_init_layer, lv_canvas_finish_layer); /* * lvgl extension definition for: - * lv_chart_series_t *lv_chart_get_series_next(const lv_obj_t *chart, const lv_chart_series_t *ser) + * uint32_t lv_canvas_buf_size(int32_t w, int32_t h, uint8_t bpp, uint8_t stride) */ -static mp_obj_t mp_lv_chart_get_series_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_canvas_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *chart = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_chart_series_t *ser = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); - lv_chart_series_t * _res = ((lv_chart_series_t *(*)(const lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(chart, ser); - return mp_read_ptr_lv_chart_series_t((void*)_res); + int32_t w = (int32_t)mp_obj_get_int(mp_args[0]); + int32_t h = (int32_t)mp_obj_get_int(mp_args[1]); + uint8_t bpp = (uint8_t)mp_obj_get_int(mp_args[2]); + uint8_t stride = (uint8_t)mp_obj_get_int(mp_args[3]); + uint32_t _res = ((uint32_t (*)(int32_t, int32_t, uint8_t, uint8_t))lv_func_ptr)(w, h, bpp, stride); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_next_mpobj, 2, mp_lv_chart_get_series_next, lv_chart_get_series_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_canvas_buf_size_mpobj, 4, mp_lv_canvas_buf_size, lv_canvas_buf_size); + +/* Reusing lv_obj_create for lv_canvas_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_create_mpobj, 1, mp_lv_obj_create, lv_canvas_create); /* - * Struct lv_chart_cursor_t + * lvgl canvas object definitions */ + -static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void); +static const mp_rom_map_elem_t canvas_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_buffer), MP_ROM_PTR(&mp_lv_canvas_set_buffer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_buf), MP_ROM_PTR(&mp_lv_canvas_set_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_px), MP_ROM_PTR(&mp_lv_canvas_set_px_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_canvas_set_palette_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_buf), MP_ROM_PTR(&mp_lv_canvas_get_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_px), MP_ROM_PTR(&mp_lv_canvas_get_px_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_image), MP_ROM_PTR(&mp_lv_canvas_get_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_buf), MP_ROM_PTR(&mp_lv_canvas_get_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy_buf), MP_ROM_PTR(&mp_lv_canvas_copy_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fill_bg), MP_ROM_PTR(&mp_lv_canvas_fill_bg_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init_layer), MP_ROM_PTR(&mp_lv_canvas_init_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_finish_layer), MP_ROM_PTR(&mp_lv_canvas_finish_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_buf_size), MP_ROM_PTR(&mp_lv_canvas_buf_size_mpobj) } +}; -GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_cursor_t(mp_obj_t self_in) +static MP_DEFINE_CONST_DICT(canvas_locals_dict, canvas_locals_dict_table); + +static void canvas_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_cursor_t_type())); - return (lv_chart_cursor_t*)self->data; + mp_printf(print, "lvgl canvas"); } -#define mp_write_lv_chart_cursor_t(struct_obj) *((lv_chart_cursor_t*)mp_write_ptr_lv_chart_cursor_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_cursor_t(void *field) +static mp_obj_t canvas_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - return lv_to_mp_struct(get_mp_lv_chart_cursor_t_type(), field); + return make_new(&mp_lv_canvas_create_mpobj, type, n_args, n_kw, args); } -#define mp_read_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(copy_buffer(&field, sizeof(lv_chart_cursor_t))) -#define mp_read_byref_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(&field) - -static void mp_lv_chart_cursor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_chart_cursor_t *data = (lv_chart_cursor_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_pos: dest[0] = mp_read_byref_lv_point_t(data->pos); break; // converting from lv_point_t; - case MP_QSTR_point_id: dest[0] = mp_obj_new_int(data->point_id); break; // converting from int32_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_ser: dest[0] = mp_read_ptr_lv_chart_series_t((void*)data->ser); break; // converting from lv_chart_series_t *; - case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_dir_t; - case MP_QSTR_pos_set: dest[0] = mp_obj_new_int_from_uint(data->pos_set); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_pos: data->pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_point_id: data->point_id = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_ser: data->ser = (void*)mp_write_ptr_lv_chart_series_t(dest[1]); break; // converting to lv_chart_series_t *; - case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; - case MP_QSTR_pos_set: data->pos_set = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_chart_cursor_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_chart_cursor_t"); -} - -static const mp_obj_dict_t mp_lv_chart_cursor_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_chart_cursor_t_type, - MP_QSTR_lv_chart_cursor_t, + mp_lv_canvas_type_base, + MP_QSTR_canvas, MP_TYPE_FLAG_NONE, - print, mp_lv_chart_cursor_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_chart_cursor_t_attr, - locals_dict, &mp_lv_chart_cursor_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, canvas_print, + make_new, canvas_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &canvas_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void) -{ - return &mp_lv_chart_cursor_t_type; -} +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_canvas_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_canvas_class, +#endif + .mp_obj_type = &mp_lv_canvas_type_base, +}; /* * lvgl extension definition for: - * lv_chart_cursor_t *lv_chart_add_cursor(lv_obj_t *obj, lv_color_t color, lv_dir_t dir) + * void lv_barcode_set_dark_color(lv_obj_t *obj, lv_color_t color) */ -static mp_obj_t mp_lv_chart_add_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_set_dark_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); lv_color_t color = mp_write_lv_color_t(mp_args[1]); - lv_dir_t dir = (int)mp_obj_get_int(mp_args[2]); - lv_chart_cursor_t * _res = ((lv_chart_cursor_t *(*)(lv_obj_t *, lv_color_t, lv_dir_t))lv_func_ptr)(obj, color, dir); - return mp_read_ptr_lv_chart_cursor_t((void*)_res); + ((void (*)(lv_obj_t *, lv_color_t))lv_func_ptr)(obj, color); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_cursor_mpobj, 3, mp_lv_chart_add_cursor, lv_chart_add_cursor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_dark_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_barcode_set_dark_color); +/* Reusing lv_barcode_set_dark_color for lv_barcode_set_light_color */ -/* - * lvgl extension definition for: - * void lv_chart_remove_cursor(lv_obj_t *obj, lv_chart_cursor_t *cursor) - */ - -static mp_obj_t mp_lv_chart_remove_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(obj, cursor); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_cursor_mpobj, 2, mp_lv_chart_remove_cursor, lv_chart_remove_cursor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_light_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_barcode_set_light_color); /* * lvgl extension definition for: - * void lv_chart_set_cursor_pos(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_point_t *pos) + * void lv_barcode_set_scale(lv_obj_t *obj, uint16_t scale) */ -static mp_obj_t mp_lv_chart_set_cursor_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_set_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_point_t *))lv_func_ptr)(chart, cursor, pos); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint16_t scale = (uint16_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint16_t))lv_func_ptr)(obj, scale); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_mpobj, 3, mp_lv_chart_set_cursor_pos, lv_chart_set_cursor_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_scale_mpobj, 2, mp_lv_barcode_set_scale, lv_barcode_set_scale); +/* Reusing lv_obj_set_scroll_dir for lv_barcode_set_direction */ -/* - * lvgl extension definition for: - * void lv_chart_set_cursor_pos_x(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t x) - */ - -static mp_obj_t mp_lv_chart_set_cursor_pos_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_func_ptr)(chart, cursor, x); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_x_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_barcode_set_direction); -/* Reusing lv_chart_set_cursor_pos_x for lv_chart_set_cursor_pos_y */ +/* Reusing lv_obj_set_hidden for lv_barcode_set_tiled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_y_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_tiled_mpobj, 2, mp_lv_obj_set_hidden, lv_barcode_set_tiled); /* * lvgl extension definition for: - * void lv_chart_set_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_chart_series_t *ser, uint32_t point_id) + * void lv_barcode_set_encoding(lv_obj_t *obj, lv_barcode_encoding_t encoding) */ -static mp_obj_t mp_lv_chart_set_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_set_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[2]); - uint32_t point_id = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(chart, cursor, ser, point_id); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_barcode_encoding_t encoding = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_barcode_encoding_t))lv_func_ptr)(obj, encoding); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_point_mpobj, 4, mp_lv_chart_set_cursor_point, lv_chart_set_cursor_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_encoding_mpobj, 2, mp_lv_barcode_set_encoding, lv_barcode_set_encoding); /* * lvgl extension definition for: - * lv_point_t lv_chart_get_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor) + * lv_result_t lv_barcode_update(lv_obj_t *obj, const char *data) */ -static mp_obj_t mp_lv_chart_get_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - lv_point_t _res = ((lv_point_t (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(chart, cursor); - return mp_read_lv_point_t(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const char *data = (const char *)(char*)convert_from_str(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_cursor_point_mpobj, 2, mp_lv_chart_get_cursor_point, lv_chart_get_cursor_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_update_mpobj, 2, mp_lv_barcode_update, lv_barcode_update); /* * lvgl extension definition for: - * void lv_chart_set_all_values(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) + * lv_result_t lv_barcode_render(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_set_all_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_render(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_func_ptr)(obj, ser, value); - return mp_const_none; + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_all_values_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_all_values); - -/* Reusing lv_chart_set_all_values for lv_chart_set_next_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_next_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_render_mpobj, 1, mp_lv_barcode_render, lv_barcode_render); /* * lvgl extension definition for: - * void lv_chart_set_next_value2(lv_obj_t *obj, lv_chart_series_t *ser, int32_t x_value, int32_t y_value) + * void lv_barcode_set_update_mode(lv_obj_t *obj, lv_barcode_update_mode_t mode) */ -static mp_obj_t mp_lv_chart_set_next_value2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t x_value = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t y_value = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t, int32_t))lv_func_ptr)(obj, ser, x_value, y_value); + lv_barcode_update_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_barcode_update_mode_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value2_mpobj, 4, mp_lv_chart_set_next_value2, lv_chart_set_next_value2); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_update_mode_mpobj, 2, mp_lv_barcode_set_update_mode, lv_barcode_set_update_mode); /* * lvgl extension definition for: - * void lv_chart_set_series_values(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t values[], size_t values_cnt) + * lv_barcode_update_mode_t lv_barcode_get_update_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_set_series_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - const int32_t *values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); - size_t values_cnt = (size_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], size_t))lv_func_ptr)(obj, ser, values, values_cnt); - return mp_const_none; + lv_barcode_update_mode_t _res = ((lv_barcode_update_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values_mpobj, 4, mp_lv_chart_set_series_values, lv_chart_set_series_values); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_update_mode_mpobj, 1, mp_lv_barcode_get_update_mode, lv_barcode_get_update_mode); +/* Reusing lv_obj_refr_size for lv_barcode_is_render_valid */ -/* - * lvgl extension definition for: - * void lv_chart_set_series_values2(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t x_values[], const int32_t y_values[], size_t values_cnt) - */ - -static mp_obj_t mp_lv_chart_set_series_values2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - const int32_t *x_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); - const int32_t *y_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[3]); - size_t values_cnt = (size_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], const int32_t [], size_t))lv_func_ptr)(obj, ser, x_values, y_values, values_cnt); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values2_mpobj, 5, mp_lv_chart_set_series_values2, lv_chart_set_series_values2); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_is_render_valid_mpobj, 1, mp_lv_obj_refr_size, lv_barcode_is_render_valid); /* * lvgl extension definition for: - * void lv_chart_set_series_value_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t value) + * lv_color_t lv_barcode_get_dark_color(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_set_series_value_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_get_dark_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t))lv_func_ptr)(obj, ser, id, value); - return mp_const_none; + lv_color_t _res = ((lv_color_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id_mpobj, 4, mp_lv_chart_set_series_value_by_id, lv_chart_set_series_value_by_id); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_dark_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_dark_color); +/* Reusing lv_barcode_get_dark_color for lv_barcode_get_light_color */ -/* - * lvgl extension definition for: - * void lv_chart_set_series_value_by_id2(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t x_value, int32_t y_value) - */ - -static mp_obj_t mp_lv_chart_set_series_value_by_id2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - int32_t x_value = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y_value = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t, int32_t))lv_func_ptr)(obj, ser, id, x_value, y_value); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id2_mpobj, 5, mp_lv_chart_set_series_value_by_id2, lv_chart_set_series_value_by_id2); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_light_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_light_color); /* * lvgl extension definition for: - * void lv_chart_set_series_ext_y_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) + * uint16_t lv_barcode_get_scale(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_set_series_ext_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_get_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t *array = mp_arr_to_int32_t_____(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_func_ptr)(obj, ser, array); - return mp_const_none; + uint16_t _res = ((uint16_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_y_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_y_array); - -/* Reusing lv_chart_set_series_ext_y_array for lv_chart_set_series_ext_x_array */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_x_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_x_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_scale_mpobj, 1, mp_lv_barcode_get_scale, lv_barcode_get_scale); /* * lvgl extension definition for: - * int32_t *lv_chart_get_series_y_array(const lv_obj_t *obj, lv_chart_series_t *ser) + * lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_get_series_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_get_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t * _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); - return mp_array_from_i32ptr((void*)_res); + lv_barcode_encoding_t _res = ((lv_barcode_encoding_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_y_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_y_array); - -/* Reusing lv_chart_get_series_y_array for lv_chart_get_series_x_array */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_x_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_x_array); - -/* Reusing lv_obj_get_child_count for lv_chart_get_pressed_point */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_pressed_point_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_pressed_point); - -/* Reusing lv_obj_get_style_clamped_width for lv_chart_get_first_point_center_offset */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_first_point_center_offset_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_chart_get_first_point_center_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_encoding_mpobj, 1, mp_lv_barcode_get_encoding, lv_barcode_get_encoding); -/* Reusing lv_obj_create for lv_chart_create */ +/* Reusing lv_obj_create for lv_barcode_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_create_mpobj, 1, mp_lv_obj_create, lv_chart_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_create_mpobj, 1, mp_lv_obj_create, lv_barcode_create); /* - * lvgl chart object definitions + * lvgl barcode object definitions */ -static const mp_rom_map_elem_t chart_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_type), MP_ROM_PTR(&mp_lv_chart_set_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_point_count), MP_ROM_PTR(&mp_lv_chart_set_point_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_axis_range), MP_ROM_PTR(&mp_lv_chart_set_axis_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_axis_min_value), MP_ROM_PTR(&mp_lv_chart_set_axis_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_axis_max_value), MP_ROM_PTR(&mp_lv_chart_set_axis_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_chart_set_update_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_hor_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_ver_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_chart_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_chart_get_point_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_chart_get_update_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_hor_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_ver_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x_start_point), MP_ROM_PTR(&mp_lv_chart_get_x_start_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_point_pos_by_id), MP_ROM_PTR(&mp_lv_chart_get_point_pos_by_id_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_chart_refresh_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_series), MP_ROM_PTR(&mp_lv_chart_add_series_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_series), MP_ROM_PTR(&mp_lv_chart_remove_series_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_hide_series), MP_ROM_PTR(&mp_lv_chart_hide_series_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_color), MP_ROM_PTR(&mp_lv_chart_set_series_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_color), MP_ROM_PTR(&mp_lv_chart_get_series_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_x_start_point), MP_ROM_PTR(&mp_lv_chart_set_x_start_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_next), MP_ROM_PTR(&mp_lv_chart_get_series_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_cursor), MP_ROM_PTR(&mp_lv_chart_add_cursor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_cursor), MP_ROM_PTR(&mp_lv_chart_remove_cursor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_x), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_y), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_point), MP_ROM_PTR(&mp_lv_chart_set_cursor_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cursor_point), MP_ROM_PTR(&mp_lv_chart_get_cursor_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_all_values), MP_ROM_PTR(&mp_lv_chart_set_all_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_next_value), MP_ROM_PTR(&mp_lv_chart_set_next_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_next_value2), MP_ROM_PTR(&mp_lv_chart_set_next_value2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_values), MP_ROM_PTR(&mp_lv_chart_set_series_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_values2), MP_ROM_PTR(&mp_lv_chart_set_series_values2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id2), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_ext_y_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_y_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_ext_x_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_x_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_y_array), MP_ROM_PTR(&mp_lv_chart_get_series_y_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_x_array), MP_ROM_PTR(&mp_lv_chart_get_series_x_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pressed_point), MP_ROM_PTR(&mp_lv_chart_get_pressed_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_first_point_center_offset), MP_ROM_PTR(&mp_lv_chart_get_first_point_center_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_TYPE), MP_ROM_PTR(&mp_lv_LV_CHART_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_CHART_UPDATE_MODE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_AXIS), MP_ROM_PTR(&mp_lv_LV_CHART_AXIS_type_base) } +static const mp_rom_map_elem_t barcode_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_barcode_set_dark_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_barcode_set_light_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_barcode_set_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_direction), MP_ROM_PTR(&mp_lv_barcode_set_direction_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tiled), MP_ROM_PTR(&mp_lv_barcode_set_tiled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_encoding), MP_ROM_PTR(&mp_lv_barcode_set_encoding_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_barcode_update_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_render), MP_ROM_PTR(&mp_lv_barcode_render_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_barcode_set_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_barcode_get_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_render_valid), MP_ROM_PTR(&mp_lv_barcode_is_render_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dark_color), MP_ROM_PTR(&mp_lv_barcode_get_dark_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_light_color), MP_ROM_PTR(&mp_lv_barcode_get_light_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_barcode_get_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_encoding), MP_ROM_PTR(&mp_lv_barcode_get_encoding_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ENCODING_CODE128), MP_ROM_PTR(&mp_lv_LV_BARCODE_ENCODING_CODE128_type_base) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_BARCODE_UPDATE_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(chart_locals_dict, chart_locals_dict_table); +static MP_DEFINE_CONST_DICT(barcode_locals_dict, barcode_locals_dict_table); -static void chart_print(const mp_print_t *print, +static void barcode_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl chart"); + mp_printf(print, "lvgl barcode"); } -static mp_obj_t chart_make_new( +static mp_obj_t barcode_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_chart_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_barcode_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_chart_type_base, - MP_QSTR_chart, + mp_lv_barcode_type_base, + MP_QSTR_barcode, MP_TYPE_FLAG_NONE, - print, chart_print, - make_new, chart_make_new, + print, barcode_print, + make_new, barcode_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &chart_locals_dict + locals_dict, &barcode_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_chart_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_barcode_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_chart_class, + .lv_obj_class = &lv_barcode_class, #endif - .mp_obj_type = &mp_lv_chart_type_base, + .mp_obj_type = &mp_lv_barcode_type_base, }; -/* Reusing lv_arclabel_set_text for lv_checkbox_set_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text); - -/* Reusing lv_arclabel_set_text for lv_checkbox_set_text_static */ +/* Reusing lv_obj_create for lv_button_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text_static); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_button_create_mpobj, 1, mp_lv_obj_create, lv_button_create); /* - * lvgl extension definition for: - * const char *lv_checkbox_get_text(const lv_obj_t *obj) + * lvgl button object definitions */ - -static mp_obj_t mp_lv_checkbox_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const char * _res = ((const char *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return convert_to_str((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_checkbox_get_text); - -/* Reusing lv_obj_create for lv_checkbox_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_create_mpobj, 1, mp_lv_obj_create, lv_checkbox_create); -/* - * lvgl checkbox object definitions - */ +static const mp_rom_map_elem_t button_locals_dict_table[] = { - -static const mp_rom_map_elem_t checkbox_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_checkbox_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_checkbox_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_checkbox_get_text_mpobj) } }; -static MP_DEFINE_CONST_DICT(checkbox_locals_dict, checkbox_locals_dict_table); +static MP_DEFINE_CONST_DICT(button_locals_dict, button_locals_dict_table); -static void checkbox_print(const mp_print_t *print, +static void button_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl checkbox"); + mp_printf(print, "lvgl button"); } -static mp_obj_t checkbox_make_new( +static mp_obj_t button_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_checkbox_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_button_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_checkbox_type_base, - MP_QSTR_checkbox, + mp_lv_button_type_base, + MP_QSTR_button, MP_TYPE_FLAG_NONE, - print, checkbox_print, - make_new, checkbox_make_new, + print, button_print, + make_new, button_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &checkbox_locals_dict + locals_dict, &button_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_checkbox_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_button_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_checkbox_class, + .lv_obj_class = &lv_button_class, #endif - .mp_obj_type = &mp_lv_checkbox_type_base, + .mp_obj_type = &mp_lv_button_type_base, }; -/* Reusing lv_arclabel_set_text for lv_dropdown_set_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text); - -/* Reusing lv_arclabel_set_text for lv_dropdown_set_text_static */ +/* + * Array convertors for char *[] + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text_static); +GENMPY_UNUSED static char * *mp_arr_to_char_ptr____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); -/* Reusing lv_arclabel_set_text for lv_dropdown_set_options */ + char * *lv_arr = (char **)m_malloc(len * sizeof(char *)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (char*)convert_from_str(item); + } + return (char * *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options); - -/* Reusing lv_arclabel_set_text for lv_dropdown_set_options_static */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_char_ptr____(const char * const *arr) +{ + return mp_read_ptr_C_Pointer((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options_static); - /* * lvgl extension definition for: - * void lv_dropdown_add_option(lv_obj_t *obj, const char *option, uint32_t pos) + * void lv_buttonmatrix_set_map(lv_obj_t *obj, const char * const map[]) */ -static mp_obj_t mp_lv_dropdown_add_option(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *option = (const char *)(char*)convert_from_str(mp_args[1]); - uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const char *, uint32_t))lv_func_ptr)(obj, option, pos); + const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[1]); + ((void (*)(lv_obj_t *, const char * const []))lv_func_ptr)(obj, map); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_add_option_mpobj, 3, mp_lv_dropdown_add_option, lv_dropdown_add_option); - -/* Reusing lv_obj_move_foreground for lv_dropdown_clear_options */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_clear_options_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_clear_options); - -/* Reusing lv_obj_delete_delayed for lv_dropdown_set_selected */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_mpobj, 2, mp_lv_obj_delete_delayed, lv_dropdown_set_selected); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_map_mpobj, 2, mp_lv_buttonmatrix_set_map, lv_buttonmatrix_set_map); -/* Reusing lv_obj_set_scroll_dir for lv_dropdown_set_dir */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_dropdown_set_dir); - -/* Reusing lv_image_set_src for lv_dropdown_set_symbol */ +/* + * Array convertors for lv_buttonmatrix_ctrl_t [] + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_symbol_mpobj, 2, mp_lv_image_set_src, lv_dropdown_set_symbol); +GENMPY_UNUSED static lv_buttonmatrix_ctrl_t *mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); -/* Reusing lv_obj_set_radio_button for lv_dropdown_set_selected_highlight */ + lv_buttonmatrix_ctrl_t *lv_arr = (lv_buttonmatrix_ctrl_t*)m_malloc(len * sizeof(lv_buttonmatrix_ctrl_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (int)mp_obj_get_int(item); + } + return (lv_buttonmatrix_ctrl_t *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_highlight_mpobj, 2, mp_lv_obj_set_radio_button, lv_dropdown_set_selected_highlight); - -/* Reusing lv_obj_create for lv_dropdown_get_list */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_buttonmatrix_ctrl_t_____(const lv_buttonmatrix_ctrl_t *arr) +{ + return mp_array_from_i32ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_list_mpobj, 1, mp_lv_obj_create, lv_dropdown_get_list); - /* * lvgl extension definition for: - * const char *lv_dropdown_get_text(lv_obj_t *obj) + * void lv_buttonmatrix_set_ctrl_map(lv_obj_t *obj, const lv_buttonmatrix_ctrl_t ctrl_map[]) */ -static mp_obj_t mp_lv_dropdown_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_ctrl_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char * _res = ((const char *(*)(lv_obj_t *))lv_func_ptr)(obj); - return convert_to_str((void*)_res); + const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[1]); + ((void (*)(lv_obj_t *, const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(obj, ctrl_map); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_text_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_text); - -/* Reusing lv_checkbox_get_text for lv_dropdown_get_options */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_dropdown_get_options); - -/* Reusing lv_obj_get_child_count for lv_dropdown_get_selected */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_selected); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_ctrl_map_mpobj, 2, mp_lv_buttonmatrix_set_ctrl_map, lv_buttonmatrix_set_ctrl_map); -/* Reusing lv_obj_get_child_count for lv_dropdown_get_option_count */ +/* Reusing lv_obj_delete_delayed for lv_buttonmatrix_set_selected_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_option_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_selected_button_mpobj, 2, mp_lv_obj_delete_delayed, lv_buttonmatrix_set_selected_button); /* * lvgl extension definition for: - * void lv_dropdown_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) + * void lv_buttonmatrix_set_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) */ -static mp_obj_t mp_lv_dropdown_get_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - char *buf = (char*)convert_from_str(mp_args[1]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, char *, uint32_t))lv_func_ptr)(obj, buf, buf_size); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_dropdown_get_selected_str); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_set_button_ctrl); + +/* Reusing lv_buttonmatrix_set_button_ctrl for lv_buttonmatrix_clear_button_ctrl */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_clear_button_ctrl); /* * lvgl extension definition for: - * int32_t lv_dropdown_get_option_index(lv_obj_t *obj, const char *option) + * void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) */ -static mp_obj_t mp_lv_dropdown_get_option_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *option = (const char *)(char*)convert_from_str(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, option); - return mp_obj_new_int(_res); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, ctrl); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_index_mpobj, 2, mp_lv_dropdown_get_option_index, lv_dropdown_get_option_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_set_button_ctrl_all); -/* Reusing lv_dropdown_get_text for lv_dropdown_get_symbol */ +/* Reusing lv_buttonmatrix_set_button_ctrl_all for lv_buttonmatrix_clear_button_ctrl_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_symbol_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_symbol); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_clear_button_ctrl_all); -/* Reusing lv_obj_refr_size for lv_dropdown_get_selected_highlight */ +/* Reusing lv_obj_fade_in for lv_buttonmatrix_set_button_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_highlight_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_get_selected_highlight); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_width_mpobj, 3, mp_lv_obj_fade_in, lv_buttonmatrix_set_button_width); -/* Reusing lv_obj_get_scroll_dir for lv_dropdown_get_dir */ +/* Reusing lv_obj_set_hidden for lv_buttonmatrix_set_one_checked */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_dropdown_get_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_one_checked_mpobj, 2, mp_lv_obj_set_hidden, lv_buttonmatrix_set_one_checked); -/* Reusing lv_obj_move_foreground for lv_dropdown_open */ +/* Reusing lv_obj_get_child_count for lv_buttonmatrix_get_selected_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_open_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_open); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_buttonmatrix_get_selected_button); -/* Reusing lv_obj_move_foreground for lv_dropdown_close */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_close_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_close); +/* + * lvgl extension definition for: + * const char *lv_buttonmatrix_get_button_text(const lv_obj_t *obj, uint32_t btn_id) + */ + +static mp_obj_t mp_lv_buttonmatrix_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); + const char * _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_func_ptr)(obj, btn_id); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_buttonmatrix_get_button_text); -/* Reusing lv_obj_refr_size for lv_dropdown_is_open */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_is_open_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_is_open); +/* + * lvgl extension definition for: + * bool lv_buttonmatrix_has_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) + */ + +static mp_obj_t mp_lv_buttonmatrix_has_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_has_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_has_button_ctrl, lv_buttonmatrix_has_button_ctrl); -/* Reusing lv_obj_bind_checked for lv_dropdown_bind_value */ +/* Reusing lv_obj_is_layout_positioned for lv_buttonmatrix_get_one_checked */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_dropdown_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_one_checked_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_buttonmatrix_get_one_checked); -/* Reusing lv_obj_create for lv_dropdown_create */ +/* Reusing lv_obj_create for lv_buttonmatrix_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_create_mpobj, 1, mp_lv_obj_create, lv_dropdown_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_create_mpobj, 1, mp_lv_obj_create, lv_buttonmatrix_create); /* - * lvgl dropdown object definitions + * lvgl buttonmatrix object definitions */ -static const mp_rom_map_elem_t dropdown_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_dropdown_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_dropdown_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_dropdown_set_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_options_static), MP_ROM_PTR(&mp_lv_dropdown_set_options_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_option), MP_ROM_PTR(&mp_lv_dropdown_add_option_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_options), MP_ROM_PTR(&mp_lv_dropdown_clear_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_dropdown_set_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_dropdown_set_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_symbol), MP_ROM_PTR(&mp_lv_dropdown_set_symbol_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_set_selected_highlight_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_list), MP_ROM_PTR(&mp_lv_dropdown_get_list_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_dropdown_get_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_dropdown_get_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_dropdown_get_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_dropdown_get_option_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_dropdown_get_selected_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_index), MP_ROM_PTR(&mp_lv_dropdown_get_option_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_symbol), MP_ROM_PTR(&mp_lv_dropdown_get_symbol_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_get_selected_highlight_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_dropdown_get_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_dropdown_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_dropdown_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_open), MP_ROM_PTR(&mp_lv_dropdown_is_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_dropdown_bind_value_mpobj) } +static const mp_rom_map_elem_t buttonmatrix_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_map_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ctrl_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_ctrl_map_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_set_selected_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_width), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_set_one_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_get_selected_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_buttonmatrix_get_button_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_has_button_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_get_one_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_CTRL), MP_ROM_PTR(&mp_lv_LV_BUTTONMATRIX_CTRL_type_base) } }; -static MP_DEFINE_CONST_DICT(dropdown_locals_dict, dropdown_locals_dict_table); +static MP_DEFINE_CONST_DICT(buttonmatrix_locals_dict, buttonmatrix_locals_dict_table); -static void dropdown_print(const mp_print_t *print, +static void buttonmatrix_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl dropdown"); + mp_printf(print, "lvgl buttonmatrix"); } -static mp_obj_t dropdown_make_new( +static mp_obj_t buttonmatrix_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_dropdown_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_buttonmatrix_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_dropdown_type_base, - MP_QSTR_dropdown, + mp_lv_buttonmatrix_type_base, + MP_QSTR_buttonmatrix, MP_TYPE_FLAG_NONE, - print, dropdown_print, - make_new, dropdown_make_new, + print, buttonmatrix_print, + make_new, buttonmatrix_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &dropdown_locals_dict + locals_dict, &buttonmatrix_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_dropdown_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_buttonmatrix_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_dropdown_class, + .lv_obj_class = &lv_buttonmatrix_class, #endif - .mp_obj_type = &mp_lv_dropdown_type_base, + .mp_obj_type = &mp_lv_buttonmatrix_type_base, }; /* * lvgl extension definition for: - * void lv_gif_set_color_format(lv_obj_t *obj, lv_color_format_t color_format) + * void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day) */ -static mp_obj_t mp_lv_gif_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_set_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, color_format); + uint32_t year = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t month = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t day = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, uint32_t))lv_func_ptr)(obj, year, month, day); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_color_format_mpobj, 2, mp_lv_gif_set_color_format, lv_gif_set_color_format); - -/* Reusing lv_image_set_src for lv_gif_set_src */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_src_mpobj, 2, mp_lv_image_set_src, lv_gif_set_src); - -/* Reusing lv_obj_move_foreground for lv_gif_restart */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_restart_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_restart); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_date_mpobj, 4, mp_lv_calendar_set_today_date, lv_calendar_set_today_date); -/* Reusing lv_obj_move_foreground for lv_gif_pause */ +/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_year */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_pause_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_pause); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_year); -/* Reusing lv_obj_move_foreground for lv_gif_resume */ +/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_month */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_resume_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_month); -/* Reusing lv_obj_refr_size for lv_gif_is_loaded */ +/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_day */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_is_loaded_mpobj, 1, mp_lv_obj_refr_size, lv_gif_is_loaded); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_day_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_day); -/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_loop_count */ +/* Reusing lv_obj_fade_in for lv_calendar_set_month_shown */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_loop_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_loop_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_month_shown_mpobj, 3, mp_lv_obj_fade_in, lv_calendar_set_month_shown); -/* Reusing lv_obj_move_to_index for lv_gif_set_loop_count */ +/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_year */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_loop_count_mpobj, 2, mp_lv_obj_move_to_index, lv_gif_set_loop_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_year); -/* Reusing lv_obj_set_radio_button for lv_gif_set_auto_pause_invisible */ +/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_month */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_auto_pause_invisible_mpobj, 2, mp_lv_obj_set_radio_button, lv_gif_set_auto_pause_invisible); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_month); /* - * lvgl extension definition for: - * bool lv_gif_get_size(const char *src, uint16_t *w, uint16_t *h) + * Struct lv_calendar_date_t */ -static mp_obj_t mp_lv_gif_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_calendar_date_t(mp_obj_t self_in) { - const char *src = (const char *)(char*)convert_from_str(mp_args[0]); - uint16_t *w = mp_array_to_u16ptr(mp_args[1]); - uint16_t *h = mp_array_to_u16ptr(mp_args[2]); - bool _res = ((bool (*)(const char *, uint16_t *, uint16_t *))lv_func_ptr)(src, w, h); - return convert_to_bool(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_calendar_date_t_type())); + return (lv_calendar_date_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_gif_get_size_mpobj, 3, mp_lv_gif_get_size, lv_gif_get_size); - -/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_frame_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_frame_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_frame_count); - -/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_current_frame_index */ +#define mp_write_lv_calendar_date_t(struct_obj) *((lv_calendar_date_t*)mp_write_ptr_lv_calendar_date_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_current_frame_index_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_current_frame_index); - -/* Reusing lv_obj_create for lv_gif_create */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_calendar_date_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_calendar_date_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_create_mpobj, 1, mp_lv_obj_create, lv_gif_create); - +#define mp_read_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(copy_buffer(&field, sizeof(lv_calendar_date_t))) +#define mp_read_byref_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(&field) -/* - * lvgl gif object definitions - */ - +static void mp_lv_calendar_date_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_calendar_date_t *data = (lv_calendar_date_t*)self->data; -static const mp_rom_map_elem_t gif_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_gif_set_color_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_gif_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_restart), MP_ROM_PTR(&mp_lv_gif_restart_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_gif_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_gif_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_loaded), MP_ROM_PTR(&mp_lv_gif_is_loaded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_loop_count), MP_ROM_PTR(&mp_lv_gif_get_loop_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_loop_count), MP_ROM_PTR(&mp_lv_gif_set_loop_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_auto_pause_invisible), MP_ROM_PTR(&mp_lv_gif_set_auto_pause_invisible_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_gif_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_frame_count), MP_ROM_PTR(&mp_lv_gif_get_frame_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_frame_index), MP_ROM_PTR(&mp_lv_gif_get_current_frame_index_mpobj) } -}; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_year: dest[0] = mp_obj_new_int_from_uint(data->year); break; // converting from uint16_t; + case MP_QSTR_month: dest[0] = mp_obj_new_int_from_uint(data->month); break; // converting from uint8_t; + case MP_QSTR_day: dest[0] = mp_obj_new_int_from_uint(data->day); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_year: data->year = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_month: data->month = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_day: data->day = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } -static MP_DEFINE_CONST_DICT(gif_locals_dict, gif_locals_dict_table); + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static void gif_print(const mp_print_t *print, +static void mp_lv_calendar_date_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl gif"); -} - - -static mp_obj_t gif_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_gif_create_mpobj, type, n_args, n_kw, args); + mp_printf(print, "struct lv_calendar_date_t"); } +static const mp_obj_dict_t mp_lv_calendar_date_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_gif_type_base, - MP_QSTR_gif, + mp_lv_calendar_date_t_type, + MP_QSTR_lv_calendar_date_t, MP_TYPE_FLAG_NONE, - print, gif_print, - make_new, gif_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &gif_locals_dict + print, mp_lv_calendar_date_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_calendar_date_t_attr, + locals_dict, &mp_lv_calendar_date_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_gif_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_gif_class, -#endif - .mp_obj_type = &mp_lv_gif_type_base, -}; +static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void) +{ + return &mp_lv_calendar_date_t_type; +} /* - * lvgl extension definition for: - * void lv_imagebutton_set_src(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left, const void *src_mid, const void *src_right) + * Array convertors for lv_calendar_date_t [] */ -static mp_obj_t mp_lv_imagebutton_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_calendar_date_t *mp_arr_to_lv_calendar_date_t_____(mp_obj_t mp_arr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - const void *src_left = (const void *)mp_to_ptr(mp_args[2]); - const void *src_mid = (const void *)mp_to_ptr(mp_args[3]); - const void *src_right = (const void *)mp_to_ptr(mp_args[4]); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *, const void *, const void *))lv_func_ptr)(obj, state, src_left, src_mid, src_right); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_calendar_date_t *lv_arr = (lv_calendar_date_t*)m_malloc(len * sizeof(lv_calendar_date_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_calendar_date_t(item); + } + return (lv_calendar_date_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_calendar_date_t_____(lv_calendar_date_t *arr) +{ + return mp_read_ptr_lv_calendar_date_t((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mpobj, 5, mp_lv_imagebutton_set_src, lv_imagebutton_set_src); - /* * lvgl extension definition for: - * void lv_imagebutton_set_src_left(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left) + * void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], size_t date_num) */ -static mp_obj_t mp_lv_imagebutton_set_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_set_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - const void *src_left = (const void *)mp_to_ptr(mp_args[2]); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_func_ptr)(obj, state, src_left); + lv_calendar_date_t *highlighted = mp_arr_to_lv_calendar_date_t_____(mp_args[1]); + size_t date_num = (size_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_calendar_date_t [], size_t))lv_func_ptr)(obj, highlighted, date_num); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_left_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_left); - -/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_right_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_right); - -/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_mid */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mid_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_mid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_highlighted_dates_mpobj, 3, mp_lv_calendar_set_highlighted_dates, lv_calendar_set_highlighted_dates); /* * lvgl extension definition for: - * void lv_imagebutton_set_state(lv_obj_t *obj, lv_imagebutton_state_t state) + * void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names) */ -static mp_obj_t mp_lv_imagebutton_set_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_set_day_names(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); + const char **day_names = (const char **)mp_write_ptr_C_Pointer(mp_args[1]); + ((void (*)(lv_obj_t *, const char **))lv_func_ptr)(obj, day_names); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_state_mpobj, 2, mp_lv_imagebutton_set_state, lv_imagebutton_set_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_day_names_mpobj, 2, mp_lv_calendar_set_day_names, lv_calendar_set_day_names); + +/* Reusing lv_obj_get_screen for lv_calendar_get_btnmatrix */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_btnmatrix_mpobj, 1, mp_lv_obj_get_screen, lv_calendar_get_btnmatrix); /* * lvgl extension definition for: - * const void *lv_imagebutton_get_src_left(lv_obj_t *obj, lv_imagebutton_state_t state) + * const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_imagebutton_get_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_get_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - const void * _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); - return ptr_to_mp((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_calendar_date_t * _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_calendar_date_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_left_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_left); - -/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_middle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_middle_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_middle); - -/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_right_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_today_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_today_date); -/* Reusing lv_obj_create for lv_imagebutton_create */ +/* Reusing lv_calendar_get_today_date for lv_calendar_get_showed_date */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_create_mpobj, 1, mp_lv_obj_create, lv_imagebutton_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_showed_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_showed_date); /* - * lvgl imagebutton object definitions + * lvgl extension definition for: + * lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *obj) */ - - -static const mp_rom_map_elem_t imagebutton_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_left), MP_ROM_PTR(&mp_lv_imagebutton_set_src_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_right), MP_ROM_PTR(&mp_lv_imagebutton_set_src_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_mid), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mid_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_state), MP_ROM_PTR(&mp_lv_imagebutton_set_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_left), MP_ROM_PTR(&mp_lv_imagebutton_get_src_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_middle), MP_ROM_PTR(&mp_lv_imagebutton_get_src_middle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_right), MP_ROM_PTR(&mp_lv_imagebutton_get_src_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_STATE), MP_ROM_PTR(&mp_lv_LV_IMAGEBUTTON_STATE_type_base) } -}; - -static MP_DEFINE_CONST_DICT(imagebutton_locals_dict, imagebutton_locals_dict_table); - -static void imagebutton_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl imagebutton"); -} - -static mp_obj_t imagebutton_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_calendar_get_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_imagebutton_create_mpobj, type, n_args, n_kw, args); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_calendar_date_t * _res = ((lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_calendar_date_t((void*)_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_imagebutton_type_base, - MP_QSTR_imagebutton, - MP_TYPE_FLAG_NONE, - print, imagebutton_print, - make_new, imagebutton_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &imagebutton_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_imagebutton_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_imagebutton_class, -#endif - .mp_obj_type = &mp_lv_imagebutton_type_base, -}; - -/* Reusing lv_obj_set_parent for lv_keyboard_set_textarea */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_textarea_mpobj, 2, mp_lv_obj_set_parent, lv_keyboard_set_textarea); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_mpobj, 1, mp_lv_calendar_get_highlighted_dates, lv_calendar_get_highlighted_dates); /* * lvgl extension definition for: - * void lv_keyboard_set_mode(lv_obj_t *kb, lv_keyboard_mode_t mode) + * size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_keyboard_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_get_highlighted_dates_num(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *kb = mp_to_lv(mp_args[0]); - lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_keyboard_mode_t))lv_func_ptr)(kb, mode); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + size_t _res = ((size_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_mode_mpobj, 2, mp_lv_keyboard_set_mode, lv_keyboard_set_mode); - -/* Reusing lv_obj_set_radio_button for lv_keyboard_set_popovers */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_popovers_mpobj, 2, mp_lv_obj_set_radio_button, lv_keyboard_set_popovers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_num_mpobj, 1, mp_lv_calendar_get_highlighted_dates_num, lv_calendar_get_highlighted_dates_num); /* * lvgl extension definition for: - * void lv_keyboard_set_map(lv_obj_t *kb, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[]) + * lv_result_t lv_calendar_get_pressed_date(const lv_obj_t *obj, lv_calendar_date_t *date) */ -static mp_obj_t mp_lv_keyboard_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_get_pressed_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *kb = mp_to_lv(mp_args[0]); - lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[2]); - const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[3]); - ((void (*)(lv_obj_t *, lv_keyboard_mode_t, const char * const [], const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(kb, mode, map, ctrl_map); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_map_mpobj, 4, mp_lv_keyboard_set_map, lv_keyboard_set_map); - -/* Reusing lv_obj_get_screen for lv_keyboard_get_textarea */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_textarea_mpobj, 1, mp_lv_obj_get_screen, lv_keyboard_get_textarea); - - -/* - * lvgl extension definition for: - * lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *kb) - */ - -static mp_obj_t mp_lv_keyboard_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *kb = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_keyboard_mode_t _res = ((lv_keyboard_mode_t (*)(const lv_obj_t *))lv_func_ptr)(kb); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_calendar_date_t *date = mp_write_ptr_lv_calendar_date_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, lv_calendar_date_t *))lv_func_ptr)(obj, date); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_mode_mpobj, 1, mp_lv_keyboard_get_mode, lv_keyboard_get_mode); - -/* Reusing lv_obj_is_layout_positioned for lv_keyboard_get_popovers */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_popovers_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_keyboard_get_popovers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_pressed_date_mpobj, 2, mp_lv_calendar_get_pressed_date, lv_calendar_get_pressed_date); -/* Reusing lv_obj_get_child_count for lv_keyboard_get_selected_button */ +/* Reusing lv_obj_create for lv_calendar_add_header_arrow */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_keyboard_get_selected_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_arrow_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_arrow); -/* Reusing lv_buttonmatrix_get_button_text for lv_keyboard_get_button_text */ +/* Reusing lv_obj_create for lv_calendar_add_header_dropdown */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_keyboard_get_button_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_dropdown_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_dropdown); -/* Reusing funcptr_event_cb for lv_keyboard_def_event_cb */ +/* Reusing lv_arclabel_set_text for lv_calendar_header_dropdown_set_year_list */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_keyboard_def_event_cb_mpobj, 1, mp_funcptr_event_cb, lv_keyboard_def_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_header_dropdown_set_year_list_mpobj, 2, mp_lv_arclabel_set_text, lv_calendar_header_dropdown_set_year_list); -/* Reusing lv_obj_create for lv_keyboard_create */ +/* Reusing lv_obj_create for lv_calendar_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_create_mpobj, 1, mp_lv_obj_create, lv_keyboard_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_create_mpobj, 1, mp_lv_obj_create, lv_calendar_create); /* - * lvgl keyboard object definitions + * lvgl calendar object definitions */ -static const mp_rom_map_elem_t keyboard_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_textarea), MP_ROM_PTR(&mp_lv_keyboard_set_textarea_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_keyboard_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_popovers), MP_ROM_PTR(&mp_lv_keyboard_set_popovers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_keyboard_set_map_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_textarea), MP_ROM_PTR(&mp_lv_keyboard_get_textarea_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_keyboard_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_popovers), MP_ROM_PTR(&mp_lv_keyboard_get_popovers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_keyboard_get_selected_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_keyboard_get_button_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_def_event_cb), MP_ROM_PTR(&mp_lv_keyboard_def_event_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_KEYBOARD_MODE_type_base) } +static const mp_rom_map_elem_t calendar_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_today_date), MP_ROM_PTR(&mp_lv_calendar_set_today_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_today_year), MP_ROM_PTR(&mp_lv_calendar_set_today_year_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_today_month), MP_ROM_PTR(&mp_lv_calendar_set_today_month_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_today_day), MP_ROM_PTR(&mp_lv_calendar_set_today_day_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_month_shown), MP_ROM_PTR(&mp_lv_calendar_set_month_shown_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shown_year), MP_ROM_PTR(&mp_lv_calendar_set_shown_year_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shown_month), MP_ROM_PTR(&mp_lv_calendar_set_shown_month_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_set_highlighted_dates_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_day_names), MP_ROM_PTR(&mp_lv_calendar_set_day_names_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_btnmatrix), MP_ROM_PTR(&mp_lv_calendar_get_btnmatrix_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_today_date), MP_ROM_PTR(&mp_lv_calendar_get_today_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_showed_date), MP_ROM_PTR(&mp_lv_calendar_get_showed_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates_num), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_num_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pressed_date), MP_ROM_PTR(&mp_lv_calendar_get_pressed_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_header_arrow), MP_ROM_PTR(&mp_lv_calendar_add_header_arrow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_header_dropdown), MP_ROM_PTR(&mp_lv_calendar_add_header_dropdown_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_dropdown_set_year_list), MP_ROM_PTR(&mp_lv_calendar_header_dropdown_set_year_list_mpobj) } }; -static MP_DEFINE_CONST_DICT(keyboard_locals_dict, keyboard_locals_dict_table); +static MP_DEFINE_CONST_DICT(calendar_locals_dict, calendar_locals_dict_table); -static void keyboard_print(const mp_print_t *print, +static void calendar_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl keyboard"); + mp_printf(print, "lvgl calendar"); } -static mp_obj_t keyboard_make_new( +static mp_obj_t calendar_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_keyboard_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_calendar_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_keyboard_type_base, - MP_QSTR_keyboard, + mp_lv_calendar_type_base, + MP_QSTR_calendar, MP_TYPE_FLAG_NONE, - print, keyboard_print, - make_new, keyboard_make_new, + print, calendar_print, + make_new, calendar_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &keyboard_locals_dict + locals_dict, &calendar_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_keyboard_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_calendar_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_keyboard_class, + .lv_obj_class = &lv_calendar_class, #endif - .mp_obj_type = &mp_lv_keyboard_type_base, + .mp_obj_type = &mp_lv_calendar_type_base, }; /* * lvgl extension definition for: - * void lv_led_set_color(lv_obj_t *led, lv_color_t color) + * void lv_chart_set_type(lv_obj_t *obj, lv_chart_type_t type) */ -static mp_obj_t mp_lv_led_set_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *led = mp_to_lv(mp_args[0]); - lv_color_t color = mp_write_lv_color_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_color_t))lv_func_ptr)(led, color); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_type_t type = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_type_t))lv_func_ptr)(obj, type); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_color_mpobj, 2, mp_lv_led_set_color, lv_led_set_color); - -/* Reusing lv_obj_set_flex_grow for lv_led_set_brightness */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_brightness_mpobj, 2, mp_lv_obj_set_flex_grow, lv_led_set_brightness); - -/* Reusing lv_obj_move_foreground for lv_led_on */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_on_mpobj, 1, mp_lv_obj_move_foreground, lv_led_on); - -/* Reusing lv_obj_move_foreground for lv_led_off */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_off_mpobj, 1, mp_lv_obj_move_foreground, lv_led_off); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_type_mpobj, 2, mp_lv_chart_set_type, lv_chart_set_type); -/* Reusing lv_obj_move_foreground for lv_led_toggle */ +/* Reusing lv_obj_delete_delayed for lv_chart_set_point_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_toggle_mpobj, 1, mp_lv_obj_move_foreground, lv_led_toggle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_point_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_point_count); /* * lvgl extension definition for: - * uint8_t lv_led_get_brightness(const lv_obj_t *obj) + * void lv_chart_set_axis_range(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min, int32_t max) */ -static mp_obj_t mp_lv_led_get_brightness(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_axis_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint8_t _res = ((uint8_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t, int32_t))lv_func_ptr)(obj, axis, min, max); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_brightness_mpobj, 1, mp_lv_led_get_brightness, lv_led_get_brightness); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_range_mpobj, 4, mp_lv_chart_set_axis_range, lv_chart_set_axis_range); /* * lvgl extension definition for: - * lv_color_t lv_led_get_color(const lv_obj_t *obj) + * void lv_chart_set_axis_min_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min) */ -static mp_obj_t mp_lv_led_get_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_axis_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_lv_color_t(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_func_ptr)(obj, axis, min); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_color_mpobj, 1, mp_lv_led_get_color, lv_led_get_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_min_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_min_value); -/* Reusing lv_obj_create for lv_led_create */ +/* Reusing lv_chart_set_axis_min_value for lv_chart_set_axis_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_create_mpobj, 1, mp_lv_obj_create, lv_led_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_max_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_max_value); /* - * lvgl led object definitions + * lvgl extension definition for: + * void lv_chart_set_update_mode(lv_obj_t *obj, lv_chart_update_mode_t update_mode) */ - - -static const mp_rom_map_elem_t led_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_color), MP_ROM_PTR(&mp_lv_led_set_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_brightness), MP_ROM_PTR(&mp_lv_led_set_brightness_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_on), MP_ROM_PTR(&mp_lv_led_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_off), MP_ROM_PTR(&mp_lv_led_off_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_toggle), MP_ROM_PTR(&mp_lv_led_toggle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_brightness), MP_ROM_PTR(&mp_lv_led_get_brightness_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_color), MP_ROM_PTR(&mp_lv_led_get_color_mpobj) } -}; - -static MP_DEFINE_CONST_DICT(led_locals_dict, led_locals_dict_table); - -static void led_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl led"); -} - -static mp_obj_t led_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_chart_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_led_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_update_mode_t update_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_update_mode_t))lv_func_ptr)(obj, update_mode); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_led_type_base, - MP_QSTR_led, - MP_TYPE_FLAG_NONE, - print, led_print, - make_new, led_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &led_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_led_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_led_class, -#endif - .mp_obj_type = &mp_lv_led_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_update_mode_mpobj, 2, mp_lv_chart_set_update_mode, lv_chart_set_update_mode); +/* Reusing lv_obj_fade_in for lv_chart_set_div_line_count */ -/* - * Array convertors for lv_point_precise_t [] - */ - -GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_div_line_count_mpobj, 3, mp_lv_obj_fade_in, lv_chart_set_div_line_count); - lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_precise_t(item); - } - return (lv_point_precise_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t_____(const lv_point_precise_t *arr) -{ - return mp_read_ptr_lv_point_precise_t((void*)arr); -} - - -/* - * lvgl extension definition for: - * void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num) - */ - -static mp_obj_t mp_lv_line_set_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_precise_t *points = (const lv_point_precise_t *)mp_arr_to_lv_point_precise_t_____(mp_args[1]); - uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); - return mp_const_none; -} +/* Reusing lv_obj_delete_delayed for lv_chart_set_hor_div_line_count */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_hor_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_hor_div_line_count); + +/* Reusing lv_obj_delete_delayed for lv_chart_set_ver_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mpobj, 3, mp_lv_line_set_points, lv_line_set_points); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_ver_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_ver_div_line_count); /* * lvgl extension definition for: - * void lv_line_set_points_mutable(lv_obj_t *obj, lv_point_precise_t points[], uint32_t point_num) + * lv_chart_type_t lv_chart_get_type(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_line_set_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_precise_t *points = mp_arr_to_lv_point_precise_t_____(mp_args[1]); - uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_chart_type_t _res = ((lv_chart_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mutable_mpobj, 3, mp_lv_line_set_points_mutable, lv_line_set_points_mutable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_type_mpobj, 1, mp_lv_chart_get_type, lv_chart_get_type); -/* Reusing lv_obj_set_radio_button for lv_line_set_y_invert */ +/* Reusing lv_obj_get_child_count for lv_chart_get_point_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_y_invert_mpobj, 2, mp_lv_obj_set_radio_button, lv_line_set_y_invert); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_point_count); /* * lvgl extension definition for: - * const lv_point_precise_t *lv_line_get_points(lv_obj_t *obj) + * lv_chart_update_mode_t lv_chart_get_update_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_line_get_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_precise_t * _res = ((const lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_point_precise_t((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_chart_update_mode_t _res = ((lv_chart_update_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mpobj, 1, mp_lv_line_get_points, lv_line_get_points); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_update_mode_mpobj, 1, mp_lv_chart_get_update_mode, lv_chart_get_update_mode); -/* Reusing lv_obj_get_event_count for lv_line_get_point_count */ +/* Reusing lv_obj_get_child_count for lv_chart_get_hor_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_point_count_mpobj, 1, mp_lv_obj_get_event_count, lv_line_get_point_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_hor_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_hor_div_line_count); -/* Reusing lv_obj_refr_size for lv_line_is_point_array_mutable */ +/* Reusing lv_obj_get_child_count for lv_chart_get_ver_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_is_point_array_mutable_mpobj, 1, mp_lv_obj_refr_size, lv_line_is_point_array_mutable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_ver_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_ver_div_line_count); /* - * lvgl extension definition for: - * lv_point_precise_t *lv_line_get_points_mutable(lv_obj_t *obj) + * Struct lv_chart_series_t */ -static mp_obj_t mp_lv_line_get_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_series_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_precise_t * _res = ((lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_point_precise_t((void*)_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_series_t_type())); + return (lv_chart_series_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mutable_mpobj, 1, mp_lv_line_get_points_mutable, lv_line_get_points_mutable); - -/* Reusing lv_obj_is_layout_positioned for lv_line_get_y_invert */ +#define mp_write_lv_chart_series_t(struct_obj) *((lv_chart_series_t*)mp_write_ptr_lv_chart_series_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_y_invert_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_line_get_y_invert); - -/* Reusing lv_obj_create for lv_line_create */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_series_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_chart_series_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_create_mpobj, 1, mp_lv_obj_create, lv_line_create); - +#define mp_read_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(copy_buffer(&field, sizeof(lv_chart_series_t))) +#define mp_read_byref_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(&field) -/* - * lvgl line object definitions - */ - +static void mp_lv_chart_series_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_chart_series_t *data = (lv_chart_series_t*)self->data; -static const mp_rom_map_elem_t line_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_points), MP_ROM_PTR(&mp_lv_line_set_points_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_points_mutable), MP_ROM_PTR(&mp_lv_line_set_points_mutable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_y_invert), MP_ROM_PTR(&mp_lv_line_set_y_invert_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_points), MP_ROM_PTR(&mp_lv_line_get_points_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_line_get_point_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_point_array_mutable), MP_ROM_PTR(&mp_lv_line_is_point_array_mutable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_points_mutable), MP_ROM_PTR(&mp_lv_line_get_points_mutable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y_invert), MP_ROM_PTR(&mp_lv_line_get_y_invert_mpobj) } -}; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_x_points: dest[0] = mp_array_from_i32ptr((void*)data->x_points); break; // converting from int32_t *; + case MP_QSTR_y_points: dest[0] = mp_array_from_i32ptr((void*)data->y_points); break; // converting from int32_t *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_start_point: dest[0] = mp_obj_new_int_from_uint(data->start_point); break; // converting from uint32_t; + case MP_QSTR_hidden: dest[0] = mp_obj_new_int_from_uint(data->hidden); break; // converting from uint32_t; + case MP_QSTR_x_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->x_ext_buf_assigned); break; // converting from uint32_t; + case MP_QSTR_y_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->y_ext_buf_assigned); break; // converting from uint32_t; + case MP_QSTR_x_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->x_axis_sec); break; // converting from uint32_t; + case MP_QSTR_y_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->y_axis_sec); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_x_points: data->x_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; + case MP_QSTR_y_points: data->y_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_start_point: data->start_point = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_hidden: data->hidden = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_x_ext_buf_assigned: data->x_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_y_ext_buf_assigned: data->y_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_x_axis_sec: data->x_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_y_axis_sec: data->y_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } -static MP_DEFINE_CONST_DICT(line_locals_dict, line_locals_dict_table); + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static void line_print(const mp_print_t *print, +static void mp_lv_chart_series_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl line"); -} - - -static mp_obj_t line_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_line_create_mpobj, type, n_args, n_kw, args); + mp_printf(print, "struct lv_chart_series_t"); } +static const mp_obj_dict_t mp_lv_chart_series_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_line_type_base, - MP_QSTR_line, + mp_lv_chart_series_t_type, + MP_QSTR_lv_chart_series_t, MP_TYPE_FLAG_NONE, - print, line_print, - make_new, line_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &line_locals_dict + print, mp_lv_chart_series_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_chart_series_t_attr, + locals_dict, &mp_lv_chart_series_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_line_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_line_class, -#endif - .mp_obj_type = &mp_lv_line_type_base, -}; +static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void) +{ + return &mp_lv_chart_series_t_type; +} /* * lvgl extension definition for: - * lv_obj_t *lv_list_add_text(lv_obj_t *list, const char *txt) + * uint32_t lv_chart_get_x_start_point(const lv_obj_t *obj, lv_chart_series_t *ser) */ -static mp_obj_t mp_lv_list_add_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *list = mp_to_lv(mp_args[0]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_func_ptr)(list, txt); - return lv_to_mp((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_text_mpobj, 2, mp_lv_list_add_text, lv_list_add_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_x_start_point_mpobj, 2, mp_lv_chart_get_x_start_point, lv_chart_get_x_start_point); /* * lvgl extension definition for: - * lv_obj_t *lv_list_add_button(lv_obj_t *list, const void *icon, const char *txt) + * void lv_chart_get_point_pos_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, lv_point_t *p_out) */ -static mp_obj_t mp_lv_list_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_point_pos_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *list = mp_to_lv(mp_args[0]); - const void *icon = (const void *)mp_to_ptr(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, const char *))lv_func_ptr)(list, icon, txt); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_point_t *p_out = mp_write_ptr_lv_point_t(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, ser, id, p_out); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_button_mpobj, 3, mp_lv_list_add_button, lv_list_add_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_pos_by_id_mpobj, 4, mp_lv_chart_get_point_pos_by_id, lv_chart_get_point_pos_by_id); + +/* Reusing lv_obj_move_foreground for lv_chart_refresh */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_chart_refresh); /* * lvgl extension definition for: - * const char *lv_list_get_button_text(lv_obj_t *list, lv_obj_t *btn) + * lv_chart_series_t *lv_chart_add_series(lv_obj_t *obj, lv_color_t color, lv_chart_axis_t axis) */ -static mp_obj_t mp_lv_list_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_add_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *list = mp_to_lv(mp_args[0]); - lv_obj_t *btn = mp_to_lv(mp_args[1]); - const char * _res = ((const char *(*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(list, btn); - return convert_to_str((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_t color = mp_write_lv_color_t(mp_args[1]); + lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[2]); + lv_chart_series_t * _res = ((lv_chart_series_t *(*)(lv_obj_t *, lv_color_t, lv_chart_axis_t))lv_func_ptr)(obj, color, axis); + return mp_read_ptr_lv_chart_series_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_get_button_text_mpobj, 2, mp_lv_list_get_button_text, lv_list_get_button_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_series_mpobj, 3, mp_lv_chart_add_series, lv_chart_add_series); /* * lvgl extension definition for: - * void lv_list_set_button_text(lv_obj_t *list, lv_obj_t *btn, const char *txt) + * void lv_chart_remove_series(lv_obj_t *obj, lv_chart_series_t *series) */ -static mp_obj_t mp_lv_list_set_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_remove_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *list = mp_to_lv(mp_args[0]); - lv_obj_t *btn = mp_to_lv(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, const char *))lv_func_ptr)(list, btn, txt); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, series); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_set_button_text_mpobj, 3, mp_lv_list_set_button_text, lv_list_set_button_text); - -/* Reusing lv_obj_create for lv_list_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_create_mpobj, 1, mp_lv_obj_create, lv_list_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_series_mpobj, 2, mp_lv_chart_remove_series, lv_chart_remove_series); /* - * lvgl list object definitions + * lvgl extension definition for: + * void lv_chart_hide_series(lv_obj_t *chart, lv_chart_series_t *series, bool hide) */ - - -static const mp_rom_map_elem_t list_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_list_add_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_list_add_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_list_get_button_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_text), MP_ROM_PTR(&mp_lv_list_set_button_text_mpobj) } -}; -static MP_DEFINE_CONST_DICT(list_locals_dict, list_locals_dict_table); - -static void list_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_chart_hide_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "lvgl list"); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); + bool hide = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, bool))lv_func_ptr)(chart, series, hide); + return mp_const_none; } + -static mp_obj_t list_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_hide_series_mpobj, 3, mp_lv_chart_hide_series, lv_chart_hide_series); + + +/* + * lvgl extension definition for: + * void lv_chart_set_series_color(lv_obj_t *chart, lv_chart_series_t *series, lv_color_t color) + */ + +static mp_obj_t mp_lv_chart_set_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_list_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); + lv_color_t color = mp_write_lv_color_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, lv_color_t))lv_func_ptr)(chart, series, color); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_list_type_base, - MP_QSTR_list, - MP_TYPE_FLAG_NONE, - print, list_print, - make_new, list_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &list_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_list_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_list_class, -#endif - .mp_obj_type = &mp_lv_list_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_color_mpobj, 3, mp_lv_chart_set_series_color, lv_chart_set_series_color); -/* Reusing lv_obj_set_parent for lv_menu_set_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_page); +/* + * lvgl extension definition for: + * lv_color_t lv_chart_get_series_color(lv_obj_t *chart, const lv_chart_series_t *series) + */ + +static mp_obj_t mp_lv_chart_get_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *chart = mp_to_lv(mp_args[0]); + const lv_chart_series_t *series = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); + lv_color_t _res = ((lv_color_t (*)(lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(chart, series); + return mp_read_lv_color_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_color_mpobj, 2, mp_lv_chart_get_series_color, lv_chart_get_series_color); /* * lvgl extension definition for: - * void lv_menu_set_page_title(lv_obj_t *page, const char * const title) + * void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id) */ -static mp_obj_t mp_lv_menu_set_page_title(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *page = mp_to_lv(mp_args[0]); - const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_obj_t *, const char * const))lv_func_ptr)(page, title); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(obj, ser, id); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_x_start_point_mpobj, 3, mp_lv_chart_set_x_start_point, lv_chart_set_x_start_point); -/* Reusing lv_menu_set_page_title for lv_menu_set_page_title_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_static_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title_static); +/* + * lvgl extension definition for: + * lv_chart_series_t *lv_chart_get_series_next(const lv_obj_t *obj, const lv_chart_series_t *ser) + */ + +static mp_obj_t mp_lv_chart_get_series_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_chart_series_t *ser = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); + lv_chart_series_t * _res = ((lv_chart_series_t *(*)(const lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(obj, ser); + return mp_read_ptr_lv_chart_series_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_next_mpobj, 2, mp_lv_chart_get_series_next, lv_chart_get_series_next); -/* Reusing lv_obj_set_parent for lv_menu_set_sidebar_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_sidebar_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_sidebar_page); +/* + * Struct lv_chart_cursor_t + */ + +static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_cursor_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_cursor_t_type())); + return (lv_chart_cursor_t*)self->data; +} + +#define mp_write_lv_chart_cursor_t(struct_obj) *((lv_chart_cursor_t*)mp_write_ptr_lv_chart_cursor_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_cursor_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_chart_cursor_t_type(), field); +} + +#define mp_read_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(copy_buffer(&field, sizeof(lv_chart_cursor_t))) +#define mp_read_byref_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(&field) + +static void mp_lv_chart_cursor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_chart_cursor_t *data = (lv_chart_cursor_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_pos: dest[0] = mp_read_byref_lv_point_t(data->pos); break; // converting from lv_point_t; + case MP_QSTR_point_id: dest[0] = mp_obj_new_int(data->point_id); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_ser: dest[0] = mp_read_ptr_lv_chart_series_t((void*)data->ser); break; // converting from lv_chart_series_t *; + case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_dir_t; + case MP_QSTR_pos_set: dest[0] = mp_obj_new_int_from_uint(data->pos_set); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_pos: data->pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_point_id: data->point_id = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_ser: data->ser = (void*)mp_write_ptr_lv_chart_series_t(dest[1]); break; // converting to lv_chart_series_t *; + case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; + case MP_QSTR_pos_set: data->pos_set = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_chart_cursor_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_chart_cursor_t"); +} + +static const mp_obj_dict_t mp_lv_chart_cursor_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_chart_cursor_t_type, + MP_QSTR_lv_chart_cursor_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_chart_cursor_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_chart_cursor_t_attr, + locals_dict, &mp_lv_chart_cursor_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void) +{ + return &mp_lv_chart_cursor_t_type; +} /* * lvgl extension definition for: - * void lv_menu_set_mode_header(lv_obj_t *obj, lv_menu_mode_header_t mode) + * lv_chart_cursor_t *lv_chart_add_cursor(lv_obj_t *obj, lv_color_t color, lv_dir_t dir) */ -static mp_obj_t mp_lv_menu_set_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_add_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_header_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_menu_mode_header_t))lv_func_ptr)(obj, mode); - return mp_const_none; + lv_color_t color = mp_write_lv_color_t(mp_args[1]); + lv_dir_t dir = (int)mp_obj_get_int(mp_args[2]); + lv_chart_cursor_t * _res = ((lv_chart_cursor_t *(*)(lv_obj_t *, lv_color_t, lv_dir_t))lv_func_ptr)(obj, color, dir); + return mp_read_ptr_lv_chart_cursor_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_header_mpobj, 2, mp_lv_menu_set_mode_header, lv_menu_set_mode_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_cursor_mpobj, 3, mp_lv_chart_add_cursor, lv_chart_add_cursor); /* * lvgl extension definition for: - * void lv_menu_set_mode_root_back_button(lv_obj_t *obj, lv_menu_mode_root_back_button_t mode) + * void lv_chart_remove_cursor(lv_obj_t *obj, lv_chart_cursor_t *cursor) */ -static mp_obj_t mp_lv_menu_set_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_remove_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_root_back_button_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_menu_mode_root_back_button_t))lv_func_ptr)(obj, mode); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(obj, cursor); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_root_back_button_mpobj, 2, mp_lv_menu_set_mode_root_back_button, lv_menu_set_mode_root_back_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_cursor_mpobj, 2, mp_lv_chart_remove_cursor, lv_chart_remove_cursor); /* * lvgl extension definition for: - * void lv_menu_set_load_page_event(lv_obj_t *menu, lv_obj_t *obj, lv_obj_t *page) + * void lv_chart_set_cursor_pos(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_point_t *pos) */ -static mp_obj_t mp_lv_menu_set_load_page_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_cursor_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *menu = mp_to_lv(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - lv_obj_t *page = mp_to_lv(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj, page); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_point_t *))lv_func_ptr)(chart, cursor, pos); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_load_page_event_mpobj, 3, mp_lv_menu_set_load_page_event, lv_menu_set_load_page_event); - -/* Reusing lv_obj_create for lv_menu_get_cur_main_page */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_main_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_main_page); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_mpobj, 3, mp_lv_chart_set_cursor_pos, lv_chart_set_cursor_pos); -/* Reusing lv_obj_create for lv_menu_get_cur_sidebar_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_sidebar_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_sidebar_page); - -/* Reusing lv_obj_create for lv_menu_get_main_header */ +/* + * lvgl extension definition for: + * void lv_chart_set_cursor_pos_x(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t x) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header); - -/* Reusing lv_obj_create for lv_menu_get_main_header_back_button */ +static mp_obj_t mp_lv_chart_set_cursor_pos_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_func_ptr)(chart, cursor, x); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header_back_button); - -/* Reusing lv_obj_create for lv_menu_get_sidebar_header */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_x_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_x); -/* Reusing lv_obj_create for lv_menu_get_sidebar_header_back_button */ +/* Reusing lv_chart_set_cursor_pos_x for lv_chart_set_cursor_pos_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header_back_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_y_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_y); /* * lvgl extension definition for: - * bool lv_menu_back_button_is_root(lv_obj_t *menu, lv_obj_t *obj) + * void lv_chart_set_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_chart_series_t *ser, uint32_t point_id) */ -static mp_obj_t mp_lv_menu_back_button_is_root(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *menu = mp_to_lv(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - bool _res = ((bool (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj); - return convert_to_bool(_res); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[2]); + uint32_t point_id = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(chart, cursor, ser, point_id); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_back_button_is_root_mpobj, 2, mp_lv_menu_back_button_is_root, lv_menu_back_button_is_root); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_point_mpobj, 4, mp_lv_chart_set_cursor_point, lv_chart_set_cursor_point); /* * lvgl extension definition for: - * lv_menu_mode_header_t lv_menu_get_mode_header(lv_obj_t *obj) + * lv_point_t lv_chart_get_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor) */ -static mp_obj_t mp_lv_menu_get_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_header_t _res = ((lv_menu_mode_header_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + lv_point_t _res = ((lv_point_t (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(chart, cursor); + return mp_read_lv_point_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_header_mpobj, 1, mp_lv_menu_get_mode_header, lv_menu_get_mode_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_cursor_point_mpobj, 2, mp_lv_chart_get_cursor_point, lv_chart_get_cursor_point); /* * lvgl extension definition for: - * lv_menu_mode_root_back_button_t lv_menu_get_mode_root_back_button(lv_obj_t *obj) + * void lv_chart_set_all_values(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) */ -static mp_obj_t mp_lv_menu_get_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_all_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_root_back_button_t _res = ((lv_menu_mode_root_back_button_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_func_ptr)(obj, ser, value); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_root_back_button_mpobj, 1, mp_lv_menu_get_mode_root_back_button, lv_menu_get_mode_root_back_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_all_values_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_all_values); -/* Reusing lv_obj_move_foreground for lv_menu_clear_history */ +/* Reusing lv_chart_set_all_values for lv_chart_set_next_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_clear_history_mpobj, 1, mp_lv_obj_move_foreground, lv_menu_clear_history); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_next_value); -/* Reusing lv_obj_create for lv_menu_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_create_mpobj, 1, mp_lv_obj_create, lv_menu_create); +/* + * lvgl extension definition for: + * void lv_chart_set_next_value2(lv_obj_t *obj, lv_chart_series_t *ser, int32_t x_value, int32_t y_value) + */ + +static mp_obj_t mp_lv_chart_set_next_value2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t x_value = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t y_value = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t, int32_t))lv_func_ptr)(obj, ser, x_value, y_value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value2_mpobj, 4, mp_lv_chart_set_next_value2, lv_chart_set_next_value2); /* - * lvgl menu object definitions + * lvgl extension definition for: + * void lv_chart_set_series_values(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t values[], size_t values_cnt) */ - -static const mp_rom_map_elem_t menu_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_page), MP_ROM_PTR(&mp_lv_menu_set_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_page_title), MP_ROM_PTR(&mp_lv_menu_set_page_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_page_title_static), MP_ROM_PTR(&mp_lv_menu_set_page_title_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_sidebar_page), MP_ROM_PTR(&mp_lv_menu_set_sidebar_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode_header), MP_ROM_PTR(&mp_lv_menu_set_mode_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_set_mode_root_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_load_page_event), MP_ROM_PTR(&mp_lv_menu_set_load_page_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cur_main_page), MP_ROM_PTR(&mp_lv_menu_get_cur_main_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cur_sidebar_page), MP_ROM_PTR(&mp_lv_menu_get_cur_sidebar_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_main_header), MP_ROM_PTR(&mp_lv_menu_get_main_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_main_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_main_header_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sidebar_header), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sidebar_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_back_button_is_root), MP_ROM_PTR(&mp_lv_menu_back_button_is_root_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode_header), MP_ROM_PTR(&mp_lv_menu_get_mode_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_get_mode_root_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_history), MP_ROM_PTR(&mp_lv_menu_clear_history_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_HEADER), MP_ROM_PTR(&mp_lv_LV_MENU_HEADER_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ROOT_BACK_BUTTON), MP_ROM_PTR(&mp_lv_LV_MENU_ROOT_BACK_BUTTON_type_base) } -}; +static mp_obj_t mp_lv_chart_set_series_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + const int32_t *values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); + size_t values_cnt = (size_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], size_t))lv_func_ptr)(obj, ser, values, values_cnt); + return mp_const_none; +} -static MP_DEFINE_CONST_DICT(menu_locals_dict, menu_locals_dict_table); + -static void menu_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values_mpobj, 4, mp_lv_chart_set_series_values, lv_chart_set_series_values); + + +/* + * lvgl extension definition for: + * void lv_chart_set_series_values2(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t x_values[], const int32_t y_values[], size_t values_cnt) + */ + +static mp_obj_t mp_lv_chart_set_series_values2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "lvgl menu"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + const int32_t *x_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); + const int32_t *y_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[3]); + size_t values_cnt = (size_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], const int32_t [], size_t))lv_func_ptr)(obj, ser, x_values, y_values, values_cnt); + return mp_const_none; } + -static mp_obj_t menu_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values2_mpobj, 5, mp_lv_chart_set_series_values2, lv_chart_set_series_values2); + + +/* + * lvgl extension definition for: + * void lv_chart_set_series_value_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t value) + */ + +static mp_obj_t mp_lv_chart_set_series_value_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_menu_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t))lv_func_ptr)(obj, ser, id, value); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_type_base, - MP_QSTR_menu, - MP_TYPE_FLAG_NONE, - print, menu_print, - make_new, menu_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &menu_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_class, -#endif - .mp_obj_type = &mp_lv_menu_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id_mpobj, 4, mp_lv_chart_set_series_value_by_id, lv_chart_set_series_value_by_id); /* * lvgl extension definition for: - * lv_obj_t *lv_menu_page_create(lv_obj_t *menu, const char * const title) + * void lv_chart_set_series_value_by_id2(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t x_value, int32_t y_value) */ -static mp_obj_t mp_lv_menu_page_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_series_value_by_id2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *menu = mp_to_lv(mp_args[0]); - const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char * const))lv_func_ptr)(menu, title); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + int32_t x_value = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y_value = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t, int32_t))lv_func_ptr)(obj, ser, id, x_value, y_value); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_page_create_mpobj, 2, mp_lv_menu_page_create, lv_menu_page_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id2_mpobj, 5, mp_lv_chart_set_series_value_by_id2, lv_chart_set_series_value_by_id2); /* - * lvgl menu_page object definitions + * lvgl extension definition for: + * void lv_chart_set_series_ext_y_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) */ + +static mp_obj_t mp_lv_chart_set_series_ext_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t *array = mp_arr_to_int32_t_____(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_func_ptr)(obj, ser, array); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_y_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_y_array); +/* Reusing lv_chart_set_series_ext_y_array for lv_chart_set_series_ext_x_array */ -static const mp_rom_map_elem_t menu_page_locals_dict_table[] = { +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_x_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_x_array); -}; -static MP_DEFINE_CONST_DICT(menu_page_locals_dict, menu_page_locals_dict_table); +/* + * lvgl extension definition for: + * int32_t *lv_chart_get_series_y_array(const lv_obj_t *obj, lv_chart_series_t *ser) + */ -static void menu_page_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_chart_get_series_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "lvgl menu_page"); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t * _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); + return mp_array_from_i32ptr((void*)_res); } + -static mp_obj_t menu_page_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_menu_page_create_mpobj, type, n_args, n_kw, args); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_y_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_y_array); + +/* Reusing lv_chart_get_series_y_array for lv_chart_get_series_x_array */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_x_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_x_array); + +/* Reusing lv_obj_get_child_count for lv_chart_get_pressed_point */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_page_type_base, - MP_QSTR_menu_page, - MP_TYPE_FLAG_NONE, - print, menu_page_print, - make_new, menu_page_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &menu_page_locals_dict -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_pressed_point_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_pressed_point); + +/* Reusing lv_obj_get_style_clamped_width for lv_chart_get_first_point_center_offset */ -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_page_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_page_class, -#endif - .mp_obj_type = &mp_lv_menu_page_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_first_point_center_offset_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_chart_get_first_point_center_offset); -/* Reusing lv_obj_create for lv_menu_cont_create */ +/* Reusing lv_obj_create for lv_chart_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_cont_create_mpobj, 1, mp_lv_obj_create, lv_menu_cont_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_create_mpobj, 1, mp_lv_obj_create, lv_chart_create); /* - * lvgl menu_cont object definitions + * lvgl chart object definitions */ -static const mp_rom_map_elem_t menu_cont_locals_dict_table[] = { - +static const mp_rom_map_elem_t chart_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_type), MP_ROM_PTR(&mp_lv_chart_set_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_point_count), MP_ROM_PTR(&mp_lv_chart_set_point_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_axis_range), MP_ROM_PTR(&mp_lv_chart_set_axis_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_axis_min_value), MP_ROM_PTR(&mp_lv_chart_set_axis_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_axis_max_value), MP_ROM_PTR(&mp_lv_chart_set_axis_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_chart_set_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_hor_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_ver_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_chart_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_chart_get_point_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_chart_get_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_hor_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_ver_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x_start_point), MP_ROM_PTR(&mp_lv_chart_get_x_start_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_point_pos_by_id), MP_ROM_PTR(&mp_lv_chart_get_point_pos_by_id_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_chart_refresh_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_series), MP_ROM_PTR(&mp_lv_chart_add_series_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_series), MP_ROM_PTR(&mp_lv_chart_remove_series_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_hide_series), MP_ROM_PTR(&mp_lv_chart_hide_series_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_color), MP_ROM_PTR(&mp_lv_chart_set_series_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_color), MP_ROM_PTR(&mp_lv_chart_get_series_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_x_start_point), MP_ROM_PTR(&mp_lv_chart_set_x_start_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_next), MP_ROM_PTR(&mp_lv_chart_get_series_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_cursor), MP_ROM_PTR(&mp_lv_chart_add_cursor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_cursor), MP_ROM_PTR(&mp_lv_chart_remove_cursor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_x), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_y), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_point), MP_ROM_PTR(&mp_lv_chart_set_cursor_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cursor_point), MP_ROM_PTR(&mp_lv_chart_get_cursor_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_all_values), MP_ROM_PTR(&mp_lv_chart_set_all_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_next_value), MP_ROM_PTR(&mp_lv_chart_set_next_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_next_value2), MP_ROM_PTR(&mp_lv_chart_set_next_value2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_values), MP_ROM_PTR(&mp_lv_chart_set_series_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_values2), MP_ROM_PTR(&mp_lv_chart_set_series_values2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id2), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_ext_y_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_y_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_ext_x_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_x_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_y_array), MP_ROM_PTR(&mp_lv_chart_get_series_y_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_x_array), MP_ROM_PTR(&mp_lv_chart_get_series_x_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pressed_point), MP_ROM_PTR(&mp_lv_chart_get_pressed_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_first_point_center_offset), MP_ROM_PTR(&mp_lv_chart_get_first_point_center_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_TYPE), MP_ROM_PTR(&mp_lv_LV_CHART_TYPE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_CHART_UPDATE_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_AXIS), MP_ROM_PTR(&mp_lv_LV_CHART_AXIS_type_base) } }; -static MP_DEFINE_CONST_DICT(menu_cont_locals_dict, menu_cont_locals_dict_table); +static MP_DEFINE_CONST_DICT(chart_locals_dict, chart_locals_dict_table); -static void menu_cont_print(const mp_print_t *print, +static void chart_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl menu_cont"); + mp_printf(print, "lvgl chart"); } -static mp_obj_t menu_cont_make_new( +static mp_obj_t chart_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_menu_cont_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_chart_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_cont_type_base, - MP_QSTR_menu_cont, + mp_lv_chart_type_base, + MP_QSTR_chart, MP_TYPE_FLAG_NONE, - print, menu_cont_print, - make_new, menu_cont_make_new, + print, chart_print, + make_new, chart_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &menu_cont_locals_dict + locals_dict, &chart_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_cont_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_chart_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_cont_class, + .lv_obj_class = &lv_chart_class, #endif - .mp_obj_type = &mp_lv_menu_cont_type_base, + .mp_obj_type = &mp_lv_chart_type_base, }; -/* Reusing lv_obj_create for lv_menu_section_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_section_create_mpobj, 1, mp_lv_obj_create, lv_menu_section_create); - +/* Reusing lv_arclabel_set_text for lv_checkbox_set_text */ -/* - * lvgl menu_section object definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text); +/* Reusing lv_arclabel_set_text for lv_checkbox_set_text_static */ -static const mp_rom_map_elem_t menu_section_locals_dict_table[] = { +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text_static); -}; - -static MP_DEFINE_CONST_DICT(menu_section_locals_dict, menu_section_locals_dict_table); - -static void menu_section_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl menu_section"); -} +/* + * lvgl extension definition for: + * const char *lv_checkbox_get_text(const lv_obj_t *obj) + */ -static mp_obj_t menu_section_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_checkbox_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_menu_section_create_mpobj, type, n_args, n_kw, args); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const char * _res = ((const char *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return convert_to_str((void*)_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_section_type_base, - MP_QSTR_menu_section, - MP_TYPE_FLAG_NONE, - print, menu_section_print, - make_new, menu_section_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &menu_section_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_section_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_section_class, -#endif - .mp_obj_type = &mp_lv_menu_section_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_checkbox_get_text); -/* Reusing lv_obj_create for lv_menu_separator_create */ +/* Reusing lv_obj_create for lv_checkbox_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_separator_create_mpobj, 1, mp_lv_obj_create, lv_menu_separator_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_create_mpobj, 1, mp_lv_obj_create, lv_checkbox_create); /* - * lvgl menu_separator object definitions + * lvgl checkbox object definitions */ -static const mp_rom_map_elem_t menu_separator_locals_dict_table[] = { - +static const mp_rom_map_elem_t checkbox_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_checkbox_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_checkbox_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_checkbox_get_text_mpobj) } }; -static MP_DEFINE_CONST_DICT(menu_separator_locals_dict, menu_separator_locals_dict_table); +static MP_DEFINE_CONST_DICT(checkbox_locals_dict, checkbox_locals_dict_table); -static void menu_separator_print(const mp_print_t *print, +static void checkbox_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl menu_separator"); + mp_printf(print, "lvgl checkbox"); } -static mp_obj_t menu_separator_make_new( +static mp_obj_t checkbox_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_menu_separator_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_checkbox_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_separator_type_base, - MP_QSTR_menu_separator, + mp_lv_checkbox_type_base, + MP_QSTR_checkbox, MP_TYPE_FLAG_NONE, - print, menu_separator_print, - make_new, menu_separator_make_new, + print, checkbox_print, + make_new, checkbox_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &menu_separator_locals_dict + locals_dict, &checkbox_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_separator_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_checkbox_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_separator_class, + .lv_obj_class = &lv_checkbox_class, #endif - .mp_obj_type = &mp_lv_menu_separator_type_base, + .mp_obj_type = &mp_lv_checkbox_type_base, }; -/* Reusing lv_list_add_text for lv_msgbox_add_title */ +/* Reusing lv_arclabel_set_text for lv_dropdown_set_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_title_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_title); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text); + +/* Reusing lv_arclabel_set_text for lv_dropdown_set_text_static */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text_static); + +/* Reusing lv_arclabel_set_text for lv_dropdown_set_options */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options); + +/* Reusing lv_arclabel_set_text for lv_dropdown_set_options_static */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options_static); /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_add_header_button(lv_obj_t *obj, const void *icon) + * void lv_dropdown_add_option(lv_obj_t *obj, const char *option, uint32_t pos) */ -static mp_obj_t mp_lv_msgbox_add_header_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_dropdown_add_option(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void *icon = (const void *)mp_to_ptr(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *))lv_func_ptr)(obj, icon); - return lv_to_mp((void*)_res); + const char *option = (const char *)(char*)convert_from_str(mp_args[1]); + uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const char *, uint32_t))lv_func_ptr)(obj, option, pos); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_header_button_mpobj, 2, mp_lv_msgbox_add_header_button, lv_msgbox_add_header_button); - -/* Reusing lv_list_add_text for lv_msgbox_add_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_text_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_text); - -/* Reusing lv_list_add_text for lv_msgbox_add_footer_button */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_footer_button_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_footer_button); - -/* Reusing lv_obj_create for lv_msgbox_add_close_button */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_close_button_mpobj, 1, mp_lv_obj_create, lv_msgbox_add_close_button); - -/* Reusing lv_obj_create for lv_msgbox_get_header */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_header_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_add_option_mpobj, 3, mp_lv_dropdown_add_option, lv_dropdown_add_option); -/* Reusing lv_obj_create for lv_msgbox_get_footer */ +/* Reusing lv_obj_move_foreground for lv_dropdown_clear_options */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_footer_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_footer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_clear_options_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_clear_options); -/* Reusing lv_obj_create for lv_msgbox_get_content */ +/* Reusing lv_obj_delete_delayed for lv_dropdown_set_selected */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_content_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_content); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_mpobj, 2, mp_lv_obj_delete_delayed, lv_dropdown_set_selected); -/* Reusing lv_obj_create for lv_msgbox_get_title */ +/* Reusing lv_obj_set_scroll_dir for lv_dropdown_set_dir */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_title_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_title); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_dropdown_set_dir); -/* Reusing lv_obj_move_foreground for lv_msgbox_close */ +/* Reusing lv_image_set_src for lv_dropdown_set_symbol */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_symbol_mpobj, 2, mp_lv_image_set_src, lv_dropdown_set_symbol); -/* Reusing lv_obj_move_foreground for lv_msgbox_close_async */ +/* Reusing lv_obj_set_hidden for lv_dropdown_set_selected_highlight */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_async_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close_async); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_highlight_mpobj, 2, mp_lv_obj_set_hidden, lv_dropdown_set_selected_highlight); -/* Reusing lv_obj_create for lv_msgbox_create */ +/* Reusing lv_obj_create for lv_dropdown_get_list */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_create_mpobj, 1, mp_lv_obj_create, lv_msgbox_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_list_mpobj, 1, mp_lv_obj_create, lv_dropdown_get_list); /* - * lvgl msgbox object definitions + * lvgl extension definition for: + * const char *lv_dropdown_get_text(lv_obj_t *obj) */ - - -static const mp_rom_map_elem_t msgbox_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_msgbox_add_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_header_button), MP_ROM_PTR(&mp_lv_msgbox_add_header_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_msgbox_add_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_footer_button), MP_ROM_PTR(&mp_lv_msgbox_add_footer_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_close_button), MP_ROM_PTR(&mp_lv_msgbox_add_close_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_msgbox_get_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_footer), MP_ROM_PTR(&mp_lv_msgbox_get_footer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_msgbox_get_content_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_title), MP_ROM_PTR(&mp_lv_msgbox_get_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_msgbox_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close_async), MP_ROM_PTR(&mp_lv_msgbox_close_async_mpobj) } -}; - -static MP_DEFINE_CONST_DICT(msgbox_locals_dict, msgbox_locals_dict_table); -static void msgbox_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl msgbox"); -} - - -static mp_obj_t msgbox_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_dropdown_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_msgbox_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const char * _res = ((const char *(*)(lv_obj_t *))lv_func_ptr)(obj); + return convert_to_str((void*)_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_msgbox_type_base, - MP_QSTR_msgbox, - MP_TYPE_FLAG_NONE, - print, msgbox_print, - make_new, msgbox_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &msgbox_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_msgbox_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_msgbox_class, -#endif - .mp_obj_type = &mp_lv_msgbox_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_text_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_text); +/* Reusing lv_checkbox_get_text for lv_dropdown_get_options */ -/* - * lvgl extension definition for: - * void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode) - */ - -static mp_obj_t mp_lv_roller_set_options(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *options = (const char *)(char*)convert_from_str(mp_args[1]); - lv_roller_mode_t mode = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const char *, lv_roller_mode_t))lv_func_ptr)(obj, options, mode); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_dropdown_get_options); + +/* Reusing lv_obj_get_child_count for lv_dropdown_get_selected */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_selected); + +/* Reusing lv_obj_get_child_count for lv_dropdown_get_option_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_options_mpobj, 3, mp_lv_roller_set_options, lv_roller_set_options); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_option_count); /* * lvgl extension definition for: - * void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim) + * void lv_dropdown_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) */ -static mp_obj_t mp_lv_roller_set_selected(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_dropdown_get_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t sel_opt = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + char *buf = (char*)convert_from_str(mp_args[1]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, char *, uint32_t))lv_func_ptr)(obj, buf, buf_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_mpobj, 3, mp_lv_roller_set_selected, lv_roller_set_selected); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_dropdown_get_selected_str); /* * lvgl extension definition for: - * bool lv_roller_set_selected_str(lv_obj_t *obj, const char *sel_opt, lv_anim_enable_t anim) + * int32_t lv_dropdown_get_option_index(lv_obj_t *obj, const char *option) */ -static mp_obj_t mp_lv_roller_set_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_dropdown_get_option_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *sel_opt = (const char *)(char*)convert_from_str(mp_args[1]); - lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, const char *, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); - return convert_to_bool(_res); + const char *option = (const char *)(char*)convert_from_str(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, option); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_str_mpobj, 3, mp_lv_roller_set_selected_str, lv_roller_set_selected_str); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_index_mpobj, 2, mp_lv_dropdown_get_option_index, lv_dropdown_get_option_index); -/* Reusing lv_obj_delete_delayed for lv_roller_set_visible_row_count */ +/* Reusing lv_dropdown_get_text for lv_dropdown_get_symbol */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_visible_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_roller_set_visible_row_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_symbol_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_symbol); -/* Reusing lv_obj_get_child_count for lv_roller_get_selected */ +/* Reusing lv_obj_refr_size for lv_dropdown_get_selected_highlight */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_selected); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_highlight_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_get_selected_highlight); -/* Reusing lv_dropdown_get_selected_str for lv_roller_get_selected_str */ +/* Reusing lv_obj_get_scroll_dir for lv_dropdown_get_dir */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_roller_get_selected_str); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_dropdown_get_dir); -/* Reusing lv_checkbox_get_text for lv_roller_get_options */ +/* Reusing lv_obj_move_foreground for lv_dropdown_open */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_roller_get_options); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_open_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_open); -/* Reusing lv_obj_get_child_count for lv_roller_get_option_count */ +/* Reusing lv_obj_move_foreground for lv_dropdown_close */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_option_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_close_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_close); +/* Reusing lv_obj_refr_size for lv_dropdown_is_open */ -/* - * lvgl extension definition for: - * lv_result_t lv_roller_get_option_str(const lv_obj_t *obj, uint32_t option, char *buf, uint32_t buf_size) - */ - -static mp_obj_t mp_lv_roller_get_option_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t option = (uint32_t)mp_obj_get_int(mp_args[1]); - char *buf = (char*)convert_from_str(mp_args[2]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, uint32_t, char *, uint32_t))lv_func_ptr)(obj, option, buf, buf_size); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_str_mpobj, 4, mp_lv_roller_get_option_str, lv_roller_get_option_str); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_is_open_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_is_open); -/* Reusing lv_obj_bind_checked for lv_roller_bind_value */ +/* Reusing lv_obj_bind_checked for lv_dropdown_bind_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_roller_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_dropdown_bind_value); -/* Reusing lv_obj_create for lv_roller_create */ +/* Reusing lv_obj_create for lv_dropdown_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_create_mpobj, 1, mp_lv_obj_create, lv_roller_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_create_mpobj, 1, mp_lv_obj_create, lv_dropdown_create); /* - * lvgl roller object definitions + * lvgl dropdown object definitions */ -static const mp_rom_map_elem_t roller_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_roller_set_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_roller_set_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_str), MP_ROM_PTR(&mp_lv_roller_set_selected_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_visible_row_count), MP_ROM_PTR(&mp_lv_roller_set_visible_row_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_roller_get_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_roller_get_selected_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_roller_get_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_roller_get_option_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_str), MP_ROM_PTR(&mp_lv_roller_get_option_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_roller_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ROLLER_MODE_type_base) } +static const mp_rom_map_elem_t dropdown_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_dropdown_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_dropdown_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_dropdown_set_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_options_static), MP_ROM_PTR(&mp_lv_dropdown_set_options_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_option), MP_ROM_PTR(&mp_lv_dropdown_add_option_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_options), MP_ROM_PTR(&mp_lv_dropdown_clear_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_dropdown_set_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_dropdown_set_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_symbol), MP_ROM_PTR(&mp_lv_dropdown_set_symbol_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_set_selected_highlight_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_list), MP_ROM_PTR(&mp_lv_dropdown_get_list_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_dropdown_get_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_dropdown_get_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_dropdown_get_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_dropdown_get_option_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_dropdown_get_selected_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_index), MP_ROM_PTR(&mp_lv_dropdown_get_option_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_symbol), MP_ROM_PTR(&mp_lv_dropdown_get_symbol_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_get_selected_highlight_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_dropdown_get_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_dropdown_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_dropdown_close_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_open), MP_ROM_PTR(&mp_lv_dropdown_is_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_dropdown_bind_value_mpobj) } }; -static MP_DEFINE_CONST_DICT(roller_locals_dict, roller_locals_dict_table); +static MP_DEFINE_CONST_DICT(dropdown_locals_dict, dropdown_locals_dict_table); -static void roller_print(const mp_print_t *print, +static void dropdown_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl roller"); + mp_printf(print, "lvgl dropdown"); } -static mp_obj_t roller_make_new( +static mp_obj_t dropdown_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_roller_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_dropdown_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_roller_type_base, - MP_QSTR_roller, + mp_lv_dropdown_type_base, + MP_QSTR_dropdown, MP_TYPE_FLAG_NONE, - print, roller_print, - make_new, roller_make_new, + print, dropdown_print, + make_new, dropdown_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &roller_locals_dict + locals_dict, &dropdown_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_roller_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_dropdown_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_roller_class, + .lv_obj_class = &lv_dropdown_class, #endif - .mp_obj_type = &mp_lv_roller_type_base, + .mp_obj_type = &mp_lv_dropdown_type_base, }; /* * lvgl extension definition for: - * void lv_scale_set_mode(lv_obj_t *obj, lv_scale_mode_t mode) + * void lv_gif_set_color_format(lv_obj_t *obj, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_scale_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_gif_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scale_mode_t))lv_func_ptr)(obj, mode); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, color_format); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_mode_mpobj, 2, mp_lv_scale_set_mode, lv_scale_set_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_color_format_mpobj, 2, mp_lv_gif_set_color_format, lv_gif_set_color_format); -/* Reusing lv_obj_delete_delayed for lv_scale_set_total_tick_count */ +/* Reusing lv_image_set_src for lv_gif_set_src */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_total_tick_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_total_tick_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_src_mpobj, 2, mp_lv_image_set_src, lv_gif_set_src); -/* Reusing lv_obj_delete_delayed for lv_scale_set_major_tick_every */ +/* Reusing lv_obj_move_foreground for lv_gif_restart */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_major_tick_every_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_major_tick_every); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_restart_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_restart); -/* Reusing lv_obj_set_radio_button for lv_scale_set_label_show */ +/* Reusing lv_obj_move_foreground for lv_gif_pause */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_label_show_mpobj, 2, mp_lv_obj_set_radio_button, lv_scale_set_label_show); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_pause_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_pause); -/* Reusing lv_obj_set_pos for lv_scale_set_range */ +/* Reusing lv_obj_move_foreground for lv_gif_resume */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_scale_set_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_resume_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_resume); -/* Reusing lv_obj_move_to_index for lv_scale_set_min_value */ +/* Reusing lv_obj_refr_size for lv_gif_is_loaded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_is_loaded_mpobj, 1, mp_lv_obj_refr_size, lv_gif_is_loaded); -/* Reusing lv_obj_move_to_index for lv_scale_set_max_value */ +/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_loop_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_loop_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_loop_count); -/* Reusing lv_obj_delete_delayed for lv_scale_set_angle_range */ +/* Reusing lv_obj_move_to_index for lv_gif_set_loop_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_angle_range_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_angle_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_loop_count_mpobj, 2, mp_lv_obj_move_to_index, lv_gif_set_loop_count); -/* Reusing lv_obj_move_to_index for lv_scale_set_rotation */ +/* Reusing lv_obj_set_hidden for lv_gif_set_auto_pause_invisible */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_auto_pause_invisible_mpobj, 2, mp_lv_obj_set_hidden, lv_gif_set_auto_pause_invisible); /* * lvgl extension definition for: - * void lv_scale_set_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, int32_t value) + * bool lv_gif_get_size(const char *src, uint16_t *w, uint16_t *h) */ -static mp_obj_t mp_lv_scale_set_line_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_gif_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_obj_t *needle_line = mp_to_lv(mp_args[1]); - int32_t needle_length = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, needle_line, needle_length, value); - return mp_const_none; + const char *src = (const char *)(char*)convert_from_str(mp_args[0]); + uint16_t *w = mp_array_to_u16ptr(mp_args[1]); + uint16_t *h = mp_array_to_u16ptr(mp_args[2]); + bool _res = ((bool (*)(const char *, uint16_t *, uint16_t *))lv_func_ptr)(src, w, h); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_line_needle_value_mpobj, 4, mp_lv_scale_set_line_needle_value, lv_scale_set_line_needle_value); - - -/* - * lvgl extension definition for: - * void lv_scale_set_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, int32_t value) - */ - -static mp_obj_t mp_lv_scale_set_image_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_obj_t *needle_img = mp_to_lv(mp_args[1]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, needle_img, value); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_image_needle_value_mpobj, 3, mp_lv_scale_set_image_needle_value, lv_scale_set_image_needle_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_gif_get_size_mpobj, 3, mp_lv_gif_get_size, lv_gif_get_size); +/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_frame_count */ -/* - * lvgl extension definition for: - * void lv_scale_set_text_src(lv_obj_t *obj, const char *txt_src[]) - */ - -static mp_obj_t mp_lv_scale_set_text_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char **txt_src = (const char **)mp_arr_to_char_ptr____(mp_args[1]); - ((void (*)(lv_obj_t *, const char *[]))lv_func_ptr)(obj, txt_src); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_text_src_mpobj, 2, mp_lv_scale_set_text_src, lv_scale_set_text_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_frame_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_frame_count); -/* Reusing lv_obj_set_radio_button for lv_scale_set_post_draw */ +/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_current_frame_index */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_post_draw_mpobj, 2, mp_lv_obj_set_radio_button, lv_scale_set_post_draw); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_current_frame_index_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_current_frame_index); -/* Reusing lv_obj_set_radio_button for lv_scale_set_draw_ticks_on_top */ +/* Reusing lv_obj_create for lv_gif_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_draw_ticks_on_top_mpobj, 2, mp_lv_obj_set_radio_button, lv_scale_set_draw_ticks_on_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_create_mpobj, 1, mp_lv_obj_create, lv_gif_create); /* - * Struct lv_scale_section_t + * lvgl gif object definitions */ + -static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_scale_section_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_scale_section_t_type())); - return (lv_scale_section_t*)self->data; -} +static const mp_rom_map_elem_t gif_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_gif_set_color_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_gif_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_restart), MP_ROM_PTR(&mp_lv_gif_restart_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_gif_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_gif_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_loaded), MP_ROM_PTR(&mp_lv_gif_is_loaded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_loop_count), MP_ROM_PTR(&mp_lv_gif_get_loop_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_loop_count), MP_ROM_PTR(&mp_lv_gif_set_loop_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_auto_pause_invisible), MP_ROM_PTR(&mp_lv_gif_set_auto_pause_invisible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_gif_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_frame_count), MP_ROM_PTR(&mp_lv_gif_get_frame_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_frame_index), MP_ROM_PTR(&mp_lv_gif_get_current_frame_index_mpobj) } +}; -#define mp_write_lv_scale_section_t(struct_obj) *((lv_scale_section_t*)mp_write_ptr_lv_scale_section_t(struct_obj)) +static MP_DEFINE_CONST_DICT(gif_locals_dict, gif_locals_dict_table); -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_scale_section_t(void *field) +static void gif_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - return lv_to_mp_struct(get_mp_lv_scale_section_t_type(), field); + mp_printf(print, "lvgl gif"); } -#define mp_read_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(copy_buffer(&field, sizeof(lv_scale_section_t))) -#define mp_read_byref_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(&field) - -static void mp_lv_scale_section_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_scale_section_t *data = (lv_scale_section_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_main_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->main_style); break; // converting from lv_style_t *; - case MP_QSTR_indicator_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->indicator_style); break; // converting from lv_style_t *; - case MP_QSTR_items_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->items_style); break; // converting from lv_style_t *; - case MP_QSTR_range_min: dest[0] = mp_obj_new_int(data->range_min); break; // converting from int32_t; - case MP_QSTR_range_max: dest[0] = mp_obj_new_int(data->range_max); break; // converting from int32_t; - case MP_QSTR_first_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_in_section); break; // converting from uint32_t; - case MP_QSTR_last_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_in_section); break; // converting from uint32_t; - case MP_QSTR_first_tick_in_section_width: dest[0] = mp_obj_new_int(data->first_tick_in_section_width); break; // converting from int32_t; - case MP_QSTR_last_tick_in_section_width: dest[0] = mp_obj_new_int(data->last_tick_in_section_width); break; // converting from int32_t; - case MP_QSTR_first_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->first_tick_in_section); break; // converting from lv_point_t; - case MP_QSTR_last_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->last_tick_in_section); break; // converting from lv_point_t; - case MP_QSTR_first_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_is_major); break; // converting from uint32_t; - case MP_QSTR_last_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_is_major); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_main_style: data->main_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; - case MP_QSTR_indicator_style: data->indicator_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; - case MP_QSTR_items_style: data->items_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; - case MP_QSTR_range_min: data->range_min = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_range_max: data->range_max = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_first_tick_idx_in_section: data->first_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_tick_idx_in_section: data->last_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_first_tick_in_section_width: data->first_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_last_tick_in_section_width: data->last_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_first_tick_in_section: data->first_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_tick_in_section: data->last_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_first_tick_idx_is_major: data->first_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_tick_idx_is_major: data->last_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} -static void mp_lv_scale_section_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t gif_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - mp_printf(print, "struct lv_scale_section_t"); + return make_new(&mp_lv_gif_create_mpobj, type, n_args, n_kw, args); } -static const mp_obj_dict_t mp_lv_scale_section_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_scale_section_t_type, - MP_QSTR_lv_scale_section_t, + mp_lv_gif_type_base, + MP_QSTR_gif, MP_TYPE_FLAG_NONE, - print, mp_lv_scale_section_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_scale_section_t_attr, - locals_dict, &mp_lv_scale_section_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, gif_print, + make_new, gif_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &gif_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void) -{ - return &mp_lv_scale_section_t_type; -} +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_gif_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_gif_class, +#endif + .mp_obj_type = &mp_lv_gif_type_base, +}; /* * lvgl extension definition for: - * lv_scale_section_t *lv_scale_add_section(lv_obj_t *obj) + * void lv_imagebutton_set_src(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left, const void *src_mid, const void *src_right) */ -static mp_obj_t mp_lv_scale_add_section(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_section_t * _res = ((lv_scale_section_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_scale_section_t((void*)_res); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + const void *src_left = (const void *)mp_to_ptr(mp_args[2]); + const void *src_mid = (const void *)mp_to_ptr(mp_args[3]); + const void *src_right = (const void *)mp_to_ptr(mp_args[4]); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *, const void *, const void *))lv_func_ptr)(obj, state, src_left, src_mid, src_right); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_add_section_mpobj, 1, mp_lv_scale_add_section, lv_scale_add_section); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mpobj, 5, mp_lv_imagebutton_set_src, lv_imagebutton_set_src); /* * lvgl extension definition for: - * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) + * void lv_imagebutton_set_src_left(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left) */ -static mp_obj_t mp_lv_scale_section_set_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_set_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t max = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(section, min, max); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + const void *src_left = (const void *)mp_to_ptr(mp_args[2]); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_func_ptr)(obj, state, src_left); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_range_mpobj, 3, mp_lv_scale_section_set_range, lv_scale_section_set_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_left_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_left); + +/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_right_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_right); + +/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_mid */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mid_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_mid); /* * lvgl extension definition for: - * void lv_scale_set_section_range(lv_obj_t *scale, lv_scale_section_t *section, int32_t min, int32_t max) + * void lv_imagebutton_set_state(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static mp_obj_t mp_lv_scale_set_section_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_set_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *scale = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(scale, section, min, max); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_range_mpobj, 4, mp_lv_scale_set_section_range, lv_scale_set_section_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_state_mpobj, 2, mp_lv_imagebutton_set_state, lv_imagebutton_set_state); /* * lvgl extension definition for: - * void lv_scale_set_section_min_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t min) + * const void *lv_imagebutton_get_src_left(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static mp_obj_t mp_lv_scale_set_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_get_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *scale = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_func_ptr)(scale, section, min); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + const void * _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_min_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_left_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_left); -/* Reusing lv_scale_set_section_min_value for lv_scale_set_section_max_value */ +/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_middle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_max_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_middle_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_middle); + +/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_right_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_right); + +/* Reusing lv_obj_create for lv_imagebutton_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_create_mpobj, 1, mp_lv_obj_create, lv_imagebutton_create); /* - * lvgl extension definition for: - * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) + * lvgl imagebutton object definitions */ + -static mp_obj_t mp_lv_scale_section_set_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_t *section_part_style = mp_write_ptr_lv_style_t(mp_args[2]); - ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_func_ptr)(section, part, section_part_style); - return mp_const_none; -} +static const mp_rom_map_elem_t imagebutton_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_left), MP_ROM_PTR(&mp_lv_imagebutton_set_src_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_right), MP_ROM_PTR(&mp_lv_imagebutton_set_src_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_mid), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state), MP_ROM_PTR(&mp_lv_imagebutton_set_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_left), MP_ROM_PTR(&mp_lv_imagebutton_get_src_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_middle), MP_ROM_PTR(&mp_lv_imagebutton_get_src_middle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_right), MP_ROM_PTR(&mp_lv_imagebutton_get_src_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_STATE), MP_ROM_PTR(&mp_lv_LV_IMAGEBUTTON_STATE_type_base) } +}; - +static MP_DEFINE_CONST_DICT(imagebutton_locals_dict, imagebutton_locals_dict_table); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_style_mpobj, 3, mp_lv_scale_section_set_style, lv_scale_section_set_style); - +static void imagebutton_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl imagebutton"); +} -/* - * lvgl extension definition for: - * void lv_scale_set_section_style_main(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) - */ -static mp_obj_t mp_lv_scale_set_section_style_main(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t imagebutton_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - lv_obj_t *scale = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_func_ptr)(scale, section, style); - return mp_const_none; + return make_new(&mp_lv_imagebutton_create_mpobj, type, n_args, n_kw, args); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_main_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_main); - -/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_indicator */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_imagebutton_type_base, + MP_QSTR_imagebutton, + MP_TYPE_FLAG_NONE, + print, imagebutton_print, + make_new, imagebutton_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &imagebutton_locals_dict +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_indicator_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_indicator); +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_imagebutton_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_imagebutton_class, +#endif + .mp_obj_type = &mp_lv_imagebutton_type_base, +}; -/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_items */ +/* Reusing lv_obj_set_parent for lv_keyboard_set_textarea */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_items_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_items); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_textarea_mpobj, 2, mp_lv_obj_set_parent, lv_keyboard_set_textarea); /* * lvgl extension definition for: - * lv_scale_mode_t lv_scale_get_mode(lv_obj_t *obj) + * void lv_keyboard_set_mode(lv_obj_t *obj, lv_keyboard_mode_t mode) */ -static mp_obj_t mp_lv_scale_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_keyboard_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_mode_t _res = ((lv_scale_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_keyboard_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_mode_mpobj, 1, mp_lv_scale_get_mode, lv_scale_get_mode); - -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_total_tick_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_total_tick_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_total_tick_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_mode_mpobj, 2, mp_lv_keyboard_set_mode, lv_keyboard_set_mode); -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_major_tick_every */ +/* Reusing lv_obj_set_hidden for lv_keyboard_set_popovers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_major_tick_every_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_major_tick_every); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_popovers_mpobj, 2, mp_lv_obj_set_hidden, lv_keyboard_set_popovers); -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_rotation); - -/* Reusing lv_obj_refr_size for lv_scale_get_label_show */ +/* + * lvgl extension definition for: + * void lv_keyboard_set_map(lv_obj_t *obj, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[]) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_label_show_mpobj, 1, mp_lv_obj_refr_size, lv_scale_get_label_show); - -/* Reusing lv_obj_get_event_count for lv_scale_get_angle_range */ +static mp_obj_t mp_lv_keyboard_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[2]); + const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[3]); + ((void (*)(lv_obj_t *, lv_keyboard_mode_t, const char * const [], const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(obj, mode, map, ctrl_map); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_angle_range_mpobj, 1, mp_lv_obj_get_event_count, lv_scale_get_angle_range); - -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_min_value */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_map_mpobj, 4, mp_lv_keyboard_set_map, lv_keyboard_set_map); -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_max_value */ +/* Reusing lv_obj_get_screen for lv_keyboard_get_textarea */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_textarea_mpobj, 1, mp_lv_obj_get_screen, lv_keyboard_get_textarea); /* * lvgl extension definition for: - * lv_observer_t *lv_scale_bind_section_min_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) + * lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_scale_bind_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_keyboard_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); - lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_func_ptr)(obj, section, subject); - return mp_read_ptr_lv_observer_t((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_keyboard_mode_t _res = ((lv_keyboard_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_min_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_mode_mpobj, 1, mp_lv_keyboard_get_mode, lv_keyboard_get_mode); -/* Reusing lv_scale_bind_section_min_value for lv_scale_bind_section_max_value */ +/* Reusing lv_obj_is_layout_positioned for lv_keyboard_get_popovers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_max_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_popovers_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_keyboard_get_popovers); -/* Reusing lv_obj_create for lv_scale_create */ +/* Reusing lv_obj_get_child_count for lv_keyboard_get_selected_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_create_mpobj, 1, mp_lv_obj_create, lv_scale_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_keyboard_get_selected_button); + +/* Reusing lv_buttonmatrix_get_button_text for lv_keyboard_get_button_text */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_keyboard_get_button_text); + +/* Reusing funcptr_event_cb for lv_keyboard_def_event_cb */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_keyboard_def_event_cb_mpobj, 1, mp_funcptr_event_cb, lv_keyboard_def_event_cb); + +/* Reusing lv_obj_create for lv_keyboard_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_create_mpobj, 1, mp_lv_obj_create, lv_keyboard_create); /* - * lvgl scale object definitions + * lvgl keyboard object definitions */ -static const mp_rom_map_elem_t scale_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_scale_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_total_tick_count), MP_ROM_PTR(&mp_lv_scale_set_total_tick_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_major_tick_every), MP_ROM_PTR(&mp_lv_scale_set_major_tick_every_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_label_show), MP_ROM_PTR(&mp_lv_scale_set_label_show_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_scale_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_scale_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angle_range), MP_ROM_PTR(&mp_lv_scale_set_angle_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_scale_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_needle_value), MP_ROM_PTR(&mp_lv_scale_set_line_needle_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_needle_value), MP_ROM_PTR(&mp_lv_scale_set_image_needle_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_src), MP_ROM_PTR(&mp_lv_scale_set_text_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_post_draw), MP_ROM_PTR(&mp_lv_scale_set_post_draw_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_draw_ticks_on_top), MP_ROM_PTR(&mp_lv_scale_set_draw_ticks_on_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_section), MP_ROM_PTR(&mp_lv_scale_add_section_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_section_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_range), MP_ROM_PTR(&mp_lv_scale_set_section_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_min_value), MP_ROM_PTR(&mp_lv_scale_set_section_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_max_value), MP_ROM_PTR(&mp_lv_scale_set_section_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_section_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_style_main), MP_ROM_PTR(&mp_lv_scale_set_section_style_main_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_style_indicator), MP_ROM_PTR(&mp_lv_scale_set_section_style_indicator_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_style_items), MP_ROM_PTR(&mp_lv_scale_set_section_style_items_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_scale_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_total_tick_count), MP_ROM_PTR(&mp_lv_scale_get_total_tick_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_major_tick_every), MP_ROM_PTR(&mp_lv_scale_get_major_tick_every_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_scale_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label_show), MP_ROM_PTR(&mp_lv_scale_get_label_show_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_range), MP_ROM_PTR(&mp_lv_scale_get_angle_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_range_min_value), MP_ROM_PTR(&mp_lv_scale_get_range_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_range_max_value), MP_ROM_PTR(&mp_lv_scale_get_range_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_section_min_value), MP_ROM_PTR(&mp_lv_scale_bind_section_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_section_max_value), MP_ROM_PTR(&mp_lv_scale_bind_section_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SCALE_MODE_type_base) } +static const mp_rom_map_elem_t keyboard_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_textarea), MP_ROM_PTR(&mp_lv_keyboard_set_textarea_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_keyboard_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_popovers), MP_ROM_PTR(&mp_lv_keyboard_set_popovers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_keyboard_set_map_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_textarea), MP_ROM_PTR(&mp_lv_keyboard_get_textarea_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_keyboard_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_popovers), MP_ROM_PTR(&mp_lv_keyboard_get_popovers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_keyboard_get_selected_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_keyboard_get_button_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_def_event_cb), MP_ROM_PTR(&mp_lv_keyboard_def_event_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_KEYBOARD_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(scale_locals_dict, scale_locals_dict_table); +static MP_DEFINE_CONST_DICT(keyboard_locals_dict, keyboard_locals_dict_table); -static void scale_print(const mp_print_t *print, +static void keyboard_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl scale"); + mp_printf(print, "lvgl keyboard"); } -static mp_obj_t scale_make_new( +static mp_obj_t keyboard_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_scale_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_keyboard_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_scale_type_base, - MP_QSTR_scale, + mp_lv_keyboard_type_base, + MP_QSTR_keyboard, MP_TYPE_FLAG_NONE, - print, scale_print, - make_new, scale_make_new, + print, keyboard_print, + make_new, keyboard_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &scale_locals_dict + locals_dict, &keyboard_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_scale_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_keyboard_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_scale_class, + .lv_obj_class = &lv_keyboard_class, #endif - .mp_obj_type = &mp_lv_scale_type_base, + .mp_obj_type = &mp_lv_keyboard_type_base, }; -/* Reusing lv_obj_scroll_to_x for lv_slider_set_value */ +/* Reusing lv_barcode_set_dark_color for lv_led_set_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_led_set_color); -/* Reusing lv_obj_scroll_to_x for lv_slider_set_start_value */ +/* Reusing lv_obj_set_flex_grow for lv_led_set_brightness */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_start_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_brightness_mpobj, 2, mp_lv_obj_set_flex_grow, lv_led_set_brightness); -/* Reusing lv_obj_set_pos for lv_slider_set_range */ +/* Reusing lv_obj_move_foreground for lv_led_on */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_slider_set_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_on_mpobj, 1, mp_lv_obj_move_foreground, lv_led_on); -/* Reusing lv_obj_move_to_index for lv_slider_set_min_value */ +/* Reusing lv_obj_move_foreground for lv_led_off */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_off_mpobj, 1, mp_lv_obj_move_foreground, lv_led_off); -/* Reusing lv_obj_move_to_index for lv_slider_set_max_value */ +/* Reusing lv_obj_move_foreground for lv_led_toggle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_toggle_mpobj, 1, mp_lv_obj_move_foreground, lv_led_toggle); /* * lvgl extension definition for: - * void lv_slider_set_mode(lv_obj_t *obj, lv_slider_mode_t mode) + * uint8_t lv_led_get_brightness(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_slider_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_led_get_brightness(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_slider_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_slider_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint8_t _res = ((uint8_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_mode_mpobj, 2, mp_lv_slider_set_mode, lv_slider_set_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_brightness_mpobj, 1, mp_lv_led_get_brightness, lv_led_get_brightness); /* * lvgl extension definition for: - * void lv_slider_set_orientation(lv_obj_t *obj, lv_slider_orientation_t orientation) + * lv_color_t lv_led_get_color(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_slider_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_led_get_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_slider_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_slider_orientation_t))lv_func_ptr)(obj, orientation); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_orientation_mpobj, 2, mp_lv_slider_set_orientation, lv_slider_set_orientation); - -/* Reusing lv_obj_get_index for lv_slider_get_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_value); - -/* Reusing lv_obj_get_index for lv_slider_get_left_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_left_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_left_value); - -/* Reusing lv_obj_get_index for lv_slider_get_min_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_min_value); - -/* Reusing lv_obj_get_index for lv_slider_get_max_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_max_value); - -/* Reusing lv_obj_is_layout_positioned for lv_slider_is_dragged */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_dragged_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_slider_is_dragged); - - -/* - * lvgl extension definition for: - * lv_slider_mode_t lv_slider_get_mode(lv_obj_t *slider) - */ - -static mp_obj_t mp_lv_slider_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *slider = mp_to_lv(mp_args[0]); - lv_slider_mode_t _res = ((lv_slider_mode_t (*)(lv_obj_t *))lv_func_ptr)(slider); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_mode_mpobj, 1, mp_lv_slider_get_mode, lv_slider_get_mode); - - -/* - * lvgl extension definition for: - * lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t *slider) - */ - -static mp_obj_t mp_lv_slider_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *slider = mp_to_lv(mp_args[0]); - lv_slider_orientation_t _res = ((lv_slider_orientation_t (*)(lv_obj_t *))lv_func_ptr)(slider); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_orientation_mpobj, 1, mp_lv_slider_get_orientation, lv_slider_get_orientation); - -/* Reusing lv_obj_refr_size for lv_slider_is_symmetrical */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_slider_is_symmetrical); - -/* Reusing lv_obj_bind_checked for lv_slider_bind_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_slider_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_color_mpobj, 1, mp_lv_led_get_color, lv_led_get_color); -/* Reusing lv_obj_create for lv_slider_create */ +/* Reusing lv_obj_create for lv_led_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_create_mpobj, 1, mp_lv_obj_create, lv_slider_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_create_mpobj, 1, mp_lv_obj_create, lv_led_create); /* - * lvgl slider object definitions + * lvgl led object definitions */ -static const mp_rom_map_elem_t slider_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_slider_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_slider_set_start_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_slider_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_slider_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_slider_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_slider_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_slider_set_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_slider_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_left_value), MP_ROM_PTR(&mp_lv_slider_get_left_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_slider_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_slider_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_dragged), MP_ROM_PTR(&mp_lv_slider_is_dragged_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_slider_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_slider_get_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_slider_is_symmetrical_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_slider_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SLIDER_MODE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SLIDER_ORIENTATION_type_base) } +static const mp_rom_map_elem_t led_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_color), MP_ROM_PTR(&mp_lv_led_set_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_brightness), MP_ROM_PTR(&mp_lv_led_set_brightness_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_on), MP_ROM_PTR(&mp_lv_led_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_off), MP_ROM_PTR(&mp_lv_led_off_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_toggle), MP_ROM_PTR(&mp_lv_led_toggle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_brightness), MP_ROM_PTR(&mp_lv_led_get_brightness_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_color), MP_ROM_PTR(&mp_lv_led_get_color_mpobj) } }; -static MP_DEFINE_CONST_DICT(slider_locals_dict, slider_locals_dict_table); +static MP_DEFINE_CONST_DICT(led_locals_dict, led_locals_dict_table); -static void slider_print(const mp_print_t *print, +static void led_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl slider"); + mp_printf(print, "lvgl led"); } -static mp_obj_t slider_make_new( +static mp_obj_t led_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_slider_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_led_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_slider_type_base, - MP_QSTR_slider, + mp_lv_led_type_base, + MP_QSTR_led, MP_TYPE_FLAG_NONE, - print, slider_print, - make_new, slider_make_new, + print, led_print, + make_new, led_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &slider_locals_dict + locals_dict, &led_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_slider_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_led_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_slider_class, + .lv_obj_class = &lv_led_class, #endif - .mp_obj_type = &mp_lv_slider_type_base, + .mp_obj_type = &mp_lv_led_type_base, }; /* - * Struct lv_span_t + * Array convertors for lv_point_precise_t [] */ -static inline const mp_obj_type_t *get_mp_lv_span_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_t_type())); - return (lv_span_t*)self->data; -} - -#define mp_write_lv_span_t(struct_obj) *((lv_span_t*)mp_write_ptr_lv_span_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_span_t_type(), field); -} - -#define mp_read_lv_span_t(field) mp_read_ptr_lv_span_t(copy_buffer(&field, sizeof(lv_span_t))) -#define mp_read_byref_lv_span_t(field) mp_read_ptr_lv_span_t(&field) - -static void mp_lv_span_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t_____(mp_obj_t mp_arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_span_t *data = (lv_span_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_txt: dest[0] = convert_to_str((void*)data->txt); break; // converting from char *; - case MP_QSTR_style: dest[0] = mp_read_byref_lv_style_t(data->style); break; // converting from lv_style_t; - case MP_QSTR_static_flag: dest[0] = mp_obj_new_int_from_uint(data->static_flag); break; // converting from uint32_t; - case MP_QSTR_trailing_pos: dest[0] = mp_read_byref_lv_point_t(data->trailing_pos); break; // converting from lv_point_t; - case MP_QSTR_trailing_height: dest[0] = mp_obj_new_int(data->trailing_height); break; // converting from int32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_txt: data->txt = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_style: data->style = mp_write_lv_style_t(dest[1]); break; // converting to lv_style_t; - case MP_QSTR_static_flag: data->static_flag = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_trailing_pos: data->trailing_pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_trailing_height: data->trailing_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_point_precise_t(item); } + return (lv_point_precise_t *)lv_arr; } -static void mp_lv_span_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t_____(const lv_point_precise_t *arr) { - mp_printf(print, "struct lv_span_t"); + return mp_read_ptr_lv_point_precise_t((void*)arr); } -static const mp_obj_dict_t mp_lv_span_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_span_t_type, - MP_QSTR_lv_span_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_span_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_span_t_attr, - locals_dict, &mp_lv_span_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_span_t_type(void) -{ - return &mp_lv_span_t_type; -} - /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_add_span(lv_obj_t *obj) + * void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num) */ -static mp_obj_t mp_lv_spangroup_add_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_line_set_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_span_t((void*)_res); + const lv_point_precise_t *points = (const lv_point_precise_t *)mp_arr_to_lv_point_precise_t_____(mp_args[1]); + uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_add_span_mpobj, 1, mp_lv_spangroup_add_span, lv_spangroup_add_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mpobj, 3, mp_lv_line_set_points, lv_line_set_points); /* * lvgl extension definition for: - * void lv_spangroup_delete_span(lv_obj_t *obj, lv_span_t *span) + * void lv_line_set_points_mutable(lv_obj_t *obj, lv_point_precise_t points[], uint32_t point_num) */ -static mp_obj_t mp_lv_spangroup_delete_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_line_set_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_span_t *))lv_func_ptr)(obj, span); + lv_point_precise_t *points = mp_arr_to_lv_point_precise_t_____(mp_args[1]); + uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_delete_span_mpobj, 2, mp_lv_spangroup_delete_span, lv_spangroup_delete_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mutable_mpobj, 3, mp_lv_line_set_points_mutable, lv_line_set_points_mutable); + +/* Reusing lv_obj_set_hidden for lv_line_set_y_invert */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_y_invert_mpobj, 2, mp_lv_obj_set_hidden, lv_line_set_y_invert); /* * lvgl extension definition for: - * void lv_spangroup_set_span_text(lv_obj_t *obj, lv_span_t *span, const char *text) + * const lv_point_precise_t *lv_line_get_points(lv_obj_t *obj) */ -static mp_obj_t mp_lv_spangroup_set_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_line_get_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - const char *text = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_func_ptr)(obj, span, text); - return mp_const_none; + const lv_point_precise_t * _res = ((const lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_point_precise_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mpobj, 1, mp_lv_line_get_points, lv_line_get_points); -/* Reusing lv_spangroup_set_span_text for lv_spangroup_set_span_text_static */ +/* Reusing lv_obj_get_event_count for lv_line_get_point_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_static_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text_static); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_point_count_mpobj, 1, mp_lv_obj_get_event_count, lv_line_get_point_count); + +/* Reusing lv_obj_refr_size for lv_line_is_point_array_mutable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_is_point_array_mutable_mpobj, 1, mp_lv_obj_refr_size, lv_line_is_point_array_mutable); /* * lvgl extension definition for: - * void lv_spangroup_set_span_style(lv_obj_t *obj, lv_span_t *span, const lv_style_t *style) + * lv_point_precise_t *lv_line_get_points_mutable(lv_obj_t *obj) */ -static mp_obj_t mp_lv_spangroup_set_span_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_line_get_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_span_t *, const lv_style_t *))lv_func_ptr)(obj, span, style); - return mp_const_none; + lv_point_precise_t * _res = ((lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_point_precise_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_style_mpobj, 3, mp_lv_spangroup_set_span_style, lv_spangroup_set_span_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mutable_mpobj, 1, mp_lv_line_get_points_mutable, lv_line_get_points_mutable); + +/* Reusing lv_obj_is_layout_positioned for lv_line_get_y_invert */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_y_invert_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_line_get_y_invert); + +/* Reusing lv_obj_create for lv_line_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_create_mpobj, 1, mp_lv_obj_create, lv_line_create); /* - * lvgl extension definition for: - * void lv_spangroup_set_align(lv_obj_t *obj, lv_text_align_t align) + * lvgl line object definitions */ + -static mp_obj_t mp_lv_spangroup_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static const mp_rom_map_elem_t line_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_points), MP_ROM_PTR(&mp_lv_line_set_points_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_points_mutable), MP_ROM_PTR(&mp_lv_line_set_points_mutable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_y_invert), MP_ROM_PTR(&mp_lv_line_set_y_invert_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_points), MP_ROM_PTR(&mp_lv_line_get_points_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_line_get_point_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_point_array_mutable), MP_ROM_PTR(&mp_lv_line_is_point_array_mutable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_points_mutable), MP_ROM_PTR(&mp_lv_line_get_points_mutable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y_invert), MP_ROM_PTR(&mp_lv_line_get_y_invert_mpobj) } +}; + +static MP_DEFINE_CONST_DICT(line_locals_dict, line_locals_dict_table); + +static void line_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_text_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_text_align_t))lv_func_ptr)(obj, align); - return mp_const_none; + mp_printf(print, "lvgl line"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_spangroup_set_align); +static mp_obj_t line_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_line_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_line_type_base, + MP_QSTR_line, + MP_TYPE_FLAG_NONE, + print, line_print, + make_new, line_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &line_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_line_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_line_class, +#endif + .mp_obj_type = &mp_lv_line_type_base, +}; /* * lvgl extension definition for: - * void lv_spangroup_set_overflow(lv_obj_t *obj, lv_span_overflow_t overflow) + * lv_obj_t *lv_list_add_text(lv_obj_t *list, const char *txt) */ -static mp_obj_t mp_lv_spangroup_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_add_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_span_overflow_t))lv_func_ptr)(obj, overflow); - return mp_const_none; + lv_obj_t *list = mp_to_lv(mp_args[0]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_func_ptr)(list, txt); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_overflow_mpobj, 2, mp_lv_spangroup_set_overflow, lv_spangroup_set_overflow); - -/* Reusing lv_obj_move_to_index for lv_spangroup_set_indent */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_indent_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_indent); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_text_mpobj, 2, mp_lv_list_add_text, lv_list_add_text); /* * lvgl extension definition for: - * void lv_spangroup_set_mode(lv_obj_t *obj, lv_span_mode_t mode) + * lv_obj_t *lv_list_add_button(lv_obj_t *list, const void *icon, const char *txt) */ -static mp_obj_t mp_lv_spangroup_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_span_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; + lv_obj_t *list = mp_to_lv(mp_args[0]); + const void *icon = (const void *)mp_to_ptr(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, const char *))lv_func_ptr)(list, icon, txt); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_mode_mpobj, 2, mp_lv_spangroup_set_mode, lv_spangroup_set_mode); - -/* Reusing lv_obj_move_to_index for lv_spangroup_set_max_lines */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_max_lines_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_max_lines); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_button_mpobj, 3, mp_lv_list_add_button, lv_list_add_button); /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_get_child(const lv_obj_t *obj, int32_t id) + * const char *lv_list_get_button_text(lv_obj_t *list, lv_obj_t *btn) */ -static mp_obj_t mp_lv_spangroup_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t id = (int32_t)mp_obj_get_int(mp_args[1]); - lv_span_t * _res = ((lv_span_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, id); - return mp_read_ptr_lv_span_t((void*)_res); + lv_obj_t *list = mp_to_lv(mp_args[0]); + lv_obj_t *btn = mp_to_lv(mp_args[1]); + const char * _res = ((const char *(*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(list, btn); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_child_mpobj, 2, mp_lv_spangroup_get_child, lv_spangroup_get_child); - -/* Reusing lv_obj_get_child_count for lv_spangroup_get_span_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_count_mpobj, 1, mp_lv_obj_get_child_count, lv_spangroup_get_span_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_get_button_text_mpobj, 2, mp_lv_list_get_button_text, lv_list_get_button_text); /* * lvgl extension definition for: - * lv_text_align_t lv_spangroup_get_align(lv_obj_t *obj) + * void lv_list_set_button_text(lv_obj_t *list, lv_obj_t *btn, const char *txt) */ -static mp_obj_t mp_lv_spangroup_get_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_set_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_text_align_t _res = ((lv_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_obj_t *list = mp_to_lv(mp_args[0]); + lv_obj_t *btn = mp_to_lv(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, const char *))lv_func_ptr)(list, btn, txt); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_align_mpobj, 1, mp_lv_spangroup_get_align, lv_spangroup_get_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_set_button_text_mpobj, 3, mp_lv_list_set_button_text, lv_list_set_button_text); + +/* Reusing lv_obj_create for lv_list_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_create_mpobj, 1, mp_lv_obj_create, lv_list_create); /* - * lvgl extension definition for: - * lv_span_overflow_t lv_spangroup_get_overflow(lv_obj_t *obj) + * lvgl list object definitions */ + -static mp_obj_t mp_lv_spangroup_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static const mp_rom_map_elem_t list_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_list_add_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_list_add_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_list_get_button_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_text), MP_ROM_PTR(&mp_lv_list_set_button_text_mpobj) } +}; + +static MP_DEFINE_CONST_DICT(list_locals_dict, list_locals_dict_table); + +static void list_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_overflow_t _res = ((lv_span_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + mp_printf(print, "lvgl list"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_overflow_mpobj, 1, mp_lv_spangroup_get_overflow, lv_spangroup_get_overflow); +static mp_obj_t list_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_list_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_list_type_base, + MP_QSTR_list, + MP_TYPE_FLAG_NONE, + print, list_print, + make_new, list_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &list_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_list_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_list_class, +#endif + .mp_obj_type = &mp_lv_list_type_base, +}; -/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_indent */ +/* Reusing lv_obj_set_parent for lv_menu_set_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_indent_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_indent); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_page); /* * lvgl extension definition for: - * lv_span_mode_t lv_spangroup_get_mode(lv_obj_t *obj) + * void lv_menu_set_page_title(lv_obj_t *page_obj, const char * const title) */ -static mp_obj_t mp_lv_spangroup_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_set_page_title(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_mode_t _res = ((lv_span_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_obj_t *page_obj = mp_to_lv(mp_args[0]); + const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_obj_t *, const char * const))lv_func_ptr)(page_obj, title); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_mode_mpobj, 1, mp_lv_spangroup_get_mode, lv_spangroup_get_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title); -/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_lines */ +/* Reusing lv_menu_set_page_title for lv_menu_set_page_title_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_lines_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_lines); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_static_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title_static); -/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_line_height */ +/* Reusing lv_obj_set_parent for lv_menu_set_sidebar_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_line_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_line_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_sidebar_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_sidebar_page); /* * lvgl extension definition for: - * uint32_t lv_spangroup_get_expand_width(lv_obj_t *obj, uint32_t max_width) + * void lv_menu_set_mode_header(lv_obj_t *obj, lv_menu_mode_header_t mode) */ -static mp_obj_t mp_lv_spangroup_get_expand_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_set_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t max_width = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, max_width); - return mp_obj_new_int_from_uint(_res); + lv_menu_mode_header_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_menu_mode_header_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_width_mpobj, 2, mp_lv_spangroup_get_expand_width, lv_spangroup_get_expand_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_header_mpobj, 2, mp_lv_menu_set_mode_header, lv_menu_set_mode_header); /* * lvgl extension definition for: - * int32_t lv_spangroup_get_expand_height(lv_obj_t *obj, int32_t width) + * void lv_menu_set_mode_root_back_button(lv_obj_t *obj, lv_menu_mode_root_back_button_t mode) */ -static mp_obj_t mp_lv_spangroup_get_expand_height(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_set_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, width); - return mp_obj_new_int(_res); + lv_menu_mode_root_back_button_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_menu_mode_root_back_button_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_height_mpobj, 2, mp_lv_spangroup_get_expand_height, lv_spangroup_get_expand_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_root_back_button_mpobj, 2, mp_lv_menu_set_mode_root_back_button, lv_menu_set_mode_root_back_button); /* - * Struct lv_span_coords_t + * lvgl extension definition for: + * void lv_menu_set_load_page_event(lv_obj_t *menu, lv_obj_t *obj, lv_obj_t *page) */ -static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_coords_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_coords_t_type())); - return (lv_span_coords_t*)self->data; -} - -#define mp_write_lv_span_coords_t(struct_obj) *((lv_span_coords_t*)mp_write_ptr_lv_span_coords_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_coords_t(void *field) +static mp_obj_t mp_lv_menu_set_load_page_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_span_coords_t_type(), field); + lv_obj_t *menu = mp_to_lv(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + lv_obj_t *page = mp_to_lv(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj, page); + return mp_const_none; } -#define mp_read_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(copy_buffer(&field, sizeof(lv_span_coords_t))) -#define mp_read_byref_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(&field) + -static void mp_lv_span_coords_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_span_coords_t *data = (lv_span_coords_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_load_page_event_mpobj, 3, mp_lv_menu_set_load_page_event, lv_menu_set_load_page_event); + +/* Reusing lv_obj_create for lv_menu_get_cur_main_page */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_heading: dest[0] = mp_read_byref_lv_area_t(data->heading); break; // converting from lv_area_t; - case MP_QSTR_middle: dest[0] = mp_read_byref_lv_area_t(data->middle); break; // converting from lv_area_t; - case MP_QSTR_trailing: dest[0] = mp_read_byref_lv_area_t(data->trailing); break; // converting from lv_area_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_heading: data->heading = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_middle: data->middle = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_trailing: data->trailing = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_main_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_main_page); + +/* Reusing lv_obj_create for lv_menu_get_cur_sidebar_page */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_sidebar_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_sidebar_page); + +/* Reusing lv_obj_create for lv_menu_get_main_header */ -static void mp_lv_span_coords_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_span_coords_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header); + +/* Reusing lv_obj_create for lv_menu_get_main_header_back_button */ -static const mp_obj_dict_t mp_lv_span_coords_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header_back_button); + +/* Reusing lv_obj_create for lv_menu_get_sidebar_header */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_span_coords_t_type, - MP_QSTR_lv_span_coords_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_span_coords_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_span_coords_t_attr, - locals_dict, &mp_lv_span_coords_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header); + +/* Reusing lv_obj_create for lv_menu_get_sidebar_header_back_button */ -static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void) -{ - return &mp_lv_span_coords_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header_back_button); /* * lvgl extension definition for: - * lv_span_coords_t lv_spangroup_get_span_coords(lv_obj_t *obj, const lv_span_t *span) + * bool lv_menu_back_button_is_root(lv_obj_t *menu, lv_obj_t *obj) */ -static mp_obj_t mp_lv_spangroup_get_span_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_back_button_is_root(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_span_t *span = (const lv_span_t *)mp_write_ptr_lv_span_t(mp_args[1]); - lv_span_coords_t _res = ((lv_span_coords_t (*)(lv_obj_t *, const lv_span_t *))lv_func_ptr)(obj, span); - return mp_read_lv_span_coords_t(_res); + lv_obj_t *menu = mp_to_lv(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + bool _res = ((bool (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_coords_mpobj, 2, mp_lv_spangroup_get_span_coords, lv_spangroup_get_span_coords); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_back_button_is_root_mpobj, 2, mp_lv_menu_back_button_is_root, lv_menu_back_button_is_root); /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_get_span_by_point(lv_obj_t *obj, const lv_point_t *point) + * lv_menu_mode_header_t lv_menu_get_mode_header(lv_obj_t *obj) */ -static mp_obj_t mp_lv_spangroup_get_span_by_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_get_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); - return mp_read_ptr_lv_span_t((void*)_res); + lv_menu_mode_header_t _res = ((lv_menu_mode_header_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_by_point_mpobj, 2, mp_lv_spangroup_get_span_by_point, lv_spangroup_get_span_by_point); - -/* Reusing lv_obj_move_foreground for lv_spangroup_refresh */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_spangroup_refresh); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_header_mpobj, 1, mp_lv_menu_get_mode_header, lv_menu_get_mode_header); /* * lvgl extension definition for: - * lv_observer_t *lv_spangroup_bind_span_text(lv_obj_t *obj, lv_span_t *span, lv_subject_t *subject, const char *fmt) + * lv_menu_mode_root_back_button_t lv_menu_get_mode_root_back_button(lv_obj_t *obj) */ -static mp_obj_t mp_lv_spangroup_bind_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_get_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); - const char *fmt = (const char *)(char*)convert_from_str(mp_args[3]); - lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_span_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, span, subject, fmt); - return mp_read_ptr_lv_observer_t((void*)_res); + lv_menu_mode_root_back_button_t _res = ((lv_menu_mode_root_back_button_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_bind_span_text_mpobj, 4, mp_lv_spangroup_bind_span_text, lv_spangroup_bind_span_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_root_back_button_mpobj, 1, mp_lv_menu_get_mode_root_back_button, lv_menu_get_mode_root_back_button); -/* Reusing lv_obj_create for lv_spangroup_create */ +/* Reusing lv_obj_move_foreground for lv_menu_clear_history */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_create_mpobj, 1, mp_lv_obj_create, lv_spangroup_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_clear_history_mpobj, 1, mp_lv_obj_move_foreground, lv_menu_clear_history); + +/* Reusing lv_obj_create for lv_menu_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_create_mpobj, 1, mp_lv_obj_create, lv_menu_create); /* - * lvgl spangroup object definitions + * lvgl menu object definitions */ -static const mp_rom_map_elem_t spangroup_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_span), MP_ROM_PTR(&mp_lv_spangroup_add_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_span), MP_ROM_PTR(&mp_lv_spangroup_delete_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_span_text), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_span_text_static), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_span_style), MP_ROM_PTR(&mp_lv_spangroup_set_span_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_spangroup_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_spangroup_set_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_indent), MP_ROM_PTR(&mp_lv_spangroup_set_indent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_spangroup_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_lines), MP_ROM_PTR(&mp_lv_spangroup_set_max_lines_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_spangroup_get_child_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_span_count), MP_ROM_PTR(&mp_lv_spangroup_get_span_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_align), MP_ROM_PTR(&mp_lv_spangroup_get_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_spangroup_get_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_indent), MP_ROM_PTR(&mp_lv_spangroup_get_indent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_spangroup_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_lines), MP_ROM_PTR(&mp_lv_spangroup_get_max_lines_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_line_height), MP_ROM_PTR(&mp_lv_spangroup_get_max_line_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_expand_width), MP_ROM_PTR(&mp_lv_spangroup_get_expand_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_expand_height), MP_ROM_PTR(&mp_lv_spangroup_get_expand_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_span_coords), MP_ROM_PTR(&mp_lv_spangroup_get_span_coords_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_span_by_point), MP_ROM_PTR(&mp_lv_spangroup_get_span_by_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_spangroup_refresh_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_span_text), MP_ROM_PTR(&mp_lv_spangroup_bind_span_text_mpobj) } +static const mp_rom_map_elem_t menu_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_page), MP_ROM_PTR(&mp_lv_menu_set_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_page_title), MP_ROM_PTR(&mp_lv_menu_set_page_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_page_title_static), MP_ROM_PTR(&mp_lv_menu_set_page_title_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sidebar_page), MP_ROM_PTR(&mp_lv_menu_set_sidebar_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode_header), MP_ROM_PTR(&mp_lv_menu_set_mode_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_set_mode_root_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_load_page_event), MP_ROM_PTR(&mp_lv_menu_set_load_page_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cur_main_page), MP_ROM_PTR(&mp_lv_menu_get_cur_main_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cur_sidebar_page), MP_ROM_PTR(&mp_lv_menu_get_cur_sidebar_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_main_header), MP_ROM_PTR(&mp_lv_menu_get_main_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_main_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_main_header_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sidebar_header), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sidebar_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_back_button_is_root), MP_ROM_PTR(&mp_lv_menu_back_button_is_root_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode_header), MP_ROM_PTR(&mp_lv_menu_get_mode_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_get_mode_root_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_history), MP_ROM_PTR(&mp_lv_menu_clear_history_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_HEADER), MP_ROM_PTR(&mp_lv_LV_MENU_HEADER_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ROOT_BACK_BUTTON), MP_ROM_PTR(&mp_lv_LV_MENU_ROOT_BACK_BUTTON_type_base) } }; -static MP_DEFINE_CONST_DICT(spangroup_locals_dict, spangroup_locals_dict_table); +static MP_DEFINE_CONST_DICT(menu_locals_dict, menu_locals_dict_table); -static void spangroup_print(const mp_print_t *print, +static void menu_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl spangroup"); + mp_printf(print, "lvgl menu"); } -static mp_obj_t spangroup_make_new( +static mp_obj_t menu_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_spangroup_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_menu_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_spangroup_type_base, - MP_QSTR_spangroup, + mp_lv_menu_type_base, + MP_QSTR_menu, MP_TYPE_FLAG_NONE, - print, spangroup_print, - make_new, spangroup_make_new, + print, menu_print, + make_new, menu_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &spangroup_locals_dict + locals_dict, &menu_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spangroup_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_spangroup_class, + .lv_obj_class = &lv_menu_class, #endif - .mp_obj_type = &mp_lv_spangroup_type_base, + .mp_obj_type = &mp_lv_menu_type_base, }; -/* Reusing lv_obj_delete_delayed for lv_textarea_add_char */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_char_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_add_char); - -/* Reusing lv_arclabel_set_text for lv_textarea_add_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_add_text); - -/* Reusing lv_obj_move_foreground for lv_textarea_delete_char */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char); - -/* Reusing lv_obj_move_foreground for lv_textarea_delete_char_forward */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_forward_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char_forward); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_text); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_placeholder_text */ +/* + * lvgl extension definition for: + * lv_obj_t *lv_menu_page_create(lv_obj_t *menu, const char * const title) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_placeholder_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_placeholder_text); - -/* Reusing lv_obj_move_to_index for lv_textarea_set_cursor_pos */ +static mp_obj_t mp_lv_menu_page_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *menu = mp_to_lv(mp_args[0]); + const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char * const))lv_func_ptr)(menu, title); + return lv_to_mp((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_pos_mpobj, 2, mp_lv_obj_move_to_index, lv_textarea_set_cursor_pos); - -/* Reusing lv_obj_set_radio_button for lv_textarea_set_cursor_click_pos */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_click_pos_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_cursor_click_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_page_create_mpobj, 2, mp_lv_menu_page_create, lv_menu_page_create); -/* Reusing lv_obj_set_radio_button for lv_textarea_set_password_mode */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_mode_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_password_mode); +/* + * lvgl menu_page object definitions + */ -/* Reusing lv_arclabel_set_text for lv_textarea_set_password_bullet */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_bullet_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_password_bullet); +static const mp_rom_map_elem_t menu_page_locals_dict_table[] = { -/* Reusing lv_obj_set_radio_button for lv_textarea_set_one_line */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_one_line_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_one_line); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars */ +static MP_DEFINE_CONST_DICT(menu_page_locals_dict, menu_page_locals_dict_table); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars_static */ +static void menu_page_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl menu_page"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_static_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars_static); - -/* Reusing lv_obj_delete_delayed for lv_textarea_set_max_length */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_max_length_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_max_length); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_insert_replace */ +static mp_obj_t menu_page_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_menu_page_create_mpobj, type, n_args, n_kw, args); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_insert_replace_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_insert_replace); - -/* Reusing lv_obj_set_radio_button for lv_textarea_set_text_selection */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_selection_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_text_selection); - -/* Reusing lv_obj_delete_delayed for lv_textarea_set_password_show_time */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_menu_page_type_base, + MP_QSTR_menu_page, + MP_TYPE_FLAG_NONE, + print, menu_page_print, + make_new, menu_page_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &menu_page_locals_dict +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_show_time_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_password_show_time); +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_page_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_menu_page_class, +#endif + .mp_obj_type = &mp_lv_menu_page_type_base, +}; -/* Reusing lv_spangroup_set_align for lv_textarea_set_align */ +/* Reusing lv_obj_create for lv_menu_cont_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_textarea_set_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_cont_create_mpobj, 1, mp_lv_obj_create, lv_menu_cont_create); -/* Reusing lv_checkbox_get_text for lv_textarea_get_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_textarea_get_text); +/* + * lvgl menu_cont object definitions + */ -/* Reusing lv_dropdown_get_text for lv_textarea_get_placeholder_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_placeholder_text_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_placeholder_text); +static const mp_rom_map_elem_t menu_cont_locals_dict_table[] = { -/* Reusing lv_obj_get_screen for lv_textarea_get_label */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_label_mpobj, 1, mp_lv_obj_get_screen, lv_textarea_get_label); - -/* Reusing lv_obj_get_child_count for lv_textarea_get_cursor_pos */ +static MP_DEFINE_CONST_DICT(menu_cont_locals_dict, menu_cont_locals_dict_table); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_pos_mpobj, 1, mp_lv_obj_get_child_count, lv_textarea_get_cursor_pos); - -/* Reusing lv_obj_refr_size for lv_textarea_get_cursor_click_pos */ +static void menu_cont_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl menu_cont"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_click_pos_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_cursor_click_pos); - -/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_password_mode */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_mode_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_password_mode); - -/* Reusing lv_dropdown_get_text for lv_textarea_get_password_bullet */ +static mp_obj_t menu_cont_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_menu_cont_create_mpobj, type, n_args, n_kw, args); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_bullet_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_password_bullet); - -/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_one_line */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_one_line_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_one_line); - -/* Reusing lv_dropdown_get_text for lv_textarea_get_accepted_chars */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_menu_cont_type_base, + MP_QSTR_menu_cont, + MP_TYPE_FLAG_NONE, + print, menu_cont_print, + make_new, menu_cont_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &menu_cont_locals_dict +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_accepted_chars_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_accepted_chars); +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_cont_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_menu_cont_class, +#endif + .mp_obj_type = &mp_lv_menu_cont_type_base, +}; -/* Reusing lv_obj_get_event_count for lv_textarea_get_max_length */ +/* Reusing lv_obj_create for lv_menu_section_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_max_length_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_max_length); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_section_create_mpobj, 1, mp_lv_obj_create, lv_menu_section_create); -/* Reusing lv_obj_is_layout_positioned for lv_textarea_text_is_selected */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_text_is_selected_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_text_is_selected); +/* + * lvgl menu_section object definitions + */ -/* Reusing lv_obj_refr_size for lv_textarea_get_text_selection */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_selection_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_text_selection); +static const mp_rom_map_elem_t menu_section_locals_dict_table[] = { -/* Reusing lv_obj_get_event_count for lv_textarea_get_password_show_time */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_show_time_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_password_show_time); - -/* Reusing lv_obj_get_event_count for lv_textarea_get_current_char */ +static MP_DEFINE_CONST_DICT(menu_section_locals_dict, menu_section_locals_dict_table); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_current_char_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_current_char); - -/* Reusing lv_obj_move_foreground for lv_textarea_clear_selection */ +static void menu_section_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl menu_section"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_clear_selection_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_clear_selection); - -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_right_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_right); - -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_left */ +static mp_obj_t menu_section_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_menu_section_create_mpobj, type, n_args, n_kw, args); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_left_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_left); - -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_down */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_down_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_down); - -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_up */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_menu_section_type_base, + MP_QSTR_menu_section, + MP_TYPE_FLAG_NONE, + print, menu_section_print, + make_new, menu_section_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &menu_section_locals_dict +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_up_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_up); +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_section_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_menu_section_class, +#endif + .mp_obj_type = &mp_lv_menu_section_type_base, +}; -/* Reusing lv_obj_create for lv_textarea_create */ +/* Reusing lv_obj_create for lv_menu_separator_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_create_mpobj, 1, mp_lv_obj_create, lv_textarea_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_separator_create_mpobj, 1, mp_lv_obj_create, lv_menu_separator_create); /* - * lvgl textarea object definitions + * lvgl menu_separator object definitions */ -static const mp_rom_map_elem_t textarea_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_char), MP_ROM_PTR(&mp_lv_textarea_add_char_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_textarea_add_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_char), MP_ROM_PTR(&mp_lv_textarea_delete_char_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_char_forward), MP_ROM_PTR(&mp_lv_textarea_delete_char_forward_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_textarea_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_set_placeholder_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_click_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_password_mode), MP_ROM_PTR(&mp_lv_textarea_set_password_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_password_bullet), MP_ROM_PTR(&mp_lv_textarea_set_password_bullet_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_one_line), MP_ROM_PTR(&mp_lv_textarea_set_one_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_accepted_chars_static), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_length), MP_ROM_PTR(&mp_lv_textarea_set_max_length_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_insert_replace), MP_ROM_PTR(&mp_lv_textarea_set_insert_replace_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_selection), MP_ROM_PTR(&mp_lv_textarea_set_text_selection_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_password_show_time), MP_ROM_PTR(&mp_lv_textarea_set_password_show_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_textarea_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_textarea_get_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_get_placeholder_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label), MP_ROM_PTR(&mp_lv_textarea_get_label_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_click_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_password_mode), MP_ROM_PTR(&mp_lv_textarea_get_password_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_password_bullet), MP_ROM_PTR(&mp_lv_textarea_get_password_bullet_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_one_line), MP_ROM_PTR(&mp_lv_textarea_get_one_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_get_accepted_chars_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_length), MP_ROM_PTR(&mp_lv_textarea_get_max_length_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_is_selected), MP_ROM_PTR(&mp_lv_textarea_text_is_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_selection), MP_ROM_PTR(&mp_lv_textarea_get_text_selection_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_password_show_time), MP_ROM_PTR(&mp_lv_textarea_get_password_show_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_char), MP_ROM_PTR(&mp_lv_textarea_get_current_char_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_selection), MP_ROM_PTR(&mp_lv_textarea_clear_selection_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_right), MP_ROM_PTR(&mp_lv_textarea_cursor_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_left), MP_ROM_PTR(&mp_lv_textarea_cursor_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_down), MP_ROM_PTR(&mp_lv_textarea_cursor_down_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_up), MP_ROM_PTR(&mp_lv_textarea_cursor_up_mpobj) } +static const mp_rom_map_elem_t menu_separator_locals_dict_table[] = { + }; -static MP_DEFINE_CONST_DICT(textarea_locals_dict, textarea_locals_dict_table); +static MP_DEFINE_CONST_DICT(menu_separator_locals_dict, menu_separator_locals_dict_table); -static void textarea_print(const mp_print_t *print, +static void menu_separator_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl textarea"); + mp_printf(print, "lvgl menu_separator"); } -static mp_obj_t textarea_make_new( +static mp_obj_t menu_separator_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_textarea_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_menu_separator_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_textarea_type_base, - MP_QSTR_textarea, + mp_lv_menu_separator_type_base, + MP_QSTR_menu_separator, MP_TYPE_FLAG_NONE, - print, textarea_print, - make_new, textarea_make_new, + print, menu_separator_print, + make_new, menu_separator_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &textarea_locals_dict + locals_dict, &menu_separator_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_textarea_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_separator_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_textarea_class, + .lv_obj_class = &lv_menu_separator_class, #endif - .mp_obj_type = &mp_lv_textarea_type_base, + .mp_obj_type = &mp_lv_menu_separator_type_base, }; -/* Reusing lv_obj_move_to_index for lv_spinbox_set_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_value); - -/* Reusing lv_obj_set_radio_button for lv_spinbox_set_rollover */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_rollover_mpobj, 2, mp_lv_obj_set_radio_button, lv_spinbox_set_rollover); - -/* Reusing lv_obj_fade_in for lv_spinbox_set_digit_format */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_format_mpobj, 3, mp_lv_obj_fade_in, lv_spinbox_set_digit_format); - -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_digit_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_digit_count); - -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_dec_point_pos */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_dec_point_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_dec_point_pos); - -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_step */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_step_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_step); - -/* Reusing lv_obj_set_pos for lv_spinbox_set_range */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_spinbox_set_range); - -/* Reusing lv_obj_move_to_index for lv_spinbox_set_min_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_min_value); - -/* Reusing lv_obj_move_to_index for lv_spinbox_set_max_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_max_value); - -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_cursor_pos */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_cursor_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_cursor_pos); - -/* Reusing lv_obj_set_scroll_dir for lv_spinbox_set_digit_step_direction */ +/* Reusing lv_list_add_text for lv_msgbox_add_title */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_step_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_spinbox_set_digit_step_direction); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_title_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_title); -/* Reusing lv_obj_refr_size for lv_spinbox_get_rollover */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_rollover_mpobj, 1, mp_lv_obj_refr_size, lv_spinbox_get_rollover); - -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_value */ +/* + * lvgl extension definition for: + * lv_obj_t *lv_msgbox_add_header_button(lv_obj_t *obj, const void *icon) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_value); - -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_step */ +static mp_obj_t mp_lv_msgbox_add_header_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const void *icon = (const void *)mp_to_ptr(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *))lv_func_ptr)(obj, icon); + return lv_to_mp((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_step_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_step); - -/* Reusing lv_obj_get_event_count for lv_spinbox_get_digit_count */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_count_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_digit_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_header_button_mpobj, 2, mp_lv_msgbox_add_header_button, lv_msgbox_add_header_button); -/* Reusing lv_obj_get_event_count for lv_spinbox_get_dec_point_pos */ +/* Reusing lv_list_add_text for lv_msgbox_add_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_dec_point_pos_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_dec_point_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_text_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_text); -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_min_value */ +/* Reusing lv_list_add_text for lv_msgbox_add_footer_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_footer_button_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_footer_button); -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_max_value */ +/* Reusing lv_obj_create for lv_msgbox_add_close_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_close_button_mpobj, 1, mp_lv_obj_create, lv_msgbox_add_close_button); +/* Reusing lv_obj_create for lv_msgbox_get_header */ -/* - * lvgl extension definition for: - * lv_dir_t lv_spinbox_get_digit_step_direction(lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_spinbox_get_digit_step_direction(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_step_direction_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_spinbox_get_digit_step_direction); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_header_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_header); -/* Reusing lv_obj_move_foreground for lv_spinbox_step_next */ +/* Reusing lv_obj_create for lv_msgbox_get_footer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_next_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_footer_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_footer); -/* Reusing lv_obj_move_foreground for lv_spinbox_step_prev */ +/* Reusing lv_obj_create for lv_msgbox_get_content */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_prev_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_prev); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_content_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_content); -/* Reusing lv_obj_move_foreground for lv_spinbox_increment */ +/* Reusing lv_obj_create for lv_msgbox_get_title */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_increment_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_increment); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_title_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_title); -/* Reusing lv_obj_move_foreground for lv_spinbox_decrement */ +/* Reusing lv_obj_move_foreground for lv_msgbox_close */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_decrement_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_decrement); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close); -/* Reusing lv_obj_bind_checked for lv_spinbox_bind_value */ +/* Reusing lv_obj_move_foreground for lv_msgbox_close_async */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_spinbox_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_async_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close_async); -/* Reusing lv_obj_create for lv_spinbox_create */ +/* Reusing lv_obj_create for lv_msgbox_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_create_mpobj, 1, mp_lv_obj_create, lv_spinbox_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_create_mpobj, 1, mp_lv_obj_create, lv_msgbox_create); /* - * lvgl spinbox object definitions + * lvgl msgbox object definitions */ -static const mp_rom_map_elem_t spinbox_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_spinbox_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rollover), MP_ROM_PTR(&mp_lv_spinbox_set_rollover_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_digit_format), MP_ROM_PTR(&mp_lv_spinbox_set_digit_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_digit_count), MP_ROM_PTR(&mp_lv_spinbox_set_digit_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_set_dec_point_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_step), MP_ROM_PTR(&mp_lv_spinbox_set_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_spinbox_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_spinbox_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_spinbox_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_spinbox_set_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_set_digit_step_direction_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rollover), MP_ROM_PTR(&mp_lv_spinbox_get_rollover_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_spinbox_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_step), MP_ROM_PTR(&mp_lv_spinbox_get_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_digit_count), MP_ROM_PTR(&mp_lv_spinbox_get_digit_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_get_dec_point_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_spinbox_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_spinbox_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_get_digit_step_direction_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_step_next), MP_ROM_PTR(&mp_lv_spinbox_step_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_step_prev), MP_ROM_PTR(&mp_lv_spinbox_step_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_increment), MP_ROM_PTR(&mp_lv_spinbox_increment_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decrement), MP_ROM_PTR(&mp_lv_spinbox_decrement_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_spinbox_bind_value_mpobj) } +static const mp_rom_map_elem_t msgbox_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_msgbox_add_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_header_button), MP_ROM_PTR(&mp_lv_msgbox_add_header_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_msgbox_add_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_footer_button), MP_ROM_PTR(&mp_lv_msgbox_add_footer_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_close_button), MP_ROM_PTR(&mp_lv_msgbox_add_close_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_msgbox_get_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_footer), MP_ROM_PTR(&mp_lv_msgbox_get_footer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_msgbox_get_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_title), MP_ROM_PTR(&mp_lv_msgbox_get_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_msgbox_close_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close_async), MP_ROM_PTR(&mp_lv_msgbox_close_async_mpobj) } }; -static MP_DEFINE_CONST_DICT(spinbox_locals_dict, spinbox_locals_dict_table); +static MP_DEFINE_CONST_DICT(msgbox_locals_dict, msgbox_locals_dict_table); -static void spinbox_print(const mp_print_t *print, +static void msgbox_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl spinbox"); + mp_printf(print, "lvgl msgbox"); } -static mp_obj_t spinbox_make_new( +static mp_obj_t msgbox_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_spinbox_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_msgbox_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_spinbox_type_base, - MP_QSTR_spinbox, + mp_lv_msgbox_type_base, + MP_QSTR_msgbox, MP_TYPE_FLAG_NONE, - print, spinbox_print, - make_new, spinbox_make_new, + print, msgbox_print, + make_new, msgbox_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &spinbox_locals_dict + locals_dict, &msgbox_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinbox_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_msgbox_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_spinbox_class, + .lv_obj_class = &lv_msgbox_class, #endif - .mp_obj_type = &mp_lv_spinbox_type_base, + .mp_obj_type = &mp_lv_msgbox_type_base, }; -/* Reusing lv_obj_fade_in for lv_spinner_set_anim_params */ +/* Reusing lv_obj_move_to_index for lv_qrcode_set_size */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_params_mpobj, 3, mp_lv_obj_fade_in, lv_spinner_set_anim_params); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_size_mpobj, 2, mp_lv_obj_move_to_index, lv_qrcode_set_size); -/* Reusing lv_obj_delete_delayed for lv_spinner_set_anim_duration */ +/* Reusing lv_barcode_set_dark_color for lv_qrcode_set_dark_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_anim_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_dark_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_qrcode_set_dark_color); -/* Reusing lv_obj_delete_delayed for lv_spinner_set_arc_sweep */ +/* Reusing lv_barcode_set_dark_color for lv_qrcode_set_light_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_arc_sweep_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_arc_sweep); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_light_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_qrcode_set_light_color); -/* Reusing lv_obj_get_event_count for lv_spinner_get_anim_duration */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_anim_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_anim_duration); +/* + * lvgl extension definition for: + * lv_result_t lv_qrcode_update(lv_obj_t *obj, const void *data, uint32_t data_len) + */ + +static mp_obj_t mp_lv_qrcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const void *data = (const void *)mp_to_ptr(mp_args[1]); + uint32_t data_len = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const void *, uint32_t))lv_func_ptr)(obj, data, data_len); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_update_mpobj, 3, mp_lv_qrcode_update, lv_qrcode_update); -/* Reusing lv_obj_get_event_count for lv_spinner_get_arc_sweep */ +/* Reusing lv_arclabel_set_text for lv_qrcode_set_data */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_arc_sweep_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_arc_sweep); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_data_mpobj, 2, mp_lv_arclabel_set_text, lv_qrcode_set_data); -/* Reusing lv_obj_create for lv_spinner_create */ +/* Reusing lv_barcode_render for lv_qrcode_render */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_create_mpobj, 1, mp_lv_obj_create, lv_spinner_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_render_mpobj, 1, mp_lv_barcode_render, lv_qrcode_render); + +/* Reusing lv_obj_set_hidden for lv_qrcode_set_quiet_zone */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_quiet_zone_mpobj, 2, mp_lv_obj_set_hidden, lv_qrcode_set_quiet_zone); /* - * lvgl spinner object definitions + * lvgl extension definition for: + * void lv_qrcode_set_update_mode(lv_obj_t *obj, lv_qrcode_update_mode_t mode) + */ + +static mp_obj_t mp_lv_qrcode_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_qrcode_update_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_qrcode_update_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_update_mode_mpobj, 2, mp_lv_qrcode_set_update_mode, lv_qrcode_set_update_mode); + + +/* + * lvgl extension definition for: + * lv_qrcode_update_mode_t lv_qrcode_get_update_mode(lv_obj_t *obj) */ + +static mp_obj_t mp_lv_qrcode_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_qrcode_update_mode_t _res = ((lv_qrcode_update_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_get_update_mode_mpobj, 1, mp_lv_qrcode_get_update_mode, lv_qrcode_get_update_mode); +/* Reusing lv_obj_refr_size for lv_qrcode_is_render_valid */ -static const mp_rom_map_elem_t spinner_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_anim_params), MP_ROM_PTR(&mp_lv_spinner_set_anim_params_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_spinner_set_anim_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_set_arc_sweep_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_anim_duration), MP_ROM_PTR(&mp_lv_spinner_get_anim_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_get_arc_sweep_mpobj) } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_is_render_valid_mpobj, 1, mp_lv_obj_refr_size, lv_qrcode_is_render_valid); + +/* Reusing lv_obj_create for lv_qrcode_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_create_mpobj, 1, mp_lv_obj_create, lv_qrcode_create); + + +/* + * lvgl qrcode object definitions + */ + + +static const mp_rom_map_elem_t qrcode_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_qrcode_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_qrcode_set_dark_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_qrcode_set_light_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_qrcode_update_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_data), MP_ROM_PTR(&mp_lv_qrcode_set_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_render), MP_ROM_PTR(&mp_lv_qrcode_render_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_quiet_zone), MP_ROM_PTR(&mp_lv_qrcode_set_quiet_zone_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_qrcode_set_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_qrcode_get_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_render_valid), MP_ROM_PTR(&mp_lv_qrcode_is_render_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_QRCODE_UPDATE_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(spinner_locals_dict, spinner_locals_dict_table); +static MP_DEFINE_CONST_DICT(qrcode_locals_dict, qrcode_locals_dict_table); -static void spinner_print(const mp_print_t *print, +static void qrcode_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl spinner"); + mp_printf(print, "lvgl qrcode"); } -static mp_obj_t spinner_make_new( +static mp_obj_t qrcode_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_spinner_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_qrcode_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_spinner_type_base, - MP_QSTR_spinner, + mp_lv_qrcode_type_base, + MP_QSTR_qrcode, MP_TYPE_FLAG_NONE, - print, spinner_print, - make_new, spinner_make_new, + print, qrcode_print, + make_new, qrcode_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &spinner_locals_dict + locals_dict, &qrcode_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinner_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_qrcode_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_spinner_class, + .lv_obj_class = &lv_qrcode_class, #endif - .mp_obj_type = &mp_lv_spinner_type_base, + .mp_obj_type = &mp_lv_qrcode_type_base, }; /* * lvgl extension definition for: - * void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation) + * void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode) */ -static mp_obj_t mp_lv_switch_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_roller_set_options(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_switch_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_switch_orientation_t))lv_func_ptr)(obj, orientation); + const char *options = (const char *)(char*)convert_from_str(mp_args[1]); + lv_roller_mode_t mode = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const char *, lv_roller_mode_t))lv_func_ptr)(obj, options, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_set_orientation_mpobj, 2, mp_lv_switch_set_orientation, lv_switch_set_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_options_mpobj, 3, mp_lv_roller_set_options, lv_roller_set_options); /* * lvgl extension definition for: - * lv_switch_orientation_t lv_switch_get_orientation(lv_obj_t *obj) + * void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim) */ -static mp_obj_t mp_lv_switch_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_roller_set_selected(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_switch_orientation_t _res = ((lv_switch_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); + uint32_t sel_opt = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_mpobj, 3, mp_lv_roller_set_selected, lv_roller_set_selected); + + +/* + * lvgl extension definition for: + * bool lv_roller_set_selected_str(lv_obj_t *obj, const char *sel_opt, lv_anim_enable_t anim) + */ + +static mp_obj_t mp_lv_roller_set_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const char *sel_opt = (const char *)(char*)convert_from_str(mp_args[1]); + lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, const char *, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_str_mpobj, 3, mp_lv_roller_set_selected_str, lv_roller_set_selected_str); + +/* Reusing lv_obj_delete_delayed for lv_roller_set_visible_row_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_visible_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_roller_set_visible_row_count); + +/* Reusing lv_obj_get_child_count for lv_roller_get_selected */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_selected); + +/* Reusing lv_dropdown_get_selected_str for lv_roller_get_selected_str */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_roller_get_selected_str); + +/* Reusing lv_checkbox_get_text for lv_roller_get_options */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_roller_get_options); + +/* Reusing lv_obj_get_child_count for lv_roller_get_option_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_option_count); + + +/* + * lvgl extension definition for: + * lv_result_t lv_roller_get_option_str(const lv_obj_t *obj, uint32_t option, char *buf, uint32_t buf_size) + */ + +static mp_obj_t mp_lv_roller_get_option_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint32_t option = (uint32_t)mp_obj_get_int(mp_args[1]); + char *buf = (char*)convert_from_str(mp_args[2]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, uint32_t, char *, uint32_t))lv_func_ptr)(obj, option, buf, buf_size); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_get_orientation_mpobj, 1, mp_lv_switch_get_orientation, lv_switch_get_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_str_mpobj, 4, mp_lv_roller_get_option_str, lv_roller_get_option_str); -/* Reusing lv_obj_create for lv_switch_create */ +/* Reusing lv_obj_bind_checked for lv_roller_bind_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_create_mpobj, 1, mp_lv_obj_create, lv_switch_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_roller_bind_value); + +/* Reusing lv_obj_create for lv_roller_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_create_mpobj, 1, mp_lv_obj_create, lv_roller_create); /* - * lvgl switch object definitions + * lvgl roller object definitions */ -static const mp_rom_map_elem_t switch_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_switch_set_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_switch_get_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SWITCH_ORIENTATION_type_base) } +static const mp_rom_map_elem_t roller_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_roller_set_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_roller_set_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_str), MP_ROM_PTR(&mp_lv_roller_set_selected_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_visible_row_count), MP_ROM_PTR(&mp_lv_roller_set_visible_row_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_roller_get_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_roller_get_selected_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_roller_get_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_roller_get_option_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_str), MP_ROM_PTR(&mp_lv_roller_get_option_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_roller_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ROLLER_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(switch_locals_dict, switch_locals_dict_table); +static MP_DEFINE_CONST_DICT(roller_locals_dict, roller_locals_dict_table); -static void switch_print(const mp_print_t *print, +static void roller_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl switch"); + mp_printf(print, "lvgl roller"); } -static mp_obj_t switch_make_new( +static mp_obj_t roller_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_switch_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_roller_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_switch_type_base, - MP_QSTR_switch, + mp_lv_roller_type_base, + MP_QSTR_roller, MP_TYPE_FLAG_NONE, - print, switch_print, - make_new, switch_make_new, + print, roller_print, + make_new, roller_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &switch_locals_dict + locals_dict, &roller_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_switch_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_roller_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_switch_class, + .lv_obj_class = &lv_roller_class, #endif - .mp_obj_type = &mp_lv_switch_type_base, + .mp_obj_type = &mp_lv_roller_type_base, }; /* * lvgl extension definition for: - * void lv_table_set_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col, const char *txt) + * void lv_scale_set_mode(lv_obj_t *obj, lv_scale_mode_t mode) */ -static mp_obj_t mp_lv_table_set_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, const char *))lv_func_ptr)(obj, row, col, txt); + lv_scale_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scale_mode_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_value_mpobj, 4, mp_lv_table_set_cell_value, lv_table_set_cell_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_mode_mpobj, 2, mp_lv_scale_set_mode, lv_scale_set_mode); -/* Reusing lv_obj_delete_delayed for lv_table_set_row_count */ +/* Reusing lv_obj_delete_delayed for lv_scale_set_total_tick_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_row_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_total_tick_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_total_tick_count); -/* Reusing lv_obj_delete_delayed for lv_table_set_column_count */ +/* Reusing lv_obj_delete_delayed for lv_scale_set_major_tick_every */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_column_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_major_tick_every_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_major_tick_every); + +/* Reusing lv_obj_set_hidden for lv_scale_set_label_show */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_label_show_mpobj, 2, mp_lv_obj_set_hidden, lv_scale_set_label_show); + +/* Reusing lv_obj_set_pos for lv_scale_set_range */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_scale_set_range); + +/* Reusing lv_obj_move_to_index for lv_scale_set_min_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_min_value); + +/* Reusing lv_obj_move_to_index for lv_scale_set_max_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_max_value); + +/* Reusing lv_obj_delete_delayed for lv_scale_set_angle_range */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_angle_range_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_angle_range); + +/* Reusing lv_obj_move_to_index for lv_scale_set_rotation */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_rotation); /* * lvgl extension definition for: - * void lv_table_set_column_width(lv_obj_t *obj, uint32_t col_id, int32_t w) + * void lv_scale_set_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, int32_t value) */ -static mp_obj_t mp_lv_table_set_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_line_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, int32_t))lv_func_ptr)(obj, col_id, w); + lv_obj_t *needle_line = mp_to_lv(mp_args[1]); + int32_t needle_length = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, needle_line, needle_length, value); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_width_mpobj, 3, mp_lv_table_set_column_width, lv_table_set_column_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_line_needle_value_mpobj, 4, mp_lv_scale_set_line_needle_value, lv_scale_set_line_needle_value); /* * lvgl extension definition for: - * void lv_table_set_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) + * void lv_scale_set_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, int32_t value) */ -static mp_obj_t mp_lv_table_set_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_image_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); + lv_obj_t *needle_img = mp_to_lv(mp_args[1]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, needle_img, value); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_set_cell_ctrl); - -/* Reusing lv_table_set_cell_ctrl for lv_table_clear_cell_ctrl */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_clear_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_clear_cell_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_image_needle_value_mpobj, 3, mp_lv_scale_set_image_needle_value, lv_scale_set_image_needle_value); /* * lvgl extension definition for: - * void lv_table_set_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col, void *user_data) + * void lv_scale_set_text_src(lv_obj_t *obj, const char *txt_src[]) */ -static mp_obj_t mp_lv_table_set_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_text_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); - uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); lv_obj_t *obj = mp_to_lv(mp_args[0]); - ((void (*)(lv_obj_t *, uint16_t, uint16_t, void *))lv_func_ptr)(obj, row, col, user_data); + const char **txt_src = (const char **)mp_arr_to_char_ptr____(mp_args[1]); + ((void (*)(lv_obj_t *, const char *[]))lv_func_ptr)(obj, txt_src); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_user_data_mpobj, 4, mp_lv_table_set_cell_user_data, lv_table_set_cell_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_text_src_mpobj, 2, mp_lv_scale_set_text_src, lv_scale_set_text_src); +/* Reusing lv_obj_set_hidden for lv_scale_set_post_draw */ -/* - * lvgl extension definition for: - * void lv_table_set_selected_cell(lv_obj_t *obj, uint16_t row, uint16_t col) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_post_draw_mpobj, 2, mp_lv_obj_set_hidden, lv_scale_set_post_draw); + +/* Reusing lv_obj_set_hidden for lv_scale_set_draw_ticks_on_top */ -static mp_obj_t mp_lv_table_set_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_draw_ticks_on_top_mpobj, 2, mp_lv_obj_set_hidden, lv_scale_set_draw_ticks_on_top); + + +/* + * Struct lv_scale_section_t + */ + +static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_scale_section_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); - uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_scale_section_t_type())); + return (lv_scale_section_t*)self->data; } - +#define mp_write_lv_scale_section_t(struct_obj) *((lv_scale_section_t*)mp_write_ptr_lv_scale_section_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_selected_cell_mpobj, 3, mp_lv_table_set_selected_cell, lv_table_set_selected_cell); - +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_scale_section_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_scale_section_t_type(), field); +} -/* - * lvgl extension definition for: - * const char *lv_table_get_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col) - */ +#define mp_read_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(copy_buffer(&field, sizeof(lv_scale_section_t))) +#define mp_read_byref_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(&field) -static mp_obj_t mp_lv_table_get_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_scale_section_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - const char * _res = ((const char *(*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, row, col); - return convert_to_str((void*)_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_scale_section_t *data = (lv_scale_section_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_main_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->main_style); break; // converting from lv_style_t *; + case MP_QSTR_indicator_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->indicator_style); break; // converting from lv_style_t *; + case MP_QSTR_items_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->items_style); break; // converting from lv_style_t *; + case MP_QSTR_range_min: dest[0] = mp_obj_new_int(data->range_min); break; // converting from int32_t; + case MP_QSTR_range_max: dest[0] = mp_obj_new_int(data->range_max); break; // converting from int32_t; + case MP_QSTR_first_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_in_section); break; // converting from uint32_t; + case MP_QSTR_last_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_in_section); break; // converting from uint32_t; + case MP_QSTR_first_tick_in_section_width: dest[0] = mp_obj_new_int(data->first_tick_in_section_width); break; // converting from int32_t; + case MP_QSTR_last_tick_in_section_width: dest[0] = mp_obj_new_int(data->last_tick_in_section_width); break; // converting from int32_t; + case MP_QSTR_first_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->first_tick_in_section); break; // converting from lv_point_t; + case MP_QSTR_last_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->last_tick_in_section); break; // converting from lv_point_t; + case MP_QSTR_first_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_is_major); break; // converting from uint32_t; + case MP_QSTR_last_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_is_major); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_main_style: data->main_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; + case MP_QSTR_indicator_style: data->indicator_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; + case MP_QSTR_items_style: data->items_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; + case MP_QSTR_range_min: data->range_min = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_range_max: data->range_max = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_first_tick_idx_in_section: data->first_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_tick_idx_in_section: data->last_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_first_tick_in_section_width: data->first_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_last_tick_in_section_width: data->last_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_first_tick_in_section: data->first_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_tick_in_section: data->last_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_first_tick_idx_is_major: data->first_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_tick_idx_is_major: data->last_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - +static void mp_lv_scale_section_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_scale_section_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_value_mpobj, 3, mp_lv_table_get_cell_value, lv_table_get_cell_value); - -/* Reusing lv_obj_get_event_count for lv_table_get_row_count */ +static const mp_obj_dict_t mp_lv_scale_section_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_row_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_row_count); - -/* Reusing lv_obj_get_event_count for lv_table_get_column_count */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_scale_section_t_type, + MP_QSTR_lv_scale_section_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_scale_section_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_scale_section_t_attr, + locals_dict, &mp_lv_scale_section_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_column_count); +static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void) +{ + return &mp_lv_scale_section_t_type; +} /* * lvgl extension definition for: - * int32_t lv_table_get_column_width(lv_obj_t *obj, uint32_t col) + * lv_scale_section_t *lv_scale_add_section(lv_obj_t *obj) */ -static mp_obj_t mp_lv_table_get_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_add_section(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, col); - return mp_obj_new_int(_res); + lv_scale_section_t * _res = ((lv_scale_section_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_scale_section_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_width_mpobj, 2, mp_lv_table_get_column_width, lv_table_get_column_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_add_section_mpobj, 1, mp_lv_scale_add_section, lv_scale_add_section); /* * lvgl extension definition for: - * bool lv_table_has_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) + * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) */ -static mp_obj_t mp_lv_table_has_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_section_set_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); - return convert_to_bool(_res); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t max = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(section, min, max); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_has_cell_ctrl_mpobj, 4, mp_lv_table_has_cell_ctrl, lv_table_has_cell_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_range_mpobj, 3, mp_lv_scale_section_set_range, lv_scale_section_set_range); /* * lvgl extension definition for: - * void lv_table_get_selected_cell(lv_obj_t *obj, uint32_t *row, uint32_t *col) + * void lv_scale_set_section_range(lv_obj_t *scale, lv_scale_section_t *section, int32_t min, int32_t max) */ -static mp_obj_t mp_lv_table_get_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_section_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t *row = mp_array_to_u32ptr(mp_args[1]); - uint32_t *col = mp_array_to_u32ptr(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t *, uint32_t *))lv_func_ptr)(obj, row, col); + lv_obj_t *scale = mp_to_lv(mp_args[0]); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(scale, section, min, max); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_selected_cell_mpobj, 3, mp_lv_table_get_selected_cell, lv_table_get_selected_cell); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_range_mpobj, 4, mp_lv_scale_set_section_range, lv_scale_set_section_range); /* * lvgl extension definition for: - * void *lv_table_get_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col) + * void lv_scale_set_section_min_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t min) */ -static mp_obj_t mp_lv_table_get_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); - uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); - return ptr_to_mp((void*)_res); + lv_obj_t *scale = mp_to_lv(mp_args[0]); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_func_ptr)(scale, section, min); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_user_data_mpobj, 3, mp_lv_table_get_cell_user_data, lv_table_get_cell_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_min_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_min_value); -/* Reusing lv_obj_create for lv_table_create */ +/* Reusing lv_scale_set_section_min_value for lv_scale_set_section_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_create_mpobj, 1, mp_lv_obj_create, lv_table_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_max_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_max_value); /* - * lvgl table object definitions + * lvgl extension definition for: + * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) */ - -static const mp_rom_map_elem_t table_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_cell_value), MP_ROM_PTR(&mp_lv_table_set_cell_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_row_count), MP_ROM_PTR(&mp_lv_table_set_row_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_column_count), MP_ROM_PTR(&mp_lv_table_set_column_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_column_width), MP_ROM_PTR(&mp_lv_table_set_column_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cell_ctrl), MP_ROM_PTR(&mp_lv_table_set_cell_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_cell_ctrl), MP_ROM_PTR(&mp_lv_table_clear_cell_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cell_user_data), MP_ROM_PTR(&mp_lv_table_set_cell_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_cell), MP_ROM_PTR(&mp_lv_table_set_selected_cell_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cell_value), MP_ROM_PTR(&mp_lv_table_get_cell_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_row_count), MP_ROM_PTR(&mp_lv_table_get_row_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_column_count), MP_ROM_PTR(&mp_lv_table_get_column_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_column_width), MP_ROM_PTR(&mp_lv_table_get_column_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_cell_ctrl), MP_ROM_PTR(&mp_lv_table_has_cell_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_cell), MP_ROM_PTR(&mp_lv_table_get_selected_cell_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cell_user_data), MP_ROM_PTR(&mp_lv_table_get_cell_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_CELL_CTRL), MP_ROM_PTR(&mp_lv_LV_TABLE_CELL_CTRL_type_base) } -}; +static mp_obj_t mp_lv_scale_section_set_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_t *section_part_style = mp_write_ptr_lv_style_t(mp_args[2]); + ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_func_ptr)(section, part, section_part_style); + return mp_const_none; +} -static MP_DEFINE_CONST_DICT(table_locals_dict, table_locals_dict_table); + -static void table_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_style_mpobj, 3, mp_lv_scale_section_set_style, lv_scale_section_set_style); + + +/* + * lvgl extension definition for: + * void lv_scale_set_section_style_main(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) + */ + +static mp_obj_t mp_lv_scale_set_section_style_main(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "lvgl table"); + lv_obj_t *scale = mp_to_lv(mp_args[0]); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_func_ptr)(scale, section, style); + return mp_const_none; } + -static mp_obj_t table_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_main_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_main); + +/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_indicator */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_indicator_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_indicator); + +/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_items */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_items_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_items); + + +/* + * lvgl extension definition for: + * lv_scale_mode_t lv_scale_get_mode(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_scale_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_table_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scale_mode_t _res = ((lv_scale_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_table_type_base, - MP_QSTR_table, - MP_TYPE_FLAG_NONE, - print, table_print, - make_new, table_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &table_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_table_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_table_class, -#endif - .mp_obj_type = &mp_lv_table_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_mode_mpobj, 1, mp_lv_scale_get_mode, lv_scale_get_mode); -/* Reusing lv_list_add_text for lv_tabview_add_tab */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_total_tick_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_add_tab_mpobj, 2, mp_lv_list_add_text, lv_tabview_add_tab); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_total_tick_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_total_tick_count); -/* Reusing lv_label_ins_text for lv_tabview_set_tab_text */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_major_tick_every */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_text_mpobj, 3, mp_lv_label_ins_text, lv_tabview_set_tab_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_major_tick_every_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_major_tick_every); -/* Reusing lv_roller_set_selected for lv_tabview_set_active */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_active_mpobj, 3, mp_lv_roller_set_selected, lv_tabview_set_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_rotation); -/* Reusing lv_obj_set_scroll_dir for lv_tabview_set_tab_bar_position */ +/* Reusing lv_obj_refr_size for lv_scale_get_label_show */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_position_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_tabview_set_tab_bar_position); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_label_show_mpobj, 1, mp_lv_obj_refr_size, lv_scale_get_label_show); -/* Reusing lv_obj_move_to_index for lv_tabview_set_tab_bar_size */ +/* Reusing lv_obj_get_event_count for lv_scale_get_angle_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_size_mpobj, 2, mp_lv_obj_move_to_index, lv_tabview_set_tab_bar_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_angle_range_mpobj, 1, mp_lv_obj_get_event_count, lv_scale_get_angle_range); -/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_count */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_count_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_min_value); -/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_active */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_active_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_max_value); /* * lvgl extension definition for: - * lv_obj_t *lv_tabview_get_tab_button(lv_obj_t *obj, int32_t idx) + * lv_observer_t *lv_scale_bind_section_min_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) */ -static mp_obj_t mp_lv_tabview_get_tab_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_bind_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); - return lv_to_mp((void*)_res); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_func_ptr)(obj, section, subject); + return mp_read_ptr_lv_observer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_button_mpobj, 2, mp_lv_tabview_get_tab_button, lv_tabview_get_tab_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_min_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_min_value); -/* Reusing lv_obj_create for lv_tabview_get_content */ +/* Reusing lv_scale_bind_section_min_value for lv_scale_bind_section_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_content_mpobj, 1, mp_lv_obj_create, lv_tabview_get_content); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_max_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_max_value); -/* Reusing lv_obj_create for lv_tabview_get_tab_bar */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_mpobj, 1, mp_lv_obj_create, lv_tabview_get_tab_bar); +/* + * lvgl extension definition for: + * lv_observer_t *lv_scale_bind_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, lv_subject_t *subject) + */ + +static mp_obj_t mp_lv_scale_bind_line_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *needle_line = mp_to_lv(mp_args[1]); + int32_t needle_length = (int32_t)mp_obj_get_int(mp_args[2]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[3]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_obj_t *, int32_t, lv_subject_t *))lv_func_ptr)(obj, needle_line, needle_length, subject); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_line_needle_value_mpobj, 4, mp_lv_scale_bind_line_needle_value, lv_scale_bind_line_needle_value); -/* Reusing lv_spinbox_get_digit_step_direction for lv_tabview_get_tab_bar_position */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_position_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_tabview_get_tab_bar_position); +/* + * lvgl extension definition for: + * lv_observer_t *lv_scale_bind_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, lv_subject_t *subject) + */ + +static mp_obj_t mp_lv_scale_bind_image_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *needle_img = mp_to_lv(mp_args[1]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_obj_t *, lv_subject_t *))lv_func_ptr)(obj, needle_img, subject); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_image_needle_value_mpobj, 3, mp_lv_scale_bind_image_needle_value, lv_scale_bind_image_needle_value); -/* Reusing lv_obj_create for lv_tabview_create */ +/* Reusing lv_obj_create for lv_scale_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_create_mpobj, 1, mp_lv_obj_create, lv_tabview_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_create_mpobj, 1, mp_lv_obj_create, lv_scale_create); /* - * lvgl tabview object definitions + * lvgl scale object definitions */ -static const mp_rom_map_elem_t tabview_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_tab), MP_ROM_PTR(&mp_lv_tabview_add_tab_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tab_text), MP_ROM_PTR(&mp_lv_tabview_set_tab_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_active), MP_ROM_PTR(&mp_lv_tabview_set_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_position_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tab_bar_size), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_count), MP_ROM_PTR(&mp_lv_tabview_get_tab_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_active), MP_ROM_PTR(&mp_lv_tabview_get_tab_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_button), MP_ROM_PTR(&mp_lv_tabview_get_tab_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_tabview_get_content_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_bar), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_position_mpobj) } +static const mp_rom_map_elem_t scale_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_scale_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_total_tick_count), MP_ROM_PTR(&mp_lv_scale_set_total_tick_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_major_tick_every), MP_ROM_PTR(&mp_lv_scale_set_major_tick_every_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_label_show), MP_ROM_PTR(&mp_lv_scale_set_label_show_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_scale_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_scale_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angle_range), MP_ROM_PTR(&mp_lv_scale_set_angle_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_scale_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_needle_value), MP_ROM_PTR(&mp_lv_scale_set_line_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_needle_value), MP_ROM_PTR(&mp_lv_scale_set_image_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_src), MP_ROM_PTR(&mp_lv_scale_set_text_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_post_draw), MP_ROM_PTR(&mp_lv_scale_set_post_draw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_ticks_on_top), MP_ROM_PTR(&mp_lv_scale_set_draw_ticks_on_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_section), MP_ROM_PTR(&mp_lv_scale_add_section_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_section_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_range), MP_ROM_PTR(&mp_lv_scale_set_section_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_min_value), MP_ROM_PTR(&mp_lv_scale_set_section_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_max_value), MP_ROM_PTR(&mp_lv_scale_set_section_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_section_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_style_main), MP_ROM_PTR(&mp_lv_scale_set_section_style_main_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_style_indicator), MP_ROM_PTR(&mp_lv_scale_set_section_style_indicator_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_style_items), MP_ROM_PTR(&mp_lv_scale_set_section_style_items_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_scale_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_total_tick_count), MP_ROM_PTR(&mp_lv_scale_get_total_tick_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_major_tick_every), MP_ROM_PTR(&mp_lv_scale_get_major_tick_every_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_scale_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label_show), MP_ROM_PTR(&mp_lv_scale_get_label_show_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_range), MP_ROM_PTR(&mp_lv_scale_get_angle_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_range_min_value), MP_ROM_PTR(&mp_lv_scale_get_range_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_range_max_value), MP_ROM_PTR(&mp_lv_scale_get_range_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_section_min_value), MP_ROM_PTR(&mp_lv_scale_bind_section_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_section_max_value), MP_ROM_PTR(&mp_lv_scale_bind_section_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_line_needle_value), MP_ROM_PTR(&mp_lv_scale_bind_line_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_image_needle_value), MP_ROM_PTR(&mp_lv_scale_bind_image_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SCALE_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(tabview_locals_dict, tabview_locals_dict_table); +static MP_DEFINE_CONST_DICT(scale_locals_dict, scale_locals_dict_table); -static void tabview_print(const mp_print_t *print, +static void scale_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl tabview"); + mp_printf(print, "lvgl scale"); } -static mp_obj_t tabview_make_new( +static mp_obj_t scale_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_tabview_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_scale_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tabview_type_base, - MP_QSTR_tabview, + mp_lv_scale_type_base, + MP_QSTR_scale, MP_TYPE_FLAG_NONE, - print, tabview_print, - make_new, tabview_make_new, + print, scale_print, + make_new, scale_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &tabview_locals_dict + locals_dict, &scale_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tabview_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_scale_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_tabview_class, + .lv_obj_class = &lv_scale_class, #endif - .mp_obj_type = &mp_lv_tabview_type_base, + .mp_obj_type = &mp_lv_scale_type_base, }; +/* Reusing lv_obj_scroll_to_x for lv_slider_set_value */ -/* - * lvgl extension definition for: - * lv_obj_t *lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_value); + +/* Reusing lv_obj_scroll_to_x for lv_slider_set_start_value */ -static mp_obj_t mp_lv_tileview_add_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *tv = mp_to_lv(mp_args[0]); - uint8_t col_id = (uint8_t)mp_obj_get_int(mp_args[1]); - uint8_t row_id = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_dir_t dir = (int)mp_obj_get_int(mp_args[3]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, uint8_t, uint8_t, lv_dir_t))lv_func_ptr)(tv, col_id, row_id, dir); - return lv_to_mp((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_start_value); + +/* Reusing lv_obj_set_pos for lv_slider_set_range */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_slider_set_range); + +/* Reusing lv_obj_move_to_index for lv_slider_set_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_add_tile_mpobj, 4, mp_lv_tileview_add_tile, lv_tileview_add_tile); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_min_value); + +/* Reusing lv_obj_move_to_index for lv_slider_set_max_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_max_value); /* * lvgl extension definition for: - * void lv_tileview_set_tile(lv_obj_t *tv, lv_obj_t *tile_obj, lv_anim_enable_t anim_en) + * void lv_slider_set_mode(lv_obj_t *obj, lv_slider_mode_t mode) */ -static mp_obj_t mp_lv_tileview_set_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_slider_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *tv = mp_to_lv(mp_args[0]); - lv_obj_t *tile_obj = mp_to_lv(mp_args[1]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(tv, tile_obj, anim_en); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_slider_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_slider_mode_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_mpobj, 3, mp_lv_tileview_set_tile, lv_tileview_set_tile); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_mode_mpobj, 2, mp_lv_slider_set_mode, lv_slider_set_mode); /* * lvgl extension definition for: - * void lv_tileview_set_tile_by_index(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en) + * void lv_slider_set_orientation(lv_obj_t *obj, lv_slider_orientation_t orientation) */ -static mp_obj_t mp_lv_tileview_set_tile_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_slider_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *tv = mp_to_lv(mp_args[0]); - uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t row_id = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_anim_enable_t))lv_func_ptr)(tv, col_id, row_id, anim_en); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_slider_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_slider_orientation_t))lv_func_ptr)(obj, orientation); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_by_index_mpobj, 4, mp_lv_tileview_set_tile_by_index, lv_tileview_set_tile_by_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_orientation_mpobj, 2, mp_lv_slider_set_orientation, lv_slider_set_orientation); -/* Reusing lv_obj_create for lv_tileview_get_tile_active */ +/* Reusing lv_obj_get_index for lv_slider_get_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_get_tile_active_mpobj, 1, mp_lv_obj_create, lv_tileview_get_tile_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_value); -/* Reusing lv_obj_create for lv_tileview_create */ +/* Reusing lv_obj_get_index for lv_slider_get_left_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_create_mpobj, 1, mp_lv_obj_create, lv_tileview_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_left_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_left_value); +/* Reusing lv_obj_get_index for lv_slider_get_min_value */ -/* - * lvgl tileview object definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_min_value); +/* Reusing lv_obj_get_index for lv_slider_get_max_value */ -static const mp_rom_map_elem_t tileview_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_tile), MP_ROM_PTR(&mp_lv_tileview_add_tile_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tile), MP_ROM_PTR(&mp_lv_tileview_set_tile_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tile_by_index), MP_ROM_PTR(&mp_lv_tileview_set_tile_by_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tile_active), MP_ROM_PTR(&mp_lv_tileview_get_tile_active_mpobj) } -}; - -static MP_DEFINE_CONST_DICT(tileview_locals_dict, tileview_locals_dict_table); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_max_value); + +/* Reusing lv_obj_is_layout_positioned for lv_slider_is_dragged */ -static void tileview_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl tileview"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_dragged_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_slider_is_dragged); + +/* + * lvgl extension definition for: + * lv_slider_mode_t lv_slider_get_mode(lv_obj_t *slider) + */ -static mp_obj_t tileview_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_slider_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_tileview_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *slider = mp_to_lv(mp_args[0]); + lv_slider_mode_t _res = ((lv_slider_mode_t (*)(lv_obj_t *))lv_func_ptr)(slider); + return mp_obj_new_int(_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tileview_type_base, - MP_QSTR_tileview, - MP_TYPE_FLAG_NONE, - print, tileview_print, - make_new, tileview_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &tileview_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tileview_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_tileview_class, -#endif - .mp_obj_type = &mp_lv_tileview_type_base, -}; - -/* Reusing lv_list_add_text for lv_win_add_title */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_title_mpobj, 2, mp_lv_list_add_text, lv_win_add_title); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_mode_mpobj, 1, mp_lv_slider_get_mode, lv_slider_get_mode); /* * lvgl extension definition for: - * lv_obj_t *lv_win_add_button(lv_obj_t *win, const void *icon, int32_t btn_w) + * lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t *obj) */ -static mp_obj_t mp_lv_win_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_slider_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *win = mp_to_lv(mp_args[0]); - const void *icon = (const void *)mp_to_ptr(mp_args[1]); - int32_t btn_w = (int32_t)mp_obj_get_int(mp_args[2]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, int32_t))lv_func_ptr)(win, icon, btn_w); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_slider_orientation_t _res = ((lv_slider_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_button_mpobj, 3, mp_lv_win_add_button, lv_win_add_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_orientation_mpobj, 1, mp_lv_slider_get_orientation, lv_slider_get_orientation); -/* Reusing lv_obj_create for lv_win_get_header */ +/* Reusing lv_obj_refr_size for lv_slider_is_symmetrical */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_header_mpobj, 1, mp_lv_obj_create, lv_win_get_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_slider_is_symmetrical); -/* Reusing lv_obj_create for lv_win_get_content */ +/* Reusing lv_obj_bind_checked for lv_slider_bind_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_content_mpobj, 1, mp_lv_obj_create, lv_win_get_content); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_slider_bind_value); -/* Reusing lv_obj_create for lv_win_create */ +/* Reusing lv_obj_create for lv_slider_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_create_mpobj, 1, mp_lv_obj_create, lv_win_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_create_mpobj, 1, mp_lv_obj_create, lv_slider_create); /* - * lvgl win object definitions + * lvgl slider object definitions */ -static const mp_rom_map_elem_t win_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_win_add_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_win_add_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_win_get_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_win_get_content_mpobj) } +static const mp_rom_map_elem_t slider_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_slider_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_slider_set_start_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_slider_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_slider_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_slider_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_slider_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_slider_set_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_slider_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_left_value), MP_ROM_PTR(&mp_lv_slider_get_left_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_slider_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_slider_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_dragged), MP_ROM_PTR(&mp_lv_slider_is_dragged_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_slider_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_slider_get_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_slider_is_symmetrical_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_slider_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SLIDER_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SLIDER_ORIENTATION_type_base) } }; -static MP_DEFINE_CONST_DICT(win_locals_dict, win_locals_dict_table); +static MP_DEFINE_CONST_DICT(slider_locals_dict, slider_locals_dict_table); -static void win_print(const mp_print_t *print, +static void slider_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl win"); + mp_printf(print, "lvgl slider"); } -static mp_obj_t win_make_new( +static mp_obj_t slider_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_win_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_slider_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_win_type_base, - MP_QSTR_win, + mp_lv_slider_type_base, + MP_QSTR_slider, MP_TYPE_FLAG_NONE, - print, win_print, - make_new, win_make_new, + print, slider_print, + make_new, slider_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &win_locals_dict + locals_dict, &slider_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_win_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_slider_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_win_class, + .lv_obj_class = &lv_slider_class, #endif - .mp_obj_type = &mp_lv_win_type_base, + .mp_obj_type = &mp_lv_slider_type_base, }; -/* Reusing lv_led_set_color for lv_barcode_set_dark_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_dark_color_mpobj, 2, mp_lv_led_set_color, lv_barcode_set_dark_color); +/* + * Struct lv_span_t + */ + +static inline const mp_obj_type_t *get_mp_lv_span_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_t_type())); + return (lv_span_t*)self->data; +} + +#define mp_write_lv_span_t(struct_obj) *((lv_span_t*)mp_write_ptr_lv_span_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_span_t_type(), field); +} + +#define mp_read_lv_span_t(field) mp_read_ptr_lv_span_t(copy_buffer(&field, sizeof(lv_span_t))) +#define mp_read_byref_lv_span_t(field) mp_read_ptr_lv_span_t(&field) + +static void mp_lv_span_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_span_t *data = (lv_span_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_txt: dest[0] = convert_to_str((void*)data->txt); break; // converting from char *; + case MP_QSTR_style: dest[0] = mp_read_byref_lv_style_t(data->style); break; // converting from lv_style_t; + case MP_QSTR_static_flag: dest[0] = mp_obj_new_int_from_uint(data->static_flag); break; // converting from uint32_t; + case MP_QSTR_trailing_pos: dest[0] = mp_read_byref_lv_point_t(data->trailing_pos); break; // converting from lv_point_t; + case MP_QSTR_trailing_height: dest[0] = mp_obj_new_int(data->trailing_height); break; // converting from int32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_txt: data->txt = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_style: data->style = mp_write_lv_style_t(dest[1]); break; // converting to lv_style_t; + case MP_QSTR_static_flag: data->static_flag = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_trailing_pos: data->trailing_pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_trailing_height: data->trailing_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_span_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_span_t"); +} + +static const mp_obj_dict_t mp_lv_span_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_span_t_type, + MP_QSTR_lv_span_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_span_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_span_t_attr, + locals_dict, &mp_lv_span_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_span_t_type(void) +{ + return &mp_lv_span_t_type; +} -/* Reusing lv_led_set_color for lv_barcode_set_light_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_light_color_mpobj, 2, mp_lv_led_set_color, lv_barcode_set_light_color); +/* + * lvgl extension definition for: + * lv_span_t *lv_spangroup_add_span(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_spangroup_add_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_span_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_add_span_mpobj, 1, mp_lv_spangroup_add_span, lv_spangroup_add_span); /* * lvgl extension definition for: - * void lv_barcode_set_scale(lv_obj_t *obj, uint16_t scale) + * void lv_spangroup_delete_span(lv_obj_t *obj, lv_span_t *span) */ -static mp_obj_t mp_lv_barcode_set_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_delete_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t scale = (uint16_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint16_t))lv_func_ptr)(obj, scale); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_span_t *))lv_func_ptr)(obj, span); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_scale_mpobj, 2, mp_lv_barcode_set_scale, lv_barcode_set_scale); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_delete_span_mpobj, 2, mp_lv_spangroup_delete_span, lv_spangroup_delete_span); -/* Reusing lv_obj_set_scroll_dir for lv_barcode_set_direction */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_barcode_set_direction); +/* + * lvgl extension definition for: + * void lv_spangroup_set_span_text(lv_obj_t *obj, lv_span_t *span, const char *text) + */ + +static mp_obj_t mp_lv_spangroup_set_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + const char *text = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_func_ptr)(obj, span, text); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text); -/* Reusing lv_obj_set_radio_button for lv_barcode_set_tiled */ +/* Reusing lv_spangroup_set_span_text for lv_spangroup_set_span_text_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_tiled_mpobj, 2, mp_lv_obj_set_radio_button, lv_barcode_set_tiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_static_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text_static); /* * lvgl extension definition for: - * void lv_barcode_set_encoding(lv_obj_t *obj, lv_barcode_encoding_t encoding) + * void lv_spangroup_set_span_style(lv_obj_t *obj, lv_span_t *span, const lv_style_t *style) */ -static mp_obj_t mp_lv_barcode_set_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_span_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_barcode_encoding_t encoding = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_barcode_encoding_t))lv_func_ptr)(obj, encoding); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_span_t *, const lv_style_t *))lv_func_ptr)(obj, span, style); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_encoding_mpobj, 2, mp_lv_barcode_set_encoding, lv_barcode_set_encoding); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_style_mpobj, 3, mp_lv_spangroup_set_span_style, lv_spangroup_set_span_style); /* * lvgl extension definition for: - * lv_result_t lv_barcode_update(lv_obj_t *obj, const char *data) + * void lv_spangroup_set_align(lv_obj_t *obj, lv_text_align_t align) */ -static mp_obj_t mp_lv_barcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *data = (const char *)(char*)convert_from_str(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, data); - return mp_obj_new_int(_res); + lv_text_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_text_align_t))lv_func_ptr)(obj, align); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_update_mpobj, 2, mp_lv_barcode_update, lv_barcode_update); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_spangroup_set_align); /* * lvgl extension definition for: - * lv_color_t lv_barcode_get_dark_color(lv_obj_t *obj) + * void lv_spangroup_set_overflow(lv_obj_t *obj, lv_span_overflow_t overflow) */ -static mp_obj_t mp_lv_barcode_get_dark_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_t _res = ((lv_color_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_lv_color_t(_res); + lv_span_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_span_overflow_t))lv_func_ptr)(obj, overflow); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_dark_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_dark_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_overflow_mpobj, 2, mp_lv_spangroup_set_overflow, lv_spangroup_set_overflow); -/* Reusing lv_barcode_get_dark_color for lv_barcode_get_light_color */ +/* Reusing lv_obj_move_to_index for lv_spangroup_set_indent */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_light_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_light_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_indent_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_indent); /* * lvgl extension definition for: - * uint16_t lv_barcode_get_scale(lv_obj_t *obj) + * void lv_spangroup_set_mode(lv_obj_t *obj, lv_span_mode_t mode) */ -static mp_obj_t mp_lv_barcode_get_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t _res = ((uint16_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); + lv_span_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_span_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_scale_mpobj, 1, mp_lv_barcode_get_scale, lv_barcode_get_scale); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_mode_mpobj, 2, mp_lv_spangroup_set_mode, lv_spangroup_set_mode); + +/* Reusing lv_obj_move_to_index for lv_spangroup_set_max_lines */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_max_lines_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_max_lines); /* * lvgl extension definition for: - * lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t *obj) + * lv_span_t *lv_spangroup_get_child(const lv_obj_t *obj, int32_t id) */ -static mp_obj_t mp_lv_barcode_get_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_barcode_encoding_t _res = ((lv_barcode_encoding_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + int32_t id = (int32_t)mp_obj_get_int(mp_args[1]); + lv_span_t * _res = ((lv_span_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, id); + return mp_read_ptr_lv_span_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_encoding_mpobj, 1, mp_lv_barcode_get_encoding, lv_barcode_get_encoding); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_child_mpobj, 2, mp_lv_spangroup_get_child, lv_spangroup_get_child); -/* Reusing lv_obj_create for lv_barcode_create */ +/* Reusing lv_obj_get_child_count for lv_spangroup_get_span_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_create_mpobj, 1, mp_lv_obj_create, lv_barcode_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_count_mpobj, 1, mp_lv_obj_get_child_count, lv_spangroup_get_span_count); /* - * lvgl barcode object definitions + * lvgl extension definition for: + * lv_text_align_t lv_spangroup_get_align(lv_obj_t *obj) */ - - -static const mp_rom_map_elem_t barcode_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_barcode_set_dark_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_barcode_set_light_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_barcode_set_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_direction), MP_ROM_PTR(&mp_lv_barcode_set_direction_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tiled), MP_ROM_PTR(&mp_lv_barcode_set_tiled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_encoding), MP_ROM_PTR(&mp_lv_barcode_set_encoding_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_barcode_update_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dark_color), MP_ROM_PTR(&mp_lv_barcode_get_dark_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_light_color), MP_ROM_PTR(&mp_lv_barcode_get_light_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_barcode_get_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_encoding), MP_ROM_PTR(&mp_lv_barcode_get_encoding_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ENCODING_CODE128), MP_ROM_PTR(&mp_lv_LV_BARCODE_ENCODING_CODE128_type_base) } -}; - -static MP_DEFINE_CONST_DICT(barcode_locals_dict, barcode_locals_dict_table); -static void barcode_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_spangroup_get_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "lvgl barcode"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_text_align_t _res = ((lv_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } + -static mp_obj_t barcode_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_barcode_create_mpobj, type, n_args, n_kw, args); -} - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_align_mpobj, 1, mp_lv_spangroup_get_align, lv_spangroup_get_align); + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_barcode_type_base, - MP_QSTR_barcode, - MP_TYPE_FLAG_NONE, - print, barcode_print, - make_new, barcode_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &barcode_locals_dict -); +/* + * lvgl extension definition for: + * lv_span_overflow_t lv_spangroup_get_overflow(lv_obj_t *obj) + */ -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_barcode_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_barcode_class, -#endif - .mp_obj_type = &mp_lv_barcode_type_base, -}; - -/* Reusing lv_obj_move_to_index for lv_qrcode_set_size */ +static mp_obj_t mp_lv_spangroup_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_span_overflow_t _res = ((lv_span_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_size_mpobj, 2, mp_lv_obj_move_to_index, lv_qrcode_set_size); - -/* Reusing lv_led_set_color for lv_qrcode_set_dark_color */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_dark_color_mpobj, 2, mp_lv_led_set_color, lv_qrcode_set_dark_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_overflow_mpobj, 1, mp_lv_spangroup_get_overflow, lv_spangroup_get_overflow); -/* Reusing lv_led_set_color for lv_qrcode_set_light_color */ +/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_indent */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_light_color_mpobj, 2, mp_lv_led_set_color, lv_qrcode_set_light_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_indent_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_indent); /* * lvgl extension definition for: - * lv_result_t lv_qrcode_update(lv_obj_t *obj, const void *data, uint32_t data_len) + * lv_span_mode_t lv_spangroup_get_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_qrcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void *data = (const void *)mp_to_ptr(mp_args[1]); - uint32_t data_len = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const void *, uint32_t))lv_func_ptr)(obj, data, data_len); + lv_span_mode_t _res = ((lv_span_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_update_mpobj, 3, mp_lv_qrcode_update, lv_qrcode_update); - -/* Reusing lv_arclabel_set_text for lv_qrcode_set_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_data_mpobj, 2, mp_lv_arclabel_set_text, lv_qrcode_set_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_mode_mpobj, 1, mp_lv_spangroup_get_mode, lv_spangroup_get_mode); -/* Reusing lv_obj_set_radio_button for lv_qrcode_set_quiet_zone */ +/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_lines */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_quiet_zone_mpobj, 2, mp_lv_obj_set_radio_button, lv_qrcode_set_quiet_zone); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_lines_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_lines); -/* Reusing lv_obj_create for lv_qrcode_create */ +/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_line_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_create_mpobj, 1, mp_lv_obj_create, lv_qrcode_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_line_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_line_height); /* - * lvgl qrcode object definitions + * lvgl extension definition for: + * uint32_t lv_spangroup_get_expand_width(lv_obj_t *obj, uint32_t max_width) */ - - -static const mp_rom_map_elem_t qrcode_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_qrcode_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_qrcode_set_dark_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_qrcode_set_light_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_qrcode_update_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_data), MP_ROM_PTR(&mp_lv_qrcode_set_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_quiet_zone), MP_ROM_PTR(&mp_lv_qrcode_set_quiet_zone_mpobj) } -}; - -static MP_DEFINE_CONST_DICT(qrcode_locals_dict, qrcode_locals_dict_table); - -static void qrcode_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl qrcode"); -} - -static mp_obj_t qrcode_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_spangroup_get_expand_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_qrcode_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t max_width = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, max_width); + return mp_obj_new_int_from_uint(_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_qrcode_type_base, - MP_QSTR_qrcode, - MP_TYPE_FLAG_NONE, - print, qrcode_print, - make_new, qrcode_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &qrcode_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_qrcode_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_qrcode_class, -#endif - .mp_obj_type = &mp_lv_qrcode_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_width_mpobj, 2, mp_lv_spangroup_get_expand_width, lv_spangroup_get_expand_width); /* - * lvgl lv_color_filter_shade global definitions + * lvgl extension definition for: + * int32_t lv_spangroup_get_expand_height(lv_obj_t *obj, int32_t width) */ -static const mp_lv_struct_t mp_lv_color_filter_shade = { - { &mp_lv_color_filter_dsc_t_type }, - (lv_color_filter_dsc_t*)&lv_color_filter_shade -}; - -#define funcptr_lv_tree_constructor_cb_t NULL +static mp_obj_t mp_lv_spangroup_get_expand_height(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, width); + return mp_obj_new_int(_res); +} + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_height_mpobj, 2, mp_lv_spangroup_get_expand_height, lv_spangroup_get_expand_height); + /* - * Struct lv_tree_node_t + * Struct lv_span_coords_t */ -static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_node_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_coords_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_node_t_type())); - return (lv_tree_node_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_coords_t_type())); + return (lv_span_coords_t*)self->data; } -#define mp_write_lv_tree_node_t(struct_obj) *((lv_tree_node_t*)mp_write_ptr_lv_tree_node_t(struct_obj)) +#define mp_write_lv_span_coords_t(struct_obj) *((lv_span_coords_t*)mp_write_ptr_lv_span_coords_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_node_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_coords_t(void *field) { - return lv_to_mp_struct(get_mp_lv_tree_node_t_type(), field); + return lv_to_mp_struct(get_mp_lv_span_coords_t_type(), field); } -#define mp_read_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(copy_buffer(&field, sizeof(lv_tree_node_t))) -#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) +#define mp_read_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(copy_buffer(&field, sizeof(lv_span_coords_t))) +#define mp_read_byref_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(&field) -static void mp_lv_tree_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_span_coords_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_tree_node_t *data = (lv_tree_node_t*)self->data; + GENMPY_UNUSED lv_span_coords_t *data = (lv_span_coords_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_tree_node_t *; - case MP_QSTR_children: dest[0] = ptr_to_mp((void*)data->children); break; // converting from lv_tree_node_t **; - case MP_QSTR_child_cnt: dest[0] = mp_obj_new_int_from_uint(data->child_cnt); break; // converting from uint32_t; - case MP_QSTR_child_cap: dest[0] = mp_obj_new_int_from_uint(data->child_cap); break; // converting from uint32_t; - case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_tree_class_t *; + case MP_QSTR_heading: dest[0] = mp_read_byref_lv_area_t(data->heading); break; // converting from lv_area_t; + case MP_QSTR_middle: dest[0] = mp_read_byref_lv_area_t(data->middle); break; // converting from lv_area_t; + case MP_QSTR_trailing: dest[0] = mp_read_byref_lv_area_t(data->trailing); break; // converting from lv_area_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -27359,11 +28018,9 @@ static void mp_lv_tree_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t *; - case MP_QSTR_children: data->children = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t **; - case MP_QSTR_child_cnt: data->child_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_child_cap: data->child_cap = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; + case MP_QSTR_heading: data->heading = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_middle: data->middle = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_trailing: data->trailing = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; default: return; } @@ -27372,1263 +28029,3193 @@ static void mp_lv_tree_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_tree_node_t_print(const mp_print_t *print, +static void mp_lv_span_coords_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_tree_node_t"); + mp_printf(print, "struct lv_span_coords_t"); } -static const mp_obj_dict_t mp_lv_tree_node_t_locals_dict; +static const mp_obj_dict_t mp_lv_span_coords_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tree_node_t_type, - MP_QSTR_lv_tree_node_t, + mp_lv_span_coords_t_type, + MP_QSTR_lv_span_coords_t, MP_TYPE_FLAG_NONE, - print, mp_lv_tree_node_t_print, + print, mp_lv_span_coords_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_tree_node_t_attr, - locals_dict, &mp_lv_tree_node_t_locals_dict, + attr, mp_lv_span_coords_t_attr, + locals_dict, &mp_lv_span_coords_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void) { - return &mp_lv_tree_node_t_type; + return &mp_lv_span_coords_t_type; } /* * lvgl extension definition for: - * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * lv_span_coords_t lv_spangroup_get_span_coords(lv_obj_t *obj, const lv_span_t *span) */ -static mp_obj_t mp_funcptr_lv_tree_constructor_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_span_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_to_ptr(mp_args[0]); - lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[1]); - ((void (*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, node); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_span_t *span = (const lv_span_t *)mp_write_ptr_lv_span_t(mp_args[1]); + lv_span_coords_t _res = ((lv_span_coords_t (*)(lv_obj_t *, const lv_span_t *))lv_func_ptr)(obj, span); + return mp_read_lv_span_coords_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tree_constructor_cb_t_mpobj, 2, mp_funcptr_lv_tree_constructor_cb_t, funcptr_lv_tree_constructor_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_coords_mpobj, 2, mp_lv_spangroup_get_span_coords, lv_spangroup_get_span_coords); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tree_constructor_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_constructor_cb_callback' - * lv_tree_constructor_cb_t constructor_cb + * lvgl extension definition for: + * lv_span_t *lv_spangroup_get_span_by_point(lv_obj_t *obj, const lv_point_t *p) */ + +static mp_obj_t mp_lv_spangroup_get_span_by_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_point_t *p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, p); + return mp_read_ptr_lv_span_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_by_point_mpobj, 2, mp_lv_spangroup_get_span_by_point, lv_spangroup_get_span_by_point); +/* Reusing lv_obj_move_foreground for lv_spangroup_refresh */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_destructor_cb_callback' - * lv_tree_destructor_cb_t destructor_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_spangroup_refresh); /* - * Struct lv_tree_class_t + * lvgl extension definition for: + * lv_observer_t *lv_spangroup_bind_span_text(lv_obj_t *obj, lv_span_t *span, lv_subject_t *subject, const char *fmt) */ -static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_class_t(mp_obj_t self_in) +static mp_obj_t mp_lv_spangroup_bind_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_class_t_type())); - return (lv_tree_class_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); + const char *fmt = (const char *)(char*)convert_from_str(mp_args[3]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_span_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, span, subject, fmt); + return mp_read_ptr_lv_observer_t((void*)_res); } -#define mp_write_lv_tree_class_t(struct_obj) *((lv_tree_class_t*)mp_write_ptr_lv_tree_class_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_class_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_tree_class_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_bind_span_text_mpobj, 4, mp_lv_spangroup_bind_span_text, lv_spangroup_bind_span_text); + +/* Reusing lv_obj_create for lv_spangroup_create */ -#define mp_read_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(copy_buffer(&field, sizeof(lv_tree_class_t))) -#define mp_read_byref_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_create_mpobj, 1, mp_lv_obj_create, lv_spangroup_create); + -static void mp_lv_tree_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_tree_class_t *data = (lv_tree_class_t*)self->data; +/* + * lvgl spangroup object definitions + */ + - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_tree_class_t *; - case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; - case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->constructor_cb, NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL); break; // converting from callback lv_tree_constructor_cb_t; - case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->destructor_cb, NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL); break; // converting from callback lv_tree_destructor_cb_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; - case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_constructor_cb: data->constructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_constructor_cb_t; - case MP_QSTR_destructor_cb: data->destructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_destructor_cb_t; - default: return; - } +static const mp_rom_map_elem_t spangroup_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_span), MP_ROM_PTR(&mp_lv_spangroup_add_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_span), MP_ROM_PTR(&mp_lv_spangroup_delete_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_span_text), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_span_text_static), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_span_style), MP_ROM_PTR(&mp_lv_spangroup_set_span_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_spangroup_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_spangroup_set_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_indent), MP_ROM_PTR(&mp_lv_spangroup_set_indent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_spangroup_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_lines), MP_ROM_PTR(&mp_lv_spangroup_set_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_spangroup_get_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_span_count), MP_ROM_PTR(&mp_lv_spangroup_get_span_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_align), MP_ROM_PTR(&mp_lv_spangroup_get_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_spangroup_get_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_indent), MP_ROM_PTR(&mp_lv_spangroup_get_indent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_spangroup_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_lines), MP_ROM_PTR(&mp_lv_spangroup_get_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_line_height), MP_ROM_PTR(&mp_lv_spangroup_get_max_line_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_expand_width), MP_ROM_PTR(&mp_lv_spangroup_get_expand_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_expand_height), MP_ROM_PTR(&mp_lv_spangroup_get_expand_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_span_coords), MP_ROM_PTR(&mp_lv_spangroup_get_span_coords_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_span_by_point), MP_ROM_PTR(&mp_lv_spangroup_get_span_by_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_spangroup_refresh_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_span_text), MP_ROM_PTR(&mp_lv_spangroup_bind_span_text_mpobj) } +}; - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_DICT(spangroup_locals_dict, spangroup_locals_dict_table); -static void mp_lv_tree_class_t_print(const mp_print_t *print, +static void spangroup_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_tree_class_t"); + mp_printf(print, "lvgl spangroup"); +} + + +static mp_obj_t spangroup_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_spangroup_create_mpobj, type, n_args, n_kw, args); } -static const mp_obj_dict_t mp_lv_tree_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tree_class_t_type, - MP_QSTR_lv_tree_class_t, + mp_lv_spangroup_type_base, + MP_QSTR_spangroup, MP_TYPE_FLAG_NONE, - print, mp_lv_tree_class_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_tree_class_t_attr, - locals_dict, &mp_lv_tree_class_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, spangroup_print, + make_new, spangroup_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &spangroup_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void) -{ - return &mp_lv_tree_class_t_type; -} +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spangroup_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_spangroup_class, +#endif + .mp_obj_type = &mp_lv_spangroup_type_base, +}; +/* Reusing lv_obj_delete_delayed for lv_textarea_add_char */ -/* - * lvgl lv_tree_node_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_char_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_add_char); + +/* Reusing lv_arclabel_set_text for lv_textarea_add_text */ -static const mp_lv_struct_t mp_lv_tree_node_class = { - { &mp_lv_tree_class_t_type }, - (lv_tree_class_t*)&lv_tree_node_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_add_text); +/* Reusing lv_obj_move_foreground for lv_textarea_delete_char */ -/* - * lvgl lv_font_montserrat_14 global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char); + +/* Reusing lv_obj_move_foreground for lv_textarea_delete_char_forward */ -#if LV_FONT_MONTSERRAT_14 -static const mp_lv_struct_t mp_lv_font_montserrat_14 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_14 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_forward_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char_forward); +/* Reusing lv_arclabel_set_text for lv_textarea_set_text */ -/* - * lvgl lv_font_montserrat_16 global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_text); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_placeholder_text */ -#if LV_FONT_MONTSERRAT_16 -static const mp_lv_struct_t mp_lv_font_montserrat_16 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_16 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_placeholder_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_placeholder_text); +/* Reusing lv_obj_move_to_index for lv_textarea_set_cursor_pos */ -/* - * lvgl lv_font_montserrat_24 global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_pos_mpobj, 2, mp_lv_obj_move_to_index, lv_textarea_set_cursor_pos); + +/* Reusing lv_obj_set_hidden for lv_textarea_set_cursor_click_pos */ -#if LV_FONT_MONTSERRAT_24 -static const mp_lv_struct_t mp_lv_font_montserrat_24 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_24 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_click_pos_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_cursor_click_pos); +/* Reusing lv_obj_set_hidden for lv_textarea_set_password_mode */ -/* - * lvgl lv_font_montserrat_32 global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_mode_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_password_mode); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_password_bullet */ -#if LV_FONT_MONTSERRAT_32 -static const mp_lv_struct_t mp_lv_font_montserrat_32 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_32 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_bullet_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_password_bullet); +/* Reusing lv_obj_set_hidden for lv_textarea_set_one_line */ -/* - * lvgl lv_font_montserrat_40 global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_one_line_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_one_line); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars */ -#if LV_FONT_MONTSERRAT_40 -static const mp_lv_struct_t mp_lv_font_montserrat_40 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_40 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars); -/* Global struct wrapper for int */ +/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars_static */ -typedef struct { - int value; -} _lv_mp_int_wrapper; - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_static_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars_static); + +/* Reusing lv_obj_delete_delayed for lv_textarea_set_max_length */ -/* - * Struct _lv_mp_int_wrapper - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_max_length_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_max_length); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_insert_replace */ -static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_insert_replace_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_insert_replace); + +/* Reusing lv_obj_set_hidden for lv_textarea_set_text_selection */ -GENMPY_UNUSED static inline void* mp_write_ptr__lv_mp_int_wrapper(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp__lv_mp_int_wrapper_type())); - return (_lv_mp_int_wrapper*)self->data; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_selection_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_text_selection); + +/* Reusing lv_obj_delete_delayed for lv_textarea_set_password_show_time */ -#define mp_write__lv_mp_int_wrapper(struct_obj) *((_lv_mp_int_wrapper*)mp_write_ptr__lv_mp_int_wrapper(struct_obj)) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_show_time_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_password_show_time); + +/* Reusing lv_spangroup_set_align for lv_textarea_set_align */ -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr__lv_mp_int_wrapper(void *field) -{ - return lv_to_mp_struct(get_mp__lv_mp_int_wrapper_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_textarea_set_align); + +/* Reusing lv_checkbox_get_text for lv_textarea_get_text */ -#define mp_read__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(copy_buffer(&field, sizeof(_lv_mp_int_wrapper))) -#define mp_read_byref__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_textarea_get_text); + +/* Reusing lv_dropdown_get_text for lv_textarea_get_placeholder_text */ -static void mp__lv_mp_int_wrapper_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED _lv_mp_int_wrapper *data = (_lv_mp_int_wrapper*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_placeholder_text_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_placeholder_text); + +/* Reusing lv_obj_get_screen for lv_textarea_get_label */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_value: dest[0] = mp_obj_new_int(data->value); break; // converting from int; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_value: data->value = (int)mp_obj_get_int(dest[1]); break; // converting to int; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_label_mpobj, 1, mp_lv_obj_get_screen, lv_textarea_get_label); + +/* Reusing lv_obj_get_child_count for lv_textarea_get_cursor_pos */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_pos_mpobj, 1, mp_lv_obj_get_child_count, lv_textarea_get_cursor_pos); + +/* Reusing lv_obj_refr_size for lv_textarea_get_cursor_click_pos */ -static void mp__lv_mp_int_wrapper_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct _lv_mp_int_wrapper"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_click_pos_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_cursor_click_pos); + +/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_password_mode */ -static const mp_obj_dict_t mp__lv_mp_int_wrapper_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_mode_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_password_mode); + +/* Reusing lv_dropdown_get_text for lv_textarea_get_password_bullet */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp__lv_mp_int_wrapper_type, - MP_QSTR__lv_mp_int_wrapper, - MP_TYPE_FLAG_NONE, - print, mp__lv_mp_int_wrapper_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp__lv_mp_int_wrapper_attr, - locals_dict, &mp__lv_mp_int_wrapper_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_bullet_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_password_bullet); + +/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_one_line */ -static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void) -{ - return &mp__lv_mp_int_wrapper_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_one_line_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_one_line); +/* Reusing lv_dropdown_get_text for lv_textarea_get_accepted_chars */ -/* - * lvgl lv_style_const_prop_id_inv global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_accepted_chars_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_accepted_chars); + +/* Reusing lv_obj_get_event_count for lv_textarea_get_max_length */ -static const mp_lv_struct_t mp_lv_style_const_prop_id_inv = { - { &mp__lv_mp_int_wrapper_type }, - (lv_style_prop_t*)&lv_style_const_prop_id_inv -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_max_length_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_max_length); +/* Reusing lv_obj_is_layout_positioned for lv_textarea_text_is_selected */ -/* - * lvgl lv_obj_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_text_is_selected_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_text_is_selected); + +/* Reusing lv_obj_refr_size for lv_textarea_get_text_selection */ -static const mp_lv_struct_t mp_lv_obj_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_obj_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_selection_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_text_selection); -#define funcptr_create_cb NULL +/* Reusing lv_obj_get_event_count for lv_textarea_get_password_show_time */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_show_time_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_password_show_time); + +/* Reusing lv_obj_get_event_count for lv_textarea_get_current_char */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_current_char_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_current_char); + +/* Reusing lv_obj_move_foreground for lv_textarea_clear_selection */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_clear_selection_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_clear_selection); + +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_right_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_right); + +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_left_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_left); + +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_down */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_down_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_down); + +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_up */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_up_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_up); + +/* Reusing lv_obj_create for lv_textarea_create */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_create_mpobj, 1, mp_lv_obj_create, lv_textarea_create); + /* - * Struct lv_font_info_t + * lvgl textarea object definitions */ + -static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void); +static const mp_rom_map_elem_t textarea_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_char), MP_ROM_PTR(&mp_lv_textarea_add_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_textarea_add_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_char), MP_ROM_PTR(&mp_lv_textarea_delete_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_char_forward), MP_ROM_PTR(&mp_lv_textarea_delete_char_forward_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_textarea_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_set_placeholder_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_click_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_password_mode), MP_ROM_PTR(&mp_lv_textarea_set_password_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_password_bullet), MP_ROM_PTR(&mp_lv_textarea_set_password_bullet_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_one_line), MP_ROM_PTR(&mp_lv_textarea_set_one_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_accepted_chars_static), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_length), MP_ROM_PTR(&mp_lv_textarea_set_max_length_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_insert_replace), MP_ROM_PTR(&mp_lv_textarea_set_insert_replace_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_selection), MP_ROM_PTR(&mp_lv_textarea_set_text_selection_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_password_show_time), MP_ROM_PTR(&mp_lv_textarea_set_password_show_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_textarea_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_textarea_get_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_get_placeholder_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label), MP_ROM_PTR(&mp_lv_textarea_get_label_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_click_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_password_mode), MP_ROM_PTR(&mp_lv_textarea_get_password_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_password_bullet), MP_ROM_PTR(&mp_lv_textarea_get_password_bullet_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_one_line), MP_ROM_PTR(&mp_lv_textarea_get_one_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_get_accepted_chars_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_length), MP_ROM_PTR(&mp_lv_textarea_get_max_length_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_selected), MP_ROM_PTR(&mp_lv_textarea_text_is_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_selection), MP_ROM_PTR(&mp_lv_textarea_get_text_selection_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_password_show_time), MP_ROM_PTR(&mp_lv_textarea_get_password_show_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_char), MP_ROM_PTR(&mp_lv_textarea_get_current_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_selection), MP_ROM_PTR(&mp_lv_textarea_clear_selection_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_right), MP_ROM_PTR(&mp_lv_textarea_cursor_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_left), MP_ROM_PTR(&mp_lv_textarea_cursor_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_down), MP_ROM_PTR(&mp_lv_textarea_cursor_down_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_up), MP_ROM_PTR(&mp_lv_textarea_cursor_up_mpobj) } +}; -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_info_t(mp_obj_t self_in) +static MP_DEFINE_CONST_DICT(textarea_locals_dict, textarea_locals_dict_table); + +static void textarea_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_info_t_type())); - return (lv_font_info_t*)self->data; + mp_printf(print, "lvgl textarea"); } -#define mp_write_lv_font_info_t(struct_obj) *((lv_font_info_t*)mp_write_ptr_lv_font_info_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_info_t(void *field) +static mp_obj_t textarea_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - return lv_to_mp_struct(get_mp_lv_font_info_t_type(), field); + return make_new(&mp_lv_textarea_create_mpobj, type, n_args, n_kw, args); } -#define mp_read_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(copy_buffer(&field, sizeof(lv_font_info_t))) -#define mp_read_byref_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(&field) -static void mp_lv_font_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_info_t *data = (lv_font_info_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_font_class_t *; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; - case MP_QSTR_render_mode: dest[0] = mp_obj_new_int_from_uint(data->render_mode); break; // converting from uint32_t; - case MP_QSTR_style: dest[0] = mp_obj_new_int_from_uint(data->style); break; // converting from uint32_t; - case MP_QSTR_kerning: dest[0] = mp_obj_new_int(data->kerning); break; // converting from lv_font_kerning_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_class_t *; - case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_render_mode: data->render_mode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_style: data->style = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_kerning: data->kerning = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_kerning_t; - default: return; - } +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_textarea_type_base, + MP_QSTR_textarea, + MP_TYPE_FLAG_NONE, + print, textarea_print, + make_new, textarea_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &textarea_locals_dict +); - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_textarea_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_textarea_class, +#endif + .mp_obj_type = &mp_lv_textarea_type_base, +}; + +/* Reusing lv_obj_move_to_index for lv_spinbox_set_value */ -static void mp_lv_font_info_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_font_info_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_value); + +/* Reusing lv_obj_set_hidden for lv_spinbox_set_rollover */ -static const mp_obj_dict_t mp_lv_font_info_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_rollover_mpobj, 2, mp_lv_obj_set_hidden, lv_spinbox_set_rollover); + +/* Reusing lv_obj_fade_in for lv_spinbox_set_digit_format */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_info_t_type, - MP_QSTR_lv_font_info_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_font_info_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_font_info_t_attr, - locals_dict, &mp_lv_font_info_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_format_mpobj, 3, mp_lv_obj_fade_in, lv_spinbox_set_digit_format); + +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_digit_count */ -static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void) -{ - return &mp_lv_font_info_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_digit_count); +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_dec_point_pos */ -/* - * lvgl extension definition for: - * lv_font_t *create_cb(const lv_font_info_t *info, const void *src) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_dec_point_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_dec_point_pos); + +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_step */ -static mp_obj_t mp_funcptr_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_font_info_t *info = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - lv_font_t * _res = ((lv_font_t *(*)(const lv_font_info_t *, const void *))lv_func_ptr)(info, src); - return mp_read_ptr_lv_font_t((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_step_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_step); + +/* Reusing lv_obj_set_pos for lv_spinbox_set_range */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_spinbox_set_range); + +/* Reusing lv_obj_move_to_index for lv_spinbox_set_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_create_cb_mpobj, 2, mp_funcptr_create_cb, funcptr_create_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_min_value); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_move_to_index for lv_spinbox_set_max_value */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_max_value); + +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_cursor_pos */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_create_cb_callback' - * lv_font_t *(*create_cb)(const lv_font_info_t *info, const void *src) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_cursor_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_cursor_pos); -#define funcptr_delete_cb NULL +/* Reusing lv_obj_set_scroll_dir for lv_spinbox_set_digit_step_direction */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_step_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_spinbox_set_digit_step_direction); + +/* Reusing lv_obj_refr_size for lv_spinbox_get_rollover */ -/* - * lvgl extension definition for: - * void delete_cb(lv_font_t *font) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_rollover_mpobj, 1, mp_lv_obj_refr_size, lv_spinbox_get_rollover); + +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_value */ -static mp_obj_t mp_funcptr_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); - ((void (*)(lv_font_t *))lv_func_ptr)(font); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_value); + +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_step */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_step_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_step); + +/* Reusing lv_obj_get_event_count for lv_spinbox_get_digit_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_delete_cb_mpobj, 1, mp_funcptr_delete_cb, funcptr_delete_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_count_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_digit_count); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_delete_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_get_event_count for lv_spinbox_get_dec_point_pos */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_dec_point_pos_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_dec_point_pos); + +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_min_value */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_delete_cb_callback' - * void (*delete_cb)(lv_font_t *font) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_min_value); -#define funcptr_dup_src_cb NULL +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_max_value */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_max_value); + /* * lvgl extension definition for: - * void *dup_src_cb(const void *src) + * lv_dir_t lv_spinbox_get_digit_step_direction(lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_dup_src_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spinbox_get_digit_step_direction(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *src = (const void *)mp_to_ptr(mp_args[0]); - void * _res = ((void *(*)(const void *))lv_func_ptr)(src); - return ptr_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_dir_t _res = ((lv_dir_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dup_src_cb_mpobj, 1, mp_funcptr_dup_src_cb, funcptr_dup_src_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_step_direction_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_spinbox_get_digit_step_direction); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dup_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_move_foreground for lv_spinbox_step_next */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_next_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_next); + +/* Reusing lv_obj_move_foreground for lv_spinbox_step_prev */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_dup_src_cb_callback' - * void *(*dup_src_cb)(const void *src) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_prev_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_prev); -#define funcptr_free_src_cb NULL +/* Reusing lv_obj_move_foreground for lv_spinbox_increment */ -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_free_src_cb */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_increment_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_increment); + +/* Reusing lv_obj_move_foreground for lv_spinbox_decrement */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_free_src_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_free_src_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_decrement_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_decrement); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_free_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_bind_checked for lv_spinbox_bind_value */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_spinbox_bind_value); + +/* Reusing lv_obj_create for lv_spinbox_create */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_free_src_cb_callback' - * void (*free_src_cb)(void *src) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_create_mpobj, 1, mp_lv_obj_create, lv_spinbox_create); /* - * Struct lv_font_class_t + * lvgl spinbox object definitions */ + -static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_class_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_class_t_type())); - return (lv_font_class_t*)self->data; -} +static const mp_rom_map_elem_t spinbox_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_spinbox_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rollover), MP_ROM_PTR(&mp_lv_spinbox_set_rollover_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_digit_format), MP_ROM_PTR(&mp_lv_spinbox_set_digit_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_digit_count), MP_ROM_PTR(&mp_lv_spinbox_set_digit_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_set_dec_point_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_step), MP_ROM_PTR(&mp_lv_spinbox_set_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_spinbox_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_spinbox_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_spinbox_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_spinbox_set_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_set_digit_step_direction_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rollover), MP_ROM_PTR(&mp_lv_spinbox_get_rollover_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_spinbox_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_step), MP_ROM_PTR(&mp_lv_spinbox_get_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_digit_count), MP_ROM_PTR(&mp_lv_spinbox_get_digit_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_get_dec_point_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_spinbox_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_spinbox_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_get_digit_step_direction_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_step_next), MP_ROM_PTR(&mp_lv_spinbox_step_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_step_prev), MP_ROM_PTR(&mp_lv_spinbox_step_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_increment), MP_ROM_PTR(&mp_lv_spinbox_increment_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decrement), MP_ROM_PTR(&mp_lv_spinbox_decrement_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_spinbox_bind_value_mpobj) } +}; -#define mp_write_lv_font_class_t(struct_obj) *((lv_font_class_t*)mp_write_ptr_lv_font_class_t(struct_obj)) +static MP_DEFINE_CONST_DICT(spinbox_locals_dict, spinbox_locals_dict_table); -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_class_t(void *field) +static void spinbox_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - return lv_to_mp_struct(get_mp_lv_font_class_t_type(), field); + mp_printf(print, "lvgl spinbox"); } -#define mp_read_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(copy_buffer(&field, sizeof(lv_font_class_t))) -#define mp_read_byref_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(&field) - -static void mp_lv_font_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_class_t *data = (lv_font_class_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, (void*)data->create_cb, NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL); break; // converting from callback lv_font_t *(*)(lv_font_info_t *info, void *src); - case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL); break; // converting from callback void (*)(lv_font_t *font); - case MP_QSTR_dup_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, (void*)data->dup_src_cb, NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL); break; // converting from callback void *(*)(void *src); - case MP_QSTR_free_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, (void*)data->free_src_cb, NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL); break; // converting from callback void (*)(void *src); - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_create_cb: data->create_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_font_t *(*)(lv_font_info_t *info, void *src); - case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font); - case MP_QSTR_dup_src_cb: data->dup_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(void *src); - case MP_QSTR_free_src_cb: data->free_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(void *src); - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} -static void mp_lv_font_class_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t spinbox_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - mp_printf(print, "struct lv_font_class_t"); + return make_new(&mp_lv_spinbox_create_mpobj, type, n_args, n_kw, args); } -static const mp_obj_dict_t mp_lv_font_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_class_t_type, - MP_QSTR_lv_font_class_t, + mp_lv_spinbox_type_base, + MP_QSTR_spinbox, MP_TYPE_FLAG_NONE, - print, mp_lv_font_class_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_font_class_t_attr, - locals_dict, &mp_lv_font_class_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, spinbox_print, + make_new, spinbox_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &spinbox_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void) -{ - return &mp_lv_font_class_t_type; -} - - -/* - * lvgl lv_binfont_font_class global definitions - */ - -static const mp_lv_struct_t mp_lv_binfont_font_class = { - { &mp_lv_font_class_t_type }, - (lv_font_class_t*)&lv_binfont_font_class +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinbox_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_spinbox_class, +#endif + .mp_obj_type = &mp_lv_spinbox_type_base, }; +/* Reusing lv_obj_fade_in for lv_spinner_set_anim_params */ -/* - * lvgl lv_builtin_font_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_params_mpobj, 3, mp_lv_obj_fade_in, lv_spinner_set_anim_params); + +/* Reusing lv_obj_delete_delayed for lv_spinner_set_anim_duration */ -static const mp_lv_struct_t mp_lv_builtin_font_class = { - { &mp_lv_font_class_t_type }, - (lv_font_class_t*)&lv_builtin_font_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_anim_duration); +/* Reusing lv_obj_delete_delayed for lv_spinner_set_arc_sweep */ -/* - * lvgl lv_image_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_arc_sweep_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_arc_sweep); + +/* Reusing lv_obj_get_event_count for lv_spinner_get_anim_duration */ -static const mp_lv_struct_t mp_lv_image_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_image_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_anim_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_anim_duration); +/* Reusing lv_obj_get_event_count for lv_spinner_get_arc_sweep */ -/* - * lvgl lv_animimg_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_arc_sweep_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_arc_sweep); + +/* Reusing lv_obj_create for lv_spinner_create */ -static const mp_lv_struct_t mp_lv_animimg_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_animimg_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_create_mpobj, 1, mp_lv_obj_create, lv_spinner_create); /* - * lvgl lv_arc_class global definitions + * lvgl spinner object definitions */ + -static const mp_lv_struct_t mp_lv_arc_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_arc_class +static const mp_rom_map_elem_t spinner_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_anim_params), MP_ROM_PTR(&mp_lv_spinner_set_anim_params_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_spinner_set_anim_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_set_arc_sweep_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_anim_duration), MP_ROM_PTR(&mp_lv_spinner_get_anim_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_get_arc_sweep_mpobj) } }; - -/* - * lvgl lv_arclabel_class global definitions - */ +static MP_DEFINE_CONST_DICT(spinner_locals_dict, spinner_locals_dict_table); -static const mp_lv_struct_t mp_lv_arclabel_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_arclabel_class -}; - +static void spinner_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl spinner"); +} -/* - * lvgl lv_label_class global definitions - */ -static const mp_lv_struct_t mp_lv_label_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_label_class -}; - +static mp_obj_t spinner_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_spinner_create_mpobj, type, n_args, n_kw, args); +} -/* - * lvgl lv_bar_class global definitions - */ -static const mp_lv_struct_t mp_lv_bar_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_bar_class +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_spinner_type_base, + MP_QSTR_spinner, + MP_TYPE_FLAG_NONE, + print, spinner_print, + make_new, spinner_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &spinner_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinner_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_spinner_class, +#endif + .mp_obj_type = &mp_lv_spinner_type_base, }; /* - * lvgl lv_button_class global definitions + * lvgl extension definition for: + * void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation) */ -static const mp_lv_struct_t mp_lv_button_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_button_class -}; - +static mp_obj_t mp_lv_switch_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_switch_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_switch_orientation_t))lv_func_ptr)(obj, orientation); + return mp_const_none; +} -/* - * lvgl lv_buttonmatrix_class global definitions - */ + -static const mp_lv_struct_t mp_lv_buttonmatrix_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_buttonmatrix_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_set_orientation_mpobj, 2, mp_lv_switch_set_orientation, lv_switch_set_orientation); /* - * lvgl lv_calendar_class global definitions + * lvgl extension definition for: + * lv_switch_orientation_t lv_switch_get_orientation(lv_obj_t *obj) */ -static const mp_lv_struct_t mp_lv_calendar_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_calendar_class -}; - +static mp_obj_t mp_lv_switch_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_switch_orientation_t _res = ((lv_switch_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} -/* - * lvgl lv_calendar_header_arrow_class global definitions - */ + -static const mp_lv_struct_t mp_lv_calendar_header_arrow_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_calendar_header_arrow_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_get_orientation_mpobj, 1, mp_lv_switch_get_orientation, lv_switch_get_orientation); +/* Reusing lv_obj_create for lv_switch_create */ -/* - * lvgl lv_calendar_header_dropdown_class global definitions - */ - -static const mp_lv_struct_t mp_lv_calendar_header_dropdown_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_calendar_header_dropdown_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_create_mpobj, 1, mp_lv_obj_create, lv_switch_create); /* - * lvgl lv_canvas_class global definitions + * lvgl switch object definitions */ + -static const mp_lv_struct_t mp_lv_canvas_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_canvas_class +static const mp_rom_map_elem_t switch_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_switch_set_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_switch_get_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SWITCH_ORIENTATION_type_base) } }; - -/* - * lvgl lv_chart_class global definitions - */ +static MP_DEFINE_CONST_DICT(switch_locals_dict, switch_locals_dict_table); -static const mp_lv_struct_t mp_lv_chart_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_chart_class -}; - +static void switch_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl switch"); +} -/* - * lvgl lv_checkbox_class global definitions - */ -static const mp_lv_struct_t mp_lv_checkbox_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_checkbox_class -}; - +static mp_obj_t switch_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_switch_create_mpobj, type, n_args, n_kw, args); +} -/* - * lvgl lv_dropdown_class global definitions - */ -static const mp_lv_struct_t mp_lv_dropdown_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_dropdown_class +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_switch_type_base, + MP_QSTR_switch, + MP_TYPE_FLAG_NONE, + print, switch_print, + make_new, switch_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &switch_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_switch_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_switch_class, +#endif + .mp_obj_type = &mp_lv_switch_type_base, }; /* - * lvgl lv_dropdownlist_class global definitions + * lvgl extension definition for: + * void lv_table_set_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col, const char *txt) */ -static const mp_lv_struct_t mp_lv_dropdownlist_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_dropdownlist_class -}; - +static mp_obj_t mp_lv_table_set_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, const char *))lv_func_ptr)(obj, row, col, txt); + return mp_const_none; +} -/* - * lvgl lv_gif_class global definitions - */ + -static const mp_lv_struct_t mp_lv_gif_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_gif_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_value_mpobj, 4, mp_lv_table_set_cell_value, lv_table_set_cell_value); +/* Reusing lv_obj_delete_delayed for lv_table_set_row_count */ -/* - * lvgl lv_imagebutton_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_row_count); + +/* Reusing lv_obj_delete_delayed for lv_table_set_column_count */ -static const mp_lv_struct_t mp_lv_imagebutton_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_imagebutton_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_column_count); /* - * lvgl lv_keyboard_class global definitions + * lvgl extension definition for: + * void lv_table_set_column_width(lv_obj_t *obj, uint32_t col_id, int32_t w) */ -static const mp_lv_struct_t mp_lv_keyboard_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_keyboard_class -}; - +static mp_obj_t mp_lv_table_set_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, int32_t))lv_func_ptr)(obj, col_id, w); + return mp_const_none; +} -/* - * lvgl lv_led_class global definitions - */ + -static const mp_lv_struct_t mp_lv_led_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_led_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_width_mpobj, 3, mp_lv_table_set_column_width, lv_table_set_column_width); /* - * lvgl lv_line_class global definitions + * lvgl extension definition for: + * void lv_table_set_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) */ -static const mp_lv_struct_t mp_lv_line_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_line_class -}; - +static mp_obj_t mp_lv_table_set_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); + return mp_const_none; +} -/* - * lvgl lv_list_class global definitions - */ + -static const mp_lv_struct_t mp_lv_list_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_list_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_set_cell_ctrl); +/* Reusing lv_table_set_cell_ctrl for lv_table_clear_cell_ctrl */ -/* - * lvgl lv_list_text_class global definitions - */ - -static const mp_lv_struct_t mp_lv_list_text_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_list_text_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_clear_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_clear_cell_ctrl); /* - * lvgl lv_list_button_class global definitions + * lvgl extension definition for: + * void lv_table_set_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col, void *user_data) */ -static const mp_lv_struct_t mp_lv_list_button_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_list_button_class -}; - +static mp_obj_t mp_lv_table_set_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[3]); + uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); + uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + ((void (*)(lv_obj_t *, uint16_t, uint16_t, void *))lv_func_ptr)(obj, row, col, user_data); + return mp_const_none; +} -/* - * lvgl lv_menu_class global definitions - */ + -static const mp_lv_struct_t mp_lv_menu_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_user_data_mpobj, 4, mp_lv_table_set_cell_user_data, lv_table_set_cell_user_data); /* - * lvgl lv_menu_page_class global definitions + * lvgl extension definition for: + * void lv_table_set_selected_cell(lv_obj_t *obj, uint16_t row, uint16_t col) */ -static const mp_lv_struct_t mp_lv_menu_page_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_page_class -}; - +static mp_obj_t mp_lv_table_set_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); + uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); + return mp_const_none; +} -/* - * lvgl lv_menu_cont_class global definitions - */ + -static const mp_lv_struct_t mp_lv_menu_cont_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_cont_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_selected_cell_mpobj, 3, mp_lv_table_set_selected_cell, lv_table_set_selected_cell); /* - * lvgl lv_menu_section_class global definitions + * lvgl extension definition for: + * const char *lv_table_get_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col) */ -static const mp_lv_struct_t mp_lv_menu_section_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_section_class -}; - +static mp_obj_t mp_lv_table_get_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + const char * _res = ((const char *(*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, row, col); + return convert_to_str((void*)_res); +} -/* - * lvgl lv_menu_separator_class global definitions - */ + -static const mp_lv_struct_t mp_lv_menu_separator_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_separator_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_value_mpobj, 3, mp_lv_table_get_cell_value, lv_table_get_cell_value); +/* Reusing lv_obj_get_event_count for lv_table_get_row_count */ -/* - * lvgl lv_menu_sidebar_cont_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_row_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_row_count); + +/* Reusing lv_obj_get_event_count for lv_table_get_column_count */ -static const mp_lv_struct_t mp_lv_menu_sidebar_cont_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_sidebar_cont_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_column_count); /* - * lvgl lv_menu_main_cont_class global definitions + * lvgl extension definition for: + * int32_t lv_table_get_column_width(lv_obj_t *obj, uint32_t col) */ -static const mp_lv_struct_t mp_lv_menu_main_cont_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_main_cont_class -}; - +static mp_obj_t mp_lv_table_get_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, col); + return mp_obj_new_int(_res); +} -/* - * lvgl lv_menu_sidebar_header_cont_class global definitions - */ + -static const mp_lv_struct_t mp_lv_menu_sidebar_header_cont_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_sidebar_header_cont_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_width_mpobj, 2, mp_lv_table_get_column_width, lv_table_get_column_width); /* - * lvgl lv_menu_main_header_cont_class global definitions + * lvgl extension definition for: + * bool lv_table_has_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) */ -static const mp_lv_struct_t mp_lv_menu_main_header_cont_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_main_header_cont_class -}; - +static mp_obj_t mp_lv_table_has_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); + return convert_to_bool(_res); +} -/* - * lvgl lv_msgbox_class global definitions - */ + -static const mp_lv_struct_t mp_lv_msgbox_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_has_cell_ctrl_mpobj, 4, mp_lv_table_has_cell_ctrl, lv_table_has_cell_ctrl); /* - * lvgl lv_msgbox_header_class global definitions + * lvgl extension definition for: + * void lv_table_get_selected_cell(lv_obj_t *obj, uint32_t *row, uint32_t *col) */ -static const mp_lv_struct_t mp_lv_msgbox_header_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_header_class -}; - +static mp_obj_t mp_lv_table_get_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t *row = mp_array_to_u32ptr(mp_args[1]); + uint32_t *col = mp_array_to_u32ptr(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t *, uint32_t *))lv_func_ptr)(obj, row, col); + return mp_const_none; +} -/* - * lvgl lv_msgbox_content_class global definitions - */ + -static const mp_lv_struct_t mp_lv_msgbox_content_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_content_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_selected_cell_mpobj, 3, mp_lv_table_get_selected_cell, lv_table_get_selected_cell); /* - * lvgl lv_msgbox_footer_class global definitions + * lvgl extension definition for: + * void *lv_table_get_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col) */ -static const mp_lv_struct_t mp_lv_msgbox_footer_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_footer_class -}; - +static mp_obj_t mp_lv_table_get_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); + uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); + return ptr_to_mp((void*)_res); +} -/* - * lvgl lv_msgbox_header_button_class global definitions - */ + -static const mp_lv_struct_t mp_lv_msgbox_header_button_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_header_button_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_user_data_mpobj, 3, mp_lv_table_get_cell_user_data, lv_table_get_cell_user_data); +/* Reusing lv_obj_create for lv_table_create */ -/* - * lvgl lv_msgbox_footer_button_class global definitions - */ - -static const mp_lv_struct_t mp_lv_msgbox_footer_button_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_footer_button_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_create_mpobj, 1, mp_lv_obj_create, lv_table_create); /* - * lvgl lv_msgbox_backdrop_class global definitions + * lvgl table object definitions */ + -static const mp_lv_struct_t mp_lv_msgbox_backdrop_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_backdrop_class +static const mp_rom_map_elem_t table_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_cell_value), MP_ROM_PTR(&mp_lv_table_set_cell_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_row_count), MP_ROM_PTR(&mp_lv_table_set_row_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_column_count), MP_ROM_PTR(&mp_lv_table_set_column_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_column_width), MP_ROM_PTR(&mp_lv_table_set_column_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cell_ctrl), MP_ROM_PTR(&mp_lv_table_set_cell_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_cell_ctrl), MP_ROM_PTR(&mp_lv_table_clear_cell_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cell_user_data), MP_ROM_PTR(&mp_lv_table_set_cell_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_cell), MP_ROM_PTR(&mp_lv_table_set_selected_cell_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cell_value), MP_ROM_PTR(&mp_lv_table_get_cell_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_row_count), MP_ROM_PTR(&mp_lv_table_get_row_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_column_count), MP_ROM_PTR(&mp_lv_table_get_column_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_column_width), MP_ROM_PTR(&mp_lv_table_get_column_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_cell_ctrl), MP_ROM_PTR(&mp_lv_table_has_cell_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_cell), MP_ROM_PTR(&mp_lv_table_get_selected_cell_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cell_user_data), MP_ROM_PTR(&mp_lv_table_get_cell_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_CELL_CTRL), MP_ROM_PTR(&mp_lv_LV_TABLE_CELL_CTRL_type_base) } }; - -/* - * lvgl lv_roller_class global definitions - */ +static MP_DEFINE_CONST_DICT(table_locals_dict, table_locals_dict_table); -static const mp_lv_struct_t mp_lv_roller_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_roller_class -}; - +static void table_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl table"); +} -/* - * lvgl lv_scale_class global definitions - */ -static const mp_lv_struct_t mp_lv_scale_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_scale_class -}; - +static mp_obj_t table_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_table_create_mpobj, type, n_args, n_kw, args); +} -/* - * lvgl lv_slider_class global definitions - */ -static const mp_lv_struct_t mp_lv_slider_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_slider_class +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_table_type_base, + MP_QSTR_table, + MP_TYPE_FLAG_NONE, + print, table_print, + make_new, table_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &table_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_table_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_table_class, +#endif + .mp_obj_type = &mp_lv_table_type_base, }; +/* Reusing lv_list_add_text for lv_tabview_add_tab */ -/* - * lvgl lv_spangroup_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_add_tab_mpobj, 2, mp_lv_list_add_text, lv_tabview_add_tab); + +/* Reusing lv_label_ins_text for lv_tabview_set_tab_text */ -static const mp_lv_struct_t mp_lv_spangroup_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_spangroup_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_text_mpobj, 3, mp_lv_label_ins_text, lv_tabview_set_tab_text); +/* Reusing lv_roller_set_selected for lv_tabview_set_active */ -/* - * lvgl lv_textarea_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_active_mpobj, 3, mp_lv_roller_set_selected, lv_tabview_set_active); + +/* Reusing lv_obj_set_scroll_dir for lv_tabview_set_tab_bar_position */ -static const mp_lv_struct_t mp_lv_textarea_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_textarea_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_position_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_tabview_set_tab_bar_position); +/* Reusing lv_obj_move_to_index for lv_tabview_set_tab_bar_size */ -/* - * lvgl lv_spinbox_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_size_mpobj, 2, mp_lv_obj_move_to_index, lv_tabview_set_tab_bar_size); + +/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_count */ -static const mp_lv_struct_t mp_lv_spinbox_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_spinbox_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_count_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_count); + +/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_active */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_active_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_active); /* - * lvgl lv_spinner_class global definitions + * lvgl extension definition for: + * lv_obj_t *lv_tabview_get_tab_button(lv_obj_t *obj, int32_t idx) */ -static const mp_lv_struct_t mp_lv_spinner_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_spinner_class -}; +static mp_obj_t mp_lv_tabview_get_tab_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_button_mpobj, 2, mp_lv_tabview_get_tab_button, lv_tabview_get_tab_button); +/* Reusing lv_obj_create for lv_tabview_get_content */ -/* - * lvgl lv_switch_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_content_mpobj, 1, mp_lv_obj_create, lv_tabview_get_content); + +/* Reusing lv_obj_create for lv_tabview_get_tab_bar */ -static const mp_lv_struct_t mp_lv_switch_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_switch_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_mpobj, 1, mp_lv_obj_create, lv_tabview_get_tab_bar); +/* Reusing lv_spinbox_get_digit_step_direction for lv_tabview_get_tab_bar_position */ -/* - * lvgl lv_table_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_position_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_tabview_get_tab_bar_position); + +/* Reusing lv_obj_create for lv_tabview_create */ -static const mp_lv_struct_t mp_lv_table_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_table_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_create_mpobj, 1, mp_lv_obj_create, lv_tabview_create); /* - * lvgl lv_tabview_class global definitions + * lvgl tabview object definitions */ + -static const mp_lv_struct_t mp_lv_tabview_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_tabview_class +static const mp_rom_map_elem_t tabview_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_tab), MP_ROM_PTR(&mp_lv_tabview_add_tab_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tab_text), MP_ROM_PTR(&mp_lv_tabview_set_tab_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_active), MP_ROM_PTR(&mp_lv_tabview_set_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_position_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tab_bar_size), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_count), MP_ROM_PTR(&mp_lv_tabview_get_tab_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_active), MP_ROM_PTR(&mp_lv_tabview_get_tab_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_button), MP_ROM_PTR(&mp_lv_tabview_get_tab_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_tabview_get_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_bar), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_position_mpobj) } +}; + +static MP_DEFINE_CONST_DICT(tabview_locals_dict, tabview_locals_dict_table); + +static void tabview_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl tabview"); +} + + +static mp_obj_t tabview_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_tabview_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tabview_type_base, + MP_QSTR_tabview, + MP_TYPE_FLAG_NONE, + print, tabview_print, + make_new, tabview_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &tabview_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tabview_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_tabview_class, +#endif + .mp_obj_type = &mp_lv_tabview_type_base, +}; + + +/* + * lvgl extension definition for: + * lv_obj_t *lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir) + */ + +static mp_obj_t mp_lv_tileview_add_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *tv = mp_to_lv(mp_args[0]); + uint8_t col_id = (uint8_t)mp_obj_get_int(mp_args[1]); + uint8_t row_id = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_dir_t dir = (int)mp_obj_get_int(mp_args[3]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, uint8_t, uint8_t, lv_dir_t))lv_func_ptr)(tv, col_id, row_id, dir); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_add_tile_mpobj, 4, mp_lv_tileview_add_tile, lv_tileview_add_tile); + + +/* + * lvgl extension definition for: + * void lv_tileview_set_tile(lv_obj_t *obj, lv_obj_t *tile_obj, lv_anim_enable_t anim_en) + */ + +static mp_obj_t mp_lv_tileview_set_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *tile_obj = mp_to_lv(mp_args[1]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, tile_obj, anim_en); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_mpobj, 3, mp_lv_tileview_set_tile, lv_tileview_set_tile); + + +/* + * lvgl extension definition for: + * void lv_tileview_set_tile_by_index(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en) + */ + +static mp_obj_t mp_lv_tileview_set_tile_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *tv = mp_to_lv(mp_args[0]); + uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t row_id = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_anim_enable_t))lv_func_ptr)(tv, col_id, row_id, anim_en); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_by_index_mpobj, 4, mp_lv_tileview_set_tile_by_index, lv_tileview_set_tile_by_index); + +/* Reusing lv_obj_create for lv_tileview_get_tile_active */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_get_tile_active_mpobj, 1, mp_lv_obj_create, lv_tileview_get_tile_active); + +/* Reusing lv_obj_create for lv_tileview_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_create_mpobj, 1, mp_lv_obj_create, lv_tileview_create); + + +/* + * lvgl tileview object definitions + */ + + +static const mp_rom_map_elem_t tileview_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_tile), MP_ROM_PTR(&mp_lv_tileview_add_tile_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tile), MP_ROM_PTR(&mp_lv_tileview_set_tile_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tile_by_index), MP_ROM_PTR(&mp_lv_tileview_set_tile_by_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tile_active), MP_ROM_PTR(&mp_lv_tileview_get_tile_active_mpobj) } +}; + +static MP_DEFINE_CONST_DICT(tileview_locals_dict, tileview_locals_dict_table); + +static void tileview_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl tileview"); +} + + +static mp_obj_t tileview_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_tileview_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tileview_type_base, + MP_QSTR_tileview, + MP_TYPE_FLAG_NONE, + print, tileview_print, + make_new, tileview_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &tileview_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tileview_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_tileview_class, +#endif + .mp_obj_type = &mp_lv_tileview_type_base, +}; + +/* Reusing lv_list_add_text for lv_win_add_title */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_title_mpobj, 2, mp_lv_list_add_text, lv_win_add_title); + + +/* + * lvgl extension definition for: + * lv_obj_t *lv_win_add_button(lv_obj_t *win, const void *icon, int32_t btn_w) + */ + +static mp_obj_t mp_lv_win_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *win = mp_to_lv(mp_args[0]); + const void *icon = (const void *)mp_to_ptr(mp_args[1]); + int32_t btn_w = (int32_t)mp_obj_get_int(mp_args[2]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, int32_t))lv_func_ptr)(win, icon, btn_w); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_button_mpobj, 3, mp_lv_win_add_button, lv_win_add_button); + +/* Reusing lv_obj_create for lv_win_get_header */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_header_mpobj, 1, mp_lv_obj_create, lv_win_get_header); + +/* Reusing lv_obj_create for lv_win_get_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_content_mpobj, 1, mp_lv_obj_create, lv_win_get_content); + +/* Reusing lv_obj_create for lv_win_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_create_mpobj, 1, mp_lv_obj_create, lv_win_create); + + +/* + * lvgl win object definitions + */ + + +static const mp_rom_map_elem_t win_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_win_add_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_win_add_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_win_get_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_win_get_content_mpobj) } +}; + +static MP_DEFINE_CONST_DICT(win_locals_dict, win_locals_dict_table); + +static void win_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl win"); +} + + +static mp_obj_t win_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_win_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_win_type_base, + MP_QSTR_win, + MP_TYPE_FLAG_NONE, + print, win_print, + make_new, win_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &win_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_win_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_win_class, +#endif + .mp_obj_type = &mp_lv_win_type_base, +}; + + +/* + * lvgl lv_color_filter_shade global definitions + */ + +static const mp_lv_struct_t mp_lv_color_filter_shade = { + { &mp_lv_color_filter_dsc_t_type }, + (lv_color_filter_dsc_t*)&lv_color_filter_shade +}; + + +/* + * lvgl lv_font_montserrat_14 global definitions + */ + +#if LV_FONT_MONTSERRAT_14 +static const mp_lv_struct_t mp_lv_font_montserrat_14 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_14 +}; +#endif + + +/* + * lvgl lv_font_montserrat_16 global definitions + */ + +#if LV_FONT_MONTSERRAT_16 +static const mp_lv_struct_t mp_lv_font_montserrat_16 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_16 +}; +#endif + + +/* + * lvgl lv_font_montserrat_24 global definitions + */ + +#if LV_FONT_MONTSERRAT_24 +static const mp_lv_struct_t mp_lv_font_montserrat_24 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_24 +}; +#endif + + +/* + * lvgl lv_font_montserrat_32 global definitions + */ + +#if LV_FONT_MONTSERRAT_32 +static const mp_lv_struct_t mp_lv_font_montserrat_32 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_32 +}; +#endif + + +/* + * lvgl lv_font_montserrat_40 global definitions + */ + +#if LV_FONT_MONTSERRAT_40 +static const mp_lv_struct_t mp_lv_font_montserrat_40 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_40 +}; +#endif + +/* Global struct wrapper for int */ + +typedef struct { + int value; +} _lv_mp_int_wrapper; + + +/* + * Struct _lv_mp_int_wrapper + */ + +static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr__lv_mp_int_wrapper(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp__lv_mp_int_wrapper_type())); + return (_lv_mp_int_wrapper*)self->data; +} + +#define mp_write__lv_mp_int_wrapper(struct_obj) *((_lv_mp_int_wrapper*)mp_write_ptr__lv_mp_int_wrapper(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr__lv_mp_int_wrapper(void *field) +{ + return lv_to_mp_struct(get_mp__lv_mp_int_wrapper_type(), field); +} + +#define mp_read__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(copy_buffer(&field, sizeof(_lv_mp_int_wrapper))) +#define mp_read_byref__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(&field) + +static void mp__lv_mp_int_wrapper_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED _lv_mp_int_wrapper *data = (_lv_mp_int_wrapper*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_value: dest[0] = mp_obj_new_int(data->value); break; // converting from int; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_value: data->value = (int)mp_obj_get_int(dest[1]); break; // converting to int; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp__lv_mp_int_wrapper_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct _lv_mp_int_wrapper"); +} + +static const mp_obj_dict_t mp__lv_mp_int_wrapper_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp__lv_mp_int_wrapper_type, + MP_QSTR__lv_mp_int_wrapper, + MP_TYPE_FLAG_NONE, + print, mp__lv_mp_int_wrapper_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp__lv_mp_int_wrapper_attr, + locals_dict, &mp__lv_mp_int_wrapper_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void) +{ + return &mp__lv_mp_int_wrapper_type; +} + + +/* + * lvgl lv_style_const_prop_id_inv global definitions + */ + +static const mp_lv_struct_t mp_lv_style_const_prop_id_inv = { + { &mp__lv_mp_int_wrapper_type }, + (lv_style_prop_t*)&lv_style_const_prop_id_inv +}; + + +/* + * lvgl lv_obj_class global definitions + */ + +static const mp_lv_struct_t mp_lv_obj_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_obj_class +}; + +#define funcptr_create_cb NULL + + +/* + * Struct lv_font_info_t + */ + +static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_info_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_info_t_type())); + return (lv_font_info_t*)self->data; +} + +#define mp_write_lv_font_info_t(struct_obj) *((lv_font_info_t*)mp_write_ptr_lv_font_info_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_info_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_font_info_t_type(), field); +} + +#define mp_read_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(copy_buffer(&field, sizeof(lv_font_info_t))) +#define mp_read_byref_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(&field) + +static void mp_lv_font_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_font_info_t *data = (lv_font_info_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_font_class_t *; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; + case MP_QSTR_render_mode: dest[0] = mp_obj_new_int_from_uint(data->render_mode); break; // converting from uint32_t; + case MP_QSTR_style: dest[0] = mp_obj_new_int_from_uint(data->style); break; // converting from uint32_t; + case MP_QSTR_weight: dest[0] = mp_obj_new_int(data->weight); break; // converting from int32_t; + case MP_QSTR_kerning: dest[0] = mp_obj_new_int(data->kerning); break; // converting from lv_font_kerning_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_class_t *; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_render_mode: data->render_mode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_style: data->style = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_weight: data->weight = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_kerning: data->kerning = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_kerning_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_font_info_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_font_info_t"); +} + +static const mp_obj_dict_t mp_lv_font_info_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_font_info_t_type, + MP_QSTR_lv_font_info_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_font_info_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_font_info_t_attr, + locals_dict, &mp_lv_font_info_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void) +{ + return &mp_lv_font_info_t_type; +} + + +/* + * lvgl extension definition for: + * lv_font_t *create_cb(const lv_font_info_t *info, const void *src) + */ + +static mp_obj_t mp_funcptr_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_font_info_t *info = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + lv_font_t * _res = ((lv_font_t *(*)(const lv_font_info_t *, const void *))lv_func_ptr)(info, src); + return mp_read_ptr_lv_font_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_create_cb_mpobj, 2, mp_funcptr_create_cb, funcptr_create_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_create_cb_callback' + * lv_font_t *(*create_cb)(const lv_font_info_t *info, const void *src) + */ + +#define funcptr_delete_cb NULL + + +/* + * lvgl extension definition for: + * void delete_cb(lv_font_t *font) + */ + +static mp_obj_t mp_funcptr_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); + ((void (*)(lv_font_t *))lv_func_ptr)(font); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_delete_cb_mpobj, 1, mp_funcptr_delete_cb, funcptr_delete_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_delete_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_delete_cb_callback' + * void (*delete_cb)(lv_font_t *font) + */ + +#define funcptr_dup_src_cb NULL + + +/* + * lvgl extension definition for: + * void *dup_src_cb(const void *src) + */ + +static mp_obj_t mp_funcptr_dup_src_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const void *src = (const void *)mp_to_ptr(mp_args[0]); + void * _res = ((void *(*)(const void *))lv_func_ptr)(src); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dup_src_cb_mpobj, 1, mp_funcptr_dup_src_cb, funcptr_dup_src_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dup_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_dup_src_cb_callback' + * void *(*dup_src_cb)(const void *src) + */ + +#define funcptr_free_src_cb NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_free_src_cb */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_free_src_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_free_src_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_free_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_free_src_cb_callback' + * void (*free_src_cb)(void *src) + */ + + +/* + * Struct lv_font_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_class_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_class_t_type())); + return (lv_font_class_t*)self->data; +} + +#define mp_write_lv_font_class_t(struct_obj) *((lv_font_class_t*)mp_write_ptr_lv_font_class_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_class_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_font_class_t_type(), field); +} + +#define mp_read_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(copy_buffer(&field, sizeof(lv_font_class_t))) +#define mp_read_byref_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(&field) + +static void mp_lv_font_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_font_class_t *data = (lv_font_class_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, (void*)data->create_cb, NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL); break; // converting from callback lv_font_t *(*)(lv_font_info_t *info, void *src); + case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL); break; // converting from callback void (*)(lv_font_t *font); + case MP_QSTR_dup_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, (void*)data->dup_src_cb, NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL); break; // converting from callback void *(*)(void *src); + case MP_QSTR_free_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, (void*)data->free_src_cb, NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL); break; // converting from callback void (*)(void *src); + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_create_cb: data->create_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_font_t *(*)(lv_font_info_t *info, void *src); + case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font); + case MP_QSTR_dup_src_cb: data->dup_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(void *src); + case MP_QSTR_free_src_cb: data->free_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(void *src); + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_font_class_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_font_class_t"); +} + +static const mp_obj_dict_t mp_lv_font_class_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_font_class_t_type, + MP_QSTR_lv_font_class_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_font_class_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_font_class_t_attr, + locals_dict, &mp_lv_font_class_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void) +{ + return &mp_lv_font_class_t_type; +} + + +/* + * lvgl lv_binfont_font_class global definitions + */ + +static const mp_lv_struct_t mp_lv_binfont_font_class = { + { &mp_lv_font_class_t_type }, + (lv_font_class_t*)&lv_binfont_font_class +}; + + +/* + * lvgl lv_builtin_font_class global definitions + */ + +static const mp_lv_struct_t mp_lv_builtin_font_class = { + { &mp_lv_font_class_t_type }, + (lv_font_class_t*)&lv_builtin_font_class +}; + + +/* + * lvgl lv_image_class global definitions + */ + +static const mp_lv_struct_t mp_lv_image_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_image_class +}; + + +/* + * lvgl lv_animimg_class global definitions + */ + +static const mp_lv_struct_t mp_lv_animimg_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_animimg_class +}; + + +/* + * lvgl lv_arc_class global definitions + */ + +static const mp_lv_struct_t mp_lv_arc_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_arc_class +}; + + +/* + * lvgl lv_arclabel_class global definitions + */ + +static const mp_lv_struct_t mp_lv_arclabel_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_arclabel_class +}; + + +/* + * lvgl lv_label_class global definitions + */ + +static const mp_lv_struct_t mp_lv_label_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_label_class +}; + + +/* + * lvgl lv_bar_class global definitions + */ + +static const mp_lv_struct_t mp_lv_bar_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_bar_class +}; + + +/* + * lvgl lv_canvas_class global definitions + */ + +static const mp_lv_struct_t mp_lv_canvas_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_canvas_class +}; + + +/* + * lvgl lv_barcode_class global definitions + */ + +static const mp_lv_struct_t mp_lv_barcode_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_barcode_class +}; + + +/* + * lvgl lv_button_class global definitions + */ + +static const mp_lv_struct_t mp_lv_button_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_button_class +}; + + +/* + * lvgl lv_buttonmatrix_class global definitions + */ + +static const mp_lv_struct_t mp_lv_buttonmatrix_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_buttonmatrix_class +}; + + +/* + * lvgl lv_calendar_class global definitions + */ + +static const mp_lv_struct_t mp_lv_calendar_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_calendar_class +}; + + +/* + * lvgl lv_calendar_header_arrow_class global definitions + */ + +static const mp_lv_struct_t mp_lv_calendar_header_arrow_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_calendar_header_arrow_class +}; + + +/* + * lvgl lv_calendar_header_dropdown_class global definitions + */ + +static const mp_lv_struct_t mp_lv_calendar_header_dropdown_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_calendar_header_dropdown_class +}; + + +/* + * lvgl lv_chart_class global definitions + */ + +static const mp_lv_struct_t mp_lv_chart_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_chart_class +}; + + +/* + * lvgl lv_checkbox_class global definitions + */ + +static const mp_lv_struct_t mp_lv_checkbox_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_checkbox_class +}; + + +/* + * lvgl lv_dropdown_class global definitions + */ + +static const mp_lv_struct_t mp_lv_dropdown_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_dropdown_class +}; + + +/* + * lvgl lv_dropdownlist_class global definitions + */ + +static const mp_lv_struct_t mp_lv_dropdownlist_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_dropdownlist_class +}; + + +/* + * lvgl lv_gif_class global definitions + */ + +static const mp_lv_struct_t mp_lv_gif_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_gif_class +}; + + +/* + * lvgl lv_imagebutton_class global definitions + */ + +static const mp_lv_struct_t mp_lv_imagebutton_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_imagebutton_class +}; + + +/* + * lvgl lv_keyboard_class global definitions + */ + +static const mp_lv_struct_t mp_lv_keyboard_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_keyboard_class +}; + + +/* + * lvgl lv_led_class global definitions + */ + +static const mp_lv_struct_t mp_lv_led_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_led_class +}; + + +/* + * lvgl lv_line_class global definitions + */ + +static const mp_lv_struct_t mp_lv_line_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_line_class +}; + + +/* + * lvgl lv_list_class global definitions + */ + +static const mp_lv_struct_t mp_lv_list_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_list_class +}; + + +/* + * lvgl lv_list_text_class global definitions + */ + +static const mp_lv_struct_t mp_lv_list_text_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_list_text_class +}; + + +/* + * lvgl lv_list_button_class global definitions + */ + +static const mp_lv_struct_t mp_lv_list_button_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_list_button_class +}; + + +/* + * lvgl lv_menu_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_class +}; + + +/* + * lvgl lv_menu_page_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_page_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_page_class +}; + + +/* + * lvgl lv_menu_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_cont_class +}; + + +/* + * lvgl lv_menu_section_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_section_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_section_class +}; + + +/* + * lvgl lv_menu_separator_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_separator_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_separator_class +}; + + +/* + * lvgl lv_menu_sidebar_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_sidebar_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_sidebar_cont_class +}; + + +/* + * lvgl lv_menu_main_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_main_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_main_cont_class +}; + + +/* + * lvgl lv_menu_sidebar_header_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_sidebar_header_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_sidebar_header_cont_class +}; + + +/* + * lvgl lv_menu_main_header_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_main_header_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_main_header_cont_class +}; + + +/* + * lvgl lv_msgbox_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_class +}; + + +/* + * lvgl lv_msgbox_header_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_header_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_header_class +}; + + +/* + * lvgl lv_msgbox_content_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_content_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_content_class +}; + + +/* + * lvgl lv_msgbox_footer_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_footer_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_footer_class +}; + + +/* + * lvgl lv_msgbox_header_button_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_header_button_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_header_button_class +}; + + +/* + * lvgl lv_msgbox_footer_button_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_footer_button_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_footer_button_class +}; + + +/* + * lvgl lv_msgbox_backdrop_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_backdrop_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_backdrop_class +}; + + +/* + * lvgl lv_qrcode_class global definitions + */ + +static const mp_lv_struct_t mp_lv_qrcode_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_qrcode_class +}; + + +/* + * lvgl lv_roller_class global definitions + */ + +static const mp_lv_struct_t mp_lv_roller_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_roller_class +}; + + +/* + * lvgl lv_scale_class global definitions + */ + +static const mp_lv_struct_t mp_lv_scale_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_scale_class +}; + + +/* + * lvgl lv_slider_class global definitions + */ + +static const mp_lv_struct_t mp_lv_slider_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_slider_class +}; + + +/* + * lvgl lv_spangroup_class global definitions + */ + +static const mp_lv_struct_t mp_lv_spangroup_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_spangroup_class +}; + + +/* + * lvgl lv_textarea_class global definitions + */ + +static const mp_lv_struct_t mp_lv_textarea_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_textarea_class +}; + + +/* + * lvgl lv_spinbox_class global definitions + */ + +static const mp_lv_struct_t mp_lv_spinbox_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_spinbox_class +}; + + +/* + * lvgl lv_spinner_class global definitions + */ + +static const mp_lv_struct_t mp_lv_spinner_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_spinner_class +}; + + +/* + * lvgl lv_switch_class global definitions + */ + +static const mp_lv_struct_t mp_lv_switch_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_switch_class +}; + + +/* + * lvgl lv_table_class global definitions + */ + +static const mp_lv_struct_t mp_lv_table_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_table_class +}; + + +/* + * lvgl lv_tabview_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tabview_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_tabview_class +}; + + +/* + * lvgl lv_tileview_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tileview_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_tileview_class +}; + + +/* + * lvgl lv_tileview_tile_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tileview_tile_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_tileview_tile_class +}; + + +/* + * lvgl lv_win_class global definitions + */ + +static const mp_lv_struct_t mp_lv_win_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_win_class +}; + + +/* + * lvgl lv_cache_class_lru_rb_count global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_rb_count = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_rb_count +}; + + +/* + * lvgl lv_cache_class_lru_rb_size global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_rb_size = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_rb_size +}; + + +/* + * lvgl lv_cache_class_lru_ll_count global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_ll_count = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_ll_count +}; + + +/* + * lvgl lv_cache_class_lru_ll_size global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_ll_size = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_ll_size +}; + + +/* + * lvgl lv_cache_class_sc_da global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_sc_da = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_sc_da +}; + +#define funcptr_lv_tree_constructor_cb_t NULL + + +/* + * Struct lv_tree_node_t + */ + +static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_node_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_node_t_type())); + return (lv_tree_node_t*)self->data; +} + +#define mp_write_lv_tree_node_t(struct_obj) *((lv_tree_node_t*)mp_write_ptr_lv_tree_node_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_node_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_tree_node_t_type(), field); +} + +#define mp_read_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(copy_buffer(&field, sizeof(lv_tree_node_t))) +#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) + +static void mp_lv_tree_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_tree_node_t *data = (lv_tree_node_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_tree_node_t *; + case MP_QSTR_children: dest[0] = ptr_to_mp((void*)data->children); break; // converting from lv_tree_node_t **; + case MP_QSTR_child_cnt: dest[0] = mp_obj_new_int_from_uint(data->child_cnt); break; // converting from uint32_t; + case MP_QSTR_child_cap: dest[0] = mp_obj_new_int_from_uint(data->child_cap); break; // converting from uint32_t; + case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_tree_class_t *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t *; + case MP_QSTR_children: data->children = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t **; + case MP_QSTR_child_cnt: data->child_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_child_cap: data->child_cap = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_tree_node_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_tree_node_t"); +} + +static const mp_obj_dict_t mp_lv_tree_node_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tree_node_t_type, + MP_QSTR_lv_tree_node_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_tree_node_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_tree_node_t_attr, + locals_dict, &mp_lv_tree_node_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void) +{ + return &mp_lv_tree_node_t_type; +} + + +/* + * lvgl extension definition for: + * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + */ + +static mp_obj_t mp_funcptr_lv_tree_constructor_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_to_ptr(mp_args[0]); + lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[1]); + ((void (*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, node); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tree_constructor_cb_t_mpobj, 2, mp_funcptr_lv_tree_constructor_cb_t, funcptr_lv_tree_constructor_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tree_constructor_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_constructor_cb_callback' + * lv_tree_constructor_cb_t constructor_cb + */ + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_destructor_cb_callback' + * lv_tree_destructor_cb_t destructor_cb + */ + + +/* + * Struct lv_tree_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_class_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_class_t_type())); + return (lv_tree_class_t*)self->data; +} + +#define mp_write_lv_tree_class_t(struct_obj) *((lv_tree_class_t*)mp_write_ptr_lv_tree_class_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_class_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_tree_class_t_type(), field); +} + +#define mp_read_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(copy_buffer(&field, sizeof(lv_tree_class_t))) +#define mp_read_byref_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(&field) + +static void mp_lv_tree_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_tree_class_t *data = (lv_tree_class_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_tree_class_t *; + case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; + case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->constructor_cb, NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL); break; // converting from callback lv_tree_constructor_cb_t; + case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->destructor_cb, NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL); break; // converting from callback lv_tree_destructor_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; + case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_constructor_cb: data->constructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_constructor_cb_t; + case MP_QSTR_destructor_cb: data->destructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_destructor_cb_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_tree_class_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_tree_class_t"); +} + +static const mp_obj_dict_t mp_lv_tree_class_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tree_class_t_type, + MP_QSTR_lv_tree_class_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_tree_class_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_tree_class_t_attr, + locals_dict, &mp_lv_tree_class_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void) +{ + return &mp_lv_tree_class_t_type; +} + + +/* + * lvgl lv_tree_node_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tree_node_class = { + { &mp_lv_tree_class_t_type }, + (lv_tree_class_t*)&lv_tree_node_class +}; + + +/* + * lvgl _nesting global definitions + */ + +static const mp_lv_struct_t mp__nesting = { + { &mp__lv_mp_int_wrapper_type }, + (int*)&_nesting }; -/* - * lvgl lv_tileview_class global definitions - */ +/* + * Struct lv_color16_t + */ + +static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color16_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color16_t_type())); + return (lv_color16_t*)self->data; +} + +#define mp_write_lv_color16_t(struct_obj) *((lv_color16_t*)mp_write_ptr_lv_color16_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color16_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_color16_t_type(), field); +} + +#define mp_read_lv_color16_t(field) mp_read_ptr_lv_color16_t(copy_buffer(&field, sizeof(lv_color16_t))) +#define mp_read_byref_lv_color16_t(field) mp_read_ptr_lv_color16_t(&field) + +static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color16_t *data = (lv_color16_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint16_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint16_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_blue: data->blue = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_green: data->green = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_red: data->red = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_color16_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_color16_t"); +} + +static const mp_obj_dict_t mp_lv_color16_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color16_t_type, + MP_QSTR_lv_color16_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color16_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color16_t_attr, + locals_dict, &mp_lv_color16_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void) +{ + return &mp_lv_color16_t_type; +} + + +/* + * Struct lv_mem_monitor_t + */ + +static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_mem_monitor_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_mem_monitor_t_type())); + return (lv_mem_monitor_t*)self->data; +} + +#define mp_write_lv_mem_monitor_t(struct_obj) *((lv_mem_monitor_t*)mp_write_ptr_lv_mem_monitor_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_mem_monitor_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_mem_monitor_t_type(), field); +} + +#define mp_read_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(copy_buffer(&field, sizeof(lv_mem_monitor_t))) +#define mp_read_byref_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(&field) + +static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_mem_monitor_t *data = (lv_mem_monitor_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_total_size: dest[0] = mp_obj_new_int_from_uint(data->total_size); break; // converting from size_t; + case MP_QSTR_free_cnt: dest[0] = mp_obj_new_int_from_uint(data->free_cnt); break; // converting from size_t; + case MP_QSTR_free_size: dest[0] = mp_obj_new_int_from_uint(data->free_size); break; // converting from size_t; + case MP_QSTR_free_biggest_size: dest[0] = mp_obj_new_int_from_uint(data->free_biggest_size); break; // converting from size_t; + case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from size_t; + case MP_QSTR_max_used: dest[0] = mp_obj_new_int_from_uint(data->max_used); break; // converting from size_t; + case MP_QSTR_used_pct: dest[0] = mp_obj_new_int_from_uint(data->used_pct); break; // converting from uint8_t; + case MP_QSTR_frag_pct: dest[0] = mp_obj_new_int_from_uint(data->frag_pct); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_total_size: data->total_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_free_cnt: data->free_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_free_size: data->free_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_free_biggest_size: data->free_biggest_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_used_cnt: data->used_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_max_used: data->max_used = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_used_pct: data->used_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_frag_pct: data->frag_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_mem_monitor_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_mem_monitor_t"); +} + +static const mp_obj_dict_t mp_lv_mem_monitor_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_mem_monitor_t_type, + MP_QSTR_lv_mem_monitor_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_mem_monitor_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_mem_monitor_t_attr, + locals_dict, &mp_lv_mem_monitor_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void) +{ + return &mp_lv_mem_monitor_t_type; +} + +#define funcptr_lv_layout_update_cb_t NULL + +/* Reusing lv_obj_set_user_data for funcptr_lv_layout_update_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_funcptr_lv_layout_update_cb_t_mpobj, 2, mp_lv_obj_set_user_data, funcptr_lv_layout_update_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_layout_update_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_layout_callbacks_t_layout_update_cb_callback' + * lv_layout_update_cb_t layout_update_cb + */ + +#define funcptr_lv_layout_get_min_size_cb_t NULL + + +/* + * lvgl extension definition for: + * bool lv_layout_get_min_size_cb_t(lv_obj_t *, int32_t *req_size, bool width, void *user_data) + */ + +static mp_obj_t mp_funcptr_lv_layout_get_min_size_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[3]); + int32_t *req_size = mp_array_to_i32ptr(mp_args[1]); + bool width = mp_obj_is_true(mp_args[2]); + lv_obj_t *arg0 = mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(lv_obj_t *, int32_t *, bool, void *))lv_func_ptr)(arg0, req_size, width, user_data); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, 4, mp_funcptr_lv_layout_get_min_size_cb_t, funcptr_lv_layout_get_min_size_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_layout_get_min_size_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_layout_callbacks_t_get_min_size_cb_callback' + * lv_layout_get_min_size_cb_t get_min_size_cb + */ + + +/* + * Struct lv_layout_callbacks_t + */ + +static inline const mp_obj_type_t *get_mp_lv_layout_callbacks_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_layout_callbacks_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layout_callbacks_t_type())); + return (lv_layout_callbacks_t*)self->data; +} + +#define mp_write_lv_layout_callbacks_t(struct_obj) *((lv_layout_callbacks_t*)mp_write_ptr_lv_layout_callbacks_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layout_callbacks_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_layout_callbacks_t_type(), field); +} + +#define mp_read_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(copy_buffer(&field, sizeof(lv_layout_callbacks_t))) +#define mp_read_byref_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(&field) + +static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_layout_update_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, data->layout_update_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL); break; // converting from callback lv_layout_update_cb_t; + case MP_QSTR_get_min_size_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, data->get_min_size_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL); break; // converting from callback lv_layout_get_min_size_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_layout_update_cb: data->layout_update_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_update_cb_t; + case MP_QSTR_get_min_size_cb: data->get_min_size_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_get_min_size_cb_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_layout_callbacks_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_layout_callbacks_t"); +} + +static const mp_obj_dict_t mp_lv_layout_callbacks_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_layout_callbacks_t_type, + MP_QSTR_lv_layout_callbacks_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_layout_callbacks_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_layout_callbacks_t_attr, + locals_dict, &mp_lv_layout_callbacks_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_layout_callbacks_t_type(void) +{ + return &mp_lv_layout_callbacks_t_type; +} + +#define funcptr_lv_timer_handler_resume_cb_t NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_timer_handler_resume_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_timer_handler_resume_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_handler_resume_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Struct lv_draw_fill_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_fill_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_fill_dsc_t_type())); + return (lv_draw_fill_dsc_t*)self->data; +} + +#define mp_write_lv_draw_fill_dsc_t(struct_obj) *((lv_draw_fill_dsc_t*)mp_write_ptr_lv_draw_fill_dsc_t(struct_obj)) -static const mp_lv_struct_t mp_lv_tileview_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_tileview_class -}; - +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_fill_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_fill_dsc_t_type(), field); +} -/* - * lvgl lv_tileview_tile_class global definitions - */ +#define mp_read_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(copy_buffer(&field, sizeof(lv_draw_fill_dsc_t))) +#define mp_read_byref_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(&field) -static const mp_lv_struct_t mp_lv_tileview_tile_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_tileview_tile_class -}; - +static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)self->data; -/* - * lvgl lv_win_class global definitions - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; + default: return; + } -static const mp_lv_struct_t mp_lv_win_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_win_class -}; - + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -/* - * lvgl lv_barcode_class global definitions - */ +static void mp_lv_draw_fill_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_draw_fill_dsc_t"); +} -static const mp_lv_struct_t mp_lv_barcode_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_barcode_class -}; - +static const mp_obj_dict_t mp_lv_draw_fill_dsc_t_locals_dict; -/* - * lvgl lv_qrcode_class global definitions - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_fill_dsc_t_type, + MP_QSTR_lv_draw_fill_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_fill_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_fill_dsc_t_attr, + locals_dict, &mp_lv_draw_fill_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static const mp_lv_struct_t mp_lv_qrcode_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_qrcode_class -}; +static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void) +{ + return &mp_lv_draw_fill_dsc_t_type; +} /* - * lvgl lv_cache_class_lru_rb_count global definitions + * Struct lv_draw_border_dsc_t */ -static const mp_lv_struct_t mp_lv_cache_class_lru_rb_count = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_rb_count -}; - +static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void); -/* - * lvgl lv_cache_class_lru_rb_size global definitions - */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_border_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_border_dsc_t_type())); + return (lv_draw_border_dsc_t*)self->data; +} -static const mp_lv_struct_t mp_lv_cache_class_lru_rb_size = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_rb_size -}; - +#define mp_write_lv_draw_border_dsc_t(struct_obj) *((lv_draw_border_dsc_t*)mp_write_ptr_lv_draw_border_dsc_t(struct_obj)) -/* - * lvgl lv_cache_class_lru_ll_count global definitions - */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_border_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_border_dsc_t_type(), field); +} -static const mp_lv_struct_t mp_lv_cache_class_lru_ll_count = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_ll_count -}; - +#define mp_read_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(copy_buffer(&field, sizeof(lv_draw_border_dsc_t))) +#define mp_read_byref_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(&field) -/* - * lvgl lv_cache_class_lru_ll_size global definitions - */ +static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)self->data; -static const mp_lv_struct_t mp_lv_cache_class_lru_ll_size = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_ll_size -}; - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_border_side_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_border_side_t; + default: return; + } -/* - * lvgl lv_cache_class_sc_da global definitions - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static const mp_lv_struct_t mp_lv_cache_class_sc_da = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_sc_da -}; - +static void mp_lv_draw_border_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_draw_border_dsc_t"); +} -/* - * lvgl _nesting global definitions - */ +static const mp_obj_dict_t mp_lv_draw_border_dsc_t_locals_dict; -static const mp_lv_struct_t mp__nesting = { - { &mp__lv_mp_int_wrapper_type }, - (int*)&_nesting -}; +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_border_dsc_t_type, + MP_QSTR_lv_draw_border_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_border_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_border_dsc_t_attr, + locals_dict, &mp_lv_draw_border_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void) +{ + return &mp_lv_draw_border_dsc_t_type; +} /* - * Struct lv_color16_t + * Struct lv_draw_box_shadow_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color16_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color16_t_type())); - return (lv_color16_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_box_shadow_dsc_t_type())); + return (lv_draw_box_shadow_dsc_t*)self->data; } -#define mp_write_lv_color16_t(struct_obj) *((lv_color16_t*)mp_write_ptr_lv_color16_t(struct_obj)) +#define mp_write_lv_draw_box_shadow_dsc_t(struct_obj) *((lv_draw_box_shadow_dsc_t*)mp_write_ptr_lv_draw_box_shadow_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color16_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_box_shadow_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_color16_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_box_shadow_dsc_t_type(), field); } -#define mp_read_lv_color16_t(field) mp_read_ptr_lv_color16_t(copy_buffer(&field, sizeof(lv_color16_t))) -#define mp_read_byref_lv_color16_t(field) mp_read_ptr_lv_color16_t(&field) +#define mp_read_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(copy_buffer(&field, sizeof(lv_draw_box_shadow_dsc_t))) +#define mp_read_byref_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(&field) -static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color16_t *data = (lv_color16_t*)self->data; + GENMPY_UNUSED lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint16_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint16_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint16_t; + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; + case MP_QSTR_spread: dest[0] = mp_obj_new_int(data->spread); break; // converting from int32_t; + case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int32_t; + case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int32_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_bg_cover: dest[0] = mp_obj_new_int_from_uint(data->bg_cover); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -28637,9 +31224,15 @@ static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_blue: data->blue = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_green: data->green = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_red: data->red = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_spread: data->spread = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ofs_x: data->ofs_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ofs_y: data->ofs_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_bg_cover: data->bg_cover = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -28648,74 +31241,82 @@ static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_color16_t_print(const mp_print_t *print, +static void mp_lv_draw_box_shadow_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color16_t"); + mp_printf(print, "struct lv_draw_box_shadow_dsc_t"); } -static const mp_obj_dict_t mp_lv_color16_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_box_shadow_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color16_t_type, - MP_QSTR_lv_color16_t, + mp_lv_draw_box_shadow_dsc_t_type, + MP_QSTR_lv_draw_box_shadow_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color16_t_print, + print, mp_lv_draw_box_shadow_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color16_t_attr, - locals_dict, &mp_lv_color16_t_locals_dict, + attr, mp_lv_draw_box_shadow_dsc_t_attr, + locals_dict, &mp_lv_draw_box_shadow_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void) { - return &mp_lv_color16_t_type; + return &mp_lv_draw_box_shadow_dsc_t_type; } /* - * Struct lv_mem_monitor_t + * Struct lv_draw_letter_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_mem_monitor_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_letter_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_mem_monitor_t_type())); - return (lv_mem_monitor_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_letter_dsc_t_type())); + return (lv_draw_letter_dsc_t*)self->data; } -#define mp_write_lv_mem_monitor_t(struct_obj) *((lv_mem_monitor_t*)mp_write_ptr_lv_mem_monitor_t(struct_obj)) +#define mp_write_lv_draw_letter_dsc_t(struct_obj) *((lv_draw_letter_dsc_t*)mp_write_ptr_lv_draw_letter_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_mem_monitor_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_letter_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_mem_monitor_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_letter_dsc_t_type(), field); } -#define mp_read_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(copy_buffer(&field, sizeof(lv_mem_monitor_t))) -#define mp_read_byref_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(&field) +#define mp_read_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(copy_buffer(&field, sizeof(lv_draw_letter_dsc_t))) +#define mp_read_byref_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(&field) -static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_mem_monitor_t *data = (lv_mem_monitor_t*)self->data; + GENMPY_UNUSED lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_total_size: dest[0] = mp_obj_new_int_from_uint(data->total_size); break; // converting from size_t; - case MP_QSTR_free_cnt: dest[0] = mp_obj_new_int_from_uint(data->free_cnt); break; // converting from size_t; - case MP_QSTR_free_size: dest[0] = mp_obj_new_int_from_uint(data->free_size); break; // converting from size_t; - case MP_QSTR_free_biggest_size: dest[0] = mp_obj_new_int_from_uint(data->free_biggest_size); break; // converting from size_t; - case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from size_t; - case MP_QSTR_max_used: dest[0] = mp_obj_new_int_from_uint(data->max_used); break; // converting from size_t; - case MP_QSTR_used_pct: dest[0] = mp_obj_new_int_from_uint(data->used_pct); break; // converting from uint8_t; - case MP_QSTR_frag_pct: dest[0] = mp_obj_new_int_from_uint(data->frag_pct); break; // converting from uint8_t; + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_unicode: dest[0] = mp_obj_new_int_from_uint(data->unicode); break; // converting from uint32_t; + case MP_QSTR_font: dest[0] = mp_read_ptr_lv_font_t((void*)data->font); break; // converting from lv_font_t *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; + case MP_QSTR_scale_x: dest[0] = mp_obj_new_int(data->scale_x); break; // converting from int32_t; + case MP_QSTR_scale_y: dest[0] = mp_obj_new_int(data->scale_y); break; // converting from int32_t; + case MP_QSTR_skew_x: dest[0] = mp_obj_new_int(data->skew_x); break; // converting from int32_t; + case MP_QSTR_skew_y: dest[0] = mp_obj_new_int(data->skew_y); break; // converting from int32_t; + case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_decor: dest[0] = mp_obj_new_int(data->decor); break; // converting from lv_text_decor_t; + case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; + case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -28724,14 +31325,22 @@ static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest // store attribute switch(attr) { - case MP_QSTR_total_size: data->total_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_free_cnt: data->free_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_free_size: data->free_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_free_biggest_size: data->free_biggest_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_used_cnt: data->used_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_max_used: data->max_used = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_used_pct: data->used_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_frag_pct: data->frag_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_unicode: data->unicode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_font: data->font = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_scale_x: data->scale_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_scale_y: data->scale_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_skew_x: data->skew_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_skew_y: data->skew_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_decor: data->decor = (int)mp_obj_get_int(dest[1]); break; // converting to lv_text_decor_t; + case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; + case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; default: return; } @@ -28740,129 +31349,204 @@ static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest } } -static void mp_lv_mem_monitor_t_print(const mp_print_t *print, +static void mp_lv_draw_letter_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_mem_monitor_t"); + mp_printf(print, "struct lv_draw_letter_dsc_t"); } -static const mp_obj_dict_t mp_lv_mem_monitor_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_letter_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_mem_monitor_t_type, - MP_QSTR_lv_mem_monitor_t, + mp_lv_draw_letter_dsc_t_type, + MP_QSTR_lv_draw_letter_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_mem_monitor_t_print, + print, mp_lv_draw_letter_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_mem_monitor_t_attr, - locals_dict, &mp_lv_mem_monitor_t_locals_dict, + attr, mp_lv_draw_letter_dsc_t_attr, + locals_dict, &mp_lv_draw_letter_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void) { - return &mp_lv_mem_monitor_t_type; + return &mp_lv_draw_letter_dsc_t_type; } -#define funcptr_lv_delay_cb_t NULL - /* - * lvgl extension definition for: - * void lv_delay_cb_t(uint32_t ms) + * Struct lv_draw_glyph_dsc_t */ -static mp_obj_t mp_funcptr_lv_delay_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_glyph_dsc_t(mp_obj_t self_in) { - uint32_t ms = (uint32_t)mp_obj_get_int(mp_args[0]); - ((void (*)(uint32_t))lv_func_ptr)(ms); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_glyph_dsc_t_type())); + return (lv_draw_glyph_dsc_t*)self->data; } - +#define mp_write_lv_draw_glyph_dsc_t(struct_obj) *((lv_draw_glyph_dsc_t*)mp_write_ptr_lv_draw_glyph_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_delay_cb_t_mpobj, 1, mp_funcptr_lv_delay_cb_t, funcptr_lv_delay_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_delay_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_delay_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_glyph_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_glyph_dsc_t_type(), field); +} -#define funcptr_lv_tick_get_cb_t NULL +#define mp_read_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(copy_buffer(&field, sizeof(lv_draw_glyph_dsc_t))) +#define mp_read_byref_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(&field) +static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)self->data; -/* - * lvgl extension definition for: - * uint32_t lv_tick_get_cb_t(void) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_glyph_data: dest[0] = ptr_to_mp((void*)data->glyph_data); break; // converting from void *; + case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; + case MP_QSTR_letter_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->letter_coords); break; // converting from lv_area_t *; + case MP_QSTR_bg_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->bg_coords); break; // converting from lv_area_t *; + case MP_QSTR_g: dest[0] = mp_read_ptr_lv_font_glyph_dsc_t((void*)data->g); break; // converting from lv_font_glyph_dsc_t *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; + case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; + case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; + case MP_QSTR__draw_buf: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->_draw_buf); break; // converting from lv_draw_buf_t *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_glyph_data: data->glyph_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; + case MP_QSTR_letter_coords: data->letter_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_bg_coords: data->bg_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_g: data->g = (void*)mp_write_ptr_lv_font_glyph_dsc_t(dest[1]); break; // converting to lv_font_glyph_dsc_t *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR__draw_buf: data->_draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + default: return; + } -static mp_obj_t mp_funcptr_lv_tick_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - - uint32_t _res = ((uint32_t (*)(void))lv_func_ptr)(); - return mp_obj_new_int_from_uint(_res); + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tick_get_cb_t_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, funcptr_lv_tick_get_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tick_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tick_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +static void mp_lv_draw_glyph_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_draw_glyph_dsc_t"); +} -#define funcptr_lv_timer_handler_resume_cb_t NULL +static const mp_obj_dict_t mp_lv_draw_glyph_dsc_t_locals_dict; -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_timer_handler_resume_cb_t */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_glyph_dsc_t_type, + MP_QSTR_lv_draw_glyph_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_glyph_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_glyph_dsc_t_attr, + locals_dict, &mp_lv_draw_glyph_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_timer_handler_resume_cb_t); +static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void) +{ + return &mp_lv_draw_glyph_dsc_t_type; +} -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_handler_resume_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -#define funcptr_lv_async_cb_t NULL +/* + * Array convertors for char [64] + */ -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_async_cb_t */ +GENMPY_UNUSED static char *mp_arr_to_char___64__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + char *lv_arr = (char*)m_malloc(len * sizeof(char)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (char)mp_obj_get_int(item); + } + return (char *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_async_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_async_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_async_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_async_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static mp_obj_t mp_arr_from_char___64__(char *arr) +{ + mp_obj_t obj_arr[64]; + for (size_t i=0; i<64; i++){ + obj_arr[i] = mp_obj_new_int(arr[i]); + } + return mp_obj_new_list(64, obj_arr); // TODO: return custom iterable object! +} /* - * Struct lv_rb_node_t + * Struct lv_fs_path_ex_t */ -static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_node_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_path_ex_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_node_t_type())); - return (lv_rb_node_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_path_ex_t_type())); + return (lv_fs_path_ex_t*)self->data; } -#define mp_write_lv_rb_node_t(struct_obj) *((lv_rb_node_t*)mp_write_ptr_lv_rb_node_t(struct_obj)) +#define mp_write_lv_fs_path_ex_t(struct_obj) *((lv_fs_path_ex_t*)mp_write_ptr_lv_fs_path_ex_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_node_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_path_ex_t(void *field) { - return lv_to_mp_struct(get_mp_lv_rb_node_t_type(), field); + return lv_to_mp_struct(get_mp_lv_fs_path_ex_t_type(), field); } -#define mp_read_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(copy_buffer(&field, sizeof(lv_rb_node_t))) -#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) +#define mp_read_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(copy_buffer(&field, sizeof(lv_fs_path_ex_t))) +#define mp_read_byref_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(&field) -static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_rb_node_t *data = (lv_rb_node_t*)self->data; + GENMPY_UNUSED lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_rb_node_t *; - case MP_QSTR_left: dest[0] = ptr_to_mp((void*)data->left); break; // converting from lv_rb_node_t *; - case MP_QSTR_right: dest[0] = ptr_to_mp((void*)data->right); break; // converting from lv_rb_node_t *; - case MP_QSTR_color: dest[0] = mp_obj_new_int(data->color); break; // converting from lv_rb_color_t; - case MP_QSTR_data: dest[0] = ptr_to_mp((void*)data->data); break; // converting from void *; + case MP_QSTR_path: dest[0] = mp_arr_from_char___64__(data->path); break; // converting from char [64]; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -28871,11 +31555,7 @@ static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_left: data->left = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_right: data->right = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_color: data->color = (int)mp_obj_get_int(dest[1]); break; // converting to lv_rb_color_t; - case MP_QSTR_data: data->data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_path: memcpy((void*)&data->path, mp_arr_to_char___64__(dest[1]), sizeof(char)*64); break; // converting to char [64]; default: return; } @@ -28884,98 +31564,68 @@ static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_rb_node_t_print(const mp_print_t *print, +static void mp_lv_fs_path_ex_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_rb_node_t"); + mp_printf(print, "struct lv_fs_path_ex_t"); } -static const mp_obj_dict_t mp_lv_rb_node_t_locals_dict; +static const mp_obj_dict_t mp_lv_fs_path_ex_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_rb_node_t_type, - MP_QSTR_lv_rb_node_t, + mp_lv_fs_path_ex_t_type, + MP_QSTR_lv_fs_path_ex_t, MP_TYPE_FLAG_NONE, - print, mp_lv_rb_node_t_print, + print, mp_lv_fs_path_ex_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_rb_node_t_attr, - locals_dict, &mp_lv_rb_node_t_locals_dict, + attr, mp_lv_fs_path_ex_t_attr, + locals_dict, &mp_lv_fs_path_ex_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void) -{ - return &mp_lv_rb_node_t_type; -} - -#define funcptr_lv_rb_compare_t NULL - - -/* - * lvgl extension definition for: - * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) - */ - -static mp_obj_t mp_funcptr_lv_rb_compare_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void) { - const void *a = (const void *)mp_to_ptr(mp_args[0]); - const void *b = (const void *)mp_to_ptr(mp_args[1]); - lv_rb_compare_res_t _res = ((lv_rb_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); - return mp_obj_new_int(_res); + return &mp_lv_fs_path_ex_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_rb_compare_t_mpobj, 2, mp_funcptr_lv_rb_compare_t, funcptr_lv_rb_compare_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_rb_t_compare_callback' - * lv_rb_compare_t compare - */ /* - * Struct lv_rb_t + * Struct lv_fs_dir_t */ -static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_dir_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_t_type())); - return (lv_rb_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_dir_t_type())); + return (lv_fs_dir_t*)self->data; } -#define mp_write_lv_rb_t(struct_obj) *((lv_rb_t*)mp_write_ptr_lv_rb_t(struct_obj)) +#define mp_write_lv_fs_dir_t(struct_obj) *((lv_fs_dir_t*)mp_write_ptr_lv_fs_dir_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_dir_t(void *field) { - return lv_to_mp_struct(get_mp_lv_rb_t_type(), field); + return lv_to_mp_struct(get_mp_lv_fs_dir_t_type(), field); } -#define mp_read_lv_rb_t(field) mp_read_ptr_lv_rb_t(copy_buffer(&field, sizeof(lv_rb_t))) -#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) +#define mp_read_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(copy_buffer(&field, sizeof(lv_fs_dir_t))) +#define mp_read_byref_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(&field) -static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_rb_t *data = (lv_rb_t*)self->data; + GENMPY_UNUSED lv_fs_dir_t *data = (lv_fs_dir_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_root: dest[0] = mp_read_ptr_lv_rb_node_t((void*)data->root); break; // converting from lv_rb_node_t *; - case MP_QSTR_compare: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, data->compare, NULL ,MP_QSTR_lv_rb_t_compare, NULL); break; // converting from callback lv_rb_compare_t; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; + case MP_QSTR_dir_d: dest[0] = ptr_to_mp((void*)data->dir_d); break; // converting from void *; + case MP_QSTR_drv: dest[0] = mp_read_ptr_lv_fs_drv_t((void*)data->drv); break; // converting from lv_fs_drv_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -28984,9 +31634,8 @@ static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_root: data->root = (void*)mp_write_ptr_lv_rb_node_t(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_compare: data->compare = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_rb_t_compare, NULL, NULL, NULL, NULL); break; // converting to callback lv_rb_compare_t; - case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_dir_d: data->dir_d = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_drv: data->drv = (void*)mp_write_ptr_lv_fs_drv_t(dest[1]); break; // converting to lv_fs_drv_t *; default: return; } @@ -28995,67 +31644,106 @@ static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_rb_t_print(const mp_print_t *print, +static void mp_lv_fs_dir_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_rb_t"); + mp_printf(print, "struct lv_fs_dir_t"); } -static const mp_obj_dict_t mp_lv_rb_t_locals_dict; +static const mp_obj_dict_t mp_lv_fs_dir_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_rb_t_type, - MP_QSTR_lv_rb_t, + mp_lv_fs_dir_t_type, + MP_QSTR_lv_fs_dir_t, MP_TYPE_FLAG_NONE, - print, mp_lv_rb_t_print, + print, mp_lv_fs_dir_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_rb_t_attr, - locals_dict, &mp_lv_rb_t_locals_dict, + attr, mp_lv_fs_dir_t_attr, + locals_dict, &mp_lv_fs_dir_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void) { - return &mp_lv_rb_t_type; + return &mp_lv_fs_dir_t_type; } /* - * Struct lv_circle_buf_t + * Array convertors for lv_point_precise_t [3] */ -static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void); +GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t___3__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_point_precise_t(item); + } + return (lv_point_precise_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_circle_buf_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t___3__(lv_point_precise_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_circle_buf_t_type())); - return (lv_circle_buf_t*)self->data; + mp_obj_t obj_arr[3]; + for (size_t i=0; i<3; i++){ + obj_arr[i] = mp_read_lv_point_precise_t(arr[i]); + } + return mp_obj_new_list(3, obj_arr); // TODO: return custom iterable object! } -#define mp_write_lv_circle_buf_t(struct_obj) *((lv_circle_buf_t*)mp_write_ptr_lv_circle_buf_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_circle_buf_t(void *field) +/* + * Struct lv_draw_triangle_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_triangle_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_triangle_dsc_t(mp_obj_t self_in) { - return lv_to_mp_struct(get_mp_lv_circle_buf_t_type(), field); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_triangle_dsc_t_type())); + return (lv_draw_triangle_dsc_t*)self->data; } -#define mp_read_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(copy_buffer(&field, sizeof(lv_circle_buf_t))) -#define mp_read_byref_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(&field) +#define mp_write_lv_draw_triangle_dsc_t(struct_obj) *((lv_draw_triangle_dsc_t*)mp_write_ptr_lv_draw_triangle_dsc_t(struct_obj)) -static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_triangle_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_triangle_dsc_t_type(), field); +} + +#define mp_read_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(copy_buffer(&field, sizeof(lv_draw_triangle_dsc_t))) +#define mp_read_byref_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(&field) + +static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_circle_buf_t *data = (lv_circle_buf_t*)self->data; + GENMPY_UNUSED lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_p: dest[0] = mp_lv_struct_array_new(self_in, data->p, 3, sizeof(lv_point_precise_t), mp_read_ptr_lv_point_precise_t, mp_write_ptr_lv_point_precise_t); break; // converting from lv_point_precise_t [3]; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29064,7 +31752,11 @@ static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - ; + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_p: mp_lv_struct_array_assign(data->p, 3, sizeof(lv_point_precise_t), mp_write_ptr_lv_point_precise_t, dest[1]); break; // converting to lv_point_precise_t [3]; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; default: return; } @@ -29073,114 +31765,147 @@ static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_circle_buf_t_print(const mp_print_t *print, +static void mp_lv_draw_triangle_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_circle_buf_t"); + mp_printf(print, "struct lv_draw_triangle_dsc_t"); } -static const mp_obj_dict_t mp_lv_circle_buf_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_triangle_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_circle_buf_t_type, - MP_QSTR_lv_circle_buf_t, + mp_lv_draw_triangle_dsc_t_type, + MP_QSTR_lv_draw_triangle_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_circle_buf_t_print, + print, mp_lv_draw_triangle_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_circle_buf_t_attr, - locals_dict, &mp_lv_circle_buf_t_locals_dict, + attr, mp_lv_draw_triangle_dsc_t_attr, + locals_dict, &mp_lv_draw_triangle_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_triangle_dsc_t_type(void) { - return &mp_lv_circle_buf_t_type; + return &mp_lv_draw_triangle_dsc_t_type; } -#define funcptr_lv_layout_update_cb_t NULL - -/* Reusing lv_obj_set_user_data for funcptr_lv_layout_update_cb_t */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_funcptr_lv_layout_update_cb_t_mpobj, 2, mp_lv_obj_set_user_data, funcptr_lv_layout_update_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_layout_update_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +#define funcptr_lv_indev_read_cb_t NULL /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_layout_callbacks_t_layout_update_cb_callback' - * lv_layout_update_cb_t layout_update_cb + * Array convertors for lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT] */ - -#define funcptr_lv_layout_get_min_size_cb_t NULL + +GENMPY_UNUSED static lv_indev_gesture_type_t *mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_indev_gesture_type_t *lv_arr = (lv_indev_gesture_type_t*)m_malloc(len * sizeof(lv_indev_gesture_type_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (int)mp_obj_get_int(item); + } + return (lv_indev_gesture_type_t *)lv_arr; +} + +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_type_t *arr) +{ + mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; + for (size_t i=0; idata; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_data_t_type())); + return (lv_indev_data_t*)self->data; } -#define mp_write_lv_layout_callbacks_t(struct_obj) *((lv_layout_callbacks_t*)mp_write_ptr_lv_layout_callbacks_t(struct_obj)) +#define mp_write_lv_indev_data_t(struct_obj) *((lv_indev_data_t*)mp_write_ptr_lv_indev_data_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layout_callbacks_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_data_t(void *field) { - return lv_to_mp_struct(get_mp_lv_layout_callbacks_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_data_t_type(), field); } -#define mp_read_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(copy_buffer(&field, sizeof(lv_layout_callbacks_t))) -#define mp_read_byref_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(&field) +#define mp_read_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(copy_buffer(&field, sizeof(lv_indev_data_t))) +#define mp_read_byref_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(&field) -static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)self->data; + GENMPY_UNUSED lv_indev_data_t *data = (lv_indev_data_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_layout_update_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, data->layout_update_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL); break; // converting from callback lv_layout_update_cb_t; - case MP_QSTR_get_min_size_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, data->get_min_size_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL); break; // converting from callback lv_layout_get_min_size_cb_t; + case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; + case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; + case MP_QSTR_key: dest[0] = mp_obj_new_int_from_uint(data->key); break; // converting from uint32_t; + case MP_QSTR_btn_id: dest[0] = mp_obj_new_int_from_uint(data->btn_id); break; // converting from uint32_t; + case MP_QSTR_enc_diff: dest[0] = mp_obj_new_int(data->enc_diff); break; // converting from int16_t; + case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; + case MP_QSTR_continue_reading: dest[0] = convert_to_bool(data->continue_reading); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29189,8 +31914,15 @@ static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_layout_update_cb: data->layout_update_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_update_cb_t; - case MP_QSTR_get_min_size_cb: data->get_min_size_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_get_min_size_cb_t; + case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_key: data->key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_btn_id: data->btn_id = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_enc_diff: data->enc_diff = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_continue_reading: data->continue_reading = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -29199,40 +31931,62 @@ static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_layout_callbacks_t_print(const mp_print_t *print, +static void mp_lv_indev_data_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_layout_callbacks_t"); + mp_printf(print, "struct lv_indev_data_t"); } -static const mp_obj_dict_t mp_lv_layout_callbacks_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_data_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_layout_callbacks_t_type, - MP_QSTR_lv_layout_callbacks_t, + mp_lv_indev_data_t_type, + MP_QSTR_lv_indev_data_t, MP_TYPE_FLAG_NONE, - print, mp_lv_layout_callbacks_t_print, + print, mp_lv_indev_data_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_layout_callbacks_t_attr, - locals_dict, &mp_lv_layout_callbacks_t_locals_dict, + attr, mp_lv_indev_data_t_attr, + locals_dict, &mp_lv_indev_data_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_layout_callbacks_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_data_t_type(void) { - return &mp_lv_layout_callbacks_t_type; + return &mp_lv_indev_data_t_type; } /* - * Array convertors for char [64] + * lvgl extension definition for: + * void lv_indev_read_cb_t(lv_indev_t *indev, lv_indev_data_t *data) */ -GENMPY_UNUSED static char *mp_arr_to_char___64__(mp_obj_t mp_arr) +static mp_obj_t mp_funcptr_lv_indev_read_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_indev_t *indev = mp_to_ptr(mp_args[0]); + lv_indev_data_t *data = mp_write_ptr_lv_indev_data_t(mp_args[1]); + ((void (*)(lv_indev_t *, lv_indev_data_t *))lv_func_ptr)(indev, data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_read_cb_t_mpobj, 2, mp_funcptr_lv_indev_read_cb_t, funcptr_lv_indev_read_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_read_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_indev_t_read_cb_callback(lv_indev_t *indev, lv_indev_data_t *data); +typedef __typeof__( ((lv_indev_t*)(0))->pointer ) lv_indev_pointer_t; + +/* + * Array convertors for lv_point_t [8] + */ + +GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t___8__(mp_obj_t mp_arr) { // A packed buffer is already the C array (lvgl-bindings#37). if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || @@ -29243,58 +31997,118 @@ GENMPY_UNUSED static char *mp_arr_to_char___64__(mp_obj_t mp_arr) if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); mp_int_t len = mp_obj_get_int(mp_len); //TODO check dim! - char *lv_arr = (char*)m_malloc(len * sizeof(char)); + lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); mp_obj_t iter = mp_getiter(mp_arr, NULL); mp_obj_t item; size_t i = 0; while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (char)mp_obj_get_int(item); + lv_arr[i++] = mp_write_lv_point_t(item); } - return (char *)lv_arr; + return (lv_point_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_char___64__(char *arr) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t___8__(lv_point_t *arr) { - mp_obj_t obj_arr[64]; - for (size_t i=0; i<64; i++){ - obj_arr[i] = mp_obj_new_int(arr[i]); + mp_obj_t obj_arr[8]; + for (size_t i=0; i<8; i++){ + obj_arr[i] = mp_read_lv_point_t(arr[i]); } - return mp_obj_new_list(64, obj_arr); // TODO: return custom iterable object! + return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! } /* - * Struct lv_fs_path_ex_t + * Array convertors for uint32_t [8] */ -static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void); +GENMPY_UNUSED static uint32_t *mp_arr_to_uint32_t___8__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + uint32_t *lv_arr = (uint32_t*)m_malloc(len * sizeof(uint32_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint32_t)mp_obj_get_int(item); + } + return (uint32_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_path_ex_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_uint32_t___8__(uint32_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_path_ex_t_type())); - return (lv_fs_path_ex_t*)self->data; + mp_obj_t obj_arr[8]; + for (size_t i=0; i<8; i++){ + obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); + } + return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! } -#define mp_write_lv_fs_path_ex_t(struct_obj) *((lv_fs_path_ex_t*)mp_write_ptr_lv_fs_path_ex_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_path_ex_t(void *field) +/* + * Struct lv_indev_pointer_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_pointer_t(mp_obj_t self_in) { - return lv_to_mp_struct(get_mp_lv_fs_path_ex_t_type(), field); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_pointer_t_type())); + return (lv_indev_pointer_t*)self->data; } -#define mp_read_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(copy_buffer(&field, sizeof(lv_fs_path_ex_t))) -#define mp_read_byref_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(&field) +#define mp_write_lv_indev_pointer_t(struct_obj) *((lv_indev_pointer_t*)mp_write_ptr_lv_indev_pointer_t(struct_obj)) -static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_pointer_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_indev_pointer_t_type(), field); +} + +#define mp_read_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(copy_buffer(&field, sizeof(lv_indev_pointer_t))) +#define mp_read_byref_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(&field) + +static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)self->data; + GENMPY_UNUSED lv_indev_pointer_t *data = (lv_indev_pointer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_path: dest[0] = mp_arr_from_char___64__(data->path); break; // converting from char [64]; + case MP_QSTR_act_point: dest[0] = mp_read_byref_lv_point_t(data->act_point); break; // converting from lv_point_t; + case MP_QSTR_last_point: dest[0] = mp_read_byref_lv_point_t(data->last_point); break; // converting from lv_point_t; + case MP_QSTR_last_raw_point: dest[0] = mp_read_byref_lv_point_t(data->last_raw_point); break; // converting from lv_point_t; + case MP_QSTR_vect: dest[0] = mp_read_byref_lv_point_t(data->vect); break; // converting from lv_point_t; + case MP_QSTR_vect_hist: dest[0] = mp_lv_struct_array_new(self_in, data->vect_hist, 8, sizeof(lv_point_t), mp_read_ptr_lv_point_t, mp_write_ptr_lv_point_t); break; // converting from lv_point_t [8]; + case MP_QSTR_vect_hist_timestamp: dest[0] = mp_arr_from_uint32_t___8__(data->vect_hist_timestamp); break; // converting from uint32_t [8]; + case MP_QSTR_vect_hist_index: dest[0] = mp_obj_new_int_from_uint(data->vect_hist_index); break; // converting from uint8_t; + case MP_QSTR_scroll_sum: dest[0] = mp_read_byref_lv_point_t(data->scroll_sum); break; // converting from lv_point_t; + case MP_QSTR_scroll_throw_vect: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect); break; // converting from lv_point_t; + case MP_QSTR_scroll_throw_vect_ori: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect_ori); break; // converting from lv_point_t; + case MP_QSTR_act_obj: dest[0] = lv_to_mp((void*)data->act_obj); break; // converting from lv_obj_t *; + case MP_QSTR_scroll_obj: dest[0] = lv_to_mp((void*)data->scroll_obj); break; // converting from lv_obj_t *; + case MP_QSTR_last_pressed: dest[0] = lv_to_mp((void*)data->last_pressed); break; // converting from lv_obj_t *; + case MP_QSTR_last_hovered: dest[0] = lv_to_mp((void*)data->last_hovered); break; // converting from lv_obj_t *; + case MP_QSTR_scroll_area: dest[0] = mp_read_byref_lv_area_t(data->scroll_area); break; // converting from lv_area_t; + case MP_QSTR_gesture_sum: dest[0] = mp_read_byref_lv_point_t(data->gesture_sum); break; // converting from lv_point_t; + case MP_QSTR_diff: dest[0] = mp_obj_new_int(data->diff); break; // converting from int32_t; + case MP_QSTR_short_click_streak: dest[0] = mp_obj_new_int_from_uint(data->short_click_streak); break; // converting from uint8_t; + case MP_QSTR_last_short_click_point: dest[0] = mp_read_byref_lv_point_t(data->last_short_click_point); break; // converting from lv_point_t; + case MP_QSTR_last_short_click_timestamp: dest[0] = mp_obj_new_int_from_uint(data->last_short_click_timestamp); break; // converting from uint32_t; + case MP_QSTR_scroll_dir: dest[0] = mp_obj_new_int_from_uint(data->scroll_dir); break; // converting from uint8_t; + case MP_QSTR_gesture_dir: dest[0] = mp_obj_new_int_from_uint(data->gesture_dir); break; // converting from uint8_t; + case MP_QSTR_gesture_sent: dest[0] = mp_obj_new_int_from_uint(data->gesture_sent); break; // converting from uint8_t; + case MP_QSTR_press_moved: dest[0] = mp_obj_new_int_from_uint(data->press_moved); break; // converting from uint8_t; + case MP_QSTR_pressed: dest[0] = mp_obj_new_int_from_uint(data->pressed); break; // converting from uint8_t; + case MP_QSTR_ccw_rotation: dest[0] = mp_obj_new_int_from_uint(data->ccw_rotation); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29303,7 +32117,32 @@ static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_path: memcpy((void*)&data->path, mp_arr_to_char___64__(dest[1]), sizeof(char)*64); break; // converting to char [64]; + case MP_QSTR_act_point: data->act_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_point: data->last_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_raw_point: data->last_raw_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_vect: data->vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_vect_hist: mp_lv_struct_array_assign(data->vect_hist, 8, sizeof(lv_point_t), mp_write_ptr_lv_point_t, dest[1]); break; // converting to lv_point_t [8]; + case MP_QSTR_vect_hist_timestamp: memcpy((void*)&data->vect_hist_timestamp, mp_arr_to_uint32_t___8__(dest[1]), sizeof(uint32_t)*8); break; // converting to uint32_t [8]; + case MP_QSTR_vect_hist_index: data->vect_hist_index = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_scroll_sum: data->scroll_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_scroll_throw_vect: data->scroll_throw_vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_scroll_throw_vect_ori: data->scroll_throw_vect_ori = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_act_obj: data->act_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scroll_obj: data->scroll_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_last_pressed: data->last_pressed = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_last_hovered: data->last_hovered = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scroll_area: data->scroll_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_gesture_sum: data->gesture_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_diff: data->diff = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_short_click_streak: data->short_click_streak = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_last_short_click_point: data->last_short_click_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_short_click_timestamp: data->last_short_click_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_scroll_dir: data->scroll_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_dir: data->gesture_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_sent: data->gesture_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_press_moved: data->press_moved = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_pressed: data->pressed = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_ccw_rotation: data->ccw_rotation = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -29312,68 +32151,69 @@ static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_fs_path_ex_t_print(const mp_print_t *print, +static void mp_lv_indev_pointer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_fs_path_ex_t"); + mp_printf(print, "struct lv_indev_pointer_t"); } -static const mp_obj_dict_t mp_lv_fs_path_ex_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_pointer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_fs_path_ex_t_type, - MP_QSTR_lv_fs_path_ex_t, + mp_lv_indev_pointer_t_type, + MP_QSTR_lv_indev_pointer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_fs_path_ex_t_print, + print, mp_lv_indev_pointer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_fs_path_ex_t_attr, - locals_dict, &mp_lv_fs_path_ex_t_locals_dict, + attr, mp_lv_indev_pointer_t_attr, + locals_dict, &mp_lv_indev_pointer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void) { - return &mp_lv_fs_path_ex_t_type; + return &mp_lv_indev_pointer_t_type; } +typedef __typeof__( ((lv_indev_t*)(0))->keypad ) lv_indev_keypad_t; /* - * Struct lv_fs_dir_t + * Struct lv_indev_keypad_t */ -static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_dir_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_keypad_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_dir_t_type())); - return (lv_fs_dir_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_keypad_t_type())); + return (lv_indev_keypad_t*)self->data; } -#define mp_write_lv_fs_dir_t(struct_obj) *((lv_fs_dir_t*)mp_write_ptr_lv_fs_dir_t(struct_obj)) +#define mp_write_lv_indev_keypad_t(struct_obj) *((lv_indev_keypad_t*)mp_write_ptr_lv_indev_keypad_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_dir_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_keypad_t(void *field) { - return lv_to_mp_struct(get_mp_lv_fs_dir_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_keypad_t_type(), field); } -#define mp_read_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(copy_buffer(&field, sizeof(lv_fs_dir_t))) -#define mp_read_byref_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(&field) +#define mp_read_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(copy_buffer(&field, sizeof(lv_indev_keypad_t))) +#define mp_read_byref_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(&field) -static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_fs_dir_t *data = (lv_fs_dir_t*)self->data; + GENMPY_UNUSED lv_indev_keypad_t *data = (lv_indev_keypad_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dir_d: dest[0] = ptr_to_mp((void*)data->dir_d); break; // converting from void *; - case MP_QSTR_drv: dest[0] = mp_read_ptr_lv_fs_drv_t((void*)data->drv); break; // converting from lv_fs_drv_t *; + case MP_QSTR_last_state: dest[0] = mp_obj_new_int(data->last_state); break; // converting from lv_indev_state_t; + case MP_QSTR_last_key: dest[0] = mp_obj_new_int_from_uint(data->last_key); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29382,8 +32222,8 @@ static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_dir_d: data->dir_d = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_drv: data->drv = (void*)mp_write_ptr_lv_fs_drv_t(dest[1]); break; // converting to lv_fs_drv_t *; + case MP_QSTR_last_state: data->last_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_last_key: data->last_key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -29392,71 +32232,93 @@ static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_fs_dir_t_print(const mp_print_t *print, +static void mp_lv_indev_keypad_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_fs_dir_t"); + mp_printf(print, "struct lv_indev_keypad_t"); } -static const mp_obj_dict_t mp_lv_fs_dir_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_keypad_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_fs_dir_t_type, - MP_QSTR_lv_fs_dir_t, + mp_lv_indev_keypad_t_type, + MP_QSTR_lv_indev_keypad_t, MP_TYPE_FLAG_NONE, - print, mp_lv_fs_dir_t_print, + print, mp_lv_indev_keypad_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_fs_dir_t_attr, - locals_dict, &mp_lv_fs_dir_t_locals_dict, + attr, mp_lv_indev_keypad_t_attr, + locals_dict, &mp_lv_indev_keypad_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void) { - return &mp_lv_fs_dir_t_type; + return &mp_lv_indev_keypad_t_type; } +#define funcptr_lv_indev_key_remap_cb_t NULL + /* - * Struct lv_draw_fill_dsc_t + * lvgl extension definition for: + * lv_key_t lv_indev_key_remap_cb_t(lv_indev_t *indev, lv_key_t key) */ -static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_indev_key_remap_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_indev_t *indev = mp_to_ptr(mp_args[0]); + lv_key_t key = (int)mp_obj_get_int(mp_args[1]); + lv_key_t _res = ((lv_key_t (*)(lv_indev_t *, lv_key_t))lv_func_ptr)(indev, key); + return mp_obj_new_int(_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_fill_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_key_remap_cb_t_mpobj, 2, mp_funcptr_lv_indev_key_remap_cb_t, funcptr_lv_indev_key_remap_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_key_remap_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *indev, lv_key_t key); + +/* + * Struct lv_indev_gesture_motion_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_motion_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_motion_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_fill_dsc_t_type())); - return (lv_draw_fill_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_motion_t_type())); + return (lv_indev_gesture_motion_t*)self->data; } -#define mp_write_lv_draw_fill_dsc_t(struct_obj) *((lv_draw_fill_dsc_t*)mp_write_ptr_lv_draw_fill_dsc_t(struct_obj)) +#define mp_write_lv_indev_gesture_motion_t(struct_obj) *((lv_indev_gesture_motion_t*)mp_write_ptr_lv_indev_gesture_motion_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_fill_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_motion_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_fill_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_gesture_motion_t_type(), field); } -#define mp_read_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(copy_buffer(&field, sizeof(lv_draw_fill_dsc_t))) -#define mp_read_byref_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(&field) +#define mp_read_lv_indev_gesture_motion_t(field) mp_read_ptr_lv_indev_gesture_motion_t(copy_buffer(&field, sizeof(lv_indev_gesture_motion_t))) +#define mp_read_byref_lv_indev_gesture_motion_t(field) mp_read_ptr_lv_indev_gesture_motion_t(&field) -static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_gesture_motion_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_motion_t *data = (lv_indev_gesture_motion_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; + case MP_QSTR_finger: dest[0] = mp_obj_new_int(data->finger); break; // converting from int8_t; + case MP_QSTR_start_point: dest[0] = mp_read_byref_lv_point_t(data->start_point); break; // converting from lv_point_t; + case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29465,11 +32327,10 @@ static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; + case MP_QSTR_finger: data->finger = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; + case MP_QSTR_start_point: data->start_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; default: return; } @@ -29478,72 +32339,149 @@ static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de } } -static void mp_lv_draw_fill_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_motion_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_fill_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_motion_t"); } -static const mp_obj_dict_t mp_lv_draw_fill_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_motion_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_fill_dsc_t_type, - MP_QSTR_lv_draw_fill_dsc_t, + mp_lv_indev_gesture_motion_t_type, + MP_QSTR_lv_indev_gesture_motion_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_fill_dsc_t_print, + print, mp_lv_indev_gesture_motion_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_fill_dsc_t_attr, - locals_dict, &mp_lv_draw_fill_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_motion_t_attr, + locals_dict, &mp_lv_indev_gesture_motion_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_motion_t_type(void) { - return &mp_lv_draw_fill_dsc_t_type; + return &mp_lv_indev_gesture_motion_t_type; } /* - * Struct lv_draw_border_dsc_t + * Array convertors for lv_indev_gesture_motion_t [2] */ -static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void); +GENMPY_UNUSED static lv_indev_gesture_motion_t *mp_arr_to_lv_indev_gesture_motion_t___2__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_indev_gesture_motion_t *lv_arr = (lv_indev_gesture_motion_t*)m_malloc(len * sizeof(lv_indev_gesture_motion_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_indev_gesture_motion_t(item); + } + return (lv_indev_gesture_motion_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_border_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_motion_t___2__(lv_indev_gesture_motion_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_border_dsc_t_type())); - return (lv_draw_border_dsc_t*)self->data; + mp_obj_t obj_arr[2]; + for (size_t i=0; i<2; i++){ + obj_arr[i] = mp_read_lv_indev_gesture_motion_t(arr[i]); + } + return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! } -#define mp_write_lv_draw_border_dsc_t(struct_obj) *((lv_draw_border_dsc_t*)mp_write_ptr_lv_draw_border_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_border_dsc_t(void *field) +/* + * Array convertors for float [2] + */ + +GENMPY_UNUSED static float *mp_arr_to_float___2__(mp_obj_t mp_arr) { - return lv_to_mp_struct(get_mp_lv_draw_border_dsc_t_type(), field); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + float *lv_arr = (float*)m_malloc(len * sizeof(float)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (float)mp_obj_get_float(item); + } + return (float *)lv_arr; } -#define mp_read_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(copy_buffer(&field, sizeof(lv_draw_border_dsc_t))) -#define mp_read_byref_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(&field) +GENMPY_UNUSED static mp_obj_t mp_arr_from_float___2__(float *arr) +{ + mp_obj_t obj_arr[2]; + for (size_t i=0; i<2; i++){ + obj_arr[i] = mp_obj_new_float_from_f(arr[i]); + } + return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! +} -static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) + +/* + * Struct lv_indev_gesture_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_t_type())); + return (lv_indev_gesture_t*)self->data; +} + +#define mp_write_lv_indev_gesture_t(struct_obj) *((lv_indev_gesture_t*)mp_write_ptr_lv_indev_gesture_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_indev_gesture_t_type(), field); +} + +#define mp_read_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(copy_buffer(&field, sizeof(lv_indev_gesture_t))) +#define mp_read_byref_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(&field) + +static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_t *data = (lv_indev_gesture_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_border_side_t; + case MP_QSTR_motions: dest[0] = mp_lv_struct_array_new(self_in, data->motions, 2, sizeof(lv_indev_gesture_motion_t), mp_read_ptr_lv_indev_gesture_motion_t, mp_write_ptr_lv_indev_gesture_motion_t); break; // converting from lv_indev_gesture_motion_t [2]; + case MP_QSTR_center: dest[0] = mp_read_byref_lv_point_t(data->center); break; // converting from lv_point_t; + case MP_QSTR_scale: dest[0] = mp_obj_new_float_from_f(data->scale); break; // converting from float; + case MP_QSTR_p_scale: dest[0] = mp_obj_new_float_from_f(data->p_scale); break; // converting from float; + case MP_QSTR_scale_factors_x: dest[0] = mp_arr_from_float___2__(data->scale_factors_x); break; // converting from float [2]; + case MP_QSTR_scale_factors_y: dest[0] = mp_arr_from_float___2__(data->scale_factors_y); break; // converting from float [2]; + case MP_QSTR_delta_x: dest[0] = mp_obj_new_float_from_f(data->delta_x); break; // converting from float; + case MP_QSTR_delta_y: dest[0] = mp_obj_new_float_from_f(data->delta_y); break; // converting from float; + case MP_QSTR_p_delta_x: dest[0] = mp_obj_new_float_from_f(data->p_delta_x); break; // converting from float; + case MP_QSTR_p_delta_y: dest[0] = mp_obj_new_float_from_f(data->p_delta_y); break; // converting from float; + case MP_QSTR_rotation: dest[0] = mp_obj_new_float_from_f(data->rotation); break; // converting from float; + case MP_QSTR_p_rotation: dest[0] = mp_obj_new_float_from_f(data->p_rotation); break; // converting from float; + case MP_QSTR_finger_cnt: dest[0] = mp_obj_new_int_from_uint(data->finger_cnt); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29552,12 +32490,19 @@ static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_border_side_t; + case MP_QSTR_motions: mp_lv_struct_array_assign(data->motions, 2, sizeof(lv_indev_gesture_motion_t), mp_write_ptr_lv_indev_gesture_motion_t, dest[1]); break; // converting to lv_indev_gesture_motion_t [2]; + case MP_QSTR_center: data->center = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_scale: data->scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_scale: data->p_scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_scale_factors_x: memcpy((void*)&data->scale_factors_x, mp_arr_to_float___2__(dest[1]), sizeof(float)*2); break; // converting to float [2]; + case MP_QSTR_scale_factors_y: memcpy((void*)&data->scale_factors_y, mp_arr_to_float___2__(dest[1]), sizeof(float)*2); break; // converting to float [2]; + case MP_QSTR_delta_x: data->delta_x = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_delta_y: data->delta_y = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_delta_x: data->p_delta_x = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_delta_y: data->p_delta_y = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_rotation: data->rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_rotation: data->p_rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_finger_cnt: data->finger_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -29566,75 +32511,69 @@ static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * } } -static void mp_lv_draw_border_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_border_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_t"); } -static const mp_obj_dict_t mp_lv_draw_border_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_border_dsc_t_type, - MP_QSTR_lv_draw_border_dsc_t, + mp_lv_indev_gesture_t_type, + MP_QSTR_lv_indev_gesture_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_border_dsc_t_print, + print, mp_lv_indev_gesture_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_border_dsc_t_attr, - locals_dict, &mp_lv_draw_border_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_t_attr, + locals_dict, &mp_lv_indev_gesture_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void) { - return &mp_lv_draw_border_dsc_t_type; + return &mp_lv_indev_gesture_t_type; } /* - * Struct lv_draw_box_shadow_dsc_t + * Struct lv_indev_gesture_configuration_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_configuration_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_box_shadow_dsc_t_type())); - return (lv_draw_box_shadow_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_configuration_t_type())); + return (lv_indev_gesture_configuration_t*)self->data; } -#define mp_write_lv_draw_box_shadow_dsc_t(struct_obj) *((lv_draw_box_shadow_dsc_t*)mp_write_ptr_lv_draw_box_shadow_dsc_t(struct_obj)) +#define mp_write_lv_indev_gesture_configuration_t(struct_obj) *((lv_indev_gesture_configuration_t*)mp_write_ptr_lv_indev_gesture_configuration_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_box_shadow_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_configuration_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_box_shadow_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_gesture_configuration_t_type(), field); } -#define mp_read_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(copy_buffer(&field, sizeof(lv_draw_box_shadow_dsc_t))) -#define mp_read_byref_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(&field) +#define mp_read_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(copy_buffer(&field, sizeof(lv_indev_gesture_configuration_t))) +#define mp_read_byref_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(&field) -static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; - case MP_QSTR_spread: dest[0] = mp_obj_new_int(data->spread); break; // converting from int32_t; - case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int32_t; - case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int32_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_bg_cover: dest[0] = mp_obj_new_int_from_uint(data->bg_cover); break; // converting from uint8_t; + case MP_QSTR_pinch_up_threshold: dest[0] = mp_obj_new_float_from_f(data->pinch_up_threshold); break; // converting from float; + case MP_QSTR_pinch_down_threshold: dest[0] = mp_obj_new_float_from_f(data->pinch_down_threshold); break; // converting from float; + case MP_QSTR_rotation_angle_rad_threshold: dest[0] = mp_obj_new_float_from_f(data->rotation_angle_rad_threshold); break; // converting from float; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29643,15 +32582,9 @@ static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_spread: data->spread = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ofs_x: data->ofs_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ofs_y: data->ofs_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_bg_cover: data->bg_cover = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_pinch_up_threshold: data->pinch_up_threshold = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_pinch_down_threshold: data->pinch_down_threshold = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_rotation_angle_rad_threshold: data->rotation_angle_rad_threshold = (float)mp_obj_get_float(dest[1]); break; // converting to float; default: return; } @@ -29660,82 +32593,72 @@ static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj } } -static void mp_lv_draw_box_shadow_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_configuration_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_box_shadow_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_configuration_t"); } -static const mp_obj_dict_t mp_lv_draw_box_shadow_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_configuration_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_box_shadow_dsc_t_type, - MP_QSTR_lv_draw_box_shadow_dsc_t, + mp_lv_indev_gesture_configuration_t_type, + MP_QSTR_lv_indev_gesture_configuration_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_box_shadow_dsc_t_print, + print, mp_lv_indev_gesture_configuration_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_box_shadow_dsc_t_attr, - locals_dict, &mp_lv_draw_box_shadow_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_configuration_t_attr, + locals_dict, &mp_lv_indev_gesture_configuration_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void) { - return &mp_lv_draw_box_shadow_dsc_t_type; + return &mp_lv_indev_gesture_configuration_t_type; } +#define funcptr_lv_recognizer_func_t NULL + /* - * Struct lv_draw_letter_dsc_t + * Struct lv_indev_touch_data_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_letter_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_touch_data_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_letter_dsc_t_type())); - return (lv_draw_letter_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_touch_data_t_type())); + return (lv_indev_touch_data_t*)self->data; } -#define mp_write_lv_draw_letter_dsc_t(struct_obj) *((lv_draw_letter_dsc_t*)mp_write_ptr_lv_draw_letter_dsc_t(struct_obj)) +#define mp_write_lv_indev_touch_data_t(struct_obj) *((lv_indev_touch_data_t*)mp_write_ptr_lv_indev_touch_data_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_letter_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_touch_data_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_letter_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_touch_data_t_type(), field); } -#define mp_read_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(copy_buffer(&field, sizeof(lv_draw_letter_dsc_t))) -#define mp_read_byref_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(&field) +#define mp_read_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(copy_buffer(&field, sizeof(lv_indev_touch_data_t))) +#define mp_read_byref_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(&field) -static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_unicode: dest[0] = mp_obj_new_int_from_uint(data->unicode); break; // converting from uint32_t; - case MP_QSTR_font: dest[0] = mp_read_ptr_lv_font_t((void*)data->font); break; // converting from lv_font_t *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; - case MP_QSTR_scale_x: dest[0] = mp_obj_new_int(data->scale_x); break; // converting from int32_t; - case MP_QSTR_scale_y: dest[0] = mp_obj_new_int(data->scale_y); break; // converting from int32_t; - case MP_QSTR_skew_x: dest[0] = mp_obj_new_int(data->skew_x); break; // converting from int32_t; - case MP_QSTR_skew_y: dest[0] = mp_obj_new_int(data->skew_y); break; // converting from int32_t; - case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_decor: dest[0] = mp_obj_new_int(data->decor); break; // converting from lv_text_decor_t; - case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; - case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; + case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; + case MP_QSTR_id: dest[0] = mp_obj_new_int_from_uint(data->id); break; // converting from uint8_t; + case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29744,22 +32667,10 @@ static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_unicode: data->unicode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_font: data->font = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_scale_x: data->scale_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_scale_y: data->scale_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_skew_x: data->skew_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_skew_y: data->skew_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_decor: data->decor = (int)mp_obj_get_int(dest[1]); break; // converting to lv_text_decor_t; - case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; - case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_id: data->id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -29768,79 +32679,104 @@ static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * } } -static void mp_lv_draw_letter_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_touch_data_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_letter_dsc_t"); + mp_printf(print, "struct lv_indev_touch_data_t"); } -static const mp_obj_dict_t mp_lv_draw_letter_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_touch_data_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_letter_dsc_t_type, - MP_QSTR_lv_draw_letter_dsc_t, + mp_lv_indev_touch_data_t_type, + MP_QSTR_lv_indev_touch_data_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_letter_dsc_t_print, + print, mp_lv_indev_touch_data_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_letter_dsc_t_attr, - locals_dict, &mp_lv_draw_letter_dsc_t_locals_dict, + attr, mp_lv_indev_touch_data_t_attr, + locals_dict, &mp_lv_indev_touch_data_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void) { - return &mp_lv_draw_letter_dsc_t_type; + return &mp_lv_indev_touch_data_t_type; } /* - * Struct lv_draw_glyph_dsc_t + * lvgl extension definition for: + * void lv_recognizer_func_t(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t) */ -static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_recognizer_func_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_indev_gesture_recognizer_t *arg0 = mp_to_ptr(mp_args[0]); + lv_indev_touch_data_t *arg1 = mp_write_ptr_lv_indev_touch_data_t(mp_args[1]); + uint16_t arg2 = (uint16_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_func_ptr)(arg0, arg1, arg2); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_glyph_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_recognizer_func_t_mpobj, 3, mp_funcptr_lv_recognizer_func_t, funcptr_lv_recognizer_func_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_recognizer_func_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_indev_gesture_recognizer_t_recog_fn_callback' + * lv_recognizer_func_t recog_fn + */ + + +/* + * Struct lv_indev_gesture_recognizer_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_recognizer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_glyph_dsc_t_type())); - return (lv_draw_glyph_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_recognizer_t_type())); + return (lv_indev_gesture_recognizer_t*)self->data; } -#define mp_write_lv_draw_glyph_dsc_t(struct_obj) *((lv_draw_glyph_dsc_t*)mp_write_ptr_lv_draw_glyph_dsc_t(struct_obj)) +#define mp_write_lv_indev_gesture_recognizer_t(struct_obj) *((lv_indev_gesture_recognizer_t*)mp_write_ptr_lv_indev_gesture_recognizer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_glyph_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_recognizer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_glyph_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_gesture_recognizer_t_type(), field); } -#define mp_read_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(copy_buffer(&field, sizeof(lv_draw_glyph_dsc_t))) -#define mp_read_byref_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(&field) +#define mp_read_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(copy_buffer(&field, sizeof(lv_indev_gesture_recognizer_t))) +#define mp_read_byref_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(&field) -static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_glyph_data: dest[0] = ptr_to_mp((void*)data->glyph_data); break; // converting from void *; - case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; - case MP_QSTR_letter_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->letter_coords); break; // converting from lv_area_t *; - case MP_QSTR_bg_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->bg_coords); break; // converting from lv_area_t *; - case MP_QSTR_g: dest[0] = mp_read_ptr_lv_font_glyph_dsc_t((void*)data->g); break; // converting from lv_font_glyph_dsc_t *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; - case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; - case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; - case MP_QSTR__draw_buf: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->_draw_buf); break; // converting from lv_draw_buf_t *; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_gesture_type_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_gesture_state_t; + case MP_QSTR_info: dest[0] = mp_read_ptr_lv_indev_gesture_t((void*)data->info); break; // converting from lv_indev_gesture_t *; + case MP_QSTR_scale: dest[0] = mp_obj_new_float_from_f(data->scale); break; // converting from float; + case MP_QSTR_rotation: dest[0] = mp_obj_new_float_from_f(data->rotation); break; // converting from float; + case MP_QSTR_distance: dest[0] = mp_obj_new_float_from_f(data->distance); break; // converting from float; + case MP_QSTR_speed: dest[0] = mp_obj_new_float_from_f(data->speed); break; // converting from float; + case MP_QSTR_two_fingers_swipe_dir: dest[0] = mp_obj_new_int(data->two_fingers_swipe_dir); break; // converting from lv_dir_t; + case MP_QSTR_config: dest[0] = mp_read_ptr_lv_indev_gesture_configuration_t((void*)data->config); break; // converting from lv_indev_gesture_configuration_t *; + case MP_QSTR_recog_fn: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, data->recog_fn, NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL); break; // converting from callback lv_recognizer_func_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29849,19 +32785,16 @@ static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_glyph_data: data->glyph_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; - case MP_QSTR_letter_coords: data->letter_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_bg_coords: data->bg_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_g: data->g = (void*)mp_write_ptr_lv_font_glyph_dsc_t(dest[1]); break; // converting to lv_font_glyph_dsc_t *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR__draw_buf: data->_draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_state_t; + case MP_QSTR_info: data->info = (void*)mp_write_ptr_lv_indev_gesture_t(dest[1]); break; // converting to lv_indev_gesture_t *; + case MP_QSTR_scale: data->scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_rotation: data->rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_distance: data->distance = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_speed: data->speed = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_two_fingers_swipe_dir: data->two_fingers_swipe_dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; + case MP_QSTR_config: data->config = (void*)mp_write_ptr_lv_indev_gesture_configuration_t(dest[1]); break; // converting to lv_indev_gesture_configuration_t *; + case MP_QSTR_recog_fn: data->recog_fn = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL, NULL, NULL, NULL); break; // converting to callback lv_recognizer_func_t; default: return; } @@ -29870,40 +32803,40 @@ static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_draw_glyph_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_recognizer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_glyph_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_recognizer_t"); } -static const mp_obj_dict_t mp_lv_draw_glyph_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_recognizer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_glyph_dsc_t_type, - MP_QSTR_lv_draw_glyph_dsc_t, + mp_lv_indev_gesture_recognizer_t_type, + MP_QSTR_lv_indev_gesture_recognizer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_glyph_dsc_t_print, + print, mp_lv_indev_gesture_recognizer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_glyph_dsc_t_attr, - locals_dict, &mp_lv_draw_glyph_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_recognizer_t_attr, + locals_dict, &mp_lv_indev_gesture_recognizer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void) { - return &mp_lv_draw_glyph_dsc_t_type; + return &mp_lv_indev_gesture_recognizer_t_type; } /* - * Array convertors for lv_point_precise_t [3] + * Array convertors for lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT] */ -GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t___3__(mp_obj_t mp_arr) +GENMPY_UNUSED static lv_indev_gesture_recognizer_t *mp_arr_to_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) { // A packed buffer is already the C array (lvgl-bindings#37). if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || @@ -29914,62 +32847,94 @@ GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t___3__(mp_o if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); mp_int_t len = mp_obj_get_int(mp_len); //TODO check dim! - lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); + lv_indev_gesture_recognizer_t *lv_arr = (lv_indev_gesture_recognizer_t*)m_malloc(len * sizeof(lv_indev_gesture_recognizer_t)); mp_obj_t iter = mp_getiter(mp_arr, NULL); mp_obj_t item; size_t i = 0; while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_precise_t(item); + lv_arr[i++] = mp_write_lv_indev_gesture_recognizer_t(item); } - return (lv_point_precise_t *)lv_arr; + return (lv_indev_gesture_recognizer_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t___3__(lv_point_precise_t *arr) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_recognizer_t *arr) { - mp_obj_t obj_arr[3]; - for (size_t i=0; i<3; i++){ - obj_arr[i] = mp_read_lv_point_precise_t(arr[i]); + mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; + for (size_t i=0; idata; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_t_type())); + return (lv_indev_t*)self->data; } -#define mp_write_lv_draw_triangle_dsc_t(struct_obj) *((lv_draw_triangle_dsc_t*)mp_write_ptr_lv_draw_triangle_dsc_t(struct_obj)) +#define mp_write_lv_indev_t(struct_obj) *((lv_indev_t*)mp_write_ptr_lv_indev_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_triangle_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_triangle_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_t_type(), field); } -#define mp_read_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(copy_buffer(&field, sizeof(lv_draw_triangle_dsc_t))) -#define mp_read_byref_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(&field) +#define mp_read_lv_indev_t(field) mp_read_ptr_lv_indev_t(copy_buffer(&field, sizeof(lv_indev_t))) +#define mp_read_byref_lv_indev_t(field) mp_read_ptr_lv_indev_t(&field) -static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_t *data = (lv_indev_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_p: dest[0] = mp_lv_struct_array_new(self_in, data->p, 3, sizeof(lv_point_precise_t), mp_read_ptr_lv_point_precise_t, mp_write_ptr_lv_point_precise_t); break; // converting from lv_point_precise_t [3]; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_type_t; + case MP_QSTR_read_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, data->read_cb, lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, data->user_data); break; // converting from callback lv_indev_read_cb_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; + case MP_QSTR_prev_state: dest[0] = mp_obj_new_int(data->prev_state); break; // converting from lv_indev_state_t; + case MP_QSTR_mode: dest[0] = mp_obj_new_int(data->mode); break; // converting from lv_indev_mode_t; + case MP_QSTR_long_pr_sent: dest[0] = mp_obj_new_int_from_uint(data->long_pr_sent); break; // converting from uint8_t; + case MP_QSTR_reset_query: dest[0] = mp_obj_new_int_from_uint(data->reset_query); break; // converting from uint8_t; + case MP_QSTR_enabled: dest[0] = mp_obj_new_int_from_uint(data->enabled); break; // converting from uint8_t; + case MP_QSTR_wait_until_release: dest[0] = mp_obj_new_int_from_uint(data->wait_until_release); break; // converting from uint8_t; + case MP_QSTR_stop_processing_query: dest[0] = mp_obj_new_int_from_uint(data->stop_processing_query); break; // converting from uint8_t; + case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; + case MP_QSTR_pr_timestamp: dest[0] = mp_obj_new_int_from_uint(data->pr_timestamp); break; // converting from uint32_t; + case MP_QSTR_longpr_rep_timestamp: dest[0] = mp_obj_new_int_from_uint(data->longpr_rep_timestamp); break; // converting from uint32_t; + case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_disp: dest[0] = mp_read_ptr_lv_display_t((void*)data->disp); break; // converting from lv_display_t *; + case MP_QSTR_read_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->read_timer); break; // converting from lv_timer_t *; + case MP_QSTR_scroll_limit: dest[0] = mp_obj_new_int_from_uint(data->scroll_limit); break; // converting from uint8_t; + case MP_QSTR_scroll_throw: dest[0] = mp_obj_new_int_from_uint(data->scroll_throw); break; // converting from uint8_t; + case MP_QSTR_gesture_min_velocity: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_velocity); break; // converting from uint8_t; + case MP_QSTR_gesture_min_distance: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_distance); break; // converting from uint8_t; + case MP_QSTR_long_press_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_time); break; // converting from uint16_t; + case MP_QSTR_double_click_time: dest[0] = mp_obj_new_int_from_uint(data->double_click_time); break; // converting from uint16_t; + case MP_QSTR_long_press_repeat_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_repeat_time); break; // converting from uint16_t; + case MP_QSTR_rotary_sensitivity: dest[0] = mp_obj_new_int(data->rotary_sensitivity); break; // converting from int32_t; + case MP_QSTR_pointer: dest[0] = mp_read_byref_lv_indev_pointer_t(data->pointer); break; // converting from lv_indev_pointer_t; + case MP_QSTR_keypad: dest[0] = mp_read_byref_lv_indev_keypad_t(data->keypad); break; // converting from lv_indev_keypad_t; + case MP_QSTR_cursor: dest[0] = lv_to_mp((void*)data->cursor); break; // converting from lv_obj_t *; + case MP_QSTR_group: dest[0] = mp_read_ptr_lv_group_t((void*)data->group); break; // converting from lv_group_t *; + case MP_QSTR_btn_points: dest[0] = mp_read_ptr_lv_point_t((void*)data->btn_points); break; // converting from lv_point_t *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_scroll_throw_anim: dest[0] = mp_read_ptr_lv_anim_t((void*)data->scroll_throw_anim); break; // converting from lv_anim_t *; + case MP_QSTR_key_remap_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, data->key_remap_cb, lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, data->user_data); break; // converting from callback lv_indev_key_remap_cb_t; + case MP_QSTR_recognizers: dest[0] = mp_lv_struct_array_new(self_in, data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_read_ptr_lv_indev_gesture_recognizer_t, mp_write_ptr_lv_indev_gesture_recognizer_t); break; // converting from lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_cur_gesture: dest[0] = mp_obj_new_int(data->cur_gesture); break; // converting from lv_indev_gesture_type_t; + case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29978,11 +32943,43 @@ static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_p: mp_lv_struct_array_assign(data->p, 3, sizeof(lv_point_precise_t), mp_write_ptr_lv_point_precise_t, dest[1]); break; // converting to lv_point_precise_t [3]; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_type_t; + case MP_QSTR_read_cb: data->read_cb = mp_lv_callback(dest[1], lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_read_cb_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_prev_state: data->prev_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_mode: data->mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_mode_t; + case MP_QSTR_long_pr_sent: data->long_pr_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_reset_query: data->reset_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_enabled: data->enabled = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_wait_until_release: data->wait_until_release = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_processing_query: data->stop_processing_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pr_timestamp: data->pr_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_longpr_rep_timestamp: data->longpr_rep_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_disp: data->disp = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_read_timer: data->read_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; + case MP_QSTR_scroll_limit: data->scroll_limit = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_scroll_throw: data->scroll_throw = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_min_velocity: data->gesture_min_velocity = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_min_distance: data->gesture_min_distance = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_long_press_time: data->long_press_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_double_click_time: data->double_click_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_long_press_repeat_time: data->long_press_repeat_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_rotary_sensitivity: data->rotary_sensitivity = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_pointer: data->pointer = mp_write_lv_indev_pointer_t(dest[1]); break; // converting to lv_indev_pointer_t; + case MP_QSTR_keypad: data->keypad = mp_write_lv_indev_keypad_t(dest[1]); break; // converting to lv_indev_keypad_t; + case MP_QSTR_cursor: data->cursor = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_group: data->group = (void*)mp_write_ptr_lv_group_t(dest[1]); break; // converting to lv_group_t *; + case MP_QSTR_btn_points: data->btn_points = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_scroll_throw_anim: data->scroll_throw_anim = (void*)mp_write_ptr_lv_anim_t(dest[1]); break; // converting to lv_anim_t *; + case MP_QSTR_key_remap_cb: data->key_remap_cb = mp_lv_callback(dest[1], lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_key_remap_cb_t; + case MP_QSTR_recognizers: mp_lv_struct_array_assign(data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_write_ptr_lv_indev_gesture_recognizer_t, dest[1]); break; // converting to lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_cur_gesture: data->cur_gesture = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; + case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; default: return; } @@ -29991,147 +32988,154 @@ static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_draw_triangle_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_triangle_dsc_t"); + mp_printf(print, "struct lv_indev_t"); } -static const mp_obj_dict_t mp_lv_draw_triangle_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_triangle_dsc_t_type, - MP_QSTR_lv_draw_triangle_dsc_t, + mp_lv_indev_t_type, + MP_QSTR_lv_indev_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_triangle_dsc_t_print, + print, mp_lv_indev_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_triangle_dsc_t_attr, - locals_dict, &mp_lv_draw_triangle_dsc_t_locals_dict, + attr, mp_lv_indev_t_attr, + locals_dict, &mp_lv_indev_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_triangle_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_t_type(void) { - return &mp_lv_draw_triangle_dsc_t_type; + return &mp_lv_indev_t_type; } -#define funcptr_lv_indev_read_cb_t NULL - /* - * Array convertors for lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT] + * Struct lv_draw_mask_rect_dsc_t */ -GENMPY_UNUSED static lv_indev_gesture_type_t *mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) +static inline const mp_obj_type_t *get_mp_lv_draw_mask_rect_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_obj_t self_in) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_indev_gesture_type_t *lv_arr = (lv_indev_gesture_type_t*)m_malloc(len * sizeof(lv_indev_gesture_type_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (int)mp_obj_get_int(item); - } - return (lv_indev_gesture_type_t *)lv_arr; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_mask_rect_dsc_t_type())); + return (lv_draw_mask_rect_dsc_t*)self->data; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_type_t *arr) +#define mp_write_lv_draw_mask_rect_dsc_t(struct_obj) *((lv_draw_mask_rect_dsc_t*)mp_write_ptr_lv_draw_mask_rect_dsc_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_mask_rect_dsc_t(void *field) { - mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; - for (size_t i=0; idata; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_keep_outside: dest[0] = mp_obj_new_int_from_uint(data->keep_outside); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_keep_outside: data->keep_outside = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } } - return (void * *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(void * *arr) +static void mp_lv_draw_mask_rect_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; - for (size_t i=0; idata; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_binfont_dsc_t_type())); + return (lv_binfont_dsc_t*)self->data; } -#define mp_write_lv_indev_data_t(struct_obj) *((lv_indev_data_t*)mp_write_ptr_lv_indev_data_t(struct_obj)) +#define mp_write_lv_binfont_dsc_t(struct_obj) *((lv_binfont_dsc_t*)mp_write_ptr_lv_binfont_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_data_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_binfont_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_data_t_type(), field); + return lv_to_mp_struct(get_mp_lv_binfont_dsc_t_type(), field); } -#define mp_read_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(copy_buffer(&field, sizeof(lv_indev_data_t))) -#define mp_read_byref_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(&field) +#define mp_read_lv_binfont_dsc_t(field) mp_read_ptr_lv_binfont_dsc_t(copy_buffer(&field, sizeof(lv_binfont_dsc_t))) +#define mp_read_byref_lv_binfont_dsc_t(field) mp_read_ptr_lv_binfont_dsc_t(&field) -static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_binfont_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_data_t *data = (lv_indev_data_t*)self->data; + GENMPY_UNUSED lv_binfont_dsc_t *data = (lv_binfont_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; - case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; - case MP_QSTR_key: dest[0] = mp_obj_new_int_from_uint(data->key); break; // converting from uint32_t; - case MP_QSTR_btn_id: dest[0] = mp_obj_new_int_from_uint(data->btn_id); break; // converting from uint32_t; - case MP_QSTR_enc_diff: dest[0] = mp_obj_new_int(data->enc_diff); break; // converting from int16_t; - case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; - case MP_QSTR_continue_reading: dest[0] = convert_to_bool(data->continue_reading); break; // converting from bool; + case MP_QSTR_path: dest[0] = convert_to_str((void*)data->path); break; // converting from char *; + case MP_QSTR_buffer: dest[0] = ptr_to_mp((void*)data->buffer); break; // converting from void *; + case MP_QSTR_buffer_size: dest[0] = mp_obj_new_int_from_uint(data->buffer_size); break; // converting from uint32_t; + case MP_QSTR_dynamic_glyph_load: dest[0] = convert_to_bool(data->dynamic_glyph_load); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30140,15 +33144,10 @@ static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_key: data->key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_btn_id: data->btn_id = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_enc_diff: data->enc_diff = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_continue_reading: data->continue_reading = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_path: data->path = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_buffer: data->buffer = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_buffer_size: data->buffer_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_dynamic_glyph_load: data->dynamic_glyph_load = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -30157,183 +33156,130 @@ static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_indev_data_t_print(const mp_print_t *print, +static void mp_lv_binfont_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_data_t"); + mp_printf(print, "struct lv_binfont_dsc_t"); } -static const mp_obj_dict_t mp_lv_indev_data_t_locals_dict; +static const mp_obj_dict_t mp_lv_binfont_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_data_t_type, - MP_QSTR_lv_indev_data_t, + mp_lv_binfont_dsc_t_type, + MP_QSTR_lv_binfont_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_data_t_print, + print, mp_lv_binfont_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_data_t_attr, - locals_dict, &mp_lv_indev_data_t_locals_dict, + attr, mp_lv_binfont_dsc_t_attr, + locals_dict, &mp_lv_binfont_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_data_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_binfont_dsc_t_type(void) { - return &mp_lv_indev_data_t_type; + return &mp_lv_binfont_dsc_t_type; } +#define funcptr_lv_async_cb_t NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_async_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_async_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_async_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_async_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_async_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +#define funcptr_lv_delay_cb_t NULL + /* * lvgl extension definition for: - * void lv_indev_read_cb_t(lv_indev_t *indev, lv_indev_data_t *data) + * void lv_delay_cb_t(uint32_t ms) */ -static mp_obj_t mp_funcptr_lv_indev_read_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_delay_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_indev_t *indev = mp_to_ptr(mp_args[0]); - lv_indev_data_t *data = mp_write_ptr_lv_indev_data_t(mp_args[1]); - ((void (*)(lv_indev_t *, lv_indev_data_t *))lv_func_ptr)(indev, data); + uint32_t ms = (uint32_t)mp_obj_get_int(mp_args[0]); + ((void (*)(uint32_t))lv_func_ptr)(ms); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_read_cb_t_mpobj, 2, mp_funcptr_lv_indev_read_cb_t, funcptr_lv_indev_read_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_delay_cb_t_mpobj, 1, mp_funcptr_lv_delay_cb_t, funcptr_lv_delay_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_read_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_delay_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_delay_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +#define funcptr_lv_tick_get_cb_t NULL -static void lv_indev_t_read_cb_callback(lv_indev_t *indev, lv_indev_data_t *data); -typedef __typeof__( ((lv_indev_t*)(0))->pointer ) lv_indev_pointer_t; /* - * Array convertors for lv_point_t [8] + * lvgl extension definition for: + * uint32_t lv_tick_get_cb_t(void) */ -GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t___8__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_t(item); - } - return (lv_point_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t___8__(lv_point_t *arr) +static mp_obj_t mp_funcptr_lv_tick_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t obj_arr[8]; - for (size_t i=0; i<8; i++){ - obj_arr[i] = mp_read_lv_point_t(arr[i]); - } - return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! + + uint32_t _res = ((uint32_t (*)(void))lv_func_ptr)(); + return mp_obj_new_int_from_uint(_res); } + -/* - * Array convertors for uint32_t [8] - */ - -GENMPY_UNUSED static uint32_t *mp_arr_to_uint32_t___8__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - uint32_t *lv_arr = (uint32_t*)m_malloc(len * sizeof(uint32_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint32_t)mp_obj_get_int(item); - } - return (uint32_t *)lv_arr; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tick_get_cb_t_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, funcptr_lv_tick_get_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tick_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tick_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -GENMPY_UNUSED static mp_obj_t mp_arr_from_uint32_t___8__(uint32_t *arr) -{ - mp_obj_t obj_arr[8]; - for (size_t i=0; i<8; i++){ - obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); - } - return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! -} +#define funcptr_lv_draw_sw_blend_handler_t NULL /* - * Struct lv_indev_pointer_t + * Struct lv_draw_sw_blend_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_pointer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_pointer_t_type())); - return (lv_indev_pointer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_dsc_t_type())); + return (lv_draw_sw_blend_dsc_t*)self->data; } -#define mp_write_lv_indev_pointer_t(struct_obj) *((lv_indev_pointer_t*)mp_write_ptr_lv_indev_pointer_t(struct_obj)) +#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) *((lv_draw_sw_blend_dsc_t*)mp_write_ptr_lv_draw_sw_blend_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_pointer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_pointer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_blend_dsc_t_type(), field); } -#define mp_read_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(copy_buffer(&field, sizeof(lv_indev_pointer_t))) -#define mp_read_byref_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(&field) +#define mp_read_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) -static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_pointer_t *data = (lv_indev_pointer_t*)self->data; + GENMPY_UNUSED lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_act_point: dest[0] = mp_read_byref_lv_point_t(data->act_point); break; // converting from lv_point_t; - case MP_QSTR_last_point: dest[0] = mp_read_byref_lv_point_t(data->last_point); break; // converting from lv_point_t; - case MP_QSTR_last_raw_point: dest[0] = mp_read_byref_lv_point_t(data->last_raw_point); break; // converting from lv_point_t; - case MP_QSTR_vect: dest[0] = mp_read_byref_lv_point_t(data->vect); break; // converting from lv_point_t; - case MP_QSTR_vect_hist: dest[0] = mp_lv_struct_array_new(self_in, data->vect_hist, 8, sizeof(lv_point_t), mp_read_ptr_lv_point_t, mp_write_ptr_lv_point_t); break; // converting from lv_point_t [8]; - case MP_QSTR_vect_hist_timestamp: dest[0] = mp_arr_from_uint32_t___8__(data->vect_hist_timestamp); break; // converting from uint32_t [8]; - case MP_QSTR_vect_hist_index: dest[0] = mp_obj_new_int_from_uint(data->vect_hist_index); break; // converting from uint8_t; - case MP_QSTR_scroll_sum: dest[0] = mp_read_byref_lv_point_t(data->scroll_sum); break; // converting from lv_point_t; - case MP_QSTR_scroll_throw_vect: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect); break; // converting from lv_point_t; - case MP_QSTR_scroll_throw_vect_ori: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect_ori); break; // converting from lv_point_t; - case MP_QSTR_act_obj: dest[0] = lv_to_mp((void*)data->act_obj); break; // converting from lv_obj_t *; - case MP_QSTR_scroll_obj: dest[0] = lv_to_mp((void*)data->scroll_obj); break; // converting from lv_obj_t *; - case MP_QSTR_last_pressed: dest[0] = lv_to_mp((void*)data->last_pressed); break; // converting from lv_obj_t *; - case MP_QSTR_last_hovered: dest[0] = lv_to_mp((void*)data->last_hovered); break; // converting from lv_obj_t *; - case MP_QSTR_scroll_area: dest[0] = mp_read_byref_lv_area_t(data->scroll_area); break; // converting from lv_area_t; - case MP_QSTR_gesture_sum: dest[0] = mp_read_byref_lv_point_t(data->gesture_sum); break; // converting from lv_point_t; - case MP_QSTR_diff: dest[0] = mp_obj_new_int(data->diff); break; // converting from int32_t; - case MP_QSTR_short_click_streak: dest[0] = mp_obj_new_int_from_uint(data->short_click_streak); break; // converting from uint8_t; - case MP_QSTR_last_short_click_point: dest[0] = mp_read_byref_lv_point_t(data->last_short_click_point); break; // converting from lv_point_t; - case MP_QSTR_last_short_click_timestamp: dest[0] = mp_obj_new_int_from_uint(data->last_short_click_timestamp); break; // converting from uint32_t; - case MP_QSTR_scroll_dir: dest[0] = mp_obj_new_int_from_uint(data->scroll_dir); break; // converting from uint8_t; - case MP_QSTR_gesture_dir: dest[0] = mp_obj_new_int_from_uint(data->gesture_dir); break; // converting from uint8_t; - case MP_QSTR_gesture_sent: dest[0] = mp_obj_new_int_from_uint(data->gesture_sent); break; // converting from uint8_t; - case MP_QSTR_press_moved: dest[0] = mp_obj_new_int_from_uint(data->press_moved); break; // converting from uint8_t; - case MP_QSTR_pressed: dest[0] = mp_obj_new_int_from_uint(data->pressed); break; // converting from uint8_t; + case MP_QSTR_blend_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->blend_area); break; // converting from lv_area_t *; + case MP_QSTR_src_buf: dest[0] = ptr_to_mp((void*)data->src_buf); break; // converting from void *; + case MP_QSTR_src_stride: dest[0] = mp_obj_new_int_from_uint(data->src_stride); break; // converting from uint32_t; + case MP_QSTR_src_color_format: dest[0] = mp_obj_new_int(data->src_color_format); break; // converting from lv_color_format_t; + case MP_QSTR_src_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->src_area); break; // converting from lv_area_t *; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; + case MP_QSTR_mask_res: dest[0] = mp_obj_new_int(data->mask_res); break; // converting from lv_draw_sw_mask_res_t; + case MP_QSTR_mask_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->mask_area); break; // converting from lv_area_t *; + case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; + case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30342,31 +33288,18 @@ static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de // store attribute switch(attr) { - case MP_QSTR_act_point: data->act_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_point: data->last_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_raw_point: data->last_raw_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_vect: data->vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_vect_hist: mp_lv_struct_array_assign(data->vect_hist, 8, sizeof(lv_point_t), mp_write_ptr_lv_point_t, dest[1]); break; // converting to lv_point_t [8]; - case MP_QSTR_vect_hist_timestamp: memcpy((void*)&data->vect_hist_timestamp, mp_arr_to_uint32_t___8__(dest[1]), sizeof(uint32_t)*8); break; // converting to uint32_t [8]; - case MP_QSTR_vect_hist_index: data->vect_hist_index = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_scroll_sum: data->scroll_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_scroll_throw_vect: data->scroll_throw_vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_scroll_throw_vect_ori: data->scroll_throw_vect_ori = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_act_obj: data->act_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scroll_obj: data->scroll_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_last_pressed: data->last_pressed = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_last_hovered: data->last_hovered = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scroll_area: data->scroll_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_gesture_sum: data->gesture_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_diff: data->diff = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_short_click_streak: data->short_click_streak = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_last_short_click_point: data->last_short_click_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_short_click_timestamp: data->last_short_click_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_scroll_dir: data->scroll_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_dir: data->gesture_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_sent: data->gesture_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_press_moved: data->press_moved = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_pressed: data->pressed = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_blend_area: data->blend_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_src_buf: data->src_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_stride: data->src_stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_src_color_format: data->src_color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_src_area: data->src_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_mask_res: data->mask_res = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_res_t; + case MP_QSTR_mask_area: data->mask_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; default: return; } @@ -30375,69 +33308,95 @@ static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de } } -static void mp_lv_indev_pointer_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_blend_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_pointer_t"); + mp_printf(print, "struct lv_draw_sw_blend_dsc_t"); } -static const mp_obj_dict_t mp_lv_indev_pointer_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_blend_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_pointer_t_type, - MP_QSTR_lv_indev_pointer_t, + mp_lv_draw_sw_blend_dsc_t_type, + MP_QSTR_lv_draw_sw_blend_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_pointer_t_print, + print, mp_lv_draw_sw_blend_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_pointer_t_attr, - locals_dict, &mp_lv_indev_pointer_t_locals_dict, + attr, mp_lv_draw_sw_blend_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_blend_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void) { - return &mp_lv_indev_pointer_t_type; + return &mp_lv_draw_sw_blend_dsc_t_type; } -typedef __typeof__( ((lv_indev_t*)(0))->keypad ) lv_indev_keypad_t; /* - * Struct lv_indev_keypad_t + * lvgl extension definition for: + * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) */ -static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void); +static mp_obj_t mp_funcptr_lv_draw_sw_blend_handler_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_func_ptr)(t, dsc); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_keypad_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, funcptr_lv_draw_sw_blend_handler_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_blend_handler_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_custom_blend_handler_t_handler_callback' + * lv_draw_sw_blend_handler_t handler + */ + + +/* + * Struct lv_draw_sw_custom_blend_handler_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_keypad_t_type())); - return (lv_indev_keypad_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_custom_blend_handler_t_type())); + return (lv_draw_sw_custom_blend_handler_t*)self->data; } -#define mp_write_lv_indev_keypad_t(struct_obj) *((lv_indev_keypad_t*)mp_write_ptr_lv_indev_keypad_t(struct_obj)) +#define mp_write_lv_draw_sw_custom_blend_handler_t(struct_obj) *((lv_draw_sw_custom_blend_handler_t*)mp_write_ptr_lv_draw_sw_custom_blend_handler_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_keypad_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_custom_blend_handler_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_keypad_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_custom_blend_handler_t_type(), field); } -#define mp_read_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(copy_buffer(&field, sizeof(lv_indev_keypad_t))) -#define mp_read_byref_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(&field) +#define mp_read_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(copy_buffer(&field, sizeof(lv_draw_sw_custom_blend_handler_t))) +#define mp_read_byref_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(&field) -static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_keypad_t *data = (lv_indev_keypad_t*)self->data; + GENMPY_UNUSED lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_last_state: dest[0] = mp_obj_new_int(data->last_state); break; // converting from lv_indev_state_t; - case MP_QSTR_last_key: dest[0] = mp_obj_new_int_from_uint(data->last_key); break; // converting from uint32_t; + case MP_QSTR_dest_cf: dest[0] = mp_obj_new_int(data->dest_cf); break; // converting from lv_color_format_t; + case MP_QSTR_handler: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, data->handler, NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL); break; // converting from callback lv_draw_sw_blend_handler_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30446,8 +33405,8 @@ static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des // store attribute switch(attr) { - case MP_QSTR_last_state: data->last_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_last_key: data->last_key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_dest_cf: data->dest_cf = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_handler: data->handler = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_blend_handler_t; default: return; } @@ -30456,90 +33415,100 @@ static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des } } -static void mp_lv_indev_keypad_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_custom_blend_handler_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_keypad_t"); + mp_printf(print, "struct lv_draw_sw_custom_blend_handler_t"); } -static const mp_obj_dict_t mp_lv_indev_keypad_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_keypad_t_type, - MP_QSTR_lv_indev_keypad_t, + mp_lv_draw_sw_custom_blend_handler_t_type, + MP_QSTR_lv_draw_sw_custom_blend_handler_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_keypad_t_print, + print, mp_lv_draw_sw_custom_blend_handler_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_keypad_t_attr, - locals_dict, &mp_lv_indev_keypad_t_locals_dict, + attr, mp_lv_draw_sw_custom_blend_handler_t_attr, + locals_dict, &mp_lv_draw_sw_custom_blend_handler_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void) { - return &mp_lv_indev_keypad_t_type; + return &mp_lv_draw_sw_custom_blend_handler_t_type; } -#define funcptr_lv_indev_key_remap_cb_t NULL +#define funcptr_lv_draw_sw_mask_xcb_t NULL /* * lvgl extension definition for: - * lv_key_t lv_indev_key_remap_cb_t(lv_indev_t *indev, lv_key_t key) + * lv_draw_sw_mask_res_t lv_draw_sw_mask_xcb_t(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p) */ -static mp_obj_t mp_funcptr_lv_indev_key_remap_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_sw_mask_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_indev_t *indev = mp_to_ptr(mp_args[0]); - lv_key_t key = (int)mp_obj_get_int(mp_args[1]); - lv_key_t _res = ((lv_key_t (*)(lv_indev_t *, lv_key_t))lv_func_ptr)(indev, key); + lv_opa_t *mask_buf = mp_array_to_u8ptr(mp_args[0]); + int32_t abs_x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t abs_y = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t len = (int32_t)mp_obj_get_int(mp_args[3]); + void *p = mp_to_ptr(mp_args[4]); + lv_draw_sw_mask_res_t _res = ((lv_draw_sw_mask_res_t (*)(lv_opa_t *, int32_t, int32_t, int32_t, void *))lv_func_ptr)(mask_buf, abs_x, abs_y, len, p); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_key_remap_cb_t_mpobj, 2, mp_funcptr_lv_indev_key_remap_cb_t, funcptr_lv_indev_key_remap_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, 5, mp_funcptr_lv_draw_sw_mask_xcb_t, funcptr_lv_draw_sw_mask_xcb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_key_remap_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_mask_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *indev, lv_key_t key); /* - * Struct lv_indev_gesture_t + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_mask_common_dsc_t_cb_callback' + * lv_draw_sw_mask_xcb_t cb */ + -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void); +/* + * Struct lv_draw_sw_mask_common_dsc_t + */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_t(mp_obj_t self_in) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_common_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_t_type())); - return (lv_indev_gesture_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_common_dsc_t_type())); + return (lv_draw_sw_mask_common_dsc_t*)self->data; } -#define mp_write_lv_indev_gesture_t(struct_obj) *((lv_indev_gesture_t*)mp_write_ptr_lv_indev_gesture_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_common_dsc_t(struct_obj) *((lv_draw_sw_mask_common_dsc_t*)mp_write_ptr_lv_draw_sw_mask_common_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_common_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_gesture_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_common_dsc_t_type(), field); } -#define mp_read_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(copy_buffer(&field, sizeof(lv_indev_gesture_t))) -#define mp_read_byref_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(&field) +#define mp_read_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_common_dsc_t))) +#define mp_read_byref_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(&field) -static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_gesture_t *data = (lv_indev_gesture_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, data->cb, NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL); break; // converting from callback lv_draw_sw_mask_xcb_t; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_sw_mask_type_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30548,7 +33517,8 @@ static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de // store attribute switch(attr) { - ; + case MP_QSTR_cb: data->cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_mask_xcb_t; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_type_t; default: return; } @@ -30557,67 +33527,70 @@ static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de } } -static void mp_lv_indev_gesture_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_common_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_gesture_t"); + mp_printf(print, "struct lv_draw_sw_mask_common_dsc_t"); } -static const mp_obj_dict_t mp_lv_indev_gesture_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_common_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_gesture_t_type, - MP_QSTR_lv_indev_gesture_t, + mp_lv_draw_sw_mask_common_dsc_t_type, + MP_QSTR_lv_draw_sw_mask_common_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_gesture_t_print, + print, mp_lv_draw_sw_mask_common_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_gesture_t_attr, - locals_dict, &mp_lv_indev_gesture_t_locals_dict, + attr, mp_lv_draw_sw_mask_common_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_mask_common_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void) { - return &mp_lv_indev_gesture_t_type; + return &mp_lv_draw_sw_mask_common_dsc_t_type; } +typedef __typeof__( ((lv_draw_sw_mask_line_param_t*)(0))->cfg ) lv_draw_sw_mask_line_param_cfg_t; /* - * Struct lv_indev_gesture_configuration_t + * Struct lv_draw_sw_mask_line_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_configuration_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_configuration_t_type())); - return (lv_indev_gesture_configuration_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_cfg_t_type())); + return (lv_draw_sw_mask_line_param_cfg_t*)self->data; } -#define mp_write_lv_indev_gesture_configuration_t(struct_obj) *((lv_indev_gesture_configuration_t*)mp_write_ptr_lv_indev_gesture_configuration_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_line_param_cfg_t(struct_obj) *((lv_draw_sw_mask_line_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_configuration_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_gesture_configuration_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_cfg_t_type(), field); } -#define mp_read_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(copy_buffer(&field, sizeof(lv_indev_gesture_configuration_t))) -#define mp_read_byref_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(&field) +#define mp_read_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(&field) -static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_p1: dest[0] = mp_read_byref_lv_point_t(data->p1); break; // converting from lv_point_t; + case MP_QSTR_p2: dest[0] = mp_read_byref_lv_point_t(data->p2); break; // converting from lv_point_t; + case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_draw_sw_mask_line_side_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30626,7 +33599,9 @@ static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr // store attribute switch(attr) { - ; + case MP_QSTR_p1: data->p1 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_p2: data->p2 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_line_side_t; default: return; } @@ -30635,72 +33610,75 @@ static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr } } -static void mp_lv_indev_gesture_configuration_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_line_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_gesture_configuration_t"); + mp_printf(print, "struct lv_draw_sw_mask_line_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_indev_gesture_configuration_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_gesture_configuration_t_type, - MP_QSTR_lv_indev_gesture_configuration_t, + mp_lv_draw_sw_mask_line_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_line_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_gesture_configuration_t_print, + print, mp_lv_draw_sw_mask_line_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_gesture_configuration_t_attr, - locals_dict, &mp_lv_indev_gesture_configuration_t_locals_dict, + attr, mp_lv_draw_sw_mask_line_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void) { - return &mp_lv_indev_gesture_configuration_t_type; + return &mp_lv_draw_sw_mask_line_param_cfg_t_type; } -#define funcptr_lv_recognizer_func_t NULL - /* - * Struct lv_indev_touch_data_t + * Struct lv_draw_sw_mask_line_param_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_touch_data_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_touch_data_t_type())); - return (lv_indev_touch_data_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_t_type())); + return (lv_draw_sw_mask_line_param_t*)self->data; } -#define mp_write_lv_indev_touch_data_t(struct_obj) *((lv_indev_touch_data_t*)mp_write_ptr_lv_indev_touch_data_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_line_param_t(struct_obj) *((lv_draw_sw_mask_line_param_t*)mp_write_ptr_lv_draw_sw_mask_line_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_touch_data_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_touch_data_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_t_type(), field); } -#define mp_read_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(copy_buffer(&field, sizeof(lv_indev_touch_data_t))) -#define mp_read_byref_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(&field) +#define mp_read_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_t))) +#define mp_read_byref_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(&field) -static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; - case MP_QSTR_id: dest[0] = mp_obj_new_int_from_uint(data->id); break; // converting from uint8_t; - case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; + case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_line_param_cfg_t; + case MP_QSTR_origo: dest[0] = mp_read_byref_lv_point_t(data->origo); break; // converting from lv_point_t; + case MP_QSTR_xy_steep: dest[0] = mp_obj_new_int(data->xy_steep); break; // converting from int32_t; + case MP_QSTR_yx_steep: dest[0] = mp_obj_new_int(data->yx_steep); break; // converting from int32_t; + case MP_QSTR_steep: dest[0] = mp_obj_new_int(data->steep); break; // converting from int32_t; + case MP_QSTR_spx: dest[0] = mp_obj_new_int(data->spx); break; // converting from int32_t; + case MP_QSTR_flat: dest[0] = mp_obj_new_int_from_uint(data->flat); break; // converting from uint8_t; + case MP_QSTR_inv: dest[0] = mp_obj_new_int_from_uint(data->inv); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30709,10 +33687,15 @@ static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_id: data->id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_line_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_cfg_t; + case MP_QSTR_origo: data->origo = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_xy_steep: data->xy_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_yx_steep: data->yx_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_steep: data->steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_spx: data->spx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_flat: data->flat = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_inv: data->inv = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -30721,104 +33704,70 @@ static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_indev_touch_data_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_line_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_touch_data_t"); + mp_printf(print, "struct lv_draw_sw_mask_line_param_t"); } -static const mp_obj_dict_t mp_lv_indev_touch_data_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_touch_data_t_type, - MP_QSTR_lv_indev_touch_data_t, + mp_lv_draw_sw_mask_line_param_t_type, + MP_QSTR_lv_draw_sw_mask_line_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_touch_data_t_print, + print, mp_lv_draw_sw_mask_line_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_touch_data_t_attr, - locals_dict, &mp_lv_indev_touch_data_t_locals_dict, + attr, mp_lv_draw_sw_mask_line_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_line_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void) -{ - return &mp_lv_indev_touch_data_t_type; -} - - -/* - * lvgl extension definition for: - * void lv_recognizer_func_t(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t) - */ - -static mp_obj_t mp_funcptr_lv_recognizer_func_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void) { - lv_indev_gesture_recognizer_t *arg0 = mp_to_ptr(mp_args[0]); - lv_indev_touch_data_t *arg1 = mp_write_ptr_lv_indev_touch_data_t(mp_args[1]); - uint16_t arg2 = (uint16_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_func_ptr)(arg0, arg1, arg2); - return mp_const_none; + return &mp_lv_draw_sw_mask_line_param_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_recognizer_func_t_mpobj, 3, mp_funcptr_lv_recognizer_func_t, funcptr_lv_recognizer_func_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_recognizer_func_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_indev_gesture_recognizer_t_recog_fn_callback' - * lv_recognizer_func_t recog_fn - */ +typedef __typeof__( ((lv_draw_sw_mask_angle_param_t*)(0))->cfg ) lv_draw_sw_mask_angle_param_cfg_t; /* - * Struct lv_indev_gesture_recognizer_t + * Struct lv_draw_sw_mask_angle_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_recognizer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_recognizer_t_type())); - return (lv_indev_gesture_recognizer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_cfg_t_type())); + return (lv_draw_sw_mask_angle_param_cfg_t*)self->data; } -#define mp_write_lv_indev_gesture_recognizer_t(struct_obj) *((lv_indev_gesture_recognizer_t*)mp_write_ptr_lv_indev_gesture_recognizer_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_angle_param_cfg_t(struct_obj) *((lv_draw_sw_mask_angle_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_recognizer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_gesture_recognizer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(), field); } -#define mp_read_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(copy_buffer(&field, sizeof(lv_indev_gesture_recognizer_t))) -#define mp_read_byref_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(&field) +#define mp_read_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(&field) -static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_gesture_type_t; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_gesture_state_t; - case MP_QSTR_info: dest[0] = mp_read_ptr_lv_indev_gesture_t((void*)data->info); break; // converting from lv_indev_gesture_t *; - case MP_QSTR_scale: dest[0] = mp_obj_new_float_from_f(data->scale); break; // converting from float; - case MP_QSTR_rotation: dest[0] = mp_obj_new_float_from_f(data->rotation); break; // converting from float; - case MP_QSTR_distance: dest[0] = mp_obj_new_float_from_f(data->distance); break; // converting from float; - case MP_QSTR_speed: dest[0] = mp_obj_new_float_from_f(data->speed); break; // converting from float; - case MP_QSTR_two_fingers_swipe_dir: dest[0] = mp_obj_new_int(data->two_fingers_swipe_dir); break; // converting from lv_dir_t; - case MP_QSTR_config: dest[0] = mp_read_ptr_lv_indev_gesture_configuration_t((void*)data->config); break; // converting from lv_indev_gesture_configuration_t *; - case MP_QSTR_recog_fn: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, data->recog_fn, NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL); break; // converting from callback lv_recognizer_func_t; + case MP_QSTR_vertex_p: dest[0] = mp_read_byref_lv_point_t(data->vertex_p); break; // converting from lv_point_t; + case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int32_t; + case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30827,16 +33776,9 @@ static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, m // store attribute switch(attr) { - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_state_t; - case MP_QSTR_info: data->info = (void*)mp_write_ptr_lv_indev_gesture_t(dest[1]); break; // converting to lv_indev_gesture_t *; - case MP_QSTR_scale: data->scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_rotation: data->rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_distance: data->distance = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_speed: data->speed = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_two_fingers_swipe_dir: data->two_fingers_swipe_dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; - case MP_QSTR_config: data->config = (void*)mp_write_ptr_lv_indev_gesture_configuration_t(dest[1]); break; // converting to lv_indev_gesture_configuration_t *; - case MP_QSTR_recog_fn: data->recog_fn = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL, NULL, NULL, NULL); break; // converting to callback lv_recognizer_func_t; + case MP_QSTR_vertex_p: data->vertex_p = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_start_angle: data->start_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_end_angle: data->end_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -30845,137 +33787,156 @@ static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, m } } -static void mp_lv_indev_gesture_recognizer_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_angle_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_gesture_recognizer_t"); + mp_printf(print, "struct lv_draw_sw_mask_angle_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_indev_gesture_recognizer_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_gesture_recognizer_t_type, - MP_QSTR_lv_indev_gesture_recognizer_t, + mp_lv_draw_sw_mask_angle_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_angle_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_gesture_recognizer_t_print, + print, mp_lv_draw_sw_mask_angle_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_gesture_recognizer_t_attr, - locals_dict, &mp_lv_indev_gesture_recognizer_t_locals_dict, + attr, mp_lv_draw_sw_mask_angle_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void) { - return &mp_lv_indev_gesture_recognizer_t_type; + return &mp_lv_draw_sw_mask_angle_param_cfg_t_type; } /* - * Array convertors for lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT] + * Struct lv_draw_sw_mask_angle_param_t */ -GENMPY_UNUSED static lv_indev_gesture_recognizer_t *mp_arr_to_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_t(mp_obj_t self_in) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_indev_gesture_recognizer_t *lv_arr = (lv_indev_gesture_recognizer_t*)m_malloc(len * sizeof(lv_indev_gesture_recognizer_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_indev_gesture_recognizer_t(item); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_t_type())); + return (lv_draw_sw_mask_angle_param_t*)self->data; +} + +#define mp_write_lv_draw_sw_mask_angle_param_t(struct_obj) *((lv_draw_sw_mask_angle_param_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_t_type(), field); +} + +#define mp_read_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_t))) +#define mp_read_byref_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(&field) + +static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_angle_param_cfg_t; + case MP_QSTR_start_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->start_line); break; // converting from lv_draw_sw_mask_line_param_t; + case MP_QSTR_end_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->end_line); break; // converting from lv_draw_sw_mask_line_param_t; + case MP_QSTR_delta_deg: dest[0] = mp_obj_new_int_from_uint(data->delta_deg); break; // converting from uint16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_angle_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_angle_param_cfg_t; + case MP_QSTR_start_line: data->start_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; + case MP_QSTR_end_line: data->end_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; + case MP_QSTR_delta_deg: data->delta_deg = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } } - return (lv_indev_gesture_recognizer_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_recognizer_t *arr) +static void mp_lv_draw_sw_mask_angle_param_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; - for (size_t i=0; icfg ) lv_draw_sw_mask_radius_param_cfg_t; /* - * Struct lv_indev_t + * Struct lv_draw_sw_mask_radius_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_t_type())); - return (lv_indev_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_cfg_t_type())); + return (lv_draw_sw_mask_radius_param_cfg_t*)self->data; } -#define mp_write_lv_indev_t(struct_obj) *((lv_indev_t*)mp_write_ptr_lv_indev_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_radius_param_cfg_t(struct_obj) *((lv_draw_sw_mask_radius_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(), field); } -#define mp_read_lv_indev_t(field) mp_read_ptr_lv_indev_t(copy_buffer(&field, sizeof(lv_indev_t))) -#define mp_read_byref_lv_indev_t(field) mp_read_ptr_lv_indev_t(&field) +#define mp_read_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(&field) -static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_t *data = (lv_indev_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_type_t; - case MP_QSTR_read_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, data->read_cb, lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, data->user_data); break; // converting from callback lv_indev_read_cb_t; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; - case MP_QSTR_prev_state: dest[0] = mp_obj_new_int(data->prev_state); break; // converting from lv_indev_state_t; - case MP_QSTR_mode: dest[0] = mp_obj_new_int(data->mode); break; // converting from lv_indev_mode_t; - case MP_QSTR_long_pr_sent: dest[0] = mp_obj_new_int_from_uint(data->long_pr_sent); break; // converting from uint8_t; - case MP_QSTR_reset_query: dest[0] = mp_obj_new_int_from_uint(data->reset_query); break; // converting from uint8_t; - case MP_QSTR_enabled: dest[0] = mp_obj_new_int_from_uint(data->enabled); break; // converting from uint8_t; - case MP_QSTR_wait_until_release: dest[0] = mp_obj_new_int_from_uint(data->wait_until_release); break; // converting from uint8_t; - case MP_QSTR_stop_processing_query: dest[0] = mp_obj_new_int_from_uint(data->stop_processing_query); break; // converting from uint8_t; - case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; - case MP_QSTR_pr_timestamp: dest[0] = mp_obj_new_int_from_uint(data->pr_timestamp); break; // converting from uint32_t; - case MP_QSTR_longpr_rep_timestamp: dest[0] = mp_obj_new_int_from_uint(data->longpr_rep_timestamp); break; // converting from uint32_t; - case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_disp: dest[0] = mp_read_ptr_lv_display_t((void*)data->disp); break; // converting from lv_display_t *; - case MP_QSTR_read_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->read_timer); break; // converting from lv_timer_t *; - case MP_QSTR_scroll_limit: dest[0] = mp_obj_new_int_from_uint(data->scroll_limit); break; // converting from uint8_t; - case MP_QSTR_scroll_throw: dest[0] = mp_obj_new_int_from_uint(data->scroll_throw); break; // converting from uint8_t; - case MP_QSTR_gesture_min_velocity: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_velocity); break; // converting from uint8_t; - case MP_QSTR_gesture_min_distance: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_distance); break; // converting from uint8_t; - case MP_QSTR_long_press_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_time); break; // converting from uint16_t; - case MP_QSTR_long_press_repeat_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_repeat_time); break; // converting from uint16_t; - case MP_QSTR_rotary_sensitivity: dest[0] = mp_obj_new_int(data->rotary_sensitivity); break; // converting from int32_t; - case MP_QSTR_pointer: dest[0] = mp_read_byref_lv_indev_pointer_t(data->pointer); break; // converting from lv_indev_pointer_t; - case MP_QSTR_keypad: dest[0] = mp_read_byref_lv_indev_keypad_t(data->keypad); break; // converting from lv_indev_keypad_t; - case MP_QSTR_cursor: dest[0] = lv_to_mp((void*)data->cursor); break; // converting from lv_obj_t *; - case MP_QSTR_group: dest[0] = mp_read_ptr_lv_group_t((void*)data->group); break; // converting from lv_group_t *; - case MP_QSTR_btn_points: dest[0] = mp_read_ptr_lv_point_t((void*)data->btn_points); break; // converting from lv_point_t *; - case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; - case MP_QSTR_scroll_throw_anim: dest[0] = mp_read_ptr_lv_anim_t((void*)data->scroll_throw_anim); break; // converting from lv_anim_t *; - case MP_QSTR_key_remap_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, data->key_remap_cb, lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, data->user_data); break; // converting from callback lv_indev_key_remap_cb_t; - case MP_QSTR_recognizers: dest[0] = mp_lv_struct_array_new(self_in, data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_read_ptr_lv_indev_gesture_recognizer_t, mp_write_ptr_lv_indev_gesture_recognizer_t); break; // converting from lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_cur_gesture: dest[0] = mp_obj_new_int(data->cur_gesture); break; // converting from lv_indev_gesture_type_t; - case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_rect: dest[0] = mp_read_byref_lv_area_t(data->rect); break; // converting from lv_area_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_outer: dest[0] = mp_obj_new_int_from_uint(data->outer); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30984,42 +33945,9 @@ static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_type_t; - case MP_QSTR_read_cb: data->read_cb = mp_lv_callback(dest[1], lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_read_cb_t; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_prev_state: data->prev_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_mode: data->mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_mode_t; - case MP_QSTR_long_pr_sent: data->long_pr_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_reset_query: data->reset_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_enabled: data->enabled = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_wait_until_release: data->wait_until_release = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_processing_query: data->stop_processing_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pr_timestamp: data->pr_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_longpr_rep_timestamp: data->longpr_rep_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_disp: data->disp = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_read_timer: data->read_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; - case MP_QSTR_scroll_limit: data->scroll_limit = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_scroll_throw: data->scroll_throw = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_min_velocity: data->gesture_min_velocity = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_min_distance: data->gesture_min_distance = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_long_press_time: data->long_press_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_long_press_repeat_time: data->long_press_repeat_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_rotary_sensitivity: data->rotary_sensitivity = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_pointer: data->pointer = mp_write_lv_indev_pointer_t(dest[1]); break; // converting to lv_indev_pointer_t; - case MP_QSTR_keypad: data->keypad = mp_write_lv_indev_keypad_t(dest[1]); break; // converting to lv_indev_keypad_t; - case MP_QSTR_cursor: data->cursor = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_group: data->group = (void*)mp_write_ptr_lv_group_t(dest[1]); break; // converting to lv_group_t *; - case MP_QSTR_btn_points: data->btn_points = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; - case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; - case MP_QSTR_scroll_throw_anim: data->scroll_throw_anim = (void*)mp_write_ptr_lv_anim_t(dest[1]); break; // converting to lv_anim_t *; - case MP_QSTR_key_remap_cb: data->key_remap_cb = mp_lv_callback(dest[1], lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_key_remap_cb_t; - case MP_QSTR_recognizers: mp_lv_struct_array_assign(data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_write_ptr_lv_indev_gesture_recognizer_t, dest[1]); break; // converting to lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_cur_gesture: data->cur_gesture = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; - case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_rect: data->rect = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_outer: data->outer = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -31028,70 +33956,73 @@ static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_indev_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_radius_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_t"); + mp_printf(print, "struct lv_draw_sw_mask_radius_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_indev_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_t_type, - MP_QSTR_lv_indev_t, + mp_lv_draw_sw_mask_radius_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_radius_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_t_print, + print, mp_lv_draw_sw_mask_radius_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_t_attr, - locals_dict, &mp_lv_indev_t_locals_dict, + attr, mp_lv_draw_sw_mask_radius_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void) { - return &mp_lv_indev_t_type; + return &mp_lv_draw_sw_mask_radius_param_cfg_t_type; } /* - * Struct lv_draw_mask_rect_dsc_t + * Struct lv_draw_sw_mask_radius_circle_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_mask_rect_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_mask_rect_dsc_t_type())); - return (lv_draw_mask_rect_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type())); + return (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; } -#define mp_write_lv_draw_mask_rect_dsc_t(struct_obj) *((lv_draw_mask_rect_dsc_t*)mp_write_ptr_lv_draw_mask_rect_dsc_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj) *((lv_draw_sw_mask_radius_circle_dsc_t*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_mask_rect_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_mask_rect_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(), field); } -#define mp_read_lv_draw_mask_rect_dsc_t(field) mp_read_ptr_lv_draw_mask_rect_dsc_t(copy_buffer(&field, sizeof(lv_draw_mask_rect_dsc_t))) -#define mp_read_byref_lv_draw_mask_rect_dsc_t(field) mp_read_ptr_lv_draw_mask_rect_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_circle_dsc_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(&field) -static void mp_lv_draw_mask_rect_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_mask_rect_dsc_t *data = (lv_draw_mask_rect_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR_buf: dest[0] = mp_array_from_u8ptr((void*)data->buf); break; // converting from uint8_t *; + case MP_QSTR_cir_opa: dest[0] = mp_array_from_u8ptr((void*)data->cir_opa); break; // converting from lv_opa_t *; + case MP_QSTR_x_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->x_start_on_y); break; // converting from uint16_t *; + case MP_QSTR_opa_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->opa_start_on_y); break; // converting from uint16_t *; + case MP_QSTR_life: dest[0] = mp_obj_new_int(data->life); break; // converting from int32_t; + case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from uint32_t; case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_keep_outside: dest[0] = mp_obj_new_int_from_uint(data->keep_outside); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31100,10 +34031,13 @@ static void mp_lv_draw_mask_rect_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_buf: data->buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; + case MP_QSTR_cir_opa: data->cir_opa = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_x_start_on_y: data->x_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; + case MP_QSTR_opa_start_on_y: data->opa_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; + case MP_QSTR_life: data->life = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_used_cnt: data->used_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_keep_outside: data->keep_outside = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -31112,100 +34046,69 @@ static void mp_lv_draw_mask_rect_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ } } -static void mp_lv_draw_mask_rect_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_radius_circle_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_mask_rect_dsc_t"); + mp_printf(print, "struct lv_draw_sw_mask_radius_circle_dsc_t"); } -static const mp_obj_dict_t mp_lv_draw_mask_rect_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_mask_rect_dsc_t_type, - MP_QSTR_lv_draw_mask_rect_dsc_t, + mp_lv_draw_sw_mask_radius_circle_dsc_t_type, + MP_QSTR_lv_draw_sw_mask_radius_circle_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_mask_rect_dsc_t_print, + print, mp_lv_draw_sw_mask_radius_circle_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_mask_rect_dsc_t_attr, - locals_dict, &mp_lv_draw_mask_rect_dsc_t_locals_dict, + attr, mp_lv_draw_sw_mask_radius_circle_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_mask_rect_dsc_t_type(void) -{ - return &mp_lv_draw_mask_rect_dsc_t_type; -} - -#define funcptr_lv_draw_sw_mask_xcb_t NULL - - -/* - * lvgl extension definition for: - * lv_draw_sw_mask_res_t lv_draw_sw_mask_xcb_t(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p) - */ - -static mp_obj_t mp_funcptr_lv_draw_sw_mask_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void) { - lv_opa_t *mask_buf = mp_array_to_u8ptr(mp_args[0]); - int32_t abs_x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t abs_y = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t len = (int32_t)mp_obj_get_int(mp_args[3]); - void *p = mp_to_ptr(mp_args[4]); - lv_draw_sw_mask_res_t _res = ((lv_draw_sw_mask_res_t (*)(lv_opa_t *, int32_t, int32_t, int32_t, void *))lv_func_ptr)(mask_buf, abs_x, abs_y, len, p); - return mp_obj_new_int(_res); + return &mp_lv_draw_sw_mask_radius_circle_dsc_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, 5, mp_funcptr_lv_draw_sw_mask_xcb_t, funcptr_lv_draw_sw_mask_xcb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_mask_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_mask_common_dsc_t_cb_callback' - * lv_draw_sw_mask_xcb_t cb - */ /* - * Struct lv_draw_sw_mask_common_dsc_t + * Struct lv_draw_sw_mask_radius_param_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_common_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_common_dsc_t_type())); - return (lv_draw_sw_mask_common_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_t_type())); + return (lv_draw_sw_mask_radius_param_t*)self->data; } -#define mp_write_lv_draw_sw_mask_common_dsc_t(struct_obj) *((lv_draw_sw_mask_common_dsc_t*)mp_write_ptr_lv_draw_sw_mask_common_dsc_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_radius_param_t(struct_obj) *((lv_draw_sw_mask_radius_param_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_common_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_common_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_t_type(), field); } -#define mp_read_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_common_dsc_t))) -#define mp_read_byref_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(&field) -static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, data->cb, NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL); break; // converting from callback lv_draw_sw_mask_xcb_t; - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_sw_mask_type_t; + case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_radius_param_cfg_t; + case MP_QSTR_circle: dest[0] = mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t((void*)data->circle); break; // converting from lv_draw_sw_mask_radius_circle_dsc_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31214,8 +34117,9 @@ static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp // store attribute switch(attr) { - case MP_QSTR_cb: data->cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_mask_xcb_t; - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_type_t; + case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_radius_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_param_cfg_t; + case MP_QSTR_circle: data->circle = (void*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_circle_dsc_t *; default: return; } @@ -31224,70 +34128,72 @@ static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_draw_sw_mask_common_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_radius_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_common_dsc_t"); + mp_printf(print, "struct lv_draw_sw_mask_radius_param_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_common_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_common_dsc_t_type, - MP_QSTR_lv_draw_sw_mask_common_dsc_t, + mp_lv_draw_sw_mask_radius_param_t_type, + MP_QSTR_lv_draw_sw_mask_radius_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_common_dsc_t_print, + print, mp_lv_draw_sw_mask_radius_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_common_dsc_t_attr, - locals_dict, &mp_lv_draw_sw_mask_common_dsc_t_locals_dict, + attr, mp_lv_draw_sw_mask_radius_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_radius_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void) { - return &mp_lv_draw_sw_mask_common_dsc_t_type; + return &mp_lv_draw_sw_mask_radius_param_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_line_param_t*)(0))->cfg ) lv_draw_sw_mask_line_param_cfg_t; +typedef __typeof__( ((lv_draw_sw_mask_fade_param_t*)(0))->cfg ) lv_draw_sw_mask_fade_param_cfg_t; /* - * Struct lv_draw_sw_mask_line_param_cfg_t + * Struct lv_draw_sw_mask_fade_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_cfg_t_type())); - return (lv_draw_sw_mask_line_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_cfg_t_type())); + return (lv_draw_sw_mask_fade_param_cfg_t*)self->data; } -#define mp_write_lv_draw_sw_mask_line_param_cfg_t(struct_obj) *((lv_draw_sw_mask_line_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_fade_param_cfg_t(struct_obj) *((lv_draw_sw_mask_fade_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(), field); } -#define mp_read_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(&field) +#define mp_read_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(&field) -static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_p1: dest[0] = mp_read_byref_lv_point_t(data->p1); break; // converting from lv_point_t; - case MP_QSTR_p2: dest[0] = mp_read_byref_lv_point_t(data->p2); break; // converting from lv_point_t; - case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_draw_sw_mask_line_side_t; + case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; + case MP_QSTR_y_top: dest[0] = mp_obj_new_int(data->y_top); break; // converting from int32_t; + case MP_QSTR_y_bottom: dest[0] = mp_obj_new_int(data->y_bottom); break; // converting from int32_t; + case MP_QSTR_opa_top: dest[0] = mp_obj_new_int_from_uint(data->opa_top); break; // converting from lv_opa_t; + case MP_QSTR_opa_bottom: dest[0] = mp_obj_new_int_from_uint(data->opa_bottom); break; // converting from lv_opa_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31296,9 +34202,11 @@ static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr // store attribute switch(attr) { - case MP_QSTR_p1: data->p1 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_p2: data->p2 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_line_side_t; + case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_y_top: data->y_top = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y_bottom: data->y_bottom = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa_top: data->opa_top = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_opa_bottom: data->opa_bottom = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; default: return; } @@ -31307,75 +34215,68 @@ static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr } } -static void mp_lv_draw_sw_mask_line_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_fade_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_line_param_cfg_t"); + mp_printf(print, "struct lv_draw_sw_mask_fade_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_line_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_line_param_cfg_t, + mp_lv_draw_sw_mask_fade_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_fade_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_line_param_cfg_t_print, + print, mp_lv_draw_sw_mask_fade_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_line_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict, + attr, mp_lv_draw_sw_mask_fade_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void) { - return &mp_lv_draw_sw_mask_line_param_cfg_t_type; + return &mp_lv_draw_sw_mask_fade_param_cfg_t_type; } /* - * Struct lv_draw_sw_mask_line_param_t + * Struct lv_draw_sw_mask_fade_param_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_t_type())); - return (lv_draw_sw_mask_line_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_t_type())); + return (lv_draw_sw_mask_fade_param_t*)self->data; } -#define mp_write_lv_draw_sw_mask_line_param_t(struct_obj) *((lv_draw_sw_mask_line_param_t*)mp_write_ptr_lv_draw_sw_mask_line_param_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_fade_param_t(struct_obj) *((lv_draw_sw_mask_fade_param_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_t_type(), field); } -#define mp_read_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_t))) -#define mp_read_byref_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(&field) +#define mp_read_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_t))) +#define mp_read_byref_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(&field) -static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_line_param_cfg_t; - case MP_QSTR_origo: dest[0] = mp_read_byref_lv_point_t(data->origo); break; // converting from lv_point_t; - case MP_QSTR_xy_steep: dest[0] = mp_obj_new_int(data->xy_steep); break; // converting from int32_t; - case MP_QSTR_yx_steep: dest[0] = mp_obj_new_int(data->yx_steep); break; // converting from int32_t; - case MP_QSTR_steep: dest[0] = mp_obj_new_int(data->steep); break; // converting from int32_t; - case MP_QSTR_spx: dest[0] = mp_obj_new_int(data->spx); break; // converting from int32_t; - case MP_QSTR_flat: dest[0] = mp_obj_new_int_from_uint(data->flat); break; // converting from uint8_t; - case MP_QSTR_inv: dest[0] = mp_obj_new_int_from_uint(data->inv); break; // converting from uint8_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_fade_param_cfg_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31385,14 +34286,7 @@ static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp switch(attr) { case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_line_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_cfg_t; - case MP_QSTR_origo: data->origo = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_xy_steep: data->xy_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_yx_steep: data->yx_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_steep: data->steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_spx: data->spx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_flat: data->flat = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_inv: data->inv = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_fade_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_fade_param_cfg_t; default: return; } @@ -31401,70 +34295,69 @@ static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_draw_sw_mask_line_param_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_fade_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_line_param_t"); + mp_printf(print, "struct lv_draw_sw_mask_fade_param_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_line_param_t_type, - MP_QSTR_lv_draw_sw_mask_line_param_t, + mp_lv_draw_sw_mask_fade_param_t_type, + MP_QSTR_lv_draw_sw_mask_fade_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_line_param_t_print, + print, mp_lv_draw_sw_mask_fade_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_line_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_line_param_t_locals_dict, + attr, mp_lv_draw_sw_mask_fade_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_fade_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void) { - return &mp_lv_draw_sw_mask_line_param_t_type; + return &mp_lv_draw_sw_mask_fade_param_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_angle_param_t*)(0))->cfg ) lv_draw_sw_mask_angle_param_cfg_t; +typedef __typeof__( ((lv_draw_sw_mask_map_param_t*)(0))->cfg ) lv_draw_sw_mask_map_param_cfg_t; /* - * Struct lv_draw_sw_mask_angle_param_cfg_t + * Struct lv_draw_sw_mask_map_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_cfg_t_type())); - return (lv_draw_sw_mask_angle_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_cfg_t_type())); + return (lv_draw_sw_mask_map_param_cfg_t*)self->data; } -#define mp_write_lv_draw_sw_mask_angle_param_cfg_t(struct_obj) *((lv_draw_sw_mask_angle_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_map_param_cfg_t(struct_obj) *((lv_draw_sw_mask_map_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_cfg_t_type(), field); } -#define mp_read_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(&field) +#define mp_read_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(&field) -static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_vertex_p: dest[0] = mp_read_byref_lv_point_t(data->vertex_p); break; // converting from lv_point_t; - case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int32_t; - case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int32_t; + case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; + case MP_QSTR_map: dest[0] = mp_array_from_u8ptr((void*)data->map); break; // converting from lv_opa_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31473,9 +34366,8 @@ static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr att // store attribute switch(attr) { - case MP_QSTR_vertex_p: data->vertex_p = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_start_angle: data->start_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_end_angle: data->end_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_map: data->map = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; default: return; } @@ -31484,71 +34376,68 @@ static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr att } } -static void mp_lv_draw_sw_mask_angle_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_map_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_angle_param_cfg_t"); + mp_printf(print, "struct lv_draw_sw_mask_map_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_angle_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_angle_param_cfg_t, + mp_lv_draw_sw_mask_map_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_map_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_angle_param_cfg_t_print, + print, mp_lv_draw_sw_mask_map_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_angle_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict, + attr, mp_lv_draw_sw_mask_map_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void) { - return &mp_lv_draw_sw_mask_angle_param_cfg_t_type; + return &mp_lv_draw_sw_mask_map_param_cfg_t_type; } /* - * Struct lv_draw_sw_mask_angle_param_t + * Struct lv_draw_sw_mask_map_param_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_t_type())); - return (lv_draw_sw_mask_angle_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_t_type())); + return (lv_draw_sw_mask_map_param_t*)self->data; } -#define mp_write_lv_draw_sw_mask_angle_param_t(struct_obj) *((lv_draw_sw_mask_angle_param_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_map_param_t(struct_obj) *((lv_draw_sw_mask_map_param_t*)mp_write_ptr_lv_draw_sw_mask_map_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_t_type(), field); } -#define mp_read_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_t))) -#define mp_read_byref_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(&field) +#define mp_read_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_t))) +#define mp_read_byref_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(&field) -static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_angle_param_cfg_t; - case MP_QSTR_start_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->start_line); break; // converting from lv_draw_sw_mask_line_param_t; - case MP_QSTR_end_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->end_line); break; // converting from lv_draw_sw_mask_line_param_t; - case MP_QSTR_delta_deg: dest[0] = mp_obj_new_int_from_uint(data->delta_deg); break; // converting from uint16_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_map_param_cfg_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31558,10 +34447,7 @@ static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, m switch(attr) { case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_angle_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_angle_param_cfg_t; - case MP_QSTR_start_line: data->start_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; - case MP_QSTR_end_line: data->end_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; - case MP_QSTR_delta_deg: data->delta_deg = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_map_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_map_param_cfg_t; default: return; } @@ -31570,70 +34456,106 @@ static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, m } } -static void mp_lv_draw_sw_mask_angle_param_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_map_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_angle_param_t"); + mp_printf(print, "struct lv_draw_sw_mask_map_param_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_angle_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_angle_param_t_type, - MP_QSTR_lv_draw_sw_mask_angle_param_t, + mp_lv_draw_sw_mask_map_param_t_type, + MP_QSTR_lv_draw_sw_mask_map_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_angle_param_t_print, + print, mp_lv_draw_sw_mask_map_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_angle_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_angle_param_t_locals_dict, + attr, mp_lv_draw_sw_mask_map_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_map_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void) { - return &mp_lv_draw_sw_mask_angle_param_t_type; + return &mp_lv_draw_sw_mask_map_param_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_radius_param_t*)(0))->cfg ) lv_draw_sw_mask_radius_param_cfg_t; /* - * Struct lv_draw_sw_mask_radius_param_cfg_t + * Array convertors for lv_area_t [] */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void); +GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_area_t(item); + } + return (lv_area_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t_____(lv_area_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_cfg_t_type())); - return (lv_draw_sw_mask_radius_param_cfg_t*)self->data; + return mp_read_ptr_lv_area_t((void*)arr); } -#define mp_write_lv_draw_sw_mask_radius_param_cfg_t(struct_obj) *((lv_draw_sw_mask_radius_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(void *field) +/* + * Struct lv_draw_sw_blend_fill_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_fill_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(mp_obj_t self_in) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(), field); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_fill_dsc_t_type())); + return (lv_draw_sw_blend_fill_dsc_t*)self->data; } -#define mp_read_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(&field) +#define mp_write_lv_draw_sw_blend_fill_dsc_t(struct_obj) *((lv_draw_sw_blend_fill_dsc_t*)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(struct_obj)) -static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_sw_blend_fill_dsc_t_type(), field); +} + +#define mp_read_lv_draw_sw_blend_fill_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_fill_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_fill_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(&field) + +static void mp_lv_draw_sw_blend_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)self->data; + GENMPY_UNUSED lv_draw_sw_blend_fill_dsc_t *data = (lv_draw_sw_blend_fill_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_rect: dest[0] = mp_read_byref_lv_area_t(data->rect); break; // converting from lv_area_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_outer: dest[0] = mp_obj_new_int_from_uint(data->outer); break; // converting from uint8_t; + case MP_QSTR_dest_buf: dest[0] = ptr_to_mp((void*)data->dest_buf); break; // converting from void *; + case MP_QSTR_dest_w: dest[0] = mp_obj_new_int(data->dest_w); break; // converting from int32_t; + case MP_QSTR_dest_h: dest[0] = mp_obj_new_int(data->dest_h); break; // converting from int32_t; + case MP_QSTR_dest_stride: dest[0] = mp_obj_new_int(data->dest_stride); break; // converting from int32_t; + case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; + case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_relative_area: dest[0] = mp_read_byref_lv_area_t(data->relative_area); break; // converting from lv_area_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31642,9 +34564,15 @@ static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr at // store attribute switch(attr) { - case MP_QSTR_rect: data->rect = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_outer: data->outer = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_dest_buf: data->dest_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_dest_w: data->dest_w = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_h: data->dest_h = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_stride: data->dest_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_relative_area: data->relative_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; default: return; } @@ -31653,73 +34581,79 @@ static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr at } } -static void mp_lv_draw_sw_mask_radius_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_blend_fill_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_radius_param_cfg_t"); + mp_printf(print, "struct lv_draw_sw_blend_fill_dsc_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_blend_fill_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_radius_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_radius_param_cfg_t, + mp_lv_draw_sw_blend_fill_dsc_t_type, + MP_QSTR_lv_draw_sw_blend_fill_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_radius_param_cfg_t_print, + print, mp_lv_draw_sw_blend_fill_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_radius_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict, + attr, mp_lv_draw_sw_blend_fill_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_blend_fill_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_fill_dsc_t_type(void) { - return &mp_lv_draw_sw_mask_radius_param_cfg_t_type; + return &mp_lv_draw_sw_blend_fill_dsc_t_type; } /* - * Struct lv_draw_sw_mask_radius_circle_dsc_t + * Struct lv_draw_sw_blend_image_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_image_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_image_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type())); - return (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_image_dsc_t_type())); + return (lv_draw_sw_blend_image_dsc_t*)self->data; } -#define mp_write_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj) *((lv_draw_sw_mask_radius_circle_dsc_t*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj)) +#define mp_write_lv_draw_sw_blend_image_dsc_t(struct_obj) *((lv_draw_sw_blend_image_dsc_t*)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_image_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_blend_image_dsc_t_type(), field); } -#define mp_read_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_circle_dsc_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(&field) +#define mp_read_lv_draw_sw_blend_image_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_image_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_image_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_image_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_image_dsc_t(&field) -static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_blend_image_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_sw_blend_image_dsc_t *data = (lv_draw_sw_blend_image_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_buf: dest[0] = mp_array_from_u8ptr((void*)data->buf); break; // converting from uint8_t *; - case MP_QSTR_cir_opa: dest[0] = mp_array_from_u8ptr((void*)data->cir_opa); break; // converting from lv_opa_t *; - case MP_QSTR_x_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->x_start_on_y); break; // converting from uint16_t *; - case MP_QSTR_opa_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->opa_start_on_y); break; // converting from uint16_t *; - case MP_QSTR_life: dest[0] = mp_obj_new_int(data->life); break; // converting from int32_t; - case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from uint32_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_dest_buf: dest[0] = ptr_to_mp((void*)data->dest_buf); break; // converting from void *; + case MP_QSTR_dest_w: dest[0] = mp_obj_new_int(data->dest_w); break; // converting from int32_t; + case MP_QSTR_dest_h: dest[0] = mp_obj_new_int(data->dest_h); break; // converting from int32_t; + case MP_QSTR_dest_stride: dest[0] = mp_obj_new_int(data->dest_stride); break; // converting from int32_t; + case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; + case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; + case MP_QSTR_src_buf: dest[0] = ptr_to_mp((void*)data->src_buf); break; // converting from void *; + case MP_QSTR_src_stride: dest[0] = mp_obj_new_int(data->src_stride); break; // converting from int32_t; + case MP_QSTR_src_color_format: dest[0] = mp_obj_new_int(data->src_color_format); break; // converting from lv_color_format_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; + case MP_QSTR_relative_area: dest[0] = mp_read_byref_lv_area_t(data->relative_area); break; // converting from lv_area_t; + case MP_QSTR_src_area: dest[0] = mp_read_byref_lv_area_t(data->src_area); break; // converting from lv_area_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31728,13 +34662,19 @@ static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr a // store attribute switch(attr) { - case MP_QSTR_buf: data->buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; - case MP_QSTR_cir_opa: data->cir_opa = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; - case MP_QSTR_x_start_on_y: data->x_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; - case MP_QSTR_opa_start_on_y: data->opa_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; - case MP_QSTR_life: data->life = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_used_cnt: data->used_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_buf: data->dest_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_dest_w: data->dest_w = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_h: data->dest_h = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_stride: data->dest_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_src_buf: data->src_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_stride: data->src_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_src_color_format: data->src_color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; + case MP_QSTR_relative_area: data->relative_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_src_area: data->src_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; default: return; } @@ -31743,69 +34683,69 @@ static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr a } } -static void mp_lv_draw_sw_mask_radius_circle_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_blend_image_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_radius_circle_dsc_t"); + mp_printf(print, "struct lv_draw_sw_blend_image_dsc_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_blend_image_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_radius_circle_dsc_t_type, - MP_QSTR_lv_draw_sw_mask_radius_circle_dsc_t, + mp_lv_draw_sw_blend_image_dsc_t_type, + MP_QSTR_lv_draw_sw_blend_image_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_radius_circle_dsc_t_print, + print, mp_lv_draw_sw_blend_image_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_radius_circle_dsc_t_attr, - locals_dict, &mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict, + attr, mp_lv_draw_sw_blend_image_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_blend_image_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_image_dsc_t_type(void) { - return &mp_lv_draw_sw_mask_radius_circle_dsc_t_type; + return &mp_lv_draw_sw_blend_image_dsc_t_type; } /* - * Struct lv_draw_sw_mask_radius_param_t + * Struct lv_draw_sw_grad_calc_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_grad_calc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_grad_calc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_t_type())); - return (lv_draw_sw_mask_radius_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_grad_calc_t_type())); + return (lv_draw_sw_grad_calc_t*)self->data; } -#define mp_write_lv_draw_sw_mask_radius_param_t(struct_obj) *((lv_draw_sw_mask_radius_param_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_t(struct_obj)) +#define mp_write_lv_draw_sw_grad_calc_t(struct_obj) *((lv_draw_sw_grad_calc_t*)mp_write_ptr_lv_draw_sw_grad_calc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_grad_calc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_grad_calc_t_type(), field); } -#define mp_read_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(&field) +#define mp_read_lv_draw_sw_grad_calc_t(field) mp_read_ptr_lv_draw_sw_grad_calc_t(copy_buffer(&field, sizeof(lv_draw_sw_grad_calc_t))) +#define mp_read_byref_lv_draw_sw_grad_calc_t(field) mp_read_ptr_lv_draw_sw_grad_calc_t(&field) -static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_grad_calc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)self->data; + GENMPY_UNUSED lv_draw_sw_grad_calc_t *data = (lv_draw_sw_grad_calc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_radius_param_cfg_t; - case MP_QSTR_circle: dest[0] = mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t((void*)data->circle); break; // converting from lv_draw_sw_mask_radius_circle_dsc_t *; + case MP_QSTR_color_map: dest[0] = mp_read_ptr_lv_color_t((void*)data->color_map); break; // converting from lv_color_t *; + case MP_QSTR_opa_map: dest[0] = mp_array_from_u8ptr((void*)data->opa_map); break; // converting from lv_opa_t *; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31814,9 +34754,9 @@ static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_radius_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_param_cfg_t; - case MP_QSTR_circle: data->circle = (void*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_circle_dsc_t *; + case MP_QSTR_color_map: data->color_map = (void*)mp_write_ptr_lv_color_t(dest[1]); break; // converting to lv_color_t *; + case MP_QSTR_opa_map: data->opa_map = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -31825,72 +34765,67 @@ static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, } } -static void mp_lv_draw_sw_mask_radius_param_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_grad_calc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_radius_param_t"); + mp_printf(print, "struct lv_draw_sw_grad_calc_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_grad_calc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_radius_param_t_type, - MP_QSTR_lv_draw_sw_mask_radius_param_t, + mp_lv_draw_sw_grad_calc_t_type, + MP_QSTR_lv_draw_sw_grad_calc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_radius_param_t_print, + print, mp_lv_draw_sw_grad_calc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_radius_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_radius_param_t_locals_dict, + attr, mp_lv_draw_sw_grad_calc_t_attr, + locals_dict, &mp_lv_draw_sw_grad_calc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_grad_calc_t_type(void) { - return &mp_lv_draw_sw_mask_radius_param_t_type; + return &mp_lv_draw_sw_grad_calc_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_fade_param_t*)(0))->cfg ) lv_draw_sw_mask_fade_param_cfg_t; /* - * Struct lv_draw_sw_mask_fade_param_cfg_t + * Struct lv_circle_buf_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_circle_buf_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_cfg_t_type())); - return (lv_draw_sw_mask_fade_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_circle_buf_t_type())); + return (lv_circle_buf_t*)self->data; } -#define mp_write_lv_draw_sw_mask_fade_param_cfg_t(struct_obj) *((lv_draw_sw_mask_fade_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(struct_obj)) +#define mp_write_lv_circle_buf_t(struct_obj) *((lv_circle_buf_t*)mp_write_ptr_lv_circle_buf_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_circle_buf_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_circle_buf_t_type(), field); } -#define mp_read_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(&field) +#define mp_read_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(copy_buffer(&field, sizeof(lv_circle_buf_t))) +#define mp_read_byref_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(&field) -static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)self->data; + GENMPY_UNUSED lv_circle_buf_t *data = (lv_circle_buf_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; - case MP_QSTR_y_top: dest[0] = mp_obj_new_int(data->y_top); break; // converting from int32_t; - case MP_QSTR_y_bottom: dest[0] = mp_obj_new_int(data->y_bottom); break; // converting from int32_t; - case MP_QSTR_opa_top: dest[0] = mp_obj_new_int_from_uint(data->opa_top); break; // converting from lv_opa_t; - case MP_QSTR_opa_bottom: dest[0] = mp_obj_new_int_from_uint(data->opa_bottom); break; // converting from lv_opa_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31899,11 +34834,7 @@ static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr // store attribute switch(attr) { - case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_y_top: data->y_top = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y_bottom: data->y_bottom = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa_top: data->opa_top = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_opa_bottom: data->opa_bottom = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + ; default: return; } @@ -31912,68 +34843,89 @@ static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr } } -static void mp_lv_draw_sw_mask_fade_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_circle_buf_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_fade_param_cfg_t"); + mp_printf(print, "struct lv_circle_buf_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_circle_buf_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_fade_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_fade_param_cfg_t, + mp_lv_circle_buf_t_type, + MP_QSTR_lv_circle_buf_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_fade_param_cfg_t_print, + print, mp_lv_circle_buf_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_fade_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict, + attr, mp_lv_circle_buf_t_attr, + locals_dict, &mp_lv_circle_buf_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void) { - return &mp_lv_draw_sw_mask_fade_param_cfg_t_type; + return &mp_lv_circle_buf_t_type; } +#define funcptr_lv_lru_free_cb_t NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_lru_free_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_lru_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_lru_free_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_lru_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_lru_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * Struct lv_draw_sw_mask_fade_param_t + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_lru_t_value_free_callback' + * lv_lru_free_cb_t value_free */ + -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_lru_t_key_free_callback' + * lv_lru_free_cb_t key_free + */ + -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_t(mp_obj_t self_in) +/* + * Struct lv_lru_item_t + */ + +static inline const mp_obj_type_t *get_mp_lv_lru_item_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_lru_item_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_t_type())); - return (lv_draw_sw_mask_fade_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_lru_item_t_type())); + return (lv_lru_item_t*)self->data; } -#define mp_write_lv_draw_sw_mask_fade_param_t(struct_obj) *((lv_draw_sw_mask_fade_param_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_t(struct_obj)) +#define mp_write_lv_lru_item_t(struct_obj) *((lv_lru_item_t*)mp_write_ptr_lv_lru_item_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_lru_item_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_lru_item_t_type(), field); } -#define mp_read_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_t))) -#define mp_read_byref_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(&field) +#define mp_read_lv_lru_item_t(field) mp_read_ptr_lv_lru_item_t(copy_buffer(&field, sizeof(lv_lru_item_t))) +#define mp_read_byref_lv_lru_item_t(field) mp_read_ptr_lv_lru_item_t(&field) -static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_lru_item_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)self->data; + GENMPY_UNUSED lv_lru_item_t *data = (lv_lru_item_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_fade_param_cfg_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31982,8 +34934,7 @@ static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_fade_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_fade_param_cfg_t; + ; default: return; } @@ -31992,69 +34943,76 @@ static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_draw_sw_mask_fade_param_t_print(const mp_print_t *print, +static void mp_lv_lru_item_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_fade_param_t"); + mp_printf(print, "struct lv_lru_item_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_lru_item_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_fade_param_t_type, - MP_QSTR_lv_draw_sw_mask_fade_param_t, + mp_lv_lru_item_t_type, + MP_QSTR_lv_lru_item_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_fade_param_t_print, + print, mp_lv_lru_item_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_fade_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_fade_param_t_locals_dict, + attr, mp_lv_lru_item_t_attr, + locals_dict, &mp_lv_lru_item_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_lru_item_t_type(void) { - return &mp_lv_draw_sw_mask_fade_param_t_type; + return &mp_lv_lru_item_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_map_param_t*)(0))->cfg ) lv_draw_sw_mask_map_param_cfg_t; /* - * Struct lv_draw_sw_mask_map_param_cfg_t + * Struct lv_lru_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_lru_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_lru_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_cfg_t_type())); - return (lv_draw_sw_mask_map_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_lru_t_type())); + return (lv_lru_t*)self->data; } -#define mp_write_lv_draw_sw_mask_map_param_cfg_t(struct_obj) *((lv_draw_sw_mask_map_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(struct_obj)) +#define mp_write_lv_lru_t(struct_obj) *((lv_lru_t*)mp_write_ptr_lv_lru_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_lru_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_lru_t_type(), field); } -#define mp_read_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(&field) +#define mp_read_lv_lru_t(field) mp_read_ptr_lv_lru_t(copy_buffer(&field, sizeof(lv_lru_t))) +#define mp_read_byref_lv_lru_t(field) mp_read_ptr_lv_lru_t(&field) -static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_lru_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)self->data; + GENMPY_UNUSED lv_lru_t *data = (lv_lru_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; - case MP_QSTR_map: dest[0] = mp_array_from_u8ptr((void*)data->map); break; // converting from lv_opa_t *; + case MP_QSTR_items: dest[0] = ptr_to_mp((void*)data->items); break; // converting from lv_lru_item_t **; + case MP_QSTR_access_count: dest[0] = mp_obj_new_int_from_ull(data->access_count); break; // converting from uint64_t; + case MP_QSTR_free_memory: dest[0] = mp_obj_new_int_from_uint(data->free_memory); break; // converting from size_t; + case MP_QSTR_total_memory: dest[0] = mp_obj_new_int_from_uint(data->total_memory); break; // converting from size_t; + case MP_QSTR_average_item_length: dest[0] = mp_obj_new_int_from_uint(data->average_item_length); break; // converting from size_t; + case MP_QSTR_hash_table_size: dest[0] = mp_obj_new_int_from_uint(data->hash_table_size); break; // converting from size_t; + case MP_QSTR_seed: dest[0] = mp_obj_new_int_from_uint(data->seed); break; // converting from uint32_t; + case MP_QSTR_value_free: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_lru_free_cb_t_mpobj, data->value_free, NULL ,MP_QSTR_lv_lru_t_value_free, NULL); break; // converting from callback lv_lru_free_cb_t; + case MP_QSTR_key_free: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_lru_free_cb_t_mpobj, data->key_free, NULL ,MP_QSTR_lv_lru_t_key_free, NULL); break; // converting from callback lv_lru_free_cb_t; + case MP_QSTR_free_items: dest[0] = mp_read_ptr_lv_lru_item_t((void*)data->free_items); break; // converting from lv_lru_item_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32063,8 +35021,16 @@ static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, // store attribute switch(attr) { - case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_map: data->map = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_items: data->items = (void*)mp_to_ptr(dest[1]); break; // converting to lv_lru_item_t **; + case MP_QSTR_access_count: data->access_count = (uint64_t)mp_obj_get_ull(dest[1]); break; // converting to uint64_t; + case MP_QSTR_free_memory: data->free_memory = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_total_memory: data->total_memory = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_average_item_length: data->average_item_length = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_hash_table_size: data->hash_table_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_seed: data->seed = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_value_free: data->value_free = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_lru_t_value_free, NULL, NULL, NULL, NULL); break; // converting to callback lv_lru_free_cb_t; + case MP_QSTR_key_free: data->key_free = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_lru_t_key_free, NULL, NULL, NULL, NULL); break; // converting to callback lv_lru_free_cb_t; + case MP_QSTR_free_items: data->free_items = (void*)mp_write_ptr_lv_lru_item_t(dest[1]); break; // converting to lv_lru_item_t *; default: return; } @@ -32073,68 +35039,67 @@ static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, } } -static void mp_lv_draw_sw_mask_map_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_lru_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_map_param_cfg_t"); + mp_printf(print, "struct lv_lru_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_lru_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_map_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_map_param_cfg_t, + mp_lv_lru_t_type, + MP_QSTR_lv_lru_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_map_param_cfg_t_print, + print, mp_lv_lru_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_map_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict, + attr, mp_lv_lru_t_attr, + locals_dict, &mp_lv_lru_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_lru_t_type(void) { - return &mp_lv_draw_sw_mask_map_param_cfg_t_type; + return &mp_lv_lru_t_type; } /* - * Struct lv_draw_sw_mask_map_param_t + * Struct lv_pending_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_pending_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_pending_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_t_type())); - return (lv_draw_sw_mask_map_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_pending_t_type())); + return (lv_pending_t*)self->data; } -#define mp_write_lv_draw_sw_mask_map_param_t(struct_obj) *((lv_draw_sw_mask_map_param_t*)mp_write_ptr_lv_draw_sw_mask_map_param_t(struct_obj)) +#define mp_write_lv_pending_t(struct_obj) *((lv_pending_t*)mp_write_ptr_lv_pending_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_pending_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_pending_t_type(), field); } -#define mp_read_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_t))) -#define mp_read_byref_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(&field) +#define mp_read_lv_pending_t(field) mp_read_ptr_lv_pending_t(copy_buffer(&field, sizeof(lv_pending_t))) +#define mp_read_byref_lv_pending_t(field) mp_read_ptr_lv_pending_t(&field) -static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_pending_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)self->data; + GENMPY_UNUSED lv_pending_t *data = (lv_pending_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_map_param_cfg_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32143,8 +35108,7 @@ static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_ // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_map_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_map_param_cfg_t; + ; default: return; } @@ -32153,80 +35117,71 @@ static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_ } } -static void mp_lv_draw_sw_mask_map_param_t_print(const mp_print_t *print, +static void mp_lv_pending_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_map_param_t"); + mp_printf(print, "struct lv_pending_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_pending_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_map_param_t_type, - MP_QSTR_lv_draw_sw_mask_map_param_t, + mp_lv_pending_t_type, + MP_QSTR_lv_pending_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_map_param_t_print, + print, mp_lv_pending_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_map_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_map_param_t_locals_dict, + attr, mp_lv_pending_t_attr, + locals_dict, &mp_lv_pending_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_pending_t_type(void) { - return &mp_lv_draw_sw_mask_map_param_t_type; + return &mp_lv_pending_t_type; } -#define funcptr_lv_draw_sw_blend_handler_t NULL - /* - * Struct lv_draw_sw_blend_dsc_t + * Struct lv_rb_node_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_node_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_dsc_t_type())); - return (lv_draw_sw_blend_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_node_t_type())); + return (lv_rb_node_t*)self->data; } -#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) *((lv_draw_sw_blend_dsc_t*)mp_write_ptr_lv_draw_sw_blend_dsc_t(struct_obj)) +#define mp_write_lv_rb_node_t(struct_obj) *((lv_rb_node_t*)mp_write_ptr_lv_rb_node_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_node_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_blend_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_rb_node_t_type(), field); } -#define mp_read_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) -#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) +#define mp_read_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(copy_buffer(&field, sizeof(lv_rb_node_t))) +#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) -static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)self->data; + GENMPY_UNUSED lv_rb_node_t *data = (lv_rb_node_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_blend_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->blend_area); break; // converting from lv_area_t *; - case MP_QSTR_src_buf: dest[0] = ptr_to_mp((void*)data->src_buf); break; // converting from void *; - case MP_QSTR_src_stride: dest[0] = mp_obj_new_int_from_uint(data->src_stride); break; // converting from uint32_t; - case MP_QSTR_src_color_format: dest[0] = mp_obj_new_int(data->src_color_format); break; // converting from lv_color_format_t; - case MP_QSTR_src_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->src_area); break; // converting from lv_area_t *; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; - case MP_QSTR_mask_res: dest[0] = mp_obj_new_int(data->mask_res); break; // converting from lv_draw_sw_mask_res_t; - case MP_QSTR_mask_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->mask_area); break; // converting from lv_area_t *; - case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; - case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_rb_node_t *; + case MP_QSTR_left: dest[0] = ptr_to_mp((void*)data->left); break; // converting from lv_rb_node_t *; + case MP_QSTR_right: dest[0] = ptr_to_mp((void*)data->right); break; // converting from lv_rb_node_t *; + case MP_QSTR_color: dest[0] = mp_obj_new_int(data->color); break; // converting from lv_rb_color_t; + case MP_QSTR_data: dest[0] = ptr_to_mp((void*)data->data); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32235,18 +35190,11 @@ static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_blend_area: data->blend_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_src_buf: data->src_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_src_stride: data->src_stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_src_color_format: data->src_color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_src_area: data->src_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; - case MP_QSTR_mask_res: data->mask_res = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_res_t; - case MP_QSTR_mask_area: data->mask_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_left: data->left = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_right: data->right = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_color: data->color = (int)mp_obj_get_int(dest[1]); break; // converting to lv_rb_color_t; + case MP_QSTR_data: data->data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -32255,95 +35203,98 @@ static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_draw_sw_blend_dsc_t_print(const mp_print_t *print, +static void mp_lv_rb_node_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_blend_dsc_t"); + mp_printf(print, "struct lv_rb_node_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_blend_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_rb_node_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_blend_dsc_t_type, - MP_QSTR_lv_draw_sw_blend_dsc_t, + mp_lv_rb_node_t_type, + MP_QSTR_lv_rb_node_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_blend_dsc_t_print, + print, mp_lv_rb_node_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_blend_dsc_t_attr, - locals_dict, &mp_lv_draw_sw_blend_dsc_t_locals_dict, + attr, mp_lv_rb_node_t_attr, + locals_dict, &mp_lv_rb_node_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void) { - return &mp_lv_draw_sw_blend_dsc_t_type; + return &mp_lv_rb_node_t_type; } +#define funcptr_lv_rb_compare_t NULL + /* * lvgl extension definition for: - * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) */ -static mp_obj_t mp_funcptr_lv_draw_sw_blend_handler_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_rb_compare_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const void *a = (const void *)mp_to_ptr(mp_args[0]); + const void *b = (const void *)mp_to_ptr(mp_args[1]); + lv_rb_compare_res_t _res = ((lv_rb_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, funcptr_lv_draw_sw_blend_handler_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_rb_compare_t_mpobj, 2, mp_funcptr_lv_rb_compare_t, funcptr_lv_rb_compare_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_blend_handler_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_custom_blend_handler_t_handler_callback' - * lv_draw_sw_blend_handler_t handler + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_rb_t_compare_callback' + * lv_rb_compare_t compare */ /* - * Struct lv_draw_sw_custom_blend_handler_t + * Struct lv_rb_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_custom_blend_handler_t_type())); - return (lv_draw_sw_custom_blend_handler_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_t_type())); + return (lv_rb_t*)self->data; } -#define mp_write_lv_draw_sw_custom_blend_handler_t(struct_obj) *((lv_draw_sw_custom_blend_handler_t*)mp_write_ptr_lv_draw_sw_custom_blend_handler_t(struct_obj)) +#define mp_write_lv_rb_t(struct_obj) *((lv_rb_t*)mp_write_ptr_lv_rb_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_custom_blend_handler_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_custom_blend_handler_t_type(), field); + return lv_to_mp_struct(get_mp_lv_rb_t_type(), field); } -#define mp_read_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(copy_buffer(&field, sizeof(lv_draw_sw_custom_blend_handler_t))) -#define mp_read_byref_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(&field) +#define mp_read_lv_rb_t(field) mp_read_ptr_lv_rb_t(copy_buffer(&field, sizeof(lv_rb_t))) +#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) -static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)self->data; + GENMPY_UNUSED lv_rb_t *data = (lv_rb_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dest_cf: dest[0] = mp_obj_new_int(data->dest_cf); break; // converting from lv_color_format_t; - case MP_QSTR_handler: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, data->handler, NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL); break; // converting from callback lv_draw_sw_blend_handler_t; + case MP_QSTR_root: dest[0] = mp_read_ptr_lv_rb_node_t((void*)data->root); break; // converting from lv_rb_node_t *; + case MP_QSTR_compare: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, data->compare, NULL ,MP_QSTR_lv_rb_t_compare, NULL); break; // converting from callback lv_rb_compare_t; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32352,8 +35303,9 @@ static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr att // store attribute switch(attr) { - case MP_QSTR_dest_cf: data->dest_cf = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_handler: data->handler = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_blend_handler_t; + case MP_QSTR_root: data->root = (void*)mp_write_ptr_lv_rb_node_t(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_compare: data->compare = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_rb_t_compare, NULL, NULL, NULL, NULL); break; // converting to callback lv_rb_compare_t; + case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; default: return; } @@ -32362,32 +35314,32 @@ static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr att } } -static void mp_lv_draw_sw_custom_blend_handler_t_print(const mp_print_t *print, +static void mp_lv_rb_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_custom_blend_handler_t"); + mp_printf(print, "struct lv_rb_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict; +static const mp_obj_dict_t mp_lv_rb_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_custom_blend_handler_t_type, - MP_QSTR_lv_draw_sw_custom_blend_handler_t, + mp_lv_rb_t_type, + MP_QSTR_lv_rb_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_custom_blend_handler_t_print, + print, mp_lv_rb_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_custom_blend_handler_t_attr, - locals_dict, &mp_lv_draw_sw_custom_blend_handler_t_locals_dict, + attr, mp_lv_rb_t_attr, + locals_dict, &mp_lv_rb_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void) { - return &mp_lv_draw_sw_custom_blend_handler_t_type; + return &mp_lv_rb_t_type; } @@ -32475,37 +35427,6 @@ static inline const mp_obj_type_t *get_mp_lv_text_attributes_t_type(void) } -/* - * Array convertors for lv_area_t [] - */ - -GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_area_t(item); - } - return (lv_area_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t_____(lv_area_t *arr) -{ - return mp_read_ptr_lv_area_t((void*)arr); -} - - static const mp_rom_map_elem_t mp_C_Pointer_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(C_Pointer))) }, @@ -33147,94 +36068,148 @@ static const mp_rom_map_elem_t mp_lv_image_colorkey_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_image_colorkey_t_locals_dict, mp_lv_image_colorkey_t_locals_dict_table); -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); +/* + * lvgl extension definition for: + * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) + */ + +static mp_obj_t mp_lv_font_get_line_height_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_internal_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height_internal); /* * lvgl extension definition for: - * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) + * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) */ -static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_has_static_bitmap_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); - uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); - return mp_obj_new_int_from_uint(_res); + bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_internal_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap_internal); /* * lvgl extension definition for: - * int32_t lv_font_get_line_height(const lv_font_t *font) + * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static mp_obj_t mp_lv_font_get_line_height(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_bottom_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_func_ptr)(font, trim); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height, lv_font_get_line_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim_internal); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim_internal); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); /* * lvgl extension definition for: - * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) + * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); - lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); - return mp_const_none; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); + uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); + +/* Reusing lv_font_get_line_height_internal for lv_font_get_line_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height); /* * lvgl extension definition for: - * bool lv_font_has_static_bitmap(const lv_font_t *font) + * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) */ -static mp_obj_t mp_lv_font_has_static_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); - return convert_to_bool(_res); + lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); + lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap, lv_font_has_static_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); + +/* Reusing lv_font_has_static_bitmap_internal for lv_font_has_static_bitmap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_bottom_trim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim); /* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_fmt_txt */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_fmt_txt_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_fmt_txt); +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_internal_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_internal); + +/* Reusing lv_font_get_glyph_width for lv_font_get_glyph_width_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_internal_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width_internal); + static const mp_rom_map_elem_t mp_lv_font_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_line_height_internal), MP_ROM_PTR(&mp_lv_font_get_line_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim_internal), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim_internal), MP_ROM_PTR(&mp_lv_font_get_top_trim_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_glyph_width), MP_ROM_PTR(&mp_lv_font_get_glyph_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_line_height), MP_ROM_PTR(&mp_lv_font_get_line_height_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_kerning), MP_ROM_PTR(&mp_lv_font_set_kerning_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_static_bitmap), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim), MP_ROM_PTR(&mp_lv_font_get_top_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_width_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_width_internal_mpobj) }, }; @@ -33283,2235 +36258,2120 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_mpobj, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bitmap_fmt_txt_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_bitmap_fmt_txt); -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); - - /* * lvgl extension definition for: - * int32_t lv_cache_entry_get_ref(lv_cache_entry_t *entry) + * int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t *lhs, const lv_font_glyph_dsc_t *rhs) */ -static mp_obj_t mp_lv_cache_entry_get_ref(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_glyph_dsc_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + const lv_font_glyph_dsc_t *lhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + const lv_font_glyph_dsc_t *rhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_glyph_dsc_t *, const lv_font_glyph_dsc_t *))lv_func_ptr)(lhs, rhs); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_ref_mpobj, 1, mp_lv_cache_entry_get_ref, lv_cache_entry_get_ref); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_dsc_compare_mpobj, 2, mp_lv_font_glyph_dsc_compare, lv_font_glyph_dsc_compare); +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap_internal */ -/* - * lvgl extension definition for: - * uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_get_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_node_size_mpobj, 1, mp_lv_cache_entry_get_node_size, lv_cache_entry_get_node_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_internal_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap_internal); +/* Reusing lv_font_get_glyph_static_bitmap for lv_font_get_glyph_static_bitmap_internal */ -/* - * lvgl extension definition for: - * bool lv_cache_entry_is_invalid(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_is_invalid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - bool _res = ((bool (*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_is_invalid_mpobj, 1, mp_lv_cache_entry_is_invalid, lv_cache_entry_is_invalid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_internal_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap_internal); +/* Reusing lv_font_glyph_release_draw_data for lv_font_glyph_release_draw_data_internal */ -/* - * lvgl extension definition for: - * void *lv_cache_entry_get_data(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_get_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - void * _res = ((void *(*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_get_data); - - -/* - * lvgl extension definition for: - * const lv_cache_t *lv_cache_entry_get_cache(const lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_get_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_cache_entry_t *entry = (const lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(mp_args[0]); - const lv_cache_t * _res = ((const lv_cache_t *(*)(const lv_cache_entry_t *))lv_func_ptr)(entry); - return mp_read_ptr_lv_cache_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_cache_mpobj, 1, mp_lv_cache_entry_get_cache, lv_cache_entry_get_cache); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_internal_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data_internal); -/* - * lvgl extension definition for: - * void lv_cache_entry_init(lv_cache_entry_t *entry, const lv_cache_t *cache, const uint32_t node_size) - */ - -static mp_obj_t mp_lv_cache_entry_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_cache_entry_t *, const lv_cache_t *, const uint32_t))lv_func_ptr)(entry, cache, node_size); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_init_mpobj, 3, mp_lv_cache_entry_init, lv_cache_entry_init); +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_compare), MP_ROM_PTR(&mp_lv_font_glyph_dsc_compare_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data_internal), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_internal_mpobj) }, +}; -/* - * lvgl extension definition for: - * void lv_cache_entry_delete(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - ((void (*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_delete_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_delete); - -/* Reusing lv_cache_entry_delete for lv_cache_entry_reset_ref */ +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_reset_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_reset_ref); +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, -/* Reusing lv_cache_entry_delete for lv_cache_entry_inc_ref */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_inc_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_inc_ref); - -/* Reusing lv_cache_entry_delete for lv_cache_entry_dec_ref */ +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); + +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_dec_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_dec_ref); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ -/* - * lvgl extension definition for: - * void lv_cache_entry_set_node_size(lv_cache_entry_t *entry, uint32_t node_size) - */ - -static mp_obj_t mp_lv_cache_entry_set_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint32_t node_size = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_cache_entry_t *, uint32_t))lv_func_ptr)(entry, node_size); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_node_size_mpobj, 2, mp_lv_cache_entry_set_node_size, lv_cache_entry_set_node_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); /* * lvgl extension definition for: - * void lv_cache_entry_set_cache(lv_cache_entry_t *entry, const lv_cache_t *cache) + * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) */ -static mp_obj_t mp_lv_cache_entry_set_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); - ((void (*)(lv_cache_entry_t *, const lv_cache_t *))lv_func_ptr)(entry, cache); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_cache_mpobj, 2, mp_lv_cache_entry_set_cache, lv_cache_entry_set_cache); - -/* Reusing lv_cache_entry_get_data for lv_cache_entry_acquire_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_acquire_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_acquire_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); /* * lvgl extension definition for: - * void lv_cache_entry_release_data(lv_cache_entry_t *entry, void *user_data) + * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_cache_entry_release_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - ((void (*)(lv_cache_entry_t *, void *))lv_func_ptr)(entry, user_data); - return mp_const_none; + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_release_data_mpobj, 2, mp_lv_cache_entry_release_data, lv_cache_entry_release_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); /* * lvgl extension definition for: - * void lv_cache_entry_set_flag(lv_cache_entry_t *entry, uint8_t flags) + * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) */ -static mp_obj_t mp_lv_cache_entry_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); - return mp_const_none; + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + void *data = mp_to_ptr(mp_args[5]); + uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_set_flag); - -/* Reusing lv_cache_entry_set_flag for lv_cache_entry_remove_flag */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_remove_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_remove_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); /* * lvgl extension definition for: - * bool lv_cache_entry_has_flag(lv_cache_entry_t *entry, uint8_t flags) + * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) */ -static mp_obj_t mp_lv_cache_entry_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); - return convert_to_bool(_res); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_has_flag_mpobj, 2, mp_lv_cache_entry_has_flag, lv_cache_entry_has_flag); - - -static const mp_rom_map_elem_t mp_lv_cache_entry_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_entry_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_ref), MP_ROM_PTR(&mp_lv_cache_entry_get_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_node_size), MP_ROM_PTR(&mp_lv_cache_entry_get_node_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_invalid), MP_ROM_PTR(&mp_lv_cache_entry_is_invalid_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_data), MP_ROM_PTR(&mp_lv_cache_entry_get_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cache), MP_ROM_PTR(&mp_lv_cache_entry_get_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_cache_entry_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_cache_entry_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset_ref), MP_ROM_PTR(&mp_lv_cache_entry_reset_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_inc_ref), MP_ROM_PTR(&mp_lv_cache_entry_inc_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dec_ref), MP_ROM_PTR(&mp_lv_cache_entry_dec_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_node_size), MP_ROM_PTR(&mp_lv_cache_entry_set_node_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cache), MP_ROM_PTR(&mp_lv_cache_entry_set_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_acquire_data), MP_ROM_PTR(&mp_lv_cache_entry_acquire_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_data), MP_ROM_PTR(&mp_lv_cache_entry_release_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_cache_entry_set_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_flag), MP_ROM_PTR(&mp_lv_cache_entry_remove_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_cache_entry_has_flag_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_cache_entry_t_locals_dict, mp_lv_cache_entry_t_locals_dict_table); - -/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_destroy */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_destroy_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_destroy); - -/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire); - -/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire_or_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_or_create_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire_or_create); - -/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_add */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_add_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_add); - -/* Reusing funcptr_lv_cache_remove_cb_t for lv_cache_release */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_release_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, lv_cache_release); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); /* * lvgl extension definition for: - * void lv_cache_reserve(lv_cache_t *cache, uint32_t reserved_size, void *user_data) + * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_cache_reserve(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - uint32_t reserved_size = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, uint32_t, void *))lv_func_ptr)(cache, reserved_size, user_data); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(mp_args[0]); + lv_draw_buf_t *buf = (lv_draw_buf_t *)self->data; + if (buf != NULL) { + ((void (*)(lv_draw_buf_t *))lv_func_ptr)(buf); + self->data = NULL; + } return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_reserve_mpobj, 3, mp_lv_cache_reserve, lv_cache_reserve); - -/* Reusing funcptr_lv_cache_drop_cb_t for lv_cache_drop */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, lv_cache_drop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); -/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_drop_all */ +/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_all_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_drop_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); /* * lvgl extension definition for: - * bool lv_cache_evict_one(lv_cache_t *cache, void *user_data) + * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_cache_evict_one(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - bool _res = ((bool (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); - return convert_to_bool(_res); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_evict_one_mpobj, 2, mp_lv_cache_evict_one, lv_cache_evict_one); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); /* * lvgl extension definition for: - * void lv_cache_set_max_size(lv_cache_t *cache, size_t max_size, void *user_data) + * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_cache_set_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_is_position_valid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - size_t max_size = (size_t)mp_obj_get_int(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, size_t, void *))lv_func_ptr)(cache, max_size, user_data); - return mp_const_none; + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_max_size_mpobj, 3, mp_lv_cache_set_max_size, lv_cache_set_max_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_is_position_valid_mpobj, 3, mp_lv_draw_buf_is_position_valid, lv_draw_buf_is_position_valid); /* * lvgl extension definition for: - * size_t lv_cache_get_max_size(lv_cache_t *cache, void *user_data) + * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) */ -static mp_obj_t mp_lv_cache_get_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - size_t _res = ((size_t (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); - return mp_obj_new_int_from_uint(_res); + lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_max_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_max_size); - -/* Reusing lv_cache_get_max_size for lv_cache_get_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_size); - -/* Reusing lv_cache_get_max_size for lv_cache_get_free_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_free_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_free_size); - -/* Reusing funcptr_lv_cache_init_cb_t for lv_cache_is_enabled */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_is_enabled_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, lv_cache_is_enabled); - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) - * lv_cache_compare_cb_t compare_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); /* * lvgl extension definition for: - * void lv_cache_set_compare_cb(lv_cache_t *cache, lv_cache_compare_cb_t compare_cb, void *user_data) + * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_cache_set_compare_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - lv_cache_compare_cb_t compare_cb = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_compare_cb_t, void *))lv_func_ptr)(cache, compare_cb, user_data); - return mp_const_none; + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_compare_cb_mpobj, 3, mp_lv_cache_set_compare_cb, lv_cache_set_compare_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); /* - * Callback function lv_cache_set_create_cb_alloc_cb - * bool lv_cache_create_cb_t(void *node, void *user_data) + * lvgl extension definition for: + * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -GENMPY_UNUSED static bool lv_cache_set_create_cb_alloc_cb_callback(void *arg0, void *arg1) +static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_create_cb_alloc_cb)), 2, mp_args); - return mp_obj_is_true(callback_result); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + return convert_to_bool(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); + /* * lvgl extension definition for: - * void lv_cache_set_create_cb(lv_cache_t *cache, lv_cache_create_cb_t alloc_cb, void *user_data) + * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static mp_obj_t mp_lv_cache_set_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *alloc_cb = mp_lv_callback(mp_args[1], &lv_cache_set_create_cb_alloc_cb_callback, MP_QSTR_lv_cache_set_create_cb_alloc_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_create_cb_t, void *))lv_func_ptr)(cache, alloc_cb, user_data); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_create_cb_mpobj, 3, mp_lv_cache_set_create_cb, lv_cache_set_create_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); + +/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); /* - * Callback function lv_cache_set_free_cb_free_cb - * void lv_cache_free_cb_t(void *node, void *user_data) + * lvgl extension definition for: + * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) */ -GENMPY_UNUSED static void lv_cache_set_free_cb_free_cb_callback(void *arg0, void *arg1) +static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_free_cb_free_cb)), 2, mp_args); - return; + lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); + /* * lvgl extension definition for: - * void lv_cache_set_free_cb(lv_cache_t *cache, lv_cache_free_cb_t free_cb, void *user_data) + * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) */ -static mp_obj_t mp_lv_cache_set_free_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *free_cb = mp_lv_callback(mp_args[1], &lv_cache_set_free_cb_free_cb_callback, MP_QSTR_lv_cache_set_free_cb_free_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_free_cb_t, void *))lv_func_ptr)(cache, free_cb, user_data); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_free_cb_mpobj, 3, mp_lv_cache_set_free_cb, lv_cache_set_free_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); /* * lvgl extension definition for: - * void lv_cache_set_name(lv_cache_t *cache, const char *name) + * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) */ -static mp_obj_t mp_lv_cache_set_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - const char *name = (const char *)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_cache_t *, const char *))lv_func_ptr)(cache, name); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_name_mpobj, 2, mp_lv_cache_set_name, lv_cache_set_name); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); + +/* Reusing funcptr_lv_draw_buf_clear_cb_t for lv_draw_buf_clear_ex */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_ex_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, lv_draw_buf_clear_ex); + +/* Reusing lv_draw_buf_premultiply for lv_draw_buf_convert_premultiply */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_convert_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_convert_premultiply); /* * lvgl extension definition for: - * const char *lv_cache_get_name(lv_cache_t *cache) + * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) */ -static mp_obj_t mp_lv_cache_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - const char * _res = ((const char *(*)(lv_cache_t *))lv_func_ptr)(cache); - return convert_to_str((void*)_res); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const char *path = (const char *)(char*)convert_from_str(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_name_mpobj, 1, mp_lv_cache_get_name, lv_cache_get_name); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); -/* Reusing funcptr_lv_cache_iter_create_cb for lv_cache_iter_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_iter_create_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, lv_cache_iter_create); +static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_position_valid), MP_ROM_PTR(&mp_lv_draw_buf_is_position_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_ex), MP_ROM_PTR(&mp_lv_draw_buf_clear_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_convert_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_convert_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, +}; -static const mp_rom_map_elem_t mp_lv_cache_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_t))) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_cache_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_acquire), MP_ROM_PTR(&mp_lv_cache_acquire_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_acquire_or_create), MP_ROM_PTR(&mp_lv_cache_acquire_or_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_cache_add_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release), MP_ROM_PTR(&mp_lv_cache_release_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reserve), MP_ROM_PTR(&mp_lv_cache_reserve_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_cache_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop_all), MP_ROM_PTR(&mp_lv_cache_drop_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_evict_one), MP_ROM_PTR(&mp_lv_cache_evict_one_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_size), MP_ROM_PTR(&mp_lv_cache_set_max_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_size), MP_ROM_PTR(&mp_lv_cache_get_max_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_cache_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_free_size), MP_ROM_PTR(&mp_lv_cache_get_free_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_enabled), MP_ROM_PTR(&mp_lv_cache_is_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_compare_cb), MP_ROM_PTR(&mp_lv_cache_set_compare_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_create_cb), MP_ROM_PTR(&mp_lv_cache_set_create_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_free_cb), MP_ROM_PTR(&mp_lv_cache_set_free_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_name), MP_ROM_PTR(&mp_lv_cache_set_name_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_name), MP_ROM_PTR(&mp_lv_cache_get_name_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_cache_iter_create_mpobj) }, +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_cache_t_locals_dict, mp_lv_cache_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); /* * lvgl extension definition for: - * lv_cache_t *lv_cache_create(const lv_cache_class_t *cache_class, size_t node_size, size_t max_size, lv_cache_ops_t ops) + * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) */ -static mp_obj_t mp_lv_cache_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_cache_class_t *cache_class = (const lv_cache_class_t *)mp_write_ptr_lv_cache_class_t(mp_args[0]); - size_t node_size = (size_t)mp_obj_get_int(mp_args[1]); - size_t max_size = (size_t)mp_obj_get_int(mp_args[2]); - lv_cache_ops_t ops = mp_write_lv_cache_ops_t(mp_args[3]); - lv_cache_t * _res = ((lv_cache_t *(*)(const lv_cache_class_t *, size_t, size_t, lv_cache_ops_t))lv_func_ptr)(cache_class, node_size, max_size, ops); - return mp_read_ptr_lv_cache_t((void*)_res); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_create_mpobj, 4, mp_lv_cache_create, lv_cache_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); -static const mp_rom_map_elem_t mp_lv_cache_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_class_t))) }, - { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_cache_create_mpobj) }, +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_malloc_cb_t buf_malloc_cb + */ -}; -static MP_DEFINE_CONST_DICT(mp_lv_cache_class_t_locals_dict, mp_lv_cache_class_t_locals_dict_table); - +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_free_cb_t buf_free_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_copy_cb_t buf_copy_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_align_cb_t align_pointer_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ + /* * lvgl extension definition for: - * void *lv_iter_get_context(const lv_iter_t *iter) + * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) */ -static mp_obj_t mp_lv_iter_get_context(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_iter_t *iter = (const lv_iter_t *)mp_write_ptr_lv_iter_t(mp_args[0]); - void * _res = ((void *(*)(const lv_iter_t *))lv_func_ptr)(iter); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); + lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); + lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); + lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); + lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); + lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); + lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); + ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); + + +/* + * lvgl extension definition for: + * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + */ + +static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + void *buf = mp_to_ptr(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_get_context_mpobj, 1, mp_lv_iter_get_context, lv_iter_get_context); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); /* * lvgl extension definition for: - * void lv_iter_destroy(lv_iter_t *iter) + * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_iter_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - ((void (*)(lv_iter_t *))lv_func_ptr)(iter); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_destroy_mpobj, 1, mp_lv_iter_destroy, lv_iter_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); /* * lvgl extension definition for: - * lv_result_t lv_iter_next(lv_iter_t *iter, void *elem) + * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static mp_obj_t mp_lv_iter_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - void *elem = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_func_ptr)(iter, elem); - return mp_obj_new_int(_res); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_next_mpobj, 2, mp_lv_iter_next, lv_iter_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); /* * lvgl extension definition for: - * void lv_iter_make_peekable(lv_iter_t *iter, uint32_t capacity) + * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_iter_make_peekable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_iter_t *, uint32_t))lv_func_ptr)(iter, capacity); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_make_peekable_mpobj, 2, mp_lv_iter_make_peekable, lv_iter_make_peekable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); -/* Reusing lv_iter_next for lv_iter_peek */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_mpobj, 2, mp_lv_iter_next, lv_iter_peek); +static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, + { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_result_t lv_iter_peek_advance(lv_iter_t *iter) + * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) */ -static mp_obj_t mp_lv_iter_peek_advance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_iter_t *))lv_func_ptr)(iter); - return mp_obj_new_int(_res); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_advance_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_advance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); -/* Reusing lv_iter_peek_advance for lv_iter_peek_reset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_reset_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_reset); +/* + * lvgl extension definition for: + * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + */ + +static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); /* - * Function NOT generated: - * Callback function 'lv_iter_inspect_cb inspect_cb' must receive a struct pointer with user_data member as its first argument! - * lv_iter_inspect_cb inspect_cb + * lvgl extension definition for: + * int32_t lv_area_get_width(const lv_area_t *area_p) */ - -#define funcptr_lv_iter_inspect_cb NULL -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_iter_inspect_cb */ +static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_inspect_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_iter_inspect_cb); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_inspect_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_inspect_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_area_get_width for lv_area_get_height */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); + /* * lvgl extension definition for: - * void lv_iter_inspect(lv_iter_t *iter, lv_iter_inspect_cb inspect_cb) + * void lv_area_set_width(lv_area_t *area_p, int32_t w) */ -static mp_obj_t mp_lv_iter_inspect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - lv_iter_inspect_cb inspect_cb = mp_to_ptr(mp_args[1]); - ((void (*)(lv_iter_t *, lv_iter_inspect_cb))lv_func_ptr)(iter, inspect_cb); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_inspect_mpobj, 2, mp_lv_iter_inspect, lv_iter_inspect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); +/* Reusing lv_area_set_width for lv_area_set_height */ -static const mp_rom_map_elem_t mp_lv_iter_t_locals_dict_table[] = { - - { MP_ROM_QSTR(MP_QSTR_get_context), MP_ROM_PTR(&mp_lv_iter_get_context_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_iter_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_next), MP_ROM_PTR(&mp_lv_iter_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_make_peekable), MP_ROM_PTR(&mp_lv_iter_make_peekable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_iter_peek_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek_advance), MP_ROM_PTR(&mp_lv_iter_peek_advance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek_reset), MP_ROM_PTR(&mp_lv_iter_peek_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_inspect), MP_ROM_PTR(&mp_lv_iter_inspect_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); -}; -static MP_DEFINE_CONST_DICT(mp_lv_iter_t_locals_dict, mp_lv_iter_t_locals_dict_table); - +/* + * lvgl extension definition for: + * uint32_t lv_area_get_size(const lv_area_t *area_p) + */ -static const mp_rom_map_elem_t mp_lv_cache_ops_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_ops_t))) }, - -}; +static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_DICT(mp_lv_cache_ops_t_locals_dict, mp_lv_cache_ops_t_locals_dict_table); - + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); + /* * lvgl extension definition for: - * inline static bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) */ -static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); - return convert_to_bool(_res); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); + +/* Reusing lv_area_increase for lv_area_move */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); /* * lvgl extension definition for: - * inline static void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) */ -static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); + lv_align_t align = (int)mp_obj_get_int(mp_args[2]); + int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); -/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ +/* Reusing lv_area_increase for lv_area_set_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); - -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ +/* + * lvgl extension definition for: + * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); +static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); /* * lvgl extension definition for: - * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) + * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); - return mp_const_none; + lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) + * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) + * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) */ -static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - void *data = mp_to_ptr(mp_args[5]); - uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); - return mp_obj_new_int(_res); + const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) + * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); /* * lvgl extension definition for: - * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) + * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) */ -static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(mp_args[0]); - lv_draw_buf_t *buf = (lv_draw_buf_t *)self->data; - if (buf != NULL) { - ((void (*)(lv_draw_buf_t *))lv_func_ptr)(buf); - self->data = NULL; - } - return mp_const_none; + const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); -/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ +/* Reusing lv_area_is_in for lv_area_is_out */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); + +/* Reusing lv_area_is_on for lv_area_is_equal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); + + +static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); + /* * lvgl extension definition for: - * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * void lv_layer_init(lv_layer_t *layer) */ -static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); - return ptr_to_mp((void*)_res); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + ((void (*)(lv_layer_t *))lv_func_ptr)(layer); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); + +/* Reusing lv_layer_init for lv_layer_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); + + +static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) + * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) */ -static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); - return mp_obj_new_int(_res); + lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) + * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) + * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); - return mp_obj_new_int(_res); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); /* * lvgl extension definition for: - * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) + * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) */ -static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); /* * lvgl extension definition for: - * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) + * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); - ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) + * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const char *path = (const char *)(char*)convert_from_str(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); - - -static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, - { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) + * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); /* - * Function NOT generated: - * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_free_cb_t buf_free_cb + * lvgl extension definition for: + * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) */ - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - +static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); +} -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_align_cb_t align_pointer_cb - */ - + -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); /* * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t flush_cache_cb + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb */ +#define funcptr_lv_draw_glyph_cb_t NULL -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ - /* * lvgl extension definition for: - * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) + * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) */ -static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); - lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); - lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); - lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); - lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); - lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); - lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); - ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); + const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - void *buf = mp_to_ptr(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); - return ptr_to_mp((void*)_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); + + +/* + * Function NOT generated: + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb + */ /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) + * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); - return mp_obj_new_int_from_uint(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) + * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); -static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, - { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, +/* + * Function NOT generated: + * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! + * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + */ -}; +#define funcptr_draw_line_cb NULL -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); - /* * lvgl extension definition for: - * inline static void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) */ -static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) */ -static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); /* * lvgl extension definition for: - * int32_t lv_area_get_width(const lv_area_t *area_p) + * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); - -/* Reusing lv_area_get_width for lv_area_get_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); /* * lvgl extension definition for: - * void lv_area_set_width(lv_area_t *area_p, int32_t w) + * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); - -/* Reusing lv_area_set_width for lv_area_set_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); /* * lvgl extension definition for: - * uint32_t lv_area_get_size(const lv_area_t *area_p) + * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int_from_uint(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); /* * lvgl extension definition for: - * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) + * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); - -/* Reusing lv_area_increase for lv_area_move */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); /* * lvgl extension definition for: - * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) + * void lv_draw_cleanup_task(lv_draw_task_t *t) */ -static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_cleanup_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); - lv_align_t align = (int)mp_obj_get_int(mp_args[2]); - int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + ((void (*)(lv_draw_task_t *))lv_func_ptr)(t); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_cleanup_task_mpobj, 1, mp_lv_draw_cleanup_task, lv_draw_cleanup_task); -/* Reusing lv_area_increase for lv_area_set_pos */ +/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); /* * lvgl extension definition for: - * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); /* * lvgl extension definition for: - * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); - return mp_obj_new_int(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); /* * lvgl extension definition for: - * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); /* * lvgl extension definition for: - * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) + * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); /* * lvgl extension definition for: - * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); /* * lvgl extension definition for: - * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) + * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); - -/* Reusing lv_area_is_in for lv_area_is_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); - -/* Reusing lv_area_is_on for lv_area_is_equal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); - - -static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); - - -/* - * Callback function lv_color_filter_dsc_t_cb - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) - */ - -GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) -{ - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - mp_args[1] = mp_read_lv_color_t(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); - return mp_write_lv_color_t(callback_result); -} - /* * lvgl extension definition for: - * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) + * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); - void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); +/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ -static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ +/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); /* * lvgl extension definition for: - * void lv_anim_set_var(lv_anim_t *a, void *var) + * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) */ -static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *var = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); - - -/* - * Function NOT generated: - * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! - * lv_anim_exec_xcb_t exec_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); /* * lvgl extension definition for: - * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) + * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); /* * lvgl extension definition for: - * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) + * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) */ -static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); - -/* Reusing lv_anim_set_duration for lv_anim_set_delay */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); +/* + * Function NOT generated: + * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_image_core_cb draw_core_cb + */ -/* Reusing lv_anim_set_duration for lv_anim_pause_for */ +#define funcptr_lv_draw_image_core_cb NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); - /* * lvgl extension definition for: - * bool lv_anim_is_paused(lv_anim_t *a) + * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) */ -static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); + lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); + const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); + const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) + * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); + +/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); +/* Reusing lv_draw_unit_draw_letter for lv_draw_unit_draw_letter_internal */ -/* - * Callback function lv_anim_t_exec_cb - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_internal_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter_internal); + -GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_args[1] = mp_obj_new_int(arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); - return; -} +static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cleanup_task), MP_ROM_PTR(&mp_lv_draw_cleanup_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter_internal), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_internal_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); + +static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void *lv_event_get_target(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); +/* Reusing lv_event_get_target for lv_event_get_current_target */ -/* - * Callback function lv_anim_t_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ - -GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); -} - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); + /* * lvgl extension definition for: - * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) + * lv_event_code_t lv_event_get_code(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); +/* Reusing lv_event_get_target for lv_event_get_param */ -/* - * Callback function lv_anim_t_start_cb - * void lv_anim_start_cb_t(lv_anim_t *) - */ - -GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); - return; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); + +/* Reusing lv_event_get_target for lv_event_get_user_data */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); + +/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ -/* - * lvgl extension definition for: - * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); + +/* Reusing funcptr_event_cb for lv_event_stop_trickling */ -static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); + +/* Reusing funcptr_event_cb for lv_event_stop_processing */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); + +/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); /* - * Callback function lv_anim_t_get_value_cb - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + * lvgl extension definition for: + * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) */ -GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); +static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); + /* * lvgl extension definition for: - * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) + * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); + +/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); /* - * Callback function lv_anim_t_completed_cb - * void lv_anim_completed_cb_t(lv_anim_t *) + * lvgl extension definition for: + * lv_indev_t *lv_event_get_indev(lv_event_t *e) */ -GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) +static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_indev_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); + /* * lvgl extension definition for: - * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) + * lv_layer_t *lv_event_get_layer(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_layer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); /* - * Callback function lv_anim_t_deleted_cb - * void lv_anim_deleted_cb_t(lv_anim_t *) + * lvgl extension definition for: + * const lv_area_t *lv_event_get_old_size(lv_event_t *e) */ -GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); + /* * lvgl extension definition for: - * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) + * uint32_t lv_event_get_key(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); - -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); - -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ +/* + * lvgl extension definition for: + * int32_t lv_event_get_rotary_diff(lv_event_t *e) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); - -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ +static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); - -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); /* * lvgl extension definition for: - * void lv_anim_set_early_apply(lv_anim_t *a, bool en) + * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); - -/* Reusing lv_anim_set_var for lv_anim_set_user_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); /* * lvgl extension definition for: - * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) + * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) */ -static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); - int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); - int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); - int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); /* * lvgl extension definition for: - * lv_anim_t *lv_anim_start(const lv_anim_t *a) + * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_point_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); /* - * lvgl extension definition for: - * uint32_t lv_anim_get_delay(const lv_anim_t *a) + * Struct lv_hit_test_info_t */ -static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_obj_new_int_from_uint(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); + return (lv_hit_test_info_t*)self->data; } - +#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); - -/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); - -/* Reusing lv_anim_get_delay for lv_anim_get_time */ +#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) +#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); - -/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ +static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; + case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; + case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_hit_test_info_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_hit_test_info_t"); +} + +static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_hit_test_info_t_type, + MP_QSTR_lv_hit_test_info_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_hit_test_info_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_hit_test_info_t_attr, + locals_dict, &mp_lv_hit_test_info_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) +{ + return &mp_lv_hit_test_info_t_type; +} /* * lvgl extension definition for: - * void *lv_anim_get_user_data(const lv_anim_t *a) + * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); - return ptr_to_mp((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_hit_test_info_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); + +/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); /* * lvgl extension definition for: - * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) */ -static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return convert_to_bool(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); /* * lvgl extension definition for: - * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); /* * lvgl extension definition for: - * int32_t lv_anim_path_linear(const lv_anim_t *a) + * lv_state_t lv_event_get_prev_state(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); - -/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); -/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); - -/* Reusing lv_anim_path_linear for lv_anim_path_step */ +/* + * lvgl extension definition for: + * float lv_event_get_pinch_scale(lv_event_t *gesture_event) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); - -/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ +static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_float_from_f(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); - + -static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); - +/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ -static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); - +/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ -static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); - /* - * Array convertors for lv_style_prop_t [] + * lvgl extension definition for: + * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) */ -GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (lv_style_prop_t *)lv_arr; + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_int(_res); } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) -{ - return mp_array_from_u8ptr((void*)arr); -} + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); + /* - * Callback function lv_style_transition_dsc_init_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) + * lvgl extension definition for: + * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) */ -GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); + lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); + /* * lvgl extension definition for: - * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) + * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); - void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); - ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); - return mp_const_none; + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); +/* Reusing funcptr_event_cb for lv_event_push */ -static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); + +/* Reusing funcptr_event_cb for lv_event_pop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); + + +static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); /* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete */ @@ -35836,6 +38696,23 @@ static mp_obj_t mp_lv_display_set_flush_cb(size_t mp_n_args, const mp_obj_t *mp_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_cb_mpobj, 2, mp_lv_display_set_flush_cb, lv_display_set_flush_cb); +/* + * lvgl extension definition for: + * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) + */ + +static mp_obj_t mp_lv_display_get_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_flush_cb_t _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_lv_funcptr_lv_display_flush_cb_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_flush_cb_mpobj, 1, mp_lv_display_get_flush_cb, lv_display_get_flush_cb); + + /* * Callback function lv_display_t_wait_cb * void lv_display_flush_wait_cb_t(lv_display_t *disp) @@ -35869,6 +38746,58 @@ static mp_obj_t mp_lv_display_set_flush_wait_cb(size_t mp_n_args, const mp_obj_t static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_wait_cb_mpobj, 2, mp_lv_display_set_flush_wait_cb, lv_display_set_flush_wait_cb); +/* + * Callback function lv_display_t_sync_cb + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) + */ + +GENMPY_UNUSED static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) + */ + +static mp_obj_t mp_lv_display_set_sync_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *sync_cb = mp_lv_callback(mp_args[1], &lv_display_t_sync_cb_callback, MP_QSTR_lv_display_t_sync_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_func_ptr)(disp, sync_cb); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_cb_mpobj, 2, mp_lv_display_set_sync_cb, lv_display_set_sync_cb); + + +/* + * lvgl extension definition for: + * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) + */ + +static mp_obj_t mp_lv_display_set_sync_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_func_ptr)(disp, wait_cb); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_wait_cb_mpobj, 2, mp_lv_display_set_sync_wait_cb, lv_display_set_sync_wait_cb); + + /* * lvgl extension definition for: * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) @@ -35954,6 +38883,14 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_ready_mpobj, 1, mp_fun static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_flush_is_last); +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_sync_ready */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_sync_ready); + +/* Reusing lv_display_get_matrix_rotation for lv_display_sync_is_last */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_sync_is_last); + /* Reusing lv_display_get_matrix_rotation for lv_display_is_double_buffered */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_double_buffered_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_double_buffered); @@ -36030,7 +38967,7 @@ GENMPY_UNUSED static void lv_display_add_event_cb_event_cb_callback(lv_event_t * /* * lvgl extension definition for: - * void lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -36039,8 +38976,8 @@ static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_ void *event_cb = mp_lv_callback(mp_args[1], &lv_display_add_event_cb_event_cb_callback, MP_QSTR_lv_display_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - ((void (*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); - return mp_const_none; + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } @@ -36072,10 +39009,10 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_dsc_mpobj, 2, mp_l /* * lvgl extension definition for: - * bool lv_display_delete_event(lv_display_t *disp, uint32_t index) + * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) */ -static mp_obj_t mp_lv_display_delete_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_remove_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); @@ -36085,7 +39022,7 @@ static mp_obj_t mp_lv_display_delete_event(size_t mp_n_args, const mp_obj_t *mp_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_event_mpobj, 2, mp_lv_display_delete_event, lv_display_delete_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_mpobj, 2, mp_lv_display_remove_event, lv_display_remove_event); /* @@ -36377,6 +39314,10 @@ static mp_obj_t mp_lv_display_rotate_point(size_t mp_n_args, const mp_obj_t *mp_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point); +/* Reusing lv_display_rotate_point for lv_display_rotate_point_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_ccw_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point_ccw); + /* Reusing lv_display_get_tile_cnt for lv_display_get_draw_buf_size */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_draw_buf_size_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_draw_buf_size); @@ -36437,6 +39378,24 @@ static mp_obj_t mp_lv_draw_dispatch_layer(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_dispatch_layer_mpobj, 2, mp_lv_draw_dispatch_layer, lv_draw_dispatch_layer); +/* + * lvgl extension definition for: + * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) + */ + +static mp_obj_t mp_lv_display_set_draw_buf_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_func_ptr)(disp, handlers); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buf_handlers_mpobj, 2, mp_lv_display_set_draw_buf_handlers, lv_display_set_draw_buf_handlers); + + static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_display_t))) }, { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_display_delete_mpobj) }, @@ -36465,7 +39424,10 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_3rd_draw_buffer), MP_ROM_PTR(&mp_lv_display_set_3rd_draw_buffer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_render_mode), MP_ROM_PTR(&mp_lv_display_set_render_mode_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flush_cb), MP_ROM_PTR(&mp_lv_display_set_flush_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_flush_cb), MP_ROM_PTR(&mp_lv_display_get_flush_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flush_wait_cb), MP_ROM_PTR(&mp_lv_display_set_flush_wait_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_cb), MP_ROM_PTR(&mp_lv_display_set_sync_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_wait_cb), MP_ROM_PTR(&mp_lv_display_set_sync_wait_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_display_set_color_format_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_color_format), MP_ROM_PTR(&mp_lv_display_get_color_format_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_tile_cnt), MP_ROM_PTR(&mp_lv_display_set_tile_cnt_mpobj) }, @@ -36474,6 +39436,8 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_antialiasing), MP_ROM_PTR(&mp_lv_display_get_antialiasing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_flush_ready), MP_ROM_PTR(&mp_lv_display_flush_ready_mpobj) }, { MP_ROM_QSTR(MP_QSTR_flush_is_last), MP_ROM_PTR(&mp_lv_display_flush_is_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_ready), MP_ROM_PTR(&mp_lv_display_sync_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_is_last), MP_ROM_PTR(&mp_lv_display_sync_is_last_mpobj) }, { MP_ROM_QSTR(MP_QSTR_is_double_buffered), MP_ROM_PTR(&mp_lv_display_is_double_buffered_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_render_mode), MP_ROM_PTR(&mp_lv_display_get_render_mode_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_screen_active), MP_ROM_PTR(&mp_lv_display_get_screen_active_mpobj) }, @@ -36485,7 +39449,7 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_add_event_cb), MP_ROM_PTR(&mp_lv_display_add_event_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_event_count), MP_ROM_PTR(&mp_lv_display_get_event_count_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_event_dsc), MP_ROM_PTR(&mp_lv_display_get_event_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_event), MP_ROM_PTR(&mp_lv_display_delete_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_event), MP_ROM_PTR(&mp_lv_display_remove_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_display_remove_event_cb_with_user_data_mpobj) }, { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_display_send_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_theme), MP_ROM_PTR(&mp_lv_display_set_theme_mpobj) }, @@ -36506,10 +39470,12 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_buf_active), MP_ROM_PTR(&mp_lv_display_get_buf_active_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rotate_area), MP_ROM_PTR(&mp_lv_display_rotate_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rotate_point), MP_ROM_PTR(&mp_lv_display_rotate_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_point_ccw), MP_ROM_PTR(&mp_lv_display_rotate_point_ccw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_draw_buf_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_invalidated_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_invalidated_draw_buf_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_display_dpx_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_dispatch_layer), MP_ROM_PTR(&mp_lv_draw_dispatch_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_buf_handlers), MP_ROM_PTR(&mp_lv_display_set_draw_buf_handlers_mpobj) }, }; @@ -36543,1454 +39509,1092 @@ static mp_obj_t mp_lv_ll_ins_head(size_t mp_n_args, const mp_obj_t *mp_args, voi { lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); void * _res = ((void *(*)(lv_ll_t *))lv_func_ptr)(ll_p); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_head_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_head); - - -/* - * lvgl extension definition for: - * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) - */ - -static mp_obj_t mp_lv_ll_ins_prev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void *n_act = mp_to_ptr(mp_args[1]); - void * _res = ((void *(*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, n_act); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_prev_mpobj, 2, mp_lv_ll_ins_prev, lv_ll_ins_prev); - -/* Reusing lv_ll_ins_head for lv_ll_ins_tail */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_tail_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_tail); - - -/* - * lvgl extension definition for: - * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) - */ - -static mp_obj_t mp_lv_ll_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void *node_p = mp_to_ptr(mp_args[1]); - ((void (*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, node_p); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_remove_mpobj, 2, mp_lv_ll_remove, lv_ll_remove); - - -/* - * Function NOT generated: - * Callback function 'void (*cleanup)(void *)' must receive a struct pointer with user_data member as its first argument! - * void (*cleanup)(void *) - */ - - -/* - * lvgl extension definition for: - * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) - */ - -static mp_obj_t mp_lv_ll_clear_custom(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void (*cleanup)(void *) = mp_to_ptr(mp_args[1]); - ((void (*)(lv_ll_t *, void (*)(void *)))lv_func_ptr)(ll_p, cleanup); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_custom_mpobj, 2, mp_lv_ll_clear_custom, lv_ll_clear_custom); - - -/* - * lvgl extension definition for: - * void lv_ll_clear(lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - ((void (*)(lv_ll_t *))lv_func_ptr)(ll_p); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_mpobj, 1, mp_lv_ll_clear, lv_ll_clear); - - -/* - * lvgl extension definition for: - * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) - */ - -static mp_obj_t mp_lv_ll_chg_list(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_ori_p = mp_write_ptr_lv_ll_t(mp_args[0]); - lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(mp_args[1]); - void *node = mp_to_ptr(mp_args[2]); - bool head = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_func_ptr)(ll_ori_p, ll_new_p, node, head); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_chg_list_mpobj, 4, mp_lv_ll_chg_list, lv_ll_chg_list); - - -/* - * lvgl extension definition for: - * void *lv_ll_get_head(const lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_get_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); - void * _res = ((void *(*)(const lv_ll_t *))lv_func_ptr)(ll_p); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_head_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_head); - -/* Reusing lv_ll_get_head for lv_ll_get_tail */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_tail_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_tail); - - -/* - * lvgl extension definition for: - * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) - */ - -static mp_obj_t mp_lv_ll_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); - const void *n_act = (const void *)mp_to_ptr(mp_args[1]); - void * _res = ((void *(*)(const lv_ll_t *, const void *))lv_func_ptr)(ll_p, n_act); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_next_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_next); - -/* Reusing lv_ll_get_next for lv_ll_get_prev */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_prev_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_prev); - - -/* - * lvgl extension definition for: - * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_get_len(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_ll_t *))lv_func_ptr)(ll_p); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_len_mpobj, 1, mp_lv_ll_get_len, lv_ll_get_len); - - -/* - * lvgl extension definition for: - * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) - */ - -static mp_obj_t mp_lv_ll_move_before(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void *n_act = mp_to_ptr(mp_args[1]); - void *n_after = mp_to_ptr(mp_args[2]); - ((void (*)(lv_ll_t *, void *, void *))lv_func_ptr)(ll_p, n_act, n_after); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_move_before_mpobj, 3, mp_lv_ll_move_before, lv_ll_move_before); - - -/* - * lvgl extension definition for: - * bool lv_ll_is_empty(lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - bool _res = ((bool (*)(lv_ll_t *))lv_func_ptr)(ll_p); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_is_empty_mpobj, 1, mp_lv_ll_is_empty, lv_ll_is_empty); - - -static const mp_rom_map_elem_t mp_lv_ll_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_ll_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_ll_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_head), MP_ROM_PTR(&mp_lv_ll_ins_head_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_prev), MP_ROM_PTR(&mp_lv_ll_ins_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_tail), MP_ROM_PTR(&mp_lv_ll_ins_tail_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_ll_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_custom), MP_ROM_PTR(&mp_lv_ll_clear_custom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_ll_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_chg_list), MP_ROM_PTR(&mp_lv_ll_chg_list_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_head), MP_ROM_PTR(&mp_lv_ll_get_head_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tail), MP_ROM_PTR(&mp_lv_ll_get_tail_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_ll_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prev), MP_ROM_PTR(&mp_lv_ll_get_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_len), MP_ROM_PTR(&mp_lv_ll_get_len_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_before), MP_ROM_PTR(&mp_lv_ll_move_before_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_ll_is_empty_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_ll_t_locals_dict, mp_lv_ll_t_locals_dict_table); - - -/* - * lvgl extension definition for: - * void lv_layer_init(lv_layer_t *layer) - */ - -static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - ((void (*)(lv_layer_t *))lv_func_ptr)(layer); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); - -/* Reusing lv_layer_init for lv_layer_reset */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); - - -static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); - - -/* - * lvgl extension definition for: - * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) - */ - -static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); - - -/* - * lvgl extension definition for: - * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) - */ - -static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); - - -/* - * lvgl extension definition for: - * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) - */ - -static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); - - -/* - * lvgl extension definition for: - * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) - */ - -static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); - - -/* - * lvgl extension definition for: - * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) - */ - -static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); - - -/* - * lvgl extension definition for: - * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) - */ - -static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_head_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_head); /* * lvgl extension definition for: - * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) + * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) */ -static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_ins_prev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void *n_act = mp_to_ptr(mp_args[1]); + void * _res = ((void *(*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, n_act); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_prev_mpobj, 2, mp_lv_ll_ins_prev, lv_ll_ins_prev); + +/* Reusing lv_ll_ins_head for lv_ll_ins_tail */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_tail_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_tail); /* * lvgl extension definition for: - * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) + * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) */ -static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void *node_p = mp_to_ptr(mp_args[1]); + ((void (*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, node_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_remove_mpobj, 2, mp_lv_ll_remove, lv_ll_remove); /* * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb + * Callback function 'void (*cleanup)(void *)' must receive a struct pointer with user_data member as its first argument! + * void (*cleanup)(void *) */ -#define funcptr_lv_draw_glyph_cb_t NULL - /* * lvgl extension definition for: - * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) */ -static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_clear_custom(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); - const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void (*cleanup)(void *) = mp_to_ptr(mp_args[1]); + ((void (*)(lv_ll_t *, void (*)(void *)))lv_func_ptr)(ll_p, cleanup); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_custom_mpobj, 2, mp_lv_ll_clear_custom, lv_ll_clear_custom); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) + * void lv_ll_clear(lv_ll_t *ll_p) */ -static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + ((void (*)(lv_ll_t *))lv_func_ptr)(ll_p); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_mpobj, 1, mp_lv_ll_clear, lv_ll_clear); /* * lvgl extension definition for: - * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) + * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) */ -static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_chg_list(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); + lv_ll_t *ll_ori_p = mp_write_ptr_lv_ll_t(mp_args[0]); + lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(mp_args[1]); + void *node = mp_to_ptr(mp_args[2]); + bool head = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_func_ptr)(ll_ori_p, ll_new_p, node, head); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_chg_list_mpobj, 4, mp_lv_ll_chg_list, lv_ll_chg_list); /* * lvgl extension definition for: - * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) + * void *lv_ll_get_head(const lv_ll_t *ll_p) */ -static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_get_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); + const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); + void * _res = ((void *(*)(const lv_ll_t *))lv_func_ptr)(ll_p); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_head_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_head); + +/* Reusing lv_ll_get_head for lv_ll_get_tail */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_tail_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_tail); /* * lvgl extension definition for: - * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) + * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) */ -static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); + const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); + const void *n_act = (const void *)mp_to_ptr(mp_args[1]); + void * _res = ((void *(*)(const lv_ll_t *, const void *))lv_func_ptr)(ll_p, n_act); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_next_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_next); +/* Reusing lv_ll_get_next for lv_ll_get_prev */ -/* - * Function NOT generated: - * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! - * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_prev_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_prev); -#define funcptr_draw_line_cb NULL - /* * lvgl extension definition for: - * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) */ -static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_get_len(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_ll_t *))lv_func_ptr)(ll_p); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_len_mpobj, 1, mp_lv_ll_get_len, lv_ll_get_len); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) + * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) */ -static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_move_before(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void *n_act = mp_to_ptr(mp_args[1]); + void *n_after = mp_to_ptr(mp_args[2]); + ((void (*)(lv_ll_t *, void *, void *))lv_func_ptr)(ll_p, n_act, n_after); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_move_before_mpobj, 3, mp_lv_ll_move_before, lv_ll_move_before); /* * lvgl extension definition for: - * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) + * bool lv_ll_is_empty(lv_ll_t *ll_p) */ -static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + bool _res = ((bool (*)(lv_ll_t *))lv_func_ptr)(ll_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_is_empty_mpobj, 1, mp_lv_ll_is_empty, lv_ll_is_empty); + + +static const mp_rom_map_elem_t mp_lv_ll_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_ll_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_ll_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_head), MP_ROM_PTR(&mp_lv_ll_ins_head_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_prev), MP_ROM_PTR(&mp_lv_ll_ins_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_tail), MP_ROM_PTR(&mp_lv_ll_ins_tail_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_ll_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_custom), MP_ROM_PTR(&mp_lv_ll_clear_custom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_ll_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_chg_list), MP_ROM_PTR(&mp_lv_ll_chg_list_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_head), MP_ROM_PTR(&mp_lv_ll_get_head_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tail), MP_ROM_PTR(&mp_lv_ll_get_tail_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_ll_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prev), MP_ROM_PTR(&mp_lv_ll_get_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_len), MP_ROM_PTR(&mp_lv_ll_get_len_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_before), MP_ROM_PTR(&mp_lv_ll_move_before_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_ll_is_empty_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_ll_t_locals_dict, mp_lv_ll_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) + * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) */ -static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); + bool preprocess = mp_obj_is_true(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_func_ptr)(list, e, preprocess); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_send_mpobj, 3, mp_lv_event_send, lv_event_send); /* - * lvgl extension definition for: - * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) + * Callback function lv_event_add_cb + * void lv_event_cb_t(lv_event_t *e) */ -static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_event_add_cb_callback(lv_event_t *arg0) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_event_add_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); - /* * lvgl extension definition for: - * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) + * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) */ -static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_add(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); + void *user_data = mp_to_ptr(mp_args[3]); + void *cb = mp_lv_callback(mp_args[1], &lv_event_add_cb_callback, MP_QSTR_lv_event_add_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(list, cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); - -/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_add_mpobj, 4, mp_lv_event_add, lv_event_add); /* * lvgl extension definition for: - * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) */ -static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_remove_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(mp_args[1]); + bool _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_func_ptr)(list, dsc); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_dsc_mpobj, 2, mp_lv_event_remove_dsc, lv_event_remove_dsc); /* * lvgl extension definition for: - * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * uint32_t lv_event_get_count(lv_event_list_t *list) */ -static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_event_list_t *))lv_func_ptr)(list); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_count_mpobj, 1, mp_lv_event_get_count, lv_event_get_count); /* * lvgl extension definition for: - * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) */ -static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_dsc_mpobj, 2, mp_lv_event_get_dsc, lv_event_get_dsc); /* * lvgl extension definition for: - * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * bool lv_event_remove(lv_event_list_t *list, uint32_t index) */ -static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_mpobj, 2, mp_lv_event_remove, lv_event_remove); /* * lvgl extension definition for: - * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) + * void lv_event_remove_all(lv_event_list_t *list) */ -static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_remove_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + ((void (*)(lv_event_list_t *))lv_func_ptr)(list); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_all_mpobj, 1, mp_lv_event_remove_all, lv_event_remove_all); /* * lvgl extension definition for: - * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) */ -static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_push_and_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *event_list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); + void *original_target = mp_to_ptr(mp_args[2]); + void *param = mp_to_ptr(mp_args[3]); + lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_func_ptr)(event_list, code, original_target, param); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_and_send_mpobj, 4, mp_lv_event_push_and_send, lv_event_push_and_send); + + +static const mp_rom_map_elem_t mp_lv_event_list_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_list_t))) }, + { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&mp_lv_event_send_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_event_add_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_dsc), MP_ROM_PTR(&mp_lv_event_remove_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_count), MP_ROM_PTR(&mp_lv_event_get_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dsc), MP_ROM_PTR(&mp_lv_event_get_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_event_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_all), MP_ROM_PTR(&mp_lv_event_remove_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push_and_send), MP_ROM_PTR(&mp_lv_event_push_and_send_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_event_list_t_locals_dict, mp_lv_event_list_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) + * inline static uint32_t lv_array_size(const lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_array_t *))lv_func_ptr)(array); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); - -/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_size_mpobj, 1, mp_lv_array_size, lv_array_size); -/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ +/* Reusing lv_array_size for lv_array_capacity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_capacity_mpobj, 1, mp_lv_array_size, lv_array_capacity); /* * lvgl extension definition for: - * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) + * inline static bool lv_array_is_empty(const lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + bool _res = ((bool (*)(const lv_array_t *))lv_func_ptr)(array); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_empty_mpobj, 1, mp_lv_array_is_empty, lv_array_is_empty); + +/* Reusing lv_array_is_empty for lv_array_is_full */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_full_mpobj, 1, mp_lv_array_is_empty, lv_array_is_full); /* * lvgl extension definition for: - * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * inline static void lv_array_clear(lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + ((void (*)(lv_array_t *))lv_func_ptr)(array); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_clear_mpobj, 1, mp_lv_array_clear, lv_array_clear); /* * lvgl extension definition for: - * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) + * inline static void *lv_array_front(const lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_front(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + void * _res = ((void *(*)(const lv_array_t *))lv_func_ptr)(array); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_front_mpobj, 1, mp_lv_array_front, lv_array_front); +/* Reusing lv_array_front for lv_array_back */ -/* - * Function NOT generated: - * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_image_core_cb draw_core_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_back_mpobj, 1, mp_lv_array_front, lv_array_back); -#define funcptr_lv_draw_image_core_cb NULL - /* * lvgl extension definition for: - * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_result_t lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); - lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); - const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); - const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); - return mp_const_none; + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_func_ptr)(array, capacity, element_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_mpobj, 3, mp_lv_array_init, lv_array_init); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_init_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + void *buf = mp_to_ptr(mp_args[1]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_func_ptr)(array, buf, capacity, element_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); - -/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_from_buf_mpobj, 4, mp_lv_array_init_from_buf, lv_array_init_from_buf); -static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, - -}; +/* + * lvgl extension definition for: + * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) + */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); - +static mp_obj_t mp_lv_array_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t new_capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, new_capacity); + return convert_to_bool(_res); +} -static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_resize_mpobj, 2, mp_lv_array_resize, lv_array_resize); -}; +/* Reusing lv_array_clear for lv_array_deinit */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_deinit_mpobj, 1, mp_lv_array_clear, lv_array_deinit); + /* * lvgl extension definition for: - * void *lv_event_get_target(lv_event_t *e) + * void lv_array_copy(lv_array_t *target, const lv_array_t *source) */ -static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); - return ptr_to_mp((void*)_res); + lv_array_t *target = mp_write_ptr_lv_array_t(mp_args[0]); + const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); + ((void (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(target, source); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_copy_mpobj, 2, mp_lv_array_copy, lv_array_copy); -/* Reusing lv_event_get_target for lv_event_get_current_target */ +/* Reusing lv_array_clear for lv_array_shrink */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_shrink_mpobj, 1, mp_lv_array_clear, lv_array_shrink); /* * lvgl extension definition for: - * lv_event_code_t lv_event_get_code(lv_event_t *e) + * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) */ -static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, index); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); - -/* Reusing lv_event_get_target for lv_event_get_param */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); - -/* Reusing lv_event_get_target for lv_event_get_user_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); - -/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); - -/* Reusing funcptr_event_cb for lv_event_stop_trickling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_mpobj, 2, mp_lv_array_remove, lv_array_remove); -/* Reusing funcptr_event_cb for lv_event_stop_processing */ +/* Reusing lv_array_remove for lv_array_remove_unordered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_unordered_mpobj, 2, mp_lv_array_remove, lv_array_remove_unordered); -/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ +/* Reusing lv_array_init for lv_array_erase */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_erase_mpobj, 3, mp_lv_array_init, lv_array_erase); /* * lvgl extension definition for: - * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) + * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) */ -static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_concat(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(array, other); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_concat_mpobj, 2, mp_lv_array_concat, lv_array_concat); /* * lvgl extension definition for: - * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) + * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) */ -static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_push_back(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); - return lv_to_mp((void*)_res); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + const void *element = (const void *)mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_func_ptr)(array, element); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); - -/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_push_back_mpobj, 2, mp_lv_array_push_back, lv_array_push_back); /* * lvgl extension definition for: - * lv_indev_t *lv_event_get_indev(lv_event_t *e) + * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) */ -static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_assign(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_indev_t((void*)_res); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + const void *value = (const void *)mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_func_ptr)(array, index, value); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_assign_mpobj, 3, mp_lv_array_assign, lv_array_assign); /* * lvgl extension definition for: - * lv_layer_t *lv_event_get_layer(lv_event_t *e) + * void *lv_array_at(const lv_array_t *array, uint32_t index) */ -static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_layer_t((void*)_res); + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(const lv_array_t *, uint32_t))lv_func_ptr)(array, index); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_at_mpobj, 2, mp_lv_array_at, lv_array_at); + + +static const mp_rom_map_elem_t mp_lv_array_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_array_t))) }, + { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_array_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_array_capacity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_array_is_empty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_array_is_full_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_array_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_front), MP_ROM_PTR(&mp_lv_array_front_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_back), MP_ROM_PTR(&mp_lv_array_back_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_array_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init_from_buf), MP_ROM_PTR(&mp_lv_array_init_from_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_array_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&mp_lv_array_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_array_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_shrink), MP_ROM_PTR(&mp_lv_array_shrink_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_array_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_unordered), MP_ROM_PTR(&mp_lv_array_remove_unordered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_erase), MP_ROM_PTR(&mp_lv_array_erase_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_concat), MP_ROM_PTR(&mp_lv_array_concat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push_back), MP_ROM_PTR(&mp_lv_array_push_back_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_assign), MP_ROM_PTR(&mp_lv_array_assign_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_at), MP_ROM_PTR(&mp_lv_array_at_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_array_t_locals_dict, mp_lv_array_t_locals_dict_table); + /* * lvgl extension definition for: - * const lv_area_t *lv_event_get_old_size(lv_event_t *e) + * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) */ -static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + lv_theme_t *dst = mp_write_ptr_lv_theme_t(mp_args[0]); + const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[1]); + ((void (*)(lv_theme_t *, const lv_theme_t *))lv_func_ptr)(dst, src); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_copy_mpobj, 2, mp_lv_theme_copy, lv_theme_copy); /* * lvgl extension definition for: - * uint32_t lv_event_get_key(lv_event_t *e) + * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) */ -static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int_from_uint(_res); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + lv_theme_t *parent = mp_write_ptr_lv_theme_t(mp_args[1]); + ((void (*)(lv_theme_t *, lv_theme_t *))lv_func_ptr)(theme, parent); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_parent_mpobj, 2, mp_lv_theme_set_parent, lv_theme_set_parent); /* - * lvgl extension definition for: - * int32_t lv_event_get_rotary_diff(lv_event_t *e) + * Callback function lv_theme_t_apply_cb + * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) */ -static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int(_res); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_theme_t((void*)arg0); + mp_args[1] = lv_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_theme_t_apply_cb)), 2, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); - /* * lvgl extension definition for: - * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) + * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) */ -static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_set_apply_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + void *apply_cb = mp_lv_callback(mp_args[1], &lv_theme_t_apply_cb_callback, MP_QSTR_lv_theme_t_apply_cb, &theme->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_func_ptr)(theme, apply_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_apply_cb_mpobj, 2, mp_lv_theme_set_apply_cb, lv_theme_set_apply_cb); /* * lvgl extension definition for: - * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) + * void lv_theme_set_user_data(lv_theme_t *theme, void *user_data) */ -static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); + void *user_data = mp_to_ptr(mp_args[1]); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + ((void (*)(lv_theme_t *, void *))lv_func_ptr)(theme, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_user_data_mpobj, 2, mp_lv_theme_set_user_data, lv_theme_set_user_data); /* * lvgl extension definition for: - * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) + * void *lv_theme_get_user_data(const lv_theme_t *theme) */ -static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_point_t((void*)_res); + const lv_theme_t *theme = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[0]); + void * _res = ((void *(*)(const lv_theme_t *))lv_func_ptr)(theme); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_user_data_mpobj, 1, mp_lv_theme_get_user_data, lv_theme_get_user_data); /* - * Struct lv_hit_test_info_t + * lvgl extension definition for: + * void lv_theme_delete(lv_theme_t *theme) */ -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) +static mp_obj_t mp_lv_theme_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); - return (lv_hit_test_info_t*)self->data; + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + ((void (*)(lv_theme_t *))lv_func_ptr)(theme); + return mp_const_none; } -#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_delete_mpobj, 1, mp_lv_theme_delete, lv_theme_delete); + -#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) -#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) +static const mp_rom_map_elem_t mp_lv_theme_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_theme_t))) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_theme_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_theme_set_parent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_apply_cb), MP_ROM_PTR(&mp_lv_theme_set_apply_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_theme_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_theme_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_theme_delete_mpobj) }, + +}; -static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; +static MP_DEFINE_CONST_DICT(mp_lv_theme_t_locals_dict, mp_lv_theme_t_locals_dict_table); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; - case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; - case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ -static void mp_lv_hit_test_info_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); + + +/* + * Callback function lv_timer_t_timer_cb + * void lv_timer_cb_t(lv_timer_t *) + */ + +GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) { - mp_printf(print, "struct lv_hit_test_info_t"); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); + return; } -static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_hit_test_info_t_type, - MP_QSTR_lv_hit_test_info_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_hit_test_info_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_hit_test_info_t_attr, - locals_dict, &mp_lv_hit_test_info_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +/* + * lvgl extension definition for: + * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) + */ -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) +static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_hit_test_info_t_type; + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); + return mp_const_none; } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); /* * lvgl extension definition for: - * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) + * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) */ -static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_hit_test_info_t((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); -/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ +/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); /* * lvgl extension definition for: - * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) + * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) */ -static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); /* * lvgl extension definition for: - * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) + * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) */ -static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_draw_task_t((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool auto_delete = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); /* * lvgl extension definition for: - * lv_state_t lv_event_get_prev_state(lv_event_t *e) + * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) */ -static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); /* * lvgl extension definition for: - * float lv_event_get_pinch_scale(lv_event_t *gesture_event) + * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) */ -static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_float_from_f(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); + return mp_read_ptr_lv_timer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); /* * lvgl extension definition for: - * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) + * void *lv_timer_get_user_data(lv_timer_t *timer) */ -static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); /* * lvgl extension definition for: - * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) + * bool lv_timer_get_paused(lv_timer_t *timer) */ -static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); - lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); - return mp_obj_new_int(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); + + +static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) + * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) */ -static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_unpremultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t))lv_func_ptr)(c); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_unpremultiply_mpobj, 1, mp_lv_color32_unpremultiply, lv_color32_unpremultiply); -/* Reusing funcptr_event_cb for lv_event_push */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); - -/* Reusing funcptr_event_cb for lv_event_pop */ +/* + * lvgl extension definition for: + * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); - +static mp_obj_t mp_lv_color32_lumi_of(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + bool premultiplied = mp_obj_is_true(mp_args[1]); + uint8_t _res = ((uint8_t (*)(lv_color32_t, bool))lv_func_ptr)(c, premultiplied); + return mp_obj_new_int_from_uint(_res); +} -static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_lumi_of_mpobj, 2, mp_lv_color32_lumi_of, lv_color32_lumi_of); -}; -static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); - +/* + * lvgl extension definition for: + * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) + */ + +static mp_obj_t mp_lv_color_mix32_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); + return mp_read_lv_color32_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_inlined); + +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied_inlined */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied_inlined); + /* * lvgl extension definition for: @@ -38043,35 +40647,25 @@ static mp_obj_t mp_lv_color32_luminance(size_t mp_n_args, const mp_obj_t *mp_arg static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_luminance_mpobj, 1, mp_lv_color32_luminance, lv_color32_luminance); +/* Reusing lv_color_mix32_inlined for lv_color_mix32 */ -/* - * lvgl extension definition for: - * lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg) - */ - -static mp_obj_t mp_lv_color_mix32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); - return mp_read_lv_color32_t(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32, lv_color_mix32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32); -/* Reusing lv_color_mix32 for lv_color_mix32_premultiplied */ +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32, lv_color_mix32_premultiplied); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied); -/* Reusing lv_color_mix32 for lv_color_over32 */ +/* Reusing lv_color_mix32_inlined for lv_color_over32 */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32, lv_color_over32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_over32); static const mp_rom_map_elem_t mp_lv_color32_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color32_t))) }, + { MP_ROM_QSTR(MP_QSTR_unpremultiply), MP_ROM_PTR(&mp_lv_color32_unpremultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lumi_of), MP_ROM_PTR(&mp_lv_color32_lumi_of_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_inlined), MP_ROM_PTR(&mp_lv_color_mix32_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied_inlined), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_inlined_mpobj) }, { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color32_eq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_premultiply), MP_ROM_PTR(&mp_lv_color_premultiply_mpobj) }, { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color32_luminance_mpobj) }, @@ -38085,782 +40679,711 @@ static MP_DEFINE_CONST_DICT(mp_lv_color32_t_locals_dict, mp_lv_color32_t_locals_ /* - * lvgl extension definition for: - * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) - */ - -static mp_obj_t mp_lv_event_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); - bool preprocess = mp_obj_is_true(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_func_ptr)(list, e, preprocess); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_send_mpobj, 3, mp_lv_event_send, lv_event_send); - - -/* - * Callback function lv_event_add_cb - * void lv_event_cb_t(lv_event_t *e) + * Callback function lv_color_filter_dsc_t_cb + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) */ -GENMPY_UNUSED static void lv_event_add_cb_callback(lv_event_t *arg0) +GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_event_add_cb)), 1, mp_args); - return; + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); + return mp_write_lv_color_t(callback_result); } /* * lvgl extension definition for: - * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) + * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) */ -static mp_obj_t mp_lv_event_add(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - void *cb = mp_lv_callback(mp_args[1], &lv_event_add_cb_callback, MP_QSTR_lv_event_add_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(list, cb, filter, user_data); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); + void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_add_mpobj, 4, mp_lv_event_add, lv_event_add); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); -/* - * lvgl extension definition for: - * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) - */ - -static mp_obj_t mp_lv_event_remove_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(mp_args[1]); - bool _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_func_ptr)(list, dsc); - return convert_to_bool(_res); -} +static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); + +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_dsc_mpobj, 2, mp_lv_event_remove_dsc, lv_event_remove_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); /* * lvgl extension definition for: - * uint32_t lv_event_get_count(lv_event_list_t *list) + * void lv_anim_set_var(lv_anim_t *a, void *var) */ -static mp_obj_t mp_lv_event_get_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_event_list_t *))lv_func_ptr)(list); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *var = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_count_mpobj, 1, mp_lv_event_get_count, lv_event_get_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); /* - * lvgl extension definition for: - * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) + * Function NOT generated: + * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! + * lv_anim_exec_xcb_t exec_cb */ - -static mp_obj_t mp_lv_event_get_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); - return mp_read_ptr_lv_event_dsc_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_dsc_mpobj, 2, mp_lv_event_get_dsc, lv_event_get_dsc); /* * lvgl extension definition for: - * bool lv_event_remove(lv_event_list_t *list, uint32_t index) + * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) */ -static mp_obj_t mp_lv_event_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); - return convert_to_bool(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_mpobj, 2, mp_lv_event_remove, lv_event_remove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); /* * lvgl extension definition for: - * void lv_event_remove_all(lv_event_list_t *list) + * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) */ -static mp_obj_t mp_lv_event_remove_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - ((void (*)(lv_event_list_t *))lv_func_ptr)(list); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_all_mpobj, 1, mp_lv_event_remove_all, lv_event_remove_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); +/* Reusing lv_anim_set_duration for lv_anim_set_delay */ -/* - * lvgl extension definition for: - * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) - */ - -static mp_obj_t mp_lv_event_push_and_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *event_list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); - void *original_target = mp_to_ptr(mp_args[2]); - void *param = mp_to_ptr(mp_args[3]); - lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_func_ptr)(event_list, code, original_target, param); - return mp_obj_new_int(_res); -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); + +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_and_send_mpobj, 4, mp_lv_event_push_and_send, lv_event_push_and_send); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -static const mp_rom_map_elem_t mp_lv_event_list_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_list_t))) }, - { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&mp_lv_event_send_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_event_add_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_dsc), MP_ROM_PTR(&mp_lv_event_remove_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_count), MP_ROM_PTR(&mp_lv_event_get_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dsc), MP_ROM_PTR(&mp_lv_event_get_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_event_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_all), MP_ROM_PTR(&mp_lv_event_remove_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push_and_send), MP_ROM_PTR(&mp_lv_event_push_and_send_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); -}; +/* Reusing lv_anim_set_duration for lv_anim_pause_for */ -static MP_DEFINE_CONST_DICT(mp_lv_event_list_t_locals_dict, mp_lv_event_list_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); + /* * lvgl extension definition for: - * inline static uint32_t lv_array_size(const lv_array_t *array) + * bool lv_anim_is_paused(lv_anim_t *a) */ -static mp_obj_t mp_lv_array_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_array_t *))lv_func_ptr)(array); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_size_mpobj, 1, mp_lv_array_size, lv_array_size); - -/* Reusing lv_array_size for lv_array_capacity */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_capacity_mpobj, 1, mp_lv_array_size, lv_array_capacity); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); /* * lvgl extension definition for: - * inline static bool lv_array_is_empty(const lv_array_t *array) + * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) */ -static mp_obj_t mp_lv_array_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - bool _res = ((bool (*)(const lv_array_t *))lv_func_ptr)(array); - return convert_to_bool(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_empty_mpobj, 1, mp_lv_array_is_empty, lv_array_is_empty); - -/* Reusing lv_array_is_empty for lv_array_is_full */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_full_mpobj, 1, mp_lv_array_is_empty, lv_array_is_full); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); /* - * lvgl extension definition for: - * inline static void lv_array_clear(lv_array_t *array) + * Callback function lv_anim_t_exec_cb + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -static mp_obj_t mp_lv_array_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - ((void (*)(lv_array_t *))lv_func_ptr)(array); - return mp_const_none; + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_clear_mpobj, 1, mp_lv_array_clear, lv_array_clear); - /* * lvgl extension definition for: - * inline static void *lv_array_front(const lv_array_t *array) + * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_array_front(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - void * _res = ((void *(*)(const lv_array_t *))lv_func_ptr)(array); - return ptr_to_mp((void*)_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_front_mpobj, 1, mp_lv_array_front, lv_array_front); - -/* Reusing lv_array_front for lv_array_back */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_back_mpobj, 1, mp_lv_array_front, lv_array_back); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); /* - * lvgl extension definition for: - * void lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) + * Callback function lv_anim_t_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) */ -static mp_obj_t mp_lv_array_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_array_t *, uint32_t, uint32_t))lv_func_ptr)(array, capacity, element_size); - return mp_const_none; + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_mpobj, 3, mp_lv_array_init, lv_array_init); - /* * lvgl extension definition for: - * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) + * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) */ -static mp_obj_t mp_lv_array_init_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - void *buf = mp_to_ptr(mp_args[1]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_func_ptr)(array, buf, capacity, element_size); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_from_buf_mpobj, 4, mp_lv_array_init_from_buf, lv_array_init_from_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); /* - * lvgl extension definition for: - * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) + * Callback function lv_anim_t_start_cb + * void lv_anim_start_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t new_capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, new_capacity); - return convert_to_bool(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_resize_mpobj, 2, mp_lv_array_resize, lv_array_resize); - -/* Reusing lv_array_clear for lv_array_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_deinit_mpobj, 1, mp_lv_array_clear, lv_array_deinit); - /* * lvgl extension definition for: - * void lv_array_copy(lv_array_t *target, const lv_array_t *source) + * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) */ -static mp_obj_t mp_lv_array_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *target = mp_write_ptr_lv_array_t(mp_args[0]); - const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); - ((void (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(target, source); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_copy_mpobj, 2, mp_lv_array_copy, lv_array_copy); - -/* Reusing lv_array_clear for lv_array_shrink */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_shrink_mpobj, 1, mp_lv_array_clear, lv_array_shrink); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); /* - * lvgl extension definition for: - * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) + * Callback function lv_anim_t_get_value_cb + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, index); - return mp_obj_new_int(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_mpobj, 2, mp_lv_array_remove, lv_array_remove); - -/* Reusing lv_array_remove for lv_array_remove_unordered */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_unordered_mpobj, 2, mp_lv_array_remove, lv_array_remove_unordered); - /* * lvgl extension definition for: - * lv_result_t lv_array_erase(lv_array_t *array, uint32_t start, uint32_t end) + * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) */ -static mp_obj_t mp_lv_array_erase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t start = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t end = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_func_ptr)(array, start, end); - return mp_obj_new_int(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_erase_mpobj, 3, mp_lv_array_erase, lv_array_erase); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); /* - * lvgl extension definition for: - * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) + * Callback function lv_anim_t_completed_cb + * void lv_anim_completed_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_concat(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(array, other); - return mp_obj_new_int(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_concat_mpobj, 2, mp_lv_array_concat, lv_array_concat); - /* * lvgl extension definition for: - * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) + * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) */ -static mp_obj_t mp_lv_array_push_back(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - const void *element = (const void *)mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_func_ptr)(array, element); - return mp_obj_new_int(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_push_back_mpobj, 2, mp_lv_array_push_back, lv_array_push_back); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); /* - * lvgl extension definition for: - * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) + * Callback function lv_anim_t_deleted_cb + * void lv_anim_deleted_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_assign(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - const void *value = (const void *)mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_func_ptr)(array, index, value); - return mp_obj_new_int(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_assign_mpobj, 3, mp_lv_array_assign, lv_array_assign); - /* * lvgl extension definition for: - * void *lv_array_at(const lv_array_t *array, uint32_t index) + * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) */ -static mp_obj_t mp_lv_array_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(const lv_array_t *, uint32_t))lv_func_ptr)(array, index); - return ptr_to_mp((void*)_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_at_mpobj, 2, mp_lv_array_at, lv_array_at); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ -static const mp_rom_map_elem_t mp_lv_array_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_array_t))) }, - { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_array_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_array_capacity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_array_is_empty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_array_is_full_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_array_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_front), MP_ROM_PTR(&mp_lv_array_front_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_back), MP_ROM_PTR(&mp_lv_array_back_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_array_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init_from_buf), MP_ROM_PTR(&mp_lv_array_init_from_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_array_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&mp_lv_array_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_array_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_shrink), MP_ROM_PTR(&mp_lv_array_shrink_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_array_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_unordered), MP_ROM_PTR(&mp_lv_array_remove_unordered_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_erase), MP_ROM_PTR(&mp_lv_array_erase_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_concat), MP_ROM_PTR(&mp_lv_array_concat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push_back), MP_ROM_PTR(&mp_lv_array_push_back_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_assign), MP_ROM_PTR(&mp_lv_array_assign_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_at), MP_ROM_PTR(&mp_lv_array_at_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); -}; +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ -static MP_DEFINE_CONST_DICT(mp_lv_array_t_locals_dict, mp_lv_array_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); + +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); + +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); + +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); + /* * lvgl extension definition for: - * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) + * void lv_anim_set_early_apply(lv_anim_t *a, bool en) */ -static mp_obj_t mp_lv_theme_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *dst = mp_write_ptr_lv_theme_t(mp_args[0]); - const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[1]); - ((void (*)(lv_theme_t *, const lv_theme_t *))lv_func_ptr)(dst, src); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_copy_mpobj, 2, mp_lv_theme_copy, lv_theme_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); + +/* Reusing lv_anim_set_var for lv_anim_set_user_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); /* * lvgl extension definition for: - * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) + * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) */ -static mp_obj_t mp_lv_theme_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - lv_theme_t *parent = mp_write_ptr_lv_theme_t(mp_args[1]); - ((void (*)(lv_theme_t *, lv_theme_t *))lv_func_ptr)(theme, parent); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); + int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); + int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); + int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_parent_mpobj, 2, mp_lv_theme_set_parent, lv_theme_set_parent); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); -/* - * Callback function lv_theme_t_apply_cb - * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) - */ - -GENMPY_UNUSED static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_theme_t((void*)arg0); - mp_args[1] = lv_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_theme_t_apply_cb)), 2, mp_args); - return; -} - - /* * lvgl extension definition for: - * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) + * lv_anim_t *lv_anim_start(const lv_anim_t *a) */ -static mp_obj_t mp_lv_theme_set_apply_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - void *apply_cb = mp_lv_callback(mp_args[1], &lv_theme_t_apply_cb_callback, MP_QSTR_lv_theme_t_apply_cb, &theme->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_func_ptr)(theme, apply_cb); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_apply_cb_mpobj, 2, mp_lv_theme_set_apply_cb, lv_theme_set_apply_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); /* * lvgl extension definition for: - * void lv_theme_delete(lv_theme_t *theme) + * uint32_t lv_anim_get_delay(const lv_anim_t *a) */ -static mp_obj_t mp_lv_theme_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - ((void (*)(lv_theme_t *))lv_func_ptr)(theme); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_delete_mpobj, 1, mp_lv_theme_delete, lv_theme_delete); - - -static const mp_rom_map_elem_t mp_lv_theme_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_theme_t))) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_theme_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_theme_set_parent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_apply_cb), MP_ROM_PTR(&mp_lv_theme_set_apply_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_theme_delete_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_theme_t_locals_dict, mp_lv_theme_t_locals_dict_table); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ +/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); -/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ +/* Reusing lv_anim_get_delay for lv_anim_get_time */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); -/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ +/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); /* - * Callback function lv_timer_t_timer_cb - * void lv_timer_cb_t(lv_timer_t *) + * lvgl extension definition for: + * void *lv_anim_get_user_data(const lv_anim_t *a) */ -GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) +static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); - return; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); + return ptr_to_mp((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); + /* * lvgl extension definition for: - * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) + * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); - return mp_const_none; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); /* * lvgl extension definition for: - * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) + * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); - return mp_const_none; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); /* * lvgl extension definition for: - * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) + * int32_t lv_anim_path_linear(const lv_anim_t *a) */ -static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ -/* - * lvgl extension definition for: - * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); + +/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ -static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool auto_delete = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); + +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); + +/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); +/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ -/* - * lvgl extension definition for: - * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); + +/* Reusing lv_anim_path_linear for lv_anim_path_step */ -static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *user_data = mp_to_ptr(mp_args[1]); - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); + +/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); +static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, -/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); +static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); + /* - * lvgl extension definition for: - * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) + * Array convertors for lv_style_prop_t [] */ -static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); - return mp_read_ptr_lv_timer_t((void*)_res); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (lv_style_prop_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); - /* - * lvgl extension definition for: - * void *lv_timer_get_user_data(lv_timer_t *timer) + * Callback function lv_style_transition_dsc_init_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) */ -static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); - return ptr_to_mp((void*)_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); - /* * lvgl extension definition for: - * bool lv_timer_get_paused(lv_timer_t *timer) + * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) */ -static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); - return convert_to_bool(_res); + void *user_data = mp_to_ptr(mp_args[5]); + const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); + void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); + ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); -static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, +static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); static const mp_rom_map_elem_t mp_lv_obj_class_t_locals_dict_table[] = { @@ -38883,10 +41406,10 @@ static MP_DEFINE_CONST_DICT(mp_lv_matrix_t_locals_dict, mp_lv_matrix_t_locals_di /* * lvgl extension definition for: - * inline static bool lv_style_is_const(const lv_style_t *style) + * inline static bool lv_style_is_const_internal(const lv_style_t *style) */ -static mp_obj_t mp_lv_style_is_const(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_is_const_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[0]); bool _res = ((bool (*)(const lv_style_t *))lv_func_ptr)(style); @@ -38895,15 +41418,15 @@ static mp_obj_t mp_lv_style_is_const(size_t mp_n_args, const mp_obj_t *mp_args, -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_const_mpobj, 1, mp_lv_style_is_const, lv_style_is_const); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_const_internal_mpobj, 1, mp_lv_style_is_const_internal, lv_style_is_const_internal); /* * lvgl extension definition for: - * inline static lv_style_res_t lv_style_get_prop_inlined(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) + * inline static lv_style_res_t lv_style_get_prop_internal(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) */ -static mp_obj_t mp_lv_style_get_prop_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_get_prop_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[0]); lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); @@ -38914,72 +41437,7 @@ static mp_obj_t mp_lv_style_get_prop_inlined(size_t mp_n_args, const mp_obj_t *m -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_inlined_mpobj, 3, mp_lv_style_get_prop_inlined, lv_style_get_prop_inlined); - - -/* - * lvgl extension definition for: - * inline static void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) - */ - -static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); - - -/* - * lvgl extension definition for: - * inline static void lv_style_set_pad_all(lv_style_t *style, int32_t value) - */ - -static mp_obj_t mp_lv_style_set_pad_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, int32_t))lv_func_ptr)(style, value); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_all); - -/* Reusing lv_style_set_pad_all for lv_style_set_pad_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_hor); - -/* Reusing lv_style_set_pad_all for lv_style_set_pad_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_ver); - -/* Reusing lv_style_set_pad_all for lv_style_set_pad_gap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_gap); - -/* Reusing lv_style_set_pad_all for lv_style_set_margin_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_hor); - -/* Reusing lv_style_set_pad_all for lv_style_set_margin_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_ver); - -/* Reusing lv_style_set_pad_all for lv_style_set_margin_all */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_all); - -/* Reusing lv_style_set_pad_all for lv_style_set_transform_scale */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_scale); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_internal_mpobj, 3, mp_lv_style_get_prop_internal, lv_style_get_prop_internal); /* Reusing lv_obj_report_style_change for lv_style_init */ @@ -39011,6 +41469,10 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_copy_mpobj, 2, mp_lv_style_cop static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_merge_mpobj, 2, mp_lv_style_copy, lv_style_merge); +/* Reusing lv_style_is_const_internal for lv_style_is_const */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_const_mpobj, 1, mp_lv_style_is_const_internal, lv_style_is_const); + /* * lvgl extension definition for: @@ -39048,49 +41510,63 @@ static mp_obj_t mp_lv_style_set_prop(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_prop_mpobj, 3, mp_lv_style_set_prop, lv_style_set_prop); -/* Reusing lv_style_get_prop_inlined for lv_style_get_prop */ +/* Reusing lv_style_get_prop_internal for lv_style_get_prop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_mpobj, 3, mp_lv_style_get_prop_inlined, lv_style_get_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_mpobj, 3, mp_lv_style_get_prop_internal, lv_style_get_prop); -/* Reusing lv_style_is_const for lv_style_is_empty */ +/* Reusing lv_style_is_const_internal for lv_style_is_empty */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_empty_mpobj, 1, mp_lv_style_is_const, lv_style_is_empty); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_empty_mpobj, 1, mp_lv_style_is_const_internal, lv_style_is_empty); -/* Reusing lv_style_set_pad_all for lv_style_set_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_width); +/* + * lvgl extension definition for: + * void lv_style_set_width(lv_style_t *style, int32_t value) + */ + +static mp_obj_t mp_lv_style_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, int32_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_width); -/* Reusing lv_style_set_pad_all for lv_style_set_min_width */ +/* Reusing lv_style_set_width for lv_style_set_min_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_min_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_min_width); -/* Reusing lv_style_set_pad_all for lv_style_set_max_width */ +/* Reusing lv_style_set_width for lv_style_set_max_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_max_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_max_width); -/* Reusing lv_style_set_pad_all for lv_style_set_height */ +/* Reusing lv_style_set_width for lv_style_set_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_height); -/* Reusing lv_style_set_pad_all for lv_style_set_min_height */ +/* Reusing lv_style_set_width for lv_style_set_min_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_min_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_min_height); -/* Reusing lv_style_set_pad_all for lv_style_set_max_height */ +/* Reusing lv_style_set_width for lv_style_set_max_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_max_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_max_height); -/* Reusing lv_style_set_pad_all for lv_style_set_length */ +/* Reusing lv_style_set_width for lv_style_set_length */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_length_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_length); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_length_mpobj, 2, mp_lv_style_set_width, lv_style_set_length); -/* Reusing lv_style_set_pad_all for lv_style_set_x */ +/* Reusing lv_style_set_width for lv_style_set_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_x); -/* Reusing lv_style_set_pad_all for lv_style_set_y */ +/* Reusing lv_style_set_width for lv_style_set_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_y); /* @@ -39110,97 +41586,97 @@ static mp_obj_t mp_lv_style_set_align(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_align_mpobj, 2, mp_lv_style_set_align, lv_style_set_align); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_width */ +/* Reusing lv_style_set_width for lv_style_set_transform_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_width); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_height */ +/* Reusing lv_style_set_width for lv_style_set_transform_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_height); -/* Reusing lv_style_set_pad_all for lv_style_set_translate_x */ +/* Reusing lv_style_set_width for lv_style_set_translate_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_translate_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_translate_x); -/* Reusing lv_style_set_pad_all for lv_style_set_translate_y */ +/* Reusing lv_style_set_width for lv_style_set_translate_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_translate_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_translate_y); -/* Reusing lv_style_set_pad_all for lv_style_set_translate_radial */ +/* Reusing lv_style_set_width for lv_style_set_translate_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_radial_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_translate_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_radial_mpobj, 2, mp_lv_style_set_width, lv_style_set_translate_radial); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_scale_x */ +/* Reusing lv_style_set_width for lv_style_set_transform_scale_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_scale_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale_x); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_scale_y */ +/* Reusing lv_style_set_width for lv_style_set_transform_scale_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_scale_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale_y); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_rotation */ +/* Reusing lv_style_set_width for lv_style_set_transform_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_rotation_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_rotation_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_rotation); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_pivot_x */ +/* Reusing lv_style_set_width for lv_style_set_transform_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_pivot_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_pivot_x); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_pivot_y */ +/* Reusing lv_style_set_width for lv_style_set_transform_pivot_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_pivot_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_pivot_y); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_skew_x */ +/* Reusing lv_style_set_width for lv_style_set_transform_skew_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_skew_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_skew_x); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_skew_y */ +/* Reusing lv_style_set_width for lv_style_set_transform_skew_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_skew_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_skew_y); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_top */ +/* Reusing lv_style_set_width for lv_style_set_pad_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_top_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_top_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_top); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_bottom */ +/* Reusing lv_style_set_width for lv_style_set_pad_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_bottom_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_bottom_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_bottom); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_left */ +/* Reusing lv_style_set_width for lv_style_set_pad_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_left_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_left_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_left); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_right */ +/* Reusing lv_style_set_width for lv_style_set_pad_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_right_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_right_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_right); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_row */ +/* Reusing lv_style_set_width for lv_style_set_pad_row */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_row_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_row); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_row_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_row); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_column */ +/* Reusing lv_style_set_width for lv_style_set_pad_column */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_column_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_column); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_column_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_column); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_radial */ +/* Reusing lv_style_set_width for lv_style_set_pad_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_radial_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_radial_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_radial); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_top */ +/* Reusing lv_style_set_width for lv_style_set_margin_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_top_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_top_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_top); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_bottom */ +/* Reusing lv_style_set_width for lv_style_set_margin_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_bottom_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_bottom_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_bottom); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_left */ +/* Reusing lv_style_set_width for lv_style_set_margin_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_left_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_left_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_left); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_right */ +/* Reusing lv_style_set_width for lv_style_set_margin_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_right_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_right_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_right); /* @@ -39260,13 +41736,13 @@ static mp_obj_t mp_lv_style_set_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_grad_dir_mpobj, 2, mp_lv_style_set_bg_grad_dir, lv_style_set_bg_grad_dir); -/* Reusing lv_style_set_pad_all for lv_style_set_bg_main_stop */ +/* Reusing lv_style_set_width for lv_style_set_bg_main_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_main_stop_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_bg_main_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_main_stop_mpobj, 2, mp_lv_style_set_width, lv_style_set_bg_main_stop); -/* Reusing lv_style_set_pad_all for lv_style_set_bg_grad_stop */ +/* Reusing lv_style_set_width for lv_style_set_bg_grad_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_grad_stop_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_bg_grad_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_grad_stop_mpobj, 2, mp_lv_style_set_width, lv_style_set_bg_grad_stop); /* Reusing lv_style_set_bg_opa for lv_style_set_bg_main_opa */ @@ -39350,9 +41826,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_color_mpobj, 2, mp_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_border_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_border_width */ +/* Reusing lv_style_set_width for lv_style_set_border_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_border_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_border_width); /* @@ -39376,9 +41852,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_side_mpobj, 2, mp_l static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_post_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_border_post); -/* Reusing lv_style_set_pad_all for lv_style_set_outline_width */ +/* Reusing lv_style_set_width for lv_style_set_outline_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_outline_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_outline_width); /* Reusing lv_style_set_bg_color for lv_style_set_outline_color */ @@ -39388,25 +41864,25 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_color_mpobj, 2, mp static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_outline_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_outline_pad */ +/* Reusing lv_style_set_width for lv_style_set_outline_pad */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_pad_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_outline_pad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_pad_mpobj, 2, mp_lv_style_set_width, lv_style_set_outline_pad); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_width */ +/* Reusing lv_style_set_width for lv_style_set_shadow_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_width); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_offset_x */ +/* Reusing lv_style_set_width for lv_style_set_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_offset_x); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_offset_y */ +/* Reusing lv_style_set_width for lv_style_set_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_offset_y); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_spread */ +/* Reusing lv_style_set_width for lv_style_set_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_spread_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_spread); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_spread_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_spread); /* Reusing lv_style_set_bg_color for lv_style_set_shadow_color */ @@ -39446,17 +41922,17 @@ static mp_obj_t mp_lv_style_set_image_colorkey(size_t mp_n_args, const mp_obj_t static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_image_colorkey_mpobj, 2, mp_lv_style_set_image_colorkey, lv_style_set_image_colorkey); -/* Reusing lv_style_set_pad_all for lv_style_set_line_width */ +/* Reusing lv_style_set_width for lv_style_set_line_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_line_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_line_width); -/* Reusing lv_style_set_pad_all for lv_style_set_line_dash_width */ +/* Reusing lv_style_set_width for lv_style_set_line_dash_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_line_dash_width); -/* Reusing lv_style_set_pad_all for lv_style_set_line_dash_gap */ +/* Reusing lv_style_set_width for lv_style_set_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_gap_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_line_dash_gap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_line_dash_gap); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_line_rounded */ @@ -39470,9 +41946,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_color_mpobj, 2, mp_lv static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_line_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_arc_width */ +/* Reusing lv_style_set_width for lv_style_set_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_arc_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_arc_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_arc_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_arc_width); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_arc_rounded */ @@ -39516,13 +41992,13 @@ static mp_obj_t mp_lv_style_set_text_font(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_font_mpobj, 2, mp_lv_style_set_text_font, lv_style_set_text_font); -/* Reusing lv_style_set_pad_all for lv_style_set_text_letter_space */ +/* Reusing lv_style_set_width for lv_style_set_text_letter_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_letter_space_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_text_letter_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_letter_space_mpobj, 2, mp_lv_style_set_width, lv_style_set_text_letter_space); -/* Reusing lv_style_set_pad_all for lv_style_set_text_line_space */ +/* Reusing lv_style_set_width for lv_style_set_text_line_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_line_space_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_text_line_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_line_space_mpobj, 2, mp_lv_style_set_width, lv_style_set_text_line_space); /* @@ -39564,17 +42040,35 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_align_mpobj, 2, mp_lv static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_color_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_text_outline_stroke_color); -/* Reusing lv_style_set_pad_all for lv_style_set_text_outline_stroke_width */ +/* Reusing lv_style_set_width for lv_style_set_text_outline_stroke_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_text_outline_stroke_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_text_outline_stroke_width); /* Reusing lv_style_set_bg_opa for lv_style_set_text_outline_stroke_opa */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_text_outline_stroke_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_blur_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_radius_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_blur_radius); +/* + * lvgl extension definition for: + * void lv_style_set_text_leading_trim(lv_style_t *style, lv_text_leading_trim_t value) + */ + +static mp_obj_t mp_lv_style_set_text_leading_trim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_text_leading_trim_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_text_leading_trim_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_leading_trim_mpobj, 2, mp_lv_style_set_text_leading_trim, lv_style_set_text_leading_trim); + +/* Reusing lv_style_set_width for lv_style_set_blur_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_blur_radius); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_blur_backdrop */ @@ -39598,17 +42092,17 @@ static mp_obj_t mp_lv_style_set_blur_quality(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_blur_quality); -/* Reusing lv_style_set_pad_all for lv_style_set_drop_shadow_radius */ +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_drop_shadow_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_radius); -/* Reusing lv_style_set_pad_all for lv_style_set_drop_shadow_offset_x */ +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_drop_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_x); -/* Reusing lv_style_set_pad_all for lv_style_set_drop_shadow_offset_y */ +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_y); /* Reusing lv_style_set_bg_color for lv_style_set_drop_shadow_color */ @@ -39622,13 +42116,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_opa_mpobj, 2, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_drop_shadow_quality); -/* Reusing lv_style_set_pad_all for lv_style_set_radius */ +/* Reusing lv_style_set_width for lv_style_set_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_radius); -/* Reusing lv_style_set_pad_all for lv_style_set_radial_offset */ +/* Reusing lv_style_set_width for lv_style_set_radial_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_width, lv_style_set_radial_offset); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_clip_corner */ @@ -39894,48 +42388,91 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_dsc_array_mpobj, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_row_align); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_column_pos */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_column_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_pos); /* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_x_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_x_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_x_align); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_column_span */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_column_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_span); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_row_pos */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_row_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_pos); /* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_y_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_y_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_y_align); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_row_span */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_span); + + +/* + * lvgl extension definition for: + * void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) + */ + +static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); + +/* Reusing lv_style_set_width for lv_style_set_pad_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_all); + +/* Reusing lv_style_set_width for lv_style_set_pad_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_hor); + +/* Reusing lv_style_set_width for lv_style_set_pad_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_ver); + +/* Reusing lv_style_set_width for lv_style_set_pad_gap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_gap); + +/* Reusing lv_style_set_width for lv_style_set_margin_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_hor); + +/* Reusing lv_style_set_width for lv_style_set_margin_ver */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_row_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_ver); + +/* Reusing lv_style_set_width for lv_style_set_margin_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_all); + +/* Reusing lv_style_set_width for lv_style_set_transform_scale */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale); static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prop_inlined), MP_ROM_PTR(&mp_lv_style_get_prop_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_const_internal), MP_ROM_PTR(&mp_lv_style_is_const_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prop_internal), MP_ROM_PTR(&mp_lv_style_get_prop_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_style_reset_mpobj) }, { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_style_copy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_merge), MP_ROM_PTR(&mp_lv_style_merge_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_prop), MP_ROM_PTR(&mp_lv_style_remove_prop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_prop), MP_ROM_PTR(&mp_lv_style_set_prop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_prop), MP_ROM_PTR(&mp_lv_style_get_prop_mpobj) }, @@ -40027,6 +42564,7 @@ static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_leading_trim), MP_ROM_PTR(&mp_lv_style_set_text_leading_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_blur_radius), MP_ROM_PTR(&mp_lv_style_set_blur_radius_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_blur_backdrop), MP_ROM_PTR(&mp_lv_style_set_blur_backdrop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_blur_quality), MP_ROM_PTR(&mp_lv_style_set_blur_quality_mpobj) }, @@ -40068,6 +42606,15 @@ static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_pos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_grid_cell_y_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_y_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, }; @@ -40084,10 +42631,10 @@ static MP_DEFINE_CONST_DICT(mp_lv_style_value_t_locals_dict, mp_lv_style_value_t /* * lvgl extension definition for: - * void lv_observer_remove(lv_observer_t *observer) + * void lv_observer_delete(lv_observer_t *observer) */ -static mp_obj_t mp_lv_observer_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_observer_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_observer_t *observer = mp_write_ptr_lv_observer_t(mp_args[0]); ((void (*)(lv_observer_t *))lv_func_ptr)(observer); @@ -40096,7 +42643,7 @@ static mp_obj_t mp_lv_observer_remove(size_t mp_n_args, const mp_obj_t *mp_args, -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_remove_mpobj, 1, mp_lv_observer_remove, lv_observer_remove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_delete_mpobj, 1, mp_lv_observer_delete, lv_observer_delete); /* @@ -40150,18 +42697,54 @@ static mp_obj_t mp_lv_observer_get_user_data(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_get_user_data_mpobj, 1, mp_lv_observer_get_user_data, lv_observer_get_user_data); +/* + * lvgl extension definition for: + * void lv_observer_set_user_data(lv_observer_t *observer, void *user_data) + */ + +static mp_obj_t mp_lv_observer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[1]); + lv_observer_t *observer = mp_write_ptr_lv_observer_t(mp_args[0]); + ((void (*)(lv_observer_t *, void *))lv_func_ptr)(observer, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_set_user_data_mpobj, 2, mp_lv_observer_set_user_data, lv_observer_set_user_data); + + static const mp_rom_map_elem_t mp_lv_observer_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_observer_t))) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_observer_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_observer_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_observer_get_target_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_observer_get_target_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_observer_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_observer_set_user_data_mpobj) }, }; static MP_DEFINE_CONST_DICT(mp_lv_observer_t_locals_dict, mp_lv_observer_t_locals_dict_table); +/* + * lvgl extension definition for: + * void lv_subject_delete(lv_subject_t *subject) + */ + +static mp_obj_t mp_lv_subject_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); + ((void (*)(lv_subject_t *))lv_func_ptr)(subject); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_delete_mpobj, 1, mp_lv_subject_delete, lv_subject_delete); + + /* * lvgl extension definition for: * void lv_subject_init_int(lv_subject_t *subject, int32_t value) @@ -40287,10 +42870,30 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_init_string_mpobj, 5, mp_lv_ /* * lvgl extension definition for: - * void lv_subject_copy_string(lv_subject_t *subject, const char *buf) + * void lv_subject_set_string_buffer_static(lv_subject_t *subject, char *buf, char *prev_buf, size_t size) + */ + +static mp_obj_t mp_lv_subject_set_string_buffer_static(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); + char *buf = (char*)convert_from_str(mp_args[1]); + char *prev_buf = (char*)convert_from_str(mp_args[2]); + size_t size = (size_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_subject_t *, char *, char *, size_t))lv_func_ptr)(subject, buf, prev_buf, size); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_set_string_buffer_static_mpobj, 4, mp_lv_subject_set_string_buffer_static, lv_subject_set_string_buffer_static); + + +/* + * lvgl extension definition for: + * void lv_subject_set_string(lv_subject_t *subject, const char *buf) */ -static mp_obj_t mp_lv_subject_copy_string(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_subject_set_string(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); const char *buf = (const char *)(char*)convert_from_str(mp_args[1]); @@ -40300,7 +42903,7 @@ static mp_obj_t mp_lv_subject_copy_string(size_t mp_n_args, const mp_obj_t *mp_a -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_copy_string_mpobj, 2, mp_lv_subject_copy_string, lv_subject_copy_string); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_set_string_mpobj, 2, mp_lv_subject_set_string, lv_subject_set_string); /* @@ -40466,22 +43069,13 @@ static mp_obj_t mp_lv_subject_init_group(size_t mp_n_args, const mp_obj_t *mp_ar static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_init_group_mpobj, 3, mp_lv_subject_init_group, lv_subject_init_group); +/* Reusing lv_subject_init_group for lv_subject_set_group_list_static */ -/* - * lvgl extension definition for: - * void lv_subject_deinit(lv_subject_t *subject) - */ - -static mp_obj_t mp_lv_subject_deinit(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); - ((void (*)(lv_subject_t *))lv_func_ptr)(subject); - return mp_const_none; -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_set_group_list_static_mpobj, 3, mp_lv_subject_init_group, lv_subject_set_group_list_static); + +/* Reusing lv_subject_delete for lv_subject_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_deinit_mpobj, 1, mp_lv_subject_deinit, lv_subject_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_deinit_mpobj, 1, mp_lv_subject_delete, lv_subject_deinit); /* @@ -40608,13 +43202,14 @@ static mp_obj_t mp_lv_subject_add_observer_with_target(size_t mp_n_args, const m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_add_observer_with_target_mpobj, 4, mp_lv_subject_add_observer_with_target, lv_subject_add_observer_with_target); -/* Reusing lv_subject_deinit for lv_subject_notify */ +/* Reusing lv_subject_delete for lv_subject_notify */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_notify_mpobj, 1, mp_lv_subject_deinit, lv_subject_notify); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_notify_mpobj, 1, mp_lv_subject_delete, lv_subject_notify); static const mp_rom_map_elem_t mp_lv_subject_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_subject_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_subject_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_int), MP_ROM_PTR(&mp_lv_subject_init_int_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_int), MP_ROM_PTR(&mp_lv_subject_set_int_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_int), MP_ROM_PTR(&mp_lv_subject_get_int_mpobj) }, @@ -40628,7 +43223,8 @@ static const mp_rom_map_elem_t mp_lv_subject_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_min_value_float), MP_ROM_PTR(&mp_lv_subject_set_min_value_float_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_max_value_float), MP_ROM_PTR(&mp_lv_subject_set_max_value_float_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_string), MP_ROM_PTR(&mp_lv_subject_init_string_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy_string), MP_ROM_PTR(&mp_lv_subject_copy_string_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_string_buffer_static), MP_ROM_PTR(&mp_lv_subject_set_string_buffer_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_string), MP_ROM_PTR(&mp_lv_subject_set_string_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_string), MP_ROM_PTR(&mp_lv_subject_get_string_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_previous_string), MP_ROM_PTR(&mp_lv_subject_get_previous_string_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_pointer), MP_ROM_PTR(&mp_lv_subject_init_pointer_mpobj) }, @@ -40640,6 +43236,7 @@ static const mp_rom_map_elem_t mp_lv_subject_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_color), MP_ROM_PTR(&mp_lv_subject_get_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_previous_color), MP_ROM_PTR(&mp_lv_subject_get_previous_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_group), MP_ROM_PTR(&mp_lv_subject_init_group_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_group_list_static), MP_ROM_PTR(&mp_lv_subject_set_group_list_static_mpobj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&mp_lv_subject_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_group_element), MP_ROM_PTR(&mp_lv_subject_get_group_element_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_observer), MP_ROM_PTR(&mp_lv_subject_add_observer_mpobj) }, @@ -41297,6 +43894,14 @@ static const mp_rom_map_elem_t mp_lv_group_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_group_t_locals_dict, mp_lv_group_t_locals_dict_table); +static const mp_rom_map_elem_t mp_lv_delete_dsc_t_locals_dict_table[] = { + + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_delete_dsc_t_locals_dict, mp_lv_delete_dsc_t_locals_dict_table); + + /* * lvgl extension definition for: * void lv_anim_timeline_delete(lv_anim_timeline_t *at) @@ -41349,6 +43954,10 @@ static mp_obj_t mp_lv_anim_timeline_start(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_timeline_start_mpobj, 1, mp_lv_anim_timeline_start, lv_anim_timeline_start); +/* Reusing lv_anim_timeline_start for lv_anim_timeline_restart */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_timeline_restart_mpobj, 1, mp_lv_anim_timeline_start, lv_anim_timeline_restart); + /* Reusing lv_anim_timeline_delete for lv_anim_timeline_pause */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_timeline_pause_mpobj, 1, mp_lv_anim_timeline_delete, lv_anim_timeline_pause); @@ -41525,6 +44134,7 @@ static const mp_rom_map_elem_t mp_lv_anim_timeline_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_anim_timeline_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_anim_timeline_add_mpobj) }, { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_timeline_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_restart), MP_ROM_PTR(&mp_lv_anim_timeline_restart_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_timeline_pause_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_reverse), MP_ROM_PTR(&mp_lv_anim_timeline_set_reverse_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_timeline_set_delay_mpobj) }, @@ -41562,6 +44172,14 @@ static const mp_rom_map_elem_t mp_lv_subject_increment_dsc_t_locals_dict_table[] static MP_DEFINE_CONST_DICT(mp_lv_subject_increment_dsc_t_locals_dict, mp_lv_subject_increment_dsc_t_locals_dict_table); +static const mp_rom_map_elem_t mp_lv_obj_spec_attr_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_spec_attr_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_obj_spec_attr_t_locals_dict, mp_lv_obj_spec_attr_t_locals_dict_table); + + static const mp_rom_map_elem_t mp_lv_obj_style_transition_dsc_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_style_transition_dsc_t))) }, @@ -41762,1021 +44380,1140 @@ static const mp_rom_map_elem_t mp_lv_fs_file_cache_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_fs_file_cache_t_locals_dict, mp_lv_fs_file_cache_t_locals_dict_table); +/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_destroy */ -static const mp_rom_map_elem_t mp_lv_image_cache_data_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_cache_data_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_destroy_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_destroy); -}; +/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire */ -static MP_DEFINE_CONST_DICT(mp_lv_image_cache_data_t_locals_dict, mp_lv_image_cache_data_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire); + +/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire_or_create */ -static const mp_rom_map_elem_t mp_lv_cache_slot_size_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_slot_size_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_or_create_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire_or_create); -}; +/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_add */ -static MP_DEFINE_CONST_DICT(mp_lv_cache_slot_size_t_locals_dict, mp_lv_cache_slot_size_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_add_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_add); + +/* Reusing funcptr_lv_cache_remove_cb_t for lv_cache_release */ -static const mp_rom_map_elem_t mp_lv_calendar_date_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_calendar_date_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_release_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, lv_cache_release); -}; -static MP_DEFINE_CONST_DICT(mp_lv_calendar_date_t_locals_dict, mp_lv_calendar_date_t_locals_dict_table); - +/* + * lvgl extension definition for: + * void lv_cache_reserve(lv_cache_t *cache, uint32_t reserved_size, void *user_data) + */ -static const mp_rom_map_elem_t mp_lv_chart_series_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_series_t))) }, - -}; +static mp_obj_t mp_lv_cache_reserve(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + uint32_t reserved_size = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, uint32_t, void *))lv_func_ptr)(cache, reserved_size, user_data); + return mp_const_none; +} -static MP_DEFINE_CONST_DICT(mp_lv_chart_series_t_locals_dict, mp_lv_chart_series_t_locals_dict_table); - + -static const mp_rom_map_elem_t mp_lv_chart_cursor_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_cursor_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_reserve_mpobj, 3, mp_lv_cache_reserve, lv_cache_reserve); -}; +/* Reusing funcptr_lv_cache_drop_cb_t for lv_cache_drop */ -static MP_DEFINE_CONST_DICT(mp_lv_chart_cursor_t_locals_dict, mp_lv_chart_cursor_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, lv_cache_drop); + +/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_drop_all */ -static const mp_rom_map_elem_t mp_lv_scale_section_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_scale_section_t))) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_all_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_drop_all); -}; -static MP_DEFINE_CONST_DICT(mp_lv_scale_section_t_locals_dict, mp_lv_scale_section_t_locals_dict_table); - +/* + * lvgl extension definition for: + * bool lv_cache_evict_one(lv_cache_t *cache, void *user_data) + */ + +static mp_obj_t mp_lv_cache_evict_one(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + bool _res = ((bool (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_evict_one_mpobj, 2, mp_lv_cache_evict_one, lv_cache_evict_one); + /* * lvgl extension definition for: - * void lv_span_set_text(lv_span_t *span, const char *text) + * void lv_cache_set_max_size(lv_cache_t *cache, size_t max_size, void *user_data) */ -static mp_obj_t mp_lv_span_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_set_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); - const char *text = (const char *)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_span_t *, const char *))lv_func_ptr)(span, text); + void *user_data = mp_to_ptr(mp_args[2]); + size_t max_size = (size_t)mp_obj_get_int(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, size_t, void *))lv_func_ptr)(cache, max_size, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_mpobj, 2, mp_lv_span_set_text, lv_span_set_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_max_size_mpobj, 3, mp_lv_cache_set_max_size, lv_cache_set_max_size); + + +/* + * lvgl extension definition for: + * size_t lv_cache_get_max_size(lv_cache_t *cache, void *user_data) + */ + +static mp_obj_t mp_lv_cache_get_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + size_t _res = ((size_t (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return mp_obj_new_int_from_uint(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_max_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_max_size); + +/* Reusing lv_cache_get_max_size for lv_cache_get_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_size); + +/* Reusing lv_cache_get_max_size for lv_cache_get_free_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_free_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_free_size); + +/* Reusing funcptr_lv_cache_init_cb_t for lv_cache_is_enabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_is_enabled_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, lv_cache_is_enabled); /* * Function NOT generated: - * Cannot convert ellipsis param - * void lv_span_set_text_fmt(lv_span_t *span, const char *fmt, ...) + * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * lv_cache_compare_cb_t compare_cb */ -/* Reusing lv_span_set_text for lv_span_set_text_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_static_mpobj, 2, mp_lv_span_set_text, lv_span_set_text_static); +/* + * lvgl extension definition for: + * void lv_cache_set_compare_cb(lv_cache_t *cache, lv_cache_compare_cb_t compare_cb, void *user_data) + */ + +static mp_obj_t mp_lv_cache_set_compare_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + lv_cache_compare_cb_t compare_cb = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_compare_cb_t, void *))lv_func_ptr)(cache, compare_cb, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_compare_cb_mpobj, 3, mp_lv_cache_set_compare_cb, lv_cache_set_compare_cb); +/* + * Callback function lv_cache_set_create_cb_alloc_cb + * bool lv_cache_create_cb_t(void *node, void *user_data) + */ + +GENMPY_UNUSED static bool lv_cache_set_create_cb_alloc_cb_callback(void *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_create_cb_alloc_cb)), 2, mp_args); + return mp_obj_is_true(callback_result); +} + + /* * lvgl extension definition for: - * lv_style_t *lv_span_get_style(lv_span_t *span) + * void lv_cache_set_create_cb(lv_cache_t *cache, lv_cache_create_cb_t alloc_cb, void *user_data) */ -static mp_obj_t mp_lv_span_get_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_set_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); - lv_style_t * _res = ((lv_style_t *(*)(lv_span_t *))lv_func_ptr)(span); - return mp_read_ptr_lv_style_t((void*)_res); + void *user_data = mp_to_ptr(mp_args[2]); + void *alloc_cb = mp_lv_callback(mp_args[1], &lv_cache_set_create_cb_alloc_cb_callback, MP_QSTR_lv_cache_set_create_cb_alloc_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_create_cb_t, void *))lv_func_ptr)(cache, alloc_cb, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_style_mpobj, 1, mp_lv_span_get_style, lv_span_get_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_create_cb_mpobj, 3, mp_lv_cache_set_create_cb, lv_cache_set_create_cb); +/* + * Callback function lv_cache_set_free_cb_free_cb + * void lv_cache_free_cb_t(void *node, void *user_data) + */ + +GENMPY_UNUSED static void lv_cache_set_free_cb_free_cb_callback(void *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_free_cb_free_cb)), 2, mp_args); + return; +} + + /* * lvgl extension definition for: - * const char *lv_span_get_text(lv_span_t *span) + * void lv_cache_set_free_cb(lv_cache_t *cache, lv_cache_free_cb_t free_cb, void *user_data) */ -static mp_obj_t mp_lv_span_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_set_free_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); - const char * _res = ((const char *(*)(lv_span_t *))lv_func_ptr)(span); + void *user_data = mp_to_ptr(mp_args[2]); + void *free_cb = mp_lv_callback(mp_args[1], &lv_cache_set_free_cb_free_cb_callback, MP_QSTR_lv_cache_set_free_cb_free_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_free_cb_t, void *))lv_func_ptr)(cache, free_cb, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_free_cb_mpobj, 3, mp_lv_cache_set_free_cb, lv_cache_set_free_cb); + + +/* + * lvgl extension definition for: + * void lv_cache_set_name(lv_cache_t *cache, const char *name) + */ + +static mp_obj_t mp_lv_cache_set_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + const char *name = (const char *)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_cache_t *, const char *))lv_func_ptr)(cache, name); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_name_mpobj, 2, mp_lv_cache_set_name, lv_cache_set_name); + + +/* + * lvgl extension definition for: + * const char *lv_cache_get_name(lv_cache_t *cache) + */ + +static mp_obj_t mp_lv_cache_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + const char * _res = ((const char *(*)(lv_cache_t *))lv_func_ptr)(cache); return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_text_mpobj, 1, mp_lv_span_get_text, lv_span_get_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_name_mpobj, 1, mp_lv_cache_get_name, lv_cache_get_name); +/* Reusing funcptr_lv_cache_iter_create_cb for lv_cache_iter_create */ -static const mp_rom_map_elem_t mp_lv_span_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_t))) }, - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_span_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_span_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_span_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style), MP_ROM_PTR(&mp_lv_span_get_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_span_get_text_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_iter_create_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, lv_cache_iter_create); + + +static const mp_rom_map_elem_t mp_lv_cache_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_t))) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_cache_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_acquire), MP_ROM_PTR(&mp_lv_cache_acquire_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_acquire_or_create), MP_ROM_PTR(&mp_lv_cache_acquire_or_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_cache_add_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release), MP_ROM_PTR(&mp_lv_cache_release_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reserve), MP_ROM_PTR(&mp_lv_cache_reserve_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_cache_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop_all), MP_ROM_PTR(&mp_lv_cache_drop_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_evict_one), MP_ROM_PTR(&mp_lv_cache_evict_one_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_size), MP_ROM_PTR(&mp_lv_cache_set_max_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_size), MP_ROM_PTR(&mp_lv_cache_get_max_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_cache_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_free_size), MP_ROM_PTR(&mp_lv_cache_get_free_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_enabled), MP_ROM_PTR(&mp_lv_cache_is_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_compare_cb), MP_ROM_PTR(&mp_lv_cache_set_compare_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_create_cb), MP_ROM_PTR(&mp_lv_cache_set_create_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_free_cb), MP_ROM_PTR(&mp_lv_cache_set_free_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_name), MP_ROM_PTR(&mp_lv_cache_set_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_name), MP_ROM_PTR(&mp_lv_cache_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_cache_iter_create_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_span_t_locals_dict, mp_lv_span_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_cache_t_locals_dict, mp_lv_cache_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_span_coords_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_coords_t))) }, +/* + * lvgl extension definition for: + * lv_cache_t *lv_cache_create(const lv_cache_class_t *cache_class, size_t node_size, size_t max_size, lv_cache_ops_t ops) + */ + +static mp_obj_t mp_lv_cache_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_cache_class_t *cache_class = (const lv_cache_class_t *)mp_write_ptr_lv_cache_class_t(mp_args[0]); + size_t node_size = (size_t)mp_obj_get_int(mp_args[1]); + size_t max_size = (size_t)mp_obj_get_int(mp_args[2]); + lv_cache_ops_t ops = mp_write_lv_cache_ops_t(mp_args[3]); + lv_cache_t * _res = ((lv_cache_t *(*)(const lv_cache_class_t *, size_t, size_t, lv_cache_ops_t))lv_func_ptr)(cache_class, node_size, max_size, ops); + return mp_read_ptr_lv_cache_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_create_mpobj, 4, mp_lv_cache_create, lv_cache_create); + + +static const mp_rom_map_elem_t mp_lv_cache_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_class_t))) }, + { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_cache_create_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_span_coords_t_locals_dict, mp_lv_span_coords_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_cache_class_t_locals_dict, mp_lv_cache_class_t_locals_dict_table); /* * lvgl extension definition for: - * lv_tree_node_t *lv_tree_node_create(const lv_tree_class_t *class_p, lv_tree_node_t *parent) + * const lv_cache_t *lv_cache_entry_get_cache(const lv_cache_entry_t *entry) */ -static mp_obj_t mp_lv_tree_node_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_write_ptr_lv_tree_class_t(mp_args[0]); - lv_tree_node_t *parent = mp_write_ptr_lv_tree_node_t(mp_args[1]); - lv_tree_node_t * _res = ((lv_tree_node_t *(*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, parent); - return mp_read_ptr_lv_tree_node_t((void*)_res); + const lv_cache_entry_t *entry = (const lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(mp_args[0]); + const lv_cache_t * _res = ((const lv_cache_t *(*)(const lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_read_ptr_lv_cache_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_create_mpobj, 2, mp_lv_tree_node_create, lv_tree_node_create); - - -static const mp_rom_map_elem_t mp_lv_tree_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_class_t))) }, - { MP_ROM_QSTR(MP_QSTR_node_create), MP_ROM_PTR(&mp_lv_tree_node_create_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_cache_mpobj, 1, mp_lv_cache_entry_get_cache, lv_cache_entry_get_cache); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_tree_class_t_locals_dict, mp_lv_tree_class_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_tree_node_delete(lv_tree_node_t *node) + * void lv_cache_entry_init(lv_cache_entry_t *entry, const lv_cache_t *cache, const uint32_t node_size) */ -static mp_obj_t mp_lv_tree_node_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[0]); - ((void (*)(lv_tree_node_t *))lv_func_ptr)(node); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_cache_entry_t *, const lv_cache_t *, const uint32_t))lv_func_ptr)(entry, cache, node_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_delete_mpobj, 1, mp_lv_tree_node_delete, lv_tree_node_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_init_mpobj, 3, mp_lv_cache_entry_init, lv_cache_entry_init); /* - * Callback function lv_tree_walk_cb - * bool lv_tree_traverse_cb_t(const lv_tree_node_t *node, void *user_data) + * lvgl extension definition for: + * void lv_cache_entry_delete(lv_cache_entry_t *entry) */ -GENMPY_UNUSED static bool lv_tree_walk_cb_callback(const lv_tree_node_t *arg0, void *arg1) +static mp_obj_t mp_lv_cache_entry_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_cb)), 2, mp_args); - return mp_obj_is_true(callback_result); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + ((void (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_delete_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_delete); + /* - * Callback function lv_tree_walk_bcb - * bool lv_tree_before_cb_t(const lv_tree_node_t *node, void *user_data) + * lvgl extension definition for: + * int32_t lv_cache_entry_get_ref(lv_cache_entry_t *entry) */ -GENMPY_UNUSED static bool lv_tree_walk_bcb_callback(const lv_tree_node_t *arg0, void *arg1) +static mp_obj_t mp_lv_cache_entry_get_ref(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_bcb)), 2, mp_args); - return mp_obj_is_true(callback_result); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_ref_mpobj, 1, mp_lv_cache_entry_get_ref, lv_cache_entry_get_ref); + /* - * Callback function lv_tree_walk_acb - * void lv_tree_after_cb_t(const lv_tree_node_t *node, void *user_data) + * lvgl extension definition for: + * uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t *entry) */ -GENMPY_UNUSED static void lv_tree_walk_acb_callback(const lv_tree_node_t *arg0, void *arg1) +static mp_obj_t mp_lv_cache_entry_get_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_acb)), 2, mp_args); - return; + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_obj_new_int_from_uint(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_node_size_mpobj, 1, mp_lv_cache_entry_get_node_size, lv_cache_entry_get_node_size); + /* * lvgl extension definition for: - * bool lv_tree_walk(const lv_tree_node_t *node, lv_tree_walk_mode_t mode, lv_tree_traverse_cb_t cb, lv_tree_before_cb_t bcb, lv_tree_after_cb_t acb, void *user_data) + * bool lv_cache_entry_is_invalid(lv_cache_entry_t *entry) */ -static mp_obj_t mp_lv_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_is_invalid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - lv_tree_walk_mode_t mode = (uint8_t)mp_obj_get_int(mp_args[1]); - void *cb = mp_lv_callback(mp_args[2], &lv_tree_walk_cb_callback, MP_QSTR_lv_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - void *bcb = mp_lv_callback(mp_args[3], &lv_tree_walk_bcb_callback, MP_QSTR_lv_tree_walk_bcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - void *acb = mp_lv_callback(mp_args[4], &lv_tree_walk_acb_callback, MP_QSTR_lv_tree_walk_acb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - const lv_tree_node_t *node = (const lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(mp_args[0]); - bool _res = ((bool (*)(const lv_tree_node_t *, lv_tree_walk_mode_t, lv_tree_traverse_cb_t, lv_tree_before_cb_t, lv_tree_after_cb_t, void *))lv_func_ptr)(node, mode, cb, bcb, acb, user_data); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + bool _res = ((bool (*)(lv_cache_entry_t *))lv_func_ptr)(entry); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_walk_mpobj, 6, mp_lv_tree_walk, lv_tree_walk); - - -static const mp_rom_map_elem_t mp_lv_tree_node_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_node_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_tree_node_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_walk), MP_ROM_PTR(&mp_lv_tree_walk_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_tree_node_t_locals_dict, mp_lv_tree_node_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp__lv_mp_int_wrapper_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(_lv_mp_int_wrapper))) }, - -}; - -static MP_DEFINE_CONST_DICT(mp__lv_mp_int_wrapper_locals_dict, mp__lv_mp_int_wrapper_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_font_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_class_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_is_invalid_mpobj, 1, mp_lv_cache_entry_is_invalid, lv_cache_entry_is_invalid); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_class_t_locals_dict, mp_lv_font_class_t_locals_dict_table); - /* * lvgl extension definition for: - * bool lv_font_info_is_equal(const lv_font_info_t *ft_info_1, const lv_font_info_t *ft_info_2) + * void *lv_cache_entry_get_data(lv_cache_entry_t *entry) */ -static mp_obj_t mp_lv_font_info_is_equal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_info_t *ft_info_1 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); - const lv_font_info_t *ft_info_2 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[1]); - bool _res = ((bool (*)(const lv_font_info_t *, const lv_font_info_t *))lv_func_ptr)(ft_info_1, ft_info_2); - return convert_to_bool(_res); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + void * _res = ((void *(*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_info_is_equal_mpobj, 2, mp_lv_font_info_is_equal, lv_font_info_is_equal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_get_data); +/* Reusing lv_cache_entry_delete for lv_cache_entry_reset_ref */ -static const mp_rom_map_elem_t mp_lv_font_info_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_info_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_font_info_is_equal_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_reset_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_reset_ref); -}; +/* Reusing lv_cache_entry_delete for lv_cache_entry_inc_ref */ -static MP_DEFINE_CONST_DICT(mp_lv_font_info_t_locals_dict, mp_lv_font_info_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_inc_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_inc_ref); + +/* Reusing lv_cache_entry_delete for lv_cache_entry_dec_ref */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_dec_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_dec_ref); + /* * lvgl extension definition for: - * inline static lv_color_t lv_color16_to_color(lv_color16_t c) + * void lv_cache_entry_set_node_size(lv_cache_entry_t *entry, uint32_t node_size) */ -static mp_obj_t mp_lv_color16_to_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_set_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color16_t c = mp_write_lv_color16_t(mp_args[0]); - lv_color_t _res = ((lv_color_t (*)(lv_color16_t))lv_func_ptr)(c); - return mp_read_lv_color_t(_res); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint32_t node_size = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_cache_entry_t *, uint32_t))lv_func_ptr)(entry, node_size); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_to_color_mpobj, 1, mp_lv_color16_to_color, lv_color16_to_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_node_size_mpobj, 2, mp_lv_cache_entry_set_node_size, lv_cache_entry_set_node_size); /* * lvgl extension definition for: - * void lv_color16_premultiply(lv_color16_t *c, lv_opa_t a) + * void lv_cache_entry_set_cache(lv_cache_entry_t *entry, const lv_cache_t *cache) */ -static mp_obj_t mp_lv_color16_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_set_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color16_t *c = mp_write_ptr_lv_color16_t(mp_args[0]); - lv_opa_t a = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_color16_t *, lv_opa_t))lv_func_ptr)(c, a); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); + ((void (*)(lv_cache_entry_t *, const lv_cache_t *))lv_func_ptr)(entry, cache); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_premultiply_mpobj, 2, mp_lv_color16_premultiply, lv_color16_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_cache_mpobj, 2, mp_lv_cache_entry_set_cache, lv_cache_entry_set_cache); + +/* Reusing lv_cache_entry_get_data for lv_cache_entry_acquire_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_acquire_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_acquire_data); /* * lvgl extension definition for: - * uint8_t lv_color16_luminance(const lv_color16_t c) + * void lv_cache_entry_release_data(lv_cache_entry_t *entry, void *user_data) */ -static mp_obj_t mp_lv_color16_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_release_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_color16_t c = (const lv_color16_t)mp_write_lv_color16_t(mp_args[0]); - uint8_t _res = ((uint8_t (*)(const lv_color16_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + ((void (*)(lv_cache_entry_t *, void *))lv_func_ptr)(entry, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_luminance_mpobj, 1, mp_lv_color16_luminance, lv_color16_luminance); - - -static const mp_rom_map_elem_t mp_lv_color16_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color16_t))) }, - { MP_ROM_QSTR(MP_QSTR_to_color), MP_ROM_PTR(&mp_lv_color16_to_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_color16_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color16_luminance_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_release_data_mpobj, 2, mp_lv_cache_entry_release_data, lv_cache_entry_release_data); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_color16_t_locals_dict, mp_lv_color16_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_mem_monitor_core(lv_mem_monitor_t *mon_p) + * void lv_cache_entry_set_flag(lv_cache_entry_t *entry, uint8_t flags) */ -static mp_obj_t mp_lv_mem_monitor_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_mem_monitor_t *mon_p = mp_write_ptr_lv_mem_monitor_t(mp_args[0]); - ((void (*)(lv_mem_monitor_t *))lv_func_ptr)(mon_p); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_core_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor_core); - -/* Reusing lv_mem_monitor_core for lv_mem_monitor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor); - - -static const mp_rom_map_elem_t mp_lv_mem_monitor_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_mem_monitor_t))) }, - { MP_ROM_QSTR(MP_QSTR_core), MP_ROM_PTR(&mp_lv_mem_monitor_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_monitor), MP_ROM_PTR(&mp_lv_mem_monitor_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_set_flag); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_mem_monitor_t_locals_dict, mp_lv_mem_monitor_t_locals_dict_table); - +/* Reusing lv_cache_entry_set_flag for lv_cache_entry_remove_flag */ -/* - * Function NOT generated: - * Callback function 'lv_rb_compare_t compare' must receive a struct pointer with user_data member as its first argument! - * lv_rb_compare_t compare - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_remove_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_remove_flag); /* * lvgl extension definition for: - * bool lv_rb_init(lv_rb_t *tree, lv_rb_compare_t compare, size_t node_size) + * bool lv_cache_entry_has_flag(lv_cache_entry_t *entry, uint8_t flags) */ -static mp_obj_t mp_lv_rb_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_compare_t compare = mp_to_ptr(mp_args[1]); - size_t node_size = (size_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_rb_t *, lv_rb_compare_t, size_t))lv_func_ptr)(tree, compare, node_size); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_init_mpobj, 3, mp_lv_rb_init, lv_rb_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_has_flag_mpobj, 2, mp_lv_cache_entry_has_flag, lv_cache_entry_has_flag); + + +static const mp_rom_map_elem_t mp_lv_cache_entry_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_entry_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_cache), MP_ROM_PTR(&mp_lv_cache_entry_get_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_cache_entry_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_cache_entry_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ref), MP_ROM_PTR(&mp_lv_cache_entry_get_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_node_size), MP_ROM_PTR(&mp_lv_cache_entry_get_node_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_invalid), MP_ROM_PTR(&mp_lv_cache_entry_is_invalid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_data), MP_ROM_PTR(&mp_lv_cache_entry_get_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset_ref), MP_ROM_PTR(&mp_lv_cache_entry_reset_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_inc_ref), MP_ROM_PTR(&mp_lv_cache_entry_inc_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dec_ref), MP_ROM_PTR(&mp_lv_cache_entry_dec_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_node_size), MP_ROM_PTR(&mp_lv_cache_entry_set_node_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cache), MP_ROM_PTR(&mp_lv_cache_entry_set_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_acquire_data), MP_ROM_PTR(&mp_lv_cache_entry_acquire_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_data), MP_ROM_PTR(&mp_lv_cache_entry_release_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_cache_entry_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_flag), MP_ROM_PTR(&mp_lv_cache_entry_remove_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_cache_entry_has_flag_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_cache_entry_t_locals_dict, mp_lv_cache_entry_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_insert(lv_rb_t *tree, void *key) + * void *lv_iter_get_context(const lv_iter_t *iter) */ -static mp_obj_t mp_lv_rb_insert(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_get_context(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - void *key = mp_to_ptr(mp_args[1]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, void *))lv_func_ptr)(tree, key); - return mp_read_ptr_lv_rb_node_t((void*)_res); + const lv_iter_t *iter = (const lv_iter_t *)mp_write_ptr_lv_iter_t(mp_args[0]); + void * _res = ((void *(*)(const lv_iter_t *))lv_func_ptr)(iter); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_insert_mpobj, 2, mp_lv_rb_insert, lv_rb_insert); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_get_context_mpobj, 1, mp_lv_iter_get_context, lv_iter_get_context); /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_find(lv_rb_t *tree, const void *key) + * void lv_iter_destroy(lv_iter_t *iter) */ -static mp_obj_t mp_lv_rb_find(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); - return mp_read_ptr_lv_rb_node_t((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + ((void (*)(lv_iter_t *))lv_func_ptr)(iter); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_find_mpobj, 2, mp_lv_rb_find, lv_rb_find); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_destroy_mpobj, 1, mp_lv_iter_destroy, lv_iter_destroy); /* * lvgl extension definition for: - * void *lv_rb_remove_node(lv_rb_t *tree, lv_rb_node_t *node) + * lv_result_t lv_iter_next(lv_iter_t *iter, void *elem) */ -static mp_obj_t mp_lv_rb_remove_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); - void * _res = ((void *(*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); - return ptr_to_mp((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + void *elem = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_func_ptr)(iter, elem); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_node_mpobj, 2, mp_lv_rb_remove_node, lv_rb_remove_node); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_next_mpobj, 2, mp_lv_iter_next, lv_iter_next); /* * lvgl extension definition for: - * void *lv_rb_remove(lv_rb_t *tree, const void *key) + * void lv_iter_make_peekable(lv_iter_t *iter, uint32_t capacity) */ -static mp_obj_t mp_lv_rb_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_make_peekable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - void * _res = ((void *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); - return ptr_to_mp((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_iter_t *, uint32_t))lv_func_ptr)(iter, capacity); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_mpobj, 2, mp_lv_rb_remove, lv_rb_remove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_make_peekable_mpobj, 2, mp_lv_iter_make_peekable, lv_iter_make_peekable); + +/* Reusing lv_iter_next for lv_iter_peek */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_mpobj, 2, mp_lv_iter_next, lv_iter_peek); /* * lvgl extension definition for: - * bool lv_rb_drop_node(lv_rb_t *tree, lv_rb_node_t *node) + * lv_result_t lv_iter_peek_advance(lv_iter_t *iter) */ -static mp_obj_t mp_lv_rb_drop_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_peek_advance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); - bool _res = ((bool (*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); - return convert_to_bool(_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_iter_t *))lv_func_ptr)(iter); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_node_mpobj, 2, mp_lv_rb_drop_node, lv_rb_drop_node); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_advance_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_advance); + +/* Reusing lv_iter_peek_advance for lv_iter_peek_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_reset_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_reset); /* - * lvgl extension definition for: - * bool lv_rb_drop(lv_rb_t *tree, const void *key) + * Function NOT generated: + * Callback function 'lv_iter_inspect_cb inspect_cb' must receive a struct pointer with user_data member as its first argument! + * lv_iter_inspect_cb inspect_cb */ + +#define funcptr_lv_iter_inspect_cb NULL -static mp_obj_t mp_lv_rb_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - bool _res = ((bool (*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); - return convert_to_bool(_res); -} - - +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_iter_inspect_cb */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_mpobj, 2, mp_lv_rb_drop, lv_rb_drop); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_inspect_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_iter_inspect_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_inspect_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_inspect_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_minimum(lv_rb_t *node) + * void lv_iter_inspect(lv_iter_t *iter, lv_iter_inspect_cb inspect_cb) */ -static mp_obj_t mp_lv_rb_minimum(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_inspect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *node = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_func_ptr)(node); - return mp_read_ptr_lv_rb_node_t((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + lv_iter_inspect_cb inspect_cb = mp_to_ptr(mp_args[1]); + ((void (*)(lv_iter_t *, lv_iter_inspect_cb))lv_func_ptr)(iter, inspect_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_mpobj, 1, mp_lv_rb_minimum, lv_rb_minimum); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_inspect_mpobj, 2, mp_lv_iter_inspect, lv_iter_inspect); -/* Reusing lv_rb_minimum for lv_rb_maximum */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_mpobj, 1, mp_lv_rb_minimum, lv_rb_maximum); +static const mp_rom_map_elem_t mp_lv_iter_t_locals_dict_table[] = { + + { MP_ROM_QSTR(MP_QSTR_get_context), MP_ROM_PTR(&mp_lv_iter_get_context_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_iter_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_next), MP_ROM_PTR(&mp_lv_iter_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_make_peekable), MP_ROM_PTR(&mp_lv_iter_make_peekable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_iter_peek_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek_advance), MP_ROM_PTR(&mp_lv_iter_peek_advance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek_reset), MP_ROM_PTR(&mp_lv_iter_peek_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_inspect), MP_ROM_PTR(&mp_lv_iter_inspect_mpobj) }, +}; -/* - * lvgl extension definition for: - * void lv_rb_destroy(lv_rb_t *tree) - */ +static MP_DEFINE_CONST_DICT(mp_lv_iter_t_locals_dict, mp_lv_iter_t_locals_dict_table); + -static mp_obj_t mp_lv_rb_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - ((void (*)(lv_rb_t *))lv_func_ptr)(tree); - return mp_const_none; -} +static const mp_rom_map_elem_t mp_lv_cache_ops_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_ops_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_cache_ops_t_locals_dict, mp_lv_cache_ops_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_destroy_mpobj, 1, mp_lv_rb_destroy, lv_rb_destroy); +static const mp_rom_map_elem_t mp_lv_image_cache_data_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_cache_data_t))) }, +}; -static const mp_rom_map_elem_t mp_lv_rb_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_rb_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_insert), MP_ROM_PTR(&mp_lv_rb_insert_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_find), MP_ROM_PTR(&mp_lv_rb_find_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_node), MP_ROM_PTR(&mp_lv_rb_remove_node_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_rb_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop_node), MP_ROM_PTR(&mp_lv_rb_drop_node_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_rb_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_minimum), MP_ROM_PTR(&mp_lv_rb_minimum_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_maximum), MP_ROM_PTR(&mp_lv_rb_maximum_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_rb_destroy_mpobj) }, +static MP_DEFINE_CONST_DICT(mp_lv_image_cache_data_t_locals_dict, mp_lv_image_cache_data_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_cache_slot_size_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_slot_size_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_rb_t_locals_dict, mp_lv_rb_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_cache_slot_size_t_locals_dict, mp_lv_cache_slot_size_t_locals_dict_table); -/* - * lvgl extension definition for: - * lv_rb_node_t *lv_rb_minimum_from(lv_rb_node_t *node) - */ - -static mp_obj_t mp_lv_rb_minimum_from(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[0]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_func_ptr)(node); - return mp_read_ptr_lv_rb_node_t((void*)_res); -} +static const mp_rom_map_elem_t mp_lv_calendar_date_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_calendar_date_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_calendar_date_t_locals_dict, mp_lv_calendar_date_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_minimum_from); +static const mp_rom_map_elem_t mp_lv_chart_series_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_series_t))) }, -/* Reusing lv_rb_minimum_from for lv_rb_maximum_from */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_maximum_from); +static MP_DEFINE_CONST_DICT(mp_lv_chart_series_t_locals_dict, mp_lv_chart_series_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_chart_cursor_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_cursor_t))) }, +}; -static const mp_rom_map_elem_t mp_lv_rb_node_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_node_t))) }, - { MP_ROM_QSTR(MP_QSTR_minimum_from), MP_ROM_PTR(&mp_lv_rb_minimum_from_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_maximum_from), MP_ROM_PTR(&mp_lv_rb_maximum_from_mpobj) }, +static MP_DEFINE_CONST_DICT(mp_lv_chart_cursor_t_locals_dict, mp_lv_chart_cursor_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_scale_section_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_scale_section_t))) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_rb_node_t_locals_dict, mp_lv_rb_node_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_scale_section_t_locals_dict, mp_lv_scale_section_t_locals_dict_table); /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_resize(lv_circle_buf_t *circle_buf, uint32_t capacity) + * void lv_span_set_text(lv_span_t *span, const char *text) */ -static mp_obj_t mp_lv_circle_buf_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_span_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, uint32_t))lv_func_ptr)(circle_buf, capacity); - return mp_obj_new_int(_res); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); + const char *text = (const char *)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_span_t *, const char *))lv_func_ptr)(span, text); + return mp_const_none; } - + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_mpobj, 2, mp_lv_span_set_text, lv_span_set_text); + + +/* + * Function NOT generated: + * Cannot convert ellipsis param + * void lv_span_set_text_fmt(lv_span_t *span, const char *fmt, ...) + */ + +/* Reusing lv_span_set_text for lv_span_set_text_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_resize_mpobj, 2, mp_lv_circle_buf_resize, lv_circle_buf_resize); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_static_mpobj, 2, mp_lv_span_set_text, lv_span_set_text_static); /* * lvgl extension definition for: - * void lv_circle_buf_destroy(lv_circle_buf_t *circle_buf) + * lv_style_t *lv_span_get_style(lv_span_t *span) */ -static mp_obj_t mp_lv_circle_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_span_get_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - ((void (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return mp_const_none; + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); + lv_style_t * _res = ((lv_style_t *(*)(lv_span_t *))lv_func_ptr)(span); + return mp_read_ptr_lv_style_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_destroy_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_style_mpobj, 1, mp_lv_span_get_style, lv_span_get_style); /* * lvgl extension definition for: - * uint32_t lv_circle_buf_size(const lv_circle_buf_t *circle_buf) + * const char *lv_span_get_text(lv_span_t *span) */ -static mp_obj_t mp_lv_circle_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_span_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return mp_obj_new_int_from_uint(_res); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); + const char * _res = ((const char *(*)(lv_span_t *))lv_func_ptr)(span); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_size_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_size); - -/* Reusing lv_circle_buf_size for lv_circle_buf_capacity */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_capacity_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_capacity); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_text_mpobj, 1, mp_lv_span_get_text, lv_span_get_text); -/* Reusing lv_circle_buf_size for lv_circle_buf_remain */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_remain_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_remain); +static const mp_rom_map_elem_t mp_lv_span_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_t))) }, + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_span_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_span_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style), MP_ROM_PTR(&mp_lv_span_get_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_span_get_text_mpobj) }, +}; -/* - * lvgl extension definition for: - * bool lv_circle_buf_is_empty(const lv_circle_buf_t *circle_buf) - */ +static MP_DEFINE_CONST_DICT(mp_lv_span_t_locals_dict, mp_lv_span_t_locals_dict_table); + -static mp_obj_t mp_lv_circle_buf_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - bool _res = ((bool (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return convert_to_bool(_res); -} +static const mp_rom_map_elem_t mp_lv_span_coords_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_coords_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_span_coords_t_locals_dict, mp_lv_span_coords_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_empty_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_empty); +static const mp_rom_map_elem_t mp__lv_mp_int_wrapper_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(_lv_mp_int_wrapper))) }, -/* Reusing lv_circle_buf_is_empty for lv_circle_buf_is_full */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_full_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_full); - -/* Reusing lv_circle_buf_destroy for lv_circle_buf_reset */ +static MP_DEFINE_CONST_DICT(mp__lv_mp_int_wrapper_locals_dict, mp__lv_mp_int_wrapper_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_reset_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_reset); +static const mp_rom_map_elem_t mp_lv_font_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_class_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_font_class_t_locals_dict, mp_lv_font_class_t_locals_dict_table); + /* * lvgl extension definition for: - * void *lv_circle_buf_head(const lv_circle_buf_t *circle_buf) + * bool lv_font_info_is_equal(const lv_font_info_t *ft_info_1, const lv_font_info_t *ft_info_2) */ -static mp_obj_t mp_lv_circle_buf_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_info_is_equal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - void * _res = ((void *(*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return ptr_to_mp((void*)_res); + const lv_font_info_t *ft_info_1 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); + const lv_font_info_t *ft_info_2 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[1]); + bool _res = ((bool (*)(const lv_font_info_t *, const lv_font_info_t *))lv_func_ptr)(ft_info_1, ft_info_2); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_head_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_head); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_info_is_equal_mpobj, 2, mp_lv_font_info_is_equal, lv_font_info_is_equal); -/* Reusing lv_circle_buf_head for lv_circle_buf_tail */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_tail_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_tail); +static const mp_rom_map_elem_t mp_lv_font_info_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_info_t))) }, + { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_font_info_is_equal_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_font_info_t_locals_dict, mp_lv_font_info_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_read(lv_circle_buf_t *circle_buf, void *data) + * lv_tree_node_t *lv_tree_node_create(const lv_tree_class_t *class_p, lv_tree_node_t *parent) */ -static mp_obj_t mp_lv_circle_buf_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tree_node_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - void *data = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); - return mp_obj_new_int(_res); + const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_write_ptr_lv_tree_class_t(mp_args[0]); + lv_tree_node_t *parent = mp_write_ptr_lv_tree_node_t(mp_args[1]); + lv_tree_node_t * _res = ((lv_tree_node_t *(*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, parent); + return mp_read_ptr_lv_tree_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_read_mpobj, 2, mp_lv_circle_buf_read, lv_circle_buf_read); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_create_mpobj, 2, mp_lv_tree_node_create, lv_tree_node_create); +static const mp_rom_map_elem_t mp_lv_tree_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_class_t))) }, + { MP_ROM_QSTR(MP_QSTR_node_create), MP_ROM_PTR(&mp_lv_tree_node_create_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_tree_class_t_locals_dict, mp_lv_tree_class_t_locals_dict_table); + + /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_write(lv_circle_buf_t *circle_buf, const void *data) + * void lv_tree_node_delete(lv_tree_node_t *node) */ -static mp_obj_t mp_lv_circle_buf_write(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tree_node_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - const void *data = (const void *)mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, const void *))lv_func_ptr)(circle_buf, data); - return mp_obj_new_int(_res); + lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[0]); + ((void (*)(lv_tree_node_t *))lv_func_ptr)(node); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_write_mpobj, 2, mp_lv_circle_buf_write, lv_circle_buf_write); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_delete_mpobj, 1, mp_lv_tree_node_delete, lv_tree_node_delete); /* - * Callback function lv_circle_buf_fill_fill_cb - * bool lv_circle_buf_fill_cb_t(void *buf, uint32_t buff_len, int32_t index, void *user_data) + * Callback function lv_tree_walk_cb + * bool lv_tree_traverse_cb_t(const lv_tree_node_t *node, void *user_data) */ -GENMPY_UNUSED static bool lv_circle_buf_fill_fill_cb_callback(void *arg0, uint32_t arg1, int32_t arg2, void *arg3) +GENMPY_UNUSED static bool lv_tree_walk_cb_callback(const lv_tree_node_t *arg0, void *arg1) { - mp_obj_t mp_args[4]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_args[1] = mp_obj_new_int_from_uint(arg1); - mp_args[2] = mp_obj_new_int(arg2); - mp_args[3] = ptr_to_mp((void*)arg3); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg3); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_circle_buf_fill_fill_cb)), 4, mp_args); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_cb)), 2, mp_args); return mp_obj_is_true(callback_result); } /* - * lvgl extension definition for: - * uint32_t lv_circle_buf_fill(lv_circle_buf_t *circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, void *user_data) - */ - -static mp_obj_t mp_lv_circle_buf_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *user_data = mp_to_ptr(mp_args[3]); - uint32_t count = (uint32_t)mp_obj_get_int(mp_args[1]); - void *fill_cb = mp_lv_callback(mp_args[2], &lv_circle_buf_fill_fill_cb_callback, MP_QSTR_lv_circle_buf_fill_fill_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_circle_buf_t *, uint32_t, lv_circle_buf_fill_cb_t, void *))lv_func_ptr)(circle_buf, count, fill_cb, user_data); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_fill_mpobj, 4, mp_lv_circle_buf_fill, lv_circle_buf_fill); - - -/* - * lvgl extension definition for: - * lv_result_t lv_circle_buf_skip(lv_circle_buf_t *circle_buf) + * Callback function lv_tree_walk_bcb + * bool lv_tree_before_cb_t(const lv_tree_node_t *node, void *user_data) */ -static mp_obj_t mp_lv_circle_buf_skip(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static bool lv_tree_walk_bcb_callback(const lv_tree_node_t *arg0, void *arg1) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return mp_obj_new_int(_res); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_bcb)), 2, mp_args); + return mp_obj_is_true(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_skip_mpobj, 1, mp_lv_circle_buf_skip, lv_circle_buf_skip); - /* - * lvgl extension definition for: - * lv_result_t lv_circle_buf_peek(const lv_circle_buf_t *circle_buf, void *data) + * Callback function lv_tree_walk_acb + * void lv_tree_after_cb_t(const lv_tree_node_t *node, void *user_data) */ -static mp_obj_t mp_lv_circle_buf_peek(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_tree_walk_acb_callback(const lv_tree_node_t *arg0, void *arg1) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - void *data = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); - return mp_obj_new_int(_res); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_acb)), 2, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_mpobj, 2, mp_lv_circle_buf_peek, lv_circle_buf_peek); - /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t *circle_buf, uint32_t index, void *data) + * bool lv_tree_walk(const lv_tree_node_t *node, lv_tree_walk_mode_t mode, lv_tree_traverse_cb_t cb, lv_tree_before_cb_t bcb, lv_tree_after_cb_t acb, void *user_data) */ -static mp_obj_t mp_lv_circle_buf_peek_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - void *data = mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, uint32_t, void *))lv_func_ptr)(circle_buf, index, data); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[5]); + lv_tree_walk_mode_t mode = (uint8_t)mp_obj_get_int(mp_args[1]); + void *cb = mp_lv_callback(mp_args[2], &lv_tree_walk_cb_callback, MP_QSTR_lv_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + void *bcb = mp_lv_callback(mp_args[3], &lv_tree_walk_bcb_callback, MP_QSTR_lv_tree_walk_bcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + void *acb = mp_lv_callback(mp_args[4], &lv_tree_walk_acb_callback, MP_QSTR_lv_tree_walk_acb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + const lv_tree_node_t *node = (const lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(mp_args[0]); + bool _res = ((bool (*)(const lv_tree_node_t *, lv_tree_walk_mode_t, lv_tree_traverse_cb_t, lv_tree_before_cb_t, lv_tree_after_cb_t, void *))lv_func_ptr)(node, mode, cb, bcb, acb, user_data); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_at_mpobj, 3, mp_lv_circle_buf_peek_at, lv_circle_buf_peek_at); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_walk_mpobj, 6, mp_lv_tree_walk, lv_tree_walk); -static const mp_rom_map_elem_t mp_lv_circle_buf_t_locals_dict_table[] = { - - { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_circle_buf_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_circle_buf_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_circle_buf_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_circle_buf_capacity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remain), MP_ROM_PTR(&mp_lv_circle_buf_remain_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_circle_buf_is_empty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_circle_buf_is_full_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_circle_buf_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_head), MP_ROM_PTR(&mp_lv_circle_buf_head_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tail), MP_ROM_PTR(&mp_lv_circle_buf_tail_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_circle_buf_read_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_lv_circle_buf_write_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fill), MP_ROM_PTR(&mp_lv_circle_buf_fill_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_skip), MP_ROM_PTR(&mp_lv_circle_buf_skip_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_circle_buf_peek_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek_at), MP_ROM_PTR(&mp_lv_circle_buf_peek_at_mpobj) }, +static const mp_rom_map_elem_t mp_lv_tree_node_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_node_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_tree_node_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_walk), MP_ROM_PTR(&mp_lv_tree_walk_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_circle_buf_t_locals_dict, mp_lv_circle_buf_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_tree_node_t_locals_dict, mp_lv_tree_node_t_locals_dict_table); /* * lvgl extension definition for: - * uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void *user_data) + * inline static lv_color_t lv_color16_to_color(lv_color16_t c) */ -static mp_obj_t mp_lv_layout_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color16_to_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_layout_callbacks_t callbacks = mp_write_lv_layout_callbacks_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_layout_callbacks_t, void *))lv_func_ptr)(callbacks, user_data); - return mp_obj_new_int_from_uint(_res); + lv_color16_t c = mp_write_lv_color16_t(mp_args[0]); + lv_color_t _res = ((lv_color_t (*)(lv_color16_t))lv_func_ptr)(c); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_create_mpobj, 2, mp_lv_layout_create, lv_layout_create); - - -static const mp_rom_map_elem_t mp_lv_layout_callbacks_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layout_callbacks_t))) }, - { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_layout_create_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_to_color_mpobj, 1, mp_lv_color16_to_color, lv_color16_to_color); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_layout_callbacks_t_locals_dict, mp_lv_layout_callbacks_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_fs_make_path_from_buffer(lv_fs_path_ex_t *path, char letter, const void *buf, uint32_t size, const char *ext) + * void lv_color16_premultiply(lv_color16_t *c, lv_opa_t a) */ -static mp_obj_t mp_lv_fs_make_path_from_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color16_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); - char letter = (char)mp_obj_get_int(mp_args[1]); - const void *buf = (const void *)mp_to_ptr(mp_args[2]); - uint32_t size = (uint32_t)mp_obj_get_int(mp_args[3]); - const char *ext = (const char *)(char*)convert_from_str(mp_args[4]); - ((void (*)(lv_fs_path_ex_t *, char, const void *, uint32_t, const char *))lv_func_ptr)(path, letter, buf, size, ext); + lv_color16_t *c = mp_write_ptr_lv_color16_t(mp_args[0]); + lv_opa_t a = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_color16_t *, lv_opa_t))lv_func_ptr)(c, a); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_make_path_from_buffer_mpobj, 5, mp_lv_fs_make_path_from_buffer, lv_fs_make_path_from_buffer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_premultiply_mpobj, 2, mp_lv_color16_premultiply, lv_color16_premultiply); /* * lvgl extension definition for: - * lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t *path, void **buffer, uint32_t *size) + * uint8_t lv_color16_luminance(const lv_color16_t c) */ -static mp_obj_t mp_lv_fs_get_buffer_from_path(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color16_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); - void **buffer = mp_to_ptr(mp_args[1]); - uint32_t *size = mp_array_to_u32ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_fs_path_ex_t *, void **, uint32_t *))lv_func_ptr)(path, buffer, size); - return mp_obj_new_int(_res); + const lv_color16_t c = (const lv_color16_t)mp_write_lv_color16_t(mp_args[0]); + uint8_t _res = ((uint8_t (*)(const lv_color16_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_get_buffer_from_path_mpobj, 3, mp_lv_fs_get_buffer_from_path, lv_fs_get_buffer_from_path); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_luminance_mpobj, 1, mp_lv_color16_luminance, lv_color16_luminance); -static const mp_rom_map_elem_t mp_lv_fs_path_ex_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_path_ex_t))) }, - { MP_ROM_QSTR(MP_QSTR_make_path_from_buffer), MP_ROM_PTR(&mp_lv_fs_make_path_from_buffer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_buffer_from_path), MP_ROM_PTR(&mp_lv_fs_get_buffer_from_path_mpobj) }, +static const mp_rom_map_elem_t mp_lv_color16_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color16_t))) }, + { MP_ROM_QSTR(MP_QSTR_to_color), MP_ROM_PTR(&mp_lv_color16_to_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_color16_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color16_luminance_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_fs_path_ex_t_locals_dict, mp_lv_fs_path_ex_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_color16_t_locals_dict, mp_lv_color16_t_locals_dict_table); /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t *rddir_p, const char *path) + * void lv_mem_monitor_core(lv_mem_monitor_t *mon_p) */ -static mp_obj_t mp_lv_fs_dir_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_mem_monitor_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); - const char *path = (const char *)(char*)convert_from_str(mp_args[1]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, const char *))lv_func_ptr)(rddir_p, path); - return mp_obj_new_int(_res); + lv_mem_monitor_t *mon_p = mp_write_ptr_lv_mem_monitor_t(mp_args[0]); + ((void (*)(lv_mem_monitor_t *))lv_func_ptr)(mon_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_open_mpobj, 2, mp_lv_fs_dir_open, lv_fs_dir_open); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_core_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor_core); +/* Reusing lv_mem_monitor_core for lv_mem_monitor */ -/* - * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t *rddir_p, char *fn, uint32_t fn_len) - */ - -static mp_obj_t mp_lv_fs_dir_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); - char *fn = (char*)convert_from_str(mp_args[1]); - uint32_t fn_len = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, char *, uint32_t))lv_func_ptr)(rddir_p, fn, fn_len); - return mp_obj_new_int(_res); -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_read_mpobj, 3, mp_lv_fs_dir_read, lv_fs_dir_read); +static const mp_rom_map_elem_t mp_lv_mem_monitor_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_mem_monitor_t))) }, + { MP_ROM_QSTR(MP_QSTR_core), MP_ROM_PTR(&mp_lv_mem_monitor_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_monitor), MP_ROM_PTR(&mp_lv_mem_monitor_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_mem_monitor_t_locals_dict, mp_lv_mem_monitor_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t *rddir_p) + * uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void *user_data) */ -static mp_obj_t mp_lv_fs_dir_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_layout_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *))lv_func_ptr)(rddir_p); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_layout_callbacks_t callbacks = mp_write_lv_layout_callbacks_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_layout_callbacks_t, void *))lv_func_ptr)(callbacks, user_data); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_close_mpobj, 1, mp_lv_fs_dir_close, lv_fs_dir_close); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_create_mpobj, 2, mp_lv_layout_create, lv_layout_create); -static const mp_rom_map_elem_t mp_lv_fs_dir_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_dir_t))) }, - { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_fs_dir_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_fs_dir_read_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_fs_dir_close_mpobj) }, +static const mp_rom_map_elem_t mp_lv_layout_callbacks_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layout_callbacks_t))) }, + { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_layout_create_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_fs_dir_t_locals_dict, mp_lv_fs_dir_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_layout_callbacks_t_locals_dict, mp_lv_layout_callbacks_t_locals_dict_table); /* @@ -42909,6 +45646,121 @@ static const mp_rom_map_elem_t mp_lv_draw_glyph_dsc_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_draw_glyph_dsc_t_locals_dict, mp_lv_draw_glyph_dsc_t_locals_dict_table); +/* + * lvgl extension definition for: + * void lv_fs_make_path_from_buffer(lv_fs_path_ex_t *path, char letter, const void *buf, uint32_t size, const char *ext) + */ + +static mp_obj_t mp_lv_fs_make_path_from_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); + char letter = (char)mp_obj_get_int(mp_args[1]); + const void *buf = (const void *)mp_to_ptr(mp_args[2]); + uint32_t size = (uint32_t)mp_obj_get_int(mp_args[3]); + const char *ext = (const char *)(char*)convert_from_str(mp_args[4]); + ((void (*)(lv_fs_path_ex_t *, char, const void *, uint32_t, const char *))lv_func_ptr)(path, letter, buf, size, ext); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_make_path_from_buffer_mpobj, 5, mp_lv_fs_make_path_from_buffer, lv_fs_make_path_from_buffer); + + +/* + * lvgl extension definition for: + * lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t *path, void **buffer, uint32_t *size) + */ + +static mp_obj_t mp_lv_fs_get_buffer_from_path(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); + void **buffer = mp_to_ptr(mp_args[1]); + uint32_t *size = mp_array_to_u32ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_fs_path_ex_t *, void **, uint32_t *))lv_func_ptr)(path, buffer, size); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_get_buffer_from_path_mpobj, 3, mp_lv_fs_get_buffer_from_path, lv_fs_get_buffer_from_path); + + +static const mp_rom_map_elem_t mp_lv_fs_path_ex_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_path_ex_t))) }, + { MP_ROM_QSTR(MP_QSTR_make_path_from_buffer), MP_ROM_PTR(&mp_lv_fs_make_path_from_buffer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_buffer_from_path), MP_ROM_PTR(&mp_lv_fs_get_buffer_from_path_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_fs_path_ex_t_locals_dict, mp_lv_fs_path_ex_t_locals_dict_table); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t *rddir_p, const char *path) + */ + +static mp_obj_t mp_lv_fs_dir_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); + const char *path = (const char *)(char*)convert_from_str(mp_args[1]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, const char *))lv_func_ptr)(rddir_p, path); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_open_mpobj, 2, mp_lv_fs_dir_open, lv_fs_dir_open); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t *rddir_p, char *fn, uint32_t fn_len) + */ + +static mp_obj_t mp_lv_fs_dir_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); + char *fn = (char*)convert_from_str(mp_args[1]); + uint32_t fn_len = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, char *, uint32_t))lv_func_ptr)(rddir_p, fn, fn_len); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_read_mpobj, 3, mp_lv_fs_dir_read, lv_fs_dir_read); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t *rddir_p) + */ + +static mp_obj_t mp_lv_fs_dir_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *))lv_func_ptr)(rddir_p); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_close_mpobj, 1, mp_lv_fs_dir_close, lv_fs_dir_close); + + +static const mp_rom_map_elem_t mp_lv_fs_dir_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_dir_t))) }, + { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_fs_dir_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_fs_dir_read_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_fs_dir_close_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_fs_dir_t_locals_dict, mp_lv_fs_dir_t_locals_dict_table); + + /* * lvgl extension definition for: * void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t *draw_dsc) @@ -43104,6 +45956,10 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_long_press_time_mpobj, 2, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_long_press_repeat_time_mpobj, 2, mp_lv_indev_set_long_press_time, lv_indev_set_long_press_repeat_time); +/* Reusing lv_indev_set_long_press_time for lv_indev_set_double_click_time */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_double_click_time_mpobj, 2, mp_lv_indev_set_long_press_time, lv_indev_set_double_click_time); + /* * lvgl extension definition for: @@ -43508,7 +46364,7 @@ GENMPY_UNUSED static void lv_indev_add_event_cb_event_cb_callback(lv_event_t *ar /* * lvgl extension definition for: - * void lv_indev_add_event_cb(lv_indev_t *indev, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * lv_event_dsc_t *lv_indev_add_event_cb(lv_indev_t *indev, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ static mp_obj_t mp_lv_indev_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -43517,8 +46373,8 @@ static mp_obj_t mp_lv_indev_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_ar void *event_cb = mp_lv_callback(mp_args[1], &lv_indev_add_event_cb_event_cb_callback, MP_QSTR_lv_indev_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); lv_indev_t *indev = mp_write_ptr_lv_indev_t(mp_args[0]); - ((void (*)(lv_indev_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(indev, event_cb, filter, user_data); - return mp_const_none; + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_indev_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(indev, event_cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } @@ -43665,6 +46521,18 @@ static mp_obj_t mp_lv_indev_set_key_remap_cb(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_key_remap_cb_mpobj, 2, mp_lv_indev_set_key_remap_cb, lv_indev_set_key_remap_cb); +/* Reusing lv_indev_delete for lv_indev_set_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_ccw_mpobj, 1, mp_lv_indev_delete, lv_indev_set_ccw); + +/* Reusing lv_indev_delete for lv_indev_clear_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_clear_ccw_mpobj, 1, mp_lv_indev_delete, lv_indev_clear_ccw); + +/* Reusing lv_indev_get_press_moved for lv_indev_get_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_get_ccw_mpobj, 1, mp_lv_indev_get_press_moved, lv_indev_get_ccw); + /* Reusing lv_indev_delete for lv_indev_gesture_init */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_gesture_init_mpobj, 1, mp_lv_indev_delete, lv_indev_gesture_init); @@ -43762,6 +46630,7 @@ static const mp_rom_map_elem_t mp_lv_indev_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_display), MP_ROM_PTR(&mp_lv_indev_set_display_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_long_press_time), MP_ROM_PTR(&mp_lv_indev_set_long_press_time_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_long_press_repeat_time), MP_ROM_PTR(&mp_lv_indev_set_long_press_repeat_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_double_click_time), MP_ROM_PTR(&mp_lv_indev_set_double_click_time_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_scroll_limit), MP_ROM_PTR(&mp_lv_indev_set_scroll_limit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_scroll_throw), MP_ROM_PTR(&mp_lv_indev_set_scroll_throw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_gesture_min_velocity), MP_ROM_PTR(&mp_lv_indev_set_gesture_min_velocity_mpobj) }, @@ -43799,6 +46668,9 @@ static const mp_rom_map_elem_t mp_lv_indev_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_indev_remove_event_cb_with_user_data_mpobj) }, { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_indev_send_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_key_remap_cb), MP_ROM_PTR(&mp_lv_indev_set_key_remap_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ccw), MP_ROM_PTR(&mp_lv_indev_set_ccw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_ccw), MP_ROM_PTR(&mp_lv_indev_clear_ccw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ccw), MP_ROM_PTR(&mp_lv_indev_get_ccw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_gesture_init), MP_ROM_PTR(&mp_lv_indev_gesture_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_pinch_up_threshold), MP_ROM_PTR(&mp_lv_indev_set_pinch_up_threshold_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_pinch_down_threshold), MP_ROM_PTR(&mp_lv_indev_set_pinch_down_threshold_mpobj) }, @@ -43925,15 +46797,23 @@ static MP_DEFINE_CONST_DICT(mp_lv_indev_gesture_recognizer_t_locals_dict, mp_lv_ static const mp_rom_map_elem_t mp_lv_indev_gesture_t_locals_dict_table[] = { - + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_indev_gesture_t))) }, }; static MP_DEFINE_CONST_DICT(mp_lv_indev_gesture_t_locals_dict, mp_lv_indev_gesture_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_indev_gesture_configuration_t_locals_dict_table[] = { +static const mp_rom_map_elem_t mp_lv_indev_gesture_motion_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_indev_gesture_motion_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_indev_gesture_motion_t_locals_dict, mp_lv_indev_gesture_motion_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_indev_gesture_configuration_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_indev_gesture_configuration_t))) }, }; @@ -43974,6 +46854,66 @@ static const mp_rom_map_elem_t mp_lv_draw_mask_rect_dsc_t_locals_dict_table[] = static MP_DEFINE_CONST_DICT(mp_lv_draw_mask_rect_dsc_t_locals_dict, mp_lv_draw_mask_rect_dsc_t_locals_dict_table); +/* + * lvgl extension definition for: + * lv_font_t *lv_binfont_create_ex(const lv_binfont_dsc_t *dsc) + */ + +static mp_obj_t mp_lv_binfont_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_binfont_dsc_t *dsc = (const lv_binfont_dsc_t *)mp_write_ptr_lv_binfont_dsc_t(mp_args[0]); + lv_font_t * _res = ((lv_font_t *(*)(const lv_binfont_dsc_t *))lv_func_ptr)(dsc); + return mp_read_ptr_lv_font_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_binfont_create_ex_mpobj, 1, mp_lv_binfont_create_ex, lv_binfont_create_ex); + + +static const mp_rom_map_elem_t mp_lv_binfont_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_binfont_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_binfont_create_ex_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_binfont_dsc_t_locals_dict, mp_lv_binfont_dsc_t_locals_dict_table); + + +/* + * lvgl extension definition for: + * bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t *handler) + */ + +static mp_obj_t mp_lv_draw_sw_register_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_sw_custom_blend_handler_t *handler = mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_args[0]); + bool _res = ((bool (*)(lv_draw_sw_custom_blend_handler_t *))lv_func_ptr)(handler); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_register_blend_handler_mpobj, 1, mp_lv_draw_sw_register_blend_handler, lv_draw_sw_register_blend_handler); + + +static const mp_rom_map_elem_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_custom_blend_handler_t))) }, + { MP_ROM_QSTR(MP_QSTR_register_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_register_blend_handler_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_custom_blend_handler_t_locals_dict, mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_draw_sw_blend_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_dsc_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_dsc_t_locals_dict, mp_lv_draw_sw_blend_dsc_t_locals_dict_table); + + /* * lvgl extension definition for: * void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t *param, int32_t p1x, int32_t p1y, int32_t p2x, int32_t p2y, lv_draw_sw_mask_line_side_t side) @@ -44083,7 +47023,7 @@ static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict, mp /* * lvgl extension definition for: - * void lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t *param, const lv_area_t *rect, int32_t radius, bool inv) + * lv_result_t lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t *param, const lv_area_t *rect, int32_t radius, bool inv) */ static mp_obj_t mp_lv_draw_sw_mask_radius_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -44092,8 +47032,8 @@ static mp_obj_t mp_lv_draw_sw_mask_radius_init(size_t mp_n_args, const mp_obj_t const lv_area_t *rect = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); bool inv = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_draw_sw_mask_radius_param_t *, const lv_area_t *, int32_t, bool))lv_func_ptr)(param, rect, radius, inv); - return mp_const_none; + lv_result_t _res = ((lv_result_t (*)(lv_draw_sw_mask_radius_param_t *, const lv_area_t *, int32_t, bool))lv_func_ptr)(param, rect, radius, inv); + return mp_obj_new_int(_res); } @@ -44203,1019 +47143,1268 @@ static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict, mp_l /* * lvgl extension definition for: - * bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t *handler) + * void lv_draw_sw_blend_color_to_a8(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static mp_obj_t mp_lv_draw_sw_register_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blend_color_to_a8(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_sw_custom_blend_handler_t *handler = mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_args[0]); - bool _res = ((bool (*)(lv_draw_sw_custom_blend_handler_t *))lv_func_ptr)(handler); - return convert_to_bool(_res); + lv_draw_sw_blend_fill_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(mp_args[0]); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_register_blend_handler_mpobj, 1, mp_lv_draw_sw_register_blend_handler, lv_draw_sw_register_blend_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_a8_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_a8); +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_al88 */ -static const mp_rom_map_elem_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_custom_blend_handler_t))) }, - { MP_ROM_QSTR(MP_QSTR_register_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_register_blend_handler_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_al88_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_al88); -}; +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_argb8888 */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_custom_blend_handler_t_locals_dict, mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_argb8888_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_argb8888); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_argb8888_premultiplied */ -static const mp_rom_map_elem_t mp_lv_draw_sw_blend_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_dsc_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_argb8888_premultiplied_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_argb8888_premultiplied); -}; +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_i1 */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_dsc_t_locals_dict, mp_lv_draw_sw_blend_dsc_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_i1_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_i1); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_l8 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_l8_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_l8); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_rgb565 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_rgb565_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_rgb565); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_rgb565_swapped */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_rgb565_swapped_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_rgb565_swapped); + /* * lvgl extension definition for: - * void lv_text_attributes_init(lv_text_attributes_t *attributes) + * void lv_draw_sw_blend_color_to_rgb888(lv_draw_sw_blend_fill_dsc_t *dsc, uint32_t dest_px_size) */ -static mp_obj_t mp_lv_text_attributes_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blend_color_to_rgb888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(mp_args[0]); - ((void (*)(lv_text_attributes_t *))lv_func_ptr)(attributes); + lv_draw_sw_blend_fill_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(mp_args[0]); + uint32_t dest_px_size = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *, uint32_t))lv_func_ptr)(dsc, dest_px_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_text_attributes_init_mpobj, 1, mp_lv_text_attributes_init, lv_text_attributes_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_rgb888_mpobj, 2, mp_lv_draw_sw_blend_color_to_rgb888, lv_draw_sw_blend_color_to_rgb888); -static const mp_rom_map_elem_t mp_lv_text_attributes_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_text_attributes_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_text_attributes_init_mpobj) }, +static const mp_rom_map_elem_t mp_lv_draw_sw_blend_fill_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_fill_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_color_to_a8), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_a8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_al88), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_al88_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_argb8888), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_argb8888_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_argb8888_premultiplied), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_argb8888_premultiplied_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_i1), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_i1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_l8), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_l8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_rgb565), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_rgb565_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_rgb565_swapped), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_rgb565_swapped_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_rgb888), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_rgb888_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_text_attributes_t_locals_dict, mp_lv_text_attributes_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_fill_dsc_t_locals_dict, mp_lv_draw_sw_blend_fill_dsc_t_locals_dict_table); /* - * - * Global Module Functions - * + * lvgl extension definition for: + * void lv_draw_sw_blend_image_to_a8(lv_draw_sw_blend_image_dsc_t *dsc) */ +static mp_obj_t mp_lv_draw_sw_blend_image_to_a8(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_sw_blend_image_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_image_dsc_t(mp_args[0]); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_a8_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_a8); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_al88 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_al88_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_al88); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_argb8888 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_argb8888_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_argb8888); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_argb8888_premultiplied */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_argb8888_premultiplied_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_argb8888_premultiplied); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_i1 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_i1_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_i1); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_l8 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_l8_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_l8); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_rgb565 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_rgb565_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_rgb565); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_rgb565_swapped */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_rgb565_swapped_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_rgb565_swapped); + /* * lvgl extension definition for: - * inline static void lv_memzero(void *dst, size_t len) + * void lv_draw_sw_blend_image_to_rgb888(lv_draw_sw_blend_image_dsc_t *dsc, uint32_t dest_px_size) */ -static mp_obj_t mp_lv_memzero(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blend_image_to_rgb888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *dst = mp_to_ptr(mp_args[0]); - size_t len = (size_t)mp_obj_get_int(mp_args[1]); - ((void (*)(void *, size_t))lv_func_ptr)(dst, len); + lv_draw_sw_blend_image_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_image_dsc_t(mp_args[0]); + uint32_t dest_px_size = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_sw_blend_image_dsc_t *, uint32_t))lv_func_ptr)(dsc, dest_px_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memzero_mpobj, 2, mp_lv_memzero, lv_memzero); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_rgb888_mpobj, 2, mp_lv_draw_sw_blend_image_to_rgb888, lv_draw_sw_blend_image_to_rgb888); -static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, +static const mp_rom_map_elem_t mp_lv_draw_sw_blend_image_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_image_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_to_a8), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_a8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_al88), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_al88_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_argb8888), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_argb8888_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_argb8888_premultiplied), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_argb8888_premultiplied_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_i1), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_i1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_l8), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_l8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_rgb565), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_rgb565_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_rgb565_swapped), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_rgb565_swapped_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_rgb888), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_rgb888_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_image_dsc_t_locals_dict, mp_lv_draw_sw_blend_image_dsc_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, +/* + * lvgl extension definition for: + * void lv_draw_sw_grad_cleanup(lv_draw_sw_grad_calc_t *grad) + */ + +static mp_obj_t mp_lv_draw_sw_grad_cleanup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_sw_grad_calc_t *grad = mp_write_ptr_lv_draw_sw_grad_calc_t(mp_args[0]); + ((void (*)(lv_draw_sw_grad_calc_t *))lv_func_ptr)(grad); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_grad_cleanup_mpobj, 1, mp_lv_draw_sw_grad_cleanup, lv_draw_sw_grad_cleanup); + + +static const mp_rom_map_elem_t mp_lv_draw_sw_grad_calc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_grad_calc_t))) }, + { MP_ROM_QSTR(MP_QSTR_cleanup), MP_ROM_PTR(&mp_lv_draw_sw_grad_cleanup_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_grad_calc_t_locals_dict, mp_lv_draw_sw_grad_calc_t_locals_dict_table); /* * lvgl extension definition for: - * inline static bool lv_streq(const char *s1, const char *s2) + * lv_result_t lv_circle_buf_resize(lv_circle_buf_t *circle_buf, uint32_t capacity) */ -static mp_obj_t mp_lv_streq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); - const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); - bool _res = ((bool (*)(const char *, const char *))lv_func_ptr)(s1, s2); - return convert_to_bool(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, uint32_t))lv_func_ptr)(circle_buf, capacity); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_streq_mpobj, 2, mp_lv_streq, lv_streq); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_resize_mpobj, 2, mp_lv_circle_buf_resize, lv_circle_buf_resize); /* * lvgl extension definition for: - * inline static int32_t lv_sqr(int32_t x) + * void lv_circle_buf_destroy(lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_sqr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - int32_t x = (int32_t)mp_obj_get_int(mp_args[0]); - int32_t _res = ((int32_t (*)(int32_t))lv_func_ptr)(x); - return mp_obj_new_int(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + ((void (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sqr_mpobj, 1, mp_lv_sqr, lv_sqr); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_destroy_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_destroy); /* * lvgl extension definition for: - * inline static uint16_t lv_color_swap_16(uint16_t c) + * uint32_t lv_circle_buf_size(const lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_color_swap_16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint16_t c = (uint16_t)mp_obj_get_int(mp_args[0]); - uint16_t _res = ((uint16_t (*)(uint16_t))lv_func_ptr)(c); + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_swap_16_mpobj, 1, mp_lv_color_swap_16, lv_color_swap_16); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_size_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_size); + +/* Reusing lv_circle_buf_size for lv_circle_buf_capacity */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_capacity_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_capacity); + +/* Reusing lv_circle_buf_size for lv_circle_buf_remain */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_remain_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_remain); /* * lvgl extension definition for: - * inline static uint32_t lv_swap_bytes_32(uint32_t x) + * bool lv_circle_buf_is_empty(const lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_swap_bytes_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t _res = ((uint32_t (*)(uint32_t))lv_func_ptr)(x); - return mp_obj_new_int_from_uint(_res); + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + bool _res = ((bool (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_32_mpobj, 1, mp_lv_swap_bytes_32, lv_swap_bytes_32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_empty_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_empty); -/* Reusing lv_color_swap_16 for lv_swap_bytes_16 */ +/* Reusing lv_circle_buf_is_empty for lv_circle_buf_is_full */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_16_mpobj, 1, mp_lv_color_swap_16, lv_swap_bytes_16); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_full_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_full); + +/* Reusing lv_circle_buf_destroy for lv_circle_buf_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_reset_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_reset); /* * lvgl extension definition for: - * inline static void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) + * void *lv_circle_buf_head(const lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_bidi_calculate_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); - lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); - return mp_const_none; + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + void * _res = ((void *(*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align, lv_bidi_calculate_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_head_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_head); + +/* Reusing lv_circle_buf_head for lv_circle_buf_tail */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_tail_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_tail); /* * lvgl extension definition for: - * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) + * lv_result_t lv_circle_buf_read(lv_circle_buf_t *circle_buf, void *data) */ -static mp_obj_t mp_lv_style_get_prop_group(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_style_prop_t))lv_func_ptr)(prop); - return mp_obj_new_int_from_uint(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + void *data = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_get_prop_group_mpobj, 1, mp_lv_style_get_prop_group, lv_style_get_prop_group); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_read_mpobj, 2, mp_lv_circle_buf_read, lv_circle_buf_read); /* * lvgl extension definition for: - * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) + * lv_result_t lv_circle_buf_write(lv_circle_buf_t *circle_buf, const void *data) */ -static mp_obj_t mp_lv_style_prop_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_write(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); - uint8_t flag = (uint8_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_func_ptr)(prop, flag); - return convert_to_bool(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + const void *data = (const void *)mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, const void *))lv_func_ptr)(circle_buf, data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_prop_has_flag_mpobj, 2, mp_lv_style_prop_has_flag, lv_style_prop_has_flag); - -/* Reusing funcptr_lv_tick_get_cb_t for lv_task_handler */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_task_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_task_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_write_mpobj, 2, mp_lv_circle_buf_write, lv_circle_buf_write); /* - * Callback function lv_thread_init_callback - * void callback(void *) + * Callback function lv_circle_buf_fill_fill_cb + * bool lv_circle_buf_fill_cb_t(void *buf, uint32_t buff_len, int32_t index, void *user_data) */ -GENMPY_UNUSED static void lv_thread_init_callback_callback(void *arg0) +GENMPY_UNUSED static bool lv_circle_buf_fill_fill_cb_callback(void *arg0, uint32_t arg1, int32_t arg2, void *arg3) { - mp_obj_t mp_args[1]; + mp_obj_t mp_args[4]; mp_args[0] = ptr_to_mp((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_thread_init_callback)), 1, mp_args); - return; + mp_args[1] = mp_obj_new_int_from_uint(arg1); + mp_args[2] = mp_obj_new_int(arg2); + mp_args[3] = ptr_to_mp((void*)arg3); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg3); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_circle_buf_fill_fill_cb)), 4, mp_args); + return mp_obj_is_true(callback_result); } /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) + * uint32_t lv_circle_buf_fill(lv_circle_buf_t *circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, void *user_data) */ -static mp_obj_t mp_lv_thread_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - const char * const name = (const char * const)(char*)convert_from_str(mp_args[1]); - lv_thread_prio_t prio = (int)mp_obj_get_int(mp_args[2]); - void *callback = mp_lv_callback(mp_args[3], &lv_thread_init_callback_callback, MP_QSTR_lv_thread_init_callback, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - size_t stack_size = (size_t)mp_obj_get_int(mp_args[4]); - lv_thread_t *thread = mp_to_ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_func_ptr)(thread, name, prio, callback, stack_size, user_data); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[3]); + uint32_t count = (uint32_t)mp_obj_get_int(mp_args[1]); + void *fill_cb = mp_lv_callback(mp_args[2], &lv_circle_buf_fill_fill_cb_callback, MP_QSTR_lv_circle_buf_fill_fill_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_circle_buf_t *, uint32_t, lv_circle_buf_fill_cb_t, void *))lv_func_ptr)(circle_buf, count, fill_cb, user_data); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_init_mpobj, 6, mp_lv_thread_init, lv_thread_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_fill_mpobj, 4, mp_lv_circle_buf_fill, lv_circle_buf_fill); /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) + * lv_result_t lv_circle_buf_skip(lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_thread_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_skip(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_thread_t *thread = mp_to_ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_thread_t *))lv_func_ptr)(thread); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_delete_mpobj, 1, mp_lv_thread_delete, lv_thread_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_skip_mpobj, 1, mp_lv_circle_buf_skip, lv_circle_buf_skip); /* * lvgl extension definition for: - * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) + * lv_result_t lv_circle_buf_peek(const lv_circle_buf_t *circle_buf, void *data) */ -static mp_obj_t mp_lv_mutex_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_peek(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_mutex_t *mutex = mp_array_to_i32ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_mutex_t *))lv_func_ptr)(mutex); + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + void *data = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_init_mpobj, 1, mp_lv_mutex_init, lv_mutex_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_mpobj, 2, mp_lv_circle_buf_peek, lv_circle_buf_peek); -/* Reusing lv_mutex_init for lv_mutex_lock */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock); - -/* Reusing lv_mutex_init for lv_mutex_lock_isr */ +/* + * lvgl extension definition for: + * lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t *circle_buf, uint32_t index, void *data) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_isr_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock_isr); - -/* Reusing lv_mutex_init for lv_mutex_unlock */ +static mp_obj_t mp_lv_circle_buf_peek_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + void *data = mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, uint32_t, void *))lv_func_ptr)(circle_buf, index, data); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_unlock_mpobj, 1, mp_lv_mutex_init, lv_mutex_unlock); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_at_mpobj, 3, mp_lv_circle_buf_peek_at, lv_circle_buf_peek_at); -/* Reusing lv_mutex_init for lv_mutex_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_delete_mpobj, 1, mp_lv_mutex_init, lv_mutex_delete); +static const mp_rom_map_elem_t mp_lv_circle_buf_t_locals_dict_table[] = { + + { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_circle_buf_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_circle_buf_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_circle_buf_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_circle_buf_capacity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remain), MP_ROM_PTR(&mp_lv_circle_buf_remain_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_circle_buf_is_empty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_circle_buf_is_full_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_circle_buf_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_head), MP_ROM_PTR(&mp_lv_circle_buf_head_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tail), MP_ROM_PTR(&mp_lv_circle_buf_tail_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_circle_buf_read_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_lv_circle_buf_write_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fill), MP_ROM_PTR(&mp_lv_circle_buf_fill_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_skip), MP_ROM_PTR(&mp_lv_circle_buf_skip_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_circle_buf_peek_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek_at), MP_ROM_PTR(&mp_lv_circle_buf_peek_at_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_circle_buf_t_locals_dict, mp_lv_circle_buf_t_locals_dict_table); + /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) + * void lv_lru_delete(lv_lru_t *cache) */ -static mp_obj_t mp_lv_thread_sync_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_lru_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_thread_sync_t *sync = mp_to_ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_func_ptr)(sync); - return mp_obj_new_int(_res); + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + ((void (*)(lv_lru_t *))lv_func_ptr)(cache); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_init_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_delete_mpobj, 1, mp_lv_lru_delete, lv_lru_delete); -/* Reusing lv_thread_sync_init for lv_thread_sync_wait */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_wait_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_wait); - -/* Reusing lv_thread_sync_init for lv_thread_sync_signal */ +/* + * lvgl extension definition for: + * lv_lru_res_t lv_lru_set(lv_lru_t *cache, const void *key, size_t key_length, void *value, size_t value_length) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal); - -/* Reusing lv_thread_sync_init for lv_thread_sync_signal_isr */ +static mp_obj_t mp_lv_lru_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t key_length = (size_t)mp_obj_get_int(mp_args[2]); + void *value = mp_to_ptr(mp_args[3]); + size_t value_length = (size_t)mp_obj_get_int(mp_args[4]); + lv_lru_res_t _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t, void *, size_t))lv_func_ptr)(cache, key, key_length, value, value_length); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_isr_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal_isr); - -/* Reusing lv_thread_sync_init for lv_thread_sync_delete */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_delete_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_set_mpobj, 5, mp_lv_lru_set, lv_lru_set); /* * lvgl extension definition for: - * inline static bool lv_text_is_break_char(uint32_t letter) + * lv_lru_res_t lv_lru_get(lv_lru_t *cache, const void *key, size_t key_size, void **value) */ -static mp_obj_t mp_lv_text_is_break_char(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_lru_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[0]); - bool _res = ((bool (*)(uint32_t))lv_func_ptr)(letter); - return convert_to_bool(_res); + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t key_size = (size_t)mp_obj_get_int(mp_args[2]); + void **value = mp_to_ptr(mp_args[3]); + lv_lru_res_t _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t, void **))lv_func_ptr)(cache, key, key_size, value); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_break_char_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_break_char); - -/* Reusing lv_text_is_break_char for lv_text_is_a_word */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_a_word_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_a_word); - -/* Reusing lv_text_is_break_char for lv_text_is_marker */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_marker_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_marker); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_get_mpobj, 4, mp_lv_lru_get, lv_lru_get); /* * lvgl extension definition for: - * inline static int lv_version_major(void) + * lv_lru_res_t lv_lru_remove(lv_lru_t *cache, const void *key, size_t key_size) */ -static mp_obj_t mp_lv_version_major(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_lru_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - int _res = ((int (*)(void))lv_func_ptr)(); + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t key_size = (size_t)mp_obj_get_int(mp_args[2]); + lv_lru_res_t _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t))lv_func_ptr)(cache, key, key_size); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_major_mpobj, 0, mp_lv_version_major, lv_version_major); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_remove_mpobj, 3, mp_lv_lru_remove, lv_lru_remove); -/* Reusing lv_version_major for lv_version_minor */ +/* Reusing lv_lru_delete for lv_lru_remove_lru_item */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_minor_mpobj, 0, mp_lv_version_major, lv_version_minor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_remove_lru_item_mpobj, 1, mp_lv_lru_delete, lv_lru_remove_lru_item); -/* Reusing lv_version_major for lv_version_patch */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_patch_mpobj, 0, mp_lv_version_major, lv_version_patch); +static const mp_rom_map_elem_t mp_lv_lru_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_lru_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_lru_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_lru_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get), MP_ROM_PTR(&mp_lv_lru_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_lru_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_lru_item), MP_ROM_PTR(&mp_lv_lru_remove_lru_item_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_lru_t_locals_dict, mp_lv_lru_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_lru_item_t_locals_dict_table[] = { + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_lru_item_t_locals_dict, mp_lv_lru_item_t_locals_dict_table); + /* * lvgl extension definition for: - * inline static const char *lv_version_info(void) + * void lv_pending_destroy(lv_pending_t *pending) */ -static mp_obj_t mp_lv_version_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_pending_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - const char * _res = ((const char *(*)(void))lv_func_ptr)(); - return convert_to_str((void*)_res); + lv_pending_t *pending = mp_write_ptr_lv_pending_t(mp_args[0]); + ((void (*)(lv_pending_t *))lv_func_ptr)(pending); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_info_mpobj, 0, mp_lv_version_info, lv_version_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_destroy_mpobj, 1, mp_lv_pending_destroy, lv_pending_destroy); -/* Reusing lv_image_header_cache_is_enabled for lv_is_initialized */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_is_initialized_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_is_initialized); - +/* + * Callback function lv_pending_set_free_cb_free_cb + * void lv_pending_free_cb_t(void *obj, void *user_data) + */ + +GENMPY_UNUSED static void lv_pending_set_free_cb_free_cb_callback(void *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_pending_set_free_cb_free_cb)), 2, mp_args); + return; +} + /* * lvgl extension definition for: - * void *lv_memcpy(void *dst, const void *src, size_t len) + * void lv_pending_set_free_cb(lv_pending_t *pending, lv_pending_free_cb_t free_cb, void *user_data) */ -static mp_obj_t mp_lv_memcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_pending_set_free_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *dst = mp_to_ptr(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(void *, const void *, size_t))lv_func_ptr)(dst, src, len); - return ptr_to_mp((void*)_res); + void *user_data = mp_to_ptr(mp_args[2]); + void *free_cb = mp_lv_callback(mp_args[1], &lv_pending_set_free_cb_free_cb_callback, MP_QSTR_lv_pending_set_free_cb_free_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_pending_t *pending = mp_write_ptr_lv_pending_t(mp_args[0]); + ((void (*)(lv_pending_t *, lv_pending_free_cb_t, void *))lv_func_ptr)(pending, free_cb, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcpy_mpobj, 3, mp_lv_memcpy, lv_memcpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_set_free_cb_mpobj, 3, mp_lv_pending_set_free_cb, lv_pending_set_free_cb); /* * lvgl extension definition for: - * void lv_memset(void *dst, uint8_t v, size_t len) + * void lv_pending_add(lv_pending_t *pending, void *obj) */ -static mp_obj_t mp_lv_memset(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_pending_add(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *dst = mp_to_ptr(mp_args[0]); - uint8_t v = (uint8_t)mp_obj_get_int(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - ((void (*)(void *, uint8_t, size_t))lv_func_ptr)(dst, v, len); + lv_pending_t *pending = mp_write_ptr_lv_pending_t(mp_args[0]); + void *obj = mp_to_ptr(mp_args[1]); + ((void (*)(lv_pending_t *, void *))lv_func_ptr)(pending, obj); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memset_mpobj, 3, mp_lv_memset, lv_memset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_add_mpobj, 2, mp_lv_pending_add, lv_pending_add); -/* Reusing lv_memcpy for lv_memmove */ +/* Reusing lv_pending_destroy for lv_pending_remove_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memmove_mpobj, 3, mp_lv_memcpy, lv_memmove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_remove_all_mpobj, 1, mp_lv_pending_destroy, lv_pending_remove_all); + +/* Reusing lv_pending_destroy for lv_pending_swap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_swap_mpobj, 1, mp_lv_pending_destroy, lv_pending_swap); + + +static const mp_rom_map_elem_t mp_lv_pending_t_locals_dict_table[] = { + + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_pending_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_free_cb), MP_ROM_PTR(&mp_lv_pending_set_free_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_pending_add_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_all), MP_ROM_PTR(&mp_lv_pending_remove_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_pending_swap_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_pending_t_locals_dict, mp_lv_pending_t_locals_dict_table); + + +/* + * Function NOT generated: + * Callback function 'lv_rb_compare_t compare' must receive a struct pointer with user_data member as its first argument! + * lv_rb_compare_t compare + */ /* * lvgl extension definition for: - * int lv_memcmp(const void *p1, const void *p2, size_t len) + * bool lv_rb_init(lv_rb_t *tree, lv_rb_compare_t compare, size_t node_size) */ -static mp_obj_t mp_lv_memcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *p1 = (const void *)mp_to_ptr(mp_args[0]); - const void *p2 = (const void *)mp_to_ptr(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - int _res = ((int (*)(const void *, const void *, size_t))lv_func_ptr)(p1, p2, len); - return mp_obj_new_int(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_compare_t compare = mp_to_ptr(mp_args[1]); + size_t node_size = (size_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_rb_t *, lv_rb_compare_t, size_t))lv_func_ptr)(tree, compare, node_size); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcmp_mpobj, 3, mp_lv_memcmp, lv_memcmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_init_mpobj, 3, mp_lv_rb_init, lv_rb_init); /* * lvgl extension definition for: - * size_t lv_strlen(const char *str) + * lv_rb_node_t *lv_rb_insert(lv_rb_t *tree, void *key) */ -static mp_obj_t mp_lv_strlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_insert(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *str = (const char *)(char*)convert_from_str(mp_args[0]); - size_t _res = ((size_t (*)(const char *))lv_func_ptr)(str); - return mp_obj_new_int_from_uint(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + void *key = mp_to_ptr(mp_args[1]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, void *))lv_func_ptr)(tree, key); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlen_mpobj, 1, mp_lv_strlen, lv_strlen); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_insert_mpobj, 2, mp_lv_rb_insert, lv_rb_insert); /* * lvgl extension definition for: - * size_t lv_strnlen(const char *str, size_t max_len) + * lv_rb_node_t *lv_rb_find(lv_rb_t *tree, const void *key) */ -static mp_obj_t mp_lv_strnlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_find(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *str = (const char *)(char*)convert_from_str(mp_args[0]); - size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); - size_t _res = ((size_t (*)(const char *, size_t))lv_func_ptr)(str, max_len); - return mp_obj_new_int_from_uint(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strnlen_mpobj, 2, mp_lv_strnlen, lv_strnlen); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_find_mpobj, 2, mp_lv_rb_find, lv_rb_find); /* * lvgl extension definition for: - * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) + * void *lv_rb_remove_node(lv_rb_t *tree, lv_rb_node_t *node) */ -static mp_obj_t mp_lv_strlcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_remove_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - char *dst = (char*)convert_from_str(mp_args[0]); - const char *src = (const char *)(char*)convert_from_str(mp_args[1]); - size_t dst_size = (size_t)mp_obj_get_int(mp_args[2]); - size_t _res = ((size_t (*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dst_size); - return mp_obj_new_int_from_uint(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); + void * _res = ((void *(*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlcpy_mpobj, 3, mp_lv_strlcpy, lv_strlcpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_node_mpobj, 2, mp_lv_rb_remove_node, lv_rb_remove_node); /* * lvgl extension definition for: - * char *lv_strncpy(char *dst, const char *src, size_t dest_size) + * void *lv_rb_remove(lv_rb_t *tree, const void *key) */ -static mp_obj_t mp_lv_strncpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - char *dst = (char*)convert_from_str(mp_args[0]); - const char *src = (const char *)(char*)convert_from_str(mp_args[1]); - size_t dest_size = (size_t)mp_obj_get_int(mp_args[2]); - char * _res = ((char *(*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dest_size); - return convert_to_str((void*)_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + void * _res = ((void *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncpy_mpobj, 3, mp_lv_strncpy, lv_strncpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_mpobj, 2, mp_lv_rb_remove, lv_rb_remove); /* * lvgl extension definition for: - * char *lv_strcpy(char *dst, const char *src) + * bool lv_rb_drop_node(lv_rb_t *tree, lv_rb_node_t *node) */ -static mp_obj_t mp_lv_strcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_drop_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - char *dst = (char*)convert_from_str(mp_args[0]); - const char *src = (const char *)(char*)convert_from_str(mp_args[1]); - char * _res = ((char *(*)(char *, const char *))lv_func_ptr)(dst, src); - return convert_to_str((void*)_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); + bool _res = ((bool (*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcpy_mpobj, 2, mp_lv_strcpy, lv_strcpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_node_mpobj, 2, mp_lv_rb_drop_node, lv_rb_drop_node); /* * lvgl extension definition for: - * int lv_strcmp(const char *s1, const char *s2) + * bool lv_rb_drop(lv_rb_t *tree, const void *key) */ -static mp_obj_t mp_lv_strcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); - const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); - int _res = ((int (*)(const char *, const char *))lv_func_ptr)(s1, s2); - return mp_obj_new_int(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + bool _res = ((bool (*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcmp_mpobj, 2, mp_lv_strcmp, lv_strcmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_mpobj, 2, mp_lv_rb_drop, lv_rb_drop); /* * lvgl extension definition for: - * int lv_strncmp(const char *s1, const char *s2, size_t len) + * lv_rb_node_t *lv_rb_minimum(lv_rb_t *node) */ -static mp_obj_t mp_lv_strncmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_minimum(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); - const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - int _res = ((int (*)(const char *, const char *, size_t))lv_func_ptr)(s1, s2, len); - return mp_obj_new_int(_res); + lv_rb_t *node = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_func_ptr)(node); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncmp_mpobj, 3, mp_lv_strncmp, lv_strncmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_mpobj, 1, mp_lv_rb_minimum, lv_rb_minimum); + +/* Reusing lv_rb_minimum for lv_rb_maximum */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_mpobj, 1, mp_lv_rb_minimum, lv_rb_maximum); /* * lvgl extension definition for: - * char *lv_strdup(const char *src) + * void lv_rb_destroy(lv_rb_t *tree) */ -static mp_obj_t mp_lv_strdup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *src = (const char *)(char*)convert_from_str(mp_args[0]); - char * _res = ((char *(*)(const char *))lv_func_ptr)(src); - return convert_to_str((void*)_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + ((void (*)(lv_rb_t *))lv_func_ptr)(tree); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strdup_mpobj, 1, mp_lv_strdup, lv_strdup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_destroy_mpobj, 1, mp_lv_rb_destroy, lv_rb_destroy); + + +static const mp_rom_map_elem_t mp_lv_rb_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_rb_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_insert), MP_ROM_PTR(&mp_lv_rb_insert_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_find), MP_ROM_PTR(&mp_lv_rb_find_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_node), MP_ROM_PTR(&mp_lv_rb_remove_node_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_rb_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop_node), MP_ROM_PTR(&mp_lv_rb_drop_node_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_rb_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_minimum), MP_ROM_PTR(&mp_lv_rb_minimum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_maximum), MP_ROM_PTR(&mp_lv_rb_maximum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_rb_destroy_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_rb_t_locals_dict, mp_lv_rb_t_locals_dict_table); + /* * lvgl extension definition for: - * char *lv_strndup(const char *src, size_t max_len) + * lv_rb_node_t *lv_rb_minimum_from(lv_rb_node_t *node) */ -static mp_obj_t mp_lv_strndup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_minimum_from(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *src = (const char *)(char*)convert_from_str(mp_args[0]); - size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); - char * _res = ((char *(*)(const char *, size_t))lv_func_ptr)(src, max_len); - return convert_to_str((void*)_res); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[0]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_func_ptr)(node); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strndup_mpobj, 2, mp_lv_strndup, lv_strndup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_minimum_from); -/* Reusing lv_strcpy for lv_strcat */ +/* Reusing lv_rb_minimum_from for lv_rb_maximum_from */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcat_mpobj, 2, mp_lv_strcpy, lv_strcat); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_maximum_from); -/* Reusing lv_strncpy for lv_strncat */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncat_mpobj, 3, mp_lv_strncpy, lv_strncat); +static const mp_rom_map_elem_t mp_lv_rb_node_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_node_t))) }, + { MP_ROM_QSTR(MP_QSTR_minimum_from), MP_ROM_PTR(&mp_lv_rb_minimum_from_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_maximum_from), MP_ROM_PTR(&mp_lv_rb_maximum_from_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_rb_node_t_locals_dict, mp_lv_rb_node_t_locals_dict_table); + /* * lvgl extension definition for: - * char *lv_strchr(const char *str, int c) + * void lv_text_attributes_init(lv_text_attributes_t *attributes) */ -static mp_obj_t mp_lv_strchr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_text_attributes_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *str = (const char *)(char*)convert_from_str(mp_args[0]); - int c = (int)mp_obj_get_int(mp_args[1]); - char * _res = ((char *(*)(const char *, int))lv_func_ptr)(str, c); - return convert_to_str((void*)_res); + lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(mp_args[0]); + ((void (*)(lv_text_attributes_t *))lv_func_ptr)(attributes); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strchr_mpobj, 2, mp_lv_strchr, lv_strchr); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_text_attributes_init_mpobj, 1, mp_lv_text_attributes_init, lv_text_attributes_init); -/* Reusing lv_obj_style_init for lv_mem_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_init_mpobj, 0, mp_lv_obj_style_init, lv_mem_init); +static const mp_rom_map_elem_t mp_lv_text_attributes_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_text_attributes_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_text_attributes_init_mpobj) }, -/* Reusing lv_obj_style_init for lv_mem_deinit */ +}; + +static MP_DEFINE_CONST_DICT(mp_lv_text_attributes_t_locals_dict, mp_lv_text_attributes_t_locals_dict_table); + + +/* + * + * Global Module Functions + * + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_deinit_mpobj, 0, mp_lv_obj_style_init, lv_mem_deinit); - /* * lvgl extension definition for: - * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) + * inline static int32_t lv_sqr(int32_t x) */ -static mp_obj_t mp_lv_mem_add_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_sqr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *mem = mp_to_ptr(mp_args[0]); - size_t bytes = (size_t)mp_obj_get_int(mp_args[1]); - lv_mem_pool_t _res = ((lv_mem_pool_t (*)(void *, size_t))lv_func_ptr)(mem, bytes); - return ptr_to_mp(_res); + int32_t x = (int32_t)mp_obj_get_int(mp_args[0]); + int32_t _res = ((int32_t (*)(int32_t))lv_func_ptr)(x); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_add_pool_mpobj, 2, mp_lv_mem_add_pool, lv_mem_add_pool); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sqr_mpobj, 1, mp_lv_sqr, lv_sqr); + + +static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_mem_remove_pool(lv_mem_pool_t pool) + * inline static uint16_t lv_color_swap_16(uint16_t c) */ -static mp_obj_t mp_lv_mem_remove_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_swap_16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_mem_pool_t pool = mp_to_ptr(mp_args[0]); - ((void (*)(lv_mem_pool_t))lv_func_ptr)(pool); - return mp_const_none; + uint16_t c = (uint16_t)mp_obj_get_int(mp_args[0]); + uint16_t _res = ((uint16_t (*)(uint16_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_remove_pool_mpobj, 1, mp_lv_mem_remove_pool, lv_mem_remove_pool); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_swap_16_mpobj, 1, mp_lv_color_swap_16, lv_color_swap_16); /* * lvgl extension definition for: - * void *lv_malloc(size_t size) + * inline static void lv_memzero(void *dst, size_t len) */ -static mp_obj_t mp_lv_malloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_memzero(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - size_t size = (size_t)mp_obj_get_int(mp_args[0]); - void * _res = ((void *(*)(size_t))lv_func_ptr)(size); - return ptr_to_mp((void*)_res); + void *dst = mp_to_ptr(mp_args[0]); + size_t len = (size_t)mp_obj_get_int(mp_args[1]); + ((void (*)(void *, size_t))lv_func_ptr)(dst, len); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_mpobj, 1, mp_lv_malloc, lv_malloc); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memzero_mpobj, 2, mp_lv_memzero, lv_memzero); /* * lvgl extension definition for: - * void *lv_calloc(size_t num, size_t size) + * inline static bool lv_streq(const char *s1, const char *s2) */ -static mp_obj_t mp_lv_calloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_streq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - size_t num = (size_t)mp_obj_get_int(mp_args[0]); - size_t size = (size_t)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(size_t, size_t))lv_func_ptr)(num, size); - return ptr_to_mp((void*)_res); + const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); + const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); + bool _res = ((bool (*)(const char *, const char *))lv_func_ptr)(s1, s2); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_calloc_mpobj, 2, mp_lv_calloc, lv_calloc); - -/* Reusing lv_malloc for lv_zalloc */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_zalloc_mpobj, 1, mp_lv_malloc, lv_zalloc); - -/* Reusing lv_malloc for lv_malloc_zeroed */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_zeroed_mpobj, 1, mp_lv_malloc, lv_malloc_zeroed); - -/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_streq_mpobj, 2, mp_lv_streq, lv_streq); /* * lvgl extension definition for: - * void *lv_realloc(void *data_p, size_t new_size) + * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) */ -static mp_obj_t mp_lv_realloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_get_prop_group(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *data_p = mp_to_ptr(mp_args[0]); - size_t new_size = (size_t)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(void *, size_t))lv_func_ptr)(data_p, new_size); - return ptr_to_mp((void*)_res); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_style_prop_t))lv_func_ptr)(prop); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_mpobj, 2, mp_lv_realloc, lv_realloc); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_get_prop_group_mpobj, 1, mp_lv_style_get_prop_group, lv_style_get_prop_group); -/* Reusing lv_realloc for lv_reallocf */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_reallocf_mpobj, 2, mp_lv_realloc, lv_reallocf); - -/* Reusing lv_malloc for lv_malloc_core */ +/* + * lvgl extension definition for: + * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_core_mpobj, 1, mp_lv_malloc, lv_malloc_core); - -/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free_core */ +static mp_obj_t mp_lv_style_prop_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); + uint8_t flag = (uint8_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_func_ptr)(prop, flag); + return convert_to_bool(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_core_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free_core); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_prop_has_flag_mpobj, 2, mp_lv_style_prop_has_flag, lv_style_prop_has_flag); -/* Reusing lv_realloc for lv_realloc_core */ +/* Reusing funcptr_lv_tick_get_cb_t for lv_task_handler */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_core_mpobj, 2, mp_lv_realloc, lv_realloc_core); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_task_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_task_handler); /* * lvgl extension definition for: - * lv_result_t lv_mem_test_core(void) + * inline static int lv_version_major(void) */ -static mp_obj_t mp_lv_mem_test_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_version_major(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_result_t _res = ((lv_result_t (*)(void))lv_func_ptr)(); + int _res = ((int (*)(void))lv_func_ptr)(); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_core_mpobj, 0, mp_lv_mem_test_core, lv_mem_test_core); - -/* Reusing lv_mem_test_core for lv_mem_test */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_mpobj, 0, mp_lv_mem_test_core, lv_mem_test); - -/* Reusing funcptr_lv_delay_cb_t for lv_tick_inc */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_inc_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_tick_inc); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_major_mpobj, 0, mp_lv_version_major, lv_version_major); -/* Reusing funcptr_lv_tick_get_cb_t for lv_tick_get */ +/* Reusing lv_version_major for lv_version_minor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_tick_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_minor_mpobj, 0, mp_lv_version_major, lv_version_minor); -/* Reusing lv_swap_bytes_32 for lv_tick_elaps */ +/* Reusing lv_version_major for lv_version_patch */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_elaps_mpobj, 1, mp_lv_swap_bytes_32, lv_tick_elaps); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_patch_mpobj, 0, mp_lv_version_major, lv_version_patch); /* * lvgl extension definition for: - * uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick) + * inline static const char *lv_version_info(void) */ -static mp_obj_t mp_lv_tick_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_version_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t tick = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t prev_tick = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(uint32_t, uint32_t))lv_func_ptr)(tick, prev_tick); - return mp_obj_new_int_from_uint(_res); + + const char * _res = ((const char *(*)(void))lv_func_ptr)(); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_diff_mpobj, 2, mp_lv_tick_diff, lv_tick_diff); - -/* Reusing funcptr_lv_delay_cb_t for lv_delay_ms */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_delay_ms); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_info_mpobj, 0, mp_lv_version_info, lv_version_info); /* - * Function NOT generated: - * Callback argument 'lv_delay_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data - * lv_delay_cb_t cb + * Callback function lv_thread_init_callback + * void callback(void *) */ - + +GENMPY_UNUSED static void lv_thread_init_callback_callback(void *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_thread_init_callback)), 1, mp_args); + return; +} + /* * lvgl extension definition for: - * void lv_delay_set_cb(lv_delay_cb_t cb) + * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) */ -static mp_obj_t mp_lv_delay_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_thread_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_delay_cb_t cb = mp_to_ptr(mp_args[0]); - ((void (*)(lv_delay_cb_t))lv_func_ptr)(cb); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[5]); + const char * const name = (const char * const)(char*)convert_from_str(mp_args[1]); + lv_thread_prio_t prio = (int)mp_obj_get_int(mp_args[2]); + void *callback = mp_lv_callback(mp_args[3], &lv_thread_init_callback_callback, MP_QSTR_lv_thread_init_callback, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + size_t stack_size = (size_t)mp_obj_get_int(mp_args[4]); + lv_thread_t *thread = mp_to_ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_func_ptr)(thread, name, prio, callback, stack_size, user_data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_set_cb_mpobj, 1, mp_lv_delay_set_cb, lv_delay_set_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_init_mpobj, 6, mp_lv_thread_init, lv_thread_init); /* - * Function NOT generated: - * Callback argument 'lv_tick_get_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data - * lv_tick_get_cb_t cb + * lvgl extension definition for: + * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) */ + +static mp_obj_t mp_lv_thread_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_thread_t *thread = mp_to_ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_thread_t *))lv_func_ptr)(thread); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_delete_mpobj, 1, mp_lv_thread_delete, lv_thread_delete); /* * lvgl extension definition for: - * void lv_tick_set_cb(lv_tick_get_cb_t cb) + * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) */ -static mp_obj_t mp_lv_tick_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_mutex_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_tick_get_cb_t cb = mp_to_ptr(mp_args[0]); - ((void (*)(lv_tick_get_cb_t))lv_func_ptr)(cb); - return mp_const_none; + lv_mutex_t *mutex = mp_array_to_i32ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_mutex_t *))lv_func_ptr)(mutex); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_set_cb_mpobj, 1, mp_lv_tick_set_cb, lv_tick_set_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_init_mpobj, 1, mp_lv_mutex_init, lv_mutex_init); + +/* Reusing lv_mutex_init for lv_mutex_lock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock); + +/* Reusing lv_mutex_init for lv_mutex_lock_isr */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_isr_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock_isr); + +/* Reusing lv_mutex_init for lv_mutex_unlock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_unlock_mpobj, 1, mp_lv_mutex_init, lv_mutex_unlock); + +/* Reusing lv_mutex_init for lv_mutex_delete */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_delete_mpobj, 1, mp_lv_mutex_init, lv_mutex_delete); /* * lvgl extension definition for: - * lv_tick_get_cb_t lv_tick_get_cb(void) + * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) */ -static mp_obj_t mp_lv_tick_get_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_thread_sync_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_tick_get_cb_t _res = ((lv_tick_get_cb_t (*)(void))lv_func_ptr)(); - return mp_lv_funcptr_lv_tick_get_cb_t(_res); + lv_thread_sync_t *sync = mp_to_ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_func_ptr)(sync); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_cb_mpobj, 0, mp_lv_tick_get_cb, lv_tick_get_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_init_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_init); -/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_handler */ +/* Reusing lv_thread_sync_init for lv_thread_sync_wait */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_wait_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_wait); -/* Reusing lv_swap_bytes_32 for lv_timer_handler_run_in_period */ +/* Reusing lv_thread_sync_init for lv_thread_sync_signal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_run_in_period_mpobj, 1, mp_lv_swap_bytes_32, lv_timer_handler_run_in_period); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal); -/* Reusing lv_obj_style_init for lv_timer_periodic_handler */ +/* Reusing lv_thread_sync_init for lv_thread_sync_signal_isr */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_isr_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal_isr); + +/* Reusing lv_thread_sync_init for lv_thread_sync_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_periodic_handler_mpobj, 0, mp_lv_obj_style_init, lv_timer_periodic_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_delete_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_delete); /* - * Function NOT generated: - * Callback argument 'lv_timer_handler_resume_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data - * lv_timer_handler_resume_cb_t cb + * lvgl extension definition for: + * inline static uint16_t lv_color_16_16_mix_inlined(uint16_t c1, uint16_t c2, uint8_t mix) */ + +static mp_obj_t mp_lv_color_16_16_mix_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + uint16_t c1 = (uint16_t)mp_obj_get_int(mp_args[0]); + uint16_t c2 = (uint16_t)mp_obj_get_int(mp_args[1]); + uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); + uint16_t _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_func_ptr)(c1, c2, mix); + return mp_obj_new_int_from_uint(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_inlined_mpobj, 3, mp_lv_color_16_16_mix_inlined, lv_color_16_16_mix_inlined); /* * lvgl extension definition for: - * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) + * inline static void lv_bidi_calculate_align_internal(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) */ -static mp_obj_t mp_lv_timer_handler_set_resume_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bidi_calculate_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_handler_resume_cb_t cb = mp_to_ptr(mp_args[0]); - void *data = mp_to_ptr(mp_args[1]); - ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_func_ptr)(cb, data); + lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); + lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_set_resume_cb_mpobj, 2, mp_lv_timer_handler_set_resume_cb, lv_timer_handler_set_resume_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_internal_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align_internal); /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create_basic(void) + * inline static bool lv_text_is_break_char(uint32_t letter) */ -static mp_obj_t mp_lv_timer_create_basic(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_text_is_break_char(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_timer_t * _res = ((lv_timer_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_timer_t((void*)_res); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[0]); + bool _res = ((bool (*)(uint32_t))lv_func_ptr)(letter); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_basic_mpobj, 0, mp_lv_timer_create_basic, lv_timer_create_basic); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_break_char_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_break_char); +/* Reusing lv_text_is_break_char for lv_text_is_hanging_space */ -/* - * Callback function lv_timer_create_timer_xcb - * void lv_timer_cb_t(lv_timer_t *) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_hanging_space_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_hanging_space); + +/* Reusing lv_text_is_break_char for lv_text_is_a_word */ -GENMPY_UNUSED static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_create_timer_xcb)), 1, mp_args); - return; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_a_word_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_a_word); + +/* Reusing lv_text_is_break_char for lv_text_is_marker */ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_marker_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_marker); + /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) + * inline static uint32_t lv_swap_bytes_32(uint32_t x) */ -static mp_obj_t mp_lv_timer_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_swap_bytes_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); - void *timer_xcb = mp_lv_callback(mp_args[0], &lv_timer_create_timer_xcb_callback, MP_QSTR_lv_timer_create_timer_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_func_ptr)(timer_xcb, period, user_data); - return mp_read_ptr_lv_timer_t((void*)_res); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t _res = ((uint32_t (*)(uint32_t))lv_func_ptr)(x); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_mpobj, 3, mp_lv_timer_create, lv_timer_create); - -/* Reusing lv_obj_enable_style_refresh for lv_timer_enable */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_enable_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_timer_enable); - -/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_idle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_idle_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_idle); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_32_mpobj, 1, mp_lv_swap_bytes_32, lv_swap_bytes_32); -/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_time_until_next */ +/* Reusing lv_color_swap_16 for lv_swap_bytes_16 */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_time_until_next_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_time_until_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_16_mpobj, 1, mp_lv_color_swap_16, lv_swap_bytes_16); /* @@ -45448,46 +48637,23 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_map_mpobj, 5, mp_lv_cubic_bez static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_rand_set_seed_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_rand_set_seed); -/* Reusing lv_tick_diff for lv_rand */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_rand_mpobj, 2, mp_lv_tick_diff, lv_rand); - - -/* - * Callback function lv_async_call_async_xcb - * void lv_async_cb_t(void *) - */ - -GENMPY_UNUSED static void lv_async_call_async_xcb_callback(void *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_async_call_async_xcb)), 1, mp_args); - return; -} - /* * lvgl extension definition for: - * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) + * uint32_t lv_rand(uint32_t min, uint32_t max) */ -static mp_obj_t mp_lv_async_call(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rand(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - void *async_xcb = mp_lv_callback(mp_args[0], &lv_async_call_async_xcb_callback, MP_QSTR_lv_async_call_async_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_result_t _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_func_ptr)(async_xcb, user_data); - return mp_obj_new_int(_res); + uint32_t min = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t max = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(uint32_t, uint32_t))lv_func_ptr)(min, max); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_mpobj, 2, mp_lv_async_call, lv_async_call); - -/* Reusing lv_async_call for lv_async_call_cancel */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_cancel_mpobj, 2, mp_lv_async_call, lv_async_call_cancel); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_rand_mpobj, 2, mp_lv_rand, lv_rand); /* @@ -45514,9 +48680,9 @@ static mp_obj_t mp_lv_anim_delete(size_t mp_n_args, const mp_obj_t *mp_args, voi static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_delete_mpobj, 2, mp_lv_anim_delete, lv_anim_delete); -/* Reusing lv_obj_style_init for lv_anim_delete_all */ +/* Reusing funcptr_user_cb for lv_anim_delete_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_delete_all_mpobj, 0, mp_lv_obj_style_init, lv_anim_delete_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_delete_all_mpobj, 0, mp_funcptr_user_cb, lv_anim_delete_all); /* @@ -45543,9 +48709,22 @@ static mp_obj_t mp_lv_anim_get(size_t mp_n_args, const mp_obj_t *mp_args, void * static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_get_mpobj, 2, mp_lv_anim_get, lv_anim_get); -/* Reusing lv_timer_create_basic for lv_anim_get_timer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_get_timer_mpobj, 0, mp_lv_timer_create_basic, lv_anim_get_timer); +/* + * lvgl extension definition for: + * lv_timer_t *lv_anim_get_timer(void) + */ + +static mp_obj_t mp_lv_anim_get_timer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + lv_timer_t * _res = ((lv_timer_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_timer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_get_timer_mpobj, 0, mp_lv_anim_get_timer, lv_anim_get_timer); /* @@ -45590,15 +48769,15 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_speed_clamped_mpobj, 3, /* * lvgl extension definition for: - * uint32_t lv_anim_resolve_speed(uint32_t speed, int32_t start, int32_t end) + * uint32_t lv_anim_resolve_speed(uint32_t speed_or_time, int32_t start, int32_t end) */ static mp_obj_t mp_lv_anim_resolve_speed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t speed = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t speed_or_time = (uint32_t)mp_obj_get_int(mp_args[0]); int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_func_ptr)(speed, start, end); + uint32_t _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_func_ptr)(speed_or_time, start, end); return mp_obj_new_int_from_uint(_res); } @@ -45610,9 +48789,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_resolve_speed_mpobj, 3, static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_speed_to_time_mpobj, 3, mp_lv_anim_resolve_speed, lv_anim_speed_to_time); -/* Reusing lv_obj_style_init for lv_anim_refr_now */ +/* Reusing funcptr_user_cb for lv_anim_refr_now */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_refr_now_mpobj, 0, mp_lv_obj_style_init, lv_anim_refr_now); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_refr_now_mpobj, 0, mp_funcptr_user_cb, lv_anim_refr_now); /* @@ -45653,6 +48832,230 @@ static mp_obj_t mp_lv_pct_to_px(size_t mp_n_args, const mp_obj_t *mp_args, void static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_pct_to_px_mpobj, 2, mp_lv_pct_to_px, lv_pct_to_px); +/* Reusing funcptr_lv_tick_get_cb_t for lv_event_register_id */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_register_id_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_event_register_id); + + +/* + * lvgl extension definition for: + * const char *lv_event_code_get_name(lv_event_code_t code) + */ + +static mp_obj_t mp_lv_event_code_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_code_t code = (int)mp_obj_get_int(mp_args[0]); + const char * _res = ((const char *(*)(lv_event_code_t))lv_func_ptr)(code); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_code_get_name_mpobj, 1, mp_lv_event_code_get_name, lv_event_code_get_name); + + +/* + * lvgl extension definition for: + * lv_group_t *lv_group_create(void) + */ + +static mp_obj_t mp_lv_group_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + lv_group_t * _res = ((lv_group_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_group_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_create_mpobj, 0, mp_lv_group_create, lv_group_create); + +/* Reusing lv_group_create for lv_group_get_default */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_default_mpobj, 0, mp_lv_group_create, lv_group_get_default); + +/* Reusing lv_obj_set_parent for lv_group_swap_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_swap_obj_mpobj, 2, mp_lv_obj_set_parent, lv_group_swap_obj); + +/* Reusing lv_obj_move_foreground for lv_group_remove_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_remove_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_remove_obj); + +/* Reusing lv_obj_move_foreground for lv_group_focus_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_focus_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_focus_obj); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_group_get_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_count_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_group_get_count); + + +/* + * lvgl extension definition for: + * lv_group_t *lv_group_by_index(uint32_t index) + */ + +static mp_obj_t mp_lv_group_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_group_t * _res = ((lv_group_t *(*)(uint32_t))lv_func_ptr)(index); + return mp_read_ptr_lv_group_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_by_index_mpobj, 1, mp_lv_group_by_index, lv_group_by_index); + +/* Reusing lv_image_cache_is_enabled for lv_is_initialized */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_is_initialized_mpobj, 0, mp_lv_image_cache_is_enabled, lv_is_initialized); + +/* Reusing funcptr_user_cb for lv_mem_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_init_mpobj, 0, mp_funcptr_user_cb, lv_mem_init); + +/* Reusing funcptr_user_cb for lv_mem_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_deinit_mpobj, 0, mp_funcptr_user_cb, lv_mem_deinit); + + +/* + * lvgl extension definition for: + * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) + */ + +static mp_obj_t mp_lv_mem_add_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *mem = mp_to_ptr(mp_args[0]); + size_t bytes = (size_t)mp_obj_get_int(mp_args[1]); + lv_mem_pool_t _res = ((lv_mem_pool_t (*)(void *, size_t))lv_func_ptr)(mem, bytes); + return ptr_to_mp(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_add_pool_mpobj, 2, mp_lv_mem_add_pool, lv_mem_add_pool); + + +/* + * lvgl extension definition for: + * void lv_mem_remove_pool(lv_mem_pool_t pool) + */ + +static mp_obj_t mp_lv_mem_remove_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_mem_pool_t pool = mp_to_ptr(mp_args[0]); + ((void (*)(lv_mem_pool_t))lv_func_ptr)(pool); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_remove_pool_mpobj, 1, mp_lv_mem_remove_pool, lv_mem_remove_pool); + + +/* + * lvgl extension definition for: + * void *lv_malloc(size_t size) + */ + +static mp_obj_t mp_lv_malloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + size_t size = (size_t)mp_obj_get_int(mp_args[0]); + void * _res = ((void *(*)(size_t))lv_func_ptr)(size); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_mpobj, 1, mp_lv_malloc, lv_malloc); + + +/* + * lvgl extension definition for: + * void *lv_calloc(size_t num, size_t size) + */ + +static mp_obj_t mp_lv_calloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + size_t num = (size_t)mp_obj_get_int(mp_args[0]); + size_t size = (size_t)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(size_t, size_t))lv_func_ptr)(num, size); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_calloc_mpobj, 2, mp_lv_calloc, lv_calloc); + +/* Reusing lv_malloc for lv_zalloc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_zalloc_mpobj, 1, mp_lv_malloc, lv_zalloc); + +/* Reusing lv_malloc for lv_malloc_zeroed */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_zeroed_mpobj, 1, mp_lv_malloc, lv_malloc_zeroed); + +/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free); + + +/* + * lvgl extension definition for: + * void *lv_realloc(void *data_p, size_t new_size) + */ + +static mp_obj_t mp_lv_realloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *data_p = mp_to_ptr(mp_args[0]); + size_t new_size = (size_t)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(void *, size_t))lv_func_ptr)(data_p, new_size); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_mpobj, 2, mp_lv_realloc, lv_realloc); + +/* Reusing lv_realloc for lv_reallocf */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_reallocf_mpobj, 2, mp_lv_realloc, lv_reallocf); + +/* Reusing lv_malloc for lv_malloc_core */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_core_mpobj, 1, mp_lv_malloc, lv_malloc_core); + +/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free_core */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_core_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free_core); + +/* Reusing lv_realloc for lv_realloc_core */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_core_mpobj, 2, mp_lv_realloc, lv_realloc_core); + + +/* + * lvgl extension definition for: + * lv_result_t lv_mem_test_core(void) + */ + +static mp_obj_t mp_lv_mem_test_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + lv_result_t _res = ((lv_result_t (*)(void))lv_func_ptr)(); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_core_mpobj, 0, mp_lv_mem_test_core, lv_mem_test_core); + +/* Reusing lv_mem_test_core for lv_mem_test */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_mpobj, 0, mp_lv_mem_test_core, lv_mem_test); + /* * lvgl extension definition for: @@ -45751,24 +49154,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color32_make_mpobj, 4, mp_lv_ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_hex3_mpobj, 1, mp_lv_color_hex, lv_color_hex3); +/* Reusing lv_color_16_16_mix_inlined for lv_color_16_16_mix */ -/* - * lvgl extension definition for: - * uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix) - */ - -static mp_obj_t mp_lv_color_16_16_mix(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - uint16_t c1 = (uint16_t)mp_obj_get_int(mp_args[0]); - uint16_t c2 = (uint16_t)mp_obj_get_int(mp_args[1]); - uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); - uint16_t _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_func_ptr)(c1, c2, mix); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_mpobj, 3, mp_lv_color_16_16_mix, lv_color_16_16_mix); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_mpobj, 3, mp_lv_color_16_16_mix_inlined, lv_color_16_16_mix); /* @@ -45888,225 +49276,305 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_palette_darken_mpobj, 2, mp_l /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) + * void *lv_memcpy(void *dst, const void *src, size_t len) */ -static mp_obj_t mp_lv_draw_buf_get_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_memcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_draw_buf_handlers_t * _res = ((lv_draw_buf_handlers_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + void *dst = mp_to_ptr(mp_args[0]); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(void *, const void *, size_t))lv_func_ptr)(dst, src, len); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_handlers); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcpy_mpobj, 3, mp_lv_memcpy, lv_memcpy); -/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_font_handlers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_font_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_font_handlers); - -/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_image_handlers */ +/* + * lvgl extension definition for: + * void lv_memset(void *dst, uint8_t v, size_t len) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_image_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_image_handlers); - -/* Reusing funcptr_lv_draw_buf_align_cb_t for lv_draw_buf_align */ +static mp_obj_t mp_lv_memset(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *dst = mp_to_ptr(mp_args[0]); + uint8_t v = (uint8_t)mp_obj_get_int(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + ((void (*)(void *, uint8_t, size_t))lv_func_ptr)(dst, v, len); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_align_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, lv_draw_buf_align); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memset_mpobj, 3, mp_lv_memset, lv_memset); -/* Reusing funcptr_lv_draw_buf_width_to_stride_cb_t for lv_draw_buf_width_to_stride */ +/* Reusing lv_memcpy for lv_memmove */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_width_to_stride_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, lv_draw_buf_width_to_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memmove_mpobj, 3, mp_lv_memcpy, lv_memmove); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * int lv_memcmp(const void *p1, const void *p2, size_t len) */ -static mp_obj_t mp_lv_draw_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_memcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[2]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(w, h, cf, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const void *p1 = (const void *)mp_to_ptr(mp_args[0]); + const void *p2 = (const void *)mp_to_ptr(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + int _res = ((int (*)(const void *, const void *, size_t))lv_func_ptr)(p1, p2, len); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_create_mpobj, 4, mp_lv_draw_buf_create, lv_draw_buf_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcmp_mpobj, 3, mp_lv_memcmp, lv_memcmp); /* - * Function NOT generated: - * Callback function 'int (*cmp)(const void *pRef, const void *pElement)' must receive a struct pointer with user_data member as its first argument! - * int (*cmp)(const void *pRef, const void *pElement) + * lvgl extension definition for: + * size_t lv_strlen(const char *str) */ - -#define funcptr_cmp NULL +static mp_obj_t mp_lv_strlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *str = (const char *)(char*)convert_from_str(mp_args[0]); + size_t _res = ((size_t (*)(const char *))lv_func_ptr)(str); + return mp_obj_new_int_from_uint(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlen_mpobj, 1, mp_lv_strlen, lv_strlen); + /* * lvgl extension definition for: - * int cmp(const void *pRef, const void *pElement) + * size_t lv_strnlen(const char *str, size_t max_len) */ -static mp_obj_t mp_funcptr_cmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strnlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *pRef = (const void *)mp_to_ptr(mp_args[0]); - const void *pElement = (const void *)mp_to_ptr(mp_args[1]); - int _res = ((int (*)(const void *, const void *))lv_func_ptr)(pRef, pElement); - return mp_obj_new_int(_res); + const char *str = (const char *)(char*)convert_from_str(mp_args[0]); + size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); + size_t _res = ((size_t (*)(const char *, size_t))lv_func_ptr)(str, max_len); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_cmp_mpobj, 2, mp_funcptr_cmp, funcptr_cmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strnlen_mpobj, 2, mp_lv_strnlen, lv_strnlen); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_cmp(void *func){ return mp_lv_funcptr(&mp_funcptr_cmp_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) + * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) */ -static mp_obj_t mp_lv_utils_bsearch(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strlcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *key = (const void *)mp_to_ptr(mp_args[0]); - const void *base = (const void *)mp_to_ptr(mp_args[1]); - size_t n = (size_t)mp_obj_get_int(mp_args[2]); - size_t size = (size_t)mp_obj_get_int(mp_args[3]); - int (*cmp)(const void *pRef, const void *pElement) = mp_to_ptr(mp_args[4]); - void * _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_func_ptr)(key, base, n, size, cmp); - return ptr_to_mp((void*)_res); + char *dst = (char*)convert_from_str(mp_args[0]); + const char *src = (const char *)(char*)convert_from_str(mp_args[1]); + size_t dst_size = (size_t)mp_obj_get_int(mp_args[2]); + size_t _res = ((size_t (*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dst_size); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv_utils_bsearch, lv_utils_bsearch); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlcpy_mpobj, 3, mp_lv_strlcpy, lv_strlcpy); /* - * Function NOT generated: - * Callback function 'lv_iter_next_cb next_cb' must receive a struct pointer with user_data member as its first argument! - * lv_iter_next_cb next_cb + * lvgl extension definition for: + * char *lv_strncpy(char *dst, const char *src, size_t dest_size) */ + +static mp_obj_t mp_lv_strncpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char *dst = (char*)convert_from_str(mp_args[0]); + const char *src = (const char *)(char*)convert_from_str(mp_args[1]); + size_t dest_size = (size_t)mp_obj_get_int(mp_args[2]); + char * _res = ((char *(*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dest_size); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncpy_mpobj, 3, mp_lv_strncpy, lv_strncpy); -#define funcptr_lv_iter_next_cb NULL +/* + * lvgl extension definition for: + * char *lv_strcpy(char *dst, const char *src) + */ + +static mp_obj_t mp_lv_strcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char *dst = (char*)convert_from_str(mp_args[0]); + const char *src = (const char *)(char*)convert_from_str(mp_args[1]); + char * _res = ((char *(*)(char *, const char *))lv_func_ptr)(dst, src); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcpy_mpobj, 2, mp_lv_strcpy, lv_strcpy); + /* * lvgl extension definition for: - * lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) + * int lv_strcmp(const char *s1, const char *s2) */ -static mp_obj_t mp_funcptr_lv_iter_next_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *instance = mp_to_ptr(mp_args[0]); - void *context = mp_to_ptr(mp_args[1]); - void *elem = mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(void *, void *, void *))lv_func_ptr)(instance, context, elem); + const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); + const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); + int _res = ((int (*)(const char *, const char *))lv_func_ptr)(s1, s2); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_next_cb_mpobj, 3, mp_funcptr_lv_iter_next_cb, funcptr_lv_iter_next_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcmp_mpobj, 2, mp_lv_strcmp, lv_strcmp); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_next_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_next_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) + * int lv_strncmp(const char *s1, const char *s2, size_t len) */ -static mp_obj_t mp_lv_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strncmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *instance = mp_to_ptr(mp_args[0]); - uint32_t elem_size = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t context_size = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_iter_next_cb next_cb = mp_to_ptr(mp_args[3]); - lv_iter_t * _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_func_ptr)(instance, elem_size, context_size, next_cb); - return mp_read_ptr_lv_iter_t((void*)_res); + const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); + const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + int _res = ((int (*)(const char *, const char *, size_t))lv_func_ptr)(s1, s2, len); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncmp_mpobj, 3, mp_lv_strncmp, lv_strncmp); + + +/* + * lvgl extension definition for: + * char *lv_strdup(const char *src) + */ + +static mp_obj_t mp_lv_strdup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *src = (const char *)(char*)convert_from_str(mp_args[0]); + char * _res = ((char *(*)(const char *))lv_func_ptr)(src); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_iter_create_mpobj, 4, mp_lv_iter_create, lv_iter_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strdup_mpobj, 1, mp_lv_strdup, lv_strdup); /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) + * char *lv_strndup(const char *src, size_t max_len) */ -static mp_obj_t mp_lv_circle_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strndup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_func_ptr)(capacity, element_size); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + const char *src = (const char *)(char*)convert_from_str(mp_args[0]); + size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); + char * _res = ((char *(*)(const char *, size_t))lv_func_ptr)(src, max_len); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_mpobj, 2, mp_lv_circle_buf_create, lv_circle_buf_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strndup_mpobj, 2, mp_lv_strndup, lv_strndup); + +/* Reusing lv_strcpy for lv_strcat */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcat_mpobj, 2, mp_lv_strcpy, lv_strcat); + +/* Reusing lv_strncpy for lv_strncat */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncat_mpobj, 3, mp_lv_strncpy, lv_strncat); /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) + * char *lv_strchr(const char *str, int c) */ -static mp_obj_t mp_lv_circle_buf_create_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strchr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *buf = mp_to_ptr(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_func_ptr)(buf, capacity, element_size); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + const char *str = (const char *)(char*)convert_from_str(mp_args[0]); + int c = (int)mp_obj_get_int(mp_args[1]); + char * _res = ((char *(*)(const char *, int))lv_func_ptr)(str, c); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_buf_mpobj, 3, mp_lv_circle_buf_create_from_buf, lv_circle_buf_create_from_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strchr_mpobj, 2, mp_lv_strchr, lv_strchr); /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) + * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) */ -static mp_obj_t mp_lv_circle_buf_create_from_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_get_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_func_ptr)(array); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + + lv_draw_buf_handlers_t * _res = ((lv_draw_buf_handlers_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_array_mpobj, 1, mp_lv_circle_buf_create_from_array, lv_circle_buf_create_from_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_handlers); -/* Reusing lv_obj_style_init for lv_lock */ +/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_font_handlers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_mpobj, 0, mp_lv_obj_style_init, lv_lock); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_font_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_font_handlers); -/* Reusing lv_mem_test_core for lv_lock_isr */ +/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_image_handlers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_isr_mpobj, 0, mp_lv_mem_test_core, lv_lock_isr); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_image_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_image_handlers); -/* Reusing lv_obj_style_init for lv_unlock */ +/* Reusing funcptr_lv_draw_buf_align_cb_t for lv_draw_buf_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_unlock_mpobj, 0, mp_lv_obj_style_init, lv_unlock); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_align_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, lv_draw_buf_align); -/* Reusing funcptr_lv_delay_cb_t for lv_sleep_ms */ +/* Reusing funcptr_lv_draw_buf_width_to_stride_cb_t for lv_draw_buf_width_to_stride */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sleep_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_sleep_ms); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_width_to_stride_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, lv_draw_buf_width_to_stride); + + +/* + * lvgl extension definition for: + * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + */ + +static mp_obj_t mp_lv_draw_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[2]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(w, h, cf, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_create_mpobj, 4, mp_lv_draw_buf_create, lv_draw_buf_create); /* @@ -46148,6 +49616,10 @@ static mp_obj_t mp_lv_text_get_size(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_mpobj, 7, mp_lv_text_get_size, lv_text_get_size); +/* Reusing lv_bidi_calculate_align_internal for lv_bidi_calculate_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align); + /* * Callback function lv_layout_register_cb @@ -46182,13 +49654,13 @@ static mp_obj_t mp_lv_layout_register(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_register_mpobj, 2, mp_lv_layout_register, lv_layout_register); -/* Reusing lv_obj_style_init for lv_flex_init */ +/* Reusing funcptr_user_cb for lv_flex_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_flex_init_mpobj, 0, mp_lv_obj_style_init, lv_flex_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_flex_init_mpobj, 0, mp_funcptr_user_cb, lv_flex_init); -/* Reusing lv_obj_style_init for lv_grid_init */ +/* Reusing funcptr_user_cb for lv_grid_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_grid_init_mpobj, 0, mp_lv_obj_style_init, lv_grid_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_grid_init_mpobj, 0, mp_funcptr_user_cb, lv_grid_init); /* @@ -46275,26 +49747,96 @@ static mp_obj_t mp_lv_style_prop_lookup_flags(size_t mp_n_args, const mp_obj_t * static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_prop_lookup_flags_mpobj, 1, mp_lv_style_prop_lookup_flags, lv_style_prop_lookup_flags); -/* Reusing funcptr_lv_tick_get_cb_t for lv_event_register_id */ +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_handler */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_register_id_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_event_register_id); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_handler); + +/* Reusing lv_swap_bytes_32 for lv_timer_handler_run_in_period */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_run_in_period_mpobj, 1, mp_lv_swap_bytes_32, lv_timer_handler_run_in_period); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_time_to_next */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_time_to_next_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_time_to_next); + +/* Reusing funcptr_user_cb for lv_timer_periodic_handler */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_periodic_handler_mpobj, 0, mp_funcptr_user_cb, lv_timer_periodic_handler); + + +/* + * Function NOT generated: + * Callback argument 'lv_timer_handler_resume_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data + * lv_timer_handler_resume_cb_t cb + */ /* * lvgl extension definition for: - * const char *lv_event_code_get_name(lv_event_code_t code) + * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) */ -static mp_obj_t mp_lv_event_code_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_handler_set_resume_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_code_t code = (int)mp_obj_get_int(mp_args[0]); - const char * _res = ((const char *(*)(lv_event_code_t))lv_func_ptr)(code); - return convert_to_str((void*)_res); + lv_timer_handler_resume_cb_t cb = mp_to_ptr(mp_args[0]); + void *data = mp_to_ptr(mp_args[1]); + ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_func_ptr)(cb, data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_code_get_name_mpobj, 1, mp_lv_event_code_get_name, lv_event_code_get_name); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_set_resume_cb_mpobj, 2, mp_lv_timer_handler_set_resume_cb, lv_timer_handler_set_resume_cb); + +/* Reusing lv_anim_get_timer for lv_timer_create_basic */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_basic_mpobj, 0, mp_lv_anim_get_timer, lv_timer_create_basic); + + +/* + * Callback function lv_timer_create_timer_xcb + * void lv_timer_cb_t(lv_timer_t *) + */ + +GENMPY_UNUSED static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_create_timer_xcb)), 1, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) + */ + +static mp_obj_t mp_lv_timer_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); + void *timer_xcb = mp_lv_callback(mp_args[0], &lv_timer_create_timer_xcb_callback, MP_QSTR_lv_timer_create_timer_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_func_ptr)(timer_xcb, period, user_data); + return mp_read_ptr_lv_timer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_mpobj, 3, mp_lv_timer_create, lv_timer_create); + +/* Reusing lv_obj_enable_style_refresh for lv_timer_enable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_enable_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_timer_enable); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_idle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_idle_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_idle); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_time_until_next */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_time_until_next_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_time_until_next); /* @@ -46331,22 +49873,9 @@ static mp_obj_t mp_lv_display_get_default(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_display_get_default_mpobj, 0, mp_lv_display_get_default, lv_display_get_default); +/* Reusing lv_obj_move_foreground for lv_screen_load */ -/* - * lvgl extension definition for: - * void lv_screen_load(struct _lv_obj_t *scr) - */ - -static mp_obj_t mp_lv_screen_load(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - struct _lv_obj_t *scr = mp_to_lv(mp_args[0]); - ((void (*)(struct _lv_obj_t *))lv_func_ptr)(scr); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_screen_load_mpobj, 1, mp_lv_screen_load, lv_screen_load); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_screen_load_mpobj, 1, mp_lv_obj_move_foreground, lv_screen_load); /* @@ -46413,181 +49942,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_clamp_width_mpobj, 4, mp_lv_c static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_clamp_height_mpobj, 4, mp_lv_clamp_width, lv_clamp_height); +/* Reusing funcptr_user_cb for lv_draw_init */ -/* - * lvgl extension definition for: - * lv_fs_drv_t *lv_fs_get_drv(char letter) - */ - -static mp_obj_t mp_lv_fs_get_drv(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - char letter = (char)mp_obj_get_int(mp_args[0]); - lv_fs_drv_t * _res = ((lv_fs_drv_t *(*)(char))lv_func_ptr)(letter); - return mp_read_ptr_lv_fs_drv_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_drv_mpobj, 1, mp_lv_fs_get_drv, lv_fs_get_drv); - - -/* - * lvgl extension definition for: - * void lv_fs_remove_drive(char letter) - */ - -static mp_obj_t mp_lv_fs_remove_drive(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - char letter = (char)mp_obj_get_int(mp_args[0]); - ((void (*)(char))lv_func_ptr)(letter); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_remove_drive_mpobj, 1, mp_lv_fs_remove_drive, lv_fs_remove_drive); - - -/* - * lvgl extension definition for: - * bool lv_fs_is_ready(char letter) - */ - -static mp_obj_t mp_lv_fs_is_ready(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - char letter = (char)mp_obj_get_int(mp_args[0]); - bool _res = ((bool (*)(char))lv_func_ptr)(letter); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_is_ready_mpobj, 1, mp_lv_fs_is_ready, lv_fs_is_ready); - - -/* - * lvgl extension definition for: - * lv_fs_res_t lv_fs_path_get_size(const char *path, uint32_t *size_res) - */ - -static mp_obj_t mp_lv_fs_path_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const char *path = (const char *)(char*)convert_from_str(mp_args[0]); - uint32_t *size_res = mp_array_to_u32ptr(mp_args[1]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(const char *, uint32_t *))lv_func_ptr)(path, size_res); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_path_get_size_mpobj, 2, mp_lv_fs_path_get_size, lv_fs_path_get_size); - - -/* - * lvgl extension definition for: - * lv_fs_res_t lv_fs_load_to_buf(void *buf, uint32_t buf_size, const char *path) - */ - -static mp_obj_t mp_lv_fs_load_to_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *buf = mp_to_ptr(mp_args[0]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[1]); - const char *path = (const char *)(char*)convert_from_str(mp_args[2]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(void *, uint32_t, const char *))lv_func_ptr)(buf, buf_size, path); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_load_to_buf_mpobj, 3, mp_lv_fs_load_to_buf, lv_fs_load_to_buf); - - -/* - * lvgl extension definition for: - * void *lv_fs_load_with_alloc(const char *path, uint32_t *size) - */ - -static mp_obj_t mp_lv_fs_load_with_alloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const char *path = (const char *)(char*)convert_from_str(mp_args[0]); - uint32_t *size = mp_array_to_u32ptr(mp_args[1]); - void * _res = ((void *(*)(const char *, uint32_t *))lv_func_ptr)(path, size); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_load_with_alloc_mpobj, 2, mp_lv_fs_load_with_alloc, lv_fs_load_with_alloc); - - -/* - * lvgl extension definition for: - * char *lv_fs_get_letters(char *buf) - */ - -static mp_obj_t mp_lv_fs_get_letters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - char *buf = (char*)convert_from_str(mp_args[0]); - char * _res = ((char *(*)(char *))lv_func_ptr)(buf); - return convert_to_str((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_letters_mpobj, 1, mp_lv_fs_get_letters, lv_fs_get_letters); - - -/* - * lvgl extension definition for: - * const char *lv_fs_get_ext(const char *fn) - */ - -static mp_obj_t mp_lv_fs_get_ext(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const char *fn = (const char *)(char*)convert_from_str(mp_args[0]); - const char * _res = ((const char *(*)(const char *))lv_func_ptr)(fn); - return convert_to_str((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_ext_mpobj, 1, mp_lv_fs_get_ext, lv_fs_get_ext); - -/* Reusing lv_fs_get_letters for lv_fs_up */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_up_mpobj, 1, mp_lv_fs_get_letters, lv_fs_up); - -/* Reusing lv_fs_get_ext for lv_fs_get_last */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_last_mpobj, 1, mp_lv_fs_get_ext, lv_fs_get_last); - - -/* - * lvgl extension definition for: - * int lv_fs_path_join(char *buf, size_t buf_sz, const char *base, const char *end) - */ - -static mp_obj_t mp_lv_fs_path_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - char *buf = (char*)convert_from_str(mp_args[0]); - size_t buf_sz = (size_t)mp_obj_get_int(mp_args[1]); - const char *base = (const char *)(char*)convert_from_str(mp_args[2]); - const char *end = (const char *)(char*)convert_from_str(mp_args[3]); - int _res = ((int (*)(char *, size_t, const char *, const char *))lv_func_ptr)(buf, buf_sz, base, end); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_path_join_mpobj, 4, mp_lv_fs_path_join, lv_fs_path_join); - -/* Reusing lv_obj_style_init for lv_draw_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_init_mpobj, 0, mp_lv_obj_style_init, lv_draw_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_init_mpobj, 0, mp_funcptr_user_cb, lv_draw_init); -/* Reusing lv_obj_style_init for lv_draw_deinit */ +/* Reusing funcptr_user_cb for lv_draw_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_deinit_mpobj, 0, mp_lv_obj_style_init, lv_draw_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_deinit_mpobj, 0, mp_funcptr_user_cb, lv_draw_deinit); /* Reusing lv_malloc for lv_draw_create_unit */ @@ -46630,21 +49991,21 @@ static mp_obj_t mp_lv_draw_finalize_task_creation(size_t mp_n_args, const mp_obj static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_finalize_task_creation_mpobj, 2, mp_lv_draw_finalize_task_creation, lv_draw_finalize_task_creation); -/* Reusing lv_obj_style_init for lv_draw_dispatch */ +/* Reusing funcptr_user_cb for lv_draw_dispatch */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_mpobj, 0, mp_lv_obj_style_init, lv_draw_dispatch); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_mpobj, 0, mp_funcptr_user_cb, lv_draw_dispatch); -/* Reusing lv_obj_style_init for lv_draw_dispatch_wait_for_request */ +/* Reusing funcptr_user_cb for lv_draw_dispatch_wait_for_request */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_wait_for_request_mpobj, 0, mp_lv_obj_style_init, lv_draw_dispatch_wait_for_request); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_wait_for_request_mpobj, 0, mp_funcptr_user_cb, lv_draw_dispatch_wait_for_request); -/* Reusing lv_obj_style_init for lv_draw_wait_for_finish */ +/* Reusing funcptr_user_cb for lv_draw_wait_for_finish */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_wait_for_finish_mpobj, 0, mp_lv_obj_style_init, lv_draw_wait_for_finish); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_wait_for_finish_mpobj, 0, mp_funcptr_user_cb, lv_draw_wait_for_finish); -/* Reusing lv_obj_style_init for lv_draw_dispatch_request */ +/* Reusing funcptr_user_cb for lv_draw_dispatch_request */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_request_mpobj, 0, mp_lv_obj_style_init, lv_draw_dispatch_request); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_request_mpobj, 0, mp_funcptr_user_cb, lv_draw_dispatch_request); /* Reusing funcptr_lv_tick_get_cb_t for lv_draw_get_unit_count */ @@ -46804,6 +50165,18 @@ static mp_obj_t mp_lv_draw_layer_finish_drop_shadow(size_t mp_n_args, const mp_o static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_finish_drop_shadow_mpobj, 2, mp_lv_draw_layer_finish_drop_shadow, lv_draw_layer_finish_drop_shadow); +/* Reusing lv_layer_init for lv_draw_layer_dealloc_buf */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_dealloc_buf_mpobj, 1, mp_lv_layer_init, lv_draw_layer_dealloc_buf); + +/* Reusing lv_layer_init for lv_draw_layer_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_deinit_mpobj, 1, mp_lv_layer_init, lv_draw_layer_deinit); + +/* Reusing lv_layer_init for lv_draw_layer_delete */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_delete_mpobj, 1, mp_lv_layer_init, lv_draw_layer_delete); + /* * lvgl extension definition for: @@ -46917,26 +50290,194 @@ static mp_obj_t mp_lv_draw_character(size_t mp_n_args, const mp_obj_t *mp_args, -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_character_mpobj, 4, mp_lv_draw_character, lv_draw_character); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_character_mpobj, 4, mp_lv_draw_character, lv_draw_character); + + +/* + * lvgl extension definition for: + * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) + */ + +static mp_obj_t mp_lv_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); + ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_func_ptr)(layer, dsc, point); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_letter_mpobj, 3, mp_lv_draw_letter, lv_draw_letter); + + +/* + * lvgl extension definition for: + * lv_fs_drv_t *lv_fs_get_drv(char letter) + */ + +static mp_obj_t mp_lv_fs_get_drv(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char letter = (char)mp_obj_get_int(mp_args[0]); + lv_fs_drv_t * _res = ((lv_fs_drv_t *(*)(char))lv_func_ptr)(letter); + return mp_read_ptr_lv_fs_drv_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_drv_mpobj, 1, mp_lv_fs_get_drv, lv_fs_get_drv); + + +/* + * lvgl extension definition for: + * void lv_fs_remove_drive(char letter) + */ + +static mp_obj_t mp_lv_fs_remove_drive(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char letter = (char)mp_obj_get_int(mp_args[0]); + ((void (*)(char))lv_func_ptr)(letter); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_remove_drive_mpobj, 1, mp_lv_fs_remove_drive, lv_fs_remove_drive); + + +/* + * lvgl extension definition for: + * bool lv_fs_is_ready(char letter) + */ + +static mp_obj_t mp_lv_fs_is_ready(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char letter = (char)mp_obj_get_int(mp_args[0]); + bool _res = ((bool (*)(char))lv_func_ptr)(letter); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_is_ready_mpobj, 1, mp_lv_fs_is_ready, lv_fs_is_ready); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_path_get_size(const char *path, uint32_t *size_res) + */ + +static mp_obj_t mp_lv_fs_path_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *path = (const char *)(char*)convert_from_str(mp_args[0]); + uint32_t *size_res = mp_array_to_u32ptr(mp_args[1]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(const char *, uint32_t *))lv_func_ptr)(path, size_res); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_path_get_size_mpobj, 2, mp_lv_fs_path_get_size, lv_fs_path_get_size); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_load_to_buf(void *buf, uint32_t buf_size, const char *path) + */ + +static mp_obj_t mp_lv_fs_load_to_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *buf = mp_to_ptr(mp_args[0]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[1]); + const char *path = (const char *)(char*)convert_from_str(mp_args[2]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(void *, uint32_t, const char *))lv_func_ptr)(buf, buf_size, path); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_load_to_buf_mpobj, 3, mp_lv_fs_load_to_buf, lv_fs_load_to_buf); + + +/* + * lvgl extension definition for: + * void *lv_fs_load_with_alloc(const char *path, uint32_t *size) + */ + +static mp_obj_t mp_lv_fs_load_with_alloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *path = (const char *)(char*)convert_from_str(mp_args[0]); + uint32_t *size = mp_array_to_u32ptr(mp_args[1]); + void * _res = ((void *(*)(const char *, uint32_t *))lv_func_ptr)(path, size); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_load_with_alloc_mpobj, 2, mp_lv_fs_load_with_alloc, lv_fs_load_with_alloc); + + +/* + * lvgl extension definition for: + * char *lv_fs_get_letters(char *buf) + */ + +static mp_obj_t mp_lv_fs_get_letters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char *buf = (char*)convert_from_str(mp_args[0]); + char * _res = ((char *(*)(char *))lv_func_ptr)(buf); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_letters_mpobj, 1, mp_lv_fs_get_letters, lv_fs_get_letters); + + +/* + * lvgl extension definition for: + * const char *lv_fs_get_ext(const char *fn) + */ + +static mp_obj_t mp_lv_fs_get_ext(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *fn = (const char *)(char*)convert_from_str(mp_args[0]); + const char * _res = ((const char *(*)(const char *))lv_func_ptr)(fn); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_ext_mpobj, 1, mp_lv_fs_get_ext, lv_fs_get_ext); + +/* Reusing lv_fs_get_letters for lv_fs_up */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_up_mpobj, 1, mp_lv_fs_get_letters, lv_fs_up); + +/* Reusing lv_fs_get_ext for lv_fs_get_last */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_get_last_mpobj, 1, mp_lv_fs_get_ext, lv_fs_get_last); /* * lvgl extension definition for: - * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) + * int lv_fs_path_join(char *buf, size_t buf_sz, const char *base, const char *end) */ -static mp_obj_t mp_lv_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_fs_path_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); - ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_func_ptr)(layer, dsc, point); - return mp_const_none; + char *buf = (char*)convert_from_str(mp_args[0]); + size_t buf_sz = (size_t)mp_obj_get_int(mp_args[1]); + const char *base = (const char *)(char*)convert_from_str(mp_args[2]); + const char *end = (const char *)(char*)convert_from_str(mp_args[3]); + int _res = ((int (*)(char *, size_t, const char *, const char *))lv_func_ptr)(buf, buf_sz, base, end); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_letter_mpobj, 3, mp_lv_draw_letter, lv_draw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_path_join_mpobj, 4, mp_lv_fs_path_join, lv_fs_path_join); /* @@ -47061,111 +50602,269 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_blur_mpobj, 3, mp_lv_dra /* * lvgl extension definition for: - * lv_group_t *lv_group_create(void) + * lv_indev_t *lv_indev_create(void) */ -static mp_obj_t mp_lv_group_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_indev_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_group_t * _res = ((lv_group_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_group_t((void*)_res); + lv_indev_t * _res = ((lv_indev_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_indev_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_create_mpobj, 0, mp_lv_group_create, lv_group_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_create_mpobj, 0, mp_lv_indev_create, lv_indev_create); -/* Reusing lv_group_create for lv_group_get_default */ +/* Reusing funcptr_lv_timer_cb_t for lv_indev_read_timer_cb */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_default_mpobj, 0, mp_lv_group_create, lv_group_get_default); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_read_timer_cb_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_indev_read_timer_cb); -/* Reusing lv_obj_set_parent for lv_group_swap_obj */ +/* Reusing lv_indev_create for lv_indev_active */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_swap_obj_mpobj, 2, mp_lv_obj_set_parent, lv_group_swap_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_active_mpobj, 0, mp_lv_indev_create, lv_indev_active); -/* Reusing lv_obj_move_foreground for lv_group_remove_obj */ +/* Reusing funcptr_lv_screen_create_cb_t for lv_indev_get_active_obj */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_remove_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_remove_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_get_active_obj_mpobj, 0, mp_funcptr_lv_screen_create_cb_t, lv_indev_get_active_obj); -/* Reusing lv_obj_move_foreground for lv_group_focus_obj */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_focus_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_focus_obj); - -/* Reusing funcptr_lv_tick_get_cb_t for lv_group_get_count */ +/* + * lvgl extension definition for: + * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_count_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_group_get_count); +static mp_obj_t mp_lv_indev_search_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, point); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_search_obj_mpobj, 2, mp_lv_indev_search_obj, lv_indev_search_obj); /* * lvgl extension definition for: - * lv_group_t *lv_group_by_index(uint32_t index) + * lv_subject_t *lv_subject_create(lv_subject_type_t type) */ -static mp_obj_t mp_lv_group_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_subject_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_group_t * _res = ((lv_group_t *(*)(uint32_t))lv_func_ptr)(index); - return mp_read_ptr_lv_group_t((void*)_res); + lv_subject_type_t type = (int)mp_obj_get_int(mp_args[0]); + lv_subject_t * _res = ((lv_subject_t *(*)(lv_subject_type_t))lv_func_ptr)(type); + return mp_read_ptr_lv_subject_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_by_index_mpobj, 1, mp_lv_group_by_index, lv_group_by_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_subject_create_mpobj, 1, mp_lv_subject_create, lv_subject_create); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_now */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_now_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_now); + +/* Reusing funcptr_lv_timer_cb_t for lv_display_refr_timer */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_display_refr_timer_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_display_refr_timer); /* * lvgl extension definition for: - * lv_indev_t *lv_indev_create(void) + * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) */ -static mp_obj_t mp_lv_indev_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); + ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(layer, dsc); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_mask_rect_mpobj, 2, mp_lv_draw_mask_rect, lv_draw_mask_rect); - lv_indev_t * _res = ((lv_indev_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_indev_t((void*)_res); + +/* + * lvgl extension definition for: + * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) + */ + +static mp_obj_t mp_lv_snapshot_take(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, cf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_create_mpobj, 0, mp_lv_indev_create, lv_indev_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_take); -/* Reusing funcptr_lv_timer_cb_t for lv_indev_read_timer_cb */ +/* Reusing lv_snapshot_take for lv_snapshot_create_draw_buf */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_read_timer_cb_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_indev_read_timer_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_create_draw_buf_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_create_draw_buf); -/* Reusing lv_indev_create for lv_indev_active */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_active_mpobj, 0, mp_lv_indev_create, lv_indev_active); +/* + * lvgl extension definition for: + * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) + */ + +static mp_obj_t mp_lv_snapshot_reshape_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_func_ptr)(obj, draw_buf); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_reshape_draw_buf_mpobj, 2, mp_lv_snapshot_reshape_draw_buf, lv_snapshot_reshape_draw_buf); -/* Reusing funcptr_lv_screen_create_cb_t for lv_indev_get_active_obj */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_get_active_obj_mpobj, 0, mp_funcptr_lv_screen_create_cb_t, lv_indev_get_active_obj); +/* + * lvgl extension definition for: + * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) + */ + +static mp_obj_t mp_lv_snapshot_take_to_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_func_ptr)(obj, cf, draw_buf); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_draw_buf_mpobj, 3, mp_lv_snapshot_take_to_draw_buf, lv_snapshot_take_to_draw_buf); + +/* Reusing lv_image_buf_free for lv_snapshot_free */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_snapshot_free_mpobj, 1, mp_lv_image_buf_free, lv_snapshot_free); /* * lvgl extension definition for: - * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) + * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) */ -static mp_obj_t mp_lv_indev_search_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_snapshot_take_to_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, point); - return lv_to_mp((void*)_res); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(mp_args[2]); + void *buf = mp_to_ptr(mp_args[3]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_func_ptr)(obj, cf, dsc, buf, buf_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_search_obj_mpobj, 2, mp_lv_indev_search_obj, lv_indev_search_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_buf_mpobj, 5, mp_lv_snapshot_take_to_buf, lv_snapshot_take_to_buf); -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_now */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_now_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_now); +/* + * lvgl extension definition for: + * void lv_draw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) + */ + +static mp_obj_t mp_lv_draw_i1_to_argb8888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const void *buf_i1 = (const void *)mp_to_ptr(mp_args[0]); + void *buf_argb8888 = mp_to_ptr(mp_args[1]); + uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t buf_i1_stride = (uint32_t)mp_obj_get_int(mp_args[4]); + uint32_t buf_argb8888_stride = (uint32_t)mp_obj_get_int(mp_args[5]); + uint32_t index0_color = (uint32_t)mp_obj_get_int(mp_args[6]); + uint32_t index1_color = (uint32_t)mp_obj_get_int(mp_args[7]); + ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_i1_to_argb8888_mpobj, 8, mp_lv_draw_i1_to_argb8888, lv_draw_i1_to_argb8888); -/* Reusing funcptr_lv_timer_cb_t for lv_display_refr_timer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_display_refr_timer_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_display_refr_timer); +/* + * lvgl extension definition for: + * void lv_draw_rgb565_swap(void *buf, uint32_t buf_size_px) + */ + +static mp_obj_t mp_lv_draw_rgb565_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *buf = mp_to_ptr(mp_args[0]); + uint32_t buf_size_px = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(void *, uint32_t))lv_func_ptr)(buf, buf_size_px); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_rgb565_swap_mpobj, 2, mp_lv_draw_rgb565_swap, lv_draw_rgb565_swap); + +/* Reusing lv_draw_rgb565_swap for lv_draw_i1_invert */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_i1_invert_mpobj, 2, mp_lv_draw_rgb565_swap, lv_draw_i1_invert); + + +/* + * lvgl extension definition for: + * void lv_draw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) + */ + +static mp_obj_t mp_lv_draw_i1_convert_to_vtiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const void *buf = (const void *)mp_to_ptr(mp_args[0]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); + void *out_buf = mp_to_ptr(mp_args[4]); + uint32_t out_buf_size = (uint32_t)mp_obj_get_int(mp_args[5]); + bool bit_order_lsb = mp_obj_is_true(mp_args[6]); + ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_func_ptr)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_i1_convert_to_vtiled_mpobj, 7, mp_lv_draw_i1_convert_to_vtiled, lv_draw_i1_convert_to_vtiled); + + +/* + * lvgl extension definition for: + * void lv_draw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) + */ + +static mp_obj_t mp_lv_draw_rotate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const void *src = (const void *)mp_to_ptr(mp_args[0]); + void *dest = mp_to_ptr(mp_args[1]); + int32_t src_width = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t src_height = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); + int32_t dest_stride = (int32_t)mp_obj_get_int(mp_args[5]); + lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[6]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[7]); + ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_func_ptr)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_rotate_mpobj, 8, mp_lv_draw_rotate, lv_draw_rotate); /* @@ -47248,17 +50947,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_imgfont_create_mpobj, 3, mp_l static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_imgfont_destroy_mpobj, 1, mp_funcptr_delete_cb, lv_imgfont_destroy); -/* Reusing lv_obj_style_init for lv_span_stack_init */ +/* Reusing funcptr_user_cb for lv_fs_memfs_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_init_mpobj, 0, mp_lv_obj_style_init, lv_span_stack_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_memfs_init_mpobj, 0, mp_funcptr_user_cb, lv_fs_memfs_init); -/* Reusing lv_obj_style_init for lv_span_stack_deinit */ +/* Reusing funcptr_user_cb for lv_bin_decoder_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_deinit_mpobj, 0, mp_lv_obj_style_init, lv_span_stack_deinit); - -/* Reusing lv_obj_style_init for lv_bin_decoder_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_init_mpobj, 0, mp_lv_obj_style_init, lv_bin_decoder_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_init_mpobj, 0, mp_funcptr_user_cb, lv_bin_decoder_init); /* Reusing funcptr_lv_image_decoder_info_f_t for lv_bin_decoder_info */ @@ -47276,527 +50971,750 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_open_mpobj, 2, mp static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_close_mpobj, 2, mp_funcptr_lv_image_decoder_close_f_t, lv_bin_decoder_close); -/* Reusing lv_obj_style_init for lv_fs_memfs_init */ +/* Reusing funcptr_user_cb for lv_lodepng_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_init_mpobj, 0, mp_funcptr_user_cb, lv_lodepng_init); + +/* Reusing funcptr_user_cb for lv_lodepng_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_deinit_mpobj, 0, mp_funcptr_user_cb, lv_lodepng_deinit); + + +/* + * Callback function lv_async_call_async_xcb + * void lv_async_cb_t(void *) + */ + +GENMPY_UNUSED static void lv_async_call_async_xcb_callback(void *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_async_call_async_xcb)), 1, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) + */ + +static mp_obj_t mp_lv_async_call(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[1]); + void *async_xcb = mp_lv_callback(mp_args[0], &lv_async_call_async_xcb_callback, MP_QSTR_lv_async_call_async_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_result_t _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_func_ptr)(async_xcb, user_data); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_mpobj, 2, mp_lv_async_call, lv_async_call); + +/* Reusing lv_async_call for lv_async_call_cancel */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_cancel_mpobj, 2, mp_lv_async_call, lv_async_call_cancel); + +/* Reusing funcptr_user_cb for lv_lock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_mpobj, 0, mp_funcptr_user_cb, lv_lock); + +/* Reusing lv_mem_test_core for lv_lock_isr */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_memfs_init_mpobj, 0, mp_lv_obj_style_init, lv_fs_memfs_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_isr_mpobj, 0, mp_lv_mem_test_core, lv_lock_isr); -/* Reusing lv_obj_style_init for lv_lodepng_init */ +/* Reusing funcptr_user_cb for lv_unlock */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_init_mpobj, 0, mp_lv_obj_style_init, lv_lodepng_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_unlock_mpobj, 0, mp_funcptr_user_cb, lv_unlock); -/* Reusing lv_obj_style_init for lv_lodepng_deinit */ +/* Reusing funcptr_lv_delay_cb_t for lv_sleep_ms */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_deinit_mpobj, 0, mp_lv_obj_style_init, lv_lodepng_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sleep_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_sleep_ms); /* * lvgl extension definition for: - * void lv_draw_sw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) + * lv_theme_t *lv_theme_create(void) */ -static mp_obj_t mp_lv_draw_sw_i1_to_argb8888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *buf_i1 = (const void *)mp_to_ptr(mp_args[0]); - void *buf_argb8888 = mp_to_ptr(mp_args[1]); - uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t buf_i1_stride = (uint32_t)mp_obj_get_int(mp_args[4]); - uint32_t buf_argb8888_stride = (uint32_t)mp_obj_get_int(mp_args[5]); - uint32_t index0_color = (uint32_t)mp_obj_get_int(mp_args[6]); - uint32_t index1_color = (uint32_t)mp_obj_get_int(mp_args[7]); - ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); + + lv_theme_t * _res = ((lv_theme_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_theme_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_create_mpobj, 0, mp_lv_theme_create, lv_theme_create); + + +/* + * lvgl extension definition for: + * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_theme_get_from_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_theme_t * _res = ((lv_theme_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_theme_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_from_obj_mpobj, 1, mp_lv_theme_get_from_obj, lv_theme_get_from_obj); + +/* Reusing lv_obj_move_foreground for lv_theme_apply */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_theme_apply); + + +/* + * lvgl extension definition for: + * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_theme_get_font_small(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_font_t * _res = ((const lv_font_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_font_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_small_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_small); + +/* Reusing lv_theme_get_font_small for lv_theme_get_font_normal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_normal_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_normal); + +/* Reusing lv_theme_get_font_small for lv_theme_get_font_large */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_large_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_large); + +/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_primary */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_primary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_primary); + +/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_secondary */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_secondary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_secondary); + + +/* + * lvgl extension definition for: + * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) + */ + +static mp_obj_t mp_lv_theme_default_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_color_t color_primary = mp_write_lv_color_t(mp_args[1]); + lv_color_t color_secondary = mp_write_lv_color_t(mp_args[2]); + bool dark = mp_obj_is_true(mp_args[3]); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[4]); + lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_func_ptr)(disp, color_primary, color_secondary, dark, font); + return mp_read_ptr_lv_theme_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_init_mpobj, 5, mp_lv_theme_default_init, lv_theme_default_init); + +/* Reusing lv_image_cache_is_enabled for lv_theme_default_is_inited */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_is_inited_mpobj, 0, mp_lv_image_cache_is_enabled, lv_theme_default_is_inited); + +/* Reusing lv_theme_create for lv_theme_default_get */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_get_mpobj, 0, mp_lv_theme_create, lv_theme_default_get); + +/* Reusing funcptr_user_cb for lv_theme_default_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_deinit_mpobj, 0, mp_funcptr_user_cb, lv_theme_default_deinit); + +/* Reusing funcptr_lv_delay_cb_t for lv_tick_inc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_inc_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_tick_inc); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_tick_get */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_tick_get); + +/* Reusing lv_swap_bytes_32 for lv_tick_elaps */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_elaps_mpobj, 1, mp_lv_swap_bytes_32, lv_tick_elaps); + +/* Reusing lv_rand for lv_tick_diff */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_diff_mpobj, 2, mp_lv_rand, lv_tick_diff); + +/* Reusing funcptr_lv_delay_cb_t for lv_delay_ms */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_delay_ms); + + +/* + * Function NOT generated: + * Callback argument 'lv_delay_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data + * lv_delay_cb_t cb + */ + + +/* + * lvgl extension definition for: + * void lv_delay_set_cb(lv_delay_cb_t cb) + */ + +static mp_obj_t mp_lv_delay_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_delay_cb_t cb = mp_to_ptr(mp_args[0]); + ((void (*)(lv_delay_cb_t))lv_func_ptr)(cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_i1_to_argb8888_mpobj, 8, mp_lv_draw_sw_i1_to_argb8888, lv_draw_sw_i1_to_argb8888); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_set_cb_mpobj, 1, mp_lv_delay_set_cb, lv_delay_set_cb); + + +/* + * Function NOT generated: + * Callback argument 'lv_tick_get_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data + * lv_tick_get_cb_t cb + */ /* * lvgl extension definition for: - * void lv_draw_sw_rgb565_swap(void *buf, uint32_t buf_size_px) + * void lv_tick_set_cb(lv_tick_get_cb_t cb) */ -static mp_obj_t mp_lv_draw_sw_rgb565_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tick_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *buf = mp_to_ptr(mp_args[0]); - uint32_t buf_size_px = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(void *, uint32_t))lv_func_ptr)(buf, buf_size_px); + lv_tick_get_cb_t cb = mp_to_ptr(mp_args[0]); + ((void (*)(lv_tick_get_cb_t))lv_func_ptr)(cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_rgb565_swap_mpobj, 2, mp_lv_draw_sw_rgb565_swap, lv_draw_sw_rgb565_swap); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_set_cb_mpobj, 1, mp_lv_tick_set_cb, lv_tick_set_cb); + + +/* + * lvgl extension definition for: + * lv_tick_get_cb_t lv_tick_get_cb(void) + */ + +static mp_obj_t mp_lv_tick_get_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + lv_tick_get_cb_t _res = ((lv_tick_get_cb_t (*)(void))lv_func_ptr)(); + return mp_lv_funcptr_lv_tick_get_cb_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_cb_mpobj, 0, mp_lv_tick_get_cb, lv_tick_get_cb); + +/* Reusing funcptr_user_cb for lv_span_stack_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_init_mpobj, 0, mp_funcptr_user_cb, lv_span_stack_init); + +/* Reusing funcptr_user_cb for lv_span_stack_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_deinit_mpobj, 0, mp_funcptr_user_cb, lv_span_stack_deinit); + +/* Reusing funcptr_user_cb for lv_os_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_init_mpobj, 0, mp_funcptr_user_cb, lv_os_init); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_os_get_idle_percent */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_get_idle_percent_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_os_get_idle_percent); + + +/* + * Function NOT generated: + * Callback function 'lv_iter_next_cb next_cb' must receive a struct pointer with user_data member as its first argument! + * lv_iter_next_cb next_cb + */ + +#define funcptr_lv_iter_next_cb NULL + + +/* + * lvgl extension definition for: + * lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) + */ + +static mp_obj_t mp_funcptr_lv_iter_next_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *instance = mp_to_ptr(mp_args[0]); + void *context = mp_to_ptr(mp_args[1]); + void *elem = mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(void *, void *, void *))lv_func_ptr)(instance, context, elem); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_next_cb_mpobj, 3, mp_funcptr_lv_iter_next_cb, funcptr_lv_iter_next_cb); -/* Reusing lv_draw_sw_rgb565_swap for lv_draw_sw_i1_invert */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_next_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_next_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_i1_invert_mpobj, 2, mp_lv_draw_sw_rgb565_swap, lv_draw_sw_i1_invert); - /* * lvgl extension definition for: - * void lv_draw_sw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) + * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) */ -static mp_obj_t mp_lv_draw_sw_i1_convert_to_vtiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *buf = (const void *)mp_to_ptr(mp_args[0]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); - void *out_buf = mp_to_ptr(mp_args[4]); - uint32_t out_buf_size = (uint32_t)mp_obj_get_int(mp_args[5]); - bool bit_order_lsb = mp_obj_is_true(mp_args[6]); - ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_func_ptr)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); - return mp_const_none; + void *instance = mp_to_ptr(mp_args[0]); + uint32_t elem_size = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t context_size = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_iter_next_cb next_cb = mp_to_ptr(mp_args[3]); + lv_iter_t * _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_func_ptr)(instance, elem_size, context_size, next_cb); + return mp_read_ptr_lv_iter_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_i1_convert_to_vtiled_mpobj, 7, mp_lv_draw_sw_i1_convert_to_vtiled, lv_draw_sw_i1_convert_to_vtiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_iter_create_mpobj, 4, mp_lv_iter_create, lv_iter_create); /* * lvgl extension definition for: - * void lv_draw_sw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) + * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) */ -static mp_obj_t mp_lv_draw_sw_rotate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_alloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *src = (const void *)mp_to_ptr(mp_args[0]); - void *dest = mp_to_ptr(mp_args[1]); - int32_t src_width = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t src_height = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); - int32_t dest_stride = (int32_t)mp_obj_get_int(mp_args[5]); - lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[6]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[7]); - ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_func_ptr)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); - return mp_const_none; + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_func_ptr)(node_size, cache); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_rotate_mpobj, 8, mp_lv_draw_sw_rotate, lv_draw_sw_rotate); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_alloc_mpobj, 2, mp_lv_cache_entry_alloc, lv_cache_entry_alloc); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) + * uint32_t lv_cache_entry_get_size(const uint32_t node_size) */ -static mp_obj_t mp_lv_snapshot_take(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, cf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const uint32_t))lv_func_ptr)(node_size); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_take); - -/* Reusing lv_snapshot_take for lv_snapshot_create_draw_buf */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_create_draw_buf_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_create_draw_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_size_mpobj, 1, mp_lv_cache_entry_get_size, lv_cache_entry_get_size); /* * lvgl extension definition for: - * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) + * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) */ -static mp_obj_t mp_lv_snapshot_reshape_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_entry(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_func_ptr)(obj, draw_buf); - return mp_obj_new_int(_res); + void *data = mp_to_ptr(mp_args[0]); + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[1]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_func_ptr)(data, node_size); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_reshape_draw_buf_mpobj, 2, mp_lv_snapshot_reshape_draw_buf, lv_snapshot_reshape_draw_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_entry_mpobj, 2, mp_lv_cache_entry_get_entry, lv_cache_entry_get_entry); + +/* Reusing funcptr_user_cb for lv_draw_sw_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_init_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_init); + +/* Reusing funcptr_user_cb for lv_draw_sw_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_deinit_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_deinit); /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) + * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t src_cf, void *dest_buf) */ -static mp_obj_t mp_lv_snapshot_take_to_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_func_ptr)(obj, cf, draw_buf); - return mp_obj_new_int(_res); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const void *src_buf = (const void *)mp_to_ptr(mp_args[1]); + int32_t src_w = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t src_h = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[5]); + const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(mp_args[6]); + lv_color_format_t src_cf = (int)mp_obj_get_int(mp_args[7]); + void *dest_buf = mp_to_ptr(mp_args[8]); + ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_func_ptr)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, src_cf, dest_buf); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_draw_buf_mpobj, 3, mp_lv_snapshot_take_to_draw_buf, lv_snapshot_take_to_draw_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_transform_mpobj, 9, mp_lv_draw_sw_transform, lv_draw_sw_transform); -/* Reusing lv_image_buf_free for lv_snapshot_free */ +/* Reusing lv_color_format_has_alpha for lv_draw_sw_unregister_blend_handler */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_snapshot_free_mpobj, 1, mp_lv_image_buf_free, lv_snapshot_free); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_unregister_blend_handler_mpobj, 1, mp_lv_color_format_has_alpha, lv_draw_sw_unregister_blend_handler); /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) + * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) */ -static mp_obj_t mp_lv_snapshot_take_to_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_get_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(mp_args[2]); - void *buf = mp_to_ptr(mp_args[3]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_func_ptr)(obj, cf, dsc, buf, buf_size); - return mp_obj_new_int(_res); + lv_color_format_t dest_cf = (int)mp_obj_get_int(mp_args[0]); + lv_draw_sw_blend_handler_t _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_func_ptr)(dest_cf); + return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_buf_mpobj, 5, mp_lv_snapshot_take_to_buf, lv_snapshot_take_to_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_get_blend_handler_mpobj, 1, mp_lv_draw_sw_get_blend_handler, lv_draw_sw_get_blend_handler); +/* Reusing funcptr_user_cb for lv_timer_core_init */ -/* - * lvgl extension definition for: - * lv_theme_t *lv_theme_create(void) - */ - -static mp_obj_t mp_lv_theme_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_init_mpobj, 0, mp_funcptr_user_cb, lv_timer_core_init); - lv_theme_t * _res = ((lv_theme_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_theme_t((void*)_res); -} +/* Reusing funcptr_user_cb for lv_timer_core_deinit */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_deinit_mpobj, 0, mp_funcptr_user_cb, lv_timer_core_deinit); + +/* Reusing funcptr_user_cb for lv_anim_core_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_create_mpobj, 0, mp_lv_theme_create, lv_theme_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_init_mpobj, 0, mp_funcptr_user_cb, lv_anim_core_init); +/* Reusing funcptr_user_cb for lv_anim_core_deinit */ -/* - * lvgl extension definition for: - * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_deinit_mpobj, 0, mp_funcptr_user_cb, lv_anim_core_deinit); + +/* Reusing lv_obj_enable_style_refresh for lv_anim_enable_vsync_mode */ -static mp_obj_t mp_lv_theme_get_from_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_theme_t * _res = ((lv_theme_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_theme_t((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_enable_vsync_mode_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_anim_enable_vsync_mode); + +/* Reusing funcptr_user_cb for lv_draw_buf_init_handlers */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_init_handlers_mpobj, 0, mp_funcptr_user_cb, lv_draw_buf_init_handlers); + +/* Reusing funcptr_user_cb for lv_draw_sw_mask_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_from_obj_mpobj, 1, mp_lv_theme_get_from_obj, lv_theme_get_from_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_init_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_mask_init); -/* Reusing lv_obj_move_foreground for lv_theme_apply */ +/* Reusing funcptr_user_cb for lv_draw_sw_mask_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_theme_apply); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_deinit_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_mask_deinit); /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) + * lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void *masks[], lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len) */ -static mp_obj_t mp_lv_theme_get_font_small(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_mask_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_font_t * _res = ((const lv_font_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_font_t((void*)_res); + void **masks = mp_arr_to_void_ptr____(mp_args[0]); + lv_opa_t *mask_buf = mp_array_to_u8ptr(mp_args[1]); + int32_t abs_x = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t abs_y = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t len = (int32_t)mp_obj_get_int(mp_args[4]); + lv_draw_sw_mask_res_t _res = ((lv_draw_sw_mask_res_t (*)(void *[], lv_opa_t *, int32_t, int32_t, int32_t))lv_func_ptr)(masks, mask_buf, abs_x, abs_y, len); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_small_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_small); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_apply_mpobj, 5, mp_lv_draw_sw_mask_apply, lv_draw_sw_mask_apply); -/* Reusing lv_theme_get_font_small for lv_theme_get_font_normal */ +/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_draw_sw_mask_free_param */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_normal_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_normal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_free_param_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_draw_sw_mask_free_param); -/* Reusing lv_theme_get_font_small for lv_theme_get_font_large */ +/* Reusing funcptr_user_cb for lv_draw_sw_mask_cleanup */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_large_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_large); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_cleanup_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_mask_cleanup); -/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_primary */ +/* Reusing funcptr_user_cb for lv_layout_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_primary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_primary); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_init_mpobj, 0, mp_funcptr_user_cb, lv_layout_init); -/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_secondary */ +/* Reusing funcptr_user_cb for lv_layout_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_secondary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_secondary); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_deinit_mpobj, 0, mp_funcptr_user_cb, lv_layout_deinit); /* * lvgl extension definition for: - * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) + * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) */ -static mp_obj_t mp_lv_theme_default_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_layout_get_min_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_color_t color_primary = mp_write_lv_color_t(mp_args[1]); - lv_color_t color_secondary = mp_write_lv_color_t(mp_args[2]); - bool dark = mp_obj_is_true(mp_args[3]); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[4]); - lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_func_ptr)(disp, color_primary, color_secondary, dark, font); - return mp_read_ptr_lv_theme_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t *size = mp_array_to_i32ptr(mp_args[1]); + bool width = mp_obj_is_true(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_func_ptr)(obj, size, width); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_init_mpobj, 5, mp_lv_theme_default_init, lv_theme_default_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_get_min_size_mpobj, 3, mp_lv_layout_get_min_size, lv_layout_get_min_size); -/* Reusing lv_image_header_cache_is_enabled for lv_theme_default_is_inited */ +/* Reusing lv_obj_move_foreground for lv_layout_apply */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_is_inited_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_theme_default_is_inited); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_layout_apply); -/* Reusing lv_theme_create for lv_theme_default_get */ +/* Reusing funcptr_user_cb for lv_group_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_get_mpobj, 0, mp_lv_theme_create, lv_theme_default_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_init_mpobj, 0, mp_funcptr_user_cb, lv_group_init); -/* Reusing lv_obj_style_init for lv_theme_default_deinit */ +/* Reusing funcptr_user_cb for lv_group_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_deinit_mpobj, 0, mp_lv_obj_style_init, lv_theme_default_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_deinit_mpobj, 0, mp_funcptr_user_cb, lv_group_deinit); +/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_event_mark_deleted */ -/* - * lvgl extension definition for: - * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) - */ - -static mp_obj_t mp_lv_draw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); - ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(layer, dsc); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_event_mark_deleted); + +/* Reusing funcptr_user_cb for lv_subject_global_init */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_subject_global_init_mpobj, 0, mp_funcptr_user_cb, lv_subject_global_init); + +/* Reusing funcptr_user_cb for lv_subject_global_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_mask_rect_mpobj, 2, mp_lv_draw_mask_rect, lv_draw_mask_rect); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_subject_global_deinit_mpobj, 0, mp_funcptr_user_cb, lv_subject_global_deinit); -/* Reusing lv_obj_style_init for lv_draw_sw_mask_init */ +/* Reusing funcptr_user_cb for lv_refr_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_init_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_mask_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_init_mpobj, 0, mp_funcptr_user_cb, lv_refr_init); -/* Reusing lv_obj_style_init for lv_draw_sw_mask_deinit */ +/* Reusing funcptr_user_cb for lv_refr_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_deinit_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_mask_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_deinit_mpobj, 0, mp_funcptr_user_cb, lv_refr_deinit); /* * lvgl extension definition for: - * lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void *masks[], lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len) + * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) */ -static mp_obj_t mp_lv_draw_sw_mask_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_inv_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void **masks = mp_arr_to_void_ptr____(mp_args[0]); - lv_opa_t *mask_buf = mp_array_to_u8ptr(mp_args[1]); - int32_t abs_x = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t abs_y = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t len = (int32_t)mp_obj_get_int(mp_args[4]); - lv_draw_sw_mask_res_t _res = ((lv_draw_sw_mask_res_t (*)(void *[], lv_opa_t *, int32_t, int32_t, int32_t))lv_func_ptr)(masks, mask_buf, abs_x, abs_y, len); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area_p); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_apply_mpobj, 5, mp_lv_draw_sw_mask_apply, lv_draw_sw_mask_apply); - -/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_draw_sw_mask_free_param */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_free_param_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_draw_sw_mask_free_param); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_inv_area_mpobj, 2, mp_lv_inv_area, lv_inv_area); -/* Reusing lv_obj_style_init for lv_draw_sw_init */ +/* Reusing lv_display_get_default for lv_refr_get_disp_refreshing */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_init_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_disp_refreshing_mpobj, 0, mp_lv_display_get_default, lv_refr_get_disp_refreshing); -/* Reusing lv_obj_style_init for lv_draw_sw_deinit */ +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_set_disp_refreshing */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_deinit_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_set_disp_refreshing_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_set_disp_refreshing); /* * lvgl extension definition for: - * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t cf, void *dest_buf) + * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) */ -static mp_obj_t mp_lv_draw_sw_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_refr_get_top_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const void *src_buf = (const void *)mp_to_ptr(mp_args[1]); - int32_t src_w = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t src_h = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[5]); - const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(mp_args[6]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[7]); - void *dest_buf = mp_to_ptr(mp_args[8]); - ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_func_ptr)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, cf, dest_buf); - return mp_const_none; + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_func_ptr)(area_p, obj); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_transform_mpobj, 9, mp_lv_draw_sw_transform, lv_draw_sw_transform); - -/* Reusing lv_color_format_has_alpha for lv_draw_sw_unregister_blend_handler */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_unregister_blend_handler_mpobj, 1, mp_lv_color_format_has_alpha, lv_draw_sw_unregister_blend_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_top_obj_mpobj, 2, mp_lv_refr_get_top_obj, lv_refr_get_top_obj); /* * lvgl extension definition for: - * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) + * void lv_draw_sw_grad_color_calculate(const lv_grad_dsc_t *dsc, int32_t range, int32_t frac, lv_color_t *color_out, lv_opa_t *opa_out) */ -static mp_obj_t mp_lv_draw_sw_get_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_grad_color_calculate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_format_t dest_cf = (int)mp_obj_get_int(mp_args[0]); - lv_draw_sw_blend_handler_t _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_func_ptr)(dest_cf); - return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); + const lv_grad_dsc_t *dsc = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t range = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t frac = (int32_t)mp_obj_get_int(mp_args[2]); + lv_color_t *color_out = mp_write_ptr_lv_color_t(mp_args[3]); + lv_opa_t *opa_out = mp_array_to_u8ptr(mp_args[4]); + ((void (*)(const lv_grad_dsc_t *, int32_t, int32_t, lv_color_t *, lv_opa_t *))lv_func_ptr)(dsc, range, frac, color_out, opa_out); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_get_blend_handler_mpobj, 1, mp_lv_draw_sw_get_blend_handler, lv_draw_sw_get_blend_handler); - -/* Reusing lv_obj_style_init for lv_os_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_init_mpobj, 0, mp_lv_obj_style_init, lv_os_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_grad_color_calculate_mpobj, 5, mp_lv_draw_sw_grad_color_calculate, lv_draw_sw_grad_color_calculate); -/* Reusing funcptr_lv_tick_get_cb_t for lv_os_get_idle_percent */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_get_idle_percent_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_os_get_idle_percent); - -/* Reusing lv_obj_style_init for lv_timer_core_init */ +/* + * lvgl extension definition for: + * lv_draw_sw_grad_calc_t *lv_draw_sw_grad_get(const lv_grad_dsc_t *gradient, int32_t w, int32_t h) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_init_mpobj, 0, mp_lv_obj_style_init, lv_timer_core_init); - -/* Reusing lv_obj_style_init for lv_timer_core_deinit */ +static mp_obj_t mp_lv_draw_sw_grad_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_grad_dsc_t *gradient = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h = (int32_t)mp_obj_get_int(mp_args[2]); + lv_draw_sw_grad_calc_t * _res = ((lv_draw_sw_grad_calc_t *(*)(const lv_grad_dsc_t *, int32_t, int32_t))lv_func_ptr)(gradient, w, h); + return mp_read_ptr_lv_draw_sw_grad_calc_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_deinit_mpobj, 0, mp_lv_obj_style_init, lv_timer_core_deinit); - -/* Reusing lv_obj_style_init for lv_anim_core_init */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_init_mpobj, 0, mp_lv_obj_style_init, lv_anim_core_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_grad_get_mpobj, 3, mp_lv_draw_sw_grad_get, lv_draw_sw_grad_get); -/* Reusing lv_obj_style_init for lv_anim_core_deinit */ +/* Reusing funcptr_user_cb for lv_fs_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_deinit_mpobj, 0, mp_lv_obj_style_init, lv_anim_core_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_init_mpobj, 0, mp_funcptr_user_cb, lv_fs_init); -/* Reusing lv_obj_enable_style_refresh for lv_anim_enable_vsync_mode */ +/* Reusing funcptr_user_cb for lv_fs_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_enable_vsync_mode_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_anim_enable_vsync_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_deinit_mpobj, 0, mp_funcptr_user_cb, lv_fs_deinit); -/* Reusing lv_obj_style_init for lv_draw_buf_init_handlers */ +/* Reusing lv_obj_get_scroll_end for lv_indev_scroll_get_snap_dist */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_init_handlers_mpobj, 0, mp_lv_obj_style_init, lv_draw_buf_init_handlers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_scroll_get_snap_dist_mpobj, 2, mp_lv_obj_get_scroll_end, lv_indev_scroll_get_snap_dist); /* * lvgl extension definition for: - * uint32_t lv_cache_entry_get_size(const uint32_t node_size) + * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_lv_cache_entry_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const uint32_t))lv_func_ptr)(node_size); - return mp_obj_new_int_from_uint(_res); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_func_ptr)(capacity, element_size); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_size_mpobj, 1, mp_lv_cache_entry_get_size, lv_cache_entry_get_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_mpobj, 2, mp_lv_circle_buf_create, lv_circle_buf_create); /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) + * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_lv_cache_entry_get_entry(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_create_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *data = mp_to_ptr(mp_args[0]); - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[1]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_func_ptr)(data, node_size); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + void *buf = mp_to_ptr(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_func_ptr)(buf, capacity, element_size); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_entry_mpobj, 2, mp_lv_cache_entry_get_entry, lv_cache_entry_get_entry); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_buf_mpobj, 3, mp_lv_circle_buf_create_from_buf, lv_circle_buf_create_from_buf); /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) + * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) */ -static mp_obj_t mp_lv_cache_entry_alloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_create_from_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_func_ptr)(node_size, cache); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_func_ptr)(array); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_alloc_mpobj, 2, mp_lv_cache_entry_alloc, lv_cache_entry_alloc); - -/* Reusing lv_obj_style_init for lv_draw_sw_mask_cleanup */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_cleanup_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_mask_cleanup); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_array_mpobj, 1, mp_lv_circle_buf_create_from_array, lv_circle_buf_create_from_array); -/* Reusing lv_obj_style_init for lv_layout_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_init_mpobj, 0, mp_lv_obj_style_init, lv_layout_init); +/* + * Function NOT generated: + * Callback function 'lv_lru_free_cb_t value_free' must receive a struct pointer with user_data member as its first argument! + * lv_lru_free_cb_t value_free + */ -/* Reusing lv_obj_style_init for lv_layout_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_deinit_mpobj, 0, mp_lv_obj_style_init, lv_layout_deinit); +/* + * Function NOT generated: + * Callback function 'lv_lru_free_cb_t key_free' must receive a struct pointer with user_data member as its first argument! + * lv_lru_free_cb_t key_free + */ /* * lvgl extension definition for: - * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) + * lv_lru_t *lv_lru_create(size_t cache_size, size_t average_length, lv_lru_free_cb_t value_free, lv_lru_free_cb_t key_free) */ -static mp_obj_t mp_lv_layout_get_min_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_lru_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t *size = mp_array_to_i32ptr(mp_args[1]); - bool width = mp_obj_is_true(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_func_ptr)(obj, size, width); - return convert_to_bool(_res); + size_t cache_size = (size_t)mp_obj_get_int(mp_args[0]); + size_t average_length = (size_t)mp_obj_get_int(mp_args[1]); + lv_lru_free_cb_t value_free = mp_to_ptr(mp_args[2]); + lv_lru_free_cb_t key_free = mp_to_ptr(mp_args[3]); + lv_lru_t * _res = ((lv_lru_t *(*)(size_t, size_t, lv_lru_free_cb_t, lv_lru_free_cb_t))lv_func_ptr)(cache_size, average_length, value_free, key_free); + return mp_read_ptr_lv_lru_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_get_min_size_mpobj, 3, mp_lv_layout_get_min_size, lv_layout_get_min_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lru_create_mpobj, 4, mp_lv_lru_create, lv_lru_create); -/* Reusing lv_obj_move_foreground for lv_layout_apply */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_layout_apply); - -/* Reusing lv_obj_get_scroll_end for lv_indev_scroll_get_snap_dist */ +/* + * lvgl extension definition for: + * lv_pending_t *lv_pending_create(size_t obj_size, uint32_t capacity_default) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_scroll_get_snap_dist_mpobj, 2, mp_lv_obj_get_scroll_end, lv_indev_scroll_get_snap_dist); +static mp_obj_t mp_lv_pending_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + size_t obj_size = (size_t)mp_obj_get_int(mp_args[0]); + uint32_t capacity_default = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_pending_t * _res = ((lv_pending_t *(*)(size_t, uint32_t))lv_func_ptr)(obj_size, capacity_default); + return mp_read_ptr_lv_pending_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_pending_create_mpobj, 2, mp_lv_pending_create, lv_pending_create); /* @@ -47838,6 +51756,10 @@ static mp_obj_t mp_lv_text_get_width(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_width_mpobj, 4, mp_lv_text_get_width, lv_text_get_width); +/* Reusing lv_text_get_width for lv_text_get_line_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_line_width_mpobj, 4, mp_lv_text_get_width, lv_text_get_line_width); + /* * lvgl extension definition for: @@ -47935,77 +51857,59 @@ static mp_obj_t mp_lv_text_encoded_letter_next_2(size_t mp_n_args, const mp_obj_ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_encoded_letter_next_2_mpobj, 4, mp_lv_text_encoded_letter_next_2, lv_text_encoded_letter_next_2); -/* Reusing lv_obj_style_init for lv_refr_init */ +/* Reusing lv_text_get_size for lv_text_get_size_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_init_mpobj, 0, mp_lv_obj_style_init, lv_refr_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_internal_mpobj, 7, mp_lv_text_get_size, lv_text_get_size_internal); -/* Reusing lv_obj_style_init for lv_refr_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_deinit_mpobj, 0, mp_lv_obj_style_init, lv_refr_deinit); +/* + * Function NOT generated: + * Callback function 'int (*cmp)(const void *pRef, const void *pElement)' must receive a struct pointer with user_data member as its first argument! + * int (*cmp)(const void *pRef, const void *pElement) + */ +#define funcptr_cmp NULL + /* * lvgl extension definition for: - * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) + * int cmp(const void *pRef, const void *pElement) */ -static mp_obj_t mp_lv_inv_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_cmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area_p); + const void *pRef = (const void *)mp_to_ptr(mp_args[0]); + const void *pElement = (const void *)mp_to_ptr(mp_args[1]); + int _res = ((int (*)(const void *, const void *))lv_func_ptr)(pRef, pElement); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_inv_area_mpobj, 2, mp_lv_inv_area, lv_inv_area); - -/* Reusing lv_display_get_default for lv_refr_get_disp_refreshing */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_disp_refreshing_mpobj, 0, mp_lv_display_get_default, lv_refr_get_disp_refreshing); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_cmp_mpobj, 2, mp_funcptr_cmp, funcptr_cmp); -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_set_disp_refreshing */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_cmp(void *func){ return mp_lv_funcptr(&mp_funcptr_cmp_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_set_disp_refreshing_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_set_disp_refreshing); - /* * lvgl extension definition for: - * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) + * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) */ -static mp_obj_t mp_lv_refr_get_top_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_utils_bsearch(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_func_ptr)(area_p, obj); - return lv_to_mp((void*)_res); + const void *key = (const void *)mp_to_ptr(mp_args[0]); + const void *base = (const void *)mp_to_ptr(mp_args[1]); + size_t n = (size_t)mp_obj_get_int(mp_args[2]); + size_t size = (size_t)mp_obj_get_int(mp_args[3]); + int (*cmp)(const void *pRef, const void *pElement) = mp_to_ptr(mp_args[4]); + void * _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_func_ptr)(key, base, n, size, cmp); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_top_obj_mpobj, 2, mp_lv_refr_get_top_obj, lv_refr_get_top_obj); - -/* Reusing lv_obj_style_init for lv_group_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_init_mpobj, 0, mp_lv_obj_style_init, lv_group_init); - -/* Reusing lv_obj_style_init for lv_group_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_deinit_mpobj, 0, mp_lv_obj_style_init, lv_group_deinit); - -/* Reusing lv_obj_style_init for lv_fs_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_init_mpobj, 0, mp_lv_obj_style_init, lv_fs_init); - -/* Reusing lv_obj_style_init for lv_fs_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_deinit_mpobj, 0, mp_lv_obj_style_init, lv_fs_deinit); - -/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_event_mark_deleted */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_event_mark_deleted); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv_utils_bsearch, lv_utils_bsearch); /* @@ -48017,6 +51921,8 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, * lv_deinit * lv_snprintf * lv_vsnprintf + * lv_tjpgd_init + * lv_tjpgd_deinit * lv_animimg_get_src * lv_arclabel_set_text_fmt * lv_label_set_text_fmt @@ -48026,8 +51932,6 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, * lv_msgbox_add_text_fmt * lv_spangroup_set_span_text_fmt * lv_table_set_cell_value_fmt - * lv_tjpgd_init - * lv_tjpgd_deinit * lv_global_default * lv_text_set_text_vfmt * @@ -48035,107 +51939,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_cache_alloc_cb_t(void) - * void *lv_cache_alloc_cb_t(void) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! bool lv_cache_init_cb_t(lv_cache_t *cache) - * bool lv_cache_init_cb_t(lv_cache_t *cache) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) - * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) - * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) - * lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) - * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) - * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) - * void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) - * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) - * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) - * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) - * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! bool lv_cache_create_cb_t(void *node, void *user_data) - * bool lv_cache_create_cb_t(void *node, void *user_data) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_free_cb_t(void *node, void *user_data) - * void lv_cache_free_cb_t(void *node, void *user_data) - */ - - /* * Callback function lv_font_t_get_glyph_dsc - * bool get_glyph_dsc(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next) + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) @@ -48202,162 +52008,152 @@ GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0 /* * Function NOT generated: - * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) + * Callback: user_data NOT FOUND! int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) */ /* - * Callback function lv_font_t_release_glyph - * void release_glyph(const lv_font_t *, lv_font_glyph_dsc_t *) + * Function NOT generated: + * Callback: user_data NOT FOUND! int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) */ - -GENMPY_UNUSED static void lv_font_t_release_glyph_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_release_glyph)), 2, mp_args); - return; -} - + /* - * Callback function lv_color_filter_dsc_t_filter_cb - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + * Function NOT generated: + * Callback: user_data NOT FOUND! int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) */ + -GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) -{ - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - mp_args[1] = mp_read_lv_color_t(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_filter_cb)), 3, mp_args); - return mp_write_lv_color_t(callback_result); -} - +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! int32_t delete_cb(lv_draw_unit_t *draw_unit) + * int32_t delete_cb(lv_draw_unit_t *draw_unit) + */ + /* - * Callback function lv_anim_t_custom_exec_cb - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + * Callback function lv_draw_unit_t_event_cb + * void event_cb(lv_event_t *event) */ -GENMPY_UNUSED static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) +GENMPY_UNUSED static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_args[1] = mp_obj_new_int(arg1); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_custom_exec_cb)), 2, mp_args); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_draw_unit_t_event_cb)), 1, mp_args); return; } /* - * Callback function lv_style_transition_dsc_t_path_xcb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) + * Callback function lv_display_t_flush_wait_cb + * void lv_display_flush_wait_cb_t(lv_display_t *disp) */ -GENMPY_UNUSED static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) +GENMPY_UNUSED static void lv_display_t_flush_wait_cb_callback(lv_display_t *arg0) { mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_t_path_xcb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_wait_cb)), 1, mp_args); + return; } /* - * Callback function lv_display_t_flush_wait_cb - * void lv_display_flush_wait_cb_t(lv_display_t *disp) + * Callback function lv_display_t_sync_wait_cb + * void lv_display_sync_wait_cb_t(lv_display_t *disp) */ -GENMPY_UNUSED static void lv_display_t_flush_wait_cb_callback(lv_display_t *arg0) +GENMPY_UNUSED static void lv_display_t_sync_wait_cb_callback(lv_display_t *arg0) { mp_obj_t mp_args[1]; mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_wait_cb)), 1, mp_args); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_wait_cb)), 1, mp_args); return; } /* * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + * Callback: user_data NOT FOUND! void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ /* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) - * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + * Callback function lv_font_t_release_glyph + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) */ - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t delete_cb(lv_draw_unit_t *draw_unit) - * int32_t delete_cb(lv_draw_unit_t *draw_unit) - */ - +GENMPY_UNUSED static void lv_font_t_release_glyph_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_release_glyph)), 2, mp_args); + return; +} + /* - * Callback function lv_draw_unit_t_event_cb - * void event_cb(lv_event_t *event) + * Callback function lv_color_filter_dsc_t_filter_cb + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) */ -GENMPY_UNUSED static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) +GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_draw_unit_t_event_cb)), 1, mp_args); - return; + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_filter_cb)), 3, mp_args); + return mp_write_lv_color_t(callback_result); } /* - * Callback function lv_display_t_layer_init - * void layer_init(lv_display_t *disp, lv_layer_t *layer) + * Callback function lv_anim_t_custom_exec_cb + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -GENMPY_UNUSED static void lv_display_t_layer_init_callback(lv_display_t *arg0, lv_layer_t *arg1) +GENMPY_UNUSED static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) { mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_layer_t((void*)arg1); + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_layer_init)), 2, mp_args); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_custom_exec_cb)), 2, mp_args); return; } /* - * Callback function lv_display_t_layer_deinit - * void layer_deinit(lv_display_t *disp, lv_layer_t *layer) + * Callback function lv_style_transition_dsc_t_path_xcb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) */ -GENMPY_UNUSED static void lv_display_t_layer_deinit_callback(lv_display_t *arg0, lv_layer_t *arg1) +GENMPY_UNUSED static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_layer_t((void*)arg1); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_layer_deinit)), 2, mp_args); - return; + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_t_path_xcb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } @@ -48425,6 +52221,13 @@ GENMPY_UNUSED static void lv_observer_t_cb_callback(lv_observer_t *arg0, lv_subj } +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void user_cb(void) + * void user_cb(void) + */ + + /* * Callback function lv_event_dsc_t_cb * void lv_event_cb_t(lv_event_t *e) @@ -48455,24 +52258,6 @@ GENMPY_UNUSED static int32_t lv_obj_style_transition_dsc_t_path_cb_callback(cons } -/* - * Callback function lv_image_decoder_t_get_area_cb - * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) - */ - -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) -{ - mp_obj_t mp_args[4]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_args[2] = mp_read_ptr_lv_area_t((void*)arg2); - mp_args[3] = mp_read_ptr_lv_area_t((void*)arg3); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_get_area_cb)), 4, mp_args); - return (int)mp_obj_get_int(callback_result); -} - - /* * Callback function lv_image_decoder_t_custom_draw_cb * void lv_image_decoder_custom_draw_t(lv_layer_t *layer, const lv_image_decoder_dsc_t *dsc, const lv_area_t *coords, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *clip_area) @@ -48680,15 +52465,99 @@ GENMPY_UNUSED static lv_fs_res_t lv_fs_drv_t_dir_close_cb_callback(lv_fs_drv_t * /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * Callback: user_data NOT FOUND! void *lv_cache_alloc_cb_t(void) + * void *lv_cache_alloc_cb_t(void) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - * void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * Callback: user_data NOT FOUND! bool lv_cache_init_cb_t(lv_cache_t *cache) + * bool lv_cache_init_cb_t(lv_cache_t *cache) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) + * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) + * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) + * void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) + * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) + * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) + * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! bool lv_cache_create_cb_t(void *node, void *user_data) + * bool lv_cache_create_cb_t(void *node, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_free_cb_t(void *node, void *user_data) + * void lv_cache_free_cb_t(void *node, void *user_data) */ @@ -48730,8 +52599,15 @@ GENMPY_UNUSED static void lv_font_class_t_delete_cb_callback(lv_font_t *arg0) /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) - * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) + * Callback: user_data NOT FOUND! void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) */ @@ -48792,6 +52668,13 @@ GENMPY_UNUSED static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *arg0, */ +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + */ + + /* * Function NOT generated: * Callback: user_data NOT FOUND! lv_draw_sw_mask_res_t lv_draw_sw_mask_xcb_t(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p) @@ -48801,8 +52684,22 @@ GENMPY_UNUSED static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *arg0, /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) - * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * void lv_lru_free_cb_t(void *v) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * void lv_lru_free_cb_t(void *v) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) + * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) */ @@ -48814,10 +52711,11 @@ static const mp_lv_obj_type_t *mp_lv_obj_types[] = { &mp_lv_arclabel_type, &mp_lv_label_type, &mp_lv_bar_type, + &mp_lv_canvas_type, + &mp_lv_barcode_type, &mp_lv_button_type, &mp_lv_buttonmatrix_type, &mp_lv_calendar_type, - &mp_lv_canvas_type, &mp_lv_chart_type, &mp_lv_checkbox_type, &mp_lv_dropdown_type, @@ -48833,6 +52731,7 @@ static const mp_lv_obj_type_t *mp_lv_obj_types[] = { &mp_lv_menu_section_type, &mp_lv_menu_separator_type, &mp_lv_msgbox_type, + &mp_lv_qrcode_type, &mp_lv_roller_type, &mp_lv_scale_type, &mp_lv_slider_type, @@ -48845,8 +52744,6 @@ static const mp_lv_obj_type_t *mp_lv_obj_types[] = { &mp_lv_tabview_type, &mp_lv_tileview_type, &mp_lv_win_type, - &mp_lv_barcode_type, - &mp_lv_qrcode_type, NULL }; @@ -48902,7 +52799,6 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_PART_TEXTAREA_PLACEHOLDER), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_PART_TEXTAREA_PLACEHOLDER)) }, { MP_ROM_QSTR(MP_QSTR_TABLE_CELL_NONE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_TABLE_CELL_NONE)) }, { MP_ROM_QSTR(MP_QSTR_color_filter_shade), MP_ROM_PTR(&mp_lv_color_filter_shade) }, - { MP_ROM_QSTR(MP_QSTR_tree_node_class), MP_ROM_PTR(&mp_lv_tree_node_class) }, #if LV_FONT_MONTSERRAT_14 { MP_ROM_QSTR(MP_QSTR_font_montserrat_14), MP_ROM_PTR(&mp_lv_font_montserrat_14) }, #endif @@ -48928,12 +52824,13 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_arclabel_class), MP_ROM_PTR(&mp_lv_arclabel_class) }, { MP_ROM_QSTR(MP_QSTR_label_class), MP_ROM_PTR(&mp_lv_label_class) }, { MP_ROM_QSTR(MP_QSTR_bar_class), MP_ROM_PTR(&mp_lv_bar_class) }, + { MP_ROM_QSTR(MP_QSTR_canvas_class), MP_ROM_PTR(&mp_lv_canvas_class) }, + { MP_ROM_QSTR(MP_QSTR_barcode_class), MP_ROM_PTR(&mp_lv_barcode_class) }, { MP_ROM_QSTR(MP_QSTR_button_class), MP_ROM_PTR(&mp_lv_button_class) }, { MP_ROM_QSTR(MP_QSTR_buttonmatrix_class), MP_ROM_PTR(&mp_lv_buttonmatrix_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_class), MP_ROM_PTR(&mp_lv_calendar_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_header_arrow_class), MP_ROM_PTR(&mp_lv_calendar_header_arrow_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_header_dropdown_class), MP_ROM_PTR(&mp_lv_calendar_header_dropdown_class) }, - { MP_ROM_QSTR(MP_QSTR_canvas_class), MP_ROM_PTR(&mp_lv_canvas_class) }, { MP_ROM_QSTR(MP_QSTR_chart_class), MP_ROM_PTR(&mp_lv_chart_class) }, { MP_ROM_QSTR(MP_QSTR_checkbox_class), MP_ROM_PTR(&mp_lv_checkbox_class) }, { MP_ROM_QSTR(MP_QSTR_dropdown_class), MP_ROM_PTR(&mp_lv_dropdown_class) }, @@ -48962,6 +52859,7 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_msgbox_header_button_class), MP_ROM_PTR(&mp_lv_msgbox_header_button_class) }, { MP_ROM_QSTR(MP_QSTR_msgbox_footer_button_class), MP_ROM_PTR(&mp_lv_msgbox_footer_button_class) }, { MP_ROM_QSTR(MP_QSTR_msgbox_backdrop_class), MP_ROM_PTR(&mp_lv_msgbox_backdrop_class) }, + { MP_ROM_QSTR(MP_QSTR_qrcode_class), MP_ROM_PTR(&mp_lv_qrcode_class) }, { MP_ROM_QSTR(MP_QSTR_roller_class), MP_ROM_PTR(&mp_lv_roller_class) }, { MP_ROM_QSTR(MP_QSTR_scale_class), MP_ROM_PTR(&mp_lv_scale_class) }, { MP_ROM_QSTR(MP_QSTR_slider_class), MP_ROM_PTR(&mp_lv_slider_class) }, @@ -48975,23 +52873,24 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_tileview_class), MP_ROM_PTR(&mp_lv_tileview_class) }, { MP_ROM_QSTR(MP_QSTR_tileview_tile_class), MP_ROM_PTR(&mp_lv_tileview_tile_class) }, { MP_ROM_QSTR(MP_QSTR_win_class), MP_ROM_PTR(&mp_lv_win_class) }, - { MP_ROM_QSTR(MP_QSTR_barcode_class), MP_ROM_PTR(&mp_lv_barcode_class) }, - { MP_ROM_QSTR(MP_QSTR_qrcode_class), MP_ROM_PTR(&mp_lv_qrcode_class) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_rb_count), MP_ROM_PTR(&mp_lv_cache_class_lru_rb_count) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_rb_size), MP_ROM_PTR(&mp_lv_cache_class_lru_rb_size) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_ll_count), MP_ROM_PTR(&mp_lv_cache_class_lru_ll_count) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_ll_size), MP_ROM_PTR(&mp_lv_cache_class_lru_ll_size) }, { MP_ROM_QSTR(MP_QSTR_cache_class_sc_da), MP_ROM_PTR(&mp_lv_cache_class_sc_da) }, + { MP_ROM_QSTR(MP_QSTR_tree_node_class), MP_ROM_PTR(&mp_lv_tree_node_class) }, { MP_ROM_QSTR(MP_QSTR__nesting), MP_ROM_PTR(&mp__nesting) }, - { MP_ROM_QSTR(MP_QSTR_LOG_LEVEL), MP_ROM_PTR(&mp_lv_ENUM_LV_LOG_LEVEL_type_base) }, { MP_ROM_QSTR(MP_QSTR_COORD), MP_ROM_PTR(&mp_lv_ENUM_LV_COORD_type_base) }, + { MP_ROM_QSTR(MP_QSTR_LOG_LEVEL), MP_ROM_PTR(&mp_lv_ENUM_LV_LOG_LEVEL_type_base) }, { MP_ROM_QSTR(MP_QSTR_OPA), MP_ROM_PTR(&mp_lv_LV_OPA_type_base) }, - { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE), MP_ROM_PTR(&mp_lv_LV_STYLE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_RESULT), MP_ROM_PTR(&mp_lv_LV_RESULT_type_base) }, - { MP_ROM_QSTR(MP_QSTR_RB_COLOR), MP_ROM_PTR(&mp_lv_LV_RB_COLOR_type_base) }, { MP_ROM_QSTR(MP_QSTR_ALIGN), MP_ROM_PTR(&mp_lv_LV_ALIGN_type_base) }, { MP_ROM_QSTR(MP_QSTR_DIR), MP_ROM_PTR(&mp_lv_LV_DIR_type_base) }, + { MP_ROM_QSTR(MP_QSTR_EVENT), MP_ROM_PTR(&mp_lv_LV_EVENT_type_base) }, + { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(&mp_lv_LV_KEY_type_base) }, + { MP_ROM_QSTR(MP_QSTR_GROUP_REFOCUS_POLICY), MP_ROM_PTR(&mp_lv_LV_GROUP_REFOCUS_POLICY_type_base) }, { MP_ROM_QSTR(MP_QSTR_COLOR_FORMAT), MP_ROM_PTR(&mp_lv_LV_COLOR_FORMAT_type_base) }, { MP_ROM_QSTR(MP_QSTR_PALETTE), MP_ROM_PTR(&mp_lv_LV_PALETTE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FONT_GLYPH_FORMAT), MP_ROM_PTR(&mp_lv_LV_FONT_GLYPH_FORMAT_type_base) }, @@ -48999,6 +52898,7 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_FONT_KERNING), MP_ROM_PTR(&mp_lv_LV_FONT_KERNING_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_FLAG), MP_ROM_PTR(&mp_lv_LV_TEXT_FLAG_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_ALIGN), MP_ROM_PTR(&mp_lv_LV_TEXT_ALIGN_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TEXT_LEADING_TRIM), MP_ROM_PTR(&mp_lv_LV_TEXT_LEADING_TRIM_type_base) }, { MP_ROM_QSTR(MP_QSTR_BASE_DIR), MP_ROM_PTR(&mp_lv_LV_BASE_DIR_type_base) }, { MP_ROM_QSTR(MP_QSTR_GRAD_DIR), MP_ROM_PTR(&mp_lv_LV_GRAD_DIR_type_base) }, { MP_ROM_QSTR(MP_QSTR_GRAD_EXTEND), MP_ROM_PTR(&mp_lv_LV_GRAD_EXTEND_type_base) }, @@ -49011,7 +52911,6 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_BORDER_SIDE), MP_ROM_PTR(&mp_lv_LV_BORDER_SIDE_type_base) }, { MP_ROM_QSTR(MP_QSTR_BLUR_QUALITY), MP_ROM_PTR(&mp_lv_LV_BLUR_QUALITY_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE_RES), MP_ROM_PTR(&mp_lv_LV_STYLE_RES_type_base) }, - { MP_ROM_QSTR(MP_QSTR_EVENT), MP_ROM_PTR(&mp_lv_LV_EVENT_type_base) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_ROTATION), MP_ROM_PTR(&mp_lv_LV_DISPLAY_ROTATION_type_base) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_RENDER_MODE), MP_ROM_PTR(&mp_lv_LV_DISPLAY_RENDER_MODE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SCREEN_LOAD_ANIM), MP_ROM_PTR(&mp_lv_LV_SCREEN_LOAD_ANIM_type_base) }, @@ -49020,14 +52919,12 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_STATE), MP_ROM_PTR(&mp_lv_LV_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_PART), MP_ROM_PTR(&mp_lv_LV_PART_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE_STATE_CMP), MP_ROM_PTR(&mp_lv_LV_STYLE_STATE_CMP_type_base) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_TYPE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_STATE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_RES), MP_ROM_PTR(&mp_lv_LV_FS_RES_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_MODE), MP_ROM_PTR(&mp_lv_LV_FS_MODE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_SEEK), MP_ROM_PTR(&mp_lv_LV_FS_SEEK_type_base) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_STATE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_LAYER_TYPE), MP_ROM_PTR(&mp_lv_LV_LAYER_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(&mp_lv_LV_KEY_type_base) }, - { MP_ROM_QSTR(MP_QSTR_GROUP_REFOCUS_POLICY), MP_ROM_PTR(&mp_lv_LV_GROUP_REFOCUS_POLICY_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_TYPE), MP_ROM_PTR(&mp_lv_LV_INDEV_TYPE_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_STATE), MP_ROM_PTR(&mp_lv_LV_INDEV_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_MODE), MP_ROM_PTR(&mp_lv_LV_INDEV_MODE_type_base) }, @@ -49041,11 +52938,13 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ANIM_IMAGE_PART), MP_ROM_PTR(&mp_lv_LV_ANIM_IMAGE_PART_type_base) }, { MP_ROM_QSTR(MP_QSTR_SPAN_OVERFLOW), MP_ROM_PTR(&mp_lv_LV_SPAN_OVERFLOW_type_base) }, { MP_ROM_QSTR(MP_QSTR_SPAN_MODE), MP_ROM_PTR(&mp_lv_LV_SPAN_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_THREAD_PRIO), MP_ROM_PTR(&mp_lv_LV_THREAD_PRIO_type_base) }, + { MP_ROM_QSTR(MP_QSTR_CACHE_RESERVE_COND), MP_ROM_PTR(&mp_lv_LV_CACHE_RESERVE_COND_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_RES), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_RES_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_TYPE_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_LINE_SIDE), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_LINE_SIDE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_THREAD_PRIO), MP_ROM_PTR(&mp_lv_LV_THREAD_PRIO_type_base) }, - { MP_ROM_QSTR(MP_QSTR_CACHE_RESERVE_COND), MP_ROM_PTR(&mp_lv_LV_CACHE_RESERVE_COND_type_base) }, + { MP_ROM_QSTR(MP_QSTR_LRU), MP_ROM_PTR(&mp_lv_LV_LRU_type_base) }, + { MP_ROM_QSTR(MP_QSTR_RB_COLOR), MP_ROM_PTR(&mp_lv_LV_RB_COLOR_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_CMD_STATE), MP_ROM_PTR(&mp_lv_LV_TEXT_CMD_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SYMBOL), MP_ROM_PTR(&mp_lv_LV_SYMBOL_type_base) }, { MP_ROM_QSTR(MP_QSTR_C_Pointer), MP_ROM_PTR(&mp_C_Pointer_type) }, @@ -49056,29 +52955,24 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_t), MP_ROM_PTR(&mp_lv_cache_entry_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_t), MP_ROM_PTR(&mp_lv_cache_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_class_t), MP_ROM_PTR(&mp_lv_cache_class_t_type) }, - { MP_ROM_QSTR(MP_QSTR_iter_t), MP_ROM_PTR(&mp_lv_iter_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_ops_t), MP_ROM_PTR(&mp_lv_cache_ops_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_t), MP_ROM_PTR(&mp_lv_draw_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_header_t), MP_ROM_PTR(&mp_lv_image_header_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_handlers_t), MP_ROM_PTR(&mp_lv_draw_buf_handlers_t_type) }, { MP_ROM_QSTR(MP_QSTR_area_t), MP_ROM_PTR(&mp_lv_area_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, - { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, - { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_layer_t), MP_ROM_PTR(&mp_lv_layer_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_task_t), MP_ROM_PTR(&mp_lv_draw_task_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_unit_t), MP_ROM_PTR(&mp_lv_draw_unit_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_t), MP_ROM_PTR(&mp_lv_event_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, + { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, + { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_list_t), MP_ROM_PTR(&mp_lv_event_list_t_type) }, { MP_ROM_QSTR(MP_QSTR_array_t), MP_ROM_PTR(&mp_lv_array_t_type) }, { MP_ROM_QSTR(MP_QSTR_theme_t), MP_ROM_PTR(&mp_lv_theme_t_type) }, { MP_ROM_QSTR(MP_QSTR_timer_t), MP_ROM_PTR(&mp_lv_timer_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, + { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_obj_class_t), MP_ROM_PTR(&mp_lv_obj_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_matrix_t), MP_ROM_PTR(&mp_lv_matrix_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_t), MP_ROM_PTR(&mp_lv_style_t_type) }, @@ -49099,6 +52993,7 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_blur_dsc_t), MP_ROM_PTR(&mp_lv_draw_blur_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_dsc_t), MP_ROM_PTR(&mp_lv_event_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_group_t), MP_ROM_PTR(&mp_lv_group_t_type) }, + { MP_ROM_QSTR(MP_QSTR_delete_dsc_t), MP_ROM_PTR(&mp_lv_delete_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_anim_timeline_t), MP_ROM_PTR(&mp_lv_anim_timeline_t_type) }, { MP_ROM_QSTR(MP_QSTR_anim_timeline_dsc_t), MP_ROM_PTR(&mp_lv_anim_timeline_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_increment_dsc_t), MP_ROM_PTR(&mp_lv_subject_increment_dsc_t_type) }, @@ -49109,6 +53004,11 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_fs_file_t), MP_ROM_PTR(&mp_lv_fs_file_t_type) }, { MP_ROM_QSTR(MP_QSTR_fs_drv_t), MP_ROM_PTR(&mp_lv_fs_drv_t_type) }, { MP_ROM_QSTR(MP_QSTR_fs_file_cache_t), MP_ROM_PTR(&mp_lv_fs_file_cache_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_t), MP_ROM_PTR(&mp_lv_cache_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_class_t), MP_ROM_PTR(&mp_lv_cache_class_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_t), MP_ROM_PTR(&mp_lv_cache_entry_t_type) }, + { MP_ROM_QSTR(MP_QSTR_iter_t), MP_ROM_PTR(&mp_lv_iter_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_ops_t), MP_ROM_PTR(&mp_lv_cache_ops_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_cache_data_t), MP_ROM_PTR(&mp_lv_image_cache_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_cache_slot_size_t), MP_ROM_PTR(&mp_lv_cache_slot_size_t_type) }, { MP_ROM_QSTR(MP_QSTR_calendar_date_t), MP_ROM_PTR(&mp_lv_calendar_date_t_type) }, @@ -49117,31 +53017,32 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_scale_section_t), MP_ROM_PTR(&mp_lv_scale_section_t_type) }, { MP_ROM_QSTR(MP_QSTR_span_t), MP_ROM_PTR(&mp_lv_span_t_type) }, { MP_ROM_QSTR(MP_QSTR_span_coords_t), MP_ROM_PTR(&mp_lv_span_coords_t_type) }, - { MP_ROM_QSTR(MP_QSTR_tree_class_t), MP_ROM_PTR(&mp_lv_tree_class_t_type) }, - { MP_ROM_QSTR(MP_QSTR_tree_node_t), MP_ROM_PTR(&mp_lv_tree_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_class_t), MP_ROM_PTR(&mp_lv_font_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_info_t), MP_ROM_PTR(&mp_lv_font_info_t_type) }, + { MP_ROM_QSTR(MP_QSTR_tree_class_t), MP_ROM_PTR(&mp_lv_tree_class_t_type) }, + { MP_ROM_QSTR(MP_QSTR_tree_node_t), MP_ROM_PTR(&mp_lv_tree_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_color16_t), MP_ROM_PTR(&mp_lv_color16_t_type) }, { MP_ROM_QSTR(MP_QSTR_mem_monitor_t), MP_ROM_PTR(&mp_lv_mem_monitor_t_type) }, - { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, - { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_t), MP_ROM_PTR(&mp_lv_circle_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_layout_callbacks_t), MP_ROM_PTR(&mp_lv_layout_callbacks_t_type) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_ex_t), MP_ROM_PTR(&mp_lv_fs_path_ex_t_type) }, - { MP_ROM_QSTR(MP_QSTR_fs_dir_t), MP_ROM_PTR(&mp_lv_fs_dir_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_fill_dsc_t), MP_ROM_PTR(&mp_lv_draw_fill_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_border_dsc_t), MP_ROM_PTR(&mp_lv_draw_border_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_box_shadow_dsc_t), MP_ROM_PTR(&mp_lv_draw_box_shadow_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_letter_dsc_t), MP_ROM_PTR(&mp_lv_draw_letter_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_glyph_dsc_t), MP_ROM_PTR(&mp_lv_draw_glyph_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_ex_t), MP_ROM_PTR(&mp_lv_fs_path_ex_t_type) }, + { MP_ROM_QSTR(MP_QSTR_fs_dir_t), MP_ROM_PTR(&mp_lv_fs_dir_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_triangle_dsc_t), MP_ROM_PTR(&mp_lv_draw_triangle_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_t), MP_ROM_PTR(&mp_lv_indev_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_data_t), MP_ROM_PTR(&mp_lv_indev_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_recognizer_t), MP_ROM_PTR(&mp_lv_indev_gesture_recognizer_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_t), MP_ROM_PTR(&mp_lv_indev_gesture_t_type) }, + { MP_ROM_QSTR(MP_QSTR_indev_gesture_motion_t), MP_ROM_PTR(&mp_lv_indev_gesture_motion_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_configuration_t), MP_ROM_PTR(&mp_lv_indev_gesture_configuration_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_touch_data_t), MP_ROM_PTR(&mp_lv_indev_touch_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_mask_rect_dsc_t), MP_ROM_PTR(&mp_lv_draw_mask_rect_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_binfont_dsc_t), MP_ROM_PTR(&mp_lv_binfont_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_custom_blend_handler_t), MP_ROM_PTR(&mp_lv_draw_sw_custom_blend_handler_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_line_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_line_param_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_common_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_common_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_angle_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_angle_param_t_type) }, @@ -49149,8 +53050,15 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_radius_circle_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_radius_circle_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_fade_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_fade_param_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_map_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_map_param_t_type) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_custom_blend_handler_t), MP_ROM_PTR(&mp_lv_draw_sw_custom_blend_handler_t_type) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_fill_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_fill_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_image_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_calc_t), MP_ROM_PTR(&mp_lv_draw_sw_grad_calc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_t), MP_ROM_PTR(&mp_lv_circle_buf_t_type) }, + { MP_ROM_QSTR(MP_QSTR_lru_t), MP_ROM_PTR(&mp_lv_lru_t_type) }, + { MP_ROM_QSTR(MP_QSTR_lru_item_t), MP_ROM_PTR(&mp_lv_lru_item_t_type) }, + { MP_ROM_QSTR(MP_QSTR_pending_t), MP_ROM_PTR(&mp_lv_pending_t_type) }, + { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, + { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_text_attributes_t), MP_ROM_PTR(&mp_lv_text_attributes_t_type) }, { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_hit_test_info_t), MP_ROM_PTR(&mp_lv_hit_test_info_t_type) }, @@ -49163,10 +53071,11 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_arclabel), MP_ROM_PTR(&mp_lv_arclabel_type_base) }, { MP_ROM_QSTR(MP_QSTR_label), MP_ROM_PTR(&mp_lv_label_type_base) }, { MP_ROM_QSTR(MP_QSTR_bar), MP_ROM_PTR(&mp_lv_bar_type_base) }, + { MP_ROM_QSTR(MP_QSTR_canvas), MP_ROM_PTR(&mp_lv_canvas_type_base) }, + { MP_ROM_QSTR(MP_QSTR_barcode), MP_ROM_PTR(&mp_lv_barcode_type_base) }, { MP_ROM_QSTR(MP_QSTR_button), MP_ROM_PTR(&mp_lv_button_type_base) }, { MP_ROM_QSTR(MP_QSTR_buttonmatrix), MP_ROM_PTR(&mp_lv_buttonmatrix_type_base) }, { MP_ROM_QSTR(MP_QSTR_calendar), MP_ROM_PTR(&mp_lv_calendar_type_base) }, - { MP_ROM_QSTR(MP_QSTR_canvas), MP_ROM_PTR(&mp_lv_canvas_type_base) }, { MP_ROM_QSTR(MP_QSTR_chart), MP_ROM_PTR(&mp_lv_chart_type_base) }, { MP_ROM_QSTR(MP_QSTR_checkbox), MP_ROM_PTR(&mp_lv_checkbox_type_base) }, { MP_ROM_QSTR(MP_QSTR_dropdown), MP_ROM_PTR(&mp_lv_dropdown_type_base) }, @@ -49182,6 +53091,7 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_menu_section), MP_ROM_PTR(&mp_lv_menu_section_type_base) }, { MP_ROM_QSTR(MP_QSTR_menu_separator), MP_ROM_PTR(&mp_lv_menu_separator_type_base) }, { MP_ROM_QSTR(MP_QSTR_msgbox), MP_ROM_PTR(&mp_lv_msgbox_type_base) }, + { MP_ROM_QSTR(MP_QSTR_qrcode), MP_ROM_PTR(&mp_lv_qrcode_type_base) }, { MP_ROM_QSTR(MP_QSTR_roller), MP_ROM_PTR(&mp_lv_roller_type_base) }, { MP_ROM_QSTR(MP_QSTR_scale), MP_ROM_PTR(&mp_lv_scale_type_base) }, { MP_ROM_QSTR(MP_QSTR_slider), MP_ROM_PTR(&mp_lv_slider_type_base) }, @@ -49194,18 +53104,17 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_tabview), MP_ROM_PTR(&mp_lv_tabview_type_base) }, { MP_ROM_QSTR(MP_QSTR_tileview), MP_ROM_PTR(&mp_lv_tileview_type_base) }, { MP_ROM_QSTR(MP_QSTR_win), MP_ROM_PTR(&mp_lv_win_type_base) }, - { MP_ROM_QSTR(MP_QSTR_barcode), MP_ROM_PTR(&mp_lv_barcode_type_base) }, - { MP_ROM_QSTR(MP_QSTR_qrcode), MP_ROM_PTR(&mp_lv_qrcode_type_base) }, - { MP_ROM_QSTR(MP_QSTR_memzero), MP_ROM_PTR(&mp_lv_memzero_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_streq), MP_ROM_PTR(&mp_lv_streq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_sqr), MP_ROM_PTR(&mp_lv_sqr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_swap_16), MP_ROM_PTR(&mp_lv_color_swap_16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap_bytes_32), MP_ROM_PTR(&mp_lv_swap_bytes_32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap_bytes_16), MP_ROM_PTR(&mp_lv_swap_bytes_16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align), MP_ROM_PTR(&mp_lv_bidi_calculate_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memzero), MP_ROM_PTR(&mp_lv_memzero_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_streq), MP_ROM_PTR(&mp_lv_streq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_get_prop_group), MP_ROM_PTR(&mp_lv_style_get_prop_group_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_has_flag), MP_ROM_PTR(&mp_lv_style_prop_has_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_task_handler), MP_ROM_PTR(&mp_lv_task_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_major), MP_ROM_PTR(&mp_lv_version_major_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_minor), MP_ROM_PTR(&mp_lv_version_minor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_patch), MP_ROM_PTR(&mp_lv_version_patch_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_info), MP_ROM_PTR(&mp_lv_version_info_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_init), MP_ROM_PTR(&mp_lv_thread_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_delete), MP_ROM_PTR(&mp_lv_thread_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_mutex_init), MP_ROM_PTR(&mp_lv_mutex_init_mpobj) }, @@ -49218,63 +53127,14 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_thread_sync_signal), MP_ROM_PTR(&mp_lv_thread_sync_signal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_signal_isr), MP_ROM_PTR(&mp_lv_thread_sync_signal_isr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_delete), MP_ROM_PTR(&mp_lv_thread_sync_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_16_16_mix_inlined), MP_ROM_PTR(&mp_lv_color_16_16_mix_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align_internal), MP_ROM_PTR(&mp_lv_bidi_calculate_align_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_break_char), MP_ROM_PTR(&mp_lv_text_is_break_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_hanging_space), MP_ROM_PTR(&mp_lv_text_is_hanging_space_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_a_word), MP_ROM_PTR(&mp_lv_text_is_a_word_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_marker), MP_ROM_PTR(&mp_lv_text_is_marker_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_major), MP_ROM_PTR(&mp_lv_version_major_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_minor), MP_ROM_PTR(&mp_lv_version_minor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_patch), MP_ROM_PTR(&mp_lv_version_patch_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_info), MP_ROM_PTR(&mp_lv_version_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_initialized), MP_ROM_PTR(&mp_lv_is_initialized_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memcpy), MP_ROM_PTR(&mp_lv_memcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memset), MP_ROM_PTR(&mp_lv_memset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memmove), MP_ROM_PTR(&mp_lv_memmove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memcmp), MP_ROM_PTR(&mp_lv_memcmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strlen), MP_ROM_PTR(&mp_lv_strlen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strnlen), MP_ROM_PTR(&mp_lv_strnlen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strlcpy), MP_ROM_PTR(&mp_lv_strlcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncpy), MP_ROM_PTR(&mp_lv_strncpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcpy), MP_ROM_PTR(&mp_lv_strcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcmp), MP_ROM_PTR(&mp_lv_strcmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncmp), MP_ROM_PTR(&mp_lv_strncmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strdup), MP_ROM_PTR(&mp_lv_strdup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strndup), MP_ROM_PTR(&mp_lv_strndup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcat), MP_ROM_PTR(&mp_lv_strcat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncat), MP_ROM_PTR(&mp_lv_strncat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strchr), MP_ROM_PTR(&mp_lv_strchr_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_init), MP_ROM_PTR(&mp_lv_mem_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_deinit), MP_ROM_PTR(&mp_lv_mem_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_add_pool), MP_ROM_PTR(&mp_lv_mem_add_pool_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_remove_pool), MP_ROM_PTR(&mp_lv_mem_remove_pool_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc), MP_ROM_PTR(&mp_lv_malloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calloc), MP_ROM_PTR(&mp_lv_calloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_zalloc), MP_ROM_PTR(&mp_lv_zalloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc_zeroed), MP_ROM_PTR(&mp_lv_malloc_zeroed_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free), MP_ROM_PTR(&mp_lv_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_realloc), MP_ROM_PTR(&mp_lv_realloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reallocf), MP_ROM_PTR(&mp_lv_reallocf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc_core), MP_ROM_PTR(&mp_lv_malloc_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free_core), MP_ROM_PTR(&mp_lv_free_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_realloc_core), MP_ROM_PTR(&mp_lv_realloc_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_test_core), MP_ROM_PTR(&mp_lv_mem_test_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_test), MP_ROM_PTR(&mp_lv_mem_test_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_inc), MP_ROM_PTR(&mp_lv_tick_inc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_get), MP_ROM_PTR(&mp_lv_tick_get_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_elaps), MP_ROM_PTR(&mp_lv_tick_elaps_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_diff), MP_ROM_PTR(&mp_lv_tick_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delay_ms), MP_ROM_PTR(&mp_lv_delay_ms_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delay_set_cb), MP_ROM_PTR(&mp_lv_delay_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_set_cb), MP_ROM_PTR(&mp_lv_tick_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_get_cb), MP_ROM_PTR(&mp_lv_tick_get_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler), MP_ROM_PTR(&mp_lv_timer_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler_run_in_period), MP_ROM_PTR(&mp_lv_timer_handler_run_in_period_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_periodic_handler), MP_ROM_PTR(&mp_lv_timer_periodic_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler_set_resume_cb), MP_ROM_PTR(&mp_lv_timer_handler_set_resume_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_create_basic), MP_ROM_PTR(&mp_lv_timer_create_basic_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_create), MP_ROM_PTR(&mp_lv_timer_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_enable), MP_ROM_PTR(&mp_lv_timer_enable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_get_idle), MP_ROM_PTR(&mp_lv_timer_get_idle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_get_time_until_next), MP_ROM_PTR(&mp_lv_timer_get_time_until_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap_bytes_32), MP_ROM_PTR(&mp_lv_swap_bytes_32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap_bytes_16), MP_ROM_PTR(&mp_lv_swap_bytes_16_mpobj) }, { MP_ROM_QSTR(MP_QSTR_trigo_sin), MP_ROM_PTR(&mp_lv_trigo_sin_mpobj) }, { MP_ROM_QSTR(MP_QSTR_trigo_cos), MP_ROM_PTR(&mp_lv_trigo_cos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_cubic_bezier), MP_ROM_PTR(&mp_lv_cubic_bezier_mpobj) }, @@ -49286,8 +53146,6 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_map), MP_ROM_PTR(&mp_lv_map_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rand_set_seed), MP_ROM_PTR(&mp_lv_rand_set_seed_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rand), MP_ROM_PTR(&mp_lv_rand_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_async_call), MP_ROM_PTR(&mp_lv_async_call_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_async_call_cancel), MP_ROM_PTR(&mp_lv_async_call_cancel_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_delete), MP_ROM_PTR(&mp_lv_anim_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_delete_all), MP_ROM_PTR(&mp_lv_anim_delete_all_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_get), MP_ROM_PTR(&mp_lv_anim_get_mpobj) }, @@ -49301,6 +53159,32 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_anim_timeline_create), MP_ROM_PTR(&mp_lv_anim_timeline_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pct), MP_ROM_PTR(&mp_lv_pct_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pct_to_px), MP_ROM_PTR(&mp_lv_pct_to_px_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_register_id), MP_ROM_PTR(&mp_lv_event_register_id_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_code_get_name), MP_ROM_PTR(&mp_lv_event_code_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_create), MP_ROM_PTR(&mp_lv_group_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_get_default), MP_ROM_PTR(&mp_lv_group_get_default_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_swap_obj), MP_ROM_PTR(&mp_lv_group_swap_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_remove_obj), MP_ROM_PTR(&mp_lv_group_remove_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_focus_obj), MP_ROM_PTR(&mp_lv_group_focus_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_get_count), MP_ROM_PTR(&mp_lv_group_get_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_by_index), MP_ROM_PTR(&mp_lv_group_by_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_initialized), MP_ROM_PTR(&mp_lv_is_initialized_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_init), MP_ROM_PTR(&mp_lv_mem_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_deinit), MP_ROM_PTR(&mp_lv_mem_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_add_pool), MP_ROM_PTR(&mp_lv_mem_add_pool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_remove_pool), MP_ROM_PTR(&mp_lv_mem_remove_pool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc), MP_ROM_PTR(&mp_lv_malloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calloc), MP_ROM_PTR(&mp_lv_calloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_zalloc), MP_ROM_PTR(&mp_lv_zalloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc_zeroed), MP_ROM_PTR(&mp_lv_malloc_zeroed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free), MP_ROM_PTR(&mp_lv_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_realloc), MP_ROM_PTR(&mp_lv_realloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reallocf), MP_ROM_PTR(&mp_lv_reallocf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc_core), MP_ROM_PTR(&mp_lv_malloc_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free_core), MP_ROM_PTR(&mp_lv_free_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_realloc_core), MP_ROM_PTR(&mp_lv_realloc_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_test_core), MP_ROM_PTR(&mp_lv_mem_test_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_test), MP_ROM_PTR(&mp_lv_mem_test_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_get_bpp), MP_ROM_PTR(&mp_lv_color_format_get_bpp_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_get_size), MP_ROM_PTR(&mp_lv_color_format_get_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_has_alpha), MP_ROM_PTR(&mp_lv_color_format_has_alpha_mpobj) }, @@ -49317,23 +53201,31 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_palette_main), MP_ROM_PTR(&mp_lv_palette_main_mpobj) }, { MP_ROM_QSTR(MP_QSTR_palette_lighten), MP_ROM_PTR(&mp_lv_palette_lighten_mpobj) }, { MP_ROM_QSTR(MP_QSTR_palette_darken), MP_ROM_PTR(&mp_lv_palette_darken_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memcpy), MP_ROM_PTR(&mp_lv_memcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memset), MP_ROM_PTR(&mp_lv_memset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memmove), MP_ROM_PTR(&mp_lv_memmove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memcmp), MP_ROM_PTR(&mp_lv_memcmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strlen), MP_ROM_PTR(&mp_lv_strlen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strnlen), MP_ROM_PTR(&mp_lv_strnlen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strlcpy), MP_ROM_PTR(&mp_lv_strlcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncpy), MP_ROM_PTR(&mp_lv_strncpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcpy), MP_ROM_PTR(&mp_lv_strcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcmp), MP_ROM_PTR(&mp_lv_strcmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncmp), MP_ROM_PTR(&mp_lv_strncmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strdup), MP_ROM_PTR(&mp_lv_strdup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strndup), MP_ROM_PTR(&mp_lv_strndup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcat), MP_ROM_PTR(&mp_lv_strcat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncat), MP_ROM_PTR(&mp_lv_strncat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strchr), MP_ROM_PTR(&mp_lv_strchr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_font_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_font_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_image_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_image_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_align), MP_ROM_PTR(&mp_lv_draw_buf_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_width_to_stride), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_create), MP_ROM_PTR(&mp_lv_draw_buf_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_iter_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create), MP_ROM_PTR(&mp_lv_circle_buf_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_buf), MP_ROM_PTR(&mp_lv_circle_buf_create_from_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_array), MP_ROM_PTR(&mp_lv_circle_buf_create_from_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lock), MP_ROM_PTR(&mp_lv_lock_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lock_isr), MP_ROM_PTR(&mp_lv_lock_isr_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unlock), MP_ROM_PTR(&mp_lv_unlock_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_lv_sleep_ms_mpobj) }, { MP_ROM_QSTR(MP_QSTR_font_get_default), MP_ROM_PTR(&mp_lv_font_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_get_size), MP_ROM_PTR(&mp_lv_text_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align), MP_ROM_PTR(&mp_lv_bidi_calculate_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_register), MP_ROM_PTR(&mp_lv_layout_register_mpobj) }, { MP_ROM_QSTR(MP_QSTR_flex_init), MP_ROM_PTR(&mp_lv_flex_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_grid_init), MP_ROM_PTR(&mp_lv_grid_init_mpobj) }, @@ -49342,8 +53234,16 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_style_get_num_custom_props), MP_ROM_PTR(&mp_lv_style_get_num_custom_props_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_get_default), MP_ROM_PTR(&mp_lv_style_prop_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_lookup_flags), MP_ROM_PTR(&mp_lv_style_prop_lookup_flags_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_register_id), MP_ROM_PTR(&mp_lv_event_register_id_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_code_get_name), MP_ROM_PTR(&mp_lv_event_code_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler), MP_ROM_PTR(&mp_lv_timer_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler_run_in_period), MP_ROM_PTR(&mp_lv_timer_handler_run_in_period_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_time_to_next), MP_ROM_PTR(&mp_lv_timer_get_time_to_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_periodic_handler), MP_ROM_PTR(&mp_lv_timer_periodic_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler_set_resume_cb), MP_ROM_PTR(&mp_lv_timer_handler_set_resume_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_create_basic), MP_ROM_PTR(&mp_lv_timer_create_basic_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_create), MP_ROM_PTR(&mp_lv_timer_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_enable), MP_ROM_PTR(&mp_lv_timer_enable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_idle), MP_ROM_PTR(&mp_lv_timer_get_idle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_time_until_next), MP_ROM_PTR(&mp_lv_timer_get_time_until_next_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_create), MP_ROM_PTR(&mp_lv_display_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_get_default), MP_ROM_PTR(&mp_lv_display_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_screen_load), MP_ROM_PTR(&mp_lv_screen_load_mpobj) }, @@ -49355,17 +53255,6 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_dpx_mpobj) }, { MP_ROM_QSTR(MP_QSTR_clamp_width), MP_ROM_PTR(&mp_lv_clamp_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_clamp_height), MP_ROM_PTR(&mp_lv_clamp_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_drv), MP_ROM_PTR(&mp_lv_fs_get_drv_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_remove_drive), MP_ROM_PTR(&mp_lv_fs_remove_drive_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_is_ready), MP_ROM_PTR(&mp_lv_fs_is_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_get_size), MP_ROM_PTR(&mp_lv_fs_path_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_load_to_buf), MP_ROM_PTR(&mp_lv_fs_load_to_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_load_with_alloc), MP_ROM_PTR(&mp_lv_fs_load_with_alloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_letters), MP_ROM_PTR(&mp_lv_fs_get_letters_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_ext), MP_ROM_PTR(&mp_lv_fs_get_ext_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_up), MP_ROM_PTR(&mp_lv_fs_up_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_last), MP_ROM_PTR(&mp_lv_fs_get_last_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_join), MP_ROM_PTR(&mp_lv_fs_path_join_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_init), MP_ROM_PTR(&mp_lv_draw_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_deinit), MP_ROM_PTR(&mp_lv_draw_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_create_unit), MP_ROM_PTR(&mp_lv_draw_create_unit_mpobj) }, @@ -49385,6 +53274,9 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_layer_go_to_xy), MP_ROM_PTR(&mp_lv_draw_layer_go_to_xy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer_create_drop_shadow), MP_ROM_PTR(&mp_lv_draw_layer_create_drop_shadow_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer_finish_drop_shadow), MP_ROM_PTR(&mp_lv_draw_layer_finish_drop_shadow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_dealloc_buf), MP_ROM_PTR(&mp_lv_draw_layer_dealloc_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_deinit), MP_ROM_PTR(&mp_lv_draw_layer_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_delete), MP_ROM_PTR(&mp_lv_draw_layer_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_fill), MP_ROM_PTR(&mp_lv_draw_fill_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_border), MP_ROM_PTR(&mp_lv_draw_border_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_box_shadow), MP_ROM_PTR(&mp_lv_draw_box_shadow_mpobj) }, @@ -49392,6 +53284,17 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_label), MP_ROM_PTR(&mp_lv_draw_label_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_character), MP_ROM_PTR(&mp_lv_draw_character_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_letter), MP_ROM_PTR(&mp_lv_draw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_drv), MP_ROM_PTR(&mp_lv_fs_get_drv_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_remove_drive), MP_ROM_PTR(&mp_lv_fs_remove_drive_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_is_ready), MP_ROM_PTR(&mp_lv_fs_is_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_get_size), MP_ROM_PTR(&mp_lv_fs_path_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_load_to_buf), MP_ROM_PTR(&mp_lv_fs_load_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_load_with_alloc), MP_ROM_PTR(&mp_lv_fs_load_with_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_letters), MP_ROM_PTR(&mp_lv_fs_get_letters_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_ext), MP_ROM_PTR(&mp_lv_fs_get_ext_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_up), MP_ROM_PTR(&mp_lv_fs_up_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_last), MP_ROM_PTR(&mp_lv_fs_get_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_join), MP_ROM_PTR(&mp_lv_fs_path_join_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_image), MP_ROM_PTR(&mp_lv_draw_image_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer), MP_ROM_PTR(&mp_lv_draw_layer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&mp_lv_draw_line_mpobj) }, @@ -49399,46 +53302,45 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_arc_get_area), MP_ROM_PTR(&mp_lv_draw_arc_get_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_triangle), MP_ROM_PTR(&mp_lv_draw_triangle_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_blur), MP_ROM_PTR(&mp_lv_draw_blur_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_create), MP_ROM_PTR(&mp_lv_group_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_get_default), MP_ROM_PTR(&mp_lv_group_get_default_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_swap_obj), MP_ROM_PTR(&mp_lv_group_swap_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_remove_obj), MP_ROM_PTR(&mp_lv_group_remove_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_focus_obj), MP_ROM_PTR(&mp_lv_group_focus_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_get_count), MP_ROM_PTR(&mp_lv_group_get_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_by_index), MP_ROM_PTR(&mp_lv_group_by_index_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_create), MP_ROM_PTR(&mp_lv_indev_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_read_timer_cb), MP_ROM_PTR(&mp_lv_indev_read_timer_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_active), MP_ROM_PTR(&mp_lv_indev_active_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_get_active_obj), MP_ROM_PTR(&mp_lv_indev_get_active_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_search_obj), MP_ROM_PTR(&mp_lv_indev_search_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_create), MP_ROM_PTR(&mp_lv_subject_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_now), MP_ROM_PTR(&mp_lv_refr_now_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_refr_timer), MP_ROM_PTR(&mp_lv_display_refr_timer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_mask_rect), MP_ROM_PTR(&mp_lv_draw_mask_rect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take), MP_ROM_PTR(&mp_lv_snapshot_take_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_create_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_create_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_reshape_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_reshape_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_free), MP_ROM_PTR(&mp_lv_snapshot_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_to_argb8888), MP_ROM_PTR(&mp_lv_draw_i1_to_argb8888_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_rgb565_swap), MP_ROM_PTR(&mp_lv_draw_rgb565_swap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_invert), MP_ROM_PTR(&mp_lv_draw_i1_invert_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_convert_to_vtiled), MP_ROM_PTR(&mp_lv_draw_i1_convert_to_vtiled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_rotate), MP_ROM_PTR(&mp_lv_draw_rotate_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_create), MP_ROM_PTR(&mp_lv_binfont_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_create_from_buffer), MP_ROM_PTR(&mp_lv_binfont_create_from_buffer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_destroy), MP_ROM_PTR(&mp_lv_binfont_destroy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_imgfont_create), MP_ROM_PTR(&mp_lv_imgfont_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_imgfont_destroy), MP_ROM_PTR(&mp_lv_imgfont_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_span_stack_init), MP_ROM_PTR(&mp_lv_span_stack_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_span_stack_deinit), MP_ROM_PTR(&mp_lv_span_stack_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_memfs_init), MP_ROM_PTR(&mp_lv_fs_memfs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_init), MP_ROM_PTR(&mp_lv_bin_decoder_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_info), MP_ROM_PTR(&mp_lv_bin_decoder_info_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_get_area), MP_ROM_PTR(&mp_lv_bin_decoder_get_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_open), MP_ROM_PTR(&mp_lv_bin_decoder_open_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_close), MP_ROM_PTR(&mp_lv_bin_decoder_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_memfs_init), MP_ROM_PTR(&mp_lv_fs_memfs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_lodepng_init), MP_ROM_PTR(&mp_lv_lodepng_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_lodepng_deinit), MP_ROM_PTR(&mp_lv_lodepng_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_to_argb8888), MP_ROM_PTR(&mp_lv_draw_sw_i1_to_argb8888_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_rgb565_swap), MP_ROM_PTR(&mp_lv_draw_sw_rgb565_swap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_invert), MP_ROM_PTR(&mp_lv_draw_sw_i1_invert_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_convert_to_vtiled), MP_ROM_PTR(&mp_lv_draw_sw_i1_convert_to_vtiled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_rotate), MP_ROM_PTR(&mp_lv_draw_sw_rotate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take), MP_ROM_PTR(&mp_lv_snapshot_take_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_create_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_create_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_reshape_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_reshape_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_free), MP_ROM_PTR(&mp_lv_snapshot_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_async_call), MP_ROM_PTR(&mp_lv_async_call_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_async_call_cancel), MP_ROM_PTR(&mp_lv_async_call_cancel_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lock), MP_ROM_PTR(&mp_lv_lock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lock_isr), MP_ROM_PTR(&mp_lv_lock_isr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unlock), MP_ROM_PTR(&mp_lv_unlock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_lv_sleep_ms_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_create), MP_ROM_PTR(&mp_lv_theme_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_get_from_obj), MP_ROM_PTR(&mp_lv_theme_get_from_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_apply), MP_ROM_PTR(&mp_lv_theme_apply_mpobj) }, @@ -49451,51 +53353,73 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_theme_default_is_inited), MP_ROM_PTR(&mp_lv_theme_default_is_inited_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_default_get), MP_ROM_PTR(&mp_lv_theme_default_get_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_default_deinit), MP_ROM_PTR(&mp_lv_theme_default_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_mask_rect), MP_ROM_PTR(&mp_lv_draw_mask_rect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_init), MP_ROM_PTR(&mp_lv_draw_sw_mask_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_deinit), MP_ROM_PTR(&mp_lv_draw_sw_mask_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_apply), MP_ROM_PTR(&mp_lv_draw_sw_mask_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_free_param), MP_ROM_PTR(&mp_lv_draw_sw_mask_free_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_inc), MP_ROM_PTR(&mp_lv_tick_inc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_get), MP_ROM_PTR(&mp_lv_tick_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_elaps), MP_ROM_PTR(&mp_lv_tick_elaps_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_diff), MP_ROM_PTR(&mp_lv_tick_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delay_ms), MP_ROM_PTR(&mp_lv_delay_ms_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delay_set_cb), MP_ROM_PTR(&mp_lv_delay_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_set_cb), MP_ROM_PTR(&mp_lv_tick_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_get_cb), MP_ROM_PTR(&mp_lv_tick_get_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_span_stack_init), MP_ROM_PTR(&mp_lv_span_stack_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_span_stack_deinit), MP_ROM_PTR(&mp_lv_span_stack_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_os_init), MP_ROM_PTR(&mp_lv_os_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_os_get_idle_percent), MP_ROM_PTR(&mp_lv_os_get_idle_percent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_iter_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_alloc), MP_ROM_PTR(&mp_lv_cache_entry_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_get_size), MP_ROM_PTR(&mp_lv_cache_entry_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_get_entry), MP_ROM_PTR(&mp_lv_cache_entry_get_entry_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_init), MP_ROM_PTR(&mp_lv_draw_sw_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_deinit), MP_ROM_PTR(&mp_lv_draw_sw_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_transform), MP_ROM_PTR(&mp_lv_draw_sw_transform_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_unregister_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_unregister_blend_handler_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_get_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_get_blend_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_os_init), MP_ROM_PTR(&mp_lv_os_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_os_get_idle_percent), MP_ROM_PTR(&mp_lv_os_get_idle_percent_mpobj) }, { MP_ROM_QSTR(MP_QSTR_timer_core_init), MP_ROM_PTR(&mp_lv_timer_core_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_timer_core_deinit), MP_ROM_PTR(&mp_lv_timer_core_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_core_init), MP_ROM_PTR(&mp_lv_anim_core_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_core_deinit), MP_ROM_PTR(&mp_lv_anim_core_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_enable_vsync_mode), MP_ROM_PTR(&mp_lv_anim_enable_vsync_mode_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_init_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_handlers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_get_size), MP_ROM_PTR(&mp_lv_cache_entry_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_get_entry), MP_ROM_PTR(&mp_lv_cache_entry_get_entry_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_alloc), MP_ROM_PTR(&mp_lv_cache_entry_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_init), MP_ROM_PTR(&mp_lv_draw_sw_mask_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_deinit), MP_ROM_PTR(&mp_lv_draw_sw_mask_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_apply), MP_ROM_PTR(&mp_lv_draw_sw_mask_apply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_free_param), MP_ROM_PTR(&mp_lv_draw_sw_mask_free_param_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_cleanup), MP_ROM_PTR(&mp_lv_draw_sw_mask_cleanup_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_init), MP_ROM_PTR(&mp_lv_layout_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_deinit), MP_ROM_PTR(&mp_lv_layout_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_get_min_size), MP_ROM_PTR(&mp_lv_layout_get_min_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_apply), MP_ROM_PTR(&mp_lv_layout_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_indev_scroll_get_snap_dist), MP_ROM_PTR(&mp_lv_indev_scroll_get_snap_dist_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_size_attributes), MP_ROM_PTR(&mp_lv_text_get_size_attributes_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_width), MP_ROM_PTR(&mp_lv_text_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_is_cmd), MP_ROM_PTR(&mp_lv_text_is_cmd_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_next_line), MP_ROM_PTR(&mp_lv_text_get_next_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_init), MP_ROM_PTR(&mp_lv_group_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_deinit), MP_ROM_PTR(&mp_lv_group_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_mark_deleted), MP_ROM_PTR(&mp_lv_event_mark_deleted_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_global_init), MP_ROM_PTR(&mp_lv_subject_global_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_global_deinit), MP_ROM_PTR(&mp_lv_subject_global_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_init), MP_ROM_PTR(&mp_lv_refr_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_deinit), MP_ROM_PTR(&mp_lv_refr_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_inv_area), MP_ROM_PTR(&mp_lv_inv_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_get_disp_refreshing), MP_ROM_PTR(&mp_lv_refr_get_disp_refreshing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_set_disp_refreshing), MP_ROM_PTR(&mp_lv_refr_set_disp_refreshing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_get_top_obj), MP_ROM_PTR(&mp_lv_refr_get_top_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_init), MP_ROM_PTR(&mp_lv_group_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_deinit), MP_ROM_PTR(&mp_lv_group_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_color_calculate), MP_ROM_PTR(&mp_lv_draw_sw_grad_color_calculate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_get), MP_ROM_PTR(&mp_lv_draw_sw_grad_get_mpobj) }, { MP_ROM_QSTR(MP_QSTR_fs_init), MP_ROM_PTR(&mp_lv_fs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_fs_deinit), MP_ROM_PTR(&mp_lv_fs_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_mark_deleted), MP_ROM_PTR(&mp_lv_event_mark_deleted_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_indev_scroll_get_snap_dist), MP_ROM_PTR(&mp_lv_indev_scroll_get_snap_dist_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create), MP_ROM_PTR(&mp_lv_circle_buf_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_buf), MP_ROM_PTR(&mp_lv_circle_buf_create_from_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_array), MP_ROM_PTR(&mp_lv_circle_buf_create_from_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lru_create), MP_ROM_PTR(&mp_lv_lru_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pending_create), MP_ROM_PTR(&mp_lv_pending_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_size_attributes), MP_ROM_PTR(&mp_lv_text_get_size_attributes_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_width), MP_ROM_PTR(&mp_lv_text_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_line_width), MP_ROM_PTR(&mp_lv_text_get_line_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_cmd), MP_ROM_PTR(&mp_lv_text_is_cmd_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_next_line), MP_ROM_PTR(&mp_lv_text_get_next_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_size_internal), MP_ROM_PTR(&mp_lv_text_get_size_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, }; static MP_DEFINE_CONST_DICT(lvgl_module_globals, lvgl_module_globals_table); @@ -49539,7 +53463,6 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_PART_TEXTAREA_PLACEHOLDER), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_PART_TEXTAREA_PLACEHOLDER)) }, { MP_ROM_QSTR(MP_QSTR_TABLE_CELL_NONE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_TABLE_CELL_NONE)) }, { MP_ROM_QSTR(MP_QSTR_color_filter_shade), MP_ROM_PTR(&mp_lv_color_filter_shade) }, - { MP_ROM_QSTR(MP_QSTR_tree_node_class), MP_ROM_PTR(&mp_lv_tree_node_class) }, #if LV_FONT_MONTSERRAT_14 { MP_ROM_QSTR(MP_QSTR_font_montserrat_14), MP_ROM_PTR(&mp_lv_font_montserrat_14) }, #endif @@ -49565,12 +53488,13 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_arclabel_class), MP_ROM_PTR(&mp_lv_arclabel_class) }, { MP_ROM_QSTR(MP_QSTR_label_class), MP_ROM_PTR(&mp_lv_label_class) }, { MP_ROM_QSTR(MP_QSTR_bar_class), MP_ROM_PTR(&mp_lv_bar_class) }, + { MP_ROM_QSTR(MP_QSTR_canvas_class), MP_ROM_PTR(&mp_lv_canvas_class) }, + { MP_ROM_QSTR(MP_QSTR_barcode_class), MP_ROM_PTR(&mp_lv_barcode_class) }, { MP_ROM_QSTR(MP_QSTR_button_class), MP_ROM_PTR(&mp_lv_button_class) }, { MP_ROM_QSTR(MP_QSTR_buttonmatrix_class), MP_ROM_PTR(&mp_lv_buttonmatrix_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_class), MP_ROM_PTR(&mp_lv_calendar_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_header_arrow_class), MP_ROM_PTR(&mp_lv_calendar_header_arrow_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_header_dropdown_class), MP_ROM_PTR(&mp_lv_calendar_header_dropdown_class) }, - { MP_ROM_QSTR(MP_QSTR_canvas_class), MP_ROM_PTR(&mp_lv_canvas_class) }, { MP_ROM_QSTR(MP_QSTR_chart_class), MP_ROM_PTR(&mp_lv_chart_class) }, { MP_ROM_QSTR(MP_QSTR_checkbox_class), MP_ROM_PTR(&mp_lv_checkbox_class) }, { MP_ROM_QSTR(MP_QSTR_dropdown_class), MP_ROM_PTR(&mp_lv_dropdown_class) }, @@ -49599,6 +53523,7 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_msgbox_header_button_class), MP_ROM_PTR(&mp_lv_msgbox_header_button_class) }, { MP_ROM_QSTR(MP_QSTR_msgbox_footer_button_class), MP_ROM_PTR(&mp_lv_msgbox_footer_button_class) }, { MP_ROM_QSTR(MP_QSTR_msgbox_backdrop_class), MP_ROM_PTR(&mp_lv_msgbox_backdrop_class) }, + { MP_ROM_QSTR(MP_QSTR_qrcode_class), MP_ROM_PTR(&mp_lv_qrcode_class) }, { MP_ROM_QSTR(MP_QSTR_roller_class), MP_ROM_PTR(&mp_lv_roller_class) }, { MP_ROM_QSTR(MP_QSTR_scale_class), MP_ROM_PTR(&mp_lv_scale_class) }, { MP_ROM_QSTR(MP_QSTR_slider_class), MP_ROM_PTR(&mp_lv_slider_class) }, @@ -49612,23 +53537,24 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_tileview_class), MP_ROM_PTR(&mp_lv_tileview_class) }, { MP_ROM_QSTR(MP_QSTR_tileview_tile_class), MP_ROM_PTR(&mp_lv_tileview_tile_class) }, { MP_ROM_QSTR(MP_QSTR_win_class), MP_ROM_PTR(&mp_lv_win_class) }, - { MP_ROM_QSTR(MP_QSTR_barcode_class), MP_ROM_PTR(&mp_lv_barcode_class) }, - { MP_ROM_QSTR(MP_QSTR_qrcode_class), MP_ROM_PTR(&mp_lv_qrcode_class) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_rb_count), MP_ROM_PTR(&mp_lv_cache_class_lru_rb_count) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_rb_size), MP_ROM_PTR(&mp_lv_cache_class_lru_rb_size) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_ll_count), MP_ROM_PTR(&mp_lv_cache_class_lru_ll_count) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_ll_size), MP_ROM_PTR(&mp_lv_cache_class_lru_ll_size) }, { MP_ROM_QSTR(MP_QSTR_cache_class_sc_da), MP_ROM_PTR(&mp_lv_cache_class_sc_da) }, + { MP_ROM_QSTR(MP_QSTR_tree_node_class), MP_ROM_PTR(&mp_lv_tree_node_class) }, { MP_ROM_QSTR(MP_QSTR__nesting), MP_ROM_PTR(&mp__nesting) }, - { MP_ROM_QSTR(MP_QSTR_LOG_LEVEL), MP_ROM_PTR(&mp_lv_ENUM_LV_LOG_LEVEL_type_base) }, { MP_ROM_QSTR(MP_QSTR_COORD), MP_ROM_PTR(&mp_lv_ENUM_LV_COORD_type_base) }, + { MP_ROM_QSTR(MP_QSTR_LOG_LEVEL), MP_ROM_PTR(&mp_lv_ENUM_LV_LOG_LEVEL_type_base) }, { MP_ROM_QSTR(MP_QSTR_OPA), MP_ROM_PTR(&mp_lv_LV_OPA_type_base) }, - { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE), MP_ROM_PTR(&mp_lv_LV_STYLE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_RESULT), MP_ROM_PTR(&mp_lv_LV_RESULT_type_base) }, - { MP_ROM_QSTR(MP_QSTR_RB_COLOR), MP_ROM_PTR(&mp_lv_LV_RB_COLOR_type_base) }, { MP_ROM_QSTR(MP_QSTR_ALIGN), MP_ROM_PTR(&mp_lv_LV_ALIGN_type_base) }, { MP_ROM_QSTR(MP_QSTR_DIR), MP_ROM_PTR(&mp_lv_LV_DIR_type_base) }, + { MP_ROM_QSTR(MP_QSTR_EVENT), MP_ROM_PTR(&mp_lv_LV_EVENT_type_base) }, + { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(&mp_lv_LV_KEY_type_base) }, + { MP_ROM_QSTR(MP_QSTR_GROUP_REFOCUS_POLICY), MP_ROM_PTR(&mp_lv_LV_GROUP_REFOCUS_POLICY_type_base) }, { MP_ROM_QSTR(MP_QSTR_COLOR_FORMAT), MP_ROM_PTR(&mp_lv_LV_COLOR_FORMAT_type_base) }, { MP_ROM_QSTR(MP_QSTR_PALETTE), MP_ROM_PTR(&mp_lv_LV_PALETTE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FONT_GLYPH_FORMAT), MP_ROM_PTR(&mp_lv_LV_FONT_GLYPH_FORMAT_type_base) }, @@ -49636,6 +53562,7 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_FONT_KERNING), MP_ROM_PTR(&mp_lv_LV_FONT_KERNING_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_FLAG), MP_ROM_PTR(&mp_lv_LV_TEXT_FLAG_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_ALIGN), MP_ROM_PTR(&mp_lv_LV_TEXT_ALIGN_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TEXT_LEADING_TRIM), MP_ROM_PTR(&mp_lv_LV_TEXT_LEADING_TRIM_type_base) }, { MP_ROM_QSTR(MP_QSTR_BASE_DIR), MP_ROM_PTR(&mp_lv_LV_BASE_DIR_type_base) }, { MP_ROM_QSTR(MP_QSTR_GRAD_DIR), MP_ROM_PTR(&mp_lv_LV_GRAD_DIR_type_base) }, { MP_ROM_QSTR(MP_QSTR_GRAD_EXTEND), MP_ROM_PTR(&mp_lv_LV_GRAD_EXTEND_type_base) }, @@ -49648,7 +53575,6 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_BORDER_SIDE), MP_ROM_PTR(&mp_lv_LV_BORDER_SIDE_type_base) }, { MP_ROM_QSTR(MP_QSTR_BLUR_QUALITY), MP_ROM_PTR(&mp_lv_LV_BLUR_QUALITY_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE_RES), MP_ROM_PTR(&mp_lv_LV_STYLE_RES_type_base) }, - { MP_ROM_QSTR(MP_QSTR_EVENT), MP_ROM_PTR(&mp_lv_LV_EVENT_type_base) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_ROTATION), MP_ROM_PTR(&mp_lv_LV_DISPLAY_ROTATION_type_base) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_RENDER_MODE), MP_ROM_PTR(&mp_lv_LV_DISPLAY_RENDER_MODE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SCREEN_LOAD_ANIM), MP_ROM_PTR(&mp_lv_LV_SCREEN_LOAD_ANIM_type_base) }, @@ -49657,14 +53583,12 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_STATE), MP_ROM_PTR(&mp_lv_LV_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_PART), MP_ROM_PTR(&mp_lv_LV_PART_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE_STATE_CMP), MP_ROM_PTR(&mp_lv_LV_STYLE_STATE_CMP_type_base) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_TYPE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_STATE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_RES), MP_ROM_PTR(&mp_lv_LV_FS_RES_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_MODE), MP_ROM_PTR(&mp_lv_LV_FS_MODE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_SEEK), MP_ROM_PTR(&mp_lv_LV_FS_SEEK_type_base) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_STATE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_LAYER_TYPE), MP_ROM_PTR(&mp_lv_LV_LAYER_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(&mp_lv_LV_KEY_type_base) }, - { MP_ROM_QSTR(MP_QSTR_GROUP_REFOCUS_POLICY), MP_ROM_PTR(&mp_lv_LV_GROUP_REFOCUS_POLICY_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_TYPE), MP_ROM_PTR(&mp_lv_LV_INDEV_TYPE_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_STATE), MP_ROM_PTR(&mp_lv_LV_INDEV_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_MODE), MP_ROM_PTR(&mp_lv_LV_INDEV_MODE_type_base) }, @@ -49678,11 +53602,13 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_ANIM_IMAGE_PART), MP_ROM_PTR(&mp_lv_LV_ANIM_IMAGE_PART_type_base) }, { MP_ROM_QSTR(MP_QSTR_SPAN_OVERFLOW), MP_ROM_PTR(&mp_lv_LV_SPAN_OVERFLOW_type_base) }, { MP_ROM_QSTR(MP_QSTR_SPAN_MODE), MP_ROM_PTR(&mp_lv_LV_SPAN_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_THREAD_PRIO), MP_ROM_PTR(&mp_lv_LV_THREAD_PRIO_type_base) }, + { MP_ROM_QSTR(MP_QSTR_CACHE_RESERVE_COND), MP_ROM_PTR(&mp_lv_LV_CACHE_RESERVE_COND_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_RES), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_RES_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_TYPE_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_LINE_SIDE), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_LINE_SIDE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_THREAD_PRIO), MP_ROM_PTR(&mp_lv_LV_THREAD_PRIO_type_base) }, - { MP_ROM_QSTR(MP_QSTR_CACHE_RESERVE_COND), MP_ROM_PTR(&mp_lv_LV_CACHE_RESERVE_COND_type_base) }, + { MP_ROM_QSTR(MP_QSTR_LRU), MP_ROM_PTR(&mp_lv_LV_LRU_type_base) }, + { MP_ROM_QSTR(MP_QSTR_RB_COLOR), MP_ROM_PTR(&mp_lv_LV_RB_COLOR_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_CMD_STATE), MP_ROM_PTR(&mp_lv_LV_TEXT_CMD_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SYMBOL), MP_ROM_PTR(&mp_lv_LV_SYMBOL_type_base) }, { MP_ROM_QSTR(MP_QSTR_C_Pointer), MP_ROM_PTR(&mp_C_Pointer_type) }, @@ -49693,29 +53619,24 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_t), MP_ROM_PTR(&mp_lv_cache_entry_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_t), MP_ROM_PTR(&mp_lv_cache_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_class_t), MP_ROM_PTR(&mp_lv_cache_class_t_type) }, - { MP_ROM_QSTR(MP_QSTR_iter_t), MP_ROM_PTR(&mp_lv_iter_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_ops_t), MP_ROM_PTR(&mp_lv_cache_ops_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_t), MP_ROM_PTR(&mp_lv_draw_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_header_t), MP_ROM_PTR(&mp_lv_image_header_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_handlers_t), MP_ROM_PTR(&mp_lv_draw_buf_handlers_t_type) }, { MP_ROM_QSTR(MP_QSTR_area_t), MP_ROM_PTR(&mp_lv_area_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, - { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, - { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_layer_t), MP_ROM_PTR(&mp_lv_layer_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_task_t), MP_ROM_PTR(&mp_lv_draw_task_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_unit_t), MP_ROM_PTR(&mp_lv_draw_unit_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_t), MP_ROM_PTR(&mp_lv_event_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, + { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, + { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_list_t), MP_ROM_PTR(&mp_lv_event_list_t_type) }, { MP_ROM_QSTR(MP_QSTR_array_t), MP_ROM_PTR(&mp_lv_array_t_type) }, { MP_ROM_QSTR(MP_QSTR_theme_t), MP_ROM_PTR(&mp_lv_theme_t_type) }, { MP_ROM_QSTR(MP_QSTR_timer_t), MP_ROM_PTR(&mp_lv_timer_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, + { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_obj_class_t), MP_ROM_PTR(&mp_lv_obj_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_matrix_t), MP_ROM_PTR(&mp_lv_matrix_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_t), MP_ROM_PTR(&mp_lv_style_t_type) }, @@ -49736,6 +53657,7 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_draw_blur_dsc_t), MP_ROM_PTR(&mp_lv_draw_blur_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_dsc_t), MP_ROM_PTR(&mp_lv_event_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_group_t), MP_ROM_PTR(&mp_lv_group_t_type) }, + { MP_ROM_QSTR(MP_QSTR_delete_dsc_t), MP_ROM_PTR(&mp_lv_delete_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_anim_timeline_t), MP_ROM_PTR(&mp_lv_anim_timeline_t_type) }, { MP_ROM_QSTR(MP_QSTR_anim_timeline_dsc_t), MP_ROM_PTR(&mp_lv_anim_timeline_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_increment_dsc_t), MP_ROM_PTR(&mp_lv_subject_increment_dsc_t_type) }, @@ -49746,6 +53668,11 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_fs_file_t), MP_ROM_PTR(&mp_lv_fs_file_t_type) }, { MP_ROM_QSTR(MP_QSTR_fs_drv_t), MP_ROM_PTR(&mp_lv_fs_drv_t_type) }, { MP_ROM_QSTR(MP_QSTR_fs_file_cache_t), MP_ROM_PTR(&mp_lv_fs_file_cache_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_t), MP_ROM_PTR(&mp_lv_cache_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_class_t), MP_ROM_PTR(&mp_lv_cache_class_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_t), MP_ROM_PTR(&mp_lv_cache_entry_t_type) }, + { MP_ROM_QSTR(MP_QSTR_iter_t), MP_ROM_PTR(&mp_lv_iter_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_ops_t), MP_ROM_PTR(&mp_lv_cache_ops_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_cache_data_t), MP_ROM_PTR(&mp_lv_image_cache_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_cache_slot_size_t), MP_ROM_PTR(&mp_lv_cache_slot_size_t_type) }, { MP_ROM_QSTR(MP_QSTR_calendar_date_t), MP_ROM_PTR(&mp_lv_calendar_date_t_type) }, @@ -49754,31 +53681,32 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_scale_section_t), MP_ROM_PTR(&mp_lv_scale_section_t_type) }, { MP_ROM_QSTR(MP_QSTR_span_t), MP_ROM_PTR(&mp_lv_span_t_type) }, { MP_ROM_QSTR(MP_QSTR_span_coords_t), MP_ROM_PTR(&mp_lv_span_coords_t_type) }, - { MP_ROM_QSTR(MP_QSTR_tree_class_t), MP_ROM_PTR(&mp_lv_tree_class_t_type) }, - { MP_ROM_QSTR(MP_QSTR_tree_node_t), MP_ROM_PTR(&mp_lv_tree_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_class_t), MP_ROM_PTR(&mp_lv_font_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_info_t), MP_ROM_PTR(&mp_lv_font_info_t_type) }, + { MP_ROM_QSTR(MP_QSTR_tree_class_t), MP_ROM_PTR(&mp_lv_tree_class_t_type) }, + { MP_ROM_QSTR(MP_QSTR_tree_node_t), MP_ROM_PTR(&mp_lv_tree_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_color16_t), MP_ROM_PTR(&mp_lv_color16_t_type) }, { MP_ROM_QSTR(MP_QSTR_mem_monitor_t), MP_ROM_PTR(&mp_lv_mem_monitor_t_type) }, - { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, - { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_t), MP_ROM_PTR(&mp_lv_circle_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_layout_callbacks_t), MP_ROM_PTR(&mp_lv_layout_callbacks_t_type) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_ex_t), MP_ROM_PTR(&mp_lv_fs_path_ex_t_type) }, - { MP_ROM_QSTR(MP_QSTR_fs_dir_t), MP_ROM_PTR(&mp_lv_fs_dir_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_fill_dsc_t), MP_ROM_PTR(&mp_lv_draw_fill_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_border_dsc_t), MP_ROM_PTR(&mp_lv_draw_border_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_box_shadow_dsc_t), MP_ROM_PTR(&mp_lv_draw_box_shadow_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_letter_dsc_t), MP_ROM_PTR(&mp_lv_draw_letter_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_glyph_dsc_t), MP_ROM_PTR(&mp_lv_draw_glyph_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_ex_t), MP_ROM_PTR(&mp_lv_fs_path_ex_t_type) }, + { MP_ROM_QSTR(MP_QSTR_fs_dir_t), MP_ROM_PTR(&mp_lv_fs_dir_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_triangle_dsc_t), MP_ROM_PTR(&mp_lv_draw_triangle_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_t), MP_ROM_PTR(&mp_lv_indev_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_data_t), MP_ROM_PTR(&mp_lv_indev_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_recognizer_t), MP_ROM_PTR(&mp_lv_indev_gesture_recognizer_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_t), MP_ROM_PTR(&mp_lv_indev_gesture_t_type) }, + { MP_ROM_QSTR(MP_QSTR_indev_gesture_motion_t), MP_ROM_PTR(&mp_lv_indev_gesture_motion_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_configuration_t), MP_ROM_PTR(&mp_lv_indev_gesture_configuration_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_touch_data_t), MP_ROM_PTR(&mp_lv_indev_touch_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_mask_rect_dsc_t), MP_ROM_PTR(&mp_lv_draw_mask_rect_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_binfont_dsc_t), MP_ROM_PTR(&mp_lv_binfont_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_custom_blend_handler_t), MP_ROM_PTR(&mp_lv_draw_sw_custom_blend_handler_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_line_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_line_param_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_common_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_common_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_angle_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_angle_param_t_type) }, @@ -49786,8 +53714,15 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_radius_circle_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_radius_circle_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_fade_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_fade_param_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_map_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_map_param_t_type) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_custom_blend_handler_t), MP_ROM_PTR(&mp_lv_draw_sw_custom_blend_handler_t_type) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_fill_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_fill_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_image_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_calc_t), MP_ROM_PTR(&mp_lv_draw_sw_grad_calc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_t), MP_ROM_PTR(&mp_lv_circle_buf_t_type) }, + { MP_ROM_QSTR(MP_QSTR_lru_t), MP_ROM_PTR(&mp_lv_lru_t_type) }, + { MP_ROM_QSTR(MP_QSTR_lru_item_t), MP_ROM_PTR(&mp_lv_lru_item_t_type) }, + { MP_ROM_QSTR(MP_QSTR_pending_t), MP_ROM_PTR(&mp_lv_pending_t_type) }, + { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, + { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_text_attributes_t), MP_ROM_PTR(&mp_lv_text_attributes_t_type) }, { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_hit_test_info_t), MP_ROM_PTR(&mp_lv_hit_test_info_t_type) }, @@ -49800,10 +53735,11 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_arclabel), MP_ROM_PTR(&mp_lv_arclabel_type_base) }, { MP_ROM_QSTR(MP_QSTR_label), MP_ROM_PTR(&mp_lv_label_type_base) }, { MP_ROM_QSTR(MP_QSTR_bar), MP_ROM_PTR(&mp_lv_bar_type_base) }, + { MP_ROM_QSTR(MP_QSTR_canvas), MP_ROM_PTR(&mp_lv_canvas_type_base) }, + { MP_ROM_QSTR(MP_QSTR_barcode), MP_ROM_PTR(&mp_lv_barcode_type_base) }, { MP_ROM_QSTR(MP_QSTR_button), MP_ROM_PTR(&mp_lv_button_type_base) }, { MP_ROM_QSTR(MP_QSTR_buttonmatrix), MP_ROM_PTR(&mp_lv_buttonmatrix_type_base) }, { MP_ROM_QSTR(MP_QSTR_calendar), MP_ROM_PTR(&mp_lv_calendar_type_base) }, - { MP_ROM_QSTR(MP_QSTR_canvas), MP_ROM_PTR(&mp_lv_canvas_type_base) }, { MP_ROM_QSTR(MP_QSTR_chart), MP_ROM_PTR(&mp_lv_chart_type_base) }, { MP_ROM_QSTR(MP_QSTR_checkbox), MP_ROM_PTR(&mp_lv_checkbox_type_base) }, { MP_ROM_QSTR(MP_QSTR_dropdown), MP_ROM_PTR(&mp_lv_dropdown_type_base) }, @@ -49819,6 +53755,7 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_menu_section), MP_ROM_PTR(&mp_lv_menu_section_type_base) }, { MP_ROM_QSTR(MP_QSTR_menu_separator), MP_ROM_PTR(&mp_lv_menu_separator_type_base) }, { MP_ROM_QSTR(MP_QSTR_msgbox), MP_ROM_PTR(&mp_lv_msgbox_type_base) }, + { MP_ROM_QSTR(MP_QSTR_qrcode), MP_ROM_PTR(&mp_lv_qrcode_type_base) }, { MP_ROM_QSTR(MP_QSTR_roller), MP_ROM_PTR(&mp_lv_roller_type_base) }, { MP_ROM_QSTR(MP_QSTR_scale), MP_ROM_PTR(&mp_lv_scale_type_base) }, { MP_ROM_QSTR(MP_QSTR_slider), MP_ROM_PTR(&mp_lv_slider_type_base) }, @@ -49831,18 +53768,17 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_tabview), MP_ROM_PTR(&mp_lv_tabview_type_base) }, { MP_ROM_QSTR(MP_QSTR_tileview), MP_ROM_PTR(&mp_lv_tileview_type_base) }, { MP_ROM_QSTR(MP_QSTR_win), MP_ROM_PTR(&mp_lv_win_type_base) }, - { MP_ROM_QSTR(MP_QSTR_barcode), MP_ROM_PTR(&mp_lv_barcode_type_base) }, - { MP_ROM_QSTR(MP_QSTR_qrcode), MP_ROM_PTR(&mp_lv_qrcode_type_base) }, - { MP_ROM_QSTR(MP_QSTR_memzero), MP_ROM_PTR(&mp_lv_memzero_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_streq), MP_ROM_PTR(&mp_lv_streq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_sqr), MP_ROM_PTR(&mp_lv_sqr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_swap_16), MP_ROM_PTR(&mp_lv_color_swap_16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap_bytes_32), MP_ROM_PTR(&mp_lv_swap_bytes_32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap_bytes_16), MP_ROM_PTR(&mp_lv_swap_bytes_16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align), MP_ROM_PTR(&mp_lv_bidi_calculate_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memzero), MP_ROM_PTR(&mp_lv_memzero_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_streq), MP_ROM_PTR(&mp_lv_streq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_get_prop_group), MP_ROM_PTR(&mp_lv_style_get_prop_group_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_has_flag), MP_ROM_PTR(&mp_lv_style_prop_has_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_task_handler), MP_ROM_PTR(&mp_lv_task_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_major), MP_ROM_PTR(&mp_lv_version_major_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_minor), MP_ROM_PTR(&mp_lv_version_minor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_patch), MP_ROM_PTR(&mp_lv_version_patch_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_info), MP_ROM_PTR(&mp_lv_version_info_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_init), MP_ROM_PTR(&mp_lv_thread_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_delete), MP_ROM_PTR(&mp_lv_thread_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_mutex_init), MP_ROM_PTR(&mp_lv_mutex_init_mpobj) }, @@ -49855,63 +53791,14 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_thread_sync_signal), MP_ROM_PTR(&mp_lv_thread_sync_signal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_signal_isr), MP_ROM_PTR(&mp_lv_thread_sync_signal_isr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_delete), MP_ROM_PTR(&mp_lv_thread_sync_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_16_16_mix_inlined), MP_ROM_PTR(&mp_lv_color_16_16_mix_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align_internal), MP_ROM_PTR(&mp_lv_bidi_calculate_align_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_break_char), MP_ROM_PTR(&mp_lv_text_is_break_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_hanging_space), MP_ROM_PTR(&mp_lv_text_is_hanging_space_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_a_word), MP_ROM_PTR(&mp_lv_text_is_a_word_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_marker), MP_ROM_PTR(&mp_lv_text_is_marker_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_major), MP_ROM_PTR(&mp_lv_version_major_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_minor), MP_ROM_PTR(&mp_lv_version_minor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_patch), MP_ROM_PTR(&mp_lv_version_patch_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_info), MP_ROM_PTR(&mp_lv_version_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_initialized), MP_ROM_PTR(&mp_lv_is_initialized_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memcpy), MP_ROM_PTR(&mp_lv_memcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memset), MP_ROM_PTR(&mp_lv_memset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memmove), MP_ROM_PTR(&mp_lv_memmove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memcmp), MP_ROM_PTR(&mp_lv_memcmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strlen), MP_ROM_PTR(&mp_lv_strlen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strnlen), MP_ROM_PTR(&mp_lv_strnlen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strlcpy), MP_ROM_PTR(&mp_lv_strlcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncpy), MP_ROM_PTR(&mp_lv_strncpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcpy), MP_ROM_PTR(&mp_lv_strcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcmp), MP_ROM_PTR(&mp_lv_strcmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncmp), MP_ROM_PTR(&mp_lv_strncmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strdup), MP_ROM_PTR(&mp_lv_strdup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strndup), MP_ROM_PTR(&mp_lv_strndup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcat), MP_ROM_PTR(&mp_lv_strcat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncat), MP_ROM_PTR(&mp_lv_strncat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strchr), MP_ROM_PTR(&mp_lv_strchr_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_init), MP_ROM_PTR(&mp_lv_mem_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_deinit), MP_ROM_PTR(&mp_lv_mem_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_add_pool), MP_ROM_PTR(&mp_lv_mem_add_pool_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_remove_pool), MP_ROM_PTR(&mp_lv_mem_remove_pool_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc), MP_ROM_PTR(&mp_lv_malloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calloc), MP_ROM_PTR(&mp_lv_calloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_zalloc), MP_ROM_PTR(&mp_lv_zalloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc_zeroed), MP_ROM_PTR(&mp_lv_malloc_zeroed_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free), MP_ROM_PTR(&mp_lv_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_realloc), MP_ROM_PTR(&mp_lv_realloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reallocf), MP_ROM_PTR(&mp_lv_reallocf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc_core), MP_ROM_PTR(&mp_lv_malloc_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free_core), MP_ROM_PTR(&mp_lv_free_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_realloc_core), MP_ROM_PTR(&mp_lv_realloc_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_test_core), MP_ROM_PTR(&mp_lv_mem_test_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_test), MP_ROM_PTR(&mp_lv_mem_test_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_inc), MP_ROM_PTR(&mp_lv_tick_inc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_get), MP_ROM_PTR(&mp_lv_tick_get_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_elaps), MP_ROM_PTR(&mp_lv_tick_elaps_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_diff), MP_ROM_PTR(&mp_lv_tick_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delay_ms), MP_ROM_PTR(&mp_lv_delay_ms_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delay_set_cb), MP_ROM_PTR(&mp_lv_delay_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_set_cb), MP_ROM_PTR(&mp_lv_tick_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_get_cb), MP_ROM_PTR(&mp_lv_tick_get_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler), MP_ROM_PTR(&mp_lv_timer_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler_run_in_period), MP_ROM_PTR(&mp_lv_timer_handler_run_in_period_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_periodic_handler), MP_ROM_PTR(&mp_lv_timer_periodic_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler_set_resume_cb), MP_ROM_PTR(&mp_lv_timer_handler_set_resume_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_create_basic), MP_ROM_PTR(&mp_lv_timer_create_basic_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_create), MP_ROM_PTR(&mp_lv_timer_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_enable), MP_ROM_PTR(&mp_lv_timer_enable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_get_idle), MP_ROM_PTR(&mp_lv_timer_get_idle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_get_time_until_next), MP_ROM_PTR(&mp_lv_timer_get_time_until_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap_bytes_32), MP_ROM_PTR(&mp_lv_swap_bytes_32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap_bytes_16), MP_ROM_PTR(&mp_lv_swap_bytes_16_mpobj) }, { MP_ROM_QSTR(MP_QSTR_trigo_sin), MP_ROM_PTR(&mp_lv_trigo_sin_mpobj) }, { MP_ROM_QSTR(MP_QSTR_trigo_cos), MP_ROM_PTR(&mp_lv_trigo_cos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_cubic_bezier), MP_ROM_PTR(&mp_lv_cubic_bezier_mpobj) }, @@ -49923,8 +53810,6 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_map), MP_ROM_PTR(&mp_lv_map_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rand_set_seed), MP_ROM_PTR(&mp_lv_rand_set_seed_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rand), MP_ROM_PTR(&mp_lv_rand_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_async_call), MP_ROM_PTR(&mp_lv_async_call_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_async_call_cancel), MP_ROM_PTR(&mp_lv_async_call_cancel_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_delete), MP_ROM_PTR(&mp_lv_anim_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_delete_all), MP_ROM_PTR(&mp_lv_anim_delete_all_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_get), MP_ROM_PTR(&mp_lv_anim_get_mpobj) }, @@ -49938,6 +53823,32 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_anim_timeline_create), MP_ROM_PTR(&mp_lv_anim_timeline_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pct), MP_ROM_PTR(&mp_lv_pct_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pct_to_px), MP_ROM_PTR(&mp_lv_pct_to_px_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_register_id), MP_ROM_PTR(&mp_lv_event_register_id_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_code_get_name), MP_ROM_PTR(&mp_lv_event_code_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_create), MP_ROM_PTR(&mp_lv_group_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_get_default), MP_ROM_PTR(&mp_lv_group_get_default_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_swap_obj), MP_ROM_PTR(&mp_lv_group_swap_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_remove_obj), MP_ROM_PTR(&mp_lv_group_remove_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_focus_obj), MP_ROM_PTR(&mp_lv_group_focus_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_get_count), MP_ROM_PTR(&mp_lv_group_get_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_by_index), MP_ROM_PTR(&mp_lv_group_by_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_initialized), MP_ROM_PTR(&mp_lv_is_initialized_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_init), MP_ROM_PTR(&mp_lv_mem_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_deinit), MP_ROM_PTR(&mp_lv_mem_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_add_pool), MP_ROM_PTR(&mp_lv_mem_add_pool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_remove_pool), MP_ROM_PTR(&mp_lv_mem_remove_pool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc), MP_ROM_PTR(&mp_lv_malloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calloc), MP_ROM_PTR(&mp_lv_calloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_zalloc), MP_ROM_PTR(&mp_lv_zalloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc_zeroed), MP_ROM_PTR(&mp_lv_malloc_zeroed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free), MP_ROM_PTR(&mp_lv_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_realloc), MP_ROM_PTR(&mp_lv_realloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reallocf), MP_ROM_PTR(&mp_lv_reallocf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc_core), MP_ROM_PTR(&mp_lv_malloc_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free_core), MP_ROM_PTR(&mp_lv_free_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_realloc_core), MP_ROM_PTR(&mp_lv_realloc_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_test_core), MP_ROM_PTR(&mp_lv_mem_test_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_test), MP_ROM_PTR(&mp_lv_mem_test_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_get_bpp), MP_ROM_PTR(&mp_lv_color_format_get_bpp_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_get_size), MP_ROM_PTR(&mp_lv_color_format_get_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_has_alpha), MP_ROM_PTR(&mp_lv_color_format_has_alpha_mpobj) }, @@ -49954,23 +53865,31 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_palette_main), MP_ROM_PTR(&mp_lv_palette_main_mpobj) }, { MP_ROM_QSTR(MP_QSTR_palette_lighten), MP_ROM_PTR(&mp_lv_palette_lighten_mpobj) }, { MP_ROM_QSTR(MP_QSTR_palette_darken), MP_ROM_PTR(&mp_lv_palette_darken_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memcpy), MP_ROM_PTR(&mp_lv_memcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memset), MP_ROM_PTR(&mp_lv_memset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memmove), MP_ROM_PTR(&mp_lv_memmove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memcmp), MP_ROM_PTR(&mp_lv_memcmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strlen), MP_ROM_PTR(&mp_lv_strlen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strnlen), MP_ROM_PTR(&mp_lv_strnlen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strlcpy), MP_ROM_PTR(&mp_lv_strlcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncpy), MP_ROM_PTR(&mp_lv_strncpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcpy), MP_ROM_PTR(&mp_lv_strcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcmp), MP_ROM_PTR(&mp_lv_strcmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncmp), MP_ROM_PTR(&mp_lv_strncmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strdup), MP_ROM_PTR(&mp_lv_strdup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strndup), MP_ROM_PTR(&mp_lv_strndup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcat), MP_ROM_PTR(&mp_lv_strcat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncat), MP_ROM_PTR(&mp_lv_strncat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strchr), MP_ROM_PTR(&mp_lv_strchr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_font_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_font_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_image_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_image_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_align), MP_ROM_PTR(&mp_lv_draw_buf_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_width_to_stride), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_create), MP_ROM_PTR(&mp_lv_draw_buf_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_iter_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create), MP_ROM_PTR(&mp_lv_circle_buf_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_buf), MP_ROM_PTR(&mp_lv_circle_buf_create_from_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_array), MP_ROM_PTR(&mp_lv_circle_buf_create_from_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lock), MP_ROM_PTR(&mp_lv_lock_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lock_isr), MP_ROM_PTR(&mp_lv_lock_isr_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unlock), MP_ROM_PTR(&mp_lv_unlock_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_lv_sleep_ms_mpobj) }, { MP_ROM_QSTR(MP_QSTR_font_get_default), MP_ROM_PTR(&mp_lv_font_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_get_size), MP_ROM_PTR(&mp_lv_text_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align), MP_ROM_PTR(&mp_lv_bidi_calculate_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_register), MP_ROM_PTR(&mp_lv_layout_register_mpobj) }, { MP_ROM_QSTR(MP_QSTR_flex_init), MP_ROM_PTR(&mp_lv_flex_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_grid_init), MP_ROM_PTR(&mp_lv_grid_init_mpobj) }, @@ -49979,8 +53898,16 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_style_get_num_custom_props), MP_ROM_PTR(&mp_lv_style_get_num_custom_props_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_get_default), MP_ROM_PTR(&mp_lv_style_prop_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_lookup_flags), MP_ROM_PTR(&mp_lv_style_prop_lookup_flags_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_register_id), MP_ROM_PTR(&mp_lv_event_register_id_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_code_get_name), MP_ROM_PTR(&mp_lv_event_code_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler), MP_ROM_PTR(&mp_lv_timer_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler_run_in_period), MP_ROM_PTR(&mp_lv_timer_handler_run_in_period_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_time_to_next), MP_ROM_PTR(&mp_lv_timer_get_time_to_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_periodic_handler), MP_ROM_PTR(&mp_lv_timer_periodic_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler_set_resume_cb), MP_ROM_PTR(&mp_lv_timer_handler_set_resume_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_create_basic), MP_ROM_PTR(&mp_lv_timer_create_basic_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_create), MP_ROM_PTR(&mp_lv_timer_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_enable), MP_ROM_PTR(&mp_lv_timer_enable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_idle), MP_ROM_PTR(&mp_lv_timer_get_idle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_time_until_next), MP_ROM_PTR(&mp_lv_timer_get_time_until_next_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_create), MP_ROM_PTR(&mp_lv_display_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_get_default), MP_ROM_PTR(&mp_lv_display_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_screen_load), MP_ROM_PTR(&mp_lv_screen_load_mpobj) }, @@ -49992,17 +53919,6 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_dpx_mpobj) }, { MP_ROM_QSTR(MP_QSTR_clamp_width), MP_ROM_PTR(&mp_lv_clamp_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_clamp_height), MP_ROM_PTR(&mp_lv_clamp_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_drv), MP_ROM_PTR(&mp_lv_fs_get_drv_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_remove_drive), MP_ROM_PTR(&mp_lv_fs_remove_drive_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_is_ready), MP_ROM_PTR(&mp_lv_fs_is_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_get_size), MP_ROM_PTR(&mp_lv_fs_path_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_load_to_buf), MP_ROM_PTR(&mp_lv_fs_load_to_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_load_with_alloc), MP_ROM_PTR(&mp_lv_fs_load_with_alloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_letters), MP_ROM_PTR(&mp_lv_fs_get_letters_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_ext), MP_ROM_PTR(&mp_lv_fs_get_ext_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_up), MP_ROM_PTR(&mp_lv_fs_up_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_last), MP_ROM_PTR(&mp_lv_fs_get_last_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_join), MP_ROM_PTR(&mp_lv_fs_path_join_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_init), MP_ROM_PTR(&mp_lv_draw_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_deinit), MP_ROM_PTR(&mp_lv_draw_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_create_unit), MP_ROM_PTR(&mp_lv_draw_create_unit_mpobj) }, @@ -50022,6 +53938,9 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_draw_layer_go_to_xy), MP_ROM_PTR(&mp_lv_draw_layer_go_to_xy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer_create_drop_shadow), MP_ROM_PTR(&mp_lv_draw_layer_create_drop_shadow_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer_finish_drop_shadow), MP_ROM_PTR(&mp_lv_draw_layer_finish_drop_shadow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_dealloc_buf), MP_ROM_PTR(&mp_lv_draw_layer_dealloc_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_deinit), MP_ROM_PTR(&mp_lv_draw_layer_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_delete), MP_ROM_PTR(&mp_lv_draw_layer_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_fill), MP_ROM_PTR(&mp_lv_draw_fill_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_border), MP_ROM_PTR(&mp_lv_draw_border_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_box_shadow), MP_ROM_PTR(&mp_lv_draw_box_shadow_mpobj) }, @@ -50029,6 +53948,17 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_draw_label), MP_ROM_PTR(&mp_lv_draw_label_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_character), MP_ROM_PTR(&mp_lv_draw_character_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_letter), MP_ROM_PTR(&mp_lv_draw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_drv), MP_ROM_PTR(&mp_lv_fs_get_drv_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_remove_drive), MP_ROM_PTR(&mp_lv_fs_remove_drive_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_is_ready), MP_ROM_PTR(&mp_lv_fs_is_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_get_size), MP_ROM_PTR(&mp_lv_fs_path_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_load_to_buf), MP_ROM_PTR(&mp_lv_fs_load_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_load_with_alloc), MP_ROM_PTR(&mp_lv_fs_load_with_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_letters), MP_ROM_PTR(&mp_lv_fs_get_letters_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_ext), MP_ROM_PTR(&mp_lv_fs_get_ext_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_up), MP_ROM_PTR(&mp_lv_fs_up_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_last), MP_ROM_PTR(&mp_lv_fs_get_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_join), MP_ROM_PTR(&mp_lv_fs_path_join_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_image), MP_ROM_PTR(&mp_lv_draw_image_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer), MP_ROM_PTR(&mp_lv_draw_layer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&mp_lv_draw_line_mpobj) }, @@ -50036,46 +53966,45 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_draw_arc_get_area), MP_ROM_PTR(&mp_lv_draw_arc_get_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_triangle), MP_ROM_PTR(&mp_lv_draw_triangle_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_blur), MP_ROM_PTR(&mp_lv_draw_blur_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_create), MP_ROM_PTR(&mp_lv_group_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_get_default), MP_ROM_PTR(&mp_lv_group_get_default_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_swap_obj), MP_ROM_PTR(&mp_lv_group_swap_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_remove_obj), MP_ROM_PTR(&mp_lv_group_remove_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_focus_obj), MP_ROM_PTR(&mp_lv_group_focus_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_get_count), MP_ROM_PTR(&mp_lv_group_get_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_by_index), MP_ROM_PTR(&mp_lv_group_by_index_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_create), MP_ROM_PTR(&mp_lv_indev_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_read_timer_cb), MP_ROM_PTR(&mp_lv_indev_read_timer_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_active), MP_ROM_PTR(&mp_lv_indev_active_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_get_active_obj), MP_ROM_PTR(&mp_lv_indev_get_active_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_search_obj), MP_ROM_PTR(&mp_lv_indev_search_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_create), MP_ROM_PTR(&mp_lv_subject_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_now), MP_ROM_PTR(&mp_lv_refr_now_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_refr_timer), MP_ROM_PTR(&mp_lv_display_refr_timer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_mask_rect), MP_ROM_PTR(&mp_lv_draw_mask_rect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take), MP_ROM_PTR(&mp_lv_snapshot_take_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_create_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_create_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_reshape_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_reshape_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_free), MP_ROM_PTR(&mp_lv_snapshot_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_to_argb8888), MP_ROM_PTR(&mp_lv_draw_i1_to_argb8888_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_rgb565_swap), MP_ROM_PTR(&mp_lv_draw_rgb565_swap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_invert), MP_ROM_PTR(&mp_lv_draw_i1_invert_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_convert_to_vtiled), MP_ROM_PTR(&mp_lv_draw_i1_convert_to_vtiled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_rotate), MP_ROM_PTR(&mp_lv_draw_rotate_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_create), MP_ROM_PTR(&mp_lv_binfont_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_create_from_buffer), MP_ROM_PTR(&mp_lv_binfont_create_from_buffer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_destroy), MP_ROM_PTR(&mp_lv_binfont_destroy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_imgfont_create), MP_ROM_PTR(&mp_lv_imgfont_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_imgfont_destroy), MP_ROM_PTR(&mp_lv_imgfont_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_span_stack_init), MP_ROM_PTR(&mp_lv_span_stack_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_span_stack_deinit), MP_ROM_PTR(&mp_lv_span_stack_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_memfs_init), MP_ROM_PTR(&mp_lv_fs_memfs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_init), MP_ROM_PTR(&mp_lv_bin_decoder_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_info), MP_ROM_PTR(&mp_lv_bin_decoder_info_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_get_area), MP_ROM_PTR(&mp_lv_bin_decoder_get_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_open), MP_ROM_PTR(&mp_lv_bin_decoder_open_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_close), MP_ROM_PTR(&mp_lv_bin_decoder_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_memfs_init), MP_ROM_PTR(&mp_lv_fs_memfs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_lodepng_init), MP_ROM_PTR(&mp_lv_lodepng_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_lodepng_deinit), MP_ROM_PTR(&mp_lv_lodepng_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_to_argb8888), MP_ROM_PTR(&mp_lv_draw_sw_i1_to_argb8888_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_rgb565_swap), MP_ROM_PTR(&mp_lv_draw_sw_rgb565_swap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_invert), MP_ROM_PTR(&mp_lv_draw_sw_i1_invert_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_convert_to_vtiled), MP_ROM_PTR(&mp_lv_draw_sw_i1_convert_to_vtiled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_rotate), MP_ROM_PTR(&mp_lv_draw_sw_rotate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take), MP_ROM_PTR(&mp_lv_snapshot_take_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_create_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_create_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_reshape_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_reshape_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_free), MP_ROM_PTR(&mp_lv_snapshot_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_async_call), MP_ROM_PTR(&mp_lv_async_call_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_async_call_cancel), MP_ROM_PTR(&mp_lv_async_call_cancel_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lock), MP_ROM_PTR(&mp_lv_lock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lock_isr), MP_ROM_PTR(&mp_lv_lock_isr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unlock), MP_ROM_PTR(&mp_lv_unlock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_lv_sleep_ms_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_create), MP_ROM_PTR(&mp_lv_theme_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_get_from_obj), MP_ROM_PTR(&mp_lv_theme_get_from_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_apply), MP_ROM_PTR(&mp_lv_theme_apply_mpobj) }, @@ -50088,51 +54017,73 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_theme_default_is_inited), MP_ROM_PTR(&mp_lv_theme_default_is_inited_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_default_get), MP_ROM_PTR(&mp_lv_theme_default_get_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_default_deinit), MP_ROM_PTR(&mp_lv_theme_default_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_mask_rect), MP_ROM_PTR(&mp_lv_draw_mask_rect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_init), MP_ROM_PTR(&mp_lv_draw_sw_mask_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_deinit), MP_ROM_PTR(&mp_lv_draw_sw_mask_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_apply), MP_ROM_PTR(&mp_lv_draw_sw_mask_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_free_param), MP_ROM_PTR(&mp_lv_draw_sw_mask_free_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_inc), MP_ROM_PTR(&mp_lv_tick_inc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_get), MP_ROM_PTR(&mp_lv_tick_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_elaps), MP_ROM_PTR(&mp_lv_tick_elaps_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_diff), MP_ROM_PTR(&mp_lv_tick_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delay_ms), MP_ROM_PTR(&mp_lv_delay_ms_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delay_set_cb), MP_ROM_PTR(&mp_lv_delay_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_set_cb), MP_ROM_PTR(&mp_lv_tick_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_get_cb), MP_ROM_PTR(&mp_lv_tick_get_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_span_stack_init), MP_ROM_PTR(&mp_lv_span_stack_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_span_stack_deinit), MP_ROM_PTR(&mp_lv_span_stack_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_os_init), MP_ROM_PTR(&mp_lv_os_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_os_get_idle_percent), MP_ROM_PTR(&mp_lv_os_get_idle_percent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_iter_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_alloc), MP_ROM_PTR(&mp_lv_cache_entry_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_get_size), MP_ROM_PTR(&mp_lv_cache_entry_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_get_entry), MP_ROM_PTR(&mp_lv_cache_entry_get_entry_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_init), MP_ROM_PTR(&mp_lv_draw_sw_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_deinit), MP_ROM_PTR(&mp_lv_draw_sw_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_transform), MP_ROM_PTR(&mp_lv_draw_sw_transform_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_unregister_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_unregister_blend_handler_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_get_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_get_blend_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_os_init), MP_ROM_PTR(&mp_lv_os_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_os_get_idle_percent), MP_ROM_PTR(&mp_lv_os_get_idle_percent_mpobj) }, { MP_ROM_QSTR(MP_QSTR_timer_core_init), MP_ROM_PTR(&mp_lv_timer_core_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_timer_core_deinit), MP_ROM_PTR(&mp_lv_timer_core_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_core_init), MP_ROM_PTR(&mp_lv_anim_core_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_core_deinit), MP_ROM_PTR(&mp_lv_anim_core_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_enable_vsync_mode), MP_ROM_PTR(&mp_lv_anim_enable_vsync_mode_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_init_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_handlers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_get_size), MP_ROM_PTR(&mp_lv_cache_entry_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_get_entry), MP_ROM_PTR(&mp_lv_cache_entry_get_entry_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_alloc), MP_ROM_PTR(&mp_lv_cache_entry_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_init), MP_ROM_PTR(&mp_lv_draw_sw_mask_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_deinit), MP_ROM_PTR(&mp_lv_draw_sw_mask_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_apply), MP_ROM_PTR(&mp_lv_draw_sw_mask_apply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_free_param), MP_ROM_PTR(&mp_lv_draw_sw_mask_free_param_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_cleanup), MP_ROM_PTR(&mp_lv_draw_sw_mask_cleanup_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_init), MP_ROM_PTR(&mp_lv_layout_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_deinit), MP_ROM_PTR(&mp_lv_layout_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_get_min_size), MP_ROM_PTR(&mp_lv_layout_get_min_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_apply), MP_ROM_PTR(&mp_lv_layout_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_indev_scroll_get_snap_dist), MP_ROM_PTR(&mp_lv_indev_scroll_get_snap_dist_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_size_attributes), MP_ROM_PTR(&mp_lv_text_get_size_attributes_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_width), MP_ROM_PTR(&mp_lv_text_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_is_cmd), MP_ROM_PTR(&mp_lv_text_is_cmd_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_next_line), MP_ROM_PTR(&mp_lv_text_get_next_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_init), MP_ROM_PTR(&mp_lv_group_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_deinit), MP_ROM_PTR(&mp_lv_group_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_mark_deleted), MP_ROM_PTR(&mp_lv_event_mark_deleted_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_global_init), MP_ROM_PTR(&mp_lv_subject_global_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_global_deinit), MP_ROM_PTR(&mp_lv_subject_global_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_init), MP_ROM_PTR(&mp_lv_refr_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_deinit), MP_ROM_PTR(&mp_lv_refr_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_inv_area), MP_ROM_PTR(&mp_lv_inv_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_get_disp_refreshing), MP_ROM_PTR(&mp_lv_refr_get_disp_refreshing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_set_disp_refreshing), MP_ROM_PTR(&mp_lv_refr_set_disp_refreshing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_get_top_obj), MP_ROM_PTR(&mp_lv_refr_get_top_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_init), MP_ROM_PTR(&mp_lv_group_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_deinit), MP_ROM_PTR(&mp_lv_group_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_color_calculate), MP_ROM_PTR(&mp_lv_draw_sw_grad_color_calculate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_get), MP_ROM_PTR(&mp_lv_draw_sw_grad_get_mpobj) }, { MP_ROM_QSTR(MP_QSTR_fs_init), MP_ROM_PTR(&mp_lv_fs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_fs_deinit), MP_ROM_PTR(&mp_lv_fs_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_mark_deleted), MP_ROM_PTR(&mp_lv_event_mark_deleted_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_indev_scroll_get_snap_dist), MP_ROM_PTR(&mp_lv_indev_scroll_get_snap_dist_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create), MP_ROM_PTR(&mp_lv_circle_buf_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_buf), MP_ROM_PTR(&mp_lv_circle_buf_create_from_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_array), MP_ROM_PTR(&mp_lv_circle_buf_create_from_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lru_create), MP_ROM_PTR(&mp_lv_lru_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pending_create), MP_ROM_PTR(&mp_lv_pending_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_size_attributes), MP_ROM_PTR(&mp_lv_text_get_size_attributes_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_width), MP_ROM_PTR(&mp_lv_text_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_line_width), MP_ROM_PTR(&mp_lv_text_get_line_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_cmd), MP_ROM_PTR(&mp_lv_text_is_cmd_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_next_line), MP_ROM_PTR(&mp_lv_text_get_next_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_size_internal), MP_ROM_PTR(&mp_lv_text_get_size_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, }; const size_t lvgl_module_entry_count = sizeof(lvgl_module_entries) / sizeof(lvgl_module_entries[0]); diff --git a/generated/lvgl_micropython.c b/generated/lvgl_micropython.c index 7283ca7..169d209 100644 --- a/generated/lvgl_micropython.c +++ b/generated/lvgl_micropython.c @@ -8,7 +8,7 @@ * Preprocessing command: * Preprocessing was disabled. * - * Generating Objects: obj(None), image(obj), animimg(obj), arc(obj), arclabel(obj), label(obj), bar(obj), button(obj), buttonmatrix(obj), calendar(obj), canvas(obj), chart(obj), checkbox(obj), dropdown(obj), gif(obj), imagebutton(obj), keyboard(obj), led(obj), line(obj), list(obj), menu(obj), menu_page(obj), menu_cont(obj), menu_section(obj), menu_separator(obj), msgbox(obj), roller(obj), scale(obj), slider(obj), spangroup(obj), textarea(obj), spinbox(obj), spinner(obj), switch(obj), table(obj), tabview(obj), tileview(obj), win(obj), barcode(obj), qrcode(obj) + * Generating Objects: obj(None), image(obj), animimg(obj), arc(obj), arclabel(obj), label(obj), bar(obj), canvas(obj), barcode(obj), button(obj), buttonmatrix(obj), calendar(obj), chart(obj), checkbox(obj), dropdown(obj), gif(obj), imagebutton(obj), keyboard(obj), led(obj), line(obj), list(obj), menu(obj), menu_page(obj), menu_cont(obj), menu_section(obj), menu_separator(obj), msgbox(obj), qrcode(obj), roller(obj), scale(obj), slider(obj), spangroup(obj), textarea(obj), spinbox(obj), spinner(obj), switch(obj), table(obj), tabview(obj), tileview(obj), win(obj) */ /* @@ -34,6 +34,14 @@ #include "lvgl/lvgl.h" #include "lvgl/src/lvgl_private.h" +/* + * The binding keeps every function LVGL marks deprecated callable until LVGL + * removes it, so a call to one here is not a warning (LVGL 9.6 and later). + */ +#ifdef LV_DEPRECATIONS_IGNORE_BEGIN +LV_DEPRECATIONS_IGNORE_BEGIN +#endif + #define LV_OBJ_T lv_obj_t @@ -1331,52 +1339,6 @@ static inline const mp_obj_type_t *get_mp_C_Pointer_type(void) } -/* - * lvgl ENUM_LV_LOG_LEVEL object definitions - */ - - -static const mp_rom_map_elem_t ENUM_LV_LOG_LEVEL_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_TRACE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_TRACE)) }, - { MP_ROM_QSTR(MP_QSTR_INFO), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_INFO)) }, - { MP_ROM_QSTR(MP_QSTR_WARN), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_WARN)) }, - { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_ERROR)) }, - { MP_ROM_QSTR(MP_QSTR_USER), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_USER)) }, - { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_NONE)) } -}; - -static MP_DEFINE_CONST_DICT(ENUM_LV_LOG_LEVEL_locals_dict, ENUM_LV_LOG_LEVEL_locals_dict_table); - -static void ENUM_LV_LOG_LEVEL_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl ENUM_LV_LOG_LEVEL"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_ENUM_LV_LOG_LEVEL_type_base, - MP_QSTR_ENUM_LV_LOG_LEVEL, - MP_TYPE_FLAG_NONE, - print, ENUM_LV_LOG_LEVEL_print, - - - attr, call_parent_methods, - - - locals_dict, &ENUM_LV_LOG_LEVEL_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_ENUM_LV_LOG_LEVEL_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_ENUM_LV_LOG_LEVEL_type_base, -}; - - /* * lvgl ENUM_LV_COORD object definitions */ @@ -1419,101 +1381,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_ENUM_LV_COORD_type = { }; -/* - * lvgl LV_OPA object definitions - */ - - -static const mp_rom_map_elem_t LV_OPA_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_TRANSP), MP_ROM_PTR(MP_ROM_INT(LV_OPA_TRANSP)) }, - { MP_ROM_QSTR(MP_QSTR__0), MP_ROM_PTR(MP_ROM_INT(LV_OPA_0)) }, - { MP_ROM_QSTR(MP_QSTR__10), MP_ROM_PTR(MP_ROM_INT(LV_OPA_10)) }, - { MP_ROM_QSTR(MP_QSTR__20), MP_ROM_PTR(MP_ROM_INT(LV_OPA_20)) }, - { MP_ROM_QSTR(MP_QSTR__30), MP_ROM_PTR(MP_ROM_INT(LV_OPA_30)) }, - { MP_ROM_QSTR(MP_QSTR__40), MP_ROM_PTR(MP_ROM_INT(LV_OPA_40)) }, - { MP_ROM_QSTR(MP_QSTR__50), MP_ROM_PTR(MP_ROM_INT(LV_OPA_50)) }, - { MP_ROM_QSTR(MP_QSTR__60), MP_ROM_PTR(MP_ROM_INT(LV_OPA_60)) }, - { MP_ROM_QSTR(MP_QSTR__70), MP_ROM_PTR(MP_ROM_INT(LV_OPA_70)) }, - { MP_ROM_QSTR(MP_QSTR__80), MP_ROM_PTR(MP_ROM_INT(LV_OPA_80)) }, - { MP_ROM_QSTR(MP_QSTR__90), MP_ROM_PTR(MP_ROM_INT(LV_OPA_90)) }, - { MP_ROM_QSTR(MP_QSTR__100), MP_ROM_PTR(MP_ROM_INT(LV_OPA_100)) }, - { MP_ROM_QSTR(MP_QSTR_COVER), MP_ROM_PTR(MP_ROM_INT(LV_OPA_COVER)) } -}; - -static MP_DEFINE_CONST_DICT(LV_OPA_locals_dict, LV_OPA_locals_dict_table); - -static void LV_OPA_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_OPA"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_OPA_type_base, - MP_QSTR_LV_OPA, - MP_TYPE_FLAG_NONE, - print, LV_OPA_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_OPA_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_OPA_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_OPA_type_base, -}; - - -/* - * lvgl LV_TREE_WALK object definitions - */ - - -static const mp_rom_map_elem_t LV_TREE_WALK_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_PRE_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_PRE_ORDER)) }, - { MP_ROM_QSTR(MP_QSTR_POST_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_POST_ORDER)) } -}; - -static MP_DEFINE_CONST_DICT(LV_TREE_WALK_locals_dict, LV_TREE_WALK_locals_dict_table); - -static void LV_TREE_WALK_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_TREE_WALK"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_TREE_WALK_type_base, - MP_QSTR_LV_TREE_WALK, - MP_TYPE_FLAG_NONE, - print, LV_TREE_WALK_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_TREE_WALK_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TREE_WALK_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_TREE_WALK_type_base, -}; - - /* * lvgl LV_STR_SYMBOL object definitions */ @@ -1616,6 +1483,105 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STR_SYMBOL_type = { }; +/* + * lvgl ENUM_LV_LOG_LEVEL object definitions + */ + + +static const mp_rom_map_elem_t ENUM_LV_LOG_LEVEL_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_TRACE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_TRACE)) }, + { MP_ROM_QSTR(MP_QSTR_INFO), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_INFO)) }, + { MP_ROM_QSTR(MP_QSTR_WARN), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_WARN)) }, + { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_ERROR)) }, + { MP_ROM_QSTR(MP_QSTR_USER), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_USER)) }, + { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_LOG_LEVEL_NONE)) } +}; + +static MP_DEFINE_CONST_DICT(ENUM_LV_LOG_LEVEL_locals_dict, ENUM_LV_LOG_LEVEL_locals_dict_table); + +static void ENUM_LV_LOG_LEVEL_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl ENUM_LV_LOG_LEVEL"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_ENUM_LV_LOG_LEVEL_type_base, + MP_QSTR_ENUM_LV_LOG_LEVEL, + MP_TYPE_FLAG_NONE, + print, ENUM_LV_LOG_LEVEL_print, + + + attr, call_parent_methods, + + + locals_dict, &ENUM_LV_LOG_LEVEL_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_ENUM_LV_LOG_LEVEL_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_ENUM_LV_LOG_LEVEL_type_base, +}; + + +/* + * lvgl LV_OPA object definitions + */ + + +static const mp_rom_map_elem_t LV_OPA_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_TRANSP), MP_ROM_PTR(MP_ROM_INT(LV_OPA_TRANSP)) }, + { MP_ROM_QSTR(MP_QSTR__0), MP_ROM_PTR(MP_ROM_INT(LV_OPA_0)) }, + { MP_ROM_QSTR(MP_QSTR__10), MP_ROM_PTR(MP_ROM_INT(LV_OPA_10)) }, + { MP_ROM_QSTR(MP_QSTR__20), MP_ROM_PTR(MP_ROM_INT(LV_OPA_20)) }, + { MP_ROM_QSTR(MP_QSTR__30), MP_ROM_PTR(MP_ROM_INT(LV_OPA_30)) }, + { MP_ROM_QSTR(MP_QSTR__40), MP_ROM_PTR(MP_ROM_INT(LV_OPA_40)) }, + { MP_ROM_QSTR(MP_QSTR__50), MP_ROM_PTR(MP_ROM_INT(LV_OPA_50)) }, + { MP_ROM_QSTR(MP_QSTR__60), MP_ROM_PTR(MP_ROM_INT(LV_OPA_60)) }, + { MP_ROM_QSTR(MP_QSTR__70), MP_ROM_PTR(MP_ROM_INT(LV_OPA_70)) }, + { MP_ROM_QSTR(MP_QSTR__80), MP_ROM_PTR(MP_ROM_INT(LV_OPA_80)) }, + { MP_ROM_QSTR(MP_QSTR__90), MP_ROM_PTR(MP_ROM_INT(LV_OPA_90)) }, + { MP_ROM_QSTR(MP_QSTR__100), MP_ROM_PTR(MP_ROM_INT(LV_OPA_100)) }, + { MP_ROM_QSTR(MP_QSTR_COVER), MP_ROM_PTR(MP_ROM_INT(LV_OPA_COVER)) } +}; + +static MP_DEFINE_CONST_DICT(LV_OPA_locals_dict, LV_OPA_locals_dict_table); + +static void LV_OPA_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_OPA"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_OPA_type_base, + MP_QSTR_LV_OPA, + MP_TYPE_FLAG_NONE, + print, LV_OPA_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_OPA_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_OPA_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_OPA_type_base, +}; + + /* * lvgl LV_STYLE object definitions */ @@ -1751,6 +1717,7 @@ static const mp_rom_map_elem_t LV_STYLE_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_GRID_CELL_ROW_POS), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_GRID_CELL_ROW_POS)) }, { MP_ROM_QSTR(MP_QSTR_GRID_CELL_ROW_SPAN), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_GRID_CELL_ROW_SPAN)) }, { MP_ROM_QSTR(MP_QSTR_GRID_CELL_Y_ALIGN), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_GRID_CELL_Y_ALIGN)) }, + { MP_ROM_QSTR(MP_QSTR_TEXT_LEADING_TRIM), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_TEXT_LEADING_TRIM)) }, { MP_ROM_QSTR(MP_QSTR_LAST_BUILT_IN_PROP), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_LAST_BUILT_IN_PROP)) }, { MP_ROM_QSTR(MP_QSTR_NUM_BUILT_IN_PROPS), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_NUM_BUILT_IN_PROPS)) }, { MP_ROM_QSTR(MP_QSTR_PROP_ANY), MP_ROM_PTR(MP_ROM_INT(LV_STYLE_PROP_ANY)) }, @@ -1789,6 +1756,48 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STYLE_type = { }; +/* + * lvgl LV_TREE_WALK object definitions + */ + + +static const mp_rom_map_elem_t LV_TREE_WALK_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_PRE_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_PRE_ORDER)) }, + { MP_ROM_QSTR(MP_QSTR_POST_ORDER), MP_ROM_PTR(MP_ROM_INT(LV_TREE_WALK_POST_ORDER)) } +}; + +static MP_DEFINE_CONST_DICT(LV_TREE_WALK_locals_dict, LV_TREE_WALK_locals_dict_table); + +static void LV_TREE_WALK_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_TREE_WALK"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_TREE_WALK_type_base, + MP_QSTR_LV_TREE_WALK, + MP_TYPE_FLAG_NONE, + print, LV_TREE_WALK_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_TREE_WALK_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TREE_WALK_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_TREE_WALK_type_base, +}; + + /* * lvgl LV_RESULT object definitions */ @@ -1831,48 +1840,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_RESULT_type = { }; -/* - * lvgl LV_RB_COLOR object definitions - */ - - -static const mp_rom_map_elem_t LV_RB_COLOR_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_RED)) }, - { MP_ROM_QSTR(MP_QSTR_BLACK), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_BLACK)) } -}; - -static MP_DEFINE_CONST_DICT(LV_RB_COLOR_locals_dict, LV_RB_COLOR_locals_dict_table); - -static void LV_RB_COLOR_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_RB_COLOR"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_RB_COLOR_type_base, - MP_QSTR_LV_RB_COLOR, - MP_TYPE_FLAG_NONE, - print, LV_RB_COLOR_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_RB_COLOR_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_RB_COLOR_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_RB_COLOR_type_base, -}; - - /* * lvgl LV_ALIGN object definitions */ @@ -1983,6 +1950,223 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DIR_type = { }; +/* + * lvgl LV_EVENT object definitions + */ + + +static const mp_rom_map_elem_t LV_EVENT_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_ALL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ALL)) }, + { MP_ROM_QSTR(MP_QSTR_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSED)) }, + { MP_ROM_QSTR(MP_QSTR_PRESSING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSING)) }, + { MP_ROM_QSTR(MP_QSTR_PRESS_LOST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESS_LOST)) }, + { MP_ROM_QSTR(MP_QSTR_SHORT_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SHORT_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_SINGLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SINGLE_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_DOUBLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DOUBLE_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_TRIPLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_TRIPLE_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED)) }, + { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED_REPEAT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED_REPEAT)) }, + { MP_ROM_QSTR(MP_QSTR_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CLICKED)) }, + { MP_ROM_QSTR(MP_QSTR_RELEASED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RELEASED)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL_THROW_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_THROW_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_END)) }, + { MP_ROM_QSTR(MP_QSTR_SCROLL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_UP), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_UP)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_DOWN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_DOWN)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_LEFT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_LEFT)) }, + { MP_ROM_QSTR(MP_QSTR_GESTURE_RIGHT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE_RIGHT)) }, + { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_KEY)) }, + { MP_ROM_QSTR(MP_QSTR_ROTARY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ROTARY)) }, + { MP_ROM_QSTR(MP_QSTR_FOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FOCUSED)) }, + { MP_ROM_QSTR(MP_QSTR_DEFOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DEFOCUSED)) }, + { MP_ROM_QSTR(MP_QSTR_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LEAVE)) }, + { MP_ROM_QSTR(MP_QSTR_HIT_TEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HIT_TEST)) }, + { MP_ROM_QSTR(MP_QSTR_INDEV_RESET), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INDEV_RESET)) }, + { MP_ROM_QSTR(MP_QSTR_HOVER_OVER), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_OVER)) }, + { MP_ROM_QSTR(MP_QSTR_HOVER_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_LEAVE)) }, + { MP_ROM_QSTR(MP_QSTR_COVER_CHECK), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COVER_CHECK)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_EXT_DRAW_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_EXT_DRAW_SIZE)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_END)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_POST_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_BEGIN)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_POST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_POST_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_END)) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_ADDED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_TASK_ADDED)) }, + { MP_ROM_QSTR(MP_QSTR_VALUE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VALUE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_INSERT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INSERT)) }, + { MP_ROM_QSTR(MP_QSTR_REFRESH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFRESH)) }, + { MP_ROM_QSTR(MP_QSTR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_READY)) }, + { MP_ROM_QSTR(MP_QSTR_CANCEL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CANCEL)) }, + { MP_ROM_QSTR(MP_QSTR_STATE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STATE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_CHECKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHECKED)) }, + { MP_ROM_QSTR(MP_QSTR_UNCHECKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_UNCHECKED)) }, + { MP_ROM_QSTR(MP_QSTR_CREATE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CREATE)) }, + { MP_ROM_QSTR(MP_QSTR_DELETE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DELETE)) }, + { MP_ROM_QSTR(MP_QSTR_CHILD_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_CHILD_CREATED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CREATED)) }, + { MP_ROM_QSTR(MP_QSTR_CHILD_DELETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_DELETED)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOAD_START)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_LOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOAD_START)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_LOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOADED)) }, + { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOADED)) }, + { MP_ROM_QSTR(MP_QSTR_SIZE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SIZE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_STYLE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STYLE_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_LAYOUT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAYOUT_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_GET_SELF_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GET_SELF_SIZE)) }, + { MP_ROM_QSTR(MP_QSTR_INVALIDATE_AREA), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INVALIDATE_AREA)) }, + { MP_ROM_QSTR(MP_QSTR_RESOLUTION_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RESOLUTION_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_COLOR_FORMAT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COLOR_FORMAT_CHANGED)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_REQUEST)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_START)) }, + { MP_ROM_QSTR(MP_QSTR_REFR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_READY)) }, + { MP_ROM_QSTR(MP_QSTR_RENDER_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_START)) }, + { MP_ROM_QSTR(MP_QSTR_RENDER_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_READY)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_START)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_START)) }, + { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_START)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_WAIT_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_WAIT_START)) }, + { MP_ROM_QSTR(MP_QSTR_SYNC_WAIT_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SYNC_WAIT_FINISH)) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_LAYOUT_COMPLETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_UPDATE_LAYOUT_COMPLETED)) }, + { MP_ROM_QSTR(MP_QSTR_VSYNC), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC)) }, + { MP_ROM_QSTR(MP_QSTR_VSYNC_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC_REQUEST)) }, + { MP_ROM_QSTR(MP_QSTR_LAST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAST)) }, + { MP_ROM_QSTR(MP_QSTR_LAST_CUSTOM), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAST_CUSTOM)) }, + { MP_ROM_QSTR(MP_QSTR_PREPROCESS), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PREPROCESS)) }, + { MP_ROM_QSTR(MP_QSTR_MARKED_DELETING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_MARKED_DELETING)) } +}; + +static MP_DEFINE_CONST_DICT(LV_EVENT_locals_dict, LV_EVENT_locals_dict_table); + +static void LV_EVENT_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_EVENT"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_EVENT_type_base, + MP_QSTR_LV_EVENT, + MP_TYPE_FLAG_NONE, + print, LV_EVENT_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_EVENT_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_EVENT_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_EVENT_type_base, +}; + + +/* + * lvgl LV_KEY object definitions + */ + + +static const mp_rom_map_elem_t LV_KEY_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_UP), MP_ROM_PTR(MP_ROM_INT(LV_KEY_UP)) }, + { MP_ROM_QSTR(MP_QSTR_DOWN), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DOWN)) }, + { MP_ROM_QSTR(MP_QSTR_RIGHT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_RIGHT)) }, + { MP_ROM_QSTR(MP_QSTR_LEFT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_LEFT)) }, + { MP_ROM_QSTR(MP_QSTR_ESC), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ESC)) }, + { MP_ROM_QSTR(MP_QSTR_DEL), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DEL)) }, + { MP_ROM_QSTR(MP_QSTR_BACKSPACE), MP_ROM_PTR(MP_ROM_INT(LV_KEY_BACKSPACE)) }, + { MP_ROM_QSTR(MP_QSTR_ENTER), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ENTER)) }, + { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_NEXT)) }, + { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_KEY_PREV)) }, + { MP_ROM_QSTR(MP_QSTR_HOME), MP_ROM_PTR(MP_ROM_INT(LV_KEY_HOME)) }, + { MP_ROM_QSTR(MP_QSTR_END), MP_ROM_PTR(MP_ROM_INT(LV_KEY_END)) } +}; + +static MP_DEFINE_CONST_DICT(LV_KEY_locals_dict, LV_KEY_locals_dict_table); + +static void LV_KEY_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_KEY"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_KEY_type_base, + MP_QSTR_LV_KEY, + MP_TYPE_FLAG_NONE, + print, LV_KEY_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_KEY_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_KEY_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_KEY_type_base, +}; + + +/* + * lvgl LV_GROUP_REFOCUS_POLICY object definitions + */ + + +static const mp_rom_map_elem_t LV_GROUP_REFOCUS_POLICY_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_NEXT)) }, + { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_PREV)) } +}; + +static MP_DEFINE_CONST_DICT(LV_GROUP_REFOCUS_POLICY_locals_dict, LV_GROUP_REFOCUS_POLICY_locals_dict_table); + +static void LV_GROUP_REFOCUS_POLICY_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_GROUP_REFOCUS_POLICY"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, + MP_QSTR_LV_GROUP_REFOCUS_POLICY, + MP_TYPE_FLAG_NONE, + print, LV_GROUP_REFOCUS_POLICY_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_GROUP_REFOCUS_POLICY_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_GROUP_REFOCUS_POLICY_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, +}; + + /* * lvgl LV_COLOR_FORMAT object definitions */ @@ -2031,9 +2215,7 @@ static const mp_rom_map_elem_t LV_COLOR_FORMAT_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEMA_TSC6AP), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC6AP)) }, { MP_ROM_QSTR(MP_QSTR_NEMA_TSC12), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC12)) }, { MP_ROM_QSTR(MP_QSTR_NEMA_TSC12A), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC12A)) }, - { MP_ROM_QSTR(MP_QSTR_NEMA_TSC_END), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC_END)) }, - { MP_ROM_QSTR(MP_QSTR_NATIVE), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NATIVE)) }, - { MP_ROM_QSTR(MP_QSTR_NATIVE_WITH_ALPHA), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NATIVE_WITH_ALPHA)) } + { MP_ROM_QSTR(MP_QSTR_NEMA_TSC_END), MP_ROM_PTR(MP_ROM_INT(LV_COLOR_FORMAT_NEMA_TSC_END)) } }; static MP_DEFINE_CONST_DICT(LV_COLOR_FORMAT_locals_dict, LV_COLOR_FORMAT_locals_dict_table); @@ -2450,6 +2632,51 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TEXT_ALIGN_type = { }; +/* + * lvgl LV_TEXT_LEADING_TRIM object definitions + */ + + +static const mp_rom_map_elem_t LV_TEXT_LEADING_TRIM_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_NONE)) }, + { MP_ROM_QSTR(MP_QSTR_CAPITAL_BASELINE), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_CAPITAL_BASELINE)) }, + { MP_ROM_QSTR(MP_QSTR_LOWER_BASELINE), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_LOWER_BASELINE)) }, + { MP_ROM_QSTR(MP_QSTR_CAPITAL), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_CAPITAL)) }, + { MP_ROM_QSTR(MP_QSTR_LOWER), MP_ROM_PTR(MP_ROM_INT(LV_TEXT_LEADING_TRIM_LOWER)) } +}; + +static MP_DEFINE_CONST_DICT(LV_TEXT_LEADING_TRIM_locals_dict, LV_TEXT_LEADING_TRIM_locals_dict_table); + +static void LV_TEXT_LEADING_TRIM_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_TEXT_LEADING_TRIM"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_TEXT_LEADING_TRIM_type_base, + MP_QSTR_LV_TEXT_LEADING_TRIM, + MP_TYPE_FLAG_NONE, + print, LV_TEXT_LEADING_TRIM_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_TEXT_LEADING_TRIM_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TEXT_LEADING_TRIM_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_TEXT_LEADING_TRIM_type_base, +}; + + /* * lvgl LV_BASE_DIR object definitions */ @@ -2989,118 +3216,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STYLE_RES_type = { }; -/* - * lvgl LV_EVENT object definitions - */ - - -static const mp_rom_map_elem_t LV_EVENT_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_ALL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ALL)) }, - { MP_ROM_QSTR(MP_QSTR_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSED)) }, - { MP_ROM_QSTR(MP_QSTR_PRESSING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESSING)) }, - { MP_ROM_QSTR(MP_QSTR_PRESS_LOST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PRESS_LOST)) }, - { MP_ROM_QSTR(MP_QSTR_SHORT_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SHORT_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_SINGLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SINGLE_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_DOUBLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DOUBLE_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_TRIPLE_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_TRIPLE_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED)) }, - { MP_ROM_QSTR(MP_QSTR_LONG_PRESSED_REPEAT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LONG_PRESSED_REPEAT)) }, - { MP_ROM_QSTR(MP_QSTR_CLICKED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CLICKED)) }, - { MP_ROM_QSTR(MP_QSTR_RELEASED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RELEASED)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL_THROW_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_THROW_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL_END)) }, - { MP_ROM_QSTR(MP_QSTR_SCROLL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCROLL)) }, - { MP_ROM_QSTR(MP_QSTR_GESTURE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GESTURE)) }, - { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_KEY)) }, - { MP_ROM_QSTR(MP_QSTR_ROTARY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_ROTARY)) }, - { MP_ROM_QSTR(MP_QSTR_FOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FOCUSED)) }, - { MP_ROM_QSTR(MP_QSTR_DEFOCUSED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DEFOCUSED)) }, - { MP_ROM_QSTR(MP_QSTR_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LEAVE)) }, - { MP_ROM_QSTR(MP_QSTR_HIT_TEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HIT_TEST)) }, - { MP_ROM_QSTR(MP_QSTR_INDEV_RESET), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INDEV_RESET)) }, - { MP_ROM_QSTR(MP_QSTR_HOVER_OVER), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_OVER)) }, - { MP_ROM_QSTR(MP_QSTR_HOVER_LEAVE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_HOVER_LEAVE)) }, - { MP_ROM_QSTR(MP_QSTR_COVER_CHECK), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COVER_CHECK)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_EXT_DRAW_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_EXT_DRAW_SIZE)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_MAIN_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_MAIN_END)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_POST_BEGIN), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_BEGIN)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_POST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_POST_END), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_POST_END)) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_ADDED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DRAW_TASK_ADDED)) }, - { MP_ROM_QSTR(MP_QSTR_VALUE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VALUE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_INSERT), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INSERT)) }, - { MP_ROM_QSTR(MP_QSTR_REFRESH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFRESH)) }, - { MP_ROM_QSTR(MP_QSTR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_READY)) }, - { MP_ROM_QSTR(MP_QSTR_CANCEL), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CANCEL)) }, - { MP_ROM_QSTR(MP_QSTR_STATE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STATE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_CREATE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CREATE)) }, - { MP_ROM_QSTR(MP_QSTR_DELETE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_DELETE)) }, - { MP_ROM_QSTR(MP_QSTR_CHILD_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_CHILD_CREATED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_CREATED)) }, - { MP_ROM_QSTR(MP_QSTR_CHILD_DELETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_CHILD_DELETED)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOAD_START)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_LOAD_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOAD_START)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_LOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_LOADED)) }, - { MP_ROM_QSTR(MP_QSTR_SCREEN_UNLOADED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SCREEN_UNLOADED)) }, - { MP_ROM_QSTR(MP_QSTR_SIZE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_SIZE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_STYLE_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_STYLE_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_LAYOUT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAYOUT_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_GET_SELF_SIZE), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_GET_SELF_SIZE)) }, - { MP_ROM_QSTR(MP_QSTR_INVALIDATE_AREA), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_INVALIDATE_AREA)) }, - { MP_ROM_QSTR(MP_QSTR_RESOLUTION_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RESOLUTION_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_COLOR_FORMAT_CHANGED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_COLOR_FORMAT_CHANGED)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_REQUEST)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_START)) }, - { MP_ROM_QSTR(MP_QSTR_REFR_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_REFR_READY)) }, - { MP_ROM_QSTR(MP_QSTR_RENDER_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_START)) }, - { MP_ROM_QSTR(MP_QSTR_RENDER_READY), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_RENDER_READY)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_START)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_FINISH)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_START), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_START)) }, - { MP_ROM_QSTR(MP_QSTR_FLUSH_WAIT_FINISH), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_FLUSH_WAIT_FINISH)) }, - { MP_ROM_QSTR(MP_QSTR_UPDATE_LAYOUT_COMPLETED), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_UPDATE_LAYOUT_COMPLETED)) }, - { MP_ROM_QSTR(MP_QSTR_VSYNC), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC)) }, - { MP_ROM_QSTR(MP_QSTR_VSYNC_REQUEST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_VSYNC_REQUEST)) }, - { MP_ROM_QSTR(MP_QSTR_LAST), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_LAST)) }, - { MP_ROM_QSTR(MP_QSTR_PREPROCESS), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_PREPROCESS)) }, - { MP_ROM_QSTR(MP_QSTR_MARKED_DELETING), MP_ROM_PTR(MP_ROM_INT(LV_EVENT_MARKED_DELETING)) } -}; - -static MP_DEFINE_CONST_DICT(LV_EVENT_locals_dict, LV_EVENT_locals_dict_table); - -static void LV_EVENT_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_EVENT"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_EVENT_type_base, - MP_QSTR_LV_EVENT, - MP_TYPE_FLAG_NONE, - print, LV_EVENT_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_EVENT_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_EVENT_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_EVENT_type_base, -}; - - /* * lvgl LV_DISPLAY_ROTATION object definitions */ @@ -3567,6 +3682,106 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_STYLE_STATE_CMP_type = { }; +/* + * lvgl LV_DRAW_TASK_TYPE object definitions + */ + + +static const mp_rom_map_elem_t LV_DRAW_TASK_TYPE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_NONE)) }, + { MP_ROM_QSTR(MP_QSTR_FILL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_FILL)) }, + { MP_ROM_QSTR(MP_QSTR_BORDER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BORDER)) }, + { MP_ROM_QSTR(MP_QSTR_BOX_SHADOW), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BOX_SHADOW)) }, + { MP_ROM_QSTR(MP_QSTR_LETTER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LETTER)) }, + { MP_ROM_QSTR(MP_QSTR_LABEL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LABEL)) }, + { MP_ROM_QSTR(MP_QSTR_IMAGE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_IMAGE)) }, + { MP_ROM_QSTR(MP_QSTR_LAYER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LAYER)) }, + { MP_ROM_QSTR(MP_QSTR_LINE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LINE)) }, + { MP_ROM_QSTR(MP_QSTR_ARC), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_ARC)) }, + { MP_ROM_QSTR(MP_QSTR_TRIANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_TRIANGLE)) }, + { MP_ROM_QSTR(MP_QSTR_MASK_RECTANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_RECTANGLE)) }, + { MP_ROM_QSTR(MP_QSTR_MASK_BITMAP), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_BITMAP)) }, + { MP_ROM_QSTR(MP_QSTR_BLUR), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BLUR)) } +}; + +static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_TYPE_locals_dict, LV_DRAW_TASK_TYPE_locals_dict_table); + +static void LV_DRAW_TASK_TYPE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_DRAW_TASK_TYPE"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_DRAW_TASK_TYPE_type_base, + MP_QSTR_LV_DRAW_TASK_TYPE, + MP_TYPE_FLAG_NONE, + print, LV_DRAW_TASK_TYPE_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_DRAW_TASK_TYPE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_TYPE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_DRAW_TASK_TYPE_type_base, +}; + + +/* + * lvgl LV_DRAW_TASK_STATE object definitions + */ + + +static const mp_rom_map_elem_t LV_DRAW_TASK_STATE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_BLOCKED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_BLOCKED)) }, + { MP_ROM_QSTR(MP_QSTR_WAITING), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_WAITING)) }, + { MP_ROM_QSTR(MP_QSTR_QUEUED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_QUEUED)) }, + { MP_ROM_QSTR(MP_QSTR_IN_PROGRESS), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_IN_PROGRESS)) }, + { MP_ROM_QSTR(MP_QSTR_FINISHED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_FINISHED)) }, + { MP_ROM_QSTR(MP_QSTR_FAILED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_FAILED)) } +}; + +static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_STATE_locals_dict, LV_DRAW_TASK_STATE_locals_dict_table); + +static void LV_DRAW_TASK_STATE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_DRAW_TASK_STATE"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_DRAW_TASK_STATE_type_base, + MP_QSTR_LV_DRAW_TASK_STATE, + MP_TYPE_FLAG_NONE, + print, LV_DRAW_TASK_STATE_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_DRAW_TASK_STATE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_STATE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_DRAW_TASK_STATE_type_base, +}; + + /* * lvgl LV_FS_RES object definitions */ @@ -3750,105 +3965,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_IMAGE_SRC_type = { }; -/* - * lvgl LV_DRAW_TASK_TYPE object definitions - */ - - -static const mp_rom_map_elem_t LV_DRAW_TASK_TYPE_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_NONE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_NONE)) }, - { MP_ROM_QSTR(MP_QSTR_FILL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_FILL)) }, - { MP_ROM_QSTR(MP_QSTR_BORDER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BORDER)) }, - { MP_ROM_QSTR(MP_QSTR_BOX_SHADOW), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BOX_SHADOW)) }, - { MP_ROM_QSTR(MP_QSTR_LETTER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LETTER)) }, - { MP_ROM_QSTR(MP_QSTR_LABEL), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LABEL)) }, - { MP_ROM_QSTR(MP_QSTR_IMAGE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_IMAGE)) }, - { MP_ROM_QSTR(MP_QSTR_LAYER), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LAYER)) }, - { MP_ROM_QSTR(MP_QSTR_LINE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_LINE)) }, - { MP_ROM_QSTR(MP_QSTR_ARC), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_ARC)) }, - { MP_ROM_QSTR(MP_QSTR_TRIANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_TRIANGLE)) }, - { MP_ROM_QSTR(MP_QSTR_MASK_RECTANGLE), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_RECTANGLE)) }, - { MP_ROM_QSTR(MP_QSTR_MASK_BITMAP), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_MASK_BITMAP)) }, - { MP_ROM_QSTR(MP_QSTR_BLUR), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_TYPE_BLUR)) } -}; - -static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_TYPE_locals_dict, LV_DRAW_TASK_TYPE_locals_dict_table); - -static void LV_DRAW_TASK_TYPE_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_DRAW_TASK_TYPE"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_DRAW_TASK_TYPE_type_base, - MP_QSTR_LV_DRAW_TASK_TYPE, - MP_TYPE_FLAG_NONE, - print, LV_DRAW_TASK_TYPE_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_DRAW_TASK_TYPE_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_TYPE_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_DRAW_TASK_TYPE_type_base, -}; - - -/* - * lvgl LV_DRAW_TASK_STATE object definitions - */ - - -static const mp_rom_map_elem_t LV_DRAW_TASK_STATE_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_BLOCKED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_BLOCKED)) }, - { MP_ROM_QSTR(MP_QSTR_WAITING), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_WAITING)) }, - { MP_ROM_QSTR(MP_QSTR_QUEUED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_QUEUED)) }, - { MP_ROM_QSTR(MP_QSTR_IN_PROGRESS), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_IN_PROGRESS)) }, - { MP_ROM_QSTR(MP_QSTR_FINISHED), MP_ROM_PTR(MP_ROM_INT(LV_DRAW_TASK_STATE_FINISHED)) } -}; - -static MP_DEFINE_CONST_DICT(LV_DRAW_TASK_STATE_locals_dict, LV_DRAW_TASK_STATE_locals_dict_table); - -static void LV_DRAW_TASK_STATE_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_DRAW_TASK_STATE"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_DRAW_TASK_STATE_type_base, - MP_QSTR_LV_DRAW_TASK_STATE, - MP_TYPE_FLAG_NONE, - print, LV_DRAW_TASK_STATE_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_DRAW_TASK_STATE_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_TASK_STATE_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_DRAW_TASK_STATE_type_base, -}; - - /* * lvgl LV_LAYER_TYPE object definitions */ @@ -4020,100 +4136,6 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_OBJ_CLASS_THEME_INHERITABLE }; -/* - * lvgl LV_KEY object definitions - */ - - -static const mp_rom_map_elem_t LV_KEY_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_UP), MP_ROM_PTR(MP_ROM_INT(LV_KEY_UP)) }, - { MP_ROM_QSTR(MP_QSTR_DOWN), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DOWN)) }, - { MP_ROM_QSTR(MP_QSTR_RIGHT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_RIGHT)) }, - { MP_ROM_QSTR(MP_QSTR_LEFT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_LEFT)) }, - { MP_ROM_QSTR(MP_QSTR_ESC), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ESC)) }, - { MP_ROM_QSTR(MP_QSTR_DEL), MP_ROM_PTR(MP_ROM_INT(LV_KEY_DEL)) }, - { MP_ROM_QSTR(MP_QSTR_BACKSPACE), MP_ROM_PTR(MP_ROM_INT(LV_KEY_BACKSPACE)) }, - { MP_ROM_QSTR(MP_QSTR_ENTER), MP_ROM_PTR(MP_ROM_INT(LV_KEY_ENTER)) }, - { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_KEY_NEXT)) }, - { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_KEY_PREV)) }, - { MP_ROM_QSTR(MP_QSTR_HOME), MP_ROM_PTR(MP_ROM_INT(LV_KEY_HOME)) }, - { MP_ROM_QSTR(MP_QSTR_END), MP_ROM_PTR(MP_ROM_INT(LV_KEY_END)) } -}; - -static MP_DEFINE_CONST_DICT(LV_KEY_locals_dict, LV_KEY_locals_dict_table); - -static void LV_KEY_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_KEY"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_KEY_type_base, - MP_QSTR_LV_KEY, - MP_TYPE_FLAG_NONE, - print, LV_KEY_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_KEY_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_KEY_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_KEY_type_base, -}; - - -/* - * lvgl LV_GROUP_REFOCUS_POLICY object definitions - */ - - -static const mp_rom_map_elem_t LV_GROUP_REFOCUS_POLICY_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_NEXT), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_NEXT)) }, - { MP_ROM_QSTR(MP_QSTR_PREV), MP_ROM_PTR(MP_ROM_INT(LV_GROUP_REFOCUS_POLICY_PREV)) } -}; - -static MP_DEFINE_CONST_DICT(LV_GROUP_REFOCUS_POLICY_locals_dict, LV_GROUP_REFOCUS_POLICY_locals_dict_table); - -static void LV_GROUP_REFOCUS_POLICY_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl LV_GROUP_REFOCUS_POLICY"); -} - - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, - MP_QSTR_LV_GROUP_REFOCUS_POLICY, - MP_TYPE_FLAG_NONE, - print, LV_GROUP_REFOCUS_POLICY_print, - - - attr, call_parent_methods, - - - locals_dict, &LV_GROUP_REFOCUS_POLICY_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_GROUP_REFOCUS_POLICY_type = { -#ifdef LV_OBJ_T - .lv_obj_class = NULL, -#endif - .mp_obj_type = &mp_lv_LV_GROUP_REFOCUS_POLICY_type_base, -}; - - /* * lvgl LV_INDEV_TYPE object definitions */ @@ -4606,6 +4628,7 @@ static const mp_rom_map_elem_t LV_IMAGE_ALIGN_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_STRETCH), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_STRETCH)) }, { MP_ROM_QSTR(MP_QSTR_TILE), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_TILE)) }, { MP_ROM_QSTR(MP_QSTR_CONTAIN), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_CONTAIN)) }, + { MP_ROM_QSTR(MP_QSTR_CONTAIN_DOWNSCALE), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_CONTAIN_DOWNSCALE)) }, { MP_ROM_QSTR(MP_QSTR_COVER), MP_ROM_PTR(MP_ROM_INT(LV_IMAGE_ALIGN_COVER)) } }; @@ -4985,6 +5008,90 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BAR_ORIENTATION_type = { }; +/* + * lvgl LV_BARCODE_ENCODING_CODE128 object definitions + */ + + +static const mp_rom_map_elem_t LV_BARCODE_ENCODING_CODE128_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_GS1), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_GS1)) }, + { MP_ROM_QSTR(MP_QSTR_RAW), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_RAW)) } +}; + +static MP_DEFINE_CONST_DICT(LV_BARCODE_ENCODING_CODE128_locals_dict, LV_BARCODE_ENCODING_CODE128_locals_dict_table); + +static void LV_BARCODE_ENCODING_CODE128_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_BARCODE_ENCODING_CODE128"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, + MP_QSTR_LV_BARCODE_ENCODING_CODE128, + MP_TYPE_FLAG_NONE, + print, LV_BARCODE_ENCODING_CODE128_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_BARCODE_ENCODING_CODE128_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BARCODE_ENCODING_CODE128_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, +}; + + +/* + * lvgl LV_BARCODE_UPDATE_MODE object definitions + */ + + +static const mp_rom_map_elem_t LV_BARCODE_UPDATE_MODE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IMMEDIATE), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_UPDATE_MODE_IMMEDIATE)) }, + { MP_ROM_QSTR(MP_QSTR_DEFERRED), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_UPDATE_MODE_DEFERRED)) } +}; + +static MP_DEFINE_CONST_DICT(LV_BARCODE_UPDATE_MODE_locals_dict, LV_BARCODE_UPDATE_MODE_locals_dict_table); + +static void LV_BARCODE_UPDATE_MODE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_BARCODE_UPDATE_MODE"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_BARCODE_UPDATE_MODE_type_base, + MP_QSTR_LV_BARCODE_UPDATE_MODE, + MP_TYPE_FLAG_NONE, + print, LV_BARCODE_UPDATE_MODE_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_BARCODE_UPDATE_MODE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BARCODE_UPDATE_MODE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_BARCODE_UPDATE_MODE_type_base, +}; + + /* * lvgl LV_BUTTONMATRIX_CTRL object definitions */ @@ -5366,6 +5473,48 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_MENU_ROOT_BACK_BUTTON_type }; +/* + * lvgl LV_QRCODE_UPDATE_MODE object definitions + */ + + +static const mp_rom_map_elem_t LV_QRCODE_UPDATE_MODE_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_IMMEDIATE), MP_ROM_PTR(MP_ROM_INT(LV_QRCODE_UPDATE_MODE_IMMEDIATE)) }, + { MP_ROM_QSTR(MP_QSTR_DEFERRED), MP_ROM_PTR(MP_ROM_INT(LV_QRCODE_UPDATE_MODE_DEFERRED)) } +}; + +static MP_DEFINE_CONST_DICT(LV_QRCODE_UPDATE_MODE_locals_dict, LV_QRCODE_UPDATE_MODE_locals_dict_table); + +static void LV_QRCODE_UPDATE_MODE_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_QRCODE_UPDATE_MODE"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_QRCODE_UPDATE_MODE_type_base, + MP_QSTR_LV_QRCODE_UPDATE_MODE, + MP_TYPE_FLAG_NONE, + print, LV_QRCODE_UPDATE_MODE_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_QRCODE_UPDATE_MODE_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_QRCODE_UPDATE_MODE_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_QRCODE_UPDATE_MODE_type_base, +}; + + /* * lvgl LV_ROLLER_MODE object definitions */ @@ -5719,44 +5868,91 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_TABLE_CELL_CTRL_type = { /* - * lvgl LV_BARCODE_ENCODING_CODE128 object definitions + * lvgl LV_THREAD_PRIO object definitions */ -static const mp_rom_map_elem_t LV_BARCODE_ENCODING_CODE128_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_GS1), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_GS1)) }, - { MP_ROM_QSTR(MP_QSTR_RAW), MP_ROM_PTR(MP_ROM_INT(LV_BARCODE_ENCODING_CODE128_RAW)) } +static const mp_rom_map_elem_t LV_THREAD_PRIO_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_LOWEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOWEST)) }, + { MP_ROM_QSTR(MP_QSTR_LOW), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOW)) }, + { MP_ROM_QSTR(MP_QSTR_MID), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_MID)) }, + { MP_ROM_QSTR(MP_QSTR_HIGH), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGH)) }, + { MP_ROM_QSTR(MP_QSTR_HIGHEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGHEST)) } }; -static MP_DEFINE_CONST_DICT(LV_BARCODE_ENCODING_CODE128_locals_dict, LV_BARCODE_ENCODING_CODE128_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_THREAD_PRIO_locals_dict, LV_THREAD_PRIO_locals_dict_table); -static void LV_BARCODE_ENCODING_CODE128_print(const mp_print_t *print, +static void LV_THREAD_PRIO_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_BARCODE_ENCODING_CODE128"); + mp_printf(print, "lvgl LV_THREAD_PRIO"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, - MP_QSTR_LV_BARCODE_ENCODING_CODE128, + mp_lv_LV_THREAD_PRIO_type_base, + MP_QSTR_LV_THREAD_PRIO, MP_TYPE_FLAG_NONE, - print, LV_BARCODE_ENCODING_CODE128_print, + print, LV_THREAD_PRIO_print, attr, call_parent_methods, - locals_dict, &LV_BARCODE_ENCODING_CODE128_locals_dict + locals_dict, &LV_THREAD_PRIO_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_BARCODE_ENCODING_CODE128_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_THREAD_PRIO_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_BARCODE_ENCODING_CODE128_type_base, + .mp_obj_type = &mp_lv_LV_THREAD_PRIO_type_base, +}; + + +/* + * lvgl LV_CACHE_RESERVE_COND object definitions + */ + + +static const mp_rom_map_elem_t LV_CACHE_RESERVE_COND_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_OK)) }, + { MP_ROM_QSTR(MP_QSTR_TOO_LARGE), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_TOO_LARGE)) }, + { MP_ROM_QSTR(MP_QSTR_NEED_VICTIM), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_NEED_VICTIM)) }, + { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_ERROR)) } +}; + +static MP_DEFINE_CONST_DICT(LV_CACHE_RESERVE_COND_locals_dict, LV_CACHE_RESERVE_COND_locals_dict_table); + +static void LV_CACHE_RESERVE_COND_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl LV_CACHE_RESERVE_COND"); +} + + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_LV_CACHE_RESERVE_COND_type_base, + MP_QSTR_LV_CACHE_RESERVE_COND, + MP_TYPE_FLAG_NONE, + print, LV_CACHE_RESERVE_COND_print, + + + attr, call_parent_methods, + + + locals_dict, &LV_CACHE_RESERVE_COND_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_CACHE_RESERVE_COND_type = { +#ifdef LV_OBJ_T + .lv_obj_class = NULL, +#endif + .mp_obj_type = &mp_lv_LV_CACHE_RESERVE_COND_type_base, }; @@ -5894,91 +6090,90 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_DRAW_SW_MASK_LINE_SIDE_type /* - * lvgl LV_THREAD_PRIO object definitions + * lvgl LV_LRU object definitions */ -static const mp_rom_map_elem_t LV_THREAD_PRIO_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_LOWEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOWEST)) }, - { MP_ROM_QSTR(MP_QSTR_LOW), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_LOW)) }, - { MP_ROM_QSTR(MP_QSTR_MID), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_MID)) }, - { MP_ROM_QSTR(MP_QSTR_HIGH), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGH)) }, - { MP_ROM_QSTR(MP_QSTR_HIGHEST), MP_ROM_PTR(MP_ROM_INT(LV_THREAD_PRIO_HIGHEST)) } +static const mp_rom_map_elem_t LV_LRU_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_LRU_OK)) }, + { MP_ROM_QSTR(MP_QSTR_MISSING_CACHE), MP_ROM_PTR(MP_ROM_INT(LV_LRU_MISSING_CACHE)) }, + { MP_ROM_QSTR(MP_QSTR_MISSING_KEY), MP_ROM_PTR(MP_ROM_INT(LV_LRU_MISSING_KEY)) }, + { MP_ROM_QSTR(MP_QSTR_MISSING_VALUE), MP_ROM_PTR(MP_ROM_INT(LV_LRU_MISSING_VALUE)) }, + { MP_ROM_QSTR(MP_QSTR_LOCK_ERROR), MP_ROM_PTR(MP_ROM_INT(LV_LRU_LOCK_ERROR)) }, + { MP_ROM_QSTR(MP_QSTR_VALUE_TOO_LARGE), MP_ROM_PTR(MP_ROM_INT(LV_LRU_VALUE_TOO_LARGE)) } }; -static MP_DEFINE_CONST_DICT(LV_THREAD_PRIO_locals_dict, LV_THREAD_PRIO_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_LRU_locals_dict, LV_LRU_locals_dict_table); -static void LV_THREAD_PRIO_print(const mp_print_t *print, +static void LV_LRU_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_THREAD_PRIO"); + mp_printf(print, "lvgl LV_LRU"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_THREAD_PRIO_type_base, - MP_QSTR_LV_THREAD_PRIO, + mp_lv_LV_LRU_type_base, + MP_QSTR_LV_LRU, MP_TYPE_FLAG_NONE, - print, LV_THREAD_PRIO_print, + print, LV_LRU_print, attr, call_parent_methods, - locals_dict, &LV_THREAD_PRIO_locals_dict + locals_dict, &LV_LRU_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_THREAD_PRIO_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_LRU_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_THREAD_PRIO_type_base, + .mp_obj_type = &mp_lv_LV_LRU_type_base, }; /* - * lvgl LV_CACHE_RESERVE_COND object definitions + * lvgl LV_RB_COLOR object definitions */ -static const mp_rom_map_elem_t LV_CACHE_RESERVE_COND_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_OK), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_OK)) }, - { MP_ROM_QSTR(MP_QSTR_TOO_LARGE), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_TOO_LARGE)) }, - { MP_ROM_QSTR(MP_QSTR_NEED_VICTIM), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_NEED_VICTIM)) }, - { MP_ROM_QSTR(MP_QSTR_ERROR), MP_ROM_PTR(MP_ROM_INT(LV_CACHE_RESERVE_COND_ERROR)) } +static const mp_rom_map_elem_t LV_RB_COLOR_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_RED), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_RED)) }, + { MP_ROM_QSTR(MP_QSTR_BLACK), MP_ROM_PTR(MP_ROM_INT(LV_RB_COLOR_BLACK)) } }; -static MP_DEFINE_CONST_DICT(LV_CACHE_RESERVE_COND_locals_dict, LV_CACHE_RESERVE_COND_locals_dict_table); +static MP_DEFINE_CONST_DICT(LV_RB_COLOR_locals_dict, LV_RB_COLOR_locals_dict_table); -static void LV_CACHE_RESERVE_COND_print(const mp_print_t *print, +static void LV_RB_COLOR_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl LV_CACHE_RESERVE_COND"); + mp_printf(print, "lvgl LV_RB_COLOR"); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_LV_CACHE_RESERVE_COND_type_base, - MP_QSTR_LV_CACHE_RESERVE_COND, + mp_lv_LV_RB_COLOR_type_base, + MP_QSTR_LV_RB_COLOR, MP_TYPE_FLAG_NONE, - print, LV_CACHE_RESERVE_COND_print, + print, LV_RB_COLOR_print, attr, call_parent_methods, - locals_dict, &LV_CACHE_RESERVE_COND_locals_dict + locals_dict, &LV_RB_COLOR_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_CACHE_RESERVE_COND_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_LV_RB_COLOR_type = { #ifdef LV_OBJ_T .lv_obj_class = NULL, #endif - .mp_obj_type = &mp_lv_LV_CACHE_RESERVE_COND_type_base, + .mp_obj_type = &mp_lv_LV_RB_COLOR_type_base, }; @@ -6163,10 +6358,31 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_get_selector_part_m /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) + * inline static void lv_obj_move_foreground(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_move_foreground(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + ((void (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_foreground_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_foreground); + +/* Reusing lv_obj_move_foreground for lv_obj_move_background */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_background_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_background); + + +/* + * lvgl extension definition for: + * inline static int32_t lv_obj_get_style_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_width_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6176,47 +6392,47 @@ static mp_obj_t mp_lv_obj_get_style_width(size_t mp_n_args, const mp_obj_t *mp_a -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_length */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_length); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y_internal); /* * lvgl extension definition for: - * inline static lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_align_t lv_obj_get_style_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6226,99 +6442,99 @@ static mp_obj_t mp_lv_obj_get_style_align(size_t mp_n_args, const mp_obj_t *mp_a -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align, lv_obj_get_style_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_internal_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_radial */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_rotation */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_top */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_bottom */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_left */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_right */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_row */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_row); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_column */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_column); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_radial */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_top */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_bottom */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_left */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_right */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right_internal); /* @@ -6405,10 +6621,10 @@ static inline const mp_obj_type_t *get_mp_lv_color_t_type(void) /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_color_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6418,19 +6634,19 @@ static mp_obj_t mp_lv_obj_get_style_bg_color(size_t mp_n_args, const mp_obj_t *m -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered_internal); /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_bg_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_opa_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6440,23 +6656,23 @@ static mp_obj_t mp_lv_obj_get_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered_internal); /* * lvgl extension definition for: - * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -6466,23 +6682,23 @@ static mp_obj_t mp_lv_obj_get_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir, lv_obj_get_style_bg_grad_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_main_stop */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_main_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_grad_stop */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_grad_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_main_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_main_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_grad_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_grad_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa_internal); /* @@ -7104,10 +7320,10 @@ static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void) /* * lvgl extension definition for: - * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -7117,15 +7333,15 @@ static mp_obj_t mp_lv_obj_get_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad, lv_obj_get_style_bg_grad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad_internal); /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bg_image_src(const lv_obj_t *obj, lv_part_t part) + * inline static const void *lv_obj_get_style_bg_image_src_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_src_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -7135,31 +7351,31 @@ static mp_obj_t mp_lv_obj_get_style_bg_image_src(size_t mp_n_args, const mp_obj_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bg_image_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_recolor_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_recolor_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa_internal); /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_bg_image_tiled(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_bg_image_tiled_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_tiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_tiled_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -7169,31 +7385,31 @@ static mp_obj_t mp_lv_obj_get_style_bg_image_tiled(size_t mp_n_args, const mp_ob -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_bg_image_tiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_border_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_border_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_border_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_border_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width_internal); /* * lvgl extension definition for: - * inline static lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t *obj, lv_part_t part) + * inline static lv_border_side_t lv_obj_get_style_border_side_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_border_side(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_border_side_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -7203,75 +7419,75 @@ static mp_obj_t mp_lv_obj_get_style_border_side(size_t mp_n_args, const mp_obj_t -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side, lv_obj_get_style_border_side); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_internal_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_border_post */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_border_post); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_outline_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_outline_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_pad */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_pad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_x */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_y */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_spread */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_spread); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_shadow_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_shadow_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_recolor_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_recolor_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa_internal); /* @@ -7356,10 +7572,10 @@ static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void) /* * lvgl extension definition for: - * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_image_colorkey(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_image_colorkey_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); @@ -7369,71 +7585,71 @@ static mp_obj_t mp_lv_obj_get_style_image_colorkey(size_t mp_n_args, const mp_ob -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey, lv_obj_get_style_image_colorkey); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_internal_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_gap */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_gap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_line_rounded */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_line_rounded); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_line_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_line_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa_internal); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_arc_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_arc_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width_internal); -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_arc_rounded */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_arc_rounded); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_arc_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_arc_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa_internal); -/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_arc_image_src */ +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_arc_image_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_internal); -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color_filtered */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered_internal); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_opa */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa_internal); #define funcptr_get_glyph_dsc NULL @@ -7518,290 +7734,318 @@ static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void) return &mp_lv_font_glyph_dsc_gid_t_type; } -#define funcptr_lv_cache_alloc_cb_t NULL - /* - * lvgl extension definition for: - * void *lv_cache_alloc_cb_t(void) + * Struct lv_font_glyph_dsc_t */ -static mp_obj_t mp_funcptr_lv_cache_alloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) { - - void * _res = ((void *(*)(void))lv_func_ptr)(); - return ptr_to_mp((void*)_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); + return (lv_font_glyph_dsc_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_alloc_cb_t_mpobj, 0, mp_funcptr_lv_cache_alloc_cb_t, funcptr_lv_cache_alloc_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_alloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_alloc_cb_callback' - * lv_cache_alloc_cb_t alloc_cb - */ - -#define funcptr_lv_cache_init_cb_t NULL - - -/* - * lvgl extension definition for: - * bool lv_cache_init_cb_t(lv_cache_t *cache) - */ +#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) -static mp_obj_t mp_funcptr_lv_cache_init_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) { - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - bool _res = ((bool (*)(lv_cache_t *))lv_func_ptr)(cache); - return convert_to_bool(_res); + return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_init_cb_t_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, funcptr_lv_cache_init_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_init_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - +#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) +#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_init_cb_callback' - * lv_cache_init_cb_t init_cb - */ - -#define funcptr_lv_cache_destroy_cb_t NULL +static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; + case MP_QSTR_entry: dest[0] = ptr_to_mp((void*)data->entry); break; // converting from void *; + case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; + case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; + case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; + case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; + case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; + case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; + case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_entry: data->entry = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_funcptr_lv_cache_destroy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - ((void (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); - return mp_const_none; + mp_printf(print, "struct lv_font_glyph_dsc_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_destroy_cb_t_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, funcptr_lv_cache_destroy_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_destroy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_font_glyph_dsc_t_type, + MP_QSTR_lv_font_glyph_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_font_glyph_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_font_glyph_dsc_t_attr, + locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_destroy_cb_callback' - * lv_cache_destroy_cb_t destroy_cb - */ +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) +{ + return &mp_lv_font_glyph_dsc_t_type; +} -#define funcptr_lv_cache_get_cb_t NULL - /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static mp_obj_t mp_funcptr_lv_cache_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); - return ptr_to_mp((void*)_res); + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(font, dsc_out, letter, letter_next); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_cb_t_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, funcptr_lv_cache_get_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } +static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); +#define funcptr_get_glyph_bitmap NULL -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_cb_callback' - * lv_cache_get_cb_t get_cb - */ - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_add_cb_callback' - * lv_cache_add_cb_t add_cb + * Struct lv_image_header_t */ - -#define funcptr_lv_cache_remove_cb_t NULL +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); -/* - * lvgl extension definition for: - * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) - */ - -static mp_obj_t mp_funcptr_lv_cache_remove_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) { - void *user_data = mp_to_ptr(mp_args[2]); - lv_cache_entry_t *entry = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_entry_t *, void *))lv_func_ptr)(cache, entry, user_data); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); + return (lv_image_header_t*)self->data; } - +#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_remove_cb_t_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, funcptr_lv_cache_remove_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_remove_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); +} +#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) +#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_remove_cb_callback' - * lv_cache_remove_cb_t remove_cb - */ - -#define funcptr_lv_cache_drop_cb_t NULL +static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; + case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; + case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; + case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; + case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_funcptr_lv_cache_drop_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_image_header_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - void *user_data = mp_to_ptr(mp_args[2]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - ((void (*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); - return mp_const_none; + mp_printf(print, "struct lv_image_header_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_drop_cb_t_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, funcptr_lv_cache_drop_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_drop_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - +static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_cb_callback' - * lv_cache_drop_cb_t drop_cb - */ - +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_image_header_t_type, + MP_QSTR_lv_image_header_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_image_header_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_image_header_t_attr, + locals_dict, &mp_lv_image_header_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_all_cb_callback' - * lv_cache_drop_all_cb_t drop_all_cb - */ +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) +{ + return &mp_lv_image_header_t_type; +} -#define funcptr_lv_cache_get_victim_cb NULL +#define funcptr_lv_draw_buf_malloc_cb_t NULL /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) + * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) */ -static mp_obj_t mp_funcptr_lv_cache_get_victim_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + size_t size = (size_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_victim_cb_mpobj, 2, mp_funcptr_lv_cache_get_victim_cb, funcptr_lv_cache_get_victim_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_victim_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_victim_cb_callback' - * lv_cache_get_victim_cb get_victim_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' + * lv_draw_buf_malloc_cb_t buf_malloc_cb */ -#define funcptr_lv_cache_reserve_cond_cb NULL +#define funcptr_lv_draw_buf_free_cb_t NULL /* * lvgl extension definition for: - * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) + * void lv_draw_buf_free_cb_t(void *draw_buf) */ -static mp_obj_t mp_funcptr_lv_cache_reserve_cond_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - size_t size = (size_t)mp_obj_get_int(mp_args[2]); - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_cache_reserve_cond_res_t _res = ((lv_cache_reserve_cond_res_t (*)(lv_cache_t *, const void *, size_t, void *))lv_func_ptr)(cache, key, size, user_data); - return mp_obj_new_int(_res); + void *draw_buf = mp_to_ptr(mp_args[0]); + ((void (*)(void *))lv_func_ptr)(draw_buf); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_reserve_cond_cb_mpobj, 4, mp_funcptr_lv_cache_reserve_cond_cb, funcptr_lv_cache_reserve_cond_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_reserve_cond_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_reserve_cond_cb_callback' - * lv_cache_reserve_cond_cb reserve_cond_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' + * lv_draw_buf_free_cb_t buf_free_cb */ -#define funcptr_lv_cache_iter_create_cb NULL +#define funcptr_lv_draw_buf_copy_cb_t NULL /* - * Struct lv_iter_t + * Struct lv_area_t */ -static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_iter_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_iter_t_type())); - return (lv_iter_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); + return (lv_area_t*)self->data; } -#define mp_write_lv_iter_t(struct_obj) *((lv_iter_t*)mp_write_ptr_lv_iter_t(struct_obj)) +#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_iter_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) { - return lv_to_mp_struct(get_mp_lv_iter_t_type(), field); + return lv_to_mp_struct(get_mp_lv_area_t_type(), field); } -#define mp_read_lv_iter_t(field) mp_read_ptr_lv_iter_t(copy_buffer(&field, sizeof(lv_iter_t))) -#define mp_read_byref_lv_iter_t(field) mp_read_ptr_lv_iter_t(&field) +#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) +#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) -static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_iter_t *data = (lv_iter_t*)self->data; + GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; + case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; + case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; + case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7810,7 +8054,10 @@ static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - ; + case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -7819,280 +8066,296 @@ static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_iter_t_print(const mp_print_t *print, +static void mp_lv_area_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_iter_t"); + mp_printf(print, "struct lv_area_t"); } -static const mp_obj_dict_t mp_lv_iter_t_locals_dict; +static const mp_obj_dict_t mp_lv_area_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_iter_t_type, - MP_QSTR_lv_iter_t, + mp_lv_area_t_type, + MP_QSTR_lv_area_t, MP_TYPE_FLAG_NONE, - print, mp_lv_iter_t_print, + print, mp_lv_area_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_iter_t_attr, - locals_dict, &mp_lv_iter_t_locals_dict, + attr, mp_lv_area_t_attr, + locals_dict, &mp_lv_area_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) { - return &mp_lv_iter_t_type; + return &mp_lv_area_t_type; } /* * lvgl extension definition for: - * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) + * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) */ -static mp_obj_t mp_funcptr_lv_cache_iter_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_t *cache = mp_to_ptr(mp_args[0]); - lv_iter_t * _res = ((lv_iter_t *(*)(lv_cache_t *))lv_func_ptr)(cache); - return mp_read_ptr_lv_iter_t((void*)_res); + lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_iter_create_cb_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, funcptr_lv_cache_iter_create_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_iter_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_iter_create_cb_callback' - * lv_cache_iter_create_cb iter_create_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' + * lv_draw_buf_copy_cb_t buf_copy_cb */ +#define funcptr_lv_draw_buf_align_cb_t NULL + /* - * Struct lv_cache_class_t + * lvgl extension definition for: + * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) */ -static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_class_t(mp_obj_t self_in) +static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_class_t_type())); - return (lv_cache_class_t*)self->data; + void *buf = mp_to_ptr(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); + return ptr_to_mp((void*)_res); } -#define mp_write_lv_cache_class_t(struct_obj) *((lv_cache_class_t*)mp_write_ptr_lv_cache_class_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_class_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_cache_class_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -#define mp_read_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(copy_buffer(&field, sizeof(lv_cache_class_t))) -#define mp_read_byref_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(&field) -static void mp_lv_cache_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_class_t *data = (lv_cache_class_t*)self->data; +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' + * lv_draw_buf_align_cb_t align_pointer_cb + */ + +#define funcptr_lv_draw_buf_cache_operation_cb_t NULL - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_alloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, data->alloc_cb, NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL); break; // converting from callback lv_cache_alloc_cb_t; - case MP_QSTR_init_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, data->init_cb, NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL); break; // converting from callback lv_cache_init_cb_t; - case MP_QSTR_destroy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->destroy_cb, NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL); break; // converting from callback lv_cache_destroy_cb_t; - case MP_QSTR_get_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->get_cb, NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL); break; // converting from callback lv_cache_get_cb_t; - case MP_QSTR_add_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->add_cb, NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL); break; // converting from callback lv_cache_add_cb_t; - case MP_QSTR_remove_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, data->remove_cb, NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL); break; // converting from callback lv_cache_remove_cb_t; - case MP_QSTR_drop_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, data->drop_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL); break; // converting from callback lv_cache_drop_cb_t; - case MP_QSTR_drop_all_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->drop_all_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL); break; // converting from callback lv_cache_drop_all_cb_t; - case MP_QSTR_get_victim_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, data->get_victim_cb, NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL); break; // converting from callback lv_cache_get_victim_cb; - case MP_QSTR_reserve_cond_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, data->reserve_cond_cb, NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL); break; // converting from callback lv_cache_reserve_cond_cb; - case MP_QSTR_iter_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, data->iter_create_cb, NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL); break; // converting from callback lv_cache_iter_create_cb; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_alloc_cb: data->alloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_alloc_cb_t; - case MP_QSTR_init_cb: data->init_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_init_cb_t; - case MP_QSTR_destroy_cb: data->destroy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_destroy_cb_t; - case MP_QSTR_get_cb: data->get_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_cb_t; - case MP_QSTR_add_cb: data->add_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_add_cb_t; - case MP_QSTR_remove_cb: data->remove_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_remove_cb_t; - case MP_QSTR_drop_cb: data->drop_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_cb_t; - case MP_QSTR_drop_all_cb: data->drop_all_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_all_cb_t; - case MP_QSTR_get_victim_cb: data->get_victim_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_victim_cb; - case MP_QSTR_reserve_cond_cb: data->reserve_cond_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_reserve_cond_cb; - case MP_QSTR_iter_create_cb: data->iter_create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_iter_create_cb; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + */ -static void mp_lv_cache_class_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_cache_class_t"); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_cache_class_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_class_t_type, - MP_QSTR_lv_cache_class_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_cache_class_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_cache_class_t_attr, - locals_dict, &mp_lv_cache_class_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void) + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ + +#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL + + +/* + * lvgl extension definition for: + * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) + */ + +static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_cache_class_t_type; + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); + return mp_obj_new_int_from_uint(_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); -#define funcptr_lv_cache_compare_cb_t NULL +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ + +#define funcptr_lv_draw_buf_clear_cb_t NULL + +#define funcptr_dispatch_cb NULL /* * lvgl extension definition for: - * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) */ -static mp_obj_t mp_funcptr_lv_cache_compare_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *a = (const void *)mp_to_ptr(mp_args[0]); - const void *b = (const void *)mp_to_ptr(mp_args[1]); - lv_cache_compare_res_t _res = ((lv_cache_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_layer_t *layer = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_compare_cb_t_mpobj, 2, mp_funcptr_lv_cache_compare_cb_t, funcptr_lv_cache_compare_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_compare_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_compare_cb_callback' - * lv_cache_compare_cb_t compare_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' + * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) */ -#define funcptr_lv_cache_create_cb_t NULL +#define funcptr_evaluate_cb NULL /* * lvgl extension definition for: - * bool lv_cache_create_cb_t(void *node, void *user_data) + * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) */ -static mp_obj_t mp_funcptr_lv_cache_create_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - void *node = mp_to_ptr(mp_args[0]); - bool _res = ((bool (*)(void *, void *))lv_func_ptr)(node, user_data); - return convert_to_bool(_res); + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_draw_task_t *task = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_create_cb_t_mpobj, 2, mp_funcptr_lv_cache_create_cb_t, funcptr_lv_cache_create_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_create_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_create_cb_callback' - * lv_cache_create_cb_t create_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' + * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) */ -#define funcptr_lv_cache_free_cb_t NULL +#define funcptr_wait_for_finish_cb NULL /* * lvgl extension definition for: - * void lv_cache_free_cb_t(void *node, void *user_data) + * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) */ -static mp_obj_t mp_funcptr_lv_cache_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - void *node = mp_to_ptr(mp_args[0]); - ((void (*)(void *, void *))lv_func_ptr)(node, user_data); - return mp_const_none; + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_free_cb_t_mpobj, 2, mp_funcptr_lv_cache_free_cb_t, funcptr_lv_cache_free_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_free_cb_callback' - * lv_cache_free_cb_t free_cb + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' + * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) */ /* - * Struct lv_cache_ops_t + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' + * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) */ + +#define funcptr_event_cb NULL -static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_ops_t(mp_obj_t self_in) +/* + * Struct lv_event_t + */ + +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_ops_t_type())); - return (lv_cache_ops_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); + return (lv_event_t*)self->data; } -#define mp_write_lv_cache_ops_t(struct_obj) *((lv_cache_ops_t*)mp_write_ptr_lv_cache_ops_t(struct_obj)) +#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_ops_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_ops_t_type(), field); + return lv_to_mp_struct(get_mp_lv_event_t_type(), field); } -#define mp_read_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(copy_buffer(&field, sizeof(lv_cache_ops_t))) -#define mp_read_byref_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(&field) +#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) +#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) -static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_ops_t *data = (lv_cache_ops_t*)self->data; + GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_compare_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, data->compare_cb, NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL); break; // converting from callback lv_cache_compare_cb_t; - case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, data->create_cb, NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL); break; // converting from callback lv_cache_create_cb_t; - case MP_QSTR_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, data->free_cb, NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL); break; // converting from callback lv_cache_free_cb_t; + case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; + case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; + case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; + case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; + case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; + case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; + case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; + case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8101,9 +8364,16 @@ static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_compare_cb: data->compare_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_compare_cb_t; - case MP_QSTR_create_cb: data->create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_create_cb_t; - case MP_QSTR_free_cb: data->free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_free_cb_t; + case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; + case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -8112,73 +8382,100 @@ static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_cache_ops_t_print(const mp_print_t *print, +static void mp_lv_event_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_ops_t"); + mp_printf(print, "struct lv_event_t"); } -static const mp_obj_dict_t mp_lv_cache_ops_t_locals_dict; +static const mp_obj_dict_t mp_lv_event_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_ops_t_type, - MP_QSTR_lv_cache_ops_t, + mp_lv_event_t_type, + MP_QSTR_lv_event_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_ops_t_print, + print, mp_lv_event_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_ops_t_attr, - locals_dict, &mp_lv_cache_ops_t_locals_dict, + attr, mp_lv_event_t_attr, + locals_dict, &mp_lv_event_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) { - return &mp_lv_cache_ops_t_type; + return &mp_lv_event_t_type; } /* - * Struct lv_cache_t + * lvgl extension definition for: + * void event_cb(lv_event_t *event) */ -static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void); +static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); + ((void (*)(lv_event_t *))lv_func_ptr)(event); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' + * void (*event_cb)(lv_event_t *event) + */ + + +/* + * Struct lv_draw_unit_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_t_type())); - return (lv_cache_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); + return (lv_draw_unit_t*)self->data; } -#define mp_write_lv_cache_t(struct_obj) *((lv_cache_t*)mp_write_ptr_lv_cache_t(struct_obj)) +#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); } -#define mp_read_lv_cache_t(field) mp_read_ptr_lv_cache_t(copy_buffer(&field, sizeof(lv_cache_t))) -#define mp_read_byref_lv_cache_t(field) mp_read_ptr_lv_cache_t(&field) +#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) +#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) -static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_t *data = (lv_cache_t*)self->data; + GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_clz: dest[0] = mp_read_ptr_lv_cache_class_t((void*)data->clz); break; // converting from lv_cache_class_t *; - case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; - case MP_QSTR_max_size: dest[0] = mp_obj_new_int_from_uint(data->max_size); break; // converting from uint32_t; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; - case MP_QSTR_ops: dest[0] = mp_read_byref_lv_cache_ops_t(data->ops); break; // converting from lv_cache_ops_t; - case MP_QSTR_lock: dest[0] = mp_obj_new_int(data->lock); break; // converting from lv_mutex_t; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; + case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8187,13 +8484,14 @@ static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_clz: data->clz = (void*)mp_write_ptr_lv_cache_class_t(dest[1]); break; // converting to lv_cache_class_t *; - case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_max_size: data->max_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_ops: data->ops = mp_write_lv_cache_ops_t(dest[1]); break; // converting to lv_cache_ops_t; - case MP_QSTR_lock: data->lock = (int)mp_obj_get_int(dest[1]); break; // converting to lv_mutex_t; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); default: return; } @@ -8202,70 +8500,78 @@ static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_cache_t_print(const mp_print_t *print, +static void mp_lv_draw_unit_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_t"); + mp_printf(print, "struct lv_draw_unit_t"); } -static const mp_obj_dict_t mp_lv_cache_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_t_type, - MP_QSTR_lv_cache_t, + mp_lv_draw_unit_t_type, + MP_QSTR_lv_draw_unit_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_t_print, + print, mp_lv_draw_unit_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_t_attr, - locals_dict, &mp_lv_cache_t_locals_dict, + attr, mp_lv_draw_unit_t_attr, + locals_dict, &mp_lv_draw_unit_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) { - return &mp_lv_cache_t_type; + return &mp_lv_draw_unit_t_type; } /* - * Struct lv_cache_entry_t + * Struct lv_draw_task_t */ -static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_entry_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_entry_t_type())); - return (lv_cache_entry_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); + return (lv_draw_task_t*)self->data; } -#define mp_write_lv_cache_entry_t(struct_obj) *((lv_cache_entry_t*)mp_write_ptr_lv_cache_entry_t(struct_obj)) +#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_entry_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_entry_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); } -#define mp_read_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(copy_buffer(&field, sizeof(lv_cache_entry_t))) -#define mp_read_byref_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(&field) +#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) +#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) -static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_entry_t *data = (lv_cache_entry_t*)self->data; + GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_cache: dest[0] = mp_read_ptr_lv_cache_t((void*)data->cache); break; // converting from lv_cache_t *; - case MP_QSTR_ref_cnt: dest[0] = mp_obj_new_int(data->ref_cnt); break; // converting from int32_t; - case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint8_t; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; + case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; + case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; + case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; + case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; + case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; + case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8274,10 +8580,18 @@ static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest // store attribute switch(attr) { - case MP_QSTR_cache: data->cache = (void*)mp_write_ptr_lv_cache_t(dest[1]); break; // converting to lv_cache_t *; - case MP_QSTR_ref_cnt: data->ref_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_flags: data->flags = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; + case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -8286,79 +8600,139 @@ static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest } } -static void mp_lv_cache_entry_t_print(const mp_print_t *print, +static void mp_lv_draw_task_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_entry_t"); + mp_printf(print, "struct lv_draw_task_t"); } -static const mp_obj_dict_t mp_lv_cache_entry_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_entry_t_type, - MP_QSTR_lv_cache_entry_t, + mp_lv_draw_task_t_type, + MP_QSTR_lv_draw_task_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_entry_t_print, + print, mp_lv_draw_task_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_entry_t_attr, - locals_dict, &mp_lv_cache_entry_t_locals_dict, + attr, mp_lv_draw_task_t_attr, + locals_dict, &mp_lv_draw_task_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) { - return &mp_lv_cache_entry_t_type; + return &mp_lv_draw_task_t_type; } +#define funcptr_lv_display_flush_cb_t NULL + /* - * Struct lv_font_glyph_dsc_t + * lvgl extension definition for: + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) */ -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); + ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); +#define funcptr_lv_display_flush_wait_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ + +static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); - return (lv_font_glyph_dsc_t*)self->data; + lv_display_t *disp = mp_to_ptr(mp_args[0]); + ((void (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_const_none; } -#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); +#define funcptr_lv_display_sync_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) + */ + +static mp_obj_t mp_funcptr_lv_display_sync_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area); + return mp_const_none; } -#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) -#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) + -static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_sync_cb_t_mpobj, 2, mp_funcptr_lv_display_sync_cb_t, funcptr_lv_display_sync_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); +static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); + +/* + * Struct lv_ll_t + */ + +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); + return (lv_ll_t*)self->data; +} - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; - case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; - case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; - case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; - case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; - case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; - case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; - case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; - case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; - case MP_QSTR_entry: dest[0] = mp_read_ptr_lv_cache_entry_t((void*)data->entry); break; // converting from lv_cache_entry_t *; +#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); +} + +#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) +#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) + +static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; + case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; + case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8367,19 +8741,9 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; - case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; - case MP_QSTR_entry: data->entry = (void*)mp_write_ptr_lv_cache_entry_t(dest[1]); break; // converting to lv_cache_entry_t *; + case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; + case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; default: return; } @@ -8388,98 +8752,143 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, +static void mp_lv_ll_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_glyph_dsc_t"); + mp_printf(print, "struct lv_ll_t"); } -static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_ll_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_glyph_dsc_t_type, - MP_QSTR_lv_font_glyph_dsc_t, + mp_lv_ll_t_type, + MP_QSTR_lv_ll_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_glyph_dsc_t_print, + print, mp_lv_ll_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_glyph_dsc_t_attr, - locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, + attr, mp_lv_ll_t_attr, + locals_dict, &mp_lv_ll_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) { - return &mp_lv_font_glyph_dsc_t_type; + return &mp_lv_ll_t_type; } /* - * lvgl extension definition for: - * bool get_glyph_dsc(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next) + * Array convertors for lv_area_t [32] */ -static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t___32__(mp_obj_t mp_arr) { - const lv_font_t *arg0 = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *arg1 = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(arg0, arg1, letter, letter_next); - return convert_to_bool(_res); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_area_t(item); + } + return (lv_area_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t___32__(lv_area_t *arr) +{ + mp_obj_t obj_arr[32]; + for (size_t i=0; i<32; i++){ + obj_arr[i] = mp_read_lv_area_t(arr[i]); + } + return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } -static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); -#define funcptr_get_glyph_bitmap NULL +/* + * Array convertors for uint8_t [32] + */ + +GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t___32__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (uint8_t *)lv_arr; +} + +GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t___32__(uint8_t *arr) +{ + mp_obj_t obj_arr[32]; + for (size_t i=0; i<32; i++){ + obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); + } + return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! +} +/* Already started generating lv_draw_buf_t! skipping field '_static_buf1' */ +/* Already started generating lv_draw_buf_t! skipping field '_static_buf2' */ /* - * Struct lv_image_header_t + * Struct lv_array_t */ -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_array_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_array_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); - return (lv_image_header_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_array_t_type())); + return (lv_array_t*)self->data; } -#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) +#define mp_write_lv_array_t(struct_obj) *((lv_array_t*)mp_write_ptr_lv_array_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_array_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); + return lv_to_mp_struct(get_mp_lv_array_t_type(), field); } -#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) -#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) +#define mp_read_lv_array_t(field) mp_read_ptr_lv_array_t(copy_buffer(&field, sizeof(lv_array_t))) +#define mp_read_byref_lv_array_t(field) mp_read_ptr_lv_array_t(&field) -static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_array_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; + GENMPY_UNUSED lv_array_t *data = (lv_array_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; - case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; - case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; - case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; - case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; + case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; + case MP_QSTR_capacity: dest[0] = mp_obj_new_int_from_uint(data->capacity); break; // converting from uint32_t; + case MP_QSTR_element_size: dest[0] = mp_obj_new_int_from_uint(data->element_size); break; // converting from uint32_t; + case MP_QSTR_inner_alloc: dest[0] = convert_to_bool(data->inner_alloc); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8488,13 +8897,11 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des // store attribute switch(attr) { - case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_capacity: data->capacity = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_element_size: data->element_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_inner_alloc: data->inner_alloc = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -8503,129 +8910,69 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des } } -static void mp_lv_image_header_t_print(const mp_print_t *print, +static void mp_lv_array_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_header_t"); + mp_printf(print, "struct lv_array_t"); } -static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; +static const mp_obj_dict_t mp_lv_array_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_header_t_type, - MP_QSTR_lv_image_header_t, + mp_lv_array_t_type, + MP_QSTR_lv_array_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_header_t_print, + print, mp_lv_array_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_header_t_attr, - locals_dict, &mp_lv_image_header_t_locals_dict, + attr, mp_lv_array_t_attr, + locals_dict, &mp_lv_array_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) -{ - return &mp_lv_image_header_t_type; -} - -#define funcptr_lv_draw_buf_malloc_cb_t NULL - - -/* - * lvgl extension definition for: - * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - size_t size = (size_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ - -#define funcptr_lv_draw_buf_free_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_draw_buf_free_cb_t(void *draw_buf) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_array_t_type(void) { - void *draw_buf = mp_to_ptr(mp_args[0]); - ((void (*)(void *))lv_func_ptr)(draw_buf); - return mp_const_none; + return &mp_lv_array_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' - * lv_draw_buf_free_cb_t buf_free_cb - */ -#define funcptr_lv_draw_buf_copy_cb_t NULL - /* - * Struct lv_area_t + * Struct lv_event_list_t */ -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_list_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); - return (lv_area_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_list_t_type())); + return (lv_event_list_t*)self->data; } -#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) +#define mp_write_lv_event_list_t(struct_obj) *((lv_event_list_t*)mp_write_ptr_lv_event_list_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_list_t(void *field) { - return lv_to_mp_struct(get_mp_lv_area_t_type(), field); + return lv_to_mp_struct(get_mp_lv_event_list_t_type(), field); } -#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) -#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) +#define mp_read_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(copy_buffer(&field, sizeof(lv_event_list_t))) +#define mp_read_byref_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(&field) -static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_event_list_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; + GENMPY_UNUSED lv_event_list_t *data = (lv_event_list_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; - case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; - case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; - case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; + case MP_QSTR_array: dest[0] = mp_read_byref_lv_array_t(data->array); break; // converting from lv_array_t; + case MP_QSTR_is_traversing: dest[0] = mp_obj_new_int_from_uint(data->is_traversing); break; // converting from uint8_t; + case MP_QSTR_has_marked_deleting: dest[0] = mp_obj_new_int_from_uint(data->has_marked_deleting); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8634,10 +8981,9 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_array: data->array = mp_write_lv_array_t(dest[1]); break; // converting to lv_array_t; + case MP_QSTR_is_traversing: data->is_traversing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_has_marked_deleting: data->has_marked_deleting = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -8646,196 +8992,99 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_area_t_print(const mp_print_t *print, +static void mp_lv_event_list_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_area_t"); + mp_printf(print, "struct lv_event_list_t"); } -static const mp_obj_dict_t mp_lv_area_t_locals_dict; +static const mp_obj_dict_t mp_lv_event_list_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_area_t_type, - MP_QSTR_lv_area_t, + mp_lv_event_list_t_type, + MP_QSTR_lv_event_list_t, MP_TYPE_FLAG_NONE, - print, mp_lv_area_t_print, + print, mp_lv_event_list_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_area_t_attr, - locals_dict, &mp_lv_area_t_locals_dict, + attr, mp_lv_event_list_t_attr, + locals_dict, &mp_lv_event_list_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) -{ - return &mp_lv_area_t_type; -} - - -/* - * lvgl extension definition for: - * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - -#define funcptr_lv_draw_buf_align_cb_t NULL - - -/* - * lvgl extension definition for: - * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void) { - void *buf = mp_to_ptr(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); - return ptr_to_mp((void*)_res); + return &mp_lv_event_list_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' - * lv_draw_buf_align_cb_t align_pointer_cb - */ -#define funcptr_lv_draw_buf_cache_operation_cb_t NULL +#define funcptr_lv_theme_apply_cb_t NULL /* * lvgl extension definition for: - * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) */ -static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_theme_apply_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); + lv_theme_t *arg0 = mp_to_ptr(mp_args[0]); + lv_obj_t *arg1 = mp_to_lv(mp_args[1]); + ((void (*)(lv_theme_t *, lv_obj_t *))lv_func_ptr)(arg0, arg1); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t flush_cache_cb - */ - -#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL - - -/* - * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_theme_apply_cb_t_mpobj, 2, mp_funcptr_lv_theme_apply_cb_t, funcptr_lv_theme_apply_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_theme_apply_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ - +static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); /* - * Struct lv_draw_buf_handlers_t + * Struct lv_theme_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_handlers_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_handlers_t_type())); - return (lv_draw_buf_handlers_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); + return (lv_theme_t*)self->data; } -#define mp_write_lv_draw_buf_handlers_t(struct_obj) *((lv_draw_buf_handlers_t*)mp_write_ptr_lv_draw_buf_handlers_t(struct_obj)) +#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_handlers_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_buf_handlers_t_type(), field); + return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); } -#define mp_read_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) -#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) +#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) +#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) -static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)self->data; + GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_buf_malloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, data->buf_malloc_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL); break; // converting from callback lv_draw_buf_malloc_cb_t; - case MP_QSTR_buf_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, data->buf_free_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL); break; // converting from callback lv_draw_buf_free_cb_t; - case MP_QSTR_buf_copy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, data->buf_copy_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL); break; // converting from callback lv_draw_buf_copy_cb_t; - case MP_QSTR_align_pointer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, data->align_pointer_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL); break; // converting from callback lv_draw_buf_align_cb_t; - case MP_QSTR_invalidate_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->invalidate_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_flush_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->flush_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_width_to_stride_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, data->width_to_stride_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL); break; // converting from callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; + case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; + case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; + case MP_QSTR_font_small: dest[0] = ptr_to_mp((void*)data->font_small); break; // converting from lv_font_t *; + case MP_QSTR_font_normal: dest[0] = ptr_to_mp((void*)data->font_normal); break; // converting from lv_font_t *; + case MP_QSTR_font_large: dest[0] = ptr_to_mp((void*)data->font_large); break; // converting from lv_font_t *; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8844,13 +9093,16 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_buf_malloc_cb: data->buf_malloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_malloc_cb_t; - case MP_QSTR_buf_free_cb: data->buf_free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_free_cb_t; - case MP_QSTR_buf_copy_cb: data->buf_copy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_copy_cb_t; - case MP_QSTR_align_pointer_cb: data->align_pointer_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_align_cb_t; - case MP_QSTR_invalidate_cache_cb: data->invalidate_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_flush_cache_cb: data->flush_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_width_to_stride_cb: data->width_to_stride_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_font_small: data->font_small = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_normal: data->font_normal = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_large: data->font_large = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -8859,71 +9111,95 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_draw_buf_handlers_t_print(const mp_print_t *print, +static void mp_lv_theme_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_buf_handlers_t"); + mp_printf(print, "struct lv_theme_t"); } -static const mp_obj_dict_t mp_lv_draw_buf_handlers_t_locals_dict; +static const mp_obj_dict_t mp_lv_theme_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_buf_handlers_t_type, - MP_QSTR_lv_draw_buf_handlers_t, + mp_lv_theme_t_type, + MP_QSTR_lv_theme_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_buf_handlers_t_print, + print, mp_lv_theme_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_buf_handlers_t_attr, - locals_dict, &mp_lv_draw_buf_handlers_t_locals_dict, + attr, mp_lv_theme_t_attr, + locals_dict, &mp_lv_theme_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) { - return &mp_lv_draw_buf_handlers_t_type; + return &mp_lv_theme_t_type; } +#define funcptr_lv_timer_cb_t NULL + /* - * Struct lv_draw_buf_t + * lvgl extension definition for: + * void lv_timer_cb_t(lv_timer_t *) */ -static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void); +static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); + ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_timer_t_timer_cb_callback(lv_timer_t *); + +/* + * Struct lv_timer_t + */ + +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_t_type())); - return (lv_draw_buf_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); + return (lv_timer_t*)self->data; } -#define mp_write_lv_draw_buf_t(struct_obj) *((lv_draw_buf_t*)mp_write_ptr_lv_draw_buf_t(struct_obj)) +#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_buf_t_type(), field); + return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); } -#define mp_read_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(copy_buffer(&field, sizeof(lv_draw_buf_t))) -#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) +#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) +#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) -static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_buf_t *data = (lv_draw_buf_t*)self->data; + GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; - case MP_QSTR_data_size: dest[0] = mp_obj_new_int_from_uint(data->data_size); break; // converting from uint32_t; - case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; - case MP_QSTR_unaligned_data: dest[0] = ptr_to_mp((void*)data->unaligned_data); break; // converting from void *; - case MP_QSTR_handlers: dest[0] = mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); break; // converting from lv_draw_buf_handlers_t *; + case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; + case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; + case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; + case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; + case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8932,11 +9208,13 @@ static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; - case MP_QSTR_data_size: data->data_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; - case MP_QSTR_unaligned_data: data->unaligned_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_handlers: data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(dest[1]); break; // converting to lv_draw_buf_handlers_t *; + case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -8945,129 +9223,119 @@ static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_draw_buf_t_print(const mp_print_t *print, +static void mp_lv_timer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_buf_t"); + mp_printf(print, "struct lv_timer_t"); } -static const mp_obj_dict_t mp_lv_draw_buf_t_locals_dict; +static const mp_obj_dict_t mp_lv_timer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_buf_t_type, - MP_QSTR_lv_draw_buf_t, + mp_lv_timer_t_type, + MP_QSTR_lv_timer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_buf_t_print, + print, mp_lv_timer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_buf_t_attr, - locals_dict, &mp_lv_draw_buf_t_locals_dict, + attr, mp_lv_timer_t_attr, + locals_dict, &mp_lv_timer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void) -{ - return &mp_lv_draw_buf_t_type; -} - - -/* - * lvgl extension definition for: - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) - */ - -static mp_obj_t mp_funcptr_get_glyph_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_font_glyph_dsc_t *arg0 = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - lv_draw_buf_t *arg1 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(arg0, arg1); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, funcptr_get_glyph_bitmap); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_t_get_glyph_bitmap_callback' - * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *, lv_draw_buf_t *) - */ - -#define funcptr_release_glyph NULL - - -/* - * lvgl extension definition for: - * void release_glyph(const lv_font_t *, lv_font_glyph_dsc_t *) - */ - -static mp_obj_t mp_funcptr_release_glyph(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) { - const lv_font_t *arg0 = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *arg1 = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(arg0, arg1); - return mp_const_none; + return &mp_lv_timer_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_release_glyph_mpobj, 2, mp_funcptr_release_glyph, funcptr_release_glyph); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_font_t_release_glyph_callback(const lv_font_t *, lv_font_glyph_dsc_t *); /* - * Struct lv_font_t + * Struct lv_display_t */ -static inline const mp_obj_type_t *get_mp_lv_font_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_t_type())); - return (lv_font_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); + return (lv_display_t*)self->data; } -#define mp_write_lv_font_t(struct_obj) *((lv_font_t*)mp_write_ptr_lv_font_t(struct_obj)) +#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) { - return lv_to_mp_struct(get_mp_lv_font_t_type(), field); + return lv_to_mp_struct(get_mp_lv_display_t_type(), field); } -#define mp_read_lv_font_t(field) mp_read_ptr_lv_font_t(copy_buffer(&field, sizeof(lv_font_t))) -#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) +#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) +#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) -static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_t *data = (lv_font_t*)self->data; + GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *); - case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *, lv_font_glyph_dsc_t *); - case MP_QSTR_line_height: dest[0] = mp_obj_new_int(data->line_height); break; // converting from int32_t; - case MP_QSTR_base_line: dest[0] = mp_obj_new_int(data->base_line); break; // converting from int32_t; - case MP_QSTR_subpx: dest[0] = mp_obj_new_int_from_uint(data->subpx); break; // converting from uint8_t; - case MP_QSTR_kerning: dest[0] = mp_obj_new_int_from_uint(data->kerning); break; // converting from uint8_t; - case MP_QSTR_static_bitmap: dest[0] = mp_obj_new_int_from_uint(data->static_bitmap); break; // converting from uint8_t; - case MP_QSTR_underline_position: dest[0] = mp_obj_new_int(data->underline_position); break; // converting from int8_t; - case MP_QSTR_underline_thickness: dest[0] = mp_obj_new_int(data->underline_thickness); break; // converting from int8_t; - case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; - case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; + case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; + case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; + case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; + case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; + case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; + case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; + case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; + case MP_QSTR_buf_1: dest[0] = ptr_to_mp((void*)data->buf_1); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_2: dest[0] = ptr_to_mp((void*)data->buf_2); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_3: dest[0] = ptr_to_mp((void*)data->buf_3); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_act: dest[0] = ptr_to_mp((void*)data->buf_act); break; // converting from lv_draw_buf_t *; + case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; + case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; + case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; + case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; + case MP_QSTR_sync_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, data->sync_cb, lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, data->user_data); break; // converting from callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, data->user_data); break; // converting from callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: dest[0] = mp_obj_new_int(data->syncing); break; // converting from int; + case MP_QSTR_syncing_last: dest[0] = mp_obj_new_int(data->syncing_last); break; // converting from int; + case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; + case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; + case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; + case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; + case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; + case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; + case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; + case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; + case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; + case MP_QSTR_layer_head: dest[0] = ptr_to_mp((void*)data->layer_head); break; // converting from lv_layer_t *; + case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; + case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; + case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; + case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; + case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; + case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; + case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; + case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; + case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; + case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; + case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; + case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; + case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; + case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; + case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; + case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; + case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9076,19 +9344,59 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *); - case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *, lv_font_glyph_dsc_t *); - case MP_QSTR_line_height: data->line_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_base_line: data->base_line = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_subpx: data->subpx = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_kerning: data->kerning = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_static_bitmap: data->static_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_underline_position: data->underline_position = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; - case MP_QSTR_underline_thickness: data->underline_thickness = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; - case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_buf_1: data->buf_1 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_2: data->buf_2 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_3: data->buf_3 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_act: data->buf_act = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_sync_cb: data->sync_cb = mp_lv_callback(dest[1], lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: data->sync_wait_cb = mp_lv_callback(dest[1], lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: data->syncing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_syncing_last: data->syncing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; + case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; + case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; + case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; + case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_layer_head: data->layer_head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; + case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; + case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; + case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -9097,244 +9405,165 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_font_t_print(const mp_print_t *print, +static void mp_lv_display_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_t"); + mp_printf(print, "struct lv_display_t"); } -static const mp_obj_dict_t mp_lv_font_t_locals_dict; +static const mp_obj_dict_t mp_lv_display_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_t_type, - MP_QSTR_lv_font_t, + mp_lv_display_t_type, + MP_QSTR_lv_display_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_t_print, + print, mp_lv_display_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_t_attr, - locals_dict, &mp_lv_font_t_locals_dict, + attr, mp_lv_display_t_attr, + locals_dict, &mp_lv_display_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) { - return &mp_lv_font_t_type; + return &mp_lv_display_t_type; } /* - * lvgl extension definition for: - * inline static const lv_font_t *lv_obj_get_style_text_font(const lv_obj_t *obj, lv_part_t part) + * Struct lv_color32_t */ -static mp_obj_t mp_lv_obj_get_style_text_font(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_font_t * _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_font_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font, lv_obj_get_style_text_font); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_letter_space */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_letter_space); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_line_space */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_line_space); - - -/* - * lvgl extension definition for: - * inline static lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t *obj, lv_part_t part) - */ +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); -static mp_obj_t mp_lv_obj_get_style_text_decor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_decor_t _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); + return (lv_color32_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor, lv_obj_get_style_text_decor); - - -/* - * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t *obj, lv_part_t part) - */ +#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) -static mp_obj_t mp_lv_obj_get_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align, lv_obj_get_style_text_align); - -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color); - -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color_filtered */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color_filtered); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_outline_stroke_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_outline_stroke_width); - -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_outline_stroke_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_outline_stroke_opa); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_blur_radius */ +#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) +#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_blur_radius); - -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_blur_backdrop */ +static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_blur_backdrop); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; + case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } -/* - * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t *obj, lv_part_t part) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_obj_get_style_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_color32_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_blur_quality_t _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_color32_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_blur_quality); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_radius */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_radius); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_x); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_y); - -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color); - -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color_filtered */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_drop_shadow_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_drop_shadow_opa); - -/* Reusing lv_obj_get_style_blur_quality for lv_obj_get_style_drop_shadow_quality */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_drop_shadow_quality); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_radius */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radius); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_radial_offset */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radial_offset); - -/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_clip_corner */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_clip_corner); - -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa); - -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_layered */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_layered); - -#define funcptr_lv_color_filter_cb_t NULL - +static const mp_obj_dict_t mp_lv_color32_t_locals_dict; -/* - * lvgl extension definition for: - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color32_t_type, + MP_QSTR_lv_color32_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color32_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color32_t_attr, + locals_dict, &mp_lv_color32_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_funcptr_lv_color_filter_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) { - const struct _lv_color_filter_dsc_t *arg0 = (const struct _lv_color_filter_dsc_t *)mp_to_ptr(mp_args[0]); - lv_color_t arg1 = mp_write_lv_color_t(mp_args[1]); - lv_opa_t arg2 = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_color_t _res = ((lv_color_t (*)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t))lv_func_ptr)(arg0, arg1, arg2); - return mp_read_lv_color_t(_res); + return &mp_lv_color32_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_color_filter_cb_t_mpobj, 3, mp_funcptr_lv_color_filter_cb_t, funcptr_lv_color_filter_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); /* - * Struct lv_color_filter_dsc_t + * Struct lv_layer_t */ -static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_filter_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_filter_dsc_t_type())); - return (lv_color_filter_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); + return (lv_layer_t*)self->data; } -#define mp_write_lv_color_filter_dsc_t(struct_obj) *((lv_color_filter_dsc_t*)mp_write_ptr_lv_color_filter_dsc_t(struct_obj)) +#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_filter_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_color_filter_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); } -#define mp_read_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) -#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) +#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) +#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) -static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)self->data; + GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_filter_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, data->user_data); break; // converting from callback lv_color_filter_cb_t; + case MP_QSTR_draw_buf: dest[0] = ptr_to_mp((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; + case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; + case MP_QSTR_display: dest[0] = mp_read_ptr_lv_display_t((void*)data->display); break; // converting from lv_display_t *; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; + case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; + case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; + case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; + case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_buffer_owned: dest[0] = convert_to_bool(data->buffer_owned); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9343,8 +9572,21 @@ static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_filter_cb: data->filter_cb = mp_lv_callback(dest[1], lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_color_filter_cb_t; + case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_display: data->display = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_buffer_owned: data->buffer_owned = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -9353,200 +9595,102 @@ static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_color_filter_dsc_t_print(const mp_print_t *print, +static void mp_lv_layer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color_filter_dsc_t"); + mp_printf(print, "struct lv_layer_t"); } -static const mp_obj_dict_t mp_lv_color_filter_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_layer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color_filter_dsc_t_type, - MP_QSTR_lv_color_filter_dsc_t, + mp_lv_layer_t_type, + MP_QSTR_lv_layer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color_filter_dsc_t_print, + print, mp_lv_layer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color_filter_dsc_t_attr, - locals_dict, &mp_lv_color_filter_dsc_t_locals_dict, + attr, mp_lv_layer_t_attr, + locals_dict, &mp_lv_layer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) { - return &mp_lv_color_filter_dsc_t_type; + return &mp_lv_layer_t_type; } /* * lvgl extension definition for: - * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc(const lv_obj_t *obj, lv_part_t part) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ -static mp_obj_t mp_lv_obj_get_style_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_clear_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_color_filter_dsc_t * _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); + lv_draw_buf_t *draw_buf = mp_to_ptr(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_func_ptr)(draw_buf, a, layer); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc, lv_obj_get_style_color_filter_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, funcptr_lv_draw_buf_clear_cb_t); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_color_filter_opa */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_color_filter_opa); - -/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_recolor); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_clear_cb_callback' + * lv_draw_buf_clear_cb_t buf_clear_cb + */ -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_recolor_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_recolor_opa); - -#define funcptr_lv_anim_exec_xcb_t NULL - - -/* - * lvgl extension definition for: - * void lv_anim_exec_xcb_t(void *, int32_t) - */ - -static mp_obj_t mp_funcptr_lv_anim_exec_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *arg0 = mp_to_ptr(mp_args[0]); - int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(void *, int32_t))lv_func_ptr)(arg0, arg1); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_exec_xcb_t_mpobj, 2, mp_funcptr_lv_anim_exec_xcb_t, funcptr_lv_anim_exec_xcb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_anim_t_exec_cb_callback' - * lv_anim_exec_xcb_t exec_cb - */ - -#define funcptr_lv_anim_custom_exec_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) - */ - -static mp_obj_t mp_funcptr_lv_anim_custom_exec_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_anim_t *, int32_t))lv_func_ptr)(arg0, arg1); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, 2, mp_funcptr_lv_anim_custom_exec_cb_t, funcptr_lv_anim_custom_exec_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); -#define funcptr_lv_anim_start_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_anim_start_cb_t(lv_anim_t *) - */ - -static mp_obj_t mp_funcptr_lv_anim_start_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - ((void (*)(lv_anim_t *))lv_func_ptr)(arg0); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_start_cb_t_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, funcptr_lv_anim_start_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_anim_t_start_cb_callback(lv_anim_t *); -static void lv_anim_t_completed_cb_callback(lv_anim_t *); -static void lv_anim_t_deleted_cb_callback(lv_anim_t *); -#define funcptr_lv_anim_get_value_cb_t NULL - - -/* - * lvgl extension definition for: - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) - */ - -static mp_obj_t mp_funcptr_lv_anim_get_value_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_anim_t *))lv_func_ptr)(arg0); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_get_value_cb_t_mpobj, 1, mp_funcptr_lv_anim_get_value_cb_t, funcptr_lv_anim_get_value_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); -static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); -typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * Struct lv_anim_bezier3_para_t + * Struct lv_draw_buf_handlers_t */ -static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_bezier3_para_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_handlers_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_bezier3_para_t_type())); - return (lv_anim_bezier3_para_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_handlers_t_type())); + return (lv_draw_buf_handlers_t*)self->data; } -#define mp_write_lv_anim_bezier3_para_t(struct_obj) *((lv_anim_bezier3_para_t*)mp_write_ptr_lv_anim_bezier3_para_t(struct_obj)) +#define mp_write_lv_draw_buf_handlers_t(struct_obj) *((lv_draw_buf_handlers_t*)mp_write_ptr_lv_draw_buf_handlers_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_bezier3_para_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_handlers_t(void *field) { - return lv_to_mp_struct(get_mp_lv_anim_bezier3_para_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_buf_handlers_t_type(), field); } -#define mp_read_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) -#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) +#define mp_read_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) +#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) -static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)self->data; + GENMPY_UNUSED lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int16_t; - case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int16_t; - case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int16_t; - case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int16_t; + case MP_QSTR_buf_malloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, data->buf_malloc_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL); break; // converting from callback lv_draw_buf_malloc_cb_t; + case MP_QSTR_buf_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, data->buf_free_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL); break; // converting from callback lv_draw_buf_free_cb_t; + case MP_QSTR_buf_copy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, data->buf_copy_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL); break; // converting from callback lv_draw_buf_copy_cb_t; + case MP_QSTR_align_pointer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, data->align_pointer_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL); break; // converting from callback lv_draw_buf_align_cb_t; + case MP_QSTR_invalidate_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->invalidate_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_flush_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->flush_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_width_to_stride_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, data->width_to_stride_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL); break; // converting from callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, data->buf_clear_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL); break; // converting from callback lv_draw_buf_clear_cb_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9555,10 +9699,14 @@ static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_x1: data->x1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_y1: data->y1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_x2: data->x2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_y2: data->y2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_buf_malloc_cb: data->buf_malloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_malloc_cb_t; + case MP_QSTR_buf_free_cb: data->buf_free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_free_cb_t; + case MP_QSTR_buf_copy_cb: data->buf_copy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_copy_cb_t; + case MP_QSTR_align_pointer_cb: data->align_pointer_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_align_cb_t; + case MP_QSTR_invalidate_cache_cb: data->invalidate_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_flush_cache_cb: data->flush_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_width_to_stride_cb: data->width_to_stride_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: data->buf_clear_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_clear_cb_t; default: return; } @@ -9567,67 +9715,71 @@ static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_anim_bezier3_para_t_print(const mp_print_t *print, +static void mp_lv_draw_buf_handlers_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_anim_bezier3_para_t"); + mp_printf(print, "struct lv_draw_buf_handlers_t"); } -static const mp_obj_dict_t mp_lv_anim_bezier3_para_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_buf_handlers_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_bezier3_para_t_type, - MP_QSTR_lv_anim_bezier3_para_t, + mp_lv_draw_buf_handlers_t_type, + MP_QSTR_lv_draw_buf_handlers_t, MP_TYPE_FLAG_NONE, - print, mp_lv_anim_bezier3_para_t_print, + print, mp_lv_draw_buf_handlers_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_anim_bezier3_para_t_attr, - locals_dict, &mp_lv_anim_bezier3_para_t_locals_dict, + attr, mp_lv_draw_buf_handlers_t_attr, + locals_dict, &mp_lv_draw_buf_handlers_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void) { - return &mp_lv_anim_bezier3_para_t_type; + return &mp_lv_draw_buf_handlers_t_type; } /* - * Struct lv_anim_parameter_t + * Struct lv_draw_buf_t */ -static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_parameter_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_parameter_t_type())); - return (lv_anim_parameter_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_t_type())); + return (lv_draw_buf_t*)self->data; } -#define mp_write_lv_anim_parameter_t(struct_obj) *((lv_anim_parameter_t*)mp_write_ptr_lv_anim_parameter_t(struct_obj)) +#define mp_write_lv_draw_buf_t(struct_obj) *((lv_draw_buf_t*)mp_write_ptr_lv_draw_buf_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_parameter_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_t(void *field) { - return lv_to_mp_struct(get_mp_lv_anim_parameter_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_buf_t_type(), field); } -#define mp_read_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(copy_buffer(&field, sizeof(lv_anim_parameter_t))) -#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) +#define mp_read_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(copy_buffer(&field, sizeof(lv_draw_buf_t))) +#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) -static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_parameter_t *data = (lv_anim_parameter_t*)self->data; + GENMPY_UNUSED lv_draw_buf_t *data = (lv_draw_buf_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_bezier3: dest[0] = mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); break; // converting from lv_anim_bezier3_para_t; + case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; + case MP_QSTR_data_size: dest[0] = mp_obj_new_int_from_uint(data->data_size); break; // converting from uint32_t; + case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; + case MP_QSTR_unaligned_data: dest[0] = ptr_to_mp((void*)data->unaligned_data); break; // converting from void *; + case MP_QSTR_handlers: dest[0] = mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); break; // converting from lv_draw_buf_handlers_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9636,7 +9788,11 @@ static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_bezier3: data->bezier3 = mp_write_lv_anim_bezier3_para_t(dest[1]); break; // converting to lv_anim_bezier3_para_t; + case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; + case MP_QSTR_data_size: data->data_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; + case MP_QSTR_unaligned_data: data->unaligned_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_handlers: data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(dest[1]); break; // converting to lv_draw_buf_handlers_t *; default: return; } @@ -9645,244 +9801,131 @@ static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_anim_parameter_t_print(const mp_print_t *print, +static void mp_lv_draw_buf_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_anim_parameter_t"); + mp_printf(print, "struct lv_draw_buf_t"); } -static const mp_obj_dict_t mp_lv_anim_parameter_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_buf_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_parameter_t_type, - MP_QSTR_lv_anim_parameter_t, + mp_lv_draw_buf_t_type, + MP_QSTR_lv_draw_buf_t, MP_TYPE_FLAG_NONE, - print, mp_lv_anim_parameter_t_print, + print, mp_lv_draw_buf_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_anim_parameter_t_attr, - locals_dict, &mp_lv_anim_parameter_t_locals_dict, + attr, mp_lv_draw_buf_t_attr, + locals_dict, &mp_lv_draw_buf_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void) { - return &mp_lv_anim_parameter_t_type; + return &mp_lv_draw_buf_t_type; } /* - * Struct lv_anim_t + * lvgl extension definition for: + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ -static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_t_type())); - return (lv_anim_t*)self->data; -} - -#define mp_write_lv_anim_t(struct_obj) *((lv_anim_t*)mp_write_ptr_lv_anim_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_anim_t_type(), field); -} - -#define mp_read_lv_anim_t(field) mp_read_ptr_lv_anim_t(copy_buffer(&field, sizeof(lv_anim_t))) -#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) - -static void mp_lv_anim_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_t *data = (lv_anim_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_var: dest[0] = ptr_to_mp((void*)data->var); break; // converting from void *; - case MP_QSTR_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, data->exec_cb, NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL); break; // converting from callback lv_anim_exec_xcb_t; - case MP_QSTR_custom_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, data->user_data); break; // converting from callback lv_anim_custom_exec_cb_t; - case MP_QSTR_start_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->start_cb, lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, data->user_data); break; // converting from callback lv_anim_start_cb_t; - case MP_QSTR_completed_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->completed_cb, lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, data->user_data); break; // converting from callback lv_anim_completed_cb_t; - case MP_QSTR_deleted_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->deleted_cb, lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, data->user_data); break; // converting from callback lv_anim_deleted_cb_t; - case MP_QSTR_get_value_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->get_value_cb, lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, data->user_data); break; // converting from callback lv_anim_get_value_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, data->user_data); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_start_value: dest[0] = mp_obj_new_int(data->start_value); break; // converting from int32_t; - case MP_QSTR_current_value: dest[0] = mp_obj_new_int(data->current_value); break; // converting from int32_t; - case MP_QSTR_end_value: dest[0] = mp_obj_new_int(data->end_value); break; // converting from int32_t; - case MP_QSTR_duration: dest[0] = mp_obj_new_int(data->duration); break; // converting from int32_t; - case MP_QSTR_act_time: dest[0] = mp_obj_new_int(data->act_time); break; // converting from int32_t; - case MP_QSTR_reverse_delay: dest[0] = mp_obj_new_int_from_uint(data->reverse_delay); break; // converting from uint32_t; - case MP_QSTR_reverse_duration: dest[0] = mp_obj_new_int_from_uint(data->reverse_duration); break; // converting from uint32_t; - case MP_QSTR_repeat_delay: dest[0] = mp_obj_new_int_from_uint(data->repeat_delay); break; // converting from uint32_t; - case MP_QSTR_repeat_cnt: dest[0] = mp_obj_new_int_from_uint(data->repeat_cnt); break; // converting from uint32_t; - case MP_QSTR_parameter: dest[0] = mp_read_byref_lv_anim_parameter_t(data->parameter); break; // converting from lv_anim_parameter_t; - case MP_QSTR_last_timer_run: dest[0] = mp_obj_new_int_from_uint(data->last_timer_run); break; // converting from uint32_t; - case MP_QSTR_pause_time: dest[0] = mp_obj_new_int_from_uint(data->pause_time); break; // converting from uint32_t; - case MP_QSTR_pause_duration: dest[0] = mp_obj_new_int_from_uint(data->pause_duration); break; // converting from uint32_t; - case MP_QSTR_is_paused: dest[0] = mp_obj_new_int_from_uint(data->is_paused); break; // converting from uint8_t; - case MP_QSTR_reverse_play_in_progress: dest[0] = mp_obj_new_int_from_uint(data->reverse_play_in_progress); break; // converting from uint8_t; - case MP_QSTR_run_round: dest[0] = mp_obj_new_int_from_uint(data->run_round); break; // converting from uint8_t; - case MP_QSTR_start_cb_called: dest[0] = mp_obj_new_int_from_uint(data->start_cb_called); break; // converting from uint8_t; - case MP_QSTR_early_apply: dest[0] = mp_obj_new_int_from_uint(data->early_apply); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_var: data->var = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_exec_cb: data->exec_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_exec_xcb_t; - case MP_QSTR_custom_exec_cb: data->custom_exec_cb = mp_lv_callback(dest[1], lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_custom_exec_cb_t; - case MP_QSTR_start_cb: data->start_cb = mp_lv_callback(dest[1], lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_start_cb_t; - case MP_QSTR_completed_cb: data->completed_cb = mp_lv_callback(dest[1], lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_completed_cb_t; - case MP_QSTR_deleted_cb: data->deleted_cb = mp_lv_callback(dest[1], lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_deleted_cb_t; - case MP_QSTR_get_value_cb: data->get_value_cb = mp_lv_callback(dest[1], lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_get_value_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_start_value: data->start_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_current_value: data->current_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_end_value: data->end_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_duration: data->duration = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_act_time: data->act_time = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_reverse_delay: data->reverse_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_reverse_duration: data->reverse_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_repeat_delay: data->repeat_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_repeat_cnt: data->repeat_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_parameter: data->parameter = mp_write_lv_anim_parameter_t(dest[1]); break; // converting to lv_anim_parameter_t; - case MP_QSTR_last_timer_run: data->last_timer_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pause_time: data->pause_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pause_duration: data->pause_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_is_paused: data->is_paused = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_reverse_play_in_progress: data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_run_round: data->run_round = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_start_cb_called: data->start_cb_called = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_early_apply: data->early_apply = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_anim_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_funcptr_get_glyph_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_anim_t"); + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(g_dsc, draw_buf); + return ptr_to_mp((void*)_res); } -static const mp_obj_dict_t mp_lv_anim_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_t_type, - MP_QSTR_lv_anim_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_anim_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_anim_t_attr, - locals_dict, &mp_lv_anim_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void) -{ - return &mp_lv_anim_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, funcptr_get_glyph_bitmap); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * lvgl extension definition for: - * inline static const lv_anim_t *lv_obj_get_style_anim(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_t_get_glyph_bitmap_callback' + * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ - -static mp_obj_t mp_lv_obj_get_style_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_anim_t * _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_anim_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim, lv_obj_get_style_anim); +#define funcptr_release_glyph NULL + /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_anim_duration(const lv_obj_t *obj, lv_part_t part) + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) */ -static mp_obj_t mp_lv_obj_get_style_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_release_glyph(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(font, g_dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_anim_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_release_glyph_mpobj, 2, mp_funcptr_release_glyph, funcptr_release_glyph); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, func, NULL, MP_QSTR_, NULL); } -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_style_transition_dsc_t_path_xcb_callback' - * lv_anim_path_cb_t path_xcb - */ - +static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); /* - * Struct lv_style_transition_dsc_t + * Struct lv_font_t */ -static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_font_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_transition_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_transition_dsc_t_type())); - return (lv_style_transition_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_t_type())); + return (lv_font_t*)self->data; } -#define mp_write_lv_style_transition_dsc_t(struct_obj) *((lv_style_transition_dsc_t*)mp_write_ptr_lv_style_transition_dsc_t(struct_obj)) +#define mp_write_lv_font_t(struct_obj) *((lv_font_t*)mp_write_ptr_lv_font_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_transition_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_t(void *field) { - return lv_to_mp_struct(get_mp_lv_style_transition_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_font_t_type(), field); } -#define mp_read_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) -#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) +#define mp_read_lv_font_t(field) mp_read_ptr_lv_font_t(copy_buffer(&field, sizeof(lv_font_t))) +#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) -static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)self->data; + GENMPY_UNUSED lv_font_t *data = (lv_font_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_props: dest[0] = ptr_to_mp((void*)data->props); break; // converting from lv_style_prop_t *; + case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; + case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_path_xcb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_xcb, NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint32_t; - case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint32_t; + case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + case MP_QSTR_line_height: dest[0] = mp_obj_new_int(data->line_height); break; // converting from int32_t; + case MP_QSTR_base_line: dest[0] = mp_obj_new_int(data->base_line); break; // converting from int32_t; + case MP_QSTR_cap_height: dest[0] = mp_obj_new_int(data->cap_height); break; // converting from int32_t; + case MP_QSTR_x_height: dest[0] = mp_obj_new_int(data->x_height); break; // converting from int32_t; + case MP_QSTR_subpx: dest[0] = mp_obj_new_int_from_uint(data->subpx); break; // converting from uint8_t; + case MP_QSTR_kerning: dest[0] = mp_obj_new_int_from_uint(data->kerning); break; // converting from uint8_t; + case MP_QSTR_static_bitmap: dest[0] = mp_obj_new_int_from_uint(data->static_bitmap); break; // converting from uint8_t; + case MP_QSTR_underline_position: dest[0] = mp_obj_new_int(data->underline_position); break; // converting from int8_t; + case MP_QSTR_underline_thickness: dest[0] = mp_obj_new_int(data->underline_thickness); break; // converting from int8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9891,11 +9934,21 @@ static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_ob // store attribute switch(attr) { - case MP_QSTR_props: data->props = (void*)mp_to_ptr(dest[1]); break; // converting to lv_style_prop_t *; + case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_path_xcb: data->path_xcb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_time: data->time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_delay: data->delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + case MP_QSTR_line_height: data->line_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_base_line: data->base_line = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_cap_height: data->cap_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x_height: data->x_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_subpx: data->subpx = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_kerning: data->kerning = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_static_bitmap: data->static_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_underline_position: data->underline_position = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; + case MP_QSTR_underline_thickness: data->underline_thickness = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; default: return; } @@ -9904,746 +9957,659 @@ static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_ob } } -static void mp_lv_style_transition_dsc_t_print(const mp_print_t *print, +static void mp_lv_font_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_style_transition_dsc_t"); + mp_printf(print, "struct lv_font_t"); } -static const mp_obj_dict_t mp_lv_style_transition_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_font_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_transition_dsc_t_type, - MP_QSTR_lv_style_transition_dsc_t, + mp_lv_font_t_type, + MP_QSTR_lv_font_t, MP_TYPE_FLAG_NONE, - print, mp_lv_style_transition_dsc_t_print, + print, mp_lv_font_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_style_transition_dsc_t_attr, - locals_dict, &mp_lv_style_transition_dsc_t_locals_dict, + attr, mp_lv_font_t_attr, + locals_dict, &mp_lv_font_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_font_t_type(void) { - return &mp_lv_style_transition_dsc_t_type; + return &mp_lv_font_t_type; } /* * lvgl extension definition for: - * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_font_t *lv_obj_get_style_text_font_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_font_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_style_transition_dsc_t * _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); + const lv_font_t * _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_font_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition, lv_obj_get_style_transition); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_internal_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space_internal); /* * lvgl extension definition for: - * inline static lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_decor_t lv_obj_get_style_text_decor_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_decor_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_blend_mode_t _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_text_decor_t _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode, lv_obj_get_style_blend_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_internal_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor_internal); /* * lvgl extension definition for: - * inline static uint16_t lv_obj_get_style_layout(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_align_t lv_obj_get_style_text_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint16_t _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout, lv_obj_get_style_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_internal_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align_internal); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_internal); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width_internal); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa_internal); /* * lvgl extension definition for: - * inline static lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_leading_trim_t lv_obj_get_style_text_leading_trim_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_leading_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_base_dir_t _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_text_leading_trim_t _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir, lv_obj_get_style_base_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_internal_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim_internal); -/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_bitmap_mask_src */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bitmap_mask_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius_internal); -/* Reusing lv_obj_get_style_anim_duration for lv_obj_get_style_rotary_sensitivity */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_rotary_sensitivity); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop_internal); /* * lvgl extension definition for: - * inline static lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t *obj, lv_part_t part) + * inline static lv_blur_quality_t lv_obj_get_style_blur_quality_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_blur_quality_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_flex_flow_t _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_blur_quality_t _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow, lv_obj_get_style_flex_flow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality_internal); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius_internal */ -/* - * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t *obj, lv_part_t part) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x_internal */ -static mp_obj_t mp_lv_obj_get_style_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_flex_align_t _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y_internal */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y_internal); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_main_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_internal); -/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_cross_place */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_cross_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered_internal); -/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_track_place */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_track_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa_internal); +/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality_internal */ -/* - * lvgl extension definition for: - * inline static uint8_t lv_obj_get_style_flex_grow(const lv_obj_t *obj, lv_part_t part) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius_internal */ -static mp_obj_t mp_lv_obj_get_style_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint8_t _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset_internal */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset_internal); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner_internal); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_internal); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow, lv_obj_get_style_flex_grow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered_internal); +#define funcptr_lv_color_filter_cb_t NULL + /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array(const lv_obj_t *obj, lv_part_t part) + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) */ -static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_color_filter_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const int32_t * _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_array_from_i32ptr((void*)_res); + const struct _lv_color_filter_dsc_t *arg0 = (const struct _lv_color_filter_dsc_t *)mp_to_ptr(mp_args[0]); + lv_color_t arg1 = mp_write_lv_color_t(mp_args[1]); + lv_opa_t arg2 = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_color_t _res = ((lv_color_t (*)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t))lv_func_ptr)(arg0, arg1, arg2); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_column_dsc_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_color_filter_cb_t_mpobj, 3, mp_funcptr_lv_color_filter_cb_t, funcptr_lv_color_filter_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); /* - * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t *obj, lv_part_t part) + * Struct lv_color_filter_dsc_t */ -static mp_obj_t mp_lv_obj_get_style_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_filter_dsc_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_grid_align_t _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_filter_dsc_t_type())); + return (lv_color_filter_dsc_t*)self->data; } - +#define mp_write_lv_color_filter_dsc_t(struct_obj) *((lv_color_filter_dsc_t*)mp_write_ptr_lv_color_filter_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_column_align); - -/* Reusing lv_obj_get_style_grid_column_dsc_array for lv_obj_get_style_grid_row_dsc_array */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_filter_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_color_filter_dsc_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_row_dsc_array); - -/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_row_align */ +#define mp_read_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) +#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_row_align); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_pos */ +static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_pos); - -/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_x_align */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_filter_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, data->user_data); break; // converting from callback lv_color_filter_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_filter_cb: data->filter_cb = mp_lv_callback(dest[1], lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_color_filter_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + default: return; + } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_x_align); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_span */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_span); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_pos */ +static void mp_lv_color_filter_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_color_filter_dsc_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_pos); - -/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_y_align */ +static const mp_obj_dict_t mp_lv_color_filter_dsc_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_y_align); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_span */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color_filter_dsc_t_type, + MP_QSTR_lv_color_filter_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color_filter_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color_filter_dsc_t_attr, + locals_dict, &mp_lv_color_filter_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_span); +static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void) +{ + return &mp_lv_color_filter_dsc_t_type; +} /* * lvgl extension definition for: - * inline static void lv_obj_set_style_pad_all(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_set_style_pad_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_color_filter_dsc_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_color_filter_dsc_t * _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_all_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_all); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_hor_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_hor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_internal_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc_internal); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_ver */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_ver_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_ver); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa_internal); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_all */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_all_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor_internal); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_hor */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_hor_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_hor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa_internal); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_ver_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_ver); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_gap */ +#define funcptr_lv_anim_exec_xcb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_gap_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_gap); - /* * lvgl extension definition for: - * inline static void lv_obj_set_style_size(lv_obj_t *obj, int32_t width, int32_t height, lv_style_selector_t selector) + * void lv_anim_exec_xcb_t(void *, int32_t) */ -static mp_obj_t mp_lv_obj_set_style_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_exec_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_style_selector_t))lv_func_ptr)(obj, width, height, selector); + void *arg0 = mp_to_ptr(mp_args[0]); + int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(void *, int32_t))lv_func_ptr)(arg0, arg1); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_size_mpobj, 4, mp_lv_obj_set_style_size, lv_obj_set_style_size); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_scale */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_scale); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_left */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_left); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_right); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_top */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_exec_xcb_t_mpobj, 2, mp_funcptr_lv_anim_exec_xcb_t, funcptr_lv_anim_exec_xcb_t); -/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_bottom */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_bottom); - -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x_safe */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x_safe); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_anim_t_exec_cb_callback' + * lv_anim_exec_xcb_t exec_cb + */ -/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y_safe */ +#define funcptr_lv_anim_custom_exec_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y_safe); - /* * lvgl extension definition for: - * inline static void lv_obj_move_foreground(lv_obj_t *obj) + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -static mp_obj_t mp_lv_obj_move_foreground(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_custom_exec_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - ((void (*)(lv_obj_t *))lv_func_ptr)(obj); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_anim_t *, int32_t))lv_func_ptr)(arg0, arg1); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_foreground_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_foreground); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, 2, mp_funcptr_lv_anim_custom_exec_cb_t, funcptr_lv_anim_custom_exec_cb_t); -/* Reusing lv_obj_move_foreground for lv_obj_move_background */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); +#define funcptr_lv_anim_start_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_background_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_move_background); - /* * lvgl extension definition for: - * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) + * void lv_anim_start_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_obj_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_start_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_flex_flow_t flow = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_func_ptr)(obj, flow); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + ((void (*)(lv_anim_t *))lv_func_ptr)(arg0); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_flow_mpobj, 2, mp_lv_obj_set_flex_flow, lv_obj_set_flex_flow); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_start_cb_t_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, funcptr_lv_anim_start_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -/* - * lvgl extension definition for: - * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) - */ - -static mp_obj_t mp_lv_obj_set_flex_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_flex_align_t main_place = (int)mp_obj_get_int(mp_args[1]); - lv_flex_align_t cross_place = (int)mp_obj_get_int(mp_args[2]); - lv_flex_align_t track_cross_place = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_func_ptr)(obj, main_place, cross_place, track_cross_place); - return mp_const_none; -} - - +static void lv_anim_t_start_cb_callback(lv_anim_t *); +static void lv_anim_t_completed_cb_callback(lv_anim_t *); +static void lv_anim_t_deleted_cb_callback(lv_anim_t *); +#define funcptr_lv_anim_get_value_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_align_mpobj, 4, mp_lv_obj_set_flex_align, lv_obj_set_flex_align); - /* * lvgl extension definition for: - * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_obj_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_get_value_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint8_t grow = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint8_t))lv_func_ptr)(obj, grow); - return mp_const_none; + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_anim_t *))lv_func_ptr)(arg0); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_grow_mpobj, 2, mp_lv_obj_set_flex_grow, lv_obj_set_flex_grow); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_get_value_cb_t_mpobj, 1, mp_funcptr_lv_anim_get_value_cb_t, funcptr_lv_anim_get_value_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); +static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); +typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * Array convertors for int32_t [] + * Struct lv_anim_bezier3_para_t */ -GENMPY_UNUSED static int32_t *mp_arr_to_int32_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - int32_t *lv_arr = (int32_t*)m_malloc(len * sizeof(int32_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (int32_t)mp_obj_get_int(item); - } - return (int32_t *)lv_arr; -} +static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void); -GENMPY_UNUSED static mp_obj_t mp_arr_from_int32_t_____(const int32_t *arr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_bezier3_para_t(mp_obj_t self_in) { - return mp_array_from_i32ptr((void*)arr); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_bezier3_para_t_type())); + return (lv_anim_bezier3_para_t*)self->data; } +#define mp_write_lv_anim_bezier3_para_t(struct_obj) *((lv_anim_bezier3_para_t*)mp_write_ptr_lv_anim_bezier3_para_t(struct_obj)) -/* - * lvgl extension definition for: - * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) - */ - -static mp_obj_t mp_lv_obj_set_grid_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_bezier3_para_t(void *field) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const int32_t *col_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[1]); - const int32_t *row_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); - ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_func_ptr)(obj, col_dsc, row_dsc); - return mp_const_none; + return lv_to_mp_struct(get_mp_lv_anim_bezier3_para_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_dsc_array_mpobj, 3, mp_lv_obj_set_grid_dsc_array, lv_obj_set_grid_dsc_array); - - -/* - * lvgl extension definition for: - * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) - */ +#define mp_read_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) +#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) -static mp_obj_t mp_lv_obj_set_grid_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); - lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_func_ptr)(obj, column_align, row_align); - return mp_const_none; -} - - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_align_mpobj, 3, mp_lv_obj_set_grid_align, lv_obj_set_grid_align); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int16_t; + case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int16_t; + case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int16_t; + case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_x1: data->x1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_y1: data->y1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_x2: data->x2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_y2: data->y2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_obj_set_grid_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_anim_bezier3_para_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); - int32_t col_pos = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t col_span = (int32_t)mp_obj_get_int(mp_args[3]); - lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[4]); - int32_t row_pos = (int32_t)mp_obj_get_int(mp_args[5]); - int32_t row_span = (int32_t)mp_obj_get_int(mp_args[6]); - ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_func_ptr)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); - return mp_const_none; + mp_printf(print, "struct lv_anim_bezier3_para_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_cell_mpobj, 7, mp_lv_obj_set_grid_cell, lv_obj_set_grid_cell); - -/* Reusing lv_obj_move_foreground for lv_obj_delete */ +static const mp_obj_dict_t mp_lv_anim_bezier3_para_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete); - -/* Reusing lv_obj_move_foreground for lv_obj_clean */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_anim_bezier3_para_t_type, + MP_QSTR_lv_anim_bezier3_para_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_anim_bezier3_para_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_anim_bezier3_para_t_attr, + locals_dict, &mp_lv_anim_bezier3_para_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_clean_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_clean); +static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void) +{ + return &mp_lv_anim_bezier3_para_t_type; +} /* - * lvgl extension definition for: - * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) + * Struct lv_anim_parameter_t */ -static mp_obj_t mp_lv_obj_delete_delayed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_parameter_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t delay_ms = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, delay_ms); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_parameter_t_type())); + return (lv_anim_parameter_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_delayed_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_delete_delayed); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_obj_delete_anim_completed_cb */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_delete_anim_completed_cb_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_obj_delete_anim_completed_cb); - -/* Reusing lv_obj_move_foreground for lv_obj_delete_async */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_async_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete_async); - - -/* - * lvgl extension definition for: - * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) - */ +#define mp_write_lv_anim_parameter_t(struct_obj) *((lv_anim_parameter_t*)mp_write_ptr_lv_anim_parameter_t(struct_obj)) -static mp_obj_t mp_lv_obj_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_parameter_t(void *field) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_obj_t *parent = mp_to_lv(mp_args[1]); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(obj, parent); - return mp_const_none; + return lv_to_mp_struct(get_mp_lv_anim_parameter_t_type(), field); } - +#define mp_read_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(copy_buffer(&field, sizeof(lv_anim_parameter_t))) +#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_parent_mpobj, 2, mp_lv_obj_set_parent, lv_obj_set_parent); - -/* Reusing lv_obj_set_parent for lv_obj_swap */ +static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_anim_parameter_t *data = (lv_anim_parameter_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_swap_mpobj, 2, mp_lv_obj_set_parent, lv_obj_swap); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_bezier3: dest[0] = mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); break; // converting from lv_anim_bezier3_para_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_bezier3: data->bezier3 = mp_write_lv_anim_bezier3_para_t(dest[1]); break; // converting to lv_anim_bezier3_para_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_obj_move_to_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_anim_parameter_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t index = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, index); - return mp_const_none; + mp_printf(print, "struct lv_anim_parameter_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_index_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_move_to_index); - +static const mp_obj_dict_t mp_lv_anim_parameter_t_locals_dict; -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_anim_parameter_t_type, + MP_QSTR_lv_anim_parameter_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_anim_parameter_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_anim_parameter_t_attr, + locals_dict, &mp_lv_anim_parameter_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_obj_get_screen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return lv_to_mp((void*)_res); + return &mp_lv_anim_parameter_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_screen_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_screen); -#define funcptr_lv_display_flush_cb_t NULL - /* - * lvgl extension definition for: - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) + * Struct lv_anim_t */ -static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_t(mp_obj_t self_in) { - lv_display_t *disp = mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); - ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_t_type())); + return (lv_anim_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); -#define funcptr_lv_display_flush_wait_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_display_flush_wait_cb_t(lv_display_t *disp) - */ +#define mp_write_lv_anim_t(struct_obj) *((lv_anim_t*)mp_write_ptr_lv_anim_t(struct_obj)) -static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_t(void *field) { - lv_display_t *disp = mp_to_ptr(mp_args[0]); - ((void (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_const_none; + return lv_to_mp_struct(get_mp_lv_anim_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); - -/* - * Array convertors for lv_area_t [32] - */ +#define mp_read_lv_anim_t(field) mp_read_ptr_lv_anim_t(copy_buffer(&field, sizeof(lv_anim_t))) +#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) -GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t___32__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_area_t(item); - } - return (lv_area_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t___32__(lv_area_t *arr) -{ - mp_obj_t obj_arr[32]; - for (size_t i=0; i<32; i++){ - obj_arr[i] = mp_read_lv_area_t(arr[i]); - } - return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! -} - - -/* - * Array convertors for uint8_t [32] - */ - -GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t___32__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (uint8_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t___32__(uint8_t *arr) -{ - mp_obj_t obj_arr[32]; - for (size_t i=0; i<32; i++){ - obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); - } - return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! -} - - -/* - * Struct lv_ll_t - */ - -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); - return (lv_ll_t*)self->data; -} - -#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); -} - -#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) -#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) - -static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_anim_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; + GENMPY_UNUSED lv_anim_t *data = (lv_anim_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; - case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; - case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; + case MP_QSTR_var: dest[0] = ptr_to_mp((void*)data->var); break; // converting from void *; + case MP_QSTR_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, data->exec_cb, NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL); break; // converting from callback lv_anim_exec_xcb_t; + case MP_QSTR_custom_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, data->user_data); break; // converting from callback lv_anim_custom_exec_cb_t; + case MP_QSTR_start_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->start_cb, lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, data->user_data); break; // converting from callback lv_anim_start_cb_t; + case MP_QSTR_completed_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->completed_cb, lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, data->user_data); break; // converting from callback lv_anim_completed_cb_t; + case MP_QSTR_deleted_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->deleted_cb, lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, data->user_data); break; // converting from callback lv_anim_deleted_cb_t; + case MP_QSTR_get_value_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->get_value_cb, lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, data->user_data); break; // converting from callback lv_anim_get_value_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, data->user_data); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_start_value: dest[0] = mp_obj_new_int(data->start_value); break; // converting from int32_t; + case MP_QSTR_current_value: dest[0] = mp_obj_new_int(data->current_value); break; // converting from int32_t; + case MP_QSTR_end_value: dest[0] = mp_obj_new_int(data->end_value); break; // converting from int32_t; + case MP_QSTR_duration: dest[0] = mp_obj_new_int(data->duration); break; // converting from int32_t; + case MP_QSTR_act_time: dest[0] = mp_obj_new_int(data->act_time); break; // converting from int32_t; + case MP_QSTR_reverse_delay: dest[0] = mp_obj_new_int_from_uint(data->reverse_delay); break; // converting from uint32_t; + case MP_QSTR_reverse_duration: dest[0] = mp_obj_new_int_from_uint(data->reverse_duration); break; // converting from uint32_t; + case MP_QSTR_repeat_delay: dest[0] = mp_obj_new_int_from_uint(data->repeat_delay); break; // converting from uint32_t; + case MP_QSTR_repeat_cnt: dest[0] = mp_obj_new_int_from_uint(data->repeat_cnt); break; // converting from uint32_t; + case MP_QSTR_parameter: dest[0] = mp_read_byref_lv_anim_parameter_t(data->parameter); break; // converting from lv_anim_parameter_t; + case MP_QSTR_last_timer_run: dest[0] = mp_obj_new_int_from_uint(data->last_timer_run); break; // converting from uint32_t; + case MP_QSTR_pause_time: dest[0] = mp_obj_new_int_from_uint(data->pause_time); break; // converting from uint32_t; + case MP_QSTR_pause_duration: dest[0] = mp_obj_new_int_from_uint(data->pause_duration); break; // converting from uint32_t; + case MP_QSTR_is_paused: dest[0] = mp_obj_new_int_from_uint(data->is_paused); break; // converting from uint8_t; + case MP_QSTR_reverse_play_in_progress: dest[0] = mp_obj_new_int_from_uint(data->reverse_play_in_progress); break; // converting from uint8_t; + case MP_QSTR_run_round: dest[0] = mp_obj_new_int_from_uint(data->run_round); break; // converting from uint8_t; + case MP_QSTR_start_cb_called: dest[0] = mp_obj_new_int_from_uint(data->start_cb_called); break; // converting from uint8_t; + case MP_QSTR_early_apply: dest[0] = mp_obj_new_int_from_uint(data->early_apply); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -10652,9 +10618,33 @@ static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; - case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; + case MP_QSTR_var: data->var = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_exec_cb: data->exec_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_exec_xcb_t; + case MP_QSTR_custom_exec_cb: data->custom_exec_cb = mp_lv_callback(dest[1], lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_custom_exec_cb_t; + case MP_QSTR_start_cb: data->start_cb = mp_lv_callback(dest[1], lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_start_cb_t; + case MP_QSTR_completed_cb: data->completed_cb = mp_lv_callback(dest[1], lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_completed_cb_t; + case MP_QSTR_deleted_cb: data->deleted_cb = mp_lv_callback(dest[1], lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_deleted_cb_t; + case MP_QSTR_get_value_cb: data->get_value_cb = mp_lv_callback(dest[1], lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_get_value_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_start_value: data->start_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_current_value: data->current_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_end_value: data->end_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_duration: data->duration = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_act_time: data->act_time = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_reverse_delay: data->reverse_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_reverse_duration: data->reverse_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_repeat_delay: data->repeat_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_repeat_cnt: data->repeat_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_parameter: data->parameter = mp_write_lv_anim_parameter_t(dest[1]); break; // converting to lv_anim_parameter_t; + case MP_QSTR_last_timer_run: data->last_timer_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pause_time: data->pause_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pause_duration: data->pause_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_is_paused: data->is_paused = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_reverse_play_in_progress: data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_run_round: data->run_round = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_start_cb_called: data->start_cb_called = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_early_apply: data->early_apply = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -10663,171 +10653,114 @@ static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_ll_t_print(const mp_print_t *print, +static void mp_lv_anim_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_ll_t"); + mp_printf(print, "struct lv_anim_t"); } -static const mp_obj_dict_t mp_lv_ll_t_locals_dict; +static const mp_obj_dict_t mp_lv_anim_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_ll_t_type, - MP_QSTR_lv_ll_t, + mp_lv_anim_t_type, + MP_QSTR_lv_anim_t, MP_TYPE_FLAG_NONE, - print, mp_lv_ll_t_print, + print, mp_lv_anim_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_ll_t_attr, - locals_dict, &mp_lv_ll_t_locals_dict, + attr, mp_lv_anim_t_attr, + locals_dict, &mp_lv_anim_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) -{ - return &mp_lv_ll_t_type; -} - -#define funcptr_dispatch_cb NULL - - -/* - * lvgl extension definition for: - * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ - -static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_layer_t *layer = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); - return mp_obj_new_int(_res); + return &mp_lv_anim_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' - * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ -#define funcptr_evaluate_cb NULL - /* * lvgl extension definition for: - * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + * inline static const lv_anim_t *lv_obj_get_style_anim_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_anim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_draw_task_t *task = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_anim_t * _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' - * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_internal_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim_internal); -#define funcptr_wait_for_finish_cb NULL - /* * lvgl extension definition for: - * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + * inline static uint32_t lv_obj_get_style_anim_duration_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_anim_duration_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' - * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration_internal); /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' - * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_style_transition_dsc_t_path_xcb_callback' + * lv_anim_path_cb_t path_xcb */ -#define funcptr_event_cb NULL - /* - * Struct lv_event_t + * Struct lv_style_transition_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_transition_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); - return (lv_event_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_transition_dsc_t_type())); + return (lv_style_transition_dsc_t*)self->data; } -#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) +#define mp_write_lv_style_transition_dsc_t(struct_obj) *((lv_style_transition_dsc_t*)mp_write_ptr_lv_style_transition_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_transition_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_event_t_type(), field); + return lv_to_mp_struct(get_mp_lv_style_transition_dsc_t_type(), field); } -#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) -#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) +#define mp_read_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) +#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) -static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; + GENMPY_UNUSED lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; - case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; - case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; + case MP_QSTR_props: dest[0] = ptr_to_mp((void*)data->props); break; // converting from lv_style_prop_t *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; - case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; - case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; - case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; - case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; - case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; + case MP_QSTR_path_xcb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_xcb, NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint32_t; + case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -10836,16 +10769,11 @@ static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; + case MP_QSTR_props: data->props = (void*)mp_to_ptr(dest[1]); break; // converting to lv_style_prop_t *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; - case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_path_xcb: data->path_xcb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_time: data->time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_delay: data->delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -10854,1044 +10782,525 @@ static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_event_t_print(const mp_print_t *print, +static void mp_lv_style_transition_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_event_t"); + mp_printf(print, "struct lv_style_transition_dsc_t"); } -static const mp_obj_dict_t mp_lv_event_t_locals_dict; +static const mp_obj_dict_t mp_lv_style_transition_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_event_t_type, - MP_QSTR_lv_event_t, + mp_lv_style_transition_dsc_t_type, + MP_QSTR_lv_style_transition_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_event_t_print, + print, mp_lv_style_transition_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_event_t_attr, - locals_dict, &mp_lv_event_t_locals_dict, + attr, mp_lv_style_transition_dsc_t_attr, + locals_dict, &mp_lv_style_transition_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void) { - return &mp_lv_event_t_type; + return &mp_lv_style_transition_dsc_t_type; } /* * lvgl extension definition for: - * void event_cb(lv_event_t *event) + * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition_internal(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_transition_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); - ((void (*)(lv_event_t *))lv_func_ptr)(event); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_style_transition_dsc_t * _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_internal_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition_internal); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' - * void (*event_cb)(lv_event_t *event) + * lvgl extension definition for: + * inline static lv_blend_mode_t lv_obj_get_style_blend_mode_internal(const lv_obj_t *obj, lv_part_t part) */ + +static mp_obj_t mp_lv_obj_get_style_blend_mode_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_blend_mode_t _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_internal_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode_internal); /* - * Struct lv_draw_unit_t + * lvgl extension definition for: + * inline static uint16_t lv_obj_get_style_layout_internal(const lv_obj_t *obj, lv_part_t part) */ -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_get_style_layout_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); - return (lv_draw_unit_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint16_t _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); } -#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_internal_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout_internal); + + +/* + * lvgl extension definition for: + * inline static lv_base_dir_t lv_obj_get_style_base_dir_internal(const lv_obj_t *obj, lv_part_t part) + */ + +static mp_obj_t mp_lv_obj_get_style_base_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_base_dir_t _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) -#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) + -static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_internal_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir_internal); + +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src_internal */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; - case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src_internal); + +/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity_internal */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity_internal); + -static void mp_lv_draw_unit_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +/* + * lvgl extension definition for: + * inline static lv_flex_flow_t lv_obj_get_style_flex_flow_internal(const lv_obj_t *obj, lv_part_t part) + */ + +static mp_obj_t mp_lv_obj_get_style_flex_flow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_draw_unit_t"); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_flex_flow_t _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_unit_t_type, - MP_QSTR_lv_draw_unit_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_unit_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_unit_t_attr, - locals_dict, &mp_lv_draw_unit_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_internal_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow_internal); + -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) +/* + * lvgl extension definition for: + * inline static lv_flex_align_t lv_obj_get_style_flex_main_place_internal(const lv_obj_t *obj, lv_part_t part) + */ + +static mp_obj_t mp_lv_obj_get_style_flex_main_place_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_draw_unit_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_flex_align_t _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place_internal); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place_internal); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place_internal); /* - * Struct lv_draw_task_t + * lvgl extension definition for: + * inline static uint8_t lv_obj_get_style_flex_grow_internal(const lv_obj_t *obj, lv_part_t part) */ -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_get_style_flex_grow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); - return (lv_draw_task_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint8_t _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); } -#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_internal_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow_internal); + + +/* + * lvgl extension definition for: + * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) + */ + +static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const int32_t * _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_array_from_i32ptr((void*)_res); } -#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) -#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) + -static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array_internal); + + +/* + * lvgl extension definition for: + * inline static lv_grid_align_t lv_obj_get_style_grid_column_align_internal(const lv_obj_t *obj, lv_part_t part) + */ + +static mp_obj_t mp_lv_obj_get_style_grid_column_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_grid_align_t _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; - case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; - case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; - case MP_QSTR_clip_area_original: dest[0] = mp_read_byref_lv_area_t(data->clip_area_original); break; // converting from lv_area_t; - case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; - case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; - case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; - case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; - case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; - case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_clip_area_original: data->clip_area_original = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align_internal); + +/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array_internal */ -static void mp_lv_draw_task_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_draw_task_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array_internal); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align_internal */ -static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos_internal */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_task_t_type, - MP_QSTR_lv_draw_task_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_task_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_task_t_attr, - locals_dict, &mp_lv_draw_task_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos_internal); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align_internal */ -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) -{ - return &mp_lv_draw_task_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align_internal); +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span_internal */ -/* - * Struct lv_color32_t - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos_internal */ -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos_internal); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align_internal */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); - return (lv_color32_t*)self->data; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span_internal */ -#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span_internal); + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) +/* + * lvgl extension definition for: + * inline static lv_text_align_t lv_obj_calculate_style_text_align_internal(const lv_obj_t *obj, lv_part_t part, const char *txt) + */ + +static mp_obj_t mp_lv_obj_calculate_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); + return mp_obj_new_int(_res); } -#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) -#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) + -static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_internal_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left_internal */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; - case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right_internal */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top_internal */ -static void mp_lv_color32_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_color32_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom_internal */ -static const mp_obj_dict_t mp_lv_color32_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe_internal */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color32_t_type, - MP_QSTR_lv_color32_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_color32_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_color32_t_attr, - locals_dict, &mp_lv_color32_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe_internal); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe_internal */ -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) -{ - return &mp_lv_color32_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe_internal); /* - * Struct lv_layer_t + * lvgl extension definition for: + * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) */ -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); - return (lv_layer_t*)self->data; -} - -#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) +static mp_obj_t mp_lv_obj_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_flex_flow_t flow = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_func_ptr)(obj, flow); + return mp_const_none; } -#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) -#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) - -static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; + - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_draw_buf: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; - case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; - case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; - case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; - case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; - case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_flow_mpobj, 2, mp_lv_obj_set_flex_flow, lv_obj_set_flex_flow); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) + */ -static void mp_lv_layer_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_set_flex_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_layer_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_flex_align_t main_place = (int)mp_obj_get_int(mp_args[1]); + lv_flex_align_t cross_place = (int)mp_obj_get_int(mp_args[2]); + lv_flex_align_t track_cross_place = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_func_ptr)(obj, main_place, cross_place, track_cross_place); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_layer_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_layer_t_type, - MP_QSTR_lv_layer_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_layer_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_layer_t_attr, - locals_dict, &mp_lv_layer_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) -{ - return &mp_lv_layer_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_align_mpobj, 4, mp_lv_obj_set_flex_align, lv_obj_set_flex_align); -#define funcptr_layer_init NULL - /* * lvgl extension definition for: - * void layer_init(lv_display_t *disp, lv_layer_t *layer) + * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) */ -static mp_obj_t mp_funcptr_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_to_ptr(mp_args[0]); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_layer_t *))lv_func_ptr)(disp, layer); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint8_t grow = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint8_t))lv_func_ptr)(obj, grow); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_layer_init_mpobj, 2, mp_funcptr_layer_init, funcptr_layer_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_grow_mpobj, 2, mp_lv_obj_set_flex_grow, lv_obj_set_flex_grow); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_layer_init(void *func){ return mp_lv_funcptr(&mp_funcptr_layer_init_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_layer_init_callback(lv_display_t *disp, lv_layer_t *layer); -static void lv_display_t_layer_deinit_callback(lv_display_t *disp, lv_layer_t *layer); /* - * Struct lv_array_t + * Array convertors for int32_t [] */ -static inline const mp_obj_type_t *get_mp_lv_array_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_array_t(mp_obj_t self_in) +GENMPY_UNUSED static int32_t *mp_arr_to_int32_t_____(mp_obj_t mp_arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_array_t_type())); - return (lv_array_t*)self->data; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + int32_t *lv_arr = (int32_t*)m_malloc(len * sizeof(int32_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (int32_t)mp_obj_get_int(item); + } + return (int32_t *)lv_arr; } -#define mp_write_lv_array_t(struct_obj) *((lv_array_t*)mp_write_ptr_lv_array_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_array_t(void *field) +GENMPY_UNUSED static mp_obj_t mp_arr_from_int32_t_____(const int32_t *arr) { - return lv_to_mp_struct(get_mp_lv_array_t_type(), field); + return mp_array_from_i32ptr((void*)arr); } -#define mp_read_lv_array_t(field) mp_read_ptr_lv_array_t(copy_buffer(&field, sizeof(lv_array_t))) -#define mp_read_byref_lv_array_t(field) mp_read_ptr_lv_array_t(&field) - -static void mp_lv_array_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_array_t *data = (lv_array_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; - case MP_QSTR_capacity: dest[0] = mp_obj_new_int_from_uint(data->capacity); break; // converting from uint32_t; - case MP_QSTR_element_size: dest[0] = mp_obj_new_int_from_uint(data->element_size); break; // converting from uint32_t; - case MP_QSTR_inner_alloc: dest[0] = convert_to_bool(data->inner_alloc); break; // converting from bool; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; - case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_capacity: data->capacity = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_element_size: data->element_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_inner_alloc: data->inner_alloc = mp_obj_is_true(dest[1]); break; // converting to bool; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) + */ -static void mp_lv_array_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_set_grid_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_array_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const int32_t *col_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[1]); + const int32_t *row_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); + ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_func_ptr)(obj, col_dsc, row_dsc); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_array_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_array_t_type, - MP_QSTR_lv_array_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_array_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_array_t_attr, - locals_dict, &mp_lv_array_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_array_t_type(void) -{ - return &mp_lv_array_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_dsc_array_mpobj, 3, mp_lv_obj_set_grid_dsc_array, lv_obj_set_grid_dsc_array); /* - * Struct lv_event_list_t + * lvgl extension definition for: + * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) */ -static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_list_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_set_grid_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_list_t_type())); - return (lv_event_list_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); + lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_func_ptr)(obj, column_align, row_align); + return mp_const_none; } -#define mp_write_lv_event_list_t(struct_obj) *((lv_event_list_t*)mp_write_ptr_lv_event_list_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_list_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_align_mpobj, 3, mp_lv_obj_set_grid_align, lv_obj_set_grid_align); + + +/* + * lvgl extension definition for: + * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) + */ + +static mp_obj_t mp_lv_obj_set_grid_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_event_list_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); + int32_t col_pos = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t col_span = (int32_t)mp_obj_get_int(mp_args[3]); + lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[4]); + int32_t row_pos = (int32_t)mp_obj_get_int(mp_args[5]); + int32_t row_span = (int32_t)mp_obj_get_int(mp_args[6]); + ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_func_ptr)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); + return mp_const_none; } -#define mp_read_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(copy_buffer(&field, sizeof(lv_event_list_t))) -#define mp_read_byref_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(&field) + -static void mp_lv_event_list_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_event_list_t *data = (lv_event_list_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_cell_mpobj, 7, mp_lv_obj_set_grid_cell, lv_obj_set_grid_cell); + +/* Reusing lv_obj_move_foreground for lv_obj_delete */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_array: dest[0] = mp_read_byref_lv_array_t(data->array); break; // converting from lv_array_t; - case MP_QSTR_is_traversing: dest[0] = mp_obj_new_int_from_uint(data->is_traversing); break; // converting from uint8_t; - case MP_QSTR_has_marked_deleting: dest[0] = mp_obj_new_int_from_uint(data->has_marked_deleting); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_array: data->array = mp_write_lv_array_t(dest[1]); break; // converting to lv_array_t; - case MP_QSTR_is_traversing: data->is_traversing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_has_marked_deleting: data->has_marked_deleting = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete); + +/* Reusing lv_obj_move_foreground for lv_obj_clean */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_clean_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_clean); + -static void mp_lv_event_list_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +/* + * lvgl extension definition for: + * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) + */ + +static mp_obj_t mp_lv_obj_delete_delayed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_event_list_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t delay_ms = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, delay_ms); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_event_list_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_event_list_t_type, - MP_QSTR_lv_event_list_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_event_list_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_event_list_t_attr, - locals_dict, &mp_lv_event_list_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_delayed_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_delete_delayed); + +/* Reusing funcptr_lv_anim_start_cb_t for lv_obj_delete_anim_completed_cb */ -static inline const mp_obj_type_t *get_mp_lv_event_list_t_type(void) -{ - return &mp_lv_event_list_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_delete_anim_completed_cb_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_obj_delete_anim_completed_cb); -#define funcptr_lv_theme_apply_cb_t NULL +/* Reusing lv_obj_move_foreground for lv_obj_delete_async */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_async_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete_async); + /* * lvgl extension definition for: - * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) + * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) */ -static mp_obj_t mp_funcptr_lv_theme_apply_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *arg0 = mp_to_ptr(mp_args[0]); - lv_obj_t *arg1 = mp_to_lv(mp_args[1]); - ((void (*)(lv_theme_t *, lv_obj_t *))lv_func_ptr)(arg0, arg1); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *parent = mp_to_lv(mp_args[1]); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(obj, parent); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_theme_apply_cb_t_mpobj, 2, mp_funcptr_lv_theme_apply_cb_t, funcptr_lv_theme_apply_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_parent_mpobj, 2, mp_lv_obj_set_parent, lv_obj_set_parent); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_theme_apply_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_set_parent for lv_obj_swap */ -static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_swap_mpobj, 2, mp_lv_obj_set_parent, lv_obj_swap); + /* - * Struct lv_theme_t + * lvgl extension definition for: + * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) */ -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_move_to_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); - return (lv_theme_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t index = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, index); + return mp_const_none; } -#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); -} - -#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) -#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) - -static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; - case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; - case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; - case MP_QSTR_font_small: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_small); break; // converting from lv_font_t *; - case MP_QSTR_font_normal: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_normal); break; // converting from lv_font_t *; - case MP_QSTR_font_large: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_large); break; // converting from lv_font_t *; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_font_small: data->font_small = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_normal: data->font_normal = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_large: data->font_large = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_theme_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_theme_t"); -} - -static const mp_obj_dict_t mp_lv_theme_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_theme_t_type, - MP_QSTR_lv_theme_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_theme_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_theme_t_attr, - locals_dict, &mp_lv_theme_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) -{ - return &mp_lv_theme_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_index_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_move_to_index); -#define funcptr_lv_timer_cb_t NULL - /* * lvgl extension definition for: - * void lv_timer_cb_t(lv_timer_t *) + * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_screen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); - ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_timer_t_timer_cb_callback(lv_timer_t *); - -/* - * Struct lv_timer_t - */ - -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); - return (lv_timer_t*)self->data; -} - -#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); -} - -#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) -#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) - -static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; - case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; - case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; - case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; - case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_timer_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_timer_t"); -} - -static const mp_obj_dict_t mp_lv_timer_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_timer_t_type, - MP_QSTR_lv_timer_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_timer_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_timer_t_attr, - locals_dict, &mp_lv_timer_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) -{ - return &mp_lv_timer_t_type; -} - - -/* - * Struct lv_display_t - */ - -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); - return (lv_display_t*)self->data; -} - -#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_display_t_type(), field); -} - -#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) -#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) - -static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; - case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; - case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; - case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; - case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; - case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; - case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; - case MP_QSTR_buf_1: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_1); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_2: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_2); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_3: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_3); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_act: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_act); break; // converting from lv_draw_buf_t *; - case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; - case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; - case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; - case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; - case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; - case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; - case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; - case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; - case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; - case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; - case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; - case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; - case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; - case MP_QSTR__static_buf1: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf1); break; // converting from lv_draw_buf_t; - case MP_QSTR__static_buf2: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf2); break; // converting from lv_draw_buf_t; - case MP_QSTR_layer_head: dest[0] = mp_read_ptr_lv_layer_t((void*)data->layer_head); break; // converting from lv_layer_t *; - case MP_QSTR_layer_init: dest[0] = mp_lv_funcptr(&mp_funcptr_layer_init_mpobj, (void*)data->layer_init, lv_display_t_layer_init_callback ,MP_QSTR_lv_display_t_layer_init, data->user_data); break; // converting from callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_layer_deinit: dest[0] = mp_lv_funcptr(&mp_funcptr_layer_init_mpobj, (void*)data->layer_deinit, lv_display_t_layer_deinit_callback ,MP_QSTR_lv_display_t_layer_deinit, data->user_data); break; // converting from callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; - case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; - case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; - case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; - case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; - case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; - case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; - case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; - case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; - case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; - case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; - case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; - case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; - case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; - case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; - case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; - case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_buf_1: data->buf_1 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_2: data->buf_2 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_3: data->buf_3 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_act: data->buf_act = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; - case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; - case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; - case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; - case MP_QSTR__static_buf1: data->_static_buf1 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; - case MP_QSTR__static_buf2: data->_static_buf2 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; - case MP_QSTR_layer_head: data->layer_head = (void*)mp_write_ptr_lv_layer_t(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_layer_init: data->layer_init = (void*)mp_lv_callback(dest[1], lv_display_t_layer_init_callback ,MP_QSTR_lv_display_t_layer_init, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_layer_deinit: data->layer_deinit = (void*)mp_lv_callback(dest[1], lv_display_t_layer_deinit_callback ,MP_QSTR_lv_display_t_layer_deinit, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_display_t *disp, lv_layer_t *layer); - case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; - case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; - case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; - case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_display_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_display_t"); -} - -static const mp_obj_dict_t mp_lv_display_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_display_t_type, - MP_QSTR_lv_display_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_display_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_display_t_attr, - locals_dict, &mp_lv_display_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) -{ - return &mp_lv_display_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_screen_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_screen); /* @@ -12575,6 +11984,14 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_width_mpobj, 1 static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_height); +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_width_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_width_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_width_content); + +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_height_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_height_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_height_content); + /* Reusing lv_obj_refr_size for lv_obj_is_width_min */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_min); @@ -13077,15 +12494,15 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_snap_mpobj, 2, mp_lv_obj_ /* * lvgl extension definition for: - * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor, lv_area_t *ver) + * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) */ static mp_obj_t mp_lv_obj_get_scrollbar_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_area_t *hor = mp_write_ptr_lv_area_t(mp_args[1]); - lv_area_t *ver = mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor, ver); + lv_area_t *hor_area = mp_write_ptr_lv_area_t(mp_args[1]); + lv_area_t *ver_area = mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor_area, ver_area); return mp_const_none; } @@ -13287,30 +12704,30 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_style_mpobj, 3, mp_lv_ob /* * lvgl extension definition for: - * void lv_obj_style_set_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool dis) + * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) */ -static mp_obj_t mp_lv_obj_style_set_disabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool dis = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, dis); + bool en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_style_set_disabled, lv_obj_style_set_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_enabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_set_style_enabled); /* * lvgl extension definition for: - * bool lv_obj_style_get_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_style_get_disabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); @@ -13321,7 +12738,15 @@ static mp_obj_t mp_lv_obj_style_get_disabled(size_t mp_n_args, const mp_obj_t *m -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_style_get_disabled, lv_obj_style_get_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_enabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_get_style_enabled); + +/* Reusing lv_obj_set_style_enabled for lv_obj_style_set_disabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_style_set_disabled); + +/* Reusing lv_obj_get_style_enabled for lv_obj_style_get_disabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_style_get_disabled); /* @@ -13561,152 +12986,731 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_in_mpobj, 3, mp_lv_obj_fade static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_out_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_out); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_width */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y); + +/* Reusing lv_obj_get_style_align_internal for lv_obj_get_style_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered); + +/* Reusing lv_obj_get_style_bg_grad_dir_internal for lv_obj_get_style_bg_grad_dir */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa); + +/* Reusing lv_obj_get_style_bg_grad_internal for lv_obj_get_style_bg_grad */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad); + +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bg_image_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_bg_image_tiled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width); + +/* Reusing lv_obj_get_style_border_side_internal for lv_obj_get_style_border_side */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_min_width */ +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_min_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_max_width */ +/* Reusing lv_obj_get_style_image_colorkey_internal for lv_obj_get_style_image_colorkey */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_max_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_min_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_min_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_max_height */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_max_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_length */ +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_length_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_length); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_x */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_y */ +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa); + +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa); + +/* Reusing lv_obj_get_style_text_font_internal for lv_obj_get_style_text_font */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space); + +/* Reusing lv_obj_get_style_text_decor_internal for lv_obj_get_style_text_decor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor); + +/* Reusing lv_obj_get_style_text_align_internal for lv_obj_get_style_text_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa); + +/* Reusing lv_obj_get_style_text_leading_trim_internal for lv_obj_get_style_text_leading_trim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop); + +/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_blur_quality */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa); + +/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset); + +/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered); + +/* Reusing lv_obj_get_style_color_filter_dsc_internal for lv_obj_get_style_color_filter_dsc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa); + +/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa); + +/* Reusing lv_obj_get_style_anim_internal for lv_obj_get_style_anim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim); + +/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_anim_duration */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration); + +/* Reusing lv_obj_get_style_transition_internal for lv_obj_get_style_transition */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition); + +/* Reusing lv_obj_get_style_blend_mode_internal for lv_obj_get_style_blend_mode */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode); + +/* Reusing lv_obj_get_style_layout_internal for lv_obj_get_style_layout */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout); + +/* Reusing lv_obj_get_style_base_dir_internal for lv_obj_get_style_base_dir */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir); + +/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src); + +/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity); + +/* Reusing lv_obj_get_style_flex_flow_internal for lv_obj_get_style_flex_flow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_main_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place); + +/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place); + +/* Reusing lv_obj_get_style_flex_grow_internal for lv_obj_get_style_flex_grow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow); + +/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_column_dsc_array */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_column_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align); + +/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos); + +/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span); /* * lvgl extension definition for: - * void lv_obj_set_style_align(lv_obj_t *obj, lv_align_t value, lv_style_selector_t selector) + * void lv_obj_set_style_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_set_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t value = (int)mp_obj_get_int(mp_args[1]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_align_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_align_mpobj, 3, mp_lv_obj_set_style_align, lv_obj_set_style_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_min_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_min_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_height */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_max_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_height_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_max_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_translate_x */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_translate_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_height); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_translate_y */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_min_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_translate_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_min_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_min_height); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_translate_radial */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_max_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_radial_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_translate_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_max_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_max_height); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_scale_x */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_length */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_scale_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_length_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_length); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_scale_y */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_scale_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_x); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_rotation */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_rotation_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_y); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_pivot_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_pivot_y */ +/* + * lvgl extension definition for: + * void lv_obj_set_style_align(lv_obj_t *obj, lv_align_t value, lv_style_selector_t selector) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_pivot_y); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_skew_x */ +static mp_obj_t mp_lv_obj_set_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_align_t value = (int)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_align_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_skew_x); - -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_transform_skew_y */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_transform_skew_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_align_mpobj, 3, mp_lv_obj_set_style_align, lv_obj_set_style_align); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_top */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_top_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_bottom */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_bottom_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_height_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_height); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_left */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_translate_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_left_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_translate_x); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_right */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_translate_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_right_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_translate_y); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_row */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_translate_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_row_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_row); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_translate_radial_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_translate_radial); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_column */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_scale_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_column_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_column); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale_x); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_pad_radial */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_scale_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_radial_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_pad_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale_y); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_top */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_top_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_rotation_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_rotation); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_bottom */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_bottom_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_pivot_x); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_left */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_pivot_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_left_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_pivot_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_pivot_y); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_margin_right */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_skew_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_right_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_margin_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_skew_x); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_skew_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_skew_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_skew_y); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_top_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_top); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_bottom_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_bottom); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_left_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_left); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_right_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_right); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_row */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_row_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_row); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_column */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_column_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_column); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_radial */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_radial_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_radial); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_top_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_top); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_bottom_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_bottom); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_left_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_left); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_right_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_right); /* @@ -13769,13 +13773,13 @@ static mp_obj_t mp_lv_obj_set_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_dir_mpobj, 3, mp_lv_obj_set_style_bg_grad_dir, lv_obj_set_style_bg_grad_dir); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_bg_main_stop */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_bg_main_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_main_stop_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_bg_main_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_main_stop_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_bg_main_stop); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_bg_grad_stop */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_bg_grad_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_stop_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_bg_grad_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_bg_grad_stop_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_bg_grad_stop); /* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_bg_main_opa */ @@ -13862,9 +13866,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_color_mpobj, 3, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_border_opa); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_border_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_border_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_border_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_border_width); /* @@ -13889,9 +13893,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_side_mpobj, 3, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_border_post_mpobj, 3, mp_lv_obj_set_style_bg_image_tiled, lv_obj_set_style_border_post); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_outline_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_outline_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_outline_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_outline_width); /* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_outline_color */ @@ -13901,25 +13905,25 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_color_mpobj, 3 static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_outline_opa); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_outline_pad */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_outline_pad */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_pad_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_outline_pad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_outline_pad_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_outline_pad); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_offset_x */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_offset_x); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_offset_y */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_offset_y); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_shadow_spread */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_spread_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_shadow_spread); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_shadow_spread_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_shadow_spread); /* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_shadow_color */ @@ -13960,17 +13964,17 @@ static mp_obj_t mp_lv_obj_set_style_image_colorkey(size_t mp_n_args, const mp_ob static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_image_colorkey_mpobj, 3, mp_lv_obj_set_style_image_colorkey, lv_obj_set_style_image_colorkey); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_line_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_line_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_line_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_line_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_line_dash_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_line_dash_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_line_dash_width); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_line_dash_gap */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_gap_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_line_dash_gap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_dash_gap_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_line_dash_gap); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_line_rounded */ @@ -13984,9 +13988,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_color_mpobj, 3, m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_line_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_line_opa); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_arc_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_arc_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_arc_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_arc_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_arc_width); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_arc_rounded */ @@ -14031,13 +14035,13 @@ static mp_obj_t mp_lv_obj_set_style_text_font(size_t mp_n_args, const mp_obj_t * static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_font_mpobj, 3, mp_lv_obj_set_style_text_font, lv_obj_set_style_text_font); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_text_letter_space */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_text_letter_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_letter_space_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_text_letter_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_letter_space_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_text_letter_space); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_text_line_space */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_text_line_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_line_space_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_text_line_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_line_space_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_text_line_space); /* @@ -14081,17 +14085,36 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_align_mpobj, 3, m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_color_mpobj, 3, mp_lv_obj_set_style_bg_color, lv_obj_set_style_text_outline_stroke_color); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_text_outline_stroke_width */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_text_outline_stroke_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_width_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_text_outline_stroke_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_width_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_text_outline_stroke_width); /* Reusing lv_obj_set_style_bg_opa for lv_obj_set_style_text_outline_stroke_opa */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_outline_stroke_opa_mpobj, 3, mp_lv_obj_set_style_bg_opa, lv_obj_set_style_text_outline_stroke_opa); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_blur_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_blur_radius_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_blur_radius); +/* + * lvgl extension definition for: + * void lv_obj_set_style_text_leading_trim(lv_obj_t *obj, lv_text_leading_trim_t value, lv_style_selector_t selector) + */ + +static mp_obj_t mp_lv_obj_set_style_text_leading_trim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_text_leading_trim_t value = (int)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_text_leading_trim_t, lv_style_selector_t))lv_func_ptr)(obj, value, selector); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_text_leading_trim_mpobj, 3, mp_lv_obj_set_style_text_leading_trim, lv_obj_set_style_text_leading_trim); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_blur_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_blur_radius_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_blur_radius); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_blur_backdrop */ @@ -14116,17 +14139,17 @@ static mp_obj_t mp_lv_obj_set_style_blur_quality(size_t mp_n_args, const mp_obj_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_blur_quality_mpobj, 3, mp_lv_obj_set_style_blur_quality, lv_obj_set_style_blur_quality); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_drop_shadow_radius */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_drop_shadow_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_radius_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_drop_shadow_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_radius_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_drop_shadow_radius); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_drop_shadow_offset_x */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_drop_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_drop_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_x_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_drop_shadow_offset_x); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_drop_shadow_offset_y */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_drop_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_offset_y_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_drop_shadow_offset_y); /* Reusing lv_obj_set_style_bg_color for lv_obj_set_style_drop_shadow_color */ @@ -14140,13 +14163,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_opa_mpobj, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_drop_shadow_quality_mpobj, 3, mp_lv_obj_set_style_blur_quality, lv_obj_set_style_drop_shadow_quality); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_radius */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radius_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radius_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_radius); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_radial_offset */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_radial_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radial_offset_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_radial_offset_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_radial_offset); /* Reusing lv_obj_set_style_bg_image_tiled for lv_obj_set_style_clip_corner */ @@ -14424,52 +14447,113 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_row_dsc_array_mpo static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_row_align_mpobj, 3, mp_lv_obj_set_style_grid_column_align, lv_obj_set_style_grid_row_align); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_column_pos */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_column_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_pos_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_column_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_pos_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_column_pos); /* Reusing lv_obj_set_style_grid_column_align for lv_obj_set_style_grid_cell_x_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_x_align_mpobj, 3, mp_lv_obj_set_style_grid_column_align, lv_obj_set_style_grid_cell_x_align); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_column_span */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_column_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_span_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_column_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_column_span_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_column_span); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_row_pos */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_row_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_pos_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_row_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_pos_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_row_pos); /* Reusing lv_obj_set_style_grid_column_align for lv_obj_set_style_grid_cell_y_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_y_align_mpobj, 3, mp_lv_obj_set_style_grid_column_align, lv_obj_set_style_grid_cell_y_align); -/* Reusing lv_obj_set_style_pad_all for lv_obj_set_style_grid_cell_row_span */ +/* Reusing lv_obj_set_style_width for lv_obj_set_style_grid_cell_row_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_span_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_grid_cell_row_span); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_all_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_all); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_hor_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_hor); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_ver_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_ver); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_all_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_all); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_hor_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_hor); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_margin_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_margin_ver_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_margin_ver); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_pad_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_grid_cell_row_span_mpobj, 3, mp_lv_obj_set_style_pad_all, lv_obj_set_style_grid_cell_row_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_pad_gap_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_pad_gap); /* * lvgl extension definition for: - * lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t *obj, lv_part_t part, const char *txt) + * void lv_obj_set_style_size(lv_obj_t *obj, int32_t width, int32_t height, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_calculate_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_style_selector_t))lv_func_ptr)(obj, width, height, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align, lv_obj_calculate_style_text_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_size_mpobj, 4, mp_lv_obj_set_style_size, lv_obj_set_style_size); + +/* Reusing lv_obj_set_style_width for lv_obj_set_style_transform_scale */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left); -/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_recursive */ +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_recursive); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom); + +/* Reusing lv_obj_calculate_style_text_align_internal for lv_obj_calculate_style_text_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe); + +/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe); + +/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_recursive */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_recursive); /* @@ -14709,6 +14793,34 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_observer_cb_t_mpobj, GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_observer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_observer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } static void lv_observer_t_cb_callback(lv_observer_t *observer, lv_subject_t *subject); +#define funcptr_user_cb NULL + + +/* + * lvgl extension definition for: + * void user_cb(void) + */ + +static mp_obj_t mp_funcptr_user_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + ((void (*)(void))lv_func_ptr)(); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_user_cb_mpobj, 0, mp_funcptr_user_cb, funcptr_user_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_user_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_user_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_observer_t_user_cb_callback' + * void (*user_cb)(void) + */ + /* * Struct lv_observer_t @@ -14745,6 +14857,7 @@ static void mp_lv_observer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) case MP_QSTR_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_observer_cb_t_mpobj, data->cb, lv_observer_t_cb_callback ,MP_QSTR_lv_observer_t_cb, data->user_data); break; // converting from callback lv_observer_cb_t; case MP_QSTR_target: dest[0] = ptr_to_mp((void*)data->target); break; // converting from void *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_user_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_user_cb_mpobj, (void*)data->user_cb, NULL ,MP_QSTR_lv_observer_t_user_cb, NULL); break; // converting from callback void (*)(void); case MP_QSTR_auto_free_user_data: dest[0] = mp_obj_new_int_from_uint(data->auto_free_user_data); break; // converting from uint32_t; case MP_QSTR_notified: dest[0] = mp_obj_new_int_from_uint(data->notified); break; // converting from uint32_t; case MP_QSTR_for_obj: dest[0] = mp_obj_new_int_from_uint(data->for_obj); break; // converting from uint32_t; @@ -14760,6 +14873,7 @@ static void mp_lv_observer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) case MP_QSTR_cb: data->cb = mp_lv_callback(dest[1], lv_observer_t_cb_callback ,MP_QSTR_lv_observer_t_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_observer_cb_t; case MP_QSTR_target: data->target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_user_cb: data->user_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_observer_t_user_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(void); case MP_QSTR_auto_free_user_data: data->auto_free_user_data = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; case MP_QSTR_notified: data->notified = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; case MP_QSTR_for_obj: data->for_obj = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; @@ -16044,6 +16158,10 @@ static mp_obj_t mp_lv_obj_init_draw_blur_dsc(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_init_draw_blur_dsc_mpobj, 3, mp_lv_obj_init_draw_blur_dsc, lv_obj_init_draw_blur_dsc); +/* Reusing lv_obj_move_to_index for lv_obj_set_ext_draw_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_draw_size_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_draw_size); + /* * lvgl extension definition for: @@ -16088,13 +16206,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_class_create_obj_mpobj, 2, mp_lv static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_class_init_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_class_init_obj); -/* Reusing lv_obj_refr_size for lv_obj_is_editable */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_editable */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_editable_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_editable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_editable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_editable); -/* Reusing lv_obj_refr_size for lv_obj_is_group_def */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_group_def */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_group_def_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_group_def); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_group_def_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_group_def); /* @@ -16445,6 +16563,124 @@ static mp_obj_t mp_lv_obj_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, vo static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flag_mpobj, 3, mp_lv_obj_set_flag, lv_obj_set_flag); +/* + * lvgl extension definition for: + * void lv_obj_set_hidden(lv_obj_t *obj, bool en) + */ + +static mp_obj_t mp_lv_obj_set_hidden(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + bool en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_obj_t *, bool))lv_func_ptr)(obj, en); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_hidden_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_hidden); + +/* Reusing lv_obj_set_hidden for lv_obj_set_clickable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_clickable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_clickable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_click_focusable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_click_focusable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_click_focusable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_checkable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_checkable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_checkable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scrollable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scrollable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_elastic */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_elastic_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_elastic); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_momentum */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_momentum_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_momentum); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_one */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_one_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_one); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_chain */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_chain_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_chain); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_chain_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_chain_hor_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_chain_hor); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_chain_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_chain_ver_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_chain_ver); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_on_focus */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_on_focus_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_on_focus); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scroll_with_arrow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_with_arrow_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scroll_with_arrow); + +/* Reusing lv_obj_set_hidden for lv_obj_set_snappable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_snappable_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_snappable); + +/* Reusing lv_obj_set_hidden for lv_obj_set_press_lock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_press_lock_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_press_lock); + +/* Reusing lv_obj_set_hidden for lv_obj_set_event_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_event_bubble_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_event_bubble); + +/* Reusing lv_obj_set_hidden for lv_obj_set_gesture_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_gesture_bubble_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_gesture_bubble); + +/* Reusing lv_obj_set_hidden for lv_obj_set_adv_hittest */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_adv_hittest_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_adv_hittest); + +/* Reusing lv_obj_set_hidden for lv_obj_set_ignore_layout */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ignore_layout_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_ignore_layout); + +/* Reusing lv_obj_set_hidden for lv_obj_set_floating */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_floating_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_floating); + +/* Reusing lv_obj_set_hidden for lv_obj_set_send_draw_task_events */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_send_draw_task_events_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_send_draw_task_events); + +/* Reusing lv_obj_set_hidden for lv_obj_set_overflow_visible */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_overflow_visible_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_overflow_visible); + +/* Reusing lv_obj_set_hidden for lv_obj_set_event_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_event_trickle_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_event_trickle); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_trickle_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_trickle); + +/* Reusing lv_obj_set_hidden for lv_obj_set_radio_button */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_radio_button_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_radio_button); + +/* Reusing lv_obj_set_hidden for lv_obj_set_flex_in_new_track */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_in_new_track_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_flex_in_new_track); + + /* * lvgl extension definition for: * void lv_obj_add_state(lv_obj_t *obj, lv_state_t state) @@ -16485,6 +16721,58 @@ static mp_obj_t mp_lv_obj_set_state(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_mpobj, 3, mp_lv_obj_set_state, lv_obj_set_state); +/* Reusing lv_obj_set_hidden for lv_obj_set_alt */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_alt_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_alt); + +/* Reusing lv_obj_set_hidden for lv_obj_set_checked */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_checked_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_checked); + +/* Reusing lv_obj_set_hidden for lv_obj_set_focused */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_focused_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_focused); + +/* Reusing lv_obj_set_hidden for lv_obj_set_focus_key */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_focus_key_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_focus_key); + +/* Reusing lv_obj_set_hidden for lv_obj_set_edited */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_edited_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_edited); + +/* Reusing lv_obj_set_hidden for lv_obj_set_hovered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_hovered_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_hovered); + +/* Reusing lv_obj_set_hidden for lv_obj_set_pressed */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pressed_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_pressed); + +/* Reusing lv_obj_set_hidden for lv_obj_set_scrolled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrolled_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_scrolled); + +/* Reusing lv_obj_set_hidden for lv_obj_set_disabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_disabled_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_disabled); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_1 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_1_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_1); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_2 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_2_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_2); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_3 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_3_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_3); + +/* Reusing lv_obj_set_hidden for lv_obj_set_state_user_4 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_state_user_4_mpobj, 2, mp_lv_obj_set_hidden, lv_obj_set_state_user_4); + /* * lvgl extension definition for: @@ -16506,20 +16794,21 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_user_data_mpobj, 2, mp_lv_ob /* * lvgl extension definition for: - * void lv_obj_set_radio_button(lv_obj_t *obj, bool en) + * void lv_obj_set_user_flag(lv_obj_t *obj, uint32_t bit, bool v) */ -static mp_obj_t mp_lv_obj_set_radio_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_user_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - bool en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_obj_t *, bool))lv_func_ptr)(obj, en); + uint32_t bit = (uint32_t)mp_obj_get_int(mp_args[1]); + bool v = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, bool))lv_func_ptr)(obj, bit, v); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_radio_button_mpobj, 2, mp_lv_obj_set_radio_button, lv_obj_set_radio_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_user_flag_mpobj, 3, mp_lv_obj_set_user_flag, lv_obj_set_user_flag); /* @@ -16543,6 +16832,106 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_flag_mpobj, 2, mp_lv_obj_has static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_flag_any_mpobj, 2, mp_lv_obj_has_flag, lv_obj_has_flag_any); +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_hidden */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_hidden_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_hidden); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_clickable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_clickable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_clickable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_click_focusable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_click_focusable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_click_focusable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_checkable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_checkable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_checkable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrollable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrollable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrollable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_elastic */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_elastic_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_elastic); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_momentum */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_momentum_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_momentum); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_one */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_one_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_one); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_chain_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_chain_hor_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_chain_hor); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_chain_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_chain_ver_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_chain_ver); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_on_focus */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_on_focus_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_on_focus); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scroll_with_arrow */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scroll_with_arrow_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scroll_with_arrow); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_snappable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_snappable_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_snappable); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_press_lock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_press_lock_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_press_lock); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_event_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_event_bubble_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_event_bubble); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_gesture_bubble */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_gesture_bubble_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_gesture_bubble); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_adv_hittest */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_adv_hittest_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_adv_hittest); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_ignore_layout */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_ignore_layout_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_ignore_layout); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_floating */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_floating_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_floating); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_send_draw_task_events */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_send_draw_task_events_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_send_draw_task_events); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_overflow_visible */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_overflow_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_overflow_visible); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_event_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_event_trickle_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_event_trickle); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_trickle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_trickle_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_trickle); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_radio_button */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_radio_button_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_radio_button); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_flex_in_new_track */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_flex_in_new_track_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_flex_in_new_track); + /* * lvgl extension definition for: @@ -16578,9 +16967,57 @@ static mp_obj_t mp_lv_obj_has_state(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_state_mpobj, 2, mp_lv_obj_has_state, lv_obj_has_state); -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_radio_button */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_alt */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_radio_button_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_radio_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_alt_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_alt); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_checked */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_checked_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_checked); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_focused */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_focused_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_focused); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_focus_key */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_focus_key_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_focus_key); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_edited */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_edited_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_edited); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_hovered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_hovered_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_hovered); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_pressed */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_pressed_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_pressed); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolled_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolled); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_disabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_disabled_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_disabled); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_1 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_1_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_1); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_2 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_2_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_2); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_3 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_3_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_3); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_state_user_4 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_state_user_4_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_state_user_4); #define funcptr_lv_group_focus_cb_t NULL @@ -16755,9 +17192,9 @@ static mp_obj_t mp_lv_obj_get_user_data(size_t mp_n_args, const mp_obj_t *mp_arg static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_user_data_mpobj, 1, mp_lv_obj_get_user_data, lv_obj_get_user_data); -/* Reusing lv_obj_move_foreground for lv_obj_allocate_spec_attr */ +/* Reusing lv_obj_remove_event for lv_obj_get_user_flag */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_allocate_spec_attr_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_allocate_spec_attr); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_user_flag_mpobj, 2, mp_lv_obj_remove_event, lv_obj_get_user_flag); /* @@ -16798,9 +17235,9 @@ static mp_obj_t mp_lv_obj_get_class(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_class_mpobj, 1, mp_lv_obj_get_class, lv_obj_get_class); -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_valid */ +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_in_widget_tree */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_valid_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_valid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_in_widget_tree_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_in_widget_tree); /* @@ -16820,6 +17257,135 @@ static mp_obj_t mp_lv_obj_null_on_delete(size_t mp_n_args, const mp_obj_t *mp_ar static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_null_on_delete_mpobj, 1, mp_lv_obj_null_on_delete, lv_obj_null_on_delete); +/* + * Struct lv_delete_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_delete_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_delete_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_delete_dsc_t_type())); + return (lv_delete_dsc_t*)self->data; +} + +#define mp_write_lv_delete_dsc_t(struct_obj) *((lv_delete_dsc_t*)mp_write_ptr_lv_delete_dsc_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_delete_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_delete_dsc_t_type(), field); +} + +#define mp_read_lv_delete_dsc_t(field) mp_read_ptr_lv_delete_dsc_t(copy_buffer(&field, sizeof(lv_delete_dsc_t))) +#define mp_read_byref_lv_delete_dsc_t(field) mp_read_ptr_lv_delete_dsc_t(&field) + +static void mp_lv_delete_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_delete_dsc_t *data = (lv_delete_dsc_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + ; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + ; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_delete_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_delete_dsc_t"); +} + +static const mp_obj_dict_t mp_lv_delete_dsc_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_delete_dsc_t_type, + MP_QSTR_lv_delete_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_delete_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_delete_dsc_t_attr, + locals_dict, &mp_lv_delete_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_delete_dsc_t_type(void) +{ + return &mp_lv_delete_dsc_t_type; +} + + +/* + * Callback function lv_obj_add_delete_cb_cb + * void lv_delete_cb_t(void *user_data) + */ + +GENMPY_UNUSED static void lv_obj_add_delete_cb_cb_callback(void *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_add_delete_cb_cb)), 1, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_delete_dsc_t *lv_obj_add_delete_cb(lv_obj_t *obj, lv_delete_cb_t cb, void *user_data) + */ + +static mp_obj_t mp_lv_obj_add_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + void *cb = mp_lv_callback(mp_args[1], &lv_obj_add_delete_cb_cb_callback, MP_QSTR_lv_obj_add_delete_cb_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_delete_dsc_t * _res = ((lv_delete_dsc_t *(*)(lv_obj_t *, lv_delete_cb_t, void *))lv_func_ptr)(obj, cb, user_data); + return mp_read_ptr_lv_delete_dsc_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_delete_cb_mpobj, 3, mp_lv_obj_add_delete_cb, lv_obj_add_delete_cb); + + +/* + * lvgl extension definition for: + * void lv_obj_remove_delete_cb(lv_delete_dsc_t *dsc) + */ + +static mp_obj_t mp_lv_obj_remove_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_delete_dsc_t *dsc = mp_write_ptr_lv_delete_dsc_t(mp_args[0]); + ((void (*)(lv_delete_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_remove_delete_cb_mpobj, 1, mp_lv_obj_remove_delete_cb, lv_obj_remove_delete_cb); + + /* * lvgl extension definition for: * void lv_obj_add_screen_load_event(lv_obj_t *obj, lv_event_code_t trigger, lv_obj_t *screen, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay) @@ -17089,24 +17655,6 @@ static mp_obj_t mp_lv_obj_add_play_timeline_event(size_t mp_n_args, const mp_obj static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_play_timeline_event_mpobj, 5, mp_lv_obj_add_play_timeline_event, lv_obj_add_play_timeline_event); -/* - * lvgl extension definition for: - * void lv_obj_redraw(lv_layer_t *layer, lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_redraw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - ((void (*)(lv_layer_t *, lv_obj_t *))lv_func_ptr)(layer, obj); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_redraw_mpobj, 2, mp_lv_obj_redraw, lv_obj_redraw); - - /* * lvgl extension definition for: * void lv_obj_remove_from_subject(lv_obj_t *obj, lv_subject_t *subject) @@ -17352,6 +17900,216 @@ static mp_obj_t mp_lv_obj_add_subject_set_string_event(size_t mp_n_args, const m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_subject_set_string_event_mpobj, 4, mp_lv_obj_add_subject_set_string_event, lv_obj_add_subject_set_string_event); +/* + * Callback function lv_obj_t_set_bool_cb + * void lv_obj_set_bool_t(lv_obj_t *obj, bool value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_bool_cb_callback(lv_obj_t *arg0, bool arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = convert_to_bool(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_bool_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_bool(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_bool_t set_bool_cb) + */ + +static mp_obj_t mp_lv_obj_bind_bool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_bool_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_bool_cb_callback, MP_QSTR_lv_obj_t_set_bool_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_bool_t))lv_func_ptr)(obj, subject, set_bool_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_bool_mpobj, 3, mp_lv_obj_bind_bool, lv_obj_bind_bool); + + +/* + * Callback function lv_obj_t_set_int_cb + * void lv_obj_set_int_t(lv_obj_t *obj, int32_t value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_int_cb_callback(lv_obj_t *arg0, int32_t arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_int_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_int(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_int_t set_int_cb) + */ + +static mp_obj_t mp_lv_obj_bind_int(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_int_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_int_cb_callback, MP_QSTR_lv_obj_t_set_int_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_int_t))lv_func_ptr)(obj, subject, set_int_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_int_mpobj, 3, mp_lv_obj_bind_int, lv_obj_bind_int); + + +/* + * Callback function lv_obj_t_set_float_cb + * void lv_obj_set_float_t(lv_obj_t *obj, float value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_float_cb_callback(lv_obj_t *arg0, float arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = mp_obj_new_float_from_f(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_float_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_float(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_float_t set_float_cb) + */ + +static mp_obj_t mp_lv_obj_bind_float(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_float_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_float_cb_callback, MP_QSTR_lv_obj_t_set_float_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_float_t))lv_func_ptr)(obj, subject, set_float_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_float_mpobj, 3, mp_lv_obj_bind_float, lv_obj_bind_float); + + +/* + * Callback function lv_obj_t_set_string_cb + * void lv_obj_set_string_t(lv_obj_t *obj, const char *value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_string_cb_callback(lv_obj_t *arg0, const char *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = convert_to_str((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_string_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_string(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_string_t set_string_cb) + */ + +static mp_obj_t mp_lv_obj_bind_string(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_string_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_string_cb_callback, MP_QSTR_lv_obj_t_set_string_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_string_t))lv_func_ptr)(obj, subject, set_string_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_string_mpobj, 3, mp_lv_obj_bind_string, lv_obj_bind_string); + + +/* + * Callback function lv_obj_t_set_color_cb + * void lv_obj_set_color_t(lv_obj_t *obj, lv_color_t value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_color_cb_callback(lv_obj_t *arg0, lv_color_t arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_color_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_color(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_color_t set_color_cb) + */ + +static mp_obj_t mp_lv_obj_bind_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_color_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_color_cb_callback, MP_QSTR_lv_obj_t_set_color_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_color_t))lv_func_ptr)(obj, subject, set_color_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_color_mpobj, 3, mp_lv_obj_bind_color, lv_obj_bind_color); + + +/* + * Callback function lv_obj_t_set_pointer_cb + * void lv_obj_set_pointer_t(lv_obj_t *obj, const void *value) + */ + +GENMPY_UNUSED static void lv_obj_t_set_pointer_cb_callback(lv_obj_t *arg0, const void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_set_pointer_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_pointer(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_pointer_t set_pointer_cb) + */ + +static mp_obj_t mp_lv_obj_bind_pointer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + void *set_pointer_cb = mp_lv_callback(mp_args[2], &lv_obj_t_set_pointer_cb_callback, MP_QSTR_lv_obj_t_set_pointer_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_pointer_t))lv_func_ptr)(obj, subject, set_pointer_cb); + return mp_read_ptr_lv_observer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_pointer_mpobj, 3, mp_lv_obj_bind_pointer, lv_obj_bind_pointer); + + /* * lvgl extension definition for: * lv_observer_t *lv_obj_bind_flag_if_eq(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) @@ -17449,30 +18207,222 @@ static mp_obj_t mp_lv_obj_bind_checked(size_t mp_n_args, const mp_obj_t *mp_args static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_bind_checked_mpobj, 2, mp_lv_obj_bind_checked, lv_obj_bind_checked); -/* Reusing lv_obj_redraw for lv_obj_refr */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_refr_mpobj, 2, mp_lv_obj_redraw, lv_obj_refr); +/* + * lvgl extension definition for: + * void lv_obj_redraw(lv_layer_t *layer, lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_redraw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + ((void (*)(lv_layer_t *, lv_obj_t *))lv_func_ptr)(layer, obj); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_redraw_mpobj, 2, mp_lv_obj_redraw, lv_obj_redraw); + +/* Reusing lv_obj_move_foreground for lv_obj_destruct */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_destruct_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_destruct); + +/* Reusing lv_obj_get_index for lv_obj_get_ext_draw_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_ext_draw_size_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_ext_draw_size); /* * lvgl extension definition for: - * void lv_obj_style_init(void) + * lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_style_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_layer_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_layer_type_t _res = ((lv_layer_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_layer_type_mpobj, 1, mp_lv_obj_get_layer_type, lv_obj_get_layer_type); - ((void (*)(void))lv_func_ptr)(); - return mp_const_none; + +/* + * Struct lv_obj_spec_attr_t + */ + +static inline const mp_obj_type_t *get_mp_lv_obj_spec_attr_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_spec_attr_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_spec_attr_t_type())); + return (lv_obj_spec_attr_t*)self->data; +} + +#define mp_write_lv_obj_spec_attr_t(struct_obj) *((lv_obj_spec_attr_t*)mp_write_ptr_lv_obj_spec_attr_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_spec_attr_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_obj_spec_attr_t_type(), field); +} + +#define mp_read_lv_obj_spec_attr_t(field) mp_read_ptr_lv_obj_spec_attr_t(copy_buffer(&field, sizeof(lv_obj_spec_attr_t))) +#define mp_read_byref_lv_obj_spec_attr_t(field) mp_read_ptr_lv_obj_spec_attr_t(&field) + +static void mp_lv_obj_spec_attr_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_obj_spec_attr_t *data = (lv_obj_spec_attr_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_children: dest[0] = ptr_to_mp((void*)data->children); break; // converting from lv_obj_t **; + case MP_QSTR_group_p: dest[0] = mp_read_ptr_lv_group_t((void*)data->group_p); break; // converting from lv_group_t *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_scroll: dest[0] = mp_read_byref_lv_point_t(data->scroll); break; // converting from lv_point_t; + case MP_QSTR_ext_click_pad: dest[0] = mp_obj_new_int(data->ext_click_pad); break; // converting from int32_t; + case MP_QSTR_ext_draw_size: dest[0] = mp_obj_new_int(data->ext_draw_size); break; // converting from int32_t; + case MP_QSTR_child_cnt: dest[0] = mp_obj_new_int_from_uint(data->child_cnt); break; // converting from uint16_t; + case MP_QSTR_scrollbar_mode: dest[0] = mp_obj_new_int_from_uint(data->scrollbar_mode); break; // converting from uint16_t; + case MP_QSTR_scroll_snap_x: dest[0] = mp_obj_new_int_from_uint(data->scroll_snap_x); break; // converting from uint16_t; + case MP_QSTR_scroll_snap_y: dest[0] = mp_obj_new_int_from_uint(data->scroll_snap_y); break; // converting from uint16_t; + case MP_QSTR_scroll_dir: dest[0] = mp_obj_new_int_from_uint(data->scroll_dir); break; // converting from uint16_t; + case MP_QSTR_layer_type: dest[0] = mp_obj_new_int_from_uint(data->layer_type); break; // converting from uint16_t; + case MP_QSTR_name_static: dest[0] = mp_obj_new_int_from_uint(data->name_static); break; // converting from uint16_t; + case MP_QSTR_user_flags: dest[0] = mp_obj_new_int_from_uint(data->user_flags); break; // converting from uint16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_children: data->children = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; + case MP_QSTR_group_p: data->group_p = (void*)mp_write_ptr_lv_group_t(dest[1]); break; // converting to lv_group_t *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_scroll: data->scroll = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_ext_click_pad: data->ext_click_pad = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ext_draw_size: data->ext_draw_size = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_child_cnt: data->child_cnt = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scrollbar_mode: data->scrollbar_mode = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scroll_snap_x: data->scroll_snap_x = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scroll_snap_y: data->scroll_snap_y = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_scroll_dir: data->scroll_dir = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_layer_type: data->layer_type = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_name_static: data->name_static = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_user_flags: data->user_flags = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_obj_spec_attr_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_obj_spec_attr_t"); +} + +static const mp_obj_dict_t mp_lv_obj_spec_attr_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_obj_spec_attr_t_type, + MP_QSTR_lv_obj_spec_attr_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_obj_spec_attr_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_obj_spec_attr_t_attr, + locals_dict, &mp_lv_obj_spec_attr_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_obj_spec_attr_t_type(void) +{ + return &mp_lv_obj_spec_attr_t_type; +} + + +/* + * lvgl extension definition for: + * lv_obj_spec_attr_t *lv_obj_allocate_spec_attr(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_allocate_spec_attr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_spec_attr_t * _res = ((lv_obj_spec_attr_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_obj_spec_attr_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_allocate_spec_attr_mpobj, 1, mp_lv_obj_allocate_spec_attr, lv_obj_allocate_spec_attr); + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_add_child(lv_obj_t *parent, lv_obj_t *child) + */ + +static mp_obj_t mp_lv_obj_add_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *parent = mp_to_lv(mp_args[0]); + lv_obj_t *child = mp_to_lv(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(parent, child); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_child_mpobj, 2, mp_lv_obj_add_child, lv_obj_add_child); + +/* Reusing lv_obj_set_parent for lv_obj_remove_child */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_child_mpobj, 2, mp_lv_obj_set_parent, lv_obj_remove_child); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_obj_invalidate_expand_blur */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_invalidate_expand_blur_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_obj_invalidate_expand_blur); + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_scroll_by_raw(lv_obj_t *obj, int32_t x, int32_t y) + */ + +static mp_obj_t mp_lv_obj_scroll_by_raw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_init_mpobj, 0, mp_lv_obj_style_init, lv_obj_style_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_raw_mpobj, 3, mp_lv_obj_scroll_by_raw, lv_obj_scroll_by_raw); + +/* Reusing funcptr_user_cb for lv_obj_style_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_init_mpobj, 0, mp_funcptr_user_cb, lv_obj_style_init); -/* Reusing lv_obj_style_init for lv_obj_style_deinit */ +/* Reusing funcptr_user_cb for lv_obj_style_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_deinit_mpobj, 0, mp_lv_obj_style_init, lv_obj_style_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_style_deinit_mpobj, 0, mp_funcptr_user_cb, lv_obj_style_deinit); /* @@ -17513,12 +18463,12 @@ static void mp_lv_obj_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, m // load attribute switch(attr) { + case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_selector: dest[0] = mp_obj_new_int_from_uint(data->selector); break; // converting from lv_style_selector_t; case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint16_t; case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint16_t; - case MP_QSTR_selector: dest[0] = mp_obj_new_int_from_uint(data->selector); break; // converting from lv_style_selector_t; case MP_QSTR_prop: dest[0] = mp_obj_new_int_from_uint(data->prop); break; // converting from lv_style_prop_t; - case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -17527,12 +18477,12 @@ static void mp_lv_obj_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, m // store attribute switch(attr) { + case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_selector: data->selector = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to lv_style_selector_t; case MP_QSTR_time: data->time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; case MP_QSTR_delay: data->delay = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_selector: data->selector = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to lv_style_selector_t; case MP_QSTR_prop: data->prop = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_style_prop_t; - case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_obj_style_transition_dsc_t_path_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -17572,7 +18522,7 @@ static inline const mp_obj_type_t *get_mp_lv_obj_style_transition_dsc_t_type(voi /* * lvgl extension definition for: - * void lv_obj_style_create_transition(lv_obj_t *obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const lv_obj_style_transition_dsc_t *tr) + * void lv_obj_style_create_transition(lv_obj_t *obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const lv_obj_style_transition_dsc_t *tr_dsc) */ static mp_obj_t mp_lv_obj_style_create_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -17581,8 +18531,8 @@ static mp_obj_t mp_lv_obj_style_create_transition(size_t mp_n_args, const mp_obj lv_part_t part = (int)mp_obj_get_int(mp_args[1]); lv_state_t prev_state = (int)mp_obj_get_int(mp_args[2]); lv_state_t new_state = (int)mp_obj_get_int(mp_args[3]); - const lv_obj_style_transition_dsc_t *tr = (const lv_obj_style_transition_dsc_t *)mp_write_ptr_lv_obj_style_transition_dsc_t(mp_args[4]); - ((void (*)(lv_obj_t *, lv_part_t, lv_state_t, lv_state_t, const lv_obj_style_transition_dsc_t *))lv_func_ptr)(obj, part, prev_state, new_state, tr); + const lv_obj_style_transition_dsc_t *tr_dsc = (const lv_obj_style_transition_dsc_t *)mp_write_ptr_lv_obj_style_transition_dsc_t(mp_args[4]); + ((void (*)(lv_obj_t *, lv_part_t, lv_state_t, lv_state_t, const lv_obj_style_transition_dsc_t *))lv_func_ptr)(obj, part, prev_state, new_state, tr_dsc); return mp_const_none; } @@ -17593,7 +18543,7 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_create_transition_mpobj, 5 /* * lvgl extension definition for: - * lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t *obj, lv_state_t state1, lv_state_t state2) + * lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t *obj, lv_state_t state1, lv_state_t state2, lv_part_t *changed_part) */ static mp_obj_t mp_lv_obj_style_state_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -17601,61 +18551,34 @@ static mp_obj_t mp_lv_obj_style_state_compare(size_t mp_n_args, const mp_obj_t * lv_obj_t *obj = mp_to_lv(mp_args[0]); lv_state_t state1 = (int)mp_obj_get_int(mp_args[1]); lv_state_t state2 = (int)mp_obj_get_int(mp_args[2]); - lv_style_state_cmp_t _res = ((lv_style_state_cmp_t (*)(lv_obj_t *, lv_state_t, lv_state_t))lv_func_ptr)(obj, state1, state2); + lv_part_t *changed_part = mp_array_to_i32ptr(mp_args[3]); + lv_style_state_cmp_t _res = ((lv_style_state_cmp_t (*)(lv_obj_t *, lv_state_t, lv_state_t, lv_part_t *))lv_func_ptr)(obj, state1, state2, changed_part); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_state_compare_mpobj, 3, mp_lv_obj_style_state_compare, lv_obj_style_state_compare); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_state_compare_mpobj, 4, mp_lv_obj_style_state_compare, lv_obj_style_state_compare); /* Reusing lv_obj_move_foreground for lv_obj_update_layer_type */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layer_type_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_layer_type); +/* Reusing lv_obj_get_style_prop for lv_obj_get_style_prop_internal */ -/* - * lvgl extension definition for: - * lv_result_t lv_obj_scroll_by_raw(lv_obj_t *obj, int32_t x, int32_t y) - */ - -static mp_obj_t mp_lv_obj_scroll_by_raw(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_raw_mpobj, 3, mp_lv_obj_scroll_by_raw, lv_obj_scroll_by_raw); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_internal_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop_internal); -/* Reusing lv_obj_get_index for lv_obj_get_ext_draw_size */ +/* Reusing lv_obj_style_apply_color_filter for lv_obj_style_apply_color_filter_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_ext_draw_size_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_ext_draw_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_internal_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter_internal); +/* Reusing lv_obj_move_foreground for lv_obj_update_blur_status */ -/* - * lvgl extension definition for: - * lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_get_layer_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_layer_type_t _res = ((lv_layer_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_layer_type_mpobj, 1, mp_lv_obj_get_layer_type, lv_obj_get_layer_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_blur_status_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_blur_status); -/* Reusing lv_obj_move_foreground for lv_obj_destruct */ +/* Reusing lv_obj_redraw for lv_obj_refr */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_destruct_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_destruct); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_refr_mpobj, 2, mp_lv_obj_redraw, lv_obj_refr); /* @@ -17683,6 +18606,289 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_create_mpobj, 1, mp_lv_obj_creat static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_style_get_selector_state), MP_ROM_PTR(&mp_lv_obj_style_get_selector_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_get_selector_part), MP_ROM_PTR(&mp_lv_obj_style_get_selector_part_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_foreground), MP_ROM_PTR(&mp_lv_obj_move_foreground_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_background), MP_ROM_PTR(&mp_lv_obj_move_background_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_min_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_max_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_min_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_max_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_length_internal), MP_ROM_PTR(&mp_lv_obj_get_style_length_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_translate_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_translate_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_translate_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_radial_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_rotation_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_rotation_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_top_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_bottom_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_left_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_right_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_row_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_row_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_column_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_column_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_pad_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_radial_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_top_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_bottom_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_left_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_margin_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_right_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_dir_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_stop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_stop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_src_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_tiled_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_tiled_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_side_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_side_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_border_post_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_post_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_outline_pad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_pad_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_spread_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_spread_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_image_colorkey_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_colorkey_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_gap_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_gap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_rounded_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_line_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_rounded_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_arc_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_image_src_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_font_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_font_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_letter_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_letter_space_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_line_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_line_space_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_decor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_decor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_leading_trim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_leading_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blur_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_radius_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blur_backdrop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_backdrop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blur_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_quality_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radius_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_radial_offset_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radial_offset_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_clip_corner_internal), MP_ROM_PTR(&mp_lv_obj_get_style_clip_corner_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_opa_layered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_layered_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_dsc_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_dsc_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_opa_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_anim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_anim_duration_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_duration_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transition_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transition_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_blend_mode_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blend_mode_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_layout_internal), MP_ROM_PTR(&mp_lv_obj_get_style_layout_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_base_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_base_dir_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_bitmap_mask_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_rotary_sensitivity_internal), MP_ROM_PTR(&mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_flow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_flow_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_main_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_main_place_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_cross_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_cross_place_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_track_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_track_place_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_flex_grow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_grow_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_x_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_y_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calculate_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_calculate_style_text_align_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_obj_set_flex_flow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_align), MP_ROM_PTR(&mp_lv_obj_set_flex_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_obj_set_flex_grow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_dsc_array), MP_ROM_PTR(&mp_lv_obj_set_grid_dsc_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_align), MP_ROM_PTR(&mp_lv_obj_set_grid_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell), MP_ROM_PTR(&mp_lv_obj_set_grid_cell_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_obj_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clean), MP_ROM_PTR(&mp_lv_obj_clean_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_delayed), MP_ROM_PTR(&mp_lv_obj_delete_delayed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_anim_completed_cb), MP_ROM_PTR(&mp_lv_obj_delete_anim_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_async), MP_ROM_PTR(&mp_lv_obj_delete_async_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_obj_set_parent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_obj_swap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_to_index), MP_ROM_PTR(&mp_lv_obj_move_to_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen), MP_ROM_PTR(&mp_lv_obj_get_screen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_display), MP_ROM_PTR(&mp_lv_obj_get_display_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_parent), MP_ROM_PTR(&mp_lv_obj_get_parent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_obj_get_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sibling), MP_ROM_PTR(&mp_lv_obj_get_sibling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sibling_by_type), MP_ROM_PTR(&mp_lv_obj_get_sibling_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child_count), MP_ROM_PTR(&mp_lv_obj_get_child_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child_count_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_count_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_index), MP_ROM_PTR(&mp_lv_obj_get_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_index_by_type), MP_ROM_PTR(&mp_lv_obj_get_index_by_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tree_walk), MP_ROM_PTR(&mp_lv_obj_tree_walk_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dump_tree), MP_ROM_PTR(&mp_lv_obj_dump_tree_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_obj_set_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_obj_set_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_obj_set_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_obj_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refr_size), MP_ROM_PTR(&mp_lv_obj_refr_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_obj_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_obj_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_content_width), MP_ROM_PTR(&mp_lv_obj_set_content_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_content_height), MP_ROM_PTR(&mp_lv_obj_set_content_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_obj_set_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_layout_positioned), MP_ROM_PTR(&mp_lv_obj_is_layout_positioned_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mark_layout_as_dirty), MP_ROM_PTR(&mp_lv_obj_mark_layout_as_dirty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update_layout), MP_ROM_PTR(&mp_lv_obj_update_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_obj_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_obj_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_to), MP_ROM_PTR(&mp_lv_obj_align_to_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_center), MP_ROM_PTR(&mp_lv_obj_center_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform), MP_ROM_PTR(&mp_lv_obj_set_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset_transform), MP_ROM_PTR(&mp_lv_obj_reset_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_coords), MP_ROM_PTR(&mp_lv_obj_get_coords_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x), MP_ROM_PTR(&mp_lv_obj_get_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x2), MP_ROM_PTR(&mp_lv_obj_get_x2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y), MP_ROM_PTR(&mp_lv_obj_get_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y2), MP_ROM_PTR(&mp_lv_obj_get_y2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x_aligned), MP_ROM_PTR(&mp_lv_obj_get_x_aligned_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y_aligned), MP_ROM_PTR(&mp_lv_obj_get_y_aligned_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_obj_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_obj_get_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content_width), MP_ROM_PTR(&mp_lv_obj_get_content_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content_height), MP_ROM_PTR(&mp_lv_obj_get_content_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content_coords), MP_ROM_PTR(&mp_lv_obj_get_content_coords_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_width), MP_ROM_PTR(&mp_lv_obj_get_self_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_height), MP_ROM_PTR(&mp_lv_obj_get_self_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_clamped_width), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_clamped_height), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_style_any_width_content), MP_ROM_PTR(&mp_lv_obj_is_style_any_width_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_style_any_height_content), MP_ROM_PTR(&mp_lv_obj_is_style_any_height_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_width_min), MP_ROM_PTR(&mp_lv_obj_is_width_min_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_height_min), MP_ROM_PTR(&mp_lv_obj_is_height_min_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_width_max), MP_ROM_PTR(&mp_lv_obj_is_width_max_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_height_max), MP_ROM_PTR(&mp_lv_obj_is_height_max_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh_self_size), MP_ROM_PTR(&mp_lv_obj_refresh_self_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refr_pos), MP_ROM_PTR(&mp_lv_obj_refr_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_to), MP_ROM_PTR(&mp_lv_obj_move_to_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_children_by), MP_ROM_PTR(&mp_lv_obj_move_children_by_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transform), MP_ROM_PTR(&mp_lv_obj_get_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_transform_point), MP_ROM_PTR(&mp_lv_obj_transform_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_transform_point_array), MP_ROM_PTR(&mp_lv_obj_transform_point_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transformed_area), MP_ROM_PTR(&mp_lv_obj_get_transformed_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_area), MP_ROM_PTR(&mp_lv_obj_invalidate_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_invalidate), MP_ROM_PTR(&mp_lv_obj_invalidate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_area_is_visible), MP_ROM_PTR(&mp_lv_obj_area_is_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_visible), MP_ROM_PTR(&mp_lv_obj_is_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_click_area), MP_ROM_PTR(&mp_lv_obj_set_ext_click_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_click_area), MP_ROM_PTR(&mp_lv_obj_get_click_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_hit_test), MP_ROM_PTR(&mp_lv_obj_hit_test_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calc_dynamic_width), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calc_dynamic_height), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_set_scrollbar_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_dir), MP_ROM_PTR(&mp_lv_obj_set_scroll_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_dir), MP_ROM_PTR(&mp_lv_obj_get_scroll_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_top), MP_ROM_PTR(&mp_lv_obj_get_scroll_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_bottom), MP_ROM_PTR(&mp_lv_obj_get_scroll_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_left), MP_ROM_PTR(&mp_lv_obj_get_scroll_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_right), MP_ROM_PTR(&mp_lv_obj_get_scroll_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_end), MP_ROM_PTR(&mp_lv_obj_get_scroll_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_by), MP_ROM_PTR(&mp_lv_obj_scroll_by_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_by_bounded), MP_ROM_PTR(&mp_lv_obj_scroll_by_bounded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to), MP_ROM_PTR(&mp_lv_obj_scroll_to_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_x), MP_ROM_PTR(&mp_lv_obj_scroll_to_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_y), MP_ROM_PTR(&mp_lv_obj_scroll_to_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_view), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_to_view_recursive), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_recursive_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scrolling), MP_ROM_PTR(&mp_lv_obj_is_scrolling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_scroll_anim), MP_ROM_PTR(&mp_lv_obj_stop_scroll_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update_snap), MP_ROM_PTR(&mp_lv_obj_update_snap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scrollbar_area), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scrollbar_invalidate), MP_ROM_PTR(&mp_lv_obj_scrollbar_invalidate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_readjust_scroll), MP_ROM_PTR(&mp_lv_obj_readjust_scroll_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_style), MP_ROM_PTR(&mp_lv_obj_add_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_replace_style), MP_ROM_PTR(&mp_lv_obj_replace_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_style), MP_ROM_PTR(&mp_lv_obj_remove_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_theme), MP_ROM_PTR(&mp_lv_obj_remove_theme_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_style_all), MP_ROM_PTR(&mp_lv_obj_remove_style_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_report_style_change), MP_ROM_PTR(&mp_lv_obj_report_style_change_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh_style), MP_ROM_PTR(&mp_lv_obj_refresh_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_enabled), MP_ROM_PTR(&mp_lv_obj_set_style_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_enabled), MP_ROM_PTR(&mp_lv_obj_get_style_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_set_disabled), MP_ROM_PTR(&mp_lv_obj_style_set_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_get_disabled), MP_ROM_PTR(&mp_lv_obj_style_get_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_enable_style_refresh), MP_ROM_PTR(&mp_lv_obj_enable_style_refresh_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_prop), MP_ROM_PTR(&mp_lv_obj_get_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_style_prop), MP_ROM_PTR(&mp_lv_obj_has_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_local_style_prop), MP_ROM_PTR(&mp_lv_obj_set_local_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_local_style_prop), MP_ROM_PTR(&mp_lv_obj_get_local_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_local_style_prop), MP_ROM_PTR(&mp_lv_obj_remove_local_style_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fade_in), MP_ROM_PTR(&mp_lv_obj_fade_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fade_out), MP_ROM_PTR(&mp_lv_obj_fade_out_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_width), MP_ROM_PTR(&mp_lv_obj_get_style_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_min_width), MP_ROM_PTR(&mp_lv_obj_get_style_min_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_max_width), MP_ROM_PTR(&mp_lv_obj_get_style_max_width_mpobj) }, @@ -17781,6 +18987,7 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_filtered), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_text_leading_trim), MP_ROM_PTR(&mp_lv_obj_get_style_text_leading_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_blur_radius), MP_ROM_PTR(&mp_lv_obj_get_style_blur_radius_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_blur_backdrop), MP_ROM_PTR(&mp_lv_obj_get_style_blur_backdrop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_blur_quality), MP_ROM_PTR(&mp_lv_obj_get_style_blur_quality_mpobj) }, @@ -17823,152 +19030,6 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_pos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_y_align), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_y_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_span), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_all), MP_ROM_PTR(&mp_lv_obj_set_style_pad_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_hor), MP_ROM_PTR(&mp_lv_obj_set_style_pad_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_ver), MP_ROM_PTR(&mp_lv_obj_set_style_pad_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_margin_all), MP_ROM_PTR(&mp_lv_obj_set_style_margin_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_margin_hor), MP_ROM_PTR(&mp_lv_obj_set_style_margin_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_margin_ver), MP_ROM_PTR(&mp_lv_obj_set_style_margin_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_pad_gap), MP_ROM_PTR(&mp_lv_obj_set_style_pad_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_size), MP_ROM_PTR(&mp_lv_obj_set_style_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style_transform_scale), MP_ROM_PTR(&mp_lv_obj_set_style_transform_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_left), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_right), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_top), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_foreground), MP_ROM_PTR(&mp_lv_obj_move_foreground_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_background), MP_ROM_PTR(&mp_lv_obj_move_background_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_obj_set_flex_flow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_align), MP_ROM_PTR(&mp_lv_obj_set_flex_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_obj_set_flex_grow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_dsc_array), MP_ROM_PTR(&mp_lv_obj_set_grid_dsc_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_align), MP_ROM_PTR(&mp_lv_obj_set_grid_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell), MP_ROM_PTR(&mp_lv_obj_set_grid_cell_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_obj_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clean), MP_ROM_PTR(&mp_lv_obj_clean_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_delayed), MP_ROM_PTR(&mp_lv_obj_delete_delayed_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_anim_completed_cb), MP_ROM_PTR(&mp_lv_obj_delete_anim_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_async), MP_ROM_PTR(&mp_lv_obj_delete_async_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_obj_set_parent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_obj_swap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_to_index), MP_ROM_PTR(&mp_lv_obj_move_to_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen), MP_ROM_PTR(&mp_lv_obj_get_screen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_display), MP_ROM_PTR(&mp_lv_obj_get_display_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_parent), MP_ROM_PTR(&mp_lv_obj_get_parent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_obj_get_child_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sibling), MP_ROM_PTR(&mp_lv_obj_get_sibling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sibling_by_type), MP_ROM_PTR(&mp_lv_obj_get_sibling_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child_count), MP_ROM_PTR(&mp_lv_obj_get_child_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child_count_by_type), MP_ROM_PTR(&mp_lv_obj_get_child_count_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_index), MP_ROM_PTR(&mp_lv_obj_get_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_index_by_type), MP_ROM_PTR(&mp_lv_obj_get_index_by_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tree_walk), MP_ROM_PTR(&mp_lv_obj_tree_walk_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dump_tree), MP_ROM_PTR(&mp_lv_obj_dump_tree_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_obj_set_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_obj_set_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_obj_set_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_obj_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refr_size), MP_ROM_PTR(&mp_lv_obj_refr_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_obj_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_obj_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_content_width), MP_ROM_PTR(&mp_lv_obj_set_content_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_content_height), MP_ROM_PTR(&mp_lv_obj_set_content_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_obj_set_layout_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_layout_positioned), MP_ROM_PTR(&mp_lv_obj_is_layout_positioned_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mark_layout_as_dirty), MP_ROM_PTR(&mp_lv_obj_mark_layout_as_dirty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update_layout), MP_ROM_PTR(&mp_lv_obj_update_layout_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_obj_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_obj_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_to), MP_ROM_PTR(&mp_lv_obj_align_to_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_center), MP_ROM_PTR(&mp_lv_obj_center_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform), MP_ROM_PTR(&mp_lv_obj_set_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset_transform), MP_ROM_PTR(&mp_lv_obj_reset_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_coords), MP_ROM_PTR(&mp_lv_obj_get_coords_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x), MP_ROM_PTR(&mp_lv_obj_get_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x2), MP_ROM_PTR(&mp_lv_obj_get_x2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y), MP_ROM_PTR(&mp_lv_obj_get_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y2), MP_ROM_PTR(&mp_lv_obj_get_y2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x_aligned), MP_ROM_PTR(&mp_lv_obj_get_x_aligned_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y_aligned), MP_ROM_PTR(&mp_lv_obj_get_y_aligned_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_obj_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_obj_get_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content_width), MP_ROM_PTR(&mp_lv_obj_get_content_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content_height), MP_ROM_PTR(&mp_lv_obj_get_content_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content_coords), MP_ROM_PTR(&mp_lv_obj_get_content_coords_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_width), MP_ROM_PTR(&mp_lv_obj_get_self_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_height), MP_ROM_PTR(&mp_lv_obj_get_self_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_clamped_width), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_clamped_height), MP_ROM_PTR(&mp_lv_obj_get_style_clamped_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_width_min), MP_ROM_PTR(&mp_lv_obj_is_width_min_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_height_min), MP_ROM_PTR(&mp_lv_obj_is_height_min_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_width_max), MP_ROM_PTR(&mp_lv_obj_is_width_max_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_height_max), MP_ROM_PTR(&mp_lv_obj_is_height_max_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh_self_size), MP_ROM_PTR(&mp_lv_obj_refresh_self_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refr_pos), MP_ROM_PTR(&mp_lv_obj_refr_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_to), MP_ROM_PTR(&mp_lv_obj_move_to_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_children_by), MP_ROM_PTR(&mp_lv_obj_move_children_by_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transform), MP_ROM_PTR(&mp_lv_obj_get_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_transform_point), MP_ROM_PTR(&mp_lv_obj_transform_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_transform_point_array), MP_ROM_PTR(&mp_lv_obj_transform_point_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transformed_area), MP_ROM_PTR(&mp_lv_obj_get_transformed_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_invalidate_area), MP_ROM_PTR(&mp_lv_obj_invalidate_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_invalidate), MP_ROM_PTR(&mp_lv_obj_invalidate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_area_is_visible), MP_ROM_PTR(&mp_lv_obj_area_is_visible_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_visible), MP_ROM_PTR(&mp_lv_obj_is_visible_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ext_click_area), MP_ROM_PTR(&mp_lv_obj_set_ext_click_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_click_area), MP_ROM_PTR(&mp_lv_obj_get_click_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_hit_test), MP_ROM_PTR(&mp_lv_obj_hit_test_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calc_dynamic_width), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calc_dynamic_height), MP_ROM_PTR(&mp_lv_obj_calc_dynamic_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_set_scrollbar_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scroll_dir), MP_ROM_PTR(&mp_lv_obj_set_scroll_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_set_scroll_snap_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scrollbar_mode), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_dir), MP_ROM_PTR(&mp_lv_obj_get_scroll_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_snap_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_snap_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_x), MP_ROM_PTR(&mp_lv_obj_get_scroll_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_y), MP_ROM_PTR(&mp_lv_obj_get_scroll_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_top), MP_ROM_PTR(&mp_lv_obj_get_scroll_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_bottom), MP_ROM_PTR(&mp_lv_obj_get_scroll_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_left), MP_ROM_PTR(&mp_lv_obj_get_scroll_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_right), MP_ROM_PTR(&mp_lv_obj_get_scroll_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_end), MP_ROM_PTR(&mp_lv_obj_get_scroll_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_by), MP_ROM_PTR(&mp_lv_obj_scroll_by_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_by_bounded), MP_ROM_PTR(&mp_lv_obj_scroll_by_bounded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to), MP_ROM_PTR(&mp_lv_obj_scroll_to_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_x), MP_ROM_PTR(&mp_lv_obj_scroll_to_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_y), MP_ROM_PTR(&mp_lv_obj_scroll_to_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_view), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_to_view_recursive), MP_ROM_PTR(&mp_lv_obj_scroll_to_view_recursive_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_scrolling), MP_ROM_PTR(&mp_lv_obj_is_scrolling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_scroll_anim), MP_ROM_PTR(&mp_lv_obj_stop_scroll_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update_snap), MP_ROM_PTR(&mp_lv_obj_update_snap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scrollbar_area), MP_ROM_PTR(&mp_lv_obj_get_scrollbar_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scrollbar_invalidate), MP_ROM_PTR(&mp_lv_obj_scrollbar_invalidate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_readjust_scroll), MP_ROM_PTR(&mp_lv_obj_readjust_scroll_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_style), MP_ROM_PTR(&mp_lv_obj_add_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_replace_style), MP_ROM_PTR(&mp_lv_obj_replace_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_style), MP_ROM_PTR(&mp_lv_obj_remove_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_theme), MP_ROM_PTR(&mp_lv_obj_remove_theme_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_style_all), MP_ROM_PTR(&mp_lv_obj_remove_style_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_report_style_change), MP_ROM_PTR(&mp_lv_obj_report_style_change_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh_style), MP_ROM_PTR(&mp_lv_obj_refresh_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_set_disabled), MP_ROM_PTR(&mp_lv_obj_style_set_disabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_get_disabled), MP_ROM_PTR(&mp_lv_obj_style_get_disabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_enable_style_refresh), MP_ROM_PTR(&mp_lv_obj_enable_style_refresh_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_prop), MP_ROM_PTR(&mp_lv_obj_get_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_style_prop), MP_ROM_PTR(&mp_lv_obj_has_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_local_style_prop), MP_ROM_PTR(&mp_lv_obj_set_local_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_local_style_prop), MP_ROM_PTR(&mp_lv_obj_get_local_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_local_style_prop), MP_ROM_PTR(&mp_lv_obj_remove_local_style_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fade_in), MP_ROM_PTR(&mp_lv_obj_fade_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fade_out), MP_ROM_PTR(&mp_lv_obj_fade_out_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_width), MP_ROM_PTR(&mp_lv_obj_set_style_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_min_width), MP_ROM_PTR(&mp_lv_obj_set_style_min_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_max_width), MP_ROM_PTR(&mp_lv_obj_set_style_max_width_mpobj) }, @@ -18056,6 +19117,7 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_style_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_obj_set_style_text_outline_stroke_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_obj_set_style_text_outline_stroke_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_obj_set_style_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_text_leading_trim), MP_ROM_PTR(&mp_lv_obj_set_style_text_leading_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_blur_radius), MP_ROM_PTR(&mp_lv_obj_set_style_blur_radius_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_blur_backdrop), MP_ROM_PTR(&mp_lv_obj_set_style_blur_backdrop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_blur_quality), MP_ROM_PTR(&mp_lv_obj_set_style_blur_quality_mpobj) }, @@ -18097,7 +19159,22 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_style_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_obj_set_style_grid_cell_row_pos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_grid_cell_y_align), MP_ROM_PTR(&mp_lv_obj_set_style_grid_cell_y_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_style_grid_cell_row_span), MP_ROM_PTR(&mp_lv_obj_set_style_grid_cell_row_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_all), MP_ROM_PTR(&mp_lv_obj_set_style_pad_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_hor), MP_ROM_PTR(&mp_lv_obj_set_style_pad_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_ver), MP_ROM_PTR(&mp_lv_obj_set_style_pad_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_margin_all), MP_ROM_PTR(&mp_lv_obj_set_style_margin_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_margin_hor), MP_ROM_PTR(&mp_lv_obj_set_style_margin_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_margin_ver), MP_ROM_PTR(&mp_lv_obj_set_style_margin_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_pad_gap), MP_ROM_PTR(&mp_lv_obj_set_style_pad_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_size), MP_ROM_PTR(&mp_lv_obj_set_style_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style_transform_scale), MP_ROM_PTR(&mp_lv_obj_set_style_transform_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_left), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_right), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_top), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_mpobj) }, { MP_ROM_QSTR(MP_QSTR_calculate_style_text_align), MP_ROM_PTR(&mp_lv_obj_calculate_style_text_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_opa_recursive), MP_ROM_PTR(&mp_lv_obj_get_style_opa_recursive_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_apply_recolor), MP_ROM_PTR(&mp_lv_obj_style_apply_recolor_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_style_recolor_recursive), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_recursive_mpobj) }, @@ -18109,6 +19186,7 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_init_draw_line_dsc), MP_ROM_PTR(&mp_lv_obj_init_draw_line_dsc_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_draw_arc_dsc), MP_ROM_PTR(&mp_lv_obj_init_draw_arc_dsc_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_draw_blur_dsc), MP_ROM_PTR(&mp_lv_obj_init_draw_blur_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_set_ext_draw_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_calculate_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_calculate_ext_draw_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refresh_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_refresh_ext_draw_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_class_create_obj), MP_ROM_PTR(&mp_lv_obj_class_create_obj_mpobj) }, @@ -18127,28 +19205,105 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_add_flag), MP_ROM_PTR(&mp_lv_obj_add_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_flag), MP_ROM_PTR(&mp_lv_obj_remove_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_obj_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_hidden), MP_ROM_PTR(&mp_lv_obj_set_hidden_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_clickable), MP_ROM_PTR(&mp_lv_obj_set_clickable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_click_focusable), MP_ROM_PTR(&mp_lv_obj_set_click_focusable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_checkable), MP_ROM_PTR(&mp_lv_obj_set_checkable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scrollable), MP_ROM_PTR(&mp_lv_obj_set_scrollable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_elastic), MP_ROM_PTR(&mp_lv_obj_set_scroll_elastic_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_momentum), MP_ROM_PTR(&mp_lv_obj_set_scroll_momentum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_one), MP_ROM_PTR(&mp_lv_obj_set_scroll_one_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_chain), MP_ROM_PTR(&mp_lv_obj_set_scroll_chain_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_chain_hor), MP_ROM_PTR(&mp_lv_obj_set_scroll_chain_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_chain_ver), MP_ROM_PTR(&mp_lv_obj_set_scroll_chain_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_on_focus), MP_ROM_PTR(&mp_lv_obj_set_scroll_on_focus_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scroll_with_arrow), MP_ROM_PTR(&mp_lv_obj_set_scroll_with_arrow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_snappable), MP_ROM_PTR(&mp_lv_obj_set_snappable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_press_lock), MP_ROM_PTR(&mp_lv_obj_set_press_lock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_event_bubble), MP_ROM_PTR(&mp_lv_obj_set_event_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_gesture_bubble), MP_ROM_PTR(&mp_lv_obj_set_gesture_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_adv_hittest), MP_ROM_PTR(&mp_lv_obj_set_adv_hittest_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ignore_layout), MP_ROM_PTR(&mp_lv_obj_set_ignore_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_floating), MP_ROM_PTR(&mp_lv_obj_set_floating_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_send_draw_task_events), MP_ROM_PTR(&mp_lv_obj_set_send_draw_task_events_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_overflow_visible), MP_ROM_PTR(&mp_lv_obj_set_overflow_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_event_trickle), MP_ROM_PTR(&mp_lv_obj_set_event_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_trickle), MP_ROM_PTR(&mp_lv_obj_set_state_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radio_button), MP_ROM_PTR(&mp_lv_obj_set_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_in_new_track), MP_ROM_PTR(&mp_lv_obj_set_flex_in_new_track_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_state), MP_ROM_PTR(&mp_lv_obj_add_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_state), MP_ROM_PTR(&mp_lv_obj_remove_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_state), MP_ROM_PTR(&mp_lv_obj_set_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_alt), MP_ROM_PTR(&mp_lv_obj_set_alt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_checked), MP_ROM_PTR(&mp_lv_obj_set_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_focused), MP_ROM_PTR(&mp_lv_obj_set_focused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_focus_key), MP_ROM_PTR(&mp_lv_obj_set_focus_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_edited), MP_ROM_PTR(&mp_lv_obj_set_edited_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_hovered), MP_ROM_PTR(&mp_lv_obj_set_hovered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pressed), MP_ROM_PTR(&mp_lv_obj_set_pressed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scrolled), MP_ROM_PTR(&mp_lv_obj_set_scrolled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_disabled), MP_ROM_PTR(&mp_lv_obj_set_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_1), MP_ROM_PTR(&mp_lv_obj_set_state_user_1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_2), MP_ROM_PTR(&mp_lv_obj_set_state_user_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_3), MP_ROM_PTR(&mp_lv_obj_set_state_user_3_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state_user_4), MP_ROM_PTR(&mp_lv_obj_set_state_user_4_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_obj_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radio_button), MP_ROM_PTR(&mp_lv_obj_set_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_flag), MP_ROM_PTR(&mp_lv_obj_set_user_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_obj_has_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_flag_any), MP_ROM_PTR(&mp_lv_obj_has_flag_any_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_hidden), MP_ROM_PTR(&mp_lv_obj_is_hidden_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_clickable), MP_ROM_PTR(&mp_lv_obj_is_clickable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_click_focusable), MP_ROM_PTR(&mp_lv_obj_is_click_focusable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_checkable), MP_ROM_PTR(&mp_lv_obj_is_checkable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scrollable), MP_ROM_PTR(&mp_lv_obj_is_scrollable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_elastic), MP_ROM_PTR(&mp_lv_obj_is_scroll_elastic_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_momentum), MP_ROM_PTR(&mp_lv_obj_is_scroll_momentum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_one), MP_ROM_PTR(&mp_lv_obj_is_scroll_one_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_chain_hor), MP_ROM_PTR(&mp_lv_obj_is_scroll_chain_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_chain_ver), MP_ROM_PTR(&mp_lv_obj_is_scroll_chain_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_on_focus), MP_ROM_PTR(&mp_lv_obj_is_scroll_on_focus_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scroll_with_arrow), MP_ROM_PTR(&mp_lv_obj_is_scroll_with_arrow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_snappable), MP_ROM_PTR(&mp_lv_obj_is_snappable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_press_lock), MP_ROM_PTR(&mp_lv_obj_is_press_lock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_event_bubble), MP_ROM_PTR(&mp_lv_obj_is_event_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_gesture_bubble), MP_ROM_PTR(&mp_lv_obj_is_gesture_bubble_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_adv_hittest), MP_ROM_PTR(&mp_lv_obj_is_adv_hittest_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_ignore_layout), MP_ROM_PTR(&mp_lv_obj_is_ignore_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_floating), MP_ROM_PTR(&mp_lv_obj_is_floating_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_send_draw_task_events), MP_ROM_PTR(&mp_lv_obj_is_send_draw_task_events_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_overflow_visible), MP_ROM_PTR(&mp_lv_obj_is_overflow_visible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_event_trickle), MP_ROM_PTR(&mp_lv_obj_is_event_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_trickle), MP_ROM_PTR(&mp_lv_obj_is_state_trickle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_radio_button), MP_ROM_PTR(&mp_lv_obj_is_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_flex_in_new_track), MP_ROM_PTR(&mp_lv_obj_is_flex_in_new_track_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_state), MP_ROM_PTR(&mp_lv_obj_get_state_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_state), MP_ROM_PTR(&mp_lv_obj_has_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_radio_button), MP_ROM_PTR(&mp_lv_obj_is_radio_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_alt), MP_ROM_PTR(&mp_lv_obj_is_alt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_checked), MP_ROM_PTR(&mp_lv_obj_is_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_focused), MP_ROM_PTR(&mp_lv_obj_is_focused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_focus_key), MP_ROM_PTR(&mp_lv_obj_is_focus_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_edited), MP_ROM_PTR(&mp_lv_obj_is_edited_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_hovered), MP_ROM_PTR(&mp_lv_obj_is_hovered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_pressed), MP_ROM_PTR(&mp_lv_obj_is_pressed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_scrolled), MP_ROM_PTR(&mp_lv_obj_is_scrolled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_disabled), MP_ROM_PTR(&mp_lv_obj_is_disabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_1), MP_ROM_PTR(&mp_lv_obj_is_state_user_1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_2), MP_ROM_PTR(&mp_lv_obj_is_state_user_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_3), MP_ROM_PTR(&mp_lv_obj_is_state_user_3_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_state_user_4), MP_ROM_PTR(&mp_lv_obj_is_state_user_4_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_group), MP_ROM_PTR(&mp_lv_obj_get_group_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_obj_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_allocate_spec_attr), MP_ROM_PTR(&mp_lv_obj_allocate_spec_attr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_flag), MP_ROM_PTR(&mp_lv_obj_get_user_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_check_type), MP_ROM_PTR(&mp_lv_obj_check_type_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_class), MP_ROM_PTR(&mp_lv_obj_has_class_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_class), MP_ROM_PTR(&mp_lv_obj_get_class_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_valid), MP_ROM_PTR(&mp_lv_obj_is_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_in_widget_tree), MP_ROM_PTR(&mp_lv_obj_is_in_widget_tree_mpobj) }, { MP_ROM_QSTR(MP_QSTR_null_on_delete), MP_ROM_PTR(&mp_lv_obj_null_on_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_delete_cb), MP_ROM_PTR(&mp_lv_obj_add_delete_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_delete_cb), MP_ROM_PTR(&mp_lv_obj_remove_delete_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_screen_load_event), MP_ROM_PTR(&mp_lv_obj_add_screen_load_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_screen_create_event), MP_ROM_PTR(&mp_lv_obj_add_screen_create_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_play_timeline_event), MP_ROM_PTR(&mp_lv_obj_add_play_timeline_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_redraw), MP_ROM_PTR(&mp_lv_obj_redraw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_from_subject), MP_ROM_PTR(&mp_lv_obj_remove_from_subject_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_subject_increment_event), MP_ROM_PTR(&mp_lv_obj_add_subject_increment_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_subject_increment_event_min_value), MP_ROM_PTR(&mp_lv_obj_set_subject_increment_event_min_value_mpobj) }, @@ -18158,6 +19313,12 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_add_subject_set_int_event), MP_ROM_PTR(&mp_lv_obj_add_subject_set_int_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_subject_set_float_event), MP_ROM_PTR(&mp_lv_obj_add_subject_set_float_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_subject_set_string_event), MP_ROM_PTR(&mp_lv_obj_add_subject_set_string_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_bool), MP_ROM_PTR(&mp_lv_obj_bind_bool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_int), MP_ROM_PTR(&mp_lv_obj_bind_int_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_float), MP_ROM_PTR(&mp_lv_obj_bind_float_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_string), MP_ROM_PTR(&mp_lv_obj_bind_string_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_color), MP_ROM_PTR(&mp_lv_obj_bind_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_pointer), MP_ROM_PTR(&mp_lv_obj_bind_pointer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_flag_if_eq), MP_ROM_PTR(&mp_lv_obj_bind_flag_if_eq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_flag_if_not_eq), MP_ROM_PTR(&mp_lv_obj_bind_flag_if_not_eq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_flag_if_gt), MP_ROM_PTR(&mp_lv_obj_bind_flag_if_gt_mpobj) }, @@ -18171,16 +19332,24 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_bind_state_if_lt), MP_ROM_PTR(&mp_lv_obj_bind_state_if_lt_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_state_if_le), MP_ROM_PTR(&mp_lv_obj_bind_state_if_le_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bind_checked), MP_ROM_PTR(&mp_lv_obj_bind_checked_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refr), MP_ROM_PTR(&mp_lv_obj_refr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_redraw), MP_ROM_PTR(&mp_lv_obj_redraw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destruct), MP_ROM_PTR(&mp_lv_obj_destruct_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_get_ext_draw_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_type), MP_ROM_PTR(&mp_lv_obj_get_layer_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_allocate_spec_attr), MP_ROM_PTR(&mp_lv_obj_allocate_spec_attr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_child), MP_ROM_PTR(&mp_lv_obj_add_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_child), MP_ROM_PTR(&mp_lv_obj_remove_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_expand_blur), MP_ROM_PTR(&mp_lv_obj_invalidate_expand_blur_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_scroll_by_raw), MP_ROM_PTR(&mp_lv_obj_scroll_by_raw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_init), MP_ROM_PTR(&mp_lv_obj_style_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_deinit), MP_ROM_PTR(&mp_lv_obj_style_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_create_transition), MP_ROM_PTR(&mp_lv_obj_style_create_transition_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_state_compare), MP_ROM_PTR(&mp_lv_obj_style_state_compare_mpobj) }, { MP_ROM_QSTR(MP_QSTR_update_layer_type), MP_ROM_PTR(&mp_lv_obj_update_layer_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_scroll_by_raw), MP_ROM_PTR(&mp_lv_obj_scroll_by_raw_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_ext_draw_size), MP_ROM_PTR(&mp_lv_obj_get_ext_draw_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_type), MP_ROM_PTR(&mp_lv_obj_get_layer_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destruct), MP_ROM_PTR(&mp_lv_obj_destruct_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style_prop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_prop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter_internal), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update_blur_status), MP_ROM_PTR(&mp_lv_obj_update_blur_status_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refr), MP_ROM_PTR(&mp_lv_obj_refr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_OBJ_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_POINT_TRANSFORM_FLAG), MP_ROM_PTR(&mp_lv_LV_OBJ_POINT_TRANSFORM_FLAG_type_base) }, { MP_ROM_QSTR(MP_QSTR_CLASS_EDITABLE), MP_ROM_PTR(&mp_lv_LV_OBJ_CLASS_EDITABLE_type_base) }, @@ -19106,52 +20275,129 @@ static inline const mp_obj_type_t *get_mp_lv_fs_file_t_type(void) return &mp_lv_fs_file_t_type; } +#define funcptr_lv_cache_alloc_cb_t NULL + /* - * Struct lv_image_decoder_dsc_t + * lvgl extension definition for: + * void *lv_cache_alloc_cb_t(void) */ -static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_cache_alloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + void * _res = ((void *(*)(void))lv_func_ptr)(); + return ptr_to_mp((void*)_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_decoder_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_alloc_cb_t_mpobj, 0, mp_funcptr_lv_cache_alloc_cb_t, funcptr_lv_cache_alloc_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_alloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_alloc_cb_callback' + * lv_cache_alloc_cb_t alloc_cb + */ + +#define funcptr_lv_cache_init_cb_t NULL + + +/* + * lvgl extension definition for: + * bool lv_cache_init_cb_t(lv_cache_t *cache) + */ + +static mp_obj_t mp_funcptr_lv_cache_init_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_decoder_dsc_t_type())); - return (lv_image_decoder_dsc_t*)self->data; + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + bool _res = ((bool (*)(lv_cache_t *))lv_func_ptr)(cache); + return convert_to_bool(_res); } -#define mp_write_lv_image_decoder_dsc_t(struct_obj) *((lv_image_decoder_dsc_t*)mp_write_ptr_lv_image_decoder_dsc_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_decoder_dsc_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_init_cb_t_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, funcptr_lv_cache_init_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_init_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_init_cb_callback' + * lv_cache_init_cb_t init_cb + */ + +#define funcptr_lv_cache_destroy_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) + */ + +static mp_obj_t mp_funcptr_lv_cache_destroy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_image_decoder_dsc_t_type(), field); + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + ((void (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return mp_const_none; } -#define mp_read_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(copy_buffer(&field, sizeof(lv_image_decoder_dsc_t))) -#define mp_read_byref_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(&field) + -static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_destroy_cb_t_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, funcptr_lv_cache_destroy_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_destroy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_destroy_cb_callback' + * lv_cache_destroy_cb_t destroy_cb + */ + +#define funcptr_lv_cache_get_cb_t NULL + + +/* + * Struct lv_cache_entry_t + */ + +static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_entry_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_entry_t_type())); + return (lv_cache_entry_t*)self->data; +} + +#define mp_write_lv_cache_entry_t(struct_obj) *((lv_cache_entry_t*)mp_write_ptr_lv_cache_entry_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_entry_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_cache_entry_t_type(), field); +} + +#define mp_read_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(copy_buffer(&field, sizeof(lv_cache_entry_t))) +#define mp_read_byref_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(&field) + +static void mp_lv_cache_entry_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)self->data; + GENMPY_UNUSED lv_cache_entry_t *data = (lv_cache_entry_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; - case MP_QSTR_args: dest[0] = mp_read_byref_lv_image_decoder_args_t(data->args); break; // converting from lv_image_decoder_args_t; - case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; - case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; - case MP_QSTR_file: dest[0] = mp_read_byref_lv_fs_file_t(data->file); break; // converting from lv_fs_file_t; - case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; - case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; - case MP_QSTR_palette: dest[0] = mp_read_ptr_lv_color32_t((void*)data->palette); break; // converting from lv_color32_t *; - case MP_QSTR_palette_size: dest[0] = mp_obj_new_int_from_uint(data->palette_size); break; // converting from uint32_t; - case MP_QSTR_time_to_open: dest[0] = mp_obj_new_int_from_uint(data->time_to_open); break; // converting from uint32_t; - case MP_QSTR_error_msg: dest[0] = convert_to_str((void*)data->error_msg); break; // converting from char *; - case MP_QSTR_cache: dest[0] = mp_read_ptr_lv_cache_t((void*)data->cache); break; // converting from lv_cache_t *; - case MP_QSTR_cache_entry: dest[0] = mp_read_ptr_lv_cache_entry_t((void*)data->cache_entry); break; // converting from lv_cache_entry_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_cache: dest[0] = ptr_to_mp((void*)data->cache); break; // converting from lv_cache_t *; + case MP_QSTR_ref_cnt: dest[0] = mp_obj_new_int(data->ref_cnt); break; // converting from int32_t; + case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -19160,20 +20406,10 @@ static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; - case MP_QSTR_args: data->args = mp_write_lv_image_decoder_args_t(dest[1]); break; // converting to lv_image_decoder_args_t; - case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; - case MP_QSTR_file: data->file = mp_write_lv_fs_file_t(dest[1]); break; // converting to lv_fs_file_t; - case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; - case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_palette: data->palette = (void*)mp_write_ptr_lv_color32_t(dest[1]); break; // converting to lv_color32_t *; - case MP_QSTR_palette_size: data->palette_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_time_to_open: data->time_to_open = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_error_msg: data->error_msg = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_cache: data->cache = (void*)mp_write_ptr_lv_cache_t(dest[1]); break; // converting to lv_cache_t *; - case MP_QSTR_cache_entry: data->cache_entry = (void*)mp_write_ptr_lv_cache_entry_t(dest[1]); break; // converting to lv_cache_entry_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_cache: data->cache = (void*)mp_to_ptr(dest[1]); break; // converting to lv_cache_t *; + case MP_QSTR_ref_cnt: data->ref_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_flags: data->flags = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -19182,312 +20418,231 @@ static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_image_decoder_dsc_t_print(const mp_print_t *print, +static void mp_lv_cache_entry_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_decoder_dsc_t"); + mp_printf(print, "struct lv_cache_entry_t"); } -static const mp_obj_dict_t mp_lv_image_decoder_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_cache_entry_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_decoder_dsc_t_type, - MP_QSTR_lv_image_decoder_dsc_t, + mp_lv_cache_entry_t_type, + MP_QSTR_lv_cache_entry_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_decoder_dsc_t_print, + print, mp_lv_cache_entry_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_decoder_dsc_t_attr, - locals_dict, &mp_lv_image_decoder_dsc_t_locals_dict, + attr, mp_lv_cache_entry_t_attr, + locals_dict, &mp_lv_cache_entry_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_cache_entry_t_type(void) { - return &mp_lv_image_decoder_dsc_t_type; + return &mp_lv_cache_entry_t_type; } /* * lvgl extension definition for: - * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) + * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_func_ptr)(dsc, src, args); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[2]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_open_mpobj, 3, mp_lv_image_decoder_open, lv_image_decoder_open); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_cb_t_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, funcptr_lv_cache_get_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -/* - * lvgl extension definition for: - * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) - */ - -static mp_obj_t mp_lv_image_decoder_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_area_t *decoded_area = mp_write_ptr_lv_area_t(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_func_ptr)(dsc, full_area, decoded_area); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_area_mpobj, 3, mp_lv_image_decoder_get_area, lv_image_decoder_get_area); - /* - * lvgl extension definition for: - * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_cb_callback' + * lv_cache_get_cb_t get_cb */ - -static mp_obj_t mp_lv_image_decoder_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - ((void (*)(lv_image_decoder_dsc_t *))lv_func_ptr)(dsc); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_close_mpobj, 1, mp_lv_image_decoder_close, lv_image_decoder_close); /* - * lvgl extension definition for: - * lv_image_decoder_t *lv_image_decoder_create(void) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_add_cb_callback' + * lv_cache_add_cb_t add_cb */ - -static mp_obj_t mp_lv_image_decoder_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_image_decoder_t((void*)_res); -} - - +#define funcptr_lv_cache_remove_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_create_mpobj, 0, mp_lv_image_decoder_create, lv_image_decoder_create); - /* * lvgl extension definition for: - * void lv_image_decoder_delete(lv_image_decoder_t *decoder) + * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_remove_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - ((void (*)(lv_image_decoder_t *))lv_func_ptr)(decoder); + void *user_data = mp_to_ptr(mp_args[2]); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_entry_t *, void *))lv_func_ptr)(cache, entry, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_delete_mpobj, 1, mp_lv_image_decoder_delete, lv_image_decoder_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_remove_cb_t_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, funcptr_lv_cache_remove_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_remove_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -/* - * lvgl extension definition for: - * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) - */ - -static mp_obj_t mp_lv_image_decoder_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_func_ptr)(decoder); - return mp_read_ptr_lv_image_decoder_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_next_mpobj, 1, mp_lv_image_decoder_get_next, lv_image_decoder_get_next); - /* - * Callback function lv_image_decoder_t_info_cb - * lv_result_t lv_image_decoder_info_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_remove_cb_callback' + * lv_cache_remove_cb_t remove_cb */ - -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, lv_image_header_t *arg2) -{ - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_args[2] = mp_read_ptr_lv_image_header_t((void*)arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_info_cb)), 3, mp_args); - return (int)mp_obj_get_int(callback_result); -} + +#define funcptr_lv_cache_drop_cb_t NULL /* * lvgl extension definition for: - * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) + * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_set_info_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_drop_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *info_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_info_cb_callback, MP_QSTR_lv_image_decoder_t_info_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_func_ptr)(decoder, info_cb); + void *user_data = mp_to_ptr(mp_args[2]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + ((void (*)(lv_cache_t *, const void *, void *))lv_func_ptr)(cache, key, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_info_cb_mpobj, 2, mp_lv_image_decoder_set_info_cb, lv_image_decoder_set_info_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_drop_cb_t_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, funcptr_lv_cache_drop_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_drop_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * Callback function lv_image_decoder_t_open_cb - * lv_result_t lv_image_decoder_open_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_cb_callback' + * lv_cache_drop_cb_t drop_cb */ + -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_open_cb)), 2, mp_args); - return (int)mp_obj_get_int(callback_result); -} +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_drop_all_cb_callback' + * lv_cache_drop_all_cb_t drop_all_cb + */ + +#define funcptr_lv_cache_get_victim_cb NULL /* * lvgl extension definition for: - * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) + * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_set_open_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_get_victim_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *open_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_open_cb_callback, MP_QSTR_lv_image_decoder_t_open_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_func_ptr)(decoder, open_cb); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_open_cb_mpobj, 2, mp_lv_image_decoder_set_open_cb, lv_image_decoder_set_open_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_get_victim_cb_mpobj, 2, mp_funcptr_lv_cache_get_victim_cb, funcptr_lv_cache_get_victim_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_get_victim_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * Callback function lv_image_decoder_t_read_line_cb - * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_get_victim_cb_callback' + * lv_cache_get_victim_cb get_victim_cb */ - -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_read_line_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) -{ - mp_obj_t mp_args[4]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_args[2] = mp_read_ptr_lv_area_t((void*)arg2); - mp_args[3] = mp_read_ptr_lv_area_t((void*)arg3); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_read_line_cb)), 4, mp_args); - return (int)mp_obj_get_int(callback_result); -} + +#define funcptr_lv_cache_reserve_cond_cb NULL /* * lvgl extension definition for: - * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t read_line_cb) + * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) */ -static mp_obj_t mp_lv_image_decoder_set_get_area_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_reserve_cond_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *read_line_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_read_line_cb_callback, MP_QSTR_lv_image_decoder_t_read_line_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_func_ptr)(decoder, read_line_cb); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[3]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t size = (size_t)mp_obj_get_int(mp_args[2]); + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_cache_reserve_cond_res_t _res = ((lv_cache_reserve_cond_res_t (*)(lv_cache_t *, const void *, size_t, void *))lv_func_ptr)(cache, key, size, user_data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_get_area_cb_mpobj, 2, mp_lv_image_decoder_set_get_area_cb, lv_image_decoder_set_get_area_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_reserve_cond_cb_mpobj, 4, mp_funcptr_lv_cache_reserve_cond_cb, funcptr_lv_cache_reserve_cond_cb); - -/* - * Callback function lv_image_decoder_t_close_cb - * void lv_image_decoder_close_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) - */ - -GENMPY_UNUSED static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_close_cb)), 2, mp_args); - return; -} +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_reserve_cond_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, func, NULL, MP_QSTR_, NULL); } /* - * lvgl extension definition for: - * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_reserve_cond_cb_callback' + * lv_cache_reserve_cond_cb reserve_cond_cb */ - -static mp_obj_t mp_lv_image_decoder_set_close_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - void *close_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_close_cb_callback, MP_QSTR_lv_image_decoder_t_close_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_func_ptr)(decoder, close_cb); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_close_cb_mpobj, 2, mp_lv_image_decoder_set_close_cb, lv_image_decoder_set_close_cb); +#define funcptr_lv_cache_iter_create_cb NULL + /* - * Struct lv_cache_slot_size_t + * Struct lv_iter_t */ -static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_slot_size_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_iter_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_slot_size_t_type())); - return (lv_cache_slot_size_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_iter_t_type())); + return (lv_iter_t*)self->data; } -#define mp_write_lv_cache_slot_size_t(struct_obj) *((lv_cache_slot_size_t*)mp_write_ptr_lv_cache_slot_size_t(struct_obj)) +#define mp_write_lv_iter_t(struct_obj) *((lv_iter_t*)mp_write_ptr_lv_iter_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_slot_size_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_iter_t(void *field) { - return lv_to_mp_struct(get_mp_lv_cache_slot_size_t_type(), field); + return lv_to_mp_struct(get_mp_lv_iter_t_type(), field); } -#define mp_read_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(copy_buffer(&field, sizeof(lv_cache_slot_size_t))) -#define mp_read_byref_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(&field) +#define mp_read_lv_iter_t(field) mp_read_ptr_lv_iter_t(copy_buffer(&field, sizeof(lv_iter_t))) +#define mp_read_byref_lv_iter_t(field) mp_read_ptr_lv_iter_t(&field) -static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_iter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)self->data; + GENMPY_UNUSED lv_iter_t *data = (lv_iter_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -19496,7 +20651,7 @@ static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * // store attribute switch(attr) { - case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + ; default: return; } @@ -19505,72 +20660,103 @@ static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * } } -static void mp_lv_cache_slot_size_t_print(const mp_print_t *print, +static void mp_lv_iter_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_cache_slot_size_t"); + mp_printf(print, "struct lv_iter_t"); } -static const mp_obj_dict_t mp_lv_cache_slot_size_t_locals_dict; +static const mp_obj_dict_t mp_lv_iter_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_cache_slot_size_t_type, - MP_QSTR_lv_cache_slot_size_t, + mp_lv_iter_t_type, + MP_QSTR_lv_iter_t, MP_TYPE_FLAG_NONE, - print, mp_lv_cache_slot_size_t_print, + print, mp_lv_iter_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_cache_slot_size_t_attr, - locals_dict, &mp_lv_cache_slot_size_t_locals_dict, + attr, mp_lv_iter_t_attr, + locals_dict, &mp_lv_iter_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_iter_t_type(void) { - return &mp_lv_cache_slot_size_t_type; + return &mp_lv_iter_t_type; } /* - * Struct lv_image_cache_data_t + * lvgl extension definition for: + * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) */ -static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void); +static mp_obj_t mp_funcptr_lv_cache_iter_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_cache_t *cache = mp_to_ptr(mp_args[0]); + lv_iter_t * _res = ((lv_iter_t *(*)(lv_cache_t *))lv_func_ptr)(cache); + return mp_read_ptr_lv_iter_t((void*)_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_cache_data_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_iter_create_cb_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, funcptr_lv_cache_iter_create_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_iter_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_class_t_iter_create_cb_callback' + * lv_cache_iter_create_cb iter_create_cb + */ + + +/* + * Struct lv_cache_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_class_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_cache_data_t_type())); - return (lv_image_cache_data_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_class_t_type())); + return (lv_cache_class_t*)self->data; } -#define mp_write_lv_image_cache_data_t(struct_obj) *((lv_image_cache_data_t*)mp_write_ptr_lv_image_cache_data_t(struct_obj)) +#define mp_write_lv_cache_class_t(struct_obj) *((lv_cache_class_t*)mp_write_ptr_lv_cache_class_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_cache_data_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_class_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_cache_data_t_type(), field); + return lv_to_mp_struct(get_mp_lv_cache_class_t_type(), field); } -#define mp_read_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(copy_buffer(&field, sizeof(lv_image_cache_data_t))) -#define mp_read_byref_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(&field) +#define mp_read_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(copy_buffer(&field, sizeof(lv_cache_class_t))) +#define mp_read_byref_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(&field) -static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_cache_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_cache_data_t *data = (lv_image_cache_data_t*)self->data; + GENMPY_UNUSED lv_cache_class_t *data = (lv_cache_class_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_slot: dest[0] = mp_read_byref_lv_cache_slot_size_t(data->slot); break; // converting from lv_cache_slot_size_t; - case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; - case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; - case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; - case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_alloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_alloc_cb_t_mpobj, data->alloc_cb, NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL); break; // converting from callback lv_cache_alloc_cb_t; + case MP_QSTR_init_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_init_cb_t_mpobj, data->init_cb, NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL); break; // converting from callback lv_cache_init_cb_t; + case MP_QSTR_destroy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->destroy_cb, NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL); break; // converting from callback lv_cache_destroy_cb_t; + case MP_QSTR_get_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->get_cb, NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL); break; // converting from callback lv_cache_get_cb_t; + case MP_QSTR_add_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_cb_t_mpobj, data->add_cb, NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL); break; // converting from callback lv_cache_add_cb_t; + case MP_QSTR_remove_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_remove_cb_t_mpobj, data->remove_cb, NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL); break; // converting from callback lv_cache_remove_cb_t; + case MP_QSTR_drop_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_drop_cb_t_mpobj, data->drop_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL); break; // converting from callback lv_cache_drop_cb_t; + case MP_QSTR_drop_all_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_destroy_cb_t_mpobj, data->drop_all_cb, NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL); break; // converting from callback lv_cache_drop_all_cb_t; + case MP_QSTR_get_victim_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_get_victim_cb_mpobj, data->get_victim_cb, NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL); break; // converting from callback lv_cache_get_victim_cb; + case MP_QSTR_reserve_cond_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_reserve_cond_cb_mpobj, data->reserve_cond_cb, NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL); break; // converting from callback lv_cache_reserve_cond_cb; + case MP_QSTR_iter_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_iter_create_cb_mpobj, data->iter_create_cb, NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL); break; // converting from callback lv_cache_iter_create_cb; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -19579,12 +20765,17 @@ static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_slot: data->slot = mp_write_lv_cache_slot_size_t(dest[1]); break; // converting to lv_cache_slot_size_t; - case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; - case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_alloc_cb: data->alloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_alloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_alloc_cb_t; + case MP_QSTR_init_cb: data->init_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_init_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_init_cb_t; + case MP_QSTR_destroy_cb: data->destroy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_destroy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_destroy_cb_t; + case MP_QSTR_get_cb: data->get_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_cb_t; + case MP_QSTR_add_cb: data->add_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_add_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_add_cb_t; + case MP_QSTR_remove_cb: data->remove_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_remove_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_remove_cb_t; + case MP_QSTR_drop_cb: data->drop_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_cb_t; + case MP_QSTR_drop_all_cb: data->drop_all_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_drop_all_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_drop_all_cb_t; + case MP_QSTR_get_victim_cb: data->get_victim_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_get_victim_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_get_victim_cb; + case MP_QSTR_reserve_cond_cb: data->reserve_cond_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_reserve_cond_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_reserve_cond_cb; + case MP_QSTR_iter_create_cb: data->iter_create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_class_t_iter_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_iter_create_cb; default: return; } @@ -19593,2521 +20784,2630 @@ static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_image_cache_data_t_print(const mp_print_t *print, +static void mp_lv_cache_class_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_cache_data_t"); + mp_printf(print, "struct lv_cache_class_t"); } -static const mp_obj_dict_t mp_lv_image_cache_data_t_locals_dict; +static const mp_obj_dict_t mp_lv_cache_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_cache_data_t_type, - MP_QSTR_lv_image_cache_data_t, + mp_lv_cache_class_t_type, + MP_QSTR_lv_cache_class_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_cache_data_t_print, + print, mp_lv_cache_class_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_cache_data_t_attr, - locals_dict, &mp_lv_image_cache_data_t_locals_dict, + attr, mp_lv_cache_class_t_attr, + locals_dict, &mp_lv_cache_class_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_cache_class_t_type(void) { - return &mp_lv_image_cache_data_t_type; + return &mp_lv_cache_class_t_type; } +#define funcptr_lv_cache_compare_cb_t NULL + /* * lvgl extension definition for: - * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) + * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) */ -static mp_obj_t mp_lv_image_decoder_add_to_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_compare_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(mp_args[1]); - const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[2]); - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_func_ptr)(decoder, search_key, decoded, user_data); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + const void *a = (const void *)mp_to_ptr(mp_args[0]); + const void *b = (const void *)mp_to_ptr(mp_args[1]); + lv_cache_compare_res_t _res = ((lv_cache_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_add_to_cache_mpobj, 4, mp_lv_image_decoder_add_to_cache, lv_image_decoder_add_to_cache); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_compare_cb_t_mpobj, 2, mp_funcptr_lv_cache_compare_cb_t, funcptr_lv_cache_compare_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_compare_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * lvgl extension definition for: - * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_compare_cb_callback' + * lv_cache_compare_cb_t compare_cb */ - -static mp_obj_t mp_lv_image_decoder_post_process(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); - lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(dsc, decoded); - return mp_read_ptr_lv_draw_buf_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_post_process_mpobj, 2, mp_lv_image_decoder_post_process, lv_image_decoder_post_process); +#define funcptr_lv_cache_create_cb_t NULL + /* * lvgl extension definition for: - * lv_image_src_t lv_image_src_get_type(const void *src) + * bool lv_cache_create_cb_t(void *node, void *user_data) */ -static mp_obj_t mp_lv_image_src_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_create_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *src = (const void *)mp_to_ptr(mp_args[0]); - lv_image_src_t _res = ((lv_image_src_t (*)(const void *))lv_func_ptr)(src); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[1]); + void *node = mp_to_ptr(mp_args[0]); + bool _res = ((bool (*)(void *, void *))lv_func_ptr)(node, user_data); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_src_get_type_mpobj, 1, mp_lv_image_src_get_type, lv_image_src_get_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_create_cb_t_mpobj, 2, mp_funcptr_lv_cache_create_cb_t, funcptr_lv_cache_create_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_create_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_create_cb_callback' + * lv_cache_create_cb_t create_cb + */ +#define funcptr_lv_cache_free_cb_t NULL + /* * lvgl extension definition for: - * void lv_image_set_src(lv_obj_t *obj, const void *src) + * void lv_cache_free_cb_t(void *node, void *user_data) */ -static mp_obj_t mp_lv_image_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_cache_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - ((void (*)(lv_obj_t *, const void *))lv_func_ptr)(obj, src); + void *user_data = mp_to_ptr(mp_args[1]); + void *node = mp_to_ptr(mp_args[0]); + ((void (*)(void *, void *))lv_func_ptr)(node, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_src_mpobj, 2, mp_lv_image_set_src, lv_image_set_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_cache_free_cb_t_mpobj, 2, mp_funcptr_lv_cache_free_cb_t, funcptr_lv_cache_free_cb_t); -/* Reusing lv_obj_move_to_index for lv_image_set_offset_x */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_cache_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_x); - -/* Reusing lv_obj_move_to_index for lv_image_set_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_y); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_cache_ops_t_free_cb_callback' + * lv_cache_free_cb_t free_cb + */ -/* Reusing lv_obj_move_to_index for lv_image_set_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_rotation); - -/* Reusing lv_obj_set_pos for lv_image_set_pivot */ +/* + * Struct lv_cache_ops_t + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_mpobj, 3, mp_lv_obj_set_pos, lv_image_set_pivot); - -/* Reusing lv_obj_move_to_index for lv_image_set_pivot_x */ +static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_x); - -/* Reusing lv_obj_move_to_index for lv_image_set_pivot_y */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_ops_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_ops_t_type())); + return (lv_cache_ops_t*)self->data; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_y); - -/* Reusing lv_obj_delete_delayed for lv_image_set_scale */ +#define mp_write_lv_cache_ops_t(struct_obj) *((lv_cache_ops_t*)mp_write_ptr_lv_cache_ops_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale); - -/* Reusing lv_obj_delete_delayed for lv_image_set_scale_x */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_ops_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_cache_ops_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_x); - -/* Reusing lv_obj_delete_delayed for lv_image_set_scale_y */ +#define mp_read_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(copy_buffer(&field, sizeof(lv_cache_ops_t))) +#define mp_read_byref_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_y); - +static void mp_lv_cache_ops_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_cache_ops_t *data = (lv_cache_ops_t*)self->data; -/* - * lvgl extension definition for: - * void lv_image_set_blend_mode(lv_obj_t *obj, lv_blend_mode_t blend_mode) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_compare_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_compare_cb_t_mpobj, data->compare_cb, NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL); break; // converting from callback lv_cache_compare_cb_t; + case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_create_cb_t_mpobj, data->create_cb, NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL); break; // converting from callback lv_cache_create_cb_t; + case MP_QSTR_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_cache_free_cb_t_mpobj, data->free_cb, NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL); break; // converting from callback lv_cache_free_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_compare_cb: data->compare_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_compare_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_compare_cb_t; + case MP_QSTR_create_cb: data->create_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_create_cb_t; + case MP_QSTR_free_cb: data->free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_cache_ops_t_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_cache_free_cb_t; + default: return; + } -static mp_obj_t mp_lv_image_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_cache_ops_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_blend_mode_t blend_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_blend_mode_t))lv_func_ptr)(obj, blend_mode); - return mp_const_none; + mp_printf(print, "struct lv_cache_ops_t"); } - +static const mp_obj_dict_t mp_lv_cache_ops_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_blend_mode_mpobj, 2, mp_lv_image_set_blend_mode, lv_image_set_blend_mode); - -/* Reusing lv_obj_set_radio_button for lv_image_set_antialias */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_cache_ops_t_type, + MP_QSTR_lv_cache_ops_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_cache_ops_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_cache_ops_t_attr, + locals_dict, &mp_lv_cache_ops_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_antialias_mpobj, 2, mp_lv_obj_set_radio_button, lv_image_set_antialias); +static inline const mp_obj_type_t *get_mp_lv_cache_ops_t_type(void) +{ + return &mp_lv_cache_ops_t_type; +} /* - * lvgl extension definition for: - * void lv_image_set_inner_align(lv_obj_t *obj, lv_image_align_t align) + * Struct lv_cache_t */ -static mp_obj_t mp_lv_image_set_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_image_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_image_align_t))lv_func_ptr)(obj, align); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_t_type())); + return (lv_cache_t*)self->data; } - +#define mp_write_lv_cache_t(struct_obj) *((lv_cache_t*)mp_write_ptr_lv_cache_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_inner_align_mpobj, 2, mp_lv_image_set_inner_align, lv_image_set_inner_align); - +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_cache_t_type(), field); +} -/* - * lvgl extension definition for: - * void lv_image_set_bitmap_map_src(lv_obj_t *obj, const lv_image_dsc_t *src) - */ +#define mp_read_lv_cache_t(field) mp_read_ptr_lv_cache_t(copy_buffer(&field, sizeof(lv_cache_t))) +#define mp_read_byref_lv_cache_t(field) mp_read_ptr_lv_cache_t(&field) -static mp_obj_t mp_lv_image_set_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_cache_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_image_dsc_t *src = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); - ((void (*)(lv_obj_t *, const lv_image_dsc_t *))lv_func_ptr)(obj, src); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_cache_t *data = (lv_cache_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_clz: dest[0] = mp_read_ptr_lv_cache_class_t((void*)data->clz); break; // converting from lv_cache_class_t *; + case MP_QSTR_node_size: dest[0] = mp_obj_new_int_from_uint(data->node_size); break; // converting from uint32_t; + case MP_QSTR_max_size: dest[0] = mp_obj_new_int_from_uint(data->max_size); break; // converting from uint32_t; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; + case MP_QSTR_ops: dest[0] = mp_read_byref_lv_cache_ops_t(data->ops); break; // converting from lv_cache_ops_t; + case MP_QSTR_lock: dest[0] = mp_obj_new_int(data->lock); break; // converting from lv_mutex_t; + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_clz: data->clz = (void*)mp_write_ptr_lv_cache_class_t(dest[1]); break; // converting to lv_cache_class_t *; + case MP_QSTR_node_size: data->node_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_max_size: data->max_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_ops: data->ops = mp_write_lv_cache_ops_t(dest[1]); break; // converting to lv_cache_ops_t; + case MP_QSTR_lock: data->lock = (int)mp_obj_get_int(dest[1]); break; // converting to lv_mutex_t; + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - +static void mp_lv_cache_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_cache_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_bitmap_map_src_mpobj, 2, mp_lv_image_set_bitmap_map_src, lv_image_set_bitmap_map_src); - +static const mp_obj_dict_t mp_lv_cache_t_locals_dict; -/* - * lvgl extension definition for: - * const void *lv_image_get_src(lv_obj_t *obj) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_cache_t_type, + MP_QSTR_lv_cache_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_cache_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_cache_t_attr, + locals_dict, &mp_lv_cache_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_image_get_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_cache_t_type(void) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void * _res = ((const void *(*)(lv_obj_t *))lv_func_ptr)(obj); - return ptr_to_mp((void*)_res); + return &mp_lv_cache_t_type; } + - +/* + * Struct lv_image_decoder_dsc_t + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_mpobj, 1, mp_lv_image_get_src, lv_image_get_src); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_x */ +static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_x); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_y */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_decoder_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_decoder_dsc_t_type())); + return (lv_image_decoder_dsc_t*)self->data; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_y); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_rotation */ +#define mp_write_lv_image_decoder_dsc_t(struct_obj) *((lv_image_decoder_dsc_t*)mp_write_ptr_lv_image_decoder_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_rotation); - -/* Reusing lv_obj_get_scroll_end for lv_image_get_pivot */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_decoder_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_image_decoder_dsc_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_pivot_mpobj, 2, mp_lv_obj_get_scroll_end, lv_image_get_pivot); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale */ +#define mp_read_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(copy_buffer(&field, sizeof(lv_image_decoder_dsc_t))) +#define mp_read_byref_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_x */ +static void mp_lv_image_decoder_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_x); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_y */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; + case MP_QSTR_args: dest[0] = mp_read_byref_lv_image_decoder_args_t(data->args); break; // converting from lv_image_decoder_args_t; + case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; + case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; + case MP_QSTR_file: dest[0] = mp_read_byref_lv_fs_file_t(data->file); break; // converting from lv_fs_file_t; + case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; + case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; + case MP_QSTR_palette: dest[0] = mp_read_ptr_lv_color32_t((void*)data->palette); break; // converting from lv_color32_t *; + case MP_QSTR_palette_size: dest[0] = mp_obj_new_int_from_uint(data->palette_size); break; // converting from uint32_t; + case MP_QSTR_time_to_open: dest[0] = mp_obj_new_int_from_uint(data->time_to_open); break; // converting from uint32_t; + case MP_QSTR_error_msg: dest[0] = convert_to_str((void*)data->error_msg); break; // converting from char *; + case MP_QSTR_cache: dest[0] = mp_read_ptr_lv_cache_t((void*)data->cache); break; // converting from lv_cache_t *; + case MP_QSTR_cache_entry: dest[0] = mp_read_ptr_lv_cache_entry_t((void*)data->cache_entry); break; // converting from lv_cache_entry_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; + case MP_QSTR_args: data->args = mp_write_lv_image_decoder_args_t(dest[1]); break; // converting to lv_image_decoder_args_t; + case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; + case MP_QSTR_file: data->file = mp_write_lv_fs_file_t(dest[1]); break; // converting to lv_fs_file_t; + case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; + case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_palette: data->palette = (void*)mp_write_ptr_lv_color32_t(dest[1]); break; // converting to lv_color32_t *; + case MP_QSTR_palette_size: data->palette_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_time_to_open: data->time_to_open = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_error_msg: data->error_msg = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_cache: data->cache = (void*)mp_write_ptr_lv_cache_t(dest[1]); break; // converting to lv_cache_t *; + case MP_QSTR_cache_entry: data->cache_entry = (void*)mp_write_ptr_lv_cache_entry_t(dest[1]); break; // converting to lv_cache_entry_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + default: return; + } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_y); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_width */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_width); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_height */ +static void mp_lv_image_decoder_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_image_decoder_dsc_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_height); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_width */ +static const mp_obj_dict_t mp_lv_image_decoder_dsc_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_width); - -/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_height */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_image_decoder_dsc_t_type, + MP_QSTR_lv_image_decoder_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_image_decoder_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_image_decoder_dsc_t_attr, + locals_dict, &mp_lv_image_decoder_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_height); +static inline const mp_obj_type_t *get_mp_lv_image_decoder_dsc_t_type(void) +{ + return &mp_lv_image_decoder_dsc_t_type; +} /* * lvgl extension definition for: - * lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t *obj) + * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) */ -static mp_obj_t mp_lv_image_get_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_blend_mode_t _res = ((lv_blend_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_func_ptr)(dsc, src, args); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_blend_mode_mpobj, 1, mp_lv_image_get_blend_mode, lv_image_get_blend_mode); - -/* Reusing lv_obj_refr_size for lv_image_get_antialias */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_antialias_mpobj, 1, mp_lv_obj_refr_size, lv_image_get_antialias); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_open_mpobj, 3, mp_lv_image_decoder_open, lv_image_decoder_open); /* * lvgl extension definition for: - * lv_image_align_t lv_image_get_inner_align(lv_obj_t *obj) + * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) */ -static mp_obj_t mp_lv_image_get_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_image_align_t _res = ((lv_image_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_area_t *decoded_area = mp_write_ptr_lv_area_t(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_func_ptr)(dsc, full_area, decoded_area); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_inner_align_mpobj, 1, mp_lv_image_get_inner_align, lv_image_get_inner_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_area_mpobj, 3, mp_lv_image_decoder_get_area, lv_image_decoder_get_area); /* * lvgl extension definition for: - * const lv_image_dsc_t *lv_image_get_bitmap_map_src(lv_obj_t *obj) + * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) */ -static mp_obj_t mp_lv_image_get_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_image_dsc_t * _res = ((const lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_image_dsc_t((void*)_res); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + ((void (*)(lv_image_decoder_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_bitmap_map_src_mpobj, 1, mp_lv_image_get_bitmap_map_src, lv_image_get_bitmap_map_src); - -/* Reusing lv_obj_bind_checked for lv_image_bind_src */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_bind_src_mpobj, 2, mp_lv_obj_bind_checked, lv_image_bind_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_close_mpobj, 1, mp_lv_image_decoder_close, lv_image_decoder_close); /* * lvgl extension definition for: - * lv_result_t lv_image_header_cache_init(uint32_t count) + * lv_image_decoder_t *lv_image_decoder_create(void) */ -static mp_obj_t mp_lv_image_header_cache_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t count = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(uint32_t))lv_func_ptr)(count); - return mp_obj_new_int(_res); + + lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_image_decoder_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_init_mpobj, 1, mp_lv_image_header_cache_init, lv_image_header_cache_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_create_mpobj, 0, mp_lv_image_decoder_create, lv_image_decoder_create); /* * lvgl extension definition for: - * void lv_image_header_cache_resize(uint32_t count, bool evict_now) + * void lv_image_decoder_delete(lv_image_decoder_t *decoder) */ -static mp_obj_t mp_lv_image_header_cache_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t count = (uint32_t)mp_obj_get_int(mp_args[0]); - bool evict_now = mp_obj_is_true(mp_args[1]); - ((void (*)(uint32_t, bool))lv_func_ptr)(count, evict_now); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + ((void (*)(lv_image_decoder_t *))lv_func_ptr)(decoder); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_resize_mpobj, 2, mp_lv_image_header_cache_resize, lv_image_header_cache_resize); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_delete_mpobj, 1, mp_lv_image_decoder_delete, lv_image_decoder_delete); /* * lvgl extension definition for: - * void lv_image_header_cache_drop(const void *src) + * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) */ -static mp_obj_t mp_lv_image_header_cache_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *src = (const void *)mp_to_ptr(mp_args[0]); - ((void (*)(const void *))lv_func_ptr)(src); - return mp_const_none; -} - + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + lv_image_decoder_t * _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_func_ptr)(decoder); + return mp_read_ptr_lv_image_decoder_t((void*)_res); +} + -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_drop_mpobj, 1, mp_lv_image_header_cache_drop, lv_image_header_cache_drop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_get_next_mpobj, 1, mp_lv_image_decoder_get_next, lv_image_decoder_get_next); /* - * lvgl extension definition for: - * bool lv_image_header_cache_is_enabled(void) + * Callback function lv_image_decoder_t_info_cb + * lv_result_t lv_image_decoder_info_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) */ -static mp_obj_t mp_lv_image_header_cache_is_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, lv_image_header_t *arg2) { - - bool _res = ((bool (*)(void))lv_func_ptr)(); - return convert_to_bool(_res); + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + mp_args[2] = mp_read_ptr_lv_image_header_t((void*)arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_info_cb)), 3, mp_args); + return (int)mp_obj_get_int(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_is_enabled_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_image_header_cache_is_enabled); - /* * lvgl extension definition for: - * lv_iter_t *lv_image_header_cache_iter_create(void) + * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) */ -static mp_obj_t mp_lv_image_header_cache_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_set_info_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_iter_t * _res = ((lv_iter_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_iter_t((void*)_res); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *info_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_info_cb_callback, MP_QSTR_lv_image_decoder_t_info_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_func_ptr)(decoder, info_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_iter_create_mpobj, 0, mp_lv_image_header_cache_iter_create, lv_image_header_cache_iter_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_info_cb_mpobj, 2, mp_lv_image_decoder_set_info_cb, lv_image_decoder_set_info_cb); -/* Reusing lv_obj_style_init for lv_image_header_cache_dump */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_dump_mpobj, 0, mp_lv_obj_style_init, lv_image_header_cache_dump); - -/* Reusing lv_image_header_cache_init for lv_image_cache_init */ +/* + * Callback function lv_image_decoder_t_open_cb + * lv_result_t lv_image_decoder_open_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_init_mpobj, 1, mp_lv_image_header_cache_init, lv_image_cache_init); - -/* Reusing lv_image_header_cache_resize for lv_image_cache_resize */ +GENMPY_UNUSED static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_open_cb)), 2, mp_args); + return (int)mp_obj_get_int(callback_result); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_resize_mpobj, 2, mp_lv_image_header_cache_resize, lv_image_cache_resize); - -/* Reusing lv_image_header_cache_drop for lv_image_cache_drop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_drop_mpobj, 1, mp_lv_image_header_cache_drop, lv_image_cache_drop); - -/* Reusing lv_image_header_cache_is_enabled for lv_image_cache_is_enabled */ +/* + * lvgl extension definition for: + * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_is_enabled_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_image_cache_is_enabled); - -/* Reusing lv_image_header_cache_iter_create for lv_image_cache_iter_create */ +static mp_obj_t mp_lv_image_decoder_set_open_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *open_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_open_cb_callback, MP_QSTR_lv_image_decoder_t_open_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_func_ptr)(decoder, open_cb); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_iter_create_mpobj, 0, mp_lv_image_header_cache_iter_create, lv_image_cache_iter_create); - -/* Reusing lv_obj_style_init for lv_image_cache_dump */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_dump_mpobj, 0, mp_lv_obj_style_init, lv_image_cache_dump); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_open_cb_mpobj, 2, mp_lv_image_decoder_set_open_cb, lv_image_decoder_set_open_cb); +/* + * Callback function lv_image_decoder_t_get_area_cb + * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + */ + +GENMPY_UNUSED static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) +{ + mp_obj_t mp_args[4]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + mp_args[2] = mp_read_ptr_lv_area_t((void*)arg2); + mp_args[3] = mp_read_ptr_lv_area_t((void*)arg3); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_get_area_cb)), 4, mp_args); + return (int)mp_obj_get_int(callback_result); +} + + /* * lvgl extension definition for: - * void lv_image_buf_get_transformed_area(lv_area_t *res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x, uint16_t scale_y, const lv_point_t *pivot) + * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t get_area_cb) */ -static mp_obj_t mp_lv_image_buf_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_set_get_area_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t h = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t angle = (int32_t)mp_obj_get_int(mp_args[3]); - uint16_t scale_x = (uint16_t)mp_obj_get_int(mp_args[4]); - uint16_t scale_y = (uint16_t)mp_obj_get_int(mp_args[5]); - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[6]); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, uint16_t, uint16_t, const lv_point_t *))lv_func_ptr)(res, w, h, angle, scale_x, scale_y, pivot); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *get_area_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_get_area_cb_callback, MP_QSTR_lv_image_decoder_t_get_area_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_func_ptr)(decoder, get_area_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_buf_get_transformed_area_mpobj, 7, mp_lv_image_buf_get_transformed_area, lv_image_buf_get_transformed_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_get_area_cb_mpobj, 2, mp_lv_image_decoder_set_get_area_cb, lv_image_decoder_set_get_area_cb); +/* + * Callback function lv_image_decoder_t_close_cb + * void lv_image_decoder_close_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + */ + +GENMPY_UNUSED static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_close_cb)), 2, mp_args); + return; +} + + /* * lvgl extension definition for: - * void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count) + * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) */ -static mp_obj_t mp_lv_image_decoder_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_set_close_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t image_cache_size = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t image_header_count = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(uint32_t, uint32_t))lv_func_ptr)(image_cache_size, image_header_count); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + void *close_cb = mp_lv_callback(mp_args[1], &lv_image_decoder_t_close_cb_callback, MP_QSTR_lv_image_decoder_t_close_cb, &decoder->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_func_ptr)(decoder, close_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_init_mpobj, 2, mp_lv_image_decoder_init, lv_image_decoder_init); - -/* Reusing lv_obj_style_init for lv_image_decoder_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_deinit_mpobj, 0, mp_lv_obj_style_init, lv_image_decoder_deinit); - -/* Reusing lv_obj_create for lv_image_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_create_mpobj, 1, mp_lv_obj_create, lv_image_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_set_close_cb_mpobj, 2, mp_lv_image_decoder_set_close_cb, lv_image_decoder_set_close_cb); /* - * lvgl image object definitions + * lvgl extension definition for: + * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) */ - - -static const mp_rom_map_elem_t image_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_buf_set_palette), MP_ROM_PTR(&mp_lv_image_buf_set_palette_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_buf_free), MP_ROM_PTR(&mp_lv_image_buf_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_get_info), MP_ROM_PTR(&mp_lv_image_decoder_get_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_open), MP_ROM_PTR(&mp_lv_image_decoder_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_get_area), MP_ROM_PTR(&mp_lv_image_decoder_get_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_close), MP_ROM_PTR(&mp_lv_image_decoder_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_create), MP_ROM_PTR(&mp_lv_image_decoder_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_delete), MP_ROM_PTR(&mp_lv_image_decoder_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_get_next), MP_ROM_PTR(&mp_lv_image_decoder_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_info_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_info_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_open_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_open_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_get_area_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_get_area_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_set_close_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_close_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_add_to_cache), MP_ROM_PTR(&mp_lv_image_decoder_add_to_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_post_process), MP_ROM_PTR(&mp_lv_image_decoder_post_process_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_src_get_type), MP_ROM_PTR(&mp_lv_image_src_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_image_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset_x), MP_ROM_PTR(&mp_lv_image_set_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset_y), MP_ROM_PTR(&mp_lv_image_set_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_image_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pivot), MP_ROM_PTR(&mp_lv_image_set_pivot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pivot_x), MP_ROM_PTR(&mp_lv_image_set_pivot_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pivot_y), MP_ROM_PTR(&mp_lv_image_set_pivot_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_image_set_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale_x), MP_ROM_PTR(&mp_lv_image_set_scale_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale_y), MP_ROM_PTR(&mp_lv_image_set_scale_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_image_set_blend_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_antialias), MP_ROM_PTR(&mp_lv_image_set_antialias_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_inner_align), MP_ROM_PTR(&mp_lv_image_set_inner_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_set_bitmap_map_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src), MP_ROM_PTR(&mp_lv_image_get_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_image_get_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_image_get_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_image_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pivot), MP_ROM_PTR(&mp_lv_image_get_pivot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_image_get_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale_x), MP_ROM_PTR(&mp_lv_image_get_scale_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale_y), MP_ROM_PTR(&mp_lv_image_get_scale_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_width), MP_ROM_PTR(&mp_lv_image_get_src_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_height), MP_ROM_PTR(&mp_lv_image_get_src_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transformed_width), MP_ROM_PTR(&mp_lv_image_get_transformed_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_transformed_height), MP_ROM_PTR(&mp_lv_image_get_transformed_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_blend_mode), MP_ROM_PTR(&mp_lv_image_get_blend_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_antialias), MP_ROM_PTR(&mp_lv_image_get_antialias_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_inner_align), MP_ROM_PTR(&mp_lv_image_get_inner_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_get_bitmap_map_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_src), MP_ROM_PTR(&mp_lv_image_bind_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_init), MP_ROM_PTR(&mp_lv_image_header_cache_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_resize), MP_ROM_PTR(&mp_lv_image_header_cache_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_drop), MP_ROM_PTR(&mp_lv_image_header_cache_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_header_cache_is_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_iter_create), MP_ROM_PTR(&mp_lv_image_header_cache_iter_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_cache_dump), MP_ROM_PTR(&mp_lv_image_header_cache_dump_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_init), MP_ROM_PTR(&mp_lv_image_cache_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_resize), MP_ROM_PTR(&mp_lv_image_cache_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_drop), MP_ROM_PTR(&mp_lv_image_cache_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_cache_is_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_iter_create), MP_ROM_PTR(&mp_lv_image_cache_iter_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_dump), MP_ROM_PTR(&mp_lv_image_cache_dump_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_buf_get_transformed_area), MP_ROM_PTR(&mp_lv_image_buf_get_transformed_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_init), MP_ROM_PTR(&mp_lv_image_decoder_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decoder_deinit), MP_ROM_PTR(&mp_lv_image_decoder_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_FLAGS), MP_ROM_PTR(&mp_lv_LV_IMAGE_FLAGS_type_base) }, - { MP_ROM_QSTR(MP_QSTR_COMPRESS), MP_ROM_PTR(&mp_lv_LV_IMAGE_COMPRESS_type_base) }, - { MP_ROM_QSTR(MP_QSTR_SRC), MP_ROM_PTR(&mp_lv_LV_IMAGE_SRC_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ALIGN), MP_ROM_PTR(&mp_lv_LV_IMAGE_ALIGN_type_base) } -}; -static MP_DEFINE_CONST_DICT(image_locals_dict, image_locals_dict_table); - -static void image_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_image_decoder_post_process(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "lvgl image"); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(mp_args[0]); + lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(dsc, decoded); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_post_process_mpobj, 2, mp_lv_image_decoder_post_process, lv_image_decoder_post_process); + -static mp_obj_t image_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +/* + * lvgl extension definition for: + * void lv_image_cache_drop(const void *src) + */ + +static mp_obj_t mp_lv_image_cache_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_image_create_mpobj, type, n_args, n_kw, args); + const void *src = (const void *)mp_to_ptr(mp_args[0]); + ((void (*)(const void *))lv_func_ptr)(src); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_type_base, - MP_QSTR_image, - MP_TYPE_FLAG_NONE, - print, image_print, - make_new, image_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &image_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_image_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_image_class, -#endif - .mp_obj_type = &mp_lv_image_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_drop_mpobj, 1, mp_lv_image_cache_drop, lv_image_cache_drop); /* - * Array convertors for void *[] + * lvgl extension definition for: + * lv_image_src_t lv_image_src_get_type(const void *src) */ -GENMPY_UNUSED static void * *mp_arr_to_void_ptr____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_image_src_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - void * *lv_arr = (void **)m_malloc(len * sizeof(void *)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_to_ptr(item); - } - return (void * *)lv_arr; + const void *src = (const void *)mp_to_ptr(mp_args[0]); + lv_image_src_t _res = ((lv_image_src_t (*)(const void *))lv_func_ptr)(src); + return mp_obj_new_int(_res); } -GENMPY_UNUSED static mp_obj_t mp_arr_from_void_ptr____(const void * *arr) -{ - return ptr_to_mp((void*)arr); -} + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_src_get_type_mpobj, 1, mp_lv_image_src_get_type, lv_image_src_get_type); + /* * lvgl extension definition for: - * void lv_animimg_set_src(lv_obj_t *obj, const void *dsc[], size_t num) + * void lv_image_set_src(lv_obj_t *obj, const void *src) */ -static mp_obj_t mp_lv_animimg_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void **dsc = (const void **)mp_arr_to_void_ptr____(mp_args[1]); - size_t num = (size_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const void *[], size_t))lv_func_ptr)(obj, dsc, num); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + ((void (*)(lv_obj_t *, const void *))lv_func_ptr)(obj, src); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_src_mpobj, 2, mp_lv_image_set_src, lv_image_set_src); -/* Reusing lv_animimg_set_src for lv_animimg_set_src_reverse */ +/* Reusing lv_obj_move_to_index for lv_image_set_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_reverse_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src_reverse); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_x); -/* Reusing lv_obj_move_foreground for lv_animimg_start */ +/* Reusing lv_obj_move_to_index for lv_image_set_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_start_mpobj, 1, mp_lv_obj_move_foreground, lv_animimg_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_offset_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_offset_y); -/* Reusing lv_obj_refr_size for lv_animimg_delete */ +/* Reusing lv_obj_move_to_index for lv_image_set_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_delete_mpobj, 1, mp_lv_obj_refr_size, lv_animimg_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_rotation); -/* Reusing lv_obj_delete_delayed for lv_animimg_set_duration */ +/* Reusing lv_obj_set_pos for lv_image_set_pivot */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_mpobj, 3, mp_lv_obj_set_pos, lv_image_set_pivot); -/* Reusing lv_obj_delete_delayed for lv_animimg_set_repeat_count */ +/* Reusing lv_obj_move_to_index for lv_image_set_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_repeat_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_x_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_x); -/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_duration */ +/* Reusing lv_obj_move_to_index for lv_image_set_pivot_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_pivot_y_mpobj, 2, mp_lv_obj_move_to_index, lv_image_set_pivot_y); -/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_delay */ +/* Reusing lv_obj_delete_delayed for lv_image_set_scale */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_delay_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale); +/* Reusing lv_obj_delete_delayed for lv_image_set_scale_x */ -/* - * Callback function lv_obj_t_start_cb - * void lv_anim_start_cb_t(lv_anim_t *) - */ - -GENMPY_UNUSED static void lv_obj_t_start_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_start_cb)), 1, mp_args); - return; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_x); + +/* Reusing lv_obj_delete_delayed for lv_image_set_scale_y */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_scale_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_image_set_scale_y); + /* * lvgl extension definition for: - * void lv_animimg_set_start_cb(lv_obj_t *obj, lv_anim_start_cb_t start_cb) + * void lv_image_set_blend_mode(lv_obj_t *obj, lv_blend_mode_t blend_mode) */ -static mp_obj_t mp_lv_animimg_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - void *start_cb = mp_lv_callback(mp_args[1], &lv_obj_t_start_cb_callback, MP_QSTR_lv_obj_t_start_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_obj_t *, lv_anim_start_cb_t))lv_func_ptr)(obj, start_cb); + lv_blend_mode_t blend_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_blend_mode_t))lv_func_ptr)(obj, blend_mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_start_cb_mpobj, 2, mp_lv_animimg_set_start_cb, lv_animimg_set_start_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_blend_mode_mpobj, 2, mp_lv_image_set_blend_mode, lv_image_set_blend_mode); +/* Reusing lv_obj_set_hidden for lv_image_set_antialias */ -/* - * Callback function lv_obj_t_completed_cb - * void lv_anim_completed_cb_t(lv_anim_t *) - */ - -GENMPY_UNUSED static void lv_obj_t_completed_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_completed_cb)), 1, mp_args); - return; -} - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_antialias_mpobj, 2, mp_lv_obj_set_hidden, lv_image_set_antialias); + /* * lvgl extension definition for: - * void lv_animimg_set_completed_cb(lv_obj_t *obj, lv_anim_completed_cb_t completed_cb) + * void lv_image_set_inner_align(lv_obj_t *obj, lv_image_align_t align) */ -static mp_obj_t mp_lv_animimg_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_set_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - void *completed_cb = mp_lv_callback(mp_args[1], &lv_obj_t_completed_cb_callback, MP_QSTR_lv_obj_t_completed_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_obj_t *, lv_anim_completed_cb_t))lv_func_ptr)(obj, completed_cb); + lv_image_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_image_align_t))lv_func_ptr)(obj, align); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_completed_cb_mpobj, 2, mp_lv_animimg_set_completed_cb, lv_animimg_set_completed_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_inner_align_mpobj, 2, mp_lv_image_set_inner_align, lv_image_set_inner_align); /* * lvgl extension definition for: - * uint8_t lv_animimg_get_src_count(lv_obj_t *obj) + * void lv_image_set_bitmap_map_src(lv_obj_t *obj, const lv_image_dsc_t *src) */ -static mp_obj_t mp_lv_animimg_get_src_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_set_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint8_t _res = ((uint8_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); + const lv_image_dsc_t *src = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); + ((void (*)(lv_obj_t *, const lv_image_dsc_t *))lv_func_ptr)(obj, src); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_src_count_mpobj, 1, mp_lv_animimg_get_src_count, lv_animimg_get_src_count); - -/* Reusing lv_obj_get_event_count for lv_animimg_get_duration */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_duration); - -/* Reusing lv_obj_get_event_count for lv_animimg_get_repeat_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_repeat_count_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_set_bitmap_map_src_mpobj, 2, mp_lv_image_set_bitmap_map_src, lv_image_set_bitmap_map_src); /* * lvgl extension definition for: - * lv_anim_t *lv_animimg_get_anim(lv_obj_t *obj) + * const void *lv_image_get_src(lv_obj_t *obj) */ -static mp_obj_t mp_lv_animimg_get_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_get_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_anim_t((void*)_res); + const void * _res = ((const void *(*)(lv_obj_t *))lv_func_ptr)(obj); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_anim_mpobj, 1, mp_lv_animimg_get_anim, lv_animimg_get_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_mpobj, 1, mp_lv_image_get_src, lv_image_get_src); -/* Reusing lv_obj_create for lv_animimg_create */ +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_create_mpobj, 1, mp_lv_obj_create, lv_animimg_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_x); +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_offset_y */ -/* - * lvgl animimg object definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_offset_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_offset_y); +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_rotation */ -static const mp_rom_map_elem_t animimg_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_animimg_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_reverse), MP_ROM_PTR(&mp_lv_animimg_set_src_reverse_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_animimg_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_animimg_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_animimg_set_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_animimg_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_animimg_set_reverse_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_animimg_set_reverse_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_animimg_set_start_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_animimg_set_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_count), MP_ROM_PTR(&mp_lv_animimg_get_src_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_duration), MP_ROM_PTR(&mp_lv_animimg_get_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_animimg_get_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_anim), MP_ROM_PTR(&mp_lv_animimg_get_anim_mpobj) } -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_rotation); + +/* Reusing lv_obj_get_scroll_end for lv_image_get_pivot */ -static MP_DEFINE_CONST_DICT(animimg_locals_dict, animimg_locals_dict_table); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_pivot_mpobj, 2, mp_lv_obj_get_scroll_end, lv_image_get_pivot); + +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale */ -static void animimg_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl animimg"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale); + +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_x */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_x_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_x); + +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_scale_y */ -static mp_obj_t animimg_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_animimg_create_mpobj, type, n_args, n_kw, args); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_scale_y_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_scale_y); + +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_width */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_width); + +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_src_height */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_animimg_type_base, - MP_QSTR_animimg, - MP_TYPE_FLAG_NONE, - print, animimg_print, - make_new, animimg_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &animimg_locals_dict -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_src_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_src_height); + +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_width */ -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_animimg_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_animimg_class, -#endif - .mp_obj_type = &mp_lv_animimg_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_width); + +/* Reusing lv_obj_get_style_clamped_width for lv_image_get_transformed_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_transformed_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_image_get_transformed_height); /* * lvgl extension definition for: - * void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start) + * lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_arc_set_start_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_get_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_func_ptr)(obj, start); - return mp_const_none; + lv_blend_mode_t _res = ((lv_blend_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_start_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_blend_mode_mpobj, 1, mp_lv_image_get_blend_mode, lv_image_get_blend_mode); -/* Reusing lv_arc_set_start_angle for lv_arc_set_end_angle */ +/* Reusing lv_obj_refr_size for lv_image_get_antialias */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_end_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_antialias_mpobj, 1, mp_lv_obj_refr_size, lv_image_get_antialias); /* * lvgl extension definition for: - * void lv_arc_set_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) + * lv_image_align_t lv_image_get_inner_align(lv_obj_t *obj) */ -static mp_obj_t mp_lv_arc_set_angles(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_get_inner_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); - lv_value_precise_t end = (float)mp_obj_get_float(mp_args[2]); - ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_func_ptr)(obj, start, end); - return mp_const_none; + lv_image_align_t _res = ((lv_image_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_angles); - -/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_start_angle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_start_angle); - -/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_end_angle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_end_angle); - -/* Reusing lv_arc_set_angles for lv_arc_set_bg_angles */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_bg_angles); - -/* Reusing lv_obj_move_to_index for lv_arc_set_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_inner_align_mpobj, 1, mp_lv_image_get_inner_align, lv_image_get_inner_align); /* * lvgl extension definition for: - * void lv_arc_set_mode(lv_obj_t *obj, lv_arc_mode_t type) + * const lv_image_dsc_t *lv_image_get_bitmap_map_src(lv_obj_t *obj) */ -static mp_obj_t mp_lv_arc_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_get_bitmap_map_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arc_mode_t type = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arc_mode_t))lv_func_ptr)(obj, type); - return mp_const_none; + const lv_image_dsc_t * _res = ((const lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_image_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_mode_mpobj, 2, mp_lv_arc_set_mode, lv_arc_set_mode); - -/* Reusing lv_obj_move_to_index for lv_arc_set_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_value); - -/* Reusing lv_obj_set_pos for lv_arc_set_range */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_arc_set_range); - -/* Reusing lv_obj_move_to_index for lv_arc_set_min_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_min_value); - -/* Reusing lv_obj_move_to_index for lv_arc_set_max_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_max_value); - -/* Reusing lv_obj_delete_delayed for lv_arc_set_change_rate */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_change_rate_mpobj, 2, mp_lv_obj_delete_delayed, lv_arc_set_change_rate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_get_bitmap_map_src_mpobj, 1, mp_lv_image_get_bitmap_map_src, lv_image_get_bitmap_map_src); -/* Reusing lv_obj_move_to_index for lv_arc_set_knob_offset */ +/* Reusing lv_obj_bind_checked for lv_image_bind_src */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_knob_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_knob_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_bind_src_mpobj, 2, mp_lv_obj_bind_checked, lv_image_bind_src); /* * lvgl extension definition for: - * lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj) + * lv_result_t lv_image_cache_init(uint32_t size) */ -static mp_obj_t mp_lv_arc_get_angle_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_value_precise_t _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_float_from_f(_res); + uint32_t size = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(uint32_t))lv_func_ptr)(size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_start); - -/* Reusing lv_arc_get_angle_start for lv_arc_get_angle_end */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_end); - -/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_start */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_start); - -/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_end */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_end); - -/* Reusing lv_obj_get_index for lv_arc_get_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_value); - -/* Reusing lv_obj_get_index for lv_arc_get_min_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_min_value); - -/* Reusing lv_obj_get_index for lv_arc_get_max_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_init_mpobj, 1, mp_lv_image_cache_init, lv_image_cache_init); /* * lvgl extension definition for: - * lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj) + * void lv_image_cache_resize(uint32_t new_size, bool evict_now) */ -static mp_obj_t mp_lv_arc_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_arc_mode_t _res = ((lv_arc_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + uint32_t new_size = (uint32_t)mp_obj_get_int(mp_args[0]); + bool evict_now = mp_obj_is_true(mp_args[1]); + ((void (*)(uint32_t, bool))lv_func_ptr)(new_size, evict_now); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_mode_mpobj, 1, mp_lv_arc_get_mode, lv_arc_get_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_resize_mpobj, 2, mp_lv_image_cache_resize, lv_image_cache_resize); -/* Reusing lv_obj_get_index for lv_arc_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_rotation_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_rotation); - -/* Reusing lv_obj_get_index for lv_arc_get_knob_offset */ +/* + * lvgl extension definition for: + * bool lv_image_cache_is_enabled(void) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_knob_offset_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_knob_offset); +static mp_obj_t mp_lv_image_cache_is_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ -/* Reusing lv_obj_get_event_count for lv_arc_get_change_rate */ + bool _res = ((bool (*)(void))lv_func_ptr)(); + return convert_to_bool(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_change_rate_mpobj, 1, mp_lv_obj_get_event_count, lv_arc_get_change_rate); - -/* Reusing lv_obj_bind_checked for lv_arc_bind_value */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_arc_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_is_enabled_mpobj, 0, mp_lv_image_cache_is_enabled, lv_image_cache_is_enabled); /* * lvgl extension definition for: - * void lv_arc_align_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_align, int32_t r_offset) + * lv_iter_t *lv_image_cache_iter_create(void) */ -static mp_obj_t mp_lv_arc_align_obj_to_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_cache_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_obj_t *obj_to_align = mp_to_lv(mp_args[1]); - int32_t r_offset = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, obj_to_align, r_offset); - return mp_const_none; + + lv_iter_t * _res = ((lv_iter_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_iter_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_align_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_align_obj_to_angle); - -/* Reusing lv_arc_align_obj_to_angle for lv_arc_rotate_obj_to_angle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_rotate_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_rotate_obj_to_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_iter_create_mpobj, 0, mp_lv_image_cache_iter_create, lv_image_cache_iter_create); -/* Reusing lv_obj_create for lv_arc_create */ +/* Reusing funcptr_user_cb for lv_image_cache_dump */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_create_mpobj, 1, mp_lv_obj_create, lv_arc_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_cache_dump_mpobj, 0, mp_funcptr_user_cb, lv_image_cache_dump); /* - * lvgl arc object definitions + * lvgl extension definition for: + * void lv_image_buf_get_transformed_area(lv_area_t *res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x, uint16_t scale_y, const lv_point_t *pivot) */ - - -static const mp_rom_map_elem_t arc_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_start_angle), MP_ROM_PTR(&mp_lv_arc_set_start_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_end_angle), MP_ROM_PTR(&mp_lv_arc_set_end_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angles), MP_ROM_PTR(&mp_lv_arc_set_angles_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_start_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_start_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_end_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_end_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_angles), MP_ROM_PTR(&mp_lv_arc_set_bg_angles_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_arc_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_arc_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_arc_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_arc_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_arc_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_arc_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_change_rate), MP_ROM_PTR(&mp_lv_arc_set_change_rate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_knob_offset), MP_ROM_PTR(&mp_lv_arc_set_knob_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arc_get_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_end), MP_ROM_PTR(&mp_lv_arc_get_angle_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bg_angle_start), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bg_angle_end), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_arc_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_arc_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_arc_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_arc_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_arc_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_knob_offset), MP_ROM_PTR(&mp_lv_arc_get_knob_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_change_rate), MP_ROM_PTR(&mp_lv_arc_get_change_rate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_arc_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_align_obj_to_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_rotate_obj_to_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ARC_MODE_type_base) } -}; - -static MP_DEFINE_CONST_DICT(arc_locals_dict, arc_locals_dict_table); - -static void arc_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl arc"); -} - -static mp_obj_t arc_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_image_buf_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_arc_create_mpobj, type, n_args, n_kw, args); + lv_area_t *res = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t angle = (int32_t)mp_obj_get_int(mp_args[3]); + uint16_t scale_x = (uint16_t)mp_obj_get_int(mp_args[4]); + uint16_t scale_y = (uint16_t)mp_obj_get_int(mp_args[5]); + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[6]); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, uint16_t, uint16_t, const lv_point_t *))lv_func_ptr)(res, w, h, angle, scale_x, scale_y, pivot); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_arc_type_base, - MP_QSTR_arc, - MP_TYPE_FLAG_NONE, - print, arc_print, - make_new, arc_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &arc_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arc_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_arc_class, -#endif - .mp_obj_type = &mp_lv_arc_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_buf_get_transformed_area_mpobj, 7, mp_lv_image_buf_get_transformed_area, lv_image_buf_get_transformed_area); /* * lvgl extension definition for: - * void lv_arclabel_set_text(lv_obj_t *obj, const char *text) + * void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count) */ -static mp_obj_t mp_lv_arclabel_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *text = (const char *)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, text); + uint32_t image_cache_size = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t image_header_count = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(uint32_t, uint32_t))lv_func_ptr)(image_cache_size, image_header_count); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text); - -/* Reusing lv_arclabel_set_text for lv_arclabel_set_text_static */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text_static); - -/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_start */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_start_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_start); - -/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_size_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_init_mpobj, 2, mp_lv_image_decoder_init, lv_image_decoder_init); -/* Reusing lv_obj_move_to_index for lv_arclabel_set_offset */ +/* Reusing funcptr_user_cb for lv_image_decoder_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arclabel_set_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_decoder_deinit_mpobj, 0, mp_funcptr_user_cb, lv_image_decoder_deinit); /* - * lvgl extension definition for: - * void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir) + * Struct lv_cache_slot_size_t */ -static mp_obj_t mp_lv_arclabel_set_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_cache_slot_size_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_dir_t dir = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arclabel_dir_t))lv_func_ptr)(obj, dir); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_cache_slot_size_t_type())); + return (lv_cache_slot_size_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_dir_mpobj, 2, mp_lv_arclabel_set_dir, lv_arclabel_set_dir); - -/* Reusing lv_obj_set_radio_button for lv_arclabel_set_recolor */ +#define mp_write_lv_cache_slot_size_t(struct_obj) *((lv_cache_slot_size_t*)mp_write_ptr_lv_cache_slot_size_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_recolor_mpobj, 2, mp_lv_obj_set_radio_button, lv_arclabel_set_recolor); - -/* Reusing lv_obj_delete_delayed for lv_arclabel_set_radius */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_cache_slot_size_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_cache_slot_size_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_radius_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_radius); - -/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_x */ +#define mp_read_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(copy_buffer(&field, sizeof(lv_cache_slot_size_t))) +#define mp_read_byref_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_x); - -/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_y */ +static void mp_lv_cache_slot_size_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_y); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_arclabel_set_text_vertical_align(lv_obj_t *obj, lv_arclabel_text_align_t align) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_arclabel_set_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_cache_slot_size_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_text_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_func_ptr)(obj, align); - return mp_const_none; + mp_printf(print, "struct lv_cache_slot_size_t"); } - +static const mp_obj_dict_t mp_lv_cache_slot_size_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_vertical_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_vertical_align); - -/* Reusing lv_arclabel_set_text_vertical_align for lv_arclabel_set_text_horizontal_align */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_cache_slot_size_t_type, + MP_QSTR_lv_cache_slot_size_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_cache_slot_size_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_cache_slot_size_t_attr, + locals_dict, &mp_lv_cache_slot_size_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_horizontal_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_horizontal_align); +static inline const mp_obj_type_t *get_mp_lv_cache_slot_size_t_type(void) +{ + return &mp_lv_cache_slot_size_t_type; +} /* - * lvgl extension definition for: - * void lv_arclabel_set_overflow(lv_obj_t *obj, lv_arclabel_overflow_t overflow) + * Struct lv_image_cache_data_t */ -static mp_obj_t mp_lv_arclabel_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_cache_data_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_arclabel_overflow_t))lv_func_ptr)(obj, overflow); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_cache_data_t_type())); + return (lv_image_cache_data_t*)self->data; } - +#define mp_write_lv_image_cache_data_t(struct_obj) *((lv_image_cache_data_t*)mp_write_ptr_lv_image_cache_data_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_overflow_mpobj, 2, mp_lv_arclabel_set_overflow, lv_arclabel_set_overflow); - -/* Reusing lv_obj_set_radio_button for lv_arclabel_set_end_overlap */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_cache_data_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_image_cache_data_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_end_overlap_mpobj, 2, mp_lv_obj_set_radio_button, lv_arclabel_set_end_overlap); - -/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_start */ +#define mp_read_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(copy_buffer(&field, sizeof(lv_image_cache_data_t))) +#define mp_read_byref_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_start); - -/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_size */ +static void mp_lv_image_cache_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_image_cache_data_t *data = (lv_image_cache_data_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_size_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_size); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_slot: dest[0] = mp_read_byref_lv_cache_slot_size_t(data->slot); break; // converting from lv_cache_slot_size_t; + case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; + case MP_QSTR_src_type: dest[0] = mp_obj_new_int(data->src_type); break; // converting from lv_image_src_t; + case MP_QSTR_decoded: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->decoded); break; // converting from lv_draw_buf_t *; + case MP_QSTR_decoder: dest[0] = mp_read_ptr_lv_image_decoder_t((void*)data->decoder); break; // converting from lv_image_decoder_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_slot: data->slot = mp_write_lv_cache_slot_size_t(dest[1]); break; // converting to lv_cache_slot_size_t; + case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_type: data->src_type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_image_src_t; + case MP_QSTR_decoded: data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_decoder: data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(dest[1]); break; // converting to lv_image_decoder_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + default: return; + } -/* - * lvgl extension definition for: - * lv_arclabel_dir_t lv_arclabel_get_dir(const lv_obj_t *obj) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_arclabel_get_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_image_cache_data_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_arclabel_dir_t _res = ((lv_arclabel_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_image_cache_data_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_dir_mpobj, 1, mp_lv_arclabel_get_dir, lv_arclabel_get_dir); - -/* Reusing lv_obj_refr_size for lv_arclabel_get_recolor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_recolor_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_recolor); - -/* Reusing lv_obj_get_event_count for lv_arclabel_get_radius */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_radius_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_radius); - -/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_x */ +static const mp_obj_dict_t mp_lv_image_cache_data_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_x_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_x); - -/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_y */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_image_cache_data_t_type, + MP_QSTR_lv_image_cache_data_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_image_cache_data_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_image_cache_data_t_attr, + locals_dict, &mp_lv_image_cache_data_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_y_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_y); +static inline const mp_obj_type_t *get_mp_lv_image_cache_data_t_type(void) +{ + return &mp_lv_image_cache_data_t_type; +} /* * lvgl extension definition for: - * lv_arclabel_text_align_t lv_arclabel_get_text_vertical_align(lv_obj_t *obj) + * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) */ -static mp_obj_t mp_lv_arclabel_get_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_image_decoder_add_to_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_text_align_t _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[3]); + lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(mp_args[1]); + const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[2]); + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(mp_args[0]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_func_ptr)(decoder, search_key, decoded, user_data); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_vertical_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_vertical_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_decoder_add_to_cache_mpobj, 4, mp_lv_image_decoder_add_to_cache, lv_image_decoder_add_to_cache); -/* Reusing lv_arclabel_get_text_vertical_align for lv_arclabel_get_text_horizontal_align */ +/* Reusing lv_image_cache_init for lv_image_header_cache_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_horizontal_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_horizontal_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_init_mpobj, 1, mp_lv_image_cache_init, lv_image_header_cache_init); +/* Reusing lv_image_cache_resize for lv_image_header_cache_resize */ -/* - * lvgl extension definition for: - * lv_arclabel_overflow_t lv_arclabel_get_overflow(lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_arclabel_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_arclabel_overflow_t _res = ((lv_arclabel_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_resize_mpobj, 2, mp_lv_image_cache_resize, lv_image_header_cache_resize); + +/* Reusing lv_image_cache_drop for lv_image_header_cache_drop */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_drop_mpobj, 1, mp_lv_image_cache_drop, lv_image_header_cache_drop); + +/* Reusing lv_image_cache_is_enabled for lv_image_header_cache_is_enabled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_overflow_mpobj, 1, mp_lv_arclabel_get_overflow, lv_arclabel_get_overflow); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_is_enabled_mpobj, 0, mp_lv_image_cache_is_enabled, lv_image_header_cache_is_enabled); -/* Reusing lv_obj_refr_size for lv_arclabel_get_end_overlap */ +/* Reusing lv_image_cache_iter_create for lv_image_header_cache_iter_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_end_overlap_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_end_overlap); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_iter_create_mpobj, 0, mp_lv_image_cache_iter_create, lv_image_header_cache_iter_create); -/* Reusing lv_arc_get_angle_start for lv_arclabel_get_text_angle */ +/* Reusing funcptr_user_cb for lv_image_header_cache_dump */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_angle_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_text_angle); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_image_header_cache_dump_mpobj, 0, mp_funcptr_user_cb, lv_image_header_cache_dump); -/* Reusing lv_obj_create for lv_arclabel_create */ +/* Reusing lv_obj_create for lv_image_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_create_mpobj, 1, mp_lv_obj_create, lv_arclabel_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_image_create_mpobj, 1, mp_lv_obj_create, lv_image_create); /* - * lvgl arclabel object definitions + * lvgl image object definitions */ -static const mp_rom_map_elem_t arclabel_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_arclabel_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_arclabel_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angle_start), MP_ROM_PTR(&mp_lv_arclabel_set_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angle_size), MP_ROM_PTR(&mp_lv_arclabel_set_angle_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_arclabel_set_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_arclabel_set_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_arclabel_set_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_arclabel_set_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_vertical_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_horizontal_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_arclabel_set_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_set_end_overlap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arclabel_get_angle_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_size), MP_ROM_PTR(&mp_lv_arclabel_get_angle_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_arclabel_get_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_arclabel_get_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_radius), MP_ROM_PTR(&mp_lv_arclabel_get_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_vertical_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_horizontal_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_arclabel_get_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_get_end_overlap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_angle), MP_ROM_PTR(&mp_lv_arclabel_get_text_angle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_DIR), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_DIR_type_base) }, - { MP_ROM_QSTR(MP_QSTR_TEXT_ALIGN), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_TEXT_ALIGN_type_base) }, - { MP_ROM_QSTR(MP_QSTR_OVERFLOW), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_OVERFLOW_type_base) } +static const mp_rom_map_elem_t image_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_buf_set_palette), MP_ROM_PTR(&mp_lv_image_buf_set_palette_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_buf_free), MP_ROM_PTR(&mp_lv_image_buf_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_get_info), MP_ROM_PTR(&mp_lv_image_decoder_get_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_open), MP_ROM_PTR(&mp_lv_image_decoder_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_get_area), MP_ROM_PTR(&mp_lv_image_decoder_get_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_close), MP_ROM_PTR(&mp_lv_image_decoder_close_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_create), MP_ROM_PTR(&mp_lv_image_decoder_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_delete), MP_ROM_PTR(&mp_lv_image_decoder_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_get_next), MP_ROM_PTR(&mp_lv_image_decoder_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_info_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_info_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_open_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_open_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_get_area_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_get_area_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_set_close_cb), MP_ROM_PTR(&mp_lv_image_decoder_set_close_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_post_process), MP_ROM_PTR(&mp_lv_image_decoder_post_process_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_drop), MP_ROM_PTR(&mp_lv_image_cache_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_src_get_type), MP_ROM_PTR(&mp_lv_image_src_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_image_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset_x), MP_ROM_PTR(&mp_lv_image_set_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset_y), MP_ROM_PTR(&mp_lv_image_set_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_image_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pivot), MP_ROM_PTR(&mp_lv_image_set_pivot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pivot_x), MP_ROM_PTR(&mp_lv_image_set_pivot_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pivot_y), MP_ROM_PTR(&mp_lv_image_set_pivot_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_image_set_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale_x), MP_ROM_PTR(&mp_lv_image_set_scale_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale_y), MP_ROM_PTR(&mp_lv_image_set_scale_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_image_set_blend_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_antialias), MP_ROM_PTR(&mp_lv_image_set_antialias_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_inner_align), MP_ROM_PTR(&mp_lv_image_set_inner_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_set_bitmap_map_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src), MP_ROM_PTR(&mp_lv_image_get_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_image_get_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_image_get_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_image_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pivot), MP_ROM_PTR(&mp_lv_image_get_pivot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_image_get_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale_x), MP_ROM_PTR(&mp_lv_image_get_scale_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale_y), MP_ROM_PTR(&mp_lv_image_get_scale_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_width), MP_ROM_PTR(&mp_lv_image_get_src_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_height), MP_ROM_PTR(&mp_lv_image_get_src_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transformed_width), MP_ROM_PTR(&mp_lv_image_get_transformed_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_transformed_height), MP_ROM_PTR(&mp_lv_image_get_transformed_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_blend_mode), MP_ROM_PTR(&mp_lv_image_get_blend_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_antialias), MP_ROM_PTR(&mp_lv_image_get_antialias_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_inner_align), MP_ROM_PTR(&mp_lv_image_get_inner_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bitmap_map_src), MP_ROM_PTR(&mp_lv_image_get_bitmap_map_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_src), MP_ROM_PTR(&mp_lv_image_bind_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_init), MP_ROM_PTR(&mp_lv_image_cache_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_resize), MP_ROM_PTR(&mp_lv_image_cache_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_cache_is_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_iter_create), MP_ROM_PTR(&mp_lv_image_cache_iter_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_dump), MP_ROM_PTR(&mp_lv_image_cache_dump_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_buf_get_transformed_area), MP_ROM_PTR(&mp_lv_image_buf_get_transformed_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_init), MP_ROM_PTR(&mp_lv_image_decoder_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_deinit), MP_ROM_PTR(&mp_lv_image_decoder_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decoder_add_to_cache), MP_ROM_PTR(&mp_lv_image_decoder_add_to_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_init), MP_ROM_PTR(&mp_lv_image_header_cache_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_resize), MP_ROM_PTR(&mp_lv_image_header_cache_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_drop), MP_ROM_PTR(&mp_lv_image_header_cache_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_is_enabled), MP_ROM_PTR(&mp_lv_image_header_cache_is_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_iter_create), MP_ROM_PTR(&mp_lv_image_header_cache_iter_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_cache_dump), MP_ROM_PTR(&mp_lv_image_header_cache_dump_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_FLAGS), MP_ROM_PTR(&mp_lv_LV_IMAGE_FLAGS_type_base) }, + { MP_ROM_QSTR(MP_QSTR_COMPRESS), MP_ROM_PTR(&mp_lv_LV_IMAGE_COMPRESS_type_base) }, + { MP_ROM_QSTR(MP_QSTR_SRC), MP_ROM_PTR(&mp_lv_LV_IMAGE_SRC_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ALIGN), MP_ROM_PTR(&mp_lv_LV_IMAGE_ALIGN_type_base) } }; -static MP_DEFINE_CONST_DICT(arclabel_locals_dict, arclabel_locals_dict_table); +static MP_DEFINE_CONST_DICT(image_locals_dict, image_locals_dict_table); -static void arclabel_print(const mp_print_t *print, +static void image_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl arclabel"); + mp_printf(print, "lvgl image"); } -static mp_obj_t arclabel_make_new( +static mp_obj_t image_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_arclabel_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_image_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_arclabel_type_base, - MP_QSTR_arclabel, + mp_lv_image_type_base, + MP_QSTR_image, MP_TYPE_FLAG_NONE, - print, arclabel_print, - make_new, arclabel_make_new, + print, image_print, + make_new, image_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &arclabel_locals_dict + locals_dict, &image_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arclabel_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_image_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_arclabel_class, + .lv_obj_class = &lv_image_class, #endif - .mp_obj_type = &mp_lv_arclabel_type_base, + .mp_obj_type = &mp_lv_image_type_base, }; -/* Reusing lv_arclabel_set_text for lv_label_set_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text); - -/* Reusing lv_arclabel_set_text for lv_label_set_text_static */ +/* + * Array convertors for void *[] + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text_static); +GENMPY_UNUSED static void * *mp_arr_to_void_ptr____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + void * *lv_arr = (void **)m_malloc(len * sizeof(void *)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_to_ptr(item); + } + return (void * *)lv_arr; +} + +GENMPY_UNUSED static mp_obj_t mp_arr_from_void_ptr____(const void * *arr) +{ + return ptr_to_mp((void*)arr); +} + /* * lvgl extension definition for: - * void lv_label_set_long_mode(lv_obj_t *obj, lv_label_long_mode_t long_mode) + * void lv_animimg_set_src(lv_obj_t *obj, const void *dsc[], size_t num) */ -static mp_obj_t mp_lv_label_set_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_label_long_mode_t long_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_label_long_mode_t))lv_func_ptr)(obj, long_mode); + const void **dsc = (const void **)mp_arr_to_void_ptr____(mp_args[1]); + size_t num = (size_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const void *[], size_t))lv_func_ptr)(obj, dsc, num); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_long_mode_mpobj, 2, mp_lv_label_set_long_mode, lv_label_set_long_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src); -/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_start */ +/* Reusing lv_animimg_set_src for lv_animimg_set_src_reverse */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_start_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_src_reverse_mpobj, 3, mp_lv_animimg_set_src, lv_animimg_set_src_reverse); -/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_end */ +/* Reusing lv_obj_move_foreground for lv_animimg_start */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_end_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_end); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_start_mpobj, 1, mp_lv_obj_move_foreground, lv_animimg_start); -/* Reusing lv_obj_set_radio_button for lv_label_set_recolor */ +/* Reusing lv_obj_refr_size for lv_animimg_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_recolor_mpobj, 2, mp_lv_obj_set_radio_button, lv_label_set_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_delete_mpobj, 1, mp_lv_obj_refr_size, lv_animimg_delete); +/* Reusing lv_obj_delete_delayed for lv_animimg_set_duration */ -/* - * lvgl extension definition for: - * char *lv_label_get_text(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_duration); + +/* Reusing lv_obj_delete_delayed for lv_animimg_set_repeat_count */ -static mp_obj_t mp_lv_label_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - char * _res = ((char *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return convert_to_str((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_repeat_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_repeat_count); + +/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_duration */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_duration); + +/* Reusing lv_obj_delete_delayed for lv_animimg_set_reverse_delay */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_mpobj, 1, mp_lv_label_get_text, lv_label_get_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_reverse_delay_mpobj, 2, mp_lv_obj_delete_delayed, lv_animimg_set_reverse_delay); /* - * lvgl extension definition for: - * lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t *obj) + * Callback function lv_obj_t_start_cb + * void lv_anim_start_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_label_get_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_obj_t_start_cb_callback(lv_anim_t *arg0) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_label_long_mode_t _res = ((lv_label_long_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_start_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_long_mode_mpobj, 1, mp_lv_label_get_long_mode, lv_label_get_long_mode); - /* * lvgl extension definition for: - * void lv_label_get_letter_pos(const lv_obj_t *obj, uint32_t char_id, lv_point_t *pos) + * void lv_animimg_set_start_cb(lv_obj_t *obj, lv_anim_start_cb_t start_cb) */ -static mp_obj_t mp_lv_label_get_letter_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t char_id = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); - ((void (*)(const lv_obj_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, char_id, pos); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + void *start_cb = mp_lv_callback(mp_args[1], &lv_obj_t_start_cb_callback, MP_QSTR_lv_obj_t_start_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_obj_t *, lv_anim_start_cb_t))lv_func_ptr)(obj, start_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_pos_mpobj, 3, mp_lv_label_get_letter_pos, lv_label_get_letter_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_start_cb_mpobj, 2, mp_lv_animimg_set_start_cb, lv_animimg_set_start_cb); /* - * lvgl extension definition for: - * uint32_t lv_label_get_letter_on(const lv_obj_t *obj, lv_point_t *pos_in, bool bidi) + * Callback function lv_obj_t_completed_cb + * void lv_anim_completed_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_label_get_letter_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_obj_t_completed_cb_callback(lv_anim_t *arg0) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *pos_in = mp_write_ptr_lv_point_t(mp_args[1]); - bool bidi = mp_obj_is_true(mp_args[2]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_point_t *, bool))lv_func_ptr)(obj, pos_in, bidi); - return mp_obj_new_int_from_uint(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_t_completed_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_on_mpobj, 3, mp_lv_label_get_letter_on, lv_label_get_letter_on); - /* * lvgl extension definition for: - * bool lv_label_is_char_under_pos(const lv_obj_t *obj, lv_point_t *pos) + * void lv_animimg_set_completed_cb(lv_obj_t *obj, lv_anim_completed_cb_t completed_cb) */ -static mp_obj_t mp_lv_label_is_char_under_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[1]); - bool _res = ((bool (*)(const lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, pos); - return convert_to_bool(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + void *completed_cb = mp_lv_callback(mp_args[1], &lv_obj_t_completed_cb_callback, MP_QSTR_lv_obj_t_completed_cb, &obj->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_obj_t *, lv_anim_completed_cb_t))lv_func_ptr)(obj, completed_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_is_char_under_pos_mpobj, 2, mp_lv_label_is_char_under_pos, lv_label_is_char_under_pos); - -/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_start */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_start_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_start); - -/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_end */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_end_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_end); - -/* Reusing lv_obj_is_layout_positioned for lv_label_get_recolor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_recolor_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_label_get_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_set_completed_cb_mpobj, 2, mp_lv_animimg_set_completed_cb, lv_animimg_set_completed_cb); /* * lvgl extension definition for: - * lv_observer_t *lv_label_bind_text(lv_obj_t *obj, lv_subject_t *subject, const char *fmt) + * uint8_t lv_animimg_get_src_count(lv_obj_t *obj) */ -static mp_obj_t mp_lv_label_bind_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_get_src_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); - const char *fmt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, subject, fmt); - return mp_read_ptr_lv_observer_t((void*)_res); + uint8_t _res = ((uint8_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_bind_text_mpobj, 3, mp_lv_label_bind_text, lv_label_bind_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_src_count_mpobj, 1, mp_lv_animimg_get_src_count, lv_animimg_get_src_count); + +/* Reusing lv_obj_get_event_count for lv_animimg_get_duration */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_duration); + +/* Reusing lv_obj_get_event_count for lv_animimg_get_repeat_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_repeat_count_mpobj, 1, mp_lv_obj_get_event_count, lv_animimg_get_repeat_count); /* * lvgl extension definition for: - * void lv_label_ins_text(lv_obj_t *obj, uint32_t pos, const char *txt) + * lv_anim_t *lv_animimg_get_anim(lv_obj_t *obj) */ -static mp_obj_t mp_lv_label_ins_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_animimg_get_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, const char *))lv_func_ptr)(obj, pos, txt); - return mp_const_none; + lv_anim_t * _res = ((lv_anim_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_ins_text_mpobj, 3, mp_lv_label_ins_text, lv_label_ins_text); - -/* Reusing lv_obj_fade_in for lv_label_cut_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_cut_text_mpobj, 3, mp_lv_obj_fade_in, lv_label_cut_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_get_anim_mpobj, 1, mp_lv_animimg_get_anim, lv_animimg_get_anim); -/* Reusing lv_obj_create for lv_label_create */ +/* Reusing lv_obj_create for lv_animimg_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_create_mpobj, 1, mp_lv_obj_create, lv_label_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_animimg_create_mpobj, 1, mp_lv_obj_create, lv_animimg_create); /* - * lvgl label object definitions + * lvgl animimg object definitions */ -static const mp_rom_map_elem_t label_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_label_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_label_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_long_mode), MP_ROM_PTR(&mp_lv_label_set_long_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_selection_start), MP_ROM_PTR(&mp_lv_label_set_text_selection_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_selection_end), MP_ROM_PTR(&mp_lv_label_set_text_selection_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_label_set_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_label_get_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_long_mode), MP_ROM_PTR(&mp_lv_label_get_long_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_letter_pos), MP_ROM_PTR(&mp_lv_label_get_letter_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_letter_on), MP_ROM_PTR(&mp_lv_label_get_letter_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_char_under_pos), MP_ROM_PTR(&mp_lv_label_is_char_under_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_selection_start), MP_ROM_PTR(&mp_lv_label_get_text_selection_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_selection_end), MP_ROM_PTR(&mp_lv_label_get_text_selection_end_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_label_get_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_text), MP_ROM_PTR(&mp_lv_label_bind_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_text), MP_ROM_PTR(&mp_lv_label_ins_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cut_text), MP_ROM_PTR(&mp_lv_label_cut_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_LONG_MODE), MP_ROM_PTR(&mp_lv_LV_LABEL_LONG_MODE_type_base) } +static const mp_rom_map_elem_t animimg_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_animimg_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_reverse), MP_ROM_PTR(&mp_lv_animimg_set_src_reverse_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_animimg_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_animimg_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_animimg_set_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_animimg_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_animimg_set_reverse_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_animimg_set_reverse_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_animimg_set_start_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_animimg_set_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_count), MP_ROM_PTR(&mp_lv_animimg_get_src_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_duration), MP_ROM_PTR(&mp_lv_animimg_get_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_animimg_get_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_anim), MP_ROM_PTR(&mp_lv_animimg_get_anim_mpobj) } }; -static MP_DEFINE_CONST_DICT(label_locals_dict, label_locals_dict_table); +static MP_DEFINE_CONST_DICT(animimg_locals_dict, animimg_locals_dict_table); -static void label_print(const mp_print_t *print, +static void animimg_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl label"); + mp_printf(print, "lvgl animimg"); } -static mp_obj_t label_make_new( +static mp_obj_t animimg_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_label_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_animimg_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_label_type_base, - MP_QSTR_label, + mp_lv_animimg_type_base, + MP_QSTR_animimg, MP_TYPE_FLAG_NONE, - print, label_print, - make_new, label_make_new, + print, animimg_print, + make_new, animimg_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &label_locals_dict + locals_dict, &animimg_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_label_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_animimg_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_label_class, + .lv_obj_class = &lv_animimg_class, #endif - .mp_obj_type = &mp_lv_label_type_base, + .mp_obj_type = &mp_lv_animimg_type_base, }; -/* Reusing lv_obj_scroll_to_x for lv_bar_set_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_value); - -/* Reusing lv_obj_scroll_to_x for lv_bar_set_start_value */ +/* + * lvgl extension definition for: + * void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_start_value); - -/* Reusing lv_obj_set_pos for lv_bar_set_range */ +static mp_obj_t mp_lv_arc_set_start_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_func_ptr)(obj, start); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_bar_set_range); - -/* Reusing lv_obj_move_to_index for lv_bar_set_min_value */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_start_angle); -/* Reusing lv_obj_move_to_index for lv_bar_set_max_value */ +/* Reusing lv_arc_set_start_angle for lv_arc_set_end_angle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_end_angle); /* * lvgl extension definition for: - * void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode) + * void lv_arc_set_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) */ -static mp_obj_t mp_lv_bar_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_set_angles(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_bar_mode_t))lv_func_ptr)(obj, mode); + lv_value_precise_t start = (float)mp_obj_get_float(mp_args[1]); + lv_value_precise_t end = (float)mp_obj_get_float(mp_args[2]); + ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_func_ptr)(obj, start, end); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_mode_mpobj, 2, mp_lv_bar_set_mode, lv_bar_set_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_angles); + +/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_start_angle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_start_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_start_angle); + +/* Reusing lv_arc_set_start_angle for lv_arc_set_bg_end_angle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_end_angle_mpobj, 2, mp_lv_arc_set_start_angle, lv_arc_set_bg_end_angle); + +/* Reusing lv_arc_set_angles for lv_arc_set_bg_angles */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_bg_angles_mpobj, 3, mp_lv_arc_set_angles, lv_arc_set_bg_angles); + +/* Reusing lv_obj_move_to_index for lv_arc_set_rotation */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_rotation); /* * lvgl extension definition for: - * void lv_bar_set_orientation(lv_obj_t *obj, lv_bar_orientation_t orientation) + * void lv_arc_set_mode(lv_obj_t *obj, lv_arc_mode_t type) */ -static mp_obj_t mp_lv_bar_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_bar_orientation_t))lv_func_ptr)(obj, orientation); + lv_arc_mode_t type = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arc_mode_t))lv_func_ptr)(obj, type); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_orientation_mpobj, 2, mp_lv_bar_set_orientation, lv_bar_set_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_mode_mpobj, 2, mp_lv_arc_set_mode, lv_arc_set_mode); -/* Reusing lv_obj_get_index for lv_bar_get_value */ +/* Reusing lv_obj_move_to_index for lv_arc_set_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_value); -/* Reusing lv_obj_get_index for lv_bar_get_start_value */ +/* Reusing lv_obj_set_pos for lv_arc_set_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_start_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_start_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_arc_set_range); -/* Reusing lv_obj_get_index for lv_bar_get_min_value */ +/* Reusing lv_obj_move_to_index for lv_arc_set_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_min_value); -/* Reusing lv_obj_get_index for lv_bar_get_max_value */ +/* Reusing lv_obj_move_to_index for lv_arc_set_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_max_value); + +/* Reusing lv_obj_delete_delayed for lv_arc_set_change_rate */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_change_rate_mpobj, 2, mp_lv_obj_delete_delayed, lv_arc_set_change_rate); + +/* Reusing lv_obj_move_to_index for lv_arc_set_knob_offset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_set_knob_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arc_set_knob_offset); /* * lvgl extension definition for: - * lv_bar_mode_t lv_bar_get_mode(lv_obj_t *obj) + * lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj) */ -static mp_obj_t mp_lv_bar_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_get_angle_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_mode_t _res = ((lv_bar_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_value_precise_t _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_float_from_f(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_mode_mpobj, 1, mp_lv_bar_get_mode, lv_bar_get_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_start); + +/* Reusing lv_arc_get_angle_start for lv_arc_get_angle_end */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_angle_end); + +/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_start */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_start); + +/* Reusing lv_arc_get_angle_start for lv_arc_get_bg_angle_end */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_bg_angle_end_mpobj, 1, mp_lv_arc_get_angle_start, lv_arc_get_bg_angle_end); + +/* Reusing lv_obj_get_index for lv_arc_get_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_value); + +/* Reusing lv_obj_get_index for lv_arc_get_min_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_min_value); + +/* Reusing lv_obj_get_index for lv_arc_get_max_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_max_value); /* * lvgl extension definition for: - * lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t *obj) + * lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_bar_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arc_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_bar_orientation_t _res = ((lv_bar_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_arc_mode_t _res = ((lv_arc_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_orientation_mpobj, 1, mp_lv_bar_get_orientation, lv_bar_get_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_mode_mpobj, 1, mp_lv_arc_get_mode, lv_arc_get_mode); -/* Reusing lv_obj_refr_size for lv_bar_is_symmetrical */ +/* Reusing lv_obj_get_index for lv_arc_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_bar_is_symmetrical); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_rotation_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_rotation); -/* Reusing lv_obj_bind_checked for lv_bar_bind_value */ +/* Reusing lv_obj_get_index for lv_arc_get_knob_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_bar_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_knob_offset_mpobj, 1, mp_lv_obj_get_index, lv_arc_get_knob_offset); -/* Reusing lv_obj_create for lv_bar_create */ +/* Reusing lv_obj_get_event_count for lv_arc_get_change_rate */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_create_mpobj, 1, mp_lv_obj_create, lv_bar_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_get_change_rate_mpobj, 1, mp_lv_obj_get_event_count, lv_arc_get_change_rate); + +/* Reusing lv_obj_bind_checked for lv_arc_bind_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_arc_bind_value); /* - * lvgl bar object definitions + * lvgl extension definition for: + * void lv_arc_align_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_align, int32_t r_offset) */ - -static const mp_rom_map_elem_t bar_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_bar_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_bar_set_start_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_bar_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_bar_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_bar_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_bar_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_bar_set_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_bar_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_start_value), MP_ROM_PTR(&mp_lv_bar_get_start_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_bar_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_bar_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_bar_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_bar_get_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_bar_is_symmetrical_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_bar_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_BAR_MODE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_BAR_ORIENTATION_type_base) } -}; - -static MP_DEFINE_CONST_DICT(bar_locals_dict, bar_locals_dict_table); - -static void bar_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl bar"); -} - - -static mp_obj_t bar_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_arc_align_obj_to_angle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_bar_create_mpobj, type, n_args, n_kw, args); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_obj_t *obj_to_align = mp_to_lv(mp_args[1]); + int32_t r_offset = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, obj_to_align, r_offset); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_bar_type_base, - MP_QSTR_bar, - MP_TYPE_FLAG_NONE, - print, bar_print, - make_new, bar_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &bar_locals_dict -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_align_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_align_obj_to_angle); + +/* Reusing lv_arc_align_obj_to_angle for lv_arc_rotate_obj_to_angle */ -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_bar_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_bar_class, -#endif - .mp_obj_type = &mp_lv_bar_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_rotate_obj_to_angle_mpobj, 3, mp_lv_arc_align_obj_to_angle, lv_arc_rotate_obj_to_angle); -/* Reusing lv_obj_create for lv_button_create */ +/* Reusing lv_obj_create for lv_arc_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_button_create_mpobj, 1, mp_lv_obj_create, lv_button_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arc_create_mpobj, 1, mp_lv_obj_create, lv_arc_create); /* - * lvgl button object definitions + * lvgl arc object definitions */ -static const mp_rom_map_elem_t button_locals_dict_table[] = { - +static const mp_rom_map_elem_t arc_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_start_angle), MP_ROM_PTR(&mp_lv_arc_set_start_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_end_angle), MP_ROM_PTR(&mp_lv_arc_set_end_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angles), MP_ROM_PTR(&mp_lv_arc_set_angles_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_start_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_start_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_end_angle), MP_ROM_PTR(&mp_lv_arc_set_bg_end_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_angles), MP_ROM_PTR(&mp_lv_arc_set_bg_angles_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_arc_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_arc_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_arc_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_arc_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_arc_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_arc_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_change_rate), MP_ROM_PTR(&mp_lv_arc_set_change_rate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_knob_offset), MP_ROM_PTR(&mp_lv_arc_set_knob_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arc_get_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_end), MP_ROM_PTR(&mp_lv_arc_get_angle_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bg_angle_start), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bg_angle_end), MP_ROM_PTR(&mp_lv_arc_get_bg_angle_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_arc_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_arc_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_arc_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_arc_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_arc_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_knob_offset), MP_ROM_PTR(&mp_lv_arc_get_knob_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_change_rate), MP_ROM_PTR(&mp_lv_arc_get_change_rate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_arc_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_align_obj_to_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_obj_to_angle), MP_ROM_PTR(&mp_lv_arc_rotate_obj_to_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ARC_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(button_locals_dict, button_locals_dict_table); +static MP_DEFINE_CONST_DICT(arc_locals_dict, arc_locals_dict_table); -static void button_print(const mp_print_t *print, +static void arc_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl button"); + mp_printf(print, "lvgl arc"); } -static mp_obj_t button_make_new( +static mp_obj_t arc_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_button_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_arc_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_button_type_base, - MP_QSTR_button, + mp_lv_arc_type_base, + MP_QSTR_arc, MP_TYPE_FLAG_NONE, - print, button_print, - make_new, button_make_new, + print, arc_print, + make_new, arc_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &button_locals_dict + locals_dict, &arc_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_button_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arc_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_button_class, + .lv_obj_class = &lv_arc_class, #endif - .mp_obj_type = &mp_lv_button_type_base, + .mp_obj_type = &mp_lv_arc_type_base, }; /* - * Array convertors for char *[] + * lvgl extension definition for: + * void lv_arclabel_set_text(lv_obj_t *obj, const char *text) */ -GENMPY_UNUSED static char * *mp_arr_to_char_ptr____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_arclabel_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - char * *lv_arr = (char **)m_malloc(len * sizeof(char *)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (char*)convert_from_str(item); - } - return (char * *)lv_arr; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const char *text = (const char *)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, text); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_char_ptr____(const char * const *arr) -{ - return mp_read_ptr_C_Pointer((void*)arr); -} + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text); + +/* Reusing lv_arclabel_set_text for lv_arclabel_set_text_static */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_arclabel_set_text_static); + +/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_start */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_start_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_start); + +/* Reusing lv_arc_set_start_angle for lv_arclabel_set_angle_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_angle_size_mpobj, 2, mp_lv_arc_set_start_angle, lv_arclabel_set_angle_size); + +/* Reusing lv_obj_move_to_index for lv_arclabel_set_offset */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_offset_mpobj, 2, mp_lv_obj_move_to_index, lv_arclabel_set_offset); + /* * lvgl extension definition for: - * void lv_buttonmatrix_set_map(lv_obj_t *obj, const char * const map[]) + * void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir) */ -static mp_obj_t mp_lv_buttonmatrix_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_set_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[1]); - ((void (*)(lv_obj_t *, const char * const []))lv_func_ptr)(obj, map); + lv_arclabel_dir_t dir = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arclabel_dir_t))lv_func_ptr)(obj, dir); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_map_mpobj, 2, mp_lv_buttonmatrix_set_map, lv_buttonmatrix_set_map); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_dir_mpobj, 2, mp_lv_arclabel_set_dir, lv_arclabel_set_dir); +/* Reusing lv_obj_set_hidden for lv_arclabel_set_recolor */ -/* - * Array convertors for lv_buttonmatrix_ctrl_t [] - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_recolor_mpobj, 2, mp_lv_obj_set_hidden, lv_arclabel_set_recolor); + +/* Reusing lv_obj_delete_delayed for lv_arclabel_set_radius */ -GENMPY_UNUSED static lv_buttonmatrix_ctrl_t *mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_radius_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_radius); - lv_buttonmatrix_ctrl_t *lv_arr = (lv_buttonmatrix_ctrl_t*)m_malloc(len * sizeof(lv_buttonmatrix_ctrl_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (int)mp_obj_get_int(item); - } - return (lv_buttonmatrix_ctrl_t *)lv_arr; -} +/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_x */ -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_buttonmatrix_ctrl_t_____(const lv_buttonmatrix_ctrl_t *arr) -{ - return mp_array_from_i32ptr((void*)arr); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_x_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_x); + +/* Reusing lv_obj_delete_delayed for lv_arclabel_set_center_offset_y */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_center_offset_y_mpobj, 2, mp_lv_obj_delete_delayed, lv_arclabel_set_center_offset_y); + /* * lvgl extension definition for: - * void lv_buttonmatrix_set_ctrl_map(lv_obj_t *obj, const lv_buttonmatrix_ctrl_t ctrl_map[]) + * void lv_arclabel_set_text_vertical_align(lv_obj_t *obj, lv_arclabel_text_align_t align) */ -static mp_obj_t mp_lv_buttonmatrix_set_ctrl_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_set_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[1]); - ((void (*)(lv_obj_t *, const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(obj, ctrl_map); + lv_arclabel_text_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_func_ptr)(obj, align); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_ctrl_map_mpobj, 2, mp_lv_buttonmatrix_set_ctrl_map, lv_buttonmatrix_set_ctrl_map); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_vertical_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_vertical_align); -/* Reusing lv_obj_delete_delayed for lv_buttonmatrix_set_selected_button */ +/* Reusing lv_arclabel_set_text_vertical_align for lv_arclabel_set_text_horizontal_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_selected_button_mpobj, 2, mp_lv_obj_delete_delayed, lv_buttonmatrix_set_selected_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_text_horizontal_align_mpobj, 2, mp_lv_arclabel_set_text_vertical_align, lv_arclabel_set_text_horizontal_align); /* * lvgl extension definition for: - * void lv_buttonmatrix_set_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) + * void lv_arclabel_set_overflow(lv_obj_t *obj, lv_arclabel_overflow_t overflow) */ -static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); + lv_arclabel_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_arclabel_overflow_t))lv_func_ptr)(obj, overflow); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_set_button_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_overflow_mpobj, 2, mp_lv_arclabel_set_overflow, lv_arclabel_set_overflow); -/* Reusing lv_buttonmatrix_set_button_ctrl for lv_buttonmatrix_clear_button_ctrl */ +/* Reusing lv_obj_set_hidden for lv_arclabel_set_end_overlap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_clear_button_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_set_end_overlap_mpobj, 2, mp_lv_obj_set_hidden, lv_arclabel_set_end_overlap); + +/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_start */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_start_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_start); + +/* Reusing lv_arc_get_angle_start for lv_arclabel_get_angle_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_angle_size_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_angle_size); /* * lvgl extension definition for: - * void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) + * lv_arclabel_dir_t lv_arclabel_get_dir(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_get_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, ctrl); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_arclabel_dir_t _res = ((lv_arclabel_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_set_button_ctrl_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_dir_mpobj, 1, mp_lv_arclabel_get_dir, lv_arclabel_get_dir); -/* Reusing lv_buttonmatrix_set_button_ctrl_all for lv_buttonmatrix_clear_button_ctrl_all */ +/* Reusing lv_obj_refr_size for lv_arclabel_get_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_clear_button_ctrl_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_recolor_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_recolor); -/* Reusing lv_obj_fade_in for lv_buttonmatrix_set_button_width */ +/* Reusing lv_obj_get_event_count for lv_arclabel_get_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_width_mpobj, 3, mp_lv_obj_fade_in, lv_buttonmatrix_set_button_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_radius_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_radius); -/* Reusing lv_obj_set_radio_button for lv_buttonmatrix_set_one_checked */ +/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_one_checked_mpobj, 2, mp_lv_obj_set_radio_button, lv_buttonmatrix_set_one_checked); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_x_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_x); -/* Reusing lv_obj_get_child_count for lv_buttonmatrix_get_selected_button */ +/* Reusing lv_obj_get_event_count for lv_arclabel_get_center_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_buttonmatrix_get_selected_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_center_offset_y_mpobj, 1, mp_lv_obj_get_event_count, lv_arclabel_get_center_offset_y); /* * lvgl extension definition for: - * const char *lv_buttonmatrix_get_button_text(const lv_obj_t *obj, uint32_t btn_id) + * lv_arclabel_text_align_t lv_arclabel_get_text_vertical_align(lv_obj_t *obj) */ -static mp_obj_t mp_lv_buttonmatrix_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_get_text_vertical_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); - const char * _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_func_ptr)(obj, btn_id); - return convert_to_str((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_arclabel_text_align_t _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_buttonmatrix_get_button_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_vertical_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_vertical_align); + +/* Reusing lv_arclabel_get_text_vertical_align for lv_arclabel_get_text_horizontal_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_horizontal_align_mpobj, 1, mp_lv_arclabel_get_text_vertical_align, lv_arclabel_get_text_horizontal_align); /* * lvgl extension definition for: - * bool lv_buttonmatrix_has_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) + * lv_arclabel_overflow_t lv_arclabel_get_overflow(lv_obj_t *obj) */ -static mp_obj_t mp_lv_buttonmatrix_has_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_arclabel_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); - return convert_to_bool(_res); + lv_arclabel_overflow_t _res = ((lv_arclabel_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_has_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_has_button_ctrl, lv_buttonmatrix_has_button_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_overflow_mpobj, 1, mp_lv_arclabel_get_overflow, lv_arclabel_get_overflow); -/* Reusing lv_obj_is_layout_positioned for lv_buttonmatrix_get_one_checked */ +/* Reusing lv_obj_refr_size for lv_arclabel_get_end_overlap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_one_checked_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_buttonmatrix_get_one_checked); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_end_overlap_mpobj, 1, mp_lv_obj_refr_size, lv_arclabel_get_end_overlap); -/* Reusing lv_obj_create for lv_buttonmatrix_create */ +/* Reusing lv_arc_get_angle_start for lv_arclabel_get_text_angle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_create_mpobj, 1, mp_lv_obj_create, lv_buttonmatrix_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_get_text_angle_mpobj, 1, mp_lv_arc_get_angle_start, lv_arclabel_get_text_angle); + +/* Reusing lv_obj_create for lv_arclabel_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_arclabel_create_mpobj, 1, mp_lv_obj_create, lv_arclabel_create); /* - * lvgl buttonmatrix object definitions + * lvgl arclabel object definitions */ -static const mp_rom_map_elem_t buttonmatrix_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_map_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ctrl_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_ctrl_map_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_set_selected_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_width), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_set_one_checked_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_get_selected_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_buttonmatrix_get_button_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_has_button_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_get_one_checked_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_CTRL), MP_ROM_PTR(&mp_lv_LV_BUTTONMATRIX_CTRL_type_base) } +static const mp_rom_map_elem_t arclabel_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_arclabel_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_arclabel_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angle_start), MP_ROM_PTR(&mp_lv_arclabel_set_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angle_size), MP_ROM_PTR(&mp_lv_arclabel_set_angle_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_arclabel_set_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_arclabel_set_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_arclabel_set_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_arclabel_set_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_set_center_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_vertical_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_set_text_horizontal_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_arclabel_set_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_set_end_overlap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_start), MP_ROM_PTR(&mp_lv_arclabel_get_angle_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_size), MP_ROM_PTR(&mp_lv_arclabel_get_angle_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_arclabel_get_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_arclabel_get_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_radius), MP_ROM_PTR(&mp_lv_arclabel_get_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_center_offset_x), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_center_offset_y), MP_ROM_PTR(&mp_lv_arclabel_get_center_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_vertical_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_vertical_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_horizontal_align), MP_ROM_PTR(&mp_lv_arclabel_get_text_horizontal_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_arclabel_get_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_end_overlap), MP_ROM_PTR(&mp_lv_arclabel_get_end_overlap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_angle), MP_ROM_PTR(&mp_lv_arclabel_get_text_angle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_DIR), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_DIR_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TEXT_ALIGN), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_TEXT_ALIGN_type_base) }, + { MP_ROM_QSTR(MP_QSTR_OVERFLOW), MP_ROM_PTR(&mp_lv_LV_ARCLABEL_OVERFLOW_type_base) } }; -static MP_DEFINE_CONST_DICT(buttonmatrix_locals_dict, buttonmatrix_locals_dict_table); +static MP_DEFINE_CONST_DICT(arclabel_locals_dict, arclabel_locals_dict_table); -static void buttonmatrix_print(const mp_print_t *print, +static void arclabel_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl buttonmatrix"); + mp_printf(print, "lvgl arclabel"); } -static mp_obj_t buttonmatrix_make_new( +static mp_obj_t arclabel_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_buttonmatrix_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_arclabel_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_buttonmatrix_type_base, - MP_QSTR_buttonmatrix, + mp_lv_arclabel_type_base, + MP_QSTR_arclabel, MP_TYPE_FLAG_NONE, - print, buttonmatrix_print, - make_new, buttonmatrix_make_new, + print, arclabel_print, + make_new, arclabel_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &buttonmatrix_locals_dict + locals_dict, &arclabel_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_buttonmatrix_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_arclabel_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_buttonmatrix_class, + .lv_obj_class = &lv_arclabel_class, #endif - .mp_obj_type = &mp_lv_buttonmatrix_type_base, + .mp_obj_type = &mp_lv_arclabel_type_base, }; +/* Reusing lv_arclabel_set_text for lv_label_set_text */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text); + +/* Reusing lv_arclabel_set_text for lv_label_set_text_static */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_label_set_text_static); + /* * lvgl extension definition for: - * void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day) + * void lv_label_set_long_mode(lv_obj_t *obj, lv_label_long_mode_t long_mode) */ -static mp_obj_t mp_lv_calendar_set_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_set_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t year = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t month = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t day = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, uint32_t))lv_func_ptr)(obj, year, month, day); + lv_label_long_mode_t long_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_label_long_mode_t))lv_func_ptr)(obj, long_mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_date_mpobj, 4, mp_lv_calendar_set_today_date, lv_calendar_set_today_date); - -/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_year */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_year); - -/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_month */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_month); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_long_mode_mpobj, 2, mp_lv_label_set_long_mode, lv_label_set_long_mode); -/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_day */ +/* Reusing lv_obj_move_to_index for lv_label_set_max_lines */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_day_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_day); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_max_lines_mpobj, 2, mp_lv_obj_move_to_index, lv_label_set_max_lines); -/* Reusing lv_obj_fade_in for lv_calendar_set_month_shown */ +/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_start */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_month_shown_mpobj, 3, mp_lv_obj_fade_in, lv_calendar_set_month_shown); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_start_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_start); -/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_year */ +/* Reusing lv_obj_delete_delayed for lv_label_set_text_selection_end */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_year); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_text_selection_end_mpobj, 2, mp_lv_obj_delete_delayed, lv_label_set_text_selection_end); -/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_month */ +/* Reusing lv_obj_set_hidden for lv_label_set_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_month); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_set_recolor_mpobj, 2, mp_lv_obj_set_hidden, lv_label_set_recolor); /* - * Struct lv_calendar_date_t + * lvgl extension definition for: + * char *lv_label_get_text(const lv_obj_t *obj) */ -static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_calendar_date_t(mp_obj_t self_in) +static mp_obj_t mp_lv_label_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_calendar_date_t_type())); - return (lv_calendar_date_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + char * _res = ((char *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return convert_to_str((void*)_res); } -#define mp_write_lv_calendar_date_t(struct_obj) *((lv_calendar_date_t*)mp_write_ptr_lv_calendar_date_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_calendar_date_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_mpobj, 1, mp_lv_label_get_text, lv_label_get_text); + + +/* + * lvgl extension definition for: + * lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_label_get_long_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_calendar_date_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_label_long_mode_t _res = ((lv_label_long_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -#define mp_read_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(copy_buffer(&field, sizeof(lv_calendar_date_t))) -#define mp_read_byref_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(&field) + -static void mp_lv_calendar_date_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_calendar_date_t *data = (lv_calendar_date_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_long_mode_mpobj, 1, mp_lv_label_get_long_mode, lv_label_get_long_mode); + +/* Reusing lv_obj_get_index for lv_label_get_max_lines */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_year: dest[0] = mp_obj_new_int_from_uint(data->year); break; // converting from uint16_t; - case MP_QSTR_month: dest[0] = mp_obj_new_int_from_uint(data->month); break; // converting from uint8_t; - case MP_QSTR_day: dest[0] = mp_obj_new_int_from_uint(data->day); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_year: data->year = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_month: data->month = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_day: data->day = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_max_lines_mpobj, 1, mp_lv_obj_get_index, lv_label_get_max_lines); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_label_get_letter_pos(const lv_obj_t *obj, uint32_t char_id, lv_point_t *pos) + */ -static void mp_lv_calendar_date_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_label_get_letter_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_calendar_date_t"); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint32_t char_id = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); + ((void (*)(const lv_obj_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, char_id, pos); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_calendar_date_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_calendar_date_t_type, - MP_QSTR_lv_calendar_date_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_calendar_date_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_calendar_date_t_attr, - locals_dict, &mp_lv_calendar_date_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_pos_mpobj, 3, mp_lv_label_get_letter_pos, lv_label_get_letter_pos); + -static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void) +/* + * lvgl extension definition for: + * uint32_t lv_label_get_letter_on(const lv_obj_t *obj, lv_point_t *pos_in, bool bidi) + */ + +static mp_obj_t mp_lv_label_get_letter_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_calendar_date_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *pos_in = mp_write_ptr_lv_point_t(mp_args[1]); + bool bidi = mp_obj_is_true(mp_args[2]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_point_t *, bool))lv_func_ptr)(obj, pos_in, bidi); + return mp_obj_new_int_from_uint(_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_letter_on_mpobj, 3, mp_lv_label_get_letter_on, lv_label_get_letter_on); /* - * Array convertors for lv_calendar_date_t [] + * lvgl extension definition for: + * bool lv_label_is_char_under_pos(const lv_obj_t *obj, lv_point_t *pos) */ -GENMPY_UNUSED static lv_calendar_date_t *mp_arr_to_lv_calendar_date_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_label_is_char_under_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_calendar_date_t *lv_arr = (lv_calendar_date_t*)m_malloc(len * sizeof(lv_calendar_date_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_calendar_date_t(item); - } - return (lv_calendar_date_t *)lv_arr; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[1]); + bool _res = ((bool (*)(const lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, pos); + return convert_to_bool(_res); } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_calendar_date_t_____(lv_calendar_date_t *arr) -{ - return mp_read_ptr_lv_calendar_date_t((void*)arr); -} + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_is_char_under_pos_mpobj, 2, mp_lv_label_is_char_under_pos, lv_label_is_char_under_pos); + +/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_start */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_start_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_start); + +/* Reusing lv_obj_get_child_count for lv_label_get_text_selection_end */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_text_selection_end_mpobj, 1, mp_lv_obj_get_child_count, lv_label_get_text_selection_end); + +/* Reusing lv_obj_is_layout_positioned for lv_label_get_recolor */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_get_recolor_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_label_get_recolor); + /* * lvgl extension definition for: - * void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], size_t date_num) + * lv_observer_t *lv_label_bind_text(lv_obj_t *obj, lv_subject_t *subject, const char *fmt) */ -static mp_obj_t mp_lv_calendar_set_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_bind_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_calendar_date_t *highlighted = mp_arr_to_lv_calendar_date_t_____(mp_args[1]); - size_t date_num = (size_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_calendar_date_t [], size_t))lv_func_ptr)(obj, highlighted, date_num); - return mp_const_none; + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[1]); + const char *fmt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, subject, fmt); + return mp_read_ptr_lv_observer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_highlighted_dates_mpobj, 3, mp_lv_calendar_set_highlighted_dates, lv_calendar_set_highlighted_dates); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_bind_text_mpobj, 3, mp_lv_label_bind_text, lv_label_bind_text); /* * lvgl extension definition for: - * void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names) + * void lv_label_ins_text(lv_obj_t *obj, uint32_t pos, const char *txt) */ -static mp_obj_t mp_lv_calendar_set_day_names(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_label_ins_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char **day_names = (const char **)mp_write_ptr_C_Pointer(mp_args[1]); - ((void (*)(lv_obj_t *, const char **))lv_func_ptr)(obj, day_names); + uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, const char *))lv_func_ptr)(obj, pos, txt); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_day_names_mpobj, 2, mp_lv_calendar_set_day_names, lv_calendar_set_day_names); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_ins_text_mpobj, 3, mp_lv_label_ins_text, lv_label_ins_text); -/* Reusing lv_obj_get_screen for lv_calendar_get_btnmatrix */ +/* Reusing lv_obj_fade_in for lv_label_cut_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_btnmatrix_mpobj, 1, mp_lv_obj_get_screen, lv_calendar_get_btnmatrix); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_cut_text_mpobj, 3, mp_lv_obj_fade_in, lv_label_cut_text); + +/* Reusing lv_obj_create for lv_label_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_label_create_mpobj, 1, mp_lv_obj_create, lv_label_create); /* - * lvgl extension definition for: - * const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *calendar) + * lvgl label object definitions */ + -static mp_obj_t mp_lv_calendar_get_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static const mp_rom_map_elem_t label_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_label_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_label_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_long_mode), MP_ROM_PTR(&mp_lv_label_set_long_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_lines), MP_ROM_PTR(&mp_lv_label_set_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_selection_start), MP_ROM_PTR(&mp_lv_label_set_text_selection_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_selection_end), MP_ROM_PTR(&mp_lv_label_set_text_selection_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_label_set_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_label_get_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_long_mode), MP_ROM_PTR(&mp_lv_label_get_long_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_lines), MP_ROM_PTR(&mp_lv_label_get_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_letter_pos), MP_ROM_PTR(&mp_lv_label_get_letter_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_letter_on), MP_ROM_PTR(&mp_lv_label_get_letter_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_char_under_pos), MP_ROM_PTR(&mp_lv_label_is_char_under_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_selection_start), MP_ROM_PTR(&mp_lv_label_get_text_selection_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_selection_end), MP_ROM_PTR(&mp_lv_label_get_text_selection_end_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_recolor), MP_ROM_PTR(&mp_lv_label_get_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_text), MP_ROM_PTR(&mp_lv_label_bind_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_text), MP_ROM_PTR(&mp_lv_label_ins_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cut_text), MP_ROM_PTR(&mp_lv_label_cut_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_LONG_MODE), MP_ROM_PTR(&mp_lv_LV_LABEL_LONG_MODE_type_base) } +}; + +static MP_DEFINE_CONST_DICT(label_locals_dict, label_locals_dict_table); + +static void label_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_calendar_date_t * _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(calendar); - return mp_read_ptr_lv_calendar_date_t((void*)_res); + mp_printf(print, "lvgl label"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_today_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_today_date); +static mp_obj_t label_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_label_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_label_type_base, + MP_QSTR_label, + MP_TYPE_FLAG_NONE, + print, label_print, + make_new, label_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &label_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_label_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_label_class, +#endif + .mp_obj_type = &mp_lv_label_type_base, +}; -/* Reusing lv_calendar_get_today_date for lv_calendar_get_showed_date */ +/* Reusing lv_obj_scroll_to_x for lv_bar_set_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_showed_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_showed_date); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_value); + +/* Reusing lv_obj_scroll_to_x for lv_bar_set_start_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_bar_set_start_value); + +/* Reusing lv_obj_set_pos for lv_bar_set_range */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_bar_set_range); + +/* Reusing lv_obj_move_to_index for lv_bar_set_min_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_min_value); + +/* Reusing lv_obj_move_to_index for lv_bar_set_max_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_bar_set_max_value); /* * lvgl extension definition for: - * lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *calendar) + * void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode) */ -static mp_obj_t mp_lv_calendar_get_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bar_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_calendar_date_t * _res = ((lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(calendar); - return mp_read_ptr_lv_calendar_date_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_bar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_bar_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_mpobj, 1, mp_lv_calendar_get_highlighted_dates, lv_calendar_get_highlighted_dates); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_mode_mpobj, 2, mp_lv_bar_set_mode, lv_bar_set_mode); /* * lvgl extension definition for: - * size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *calendar) + * void lv_bar_set_orientation(lv_obj_t *obj, lv_bar_orientation_t orientation) */ -static mp_obj_t mp_lv_calendar_get_highlighted_dates_num(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bar_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - size_t _res = ((size_t (*)(const lv_obj_t *))lv_func_ptr)(calendar); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_bar_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_bar_orientation_t))lv_func_ptr)(obj, orientation); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_num_mpobj, 1, mp_lv_calendar_get_highlighted_dates_num, lv_calendar_get_highlighted_dates_num); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_set_orientation_mpobj, 2, mp_lv_bar_set_orientation, lv_bar_set_orientation); + +/* Reusing lv_obj_get_index for lv_bar_get_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_value); + +/* Reusing lv_obj_get_index for lv_bar_get_start_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_start_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_start_value); + +/* Reusing lv_obj_get_index for lv_bar_get_min_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_min_value); + +/* Reusing lv_obj_get_index for lv_bar_get_max_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_bar_get_max_value); /* * lvgl extension definition for: - * lv_result_t lv_calendar_get_pressed_date(const lv_obj_t *calendar, lv_calendar_date_t *date) + * lv_bar_mode_t lv_bar_get_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_calendar_get_pressed_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bar_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *calendar = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_calendar_date_t *date = mp_write_ptr_lv_calendar_date_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, lv_calendar_date_t *))lv_func_ptr)(calendar, date); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_bar_mode_t _res = ((lv_bar_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_pressed_date_mpobj, 2, mp_lv_calendar_get_pressed_date, lv_calendar_get_pressed_date); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_mode_mpobj, 1, mp_lv_bar_get_mode, lv_bar_get_mode); -/* Reusing lv_obj_create for lv_calendar_add_header_arrow */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_arrow_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_arrow); +/* + * lvgl extension definition for: + * lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_bar_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_bar_orientation_t _res = ((lv_bar_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_get_orientation_mpobj, 1, mp_lv_bar_get_orientation, lv_bar_get_orientation); -/* Reusing lv_obj_create for lv_calendar_add_header_dropdown */ +/* Reusing lv_obj_refr_size for lv_bar_is_symmetrical */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_dropdown_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_dropdown); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_bar_is_symmetrical); -/* Reusing lv_arclabel_set_text for lv_calendar_header_dropdown_set_year_list */ +/* Reusing lv_obj_bind_checked for lv_bar_bind_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_header_dropdown_set_year_list_mpobj, 2, mp_lv_arclabel_set_text, lv_calendar_header_dropdown_set_year_list); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_bar_bind_value); -/* Reusing lv_obj_create for lv_calendar_create */ +/* Reusing lv_obj_create for lv_bar_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_create_mpobj, 1, mp_lv_obj_create, lv_calendar_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_bar_create_mpobj, 1, mp_lv_obj_create, lv_bar_create); /* - * lvgl calendar object definitions + * lvgl bar object definitions */ -static const mp_rom_map_elem_t calendar_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_today_date), MP_ROM_PTR(&mp_lv_calendar_set_today_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_today_year), MP_ROM_PTR(&mp_lv_calendar_set_today_year_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_today_month), MP_ROM_PTR(&mp_lv_calendar_set_today_month_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_today_day), MP_ROM_PTR(&mp_lv_calendar_set_today_day_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_month_shown), MP_ROM_PTR(&mp_lv_calendar_set_month_shown_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shown_year), MP_ROM_PTR(&mp_lv_calendar_set_shown_year_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shown_month), MP_ROM_PTR(&mp_lv_calendar_set_shown_month_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_set_highlighted_dates_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_day_names), MP_ROM_PTR(&mp_lv_calendar_set_day_names_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_btnmatrix), MP_ROM_PTR(&mp_lv_calendar_get_btnmatrix_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_today_date), MP_ROM_PTR(&mp_lv_calendar_get_today_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_showed_date), MP_ROM_PTR(&mp_lv_calendar_get_showed_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates_num), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_num_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pressed_date), MP_ROM_PTR(&mp_lv_calendar_get_pressed_date_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_header_arrow), MP_ROM_PTR(&mp_lv_calendar_add_header_arrow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_header_dropdown), MP_ROM_PTR(&mp_lv_calendar_add_header_dropdown_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_header_dropdown_set_year_list), MP_ROM_PTR(&mp_lv_calendar_header_dropdown_set_year_list_mpobj) } +static const mp_rom_map_elem_t bar_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_bar_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_bar_set_start_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_bar_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_bar_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_bar_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_bar_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_bar_set_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_bar_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_start_value), MP_ROM_PTR(&mp_lv_bar_get_start_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_bar_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_bar_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_bar_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_bar_get_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_bar_is_symmetrical_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_bar_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_BAR_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_BAR_ORIENTATION_type_base) } }; -static MP_DEFINE_CONST_DICT(calendar_locals_dict, calendar_locals_dict_table); +static MP_DEFINE_CONST_DICT(bar_locals_dict, bar_locals_dict_table); -static void calendar_print(const mp_print_t *print, +static void bar_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl calendar"); + mp_printf(print, "lvgl bar"); } -static mp_obj_t calendar_make_new( +static mp_obj_t bar_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_calendar_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_bar_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_calendar_type_base, - MP_QSTR_calendar, + mp_lv_bar_type_base, + MP_QSTR_bar, MP_TYPE_FLAG_NONE, - print, calendar_print, - make_new, calendar_make_new, + print, bar_print, + make_new, bar_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &calendar_locals_dict + locals_dict, &bar_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_calendar_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_bar_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_calendar_class, + .lv_obj_class = &lv_bar_class, #endif - .mp_obj_type = &mp_lv_calendar_type_base, + .mp_obj_type = &mp_lv_bar_type_base, }; @@ -22228,13 +23528,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_get_px_mpobj, 3, mp_lv_canvas /* * lvgl extension definition for: - * lv_image_dsc_t *lv_canvas_get_image(lv_obj_t *canvas) + * lv_image_dsc_t *lv_canvas_get_image(lv_obj_t *obj) */ static mp_obj_t mp_lv_canvas_get_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *canvas = mp_to_lv(mp_args[0]); - lv_image_dsc_t * _res = ((lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(canvas); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_image_dsc_t * _res = ((lv_image_dsc_t *(*)(lv_obj_t *))lv_func_ptr)(obj); return mp_read_ptr_lv_image_dsc_t((void*)_res); } @@ -22288,14 +23588,14 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_canvas_fill_bg_mpobj, 3, mp_lv_canva /* * lvgl extension definition for: - * void lv_canvas_init_layer(lv_obj_t *canvas, lv_layer_t *layer) + * void lv_canvas_init_layer(lv_obj_t *obj, lv_layer_t *layer) */ static mp_obj_t mp_lv_canvas_init_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *canvas = mp_to_lv(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[0]); lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_layer_t *))lv_func_ptr)(canvas, layer); + ((void (*)(lv_obj_t *, lv_layer_t *))lv_func_ptr)(obj, layer); return mp_const_none; } @@ -22396,448 +23696,668 @@ GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_canvas_type = { /* * lvgl extension definition for: - * void lv_chart_set_type(lv_obj_t *obj, lv_chart_type_t type) + * void lv_barcode_set_dark_color(lv_obj_t *obj, lv_color_t color) */ -static mp_obj_t mp_lv_chart_set_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_set_dark_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_type_t type = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_type_t))lv_func_ptr)(obj, type); + lv_color_t color = mp_write_lv_color_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_color_t))lv_func_ptr)(obj, color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_type_mpobj, 2, mp_lv_chart_set_type, lv_chart_set_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_dark_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_barcode_set_dark_color); -/* Reusing lv_obj_delete_delayed for lv_chart_set_point_count */ +/* Reusing lv_barcode_set_dark_color for lv_barcode_set_light_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_point_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_point_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_light_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_barcode_set_light_color); /* * lvgl extension definition for: - * void lv_chart_set_axis_range(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min, int32_t max) + * void lv_barcode_set_scale(lv_obj_t *obj, uint16_t scale) */ -static mp_obj_t mp_lv_chart_set_axis_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_set_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t, int32_t))lv_func_ptr)(obj, axis, min, max); + uint16_t scale = (uint16_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint16_t))lv_func_ptr)(obj, scale); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_range_mpobj, 4, mp_lv_chart_set_axis_range, lv_chart_set_axis_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_scale_mpobj, 2, mp_lv_barcode_set_scale, lv_barcode_set_scale); + +/* Reusing lv_obj_set_scroll_dir for lv_barcode_set_direction */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_barcode_set_direction); + +/* Reusing lv_obj_set_hidden for lv_barcode_set_tiled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_tiled_mpobj, 2, mp_lv_obj_set_hidden, lv_barcode_set_tiled); /* * lvgl extension definition for: - * void lv_chart_set_axis_min_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min) + * void lv_barcode_set_encoding(lv_obj_t *obj, lv_barcode_encoding_t encoding) */ -static mp_obj_t mp_lv_chart_set_axis_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_set_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_func_ptr)(obj, axis, min); + lv_barcode_encoding_t encoding = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_barcode_encoding_t))lv_func_ptr)(obj, encoding); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_min_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_encoding_mpobj, 2, mp_lv_barcode_set_encoding, lv_barcode_set_encoding); -/* Reusing lv_chart_set_axis_min_value for lv_chart_set_axis_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_max_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_max_value); +/* + * lvgl extension definition for: + * lv_result_t lv_barcode_update(lv_obj_t *obj, const char *data) + */ + +static mp_obj_t mp_lv_barcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const char *data = (const char *)(char*)convert_from_str(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, data); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_update_mpobj, 2, mp_lv_barcode_update, lv_barcode_update); /* * lvgl extension definition for: - * void lv_chart_set_update_mode(lv_obj_t *obj, lv_chart_update_mode_t update_mode) + * lv_result_t lv_barcode_render(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_render(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_update_mode_t update_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_update_mode_t))lv_func_ptr)(obj, update_mode); - return mp_const_none; + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_update_mode_mpobj, 2, mp_lv_chart_set_update_mode, lv_chart_set_update_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_render_mpobj, 1, mp_lv_barcode_render, lv_barcode_render); -/* Reusing lv_obj_fade_in for lv_chart_set_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_div_line_count_mpobj, 3, mp_lv_obj_fade_in, lv_chart_set_div_line_count); +/* + * lvgl extension definition for: + * void lv_barcode_set_update_mode(lv_obj_t *obj, lv_barcode_update_mode_t mode) + */ + +static mp_obj_t mp_lv_barcode_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_barcode_update_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_barcode_update_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_update_mode_mpobj, 2, mp_lv_barcode_set_update_mode, lv_barcode_set_update_mode); -/* Reusing lv_obj_delete_delayed for lv_chart_set_hor_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_hor_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_hor_div_line_count); +/* + * lvgl extension definition for: + * lv_barcode_update_mode_t lv_barcode_get_update_mode(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_barcode_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_barcode_update_mode_t _res = ((lv_barcode_update_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_update_mode_mpobj, 1, mp_lv_barcode_get_update_mode, lv_barcode_get_update_mode); -/* Reusing lv_obj_delete_delayed for lv_chart_set_ver_div_line_count */ +/* Reusing lv_obj_refr_size for lv_barcode_is_render_valid */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_ver_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_ver_div_line_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_is_render_valid_mpobj, 1, mp_lv_obj_refr_size, lv_barcode_is_render_valid); /* * lvgl extension definition for: - * lv_chart_type_t lv_chart_get_type(const lv_obj_t *obj) + * lv_color_t lv_barcode_get_dark_color(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_get_dark_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_type_t _res = ((lv_chart_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_t _res = ((lv_color_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_type_mpobj, 1, mp_lv_chart_get_type, lv_chart_get_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_dark_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_dark_color); -/* Reusing lv_obj_get_child_count for lv_chart_get_point_count */ +/* Reusing lv_barcode_get_dark_color for lv_barcode_get_light_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_point_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_light_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_light_color); /* * lvgl extension definition for: - * lv_chart_update_mode_t lv_chart_get_update_mode(const lv_obj_t *obj) + * uint16_t lv_barcode_get_scale(lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_barcode_get_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_update_mode_t _res = ((lv_chart_update_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint16_t _res = ((uint16_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_update_mode_mpobj, 1, mp_lv_chart_get_update_mode, lv_chart_get_update_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_scale_mpobj, 1, mp_lv_barcode_get_scale, lv_barcode_get_scale); -/* Reusing lv_obj_get_child_count for lv_chart_get_hor_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_hor_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_hor_div_line_count); +/* + * lvgl extension definition for: + * lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_barcode_get_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_barcode_encoding_t _res = ((lv_barcode_encoding_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_encoding_mpobj, 1, mp_lv_barcode_get_encoding, lv_barcode_get_encoding); -/* Reusing lv_obj_get_child_count for lv_chart_get_ver_div_line_count */ +/* Reusing lv_obj_create for lv_barcode_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_ver_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_ver_div_line_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_create_mpobj, 1, mp_lv_obj_create, lv_barcode_create); /* - * Struct lv_chart_series_t + * lvgl barcode object definitions */ + -static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void); +static const mp_rom_map_elem_t barcode_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_barcode_set_dark_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_barcode_set_light_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_barcode_set_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_direction), MP_ROM_PTR(&mp_lv_barcode_set_direction_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tiled), MP_ROM_PTR(&mp_lv_barcode_set_tiled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_encoding), MP_ROM_PTR(&mp_lv_barcode_set_encoding_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_barcode_update_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_render), MP_ROM_PTR(&mp_lv_barcode_render_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_barcode_set_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_barcode_get_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_render_valid), MP_ROM_PTR(&mp_lv_barcode_is_render_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dark_color), MP_ROM_PTR(&mp_lv_barcode_get_dark_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_light_color), MP_ROM_PTR(&mp_lv_barcode_get_light_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_barcode_get_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_encoding), MP_ROM_PTR(&mp_lv_barcode_get_encoding_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ENCODING_CODE128), MP_ROM_PTR(&mp_lv_LV_BARCODE_ENCODING_CODE128_type_base) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_BARCODE_UPDATE_MODE_type_base) } +}; -GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_series_t(mp_obj_t self_in) +static MP_DEFINE_CONST_DICT(barcode_locals_dict, barcode_locals_dict_table); + +static void barcode_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_series_t_type())); - return (lv_chart_series_t*)self->data; + mp_printf(print, "lvgl barcode"); } -#define mp_write_lv_chart_series_t(struct_obj) *((lv_chart_series_t*)mp_write_ptr_lv_chart_series_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_series_t(void *field) +static mp_obj_t barcode_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - return lv_to_mp_struct(get_mp_lv_chart_series_t_type(), field); + return make_new(&mp_lv_barcode_create_mpobj, type, n_args, n_kw, args); } -#define mp_read_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(copy_buffer(&field, sizeof(lv_chart_series_t))) -#define mp_read_byref_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(&field) -static void mp_lv_chart_series_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_chart_series_t *data = (lv_chart_series_t*)self->data; +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_barcode_type_base, + MP_QSTR_barcode, + MP_TYPE_FLAG_NONE, + print, barcode_print, + make_new, barcode_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &barcode_locals_dict +); - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_x_points: dest[0] = mp_array_from_i32ptr((void*)data->x_points); break; // converting from int32_t *; - case MP_QSTR_y_points: dest[0] = mp_array_from_i32ptr((void*)data->y_points); break; // converting from int32_t *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_start_point: dest[0] = mp_obj_new_int_from_uint(data->start_point); break; // converting from uint32_t; - case MP_QSTR_hidden: dest[0] = mp_obj_new_int_from_uint(data->hidden); break; // converting from uint32_t; - case MP_QSTR_x_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->x_ext_buf_assigned); break; // converting from uint32_t; - case MP_QSTR_y_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->y_ext_buf_assigned); break; // converting from uint32_t; - case MP_QSTR_x_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->x_axis_sec); break; // converting from uint32_t; - case MP_QSTR_y_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->y_axis_sec); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_x_points: data->x_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; - case MP_QSTR_y_points: data->y_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_start_point: data->start_point = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_hidden: data->hidden = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_x_ext_buf_assigned: data->x_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_y_ext_buf_assigned: data->y_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_x_axis_sec: data->x_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_y_axis_sec: data->y_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_barcode_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_barcode_class, +#endif + .mp_obj_type = &mp_lv_barcode_type_base, +}; + +/* Reusing lv_obj_create for lv_button_create */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_button_create_mpobj, 1, mp_lv_obj_create, lv_button_create); + -static void mp_lv_chart_series_t_print(const mp_print_t *print, +/* + * lvgl button object definitions + */ + + +static const mp_rom_map_elem_t button_locals_dict_table[] = { + +}; + +static MP_DEFINE_CONST_DICT(button_locals_dict, button_locals_dict_table); + +static void button_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_chart_series_t"); + mp_printf(print, "lvgl button"); +} + + +static mp_obj_t button_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_button_create_mpobj, type, n_args, n_kw, args); } -static const mp_obj_dict_t mp_lv_chart_series_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_chart_series_t_type, - MP_QSTR_lv_chart_series_t, + mp_lv_button_type_base, + MP_QSTR_button, MP_TYPE_FLAG_NONE, - print, mp_lv_chart_series_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_chart_series_t_attr, - locals_dict, &mp_lv_chart_series_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, button_print, + make_new, button_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &button_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void) -{ - return &mp_lv_chart_series_t_type; -} +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_button_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_button_class, +#endif + .mp_obj_type = &mp_lv_button_type_base, +}; /* - * lvgl extension definition for: - * uint32_t lv_chart_get_x_start_point(const lv_obj_t *obj, lv_chart_series_t *ser) + * Array convertors for char *[] */ -static mp_obj_t mp_lv_chart_get_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static char * *mp_arr_to_char_ptr____(mp_obj_t mp_arr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); - return mp_obj_new_int_from_uint(_res); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + char * *lv_arr = (char **)m_malloc(len * sizeof(char *)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (char*)convert_from_str(item); + } + return (char * *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_char_ptr____(const char * const *arr) +{ + return mp_read_ptr_C_Pointer((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_x_start_point_mpobj, 2, mp_lv_chart_get_x_start_point, lv_chart_get_x_start_point); - /* * lvgl extension definition for: - * void lv_chart_get_point_pos_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, lv_point_t *p_out) + * void lv_buttonmatrix_set_map(lv_obj_t *obj, const char * const map[]) */ -static mp_obj_t mp_lv_chart_get_point_pos_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_point_t *p_out = mp_write_ptr_lv_point_t(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, ser, id, p_out); + const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[1]); + ((void (*)(lv_obj_t *, const char * const []))lv_func_ptr)(obj, map); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_pos_by_id_mpobj, 4, mp_lv_chart_get_point_pos_by_id, lv_chart_get_point_pos_by_id); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_map_mpobj, 2, mp_lv_buttonmatrix_set_map, lv_buttonmatrix_set_map); -/* Reusing lv_obj_move_foreground for lv_chart_refresh */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_chart_refresh); +/* + * Array convertors for lv_buttonmatrix_ctrl_t [] + */ + +GENMPY_UNUSED static lv_buttonmatrix_ctrl_t *mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + lv_buttonmatrix_ctrl_t *lv_arr = (lv_buttonmatrix_ctrl_t*)m_malloc(len * sizeof(lv_buttonmatrix_ctrl_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (int)mp_obj_get_int(item); + } + return (lv_buttonmatrix_ctrl_t *)lv_arr; +} + +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_buttonmatrix_ctrl_t_____(const lv_buttonmatrix_ctrl_t *arr) +{ + return mp_array_from_i32ptr((void*)arr); +} + /* * lvgl extension definition for: - * lv_chart_series_t *lv_chart_add_series(lv_obj_t *obj, lv_color_t color, lv_chart_axis_t axis) + * void lv_buttonmatrix_set_ctrl_map(lv_obj_t *obj, const lv_buttonmatrix_ctrl_t ctrl_map[]) */ -static mp_obj_t mp_lv_chart_add_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_ctrl_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_t color = mp_write_lv_color_t(mp_args[1]); - lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[2]); - lv_chart_series_t * _res = ((lv_chart_series_t *(*)(lv_obj_t *, lv_color_t, lv_chart_axis_t))lv_func_ptr)(obj, color, axis); - return mp_read_ptr_lv_chart_series_t((void*)_res); + const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[1]); + ((void (*)(lv_obj_t *, const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(obj, ctrl_map); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_series_mpobj, 3, mp_lv_chart_add_series, lv_chart_add_series); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_ctrl_map_mpobj, 2, mp_lv_buttonmatrix_set_ctrl_map, lv_buttonmatrix_set_ctrl_map); + +/* Reusing lv_obj_delete_delayed for lv_buttonmatrix_set_selected_button */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_selected_button_mpobj, 2, mp_lv_obj_delete_delayed, lv_buttonmatrix_set_selected_button); /* * lvgl extension definition for: - * void lv_chart_remove_series(lv_obj_t *obj, lv_chart_series_t *series) + * void lv_buttonmatrix_set_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) */ -static mp_obj_t mp_lv_chart_remove_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, series); + uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_series_mpobj, 2, mp_lv_chart_remove_series, lv_chart_remove_series); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_set_button_ctrl); + +/* Reusing lv_buttonmatrix_set_button_ctrl for lv_buttonmatrix_clear_button_ctrl */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_set_button_ctrl, lv_buttonmatrix_clear_button_ctrl); /* * lvgl extension definition for: - * void lv_chart_hide_series(lv_obj_t *chart, lv_chart_series_t *series, bool hide) + * void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) */ -static mp_obj_t mp_lv_chart_hide_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_set_button_ctrl_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); - bool hide = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, bool))lv_func_ptr)(chart, series, hide); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, ctrl); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_hide_series_mpobj, 3, mp_lv_chart_hide_series, lv_chart_hide_series); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_set_button_ctrl_all); + +/* Reusing lv_buttonmatrix_set_button_ctrl_all for lv_buttonmatrix_clear_button_ctrl_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj, 2, mp_lv_buttonmatrix_set_button_ctrl_all, lv_buttonmatrix_clear_button_ctrl_all); + +/* Reusing lv_obj_fade_in for lv_buttonmatrix_set_button_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_button_width_mpobj, 3, mp_lv_obj_fade_in, lv_buttonmatrix_set_button_width); + +/* Reusing lv_obj_set_hidden for lv_buttonmatrix_set_one_checked */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_set_one_checked_mpobj, 2, mp_lv_obj_set_hidden, lv_buttonmatrix_set_one_checked); + +/* Reusing lv_obj_get_child_count for lv_buttonmatrix_get_selected_button */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_buttonmatrix_get_selected_button); /* * lvgl extension definition for: - * void lv_chart_set_series_color(lv_obj_t *chart, lv_chart_series_t *series, lv_color_t color) + * const char *lv_buttonmatrix_get_button_text(const lv_obj_t *obj, uint32_t btn_id) */ -static mp_obj_t mp_lv_chart_set_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); - lv_color_t color = mp_write_lv_color_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, lv_color_t))lv_func_ptr)(chart, series, color); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); + const char * _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_func_ptr)(obj, btn_id); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_color_mpobj, 3, mp_lv_chart_set_series_color, lv_chart_set_series_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_buttonmatrix_get_button_text); /* * lvgl extension definition for: - * lv_color_t lv_chart_get_series_color(lv_obj_t *chart, const lv_chart_series_t *series) + * bool lv_buttonmatrix_has_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) */ -static mp_obj_t mp_lv_chart_get_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_buttonmatrix_has_button_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - const lv_chart_series_t *series = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); - lv_color_t _res = ((lv_color_t (*)(lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(chart, series); - return mp_read_lv_color_t(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t btn_id = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_func_ptr)(obj, btn_id, ctrl); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_color_mpobj, 2, mp_lv_chart_get_series_color, lv_chart_get_series_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_has_button_ctrl_mpobj, 3, mp_lv_buttonmatrix_has_button_ctrl, lv_buttonmatrix_has_button_ctrl); + +/* Reusing lv_obj_is_layout_positioned for lv_buttonmatrix_get_one_checked */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_get_one_checked_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_buttonmatrix_get_one_checked); + +/* Reusing lv_obj_create for lv_buttonmatrix_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_buttonmatrix_create_mpobj, 1, mp_lv_obj_create, lv_buttonmatrix_create); /* - * lvgl extension definition for: - * void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id) + * lvgl buttonmatrix object definitions */ + -static mp_obj_t mp_lv_chart_set_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static const mp_rom_map_elem_t buttonmatrix_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_map_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ctrl_map), MP_ROM_PTR(&mp_lv_buttonmatrix_set_ctrl_map_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_set_selected_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_ctrl_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_button_ctrl_all), MP_ROM_PTR(&mp_lv_buttonmatrix_clear_button_ctrl_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_width), MP_ROM_PTR(&mp_lv_buttonmatrix_set_button_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_set_one_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_buttonmatrix_get_selected_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_buttonmatrix_get_button_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_button_ctrl), MP_ROM_PTR(&mp_lv_buttonmatrix_has_button_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_one_checked), MP_ROM_PTR(&mp_lv_buttonmatrix_get_one_checked_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_CTRL), MP_ROM_PTR(&mp_lv_LV_BUTTONMATRIX_CTRL_type_base) } +}; + +static MP_DEFINE_CONST_DICT(buttonmatrix_locals_dict, buttonmatrix_locals_dict_table); + +static void buttonmatrix_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(obj, ser, id); - return mp_const_none; + mp_printf(print, "lvgl buttonmatrix"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_x_start_point_mpobj, 3, mp_lv_chart_set_x_start_point, lv_chart_set_x_start_point); +static mp_obj_t buttonmatrix_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_buttonmatrix_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_buttonmatrix_type_base, + MP_QSTR_buttonmatrix, + MP_TYPE_FLAG_NONE, + print, buttonmatrix_print, + make_new, buttonmatrix_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &buttonmatrix_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_buttonmatrix_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_buttonmatrix_class, +#endif + .mp_obj_type = &mp_lv_buttonmatrix_type_base, +}; /* * lvgl extension definition for: - * lv_chart_series_t *lv_chart_get_series_next(const lv_obj_t *chart, const lv_chart_series_t *ser) + * void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day) */ -static mp_obj_t mp_lv_chart_get_series_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_set_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *chart = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_chart_series_t *ser = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); - lv_chart_series_t * _res = ((lv_chart_series_t *(*)(const lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(chart, ser); - return mp_read_ptr_lv_chart_series_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t year = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t month = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t day = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, uint32_t))lv_func_ptr)(obj, year, month, day); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_next_mpobj, 2, mp_lv_chart_get_series_next, lv_chart_get_series_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_date_mpobj, 4, mp_lv_calendar_set_today_date, lv_calendar_set_today_date); + +/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_year */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_year); + +/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_month */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_month); + +/* Reusing lv_obj_delete_delayed for lv_calendar_set_today_day */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_today_day_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_today_day); + +/* Reusing lv_obj_fade_in for lv_calendar_set_month_shown */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_month_shown_mpobj, 3, mp_lv_obj_fade_in, lv_calendar_set_month_shown); + +/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_year */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_year_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_year); + +/* Reusing lv_obj_delete_delayed for lv_calendar_set_shown_month */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_shown_month_mpobj, 2, mp_lv_obj_delete_delayed, lv_calendar_set_shown_month); /* - * Struct lv_chart_cursor_t + * Struct lv_calendar_date_t */ -static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_cursor_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_calendar_date_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_cursor_t_type())); - return (lv_chart_cursor_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_calendar_date_t_type())); + return (lv_calendar_date_t*)self->data; } -#define mp_write_lv_chart_cursor_t(struct_obj) *((lv_chart_cursor_t*)mp_write_ptr_lv_chart_cursor_t(struct_obj)) +#define mp_write_lv_calendar_date_t(struct_obj) *((lv_calendar_date_t*)mp_write_ptr_lv_calendar_date_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_cursor_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_calendar_date_t(void *field) { - return lv_to_mp_struct(get_mp_lv_chart_cursor_t_type(), field); + return lv_to_mp_struct(get_mp_lv_calendar_date_t_type(), field); } -#define mp_read_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(copy_buffer(&field, sizeof(lv_chart_cursor_t))) -#define mp_read_byref_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(&field) +#define mp_read_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(copy_buffer(&field, sizeof(lv_calendar_date_t))) +#define mp_read_byref_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(&field) -static void mp_lv_chart_cursor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_calendar_date_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_chart_cursor_t *data = (lv_chart_cursor_t*)self->data; + GENMPY_UNUSED lv_calendar_date_t *data = (lv_calendar_date_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_pos: dest[0] = mp_read_byref_lv_point_t(data->pos); break; // converting from lv_point_t; - case MP_QSTR_point_id: dest[0] = mp_obj_new_int(data->point_id); break; // converting from int32_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_ser: dest[0] = mp_read_ptr_lv_chart_series_t((void*)data->ser); break; // converting from lv_chart_series_t *; - case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_dir_t; - case MP_QSTR_pos_set: dest[0] = mp_obj_new_int_from_uint(data->pos_set); break; // converting from uint32_t; + case MP_QSTR_year: dest[0] = mp_obj_new_int_from_uint(data->year); break; // converting from uint16_t; + case MP_QSTR_month: dest[0] = mp_obj_new_int_from_uint(data->month); break; // converting from uint8_t; + case MP_QSTR_day: dest[0] = mp_obj_new_int_from_uint(data->day); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -22846,12 +24366,9 @@ static void mp_lv_chart_cursor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des // store attribute switch(attr) { - case MP_QSTR_pos: data->pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_point_id: data->point_id = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_ser: data->ser = (void*)mp_write_ptr_lv_chart_series_t(dest[1]); break; // converting to lv_chart_series_t *; - case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; - case MP_QSTR_pos_set: data->pos_set = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_year: data->year = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_month: data->month = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_day: data->day = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -22860,3443 +24377,3391 @@ static void mp_lv_chart_cursor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des } } -static void mp_lv_chart_cursor_t_print(const mp_print_t *print, +static void mp_lv_calendar_date_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_chart_cursor_t"); + mp_printf(print, "struct lv_calendar_date_t"); } -static const mp_obj_dict_t mp_lv_chart_cursor_t_locals_dict; +static const mp_obj_dict_t mp_lv_calendar_date_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_chart_cursor_t_type, - MP_QSTR_lv_chart_cursor_t, + mp_lv_calendar_date_t_type, + MP_QSTR_lv_calendar_date_t, MP_TYPE_FLAG_NONE, - print, mp_lv_chart_cursor_t_print, + print, mp_lv_calendar_date_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_chart_cursor_t_attr, - locals_dict, &mp_lv_chart_cursor_t_locals_dict, + attr, mp_lv_calendar_date_t_attr, + locals_dict, &mp_lv_calendar_date_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_calendar_date_t_type(void) { - return &mp_lv_chart_cursor_t_type; + return &mp_lv_calendar_date_t_type; } /* - * lvgl extension definition for: - * lv_chart_cursor_t *lv_chart_add_cursor(lv_obj_t *obj, lv_color_t color, lv_dir_t dir) + * Array convertors for lv_calendar_date_t [] */ -static mp_obj_t mp_lv_chart_add_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_calendar_date_t *mp_arr_to_lv_calendar_date_t_____(mp_obj_t mp_arr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_t color = mp_write_lv_color_t(mp_args[1]); - lv_dir_t dir = (int)mp_obj_get_int(mp_args[2]); - lv_chart_cursor_t * _res = ((lv_chart_cursor_t *(*)(lv_obj_t *, lv_color_t, lv_dir_t))lv_func_ptr)(obj, color, dir); - return mp_read_ptr_lv_chart_cursor_t((void*)_res); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_calendar_date_t *lv_arr = (lv_calendar_date_t*)m_malloc(len * sizeof(lv_calendar_date_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_calendar_date_t(item); + } + return (lv_calendar_date_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_calendar_date_t_____(lv_calendar_date_t *arr) +{ + return mp_read_ptr_lv_calendar_date_t((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_cursor_mpobj, 3, mp_lv_chart_add_cursor, lv_chart_add_cursor); - /* * lvgl extension definition for: - * void lv_chart_remove_cursor(lv_obj_t *obj, lv_chart_cursor_t *cursor) + * void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], size_t date_num) */ -static mp_obj_t mp_lv_chart_remove_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_set_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(obj, cursor); + lv_calendar_date_t *highlighted = mp_arr_to_lv_calendar_date_t_____(mp_args[1]); + size_t date_num = (size_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_calendar_date_t [], size_t))lv_func_ptr)(obj, highlighted, date_num); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_cursor_mpobj, 2, mp_lv_chart_remove_cursor, lv_chart_remove_cursor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_highlighted_dates_mpobj, 3, mp_lv_calendar_set_highlighted_dates, lv_calendar_set_highlighted_dates); /* * lvgl extension definition for: - * void lv_chart_set_cursor_pos(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_point_t *pos) + * void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names) */ -static mp_obj_t mp_lv_chart_set_cursor_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_set_day_names(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_point_t *))lv_func_ptr)(chart, cursor, pos); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const char **day_names = (const char **)mp_write_ptr_C_Pointer(mp_args[1]); + ((void (*)(lv_obj_t *, const char **))lv_func_ptr)(obj, day_names); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_mpobj, 3, mp_lv_chart_set_cursor_pos, lv_chart_set_cursor_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_set_day_names_mpobj, 2, mp_lv_calendar_set_day_names, lv_calendar_set_day_names); + +/* Reusing lv_obj_get_screen for lv_calendar_get_btnmatrix */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_btnmatrix_mpobj, 1, mp_lv_obj_get_screen, lv_calendar_get_btnmatrix); /* * lvgl extension definition for: - * void lv_chart_set_cursor_pos_x(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t x) + * const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_set_cursor_pos_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_get_today_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_func_ptr)(chart, cursor, x); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_calendar_date_t * _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_calendar_date_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_x_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_today_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_today_date); -/* Reusing lv_chart_set_cursor_pos_x for lv_chart_set_cursor_pos_y */ +/* Reusing lv_calendar_get_today_date for lv_calendar_get_showed_date */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_y_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_showed_date_mpobj, 1, mp_lv_calendar_get_today_date, lv_calendar_get_showed_date); /* * lvgl extension definition for: - * void lv_chart_set_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_chart_series_t *ser, uint32_t point_id) + * lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_set_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_get_highlighted_dates(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[2]); - uint32_t point_id = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(chart, cursor, ser, point_id); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_calendar_date_t * _res = ((lv_calendar_date_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_calendar_date_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_point_mpobj, 4, mp_lv_chart_set_cursor_point, lv_chart_set_cursor_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_mpobj, 1, mp_lv_calendar_get_highlighted_dates, lv_calendar_get_highlighted_dates); /* * lvgl extension definition for: - * lv_point_t lv_chart_get_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor) + * size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_chart_get_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_get_highlighted_dates_num(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *chart = mp_to_lv(mp_args[0]); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); - lv_point_t _res = ((lv_point_t (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(chart, cursor); - return mp_read_lv_point_t(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + size_t _res = ((size_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_cursor_point_mpobj, 2, mp_lv_chart_get_cursor_point, lv_chart_get_cursor_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_highlighted_dates_num_mpobj, 1, mp_lv_calendar_get_highlighted_dates_num, lv_calendar_get_highlighted_dates_num); /* * lvgl extension definition for: - * void lv_chart_set_all_values(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) + * lv_result_t lv_calendar_get_pressed_date(const lv_obj_t *obj, lv_calendar_date_t *date) */ -static mp_obj_t mp_lv_chart_set_all_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_calendar_get_pressed_date(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_func_ptr)(obj, ser, value); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_calendar_date_t *date = mp_write_ptr_lv_calendar_date_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, lv_calendar_date_t *))lv_func_ptr)(obj, date); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_all_values_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_all_values); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_get_pressed_date_mpobj, 2, mp_lv_calendar_get_pressed_date, lv_calendar_get_pressed_date); -/* Reusing lv_chart_set_all_values for lv_chart_set_next_value */ +/* Reusing lv_obj_create for lv_calendar_add_header_arrow */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_next_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_arrow_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_arrow); +/* Reusing lv_obj_create for lv_calendar_add_header_dropdown */ -/* - * lvgl extension definition for: - * void lv_chart_set_next_value2(lv_obj_t *obj, lv_chart_series_t *ser, int32_t x_value, int32_t y_value) - */ - -static mp_obj_t mp_lv_chart_set_next_value2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t x_value = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t y_value = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t, int32_t))lv_func_ptr)(obj, ser, x_value, y_value); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_add_header_dropdown_mpobj, 1, mp_lv_obj_create, lv_calendar_add_header_dropdown); + +/* Reusing lv_arclabel_set_text for lv_calendar_header_dropdown_set_year_list */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_header_dropdown_set_year_list_mpobj, 2, mp_lv_arclabel_set_text, lv_calendar_header_dropdown_set_year_list); + +/* Reusing lv_obj_create for lv_calendar_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value2_mpobj, 4, mp_lv_chart_set_next_value2, lv_chart_set_next_value2); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_calendar_create_mpobj, 1, mp_lv_obj_create, lv_calendar_create); /* - * lvgl extension definition for: - * void lv_chart_set_series_values(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t values[], size_t values_cnt) + * lvgl calendar object definitions */ + -static mp_obj_t mp_lv_chart_set_series_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - const int32_t *values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); - size_t values_cnt = (size_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], size_t))lv_func_ptr)(obj, ser, values, values_cnt); - return mp_const_none; -} +static const mp_rom_map_elem_t calendar_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_today_date), MP_ROM_PTR(&mp_lv_calendar_set_today_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_today_year), MP_ROM_PTR(&mp_lv_calendar_set_today_year_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_today_month), MP_ROM_PTR(&mp_lv_calendar_set_today_month_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_today_day), MP_ROM_PTR(&mp_lv_calendar_set_today_day_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_month_shown), MP_ROM_PTR(&mp_lv_calendar_set_month_shown_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shown_year), MP_ROM_PTR(&mp_lv_calendar_set_shown_year_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shown_month), MP_ROM_PTR(&mp_lv_calendar_set_shown_month_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_set_highlighted_dates_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_day_names), MP_ROM_PTR(&mp_lv_calendar_set_day_names_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_btnmatrix), MP_ROM_PTR(&mp_lv_calendar_get_btnmatrix_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_today_date), MP_ROM_PTR(&mp_lv_calendar_get_today_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_showed_date), MP_ROM_PTR(&mp_lv_calendar_get_showed_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_highlighted_dates_num), MP_ROM_PTR(&mp_lv_calendar_get_highlighted_dates_num_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pressed_date), MP_ROM_PTR(&mp_lv_calendar_get_pressed_date_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_header_arrow), MP_ROM_PTR(&mp_lv_calendar_add_header_arrow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_header_dropdown), MP_ROM_PTR(&mp_lv_calendar_add_header_dropdown_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_header_dropdown_set_year_list), MP_ROM_PTR(&mp_lv_calendar_header_dropdown_set_year_list_mpobj) } +}; - +static MP_DEFINE_CONST_DICT(calendar_locals_dict, calendar_locals_dict_table); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values_mpobj, 4, mp_lv_chart_set_series_values, lv_chart_set_series_values); - +static void calendar_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl calendar"); +} -/* - * lvgl extension definition for: - * void lv_chart_set_series_values2(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t x_values[], const int32_t y_values[], size_t values_cnt) - */ -static mp_obj_t mp_lv_chart_set_series_values2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t calendar_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - const int32_t *x_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); - const int32_t *y_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[3]); - size_t values_cnt = (size_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], const int32_t [], size_t))lv_func_ptr)(obj, ser, x_values, y_values, values_cnt); - return mp_const_none; + return make_new(&mp_lv_calendar_create_mpobj, type, n_args, n_kw, args); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values2_mpobj, 5, mp_lv_chart_set_series_values2, lv_chart_set_series_values2); +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_calendar_type_base, + MP_QSTR_calendar, + MP_TYPE_FLAG_NONE, + print, calendar_print, + make_new, calendar_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &calendar_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_calendar_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_calendar_class, +#endif + .mp_obj_type = &mp_lv_calendar_type_base, +}; /* * lvgl extension definition for: - * void lv_chart_set_series_value_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t value) + * void lv_chart_set_type(lv_obj_t *obj, lv_chart_type_t type) */ -static mp_obj_t mp_lv_chart_set_series_value_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t))lv_func_ptr)(obj, ser, id, value); + lv_chart_type_t type = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_type_t))lv_func_ptr)(obj, type); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id_mpobj, 4, mp_lv_chart_set_series_value_by_id, lv_chart_set_series_value_by_id); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_type_mpobj, 2, mp_lv_chart_set_type, lv_chart_set_type); + +/* Reusing lv_obj_delete_delayed for lv_chart_set_point_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_point_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_point_count); /* * lvgl extension definition for: - * void lv_chart_set_series_value_by_id2(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t x_value, int32_t y_value) + * void lv_chart_set_axis_range(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min, int32_t max) */ -static mp_obj_t mp_lv_chart_set_series_value_by_id2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_axis_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); - int32_t x_value = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y_value = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t, int32_t))lv_func_ptr)(obj, ser, id, x_value, y_value); + lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t, int32_t))lv_func_ptr)(obj, axis, min, max); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id2_mpobj, 5, mp_lv_chart_set_series_value_by_id2, lv_chart_set_series_value_by_id2); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_range_mpobj, 4, mp_lv_chart_set_axis_range, lv_chart_set_axis_range); /* * lvgl extension definition for: - * void lv_chart_set_series_ext_y_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) + * void lv_chart_set_axis_min_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min) */ -static mp_obj_t mp_lv_chart_set_series_ext_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_axis_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t *array = mp_arr_to_int32_t_____(mp_args[2]); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_func_ptr)(obj, ser, array); + lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_func_ptr)(obj, axis, min); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_y_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_y_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_min_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_min_value); -/* Reusing lv_chart_set_series_ext_y_array for lv_chart_set_series_ext_x_array */ +/* Reusing lv_chart_set_axis_min_value for lv_chart_set_axis_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_x_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_x_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_axis_max_value_mpobj, 3, mp_lv_chart_set_axis_min_value, lv_chart_set_axis_max_value); /* * lvgl extension definition for: - * int32_t *lv_chart_get_series_y_array(const lv_obj_t *obj, lv_chart_series_t *ser) + * void lv_chart_set_update_mode(lv_obj_t *obj, lv_chart_update_mode_t update_mode) */ -static mp_obj_t mp_lv_chart_get_series_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); - int32_t * _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); - return mp_array_from_i32ptr((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_update_mode_t update_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_update_mode_t))lv_func_ptr)(obj, update_mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_y_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_y_array); - -/* Reusing lv_chart_get_series_y_array for lv_chart_get_series_x_array */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_x_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_x_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_update_mode_mpobj, 2, mp_lv_chart_set_update_mode, lv_chart_set_update_mode); -/* Reusing lv_obj_get_child_count for lv_chart_get_pressed_point */ +/* Reusing lv_obj_fade_in for lv_chart_set_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_pressed_point_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_pressed_point); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_div_line_count_mpobj, 3, mp_lv_obj_fade_in, lv_chart_set_div_line_count); -/* Reusing lv_obj_get_style_clamped_width for lv_chart_get_first_point_center_offset */ +/* Reusing lv_obj_delete_delayed for lv_chart_set_hor_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_first_point_center_offset_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_chart_get_first_point_center_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_hor_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_hor_div_line_count); -/* Reusing lv_obj_create for lv_chart_create */ +/* Reusing lv_obj_delete_delayed for lv_chart_set_ver_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_create_mpobj, 1, mp_lv_obj_create, lv_chart_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_ver_div_line_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_chart_set_ver_div_line_count); /* - * lvgl chart object definitions + * lvgl extension definition for: + * lv_chart_type_t lv_chart_get_type(const lv_obj_t *obj) */ - - -static const mp_rom_map_elem_t chart_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_type), MP_ROM_PTR(&mp_lv_chart_set_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_point_count), MP_ROM_PTR(&mp_lv_chart_set_point_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_axis_range), MP_ROM_PTR(&mp_lv_chart_set_axis_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_axis_min_value), MP_ROM_PTR(&mp_lv_chart_set_axis_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_axis_max_value), MP_ROM_PTR(&mp_lv_chart_set_axis_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_chart_set_update_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_hor_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_ver_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_chart_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_chart_get_point_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_chart_get_update_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_hor_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_ver_div_line_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_x_start_point), MP_ROM_PTR(&mp_lv_chart_get_x_start_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_point_pos_by_id), MP_ROM_PTR(&mp_lv_chart_get_point_pos_by_id_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_chart_refresh_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_series), MP_ROM_PTR(&mp_lv_chart_add_series_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_series), MP_ROM_PTR(&mp_lv_chart_remove_series_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_hide_series), MP_ROM_PTR(&mp_lv_chart_hide_series_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_color), MP_ROM_PTR(&mp_lv_chart_set_series_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_color), MP_ROM_PTR(&mp_lv_chart_get_series_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_x_start_point), MP_ROM_PTR(&mp_lv_chart_set_x_start_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_next), MP_ROM_PTR(&mp_lv_chart_get_series_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_cursor), MP_ROM_PTR(&mp_lv_chart_add_cursor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_cursor), MP_ROM_PTR(&mp_lv_chart_remove_cursor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_x), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_y), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_point), MP_ROM_PTR(&mp_lv_chart_set_cursor_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cursor_point), MP_ROM_PTR(&mp_lv_chart_get_cursor_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_all_values), MP_ROM_PTR(&mp_lv_chart_set_all_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_next_value), MP_ROM_PTR(&mp_lv_chart_set_next_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_next_value2), MP_ROM_PTR(&mp_lv_chart_set_next_value2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_values), MP_ROM_PTR(&mp_lv_chart_set_series_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_values2), MP_ROM_PTR(&mp_lv_chart_set_series_values2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id2), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_ext_y_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_y_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_series_ext_x_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_x_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_y_array), MP_ROM_PTR(&mp_lv_chart_get_series_y_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_series_x_array), MP_ROM_PTR(&mp_lv_chart_get_series_x_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pressed_point), MP_ROM_PTR(&mp_lv_chart_get_pressed_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_first_point_center_offset), MP_ROM_PTR(&mp_lv_chart_get_first_point_center_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_TYPE), MP_ROM_PTR(&mp_lv_LV_CHART_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_CHART_UPDATE_MODE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_AXIS), MP_ROM_PTR(&mp_lv_LV_CHART_AXIS_type_base) } -}; - -static MP_DEFINE_CONST_DICT(chart_locals_dict, chart_locals_dict_table); - -static void chart_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl chart"); -} - -static mp_obj_t chart_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_chart_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_chart_create_mpobj, type, n_args, n_kw, args); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_chart_type_t _res = ((lv_chart_type_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_chart_type_base, - MP_QSTR_chart, - MP_TYPE_FLAG_NONE, - print, chart_print, - make_new, chart_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &chart_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_chart_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_chart_class, -#endif - .mp_obj_type = &mp_lv_chart_type_base, -}; - -/* Reusing lv_arclabel_set_text for lv_checkbox_set_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_type_mpobj, 1, mp_lv_chart_get_type, lv_chart_get_type); -/* Reusing lv_arclabel_set_text for lv_checkbox_set_text_static */ +/* Reusing lv_obj_get_child_count for lv_chart_get_point_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text_static); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_point_count); /* * lvgl extension definition for: - * const char *lv_checkbox_get_text(const lv_obj_t *obj) + * lv_chart_update_mode_t lv_chart_get_update_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_checkbox_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const char * _res = ((const char *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return convert_to_str((void*)_res); + lv_chart_update_mode_t _res = ((lv_chart_update_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_checkbox_get_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_update_mode_mpobj, 1, mp_lv_chart_get_update_mode, lv_chart_get_update_mode); -/* Reusing lv_obj_create for lv_checkbox_create */ +/* Reusing lv_obj_get_child_count for lv_chart_get_hor_div_line_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_create_mpobj, 1, mp_lv_obj_create, lv_checkbox_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_hor_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_hor_div_line_count); + +/* Reusing lv_obj_get_child_count for lv_chart_get_ver_div_line_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_ver_div_line_count_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_ver_div_line_count); /* - * lvgl checkbox object definitions + * Struct lv_chart_series_t */ - -static const mp_rom_map_elem_t checkbox_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_checkbox_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_checkbox_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_checkbox_get_text_mpobj) } -}; +static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void); -static MP_DEFINE_CONST_DICT(checkbox_locals_dict, checkbox_locals_dict_table); +GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_series_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_series_t_type())); + return (lv_chart_series_t*)self->data; +} -static void checkbox_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +#define mp_write_lv_chart_series_t(struct_obj) *((lv_chart_series_t*)mp_write_ptr_lv_chart_series_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_series_t(void *field) { - mp_printf(print, "lvgl checkbox"); + return lv_to_mp_struct(get_mp_lv_chart_series_t_type(), field); } +#define mp_read_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(copy_buffer(&field, sizeof(lv_chart_series_t))) +#define mp_read_byref_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(&field) -static mp_obj_t checkbox_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static void mp_lv_chart_series_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - return make_new(&mp_lv_checkbox_create_mpobj, type, n_args, n_kw, args); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_chart_series_t *data = (lv_chart_series_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_x_points: dest[0] = mp_array_from_i32ptr((void*)data->x_points); break; // converting from int32_t *; + case MP_QSTR_y_points: dest[0] = mp_array_from_i32ptr((void*)data->y_points); break; // converting from int32_t *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_start_point: dest[0] = mp_obj_new_int_from_uint(data->start_point); break; // converting from uint32_t; + case MP_QSTR_hidden: dest[0] = mp_obj_new_int_from_uint(data->hidden); break; // converting from uint32_t; + case MP_QSTR_x_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->x_ext_buf_assigned); break; // converting from uint32_t; + case MP_QSTR_y_ext_buf_assigned: dest[0] = mp_obj_new_int_from_uint(data->y_ext_buf_assigned); break; // converting from uint32_t; + case MP_QSTR_x_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->x_axis_sec); break; // converting from uint32_t; + case MP_QSTR_y_axis_sec: dest[0] = mp_obj_new_int_from_uint(data->y_axis_sec); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_x_points: data->x_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; + case MP_QSTR_y_points: data->y_points = (void*)mp_array_to_i32ptr(dest[1]); break; // converting to int32_t *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_start_point: data->start_point = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_hidden: data->hidden = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_x_ext_buf_assigned: data->x_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_y_ext_buf_assigned: data->y_ext_buf_assigned = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_x_axis_sec: data->x_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_y_axis_sec: data->y_axis_sec = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } } +static void mp_lv_chart_series_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_chart_series_t"); +} + +static const mp_obj_dict_t mp_lv_chart_series_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_checkbox_type_base, - MP_QSTR_checkbox, + mp_lv_chart_series_t_type, + MP_QSTR_lv_chart_series_t, MP_TYPE_FLAG_NONE, - print, checkbox_print, - make_new, checkbox_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &checkbox_locals_dict + print, mp_lv_chart_series_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_chart_series_t_attr, + locals_dict, &mp_lv_chart_series_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_checkbox_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_checkbox_class, -#endif - .mp_obj_type = &mp_lv_checkbox_type_base, -}; +static inline const mp_obj_type_t *get_mp_lv_chart_series_t_type(void) +{ + return &mp_lv_chart_series_t_type; +} -/* Reusing lv_arclabel_set_text for lv_dropdown_set_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text); - -/* Reusing lv_arclabel_set_text for lv_dropdown_set_text_static */ +/* + * lvgl extension definition for: + * uint32_t lv_chart_get_x_start_point(const lv_obj_t *obj, lv_chart_series_t *ser) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text_static); - -/* Reusing lv_arclabel_set_text for lv_dropdown_set_options */ +static mp_obj_t mp_lv_chart_get_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options); - -/* Reusing lv_arclabel_set_text for lv_dropdown_set_options_static */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options_static); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_x_start_point_mpobj, 2, mp_lv_chart_get_x_start_point, lv_chart_get_x_start_point); /* * lvgl extension definition for: - * void lv_dropdown_add_option(lv_obj_t *obj, const char *option, uint32_t pos) + * void lv_chart_get_point_pos_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, lv_point_t *p_out) */ -static mp_obj_t mp_lv_dropdown_add_option(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_point_pos_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *option = (const char *)(char*)convert_from_str(mp_args[1]); - uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const char *, uint32_t))lv_func_ptr)(obj, option, pos); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_point_t *p_out = mp_write_ptr_lv_point_t(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, lv_point_t *))lv_func_ptr)(obj, ser, id, p_out); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_add_option_mpobj, 3, mp_lv_dropdown_add_option, lv_dropdown_add_option); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_point_pos_by_id_mpobj, 4, mp_lv_chart_get_point_pos_by_id, lv_chart_get_point_pos_by_id); -/* Reusing lv_obj_move_foreground for lv_dropdown_clear_options */ +/* Reusing lv_obj_move_foreground for lv_chart_refresh */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_clear_options_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_clear_options); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_chart_refresh); -/* Reusing lv_obj_delete_delayed for lv_dropdown_set_selected */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_mpobj, 2, mp_lv_obj_delete_delayed, lv_dropdown_set_selected); - -/* Reusing lv_obj_set_scroll_dir for lv_dropdown_set_dir */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_dropdown_set_dir); - -/* Reusing lv_image_set_src for lv_dropdown_set_symbol */ +/* + * lvgl extension definition for: + * lv_chart_series_t *lv_chart_add_series(lv_obj_t *obj, lv_color_t color, lv_chart_axis_t axis) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_symbol_mpobj, 2, mp_lv_image_set_src, lv_dropdown_set_symbol); - -/* Reusing lv_obj_set_radio_button for lv_dropdown_set_selected_highlight */ +static mp_obj_t mp_lv_chart_add_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_t color = mp_write_lv_color_t(mp_args[1]); + lv_chart_axis_t axis = (int)mp_obj_get_int(mp_args[2]); + lv_chart_series_t * _res = ((lv_chart_series_t *(*)(lv_obj_t *, lv_color_t, lv_chart_axis_t))lv_func_ptr)(obj, color, axis); + return mp_read_ptr_lv_chart_series_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_highlight_mpobj, 2, mp_lv_obj_set_radio_button, lv_dropdown_set_selected_highlight); - -/* Reusing lv_obj_create for lv_dropdown_get_list */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_list_mpobj, 1, mp_lv_obj_create, lv_dropdown_get_list); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_series_mpobj, 3, mp_lv_chart_add_series, lv_chart_add_series); /* * lvgl extension definition for: - * const char *lv_dropdown_get_text(lv_obj_t *obj) + * void lv_chart_remove_series(lv_obj_t *obj, lv_chart_series_t *series) */ -static mp_obj_t mp_lv_dropdown_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_remove_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char * _res = ((const char *(*)(lv_obj_t *))lv_func_ptr)(obj); - return convert_to_str((void*)_res); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, series); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_text_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_series_mpobj, 2, mp_lv_chart_remove_series, lv_chart_remove_series); -/* Reusing lv_checkbox_get_text for lv_dropdown_get_options */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_dropdown_get_options); - -/* Reusing lv_obj_get_child_count for lv_dropdown_get_selected */ +/* + * lvgl extension definition for: + * void lv_chart_hide_series(lv_obj_t *chart, lv_chart_series_t *series, bool hide) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_selected); - -/* Reusing lv_obj_get_child_count for lv_dropdown_get_option_count */ +static mp_obj_t mp_lv_chart_hide_series(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); + bool hide = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, bool))lv_func_ptr)(chart, series, hide); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_option_count); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_hide_series_mpobj, 3, mp_lv_chart_hide_series, lv_chart_hide_series); /* * lvgl extension definition for: - * void lv_dropdown_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) + * void lv_chart_set_series_color(lv_obj_t *chart, lv_chart_series_t *series, lv_color_t color) */ -static mp_obj_t mp_lv_dropdown_get_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - char *buf = (char*)convert_from_str(mp_args[1]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, char *, uint32_t))lv_func_ptr)(obj, buf, buf_size); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(mp_args[1]); + lv_color_t color = mp_write_lv_color_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, lv_color_t))lv_func_ptr)(chart, series, color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_dropdown_get_selected_str); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_color_mpobj, 3, mp_lv_chart_set_series_color, lv_chart_set_series_color); /* * lvgl extension definition for: - * int32_t lv_dropdown_get_option_index(lv_obj_t *obj, const char *option) + * lv_color_t lv_chart_get_series_color(lv_obj_t *chart, const lv_chart_series_t *series) */ -static mp_obj_t mp_lv_dropdown_get_option_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_series_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *option = (const char *)(char*)convert_from_str(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, option); - return mp_obj_new_int(_res); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + const lv_chart_series_t *series = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); + lv_color_t _res = ((lv_color_t (*)(lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(chart, series); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_index_mpobj, 2, mp_lv_dropdown_get_option_index, lv_dropdown_get_option_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_color_mpobj, 2, mp_lv_chart_get_series_color, lv_chart_get_series_color); -/* Reusing lv_dropdown_get_text for lv_dropdown_get_symbol */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_symbol_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_symbol); - -/* Reusing lv_obj_refr_size for lv_dropdown_get_selected_highlight */ +/* + * lvgl extension definition for: + * void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_highlight_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_get_selected_highlight); - -/* Reusing lv_obj_get_scroll_dir for lv_dropdown_get_dir */ +static mp_obj_t mp_lv_chart_set_x_start_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(obj, ser, id); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_dropdown_get_dir); - -/* Reusing lv_obj_move_foreground for lv_dropdown_open */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_open_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_open); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_x_start_point_mpobj, 3, mp_lv_chart_set_x_start_point, lv_chart_set_x_start_point); -/* Reusing lv_obj_move_foreground for lv_dropdown_close */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_close_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_close); - -/* Reusing lv_obj_refr_size for lv_dropdown_is_open */ +/* + * lvgl extension definition for: + * lv_chart_series_t *lv_chart_get_series_next(const lv_obj_t *obj, const lv_chart_series_t *ser) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_is_open_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_is_open); - -/* Reusing lv_obj_bind_checked for lv_dropdown_bind_value */ +static mp_obj_t mp_lv_chart_get_series_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_chart_series_t *ser = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(mp_args[1]); + lv_chart_series_t * _res = ((lv_chart_series_t *(*)(const lv_obj_t *, const lv_chart_series_t *))lv_func_ptr)(obj, ser); + return mp_read_ptr_lv_chart_series_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_dropdown_bind_value); - -/* Reusing lv_obj_create for lv_dropdown_create */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_create_mpobj, 1, mp_lv_obj_create, lv_dropdown_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_next_mpobj, 2, mp_lv_chart_get_series_next, lv_chart_get_series_next); /* - * lvgl dropdown object definitions + * Struct lv_chart_cursor_t */ - -static const mp_rom_map_elem_t dropdown_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_dropdown_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_dropdown_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_dropdown_set_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_options_static), MP_ROM_PTR(&mp_lv_dropdown_set_options_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_option), MP_ROM_PTR(&mp_lv_dropdown_add_option_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_options), MP_ROM_PTR(&mp_lv_dropdown_clear_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_dropdown_set_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_dropdown_set_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_symbol), MP_ROM_PTR(&mp_lv_dropdown_set_symbol_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_set_selected_highlight_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_list), MP_ROM_PTR(&mp_lv_dropdown_get_list_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_dropdown_get_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_dropdown_get_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_dropdown_get_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_dropdown_get_option_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_dropdown_get_selected_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_index), MP_ROM_PTR(&mp_lv_dropdown_get_option_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_symbol), MP_ROM_PTR(&mp_lv_dropdown_get_symbol_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_get_selected_highlight_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_dropdown_get_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_dropdown_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_dropdown_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_open), MP_ROM_PTR(&mp_lv_dropdown_is_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_dropdown_bind_value_mpobj) } -}; +static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void); -static MP_DEFINE_CONST_DICT(dropdown_locals_dict, dropdown_locals_dict_table); +GENMPY_UNUSED static inline void* mp_write_ptr_lv_chart_cursor_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_chart_cursor_t_type())); + return (lv_chart_cursor_t*)self->data; +} -static void dropdown_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +#define mp_write_lv_chart_cursor_t(struct_obj) *((lv_chart_cursor_t*)mp_write_ptr_lv_chart_cursor_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_chart_cursor_t(void *field) { - mp_printf(print, "lvgl dropdown"); + return lv_to_mp_struct(get_mp_lv_chart_cursor_t_type(), field); } +#define mp_read_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(copy_buffer(&field, sizeof(lv_chart_cursor_t))) +#define mp_read_byref_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(&field) -static mp_obj_t dropdown_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static void mp_lv_chart_cursor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - return make_new(&mp_lv_dropdown_create_mpobj, type, n_args, n_kw, args); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_chart_cursor_t *data = (lv_chart_cursor_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_pos: dest[0] = mp_read_byref_lv_point_t(data->pos); break; // converting from lv_point_t; + case MP_QSTR_point_id: dest[0] = mp_obj_new_int(data->point_id); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_ser: dest[0] = mp_read_ptr_lv_chart_series_t((void*)data->ser); break; // converting from lv_chart_series_t *; + case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_dir_t; + case MP_QSTR_pos_set: dest[0] = mp_obj_new_int_from_uint(data->pos_set); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_pos: data->pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_point_id: data->point_id = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_ser: data->ser = (void*)mp_write_ptr_lv_chart_series_t(dest[1]); break; // converting to lv_chart_series_t *; + case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; + case MP_QSTR_pos_set: data->pos_set = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_chart_cursor_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_chart_cursor_t"); } +static const mp_obj_dict_t mp_lv_chart_cursor_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_dropdown_type_base, - MP_QSTR_dropdown, + mp_lv_chart_cursor_t_type, + MP_QSTR_lv_chart_cursor_t, MP_TYPE_FLAG_NONE, - print, dropdown_print, - make_new, dropdown_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &dropdown_locals_dict + print, mp_lv_chart_cursor_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_chart_cursor_t_attr, + locals_dict, &mp_lv_chart_cursor_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_dropdown_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_dropdown_class, -#endif - .mp_obj_type = &mp_lv_dropdown_type_base, -}; +static inline const mp_obj_type_t *get_mp_lv_chart_cursor_t_type(void) +{ + return &mp_lv_chart_cursor_t_type; +} /* * lvgl extension definition for: - * void lv_gif_set_color_format(lv_obj_t *obj, lv_color_format_t color_format) + * lv_chart_cursor_t *lv_chart_add_cursor(lv_obj_t *obj, lv_color_t color, lv_dir_t dir) */ -static mp_obj_t mp_lv_gif_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_add_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, color_format); - return mp_const_none; + lv_color_t color = mp_write_lv_color_t(mp_args[1]); + lv_dir_t dir = (int)mp_obj_get_int(mp_args[2]); + lv_chart_cursor_t * _res = ((lv_chart_cursor_t *(*)(lv_obj_t *, lv_color_t, lv_dir_t))lv_func_ptr)(obj, color, dir); + return mp_read_ptr_lv_chart_cursor_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_color_format_mpobj, 2, mp_lv_gif_set_color_format, lv_gif_set_color_format); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_add_cursor_mpobj, 3, mp_lv_chart_add_cursor, lv_chart_add_cursor); -/* Reusing lv_image_set_src for lv_gif_set_src */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_src_mpobj, 2, mp_lv_image_set_src, lv_gif_set_src); - -/* Reusing lv_obj_move_foreground for lv_gif_restart */ +/* + * lvgl extension definition for: + * void lv_chart_remove_cursor(lv_obj_t *obj, lv_chart_cursor_t *cursor) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_restart_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_restart); - -/* Reusing lv_obj_move_foreground for lv_gif_pause */ +static mp_obj_t mp_lv_chart_remove_cursor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(obj, cursor); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_pause_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_pause); - -/* Reusing lv_obj_move_foreground for lv_gif_resume */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_resume_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_remove_cursor_mpobj, 2, mp_lv_chart_remove_cursor, lv_chart_remove_cursor); -/* Reusing lv_obj_refr_size for lv_gif_is_loaded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_is_loaded_mpobj, 1, mp_lv_obj_refr_size, lv_gif_is_loaded); - -/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_loop_count */ +/* + * lvgl extension definition for: + * void lv_chart_set_cursor_pos(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_point_t *pos) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_loop_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_loop_count); - -/* Reusing lv_obj_move_to_index for lv_gif_set_loop_count */ +static mp_obj_t mp_lv_chart_set_cursor_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + lv_point_t *pos = mp_write_ptr_lv_point_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_point_t *))lv_func_ptr)(chart, cursor, pos); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_loop_count_mpobj, 2, mp_lv_obj_move_to_index, lv_gif_set_loop_count); - -/* Reusing lv_obj_set_radio_button for lv_gif_set_auto_pause_invisible */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_auto_pause_invisible_mpobj, 2, mp_lv_obj_set_radio_button, lv_gif_set_auto_pause_invisible); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_mpobj, 3, mp_lv_chart_set_cursor_pos, lv_chart_set_cursor_pos); /* * lvgl extension definition for: - * bool lv_gif_get_size(const char *src, uint16_t *w, uint16_t *h) + * void lv_chart_set_cursor_pos_x(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t x) */ -static mp_obj_t mp_lv_gif_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_cursor_pos_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *src = (const char *)(char*)convert_from_str(mp_args[0]); - uint16_t *w = mp_array_to_u16ptr(mp_args[1]); - uint16_t *h = mp_array_to_u16ptr(mp_args[2]); - bool _res = ((bool (*)(const char *, uint16_t *, uint16_t *))lv_func_ptr)(src, w, h); - return convert_to_bool(_res); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_func_ptr)(chart, cursor, x); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_gif_get_size_mpobj, 3, mp_lv_gif_get_size, lv_gif_get_size); - -/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_frame_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_frame_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_frame_count); - -/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_current_frame_index */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_current_frame_index_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_current_frame_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_x_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_x); -/* Reusing lv_obj_create for lv_gif_create */ +/* Reusing lv_chart_set_cursor_pos_x for lv_chart_set_cursor_pos_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_create_mpobj, 1, mp_lv_obj_create, lv_gif_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_pos_y_mpobj, 3, mp_lv_chart_set_cursor_pos_x, lv_chart_set_cursor_pos_y); /* - * lvgl gif object definitions + * lvgl extension definition for: + * void lv_chart_set_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_chart_series_t *ser, uint32_t point_id) */ - - -static const mp_rom_map_elem_t gif_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_gif_set_color_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_gif_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_restart), MP_ROM_PTR(&mp_lv_gif_restart_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_gif_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_gif_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_loaded), MP_ROM_PTR(&mp_lv_gif_is_loaded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_loop_count), MP_ROM_PTR(&mp_lv_gif_get_loop_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_loop_count), MP_ROM_PTR(&mp_lv_gif_set_loop_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_auto_pause_invisible), MP_ROM_PTR(&mp_lv_gif_set_auto_pause_invisible_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_gif_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_frame_count), MP_ROM_PTR(&mp_lv_gif_get_frame_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_frame_index), MP_ROM_PTR(&mp_lv_gif_get_current_frame_index_mpobj) } -}; -static MP_DEFINE_CONST_DICT(gif_locals_dict, gif_locals_dict_table); - -static void gif_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_chart_set_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "lvgl gif"); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[2]); + uint32_t point_id = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_chart_series_t *, uint32_t))lv_func_ptr)(chart, cursor, ser, point_id); + return mp_const_none; } + -static mp_obj_t gif_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_cursor_point_mpobj, 4, mp_lv_chart_set_cursor_point, lv_chart_set_cursor_point); + + +/* + * lvgl extension definition for: + * lv_point_t lv_chart_get_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor) + */ + +static mp_obj_t mp_lv_chart_get_cursor_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_gif_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *chart = mp_to_lv(mp_args[0]); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(mp_args[1]); + lv_point_t _res = ((lv_point_t (*)(lv_obj_t *, lv_chart_cursor_t *))lv_func_ptr)(chart, cursor); + return mp_read_lv_point_t(_res); } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_gif_type_base, - MP_QSTR_gif, - MP_TYPE_FLAG_NONE, - print, gif_print, - make_new, gif_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &gif_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_gif_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_gif_class, -#endif - .mp_obj_type = &mp_lv_gif_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_cursor_point_mpobj, 2, mp_lv_chart_get_cursor_point, lv_chart_get_cursor_point); /* * lvgl extension definition for: - * void lv_imagebutton_set_src(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left, const void *src_mid, const void *src_right) + * void lv_chart_set_all_values(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) */ -static mp_obj_t mp_lv_imagebutton_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_all_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - const void *src_left = (const void *)mp_to_ptr(mp_args[2]); - const void *src_mid = (const void *)mp_to_ptr(mp_args[3]); - const void *src_right = (const void *)mp_to_ptr(mp_args[4]); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *, const void *, const void *))lv_func_ptr)(obj, state, src_left, src_mid, src_right); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_func_ptr)(obj, ser, value); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mpobj, 5, mp_lv_imagebutton_set_src, lv_imagebutton_set_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_all_values_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_all_values); + +/* Reusing lv_chart_set_all_values for lv_chart_set_next_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value_mpobj, 3, mp_lv_chart_set_all_values, lv_chart_set_next_value); /* * lvgl extension definition for: - * void lv_imagebutton_set_src_left(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left) + * void lv_chart_set_next_value2(lv_obj_t *obj, lv_chart_series_t *ser, int32_t x_value, int32_t y_value) */ -static mp_obj_t mp_lv_imagebutton_set_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_next_value2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - const void *src_left = (const void *)mp_to_ptr(mp_args[2]); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_func_ptr)(obj, state, src_left); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t x_value = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t y_value = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t, int32_t))lv_func_ptr)(obj, ser, x_value, y_value); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_left_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_left); - -/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_right_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_right); - -/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_mid */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mid_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_mid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_next_value2_mpobj, 4, mp_lv_chart_set_next_value2, lv_chart_set_next_value2); /* * lvgl extension definition for: - * void lv_imagebutton_set_state(lv_obj_t *obj, lv_imagebutton_state_t state) + * void lv_chart_set_series_values(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t values[], size_t values_cnt) */ -static mp_obj_t mp_lv_imagebutton_set_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_series_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + const int32_t *values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); + size_t values_cnt = (size_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], size_t))lv_func_ptr)(obj, ser, values, values_cnt); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_state_mpobj, 2, mp_lv_imagebutton_set_state, lv_imagebutton_set_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values_mpobj, 4, mp_lv_chart_set_series_values, lv_chart_set_series_values); /* * lvgl extension definition for: - * const void *lv_imagebutton_get_src_left(lv_obj_t *obj, lv_imagebutton_state_t state) + * void lv_chart_set_series_values2(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t x_values[], const int32_t y_values[], size_t values_cnt) */ -static mp_obj_t mp_lv_imagebutton_get_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_series_values2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); - const void * _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); - return ptr_to_mp((void*)_res); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + const int32_t *x_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); + const int32_t *y_values = (const int32_t *)mp_arr_to_int32_t_____(mp_args[3]); + size_t values_cnt = (size_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], const int32_t [], size_t))lv_func_ptr)(obj, ser, x_values, y_values, values_cnt); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_left_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_values2_mpobj, 5, mp_lv_chart_set_series_values2, lv_chart_set_series_values2); -/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_middle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_middle_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_middle); - -/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_right */ +/* + * lvgl extension definition for: + * void lv_chart_set_series_value_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t value) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_right_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_right); - -/* Reusing lv_obj_create for lv_imagebutton_create */ +static mp_obj_t mp_lv_chart_set_series_value_by_id(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t))lv_func_ptr)(obj, ser, id, value); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_create_mpobj, 1, mp_lv_obj_create, lv_imagebutton_create); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id_mpobj, 4, mp_lv_chart_set_series_value_by_id, lv_chart_set_series_value_by_id); /* - * lvgl imagebutton object definitions + * lvgl extension definition for: + * void lv_chart_set_series_value_by_id2(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t x_value, int32_t y_value) */ - -static const mp_rom_map_elem_t imagebutton_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_left), MP_ROM_PTR(&mp_lv_imagebutton_set_src_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_right), MP_ROM_PTR(&mp_lv_imagebutton_set_src_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_src_mid), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mid_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_state), MP_ROM_PTR(&mp_lv_imagebutton_set_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_left), MP_ROM_PTR(&mp_lv_imagebutton_get_src_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_middle), MP_ROM_PTR(&mp_lv_imagebutton_get_src_middle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_src_right), MP_ROM_PTR(&mp_lv_imagebutton_get_src_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_STATE), MP_ROM_PTR(&mp_lv_LV_IMAGEBUTTON_STATE_type_base) } -}; - -static MP_DEFINE_CONST_DICT(imagebutton_locals_dict, imagebutton_locals_dict_table); - -static void imagebutton_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl imagebutton"); -} - - -static mp_obj_t imagebutton_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_imagebutton_create_mpobj, type, n_args, n_kw, args); -} - - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_imagebutton_type_base, - MP_QSTR_imagebutton, - MP_TYPE_FLAG_NONE, - print, imagebutton_print, - make_new, imagebutton_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &imagebutton_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_imagebutton_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_imagebutton_class, -#endif - .mp_obj_type = &mp_lv_imagebutton_type_base, -}; - -/* Reusing lv_obj_set_parent for lv_keyboard_set_textarea */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_textarea_mpobj, 2, mp_lv_obj_set_parent, lv_keyboard_set_textarea); - - -/* - * lvgl extension definition for: - * void lv_keyboard_set_mode(lv_obj_t *kb, lv_keyboard_mode_t mode) - */ - -static mp_obj_t mp_lv_keyboard_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_series_value_by_id2(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *kb = mp_to_lv(mp_args[0]); - lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_keyboard_mode_t))lv_func_ptr)(kb, mode); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + uint32_t id = (uint32_t)mp_obj_get_int(mp_args[2]); + int32_t x_value = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y_value = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t, int32_t))lv_func_ptr)(obj, ser, id, x_value, y_value); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_mode_mpobj, 2, mp_lv_keyboard_set_mode, lv_keyboard_set_mode); - -/* Reusing lv_obj_set_radio_button for lv_keyboard_set_popovers */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_popovers_mpobj, 2, mp_lv_obj_set_radio_button, lv_keyboard_set_popovers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_value_by_id2_mpobj, 5, mp_lv_chart_set_series_value_by_id2, lv_chart_set_series_value_by_id2); /* * lvgl extension definition for: - * void lv_keyboard_set_map(lv_obj_t *kb, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[]) + * void lv_chart_set_series_ext_y_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) */ -static mp_obj_t mp_lv_keyboard_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_set_series_ext_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *kb = mp_to_lv(mp_args[0]); - lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[2]); - const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[3]); - ((void (*)(lv_obj_t *, lv_keyboard_mode_t, const char * const [], const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(kb, mode, map, ctrl_map); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t *array = mp_arr_to_int32_t_____(mp_args[2]); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_func_ptr)(obj, ser, array); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_map_mpobj, 4, mp_lv_keyboard_set_map, lv_keyboard_set_map); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_y_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_y_array); -/* Reusing lv_obj_get_screen for lv_keyboard_get_textarea */ +/* Reusing lv_chart_set_series_ext_y_array for lv_chart_set_series_ext_x_array */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_textarea_mpobj, 1, mp_lv_obj_get_screen, lv_keyboard_get_textarea); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_set_series_ext_x_array_mpobj, 3, mp_lv_chart_set_series_ext_y_array, lv_chart_set_series_ext_x_array); /* * lvgl extension definition for: - * lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *kb) + * int32_t *lv_chart_get_series_y_array(const lv_obj_t *obj, lv_chart_series_t *ser) */ -static mp_obj_t mp_lv_keyboard_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_chart_get_series_y_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *kb = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_keyboard_mode_t _res = ((lv_keyboard_mode_t (*)(const lv_obj_t *))lv_func_ptr)(kb); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(mp_args[1]); + int32_t * _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_func_ptr)(obj, ser); + return mp_array_from_i32ptr((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_mode_mpobj, 1, mp_lv_keyboard_get_mode, lv_keyboard_get_mode); - -/* Reusing lv_obj_is_layout_positioned for lv_keyboard_get_popovers */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_popovers_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_keyboard_get_popovers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_y_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_y_array); -/* Reusing lv_obj_get_child_count for lv_keyboard_get_selected_button */ +/* Reusing lv_chart_get_series_y_array for lv_chart_get_series_x_array */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_keyboard_get_selected_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_series_x_array_mpobj, 2, mp_lv_chart_get_series_y_array, lv_chart_get_series_x_array); -/* Reusing lv_buttonmatrix_get_button_text for lv_keyboard_get_button_text */ +/* Reusing lv_obj_get_child_count for lv_chart_get_pressed_point */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_keyboard_get_button_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_pressed_point_mpobj, 1, mp_lv_obj_get_child_count, lv_chart_get_pressed_point); -/* Reusing funcptr_event_cb for lv_keyboard_def_event_cb */ +/* Reusing lv_obj_get_style_clamped_width for lv_chart_get_first_point_center_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_keyboard_def_event_cb_mpobj, 1, mp_funcptr_event_cb, lv_keyboard_def_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_get_first_point_center_offset_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_chart_get_first_point_center_offset); -/* Reusing lv_obj_create for lv_keyboard_create */ +/* Reusing lv_obj_create for lv_chart_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_create_mpobj, 1, mp_lv_obj_create, lv_keyboard_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_chart_create_mpobj, 1, mp_lv_obj_create, lv_chart_create); /* - * lvgl keyboard object definitions + * lvgl chart object definitions */ -static const mp_rom_map_elem_t keyboard_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_textarea), MP_ROM_PTR(&mp_lv_keyboard_set_textarea_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_keyboard_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_popovers), MP_ROM_PTR(&mp_lv_keyboard_set_popovers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_keyboard_set_map_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_textarea), MP_ROM_PTR(&mp_lv_keyboard_get_textarea_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_keyboard_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_popovers), MP_ROM_PTR(&mp_lv_keyboard_get_popovers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_keyboard_get_selected_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_keyboard_get_button_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_def_event_cb), MP_ROM_PTR(&mp_lv_keyboard_def_event_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_KEYBOARD_MODE_type_base) } +static const mp_rom_map_elem_t chart_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_type), MP_ROM_PTR(&mp_lv_chart_set_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_point_count), MP_ROM_PTR(&mp_lv_chart_set_point_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_axis_range), MP_ROM_PTR(&mp_lv_chart_set_axis_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_axis_min_value), MP_ROM_PTR(&mp_lv_chart_set_axis_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_axis_max_value), MP_ROM_PTR(&mp_lv_chart_set_axis_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_chart_set_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_hor_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_set_ver_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_chart_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_chart_get_point_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_chart_get_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_hor_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_hor_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ver_div_line_count), MP_ROM_PTR(&mp_lv_chart_get_ver_div_line_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_x_start_point), MP_ROM_PTR(&mp_lv_chart_get_x_start_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_point_pos_by_id), MP_ROM_PTR(&mp_lv_chart_get_point_pos_by_id_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_chart_refresh_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_series), MP_ROM_PTR(&mp_lv_chart_add_series_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_series), MP_ROM_PTR(&mp_lv_chart_remove_series_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_hide_series), MP_ROM_PTR(&mp_lv_chart_hide_series_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_color), MP_ROM_PTR(&mp_lv_chart_set_series_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_color), MP_ROM_PTR(&mp_lv_chart_get_series_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_x_start_point), MP_ROM_PTR(&mp_lv_chart_set_x_start_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_next), MP_ROM_PTR(&mp_lv_chart_get_series_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_cursor), MP_ROM_PTR(&mp_lv_chart_add_cursor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_cursor), MP_ROM_PTR(&mp_lv_chart_remove_cursor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_x), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos_y), MP_ROM_PTR(&mp_lv_chart_set_cursor_pos_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_point), MP_ROM_PTR(&mp_lv_chart_set_cursor_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cursor_point), MP_ROM_PTR(&mp_lv_chart_get_cursor_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_all_values), MP_ROM_PTR(&mp_lv_chart_set_all_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_next_value), MP_ROM_PTR(&mp_lv_chart_set_next_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_next_value2), MP_ROM_PTR(&mp_lv_chart_set_next_value2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_values), MP_ROM_PTR(&mp_lv_chart_set_series_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_values2), MP_ROM_PTR(&mp_lv_chart_set_series_values2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_value_by_id2), MP_ROM_PTR(&mp_lv_chart_set_series_value_by_id2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_ext_y_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_y_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_series_ext_x_array), MP_ROM_PTR(&mp_lv_chart_set_series_ext_x_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_y_array), MP_ROM_PTR(&mp_lv_chart_get_series_y_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_series_x_array), MP_ROM_PTR(&mp_lv_chart_get_series_x_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pressed_point), MP_ROM_PTR(&mp_lv_chart_get_pressed_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_first_point_center_offset), MP_ROM_PTR(&mp_lv_chart_get_first_point_center_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_TYPE), MP_ROM_PTR(&mp_lv_LV_CHART_TYPE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_CHART_UPDATE_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_AXIS), MP_ROM_PTR(&mp_lv_LV_CHART_AXIS_type_base) } }; -static MP_DEFINE_CONST_DICT(keyboard_locals_dict, keyboard_locals_dict_table); +static MP_DEFINE_CONST_DICT(chart_locals_dict, chart_locals_dict_table); -static void keyboard_print(const mp_print_t *print, +static void chart_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl keyboard"); + mp_printf(print, "lvgl chart"); } -static mp_obj_t keyboard_make_new( +static mp_obj_t chart_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_keyboard_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_chart_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_keyboard_type_base, - MP_QSTR_keyboard, + mp_lv_chart_type_base, + MP_QSTR_chart, MP_TYPE_FLAG_NONE, - print, keyboard_print, - make_new, keyboard_make_new, + print, chart_print, + make_new, chart_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &keyboard_locals_dict + locals_dict, &chart_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_keyboard_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_chart_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_keyboard_class, + .lv_obj_class = &lv_chart_class, #endif - .mp_obj_type = &mp_lv_keyboard_type_base, + .mp_obj_type = &mp_lv_chart_type_base, }; +/* Reusing lv_arclabel_set_text for lv_checkbox_set_text */ -/* - * lvgl extension definition for: - * void lv_led_set_color(lv_obj_t *led, lv_color_t color) - */ - -static mp_obj_t mp_lv_led_set_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *led = mp_to_lv(mp_args[0]); - lv_color_t color = mp_write_lv_color_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_color_t))lv_func_ptr)(led, color); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_color_mpobj, 2, mp_lv_led_set_color, lv_led_set_color); - -/* Reusing lv_obj_set_flex_grow for lv_led_set_brightness */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_brightness_mpobj, 2, mp_lv_obj_set_flex_grow, lv_led_set_brightness); - -/* Reusing lv_obj_move_foreground for lv_led_on */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_on_mpobj, 1, mp_lv_obj_move_foreground, lv_led_on); - -/* Reusing lv_obj_move_foreground for lv_led_off */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_off_mpobj, 1, mp_lv_obj_move_foreground, lv_led_off); - -/* Reusing lv_obj_move_foreground for lv_led_toggle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_toggle_mpobj, 1, mp_lv_obj_move_foreground, lv_led_toggle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text); +/* Reusing lv_arclabel_set_text for lv_checkbox_set_text_static */ -/* - * lvgl extension definition for: - * uint8_t lv_led_get_brightness(const lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_led_get_brightness(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint8_t _res = ((uint8_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_brightness_mpobj, 1, mp_lv_led_get_brightness, lv_led_get_brightness); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_checkbox_set_text_static); /* * lvgl extension definition for: - * lv_color_t lv_led_get_color(const lv_obj_t *obj) + * const char *lv_checkbox_get_text(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_led_get_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_checkbox_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_lv_color_t(_res); + const char * _res = ((const char *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_color_mpobj, 1, mp_lv_led_get_color, lv_led_get_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_checkbox_get_text); -/* Reusing lv_obj_create for lv_led_create */ +/* Reusing lv_obj_create for lv_checkbox_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_create_mpobj, 1, mp_lv_obj_create, lv_led_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_checkbox_create_mpobj, 1, mp_lv_obj_create, lv_checkbox_create); /* - * lvgl led object definitions + * lvgl checkbox object definitions */ -static const mp_rom_map_elem_t led_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_color), MP_ROM_PTR(&mp_lv_led_set_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_brightness), MP_ROM_PTR(&mp_lv_led_set_brightness_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_on), MP_ROM_PTR(&mp_lv_led_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_off), MP_ROM_PTR(&mp_lv_led_off_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_toggle), MP_ROM_PTR(&mp_lv_led_toggle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_brightness), MP_ROM_PTR(&mp_lv_led_get_brightness_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_color), MP_ROM_PTR(&mp_lv_led_get_color_mpobj) } +static const mp_rom_map_elem_t checkbox_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_checkbox_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_checkbox_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_checkbox_get_text_mpobj) } }; -static MP_DEFINE_CONST_DICT(led_locals_dict, led_locals_dict_table); +static MP_DEFINE_CONST_DICT(checkbox_locals_dict, checkbox_locals_dict_table); -static void led_print(const mp_print_t *print, +static void checkbox_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl led"); + mp_printf(print, "lvgl checkbox"); } -static mp_obj_t led_make_new( +static mp_obj_t checkbox_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_led_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_checkbox_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_led_type_base, - MP_QSTR_led, + mp_lv_checkbox_type_base, + MP_QSTR_checkbox, MP_TYPE_FLAG_NONE, - print, led_print, - make_new, led_make_new, + print, checkbox_print, + make_new, checkbox_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &led_locals_dict + locals_dict, &checkbox_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_led_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_checkbox_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_led_class, + .lv_obj_class = &lv_checkbox_class, #endif - .mp_obj_type = &mp_lv_led_type_base, + .mp_obj_type = &mp_lv_checkbox_type_base, }; +/* Reusing lv_arclabel_set_text for lv_dropdown_set_text */ -/* - * Array convertors for lv_point_precise_t [] - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text); + +/* Reusing lv_arclabel_set_text for lv_dropdown_set_text_static */ -GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_text_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_text_static); - lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_precise_t(item); - } - return (lv_point_precise_t *)lv_arr; -} +/* Reusing lv_arclabel_set_text for lv_dropdown_set_options */ -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t_____(const lv_point_precise_t *arr) -{ - return mp_read_ptr_lv_point_precise_t((void*)arr); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options); + +/* Reusing lv_arclabel_set_text for lv_dropdown_set_options_static */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_options_static_mpobj, 2, mp_lv_arclabel_set_text, lv_dropdown_set_options_static); + /* * lvgl extension definition for: - * void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num) + * void lv_dropdown_add_option(lv_obj_t *obj, const char *option, uint32_t pos) */ -static mp_obj_t mp_lv_line_set_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_dropdown_add_option(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_precise_t *points = (const lv_point_precise_t *)mp_arr_to_lv_point_precise_t_____(mp_args[1]); - uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); + const char *option = (const char *)(char*)convert_from_str(mp_args[1]); + uint32_t pos = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const char *, uint32_t))lv_func_ptr)(obj, option, pos); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mpobj, 3, mp_lv_line_set_points, lv_line_set_points); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_add_option_mpobj, 3, mp_lv_dropdown_add_option, lv_dropdown_add_option); + +/* Reusing lv_obj_move_foreground for lv_dropdown_clear_options */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_clear_options_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_clear_options); + +/* Reusing lv_obj_delete_delayed for lv_dropdown_set_selected */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_mpobj, 2, mp_lv_obj_delete_delayed, lv_dropdown_set_selected); + +/* Reusing lv_obj_set_scroll_dir for lv_dropdown_set_dir */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_dropdown_set_dir); + +/* Reusing lv_image_set_src for lv_dropdown_set_symbol */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_symbol_mpobj, 2, mp_lv_image_set_src, lv_dropdown_set_symbol); + +/* Reusing lv_obj_set_hidden for lv_dropdown_set_selected_highlight */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_set_selected_highlight_mpobj, 2, mp_lv_obj_set_hidden, lv_dropdown_set_selected_highlight); + +/* Reusing lv_obj_create for lv_dropdown_get_list */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_list_mpobj, 1, mp_lv_obj_create, lv_dropdown_get_list); /* * lvgl extension definition for: - * void lv_line_set_points_mutable(lv_obj_t *obj, lv_point_precise_t points[], uint32_t point_num) + * const char *lv_dropdown_get_text(lv_obj_t *obj) */ -static mp_obj_t mp_lv_line_set_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_dropdown_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_precise_t *points = mp_arr_to_lv_point_precise_t_____(mp_args[1]); - uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); - return mp_const_none; + const char * _res = ((const char *(*)(lv_obj_t *))lv_func_ptr)(obj); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mutable_mpobj, 3, mp_lv_line_set_points_mutable, lv_line_set_points_mutable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_text_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_text); + +/* Reusing lv_checkbox_get_text for lv_dropdown_get_options */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_dropdown_get_options); + +/* Reusing lv_obj_get_child_count for lv_dropdown_get_selected */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_selected); -/* Reusing lv_obj_set_radio_button for lv_line_set_y_invert */ +/* Reusing lv_obj_get_child_count for lv_dropdown_get_option_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_y_invert_mpobj, 2, mp_lv_obj_set_radio_button, lv_line_set_y_invert); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_dropdown_get_option_count); /* * lvgl extension definition for: - * const lv_point_precise_t *lv_line_get_points(lv_obj_t *obj) + * void lv_dropdown_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) */ -static mp_obj_t mp_lv_line_get_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_dropdown_get_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_precise_t * _res = ((const lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_point_precise_t((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + char *buf = (char*)convert_from_str(mp_args[1]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, char *, uint32_t))lv_func_ptr)(obj, buf, buf_size); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mpobj, 1, mp_lv_line_get_points, lv_line_get_points); - -/* Reusing lv_obj_get_event_count for lv_line_get_point_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_point_count_mpobj, 1, mp_lv_obj_get_event_count, lv_line_get_point_count); - -/* Reusing lv_obj_refr_size for lv_line_is_point_array_mutable */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_is_point_array_mutable_mpobj, 1, mp_lv_obj_refr_size, lv_line_is_point_array_mutable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_dropdown_get_selected_str); /* * lvgl extension definition for: - * lv_point_precise_t *lv_line_get_points_mutable(lv_obj_t *obj) + * int32_t lv_dropdown_get_option_index(lv_obj_t *obj, const char *option) */ -static mp_obj_t mp_lv_line_get_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_dropdown_get_option_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_precise_t * _res = ((lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_point_precise_t((void*)_res); + const char *option = (const char *)(char*)convert_from_str(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, option); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mutable_mpobj, 1, mp_lv_line_get_points_mutable, lv_line_get_points_mutable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_option_index_mpobj, 2, mp_lv_dropdown_get_option_index, lv_dropdown_get_option_index); -/* Reusing lv_obj_is_layout_positioned for lv_line_get_y_invert */ +/* Reusing lv_dropdown_get_text for lv_dropdown_get_symbol */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_y_invert_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_line_get_y_invert); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_symbol_mpobj, 1, mp_lv_dropdown_get_text, lv_dropdown_get_symbol); -/* Reusing lv_obj_create for lv_line_create */ +/* Reusing lv_obj_refr_size for lv_dropdown_get_selected_highlight */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_create_mpobj, 1, mp_lv_obj_create, lv_line_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_selected_highlight_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_get_selected_highlight); + +/* Reusing lv_obj_get_scroll_dir for lv_dropdown_get_dir */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_get_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_dropdown_get_dir); + +/* Reusing lv_obj_move_foreground for lv_dropdown_open */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_open_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_open); + +/* Reusing lv_obj_move_foreground for lv_dropdown_close */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_close_mpobj, 1, mp_lv_obj_move_foreground, lv_dropdown_close); + +/* Reusing lv_obj_refr_size for lv_dropdown_is_open */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_is_open_mpobj, 1, mp_lv_obj_refr_size, lv_dropdown_is_open); + +/* Reusing lv_obj_bind_checked for lv_dropdown_bind_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_dropdown_bind_value); + +/* Reusing lv_obj_create for lv_dropdown_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_dropdown_create_mpobj, 1, mp_lv_obj_create, lv_dropdown_create); /* - * lvgl line object definitions + * lvgl dropdown object definitions */ -static const mp_rom_map_elem_t line_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_points), MP_ROM_PTR(&mp_lv_line_set_points_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_points_mutable), MP_ROM_PTR(&mp_lv_line_set_points_mutable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_y_invert), MP_ROM_PTR(&mp_lv_line_set_y_invert_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_points), MP_ROM_PTR(&mp_lv_line_get_points_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_line_get_point_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_point_array_mutable), MP_ROM_PTR(&mp_lv_line_is_point_array_mutable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_points_mutable), MP_ROM_PTR(&mp_lv_line_get_points_mutable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_y_invert), MP_ROM_PTR(&mp_lv_line_get_y_invert_mpobj) } +static const mp_rom_map_elem_t dropdown_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_dropdown_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_dropdown_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_dropdown_set_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_options_static), MP_ROM_PTR(&mp_lv_dropdown_set_options_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_option), MP_ROM_PTR(&mp_lv_dropdown_add_option_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_options), MP_ROM_PTR(&mp_lv_dropdown_clear_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_dropdown_set_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dir), MP_ROM_PTR(&mp_lv_dropdown_set_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_symbol), MP_ROM_PTR(&mp_lv_dropdown_set_symbol_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_set_selected_highlight_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_list), MP_ROM_PTR(&mp_lv_dropdown_get_list_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_dropdown_get_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_dropdown_get_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_dropdown_get_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_dropdown_get_option_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_dropdown_get_selected_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_index), MP_ROM_PTR(&mp_lv_dropdown_get_option_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_symbol), MP_ROM_PTR(&mp_lv_dropdown_get_symbol_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_highlight), MP_ROM_PTR(&mp_lv_dropdown_get_selected_highlight_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dir), MP_ROM_PTR(&mp_lv_dropdown_get_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_dropdown_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_dropdown_close_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_open), MP_ROM_PTR(&mp_lv_dropdown_is_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_dropdown_bind_value_mpobj) } }; -static MP_DEFINE_CONST_DICT(line_locals_dict, line_locals_dict_table); +static MP_DEFINE_CONST_DICT(dropdown_locals_dict, dropdown_locals_dict_table); -static void line_print(const mp_print_t *print, +static void dropdown_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl line"); + mp_printf(print, "lvgl dropdown"); } -static mp_obj_t line_make_new( +static mp_obj_t dropdown_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_line_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_dropdown_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_line_type_base, - MP_QSTR_line, + mp_lv_dropdown_type_base, + MP_QSTR_dropdown, MP_TYPE_FLAG_NONE, - print, line_print, - make_new, line_make_new, + print, dropdown_print, + make_new, dropdown_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &line_locals_dict + locals_dict, &dropdown_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_line_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_dropdown_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_line_class, + .lv_obj_class = &lv_dropdown_class, #endif - .mp_obj_type = &mp_lv_line_type_base, + .mp_obj_type = &mp_lv_dropdown_type_base, }; /* * lvgl extension definition for: - * lv_obj_t *lv_list_add_text(lv_obj_t *list, const char *txt) + * void lv_gif_set_color_format(lv_obj_t *obj, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_list_add_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_gif_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *list = mp_to_lv(mp_args[0]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_func_ptr)(list, txt); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, color_format); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_text_mpobj, 2, mp_lv_list_add_text, lv_list_add_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_color_format_mpobj, 2, mp_lv_gif_set_color_format, lv_gif_set_color_format); +/* Reusing lv_image_set_src for lv_gif_set_src */ -/* - * lvgl extension definition for: - * lv_obj_t *lv_list_add_button(lv_obj_t *list, const void *icon, const char *txt) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_src_mpobj, 2, mp_lv_image_set_src, lv_gif_set_src); + +/* Reusing lv_obj_move_foreground for lv_gif_restart */ -static mp_obj_t mp_lv_list_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *list = mp_to_lv(mp_args[0]); - const void *icon = (const void *)mp_to_ptr(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, const char *))lv_func_ptr)(list, icon, txt); - return lv_to_mp((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_restart_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_restart); + +/* Reusing lv_obj_move_foreground for lv_gif_pause */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_pause_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_pause); + +/* Reusing lv_obj_move_foreground for lv_gif_resume */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_button_mpobj, 3, mp_lv_list_add_button, lv_list_add_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_resume_mpobj, 1, mp_lv_obj_move_foreground, lv_gif_resume); +/* Reusing lv_obj_refr_size for lv_gif_is_loaded */ -/* - * lvgl extension definition for: - * const char *lv_list_get_button_text(lv_obj_t *list, lv_obj_t *btn) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_is_loaded_mpobj, 1, mp_lv_obj_refr_size, lv_gif_is_loaded); + +/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_loop_count */ -static mp_obj_t mp_lv_list_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *list = mp_to_lv(mp_args[0]); - lv_obj_t *btn = mp_to_lv(mp_args[1]); - const char * _res = ((const char *(*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(list, btn); - return convert_to_str((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_loop_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_loop_count); + +/* Reusing lv_obj_move_to_index for lv_gif_set_loop_count */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_loop_count_mpobj, 2, mp_lv_obj_move_to_index, lv_gif_set_loop_count); + +/* Reusing lv_obj_set_hidden for lv_gif_set_auto_pause_invisible */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_get_button_text_mpobj, 2, mp_lv_list_get_button_text, lv_list_get_button_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_set_auto_pause_invisible_mpobj, 2, mp_lv_obj_set_hidden, lv_gif_set_auto_pause_invisible); /* * lvgl extension definition for: - * void lv_list_set_button_text(lv_obj_t *list, lv_obj_t *btn, const char *txt) + * bool lv_gif_get_size(const char *src, uint16_t *w, uint16_t *h) */ -static mp_obj_t mp_lv_list_set_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_gif_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *list = mp_to_lv(mp_args[0]); - lv_obj_t *btn = mp_to_lv(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, const char *))lv_func_ptr)(list, btn, txt); - return mp_const_none; + const char *src = (const char *)(char*)convert_from_str(mp_args[0]); + uint16_t *w = mp_array_to_u16ptr(mp_args[1]); + uint16_t *h = mp_array_to_u16ptr(mp_args[2]); + bool _res = ((bool (*)(const char *, uint16_t *, uint16_t *))lv_func_ptr)(src, w, h); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_set_button_text_mpobj, 3, mp_lv_list_set_button_text, lv_list_set_button_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_gif_get_size_mpobj, 3, mp_lv_gif_get_size, lv_gif_get_size); -/* Reusing lv_obj_create for lv_list_create */ +/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_frame_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_create_mpobj, 1, mp_lv_obj_create, lv_list_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_frame_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_frame_count); + +/* Reusing lv_obj_get_style_clamped_width for lv_gif_get_current_frame_index */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_get_current_frame_index_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_gif_get_current_frame_index); + +/* Reusing lv_obj_create for lv_gif_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_gif_create_mpobj, 1, mp_lv_obj_create, lv_gif_create); /* - * lvgl list object definitions + * lvgl gif object definitions */ -static const mp_rom_map_elem_t list_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_list_add_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_list_add_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_list_get_button_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_button_text), MP_ROM_PTR(&mp_lv_list_set_button_text_mpobj) } +static const mp_rom_map_elem_t gif_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_gif_set_color_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_gif_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_restart), MP_ROM_PTR(&mp_lv_gif_restart_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_gif_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_gif_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_loaded), MP_ROM_PTR(&mp_lv_gif_is_loaded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_loop_count), MP_ROM_PTR(&mp_lv_gif_get_loop_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_loop_count), MP_ROM_PTR(&mp_lv_gif_set_loop_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_auto_pause_invisible), MP_ROM_PTR(&mp_lv_gif_set_auto_pause_invisible_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_gif_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_frame_count), MP_ROM_PTR(&mp_lv_gif_get_frame_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_frame_index), MP_ROM_PTR(&mp_lv_gif_get_current_frame_index_mpobj) } }; -static MP_DEFINE_CONST_DICT(list_locals_dict, list_locals_dict_table); +static MP_DEFINE_CONST_DICT(gif_locals_dict, gif_locals_dict_table); -static void list_print(const mp_print_t *print, +static void gif_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl list"); + mp_printf(print, "lvgl gif"); } -static mp_obj_t list_make_new( +static mp_obj_t gif_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_list_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_gif_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_list_type_base, - MP_QSTR_list, + mp_lv_gif_type_base, + MP_QSTR_gif, MP_TYPE_FLAG_NONE, - print, list_print, - make_new, list_make_new, + print, gif_print, + make_new, gif_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &list_locals_dict + locals_dict, &gif_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_list_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_gif_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_list_class, + .lv_obj_class = &lv_gif_class, #endif - .mp_obj_type = &mp_lv_list_type_base, + .mp_obj_type = &mp_lv_gif_type_base, }; -/* Reusing lv_obj_set_parent for lv_menu_set_page */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_page); - /* * lvgl extension definition for: - * void lv_menu_set_page_title(lv_obj_t *page, const char * const title) + * void lv_imagebutton_set_src(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left, const void *src_mid, const void *src_right) */ -static mp_obj_t mp_lv_menu_set_page_title(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_set_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *page = mp_to_lv(mp_args[0]); - const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_obj_t *, const char * const))lv_func_ptr)(page, title); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + const void *src_left = (const void *)mp_to_ptr(mp_args[2]); + const void *src_mid = (const void *)mp_to_ptr(mp_args[3]); + const void *src_right = (const void *)mp_to_ptr(mp_args[4]); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *, const void *, const void *))lv_func_ptr)(obj, state, src_left, src_mid, src_right); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title); - -/* Reusing lv_menu_set_page_title for lv_menu_set_page_title_static */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_static_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title_static); - -/* Reusing lv_obj_set_parent for lv_menu_set_sidebar_page */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_sidebar_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_sidebar_page); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mpobj, 5, mp_lv_imagebutton_set_src, lv_imagebutton_set_src); /* * lvgl extension definition for: - * void lv_menu_set_mode_header(lv_obj_t *obj, lv_menu_mode_header_t mode) + * void lv_imagebutton_set_src_left(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left) */ -static mp_obj_t mp_lv_menu_set_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_set_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_header_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_menu_mode_header_t))lv_func_ptr)(obj, mode); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + const void *src_left = (const void *)mp_to_ptr(mp_args[2]); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_func_ptr)(obj, state, src_left); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_header_mpobj, 2, mp_lv_menu_set_mode_header, lv_menu_set_mode_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_left_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_left); + +/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_right_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_right); + +/* Reusing lv_imagebutton_set_src_left for lv_imagebutton_set_src_mid */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_src_mid_mpobj, 3, mp_lv_imagebutton_set_src_left, lv_imagebutton_set_src_mid); /* * lvgl extension definition for: - * void lv_menu_set_mode_root_back_button(lv_obj_t *obj, lv_menu_mode_root_back_button_t mode) + * void lv_imagebutton_set_state(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static mp_obj_t mp_lv_menu_set_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_set_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_root_back_button_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_menu_mode_root_back_button_t))lv_func_ptr)(obj, mode); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_root_back_button_mpobj, 2, mp_lv_menu_set_mode_root_back_button, lv_menu_set_mode_root_back_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_set_state_mpobj, 2, mp_lv_imagebutton_set_state, lv_imagebutton_set_state); /* * lvgl extension definition for: - * void lv_menu_set_load_page_event(lv_obj_t *menu, lv_obj_t *obj, lv_obj_t *page) + * const void *lv_imagebutton_get_src_left(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static mp_obj_t mp_lv_menu_set_load_page_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imagebutton_get_src_left(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *menu = mp_to_lv(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - lv_obj_t *page = mp_to_lv(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj, page); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_imagebutton_state_t state = (int)mp_obj_get_int(mp_args[1]); + const void * _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_func_ptr)(obj, state); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_load_page_event_mpobj, 3, mp_lv_menu_set_load_page_event, lv_menu_set_load_page_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_left_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_left); -/* Reusing lv_obj_create for lv_menu_get_cur_main_page */ +/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_middle */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_main_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_main_page); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_middle_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_middle); -/* Reusing lv_obj_create for lv_menu_get_cur_sidebar_page */ +/* Reusing lv_imagebutton_get_src_left for lv_imagebutton_get_src_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_sidebar_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_sidebar_page); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_get_src_right_mpobj, 2, mp_lv_imagebutton_get_src_left, lv_imagebutton_get_src_right); -/* Reusing lv_obj_create for lv_menu_get_main_header */ +/* Reusing lv_obj_create for lv_imagebutton_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_imagebutton_create_mpobj, 1, mp_lv_obj_create, lv_imagebutton_create); -/* Reusing lv_obj_create for lv_menu_get_main_header_back_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header_back_button); +/* + * lvgl imagebutton object definitions + */ -/* Reusing lv_obj_create for lv_menu_get_sidebar_header */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header); +static const mp_rom_map_elem_t imagebutton_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_src), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_left), MP_ROM_PTR(&mp_lv_imagebutton_set_src_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_right), MP_ROM_PTR(&mp_lv_imagebutton_set_src_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_src_mid), MP_ROM_PTR(&mp_lv_imagebutton_set_src_mid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_state), MP_ROM_PTR(&mp_lv_imagebutton_set_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_left), MP_ROM_PTR(&mp_lv_imagebutton_get_src_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_middle), MP_ROM_PTR(&mp_lv_imagebutton_get_src_middle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_src_right), MP_ROM_PTR(&mp_lv_imagebutton_get_src_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_STATE), MP_ROM_PTR(&mp_lv_LV_IMAGEBUTTON_STATE_type_base) } +}; + +static MP_DEFINE_CONST_DICT(imagebutton_locals_dict, imagebutton_locals_dict_table); + +static void imagebutton_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl imagebutton"); +} + + +static mp_obj_t imagebutton_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_imagebutton_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_imagebutton_type_base, + MP_QSTR_imagebutton, + MP_TYPE_FLAG_NONE, + print, imagebutton_print, + make_new, imagebutton_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &imagebutton_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_imagebutton_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_imagebutton_class, +#endif + .mp_obj_type = &mp_lv_imagebutton_type_base, +}; -/* Reusing lv_obj_create for lv_menu_get_sidebar_header_back_button */ +/* Reusing lv_obj_set_parent for lv_keyboard_set_textarea */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header_back_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_textarea_mpobj, 2, mp_lv_obj_set_parent, lv_keyboard_set_textarea); /* * lvgl extension definition for: - * bool lv_menu_back_button_is_root(lv_obj_t *menu, lv_obj_t *obj) + * void lv_keyboard_set_mode(lv_obj_t *obj, lv_keyboard_mode_t mode) */ -static mp_obj_t mp_lv_menu_back_button_is_root(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_keyboard_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *menu = mp_to_lv(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - bool _res = ((bool (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj); - return convert_to_bool(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_keyboard_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_back_button_is_root_mpobj, 2, mp_lv_menu_back_button_is_root, lv_menu_back_button_is_root); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_mode_mpobj, 2, mp_lv_keyboard_set_mode, lv_keyboard_set_mode); + +/* Reusing lv_obj_set_hidden for lv_keyboard_set_popovers */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_popovers_mpobj, 2, mp_lv_obj_set_hidden, lv_keyboard_set_popovers); /* * lvgl extension definition for: - * lv_menu_mode_header_t lv_menu_get_mode_header(lv_obj_t *obj) + * void lv_keyboard_set_map(lv_obj_t *obj, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[]) */ -static mp_obj_t mp_lv_menu_get_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_keyboard_set_map(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_header_t _res = ((lv_menu_mode_header_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_keyboard_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + const char * const *map = (const char * const *)mp_arr_to_char_ptr____(mp_args[2]); + const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_arr_to_lv_buttonmatrix_ctrl_t_____(mp_args[3]); + ((void (*)(lv_obj_t *, lv_keyboard_mode_t, const char * const [], const lv_buttonmatrix_ctrl_t []))lv_func_ptr)(obj, mode, map, ctrl_map); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_header_mpobj, 1, mp_lv_menu_get_mode_header, lv_menu_get_mode_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_set_map_mpobj, 4, mp_lv_keyboard_set_map, lv_keyboard_set_map); + +/* Reusing lv_obj_get_screen for lv_keyboard_get_textarea */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_textarea_mpobj, 1, mp_lv_obj_get_screen, lv_keyboard_get_textarea); /* * lvgl extension definition for: - * lv_menu_mode_root_back_button_t lv_menu_get_mode_root_back_button(lv_obj_t *obj) + * lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_menu_get_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_keyboard_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_menu_mode_root_back_button_t _res = ((lv_menu_mode_root_back_button_t (*)(lv_obj_t *))lv_func_ptr)(obj); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_keyboard_mode_t _res = ((lv_keyboard_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_root_back_button_mpobj, 1, mp_lv_menu_get_mode_root_back_button, lv_menu_get_mode_root_back_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_mode_mpobj, 1, mp_lv_keyboard_get_mode, lv_keyboard_get_mode); -/* Reusing lv_obj_move_foreground for lv_menu_clear_history */ +/* Reusing lv_obj_is_layout_positioned for lv_keyboard_get_popovers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_clear_history_mpobj, 1, mp_lv_obj_move_foreground, lv_menu_clear_history); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_popovers_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_keyboard_get_popovers); -/* Reusing lv_obj_create for lv_menu_create */ +/* Reusing lv_obj_get_child_count for lv_keyboard_get_selected_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_create_mpobj, 1, mp_lv_obj_create, lv_menu_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_selected_button_mpobj, 1, mp_lv_obj_get_child_count, lv_keyboard_get_selected_button); + +/* Reusing lv_buttonmatrix_get_button_text for lv_keyboard_get_button_text */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_get_button_text_mpobj, 2, mp_lv_buttonmatrix_get_button_text, lv_keyboard_get_button_text); + +/* Reusing funcptr_event_cb for lv_keyboard_def_event_cb */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_keyboard_def_event_cb_mpobj, 1, mp_funcptr_event_cb, lv_keyboard_def_event_cb); + +/* Reusing lv_obj_create for lv_keyboard_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_keyboard_create_mpobj, 1, mp_lv_obj_create, lv_keyboard_create); /* - * lvgl menu object definitions + * lvgl keyboard object definitions */ -static const mp_rom_map_elem_t menu_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_page), MP_ROM_PTR(&mp_lv_menu_set_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_page_title), MP_ROM_PTR(&mp_lv_menu_set_page_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_page_title_static), MP_ROM_PTR(&mp_lv_menu_set_page_title_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_sidebar_page), MP_ROM_PTR(&mp_lv_menu_set_sidebar_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode_header), MP_ROM_PTR(&mp_lv_menu_set_mode_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_set_mode_root_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_load_page_event), MP_ROM_PTR(&mp_lv_menu_set_load_page_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cur_main_page), MP_ROM_PTR(&mp_lv_menu_get_cur_main_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cur_sidebar_page), MP_ROM_PTR(&mp_lv_menu_get_cur_sidebar_page_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_main_header), MP_ROM_PTR(&mp_lv_menu_get_main_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_main_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_main_header_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sidebar_header), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_sidebar_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_back_button_is_root), MP_ROM_PTR(&mp_lv_menu_back_button_is_root_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode_header), MP_ROM_PTR(&mp_lv_menu_get_mode_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_get_mode_root_back_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_history), MP_ROM_PTR(&mp_lv_menu_clear_history_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_HEADER), MP_ROM_PTR(&mp_lv_LV_MENU_HEADER_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ROOT_BACK_BUTTON), MP_ROM_PTR(&mp_lv_LV_MENU_ROOT_BACK_BUTTON_type_base) } +static const mp_rom_map_elem_t keyboard_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_textarea), MP_ROM_PTR(&mp_lv_keyboard_set_textarea_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_keyboard_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_popovers), MP_ROM_PTR(&mp_lv_keyboard_set_popovers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_map), MP_ROM_PTR(&mp_lv_keyboard_set_map_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_textarea), MP_ROM_PTR(&mp_lv_keyboard_get_textarea_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_keyboard_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_popovers), MP_ROM_PTR(&mp_lv_keyboard_get_popovers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_button), MP_ROM_PTR(&mp_lv_keyboard_get_selected_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_keyboard_get_button_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_def_event_cb), MP_ROM_PTR(&mp_lv_keyboard_def_event_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_KEYBOARD_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(menu_locals_dict, menu_locals_dict_table); +static MP_DEFINE_CONST_DICT(keyboard_locals_dict, keyboard_locals_dict_table); -static void menu_print(const mp_print_t *print, +static void keyboard_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl menu"); + mp_printf(print, "lvgl keyboard"); } -static mp_obj_t menu_make_new( +static mp_obj_t keyboard_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_menu_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_keyboard_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_type_base, - MP_QSTR_menu, + mp_lv_keyboard_type_base, + MP_QSTR_keyboard, MP_TYPE_FLAG_NONE, - print, menu_print, - make_new, menu_make_new, + print, keyboard_print, + make_new, keyboard_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &menu_locals_dict + locals_dict, &keyboard_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_keyboard_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_class, + .lv_obj_class = &lv_keyboard_class, #endif - .mp_obj_type = &mp_lv_menu_type_base, + .mp_obj_type = &mp_lv_keyboard_type_base, }; +/* Reusing lv_barcode_set_dark_color for lv_led_set_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_led_set_color); + +/* Reusing lv_obj_set_flex_grow for lv_led_set_brightness */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_set_brightness_mpobj, 2, mp_lv_obj_set_flex_grow, lv_led_set_brightness); + +/* Reusing lv_obj_move_foreground for lv_led_on */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_on_mpobj, 1, mp_lv_obj_move_foreground, lv_led_on); + +/* Reusing lv_obj_move_foreground for lv_led_off */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_off_mpobj, 1, mp_lv_obj_move_foreground, lv_led_off); + +/* Reusing lv_obj_move_foreground for lv_led_toggle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_toggle_mpobj, 1, mp_lv_obj_move_foreground, lv_led_toggle); + /* * lvgl extension definition for: - * lv_obj_t *lv_menu_page_create(lv_obj_t *menu, const char * const title) + * uint8_t lv_led_get_brightness(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_menu_page_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_led_get_brightness(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *menu = mp_to_lv(mp_args[0]); - const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char * const))lv_func_ptr)(menu, title); - return lv_to_mp((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + uint8_t _res = ((uint8_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_page_create_mpobj, 2, mp_lv_menu_page_create, lv_menu_page_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_brightness_mpobj, 1, mp_lv_led_get_brightness, lv_led_get_brightness); /* - * lvgl menu_page object definitions + * lvgl extension definition for: + * lv_color_t lv_led_get_color(const lv_obj_t *obj) */ + +static mp_obj_t mp_lv_led_get_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_lv_color_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_get_color_mpobj, 1, mp_lv_led_get_color, lv_led_get_color); + +/* Reusing lv_obj_create for lv_led_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_led_create_mpobj, 1, mp_lv_obj_create, lv_led_create); -static const mp_rom_map_elem_t menu_page_locals_dict_table[] = { +/* + * lvgl led object definitions + */ + +static const mp_rom_map_elem_t led_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_color), MP_ROM_PTR(&mp_lv_led_set_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_brightness), MP_ROM_PTR(&mp_lv_led_set_brightness_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_on), MP_ROM_PTR(&mp_lv_led_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_off), MP_ROM_PTR(&mp_lv_led_off_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_toggle), MP_ROM_PTR(&mp_lv_led_toggle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_brightness), MP_ROM_PTR(&mp_lv_led_get_brightness_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_color), MP_ROM_PTR(&mp_lv_led_get_color_mpobj) } }; -static MP_DEFINE_CONST_DICT(menu_page_locals_dict, menu_page_locals_dict_table); +static MP_DEFINE_CONST_DICT(led_locals_dict, led_locals_dict_table); -static void menu_page_print(const mp_print_t *print, +static void led_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl menu_page"); + mp_printf(print, "lvgl led"); } -static mp_obj_t menu_page_make_new( +static mp_obj_t led_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_menu_page_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_led_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_page_type_base, - MP_QSTR_menu_page, + mp_lv_led_type_base, + MP_QSTR_led, MP_TYPE_FLAG_NONE, - print, menu_page_print, - make_new, menu_page_make_new, + print, led_print, + make_new, led_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &menu_page_locals_dict + locals_dict, &led_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_page_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_led_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_page_class, + .lv_obj_class = &lv_led_class, #endif - .mp_obj_type = &mp_lv_menu_page_type_base, + .mp_obj_type = &mp_lv_led_type_base, }; -/* Reusing lv_obj_create for lv_menu_cont_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_cont_create_mpobj, 1, mp_lv_obj_create, lv_menu_cont_create); - /* - * lvgl menu_cont object definitions + * Array convertors for lv_point_precise_t [] */ - - -static const mp_rom_map_elem_t menu_cont_locals_dict_table[] = { - -}; - -static MP_DEFINE_CONST_DICT(menu_cont_locals_dict, menu_cont_locals_dict_table); -static void menu_cont_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t_____(mp_obj_t mp_arr) { - mp_printf(print, "lvgl menu_cont"); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_point_precise_t(item); + } + return (lv_point_precise_t *)lv_arr; } - -static mp_obj_t menu_cont_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t_____(const lv_point_precise_t *arr) { - return make_new(&mp_lv_menu_cont_create_mpobj, type, n_args, n_kw, args); + return mp_read_ptr_lv_point_precise_t((void*)arr); } -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_cont_type_base, - MP_QSTR_menu_cont, - MP_TYPE_FLAG_NONE, - print, menu_cont_print, - make_new, menu_cont_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &menu_cont_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_cont_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_cont_class, -#endif - .mp_obj_type = &mp_lv_menu_cont_type_base, -}; - -/* Reusing lv_obj_create for lv_menu_section_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_section_create_mpobj, 1, mp_lv_obj_create, lv_menu_section_create); - - /* - * lvgl menu_section object definitions + * lvgl extension definition for: + * void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num) */ - - -static const mp_rom_map_elem_t menu_section_locals_dict_table[] = { - -}; - -static MP_DEFINE_CONST_DICT(menu_section_locals_dict, menu_section_locals_dict_table); - -static void menu_section_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl menu_section"); -} - -static mp_obj_t menu_section_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_line_set_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_menu_section_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_point_precise_t *points = (const lv_point_precise_t *)mp_arr_to_lv_point_precise_t_____(mp_args[1]); + uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_section_type_base, - MP_QSTR_menu_section, - MP_TYPE_FLAG_NONE, - print, menu_section_print, - make_new, menu_section_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &menu_section_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_section_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_section_class, -#endif - .mp_obj_type = &mp_lv_menu_section_type_base, -}; - -/* Reusing lv_obj_create for lv_menu_separator_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_separator_create_mpobj, 1, mp_lv_obj_create, lv_menu_separator_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mpobj, 3, mp_lv_line_set_points, lv_line_set_points); /* - * lvgl menu_separator object definitions + * lvgl extension definition for: + * void lv_line_set_points_mutable(lv_obj_t *obj, lv_point_precise_t points[], uint32_t point_num) */ - - -static const mp_rom_map_elem_t menu_separator_locals_dict_table[] = { - -}; - -static MP_DEFINE_CONST_DICT(menu_separator_locals_dict, menu_separator_locals_dict_table); - -static void menu_separator_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl menu_separator"); -} - -static mp_obj_t menu_separator_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_line_set_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_menu_separator_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_point_precise_t *points = mp_arr_to_lv_point_precise_t_____(mp_args[1]); + uint32_t point_num = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_point_precise_t [], uint32_t))lv_func_ptr)(obj, points, point_num); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_menu_separator_type_base, - MP_QSTR_menu_separator, - MP_TYPE_FLAG_NONE, - print, menu_separator_print, - make_new, menu_separator_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &menu_separator_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_separator_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_menu_separator_class, -#endif - .mp_obj_type = &mp_lv_menu_separator_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_points_mutable_mpobj, 3, mp_lv_line_set_points_mutable, lv_line_set_points_mutable); -/* Reusing lv_list_add_text for lv_msgbox_add_title */ +/* Reusing lv_obj_set_hidden for lv_line_set_y_invert */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_title_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_title); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_set_y_invert_mpobj, 2, mp_lv_obj_set_hidden, lv_line_set_y_invert); /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_add_header_button(lv_obj_t *obj, const void *icon) + * const lv_point_precise_t *lv_line_get_points(lv_obj_t *obj) */ -static mp_obj_t mp_lv_msgbox_add_header_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_line_get_points(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void *icon = (const void *)mp_to_ptr(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *))lv_func_ptr)(obj, icon); - return lv_to_mp((void*)_res); + const lv_point_precise_t * _res = ((const lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_point_precise_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_header_button_mpobj, 2, mp_lv_msgbox_add_header_button, lv_msgbox_add_header_button); - -/* Reusing lv_list_add_text for lv_msgbox_add_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_text_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_text); - -/* Reusing lv_list_add_text for lv_msgbox_add_footer_button */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_footer_button_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_footer_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mpobj, 1, mp_lv_line_get_points, lv_line_get_points); -/* Reusing lv_obj_create for lv_msgbox_add_close_button */ +/* Reusing lv_obj_get_event_count for lv_line_get_point_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_close_button_mpobj, 1, mp_lv_obj_create, lv_msgbox_add_close_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_point_count_mpobj, 1, mp_lv_obj_get_event_count, lv_line_get_point_count); -/* Reusing lv_obj_create for lv_msgbox_get_header */ +/* Reusing lv_obj_refr_size for lv_line_is_point_array_mutable */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_header_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_is_point_array_mutable_mpobj, 1, mp_lv_obj_refr_size, lv_line_is_point_array_mutable); -/* Reusing lv_obj_create for lv_msgbox_get_footer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_footer_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_footer); - -/* Reusing lv_obj_create for lv_msgbox_get_content */ +/* + * lvgl extension definition for: + * lv_point_precise_t *lv_line_get_points_mutable(lv_obj_t *obj) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_content_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_content); - -/* Reusing lv_obj_create for lv_msgbox_get_title */ +static mp_obj_t mp_lv_line_get_points_mutable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_point_precise_t * _res = ((lv_point_precise_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_point_precise_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_title_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_title); - -/* Reusing lv_obj_move_foreground for lv_msgbox_close */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_points_mutable_mpobj, 1, mp_lv_line_get_points_mutable, lv_line_get_points_mutable); -/* Reusing lv_obj_move_foreground for lv_msgbox_close_async */ +/* Reusing lv_obj_is_layout_positioned for lv_line_get_y_invert */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_async_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close_async); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_get_y_invert_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_line_get_y_invert); -/* Reusing lv_obj_create for lv_msgbox_create */ +/* Reusing lv_obj_create for lv_line_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_create_mpobj, 1, mp_lv_obj_create, lv_msgbox_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_line_create_mpobj, 1, mp_lv_obj_create, lv_line_create); /* - * lvgl msgbox object definitions + * lvgl line object definitions */ -static const mp_rom_map_elem_t msgbox_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_msgbox_add_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_header_button), MP_ROM_PTR(&mp_lv_msgbox_add_header_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_msgbox_add_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_footer_button), MP_ROM_PTR(&mp_lv_msgbox_add_footer_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_close_button), MP_ROM_PTR(&mp_lv_msgbox_add_close_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_msgbox_get_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_footer), MP_ROM_PTR(&mp_lv_msgbox_get_footer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_msgbox_get_content_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_title), MP_ROM_PTR(&mp_lv_msgbox_get_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_msgbox_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close_async), MP_ROM_PTR(&mp_lv_msgbox_close_async_mpobj) } +static const mp_rom_map_elem_t line_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_points), MP_ROM_PTR(&mp_lv_line_set_points_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_points_mutable), MP_ROM_PTR(&mp_lv_line_set_points_mutable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_y_invert), MP_ROM_PTR(&mp_lv_line_set_y_invert_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_points), MP_ROM_PTR(&mp_lv_line_get_points_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_point_count), MP_ROM_PTR(&mp_lv_line_get_point_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_point_array_mutable), MP_ROM_PTR(&mp_lv_line_is_point_array_mutable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_points_mutable), MP_ROM_PTR(&mp_lv_line_get_points_mutable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_y_invert), MP_ROM_PTR(&mp_lv_line_get_y_invert_mpobj) } }; -static MP_DEFINE_CONST_DICT(msgbox_locals_dict, msgbox_locals_dict_table); +static MP_DEFINE_CONST_DICT(line_locals_dict, line_locals_dict_table); -static void msgbox_print(const mp_print_t *print, +static void line_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl msgbox"); + mp_printf(print, "lvgl line"); } -static mp_obj_t msgbox_make_new( +static mp_obj_t line_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_msgbox_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_line_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_msgbox_type_base, - MP_QSTR_msgbox, + mp_lv_line_type_base, + MP_QSTR_line, MP_TYPE_FLAG_NONE, - print, msgbox_print, - make_new, msgbox_make_new, + print, line_print, + make_new, line_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &msgbox_locals_dict + locals_dict, &line_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_msgbox_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_line_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_msgbox_class, + .lv_obj_class = &lv_line_class, #endif - .mp_obj_type = &mp_lv_msgbox_type_base, + .mp_obj_type = &mp_lv_line_type_base, }; /* * lvgl extension definition for: - * void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode) + * lv_obj_t *lv_list_add_text(lv_obj_t *list, const char *txt) */ -static mp_obj_t mp_lv_roller_set_options(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_add_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *options = (const char *)(char*)convert_from_str(mp_args[1]); - lv_roller_mode_t mode = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const char *, lv_roller_mode_t))lv_func_ptr)(obj, options, mode); - return mp_const_none; + lv_obj_t *list = mp_to_lv(mp_args[0]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_func_ptr)(list, txt); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_options_mpobj, 3, mp_lv_roller_set_options, lv_roller_set_options); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_text_mpobj, 2, mp_lv_list_add_text, lv_list_add_text); /* * lvgl extension definition for: - * void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim) + * lv_obj_t *lv_list_add_button(lv_obj_t *list, const void *icon, const char *txt) */ -static mp_obj_t mp_lv_roller_set_selected(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t sel_opt = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); - return mp_const_none; + lv_obj_t *list = mp_to_lv(mp_args[0]); + const void *icon = (const void *)mp_to_ptr(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, const char *))lv_func_ptr)(list, icon, txt); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_mpobj, 3, mp_lv_roller_set_selected, lv_roller_set_selected); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_add_button_mpobj, 3, mp_lv_list_add_button, lv_list_add_button); /* * lvgl extension definition for: - * bool lv_roller_set_selected_str(lv_obj_t *obj, const char *sel_opt, lv_anim_enable_t anim) + * const char *lv_list_get_button_text(lv_obj_t *list, lv_obj_t *btn) */ -static mp_obj_t mp_lv_roller_set_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_get_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *sel_opt = (const char *)(char*)convert_from_str(mp_args[1]); - lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, const char *, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); - return convert_to_bool(_res); + lv_obj_t *list = mp_to_lv(mp_args[0]); + lv_obj_t *btn = mp_to_lv(mp_args[1]); + const char * _res = ((const char *(*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(list, btn); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_str_mpobj, 3, mp_lv_roller_set_selected_str, lv_roller_set_selected_str); - -/* Reusing lv_obj_delete_delayed for lv_roller_set_visible_row_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_visible_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_roller_set_visible_row_count); - -/* Reusing lv_obj_get_child_count for lv_roller_get_selected */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_selected); - -/* Reusing lv_dropdown_get_selected_str for lv_roller_get_selected_str */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_roller_get_selected_str); - -/* Reusing lv_checkbox_get_text for lv_roller_get_options */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_roller_get_options); - -/* Reusing lv_obj_get_child_count for lv_roller_get_option_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_option_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_get_button_text_mpobj, 2, mp_lv_list_get_button_text, lv_list_get_button_text); /* * lvgl extension definition for: - * lv_result_t lv_roller_get_option_str(const lv_obj_t *obj, uint32_t option, char *buf, uint32_t buf_size) + * void lv_list_set_button_text(lv_obj_t *list, lv_obj_t *btn, const char *txt) */ -static mp_obj_t mp_lv_roller_get_option_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_list_set_button_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t option = (uint32_t)mp_obj_get_int(mp_args[1]); - char *buf = (char*)convert_from_str(mp_args[2]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, uint32_t, char *, uint32_t))lv_func_ptr)(obj, option, buf, buf_size); - return mp_obj_new_int(_res); + lv_obj_t *list = mp_to_lv(mp_args[0]); + lv_obj_t *btn = mp_to_lv(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, const char *))lv_func_ptr)(list, btn, txt); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_str_mpobj, 4, mp_lv_roller_get_option_str, lv_roller_get_option_str); - -/* Reusing lv_obj_bind_checked for lv_roller_bind_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_roller_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_set_button_text_mpobj, 3, mp_lv_list_set_button_text, lv_list_set_button_text); -/* Reusing lv_obj_create for lv_roller_create */ +/* Reusing lv_obj_create for lv_list_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_create_mpobj, 1, mp_lv_obj_create, lv_roller_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_list_create_mpobj, 1, mp_lv_obj_create, lv_list_create); /* - * lvgl roller object definitions + * lvgl list object definitions */ -static const mp_rom_map_elem_t roller_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_roller_set_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_roller_set_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_str), MP_ROM_PTR(&mp_lv_roller_set_selected_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_visible_row_count), MP_ROM_PTR(&mp_lv_roller_set_visible_row_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_roller_get_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_roller_get_selected_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_roller_get_options_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_roller_get_option_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_option_str), MP_ROM_PTR(&mp_lv_roller_get_option_str_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_roller_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ROLLER_MODE_type_base) } +static const mp_rom_map_elem_t list_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_list_add_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_list_add_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_button_text), MP_ROM_PTR(&mp_lv_list_get_button_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_button_text), MP_ROM_PTR(&mp_lv_list_set_button_text_mpobj) } }; -static MP_DEFINE_CONST_DICT(roller_locals_dict, roller_locals_dict_table); +static MP_DEFINE_CONST_DICT(list_locals_dict, list_locals_dict_table); -static void roller_print(const mp_print_t *print, +static void list_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl roller"); + mp_printf(print, "lvgl list"); } -static mp_obj_t roller_make_new( +static mp_obj_t list_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_roller_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_list_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_roller_type_base, - MP_QSTR_roller, + mp_lv_list_type_base, + MP_QSTR_list, MP_TYPE_FLAG_NONE, - print, roller_print, - make_new, roller_make_new, + print, list_print, + make_new, list_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &roller_locals_dict + locals_dict, &list_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_roller_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_list_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_roller_class, + .lv_obj_class = &lv_list_class, #endif - .mp_obj_type = &mp_lv_roller_type_base, + .mp_obj_type = &mp_lv_list_type_base, }; +/* Reusing lv_obj_set_parent for lv_menu_set_page */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_page); + /* * lvgl extension definition for: - * void lv_scale_set_mode(lv_obj_t *obj, lv_scale_mode_t mode) + * void lv_menu_set_page_title(lv_obj_t *page_obj, const char * const title) */ -static mp_obj_t mp_lv_scale_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_set_page_title(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scale_mode_t))lv_func_ptr)(obj, mode); + lv_obj_t *page_obj = mp_to_lv(mp_args[0]); + const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_obj_t *, const char * const))lv_func_ptr)(page_obj, title); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_mode_mpobj, 2, mp_lv_scale_set_mode, lv_scale_set_mode); - -/* Reusing lv_obj_delete_delayed for lv_scale_set_total_tick_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_total_tick_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_total_tick_count); - -/* Reusing lv_obj_delete_delayed for lv_scale_set_major_tick_every */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_major_tick_every_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_major_tick_every); - -/* Reusing lv_obj_set_radio_button for lv_scale_set_label_show */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_label_show_mpobj, 2, mp_lv_obj_set_radio_button, lv_scale_set_label_show); - -/* Reusing lv_obj_set_pos for lv_scale_set_range */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_scale_set_range); - -/* Reusing lv_obj_move_to_index for lv_scale_set_min_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_min_value); - -/* Reusing lv_obj_move_to_index for lv_scale_set_max_value */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title); -/* Reusing lv_obj_delete_delayed for lv_scale_set_angle_range */ +/* Reusing lv_menu_set_page_title for lv_menu_set_page_title_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_angle_range_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_angle_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_page_title_static_mpobj, 2, mp_lv_menu_set_page_title, lv_menu_set_page_title_static); -/* Reusing lv_obj_move_to_index for lv_scale_set_rotation */ +/* Reusing lv_obj_set_parent for lv_menu_set_sidebar_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_sidebar_page_mpobj, 2, mp_lv_obj_set_parent, lv_menu_set_sidebar_page); /* * lvgl extension definition for: - * void lv_scale_set_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, int32_t value) + * void lv_menu_set_mode_header(lv_obj_t *obj, lv_menu_mode_header_t mode) */ -static mp_obj_t mp_lv_scale_set_line_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_set_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_obj_t *needle_line = mp_to_lv(mp_args[1]); - int32_t needle_length = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, needle_line, needle_length, value); + lv_menu_mode_header_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_menu_mode_header_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_line_needle_value_mpobj, 4, mp_lv_scale_set_line_needle_value, lv_scale_set_line_needle_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_header_mpobj, 2, mp_lv_menu_set_mode_header, lv_menu_set_mode_header); /* * lvgl extension definition for: - * void lv_scale_set_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, int32_t value) + * void lv_menu_set_mode_root_back_button(lv_obj_t *obj, lv_menu_mode_root_back_button_t mode) */ -static mp_obj_t mp_lv_scale_set_image_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_set_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_obj_t *needle_img = mp_to_lv(mp_args[1]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, needle_img, value); + lv_menu_mode_root_back_button_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_menu_mode_root_back_button_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_image_needle_value_mpobj, 3, mp_lv_scale_set_image_needle_value, lv_scale_set_image_needle_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_mode_root_back_button_mpobj, 2, mp_lv_menu_set_mode_root_back_button, lv_menu_set_mode_root_back_button); /* * lvgl extension definition for: - * void lv_scale_set_text_src(lv_obj_t *obj, const char *txt_src[]) + * void lv_menu_set_load_page_event(lv_obj_t *menu, lv_obj_t *obj, lv_obj_t *page) */ -static mp_obj_t mp_lv_scale_set_text_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_set_load_page_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char **txt_src = (const char **)mp_arr_to_char_ptr____(mp_args[1]); - ((void (*)(lv_obj_t *, const char *[]))lv_func_ptr)(obj, txt_src); + lv_obj_t *menu = mp_to_lv(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + lv_obj_t *page = mp_to_lv(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj, page); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_text_src_mpobj, 2, mp_lv_scale_set_text_src, lv_scale_set_text_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_set_load_page_event_mpobj, 3, mp_lv_menu_set_load_page_event, lv_menu_set_load_page_event); -/* Reusing lv_obj_set_radio_button for lv_scale_set_post_draw */ +/* Reusing lv_obj_create for lv_menu_get_cur_main_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_post_draw_mpobj, 2, mp_lv_obj_set_radio_button, lv_scale_set_post_draw); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_main_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_main_page); -/* Reusing lv_obj_set_radio_button for lv_scale_set_draw_ticks_on_top */ +/* Reusing lv_obj_create for lv_menu_get_cur_sidebar_page */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_draw_ticks_on_top_mpobj, 2, mp_lv_obj_set_radio_button, lv_scale_set_draw_ticks_on_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_cur_sidebar_page_mpobj, 1, mp_lv_obj_create, lv_menu_get_cur_sidebar_page); +/* Reusing lv_obj_create for lv_menu_get_main_header */ -/* - * Struct lv_scale_section_t - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header); + +/* Reusing lv_obj_create for lv_menu_get_main_header_back_button */ -static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_main_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_main_header_back_button); + +/* Reusing lv_obj_create for lv_menu_get_sidebar_header */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_scale_section_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_scale_section_t_type())); - return (lv_scale_section_t*)self->data; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header); + +/* Reusing lv_obj_create for lv_menu_get_sidebar_header_back_button */ -#define mp_write_lv_scale_section_t(struct_obj) *((lv_scale_section_t*)mp_write_ptr_lv_scale_section_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_scale_section_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_scale_section_t_type(), field); -} - -#define mp_read_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(copy_buffer(&field, sizeof(lv_scale_section_t))) -#define mp_read_byref_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(&field) - -static void mp_lv_scale_section_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_scale_section_t *data = (lv_scale_section_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_main_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->main_style); break; // converting from lv_style_t *; - case MP_QSTR_indicator_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->indicator_style); break; // converting from lv_style_t *; - case MP_QSTR_items_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->items_style); break; // converting from lv_style_t *; - case MP_QSTR_range_min: dest[0] = mp_obj_new_int(data->range_min); break; // converting from int32_t; - case MP_QSTR_range_max: dest[0] = mp_obj_new_int(data->range_max); break; // converting from int32_t; - case MP_QSTR_first_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_in_section); break; // converting from uint32_t; - case MP_QSTR_last_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_in_section); break; // converting from uint32_t; - case MP_QSTR_first_tick_in_section_width: dest[0] = mp_obj_new_int(data->first_tick_in_section_width); break; // converting from int32_t; - case MP_QSTR_last_tick_in_section_width: dest[0] = mp_obj_new_int(data->last_tick_in_section_width); break; // converting from int32_t; - case MP_QSTR_first_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->first_tick_in_section); break; // converting from lv_point_t; - case MP_QSTR_last_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->last_tick_in_section); break; // converting from lv_point_t; - case MP_QSTR_first_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_is_major); break; // converting from uint32_t; - case MP_QSTR_last_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_is_major); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_main_style: data->main_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; - case MP_QSTR_indicator_style: data->indicator_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; - case MP_QSTR_items_style: data->items_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; - case MP_QSTR_range_min: data->range_min = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_range_max: data->range_max = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_first_tick_idx_in_section: data->first_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_tick_idx_in_section: data->last_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_first_tick_in_section_width: data->first_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_last_tick_in_section_width: data->last_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_first_tick_in_section: data->first_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_tick_in_section: data->last_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_first_tick_idx_is_major: data->first_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_tick_idx_is_major: data->last_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_scale_section_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_scale_section_t"); -} - -static const mp_obj_dict_t mp_lv_scale_section_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_scale_section_t_type, - MP_QSTR_lv_scale_section_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_scale_section_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_scale_section_t_attr, - locals_dict, &mp_lv_scale_section_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void) -{ - return &mp_lv_scale_section_t_type; -} - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_sidebar_header_back_button_mpobj, 1, mp_lv_obj_create, lv_menu_get_sidebar_header_back_button); + /* * lvgl extension definition for: - * lv_scale_section_t *lv_scale_add_section(lv_obj_t *obj) + * bool lv_menu_back_button_is_root(lv_obj_t *menu, lv_obj_t *obj) */ -static mp_obj_t mp_lv_scale_add_section(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_back_button_is_root(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_section_t * _res = ((lv_scale_section_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_scale_section_t((void*)_res); + lv_obj_t *menu = mp_to_lv(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + bool _res = ((bool (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(menu, obj); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_add_section_mpobj, 1, mp_lv_scale_add_section, lv_scale_add_section); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_back_button_is_root_mpobj, 2, mp_lv_menu_back_button_is_root, lv_menu_back_button_is_root); /* * lvgl extension definition for: - * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) + * lv_menu_mode_header_t lv_menu_get_mode_header(lv_obj_t *obj) */ -static mp_obj_t mp_lv_scale_section_set_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_get_mode_header(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t max = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(section, min, max); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_menu_mode_header_t _res = ((lv_menu_mode_header_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_range_mpobj, 3, mp_lv_scale_section_set_range, lv_scale_section_set_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_header_mpobj, 1, mp_lv_menu_get_mode_header, lv_menu_get_mode_header); /* * lvgl extension definition for: - * void lv_scale_set_section_range(lv_obj_t *scale, lv_scale_section_t *section, int32_t min, int32_t max) + * lv_menu_mode_root_back_button_t lv_menu_get_mode_root_back_button(lv_obj_t *obj) */ -static mp_obj_t mp_lv_scale_set_section_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_get_mode_root_back_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *scale = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(scale, section, min, max); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_menu_mode_root_back_button_t _res = ((lv_menu_mode_root_back_button_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_range_mpobj, 4, mp_lv_scale_set_section_range, lv_scale_set_section_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_get_mode_root_back_button_mpobj, 1, mp_lv_menu_get_mode_root_back_button, lv_menu_get_mode_root_back_button); +/* Reusing lv_obj_move_foreground for lv_menu_clear_history */ -/* - * lvgl extension definition for: - * void lv_scale_set_section_min_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t min) - */ - -static mp_obj_t mp_lv_scale_set_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *scale = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_func_ptr)(scale, section, min); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_min_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_clear_history_mpobj, 1, mp_lv_obj_move_foreground, lv_menu_clear_history); -/* Reusing lv_scale_set_section_min_value for lv_scale_set_section_max_value */ +/* Reusing lv_obj_create for lv_menu_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_max_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_create_mpobj, 1, mp_lv_obj_create, lv_menu_create); /* - * lvgl extension definition for: - * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) + * lvgl menu object definitions */ + -static mp_obj_t mp_lv_scale_section_set_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static const mp_rom_map_elem_t menu_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_page), MP_ROM_PTR(&mp_lv_menu_set_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_page_title), MP_ROM_PTR(&mp_lv_menu_set_page_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_page_title_static), MP_ROM_PTR(&mp_lv_menu_set_page_title_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sidebar_page), MP_ROM_PTR(&mp_lv_menu_set_sidebar_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode_header), MP_ROM_PTR(&mp_lv_menu_set_mode_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_set_mode_root_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_load_page_event), MP_ROM_PTR(&mp_lv_menu_set_load_page_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cur_main_page), MP_ROM_PTR(&mp_lv_menu_get_cur_main_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cur_sidebar_page), MP_ROM_PTR(&mp_lv_menu_get_cur_sidebar_page_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_main_header), MP_ROM_PTR(&mp_lv_menu_get_main_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_main_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_main_header_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sidebar_header), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_sidebar_header_back_button), MP_ROM_PTR(&mp_lv_menu_get_sidebar_header_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_back_button_is_root), MP_ROM_PTR(&mp_lv_menu_back_button_is_root_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode_header), MP_ROM_PTR(&mp_lv_menu_get_mode_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode_root_back_button), MP_ROM_PTR(&mp_lv_menu_get_mode_root_back_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_history), MP_ROM_PTR(&mp_lv_menu_clear_history_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_HEADER), MP_ROM_PTR(&mp_lv_LV_MENU_HEADER_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ROOT_BACK_BUTTON), MP_ROM_PTR(&mp_lv_LV_MENU_ROOT_BACK_BUTTON_type_base) } +}; + +static MP_DEFINE_CONST_DICT(menu_locals_dict, menu_locals_dict_table); + +static void menu_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_t *section_part_style = mp_write_ptr_lv_style_t(mp_args[2]); - ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_func_ptr)(section, part, section_part_style); - return mp_const_none; + mp_printf(print, "lvgl menu"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_style_mpobj, 3, mp_lv_scale_section_set_style, lv_scale_section_set_style); +static mp_obj_t menu_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_menu_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_menu_type_base, + MP_QSTR_menu, + MP_TYPE_FLAG_NONE, + print, menu_print, + make_new, menu_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &menu_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_menu_class, +#endif + .mp_obj_type = &mp_lv_menu_type_base, +}; /* * lvgl extension definition for: - * void lv_scale_set_section_style_main(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) + * lv_obj_t *lv_menu_page_create(lv_obj_t *menu, const char * const title) */ -static mp_obj_t mp_lv_scale_set_section_style_main(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_menu_page_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *scale = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_func_ptr)(scale, section, style); - return mp_const_none; + lv_obj_t *menu = mp_to_lv(mp_args[0]); + const char * const title = (const char * const)(char*)convert_from_str(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const char * const))lv_func_ptr)(menu, title); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_main_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_main); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_page_create_mpobj, 2, mp_lv_menu_page_create, lv_menu_page_create); -/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_indicator */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_indicator_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_indicator); +/* + * lvgl menu_page object definitions + */ -/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_items */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_items_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_items); +static const mp_rom_map_elem_t menu_page_locals_dict_table[] = { +}; -/* - * lvgl extension definition for: - * lv_scale_mode_t lv_scale_get_mode(lv_obj_t *obj) - */ +static MP_DEFINE_CONST_DICT(menu_page_locals_dict, menu_page_locals_dict_table); -static mp_obj_t mp_lv_scale_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void menu_page_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_mode_t _res = ((lv_scale_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + mp_printf(print, "lvgl menu_page"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_mode_mpobj, 1, mp_lv_scale_get_mode, lv_scale_get_mode); - -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_total_tick_count */ +static mp_obj_t menu_page_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_menu_page_create_mpobj, type, n_args, n_kw, args); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_total_tick_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_total_tick_count); - -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_major_tick_every */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_major_tick_every_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_major_tick_every); - -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_rotation */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_menu_page_type_base, + MP_QSTR_menu_page, + MP_TYPE_FLAG_NONE, + print, menu_page_print, + make_new, menu_page_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &menu_page_locals_dict +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_rotation); +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_page_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_menu_page_class, +#endif + .mp_obj_type = &mp_lv_menu_page_type_base, +}; -/* Reusing lv_obj_refr_size for lv_scale_get_label_show */ +/* Reusing lv_obj_create for lv_menu_cont_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_label_show_mpobj, 1, mp_lv_obj_refr_size, lv_scale_get_label_show); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_cont_create_mpobj, 1, mp_lv_obj_create, lv_menu_cont_create); -/* Reusing lv_obj_get_event_count for lv_scale_get_angle_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_angle_range_mpobj, 1, mp_lv_obj_get_event_count, lv_scale_get_angle_range); +/* + * lvgl menu_cont object definitions + */ -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_min_value); +static const mp_rom_map_elem_t menu_cont_locals_dict_table[] = { -/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_max_value */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_max_value); - +static MP_DEFINE_CONST_DICT(menu_cont_locals_dict, menu_cont_locals_dict_table); -/* - * lvgl extension definition for: - * lv_observer_t *lv_scale_bind_section_min_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) - */ +static void menu_cont_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl menu_cont"); +} -static mp_obj_t mp_lv_scale_bind_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) + +static mp_obj_t menu_cont_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); - lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_func_ptr)(obj, section, subject); - return mp_read_ptr_lv_observer_t((void*)_res); + return make_new(&mp_lv_menu_cont_create_mpobj, type, n_args, n_kw, args); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_min_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_min_value); - -/* Reusing lv_scale_bind_section_min_value for lv_scale_bind_section_max_value */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_menu_cont_type_base, + MP_QSTR_menu_cont, + MP_TYPE_FLAG_NONE, + print, menu_cont_print, + make_new, menu_cont_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &menu_cont_locals_dict +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_max_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_max_value); +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_cont_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_menu_cont_class, +#endif + .mp_obj_type = &mp_lv_menu_cont_type_base, +}; -/* Reusing lv_obj_create for lv_scale_create */ +/* Reusing lv_obj_create for lv_menu_section_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_create_mpobj, 1, mp_lv_obj_create, lv_scale_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_section_create_mpobj, 1, mp_lv_obj_create, lv_menu_section_create); /* - * lvgl scale object definitions + * lvgl menu_section object definitions */ -static const mp_rom_map_elem_t scale_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_scale_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_total_tick_count), MP_ROM_PTR(&mp_lv_scale_set_total_tick_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_major_tick_every), MP_ROM_PTR(&mp_lv_scale_set_major_tick_every_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_label_show), MP_ROM_PTR(&mp_lv_scale_set_label_show_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_scale_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_scale_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_angle_range), MP_ROM_PTR(&mp_lv_scale_set_angle_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_scale_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_needle_value), MP_ROM_PTR(&mp_lv_scale_set_line_needle_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_needle_value), MP_ROM_PTR(&mp_lv_scale_set_image_needle_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_src), MP_ROM_PTR(&mp_lv_scale_set_text_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_post_draw), MP_ROM_PTR(&mp_lv_scale_set_post_draw_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_draw_ticks_on_top), MP_ROM_PTR(&mp_lv_scale_set_draw_ticks_on_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_section), MP_ROM_PTR(&mp_lv_scale_add_section_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_section_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_range), MP_ROM_PTR(&mp_lv_scale_set_section_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_min_value), MP_ROM_PTR(&mp_lv_scale_set_section_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_max_value), MP_ROM_PTR(&mp_lv_scale_set_section_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_section_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_style_main), MP_ROM_PTR(&mp_lv_scale_set_section_style_main_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_style_indicator), MP_ROM_PTR(&mp_lv_scale_set_section_style_indicator_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_section_style_items), MP_ROM_PTR(&mp_lv_scale_set_section_style_items_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_scale_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_total_tick_count), MP_ROM_PTR(&mp_lv_scale_get_total_tick_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_major_tick_every), MP_ROM_PTR(&mp_lv_scale_get_major_tick_every_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_scale_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label_show), MP_ROM_PTR(&mp_lv_scale_get_label_show_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_angle_range), MP_ROM_PTR(&mp_lv_scale_get_angle_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_range_min_value), MP_ROM_PTR(&mp_lv_scale_get_range_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_range_max_value), MP_ROM_PTR(&mp_lv_scale_get_range_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_section_min_value), MP_ROM_PTR(&mp_lv_scale_bind_section_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_section_max_value), MP_ROM_PTR(&mp_lv_scale_bind_section_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SCALE_MODE_type_base) } +static const mp_rom_map_elem_t menu_section_locals_dict_table[] = { + }; -static MP_DEFINE_CONST_DICT(scale_locals_dict, scale_locals_dict_table); +static MP_DEFINE_CONST_DICT(menu_section_locals_dict, menu_section_locals_dict_table); -static void scale_print(const mp_print_t *print, +static void menu_section_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl scale"); + mp_printf(print, "lvgl menu_section"); } -static mp_obj_t scale_make_new( +static mp_obj_t menu_section_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_scale_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_menu_section_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_scale_type_base, - MP_QSTR_scale, + mp_lv_menu_section_type_base, + MP_QSTR_menu_section, MP_TYPE_FLAG_NONE, - print, scale_print, - make_new, scale_make_new, + print, menu_section_print, + make_new, menu_section_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &scale_locals_dict + locals_dict, &menu_section_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_scale_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_section_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_scale_class, + .lv_obj_class = &lv_menu_section_class, #endif - .mp_obj_type = &mp_lv_scale_type_base, + .mp_obj_type = &mp_lv_menu_section_type_base, }; -/* Reusing lv_obj_scroll_to_x for lv_slider_set_value */ +/* Reusing lv_obj_create for lv_menu_separator_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_menu_separator_create_mpobj, 1, mp_lv_obj_create, lv_menu_separator_create); -/* Reusing lv_obj_scroll_to_x for lv_slider_set_start_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_start_value); +/* + * lvgl menu_separator object definitions + */ -/* Reusing lv_obj_set_pos for lv_slider_set_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_slider_set_range); +static const mp_rom_map_elem_t menu_separator_locals_dict_table[] = { -/* Reusing lv_obj_move_to_index for lv_slider_set_min_value */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_min_value); - -/* Reusing lv_obj_move_to_index for lv_slider_set_max_value */ +static MP_DEFINE_CONST_DICT(menu_separator_locals_dict, menu_separator_locals_dict_table); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_max_value); - +static void menu_separator_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl menu_separator"); +} -/* - * lvgl extension definition for: - * void lv_slider_set_mode(lv_obj_t *obj, lv_slider_mode_t mode) - */ -static mp_obj_t mp_lv_slider_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t menu_separator_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_slider_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_slider_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; + return make_new(&mp_lv_menu_separator_create_mpobj, type, n_args, n_kw, args); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_mode_mpobj, 2, mp_lv_slider_set_mode, lv_slider_set_mode); +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_menu_separator_type_base, + MP_QSTR_menu_separator, + MP_TYPE_FLAG_NONE, + print, menu_separator_print, + make_new, menu_separator_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &menu_separator_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_menu_separator_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_menu_separator_class, +#endif + .mp_obj_type = &mp_lv_menu_separator_type_base, +}; + +/* Reusing lv_list_add_text for lv_msgbox_add_title */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_title_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_title); /* * lvgl extension definition for: - * void lv_slider_set_orientation(lv_obj_t *obj, lv_slider_orientation_t orientation) + * lv_obj_t *lv_msgbox_add_header_button(lv_obj_t *obj, const void *icon) */ -static mp_obj_t mp_lv_slider_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_msgbox_add_header_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_slider_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_slider_orientation_t))lv_func_ptr)(obj, orientation); - return mp_const_none; + const void *icon = (const void *)mp_to_ptr(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *))lv_func_ptr)(obj, icon); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_orientation_mpobj, 2, mp_lv_slider_set_orientation, lv_slider_set_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_header_button_mpobj, 2, mp_lv_msgbox_add_header_button, lv_msgbox_add_header_button); -/* Reusing lv_obj_get_index for lv_slider_get_value */ +/* Reusing lv_list_add_text for lv_msgbox_add_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_text_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_text); -/* Reusing lv_obj_get_index for lv_slider_get_left_value */ +/* Reusing lv_list_add_text for lv_msgbox_add_footer_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_left_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_left_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_footer_button_mpobj, 2, mp_lv_list_add_text, lv_msgbox_add_footer_button); -/* Reusing lv_obj_get_index for lv_slider_get_min_value */ +/* Reusing lv_obj_create for lv_msgbox_add_close_button */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_add_close_button_mpobj, 1, mp_lv_obj_create, lv_msgbox_add_close_button); -/* Reusing lv_obj_get_index for lv_slider_get_max_value */ +/* Reusing lv_obj_create for lv_msgbox_get_header */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_header_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_header); -/* Reusing lv_obj_is_layout_positioned for lv_slider_is_dragged */ +/* Reusing lv_obj_create for lv_msgbox_get_footer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_dragged_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_slider_is_dragged); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_footer_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_footer); +/* Reusing lv_obj_create for lv_msgbox_get_content */ -/* - * lvgl extension definition for: - * lv_slider_mode_t lv_slider_get_mode(lv_obj_t *slider) - */ - -static mp_obj_t mp_lv_slider_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *slider = mp_to_lv(mp_args[0]); - lv_slider_mode_t _res = ((lv_slider_mode_t (*)(lv_obj_t *))lv_func_ptr)(slider); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_mode_mpobj, 1, mp_lv_slider_get_mode, lv_slider_get_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_content_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_content); +/* Reusing lv_obj_create for lv_msgbox_get_title */ -/* - * lvgl extension definition for: - * lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t *slider) - */ - -static mp_obj_t mp_lv_slider_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *slider = mp_to_lv(mp_args[0]); - lv_slider_orientation_t _res = ((lv_slider_orientation_t (*)(lv_obj_t *))lv_func_ptr)(slider); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_orientation_mpobj, 1, mp_lv_slider_get_orientation, lv_slider_get_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_get_title_mpobj, 1, mp_lv_obj_create, lv_msgbox_get_title); -/* Reusing lv_obj_refr_size for lv_slider_is_symmetrical */ +/* Reusing lv_obj_move_foreground for lv_msgbox_close */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_slider_is_symmetrical); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close); -/* Reusing lv_obj_bind_checked for lv_slider_bind_value */ +/* Reusing lv_obj_move_foreground for lv_msgbox_close_async */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_slider_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_close_async_mpobj, 1, mp_lv_obj_move_foreground, lv_msgbox_close_async); -/* Reusing lv_obj_create for lv_slider_create */ +/* Reusing lv_obj_create for lv_msgbox_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_create_mpobj, 1, mp_lv_obj_create, lv_slider_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_msgbox_create_mpobj, 1, mp_lv_obj_create, lv_msgbox_create); /* - * lvgl slider object definitions + * lvgl msgbox object definitions */ -static const mp_rom_map_elem_t slider_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_slider_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_slider_set_start_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_slider_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_slider_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_slider_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_slider_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_slider_set_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_slider_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_left_value), MP_ROM_PTR(&mp_lv_slider_get_left_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_slider_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_slider_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_dragged), MP_ROM_PTR(&mp_lv_slider_is_dragged_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_slider_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_slider_get_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_slider_is_symmetrical_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_slider_bind_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SLIDER_MODE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SLIDER_ORIENTATION_type_base) } +static const mp_rom_map_elem_t msgbox_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_msgbox_add_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_header_button), MP_ROM_PTR(&mp_lv_msgbox_add_header_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_msgbox_add_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_footer_button), MP_ROM_PTR(&mp_lv_msgbox_add_footer_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_close_button), MP_ROM_PTR(&mp_lv_msgbox_add_close_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_msgbox_get_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_footer), MP_ROM_PTR(&mp_lv_msgbox_get_footer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_msgbox_get_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_title), MP_ROM_PTR(&mp_lv_msgbox_get_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_msgbox_close_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close_async), MP_ROM_PTR(&mp_lv_msgbox_close_async_mpobj) } }; -static MP_DEFINE_CONST_DICT(slider_locals_dict, slider_locals_dict_table); +static MP_DEFINE_CONST_DICT(msgbox_locals_dict, msgbox_locals_dict_table); -static void slider_print(const mp_print_t *print, +static void msgbox_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl slider"); + mp_printf(print, "lvgl msgbox"); } -static mp_obj_t slider_make_new( +static mp_obj_t msgbox_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_slider_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_msgbox_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_slider_type_base, - MP_QSTR_slider, + mp_lv_msgbox_type_base, + MP_QSTR_msgbox, MP_TYPE_FLAG_NONE, - print, slider_print, - make_new, slider_make_new, + print, msgbox_print, + make_new, msgbox_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &slider_locals_dict + locals_dict, &msgbox_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_slider_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_msgbox_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_slider_class, + .lv_obj_class = &lv_msgbox_class, #endif - .mp_obj_type = &mp_lv_slider_type_base, + .mp_obj_type = &mp_lv_msgbox_type_base, }; +/* Reusing lv_obj_move_to_index for lv_qrcode_set_size */ -/* - * Struct lv_span_t - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_size_mpobj, 2, mp_lv_obj_move_to_index, lv_qrcode_set_size); + +/* Reusing lv_barcode_set_dark_color for lv_qrcode_set_dark_color */ -static inline const mp_obj_type_t *get_mp_lv_span_t_type(void); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_dark_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_qrcode_set_dark_color); + +/* Reusing lv_barcode_set_dark_color for lv_qrcode_set_light_color */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_t_type())); - return (lv_span_t*)self->data; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_light_color_mpobj, 2, mp_lv_barcode_set_dark_color, lv_qrcode_set_light_color); + -#define mp_write_lv_span_t(struct_obj) *((lv_span_t*)mp_write_ptr_lv_span_t(struct_obj)) +/* + * lvgl extension definition for: + * lv_result_t lv_qrcode_update(lv_obj_t *obj, const void *data, uint32_t data_len) + */ -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_t(void *field) +static mp_obj_t mp_lv_qrcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_span_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const void *data = (const void *)mp_to_ptr(mp_args[1]); + uint32_t data_len = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const void *, uint32_t))lv_func_ptr)(obj, data, data_len); + return mp_obj_new_int(_res); } -#define mp_read_lv_span_t(field) mp_read_ptr_lv_span_t(copy_buffer(&field, sizeof(lv_span_t))) -#define mp_read_byref_lv_span_t(field) mp_read_ptr_lv_span_t(&field) - -static void mp_lv_span_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_span_t *data = (lv_span_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_txt: dest[0] = convert_to_str((void*)data->txt); break; // converting from char *; - case MP_QSTR_style: dest[0] = mp_read_byref_lv_style_t(data->style); break; // converting from lv_style_t; - case MP_QSTR_static_flag: dest[0] = mp_obj_new_int_from_uint(data->static_flag); break; // converting from uint32_t; - case MP_QSTR_trailing_pos: dest[0] = mp_read_byref_lv_point_t(data->trailing_pos); break; // converting from lv_point_t; - case MP_QSTR_trailing_height: dest[0] = mp_obj_new_int(data->trailing_height); break; // converting from int32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_txt: data->txt = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_style: data->style = mp_write_lv_style_t(dest[1]); break; // converting to lv_style_t; - case MP_QSTR_static_flag: data->static_flag = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_trailing_pos: data->trailing_pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_trailing_height: data->trailing_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} + -static void mp_lv_span_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_span_t"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_update_mpobj, 3, mp_lv_qrcode_update, lv_qrcode_update); + +/* Reusing lv_arclabel_set_text for lv_qrcode_set_data */ -static const mp_obj_dict_t mp_lv_span_t_locals_dict; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_data_mpobj, 2, mp_lv_arclabel_set_text, lv_qrcode_set_data); + +/* Reusing lv_barcode_render for lv_qrcode_render */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_span_t_type, - MP_QSTR_lv_span_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_span_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_span_t_attr, - locals_dict, &mp_lv_span_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_render_mpobj, 1, mp_lv_barcode_render, lv_qrcode_render); + +/* Reusing lv_obj_set_hidden for lv_qrcode_set_quiet_zone */ -static inline const mp_obj_type_t *get_mp_lv_span_t_type(void) -{ - return &mp_lv_span_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_quiet_zone_mpobj, 2, mp_lv_obj_set_hidden, lv_qrcode_set_quiet_zone); /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_add_span(lv_obj_t *obj) + * void lv_qrcode_set_update_mode(lv_obj_t *obj, lv_qrcode_update_mode_t mode) */ -static mp_obj_t mp_lv_spangroup_add_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_qrcode_set_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_span_t((void*)_res); + lv_qrcode_update_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_qrcode_update_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_add_span_mpobj, 1, mp_lv_spangroup_add_span, lv_spangroup_add_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_update_mode_mpobj, 2, mp_lv_qrcode_set_update_mode, lv_qrcode_set_update_mode); /* * lvgl extension definition for: - * void lv_spangroup_delete_span(lv_obj_t *obj, lv_span_t *span) + * lv_qrcode_update_mode_t lv_qrcode_get_update_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_spangroup_delete_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_qrcode_get_update_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_span_t *))lv_func_ptr)(obj, span); - return mp_const_none; + lv_qrcode_update_mode_t _res = ((lv_qrcode_update_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_delete_span_mpobj, 2, mp_lv_spangroup_delete_span, lv_spangroup_delete_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_get_update_mode_mpobj, 1, mp_lv_qrcode_get_update_mode, lv_qrcode_get_update_mode); + +/* Reusing lv_obj_refr_size for lv_qrcode_is_render_valid */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_is_render_valid_mpobj, 1, mp_lv_obj_refr_size, lv_qrcode_is_render_valid); + +/* Reusing lv_obj_create for lv_qrcode_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_create_mpobj, 1, mp_lv_obj_create, lv_qrcode_create); /* - * lvgl extension definition for: - * void lv_spangroup_set_span_text(lv_obj_t *obj, lv_span_t *span, const char *text) + * lvgl qrcode object definitions */ + -static mp_obj_t mp_lv_spangroup_set_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static const mp_rom_map_elem_t qrcode_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_qrcode_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_qrcode_set_dark_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_qrcode_set_light_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_qrcode_update_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_data), MP_ROM_PTR(&mp_lv_qrcode_set_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_render), MP_ROM_PTR(&mp_lv_qrcode_render_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_quiet_zone), MP_ROM_PTR(&mp_lv_qrcode_set_quiet_zone_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_update_mode), MP_ROM_PTR(&mp_lv_qrcode_set_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_update_mode), MP_ROM_PTR(&mp_lv_qrcode_get_update_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_render_valid), MP_ROM_PTR(&mp_lv_qrcode_is_render_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_UPDATE_MODE), MP_ROM_PTR(&mp_lv_LV_QRCODE_UPDATE_MODE_type_base) } +}; + +static MP_DEFINE_CONST_DICT(qrcode_locals_dict, qrcode_locals_dict_table); + +static void qrcode_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - const char *text = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_func_ptr)(obj, span, text); - return mp_const_none; + mp_printf(print, "lvgl qrcode"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text); - -/* Reusing lv_spangroup_set_span_text for lv_spangroup_set_span_text_static */ +static mp_obj_t qrcode_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_qrcode_create_mpobj, type, n_args, n_kw, args); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_static_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text_static); + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_qrcode_type_base, + MP_QSTR_qrcode, + MP_TYPE_FLAG_NONE, + print, qrcode_print, + make_new, qrcode_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &qrcode_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_qrcode_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_qrcode_class, +#endif + .mp_obj_type = &mp_lv_qrcode_type_base, +}; /* * lvgl extension definition for: - * void lv_spangroup_set_span_style(lv_obj_t *obj, lv_span_t *span, const lv_style_t *style) + * void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode) */ -static mp_obj_t mp_lv_spangroup_set_span_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_roller_set_options(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_span_t *, const lv_style_t *))lv_func_ptr)(obj, span, style); + const char *options = (const char *)(char*)convert_from_str(mp_args[1]); + lv_roller_mode_t mode = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const char *, lv_roller_mode_t))lv_func_ptr)(obj, options, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_style_mpobj, 3, mp_lv_spangroup_set_span_style, lv_spangroup_set_span_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_options_mpobj, 3, mp_lv_roller_set_options, lv_roller_set_options); /* * lvgl extension definition for: - * void lv_spangroup_set_align(lv_obj_t *obj, lv_text_align_t align) + * void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim) */ -static mp_obj_t mp_lv_spangroup_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_roller_set_selected(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_text_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_text_align_t))lv_func_ptr)(obj, align); + uint32_t sel_opt = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_spangroup_set_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_mpobj, 3, mp_lv_roller_set_selected, lv_roller_set_selected); /* * lvgl extension definition for: - * void lv_spangroup_set_overflow(lv_obj_t *obj, lv_span_overflow_t overflow) + * bool lv_roller_set_selected_str(lv_obj_t *obj, const char *sel_opt, lv_anim_enable_t anim) */ -static mp_obj_t mp_lv_spangroup_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_roller_set_selected_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_span_overflow_t))lv_func_ptr)(obj, overflow); - return mp_const_none; + const char *sel_opt = (const char *)(char*)convert_from_str(mp_args[1]); + lv_anim_enable_t anim = mp_obj_is_true(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, const char *, lv_anim_enable_t))lv_func_ptr)(obj, sel_opt, anim); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_overflow_mpobj, 2, mp_lv_spangroup_set_overflow, lv_spangroup_set_overflow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_selected_str_mpobj, 3, mp_lv_roller_set_selected_str, lv_roller_set_selected_str); -/* Reusing lv_obj_move_to_index for lv_spangroup_set_indent */ +/* Reusing lv_obj_delete_delayed for lv_roller_set_visible_row_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_indent_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_indent); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_set_visible_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_roller_set_visible_row_count); +/* Reusing lv_obj_get_child_count for lv_roller_get_selected */ -/* - * lvgl extension definition for: - * void lv_spangroup_set_mode(lv_obj_t *obj, lv_span_mode_t mode) - */ - -static mp_obj_t mp_lv_spangroup_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_span_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_selected); + +/* Reusing lv_dropdown_get_selected_str for lv_roller_get_selected_str */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_selected_str_mpobj, 3, mp_lv_dropdown_get_selected_str, lv_roller_get_selected_str); + +/* Reusing lv_checkbox_get_text for lv_roller_get_options */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_mode_mpobj, 2, mp_lv_spangroup_set_mode, lv_spangroup_set_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_options_mpobj, 1, mp_lv_checkbox_get_text, lv_roller_get_options); -/* Reusing lv_obj_move_to_index for lv_spangroup_set_max_lines */ +/* Reusing lv_obj_get_child_count for lv_roller_get_option_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_max_lines_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_max_lines); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_count_mpobj, 1, mp_lv_obj_get_child_count, lv_roller_get_option_count); /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_get_child(const lv_obj_t *obj, int32_t id) + * lv_result_t lv_roller_get_option_str(const lv_obj_t *obj, uint32_t option, char *buf, uint32_t buf_size) */ -static mp_obj_t mp_lv_spangroup_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_roller_get_option_str(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t id = (int32_t)mp_obj_get_int(mp_args[1]); - lv_span_t * _res = ((lv_span_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, id); - return mp_read_ptr_lv_span_t((void*)_res); + uint32_t option = (uint32_t)mp_obj_get_int(mp_args[1]); + char *buf = (char*)convert_from_str(mp_args[2]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, uint32_t, char *, uint32_t))lv_func_ptr)(obj, option, buf, buf_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_child_mpobj, 2, mp_lv_spangroup_get_child, lv_spangroup_get_child); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_get_option_str_mpobj, 4, mp_lv_roller_get_option_str, lv_roller_get_option_str); -/* Reusing lv_obj_get_child_count for lv_spangroup_get_span_count */ +/* Reusing lv_obj_bind_checked for lv_roller_bind_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_count_mpobj, 1, mp_lv_obj_get_child_count, lv_spangroup_get_span_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_roller_bind_value); + +/* Reusing lv_obj_create for lv_roller_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_roller_create_mpobj, 1, mp_lv_obj_create, lv_roller_create); /* - * lvgl extension definition for: - * lv_text_align_t lv_spangroup_get_align(lv_obj_t *obj) + * lvgl roller object definitions */ + -static mp_obj_t mp_lv_spangroup_get_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static const mp_rom_map_elem_t roller_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_options), MP_ROM_PTR(&mp_lv_roller_set_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected), MP_ROM_PTR(&mp_lv_roller_set_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_str), MP_ROM_PTR(&mp_lv_roller_set_selected_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_visible_row_count), MP_ROM_PTR(&mp_lv_roller_set_visible_row_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected), MP_ROM_PTR(&mp_lv_roller_get_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_str), MP_ROM_PTR(&mp_lv_roller_get_selected_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_options), MP_ROM_PTR(&mp_lv_roller_get_options_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_count), MP_ROM_PTR(&mp_lv_roller_get_option_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_option_str), MP_ROM_PTR(&mp_lv_roller_get_option_str_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_roller_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_ROLLER_MODE_type_base) } +}; + +static MP_DEFINE_CONST_DICT(roller_locals_dict, roller_locals_dict_table); + +static void roller_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_text_align_t _res = ((lv_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + mp_printf(print, "lvgl roller"); } - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_align_mpobj, 1, mp_lv_spangroup_get_align, lv_spangroup_get_align); +static mp_obj_t roller_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_roller_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_roller_type_base, + MP_QSTR_roller, + MP_TYPE_FLAG_NONE, + print, roller_print, + make_new, roller_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &roller_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_roller_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_roller_class, +#endif + .mp_obj_type = &mp_lv_roller_type_base, +}; /* * lvgl extension definition for: - * lv_span_overflow_t lv_spangroup_get_overflow(lv_obj_t *obj) + * void lv_scale_set_mode(lv_obj_t *obj, lv_scale_mode_t mode) */ -static mp_obj_t mp_lv_spangroup_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_overflow_t _res = ((lv_span_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_scale_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scale_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_overflow_mpobj, 1, mp_lv_spangroup_get_overflow, lv_spangroup_get_overflow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_mode_mpobj, 2, mp_lv_scale_set_mode, lv_scale_set_mode); -/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_indent */ +/* Reusing lv_obj_delete_delayed for lv_scale_set_total_tick_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_indent_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_indent); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_total_tick_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_total_tick_count); +/* Reusing lv_obj_delete_delayed for lv_scale_set_major_tick_every */ -/* - * lvgl extension definition for: - * lv_span_mode_t lv_spangroup_get_mode(lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_major_tick_every_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_major_tick_every); + +/* Reusing lv_obj_set_hidden for lv_scale_set_label_show */ -static mp_obj_t mp_lv_spangroup_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_mode_t _res = ((lv_span_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_label_show_mpobj, 2, mp_lv_obj_set_hidden, lv_scale_set_label_show); + +/* Reusing lv_obj_set_pos for lv_scale_set_range */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_scale_set_range); + +/* Reusing lv_obj_move_to_index for lv_scale_set_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_mode_mpobj, 1, mp_lv_spangroup_get_mode, lv_spangroup_get_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_min_value); -/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_lines */ +/* Reusing lv_obj_move_to_index for lv_scale_set_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_lines_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_lines); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_max_value); -/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_line_height */ +/* Reusing lv_obj_delete_delayed for lv_scale_set_angle_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_line_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_line_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_angle_range_mpobj, 2, mp_lv_obj_delete_delayed, lv_scale_set_angle_range); + +/* Reusing lv_obj_move_to_index for lv_scale_set_rotation */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_rotation_mpobj, 2, mp_lv_obj_move_to_index, lv_scale_set_rotation); /* * lvgl extension definition for: - * uint32_t lv_spangroup_get_expand_width(lv_obj_t *obj, uint32_t max_width) + * void lv_scale_set_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, int32_t value) */ -static mp_obj_t mp_lv_spangroup_get_expand_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_line_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t max_width = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, max_width); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *needle_line = mp_to_lv(mp_args[1]); + int32_t needle_length = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, needle_line, needle_length, value); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_width_mpobj, 2, mp_lv_spangroup_get_expand_width, lv_spangroup_get_expand_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_line_needle_value_mpobj, 4, mp_lv_scale_set_line_needle_value, lv_scale_set_line_needle_value); /* * lvgl extension definition for: - * int32_t lv_spangroup_get_expand_height(lv_obj_t *obj, int32_t width) + * void lv_scale_set_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, int32_t value) */ -static mp_obj_t mp_lv_spangroup_get_expand_height(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_image_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, width); - return mp_obj_new_int(_res); + lv_obj_t *needle_img = mp_to_lv(mp_args[1]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, int32_t))lv_func_ptr)(obj, needle_img, value); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_height_mpobj, 2, mp_lv_spangroup_get_expand_height, lv_spangroup_get_expand_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_image_needle_value_mpobj, 3, mp_lv_scale_set_image_needle_value, lv_scale_set_image_needle_value); /* - * Struct lv_span_coords_t + * lvgl extension definition for: + * void lv_scale_set_text_src(lv_obj_t *obj, const char *txt_src[]) */ -static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void); +static mp_obj_t mp_lv_scale_set_text_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const char **txt_src = (const char **)mp_arr_to_char_ptr____(mp_args[1]); + ((void (*)(lv_obj_t *, const char *[]))lv_func_ptr)(obj, txt_src); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_coords_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_text_src_mpobj, 2, mp_lv_scale_set_text_src, lv_scale_set_text_src); + +/* Reusing lv_obj_set_hidden for lv_scale_set_post_draw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_post_draw_mpobj, 2, mp_lv_obj_set_hidden, lv_scale_set_post_draw); + +/* Reusing lv_obj_set_hidden for lv_scale_set_draw_ticks_on_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_draw_ticks_on_top_mpobj, 2, mp_lv_obj_set_hidden, lv_scale_set_draw_ticks_on_top); + + +/* + * Struct lv_scale_section_t + */ + +static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_scale_section_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_coords_t_type())); - return (lv_span_coords_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_scale_section_t_type())); + return (lv_scale_section_t*)self->data; } -#define mp_write_lv_span_coords_t(struct_obj) *((lv_span_coords_t*)mp_write_ptr_lv_span_coords_t(struct_obj)) +#define mp_write_lv_scale_section_t(struct_obj) *((lv_scale_section_t*)mp_write_ptr_lv_scale_section_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_coords_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_scale_section_t(void *field) { - return lv_to_mp_struct(get_mp_lv_span_coords_t_type(), field); + return lv_to_mp_struct(get_mp_lv_scale_section_t_type(), field); } -#define mp_read_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(copy_buffer(&field, sizeof(lv_span_coords_t))) -#define mp_read_byref_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(&field) +#define mp_read_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(copy_buffer(&field, sizeof(lv_scale_section_t))) +#define mp_read_byref_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(&field) -static void mp_lv_span_coords_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_scale_section_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_span_coords_t *data = (lv_span_coords_t*)self->data; + GENMPY_UNUSED lv_scale_section_t *data = (lv_scale_section_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_heading: dest[0] = mp_read_byref_lv_area_t(data->heading); break; // converting from lv_area_t; - case MP_QSTR_middle: dest[0] = mp_read_byref_lv_area_t(data->middle); break; // converting from lv_area_t; - case MP_QSTR_trailing: dest[0] = mp_read_byref_lv_area_t(data->trailing); break; // converting from lv_area_t; + case MP_QSTR_main_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->main_style); break; // converting from lv_style_t *; + case MP_QSTR_indicator_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->indicator_style); break; // converting from lv_style_t *; + case MP_QSTR_items_style: dest[0] = mp_read_ptr_lv_style_t((void*)data->items_style); break; // converting from lv_style_t *; + case MP_QSTR_range_min: dest[0] = mp_obj_new_int(data->range_min); break; // converting from int32_t; + case MP_QSTR_range_max: dest[0] = mp_obj_new_int(data->range_max); break; // converting from int32_t; + case MP_QSTR_first_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_in_section); break; // converting from uint32_t; + case MP_QSTR_last_tick_idx_in_section: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_in_section); break; // converting from uint32_t; + case MP_QSTR_first_tick_in_section_width: dest[0] = mp_obj_new_int(data->first_tick_in_section_width); break; // converting from int32_t; + case MP_QSTR_last_tick_in_section_width: dest[0] = mp_obj_new_int(data->last_tick_in_section_width); break; // converting from int32_t; + case MP_QSTR_first_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->first_tick_in_section); break; // converting from lv_point_t; + case MP_QSTR_last_tick_in_section: dest[0] = mp_read_byref_lv_point_t(data->last_tick_in_section); break; // converting from lv_point_t; + case MP_QSTR_first_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->first_tick_idx_is_major); break; // converting from uint32_t; + case MP_QSTR_last_tick_idx_is_major: dest[0] = mp_obj_new_int_from_uint(data->last_tick_idx_is_major); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -26305,9 +27770,19 @@ static void mp_lv_span_coords_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest // store attribute switch(attr) { - case MP_QSTR_heading: data->heading = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_middle: data->middle = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_trailing: data->trailing = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_main_style: data->main_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; + case MP_QSTR_indicator_style: data->indicator_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; + case MP_QSTR_items_style: data->items_style = (void*)mp_write_ptr_lv_style_t(dest[1]); break; // converting to lv_style_t *; + case MP_QSTR_range_min: data->range_min = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_range_max: data->range_max = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_first_tick_idx_in_section: data->first_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_tick_idx_in_section: data->last_tick_idx_in_section = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_first_tick_in_section_width: data->first_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_last_tick_in_section_width: data->last_tick_in_section_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_first_tick_in_section: data->first_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_tick_in_section: data->last_tick_in_section = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_first_tick_idx_is_major: data->first_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_tick_idx_is_major: data->last_tick_idx_is_major = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -26316,2991 +27791,4131 @@ static void mp_lv_span_coords_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest } } -static void mp_lv_span_coords_t_print(const mp_print_t *print, +static void mp_lv_scale_section_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_span_coords_t"); + mp_printf(print, "struct lv_scale_section_t"); } -static const mp_obj_dict_t mp_lv_span_coords_t_locals_dict; +static const mp_obj_dict_t mp_lv_scale_section_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_span_coords_t_type, - MP_QSTR_lv_span_coords_t, + mp_lv_scale_section_t_type, + MP_QSTR_lv_scale_section_t, MP_TYPE_FLAG_NONE, - print, mp_lv_span_coords_t_print, + print, mp_lv_scale_section_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_span_coords_t_attr, - locals_dict, &mp_lv_span_coords_t_locals_dict, + attr, mp_lv_scale_section_t_attr, + locals_dict, &mp_lv_scale_section_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_scale_section_t_type(void) { - return &mp_lv_span_coords_t_type; + return &mp_lv_scale_section_t_type; } /* * lvgl extension definition for: - * lv_span_coords_t lv_spangroup_get_span_coords(lv_obj_t *obj, const lv_span_t *span) + * lv_scale_section_t *lv_scale_add_section(lv_obj_t *obj) */ -static mp_obj_t mp_lv_spangroup_get_span_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_add_section(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_span_t *span = (const lv_span_t *)mp_write_ptr_lv_span_t(mp_args[1]); - lv_span_coords_t _res = ((lv_span_coords_t (*)(lv_obj_t *, const lv_span_t *))lv_func_ptr)(obj, span); - return mp_read_lv_span_coords_t(_res); + lv_scale_section_t * _res = ((lv_scale_section_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_scale_section_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_coords_mpobj, 2, mp_lv_spangroup_get_span_coords, lv_spangroup_get_span_coords); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_add_section_mpobj, 1, mp_lv_scale_add_section, lv_scale_add_section); /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_get_span_by_point(lv_obj_t *obj, const lv_point_t *point) + * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) */ -static mp_obj_t mp_lv_spangroup_get_span_by_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_section_set_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); - return mp_read_ptr_lv_span_t((void*)_res); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t max = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(section, min, max); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_by_point_mpobj, 2, mp_lv_spangroup_get_span_by_point, lv_spangroup_get_span_by_point); - -/* Reusing lv_obj_move_foreground for lv_spangroup_refresh */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_spangroup_refresh); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_range_mpobj, 3, mp_lv_scale_section_set_range, lv_scale_section_set_range); /* * lvgl extension definition for: - * lv_observer_t *lv_spangroup_bind_span_text(lv_obj_t *obj, lv_span_t *span, lv_subject_t *subject, const char *fmt) + * void lv_scale_set_section_range(lv_obj_t *scale, lv_scale_section_t *section, int32_t min, int32_t max) */ -static mp_obj_t mp_lv_spangroup_bind_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_scale_set_section_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); - const char *fmt = (const char *)(char*)convert_from_str(mp_args[3]); - lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_span_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, span, subject, fmt); - return mp_read_ptr_lv_observer_t((void*)_res); + lv_obj_t *scale = mp_to_lv(mp_args[0]); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t max = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t, int32_t))lv_func_ptr)(scale, section, min, max); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_bind_span_text_mpobj, 4, mp_lv_spangroup_bind_span_text, lv_spangroup_bind_span_text); - -/* Reusing lv_obj_create for lv_spangroup_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_create_mpobj, 1, mp_lv_obj_create, lv_spangroup_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_range_mpobj, 4, mp_lv_scale_set_section_range, lv_scale_set_section_range); /* - * lvgl spangroup object definitions + * lvgl extension definition for: + * void lv_scale_set_section_min_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t min) */ - - -static const mp_rom_map_elem_t spangroup_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_span), MP_ROM_PTR(&mp_lv_spangroup_add_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_span), MP_ROM_PTR(&mp_lv_spangroup_delete_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_span_text), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_span_text_static), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_span_style), MP_ROM_PTR(&mp_lv_spangroup_set_span_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_spangroup_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_spangroup_set_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_indent), MP_ROM_PTR(&mp_lv_spangroup_set_indent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_spangroup_set_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_lines), MP_ROM_PTR(&mp_lv_spangroup_set_max_lines_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_spangroup_get_child_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_span_count), MP_ROM_PTR(&mp_lv_spangroup_get_span_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_align), MP_ROM_PTR(&mp_lv_spangroup_get_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_spangroup_get_overflow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_indent), MP_ROM_PTR(&mp_lv_spangroup_get_indent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_spangroup_get_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_lines), MP_ROM_PTR(&mp_lv_spangroup_get_max_lines_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_line_height), MP_ROM_PTR(&mp_lv_spangroup_get_max_line_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_expand_width), MP_ROM_PTR(&mp_lv_spangroup_get_expand_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_expand_height), MP_ROM_PTR(&mp_lv_spangroup_get_expand_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_span_coords), MP_ROM_PTR(&mp_lv_spangroup_get_span_coords_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_span_by_point), MP_ROM_PTR(&mp_lv_spangroup_get_span_by_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_spangroup_refresh_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_span_text), MP_ROM_PTR(&mp_lv_spangroup_bind_span_text_mpobj) } -}; -static MP_DEFINE_CONST_DICT(spangroup_locals_dict, spangroup_locals_dict_table); - -static void spangroup_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl spangroup"); -} - - -static mp_obj_t spangroup_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_scale_set_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_spangroup_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *scale = mp_to_lv(mp_args[0]); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + int32_t min = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_func_ptr)(scale, section, min); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_spangroup_type_base, - MP_QSTR_spangroup, - MP_TYPE_FLAG_NONE, - print, spangroup_print, - make_new, spangroup_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &spangroup_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spangroup_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_spangroup_class, -#endif - .mp_obj_type = &mp_lv_spangroup_type_base, -}; - -/* Reusing lv_obj_delete_delayed for lv_textarea_add_char */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_char_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_add_char); - -/* Reusing lv_arclabel_set_text for lv_textarea_add_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_add_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_min_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_min_value); -/* Reusing lv_obj_move_foreground for lv_textarea_delete_char */ +/* Reusing lv_scale_set_section_min_value for lv_scale_set_section_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_max_value_mpobj, 3, mp_lv_scale_set_section_min_value, lv_scale_set_section_max_value); -/* Reusing lv_obj_move_foreground for lv_textarea_delete_char_forward */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_forward_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char_forward); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_text */ +/* + * lvgl extension definition for: + * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_text); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_placeholder_text */ +static mp_obj_t mp_lv_scale_section_set_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_t *section_part_style = mp_write_ptr_lv_style_t(mp_args[2]); + ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_func_ptr)(section, part, section_part_style); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_placeholder_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_placeholder_text); - -/* Reusing lv_obj_move_to_index for lv_textarea_set_cursor_pos */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_pos_mpobj, 2, mp_lv_obj_move_to_index, lv_textarea_set_cursor_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_section_set_style_mpobj, 3, mp_lv_scale_section_set_style, lv_scale_section_set_style); -/* Reusing lv_obj_set_radio_button for lv_textarea_set_cursor_click_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_click_pos_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_cursor_click_pos); - -/* Reusing lv_obj_set_radio_button for lv_textarea_set_password_mode */ +/* + * lvgl extension definition for: + * void lv_scale_set_section_style_main(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_mode_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_password_mode); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_password_bullet */ +static mp_obj_t mp_lv_scale_set_section_style_main(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *scale = mp_to_lv(mp_args[0]); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_func_ptr)(scale, section, style); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_bullet_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_password_bullet); - -/* Reusing lv_obj_set_radio_button for lv_textarea_set_one_line */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_one_line_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_one_line); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_main_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_main); -/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars */ +/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_indicator */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_indicator_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_indicator); -/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars_static */ +/* Reusing lv_scale_set_section_style_main for lv_scale_set_section_style_items */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_static_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars_static); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_set_section_style_items_mpobj, 3, mp_lv_scale_set_section_style_main, lv_scale_set_section_style_items); -/* Reusing lv_obj_delete_delayed for lv_textarea_set_max_length */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_max_length_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_max_length); - -/* Reusing lv_arclabel_set_text for lv_textarea_set_insert_replace */ +/* + * lvgl extension definition for: + * lv_scale_mode_t lv_scale_get_mode(lv_obj_t *obj) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_insert_replace_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_insert_replace); - -/* Reusing lv_obj_set_radio_button for lv_textarea_set_text_selection */ +static mp_obj_t mp_lv_scale_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scale_mode_t _res = ((lv_scale_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_selection_mpobj, 2, mp_lv_obj_set_radio_button, lv_textarea_set_text_selection); - -/* Reusing lv_obj_delete_delayed for lv_textarea_set_password_show_time */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_show_time_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_password_show_time); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_mode_mpobj, 1, mp_lv_scale_get_mode, lv_scale_get_mode); -/* Reusing lv_spangroup_set_align for lv_textarea_set_align */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_total_tick_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_textarea_set_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_total_tick_count_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_total_tick_count); -/* Reusing lv_checkbox_get_text for lv_textarea_get_text */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_major_tick_every */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_textarea_get_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_major_tick_every_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_major_tick_every); -/* Reusing lv_dropdown_get_text for lv_textarea_get_placeholder_text */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_placeholder_text_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_placeholder_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_rotation_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_rotation); -/* Reusing lv_obj_get_screen for lv_textarea_get_label */ +/* Reusing lv_obj_refr_size for lv_scale_get_label_show */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_label_mpobj, 1, mp_lv_obj_get_screen, lv_textarea_get_label); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_label_show_mpobj, 1, mp_lv_obj_refr_size, lv_scale_get_label_show); -/* Reusing lv_obj_get_child_count for lv_textarea_get_cursor_pos */ +/* Reusing lv_obj_get_event_count for lv_scale_get_angle_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_pos_mpobj, 1, mp_lv_obj_get_child_count, lv_textarea_get_cursor_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_angle_range_mpobj, 1, mp_lv_obj_get_event_count, lv_scale_get_angle_range); -/* Reusing lv_obj_refr_size for lv_textarea_get_cursor_click_pos */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_click_pos_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_cursor_click_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_min_value); -/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_password_mode */ +/* Reusing lv_obj_get_style_clamped_width for lv_scale_get_range_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_mode_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_password_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_get_range_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_scale_get_range_max_value); -/* Reusing lv_dropdown_get_text for lv_textarea_get_password_bullet */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_bullet_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_password_bullet); - -/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_one_line */ +/* + * lvgl extension definition for: + * lv_observer_t *lv_scale_bind_section_min_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_one_line_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_one_line); - -/* Reusing lv_dropdown_get_text for lv_textarea_get_accepted_chars */ +static mp_obj_t mp_lv_scale_bind_section_min_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(mp_args[1]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_func_ptr)(obj, section, subject); + return mp_read_ptr_lv_observer_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_accepted_chars_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_accepted_chars); - -/* Reusing lv_obj_get_event_count for lv_textarea_get_max_length */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_max_length_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_max_length); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_min_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_min_value); -/* Reusing lv_obj_is_layout_positioned for lv_textarea_text_is_selected */ +/* Reusing lv_scale_bind_section_min_value for lv_scale_bind_section_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_text_is_selected_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_text_is_selected); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_section_max_value_mpobj, 3, mp_lv_scale_bind_section_min_value, lv_scale_bind_section_max_value); -/* Reusing lv_obj_refr_size for lv_textarea_get_text_selection */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_selection_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_text_selection); - -/* Reusing lv_obj_get_event_count for lv_textarea_get_password_show_time */ +/* + * lvgl extension definition for: + * lv_observer_t *lv_scale_bind_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, lv_subject_t *subject) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_show_time_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_password_show_time); - -/* Reusing lv_obj_get_event_count for lv_textarea_get_current_char */ +static mp_obj_t mp_lv_scale_bind_line_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *needle_line = mp_to_lv(mp_args[1]); + int32_t needle_length = (int32_t)mp_obj_get_int(mp_args[2]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[3]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_obj_t *, int32_t, lv_subject_t *))lv_func_ptr)(obj, needle_line, needle_length, subject); + return mp_read_ptr_lv_observer_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_current_char_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_current_char); - -/* Reusing lv_obj_move_foreground for lv_textarea_clear_selection */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_clear_selection_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_clear_selection); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_line_needle_value_mpobj, 4, mp_lv_scale_bind_line_needle_value, lv_scale_bind_line_needle_value); -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_right_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_right); - -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_left */ +/* + * lvgl extension definition for: + * lv_observer_t *lv_scale_bind_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, lv_subject_t *subject) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_left_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_left); - -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_down */ +static mp_obj_t mp_lv_scale_bind_image_needle_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *needle_img = mp_to_lv(mp_args[1]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_obj_t *, lv_subject_t *))lv_func_ptr)(obj, needle_img, subject); + return mp_read_ptr_lv_observer_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_down_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_down); - -/* Reusing lv_obj_move_foreground for lv_textarea_cursor_up */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_up_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_up); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_bind_image_needle_value_mpobj, 3, mp_lv_scale_bind_image_needle_value, lv_scale_bind_image_needle_value); -/* Reusing lv_obj_create for lv_textarea_create */ +/* Reusing lv_obj_create for lv_scale_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_create_mpobj, 1, mp_lv_obj_create, lv_textarea_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_scale_create_mpobj, 1, mp_lv_obj_create, lv_scale_create); /* - * lvgl textarea object definitions + * lvgl scale object definitions */ -static const mp_rom_map_elem_t textarea_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_char), MP_ROM_PTR(&mp_lv_textarea_add_char_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_textarea_add_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_char), MP_ROM_PTR(&mp_lv_textarea_delete_char_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_char_forward), MP_ROM_PTR(&mp_lv_textarea_delete_char_forward_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_textarea_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_set_placeholder_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_click_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_password_mode), MP_ROM_PTR(&mp_lv_textarea_set_password_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_password_bullet), MP_ROM_PTR(&mp_lv_textarea_set_password_bullet_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_one_line), MP_ROM_PTR(&mp_lv_textarea_set_one_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_accepted_chars_static), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_length), MP_ROM_PTR(&mp_lv_textarea_set_max_length_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_insert_replace), MP_ROM_PTR(&mp_lv_textarea_set_insert_replace_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_selection), MP_ROM_PTR(&mp_lv_textarea_set_text_selection_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_password_show_time), MP_ROM_PTR(&mp_lv_textarea_set_password_show_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_textarea_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_textarea_get_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_get_placeholder_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label), MP_ROM_PTR(&mp_lv_textarea_get_label_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_click_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_password_mode), MP_ROM_PTR(&mp_lv_textarea_get_password_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_password_bullet), MP_ROM_PTR(&mp_lv_textarea_get_password_bullet_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_one_line), MP_ROM_PTR(&mp_lv_textarea_get_one_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_get_accepted_chars_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_length), MP_ROM_PTR(&mp_lv_textarea_get_max_length_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_is_selected), MP_ROM_PTR(&mp_lv_textarea_text_is_selected_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text_selection), MP_ROM_PTR(&mp_lv_textarea_get_text_selection_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_password_show_time), MP_ROM_PTR(&mp_lv_textarea_get_password_show_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_char), MP_ROM_PTR(&mp_lv_textarea_get_current_char_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_selection), MP_ROM_PTR(&mp_lv_textarea_clear_selection_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_right), MP_ROM_PTR(&mp_lv_textarea_cursor_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_left), MP_ROM_PTR(&mp_lv_textarea_cursor_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_down), MP_ROM_PTR(&mp_lv_textarea_cursor_down_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cursor_up), MP_ROM_PTR(&mp_lv_textarea_cursor_up_mpobj) } +static const mp_rom_map_elem_t scale_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_scale_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_total_tick_count), MP_ROM_PTR(&mp_lv_scale_set_total_tick_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_major_tick_every), MP_ROM_PTR(&mp_lv_scale_set_major_tick_every_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_label_show), MP_ROM_PTR(&mp_lv_scale_set_label_show_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_scale_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_scale_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_angle_range), MP_ROM_PTR(&mp_lv_scale_set_angle_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_scale_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_needle_value), MP_ROM_PTR(&mp_lv_scale_set_line_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_needle_value), MP_ROM_PTR(&mp_lv_scale_set_image_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_src), MP_ROM_PTR(&mp_lv_scale_set_text_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_post_draw), MP_ROM_PTR(&mp_lv_scale_set_post_draw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_ticks_on_top), MP_ROM_PTR(&mp_lv_scale_set_draw_ticks_on_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_section), MP_ROM_PTR(&mp_lv_scale_add_section_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_section_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_range), MP_ROM_PTR(&mp_lv_scale_set_section_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_min_value), MP_ROM_PTR(&mp_lv_scale_set_section_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_max_value), MP_ROM_PTR(&mp_lv_scale_set_section_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_section_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_style_main), MP_ROM_PTR(&mp_lv_scale_set_section_style_main_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_style_indicator), MP_ROM_PTR(&mp_lv_scale_set_section_style_indicator_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_section_style_items), MP_ROM_PTR(&mp_lv_scale_set_section_style_items_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_scale_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_total_tick_count), MP_ROM_PTR(&mp_lv_scale_get_total_tick_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_major_tick_every), MP_ROM_PTR(&mp_lv_scale_get_major_tick_every_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_scale_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label_show), MP_ROM_PTR(&mp_lv_scale_get_label_show_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_angle_range), MP_ROM_PTR(&mp_lv_scale_get_angle_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_range_min_value), MP_ROM_PTR(&mp_lv_scale_get_range_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_range_max_value), MP_ROM_PTR(&mp_lv_scale_get_range_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_section_min_value), MP_ROM_PTR(&mp_lv_scale_bind_section_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_section_max_value), MP_ROM_PTR(&mp_lv_scale_bind_section_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_line_needle_value), MP_ROM_PTR(&mp_lv_scale_bind_line_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_image_needle_value), MP_ROM_PTR(&mp_lv_scale_bind_image_needle_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SCALE_MODE_type_base) } }; -static MP_DEFINE_CONST_DICT(textarea_locals_dict, textarea_locals_dict_table); +static MP_DEFINE_CONST_DICT(scale_locals_dict, scale_locals_dict_table); -static void textarea_print(const mp_print_t *print, +static void scale_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl textarea"); + mp_printf(print, "lvgl scale"); } -static mp_obj_t textarea_make_new( +static mp_obj_t scale_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_textarea_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_scale_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_textarea_type_base, - MP_QSTR_textarea, + mp_lv_scale_type_base, + MP_QSTR_scale, MP_TYPE_FLAG_NONE, - print, textarea_print, - make_new, textarea_make_new, + print, scale_print, + make_new, scale_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &textarea_locals_dict + locals_dict, &scale_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_textarea_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_scale_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_textarea_class, + .lv_obj_class = &lv_scale_class, #endif - .mp_obj_type = &mp_lv_textarea_type_base, + .mp_obj_type = &mp_lv_scale_type_base, }; -/* Reusing lv_obj_move_to_index for lv_spinbox_set_value */ +/* Reusing lv_obj_scroll_to_x for lv_slider_set_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_value); -/* Reusing lv_obj_set_radio_button for lv_spinbox_set_rollover */ +/* Reusing lv_obj_scroll_to_x for lv_slider_set_start_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_rollover_mpobj, 2, mp_lv_obj_set_radio_button, lv_spinbox_set_rollover); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_start_value_mpobj, 3, mp_lv_obj_scroll_to_x, lv_slider_set_start_value); -/* Reusing lv_obj_fade_in for lv_spinbox_set_digit_format */ +/* Reusing lv_obj_set_pos for lv_slider_set_range */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_format_mpobj, 3, mp_lv_obj_fade_in, lv_spinbox_set_digit_format); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_slider_set_range); -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_digit_count */ +/* Reusing lv_obj_move_to_index for lv_slider_set_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_digit_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_min_value); -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_dec_point_pos */ +/* Reusing lv_obj_move_to_index for lv_slider_set_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_dec_point_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_dec_point_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_slider_set_max_value); -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_step */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_step_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_step); - -/* Reusing lv_obj_set_pos for lv_spinbox_set_range */ +/* + * lvgl extension definition for: + * void lv_slider_set_mode(lv_obj_t *obj, lv_slider_mode_t mode) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_spinbox_set_range); - -/* Reusing lv_obj_move_to_index for lv_spinbox_set_min_value */ +static mp_obj_t mp_lv_slider_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_slider_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_slider_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_min_value); - -/* Reusing lv_obj_move_to_index for lv_spinbox_set_max_value */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_mode_mpobj, 2, mp_lv_slider_set_mode, lv_slider_set_mode); -/* Reusing lv_obj_delete_delayed for lv_spinbox_set_cursor_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_cursor_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_cursor_pos); - -/* Reusing lv_obj_set_scroll_dir for lv_spinbox_set_digit_step_direction */ +/* + * lvgl extension definition for: + * void lv_slider_set_orientation(lv_obj_t *obj, lv_slider_orientation_t orientation) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_step_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_spinbox_set_digit_step_direction); - -/* Reusing lv_obj_refr_size for lv_spinbox_get_rollover */ +static mp_obj_t mp_lv_slider_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_slider_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_slider_orientation_t))lv_func_ptr)(obj, orientation); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_rollover_mpobj, 1, mp_lv_obj_refr_size, lv_spinbox_get_rollover); - -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_value */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_set_orientation_mpobj, 2, mp_lv_slider_set_orientation, lv_slider_set_orientation); -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_step */ +/* Reusing lv_obj_get_index for lv_slider_get_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_step_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_step); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_value); -/* Reusing lv_obj_get_event_count for lv_spinbox_get_digit_count */ +/* Reusing lv_obj_get_index for lv_slider_get_left_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_count_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_digit_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_left_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_left_value); -/* Reusing lv_obj_get_event_count for lv_spinbox_get_dec_point_pos */ +/* Reusing lv_obj_get_index for lv_slider_get_min_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_dec_point_pos_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_dec_point_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_min_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_min_value); -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_min_value */ +/* Reusing lv_obj_get_index for lv_slider_get_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_min_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_max_value_mpobj, 1, mp_lv_obj_get_index, lv_slider_get_max_value); -/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_max_value */ +/* Reusing lv_obj_is_layout_positioned for lv_slider_is_dragged */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_max_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_dragged_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_slider_is_dragged); /* * lvgl extension definition for: - * lv_dir_t lv_spinbox_get_digit_step_direction(lv_obj_t *obj) + * lv_slider_mode_t lv_slider_get_mode(lv_obj_t *slider) */ -static mp_obj_t mp_lv_spinbox_get_digit_step_direction(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_slider_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(lv_obj_t *))lv_func_ptr)(obj); + lv_obj_t *slider = mp_to_lv(mp_args[0]); + lv_slider_mode_t _res = ((lv_slider_mode_t (*)(lv_obj_t *))lv_func_ptr)(slider); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_step_direction_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_spinbox_get_digit_step_direction); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_mode_mpobj, 1, mp_lv_slider_get_mode, lv_slider_get_mode); -/* Reusing lv_obj_move_foreground for lv_spinbox_step_next */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_next_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_next); - -/* Reusing lv_obj_move_foreground for lv_spinbox_step_prev */ +/* + * lvgl extension definition for: + * lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t *obj) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_prev_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_prev); - -/* Reusing lv_obj_move_foreground for lv_spinbox_increment */ +static mp_obj_t mp_lv_slider_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_slider_orientation_t _res = ((lv_slider_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_increment_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_increment); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_get_orientation_mpobj, 1, mp_lv_slider_get_orientation, lv_slider_get_orientation); -/* Reusing lv_obj_move_foreground for lv_spinbox_decrement */ +/* Reusing lv_obj_refr_size for lv_slider_is_symmetrical */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_decrement_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_decrement); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_is_symmetrical_mpobj, 1, mp_lv_obj_refr_size, lv_slider_is_symmetrical); -/* Reusing lv_obj_bind_checked for lv_spinbox_bind_value */ +/* Reusing lv_obj_bind_checked for lv_slider_bind_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_spinbox_bind_value); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_slider_bind_value); -/* Reusing lv_obj_create for lv_spinbox_create */ +/* Reusing lv_obj_create for lv_slider_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_create_mpobj, 1, mp_lv_obj_create, lv_spinbox_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_slider_create_mpobj, 1, mp_lv_obj_create, lv_slider_create); /* - * lvgl spinbox object definitions + * lvgl slider object definitions */ -static const mp_rom_map_elem_t spinbox_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_spinbox_set_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rollover), MP_ROM_PTR(&mp_lv_spinbox_set_rollover_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_digit_format), MP_ROM_PTR(&mp_lv_spinbox_set_digit_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_digit_count), MP_ROM_PTR(&mp_lv_spinbox_set_digit_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_set_dec_point_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_step), MP_ROM_PTR(&mp_lv_spinbox_set_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_spinbox_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_spinbox_set_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_spinbox_set_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_spinbox_set_cursor_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_set_digit_step_direction_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rollover), MP_ROM_PTR(&mp_lv_spinbox_get_rollover_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_spinbox_get_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_step), MP_ROM_PTR(&mp_lv_spinbox_get_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_digit_count), MP_ROM_PTR(&mp_lv_spinbox_get_digit_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_get_dec_point_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_spinbox_get_min_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_spinbox_get_max_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_get_digit_step_direction_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_step_next), MP_ROM_PTR(&mp_lv_spinbox_step_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_step_prev), MP_ROM_PTR(&mp_lv_spinbox_step_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_increment), MP_ROM_PTR(&mp_lv_spinbox_increment_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_decrement), MP_ROM_PTR(&mp_lv_spinbox_decrement_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_spinbox_bind_value_mpobj) } +static const mp_rom_map_elem_t slider_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_slider_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_value), MP_ROM_PTR(&mp_lv_slider_set_start_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_slider_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_slider_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_slider_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_slider_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_slider_set_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_slider_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_left_value), MP_ROM_PTR(&mp_lv_slider_get_left_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_slider_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_slider_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_dragged), MP_ROM_PTR(&mp_lv_slider_is_dragged_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_slider_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_slider_get_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_symmetrical), MP_ROM_PTR(&mp_lv_slider_is_symmetrical_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_slider_bind_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&mp_lv_LV_SLIDER_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SLIDER_ORIENTATION_type_base) } }; -static MP_DEFINE_CONST_DICT(spinbox_locals_dict, spinbox_locals_dict_table); +static MP_DEFINE_CONST_DICT(slider_locals_dict, slider_locals_dict_table); -static void spinbox_print(const mp_print_t *print, +static void slider_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl spinbox"); + mp_printf(print, "lvgl slider"); } -static mp_obj_t spinbox_make_new( +static mp_obj_t slider_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_spinbox_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_slider_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_spinbox_type_base, - MP_QSTR_spinbox, + mp_lv_slider_type_base, + MP_QSTR_slider, MP_TYPE_FLAG_NONE, - print, spinbox_print, - make_new, spinbox_make_new, + print, slider_print, + make_new, slider_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &spinbox_locals_dict + locals_dict, &slider_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinbox_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_slider_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_spinbox_class, + .lv_obj_class = &lv_slider_class, #endif - .mp_obj_type = &mp_lv_spinbox_type_base, + .mp_obj_type = &mp_lv_slider_type_base, }; -/* Reusing lv_obj_fade_in for lv_spinner_set_anim_params */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_params_mpobj, 3, mp_lv_obj_fade_in, lv_spinner_set_anim_params); - -/* Reusing lv_obj_delete_delayed for lv_spinner_set_anim_duration */ +/* + * Struct lv_span_t + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_anim_duration); - -/* Reusing lv_obj_delete_delayed for lv_spinner_set_arc_sweep */ +static inline const mp_obj_type_t *get_mp_lv_span_t_type(void); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_arc_sweep_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_arc_sweep); - -/* Reusing lv_obj_get_event_count for lv_spinner_get_anim_duration */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_t_type())); + return (lv_span_t*)self->data; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_anim_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_anim_duration); - -/* Reusing lv_obj_get_event_count for lv_spinner_get_arc_sweep */ +#define mp_write_lv_span_t(struct_obj) *((lv_span_t*)mp_write_ptr_lv_span_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_arc_sweep_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_arc_sweep); - -/* Reusing lv_obj_create for lv_spinner_create */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_span_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_create_mpobj, 1, mp_lv_obj_create, lv_spinner_create); - +#define mp_read_lv_span_t(field) mp_read_ptr_lv_span_t(copy_buffer(&field, sizeof(lv_span_t))) +#define mp_read_byref_lv_span_t(field) mp_read_ptr_lv_span_t(&field) -/* - * lvgl spinner object definitions - */ - +static void mp_lv_span_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_span_t *data = (lv_span_t*)self->data; -static const mp_rom_map_elem_t spinner_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_anim_params), MP_ROM_PTR(&mp_lv_spinner_set_anim_params_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_spinner_set_anim_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_set_arc_sweep_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_anim_duration), MP_ROM_PTR(&mp_lv_spinner_get_anim_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_get_arc_sweep_mpobj) } -}; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_txt: dest[0] = convert_to_str((void*)data->txt); break; // converting from char *; + case MP_QSTR_style: dest[0] = mp_read_byref_lv_style_t(data->style); break; // converting from lv_style_t; + case MP_QSTR_static_flag: dest[0] = mp_obj_new_int_from_uint(data->static_flag); break; // converting from uint32_t; + case MP_QSTR_trailing_pos: dest[0] = mp_read_byref_lv_point_t(data->trailing_pos); break; // converting from lv_point_t; + case MP_QSTR_trailing_height: dest[0] = mp_obj_new_int(data->trailing_height); break; // converting from int32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_txt: data->txt = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_style: data->style = mp_write_lv_style_t(dest[1]); break; // converting to lv_style_t; + case MP_QSTR_static_flag: data->static_flag = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_trailing_pos: data->trailing_pos = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_trailing_height: data->trailing_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + default: return; + } -static MP_DEFINE_CONST_DICT(spinner_locals_dict, spinner_locals_dict_table); + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static void spinner_print(const mp_print_t *print, +static void mp_lv_span_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl spinner"); -} - - -static mp_obj_t spinner_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_spinner_create_mpobj, type, n_args, n_kw, args); + mp_printf(print, "struct lv_span_t"); } +static const mp_obj_dict_t mp_lv_span_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_spinner_type_base, - MP_QSTR_spinner, + mp_lv_span_t_type, + MP_QSTR_lv_span_t, MP_TYPE_FLAG_NONE, - print, spinner_print, - make_new, spinner_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &spinner_locals_dict + print, mp_lv_span_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_span_t_attr, + locals_dict, &mp_lv_span_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinner_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_spinner_class, -#endif - .mp_obj_type = &mp_lv_spinner_type_base, -}; +static inline const mp_obj_type_t *get_mp_lv_span_t_type(void) +{ + return &mp_lv_span_t_type; +} /* * lvgl extension definition for: - * void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation) + * lv_span_t *lv_spangroup_add_span(lv_obj_t *obj) */ -static mp_obj_t mp_lv_switch_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_add_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_switch_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_switch_orientation_t))lv_func_ptr)(obj, orientation); - return mp_const_none; + lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_span_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_set_orientation_mpobj, 2, mp_lv_switch_set_orientation, lv_switch_set_orientation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_add_span_mpobj, 1, mp_lv_spangroup_add_span, lv_spangroup_add_span); /* * lvgl extension definition for: - * lv_switch_orientation_t lv_switch_get_orientation(lv_obj_t *obj) + * void lv_spangroup_delete_span(lv_obj_t *obj, lv_span_t *span) */ -static mp_obj_t mp_lv_switch_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_delete_span(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_switch_orientation_t _res = ((lv_switch_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_span_t *))lv_func_ptr)(obj, span); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_get_orientation_mpobj, 1, mp_lv_switch_get_orientation, lv_switch_get_orientation); - -/* Reusing lv_obj_create for lv_switch_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_create_mpobj, 1, mp_lv_obj_create, lv_switch_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_delete_span_mpobj, 2, mp_lv_spangroup_delete_span, lv_spangroup_delete_span); /* - * lvgl switch object definitions + * lvgl extension definition for: + * void lv_spangroup_set_span_text(lv_obj_t *obj, lv_span_t *span, const char *text) */ - - -static const mp_rom_map_elem_t switch_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_switch_set_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_switch_get_orientation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SWITCH_ORIENTATION_type_base) } -}; - -static MP_DEFINE_CONST_DICT(switch_locals_dict, switch_locals_dict_table); - -static void switch_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl switch"); -} - -static mp_obj_t switch_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +static mp_obj_t mp_lv_spangroup_set_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return make_new(&mp_lv_switch_create_mpobj, type, n_args, n_kw, args); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + const char *text = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_func_ptr)(obj, span, text); + return mp_const_none; } + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_switch_type_base, - MP_QSTR_switch, - MP_TYPE_FLAG_NONE, - print, switch_print, - make_new, switch_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &switch_locals_dict -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text); + +/* Reusing lv_spangroup_set_span_text for lv_spangroup_set_span_text_static */ -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_switch_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_switch_class, -#endif - .mp_obj_type = &mp_lv_switch_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_text_static_mpobj, 3, mp_lv_spangroup_set_span_text, lv_spangroup_set_span_text_static); /* * lvgl extension definition for: - * void lv_table_set_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col, const char *txt) + * void lv_spangroup_set_span_style(lv_obj_t *obj, lv_span_t *span, const lv_style_t *style) */ -static mp_obj_t mp_lv_table_set_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_span_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, const char *))lv_func_ptr)(obj, row, col, txt); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_span_t *, const lv_style_t *))lv_func_ptr)(obj, span, style); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_value_mpobj, 4, mp_lv_table_set_cell_value, lv_table_set_cell_value); - -/* Reusing lv_obj_delete_delayed for lv_table_set_row_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_row_count); - -/* Reusing lv_obj_delete_delayed for lv_table_set_column_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_column_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_span_style_mpobj, 3, mp_lv_spangroup_set_span_style, lv_spangroup_set_span_style); /* * lvgl extension definition for: - * void lv_table_set_column_width(lv_obj_t *obj, uint32_t col_id, int32_t w) + * void lv_spangroup_set_align(lv_obj_t *obj, lv_text_align_t align) */ -static mp_obj_t mp_lv_table_set_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, int32_t))lv_func_ptr)(obj, col_id, w); + lv_text_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_text_align_t))lv_func_ptr)(obj, align); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_width_mpobj, 3, mp_lv_table_set_column_width, lv_table_set_column_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_spangroup_set_align); /* * lvgl extension definition for: - * void lv_table_set_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) + * void lv_spangroup_set_overflow(lv_obj_t *obj, lv_span_overflow_t overflow) */ -static mp_obj_t mp_lv_table_set_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); + lv_span_overflow_t overflow = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_span_overflow_t))lv_func_ptr)(obj, overflow); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_set_cell_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_overflow_mpobj, 2, mp_lv_spangroup_set_overflow, lv_spangroup_set_overflow); -/* Reusing lv_table_set_cell_ctrl for lv_table_clear_cell_ctrl */ +/* Reusing lv_obj_move_to_index for lv_spangroup_set_indent */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_clear_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_clear_cell_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_indent_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_indent); /* * lvgl extension definition for: - * void lv_table_set_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col, void *user_data) + * void lv_spangroup_set_mode(lv_obj_t *obj, lv_span_mode_t mode) */ -static mp_obj_t mp_lv_table_set_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_set_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); - uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); lv_obj_t *obj = mp_to_lv(mp_args[0]); - ((void (*)(lv_obj_t *, uint16_t, uint16_t, void *))lv_func_ptr)(obj, row, col, user_data); + lv_span_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_span_mode_t))lv_func_ptr)(obj, mode); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_user_data_mpobj, 4, mp_lv_table_set_cell_user_data, lv_table_set_cell_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_mode_mpobj, 2, mp_lv_spangroup_set_mode, lv_spangroup_set_mode); + +/* Reusing lv_obj_move_to_index for lv_spangroup_set_max_lines */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_set_max_lines_mpobj, 2, mp_lv_obj_move_to_index, lv_spangroup_set_max_lines); /* * lvgl extension definition for: - * void lv_table_set_selected_cell(lv_obj_t *obj, uint16_t row, uint16_t col) + * lv_span_t *lv_spangroup_get_child(const lv_obj_t *obj, int32_t id) */ -static mp_obj_t mp_lv_table_set_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); - uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t id = (int32_t)mp_obj_get_int(mp_args[1]); + lv_span_t * _res = ((lv_span_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, id); + return mp_read_ptr_lv_span_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_selected_cell_mpobj, 3, mp_lv_table_set_selected_cell, lv_table_set_selected_cell); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_child_mpobj, 2, mp_lv_spangroup_get_child, lv_spangroup_get_child); + +/* Reusing lv_obj_get_child_count for lv_spangroup_get_span_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_count_mpobj, 1, mp_lv_obj_get_child_count, lv_spangroup_get_span_count); /* * lvgl extension definition for: - * const char *lv_table_get_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col) + * lv_text_align_t lv_spangroup_get_align(lv_obj_t *obj) */ -static mp_obj_t mp_lv_table_get_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - const char * _res = ((const char *(*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, row, col); - return convert_to_str((void*)_res); + lv_text_align_t _res = ((lv_text_align_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_value_mpobj, 3, mp_lv_table_get_cell_value, lv_table_get_cell_value); - -/* Reusing lv_obj_get_event_count for lv_table_get_row_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_row_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_row_count); - -/* Reusing lv_obj_get_event_count for lv_table_get_column_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_column_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_align_mpobj, 1, mp_lv_spangroup_get_align, lv_spangroup_get_align); /* * lvgl extension definition for: - * int32_t lv_table_get_column_width(lv_obj_t *obj, uint32_t col) + * lv_span_overflow_t lv_spangroup_get_overflow(lv_obj_t *obj) */ -static mp_obj_t mp_lv_table_get_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_overflow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, col); + lv_span_overflow_t _res = ((lv_span_overflow_t (*)(lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_width_mpobj, 2, mp_lv_table_get_column_width, lv_table_get_column_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_overflow_mpobj, 1, mp_lv_spangroup_get_overflow, lv_spangroup_get_overflow); + +/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_indent */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_indent_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_indent); /* * lvgl extension definition for: - * bool lv_table_has_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) + * lv_span_mode_t lv_spangroup_get_mode(lv_obj_t *obj) */ -static mp_obj_t mp_lv_table_has_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); - return convert_to_bool(_res); + lv_span_mode_t _res = ((lv_span_mode_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_has_cell_ctrl_mpobj, 4, mp_lv_table_has_cell_ctrl, lv_table_has_cell_ctrl); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_mode_mpobj, 1, mp_lv_spangroup_get_mode, lv_spangroup_get_mode); + +/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_lines */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_lines_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_lines); + +/* Reusing lv_obj_get_style_clamped_width for lv_spangroup_get_max_line_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_max_line_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spangroup_get_max_line_height); /* * lvgl extension definition for: - * void lv_table_get_selected_cell(lv_obj_t *obj, uint32_t *row, uint32_t *col) + * uint32_t lv_spangroup_get_expand_width(lv_obj_t *obj, uint32_t max_width) */ -static mp_obj_t mp_lv_table_get_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_expand_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t *row = mp_array_to_u32ptr(mp_args[1]); - uint32_t *col = mp_array_to_u32ptr(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t *, uint32_t *))lv_func_ptr)(obj, row, col); - return mp_const_none; + uint32_t max_width = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, max_width); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_selected_cell_mpobj, 3, mp_lv_table_get_selected_cell, lv_table_get_selected_cell); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_width_mpobj, 2, mp_lv_spangroup_get_expand_width, lv_spangroup_get_expand_width); /* * lvgl extension definition for: - * void *lv_table_get_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col) + * int32_t lv_spangroup_get_expand_height(lv_obj_t *obj, int32_t width) */ -static mp_obj_t mp_lv_table_get_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_expand_height(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); - uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); - return ptr_to_mp((void*)_res); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, width); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_user_data_mpobj, 3, mp_lv_table_get_cell_user_data, lv_table_get_cell_user_data); - -/* Reusing lv_obj_create for lv_table_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_create_mpobj, 1, mp_lv_obj_create, lv_table_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_expand_height_mpobj, 2, mp_lv_spangroup_get_expand_height, lv_spangroup_get_expand_height); /* - * lvgl table object definitions + * Struct lv_span_coords_t */ - - -static const mp_rom_map_elem_t table_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_cell_value), MP_ROM_PTR(&mp_lv_table_set_cell_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_row_count), MP_ROM_PTR(&mp_lv_table_set_row_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_column_count), MP_ROM_PTR(&mp_lv_table_set_column_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_column_width), MP_ROM_PTR(&mp_lv_table_set_column_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cell_ctrl), MP_ROM_PTR(&mp_lv_table_set_cell_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_cell_ctrl), MP_ROM_PTR(&mp_lv_table_clear_cell_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cell_user_data), MP_ROM_PTR(&mp_lv_table_set_cell_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_selected_cell), MP_ROM_PTR(&mp_lv_table_set_selected_cell_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cell_value), MP_ROM_PTR(&mp_lv_table_get_cell_value_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_row_count), MP_ROM_PTR(&mp_lv_table_get_row_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_column_count), MP_ROM_PTR(&mp_lv_table_get_column_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_column_width), MP_ROM_PTR(&mp_lv_table_get_column_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_cell_ctrl), MP_ROM_PTR(&mp_lv_table_has_cell_ctrl_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_selected_cell), MP_ROM_PTR(&mp_lv_table_get_selected_cell_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cell_user_data), MP_ROM_PTR(&mp_lv_table_get_cell_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_CELL_CTRL), MP_ROM_PTR(&mp_lv_LV_TABLE_CELL_CTRL_type_base) } -}; -static MP_DEFINE_CONST_DICT(table_locals_dict, table_locals_dict_table); +static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void); -static void table_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_span_coords_t(mp_obj_t self_in) { - mp_printf(print, "lvgl table"); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_span_coords_t_type())); + return (lv_span_coords_t*)self->data; } +#define mp_write_lv_span_coords_t(struct_obj) *((lv_span_coords_t*)mp_write_ptr_lv_span_coords_t(struct_obj)) -static mp_obj_t table_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_span_coords_t(void *field) { - return make_new(&mp_lv_table_create_mpobj, type, n_args, n_kw, args); + return lv_to_mp_struct(get_mp_lv_span_coords_t_type(), field); } +#define mp_read_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(copy_buffer(&field, sizeof(lv_span_coords_t))) +#define mp_read_byref_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(&field) -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_table_type_base, - MP_QSTR_table, - MP_TYPE_FLAG_NONE, - print, table_print, - make_new, table_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &table_locals_dict -); - -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_table_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_table_class, -#endif - .mp_obj_type = &mp_lv_table_type_base, -}; - -/* Reusing lv_list_add_text for lv_tabview_add_tab */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_add_tab_mpobj, 2, mp_lv_list_add_text, lv_tabview_add_tab); - -/* Reusing lv_label_ins_text for lv_tabview_set_tab_text */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_text_mpobj, 3, mp_lv_label_ins_text, lv_tabview_set_tab_text); - -/* Reusing lv_roller_set_selected for lv_tabview_set_active */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_active_mpobj, 3, mp_lv_roller_set_selected, lv_tabview_set_active); - -/* Reusing lv_obj_set_scroll_dir for lv_tabview_set_tab_bar_position */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_position_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_tabview_set_tab_bar_position); - -/* Reusing lv_obj_move_to_index for lv_tabview_set_tab_bar_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_size_mpobj, 2, mp_lv_obj_move_to_index, lv_tabview_set_tab_bar_size); - -/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_count_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_count); - -/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_active */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_active_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_active); - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_tabview_get_tab_button(lv_obj_t *obj, int32_t idx) - */ - -static mp_obj_t mp_lv_tabview_get_tab_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_span_coords_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); - return lv_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_button_mpobj, 2, mp_lv_tabview_get_tab_button, lv_tabview_get_tab_button); - -/* Reusing lv_obj_create for lv_tabview_get_content */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_content_mpobj, 1, mp_lv_obj_create, lv_tabview_get_content); - -/* Reusing lv_obj_create for lv_tabview_get_tab_bar */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_mpobj, 1, mp_lv_obj_create, lv_tabview_get_tab_bar); - -/* Reusing lv_spinbox_get_digit_step_direction for lv_tabview_get_tab_bar_position */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_position_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_tabview_get_tab_bar_position); - -/* Reusing lv_obj_create for lv_tabview_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_create_mpobj, 1, mp_lv_obj_create, lv_tabview_create); - - -/* - * lvgl tabview object definitions - */ - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_span_coords_t *data = (lv_span_coords_t*)self->data; -static const mp_rom_map_elem_t tabview_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_tab), MP_ROM_PTR(&mp_lv_tabview_add_tab_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tab_text), MP_ROM_PTR(&mp_lv_tabview_set_tab_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_active), MP_ROM_PTR(&mp_lv_tabview_set_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_position_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tab_bar_size), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_count), MP_ROM_PTR(&mp_lv_tabview_get_tab_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_active), MP_ROM_PTR(&mp_lv_tabview_get_tab_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_button), MP_ROM_PTR(&mp_lv_tabview_get_tab_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_tabview_get_content_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_bar), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_position_mpobj) } -}; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_heading: dest[0] = mp_read_byref_lv_area_t(data->heading); break; // converting from lv_area_t; + case MP_QSTR_middle: dest[0] = mp_read_byref_lv_area_t(data->middle); break; // converting from lv_area_t; + case MP_QSTR_trailing: dest[0] = mp_read_byref_lv_area_t(data->trailing); break; // converting from lv_area_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_heading: data->heading = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_middle: data->middle = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_trailing: data->trailing = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + default: return; + } -static MP_DEFINE_CONST_DICT(tabview_locals_dict, tabview_locals_dict_table); + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static void tabview_print(const mp_print_t *print, +static void mp_lv_span_coords_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl tabview"); -} - - -static mp_obj_t tabview_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_tabview_create_mpobj, type, n_args, n_kw, args); + mp_printf(print, "struct lv_span_coords_t"); } +static const mp_obj_dict_t mp_lv_span_coords_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tabview_type_base, - MP_QSTR_tabview, + mp_lv_span_coords_t_type, + MP_QSTR_lv_span_coords_t, MP_TYPE_FLAG_NONE, - print, tabview_print, - make_new, tabview_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &tabview_locals_dict + print, mp_lv_span_coords_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_span_coords_t_attr, + locals_dict, &mp_lv_span_coords_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tabview_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_tabview_class, -#endif - .mp_obj_type = &mp_lv_tabview_type_base, -}; +static inline const mp_obj_type_t *get_mp_lv_span_coords_t_type(void) +{ + return &mp_lv_span_coords_t_type; +} /* * lvgl extension definition for: - * lv_obj_t *lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir) + * lv_span_coords_t lv_spangroup_get_span_coords(lv_obj_t *obj, const lv_span_t *span) */ -static mp_obj_t mp_lv_tileview_add_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_span_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *tv = mp_to_lv(mp_args[0]); - uint8_t col_id = (uint8_t)mp_obj_get_int(mp_args[1]); - uint8_t row_id = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_dir_t dir = (int)mp_obj_get_int(mp_args[3]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, uint8_t, uint8_t, lv_dir_t))lv_func_ptr)(tv, col_id, row_id, dir); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_span_t *span = (const lv_span_t *)mp_write_ptr_lv_span_t(mp_args[1]); + lv_span_coords_t _res = ((lv_span_coords_t (*)(lv_obj_t *, const lv_span_t *))lv_func_ptr)(obj, span); + return mp_read_lv_span_coords_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_add_tile_mpobj, 4, mp_lv_tileview_add_tile, lv_tileview_add_tile); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_coords_mpobj, 2, mp_lv_spangroup_get_span_coords, lv_spangroup_get_span_coords); /* * lvgl extension definition for: - * void lv_tileview_set_tile(lv_obj_t *tv, lv_obj_t *tile_obj, lv_anim_enable_t anim_en) + * lv_span_t *lv_spangroup_get_span_by_point(lv_obj_t *obj, const lv_point_t *p) */ -static mp_obj_t mp_lv_tileview_set_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_get_span_by_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *tv = mp_to_lv(mp_args[0]); - lv_obj_t *tile_obj = mp_to_lv(mp_args[1]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(tv, tile_obj, anim_en); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_point_t *p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + lv_span_t * _res = ((lv_span_t *(*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, p); + return mp_read_ptr_lv_span_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_mpobj, 3, mp_lv_tileview_set_tile, lv_tileview_set_tile); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_get_span_by_point_mpobj, 2, mp_lv_spangroup_get_span_by_point, lv_spangroup_get_span_by_point); + +/* Reusing lv_obj_move_foreground for lv_spangroup_refresh */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_refresh_mpobj, 1, mp_lv_obj_move_foreground, lv_spangroup_refresh); /* * lvgl extension definition for: - * void lv_tileview_set_tile_by_index(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en) + * lv_observer_t *lv_spangroup_bind_span_text(lv_obj_t *obj, lv_span_t *span, lv_subject_t *subject, const char *fmt) */ -static mp_obj_t mp_lv_tileview_set_tile_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spangroup_bind_span_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *tv = mp_to_lv(mp_args[0]); - uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t row_id = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_anim_enable_t))lv_func_ptr)(tv, col_id, row_id, anim_en); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[1]); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[2]); + const char *fmt = (const char *)(char*)convert_from_str(mp_args[3]); + lv_observer_t * _res = ((lv_observer_t *(*)(lv_obj_t *, lv_span_t *, lv_subject_t *, const char *))lv_func_ptr)(obj, span, subject, fmt); + return mp_read_ptr_lv_observer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_by_index_mpobj, 4, mp_lv_tileview_set_tile_by_index, lv_tileview_set_tile_by_index); - -/* Reusing lv_obj_create for lv_tileview_get_tile_active */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_get_tile_active_mpobj, 1, mp_lv_obj_create, lv_tileview_get_tile_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_bind_span_text_mpobj, 4, mp_lv_spangroup_bind_span_text, lv_spangroup_bind_span_text); -/* Reusing lv_obj_create for lv_tileview_create */ +/* Reusing lv_obj_create for lv_spangroup_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_create_mpobj, 1, mp_lv_obj_create, lv_tileview_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spangroup_create_mpobj, 1, mp_lv_obj_create, lv_spangroup_create); /* - * lvgl tileview object definitions + * lvgl spangroup object definitions */ -static const mp_rom_map_elem_t tileview_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_tile), MP_ROM_PTR(&mp_lv_tileview_add_tile_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tile), MP_ROM_PTR(&mp_lv_tileview_set_tile_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tile_by_index), MP_ROM_PTR(&mp_lv_tileview_set_tile_by_index_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tile_active), MP_ROM_PTR(&mp_lv_tileview_get_tile_active_mpobj) } +static const mp_rom_map_elem_t spangroup_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_span), MP_ROM_PTR(&mp_lv_spangroup_add_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_span), MP_ROM_PTR(&mp_lv_spangroup_delete_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_span_text), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_span_text_static), MP_ROM_PTR(&mp_lv_spangroup_set_span_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_span_style), MP_ROM_PTR(&mp_lv_spangroup_set_span_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_spangroup_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_overflow), MP_ROM_PTR(&mp_lv_spangroup_set_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_indent), MP_ROM_PTR(&mp_lv_spangroup_set_indent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_mode), MP_ROM_PTR(&mp_lv_spangroup_set_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_lines), MP_ROM_PTR(&mp_lv_spangroup_set_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_child), MP_ROM_PTR(&mp_lv_spangroup_get_child_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_span_count), MP_ROM_PTR(&mp_lv_spangroup_get_span_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_align), MP_ROM_PTR(&mp_lv_spangroup_get_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_overflow), MP_ROM_PTR(&mp_lv_spangroup_get_overflow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_indent), MP_ROM_PTR(&mp_lv_spangroup_get_indent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mode), MP_ROM_PTR(&mp_lv_spangroup_get_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_lines), MP_ROM_PTR(&mp_lv_spangroup_get_max_lines_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_line_height), MP_ROM_PTR(&mp_lv_spangroup_get_max_line_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_expand_width), MP_ROM_PTR(&mp_lv_spangroup_get_expand_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_expand_height), MP_ROM_PTR(&mp_lv_spangroup_get_expand_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_span_coords), MP_ROM_PTR(&mp_lv_spangroup_get_span_coords_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_span_by_point), MP_ROM_PTR(&mp_lv_spangroup_get_span_by_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&mp_lv_spangroup_refresh_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_span_text), MP_ROM_PTR(&mp_lv_spangroup_bind_span_text_mpobj) } }; -static MP_DEFINE_CONST_DICT(tileview_locals_dict, tileview_locals_dict_table); +static MP_DEFINE_CONST_DICT(spangroup_locals_dict, spangroup_locals_dict_table); -static void tileview_print(const mp_print_t *print, +static void spangroup_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl tileview"); + mp_printf(print, "lvgl spangroup"); } -static mp_obj_t tileview_make_new( +static mp_obj_t spangroup_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_tileview_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_spangroup_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tileview_type_base, - MP_QSTR_tileview, + mp_lv_spangroup_type_base, + MP_QSTR_spangroup, MP_TYPE_FLAG_NONE, - print, tileview_print, - make_new, tileview_make_new, + print, spangroup_print, + make_new, spangroup_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &tileview_locals_dict + locals_dict, &spangroup_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tileview_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spangroup_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_tileview_class, + .lv_obj_class = &lv_spangroup_class, #endif - .mp_obj_type = &mp_lv_tileview_type_base, + .mp_obj_type = &mp_lv_spangroup_type_base, }; -/* Reusing lv_list_add_text for lv_win_add_title */ +/* Reusing lv_obj_delete_delayed for lv_textarea_add_char */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_title_mpobj, 2, mp_lv_list_add_text, lv_win_add_title); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_char_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_add_char); +/* Reusing lv_arclabel_set_text for lv_textarea_add_text */ -/* - * lvgl extension definition for: - * lv_obj_t *lv_win_add_button(lv_obj_t *win, const void *icon, int32_t btn_w) - */ - -static mp_obj_t mp_lv_win_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *win = mp_to_lv(mp_args[0]); - const void *icon = (const void *)mp_to_ptr(mp_args[1]); - int32_t btn_w = (int32_t)mp_obj_get_int(mp_args[2]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, int32_t))lv_func_ptr)(win, icon, btn_w); - return lv_to_mp((void*)_res); -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_add_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_add_text); + +/* Reusing lv_obj_move_foreground for lv_textarea_delete_char */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_button_mpobj, 3, mp_lv_win_add_button, lv_win_add_button); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char); -/* Reusing lv_obj_create for lv_win_get_header */ +/* Reusing lv_obj_move_foreground for lv_textarea_delete_char_forward */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_header_mpobj, 1, mp_lv_obj_create, lv_win_get_header); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_delete_char_forward_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_delete_char_forward); -/* Reusing lv_obj_create for lv_win_get_content */ +/* Reusing lv_arclabel_set_text for lv_textarea_set_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_content_mpobj, 1, mp_lv_obj_create, lv_win_get_content); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_text); -/* Reusing lv_obj_create for lv_win_create */ +/* Reusing lv_arclabel_set_text for lv_textarea_set_placeholder_text */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_create_mpobj, 1, mp_lv_obj_create, lv_win_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_placeholder_text_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_placeholder_text); +/* Reusing lv_obj_move_to_index for lv_textarea_set_cursor_pos */ -/* - * lvgl win object definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_pos_mpobj, 2, mp_lv_obj_move_to_index, lv_textarea_set_cursor_pos); +/* Reusing lv_obj_set_hidden for lv_textarea_set_cursor_click_pos */ -static const mp_rom_map_elem_t win_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_win_add_title_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_win_add_button_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_win_get_header_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_win_get_content_mpobj) } -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_cursor_click_pos_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_cursor_click_pos); + +/* Reusing lv_obj_set_hidden for lv_textarea_set_password_mode */ -static MP_DEFINE_CONST_DICT(win_locals_dict, win_locals_dict_table); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_mode_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_password_mode); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_password_bullet */ -static void win_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "lvgl win"); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_bullet_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_password_bullet); + +/* Reusing lv_obj_set_hidden for lv_textarea_set_one_line */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_one_line_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_one_line); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars */ -static mp_obj_t win_make_new( - const mp_obj_type_t *type, - size_t n_args, - size_t n_kw, - const mp_obj_t *args) -{ - return make_new(&mp_lv_win_create_mpobj, type, n_args, n_kw, args); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_accepted_chars_static */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_accepted_chars_static_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_accepted_chars_static); + +/* Reusing lv_obj_delete_delayed for lv_textarea_set_max_length */ -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_win_type_base, - MP_QSTR_win, - MP_TYPE_FLAG_NONE, - print, win_print, - make_new, win_make_new, - binary_op, mp_lv_obj_binary_op, - attr, call_parent_methods, - buffer, mp_lv_obj_get_buffer, - parent, &mp_lv_obj_type_base, - locals_dict, &win_locals_dict -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_max_length_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_max_length); + +/* Reusing lv_arclabel_set_text for lv_textarea_set_insert_replace */ -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_win_type = { -#ifdef LV_OBJ_T - .lv_obj_class = &lv_win_class, -#endif - .mp_obj_type = &mp_lv_win_type_base, -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_insert_replace_mpobj, 2, mp_lv_arclabel_set_text, lv_textarea_set_insert_replace); -/* Reusing lv_led_set_color for lv_barcode_set_dark_color */ +/* Reusing lv_obj_set_hidden for lv_textarea_set_text_selection */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_dark_color_mpobj, 2, mp_lv_led_set_color, lv_barcode_set_dark_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_text_selection_mpobj, 2, mp_lv_obj_set_hidden, lv_textarea_set_text_selection); -/* Reusing lv_led_set_color for lv_barcode_set_light_color */ +/* Reusing lv_obj_delete_delayed for lv_textarea_set_password_show_time */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_light_color_mpobj, 2, mp_lv_led_set_color, lv_barcode_set_light_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_password_show_time_mpobj, 2, mp_lv_obj_delete_delayed, lv_textarea_set_password_show_time); +/* Reusing lv_spangroup_set_align for lv_textarea_set_align */ -/* - * lvgl extension definition for: - * void lv_barcode_set_scale(lv_obj_t *obj, uint16_t scale) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_set_align_mpobj, 2, mp_lv_spangroup_set_align, lv_textarea_set_align); + +/* Reusing lv_checkbox_get_text for lv_textarea_get_text */ -static mp_obj_t mp_lv_barcode_set_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t scale = (uint16_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint16_t))lv_func_ptr)(obj, scale); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_mpobj, 1, mp_lv_checkbox_get_text, lv_textarea_get_text); + +/* Reusing lv_dropdown_get_text for lv_textarea_get_placeholder_text */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_placeholder_text_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_placeholder_text); + +/* Reusing lv_obj_get_screen for lv_textarea_get_label */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_scale_mpobj, 2, mp_lv_barcode_set_scale, lv_barcode_set_scale); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_label_mpobj, 1, mp_lv_obj_get_screen, lv_textarea_get_label); -/* Reusing lv_obj_set_scroll_dir for lv_barcode_set_direction */ +/* Reusing lv_obj_get_child_count for lv_textarea_get_cursor_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_barcode_set_direction); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_pos_mpobj, 1, mp_lv_obj_get_child_count, lv_textarea_get_cursor_pos); -/* Reusing lv_obj_set_radio_button for lv_barcode_set_tiled */ +/* Reusing lv_obj_refr_size for lv_textarea_get_cursor_click_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_tiled_mpobj, 2, mp_lv_obj_set_radio_button, lv_barcode_set_tiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_cursor_click_pos_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_cursor_click_pos); +/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_password_mode */ -/* - * lvgl extension definition for: - * void lv_barcode_set_encoding(lv_obj_t *obj, lv_barcode_encoding_t encoding) - */ - -static mp_obj_t mp_lv_barcode_set_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_barcode_encoding_t encoding = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_barcode_encoding_t))lv_func_ptr)(obj, encoding); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_set_encoding_mpobj, 2, mp_lv_barcode_set_encoding, lv_barcode_set_encoding); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_mode_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_password_mode); +/* Reusing lv_dropdown_get_text for lv_textarea_get_password_bullet */ -/* - * lvgl extension definition for: - * lv_result_t lv_barcode_update(lv_obj_t *obj, const char *data) - */ - -static mp_obj_t mp_lv_barcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const char *data = (const char *)(char*)convert_from_str(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const char *))lv_func_ptr)(obj, data); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_update_mpobj, 2, mp_lv_barcode_update, lv_barcode_update); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_bullet_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_password_bullet); +/* Reusing lv_obj_is_layout_positioned for lv_textarea_get_one_line */ -/* - * lvgl extension definition for: - * lv_color_t lv_barcode_get_dark_color(lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_barcode_get_dark_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_t _res = ((lv_color_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_lv_color_t(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_one_line_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_get_one_line); + +/* Reusing lv_dropdown_get_text for lv_textarea_get_accepted_chars */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_accepted_chars_mpobj, 1, mp_lv_dropdown_get_text, lv_textarea_get_accepted_chars); + +/* Reusing lv_obj_get_event_count for lv_textarea_get_max_length */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_dark_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_dark_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_max_length_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_max_length); -/* Reusing lv_barcode_get_dark_color for lv_barcode_get_light_color */ +/* Reusing lv_obj_is_layout_positioned for lv_textarea_text_is_selected */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_light_color_mpobj, 1, mp_lv_barcode_get_dark_color, lv_barcode_get_light_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_text_is_selected_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_textarea_text_is_selected); +/* Reusing lv_obj_refr_size for lv_textarea_get_text_selection */ -/* - * lvgl extension definition for: - * uint16_t lv_barcode_get_scale(lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_text_selection_mpobj, 1, mp_lv_obj_refr_size, lv_textarea_get_text_selection); + +/* Reusing lv_obj_get_event_count for lv_textarea_get_password_show_time */ -static mp_obj_t mp_lv_barcode_get_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint16_t _res = ((uint16_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_password_show_time_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_password_show_time); + +/* Reusing lv_obj_get_event_count for lv_textarea_get_current_char */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_get_current_char_mpobj, 1, mp_lv_obj_get_event_count, lv_textarea_get_current_char); + +/* Reusing lv_obj_move_foreground for lv_textarea_clear_selection */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_scale_mpobj, 1, mp_lv_barcode_get_scale, lv_barcode_get_scale); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_clear_selection_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_clear_selection); +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_right */ -/* - * lvgl extension definition for: - * lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_right_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_right); + +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_left */ -static mp_obj_t mp_lv_barcode_get_encoding(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_barcode_encoding_t _res = ((lv_barcode_encoding_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_left_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_left); + +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_down */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_down_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_down); + +/* Reusing lv_obj_move_foreground for lv_textarea_cursor_up */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_get_encoding_mpobj, 1, mp_lv_barcode_get_encoding, lv_barcode_get_encoding); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_cursor_up_mpobj, 1, mp_lv_obj_move_foreground, lv_textarea_cursor_up); -/* Reusing lv_obj_create for lv_barcode_create */ +/* Reusing lv_obj_create for lv_textarea_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_barcode_create_mpobj, 1, mp_lv_obj_create, lv_barcode_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_textarea_create_mpobj, 1, mp_lv_obj_create, lv_textarea_create); /* - * lvgl barcode object definitions + * lvgl textarea object definitions */ -static const mp_rom_map_elem_t barcode_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_barcode_set_dark_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_barcode_set_light_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_scale), MP_ROM_PTR(&mp_lv_barcode_set_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_direction), MP_ROM_PTR(&mp_lv_barcode_set_direction_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tiled), MP_ROM_PTR(&mp_lv_barcode_set_tiled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_encoding), MP_ROM_PTR(&mp_lv_barcode_set_encoding_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_barcode_update_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dark_color), MP_ROM_PTR(&mp_lv_barcode_get_dark_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_light_color), MP_ROM_PTR(&mp_lv_barcode_get_light_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scale), MP_ROM_PTR(&mp_lv_barcode_get_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_encoding), MP_ROM_PTR(&mp_lv_barcode_get_encoding_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ENCODING_CODE128), MP_ROM_PTR(&mp_lv_LV_BARCODE_ENCODING_CODE128_type_base) } +static const mp_rom_map_elem_t textarea_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_char), MP_ROM_PTR(&mp_lv_textarea_add_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_text), MP_ROM_PTR(&mp_lv_textarea_add_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_char), MP_ROM_PTR(&mp_lv_textarea_delete_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_char_forward), MP_ROM_PTR(&mp_lv_textarea_delete_char_forward_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_textarea_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_set_placeholder_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_set_cursor_click_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_password_mode), MP_ROM_PTR(&mp_lv_textarea_set_password_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_password_bullet), MP_ROM_PTR(&mp_lv_textarea_set_password_bullet_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_one_line), MP_ROM_PTR(&mp_lv_textarea_set_one_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_accepted_chars_static), MP_ROM_PTR(&mp_lv_textarea_set_accepted_chars_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_length), MP_ROM_PTR(&mp_lv_textarea_set_max_length_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_insert_replace), MP_ROM_PTR(&mp_lv_textarea_set_insert_replace_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_selection), MP_ROM_PTR(&mp_lv_textarea_set_text_selection_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_password_show_time), MP_ROM_PTR(&mp_lv_textarea_set_password_show_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_textarea_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_textarea_get_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_placeholder_text), MP_ROM_PTR(&mp_lv_textarea_get_placeholder_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label), MP_ROM_PTR(&mp_lv_textarea_get_label_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cursor_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cursor_click_pos), MP_ROM_PTR(&mp_lv_textarea_get_cursor_click_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_password_mode), MP_ROM_PTR(&mp_lv_textarea_get_password_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_password_bullet), MP_ROM_PTR(&mp_lv_textarea_get_password_bullet_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_one_line), MP_ROM_PTR(&mp_lv_textarea_get_one_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_accepted_chars), MP_ROM_PTR(&mp_lv_textarea_get_accepted_chars_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_length), MP_ROM_PTR(&mp_lv_textarea_get_max_length_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_selected), MP_ROM_PTR(&mp_lv_textarea_text_is_selected_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text_selection), MP_ROM_PTR(&mp_lv_textarea_get_text_selection_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_password_show_time), MP_ROM_PTR(&mp_lv_textarea_get_password_show_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_char), MP_ROM_PTR(&mp_lv_textarea_get_current_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_selection), MP_ROM_PTR(&mp_lv_textarea_clear_selection_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_right), MP_ROM_PTR(&mp_lv_textarea_cursor_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_left), MP_ROM_PTR(&mp_lv_textarea_cursor_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_down), MP_ROM_PTR(&mp_lv_textarea_cursor_down_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cursor_up), MP_ROM_PTR(&mp_lv_textarea_cursor_up_mpobj) } }; -static MP_DEFINE_CONST_DICT(barcode_locals_dict, barcode_locals_dict_table); +static MP_DEFINE_CONST_DICT(textarea_locals_dict, textarea_locals_dict_table); -static void barcode_print(const mp_print_t *print, +static void textarea_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl barcode"); + mp_printf(print, "lvgl textarea"); } -static mp_obj_t barcode_make_new( +static mp_obj_t textarea_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_barcode_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_textarea_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_barcode_type_base, - MP_QSTR_barcode, + mp_lv_textarea_type_base, + MP_QSTR_textarea, MP_TYPE_FLAG_NONE, - print, barcode_print, - make_new, barcode_make_new, + print, textarea_print, + make_new, textarea_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &barcode_locals_dict + locals_dict, &textarea_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_barcode_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_textarea_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_barcode_class, + .lv_obj_class = &lv_textarea_class, #endif - .mp_obj_type = &mp_lv_barcode_type_base, + .mp_obj_type = &mp_lv_textarea_type_base, }; -/* Reusing lv_obj_move_to_index for lv_qrcode_set_size */ +/* Reusing lv_obj_move_to_index for lv_spinbox_set_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_size_mpobj, 2, mp_lv_obj_move_to_index, lv_qrcode_set_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_value); -/* Reusing lv_led_set_color for lv_qrcode_set_dark_color */ +/* Reusing lv_obj_set_hidden for lv_spinbox_set_rollover */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_dark_color_mpobj, 2, mp_lv_led_set_color, lv_qrcode_set_dark_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_rollover_mpobj, 2, mp_lv_obj_set_hidden, lv_spinbox_set_rollover); -/* Reusing lv_led_set_color for lv_qrcode_set_light_color */ +/* Reusing lv_obj_fade_in for lv_spinbox_set_digit_format */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_format_mpobj, 3, mp_lv_obj_fade_in, lv_spinbox_set_digit_format); + +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_digit_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_digit_count); + +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_dec_point_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_dec_point_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_dec_point_pos); + +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_step */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_step_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_step); + +/* Reusing lv_obj_set_pos for lv_spinbox_set_range */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_range_mpobj, 3, mp_lv_obj_set_pos, lv_spinbox_set_range); + +/* Reusing lv_obj_move_to_index for lv_spinbox_set_min_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_min_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_min_value); + +/* Reusing lv_obj_move_to_index for lv_spinbox_set_max_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_max_value_mpobj, 2, mp_lv_obj_move_to_index, lv_spinbox_set_max_value); + +/* Reusing lv_obj_delete_delayed for lv_spinbox_set_cursor_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_cursor_pos_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinbox_set_cursor_pos); + +/* Reusing lv_obj_set_scroll_dir for lv_spinbox_set_digit_step_direction */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_set_digit_step_direction_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_spinbox_set_digit_step_direction); + +/* Reusing lv_obj_refr_size for lv_spinbox_get_rollover */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_rollover_mpobj, 1, mp_lv_obj_refr_size, lv_spinbox_get_rollover); + +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_value); + +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_step */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_step_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_step); + +/* Reusing lv_obj_get_event_count for lv_spinbox_get_digit_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_count_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_digit_count); + +/* Reusing lv_obj_get_event_count for lv_spinbox_get_dec_point_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_dec_point_pos_mpobj, 1, mp_lv_obj_get_event_count, lv_spinbox_get_dec_point_pos); + +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_min_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_min_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_min_value); + +/* Reusing lv_obj_get_style_clamped_width for lv_spinbox_get_max_value */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_light_color_mpobj, 2, mp_lv_led_set_color, lv_qrcode_set_light_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_max_value_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_spinbox_get_max_value); /* * lvgl extension definition for: - * lv_result_t lv_qrcode_update(lv_obj_t *obj, const void *data, uint32_t data_len) + * lv_dir_t lv_spinbox_get_digit_step_direction(lv_obj_t *obj) */ -static mp_obj_t mp_lv_qrcode_update(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_spinbox_get_digit_step_direction(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - const void *data = (const void *)mp_to_ptr(mp_args[1]); - uint32_t data_len = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, const void *, uint32_t))lv_func_ptr)(obj, data, data_len); + lv_dir_t _res = ((lv_dir_t (*)(lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_update_mpobj, 3, mp_lv_qrcode_update, lv_qrcode_update); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_get_digit_step_direction_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_spinbox_get_digit_step_direction); -/* Reusing lv_arclabel_set_text for lv_qrcode_set_data */ +/* Reusing lv_obj_move_foreground for lv_spinbox_step_next */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_data_mpobj, 2, mp_lv_arclabel_set_text, lv_qrcode_set_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_next_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_next); -/* Reusing lv_obj_set_radio_button for lv_qrcode_set_quiet_zone */ +/* Reusing lv_obj_move_foreground for lv_spinbox_step_prev */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_set_quiet_zone_mpobj, 2, mp_lv_obj_set_radio_button, lv_qrcode_set_quiet_zone); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_step_prev_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_step_prev); -/* Reusing lv_obj_create for lv_qrcode_create */ +/* Reusing lv_obj_move_foreground for lv_spinbox_increment */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_qrcode_create_mpobj, 1, mp_lv_obj_create, lv_qrcode_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_increment_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_increment); + +/* Reusing lv_obj_move_foreground for lv_spinbox_decrement */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_decrement_mpobj, 1, mp_lv_obj_move_foreground, lv_spinbox_decrement); + +/* Reusing lv_obj_bind_checked for lv_spinbox_bind_value */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_bind_value_mpobj, 2, mp_lv_obj_bind_checked, lv_spinbox_bind_value); + +/* Reusing lv_obj_create for lv_spinbox_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinbox_create_mpobj, 1, mp_lv_obj_create, lv_spinbox_create); /* - * lvgl qrcode object definitions + * lvgl spinbox object definitions */ -static const mp_rom_map_elem_t qrcode_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_qrcode_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dark_color), MP_ROM_PTR(&mp_lv_qrcode_set_dark_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_light_color), MP_ROM_PTR(&mp_lv_qrcode_set_light_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_update), MP_ROM_PTR(&mp_lv_qrcode_update_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_data), MP_ROM_PTR(&mp_lv_qrcode_set_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_quiet_zone), MP_ROM_PTR(&mp_lv_qrcode_set_quiet_zone_mpobj) } +static const mp_rom_map_elem_t spinbox_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_value), MP_ROM_PTR(&mp_lv_spinbox_set_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rollover), MP_ROM_PTR(&mp_lv_spinbox_set_rollover_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_digit_format), MP_ROM_PTR(&mp_lv_spinbox_set_digit_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_digit_count), MP_ROM_PTR(&mp_lv_spinbox_set_digit_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_set_dec_point_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_step), MP_ROM_PTR(&mp_lv_spinbox_set_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_spinbox_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_value), MP_ROM_PTR(&mp_lv_spinbox_set_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_value), MP_ROM_PTR(&mp_lv_spinbox_set_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cursor_pos), MP_ROM_PTR(&mp_lv_spinbox_set_cursor_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_set_digit_step_direction_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rollover), MP_ROM_PTR(&mp_lv_spinbox_get_rollover_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_value), MP_ROM_PTR(&mp_lv_spinbox_get_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_step), MP_ROM_PTR(&mp_lv_spinbox_get_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_digit_count), MP_ROM_PTR(&mp_lv_spinbox_get_digit_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dec_point_pos), MP_ROM_PTR(&mp_lv_spinbox_get_dec_point_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_min_value), MP_ROM_PTR(&mp_lv_spinbox_get_min_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_value), MP_ROM_PTR(&mp_lv_spinbox_get_max_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_digit_step_direction), MP_ROM_PTR(&mp_lv_spinbox_get_digit_step_direction_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_step_next), MP_ROM_PTR(&mp_lv_spinbox_step_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_step_prev), MP_ROM_PTR(&mp_lv_spinbox_step_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_increment), MP_ROM_PTR(&mp_lv_spinbox_increment_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_decrement), MP_ROM_PTR(&mp_lv_spinbox_decrement_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bind_value), MP_ROM_PTR(&mp_lv_spinbox_bind_value_mpobj) } }; -static MP_DEFINE_CONST_DICT(qrcode_locals_dict, qrcode_locals_dict_table); +static MP_DEFINE_CONST_DICT(spinbox_locals_dict, spinbox_locals_dict_table); -static void qrcode_print(const mp_print_t *print, +static void spinbox_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "lvgl qrcode"); + mp_printf(print, "lvgl spinbox"); } -static mp_obj_t qrcode_make_new( +static mp_obj_t spinbox_make_new( const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - return make_new(&mp_lv_qrcode_create_mpobj, type, n_args, n_kw, args); + return make_new(&mp_lv_spinbox_create_mpobj, type, n_args, n_kw, args); } static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_qrcode_type_base, - MP_QSTR_qrcode, + mp_lv_spinbox_type_base, + MP_QSTR_spinbox, MP_TYPE_FLAG_NONE, - print, qrcode_print, - make_new, qrcode_make_new, + print, spinbox_print, + make_new, spinbox_make_new, binary_op, mp_lv_obj_binary_op, attr, call_parent_methods, buffer, mp_lv_obj_get_buffer, parent, &mp_lv_obj_type_base, - locals_dict, &qrcode_locals_dict + locals_dict, &spinbox_locals_dict ); -GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_qrcode_type = { +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinbox_type = { #ifdef LV_OBJ_T - .lv_obj_class = &lv_qrcode_class, + .lv_obj_class = &lv_spinbox_class, #endif - .mp_obj_type = &mp_lv_qrcode_type_base, + .mp_obj_type = &mp_lv_spinbox_type_base, }; +/* Reusing lv_obj_fade_in for lv_spinner_set_anim_params */ -/* - * lvgl lv_color_filter_shade global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_params_mpobj, 3, mp_lv_obj_fade_in, lv_spinner_set_anim_params); + +/* Reusing lv_obj_delete_delayed for lv_spinner_set_anim_duration */ -static const mp_lv_struct_t mp_lv_color_filter_shade = { - { &mp_lv_color_filter_dsc_t_type }, - (lv_color_filter_dsc_t*)&lv_color_filter_shade -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_anim_duration_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_anim_duration); -#define funcptr_lv_tree_constructor_cb_t NULL +/* Reusing lv_obj_delete_delayed for lv_spinner_set_arc_sweep */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_set_arc_sweep_mpobj, 2, mp_lv_obj_delete_delayed, lv_spinner_set_arc_sweep); + +/* Reusing lv_obj_get_event_count for lv_spinner_get_anim_duration */ -/* - * Struct lv_tree_node_t - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_anim_duration_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_anim_duration); + +/* Reusing lv_obj_get_event_count for lv_spinner_get_arc_sweep */ -static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_get_arc_sweep_mpobj, 1, mp_lv_obj_get_event_count, lv_spinner_get_arc_sweep); + +/* Reusing lv_obj_create for lv_spinner_create */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_node_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_node_t_type())); - return (lv_tree_node_t*)self->data; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_spinner_create_mpobj, 1, mp_lv_obj_create, lv_spinner_create); + -#define mp_write_lv_tree_node_t(struct_obj) *((lv_tree_node_t*)mp_write_ptr_lv_tree_node_t(struct_obj)) +/* + * lvgl spinner object definitions + */ + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_node_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_tree_node_t_type(), field); -} +static const mp_rom_map_elem_t spinner_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_anim_params), MP_ROM_PTR(&mp_lv_spinner_set_anim_params_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_spinner_set_anim_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_set_arc_sweep_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_anim_duration), MP_ROM_PTR(&mp_lv_spinner_get_anim_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_arc_sweep), MP_ROM_PTR(&mp_lv_spinner_get_arc_sweep_mpobj) } +}; -#define mp_read_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(copy_buffer(&field, sizeof(lv_tree_node_t))) -#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) +static MP_DEFINE_CONST_DICT(spinner_locals_dict, spinner_locals_dict_table); -static void mp_lv_tree_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void spinner_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_tree_node_t *data = (lv_tree_node_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_tree_node_t *; - case MP_QSTR_children: dest[0] = ptr_to_mp((void*)data->children); break; // converting from lv_tree_node_t **; - case MP_QSTR_child_cnt: dest[0] = mp_obj_new_int_from_uint(data->child_cnt); break; // converting from uint32_t; - case MP_QSTR_child_cap: dest[0] = mp_obj_new_int_from_uint(data->child_cap); break; // converting from uint32_t; - case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_tree_class_t *; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t *; - case MP_QSTR_children: data->children = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t **; - case MP_QSTR_child_cnt: data->child_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_child_cap: data->child_cap = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } + mp_printf(print, "lvgl spinner"); } -static void mp_lv_tree_node_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) + +static mp_obj_t spinner_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - mp_printf(print, "struct lv_tree_node_t"); + return make_new(&mp_lv_spinner_create_mpobj, type, n_args, n_kw, args); } -static const mp_obj_dict_t mp_lv_tree_node_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tree_node_t_type, - MP_QSTR_lv_tree_node_t, + mp_lv_spinner_type_base, + MP_QSTR_spinner, MP_TYPE_FLAG_NONE, - print, mp_lv_tree_node_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_tree_node_t_attr, - locals_dict, &mp_lv_tree_node_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, spinner_print, + make_new, spinner_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &spinner_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void) -{ - return &mp_lv_tree_node_t_type; -} +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_spinner_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_spinner_class, +#endif + .mp_obj_type = &mp_lv_spinner_type_base, +}; /* * lvgl extension definition for: - * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation) */ -static mp_obj_t mp_funcptr_lv_tree_constructor_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_switch_set_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_to_ptr(mp_args[0]); - lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[1]); - ((void (*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, node); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_switch_orientation_t orientation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_switch_orientation_t))lv_func_ptr)(obj, orientation); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tree_constructor_cb_t_mpobj, 2, mp_funcptr_lv_tree_constructor_cb_t, funcptr_lv_tree_constructor_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_set_orientation_mpobj, 2, mp_lv_switch_set_orientation, lv_switch_set_orientation); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tree_constructor_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_constructor_cb_callback' - * lv_tree_constructor_cb_t constructor_cb + * lvgl extension definition for: + * lv_switch_orientation_t lv_switch_get_orientation(lv_obj_t *obj) */ + +static mp_obj_t mp_lv_switch_get_orientation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_switch_orientation_t _res = ((lv_switch_orientation_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_get_orientation_mpobj, 1, mp_lv_switch_get_orientation, lv_switch_get_orientation); +/* Reusing lv_obj_create for lv_switch_create */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_destructor_cb_callback' - * lv_tree_destructor_cb_t destructor_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_switch_create_mpobj, 1, mp_lv_obj_create, lv_switch_create); /* - * Struct lv_tree_class_t + * lvgl switch object definitions */ + -static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_class_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_class_t_type())); - return (lv_tree_class_t*)self->data; -} +static const mp_rom_map_elem_t switch_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_orientation), MP_ROM_PTR(&mp_lv_switch_set_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_orientation), MP_ROM_PTR(&mp_lv_switch_get_orientation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ORIENTATION), MP_ROM_PTR(&mp_lv_LV_SWITCH_ORIENTATION_type_base) } +}; -#define mp_write_lv_tree_class_t(struct_obj) *((lv_tree_class_t*)mp_write_ptr_lv_tree_class_t(struct_obj)) +static MP_DEFINE_CONST_DICT(switch_locals_dict, switch_locals_dict_table); -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_class_t(void *field) +static void switch_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - return lv_to_mp_struct(get_mp_lv_tree_class_t_type(), field); + mp_printf(print, "lvgl switch"); } -#define mp_read_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(copy_buffer(&field, sizeof(lv_tree_class_t))) -#define mp_read_byref_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(&field) - -static void mp_lv_tree_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_tree_class_t *data = (lv_tree_class_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_tree_class_t *; - case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; - case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->constructor_cb, NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL); break; // converting from callback lv_tree_constructor_cb_t; - case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->destructor_cb, NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL); break; // converting from callback lv_tree_destructor_cb_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; - case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_constructor_cb: data->constructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_constructor_cb_t; - case MP_QSTR_destructor_cb: data->destructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_destructor_cb_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} -static void mp_lv_tree_class_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t switch_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - mp_printf(print, "struct lv_tree_class_t"); + return make_new(&mp_lv_switch_create_mpobj, type, n_args, n_kw, args); } -static const mp_obj_dict_t mp_lv_tree_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_tree_class_t_type, - MP_QSTR_lv_tree_class_t, + mp_lv_switch_type_base, + MP_QSTR_switch, MP_TYPE_FLAG_NONE, - print, mp_lv_tree_class_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_tree_class_t_attr, - locals_dict, &mp_lv_tree_class_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, switch_print, + make_new, switch_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &switch_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void) -{ - return &mp_lv_tree_class_t_type; -} - - -/* - * lvgl lv_tree_node_class global definitions - */ - -static const mp_lv_struct_t mp_lv_tree_node_class = { - { &mp_lv_tree_class_t_type }, - (lv_tree_class_t*)&lv_tree_node_class +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_switch_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_switch_class, +#endif + .mp_obj_type = &mp_lv_switch_type_base, }; /* - * lvgl lv_font_montserrat_14 global definitions + * lvgl extension definition for: + * void lv_table_set_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col, const char *txt) */ -#if LV_FONT_MONTSERRAT_14 -static const mp_lv_struct_t mp_lv_font_montserrat_14 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_14 -}; -#endif - +static mp_obj_t mp_lv_table_set_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, const char *))lv_func_ptr)(obj, row, col, txt); + return mp_const_none; +} -/* - * lvgl lv_font_montserrat_16 global definitions - */ + -#if LV_FONT_MONTSERRAT_16 -static const mp_lv_struct_t mp_lv_font_montserrat_16 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_16 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_value_mpobj, 4, mp_lv_table_set_cell_value, lv_table_set_cell_value); +/* Reusing lv_obj_delete_delayed for lv_table_set_row_count */ -/* - * lvgl lv_font_montserrat_24 global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_row_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_row_count); + +/* Reusing lv_obj_delete_delayed for lv_table_set_column_count */ -#if LV_FONT_MONTSERRAT_24 -static const mp_lv_struct_t mp_lv_font_montserrat_24 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_24 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_count_mpobj, 2, mp_lv_obj_delete_delayed, lv_table_set_column_count); /* - * lvgl lv_font_montserrat_32 global definitions + * lvgl extension definition for: + * void lv_table_set_column_width(lv_obj_t *obj, uint32_t col_id, int32_t w) */ -#if LV_FONT_MONTSERRAT_32 -static const mp_lv_struct_t mp_lv_font_montserrat_32 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_32 -}; -#endif - +static mp_obj_t mp_lv_table_set_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, int32_t))lv_func_ptr)(obj, col_id, w); + return mp_const_none; +} -/* - * lvgl lv_font_montserrat_40 global definitions - */ + -#if LV_FONT_MONTSERRAT_40 -static const mp_lv_struct_t mp_lv_font_montserrat_40 = { - { &mp_lv_font_t_type }, - (lv_font_t*)&lv_font_montserrat_40 -}; -#endif +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_column_width_mpobj, 3, mp_lv_table_set_column_width, lv_table_set_column_width); -/* Global struct wrapper for int */ - -typedef struct { - int value; -} _lv_mp_int_wrapper; - /* - * Struct _lv_mp_int_wrapper + * lvgl extension definition for: + * void lv_table_set_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) */ -static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr__lv_mp_int_wrapper(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp__lv_mp_int_wrapper_type())); - return (_lv_mp_int_wrapper*)self->data; -} - -#define mp_write__lv_mp_int_wrapper(struct_obj) *((_lv_mp_int_wrapper*)mp_write_ptr__lv_mp_int_wrapper(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr__lv_mp_int_wrapper(void *field) +static mp_obj_t mp_lv_table_set_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp__lv_mp_int_wrapper_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); + return mp_const_none; } -#define mp_read__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(copy_buffer(&field, sizeof(_lv_mp_int_wrapper))) -#define mp_read_byref__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(&field) + -static void mp__lv_mp_int_wrapper_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED _lv_mp_int_wrapper *data = (_lv_mp_int_wrapper*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_set_cell_ctrl); + +/* Reusing lv_table_set_cell_ctrl for lv_table_clear_cell_ctrl */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_value: dest[0] = mp_obj_new_int(data->value); break; // converting from int; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_value: data->value = (int)mp_obj_get_int(dest[1]); break; // converting to int; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_clear_cell_ctrl_mpobj, 4, mp_lv_table_set_cell_ctrl, lv_table_clear_cell_ctrl); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_table_set_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col, void *user_data) + */ -static void mp__lv_mp_int_wrapper_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_table_set_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct _lv_mp_int_wrapper"); + void *user_data = mp_to_ptr(mp_args[3]); + uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); + uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + ((void (*)(lv_obj_t *, uint16_t, uint16_t, void *))lv_func_ptr)(obj, row, col, user_data); + return mp_const_none; } -static const mp_obj_dict_t mp__lv_mp_int_wrapper_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp__lv_mp_int_wrapper_type, - MP_QSTR__lv_mp_int_wrapper, - MP_TYPE_FLAG_NONE, - print, mp__lv_mp_int_wrapper_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp__lv_mp_int_wrapper_attr, - locals_dict, &mp__lv_mp_int_wrapper_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void) -{ - return &mp__lv_mp_int_wrapper_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_cell_user_data_mpobj, 4, mp_lv_table_set_cell_user_data, lv_table_set_cell_user_data); /* - * lvgl lv_style_const_prop_id_inv global definitions + * lvgl extension definition for: + * void lv_table_set_selected_cell(lv_obj_t *obj, uint16_t row, uint16_t col) */ -static const mp_lv_struct_t mp_lv_style_const_prop_id_inv = { - { &mp__lv_mp_int_wrapper_type }, - (lv_style_prop_t*)&lv_style_const_prop_id_inv -}; - +static mp_obj_t mp_lv_table_set_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); + uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); + return mp_const_none; +} -/* - * lvgl lv_obj_class global definitions - */ + -static const mp_lv_struct_t mp_lv_obj_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_obj_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_set_selected_cell_mpobj, 3, mp_lv_table_set_selected_cell, lv_table_set_selected_cell); -#define funcptr_create_cb NULL - /* - * Struct lv_font_info_t + * lvgl extension definition for: + * const char *lv_table_get_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col) */ -static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_info_t(mp_obj_t self_in) +static mp_obj_t mp_lv_table_get_cell_value(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_info_t_type())); - return (lv_font_info_t*)self->data; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + const char * _res = ((const char *(*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, row, col); + return convert_to_str((void*)_res); } -#define mp_write_lv_font_info_t(struct_obj) *((lv_font_info_t*)mp_write_ptr_lv_font_info_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_info_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_font_info_t_type(), field); -} + -#define mp_read_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(copy_buffer(&field, sizeof(lv_font_info_t))) -#define mp_read_byref_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_value_mpobj, 3, mp_lv_table_get_cell_value, lv_table_get_cell_value); + +/* Reusing lv_obj_get_event_count for lv_table_get_row_count */ -static void mp_lv_font_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_info_t *data = (lv_font_info_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_row_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_row_count); + +/* Reusing lv_obj_get_event_count for lv_table_get_column_count */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_font_class_t *; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; - case MP_QSTR_render_mode: dest[0] = mp_obj_new_int_from_uint(data->render_mode); break; // converting from uint32_t; - case MP_QSTR_style: dest[0] = mp_obj_new_int_from_uint(data->style); break; // converting from uint32_t; - case MP_QSTR_kerning: dest[0] = mp_obj_new_int(data->kerning); break; // converting from lv_font_kerning_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_class_t *; - case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_render_mode: data->render_mode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_style: data->style = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_kerning: data->kerning = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_kerning_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_count_mpobj, 1, mp_lv_obj_get_event_count, lv_table_get_column_count); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * int32_t lv_table_get_column_width(lv_obj_t *obj, uint32_t col) + */ -static void mp_lv_font_info_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_table_get_column_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_font_info_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, col); + return mp_obj_new_int(_res); } -static const mp_obj_dict_t mp_lv_font_info_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_info_t_type, - MP_QSTR_lv_font_info_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_font_info_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_font_info_t_attr, - locals_dict, &mp_lv_font_info_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void) -{ - return &mp_lv_font_info_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_column_width_mpobj, 2, mp_lv_table_get_column_width, lv_table_get_column_width); /* * lvgl extension definition for: - * lv_font_t *create_cb(const lv_font_info_t *info, const void *src) + * bool lv_table_has_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) */ -static mp_obj_t mp_funcptr_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_table_has_cell_ctrl(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_info_t *info = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - lv_font_t * _res = ((lv_font_t *(*)(const lv_font_info_t *, const void *))lv_func_ptr)(info, src); - return mp_read_ptr_lv_font_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t row = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t col = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_func_ptr)(obj, row, col, ctrl); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_create_cb_mpobj, 2, mp_funcptr_create_cb, funcptr_create_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_create_cb_callback' - * lv_font_t *(*create_cb)(const lv_font_info_t *info, const void *src) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_has_cell_ctrl_mpobj, 4, mp_lv_table_has_cell_ctrl, lv_table_has_cell_ctrl); -#define funcptr_delete_cb NULL - /* * lvgl extension definition for: - * void delete_cb(lv_font_t *font) + * void lv_table_get_selected_cell(lv_obj_t *obj, uint32_t *row, uint32_t *col) */ -static mp_obj_t mp_funcptr_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_table_get_selected_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); - ((void (*)(lv_font_t *))lv_func_ptr)(font); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t *row = mp_array_to_u32ptr(mp_args[1]); + uint32_t *col = mp_array_to_u32ptr(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t *, uint32_t *))lv_func_ptr)(obj, row, col); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_delete_cb_mpobj, 1, mp_funcptr_delete_cb, funcptr_delete_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_delete_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_delete_cb_callback' - * void (*delete_cb)(lv_font_t *font) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_selected_cell_mpobj, 3, mp_lv_table_get_selected_cell, lv_table_get_selected_cell); -#define funcptr_dup_src_cb NULL - /* * lvgl extension definition for: - * void *dup_src_cb(const void *src) + * void *lv_table_get_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col) */ -static mp_obj_t mp_funcptr_dup_src_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_table_get_cell_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *src = (const void *)mp_to_ptr(mp_args[0]); - void * _res = ((void *(*)(const void *))lv_func_ptr)(src); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint16_t row = (uint16_t)mp_obj_get_int(mp_args[1]); + uint16_t col = (uint16_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(lv_obj_t *, uint16_t, uint16_t))lv_func_ptr)(obj, row, col); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dup_src_cb_mpobj, 1, mp_funcptr_dup_src_cb, funcptr_dup_src_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dup_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_dup_src_cb_callback' - * void *(*dup_src_cb)(const void *src) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_get_cell_user_data_mpobj, 3, mp_lv_table_get_cell_user_data, lv_table_get_cell_user_data); -#define funcptr_free_src_cb NULL - -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_free_src_cb */ +/* Reusing lv_obj_create for lv_table_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_free_src_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_free_src_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_table_create_mpobj, 1, mp_lv_obj_create, lv_table_create); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_free_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_free_src_cb_callback' - * void (*free_src_cb)(void *src) + * lvgl table object definitions */ -/* - * Struct lv_font_class_t - */ +static const mp_rom_map_elem_t table_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_set_cell_value), MP_ROM_PTR(&mp_lv_table_set_cell_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_row_count), MP_ROM_PTR(&mp_lv_table_set_row_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_column_count), MP_ROM_PTR(&mp_lv_table_set_column_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_column_width), MP_ROM_PTR(&mp_lv_table_set_column_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cell_ctrl), MP_ROM_PTR(&mp_lv_table_set_cell_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_cell_ctrl), MP_ROM_PTR(&mp_lv_table_clear_cell_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cell_user_data), MP_ROM_PTR(&mp_lv_table_set_cell_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_selected_cell), MP_ROM_PTR(&mp_lv_table_set_selected_cell_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cell_value), MP_ROM_PTR(&mp_lv_table_get_cell_value_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_row_count), MP_ROM_PTR(&mp_lv_table_get_row_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_column_count), MP_ROM_PTR(&mp_lv_table_get_column_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_column_width), MP_ROM_PTR(&mp_lv_table_get_column_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_cell_ctrl), MP_ROM_PTR(&mp_lv_table_has_cell_ctrl_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_selected_cell), MP_ROM_PTR(&mp_lv_table_get_selected_cell_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cell_user_data), MP_ROM_PTR(&mp_lv_table_get_cell_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_CELL_CTRL), MP_ROM_PTR(&mp_lv_LV_TABLE_CELL_CTRL_type_base) } +}; -static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void); +static MP_DEFINE_CONST_DICT(table_locals_dict, table_locals_dict_table); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_class_t(mp_obj_t self_in) +static void table_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_class_t_type())); - return (lv_font_class_t*)self->data; -} - -#define mp_write_lv_font_class_t(struct_obj) *((lv_font_class_t*)mp_write_ptr_lv_font_class_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_class_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_font_class_t_type(), field); + mp_printf(print, "lvgl table"); } -#define mp_read_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(copy_buffer(&field, sizeof(lv_font_class_t))) -#define mp_read_byref_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(&field) - -static void mp_lv_font_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_class_t *data = (lv_font_class_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, (void*)data->create_cb, NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL); break; // converting from callback lv_font_t *(*)(lv_font_info_t *info, void *src); - case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL); break; // converting from callback void (*)(lv_font_t *font); - case MP_QSTR_dup_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, (void*)data->dup_src_cb, NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL); break; // converting from callback void *(*)(void *src); - case MP_QSTR_free_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, (void*)data->free_src_cb, NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL); break; // converting from callback void (*)(void *src); - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_create_cb: data->create_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_font_t *(*)(lv_font_info_t *info, void *src); - case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font); - case MP_QSTR_dup_src_cb: data->dup_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(void *src); - case MP_QSTR_free_src_cb: data->free_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(void *src); - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} -static void mp_lv_font_class_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t table_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) { - mp_printf(print, "struct lv_font_class_t"); + return make_new(&mp_lv_table_create_mpobj, type, n_args, n_kw, args); } -static const mp_obj_dict_t mp_lv_font_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_class_t_type, - MP_QSTR_lv_font_class_t, + mp_lv_table_type_base, + MP_QSTR_table, MP_TYPE_FLAG_NONE, - print, mp_lv_font_class_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_font_class_t_attr, - locals_dict, &mp_lv_font_class_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type + print, table_print, + make_new, table_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &table_locals_dict ); -static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void) -{ - return &mp_lv_font_class_t_type; -} +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_table_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_table_class, +#endif + .mp_obj_type = &mp_lv_table_type_base, +}; +/* Reusing lv_list_add_text for lv_tabview_add_tab */ -/* - * lvgl lv_binfont_font_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_add_tab_mpobj, 2, mp_lv_list_add_text, lv_tabview_add_tab); + +/* Reusing lv_label_ins_text for lv_tabview_set_tab_text */ -static const mp_lv_struct_t mp_lv_binfont_font_class = { - { &mp_lv_font_class_t_type }, - (lv_font_class_t*)&lv_binfont_font_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_text_mpobj, 3, mp_lv_label_ins_text, lv_tabview_set_tab_text); +/* Reusing lv_roller_set_selected for lv_tabview_set_active */ -/* - * lvgl lv_builtin_font_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_active_mpobj, 3, mp_lv_roller_set_selected, lv_tabview_set_active); + +/* Reusing lv_obj_set_scroll_dir for lv_tabview_set_tab_bar_position */ -static const mp_lv_struct_t mp_lv_builtin_font_class = { - { &mp_lv_font_class_t_type }, - (lv_font_class_t*)&lv_builtin_font_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_position_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_tabview_set_tab_bar_position); +/* Reusing lv_obj_move_to_index for lv_tabview_set_tab_bar_size */ -/* - * lvgl lv_image_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_set_tab_bar_size_mpobj, 2, mp_lv_obj_move_to_index, lv_tabview_set_tab_bar_size); + +/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_count */ -static const mp_lv_struct_t mp_lv_image_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_image_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_count_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_count); + +/* Reusing lv_obj_get_event_count for lv_tabview_get_tab_active */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_active_mpobj, 1, mp_lv_obj_get_event_count, lv_tabview_get_tab_active); /* - * lvgl lv_animimg_class global definitions + * lvgl extension definition for: + * lv_obj_t *lv_tabview_get_tab_button(lv_obj_t *obj, int32_t idx) */ -static const mp_lv_struct_t mp_lv_animimg_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_animimg_class -}; +static mp_obj_t mp_lv_tabview_get_tab_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_button_mpobj, 2, mp_lv_tabview_get_tab_button, lv_tabview_get_tab_button); +/* Reusing lv_obj_create for lv_tabview_get_content */ -/* - * lvgl lv_arc_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_content_mpobj, 1, mp_lv_obj_create, lv_tabview_get_content); + +/* Reusing lv_obj_create for lv_tabview_get_tab_bar */ -static const mp_lv_struct_t mp_lv_arc_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_arc_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_mpobj, 1, mp_lv_obj_create, lv_tabview_get_tab_bar); +/* Reusing lv_spinbox_get_digit_step_direction for lv_tabview_get_tab_bar_position */ -/* - * lvgl lv_arclabel_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_get_tab_bar_position_mpobj, 1, mp_lv_spinbox_get_digit_step_direction, lv_tabview_get_tab_bar_position); + +/* Reusing lv_obj_create for lv_tabview_create */ -static const mp_lv_struct_t mp_lv_arclabel_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_arclabel_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tabview_create_mpobj, 1, mp_lv_obj_create, lv_tabview_create); /* - * lvgl lv_label_class global definitions + * lvgl tabview object definitions */ + -static const mp_lv_struct_t mp_lv_label_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_label_class +static const mp_rom_map_elem_t tabview_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_tab), MP_ROM_PTR(&mp_lv_tabview_add_tab_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tab_text), MP_ROM_PTR(&mp_lv_tabview_set_tab_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_active), MP_ROM_PTR(&mp_lv_tabview_set_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_position_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tab_bar_size), MP_ROM_PTR(&mp_lv_tabview_set_tab_bar_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_count), MP_ROM_PTR(&mp_lv_tabview_get_tab_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_active), MP_ROM_PTR(&mp_lv_tabview_get_tab_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_button), MP_ROM_PTR(&mp_lv_tabview_get_tab_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_tabview_get_content_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_bar), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tab_bar_position), MP_ROM_PTR(&mp_lv_tabview_get_tab_bar_position_mpobj) } }; - -/* - * lvgl lv_bar_class global definitions - */ +static MP_DEFINE_CONST_DICT(tabview_locals_dict, tabview_locals_dict_table); -static const mp_lv_struct_t mp_lv_bar_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_bar_class +static void tabview_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl tabview"); +} + + +static mp_obj_t tabview_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_tabview_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tabview_type_base, + MP_QSTR_tabview, + MP_TYPE_FLAG_NONE, + print, tabview_print, + make_new, tabview_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &tabview_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tabview_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_tabview_class, +#endif + .mp_obj_type = &mp_lv_tabview_type_base, }; /* - * lvgl lv_button_class global definitions + * lvgl extension definition for: + * lv_obj_t *lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir) */ -static const mp_lv_struct_t mp_lv_button_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_button_class -}; +static mp_obj_t mp_lv_tileview_add_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *tv = mp_to_lv(mp_args[0]); + uint8_t col_id = (uint8_t)mp_obj_get_int(mp_args[1]); + uint8_t row_id = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_dir_t dir = (int)mp_obj_get_int(mp_args[3]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, uint8_t, uint8_t, lv_dir_t))lv_func_ptr)(tv, col_id, row_id, dir); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_add_tile_mpobj, 4, mp_lv_tileview_add_tile, lv_tileview_add_tile); /* - * lvgl lv_buttonmatrix_class global definitions + * lvgl extension definition for: + * void lv_tileview_set_tile(lv_obj_t *obj, lv_obj_t *tile_obj, lv_anim_enable_t anim_en) */ -static const mp_lv_struct_t mp_lv_buttonmatrix_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_buttonmatrix_class -}; +static mp_obj_t mp_lv_tileview_set_tile(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *tile_obj = mp_to_lv(mp_args[1]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, tile_obj, anim_en); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_mpobj, 3, mp_lv_tileview_set_tile, lv_tileview_set_tile); /* - * lvgl lv_calendar_class global definitions + * lvgl extension definition for: + * void lv_tileview_set_tile_by_index(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en) */ -static const mp_lv_struct_t mp_lv_calendar_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_calendar_class -}; +static mp_obj_t mp_lv_tileview_set_tile_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *tv = mp_to_lv(mp_args[0]); + uint32_t col_id = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t row_id = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_anim_enable_t))lv_func_ptr)(tv, col_id, row_id, anim_en); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_set_tile_by_index_mpobj, 4, mp_lv_tileview_set_tile_by_index, lv_tileview_set_tile_by_index); +/* Reusing lv_obj_create for lv_tileview_get_tile_active */ -/* - * lvgl lv_calendar_header_arrow_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_get_tile_active_mpobj, 1, mp_lv_obj_create, lv_tileview_get_tile_active); + +/* Reusing lv_obj_create for lv_tileview_create */ -static const mp_lv_struct_t mp_lv_calendar_header_arrow_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_calendar_header_arrow_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tileview_create_mpobj, 1, mp_lv_obj_create, lv_tileview_create); /* - * lvgl lv_calendar_header_dropdown_class global definitions + * lvgl tileview object definitions */ + -static const mp_lv_struct_t mp_lv_calendar_header_dropdown_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_calendar_header_dropdown_class +static const mp_rom_map_elem_t tileview_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_tile), MP_ROM_PTR(&mp_lv_tileview_add_tile_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tile), MP_ROM_PTR(&mp_lv_tileview_set_tile_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tile_by_index), MP_ROM_PTR(&mp_lv_tileview_set_tile_by_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tile_active), MP_ROM_PTR(&mp_lv_tileview_get_tile_active_mpobj) } }; - -/* - * lvgl lv_canvas_class global definitions - */ +static MP_DEFINE_CONST_DICT(tileview_locals_dict, tileview_locals_dict_table); -static const mp_lv_struct_t mp_lv_canvas_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_canvas_class +static void tileview_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl tileview"); +} + + +static mp_obj_t tileview_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_tileview_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tileview_type_base, + MP_QSTR_tileview, + MP_TYPE_FLAG_NONE, + print, tileview_print, + make_new, tileview_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &tileview_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_tileview_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_tileview_class, +#endif + .mp_obj_type = &mp_lv_tileview_type_base, }; +/* Reusing lv_list_add_text for lv_win_add_title */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_title_mpobj, 2, mp_lv_list_add_text, lv_win_add_title); + /* - * lvgl lv_chart_class global definitions + * lvgl extension definition for: + * lv_obj_t *lv_win_add_button(lv_obj_t *win, const void *icon, int32_t btn_w) */ -static const mp_lv_struct_t mp_lv_chart_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_chart_class -}; +static mp_obj_t mp_lv_win_add_button(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *win = mp_to_lv(mp_args[0]); + const void *icon = (const void *)mp_to_ptr(mp_args[1]); + int32_t btn_w = (int32_t)mp_obj_get_int(mp_args[2]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, int32_t))lv_func_ptr)(win, icon, btn_w); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_add_button_mpobj, 3, mp_lv_win_add_button, lv_win_add_button); +/* Reusing lv_obj_create for lv_win_get_header */ -/* - * lvgl lv_checkbox_class global definitions - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_header_mpobj, 1, mp_lv_obj_create, lv_win_get_header); + +/* Reusing lv_obj_create for lv_win_get_content */ -static const mp_lv_struct_t mp_lv_checkbox_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_checkbox_class -}; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_get_content_mpobj, 1, mp_lv_obj_create, lv_win_get_content); + +/* Reusing lv_obj_create for lv_win_create */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_win_create_mpobj, 1, mp_lv_obj_create, lv_win_create); /* - * lvgl lv_dropdown_class global definitions + * lvgl win object definitions */ + -static const mp_lv_struct_t mp_lv_dropdown_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_dropdown_class +static const mp_rom_map_elem_t win_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_add_title), MP_ROM_PTR(&mp_lv_win_add_title_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_button), MP_ROM_PTR(&mp_lv_win_add_button_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_header), MP_ROM_PTR(&mp_lv_win_get_header_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_content), MP_ROM_PTR(&mp_lv_win_get_content_mpobj) } }; - -/* - * lvgl lv_dropdownlist_class global definitions - */ +static MP_DEFINE_CONST_DICT(win_locals_dict, win_locals_dict_table); -static const mp_lv_struct_t mp_lv_dropdownlist_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_dropdownlist_class +static void win_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "lvgl win"); +} + + +static mp_obj_t win_make_new( + const mp_obj_type_t *type, + size_t n_args, + size_t n_kw, + const mp_obj_t *args) +{ + return make_new(&mp_lv_win_create_mpobj, type, n_args, n_kw, args); +} + + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_win_type_base, + MP_QSTR_win, + MP_TYPE_FLAG_NONE, + print, win_print, + make_new, win_make_new, + binary_op, mp_lv_obj_binary_op, + attr, call_parent_methods, + buffer, mp_lv_obj_get_buffer, + parent, &mp_lv_obj_type_base, + locals_dict, &win_locals_dict +); + +GENMPY_UNUSED static const mp_lv_obj_type_t mp_lv_win_type = { +#ifdef LV_OBJ_T + .lv_obj_class = &lv_win_class, +#endif + .mp_obj_type = &mp_lv_win_type_base, }; /* - * lvgl lv_gif_class global definitions + * lvgl lv_color_filter_shade global definitions */ -static const mp_lv_struct_t mp_lv_gif_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_gif_class +static const mp_lv_struct_t mp_lv_color_filter_shade = { + { &mp_lv_color_filter_dsc_t_type }, + (lv_color_filter_dsc_t*)&lv_color_filter_shade }; /* - * lvgl lv_imagebutton_class global definitions + * lvgl lv_font_montserrat_14 global definitions */ -static const mp_lv_struct_t mp_lv_imagebutton_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_imagebutton_class +#if LV_FONT_MONTSERRAT_14 +static const mp_lv_struct_t mp_lv_font_montserrat_14 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_14 }; +#endif /* - * lvgl lv_keyboard_class global definitions + * lvgl lv_font_montserrat_16 global definitions */ -static const mp_lv_struct_t mp_lv_keyboard_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_keyboard_class +#if LV_FONT_MONTSERRAT_16 +static const mp_lv_struct_t mp_lv_font_montserrat_16 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_16 }; +#endif /* - * lvgl lv_led_class global definitions + * lvgl lv_font_montserrat_24 global definitions */ -static const mp_lv_struct_t mp_lv_led_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_led_class +#if LV_FONT_MONTSERRAT_24 +static const mp_lv_struct_t mp_lv_font_montserrat_24 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_24 }; +#endif /* - * lvgl lv_line_class global definitions + * lvgl lv_font_montserrat_32 global definitions */ -static const mp_lv_struct_t mp_lv_line_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_line_class +#if LV_FONT_MONTSERRAT_32 +static const mp_lv_struct_t mp_lv_font_montserrat_32 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_32 }; +#endif /* - * lvgl lv_list_class global definitions + * lvgl lv_font_montserrat_40 global definitions */ -static const mp_lv_struct_t mp_lv_list_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_list_class +#if LV_FONT_MONTSERRAT_40 +static const mp_lv_struct_t mp_lv_font_montserrat_40 = { + { &mp_lv_font_t_type }, + (lv_font_t*)&lv_font_montserrat_40 }; +#endif +/* Global struct wrapper for int */ + +typedef struct { + int value; +} _lv_mp_int_wrapper; + /* - * lvgl lv_list_text_class global definitions + * Struct _lv_mp_int_wrapper */ -static const mp_lv_struct_t mp_lv_list_text_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_list_text_class -}; +static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr__lv_mp_int_wrapper(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp__lv_mp_int_wrapper_type())); + return (_lv_mp_int_wrapper*)self->data; +} + +#define mp_write__lv_mp_int_wrapper(struct_obj) *((_lv_mp_int_wrapper*)mp_write_ptr__lv_mp_int_wrapper(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr__lv_mp_int_wrapper(void *field) +{ + return lv_to_mp_struct(get_mp__lv_mp_int_wrapper_type(), field); +} + +#define mp_read__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(copy_buffer(&field, sizeof(_lv_mp_int_wrapper))) +#define mp_read_byref__lv_mp_int_wrapper(field) mp_read_ptr__lv_mp_int_wrapper(&field) + +static void mp__lv_mp_int_wrapper_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED _lv_mp_int_wrapper *data = (_lv_mp_int_wrapper*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_value: dest[0] = mp_obj_new_int(data->value); break; // converting from int; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_value: data->value = (int)mp_obj_get_int(dest[1]); break; // converting to int; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp__lv_mp_int_wrapper_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct _lv_mp_int_wrapper"); +} + +static const mp_obj_dict_t mp__lv_mp_int_wrapper_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp__lv_mp_int_wrapper_type, + MP_QSTR__lv_mp_int_wrapper, + MP_TYPE_FLAG_NONE, + print, mp__lv_mp_int_wrapper_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp__lv_mp_int_wrapper_attr, + locals_dict, &mp__lv_mp_int_wrapper_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp__lv_mp_int_wrapper_type(void) +{ + return &mp__lv_mp_int_wrapper_type; +} /* - * lvgl lv_list_button_class global definitions + * lvgl lv_style_const_prop_id_inv global definitions */ -static const mp_lv_struct_t mp_lv_list_button_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_list_button_class +static const mp_lv_struct_t mp_lv_style_const_prop_id_inv = { + { &mp__lv_mp_int_wrapper_type }, + (lv_style_prop_t*)&lv_style_const_prop_id_inv }; /* - * lvgl lv_menu_class global definitions + * lvgl lv_obj_class global definitions */ -static const mp_lv_struct_t mp_lv_menu_class = { +static const mp_lv_struct_t mp_lv_obj_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_class + (lv_obj_class_t*)&lv_obj_class }; +#define funcptr_create_cb NULL + /* - * lvgl lv_menu_page_class global definitions + * Struct lv_font_info_t */ -static const mp_lv_struct_t mp_lv_menu_page_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_page_class -}; +static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_info_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_info_t_type())); + return (lv_font_info_t*)self->data; +} + +#define mp_write_lv_font_info_t(struct_obj) *((lv_font_info_t*)mp_write_ptr_lv_font_info_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_info_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_font_info_t_type(), field); +} + +#define mp_read_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(copy_buffer(&field, sizeof(lv_font_info_t))) +#define mp_read_byref_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(&field) + +static void mp_lv_font_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_font_info_t *data = (lv_font_info_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_font_class_t *; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; + case MP_QSTR_render_mode: dest[0] = mp_obj_new_int_from_uint(data->render_mode); break; // converting from uint32_t; + case MP_QSTR_style: dest[0] = mp_obj_new_int_from_uint(data->style); break; // converting from uint32_t; + case MP_QSTR_weight: dest[0] = mp_obj_new_int(data->weight); break; // converting from int32_t; + case MP_QSTR_kerning: dest[0] = mp_obj_new_int(data->kerning); break; // converting from lv_font_kerning_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_class_t *; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_render_mode: data->render_mode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_style: data->style = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_weight: data->weight = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_kerning: data->kerning = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_kerning_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_font_info_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_font_info_t"); +} + +static const mp_obj_dict_t mp_lv_font_info_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_font_info_t_type, + MP_QSTR_lv_font_info_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_font_info_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_font_info_t_attr, + locals_dict, &mp_lv_font_info_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_font_info_t_type(void) +{ + return &mp_lv_font_info_t_type; +} /* - * lvgl lv_menu_cont_class global definitions + * lvgl extension definition for: + * lv_font_t *create_cb(const lv_font_info_t *info, const void *src) */ -static const mp_lv_struct_t mp_lv_menu_cont_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_cont_class +static mp_obj_t mp_funcptr_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_font_info_t *info = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + lv_font_t * _res = ((lv_font_t *(*)(const lv_font_info_t *, const void *))lv_func_ptr)(info, src); + return mp_read_ptr_lv_font_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_create_cb_mpobj, 2, mp_funcptr_create_cb, funcptr_create_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_create_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_create_cb_callback' + * lv_font_t *(*create_cb)(const lv_font_info_t *info, const void *src) + */ + +#define funcptr_delete_cb NULL + + +/* + * lvgl extension definition for: + * void delete_cb(lv_font_t *font) + */ + +static mp_obj_t mp_funcptr_delete_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); + ((void (*)(lv_font_t *))lv_func_ptr)(font); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_delete_cb_mpobj, 1, mp_funcptr_delete_cb, funcptr_delete_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_delete_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_delete_cb_callback' + * void (*delete_cb)(lv_font_t *font) + */ + +#define funcptr_dup_src_cb NULL + + +/* + * lvgl extension definition for: + * void *dup_src_cb(const void *src) + */ + +static mp_obj_t mp_funcptr_dup_src_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const void *src = (const void *)mp_to_ptr(mp_args[0]); + void * _res = ((void *(*)(const void *))lv_func_ptr)(src); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dup_src_cb_mpobj, 1, mp_funcptr_dup_src_cb, funcptr_dup_src_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dup_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_dup_src_cb_callback' + * void *(*dup_src_cb)(const void *src) + */ + +#define funcptr_free_src_cb NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_free_src_cb */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_free_src_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_free_src_cb); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_free_src_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_class_t_free_src_cb_callback' + * void (*free_src_cb)(void *src) + */ + + +/* + * Struct lv_font_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_class_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_class_t_type())); + return (lv_font_class_t*)self->data; +} + +#define mp_write_lv_font_class_t(struct_obj) *((lv_font_class_t*)mp_write_ptr_lv_font_class_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_class_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_font_class_t_type(), field); +} + +#define mp_read_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(copy_buffer(&field, sizeof(lv_font_class_t))) +#define mp_read_byref_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(&field) + +static void mp_lv_font_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_font_class_t *data = (lv_font_class_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_create_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_create_cb_mpobj, (void*)data->create_cb, NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL); break; // converting from callback lv_font_t *(*)(lv_font_info_t *info, void *src); + case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_delete_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL); break; // converting from callback void (*)(lv_font_t *font); + case MP_QSTR_dup_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dup_src_cb_mpobj, (void*)data->dup_src_cb, NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL); break; // converting from callback void *(*)(void *src); + case MP_QSTR_free_src_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_free_src_cb_mpobj, (void*)data->free_src_cb, NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL); break; // converting from callback void (*)(void *src); + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_create_cb: data->create_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_create_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_font_t *(*)(lv_font_info_t *info, void *src); + case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font); + case MP_QSTR_dup_src_cb: data->dup_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_dup_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(void *src); + case MP_QSTR_free_src_cb: data->free_src_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_class_t_free_src_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(void *src); + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_font_class_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_font_class_t"); +} + +static const mp_obj_dict_t mp_lv_font_class_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_font_class_t_type, + MP_QSTR_lv_font_class_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_font_class_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_font_class_t_attr, + locals_dict, &mp_lv_font_class_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_font_class_t_type(void) +{ + return &mp_lv_font_class_t_type; +} + + +/* + * lvgl lv_binfont_font_class global definitions + */ + +static const mp_lv_struct_t mp_lv_binfont_font_class = { + { &mp_lv_font_class_t_type }, + (lv_font_class_t*)&lv_binfont_font_class }; /* - * lvgl lv_menu_section_class global definitions + * lvgl lv_builtin_font_class global definitions */ -static const mp_lv_struct_t mp_lv_menu_section_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_section_class +static const mp_lv_struct_t mp_lv_builtin_font_class = { + { &mp_lv_font_class_t_type }, + (lv_font_class_t*)&lv_builtin_font_class }; /* - * lvgl lv_menu_separator_class global definitions + * lvgl lv_image_class global definitions */ -static const mp_lv_struct_t mp_lv_menu_separator_class = { +static const mp_lv_struct_t mp_lv_image_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_separator_class + (lv_obj_class_t*)&lv_image_class }; /* - * lvgl lv_menu_sidebar_cont_class global definitions + * lvgl lv_animimg_class global definitions */ -static const mp_lv_struct_t mp_lv_menu_sidebar_cont_class = { +static const mp_lv_struct_t mp_lv_animimg_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_sidebar_cont_class + (lv_obj_class_t*)&lv_animimg_class }; /* - * lvgl lv_menu_main_cont_class global definitions + * lvgl lv_arc_class global definitions */ -static const mp_lv_struct_t mp_lv_menu_main_cont_class = { +static const mp_lv_struct_t mp_lv_arc_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_main_cont_class + (lv_obj_class_t*)&lv_arc_class }; /* - * lvgl lv_menu_sidebar_header_cont_class global definitions + * lvgl lv_arclabel_class global definitions */ -static const mp_lv_struct_t mp_lv_menu_sidebar_header_cont_class = { +static const mp_lv_struct_t mp_lv_arclabel_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_sidebar_header_cont_class + (lv_obj_class_t*)&lv_arclabel_class }; /* - * lvgl lv_menu_main_header_cont_class global definitions + * lvgl lv_label_class global definitions */ -static const mp_lv_struct_t mp_lv_menu_main_header_cont_class = { +static const mp_lv_struct_t mp_lv_label_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_menu_main_header_cont_class + (lv_obj_class_t*)&lv_label_class }; /* - * lvgl lv_msgbox_class global definitions + * lvgl lv_bar_class global definitions */ -static const mp_lv_struct_t mp_lv_msgbox_class = { +static const mp_lv_struct_t mp_lv_bar_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_class + (lv_obj_class_t*)&lv_bar_class }; /* - * lvgl lv_msgbox_header_class global definitions + * lvgl lv_canvas_class global definitions */ -static const mp_lv_struct_t mp_lv_msgbox_header_class = { +static const mp_lv_struct_t mp_lv_canvas_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_header_class + (lv_obj_class_t*)&lv_canvas_class }; /* - * lvgl lv_msgbox_content_class global definitions + * lvgl lv_barcode_class global definitions */ -static const mp_lv_struct_t mp_lv_msgbox_content_class = { +static const mp_lv_struct_t mp_lv_barcode_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_content_class + (lv_obj_class_t*)&lv_barcode_class }; /* - * lvgl lv_msgbox_footer_class global definitions + * lvgl lv_button_class global definitions */ -static const mp_lv_struct_t mp_lv_msgbox_footer_class = { +static const mp_lv_struct_t mp_lv_button_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_footer_class + (lv_obj_class_t*)&lv_button_class }; /* - * lvgl lv_msgbox_header_button_class global definitions + * lvgl lv_buttonmatrix_class global definitions */ -static const mp_lv_struct_t mp_lv_msgbox_header_button_class = { +static const mp_lv_struct_t mp_lv_buttonmatrix_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_header_button_class + (lv_obj_class_t*)&lv_buttonmatrix_class }; /* - * lvgl lv_msgbox_footer_button_class global definitions + * lvgl lv_calendar_class global definitions */ -static const mp_lv_struct_t mp_lv_msgbox_footer_button_class = { +static const mp_lv_struct_t mp_lv_calendar_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_footer_button_class + (lv_obj_class_t*)&lv_calendar_class }; /* - * lvgl lv_msgbox_backdrop_class global definitions + * lvgl lv_calendar_header_arrow_class global definitions */ -static const mp_lv_struct_t mp_lv_msgbox_backdrop_class = { +static const mp_lv_struct_t mp_lv_calendar_header_arrow_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_msgbox_backdrop_class + (lv_obj_class_t*)&lv_calendar_header_arrow_class }; /* - * lvgl lv_roller_class global definitions + * lvgl lv_calendar_header_dropdown_class global definitions */ -static const mp_lv_struct_t mp_lv_roller_class = { +static const mp_lv_struct_t mp_lv_calendar_header_dropdown_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_roller_class + (lv_obj_class_t*)&lv_calendar_header_dropdown_class }; /* - * lvgl lv_scale_class global definitions + * lvgl lv_chart_class global definitions */ -static const mp_lv_struct_t mp_lv_scale_class = { +static const mp_lv_struct_t mp_lv_chart_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_scale_class + (lv_obj_class_t*)&lv_chart_class }; /* - * lvgl lv_slider_class global definitions + * lvgl lv_checkbox_class global definitions */ -static const mp_lv_struct_t mp_lv_slider_class = { +static const mp_lv_struct_t mp_lv_checkbox_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_slider_class + (lv_obj_class_t*)&lv_checkbox_class }; /* - * lvgl lv_spangroup_class global definitions + * lvgl lv_dropdown_class global definitions */ -static const mp_lv_struct_t mp_lv_spangroup_class = { +static const mp_lv_struct_t mp_lv_dropdown_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_spangroup_class + (lv_obj_class_t*)&lv_dropdown_class }; /* - * lvgl lv_textarea_class global definitions + * lvgl lv_dropdownlist_class global definitions */ -static const mp_lv_struct_t mp_lv_textarea_class = { +static const mp_lv_struct_t mp_lv_dropdownlist_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_textarea_class + (lv_obj_class_t*)&lv_dropdownlist_class }; /* - * lvgl lv_spinbox_class global definitions + * lvgl lv_gif_class global definitions */ -static const mp_lv_struct_t mp_lv_spinbox_class = { +static const mp_lv_struct_t mp_lv_gif_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_spinbox_class + (lv_obj_class_t*)&lv_gif_class }; /* - * lvgl lv_spinner_class global definitions + * lvgl lv_imagebutton_class global definitions */ -static const mp_lv_struct_t mp_lv_spinner_class = { +static const mp_lv_struct_t mp_lv_imagebutton_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_spinner_class + (lv_obj_class_t*)&lv_imagebutton_class }; /* - * lvgl lv_switch_class global definitions + * lvgl lv_keyboard_class global definitions */ -static const mp_lv_struct_t mp_lv_switch_class = { +static const mp_lv_struct_t mp_lv_keyboard_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_switch_class + (lv_obj_class_t*)&lv_keyboard_class }; /* - * lvgl lv_table_class global definitions + * lvgl lv_led_class global definitions */ -static const mp_lv_struct_t mp_lv_table_class = { +static const mp_lv_struct_t mp_lv_led_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_table_class + (lv_obj_class_t*)&lv_led_class }; /* - * lvgl lv_tabview_class global definitions + * lvgl lv_line_class global definitions */ -static const mp_lv_struct_t mp_lv_tabview_class = { +static const mp_lv_struct_t mp_lv_line_class = { { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_tabview_class + (lv_obj_class_t*)&lv_line_class }; -/* - * lvgl lv_tileview_class global definitions - */ +/* + * lvgl lv_list_class global definitions + */ + +static const mp_lv_struct_t mp_lv_list_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_list_class +}; + + +/* + * lvgl lv_list_text_class global definitions + */ + +static const mp_lv_struct_t mp_lv_list_text_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_list_text_class +}; + + +/* + * lvgl lv_list_button_class global definitions + */ + +static const mp_lv_struct_t mp_lv_list_button_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_list_button_class +}; + + +/* + * lvgl lv_menu_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_class +}; + + +/* + * lvgl lv_menu_page_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_page_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_page_class +}; + + +/* + * lvgl lv_menu_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_cont_class +}; + + +/* + * lvgl lv_menu_section_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_section_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_section_class +}; + + +/* + * lvgl lv_menu_separator_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_separator_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_separator_class +}; + + +/* + * lvgl lv_menu_sidebar_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_sidebar_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_sidebar_cont_class +}; + + +/* + * lvgl lv_menu_main_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_main_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_main_cont_class +}; + + +/* + * lvgl lv_menu_sidebar_header_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_sidebar_header_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_sidebar_header_cont_class +}; + + +/* + * lvgl lv_menu_main_header_cont_class global definitions + */ + +static const mp_lv_struct_t mp_lv_menu_main_header_cont_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_menu_main_header_cont_class +}; + + +/* + * lvgl lv_msgbox_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_class +}; + + +/* + * lvgl lv_msgbox_header_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_header_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_header_class +}; + + +/* + * lvgl lv_msgbox_content_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_content_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_content_class +}; + + +/* + * lvgl lv_msgbox_footer_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_footer_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_footer_class +}; + + +/* + * lvgl lv_msgbox_header_button_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_header_button_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_header_button_class +}; + + +/* + * lvgl lv_msgbox_footer_button_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_footer_button_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_footer_button_class +}; + + +/* + * lvgl lv_msgbox_backdrop_class global definitions + */ + +static const mp_lv_struct_t mp_lv_msgbox_backdrop_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_msgbox_backdrop_class +}; + + +/* + * lvgl lv_qrcode_class global definitions + */ + +static const mp_lv_struct_t mp_lv_qrcode_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_qrcode_class +}; + + +/* + * lvgl lv_roller_class global definitions + */ + +static const mp_lv_struct_t mp_lv_roller_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_roller_class +}; + + +/* + * lvgl lv_scale_class global definitions + */ + +static const mp_lv_struct_t mp_lv_scale_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_scale_class +}; + + +/* + * lvgl lv_slider_class global definitions + */ + +static const mp_lv_struct_t mp_lv_slider_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_slider_class +}; + + +/* + * lvgl lv_spangroup_class global definitions + */ + +static const mp_lv_struct_t mp_lv_spangroup_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_spangroup_class +}; + + +/* + * lvgl lv_textarea_class global definitions + */ + +static const mp_lv_struct_t mp_lv_textarea_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_textarea_class +}; + + +/* + * lvgl lv_spinbox_class global definitions + */ + +static const mp_lv_struct_t mp_lv_spinbox_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_spinbox_class +}; + + +/* + * lvgl lv_spinner_class global definitions + */ + +static const mp_lv_struct_t mp_lv_spinner_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_spinner_class +}; + + +/* + * lvgl lv_switch_class global definitions + */ + +static const mp_lv_struct_t mp_lv_switch_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_switch_class +}; + + +/* + * lvgl lv_table_class global definitions + */ + +static const mp_lv_struct_t mp_lv_table_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_table_class +}; + + +/* + * lvgl lv_tabview_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tabview_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_tabview_class +}; + + +/* + * lvgl lv_tileview_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tileview_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_tileview_class +}; + + +/* + * lvgl lv_tileview_tile_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tileview_tile_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_tileview_tile_class +}; + + +/* + * lvgl lv_win_class global definitions + */ + +static const mp_lv_struct_t mp_lv_win_class = { + { &mp_lv_obj_class_t_type }, + (lv_obj_class_t*)&lv_win_class +}; + + +/* + * lvgl lv_cache_class_lru_rb_count global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_rb_count = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_rb_count +}; + + +/* + * lvgl lv_cache_class_lru_rb_size global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_rb_size = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_rb_size +}; + + +/* + * lvgl lv_cache_class_lru_ll_count global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_ll_count = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_ll_count +}; + + +/* + * lvgl lv_cache_class_lru_ll_size global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_lru_ll_size = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_lru_ll_size +}; + + +/* + * lvgl lv_cache_class_sc_da global definitions + */ + +static const mp_lv_struct_t mp_lv_cache_class_sc_da = { + { &mp_lv_cache_class_t_type }, + (lv_cache_class_t*)&lv_cache_class_sc_da +}; + +#define funcptr_lv_tree_constructor_cb_t NULL + + +/* + * Struct lv_tree_node_t + */ + +static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_node_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_node_t_type())); + return (lv_tree_node_t*)self->data; +} + +#define mp_write_lv_tree_node_t(struct_obj) *((lv_tree_node_t*)mp_write_ptr_lv_tree_node_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_node_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_tree_node_t_type(), field); +} + +#define mp_read_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(copy_buffer(&field, sizeof(lv_tree_node_t))) +#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) + +static void mp_lv_tree_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_tree_node_t *data = (lv_tree_node_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_tree_node_t *; + case MP_QSTR_children: dest[0] = ptr_to_mp((void*)data->children); break; // converting from lv_tree_node_t **; + case MP_QSTR_child_cnt: dest[0] = mp_obj_new_int_from_uint(data->child_cnt); break; // converting from uint32_t; + case MP_QSTR_child_cap: dest[0] = mp_obj_new_int_from_uint(data->child_cap); break; // converting from uint32_t; + case MP_QSTR_class_p: dest[0] = ptr_to_mp((void*)data->class_p); break; // converting from lv_tree_class_t *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t *; + case MP_QSTR_children: data->children = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_node_t **; + case MP_QSTR_child_cnt: data->child_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_child_cap: data->child_cap = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_class_p: data->class_p = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_tree_node_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_tree_node_t"); +} + +static const mp_obj_dict_t mp_lv_tree_node_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tree_node_t_type, + MP_QSTR_lv_tree_node_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_tree_node_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_tree_node_t_attr, + locals_dict, &mp_lv_tree_node_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_tree_node_t_type(void) +{ + return &mp_lv_tree_node_t_type; +} + + +/* + * lvgl extension definition for: + * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + */ + +static mp_obj_t mp_funcptr_lv_tree_constructor_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_to_ptr(mp_args[0]); + lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[1]); + ((void (*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, node); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tree_constructor_cb_t_mpobj, 2, mp_funcptr_lv_tree_constructor_cb_t, funcptr_lv_tree_constructor_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tree_constructor_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_constructor_cb_callback' + * lv_tree_constructor_cb_t constructor_cb + */ + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_tree_class_t_destructor_cb_callback' + * lv_tree_destructor_cb_t destructor_cb + */ + + +/* + * Struct lv_tree_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_tree_class_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_tree_class_t_type())); + return (lv_tree_class_t*)self->data; +} + +#define mp_write_lv_tree_class_t(struct_obj) *((lv_tree_class_t*)mp_write_ptr_lv_tree_class_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_tree_class_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_tree_class_t_type(), field); +} + +#define mp_read_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(copy_buffer(&field, sizeof(lv_tree_class_t))) +#define mp_read_byref_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(&field) + +static void mp_lv_tree_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_tree_class_t *data = (lv_tree_class_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_tree_class_t *; + case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; + case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->constructor_cb, NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL); break; // converting from callback lv_tree_constructor_cb_t; + case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_tree_constructor_cb_t_mpobj, data->destructor_cb, NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL); break; // converting from callback lv_tree_destructor_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_tree_class_t *; + case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_constructor_cb: data->constructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_constructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_constructor_cb_t; + case MP_QSTR_destructor_cb: data->destructor_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_tree_class_t_destructor_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_tree_destructor_cb_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_tree_class_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_tree_class_t"); +} + +static const mp_obj_dict_t mp_lv_tree_class_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_tree_class_t_type, + MP_QSTR_lv_tree_class_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_tree_class_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_tree_class_t_attr, + locals_dict, &mp_lv_tree_class_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_tree_class_t_type(void) +{ + return &mp_lv_tree_class_t_type; +} + + +/* + * lvgl lv_tree_node_class global definitions + */ + +static const mp_lv_struct_t mp_lv_tree_node_class = { + { &mp_lv_tree_class_t_type }, + (lv_tree_class_t*)&lv_tree_node_class +}; + + +/* + * lvgl _nesting global definitions + */ + +static const mp_lv_struct_t mp__nesting = { + { &mp__lv_mp_int_wrapper_type }, + (int*)&_nesting +}; + + +/* + * Struct lv_color16_t + */ + +static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color16_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color16_t_type())); + return (lv_color16_t*)self->data; +} + +#define mp_write_lv_color16_t(struct_obj) *((lv_color16_t*)mp_write_ptr_lv_color16_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color16_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_color16_t_type(), field); +} + +#define mp_read_lv_color16_t(field) mp_read_ptr_lv_color16_t(copy_buffer(&field, sizeof(lv_color16_t))) +#define mp_read_byref_lv_color16_t(field) mp_read_ptr_lv_color16_t(&field) + +static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color16_t *data = (lv_color16_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint16_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint16_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_blue: data->blue = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_green: data->green = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_red: data->red = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_color16_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_color16_t"); +} + +static const mp_obj_dict_t mp_lv_color16_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color16_t_type, + MP_QSTR_lv_color16_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color16_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color16_t_attr, + locals_dict, &mp_lv_color16_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void) +{ + return &mp_lv_color16_t_type; +} + + +/* + * Struct lv_mem_monitor_t + */ + +static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_mem_monitor_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_mem_monitor_t_type())); + return (lv_mem_monitor_t*)self->data; +} + +#define mp_write_lv_mem_monitor_t(struct_obj) *((lv_mem_monitor_t*)mp_write_ptr_lv_mem_monitor_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_mem_monitor_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_mem_monitor_t_type(), field); +} + +#define mp_read_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(copy_buffer(&field, sizeof(lv_mem_monitor_t))) +#define mp_read_byref_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(&field) + +static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_mem_monitor_t *data = (lv_mem_monitor_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_total_size: dest[0] = mp_obj_new_int_from_uint(data->total_size); break; // converting from size_t; + case MP_QSTR_free_cnt: dest[0] = mp_obj_new_int_from_uint(data->free_cnt); break; // converting from size_t; + case MP_QSTR_free_size: dest[0] = mp_obj_new_int_from_uint(data->free_size); break; // converting from size_t; + case MP_QSTR_free_biggest_size: dest[0] = mp_obj_new_int_from_uint(data->free_biggest_size); break; // converting from size_t; + case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from size_t; + case MP_QSTR_max_used: dest[0] = mp_obj_new_int_from_uint(data->max_used); break; // converting from size_t; + case MP_QSTR_used_pct: dest[0] = mp_obj_new_int_from_uint(data->used_pct); break; // converting from uint8_t; + case MP_QSTR_frag_pct: dest[0] = mp_obj_new_int_from_uint(data->frag_pct); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_total_size: data->total_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_free_cnt: data->free_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_free_size: data->free_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_free_biggest_size: data->free_biggest_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_used_cnt: data->used_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_max_used: data->max_used = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_used_pct: data->used_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_frag_pct: data->frag_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_mem_monitor_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_mem_monitor_t"); +} + +static const mp_obj_dict_t mp_lv_mem_monitor_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_mem_monitor_t_type, + MP_QSTR_lv_mem_monitor_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_mem_monitor_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_mem_monitor_t_attr, + locals_dict, &mp_lv_mem_monitor_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void) +{ + return &mp_lv_mem_monitor_t_type; +} + +#define funcptr_lv_layout_update_cb_t NULL + +/* Reusing lv_obj_set_user_data for funcptr_lv_layout_update_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_funcptr_lv_layout_update_cb_t_mpobj, 2, mp_lv_obj_set_user_data, funcptr_lv_layout_update_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_layout_update_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_layout_callbacks_t_layout_update_cb_callback' + * lv_layout_update_cb_t layout_update_cb + */ + +#define funcptr_lv_layout_get_min_size_cb_t NULL + + +/* + * lvgl extension definition for: + * bool lv_layout_get_min_size_cb_t(lv_obj_t *, int32_t *req_size, bool width, void *user_data) + */ + +static mp_obj_t mp_funcptr_lv_layout_get_min_size_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[3]); + int32_t *req_size = mp_array_to_i32ptr(mp_args[1]); + bool width = mp_obj_is_true(mp_args[2]); + lv_obj_t *arg0 = mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(lv_obj_t *, int32_t *, bool, void *))lv_func_ptr)(arg0, req_size, width, user_data); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, 4, mp_funcptr_lv_layout_get_min_size_cb_t, funcptr_lv_layout_get_min_size_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_layout_get_min_size_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_layout_callbacks_t_get_min_size_cb_callback' + * lv_layout_get_min_size_cb_t get_min_size_cb + */ + + +/* + * Struct lv_layout_callbacks_t + */ + +static inline const mp_obj_type_t *get_mp_lv_layout_callbacks_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_layout_callbacks_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layout_callbacks_t_type())); + return (lv_layout_callbacks_t*)self->data; +} + +#define mp_write_lv_layout_callbacks_t(struct_obj) *((lv_layout_callbacks_t*)mp_write_ptr_lv_layout_callbacks_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layout_callbacks_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_layout_callbacks_t_type(), field); +} + +#define mp_read_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(copy_buffer(&field, sizeof(lv_layout_callbacks_t))) +#define mp_read_byref_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(&field) + +static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_layout_update_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, data->layout_update_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL); break; // converting from callback lv_layout_update_cb_t; + case MP_QSTR_get_min_size_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, data->get_min_size_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL); break; // converting from callback lv_layout_get_min_size_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_layout_update_cb: data->layout_update_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_update_cb_t; + case MP_QSTR_get_min_size_cb: data->get_min_size_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_get_min_size_cb_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_layout_callbacks_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_layout_callbacks_t"); +} + +static const mp_obj_dict_t mp_lv_layout_callbacks_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_layout_callbacks_t_type, + MP_QSTR_lv_layout_callbacks_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_layout_callbacks_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_layout_callbacks_t_attr, + locals_dict, &mp_lv_layout_callbacks_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_layout_callbacks_t_type(void) +{ + return &mp_lv_layout_callbacks_t_type; +} + +#define funcptr_lv_timer_handler_resume_cb_t NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_timer_handler_resume_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_timer_handler_resume_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_handler_resume_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Struct lv_draw_fill_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_fill_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_fill_dsc_t_type())); + return (lv_draw_fill_dsc_t*)self->data; +} + +#define mp_write_lv_draw_fill_dsc_t(struct_obj) *((lv_draw_fill_dsc_t*)mp_write_ptr_lv_draw_fill_dsc_t(struct_obj)) -static const mp_lv_struct_t mp_lv_tileview_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_tileview_class -}; - +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_fill_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_fill_dsc_t_type(), field); +} -/* - * lvgl lv_tileview_tile_class global definitions - */ +#define mp_read_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(copy_buffer(&field, sizeof(lv_draw_fill_dsc_t))) +#define mp_read_byref_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(&field) -static const mp_lv_struct_t mp_lv_tileview_tile_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_tileview_tile_class -}; - +static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)self->data; -/* - * lvgl lv_win_class global definitions - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; + default: return; + } -static const mp_lv_struct_t mp_lv_win_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_win_class -}; - + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -/* - * lvgl lv_barcode_class global definitions - */ +static void mp_lv_draw_fill_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_draw_fill_dsc_t"); +} -static const mp_lv_struct_t mp_lv_barcode_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_barcode_class -}; - +static const mp_obj_dict_t mp_lv_draw_fill_dsc_t_locals_dict; -/* - * lvgl lv_qrcode_class global definitions - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_fill_dsc_t_type, + MP_QSTR_lv_draw_fill_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_fill_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_fill_dsc_t_attr, + locals_dict, &mp_lv_draw_fill_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static const mp_lv_struct_t mp_lv_qrcode_class = { - { &mp_lv_obj_class_t_type }, - (lv_obj_class_t*)&lv_qrcode_class -}; +static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void) +{ + return &mp_lv_draw_fill_dsc_t_type; +} /* - * lvgl lv_cache_class_lru_rb_count global definitions + * Struct lv_draw_border_dsc_t */ -static const mp_lv_struct_t mp_lv_cache_class_lru_rb_count = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_rb_count -}; - +static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void); -/* - * lvgl lv_cache_class_lru_rb_size global definitions - */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_border_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_border_dsc_t_type())); + return (lv_draw_border_dsc_t*)self->data; +} -static const mp_lv_struct_t mp_lv_cache_class_lru_rb_size = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_rb_size -}; - +#define mp_write_lv_draw_border_dsc_t(struct_obj) *((lv_draw_border_dsc_t*)mp_write_ptr_lv_draw_border_dsc_t(struct_obj)) -/* - * lvgl lv_cache_class_lru_ll_count global definitions - */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_border_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_border_dsc_t_type(), field); +} -static const mp_lv_struct_t mp_lv_cache_class_lru_ll_count = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_ll_count -}; - +#define mp_read_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(copy_buffer(&field, sizeof(lv_draw_border_dsc_t))) +#define mp_read_byref_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(&field) -/* - * lvgl lv_cache_class_lru_ll_size global definitions - */ +static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)self->data; -static const mp_lv_struct_t mp_lv_cache_class_lru_ll_size = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_lru_ll_size -}; - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_border_side_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_border_side_t; + default: return; + } -/* - * lvgl lv_cache_class_sc_da global definitions - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static const mp_lv_struct_t mp_lv_cache_class_sc_da = { - { &mp_lv_cache_class_t_type }, - (lv_cache_class_t*)&lv_cache_class_sc_da -}; - +static void mp_lv_draw_border_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_draw_border_dsc_t"); +} -/* - * lvgl _nesting global definitions - */ +static const mp_obj_dict_t mp_lv_draw_border_dsc_t_locals_dict; -static const mp_lv_struct_t mp__nesting = { - { &mp__lv_mp_int_wrapper_type }, - (int*)&_nesting -}; +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_border_dsc_t_type, + MP_QSTR_lv_draw_border_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_border_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_border_dsc_t_attr, + locals_dict, &mp_lv_draw_border_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void) +{ + return &mp_lv_draw_border_dsc_t_type; +} /* - * Struct lv_color16_t + * Struct lv_draw_box_shadow_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color16_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color16_t_type())); - return (lv_color16_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_box_shadow_dsc_t_type())); + return (lv_draw_box_shadow_dsc_t*)self->data; } -#define mp_write_lv_color16_t(struct_obj) *((lv_color16_t*)mp_write_ptr_lv_color16_t(struct_obj)) +#define mp_write_lv_draw_box_shadow_dsc_t(struct_obj) *((lv_draw_box_shadow_dsc_t*)mp_write_ptr_lv_draw_box_shadow_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color16_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_box_shadow_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_color16_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_box_shadow_dsc_t_type(), field); } -#define mp_read_lv_color16_t(field) mp_read_ptr_lv_color16_t(copy_buffer(&field, sizeof(lv_color16_t))) -#define mp_read_byref_lv_color16_t(field) mp_read_ptr_lv_color16_t(&field) +#define mp_read_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(copy_buffer(&field, sizeof(lv_draw_box_shadow_dsc_t))) +#define mp_read_byref_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(&field) -static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color16_t *data = (lv_color16_t*)self->data; + GENMPY_UNUSED lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint16_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint16_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint16_t; + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; + case MP_QSTR_spread: dest[0] = mp_obj_new_int(data->spread); break; // converting from int32_t; + case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int32_t; + case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int32_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_bg_cover: dest[0] = mp_obj_new_int_from_uint(data->bg_cover); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29309,9 +31924,15 @@ static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_blue: data->blue = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_green: data->green = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_red: data->red = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_spread: data->spread = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ofs_x: data->ofs_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ofs_y: data->ofs_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_bg_cover: data->bg_cover = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -29320,74 +31941,82 @@ static void mp_lv_color16_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_color16_t_print(const mp_print_t *print, +static void mp_lv_draw_box_shadow_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color16_t"); + mp_printf(print, "struct lv_draw_box_shadow_dsc_t"); } -static const mp_obj_dict_t mp_lv_color16_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_box_shadow_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color16_t_type, - MP_QSTR_lv_color16_t, + mp_lv_draw_box_shadow_dsc_t_type, + MP_QSTR_lv_draw_box_shadow_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color16_t_print, + print, mp_lv_draw_box_shadow_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color16_t_attr, - locals_dict, &mp_lv_color16_t_locals_dict, + attr, mp_lv_draw_box_shadow_dsc_t_attr, + locals_dict, &mp_lv_draw_box_shadow_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color16_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void) { - return &mp_lv_color16_t_type; + return &mp_lv_draw_box_shadow_dsc_t_type; } /* - * Struct lv_mem_monitor_t + * Struct lv_draw_letter_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_mem_monitor_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_letter_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_mem_monitor_t_type())); - return (lv_mem_monitor_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_letter_dsc_t_type())); + return (lv_draw_letter_dsc_t*)self->data; } -#define mp_write_lv_mem_monitor_t(struct_obj) *((lv_mem_monitor_t*)mp_write_ptr_lv_mem_monitor_t(struct_obj)) +#define mp_write_lv_draw_letter_dsc_t(struct_obj) *((lv_draw_letter_dsc_t*)mp_write_ptr_lv_draw_letter_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_mem_monitor_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_letter_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_mem_monitor_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_letter_dsc_t_type(), field); } -#define mp_read_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(copy_buffer(&field, sizeof(lv_mem_monitor_t))) -#define mp_read_byref_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(&field) +#define mp_read_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(copy_buffer(&field, sizeof(lv_draw_letter_dsc_t))) +#define mp_read_byref_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(&field) -static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_mem_monitor_t *data = (lv_mem_monitor_t*)self->data; + GENMPY_UNUSED lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_total_size: dest[0] = mp_obj_new_int_from_uint(data->total_size); break; // converting from size_t; - case MP_QSTR_free_cnt: dest[0] = mp_obj_new_int_from_uint(data->free_cnt); break; // converting from size_t; - case MP_QSTR_free_size: dest[0] = mp_obj_new_int_from_uint(data->free_size); break; // converting from size_t; - case MP_QSTR_free_biggest_size: dest[0] = mp_obj_new_int_from_uint(data->free_biggest_size); break; // converting from size_t; - case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from size_t; - case MP_QSTR_max_used: dest[0] = mp_obj_new_int_from_uint(data->max_used); break; // converting from size_t; - case MP_QSTR_used_pct: dest[0] = mp_obj_new_int_from_uint(data->used_pct); break; // converting from uint8_t; - case MP_QSTR_frag_pct: dest[0] = mp_obj_new_int_from_uint(data->frag_pct); break; // converting from uint8_t; + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_unicode: dest[0] = mp_obj_new_int_from_uint(data->unicode); break; // converting from uint32_t; + case MP_QSTR_font: dest[0] = mp_read_ptr_lv_font_t((void*)data->font); break; // converting from lv_font_t *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; + case MP_QSTR_scale_x: dest[0] = mp_obj_new_int(data->scale_x); break; // converting from int32_t; + case MP_QSTR_scale_y: dest[0] = mp_obj_new_int(data->scale_y); break; // converting from int32_t; + case MP_QSTR_skew_x: dest[0] = mp_obj_new_int(data->skew_x); break; // converting from int32_t; + case MP_QSTR_skew_y: dest[0] = mp_obj_new_int(data->skew_y); break; // converting from int32_t; + case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_decor: dest[0] = mp_obj_new_int(data->decor); break; // converting from lv_text_decor_t; + case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; + case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29396,14 +32025,22 @@ static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest // store attribute switch(attr) { - case MP_QSTR_total_size: data->total_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_free_cnt: data->free_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_free_size: data->free_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_free_biggest_size: data->free_biggest_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_used_cnt: data->used_cnt = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_max_used: data->max_used = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; - case MP_QSTR_used_pct: data->used_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_frag_pct: data->frag_pct = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_unicode: data->unicode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_font: data->font = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_scale_x: data->scale_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_scale_y: data->scale_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_skew_x: data->skew_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_skew_y: data->skew_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_decor: data->decor = (int)mp_obj_get_int(dest[1]); break; // converting to lv_text_decor_t; + case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; + case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; default: return; } @@ -29412,129 +32049,204 @@ static void mp_lv_mem_monitor_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest } } -static void mp_lv_mem_monitor_t_print(const mp_print_t *print, +static void mp_lv_draw_letter_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_mem_monitor_t"); + mp_printf(print, "struct lv_draw_letter_dsc_t"); } -static const mp_obj_dict_t mp_lv_mem_monitor_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_letter_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_mem_monitor_t_type, - MP_QSTR_lv_mem_monitor_t, + mp_lv_draw_letter_dsc_t_type, + MP_QSTR_lv_draw_letter_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_mem_monitor_t_print, + print, mp_lv_draw_letter_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_mem_monitor_t_attr, - locals_dict, &mp_lv_mem_monitor_t_locals_dict, + attr, mp_lv_draw_letter_dsc_t_attr, + locals_dict, &mp_lv_draw_letter_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_mem_monitor_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void) { - return &mp_lv_mem_monitor_t_type; + return &mp_lv_draw_letter_dsc_t_type; } -#define funcptr_lv_delay_cb_t NULL - /* - * lvgl extension definition for: - * void lv_delay_cb_t(uint32_t ms) + * Struct lv_draw_glyph_dsc_t */ -static mp_obj_t mp_funcptr_lv_delay_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_glyph_dsc_t(mp_obj_t self_in) { - uint32_t ms = (uint32_t)mp_obj_get_int(mp_args[0]); - ((void (*)(uint32_t))lv_func_ptr)(ms); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_glyph_dsc_t_type())); + return (lv_draw_glyph_dsc_t*)self->data; } - +#define mp_write_lv_draw_glyph_dsc_t(struct_obj) *((lv_draw_glyph_dsc_t*)mp_write_ptr_lv_draw_glyph_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_delay_cb_t_mpobj, 1, mp_funcptr_lv_delay_cb_t, funcptr_lv_delay_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_delay_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_delay_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_glyph_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_glyph_dsc_t_type(), field); +} -#define funcptr_lv_tick_get_cb_t NULL +#define mp_read_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(copy_buffer(&field, sizeof(lv_draw_glyph_dsc_t))) +#define mp_read_byref_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(&field) +static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)self->data; -/* - * lvgl extension definition for: - * uint32_t lv_tick_get_cb_t(void) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_glyph_data: dest[0] = ptr_to_mp((void*)data->glyph_data); break; // converting from void *; + case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; + case MP_QSTR_letter_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->letter_coords); break; // converting from lv_area_t *; + case MP_QSTR_bg_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->bg_coords); break; // converting from lv_area_t *; + case MP_QSTR_g: dest[0] = mp_read_ptr_lv_font_glyph_dsc_t((void*)data->g); break; // converting from lv_font_glyph_dsc_t *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; + case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; + case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; + case MP_QSTR__draw_buf: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->_draw_buf); break; // converting from lv_draw_buf_t *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_glyph_data: data->glyph_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; + case MP_QSTR_letter_coords: data->letter_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_bg_coords: data->bg_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_g: data->g = (void*)mp_write_ptr_lv_font_glyph_dsc_t(dest[1]); break; // converting to lv_font_glyph_dsc_t *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR__draw_buf: data->_draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + default: return; + } -static mp_obj_t mp_funcptr_lv_tick_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - - uint32_t _res = ((uint32_t (*)(void))lv_func_ptr)(); - return mp_obj_new_int_from_uint(_res); + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tick_get_cb_t_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, funcptr_lv_tick_get_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tick_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tick_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +static void mp_lv_draw_glyph_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_draw_glyph_dsc_t"); +} -#define funcptr_lv_timer_handler_resume_cb_t NULL +static const mp_obj_dict_t mp_lv_draw_glyph_dsc_t_locals_dict; -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_timer_handler_resume_cb_t */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_glyph_dsc_t_type, + MP_QSTR_lv_draw_glyph_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_glyph_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_glyph_dsc_t_attr, + locals_dict, &mp_lv_draw_glyph_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_timer_handler_resume_cb_t); +static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void) +{ + return &mp_lv_draw_glyph_dsc_t_type; +} -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_handler_resume_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_handler_resume_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -#define funcptr_lv_async_cb_t NULL +/* + * Array convertors for char [64] + */ -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_async_cb_t */ +GENMPY_UNUSED static char *mp_arr_to_char___64__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + char *lv_arr = (char*)m_malloc(len * sizeof(char)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (char)mp_obj_get_int(item); + } + return (char *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_async_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_async_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_async_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_async_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static mp_obj_t mp_arr_from_char___64__(char *arr) +{ + mp_obj_t obj_arr[64]; + for (size_t i=0; i<64; i++){ + obj_arr[i] = mp_obj_new_int(arr[i]); + } + return mp_obj_new_list(64, obj_arr); // TODO: return custom iterable object! +} /* - * Struct lv_rb_node_t + * Struct lv_fs_path_ex_t */ -static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_node_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_path_ex_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_node_t_type())); - return (lv_rb_node_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_path_ex_t_type())); + return (lv_fs_path_ex_t*)self->data; } -#define mp_write_lv_rb_node_t(struct_obj) *((lv_rb_node_t*)mp_write_ptr_lv_rb_node_t(struct_obj)) +#define mp_write_lv_fs_path_ex_t(struct_obj) *((lv_fs_path_ex_t*)mp_write_ptr_lv_fs_path_ex_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_node_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_path_ex_t(void *field) { - return lv_to_mp_struct(get_mp_lv_rb_node_t_type(), field); + return lv_to_mp_struct(get_mp_lv_fs_path_ex_t_type(), field); } -#define mp_read_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(copy_buffer(&field, sizeof(lv_rb_node_t))) -#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) +#define mp_read_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(copy_buffer(&field, sizeof(lv_fs_path_ex_t))) +#define mp_read_byref_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(&field) -static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_rb_node_t *data = (lv_rb_node_t*)self->data; + GENMPY_UNUSED lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_rb_node_t *; - case MP_QSTR_left: dest[0] = ptr_to_mp((void*)data->left); break; // converting from lv_rb_node_t *; - case MP_QSTR_right: dest[0] = ptr_to_mp((void*)data->right); break; // converting from lv_rb_node_t *; - case MP_QSTR_color: dest[0] = mp_obj_new_int(data->color); break; // converting from lv_rb_color_t; - case MP_QSTR_data: dest[0] = ptr_to_mp((void*)data->data); break; // converting from void *; + case MP_QSTR_path: dest[0] = mp_arr_from_char___64__(data->path); break; // converting from char [64]; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29543,11 +32255,7 @@ static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_left: data->left = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_right: data->right = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_color: data->color = (int)mp_obj_get_int(dest[1]); break; // converting to lv_rb_color_t; - case MP_QSTR_data: data->data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_path: memcpy((void*)&data->path, mp_arr_to_char___64__(dest[1]), sizeof(char)*64); break; // converting to char [64]; default: return; } @@ -29556,98 +32264,68 @@ static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_rb_node_t_print(const mp_print_t *print, +static void mp_lv_fs_path_ex_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_rb_node_t"); + mp_printf(print, "struct lv_fs_path_ex_t"); } -static const mp_obj_dict_t mp_lv_rb_node_t_locals_dict; +static const mp_obj_dict_t mp_lv_fs_path_ex_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_rb_node_t_type, - MP_QSTR_lv_rb_node_t, + mp_lv_fs_path_ex_t_type, + MP_QSTR_lv_fs_path_ex_t, MP_TYPE_FLAG_NONE, - print, mp_lv_rb_node_t_print, + print, mp_lv_fs_path_ex_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_rb_node_t_attr, - locals_dict, &mp_lv_rb_node_t_locals_dict, + attr, mp_lv_fs_path_ex_t_attr, + locals_dict, &mp_lv_fs_path_ex_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void) -{ - return &mp_lv_rb_node_t_type; -} - -#define funcptr_lv_rb_compare_t NULL - - -/* - * lvgl extension definition for: - * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) - */ - -static mp_obj_t mp_funcptr_lv_rb_compare_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void) { - const void *a = (const void *)mp_to_ptr(mp_args[0]); - const void *b = (const void *)mp_to_ptr(mp_args[1]); - lv_rb_compare_res_t _res = ((lv_rb_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); - return mp_obj_new_int(_res); + return &mp_lv_fs_path_ex_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_rb_compare_t_mpobj, 2, mp_funcptr_lv_rb_compare_t, funcptr_lv_rb_compare_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_rb_t_compare_callback' - * lv_rb_compare_t compare - */ /* - * Struct lv_rb_t + * Struct lv_fs_dir_t */ -static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_dir_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_t_type())); - return (lv_rb_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_dir_t_type())); + return (lv_fs_dir_t*)self->data; } -#define mp_write_lv_rb_t(struct_obj) *((lv_rb_t*)mp_write_ptr_lv_rb_t(struct_obj)) +#define mp_write_lv_fs_dir_t(struct_obj) *((lv_fs_dir_t*)mp_write_ptr_lv_fs_dir_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_dir_t(void *field) { - return lv_to_mp_struct(get_mp_lv_rb_t_type(), field); + return lv_to_mp_struct(get_mp_lv_fs_dir_t_type(), field); } -#define mp_read_lv_rb_t(field) mp_read_ptr_lv_rb_t(copy_buffer(&field, sizeof(lv_rb_t))) -#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) +#define mp_read_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(copy_buffer(&field, sizeof(lv_fs_dir_t))) +#define mp_read_byref_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(&field) -static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_rb_t *data = (lv_rb_t*)self->data; + GENMPY_UNUSED lv_fs_dir_t *data = (lv_fs_dir_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_root: dest[0] = mp_read_ptr_lv_rb_node_t((void*)data->root); break; // converting from lv_rb_node_t *; - case MP_QSTR_compare: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, data->compare, NULL ,MP_QSTR_lv_rb_t_compare, NULL); break; // converting from callback lv_rb_compare_t; - case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; + case MP_QSTR_dir_d: dest[0] = ptr_to_mp((void*)data->dir_d); break; // converting from void *; + case MP_QSTR_drv: dest[0] = mp_read_ptr_lv_fs_drv_t((void*)data->drv); break; // converting from lv_fs_drv_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29656,9 +32334,8 @@ static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_root: data->root = (void*)mp_write_ptr_lv_rb_node_t(dest[1]); break; // converting to lv_rb_node_t *; - case MP_QSTR_compare: data->compare = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_rb_t_compare, NULL, NULL, NULL, NULL); break; // converting to callback lv_rb_compare_t; - case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_dir_d: data->dir_d = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_drv: data->drv = (void*)mp_write_ptr_lv_fs_drv_t(dest[1]); break; // converting to lv_fs_drv_t *; default: return; } @@ -29667,67 +32344,106 @@ static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_rb_t_print(const mp_print_t *print, +static void mp_lv_fs_dir_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_rb_t"); + mp_printf(print, "struct lv_fs_dir_t"); } -static const mp_obj_dict_t mp_lv_rb_t_locals_dict; +static const mp_obj_dict_t mp_lv_fs_dir_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_rb_t_type, - MP_QSTR_lv_rb_t, + mp_lv_fs_dir_t_type, + MP_QSTR_lv_fs_dir_t, MP_TYPE_FLAG_NONE, - print, mp_lv_rb_t_print, + print, mp_lv_fs_dir_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_rb_t_attr, - locals_dict, &mp_lv_rb_t_locals_dict, + attr, mp_lv_fs_dir_t_attr, + locals_dict, &mp_lv_fs_dir_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void) { - return &mp_lv_rb_t_type; + return &mp_lv_fs_dir_t_type; } /* - * Struct lv_circle_buf_t + * Array convertors for lv_point_precise_t [3] */ -static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void); +GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t___3__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_point_precise_t(item); + } + return (lv_point_precise_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_circle_buf_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t___3__(lv_point_precise_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_circle_buf_t_type())); - return (lv_circle_buf_t*)self->data; + mp_obj_t obj_arr[3]; + for (size_t i=0; i<3; i++){ + obj_arr[i] = mp_read_lv_point_precise_t(arr[i]); + } + return mp_obj_new_list(3, obj_arr); // TODO: return custom iterable object! } -#define mp_write_lv_circle_buf_t(struct_obj) *((lv_circle_buf_t*)mp_write_ptr_lv_circle_buf_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_circle_buf_t(void *field) +/* + * Struct lv_draw_triangle_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_triangle_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_triangle_dsc_t(mp_obj_t self_in) { - return lv_to_mp_struct(get_mp_lv_circle_buf_t_type(), field); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_triangle_dsc_t_type())); + return (lv_draw_triangle_dsc_t*)self->data; } -#define mp_read_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(copy_buffer(&field, sizeof(lv_circle_buf_t))) -#define mp_read_byref_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(&field) +#define mp_write_lv_draw_triangle_dsc_t(struct_obj) *((lv_draw_triangle_dsc_t*)mp_write_ptr_lv_draw_triangle_dsc_t(struct_obj)) -static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_triangle_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_triangle_dsc_t_type(), field); +} + +#define mp_read_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(copy_buffer(&field, sizeof(lv_draw_triangle_dsc_t))) +#define mp_read_byref_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(&field) + +static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_circle_buf_t *data = (lv_circle_buf_t*)self->data; + GENMPY_UNUSED lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_p: dest[0] = mp_lv_struct_array_new(self_in, data->p, 3, sizeof(lv_point_precise_t), mp_read_ptr_lv_point_precise_t, mp_write_ptr_lv_point_precise_t); break; // converting from lv_point_precise_t [3]; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29736,7 +32452,11 @@ static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - ; + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_p: mp_lv_struct_array_assign(data->p, 3, sizeof(lv_point_precise_t), mp_write_ptr_lv_point_precise_t, dest[1]); break; // converting to lv_point_precise_t [3]; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; default: return; } @@ -29745,114 +32465,147 @@ static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_circle_buf_t_print(const mp_print_t *print, +static void mp_lv_draw_triangle_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_circle_buf_t"); + mp_printf(print, "struct lv_draw_triangle_dsc_t"); } -static const mp_obj_dict_t mp_lv_circle_buf_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_triangle_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_circle_buf_t_type, - MP_QSTR_lv_circle_buf_t, + mp_lv_draw_triangle_dsc_t_type, + MP_QSTR_lv_draw_triangle_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_circle_buf_t_print, + print, mp_lv_draw_triangle_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_circle_buf_t_attr, - locals_dict, &mp_lv_circle_buf_t_locals_dict, + attr, mp_lv_draw_triangle_dsc_t_attr, + locals_dict, &mp_lv_draw_triangle_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_triangle_dsc_t_type(void) { - return &mp_lv_circle_buf_t_type; + return &mp_lv_draw_triangle_dsc_t_type; } -#define funcptr_lv_layout_update_cb_t NULL - -/* Reusing lv_obj_set_user_data for funcptr_lv_layout_update_cb_t */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_funcptr_lv_layout_update_cb_t_mpobj, 2, mp_lv_obj_set_user_data, funcptr_lv_layout_update_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_layout_update_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +#define funcptr_lv_indev_read_cb_t NULL /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_layout_callbacks_t_layout_update_cb_callback' - * lv_layout_update_cb_t layout_update_cb + * Array convertors for lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT] */ - -#define funcptr_lv_layout_get_min_size_cb_t NULL + +GENMPY_UNUSED static lv_indev_gesture_type_t *mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_indev_gesture_type_t *lv_arr = (lv_indev_gesture_type_t*)m_malloc(len * sizeof(lv_indev_gesture_type_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (int)mp_obj_get_int(item); + } + return (lv_indev_gesture_type_t *)lv_arr; +} + +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_type_t *arr) +{ + mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; + for (size_t i=0; idata; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_data_t_type())); + return (lv_indev_data_t*)self->data; } -#define mp_write_lv_layout_callbacks_t(struct_obj) *((lv_layout_callbacks_t*)mp_write_ptr_lv_layout_callbacks_t(struct_obj)) +#define mp_write_lv_indev_data_t(struct_obj) *((lv_indev_data_t*)mp_write_ptr_lv_indev_data_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layout_callbacks_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_data_t(void *field) { - return lv_to_mp_struct(get_mp_lv_layout_callbacks_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_data_t_type(), field); } -#define mp_read_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(copy_buffer(&field, sizeof(lv_layout_callbacks_t))) -#define mp_read_byref_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(&field) +#define mp_read_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(copy_buffer(&field, sizeof(lv_indev_data_t))) +#define mp_read_byref_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(&field) -static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)self->data; + GENMPY_UNUSED lv_indev_data_t *data = (lv_indev_data_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_layout_update_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_update_cb_t_mpobj, data->layout_update_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL); break; // converting from callback lv_layout_update_cb_t; - case MP_QSTR_get_min_size_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_layout_get_min_size_cb_t_mpobj, data->get_min_size_cb, NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL); break; // converting from callback lv_layout_get_min_size_cb_t; + case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; + case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; + case MP_QSTR_key: dest[0] = mp_obj_new_int_from_uint(data->key); break; // converting from uint32_t; + case MP_QSTR_btn_id: dest[0] = mp_obj_new_int_from_uint(data->btn_id); break; // converting from uint32_t; + case MP_QSTR_enc_diff: dest[0] = mp_obj_new_int(data->enc_diff); break; // converting from int16_t; + case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; + case MP_QSTR_continue_reading: dest[0] = convert_to_bool(data->continue_reading); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29861,8 +32614,15 @@ static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_layout_update_cb: data->layout_update_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_layout_update_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_update_cb_t; - case MP_QSTR_get_min_size_cb: data->get_min_size_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_layout_callbacks_t_get_min_size_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_layout_get_min_size_cb_t; + case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_key: data->key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_btn_id: data->btn_id = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_enc_diff: data->enc_diff = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_continue_reading: data->continue_reading = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -29871,40 +32631,62 @@ static void mp_lv_layout_callbacks_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_layout_callbacks_t_print(const mp_print_t *print, +static void mp_lv_indev_data_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_layout_callbacks_t"); + mp_printf(print, "struct lv_indev_data_t"); } -static const mp_obj_dict_t mp_lv_layout_callbacks_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_data_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_layout_callbacks_t_type, - MP_QSTR_lv_layout_callbacks_t, + mp_lv_indev_data_t_type, + MP_QSTR_lv_indev_data_t, MP_TYPE_FLAG_NONE, - print, mp_lv_layout_callbacks_t_print, + print, mp_lv_indev_data_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_layout_callbacks_t_attr, - locals_dict, &mp_lv_layout_callbacks_t_locals_dict, + attr, mp_lv_indev_data_t_attr, + locals_dict, &mp_lv_indev_data_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_layout_callbacks_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_data_t_type(void) { - return &mp_lv_layout_callbacks_t_type; + return &mp_lv_indev_data_t_type; } /* - * Array convertors for char [64] + * lvgl extension definition for: + * void lv_indev_read_cb_t(lv_indev_t *indev, lv_indev_data_t *data) */ -GENMPY_UNUSED static char *mp_arr_to_char___64__(mp_obj_t mp_arr) +static mp_obj_t mp_funcptr_lv_indev_read_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_indev_t *indev = mp_to_ptr(mp_args[0]); + lv_indev_data_t *data = mp_write_ptr_lv_indev_data_t(mp_args[1]); + ((void (*)(lv_indev_t *, lv_indev_data_t *))lv_func_ptr)(indev, data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_read_cb_t_mpobj, 2, mp_funcptr_lv_indev_read_cb_t, funcptr_lv_indev_read_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_read_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_indev_t_read_cb_callback(lv_indev_t *indev, lv_indev_data_t *data); +typedef __typeof__( ((lv_indev_t*)(0))->pointer ) lv_indev_pointer_t; + +/* + * Array convertors for lv_point_t [8] + */ + +GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t___8__(mp_obj_t mp_arr) { // A packed buffer is already the C array (lvgl-bindings#37). if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || @@ -29915,58 +32697,118 @@ GENMPY_UNUSED static char *mp_arr_to_char___64__(mp_obj_t mp_arr) if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); mp_int_t len = mp_obj_get_int(mp_len); //TODO check dim! - char *lv_arr = (char*)m_malloc(len * sizeof(char)); + lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); mp_obj_t iter = mp_getiter(mp_arr, NULL); mp_obj_t item; size_t i = 0; while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (char)mp_obj_get_int(item); + lv_arr[i++] = mp_write_lv_point_t(item); } - return (char *)lv_arr; + return (lv_point_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_char___64__(char *arr) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t___8__(lv_point_t *arr) { - mp_obj_t obj_arr[64]; - for (size_t i=0; i<64; i++){ - obj_arr[i] = mp_obj_new_int(arr[i]); + mp_obj_t obj_arr[8]; + for (size_t i=0; i<8; i++){ + obj_arr[i] = mp_read_lv_point_t(arr[i]); } - return mp_obj_new_list(64, obj_arr); // TODO: return custom iterable object! + return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! } /* - * Struct lv_fs_path_ex_t + * Array convertors for uint32_t [8] */ -static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void); +GENMPY_UNUSED static uint32_t *mp_arr_to_uint32_t___8__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + uint32_t *lv_arr = (uint32_t*)m_malloc(len * sizeof(uint32_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint32_t)mp_obj_get_int(item); + } + return (uint32_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_path_ex_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_uint32_t___8__(uint32_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_path_ex_t_type())); - return (lv_fs_path_ex_t*)self->data; + mp_obj_t obj_arr[8]; + for (size_t i=0; i<8; i++){ + obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); + } + return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! } -#define mp_write_lv_fs_path_ex_t(struct_obj) *((lv_fs_path_ex_t*)mp_write_ptr_lv_fs_path_ex_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_path_ex_t(void *field) +/* + * Struct lv_indev_pointer_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_pointer_t(mp_obj_t self_in) { - return lv_to_mp_struct(get_mp_lv_fs_path_ex_t_type(), field); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_pointer_t_type())); + return (lv_indev_pointer_t*)self->data; } -#define mp_read_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(copy_buffer(&field, sizeof(lv_fs_path_ex_t))) -#define mp_read_byref_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(&field) +#define mp_write_lv_indev_pointer_t(struct_obj) *((lv_indev_pointer_t*)mp_write_ptr_lv_indev_pointer_t(struct_obj)) -static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_pointer_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_indev_pointer_t_type(), field); +} + +#define mp_read_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(copy_buffer(&field, sizeof(lv_indev_pointer_t))) +#define mp_read_byref_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(&field) + +static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)self->data; + GENMPY_UNUSED lv_indev_pointer_t *data = (lv_indev_pointer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_path: dest[0] = mp_arr_from_char___64__(data->path); break; // converting from char [64]; + case MP_QSTR_act_point: dest[0] = mp_read_byref_lv_point_t(data->act_point); break; // converting from lv_point_t; + case MP_QSTR_last_point: dest[0] = mp_read_byref_lv_point_t(data->last_point); break; // converting from lv_point_t; + case MP_QSTR_last_raw_point: dest[0] = mp_read_byref_lv_point_t(data->last_raw_point); break; // converting from lv_point_t; + case MP_QSTR_vect: dest[0] = mp_read_byref_lv_point_t(data->vect); break; // converting from lv_point_t; + case MP_QSTR_vect_hist: dest[0] = mp_lv_struct_array_new(self_in, data->vect_hist, 8, sizeof(lv_point_t), mp_read_ptr_lv_point_t, mp_write_ptr_lv_point_t); break; // converting from lv_point_t [8]; + case MP_QSTR_vect_hist_timestamp: dest[0] = mp_arr_from_uint32_t___8__(data->vect_hist_timestamp); break; // converting from uint32_t [8]; + case MP_QSTR_vect_hist_index: dest[0] = mp_obj_new_int_from_uint(data->vect_hist_index); break; // converting from uint8_t; + case MP_QSTR_scroll_sum: dest[0] = mp_read_byref_lv_point_t(data->scroll_sum); break; // converting from lv_point_t; + case MP_QSTR_scroll_throw_vect: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect); break; // converting from lv_point_t; + case MP_QSTR_scroll_throw_vect_ori: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect_ori); break; // converting from lv_point_t; + case MP_QSTR_act_obj: dest[0] = lv_to_mp((void*)data->act_obj); break; // converting from lv_obj_t *; + case MP_QSTR_scroll_obj: dest[0] = lv_to_mp((void*)data->scroll_obj); break; // converting from lv_obj_t *; + case MP_QSTR_last_pressed: dest[0] = lv_to_mp((void*)data->last_pressed); break; // converting from lv_obj_t *; + case MP_QSTR_last_hovered: dest[0] = lv_to_mp((void*)data->last_hovered); break; // converting from lv_obj_t *; + case MP_QSTR_scroll_area: dest[0] = mp_read_byref_lv_area_t(data->scroll_area); break; // converting from lv_area_t; + case MP_QSTR_gesture_sum: dest[0] = mp_read_byref_lv_point_t(data->gesture_sum); break; // converting from lv_point_t; + case MP_QSTR_diff: dest[0] = mp_obj_new_int(data->diff); break; // converting from int32_t; + case MP_QSTR_short_click_streak: dest[0] = mp_obj_new_int_from_uint(data->short_click_streak); break; // converting from uint8_t; + case MP_QSTR_last_short_click_point: dest[0] = mp_read_byref_lv_point_t(data->last_short_click_point); break; // converting from lv_point_t; + case MP_QSTR_last_short_click_timestamp: dest[0] = mp_obj_new_int_from_uint(data->last_short_click_timestamp); break; // converting from uint32_t; + case MP_QSTR_scroll_dir: dest[0] = mp_obj_new_int_from_uint(data->scroll_dir); break; // converting from uint8_t; + case MP_QSTR_gesture_dir: dest[0] = mp_obj_new_int_from_uint(data->gesture_dir); break; // converting from uint8_t; + case MP_QSTR_gesture_sent: dest[0] = mp_obj_new_int_from_uint(data->gesture_sent); break; // converting from uint8_t; + case MP_QSTR_press_moved: dest[0] = mp_obj_new_int_from_uint(data->press_moved); break; // converting from uint8_t; + case MP_QSTR_pressed: dest[0] = mp_obj_new_int_from_uint(data->pressed); break; // converting from uint8_t; + case MP_QSTR_ccw_rotation: dest[0] = mp_obj_new_int_from_uint(data->ccw_rotation); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -29975,7 +32817,32 @@ static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_path: memcpy((void*)&data->path, mp_arr_to_char___64__(dest[1]), sizeof(char)*64); break; // converting to char [64]; + case MP_QSTR_act_point: data->act_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_point: data->last_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_raw_point: data->last_raw_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_vect: data->vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_vect_hist: mp_lv_struct_array_assign(data->vect_hist, 8, sizeof(lv_point_t), mp_write_ptr_lv_point_t, dest[1]); break; // converting to lv_point_t [8]; + case MP_QSTR_vect_hist_timestamp: memcpy((void*)&data->vect_hist_timestamp, mp_arr_to_uint32_t___8__(dest[1]), sizeof(uint32_t)*8); break; // converting to uint32_t [8]; + case MP_QSTR_vect_hist_index: data->vect_hist_index = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_scroll_sum: data->scroll_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_scroll_throw_vect: data->scroll_throw_vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_scroll_throw_vect_ori: data->scroll_throw_vect_ori = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_act_obj: data->act_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scroll_obj: data->scroll_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_last_pressed: data->last_pressed = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_last_hovered: data->last_hovered = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scroll_area: data->scroll_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_gesture_sum: data->gesture_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_diff: data->diff = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_short_click_streak: data->short_click_streak = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_last_short_click_point: data->last_short_click_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_last_short_click_timestamp: data->last_short_click_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_scroll_dir: data->scroll_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_dir: data->gesture_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_sent: data->gesture_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_press_moved: data->press_moved = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_pressed: data->pressed = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_ccw_rotation: data->ccw_rotation = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -29984,68 +32851,69 @@ static void mp_lv_fs_path_ex_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_fs_path_ex_t_print(const mp_print_t *print, +static void mp_lv_indev_pointer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_fs_path_ex_t"); + mp_printf(print, "struct lv_indev_pointer_t"); } -static const mp_obj_dict_t mp_lv_fs_path_ex_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_pointer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_fs_path_ex_t_type, - MP_QSTR_lv_fs_path_ex_t, + mp_lv_indev_pointer_t_type, + MP_QSTR_lv_indev_pointer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_fs_path_ex_t_print, + print, mp_lv_indev_pointer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_fs_path_ex_t_attr, - locals_dict, &mp_lv_fs_path_ex_t_locals_dict, + attr, mp_lv_indev_pointer_t_attr, + locals_dict, &mp_lv_indev_pointer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_fs_path_ex_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void) { - return &mp_lv_fs_path_ex_t_type; + return &mp_lv_indev_pointer_t_type; } +typedef __typeof__( ((lv_indev_t*)(0))->keypad ) lv_indev_keypad_t; /* - * Struct lv_fs_dir_t + * Struct lv_indev_keypad_t */ -static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_fs_dir_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_keypad_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_fs_dir_t_type())); - return (lv_fs_dir_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_keypad_t_type())); + return (lv_indev_keypad_t*)self->data; } -#define mp_write_lv_fs_dir_t(struct_obj) *((lv_fs_dir_t*)mp_write_ptr_lv_fs_dir_t(struct_obj)) +#define mp_write_lv_indev_keypad_t(struct_obj) *((lv_indev_keypad_t*)mp_write_ptr_lv_indev_keypad_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_fs_dir_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_keypad_t(void *field) { - return lv_to_mp_struct(get_mp_lv_fs_dir_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_keypad_t_type(), field); } -#define mp_read_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(copy_buffer(&field, sizeof(lv_fs_dir_t))) -#define mp_read_byref_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(&field) +#define mp_read_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(copy_buffer(&field, sizeof(lv_indev_keypad_t))) +#define mp_read_byref_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(&field) -static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_fs_dir_t *data = (lv_fs_dir_t*)self->data; + GENMPY_UNUSED lv_indev_keypad_t *data = (lv_indev_keypad_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dir_d: dest[0] = ptr_to_mp((void*)data->dir_d); break; // converting from void *; - case MP_QSTR_drv: dest[0] = mp_read_ptr_lv_fs_drv_t((void*)data->drv); break; // converting from lv_fs_drv_t *; + case MP_QSTR_last_state: dest[0] = mp_obj_new_int(data->last_state); break; // converting from lv_indev_state_t; + case MP_QSTR_last_key: dest[0] = mp_obj_new_int_from_uint(data->last_key); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30054,8 +32922,8 @@ static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_dir_d: data->dir_d = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_drv: data->drv = (void*)mp_write_ptr_lv_fs_drv_t(dest[1]); break; // converting to lv_fs_drv_t *; + case MP_QSTR_last_state: data->last_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_last_key: data->last_key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -30064,71 +32932,93 @@ static void mp_lv_fs_dir_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_fs_dir_t_print(const mp_print_t *print, +static void mp_lv_indev_keypad_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_fs_dir_t"); + mp_printf(print, "struct lv_indev_keypad_t"); } -static const mp_obj_dict_t mp_lv_fs_dir_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_keypad_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_fs_dir_t_type, - MP_QSTR_lv_fs_dir_t, + mp_lv_indev_keypad_t_type, + MP_QSTR_lv_indev_keypad_t, MP_TYPE_FLAG_NONE, - print, mp_lv_fs_dir_t_print, + print, mp_lv_indev_keypad_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_fs_dir_t_attr, - locals_dict, &mp_lv_fs_dir_t_locals_dict, + attr, mp_lv_indev_keypad_t_attr, + locals_dict, &mp_lv_indev_keypad_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_fs_dir_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void) { - return &mp_lv_fs_dir_t_type; + return &mp_lv_indev_keypad_t_type; } +#define funcptr_lv_indev_key_remap_cb_t NULL + /* - * Struct lv_draw_fill_dsc_t + * lvgl extension definition for: + * lv_key_t lv_indev_key_remap_cb_t(lv_indev_t *indev, lv_key_t key) */ -static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_indev_key_remap_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_indev_t *indev = mp_to_ptr(mp_args[0]); + lv_key_t key = (int)mp_obj_get_int(mp_args[1]); + lv_key_t _res = ((lv_key_t (*)(lv_indev_t *, lv_key_t))lv_func_ptr)(indev, key); + return mp_obj_new_int(_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_fill_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_key_remap_cb_t_mpobj, 2, mp_funcptr_lv_indev_key_remap_cb_t, funcptr_lv_indev_key_remap_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_key_remap_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *indev, lv_key_t key); + +/* + * Struct lv_indev_gesture_motion_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_motion_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_motion_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_fill_dsc_t_type())); - return (lv_draw_fill_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_motion_t_type())); + return (lv_indev_gesture_motion_t*)self->data; } -#define mp_write_lv_draw_fill_dsc_t(struct_obj) *((lv_draw_fill_dsc_t*)mp_write_ptr_lv_draw_fill_dsc_t(struct_obj)) +#define mp_write_lv_indev_gesture_motion_t(struct_obj) *((lv_indev_gesture_motion_t*)mp_write_ptr_lv_indev_gesture_motion_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_fill_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_motion_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_fill_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_gesture_motion_t_type(), field); } -#define mp_read_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(copy_buffer(&field, sizeof(lv_draw_fill_dsc_t))) -#define mp_read_byref_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(&field) +#define mp_read_lv_indev_gesture_motion_t(field) mp_read_ptr_lv_indev_gesture_motion_t(copy_buffer(&field, sizeof(lv_indev_gesture_motion_t))) +#define mp_read_byref_lv_indev_gesture_motion_t(field) mp_read_ptr_lv_indev_gesture_motion_t(&field) -static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_gesture_motion_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_motion_t *data = (lv_indev_gesture_motion_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; + case MP_QSTR_finger: dest[0] = mp_obj_new_int(data->finger); break; // converting from int8_t; + case MP_QSTR_start_point: dest[0] = mp_read_byref_lv_point_t(data->start_point); break; // converting from lv_point_t; + case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30137,11 +33027,10 @@ static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; + case MP_QSTR_finger: data->finger = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; + case MP_QSTR_start_point: data->start_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; default: return; } @@ -30150,72 +33039,149 @@ static void mp_lv_draw_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de } } -static void mp_lv_draw_fill_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_motion_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_fill_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_motion_t"); } -static const mp_obj_dict_t mp_lv_draw_fill_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_motion_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_fill_dsc_t_type, - MP_QSTR_lv_draw_fill_dsc_t, + mp_lv_indev_gesture_motion_t_type, + MP_QSTR_lv_indev_gesture_motion_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_fill_dsc_t_print, + print, mp_lv_indev_gesture_motion_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_fill_dsc_t_attr, - locals_dict, &mp_lv_draw_fill_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_motion_t_attr, + locals_dict, &mp_lv_indev_gesture_motion_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_fill_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_motion_t_type(void) { - return &mp_lv_draw_fill_dsc_t_type; + return &mp_lv_indev_gesture_motion_t_type; } /* - * Struct lv_draw_border_dsc_t + * Array convertors for lv_indev_gesture_motion_t [2] */ -static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void); +GENMPY_UNUSED static lv_indev_gesture_motion_t *mp_arr_to_lv_indev_gesture_motion_t___2__(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_indev_gesture_motion_t *lv_arr = (lv_indev_gesture_motion_t*)m_malloc(len * sizeof(lv_indev_gesture_motion_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_indev_gesture_motion_t(item); + } + return (lv_indev_gesture_motion_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_border_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_motion_t___2__(lv_indev_gesture_motion_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_border_dsc_t_type())); - return (lv_draw_border_dsc_t*)self->data; + mp_obj_t obj_arr[2]; + for (size_t i=0; i<2; i++){ + obj_arr[i] = mp_read_lv_indev_gesture_motion_t(arr[i]); + } + return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! } -#define mp_write_lv_draw_border_dsc_t(struct_obj) *((lv_draw_border_dsc_t*)mp_write_ptr_lv_draw_border_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_border_dsc_t(void *field) +/* + * Array convertors for float [2] + */ + +GENMPY_UNUSED static float *mp_arr_to_float___2__(mp_obj_t mp_arr) { - return lv_to_mp_struct(get_mp_lv_draw_border_dsc_t_type(), field); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + float *lv_arr = (float*)m_malloc(len * sizeof(float)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (float)mp_obj_get_float(item); + } + return (float *)lv_arr; } -#define mp_read_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(copy_buffer(&field, sizeof(lv_draw_border_dsc_t))) -#define mp_read_byref_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(&field) +GENMPY_UNUSED static mp_obj_t mp_arr_from_float___2__(float *arr) +{ + mp_obj_t obj_arr[2]; + for (size_t i=0; i<2; i++){ + obj_arr[i] = mp_obj_new_float_from_f(arr[i]); + } + return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! +} -static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) + +/* + * Struct lv_indev_gesture_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_t_type())); + return (lv_indev_gesture_t*)self->data; +} + +#define mp_write_lv_indev_gesture_t(struct_obj) *((lv_indev_gesture_t*)mp_write_ptr_lv_indev_gesture_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_indev_gesture_t_type(), field); +} + +#define mp_read_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(copy_buffer(&field, sizeof(lv_indev_gesture_t))) +#define mp_read_byref_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(&field) + +static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_t *data = (lv_indev_gesture_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_border_side_t; + case MP_QSTR_motions: dest[0] = mp_lv_struct_array_new(self_in, data->motions, 2, sizeof(lv_indev_gesture_motion_t), mp_read_ptr_lv_indev_gesture_motion_t, mp_write_ptr_lv_indev_gesture_motion_t); break; // converting from lv_indev_gesture_motion_t [2]; + case MP_QSTR_center: dest[0] = mp_read_byref_lv_point_t(data->center); break; // converting from lv_point_t; + case MP_QSTR_scale: dest[0] = mp_obj_new_float_from_f(data->scale); break; // converting from float; + case MP_QSTR_p_scale: dest[0] = mp_obj_new_float_from_f(data->p_scale); break; // converting from float; + case MP_QSTR_scale_factors_x: dest[0] = mp_arr_from_float___2__(data->scale_factors_x); break; // converting from float [2]; + case MP_QSTR_scale_factors_y: dest[0] = mp_arr_from_float___2__(data->scale_factors_y); break; // converting from float [2]; + case MP_QSTR_delta_x: dest[0] = mp_obj_new_float_from_f(data->delta_x); break; // converting from float; + case MP_QSTR_delta_y: dest[0] = mp_obj_new_float_from_f(data->delta_y); break; // converting from float; + case MP_QSTR_p_delta_x: dest[0] = mp_obj_new_float_from_f(data->p_delta_x); break; // converting from float; + case MP_QSTR_p_delta_y: dest[0] = mp_obj_new_float_from_f(data->p_delta_y); break; // converting from float; + case MP_QSTR_rotation: dest[0] = mp_obj_new_float_from_f(data->rotation); break; // converting from float; + case MP_QSTR_p_rotation: dest[0] = mp_obj_new_float_from_f(data->p_rotation); break; // converting from float; + case MP_QSTR_finger_cnt: dest[0] = mp_obj_new_int_from_uint(data->finger_cnt); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30224,12 +33190,19 @@ static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_border_side_t; + case MP_QSTR_motions: mp_lv_struct_array_assign(data->motions, 2, sizeof(lv_indev_gesture_motion_t), mp_write_ptr_lv_indev_gesture_motion_t, dest[1]); break; // converting to lv_indev_gesture_motion_t [2]; + case MP_QSTR_center: data->center = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_scale: data->scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_scale: data->p_scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_scale_factors_x: memcpy((void*)&data->scale_factors_x, mp_arr_to_float___2__(dest[1]), sizeof(float)*2); break; // converting to float [2]; + case MP_QSTR_scale_factors_y: memcpy((void*)&data->scale_factors_y, mp_arr_to_float___2__(dest[1]), sizeof(float)*2); break; // converting to float [2]; + case MP_QSTR_delta_x: data->delta_x = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_delta_y: data->delta_y = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_delta_x: data->p_delta_x = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_delta_y: data->p_delta_y = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_rotation: data->rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_p_rotation: data->p_rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_finger_cnt: data->finger_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -30238,75 +33211,69 @@ static void mp_lv_draw_border_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * } } -static void mp_lv_draw_border_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_border_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_t"); } -static const mp_obj_dict_t mp_lv_draw_border_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_border_dsc_t_type, - MP_QSTR_lv_draw_border_dsc_t, + mp_lv_indev_gesture_t_type, + MP_QSTR_lv_indev_gesture_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_border_dsc_t_print, + print, mp_lv_indev_gesture_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_border_dsc_t_attr, - locals_dict, &mp_lv_draw_border_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_t_attr, + locals_dict, &mp_lv_indev_gesture_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_border_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void) { - return &mp_lv_draw_border_dsc_t_type; + return &mp_lv_indev_gesture_t_type; } /* - * Struct lv_draw_box_shadow_dsc_t + * Struct lv_indev_gesture_configuration_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_configuration_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_box_shadow_dsc_t_type())); - return (lv_draw_box_shadow_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_configuration_t_type())); + return (lv_indev_gesture_configuration_t*)self->data; } -#define mp_write_lv_draw_box_shadow_dsc_t(struct_obj) *((lv_draw_box_shadow_dsc_t*)mp_write_ptr_lv_draw_box_shadow_dsc_t(struct_obj)) +#define mp_write_lv_indev_gesture_configuration_t(struct_obj) *((lv_indev_gesture_configuration_t*)mp_write_ptr_lv_indev_gesture_configuration_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_box_shadow_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_configuration_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_box_shadow_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_gesture_configuration_t_type(), field); } -#define mp_read_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(copy_buffer(&field, sizeof(lv_draw_box_shadow_dsc_t))) -#define mp_read_byref_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(&field) +#define mp_read_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(copy_buffer(&field, sizeof(lv_indev_gesture_configuration_t))) +#define mp_read_byref_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(&field) -static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_width: dest[0] = mp_obj_new_int(data->width); break; // converting from int32_t; - case MP_QSTR_spread: dest[0] = mp_obj_new_int(data->spread); break; // converting from int32_t; - case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int32_t; - case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int32_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_bg_cover: dest[0] = mp_obj_new_int_from_uint(data->bg_cover); break; // converting from uint8_t; + case MP_QSTR_pinch_up_threshold: dest[0] = mp_obj_new_float_from_f(data->pinch_up_threshold); break; // converting from float; + case MP_QSTR_pinch_down_threshold: dest[0] = mp_obj_new_float_from_f(data->pinch_down_threshold); break; // converting from float; + case MP_QSTR_rotation_angle_rad_threshold: dest[0] = mp_obj_new_float_from_f(data->rotation_angle_rad_threshold); break; // converting from float; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30315,15 +33282,9 @@ static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_width: data->width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_spread: data->spread = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ofs_x: data->ofs_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ofs_y: data->ofs_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_bg_cover: data->bg_cover = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_pinch_up_threshold: data->pinch_up_threshold = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_pinch_down_threshold: data->pinch_down_threshold = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_rotation_angle_rad_threshold: data->rotation_angle_rad_threshold = (float)mp_obj_get_float(dest[1]); break; // converting to float; default: return; } @@ -30332,82 +33293,72 @@ static void mp_lv_draw_box_shadow_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj } } -static void mp_lv_draw_box_shadow_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_configuration_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_box_shadow_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_configuration_t"); } -static const mp_obj_dict_t mp_lv_draw_box_shadow_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_configuration_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_box_shadow_dsc_t_type, - MP_QSTR_lv_draw_box_shadow_dsc_t, + mp_lv_indev_gesture_configuration_t_type, + MP_QSTR_lv_indev_gesture_configuration_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_box_shadow_dsc_t_print, + print, mp_lv_indev_gesture_configuration_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_box_shadow_dsc_t_attr, - locals_dict, &mp_lv_draw_box_shadow_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_configuration_t_attr, + locals_dict, &mp_lv_indev_gesture_configuration_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_box_shadow_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void) { - return &mp_lv_draw_box_shadow_dsc_t_type; + return &mp_lv_indev_gesture_configuration_t_type; } +#define funcptr_lv_recognizer_func_t NULL + /* - * Struct lv_draw_letter_dsc_t + * Struct lv_indev_touch_data_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_letter_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_touch_data_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_letter_dsc_t_type())); - return (lv_draw_letter_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_touch_data_t_type())); + return (lv_indev_touch_data_t*)self->data; } -#define mp_write_lv_draw_letter_dsc_t(struct_obj) *((lv_draw_letter_dsc_t*)mp_write_ptr_lv_draw_letter_dsc_t(struct_obj)) +#define mp_write_lv_indev_touch_data_t(struct_obj) *((lv_indev_touch_data_t*)mp_write_ptr_lv_indev_touch_data_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_letter_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_touch_data_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_letter_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_touch_data_t_type(), field); } -#define mp_read_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(copy_buffer(&field, sizeof(lv_draw_letter_dsc_t))) -#define mp_read_byref_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(&field) +#define mp_read_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(copy_buffer(&field, sizeof(lv_indev_touch_data_t))) +#define mp_read_byref_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(&field) -static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_unicode: dest[0] = mp_obj_new_int_from_uint(data->unicode); break; // converting from uint32_t; - case MP_QSTR_font: dest[0] = mp_read_ptr_lv_font_t((void*)data->font); break; // converting from lv_font_t *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; - case MP_QSTR_scale_x: dest[0] = mp_obj_new_int(data->scale_x); break; // converting from int32_t; - case MP_QSTR_scale_y: dest[0] = mp_obj_new_int(data->scale_y); break; // converting from int32_t; - case MP_QSTR_skew_x: dest[0] = mp_obj_new_int(data->skew_x); break; // converting from int32_t; - case MP_QSTR_skew_y: dest[0] = mp_obj_new_int(data->skew_y); break; // converting from int32_t; - case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_decor: dest[0] = mp_obj_new_int(data->decor); break; // converting from lv_text_decor_t; - case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; - case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; + case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; + case MP_QSTR_id: dest[0] = mp_obj_new_int_from_uint(data->id); break; // converting from uint8_t; + case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30416,22 +33367,10 @@ static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_unicode: data->unicode = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_font: data->font = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_scale_x: data->scale_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_scale_y: data->scale_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_skew_x: data->skew_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_skew_y: data->skew_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_decor: data->decor = (int)mp_obj_get_int(dest[1]); break; // converting to lv_text_decor_t; - case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; - case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_id: data->id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -30440,79 +33379,104 @@ static void mp_lv_draw_letter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t * } } -static void mp_lv_draw_letter_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_touch_data_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_letter_dsc_t"); + mp_printf(print, "struct lv_indev_touch_data_t"); } -static const mp_obj_dict_t mp_lv_draw_letter_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_touch_data_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_letter_dsc_t_type, - MP_QSTR_lv_draw_letter_dsc_t, + mp_lv_indev_touch_data_t_type, + MP_QSTR_lv_indev_touch_data_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_letter_dsc_t_print, + print, mp_lv_indev_touch_data_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_letter_dsc_t_attr, - locals_dict, &mp_lv_draw_letter_dsc_t_locals_dict, + attr, mp_lv_indev_touch_data_t_attr, + locals_dict, &mp_lv_indev_touch_data_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_letter_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void) { - return &mp_lv_draw_letter_dsc_t_type; + return &mp_lv_indev_touch_data_t_type; } /* - * Struct lv_draw_glyph_dsc_t + * lvgl extension definition for: + * void lv_recognizer_func_t(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t) */ -static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void); +static mp_obj_t mp_funcptr_lv_recognizer_func_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_indev_gesture_recognizer_t *arg0 = mp_to_ptr(mp_args[0]); + lv_indev_touch_data_t *arg1 = mp_write_ptr_lv_indev_touch_data_t(mp_args[1]); + uint16_t arg2 = (uint16_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_func_ptr)(arg0, arg1, arg2); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_glyph_dsc_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_recognizer_func_t_mpobj, 3, mp_funcptr_lv_recognizer_func_t, funcptr_lv_recognizer_func_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_recognizer_func_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_indev_gesture_recognizer_t_recog_fn_callback' + * lv_recognizer_func_t recog_fn + */ + + +/* + * Struct lv_indev_gesture_recognizer_t + */ + +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_recognizer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_glyph_dsc_t_type())); - return (lv_draw_glyph_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_recognizer_t_type())); + return (lv_indev_gesture_recognizer_t*)self->data; } -#define mp_write_lv_draw_glyph_dsc_t(struct_obj) *((lv_draw_glyph_dsc_t*)mp_write_ptr_lv_draw_glyph_dsc_t(struct_obj)) +#define mp_write_lv_indev_gesture_recognizer_t(struct_obj) *((lv_indev_gesture_recognizer_t*)mp_write_ptr_lv_indev_gesture_recognizer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_glyph_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_recognizer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_glyph_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_gesture_recognizer_t_type(), field); } -#define mp_read_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(copy_buffer(&field, sizeof(lv_draw_glyph_dsc_t))) -#define mp_read_byref_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(&field) +#define mp_read_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(copy_buffer(&field, sizeof(lv_indev_gesture_recognizer_t))) +#define mp_read_byref_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(&field) -static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_glyph_data: dest[0] = ptr_to_mp((void*)data->glyph_data); break; // converting from void *; - case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; - case MP_QSTR_letter_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->letter_coords); break; // converting from lv_area_t *; - case MP_QSTR_bg_coords: dest[0] = mp_read_ptr_lv_area_t((void*)data->bg_coords); break; // converting from lv_area_t *; - case MP_QSTR_g: dest[0] = mp_read_ptr_lv_font_glyph_dsc_t((void*)data->g); break; // converting from lv_font_glyph_dsc_t *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_outline_stroke_color: dest[0] = mp_read_byref_lv_color_t(data->outline_stroke_color); break; // converting from lv_color_t; - case MP_QSTR_outline_stroke_opa: dest[0] = mp_obj_new_int_from_uint(data->outline_stroke_opa); break; // converting from lv_opa_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int(data->rotation); break; // converting from int32_t; - case MP_QSTR_pivot: dest[0] = mp_read_byref_lv_point_t(data->pivot); break; // converting from lv_point_t; - case MP_QSTR__draw_buf: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->_draw_buf); break; // converting from lv_draw_buf_t *; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_gesture_type_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_gesture_state_t; + case MP_QSTR_info: dest[0] = mp_read_ptr_lv_indev_gesture_t((void*)data->info); break; // converting from lv_indev_gesture_t *; + case MP_QSTR_scale: dest[0] = mp_obj_new_float_from_f(data->scale); break; // converting from float; + case MP_QSTR_rotation: dest[0] = mp_obj_new_float_from_f(data->rotation); break; // converting from float; + case MP_QSTR_distance: dest[0] = mp_obj_new_float_from_f(data->distance); break; // converting from float; + case MP_QSTR_speed: dest[0] = mp_obj_new_float_from_f(data->speed); break; // converting from float; + case MP_QSTR_two_fingers_swipe_dir: dest[0] = mp_obj_new_int(data->two_fingers_swipe_dir); break; // converting from lv_dir_t; + case MP_QSTR_config: dest[0] = mp_read_ptr_lv_indev_gesture_configuration_t((void*)data->config); break; // converting from lv_indev_gesture_configuration_t *; + case MP_QSTR_recog_fn: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, data->recog_fn, NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL); break; // converting from callback lv_recognizer_func_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30521,19 +33485,16 @@ static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_glyph_data: data->glyph_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; - case MP_QSTR_letter_coords: data->letter_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_bg_coords: data->bg_coords = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_g: data->g = (void*)mp_write_ptr_lv_font_glyph_dsc_t(dest[1]); break; // converting to lv_font_glyph_dsc_t *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_outline_stroke_color: data->outline_stroke_color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_outline_stroke_opa: data->outline_stroke_opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_rotation: data->rotation = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_pivot: data->pivot = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR__draw_buf: data->_draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_state_t; + case MP_QSTR_info: data->info = (void*)mp_write_ptr_lv_indev_gesture_t(dest[1]); break; // converting to lv_indev_gesture_t *; + case MP_QSTR_scale: data->scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_rotation: data->rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_distance: data->distance = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_speed: data->speed = (float)mp_obj_get_float(dest[1]); break; // converting to float; + case MP_QSTR_two_fingers_swipe_dir: data->two_fingers_swipe_dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; + case MP_QSTR_config: data->config = (void*)mp_write_ptr_lv_indev_gesture_configuration_t(dest[1]); break; // converting to lv_indev_gesture_configuration_t *; + case MP_QSTR_recog_fn: data->recog_fn = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL, NULL, NULL, NULL); break; // converting to callback lv_recognizer_func_t; default: return; } @@ -30542,40 +33503,40 @@ static void mp_lv_draw_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_draw_glyph_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_gesture_recognizer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_glyph_dsc_t"); + mp_printf(print, "struct lv_indev_gesture_recognizer_t"); } -static const mp_obj_dict_t mp_lv_draw_glyph_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_gesture_recognizer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_glyph_dsc_t_type, - MP_QSTR_lv_draw_glyph_dsc_t, + mp_lv_indev_gesture_recognizer_t_type, + MP_QSTR_lv_indev_gesture_recognizer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_glyph_dsc_t_print, + print, mp_lv_indev_gesture_recognizer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_glyph_dsc_t_attr, - locals_dict, &mp_lv_draw_glyph_dsc_t_locals_dict, + attr, mp_lv_indev_gesture_recognizer_t_attr, + locals_dict, &mp_lv_indev_gesture_recognizer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_glyph_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void) { - return &mp_lv_draw_glyph_dsc_t_type; + return &mp_lv_indev_gesture_recognizer_t_type; } /* - * Array convertors for lv_point_precise_t [3] + * Array convertors for lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT] */ -GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t___3__(mp_obj_t mp_arr) +GENMPY_UNUSED static lv_indev_gesture_recognizer_t *mp_arr_to_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) { // A packed buffer is already the C array (lvgl-bindings#37). if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || @@ -30586,62 +33547,94 @@ GENMPY_UNUSED static lv_point_precise_t *mp_arr_to_lv_point_precise_t___3__(mp_o if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); mp_int_t len = mp_obj_get_int(mp_len); //TODO check dim! - lv_point_precise_t *lv_arr = (lv_point_precise_t*)m_malloc(len * sizeof(lv_point_precise_t)); + lv_indev_gesture_recognizer_t *lv_arr = (lv_indev_gesture_recognizer_t*)m_malloc(len * sizeof(lv_indev_gesture_recognizer_t)); mp_obj_t iter = mp_getiter(mp_arr, NULL); mp_obj_t item; size_t i = 0; while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_precise_t(item); + lv_arr[i++] = mp_write_lv_indev_gesture_recognizer_t(item); } - return (lv_point_precise_t *)lv_arr; + return (lv_indev_gesture_recognizer_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_precise_t___3__(lv_point_precise_t *arr) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_recognizer_t *arr) { - mp_obj_t obj_arr[3]; - for (size_t i=0; i<3; i++){ - obj_arr[i] = mp_read_lv_point_precise_t(arr[i]); + mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; + for (size_t i=0; idata; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_t_type())); + return (lv_indev_t*)self->data; } -#define mp_write_lv_draw_triangle_dsc_t(struct_obj) *((lv_draw_triangle_dsc_t*)mp_write_ptr_lv_draw_triangle_dsc_t(struct_obj)) +#define mp_write_lv_indev_t(struct_obj) *((lv_indev_t*)mp_write_ptr_lv_indev_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_triangle_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_triangle_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_indev_t_type(), field); } -#define mp_read_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(copy_buffer(&field, sizeof(lv_draw_triangle_dsc_t))) -#define mp_read_byref_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(&field) +#define mp_read_lv_indev_t(field) mp_read_ptr_lv_indev_t(copy_buffer(&field, sizeof(lv_indev_t))) +#define mp_read_byref_lv_indev_t(field) mp_read_ptr_lv_indev_t(&field) -static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)self->data; + GENMPY_UNUSED lv_indev_t *data = (lv_indev_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_p: dest[0] = mp_lv_struct_array_new(self_in, data->p, 3, sizeof(lv_point_precise_t), mp_read_ptr_lv_point_precise_t, mp_write_ptr_lv_point_precise_t); break; // converting from lv_point_precise_t [3]; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_grad: dest[0] = mp_read_byref_lv_grad_dsc_t(data->grad); break; // converting from lv_grad_dsc_t; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_type_t; + case MP_QSTR_read_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, data->read_cb, lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, data->user_data); break; // converting from callback lv_indev_read_cb_t; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; + case MP_QSTR_prev_state: dest[0] = mp_obj_new_int(data->prev_state); break; // converting from lv_indev_state_t; + case MP_QSTR_mode: dest[0] = mp_obj_new_int(data->mode); break; // converting from lv_indev_mode_t; + case MP_QSTR_long_pr_sent: dest[0] = mp_obj_new_int_from_uint(data->long_pr_sent); break; // converting from uint8_t; + case MP_QSTR_reset_query: dest[0] = mp_obj_new_int_from_uint(data->reset_query); break; // converting from uint8_t; + case MP_QSTR_enabled: dest[0] = mp_obj_new_int_from_uint(data->enabled); break; // converting from uint8_t; + case MP_QSTR_wait_until_release: dest[0] = mp_obj_new_int_from_uint(data->wait_until_release); break; // converting from uint8_t; + case MP_QSTR_stop_processing_query: dest[0] = mp_obj_new_int_from_uint(data->stop_processing_query); break; // converting from uint8_t; + case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; + case MP_QSTR_pr_timestamp: dest[0] = mp_obj_new_int_from_uint(data->pr_timestamp); break; // converting from uint32_t; + case MP_QSTR_longpr_rep_timestamp: dest[0] = mp_obj_new_int_from_uint(data->longpr_rep_timestamp); break; // converting from uint32_t; + case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_disp: dest[0] = mp_read_ptr_lv_display_t((void*)data->disp); break; // converting from lv_display_t *; + case MP_QSTR_read_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->read_timer); break; // converting from lv_timer_t *; + case MP_QSTR_scroll_limit: dest[0] = mp_obj_new_int_from_uint(data->scroll_limit); break; // converting from uint8_t; + case MP_QSTR_scroll_throw: dest[0] = mp_obj_new_int_from_uint(data->scroll_throw); break; // converting from uint8_t; + case MP_QSTR_gesture_min_velocity: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_velocity); break; // converting from uint8_t; + case MP_QSTR_gesture_min_distance: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_distance); break; // converting from uint8_t; + case MP_QSTR_long_press_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_time); break; // converting from uint16_t; + case MP_QSTR_double_click_time: dest[0] = mp_obj_new_int_from_uint(data->double_click_time); break; // converting from uint16_t; + case MP_QSTR_long_press_repeat_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_repeat_time); break; // converting from uint16_t; + case MP_QSTR_rotary_sensitivity: dest[0] = mp_obj_new_int(data->rotary_sensitivity); break; // converting from int32_t; + case MP_QSTR_pointer: dest[0] = mp_read_byref_lv_indev_pointer_t(data->pointer); break; // converting from lv_indev_pointer_t; + case MP_QSTR_keypad: dest[0] = mp_read_byref_lv_indev_keypad_t(data->keypad); break; // converting from lv_indev_keypad_t; + case MP_QSTR_cursor: dest[0] = lv_to_mp((void*)data->cursor); break; // converting from lv_obj_t *; + case MP_QSTR_group: dest[0] = mp_read_ptr_lv_group_t((void*)data->group); break; // converting from lv_group_t *; + case MP_QSTR_btn_points: dest[0] = mp_read_ptr_lv_point_t((void*)data->btn_points); break; // converting from lv_point_t *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_scroll_throw_anim: dest[0] = mp_read_ptr_lv_anim_t((void*)data->scroll_throw_anim); break; // converting from lv_anim_t *; + case MP_QSTR_key_remap_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, data->key_remap_cb, lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, data->user_data); break; // converting from callback lv_indev_key_remap_cb_t; + case MP_QSTR_recognizers: dest[0] = mp_lv_struct_array_new(self_in, data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_read_ptr_lv_indev_gesture_recognizer_t, mp_write_ptr_lv_indev_gesture_recognizer_t); break; // converting from lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_cur_gesture: dest[0] = mp_obj_new_int(data->cur_gesture); break; // converting from lv_indev_gesture_type_t; + case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30650,11 +33643,43 @@ static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_p: mp_lv_struct_array_assign(data->p, 3, sizeof(lv_point_precise_t), mp_write_ptr_lv_point_precise_t, dest[1]); break; // converting to lv_point_precise_t [3]; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_grad: data->grad = mp_write_lv_grad_dsc_t(dest[1]); break; // converting to lv_grad_dsc_t; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_type_t; + case MP_QSTR_read_cb: data->read_cb = mp_lv_callback(dest[1], lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_read_cb_t; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_prev_state: data->prev_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; + case MP_QSTR_mode: data->mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_mode_t; + case MP_QSTR_long_pr_sent: data->long_pr_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_reset_query: data->reset_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_enabled: data->enabled = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_wait_until_release: data->wait_until_release = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_processing_query: data->stop_processing_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pr_timestamp: data->pr_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_longpr_rep_timestamp: data->longpr_rep_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_disp: data->disp = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_read_timer: data->read_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; + case MP_QSTR_scroll_limit: data->scroll_limit = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_scroll_throw: data->scroll_throw = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_min_velocity: data->gesture_min_velocity = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_gesture_min_distance: data->gesture_min_distance = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_long_press_time: data->long_press_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_double_click_time: data->double_click_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_long_press_repeat_time: data->long_press_repeat_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_rotary_sensitivity: data->rotary_sensitivity = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_pointer: data->pointer = mp_write_lv_indev_pointer_t(dest[1]); break; // converting to lv_indev_pointer_t; + case MP_QSTR_keypad: data->keypad = mp_write_lv_indev_keypad_t(dest[1]); break; // converting to lv_indev_keypad_t; + case MP_QSTR_cursor: data->cursor = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_group: data->group = (void*)mp_write_ptr_lv_group_t(dest[1]); break; // converting to lv_group_t *; + case MP_QSTR_btn_points: data->btn_points = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_scroll_throw_anim: data->scroll_throw_anim = (void*)mp_write_ptr_lv_anim_t(dest[1]); break; // converting to lv_anim_t *; + case MP_QSTR_key_remap_cb: data->key_remap_cb = mp_lv_callback(dest[1], lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_key_remap_cb_t; + case MP_QSTR_recognizers: mp_lv_struct_array_assign(data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_write_ptr_lv_indev_gesture_recognizer_t, dest[1]); break; // converting to lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_cur_gesture: data->cur_gesture = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; + case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; + case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; default: return; } @@ -30663,147 +33688,154 @@ static void mp_lv_draw_triangle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_draw_triangle_dsc_t_print(const mp_print_t *print, +static void mp_lv_indev_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_triangle_dsc_t"); + mp_printf(print, "struct lv_indev_t"); } -static const mp_obj_dict_t mp_lv_draw_triangle_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_indev_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_triangle_dsc_t_type, - MP_QSTR_lv_draw_triangle_dsc_t, + mp_lv_indev_t_type, + MP_QSTR_lv_indev_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_triangle_dsc_t_print, + print, mp_lv_indev_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_triangle_dsc_t_attr, - locals_dict, &mp_lv_draw_triangle_dsc_t_locals_dict, + attr, mp_lv_indev_t_attr, + locals_dict, &mp_lv_indev_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_triangle_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_indev_t_type(void) { - return &mp_lv_draw_triangle_dsc_t_type; + return &mp_lv_indev_t_type; } -#define funcptr_lv_indev_read_cb_t NULL - /* - * Array convertors for lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT] + * Struct lv_draw_mask_rect_dsc_t */ -GENMPY_UNUSED static lv_indev_gesture_type_t *mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) +static inline const mp_obj_type_t *get_mp_lv_draw_mask_rect_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_obj_t self_in) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_indev_gesture_type_t *lv_arr = (lv_indev_gesture_type_t*)m_malloc(len * sizeof(lv_indev_gesture_type_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (int)mp_obj_get_int(item); - } - return (lv_indev_gesture_type_t *)lv_arr; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_mask_rect_dsc_t_type())); + return (lv_draw_mask_rect_dsc_t*)self->data; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_type_t *arr) +#define mp_write_lv_draw_mask_rect_dsc_t(struct_obj) *((lv_draw_mask_rect_dsc_t*)mp_write_ptr_lv_draw_mask_rect_dsc_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_mask_rect_dsc_t(void *field) { - mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; - for (size_t i=0; idata; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; + case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_keep_outside: dest[0] = mp_obj_new_int_from_uint(data->keep_outside); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; + case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_keep_outside: data->keep_outside = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } } - return (void * *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(void * *arr) +static void mp_lv_draw_mask_rect_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; - for (size_t i=0; idata; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_binfont_dsc_t_type())); + return (lv_binfont_dsc_t*)self->data; } -#define mp_write_lv_indev_data_t(struct_obj) *((lv_indev_data_t*)mp_write_ptr_lv_indev_data_t(struct_obj)) +#define mp_write_lv_binfont_dsc_t(struct_obj) *((lv_binfont_dsc_t*)mp_write_ptr_lv_binfont_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_data_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_binfont_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_data_t_type(), field); + return lv_to_mp_struct(get_mp_lv_binfont_dsc_t_type(), field); } -#define mp_read_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(copy_buffer(&field, sizeof(lv_indev_data_t))) -#define mp_read_byref_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(&field) +#define mp_read_lv_binfont_dsc_t(field) mp_read_ptr_lv_binfont_dsc_t(copy_buffer(&field, sizeof(lv_binfont_dsc_t))) +#define mp_read_byref_lv_binfont_dsc_t(field) mp_read_ptr_lv_binfont_dsc_t(&field) -static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_binfont_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_data_t *data = (lv_indev_data_t*)self->data; + GENMPY_UNUSED lv_binfont_dsc_t *data = (lv_binfont_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; - case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; - case MP_QSTR_key: dest[0] = mp_obj_new_int_from_uint(data->key); break; // converting from uint32_t; - case MP_QSTR_btn_id: dest[0] = mp_obj_new_int_from_uint(data->btn_id); break; // converting from uint32_t; - case MP_QSTR_enc_diff: dest[0] = mp_obj_new_int(data->enc_diff); break; // converting from int16_t; - case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; - case MP_QSTR_continue_reading: dest[0] = convert_to_bool(data->continue_reading); break; // converting from bool; + case MP_QSTR_path: dest[0] = convert_to_str((void*)data->path); break; // converting from char *; + case MP_QSTR_buffer: dest[0] = ptr_to_mp((void*)data->buffer); break; // converting from void *; + case MP_QSTR_buffer_size: dest[0] = mp_obj_new_int_from_uint(data->buffer_size); break; // converting from uint32_t; + case MP_QSTR_dynamic_glyph_load: dest[0] = convert_to_bool(data->dynamic_glyph_load); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -30812,15 +33844,10 @@ static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_key: data->key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_btn_id: data->btn_id = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_enc_diff: data->enc_diff = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_continue_reading: data->continue_reading = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_path: data->path = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_buffer: data->buffer = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_buffer_size: data->buffer_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_dynamic_glyph_load: data->dynamic_glyph_load = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -30829,183 +33856,130 @@ static void mp_lv_indev_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_indev_data_t_print(const mp_print_t *print, +static void mp_lv_binfont_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_data_t"); + mp_printf(print, "struct lv_binfont_dsc_t"); } -static const mp_obj_dict_t mp_lv_indev_data_t_locals_dict; +static const mp_obj_dict_t mp_lv_binfont_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_data_t_type, - MP_QSTR_lv_indev_data_t, + mp_lv_binfont_dsc_t_type, + MP_QSTR_lv_binfont_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_data_t_print, + print, mp_lv_binfont_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_data_t_attr, - locals_dict, &mp_lv_indev_data_t_locals_dict, + attr, mp_lv_binfont_dsc_t_attr, + locals_dict, &mp_lv_binfont_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_data_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_binfont_dsc_t_type(void) { - return &mp_lv_indev_data_t_type; + return &mp_lv_binfont_dsc_t_type; } +#define funcptr_lv_async_cb_t NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_async_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_async_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_async_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_async_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_async_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +#define funcptr_lv_delay_cb_t NULL + /* * lvgl extension definition for: - * void lv_indev_read_cb_t(lv_indev_t *indev, lv_indev_data_t *data) + * void lv_delay_cb_t(uint32_t ms) */ -static mp_obj_t mp_funcptr_lv_indev_read_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_delay_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_indev_t *indev = mp_to_ptr(mp_args[0]); - lv_indev_data_t *data = mp_write_ptr_lv_indev_data_t(mp_args[1]); - ((void (*)(lv_indev_t *, lv_indev_data_t *))lv_func_ptr)(indev, data); + uint32_t ms = (uint32_t)mp_obj_get_int(mp_args[0]); + ((void (*)(uint32_t))lv_func_ptr)(ms); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_read_cb_t_mpobj, 2, mp_funcptr_lv_indev_read_cb_t, funcptr_lv_indev_read_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_delay_cb_t_mpobj, 1, mp_funcptr_lv_delay_cb_t, funcptr_lv_delay_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_read_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_delay_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_delay_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +#define funcptr_lv_tick_get_cb_t NULL -static void lv_indev_t_read_cb_callback(lv_indev_t *indev, lv_indev_data_t *data); -typedef __typeof__( ((lv_indev_t*)(0))->pointer ) lv_indev_pointer_t; /* - * Array convertors for lv_point_t [8] + * lvgl extension definition for: + * uint32_t lv_tick_get_cb_t(void) */ -GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t___8__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_t(item); - } - return (lv_point_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t___8__(lv_point_t *arr) +static mp_obj_t mp_funcptr_lv_tick_get_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t obj_arr[8]; - for (size_t i=0; i<8; i++){ - obj_arr[i] = mp_read_lv_point_t(arr[i]); - } - return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! + + uint32_t _res = ((uint32_t (*)(void))lv_func_ptr)(); + return mp_obj_new_int_from_uint(_res); } + -/* - * Array convertors for uint32_t [8] - */ - -GENMPY_UNUSED static uint32_t *mp_arr_to_uint32_t___8__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - uint32_t *lv_arr = (uint32_t*)m_malloc(len * sizeof(uint32_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint32_t)mp_obj_get_int(item); - } - return (uint32_t *)lv_arr; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_tick_get_cb_t_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, funcptr_lv_tick_get_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_tick_get_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_tick_get_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -GENMPY_UNUSED static mp_obj_t mp_arr_from_uint32_t___8__(uint32_t *arr) -{ - mp_obj_t obj_arr[8]; - for (size_t i=0; i<8; i++){ - obj_arr[i] = mp_obj_new_int_from_uint(arr[i]); - } - return mp_obj_new_list(8, obj_arr); // TODO: return custom iterable object! -} +#define funcptr_lv_draw_sw_blend_handler_t NULL /* - * Struct lv_indev_pointer_t + * Struct lv_draw_sw_blend_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_pointer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_pointer_t_type())); - return (lv_indev_pointer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_dsc_t_type())); + return (lv_draw_sw_blend_dsc_t*)self->data; } -#define mp_write_lv_indev_pointer_t(struct_obj) *((lv_indev_pointer_t*)mp_write_ptr_lv_indev_pointer_t(struct_obj)) +#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) *((lv_draw_sw_blend_dsc_t*)mp_write_ptr_lv_draw_sw_blend_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_pointer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_pointer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_blend_dsc_t_type(), field); } -#define mp_read_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(copy_buffer(&field, sizeof(lv_indev_pointer_t))) -#define mp_read_byref_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(&field) +#define mp_read_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) -static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_pointer_t *data = (lv_indev_pointer_t*)self->data; + GENMPY_UNUSED lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_act_point: dest[0] = mp_read_byref_lv_point_t(data->act_point); break; // converting from lv_point_t; - case MP_QSTR_last_point: dest[0] = mp_read_byref_lv_point_t(data->last_point); break; // converting from lv_point_t; - case MP_QSTR_last_raw_point: dest[0] = mp_read_byref_lv_point_t(data->last_raw_point); break; // converting from lv_point_t; - case MP_QSTR_vect: dest[0] = mp_read_byref_lv_point_t(data->vect); break; // converting from lv_point_t; - case MP_QSTR_vect_hist: dest[0] = mp_lv_struct_array_new(self_in, data->vect_hist, 8, sizeof(lv_point_t), mp_read_ptr_lv_point_t, mp_write_ptr_lv_point_t); break; // converting from lv_point_t [8]; - case MP_QSTR_vect_hist_timestamp: dest[0] = mp_arr_from_uint32_t___8__(data->vect_hist_timestamp); break; // converting from uint32_t [8]; - case MP_QSTR_vect_hist_index: dest[0] = mp_obj_new_int_from_uint(data->vect_hist_index); break; // converting from uint8_t; - case MP_QSTR_scroll_sum: dest[0] = mp_read_byref_lv_point_t(data->scroll_sum); break; // converting from lv_point_t; - case MP_QSTR_scroll_throw_vect: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect); break; // converting from lv_point_t; - case MP_QSTR_scroll_throw_vect_ori: dest[0] = mp_read_byref_lv_point_t(data->scroll_throw_vect_ori); break; // converting from lv_point_t; - case MP_QSTR_act_obj: dest[0] = lv_to_mp((void*)data->act_obj); break; // converting from lv_obj_t *; - case MP_QSTR_scroll_obj: dest[0] = lv_to_mp((void*)data->scroll_obj); break; // converting from lv_obj_t *; - case MP_QSTR_last_pressed: dest[0] = lv_to_mp((void*)data->last_pressed); break; // converting from lv_obj_t *; - case MP_QSTR_last_hovered: dest[0] = lv_to_mp((void*)data->last_hovered); break; // converting from lv_obj_t *; - case MP_QSTR_scroll_area: dest[0] = mp_read_byref_lv_area_t(data->scroll_area); break; // converting from lv_area_t; - case MP_QSTR_gesture_sum: dest[0] = mp_read_byref_lv_point_t(data->gesture_sum); break; // converting from lv_point_t; - case MP_QSTR_diff: dest[0] = mp_obj_new_int(data->diff); break; // converting from int32_t; - case MP_QSTR_short_click_streak: dest[0] = mp_obj_new_int_from_uint(data->short_click_streak); break; // converting from uint8_t; - case MP_QSTR_last_short_click_point: dest[0] = mp_read_byref_lv_point_t(data->last_short_click_point); break; // converting from lv_point_t; - case MP_QSTR_last_short_click_timestamp: dest[0] = mp_obj_new_int_from_uint(data->last_short_click_timestamp); break; // converting from uint32_t; - case MP_QSTR_scroll_dir: dest[0] = mp_obj_new_int_from_uint(data->scroll_dir); break; // converting from uint8_t; - case MP_QSTR_gesture_dir: dest[0] = mp_obj_new_int_from_uint(data->gesture_dir); break; // converting from uint8_t; - case MP_QSTR_gesture_sent: dest[0] = mp_obj_new_int_from_uint(data->gesture_sent); break; // converting from uint8_t; - case MP_QSTR_press_moved: dest[0] = mp_obj_new_int_from_uint(data->press_moved); break; // converting from uint8_t; - case MP_QSTR_pressed: dest[0] = mp_obj_new_int_from_uint(data->pressed); break; // converting from uint8_t; + case MP_QSTR_blend_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->blend_area); break; // converting from lv_area_t *; + case MP_QSTR_src_buf: dest[0] = ptr_to_mp((void*)data->src_buf); break; // converting from void *; + case MP_QSTR_src_stride: dest[0] = mp_obj_new_int_from_uint(data->src_stride); break; // converting from uint32_t; + case MP_QSTR_src_color_format: dest[0] = mp_obj_new_int(data->src_color_format); break; // converting from lv_color_format_t; + case MP_QSTR_src_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->src_area); break; // converting from lv_area_t *; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; + case MP_QSTR_mask_res: dest[0] = mp_obj_new_int(data->mask_res); break; // converting from lv_draw_sw_mask_res_t; + case MP_QSTR_mask_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->mask_area); break; // converting from lv_area_t *; + case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; + case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31014,31 +33988,18 @@ static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de // store attribute switch(attr) { - case MP_QSTR_act_point: data->act_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_point: data->last_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_raw_point: data->last_raw_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_vect: data->vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_vect_hist: mp_lv_struct_array_assign(data->vect_hist, 8, sizeof(lv_point_t), mp_write_ptr_lv_point_t, dest[1]); break; // converting to lv_point_t [8]; - case MP_QSTR_vect_hist_timestamp: memcpy((void*)&data->vect_hist_timestamp, mp_arr_to_uint32_t___8__(dest[1]), sizeof(uint32_t)*8); break; // converting to uint32_t [8]; - case MP_QSTR_vect_hist_index: data->vect_hist_index = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_scroll_sum: data->scroll_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_scroll_throw_vect: data->scroll_throw_vect = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_scroll_throw_vect_ori: data->scroll_throw_vect_ori = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_act_obj: data->act_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scroll_obj: data->scroll_obj = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_last_pressed: data->last_pressed = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_last_hovered: data->last_hovered = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scroll_area: data->scroll_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_gesture_sum: data->gesture_sum = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_diff: data->diff = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_short_click_streak: data->short_click_streak = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_last_short_click_point: data->last_short_click_point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_last_short_click_timestamp: data->last_short_click_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_scroll_dir: data->scroll_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_dir: data->gesture_dir = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_sent: data->gesture_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_press_moved: data->press_moved = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_pressed: data->pressed = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_blend_area: data->blend_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_src_buf: data->src_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_stride: data->src_stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_src_color_format: data->src_color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_src_area: data->src_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_mask_res: data->mask_res = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_res_t; + case MP_QSTR_mask_area: data->mask_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; + case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; default: return; } @@ -31047,69 +34008,95 @@ static void mp_lv_indev_pointer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de } } -static void mp_lv_indev_pointer_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_blend_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_pointer_t"); + mp_printf(print, "struct lv_draw_sw_blend_dsc_t"); } -static const mp_obj_dict_t mp_lv_indev_pointer_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_blend_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_pointer_t_type, - MP_QSTR_lv_indev_pointer_t, + mp_lv_draw_sw_blend_dsc_t_type, + MP_QSTR_lv_draw_sw_blend_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_pointer_t_print, + print, mp_lv_draw_sw_blend_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_pointer_t_attr, - locals_dict, &mp_lv_indev_pointer_t_locals_dict, + attr, mp_lv_draw_sw_blend_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_blend_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_pointer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void) { - return &mp_lv_indev_pointer_t_type; + return &mp_lv_draw_sw_blend_dsc_t_type; } -typedef __typeof__( ((lv_indev_t*)(0))->keypad ) lv_indev_keypad_t; /* - * Struct lv_indev_keypad_t + * lvgl extension definition for: + * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) */ -static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void); +static mp_obj_t mp_funcptr_lv_draw_sw_blend_handler_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_func_ptr)(t, dsc); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_keypad_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, funcptr_lv_draw_sw_blend_handler_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_blend_handler_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_custom_blend_handler_t_handler_callback' + * lv_draw_sw_blend_handler_t handler + */ + + +/* + * Struct lv_draw_sw_custom_blend_handler_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_keypad_t_type())); - return (lv_indev_keypad_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_custom_blend_handler_t_type())); + return (lv_draw_sw_custom_blend_handler_t*)self->data; } -#define mp_write_lv_indev_keypad_t(struct_obj) *((lv_indev_keypad_t*)mp_write_ptr_lv_indev_keypad_t(struct_obj)) +#define mp_write_lv_draw_sw_custom_blend_handler_t(struct_obj) *((lv_draw_sw_custom_blend_handler_t*)mp_write_ptr_lv_draw_sw_custom_blend_handler_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_keypad_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_custom_blend_handler_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_keypad_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_custom_blend_handler_t_type(), field); } -#define mp_read_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(copy_buffer(&field, sizeof(lv_indev_keypad_t))) -#define mp_read_byref_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(&field) +#define mp_read_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(copy_buffer(&field, sizeof(lv_draw_sw_custom_blend_handler_t))) +#define mp_read_byref_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(&field) -static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_keypad_t *data = (lv_indev_keypad_t*)self->data; + GENMPY_UNUSED lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_last_state: dest[0] = mp_obj_new_int(data->last_state); break; // converting from lv_indev_state_t; - case MP_QSTR_last_key: dest[0] = mp_obj_new_int_from_uint(data->last_key); break; // converting from uint32_t; + case MP_QSTR_dest_cf: dest[0] = mp_obj_new_int(data->dest_cf); break; // converting from lv_color_format_t; + case MP_QSTR_handler: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, data->handler, NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL); break; // converting from callback lv_draw_sw_blend_handler_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31118,8 +34105,8 @@ static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des // store attribute switch(attr) { - case MP_QSTR_last_state: data->last_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_last_key: data->last_key = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_dest_cf: data->dest_cf = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_handler: data->handler = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_blend_handler_t; default: return; } @@ -31128,90 +34115,100 @@ static void mp_lv_indev_keypad_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des } } -static void mp_lv_indev_keypad_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_custom_blend_handler_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_keypad_t"); + mp_printf(print, "struct lv_draw_sw_custom_blend_handler_t"); } -static const mp_obj_dict_t mp_lv_indev_keypad_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_keypad_t_type, - MP_QSTR_lv_indev_keypad_t, + mp_lv_draw_sw_custom_blend_handler_t_type, + MP_QSTR_lv_draw_sw_custom_blend_handler_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_keypad_t_print, + print, mp_lv_draw_sw_custom_blend_handler_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_keypad_t_attr, - locals_dict, &mp_lv_indev_keypad_t_locals_dict, + attr, mp_lv_draw_sw_custom_blend_handler_t_attr, + locals_dict, &mp_lv_draw_sw_custom_blend_handler_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_keypad_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void) { - return &mp_lv_indev_keypad_t_type; + return &mp_lv_draw_sw_custom_blend_handler_t_type; } -#define funcptr_lv_indev_key_remap_cb_t NULL +#define funcptr_lv_draw_sw_mask_xcb_t NULL /* * lvgl extension definition for: - * lv_key_t lv_indev_key_remap_cb_t(lv_indev_t *indev, lv_key_t key) + * lv_draw_sw_mask_res_t lv_draw_sw_mask_xcb_t(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p) */ -static mp_obj_t mp_funcptr_lv_indev_key_remap_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_sw_mask_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_indev_t *indev = mp_to_ptr(mp_args[0]); - lv_key_t key = (int)mp_obj_get_int(mp_args[1]); - lv_key_t _res = ((lv_key_t (*)(lv_indev_t *, lv_key_t))lv_func_ptr)(indev, key); + lv_opa_t *mask_buf = mp_array_to_u8ptr(mp_args[0]); + int32_t abs_x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t abs_y = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t len = (int32_t)mp_obj_get_int(mp_args[3]); + void *p = mp_to_ptr(mp_args[4]); + lv_draw_sw_mask_res_t _res = ((lv_draw_sw_mask_res_t (*)(lv_opa_t *, int32_t, int32_t, int32_t, void *))lv_func_ptr)(mask_buf, abs_x, abs_y, len, p); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_indev_key_remap_cb_t_mpobj, 2, mp_funcptr_lv_indev_key_remap_cb_t, funcptr_lv_indev_key_remap_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, 5, mp_funcptr_lv_draw_sw_mask_xcb_t, funcptr_lv_draw_sw_mask_xcb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_indev_key_remap_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_mask_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *indev, lv_key_t key); /* - * Struct lv_indev_gesture_t + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_mask_common_dsc_t_cb_callback' + * lv_draw_sw_mask_xcb_t cb */ + -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void); +/* + * Struct lv_draw_sw_mask_common_dsc_t + */ -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_t(mp_obj_t self_in) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_common_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_t_type())); - return (lv_indev_gesture_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_common_dsc_t_type())); + return (lv_draw_sw_mask_common_dsc_t*)self->data; } -#define mp_write_lv_indev_gesture_t(struct_obj) *((lv_indev_gesture_t*)mp_write_ptr_lv_indev_gesture_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_common_dsc_t(struct_obj) *((lv_draw_sw_mask_common_dsc_t*)mp_write_ptr_lv_draw_sw_mask_common_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_common_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_gesture_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_common_dsc_t_type(), field); } -#define mp_read_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(copy_buffer(&field, sizeof(lv_indev_gesture_t))) -#define mp_read_byref_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(&field) +#define mp_read_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_common_dsc_t))) +#define mp_read_byref_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(&field) -static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_gesture_t *data = (lv_indev_gesture_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, data->cb, NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL); break; // converting from callback lv_draw_sw_mask_xcb_t; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_sw_mask_type_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31220,7 +34217,8 @@ static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de // store attribute switch(attr) { - ; + case MP_QSTR_cb: data->cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_mask_xcb_t; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_type_t; default: return; } @@ -31229,67 +34227,70 @@ static void mp_lv_indev_gesture_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *de } } -static void mp_lv_indev_gesture_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_common_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_gesture_t"); + mp_printf(print, "struct lv_draw_sw_mask_common_dsc_t"); } -static const mp_obj_dict_t mp_lv_indev_gesture_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_common_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_gesture_t_type, - MP_QSTR_lv_indev_gesture_t, + mp_lv_draw_sw_mask_common_dsc_t_type, + MP_QSTR_lv_draw_sw_mask_common_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_gesture_t_print, + print, mp_lv_draw_sw_mask_common_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_gesture_t_attr, - locals_dict, &mp_lv_indev_gesture_t_locals_dict, + attr, mp_lv_draw_sw_mask_common_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_mask_common_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void) { - return &mp_lv_indev_gesture_t_type; + return &mp_lv_draw_sw_mask_common_dsc_t_type; } +typedef __typeof__( ((lv_draw_sw_mask_line_param_t*)(0))->cfg ) lv_draw_sw_mask_line_param_cfg_t; /* - * Struct lv_indev_gesture_configuration_t + * Struct lv_draw_sw_mask_line_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_configuration_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_configuration_t_type())); - return (lv_indev_gesture_configuration_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_cfg_t_type())); + return (lv_draw_sw_mask_line_param_cfg_t*)self->data; } -#define mp_write_lv_indev_gesture_configuration_t(struct_obj) *((lv_indev_gesture_configuration_t*)mp_write_ptr_lv_indev_gesture_configuration_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_line_param_cfg_t(struct_obj) *((lv_draw_sw_mask_line_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_configuration_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_gesture_configuration_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_cfg_t_type(), field); } -#define mp_read_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(copy_buffer(&field, sizeof(lv_indev_gesture_configuration_t))) -#define mp_read_byref_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(&field) +#define mp_read_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(&field) -static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_p1: dest[0] = mp_read_byref_lv_point_t(data->p1); break; // converting from lv_point_t; + case MP_QSTR_p2: dest[0] = mp_read_byref_lv_point_t(data->p2); break; // converting from lv_point_t; + case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_draw_sw_mask_line_side_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31298,7 +34299,9 @@ static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr // store attribute switch(attr) { - ; + case MP_QSTR_p1: data->p1 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_p2: data->p2 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_line_side_t; default: return; } @@ -31307,72 +34310,75 @@ static void mp_lv_indev_gesture_configuration_t_attr(mp_obj_t self_in, qstr attr } } -static void mp_lv_indev_gesture_configuration_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_line_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_gesture_configuration_t"); + mp_printf(print, "struct lv_draw_sw_mask_line_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_indev_gesture_configuration_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_gesture_configuration_t_type, - MP_QSTR_lv_indev_gesture_configuration_t, + mp_lv_draw_sw_mask_line_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_line_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_gesture_configuration_t_print, + print, mp_lv_draw_sw_mask_line_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_gesture_configuration_t_attr, - locals_dict, &mp_lv_indev_gesture_configuration_t_locals_dict, + attr, mp_lv_draw_sw_mask_line_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_configuration_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void) { - return &mp_lv_indev_gesture_configuration_t_type; + return &mp_lv_draw_sw_mask_line_param_cfg_t_type; } -#define funcptr_lv_recognizer_func_t NULL - /* - * Struct lv_indev_touch_data_t + * Struct lv_draw_sw_mask_line_param_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_touch_data_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_touch_data_t_type())); - return (lv_indev_touch_data_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_t_type())); + return (lv_draw_sw_mask_line_param_t*)self->data; } -#define mp_write_lv_indev_touch_data_t(struct_obj) *((lv_indev_touch_data_t*)mp_write_ptr_lv_indev_touch_data_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_line_param_t(struct_obj) *((lv_draw_sw_mask_line_param_t*)mp_write_ptr_lv_draw_sw_mask_line_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_touch_data_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_touch_data_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_t_type(), field); } -#define mp_read_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(copy_buffer(&field, sizeof(lv_indev_touch_data_t))) -#define mp_read_byref_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(&field) +#define mp_read_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_t))) +#define mp_read_byref_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(&field) -static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_point: dest[0] = mp_read_byref_lv_point_t(data->point); break; // converting from lv_point_t; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; - case MP_QSTR_id: dest[0] = mp_obj_new_int_from_uint(data->id); break; // converting from uint8_t; - case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; + case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_line_param_cfg_t; + case MP_QSTR_origo: dest[0] = mp_read_byref_lv_point_t(data->origo); break; // converting from lv_point_t; + case MP_QSTR_xy_steep: dest[0] = mp_obj_new_int(data->xy_steep); break; // converting from int32_t; + case MP_QSTR_yx_steep: dest[0] = mp_obj_new_int(data->yx_steep); break; // converting from int32_t; + case MP_QSTR_steep: dest[0] = mp_obj_new_int(data->steep); break; // converting from int32_t; + case MP_QSTR_spx: dest[0] = mp_obj_new_int(data->spx); break; // converting from int32_t; + case MP_QSTR_flat: dest[0] = mp_obj_new_int_from_uint(data->flat); break; // converting from uint8_t; + case MP_QSTR_inv: dest[0] = mp_obj_new_int_from_uint(data->inv); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31381,10 +34387,15 @@ static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_point: data->point = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_id: data->id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_line_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_cfg_t; + case MP_QSTR_origo: data->origo = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_xy_steep: data->xy_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_yx_steep: data->yx_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_steep: data->steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_spx: data->spx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_flat: data->flat = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_inv: data->inv = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -31393,104 +34404,70 @@ static void mp_lv_indev_touch_data_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_indev_touch_data_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_line_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_touch_data_t"); + mp_printf(print, "struct lv_draw_sw_mask_line_param_t"); } -static const mp_obj_dict_t mp_lv_indev_touch_data_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_touch_data_t_type, - MP_QSTR_lv_indev_touch_data_t, + mp_lv_draw_sw_mask_line_param_t_type, + MP_QSTR_lv_draw_sw_mask_line_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_touch_data_t_print, + print, mp_lv_draw_sw_mask_line_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_touch_data_t_attr, - locals_dict, &mp_lv_indev_touch_data_t_locals_dict, + attr, mp_lv_draw_sw_mask_line_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_line_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_touch_data_t_type(void) -{ - return &mp_lv_indev_touch_data_t_type; -} - - -/* - * lvgl extension definition for: - * void lv_recognizer_func_t(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t) - */ - -static mp_obj_t mp_funcptr_lv_recognizer_func_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void) { - lv_indev_gesture_recognizer_t *arg0 = mp_to_ptr(mp_args[0]); - lv_indev_touch_data_t *arg1 = mp_write_ptr_lv_indev_touch_data_t(mp_args[1]); - uint16_t arg2 = (uint16_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_func_ptr)(arg0, arg1, arg2); - return mp_const_none; + return &mp_lv_draw_sw_mask_line_param_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_recognizer_func_t_mpobj, 3, mp_funcptr_lv_recognizer_func_t, funcptr_lv_recognizer_func_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_recognizer_func_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_indev_gesture_recognizer_t_recog_fn_callback' - * lv_recognizer_func_t recog_fn - */ +typedef __typeof__( ((lv_draw_sw_mask_angle_param_t*)(0))->cfg ) lv_draw_sw_mask_angle_param_cfg_t; /* - * Struct lv_indev_gesture_recognizer_t + * Struct lv_draw_sw_mask_angle_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_gesture_recognizer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_gesture_recognizer_t_type())); - return (lv_indev_gesture_recognizer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_cfg_t_type())); + return (lv_draw_sw_mask_angle_param_cfg_t*)self->data; } -#define mp_write_lv_indev_gesture_recognizer_t(struct_obj) *((lv_indev_gesture_recognizer_t*)mp_write_ptr_lv_indev_gesture_recognizer_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_angle_param_cfg_t(struct_obj) *((lv_draw_sw_mask_angle_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_gesture_recognizer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_gesture_recognizer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(), field); } -#define mp_read_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(copy_buffer(&field, sizeof(lv_indev_gesture_recognizer_t))) -#define mp_read_byref_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(&field) +#define mp_read_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(&field) -static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_gesture_type_t; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_gesture_state_t; - case MP_QSTR_info: dest[0] = mp_read_ptr_lv_indev_gesture_t((void*)data->info); break; // converting from lv_indev_gesture_t *; - case MP_QSTR_scale: dest[0] = mp_obj_new_float_from_f(data->scale); break; // converting from float; - case MP_QSTR_rotation: dest[0] = mp_obj_new_float_from_f(data->rotation); break; // converting from float; - case MP_QSTR_distance: dest[0] = mp_obj_new_float_from_f(data->distance); break; // converting from float; - case MP_QSTR_speed: dest[0] = mp_obj_new_float_from_f(data->speed); break; // converting from float; - case MP_QSTR_two_fingers_swipe_dir: dest[0] = mp_obj_new_int(data->two_fingers_swipe_dir); break; // converting from lv_dir_t; - case MP_QSTR_config: dest[0] = mp_read_ptr_lv_indev_gesture_configuration_t((void*)data->config); break; // converting from lv_indev_gesture_configuration_t *; - case MP_QSTR_recog_fn: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_recognizer_func_t_mpobj, data->recog_fn, NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL); break; // converting from callback lv_recognizer_func_t; + case MP_QSTR_vertex_p: dest[0] = mp_read_byref_lv_point_t(data->vertex_p); break; // converting from lv_point_t; + case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int32_t; + case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31499,16 +34476,9 @@ static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, m // store attribute switch(attr) { - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_state_t; - case MP_QSTR_info: data->info = (void*)mp_write_ptr_lv_indev_gesture_t(dest[1]); break; // converting to lv_indev_gesture_t *; - case MP_QSTR_scale: data->scale = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_rotation: data->rotation = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_distance: data->distance = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_speed: data->speed = (float)mp_obj_get_float(dest[1]); break; // converting to float; - case MP_QSTR_two_fingers_swipe_dir: data->two_fingers_swipe_dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_dir_t; - case MP_QSTR_config: data->config = (void*)mp_write_ptr_lv_indev_gesture_configuration_t(dest[1]); break; // converting to lv_indev_gesture_configuration_t *; - case MP_QSTR_recog_fn: data->recog_fn = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_indev_gesture_recognizer_t_recog_fn, NULL, NULL, NULL, NULL); break; // converting to callback lv_recognizer_func_t; + case MP_QSTR_vertex_p: data->vertex_p = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_start_angle: data->start_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_end_angle: data->end_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -31517,137 +34487,156 @@ static void mp_lv_indev_gesture_recognizer_t_attr(mp_obj_t self_in, qstr attr, m } } -static void mp_lv_indev_gesture_recognizer_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_angle_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_gesture_recognizer_t"); + mp_printf(print, "struct lv_draw_sw_mask_angle_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_indev_gesture_recognizer_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_gesture_recognizer_t_type, - MP_QSTR_lv_indev_gesture_recognizer_t, + mp_lv_draw_sw_mask_angle_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_angle_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_gesture_recognizer_t_print, + print, mp_lv_draw_sw_mask_angle_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_gesture_recognizer_t_attr, - locals_dict, &mp_lv_indev_gesture_recognizer_t_locals_dict, + attr, mp_lv_draw_sw_mask_angle_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_gesture_recognizer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void) { - return &mp_lv_indev_gesture_recognizer_t_type; + return &mp_lv_draw_sw_mask_angle_param_cfg_t_type; } /* - * Array convertors for lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT] + * Struct lv_draw_sw_mask_angle_param_t */ -GENMPY_UNUSED static lv_indev_gesture_recognizer_t *mp_arr_to_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(mp_obj_t mp_arr) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_t(mp_obj_t self_in) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_indev_gesture_recognizer_t *lv_arr = (lv_indev_gesture_recognizer_t*)m_malloc(len * sizeof(lv_indev_gesture_recognizer_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_indev_gesture_recognizer_t(item); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_t_type())); + return (lv_draw_sw_mask_angle_param_t*)self->data; +} + +#define mp_write_lv_draw_sw_mask_angle_param_t(struct_obj) *((lv_draw_sw_mask_angle_param_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_t_type(), field); +} + +#define mp_read_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_t))) +#define mp_read_byref_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(&field) + +static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_angle_param_cfg_t; + case MP_QSTR_start_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->start_line); break; // converting from lv_draw_sw_mask_line_param_t; + case MP_QSTR_end_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->end_line); break; // converting from lv_draw_sw_mask_line_param_t; + case MP_QSTR_delta_deg: dest[0] = mp_obj_new_int_from_uint(data->delta_deg); break; // converting from uint16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_angle_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_angle_param_cfg_t; + case MP_QSTR_start_line: data->start_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; + case MP_QSTR_end_line: data->end_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; + case MP_QSTR_delta_deg: data->delta_deg = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } } - return (lv_indev_gesture_recognizer_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_indev_gesture_recognizer_t___LV_INDEV_GESTURE_CNT__(lv_indev_gesture_recognizer_t *arr) +static void mp_lv_draw_sw_mask_angle_param_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_obj_t obj_arr[LV_INDEV_GESTURE_CNT]; - for (size_t i=0; icfg ) lv_draw_sw_mask_radius_param_cfg_t; /* - * Struct lv_indev_t + * Struct lv_draw_sw_mask_radius_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_indev_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_indev_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_indev_t_type())); - return (lv_indev_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_cfg_t_type())); + return (lv_draw_sw_mask_radius_param_cfg_t*)self->data; } -#define mp_write_lv_indev_t(struct_obj) *((lv_indev_t*)mp_write_ptr_lv_indev_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_radius_param_cfg_t(struct_obj) *((lv_draw_sw_mask_radius_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_indev_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_indev_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(), field); } -#define mp_read_lv_indev_t(field) mp_read_ptr_lv_indev_t(copy_buffer(&field, sizeof(lv_indev_t))) -#define mp_read_byref_lv_indev_t(field) mp_read_ptr_lv_indev_t(&field) +#define mp_read_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(&field) -static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_indev_t *data = (lv_indev_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_indev_type_t; - case MP_QSTR_read_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_read_cb_t_mpobj, data->read_cb, lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, data->user_data); break; // converting from callback lv_indev_read_cb_t; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from lv_indev_state_t; - case MP_QSTR_prev_state: dest[0] = mp_obj_new_int(data->prev_state); break; // converting from lv_indev_state_t; - case MP_QSTR_mode: dest[0] = mp_obj_new_int(data->mode); break; // converting from lv_indev_mode_t; - case MP_QSTR_long_pr_sent: dest[0] = mp_obj_new_int_from_uint(data->long_pr_sent); break; // converting from uint8_t; - case MP_QSTR_reset_query: dest[0] = mp_obj_new_int_from_uint(data->reset_query); break; // converting from uint8_t; - case MP_QSTR_enabled: dest[0] = mp_obj_new_int_from_uint(data->enabled); break; // converting from uint8_t; - case MP_QSTR_wait_until_release: dest[0] = mp_obj_new_int_from_uint(data->wait_until_release); break; // converting from uint8_t; - case MP_QSTR_stop_processing_query: dest[0] = mp_obj_new_int_from_uint(data->stop_processing_query); break; // converting from uint8_t; - case MP_QSTR_timestamp: dest[0] = mp_obj_new_int_from_uint(data->timestamp); break; // converting from uint32_t; - case MP_QSTR_pr_timestamp: dest[0] = mp_obj_new_int_from_uint(data->pr_timestamp); break; // converting from uint32_t; - case MP_QSTR_longpr_rep_timestamp: dest[0] = mp_obj_new_int_from_uint(data->longpr_rep_timestamp); break; // converting from uint32_t; - case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_disp: dest[0] = mp_read_ptr_lv_display_t((void*)data->disp); break; // converting from lv_display_t *; - case MP_QSTR_read_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->read_timer); break; // converting from lv_timer_t *; - case MP_QSTR_scroll_limit: dest[0] = mp_obj_new_int_from_uint(data->scroll_limit); break; // converting from uint8_t; - case MP_QSTR_scroll_throw: dest[0] = mp_obj_new_int_from_uint(data->scroll_throw); break; // converting from uint8_t; - case MP_QSTR_gesture_min_velocity: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_velocity); break; // converting from uint8_t; - case MP_QSTR_gesture_min_distance: dest[0] = mp_obj_new_int_from_uint(data->gesture_min_distance); break; // converting from uint8_t; - case MP_QSTR_long_press_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_time); break; // converting from uint16_t; - case MP_QSTR_long_press_repeat_time: dest[0] = mp_obj_new_int_from_uint(data->long_press_repeat_time); break; // converting from uint16_t; - case MP_QSTR_rotary_sensitivity: dest[0] = mp_obj_new_int(data->rotary_sensitivity); break; // converting from int32_t; - case MP_QSTR_pointer: dest[0] = mp_read_byref_lv_indev_pointer_t(data->pointer); break; // converting from lv_indev_pointer_t; - case MP_QSTR_keypad: dest[0] = mp_read_byref_lv_indev_keypad_t(data->keypad); break; // converting from lv_indev_keypad_t; - case MP_QSTR_cursor: dest[0] = lv_to_mp((void*)data->cursor); break; // converting from lv_obj_t *; - case MP_QSTR_group: dest[0] = mp_read_ptr_lv_group_t((void*)data->group); break; // converting from lv_group_t *; - case MP_QSTR_btn_points: dest[0] = mp_read_ptr_lv_point_t((void*)data->btn_points); break; // converting from lv_point_t *; - case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; - case MP_QSTR_scroll_throw_anim: dest[0] = mp_read_ptr_lv_anim_t((void*)data->scroll_throw_anim); break; // converting from lv_anim_t *; - case MP_QSTR_key_remap_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_indev_key_remap_cb_t_mpobj, data->key_remap_cb, lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, data->user_data); break; // converting from callback lv_indev_key_remap_cb_t; - case MP_QSTR_recognizers: dest[0] = mp_lv_struct_array_new(self_in, data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_read_ptr_lv_indev_gesture_recognizer_t, mp_write_ptr_lv_indev_gesture_recognizer_t); break; // converting from lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_cur_gesture: dest[0] = mp_obj_new_int(data->cur_gesture); break; // converting from lv_indev_gesture_type_t; - case MP_QSTR_gesture_data: dest[0] = mp_arr_from_void_ptr__LV_INDEV_GESTURE_CNT__(data->gesture_data); break; // converting from void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_type: dest[0] = mp_arr_from_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(data->gesture_type); break; // converting from lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_rect: dest[0] = mp_read_byref_lv_area_t(data->rect); break; // converting from lv_area_t; + case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_outer: dest[0] = mp_obj_new_int_from_uint(data->outer); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31656,42 +34645,9 @@ static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_type_t; - case MP_QSTR_read_cb: data->read_cb = mp_lv_callback(dest[1], lv_indev_t_read_cb_callback ,MP_QSTR_lv_indev_t_read_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_read_cb_t; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_prev_state: data->prev_state = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_state_t; - case MP_QSTR_mode: data->mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_mode_t; - case MP_QSTR_long_pr_sent: data->long_pr_sent = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_reset_query: data->reset_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_enabled: data->enabled = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_wait_until_release: data->wait_until_release = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_processing_query: data->stop_processing_query = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_timestamp: data->timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pr_timestamp: data->pr_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_longpr_rep_timestamp: data->longpr_rep_timestamp = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_disp: data->disp = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_read_timer: data->read_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; - case MP_QSTR_scroll_limit: data->scroll_limit = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_scroll_throw: data->scroll_throw = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_min_velocity: data->gesture_min_velocity = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_gesture_min_distance: data->gesture_min_distance = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_long_press_time: data->long_press_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_long_press_repeat_time: data->long_press_repeat_time = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_rotary_sensitivity: data->rotary_sensitivity = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_pointer: data->pointer = mp_write_lv_indev_pointer_t(dest[1]); break; // converting to lv_indev_pointer_t; - case MP_QSTR_keypad: data->keypad = mp_write_lv_indev_keypad_t(dest[1]); break; // converting to lv_indev_keypad_t; - case MP_QSTR_cursor: data->cursor = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_group: data->group = (void*)mp_write_ptr_lv_group_t(dest[1]); break; // converting to lv_group_t *; - case MP_QSTR_btn_points: data->btn_points = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; - case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; - case MP_QSTR_scroll_throw_anim: data->scroll_throw_anim = (void*)mp_write_ptr_lv_anim_t(dest[1]); break; // converting to lv_anim_t *; - case MP_QSTR_key_remap_cb: data->key_remap_cb = mp_lv_callback(dest[1], lv_indev_t_key_remap_cb_callback ,MP_QSTR_lv_indev_t_key_remap_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_indev_key_remap_cb_t; - case MP_QSTR_recognizers: mp_lv_struct_array_assign(data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_write_ptr_lv_indev_gesture_recognizer_t, dest[1]); break; // converting to lv_indev_gesture_recognizer_t [LV_INDEV_GESTURE_CNT]; - case MP_QSTR_cur_gesture: data->cur_gesture = (int)mp_obj_get_int(dest[1]); break; // converting to lv_indev_gesture_type_t; - case MP_QSTR_gesture_data: memcpy((void*)&data->gesture_data, mp_arr_to_void_ptr__LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(void *)*LV_INDEV_GESTURE_CNT); break; // converting to void *[LV_INDEV_GESTURE_CNT]; - case MP_QSTR_gesture_type: memcpy((void*)&data->gesture_type, mp_arr_to_lv_indev_gesture_type_t___LV_INDEV_GESTURE_CNT__(dest[1]), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); break; // converting to lv_indev_gesture_type_t [LV_INDEV_GESTURE_CNT]; + case MP_QSTR_rect: data->rect = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_outer: data->outer = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -31700,70 +34656,73 @@ static void mp_lv_indev_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_indev_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_radius_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_indev_t"); + mp_printf(print, "struct lv_draw_sw_mask_radius_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_indev_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_indev_t_type, - MP_QSTR_lv_indev_t, + mp_lv_draw_sw_mask_radius_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_radius_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_indev_t_print, + print, mp_lv_draw_sw_mask_radius_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_indev_t_attr, - locals_dict, &mp_lv_indev_t_locals_dict, + attr, mp_lv_draw_sw_mask_radius_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_indev_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void) { - return &mp_lv_indev_t_type; + return &mp_lv_draw_sw_mask_radius_param_cfg_t_type; } /* - * Struct lv_draw_mask_rect_dsc_t + * Struct lv_draw_sw_mask_radius_circle_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_mask_rect_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_mask_rect_dsc_t_type())); - return (lv_draw_mask_rect_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type())); + return (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; } -#define mp_write_lv_draw_mask_rect_dsc_t(struct_obj) *((lv_draw_mask_rect_dsc_t*)mp_write_ptr_lv_draw_mask_rect_dsc_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj) *((lv_draw_sw_mask_radius_circle_dsc_t*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_mask_rect_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_mask_rect_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(), field); } -#define mp_read_lv_draw_mask_rect_dsc_t(field) mp_read_ptr_lv_draw_mask_rect_dsc_t(copy_buffer(&field, sizeof(lv_draw_mask_rect_dsc_t))) -#define mp_read_byref_lv_draw_mask_rect_dsc_t(field) mp_read_ptr_lv_draw_mask_rect_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_circle_dsc_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(&field) -static void mp_lv_draw_mask_rect_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_mask_rect_dsc_t *data = (lv_draw_mask_rect_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base: dest[0] = mp_read_byref_lv_draw_dsc_base_t(data->base); break; // converting from lv_draw_dsc_base_t; - case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR_buf: dest[0] = mp_array_from_u8ptr((void*)data->buf); break; // converting from uint8_t *; + case MP_QSTR_cir_opa: dest[0] = mp_array_from_u8ptr((void*)data->cir_opa); break; // converting from lv_opa_t *; + case MP_QSTR_x_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->x_start_on_y); break; // converting from uint16_t *; + case MP_QSTR_opa_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->opa_start_on_y); break; // converting from uint16_t *; + case MP_QSTR_life: dest[0] = mp_obj_new_int(data->life); break; // converting from int32_t; + case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from uint32_t; case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_keep_outside: dest[0] = mp_obj_new_int_from_uint(data->keep_outside); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31772,10 +34731,13 @@ static void mp_lv_draw_mask_rect_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ // store attribute switch(attr) { - case MP_QSTR_base: data->base = mp_write_lv_draw_dsc_base_t(dest[1]); break; // converting to lv_draw_dsc_base_t; - case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_buf: data->buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; + case MP_QSTR_cir_opa: data->cir_opa = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_x_start_on_y: data->x_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; + case MP_QSTR_opa_start_on_y: data->opa_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; + case MP_QSTR_life: data->life = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_used_cnt: data->used_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_keep_outside: data->keep_outside = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -31784,100 +34746,69 @@ static void mp_lv_draw_mask_rect_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ } } -static void mp_lv_draw_mask_rect_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_radius_circle_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_mask_rect_dsc_t"); + mp_printf(print, "struct lv_draw_sw_mask_radius_circle_dsc_t"); } -static const mp_obj_dict_t mp_lv_draw_mask_rect_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_mask_rect_dsc_t_type, - MP_QSTR_lv_draw_mask_rect_dsc_t, + mp_lv_draw_sw_mask_radius_circle_dsc_t_type, + MP_QSTR_lv_draw_sw_mask_radius_circle_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_mask_rect_dsc_t_print, + print, mp_lv_draw_sw_mask_radius_circle_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_mask_rect_dsc_t_attr, - locals_dict, &mp_lv_draw_mask_rect_dsc_t_locals_dict, + attr, mp_lv_draw_sw_mask_radius_circle_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_mask_rect_dsc_t_type(void) -{ - return &mp_lv_draw_mask_rect_dsc_t_type; -} - -#define funcptr_lv_draw_sw_mask_xcb_t NULL - - -/* - * lvgl extension definition for: - * lv_draw_sw_mask_res_t lv_draw_sw_mask_xcb_t(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p) - */ - -static mp_obj_t mp_funcptr_lv_draw_sw_mask_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void) { - lv_opa_t *mask_buf = mp_array_to_u8ptr(mp_args[0]); - int32_t abs_x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t abs_y = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t len = (int32_t)mp_obj_get_int(mp_args[3]); - void *p = mp_to_ptr(mp_args[4]); - lv_draw_sw_mask_res_t _res = ((lv_draw_sw_mask_res_t (*)(lv_opa_t *, int32_t, int32_t, int32_t, void *))lv_func_ptr)(mask_buf, abs_x, abs_y, len, p); - return mp_obj_new_int(_res); + return &mp_lv_draw_sw_mask_radius_circle_dsc_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, 5, mp_funcptr_lv_draw_sw_mask_xcb_t, funcptr_lv_draw_sw_mask_xcb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_mask_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_mask_common_dsc_t_cb_callback' - * lv_draw_sw_mask_xcb_t cb - */ /* - * Struct lv_draw_sw_mask_common_dsc_t + * Struct lv_draw_sw_mask_radius_param_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_common_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_common_dsc_t_type())); - return (lv_draw_sw_mask_common_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_t_type())); + return (lv_draw_sw_mask_radius_param_t*)self->data; } -#define mp_write_lv_draw_sw_mask_common_dsc_t(struct_obj) *((lv_draw_sw_mask_common_dsc_t*)mp_write_ptr_lv_draw_sw_mask_common_dsc_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_radius_param_t(struct_obj) *((lv_draw_sw_mask_radius_param_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_common_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_common_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_t_type(), field); } -#define mp_read_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_common_dsc_t))) -#define mp_read_byref_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(&field) -static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_mask_xcb_t_mpobj, data->cb, NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL); break; // converting from callback lv_draw_sw_mask_xcb_t; - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_sw_mask_type_t; + case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_radius_param_cfg_t; + case MP_QSTR_circle: dest[0] = mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t((void*)data->circle); break; // converting from lv_draw_sw_mask_radius_circle_dsc_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31886,8 +34817,9 @@ static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp // store attribute switch(attr) { - case MP_QSTR_cb: data->cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_mask_common_dsc_t_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_mask_xcb_t; - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_type_t; + case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_radius_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_param_cfg_t; + case MP_QSTR_circle: data->circle = (void*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_circle_dsc_t *; default: return; } @@ -31896,70 +34828,72 @@ static void mp_lv_draw_sw_mask_common_dsc_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_draw_sw_mask_common_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_radius_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_common_dsc_t"); + mp_printf(print, "struct lv_draw_sw_mask_radius_param_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_common_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_common_dsc_t_type, - MP_QSTR_lv_draw_sw_mask_common_dsc_t, + mp_lv_draw_sw_mask_radius_param_t_type, + MP_QSTR_lv_draw_sw_mask_radius_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_common_dsc_t_print, + print, mp_lv_draw_sw_mask_radius_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_common_dsc_t_attr, - locals_dict, &mp_lv_draw_sw_mask_common_dsc_t_locals_dict, + attr, mp_lv_draw_sw_mask_radius_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_radius_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_common_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void) { - return &mp_lv_draw_sw_mask_common_dsc_t_type; + return &mp_lv_draw_sw_mask_radius_param_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_line_param_t*)(0))->cfg ) lv_draw_sw_mask_line_param_cfg_t; +typedef __typeof__( ((lv_draw_sw_mask_fade_param_t*)(0))->cfg ) lv_draw_sw_mask_fade_param_cfg_t; /* - * Struct lv_draw_sw_mask_line_param_cfg_t + * Struct lv_draw_sw_mask_fade_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_cfg_t_type())); - return (lv_draw_sw_mask_line_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_cfg_t_type())); + return (lv_draw_sw_mask_fade_param_cfg_t*)self->data; } -#define mp_write_lv_draw_sw_mask_line_param_cfg_t(struct_obj) *((lv_draw_sw_mask_line_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_fade_param_cfg_t(struct_obj) *((lv_draw_sw_mask_fade_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(), field); } -#define mp_read_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(&field) +#define mp_read_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(&field) -static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_p1: dest[0] = mp_read_byref_lv_point_t(data->p1); break; // converting from lv_point_t; - case MP_QSTR_p2: dest[0] = mp_read_byref_lv_point_t(data->p2); break; // converting from lv_point_t; - case MP_QSTR_side: dest[0] = mp_obj_new_int(data->side); break; // converting from lv_draw_sw_mask_line_side_t; + case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; + case MP_QSTR_y_top: dest[0] = mp_obj_new_int(data->y_top); break; // converting from int32_t; + case MP_QSTR_y_bottom: dest[0] = mp_obj_new_int(data->y_bottom); break; // converting from int32_t; + case MP_QSTR_opa_top: dest[0] = mp_obj_new_int_from_uint(data->opa_top); break; // converting from lv_opa_t; + case MP_QSTR_opa_bottom: dest[0] = mp_obj_new_int_from_uint(data->opa_bottom); break; // converting from lv_opa_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -31968,9 +34902,11 @@ static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr // store attribute switch(attr) { - case MP_QSTR_p1: data->p1 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_p2: data->p2 = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_side: data->side = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_line_side_t; + case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_y_top: data->y_top = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y_bottom: data->y_bottom = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_opa_top: data->opa_top = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_opa_bottom: data->opa_bottom = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; default: return; } @@ -31979,75 +34915,68 @@ static void mp_lv_draw_sw_mask_line_param_cfg_t_attr(mp_obj_t self_in, qstr attr } } -static void mp_lv_draw_sw_mask_line_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_fade_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_line_param_cfg_t"); + mp_printf(print, "struct lv_draw_sw_mask_fade_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_line_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_line_param_cfg_t, + mp_lv_draw_sw_mask_fade_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_fade_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_line_param_cfg_t_print, + print, mp_lv_draw_sw_mask_fade_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_line_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_line_param_cfg_t_locals_dict, + attr, mp_lv_draw_sw_mask_fade_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void) { - return &mp_lv_draw_sw_mask_line_param_cfg_t_type; + return &mp_lv_draw_sw_mask_fade_param_cfg_t_type; } /* - * Struct lv_draw_sw_mask_line_param_t + * Struct lv_draw_sw_mask_fade_param_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_line_param_t_type())); - return (lv_draw_sw_mask_line_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_t_type())); + return (lv_draw_sw_mask_fade_param_t*)self->data; } -#define mp_write_lv_draw_sw_mask_line_param_t(struct_obj) *((lv_draw_sw_mask_line_param_t*)mp_write_ptr_lv_draw_sw_mask_line_param_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_fade_param_t(struct_obj) *((lv_draw_sw_mask_fade_param_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_line_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_line_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_t_type(), field); } -#define mp_read_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_t))) -#define mp_read_byref_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(&field) +#define mp_read_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_t))) +#define mp_read_byref_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(&field) -static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_line_param_cfg_t; - case MP_QSTR_origo: dest[0] = mp_read_byref_lv_point_t(data->origo); break; // converting from lv_point_t; - case MP_QSTR_xy_steep: dest[0] = mp_obj_new_int(data->xy_steep); break; // converting from int32_t; - case MP_QSTR_yx_steep: dest[0] = mp_obj_new_int(data->yx_steep); break; // converting from int32_t; - case MP_QSTR_steep: dest[0] = mp_obj_new_int(data->steep); break; // converting from int32_t; - case MP_QSTR_spx: dest[0] = mp_obj_new_int(data->spx); break; // converting from int32_t; - case MP_QSTR_flat: dest[0] = mp_obj_new_int_from_uint(data->flat); break; // converting from uint8_t; - case MP_QSTR_inv: dest[0] = mp_obj_new_int_from_uint(data->inv); break; // converting from uint8_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_fade_param_cfg_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32057,14 +34986,7 @@ static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp switch(attr) { case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_line_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_cfg_t; - case MP_QSTR_origo: data->origo = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_xy_steep: data->xy_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_yx_steep: data->yx_steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_steep: data->steep = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_spx: data->spx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_flat: data->flat = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_inv: data->inv = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_fade_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_fade_param_cfg_t; default: return; } @@ -32073,70 +34995,69 @@ static void mp_lv_draw_sw_mask_line_param_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_draw_sw_mask_line_param_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_fade_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_line_param_t"); + mp_printf(print, "struct lv_draw_sw_mask_fade_param_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_line_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_line_param_t_type, - MP_QSTR_lv_draw_sw_mask_line_param_t, + mp_lv_draw_sw_mask_fade_param_t_type, + MP_QSTR_lv_draw_sw_mask_fade_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_line_param_t_print, + print, mp_lv_draw_sw_mask_fade_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_line_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_line_param_t_locals_dict, + attr, mp_lv_draw_sw_mask_fade_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_fade_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_line_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void) { - return &mp_lv_draw_sw_mask_line_param_t_type; + return &mp_lv_draw_sw_mask_fade_param_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_angle_param_t*)(0))->cfg ) lv_draw_sw_mask_angle_param_cfg_t; +typedef __typeof__( ((lv_draw_sw_mask_map_param_t*)(0))->cfg ) lv_draw_sw_mask_map_param_cfg_t; /* - * Struct lv_draw_sw_mask_angle_param_cfg_t + * Struct lv_draw_sw_mask_map_param_cfg_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_cfg_t_type())); - return (lv_draw_sw_mask_angle_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_cfg_t_type())); + return (lv_draw_sw_mask_map_param_cfg_t*)self->data; } -#define mp_write_lv_draw_sw_mask_angle_param_cfg_t(struct_obj) *((lv_draw_sw_mask_angle_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_map_param_cfg_t(struct_obj) *((lv_draw_sw_mask_map_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_cfg_t_type(), field); } -#define mp_read_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(&field) +#define mp_read_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(&field) -static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_vertex_p: dest[0] = mp_read_byref_lv_point_t(data->vertex_p); break; // converting from lv_point_t; - case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int32_t; - case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int32_t; + case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; + case MP_QSTR_map: dest[0] = mp_array_from_u8ptr((void*)data->map); break; // converting from lv_opa_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32145,9 +35066,8 @@ static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr att // store attribute switch(attr) { - case MP_QSTR_vertex_p: data->vertex_p = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_start_angle: data->start_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_end_angle: data->end_angle = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_map: data->map = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; default: return; } @@ -32156,71 +35076,68 @@ static void mp_lv_draw_sw_mask_angle_param_cfg_t_attr(mp_obj_t self_in, qstr att } } -static void mp_lv_draw_sw_mask_angle_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_map_param_cfg_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_angle_param_cfg_t"); + mp_printf(print, "struct lv_draw_sw_mask_map_param_cfg_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_angle_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_angle_param_cfg_t, + mp_lv_draw_sw_mask_map_param_cfg_t_type, + MP_QSTR_lv_draw_sw_mask_map_param_cfg_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_angle_param_cfg_t_print, + print, mp_lv_draw_sw_mask_map_param_cfg_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_angle_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict, + attr, mp_lv_draw_sw_mask_map_param_cfg_t_attr, + locals_dict, &mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void) { - return &mp_lv_draw_sw_mask_angle_param_cfg_t_type; + return &mp_lv_draw_sw_mask_map_param_cfg_t_type; } /* - * Struct lv_draw_sw_mask_angle_param_t + * Struct lv_draw_sw_mask_map_param_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_angle_param_t_type())); - return (lv_draw_sw_mask_angle_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_t_type())); + return (lv_draw_sw_mask_map_param_t*)self->data; } -#define mp_write_lv_draw_sw_mask_angle_param_t(struct_obj) *((lv_draw_sw_mask_angle_param_t*)mp_write_ptr_lv_draw_sw_mask_angle_param_t(struct_obj)) +#define mp_write_lv_draw_sw_mask_map_param_t(struct_obj) *((lv_draw_sw_mask_map_param_t*)mp_write_ptr_lv_draw_sw_mask_map_param_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_angle_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_angle_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_t_type(), field); } -#define mp_read_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_t))) -#define mp_read_byref_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(&field) +#define mp_read_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_t))) +#define mp_read_byref_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(&field) -static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)self->data; + GENMPY_UNUSED lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_angle_param_cfg_t; - case MP_QSTR_start_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->start_line); break; // converting from lv_draw_sw_mask_line_param_t; - case MP_QSTR_end_line: dest[0] = mp_read_byref_lv_draw_sw_mask_line_param_t(data->end_line); break; // converting from lv_draw_sw_mask_line_param_t; - case MP_QSTR_delta_deg: dest[0] = mp_obj_new_int_from_uint(data->delta_deg); break; // converting from uint16_t; + case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_map_param_cfg_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32230,10 +35147,7 @@ static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, m switch(attr) { case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_angle_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_angle_param_cfg_t; - case MP_QSTR_start_line: data->start_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; - case MP_QSTR_end_line: data->end_line = mp_write_lv_draw_sw_mask_line_param_t(dest[1]); break; // converting to lv_draw_sw_mask_line_param_t; - case MP_QSTR_delta_deg: data->delta_deg = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_map_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_map_param_cfg_t; default: return; } @@ -32242,70 +35156,106 @@ static void mp_lv_draw_sw_mask_angle_param_t_attr(mp_obj_t self_in, qstr attr, m } } -static void mp_lv_draw_sw_mask_angle_param_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_mask_map_param_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_angle_param_t"); + mp_printf(print, "struct lv_draw_sw_mask_map_param_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_angle_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_angle_param_t_type, - MP_QSTR_lv_draw_sw_mask_angle_param_t, + mp_lv_draw_sw_mask_map_param_t_type, + MP_QSTR_lv_draw_sw_mask_map_param_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_angle_param_t_print, + print, mp_lv_draw_sw_mask_map_param_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_angle_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_angle_param_t_locals_dict, + attr, mp_lv_draw_sw_mask_map_param_t_attr, + locals_dict, &mp_lv_draw_sw_mask_map_param_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_angle_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void) { - return &mp_lv_draw_sw_mask_angle_param_t_type; + return &mp_lv_draw_sw_mask_map_param_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_radius_param_t*)(0))->cfg ) lv_draw_sw_mask_radius_param_cfg_t; /* - * Struct lv_draw_sw_mask_radius_param_cfg_t + * Array convertors for lv_area_t [] */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void); +GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_area_t(item); + } + return (lv_area_t *)lv_arr; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t_____(lv_area_t *arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_cfg_t_type())); - return (lv_draw_sw_mask_radius_param_cfg_t*)self->data; + return mp_read_ptr_lv_area_t((void*)arr); } -#define mp_write_lv_draw_sw_mask_radius_param_cfg_t(struct_obj) *((lv_draw_sw_mask_radius_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(void *field) +/* + * Struct lv_draw_sw_blend_fill_dsc_t + */ + +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_fill_dsc_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(mp_obj_t self_in) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(), field); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_fill_dsc_t_type())); + return (lv_draw_sw_blend_fill_dsc_t*)self->data; } -#define mp_read_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(&field) +#define mp_write_lv_draw_sw_blend_fill_dsc_t(struct_obj) *((lv_draw_sw_blend_fill_dsc_t*)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(struct_obj)) -static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_draw_sw_blend_fill_dsc_t_type(), field); +} + +#define mp_read_lv_draw_sw_blend_fill_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_fill_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_fill_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(&field) + +static void mp_lv_draw_sw_blend_fill_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)self->data; + GENMPY_UNUSED lv_draw_sw_blend_fill_dsc_t *data = (lv_draw_sw_blend_fill_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_rect: dest[0] = mp_read_byref_lv_area_t(data->rect); break; // converting from lv_area_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; - case MP_QSTR_outer: dest[0] = mp_obj_new_int_from_uint(data->outer); break; // converting from uint8_t; + case MP_QSTR_dest_buf: dest[0] = ptr_to_mp((void*)data->dest_buf); break; // converting from void *; + case MP_QSTR_dest_w: dest[0] = mp_obj_new_int(data->dest_w); break; // converting from int32_t; + case MP_QSTR_dest_h: dest[0] = mp_obj_new_int(data->dest_h); break; // converting from int32_t; + case MP_QSTR_dest_stride: dest[0] = mp_obj_new_int(data->dest_stride); break; // converting from int32_t; + case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; + case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_relative_area: dest[0] = mp_read_byref_lv_area_t(data->relative_area); break; // converting from lv_area_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32314,9 +35264,15 @@ static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr at // store attribute switch(attr) { - case MP_QSTR_rect: data->rect = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_outer: data->outer = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_dest_buf: data->dest_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_dest_w: data->dest_w = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_h: data->dest_h = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_stride: data->dest_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_relative_area: data->relative_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; default: return; } @@ -32325,73 +35281,79 @@ static void mp_lv_draw_sw_mask_radius_param_cfg_t_attr(mp_obj_t self_in, qstr at } } -static void mp_lv_draw_sw_mask_radius_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_blend_fill_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_radius_param_cfg_t"); + mp_printf(print, "struct lv_draw_sw_blend_fill_dsc_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_blend_fill_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_radius_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_radius_param_cfg_t, + mp_lv_draw_sw_blend_fill_dsc_t_type, + MP_QSTR_lv_draw_sw_blend_fill_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_radius_param_cfg_t_print, + print, mp_lv_draw_sw_blend_fill_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_radius_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_radius_param_cfg_t_locals_dict, + attr, mp_lv_draw_sw_blend_fill_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_blend_fill_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_fill_dsc_t_type(void) { - return &mp_lv_draw_sw_mask_radius_param_cfg_t_type; + return &mp_lv_draw_sw_blend_fill_dsc_t_type; } /* - * Struct lv_draw_sw_mask_radius_circle_dsc_t + * Struct lv_draw_sw_blend_image_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_image_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_image_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type())); - return (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_image_dsc_t_type())); + return (lv_draw_sw_blend_image_dsc_t*)self->data; } -#define mp_write_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj) *((lv_draw_sw_mask_radius_circle_dsc_t*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj)) +#define mp_write_lv_draw_sw_blend_image_dsc_t(struct_obj) *((lv_draw_sw_blend_image_dsc_t*)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_image_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_blend_image_dsc_t_type(), field); } -#define mp_read_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_circle_dsc_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(&field) +#define mp_read_lv_draw_sw_blend_image_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_image_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_image_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_image_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_image_dsc_t(&field) -static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_blend_image_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_sw_blend_image_dsc_t *data = (lv_draw_sw_blend_image_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_buf: dest[0] = mp_array_from_u8ptr((void*)data->buf); break; // converting from uint8_t *; - case MP_QSTR_cir_opa: dest[0] = mp_array_from_u8ptr((void*)data->cir_opa); break; // converting from lv_opa_t *; - case MP_QSTR_x_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->x_start_on_y); break; // converting from uint16_t *; - case MP_QSTR_opa_start_on_y: dest[0] = mp_array_from_u16ptr((void*)data->opa_start_on_y); break; // converting from uint16_t *; - case MP_QSTR_life: dest[0] = mp_obj_new_int(data->life); break; // converting from int32_t; - case MP_QSTR_used_cnt: dest[0] = mp_obj_new_int_from_uint(data->used_cnt); break; // converting from uint32_t; - case MP_QSTR_radius: dest[0] = mp_obj_new_int(data->radius); break; // converting from int32_t; + case MP_QSTR_dest_buf: dest[0] = ptr_to_mp((void*)data->dest_buf); break; // converting from void *; + case MP_QSTR_dest_w: dest[0] = mp_obj_new_int(data->dest_w); break; // converting from int32_t; + case MP_QSTR_dest_h: dest[0] = mp_obj_new_int(data->dest_h); break; // converting from int32_t; + case MP_QSTR_dest_stride: dest[0] = mp_obj_new_int(data->dest_stride); break; // converting from int32_t; + case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; + case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; + case MP_QSTR_src_buf: dest[0] = ptr_to_mp((void*)data->src_buf); break; // converting from void *; + case MP_QSTR_src_stride: dest[0] = mp_obj_new_int(data->src_stride); break; // converting from int32_t; + case MP_QSTR_src_color_format: dest[0] = mp_obj_new_int(data->src_color_format); break; // converting from lv_color_format_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; + case MP_QSTR_relative_area: dest[0] = mp_read_byref_lv_area_t(data->relative_area); break; // converting from lv_area_t; + case MP_QSTR_src_area: dest[0] = mp_read_byref_lv_area_t(data->src_area); break; // converting from lv_area_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32400,13 +35362,19 @@ static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr a // store attribute switch(attr) { - case MP_QSTR_buf: data->buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; - case MP_QSTR_cir_opa: data->cir_opa = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; - case MP_QSTR_x_start_on_y: data->x_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; - case MP_QSTR_opa_start_on_y: data->opa_start_on_y = (void*)mp_array_to_u16ptr(dest[1]); break; // converting to uint16_t *; - case MP_QSTR_life: data->life = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_used_cnt: data->used_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_radius: data->radius = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_buf: data->dest_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_dest_w: data->dest_w = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_h: data->dest_h = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dest_stride: data->dest_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_src_buf: data->src_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_src_stride: data->src_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_src_color_format: data->src_color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; + case MP_QSTR_relative_area: data->relative_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_src_area: data->src_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; default: return; } @@ -32415,69 +35383,69 @@ static void mp_lv_draw_sw_mask_radius_circle_dsc_t_attr(mp_obj_t self_in, qstr a } } -static void mp_lv_draw_sw_mask_radius_circle_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_blend_image_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_radius_circle_dsc_t"); + mp_printf(print, "struct lv_draw_sw_blend_image_dsc_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_blend_image_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_radius_circle_dsc_t_type, - MP_QSTR_lv_draw_sw_mask_radius_circle_dsc_t, + mp_lv_draw_sw_blend_image_dsc_t_type, + MP_QSTR_lv_draw_sw_blend_image_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_radius_circle_dsc_t_print, + print, mp_lv_draw_sw_blend_image_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_radius_circle_dsc_t_attr, - locals_dict, &mp_lv_draw_sw_mask_radius_circle_dsc_t_locals_dict, + attr, mp_lv_draw_sw_blend_image_dsc_t_attr, + locals_dict, &mp_lv_draw_sw_blend_image_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_circle_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_image_dsc_t_type(void) { - return &mp_lv_draw_sw_mask_radius_circle_dsc_t_type; + return &mp_lv_draw_sw_blend_image_dsc_t_type; } /* - * Struct lv_draw_sw_mask_radius_param_t + * Struct lv_draw_sw_grad_calc_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_sw_grad_calc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_grad_calc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_radius_param_t_type())); - return (lv_draw_sw_mask_radius_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_grad_calc_t_type())); + return (lv_draw_sw_grad_calc_t*)self->data; } -#define mp_write_lv_draw_sw_mask_radius_param_t(struct_obj) *((lv_draw_sw_mask_radius_param_t*)mp_write_ptr_lv_draw_sw_mask_radius_param_t(struct_obj)) +#define mp_write_lv_draw_sw_grad_calc_t(struct_obj) *((lv_draw_sw_grad_calc_t*)mp_write_ptr_lv_draw_sw_grad_calc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_radius_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_grad_calc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_radius_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_sw_grad_calc_t_type(), field); } -#define mp_read_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(&field) +#define mp_read_lv_draw_sw_grad_calc_t(field) mp_read_ptr_lv_draw_sw_grad_calc_t(copy_buffer(&field, sizeof(lv_draw_sw_grad_calc_t))) +#define mp_read_byref_lv_draw_sw_grad_calc_t(field) mp_read_ptr_lv_draw_sw_grad_calc_t(&field) -static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_sw_grad_calc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)self->data; + GENMPY_UNUSED lv_draw_sw_grad_calc_t *data = (lv_draw_sw_grad_calc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_radius_param_cfg_t; - case MP_QSTR_circle: dest[0] = mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t((void*)data->circle); break; // converting from lv_draw_sw_mask_radius_circle_dsc_t *; + case MP_QSTR_color_map: dest[0] = mp_read_ptr_lv_color_t((void*)data->color_map); break; // converting from lv_color_t *; + case MP_QSTR_opa_map: dest[0] = mp_array_from_u8ptr((void*)data->opa_map); break; // converting from lv_opa_t *; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32486,9 +35454,9 @@ static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_radius_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_param_cfg_t; - case MP_QSTR_circle: data->circle = (void*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_radius_circle_dsc_t *; + case MP_QSTR_color_map: data->color_map = (void*)mp_write_ptr_lv_color_t(dest[1]); break; // converting to lv_color_t *; + case MP_QSTR_opa_map: data->opa_map = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_size: data->size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -32497,72 +35465,67 @@ static void mp_lv_draw_sw_mask_radius_param_t_attr(mp_obj_t self_in, qstr attr, } } -static void mp_lv_draw_sw_mask_radius_param_t_print(const mp_print_t *print, +static void mp_lv_draw_sw_grad_calc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_radius_param_t"); + mp_printf(print, "struct lv_draw_sw_grad_calc_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_radius_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_sw_grad_calc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_radius_param_t_type, - MP_QSTR_lv_draw_sw_mask_radius_param_t, + mp_lv_draw_sw_grad_calc_t_type, + MP_QSTR_lv_draw_sw_grad_calc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_radius_param_t_print, + print, mp_lv_draw_sw_grad_calc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_radius_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_radius_param_t_locals_dict, + attr, mp_lv_draw_sw_grad_calc_t_attr, + locals_dict, &mp_lv_draw_sw_grad_calc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_radius_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_sw_grad_calc_t_type(void) { - return &mp_lv_draw_sw_mask_radius_param_t_type; + return &mp_lv_draw_sw_grad_calc_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_fade_param_t*)(0))->cfg ) lv_draw_sw_mask_fade_param_cfg_t; /* - * Struct lv_draw_sw_mask_fade_param_cfg_t + * Struct lv_circle_buf_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_circle_buf_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_cfg_t_type())); - return (lv_draw_sw_mask_fade_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_circle_buf_t_type())); + return (lv_circle_buf_t*)self->data; } -#define mp_write_lv_draw_sw_mask_fade_param_cfg_t(struct_obj) *((lv_draw_sw_mask_fade_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(struct_obj)) +#define mp_write_lv_circle_buf_t(struct_obj) *((lv_circle_buf_t*)mp_write_ptr_lv_circle_buf_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_circle_buf_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_circle_buf_t_type(), field); } -#define mp_read_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(&field) +#define mp_read_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(copy_buffer(&field, sizeof(lv_circle_buf_t))) +#define mp_read_byref_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(&field) -static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_circle_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)self->data; + GENMPY_UNUSED lv_circle_buf_t *data = (lv_circle_buf_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; - case MP_QSTR_y_top: dest[0] = mp_obj_new_int(data->y_top); break; // converting from int32_t; - case MP_QSTR_y_bottom: dest[0] = mp_obj_new_int(data->y_bottom); break; // converting from int32_t; - case MP_QSTR_opa_top: dest[0] = mp_obj_new_int_from_uint(data->opa_top); break; // converting from lv_opa_t; - case MP_QSTR_opa_bottom: dest[0] = mp_obj_new_int_from_uint(data->opa_bottom); break; // converting from lv_opa_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32571,11 +35534,7 @@ static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr // store attribute switch(attr) { - case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_y_top: data->y_top = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y_bottom: data->y_bottom = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_opa_top: data->opa_top = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_opa_bottom: data->opa_bottom = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + ; default: return; } @@ -32584,68 +35543,89 @@ static void mp_lv_draw_sw_mask_fade_param_cfg_t_attr(mp_obj_t self_in, qstr attr } } -static void mp_lv_draw_sw_mask_fade_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_circle_buf_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_fade_param_cfg_t"); + mp_printf(print, "struct lv_circle_buf_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_circle_buf_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_fade_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_fade_param_cfg_t, + mp_lv_circle_buf_t_type, + MP_QSTR_lv_circle_buf_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_fade_param_cfg_t_print, + print, mp_lv_circle_buf_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_fade_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_fade_param_cfg_t_locals_dict, + attr, mp_lv_circle_buf_t_attr, + locals_dict, &mp_lv_circle_buf_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_circle_buf_t_type(void) { - return &mp_lv_draw_sw_mask_fade_param_cfg_t_type; + return &mp_lv_circle_buf_t_type; } +#define funcptr_lv_lru_free_cb_t NULL + +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_lru_free_cb_t */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_lru_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_lru_free_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_lru_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_lru_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* - * Struct lv_draw_sw_mask_fade_param_t + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_lru_t_value_free_callback' + * lv_lru_free_cb_t value_free */ + -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_lru_t_key_free_callback' + * lv_lru_free_cb_t key_free + */ + -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_t(mp_obj_t self_in) +/* + * Struct lv_lru_item_t + */ + +static inline const mp_obj_type_t *get_mp_lv_lru_item_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_lru_item_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_fade_param_t_type())); - return (lv_draw_sw_mask_fade_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_lru_item_t_type())); + return (lv_lru_item_t*)self->data; } -#define mp_write_lv_draw_sw_mask_fade_param_t(struct_obj) *((lv_draw_sw_mask_fade_param_t*)mp_write_ptr_lv_draw_sw_mask_fade_param_t(struct_obj)) +#define mp_write_lv_lru_item_t(struct_obj) *((lv_lru_item_t*)mp_write_ptr_lv_lru_item_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_fade_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_lru_item_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_fade_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_lru_item_t_type(), field); } -#define mp_read_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_t))) -#define mp_read_byref_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(&field) +#define mp_read_lv_lru_item_t(field) mp_read_ptr_lv_lru_item_t(copy_buffer(&field, sizeof(lv_lru_item_t))) +#define mp_read_byref_lv_lru_item_t(field) mp_read_ptr_lv_lru_item_t(&field) -static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_lru_item_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)self->data; + GENMPY_UNUSED lv_lru_item_t *data = (lv_lru_item_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_fade_param_cfg_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32654,8 +35634,7 @@ static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_fade_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_fade_param_cfg_t; + ; default: return; } @@ -32664,69 +35643,76 @@ static void mp_lv_draw_sw_mask_fade_param_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_draw_sw_mask_fade_param_t_print(const mp_print_t *print, +static void mp_lv_lru_item_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_fade_param_t"); + mp_printf(print, "struct lv_lru_item_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_fade_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_lru_item_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_fade_param_t_type, - MP_QSTR_lv_draw_sw_mask_fade_param_t, + mp_lv_lru_item_t_type, + MP_QSTR_lv_lru_item_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_fade_param_t_print, + print, mp_lv_lru_item_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_fade_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_fade_param_t_locals_dict, + attr, mp_lv_lru_item_t_attr, + locals_dict, &mp_lv_lru_item_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_fade_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_lru_item_t_type(void) { - return &mp_lv_draw_sw_mask_fade_param_t_type; + return &mp_lv_lru_item_t_type; } -typedef __typeof__( ((lv_draw_sw_mask_map_param_t*)(0))->cfg ) lv_draw_sw_mask_map_param_cfg_t; /* - * Struct lv_draw_sw_mask_map_param_cfg_t + * Struct lv_lru_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_lru_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_lru_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_cfg_t_type())); - return (lv_draw_sw_mask_map_param_cfg_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_lru_t_type())); + return (lv_lru_t*)self->data; } -#define mp_write_lv_draw_sw_mask_map_param_cfg_t(struct_obj) *((lv_draw_sw_mask_map_param_cfg_t*)mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(struct_obj)) +#define mp_write_lv_lru_t(struct_obj) *((lv_lru_t*)mp_write_ptr_lv_lru_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_lru_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_cfg_t_type(), field); + return lv_to_mp_struct(get_mp_lv_lru_t_type(), field); } -#define mp_read_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(&field) +#define mp_read_lv_lru_t(field) mp_read_ptr_lv_lru_t(copy_buffer(&field, sizeof(lv_lru_t))) +#define mp_read_byref_lv_lru_t(field) mp_read_ptr_lv_lru_t(&field) -static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_lru_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)self->data; + GENMPY_UNUSED lv_lru_t *data = (lv_lru_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_coords: dest[0] = mp_read_byref_lv_area_t(data->coords); break; // converting from lv_area_t; - case MP_QSTR_map: dest[0] = mp_array_from_u8ptr((void*)data->map); break; // converting from lv_opa_t *; + case MP_QSTR_items: dest[0] = ptr_to_mp((void*)data->items); break; // converting from lv_lru_item_t **; + case MP_QSTR_access_count: dest[0] = mp_obj_new_int_from_ull(data->access_count); break; // converting from uint64_t; + case MP_QSTR_free_memory: dest[0] = mp_obj_new_int_from_uint(data->free_memory); break; // converting from size_t; + case MP_QSTR_total_memory: dest[0] = mp_obj_new_int_from_uint(data->total_memory); break; // converting from size_t; + case MP_QSTR_average_item_length: dest[0] = mp_obj_new_int_from_uint(data->average_item_length); break; // converting from size_t; + case MP_QSTR_hash_table_size: dest[0] = mp_obj_new_int_from_uint(data->hash_table_size); break; // converting from size_t; + case MP_QSTR_seed: dest[0] = mp_obj_new_int_from_uint(data->seed); break; // converting from uint32_t; + case MP_QSTR_value_free: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_lru_free_cb_t_mpobj, data->value_free, NULL ,MP_QSTR_lv_lru_t_value_free, NULL); break; // converting from callback lv_lru_free_cb_t; + case MP_QSTR_key_free: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_lru_free_cb_t_mpobj, data->key_free, NULL ,MP_QSTR_lv_lru_t_key_free, NULL); break; // converting from callback lv_lru_free_cb_t; + case MP_QSTR_free_items: dest[0] = mp_read_ptr_lv_lru_item_t((void*)data->free_items); break; // converting from lv_lru_item_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32735,8 +35721,16 @@ static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, // store attribute switch(attr) { - case MP_QSTR_coords: data->coords = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_map: data->map = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; + case MP_QSTR_items: data->items = (void*)mp_to_ptr(dest[1]); break; // converting to lv_lru_item_t **; + case MP_QSTR_access_count: data->access_count = (uint64_t)mp_obj_get_ull(dest[1]); break; // converting to uint64_t; + case MP_QSTR_free_memory: data->free_memory = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_total_memory: data->total_memory = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_average_item_length: data->average_item_length = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_hash_table_size: data->hash_table_size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; + case MP_QSTR_seed: data->seed = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_value_free: data->value_free = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_lru_t_value_free, NULL, NULL, NULL, NULL); break; // converting to callback lv_lru_free_cb_t; + case MP_QSTR_key_free: data->key_free = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_lru_t_key_free, NULL, NULL, NULL, NULL); break; // converting to callback lv_lru_free_cb_t; + case MP_QSTR_free_items: data->free_items = (void*)mp_write_ptr_lv_lru_item_t(dest[1]); break; // converting to lv_lru_item_t *; default: return; } @@ -32745,68 +35739,67 @@ static void mp_lv_draw_sw_mask_map_param_cfg_t_attr(mp_obj_t self_in, qstr attr, } } -static void mp_lv_draw_sw_mask_map_param_cfg_t_print(const mp_print_t *print, +static void mp_lv_lru_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_map_param_cfg_t"); + mp_printf(print, "struct lv_lru_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict; +static const mp_obj_dict_t mp_lv_lru_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_map_param_cfg_t_type, - MP_QSTR_lv_draw_sw_mask_map_param_cfg_t, + mp_lv_lru_t_type, + MP_QSTR_lv_lru_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_map_param_cfg_t_print, + print, mp_lv_lru_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_map_param_cfg_t_attr, - locals_dict, &mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict, + attr, mp_lv_lru_t_attr, + locals_dict, &mp_lv_lru_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_cfg_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_lru_t_type(void) { - return &mp_lv_draw_sw_mask_map_param_cfg_t_type; + return &mp_lv_lru_t_type; } /* - * Struct lv_draw_sw_mask_map_param_t + * Struct lv_pending_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_pending_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_pending_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_mask_map_param_t_type())); - return (lv_draw_sw_mask_map_param_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_pending_t_type())); + return (lv_pending_t*)self->data; } -#define mp_write_lv_draw_sw_mask_map_param_t(struct_obj) *((lv_draw_sw_mask_map_param_t*)mp_write_ptr_lv_draw_sw_mask_map_param_t(struct_obj)) +#define mp_write_lv_pending_t(struct_obj) *((lv_pending_t*)mp_write_ptr_lv_pending_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_mask_map_param_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_pending_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_mask_map_param_t_type(), field); + return lv_to_mp_struct(get_mp_lv_pending_t_type(), field); } -#define mp_read_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_t))) -#define mp_read_byref_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(&field) +#define mp_read_lv_pending_t(field) mp_read_ptr_lv_pending_t(copy_buffer(&field, sizeof(lv_pending_t))) +#define mp_read_byref_lv_pending_t(field) mp_read_ptr_lv_pending_t(&field) -static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_pending_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)self->data; + GENMPY_UNUSED lv_pending_t *data = (lv_pending_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); break; // converting from lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: dest[0] = mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(data->cfg); break; // converting from lv_draw_sw_mask_map_param_cfg_t; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32815,8 +35808,7 @@ static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_ // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(dest[1]); break; // converting to lv_draw_sw_mask_common_dsc_t; - case MP_QSTR_cfg: data->cfg = mp_write_lv_draw_sw_mask_map_param_cfg_t(dest[1]); break; // converting to lv_draw_sw_mask_map_param_cfg_t; + ; default: return; } @@ -32825,80 +35817,71 @@ static void mp_lv_draw_sw_mask_map_param_t_attr(mp_obj_t self_in, qstr attr, mp_ } } -static void mp_lv_draw_sw_mask_map_param_t_print(const mp_print_t *print, +static void mp_lv_pending_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_mask_map_param_t"); + mp_printf(print, "struct lv_pending_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_mask_map_param_t_locals_dict; +static const mp_obj_dict_t mp_lv_pending_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_mask_map_param_t_type, - MP_QSTR_lv_draw_sw_mask_map_param_t, + mp_lv_pending_t_type, + MP_QSTR_lv_pending_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_mask_map_param_t_print, + print, mp_lv_pending_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_mask_map_param_t_attr, - locals_dict, &mp_lv_draw_sw_mask_map_param_t_locals_dict, + attr, mp_lv_pending_t_attr, + locals_dict, &mp_lv_pending_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_mask_map_param_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_pending_t_type(void) { - return &mp_lv_draw_sw_mask_map_param_t_type; + return &mp_lv_pending_t_type; } -#define funcptr_lv_draw_sw_blend_handler_t NULL - /* - * Struct lv_draw_sw_blend_dsc_t + * Struct lv_rb_node_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_node_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_blend_dsc_t_type())); - return (lv_draw_sw_blend_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_node_t_type())); + return (lv_rb_node_t*)self->data; } -#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) *((lv_draw_sw_blend_dsc_t*)mp_write_ptr_lv_draw_sw_blend_dsc_t(struct_obj)) +#define mp_write_lv_rb_node_t(struct_obj) *((lv_rb_node_t*)mp_write_ptr_lv_rb_node_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_node_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_blend_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_rb_node_t_type(), field); } -#define mp_read_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) -#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) +#define mp_read_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(copy_buffer(&field, sizeof(lv_rb_node_t))) +#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) -static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_rb_node_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)self->data; + GENMPY_UNUSED lv_rb_node_t *data = (lv_rb_node_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_blend_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->blend_area); break; // converting from lv_area_t *; - case MP_QSTR_src_buf: dest[0] = ptr_to_mp((void*)data->src_buf); break; // converting from void *; - case MP_QSTR_src_stride: dest[0] = mp_obj_new_int_from_uint(data->src_stride); break; // converting from uint32_t; - case MP_QSTR_src_color_format: dest[0] = mp_obj_new_int(data->src_color_format); break; // converting from lv_color_format_t; - case MP_QSTR_src_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->src_area); break; // converting from lv_area_t *; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_mask_buf: dest[0] = mp_array_from_u8ptr((void*)data->mask_buf); break; // converting from lv_opa_t *; - case MP_QSTR_mask_res: dest[0] = mp_obj_new_int(data->mask_res); break; // converting from lv_draw_sw_mask_res_t; - case MP_QSTR_mask_area: dest[0] = mp_read_ptr_lv_area_t((void*)data->mask_area); break; // converting from lv_area_t *; - case MP_QSTR_mask_stride: dest[0] = mp_obj_new_int(data->mask_stride); break; // converting from int32_t; - case MP_QSTR_blend_mode: dest[0] = mp_obj_new_int(data->blend_mode); break; // converting from lv_blend_mode_t; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_rb_node_t *; + case MP_QSTR_left: dest[0] = ptr_to_mp((void*)data->left); break; // converting from lv_rb_node_t *; + case MP_QSTR_right: dest[0] = ptr_to_mp((void*)data->right); break; // converting from lv_rb_node_t *; + case MP_QSTR_color: dest[0] = mp_obj_new_int(data->color); break; // converting from lv_rb_color_t; + case MP_QSTR_data: dest[0] = ptr_to_mp((void*)data->data); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -32907,18 +35890,11 @@ static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_blend_area: data->blend_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_src_buf: data->src_buf = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_src_stride: data->src_stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_src_color_format: data->src_color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_src_area: data->src_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_mask_buf: data->mask_buf = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_opa_t *; - case MP_QSTR_mask_res: data->mask_res = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_sw_mask_res_t; - case MP_QSTR_mask_area: data->mask_area = (void*)mp_write_ptr_lv_area_t(dest[1]); break; // converting to lv_area_t *; - case MP_QSTR_mask_stride: data->mask_stride = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_blend_mode: data->blend_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_blend_mode_t; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_left: data->left = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_right: data->right = (void*)mp_to_ptr(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_color: data->color = (int)mp_obj_get_int(dest[1]); break; // converting to lv_rb_color_t; + case MP_QSTR_data: data->data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -32927,95 +35903,98 @@ static void mp_lv_draw_sw_blend_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_draw_sw_blend_dsc_t_print(const mp_print_t *print, +static void mp_lv_rb_node_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_blend_dsc_t"); + mp_printf(print, "struct lv_rb_node_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_blend_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_rb_node_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_blend_dsc_t_type, - MP_QSTR_lv_draw_sw_blend_dsc_t, + mp_lv_rb_node_t_type, + MP_QSTR_lv_rb_node_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_blend_dsc_t_print, + print, mp_lv_rb_node_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_blend_dsc_t_attr, - locals_dict, &mp_lv_draw_sw_blend_dsc_t_locals_dict, + attr, mp_lv_rb_node_t_attr, + locals_dict, &mp_lv_rb_node_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_blend_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_rb_node_t_type(void) { - return &mp_lv_draw_sw_blend_dsc_t_type; + return &mp_lv_rb_node_t_type; } +#define funcptr_lv_rb_compare_t NULL + /* * lvgl extension definition for: - * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) */ -static mp_obj_t mp_funcptr_lv_draw_sw_blend_handler_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_rb_compare_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const void *a = (const void *)mp_to_ptr(mp_args[0]); + const void *b = (const void *)mp_to_ptr(mp_args[1]); + lv_rb_compare_res_t _res = ((lv_rb_compare_res_t (*)(const void *, const void *))lv_func_ptr)(a, b); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, funcptr_lv_draw_sw_blend_handler_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_rb_compare_t_mpobj, 2, mp_funcptr_lv_rb_compare_t, funcptr_lv_rb_compare_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_sw_blend_handler_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_sw_custom_blend_handler_t_handler_callback' - * lv_draw_sw_blend_handler_t handler + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_rb_t_compare_callback' + * lv_rb_compare_t compare */ /* - * Struct lv_draw_sw_custom_blend_handler_t + * Struct lv_rb_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_rb_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_sw_custom_blend_handler_t_type())); - return (lv_draw_sw_custom_blend_handler_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_rb_t_type())); + return (lv_rb_t*)self->data; } -#define mp_write_lv_draw_sw_custom_blend_handler_t(struct_obj) *((lv_draw_sw_custom_blend_handler_t*)mp_write_ptr_lv_draw_sw_custom_blend_handler_t(struct_obj)) +#define mp_write_lv_rb_t(struct_obj) *((lv_rb_t*)mp_write_ptr_lv_rb_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_sw_custom_blend_handler_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_rb_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_sw_custom_blend_handler_t_type(), field); + return lv_to_mp_struct(get_mp_lv_rb_t_type(), field); } -#define mp_read_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(copy_buffer(&field, sizeof(lv_draw_sw_custom_blend_handler_t))) -#define mp_read_byref_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(&field) +#define mp_read_lv_rb_t(field) mp_read_ptr_lv_rb_t(copy_buffer(&field, sizeof(lv_rb_t))) +#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) -static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_rb_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)self->data; + GENMPY_UNUSED lv_rb_t *data = (lv_rb_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dest_cf: dest[0] = mp_obj_new_int(data->dest_cf); break; // converting from lv_color_format_t; - case MP_QSTR_handler: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_sw_blend_handler_t_mpobj, data->handler, NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL); break; // converting from callback lv_draw_sw_blend_handler_t; + case MP_QSTR_root: dest[0] = mp_read_ptr_lv_rb_node_t((void*)data->root); break; // converting from lv_rb_node_t *; + case MP_QSTR_compare: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_rb_compare_t_mpobj, data->compare, NULL ,MP_QSTR_lv_rb_t_compare, NULL); break; // converting from callback lv_rb_compare_t; + case MP_QSTR_size: dest[0] = mp_obj_new_int_from_uint(data->size); break; // converting from size_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -33024,8 +36003,9 @@ static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr att // store attribute switch(attr) { - case MP_QSTR_dest_cf: data->dest_cf = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_handler: data->handler = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_sw_custom_blend_handler_t_handler, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_sw_blend_handler_t; + case MP_QSTR_root: data->root = (void*)mp_write_ptr_lv_rb_node_t(dest[1]); break; // converting to lv_rb_node_t *; + case MP_QSTR_compare: data->compare = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_rb_t_compare, NULL, NULL, NULL, NULL); break; // converting to callback lv_rb_compare_t; + case MP_QSTR_size: data->size = (size_t)mp_obj_get_int(dest[1]); break; // converting to size_t; default: return; } @@ -33034,32 +36014,32 @@ static void mp_lv_draw_sw_custom_blend_handler_t_attr(mp_obj_t self_in, qstr att } } -static void mp_lv_draw_sw_custom_blend_handler_t_print(const mp_print_t *print, +static void mp_lv_rb_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_sw_custom_blend_handler_t"); + mp_printf(print, "struct lv_rb_t"); } -static const mp_obj_dict_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict; +static const mp_obj_dict_t mp_lv_rb_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_sw_custom_blend_handler_t_type, - MP_QSTR_lv_draw_sw_custom_blend_handler_t, + mp_lv_rb_t_type, + MP_QSTR_lv_rb_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_sw_custom_blend_handler_t_print, + print, mp_lv_rb_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_sw_custom_blend_handler_t_attr, - locals_dict, &mp_lv_draw_sw_custom_blend_handler_t_locals_dict, + attr, mp_lv_rb_t_attr, + locals_dict, &mp_lv_rb_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_sw_custom_blend_handler_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void) { - return &mp_lv_draw_sw_custom_blend_handler_t_type; + return &mp_lv_rb_t_type; } @@ -33147,37 +36127,6 @@ static inline const mp_obj_type_t *get_mp_lv_text_attributes_t_type(void) } -/* - * Array convertors for lv_area_t [] - */ - -GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_area_t *lv_arr = (lv_area_t*)m_malloc(len * sizeof(lv_area_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_area_t(item); - } - return (lv_area_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_area_t_____(lv_area_t *arr) -{ - return mp_read_ptr_lv_area_t((void*)arr); -} - - static const mp_rom_map_elem_t mp_C_Pointer_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(C_Pointer))) }, @@ -33819,94 +36768,148 @@ static const mp_rom_map_elem_t mp_lv_image_colorkey_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_image_colorkey_t_locals_dict, mp_lv_image_colorkey_t_locals_dict_table); -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); +/* + * lvgl extension definition for: + * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) + */ + +static mp_obj_t mp_lv_font_get_line_height_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_internal_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height_internal); /* * lvgl extension definition for: - * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) + * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) */ -static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_has_static_bitmap_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); - uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); - return mp_obj_new_int_from_uint(_res); + bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_internal_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap_internal); /* * lvgl extension definition for: - * int32_t lv_font_get_line_height(const lv_font_t *font) + * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static mp_obj_t mp_lv_font_get_line_height(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_bottom_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_func_ptr)(font, trim); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height, lv_font_get_line_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim_internal); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim_internal); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); /* * lvgl extension definition for: - * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) + * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); - lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); - return mp_const_none; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); + uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); + +/* Reusing lv_font_get_line_height_internal for lv_font_get_line_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height); /* * lvgl extension definition for: - * bool lv_font_has_static_bitmap(const lv_font_t *font) + * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) */ -static mp_obj_t mp_lv_font_has_static_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); - return convert_to_bool(_res); + lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); + lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap, lv_font_has_static_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); + +/* Reusing lv_font_has_static_bitmap_internal for lv_font_has_static_bitmap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_bottom_trim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim); /* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_fmt_txt */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_fmt_txt_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_fmt_txt); +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_internal_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_internal); + +/* Reusing lv_font_get_glyph_width for lv_font_get_glyph_width_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_internal_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width_internal); + static const mp_rom_map_elem_t mp_lv_font_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_line_height_internal), MP_ROM_PTR(&mp_lv_font_get_line_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim_internal), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim_internal), MP_ROM_PTR(&mp_lv_font_get_top_trim_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_glyph_width), MP_ROM_PTR(&mp_lv_font_get_glyph_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_line_height), MP_ROM_PTR(&mp_lv_font_get_line_height_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_kerning), MP_ROM_PTR(&mp_lv_font_set_kerning_mpobj) }, { MP_ROM_QSTR(MP_QSTR_has_static_bitmap), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim), MP_ROM_PTR(&mp_lv_font_get_top_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_width_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_width_internal_mpobj) }, }; @@ -33955,2231 +36958,2116 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_mpobj, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bitmap_fmt_txt_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_bitmap_fmt_txt); -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); - - /* * lvgl extension definition for: - * int32_t lv_cache_entry_get_ref(lv_cache_entry_t *entry) + * int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t *lhs, const lv_font_glyph_dsc_t *rhs) */ -static mp_obj_t mp_lv_cache_entry_get_ref(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_glyph_dsc_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + const lv_font_glyph_dsc_t *lhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + const lv_font_glyph_dsc_t *rhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_glyph_dsc_t *, const lv_font_glyph_dsc_t *))lv_func_ptr)(lhs, rhs); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_ref_mpobj, 1, mp_lv_cache_entry_get_ref, lv_cache_entry_get_ref); - - -/* - * lvgl extension definition for: - * uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_get_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_node_size_mpobj, 1, mp_lv_cache_entry_get_node_size, lv_cache_entry_get_node_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_dsc_compare_mpobj, 2, mp_lv_font_glyph_dsc_compare, lv_font_glyph_dsc_compare); +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap_internal */ -/* - * lvgl extension definition for: - * bool lv_cache_entry_is_invalid(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_is_invalid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - bool _res = ((bool (*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_is_invalid_mpobj, 1, mp_lv_cache_entry_is_invalid, lv_cache_entry_is_invalid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_internal_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap_internal); +/* Reusing lv_font_get_glyph_static_bitmap for lv_font_get_glyph_static_bitmap_internal */ -/* - * lvgl extension definition for: - * void *lv_cache_entry_get_data(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_get_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - void * _res = ((void *(*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_get_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_internal_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap_internal); +/* Reusing lv_font_glyph_release_draw_data for lv_font_glyph_release_draw_data_internal */ -/* - * lvgl extension definition for: - * const lv_cache_t *lv_cache_entry_get_cache(const lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_get_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_cache_entry_t *entry = (const lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(mp_args[0]); - const lv_cache_t * _res = ((const lv_cache_t *(*)(const lv_cache_entry_t *))lv_func_ptr)(entry); - return mp_read_ptr_lv_cache_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_cache_mpobj, 1, mp_lv_cache_entry_get_cache, lv_cache_entry_get_cache); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_internal_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data_internal); -/* - * lvgl extension definition for: - * void lv_cache_entry_init(lv_cache_entry_t *entry, const lv_cache_t *cache, const uint32_t node_size) - */ - -static mp_obj_t mp_lv_cache_entry_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_cache_entry_t *, const lv_cache_t *, const uint32_t))lv_func_ptr)(entry, cache, node_size); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_init_mpobj, 3, mp_lv_cache_entry_init, lv_cache_entry_init); +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_compare), MP_ROM_PTR(&mp_lv_font_glyph_dsc_compare_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data_internal), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_internal_mpobj) }, +}; -/* - * lvgl extension definition for: - * void lv_cache_entry_delete(lv_cache_entry_t *entry) - */ - -static mp_obj_t mp_lv_cache_entry_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - ((void (*)(lv_cache_entry_t *))lv_func_ptr)(entry); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_delete_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_delete); - -/* Reusing lv_cache_entry_delete for lv_cache_entry_reset_ref */ +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_reset_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_reset_ref); +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, -/* Reusing lv_cache_entry_delete for lv_cache_entry_inc_ref */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_inc_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_inc_ref); - -/* Reusing lv_cache_entry_delete for lv_cache_entry_dec_ref */ +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); + +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_dec_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_dec_ref); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ -/* - * lvgl extension definition for: - * void lv_cache_entry_set_node_size(lv_cache_entry_t *entry, uint32_t node_size) - */ - -static mp_obj_t mp_lv_cache_entry_set_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint32_t node_size = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_cache_entry_t *, uint32_t))lv_func_ptr)(entry, node_size); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_node_size_mpobj, 2, mp_lv_cache_entry_set_node_size, lv_cache_entry_set_node_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); /* * lvgl extension definition for: - * void lv_cache_entry_set_cache(lv_cache_entry_t *entry, const lv_cache_t *cache) + * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) */ -static mp_obj_t mp_lv_cache_entry_set_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); - ((void (*)(lv_cache_entry_t *, const lv_cache_t *))lv_func_ptr)(entry, cache); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_cache_mpobj, 2, mp_lv_cache_entry_set_cache, lv_cache_entry_set_cache); - -/* Reusing lv_cache_entry_get_data for lv_cache_entry_acquire_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_acquire_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_acquire_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); /* * lvgl extension definition for: - * void lv_cache_entry_release_data(lv_cache_entry_t *entry, void *user_data) + * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_cache_entry_release_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - ((void (*)(lv_cache_entry_t *, void *))lv_func_ptr)(entry, user_data); - return mp_const_none; + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_release_data_mpobj, 2, mp_lv_cache_entry_release_data, lv_cache_entry_release_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); /* * lvgl extension definition for: - * void lv_cache_entry_set_flag(lv_cache_entry_t *entry, uint8_t flags) + * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) */ -static mp_obj_t mp_lv_cache_entry_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); - return mp_const_none; + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + void *data = mp_to_ptr(mp_args[5]); + uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_set_flag); - -/* Reusing lv_cache_entry_set_flag for lv_cache_entry_remove_flag */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_remove_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_remove_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); /* * lvgl extension definition for: - * bool lv_cache_entry_has_flag(lv_cache_entry_t *entry, uint8_t flags) + * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) */ -static mp_obj_t mp_lv_cache_entry_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); - uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_has_flag_mpobj, 2, mp_lv_cache_entry_has_flag, lv_cache_entry_has_flag); - - -static const mp_rom_map_elem_t mp_lv_cache_entry_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_entry_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_ref), MP_ROM_PTR(&mp_lv_cache_entry_get_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_node_size), MP_ROM_PTR(&mp_lv_cache_entry_get_node_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_invalid), MP_ROM_PTR(&mp_lv_cache_entry_is_invalid_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_data), MP_ROM_PTR(&mp_lv_cache_entry_get_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cache), MP_ROM_PTR(&mp_lv_cache_entry_get_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_cache_entry_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_cache_entry_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset_ref), MP_ROM_PTR(&mp_lv_cache_entry_reset_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_inc_ref), MP_ROM_PTR(&mp_lv_cache_entry_inc_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dec_ref), MP_ROM_PTR(&mp_lv_cache_entry_dec_ref_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_node_size), MP_ROM_PTR(&mp_lv_cache_entry_set_node_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cache), MP_ROM_PTR(&mp_lv_cache_entry_set_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_acquire_data), MP_ROM_PTR(&mp_lv_cache_entry_acquire_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_data), MP_ROM_PTR(&mp_lv_cache_entry_release_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_cache_entry_set_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_flag), MP_ROM_PTR(&mp_lv_cache_entry_remove_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_cache_entry_has_flag_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_cache_entry_t_locals_dict, mp_lv_cache_entry_t_locals_dict_table); - -/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_destroy */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_destroy_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_destroy); - -/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire); - -/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire_or_create */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_or_create_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire_or_create); - -/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_add */ + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_add_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_add); - -/* Reusing funcptr_lv_cache_remove_cb_t for lv_cache_release */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_release_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, lv_cache_release); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); /* * lvgl extension definition for: - * void lv_cache_reserve(lv_cache_t *cache, uint32_t reserved_size, void *user_data) + * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_cache_reserve(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - uint32_t reserved_size = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, uint32_t, void *))lv_func_ptr)(cache, reserved_size, user_data); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + ((void (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_reserve_mpobj, 3, mp_lv_cache_reserve, lv_cache_reserve); - -/* Reusing funcptr_lv_cache_drop_cb_t for lv_cache_drop */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, lv_cache_drop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); -/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_drop_all */ +/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_all_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_drop_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); /* * lvgl extension definition for: - * bool lv_cache_evict_one(lv_cache_t *cache, void *user_data) + * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_cache_evict_one(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - bool _res = ((bool (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); - return convert_to_bool(_res); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_evict_one_mpobj, 2, mp_lv_cache_evict_one, lv_cache_evict_one); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); /* * lvgl extension definition for: - * void lv_cache_set_max_size(lv_cache_t *cache, size_t max_size, void *user_data) + * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_cache_set_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_is_position_valid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - size_t max_size = (size_t)mp_obj_get_int(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, size_t, void *))lv_func_ptr)(cache, max_size, user_data); - return mp_const_none; + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_max_size_mpobj, 3, mp_lv_cache_set_max_size, lv_cache_set_max_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_is_position_valid_mpobj, 3, mp_lv_draw_buf_is_position_valid, lv_draw_buf_is_position_valid); /* * lvgl extension definition for: - * size_t lv_cache_get_max_size(lv_cache_t *cache, void *user_data) + * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) */ -static mp_obj_t mp_lv_cache_get_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - size_t _res = ((size_t (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); - return mp_obj_new_int_from_uint(_res); + lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_max_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_max_size); - -/* Reusing lv_cache_get_max_size for lv_cache_get_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_size); - -/* Reusing lv_cache_get_max_size for lv_cache_get_free_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_free_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_free_size); - -/* Reusing funcptr_lv_cache_init_cb_t for lv_cache_is_enabled */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_is_enabled_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, lv_cache_is_enabled); - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) - * lv_cache_compare_cb_t compare_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); /* * lvgl extension definition for: - * void lv_cache_set_compare_cb(lv_cache_t *cache, lv_cache_compare_cb_t compare_cb, void *user_data) + * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_cache_set_compare_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - lv_cache_compare_cb_t compare_cb = mp_to_ptr(mp_args[1]); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_compare_cb_t, void *))lv_func_ptr)(cache, compare_cb, user_data); - return mp_const_none; + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_compare_cb_mpobj, 3, mp_lv_cache_set_compare_cb, lv_cache_set_compare_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); /* - * Callback function lv_cache_set_create_cb_alloc_cb - * bool lv_cache_create_cb_t(void *node, void *user_data) + * lvgl extension definition for: + * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -GENMPY_UNUSED static bool lv_cache_set_create_cb_alloc_cb_callback(void *arg0, void *arg1) +static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_create_cb_alloc_cb)), 2, mp_args); - return mp_obj_is_true(callback_result); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + return convert_to_bool(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); + /* * lvgl extension definition for: - * void lv_cache_set_create_cb(lv_cache_t *cache, lv_cache_create_cb_t alloc_cb, void *user_data) + * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static mp_obj_t mp_lv_cache_set_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *alloc_cb = mp_lv_callback(mp_args[1], &lv_cache_set_create_cb_alloc_cb_callback, MP_QSTR_lv_cache_set_create_cb_alloc_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_create_cb_t, void *))lv_func_ptr)(cache, alloc_cb, user_data); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_create_cb_mpobj, 3, mp_lv_cache_set_create_cb, lv_cache_set_create_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); + +/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); /* - * Callback function lv_cache_set_free_cb_free_cb - * void lv_cache_free_cb_t(void *node, void *user_data) + * lvgl extension definition for: + * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) */ -GENMPY_UNUSED static void lv_cache_set_free_cb_free_cb_callback(void *arg0, void *arg1) +static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_free_cb_free_cb)), 2, mp_args); - return; + lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); + /* * lvgl extension definition for: - * void lv_cache_set_free_cb(lv_cache_t *cache, lv_cache_free_cb_t free_cb, void *user_data) + * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) */ -static mp_obj_t mp_lv_cache_set_free_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *free_cb = mp_lv_callback(mp_args[1], &lv_cache_set_free_cb_free_cb_callback, MP_QSTR_lv_cache_set_free_cb_free_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - ((void (*)(lv_cache_t *, lv_cache_free_cb_t, void *))lv_func_ptr)(cache, free_cb, user_data); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_free_cb_mpobj, 3, mp_lv_cache_set_free_cb, lv_cache_set_free_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); /* * lvgl extension definition for: - * void lv_cache_set_name(lv_cache_t *cache, const char *name) + * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) */ -static mp_obj_t mp_lv_cache_set_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - const char *name = (const char *)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_cache_t *, const char *))lv_func_ptr)(cache, name); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_name_mpobj, 2, mp_lv_cache_set_name, lv_cache_set_name); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); + +/* Reusing funcptr_lv_draw_buf_clear_cb_t for lv_draw_buf_clear_ex */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_ex_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, lv_draw_buf_clear_ex); + +/* Reusing lv_draw_buf_premultiply for lv_draw_buf_convert_premultiply */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_convert_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_convert_premultiply); /* * lvgl extension definition for: - * const char *lv_cache_get_name(lv_cache_t *cache) + * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) */ -static mp_obj_t mp_lv_cache_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); - const char * _res = ((const char *(*)(lv_cache_t *))lv_func_ptr)(cache); - return convert_to_str((void*)_res); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const char *path = (const char *)(char*)convert_from_str(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_name_mpobj, 1, mp_lv_cache_get_name, lv_cache_get_name); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); -/* Reusing funcptr_lv_cache_iter_create_cb for lv_cache_iter_create */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_iter_create_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, lv_cache_iter_create); +static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_position_valid), MP_ROM_PTR(&mp_lv_draw_buf_is_position_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_ex), MP_ROM_PTR(&mp_lv_draw_buf_clear_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_convert_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_convert_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, +}; -static const mp_rom_map_elem_t mp_lv_cache_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_t))) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_cache_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_acquire), MP_ROM_PTR(&mp_lv_cache_acquire_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_acquire_or_create), MP_ROM_PTR(&mp_lv_cache_acquire_or_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_cache_add_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release), MP_ROM_PTR(&mp_lv_cache_release_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reserve), MP_ROM_PTR(&mp_lv_cache_reserve_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_cache_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop_all), MP_ROM_PTR(&mp_lv_cache_drop_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_evict_one), MP_ROM_PTR(&mp_lv_cache_evict_one_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_size), MP_ROM_PTR(&mp_lv_cache_set_max_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_max_size), MP_ROM_PTR(&mp_lv_cache_get_max_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_cache_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_free_size), MP_ROM_PTR(&mp_lv_cache_get_free_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_enabled), MP_ROM_PTR(&mp_lv_cache_is_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_compare_cb), MP_ROM_PTR(&mp_lv_cache_set_compare_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_create_cb), MP_ROM_PTR(&mp_lv_cache_set_create_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_free_cb), MP_ROM_PTR(&mp_lv_cache_set_free_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_name), MP_ROM_PTR(&mp_lv_cache_set_name_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_name), MP_ROM_PTR(&mp_lv_cache_get_name_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_cache_iter_create_mpobj) }, +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_cache_t_locals_dict, mp_lv_cache_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); /* * lvgl extension definition for: - * lv_cache_t *lv_cache_create(const lv_cache_class_t *cache_class, size_t node_size, size_t max_size, lv_cache_ops_t ops) + * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) */ -static mp_obj_t mp_lv_cache_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_cache_class_t *cache_class = (const lv_cache_class_t *)mp_write_ptr_lv_cache_class_t(mp_args[0]); - size_t node_size = (size_t)mp_obj_get_int(mp_args[1]); - size_t max_size = (size_t)mp_obj_get_int(mp_args[2]); - lv_cache_ops_t ops = mp_write_lv_cache_ops_t(mp_args[3]); - lv_cache_t * _res = ((lv_cache_t *(*)(const lv_cache_class_t *, size_t, size_t, lv_cache_ops_t))lv_func_ptr)(cache_class, node_size, max_size, ops); - return mp_read_ptr_lv_cache_t((void*)_res); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_create_mpobj, 4, mp_lv_cache_create, lv_cache_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); -static const mp_rom_map_elem_t mp_lv_cache_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_class_t))) }, - { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_cache_create_mpobj) }, +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_malloc_cb_t buf_malloc_cb + */ -}; -static MP_DEFINE_CONST_DICT(mp_lv_cache_class_t_locals_dict, mp_lv_cache_class_t_locals_dict_table); - +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_free_cb_t buf_free_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_copy_cb_t buf_copy_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_align_cb_t align_pointer_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ + /* * lvgl extension definition for: - * void *lv_iter_get_context(const lv_iter_t *iter) + * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) */ -static mp_obj_t mp_lv_iter_get_context(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_iter_t *iter = (const lv_iter_t *)mp_write_ptr_lv_iter_t(mp_args[0]); - void * _res = ((void *(*)(const lv_iter_t *))lv_func_ptr)(iter); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); + lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); + lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); + lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); + lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); + lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); + lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); + ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); + + +/* + * lvgl extension definition for: + * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + */ + +static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + void *buf = mp_to_ptr(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_get_context_mpobj, 1, mp_lv_iter_get_context, lv_iter_get_context); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); /* * lvgl extension definition for: - * void lv_iter_destroy(lv_iter_t *iter) + * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_iter_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - ((void (*)(lv_iter_t *))lv_func_ptr)(iter); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_destroy_mpobj, 1, mp_lv_iter_destroy, lv_iter_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); /* * lvgl extension definition for: - * lv_result_t lv_iter_next(lv_iter_t *iter, void *elem) + * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static mp_obj_t mp_lv_iter_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - void *elem = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_func_ptr)(iter, elem); - return mp_obj_new_int(_res); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_next_mpobj, 2, mp_lv_iter_next, lv_iter_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); /* * lvgl extension definition for: - * void lv_iter_make_peekable(lv_iter_t *iter, uint32_t capacity) + * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_iter_make_peekable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_iter_t *, uint32_t))lv_func_ptr)(iter, capacity); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_make_peekable_mpobj, 2, mp_lv_iter_make_peekable, lv_iter_make_peekable); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); -/* Reusing lv_iter_next for lv_iter_peek */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_mpobj, 2, mp_lv_iter_next, lv_iter_peek); +static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, + { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_result_t lv_iter_peek_advance(lv_iter_t *iter) + * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) */ -static mp_obj_t mp_lv_iter_peek_advance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_iter_t *))lv_func_ptr)(iter); - return mp_obj_new_int(_res); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_advance_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_advance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); -/* Reusing lv_iter_peek_advance for lv_iter_peek_reset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_reset_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_reset); +/* + * lvgl extension definition for: + * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + */ + +static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); /* - * Function NOT generated: - * Callback function 'lv_iter_inspect_cb inspect_cb' must receive a struct pointer with user_data member as its first argument! - * lv_iter_inspect_cb inspect_cb + * lvgl extension definition for: + * int32_t lv_area_get_width(const lv_area_t *area_p) */ - -#define funcptr_lv_iter_inspect_cb NULL -/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_iter_inspect_cb */ +static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_inspect_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_iter_inspect_cb); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_inspect_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_inspect_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_area_get_width for lv_area_get_height */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); + /* * lvgl extension definition for: - * void lv_iter_inspect(lv_iter_t *iter, lv_iter_inspect_cb inspect_cb) + * void lv_area_set_width(lv_area_t *area_p, int32_t w) */ -static mp_obj_t mp_lv_iter_inspect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); - lv_iter_inspect_cb inspect_cb = mp_to_ptr(mp_args[1]); - ((void (*)(lv_iter_t *, lv_iter_inspect_cb))lv_func_ptr)(iter, inspect_cb); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_inspect_mpobj, 2, mp_lv_iter_inspect, lv_iter_inspect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); +/* Reusing lv_area_set_width for lv_area_set_height */ -static const mp_rom_map_elem_t mp_lv_iter_t_locals_dict_table[] = { - - { MP_ROM_QSTR(MP_QSTR_get_context), MP_ROM_PTR(&mp_lv_iter_get_context_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_iter_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_next), MP_ROM_PTR(&mp_lv_iter_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_make_peekable), MP_ROM_PTR(&mp_lv_iter_make_peekable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_iter_peek_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek_advance), MP_ROM_PTR(&mp_lv_iter_peek_advance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek_reset), MP_ROM_PTR(&mp_lv_iter_peek_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_inspect), MP_ROM_PTR(&mp_lv_iter_inspect_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); -}; -static MP_DEFINE_CONST_DICT(mp_lv_iter_t_locals_dict, mp_lv_iter_t_locals_dict_table); - +/* + * lvgl extension definition for: + * uint32_t lv_area_get_size(const lv_area_t *area_p) + */ + +static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int_from_uint(_res); +} + + -static const mp_rom_map_elem_t mp_lv_cache_ops_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_ops_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_cache_ops_t_locals_dict, mp_lv_cache_ops_t_locals_dict_table); - /* * lvgl extension definition for: - * inline static bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) */ -static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); - return convert_to_bool(_res); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); + +/* Reusing lv_area_increase for lv_area_move */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); /* * lvgl extension definition for: - * inline static void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) */ -static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); + lv_align_t align = (int)mp_obj_get_int(mp_args[2]); + int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); -/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ +/* Reusing lv_area_increase for lv_area_set_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); - -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ +/* + * lvgl extension definition for: + * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); +static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); /* * lvgl extension definition for: - * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) + * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); - return mp_const_none; + lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) + * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) + * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) */ -static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - void *data = mp_to_ptr(mp_args[5]); - uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); - return mp_obj_new_int(_res); + const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) + * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); /* * lvgl extension definition for: - * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) + * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) */ -static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - ((void (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_const_none; + const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); -/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ +/* Reusing lv_area_is_in for lv_area_is_out */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); + +/* Reusing lv_area_is_on for lv_area_is_equal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); + + +static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); + /* * lvgl extension definition for: - * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * void lv_layer_init(lv_layer_t *layer) */ -static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); - return ptr_to_mp((void*)_res); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + ((void (*)(lv_layer_t *))lv_func_ptr)(layer); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); + +/* Reusing lv_layer_init for lv_layer_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); + + +static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) + * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) */ -static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); - return mp_obj_new_int(_res); + lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) + * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) + * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); - return mp_obj_new_int(_res); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); /* * lvgl extension definition for: - * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) + * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) */ -static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); /* * lvgl extension definition for: - * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) + * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); - ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) + * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const char *path = (const char *)(char*)convert_from_str(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); - - -static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, - { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) + * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); /* - * Function NOT generated: - * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_free_cb_t buf_free_cb + * lvgl extension definition for: + * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) */ - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - +static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); +} -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_align_cb_t align_pointer_cb - */ - + -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); /* * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t flush_cache_cb + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb */ +#define funcptr_lv_draw_glyph_cb_t NULL -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ - /* * lvgl extension definition for: - * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) + * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) */ -static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); - lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); - lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); - lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); - lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); - lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); - lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); - ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); + const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - void *buf = mp_to_ptr(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); - return ptr_to_mp((void*)_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); + + +/* + * Function NOT generated: + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb + */ /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) + * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); - return mp_obj_new_int_from_uint(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) + * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); -static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, - { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, +/* + * Function NOT generated: + * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! + * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + */ -}; +#define funcptr_draw_line_cb NULL -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); - /* * lvgl extension definition for: - * inline static void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) */ -static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) */ -static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); /* * lvgl extension definition for: - * int32_t lv_area_get_width(const lv_area_t *area_p) + * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); - -/* Reusing lv_area_get_width for lv_area_get_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); /* * lvgl extension definition for: - * void lv_area_set_width(lv_area_t *area_p, int32_t w) + * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); - -/* Reusing lv_area_set_width for lv_area_set_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); /* * lvgl extension definition for: - * uint32_t lv_area_get_size(const lv_area_t *area_p) + * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int_from_uint(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); /* * lvgl extension definition for: - * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) + * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); - -/* Reusing lv_area_increase for lv_area_move */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); /* * lvgl extension definition for: - * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) + * void lv_draw_cleanup_task(lv_draw_task_t *t) */ -static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_cleanup_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); - lv_align_t align = (int)mp_obj_get_int(mp_args[2]); - int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + ((void (*)(lv_draw_task_t *))lv_func_ptr)(t); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_cleanup_task_mpobj, 1, mp_lv_draw_cleanup_task, lv_draw_cleanup_task); -/* Reusing lv_area_increase for lv_area_set_pos */ +/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); /* * lvgl extension definition for: - * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); /* * lvgl extension definition for: - * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); - return mp_obj_new_int(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); /* * lvgl extension definition for: - * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); /* * lvgl extension definition for: - * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) + * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); /* * lvgl extension definition for: - * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); /* * lvgl extension definition for: - * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) + * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); - -/* Reusing lv_area_is_in for lv_area_is_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); - -/* Reusing lv_area_is_on for lv_area_is_equal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); - - -static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); - - -/* - * Callback function lv_color_filter_dsc_t_cb - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) - */ - -GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) -{ - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - mp_args[1] = mp_read_lv_color_t(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); - return mp_write_lv_color_t(callback_result); -} - /* * lvgl extension definition for: - * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) + * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); - void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); +/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ -static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ +/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); /* * lvgl extension definition for: - * void lv_anim_set_var(lv_anim_t *a, void *var) + * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) */ -static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *var = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); - - -/* - * Function NOT generated: - * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! - * lv_anim_exec_xcb_t exec_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); /* * lvgl extension definition for: - * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) + * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); /* * lvgl extension definition for: - * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) + * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) */ -static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); - -/* Reusing lv_anim_set_duration for lv_anim_set_delay */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); +/* + * Function NOT generated: + * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_image_core_cb draw_core_cb + */ -/* Reusing lv_anim_set_duration for lv_anim_pause_for */ +#define funcptr_lv_draw_image_core_cb NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); - /* * lvgl extension definition for: - * bool lv_anim_is_paused(lv_anim_t *a) + * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) */ -static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); + lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); + const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); + const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) + * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); + +/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); +/* Reusing lv_draw_unit_draw_letter for lv_draw_unit_draw_letter_internal */ -/* - * Callback function lv_anim_t_exec_cb - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_internal_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter_internal); + -GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_args[1] = mp_obj_new_int(arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); - return; -} +static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cleanup_task), MP_ROM_PTR(&mp_lv_draw_cleanup_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter_internal), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_internal_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); + +static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void *lv_event_get_target(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); +/* Reusing lv_event_get_target for lv_event_get_current_target */ -/* - * Callback function lv_anim_t_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ - -GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); -} - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); + /* * lvgl extension definition for: - * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) + * lv_event_code_t lv_event_get_code(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); +/* Reusing lv_event_get_target for lv_event_get_param */ -/* - * Callback function lv_anim_t_start_cb - * void lv_anim_start_cb_t(lv_anim_t *) - */ - -GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); - return; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); + +/* Reusing lv_event_get_target for lv_event_get_user_data */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); + +/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ -/* - * lvgl extension definition for: - * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); + +/* Reusing funcptr_event_cb for lv_event_stop_trickling */ -static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); + +/* Reusing funcptr_event_cb for lv_event_stop_processing */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); + +/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); /* - * Callback function lv_anim_t_get_value_cb - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + * lvgl extension definition for: + * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) */ -GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); +static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); + /* * lvgl extension definition for: - * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) + * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); + +/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); /* - * Callback function lv_anim_t_completed_cb - * void lv_anim_completed_cb_t(lv_anim_t *) + * lvgl extension definition for: + * lv_indev_t *lv_event_get_indev(lv_event_t *e) */ -GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) +static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_indev_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); + /* * lvgl extension definition for: - * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) + * lv_layer_t *lv_event_get_layer(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_layer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); /* - * Callback function lv_anim_t_deleted_cb - * void lv_anim_deleted_cb_t(lv_anim_t *) + * lvgl extension definition for: + * const lv_area_t *lv_event_get_old_size(lv_event_t *e) */ -GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); + /* * lvgl extension definition for: - * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) + * uint32_t lv_event_get_key(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); - -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); - -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ +/* + * lvgl extension definition for: + * int32_t lv_event_get_rotary_diff(lv_event_t *e) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); - -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ +static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); - -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); /* * lvgl extension definition for: - * void lv_anim_set_early_apply(lv_anim_t *a, bool en) + * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); - -/* Reusing lv_anim_set_var for lv_anim_set_user_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); /* * lvgl extension definition for: - * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) + * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) */ -static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); - int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); - int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); - int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); /* * lvgl extension definition for: - * lv_anim_t *lv_anim_start(const lv_anim_t *a) + * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_point_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); /* - * lvgl extension definition for: - * uint32_t lv_anim_get_delay(const lv_anim_t *a) + * Struct lv_hit_test_info_t */ -static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_obj_new_int_from_uint(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); + return (lv_hit_test_info_t*)self->data; } - +#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); - -/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); - -/* Reusing lv_anim_get_delay for lv_anim_get_time */ +#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) +#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); - -/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ +static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; + case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; + case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_hit_test_info_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_hit_test_info_t"); +} + +static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_hit_test_info_t_type, + MP_QSTR_lv_hit_test_info_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_hit_test_info_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_hit_test_info_t_attr, + locals_dict, &mp_lv_hit_test_info_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) +{ + return &mp_lv_hit_test_info_t_type; +} /* * lvgl extension definition for: - * void *lv_anim_get_user_data(const lv_anim_t *a) + * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); - return ptr_to_mp((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_hit_test_info_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); + +/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); /* * lvgl extension definition for: - * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) */ -static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return convert_to_bool(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); /* * lvgl extension definition for: - * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); /* * lvgl extension definition for: - * int32_t lv_anim_path_linear(const lv_anim_t *a) + * lv_state_t lv_event_get_prev_state(lv_event_t *e) */ -static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); - -/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); -/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); - -/* Reusing lv_anim_path_linear for lv_anim_path_step */ +/* + * lvgl extension definition for: + * float lv_event_get_pinch_scale(lv_event_t *gesture_event) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); - -/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ +static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_float_from_f(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); - + -static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); - +/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ -static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); - +/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ -static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); - /* - * Array convertors for lv_style_prop_t [] + * lvgl extension definition for: + * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) */ -GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (lv_style_prop_t *)lv_arr; + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_int(_res); } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) -{ - return mp_array_from_u8ptr((void*)arr); -} + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); + /* - * Callback function lv_style_transition_dsc_init_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) + * lvgl extension definition for: + * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) */ -GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); + lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); + /* * lvgl extension definition for: - * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) + * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); - void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); - ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); - return mp_const_none; + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); +/* Reusing funcptr_event_cb for lv_event_push */ -static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); + +/* Reusing funcptr_event_cb for lv_event_pop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); + + +static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); /* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete */ @@ -36504,6 +39392,23 @@ static mp_obj_t mp_lv_display_set_flush_cb(size_t mp_n_args, const mp_obj_t *mp_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_cb_mpobj, 2, mp_lv_display_set_flush_cb, lv_display_set_flush_cb); +/* + * lvgl extension definition for: + * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) + */ + +static mp_obj_t mp_lv_display_get_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_flush_cb_t _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_lv_funcptr_lv_display_flush_cb_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_flush_cb_mpobj, 1, mp_lv_display_get_flush_cb, lv_display_get_flush_cb); + + /* * Callback function lv_display_t_wait_cb * void lv_display_flush_wait_cb_t(lv_display_t *disp) @@ -36537,6 +39442,58 @@ static mp_obj_t mp_lv_display_set_flush_wait_cb(size_t mp_n_args, const mp_obj_t static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_wait_cb_mpobj, 2, mp_lv_display_set_flush_wait_cb, lv_display_set_flush_wait_cb); +/* + * Callback function lv_display_t_sync_cb + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) + */ + +GENMPY_UNUSED static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_cb)), 2, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) + */ + +static mp_obj_t mp_lv_display_set_sync_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *sync_cb = mp_lv_callback(mp_args[1], &lv_display_t_sync_cb_callback, MP_QSTR_lv_display_t_sync_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_func_ptr)(disp, sync_cb); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_cb_mpobj, 2, mp_lv_display_set_sync_cb, lv_display_set_sync_cb); + + +/* + * lvgl extension definition for: + * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) + */ + +static mp_obj_t mp_lv_display_set_sync_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_func_ptr)(disp, wait_cb); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_wait_cb_mpobj, 2, mp_lv_display_set_sync_wait_cb, lv_display_set_sync_wait_cb); + + /* * lvgl extension definition for: * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) @@ -36622,6 +39579,14 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_ready_mpobj, 1, mp_fun static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_flush_is_last); +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_sync_ready */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_sync_ready); + +/* Reusing lv_display_get_matrix_rotation for lv_display_sync_is_last */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_sync_is_last); + /* Reusing lv_display_get_matrix_rotation for lv_display_is_double_buffered */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_double_buffered_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_double_buffered); @@ -36698,7 +39663,7 @@ GENMPY_UNUSED static void lv_display_add_event_cb_event_cb_callback(lv_event_t * /* * lvgl extension definition for: - * void lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -36707,8 +39672,8 @@ static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_ void *event_cb = mp_lv_callback(mp_args[1], &lv_display_add_event_cb_event_cb_callback, MP_QSTR_lv_display_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - ((void (*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); - return mp_const_none; + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } @@ -36740,10 +39705,10 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_dsc_mpobj, 2, mp_l /* * lvgl extension definition for: - * bool lv_display_delete_event(lv_display_t *disp, uint32_t index) + * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) */ -static mp_obj_t mp_lv_display_delete_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_remove_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); @@ -36753,7 +39718,7 @@ static mp_obj_t mp_lv_display_delete_event(size_t mp_n_args, const mp_obj_t *mp_ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_event_mpobj, 2, mp_lv_display_delete_event, lv_display_delete_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_mpobj, 2, mp_lv_display_remove_event, lv_display_remove_event); /* @@ -37045,6 +40010,10 @@ static mp_obj_t mp_lv_display_rotate_point(size_t mp_n_args, const mp_obj_t *mp_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point); +/* Reusing lv_display_rotate_point for lv_display_rotate_point_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_ccw_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point_ccw); + /* Reusing lv_display_get_tile_cnt for lv_display_get_draw_buf_size */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_draw_buf_size_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_draw_buf_size); @@ -37105,6 +40074,24 @@ static mp_obj_t mp_lv_draw_dispatch_layer(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_dispatch_layer_mpobj, 2, mp_lv_draw_dispatch_layer, lv_draw_dispatch_layer); +/* + * lvgl extension definition for: + * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) + */ + +static mp_obj_t mp_lv_display_set_draw_buf_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_func_ptr)(disp, handlers); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buf_handlers_mpobj, 2, mp_lv_display_set_draw_buf_handlers, lv_display_set_draw_buf_handlers); + + static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_display_t))) }, { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_display_delete_mpobj) }, @@ -37133,7 +40120,10 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_3rd_draw_buffer), MP_ROM_PTR(&mp_lv_display_set_3rd_draw_buffer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_render_mode), MP_ROM_PTR(&mp_lv_display_set_render_mode_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flush_cb), MP_ROM_PTR(&mp_lv_display_set_flush_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_flush_cb), MP_ROM_PTR(&mp_lv_display_get_flush_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flush_wait_cb), MP_ROM_PTR(&mp_lv_display_set_flush_wait_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_cb), MP_ROM_PTR(&mp_lv_display_set_sync_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_wait_cb), MP_ROM_PTR(&mp_lv_display_set_sync_wait_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_display_set_color_format_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_color_format), MP_ROM_PTR(&mp_lv_display_get_color_format_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_tile_cnt), MP_ROM_PTR(&mp_lv_display_set_tile_cnt_mpobj) }, @@ -37142,6 +40132,8 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_antialiasing), MP_ROM_PTR(&mp_lv_display_get_antialiasing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_flush_ready), MP_ROM_PTR(&mp_lv_display_flush_ready_mpobj) }, { MP_ROM_QSTR(MP_QSTR_flush_is_last), MP_ROM_PTR(&mp_lv_display_flush_is_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_ready), MP_ROM_PTR(&mp_lv_display_sync_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_is_last), MP_ROM_PTR(&mp_lv_display_sync_is_last_mpobj) }, { MP_ROM_QSTR(MP_QSTR_is_double_buffered), MP_ROM_PTR(&mp_lv_display_is_double_buffered_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_render_mode), MP_ROM_PTR(&mp_lv_display_get_render_mode_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_screen_active), MP_ROM_PTR(&mp_lv_display_get_screen_active_mpobj) }, @@ -37153,7 +40145,7 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_add_event_cb), MP_ROM_PTR(&mp_lv_display_add_event_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_event_count), MP_ROM_PTR(&mp_lv_display_get_event_count_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_event_dsc), MP_ROM_PTR(&mp_lv_display_get_event_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_event), MP_ROM_PTR(&mp_lv_display_delete_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_event), MP_ROM_PTR(&mp_lv_display_remove_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_display_remove_event_cb_with_user_data_mpobj) }, { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_display_send_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_theme), MP_ROM_PTR(&mp_lv_display_set_theme_mpobj) }, @@ -37174,10 +40166,12 @@ static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_buf_active), MP_ROM_PTR(&mp_lv_display_get_buf_active_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rotate_area), MP_ROM_PTR(&mp_lv_display_rotate_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rotate_point), MP_ROM_PTR(&mp_lv_display_rotate_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_point_ccw), MP_ROM_PTR(&mp_lv_display_rotate_point_ccw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_draw_buf_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_invalidated_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_invalidated_draw_buf_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_display_dpx_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_dispatch_layer), MP_ROM_PTR(&mp_lv_draw_dispatch_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_buf_handlers), MP_ROM_PTR(&mp_lv_display_set_draw_buf_handlers_mpobj) }, }; @@ -37211,1454 +40205,1092 @@ static mp_obj_t mp_lv_ll_ins_head(size_t mp_n_args, const mp_obj_t *mp_args, voi { lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); void * _res = ((void *(*)(lv_ll_t *))lv_func_ptr)(ll_p); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_head_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_head); - - -/* - * lvgl extension definition for: - * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) - */ - -static mp_obj_t mp_lv_ll_ins_prev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void *n_act = mp_to_ptr(mp_args[1]); - void * _res = ((void *(*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, n_act); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_prev_mpobj, 2, mp_lv_ll_ins_prev, lv_ll_ins_prev); - -/* Reusing lv_ll_ins_head for lv_ll_ins_tail */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_tail_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_tail); - - -/* - * lvgl extension definition for: - * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) - */ - -static mp_obj_t mp_lv_ll_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void *node_p = mp_to_ptr(mp_args[1]); - ((void (*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, node_p); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_remove_mpobj, 2, mp_lv_ll_remove, lv_ll_remove); - - -/* - * Function NOT generated: - * Callback function 'void (*cleanup)(void *)' must receive a struct pointer with user_data member as its first argument! - * void (*cleanup)(void *) - */ - - -/* - * lvgl extension definition for: - * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) - */ - -static mp_obj_t mp_lv_ll_clear_custom(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void (*cleanup)(void *) = mp_to_ptr(mp_args[1]); - ((void (*)(lv_ll_t *, void (*)(void *)))lv_func_ptr)(ll_p, cleanup); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_custom_mpobj, 2, mp_lv_ll_clear_custom, lv_ll_clear_custom); - - -/* - * lvgl extension definition for: - * void lv_ll_clear(lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - ((void (*)(lv_ll_t *))lv_func_ptr)(ll_p); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_mpobj, 1, mp_lv_ll_clear, lv_ll_clear); - - -/* - * lvgl extension definition for: - * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) - */ - -static mp_obj_t mp_lv_ll_chg_list(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_ori_p = mp_write_ptr_lv_ll_t(mp_args[0]); - lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(mp_args[1]); - void *node = mp_to_ptr(mp_args[2]); - bool head = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_func_ptr)(ll_ori_p, ll_new_p, node, head); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_chg_list_mpobj, 4, mp_lv_ll_chg_list, lv_ll_chg_list); - - -/* - * lvgl extension definition for: - * void *lv_ll_get_head(const lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_get_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); - void * _res = ((void *(*)(const lv_ll_t *))lv_func_ptr)(ll_p); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_head_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_head); - -/* Reusing lv_ll_get_head for lv_ll_get_tail */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_tail_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_tail); - - -/* - * lvgl extension definition for: - * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) - */ - -static mp_obj_t mp_lv_ll_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); - const void *n_act = (const void *)mp_to_ptr(mp_args[1]); - void * _res = ((void *(*)(const lv_ll_t *, const void *))lv_func_ptr)(ll_p, n_act); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_next_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_next); - -/* Reusing lv_ll_get_next for lv_ll_get_prev */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_prev_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_prev); - - -/* - * lvgl extension definition for: - * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_get_len(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_ll_t *))lv_func_ptr)(ll_p); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_len_mpobj, 1, mp_lv_ll_get_len, lv_ll_get_len); - - -/* - * lvgl extension definition for: - * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) - */ - -static mp_obj_t mp_lv_ll_move_before(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - void *n_act = mp_to_ptr(mp_args[1]); - void *n_after = mp_to_ptr(mp_args[2]); - ((void (*)(lv_ll_t *, void *, void *))lv_func_ptr)(ll_p, n_act, n_after); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_move_before_mpobj, 3, mp_lv_ll_move_before, lv_ll_move_before); - - -/* - * lvgl extension definition for: - * bool lv_ll_is_empty(lv_ll_t *ll_p) - */ - -static mp_obj_t mp_lv_ll_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); - bool _res = ((bool (*)(lv_ll_t *))lv_func_ptr)(ll_p); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_is_empty_mpobj, 1, mp_lv_ll_is_empty, lv_ll_is_empty); - - -static const mp_rom_map_elem_t mp_lv_ll_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_ll_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_ll_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_head), MP_ROM_PTR(&mp_lv_ll_ins_head_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_prev), MP_ROM_PTR(&mp_lv_ll_ins_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ins_tail), MP_ROM_PTR(&mp_lv_ll_ins_tail_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_ll_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_custom), MP_ROM_PTR(&mp_lv_ll_clear_custom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_ll_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_chg_list), MP_ROM_PTR(&mp_lv_ll_chg_list_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_head), MP_ROM_PTR(&mp_lv_ll_get_head_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tail), MP_ROM_PTR(&mp_lv_ll_get_tail_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_ll_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prev), MP_ROM_PTR(&mp_lv_ll_get_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_len), MP_ROM_PTR(&mp_lv_ll_get_len_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move_before), MP_ROM_PTR(&mp_lv_ll_move_before_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_ll_is_empty_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_ll_t_locals_dict, mp_lv_ll_t_locals_dict_table); - - -/* - * lvgl extension definition for: - * void lv_layer_init(lv_layer_t *layer) - */ - -static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - ((void (*)(lv_layer_t *))lv_func_ptr)(layer); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); - -/* Reusing lv_layer_init for lv_layer_reset */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); - - -static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); - - -/* - * lvgl extension definition for: - * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) - */ - -static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); - - -/* - * lvgl extension definition for: - * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) - */ - -static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); - - -/* - * lvgl extension definition for: - * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) - */ - -static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); - - -/* - * lvgl extension definition for: - * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) - */ - -static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); - - -/* - * lvgl extension definition for: - * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) - */ - -static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); - - -/* - * lvgl extension definition for: - * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) - */ - -static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_head_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_head); /* * lvgl extension definition for: - * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) + * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) */ -static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_ins_prev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void *n_act = mp_to_ptr(mp_args[1]); + void * _res = ((void *(*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, n_act); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_prev_mpobj, 2, mp_lv_ll_ins_prev, lv_ll_ins_prev); + +/* Reusing lv_ll_ins_head for lv_ll_ins_tail */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_ins_tail_mpobj, 1, mp_lv_ll_ins_head, lv_ll_ins_tail); /* * lvgl extension definition for: - * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) + * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) */ -static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void *node_p = mp_to_ptr(mp_args[1]); + ((void (*)(lv_ll_t *, void *))lv_func_ptr)(ll_p, node_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_remove_mpobj, 2, mp_lv_ll_remove, lv_ll_remove); /* * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb + * Callback function 'void (*cleanup)(void *)' must receive a struct pointer with user_data member as its first argument! + * void (*cleanup)(void *) */ -#define funcptr_lv_draw_glyph_cb_t NULL - /* * lvgl extension definition for: - * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) */ -static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_clear_custom(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); - const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void (*cleanup)(void *) = mp_to_ptr(mp_args[1]); + ((void (*)(lv_ll_t *, void (*)(void *)))lv_func_ptr)(ll_p, cleanup); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_custom_mpobj, 2, mp_lv_ll_clear_custom, lv_ll_clear_custom); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) + * void lv_ll_clear(lv_ll_t *ll_p) */ -static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + ((void (*)(lv_ll_t *))lv_func_ptr)(ll_p); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_clear_mpobj, 1, mp_lv_ll_clear, lv_ll_clear); /* * lvgl extension definition for: - * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) + * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) */ -static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_chg_list(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); + lv_ll_t *ll_ori_p = mp_write_ptr_lv_ll_t(mp_args[0]); + lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(mp_args[1]); + void *node = mp_to_ptr(mp_args[2]); + bool head = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_func_ptr)(ll_ori_p, ll_new_p, node, head); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_chg_list_mpobj, 4, mp_lv_ll_chg_list, lv_ll_chg_list); /* * lvgl extension definition for: - * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) + * void *lv_ll_get_head(const lv_ll_t *ll_p) */ -static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_get_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); + const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); + void * _res = ((void *(*)(const lv_ll_t *))lv_func_ptr)(ll_p); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_head_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_head); + +/* Reusing lv_ll_get_head for lv_ll_get_tail */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_tail_mpobj, 1, mp_lv_ll_get_head, lv_ll_get_tail); /* * lvgl extension definition for: - * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) + * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) */ -static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); + const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); + const void *n_act = (const void *)mp_to_ptr(mp_args[1]); + void * _res = ((void *(*)(const lv_ll_t *, const void *))lv_func_ptr)(ll_p, n_act); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_next_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_next); +/* Reusing lv_ll_get_next for lv_ll_get_prev */ -/* - * Function NOT generated: - * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! - * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_prev_mpobj, 2, mp_lv_ll_get_next, lv_ll_get_prev); -#define funcptr_draw_line_cb NULL - /* * lvgl extension definition for: - * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) */ -static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_get_len(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_ll_t *ll_p = (const lv_ll_t *)mp_write_ptr_lv_ll_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_ll_t *))lv_func_ptr)(ll_p); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_get_len_mpobj, 1, mp_lv_ll_get_len, lv_ll_get_len); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) + * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) */ -static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_move_before(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + void *n_act = mp_to_ptr(mp_args[1]); + void *n_after = mp_to_ptr(mp_args[2]); + ((void (*)(lv_ll_t *, void *, void *))lv_func_ptr)(ll_p, n_act, n_after); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_move_before_mpobj, 3, mp_lv_ll_move_before, lv_ll_move_before); /* * lvgl extension definition for: - * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) + * bool lv_ll_is_empty(lv_ll_t *ll_p) */ -static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_ll_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); + lv_ll_t *ll_p = mp_write_ptr_lv_ll_t(mp_args[0]); + bool _res = ((bool (*)(lv_ll_t *))lv_func_ptr)(ll_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_ll_is_empty_mpobj, 1, mp_lv_ll_is_empty, lv_ll_is_empty); + + +static const mp_rom_map_elem_t mp_lv_ll_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_ll_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_ll_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_head), MP_ROM_PTR(&mp_lv_ll_ins_head_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_prev), MP_ROM_PTR(&mp_lv_ll_ins_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ins_tail), MP_ROM_PTR(&mp_lv_ll_ins_tail_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_ll_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_custom), MP_ROM_PTR(&mp_lv_ll_clear_custom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_ll_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_chg_list), MP_ROM_PTR(&mp_lv_ll_chg_list_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_head), MP_ROM_PTR(&mp_lv_ll_get_head_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tail), MP_ROM_PTR(&mp_lv_ll_get_tail_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_ll_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prev), MP_ROM_PTR(&mp_lv_ll_get_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_len), MP_ROM_PTR(&mp_lv_ll_get_len_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move_before), MP_ROM_PTR(&mp_lv_ll_move_before_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_ll_is_empty_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_ll_t_locals_dict, mp_lv_ll_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) + * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) */ -static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); + bool preprocess = mp_obj_is_true(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_func_ptr)(list, e, preprocess); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_send_mpobj, 3, mp_lv_event_send, lv_event_send); /* - * lvgl extension definition for: - * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) + * Callback function lv_event_add_cb + * void lv_event_cb_t(lv_event_t *e) */ -static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_event_add_cb_callback(lv_event_t *arg0) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_event_add_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); - /* * lvgl extension definition for: - * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) + * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) */ -static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_add(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); + void *user_data = mp_to_ptr(mp_args[3]); + void *cb = mp_lv_callback(mp_args[1], &lv_event_add_cb_callback, MP_QSTR_lv_event_add_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(list, cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); - -/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_add_mpobj, 4, mp_lv_event_add, lv_event_add); /* * lvgl extension definition for: - * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) */ -static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_remove_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(mp_args[1]); + bool _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_func_ptr)(list, dsc); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_dsc_mpobj, 2, mp_lv_event_remove_dsc, lv_event_remove_dsc); /* * lvgl extension definition for: - * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * uint32_t lv_event_get_count(lv_event_list_t *list) */ -static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_event_list_t *))lv_func_ptr)(list); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_count_mpobj, 1, mp_lv_event_get_count, lv_event_get_count); /* * lvgl extension definition for: - * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) */ -static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_dsc_mpobj, 2, mp_lv_event_get_dsc, lv_event_get_dsc); /* * lvgl extension definition for: - * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * bool lv_event_remove(lv_event_list_t *list, uint32_t index) */ -static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); - return mp_const_none; + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_mpobj, 2, mp_lv_event_remove, lv_event_remove); /* * lvgl extension definition for: - * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) + * void lv_event_remove_all(lv_event_list_t *list) */ -static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_remove_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); + ((void (*)(lv_event_list_t *))lv_func_ptr)(list); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_all_mpobj, 1, mp_lv_event_remove_all, lv_event_remove_all); /* * lvgl extension definition for: - * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) */ -static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_push_and_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_event_list_t *event_list = mp_write_ptr_lv_event_list_t(mp_args[0]); + lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); + void *original_target = mp_to_ptr(mp_args[2]); + void *param = mp_to_ptr(mp_args[3]); + lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_func_ptr)(event_list, code, original_target, param); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_and_send_mpobj, 4, mp_lv_event_push_and_send, lv_event_push_and_send); + + +static const mp_rom_map_elem_t mp_lv_event_list_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_list_t))) }, + { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&mp_lv_event_send_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_event_add_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_dsc), MP_ROM_PTR(&mp_lv_event_remove_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_count), MP_ROM_PTR(&mp_lv_event_get_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dsc), MP_ROM_PTR(&mp_lv_event_get_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_event_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_all), MP_ROM_PTR(&mp_lv_event_remove_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push_and_send), MP_ROM_PTR(&mp_lv_event_push_and_send_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_event_list_t_locals_dict, mp_lv_event_list_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) + * inline static uint32_t lv_array_size(const lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_array_t *))lv_func_ptr)(array); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); - -/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_size_mpobj, 1, mp_lv_array_size, lv_array_size); -/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ +/* Reusing lv_array_size for lv_array_capacity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_capacity_mpobj, 1, mp_lv_array_size, lv_array_capacity); /* * lvgl extension definition for: - * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) + * inline static bool lv_array_is_empty(const lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + bool _res = ((bool (*)(const lv_array_t *))lv_func_ptr)(array); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_empty_mpobj, 1, mp_lv_array_is_empty, lv_array_is_empty); + +/* Reusing lv_array_is_empty for lv_array_is_full */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_full_mpobj, 1, mp_lv_array_is_empty, lv_array_is_full); /* * lvgl extension definition for: - * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * inline static void lv_array_clear(lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + ((void (*)(lv_array_t *))lv_func_ptr)(array); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_clear_mpobj, 1, mp_lv_array_clear, lv_array_clear); /* * lvgl extension definition for: - * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) + * inline static void *lv_array_front(const lv_array_t *array) */ -static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_front(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + void * _res = ((void *(*)(const lv_array_t *))lv_func_ptr)(array); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_front_mpobj, 1, mp_lv_array_front, lv_array_front); +/* Reusing lv_array_front for lv_array_back */ -/* - * Function NOT generated: - * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_image_core_cb draw_core_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_back_mpobj, 1, mp_lv_array_front, lv_array_back); -#define funcptr_lv_draw_image_core_cb NULL - /* * lvgl extension definition for: - * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_result_t lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); - lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); - const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); - const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); - return mp_const_none; + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_func_ptr)(array, capacity, element_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_mpobj, 3, mp_lv_array_init, lv_array_init); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_init_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + void *buf = mp_to_ptr(mp_args[1]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_func_ptr)(array, buf, capacity, element_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); - -/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_from_buf_mpobj, 4, mp_lv_array_init_from_buf, lv_array_init_from_buf); -static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, - -}; +/* + * lvgl extension definition for: + * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) + */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); - +static mp_obj_t mp_lv_array_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t new_capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, new_capacity); + return convert_to_bool(_res); +} -static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_resize_mpobj, 2, mp_lv_array_resize, lv_array_resize); -}; +/* Reusing lv_array_clear for lv_array_deinit */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_deinit_mpobj, 1, mp_lv_array_clear, lv_array_deinit); + /* * lvgl extension definition for: - * void *lv_event_get_target(lv_event_t *e) + * void lv_array_copy(lv_array_t *target, const lv_array_t *source) */ -static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); - return ptr_to_mp((void*)_res); + lv_array_t *target = mp_write_ptr_lv_array_t(mp_args[0]); + const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); + ((void (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(target, source); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_copy_mpobj, 2, mp_lv_array_copy, lv_array_copy); -/* Reusing lv_event_get_target for lv_event_get_current_target */ +/* Reusing lv_array_clear for lv_array_shrink */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_shrink_mpobj, 1, mp_lv_array_clear, lv_array_shrink); /* * lvgl extension definition for: - * lv_event_code_t lv_event_get_code(lv_event_t *e) + * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) */ -static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, index); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); - -/* Reusing lv_event_get_target for lv_event_get_param */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); - -/* Reusing lv_event_get_target for lv_event_get_user_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); - -/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); - -/* Reusing funcptr_event_cb for lv_event_stop_trickling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_mpobj, 2, mp_lv_array_remove, lv_array_remove); -/* Reusing funcptr_event_cb for lv_event_stop_processing */ +/* Reusing lv_array_remove for lv_array_remove_unordered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_unordered_mpobj, 2, mp_lv_array_remove, lv_array_remove_unordered); -/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ +/* Reusing lv_array_init for lv_array_erase */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_erase_mpobj, 3, mp_lv_array_init, lv_array_erase); /* * lvgl extension definition for: - * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) + * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) */ -static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_concat(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(array, other); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_concat_mpobj, 2, mp_lv_array_concat, lv_array_concat); /* * lvgl extension definition for: - * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) + * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) */ -static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_push_back(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); - return lv_to_mp((void*)_res); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + const void *element = (const void *)mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_func_ptr)(array, element); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); - -/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_push_back_mpobj, 2, mp_lv_array_push_back, lv_array_push_back); /* * lvgl extension definition for: - * lv_indev_t *lv_event_get_indev(lv_event_t *e) + * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) */ -static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_assign(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_indev_t((void*)_res); + lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + const void *value = (const void *)mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_func_ptr)(array, index, value); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_assign_mpobj, 3, mp_lv_array_assign, lv_array_assign); /* * lvgl extension definition for: - * lv_layer_t *lv_event_get_layer(lv_event_t *e) + * void *lv_array_at(const lv_array_t *array, uint32_t index) */ -static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_array_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_layer_t((void*)_res); + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(const lv_array_t *, uint32_t))lv_func_ptr)(array, index); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_at_mpobj, 2, mp_lv_array_at, lv_array_at); + + +static const mp_rom_map_elem_t mp_lv_array_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_array_t))) }, + { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_array_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_array_capacity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_array_is_empty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_array_is_full_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_array_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_front), MP_ROM_PTR(&mp_lv_array_front_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_back), MP_ROM_PTR(&mp_lv_array_back_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_array_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init_from_buf), MP_ROM_PTR(&mp_lv_array_init_from_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_array_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&mp_lv_array_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_array_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_shrink), MP_ROM_PTR(&mp_lv_array_shrink_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_array_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_unordered), MP_ROM_PTR(&mp_lv_array_remove_unordered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_erase), MP_ROM_PTR(&mp_lv_array_erase_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_concat), MP_ROM_PTR(&mp_lv_array_concat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push_back), MP_ROM_PTR(&mp_lv_array_push_back_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_assign), MP_ROM_PTR(&mp_lv_array_assign_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_at), MP_ROM_PTR(&mp_lv_array_at_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_array_t_locals_dict, mp_lv_array_t_locals_dict_table); + /* * lvgl extension definition for: - * const lv_area_t *lv_event_get_old_size(lv_event_t *e) + * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) */ -static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + lv_theme_t *dst = mp_write_ptr_lv_theme_t(mp_args[0]); + const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[1]); + ((void (*)(lv_theme_t *, const lv_theme_t *))lv_func_ptr)(dst, src); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_copy_mpobj, 2, mp_lv_theme_copy, lv_theme_copy); /* * lvgl extension definition for: - * uint32_t lv_event_get_key(lv_event_t *e) + * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) */ -static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int_from_uint(_res); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + lv_theme_t *parent = mp_write_ptr_lv_theme_t(mp_args[1]); + ((void (*)(lv_theme_t *, lv_theme_t *))lv_func_ptr)(theme, parent); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_parent_mpobj, 2, mp_lv_theme_set_parent, lv_theme_set_parent); /* - * lvgl extension definition for: - * int32_t lv_event_get_rotary_diff(lv_event_t *e) + * Callback function lv_theme_t_apply_cb + * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) */ -static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int(_res); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_theme_t((void*)arg0); + mp_args[1] = lv_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_theme_t_apply_cb)), 2, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); - /* * lvgl extension definition for: - * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) + * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) */ -static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_set_apply_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + void *apply_cb = mp_lv_callback(mp_args[1], &lv_theme_t_apply_cb_callback, MP_QSTR_lv_theme_t_apply_cb, &theme->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_func_ptr)(theme, apply_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_apply_cb_mpobj, 2, mp_lv_theme_set_apply_cb, lv_theme_set_apply_cb); /* * lvgl extension definition for: - * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) + * void lv_theme_set_user_data(lv_theme_t *theme, void *user_data) */ -static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); + void *user_data = mp_to_ptr(mp_args[1]); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + ((void (*)(lv_theme_t *, void *))lv_func_ptr)(theme, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_user_data_mpobj, 2, mp_lv_theme_set_user_data, lv_theme_set_user_data); /* * lvgl extension definition for: - * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) + * void *lv_theme_get_user_data(const lv_theme_t *theme) */ -static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_point_t((void*)_res); + const lv_theme_t *theme = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[0]); + void * _res = ((void *(*)(const lv_theme_t *))lv_func_ptr)(theme); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_user_data_mpobj, 1, mp_lv_theme_get_user_data, lv_theme_get_user_data); /* - * Struct lv_hit_test_info_t + * lvgl extension definition for: + * void lv_theme_delete(lv_theme_t *theme) */ -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) +static mp_obj_t mp_lv_theme_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); - return (lv_hit_test_info_t*)self->data; + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + ((void (*)(lv_theme_t *))lv_func_ptr)(theme); + return mp_const_none; } -#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_delete_mpobj, 1, mp_lv_theme_delete, lv_theme_delete); + -#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) -#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) +static const mp_rom_map_elem_t mp_lv_theme_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_theme_t))) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_theme_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_theme_set_parent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_apply_cb), MP_ROM_PTR(&mp_lv_theme_set_apply_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_theme_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_theme_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_theme_delete_mpobj) }, + +}; -static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; +static MP_DEFINE_CONST_DICT(mp_lv_theme_t_locals_dict, mp_lv_theme_t_locals_dict_table); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; - case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; - case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ -static void mp_lv_hit_test_info_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); + + +/* + * Callback function lv_timer_t_timer_cb + * void lv_timer_cb_t(lv_timer_t *) + */ + +GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) { - mp_printf(print, "struct lv_hit_test_info_t"); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); + return; } -static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_hit_test_info_t_type, - MP_QSTR_lv_hit_test_info_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_hit_test_info_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_hit_test_info_t_attr, - locals_dict, &mp_lv_hit_test_info_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +/* + * lvgl extension definition for: + * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) + */ -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) +static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_hit_test_info_t_type; + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); + return mp_const_none; } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); /* * lvgl extension definition for: - * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) + * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) */ -static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_hit_test_info_t((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); -/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ +/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); /* * lvgl extension definition for: - * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) + * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) */ -static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); /* * lvgl extension definition for: - * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) + * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) */ -static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_draw_task_t((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool auto_delete = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); /* * lvgl extension definition for: - * lv_state_t lv_event_get_prev_state(lv_event_t *e) + * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) */ -static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); /* * lvgl extension definition for: - * float lv_event_get_pinch_scale(lv_event_t *gesture_event) + * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) */ -static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_float_from_f(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); + return mp_read_ptr_lv_timer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); /* * lvgl extension definition for: - * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) + * void *lv_timer_get_user_data(lv_timer_t *timer) */ -static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); /* * lvgl extension definition for: - * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) + * bool lv_timer_get_paused(lv_timer_t *timer) */ -static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); - lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); - return mp_obj_new_int(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); + + +static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) + * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) */ -static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_unpremultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t))lv_func_ptr)(c); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_unpremultiply_mpobj, 1, mp_lv_color32_unpremultiply, lv_color32_unpremultiply); -/* Reusing funcptr_event_cb for lv_event_push */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); - -/* Reusing funcptr_event_cb for lv_event_pop */ +/* + * lvgl extension definition for: + * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); - +static mp_obj_t mp_lv_color32_lumi_of(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + bool premultiplied = mp_obj_is_true(mp_args[1]); + uint8_t _res = ((uint8_t (*)(lv_color32_t, bool))lv_func_ptr)(c, premultiplied); + return mp_obj_new_int_from_uint(_res); +} -static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_lumi_of_mpobj, 2, mp_lv_color32_lumi_of, lv_color32_lumi_of); -}; -static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); - +/* + * lvgl extension definition for: + * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) + */ + +static mp_obj_t mp_lv_color_mix32_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); + return mp_read_lv_color32_t(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_inlined); + +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied_inlined */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied_inlined); + /* * lvgl extension definition for: @@ -38711,35 +41343,25 @@ static mp_obj_t mp_lv_color32_luminance(size_t mp_n_args, const mp_obj_t *mp_arg static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_luminance_mpobj, 1, mp_lv_color32_luminance, lv_color32_luminance); +/* Reusing lv_color_mix32_inlined for lv_color_mix32 */ -/* - * lvgl extension definition for: - * lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg) - */ - -static mp_obj_t mp_lv_color_mix32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); - return mp_read_lv_color32_t(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32, lv_color_mix32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32); -/* Reusing lv_color_mix32 for lv_color_mix32_premultiplied */ +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32, lv_color_mix32_premultiplied); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied); -/* Reusing lv_color_mix32 for lv_color_over32 */ +/* Reusing lv_color_mix32_inlined for lv_color_over32 */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32, lv_color_over32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_over32); static const mp_rom_map_elem_t mp_lv_color32_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color32_t))) }, + { MP_ROM_QSTR(MP_QSTR_unpremultiply), MP_ROM_PTR(&mp_lv_color32_unpremultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lumi_of), MP_ROM_PTR(&mp_lv_color32_lumi_of_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_inlined), MP_ROM_PTR(&mp_lv_color_mix32_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied_inlined), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_inlined_mpobj) }, { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color32_eq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_premultiply), MP_ROM_PTR(&mp_lv_color_premultiply_mpobj) }, { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color32_luminance_mpobj) }, @@ -38753,782 +41375,711 @@ static MP_DEFINE_CONST_DICT(mp_lv_color32_t_locals_dict, mp_lv_color32_t_locals_ /* - * lvgl extension definition for: - * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) - */ - -static mp_obj_t mp_lv_event_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); - bool preprocess = mp_obj_is_true(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_func_ptr)(list, e, preprocess); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_send_mpobj, 3, mp_lv_event_send, lv_event_send); - - -/* - * Callback function lv_event_add_cb - * void lv_event_cb_t(lv_event_t *e) + * Callback function lv_color_filter_dsc_t_cb + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) */ -GENMPY_UNUSED static void lv_event_add_cb_callback(lv_event_t *arg0) +GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_event_add_cb)), 1, mp_args); - return; + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); + return mp_write_lv_color_t(callback_result); } /* * lvgl extension definition for: - * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) + * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) */ -static mp_obj_t mp_lv_event_add(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - void *cb = mp_lv_callback(mp_args[1], &lv_event_add_cb_callback, MP_QSTR_lv_event_add_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(list, cb, filter, user_data); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); + void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_add_mpobj, 4, mp_lv_event_add, lv_event_add); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); -/* - * lvgl extension definition for: - * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) - */ - -static mp_obj_t mp_lv_event_remove_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(mp_args[1]); - bool _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_func_ptr)(list, dsc); - return convert_to_bool(_res); -} +static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); + +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_dsc_mpobj, 2, mp_lv_event_remove_dsc, lv_event_remove_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); /* * lvgl extension definition for: - * uint32_t lv_event_get_count(lv_event_list_t *list) + * void lv_anim_set_var(lv_anim_t *a, void *var) */ -static mp_obj_t mp_lv_event_get_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_event_list_t *))lv_func_ptr)(list); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *var = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_count_mpobj, 1, mp_lv_event_get_count, lv_event_get_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); /* - * lvgl extension definition for: - * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) + * Function NOT generated: + * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! + * lv_anim_exec_xcb_t exec_cb */ - -static mp_obj_t mp_lv_event_get_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); - return mp_read_ptr_lv_event_dsc_t((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_dsc_mpobj, 2, mp_lv_event_get_dsc, lv_event_get_dsc); /* * lvgl extension definition for: - * bool lv_event_remove(lv_event_list_t *list, uint32_t index) + * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) */ -static mp_obj_t mp_lv_event_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_func_ptr)(list, index); - return convert_to_bool(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_mpobj, 2, mp_lv_event_remove, lv_event_remove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); /* * lvgl extension definition for: - * void lv_event_remove_all(lv_event_list_t *list) + * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) */ -static mp_obj_t mp_lv_event_remove_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_list_t *list = mp_write_ptr_lv_event_list_t(mp_args[0]); - ((void (*)(lv_event_list_t *))lv_func_ptr)(list); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_remove_all_mpobj, 1, mp_lv_event_remove_all, lv_event_remove_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); +/* Reusing lv_anim_set_duration for lv_anim_set_delay */ -/* - * lvgl extension definition for: - * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) - */ - -static mp_obj_t mp_lv_event_push_and_send(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_list_t *event_list = mp_write_ptr_lv_event_list_t(mp_args[0]); - lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); - void *original_target = mp_to_ptr(mp_args[2]); - void *param = mp_to_ptr(mp_args[3]); - lv_result_t _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_func_ptr)(event_list, code, original_target, param); - return mp_obj_new_int(_res); -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); + +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_and_send_mpobj, 4, mp_lv_event_push_and_send, lv_event_push_and_send); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -static const mp_rom_map_elem_t mp_lv_event_list_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_list_t))) }, - { MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&mp_lv_event_send_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_event_add_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_dsc), MP_ROM_PTR(&mp_lv_event_remove_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_count), MP_ROM_PTR(&mp_lv_event_get_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dsc), MP_ROM_PTR(&mp_lv_event_get_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_event_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_all), MP_ROM_PTR(&mp_lv_event_remove_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push_and_send), MP_ROM_PTR(&mp_lv_event_push_and_send_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); -}; +/* Reusing lv_anim_set_duration for lv_anim_pause_for */ -static MP_DEFINE_CONST_DICT(mp_lv_event_list_t_locals_dict, mp_lv_event_list_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); + /* * lvgl extension definition for: - * inline static uint32_t lv_array_size(const lv_array_t *array) + * bool lv_anim_is_paused(lv_anim_t *a) */ -static mp_obj_t mp_lv_array_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_array_t *))lv_func_ptr)(array); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_size_mpobj, 1, mp_lv_array_size, lv_array_size); - -/* Reusing lv_array_size for lv_array_capacity */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_capacity_mpobj, 1, mp_lv_array_size, lv_array_capacity); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); /* * lvgl extension definition for: - * inline static bool lv_array_is_empty(const lv_array_t *array) + * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) */ -static mp_obj_t mp_lv_array_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - bool _res = ((bool (*)(const lv_array_t *))lv_func_ptr)(array); - return convert_to_bool(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_empty_mpobj, 1, mp_lv_array_is_empty, lv_array_is_empty); - -/* Reusing lv_array_is_empty for lv_array_is_full */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_is_full_mpobj, 1, mp_lv_array_is_empty, lv_array_is_full); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); /* - * lvgl extension definition for: - * inline static void lv_array_clear(lv_array_t *array) + * Callback function lv_anim_t_exec_cb + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -static mp_obj_t mp_lv_array_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - ((void (*)(lv_array_t *))lv_func_ptr)(array); - return mp_const_none; + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_clear_mpobj, 1, mp_lv_array_clear, lv_array_clear); - /* * lvgl extension definition for: - * inline static void *lv_array_front(const lv_array_t *array) + * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_array_front(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - void * _res = ((void *(*)(const lv_array_t *))lv_func_ptr)(array); - return ptr_to_mp((void*)_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_front_mpobj, 1, mp_lv_array_front, lv_array_front); - -/* Reusing lv_array_front for lv_array_back */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_back_mpobj, 1, mp_lv_array_front, lv_array_back); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); /* - * lvgl extension definition for: - * void lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) + * Callback function lv_anim_t_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) */ -static mp_obj_t mp_lv_array_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_array_t *, uint32_t, uint32_t))lv_func_ptr)(array, capacity, element_size); - return mp_const_none; + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_mpobj, 3, mp_lv_array_init, lv_array_init); - /* * lvgl extension definition for: - * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) + * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) */ -static mp_obj_t mp_lv_array_init_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - void *buf = mp_to_ptr(mp_args[1]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_func_ptr)(array, buf, capacity, element_size); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_init_from_buf_mpobj, 4, mp_lv_array_init_from_buf, lv_array_init_from_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); /* - * lvgl extension definition for: - * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) + * Callback function lv_anim_t_start_cb + * void lv_anim_start_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t new_capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, new_capacity); - return convert_to_bool(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_resize_mpobj, 2, mp_lv_array_resize, lv_array_resize); - -/* Reusing lv_array_clear for lv_array_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_deinit_mpobj, 1, mp_lv_array_clear, lv_array_deinit); - /* * lvgl extension definition for: - * void lv_array_copy(lv_array_t *target, const lv_array_t *source) + * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) */ -static mp_obj_t mp_lv_array_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *target = mp_write_ptr_lv_array_t(mp_args[0]); - const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); - ((void (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(target, source); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_copy_mpobj, 2, mp_lv_array_copy, lv_array_copy); - -/* Reusing lv_array_clear for lv_array_shrink */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_shrink_mpobj, 1, mp_lv_array_clear, lv_array_shrink); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); /* - * lvgl extension definition for: - * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) + * Callback function lv_anim_t_get_value_cb + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_func_ptr)(array, index); - return mp_obj_new_int(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_mpobj, 2, mp_lv_array_remove, lv_array_remove); - -/* Reusing lv_array_remove for lv_array_remove_unordered */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_remove_unordered_mpobj, 2, mp_lv_array_remove, lv_array_remove_unordered); - /* * lvgl extension definition for: - * lv_result_t lv_array_erase(lv_array_t *array, uint32_t start, uint32_t end) + * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) */ -static mp_obj_t mp_lv_array_erase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t start = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t end = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_func_ptr)(array, start, end); - return mp_obj_new_int(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_erase_mpobj, 3, mp_lv_array_erase, lv_array_erase); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); /* - * lvgl extension definition for: - * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) + * Callback function lv_anim_t_completed_cb + * void lv_anim_completed_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_concat(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_func_ptr)(array, other); - return mp_obj_new_int(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_concat_mpobj, 2, mp_lv_array_concat, lv_array_concat); - /* * lvgl extension definition for: - * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) + * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) */ -static mp_obj_t mp_lv_array_push_back(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - const void *element = (const void *)mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_func_ptr)(array, element); - return mp_obj_new_int(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_push_back_mpobj, 2, mp_lv_array_push_back, lv_array_push_back); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); /* - * lvgl extension definition for: - * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) + * Callback function lv_anim_t_deleted_cb + * void lv_anim_deleted_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_array_assign(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) { - lv_array_t *array = mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - const void *value = (const void *)mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_func_ptr)(array, index, value); - return mp_obj_new_int(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_assign_mpobj, 3, mp_lv_array_assign, lv_array_assign); - /* * lvgl extension definition for: - * void *lv_array_at(const lv_array_t *array, uint32_t index) + * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) */ -static mp_obj_t mp_lv_array_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(const lv_array_t *, uint32_t))lv_func_ptr)(array, index); - return ptr_to_mp((void*)_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_array_at_mpobj, 2, mp_lv_array_at, lv_array_at); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ -static const mp_rom_map_elem_t mp_lv_array_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_array_t))) }, - { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_array_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_array_capacity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_array_is_empty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_array_is_full_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_array_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_front), MP_ROM_PTR(&mp_lv_array_front_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_back), MP_ROM_PTR(&mp_lv_array_back_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_array_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init_from_buf), MP_ROM_PTR(&mp_lv_array_init_from_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_array_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&mp_lv_array_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_array_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_shrink), MP_ROM_PTR(&mp_lv_array_shrink_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_array_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_unordered), MP_ROM_PTR(&mp_lv_array_remove_unordered_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_erase), MP_ROM_PTR(&mp_lv_array_erase_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_concat), MP_ROM_PTR(&mp_lv_array_concat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push_back), MP_ROM_PTR(&mp_lv_array_push_back_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_assign), MP_ROM_PTR(&mp_lv_array_assign_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_at), MP_ROM_PTR(&mp_lv_array_at_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); -}; +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ -static MP_DEFINE_CONST_DICT(mp_lv_array_t_locals_dict, mp_lv_array_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); + +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); + +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); + +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); + /* * lvgl extension definition for: - * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) + * void lv_anim_set_early_apply(lv_anim_t *a, bool en) */ -static mp_obj_t mp_lv_theme_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *dst = mp_write_ptr_lv_theme_t(mp_args[0]); - const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[1]); - ((void (*)(lv_theme_t *, const lv_theme_t *))lv_func_ptr)(dst, src); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_copy_mpobj, 2, mp_lv_theme_copy, lv_theme_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); + +/* Reusing lv_anim_set_var for lv_anim_set_user_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); /* * lvgl extension definition for: - * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) + * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) */ -static mp_obj_t mp_lv_theme_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - lv_theme_t *parent = mp_write_ptr_lv_theme_t(mp_args[1]); - ((void (*)(lv_theme_t *, lv_theme_t *))lv_func_ptr)(theme, parent); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); + int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); + int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); + int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_parent_mpobj, 2, mp_lv_theme_set_parent, lv_theme_set_parent); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); -/* - * Callback function lv_theme_t_apply_cb - * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) - */ - -GENMPY_UNUSED static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_theme_t((void*)arg0); - mp_args[1] = lv_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_theme_t_apply_cb)), 2, mp_args); - return; -} - - /* * lvgl extension definition for: - * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) + * lv_anim_t *lv_anim_start(const lv_anim_t *a) */ -static mp_obj_t mp_lv_theme_set_apply_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - void *apply_cb = mp_lv_callback(mp_args[1], &lv_theme_t_apply_cb_callback, MP_QSTR_lv_theme_t_apply_cb, &theme->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_func_ptr)(theme, apply_cb); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_apply_cb_mpobj, 2, mp_lv_theme_set_apply_cb, lv_theme_set_apply_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); /* * lvgl extension definition for: - * void lv_theme_delete(lv_theme_t *theme) + * uint32_t lv_anim_get_delay(const lv_anim_t *a) */ -static mp_obj_t mp_lv_theme_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - ((void (*)(lv_theme_t *))lv_func_ptr)(theme); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_delete_mpobj, 1, mp_lv_theme_delete, lv_theme_delete); - - -static const mp_rom_map_elem_t mp_lv_theme_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_theme_t))) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_theme_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_theme_set_parent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_apply_cb), MP_ROM_PTR(&mp_lv_theme_set_apply_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_theme_delete_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_theme_t_locals_dict, mp_lv_theme_t_locals_dict_table); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ +/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); -/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ +/* Reusing lv_anim_get_delay for lv_anim_get_time */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); -/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ +/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); /* - * Callback function lv_timer_t_timer_cb - * void lv_timer_cb_t(lv_timer_t *) + * lvgl extension definition for: + * void *lv_anim_get_user_data(const lv_anim_t *a) */ -GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) +static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); - return; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); + return ptr_to_mp((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); + /* * lvgl extension definition for: - * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) + * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); - return mp_const_none; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); /* * lvgl extension definition for: - * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) + * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); - return mp_const_none; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); /* * lvgl extension definition for: - * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) + * int32_t lv_anim_path_linear(const lv_anim_t *a) */ -static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ -/* - * lvgl extension definition for: - * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); + +/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ -static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool auto_delete = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); + +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); + +/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); +/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ -/* - * lvgl extension definition for: - * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); + +/* Reusing lv_anim_path_linear for lv_anim_path_step */ -static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *user_data = mp_to_ptr(mp_args[1]); - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); + +/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); +static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, -/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); +static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); + /* - * lvgl extension definition for: - * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) + * Array convertors for lv_style_prop_t [] */ -static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); - return mp_read_ptr_lv_timer_t((void*)_res); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (lv_style_prop_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); - /* - * lvgl extension definition for: - * void *lv_timer_get_user_data(lv_timer_t *timer) + * Callback function lv_style_transition_dsc_init_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) */ -static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); - return ptr_to_mp((void*)_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); - /* * lvgl extension definition for: - * bool lv_timer_get_paused(lv_timer_t *timer) + * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) */ -static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); - return convert_to_bool(_res); + void *user_data = mp_to_ptr(mp_args[5]); + const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); + void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); + ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); -static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, +static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); static const mp_rom_map_elem_t mp_lv_obj_class_t_locals_dict_table[] = { @@ -39551,10 +42102,10 @@ static MP_DEFINE_CONST_DICT(mp_lv_matrix_t_locals_dict, mp_lv_matrix_t_locals_di /* * lvgl extension definition for: - * inline static bool lv_style_is_const(const lv_style_t *style) + * inline static bool lv_style_is_const_internal(const lv_style_t *style) */ -static mp_obj_t mp_lv_style_is_const(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_is_const_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[0]); bool _res = ((bool (*)(const lv_style_t *))lv_func_ptr)(style); @@ -39563,15 +42114,15 @@ static mp_obj_t mp_lv_style_is_const(size_t mp_n_args, const mp_obj_t *mp_args, -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_const_mpobj, 1, mp_lv_style_is_const, lv_style_is_const); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_const_internal_mpobj, 1, mp_lv_style_is_const_internal, lv_style_is_const_internal); /* * lvgl extension definition for: - * inline static lv_style_res_t lv_style_get_prop_inlined(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) + * inline static lv_style_res_t lv_style_get_prop_internal(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) */ -static mp_obj_t mp_lv_style_get_prop_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_get_prop_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[0]); lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); @@ -39582,72 +42133,7 @@ static mp_obj_t mp_lv_style_get_prop_inlined(size_t mp_n_args, const mp_obj_t *m -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_inlined_mpobj, 3, mp_lv_style_get_prop_inlined, lv_style_get_prop_inlined); - - -/* - * lvgl extension definition for: - * inline static void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) - */ - -static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); - - -/* - * lvgl extension definition for: - * inline static void lv_style_set_pad_all(lv_style_t *style, int32_t value) - */ - -static mp_obj_t mp_lv_style_set_pad_all(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, int32_t))lv_func_ptr)(style, value); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_all); - -/* Reusing lv_style_set_pad_all for lv_style_set_pad_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_hor); - -/* Reusing lv_style_set_pad_all for lv_style_set_pad_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_ver); - -/* Reusing lv_style_set_pad_all for lv_style_set_pad_gap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_gap); - -/* Reusing lv_style_set_pad_all for lv_style_set_margin_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_hor); - -/* Reusing lv_style_set_pad_all for lv_style_set_margin_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_ver); - -/* Reusing lv_style_set_pad_all for lv_style_set_margin_all */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_all); - -/* Reusing lv_style_set_pad_all for lv_style_set_transform_scale */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_scale); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_internal_mpobj, 3, mp_lv_style_get_prop_internal, lv_style_get_prop_internal); /* Reusing lv_obj_report_style_change for lv_style_init */ @@ -39679,6 +42165,10 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_copy_mpobj, 2, mp_lv_style_cop static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_merge_mpobj, 2, mp_lv_style_copy, lv_style_merge); +/* Reusing lv_style_is_const_internal for lv_style_is_const */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_const_mpobj, 1, mp_lv_style_is_const_internal, lv_style_is_const); + /* * lvgl extension definition for: @@ -39716,49 +42206,63 @@ static mp_obj_t mp_lv_style_set_prop(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_prop_mpobj, 3, mp_lv_style_set_prop, lv_style_set_prop); -/* Reusing lv_style_get_prop_inlined for lv_style_get_prop */ +/* Reusing lv_style_get_prop_internal for lv_style_get_prop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_mpobj, 3, mp_lv_style_get_prop_inlined, lv_style_get_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_get_prop_mpobj, 3, mp_lv_style_get_prop_internal, lv_style_get_prop); -/* Reusing lv_style_is_const for lv_style_is_empty */ +/* Reusing lv_style_is_const_internal for lv_style_is_empty */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_empty_mpobj, 1, mp_lv_style_is_const, lv_style_is_empty); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_is_empty_mpobj, 1, mp_lv_style_is_const_internal, lv_style_is_empty); -/* Reusing lv_style_set_pad_all for lv_style_set_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_width); +/* + * lvgl extension definition for: + * void lv_style_set_width(lv_style_t *style, int32_t value) + */ + +static mp_obj_t mp_lv_style_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + int32_t value = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, int32_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_width); -/* Reusing lv_style_set_pad_all for lv_style_set_min_width */ +/* Reusing lv_style_set_width for lv_style_set_min_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_min_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_min_width); -/* Reusing lv_style_set_pad_all for lv_style_set_max_width */ +/* Reusing lv_style_set_width for lv_style_set_max_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_max_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_max_width); -/* Reusing lv_style_set_pad_all for lv_style_set_height */ +/* Reusing lv_style_set_width for lv_style_set_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_height); -/* Reusing lv_style_set_pad_all for lv_style_set_min_height */ +/* Reusing lv_style_set_width for lv_style_set_min_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_min_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_min_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_min_height); -/* Reusing lv_style_set_pad_all for lv_style_set_max_height */ +/* Reusing lv_style_set_width for lv_style_set_max_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_max_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_max_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_max_height); -/* Reusing lv_style_set_pad_all for lv_style_set_length */ +/* Reusing lv_style_set_width for lv_style_set_length */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_length_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_length); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_length_mpobj, 2, mp_lv_style_set_width, lv_style_set_length); -/* Reusing lv_style_set_pad_all for lv_style_set_x */ +/* Reusing lv_style_set_width for lv_style_set_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_x); -/* Reusing lv_style_set_pad_all for lv_style_set_y */ +/* Reusing lv_style_set_width for lv_style_set_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_y); /* @@ -39778,97 +42282,97 @@ static mp_obj_t mp_lv_style_set_align(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_align_mpobj, 2, mp_lv_style_set_align, lv_style_set_align); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_width */ +/* Reusing lv_style_set_width for lv_style_set_transform_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_width); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_height */ +/* Reusing lv_style_set_width for lv_style_set_transform_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_height_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_height_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_height); -/* Reusing lv_style_set_pad_all for lv_style_set_translate_x */ +/* Reusing lv_style_set_width for lv_style_set_translate_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_translate_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_translate_x); -/* Reusing lv_style_set_pad_all for lv_style_set_translate_y */ +/* Reusing lv_style_set_width for lv_style_set_translate_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_translate_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_translate_y); -/* Reusing lv_style_set_pad_all for lv_style_set_translate_radial */ +/* Reusing lv_style_set_width for lv_style_set_translate_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_radial_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_translate_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_translate_radial_mpobj, 2, mp_lv_style_set_width, lv_style_set_translate_radial); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_scale_x */ +/* Reusing lv_style_set_width for lv_style_set_transform_scale_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_scale_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale_x); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_scale_y */ +/* Reusing lv_style_set_width for lv_style_set_transform_scale_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_scale_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale_y); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_rotation */ +/* Reusing lv_style_set_width for lv_style_set_transform_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_rotation_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_rotation_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_rotation); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_pivot_x */ +/* Reusing lv_style_set_width for lv_style_set_transform_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_pivot_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_pivot_x); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_pivot_y */ +/* Reusing lv_style_set_width for lv_style_set_transform_pivot_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_pivot_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_pivot_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_pivot_y); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_skew_x */ +/* Reusing lv_style_set_width for lv_style_set_transform_skew_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_skew_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_skew_x); -/* Reusing lv_style_set_pad_all for lv_style_set_transform_skew_y */ +/* Reusing lv_style_set_width for lv_style_set_transform_skew_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_transform_skew_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_skew_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_skew_y); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_top */ +/* Reusing lv_style_set_width for lv_style_set_pad_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_top_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_top_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_top); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_bottom */ +/* Reusing lv_style_set_width for lv_style_set_pad_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_bottom_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_bottom_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_bottom); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_left */ +/* Reusing lv_style_set_width for lv_style_set_pad_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_left_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_left_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_left); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_right */ +/* Reusing lv_style_set_width for lv_style_set_pad_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_right_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_right_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_right); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_row */ +/* Reusing lv_style_set_width for lv_style_set_pad_row */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_row_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_row); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_row_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_row); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_column */ +/* Reusing lv_style_set_width for lv_style_set_pad_column */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_column_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_column); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_column_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_column); -/* Reusing lv_style_set_pad_all for lv_style_set_pad_radial */ +/* Reusing lv_style_set_width for lv_style_set_pad_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_radial_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_pad_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_radial_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_radial); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_top */ +/* Reusing lv_style_set_width for lv_style_set_margin_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_top_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_top_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_top); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_bottom */ +/* Reusing lv_style_set_width for lv_style_set_margin_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_bottom_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_bottom_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_bottom); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_left */ +/* Reusing lv_style_set_width for lv_style_set_margin_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_left_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_left_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_left); -/* Reusing lv_style_set_pad_all for lv_style_set_margin_right */ +/* Reusing lv_style_set_width for lv_style_set_margin_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_right_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_margin_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_right_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_right); /* @@ -39928,13 +42432,13 @@ static mp_obj_t mp_lv_style_set_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_grad_dir_mpobj, 2, mp_lv_style_set_bg_grad_dir, lv_style_set_bg_grad_dir); -/* Reusing lv_style_set_pad_all for lv_style_set_bg_main_stop */ +/* Reusing lv_style_set_width for lv_style_set_bg_main_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_main_stop_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_bg_main_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_main_stop_mpobj, 2, mp_lv_style_set_width, lv_style_set_bg_main_stop); -/* Reusing lv_style_set_pad_all for lv_style_set_bg_grad_stop */ +/* Reusing lv_style_set_width for lv_style_set_bg_grad_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_grad_stop_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_bg_grad_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bg_grad_stop_mpobj, 2, mp_lv_style_set_width, lv_style_set_bg_grad_stop); /* Reusing lv_style_set_bg_opa for lv_style_set_bg_main_opa */ @@ -40018,9 +42522,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_color_mpobj, 2, mp_ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_border_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_border_width */ +/* Reusing lv_style_set_width for lv_style_set_border_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_border_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_border_width); /* @@ -40044,9 +42548,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_side_mpobj, 2, mp_l static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_border_post_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_border_post); -/* Reusing lv_style_set_pad_all for lv_style_set_outline_width */ +/* Reusing lv_style_set_width for lv_style_set_outline_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_outline_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_outline_width); /* Reusing lv_style_set_bg_color for lv_style_set_outline_color */ @@ -40056,25 +42560,25 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_color_mpobj, 2, mp static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_outline_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_outline_pad */ +/* Reusing lv_style_set_width for lv_style_set_outline_pad */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_pad_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_outline_pad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_outline_pad_mpobj, 2, mp_lv_style_set_width, lv_style_set_outline_pad); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_width */ +/* Reusing lv_style_set_width for lv_style_set_shadow_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_width); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_offset_x */ +/* Reusing lv_style_set_width for lv_style_set_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_offset_x); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_offset_y */ +/* Reusing lv_style_set_width for lv_style_set_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_offset_y); -/* Reusing lv_style_set_pad_all for lv_style_set_shadow_spread */ +/* Reusing lv_style_set_width for lv_style_set_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_spread_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_shadow_spread); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_shadow_spread_mpobj, 2, mp_lv_style_set_width, lv_style_set_shadow_spread); /* Reusing lv_style_set_bg_color for lv_style_set_shadow_color */ @@ -40114,17 +42618,17 @@ static mp_obj_t mp_lv_style_set_image_colorkey(size_t mp_n_args, const mp_obj_t static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_image_colorkey_mpobj, 2, mp_lv_style_set_image_colorkey, lv_style_set_image_colorkey); -/* Reusing lv_style_set_pad_all for lv_style_set_line_width */ +/* Reusing lv_style_set_width for lv_style_set_line_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_line_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_line_width); -/* Reusing lv_style_set_pad_all for lv_style_set_line_dash_width */ +/* Reusing lv_style_set_width for lv_style_set_line_dash_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_line_dash_width); -/* Reusing lv_style_set_pad_all for lv_style_set_line_dash_gap */ +/* Reusing lv_style_set_width for lv_style_set_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_gap_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_line_dash_gap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_dash_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_line_dash_gap); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_line_rounded */ @@ -40138,9 +42642,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_color_mpobj, 2, mp_lv static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_line_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_line_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_arc_width */ +/* Reusing lv_style_set_width for lv_style_set_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_arc_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_arc_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_arc_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_arc_width); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_arc_rounded */ @@ -40184,13 +42688,13 @@ static mp_obj_t mp_lv_style_set_text_font(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_font_mpobj, 2, mp_lv_style_set_text_font, lv_style_set_text_font); -/* Reusing lv_style_set_pad_all for lv_style_set_text_letter_space */ +/* Reusing lv_style_set_width for lv_style_set_text_letter_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_letter_space_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_text_letter_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_letter_space_mpobj, 2, mp_lv_style_set_width, lv_style_set_text_letter_space); -/* Reusing lv_style_set_pad_all for lv_style_set_text_line_space */ +/* Reusing lv_style_set_width for lv_style_set_text_line_space */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_line_space_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_text_line_space); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_line_space_mpobj, 2, mp_lv_style_set_width, lv_style_set_text_line_space); /* @@ -40232,17 +42736,35 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_align_mpobj, 2, mp_lv static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_color_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_text_outline_stroke_color); -/* Reusing lv_style_set_pad_all for lv_style_set_text_outline_stroke_width */ +/* Reusing lv_style_set_width for lv_style_set_text_outline_stroke_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_width_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_text_outline_stroke_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_width_mpobj, 2, mp_lv_style_set_width, lv_style_set_text_outline_stroke_width); /* Reusing lv_style_set_bg_opa for lv_style_set_text_outline_stroke_opa */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_outline_stroke_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_text_outline_stroke_opa); -/* Reusing lv_style_set_pad_all for lv_style_set_blur_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_radius_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_blur_radius); +/* + * lvgl extension definition for: + * void lv_style_set_text_leading_trim(lv_style_t *style, lv_text_leading_trim_t value) + */ + +static mp_obj_t mp_lv_style_set_text_leading_trim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_text_leading_trim_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_text_leading_trim_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_leading_trim_mpobj, 2, mp_lv_style_set_text_leading_trim, lv_style_set_text_leading_trim); + +/* Reusing lv_style_set_width for lv_style_set_blur_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_blur_radius); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_blur_backdrop */ @@ -40266,17 +42788,17 @@ static mp_obj_t mp_lv_style_set_blur_quality(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_blur_quality); -/* Reusing lv_style_set_pad_all for lv_style_set_drop_shadow_radius */ +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_drop_shadow_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_radius); -/* Reusing lv_style_set_pad_all for lv_style_set_drop_shadow_offset_x */ +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_drop_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_x); -/* Reusing lv_style_set_pad_all for lv_style_set_drop_shadow_offset_y */ +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_y); /* Reusing lv_style_set_bg_color for lv_style_set_drop_shadow_color */ @@ -40290,13 +42812,13 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_opa_mpobj, 2, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_drop_shadow_quality); -/* Reusing lv_style_set_pad_all for lv_style_set_radius */ +/* Reusing lv_style_set_width for lv_style_set_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_radius); -/* Reusing lv_style_set_pad_all for lv_style_set_radial_offset */ +/* Reusing lv_style_set_width for lv_style_set_radial_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_width, lv_style_set_radial_offset); /* Reusing lv_style_set_bg_image_tiled for lv_style_set_clip_corner */ @@ -40562,48 +43084,91 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_dsc_array_mpobj, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_row_align); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_column_pos */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_column_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_pos); /* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_x_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_x_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_x_align); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_column_span */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_column_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_span); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_row_pos */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_row_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_pos); /* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_y_align */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_y_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_y_align); -/* Reusing lv_style_set_pad_all for lv_style_set_grid_cell_row_span */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_span); + + +/* + * lvgl extension definition for: + * void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) + */ + +static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); + +/* Reusing lv_style_set_width for lv_style_set_pad_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_all); + +/* Reusing lv_style_set_width for lv_style_set_pad_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_hor); + +/* Reusing lv_style_set_width for lv_style_set_pad_ver */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_ver); + +/* Reusing lv_style_set_width for lv_style_set_pad_gap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_gap); + +/* Reusing lv_style_set_width for lv_style_set_margin_hor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_hor); + +/* Reusing lv_style_set_width for lv_style_set_margin_ver */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_pad_all, lv_style_set_grid_cell_row_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_ver); + +/* Reusing lv_style_set_width for lv_style_set_margin_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_all); + +/* Reusing lv_style_set_width for lv_style_set_transform_scale */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale); static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prop_inlined), MP_ROM_PTR(&mp_lv_style_get_prop_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_const_internal), MP_ROM_PTR(&mp_lv_style_is_const_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prop_internal), MP_ROM_PTR(&mp_lv_style_get_prop_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_style_reset_mpobj) }, { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_style_copy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_merge), MP_ROM_PTR(&mp_lv_style_merge_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, { MP_ROM_QSTR(MP_QSTR_remove_prop), MP_ROM_PTR(&mp_lv_style_remove_prop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_prop), MP_ROM_PTR(&mp_lv_style_set_prop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_prop), MP_ROM_PTR(&mp_lv_style_get_prop_mpobj) }, @@ -40695,6 +43260,7 @@ static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_leading_trim), MP_ROM_PTR(&mp_lv_style_set_text_leading_trim_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_blur_radius), MP_ROM_PTR(&mp_lv_style_set_blur_radius_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_blur_backdrop), MP_ROM_PTR(&mp_lv_style_set_blur_backdrop_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_blur_quality), MP_ROM_PTR(&mp_lv_style_set_blur_quality_mpobj) }, @@ -40736,6 +43302,15 @@ static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_pos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_grid_cell_y_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_y_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, }; @@ -40752,10 +43327,10 @@ static MP_DEFINE_CONST_DICT(mp_lv_style_value_t_locals_dict, mp_lv_style_value_t /* * lvgl extension definition for: - * void lv_observer_remove(lv_observer_t *observer) + * void lv_observer_delete(lv_observer_t *observer) */ -static mp_obj_t mp_lv_observer_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_observer_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_observer_t *observer = mp_write_ptr_lv_observer_t(mp_args[0]); ((void (*)(lv_observer_t *))lv_func_ptr)(observer); @@ -40764,7 +43339,7 @@ static mp_obj_t mp_lv_observer_remove(size_t mp_n_args, const mp_obj_t *mp_args, -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_remove_mpobj, 1, mp_lv_observer_remove, lv_observer_remove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_delete_mpobj, 1, mp_lv_observer_delete, lv_observer_delete); /* @@ -40818,18 +43393,54 @@ static mp_obj_t mp_lv_observer_get_user_data(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_get_user_data_mpobj, 1, mp_lv_observer_get_user_data, lv_observer_get_user_data); +/* + * lvgl extension definition for: + * void lv_observer_set_user_data(lv_observer_t *observer, void *user_data) + */ + +static mp_obj_t mp_lv_observer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[1]); + lv_observer_t *observer = mp_write_ptr_lv_observer_t(mp_args[0]); + ((void (*)(lv_observer_t *, void *))lv_func_ptr)(observer, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_observer_set_user_data_mpobj, 2, mp_lv_observer_set_user_data, lv_observer_set_user_data); + + static const mp_rom_map_elem_t mp_lv_observer_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_observer_t))) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_observer_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_observer_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_observer_get_target_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_observer_get_target_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_observer_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_observer_set_user_data_mpobj) }, }; static MP_DEFINE_CONST_DICT(mp_lv_observer_t_locals_dict, mp_lv_observer_t_locals_dict_table); +/* + * lvgl extension definition for: + * void lv_subject_delete(lv_subject_t *subject) + */ + +static mp_obj_t mp_lv_subject_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); + ((void (*)(lv_subject_t *))lv_func_ptr)(subject); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_delete_mpobj, 1, mp_lv_subject_delete, lv_subject_delete); + + /* * lvgl extension definition for: * void lv_subject_init_int(lv_subject_t *subject, int32_t value) @@ -40955,10 +43566,30 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_init_string_mpobj, 5, mp_lv_ /* * lvgl extension definition for: - * void lv_subject_copy_string(lv_subject_t *subject, const char *buf) + * void lv_subject_set_string_buffer_static(lv_subject_t *subject, char *buf, char *prev_buf, size_t size) + */ + +static mp_obj_t mp_lv_subject_set_string_buffer_static(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); + char *buf = (char*)convert_from_str(mp_args[1]); + char *prev_buf = (char*)convert_from_str(mp_args[2]); + size_t size = (size_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_subject_t *, char *, char *, size_t))lv_func_ptr)(subject, buf, prev_buf, size); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_set_string_buffer_static_mpobj, 4, mp_lv_subject_set_string_buffer_static, lv_subject_set_string_buffer_static); + + +/* + * lvgl extension definition for: + * void lv_subject_set_string(lv_subject_t *subject, const char *buf) */ -static mp_obj_t mp_lv_subject_copy_string(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_subject_set_string(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); const char *buf = (const char *)(char*)convert_from_str(mp_args[1]); @@ -40968,7 +43599,7 @@ static mp_obj_t mp_lv_subject_copy_string(size_t mp_n_args, const mp_obj_t *mp_a -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_copy_string_mpobj, 2, mp_lv_subject_copy_string, lv_subject_copy_string); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_set_string_mpobj, 2, mp_lv_subject_set_string, lv_subject_set_string); /* @@ -41134,22 +43765,13 @@ static mp_obj_t mp_lv_subject_init_group(size_t mp_n_args, const mp_obj_t *mp_ar static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_init_group_mpobj, 3, mp_lv_subject_init_group, lv_subject_init_group); +/* Reusing lv_subject_init_group for lv_subject_set_group_list_static */ -/* - * lvgl extension definition for: - * void lv_subject_deinit(lv_subject_t *subject) - */ - -static mp_obj_t mp_lv_subject_deinit(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_subject_t *subject = mp_write_ptr_lv_subject_t(mp_args[0]); - ((void (*)(lv_subject_t *))lv_func_ptr)(subject); - return mp_const_none; -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_set_group_list_static_mpobj, 3, mp_lv_subject_init_group, lv_subject_set_group_list_static); + +/* Reusing lv_subject_delete for lv_subject_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_deinit_mpobj, 1, mp_lv_subject_deinit, lv_subject_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_deinit_mpobj, 1, mp_lv_subject_delete, lv_subject_deinit); /* @@ -41276,13 +43898,14 @@ static mp_obj_t mp_lv_subject_add_observer_with_target(size_t mp_n_args, const m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_add_observer_with_target_mpobj, 4, mp_lv_subject_add_observer_with_target, lv_subject_add_observer_with_target); -/* Reusing lv_subject_deinit for lv_subject_notify */ +/* Reusing lv_subject_delete for lv_subject_notify */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_notify_mpobj, 1, mp_lv_subject_deinit, lv_subject_notify); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_subject_notify_mpobj, 1, mp_lv_subject_delete, lv_subject_notify); static const mp_rom_map_elem_t mp_lv_subject_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_subject_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_subject_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_int), MP_ROM_PTR(&mp_lv_subject_init_int_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_int), MP_ROM_PTR(&mp_lv_subject_set_int_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_int), MP_ROM_PTR(&mp_lv_subject_get_int_mpobj) }, @@ -41296,7 +43919,8 @@ static const mp_rom_map_elem_t mp_lv_subject_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_min_value_float), MP_ROM_PTR(&mp_lv_subject_set_min_value_float_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_max_value_float), MP_ROM_PTR(&mp_lv_subject_set_max_value_float_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_string), MP_ROM_PTR(&mp_lv_subject_init_string_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy_string), MP_ROM_PTR(&mp_lv_subject_copy_string_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_string_buffer_static), MP_ROM_PTR(&mp_lv_subject_set_string_buffer_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_string), MP_ROM_PTR(&mp_lv_subject_set_string_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_string), MP_ROM_PTR(&mp_lv_subject_get_string_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_previous_string), MP_ROM_PTR(&mp_lv_subject_get_previous_string_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_pointer), MP_ROM_PTR(&mp_lv_subject_init_pointer_mpobj) }, @@ -41308,6 +43932,7 @@ static const mp_rom_map_elem_t mp_lv_subject_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_get_color), MP_ROM_PTR(&mp_lv_subject_get_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_previous_color), MP_ROM_PTR(&mp_lv_subject_get_previous_color_mpobj) }, { MP_ROM_QSTR(MP_QSTR_init_group), MP_ROM_PTR(&mp_lv_subject_init_group_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_group_list_static), MP_ROM_PTR(&mp_lv_subject_set_group_list_static_mpobj) }, { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&mp_lv_subject_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_get_group_element), MP_ROM_PTR(&mp_lv_subject_get_group_element_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add_observer), MP_ROM_PTR(&mp_lv_subject_add_observer_mpobj) }, @@ -41965,6 +44590,14 @@ static const mp_rom_map_elem_t mp_lv_group_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_group_t_locals_dict, mp_lv_group_t_locals_dict_table); +static const mp_rom_map_elem_t mp_lv_delete_dsc_t_locals_dict_table[] = { + + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_delete_dsc_t_locals_dict, mp_lv_delete_dsc_t_locals_dict_table); + + /* * lvgl extension definition for: * void lv_anim_timeline_delete(lv_anim_timeline_t *at) @@ -42017,6 +44650,10 @@ static mp_obj_t mp_lv_anim_timeline_start(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_timeline_start_mpobj, 1, mp_lv_anim_timeline_start, lv_anim_timeline_start); +/* Reusing lv_anim_timeline_start for lv_anim_timeline_restart */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_timeline_restart_mpobj, 1, mp_lv_anim_timeline_start, lv_anim_timeline_restart); + /* Reusing lv_anim_timeline_delete for lv_anim_timeline_pause */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_timeline_pause_mpobj, 1, mp_lv_anim_timeline_delete, lv_anim_timeline_pause); @@ -42193,6 +44830,7 @@ static const mp_rom_map_elem_t mp_lv_anim_timeline_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_anim_timeline_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_anim_timeline_add_mpobj) }, { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_timeline_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_restart), MP_ROM_PTR(&mp_lv_anim_timeline_restart_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_timeline_pause_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_reverse), MP_ROM_PTR(&mp_lv_anim_timeline_set_reverse_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_timeline_set_delay_mpobj) }, @@ -42230,6 +44868,14 @@ static const mp_rom_map_elem_t mp_lv_subject_increment_dsc_t_locals_dict_table[] static MP_DEFINE_CONST_DICT(mp_lv_subject_increment_dsc_t_locals_dict, mp_lv_subject_increment_dsc_t_locals_dict_table); +static const mp_rom_map_elem_t mp_lv_obj_spec_attr_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_spec_attr_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_obj_spec_attr_t_locals_dict, mp_lv_obj_spec_attr_t_locals_dict_table); + + static const mp_rom_map_elem_t mp_lv_obj_style_transition_dsc_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_style_transition_dsc_t))) }, @@ -42430,1021 +45076,1140 @@ static const mp_rom_map_elem_t mp_lv_fs_file_cache_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_fs_file_cache_t_locals_dict, mp_lv_fs_file_cache_t_locals_dict_table); +/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_destroy */ -static const mp_rom_map_elem_t mp_lv_image_cache_data_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_cache_data_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_destroy_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_destroy); -}; +/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire */ -static MP_DEFINE_CONST_DICT(mp_lv_image_cache_data_t_locals_dict, mp_lv_image_cache_data_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire); + +/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_acquire_or_create */ -static const mp_rom_map_elem_t mp_lv_cache_slot_size_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_slot_size_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_acquire_or_create_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_acquire_or_create); -}; +/* Reusing funcptr_lv_cache_get_cb_t for lv_cache_add */ -static MP_DEFINE_CONST_DICT(mp_lv_cache_slot_size_t_locals_dict, mp_lv_cache_slot_size_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_add_mpobj, 3, mp_funcptr_lv_cache_get_cb_t, lv_cache_add); + +/* Reusing funcptr_lv_cache_remove_cb_t for lv_cache_release */ -static const mp_rom_map_elem_t mp_lv_calendar_date_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_calendar_date_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_release_mpobj, 3, mp_funcptr_lv_cache_remove_cb_t, lv_cache_release); -}; -static MP_DEFINE_CONST_DICT(mp_lv_calendar_date_t_locals_dict, mp_lv_calendar_date_t_locals_dict_table); - +/* + * lvgl extension definition for: + * void lv_cache_reserve(lv_cache_t *cache, uint32_t reserved_size, void *user_data) + */ -static const mp_rom_map_elem_t mp_lv_chart_series_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_series_t))) }, - -}; +static mp_obj_t mp_lv_cache_reserve(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + uint32_t reserved_size = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, uint32_t, void *))lv_func_ptr)(cache, reserved_size, user_data); + return mp_const_none; +} -static MP_DEFINE_CONST_DICT(mp_lv_chart_series_t_locals_dict, mp_lv_chart_series_t_locals_dict_table); - + -static const mp_rom_map_elem_t mp_lv_chart_cursor_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_cursor_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_reserve_mpobj, 3, mp_lv_cache_reserve, lv_cache_reserve); -}; +/* Reusing funcptr_lv_cache_drop_cb_t for lv_cache_drop */ -static MP_DEFINE_CONST_DICT(mp_lv_chart_cursor_t_locals_dict, mp_lv_chart_cursor_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_mpobj, 3, mp_funcptr_lv_cache_drop_cb_t, lv_cache_drop); + +/* Reusing funcptr_lv_cache_destroy_cb_t for lv_cache_drop_all */ -static const mp_rom_map_elem_t mp_lv_scale_section_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_scale_section_t))) }, - { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_drop_all_mpobj, 2, mp_funcptr_lv_cache_destroy_cb_t, lv_cache_drop_all); -}; -static MP_DEFINE_CONST_DICT(mp_lv_scale_section_t_locals_dict, mp_lv_scale_section_t_locals_dict_table); - +/* + * lvgl extension definition for: + * bool lv_cache_evict_one(lv_cache_t *cache, void *user_data) + */ + +static mp_obj_t mp_lv_cache_evict_one(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + bool _res = ((bool (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_evict_one_mpobj, 2, mp_lv_cache_evict_one, lv_cache_evict_one); + /* * lvgl extension definition for: - * void lv_span_set_text(lv_span_t *span, const char *text) + * void lv_cache_set_max_size(lv_cache_t *cache, size_t max_size, void *user_data) */ -static mp_obj_t mp_lv_span_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_set_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); - const char *text = (const char *)(char*)convert_from_str(mp_args[1]); - ((void (*)(lv_span_t *, const char *))lv_func_ptr)(span, text); + void *user_data = mp_to_ptr(mp_args[2]); + size_t max_size = (size_t)mp_obj_get_int(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, size_t, void *))lv_func_ptr)(cache, max_size, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_mpobj, 2, mp_lv_span_set_text, lv_span_set_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_max_size_mpobj, 3, mp_lv_cache_set_max_size, lv_cache_set_max_size); + + +/* + * lvgl extension definition for: + * size_t lv_cache_get_max_size(lv_cache_t *cache, void *user_data) + */ + +static mp_obj_t mp_lv_cache_get_max_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + size_t _res = ((size_t (*)(lv_cache_t *, void *))lv_func_ptr)(cache, user_data); + return mp_obj_new_int_from_uint(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_max_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_max_size); + +/* Reusing lv_cache_get_max_size for lv_cache_get_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_size); + +/* Reusing lv_cache_get_max_size for lv_cache_get_free_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_free_size_mpobj, 2, mp_lv_cache_get_max_size, lv_cache_get_free_size); + +/* Reusing funcptr_lv_cache_init_cb_t for lv_cache_is_enabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_is_enabled_mpobj, 1, mp_funcptr_lv_cache_init_cb_t, lv_cache_is_enabled); /* * Function NOT generated: - * Cannot convert ellipsis param - * void lv_span_set_text_fmt(lv_span_t *span, const char *fmt, ...) + * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * lv_cache_compare_cb_t compare_cb */ -/* Reusing lv_span_set_text for lv_span_set_text_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_static_mpobj, 2, mp_lv_span_set_text, lv_span_set_text_static); +/* + * lvgl extension definition for: + * void lv_cache_set_compare_cb(lv_cache_t *cache, lv_cache_compare_cb_t compare_cb, void *user_data) + */ + +static mp_obj_t mp_lv_cache_set_compare_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + lv_cache_compare_cb_t compare_cb = mp_to_ptr(mp_args[1]); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_compare_cb_t, void *))lv_func_ptr)(cache, compare_cb, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_compare_cb_mpobj, 3, mp_lv_cache_set_compare_cb, lv_cache_set_compare_cb); +/* + * Callback function lv_cache_set_create_cb_alloc_cb + * bool lv_cache_create_cb_t(void *node, void *user_data) + */ + +GENMPY_UNUSED static bool lv_cache_set_create_cb_alloc_cb_callback(void *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_create_cb_alloc_cb)), 2, mp_args); + return mp_obj_is_true(callback_result); +} + + /* * lvgl extension definition for: - * lv_style_t *lv_span_get_style(lv_span_t *span) + * void lv_cache_set_create_cb(lv_cache_t *cache, lv_cache_create_cb_t alloc_cb, void *user_data) */ -static mp_obj_t mp_lv_span_get_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_set_create_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); - lv_style_t * _res = ((lv_style_t *(*)(lv_span_t *))lv_func_ptr)(span); - return mp_read_ptr_lv_style_t((void*)_res); + void *user_data = mp_to_ptr(mp_args[2]); + void *alloc_cb = mp_lv_callback(mp_args[1], &lv_cache_set_create_cb_alloc_cb_callback, MP_QSTR_lv_cache_set_create_cb_alloc_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_create_cb_t, void *))lv_func_ptr)(cache, alloc_cb, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_style_mpobj, 1, mp_lv_span_get_style, lv_span_get_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_create_cb_mpobj, 3, mp_lv_cache_set_create_cb, lv_cache_set_create_cb); +/* + * Callback function lv_cache_set_free_cb_free_cb + * void lv_cache_free_cb_t(void *node, void *user_data) + */ + +GENMPY_UNUSED static void lv_cache_set_free_cb_free_cb_callback(void *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_cache_set_free_cb_free_cb)), 2, mp_args); + return; +} + + /* * lvgl extension definition for: - * const char *lv_span_get_text(lv_span_t *span) + * void lv_cache_set_free_cb(lv_cache_t *cache, lv_cache_free_cb_t free_cb, void *user_data) */ -static mp_obj_t mp_lv_span_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_set_free_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); - const char * _res = ((const char *(*)(lv_span_t *))lv_func_ptr)(span); + void *user_data = mp_to_ptr(mp_args[2]); + void *free_cb = mp_lv_callback(mp_args[1], &lv_cache_set_free_cb_free_cb_callback, MP_QSTR_lv_cache_set_free_cb_free_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + ((void (*)(lv_cache_t *, lv_cache_free_cb_t, void *))lv_func_ptr)(cache, free_cb, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_free_cb_mpobj, 3, mp_lv_cache_set_free_cb, lv_cache_set_free_cb); + + +/* + * lvgl extension definition for: + * void lv_cache_set_name(lv_cache_t *cache, const char *name) + */ + +static mp_obj_t mp_lv_cache_set_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + const char *name = (const char *)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_cache_t *, const char *))lv_func_ptr)(cache, name); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_set_name_mpobj, 2, mp_lv_cache_set_name, lv_cache_set_name); + + +/* + * lvgl extension definition for: + * const char *lv_cache_get_name(lv_cache_t *cache) + */ + +static mp_obj_t mp_lv_cache_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_cache_t *cache = mp_write_ptr_lv_cache_t(mp_args[0]); + const char * _res = ((const char *(*)(lv_cache_t *))lv_func_ptr)(cache); return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_text_mpobj, 1, mp_lv_span_get_text, lv_span_get_text); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_get_name_mpobj, 1, mp_lv_cache_get_name, lv_cache_get_name); +/* Reusing funcptr_lv_cache_iter_create_cb for lv_cache_iter_create */ -static const mp_rom_map_elem_t mp_lv_span_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_t))) }, - { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_span_set_text_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_span_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_span_set_text_static_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style), MP_ROM_PTR(&mp_lv_span_get_style_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_span_get_text_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_iter_create_mpobj, 1, mp_funcptr_lv_cache_iter_create_cb, lv_cache_iter_create); + + +static const mp_rom_map_elem_t mp_lv_cache_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_t))) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_cache_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_acquire), MP_ROM_PTR(&mp_lv_cache_acquire_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_acquire_or_create), MP_ROM_PTR(&mp_lv_cache_acquire_or_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_cache_add_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release), MP_ROM_PTR(&mp_lv_cache_release_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reserve), MP_ROM_PTR(&mp_lv_cache_reserve_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_cache_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop_all), MP_ROM_PTR(&mp_lv_cache_drop_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_evict_one), MP_ROM_PTR(&mp_lv_cache_evict_one_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_size), MP_ROM_PTR(&mp_lv_cache_set_max_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_max_size), MP_ROM_PTR(&mp_lv_cache_get_max_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_cache_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_free_size), MP_ROM_PTR(&mp_lv_cache_get_free_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_enabled), MP_ROM_PTR(&mp_lv_cache_is_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_compare_cb), MP_ROM_PTR(&mp_lv_cache_set_compare_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_create_cb), MP_ROM_PTR(&mp_lv_cache_set_create_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_free_cb), MP_ROM_PTR(&mp_lv_cache_set_free_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_name), MP_ROM_PTR(&mp_lv_cache_set_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_name), MP_ROM_PTR(&mp_lv_cache_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_cache_iter_create_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_span_t_locals_dict, mp_lv_span_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_cache_t_locals_dict, mp_lv_cache_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_span_coords_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_coords_t))) }, +/* + * lvgl extension definition for: + * lv_cache_t *lv_cache_create(const lv_cache_class_t *cache_class, size_t node_size, size_t max_size, lv_cache_ops_t ops) + */ + +static mp_obj_t mp_lv_cache_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_cache_class_t *cache_class = (const lv_cache_class_t *)mp_write_ptr_lv_cache_class_t(mp_args[0]); + size_t node_size = (size_t)mp_obj_get_int(mp_args[1]); + size_t max_size = (size_t)mp_obj_get_int(mp_args[2]); + lv_cache_ops_t ops = mp_write_lv_cache_ops_t(mp_args[3]); + lv_cache_t * _res = ((lv_cache_t *(*)(const lv_cache_class_t *, size_t, size_t, lv_cache_ops_t))lv_func_ptr)(cache_class, node_size, max_size, ops); + return mp_read_ptr_lv_cache_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_create_mpobj, 4, mp_lv_cache_create, lv_cache_create); + + +static const mp_rom_map_elem_t mp_lv_cache_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_class_t))) }, + { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_cache_create_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_span_coords_t_locals_dict, mp_lv_span_coords_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_cache_class_t_locals_dict, mp_lv_cache_class_t_locals_dict_table); /* * lvgl extension definition for: - * lv_tree_node_t *lv_tree_node_create(const lv_tree_class_t *class_p, lv_tree_node_t *parent) + * const lv_cache_t *lv_cache_entry_get_cache(const lv_cache_entry_t *entry) */ -static mp_obj_t mp_lv_tree_node_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_write_ptr_lv_tree_class_t(mp_args[0]); - lv_tree_node_t *parent = mp_write_ptr_lv_tree_node_t(mp_args[1]); - lv_tree_node_t * _res = ((lv_tree_node_t *(*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, parent); - return mp_read_ptr_lv_tree_node_t((void*)_res); + const lv_cache_entry_t *entry = (const lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(mp_args[0]); + const lv_cache_t * _res = ((const lv_cache_t *(*)(const lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_read_ptr_lv_cache_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_create_mpobj, 2, mp_lv_tree_node_create, lv_tree_node_create); - - -static const mp_rom_map_elem_t mp_lv_tree_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_class_t))) }, - { MP_ROM_QSTR(MP_QSTR_node_create), MP_ROM_PTR(&mp_lv_tree_node_create_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_cache_mpobj, 1, mp_lv_cache_entry_get_cache, lv_cache_entry_get_cache); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_tree_class_t_locals_dict, mp_lv_tree_class_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_tree_node_delete(lv_tree_node_t *node) + * void lv_cache_entry_init(lv_cache_entry_t *entry, const lv_cache_t *cache, const uint32_t node_size) */ -static mp_obj_t mp_lv_tree_node_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[0]); - ((void (*)(lv_tree_node_t *))lv_func_ptr)(node); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_cache_entry_t *, const lv_cache_t *, const uint32_t))lv_func_ptr)(entry, cache, node_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_delete_mpobj, 1, mp_lv_tree_node_delete, lv_tree_node_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_init_mpobj, 3, mp_lv_cache_entry_init, lv_cache_entry_init); /* - * Callback function lv_tree_walk_cb - * bool lv_tree_traverse_cb_t(const lv_tree_node_t *node, void *user_data) + * lvgl extension definition for: + * void lv_cache_entry_delete(lv_cache_entry_t *entry) */ -GENMPY_UNUSED static bool lv_tree_walk_cb_callback(const lv_tree_node_t *arg0, void *arg1) +static mp_obj_t mp_lv_cache_entry_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_cb)), 2, mp_args); - return mp_obj_is_true(callback_result); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + ((void (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_delete_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_delete); + /* - * Callback function lv_tree_walk_bcb - * bool lv_tree_before_cb_t(const lv_tree_node_t *node, void *user_data) + * lvgl extension definition for: + * int32_t lv_cache_entry_get_ref(lv_cache_entry_t *entry) */ -GENMPY_UNUSED static bool lv_tree_walk_bcb_callback(const lv_tree_node_t *arg0, void *arg1) +static mp_obj_t mp_lv_cache_entry_get_ref(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_bcb)), 2, mp_args); - return mp_obj_is_true(callback_result); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_ref_mpobj, 1, mp_lv_cache_entry_get_ref, lv_cache_entry_get_ref); + /* - * Callback function lv_tree_walk_acb - * void lv_tree_after_cb_t(const lv_tree_node_t *node, void *user_data) + * lvgl extension definition for: + * uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t *entry) */ -GENMPY_UNUSED static void lv_tree_walk_acb_callback(const lv_tree_node_t *arg0, void *arg1) +static mp_obj_t mp_lv_cache_entry_get_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_acb)), 2, mp_args); - return; + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return mp_obj_new_int_from_uint(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_node_size_mpobj, 1, mp_lv_cache_entry_get_node_size, lv_cache_entry_get_node_size); + /* * lvgl extension definition for: - * bool lv_tree_walk(const lv_tree_node_t *node, lv_tree_walk_mode_t mode, lv_tree_traverse_cb_t cb, lv_tree_before_cb_t bcb, lv_tree_after_cb_t acb, void *user_data) + * bool lv_cache_entry_is_invalid(lv_cache_entry_t *entry) */ -static mp_obj_t mp_lv_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_is_invalid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - lv_tree_walk_mode_t mode = (uint8_t)mp_obj_get_int(mp_args[1]); - void *cb = mp_lv_callback(mp_args[2], &lv_tree_walk_cb_callback, MP_QSTR_lv_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - void *bcb = mp_lv_callback(mp_args[3], &lv_tree_walk_bcb_callback, MP_QSTR_lv_tree_walk_bcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - void *acb = mp_lv_callback(mp_args[4], &lv_tree_walk_acb_callback, MP_QSTR_lv_tree_walk_acb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - const lv_tree_node_t *node = (const lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(mp_args[0]); - bool _res = ((bool (*)(const lv_tree_node_t *, lv_tree_walk_mode_t, lv_tree_traverse_cb_t, lv_tree_before_cb_t, lv_tree_after_cb_t, void *))lv_func_ptr)(node, mode, cb, bcb, acb, user_data); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + bool _res = ((bool (*)(lv_cache_entry_t *))lv_func_ptr)(entry); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_walk_mpobj, 6, mp_lv_tree_walk, lv_tree_walk); - - -static const mp_rom_map_elem_t mp_lv_tree_node_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_node_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_tree_node_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_walk), MP_ROM_PTR(&mp_lv_tree_walk_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_tree_node_t_locals_dict, mp_lv_tree_node_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp__lv_mp_int_wrapper_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(_lv_mp_int_wrapper))) }, - -}; - -static MP_DEFINE_CONST_DICT(mp__lv_mp_int_wrapper_locals_dict, mp__lv_mp_int_wrapper_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_font_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_class_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_is_invalid_mpobj, 1, mp_lv_cache_entry_is_invalid, lv_cache_entry_is_invalid); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_class_t_locals_dict, mp_lv_font_class_t_locals_dict_table); - /* * lvgl extension definition for: - * bool lv_font_info_is_equal(const lv_font_info_t *ft_info_1, const lv_font_info_t *ft_info_2) + * void *lv_cache_entry_get_data(lv_cache_entry_t *entry) */ -static mp_obj_t mp_lv_font_info_is_equal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_info_t *ft_info_1 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); - const lv_font_info_t *ft_info_2 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[1]); - bool _res = ((bool (*)(const lv_font_info_t *, const lv_font_info_t *))lv_func_ptr)(ft_info_1, ft_info_2); - return convert_to_bool(_res); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + void * _res = ((void *(*)(lv_cache_entry_t *))lv_func_ptr)(entry); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_info_is_equal_mpobj, 2, mp_lv_font_info_is_equal, lv_font_info_is_equal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_get_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_get_data); +/* Reusing lv_cache_entry_delete for lv_cache_entry_reset_ref */ -static const mp_rom_map_elem_t mp_lv_font_info_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_info_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_font_info_is_equal_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_reset_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_reset_ref); -}; +/* Reusing lv_cache_entry_delete for lv_cache_entry_inc_ref */ -static MP_DEFINE_CONST_DICT(mp_lv_font_info_t_locals_dict, mp_lv_font_info_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_inc_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_inc_ref); + +/* Reusing lv_cache_entry_delete for lv_cache_entry_dec_ref */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_dec_ref_mpobj, 1, mp_lv_cache_entry_delete, lv_cache_entry_dec_ref); + /* * lvgl extension definition for: - * inline static lv_color_t lv_color16_to_color(lv_color16_t c) + * void lv_cache_entry_set_node_size(lv_cache_entry_t *entry, uint32_t node_size) */ -static mp_obj_t mp_lv_color16_to_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_set_node_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color16_t c = mp_write_lv_color16_t(mp_args[0]); - lv_color_t _res = ((lv_color_t (*)(lv_color16_t))lv_func_ptr)(c); - return mp_read_lv_color_t(_res); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint32_t node_size = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_cache_entry_t *, uint32_t))lv_func_ptr)(entry, node_size); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_to_color_mpobj, 1, mp_lv_color16_to_color, lv_color16_to_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_node_size_mpobj, 2, mp_lv_cache_entry_set_node_size, lv_cache_entry_set_node_size); /* * lvgl extension definition for: - * void lv_color16_premultiply(lv_color16_t *c, lv_opa_t a) + * void lv_cache_entry_set_cache(lv_cache_entry_t *entry, const lv_cache_t *cache) */ -static mp_obj_t mp_lv_color16_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_set_cache(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color16_t *c = mp_write_ptr_lv_color16_t(mp_args[0]); - lv_opa_t a = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_color16_t *, lv_opa_t))lv_func_ptr)(c, a); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); + ((void (*)(lv_cache_entry_t *, const lv_cache_t *))lv_func_ptr)(entry, cache); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_premultiply_mpobj, 2, mp_lv_color16_premultiply, lv_color16_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_cache_mpobj, 2, mp_lv_cache_entry_set_cache, lv_cache_entry_set_cache); + +/* Reusing lv_cache_entry_get_data for lv_cache_entry_acquire_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_acquire_data_mpobj, 1, mp_lv_cache_entry_get_data, lv_cache_entry_acquire_data); /* * lvgl extension definition for: - * uint8_t lv_color16_luminance(const lv_color16_t c) + * void lv_cache_entry_release_data(lv_cache_entry_t *entry, void *user_data) */ -static mp_obj_t mp_lv_color16_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_release_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_color16_t c = (const lv_color16_t)mp_write_lv_color16_t(mp_args[0]); - uint8_t _res = ((uint8_t (*)(const lv_color16_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + ((void (*)(lv_cache_entry_t *, void *))lv_func_ptr)(entry, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_luminance_mpobj, 1, mp_lv_color16_luminance, lv_color16_luminance); - - -static const mp_rom_map_elem_t mp_lv_color16_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color16_t))) }, - { MP_ROM_QSTR(MP_QSTR_to_color), MP_ROM_PTR(&mp_lv_color16_to_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_color16_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color16_luminance_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_release_data_mpobj, 2, mp_lv_cache_entry_release_data, lv_cache_entry_release_data); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_color16_t_locals_dict, mp_lv_color16_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_mem_monitor_core(lv_mem_monitor_t *mon_p) + * void lv_cache_entry_set_flag(lv_cache_entry_t *entry, uint8_t flags) */ -static mp_obj_t mp_lv_mem_monitor_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_mem_monitor_t *mon_p = mp_write_ptr_lv_mem_monitor_t(mp_args[0]); - ((void (*)(lv_mem_monitor_t *))lv_func_ptr)(mon_p); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_core_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor_core); - -/* Reusing lv_mem_monitor_core for lv_mem_monitor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor); - - -static const mp_rom_map_elem_t mp_lv_mem_monitor_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_mem_monitor_t))) }, - { MP_ROM_QSTR(MP_QSTR_core), MP_ROM_PTR(&mp_lv_mem_monitor_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_monitor), MP_ROM_PTR(&mp_lv_mem_monitor_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_set_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_set_flag); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_mem_monitor_t_locals_dict, mp_lv_mem_monitor_t_locals_dict_table); - +/* Reusing lv_cache_entry_set_flag for lv_cache_entry_remove_flag */ -/* - * Function NOT generated: - * Callback function 'lv_rb_compare_t compare' must receive a struct pointer with user_data member as its first argument! - * lv_rb_compare_t compare - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_remove_flag_mpobj, 2, mp_lv_cache_entry_set_flag, lv_cache_entry_remove_flag); /* * lvgl extension definition for: - * bool lv_rb_init(lv_rb_t *tree, lv_rb_compare_t compare, size_t node_size) + * bool lv_cache_entry_has_flag(lv_cache_entry_t *entry, uint8_t flags) */ -static mp_obj_t mp_lv_rb_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_compare_t compare = mp_to_ptr(mp_args[1]); - size_t node_size = (size_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_rb_t *, lv_rb_compare_t, size_t))lv_func_ptr)(tree, compare, node_size); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(mp_args[0]); + uint8_t flags = (uint8_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_cache_entry_t *, uint8_t))lv_func_ptr)(entry, flags); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_init_mpobj, 3, mp_lv_rb_init, lv_rb_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_cache_entry_has_flag_mpobj, 2, mp_lv_cache_entry_has_flag, lv_cache_entry_has_flag); + + +static const mp_rom_map_elem_t mp_lv_cache_entry_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_entry_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_cache), MP_ROM_PTR(&mp_lv_cache_entry_get_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_cache_entry_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_cache_entry_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ref), MP_ROM_PTR(&mp_lv_cache_entry_get_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_node_size), MP_ROM_PTR(&mp_lv_cache_entry_get_node_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_invalid), MP_ROM_PTR(&mp_lv_cache_entry_is_invalid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_data), MP_ROM_PTR(&mp_lv_cache_entry_get_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset_ref), MP_ROM_PTR(&mp_lv_cache_entry_reset_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_inc_ref), MP_ROM_PTR(&mp_lv_cache_entry_inc_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dec_ref), MP_ROM_PTR(&mp_lv_cache_entry_dec_ref_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_node_size), MP_ROM_PTR(&mp_lv_cache_entry_set_node_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cache), MP_ROM_PTR(&mp_lv_cache_entry_set_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_acquire_data), MP_ROM_PTR(&mp_lv_cache_entry_acquire_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_data), MP_ROM_PTR(&mp_lv_cache_entry_release_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_cache_entry_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_flag), MP_ROM_PTR(&mp_lv_cache_entry_remove_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_cache_entry_has_flag_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_cache_entry_t_locals_dict, mp_lv_cache_entry_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_insert(lv_rb_t *tree, void *key) + * void *lv_iter_get_context(const lv_iter_t *iter) */ -static mp_obj_t mp_lv_rb_insert(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_get_context(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - void *key = mp_to_ptr(mp_args[1]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, void *))lv_func_ptr)(tree, key); - return mp_read_ptr_lv_rb_node_t((void*)_res); + const lv_iter_t *iter = (const lv_iter_t *)mp_write_ptr_lv_iter_t(mp_args[0]); + void * _res = ((void *(*)(const lv_iter_t *))lv_func_ptr)(iter); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_insert_mpobj, 2, mp_lv_rb_insert, lv_rb_insert); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_get_context_mpobj, 1, mp_lv_iter_get_context, lv_iter_get_context); /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_find(lv_rb_t *tree, const void *key) + * void lv_iter_destroy(lv_iter_t *iter) */ -static mp_obj_t mp_lv_rb_find(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); - return mp_read_ptr_lv_rb_node_t((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + ((void (*)(lv_iter_t *))lv_func_ptr)(iter); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_find_mpobj, 2, mp_lv_rb_find, lv_rb_find); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_destroy_mpobj, 1, mp_lv_iter_destroy, lv_iter_destroy); /* * lvgl extension definition for: - * void *lv_rb_remove_node(lv_rb_t *tree, lv_rb_node_t *node) + * lv_result_t lv_iter_next(lv_iter_t *iter, void *elem) */ -static mp_obj_t mp_lv_rb_remove_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); - void * _res = ((void *(*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); - return ptr_to_mp((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + void *elem = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_func_ptr)(iter, elem); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_node_mpobj, 2, mp_lv_rb_remove_node, lv_rb_remove_node); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_next_mpobj, 2, mp_lv_iter_next, lv_iter_next); /* * lvgl extension definition for: - * void *lv_rb_remove(lv_rb_t *tree, const void *key) + * void lv_iter_make_peekable(lv_iter_t *iter, uint32_t capacity) */ -static mp_obj_t mp_lv_rb_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_make_peekable(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - void * _res = ((void *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); - return ptr_to_mp((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_iter_t *, uint32_t))lv_func_ptr)(iter, capacity); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_mpobj, 2, mp_lv_rb_remove, lv_rb_remove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_make_peekable_mpobj, 2, mp_lv_iter_make_peekable, lv_iter_make_peekable); + +/* Reusing lv_iter_next for lv_iter_peek */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_mpobj, 2, mp_lv_iter_next, lv_iter_peek); /* * lvgl extension definition for: - * bool lv_rb_drop_node(lv_rb_t *tree, lv_rb_node_t *node) + * lv_result_t lv_iter_peek_advance(lv_iter_t *iter) */ -static mp_obj_t mp_lv_rb_drop_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_peek_advance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); - bool _res = ((bool (*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); - return convert_to_bool(_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_iter_t *))lv_func_ptr)(iter); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_node_mpobj, 2, mp_lv_rb_drop_node, lv_rb_drop_node); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_advance_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_advance); + +/* Reusing lv_iter_peek_advance for lv_iter_peek_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_peek_reset_mpobj, 1, mp_lv_iter_peek_advance, lv_iter_peek_reset); /* - * lvgl extension definition for: - * bool lv_rb_drop(lv_rb_t *tree, const void *key) + * Function NOT generated: + * Callback function 'lv_iter_inspect_cb inspect_cb' must receive a struct pointer with user_data member as its first argument! + * lv_iter_inspect_cb inspect_cb */ + +#define funcptr_lv_iter_inspect_cb NULL -static mp_obj_t mp_lv_rb_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - const void *key = (const void *)mp_to_ptr(mp_args[1]); - bool _res = ((bool (*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); - return convert_to_bool(_res); -} - - +/* Reusing funcptr_lv_draw_buf_free_cb_t for funcptr_lv_iter_inspect_cb */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_mpobj, 2, mp_lv_rb_drop, lv_rb_drop); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_inspect_cb_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_iter_inspect_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_inspect_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_inspect_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_minimum(lv_rb_t *node) + * void lv_iter_inspect(lv_iter_t *iter, lv_iter_inspect_cb inspect_cb) */ -static mp_obj_t mp_lv_rb_minimum(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_inspect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_rb_t *node = mp_write_ptr_lv_rb_t(mp_args[0]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_func_ptr)(node); - return mp_read_ptr_lv_rb_node_t((void*)_res); + lv_iter_t *iter = mp_write_ptr_lv_iter_t(mp_args[0]); + lv_iter_inspect_cb inspect_cb = mp_to_ptr(mp_args[1]); + ((void (*)(lv_iter_t *, lv_iter_inspect_cb))lv_func_ptr)(iter, inspect_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_mpobj, 1, mp_lv_rb_minimum, lv_rb_minimum); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_iter_inspect_mpobj, 2, mp_lv_iter_inspect, lv_iter_inspect); -/* Reusing lv_rb_minimum for lv_rb_maximum */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_mpobj, 1, mp_lv_rb_minimum, lv_rb_maximum); +static const mp_rom_map_elem_t mp_lv_iter_t_locals_dict_table[] = { + + { MP_ROM_QSTR(MP_QSTR_get_context), MP_ROM_PTR(&mp_lv_iter_get_context_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_iter_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_next), MP_ROM_PTR(&mp_lv_iter_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_make_peekable), MP_ROM_PTR(&mp_lv_iter_make_peekable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_iter_peek_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek_advance), MP_ROM_PTR(&mp_lv_iter_peek_advance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek_reset), MP_ROM_PTR(&mp_lv_iter_peek_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_inspect), MP_ROM_PTR(&mp_lv_iter_inspect_mpobj) }, +}; -/* - * lvgl extension definition for: - * void lv_rb_destroy(lv_rb_t *tree) - */ +static MP_DEFINE_CONST_DICT(mp_lv_iter_t_locals_dict, mp_lv_iter_t_locals_dict_table); + -static mp_obj_t mp_lv_rb_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); - ((void (*)(lv_rb_t *))lv_func_ptr)(tree); - return mp_const_none; -} +static const mp_rom_map_elem_t mp_lv_cache_ops_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_ops_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_cache_ops_t_locals_dict, mp_lv_cache_ops_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_destroy_mpobj, 1, mp_lv_rb_destroy, lv_rb_destroy); +static const mp_rom_map_elem_t mp_lv_image_cache_data_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_cache_data_t))) }, +}; -static const mp_rom_map_elem_t mp_lv_rb_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_rb_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_insert), MP_ROM_PTR(&mp_lv_rb_insert_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_find), MP_ROM_PTR(&mp_lv_rb_find_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_node), MP_ROM_PTR(&mp_lv_rb_remove_node_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_rb_remove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop_node), MP_ROM_PTR(&mp_lv_rb_drop_node_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_rb_drop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_minimum), MP_ROM_PTR(&mp_lv_rb_minimum_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_maximum), MP_ROM_PTR(&mp_lv_rb_maximum_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_rb_destroy_mpobj) }, +static MP_DEFINE_CONST_DICT(mp_lv_image_cache_data_t_locals_dict, mp_lv_image_cache_data_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_cache_slot_size_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_cache_slot_size_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_rb_t_locals_dict, mp_lv_rb_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_cache_slot_size_t_locals_dict, mp_lv_cache_slot_size_t_locals_dict_table); -/* - * lvgl extension definition for: - * lv_rb_node_t *lv_rb_minimum_from(lv_rb_node_t *node) - */ - -static mp_obj_t mp_lv_rb_minimum_from(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[0]); - lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_func_ptr)(node); - return mp_read_ptr_lv_rb_node_t((void*)_res); -} +static const mp_rom_map_elem_t mp_lv_calendar_date_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_calendar_date_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_calendar_date_t_locals_dict, mp_lv_calendar_date_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_minimum_from); +static const mp_rom_map_elem_t mp_lv_chart_series_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_series_t))) }, -/* Reusing lv_rb_minimum_from for lv_rb_maximum_from */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_maximum_from); +static MP_DEFINE_CONST_DICT(mp_lv_chart_series_t_locals_dict, mp_lv_chart_series_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_chart_cursor_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_chart_cursor_t))) }, +}; -static const mp_rom_map_elem_t mp_lv_rb_node_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_node_t))) }, - { MP_ROM_QSTR(MP_QSTR_minimum_from), MP_ROM_PTR(&mp_lv_rb_minimum_from_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_maximum_from), MP_ROM_PTR(&mp_lv_rb_maximum_from_mpobj) }, +static MP_DEFINE_CONST_DICT(mp_lv_chart_cursor_t_locals_dict, mp_lv_chart_cursor_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_scale_section_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_scale_section_t))) }, + { MP_ROM_QSTR(MP_QSTR_set_range), MP_ROM_PTR(&mp_lv_scale_section_set_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_style), MP_ROM_PTR(&mp_lv_scale_section_set_style_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_rb_node_t_locals_dict, mp_lv_rb_node_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_scale_section_t_locals_dict, mp_lv_scale_section_t_locals_dict_table); /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_resize(lv_circle_buf_t *circle_buf, uint32_t capacity) + * void lv_span_set_text(lv_span_t *span, const char *text) */ -static mp_obj_t mp_lv_circle_buf_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_span_set_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, uint32_t))lv_func_ptr)(circle_buf, capacity); - return mp_obj_new_int(_res); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); + const char *text = (const char *)(char*)convert_from_str(mp_args[1]); + ((void (*)(lv_span_t *, const char *))lv_func_ptr)(span, text); + return mp_const_none; } - + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_mpobj, 2, mp_lv_span_set_text, lv_span_set_text); + + +/* + * Function NOT generated: + * Cannot convert ellipsis param + * void lv_span_set_text_fmt(lv_span_t *span, const char *fmt, ...) + */ + +/* Reusing lv_span_set_text for lv_span_set_text_static */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_resize_mpobj, 2, mp_lv_circle_buf_resize, lv_circle_buf_resize); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_set_text_static_mpobj, 2, mp_lv_span_set_text, lv_span_set_text_static); /* * lvgl extension definition for: - * void lv_circle_buf_destroy(lv_circle_buf_t *circle_buf) + * lv_style_t *lv_span_get_style(lv_span_t *span) */ -static mp_obj_t mp_lv_circle_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_span_get_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - ((void (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return mp_const_none; + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); + lv_style_t * _res = ((lv_style_t *(*)(lv_span_t *))lv_func_ptr)(span); + return mp_read_ptr_lv_style_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_destroy_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_style_mpobj, 1, mp_lv_span_get_style, lv_span_get_style); /* * lvgl extension definition for: - * uint32_t lv_circle_buf_size(const lv_circle_buf_t *circle_buf) + * const char *lv_span_get_text(lv_span_t *span) */ -static mp_obj_t mp_lv_circle_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_span_get_text(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return mp_obj_new_int_from_uint(_res); + lv_span_t *span = mp_write_ptr_lv_span_t(mp_args[0]); + const char * _res = ((const char *(*)(lv_span_t *))lv_func_ptr)(span); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_size_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_size); - -/* Reusing lv_circle_buf_size for lv_circle_buf_capacity */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_capacity_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_capacity); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_span_get_text_mpobj, 1, mp_lv_span_get_text, lv_span_get_text); -/* Reusing lv_circle_buf_size for lv_circle_buf_remain */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_remain_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_remain); +static const mp_rom_map_elem_t mp_lv_span_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_t))) }, + { MP_ROM_QSTR(MP_QSTR_set_text), MP_ROM_PTR(&mp_lv_span_set_text_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_static), MP_ROM_PTR(&mp_lv_span_set_text_static_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_style), MP_ROM_PTR(&mp_lv_span_get_style_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_text), MP_ROM_PTR(&mp_lv_span_get_text_mpobj) }, +}; -/* - * lvgl extension definition for: - * bool lv_circle_buf_is_empty(const lv_circle_buf_t *circle_buf) - */ +static MP_DEFINE_CONST_DICT(mp_lv_span_t_locals_dict, mp_lv_span_t_locals_dict_table); + -static mp_obj_t mp_lv_circle_buf_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - bool _res = ((bool (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return convert_to_bool(_res); -} +static const mp_rom_map_elem_t mp_lv_span_coords_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_span_coords_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_span_coords_t_locals_dict, mp_lv_span_coords_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_empty_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_empty); +static const mp_rom_map_elem_t mp__lv_mp_int_wrapper_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(_lv_mp_int_wrapper))) }, -/* Reusing lv_circle_buf_is_empty for lv_circle_buf_is_full */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_full_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_full); - -/* Reusing lv_circle_buf_destroy for lv_circle_buf_reset */ +static MP_DEFINE_CONST_DICT(mp__lv_mp_int_wrapper_locals_dict, mp__lv_mp_int_wrapper_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_reset_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_reset); +static const mp_rom_map_elem_t mp_lv_font_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_class_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_font_class_t_locals_dict, mp_lv_font_class_t_locals_dict_table); + /* * lvgl extension definition for: - * void *lv_circle_buf_head(const lv_circle_buf_t *circle_buf) + * bool lv_font_info_is_equal(const lv_font_info_t *ft_info_1, const lv_font_info_t *ft_info_2) */ -static mp_obj_t mp_lv_circle_buf_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_info_is_equal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - void * _res = ((void *(*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return ptr_to_mp((void*)_res); + const lv_font_info_t *ft_info_1 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[0]); + const lv_font_info_t *ft_info_2 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(mp_args[1]); + bool _res = ((bool (*)(const lv_font_info_t *, const lv_font_info_t *))lv_func_ptr)(ft_info_1, ft_info_2); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_head_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_head); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_info_is_equal_mpobj, 2, mp_lv_font_info_is_equal, lv_font_info_is_equal); -/* Reusing lv_circle_buf_head for lv_circle_buf_tail */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_tail_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_tail); +static const mp_rom_map_elem_t mp_lv_font_info_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_info_t))) }, + { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_font_info_is_equal_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_font_info_t_locals_dict, mp_lv_font_info_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_read(lv_circle_buf_t *circle_buf, void *data) + * lv_tree_node_t *lv_tree_node_create(const lv_tree_class_t *class_p, lv_tree_node_t *parent) */ -static mp_obj_t mp_lv_circle_buf_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tree_node_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - void *data = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); - return mp_obj_new_int(_res); + const lv_tree_class_t *class_p = (const lv_tree_class_t *)mp_write_ptr_lv_tree_class_t(mp_args[0]); + lv_tree_node_t *parent = mp_write_ptr_lv_tree_node_t(mp_args[1]); + lv_tree_node_t * _res = ((lv_tree_node_t *(*)(const lv_tree_class_t *, lv_tree_node_t *))lv_func_ptr)(class_p, parent); + return mp_read_ptr_lv_tree_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_read_mpobj, 2, mp_lv_circle_buf_read, lv_circle_buf_read); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_create_mpobj, 2, mp_lv_tree_node_create, lv_tree_node_create); +static const mp_rom_map_elem_t mp_lv_tree_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_class_t))) }, + { MP_ROM_QSTR(MP_QSTR_node_create), MP_ROM_PTR(&mp_lv_tree_node_create_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_tree_class_t_locals_dict, mp_lv_tree_class_t_locals_dict_table); + + /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_write(lv_circle_buf_t *circle_buf, const void *data) + * void lv_tree_node_delete(lv_tree_node_t *node) */ -static mp_obj_t mp_lv_circle_buf_write(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tree_node_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - const void *data = (const void *)mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, const void *))lv_func_ptr)(circle_buf, data); - return mp_obj_new_int(_res); + lv_tree_node_t *node = mp_write_ptr_lv_tree_node_t(mp_args[0]); + ((void (*)(lv_tree_node_t *))lv_func_ptr)(node); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_write_mpobj, 2, mp_lv_circle_buf_write, lv_circle_buf_write); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_node_delete_mpobj, 1, mp_lv_tree_node_delete, lv_tree_node_delete); /* - * Callback function lv_circle_buf_fill_fill_cb - * bool lv_circle_buf_fill_cb_t(void *buf, uint32_t buff_len, int32_t index, void *user_data) + * Callback function lv_tree_walk_cb + * bool lv_tree_traverse_cb_t(const lv_tree_node_t *node, void *user_data) */ -GENMPY_UNUSED static bool lv_circle_buf_fill_fill_cb_callback(void *arg0, uint32_t arg1, int32_t arg2, void *arg3) +GENMPY_UNUSED static bool lv_tree_walk_cb_callback(const lv_tree_node_t *arg0, void *arg1) { - mp_obj_t mp_args[4]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_args[1] = mp_obj_new_int_from_uint(arg1); - mp_args[2] = mp_obj_new_int(arg2); - mp_args[3] = ptr_to_mp((void*)arg3); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg3); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_circle_buf_fill_fill_cb)), 4, mp_args); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_cb)), 2, mp_args); return mp_obj_is_true(callback_result); } /* - * lvgl extension definition for: - * uint32_t lv_circle_buf_fill(lv_circle_buf_t *circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, void *user_data) - */ - -static mp_obj_t mp_lv_circle_buf_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *user_data = mp_to_ptr(mp_args[3]); - uint32_t count = (uint32_t)mp_obj_get_int(mp_args[1]); - void *fill_cb = mp_lv_callback(mp_args[2], &lv_circle_buf_fill_fill_cb_callback, MP_QSTR_lv_circle_buf_fill_fill_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_circle_buf_t *, uint32_t, lv_circle_buf_fill_cb_t, void *))lv_func_ptr)(circle_buf, count, fill_cb, user_data); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_fill_mpobj, 4, mp_lv_circle_buf_fill, lv_circle_buf_fill); - - -/* - * lvgl extension definition for: - * lv_result_t lv_circle_buf_skip(lv_circle_buf_t *circle_buf) + * Callback function lv_tree_walk_bcb + * bool lv_tree_before_cb_t(const lv_tree_node_t *node, void *user_data) */ -static mp_obj_t mp_lv_circle_buf_skip(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static bool lv_tree_walk_bcb_callback(const lv_tree_node_t *arg0, void *arg1) { - lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); - return mp_obj_new_int(_res); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_bcb)), 2, mp_args); + return mp_obj_is_true(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_skip_mpobj, 1, mp_lv_circle_buf_skip, lv_circle_buf_skip); - /* - * lvgl extension definition for: - * lv_result_t lv_circle_buf_peek(const lv_circle_buf_t *circle_buf, void *data) + * Callback function lv_tree_walk_acb + * void lv_tree_after_cb_t(const lv_tree_node_t *node, void *user_data) */ -static mp_obj_t mp_lv_circle_buf_peek(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_tree_walk_acb_callback(const lv_tree_node_t *arg0, void *arg1) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - void *data = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); - return mp_obj_new_int(_res); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_tree_node_t((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_tree_walk_acb)), 2, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_mpobj, 2, mp_lv_circle_buf_peek, lv_circle_buf_peek); - /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t *circle_buf, uint32_t index, void *data) + * bool lv_tree_walk(const lv_tree_node_t *node, lv_tree_walk_mode_t mode, lv_tree_traverse_cb_t cb, lv_tree_before_cb_t bcb, lv_tree_after_cb_t acb, void *user_data) */ -static mp_obj_t mp_lv_circle_buf_peek_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - void *data = mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, uint32_t, void *))lv_func_ptr)(circle_buf, index, data); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[5]); + lv_tree_walk_mode_t mode = (uint8_t)mp_obj_get_int(mp_args[1]); + void *cb = mp_lv_callback(mp_args[2], &lv_tree_walk_cb_callback, MP_QSTR_lv_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + void *bcb = mp_lv_callback(mp_args[3], &lv_tree_walk_bcb_callback, MP_QSTR_lv_tree_walk_bcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + void *acb = mp_lv_callback(mp_args[4], &lv_tree_walk_acb_callback, MP_QSTR_lv_tree_walk_acb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + const lv_tree_node_t *node = (const lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(mp_args[0]); + bool _res = ((bool (*)(const lv_tree_node_t *, lv_tree_walk_mode_t, lv_tree_traverse_cb_t, lv_tree_before_cb_t, lv_tree_after_cb_t, void *))lv_func_ptr)(node, mode, cb, bcb, acb, user_data); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_at_mpobj, 3, mp_lv_circle_buf_peek_at, lv_circle_buf_peek_at); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_tree_walk_mpobj, 6, mp_lv_tree_walk, lv_tree_walk); -static const mp_rom_map_elem_t mp_lv_circle_buf_t_locals_dict_table[] = { - - { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_circle_buf_resize_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_circle_buf_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_circle_buf_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_circle_buf_capacity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remain), MP_ROM_PTR(&mp_lv_circle_buf_remain_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_circle_buf_is_empty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_circle_buf_is_full_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_circle_buf_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_head), MP_ROM_PTR(&mp_lv_circle_buf_head_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tail), MP_ROM_PTR(&mp_lv_circle_buf_tail_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_circle_buf_read_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_lv_circle_buf_write_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fill), MP_ROM_PTR(&mp_lv_circle_buf_fill_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_skip), MP_ROM_PTR(&mp_lv_circle_buf_skip_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_circle_buf_peek_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_peek_at), MP_ROM_PTR(&mp_lv_circle_buf_peek_at_mpobj) }, +static const mp_rom_map_elem_t mp_lv_tree_node_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_tree_node_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_tree_node_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_walk), MP_ROM_PTR(&mp_lv_tree_walk_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_circle_buf_t_locals_dict, mp_lv_circle_buf_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_tree_node_t_locals_dict, mp_lv_tree_node_t_locals_dict_table); /* * lvgl extension definition for: - * uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void *user_data) + * inline static lv_color_t lv_color16_to_color(lv_color16_t c) */ -static mp_obj_t mp_lv_layout_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color16_to_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_layout_callbacks_t callbacks = mp_write_lv_layout_callbacks_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_layout_callbacks_t, void *))lv_func_ptr)(callbacks, user_data); - return mp_obj_new_int_from_uint(_res); + lv_color16_t c = mp_write_lv_color16_t(mp_args[0]); + lv_color_t _res = ((lv_color_t (*)(lv_color16_t))lv_func_ptr)(c); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_create_mpobj, 2, mp_lv_layout_create, lv_layout_create); - - -static const mp_rom_map_elem_t mp_lv_layout_callbacks_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layout_callbacks_t))) }, - { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_layout_create_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_to_color_mpobj, 1, mp_lv_color16_to_color, lv_color16_to_color); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_layout_callbacks_t_locals_dict, mp_lv_layout_callbacks_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_fs_make_path_from_buffer(lv_fs_path_ex_t *path, char letter, const void *buf, uint32_t size, const char *ext) + * void lv_color16_premultiply(lv_color16_t *c, lv_opa_t a) */ -static mp_obj_t mp_lv_fs_make_path_from_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color16_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); - char letter = (char)mp_obj_get_int(mp_args[1]); - const void *buf = (const void *)mp_to_ptr(mp_args[2]); - uint32_t size = (uint32_t)mp_obj_get_int(mp_args[3]); - const char *ext = (const char *)(char*)convert_from_str(mp_args[4]); - ((void (*)(lv_fs_path_ex_t *, char, const void *, uint32_t, const char *))lv_func_ptr)(path, letter, buf, size, ext); + lv_color16_t *c = mp_write_ptr_lv_color16_t(mp_args[0]); + lv_opa_t a = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_color16_t *, lv_opa_t))lv_func_ptr)(c, a); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_make_path_from_buffer_mpobj, 5, mp_lv_fs_make_path_from_buffer, lv_fs_make_path_from_buffer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_premultiply_mpobj, 2, mp_lv_color16_premultiply, lv_color16_premultiply); /* * lvgl extension definition for: - * lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t *path, void **buffer, uint32_t *size) + * uint8_t lv_color16_luminance(const lv_color16_t c) */ -static mp_obj_t mp_lv_fs_get_buffer_from_path(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color16_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); - void **buffer = mp_to_ptr(mp_args[1]); - uint32_t *size = mp_array_to_u32ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_fs_path_ex_t *, void **, uint32_t *))lv_func_ptr)(path, buffer, size); - return mp_obj_new_int(_res); + const lv_color16_t c = (const lv_color16_t)mp_write_lv_color16_t(mp_args[0]); + uint8_t _res = ((uint8_t (*)(const lv_color16_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_get_buffer_from_path_mpobj, 3, mp_lv_fs_get_buffer_from_path, lv_fs_get_buffer_from_path); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color16_luminance_mpobj, 1, mp_lv_color16_luminance, lv_color16_luminance); -static const mp_rom_map_elem_t mp_lv_fs_path_ex_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_path_ex_t))) }, - { MP_ROM_QSTR(MP_QSTR_make_path_from_buffer), MP_ROM_PTR(&mp_lv_fs_make_path_from_buffer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_buffer_from_path), MP_ROM_PTR(&mp_lv_fs_get_buffer_from_path_mpobj) }, +static const mp_rom_map_elem_t mp_lv_color16_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color16_t))) }, + { MP_ROM_QSTR(MP_QSTR_to_color), MP_ROM_PTR(&mp_lv_color16_to_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_color16_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color16_luminance_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_fs_path_ex_t_locals_dict, mp_lv_fs_path_ex_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_color16_t_locals_dict, mp_lv_color16_t_locals_dict_table); /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t *rddir_p, const char *path) + * void lv_mem_monitor_core(lv_mem_monitor_t *mon_p) */ -static mp_obj_t mp_lv_fs_dir_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_mem_monitor_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); - const char *path = (const char *)(char*)convert_from_str(mp_args[1]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, const char *))lv_func_ptr)(rddir_p, path); - return mp_obj_new_int(_res); + lv_mem_monitor_t *mon_p = mp_write_ptr_lv_mem_monitor_t(mp_args[0]); + ((void (*)(lv_mem_monitor_t *))lv_func_ptr)(mon_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_open_mpobj, 2, mp_lv_fs_dir_open, lv_fs_dir_open); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_core_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor_core); +/* Reusing lv_mem_monitor_core for lv_mem_monitor */ -/* - * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t *rddir_p, char *fn, uint32_t fn_len) - */ - -static mp_obj_t mp_lv_fs_dir_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); - char *fn = (char*)convert_from_str(mp_args[1]); - uint32_t fn_len = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, char *, uint32_t))lv_func_ptr)(rddir_p, fn, fn_len); - return mp_obj_new_int(_res); -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_mem_monitor_mpobj, 1, mp_lv_mem_monitor_core, lv_mem_monitor); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_read_mpobj, 3, mp_lv_fs_dir_read, lv_fs_dir_read); +static const mp_rom_map_elem_t mp_lv_mem_monitor_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_mem_monitor_t))) }, + { MP_ROM_QSTR(MP_QSTR_core), MP_ROM_PTR(&mp_lv_mem_monitor_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_monitor), MP_ROM_PTR(&mp_lv_mem_monitor_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_mem_monitor_t_locals_dict, mp_lv_mem_monitor_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t *rddir_p) + * uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void *user_data) */ -static mp_obj_t mp_lv_fs_dir_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_layout_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); - lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *))lv_func_ptr)(rddir_p); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_layout_callbacks_t callbacks = mp_write_lv_layout_callbacks_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_layout_callbacks_t, void *))lv_func_ptr)(callbacks, user_data); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_close_mpobj, 1, mp_lv_fs_dir_close, lv_fs_dir_close); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_create_mpobj, 2, mp_lv_layout_create, lv_layout_create); -static const mp_rom_map_elem_t mp_lv_fs_dir_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_dir_t))) }, - { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_fs_dir_open_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_fs_dir_read_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_fs_dir_close_mpobj) }, +static const mp_rom_map_elem_t mp_lv_layout_callbacks_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layout_callbacks_t))) }, + { MP_ROM_QSTR(MP_QSTR_create), MP_ROM_PTR(&mp_lv_layout_create_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_fs_dir_t_locals_dict, mp_lv_fs_dir_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_layout_callbacks_t_locals_dict, mp_lv_layout_callbacks_t_locals_dict_table); /* @@ -43577,6 +46342,121 @@ static const mp_rom_map_elem_t mp_lv_draw_glyph_dsc_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_draw_glyph_dsc_t_locals_dict, mp_lv_draw_glyph_dsc_t_locals_dict_table); +/* + * lvgl extension definition for: + * void lv_fs_make_path_from_buffer(lv_fs_path_ex_t *path, char letter, const void *buf, uint32_t size, const char *ext) + */ + +static mp_obj_t mp_lv_fs_make_path_from_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); + char letter = (char)mp_obj_get_int(mp_args[1]); + const void *buf = (const void *)mp_to_ptr(mp_args[2]); + uint32_t size = (uint32_t)mp_obj_get_int(mp_args[3]); + const char *ext = (const char *)(char*)convert_from_str(mp_args[4]); + ((void (*)(lv_fs_path_ex_t *, char, const void *, uint32_t, const char *))lv_func_ptr)(path, letter, buf, size, ext); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_make_path_from_buffer_mpobj, 5, mp_lv_fs_make_path_from_buffer, lv_fs_make_path_from_buffer); + + +/* + * lvgl extension definition for: + * lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t *path, void **buffer, uint32_t *size) + */ + +static mp_obj_t mp_lv_fs_get_buffer_from_path(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_path_ex_t *path = mp_write_ptr_lv_fs_path_ex_t(mp_args[0]); + void **buffer = mp_to_ptr(mp_args[1]); + uint32_t *size = mp_array_to_u32ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_fs_path_ex_t *, void **, uint32_t *))lv_func_ptr)(path, buffer, size); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_get_buffer_from_path_mpobj, 3, mp_lv_fs_get_buffer_from_path, lv_fs_get_buffer_from_path); + + +static const mp_rom_map_elem_t mp_lv_fs_path_ex_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_path_ex_t))) }, + { MP_ROM_QSTR(MP_QSTR_make_path_from_buffer), MP_ROM_PTR(&mp_lv_fs_make_path_from_buffer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_buffer_from_path), MP_ROM_PTR(&mp_lv_fs_get_buffer_from_path_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_fs_path_ex_t_locals_dict, mp_lv_fs_path_ex_t_locals_dict_table); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t *rddir_p, const char *path) + */ + +static mp_obj_t mp_lv_fs_dir_open(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); + const char *path = (const char *)(char*)convert_from_str(mp_args[1]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, const char *))lv_func_ptr)(rddir_p, path); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_open_mpobj, 2, mp_lv_fs_dir_open, lv_fs_dir_open); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t *rddir_p, char *fn, uint32_t fn_len) + */ + +static mp_obj_t mp_lv_fs_dir_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); + char *fn = (char*)convert_from_str(mp_args[1]); + uint32_t fn_len = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, char *, uint32_t))lv_func_ptr)(rddir_p, fn, fn_len); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_read_mpobj, 3, mp_lv_fs_dir_read, lv_fs_dir_read); + + +/* + * lvgl extension definition for: + * lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t *rddir_p) + */ + +static mp_obj_t mp_lv_fs_dir_close(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_fs_dir_t *rddir_p = mp_write_ptr_lv_fs_dir_t(mp_args[0]); + lv_fs_res_t _res = ((lv_fs_res_t (*)(lv_fs_dir_t *))lv_func_ptr)(rddir_p); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_fs_dir_close_mpobj, 1, mp_lv_fs_dir_close, lv_fs_dir_close); + + +static const mp_rom_map_elem_t mp_lv_fs_dir_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_fs_dir_t))) }, + { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_lv_fs_dir_open_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_fs_dir_read_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_close), MP_ROM_PTR(&mp_lv_fs_dir_close_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_fs_dir_t_locals_dict, mp_lv_fs_dir_t_locals_dict_table); + + /* * lvgl extension definition for: * void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t *draw_dsc) @@ -43772,6 +46652,10 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_long_press_time_mpobj, 2, static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_long_press_repeat_time_mpobj, 2, mp_lv_indev_set_long_press_time, lv_indev_set_long_press_repeat_time); +/* Reusing lv_indev_set_long_press_time for lv_indev_set_double_click_time */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_double_click_time_mpobj, 2, mp_lv_indev_set_long_press_time, lv_indev_set_double_click_time); + /* * lvgl extension definition for: @@ -44176,7 +47060,7 @@ GENMPY_UNUSED static void lv_indev_add_event_cb_event_cb_callback(lv_event_t *ar /* * lvgl extension definition for: - * void lv_indev_add_event_cb(lv_indev_t *indev, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * lv_event_dsc_t *lv_indev_add_event_cb(lv_indev_t *indev, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ static mp_obj_t mp_lv_indev_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -44185,8 +47069,8 @@ static mp_obj_t mp_lv_indev_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_ar void *event_cb = mp_lv_callback(mp_args[1], &lv_indev_add_event_cb_event_cb_callback, MP_QSTR_lv_indev_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); lv_indev_t *indev = mp_write_ptr_lv_indev_t(mp_args[0]); - ((void (*)(lv_indev_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(indev, event_cb, filter, user_data); - return mp_const_none; + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_indev_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(indev, event_cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } @@ -44333,6 +47217,18 @@ static mp_obj_t mp_lv_indev_set_key_remap_cb(size_t mp_n_args, const mp_obj_t *m static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_key_remap_cb_mpobj, 2, mp_lv_indev_set_key_remap_cb, lv_indev_set_key_remap_cb); +/* Reusing lv_indev_delete for lv_indev_set_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_set_ccw_mpobj, 1, mp_lv_indev_delete, lv_indev_set_ccw); + +/* Reusing lv_indev_delete for lv_indev_clear_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_clear_ccw_mpobj, 1, mp_lv_indev_delete, lv_indev_clear_ccw); + +/* Reusing lv_indev_get_press_moved for lv_indev_get_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_get_ccw_mpobj, 1, mp_lv_indev_get_press_moved, lv_indev_get_ccw); + /* Reusing lv_indev_delete for lv_indev_gesture_init */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_gesture_init_mpobj, 1, mp_lv_indev_delete, lv_indev_gesture_init); @@ -44430,6 +47326,7 @@ static const mp_rom_map_elem_t mp_lv_indev_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_set_display), MP_ROM_PTR(&mp_lv_indev_set_display_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_long_press_time), MP_ROM_PTR(&mp_lv_indev_set_long_press_time_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_long_press_repeat_time), MP_ROM_PTR(&mp_lv_indev_set_long_press_repeat_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_double_click_time), MP_ROM_PTR(&mp_lv_indev_set_double_click_time_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_scroll_limit), MP_ROM_PTR(&mp_lv_indev_set_scroll_limit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_scroll_throw), MP_ROM_PTR(&mp_lv_indev_set_scroll_throw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_gesture_min_velocity), MP_ROM_PTR(&mp_lv_indev_set_gesture_min_velocity_mpobj) }, @@ -44467,6 +47364,9 @@ static const mp_rom_map_elem_t mp_lv_indev_t_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_indev_remove_event_cb_with_user_data_mpobj) }, { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_indev_send_event_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_key_remap_cb), MP_ROM_PTR(&mp_lv_indev_set_key_remap_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ccw), MP_ROM_PTR(&mp_lv_indev_set_ccw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_ccw), MP_ROM_PTR(&mp_lv_indev_clear_ccw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_ccw), MP_ROM_PTR(&mp_lv_indev_get_ccw_mpobj) }, { MP_ROM_QSTR(MP_QSTR_gesture_init), MP_ROM_PTR(&mp_lv_indev_gesture_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_pinch_up_threshold), MP_ROM_PTR(&mp_lv_indev_set_pinch_up_threshold_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_pinch_down_threshold), MP_ROM_PTR(&mp_lv_indev_set_pinch_down_threshold_mpobj) }, @@ -44593,15 +47493,23 @@ static MP_DEFINE_CONST_DICT(mp_lv_indev_gesture_recognizer_t_locals_dict, mp_lv_ static const mp_rom_map_elem_t mp_lv_indev_gesture_t_locals_dict_table[] = { - + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_indev_gesture_t))) }, }; static MP_DEFINE_CONST_DICT(mp_lv_indev_gesture_t_locals_dict, mp_lv_indev_gesture_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_indev_gesture_configuration_t_locals_dict_table[] = { +static const mp_rom_map_elem_t mp_lv_indev_gesture_motion_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_indev_gesture_motion_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_indev_gesture_motion_t_locals_dict, mp_lv_indev_gesture_motion_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_indev_gesture_configuration_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_indev_gesture_configuration_t))) }, }; @@ -44642,6 +47550,66 @@ static const mp_rom_map_elem_t mp_lv_draw_mask_rect_dsc_t_locals_dict_table[] = static MP_DEFINE_CONST_DICT(mp_lv_draw_mask_rect_dsc_t_locals_dict, mp_lv_draw_mask_rect_dsc_t_locals_dict_table); +/* + * lvgl extension definition for: + * lv_font_t *lv_binfont_create_ex(const lv_binfont_dsc_t *dsc) + */ + +static mp_obj_t mp_lv_binfont_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_binfont_dsc_t *dsc = (const lv_binfont_dsc_t *)mp_write_ptr_lv_binfont_dsc_t(mp_args[0]); + lv_font_t * _res = ((lv_font_t *(*)(const lv_binfont_dsc_t *))lv_func_ptr)(dsc); + return mp_read_ptr_lv_font_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_binfont_create_ex_mpobj, 1, mp_lv_binfont_create_ex, lv_binfont_create_ex); + + +static const mp_rom_map_elem_t mp_lv_binfont_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_binfont_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_binfont_create_ex_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_binfont_dsc_t_locals_dict, mp_lv_binfont_dsc_t_locals_dict_table); + + +/* + * lvgl extension definition for: + * bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t *handler) + */ + +static mp_obj_t mp_lv_draw_sw_register_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_sw_custom_blend_handler_t *handler = mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_args[0]); + bool _res = ((bool (*)(lv_draw_sw_custom_blend_handler_t *))lv_func_ptr)(handler); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_register_blend_handler_mpobj, 1, mp_lv_draw_sw_register_blend_handler, lv_draw_sw_register_blend_handler); + + +static const mp_rom_map_elem_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_custom_blend_handler_t))) }, + { MP_ROM_QSTR(MP_QSTR_register_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_register_blend_handler_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_custom_blend_handler_t_locals_dict, mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_draw_sw_blend_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_dsc_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_dsc_t_locals_dict, mp_lv_draw_sw_blend_dsc_t_locals_dict_table); + + /* * lvgl extension definition for: * void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t *param, int32_t p1x, int32_t p1y, int32_t p2x, int32_t p2y, lv_draw_sw_mask_line_side_t side) @@ -44751,7 +47719,7 @@ static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_mask_angle_param_cfg_t_locals_dict, mp /* * lvgl extension definition for: - * void lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t *param, const lv_area_t *rect, int32_t radius, bool inv) + * lv_result_t lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t *param, const lv_area_t *rect, int32_t radius, bool inv) */ static mp_obj_t mp_lv_draw_sw_mask_radius_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) @@ -44760,8 +47728,8 @@ static mp_obj_t mp_lv_draw_sw_mask_radius_init(size_t mp_n_args, const mp_obj_t const lv_area_t *rect = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); bool inv = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_draw_sw_mask_radius_param_t *, const lv_area_t *, int32_t, bool))lv_func_ptr)(param, rect, radius, inv); - return mp_const_none; + lv_result_t _res = ((lv_result_t (*)(lv_draw_sw_mask_radius_param_t *, const lv_area_t *, int32_t, bool))lv_func_ptr)(param, rect, radius, inv); + return mp_obj_new_int(_res); } @@ -44871,1019 +47839,1268 @@ static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_mask_map_param_cfg_t_locals_dict, mp_l /* * lvgl extension definition for: - * bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t *handler) + * void lv_draw_sw_blend_color_to_a8(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static mp_obj_t mp_lv_draw_sw_register_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blend_color_to_a8(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_sw_custom_blend_handler_t *handler = mp_write_ptr_lv_draw_sw_custom_blend_handler_t(mp_args[0]); - bool _res = ((bool (*)(lv_draw_sw_custom_blend_handler_t *))lv_func_ptr)(handler); - return convert_to_bool(_res); + lv_draw_sw_blend_fill_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(mp_args[0]); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_register_blend_handler_mpobj, 1, mp_lv_draw_sw_register_blend_handler, lv_draw_sw_register_blend_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_a8_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_a8); +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_al88 */ -static const mp_rom_map_elem_t mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_custom_blend_handler_t))) }, - { MP_ROM_QSTR(MP_QSTR_register_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_register_blend_handler_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_al88_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_al88); -}; +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_argb8888 */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_custom_blend_handler_t_locals_dict, mp_lv_draw_sw_custom_blend_handler_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_argb8888_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_argb8888); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_argb8888_premultiplied */ -static const mp_rom_map_elem_t mp_lv_draw_sw_blend_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_dsc_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_argb8888_premultiplied_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_argb8888_premultiplied); -}; +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_i1 */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_dsc_t_locals_dict, mp_lv_draw_sw_blend_dsc_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_i1_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_i1); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_l8 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_l8_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_l8); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_rgb565 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_rgb565_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_rgb565); + +/* Reusing lv_draw_sw_blend_color_to_a8 for lv_draw_sw_blend_color_to_rgb565_swapped */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_rgb565_swapped_mpobj, 1, mp_lv_draw_sw_blend_color_to_a8, lv_draw_sw_blend_color_to_rgb565_swapped); + /* * lvgl extension definition for: - * void lv_text_attributes_init(lv_text_attributes_t *attributes) + * void lv_draw_sw_blend_color_to_rgb888(lv_draw_sw_blend_fill_dsc_t *dsc, uint32_t dest_px_size) */ -static mp_obj_t mp_lv_text_attributes_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blend_color_to_rgb888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(mp_args[0]); - ((void (*)(lv_text_attributes_t *))lv_func_ptr)(attributes); + lv_draw_sw_blend_fill_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(mp_args[0]); + uint32_t dest_px_size = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *, uint32_t))lv_func_ptr)(dsc, dest_px_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_text_attributes_init_mpobj, 1, mp_lv_text_attributes_init, lv_text_attributes_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_color_to_rgb888_mpobj, 2, mp_lv_draw_sw_blend_color_to_rgb888, lv_draw_sw_blend_color_to_rgb888); -static const mp_rom_map_elem_t mp_lv_text_attributes_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_text_attributes_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_text_attributes_init_mpobj) }, +static const mp_rom_map_elem_t mp_lv_draw_sw_blend_fill_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_fill_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_color_to_a8), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_a8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_al88), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_al88_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_argb8888), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_argb8888_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_argb8888_premultiplied), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_argb8888_premultiplied_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_i1), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_i1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_l8), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_l8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_rgb565), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_rgb565_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_rgb565_swapped), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_rgb565_swapped_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_to_rgb888), MP_ROM_PTR(&mp_lv_draw_sw_blend_color_to_rgb888_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_text_attributes_t_locals_dict, mp_lv_text_attributes_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_fill_dsc_t_locals_dict, mp_lv_draw_sw_blend_fill_dsc_t_locals_dict_table); /* - * - * Global Module Functions - * + * lvgl extension definition for: + * void lv_draw_sw_blend_image_to_a8(lv_draw_sw_blend_image_dsc_t *dsc) */ +static mp_obj_t mp_lv_draw_sw_blend_image_to_a8(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_sw_blend_image_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_image_dsc_t(mp_args[0]); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_func_ptr)(dsc); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_a8_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_a8); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_al88 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_al88_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_al88); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_argb8888 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_argb8888_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_argb8888); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_argb8888_premultiplied */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_argb8888_premultiplied_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_argb8888_premultiplied); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_i1 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_i1_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_i1); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_l8 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_l8_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_l8); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_rgb565 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_rgb565_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_rgb565); + +/* Reusing lv_draw_sw_blend_image_to_a8 for lv_draw_sw_blend_image_to_rgb565_swapped */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_rgb565_swapped_mpobj, 1, mp_lv_draw_sw_blend_image_to_a8, lv_draw_sw_blend_image_to_rgb565_swapped); + /* * lvgl extension definition for: - * inline static void lv_memzero(void *dst, size_t len) + * void lv_draw_sw_blend_image_to_rgb888(lv_draw_sw_blend_image_dsc_t *dsc, uint32_t dest_px_size) */ -static mp_obj_t mp_lv_memzero(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blend_image_to_rgb888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *dst = mp_to_ptr(mp_args[0]); - size_t len = (size_t)mp_obj_get_int(mp_args[1]); - ((void (*)(void *, size_t))lv_func_ptr)(dst, len); + lv_draw_sw_blend_image_dsc_t *dsc = mp_write_ptr_lv_draw_sw_blend_image_dsc_t(mp_args[0]); + uint32_t dest_px_size = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_sw_blend_image_dsc_t *, uint32_t))lv_func_ptr)(dsc, dest_px_size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memzero_mpobj, 2, mp_lv_memzero, lv_memzero); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_image_to_rgb888_mpobj, 2, mp_lv_draw_sw_blend_image_to_rgb888, lv_draw_sw_blend_image_to_rgb888); -static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, +static const mp_rom_map_elem_t mp_lv_draw_sw_blend_image_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_blend_image_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_to_a8), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_a8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_al88), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_al88_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_argb8888), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_argb8888_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_argb8888_premultiplied), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_argb8888_premultiplied_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_i1), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_i1_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_l8), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_l8_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_rgb565), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_rgb565_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_rgb565_swapped), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_rgb565_swapped_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_rgb888), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_to_rgb888_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_blend_image_dsc_t_locals_dict, mp_lv_draw_sw_blend_image_dsc_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, +/* + * lvgl extension definition for: + * void lv_draw_sw_grad_cleanup(lv_draw_sw_grad_calc_t *grad) + */ + +static mp_obj_t mp_lv_draw_sw_grad_cleanup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_sw_grad_calc_t *grad = mp_write_ptr_lv_draw_sw_grad_calc_t(mp_args[0]); + ((void (*)(lv_draw_sw_grad_calc_t *))lv_func_ptr)(grad); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_grad_cleanup_mpobj, 1, mp_lv_draw_sw_grad_cleanup, lv_draw_sw_grad_cleanup); + + +static const mp_rom_map_elem_t mp_lv_draw_sw_grad_calc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_sw_grad_calc_t))) }, + { MP_ROM_QSTR(MP_QSTR_cleanup), MP_ROM_PTR(&mp_lv_draw_sw_grad_cleanup_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_sw_grad_calc_t_locals_dict, mp_lv_draw_sw_grad_calc_t_locals_dict_table); /* * lvgl extension definition for: - * inline static bool lv_streq(const char *s1, const char *s2) + * lv_result_t lv_circle_buf_resize(lv_circle_buf_t *circle_buf, uint32_t capacity) */ -static mp_obj_t mp_lv_streq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_resize(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); - const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); - bool _res = ((bool (*)(const char *, const char *))lv_func_ptr)(s1, s2); - return convert_to_bool(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, uint32_t))lv_func_ptr)(circle_buf, capacity); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_streq_mpobj, 2, mp_lv_streq, lv_streq); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_resize_mpobj, 2, mp_lv_circle_buf_resize, lv_circle_buf_resize); /* * lvgl extension definition for: - * inline static int32_t lv_sqr(int32_t x) + * void lv_circle_buf_destroy(lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_sqr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - int32_t x = (int32_t)mp_obj_get_int(mp_args[0]); - int32_t _res = ((int32_t (*)(int32_t))lv_func_ptr)(x); - return mp_obj_new_int(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + ((void (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sqr_mpobj, 1, mp_lv_sqr, lv_sqr); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_destroy_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_destroy); /* * lvgl extension definition for: - * inline static uint16_t lv_color_swap_16(uint16_t c) + * uint32_t lv_circle_buf_size(const lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_color_swap_16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint16_t c = (uint16_t)mp_obj_get_int(mp_args[0]); - uint16_t _res = ((uint16_t (*)(uint16_t))lv_func_ptr)(c); + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_swap_16_mpobj, 1, mp_lv_color_swap_16, lv_color_swap_16); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_size_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_size); + +/* Reusing lv_circle_buf_size for lv_circle_buf_capacity */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_capacity_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_capacity); + +/* Reusing lv_circle_buf_size for lv_circle_buf_remain */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_remain_mpobj, 1, mp_lv_circle_buf_size, lv_circle_buf_remain); /* * lvgl extension definition for: - * inline static uint32_t lv_swap_bytes_32(uint32_t x) + * bool lv_circle_buf_is_empty(const lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_swap_bytes_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_is_empty(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t _res = ((uint32_t (*)(uint32_t))lv_func_ptr)(x); - return mp_obj_new_int_from_uint(_res); + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + bool _res = ((bool (*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_32_mpobj, 1, mp_lv_swap_bytes_32, lv_swap_bytes_32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_empty_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_empty); -/* Reusing lv_color_swap_16 for lv_swap_bytes_16 */ +/* Reusing lv_circle_buf_is_empty for lv_circle_buf_is_full */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_16_mpobj, 1, mp_lv_color_swap_16, lv_swap_bytes_16); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_is_full_mpobj, 1, mp_lv_circle_buf_is_empty, lv_circle_buf_is_full); + +/* Reusing lv_circle_buf_destroy for lv_circle_buf_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_reset_mpobj, 1, mp_lv_circle_buf_destroy, lv_circle_buf_reset); /* * lvgl extension definition for: - * inline static void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) + * void *lv_circle_buf_head(const lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_bidi_calculate_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_head(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); - lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); - return mp_const_none; + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + void * _res = ((void *(*)(const lv_circle_buf_t *))lv_func_ptr)(circle_buf); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align, lv_bidi_calculate_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_head_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_head); + +/* Reusing lv_circle_buf_head for lv_circle_buf_tail */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_tail_mpobj, 1, mp_lv_circle_buf_head, lv_circle_buf_tail); /* * lvgl extension definition for: - * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) + * lv_result_t lv_circle_buf_read(lv_circle_buf_t *circle_buf, void *data) */ -static mp_obj_t mp_lv_style_get_prop_group(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_read(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_style_prop_t))lv_func_ptr)(prop); - return mp_obj_new_int_from_uint(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + void *data = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_get_prop_group_mpobj, 1, mp_lv_style_get_prop_group, lv_style_get_prop_group); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_read_mpobj, 2, mp_lv_circle_buf_read, lv_circle_buf_read); /* * lvgl extension definition for: - * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) + * lv_result_t lv_circle_buf_write(lv_circle_buf_t *circle_buf, const void *data) */ -static mp_obj_t mp_lv_style_prop_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_write(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); - uint8_t flag = (uint8_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_func_ptr)(prop, flag); - return convert_to_bool(_res); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + const void *data = (const void *)mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *, const void *))lv_func_ptr)(circle_buf, data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_prop_has_flag_mpobj, 2, mp_lv_style_prop_has_flag, lv_style_prop_has_flag); - -/* Reusing funcptr_lv_tick_get_cb_t for lv_task_handler */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_task_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_task_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_write_mpobj, 2, mp_lv_circle_buf_write, lv_circle_buf_write); /* - * Callback function lv_thread_init_callback - * void callback(void *) + * Callback function lv_circle_buf_fill_fill_cb + * bool lv_circle_buf_fill_cb_t(void *buf, uint32_t buff_len, int32_t index, void *user_data) */ -GENMPY_UNUSED static void lv_thread_init_callback_callback(void *arg0) +GENMPY_UNUSED static bool lv_circle_buf_fill_fill_cb_callback(void *arg0, uint32_t arg1, int32_t arg2, void *arg3) { - mp_obj_t mp_args[1]; + mp_obj_t mp_args[4]; mp_args[0] = ptr_to_mp((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_thread_init_callback)), 1, mp_args); - return; + mp_args[1] = mp_obj_new_int_from_uint(arg1); + mp_args[2] = mp_obj_new_int(arg2); + mp_args[3] = ptr_to_mp((void*)arg3); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg3); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_circle_buf_fill_fill_cb)), 4, mp_args); + return mp_obj_is_true(callback_result); } /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) + * uint32_t lv_circle_buf_fill(lv_circle_buf_t *circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, void *user_data) */ -static mp_obj_t mp_lv_thread_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - const char * const name = (const char * const)(char*)convert_from_str(mp_args[1]); - lv_thread_prio_t prio = (int)mp_obj_get_int(mp_args[2]); - void *callback = mp_lv_callback(mp_args[3], &lv_thread_init_callback_callback, MP_QSTR_lv_thread_init_callback, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - size_t stack_size = (size_t)mp_obj_get_int(mp_args[4]); - lv_thread_t *thread = mp_to_ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_func_ptr)(thread, name, prio, callback, stack_size, user_data); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[3]); + uint32_t count = (uint32_t)mp_obj_get_int(mp_args[1]); + void *fill_cb = mp_lv_callback(mp_args[2], &lv_circle_buf_fill_fill_cb_callback, MP_QSTR_lv_circle_buf_fill_fill_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_circle_buf_t *, uint32_t, lv_circle_buf_fill_cb_t, void *))lv_func_ptr)(circle_buf, count, fill_cb, user_data); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_init_mpobj, 6, mp_lv_thread_init, lv_thread_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_fill_mpobj, 4, mp_lv_circle_buf_fill, lv_circle_buf_fill); /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) + * lv_result_t lv_circle_buf_skip(lv_circle_buf_t *circle_buf) */ -static mp_obj_t mp_lv_thread_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_skip(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_thread_t *thread = mp_to_ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_thread_t *))lv_func_ptr)(thread); + lv_circle_buf_t *circle_buf = mp_write_ptr_lv_circle_buf_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_circle_buf_t *))lv_func_ptr)(circle_buf); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_delete_mpobj, 1, mp_lv_thread_delete, lv_thread_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_skip_mpobj, 1, mp_lv_circle_buf_skip, lv_circle_buf_skip); /* * lvgl extension definition for: - * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) + * lv_result_t lv_circle_buf_peek(const lv_circle_buf_t *circle_buf, void *data) */ -static mp_obj_t mp_lv_mutex_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_peek(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_mutex_t *mutex = mp_array_to_i32ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_mutex_t *))lv_func_ptr)(mutex); + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + void *data = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, void *))lv_func_ptr)(circle_buf, data); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_init_mpobj, 1, mp_lv_mutex_init, lv_mutex_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_mpobj, 2, mp_lv_circle_buf_peek, lv_circle_buf_peek); -/* Reusing lv_mutex_init for lv_mutex_lock */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock); - -/* Reusing lv_mutex_init for lv_mutex_lock_isr */ +/* + * lvgl extension definition for: + * lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t *circle_buf, uint32_t index, void *data) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_isr_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock_isr); +static mp_obj_t mp_lv_circle_buf_peek_at(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_circle_buf_t *circle_buf = (const lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + void *data = mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(const lv_circle_buf_t *, uint32_t, void *))lv_func_ptr)(circle_buf, index, data); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_circle_buf_peek_at_mpobj, 3, mp_lv_circle_buf_peek_at, lv_circle_buf_peek_at); -/* Reusing lv_mutex_init for lv_mutex_unlock */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_unlock_mpobj, 1, mp_lv_mutex_init, lv_mutex_unlock); +static const mp_rom_map_elem_t mp_lv_circle_buf_t_locals_dict_table[] = { -/* Reusing lv_mutex_init for lv_mutex_delete */ + { MP_ROM_QSTR(MP_QSTR_resize), MP_ROM_PTR(&mp_lv_circle_buf_resize_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_circle_buf_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_size), MP_ROM_PTR(&mp_lv_circle_buf_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_capacity), MP_ROM_PTR(&mp_lv_circle_buf_capacity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remain), MP_ROM_PTR(&mp_lv_circle_buf_remain_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_circle_buf_is_empty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_full), MP_ROM_PTR(&mp_lv_circle_buf_is_full_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_circle_buf_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_head), MP_ROM_PTR(&mp_lv_circle_buf_head_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tail), MP_ROM_PTR(&mp_lv_circle_buf_tail_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_read), MP_ROM_PTR(&mp_lv_circle_buf_read_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&mp_lv_circle_buf_write_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fill), MP_ROM_PTR(&mp_lv_circle_buf_fill_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_skip), MP_ROM_PTR(&mp_lv_circle_buf_skip_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek), MP_ROM_PTR(&mp_lv_circle_buf_peek_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_peek_at), MP_ROM_PTR(&mp_lv_circle_buf_peek_at_mpobj) }, + +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_delete_mpobj, 1, mp_lv_mutex_init, lv_mutex_delete); +static MP_DEFINE_CONST_DICT(mp_lv_circle_buf_t_locals_dict, mp_lv_circle_buf_t_locals_dict_table); + + +/* + * lvgl extension definition for: + * void lv_lru_delete(lv_lru_t *cache) + */ + +static mp_obj_t mp_lv_lru_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + ((void (*)(lv_lru_t *))lv_func_ptr)(cache); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_delete_mpobj, 1, mp_lv_lru_delete, lv_lru_delete); /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) + * lv_lru_res_t lv_lru_set(lv_lru_t *cache, const void *key, size_t key_length, void *value, size_t value_length) */ -static mp_obj_t mp_lv_thread_sync_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_lru_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_thread_sync_t *sync = mp_to_ptr(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_func_ptr)(sync); + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t key_length = (size_t)mp_obj_get_int(mp_args[2]); + void *value = mp_to_ptr(mp_args[3]); + size_t value_length = (size_t)mp_obj_get_int(mp_args[4]); + lv_lru_res_t _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t, void *, size_t))lv_func_ptr)(cache, key, key_length, value, value_length); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_init_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_set_mpobj, 5, mp_lv_lru_set, lv_lru_set); -/* Reusing lv_thread_sync_init for lv_thread_sync_wait */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_wait_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_wait); - -/* Reusing lv_thread_sync_init for lv_thread_sync_signal */ +/* + * lvgl extension definition for: + * lv_lru_res_t lv_lru_get(lv_lru_t *cache, const void *key, size_t key_size, void **value) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal); - -/* Reusing lv_thread_sync_init for lv_thread_sync_signal_isr */ +static mp_obj_t mp_lv_lru_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t key_size = (size_t)mp_obj_get_int(mp_args[2]); + void **value = mp_to_ptr(mp_args[3]); + lv_lru_res_t _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t, void **))lv_func_ptr)(cache, key, key_size, value); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_isr_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal_isr); - -/* Reusing lv_thread_sync_init for lv_thread_sync_delete */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_delete_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_get_mpobj, 4, mp_lv_lru_get, lv_lru_get); /* * lvgl extension definition for: - * inline static bool lv_text_is_break_char(uint32_t letter) + * lv_lru_res_t lv_lru_remove(lv_lru_t *cache, const void *key, size_t key_size) */ -static mp_obj_t mp_lv_text_is_break_char(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_lru_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[0]); - bool _res = ((bool (*)(uint32_t))lv_func_ptr)(letter); - return convert_to_bool(_res); + lv_lru_t *cache = mp_write_ptr_lv_lru_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + size_t key_size = (size_t)mp_obj_get_int(mp_args[2]); + lv_lru_res_t _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t))lv_func_ptr)(cache, key, key_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_break_char_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_break_char); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_remove_mpobj, 3, mp_lv_lru_remove, lv_lru_remove); -/* Reusing lv_text_is_break_char for lv_text_is_a_word */ +/* Reusing lv_lru_delete for lv_lru_remove_lru_item */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_a_word_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_a_word); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_lru_remove_lru_item_mpobj, 1, mp_lv_lru_delete, lv_lru_remove_lru_item); -/* Reusing lv_text_is_break_char for lv_text_is_marker */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_marker_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_marker); +static const mp_rom_map_elem_t mp_lv_lru_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_lru_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_lru_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_lru_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get), MP_ROM_PTR(&mp_lv_lru_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_lru_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_lru_item), MP_ROM_PTR(&mp_lv_lru_remove_lru_item_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_lru_t_locals_dict, mp_lv_lru_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_lru_item_t_locals_dict_table[] = { + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_lru_item_t_locals_dict, mp_lv_lru_item_t_locals_dict_table); + /* * lvgl extension definition for: - * inline static int lv_version_major(void) + * void lv_pending_destroy(lv_pending_t *pending) */ -static mp_obj_t mp_lv_version_major(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_pending_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - int _res = ((int (*)(void))lv_func_ptr)(); - return mp_obj_new_int(_res); + lv_pending_t *pending = mp_write_ptr_lv_pending_t(mp_args[0]); + ((void (*)(lv_pending_t *))lv_func_ptr)(pending); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_major_mpobj, 0, mp_lv_version_major, lv_version_major); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_destroy_mpobj, 1, mp_lv_pending_destroy, lv_pending_destroy); -/* Reusing lv_version_major for lv_version_minor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_minor_mpobj, 0, mp_lv_version_major, lv_version_minor); - -/* Reusing lv_version_major for lv_version_patch */ +/* + * Callback function lv_pending_set_free_cb_free_cb + * void lv_pending_free_cb_t(void *obj, void *user_data) + */ + +GENMPY_UNUSED static void lv_pending_set_free_cb_free_cb_callback(void *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_pending_set_free_cb_free_cb)), 2, mp_args); + return; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_patch_mpobj, 0, mp_lv_version_major, lv_version_patch); - /* * lvgl extension definition for: - * inline static const char *lv_version_info(void) + * void lv_pending_set_free_cb(lv_pending_t *pending, lv_pending_free_cb_t free_cb, void *user_data) */ -static mp_obj_t mp_lv_version_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_pending_set_free_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - const char * _res = ((const char *(*)(void))lv_func_ptr)(); - return convert_to_str((void*)_res); + void *user_data = mp_to_ptr(mp_args[2]); + void *free_cb = mp_lv_callback(mp_args[1], &lv_pending_set_free_cb_free_cb_callback, MP_QSTR_lv_pending_set_free_cb_free_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_pending_t *pending = mp_write_ptr_lv_pending_t(mp_args[0]); + ((void (*)(lv_pending_t *, lv_pending_free_cb_t, void *))lv_func_ptr)(pending, free_cb, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_info_mpobj, 0, mp_lv_version_info, lv_version_info); - -/* Reusing lv_image_header_cache_is_enabled for lv_is_initialized */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_is_initialized_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_is_initialized); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_set_free_cb_mpobj, 3, mp_lv_pending_set_free_cb, lv_pending_set_free_cb); /* * lvgl extension definition for: - * void *lv_memcpy(void *dst, const void *src, size_t len) + * void lv_pending_add(lv_pending_t *pending, void *obj) */ -static mp_obj_t mp_lv_memcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_pending_add(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *dst = mp_to_ptr(mp_args[0]); - const void *src = (const void *)mp_to_ptr(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(void *, const void *, size_t))lv_func_ptr)(dst, src, len); - return ptr_to_mp((void*)_res); + lv_pending_t *pending = mp_write_ptr_lv_pending_t(mp_args[0]); + void *obj = mp_to_ptr(mp_args[1]); + ((void (*)(lv_pending_t *, void *))lv_func_ptr)(pending, obj); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcpy_mpobj, 3, mp_lv_memcpy, lv_memcpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_add_mpobj, 2, mp_lv_pending_add, lv_pending_add); + +/* Reusing lv_pending_destroy for lv_pending_remove_all */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_remove_all_mpobj, 1, mp_lv_pending_destroy, lv_pending_remove_all); + +/* Reusing lv_pending_destroy for lv_pending_swap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_pending_swap_mpobj, 1, mp_lv_pending_destroy, lv_pending_swap); + + +static const mp_rom_map_elem_t mp_lv_pending_t_locals_dict_table[] = { + + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_pending_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_free_cb), MP_ROM_PTR(&mp_lv_pending_set_free_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add), MP_ROM_PTR(&mp_lv_pending_add_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_all), MP_ROM_PTR(&mp_lv_pending_remove_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_pending_swap_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_pending_t_locals_dict, mp_lv_pending_t_locals_dict_table); + + +/* + * Function NOT generated: + * Callback function 'lv_rb_compare_t compare' must receive a struct pointer with user_data member as its first argument! + * lv_rb_compare_t compare + */ /* * lvgl extension definition for: - * void lv_memset(void *dst, uint8_t v, size_t len) + * bool lv_rb_init(lv_rb_t *tree, lv_rb_compare_t compare, size_t node_size) */ -static mp_obj_t mp_lv_memset(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *dst = mp_to_ptr(mp_args[0]); - uint8_t v = (uint8_t)mp_obj_get_int(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - ((void (*)(void *, uint8_t, size_t))lv_func_ptr)(dst, v, len); - return mp_const_none; + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_compare_t compare = mp_to_ptr(mp_args[1]); + size_t node_size = (size_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_rb_t *, lv_rb_compare_t, size_t))lv_func_ptr)(tree, compare, node_size); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memset_mpobj, 3, mp_lv_memset, lv_memset); - -/* Reusing lv_memcpy for lv_memmove */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memmove_mpobj, 3, mp_lv_memcpy, lv_memmove); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_init_mpobj, 3, mp_lv_rb_init, lv_rb_init); /* * lvgl extension definition for: - * int lv_memcmp(const void *p1, const void *p2, size_t len) + * lv_rb_node_t *lv_rb_insert(lv_rb_t *tree, void *key) */ -static mp_obj_t mp_lv_memcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_insert(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *p1 = (const void *)mp_to_ptr(mp_args[0]); - const void *p2 = (const void *)mp_to_ptr(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - int _res = ((int (*)(const void *, const void *, size_t))lv_func_ptr)(p1, p2, len); - return mp_obj_new_int(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + void *key = mp_to_ptr(mp_args[1]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, void *))lv_func_ptr)(tree, key); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcmp_mpobj, 3, mp_lv_memcmp, lv_memcmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_insert_mpobj, 2, mp_lv_rb_insert, lv_rb_insert); /* * lvgl extension definition for: - * size_t lv_strlen(const char *str) + * lv_rb_node_t *lv_rb_find(lv_rb_t *tree, const void *key) */ -static mp_obj_t mp_lv_strlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_find(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *str = (const char *)(char*)convert_from_str(mp_args[0]); - size_t _res = ((size_t (*)(const char *))lv_func_ptr)(str); - return mp_obj_new_int_from_uint(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlen_mpobj, 1, mp_lv_strlen, lv_strlen); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_find_mpobj, 2, mp_lv_rb_find, lv_rb_find); /* * lvgl extension definition for: - * size_t lv_strnlen(const char *str, size_t max_len) + * void *lv_rb_remove_node(lv_rb_t *tree, lv_rb_node_t *node) */ -static mp_obj_t mp_lv_strnlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_remove_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *str = (const char *)(char*)convert_from_str(mp_args[0]); - size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); - size_t _res = ((size_t (*)(const char *, size_t))lv_func_ptr)(str, max_len); - return mp_obj_new_int_from_uint(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); + void * _res = ((void *(*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strnlen_mpobj, 2, mp_lv_strnlen, lv_strnlen); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_node_mpobj, 2, mp_lv_rb_remove_node, lv_rb_remove_node); /* * lvgl extension definition for: - * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) + * void *lv_rb_remove(lv_rb_t *tree, const void *key) */ -static mp_obj_t mp_lv_strlcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_remove(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - char *dst = (char*)convert_from_str(mp_args[0]); - const char *src = (const char *)(char*)convert_from_str(mp_args[1]); - size_t dst_size = (size_t)mp_obj_get_int(mp_args[2]); - size_t _res = ((size_t (*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dst_size); - return mp_obj_new_int_from_uint(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + void * _res = ((void *(*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlcpy_mpobj, 3, mp_lv_strlcpy, lv_strlcpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_remove_mpobj, 2, mp_lv_rb_remove, lv_rb_remove); /* * lvgl extension definition for: - * char *lv_strncpy(char *dst, const char *src, size_t dest_size) + * bool lv_rb_drop_node(lv_rb_t *tree, lv_rb_node_t *node) */ -static mp_obj_t mp_lv_strncpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_drop_node(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - char *dst = (char*)convert_from_str(mp_args[0]); - const char *src = (const char *)(char*)convert_from_str(mp_args[1]); - size_t dest_size = (size_t)mp_obj_get_int(mp_args[2]); - char * _res = ((char *(*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dest_size); - return convert_to_str((void*)_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[1]); + bool _res = ((bool (*)(lv_rb_t *, lv_rb_node_t *))lv_func_ptr)(tree, node); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncpy_mpobj, 3, mp_lv_strncpy, lv_strncpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_node_mpobj, 2, mp_lv_rb_drop_node, lv_rb_drop_node); /* * lvgl extension definition for: - * char *lv_strcpy(char *dst, const char *src) + * bool lv_rb_drop(lv_rb_t *tree, const void *key) */ -static mp_obj_t mp_lv_strcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_drop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - char *dst = (char*)convert_from_str(mp_args[0]); - const char *src = (const char *)(char*)convert_from_str(mp_args[1]); - char * _res = ((char *(*)(char *, const char *))lv_func_ptr)(dst, src); - return convert_to_str((void*)_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + const void *key = (const void *)mp_to_ptr(mp_args[1]); + bool _res = ((bool (*)(lv_rb_t *, const void *))lv_func_ptr)(tree, key); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcpy_mpobj, 2, mp_lv_strcpy, lv_strcpy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_drop_mpobj, 2, mp_lv_rb_drop, lv_rb_drop); /* * lvgl extension definition for: - * int lv_strcmp(const char *s1, const char *s2) + * lv_rb_node_t *lv_rb_minimum(lv_rb_t *node) */ -static mp_obj_t mp_lv_strcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_minimum(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); - const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); - int _res = ((int (*)(const char *, const char *))lv_func_ptr)(s1, s2); - return mp_obj_new_int(_res); + lv_rb_t *node = mp_write_ptr_lv_rb_t(mp_args[0]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_func_ptr)(node); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcmp_mpobj, 2, mp_lv_strcmp, lv_strcmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_mpobj, 1, mp_lv_rb_minimum, lv_rb_minimum); + +/* Reusing lv_rb_minimum for lv_rb_maximum */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_mpobj, 1, mp_lv_rb_minimum, lv_rb_maximum); /* * lvgl extension definition for: - * int lv_strncmp(const char *s1, const char *s2, size_t len) + * void lv_rb_destroy(lv_rb_t *tree) */ -static mp_obj_t mp_lv_strncmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); - const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); - size_t len = (size_t)mp_obj_get_int(mp_args[2]); - int _res = ((int (*)(const char *, const char *, size_t))lv_func_ptr)(s1, s2, len); - return mp_obj_new_int(_res); + lv_rb_t *tree = mp_write_ptr_lv_rb_t(mp_args[0]); + ((void (*)(lv_rb_t *))lv_func_ptr)(tree); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncmp_mpobj, 3, mp_lv_strncmp, lv_strncmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_destroy_mpobj, 1, mp_lv_rb_destroy, lv_rb_destroy); + + +static const mp_rom_map_elem_t mp_lv_rb_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_rb_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_insert), MP_ROM_PTR(&mp_lv_rb_insert_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_find), MP_ROM_PTR(&mp_lv_rb_find_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_node), MP_ROM_PTR(&mp_lv_rb_remove_node_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove), MP_ROM_PTR(&mp_lv_rb_remove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop_node), MP_ROM_PTR(&mp_lv_rb_drop_node_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_drop), MP_ROM_PTR(&mp_lv_rb_drop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_minimum), MP_ROM_PTR(&mp_lv_rb_minimum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_maximum), MP_ROM_PTR(&mp_lv_rb_maximum_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_rb_destroy_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_rb_t_locals_dict, mp_lv_rb_t_locals_dict_table); + /* * lvgl extension definition for: - * char *lv_strdup(const char *src) + * lv_rb_node_t *lv_rb_minimum_from(lv_rb_node_t *node) */ -static mp_obj_t mp_lv_strdup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rb_minimum_from(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *src = (const char *)(char*)convert_from_str(mp_args[0]); - char * _res = ((char *(*)(const char *))lv_func_ptr)(src); - return convert_to_str((void*)_res); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(mp_args[0]); + lv_rb_node_t * _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_func_ptr)(node); + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strdup_mpobj, 1, mp_lv_strdup, lv_strdup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_minimum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_minimum_from); + +/* Reusing lv_rb_minimum_from for lv_rb_maximum_from */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_rb_maximum_from_mpobj, 1, mp_lv_rb_minimum_from, lv_rb_maximum_from); + + +static const mp_rom_map_elem_t mp_lv_rb_node_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_rb_node_t))) }, + { MP_ROM_QSTR(MP_QSTR_minimum_from), MP_ROM_PTR(&mp_lv_rb_minimum_from_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_maximum_from), MP_ROM_PTR(&mp_lv_rb_maximum_from_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_rb_node_t_locals_dict, mp_lv_rb_node_t_locals_dict_table); + /* * lvgl extension definition for: - * char *lv_strndup(const char *src, size_t max_len) + * void lv_text_attributes_init(lv_text_attributes_t *attributes) */ -static mp_obj_t mp_lv_strndup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_text_attributes_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *src = (const char *)(char*)convert_from_str(mp_args[0]); - size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); - char * _res = ((char *(*)(const char *, size_t))lv_func_ptr)(src, max_len); - return convert_to_str((void*)_res); + lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(mp_args[0]); + ((void (*)(lv_text_attributes_t *))lv_func_ptr)(attributes); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strndup_mpobj, 2, mp_lv_strndup, lv_strndup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_text_attributes_init_mpobj, 1, mp_lv_text_attributes_init, lv_text_attributes_init); -/* Reusing lv_strcpy for lv_strcat */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcat_mpobj, 2, mp_lv_strcpy, lv_strcat); +static const mp_rom_map_elem_t mp_lv_text_attributes_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_text_attributes_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_text_attributes_init_mpobj) }, -/* Reusing lv_strncpy for lv_strncat */ +}; + +static MP_DEFINE_CONST_DICT(mp_lv_text_attributes_t_locals_dict, mp_lv_text_attributes_t_locals_dict_table); + + +/* + * + * Global Module Functions + * + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncat_mpobj, 3, mp_lv_strncpy, lv_strncat); - /* * lvgl extension definition for: - * char *lv_strchr(const char *str, int c) + * inline static int32_t lv_sqr(int32_t x) */ -static mp_obj_t mp_lv_strchr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_sqr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *str = (const char *)(char*)convert_from_str(mp_args[0]); - int c = (int)mp_obj_get_int(mp_args[1]); - char * _res = ((char *(*)(const char *, int))lv_func_ptr)(str, c); - return convert_to_str((void*)_res); + int32_t x = (int32_t)mp_obj_get_int(mp_args[0]); + int32_t _res = ((int32_t (*)(int32_t))lv_func_ptr)(x); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strchr_mpobj, 2, mp_lv_strchr, lv_strchr); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sqr_mpobj, 1, mp_lv_sqr, lv_sqr); -/* Reusing lv_obj_style_init for lv_mem_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_init_mpobj, 0, mp_lv_obj_style_init, lv_mem_init); +static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, -/* Reusing lv_obj_style_init for lv_mem_deinit */ +}; + +static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_deinit_mpobj, 0, mp_lv_obj_style_init, lv_mem_deinit); +static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) + * inline static uint16_t lv_color_swap_16(uint16_t c) */ -static mp_obj_t mp_lv_mem_add_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_swap_16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *mem = mp_to_ptr(mp_args[0]); - size_t bytes = (size_t)mp_obj_get_int(mp_args[1]); - lv_mem_pool_t _res = ((lv_mem_pool_t (*)(void *, size_t))lv_func_ptr)(mem, bytes); - return ptr_to_mp(_res); + uint16_t c = (uint16_t)mp_obj_get_int(mp_args[0]); + uint16_t _res = ((uint16_t (*)(uint16_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_add_pool_mpobj, 2, mp_lv_mem_add_pool, lv_mem_add_pool); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_swap_16_mpobj, 1, mp_lv_color_swap_16, lv_color_swap_16); /* * lvgl extension definition for: - * void lv_mem_remove_pool(lv_mem_pool_t pool) + * inline static void lv_memzero(void *dst, size_t len) */ -static mp_obj_t mp_lv_mem_remove_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_memzero(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_mem_pool_t pool = mp_to_ptr(mp_args[0]); - ((void (*)(lv_mem_pool_t))lv_func_ptr)(pool); + void *dst = mp_to_ptr(mp_args[0]); + size_t len = (size_t)mp_obj_get_int(mp_args[1]); + ((void (*)(void *, size_t))lv_func_ptr)(dst, len); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_remove_pool_mpobj, 1, mp_lv_mem_remove_pool, lv_mem_remove_pool); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memzero_mpobj, 2, mp_lv_memzero, lv_memzero); /* * lvgl extension definition for: - * void *lv_malloc(size_t size) + * inline static bool lv_streq(const char *s1, const char *s2) */ -static mp_obj_t mp_lv_malloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_streq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - size_t size = (size_t)mp_obj_get_int(mp_args[0]); - void * _res = ((void *(*)(size_t))lv_func_ptr)(size); - return ptr_to_mp((void*)_res); + const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); + const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); + bool _res = ((bool (*)(const char *, const char *))lv_func_ptr)(s1, s2); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_mpobj, 1, mp_lv_malloc, lv_malloc); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_streq_mpobj, 2, mp_lv_streq, lv_streq); /* * lvgl extension definition for: - * void *lv_calloc(size_t num, size_t size) + * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) */ -static mp_obj_t mp_lv_calloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_get_prop_group(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - size_t num = (size_t)mp_obj_get_int(mp_args[0]); - size_t size = (size_t)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(size_t, size_t))lv_func_ptr)(num, size); - return ptr_to_mp((void*)_res); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_style_prop_t))lv_func_ptr)(prop); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_calloc_mpobj, 2, mp_lv_calloc, lv_calloc); - -/* Reusing lv_malloc for lv_zalloc */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_zalloc_mpobj, 1, mp_lv_malloc, lv_zalloc); - -/* Reusing lv_malloc for lv_malloc_zeroed */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_zeroed_mpobj, 1, mp_lv_malloc, lv_malloc_zeroed); - -/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_get_prop_group_mpobj, 1, mp_lv_style_get_prop_group, lv_style_get_prop_group); /* * lvgl extension definition for: - * void *lv_realloc(void *data_p, size_t new_size) + * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) */ -static mp_obj_t mp_lv_realloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_prop_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *data_p = mp_to_ptr(mp_args[0]); - size_t new_size = (size_t)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(void *, size_t))lv_func_ptr)(data_p, new_size); - return ptr_to_mp((void*)_res); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[0]); + uint8_t flag = (uint8_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_func_ptr)(prop, flag); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_mpobj, 2, mp_lv_realloc, lv_realloc); - -/* Reusing lv_realloc for lv_reallocf */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_reallocf_mpobj, 2, mp_lv_realloc, lv_reallocf); - -/* Reusing lv_malloc for lv_malloc_core */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_core_mpobj, 1, mp_lv_malloc, lv_malloc_core); - -/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free_core */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_core_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free_core); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_prop_has_flag_mpobj, 2, mp_lv_style_prop_has_flag, lv_style_prop_has_flag); -/* Reusing lv_realloc for lv_realloc_core */ +/* Reusing funcptr_lv_tick_get_cb_t for lv_task_handler */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_core_mpobj, 2, mp_lv_realloc, lv_realloc_core); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_task_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_task_handler); /* * lvgl extension definition for: - * lv_result_t lv_mem_test_core(void) + * inline static int lv_version_major(void) */ -static mp_obj_t mp_lv_mem_test_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_version_major(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_result_t _res = ((lv_result_t (*)(void))lv_func_ptr)(); + int _res = ((int (*)(void))lv_func_ptr)(); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_core_mpobj, 0, mp_lv_mem_test_core, lv_mem_test_core); - -/* Reusing lv_mem_test_core for lv_mem_test */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_mpobj, 0, mp_lv_mem_test_core, lv_mem_test); - -/* Reusing funcptr_lv_delay_cb_t for lv_tick_inc */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_inc_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_tick_inc); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_major_mpobj, 0, mp_lv_version_major, lv_version_major); -/* Reusing funcptr_lv_tick_get_cb_t for lv_tick_get */ +/* Reusing lv_version_major for lv_version_minor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_tick_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_minor_mpobj, 0, mp_lv_version_major, lv_version_minor); -/* Reusing lv_swap_bytes_32 for lv_tick_elaps */ +/* Reusing lv_version_major for lv_version_patch */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_elaps_mpobj, 1, mp_lv_swap_bytes_32, lv_tick_elaps); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_patch_mpobj, 0, mp_lv_version_major, lv_version_patch); /* * lvgl extension definition for: - * uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick) + * inline static const char *lv_version_info(void) */ -static mp_obj_t mp_lv_tick_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_version_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t tick = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t prev_tick = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(uint32_t, uint32_t))lv_func_ptr)(tick, prev_tick); - return mp_obj_new_int_from_uint(_res); + + const char * _res = ((const char *(*)(void))lv_func_ptr)(); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_diff_mpobj, 2, mp_lv_tick_diff, lv_tick_diff); - -/* Reusing funcptr_lv_delay_cb_t for lv_delay_ms */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_delay_ms); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_version_info_mpobj, 0, mp_lv_version_info, lv_version_info); /* - * Function NOT generated: - * Callback argument 'lv_delay_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data - * lv_delay_cb_t cb + * Callback function lv_thread_init_callback + * void callback(void *) */ - + +GENMPY_UNUSED static void lv_thread_init_callback_callback(void *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_thread_init_callback)), 1, mp_args); + return; +} + /* * lvgl extension definition for: - * void lv_delay_set_cb(lv_delay_cb_t cb) + * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) */ -static mp_obj_t mp_lv_delay_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_thread_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_delay_cb_t cb = mp_to_ptr(mp_args[0]); - ((void (*)(lv_delay_cb_t))lv_func_ptr)(cb); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[5]); + const char * const name = (const char * const)(char*)convert_from_str(mp_args[1]); + lv_thread_prio_t prio = (int)mp_obj_get_int(mp_args[2]); + void *callback = mp_lv_callback(mp_args[3], &lv_thread_init_callback_callback, MP_QSTR_lv_thread_init_callback, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + size_t stack_size = (size_t)mp_obj_get_int(mp_args[4]); + lv_thread_t *thread = mp_to_ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_func_ptr)(thread, name, prio, callback, stack_size, user_data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_set_cb_mpobj, 1, mp_lv_delay_set_cb, lv_delay_set_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_init_mpobj, 6, mp_lv_thread_init, lv_thread_init); /* - * Function NOT generated: - * Callback argument 'lv_tick_get_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data - * lv_tick_get_cb_t cb + * lvgl extension definition for: + * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) */ + +static mp_obj_t mp_lv_thread_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_thread_t *thread = mp_to_ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_thread_t *))lv_func_ptr)(thread); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_delete_mpobj, 1, mp_lv_thread_delete, lv_thread_delete); /* * lvgl extension definition for: - * void lv_tick_set_cb(lv_tick_get_cb_t cb) + * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) */ -static mp_obj_t mp_lv_tick_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_mutex_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_tick_get_cb_t cb = mp_to_ptr(mp_args[0]); - ((void (*)(lv_tick_get_cb_t))lv_func_ptr)(cb); - return mp_const_none; + lv_mutex_t *mutex = mp_array_to_i32ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_mutex_t *))lv_func_ptr)(mutex); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_set_cb_mpobj, 1, mp_lv_tick_set_cb, lv_tick_set_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_init_mpobj, 1, mp_lv_mutex_init, lv_mutex_init); + +/* Reusing lv_mutex_init for lv_mutex_lock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock); + +/* Reusing lv_mutex_init for lv_mutex_lock_isr */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_lock_isr_mpobj, 1, mp_lv_mutex_init, lv_mutex_lock_isr); + +/* Reusing lv_mutex_init for lv_mutex_unlock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_unlock_mpobj, 1, mp_lv_mutex_init, lv_mutex_unlock); + +/* Reusing lv_mutex_init for lv_mutex_delete */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mutex_delete_mpobj, 1, mp_lv_mutex_init, lv_mutex_delete); /* * lvgl extension definition for: - * lv_tick_get_cb_t lv_tick_get_cb(void) + * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) */ -static mp_obj_t mp_lv_tick_get_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_thread_sync_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_tick_get_cb_t _res = ((lv_tick_get_cb_t (*)(void))lv_func_ptr)(); - return mp_lv_funcptr_lv_tick_get_cb_t(_res); + lv_thread_sync_t *sync = mp_to_ptr(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_func_ptr)(sync); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_cb_mpobj, 0, mp_lv_tick_get_cb, lv_tick_get_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_init_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_init); -/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_handler */ +/* Reusing lv_thread_sync_init for lv_thread_sync_wait */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_wait_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_wait); -/* Reusing lv_swap_bytes_32 for lv_timer_handler_run_in_period */ +/* Reusing lv_thread_sync_init for lv_thread_sync_signal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_run_in_period_mpobj, 1, mp_lv_swap_bytes_32, lv_timer_handler_run_in_period); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal); -/* Reusing lv_obj_style_init for lv_timer_periodic_handler */ +/* Reusing lv_thread_sync_init for lv_thread_sync_signal_isr */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_periodic_handler_mpobj, 0, mp_lv_obj_style_init, lv_timer_periodic_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_signal_isr_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_signal_isr); +/* Reusing lv_thread_sync_init for lv_thread_sync_delete */ -/* - * Function NOT generated: - * Callback argument 'lv_timer_handler_resume_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data - * lv_timer_handler_resume_cb_t cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_thread_sync_delete_mpobj, 1, mp_lv_thread_sync_init, lv_thread_sync_delete); /* * lvgl extension definition for: - * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) + * inline static uint16_t lv_color_16_16_mix_inlined(uint16_t c1, uint16_t c2, uint8_t mix) */ -static mp_obj_t mp_lv_timer_handler_set_resume_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_16_16_mix_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_handler_resume_cb_t cb = mp_to_ptr(mp_args[0]); - void *data = mp_to_ptr(mp_args[1]); - ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_func_ptr)(cb, data); - return mp_const_none; + uint16_t c1 = (uint16_t)mp_obj_get_int(mp_args[0]); + uint16_t c2 = (uint16_t)mp_obj_get_int(mp_args[1]); + uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); + uint16_t _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_func_ptr)(c1, c2, mix); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_set_resume_cb_mpobj, 2, mp_lv_timer_handler_set_resume_cb, lv_timer_handler_set_resume_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_inlined_mpobj, 3, mp_lv_color_16_16_mix_inlined, lv_color_16_16_mix_inlined); /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create_basic(void) + * inline static void lv_bidi_calculate_align_internal(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) */ -static mp_obj_t mp_lv_timer_create_basic(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_bidi_calculate_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_timer_t * _res = ((lv_timer_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_timer_t((void*)_res); + lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); + lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_basic_mpobj, 0, mp_lv_timer_create_basic, lv_timer_create_basic); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_internal_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align_internal); /* - * Callback function lv_timer_create_timer_xcb - * void lv_timer_cb_t(lv_timer_t *) + * lvgl extension definition for: + * inline static bool lv_text_is_break_char(uint32_t letter) */ -GENMPY_UNUSED static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) +static mp_obj_t mp_lv_text_is_break_char(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_create_timer_xcb)), 1, mp_args); - return; + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[0]); + bool _res = ((bool (*)(uint32_t))lv_func_ptr)(letter); + return convert_to_bool(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_break_char_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_break_char); + +/* Reusing lv_text_is_break_char for lv_text_is_hanging_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_hanging_space_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_hanging_space); + +/* Reusing lv_text_is_break_char for lv_text_is_a_word */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_a_word_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_a_word); + +/* Reusing lv_text_is_break_char for lv_text_is_marker */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_is_marker_mpobj, 1, mp_lv_text_is_break_char, lv_text_is_marker); + /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) + * inline static uint32_t lv_swap_bytes_32(uint32_t x) */ -static mp_obj_t mp_lv_timer_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_swap_bytes_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); - void *timer_xcb = mp_lv_callback(mp_args[0], &lv_timer_create_timer_xcb_callback, MP_QSTR_lv_timer_create_timer_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_func_ptr)(timer_xcb, period, user_data); - return mp_read_ptr_lv_timer_t((void*)_res); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t _res = ((uint32_t (*)(uint32_t))lv_func_ptr)(x); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_mpobj, 3, mp_lv_timer_create, lv_timer_create); - -/* Reusing lv_obj_enable_style_refresh for lv_timer_enable */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_enable_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_timer_enable); - -/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_idle */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_idle_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_idle); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_32_mpobj, 1, mp_lv_swap_bytes_32, lv_swap_bytes_32); -/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_time_until_next */ +/* Reusing lv_color_swap_16 for lv_swap_bytes_16 */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_time_until_next_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_time_until_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_swap_bytes_16_mpobj, 1, mp_lv_color_swap_16, lv_swap_bytes_16); /* @@ -46116,46 +49333,23 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_map_mpobj, 5, mp_lv_cubic_bez static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_rand_set_seed_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_rand_set_seed); -/* Reusing lv_tick_diff for lv_rand */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_rand_mpobj, 2, mp_lv_tick_diff, lv_rand); - - -/* - * Callback function lv_async_call_async_xcb - * void lv_async_cb_t(void *) - */ - -GENMPY_UNUSED static void lv_async_call_async_xcb_callback(void *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = ptr_to_mp((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_async_call_async_xcb)), 1, mp_args); - return; -} - /* * lvgl extension definition for: - * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) + * uint32_t lv_rand(uint32_t min, uint32_t max) */ -static mp_obj_t mp_lv_async_call(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_rand(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - void *async_xcb = mp_lv_callback(mp_args[0], &lv_async_call_async_xcb_callback, MP_QSTR_lv_async_call_async_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_result_t _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_func_ptr)(async_xcb, user_data); - return mp_obj_new_int(_res); + uint32_t min = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t max = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(uint32_t, uint32_t))lv_func_ptr)(min, max); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_mpobj, 2, mp_lv_async_call, lv_async_call); - -/* Reusing lv_async_call for lv_async_call_cancel */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_cancel_mpobj, 2, mp_lv_async_call, lv_async_call_cancel); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_rand_mpobj, 2, mp_lv_rand, lv_rand); /* @@ -46182,9 +49376,9 @@ static mp_obj_t mp_lv_anim_delete(size_t mp_n_args, const mp_obj_t *mp_args, voi static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_delete_mpobj, 2, mp_lv_anim_delete, lv_anim_delete); -/* Reusing lv_obj_style_init for lv_anim_delete_all */ +/* Reusing funcptr_user_cb for lv_anim_delete_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_delete_all_mpobj, 0, mp_lv_obj_style_init, lv_anim_delete_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_delete_all_mpobj, 0, mp_funcptr_user_cb, lv_anim_delete_all); /* @@ -46211,9 +49405,22 @@ static mp_obj_t mp_lv_anim_get(size_t mp_n_args, const mp_obj_t *mp_args, void * static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_get_mpobj, 2, mp_lv_anim_get, lv_anim_get); -/* Reusing lv_timer_create_basic for lv_anim_get_timer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_get_timer_mpobj, 0, mp_lv_timer_create_basic, lv_anim_get_timer); +/* + * lvgl extension definition for: + * lv_timer_t *lv_anim_get_timer(void) + */ + +static mp_obj_t mp_lv_anim_get_timer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + lv_timer_t * _res = ((lv_timer_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_timer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_get_timer_mpobj, 0, mp_lv_anim_get_timer, lv_anim_get_timer); /* @@ -46258,15 +49465,15 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_speed_clamped_mpobj, 3, /* * lvgl extension definition for: - * uint32_t lv_anim_resolve_speed(uint32_t speed, int32_t start, int32_t end) + * uint32_t lv_anim_resolve_speed(uint32_t speed_or_time, int32_t start, int32_t end) */ static mp_obj_t mp_lv_anim_resolve_speed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t speed = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t speed_or_time = (uint32_t)mp_obj_get_int(mp_args[0]); int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_func_ptr)(speed, start, end); + uint32_t _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_func_ptr)(speed_or_time, start, end); return mp_obj_new_int_from_uint(_res); } @@ -46278,9 +49485,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_resolve_speed_mpobj, 3, static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_speed_to_time_mpobj, 3, mp_lv_anim_resolve_speed, lv_anim_speed_to_time); -/* Reusing lv_obj_style_init for lv_anim_refr_now */ +/* Reusing funcptr_user_cb for lv_anim_refr_now */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_refr_now_mpobj, 0, mp_lv_obj_style_init, lv_anim_refr_now); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_refr_now_mpobj, 0, mp_funcptr_user_cb, lv_anim_refr_now); /* @@ -46321,6 +49528,230 @@ static mp_obj_t mp_lv_pct_to_px(size_t mp_n_args, const mp_obj_t *mp_args, void static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_pct_to_px_mpobj, 2, mp_lv_pct_to_px, lv_pct_to_px); +/* Reusing funcptr_lv_tick_get_cb_t for lv_event_register_id */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_register_id_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_event_register_id); + + +/* + * lvgl extension definition for: + * const char *lv_event_code_get_name(lv_event_code_t code) + */ + +static mp_obj_t mp_lv_event_code_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_code_t code = (int)mp_obj_get_int(mp_args[0]); + const char * _res = ((const char *(*)(lv_event_code_t))lv_func_ptr)(code); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_code_get_name_mpobj, 1, mp_lv_event_code_get_name, lv_event_code_get_name); + + +/* + * lvgl extension definition for: + * lv_group_t *lv_group_create(void) + */ + +static mp_obj_t mp_lv_group_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + lv_group_t * _res = ((lv_group_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_group_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_create_mpobj, 0, mp_lv_group_create, lv_group_create); + +/* Reusing lv_group_create for lv_group_get_default */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_default_mpobj, 0, mp_lv_group_create, lv_group_get_default); + +/* Reusing lv_obj_set_parent for lv_group_swap_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_swap_obj_mpobj, 2, mp_lv_obj_set_parent, lv_group_swap_obj); + +/* Reusing lv_obj_move_foreground for lv_group_remove_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_remove_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_remove_obj); + +/* Reusing lv_obj_move_foreground for lv_group_focus_obj */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_focus_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_focus_obj); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_group_get_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_count_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_group_get_count); + + +/* + * lvgl extension definition for: + * lv_group_t *lv_group_by_index(uint32_t index) + */ + +static mp_obj_t mp_lv_group_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_group_t * _res = ((lv_group_t *(*)(uint32_t))lv_func_ptr)(index); + return mp_read_ptr_lv_group_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_by_index_mpobj, 1, mp_lv_group_by_index, lv_group_by_index); + +/* Reusing lv_image_cache_is_enabled for lv_is_initialized */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_is_initialized_mpobj, 0, mp_lv_image_cache_is_enabled, lv_is_initialized); + +/* Reusing funcptr_user_cb for lv_mem_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_init_mpobj, 0, mp_funcptr_user_cb, lv_mem_init); + +/* Reusing funcptr_user_cb for lv_mem_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_deinit_mpobj, 0, mp_funcptr_user_cb, lv_mem_deinit); + + +/* + * lvgl extension definition for: + * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) + */ + +static mp_obj_t mp_lv_mem_add_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *mem = mp_to_ptr(mp_args[0]); + size_t bytes = (size_t)mp_obj_get_int(mp_args[1]); + lv_mem_pool_t _res = ((lv_mem_pool_t (*)(void *, size_t))lv_func_ptr)(mem, bytes); + return ptr_to_mp(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_add_pool_mpobj, 2, mp_lv_mem_add_pool, lv_mem_add_pool); + + +/* + * lvgl extension definition for: + * void lv_mem_remove_pool(lv_mem_pool_t pool) + */ + +static mp_obj_t mp_lv_mem_remove_pool(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_mem_pool_t pool = mp_to_ptr(mp_args[0]); + ((void (*)(lv_mem_pool_t))lv_func_ptr)(pool); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_remove_pool_mpobj, 1, mp_lv_mem_remove_pool, lv_mem_remove_pool); + + +/* + * lvgl extension definition for: + * void *lv_malloc(size_t size) + */ + +static mp_obj_t mp_lv_malloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + size_t size = (size_t)mp_obj_get_int(mp_args[0]); + void * _res = ((void *(*)(size_t))lv_func_ptr)(size); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_mpobj, 1, mp_lv_malloc, lv_malloc); + + +/* + * lvgl extension definition for: + * void *lv_calloc(size_t num, size_t size) + */ + +static mp_obj_t mp_lv_calloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + size_t num = (size_t)mp_obj_get_int(mp_args[0]); + size_t size = (size_t)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(size_t, size_t))lv_func_ptr)(num, size); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_calloc_mpobj, 2, mp_lv_calloc, lv_calloc); + +/* Reusing lv_malloc for lv_zalloc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_zalloc_mpobj, 1, mp_lv_malloc, lv_zalloc); + +/* Reusing lv_malloc for lv_malloc_zeroed */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_zeroed_mpobj, 1, mp_lv_malloc, lv_malloc_zeroed); + +/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free); + + +/* + * lvgl extension definition for: + * void *lv_realloc(void *data_p, size_t new_size) + */ + +static mp_obj_t mp_lv_realloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *data_p = mp_to_ptr(mp_args[0]); + size_t new_size = (size_t)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(void *, size_t))lv_func_ptr)(data_p, new_size); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_mpobj, 2, mp_lv_realloc, lv_realloc); + +/* Reusing lv_realloc for lv_reallocf */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_reallocf_mpobj, 2, mp_lv_realloc, lv_reallocf); + +/* Reusing lv_malloc for lv_malloc_core */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_malloc_core_mpobj, 1, mp_lv_malloc, lv_malloc_core); + +/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_free_core */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_free_core_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_free_core); + +/* Reusing lv_realloc for lv_realloc_core */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_realloc_core_mpobj, 2, mp_lv_realloc, lv_realloc_core); + + +/* + * lvgl extension definition for: + * lv_result_t lv_mem_test_core(void) + */ + +static mp_obj_t mp_lv_mem_test_core(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + + lv_result_t _res = ((lv_result_t (*)(void))lv_func_ptr)(); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_core_mpobj, 0, mp_lv_mem_test_core, lv_mem_test_core); + +/* Reusing lv_mem_test_core for lv_mem_test */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_mem_test_mpobj, 0, mp_lv_mem_test_core, lv_mem_test); + /* * lvgl extension definition for: @@ -46419,24 +49850,9 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color32_make_mpobj, 4, mp_lv_ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_hex3_mpobj, 1, mp_lv_color_hex, lv_color_hex3); +/* Reusing lv_color_16_16_mix_inlined for lv_color_16_16_mix */ -/* - * lvgl extension definition for: - * uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix) - */ - -static mp_obj_t mp_lv_color_16_16_mix(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - uint16_t c1 = (uint16_t)mp_obj_get_int(mp_args[0]); - uint16_t c2 = (uint16_t)mp_obj_get_int(mp_args[1]); - uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); - uint16_t _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_func_ptr)(c1, c2, mix); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_mpobj, 3, mp_lv_color_16_16_mix, lv_color_16_16_mix); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_mpobj, 3, mp_lv_color_16_16_mix_inlined, lv_color_16_16_mix); /* @@ -46556,225 +49972,305 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_palette_darken_mpobj, 2, mp_l /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) + * void *lv_memcpy(void *dst, const void *src, size_t len) */ -static mp_obj_t mp_lv_draw_buf_get_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_memcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_draw_buf_handlers_t * _res = ((lv_draw_buf_handlers_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + void *dst = mp_to_ptr(mp_args[0]); + const void *src = (const void *)mp_to_ptr(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(void *, const void *, size_t))lv_func_ptr)(dst, src, len); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_handlers); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcpy_mpobj, 3, mp_lv_memcpy, lv_memcpy); -/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_font_handlers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_font_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_font_handlers); - -/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_image_handlers */ +/* + * lvgl extension definition for: + * void lv_memset(void *dst, uint8_t v, size_t len) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_image_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_image_handlers); - -/* Reusing funcptr_lv_draw_buf_align_cb_t for lv_draw_buf_align */ +static mp_obj_t mp_lv_memset(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *dst = mp_to_ptr(mp_args[0]); + uint8_t v = (uint8_t)mp_obj_get_int(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + ((void (*)(void *, uint8_t, size_t))lv_func_ptr)(dst, v, len); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_align_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, lv_draw_buf_align); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memset_mpobj, 3, mp_lv_memset, lv_memset); -/* Reusing funcptr_lv_draw_buf_width_to_stride_cb_t for lv_draw_buf_width_to_stride */ +/* Reusing lv_memcpy for lv_memmove */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_width_to_stride_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, lv_draw_buf_width_to_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memmove_mpobj, 3, mp_lv_memcpy, lv_memmove); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * int lv_memcmp(const void *p1, const void *p2, size_t len) */ -static mp_obj_t mp_lv_draw_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_memcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[2]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(w, h, cf, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const void *p1 = (const void *)mp_to_ptr(mp_args[0]); + const void *p2 = (const void *)mp_to_ptr(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + int _res = ((int (*)(const void *, const void *, size_t))lv_func_ptr)(p1, p2, len); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_create_mpobj, 4, mp_lv_draw_buf_create, lv_draw_buf_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_memcmp_mpobj, 3, mp_lv_memcmp, lv_memcmp); /* - * Function NOT generated: - * Callback function 'int (*cmp)(const void *pRef, const void *pElement)' must receive a struct pointer with user_data member as its first argument! - * int (*cmp)(const void *pRef, const void *pElement) + * lvgl extension definition for: + * size_t lv_strlen(const char *str) */ - -#define funcptr_cmp NULL +static mp_obj_t mp_lv_strlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *str = (const char *)(char*)convert_from_str(mp_args[0]); + size_t _res = ((size_t (*)(const char *))lv_func_ptr)(str); + return mp_obj_new_int_from_uint(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlen_mpobj, 1, mp_lv_strlen, lv_strlen); + /* * lvgl extension definition for: - * int cmp(const void *pRef, const void *pElement) + * size_t lv_strnlen(const char *str, size_t max_len) */ -static mp_obj_t mp_funcptr_cmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strnlen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *pRef = (const void *)mp_to_ptr(mp_args[0]); - const void *pElement = (const void *)mp_to_ptr(mp_args[1]); - int _res = ((int (*)(const void *, const void *))lv_func_ptr)(pRef, pElement); - return mp_obj_new_int(_res); + const char *str = (const char *)(char*)convert_from_str(mp_args[0]); + size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); + size_t _res = ((size_t (*)(const char *, size_t))lv_func_ptr)(str, max_len); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_cmp_mpobj, 2, mp_funcptr_cmp, funcptr_cmp); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strnlen_mpobj, 2, mp_lv_strnlen, lv_strnlen); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_cmp(void *func){ return mp_lv_funcptr(&mp_funcptr_cmp_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) + * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) */ -static mp_obj_t mp_lv_utils_bsearch(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strlcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *key = (const void *)mp_to_ptr(mp_args[0]); - const void *base = (const void *)mp_to_ptr(mp_args[1]); - size_t n = (size_t)mp_obj_get_int(mp_args[2]); - size_t size = (size_t)mp_obj_get_int(mp_args[3]); - int (*cmp)(const void *pRef, const void *pElement) = mp_to_ptr(mp_args[4]); - void * _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_func_ptr)(key, base, n, size, cmp); - return ptr_to_mp((void*)_res); + char *dst = (char*)convert_from_str(mp_args[0]); + const char *src = (const char *)(char*)convert_from_str(mp_args[1]); + size_t dst_size = (size_t)mp_obj_get_int(mp_args[2]); + size_t _res = ((size_t (*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dst_size); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv_utils_bsearch, lv_utils_bsearch); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strlcpy_mpobj, 3, mp_lv_strlcpy, lv_strlcpy); /* - * Function NOT generated: - * Callback function 'lv_iter_next_cb next_cb' must receive a struct pointer with user_data member as its first argument! - * lv_iter_next_cb next_cb + * lvgl extension definition for: + * char *lv_strncpy(char *dst, const char *src, size_t dest_size) */ + +static mp_obj_t mp_lv_strncpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char *dst = (char*)convert_from_str(mp_args[0]); + const char *src = (const char *)(char*)convert_from_str(mp_args[1]); + size_t dest_size = (size_t)mp_obj_get_int(mp_args[2]); + char * _res = ((char *(*)(char *, const char *, size_t))lv_func_ptr)(dst, src, dest_size); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncpy_mpobj, 3, mp_lv_strncpy, lv_strncpy); -#define funcptr_lv_iter_next_cb NULL +/* + * lvgl extension definition for: + * char *lv_strcpy(char *dst, const char *src) + */ + +static mp_obj_t mp_lv_strcpy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + char *dst = (char*)convert_from_str(mp_args[0]); + const char *src = (const char *)(char*)convert_from_str(mp_args[1]); + char * _res = ((char *(*)(char *, const char *))lv_func_ptr)(dst, src); + return convert_to_str((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcpy_mpobj, 2, mp_lv_strcpy, lv_strcpy); + /* * lvgl extension definition for: - * lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) + * int lv_strcmp(const char *s1, const char *s2) */ -static mp_obj_t mp_funcptr_lv_iter_next_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strcmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *instance = mp_to_ptr(mp_args[0]); - void *context = mp_to_ptr(mp_args[1]); - void *elem = mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(void *, void *, void *))lv_func_ptr)(instance, context, elem); + const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); + const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); + int _res = ((int (*)(const char *, const char *))lv_func_ptr)(s1, s2); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_next_cb_mpobj, 3, mp_funcptr_lv_iter_next_cb, funcptr_lv_iter_next_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcmp_mpobj, 2, mp_lv_strcmp, lv_strcmp); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_next_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_next_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* + * lvgl extension definition for: + * int lv_strncmp(const char *s1, const char *s2, size_t len) + */ + +static mp_obj_t mp_lv_strncmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *s1 = (const char *)(char*)convert_from_str(mp_args[0]); + const char *s2 = (const char *)(char*)convert_from_str(mp_args[1]); + size_t len = (size_t)mp_obj_get_int(mp_args[2]); + int _res = ((int (*)(const char *, const char *, size_t))lv_func_ptr)(s1, s2, len); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncmp_mpobj, 3, mp_lv_strncmp, lv_strncmp); + /* * lvgl extension definition for: - * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) + * char *lv_strdup(const char *src) */ -static mp_obj_t mp_lv_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strdup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *instance = mp_to_ptr(mp_args[0]); - uint32_t elem_size = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t context_size = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_iter_next_cb next_cb = mp_to_ptr(mp_args[3]); - lv_iter_t * _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_func_ptr)(instance, elem_size, context_size, next_cb); - return mp_read_ptr_lv_iter_t((void*)_res); + const char *src = (const char *)(char*)convert_from_str(mp_args[0]); + char * _res = ((char *(*)(const char *))lv_func_ptr)(src); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_iter_create_mpobj, 4, mp_lv_iter_create, lv_iter_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strdup_mpobj, 1, mp_lv_strdup, lv_strdup); /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) + * char *lv_strndup(const char *src, size_t max_len) */ -static mp_obj_t mp_lv_circle_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strndup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_func_ptr)(capacity, element_size); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + const char *src = (const char *)(char*)convert_from_str(mp_args[0]); + size_t max_len = (size_t)mp_obj_get_int(mp_args[1]); + char * _res = ((char *(*)(const char *, size_t))lv_func_ptr)(src, max_len); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_mpobj, 2, mp_lv_circle_buf_create, lv_circle_buf_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strndup_mpobj, 2, mp_lv_strndup, lv_strndup); + +/* Reusing lv_strcpy for lv_strcat */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strcat_mpobj, 2, mp_lv_strcpy, lv_strcat); + +/* Reusing lv_strncpy for lv_strncat */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strncat_mpobj, 3, mp_lv_strncpy, lv_strncat); /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) + * char *lv_strchr(const char *str, int c) */ -static mp_obj_t mp_lv_circle_buf_create_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_strchr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *buf = mp_to_ptr(mp_args[0]); - uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_func_ptr)(buf, capacity, element_size); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + const char *str = (const char *)(char*)convert_from_str(mp_args[0]); + int c = (int)mp_obj_get_int(mp_args[1]); + char * _res = ((char *(*)(const char *, int))lv_func_ptr)(str, c); + return convert_to_str((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_buf_mpobj, 3, mp_lv_circle_buf_create_from_buf, lv_circle_buf_create_from_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_strchr_mpobj, 2, mp_lv_strchr, lv_strchr); /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) + * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) */ -static mp_obj_t mp_lv_circle_buf_create_from_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_get_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); - lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_func_ptr)(array); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + + lv_draw_buf_handlers_t * _res = ((lv_draw_buf_handlers_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_array_mpobj, 1, mp_lv_circle_buf_create_from_array, lv_circle_buf_create_from_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_handlers); -/* Reusing lv_obj_style_init for lv_lock */ +/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_font_handlers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_mpobj, 0, mp_lv_obj_style_init, lv_lock); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_font_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_font_handlers); -/* Reusing lv_mem_test_core for lv_lock_isr */ +/* Reusing lv_draw_buf_get_handlers for lv_draw_buf_get_image_handlers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_isr_mpobj, 0, mp_lv_mem_test_core, lv_lock_isr); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_get_image_handlers_mpobj, 0, mp_lv_draw_buf_get_handlers, lv_draw_buf_get_image_handlers); -/* Reusing lv_obj_style_init for lv_unlock */ +/* Reusing funcptr_lv_draw_buf_align_cb_t for lv_draw_buf_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_unlock_mpobj, 0, mp_lv_obj_style_init, lv_unlock); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_align_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, lv_draw_buf_align); -/* Reusing funcptr_lv_delay_cb_t for lv_sleep_ms */ +/* Reusing funcptr_lv_draw_buf_width_to_stride_cb_t for lv_draw_buf_width_to_stride */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sleep_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_sleep_ms); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_width_to_stride_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, lv_draw_buf_width_to_stride); + + +/* + * lvgl extension definition for: + * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + */ + +static mp_obj_t mp_lv_draw_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[2]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(w, h, cf, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_create_mpobj, 4, mp_lv_draw_buf_create, lv_draw_buf_create); /* @@ -46816,6 +50312,10 @@ static mp_obj_t mp_lv_text_get_size(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_mpobj, 7, mp_lv_text_get_size, lv_text_get_size); +/* Reusing lv_bidi_calculate_align_internal for lv_bidi_calculate_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align); + /* * Callback function lv_layout_register_cb @@ -46850,13 +50350,13 @@ static mp_obj_t mp_lv_layout_register(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_register_mpobj, 2, mp_lv_layout_register, lv_layout_register); -/* Reusing lv_obj_style_init for lv_flex_init */ +/* Reusing funcptr_user_cb for lv_flex_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_flex_init_mpobj, 0, mp_lv_obj_style_init, lv_flex_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_flex_init_mpobj, 0, mp_funcptr_user_cb, lv_flex_init); -/* Reusing lv_obj_style_init for lv_grid_init */ +/* Reusing funcptr_user_cb for lv_grid_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_grid_init_mpobj, 0, mp_lv_obj_style_init, lv_grid_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_grid_init_mpobj, 0, mp_funcptr_user_cb, lv_grid_init); /* @@ -46943,26 +50443,96 @@ static mp_obj_t mp_lv_style_prop_lookup_flags(size_t mp_n_args, const mp_obj_t * static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_style_prop_lookup_flags_mpobj, 1, mp_lv_style_prop_lookup_flags, lv_style_prop_lookup_flags); -/* Reusing funcptr_lv_tick_get_cb_t for lv_event_register_id */ +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_handler */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_register_id_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_event_register_id); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_handler); + +/* Reusing lv_swap_bytes_32 for lv_timer_handler_run_in_period */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_run_in_period_mpobj, 1, mp_lv_swap_bytes_32, lv_timer_handler_run_in_period); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_time_to_next */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_time_to_next_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_time_to_next); + +/* Reusing funcptr_user_cb for lv_timer_periodic_handler */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_periodic_handler_mpobj, 0, mp_funcptr_user_cb, lv_timer_periodic_handler); + + +/* + * Function NOT generated: + * Callback argument 'lv_timer_handler_resume_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data + * lv_timer_handler_resume_cb_t cb + */ /* * lvgl extension definition for: - * const char *lv_event_code_get_name(lv_event_code_t code) + * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) */ -static mp_obj_t mp_lv_event_code_get_name(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_handler_set_resume_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_code_t code = (int)mp_obj_get_int(mp_args[0]); - const char * _res = ((const char *(*)(lv_event_code_t))lv_func_ptr)(code); - return convert_to_str((void*)_res); + lv_timer_handler_resume_cb_t cb = mp_to_ptr(mp_args[0]); + void *data = mp_to_ptr(mp_args[1]); + ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_func_ptr)(cb, data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_code_get_name_mpobj, 1, mp_lv_event_code_get_name, lv_event_code_get_name); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_handler_set_resume_cb_mpobj, 2, mp_lv_timer_handler_set_resume_cb, lv_timer_handler_set_resume_cb); + +/* Reusing lv_anim_get_timer for lv_timer_create_basic */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_basic_mpobj, 0, mp_lv_anim_get_timer, lv_timer_create_basic); + + +/* + * Callback function lv_timer_create_timer_xcb + * void lv_timer_cb_t(lv_timer_t *) + */ + +GENMPY_UNUSED static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_create_timer_xcb)), 1, mp_args); + return; +} + + +/* + * lvgl extension definition for: + * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) + */ + +static mp_obj_t mp_lv_timer_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); + void *timer_xcb = mp_lv_callback(mp_args[0], &lv_timer_create_timer_xcb_callback, MP_QSTR_lv_timer_create_timer_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_func_ptr)(timer_xcb, period, user_data); + return mp_read_ptr_lv_timer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_create_mpobj, 3, mp_lv_timer_create, lv_timer_create); + +/* Reusing lv_obj_enable_style_refresh for lv_timer_enable */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_enable_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_timer_enable); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_idle */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_idle_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_idle); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_timer_get_time_until_next */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_get_time_until_next_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_timer_get_time_until_next); /* @@ -46999,22 +50569,9 @@ static mp_obj_t mp_lv_display_get_default(size_t mp_n_args, const mp_obj_t *mp_a static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_display_get_default_mpobj, 0, mp_lv_display_get_default, lv_display_get_default); +/* Reusing lv_obj_move_foreground for lv_screen_load */ -/* - * lvgl extension definition for: - * void lv_screen_load(struct _lv_obj_t *scr) - */ - -static mp_obj_t mp_lv_screen_load(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - struct _lv_obj_t *scr = mp_to_lv(mp_args[0]); - ((void (*)(struct _lv_obj_t *))lv_func_ptr)(scr); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_screen_load_mpobj, 1, mp_lv_screen_load, lv_screen_load); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_screen_load_mpobj, 1, mp_lv_obj_move_foreground, lv_screen_load); /* @@ -47075,11 +50632,380 @@ static mp_obj_t mp_lv_clamp_width(size_t mp_n_args, const mp_obj_t *mp_args, voi -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_clamp_width_mpobj, 4, mp_lv_clamp_width, lv_clamp_width); - -/* Reusing lv_clamp_width for lv_clamp_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_clamp_height_mpobj, 4, mp_lv_clamp_width, lv_clamp_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_clamp_width_mpobj, 4, mp_lv_clamp_width, lv_clamp_width); + +/* Reusing lv_clamp_width for lv_clamp_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_clamp_height_mpobj, 4, mp_lv_clamp_width, lv_clamp_height); + +/* Reusing funcptr_user_cb for lv_draw_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_init_mpobj, 0, mp_funcptr_user_cb, lv_draw_init); + +/* Reusing funcptr_user_cb for lv_draw_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_deinit_mpobj, 0, mp_funcptr_user_cb, lv_draw_deinit); + +/* Reusing lv_malloc for lv_draw_create_unit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_create_unit_mpobj, 1, mp_lv_malloc, lv_draw_create_unit); + + +/* + * lvgl extension definition for: + * lv_draw_task_t *lv_draw_add_task(lv_layer_t *layer, const lv_area_t *coords, lv_draw_task_type_t type) + */ + +static mp_obj_t mp_lv_draw_add_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_draw_task_type_t type = (int)mp_obj_get_int(mp_args[2]); + lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_layer_t *, const lv_area_t *, lv_draw_task_type_t))lv_func_ptr)(layer, coords, type); + return mp_read_ptr_lv_draw_task_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_add_task_mpobj, 3, mp_lv_draw_add_task, lv_draw_add_task); + + +/* + * lvgl extension definition for: + * void lv_draw_finalize_task_creation(lv_layer_t *layer, lv_draw_task_t *t) + */ + +static mp_obj_t mp_lv_draw_finalize_task_creation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[1]); + ((void (*)(lv_layer_t *, lv_draw_task_t *))lv_func_ptr)(layer, t); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_finalize_task_creation_mpobj, 2, mp_lv_draw_finalize_task_creation, lv_draw_finalize_task_creation); + +/* Reusing funcptr_user_cb for lv_draw_dispatch */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_mpobj, 0, mp_funcptr_user_cb, lv_draw_dispatch); + +/* Reusing funcptr_user_cb for lv_draw_dispatch_wait_for_request */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_wait_for_request_mpobj, 0, mp_funcptr_user_cb, lv_draw_dispatch_wait_for_request); + +/* Reusing funcptr_user_cb for lv_draw_wait_for_finish */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_wait_for_finish_mpobj, 0, mp_funcptr_user_cb, lv_draw_wait_for_finish); + +/* Reusing funcptr_user_cb for lv_draw_dispatch_request */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_request_mpobj, 0, mp_funcptr_user_cb, lv_draw_dispatch_request); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_draw_get_unit_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_get_unit_count_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_draw_get_unit_count); + + +/* + * lvgl extension definition for: + * lv_draw_task_t *lv_draw_get_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) + */ + +static mp_obj_t mp_lv_draw_get_available_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(mp_args[1]); + uint8_t draw_unit_id = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_func_ptr)(layer, t_prev, draw_unit_id); + return mp_read_ptr_lv_draw_task_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_get_available_task_mpobj, 3, mp_lv_draw_get_available_task, lv_draw_get_available_task); + +/* Reusing lv_draw_get_available_task for lv_draw_get_next_available_task */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_get_next_available_task_mpobj, 3, mp_lv_draw_get_available_task, lv_draw_get_next_available_task); + + +/* + * lvgl extension definition for: + * void lv_draw_unit_send_event(const char *name, lv_event_code_t code, void *param) + */ + +static mp_obj_t mp_lv_draw_unit_send_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const char *name = (const char *)(char*)convert_from_str(mp_args[0]); + lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); + void *param = mp_to_ptr(mp_args[2]); + ((void (*)(const char *, lv_event_code_t, void *))lv_func_ptr)(name, code, param); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_unit_send_event_mpobj, 3, mp_lv_draw_unit_send_event, lv_draw_unit_send_event); + + +/* + * lvgl extension definition for: + * lv_layer_t *lv_draw_layer_create(lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + */ + +static mp_obj_t mp_lv_draw_layer_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_layer_t * _res = ((lv_layer_t *(*)(lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_func_ptr)(parent_layer, color_format, area); + return mp_read_ptr_lv_layer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_create_mpobj, 3, mp_lv_draw_layer_create, lv_draw_layer_create); + + +/* + * lvgl extension definition for: + * void lv_draw_layer_init(lv_layer_t *layer, lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + */ + +static mp_obj_t mp_lv_draw_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_layer_t *, lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_func_ptr)(layer, parent_layer, color_format, area); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_init_mpobj, 4, mp_lv_draw_layer_init, lv_draw_layer_init); + + +/* + * lvgl extension definition for: + * void *lv_draw_layer_alloc_buf(lv_layer_t *layer) + */ + +static mp_obj_t mp_lv_draw_layer_alloc_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + void * _res = ((void *(*)(lv_layer_t *))lv_func_ptr)(layer); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_alloc_buf_mpobj, 1, mp_lv_draw_layer_alloc_buf, lv_draw_layer_alloc_buf); + + +/* + * lvgl extension definition for: + * void *lv_draw_layer_go_to_xy(lv_layer_t *layer, int32_t x, int32_t y) + */ + +static mp_obj_t mp_lv_draw_layer_go_to_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(lv_layer_t *, int32_t, int32_t))lv_func_ptr)(layer, x, y); + return ptr_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_go_to_xy_mpobj, 3, mp_lv_draw_layer_go_to_xy, lv_draw_layer_go_to_xy); + + +/* + * lvgl extension definition for: + * lv_layer_t *lv_draw_layer_create_drop_shadow(lv_layer_t *parent_layer, const lv_draw_dsc_base_t *base, const lv_area_t *area) + */ + +static mp_obj_t mp_lv_draw_layer_create_drop_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(mp_args[1]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_layer_t * _res = ((lv_layer_t *(*)(lv_layer_t *, const lv_draw_dsc_base_t *, const lv_area_t *))lv_func_ptr)(parent_layer, base, area); + return mp_read_ptr_lv_layer_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_create_drop_shadow_mpobj, 3, mp_lv_draw_layer_create_drop_shadow, lv_draw_layer_create_drop_shadow); + + +/* + * lvgl extension definition for: + * void lv_draw_layer_finish_drop_shadow(lv_layer_t *drop_shadow_layer, const lv_draw_dsc_base_t *base) + */ + +static mp_obj_t mp_lv_draw_layer_finish_drop_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *drop_shadow_layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(mp_args[1]); + ((void (*)(lv_layer_t *, const lv_draw_dsc_base_t *))lv_func_ptr)(drop_shadow_layer, base); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_finish_drop_shadow_mpobj, 2, mp_lv_draw_layer_finish_drop_shadow, lv_draw_layer_finish_drop_shadow); + +/* Reusing lv_layer_init for lv_draw_layer_dealloc_buf */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_dealloc_buf_mpobj, 1, mp_lv_layer_init, lv_draw_layer_dealloc_buf); + +/* Reusing lv_layer_init for lv_draw_layer_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_deinit_mpobj, 1, mp_lv_layer_init, lv_draw_layer_deinit); + +/* Reusing lv_layer_init for lv_draw_layer_delete */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_delete_mpobj, 1, mp_lv_layer_init, lv_draw_layer_delete); + + +/* + * lvgl extension definition for: + * void lv_draw_fill(lv_layer_t *layer, const lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + */ + +static mp_obj_t mp_lv_draw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_fill_dsc_t *dsc = (const lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_layer_t *, const lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_fill_mpobj, 3, mp_lv_draw_fill, lv_draw_fill); + + +/* + * lvgl extension definition for: + * void lv_draw_border(lv_layer_t *layer, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + */ + +static mp_obj_t mp_lv_draw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_layer_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_border_mpobj, 3, mp_lv_draw_border, lv_draw_border); + + +/* + * lvgl extension definition for: + * void lv_draw_box_shadow(lv_layer_t *layer, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + */ + +static mp_obj_t mp_lv_draw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_layer_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_box_shadow_mpobj, 3, mp_lv_draw_box_shadow, lv_draw_box_shadow); + + +/* + * lvgl extension definition for: + * void lv_draw_rect(lv_layer_t *layer, const lv_draw_rect_dsc_t *dsc, const lv_area_t *coords) + */ + +static mp_obj_t mp_lv_draw_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_rect_dsc_t *dsc = (const lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_layer_t *, const lv_draw_rect_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_rect_mpobj, 3, mp_lv_draw_rect, lv_draw_rect); + + +/* + * lvgl extension definition for: + * void lv_draw_label(lv_layer_t *layer, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + */ + +static mp_obj_t mp_lv_draw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_layer_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_label_mpobj, 3, mp_lv_draw_label, lv_draw_label); + + +/* + * lvgl extension definition for: + * void lv_draw_character(lv_layer_t *layer, lv_draw_label_dsc_t *dsc, const lv_point_t *point, uint32_t unicode_letter) + */ + +static mp_obj_t mp_lv_draw_character(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_draw_label_dsc_t *dsc = mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); + uint32_t unicode_letter = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_layer_t *, lv_draw_label_dsc_t *, const lv_point_t *, uint32_t))lv_func_ptr)(layer, dsc, point, unicode_letter); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_character_mpobj, 4, mp_lv_draw_character, lv_draw_character); + + +/* + * lvgl extension definition for: + * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) + */ + +static mp_obj_t mp_lv_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); + ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_func_ptr)(layer, dsc, point); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_letter_mpobj, 3, mp_lv_draw_letter, lv_draw_letter); /* @@ -47249,1019 +51175,952 @@ static mp_obj_t mp_lv_fs_path_join(size_t mp_n_args, const mp_obj_t *mp_args, vo static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_path_join_mpobj, 4, mp_lv_fs_path_join, lv_fs_path_join); -/* Reusing lv_obj_style_init for lv_draw_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_init_mpobj, 0, mp_lv_obj_style_init, lv_draw_init); - -/* Reusing lv_obj_style_init for lv_draw_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_deinit_mpobj, 0, mp_lv_obj_style_init, lv_draw_deinit); - -/* Reusing lv_malloc for lv_draw_create_unit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_create_unit_mpobj, 1, mp_lv_malloc, lv_draw_create_unit); - /* * lvgl extension definition for: - * lv_draw_task_t *lv_draw_add_task(lv_layer_t *layer, const lv_area_t *coords, lv_draw_task_type_t type) + * void lv_draw_image(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_draw_add_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_draw_task_type_t type = (int)mp_obj_get_int(mp_args[2]); - lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_layer_t *, const lv_area_t *, lv_draw_task_type_t))lv_func_ptr)(layer, coords, type); - return mp_read_ptr_lv_draw_task_t((void*)_res); + const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_add_task_mpobj, 3, mp_lv_draw_add_task, lv_draw_add_task); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_image_mpobj, 3, mp_lv_draw_image, lv_draw_image); + +/* Reusing lv_draw_image for lv_draw_layer */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_mpobj, 3, mp_lv_draw_image, lv_draw_layer); /* * lvgl extension definition for: - * void lv_draw_finalize_task_creation(lv_layer_t *layer, lv_draw_task_t *t) + * void lv_draw_line(lv_layer_t *layer, const lv_draw_line_dsc_t *dsc) */ -static mp_obj_t mp_lv_draw_finalize_task_creation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_line(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[1]); - ((void (*)(lv_layer_t *, lv_draw_task_t *))lv_func_ptr)(layer, t); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + ((void (*)(lv_layer_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(layer, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_finalize_task_creation_mpobj, 2, mp_lv_draw_finalize_task_creation, lv_draw_finalize_task_creation); - -/* Reusing lv_obj_style_init for lv_draw_dispatch */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_mpobj, 0, mp_lv_obj_style_init, lv_draw_dispatch); - -/* Reusing lv_obj_style_init for lv_draw_dispatch_wait_for_request */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_wait_for_request_mpobj, 0, mp_lv_obj_style_init, lv_draw_dispatch_wait_for_request); - -/* Reusing lv_obj_style_init for lv_draw_wait_for_finish */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_wait_for_finish_mpobj, 0, mp_lv_obj_style_init, lv_draw_wait_for_finish); - -/* Reusing lv_obj_style_init for lv_draw_dispatch_request */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_dispatch_request_mpobj, 0, mp_lv_obj_style_init, lv_draw_dispatch_request); - -/* Reusing funcptr_lv_tick_get_cb_t for lv_draw_get_unit_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_get_unit_count_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_draw_get_unit_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_line_mpobj, 2, mp_lv_draw_line, lv_draw_line); /* * lvgl extension definition for: - * lv_draw_task_t *lv_draw_get_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) + * void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc) */ -static mp_obj_t mp_lv_draw_get_available_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(mp_args[1]); - uint8_t draw_unit_id = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_func_ptr)(layer, t_prev, draw_unit_id); - return mp_read_ptr_lv_draw_task_t((void*)_res); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); + ((void (*)(lv_layer_t *, const lv_draw_arc_dsc_t *))lv_func_ptr)(layer, dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_get_available_task_mpobj, 3, mp_lv_draw_get_available_task, lv_draw_get_available_task); - -/* Reusing lv_draw_get_available_task for lv_draw_get_next_available_task */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_get_next_available_task_mpobj, 3, mp_lv_draw_get_available_task, lv_draw_get_next_available_task); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_arc_mpobj, 2, mp_lv_draw_arc, lv_draw_arc); /* * lvgl extension definition for: - * void lv_draw_unit_send_event(const char *name, lv_event_code_t code, void *param) + * void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area) */ -static mp_obj_t mp_lv_draw_unit_send_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_arc_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *name = (const char *)(char*)convert_from_str(mp_args[0]); - lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); - void *param = mp_to_ptr(mp_args[2]); - ((void (*)(const char *, lv_event_code_t, void *))lv_func_ptr)(name, code, param); + int32_t x = (int32_t)mp_obj_get_int(mp_args[0]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[1]); + uint16_t radius = (uint16_t)mp_obj_get_int(mp_args[2]); + lv_value_precise_t start_angle = (float)mp_obj_get_float(mp_args[3]); + lv_value_precise_t end_angle = (float)mp_obj_get_float(mp_args[4]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[5]); + bool rounded = mp_obj_is_true(mp_args[6]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[7]); + ((void (*)(int32_t, int32_t, uint16_t, lv_value_precise_t, lv_value_precise_t, int32_t, bool, lv_area_t *))lv_func_ptr)(x, y, radius, start_angle, end_angle, w, rounded, area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_unit_send_event_mpobj, 3, mp_lv_draw_unit_send_event, lv_draw_unit_send_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_arc_get_area_mpobj, 8, mp_lv_draw_arc_get_area, lv_draw_arc_get_area); /* * lvgl extension definition for: - * lv_layer_t *lv_draw_layer_create(lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + * void lv_draw_triangle(lv_layer_t *layer, const lv_draw_triangle_dsc_t *draw_dsc) */ -static mp_obj_t mp_lv_draw_layer_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_layer_t * _res = ((lv_layer_t *(*)(lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_func_ptr)(parent_layer, color_format, area); - return mp_read_ptr_lv_layer_t((void*)_res); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + const lv_draw_triangle_dsc_t *draw_dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); + ((void (*)(lv_layer_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(layer, draw_dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_create_mpobj, 3, mp_lv_draw_layer_create, lv_draw_layer_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_triangle_mpobj, 2, mp_lv_draw_triangle, lv_draw_triangle); /* * lvgl extension definition for: - * void lv_draw_layer_init(lv_layer_t *layer, lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + * void lv_draw_blur(lv_layer_t *layer, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_draw_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_layer_t *, lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_func_ptr)(layer, parent_layer, color_format, area); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_layer_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_init_mpobj, 4, mp_lv_draw_layer_init, lv_draw_layer_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_blur_mpobj, 3, mp_lv_draw_blur, lv_draw_blur); /* * lvgl extension definition for: - * void *lv_draw_layer_alloc_buf(lv_layer_t *layer) + * lv_indev_t *lv_indev_create(void) */ -static mp_obj_t mp_lv_draw_layer_alloc_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_indev_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - void * _res = ((void *(*)(lv_layer_t *))lv_func_ptr)(layer); - return ptr_to_mp((void*)_res); + + lv_indev_t * _res = ((lv_indev_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_indev_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_alloc_buf_mpobj, 1, mp_lv_draw_layer_alloc_buf, lv_draw_layer_alloc_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_create_mpobj, 0, mp_lv_indev_create, lv_indev_create); +/* Reusing funcptr_lv_timer_cb_t for lv_indev_read_timer_cb */ -/* - * lvgl extension definition for: - * void *lv_draw_layer_go_to_xy(lv_layer_t *layer, int32_t x, int32_t y) - */ - -static mp_obj_t mp_lv_draw_layer_go_to_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(lv_layer_t *, int32_t, int32_t))lv_func_ptr)(layer, x, y); - return ptr_to_mp((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_read_timer_cb_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_indev_read_timer_cb); + +/* Reusing lv_indev_create for lv_indev_active */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_active_mpobj, 0, mp_lv_indev_create, lv_indev_active); + +/* Reusing funcptr_lv_screen_create_cb_t for lv_indev_get_active_obj */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_go_to_xy_mpobj, 3, mp_lv_draw_layer_go_to_xy, lv_draw_layer_go_to_xy); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_get_active_obj_mpobj, 0, mp_funcptr_lv_screen_create_cb_t, lv_indev_get_active_obj); /* * lvgl extension definition for: - * lv_layer_t *lv_draw_layer_create_drop_shadow(lv_layer_t *parent_layer, const lv_draw_dsc_base_t *base, const lv_area_t *area) + * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) */ -static mp_obj_t mp_lv_draw_layer_create_drop_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_indev_search_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(mp_args[1]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_layer_t * _res = ((lv_layer_t *(*)(lv_layer_t *, const lv_draw_dsc_base_t *, const lv_area_t *))lv_func_ptr)(parent_layer, base, area); - return mp_read_ptr_lv_layer_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, point); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_create_drop_shadow_mpobj, 3, mp_lv_draw_layer_create_drop_shadow, lv_draw_layer_create_drop_shadow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_search_obj_mpobj, 2, mp_lv_indev_search_obj, lv_indev_search_obj); /* * lvgl extension definition for: - * void lv_draw_layer_finish_drop_shadow(lv_layer_t *drop_shadow_layer, const lv_draw_dsc_base_t *base) + * lv_subject_t *lv_subject_create(lv_subject_type_t type) */ -static mp_obj_t mp_lv_draw_layer_finish_drop_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_subject_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *drop_shadow_layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(mp_args[1]); - ((void (*)(lv_layer_t *, const lv_draw_dsc_base_t *))lv_func_ptr)(drop_shadow_layer, base); - return mp_const_none; + lv_subject_type_t type = (int)mp_obj_get_int(mp_args[0]); + lv_subject_t * _res = ((lv_subject_t *(*)(lv_subject_type_t))lv_func_ptr)(type); + return mp_read_ptr_lv_subject_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_finish_drop_shadow_mpobj, 2, mp_lv_draw_layer_finish_drop_shadow, lv_draw_layer_finish_drop_shadow); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_subject_create_mpobj, 1, mp_lv_subject_create, lv_subject_create); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_now */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_now_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_now); + +/* Reusing funcptr_lv_timer_cb_t for lv_display_refr_timer */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_display_refr_timer_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_display_refr_timer); /* * lvgl extension definition for: - * void lv_draw_fill(lv_layer_t *layer, const lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) */ -static mp_obj_t mp_lv_draw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_fill_dsc_t *dsc = (const lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_layer_t *, const lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); + ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(layer, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_fill_mpobj, 3, mp_lv_draw_fill, lv_draw_fill); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_mask_rect_mpobj, 2, mp_lv_draw_mask_rect, lv_draw_mask_rect); /* * lvgl extension definition for: - * void lv_draw_border(lv_layer_t *layer, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) */ -static mp_obj_t mp_lv_draw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_snapshot_take(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_layer_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, cf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_border_mpobj, 3, mp_lv_draw_border, lv_draw_border); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_take); + +/* Reusing lv_snapshot_take for lv_snapshot_create_draw_buf */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_create_draw_buf_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_create_draw_buf); /* * lvgl extension definition for: - * void lv_draw_box_shadow(lv_layer_t *layer, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_snapshot_reshape_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_layer_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_func_ptr)(obj, draw_buf); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_box_shadow_mpobj, 3, mp_lv_draw_box_shadow, lv_draw_box_shadow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_reshape_draw_buf_mpobj, 2, mp_lv_snapshot_reshape_draw_buf, lv_snapshot_reshape_draw_buf); /* * lvgl extension definition for: - * void lv_draw_rect(lv_layer_t *layer, const lv_draw_rect_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_snapshot_take_to_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_rect_dsc_t *dsc = (const lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_layer_t *, const lv_draw_rect_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_func_ptr)(obj, cf, draw_buf); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_rect_mpobj, 3, mp_lv_draw_rect, lv_draw_rect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_draw_buf_mpobj, 3, mp_lv_snapshot_take_to_draw_buf, lv_snapshot_take_to_draw_buf); + +/* Reusing lv_image_buf_free for lv_snapshot_free */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_snapshot_free_mpobj, 1, mp_lv_image_buf_free, lv_snapshot_free); /* * lvgl extension definition for: - * void lv_draw_label(lv_layer_t *layer, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) */ -static mp_obj_t mp_lv_draw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_snapshot_take_to_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_layer_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(mp_args[2]); + void *buf = mp_to_ptr(mp_args[3]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_func_ptr)(obj, cf, dsc, buf, buf_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_label_mpobj, 3, mp_lv_draw_label, lv_draw_label); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_buf_mpobj, 5, mp_lv_snapshot_take_to_buf, lv_snapshot_take_to_buf); /* * lvgl extension definition for: - * void lv_draw_character(lv_layer_t *layer, lv_draw_label_dsc_t *dsc, const lv_point_t *point, uint32_t unicode_letter) + * void lv_draw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) */ -static mp_obj_t mp_lv_draw_character(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_i1_to_argb8888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_draw_label_dsc_t *dsc = mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); - uint32_t unicode_letter = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_layer_t *, lv_draw_label_dsc_t *, const lv_point_t *, uint32_t))lv_func_ptr)(layer, dsc, point, unicode_letter); + const void *buf_i1 = (const void *)mp_to_ptr(mp_args[0]); + void *buf_argb8888 = mp_to_ptr(mp_args[1]); + uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t buf_i1_stride = (uint32_t)mp_obj_get_int(mp_args[4]); + uint32_t buf_argb8888_stride = (uint32_t)mp_obj_get_int(mp_args[5]); + uint32_t index0_color = (uint32_t)mp_obj_get_int(mp_args[6]); + uint32_t index1_color = (uint32_t)mp_obj_get_int(mp_args[7]); + ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_character_mpobj, 4, mp_lv_draw_character, lv_draw_character); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_i1_to_argb8888_mpobj, 8, mp_lv_draw_i1_to_argb8888, lv_draw_i1_to_argb8888); /* * lvgl extension definition for: - * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) + * void lv_draw_rgb565_swap(void *buf, uint32_t buf_size_px) */ -static mp_obj_t mp_lv_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_rgb565_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); - ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_func_ptr)(layer, dsc, point); + void *buf = mp_to_ptr(mp_args[0]); + uint32_t buf_size_px = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(void *, uint32_t))lv_func_ptr)(buf, buf_size_px); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_letter_mpobj, 3, mp_lv_draw_letter, lv_draw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_rgb565_swap_mpobj, 2, mp_lv_draw_rgb565_swap, lv_draw_rgb565_swap); + +/* Reusing lv_draw_rgb565_swap for lv_draw_i1_invert */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_i1_invert_mpobj, 2, mp_lv_draw_rgb565_swap, lv_draw_i1_invert); /* * lvgl extension definition for: - * void lv_draw_image(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) */ -static mp_obj_t mp_lv_draw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_i1_convert_to_vtiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); + const void *buf = (const void *)mp_to_ptr(mp_args[0]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); + void *out_buf = mp_to_ptr(mp_args[4]); + uint32_t out_buf_size = (uint32_t)mp_obj_get_int(mp_args[5]); + bool bit_order_lsb = mp_obj_is_true(mp_args[6]); + ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_func_ptr)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_image_mpobj, 3, mp_lv_draw_image, lv_draw_image); - -/* Reusing lv_draw_image for lv_draw_layer */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_layer_mpobj, 3, mp_lv_draw_image, lv_draw_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_i1_convert_to_vtiled_mpobj, 7, mp_lv_draw_i1_convert_to_vtiled, lv_draw_i1_convert_to_vtiled); /* * lvgl extension definition for: - * void lv_draw_line(lv_layer_t *layer, const lv_draw_line_dsc_t *dsc) + * void lv_draw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_draw_line(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_rotate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - ((void (*)(lv_layer_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(layer, dsc); + const void *src = (const void *)mp_to_ptr(mp_args[0]); + void *dest = mp_to_ptr(mp_args[1]); + int32_t src_width = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t src_height = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); + int32_t dest_stride = (int32_t)mp_obj_get_int(mp_args[5]); + lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[6]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[7]); + ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_func_ptr)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_line_mpobj, 2, mp_lv_draw_line, lv_draw_line); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_rotate_mpobj, 8, mp_lv_draw_rotate, lv_draw_rotate); /* * lvgl extension definition for: - * void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc) + * lv_font_t *lv_binfont_create(const char *path) */ -static mp_obj_t mp_lv_draw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_binfont_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); - ((void (*)(lv_layer_t *, const lv_draw_arc_dsc_t *))lv_func_ptr)(layer, dsc); - return mp_const_none; + const char *path = (const char *)(char*)convert_from_str(mp_args[0]); + lv_font_t * _res = ((lv_font_t *(*)(const char *))lv_func_ptr)(path); + return mp_read_ptr_lv_font_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_arc_mpobj, 2, mp_lv_draw_arc, lv_draw_arc); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_binfont_create_mpobj, 1, mp_lv_binfont_create, lv_binfont_create); /* * lvgl extension definition for: - * void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area) + * lv_font_t *lv_binfont_create_from_buffer(void *buffer, uint32_t size) */ -static mp_obj_t mp_lv_draw_arc_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_binfont_create_from_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - int32_t x = (int32_t)mp_obj_get_int(mp_args[0]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[1]); - uint16_t radius = (uint16_t)mp_obj_get_int(mp_args[2]); - lv_value_precise_t start_angle = (float)mp_obj_get_float(mp_args[3]); - lv_value_precise_t end_angle = (float)mp_obj_get_float(mp_args[4]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[5]); - bool rounded = mp_obj_is_true(mp_args[6]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[7]); - ((void (*)(int32_t, int32_t, uint16_t, lv_value_precise_t, lv_value_precise_t, int32_t, bool, lv_area_t *))lv_func_ptr)(x, y, radius, start_angle, end_angle, w, rounded, area); - return mp_const_none; + void *buffer = mp_to_ptr(mp_args[0]); + uint32_t size = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_font_t * _res = ((lv_font_t *(*)(void *, uint32_t))lv_func_ptr)(buffer, size); + return mp_read_ptr_lv_font_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_arc_get_area_mpobj, 8, mp_lv_draw_arc_get_area, lv_draw_arc_get_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_binfont_create_from_buffer_mpobj, 2, mp_lv_binfont_create_from_buffer, lv_binfont_create_from_buffer); + +/* Reusing funcptr_delete_cb for lv_binfont_destroy */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_binfont_destroy_mpobj, 1, mp_funcptr_delete_cb, lv_binfont_destroy); /* - * lvgl extension definition for: - * void lv_draw_triangle(lv_layer_t *layer, const lv_draw_triangle_dsc_t *draw_dsc) + * Callback function lv_imgfont_create_path_cb + * const void *lv_imgfont_get_path_cb_t(const lv_font_t *font, uint32_t unicode, uint32_t unicode_next, int32_t *offset_y, void *user_data) */ -static mp_obj_t mp_lv_draw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static const void * lv_imgfont_create_path_cb_callback(const lv_font_t *arg0, uint32_t arg1, uint32_t arg2, int32_t *arg3, void *arg4) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_triangle_dsc_t *draw_dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); - ((void (*)(lv_layer_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(layer, draw_dsc); - return mp_const_none; + mp_obj_t mp_args[5]; + mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); + mp_args[1] = mp_obj_new_int_from_uint(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_args[3] = mp_array_from_i32ptr((void*)arg3); + mp_args[4] = ptr_to_mp((void*)arg4); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg4); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_imgfont_create_path_cb)), 5, mp_args); + return mp_to_ptr(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_triangle_mpobj, 2, mp_lv_draw_triangle, lv_draw_triangle); - /* * lvgl extension definition for: - * void lv_draw_blur(lv_layer_t *layer, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * lv_font_t *lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void *user_data) */ -static mp_obj_t mp_lv_draw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_imgfont_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_layer_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(layer, dsc, coords); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[2]); + void *path_cb = mp_lv_callback(mp_args[1], &lv_imgfont_create_path_cb_callback, MP_QSTR_lv_imgfont_create_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + uint16_t height = (uint16_t)mp_obj_get_int(mp_args[0]); + lv_font_t * _res = ((lv_font_t *(*)(uint16_t, lv_imgfont_get_path_cb_t, void *))lv_func_ptr)(height, path_cb, user_data); + return mp_read_ptr_lv_font_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_blur_mpobj, 3, mp_lv_draw_blur, lv_draw_blur); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_imgfont_create_mpobj, 3, mp_lv_imgfont_create, lv_imgfont_create); +/* Reusing funcptr_delete_cb for lv_imgfont_destroy */ -/* - * lvgl extension definition for: - * lv_group_t *lv_group_create(void) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_imgfont_destroy_mpobj, 1, mp_funcptr_delete_cb, lv_imgfont_destroy); + +/* Reusing funcptr_user_cb for lv_fs_memfs_init */ -static mp_obj_t mp_lv_group_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_memfs_init_mpobj, 0, mp_funcptr_user_cb, lv_fs_memfs_init); - lv_group_t * _res = ((lv_group_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_group_t((void*)_res); -} +/* Reusing funcptr_user_cb for lv_bin_decoder_init */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_init_mpobj, 0, mp_funcptr_user_cb, lv_bin_decoder_init); + +/* Reusing funcptr_lv_image_decoder_info_f_t for lv_bin_decoder_info */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_create_mpobj, 0, mp_lv_group_create, lv_group_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_info_mpobj, 3, mp_funcptr_lv_image_decoder_info_f_t, lv_bin_decoder_info); -/* Reusing lv_group_create for lv_group_get_default */ +/* Reusing funcptr_lv_image_decoder_get_area_cb_t for lv_bin_decoder_get_area */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_default_mpobj, 0, mp_lv_group_create, lv_group_get_default); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_get_area_mpobj, 4, mp_funcptr_lv_image_decoder_get_area_cb_t, lv_bin_decoder_get_area); -/* Reusing lv_obj_set_parent for lv_group_swap_obj */ +/* Reusing funcptr_lv_image_decoder_open_f_t for lv_bin_decoder_open */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_swap_obj_mpobj, 2, mp_lv_obj_set_parent, lv_group_swap_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_open_mpobj, 2, mp_funcptr_lv_image_decoder_open_f_t, lv_bin_decoder_open); -/* Reusing lv_obj_move_foreground for lv_group_remove_obj */ +/* Reusing funcptr_lv_image_decoder_close_f_t for lv_bin_decoder_close */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_remove_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_remove_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_close_mpobj, 2, mp_funcptr_lv_image_decoder_close_f_t, lv_bin_decoder_close); -/* Reusing lv_obj_move_foreground for lv_group_focus_obj */ +/* Reusing funcptr_user_cb for lv_lodepng_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_group_focus_obj_mpobj, 1, mp_lv_obj_move_foreground, lv_group_focus_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_init_mpobj, 0, mp_funcptr_user_cb, lv_lodepng_init); -/* Reusing funcptr_lv_tick_get_cb_t for lv_group_get_count */ +/* Reusing funcptr_user_cb for lv_lodepng_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_get_count_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_group_get_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_deinit_mpobj, 0, mp_funcptr_user_cb, lv_lodepng_deinit); /* - * lvgl extension definition for: - * lv_group_t *lv_group_by_index(uint32_t index) + * Callback function lv_async_call_async_xcb + * void lv_async_cb_t(void *) */ -static mp_obj_t mp_lv_group_by_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_async_call_async_xcb_callback(void *arg0) { - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_group_t * _res = ((lv_group_t *(*)(uint32_t))lv_func_ptr)(index); - return mp_read_ptr_lv_group_t((void*)_res); + mp_obj_t mp_args[1]; + mp_args[0] = ptr_to_mp((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_async_call_async_xcb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_by_index_mpobj, 1, mp_lv_group_by_index, lv_group_by_index); - /* * lvgl extension definition for: - * lv_indev_t *lv_indev_create(void) + * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) */ -static mp_obj_t mp_lv_indev_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_async_call(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_indev_t * _res = ((lv_indev_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_indev_t((void*)_res); + void *user_data = mp_to_ptr(mp_args[1]); + void *async_xcb = mp_lv_callback(mp_args[0], &lv_async_call_async_xcb_callback, MP_QSTR_lv_async_call_async_xcb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_result_t _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_func_ptr)(async_xcb, user_data); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_create_mpobj, 0, mp_lv_indev_create, lv_indev_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_mpobj, 2, mp_lv_async_call, lv_async_call); -/* Reusing funcptr_lv_timer_cb_t for lv_indev_read_timer_cb */ +/* Reusing lv_async_call for lv_async_call_cancel */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_read_timer_cb_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_indev_read_timer_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_async_call_cancel_mpobj, 2, mp_lv_async_call, lv_async_call_cancel); -/* Reusing lv_indev_create for lv_indev_active */ +/* Reusing funcptr_user_cb for lv_lock */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_active_mpobj, 0, mp_lv_indev_create, lv_indev_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_mpobj, 0, mp_funcptr_user_cb, lv_lock); -/* Reusing funcptr_lv_screen_create_cb_t for lv_indev_get_active_obj */ +/* Reusing lv_mem_test_core for lv_lock_isr */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_indev_get_active_obj_mpobj, 0, mp_funcptr_lv_screen_create_cb_t, lv_indev_get_active_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lock_isr_mpobj, 0, mp_lv_mem_test_core, lv_lock_isr); + +/* Reusing funcptr_user_cb for lv_unlock */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_unlock_mpobj, 0, mp_funcptr_user_cb, lv_unlock); + +/* Reusing funcptr_lv_delay_cb_t for lv_sleep_ms */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sleep_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_sleep_ms); /* * lvgl extension definition for: - * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) + * lv_theme_t *lv_theme_create(void) */ -static mp_obj_t mp_lv_indev_search_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, point); - return lv_to_mp((void*)_res); + + lv_theme_t * _res = ((lv_theme_t *(*)(void))lv_func_ptr)(); + return mp_read_ptr_lv_theme_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_search_obj_mpobj, 2, mp_lv_indev_search_obj, lv_indev_search_obj); - -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_now */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_now_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_now); - -/* Reusing funcptr_lv_timer_cb_t for lv_display_refr_timer */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_display_refr_timer_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_display_refr_timer); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_create_mpobj, 0, mp_lv_theme_create, lv_theme_create); /* * lvgl extension definition for: - * lv_font_t *lv_binfont_create(const char *path) + * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) */ -static mp_obj_t mp_lv_binfont_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_get_from_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const char *path = (const char *)(char*)convert_from_str(mp_args[0]); - lv_font_t * _res = ((lv_font_t *(*)(const char *))lv_func_ptr)(path); - return mp_read_ptr_lv_font_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_theme_t * _res = ((lv_theme_t *(*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_theme_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_binfont_create_mpobj, 1, mp_lv_binfont_create, lv_binfont_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_from_obj_mpobj, 1, mp_lv_theme_get_from_obj, lv_theme_get_from_obj); + +/* Reusing lv_obj_move_foreground for lv_theme_apply */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_theme_apply); /* * lvgl extension definition for: - * lv_font_t *lv_binfont_create_from_buffer(void *buffer, uint32_t size) + * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) */ -static mp_obj_t mp_lv_binfont_create_from_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_get_font_small(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *buffer = mp_to_ptr(mp_args[0]); - uint32_t size = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_font_t * _res = ((lv_font_t *(*)(void *, uint32_t))lv_func_ptr)(buffer, size); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_font_t * _res = ((const lv_font_t *(*)(lv_obj_t *))lv_func_ptr)(obj); return mp_read_ptr_lv_font_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_binfont_create_from_buffer_mpobj, 2, mp_lv_binfont_create_from_buffer, lv_binfont_create_from_buffer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_small_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_small); -/* Reusing funcptr_delete_cb for lv_binfont_destroy */ +/* Reusing lv_theme_get_font_small for lv_theme_get_font_normal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_binfont_destroy_mpobj, 1, mp_funcptr_delete_cb, lv_binfont_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_normal_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_normal); +/* Reusing lv_theme_get_font_small for lv_theme_get_font_large */ -/* - * Callback function lv_imgfont_create_path_cb - * const void *lv_imgfont_get_path_cb_t(const lv_font_t *font, uint32_t unicode, uint32_t unicode_next, int32_t *offset_y, void *user_data) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_large_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_large); + +/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_primary */ -GENMPY_UNUSED static const void * lv_imgfont_create_path_cb_callback(const lv_font_t *arg0, uint32_t arg1, uint32_t arg2, int32_t *arg3, void *arg4) -{ - mp_obj_t mp_args[5]; - mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); - mp_args[1] = mp_obj_new_int_from_uint(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_args[3] = mp_array_from_i32ptr((void*)arg3); - mp_args[4] = ptr_to_mp((void*)arg4); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg4); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_imgfont_create_path_cb)), 5, mp_args); - return mp_to_ptr(callback_result); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_primary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_primary); + +/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_secondary */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_secondary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_secondary); + /* * lvgl extension definition for: - * lv_font_t *lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void *user_data) + * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) */ -static mp_obj_t mp_lv_imgfont_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_default_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *path_cb = mp_lv_callback(mp_args[1], &lv_imgfont_create_path_cb_callback, MP_QSTR_lv_imgfont_create_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - uint16_t height = (uint16_t)mp_obj_get_int(mp_args[0]); - lv_font_t * _res = ((lv_font_t *(*)(uint16_t, lv_imgfont_get_path_cb_t, void *))lv_func_ptr)(height, path_cb, user_data); - return mp_read_ptr_lv_font_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_color_t color_primary = mp_write_lv_color_t(mp_args[1]); + lv_color_t color_secondary = mp_write_lv_color_t(mp_args[2]); + bool dark = mp_obj_is_true(mp_args[3]); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[4]); + lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_func_ptr)(disp, color_primary, color_secondary, dark, font); + return mp_read_ptr_lv_theme_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_imgfont_create_mpobj, 3, mp_lv_imgfont_create, lv_imgfont_create); - -/* Reusing funcptr_delete_cb for lv_imgfont_destroy */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_imgfont_destroy_mpobj, 1, mp_funcptr_delete_cb, lv_imgfont_destroy); - -/* Reusing lv_obj_style_init for lv_span_stack_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_init_mpobj, 0, mp_lv_obj_style_init, lv_span_stack_init); - -/* Reusing lv_obj_style_init for lv_span_stack_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_deinit_mpobj, 0, mp_lv_obj_style_init, lv_span_stack_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_init_mpobj, 5, mp_lv_theme_default_init, lv_theme_default_init); -/* Reusing lv_obj_style_init for lv_bin_decoder_init */ +/* Reusing lv_image_cache_is_enabled for lv_theme_default_is_inited */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_init_mpobj, 0, mp_lv_obj_style_init, lv_bin_decoder_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_is_inited_mpobj, 0, mp_lv_image_cache_is_enabled, lv_theme_default_is_inited); -/* Reusing funcptr_lv_image_decoder_info_f_t for lv_bin_decoder_info */ +/* Reusing lv_theme_create for lv_theme_default_get */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_info_mpobj, 3, mp_funcptr_lv_image_decoder_info_f_t, lv_bin_decoder_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_get_mpobj, 0, mp_lv_theme_create, lv_theme_default_get); -/* Reusing funcptr_lv_image_decoder_get_area_cb_t for lv_bin_decoder_get_area */ +/* Reusing funcptr_user_cb for lv_theme_default_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_get_area_mpobj, 4, mp_funcptr_lv_image_decoder_get_area_cb_t, lv_bin_decoder_get_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_deinit_mpobj, 0, mp_funcptr_user_cb, lv_theme_default_deinit); -/* Reusing funcptr_lv_image_decoder_open_f_t for lv_bin_decoder_open */ +/* Reusing funcptr_lv_delay_cb_t for lv_tick_inc */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_open_mpobj, 2, mp_funcptr_lv_image_decoder_open_f_t, lv_bin_decoder_open); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_inc_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_tick_inc); -/* Reusing funcptr_lv_image_decoder_close_f_t for lv_bin_decoder_close */ +/* Reusing funcptr_lv_tick_get_cb_t for lv_tick_get */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bin_decoder_close_mpobj, 2, mp_funcptr_lv_image_decoder_close_f_t, lv_bin_decoder_close); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_tick_get); -/* Reusing lv_obj_style_init for lv_fs_memfs_init */ +/* Reusing lv_swap_bytes_32 for lv_tick_elaps */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_memfs_init_mpobj, 0, mp_lv_obj_style_init, lv_fs_memfs_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_elaps_mpobj, 1, mp_lv_swap_bytes_32, lv_tick_elaps); -/* Reusing lv_obj_style_init for lv_lodepng_init */ +/* Reusing lv_rand for lv_tick_diff */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_init_mpobj, 0, mp_lv_obj_style_init, lv_lodepng_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_diff_mpobj, 2, mp_lv_rand, lv_tick_diff); -/* Reusing lv_obj_style_init for lv_lodepng_deinit */ +/* Reusing funcptr_lv_delay_cb_t for lv_delay_ms */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lodepng_deinit_mpobj, 0, mp_lv_obj_style_init, lv_lodepng_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_ms_mpobj, 1, mp_funcptr_lv_delay_cb_t, lv_delay_ms); /* - * lvgl extension definition for: - * void lv_draw_sw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) + * Function NOT generated: + * Callback argument 'lv_delay_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data + * lv_delay_cb_t cb */ - -static mp_obj_t mp_lv_draw_sw_i1_to_argb8888(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const void *buf_i1 = (const void *)mp_to_ptr(mp_args[0]); - void *buf_argb8888 = mp_to_ptr(mp_args[1]); - uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t buf_i1_stride = (uint32_t)mp_obj_get_int(mp_args[4]); - uint32_t buf_argb8888_stride = (uint32_t)mp_obj_get_int(mp_args[5]); - uint32_t index0_color = (uint32_t)mp_obj_get_int(mp_args[6]); - uint32_t index1_color = (uint32_t)mp_obj_get_int(mp_args[7]); - ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_i1_to_argb8888_mpobj, 8, mp_lv_draw_sw_i1_to_argb8888, lv_draw_sw_i1_to_argb8888); /* * lvgl extension definition for: - * void lv_draw_sw_rgb565_swap(void *buf, uint32_t buf_size_px) + * void lv_delay_set_cb(lv_delay_cb_t cb) */ -static mp_obj_t mp_lv_draw_sw_rgb565_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_delay_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *buf = mp_to_ptr(mp_args[0]); - uint32_t buf_size_px = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(void *, uint32_t))lv_func_ptr)(buf, buf_size_px); + lv_delay_cb_t cb = mp_to_ptr(mp_args[0]); + ((void (*)(lv_delay_cb_t))lv_func_ptr)(cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_rgb565_swap_mpobj, 2, mp_lv_draw_sw_rgb565_swap, lv_draw_sw_rgb565_swap); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_delay_set_cb_mpobj, 1, mp_lv_delay_set_cb, lv_delay_set_cb); -/* Reusing lv_draw_sw_rgb565_swap for lv_draw_sw_i1_invert */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_i1_invert_mpobj, 2, mp_lv_draw_sw_rgb565_swap, lv_draw_sw_i1_invert); +/* + * Function NOT generated: + * Callback argument 'lv_tick_get_cb_t cb' cannot be the first argument! We assume the first argument contains the user_data + * lv_tick_get_cb_t cb + */ /* * lvgl extension definition for: - * void lv_draw_sw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) + * void lv_tick_set_cb(lv_tick_get_cb_t cb) */ -static mp_obj_t mp_lv_draw_sw_i1_convert_to_vtiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tick_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *buf = (const void *)mp_to_ptr(mp_args[0]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t width = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t height = (uint32_t)mp_obj_get_int(mp_args[3]); - void *out_buf = mp_to_ptr(mp_args[4]); - uint32_t out_buf_size = (uint32_t)mp_obj_get_int(mp_args[5]); - bool bit_order_lsb = mp_obj_is_true(mp_args[6]); - ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_func_ptr)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); + lv_tick_get_cb_t cb = mp_to_ptr(mp_args[0]); + ((void (*)(lv_tick_get_cb_t))lv_func_ptr)(cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_i1_convert_to_vtiled_mpobj, 7, mp_lv_draw_sw_i1_convert_to_vtiled, lv_draw_sw_i1_convert_to_vtiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_set_cb_mpobj, 1, mp_lv_tick_set_cb, lv_tick_set_cb); /* * lvgl extension definition for: - * void lv_draw_sw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) + * lv_tick_get_cb_t lv_tick_get_cb(void) */ -static mp_obj_t mp_lv_draw_sw_rotate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_tick_get_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const void *src = (const void *)mp_to_ptr(mp_args[0]); - void *dest = mp_to_ptr(mp_args[1]); - int32_t src_width = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t src_height = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); - int32_t dest_stride = (int32_t)mp_obj_get_int(mp_args[5]); - lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[6]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[7]); - ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_func_ptr)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); - return mp_const_none; + + lv_tick_get_cb_t _res = ((lv_tick_get_cb_t (*)(void))lv_func_ptr)(); + return mp_lv_funcptr_lv_tick_get_cb_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_rotate_mpobj, 8, mp_lv_draw_sw_rotate, lv_draw_sw_rotate); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_tick_get_cb_mpobj, 0, mp_lv_tick_get_cb, lv_tick_get_cb); +/* Reusing funcptr_user_cb for lv_span_stack_init */ -/* - * lvgl extension definition for: - * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_init_mpobj, 0, mp_funcptr_user_cb, lv_span_stack_init); + +/* Reusing funcptr_user_cb for lv_span_stack_deinit */ -static mp_obj_t mp_lv_snapshot_take(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_func_ptr)(obj, cf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_span_stack_deinit_mpobj, 0, mp_funcptr_user_cb, lv_span_stack_deinit); + +/* Reusing funcptr_user_cb for lv_os_init */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_init_mpobj, 0, mp_funcptr_user_cb, lv_os_init); + +/* Reusing funcptr_lv_tick_get_cb_t for lv_os_get_idle_percent */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_take); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_get_idle_percent_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_os_get_idle_percent); -/* Reusing lv_snapshot_take for lv_snapshot_create_draw_buf */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_create_draw_buf_mpobj, 2, mp_lv_snapshot_take, lv_snapshot_create_draw_buf); +/* + * Function NOT generated: + * Callback function 'lv_iter_next_cb next_cb' must receive a struct pointer with user_data member as its first argument! + * lv_iter_next_cb next_cb + */ +#define funcptr_lv_iter_next_cb NULL + /* * lvgl extension definition for: - * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) + * lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) */ -static mp_obj_t mp_lv_snapshot_reshape_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_iter_next_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_func_ptr)(obj, draw_buf); + void *instance = mp_to_ptr(mp_args[0]); + void *context = mp_to_ptr(mp_args[1]); + void *elem = mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(void *, void *, void *))lv_func_ptr)(instance, context, elem); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_reshape_draw_buf_mpobj, 2, mp_lv_snapshot_reshape_draw_buf, lv_snapshot_reshape_draw_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_iter_next_cb_mpobj, 3, mp_funcptr_lv_iter_next_cb, funcptr_lv_iter_next_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_iter_next_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_iter_next_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) + * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) */ -static mp_obj_t mp_lv_snapshot_take_to_draw_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_iter_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_func_ptr)(obj, cf, draw_buf); - return mp_obj_new_int(_res); + void *instance = mp_to_ptr(mp_args[0]); + uint32_t elem_size = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t context_size = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_iter_next_cb next_cb = mp_to_ptr(mp_args[3]); + lv_iter_t * _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_func_ptr)(instance, elem_size, context_size, next_cb); + return mp_read_ptr_lv_iter_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_draw_buf_mpobj, 3, mp_lv_snapshot_take_to_draw_buf, lv_snapshot_take_to_draw_buf); - -/* Reusing lv_image_buf_free for lv_snapshot_free */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_snapshot_free_mpobj, 1, mp_lv_image_buf_free, lv_snapshot_free); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_iter_create_mpobj, 4, mp_lv_iter_create, lv_iter_create); /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) + * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) */ -static mp_obj_t mp_lv_snapshot_take_to_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_alloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(mp_args[2]); - void *buf = mp_to_ptr(mp_args[3]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_result_t _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_func_ptr)(obj, cf, dsc, buf, buf_size); - return mp_obj_new_int(_res); + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_func_ptr)(node_size, cache); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_snapshot_take_to_buf_mpobj, 5, mp_lv_snapshot_take_to_buf, lv_snapshot_take_to_buf); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_alloc_mpobj, 2, mp_lv_cache_entry_alloc, lv_cache_entry_alloc); /* * lvgl extension definition for: - * lv_theme_t *lv_theme_create(void) + * uint32_t lv_cache_entry_get_size(const uint32_t node_size) */ -static mp_obj_t mp_lv_theme_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - - lv_theme_t * _res = ((lv_theme_t *(*)(void))lv_func_ptr)(); - return mp_read_ptr_lv_theme_t((void*)_res); + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const uint32_t))lv_func_ptr)(node_size); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_create_mpobj, 0, mp_lv_theme_create, lv_theme_create); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_size_mpobj, 1, mp_lv_cache_entry_get_size, lv_cache_entry_get_size); /* * lvgl extension definition for: - * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) + * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) */ -static mp_obj_t mp_lv_theme_get_from_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_cache_entry_get_entry(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_theme_t * _res = ((lv_theme_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_theme_t((void*)_res); + void *data = mp_to_ptr(mp_args[0]); + const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[1]); + lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_func_ptr)(data, node_size); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_from_obj_mpobj, 1, mp_lv_theme_get_from_obj, lv_theme_get_from_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_entry_mpobj, 2, mp_lv_cache_entry_get_entry, lv_cache_entry_get_entry); -/* Reusing lv_obj_move_foreground for lv_theme_apply */ +/* Reusing funcptr_user_cb for lv_draw_sw_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_theme_apply); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_init_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_init); + +/* Reusing funcptr_user_cb for lv_draw_sw_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_deinit_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_deinit); /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) + * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t src_cf, void *dest_buf) */ -static mp_obj_t mp_lv_theme_get_font_small(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_font_t * _res = ((const lv_font_t *(*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_font_t((void*)_res); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const void *src_buf = (const void *)mp_to_ptr(mp_args[1]); + int32_t src_w = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t src_h = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[5]); + const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(mp_args[6]); + lv_color_format_t src_cf = (int)mp_obj_get_int(mp_args[7]); + void *dest_buf = mp_to_ptr(mp_args[8]); + ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_func_ptr)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, src_cf, dest_buf); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_small_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_small); - -/* Reusing lv_theme_get_font_small for lv_theme_get_font_normal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_normal_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_normal); - -/* Reusing lv_theme_get_font_small for lv_theme_get_font_large */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_font_large_mpobj, 1, mp_lv_theme_get_font_small, lv_theme_get_font_large); - -/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_primary */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_primary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_primary); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_transform_mpobj, 9, mp_lv_draw_sw_transform, lv_draw_sw_transform); -/* Reusing lv_barcode_get_dark_color for lv_theme_get_color_secondary */ +/* Reusing lv_color_format_has_alpha for lv_draw_sw_unregister_blend_handler */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_color_secondary_mpobj, 1, mp_lv_barcode_get_dark_color, lv_theme_get_color_secondary); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_unregister_blend_handler_mpobj, 1, mp_lv_color_format_has_alpha, lv_draw_sw_unregister_blend_handler); /* * lvgl extension definition for: - * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) + * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) */ -static mp_obj_t mp_lv_theme_default_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_get_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_color_t color_primary = mp_write_lv_color_t(mp_args[1]); - lv_color_t color_secondary = mp_write_lv_color_t(mp_args[2]); - bool dark = mp_obj_is_true(mp_args[3]); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[4]); - lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_func_ptr)(disp, color_primary, color_secondary, dark, font); - return mp_read_ptr_lv_theme_t((void*)_res); + lv_color_format_t dest_cf = (int)mp_obj_get_int(mp_args[0]); + lv_draw_sw_blend_handler_t _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_func_ptr)(dest_cf); + return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_init_mpobj, 5, mp_lv_theme_default_init, lv_theme_default_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_get_blend_handler_mpobj, 1, mp_lv_draw_sw_get_blend_handler, lv_draw_sw_get_blend_handler); -/* Reusing lv_image_header_cache_is_enabled for lv_theme_default_is_inited */ +/* Reusing funcptr_user_cb for lv_timer_core_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_is_inited_mpobj, 0, mp_lv_image_header_cache_is_enabled, lv_theme_default_is_inited); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_init_mpobj, 0, mp_funcptr_user_cb, lv_timer_core_init); -/* Reusing lv_theme_create for lv_theme_default_get */ +/* Reusing funcptr_user_cb for lv_timer_core_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_get_mpobj, 0, mp_lv_theme_create, lv_theme_default_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_deinit_mpobj, 0, mp_funcptr_user_cb, lv_timer_core_deinit); -/* Reusing lv_obj_style_init for lv_theme_default_deinit */ +/* Reusing funcptr_user_cb for lv_anim_core_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_theme_default_deinit_mpobj, 0, mp_lv_obj_style_init, lv_theme_default_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_init_mpobj, 0, mp_funcptr_user_cb, lv_anim_core_init); +/* Reusing funcptr_user_cb for lv_anim_core_deinit */ -/* - * lvgl extension definition for: - * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) - */ - -static mp_obj_t mp_lv_draw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); - ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(layer, dsc); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_deinit_mpobj, 0, mp_funcptr_user_cb, lv_anim_core_deinit); + +/* Reusing lv_obj_enable_style_refresh for lv_anim_enable_vsync_mode */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_enable_vsync_mode_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_anim_enable_vsync_mode); + +/* Reusing funcptr_user_cb for lv_draw_buf_init_handlers */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_mask_rect_mpobj, 2, mp_lv_draw_mask_rect, lv_draw_mask_rect); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_init_handlers_mpobj, 0, mp_funcptr_user_cb, lv_draw_buf_init_handlers); -/* Reusing lv_obj_style_init for lv_draw_sw_mask_init */ +/* Reusing funcptr_user_cb for lv_draw_sw_mask_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_init_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_mask_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_init_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_mask_init); -/* Reusing lv_obj_style_init for lv_draw_sw_mask_deinit */ +/* Reusing funcptr_user_cb for lv_draw_sw_mask_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_deinit_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_mask_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_deinit_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_mask_deinit); /* @@ -48288,183 +52147,270 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_apply_mpobj, 5, static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_free_param_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_draw_sw_mask_free_param); -/* Reusing lv_obj_style_init for lv_draw_sw_init */ +/* Reusing funcptr_user_cb for lv_draw_sw_mask_cleanup */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_cleanup_mpobj, 0, mp_funcptr_user_cb, lv_draw_sw_mask_cleanup); + +/* Reusing funcptr_user_cb for lv_layout_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_init_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_init_mpobj, 0, mp_funcptr_user_cb, lv_layout_init); -/* Reusing lv_obj_style_init for lv_draw_sw_deinit */ +/* Reusing funcptr_user_cb for lv_layout_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_deinit_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_deinit_mpobj, 0, mp_funcptr_user_cb, lv_layout_deinit); /* * lvgl extension definition for: - * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t cf, void *dest_buf) + * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) */ -static mp_obj_t mp_lv_draw_sw_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_layout_get_min_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const void *src_buf = (const void *)mp_to_ptr(mp_args[1]); - int32_t src_w = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t src_h = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t src_stride = (int32_t)mp_obj_get_int(mp_args[4]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[5]); - const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(mp_args[6]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[7]); - void *dest_buf = mp_to_ptr(mp_args[8]); - ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_func_ptr)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, cf, dest_buf); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t *size = mp_array_to_i32ptr(mp_args[1]); + bool width = mp_obj_is_true(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_func_ptr)(obj, size, width); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_transform_mpobj, 9, mp_lv_draw_sw_transform, lv_draw_sw_transform); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_get_min_size_mpobj, 3, mp_lv_layout_get_min_size, lv_layout_get_min_size); -/* Reusing lv_color_format_has_alpha for lv_draw_sw_unregister_blend_handler */ +/* Reusing lv_obj_move_foreground for lv_layout_apply */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_unregister_blend_handler_mpobj, 1, mp_lv_color_format_has_alpha, lv_draw_sw_unregister_blend_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_layout_apply); + +/* Reusing funcptr_user_cb for lv_group_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_init_mpobj, 0, mp_funcptr_user_cb, lv_group_init); + +/* Reusing funcptr_user_cb for lv_group_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_deinit_mpobj, 0, mp_funcptr_user_cb, lv_group_deinit); + +/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_event_mark_deleted */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_event_mark_deleted); + +/* Reusing funcptr_user_cb for lv_subject_global_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_subject_global_init_mpobj, 0, mp_funcptr_user_cb, lv_subject_global_init); + +/* Reusing funcptr_user_cb for lv_subject_global_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_subject_global_deinit_mpobj, 0, mp_funcptr_user_cb, lv_subject_global_deinit); + +/* Reusing funcptr_user_cb for lv_refr_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_init_mpobj, 0, mp_funcptr_user_cb, lv_refr_init); + +/* Reusing funcptr_user_cb for lv_refr_deinit */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_deinit_mpobj, 0, mp_funcptr_user_cb, lv_refr_deinit); /* * lvgl extension definition for: - * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) + * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) */ -static mp_obj_t mp_lv_draw_sw_get_blend_handler(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_inv_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_format_t dest_cf = (int)mp_obj_get_int(mp_args[0]); - lv_draw_sw_blend_handler_t _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_func_ptr)(dest_cf); - return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area_p); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_get_blend_handler_mpobj, 1, mp_lv_draw_sw_get_blend_handler, lv_draw_sw_get_blend_handler); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_inv_area_mpobj, 2, mp_lv_inv_area, lv_inv_area); -/* Reusing lv_obj_style_init for lv_os_init */ +/* Reusing lv_display_get_default for lv_refr_get_disp_refreshing */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_init_mpobj, 0, mp_lv_obj_style_init, lv_os_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_disp_refreshing_mpobj, 0, mp_lv_display_get_default, lv_refr_get_disp_refreshing); -/* Reusing funcptr_lv_tick_get_cb_t for lv_os_get_idle_percent */ +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_set_disp_refreshing */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_os_get_idle_percent_mpobj, 0, mp_funcptr_lv_tick_get_cb_t, lv_os_get_idle_percent); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_set_disp_refreshing_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_set_disp_refreshing); -/* Reusing lv_obj_style_init for lv_timer_core_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_init_mpobj, 0, mp_lv_obj_style_init, lv_timer_core_init); +/* + * lvgl extension definition for: + * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_refr_get_top_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_func_ptr)(area_p, obj); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_top_obj_mpobj, 2, mp_lv_refr_get_top_obj, lv_refr_get_top_obj); -/* Reusing lv_obj_style_init for lv_timer_core_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_timer_core_deinit_mpobj, 0, mp_lv_obj_style_init, lv_timer_core_deinit); +/* + * lvgl extension definition for: + * void lv_draw_sw_grad_color_calculate(const lv_grad_dsc_t *dsc, int32_t range, int32_t frac, lv_color_t *color_out, lv_opa_t *opa_out) + */ + +static mp_obj_t mp_lv_draw_sw_grad_color_calculate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_grad_dsc_t *dsc = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t range = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t frac = (int32_t)mp_obj_get_int(mp_args[2]); + lv_color_t *color_out = mp_write_ptr_lv_color_t(mp_args[3]); + lv_opa_t *opa_out = mp_array_to_u8ptr(mp_args[4]); + ((void (*)(const lv_grad_dsc_t *, int32_t, int32_t, lv_color_t *, lv_opa_t *))lv_func_ptr)(dsc, range, frac, color_out, opa_out); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_grad_color_calculate_mpobj, 5, mp_lv_draw_sw_grad_color_calculate, lv_draw_sw_grad_color_calculate); -/* Reusing lv_obj_style_init for lv_anim_core_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_init_mpobj, 0, mp_lv_obj_style_init, lv_anim_core_init); +/* + * lvgl extension definition for: + * lv_draw_sw_grad_calc_t *lv_draw_sw_grad_get(const lv_grad_dsc_t *gradient, int32_t w, int32_t h) + */ + +static mp_obj_t mp_lv_draw_sw_grad_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_grad_dsc_t *gradient = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h = (int32_t)mp_obj_get_int(mp_args[2]); + lv_draw_sw_grad_calc_t * _res = ((lv_draw_sw_grad_calc_t *(*)(const lv_grad_dsc_t *, int32_t, int32_t))lv_func_ptr)(gradient, w, h); + return mp_read_ptr_lv_draw_sw_grad_calc_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_grad_get_mpobj, 3, mp_lv_draw_sw_grad_get, lv_draw_sw_grad_get); -/* Reusing lv_obj_style_init for lv_anim_core_deinit */ +/* Reusing funcptr_user_cb for lv_fs_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_core_deinit_mpobj, 0, mp_lv_obj_style_init, lv_anim_core_deinit); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_init_mpobj, 0, mp_funcptr_user_cb, lv_fs_init); -/* Reusing lv_obj_enable_style_refresh for lv_anim_enable_vsync_mode */ +/* Reusing funcptr_user_cb for lv_fs_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_anim_enable_vsync_mode_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_anim_enable_vsync_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_deinit_mpobj, 0, mp_funcptr_user_cb, lv_fs_deinit); -/* Reusing lv_obj_style_init for lv_draw_buf_init_handlers */ +/* Reusing lv_obj_get_scroll_end for lv_indev_scroll_get_snap_dist */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_buf_init_handlers_mpobj, 0, mp_lv_obj_style_init, lv_draw_buf_init_handlers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_scroll_get_snap_dist_mpobj, 2, mp_lv_obj_get_scroll_end, lv_indev_scroll_get_snap_dist); /* * lvgl extension definition for: - * uint32_t lv_cache_entry_get_size(const uint32_t node_size) + * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_lv_cache_entry_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const uint32_t))lv_func_ptr)(node_size); - return mp_obj_new_int_from_uint(_res); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[0]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_func_ptr)(capacity, element_size); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_size_mpobj, 1, mp_lv_cache_entry_get_size, lv_cache_entry_get_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_mpobj, 2, mp_lv_circle_buf_create, lv_circle_buf_create); /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) + * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) */ -static mp_obj_t mp_lv_cache_entry_get_entry(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_create_from_buf(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *data = mp_to_ptr(mp_args[0]); - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[1]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_func_ptr)(data, node_size); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + void *buf = mp_to_ptr(mp_args[0]); + uint32_t capacity = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t element_size = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_func_ptr)(buf, capacity, element_size); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_get_entry_mpobj, 2, mp_lv_cache_entry_get_entry, lv_cache_entry_get_entry); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_buf_mpobj, 3, mp_lv_circle_buf_create_from_buf, lv_circle_buf_create_from_buf); /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) + * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) */ -static mp_obj_t mp_lv_cache_entry_alloc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_circle_buf_create_from_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const uint32_t node_size = (const uint32_t)(uint32_t)mp_obj_get_int(mp_args[0]); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(mp_args[1]); - lv_cache_entry_t * _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_func_ptr)(node_size, cache); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(mp_args[0]); + lv_circle_buf_t * _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_func_ptr)(array); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_cache_entry_alloc_mpobj, 2, mp_lv_cache_entry_alloc, lv_cache_entry_alloc); - -/* Reusing lv_obj_style_init for lv_draw_sw_mask_cleanup */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_draw_sw_mask_cleanup_mpobj, 0, mp_lv_obj_style_init, lv_draw_sw_mask_cleanup); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_circle_buf_create_from_array_mpobj, 1, mp_lv_circle_buf_create_from_array, lv_circle_buf_create_from_array); -/* Reusing lv_obj_style_init for lv_layout_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_init_mpobj, 0, mp_lv_obj_style_init, lv_layout_init); +/* + * Function NOT generated: + * Callback function 'lv_lru_free_cb_t value_free' must receive a struct pointer with user_data member as its first argument! + * lv_lru_free_cb_t value_free + */ -/* Reusing lv_obj_style_init for lv_layout_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_layout_deinit_mpobj, 0, mp_lv_obj_style_init, lv_layout_deinit); +/* + * Function NOT generated: + * Callback function 'lv_lru_free_cb_t key_free' must receive a struct pointer with user_data member as its first argument! + * lv_lru_free_cb_t key_free + */ /* * lvgl extension definition for: - * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) + * lv_lru_t *lv_lru_create(size_t cache_size, size_t average_length, lv_lru_free_cb_t value_free, lv_lru_free_cb_t key_free) */ -static mp_obj_t mp_lv_layout_get_min_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_lru_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t *size = mp_array_to_i32ptr(mp_args[1]); - bool width = mp_obj_is_true(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_func_ptr)(obj, size, width); - return convert_to_bool(_res); + size_t cache_size = (size_t)mp_obj_get_int(mp_args[0]); + size_t average_length = (size_t)mp_obj_get_int(mp_args[1]); + lv_lru_free_cb_t value_free = mp_to_ptr(mp_args[2]); + lv_lru_free_cb_t key_free = mp_to_ptr(mp_args[3]); + lv_lru_t * _res = ((lv_lru_t *(*)(size_t, size_t, lv_lru_free_cb_t, lv_lru_free_cb_t))lv_func_ptr)(cache_size, average_length, value_free, key_free); + return mp_read_ptr_lv_lru_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_get_min_size_mpobj, 3, mp_lv_layout_get_min_size, lv_layout_get_min_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_lru_create_mpobj, 4, mp_lv_lru_create, lv_lru_create); -/* Reusing lv_obj_move_foreground for lv_layout_apply */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layout_apply_mpobj, 1, mp_lv_obj_move_foreground, lv_layout_apply); - -/* Reusing lv_obj_get_scroll_end for lv_indev_scroll_get_snap_dist */ +/* + * lvgl extension definition for: + * lv_pending_t *lv_pending_create(size_t obj_size, uint32_t capacity_default) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_indev_scroll_get_snap_dist_mpobj, 2, mp_lv_obj_get_scroll_end, lv_indev_scroll_get_snap_dist); +static mp_obj_t mp_lv_pending_create(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + size_t obj_size = (size_t)mp_obj_get_int(mp_args[0]); + uint32_t capacity_default = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_pending_t * _res = ((lv_pending_t *(*)(size_t, uint32_t))lv_func_ptr)(obj_size, capacity_default); + return mp_read_ptr_lv_pending_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_pending_create_mpobj, 2, mp_lv_pending_create, lv_pending_create); /* @@ -48506,6 +52452,10 @@ static mp_obj_t mp_lv_text_get_width(size_t mp_n_args, const mp_obj_t *mp_args, static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_width_mpobj, 4, mp_lv_text_get_width, lv_text_get_width); +/* Reusing lv_text_get_width for lv_text_get_line_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_line_width_mpobj, 4, mp_lv_text_get_width, lv_text_get_line_width); + /* * lvgl extension definition for: @@ -48603,77 +52553,59 @@ static mp_obj_t mp_lv_text_encoded_letter_next_2(size_t mp_n_args, const mp_obj_ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_encoded_letter_next_2_mpobj, 4, mp_lv_text_encoded_letter_next_2, lv_text_encoded_letter_next_2); -/* Reusing lv_obj_style_init for lv_refr_init */ +/* Reusing lv_text_get_size for lv_text_get_size_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_init_mpobj, 0, mp_lv_obj_style_init, lv_refr_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_internal_mpobj, 7, mp_lv_text_get_size, lv_text_get_size_internal); -/* Reusing lv_obj_style_init for lv_refr_deinit */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_deinit_mpobj, 0, mp_lv_obj_style_init, lv_refr_deinit); +/* + * Function NOT generated: + * Callback function 'int (*cmp)(const void *pRef, const void *pElement)' must receive a struct pointer with user_data member as its first argument! + * int (*cmp)(const void *pRef, const void *pElement) + */ +#define funcptr_cmp NULL + /* * lvgl extension definition for: - * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) + * int cmp(const void *pRef, const void *pElement) */ -static mp_obj_t mp_lv_inv_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_cmp(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area_p); + const void *pRef = (const void *)mp_to_ptr(mp_args[0]); + const void *pElement = (const void *)mp_to_ptr(mp_args[1]); + int _res = ((int (*)(const void *, const void *))lv_func_ptr)(pRef, pElement); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_inv_area_mpobj, 2, mp_lv_inv_area, lv_inv_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_cmp_mpobj, 2, mp_funcptr_cmp, funcptr_cmp); -/* Reusing lv_display_get_default for lv_refr_get_disp_refreshing */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_cmp(void *func){ return mp_lv_funcptr(&mp_funcptr_cmp_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_disp_refreshing_mpobj, 0, mp_lv_display_get_default, lv_refr_get_disp_refreshing); - -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_refr_set_disp_refreshing */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_set_disp_refreshing_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_refr_set_disp_refreshing); - /* * lvgl extension definition for: - * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) + * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) */ -static mp_obj_t mp_lv_refr_get_top_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_utils_bsearch(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_func_ptr)(area_p, obj); - return lv_to_mp((void*)_res); + const void *key = (const void *)mp_to_ptr(mp_args[0]); + const void *base = (const void *)mp_to_ptr(mp_args[1]); + size_t n = (size_t)mp_obj_get_int(mp_args[2]); + size_t size = (size_t)mp_obj_get_int(mp_args[3]); + int (*cmp)(const void *pRef, const void *pElement) = mp_to_ptr(mp_args[4]); + void * _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_func_ptr)(key, base, n, size, cmp); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_refr_get_top_obj_mpobj, 2, mp_lv_refr_get_top_obj, lv_refr_get_top_obj); - -/* Reusing lv_obj_style_init for lv_group_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_init_mpobj, 0, mp_lv_obj_style_init, lv_group_init); - -/* Reusing lv_obj_style_init for lv_group_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_group_deinit_mpobj, 0, mp_lv_obj_style_init, lv_group_deinit); - -/* Reusing lv_obj_style_init for lv_fs_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_init_mpobj, 0, mp_lv_obj_style_init, lv_fs_init); - -/* Reusing lv_obj_style_init for lv_fs_deinit */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_fs_deinit_mpobj, 0, mp_lv_obj_style_init, lv_fs_deinit); - -/* Reusing funcptr_lv_draw_buf_free_cb_t for lv_event_mark_deleted */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, lv_event_mark_deleted); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv_utils_bsearch, lv_utils_bsearch); /* @@ -48685,6 +52617,8 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, * lv_deinit * lv_snprintf * lv_vsnprintf + * lv_tjpgd_init + * lv_tjpgd_deinit * lv_animimg_get_src * lv_arclabel_set_text_fmt * lv_label_set_text_fmt @@ -48694,8 +52628,6 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, * lv_msgbox_add_text_fmt * lv_spangroup_set_span_text_fmt * lv_table_set_cell_value_fmt - * lv_tjpgd_init - * lv_tjpgd_deinit * lv_global_default * lv_text_set_text_vfmt * @@ -48704,180 +52636,162 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_event_mark_deleted_mpobj, 1, /* - * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_cache_alloc_cb_t(void) - * void *lv_cache_alloc_cb_t(void) + * Callback function lv_font_t_get_glyph_dsc + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! bool lv_cache_init_cb_t(lv_cache_t *cache) - * bool lv_cache_init_cb_t(lv_cache_t *cache) - */ - +GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) +{ + mp_obj_t mp_args[4]; + mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_args[3] = mp_obj_new_int_from_uint(arg3); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_get_glyph_dsc)), 4, mp_args); + return mp_obj_is_true(callback_result); +} -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) - * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) - */ - /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) - * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * Callback: user_data NOT FOUND! void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) + * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) - * lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * Callback: user_data NOT FOUND! void lv_draw_buf_free_cb_t(void *draw_buf) + * void lv_draw_buf_free_cb_t(void *draw_buf) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) - * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) + * Callback: user_data NOT FOUND! void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) - * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * Callback: user_data NOT FOUND! void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) + * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) - * void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) + * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) - * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) + * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) - * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) + * Callback: user_data NOT FOUND! uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) + * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) - * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) + * Callback: user_data NOT FOUND! int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) - * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * Callback: user_data NOT FOUND! int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! bool lv_cache_create_cb_t(void *node, void *user_data) - * bool lv_cache_create_cb_t(void *node, void *user_data) + * Callback: user_data NOT FOUND! int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_cache_free_cb_t(void *node, void *user_data) - * void lv_cache_free_cb_t(void *node, void *user_data) + * Callback: user_data NOT FOUND! int32_t delete_cb(lv_draw_unit_t *draw_unit) + * int32_t delete_cb(lv_draw_unit_t *draw_unit) */ /* - * Callback function lv_font_t_get_glyph_dsc - * bool get_glyph_dsc(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next) + * Callback function lv_draw_unit_t_event_cb + * void event_cb(lv_event_t *event) */ -GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) +GENMPY_UNUSED static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) { - mp_obj_t mp_args[4]; - mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_args[3] = mp_obj_new_int_from_uint(arg3); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_get_glyph_dsc)), 4, mp_args); - return mp_obj_is_true(callback_result); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_draw_unit_t_event_cb)), 1, mp_args); + return; } /* - * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) - * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) + * Callback function lv_display_t_flush_wait_cb + * void lv_display_flush_wait_cb_t(lv_display_t *disp) */ - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_free_cb_t(void *draw_buf) - * void lv_draw_buf_free_cb_t(void *draw_buf) - */ - +GENMPY_UNUSED static void lv_display_t_flush_wait_cb_callback(lv_display_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_wait_cb)), 1, mp_args); + return; +} -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) - * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) - */ - /* - * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) - * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) + * Callback function lv_display_t_sync_wait_cb + * void lv_display_sync_wait_cb_t(lv_display_t *disp) */ - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - */ - +GENMPY_UNUSED static void lv_display_t_sync_wait_cb_callback(lv_display_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_wait_cb)), 1, mp_args); + return; +} -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - */ - /* * Function NOT generated: - * Callback: user_data NOT FOUND! uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) - * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) + * Callback: user_data NOT FOUND! void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) + * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ /* * Callback function lv_font_t_release_glyph - * void release_glyph(const lv_font_t *, lv_font_glyph_dsc_t *) + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) */ GENMPY_UNUSED static void lv_font_t_release_glyph_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1) @@ -48939,96 +52853,6 @@ GENMPY_UNUSED static int32_t lv_style_transition_dsc_t_path_xcb_callback(const l } -/* - * Callback function lv_display_t_flush_wait_cb - * void lv_display_flush_wait_cb_t(lv_display_t *disp) - */ - -GENMPY_UNUSED static void lv_display_t_flush_wait_cb_callback(lv_display_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_wait_cb)), 1, mp_args); - return; -} - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) - * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t delete_cb(lv_draw_unit_t *draw_unit) - * int32_t delete_cb(lv_draw_unit_t *draw_unit) - */ - - -/* - * Callback function lv_draw_unit_t_event_cb - * void event_cb(lv_event_t *event) - */ - -GENMPY_UNUSED static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_draw_unit_t_event_cb)), 1, mp_args); - return; -} - - -/* - * Callback function lv_display_t_layer_init - * void layer_init(lv_display_t *disp, lv_layer_t *layer) - */ - -GENMPY_UNUSED static void lv_display_t_layer_init_callback(lv_display_t *arg0, lv_layer_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_layer_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_layer_init)), 2, mp_args); - return; -} - - -/* - * Callback function lv_display_t_layer_deinit - * void layer_deinit(lv_display_t *disp, lv_layer_t *layer) - */ - -GENMPY_UNUSED static void lv_display_t_layer_deinit_callback(lv_display_t *arg0, lv_layer_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_layer_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_layer_deinit)), 2, mp_args); - return; -} - - /* * Callback function lv_obj_class_t_constructor_cb * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) @@ -49093,6 +52917,13 @@ GENMPY_UNUSED static void lv_observer_t_cb_callback(lv_observer_t *arg0, lv_subj } +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void user_cb(void) + * void user_cb(void) + */ + + /* * Callback function lv_event_dsc_t_cb * void lv_event_cb_t(lv_event_t *e) @@ -49123,24 +52954,6 @@ GENMPY_UNUSED static int32_t lv_obj_style_transition_dsc_t_path_cb_callback(cons } -/* - * Callback function lv_image_decoder_t_get_area_cb - * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) - */ - -GENMPY_UNUSED static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) -{ - mp_obj_t mp_args[4]; - mp_args[0] = mp_read_ptr_lv_image_decoder_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - mp_args[2] = mp_read_ptr_lv_area_t((void*)arg2); - mp_args[3] = mp_read_ptr_lv_area_t((void*)arg3); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_image_decoder_t_get_area_cb)), 4, mp_args); - return (int)mp_obj_get_int(callback_result); -} - - /* * Callback function lv_image_decoder_t_custom_draw_cb * void lv_image_decoder_custom_draw_t(lv_layer_t *layer, const lv_image_decoder_dsc_t *dsc, const lv_area_t *coords, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *clip_area) @@ -49348,15 +53161,99 @@ GENMPY_UNUSED static lv_fs_res_t lv_fs_drv_t_dir_close_cb_callback(lv_fs_drv_t * /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * Callback: user_data NOT FOUND! void *lv_cache_alloc_cb_t(void) + * void *lv_cache_alloc_cb_t(void) */ /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - * void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * Callback: user_data NOT FOUND! bool lv_cache_init_cb_t(lv_cache_t *cache) + * bool lv_cache_init_cb_t(lv_cache_t *cache) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) + * void lv_cache_destroy_cb_t(lv_cache_t *cache, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * lv_cache_entry_t *lv_cache_get_cb_t(lv_cache_t *cache, const void *key, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * lv_cache_entry_t *lv_cache_add_cb_t(lv_cache_t *cache, const void *key, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) + * void lv_cache_remove_cb_t(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) + * void lv_cache_drop_cb_t(lv_cache_t *cache, const void *key, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) + * void lv_cache_drop_all_cb_t(lv_cache_t *cache, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) + * lv_cache_entry_t *lv_cache_get_victim_cb(lv_cache_t *cache, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) + * lv_cache_reserve_cond_res_t lv_cache_reserve_cond_cb(lv_cache_t *cache, const void *key, size_t size, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) + * lv_iter_t *lv_cache_iter_create_cb(lv_cache_t *cache) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! bool lv_cache_create_cb_t(void *node, void *user_data) + * bool lv_cache_create_cb_t(void *node, void *user_data) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_cache_free_cb_t(void *node, void *user_data) + * void lv_cache_free_cb_t(void *node, void *user_data) */ @@ -49398,8 +53295,15 @@ GENMPY_UNUSED static void lv_font_class_t_delete_cb_callback(lv_font_t *arg0) /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) - * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) + * Callback: user_data NOT FOUND! void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) */ @@ -49460,6 +53364,13 @@ GENMPY_UNUSED static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *arg0, */ +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + */ + + /* * Function NOT generated: * Callback: user_data NOT FOUND! lv_draw_sw_mask_res_t lv_draw_sw_mask_xcb_t(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p) @@ -49469,8 +53380,22 @@ GENMPY_UNUSED static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *arg0, /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) - * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * void lv_lru_free_cb_t(void *v) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * void lv_lru_free_cb_t(void *v) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) + * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) */ @@ -49490,10 +53415,11 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_arclabel), MP_ROM_PTR(&mp_lv_arclabel_type_base) }, { MP_ROM_QSTR(MP_QSTR_label), MP_ROM_PTR(&mp_lv_label_type_base) }, { MP_ROM_QSTR(MP_QSTR_bar), MP_ROM_PTR(&mp_lv_bar_type_base) }, + { MP_ROM_QSTR(MP_QSTR_canvas), MP_ROM_PTR(&mp_lv_canvas_type_base) }, + { MP_ROM_QSTR(MP_QSTR_barcode), MP_ROM_PTR(&mp_lv_barcode_type_base) }, { MP_ROM_QSTR(MP_QSTR_button), MP_ROM_PTR(&mp_lv_button_type_base) }, { MP_ROM_QSTR(MP_QSTR_buttonmatrix), MP_ROM_PTR(&mp_lv_buttonmatrix_type_base) }, { MP_ROM_QSTR(MP_QSTR_calendar), MP_ROM_PTR(&mp_lv_calendar_type_base) }, - { MP_ROM_QSTR(MP_QSTR_canvas), MP_ROM_PTR(&mp_lv_canvas_type_base) }, { MP_ROM_QSTR(MP_QSTR_chart), MP_ROM_PTR(&mp_lv_chart_type_base) }, { MP_ROM_QSTR(MP_QSTR_checkbox), MP_ROM_PTR(&mp_lv_checkbox_type_base) }, { MP_ROM_QSTR(MP_QSTR_dropdown), MP_ROM_PTR(&mp_lv_dropdown_type_base) }, @@ -49509,6 +53435,7 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_menu_section), MP_ROM_PTR(&mp_lv_menu_section_type_base) }, { MP_ROM_QSTR(MP_QSTR_menu_separator), MP_ROM_PTR(&mp_lv_menu_separator_type_base) }, { MP_ROM_QSTR(MP_QSTR_msgbox), MP_ROM_PTR(&mp_lv_msgbox_type_base) }, + { MP_ROM_QSTR(MP_QSTR_qrcode), MP_ROM_PTR(&mp_lv_qrcode_type_base) }, { MP_ROM_QSTR(MP_QSTR_roller), MP_ROM_PTR(&mp_lv_roller_type_base) }, { MP_ROM_QSTR(MP_QSTR_scale), MP_ROM_PTR(&mp_lv_scale_type_base) }, { MP_ROM_QSTR(MP_QSTR_slider), MP_ROM_PTR(&mp_lv_slider_type_base) }, @@ -49521,19 +53448,18 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_tabview), MP_ROM_PTR(&mp_lv_tabview_type_base) }, { MP_ROM_QSTR(MP_QSTR_tileview), MP_ROM_PTR(&mp_lv_tileview_type_base) }, { MP_ROM_QSTR(MP_QSTR_win), MP_ROM_PTR(&mp_lv_win_type_base) }, - { MP_ROM_QSTR(MP_QSTR_barcode), MP_ROM_PTR(&mp_lv_barcode_type_base) }, - { MP_ROM_QSTR(MP_QSTR_qrcode), MP_ROM_PTR(&mp_lv_qrcode_type_base) }, - { MP_ROM_QSTR(MP_QSTR_memzero), MP_ROM_PTR(&mp_lv_memzero_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_streq), MP_ROM_PTR(&mp_lv_streq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_sqr), MP_ROM_PTR(&mp_lv_sqr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_swap_16), MP_ROM_PTR(&mp_lv_color_swap_16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap_bytes_32), MP_ROM_PTR(&mp_lv_swap_bytes_32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap_bytes_16), MP_ROM_PTR(&mp_lv_swap_bytes_16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align), MP_ROM_PTR(&mp_lv_bidi_calculate_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memzero), MP_ROM_PTR(&mp_lv_memzero_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_streq), MP_ROM_PTR(&mp_lv_streq_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_get_prop_group), MP_ROM_PTR(&mp_lv_style_get_prop_group_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_has_flag), MP_ROM_PTR(&mp_lv_style_prop_has_flag_mpobj) }, { MP_ROM_QSTR(MP_QSTR_task_handler), MP_ROM_PTR(&mp_lv_task_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_major), MP_ROM_PTR(&mp_lv_version_major_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_minor), MP_ROM_PTR(&mp_lv_version_minor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_patch), MP_ROM_PTR(&mp_lv_version_patch_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_version_info), MP_ROM_PTR(&mp_lv_version_info_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_init), MP_ROM_PTR(&mp_lv_thread_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_delete), MP_ROM_PTR(&mp_lv_thread_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_mutex_init), MP_ROM_PTR(&mp_lv_mutex_init_mpobj) }, @@ -49546,63 +53472,14 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_thread_sync_signal), MP_ROM_PTR(&mp_lv_thread_sync_signal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_signal_isr), MP_ROM_PTR(&mp_lv_thread_sync_signal_isr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_delete), MP_ROM_PTR(&mp_lv_thread_sync_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_16_16_mix_inlined), MP_ROM_PTR(&mp_lv_color_16_16_mix_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align_internal), MP_ROM_PTR(&mp_lv_bidi_calculate_align_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_break_char), MP_ROM_PTR(&mp_lv_text_is_break_char_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_hanging_space), MP_ROM_PTR(&mp_lv_text_is_hanging_space_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_a_word), MP_ROM_PTR(&mp_lv_text_is_a_word_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_marker), MP_ROM_PTR(&mp_lv_text_is_marker_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_major), MP_ROM_PTR(&mp_lv_version_major_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_minor), MP_ROM_PTR(&mp_lv_version_minor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_patch), MP_ROM_PTR(&mp_lv_version_patch_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_version_info), MP_ROM_PTR(&mp_lv_version_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_initialized), MP_ROM_PTR(&mp_lv_is_initialized_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memcpy), MP_ROM_PTR(&mp_lv_memcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memset), MP_ROM_PTR(&mp_lv_memset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memmove), MP_ROM_PTR(&mp_lv_memmove_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_memcmp), MP_ROM_PTR(&mp_lv_memcmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strlen), MP_ROM_PTR(&mp_lv_strlen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strnlen), MP_ROM_PTR(&mp_lv_strnlen_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strlcpy), MP_ROM_PTR(&mp_lv_strlcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncpy), MP_ROM_PTR(&mp_lv_strncpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcpy), MP_ROM_PTR(&mp_lv_strcpy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcmp), MP_ROM_PTR(&mp_lv_strcmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncmp), MP_ROM_PTR(&mp_lv_strncmp_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strdup), MP_ROM_PTR(&mp_lv_strdup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strndup), MP_ROM_PTR(&mp_lv_strndup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strcat), MP_ROM_PTR(&mp_lv_strcat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strncat), MP_ROM_PTR(&mp_lv_strncat_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_strchr), MP_ROM_PTR(&mp_lv_strchr_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_init), MP_ROM_PTR(&mp_lv_mem_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_deinit), MP_ROM_PTR(&mp_lv_mem_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_add_pool), MP_ROM_PTR(&mp_lv_mem_add_pool_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_remove_pool), MP_ROM_PTR(&mp_lv_mem_remove_pool_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc), MP_ROM_PTR(&mp_lv_malloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calloc), MP_ROM_PTR(&mp_lv_calloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_zalloc), MP_ROM_PTR(&mp_lv_zalloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc_zeroed), MP_ROM_PTR(&mp_lv_malloc_zeroed_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free), MP_ROM_PTR(&mp_lv_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_realloc), MP_ROM_PTR(&mp_lv_realloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reallocf), MP_ROM_PTR(&mp_lv_reallocf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_malloc_core), MP_ROM_PTR(&mp_lv_malloc_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free_core), MP_ROM_PTR(&mp_lv_free_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_realloc_core), MP_ROM_PTR(&mp_lv_realloc_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_test_core), MP_ROM_PTR(&mp_lv_mem_test_core_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mem_test), MP_ROM_PTR(&mp_lv_mem_test_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_inc), MP_ROM_PTR(&mp_lv_tick_inc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_get), MP_ROM_PTR(&mp_lv_tick_get_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_elaps), MP_ROM_PTR(&mp_lv_tick_elaps_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_diff), MP_ROM_PTR(&mp_lv_tick_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delay_ms), MP_ROM_PTR(&mp_lv_delay_ms_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delay_set_cb), MP_ROM_PTR(&mp_lv_delay_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_set_cb), MP_ROM_PTR(&mp_lv_tick_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_tick_get_cb), MP_ROM_PTR(&mp_lv_tick_get_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler), MP_ROM_PTR(&mp_lv_timer_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler_run_in_period), MP_ROM_PTR(&mp_lv_timer_handler_run_in_period_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_periodic_handler), MP_ROM_PTR(&mp_lv_timer_periodic_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_handler_set_resume_cb), MP_ROM_PTR(&mp_lv_timer_handler_set_resume_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_create_basic), MP_ROM_PTR(&mp_lv_timer_create_basic_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_create), MP_ROM_PTR(&mp_lv_timer_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_enable), MP_ROM_PTR(&mp_lv_timer_enable_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_get_idle), MP_ROM_PTR(&mp_lv_timer_get_idle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_timer_get_time_until_next), MP_ROM_PTR(&mp_lv_timer_get_time_until_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap_bytes_32), MP_ROM_PTR(&mp_lv_swap_bytes_32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap_bytes_16), MP_ROM_PTR(&mp_lv_swap_bytes_16_mpobj) }, { MP_ROM_QSTR(MP_QSTR_trigo_sin), MP_ROM_PTR(&mp_lv_trigo_sin_mpobj) }, { MP_ROM_QSTR(MP_QSTR_trigo_cos), MP_ROM_PTR(&mp_lv_trigo_cos_mpobj) }, { MP_ROM_QSTR(MP_QSTR_cubic_bezier), MP_ROM_PTR(&mp_lv_cubic_bezier_mpobj) }, @@ -49614,8 +53491,6 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_map), MP_ROM_PTR(&mp_lv_map_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rand_set_seed), MP_ROM_PTR(&mp_lv_rand_set_seed_mpobj) }, { MP_ROM_QSTR(MP_QSTR_rand), MP_ROM_PTR(&mp_lv_rand_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_async_call), MP_ROM_PTR(&mp_lv_async_call_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_async_call_cancel), MP_ROM_PTR(&mp_lv_async_call_cancel_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_delete), MP_ROM_PTR(&mp_lv_anim_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_delete_all), MP_ROM_PTR(&mp_lv_anim_delete_all_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_get), MP_ROM_PTR(&mp_lv_anim_get_mpobj) }, @@ -49629,6 +53504,32 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_anim_timeline_create), MP_ROM_PTR(&mp_lv_anim_timeline_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pct), MP_ROM_PTR(&mp_lv_pct_mpobj) }, { MP_ROM_QSTR(MP_QSTR_pct_to_px), MP_ROM_PTR(&mp_lv_pct_to_px_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_register_id), MP_ROM_PTR(&mp_lv_event_register_id_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_code_get_name), MP_ROM_PTR(&mp_lv_event_code_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_create), MP_ROM_PTR(&mp_lv_group_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_get_default), MP_ROM_PTR(&mp_lv_group_get_default_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_swap_obj), MP_ROM_PTR(&mp_lv_group_swap_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_remove_obj), MP_ROM_PTR(&mp_lv_group_remove_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_focus_obj), MP_ROM_PTR(&mp_lv_group_focus_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_get_count), MP_ROM_PTR(&mp_lv_group_get_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_by_index), MP_ROM_PTR(&mp_lv_group_by_index_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_initialized), MP_ROM_PTR(&mp_lv_is_initialized_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_init), MP_ROM_PTR(&mp_lv_mem_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_deinit), MP_ROM_PTR(&mp_lv_mem_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_add_pool), MP_ROM_PTR(&mp_lv_mem_add_pool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_remove_pool), MP_ROM_PTR(&mp_lv_mem_remove_pool_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc), MP_ROM_PTR(&mp_lv_malloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_calloc), MP_ROM_PTR(&mp_lv_calloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_zalloc), MP_ROM_PTR(&mp_lv_zalloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc_zeroed), MP_ROM_PTR(&mp_lv_malloc_zeroed_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free), MP_ROM_PTR(&mp_lv_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_realloc), MP_ROM_PTR(&mp_lv_realloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reallocf), MP_ROM_PTR(&mp_lv_reallocf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_malloc_core), MP_ROM_PTR(&mp_lv_malloc_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free_core), MP_ROM_PTR(&mp_lv_free_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_realloc_core), MP_ROM_PTR(&mp_lv_realloc_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_test_core), MP_ROM_PTR(&mp_lv_mem_test_core_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mem_test), MP_ROM_PTR(&mp_lv_mem_test_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_get_bpp), MP_ROM_PTR(&mp_lv_color_format_get_bpp_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_get_size), MP_ROM_PTR(&mp_lv_color_format_get_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_format_has_alpha), MP_ROM_PTR(&mp_lv_color_format_has_alpha_mpobj) }, @@ -49645,23 +53546,31 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_palette_main), MP_ROM_PTR(&mp_lv_palette_main_mpobj) }, { MP_ROM_QSTR(MP_QSTR_palette_lighten), MP_ROM_PTR(&mp_lv_palette_lighten_mpobj) }, { MP_ROM_QSTR(MP_QSTR_palette_darken), MP_ROM_PTR(&mp_lv_palette_darken_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memcpy), MP_ROM_PTR(&mp_lv_memcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memset), MP_ROM_PTR(&mp_lv_memset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memmove), MP_ROM_PTR(&mp_lv_memmove_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_memcmp), MP_ROM_PTR(&mp_lv_memcmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strlen), MP_ROM_PTR(&mp_lv_strlen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strnlen), MP_ROM_PTR(&mp_lv_strnlen_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strlcpy), MP_ROM_PTR(&mp_lv_strlcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncpy), MP_ROM_PTR(&mp_lv_strncpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcpy), MP_ROM_PTR(&mp_lv_strcpy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcmp), MP_ROM_PTR(&mp_lv_strcmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncmp), MP_ROM_PTR(&mp_lv_strncmp_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strdup), MP_ROM_PTR(&mp_lv_strdup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strndup), MP_ROM_PTR(&mp_lv_strndup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strcat), MP_ROM_PTR(&mp_lv_strcat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strncat), MP_ROM_PTR(&mp_lv_strncat_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_strchr), MP_ROM_PTR(&mp_lv_strchr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_font_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_font_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_get_image_handlers), MP_ROM_PTR(&mp_lv_draw_buf_get_image_handlers_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_align), MP_ROM_PTR(&mp_lv_draw_buf_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_width_to_stride), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_create), MP_ROM_PTR(&mp_lv_draw_buf_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_iter_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create), MP_ROM_PTR(&mp_lv_circle_buf_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_buf), MP_ROM_PTR(&mp_lv_circle_buf_create_from_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_array), MP_ROM_PTR(&mp_lv_circle_buf_create_from_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lock), MP_ROM_PTR(&mp_lv_lock_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lock_isr), MP_ROM_PTR(&mp_lv_lock_isr_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unlock), MP_ROM_PTR(&mp_lv_unlock_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_lv_sleep_ms_mpobj) }, { MP_ROM_QSTR(MP_QSTR_font_get_default), MP_ROM_PTR(&mp_lv_font_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_get_size), MP_ROM_PTR(&mp_lv_text_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align), MP_ROM_PTR(&mp_lv_bidi_calculate_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_register), MP_ROM_PTR(&mp_lv_layout_register_mpobj) }, { MP_ROM_QSTR(MP_QSTR_flex_init), MP_ROM_PTR(&mp_lv_flex_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_grid_init), MP_ROM_PTR(&mp_lv_grid_init_mpobj) }, @@ -49670,8 +53579,16 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_style_get_num_custom_props), MP_ROM_PTR(&mp_lv_style_get_num_custom_props_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_get_default), MP_ROM_PTR(&mp_lv_style_prop_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_prop_lookup_flags), MP_ROM_PTR(&mp_lv_style_prop_lookup_flags_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_register_id), MP_ROM_PTR(&mp_lv_event_register_id_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_code_get_name), MP_ROM_PTR(&mp_lv_event_code_get_name_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler), MP_ROM_PTR(&mp_lv_timer_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler_run_in_period), MP_ROM_PTR(&mp_lv_timer_handler_run_in_period_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_time_to_next), MP_ROM_PTR(&mp_lv_timer_get_time_to_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_periodic_handler), MP_ROM_PTR(&mp_lv_timer_periodic_handler_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_handler_set_resume_cb), MP_ROM_PTR(&mp_lv_timer_handler_set_resume_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_create_basic), MP_ROM_PTR(&mp_lv_timer_create_basic_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_create), MP_ROM_PTR(&mp_lv_timer_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_enable), MP_ROM_PTR(&mp_lv_timer_enable_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_idle), MP_ROM_PTR(&mp_lv_timer_get_idle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_timer_get_time_until_next), MP_ROM_PTR(&mp_lv_timer_get_time_until_next_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_create), MP_ROM_PTR(&mp_lv_display_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_get_default), MP_ROM_PTR(&mp_lv_display_get_default_mpobj) }, { MP_ROM_QSTR(MP_QSTR_screen_load), MP_ROM_PTR(&mp_lv_screen_load_mpobj) }, @@ -49683,17 +53600,6 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_dpx_mpobj) }, { MP_ROM_QSTR(MP_QSTR_clamp_width), MP_ROM_PTR(&mp_lv_clamp_width_mpobj) }, { MP_ROM_QSTR(MP_QSTR_clamp_height), MP_ROM_PTR(&mp_lv_clamp_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_drv), MP_ROM_PTR(&mp_lv_fs_get_drv_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_remove_drive), MP_ROM_PTR(&mp_lv_fs_remove_drive_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_is_ready), MP_ROM_PTR(&mp_lv_fs_is_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_get_size), MP_ROM_PTR(&mp_lv_fs_path_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_load_to_buf), MP_ROM_PTR(&mp_lv_fs_load_to_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_load_with_alloc), MP_ROM_PTR(&mp_lv_fs_load_with_alloc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_letters), MP_ROM_PTR(&mp_lv_fs_get_letters_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_ext), MP_ROM_PTR(&mp_lv_fs_get_ext_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_up), MP_ROM_PTR(&mp_lv_fs_up_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_get_last), MP_ROM_PTR(&mp_lv_fs_get_last_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_join), MP_ROM_PTR(&mp_lv_fs_path_join_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_init), MP_ROM_PTR(&mp_lv_draw_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_deinit), MP_ROM_PTR(&mp_lv_draw_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_create_unit), MP_ROM_PTR(&mp_lv_draw_create_unit_mpobj) }, @@ -49713,6 +53619,9 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_layer_go_to_xy), MP_ROM_PTR(&mp_lv_draw_layer_go_to_xy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer_create_drop_shadow), MP_ROM_PTR(&mp_lv_draw_layer_create_drop_shadow_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer_finish_drop_shadow), MP_ROM_PTR(&mp_lv_draw_layer_finish_drop_shadow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_dealloc_buf), MP_ROM_PTR(&mp_lv_draw_layer_dealloc_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_deinit), MP_ROM_PTR(&mp_lv_draw_layer_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_layer_delete), MP_ROM_PTR(&mp_lv_draw_layer_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_fill), MP_ROM_PTR(&mp_lv_draw_fill_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_border), MP_ROM_PTR(&mp_lv_draw_border_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_box_shadow), MP_ROM_PTR(&mp_lv_draw_box_shadow_mpobj) }, @@ -49720,6 +53629,17 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_label), MP_ROM_PTR(&mp_lv_draw_label_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_character), MP_ROM_PTR(&mp_lv_draw_character_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_letter), MP_ROM_PTR(&mp_lv_draw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_drv), MP_ROM_PTR(&mp_lv_fs_get_drv_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_remove_drive), MP_ROM_PTR(&mp_lv_fs_remove_drive_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_is_ready), MP_ROM_PTR(&mp_lv_fs_is_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_get_size), MP_ROM_PTR(&mp_lv_fs_path_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_load_to_buf), MP_ROM_PTR(&mp_lv_fs_load_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_load_with_alloc), MP_ROM_PTR(&mp_lv_fs_load_with_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_letters), MP_ROM_PTR(&mp_lv_fs_get_letters_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_ext), MP_ROM_PTR(&mp_lv_fs_get_ext_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_up), MP_ROM_PTR(&mp_lv_fs_up_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_get_last), MP_ROM_PTR(&mp_lv_fs_get_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_join), MP_ROM_PTR(&mp_lv_fs_path_join_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_image), MP_ROM_PTR(&mp_lv_draw_image_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_layer), MP_ROM_PTR(&mp_lv_draw_layer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_line), MP_ROM_PTR(&mp_lv_draw_line_mpobj) }, @@ -49727,46 +53647,45 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_arc_get_area), MP_ROM_PTR(&mp_lv_draw_arc_get_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_triangle), MP_ROM_PTR(&mp_lv_draw_triangle_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_blur), MP_ROM_PTR(&mp_lv_draw_blur_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_create), MP_ROM_PTR(&mp_lv_group_create_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_get_default), MP_ROM_PTR(&mp_lv_group_get_default_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_swap_obj), MP_ROM_PTR(&mp_lv_group_swap_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_remove_obj), MP_ROM_PTR(&mp_lv_group_remove_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_focus_obj), MP_ROM_PTR(&mp_lv_group_focus_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_get_count), MP_ROM_PTR(&mp_lv_group_get_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_by_index), MP_ROM_PTR(&mp_lv_group_by_index_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_create), MP_ROM_PTR(&mp_lv_indev_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_read_timer_cb), MP_ROM_PTR(&mp_lv_indev_read_timer_cb_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_active), MP_ROM_PTR(&mp_lv_indev_active_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_get_active_obj), MP_ROM_PTR(&mp_lv_indev_get_active_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_indev_search_obj), MP_ROM_PTR(&mp_lv_indev_search_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_create), MP_ROM_PTR(&mp_lv_subject_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_now), MP_ROM_PTR(&mp_lv_refr_now_mpobj) }, { MP_ROM_QSTR(MP_QSTR_display_refr_timer), MP_ROM_PTR(&mp_lv_display_refr_timer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_mask_rect), MP_ROM_PTR(&mp_lv_draw_mask_rect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take), MP_ROM_PTR(&mp_lv_snapshot_take_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_create_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_create_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_reshape_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_reshape_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_draw_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_free), MP_ROM_PTR(&mp_lv_snapshot_free_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_to_argb8888), MP_ROM_PTR(&mp_lv_draw_i1_to_argb8888_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_rgb565_swap), MP_ROM_PTR(&mp_lv_draw_rgb565_swap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_invert), MP_ROM_PTR(&mp_lv_draw_i1_invert_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_i1_convert_to_vtiled), MP_ROM_PTR(&mp_lv_draw_i1_convert_to_vtiled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_rotate), MP_ROM_PTR(&mp_lv_draw_rotate_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_create), MP_ROM_PTR(&mp_lv_binfont_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_create_from_buffer), MP_ROM_PTR(&mp_lv_binfont_create_from_buffer_mpobj) }, { MP_ROM_QSTR(MP_QSTR_binfont_destroy), MP_ROM_PTR(&mp_lv_binfont_destroy_mpobj) }, { MP_ROM_QSTR(MP_QSTR_imgfont_create), MP_ROM_PTR(&mp_lv_imgfont_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_imgfont_destroy), MP_ROM_PTR(&mp_lv_imgfont_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_span_stack_init), MP_ROM_PTR(&mp_lv_span_stack_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_span_stack_deinit), MP_ROM_PTR(&mp_lv_span_stack_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_fs_memfs_init), MP_ROM_PTR(&mp_lv_fs_memfs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_init), MP_ROM_PTR(&mp_lv_bin_decoder_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_info), MP_ROM_PTR(&mp_lv_bin_decoder_info_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_get_area), MP_ROM_PTR(&mp_lv_bin_decoder_get_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_open), MP_ROM_PTR(&mp_lv_bin_decoder_open_mpobj) }, { MP_ROM_QSTR(MP_QSTR_bin_decoder_close), MP_ROM_PTR(&mp_lv_bin_decoder_close_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_fs_memfs_init), MP_ROM_PTR(&mp_lv_fs_memfs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_lodepng_init), MP_ROM_PTR(&mp_lv_lodepng_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_lodepng_deinit), MP_ROM_PTR(&mp_lv_lodepng_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_to_argb8888), MP_ROM_PTR(&mp_lv_draw_sw_i1_to_argb8888_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_rgb565_swap), MP_ROM_PTR(&mp_lv_draw_sw_rgb565_swap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_invert), MP_ROM_PTR(&mp_lv_draw_sw_i1_invert_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_i1_convert_to_vtiled), MP_ROM_PTR(&mp_lv_draw_sw_i1_convert_to_vtiled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_rotate), MP_ROM_PTR(&mp_lv_draw_sw_rotate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take), MP_ROM_PTR(&mp_lv_snapshot_take_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_create_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_create_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_reshape_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_reshape_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_draw_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_draw_buf_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_free), MP_ROM_PTR(&mp_lv_snapshot_free_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_snapshot_take_to_buf), MP_ROM_PTR(&mp_lv_snapshot_take_to_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_async_call), MP_ROM_PTR(&mp_lv_async_call_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_async_call_cancel), MP_ROM_PTR(&mp_lv_async_call_cancel_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lock), MP_ROM_PTR(&mp_lv_lock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lock_isr), MP_ROM_PTR(&mp_lv_lock_isr_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unlock), MP_ROM_PTR(&mp_lv_unlock_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sleep_ms), MP_ROM_PTR(&mp_lv_sleep_ms_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_create), MP_ROM_PTR(&mp_lv_theme_create_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_get_from_obj), MP_ROM_PTR(&mp_lv_theme_get_from_obj_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_apply), MP_ROM_PTR(&mp_lv_theme_apply_mpobj) }, @@ -49779,61 +53698,85 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_theme_default_is_inited), MP_ROM_PTR(&mp_lv_theme_default_is_inited_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_default_get), MP_ROM_PTR(&mp_lv_theme_default_get_mpobj) }, { MP_ROM_QSTR(MP_QSTR_theme_default_deinit), MP_ROM_PTR(&mp_lv_theme_default_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_mask_rect), MP_ROM_PTR(&mp_lv_draw_mask_rect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_init), MP_ROM_PTR(&mp_lv_draw_sw_mask_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_deinit), MP_ROM_PTR(&mp_lv_draw_sw_mask_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_apply), MP_ROM_PTR(&mp_lv_draw_sw_mask_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_free_param), MP_ROM_PTR(&mp_lv_draw_sw_mask_free_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_inc), MP_ROM_PTR(&mp_lv_tick_inc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_get), MP_ROM_PTR(&mp_lv_tick_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_elaps), MP_ROM_PTR(&mp_lv_tick_elaps_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_diff), MP_ROM_PTR(&mp_lv_tick_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delay_ms), MP_ROM_PTR(&mp_lv_delay_ms_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delay_set_cb), MP_ROM_PTR(&mp_lv_delay_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_set_cb), MP_ROM_PTR(&mp_lv_tick_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_tick_get_cb), MP_ROM_PTR(&mp_lv_tick_get_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_span_stack_init), MP_ROM_PTR(&mp_lv_span_stack_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_span_stack_deinit), MP_ROM_PTR(&mp_lv_span_stack_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_os_init), MP_ROM_PTR(&mp_lv_os_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_os_get_idle_percent), MP_ROM_PTR(&mp_lv_os_get_idle_percent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_iter_create), MP_ROM_PTR(&mp_lv_iter_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_alloc), MP_ROM_PTR(&mp_lv_cache_entry_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_get_size), MP_ROM_PTR(&mp_lv_cache_entry_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_get_entry), MP_ROM_PTR(&mp_lv_cache_entry_get_entry_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_init), MP_ROM_PTR(&mp_lv_draw_sw_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_deinit), MP_ROM_PTR(&mp_lv_draw_sw_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_transform), MP_ROM_PTR(&mp_lv_draw_sw_transform_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_unregister_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_unregister_blend_handler_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_get_blend_handler), MP_ROM_PTR(&mp_lv_draw_sw_get_blend_handler_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_os_init), MP_ROM_PTR(&mp_lv_os_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_os_get_idle_percent), MP_ROM_PTR(&mp_lv_os_get_idle_percent_mpobj) }, { MP_ROM_QSTR(MP_QSTR_timer_core_init), MP_ROM_PTR(&mp_lv_timer_core_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_timer_core_deinit), MP_ROM_PTR(&mp_lv_timer_core_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_core_init), MP_ROM_PTR(&mp_lv_anim_core_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_core_deinit), MP_ROM_PTR(&mp_lv_anim_core_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_anim_enable_vsync_mode), MP_ROM_PTR(&mp_lv_anim_enable_vsync_mode_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_init_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_handlers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_get_size), MP_ROM_PTR(&mp_lv_cache_entry_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_get_entry), MP_ROM_PTR(&mp_lv_cache_entry_get_entry_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_alloc), MP_ROM_PTR(&mp_lv_cache_entry_alloc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_init), MP_ROM_PTR(&mp_lv_draw_sw_mask_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_deinit), MP_ROM_PTR(&mp_lv_draw_sw_mask_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_apply), MP_ROM_PTR(&mp_lv_draw_sw_mask_apply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_free_param), MP_ROM_PTR(&mp_lv_draw_sw_mask_free_param_mpobj) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_cleanup), MP_ROM_PTR(&mp_lv_draw_sw_mask_cleanup_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_init), MP_ROM_PTR(&mp_lv_layout_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_deinit), MP_ROM_PTR(&mp_lv_layout_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_get_min_size), MP_ROM_PTR(&mp_lv_layout_get_min_size_mpobj) }, { MP_ROM_QSTR(MP_QSTR_layout_apply), MP_ROM_PTR(&mp_lv_layout_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_indev_scroll_get_snap_dist), MP_ROM_PTR(&mp_lv_indev_scroll_get_snap_dist_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_size_attributes), MP_ROM_PTR(&mp_lv_text_get_size_attributes_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_width), MP_ROM_PTR(&mp_lv_text_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_is_cmd), MP_ROM_PTR(&mp_lv_text_is_cmd_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_next_line), MP_ROM_PTR(&mp_lv_text_get_next_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_init), MP_ROM_PTR(&mp_lv_group_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_group_deinit), MP_ROM_PTR(&mp_lv_group_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_mark_deleted), MP_ROM_PTR(&mp_lv_event_mark_deleted_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_global_init), MP_ROM_PTR(&mp_lv_subject_global_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_subject_global_deinit), MP_ROM_PTR(&mp_lv_subject_global_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_init), MP_ROM_PTR(&mp_lv_refr_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_deinit), MP_ROM_PTR(&mp_lv_refr_deinit_mpobj) }, { MP_ROM_QSTR(MP_QSTR_inv_area), MP_ROM_PTR(&mp_lv_inv_area_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_get_disp_refreshing), MP_ROM_PTR(&mp_lv_refr_get_disp_refreshing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_set_disp_refreshing), MP_ROM_PTR(&mp_lv_refr_set_disp_refreshing_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr_get_top_obj), MP_ROM_PTR(&mp_lv_refr_get_top_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_init), MP_ROM_PTR(&mp_lv_group_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_group_deinit), MP_ROM_PTR(&mp_lv_group_deinit_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_color_calculate), MP_ROM_PTR(&mp_lv_draw_sw_grad_color_calculate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_get), MP_ROM_PTR(&mp_lv_draw_sw_grad_get_mpobj) }, { MP_ROM_QSTR(MP_QSTR_fs_init), MP_ROM_PTR(&mp_lv_fs_init_mpobj) }, { MP_ROM_QSTR(MP_QSTR_fs_deinit), MP_ROM_PTR(&mp_lv_fs_deinit_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_mark_deleted), MP_ROM_PTR(&mp_lv_event_mark_deleted_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_indev_scroll_get_snap_dist), MP_ROM_PTR(&mp_lv_indev_scroll_get_snap_dist_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create), MP_ROM_PTR(&mp_lv_circle_buf_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_buf), MP_ROM_PTR(&mp_lv_circle_buf_create_from_buf_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_create_from_array), MP_ROM_PTR(&mp_lv_circle_buf_create_from_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lru_create), MP_ROM_PTR(&mp_lv_lru_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pending_create), MP_ROM_PTR(&mp_lv_pending_create_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_size_attributes), MP_ROM_PTR(&mp_lv_text_get_size_attributes_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_width), MP_ROM_PTR(&mp_lv_text_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_line_width), MP_ROM_PTR(&mp_lv_text_get_line_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_is_cmd), MP_ROM_PTR(&mp_lv_text_is_cmd_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_next_line), MP_ROM_PTR(&mp_lv_text_get_next_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_text_get_size_internal), MP_ROM_PTR(&mp_lv_text_get_size_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_LOG_LEVEL), MP_ROM_PTR(&mp_lv_ENUM_LV_LOG_LEVEL_type_base) }, { MP_ROM_QSTR(MP_QSTR_COORD), MP_ROM_PTR(&mp_lv_ENUM_LV_COORD_type_base) }, + { MP_ROM_QSTR(MP_QSTR_LOG_LEVEL), MP_ROM_PTR(&mp_lv_ENUM_LV_LOG_LEVEL_type_base) }, { MP_ROM_QSTR(MP_QSTR_OPA), MP_ROM_PTR(&mp_lv_LV_OPA_type_base) }, - { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE), MP_ROM_PTR(&mp_lv_LV_STYLE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_TREE_WALK_type_base) }, { MP_ROM_QSTR(MP_QSTR_RESULT), MP_ROM_PTR(&mp_lv_LV_RESULT_type_base) }, - { MP_ROM_QSTR(MP_QSTR_RB_COLOR), MP_ROM_PTR(&mp_lv_LV_RB_COLOR_type_base) }, { MP_ROM_QSTR(MP_QSTR_ALIGN), MP_ROM_PTR(&mp_lv_LV_ALIGN_type_base) }, { MP_ROM_QSTR(MP_QSTR_DIR), MP_ROM_PTR(&mp_lv_LV_DIR_type_base) }, + { MP_ROM_QSTR(MP_QSTR_EVENT), MP_ROM_PTR(&mp_lv_LV_EVENT_type_base) }, + { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(&mp_lv_LV_KEY_type_base) }, + { MP_ROM_QSTR(MP_QSTR_GROUP_REFOCUS_POLICY), MP_ROM_PTR(&mp_lv_LV_GROUP_REFOCUS_POLICY_type_base) }, { MP_ROM_QSTR(MP_QSTR_COLOR_FORMAT), MP_ROM_PTR(&mp_lv_LV_COLOR_FORMAT_type_base) }, { MP_ROM_QSTR(MP_QSTR_PALETTE), MP_ROM_PTR(&mp_lv_LV_PALETTE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FONT_GLYPH_FORMAT), MP_ROM_PTR(&mp_lv_LV_FONT_GLYPH_FORMAT_type_base) }, @@ -49841,6 +53784,7 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_FONT_KERNING), MP_ROM_PTR(&mp_lv_LV_FONT_KERNING_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_FLAG), MP_ROM_PTR(&mp_lv_LV_TEXT_FLAG_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_ALIGN), MP_ROM_PTR(&mp_lv_LV_TEXT_ALIGN_type_base) }, + { MP_ROM_QSTR(MP_QSTR_TEXT_LEADING_TRIM), MP_ROM_PTR(&mp_lv_LV_TEXT_LEADING_TRIM_type_base) }, { MP_ROM_QSTR(MP_QSTR_BASE_DIR), MP_ROM_PTR(&mp_lv_LV_BASE_DIR_type_base) }, { MP_ROM_QSTR(MP_QSTR_GRAD_DIR), MP_ROM_PTR(&mp_lv_LV_GRAD_DIR_type_base) }, { MP_ROM_QSTR(MP_QSTR_GRAD_EXTEND), MP_ROM_PTR(&mp_lv_LV_GRAD_EXTEND_type_base) }, @@ -49853,7 +53797,6 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_BORDER_SIDE), MP_ROM_PTR(&mp_lv_LV_BORDER_SIDE_type_base) }, { MP_ROM_QSTR(MP_QSTR_BLUR_QUALITY), MP_ROM_PTR(&mp_lv_LV_BLUR_QUALITY_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE_RES), MP_ROM_PTR(&mp_lv_LV_STYLE_RES_type_base) }, - { MP_ROM_QSTR(MP_QSTR_EVENT), MP_ROM_PTR(&mp_lv_LV_EVENT_type_base) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_ROTATION), MP_ROM_PTR(&mp_lv_LV_DISPLAY_ROTATION_type_base) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY_RENDER_MODE), MP_ROM_PTR(&mp_lv_LV_DISPLAY_RENDER_MODE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SCREEN_LOAD_ANIM), MP_ROM_PTR(&mp_lv_LV_SCREEN_LOAD_ANIM_type_base) }, @@ -49862,14 +53805,12 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_STATE), MP_ROM_PTR(&mp_lv_LV_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_PART), MP_ROM_PTR(&mp_lv_LV_PART_type_base) }, { MP_ROM_QSTR(MP_QSTR_STYLE_STATE_CMP), MP_ROM_PTR(&mp_lv_LV_STYLE_STATE_CMP_type_base) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_TYPE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_STATE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_RES), MP_ROM_PTR(&mp_lv_LV_FS_RES_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_MODE), MP_ROM_PTR(&mp_lv_LV_FS_MODE_type_base) }, { MP_ROM_QSTR(MP_QSTR_FS_SEEK), MP_ROM_PTR(&mp_lv_LV_FS_SEEK_type_base) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_DRAW_TASK_STATE), MP_ROM_PTR(&mp_lv_LV_DRAW_TASK_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_LAYER_TYPE), MP_ROM_PTR(&mp_lv_LV_LAYER_TYPE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_KEY), MP_ROM_PTR(&mp_lv_LV_KEY_type_base) }, - { MP_ROM_QSTR(MP_QSTR_GROUP_REFOCUS_POLICY), MP_ROM_PTR(&mp_lv_LV_GROUP_REFOCUS_POLICY_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_TYPE), MP_ROM_PTR(&mp_lv_LV_INDEV_TYPE_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_STATE), MP_ROM_PTR(&mp_lv_LV_INDEV_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_INDEV_MODE), MP_ROM_PTR(&mp_lv_LV_INDEV_MODE_type_base) }, @@ -49883,11 +53824,13 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ANIM_IMAGE_PART), MP_ROM_PTR(&mp_lv_LV_ANIM_IMAGE_PART_type_base) }, { MP_ROM_QSTR(MP_QSTR_SPAN_OVERFLOW), MP_ROM_PTR(&mp_lv_LV_SPAN_OVERFLOW_type_base) }, { MP_ROM_QSTR(MP_QSTR_SPAN_MODE), MP_ROM_PTR(&mp_lv_LV_SPAN_MODE_type_base) }, + { MP_ROM_QSTR(MP_QSTR_THREAD_PRIO), MP_ROM_PTR(&mp_lv_LV_THREAD_PRIO_type_base) }, + { MP_ROM_QSTR(MP_QSTR_CACHE_RESERVE_COND), MP_ROM_PTR(&mp_lv_LV_CACHE_RESERVE_COND_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_RES), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_RES_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_TYPE), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_TYPE_type_base) }, { MP_ROM_QSTR(MP_QSTR_DRAW_SW_MASK_LINE_SIDE), MP_ROM_PTR(&mp_lv_LV_DRAW_SW_MASK_LINE_SIDE_type_base) }, - { MP_ROM_QSTR(MP_QSTR_THREAD_PRIO), MP_ROM_PTR(&mp_lv_LV_THREAD_PRIO_type_base) }, - { MP_ROM_QSTR(MP_QSTR_CACHE_RESERVE_COND), MP_ROM_PTR(&mp_lv_LV_CACHE_RESERVE_COND_type_base) }, + { MP_ROM_QSTR(MP_QSTR_LRU), MP_ROM_PTR(&mp_lv_LV_LRU_type_base) }, + { MP_ROM_QSTR(MP_QSTR_RB_COLOR), MP_ROM_PTR(&mp_lv_LV_RB_COLOR_type_base) }, { MP_ROM_QSTR(MP_QSTR_TEXT_CMD_STATE), MP_ROM_PTR(&mp_lv_LV_TEXT_CMD_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SYMBOL), MP_ROM_PTR(&mp_lv_LV_SYMBOL_type_base) }, @@ -49899,29 +53842,24 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_entry_t), MP_ROM_PTR(&mp_lv_cache_entry_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_t), MP_ROM_PTR(&mp_lv_cache_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_class_t), MP_ROM_PTR(&mp_lv_cache_class_t_type) }, - { MP_ROM_QSTR(MP_QSTR_iter_t), MP_ROM_PTR(&mp_lv_iter_t_type) }, - { MP_ROM_QSTR(MP_QSTR_cache_ops_t), MP_ROM_PTR(&mp_lv_cache_ops_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_t), MP_ROM_PTR(&mp_lv_draw_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_header_t), MP_ROM_PTR(&mp_lv_image_header_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_handlers_t), MP_ROM_PTR(&mp_lv_draw_buf_handlers_t_type) }, { MP_ROM_QSTR(MP_QSTR_area_t), MP_ROM_PTR(&mp_lv_area_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, - { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, - { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_layer_t), MP_ROM_PTR(&mp_lv_layer_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_task_t), MP_ROM_PTR(&mp_lv_draw_task_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_unit_t), MP_ROM_PTR(&mp_lv_draw_unit_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_t), MP_ROM_PTR(&mp_lv_event_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, + { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, + { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_list_t), MP_ROM_PTR(&mp_lv_event_list_t_type) }, { MP_ROM_QSTR(MP_QSTR_array_t), MP_ROM_PTR(&mp_lv_array_t_type) }, { MP_ROM_QSTR(MP_QSTR_theme_t), MP_ROM_PTR(&mp_lv_theme_t_type) }, { MP_ROM_QSTR(MP_QSTR_timer_t), MP_ROM_PTR(&mp_lv_timer_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, + { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_obj_class_t), MP_ROM_PTR(&mp_lv_obj_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_matrix_t), MP_ROM_PTR(&mp_lv_matrix_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_t), MP_ROM_PTR(&mp_lv_style_t_type) }, @@ -49942,6 +53880,7 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_blur_dsc_t), MP_ROM_PTR(&mp_lv_draw_blur_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_dsc_t), MP_ROM_PTR(&mp_lv_event_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_group_t), MP_ROM_PTR(&mp_lv_group_t_type) }, + { MP_ROM_QSTR(MP_QSTR_delete_dsc_t), MP_ROM_PTR(&mp_lv_delete_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_anim_timeline_t), MP_ROM_PTR(&mp_lv_anim_timeline_t_type) }, { MP_ROM_QSTR(MP_QSTR_anim_timeline_dsc_t), MP_ROM_PTR(&mp_lv_anim_timeline_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_increment_dsc_t), MP_ROM_PTR(&mp_lv_subject_increment_dsc_t_type) }, @@ -49952,6 +53891,11 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_fs_file_t), MP_ROM_PTR(&mp_lv_fs_file_t_type) }, { MP_ROM_QSTR(MP_QSTR_fs_drv_t), MP_ROM_PTR(&mp_lv_fs_drv_t_type) }, { MP_ROM_QSTR(MP_QSTR_fs_file_cache_t), MP_ROM_PTR(&mp_lv_fs_file_cache_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_t), MP_ROM_PTR(&mp_lv_cache_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_class_t), MP_ROM_PTR(&mp_lv_cache_class_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_entry_t), MP_ROM_PTR(&mp_lv_cache_entry_t_type) }, + { MP_ROM_QSTR(MP_QSTR_iter_t), MP_ROM_PTR(&mp_lv_iter_t_type) }, + { MP_ROM_QSTR(MP_QSTR_cache_ops_t), MP_ROM_PTR(&mp_lv_cache_ops_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_cache_data_t), MP_ROM_PTR(&mp_lv_image_cache_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_cache_slot_size_t), MP_ROM_PTR(&mp_lv_cache_slot_size_t_type) }, { MP_ROM_QSTR(MP_QSTR_calendar_date_t), MP_ROM_PTR(&mp_lv_calendar_date_t_type) }, @@ -49960,31 +53904,32 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_scale_section_t), MP_ROM_PTR(&mp_lv_scale_section_t_type) }, { MP_ROM_QSTR(MP_QSTR_span_t), MP_ROM_PTR(&mp_lv_span_t_type) }, { MP_ROM_QSTR(MP_QSTR_span_coords_t), MP_ROM_PTR(&mp_lv_span_coords_t_type) }, - { MP_ROM_QSTR(MP_QSTR_tree_class_t), MP_ROM_PTR(&mp_lv_tree_class_t_type) }, - { MP_ROM_QSTR(MP_QSTR_tree_node_t), MP_ROM_PTR(&mp_lv_tree_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_class_t), MP_ROM_PTR(&mp_lv_font_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_font_info_t), MP_ROM_PTR(&mp_lv_font_info_t_type) }, + { MP_ROM_QSTR(MP_QSTR_tree_class_t), MP_ROM_PTR(&mp_lv_tree_class_t_type) }, + { MP_ROM_QSTR(MP_QSTR_tree_node_t), MP_ROM_PTR(&mp_lv_tree_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_color16_t), MP_ROM_PTR(&mp_lv_color16_t_type) }, { MP_ROM_QSTR(MP_QSTR_mem_monitor_t), MP_ROM_PTR(&mp_lv_mem_monitor_t_type) }, - { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, - { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, - { MP_ROM_QSTR(MP_QSTR_circle_buf_t), MP_ROM_PTR(&mp_lv_circle_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_layout_callbacks_t), MP_ROM_PTR(&mp_lv_layout_callbacks_t_type) }, - { MP_ROM_QSTR(MP_QSTR_fs_path_ex_t), MP_ROM_PTR(&mp_lv_fs_path_ex_t_type) }, - { MP_ROM_QSTR(MP_QSTR_fs_dir_t), MP_ROM_PTR(&mp_lv_fs_dir_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_fill_dsc_t), MP_ROM_PTR(&mp_lv_draw_fill_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_border_dsc_t), MP_ROM_PTR(&mp_lv_draw_border_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_box_shadow_dsc_t), MP_ROM_PTR(&mp_lv_draw_box_shadow_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_letter_dsc_t), MP_ROM_PTR(&mp_lv_draw_letter_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_glyph_dsc_t), MP_ROM_PTR(&mp_lv_draw_glyph_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_fs_path_ex_t), MP_ROM_PTR(&mp_lv_fs_path_ex_t_type) }, + { MP_ROM_QSTR(MP_QSTR_fs_dir_t), MP_ROM_PTR(&mp_lv_fs_dir_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_triangle_dsc_t), MP_ROM_PTR(&mp_lv_draw_triangle_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_t), MP_ROM_PTR(&mp_lv_indev_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_data_t), MP_ROM_PTR(&mp_lv_indev_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_recognizer_t), MP_ROM_PTR(&mp_lv_indev_gesture_recognizer_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_t), MP_ROM_PTR(&mp_lv_indev_gesture_t_type) }, + { MP_ROM_QSTR(MP_QSTR_indev_gesture_motion_t), MP_ROM_PTR(&mp_lv_indev_gesture_motion_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_gesture_configuration_t), MP_ROM_PTR(&mp_lv_indev_gesture_configuration_t_type) }, { MP_ROM_QSTR(MP_QSTR_indev_touch_data_t), MP_ROM_PTR(&mp_lv_indev_touch_data_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_mask_rect_dsc_t), MP_ROM_PTR(&mp_lv_draw_mask_rect_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_binfont_dsc_t), MP_ROM_PTR(&mp_lv_binfont_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_custom_blend_handler_t), MP_ROM_PTR(&mp_lv_draw_sw_custom_blend_handler_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_line_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_line_param_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_common_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_common_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_angle_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_angle_param_t_type) }, @@ -49992,8 +53937,15 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_radius_circle_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_radius_circle_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_fade_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_fade_param_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_sw_mask_map_param_t), MP_ROM_PTR(&mp_lv_draw_sw_mask_map_param_t_type) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_custom_blend_handler_t), MP_ROM_PTR(&mp_lv_draw_sw_custom_blend_handler_t_type) }, - { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_fill_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_fill_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_blend_image_dsc_t), MP_ROM_PTR(&mp_lv_draw_sw_blend_image_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_draw_sw_grad_calc_t), MP_ROM_PTR(&mp_lv_draw_sw_grad_calc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_circle_buf_t), MP_ROM_PTR(&mp_lv_circle_buf_t_type) }, + { MP_ROM_QSTR(MP_QSTR_lru_t), MP_ROM_PTR(&mp_lv_lru_t_type) }, + { MP_ROM_QSTR(MP_QSTR_lru_item_t), MP_ROM_PTR(&mp_lv_lru_item_t_type) }, + { MP_ROM_QSTR(MP_QSTR_pending_t), MP_ROM_PTR(&mp_lv_pending_t_type) }, + { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, + { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_text_attributes_t), MP_ROM_PTR(&mp_lv_text_attributes_t_type) }, { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_hit_test_info_t), MP_ROM_PTR(&mp_lv_hit_test_info_t_type) }, @@ -50001,7 +53953,6 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_color_filter_shade), MP_ROM_PTR(&mp_lv_color_filter_shade) }, - { MP_ROM_QSTR(MP_QSTR_tree_node_class), MP_ROM_PTR(&mp_lv_tree_node_class) }, #if LV_FONT_MONTSERRAT_14 { MP_ROM_QSTR(MP_QSTR_font_montserrat_14), MP_ROM_PTR(&mp_lv_font_montserrat_14) }, #endif @@ -50027,12 +53978,13 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_arclabel_class), MP_ROM_PTR(&mp_lv_arclabel_class) }, { MP_ROM_QSTR(MP_QSTR_label_class), MP_ROM_PTR(&mp_lv_label_class) }, { MP_ROM_QSTR(MP_QSTR_bar_class), MP_ROM_PTR(&mp_lv_bar_class) }, + { MP_ROM_QSTR(MP_QSTR_canvas_class), MP_ROM_PTR(&mp_lv_canvas_class) }, + { MP_ROM_QSTR(MP_QSTR_barcode_class), MP_ROM_PTR(&mp_lv_barcode_class) }, { MP_ROM_QSTR(MP_QSTR_button_class), MP_ROM_PTR(&mp_lv_button_class) }, { MP_ROM_QSTR(MP_QSTR_buttonmatrix_class), MP_ROM_PTR(&mp_lv_buttonmatrix_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_class), MP_ROM_PTR(&mp_lv_calendar_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_header_arrow_class), MP_ROM_PTR(&mp_lv_calendar_header_arrow_class) }, { MP_ROM_QSTR(MP_QSTR_calendar_header_dropdown_class), MP_ROM_PTR(&mp_lv_calendar_header_dropdown_class) }, - { MP_ROM_QSTR(MP_QSTR_canvas_class), MP_ROM_PTR(&mp_lv_canvas_class) }, { MP_ROM_QSTR(MP_QSTR_chart_class), MP_ROM_PTR(&mp_lv_chart_class) }, { MP_ROM_QSTR(MP_QSTR_checkbox_class), MP_ROM_PTR(&mp_lv_checkbox_class) }, { MP_ROM_QSTR(MP_QSTR_dropdown_class), MP_ROM_PTR(&mp_lv_dropdown_class) }, @@ -50061,6 +54013,7 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_msgbox_header_button_class), MP_ROM_PTR(&mp_lv_msgbox_header_button_class) }, { MP_ROM_QSTR(MP_QSTR_msgbox_footer_button_class), MP_ROM_PTR(&mp_lv_msgbox_footer_button_class) }, { MP_ROM_QSTR(MP_QSTR_msgbox_backdrop_class), MP_ROM_PTR(&mp_lv_msgbox_backdrop_class) }, + { MP_ROM_QSTR(MP_QSTR_qrcode_class), MP_ROM_PTR(&mp_lv_qrcode_class) }, { MP_ROM_QSTR(MP_QSTR_roller_class), MP_ROM_PTR(&mp_lv_roller_class) }, { MP_ROM_QSTR(MP_QSTR_scale_class), MP_ROM_PTR(&mp_lv_scale_class) }, { MP_ROM_QSTR(MP_QSTR_slider_class), MP_ROM_PTR(&mp_lv_slider_class) }, @@ -50074,13 +54027,12 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_tileview_class), MP_ROM_PTR(&mp_lv_tileview_class) }, { MP_ROM_QSTR(MP_QSTR_tileview_tile_class), MP_ROM_PTR(&mp_lv_tileview_tile_class) }, { MP_ROM_QSTR(MP_QSTR_win_class), MP_ROM_PTR(&mp_lv_win_class) }, - { MP_ROM_QSTR(MP_QSTR_barcode_class), MP_ROM_PTR(&mp_lv_barcode_class) }, - { MP_ROM_QSTR(MP_QSTR_qrcode_class), MP_ROM_PTR(&mp_lv_qrcode_class) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_rb_count), MP_ROM_PTR(&mp_lv_cache_class_lru_rb_count) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_rb_size), MP_ROM_PTR(&mp_lv_cache_class_lru_rb_size) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_ll_count), MP_ROM_PTR(&mp_lv_cache_class_lru_ll_count) }, { MP_ROM_QSTR(MP_QSTR_cache_class_lru_ll_size), MP_ROM_PTR(&mp_lv_cache_class_lru_ll_size) }, { MP_ROM_QSTR(MP_QSTR_cache_class_sc_da), MP_ROM_PTR(&mp_lv_cache_class_sc_da) }, + { MP_ROM_QSTR(MP_QSTR_tree_node_class), MP_ROM_PTR(&mp_lv_tree_node_class) }, { MP_ROM_QSTR(MP_QSTR__nesting), MP_ROM_PTR(&mp__nesting) }, { MP_ROM_QSTR(MP_QSTR_DPI_DEF), MP_ROM_PTR(MP_ROM_INT(ENUM_LV_DPI_DEF)) }, @@ -50140,10 +54092,11 @@ static const mp_lv_obj_type_t *mp_lv_obj_types[] = { &mp_lv_arclabel_type, &mp_lv_label_type, &mp_lv_bar_type, + &mp_lv_canvas_type, + &mp_lv_barcode_type, &mp_lv_button_type, &mp_lv_buttonmatrix_type, &mp_lv_calendar_type, - &mp_lv_canvas_type, &mp_lv_chart_type, &mp_lv_checkbox_type, &mp_lv_dropdown_type, @@ -50159,6 +54112,7 @@ static const mp_lv_obj_type_t *mp_lv_obj_types[] = { &mp_lv_menu_section_type, &mp_lv_menu_separator_type, &mp_lv_msgbox_type, + &mp_lv_qrcode_type, &mp_lv_roller_type, &mp_lv_scale_type, &mp_lv_slider_type, @@ -50171,8 +54125,6 @@ static const mp_lv_obj_type_t *mp_lv_obj_types[] = { &mp_lv_tabview_type, &mp_lv_tileview_type, &mp_lv_win_type, - &mp_lv_barcode_type, - &mp_lv_qrcode_type, NULL }; diff --git a/generated/lvgl_python.c b/generated/lvgl_python.c index 264d944..82ed7a7 100644 --- a/generated/lvgl_python.c +++ b/generated/lvgl_python.c @@ -10,7 +10,7 @@ * Preprocessing command: * Preprocessing was disabled. * - * Generating Objects: obj(None), image(obj), animimg(obj), arc(obj), arclabel(obj), label(obj), bar(obj), button(obj), buttonmatrix(obj), calendar(obj), canvas(obj), chart(obj), checkbox(obj), dropdown(obj), gif(obj), imagebutton(obj), keyboard(obj), led(obj), line(obj), list(obj), menu(obj), menu_page(obj), menu_cont(obj), menu_section(obj), menu_separator(obj), msgbox(obj), roller(obj), scale(obj), slider(obj), spangroup(obj), textarea(obj), spinbox(obj), spinner(obj), switch(obj), table(obj), tabview(obj), tileview(obj), win(obj), barcode(obj), qrcode(obj) + * Generating Objects: obj(None), image(obj), animimg(obj), arc(obj), arclabel(obj), label(obj), bar(obj), canvas(obj), barcode(obj), button(obj), buttonmatrix(obj), calendar(obj), chart(obj), checkbox(obj), dropdown(obj), gif(obj), imagebutton(obj), keyboard(obj), led(obj), line(obj), list(obj), menu(obj), menu_page(obj), menu_cont(obj), menu_section(obj), menu_separator(obj), msgbox(obj), qrcode(obj), roller(obj), scale(obj), slider(obj), spangroup(obj), textarea(obj), spinbox(obj), spinner(obj), switch(obj), table(obj), tabview(obj), tileview(obj), win(obj) */ /* @@ -30,6 +30,14 @@ #include "lvgl/lvgl.h" #include "lvgl/src/lvgl_private.h" +/* + * The binding keeps every function LVGL marks deprecated callable until LVGL + * removes it, so a call to one here is not a warning (LVGL 9.6 and later). + */ +#ifdef LV_DEPRECATIONS_IGNORE_BEGIN +LV_DEPRECATIONS_IGNORE_BEGIN +#endif + #define LV_OBJ_T lv_obj_t @@ -350,58 +358,6 @@ static PyObject *lvpy_enum_dir(PyObject *self, const char *const *members) } -static PyObject *py_lv_ENUM_LV_LOG_LEVEL_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "TRACE") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_TRACE); - if (strcmp(attr, "INFO") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_INFO); - if (strcmp(attr, "WARN") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_WARN); - if (strcmp(attr, "ERROR") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_ERROR); - if (strcmp(attr, "USER") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_USER); - if (strcmp(attr, "NONE") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_NONE); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_ENUM_LV_LOG_LEVEL_members[] = { - "TRACE", - "INFO", - "WARN", - "ERROR", - "USER", - "NONE", - NULL -}; - -static PyObject *py_lv_ENUM_LV_LOG_LEVEL_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_ENUM_LV_LOG_LEVEL_members); -} - -static PyMethodDef py_lv_ENUM_LV_LOG_LEVEL_methods[] = { - {"__dir__", py_lv_ENUM_LV_LOG_LEVEL_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_ENUM_LV_LOG_LEVEL_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.LOG_LEVEL", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_ENUM_LV_LOG_LEVEL_getattro, - .tp_methods = py_lv_ENUM_LV_LOG_LEVEL_methods, - .tp_doc = "LVGL LOG_LEVEL enum namespace", -}; - - static PyObject *py_lv_ENUM_LV_COORD_getattro(PyObject *self, PyObject *name) { (void)self; @@ -446,116 +402,6 @@ static PyTypeObject py_lv_ENUM_LV_COORD_type = { }; -static PyObject *py_lv_LV_OPA_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "TRANSP") == 0) return PyLong_FromLong(LV_OPA_TRANSP); - if (strcmp(attr, "_0") == 0) return PyLong_FromLong(LV_OPA_0); - if (strcmp(attr, "_10") == 0) return PyLong_FromLong(LV_OPA_10); - if (strcmp(attr, "_20") == 0) return PyLong_FromLong(LV_OPA_20); - if (strcmp(attr, "_30") == 0) return PyLong_FromLong(LV_OPA_30); - if (strcmp(attr, "_40") == 0) return PyLong_FromLong(LV_OPA_40); - if (strcmp(attr, "_50") == 0) return PyLong_FromLong(LV_OPA_50); - if (strcmp(attr, "_60") == 0) return PyLong_FromLong(LV_OPA_60); - if (strcmp(attr, "_70") == 0) return PyLong_FromLong(LV_OPA_70); - if (strcmp(attr, "_80") == 0) return PyLong_FromLong(LV_OPA_80); - if (strcmp(attr, "_90") == 0) return PyLong_FromLong(LV_OPA_90); - if (strcmp(attr, "_100") == 0) return PyLong_FromLong(LV_OPA_100); - if (strcmp(attr, "COVER") == 0) return PyLong_FromLong(LV_OPA_COVER); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_LV_OPA_members[] = { - "TRANSP", - "_0", - "_10", - "_20", - "_30", - "_40", - "_50", - "_60", - "_70", - "_80", - "_90", - "_100", - "COVER", - NULL -}; - -static PyObject *py_lv_LV_OPA_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_LV_OPA_members); -} - -static PyMethodDef py_lv_LV_OPA_methods[] = { - {"__dir__", py_lv_LV_OPA_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_LV_OPA_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.OPA", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_OPA_getattro, - .tp_methods = py_lv_LV_OPA_methods, - .tp_doc = "LVGL OPA enum namespace", -}; - - -static PyObject *py_lv_LV_TREE_WALK_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "PRE_ORDER") == 0) return PyLong_FromLong(LV_TREE_WALK_PRE_ORDER); - if (strcmp(attr, "POST_ORDER") == 0) return PyLong_FromLong(LV_TREE_WALK_POST_ORDER); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_LV_TREE_WALK_members[] = { - "PRE_ORDER", - "POST_ORDER", - NULL -}; - -static PyObject *py_lv_LV_TREE_WALK_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_LV_TREE_WALK_members); -} - -static PyMethodDef py_lv_LV_TREE_WALK_methods[] = { - {"__dir__", py_lv_LV_TREE_WALK_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_LV_TREE_WALK_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.TREE_WALK", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_TREE_WALK_getattro, - .tp_methods = py_lv_LV_TREE_WALK_methods, - .tp_doc = "LVGL TREE_WALK enum namespace", -}; - - static PyObject *py_lv_LV_STR_SYMBOL_getattro(PyObject *self, PyObject *name) { (void)self; @@ -720,6 +566,124 @@ static PyTypeObject py_lv_LV_STR_SYMBOL_type = { }; +static PyObject *py_lv_ENUM_LV_LOG_LEVEL_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "TRACE") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_TRACE); + if (strcmp(attr, "INFO") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_INFO); + if (strcmp(attr, "WARN") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_WARN); + if (strcmp(attr, "ERROR") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_ERROR); + if (strcmp(attr, "USER") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_USER); + if (strcmp(attr, "NONE") == 0) return PyLong_FromLong(ENUM_LV_LOG_LEVEL_NONE); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_ENUM_LV_LOG_LEVEL_members[] = { + "TRACE", + "INFO", + "WARN", + "ERROR", + "USER", + "NONE", + NULL +}; + +static PyObject *py_lv_ENUM_LV_LOG_LEVEL_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_ENUM_LV_LOG_LEVEL_members); +} + +static PyMethodDef py_lv_ENUM_LV_LOG_LEVEL_methods[] = { + {"__dir__", py_lv_ENUM_LV_LOG_LEVEL_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_ENUM_LV_LOG_LEVEL_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.LOG_LEVEL", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_ENUM_LV_LOG_LEVEL_getattro, + .tp_methods = py_lv_ENUM_LV_LOG_LEVEL_methods, + .tp_doc = "LVGL LOG_LEVEL enum namespace", +}; + + +static PyObject *py_lv_LV_OPA_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "TRANSP") == 0) return PyLong_FromLong(LV_OPA_TRANSP); + if (strcmp(attr, "_0") == 0) return PyLong_FromLong(LV_OPA_0); + if (strcmp(attr, "_10") == 0) return PyLong_FromLong(LV_OPA_10); + if (strcmp(attr, "_20") == 0) return PyLong_FromLong(LV_OPA_20); + if (strcmp(attr, "_30") == 0) return PyLong_FromLong(LV_OPA_30); + if (strcmp(attr, "_40") == 0) return PyLong_FromLong(LV_OPA_40); + if (strcmp(attr, "_50") == 0) return PyLong_FromLong(LV_OPA_50); + if (strcmp(attr, "_60") == 0) return PyLong_FromLong(LV_OPA_60); + if (strcmp(attr, "_70") == 0) return PyLong_FromLong(LV_OPA_70); + if (strcmp(attr, "_80") == 0) return PyLong_FromLong(LV_OPA_80); + if (strcmp(attr, "_90") == 0) return PyLong_FromLong(LV_OPA_90); + if (strcmp(attr, "_100") == 0) return PyLong_FromLong(LV_OPA_100); + if (strcmp(attr, "COVER") == 0) return PyLong_FromLong(LV_OPA_COVER); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_OPA_members[] = { + "TRANSP", + "_0", + "_10", + "_20", + "_30", + "_40", + "_50", + "_60", + "_70", + "_80", + "_90", + "_100", + "COVER", + NULL +}; + +static PyObject *py_lv_LV_OPA_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_OPA_members); +} + +static PyMethodDef py_lv_LV_OPA_methods[] = { + {"__dir__", py_lv_LV_OPA_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_OPA_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.OPA", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_OPA_getattro, + .tp_methods = py_lv_LV_OPA_methods, + .tp_doc = "LVGL OPA enum namespace", +}; + + static PyObject *py_lv_LV_STYLE_getattro(PyObject *self, PyObject *name) { (void)self; @@ -861,6 +825,7 @@ static PyObject *py_lv_LV_STYLE_getattro(PyObject *self, PyObject *name) if (strcmp(attr, "GRID_CELL_ROW_POS") == 0) return PyLong_FromLong(LV_STYLE_GRID_CELL_ROW_POS); if (strcmp(attr, "GRID_CELL_ROW_SPAN") == 0) return PyLong_FromLong(LV_STYLE_GRID_CELL_ROW_SPAN); if (strcmp(attr, "GRID_CELL_Y_ALIGN") == 0) return PyLong_FromLong(LV_STYLE_GRID_CELL_Y_ALIGN); + if (strcmp(attr, "TEXT_LEADING_TRIM") == 0) return PyLong_FromLong(LV_STYLE_TEXT_LEADING_TRIM); if (strcmp(attr, "LAST_BUILT_IN_PROP") == 0) return PyLong_FromLong(LV_STYLE_LAST_BUILT_IN_PROP); if (strcmp(attr, "NUM_BUILT_IN_PROPS") == 0) return PyLong_FromLong(LV_STYLE_NUM_BUILT_IN_PROPS); if (strcmp(attr, "PROP_ANY") == 0) return PyLong_FromLong(LV_STYLE_PROP_ANY); @@ -999,6 +964,7 @@ static const char *const py_lv_LV_STYLE_members[] = { "GRID_CELL_ROW_POS", "GRID_CELL_ROW_SPAN", "GRID_CELL_Y_ALIGN", + "TEXT_LEADING_TRIM", "LAST_BUILT_IN_PROP", "NUM_BUILT_IN_PROPS", "PROP_ANY", @@ -1026,7 +992,7 @@ static PyTypeObject py_lv_LV_STYLE_type = { }; -static PyObject *py_lv_LV_RESULT_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_LV_TREE_WALK_getattro(PyObject *self, PyObject *name) { (void)self; if (!PyUnicode_Check(name)) { @@ -1038,39 +1004,39 @@ static PyObject *py_lv_LV_RESULT_getattro(PyObject *self, PyObject *name) return NULL; } - if (strcmp(attr, "INVALID") == 0) return PyLong_FromLong(LV_RESULT_INVALID); - if (strcmp(attr, "OK") == 0) return PyLong_FromLong(LV_RESULT_OK); + if (strcmp(attr, "PRE_ORDER") == 0) return PyLong_FromLong(LV_TREE_WALK_PRE_ORDER); + if (strcmp(attr, "POST_ORDER") == 0) return PyLong_FromLong(LV_TREE_WALK_POST_ORDER); return PyObject_GenericGetAttr(self, name); } -static const char *const py_lv_LV_RESULT_members[] = { - "INVALID", - "OK", +static const char *const py_lv_LV_TREE_WALK_members[] = { + "PRE_ORDER", + "POST_ORDER", NULL }; -static PyObject *py_lv_LV_RESULT_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +static PyObject *py_lv_LV_TREE_WALK_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) { - return lvpy_enum_dir(self, py_lv_LV_RESULT_members); + return lvpy_enum_dir(self, py_lv_LV_TREE_WALK_members); } -static PyMethodDef py_lv_LV_RESULT_methods[] = { - {"__dir__", py_lv_LV_RESULT_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_LV_TREE_WALK_methods[] = { + {"__dir__", py_lv_LV_TREE_WALK_dir, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL} }; -static PyTypeObject py_lv_LV_RESULT_type = { +static PyTypeObject py_lv_LV_TREE_WALK_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.RESULT", + .tp_name = "lvgl.TREE_WALK", .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_RESULT_getattro, - .tp_methods = py_lv_LV_RESULT_methods, - .tp_doc = "LVGL RESULT enum namespace", + .tp_getattro = py_lv_LV_TREE_WALK_getattro, + .tp_methods = py_lv_LV_TREE_WALK_methods, + .tp_doc = "LVGL TREE_WALK enum namespace", }; -static PyObject *py_lv_LV_RB_COLOR_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_LV_RESULT_getattro(PyObject *self, PyObject *name) { (void)self; if (!PyUnicode_Check(name)) { @@ -1082,35 +1048,35 @@ static PyObject *py_lv_LV_RB_COLOR_getattro(PyObject *self, PyObject *name) return NULL; } - if (strcmp(attr, "RED") == 0) return PyLong_FromLong(LV_RB_COLOR_RED); - if (strcmp(attr, "BLACK") == 0) return PyLong_FromLong(LV_RB_COLOR_BLACK); + if (strcmp(attr, "INVALID") == 0) return PyLong_FromLong(LV_RESULT_INVALID); + if (strcmp(attr, "OK") == 0) return PyLong_FromLong(LV_RESULT_OK); return PyObject_GenericGetAttr(self, name); } -static const char *const py_lv_LV_RB_COLOR_members[] = { - "RED", - "BLACK", +static const char *const py_lv_LV_RESULT_members[] = { + "INVALID", + "OK", NULL }; -static PyObject *py_lv_LV_RB_COLOR_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +static PyObject *py_lv_LV_RESULT_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) { - return lvpy_enum_dir(self, py_lv_LV_RB_COLOR_members); + return lvpy_enum_dir(self, py_lv_LV_RESULT_members); } -static PyMethodDef py_lv_LV_RB_COLOR_methods[] = { - {"__dir__", py_lv_LV_RB_COLOR_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_LV_RESULT_methods[] = { + {"__dir__", py_lv_LV_RESULT_dir, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL} }; -static PyTypeObject py_lv_LV_RB_COLOR_type = { +static PyTypeObject py_lv_LV_RESULT_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.RB_COLOR", + .tp_name = "lvgl.RESULT", .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_RB_COLOR_getattro, - .tp_methods = py_lv_LV_RB_COLOR_methods, - .tp_doc = "LVGL RB_COLOR enum namespace", + .tp_getattro = py_lv_LV_RESULT_getattro, + .tp_methods = py_lv_LV_RESULT_methods, + .tp_doc = "LVGL RESULT enum namespace", }; @@ -1254,6 +1220,320 @@ static PyTypeObject py_lv_LV_DIR_type = { }; +static PyObject *py_lv_LV_EVENT_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "ALL") == 0) return PyLong_FromLong(LV_EVENT_ALL); + if (strcmp(attr, "PRESSED") == 0) return PyLong_FromLong(LV_EVENT_PRESSED); + if (strcmp(attr, "PRESSING") == 0) return PyLong_FromLong(LV_EVENT_PRESSING); + if (strcmp(attr, "PRESS_LOST") == 0) return PyLong_FromLong(LV_EVENT_PRESS_LOST); + if (strcmp(attr, "SHORT_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_SHORT_CLICKED); + if (strcmp(attr, "SINGLE_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_SINGLE_CLICKED); + if (strcmp(attr, "DOUBLE_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_DOUBLE_CLICKED); + if (strcmp(attr, "TRIPLE_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_TRIPLE_CLICKED); + if (strcmp(attr, "LONG_PRESSED") == 0) return PyLong_FromLong(LV_EVENT_LONG_PRESSED); + if (strcmp(attr, "LONG_PRESSED_REPEAT") == 0) return PyLong_FromLong(LV_EVENT_LONG_PRESSED_REPEAT); + if (strcmp(attr, "CLICKED") == 0) return PyLong_FromLong(LV_EVENT_CLICKED); + if (strcmp(attr, "RELEASED") == 0) return PyLong_FromLong(LV_EVENT_RELEASED); + if (strcmp(attr, "SCROLL_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_SCROLL_BEGIN); + if (strcmp(attr, "SCROLL_THROW_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_SCROLL_THROW_BEGIN); + if (strcmp(attr, "SCROLL_END") == 0) return PyLong_FromLong(LV_EVENT_SCROLL_END); + if (strcmp(attr, "SCROLL") == 0) return PyLong_FromLong(LV_EVENT_SCROLL); + if (strcmp(attr, "GESTURE") == 0) return PyLong_FromLong(LV_EVENT_GESTURE); + if (strcmp(attr, "GESTURE_UP") == 0) return PyLong_FromLong(LV_EVENT_GESTURE_UP); + if (strcmp(attr, "GESTURE_DOWN") == 0) return PyLong_FromLong(LV_EVENT_GESTURE_DOWN); + if (strcmp(attr, "GESTURE_LEFT") == 0) return PyLong_FromLong(LV_EVENT_GESTURE_LEFT); + if (strcmp(attr, "GESTURE_RIGHT") == 0) return PyLong_FromLong(LV_EVENT_GESTURE_RIGHT); + if (strcmp(attr, "KEY") == 0) return PyLong_FromLong(LV_EVENT_KEY); + if (strcmp(attr, "ROTARY") == 0) return PyLong_FromLong(LV_EVENT_ROTARY); + if (strcmp(attr, "FOCUSED") == 0) return PyLong_FromLong(LV_EVENT_FOCUSED); + if (strcmp(attr, "DEFOCUSED") == 0) return PyLong_FromLong(LV_EVENT_DEFOCUSED); + if (strcmp(attr, "LEAVE") == 0) return PyLong_FromLong(LV_EVENT_LEAVE); + if (strcmp(attr, "HIT_TEST") == 0) return PyLong_FromLong(LV_EVENT_HIT_TEST); + if (strcmp(attr, "INDEV_RESET") == 0) return PyLong_FromLong(LV_EVENT_INDEV_RESET); + if (strcmp(attr, "HOVER_OVER") == 0) return PyLong_FromLong(LV_EVENT_HOVER_OVER); + if (strcmp(attr, "HOVER_LEAVE") == 0) return PyLong_FromLong(LV_EVENT_HOVER_LEAVE); + if (strcmp(attr, "COVER_CHECK") == 0) return PyLong_FromLong(LV_EVENT_COVER_CHECK); + if (strcmp(attr, "REFR_EXT_DRAW_SIZE") == 0) return PyLong_FromLong(LV_EVENT_REFR_EXT_DRAW_SIZE); + if (strcmp(attr, "DRAW_MAIN_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_DRAW_MAIN_BEGIN); + if (strcmp(attr, "DRAW_MAIN") == 0) return PyLong_FromLong(LV_EVENT_DRAW_MAIN); + if (strcmp(attr, "DRAW_MAIN_END") == 0) return PyLong_FromLong(LV_EVENT_DRAW_MAIN_END); + if (strcmp(attr, "DRAW_POST_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_DRAW_POST_BEGIN); + if (strcmp(attr, "DRAW_POST") == 0) return PyLong_FromLong(LV_EVENT_DRAW_POST); + if (strcmp(attr, "DRAW_POST_END") == 0) return PyLong_FromLong(LV_EVENT_DRAW_POST_END); + if (strcmp(attr, "DRAW_TASK_ADDED") == 0) return PyLong_FromLong(LV_EVENT_DRAW_TASK_ADDED); + if (strcmp(attr, "VALUE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_VALUE_CHANGED); + if (strcmp(attr, "INSERT") == 0) return PyLong_FromLong(LV_EVENT_INSERT); + if (strcmp(attr, "REFRESH") == 0) return PyLong_FromLong(LV_EVENT_REFRESH); + if (strcmp(attr, "READY") == 0) return PyLong_FromLong(LV_EVENT_READY); + if (strcmp(attr, "CANCEL") == 0) return PyLong_FromLong(LV_EVENT_CANCEL); + if (strcmp(attr, "STATE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_STATE_CHANGED); + if (strcmp(attr, "CHECKED") == 0) return PyLong_FromLong(LV_EVENT_CHECKED); + if (strcmp(attr, "UNCHECKED") == 0) return PyLong_FromLong(LV_EVENT_UNCHECKED); + if (strcmp(attr, "CREATE") == 0) return PyLong_FromLong(LV_EVENT_CREATE); + if (strcmp(attr, "DELETE") == 0) return PyLong_FromLong(LV_EVENT_DELETE); + if (strcmp(attr, "CHILD_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_CHILD_CHANGED); + if (strcmp(attr, "CHILD_CREATED") == 0) return PyLong_FromLong(LV_EVENT_CHILD_CREATED); + if (strcmp(attr, "CHILD_DELETED") == 0) return PyLong_FromLong(LV_EVENT_CHILD_DELETED); + if (strcmp(attr, "SCREEN_UNLOAD_START") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_UNLOAD_START); + if (strcmp(attr, "SCREEN_LOAD_START") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_LOAD_START); + if (strcmp(attr, "SCREEN_LOADED") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_LOADED); + if (strcmp(attr, "SCREEN_UNLOADED") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_UNLOADED); + if (strcmp(attr, "SIZE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_SIZE_CHANGED); + if (strcmp(attr, "STYLE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_STYLE_CHANGED); + if (strcmp(attr, "LAYOUT_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_LAYOUT_CHANGED); + if (strcmp(attr, "GET_SELF_SIZE") == 0) return PyLong_FromLong(LV_EVENT_GET_SELF_SIZE); + if (strcmp(attr, "INVALIDATE_AREA") == 0) return PyLong_FromLong(LV_EVENT_INVALIDATE_AREA); + if (strcmp(attr, "RESOLUTION_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_RESOLUTION_CHANGED); + if (strcmp(attr, "COLOR_FORMAT_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_COLOR_FORMAT_CHANGED); + if (strcmp(attr, "REFR_REQUEST") == 0) return PyLong_FromLong(LV_EVENT_REFR_REQUEST); + if (strcmp(attr, "REFR_START") == 0) return PyLong_FromLong(LV_EVENT_REFR_START); + if (strcmp(attr, "REFR_READY") == 0) return PyLong_FromLong(LV_EVENT_REFR_READY); + if (strcmp(attr, "RENDER_START") == 0) return PyLong_FromLong(LV_EVENT_RENDER_START); + if (strcmp(attr, "RENDER_READY") == 0) return PyLong_FromLong(LV_EVENT_RENDER_READY); + if (strcmp(attr, "FLUSH_START") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_START); + if (strcmp(attr, "FLUSH_FINISH") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_FINISH); + if (strcmp(attr, "FLUSH_WAIT_START") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_WAIT_START); + if (strcmp(attr, "FLUSH_WAIT_FINISH") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_WAIT_FINISH); + if (strcmp(attr, "SYNC_START") == 0) return PyLong_FromLong(LV_EVENT_SYNC_START); + if (strcmp(attr, "SYNC_FINISH") == 0) return PyLong_FromLong(LV_EVENT_SYNC_FINISH); + if (strcmp(attr, "SYNC_WAIT_START") == 0) return PyLong_FromLong(LV_EVENT_SYNC_WAIT_START); + if (strcmp(attr, "SYNC_WAIT_FINISH") == 0) return PyLong_FromLong(LV_EVENT_SYNC_WAIT_FINISH); + if (strcmp(attr, "UPDATE_LAYOUT_COMPLETED") == 0) return PyLong_FromLong(LV_EVENT_UPDATE_LAYOUT_COMPLETED); + if (strcmp(attr, "VSYNC") == 0) return PyLong_FromLong(LV_EVENT_VSYNC); + if (strcmp(attr, "VSYNC_REQUEST") == 0) return PyLong_FromLong(LV_EVENT_VSYNC_REQUEST); + if (strcmp(attr, "LAST") == 0) return PyLong_FromLong(LV_EVENT_LAST); + if (strcmp(attr, "LAST_CUSTOM") == 0) return PyLong_FromLong(LV_EVENT_LAST_CUSTOM); + if (strcmp(attr, "PREPROCESS") == 0) return PyLong_FromLong(LV_EVENT_PREPROCESS); + if (strcmp(attr, "MARKED_DELETING") == 0) return PyLong_FromLong(LV_EVENT_MARKED_DELETING); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_EVENT_members[] = { + "ALL", + "PRESSED", + "PRESSING", + "PRESS_LOST", + "SHORT_CLICKED", + "SINGLE_CLICKED", + "DOUBLE_CLICKED", + "TRIPLE_CLICKED", + "LONG_PRESSED", + "LONG_PRESSED_REPEAT", + "CLICKED", + "RELEASED", + "SCROLL_BEGIN", + "SCROLL_THROW_BEGIN", + "SCROLL_END", + "SCROLL", + "GESTURE", + "GESTURE_UP", + "GESTURE_DOWN", + "GESTURE_LEFT", + "GESTURE_RIGHT", + "KEY", + "ROTARY", + "FOCUSED", + "DEFOCUSED", + "LEAVE", + "HIT_TEST", + "INDEV_RESET", + "HOVER_OVER", + "HOVER_LEAVE", + "COVER_CHECK", + "REFR_EXT_DRAW_SIZE", + "DRAW_MAIN_BEGIN", + "DRAW_MAIN", + "DRAW_MAIN_END", + "DRAW_POST_BEGIN", + "DRAW_POST", + "DRAW_POST_END", + "DRAW_TASK_ADDED", + "VALUE_CHANGED", + "INSERT", + "REFRESH", + "READY", + "CANCEL", + "STATE_CHANGED", + "CHECKED", + "UNCHECKED", + "CREATE", + "DELETE", + "CHILD_CHANGED", + "CHILD_CREATED", + "CHILD_DELETED", + "SCREEN_UNLOAD_START", + "SCREEN_LOAD_START", + "SCREEN_LOADED", + "SCREEN_UNLOADED", + "SIZE_CHANGED", + "STYLE_CHANGED", + "LAYOUT_CHANGED", + "GET_SELF_SIZE", + "INVALIDATE_AREA", + "RESOLUTION_CHANGED", + "COLOR_FORMAT_CHANGED", + "REFR_REQUEST", + "REFR_START", + "REFR_READY", + "RENDER_START", + "RENDER_READY", + "FLUSH_START", + "FLUSH_FINISH", + "FLUSH_WAIT_START", + "FLUSH_WAIT_FINISH", + "SYNC_START", + "SYNC_FINISH", + "SYNC_WAIT_START", + "SYNC_WAIT_FINISH", + "UPDATE_LAYOUT_COMPLETED", + "VSYNC", + "VSYNC_REQUEST", + "LAST", + "LAST_CUSTOM", + "PREPROCESS", + "MARKED_DELETING", + NULL +}; + +static PyObject *py_lv_LV_EVENT_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_EVENT_members); +} + +static PyMethodDef py_lv_LV_EVENT_methods[] = { + {"__dir__", py_lv_LV_EVENT_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_EVENT_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.EVENT", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_EVENT_getattro, + .tp_methods = py_lv_LV_EVENT_methods, + .tp_doc = "LVGL EVENT enum namespace", +}; + + +static PyObject *py_lv_LV_KEY_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "UP") == 0) return PyLong_FromLong(LV_KEY_UP); + if (strcmp(attr, "DOWN") == 0) return PyLong_FromLong(LV_KEY_DOWN); + if (strcmp(attr, "RIGHT") == 0) return PyLong_FromLong(LV_KEY_RIGHT); + if (strcmp(attr, "LEFT") == 0) return PyLong_FromLong(LV_KEY_LEFT); + if (strcmp(attr, "ESC") == 0) return PyLong_FromLong(LV_KEY_ESC); + if (strcmp(attr, "DEL") == 0) return PyLong_FromLong(LV_KEY_DEL); + if (strcmp(attr, "BACKSPACE") == 0) return PyLong_FromLong(LV_KEY_BACKSPACE); + if (strcmp(attr, "ENTER") == 0) return PyLong_FromLong(LV_KEY_ENTER); + if (strcmp(attr, "NEXT") == 0) return PyLong_FromLong(LV_KEY_NEXT); + if (strcmp(attr, "PREV") == 0) return PyLong_FromLong(LV_KEY_PREV); + if (strcmp(attr, "HOME") == 0) return PyLong_FromLong(LV_KEY_HOME); + if (strcmp(attr, "END") == 0) return PyLong_FromLong(LV_KEY_END); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_KEY_members[] = { + "UP", + "DOWN", + "RIGHT", + "LEFT", + "ESC", + "DEL", + "BACKSPACE", + "ENTER", + "NEXT", + "PREV", + "HOME", + "END", + NULL +}; + +static PyObject *py_lv_LV_KEY_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_KEY_members); +} + +static PyMethodDef py_lv_LV_KEY_methods[] = { + {"__dir__", py_lv_LV_KEY_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_KEY_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.KEY", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_KEY_getattro, + .tp_methods = py_lv_LV_KEY_methods, + .tp_doc = "LVGL KEY enum namespace", +}; + + +static PyObject *py_lv_LV_GROUP_REFOCUS_POLICY_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "NEXT") == 0) return PyLong_FromLong(LV_GROUP_REFOCUS_POLICY_NEXT); + if (strcmp(attr, "PREV") == 0) return PyLong_FromLong(LV_GROUP_REFOCUS_POLICY_PREV); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_GROUP_REFOCUS_POLICY_members[] = { + "NEXT", + "PREV", + NULL +}; + +static PyObject *py_lv_LV_GROUP_REFOCUS_POLICY_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_GROUP_REFOCUS_POLICY_members); +} + +static PyMethodDef py_lv_LV_GROUP_REFOCUS_POLICY_methods[] = { + {"__dir__", py_lv_LV_GROUP_REFOCUS_POLICY_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_GROUP_REFOCUS_POLICY_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.GROUP_REFOCUS_POLICY", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_GROUP_REFOCUS_POLICY_getattro, + .tp_methods = py_lv_LV_GROUP_REFOCUS_POLICY_methods, + .tp_doc = "LVGL GROUP_REFOCUS_POLICY enum namespace", +}; + + static PyObject *py_lv_LV_COLOR_FORMAT_getattro(PyObject *self, PyObject *name) { (void)self; @@ -1309,8 +1589,6 @@ static PyObject *py_lv_LV_COLOR_FORMAT_getattro(PyObject *self, PyObject *name) if (strcmp(attr, "NEMA_TSC12") == 0) return PyLong_FromLong(LV_COLOR_FORMAT_NEMA_TSC12); if (strcmp(attr, "NEMA_TSC12A") == 0) return PyLong_FromLong(LV_COLOR_FORMAT_NEMA_TSC12A); if (strcmp(attr, "NEMA_TSC_END") == 0) return PyLong_FromLong(LV_COLOR_FORMAT_NEMA_TSC_END); - if (strcmp(attr, "NATIVE") == 0) return PyLong_FromLong(LV_COLOR_FORMAT_NATIVE); - if (strcmp(attr, "NATIVE_WITH_ALPHA") == 0) return PyLong_FromLong(LV_COLOR_FORMAT_NATIVE_WITH_ALPHA); return PyObject_GenericGetAttr(self, name); } @@ -1359,8 +1637,6 @@ static const char *const py_lv_LV_COLOR_FORMAT_members[] = { "NEMA_TSC12", "NEMA_TSC12A", "NEMA_TSC_END", - "NATIVE", - "NATIVE_WITH_ALPHA", NULL }; @@ -1828,6 +2104,56 @@ static PyTypeObject py_lv_LV_TEXT_ALIGN_type = { }; +static PyObject *py_lv_LV_TEXT_LEADING_TRIM_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "NONE") == 0) return PyLong_FromLong(LV_TEXT_LEADING_TRIM_NONE); + if (strcmp(attr, "CAPITAL_BASELINE") == 0) return PyLong_FromLong(LV_TEXT_LEADING_TRIM_CAPITAL_BASELINE); + if (strcmp(attr, "LOWER_BASELINE") == 0) return PyLong_FromLong(LV_TEXT_LEADING_TRIM_LOWER_BASELINE); + if (strcmp(attr, "CAPITAL") == 0) return PyLong_FromLong(LV_TEXT_LEADING_TRIM_CAPITAL); + if (strcmp(attr, "LOWER") == 0) return PyLong_FromLong(LV_TEXT_LEADING_TRIM_LOWER); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_TEXT_LEADING_TRIM_members[] = { + "NONE", + "CAPITAL_BASELINE", + "LOWER_BASELINE", + "CAPITAL", + "LOWER", + NULL +}; + +static PyObject *py_lv_LV_TEXT_LEADING_TRIM_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_TEXT_LEADING_TRIM_members); +} + +static PyMethodDef py_lv_LV_TEXT_LEADING_TRIM_methods[] = { + {"__dir__", py_lv_LV_TEXT_LEADING_TRIM_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_TEXT_LEADING_TRIM_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.TEXT_LEADING_TRIM", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_TEXT_LEADING_TRIM_getattro, + .tp_methods = py_lv_LV_TEXT_LEADING_TRIM_methods, + .tp_doc = "LVGL TEXT_LEADING_TRIM enum namespace", +}; + + static PyObject *py_lv_LV_BASE_DIR_getattro(PyObject *self, PyObject *name) { (void)self; @@ -2426,190 +2752,6 @@ static PyTypeObject py_lv_LV_STYLE_RES_type = { }; -static PyObject *py_lv_LV_EVENT_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "ALL") == 0) return PyLong_FromLong(LV_EVENT_ALL); - if (strcmp(attr, "PRESSED") == 0) return PyLong_FromLong(LV_EVENT_PRESSED); - if (strcmp(attr, "PRESSING") == 0) return PyLong_FromLong(LV_EVENT_PRESSING); - if (strcmp(attr, "PRESS_LOST") == 0) return PyLong_FromLong(LV_EVENT_PRESS_LOST); - if (strcmp(attr, "SHORT_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_SHORT_CLICKED); - if (strcmp(attr, "SINGLE_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_SINGLE_CLICKED); - if (strcmp(attr, "DOUBLE_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_DOUBLE_CLICKED); - if (strcmp(attr, "TRIPLE_CLICKED") == 0) return PyLong_FromLong(LV_EVENT_TRIPLE_CLICKED); - if (strcmp(attr, "LONG_PRESSED") == 0) return PyLong_FromLong(LV_EVENT_LONG_PRESSED); - if (strcmp(attr, "LONG_PRESSED_REPEAT") == 0) return PyLong_FromLong(LV_EVENT_LONG_PRESSED_REPEAT); - if (strcmp(attr, "CLICKED") == 0) return PyLong_FromLong(LV_EVENT_CLICKED); - if (strcmp(attr, "RELEASED") == 0) return PyLong_FromLong(LV_EVENT_RELEASED); - if (strcmp(attr, "SCROLL_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_SCROLL_BEGIN); - if (strcmp(attr, "SCROLL_THROW_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_SCROLL_THROW_BEGIN); - if (strcmp(attr, "SCROLL_END") == 0) return PyLong_FromLong(LV_EVENT_SCROLL_END); - if (strcmp(attr, "SCROLL") == 0) return PyLong_FromLong(LV_EVENT_SCROLL); - if (strcmp(attr, "GESTURE") == 0) return PyLong_FromLong(LV_EVENT_GESTURE); - if (strcmp(attr, "KEY") == 0) return PyLong_FromLong(LV_EVENT_KEY); - if (strcmp(attr, "ROTARY") == 0) return PyLong_FromLong(LV_EVENT_ROTARY); - if (strcmp(attr, "FOCUSED") == 0) return PyLong_FromLong(LV_EVENT_FOCUSED); - if (strcmp(attr, "DEFOCUSED") == 0) return PyLong_FromLong(LV_EVENT_DEFOCUSED); - if (strcmp(attr, "LEAVE") == 0) return PyLong_FromLong(LV_EVENT_LEAVE); - if (strcmp(attr, "HIT_TEST") == 0) return PyLong_FromLong(LV_EVENT_HIT_TEST); - if (strcmp(attr, "INDEV_RESET") == 0) return PyLong_FromLong(LV_EVENT_INDEV_RESET); - if (strcmp(attr, "HOVER_OVER") == 0) return PyLong_FromLong(LV_EVENT_HOVER_OVER); - if (strcmp(attr, "HOVER_LEAVE") == 0) return PyLong_FromLong(LV_EVENT_HOVER_LEAVE); - if (strcmp(attr, "COVER_CHECK") == 0) return PyLong_FromLong(LV_EVENT_COVER_CHECK); - if (strcmp(attr, "REFR_EXT_DRAW_SIZE") == 0) return PyLong_FromLong(LV_EVENT_REFR_EXT_DRAW_SIZE); - if (strcmp(attr, "DRAW_MAIN_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_DRAW_MAIN_BEGIN); - if (strcmp(attr, "DRAW_MAIN") == 0) return PyLong_FromLong(LV_EVENT_DRAW_MAIN); - if (strcmp(attr, "DRAW_MAIN_END") == 0) return PyLong_FromLong(LV_EVENT_DRAW_MAIN_END); - if (strcmp(attr, "DRAW_POST_BEGIN") == 0) return PyLong_FromLong(LV_EVENT_DRAW_POST_BEGIN); - if (strcmp(attr, "DRAW_POST") == 0) return PyLong_FromLong(LV_EVENT_DRAW_POST); - if (strcmp(attr, "DRAW_POST_END") == 0) return PyLong_FromLong(LV_EVENT_DRAW_POST_END); - if (strcmp(attr, "DRAW_TASK_ADDED") == 0) return PyLong_FromLong(LV_EVENT_DRAW_TASK_ADDED); - if (strcmp(attr, "VALUE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_VALUE_CHANGED); - if (strcmp(attr, "INSERT") == 0) return PyLong_FromLong(LV_EVENT_INSERT); - if (strcmp(attr, "REFRESH") == 0) return PyLong_FromLong(LV_EVENT_REFRESH); - if (strcmp(attr, "READY") == 0) return PyLong_FromLong(LV_EVENT_READY); - if (strcmp(attr, "CANCEL") == 0) return PyLong_FromLong(LV_EVENT_CANCEL); - if (strcmp(attr, "STATE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_STATE_CHANGED); - if (strcmp(attr, "CREATE") == 0) return PyLong_FromLong(LV_EVENT_CREATE); - if (strcmp(attr, "DELETE") == 0) return PyLong_FromLong(LV_EVENT_DELETE); - if (strcmp(attr, "CHILD_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_CHILD_CHANGED); - if (strcmp(attr, "CHILD_CREATED") == 0) return PyLong_FromLong(LV_EVENT_CHILD_CREATED); - if (strcmp(attr, "CHILD_DELETED") == 0) return PyLong_FromLong(LV_EVENT_CHILD_DELETED); - if (strcmp(attr, "SCREEN_UNLOAD_START") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_UNLOAD_START); - if (strcmp(attr, "SCREEN_LOAD_START") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_LOAD_START); - if (strcmp(attr, "SCREEN_LOADED") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_LOADED); - if (strcmp(attr, "SCREEN_UNLOADED") == 0) return PyLong_FromLong(LV_EVENT_SCREEN_UNLOADED); - if (strcmp(attr, "SIZE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_SIZE_CHANGED); - if (strcmp(attr, "STYLE_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_STYLE_CHANGED); - if (strcmp(attr, "LAYOUT_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_LAYOUT_CHANGED); - if (strcmp(attr, "GET_SELF_SIZE") == 0) return PyLong_FromLong(LV_EVENT_GET_SELF_SIZE); - if (strcmp(attr, "INVALIDATE_AREA") == 0) return PyLong_FromLong(LV_EVENT_INVALIDATE_AREA); - if (strcmp(attr, "RESOLUTION_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_RESOLUTION_CHANGED); - if (strcmp(attr, "COLOR_FORMAT_CHANGED") == 0) return PyLong_FromLong(LV_EVENT_COLOR_FORMAT_CHANGED); - if (strcmp(attr, "REFR_REQUEST") == 0) return PyLong_FromLong(LV_EVENT_REFR_REQUEST); - if (strcmp(attr, "REFR_START") == 0) return PyLong_FromLong(LV_EVENT_REFR_START); - if (strcmp(attr, "REFR_READY") == 0) return PyLong_FromLong(LV_EVENT_REFR_READY); - if (strcmp(attr, "RENDER_START") == 0) return PyLong_FromLong(LV_EVENT_RENDER_START); - if (strcmp(attr, "RENDER_READY") == 0) return PyLong_FromLong(LV_EVENT_RENDER_READY); - if (strcmp(attr, "FLUSH_START") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_START); - if (strcmp(attr, "FLUSH_FINISH") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_FINISH); - if (strcmp(attr, "FLUSH_WAIT_START") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_WAIT_START); - if (strcmp(attr, "FLUSH_WAIT_FINISH") == 0) return PyLong_FromLong(LV_EVENT_FLUSH_WAIT_FINISH); - if (strcmp(attr, "UPDATE_LAYOUT_COMPLETED") == 0) return PyLong_FromLong(LV_EVENT_UPDATE_LAYOUT_COMPLETED); - if (strcmp(attr, "VSYNC") == 0) return PyLong_FromLong(LV_EVENT_VSYNC); - if (strcmp(attr, "VSYNC_REQUEST") == 0) return PyLong_FromLong(LV_EVENT_VSYNC_REQUEST); - if (strcmp(attr, "LAST") == 0) return PyLong_FromLong(LV_EVENT_LAST); - if (strcmp(attr, "PREPROCESS") == 0) return PyLong_FromLong(LV_EVENT_PREPROCESS); - if (strcmp(attr, "MARKED_DELETING") == 0) return PyLong_FromLong(LV_EVENT_MARKED_DELETING); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_LV_EVENT_members[] = { - "ALL", - "PRESSED", - "PRESSING", - "PRESS_LOST", - "SHORT_CLICKED", - "SINGLE_CLICKED", - "DOUBLE_CLICKED", - "TRIPLE_CLICKED", - "LONG_PRESSED", - "LONG_PRESSED_REPEAT", - "CLICKED", - "RELEASED", - "SCROLL_BEGIN", - "SCROLL_THROW_BEGIN", - "SCROLL_END", - "SCROLL", - "GESTURE", - "KEY", - "ROTARY", - "FOCUSED", - "DEFOCUSED", - "LEAVE", - "HIT_TEST", - "INDEV_RESET", - "HOVER_OVER", - "HOVER_LEAVE", - "COVER_CHECK", - "REFR_EXT_DRAW_SIZE", - "DRAW_MAIN_BEGIN", - "DRAW_MAIN", - "DRAW_MAIN_END", - "DRAW_POST_BEGIN", - "DRAW_POST", - "DRAW_POST_END", - "DRAW_TASK_ADDED", - "VALUE_CHANGED", - "INSERT", - "REFRESH", - "READY", - "CANCEL", - "STATE_CHANGED", - "CREATE", - "DELETE", - "CHILD_CHANGED", - "CHILD_CREATED", - "CHILD_DELETED", - "SCREEN_UNLOAD_START", - "SCREEN_LOAD_START", - "SCREEN_LOADED", - "SCREEN_UNLOADED", - "SIZE_CHANGED", - "STYLE_CHANGED", - "LAYOUT_CHANGED", - "GET_SELF_SIZE", - "INVALIDATE_AREA", - "RESOLUTION_CHANGED", - "COLOR_FORMAT_CHANGED", - "REFR_REQUEST", - "REFR_START", - "REFR_READY", - "RENDER_START", - "RENDER_READY", - "FLUSH_START", - "FLUSH_FINISH", - "FLUSH_WAIT_START", - "FLUSH_WAIT_FINISH", - "UPDATE_LAYOUT_COMPLETED", - "VSYNC", - "VSYNC_REQUEST", - "LAST", - "PREPROCESS", - "MARKED_DELETING", - NULL -}; - -static PyObject *py_lv_LV_EVENT_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_LV_EVENT_members); -} - -static PyMethodDef py_lv_LV_EVENT_methods[] = { - {"__dir__", py_lv_LV_EVENT_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_LV_EVENT_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.EVENT", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_EVENT_getattro, - .tp_methods = py_lv_LV_EVENT_methods, - .tp_doc = "LVGL EVENT enum namespace", -}; - - static PyObject *py_lv_LV_DISPLAY_ROTATION_getattro(PyObject *self, PyObject *name) { (void)self; @@ -3142,6 +3284,126 @@ static PyTypeObject py_lv_LV_STYLE_STATE_CMP_type = { }; +static PyObject *py_lv_LV_DRAW_TASK_TYPE_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "NONE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_NONE); + if (strcmp(attr, "FILL") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_FILL); + if (strcmp(attr, "BORDER") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_BORDER); + if (strcmp(attr, "BOX_SHADOW") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_BOX_SHADOW); + if (strcmp(attr, "LETTER") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LETTER); + if (strcmp(attr, "LABEL") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LABEL); + if (strcmp(attr, "IMAGE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_IMAGE); + if (strcmp(attr, "LAYER") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LAYER); + if (strcmp(attr, "LINE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LINE); + if (strcmp(attr, "ARC") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_ARC); + if (strcmp(attr, "TRIANGLE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_TRIANGLE); + if (strcmp(attr, "MASK_RECTANGLE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_MASK_RECTANGLE); + if (strcmp(attr, "MASK_BITMAP") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_MASK_BITMAP); + if (strcmp(attr, "BLUR") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_BLUR); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_DRAW_TASK_TYPE_members[] = { + "NONE", + "FILL", + "BORDER", + "BOX_SHADOW", + "LETTER", + "LABEL", + "IMAGE", + "LAYER", + "LINE", + "ARC", + "TRIANGLE", + "MASK_RECTANGLE", + "MASK_BITMAP", + "BLUR", + NULL +}; + +static PyObject *py_lv_LV_DRAW_TASK_TYPE_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_DRAW_TASK_TYPE_members); +} + +static PyMethodDef py_lv_LV_DRAW_TASK_TYPE_methods[] = { + {"__dir__", py_lv_LV_DRAW_TASK_TYPE_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_DRAW_TASK_TYPE_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.DRAW_TASK_TYPE", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_DRAW_TASK_TYPE_getattro, + .tp_methods = py_lv_LV_DRAW_TASK_TYPE_methods, + .tp_doc = "LVGL DRAW_TASK_TYPE enum namespace", +}; + + +static PyObject *py_lv_LV_DRAW_TASK_STATE_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "BLOCKED") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_BLOCKED); + if (strcmp(attr, "WAITING") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_WAITING); + if (strcmp(attr, "QUEUED") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_QUEUED); + if (strcmp(attr, "IN_PROGRESS") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_IN_PROGRESS); + if (strcmp(attr, "FINISHED") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_FINISHED); + if (strcmp(attr, "FAILED") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_FAILED); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_DRAW_TASK_STATE_members[] = { + "BLOCKED", + "WAITING", + "QUEUED", + "IN_PROGRESS", + "FINISHED", + "FAILED", + NULL +}; + +static PyObject *py_lv_LV_DRAW_TASK_STATE_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_DRAW_TASK_STATE_members); +} + +static PyMethodDef py_lv_LV_DRAW_TASK_STATE_methods[] = { + {"__dir__", py_lv_LV_DRAW_TASK_STATE_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_DRAW_TASK_STATE_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.DRAW_TASK_STATE", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_DRAW_TASK_STATE_getattro, + .tp_methods = py_lv_LV_DRAW_TASK_STATE_methods, + .tp_doc = "LVGL DRAW_TASK_STATE enum namespace", +}; + + static PyObject *py_lv_LV_FS_RES_getattro(PyObject *self, PyObject *name) { (void)self; @@ -3348,124 +3610,6 @@ static PyTypeObject py_lv_LV_IMAGE_SRC_type = { }; -static PyObject *py_lv_LV_DRAW_TASK_TYPE_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "NONE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_NONE); - if (strcmp(attr, "FILL") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_FILL); - if (strcmp(attr, "BORDER") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_BORDER); - if (strcmp(attr, "BOX_SHADOW") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_BOX_SHADOW); - if (strcmp(attr, "LETTER") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LETTER); - if (strcmp(attr, "LABEL") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LABEL); - if (strcmp(attr, "IMAGE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_IMAGE); - if (strcmp(attr, "LAYER") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LAYER); - if (strcmp(attr, "LINE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_LINE); - if (strcmp(attr, "ARC") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_ARC); - if (strcmp(attr, "TRIANGLE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_TRIANGLE); - if (strcmp(attr, "MASK_RECTANGLE") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_MASK_RECTANGLE); - if (strcmp(attr, "MASK_BITMAP") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_MASK_BITMAP); - if (strcmp(attr, "BLUR") == 0) return PyLong_FromLong(LV_DRAW_TASK_TYPE_BLUR); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_LV_DRAW_TASK_TYPE_members[] = { - "NONE", - "FILL", - "BORDER", - "BOX_SHADOW", - "LETTER", - "LABEL", - "IMAGE", - "LAYER", - "LINE", - "ARC", - "TRIANGLE", - "MASK_RECTANGLE", - "MASK_BITMAP", - "BLUR", - NULL -}; - -static PyObject *py_lv_LV_DRAW_TASK_TYPE_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_LV_DRAW_TASK_TYPE_members); -} - -static PyMethodDef py_lv_LV_DRAW_TASK_TYPE_methods[] = { - {"__dir__", py_lv_LV_DRAW_TASK_TYPE_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_LV_DRAW_TASK_TYPE_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.DRAW_TASK_TYPE", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_DRAW_TASK_TYPE_getattro, - .tp_methods = py_lv_LV_DRAW_TASK_TYPE_methods, - .tp_doc = "LVGL DRAW_TASK_TYPE enum namespace", -}; - - -static PyObject *py_lv_LV_DRAW_TASK_STATE_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "BLOCKED") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_BLOCKED); - if (strcmp(attr, "WAITING") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_WAITING); - if (strcmp(attr, "QUEUED") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_QUEUED); - if (strcmp(attr, "IN_PROGRESS") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_IN_PROGRESS); - if (strcmp(attr, "FINISHED") == 0) return PyLong_FromLong(LV_DRAW_TASK_STATE_FINISHED); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_LV_DRAW_TASK_STATE_members[] = { - "BLOCKED", - "WAITING", - "QUEUED", - "IN_PROGRESS", - "FINISHED", - NULL -}; - -static PyObject *py_lv_LV_DRAW_TASK_STATE_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_LV_DRAW_TASK_STATE_members); -} - -static PyMethodDef py_lv_LV_DRAW_TASK_STATE_methods[] = { - {"__dir__", py_lv_LV_DRAW_TASK_STATE_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_LV_DRAW_TASK_STATE_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.DRAW_TASK_STATE", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_DRAW_TASK_STATE_getattro, - .tp_methods = py_lv_LV_DRAW_TASK_STATE_methods, - .tp_doc = "LVGL DRAW_TASK_STATE enum namespace", -}; - - static PyObject *py_lv_LV_LAYER_TYPE_getattro(PyObject *self, PyObject *name) { (void)self; @@ -3648,114 +3792,6 @@ static PyTypeObject py_lv_LV_OBJ_CLASS_THEME_INHERITABLE_type = { }; -static PyObject *py_lv_LV_KEY_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "UP") == 0) return PyLong_FromLong(LV_KEY_UP); - if (strcmp(attr, "DOWN") == 0) return PyLong_FromLong(LV_KEY_DOWN); - if (strcmp(attr, "RIGHT") == 0) return PyLong_FromLong(LV_KEY_RIGHT); - if (strcmp(attr, "LEFT") == 0) return PyLong_FromLong(LV_KEY_LEFT); - if (strcmp(attr, "ESC") == 0) return PyLong_FromLong(LV_KEY_ESC); - if (strcmp(attr, "DEL") == 0) return PyLong_FromLong(LV_KEY_DEL); - if (strcmp(attr, "BACKSPACE") == 0) return PyLong_FromLong(LV_KEY_BACKSPACE); - if (strcmp(attr, "ENTER") == 0) return PyLong_FromLong(LV_KEY_ENTER); - if (strcmp(attr, "NEXT") == 0) return PyLong_FromLong(LV_KEY_NEXT); - if (strcmp(attr, "PREV") == 0) return PyLong_FromLong(LV_KEY_PREV); - if (strcmp(attr, "HOME") == 0) return PyLong_FromLong(LV_KEY_HOME); - if (strcmp(attr, "END") == 0) return PyLong_FromLong(LV_KEY_END); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_LV_KEY_members[] = { - "UP", - "DOWN", - "RIGHT", - "LEFT", - "ESC", - "DEL", - "BACKSPACE", - "ENTER", - "NEXT", - "PREV", - "HOME", - "END", - NULL -}; - -static PyObject *py_lv_LV_KEY_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_LV_KEY_members); -} - -static PyMethodDef py_lv_LV_KEY_methods[] = { - {"__dir__", py_lv_LV_KEY_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_LV_KEY_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.KEY", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_KEY_getattro, - .tp_methods = py_lv_LV_KEY_methods, - .tp_doc = "LVGL KEY enum namespace", -}; - - -static PyObject *py_lv_LV_GROUP_REFOCUS_POLICY_getattro(PyObject *self, PyObject *name) -{ - (void)self; - if (!PyUnicode_Check(name)) { - PyErr_SetString(PyExc_TypeError, "attribute name must be string"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) { - return NULL; - } - - if (strcmp(attr, "NEXT") == 0) return PyLong_FromLong(LV_GROUP_REFOCUS_POLICY_NEXT); - if (strcmp(attr, "PREV") == 0) return PyLong_FromLong(LV_GROUP_REFOCUS_POLICY_PREV); - - return PyObject_GenericGetAttr(self, name); -} - -static const char *const py_lv_LV_GROUP_REFOCUS_POLICY_members[] = { - "NEXT", - "PREV", - NULL -}; - -static PyObject *py_lv_LV_GROUP_REFOCUS_POLICY_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) -{ - return lvpy_enum_dir(self, py_lv_LV_GROUP_REFOCUS_POLICY_members); -} - -static PyMethodDef py_lv_LV_GROUP_REFOCUS_POLICY_methods[] = { - {"__dir__", py_lv_LV_GROUP_REFOCUS_POLICY_dir, METH_NOARGS, NULL}, - {NULL, NULL, 0, NULL} -}; - -static PyTypeObject py_lv_LV_GROUP_REFOCUS_POLICY_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.GROUP_REFOCUS_POLICY", - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_GROUP_REFOCUS_POLICY_getattro, - .tp_methods = py_lv_LV_GROUP_REFOCUS_POLICY_methods, - .tp_doc = "LVGL GROUP_REFOCUS_POLICY enum namespace", -}; - - static PyObject *py_lv_LV_INDEV_TYPE_getattro(PyObject *self, PyObject *name) { (void)self; @@ -4327,6 +4363,7 @@ static PyObject *py_lv_LV_IMAGE_ALIGN_getattro(PyObject *self, PyObject *name) if (strcmp(attr, "STRETCH") == 0) return PyLong_FromLong(LV_IMAGE_ALIGN_STRETCH); if (strcmp(attr, "TILE") == 0) return PyLong_FromLong(LV_IMAGE_ALIGN_TILE); if (strcmp(attr, "CONTAIN") == 0) return PyLong_FromLong(LV_IMAGE_ALIGN_CONTAIN); + if (strcmp(attr, "CONTAIN_DOWNSCALE") == 0) return PyLong_FromLong(LV_IMAGE_ALIGN_CONTAIN_DOWNSCALE); if (strcmp(attr, "COVER") == 0) return PyLong_FromLong(LV_IMAGE_ALIGN_COVER); return PyObject_GenericGetAttr(self, name); @@ -4346,6 +4383,7 @@ static const char *const py_lv_LV_IMAGE_ALIGN_members[] = { "STRETCH", "TILE", "CONTAIN", + "CONTAIN_DOWNSCALE", "COVER", NULL }; @@ -4738,6 +4776,94 @@ static PyTypeObject py_lv_LV_BAR_ORIENTATION_type = { }; +static PyObject *py_lv_LV_BARCODE_ENCODING_CODE128_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "GS1") == 0) return PyLong_FromLong(LV_BARCODE_ENCODING_CODE128_GS1); + if (strcmp(attr, "RAW") == 0) return PyLong_FromLong(LV_BARCODE_ENCODING_CODE128_RAW); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_BARCODE_ENCODING_CODE128_members[] = { + "GS1", + "RAW", + NULL +}; + +static PyObject *py_lv_LV_BARCODE_ENCODING_CODE128_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_BARCODE_ENCODING_CODE128_members); +} + +static PyMethodDef py_lv_LV_BARCODE_ENCODING_CODE128_methods[] = { + {"__dir__", py_lv_LV_BARCODE_ENCODING_CODE128_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_BARCODE_ENCODING_CODE128_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.BARCODE_ENCODING_CODE128", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_BARCODE_ENCODING_CODE128_getattro, + .tp_methods = py_lv_LV_BARCODE_ENCODING_CODE128_methods, + .tp_doc = "LVGL BARCODE_ENCODING_CODE128 enum namespace", +}; + + +static PyObject *py_lv_LV_BARCODE_UPDATE_MODE_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "IMMEDIATE") == 0) return PyLong_FromLong(LV_BARCODE_UPDATE_MODE_IMMEDIATE); + if (strcmp(attr, "DEFERRED") == 0) return PyLong_FromLong(LV_BARCODE_UPDATE_MODE_DEFERRED); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_BARCODE_UPDATE_MODE_members[] = { + "IMMEDIATE", + "DEFERRED", + NULL +}; + +static PyObject *py_lv_LV_BARCODE_UPDATE_MODE_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_BARCODE_UPDATE_MODE_members); +} + +static PyMethodDef py_lv_LV_BARCODE_UPDATE_MODE_methods[] = { + {"__dir__", py_lv_LV_BARCODE_UPDATE_MODE_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_BARCODE_UPDATE_MODE_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.BARCODE_UPDATE_MODE", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_BARCODE_UPDATE_MODE_getattro, + .tp_methods = py_lv_LV_BARCODE_UPDATE_MODE_methods, + .tp_doc = "LVGL BARCODE_UPDATE_MODE enum namespace", +}; + + static PyObject *py_lv_LV_BUTTONMATRIX_CTRL_getattro(PyObject *self, PyObject *name) { (void)self; @@ -5180,6 +5306,50 @@ static PyTypeObject py_lv_LV_MENU_ROOT_BACK_BUTTON_type = { }; +static PyObject *py_lv_LV_QRCODE_UPDATE_MODE_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "IMMEDIATE") == 0) return PyLong_FromLong(LV_QRCODE_UPDATE_MODE_IMMEDIATE); + if (strcmp(attr, "DEFERRED") == 0) return PyLong_FromLong(LV_QRCODE_UPDATE_MODE_DEFERRED); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_QRCODE_UPDATE_MODE_members[] = { + "IMMEDIATE", + "DEFERRED", + NULL +}; + +static PyObject *py_lv_LV_QRCODE_UPDATE_MODE_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_QRCODE_UPDATE_MODE_members); +} + +static PyMethodDef py_lv_LV_QRCODE_UPDATE_MODE_methods[] = { + {"__dir__", py_lv_LV_QRCODE_UPDATE_MODE_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_QRCODE_UPDATE_MODE_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.QRCODE_UPDATE_MODE", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_QRCODE_UPDATE_MODE_getattro, + .tp_methods = py_lv_LV_QRCODE_UPDATE_MODE_methods, + .tp_doc = "LVGL QRCODE_UPDATE_MODE enum namespace", +}; + + static PyObject *py_lv_LV_ROLLER_MODE_getattro(PyObject *self, PyObject *name) { (void)self; @@ -5564,7 +5734,7 @@ static PyTypeObject py_lv_LV_TABLE_CELL_CTRL_type = { }; -static PyObject *py_lv_LV_BARCODE_ENCODING_CODE128_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_LV_THREAD_PRIO_getattro(PyObject *self, PyObject *name) { (void)self; if (!PyUnicode_Check(name)) { @@ -5576,35 +5746,89 @@ static PyObject *py_lv_LV_BARCODE_ENCODING_CODE128_getattro(PyObject *self, PyOb return NULL; } - if (strcmp(attr, "GS1") == 0) return PyLong_FromLong(LV_BARCODE_ENCODING_CODE128_GS1); - if (strcmp(attr, "RAW") == 0) return PyLong_FromLong(LV_BARCODE_ENCODING_CODE128_RAW); + if (strcmp(attr, "LOWEST") == 0) return PyLong_FromLong(LV_THREAD_PRIO_LOWEST); + if (strcmp(attr, "LOW") == 0) return PyLong_FromLong(LV_THREAD_PRIO_LOW); + if (strcmp(attr, "MID") == 0) return PyLong_FromLong(LV_THREAD_PRIO_MID); + if (strcmp(attr, "HIGH") == 0) return PyLong_FromLong(LV_THREAD_PRIO_HIGH); + if (strcmp(attr, "HIGHEST") == 0) return PyLong_FromLong(LV_THREAD_PRIO_HIGHEST); return PyObject_GenericGetAttr(self, name); } -static const char *const py_lv_LV_BARCODE_ENCODING_CODE128_members[] = { - "GS1", - "RAW", +static const char *const py_lv_LV_THREAD_PRIO_members[] = { + "LOWEST", + "LOW", + "MID", + "HIGH", + "HIGHEST", NULL }; -static PyObject *py_lv_LV_BARCODE_ENCODING_CODE128_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +static PyObject *py_lv_LV_THREAD_PRIO_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) { - return lvpy_enum_dir(self, py_lv_LV_BARCODE_ENCODING_CODE128_members); + return lvpy_enum_dir(self, py_lv_LV_THREAD_PRIO_members); } -static PyMethodDef py_lv_LV_BARCODE_ENCODING_CODE128_methods[] = { - {"__dir__", py_lv_LV_BARCODE_ENCODING_CODE128_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_LV_THREAD_PRIO_methods[] = { + {"__dir__", py_lv_LV_THREAD_PRIO_dir, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL} }; -static PyTypeObject py_lv_LV_BARCODE_ENCODING_CODE128_type = { +static PyTypeObject py_lv_LV_THREAD_PRIO_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.BARCODE_ENCODING_CODE128", + .tp_name = "lvgl.THREAD_PRIO", .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_BARCODE_ENCODING_CODE128_getattro, - .tp_methods = py_lv_LV_BARCODE_ENCODING_CODE128_methods, - .tp_doc = "LVGL BARCODE_ENCODING_CODE128 enum namespace", + .tp_getattro = py_lv_LV_THREAD_PRIO_getattro, + .tp_methods = py_lv_LV_THREAD_PRIO_methods, + .tp_doc = "LVGL THREAD_PRIO enum namespace", +}; + + +static PyObject *py_lv_LV_CACHE_RESERVE_COND_getattro(PyObject *self, PyObject *name) +{ + (void)self; + if (!PyUnicode_Check(name)) { + PyErr_SetString(PyExc_TypeError, "attribute name must be string"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) { + return NULL; + } + + if (strcmp(attr, "OK") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_OK); + if (strcmp(attr, "TOO_LARGE") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_TOO_LARGE); + if (strcmp(attr, "NEED_VICTIM") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_NEED_VICTIM); + if (strcmp(attr, "ERROR") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_ERROR); + + return PyObject_GenericGetAttr(self, name); +} + +static const char *const py_lv_LV_CACHE_RESERVE_COND_members[] = { + "OK", + "TOO_LARGE", + "NEED_VICTIM", + "ERROR", + NULL +}; + +static PyObject *py_lv_LV_CACHE_RESERVE_COND_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +{ + return lvpy_enum_dir(self, py_lv_LV_CACHE_RESERVE_COND_members); +} + +static PyMethodDef py_lv_LV_CACHE_RESERVE_COND_methods[] = { + {"__dir__", py_lv_LV_CACHE_RESERVE_COND_dir, METH_NOARGS, NULL}, + {NULL, NULL, 0, NULL} +}; + +static PyTypeObject py_lv_LV_CACHE_RESERVE_COND_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.CACHE_RESERVE_COND", + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_getattro = py_lv_LV_CACHE_RESERVE_COND_getattro, + .tp_methods = py_lv_LV_CACHE_RESERVE_COND_methods, + .tp_doc = "LVGL CACHE_RESERVE_COND enum namespace", }; @@ -5754,7 +5978,7 @@ static PyTypeObject py_lv_LV_DRAW_SW_MASK_LINE_SIDE_type = { }; -static PyObject *py_lv_LV_THREAD_PRIO_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_LV_LRU_getattro(PyObject *self, PyObject *name) { (void)self; if (!PyUnicode_Check(name)) { @@ -5766,45 +5990,47 @@ static PyObject *py_lv_LV_THREAD_PRIO_getattro(PyObject *self, PyObject *name) return NULL; } - if (strcmp(attr, "LOWEST") == 0) return PyLong_FromLong(LV_THREAD_PRIO_LOWEST); - if (strcmp(attr, "LOW") == 0) return PyLong_FromLong(LV_THREAD_PRIO_LOW); - if (strcmp(attr, "MID") == 0) return PyLong_FromLong(LV_THREAD_PRIO_MID); - if (strcmp(attr, "HIGH") == 0) return PyLong_FromLong(LV_THREAD_PRIO_HIGH); - if (strcmp(attr, "HIGHEST") == 0) return PyLong_FromLong(LV_THREAD_PRIO_HIGHEST); + if (strcmp(attr, "OK") == 0) return PyLong_FromLong(LV_LRU_OK); + if (strcmp(attr, "MISSING_CACHE") == 0) return PyLong_FromLong(LV_LRU_MISSING_CACHE); + if (strcmp(attr, "MISSING_KEY") == 0) return PyLong_FromLong(LV_LRU_MISSING_KEY); + if (strcmp(attr, "MISSING_VALUE") == 0) return PyLong_FromLong(LV_LRU_MISSING_VALUE); + if (strcmp(attr, "LOCK_ERROR") == 0) return PyLong_FromLong(LV_LRU_LOCK_ERROR); + if (strcmp(attr, "VALUE_TOO_LARGE") == 0) return PyLong_FromLong(LV_LRU_VALUE_TOO_LARGE); return PyObject_GenericGetAttr(self, name); } -static const char *const py_lv_LV_THREAD_PRIO_members[] = { - "LOWEST", - "LOW", - "MID", - "HIGH", - "HIGHEST", +static const char *const py_lv_LV_LRU_members[] = { + "OK", + "MISSING_CACHE", + "MISSING_KEY", + "MISSING_VALUE", + "LOCK_ERROR", + "VALUE_TOO_LARGE", NULL }; -static PyObject *py_lv_LV_THREAD_PRIO_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +static PyObject *py_lv_LV_LRU_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) { - return lvpy_enum_dir(self, py_lv_LV_THREAD_PRIO_members); + return lvpy_enum_dir(self, py_lv_LV_LRU_members); } -static PyMethodDef py_lv_LV_THREAD_PRIO_methods[] = { - {"__dir__", py_lv_LV_THREAD_PRIO_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_LV_LRU_methods[] = { + {"__dir__", py_lv_LV_LRU_dir, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL} }; -static PyTypeObject py_lv_LV_THREAD_PRIO_type = { +static PyTypeObject py_lv_LV_LRU_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.THREAD_PRIO", + .tp_name = "lvgl.LRU", .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_THREAD_PRIO_getattro, - .tp_methods = py_lv_LV_THREAD_PRIO_methods, - .tp_doc = "LVGL THREAD_PRIO enum namespace", + .tp_getattro = py_lv_LV_LRU_getattro, + .tp_methods = py_lv_LV_LRU_methods, + .tp_doc = "LVGL LRU enum namespace", }; -static PyObject *py_lv_LV_CACHE_RESERVE_COND_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_LV_RB_COLOR_getattro(PyObject *self, PyObject *name) { (void)self; if (!PyUnicode_Check(name)) { @@ -5816,39 +6042,35 @@ static PyObject *py_lv_LV_CACHE_RESERVE_COND_getattro(PyObject *self, PyObject * return NULL; } - if (strcmp(attr, "OK") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_OK); - if (strcmp(attr, "TOO_LARGE") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_TOO_LARGE); - if (strcmp(attr, "NEED_VICTIM") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_NEED_VICTIM); - if (strcmp(attr, "ERROR") == 0) return PyLong_FromLong(LV_CACHE_RESERVE_COND_ERROR); + if (strcmp(attr, "RED") == 0) return PyLong_FromLong(LV_RB_COLOR_RED); + if (strcmp(attr, "BLACK") == 0) return PyLong_FromLong(LV_RB_COLOR_BLACK); return PyObject_GenericGetAttr(self, name); } -static const char *const py_lv_LV_CACHE_RESERVE_COND_members[] = { - "OK", - "TOO_LARGE", - "NEED_VICTIM", - "ERROR", +static const char *const py_lv_LV_RB_COLOR_members[] = { + "RED", + "BLACK", NULL }; -static PyObject *py_lv_LV_CACHE_RESERVE_COND_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) +static PyObject *py_lv_LV_RB_COLOR_dir(PyObject *self, PyObject *Py_UNUSED(ignored)) { - return lvpy_enum_dir(self, py_lv_LV_CACHE_RESERVE_COND_members); + return lvpy_enum_dir(self, py_lv_LV_RB_COLOR_members); } -static PyMethodDef py_lv_LV_CACHE_RESERVE_COND_methods[] = { - {"__dir__", py_lv_LV_CACHE_RESERVE_COND_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_LV_RB_COLOR_methods[] = { + {"__dir__", py_lv_LV_RB_COLOR_dir, METH_NOARGS, NULL}, {NULL, NULL, 0, NULL} }; -static PyTypeObject py_lv_LV_CACHE_RESERVE_COND_type = { +static PyTypeObject py_lv_LV_RB_COLOR_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.CACHE_RESERVE_COND", + .tp_name = "lvgl.RB_COLOR", .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_getattro = py_lv_LV_CACHE_RESERVE_COND_getattro, - .tp_methods = py_lv_LV_CACHE_RESERVE_COND_methods, - .tp_doc = "LVGL CACHE_RESERVE_COND enum namespace", + .tp_getattro = py_lv_LV_RB_COLOR_getattro, + .tp_methods = py_lv_LV_RB_COLOR_methods, + .tp_doc = "LVGL RB_COLOR enum namespace", }; @@ -6126,9 +6348,65 @@ static PyMethodDef py_lv_obj_style_get_selector_part_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) + * inline static void lv_obj_move_foreground(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_move_foreground(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_move_foreground)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_move_foreground_def = { + "lv_obj_move_foreground", + (PyCFunction)py_lv_obj_move_foreground, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static void lv_obj_move_background(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_move_background(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_move_background)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_move_background_def = { + "lv_obj_move_background", + (PyCFunction)py_lv_obj_move_background, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static int32_t lv_obj_get_style_width_internal(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6140,16 +6418,16 @@ static PyObject *py_lv_obj_get_style_width(PyObject *self, PyObject *py_args, Py int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_width_def = { - "lv_obj_get_style_width", - (PyCFunction)py_lv_obj_get_style_width, +static PyMethodDef py_lv_obj_get_style_width_internal_def = { + "lv_obj_get_style_width_internal", + (PyCFunction)py_lv_obj_get_style_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6157,9 +6435,9 @@ static PyMethodDef py_lv_obj_get_style_width_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_min_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_min_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_min_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_min_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6171,16 +6449,16 @@ static PyObject *py_lv_obj_get_style_min_width(PyObject *self, PyObject *py_args int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_min_width_def = { - "lv_obj_get_style_min_width", - (PyCFunction)py_lv_obj_get_style_min_width, +static PyMethodDef py_lv_obj_get_style_min_width_internal_def = { + "lv_obj_get_style_min_width_internal", + (PyCFunction)py_lv_obj_get_style_min_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6188,9 +6466,9 @@ static PyMethodDef py_lv_obj_get_style_min_width_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_max_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_max_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_max_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_max_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6202,16 +6480,16 @@ static PyObject *py_lv_obj_get_style_max_width(PyObject *self, PyObject *py_args int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_max_width_def = { - "lv_obj_get_style_max_width", - (PyCFunction)py_lv_obj_get_style_max_width, +static PyMethodDef py_lv_obj_get_style_max_width_internal_def = { + "lv_obj_get_style_max_width_internal", + (PyCFunction)py_lv_obj_get_style_max_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6219,9 +6497,9 @@ static PyMethodDef py_lv_obj_get_style_max_width_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_height(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_height_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6233,16 +6511,16 @@ static PyObject *py_lv_obj_get_style_height(PyObject *self, PyObject *py_args, P int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_height_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_height_def = { - "lv_obj_get_style_height", - (PyCFunction)py_lv_obj_get_style_height, +static PyMethodDef py_lv_obj_get_style_height_internal_def = { + "lv_obj_get_style_height_internal", + (PyCFunction)py_lv_obj_get_style_height_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6250,9 +6528,9 @@ static PyMethodDef py_lv_obj_get_style_height_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_min_height(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_min_height_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_min_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_min_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6264,16 +6542,16 @@ static PyObject *py_lv_obj_get_style_min_height(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_height_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_min_height_def = { - "lv_obj_get_style_min_height", - (PyCFunction)py_lv_obj_get_style_min_height, +static PyMethodDef py_lv_obj_get_style_min_height_internal_def = { + "lv_obj_get_style_min_height_internal", + (PyCFunction)py_lv_obj_get_style_min_height_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6281,9 +6559,9 @@ static PyMethodDef py_lv_obj_get_style_min_height_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_max_height(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_max_height_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_max_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_max_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6295,16 +6573,16 @@ static PyObject *py_lv_obj_get_style_max_height(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_height_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_max_height_def = { - "lv_obj_get_style_max_height", - (PyCFunction)py_lv_obj_get_style_max_height, +static PyMethodDef py_lv_obj_get_style_max_height_internal_def = { + "lv_obj_get_style_max_height_internal", + (PyCFunction)py_lv_obj_get_style_max_height_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6312,9 +6590,9 @@ static PyMethodDef py_lv_obj_get_style_max_height_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_length(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_length_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_length_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6326,16 +6604,16 @@ static PyObject *py_lv_obj_get_style_length(PyObject *self, PyObject *py_args, P int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_length)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_length_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_length_def = { - "lv_obj_get_style_length", - (PyCFunction)py_lv_obj_get_style_length, +static PyMethodDef py_lv_obj_get_style_length_internal_def = { + "lv_obj_get_style_length_internal", + (PyCFunction)py_lv_obj_get_style_length_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6343,9 +6621,9 @@ static PyMethodDef py_lv_obj_get_style_length_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_x(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_x_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6357,16 +6635,16 @@ static PyObject *py_lv_obj_get_style_x(PyObject *self, PyObject *py_args, PyObje int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_x_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_x_def = { - "lv_obj_get_style_x", - (PyCFunction)py_lv_obj_get_style_x, +static PyMethodDef py_lv_obj_get_style_x_internal_def = { + "lv_obj_get_style_x_internal", + (PyCFunction)py_lv_obj_get_style_x_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6374,9 +6652,9 @@ static PyMethodDef py_lv_obj_get_style_x_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_y(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_y_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6388,16 +6666,16 @@ static PyObject *py_lv_obj_get_style_y(PyObject *self, PyObject *py_args, PyObje int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_y_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_y_def = { - "lv_obj_get_style_y", - (PyCFunction)py_lv_obj_get_style_y, +static PyMethodDef py_lv_obj_get_style_y_internal_def = { + "lv_obj_get_style_y_internal", + (PyCFunction)py_lv_obj_get_style_y_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6405,9 +6683,9 @@ static PyMethodDef py_lv_obj_get_style_y_def = { /* * lvgl extension definition for: - * inline static lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_align_t lv_obj_get_style_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6419,16 +6697,16 @@ static PyObject *py_lv_obj_get_style_align(PyObject *self, PyObject *py_args, Py lv_align_t _res; lvpy_lock(); - _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_align)(obj, part); + _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_align_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_align_def = { - "lv_obj_get_style_align", - (PyCFunction)py_lv_obj_get_style_align, +static PyMethodDef py_lv_obj_get_style_align_internal_def = { + "lv_obj_get_style_align_internal", + (PyCFunction)py_lv_obj_get_style_align_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6436,9 +6714,9 @@ static PyMethodDef py_lv_obj_get_style_align_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6450,16 +6728,16 @@ static PyObject *py_lv_obj_get_style_transform_width(PyObject *self, PyObject *p int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_width_def = { - "lv_obj_get_style_transform_width", - (PyCFunction)py_lv_obj_get_style_transform_width, +static PyMethodDef py_lv_obj_get_style_transform_width_internal_def = { + "lv_obj_get_style_transform_width_internal", + (PyCFunction)py_lv_obj_get_style_transform_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6467,9 +6745,9 @@ static PyMethodDef py_lv_obj_get_style_transform_width_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_height(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_height_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6481,16 +6759,16 @@ static PyObject *py_lv_obj_get_style_transform_height(PyObject *self, PyObject * int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_height_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_height_def = { - "lv_obj_get_style_transform_height", - (PyCFunction)py_lv_obj_get_style_transform_height, +static PyMethodDef py_lv_obj_get_style_transform_height_internal_def = { + "lv_obj_get_style_transform_height_internal", + (PyCFunction)py_lv_obj_get_style_transform_height_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6498,9 +6776,9 @@ static PyMethodDef py_lv_obj_get_style_transform_height_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_translate_x(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_translate_x_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_translate_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_translate_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6512,16 +6790,16 @@ static PyObject *py_lv_obj_get_style_translate_x(PyObject *self, PyObject *py_ar int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_x_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_translate_x_def = { - "lv_obj_get_style_translate_x", - (PyCFunction)py_lv_obj_get_style_translate_x, +static PyMethodDef py_lv_obj_get_style_translate_x_internal_def = { + "lv_obj_get_style_translate_x_internal", + (PyCFunction)py_lv_obj_get_style_translate_x_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6529,9 +6807,9 @@ static PyMethodDef py_lv_obj_get_style_translate_x_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_translate_y(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_translate_y_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_translate_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_translate_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6543,16 +6821,16 @@ static PyObject *py_lv_obj_get_style_translate_y(PyObject *self, PyObject *py_ar int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_y_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_translate_y_def = { - "lv_obj_get_style_translate_y", - (PyCFunction)py_lv_obj_get_style_translate_y, +static PyMethodDef py_lv_obj_get_style_translate_y_internal_def = { + "lv_obj_get_style_translate_y_internal", + (PyCFunction)py_lv_obj_get_style_translate_y_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6560,9 +6838,9 @@ static PyMethodDef py_lv_obj_get_style_translate_y_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_translate_radial(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_translate_radial_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_translate_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_translate_radial_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6574,16 +6852,16 @@ static PyObject *py_lv_obj_get_style_translate_radial(PyObject *self, PyObject * int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_radial)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_radial_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_translate_radial_def = { - "lv_obj_get_style_translate_radial", - (PyCFunction)py_lv_obj_get_style_translate_radial, +static PyMethodDef py_lv_obj_get_style_translate_radial_internal_def = { + "lv_obj_get_style_translate_radial_internal", + (PyCFunction)py_lv_obj_get_style_translate_radial_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6591,9 +6869,9 @@ static PyMethodDef py_lv_obj_get_style_translate_radial_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_x(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_scale_x_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6605,16 +6883,16 @@ static PyObject *py_lv_obj_get_style_transform_scale_x(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_scale_x_def = { - "lv_obj_get_style_transform_scale_x", - (PyCFunction)py_lv_obj_get_style_transform_scale_x, +static PyMethodDef py_lv_obj_get_style_transform_scale_x_internal_def = { + "lv_obj_get_style_transform_scale_x_internal", + (PyCFunction)py_lv_obj_get_style_transform_scale_x_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6622,9 +6900,9 @@ static PyMethodDef py_lv_obj_get_style_transform_scale_x_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_y(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_scale_y_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6636,16 +6914,16 @@ static PyObject *py_lv_obj_get_style_transform_scale_y(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_scale_y_def = { - "lv_obj_get_style_transform_scale_y", - (PyCFunction)py_lv_obj_get_style_transform_scale_y, +static PyMethodDef py_lv_obj_get_style_transform_scale_y_internal_def = { + "lv_obj_get_style_transform_scale_y_internal", + (PyCFunction)py_lv_obj_get_style_transform_scale_y_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6653,9 +6931,9 @@ static PyMethodDef py_lv_obj_get_style_transform_scale_y_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_rotation(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_rotation_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_rotation_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6667,16 +6945,16 @@ static PyObject *py_lv_obj_get_style_transform_rotation(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_rotation)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_rotation_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_rotation_def = { - "lv_obj_get_style_transform_rotation", - (PyCFunction)py_lv_obj_get_style_transform_rotation, +static PyMethodDef py_lv_obj_get_style_transform_rotation_internal_def = { + "lv_obj_get_style_transform_rotation_internal", + (PyCFunction)py_lv_obj_get_style_transform_rotation_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6684,9 +6962,9 @@ static PyMethodDef py_lv_obj_get_style_transform_rotation_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_pivot_x(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_pivot_x_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_pivot_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6698,16 +6976,16 @@ static PyObject *py_lv_obj_get_style_transform_pivot_x(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_x_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_pivot_x_def = { - "lv_obj_get_style_transform_pivot_x", - (PyCFunction)py_lv_obj_get_style_transform_pivot_x, +static PyMethodDef py_lv_obj_get_style_transform_pivot_x_internal_def = { + "lv_obj_get_style_transform_pivot_x_internal", + (PyCFunction)py_lv_obj_get_style_transform_pivot_x_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6715,9 +6993,9 @@ static PyMethodDef py_lv_obj_get_style_transform_pivot_x_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_pivot_y(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_pivot_y_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_pivot_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6729,16 +7007,16 @@ static PyObject *py_lv_obj_get_style_transform_pivot_y(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_y_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_pivot_y_def = { - "lv_obj_get_style_transform_pivot_y", - (PyCFunction)py_lv_obj_get_style_transform_pivot_y, +static PyMethodDef py_lv_obj_get_style_transform_pivot_y_internal_def = { + "lv_obj_get_style_transform_pivot_y_internal", + (PyCFunction)py_lv_obj_get_style_transform_pivot_y_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6746,9 +7024,9 @@ static PyMethodDef py_lv_obj_get_style_transform_pivot_y_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_skew_x(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_skew_x_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_skew_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_skew_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6760,16 +7038,16 @@ static PyObject *py_lv_obj_get_style_transform_skew_x(PyObject *self, PyObject * int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_x_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_skew_x_def = { - "lv_obj_get_style_transform_skew_x", - (PyCFunction)py_lv_obj_get_style_transform_skew_x, +static PyMethodDef py_lv_obj_get_style_transform_skew_x_internal_def = { + "lv_obj_get_style_transform_skew_x_internal", + (PyCFunction)py_lv_obj_get_style_transform_skew_x_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6777,9 +7055,9 @@ static PyMethodDef py_lv_obj_get_style_transform_skew_x_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_skew_y(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_transform_skew_y_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_skew_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_skew_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6791,16 +7069,16 @@ static PyObject *py_lv_obj_get_style_transform_skew_y(PyObject *self, PyObject * int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_y_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_skew_y_def = { - "lv_obj_get_style_transform_skew_y", - (PyCFunction)py_lv_obj_get_style_transform_skew_y, +static PyMethodDef py_lv_obj_get_style_transform_skew_y_internal_def = { + "lv_obj_get_style_transform_skew_y_internal", + (PyCFunction)py_lv_obj_get_style_transform_skew_y_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6808,9 +7086,9 @@ static PyMethodDef py_lv_obj_get_style_transform_skew_y_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_top(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_pad_top_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_top_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6822,16 +7100,16 @@ static PyObject *py_lv_obj_get_style_pad_top(PyObject *self, PyObject *py_args, int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_top)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_top_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_pad_top_def = { - "lv_obj_get_style_pad_top", - (PyCFunction)py_lv_obj_get_style_pad_top, +static PyMethodDef py_lv_obj_get_style_pad_top_internal_def = { + "lv_obj_get_style_pad_top_internal", + (PyCFunction)py_lv_obj_get_style_pad_top_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6839,9 +7117,9 @@ static PyMethodDef py_lv_obj_get_style_pad_top_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_bottom(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_pad_bottom_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_bottom_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6853,16 +7131,16 @@ static PyObject *py_lv_obj_get_style_pad_bottom(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_bottom)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_bottom_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_pad_bottom_def = { - "lv_obj_get_style_pad_bottom", - (PyCFunction)py_lv_obj_get_style_pad_bottom, +static PyMethodDef py_lv_obj_get_style_pad_bottom_internal_def = { + "lv_obj_get_style_pad_bottom_internal", + (PyCFunction)py_lv_obj_get_style_pad_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6870,9 +7148,9 @@ static PyMethodDef py_lv_obj_get_style_pad_bottom_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_left(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_pad_left_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_left_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6884,16 +7162,16 @@ static PyObject *py_lv_obj_get_style_pad_left(PyObject *self, PyObject *py_args, int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_left)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_left_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_pad_left_def = { - "lv_obj_get_style_pad_left", - (PyCFunction)py_lv_obj_get_style_pad_left, +static PyMethodDef py_lv_obj_get_style_pad_left_internal_def = { + "lv_obj_get_style_pad_left_internal", + (PyCFunction)py_lv_obj_get_style_pad_left_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6901,9 +7179,9 @@ static PyMethodDef py_lv_obj_get_style_pad_left_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_right(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_pad_right_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_right_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6915,16 +7193,16 @@ static PyObject *py_lv_obj_get_style_pad_right(PyObject *self, PyObject *py_args int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_right)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_right_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_pad_right_def = { - "lv_obj_get_style_pad_right", - (PyCFunction)py_lv_obj_get_style_pad_right, +static PyMethodDef py_lv_obj_get_style_pad_right_internal_def = { + "lv_obj_get_style_pad_right_internal", + (PyCFunction)py_lv_obj_get_style_pad_right_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6932,9 +7210,9 @@ static PyMethodDef py_lv_obj_get_style_pad_right_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_row(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_pad_row_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_row(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_row_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6946,16 +7224,16 @@ static PyObject *py_lv_obj_get_style_pad_row(PyObject *self, PyObject *py_args, int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_row)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_row_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_pad_row_def = { - "lv_obj_get_style_pad_row", - (PyCFunction)py_lv_obj_get_style_pad_row, +static PyMethodDef py_lv_obj_get_style_pad_row_internal_def = { + "lv_obj_get_style_pad_row_internal", + (PyCFunction)py_lv_obj_get_style_pad_row_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6963,9 +7241,9 @@ static PyMethodDef py_lv_obj_get_style_pad_row_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_column(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_pad_column_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_column(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_column_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -6977,16 +7255,16 @@ static PyObject *py_lv_obj_get_style_pad_column(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_column)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_column_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_pad_column_def = { - "lv_obj_get_style_pad_column", - (PyCFunction)py_lv_obj_get_style_pad_column, +static PyMethodDef py_lv_obj_get_style_pad_column_internal_def = { + "lv_obj_get_style_pad_column_internal", + (PyCFunction)py_lv_obj_get_style_pad_column_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6994,9 +7272,9 @@ static PyMethodDef py_lv_obj_get_style_pad_column_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_radial(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_pad_radial_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_radial_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7008,16 +7286,16 @@ static PyObject *py_lv_obj_get_style_pad_radial(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_radial)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_radial_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_pad_radial_def = { - "lv_obj_get_style_pad_radial", - (PyCFunction)py_lv_obj_get_style_pad_radial, +static PyMethodDef py_lv_obj_get_style_pad_radial_internal_def = { + "lv_obj_get_style_pad_radial_internal", + (PyCFunction)py_lv_obj_get_style_pad_radial_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7025,9 +7303,9 @@ static PyMethodDef py_lv_obj_get_style_pad_radial_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_top(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_margin_top_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_margin_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_top_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7039,16 +7317,16 @@ static PyObject *py_lv_obj_get_style_margin_top(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_top)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_top_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_margin_top_def = { - "lv_obj_get_style_margin_top", - (PyCFunction)py_lv_obj_get_style_margin_top, +static PyMethodDef py_lv_obj_get_style_margin_top_internal_def = { + "lv_obj_get_style_margin_top_internal", + (PyCFunction)py_lv_obj_get_style_margin_top_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7056,9 +7334,9 @@ static PyMethodDef py_lv_obj_get_style_margin_top_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_bottom(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_margin_bottom_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_margin_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_bottom_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7070,16 +7348,16 @@ static PyObject *py_lv_obj_get_style_margin_bottom(PyObject *self, PyObject *py_ int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_bottom)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_bottom_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_margin_bottom_def = { - "lv_obj_get_style_margin_bottom", - (PyCFunction)py_lv_obj_get_style_margin_bottom, +static PyMethodDef py_lv_obj_get_style_margin_bottom_internal_def = { + "lv_obj_get_style_margin_bottom_internal", + (PyCFunction)py_lv_obj_get_style_margin_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7087,9 +7365,9 @@ static PyMethodDef py_lv_obj_get_style_margin_bottom_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_left(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_margin_left_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_margin_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_left_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7101,16 +7379,16 @@ static PyObject *py_lv_obj_get_style_margin_left(PyObject *self, PyObject *py_ar int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_left)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_left_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_margin_left_def = { - "lv_obj_get_style_margin_left", - (PyCFunction)py_lv_obj_get_style_margin_left, +static PyMethodDef py_lv_obj_get_style_margin_left_internal_def = { + "lv_obj_get_style_margin_left_internal", + (PyCFunction)py_lv_obj_get_style_margin_left_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7118,9 +7396,9 @@ static PyMethodDef py_lv_obj_get_style_margin_left_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_right(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_margin_right_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_margin_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_right_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7132,16 +7410,16 @@ static PyObject *py_lv_obj_get_style_margin_right(PyObject *self, PyObject *py_a int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_right)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_right_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_margin_right_def = { - "lv_obj_get_style_margin_right", - (PyCFunction)py_lv_obj_get_style_margin_right, +static PyMethodDef py_lv_obj_get_style_margin_right_internal_def = { + "lv_obj_get_style_margin_right_internal", + (PyCFunction)py_lv_obj_get_style_margin_right_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7284,9 +7562,9 @@ static inline PyObject *mp_read_ptr_lv_color_t(void *field) /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7298,16 +7576,16 @@ static PyObject *py_lv_obj_get_style_bg_color(PyObject *self, PyObject *py_args, lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_bg_color_def = { - "lv_obj_get_style_bg_color", - (PyCFunction)py_lv_obj_get_style_bg_color, +static PyMethodDef py_lv_obj_get_style_bg_color_internal_def = { + "lv_obj_get_style_bg_color_internal", + (PyCFunction)py_lv_obj_get_style_bg_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7315,9 +7593,9 @@ static PyMethodDef py_lv_obj_get_style_bg_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7329,16 +7607,16 @@ static PyObject *py_lv_obj_get_style_bg_color_filtered(PyObject *self, PyObject lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_bg_color_filtered_def = { - "lv_obj_get_style_bg_color_filtered", - (PyCFunction)py_lv_obj_get_style_bg_color_filtered, +static PyMethodDef py_lv_obj_get_style_bg_color_filtered_internal_def = { + "lv_obj_get_style_bg_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_bg_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7346,9 +7624,9 @@ static PyMethodDef py_lv_obj_get_style_bg_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_bg_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7360,16 +7638,16 @@ static PyObject *py_lv_obj_get_style_bg_opa(PyObject *self, PyObject *py_args, P lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_bg_opa_def = { - "lv_obj_get_style_bg_opa", - (PyCFunction)py_lv_obj_get_style_bg_opa, +static PyMethodDef py_lv_obj_get_style_bg_opa_internal_def = { + "lv_obj_get_style_bg_opa_internal", + (PyCFunction)py_lv_obj_get_style_bg_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7377,9 +7655,9 @@ static PyMethodDef py_lv_obj_get_style_bg_opa_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_grad_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_grad_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7391,16 +7669,16 @@ static PyObject *py_lv_obj_get_style_bg_grad_color(PyObject *self, PyObject *py_ lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_bg_grad_color_def = { - "lv_obj_get_style_bg_grad_color", - (PyCFunction)py_lv_obj_get_style_bg_grad_color, +static PyMethodDef py_lv_obj_get_style_bg_grad_color_internal_def = { + "lv_obj_get_style_bg_grad_color_internal", + (PyCFunction)py_lv_obj_get_style_bg_grad_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7408,9 +7686,9 @@ static PyMethodDef py_lv_obj_get_style_bg_grad_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_grad_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_grad_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7422,16 +7700,16 @@ static PyObject *py_lv_obj_get_style_bg_grad_color_filtered(PyObject *self, PyOb lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_bg_grad_color_filtered_def = { - "lv_obj_get_style_bg_grad_color_filtered", - (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered, +static PyMethodDef py_lv_obj_get_style_bg_grad_color_filtered_internal_def = { + "lv_obj_get_style_bg_grad_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7439,9 +7717,9 @@ static PyMethodDef py_lv_obj_get_style_bg_grad_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_grad_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_dir_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7453,16 +7731,16 @@ static PyObject *py_lv_obj_get_style_bg_grad_dir(PyObject *self, PyObject *py_ar lv_grad_dir_t _res; lvpy_lock(); - _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_dir)(obj, part); + _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_dir_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_bg_grad_dir_def = { - "lv_obj_get_style_bg_grad_dir", - (PyCFunction)py_lv_obj_get_style_bg_grad_dir, +static PyMethodDef py_lv_obj_get_style_bg_grad_dir_internal_def = { + "lv_obj_get_style_bg_grad_dir_internal", + (PyCFunction)py_lv_obj_get_style_bg_grad_dir_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7470,9 +7748,9 @@ static PyMethodDef py_lv_obj_get_style_bg_grad_dir_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_bg_main_stop(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_bg_main_stop_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_main_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_main_stop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7484,16 +7762,16 @@ static PyObject *py_lv_obj_get_style_bg_main_stop(PyObject *self, PyObject *py_a int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_stop)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_stop_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_bg_main_stop_def = { - "lv_obj_get_style_bg_main_stop", - (PyCFunction)py_lv_obj_get_style_bg_main_stop, +static PyMethodDef py_lv_obj_get_style_bg_main_stop_internal_def = { + "lv_obj_get_style_bg_main_stop_internal", + (PyCFunction)py_lv_obj_get_style_bg_main_stop_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7501,9 +7779,9 @@ static PyMethodDef py_lv_obj_get_style_bg_main_stop_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_bg_grad_stop(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_bg_grad_stop_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_grad_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_stop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7515,16 +7793,16 @@ static PyObject *py_lv_obj_get_style_bg_grad_stop(PyObject *self, PyObject *py_a int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_stop)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_stop_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_bg_grad_stop_def = { - "lv_obj_get_style_bg_grad_stop", - (PyCFunction)py_lv_obj_get_style_bg_grad_stop, +static PyMethodDef py_lv_obj_get_style_bg_grad_stop_internal_def = { + "lv_obj_get_style_bg_grad_stop_internal", + (PyCFunction)py_lv_obj_get_style_bg_grad_stop_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7532,9 +7810,9 @@ static PyMethodDef py_lv_obj_get_style_bg_grad_stop_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_main_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_bg_main_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_main_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_main_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7546,16 +7824,16 @@ static PyObject *py_lv_obj_get_style_bg_main_opa(PyObject *self, PyObject *py_ar lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_bg_main_opa_def = { - "lv_obj_get_style_bg_main_opa", - (PyCFunction)py_lv_obj_get_style_bg_main_opa, +static PyMethodDef py_lv_obj_get_style_bg_main_opa_internal_def = { + "lv_obj_get_style_bg_main_opa_internal", + (PyCFunction)py_lv_obj_get_style_bg_main_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7563,9 +7841,9 @@ static PyMethodDef py_lv_obj_get_style_bg_main_opa_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_grad_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_bg_grad_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_grad_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -7577,16 +7855,16 @@ static PyObject *py_lv_obj_get_style_bg_grad_opa(PyObject *self, PyObject *py_ar lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_bg_grad_opa_def = { - "lv_obj_get_style_bg_grad_opa", - (PyCFunction)py_lv_obj_get_style_bg_grad_opa, +static PyMethodDef py_lv_obj_get_style_bg_grad_opa_internal_def = { + "lv_obj_get_style_bg_grad_opa_internal", + (PyCFunction)py_lv_obj_get_style_bg_grad_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8547,9 +8825,9 @@ static inline PyObject *mp_read_ptr_lv_grad_dsc_t(void *field) /* * lvgl extension definition for: - * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_grad(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8561,16 +8839,16 @@ static PyObject *py_lv_obj_get_style_bg_grad(PyObject *self, PyObject *py_args, const lv_grad_dsc_t * _res; lvpy_lock(); - _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad)(obj, part); + _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_ptr_lv_grad_dsc_t((void*)_res); } -static PyMethodDef py_lv_obj_get_style_bg_grad_def = { - "lv_obj_get_style_bg_grad", - (PyCFunction)py_lv_obj_get_style_bg_grad, +static PyMethodDef py_lv_obj_get_style_bg_grad_internal_def = { + "lv_obj_get_style_bg_grad_internal", + (PyCFunction)py_lv_obj_get_style_bg_grad_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8578,9 +8856,9 @@ static PyMethodDef py_lv_obj_get_style_bg_grad_def = { /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bg_image_src(const lv_obj_t *obj, lv_part_t part) + * inline static const void *lv_obj_get_style_bg_image_src_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_src_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8592,16 +8870,16 @@ static PyObject *py_lv_obj_get_style_bg_image_src(PyObject *self, PyObject *py_a const void * _res; lvpy_lock(); - _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_src)(obj, part); + _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_src_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_bg_image_src_def = { - "lv_obj_get_style_bg_image_src", - (PyCFunction)py_lv_obj_get_style_bg_image_src, +static PyMethodDef py_lv_obj_get_style_bg_image_src_internal_def = { + "lv_obj_get_style_bg_image_src_internal", + (PyCFunction)py_lv_obj_get_style_bg_image_src_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8609,9 +8887,9 @@ static PyMethodDef py_lv_obj_get_style_bg_image_src_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_image_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_bg_image_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8623,16 +8901,16 @@ static PyObject *py_lv_obj_get_style_bg_image_opa(PyObject *self, PyObject *py_a lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_bg_image_opa_def = { - "lv_obj_get_style_bg_image_opa", - (PyCFunction)py_lv_obj_get_style_bg_image_opa, +static PyMethodDef py_lv_obj_get_style_bg_image_opa_internal_def = { + "lv_obj_get_style_bg_image_opa_internal", + (PyCFunction)py_lv_obj_get_style_bg_image_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8640,9 +8918,9 @@ static PyMethodDef py_lv_obj_get_style_bg_image_opa_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_image_recolor(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_image_recolor_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_recolor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8654,16 +8932,16 @@ static PyObject *py_lv_obj_get_style_bg_image_recolor(PyObject *self, PyObject * lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_bg_image_recolor_def = { - "lv_obj_get_style_bg_image_recolor", - (PyCFunction)py_lv_obj_get_style_bg_image_recolor, +static PyMethodDef py_lv_obj_get_style_bg_image_recolor_internal_def = { + "lv_obj_get_style_bg_image_recolor_internal", + (PyCFunction)py_lv_obj_get_style_bg_image_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8671,9 +8949,9 @@ static PyMethodDef py_lv_obj_get_style_bg_image_recolor_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_bg_image_recolor_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_image_recolor_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_recolor_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8685,16 +8963,16 @@ static PyObject *py_lv_obj_get_style_bg_image_recolor_filtered(PyObject *self, P lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_bg_image_recolor_filtered_def = { - "lv_obj_get_style_bg_image_recolor_filtered", - (PyCFunction)py_lv_obj_get_style_bg_image_recolor_filtered, +static PyMethodDef py_lv_obj_get_style_bg_image_recolor_filtered_internal_def = { + "lv_obj_get_style_bg_image_recolor_filtered_internal", + (PyCFunction)py_lv_obj_get_style_bg_image_recolor_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8702,9 +8980,9 @@ static PyMethodDef py_lv_obj_get_style_bg_image_recolor_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_image_recolor_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_bg_image_recolor_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_recolor_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8716,16 +8994,16 @@ static PyObject *py_lv_obj_get_style_bg_image_recolor_opa(PyObject *self, PyObje lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_bg_image_recolor_opa_def = { - "lv_obj_get_style_bg_image_recolor_opa", - (PyCFunction)py_lv_obj_get_style_bg_image_recolor_opa, +static PyMethodDef py_lv_obj_get_style_bg_image_recolor_opa_internal_def = { + "lv_obj_get_style_bg_image_recolor_opa_internal", + (PyCFunction)py_lv_obj_get_style_bg_image_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8733,9 +9011,9 @@ static PyMethodDef py_lv_obj_get_style_bg_image_recolor_opa_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_bg_image_tiled(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_bg_image_tiled_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bg_image_tiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_tiled_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8747,16 +9025,16 @@ static PyObject *py_lv_obj_get_style_bg_image_tiled(PyObject *self, PyObject *py bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_tiled)(obj, part); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_tiled_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_bg_image_tiled_def = { - "lv_obj_get_style_bg_image_tiled", - (PyCFunction)py_lv_obj_get_style_bg_image_tiled, +static PyMethodDef py_lv_obj_get_style_bg_image_tiled_internal_def = { + "lv_obj_get_style_bg_image_tiled_internal", + (PyCFunction)py_lv_obj_get_style_bg_image_tiled_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8764,9 +9042,9 @@ static PyMethodDef py_lv_obj_get_style_bg_image_tiled_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_border_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_border_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_border_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8778,16 +9056,16 @@ static PyObject *py_lv_obj_get_style_border_color(PyObject *self, PyObject *py_a lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_border_color_def = { - "lv_obj_get_style_border_color", - (PyCFunction)py_lv_obj_get_style_border_color, +static PyMethodDef py_lv_obj_get_style_border_color_internal_def = { + "lv_obj_get_style_border_color_internal", + (PyCFunction)py_lv_obj_get_style_border_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8795,9 +9073,9 @@ static PyMethodDef py_lv_obj_get_style_border_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_border_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_border_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_border_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8809,16 +9087,16 @@ static PyObject *py_lv_obj_get_style_border_color_filtered(PyObject *self, PyObj lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_border_color_filtered_def = { - "lv_obj_get_style_border_color_filtered", - (PyCFunction)py_lv_obj_get_style_border_color_filtered, +static PyMethodDef py_lv_obj_get_style_border_color_filtered_internal_def = { + "lv_obj_get_style_border_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_border_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8826,9 +9104,9 @@ static PyMethodDef py_lv_obj_get_style_border_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_border_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_border_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_border_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8840,16 +9118,16 @@ static PyObject *py_lv_obj_get_style_border_opa(PyObject *self, PyObject *py_arg lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_border_opa_def = { - "lv_obj_get_style_border_opa", - (PyCFunction)py_lv_obj_get_style_border_opa, +static PyMethodDef py_lv_obj_get_style_border_opa_internal_def = { + "lv_obj_get_style_border_opa_internal", + (PyCFunction)py_lv_obj_get_style_border_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8857,9 +9135,9 @@ static PyMethodDef py_lv_obj_get_style_border_opa_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_border_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_border_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_border_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8871,16 +9149,16 @@ static PyObject *py_lv_obj_get_style_border_width(PyObject *self, PyObject *py_a int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_border_width_def = { - "lv_obj_get_style_border_width", - (PyCFunction)py_lv_obj_get_style_border_width, +static PyMethodDef py_lv_obj_get_style_border_width_internal_def = { + "lv_obj_get_style_border_width_internal", + (PyCFunction)py_lv_obj_get_style_border_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8888,9 +9166,9 @@ static PyMethodDef py_lv_obj_get_style_border_width_def = { /* * lvgl extension definition for: - * inline static lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t *obj, lv_part_t part) + * inline static lv_border_side_t lv_obj_get_style_border_side_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_border_side(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_side_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8902,16 +9180,16 @@ static PyObject *py_lv_obj_get_style_border_side(PyObject *self, PyObject *py_ar lv_border_side_t _res; lvpy_lock(); - _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_side)(obj, part); + _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_side_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_border_side_def = { - "lv_obj_get_style_border_side", - (PyCFunction)py_lv_obj_get_style_border_side, +static PyMethodDef py_lv_obj_get_style_border_side_internal_def = { + "lv_obj_get_style_border_side_internal", + (PyCFunction)py_lv_obj_get_style_border_side_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8919,9 +9197,9 @@ static PyMethodDef py_lv_obj_get_style_border_side_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_border_post(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_border_post_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_border_post(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_post_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8933,16 +9211,16 @@ static PyObject *py_lv_obj_get_style_border_post(PyObject *self, PyObject *py_ar bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_post)(obj, part); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_post_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_border_post_def = { - "lv_obj_get_style_border_post", - (PyCFunction)py_lv_obj_get_style_border_post, +static PyMethodDef py_lv_obj_get_style_border_post_internal_def = { + "lv_obj_get_style_border_post_internal", + (PyCFunction)py_lv_obj_get_style_border_post_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8950,9 +9228,9 @@ static PyMethodDef py_lv_obj_get_style_border_post_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_outline_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_outline_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_outline_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8964,16 +9242,16 @@ static PyObject *py_lv_obj_get_style_outline_width(PyObject *self, PyObject *py_ int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_outline_width_def = { - "lv_obj_get_style_outline_width", - (PyCFunction)py_lv_obj_get_style_outline_width, +static PyMethodDef py_lv_obj_get_style_outline_width_internal_def = { + "lv_obj_get_style_outline_width_internal", + (PyCFunction)py_lv_obj_get_style_outline_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -8981,9 +9259,9 @@ static PyMethodDef py_lv_obj_get_style_outline_width_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_outline_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_outline_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_outline_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -8995,16 +9273,16 @@ static PyObject *py_lv_obj_get_style_outline_color(PyObject *self, PyObject *py_ lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_outline_color_def = { - "lv_obj_get_style_outline_color", - (PyCFunction)py_lv_obj_get_style_outline_color, +static PyMethodDef py_lv_obj_get_style_outline_color_internal_def = { + "lv_obj_get_style_outline_color_internal", + (PyCFunction)py_lv_obj_get_style_outline_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9012,9 +9290,9 @@ static PyMethodDef py_lv_obj_get_style_outline_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_outline_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_outline_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_outline_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9026,16 +9304,16 @@ static PyObject *py_lv_obj_get_style_outline_color_filtered(PyObject *self, PyOb lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_outline_color_filtered_def = { - "lv_obj_get_style_outline_color_filtered", - (PyCFunction)py_lv_obj_get_style_outline_color_filtered, +static PyMethodDef py_lv_obj_get_style_outline_color_filtered_internal_def = { + "lv_obj_get_style_outline_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_outline_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9043,9 +9321,9 @@ static PyMethodDef py_lv_obj_get_style_outline_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_outline_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_outline_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_outline_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9057,16 +9335,16 @@ static PyObject *py_lv_obj_get_style_outline_opa(PyObject *self, PyObject *py_ar lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_outline_opa_def = { - "lv_obj_get_style_outline_opa", - (PyCFunction)py_lv_obj_get_style_outline_opa, +static PyMethodDef py_lv_obj_get_style_outline_opa_internal_def = { + "lv_obj_get_style_outline_opa_internal", + (PyCFunction)py_lv_obj_get_style_outline_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9074,9 +9352,9 @@ static PyMethodDef py_lv_obj_get_style_outline_opa_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_outline_pad(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_outline_pad_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_outline_pad(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_pad_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9088,16 +9366,16 @@ static PyObject *py_lv_obj_get_style_outline_pad(PyObject *self, PyObject *py_ar int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_pad)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_pad_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_outline_pad_def = { - "lv_obj_get_style_outline_pad", - (PyCFunction)py_lv_obj_get_style_outline_pad, +static PyMethodDef py_lv_obj_get_style_outline_pad_internal_def = { + "lv_obj_get_style_outline_pad_internal", + (PyCFunction)py_lv_obj_get_style_outline_pad_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9105,9 +9383,9 @@ static PyMethodDef py_lv_obj_get_style_outline_pad_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_shadow_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_shadow_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9119,16 +9397,16 @@ static PyObject *py_lv_obj_get_style_shadow_width(PyObject *self, PyObject *py_a int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_shadow_width_def = { - "lv_obj_get_style_shadow_width", - (PyCFunction)py_lv_obj_get_style_shadow_width, +static PyMethodDef py_lv_obj_get_style_shadow_width_internal_def = { + "lv_obj_get_style_shadow_width_internal", + (PyCFunction)py_lv_obj_get_style_shadow_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9136,9 +9414,9 @@ static PyMethodDef py_lv_obj_get_style_shadow_width_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_offset_x(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_shadow_offset_x_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_offset_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9150,16 +9428,16 @@ static PyObject *py_lv_obj_get_style_shadow_offset_x(PyObject *self, PyObject *p int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_x_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_shadow_offset_x_def = { - "lv_obj_get_style_shadow_offset_x", - (PyCFunction)py_lv_obj_get_style_shadow_offset_x, +static PyMethodDef py_lv_obj_get_style_shadow_offset_x_internal_def = { + "lv_obj_get_style_shadow_offset_x_internal", + (PyCFunction)py_lv_obj_get_style_shadow_offset_x_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9167,9 +9445,9 @@ static PyMethodDef py_lv_obj_get_style_shadow_offset_x_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_offset_y(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_shadow_offset_y_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_offset_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9181,16 +9459,16 @@ static PyObject *py_lv_obj_get_style_shadow_offset_y(PyObject *self, PyObject *p int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_y_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_shadow_offset_y_def = { - "lv_obj_get_style_shadow_offset_y", - (PyCFunction)py_lv_obj_get_style_shadow_offset_y, +static PyMethodDef py_lv_obj_get_style_shadow_offset_y_internal_def = { + "lv_obj_get_style_shadow_offset_y_internal", + (PyCFunction)py_lv_obj_get_style_shadow_offset_y_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9198,9 +9476,9 @@ static PyMethodDef py_lv_obj_get_style_shadow_offset_y_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_spread(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_shadow_spread_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_shadow_spread(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_spread_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9212,16 +9490,16 @@ static PyObject *py_lv_obj_get_style_shadow_spread(PyObject *self, PyObject *py_ int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_spread)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_spread_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_shadow_spread_def = { - "lv_obj_get_style_shadow_spread", - (PyCFunction)py_lv_obj_get_style_shadow_spread, +static PyMethodDef py_lv_obj_get_style_shadow_spread_internal_def = { + "lv_obj_get_style_shadow_spread_internal", + (PyCFunction)py_lv_obj_get_style_shadow_spread_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9229,9 +9507,9 @@ static PyMethodDef py_lv_obj_get_style_shadow_spread_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_shadow_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_shadow_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9243,16 +9521,16 @@ static PyObject *py_lv_obj_get_style_shadow_color(PyObject *self, PyObject *py_a lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_shadow_color_def = { - "lv_obj_get_style_shadow_color", - (PyCFunction)py_lv_obj_get_style_shadow_color, +static PyMethodDef py_lv_obj_get_style_shadow_color_internal_def = { + "lv_obj_get_style_shadow_color_internal", + (PyCFunction)py_lv_obj_get_style_shadow_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9260,9 +9538,9 @@ static PyMethodDef py_lv_obj_get_style_shadow_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_shadow_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_shadow_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_shadow_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9274,16 +9552,16 @@ static PyObject *py_lv_obj_get_style_shadow_color_filtered(PyObject *self, PyObj lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_shadow_color_filtered_def = { - "lv_obj_get_style_shadow_color_filtered", - (PyCFunction)py_lv_obj_get_style_shadow_color_filtered, +static PyMethodDef py_lv_obj_get_style_shadow_color_filtered_internal_def = { + "lv_obj_get_style_shadow_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_shadow_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9291,9 +9569,9 @@ static PyMethodDef py_lv_obj_get_style_shadow_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_shadow_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_shadow_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9305,16 +9583,16 @@ static PyObject *py_lv_obj_get_style_shadow_opa(PyObject *self, PyObject *py_arg lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_shadow_opa_def = { - "lv_obj_get_style_shadow_opa", - (PyCFunction)py_lv_obj_get_style_shadow_opa, +static PyMethodDef py_lv_obj_get_style_shadow_opa_internal_def = { + "lv_obj_get_style_shadow_opa_internal", + (PyCFunction)py_lv_obj_get_style_shadow_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9322,9 +9600,9 @@ static PyMethodDef py_lv_obj_get_style_shadow_opa_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_image_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_image_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9336,16 +9614,16 @@ static PyObject *py_lv_obj_get_style_image_opa(PyObject *self, PyObject *py_args lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_image_opa_def = { - "lv_obj_get_style_image_opa", - (PyCFunction)py_lv_obj_get_style_image_opa, +static PyMethodDef py_lv_obj_get_style_image_opa_internal_def = { + "lv_obj_get_style_image_opa_internal", + (PyCFunction)py_lv_obj_get_style_image_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9353,9 +9631,9 @@ static PyMethodDef py_lv_obj_get_style_image_opa_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_image_recolor(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_image_recolor_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_recolor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9367,16 +9645,16 @@ static PyObject *py_lv_obj_get_style_image_recolor(PyObject *self, PyObject *py_ lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_image_recolor_def = { - "lv_obj_get_style_image_recolor", - (PyCFunction)py_lv_obj_get_style_image_recolor, +static PyMethodDef py_lv_obj_get_style_image_recolor_internal_def = { + "lv_obj_get_style_image_recolor_internal", + (PyCFunction)py_lv_obj_get_style_image_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9384,9 +9662,9 @@ static PyMethodDef py_lv_obj_get_style_image_recolor_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_image_recolor_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_image_recolor_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_image_recolor_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_recolor_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9398,16 +9676,16 @@ static PyObject *py_lv_obj_get_style_image_recolor_filtered(PyObject *self, PyOb lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_image_recolor_filtered_def = { - "lv_obj_get_style_image_recolor_filtered", - (PyCFunction)py_lv_obj_get_style_image_recolor_filtered, +static PyMethodDef py_lv_obj_get_style_image_recolor_filtered_internal_def = { + "lv_obj_get_style_image_recolor_filtered_internal", + (PyCFunction)py_lv_obj_get_style_image_recolor_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9415,9 +9693,9 @@ static PyMethodDef py_lv_obj_get_style_image_recolor_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_image_recolor_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_image_recolor_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_recolor_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9429,16 +9707,16 @@ static PyObject *py_lv_obj_get_style_image_recolor_opa(PyObject *self, PyObject lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_image_recolor_opa_def = { - "lv_obj_get_style_image_recolor_opa", - (PyCFunction)py_lv_obj_get_style_image_recolor_opa, +static PyMethodDef py_lv_obj_get_style_image_recolor_opa_internal_def = { + "lv_obj_get_style_image_recolor_opa_internal", + (PyCFunction)py_lv_obj_get_style_image_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9579,9 +9857,9 @@ static inline PyObject *mp_read_ptr_lv_image_colorkey_t(void *field) /* * lvgl extension definition for: - * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_image_colorkey(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_colorkey_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9593,16 +9871,16 @@ static PyObject *py_lv_obj_get_style_image_colorkey(PyObject *self, PyObject *py const lv_image_colorkey_t * _res; lvpy_lock(); - _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_colorkey)(obj, part); + _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_colorkey_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_ptr_lv_image_colorkey_t((void*)_res); } -static PyMethodDef py_lv_obj_get_style_image_colorkey_def = { - "lv_obj_get_style_image_colorkey", - (PyCFunction)py_lv_obj_get_style_image_colorkey, +static PyMethodDef py_lv_obj_get_style_image_colorkey_internal_def = { + "lv_obj_get_style_image_colorkey_internal", + (PyCFunction)py_lv_obj_get_style_image_colorkey_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9610,9 +9888,9 @@ static PyMethodDef py_lv_obj_get_style_image_colorkey_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_line_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_line_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_line_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9624,16 +9902,16 @@ static PyObject *py_lv_obj_get_style_line_width(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_line_width_def = { - "lv_obj_get_style_line_width", - (PyCFunction)py_lv_obj_get_style_line_width, +static PyMethodDef py_lv_obj_get_style_line_width_internal_def = { + "lv_obj_get_style_line_width_internal", + (PyCFunction)py_lv_obj_get_style_line_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9641,9 +9919,9 @@ static PyMethodDef py_lv_obj_get_style_line_width_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_line_dash_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_line_dash_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_line_dash_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_dash_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9655,16 +9933,16 @@ static PyObject *py_lv_obj_get_style_line_dash_width(PyObject *self, PyObject *p int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_line_dash_width_def = { - "lv_obj_get_style_line_dash_width", - (PyCFunction)py_lv_obj_get_style_line_dash_width, +static PyMethodDef py_lv_obj_get_style_line_dash_width_internal_def = { + "lv_obj_get_style_line_dash_width_internal", + (PyCFunction)py_lv_obj_get_style_line_dash_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9672,9 +9950,9 @@ static PyMethodDef py_lv_obj_get_style_line_dash_width_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_line_dash_gap(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_line_dash_gap_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_line_dash_gap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_dash_gap_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9686,16 +9964,16 @@ static PyObject *py_lv_obj_get_style_line_dash_gap(PyObject *self, PyObject *py_ int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_gap)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_gap_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_line_dash_gap_def = { - "lv_obj_get_style_line_dash_gap", - (PyCFunction)py_lv_obj_get_style_line_dash_gap, +static PyMethodDef py_lv_obj_get_style_line_dash_gap_internal_def = { + "lv_obj_get_style_line_dash_gap_internal", + (PyCFunction)py_lv_obj_get_style_line_dash_gap_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9703,9 +9981,9 @@ static PyMethodDef py_lv_obj_get_style_line_dash_gap_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_line_rounded(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_line_rounded_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_line_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_rounded_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9717,16 +9995,16 @@ static PyObject *py_lv_obj_get_style_line_rounded(PyObject *self, PyObject *py_a bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_rounded)(obj, part); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_rounded_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_line_rounded_def = { - "lv_obj_get_style_line_rounded", - (PyCFunction)py_lv_obj_get_style_line_rounded, +static PyMethodDef py_lv_obj_get_style_line_rounded_internal_def = { + "lv_obj_get_style_line_rounded_internal", + (PyCFunction)py_lv_obj_get_style_line_rounded_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9734,9 +10012,9 @@ static PyMethodDef py_lv_obj_get_style_line_rounded_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_line_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_line_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_line_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9748,16 +10026,16 @@ static PyObject *py_lv_obj_get_style_line_color(PyObject *self, PyObject *py_arg lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_line_color_def = { - "lv_obj_get_style_line_color", - (PyCFunction)py_lv_obj_get_style_line_color, +static PyMethodDef py_lv_obj_get_style_line_color_internal_def = { + "lv_obj_get_style_line_color_internal", + (PyCFunction)py_lv_obj_get_style_line_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9765,9 +10043,9 @@ static PyMethodDef py_lv_obj_get_style_line_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_line_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_line_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_line_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9779,16 +10057,16 @@ static PyObject *py_lv_obj_get_style_line_color_filtered(PyObject *self, PyObjec lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_line_color_filtered_def = { - "lv_obj_get_style_line_color_filtered", - (PyCFunction)py_lv_obj_get_style_line_color_filtered, +static PyMethodDef py_lv_obj_get_style_line_color_filtered_internal_def = { + "lv_obj_get_style_line_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_line_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9796,9 +10074,9 @@ static PyMethodDef py_lv_obj_get_style_line_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_line_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_line_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_line_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9810,16 +10088,16 @@ static PyObject *py_lv_obj_get_style_line_opa(PyObject *self, PyObject *py_args, lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_line_opa_def = { - "lv_obj_get_style_line_opa", - (PyCFunction)py_lv_obj_get_style_line_opa, +static PyMethodDef py_lv_obj_get_style_line_opa_internal_def = { + "lv_obj_get_style_line_opa_internal", + (PyCFunction)py_lv_obj_get_style_line_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9827,9 +10105,9 @@ static PyMethodDef py_lv_obj_get_style_line_opa_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_arc_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_arc_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_arc_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9841,16 +10119,16 @@ static PyObject *py_lv_obj_get_style_arc_width(PyObject *self, PyObject *py_args int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_arc_width_def = { - "lv_obj_get_style_arc_width", - (PyCFunction)py_lv_obj_get_style_arc_width, +static PyMethodDef py_lv_obj_get_style_arc_width_internal_def = { + "lv_obj_get_style_arc_width_internal", + (PyCFunction)py_lv_obj_get_style_arc_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9858,9 +10136,9 @@ static PyMethodDef py_lv_obj_get_style_arc_width_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_arc_rounded(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_arc_rounded_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_arc_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_rounded_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9872,16 +10150,16 @@ static PyObject *py_lv_obj_get_style_arc_rounded(PyObject *self, PyObject *py_ar bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_rounded)(obj, part); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_rounded_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_arc_rounded_def = { - "lv_obj_get_style_arc_rounded", - (PyCFunction)py_lv_obj_get_style_arc_rounded, +static PyMethodDef py_lv_obj_get_style_arc_rounded_internal_def = { + "lv_obj_get_style_arc_rounded_internal", + (PyCFunction)py_lv_obj_get_style_arc_rounded_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9889,9 +10167,9 @@ static PyMethodDef py_lv_obj_get_style_arc_rounded_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_arc_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_arc_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_arc_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9903,16 +10181,16 @@ static PyObject *py_lv_obj_get_style_arc_color(PyObject *self, PyObject *py_args lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_arc_color_def = { - "lv_obj_get_style_arc_color", - (PyCFunction)py_lv_obj_get_style_arc_color, +static PyMethodDef py_lv_obj_get_style_arc_color_internal_def = { + "lv_obj_get_style_arc_color_internal", + (PyCFunction)py_lv_obj_get_style_arc_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9920,9 +10198,9 @@ static PyMethodDef py_lv_obj_get_style_arc_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_arc_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_arc_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_arc_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9934,16 +10212,16 @@ static PyObject *py_lv_obj_get_style_arc_color_filtered(PyObject *self, PyObject lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_arc_color_filtered_def = { - "lv_obj_get_style_arc_color_filtered", - (PyCFunction)py_lv_obj_get_style_arc_color_filtered, +static PyMethodDef py_lv_obj_get_style_arc_color_filtered_internal_def = { + "lv_obj_get_style_arc_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_arc_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9951,9 +10229,9 @@ static PyMethodDef py_lv_obj_get_style_arc_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_arc_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_arc_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_arc_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9965,16 +10243,16 @@ static PyObject *py_lv_obj_get_style_arc_opa(PyObject *self, PyObject *py_args, lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_arc_opa_def = { - "lv_obj_get_style_arc_opa", - (PyCFunction)py_lv_obj_get_style_arc_opa, +static PyMethodDef py_lv_obj_get_style_arc_opa_internal_def = { + "lv_obj_get_style_arc_opa_internal", + (PyCFunction)py_lv_obj_get_style_arc_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -9982,9 +10260,9 @@ static PyMethodDef py_lv_obj_get_style_arc_opa_def = { /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_arc_image_src(const lv_obj_t *obj, lv_part_t part) + * inline static const void *lv_obj_get_style_arc_image_src_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_arc_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_image_src_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -9996,16 +10274,16 @@ static PyObject *py_lv_obj_get_style_arc_image_src(PyObject *self, PyObject *py_ const void * _res; lvpy_lock(); - _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_image_src)(obj, part); + _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_image_src_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_arc_image_src_def = { - "lv_obj_get_style_arc_image_src", - (PyCFunction)py_lv_obj_get_style_arc_image_src, +static PyMethodDef py_lv_obj_get_style_arc_image_src_internal_def = { + "lv_obj_get_style_arc_image_src_internal", + (PyCFunction)py_lv_obj_get_style_arc_image_src_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10013,9 +10291,9 @@ static PyMethodDef py_lv_obj_get_style_arc_image_src_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_text_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10027,16 +10305,16 @@ static PyObject *py_lv_obj_get_style_text_color(PyObject *self, PyObject *py_arg lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_text_color_def = { - "lv_obj_get_style_text_color", - (PyCFunction)py_lv_obj_get_style_text_color, +static PyMethodDef py_lv_obj_get_style_text_color_internal_def = { + "lv_obj_get_style_text_color_internal", + (PyCFunction)py_lv_obj_get_style_text_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10044,9 +10322,9 @@ static PyMethodDef py_lv_obj_get_style_text_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_text_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10058,16 +10336,16 @@ static PyObject *py_lv_obj_get_style_text_color_filtered(PyObject *self, PyObjec lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_text_color_filtered_def = { - "lv_obj_get_style_text_color_filtered", - (PyCFunction)py_lv_obj_get_style_text_color_filtered, +static PyMethodDef py_lv_obj_get_style_text_color_filtered_internal_def = { + "lv_obj_get_style_text_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_text_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10075,9 +10353,9 @@ static PyMethodDef py_lv_obj_get_style_text_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_text_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_text_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10089,16 +10367,16 @@ static PyObject *py_lv_obj_get_style_text_opa(PyObject *self, PyObject *py_args, lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_text_opa_def = { - "lv_obj_get_style_text_opa", - (PyCFunction)py_lv_obj_get_style_text_opa, +static PyMethodDef py_lv_obj_get_style_text_opa_internal_def = { + "lv_obj_get_style_text_opa_internal", + (PyCFunction)py_lv_obj_get_style_text_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10107,7 +10385,7 @@ static PyMethodDef py_lv_obj_get_style_text_opa_def = { static inline PyObject *mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next); +static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); #define funcptr_get_glyph_bitmap NULL static inline PyObject *mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } @@ -10116,14 +10394,14 @@ static inline PyObject *mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv /* * Function NOT generated: * Missing 'user_data' field for callback 'lv_font_t_get_glyph_bitmap' - * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *, lv_draw_buf_t *) + * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ #define funcptr_release_glyph NULL static inline PyObject *mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -static void lv_font_t_release_glyph_callback(const lv_font_t *, lv_font_glyph_dsc_t *); +static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); /* * Struct lv_font_t (CPython) @@ -10141,19 +10419,21 @@ static PyObject *py_lv_font_t_getattro(PyObject *self, PyObject *name) } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; + if (strcmp(attr, "dsc") == 0) return ptr_to_mp((void*)data->dsc); + if (strcmp(attr, "fallback") == 0) return ptr_to_mp((void*)data->fallback); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); if (strcmp(attr, "get_glyph_dsc") == 0) return mp_lv_funcptr(NULL, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback, "lv_font_t_get_glyph_dsc", data->user_data); if (strcmp(attr, "get_glyph_bitmap") == 0) return mp_lv_funcptr(NULL, (void*)data->get_glyph_bitmap, NULL, "lv_font_t_get_glyph_bitmap", NULL); if (strcmp(attr, "release_glyph") == 0) return mp_lv_funcptr(NULL, (void*)data->release_glyph, lv_font_t_release_glyph_callback, "lv_font_t_release_glyph", data->user_data); if (strcmp(attr, "line_height") == 0) return mp_obj_new_int(data->line_height); if (strcmp(attr, "base_line") == 0) return mp_obj_new_int(data->base_line); + if (strcmp(attr, "cap_height") == 0) return mp_obj_new_int(data->cap_height); + if (strcmp(attr, "x_height") == 0) return mp_obj_new_int(data->x_height); if (strcmp(attr, "subpx") == 0) return mp_obj_new_int_from_uint(data->subpx); if (strcmp(attr, "kerning") == 0) return mp_obj_new_int_from_uint(data->kerning); if (strcmp(attr, "static_bitmap") == 0) return mp_obj_new_int_from_uint(data->static_bitmap); if (strcmp(attr, "underline_position") == 0) return mp_obj_new_int(data->underline_position); if (strcmp(attr, "underline_thickness") == 0) return mp_obj_new_int(data->underline_thickness); - if (strcmp(attr, "dsc") == 0) return ptr_to_mp((void*)data->dsc); - if (strcmp(attr, "fallback") == 0) return ptr_to_mp((void*)data->fallback); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); for (PyMethodDef *m = py_lv_font_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); @@ -10161,7 +10441,7 @@ static PyObject *py_lv_font_t_getattro(PyObject *self, PyObject *name) return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_font_t_field_names[] = {"get_glyph_dsc", "get_glyph_bitmap", "release_glyph", "line_height", "base_line", "subpx", "kerning", "static_bitmap", "underline_position", "underline_thickness", "dsc", "fallback", "user_data", NULL}; +static const char *const py_lv_font_t_field_names[] = {"dsc", "fallback", "user_data", "get_glyph_dsc", "get_glyph_bitmap", "release_glyph", "line_height", "base_line", "cap_height", "x_height", "subpx", "kerning", "static_bitmap", "underline_position", "underline_thickness", NULL}; static PyObject *py_lv_font_t_dir(PyObject *self, PyObject *unused) { @@ -10191,19 +10471,21 @@ static int py_lv_font_t_setattro(PyObject *self, PyObject *name, PyObject *value int result = -1; lv_font_t saved; memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "dsc") == 0) { data->dsc = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "fallback") == 0) { data->fallback = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } if (strcmp(attr, "get_glyph_dsc") == 0) { data->get_glyph_dsc = (void*)mp_lv_callback(value, lv_font_t_get_glyph_dsc_callback, "lv_font_t_get_glyph_dsc", &data->user_data, data, NULL, NULL); result = 0; } if (strcmp(attr, "get_glyph_bitmap") == 0) { data->get_glyph_bitmap = (void*)mp_lv_callback(value, NULL, "lv_font_t_get_glyph_bitmap", NULL, NULL, NULL, NULL); result = 0; } if (strcmp(attr, "release_glyph") == 0) { data->release_glyph = (void*)mp_lv_callback(value, lv_font_t_release_glyph_callback, "lv_font_t_release_glyph", &data->user_data, data, NULL, NULL); result = 0; } if (strcmp(attr, "line_height") == 0) { data->line_height = (int32_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "base_line") == 0) { data->base_line = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "cap_height") == 0) { data->cap_height = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x_height") == 0) { data->x_height = (int32_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "subpx") == 0) { data->subpx = (uint8_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "kerning") == 0) { data->kerning = (uint8_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "static_bitmap") == 0) { data->static_bitmap = (uint8_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "underline_position") == 0) { data->underline_position = (int8_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "underline_thickness") == 0) { data->underline_thickness = (int8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "dsc") == 0) { data->dsc = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "fallback") == 0) { data->fallback = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; @@ -10282,9 +10564,9 @@ static inline PyObject *mp_read_ptr_lv_font_t(void *field) /* * lvgl extension definition for: - * inline static const lv_font_t *lv_obj_get_style_text_font(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_font_t *lv_obj_get_style_text_font_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_font(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_font_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10296,16 +10578,16 @@ static PyObject *py_lv_obj_get_style_text_font(PyObject *self, PyObject *py_args const lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_font)(obj, part); + _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_font_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_obj_get_style_text_font_def = { - "lv_obj_get_style_text_font", - (PyCFunction)py_lv_obj_get_style_text_font, +static PyMethodDef py_lv_obj_get_style_text_font_internal_def = { + "lv_obj_get_style_text_font_internal", + (PyCFunction)py_lv_obj_get_style_text_font_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10313,9 +10595,9 @@ static PyMethodDef py_lv_obj_get_style_text_font_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_text_letter_space(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_text_letter_space_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_letter_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_letter_space_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10327,16 +10609,16 @@ static PyObject *py_lv_obj_get_style_text_letter_space(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_letter_space)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_letter_space_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_text_letter_space_def = { - "lv_obj_get_style_text_letter_space", - (PyCFunction)py_lv_obj_get_style_text_letter_space, +static PyMethodDef py_lv_obj_get_style_text_letter_space_internal_def = { + "lv_obj_get_style_text_letter_space_internal", + (PyCFunction)py_lv_obj_get_style_text_letter_space_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10344,9 +10626,9 @@ static PyMethodDef py_lv_obj_get_style_text_letter_space_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_text_line_space(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_text_line_space_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_line_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_line_space_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10358,16 +10640,16 @@ static PyObject *py_lv_obj_get_style_text_line_space(PyObject *self, PyObject *p int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_line_space)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_line_space_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_text_line_space_def = { - "lv_obj_get_style_text_line_space", - (PyCFunction)py_lv_obj_get_style_text_line_space, +static PyMethodDef py_lv_obj_get_style_text_line_space_internal_def = { + "lv_obj_get_style_text_line_space_internal", + (PyCFunction)py_lv_obj_get_style_text_line_space_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10375,9 +10657,9 @@ static PyMethodDef py_lv_obj_get_style_text_line_space_def = { /* * lvgl extension definition for: - * inline static lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_decor_t lv_obj_get_style_text_decor_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_decor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_decor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10389,16 +10671,16 @@ static PyObject *py_lv_obj_get_style_text_decor(PyObject *self, PyObject *py_arg lv_text_decor_t _res; lvpy_lock(); - _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_decor)(obj, part); + _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_decor_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_text_decor_def = { - "lv_obj_get_style_text_decor", - (PyCFunction)py_lv_obj_get_style_text_decor, +static PyMethodDef py_lv_obj_get_style_text_decor_internal_def = { + "lv_obj_get_style_text_decor_internal", + (PyCFunction)py_lv_obj_get_style_text_decor_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10406,9 +10688,9 @@ static PyMethodDef py_lv_obj_get_style_text_decor_def = { /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_align_t lv_obj_get_style_text_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10420,16 +10702,16 @@ static PyObject *py_lv_obj_get_style_text_align(PyObject *self, PyObject *py_arg lv_text_align_t _res; lvpy_lock(); - _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_align)(obj, part); + _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_align_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_text_align_def = { - "lv_obj_get_style_text_align", - (PyCFunction)py_lv_obj_get_style_text_align, +static PyMethodDef py_lv_obj_get_style_text_align_internal_def = { + "lv_obj_get_style_text_align_internal", + (PyCFunction)py_lv_obj_get_style_text_align_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10437,9 +10719,9 @@ static PyMethodDef py_lv_obj_get_style_text_align_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_outline_stroke_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_text_outline_stroke_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10451,16 +10733,16 @@ static PyObject *py_lv_obj_get_style_text_outline_stroke_color(PyObject *self, P lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_def = { - "lv_obj_get_style_text_outline_stroke_color", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_internal_def = { + "lv_obj_get_style_text_outline_stroke_color_internal", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10468,9 +10750,9 @@ static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_outline_stroke_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_text_outline_stroke_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10482,16 +10764,16 @@ static PyObject *py_lv_obj_get_style_text_outline_stroke_color_filtered(PyObject lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_filtered_def = { - "lv_obj_get_style_text_outline_stroke_color_filtered", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_filtered, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_filtered_internal_def = { + "lv_obj_get_style_text_outline_stroke_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10499,9 +10781,9 @@ static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_filtered_def = /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_text_outline_stroke_width(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_text_outline_stroke_width_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10513,16 +10795,16 @@ static PyObject *py_lv_obj_get_style_text_outline_stroke_width(PyObject *self, P int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_width_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_width_def = { - "lv_obj_get_style_text_outline_stroke_width", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_width, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_width_internal_def = { + "lv_obj_get_style_text_outline_stroke_width_internal", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_width_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10530,9 +10812,9 @@ static PyMethodDef py_lv_obj_get_style_text_outline_stroke_width_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_text_outline_stroke_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_text_outline_stroke_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10544,16 +10826,16 @@ static PyObject *py_lv_obj_get_style_text_outline_stroke_opa(PyObject *self, PyO lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_opa_def = { - "lv_obj_get_style_text_outline_stroke_opa", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_opa, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_opa_internal_def = { + "lv_obj_get_style_text_outline_stroke_opa_internal", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10561,9 +10843,40 @@ static PyMethodDef py_lv_obj_get_style_text_outline_stroke_opa_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_blur_radius(const lv_obj_t *obj, lv_part_t part) + * inline static lv_text_leading_trim_t lv_obj_get_style_text_leading_trim_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_blur_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_leading_trim_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_text_leading_trim_t _res; + lvpy_lock(); + _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_leading_trim_internal)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_get_style_text_leading_trim_internal_def = { + "lv_obj_get_style_text_leading_trim_internal", + (PyCFunction)py_lv_obj_get_style_text_leading_trim_internal, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static int32_t lv_obj_get_style_blur_radius_internal(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_blur_radius_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10575,16 +10888,16 @@ static PyObject *py_lv_obj_get_style_blur_radius(PyObject *self, PyObject *py_ar int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_radius)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_radius_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_blur_radius_def = { - "lv_obj_get_style_blur_radius", - (PyCFunction)py_lv_obj_get_style_blur_radius, +static PyMethodDef py_lv_obj_get_style_blur_radius_internal_def = { + "lv_obj_get_style_blur_radius_internal", + (PyCFunction)py_lv_obj_get_style_blur_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10592,9 +10905,9 @@ static PyMethodDef py_lv_obj_get_style_blur_radius_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_blur_backdrop(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_blur_backdrop_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_blur_backdrop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_blur_backdrop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10606,16 +10919,16 @@ static PyObject *py_lv_obj_get_style_blur_backdrop(PyObject *self, PyObject *py_ bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_backdrop)(obj, part); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_backdrop_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_blur_backdrop_def = { - "lv_obj_get_style_blur_backdrop", - (PyCFunction)py_lv_obj_get_style_blur_backdrop, +static PyMethodDef py_lv_obj_get_style_blur_backdrop_internal_def = { + "lv_obj_get_style_blur_backdrop_internal", + (PyCFunction)py_lv_obj_get_style_blur_backdrop_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10623,9 +10936,9 @@ static PyMethodDef py_lv_obj_get_style_blur_backdrop_def = { /* * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t *obj, lv_part_t part) + * inline static lv_blur_quality_t lv_obj_get_style_blur_quality_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_blur_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_blur_quality_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10637,16 +10950,16 @@ static PyObject *py_lv_obj_get_style_blur_quality(PyObject *self, PyObject *py_a lv_blur_quality_t _res; lvpy_lock(); - _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_quality)(obj, part); + _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_quality_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_blur_quality_def = { - "lv_obj_get_style_blur_quality", - (PyCFunction)py_lv_obj_get_style_blur_quality, +static PyMethodDef py_lv_obj_get_style_blur_quality_internal_def = { + "lv_obj_get_style_blur_quality_internal", + (PyCFunction)py_lv_obj_get_style_blur_quality_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10654,9 +10967,9 @@ static PyMethodDef py_lv_obj_get_style_blur_quality_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_drop_shadow_radius(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_drop_shadow_radius_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_drop_shadow_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_radius_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10668,16 +10981,16 @@ static PyObject *py_lv_obj_get_style_drop_shadow_radius(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_radius)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_radius_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_radius_def = { - "lv_obj_get_style_drop_shadow_radius", - (PyCFunction)py_lv_obj_get_style_drop_shadow_radius, +static PyMethodDef py_lv_obj_get_style_drop_shadow_radius_internal_def = { + "lv_obj_get_style_drop_shadow_radius_internal", + (PyCFunction)py_lv_obj_get_style_drop_shadow_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10685,9 +10998,9 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_radius_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_drop_shadow_offset_x(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_drop_shadow_offset_x_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_drop_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_offset_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10699,16 +11012,16 @@ static PyObject *py_lv_obj_get_style_drop_shadow_offset_x(PyObject *self, PyObje int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_x_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_x_def = { - "lv_obj_get_style_drop_shadow_offset_x", - (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_x, +static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_x_internal_def = { + "lv_obj_get_style_drop_shadow_offset_x_internal", + (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_x_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10716,9 +11029,9 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_x_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_drop_shadow_offset_y(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_drop_shadow_offset_y_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_drop_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_offset_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10730,16 +11043,16 @@ static PyObject *py_lv_obj_get_style_drop_shadow_offset_y(PyObject *self, PyObje int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_y_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_y_def = { - "lv_obj_get_style_drop_shadow_offset_y", - (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_y, +static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_y_internal_def = { + "lv_obj_get_style_drop_shadow_offset_y_internal", + (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_y_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10747,9 +11060,9 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_y_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_drop_shadow_color(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_drop_shadow_color_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_drop_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10761,16 +11074,16 @@ static PyObject *py_lv_obj_get_style_drop_shadow_color(PyObject *self, PyObject lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_color_def = { - "lv_obj_get_style_drop_shadow_color", - (PyCFunction)py_lv_obj_get_style_drop_shadow_color, +static PyMethodDef py_lv_obj_get_style_drop_shadow_color_internal_def = { + "lv_obj_get_style_drop_shadow_color_internal", + (PyCFunction)py_lv_obj_get_style_drop_shadow_color_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10778,9 +11091,9 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_color_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_drop_shadow_color_filtered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_drop_shadow_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_drop_shadow_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10792,16 +11105,16 @@ static PyObject *py_lv_obj_get_style_drop_shadow_color_filtered(PyObject *self, lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color_filtered)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color_filtered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_color_filtered_def = { - "lv_obj_get_style_drop_shadow_color_filtered", - (PyCFunction)py_lv_obj_get_style_drop_shadow_color_filtered, +static PyMethodDef py_lv_obj_get_style_drop_shadow_color_filtered_internal_def = { + "lv_obj_get_style_drop_shadow_color_filtered_internal", + (PyCFunction)py_lv_obj_get_style_drop_shadow_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10809,9 +11122,9 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_color_filtered_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_drop_shadow_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_drop_shadow_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_drop_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10823,16 +11136,16 @@ static PyObject *py_lv_obj_get_style_drop_shadow_opa(PyObject *self, PyObject *p lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_opa_def = { - "lv_obj_get_style_drop_shadow_opa", - (PyCFunction)py_lv_obj_get_style_drop_shadow_opa, +static PyMethodDef py_lv_obj_get_style_drop_shadow_opa_internal_def = { + "lv_obj_get_style_drop_shadow_opa_internal", + (PyCFunction)py_lv_obj_get_style_drop_shadow_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10840,9 +11153,9 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_opa_def = { /* * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_drop_shadow_quality(const lv_obj_t *obj, lv_part_t part) + * inline static lv_blur_quality_t lv_obj_get_style_drop_shadow_quality_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_drop_shadow_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_quality_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10854,16 +11167,16 @@ static PyObject *py_lv_obj_get_style_drop_shadow_quality(PyObject *self, PyObjec lv_blur_quality_t _res; lvpy_lock(); - _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_quality)(obj, part); + _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_quality_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_quality_def = { - "lv_obj_get_style_drop_shadow_quality", - (PyCFunction)py_lv_obj_get_style_drop_shadow_quality, +static PyMethodDef py_lv_obj_get_style_drop_shadow_quality_internal_def = { + "lv_obj_get_style_drop_shadow_quality_internal", + (PyCFunction)py_lv_obj_get_style_drop_shadow_quality_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10871,9 +11184,9 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_quality_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_radius(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_radius_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_radius_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10885,16 +11198,16 @@ static PyObject *py_lv_obj_get_style_radius(PyObject *self, PyObject *py_args, P int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radius)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radius_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_radius_def = { - "lv_obj_get_style_radius", - (PyCFunction)py_lv_obj_get_style_radius, +static PyMethodDef py_lv_obj_get_style_radius_internal_def = { + "lv_obj_get_style_radius_internal", + (PyCFunction)py_lv_obj_get_style_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10902,9 +11215,9 @@ static PyMethodDef py_lv_obj_get_style_radius_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_radial_offset(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_radial_offset_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_radial_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_radial_offset_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10916,16 +11229,16 @@ static PyObject *py_lv_obj_get_style_radial_offset(PyObject *self, PyObject *py_ int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radial_offset)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radial_offset_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_radial_offset_def = { - "lv_obj_get_style_radial_offset", - (PyCFunction)py_lv_obj_get_style_radial_offset, +static PyMethodDef py_lv_obj_get_style_radial_offset_internal_def = { + "lv_obj_get_style_radial_offset_internal", + (PyCFunction)py_lv_obj_get_style_radial_offset_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10933,9 +11246,9 @@ static PyMethodDef py_lv_obj_get_style_radial_offset_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_clip_corner(const lv_obj_t *obj, lv_part_t part) + * inline static bool lv_obj_get_style_clip_corner_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_clip_corner(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_clip_corner_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10947,16 +11260,16 @@ static PyObject *py_lv_obj_get_style_clip_corner(PyObject *self, PyObject *py_ar bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_clip_corner)(obj, part); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_clip_corner_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_clip_corner_def = { - "lv_obj_get_style_clip_corner", - (PyCFunction)py_lv_obj_get_style_clip_corner, +static PyMethodDef py_lv_obj_get_style_clip_corner_internal_def = { + "lv_obj_get_style_clip_corner_internal", + (PyCFunction)py_lv_obj_get_style_clip_corner_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10964,9 +11277,9 @@ static PyMethodDef py_lv_obj_get_style_clip_corner_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -10978,16 +11291,16 @@ static PyObject *py_lv_obj_get_style_opa(PyObject *self, PyObject *py_args, PyOb lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_opa_def = { - "lv_obj_get_style_opa", - (PyCFunction)py_lv_obj_get_style_opa, +static PyMethodDef py_lv_obj_get_style_opa_internal_def = { + "lv_obj_get_style_opa_internal", + (PyCFunction)py_lv_obj_get_style_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10995,9 +11308,9 @@ static PyMethodDef py_lv_obj_get_style_opa_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_opa_layered(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_opa_layered_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_opa_layered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_opa_layered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11009,16 +11322,16 @@ static PyObject *py_lv_obj_get_style_opa_layered(PyObject *self, PyObject *py_ar lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_layered)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_layered_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_opa_layered_def = { - "lv_obj_get_style_opa_layered", - (PyCFunction)py_lv_obj_get_style_opa_layered, +static PyMethodDef py_lv_obj_get_style_opa_layered_internal_def = { + "lv_obj_get_style_opa_layered_internal", + (PyCFunction)py_lv_obj_get_style_opa_layered_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11164,9 +11477,9 @@ static inline PyObject *mp_read_ptr_lv_color_filter_dsc_t(void *field) /* * lvgl extension definition for: - * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_color_filter_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_color_filter_dsc_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11178,16 +11491,16 @@ static PyObject *py_lv_obj_get_style_color_filter_dsc(PyObject *self, PyObject * const lv_color_filter_dsc_t * _res; lvpy_lock(); - _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_dsc)(obj, part); + _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_dsc_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); } -static PyMethodDef py_lv_obj_get_style_color_filter_dsc_def = { - "lv_obj_get_style_color_filter_dsc", - (PyCFunction)py_lv_obj_get_style_color_filter_dsc, +static PyMethodDef py_lv_obj_get_style_color_filter_dsc_internal_def = { + "lv_obj_get_style_color_filter_dsc_internal", + (PyCFunction)py_lv_obj_get_style_color_filter_dsc_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11195,9 +11508,9 @@ static PyMethodDef py_lv_obj_get_style_color_filter_dsc_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_color_filter_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_color_filter_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_color_filter_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_color_filter_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11209,16 +11522,16 @@ static PyObject *py_lv_obj_get_style_color_filter_opa(PyObject *self, PyObject * lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_color_filter_opa_def = { - "lv_obj_get_style_color_filter_opa", - (PyCFunction)py_lv_obj_get_style_color_filter_opa, +static PyMethodDef py_lv_obj_get_style_color_filter_opa_internal_def = { + "lv_obj_get_style_color_filter_opa_internal", + (PyCFunction)py_lv_obj_get_style_color_filter_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11226,9 +11539,9 @@ static PyMethodDef py_lv_obj_get_style_color_filter_opa_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_recolor(const lv_obj_t *obj, lv_part_t part) + * inline static lv_color_t lv_obj_get_style_recolor_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_recolor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11240,16 +11553,16 @@ static PyObject *py_lv_obj_get_style_recolor(PyObject *self, PyObject *py_args, lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_recolor_def = { - "lv_obj_get_style_recolor", - (PyCFunction)py_lv_obj_get_style_recolor, +static PyMethodDef py_lv_obj_get_style_recolor_internal_def = { + "lv_obj_get_style_recolor_internal", + (PyCFunction)py_lv_obj_get_style_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11257,9 +11570,9 @@ static PyMethodDef py_lv_obj_get_style_recolor_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_recolor_opa(const lv_obj_t *obj, lv_part_t part) + * inline static lv_opa_t lv_obj_get_style_recolor_opa_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_recolor_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11271,16 +11584,16 @@ static PyObject *py_lv_obj_get_style_recolor_opa(PyObject *self, PyObject *py_ar lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_opa)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_opa_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_recolor_opa_def = { - "lv_obj_get_style_recolor_opa", - (PyCFunction)py_lv_obj_get_style_recolor_opa, +static PyMethodDef py_lv_obj_get_style_recolor_opa_internal_def = { + "lv_obj_get_style_recolor_opa_internal", + (PyCFunction)py_lv_obj_get_style_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11769,9 +12082,9 @@ static inline PyObject *mp_read_ptr_lv_anim_t(void *field) /* * lvgl extension definition for: - * inline static const lv_anim_t *lv_obj_get_style_anim(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_anim_t *lv_obj_get_style_anim_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_anim_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11783,16 +12096,16 @@ static PyObject *py_lv_obj_get_style_anim(PyObject *self, PyObject *py_args, PyO const lv_anim_t * _res; lvpy_lock(); - _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim)(obj, part); + _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_ptr_lv_anim_t((void*)_res); } -static PyMethodDef py_lv_obj_get_style_anim_def = { - "lv_obj_get_style_anim", - (PyCFunction)py_lv_obj_get_style_anim, +static PyMethodDef py_lv_obj_get_style_anim_internal_def = { + "lv_obj_get_style_anim_internal", + (PyCFunction)py_lv_obj_get_style_anim_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11800,9 +12113,9 @@ static PyMethodDef py_lv_obj_get_style_anim_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_anim_duration(const lv_obj_t *obj, lv_part_t part) + * inline static uint32_t lv_obj_get_style_anim_duration_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_anim_duration_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11814,16 +12127,16 @@ static PyObject *py_lv_obj_get_style_anim_duration(PyObject *self, PyObject *py_ uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim_duration)(obj, part); + _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim_duration_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_anim_duration_def = { - "lv_obj_get_style_anim_duration", - (PyCFunction)py_lv_obj_get_style_anim_duration, +static PyMethodDef py_lv_obj_get_style_anim_duration_internal_def = { + "lv_obj_get_style_anim_duration_internal", + (PyCFunction)py_lv_obj_get_style_anim_duration_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11977,9 +12290,9 @@ static inline PyObject *mp_read_ptr_lv_style_transition_dsc_t(void *field) /* * lvgl extension definition for: - * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition(const lv_obj_t *obj, lv_part_t part) + * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transition(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transition_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -11991,16 +12304,16 @@ static PyObject *py_lv_obj_get_style_transition(PyObject *self, PyObject *py_arg const lv_style_transition_dsc_t * _res; lvpy_lock(); - _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transition)(obj, part); + _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transition_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); } -static PyMethodDef py_lv_obj_get_style_transition_def = { - "lv_obj_get_style_transition", - (PyCFunction)py_lv_obj_get_style_transition, +static PyMethodDef py_lv_obj_get_style_transition_internal_def = { + "lv_obj_get_style_transition_internal", + (PyCFunction)py_lv_obj_get_style_transition_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12008,9 +12321,9 @@ static PyMethodDef py_lv_obj_get_style_transition_def = { /* * lvgl extension definition for: - * inline static lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t *obj, lv_part_t part) + * inline static lv_blend_mode_t lv_obj_get_style_blend_mode_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_blend_mode_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12022,16 +12335,16 @@ static PyObject *py_lv_obj_get_style_blend_mode(PyObject *self, PyObject *py_arg lv_blend_mode_t _res; lvpy_lock(); - _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blend_mode)(obj, part); + _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blend_mode_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_blend_mode_def = { - "lv_obj_get_style_blend_mode", - (PyCFunction)py_lv_obj_get_style_blend_mode, +static PyMethodDef py_lv_obj_get_style_blend_mode_internal_def = { + "lv_obj_get_style_blend_mode_internal", + (PyCFunction)py_lv_obj_get_style_blend_mode_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12039,9 +12352,9 @@ static PyMethodDef py_lv_obj_get_style_blend_mode_def = { /* * lvgl extension definition for: - * inline static uint16_t lv_obj_get_style_layout(const lv_obj_t *obj, lv_part_t part) + * inline static uint16_t lv_obj_get_style_layout_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_layout_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12053,16 +12366,16 @@ static PyObject *py_lv_obj_get_style_layout(PyObject *self, PyObject *py_args, P uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_layout)(obj, part); + _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_layout_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_layout_def = { - "lv_obj_get_style_layout", - (PyCFunction)py_lv_obj_get_style_layout, +static PyMethodDef py_lv_obj_get_style_layout_internal_def = { + "lv_obj_get_style_layout_internal", + (PyCFunction)py_lv_obj_get_style_layout_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12070,9 +12383,9 @@ static PyMethodDef py_lv_obj_get_style_layout_def = { /* * lvgl extension definition for: - * inline static lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t *obj, lv_part_t part) + * inline static lv_base_dir_t lv_obj_get_style_base_dir_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_base_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_base_dir_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12084,16 +12397,16 @@ static PyObject *py_lv_obj_get_style_base_dir(PyObject *self, PyObject *py_args, lv_base_dir_t _res; lvpy_lock(); - _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_base_dir)(obj, part); + _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_base_dir_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_base_dir_def = { - "lv_obj_get_style_base_dir", - (PyCFunction)py_lv_obj_get_style_base_dir, +static PyMethodDef py_lv_obj_get_style_base_dir_internal_def = { + "lv_obj_get_style_base_dir_internal", + (PyCFunction)py_lv_obj_get_style_base_dir_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12101,9 +12414,9 @@ static PyMethodDef py_lv_obj_get_style_base_dir_def = { /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bitmap_mask_src(const lv_obj_t *obj, lv_part_t part) + * inline static const void *lv_obj_get_style_bitmap_mask_src_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_bitmap_mask_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bitmap_mask_src_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12115,16 +12428,16 @@ static PyObject *py_lv_obj_get_style_bitmap_mask_src(PyObject *self, PyObject *p const void * _res; lvpy_lock(); - _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bitmap_mask_src)(obj, part); + _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bitmap_mask_src_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_bitmap_mask_src_def = { - "lv_obj_get_style_bitmap_mask_src", - (PyCFunction)py_lv_obj_get_style_bitmap_mask_src, +static PyMethodDef py_lv_obj_get_style_bitmap_mask_src_internal_def = { + "lv_obj_get_style_bitmap_mask_src_internal", + (PyCFunction)py_lv_obj_get_style_bitmap_mask_src_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12132,9 +12445,9 @@ static PyMethodDef py_lv_obj_get_style_bitmap_mask_src_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_rotary_sensitivity(const lv_obj_t *obj, lv_part_t part) + * inline static uint32_t lv_obj_get_style_rotary_sensitivity_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_rotary_sensitivity(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_rotary_sensitivity_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12146,16 +12459,16 @@ static PyObject *py_lv_obj_get_style_rotary_sensitivity(PyObject *self, PyObject uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_rotary_sensitivity)(obj, part); + _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_rotary_sensitivity_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_rotary_sensitivity_def = { - "lv_obj_get_style_rotary_sensitivity", - (PyCFunction)py_lv_obj_get_style_rotary_sensitivity, +static PyMethodDef py_lv_obj_get_style_rotary_sensitivity_internal_def = { + "lv_obj_get_style_rotary_sensitivity_internal", + (PyCFunction)py_lv_obj_get_style_rotary_sensitivity_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12163,9 +12476,9 @@ static PyMethodDef py_lv_obj_get_style_rotary_sensitivity_def = { /* * lvgl extension definition for: - * inline static lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t *obj, lv_part_t part) + * inline static lv_flex_flow_t lv_obj_get_style_flex_flow_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_flow_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12177,16 +12490,16 @@ static PyObject *py_lv_obj_get_style_flex_flow(PyObject *self, PyObject *py_args lv_flex_flow_t _res; lvpy_lock(); - _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_flow)(obj, part); + _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_flow_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_flex_flow_def = { - "lv_obj_get_style_flex_flow", - (PyCFunction)py_lv_obj_get_style_flex_flow, +static PyMethodDef py_lv_obj_get_style_flex_flow_internal_def = { + "lv_obj_get_style_flex_flow_internal", + (PyCFunction)py_lv_obj_get_style_flex_flow_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12194,9 +12507,9 @@ static PyMethodDef py_lv_obj_get_style_flex_flow_def = { /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t *obj, lv_part_t part) + * inline static lv_flex_align_t lv_obj_get_style_flex_main_place_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_flex_main_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_main_place_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12208,16 +12521,16 @@ static PyObject *py_lv_obj_get_style_flex_main_place(PyObject *self, PyObject *p lv_flex_align_t _res; lvpy_lock(); - _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_main_place)(obj, part); + _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_main_place_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_flex_main_place_def = { - "lv_obj_get_style_flex_main_place", - (PyCFunction)py_lv_obj_get_style_flex_main_place, +static PyMethodDef py_lv_obj_get_style_flex_main_place_internal_def = { + "lv_obj_get_style_flex_main_place_internal", + (PyCFunction)py_lv_obj_get_style_flex_main_place_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12225,9 +12538,9 @@ static PyMethodDef py_lv_obj_get_style_flex_main_place_def = { /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_cross_place(const lv_obj_t *obj, lv_part_t part) + * inline static lv_flex_align_t lv_obj_get_style_flex_cross_place_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_flex_cross_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_cross_place_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12239,16 +12552,16 @@ static PyObject *py_lv_obj_get_style_flex_cross_place(PyObject *self, PyObject * lv_flex_align_t _res; lvpy_lock(); - _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_cross_place)(obj, part); + _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_cross_place_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_flex_cross_place_def = { - "lv_obj_get_style_flex_cross_place", - (PyCFunction)py_lv_obj_get_style_flex_cross_place, +static PyMethodDef py_lv_obj_get_style_flex_cross_place_internal_def = { + "lv_obj_get_style_flex_cross_place_internal", + (PyCFunction)py_lv_obj_get_style_flex_cross_place_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12256,9 +12569,9 @@ static PyMethodDef py_lv_obj_get_style_flex_cross_place_def = { /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_track_place(const lv_obj_t *obj, lv_part_t part) + * inline static lv_flex_align_t lv_obj_get_style_flex_track_place_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_flex_track_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_track_place_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12270,16 +12583,16 @@ static PyObject *py_lv_obj_get_style_flex_track_place(PyObject *self, PyObject * lv_flex_align_t _res; lvpy_lock(); - _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_track_place)(obj, part); + _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_track_place_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_flex_track_place_def = { - "lv_obj_get_style_flex_track_place", - (PyCFunction)py_lv_obj_get_style_flex_track_place, +static PyMethodDef py_lv_obj_get_style_flex_track_place_internal_def = { + "lv_obj_get_style_flex_track_place_internal", + (PyCFunction)py_lv_obj_get_style_flex_track_place_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12287,9 +12600,9 @@ static PyMethodDef py_lv_obj_get_style_flex_track_place_def = { /* * lvgl extension definition for: - * inline static uint8_t lv_obj_get_style_flex_grow(const lv_obj_t *obj, lv_part_t part) + * inline static uint8_t lv_obj_get_style_flex_grow_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_grow_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12301,16 +12614,16 @@ static PyObject *py_lv_obj_get_style_flex_grow(PyObject *self, PyObject *py_args uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_grow)(obj, part); + _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_grow_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_flex_grow_def = { - "lv_obj_get_style_flex_grow", - (PyCFunction)py_lv_obj_get_style_flex_grow, +static PyMethodDef py_lv_obj_get_style_flex_grow_internal_def = { + "lv_obj_get_style_flex_grow_internal", + (PyCFunction)py_lv_obj_get_style_flex_grow_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12318,9 +12631,9 @@ static PyMethodDef py_lv_obj_get_style_flex_grow_def = { /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array(const lv_obj_t *obj, lv_part_t part) + * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_column_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_column_dsc_array_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12332,16 +12645,16 @@ static PyObject *py_lv_obj_get_style_grid_column_dsc_array(PyObject *self, PyObj const int32_t * _res; lvpy_lock(); - _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_dsc_array)(obj, part); + _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_dsc_array_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_array_from_i32ptr((void*)_res); } -static PyMethodDef py_lv_obj_get_style_grid_column_dsc_array_def = { - "lv_obj_get_style_grid_column_dsc_array", - (PyCFunction)py_lv_obj_get_style_grid_column_dsc_array, +static PyMethodDef py_lv_obj_get_style_grid_column_dsc_array_internal_def = { + "lv_obj_get_style_grid_column_dsc_array_internal", + (PyCFunction)py_lv_obj_get_style_grid_column_dsc_array_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12349,9 +12662,9 @@ static PyMethodDef py_lv_obj_get_style_grid_column_dsc_array_def = { /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grid_align_t lv_obj_get_style_grid_column_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_column_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_column_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12363,16 +12676,16 @@ static PyObject *py_lv_obj_get_style_grid_column_align(PyObject *self, PyObject lv_grid_align_t _res; lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_align)(obj, part); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_align_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_column_align_def = { - "lv_obj_get_style_grid_column_align", - (PyCFunction)py_lv_obj_get_style_grid_column_align, +static PyMethodDef py_lv_obj_get_style_grid_column_align_internal_def = { + "lv_obj_get_style_grid_column_align_internal", + (PyCFunction)py_lv_obj_get_style_grid_column_align_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12380,9 +12693,9 @@ static PyMethodDef py_lv_obj_get_style_grid_column_align_def = { /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_row_dsc_array(const lv_obj_t *obj, lv_part_t part) + * inline static const int32_t *lv_obj_get_style_grid_row_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_row_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_row_dsc_array_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12394,16 +12707,16 @@ static PyObject *py_lv_obj_get_style_grid_row_dsc_array(PyObject *self, PyObject const int32_t * _res; lvpy_lock(); - _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_dsc_array)(obj, part); + _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_dsc_array_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_array_from_i32ptr((void*)_res); } -static PyMethodDef py_lv_obj_get_style_grid_row_dsc_array_def = { - "lv_obj_get_style_grid_row_dsc_array", - (PyCFunction)py_lv_obj_get_style_grid_row_dsc_array, +static PyMethodDef py_lv_obj_get_style_grid_row_dsc_array_internal_def = { + "lv_obj_get_style_grid_row_dsc_array_internal", + (PyCFunction)py_lv_obj_get_style_grid_row_dsc_array_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12411,9 +12724,9 @@ static PyMethodDef py_lv_obj_get_style_grid_row_dsc_array_def = { /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_row_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grid_align_t lv_obj_get_style_grid_row_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_row_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_row_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12425,16 +12738,16 @@ static PyObject *py_lv_obj_get_style_grid_row_align(PyObject *self, PyObject *py lv_grid_align_t _res; lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_align)(obj, part); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_align_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_row_align_def = { - "lv_obj_get_style_grid_row_align", - (PyCFunction)py_lv_obj_get_style_grid_row_align, +static PyMethodDef py_lv_obj_get_style_grid_row_align_internal_def = { + "lv_obj_get_style_grid_row_align_internal", + (PyCFunction)py_lv_obj_get_style_grid_row_align_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12442,9 +12755,9 @@ static PyMethodDef py_lv_obj_get_style_grid_row_align_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_column_pos(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_grid_cell_column_pos_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_cell_column_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_cell_column_pos_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12456,16 +12769,16 @@ static PyObject *py_lv_obj_get_style_grid_cell_column_pos(PyObject *self, PyObje int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_pos)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_pos_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_column_pos_def = { - "lv_obj_get_style_grid_cell_column_pos", - (PyCFunction)py_lv_obj_get_style_grid_cell_column_pos, +static PyMethodDef py_lv_obj_get_style_grid_cell_column_pos_internal_def = { + "lv_obj_get_style_grid_cell_column_pos_internal", + (PyCFunction)py_lv_obj_get_style_grid_cell_column_pos_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12473,9 +12786,9 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_column_pos_def = { /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_cell_x_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grid_align_t lv_obj_get_style_grid_cell_x_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_cell_x_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_cell_x_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12487,16 +12800,16 @@ static PyObject *py_lv_obj_get_style_grid_cell_x_align(PyObject *self, PyObject lv_grid_align_t _res; lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_x_align)(obj, part); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_x_align_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_x_align_def = { - "lv_obj_get_style_grid_cell_x_align", - (PyCFunction)py_lv_obj_get_style_grid_cell_x_align, +static PyMethodDef py_lv_obj_get_style_grid_cell_x_align_internal_def = { + "lv_obj_get_style_grid_cell_x_align_internal", + (PyCFunction)py_lv_obj_get_style_grid_cell_x_align_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12504,9 +12817,9 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_x_align_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_column_span(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_grid_cell_column_span_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_cell_column_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_cell_column_span_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12518,16 +12831,16 @@ static PyObject *py_lv_obj_get_style_grid_cell_column_span(PyObject *self, PyObj int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_span)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_span_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_column_span_def = { - "lv_obj_get_style_grid_cell_column_span", - (PyCFunction)py_lv_obj_get_style_grid_cell_column_span, +static PyMethodDef py_lv_obj_get_style_grid_cell_column_span_internal_def = { + "lv_obj_get_style_grid_cell_column_span_internal", + (PyCFunction)py_lv_obj_get_style_grid_cell_column_span_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12535,9 +12848,9 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_column_span_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_row_pos(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_grid_cell_row_pos_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_cell_row_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_cell_row_pos_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12549,16 +12862,16 @@ static PyObject *py_lv_obj_get_style_grid_cell_row_pos(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_pos)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_pos_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_row_pos_def = { - "lv_obj_get_style_grid_cell_row_pos", - (PyCFunction)py_lv_obj_get_style_grid_cell_row_pos, +static PyMethodDef py_lv_obj_get_style_grid_cell_row_pos_internal_def = { + "lv_obj_get_style_grid_cell_row_pos_internal", + (PyCFunction)py_lv_obj_get_style_grid_cell_row_pos_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12566,9 +12879,9 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_row_pos_def = { /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_cell_y_align(const lv_obj_t *obj, lv_part_t part) + * inline static lv_grid_align_t lv_obj_get_style_grid_cell_y_align_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_cell_y_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_cell_y_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12580,16 +12893,16 @@ static PyObject *py_lv_obj_get_style_grid_cell_y_align(PyObject *self, PyObject lv_grid_align_t _res; lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_y_align)(obj, part); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_y_align_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_y_align_def = { - "lv_obj_get_style_grid_cell_y_align", - (PyCFunction)py_lv_obj_get_style_grid_cell_y_align, +static PyMethodDef py_lv_obj_get_style_grid_cell_y_align_internal_def = { + "lv_obj_get_style_grid_cell_y_align_internal", + (PyCFunction)py_lv_obj_get_style_grid_cell_y_align_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12597,9 +12910,9 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_y_align_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_row_span(const lv_obj_t *obj, lv_part_t part) + * inline static int32_t lv_obj_get_style_grid_cell_row_span_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_grid_cell_row_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_cell_row_span_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -12611,16 +12924,16 @@ static PyObject *py_lv_obj_get_style_grid_cell_row_span(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_span)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_span_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_row_span_def = { - "lv_obj_get_style_grid_cell_row_span", - (PyCFunction)py_lv_obj_get_style_grid_cell_row_span, +static PyMethodDef py_lv_obj_get_style_grid_cell_row_span_internal_def = { + "lv_obj_get_style_grid_cell_row_span_internal", + (PyCFunction)py_lv_obj_get_style_grid_cell_row_span_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12628,30 +12941,31 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_row_span_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_pad_all(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static lv_text_align_t lv_obj_calculate_style_text_align_internal(const lv_obj_t *obj, lv_part_t part, const char *txt) */ -static PyObject *py_lv_obj_set_style_pad_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_calculate_style_text_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_text_align_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_all)(obj, value, selector); + _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_obj_calculate_style_text_align_internal)(obj, part, txt); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_all_def = { - "lv_obj_set_style_pad_all", - (PyCFunction)py_lv_obj_set_style_pad_all, +static PyMethodDef py_lv_obj_calculate_style_text_align_internal_def = { + "lv_obj_calculate_style_text_align_internal", + (PyCFunction)py_lv_obj_calculate_style_text_align_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12659,30 +12973,30 @@ static PyMethodDef py_lv_obj_set_style_pad_all_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_pad_hor(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static int32_t lv_obj_get_style_space_left_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_hor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_space_left_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_hor)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_left_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_hor_def = { - "lv_obj_set_style_pad_hor", - (PyCFunction)py_lv_obj_set_style_pad_hor, +static PyMethodDef py_lv_obj_get_style_space_left_internal_def = { + "lv_obj_get_style_space_left_internal", + (PyCFunction)py_lv_obj_get_style_space_left_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12690,30 +13004,30 @@ static PyMethodDef py_lv_obj_set_style_pad_hor_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_pad_ver(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static int32_t lv_obj_get_style_space_right_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_ver(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_space_right_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_ver)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_right_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_ver_def = { - "lv_obj_set_style_pad_ver", - (PyCFunction)py_lv_obj_set_style_pad_ver, +static PyMethodDef py_lv_obj_get_style_space_right_internal_def = { + "lv_obj_get_style_space_right_internal", + (PyCFunction)py_lv_obj_get_style_space_right_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12721,30 +13035,30 @@ static PyMethodDef py_lv_obj_set_style_pad_ver_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_margin_all(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static int32_t lv_obj_get_style_space_top_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_margin_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_space_top_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_all)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_top_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_margin_all_def = { - "lv_obj_set_style_margin_all", - (PyCFunction)py_lv_obj_set_style_margin_all, +static PyMethodDef py_lv_obj_get_style_space_top_internal_def = { + "lv_obj_get_style_space_top_internal", + (PyCFunction)py_lv_obj_get_style_space_top_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12752,30 +13066,30 @@ static PyMethodDef py_lv_obj_set_style_margin_all_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_margin_hor(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static int32_t lv_obj_get_style_space_bottom_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_margin_hor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_space_bottom_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_hor)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_bottom_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_margin_hor_def = { - "lv_obj_set_style_margin_hor", - (PyCFunction)py_lv_obj_set_style_margin_hor, +static PyMethodDef py_lv_obj_get_style_space_bottom_internal_def = { + "lv_obj_get_style_space_bottom_internal", + (PyCFunction)py_lv_obj_get_style_space_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12783,30 +13097,30 @@ static PyMethodDef py_lv_obj_set_style_margin_hor_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_margin_ver(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static int32_t lv_obj_get_style_transform_scale_x_safe_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_margin_ver(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_x_safe_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_ver)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x_safe_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_margin_ver_def = { - "lv_obj_set_style_margin_ver", - (PyCFunction)py_lv_obj_set_style_margin_ver, +static PyMethodDef py_lv_obj_get_style_transform_scale_x_safe_internal_def = { + "lv_obj_get_style_transform_scale_x_safe_internal", + (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12814,30 +13128,30 @@ static PyMethodDef py_lv_obj_set_style_margin_ver_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_pad_gap(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * inline static int32_t lv_obj_get_style_transform_scale_y_safe_internal(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_gap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_y_safe_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_gap)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y_safe_internal)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_gap_def = { - "lv_obj_set_style_pad_gap", - (PyCFunction)py_lv_obj_set_style_pad_gap, +static PyMethodDef py_lv_obj_get_style_transform_scale_y_safe_internal_def = { + "lv_obj_get_style_transform_scale_y_safe_internal", + (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe_internal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12845,31 +13159,29 @@ static PyMethodDef py_lv_obj_set_style_pad_gap_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_size(lv_obj_t *obj, int32_t width, int32_t height, lv_style_selector_t selector) + * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) */ -static PyObject *py_lv_obj_set_style_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long width_val; long height_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "llO", &width_val, &height_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *flow_py; + if (!PyArg_ParseTuple(py_args, "O", &flow_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t width = (int32_t)width_val; - int32_t height = (int32_t)height_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_flex_flow_t flow = (int)mp_obj_get_int(flow_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_style_selector_t))lv_obj_set_style_size)(obj, width, height, selector); + ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_obj_set_flex_flow)(obj, flow); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_style_size_def = { - "lv_obj_set_style_size", - (PyCFunction)py_lv_obj_set_style_size, +static PyMethodDef py_lv_obj_set_flex_flow_def = { + "lv_obj_set_flex_flow", + (PyCFunction)py_lv_obj_set_flex_flow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12877,30 +13189,31 @@ static PyMethodDef py_lv_obj_set_style_size_def = { /* * lvgl extension definition for: - * inline static void lv_obj_set_style_transform_scale(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) */ -static PyObject *py_lv_obj_set_style_transform_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_flex_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *main_place_py; PyObject *cross_place_py; PyObject *track_cross_place_py; + if (!PyArg_ParseTuple(py_args, "OOO", &main_place_py, &cross_place_py, &track_cross_place_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_flex_align_t main_place = (int)mp_obj_get_int(main_place_py); + lv_flex_align_t cross_place = (int)mp_obj_get_int(cross_place_py); + lv_flex_align_t track_cross_place = (int)mp_obj_get_int(track_cross_place_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_scale)(obj, value, selector); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_obj_set_flex_align)(obj, main_place, cross_place, track_cross_place); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_style_transform_scale_def = { - "lv_obj_set_style_transform_scale", - (PyCFunction)py_lv_obj_set_style_transform_scale, +static PyMethodDef py_lv_obj_set_flex_align_def = { + "lv_obj_set_flex_align", + (PyCFunction)py_lv_obj_set_flex_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12908,30 +13221,29 @@ static PyMethodDef py_lv_obj_set_style_transform_scale_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_left(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) */ -static PyObject *py_lv_obj_get_style_space_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long grow_val; + if (!PyArg_ParseTuple(py_args, "l", &grow_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + uint8_t grow = (uint8_t)grow_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_left)(obj, part); + ((void (*)(lv_obj_t *, uint8_t))lv_obj_set_flex_grow)(obj, grow); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_space_left_def = { - "lv_obj_get_style_space_left", - (PyCFunction)py_lv_obj_get_style_space_left, +static PyMethodDef py_lv_obj_set_flex_grow_def = { + "lv_obj_set_flex_grow", + (PyCFunction)py_lv_obj_set_flex_grow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12939,30 +13251,30 @@ static PyMethodDef py_lv_obj_get_style_space_left_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_right(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) */ -static PyObject *py_lv_obj_get_style_space_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_grid_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *col_dsc_py; PyObject *row_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &col_dsc_py, &row_dsc_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + const int32_t *col_dsc = (const int32_t *)mp_to_ptr(col_dsc_py); + const int32_t *row_dsc = (const int32_t *)mp_to_ptr(row_dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_right)(obj, part); + ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_obj_set_grid_dsc_array)(obj, col_dsc, row_dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_space_right_def = { - "lv_obj_get_style_space_right", - (PyCFunction)py_lv_obj_get_style_space_right, +static PyMethodDef py_lv_obj_set_grid_dsc_array_def = { + "lv_obj_set_grid_dsc_array", + (PyCFunction)py_lv_obj_set_grid_dsc_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12970,30 +13282,30 @@ static PyMethodDef py_lv_obj_get_style_space_right_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_top(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) */ -static PyObject *py_lv_obj_get_style_space_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_grid_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *column_align_py; PyObject *row_align_py; + if (!PyArg_ParseTuple(py_args, "OO", &column_align_py, &row_align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); + lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_top)(obj, part); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_obj_set_grid_align)(obj, column_align, row_align); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_space_top_def = { - "lv_obj_get_style_space_top", - (PyCFunction)py_lv_obj_get_style_space_top, +static PyMethodDef py_lv_obj_set_grid_align_def = { + "lv_obj_set_grid_align", + (PyCFunction)py_lv_obj_set_grid_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13001,324 +13313,21 @@ static PyMethodDef py_lv_obj_get_style_space_top_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_bottom(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) */ -static PyObject *py_lv_obj_get_style_space_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_grid_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *column_align_py; long col_pos_val; long col_span_val; PyObject *row_align_py; long row_pos_val; long row_span_val; + if (!PyArg_ParseTuple(py_args, "OllOll", &column_align_py, &col_pos_val, &col_span_val, &row_align_py, &row_pos_val, &row_span_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_bottom)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_space_bottom_def = { - "lv_obj_get_style_space_bottom", - (PyCFunction)py_lv_obj_get_style_space_bottom, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_x_safe(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_scale_x_safe(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x_safe)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_transform_scale_x_safe_def = { - "lv_obj_get_style_transform_scale_x_safe", - (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_y_safe(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_scale_y_safe(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y_safe)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_transform_scale_y_safe_def = { - "lv_obj_get_style_transform_scale_y_safe", - (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static void lv_obj_move_foreground(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_move_foreground(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_move_foreground)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_move_foreground_def = { - "lv_obj_move_foreground", - (PyCFunction)py_lv_obj_move_foreground, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static void lv_obj_move_background(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_move_background(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_move_background)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_move_background_def = { - "lv_obj_move_background", - (PyCFunction)py_lv_obj_move_background, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) - */ -static PyObject *py_lv_obj_set_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *flow_py; - if (!PyArg_ParseTuple(py_args, "O", &flow_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_flex_flow_t flow = (int)mp_obj_get_int(flow_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_obj_set_flex_flow)(obj, flow); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_flex_flow_def = { - "lv_obj_set_flex_flow", - (PyCFunction)py_lv_obj_set_flex_flow, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) - */ -static PyObject *py_lv_obj_set_flex_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *main_place_py; PyObject *cross_place_py; PyObject *track_cross_place_py; - if (!PyArg_ParseTuple(py_args, "OOO", &main_place_py, &cross_place_py, &track_cross_place_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_flex_align_t main_place = (int)mp_obj_get_int(main_place_py); - lv_flex_align_t cross_place = (int)mp_obj_get_int(cross_place_py); - lv_flex_align_t track_cross_place = (int)mp_obj_get_int(track_cross_place_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_obj_set_flex_align)(obj, main_place, cross_place, track_cross_place); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_flex_align_def = { - "lv_obj_set_flex_align", - (PyCFunction)py_lv_obj_set_flex_align, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) - */ -static PyObject *py_lv_obj_set_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long grow_val; - if (!PyArg_ParseTuple(py_args, "l", &grow_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint8_t grow = (uint8_t)grow_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint8_t))lv_obj_set_flex_grow)(obj, grow); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_flex_grow_def = { - "lv_obj_set_flex_grow", - (PyCFunction)py_lv_obj_set_flex_grow, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) - */ -static PyObject *py_lv_obj_set_grid_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *col_dsc_py; PyObject *row_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &col_dsc_py, &row_dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const int32_t *col_dsc = (const int32_t *)mp_to_ptr(col_dsc_py); - const int32_t *row_dsc = (const int32_t *)mp_to_ptr(row_dsc_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_obj_set_grid_dsc_array)(obj, col_dsc, row_dsc); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_grid_dsc_array_def = { - "lv_obj_set_grid_dsc_array", - (PyCFunction)py_lv_obj_set_grid_dsc_array, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) - */ -static PyObject *py_lv_obj_set_grid_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *column_align_py; PyObject *row_align_py; - if (!PyArg_ParseTuple(py_args, "OO", &column_align_py, &row_align_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); - lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_obj_set_grid_align)(obj, column_align, row_align); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_grid_align_def = { - "lv_obj_set_grid_align", - (PyCFunction)py_lv_obj_set_grid_align, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) - */ -static PyObject *py_lv_obj_set_grid_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *column_align_py; long col_pos_val; long col_span_val; PyObject *row_align_py; long row_pos_val; long row_span_val; - if (!PyArg_ParseTuple(py_args, "OllOll", &column_align_py, &col_pos_val, &col_span_val, &row_align_py, &row_pos_val, &row_span_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); - int32_t col_pos = (int32_t)col_pos_val; - int32_t col_span = (int32_t)col_span_val; - lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); - int32_t row_pos = (int32_t)row_pos_val; - int32_t row_span = (int32_t)row_span_val; + lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); + int32_t col_pos = (int32_t)col_pos_val; + int32_t col_span = (int32_t)col_span_val; + lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); + int32_t row_pos = (int32_t)row_pos_val; + int32_t row_span = (int32_t)row_span_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); @@ -13815,6 +13824,17 @@ static inline PyObject *mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *fun * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb */ +#define funcptr_lv_draw_buf_clear_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_clear_cb' + * lv_draw_buf_clear_cb_t buf_clear_cb + */ + /* * Struct lv_draw_buf_handlers_t (CPython) @@ -13839,6 +13859,7 @@ static PyObject *py_lv_draw_buf_handlers_t_getattro(PyObject *self, PyObject *na if (strcmp(attr, "invalidate_cache_cb") == 0) return mp_lv_funcptr(NULL, data->invalidate_cache_cb, NULL, "lv_draw_buf_handlers_t_invalidate_cache_cb", NULL); if (strcmp(attr, "flush_cache_cb") == 0) return mp_lv_funcptr(NULL, data->flush_cache_cb, NULL, "lv_draw_buf_handlers_t_flush_cache_cb", NULL); if (strcmp(attr, "width_to_stride_cb") == 0) return mp_lv_funcptr(NULL, data->width_to_stride_cb, NULL, "lv_draw_buf_handlers_t_width_to_stride_cb", NULL); + if (strcmp(attr, "buf_clear_cb") == 0) return mp_lv_funcptr(NULL, data->buf_clear_cb, NULL, "lv_draw_buf_handlers_t_buf_clear_cb", NULL); for (PyMethodDef *m = py_lv_draw_buf_handlers_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); @@ -13846,7 +13867,7 @@ static PyObject *py_lv_draw_buf_handlers_t_getattro(PyObject *self, PyObject *na return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_buf_handlers_t_field_names[] = {"buf_malloc_cb", "buf_free_cb", "buf_copy_cb", "align_pointer_cb", "invalidate_cache_cb", "flush_cache_cb", "width_to_stride_cb", NULL}; +static const char *const py_lv_draw_buf_handlers_t_field_names[] = {"buf_malloc_cb", "buf_free_cb", "buf_copy_cb", "align_pointer_cb", "invalidate_cache_cb", "flush_cache_cb", "width_to_stride_cb", "buf_clear_cb", NULL}; static PyObject *py_lv_draw_buf_handlers_t_dir(PyObject *self, PyObject *unused) { @@ -13883,6 +13904,7 @@ static int py_lv_draw_buf_handlers_t_setattro(PyObject *self, PyObject *name, Py if (strcmp(attr, "invalidate_cache_cb") == 0) { data->invalidate_cache_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_invalidate_cache_cb", NULL, NULL, NULL, NULL); result = 0; } if (strcmp(attr, "flush_cache_cb") == 0) { data->flush_cache_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_flush_cache_cb", NULL, NULL, NULL, NULL); result = 0; } if (strcmp(attr, "width_to_stride_cb") == 0) { data->width_to_stride_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_width_to_stride_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "buf_clear_cb") == 0) { data->buf_clear_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_clear_cb", NULL, NULL, NULL, NULL); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; @@ -14107,55 +14129,60 @@ static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t * static inline PyObject *mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); +#define funcptr_lv_display_sync_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); +static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); /* - * Struct lv_area_t (CPython) + * Struct lv_ll_t (CPython) */ -extern PyMethodDef py_lv_area_t_methods[]; +extern PyMethodDef py_lv_ll_t_methods[]; -static PyObject *py_lv_area_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_ll_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_area_t *data = (lv_area_t*)inst->data; + lv_ll_t *data = (lv_ll_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "x1") == 0) return mp_obj_new_int(data->x1); - if (strcmp(attr, "y1") == 0) return mp_obj_new_int(data->y1); - if (strcmp(attr, "x2") == 0) return mp_obj_new_int(data->x2); - if (strcmp(attr, "y2") == 0) return mp_obj_new_int(data->y2); - for (PyMethodDef *m = py_lv_area_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "n_size") == 0) return mp_obj_new_int_from_uint(data->n_size); + if (strcmp(attr, "head") == 0) return ptr_to_mp((void*)data->head); + if (strcmp(attr, "tail") == 0) return ptr_to_mp((void*)data->tail); + for (PyMethodDef *m = py_lv_ll_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_area_t_field_names[] = {"x1", "y1", "x2", "y2", NULL}; +static const char *const py_lv_ll_t_field_names[] = {"n_size", "head", "tail", NULL}; -static PyObject *py_lv_area_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_ll_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_area_t_field_names, py_lv_area_t_methods); + return lvpy_struct_dir(self, py_lv_ll_t_field_names, py_lv_ll_t_methods); } -static PyMethodDef py_lv_area_t_type_methods[] = { - {"__dir__", py_lv_area_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_ll_t_type_methods[] = { + {"__dir__", py_lv_ll_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_area_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_ll_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_area_t *data = (lv_area_t*)inst->data; + lv_ll_t *data = (lv_ll_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -14163,135 +14190,135 @@ static int py_lv_area_t_setattro(PyObject *self, PyObject *name, PyObject *value const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_area_t saved; + lv_ll_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "x1") == 0) { data->x1 = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y1") == 0) { data->y1 = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "x2") == 0) { data->x2 = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y2") == 0) { data->y2 = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "n_size") == 0) { data->n_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "head") == 0) { data->head = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "tail") == 0) { data->tail = (void*)mp_to_ptr(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_area_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_ll_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_area_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_ll_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_area_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_ll_t)); } -static void py_lv_area_t_dealloc(py_lv_struct_t *self) +static void py_lv_ll_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_area_t_type = { +PyTypeObject py_lv_ll_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_area_t", + .tp_name = "lvgl.lv_ll_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_area_t_dealloc, - .tp_getattro = (getter)py_lv_area_t_getattro, - .tp_setattro = (setter)py_lv_area_t_setattro, - .tp_new = py_lv_area_t_new, - .tp_methods = py_lv_area_t_type_methods, + .tp_dealloc = (destructor)py_lv_ll_t_dealloc, + .tp_getattro = (getter)py_lv_ll_t_getattro, + .tp_setattro = (setter)py_lv_ll_t_setattro, + .tp_new = py_lv_ll_t_new, + .tp_methods = py_lv_ll_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_area_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_ll_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_area_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_area_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_ll_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_ll_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_area_t*)self->data; + return (lv_ll_t*)self->data; } -static lv_area_t mp_write_scratch_lv_area_t; +static lv_ll_t mp_write_scratch_lv_ll_t; -static inline void* mp_write_value_ptr_lv_area_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_ll_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_area_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_ll_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_area_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_area_t)); + memcpy(&mp_write_scratch_lv_ll_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_ll_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_area_t; + return &mp_write_scratch_lv_ll_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_area_t(value); + void *p = mp_write_ptr_lv_ll_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_area_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_ll_t or dict, got None"); } - memset(&mp_write_scratch_lv_area_t, 0, sizeof(lv_area_t)); - return &mp_write_scratch_lv_area_t; + memset(&mp_write_scratch_lv_ll_t, 0, sizeof(lv_ll_t)); + return &mp_write_scratch_lv_ll_t; } -#define mp_write_lv_area_t(struct_obj) (*((lv_area_t*)mp_write_value_ptr_lv_area_t(struct_obj))) +#define mp_write_lv_ll_t(struct_obj) (*((lv_ll_t*)mp_write_value_ptr_lv_ll_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_area_t(void *field) +static inline PyObject *mp_read_ptr_lv_ll_t(void *field) { - return lv_to_mp_struct(&py_lv_area_t_type, field); + return lv_to_mp_struct(&py_lv_ll_t_type, field); } -#define mp_read_lv_area_t(field) lv_to_mp_struct_own(&py_lv_area_t_type, copy_buffer(&field, sizeof(lv_area_t))) -#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) +#define mp_read_lv_ll_t(field) lv_to_mp_struct_own(&py_lv_ll_t_type, copy_buffer(&field, sizeof(lv_ll_t))) +#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) /* - * Struct lv_ll_t (CPython) + * Struct lv_area_t (CPython) */ -extern PyMethodDef py_lv_ll_t_methods[]; +extern PyMethodDef py_lv_area_t_methods[]; -static PyObject *py_lv_ll_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_area_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_ll_t *data = (lv_ll_t*)inst->data; + lv_area_t *data = (lv_area_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "n_size") == 0) return mp_obj_new_int_from_uint(data->n_size); - if (strcmp(attr, "head") == 0) return ptr_to_mp((void*)data->head); - if (strcmp(attr, "tail") == 0) return ptr_to_mp((void*)data->tail); - for (PyMethodDef *m = py_lv_ll_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "x1") == 0) return mp_obj_new_int(data->x1); + if (strcmp(attr, "y1") == 0) return mp_obj_new_int(data->y1); + if (strcmp(attr, "x2") == 0) return mp_obj_new_int(data->x2); + if (strcmp(attr, "y2") == 0) return mp_obj_new_int(data->y2); + for (PyMethodDef *m = py_lv_area_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_ll_t_field_names[] = {"n_size", "head", "tail", NULL}; +static const char *const py_lv_area_t_field_names[] = {"x1", "y1", "x2", "y2", NULL}; -static PyObject *py_lv_ll_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_area_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_ll_t_field_names, py_lv_ll_t_methods); + return lvpy_struct_dir(self, py_lv_area_t_field_names, py_lv_area_t_methods); } -static PyMethodDef py_lv_ll_t_type_methods[] = { - {"__dir__", py_lv_ll_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_area_t_type_methods[] = { + {"__dir__", py_lv_area_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_ll_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_area_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_ll_t *data = (lv_ll_t*)inst->data; + lv_area_t *data = (lv_area_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -14299,85 +14326,86 @@ static int py_lv_ll_t_setattro(PyObject *self, PyObject *name, PyObject *value) const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_ll_t saved; + lv_area_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "n_size") == 0) { data->n_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "head") == 0) { data->head = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "tail") == 0) { data->tail = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "x1") == 0) { data->x1 = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y1") == 0) { data->y1 = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x2") == 0) { data->x2 = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y2") == 0) { data->y2 = (int32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_ll_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_area_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_ll_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_area_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_ll_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_area_t)); } -static void py_lv_ll_t_dealloc(py_lv_struct_t *self) +static void py_lv_area_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_ll_t_type = { +PyTypeObject py_lv_area_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_ll_t", + .tp_name = "lvgl.lv_area_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_ll_t_dealloc, - .tp_getattro = (getter)py_lv_ll_t_getattro, - .tp_setattro = (setter)py_lv_ll_t_setattro, - .tp_new = py_lv_ll_t_new, - .tp_methods = py_lv_ll_t_type_methods, + .tp_dealloc = (destructor)py_lv_area_t_dealloc, + .tp_getattro = (getter)py_lv_area_t_getattro, + .tp_setattro = (setter)py_lv_area_t_setattro, + .tp_new = py_lv_area_t_new, + .tp_methods = py_lv_area_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_ll_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_area_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_ll_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_ll_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_area_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_area_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_ll_t*)self->data; + return (lv_area_t*)self->data; } -static lv_ll_t mp_write_scratch_lv_ll_t; +static lv_area_t mp_write_scratch_lv_area_t; -static inline void* mp_write_value_ptr_lv_ll_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_area_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_ll_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_area_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_ll_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_ll_t)); + memcpy(&mp_write_scratch_lv_area_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_area_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_ll_t; + return &mp_write_scratch_lv_area_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_ll_t(value); + void *p = mp_write_ptr_lv_area_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_ll_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_area_t or dict, got None"); } - memset(&mp_write_scratch_lv_ll_t, 0, sizeof(lv_ll_t)); - return &mp_write_scratch_lv_ll_t; + memset(&mp_write_scratch_lv_area_t, 0, sizeof(lv_area_t)); + return &mp_write_scratch_lv_area_t; } -#define mp_write_lv_ll_t(struct_obj) (*((lv_ll_t*)mp_write_value_ptr_lv_ll_t(struct_obj))) +#define mp_write_lv_area_t(struct_obj) (*((lv_area_t*)mp_write_value_ptr_lv_area_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_ll_t(void *field) +static inline PyObject *mp_read_ptr_lv_area_t(void *field) { - return lv_to_mp_struct(&py_lv_ll_t_type, field); + return lv_to_mp_struct(&py_lv_area_t_type, field); } -#define mp_read_lv_ll_t(field) lv_to_mp_struct_own(&py_lv_ll_t_type, copy_buffer(&field, sizeof(lv_ll_t))) -#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) +#define mp_read_lv_area_t(field) lv_to_mp_struct_own(&py_lv_area_t_type, copy_buffer(&field, sizeof(lv_area_t))) +#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) #define funcptr_dispatch_cb NULL @@ -14596,7 +14624,6 @@ static PyObject *py_lv_draw_task_t_getattro(PyObject *self, PyObject *name) if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); if (strcmp(attr, "area") == 0) return mp_read_byref_lv_area_t(data->area); if (strcmp(attr, "_real_area") == 0) return mp_read_byref_lv_area_t(data->_real_area); - if (strcmp(attr, "clip_area_original") == 0) return mp_read_byref_lv_area_t(data->clip_area_original); if (strcmp(attr, "clip_area") == 0) return mp_read_byref_lv_area_t(data->clip_area); if (strcmp(attr, "target_layer") == 0) return ptr_to_mp((void*)data->target_layer); if (strcmp(attr, "draw_unit") == 0) return mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); @@ -14612,7 +14639,7 @@ static PyObject *py_lv_draw_task_t_getattro(PyObject *self, PyObject *name) return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_task_t_field_names[] = {"next", "type", "area", "_real_area", "clip_area_original", "clip_area", "target_layer", "draw_unit", "state", "draw_dsc", "opa", "preferred_draw_unit_id", "preference_score", NULL}; +static const char *const py_lv_draw_task_t_field_names[] = {"next", "type", "area", "_real_area", "clip_area", "target_layer", "draw_unit", "state", "draw_dsc", "opa", "preferred_draw_unit_id", "preference_score", NULL}; static PyObject *py_lv_draw_task_t_dir(PyObject *self, PyObject *unused) { @@ -14646,7 +14673,6 @@ static int py_lv_draw_task_t_setattro(PyObject *self, PyObject *name, PyObject * if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "area") == 0) { data->area = mp_write_lv_area_t(value); result = 0; } if (strcmp(attr, "_real_area") == 0) { data->_real_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "clip_area_original") == 0) { data->clip_area_original = mp_write_lv_area_t(value); result = 0; } if (strcmp(attr, "clip_area") == 0) { data->clip_area = mp_write_lv_area_t(value); result = 0; } if (strcmp(attr, "target_layer") == 0) { data->target_layer = (void*)mp_to_ptr(value); result = 0; } if (strcmp(attr, "draw_unit") == 0) { data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(value); result = 0; } @@ -14886,6 +14912,7 @@ static PyObject *py_lv_layer_t_getattro(PyObject *self, PyObject *name) if (attr == NULL) return NULL; if (strcmp(attr, "draw_buf") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->draw_buf); if (strcmp(attr, "draw_task_head") == 0) return mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); + if (strcmp(attr, "display") == 0) return ptr_to_mp((void*)data->display); if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); if (strcmp(attr, "next") == 0) return ptr_to_mp((void*)data->next); if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); @@ -14897,6 +14924,7 @@ static PyObject *py_lv_layer_t_getattro(PyObject *self, PyObject *name) if (strcmp(attr, "color_format") == 0) return mp_obj_new_int(data->color_format); if (strcmp(attr, "all_tasks_added") == 0) return convert_to_bool(data->all_tasks_added); if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "buffer_owned") == 0) return convert_to_bool(data->buffer_owned); for (PyMethodDef *m = py_lv_layer_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); @@ -14904,7 +14932,7 @@ static PyObject *py_lv_layer_t_getattro(PyObject *self, PyObject *name) return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_layer_t_field_names[] = {"draw_buf", "draw_task_head", "parent", "next", "user_data", "buf_area", "phy_clip_area", "_clip_area", "partial_y_offset", "recolor", "color_format", "all_tasks_added", "opa", NULL}; +static const char *const py_lv_layer_t_field_names[] = {"draw_buf", "draw_task_head", "display", "parent", "next", "user_data", "buf_area", "phy_clip_area", "_clip_area", "partial_y_offset", "recolor", "color_format", "all_tasks_added", "opa", "buffer_owned", NULL}; static PyObject *py_lv_layer_t_dir(PyObject *self, PyObject *unused) { @@ -14936,6 +14964,7 @@ static int py_lv_layer_t_setattro(PyObject *self, PyObject *name, PyObject *valu memcpy(&saved, data, sizeof(saved)); if (strcmp(attr, "draw_buf") == 0) { data->draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } if (strcmp(attr, "draw_task_head") == 0) { data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(value); result = 0; } + if (strcmp(attr, "display") == 0) { data->display = (void*)mp_to_ptr(value); result = 0; } if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } if (strcmp(attr, "next") == 0) { data->next = (void*)mp_to_ptr(value); result = 0; } if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } @@ -14947,6 +14976,7 @@ static int py_lv_layer_t_setattro(PyObject *self, PyObject *name, PyObject *valu if (strcmp(attr, "color_format") == 0) { data->color_format = (int)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "all_tasks_added") == 0) { data->all_tasks_added = mp_obj_is_true(value); result = 0; } if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "buffer_owned") == 0) { data->buffer_owned = mp_obj_is_true(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; @@ -15022,12 +15052,6 @@ static inline PyObject *mp_read_ptr_lv_layer_t(void *field) #define mp_read_lv_layer_t(field) lv_to_mp_struct_own(&py_lv_layer_t_type, copy_buffer(&field, sizeof(lv_layer_t))) #define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) -#define funcptr_layer_init NULL - -static inline PyObject *mp_lv_funcptr_layer_init(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_display_t_layer_init_callback(lv_display_t *disp, lv_layer_t *layer); -static void lv_display_t_layer_deinit_callback(lv_display_t *disp, lv_layer_t *layer); /* * Struct lv_array_t (CPython) @@ -15638,6 +15662,11 @@ static PyObject *py_lv_display_t_getattro(PyObject *self, PyObject *name) if (strcmp(attr, "flushing_last") == 0) return mp_obj_new_int(data->flushing_last); if (strcmp(attr, "last_area") == 0) return mp_obj_new_int_from_uint(data->last_area); if (strcmp(attr, "last_part") == 0) return mp_obj_new_int_from_uint(data->last_part); + if (strcmp(attr, "sync_cb") == 0) return mp_lv_funcptr(NULL, data->sync_cb, lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", data->user_data); + if (strcmp(attr, "sync_wait_cb") == 0) return mp_lv_funcptr(NULL, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback, "lv_display_t_sync_wait_cb", data->user_data); + if (strcmp(attr, "syncing") == 0) return mp_obj_new_int(data->syncing); + if (strcmp(attr, "syncing_last") == 0) return mp_obj_new_int(data->syncing_last); + if (strcmp(attr, "sync_areas") == 0) return mp_read_byref_lv_ll_t(data->sync_areas); if (strcmp(attr, "render_mode") == 0) return mp_obj_new_int(data->render_mode); if (strcmp(attr, "antialiasing") == 0) return mp_obj_new_int_from_uint(data->antialiasing); if (strcmp(attr, "tile_cnt") == 0) return mp_obj_new_int_from_uint(data->tile_cnt); @@ -15648,12 +15677,9 @@ static PyObject *py_lv_display_t_getattro(PyObject *self, PyObject *name) if (strcmp(attr, "inv_area_joined") == 0) return ptr_to_mp(data->inv_area_joined); if (strcmp(attr, "inv_p") == 0) return mp_obj_new_int_from_uint(data->inv_p); if (strcmp(attr, "inv_en_cnt") == 0) return mp_obj_new_int(data->inv_en_cnt); - if (strcmp(attr, "sync_areas") == 0) return mp_read_byref_lv_ll_t(data->sync_areas); if (strcmp(attr, "_static_buf1") == 0) return mp_read_byref_lv_draw_buf_t(data->_static_buf1); if (strcmp(attr, "_static_buf2") == 0) return mp_read_byref_lv_draw_buf_t(data->_static_buf2); if (strcmp(attr, "layer_head") == 0) return mp_read_ptr_lv_layer_t((void*)data->layer_head); - if (strcmp(attr, "layer_init") == 0) return mp_lv_funcptr(NULL, (void*)data->layer_init, lv_display_t_layer_init_callback, "lv_display_t_layer_init", data->user_data); - if (strcmp(attr, "layer_deinit") == 0) return mp_lv_funcptr(NULL, (void*)data->layer_deinit, lv_display_t_layer_deinit_callback, "lv_display_t_layer_deinit", data->user_data); if (strcmp(attr, "screens") == 0) return ptr_to_mp((void*)data->screens); if (strcmp(attr, "sys_layer") == 0) return lv_to_mp((void*)data->sys_layer); if (strcmp(attr, "top_layer") == 0) return lv_to_mp((void*)data->top_layer); @@ -15681,7 +15707,7 @@ static PyObject *py_lv_display_t_getattro(PyObject *self, PyObject *name) return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_display_t_field_names[] = {"hor_res", "ver_res", "physical_hor_res", "physical_ver_res", "offset_x", "offset_y", "dpi", "buf_1", "buf_2", "buf_3", "buf_act", "flush_cb", "flush_wait_cb", "flushing", "flushing_last", "last_area", "last_part", "render_mode", "antialiasing", "tile_cnt", "stride_is_auto", "rendering_in_progress", "color_format", "inv_areas", "inv_area_joined", "inv_p", "inv_en_cnt", "sync_areas", "_static_buf1", "_static_buf2", "layer_head", "layer_init", "layer_deinit", "screens", "sys_layer", "top_layer", "act_scr", "bottom_layer", "prev_scr", "scr_to_load", "screen_cnt", "draw_prev_over_act", "del_prev", "driver_data", "user_data", "event_list", "rotation", "matrix_rotation", "theme", "refr_timer", "last_activity_time", "refreshed_area", "vsync_count", NULL}; +static const char *const py_lv_display_t_field_names[] = {"hor_res", "ver_res", "physical_hor_res", "physical_ver_res", "offset_x", "offset_y", "dpi", "buf_1", "buf_2", "buf_3", "buf_act", "flush_cb", "flush_wait_cb", "flushing", "flushing_last", "last_area", "last_part", "sync_cb", "sync_wait_cb", "syncing", "syncing_last", "sync_areas", "render_mode", "antialiasing", "tile_cnt", "stride_is_auto", "rendering_in_progress", "color_format", "inv_areas", "inv_area_joined", "inv_p", "inv_en_cnt", "_static_buf1", "_static_buf2", "layer_head", "screens", "sys_layer", "top_layer", "act_scr", "bottom_layer", "prev_scr", "scr_to_load", "screen_cnt", "draw_prev_over_act", "del_prev", "driver_data", "user_data", "event_list", "rotation", "matrix_rotation", "theme", "refr_timer", "last_activity_time", "refreshed_area", "vsync_count", NULL}; static PyObject *py_lv_display_t_dir(PyObject *self, PyObject *unused) { @@ -15728,6 +15754,11 @@ static int py_lv_display_t_setattro(PyObject *self, PyObject *name, PyObject *va if (strcmp(attr, "flushing_last") == 0) { data->flushing_last = (int)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "last_area") == 0) { data->last_area = (uint32_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "last_part") == 0) { data->last_part = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "sync_cb") == 0) { data->sync_cb = mp_lv_callback(value, lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "sync_wait_cb") == 0) { data->sync_wait_cb = mp_lv_callback(value, lv_display_t_sync_wait_cb_callback, "lv_display_t_sync_wait_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "syncing") == 0) { data->syncing = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "syncing_last") == 0) { data->syncing_last = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "sync_areas") == 0) { data->sync_areas = mp_write_lv_ll_t(value); result = 0; } if (strcmp(attr, "render_mode") == 0) { data->render_mode = (int)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "antialiasing") == 0) { data->antialiasing = (uint32_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "tile_cnt") == 0) { data->tile_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } @@ -15738,12 +15769,9 @@ static int py_lv_display_t_setattro(PyObject *self, PyObject *name, PyObject *va if (strcmp(attr, "inv_area_joined") == 0) { memcpy((void*)&data->inv_area_joined, mp_to_ptr(value), sizeof(uint8_t)*32); result = 0; } if (strcmp(attr, "inv_p") == 0) { data->inv_p = (uint32_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "inv_en_cnt") == 0) { data->inv_en_cnt = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "sync_areas") == 0) { data->sync_areas = mp_write_lv_ll_t(value); result = 0; } if (strcmp(attr, "_static_buf1") == 0) { data->_static_buf1 = mp_write_lv_draw_buf_t(value); result = 0; } if (strcmp(attr, "_static_buf2") == 0) { data->_static_buf2 = mp_write_lv_draw_buf_t(value); result = 0; } if (strcmp(attr, "layer_head") == 0) { data->layer_head = (void*)mp_write_ptr_lv_layer_t(value); result = 0; } - if (strcmp(attr, "layer_init") == 0) { data->layer_init = (void*)mp_lv_callback(value, lv_display_t_layer_init_callback, "lv_display_t_layer_init", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "layer_deinit") == 0) { data->layer_deinit = (void*)mp_lv_callback(value, lv_display_t_layer_deinit_callback, "lv_display_t_layer_deinit", &data->user_data, data, NULL, NULL); result = 0; } if (strcmp(attr, "screens") == 0) { data->screens = (void*)mp_to_ptr(value); result = 0; } if (strcmp(attr, "sys_layer") == 0) { data->sys_layer = (void*)mp_to_lv(value); result = 0; } if (strcmp(attr, "top_layer") == 0) { data->top_layer = (void*)mp_to_lv(value); result = 0; } @@ -17544,6 +17572,64 @@ static PyMethodDef py_lv_obj_get_style_clamped_height_def = { }; +/* + * lvgl extension definition for: + * bool lv_obj_is_style_any_width_content(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_style_any_width_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_style_any_width_content)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_style_any_width_content_def = { + "lv_obj_is_style_any_width_content", + (PyCFunction)py_lv_obj_is_style_any_width_content, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_style_any_height_content(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_style_any_height_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_style_any_height_content)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_style_any_height_content_def = { + "lv_obj_is_style_any_height_content", + (PyCFunction)py_lv_obj_is_style_any_height_content, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + /* * lvgl extension definition for: * bool lv_obj_is_width_min(lv_obj_t *obj) @@ -18923,21 +19009,21 @@ static PyMethodDef py_lv_obj_update_snap_def = { /* * lvgl extension definition for: - * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor, lv_area_t *ver) + * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) */ static PyObject *py_lv_obj_get_scrollbar_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *hor_py; PyObject *ver_py; - if (!PyArg_ParseTuple(py_args, "OO", &hor_py, &ver_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *hor_area_py; PyObject *ver_area_py; + if (!PyArg_ParseTuple(py_args, "OO", &hor_area_py, &ver_area_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_area_t *hor = mp_write_ptr_lv_area_t(hor_py); - lv_area_t *ver = mp_write_ptr_lv_area_t(ver_py); + lv_area_t *hor_area = mp_write_ptr_lv_area_t(hor_area_py); + lv_area_t *ver_area = mp_write_ptr_lv_area_t(ver_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_obj_get_scrollbar_area)(obj, hor, ver); + ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_obj_get_scrollbar_area)(obj, hor_area, ver_area); lvpy_unlock(); PyGILState_Release(gstate); @@ -19359,6 +19445,70 @@ static PyMethodDef py_lv_obj_refresh_style_def = { }; +/* + * lvgl extension definition for: + * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) + */ +static PyObject *py_lv_obj_set_style_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; long en_val; + if (!PyArg_ParseTuple(py_args, "OOl", &style_py, &selector_py, &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_obj_set_style_enabled)(obj, style, selector, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_style_enabled_def = { + "lv_obj_set_style_enabled", + (PyCFunction)py_lv_obj_set_style_enabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_get_style_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_get_style_enabled)(obj, style, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_get_style_enabled_def = { + "lv_obj_get_style_enabled", + (PyCFunction)py_lv_obj_get_style_enabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + /* * lvgl extension definition for: * void lv_obj_style_set_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool dis) @@ -19845,30 +19995,30 @@ static PyMethodDef py_lv_obj_fade_out_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_width)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_width_def = { - "lv_obj_set_style_width", - (PyCFunction)py_lv_obj_set_style_width, +static PyMethodDef py_lv_obj_get_style_width_def = { + "lv_obj_get_style_width", + (PyCFunction)py_lv_obj_get_style_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19876,30 +20026,30 @@ static PyMethodDef py_lv_obj_set_style_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_min_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_min_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_min_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_min_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_min_width)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_min_width_def = { - "lv_obj_set_style_min_width", - (PyCFunction)py_lv_obj_set_style_min_width, +static PyMethodDef py_lv_obj_get_style_min_width_def = { + "lv_obj_get_style_min_width", + (PyCFunction)py_lv_obj_get_style_min_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19907,30 +20057,30 @@ static PyMethodDef py_lv_obj_set_style_min_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_max_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_max_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_max_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_max_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_max_width)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_max_width_def = { - "lv_obj_set_style_max_width", - (PyCFunction)py_lv_obj_set_style_max_width, +static PyMethodDef py_lv_obj_get_style_max_width_def = { + "lv_obj_get_style_max_width", + (PyCFunction)py_lv_obj_get_style_max_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19938,30 +20088,30 @@ static PyMethodDef py_lv_obj_set_style_max_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_height(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_height)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_height)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_height_def = { - "lv_obj_set_style_height", - (PyCFunction)py_lv_obj_set_style_height, +static PyMethodDef py_lv_obj_get_style_height_def = { + "lv_obj_get_style_height", + (PyCFunction)py_lv_obj_get_style_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19969,30 +20119,30 @@ static PyMethodDef py_lv_obj_set_style_height_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_min_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_min_height(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_min_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_min_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_min_height)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_height)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_min_height_def = { - "lv_obj_set_style_min_height", - (PyCFunction)py_lv_obj_set_style_min_height, +static PyMethodDef py_lv_obj_get_style_min_height_def = { + "lv_obj_get_style_min_height", + (PyCFunction)py_lv_obj_get_style_min_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20000,30 +20150,30 @@ static PyMethodDef py_lv_obj_set_style_min_height_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_max_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_max_height(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_max_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_max_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_max_height)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_height)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_max_height_def = { - "lv_obj_set_style_max_height", - (PyCFunction)py_lv_obj_set_style_max_height, +static PyMethodDef py_lv_obj_get_style_max_height_def = { + "lv_obj_get_style_max_height", + (PyCFunction)py_lv_obj_get_style_max_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20031,30 +20181,30 @@ static PyMethodDef py_lv_obj_set_style_max_height_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_length(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_length(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_length)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_length)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_length_def = { - "lv_obj_set_style_length", - (PyCFunction)py_lv_obj_set_style_length, +static PyMethodDef py_lv_obj_get_style_length_def = { + "lv_obj_get_style_length", + (PyCFunction)py_lv_obj_get_style_length, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20062,30 +20212,30 @@ static PyMethodDef py_lv_obj_set_style_length_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_x)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_x_def = { - "lv_obj_set_style_x", - (PyCFunction)py_lv_obj_set_style_x, +static PyMethodDef py_lv_obj_get_style_x_def = { + "lv_obj_get_style_x", + (PyCFunction)py_lv_obj_get_style_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20093,30 +20243,30 @@ static PyMethodDef py_lv_obj_set_style_x_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_y)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_y_def = { - "lv_obj_set_style_y", - (PyCFunction)py_lv_obj_set_style_y, +static PyMethodDef py_lv_obj_get_style_y_def = { + "lv_obj_get_style_y", + (PyCFunction)py_lv_obj_get_style_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20124,30 +20274,30 @@ static PyMethodDef py_lv_obj_set_style_y_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_align(lv_obj_t *obj, lv_align_t value, lv_style_selector_t selector) + * lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_align_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_align_t, lv_style_selector_t))lv_obj_set_style_align)(obj, value, selector); + _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_align)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_align_def = { - "lv_obj_set_style_align", - (PyCFunction)py_lv_obj_set_style_align, +static PyMethodDef py_lv_obj_get_style_align_def = { + "lv_obj_get_style_align", + (PyCFunction)py_lv_obj_get_style_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20155,30 +20305,30 @@ static PyMethodDef py_lv_obj_set_style_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_width)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_width_def = { - "lv_obj_set_style_transform_width", - (PyCFunction)py_lv_obj_set_style_transform_width, +static PyMethodDef py_lv_obj_get_style_transform_width_def = { + "lv_obj_get_style_transform_width", + (PyCFunction)py_lv_obj_get_style_transform_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20186,30 +20336,30 @@ static PyMethodDef py_lv_obj_set_style_transform_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_height(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_height)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_height)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_height_def = { - "lv_obj_set_style_transform_height", - (PyCFunction)py_lv_obj_set_style_transform_height, +static PyMethodDef py_lv_obj_get_style_transform_height_def = { + "lv_obj_get_style_transform_height", + (PyCFunction)py_lv_obj_get_style_transform_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20217,30 +20367,30 @@ static PyMethodDef py_lv_obj_set_style_transform_height_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_translate_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_translate_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_translate_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_translate_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_translate_x)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_translate_x_def = { - "lv_obj_set_style_translate_x", - (PyCFunction)py_lv_obj_set_style_translate_x, +static PyMethodDef py_lv_obj_get_style_translate_x_def = { + "lv_obj_get_style_translate_x", + (PyCFunction)py_lv_obj_get_style_translate_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20248,30 +20398,30 @@ static PyMethodDef py_lv_obj_set_style_translate_x_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_translate_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_translate_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_translate_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_translate_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_translate_y)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_translate_y_def = { - "lv_obj_set_style_translate_y", - (PyCFunction)py_lv_obj_set_style_translate_y, +static PyMethodDef py_lv_obj_get_style_translate_y_def = { + "lv_obj_get_style_translate_y", + (PyCFunction)py_lv_obj_get_style_translate_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20279,30 +20429,30 @@ static PyMethodDef py_lv_obj_set_style_translate_y_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_translate_radial(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_translate_radial(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_translate_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_translate_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_translate_radial)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_radial)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_translate_radial_def = { - "lv_obj_set_style_translate_radial", - (PyCFunction)py_lv_obj_set_style_translate_radial, +static PyMethodDef py_lv_obj_get_style_translate_radial_def = { + "lv_obj_get_style_translate_radial", + (PyCFunction)py_lv_obj_get_style_translate_radial, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20310,30 +20460,30 @@ static PyMethodDef py_lv_obj_set_style_translate_radial_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_scale_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_scale_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_scale_x)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_scale_x_def = { - "lv_obj_set_style_transform_scale_x", - (PyCFunction)py_lv_obj_set_style_transform_scale_x, +static PyMethodDef py_lv_obj_get_style_transform_scale_x_def = { + "lv_obj_get_style_transform_scale_x", + (PyCFunction)py_lv_obj_get_style_transform_scale_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20341,30 +20491,30 @@ static PyMethodDef py_lv_obj_set_style_transform_scale_x_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_scale_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_scale_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_scale_y)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_scale_y_def = { - "lv_obj_set_style_transform_scale_y", - (PyCFunction)py_lv_obj_set_style_transform_scale_y, +static PyMethodDef py_lv_obj_get_style_transform_scale_y_def = { + "lv_obj_get_style_transform_scale_y", + (PyCFunction)py_lv_obj_get_style_transform_scale_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20372,30 +20522,30 @@ static PyMethodDef py_lv_obj_set_style_transform_scale_y_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_rotation(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_rotation(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_rotation)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_rotation)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_rotation_def = { - "lv_obj_set_style_transform_rotation", - (PyCFunction)py_lv_obj_set_style_transform_rotation, +static PyMethodDef py_lv_obj_get_style_transform_rotation_def = { + "lv_obj_get_style_transform_rotation", + (PyCFunction)py_lv_obj_get_style_transform_rotation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20403,30 +20553,30 @@ static PyMethodDef py_lv_obj_set_style_transform_rotation_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_pivot_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_pivot_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_pivot_x)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_pivot_x_def = { - "lv_obj_set_style_transform_pivot_x", - (PyCFunction)py_lv_obj_set_style_transform_pivot_x, +static PyMethodDef py_lv_obj_get_style_transform_pivot_x_def = { + "lv_obj_get_style_transform_pivot_x", + (PyCFunction)py_lv_obj_get_style_transform_pivot_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20434,30 +20584,30 @@ static PyMethodDef py_lv_obj_set_style_transform_pivot_x_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_pivot_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_pivot_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_pivot_y)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_pivot_y_def = { - "lv_obj_set_style_transform_pivot_y", - (PyCFunction)py_lv_obj_set_style_transform_pivot_y, +static PyMethodDef py_lv_obj_get_style_transform_pivot_y_def = { + "lv_obj_get_style_transform_pivot_y", + (PyCFunction)py_lv_obj_get_style_transform_pivot_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20465,30 +20615,30 @@ static PyMethodDef py_lv_obj_set_style_transform_pivot_y_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_skew_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_skew_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_skew_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_skew_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_skew_x)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_skew_x_def = { - "lv_obj_set_style_transform_skew_x", - (PyCFunction)py_lv_obj_set_style_transform_skew_x, +static PyMethodDef py_lv_obj_get_style_transform_skew_x_def = { + "lv_obj_get_style_transform_skew_x", + (PyCFunction)py_lv_obj_get_style_transform_skew_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20496,30 +20646,30 @@ static PyMethodDef py_lv_obj_set_style_transform_skew_x_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transform_skew_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_transform_skew_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transform_skew_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_skew_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_skew_y)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_transform_skew_y_def = { - "lv_obj_set_style_transform_skew_y", - (PyCFunction)py_lv_obj_set_style_transform_skew_y, +static PyMethodDef py_lv_obj_get_style_transform_skew_y_def = { + "lv_obj_get_style_transform_skew_y", + (PyCFunction)py_lv_obj_get_style_transform_skew_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20527,30 +20677,30 @@ static PyMethodDef py_lv_obj_set_style_transform_skew_y_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_pad_top(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_pad_top(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_top)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_top)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_top_def = { - "lv_obj_set_style_pad_top", - (PyCFunction)py_lv_obj_set_style_pad_top, +static PyMethodDef py_lv_obj_get_style_pad_top_def = { + "lv_obj_get_style_pad_top", + (PyCFunction)py_lv_obj_get_style_pad_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20558,30 +20708,30 @@ static PyMethodDef py_lv_obj_set_style_pad_top_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_pad_bottom(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_pad_bottom(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_bottom)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_bottom)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_bottom_def = { - "lv_obj_set_style_pad_bottom", - (PyCFunction)py_lv_obj_set_style_pad_bottom, +static PyMethodDef py_lv_obj_get_style_pad_bottom_def = { + "lv_obj_get_style_pad_bottom", + (PyCFunction)py_lv_obj_get_style_pad_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20589,30 +20739,30 @@ static PyMethodDef py_lv_obj_set_style_pad_bottom_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_pad_left(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_pad_left(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_left)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_left)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_left_def = { - "lv_obj_set_style_pad_left", - (PyCFunction)py_lv_obj_set_style_pad_left, +static PyMethodDef py_lv_obj_get_style_pad_left_def = { + "lv_obj_get_style_pad_left", + (PyCFunction)py_lv_obj_get_style_pad_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20620,30 +20770,30 @@ static PyMethodDef py_lv_obj_set_style_pad_left_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_pad_right(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_pad_right(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_right)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_right)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_right_def = { - "lv_obj_set_style_pad_right", - (PyCFunction)py_lv_obj_set_style_pad_right, +static PyMethodDef py_lv_obj_get_style_pad_right_def = { + "lv_obj_get_style_pad_right", + (PyCFunction)py_lv_obj_get_style_pad_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20651,30 +20801,30 @@ static PyMethodDef py_lv_obj_set_style_pad_right_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_pad_row(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_pad_row(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_row(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_row(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_row)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_row)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_row_def = { - "lv_obj_set_style_pad_row", - (PyCFunction)py_lv_obj_set_style_pad_row, +static PyMethodDef py_lv_obj_get_style_pad_row_def = { + "lv_obj_get_style_pad_row", + (PyCFunction)py_lv_obj_get_style_pad_row, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20682,30 +20832,30 @@ static PyMethodDef py_lv_obj_set_style_pad_row_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_pad_column(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_pad_column(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_column(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_column(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_column)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_column)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_column_def = { - "lv_obj_set_style_pad_column", - (PyCFunction)py_lv_obj_set_style_pad_column, +static PyMethodDef py_lv_obj_get_style_pad_column_def = { + "lv_obj_get_style_pad_column", + (PyCFunction)py_lv_obj_get_style_pad_column, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20713,30 +20863,30 @@ static PyMethodDef py_lv_obj_set_style_pad_column_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_pad_radial(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_pad_radial(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_pad_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_radial)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_radial)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_pad_radial_def = { - "lv_obj_set_style_pad_radial", - (PyCFunction)py_lv_obj_set_style_pad_radial, +static PyMethodDef py_lv_obj_get_style_pad_radial_def = { + "lv_obj_get_style_pad_radial", + (PyCFunction)py_lv_obj_get_style_pad_radial, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20744,30 +20894,30 @@ static PyMethodDef py_lv_obj_set_style_pad_radial_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_margin_top(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_margin_top(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_margin_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_top)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_top)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_margin_top_def = { - "lv_obj_set_style_margin_top", - (PyCFunction)py_lv_obj_set_style_margin_top, +static PyMethodDef py_lv_obj_get_style_margin_top_def = { + "lv_obj_get_style_margin_top", + (PyCFunction)py_lv_obj_get_style_margin_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20775,30 +20925,30 @@ static PyMethodDef py_lv_obj_set_style_margin_top_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_margin_bottom(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_margin_bottom(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_margin_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_bottom)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_bottom)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_margin_bottom_def = { - "lv_obj_set_style_margin_bottom", - (PyCFunction)py_lv_obj_set_style_margin_bottom, +static PyMethodDef py_lv_obj_get_style_margin_bottom_def = { + "lv_obj_get_style_margin_bottom", + (PyCFunction)py_lv_obj_get_style_margin_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20806,30 +20956,30 @@ static PyMethodDef py_lv_obj_set_style_margin_bottom_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_margin_left(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_margin_left(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_margin_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_left)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_left)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_margin_left_def = { - "lv_obj_set_style_margin_left", - (PyCFunction)py_lv_obj_set_style_margin_left, +static PyMethodDef py_lv_obj_get_style_margin_left_def = { + "lv_obj_get_style_margin_left", + (PyCFunction)py_lv_obj_get_style_margin_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20837,30 +20987,30 @@ static PyMethodDef py_lv_obj_set_style_margin_left_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_margin_right(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_margin_right(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_margin_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_right)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_right)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_margin_right_def = { - "lv_obj_set_style_margin_right", - (PyCFunction)py_lv_obj_set_style_margin_right, +static PyMethodDef py_lv_obj_get_style_margin_right_def = { + "lv_obj_get_style_margin_right", + (PyCFunction)py_lv_obj_get_style_margin_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20868,30 +21018,30 @@ static PyMethodDef py_lv_obj_set_style_margin_right_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_bg_color)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_bg_color_def = { - "lv_obj_set_style_bg_color", - (PyCFunction)py_lv_obj_set_style_bg_color, +static PyMethodDef py_lv_obj_get_style_bg_color_def = { + "lv_obj_get_style_bg_color", + (PyCFunction)py_lv_obj_get_style_bg_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20899,30 +21049,30 @@ static PyMethodDef py_lv_obj_set_style_bg_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_bg_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_opa)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_bg_opa_def = { - "lv_obj_set_style_bg_opa", - (PyCFunction)py_lv_obj_set_style_bg_opa, +static PyMethodDef py_lv_obj_get_style_bg_color_filtered_def = { + "lv_obj_get_style_bg_color_filtered", + (PyCFunction)py_lv_obj_get_style_bg_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20930,30 +21080,30 @@ static PyMethodDef py_lv_obj_set_style_bg_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_grad_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_grad_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_bg_grad_color)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_bg_grad_color_def = { - "lv_obj_set_style_bg_grad_color", - (PyCFunction)py_lv_obj_set_style_bg_grad_color, +static PyMethodDef py_lv_obj_get_style_bg_opa_def = { + "lv_obj_get_style_bg_opa", + (PyCFunction)py_lv_obj_get_style_bg_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20961,30 +21111,30 @@ static PyMethodDef py_lv_obj_set_style_bg_grad_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_grad_dir(lv_obj_t *obj, lv_grad_dir_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_grad_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_grad_dir_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grad_dir_t, lv_style_selector_t))lv_obj_set_style_bg_grad_dir)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_bg_grad_dir_def = { - "lv_obj_set_style_bg_grad_dir", - (PyCFunction)py_lv_obj_set_style_bg_grad_dir, +static PyMethodDef py_lv_obj_get_style_bg_grad_color_def = { + "lv_obj_get_style_bg_grad_color", + (PyCFunction)py_lv_obj_get_style_bg_grad_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20992,30 +21142,30 @@ static PyMethodDef py_lv_obj_set_style_bg_grad_dir_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_main_stop(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_main_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_bg_main_stop)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_bg_main_stop_def = { - "lv_obj_set_style_bg_main_stop", - (PyCFunction)py_lv_obj_set_style_bg_main_stop, +static PyMethodDef py_lv_obj_get_style_bg_grad_color_filtered_def = { + "lv_obj_get_style_bg_grad_color_filtered", + (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21023,30 +21173,30 @@ static PyMethodDef py_lv_obj_set_style_bg_main_stop_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_grad_stop(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_grad_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_grad_dir_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_bg_grad_stop)(obj, value, selector); + _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_dir)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_bg_grad_stop_def = { - "lv_obj_set_style_bg_grad_stop", - (PyCFunction)py_lv_obj_set_style_bg_grad_stop, +static PyMethodDef py_lv_obj_get_style_bg_grad_dir_def = { + "lv_obj_get_style_bg_grad_dir", + (PyCFunction)py_lv_obj_get_style_bg_grad_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21054,30 +21204,30 @@ static PyMethodDef py_lv_obj_set_style_bg_grad_stop_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_main_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_bg_main_stop(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_main_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_main_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_main_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_stop)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_bg_main_opa_def = { - "lv_obj_set_style_bg_main_opa", - (PyCFunction)py_lv_obj_set_style_bg_main_opa, +static PyMethodDef py_lv_obj_get_style_bg_main_stop_def = { + "lv_obj_get_style_bg_main_stop", + (PyCFunction)py_lv_obj_get_style_bg_main_stop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21085,30 +21235,30 @@ static PyMethodDef py_lv_obj_set_style_bg_main_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_grad_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_bg_grad_stop(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_grad_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_grad_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_stop)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_bg_grad_opa_def = { - "lv_obj_set_style_bg_grad_opa", - (PyCFunction)py_lv_obj_set_style_bg_grad_opa, +static PyMethodDef py_lv_obj_get_style_bg_grad_stop_def = { + "lv_obj_get_style_bg_grad_stop", + (PyCFunction)py_lv_obj_get_style_bg_grad_stop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21116,30 +21266,30 @@ static PyMethodDef py_lv_obj_set_style_bg_grad_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_grad(lv_obj_t *obj, const lv_grad_dsc_t *value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_bg_main_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_grad(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_main_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_grad_dsc_t *value = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_grad_dsc_t *, lv_style_selector_t))lv_obj_set_style_bg_grad)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_bg_grad_def = { - "lv_obj_set_style_bg_grad", - (PyCFunction)py_lv_obj_set_style_bg_grad, +static PyMethodDef py_lv_obj_get_style_bg_main_opa_def = { + "lv_obj_get_style_bg_main_opa", + (PyCFunction)py_lv_obj_get_style_bg_main_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21147,30 +21297,30 @@ static PyMethodDef py_lv_obj_set_style_bg_grad_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_image_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_bg_grad_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const void *value = (const void *)mp_to_ptr(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_obj_set_style_bg_image_src)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_bg_image_src_def = { - "lv_obj_set_style_bg_image_src", - (PyCFunction)py_lv_obj_set_style_bg_image_src, +static PyMethodDef py_lv_obj_get_style_bg_grad_opa_def = { + "lv_obj_get_style_bg_grad_opa", + (PyCFunction)py_lv_obj_get_style_bg_grad_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21178,30 +21328,30 @@ static PyMethodDef py_lv_obj_set_style_bg_image_src_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_image_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * const lv_grad_dsc_t *lv_obj_get_style_bg_grad(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_grad_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_image_opa)(obj, value, selector); + _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_grad_dsc_t((void*)_res); } -static PyMethodDef py_lv_obj_set_style_bg_image_opa_def = { - "lv_obj_set_style_bg_image_opa", - (PyCFunction)py_lv_obj_set_style_bg_image_opa, +static PyMethodDef py_lv_obj_get_style_bg_grad_def = { + "lv_obj_get_style_bg_grad", + (PyCFunction)py_lv_obj_get_style_bg_grad, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21209,30 +21359,30 @@ static PyMethodDef py_lv_obj_set_style_bg_image_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_image_recolor(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * const void *lv_obj_get_style_bg_image_src(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_bg_image_recolor)(obj, value, selector); + _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_src)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_set_style_bg_image_recolor_def = { - "lv_obj_set_style_bg_image_recolor", - (PyCFunction)py_lv_obj_set_style_bg_image_recolor, +static PyMethodDef py_lv_obj_get_style_bg_image_src_def = { + "lv_obj_get_style_bg_image_src", + (PyCFunction)py_lv_obj_get_style_bg_image_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21240,30 +21390,30 @@ static PyMethodDef py_lv_obj_set_style_bg_image_recolor_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_image_recolor_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_bg_image_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_image_recolor_opa)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_bg_image_recolor_opa_def = { - "lv_obj_set_style_bg_image_recolor_opa", - (PyCFunction)py_lv_obj_set_style_bg_image_recolor_opa, +static PyMethodDef py_lv_obj_get_style_bg_image_opa_def = { + "lv_obj_get_style_bg_image_opa", + (PyCFunction)py_lv_obj_get_style_bg_image_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21271,30 +21421,30 @@ static PyMethodDef py_lv_obj_set_style_bg_image_recolor_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bg_image_tiled(lv_obj_t *obj, bool value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_bg_image_recolor(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bg_image_tiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool value = (value_val != 0); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_bg_image_tiled)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_bg_image_tiled_def = { - "lv_obj_set_style_bg_image_tiled", - (PyCFunction)py_lv_obj_set_style_bg_image_tiled, +static PyMethodDef py_lv_obj_get_style_bg_image_recolor_def = { + "lv_obj_get_style_bg_image_recolor", + (PyCFunction)py_lv_obj_get_style_bg_image_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21302,30 +21452,30 @@ static PyMethodDef py_lv_obj_set_style_bg_image_tiled_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_border_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_bg_image_recolor_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_border_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_recolor_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_border_color)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_border_color_def = { - "lv_obj_set_style_border_color", - (PyCFunction)py_lv_obj_set_style_border_color, +static PyMethodDef py_lv_obj_get_style_bg_image_recolor_filtered_def = { + "lv_obj_get_style_bg_image_recolor_filtered", + (PyCFunction)py_lv_obj_get_style_bg_image_recolor_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21333,30 +21483,30 @@ static PyMethodDef py_lv_obj_set_style_border_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_border_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_bg_image_recolor_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_border_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_border_opa)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_border_opa_def = { - "lv_obj_set_style_border_opa", - (PyCFunction)py_lv_obj_set_style_border_opa, +static PyMethodDef py_lv_obj_get_style_bg_image_recolor_opa_def = { + "lv_obj_get_style_bg_image_recolor_opa", + (PyCFunction)py_lv_obj_get_style_bg_image_recolor_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21364,30 +21514,30 @@ static PyMethodDef py_lv_obj_set_style_border_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_border_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * bool lv_obj_get_style_bg_image_tiled(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_border_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_image_tiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_border_width)(obj, value, selector); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_tiled)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_set_style_border_width_def = { - "lv_obj_set_style_border_width", - (PyCFunction)py_lv_obj_set_style_border_width, +static PyMethodDef py_lv_obj_get_style_bg_image_tiled_def = { + "lv_obj_get_style_bg_image_tiled", + (PyCFunction)py_lv_obj_get_style_bg_image_tiled, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21395,30 +21545,30 @@ static PyMethodDef py_lv_obj_set_style_border_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_border_side(lv_obj_t *obj, lv_border_side_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_border_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_border_side(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_border_side_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_border_side_t, lv_style_selector_t))lv_obj_set_style_border_side)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_border_side_def = { - "lv_obj_set_style_border_side", - (PyCFunction)py_lv_obj_set_style_border_side, +static PyMethodDef py_lv_obj_get_style_border_color_def = { + "lv_obj_get_style_border_color", + (PyCFunction)py_lv_obj_get_style_border_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21426,30 +21576,30 @@ static PyMethodDef py_lv_obj_set_style_border_side_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_border_post(lv_obj_t *obj, bool value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_border_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_border_post(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool value = (value_val != 0); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_border_post)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_border_post_def = { - "lv_obj_set_style_border_post", - (PyCFunction)py_lv_obj_set_style_border_post, +static PyMethodDef py_lv_obj_get_style_border_color_filtered_def = { + "lv_obj_get_style_border_color_filtered", + (PyCFunction)py_lv_obj_get_style_border_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21457,30 +21607,30 @@ static PyMethodDef py_lv_obj_set_style_border_post_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_outline_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_border_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_outline_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_outline_width)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_outline_width_def = { - "lv_obj_set_style_outline_width", - (PyCFunction)py_lv_obj_set_style_outline_width, +static PyMethodDef py_lv_obj_get_style_border_opa_def = { + "lv_obj_get_style_border_opa", + (PyCFunction)py_lv_obj_get_style_border_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21488,30 +21638,30 @@ static PyMethodDef py_lv_obj_set_style_outline_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_outline_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_border_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_outline_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_outline_color)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_outline_color_def = { - "lv_obj_set_style_outline_color", - (PyCFunction)py_lv_obj_set_style_outline_color, +static PyMethodDef py_lv_obj_get_style_border_width_def = { + "lv_obj_get_style_border_width", + (PyCFunction)py_lv_obj_get_style_border_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21519,30 +21669,30 @@ static PyMethodDef py_lv_obj_set_style_outline_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_outline_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_outline_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_side(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_border_side_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_outline_opa)(obj, value, selector); + _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_side)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_outline_opa_def = { - "lv_obj_set_style_outline_opa", - (PyCFunction)py_lv_obj_set_style_outline_opa, +static PyMethodDef py_lv_obj_get_style_border_side_def = { + "lv_obj_get_style_border_side", + (PyCFunction)py_lv_obj_get_style_border_side, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21550,30 +21700,30 @@ static PyMethodDef py_lv_obj_set_style_outline_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_outline_pad(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * bool lv_obj_get_style_border_post(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_outline_pad(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_border_post(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_outline_pad)(obj, value, selector); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_post)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_set_style_outline_pad_def = { - "lv_obj_set_style_outline_pad", - (PyCFunction)py_lv_obj_set_style_outline_pad, +static PyMethodDef py_lv_obj_get_style_border_post_def = { + "lv_obj_get_style_border_post", + (PyCFunction)py_lv_obj_get_style_border_post, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21581,30 +21731,30 @@ static PyMethodDef py_lv_obj_set_style_outline_pad_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_shadow_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_outline_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_shadow_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_width)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_shadow_width_def = { - "lv_obj_set_style_shadow_width", - (PyCFunction)py_lv_obj_set_style_shadow_width, +static PyMethodDef py_lv_obj_get_style_outline_width_def = { + "lv_obj_get_style_outline_width", + (PyCFunction)py_lv_obj_get_style_outline_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21612,30 +21762,30 @@ static PyMethodDef py_lv_obj_set_style_shadow_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_shadow_offset_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_outline_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_offset_x)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_shadow_offset_x_def = { - "lv_obj_set_style_shadow_offset_x", - (PyCFunction)py_lv_obj_set_style_shadow_offset_x, +static PyMethodDef py_lv_obj_get_style_outline_color_def = { + "lv_obj_get_style_outline_color", + (PyCFunction)py_lv_obj_get_style_outline_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21643,30 +21793,30 @@ static PyMethodDef py_lv_obj_set_style_shadow_offset_x_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_shadow_offset_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_outline_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_offset_y)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_shadow_offset_y_def = { - "lv_obj_set_style_shadow_offset_y", - (PyCFunction)py_lv_obj_set_style_shadow_offset_y, +static PyMethodDef py_lv_obj_get_style_outline_color_filtered_def = { + "lv_obj_get_style_outline_color_filtered", + (PyCFunction)py_lv_obj_get_style_outline_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21674,30 +21824,30 @@ static PyMethodDef py_lv_obj_set_style_shadow_offset_y_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_shadow_spread(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_outline_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_shadow_spread(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_spread)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_shadow_spread_def = { - "lv_obj_set_style_shadow_spread", - (PyCFunction)py_lv_obj_set_style_shadow_spread, +static PyMethodDef py_lv_obj_get_style_outline_opa_def = { + "lv_obj_get_style_outline_opa", + (PyCFunction)py_lv_obj_get_style_outline_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21705,30 +21855,30 @@ static PyMethodDef py_lv_obj_set_style_shadow_spread_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_shadow_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_outline_pad(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_outline_pad(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_shadow_color)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_pad)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_shadow_color_def = { - "lv_obj_set_style_shadow_color", - (PyCFunction)py_lv_obj_set_style_shadow_color, +static PyMethodDef py_lv_obj_get_style_outline_pad_def = { + "lv_obj_get_style_outline_pad", + (PyCFunction)py_lv_obj_get_style_outline_pad, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21736,30 +21886,30 @@ static PyMethodDef py_lv_obj_set_style_shadow_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_shadow_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_shadow_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_shadow_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_shadow_opa_def = { - "lv_obj_set_style_shadow_opa", - (PyCFunction)py_lv_obj_set_style_shadow_opa, +static PyMethodDef py_lv_obj_get_style_shadow_width_def = { + "lv_obj_get_style_shadow_width", + (PyCFunction)py_lv_obj_get_style_shadow_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21767,30 +21917,30 @@ static PyMethodDef py_lv_obj_set_style_shadow_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_image_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_shadow_offset_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_image_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_image_opa_def = { - "lv_obj_set_style_image_opa", - (PyCFunction)py_lv_obj_set_style_image_opa, +static PyMethodDef py_lv_obj_get_style_shadow_offset_x_def = { + "lv_obj_get_style_shadow_offset_x", + (PyCFunction)py_lv_obj_get_style_shadow_offset_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21798,30 +21948,30 @@ static PyMethodDef py_lv_obj_set_style_image_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_image_recolor(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_shadow_offset_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_image_recolor)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_image_recolor_def = { - "lv_obj_set_style_image_recolor", - (PyCFunction)py_lv_obj_set_style_image_recolor, +static PyMethodDef py_lv_obj_get_style_shadow_offset_y_def = { + "lv_obj_get_style_shadow_offset_y", + (PyCFunction)py_lv_obj_get_style_shadow_offset_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21829,30 +21979,30 @@ static PyMethodDef py_lv_obj_set_style_image_recolor_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_image_recolor_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_shadow_spread(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_spread(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_image_recolor_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_spread)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_image_recolor_opa_def = { - "lv_obj_set_style_image_recolor_opa", - (PyCFunction)py_lv_obj_set_style_image_recolor_opa, +static PyMethodDef py_lv_obj_get_style_shadow_spread_def = { + "lv_obj_get_style_shadow_spread", + (PyCFunction)py_lv_obj_get_style_shadow_spread, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21860,30 +22010,30 @@ static PyMethodDef py_lv_obj_set_style_image_recolor_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_image_colorkey(lv_obj_t *obj, const lv_image_colorkey_t *value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_shadow_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_image_colorkey(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_image_colorkey_t *value = (const lv_image_colorkey_t *)mp_write_ptr_lv_image_colorkey_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_image_colorkey_t *, lv_style_selector_t))lv_obj_set_style_image_colorkey)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_image_colorkey_def = { - "lv_obj_set_style_image_colorkey", - (PyCFunction)py_lv_obj_set_style_image_colorkey, +static PyMethodDef py_lv_obj_get_style_shadow_color_def = { + "lv_obj_get_style_shadow_color", + (PyCFunction)py_lv_obj_get_style_shadow_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21891,30 +22041,30 @@ static PyMethodDef py_lv_obj_set_style_image_colorkey_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_line_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_shadow_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_line_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_line_width)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_line_width_def = { - "lv_obj_set_style_line_width", - (PyCFunction)py_lv_obj_set_style_line_width, +static PyMethodDef py_lv_obj_get_style_shadow_color_filtered_def = { + "lv_obj_get_style_shadow_color_filtered", + (PyCFunction)py_lv_obj_get_style_shadow_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21922,30 +22072,30 @@ static PyMethodDef py_lv_obj_set_style_line_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_line_dash_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_shadow_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_line_dash_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_line_dash_width)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_line_dash_width_def = { - "lv_obj_set_style_line_dash_width", - (PyCFunction)py_lv_obj_set_style_line_dash_width, +static PyMethodDef py_lv_obj_get_style_shadow_opa_def = { + "lv_obj_get_style_shadow_opa", + (PyCFunction)py_lv_obj_get_style_shadow_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21953,30 +22103,30 @@ static PyMethodDef py_lv_obj_set_style_line_dash_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_line_dash_gap(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_image_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_line_dash_gap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_line_dash_gap)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_line_dash_gap_def = { - "lv_obj_set_style_line_dash_gap", - (PyCFunction)py_lv_obj_set_style_line_dash_gap, +static PyMethodDef py_lv_obj_get_style_image_opa_def = { + "lv_obj_get_style_image_opa", + (PyCFunction)py_lv_obj_get_style_image_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -21984,30 +22134,30 @@ static PyMethodDef py_lv_obj_set_style_line_dash_gap_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_line_rounded(lv_obj_t *obj, bool value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_image_recolor(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_line_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool value = (value_val != 0); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_line_rounded)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_line_rounded_def = { - "lv_obj_set_style_line_rounded", - (PyCFunction)py_lv_obj_set_style_line_rounded, +static PyMethodDef py_lv_obj_get_style_image_recolor_def = { + "lv_obj_get_style_image_recolor", + (PyCFunction)py_lv_obj_get_style_image_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22015,30 +22165,30 @@ static PyMethodDef py_lv_obj_set_style_line_rounded_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_line_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_image_recolor_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_line_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_recolor_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_line_color)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_line_color_def = { - "lv_obj_set_style_line_color", - (PyCFunction)py_lv_obj_set_style_line_color, +static PyMethodDef py_lv_obj_get_style_image_recolor_filtered_def = { + "lv_obj_get_style_image_recolor_filtered", + (PyCFunction)py_lv_obj_get_style_image_recolor_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22046,30 +22196,30 @@ static PyMethodDef py_lv_obj_set_style_line_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_line_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_image_recolor_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_line_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_line_opa)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_line_opa_def = { - "lv_obj_set_style_line_opa", - (PyCFunction)py_lv_obj_set_style_line_opa, +static PyMethodDef py_lv_obj_get_style_image_recolor_opa_def = { + "lv_obj_get_style_image_recolor_opa", + (PyCFunction)py_lv_obj_get_style_image_recolor_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22077,30 +22227,30 @@ static PyMethodDef py_lv_obj_set_style_line_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_arc_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * const lv_image_colorkey_t *lv_obj_get_style_image_colorkey(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_arc_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_image_colorkey(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_image_colorkey_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_arc_width)(obj, value, selector); + _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_colorkey)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_image_colorkey_t((void*)_res); } -static PyMethodDef py_lv_obj_set_style_arc_width_def = { - "lv_obj_set_style_arc_width", - (PyCFunction)py_lv_obj_set_style_arc_width, +static PyMethodDef py_lv_obj_get_style_image_colorkey_def = { + "lv_obj_get_style_image_colorkey", + (PyCFunction)py_lv_obj_get_style_image_colorkey, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22108,30 +22258,30 @@ static PyMethodDef py_lv_obj_set_style_arc_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_arc_rounded(lv_obj_t *obj, bool value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_line_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_arc_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool value = (value_val != 0); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_arc_rounded)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_arc_rounded_def = { - "lv_obj_set_style_arc_rounded", - (PyCFunction)py_lv_obj_set_style_arc_rounded, +static PyMethodDef py_lv_obj_get_style_line_width_def = { + "lv_obj_get_style_line_width", + (PyCFunction)py_lv_obj_get_style_line_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22139,30 +22289,30 @@ static PyMethodDef py_lv_obj_set_style_arc_rounded_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_arc_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_line_dash_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_arc_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_dash_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_arc_color)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_arc_color_def = { - "lv_obj_set_style_arc_color", - (PyCFunction)py_lv_obj_set_style_arc_color, +static PyMethodDef py_lv_obj_get_style_line_dash_width_def = { + "lv_obj_get_style_line_dash_width", + (PyCFunction)py_lv_obj_get_style_line_dash_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22170,30 +22320,30 @@ static PyMethodDef py_lv_obj_set_style_arc_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_arc_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_line_dash_gap(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_arc_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_dash_gap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_arc_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_gap)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_arc_opa_def = { - "lv_obj_set_style_arc_opa", - (PyCFunction)py_lv_obj_set_style_arc_opa, +static PyMethodDef py_lv_obj_get_style_line_dash_gap_def = { + "lv_obj_get_style_line_dash_gap", + (PyCFunction)py_lv_obj_get_style_line_dash_gap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22201,30 +22351,30 @@ static PyMethodDef py_lv_obj_set_style_arc_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_arc_image_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) + * bool lv_obj_get_style_line_rounded(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_arc_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const void *value = (const void *)mp_to_ptr(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_obj_set_style_arc_image_src)(obj, value, selector); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_rounded)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_set_style_arc_image_src_def = { - "lv_obj_set_style_arc_image_src", - (PyCFunction)py_lv_obj_set_style_arc_image_src, +static PyMethodDef py_lv_obj_get_style_line_rounded_def = { + "lv_obj_get_style_line_rounded", + (PyCFunction)py_lv_obj_get_style_line_rounded, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22232,30 +22382,30 @@ static PyMethodDef py_lv_obj_set_style_arc_image_src_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_line_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_text_color)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_text_color_def = { - "lv_obj_set_style_text_color", - (PyCFunction)py_lv_obj_set_style_text_color, +static PyMethodDef py_lv_obj_get_style_line_color_def = { + "lv_obj_get_style_line_color", + (PyCFunction)py_lv_obj_get_style_line_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22263,30 +22413,30 @@ static PyMethodDef py_lv_obj_set_style_text_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_line_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_text_opa)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_text_opa_def = { - "lv_obj_set_style_text_opa", - (PyCFunction)py_lv_obj_set_style_text_opa, +static PyMethodDef py_lv_obj_get_style_line_color_filtered_def = { + "lv_obj_get_style_line_color_filtered", + (PyCFunction)py_lv_obj_get_style_line_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22294,30 +22444,30 @@ static PyMethodDef py_lv_obj_set_style_text_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_font(lv_obj_t *obj, const lv_font_t *value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_line_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_font(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_line_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_font_t *value = (const lv_font_t *)mp_write_ptr_lv_font_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_font_t *, lv_style_selector_t))lv_obj_set_style_text_font)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_text_font_def = { - "lv_obj_set_style_text_font", - (PyCFunction)py_lv_obj_set_style_text_font, +static PyMethodDef py_lv_obj_get_style_line_opa_def = { + "lv_obj_get_style_line_opa", + (PyCFunction)py_lv_obj_get_style_line_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22325,30 +22475,30 @@ static PyMethodDef py_lv_obj_set_style_text_font_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_letter_space(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_arc_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_letter_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_text_letter_space)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_text_letter_space_def = { - "lv_obj_set_style_text_letter_space", - (PyCFunction)py_lv_obj_set_style_text_letter_space, +static PyMethodDef py_lv_obj_get_style_arc_width_def = { + "lv_obj_get_style_arc_width", + (PyCFunction)py_lv_obj_get_style_arc_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22356,30 +22506,30 @@ static PyMethodDef py_lv_obj_set_style_text_letter_space_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_line_space(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * bool lv_obj_get_style_arc_rounded(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_line_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_text_line_space)(obj, value, selector); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_rounded)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_set_style_text_line_space_def = { - "lv_obj_set_style_text_line_space", - (PyCFunction)py_lv_obj_set_style_text_line_space, +static PyMethodDef py_lv_obj_get_style_arc_rounded_def = { + "lv_obj_get_style_arc_rounded", + (PyCFunction)py_lv_obj_get_style_arc_rounded, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22387,30 +22537,30 @@ static PyMethodDef py_lv_obj_set_style_text_line_space_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_decor(lv_obj_t *obj, lv_text_decor_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_arc_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_decor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_text_decor_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_text_decor_t, lv_style_selector_t))lv_obj_set_style_text_decor)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_text_decor_def = { - "lv_obj_set_style_text_decor", - (PyCFunction)py_lv_obj_set_style_text_decor, +static PyMethodDef py_lv_obj_get_style_arc_color_def = { + "lv_obj_get_style_arc_color", + (PyCFunction)py_lv_obj_get_style_arc_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22418,30 +22568,30 @@ static PyMethodDef py_lv_obj_set_style_text_decor_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_align(lv_obj_t *obj, lv_text_align_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_arc_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_text_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_text_align_t, lv_style_selector_t))lv_obj_set_style_text_align)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_text_align_def = { - "lv_obj_set_style_text_align", - (PyCFunction)py_lv_obj_set_style_text_align, +static PyMethodDef py_lv_obj_get_style_arc_color_filtered_def = { + "lv_obj_get_style_arc_color_filtered", + (PyCFunction)py_lv_obj_get_style_arc_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22449,30 +22599,30 @@ static PyMethodDef py_lv_obj_set_style_text_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_outline_stroke_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_arc_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_outline_stroke_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_text_outline_stroke_color)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_text_outline_stroke_color_def = { - "lv_obj_set_style_text_outline_stroke_color", - (PyCFunction)py_lv_obj_set_style_text_outline_stroke_color, +static PyMethodDef py_lv_obj_get_style_arc_opa_def = { + "lv_obj_get_style_arc_opa", + (PyCFunction)py_lv_obj_get_style_arc_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22480,30 +22630,30 @@ static PyMethodDef py_lv_obj_set_style_text_outline_stroke_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_outline_stroke_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * const void *lv_obj_get_style_arc_image_src(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_outline_stroke_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_arc_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_text_outline_stroke_width)(obj, value, selector); + _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_image_src)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_set_style_text_outline_stroke_width_def = { - "lv_obj_set_style_text_outline_stroke_width", - (PyCFunction)py_lv_obj_set_style_text_outline_stroke_width, +static PyMethodDef py_lv_obj_get_style_arc_image_src_def = { + "lv_obj_get_style_arc_image_src", + (PyCFunction)py_lv_obj_get_style_arc_image_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22511,30 +22661,30 @@ static PyMethodDef py_lv_obj_set_style_text_outline_stroke_width_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_text_outline_stroke_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_text_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_text_outline_stroke_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_text_outline_stroke_opa)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_text_outline_stroke_opa_def = { - "lv_obj_set_style_text_outline_stroke_opa", - (PyCFunction)py_lv_obj_set_style_text_outline_stroke_opa, +static PyMethodDef py_lv_obj_get_style_text_color_def = { + "lv_obj_get_style_text_color", + (PyCFunction)py_lv_obj_get_style_text_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22542,30 +22692,30 @@ static PyMethodDef py_lv_obj_set_style_text_outline_stroke_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_blur_radius(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_text_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_blur_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_blur_radius)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_blur_radius_def = { - "lv_obj_set_style_blur_radius", - (PyCFunction)py_lv_obj_set_style_blur_radius, +static PyMethodDef py_lv_obj_get_style_text_color_filtered_def = { + "lv_obj_get_style_text_color_filtered", + (PyCFunction)py_lv_obj_get_style_text_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22573,30 +22723,30 @@ static PyMethodDef py_lv_obj_set_style_blur_radius_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_blur_backdrop(lv_obj_t *obj, bool value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_text_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_blur_backdrop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool value = (value_val != 0); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_blur_backdrop)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_blur_backdrop_def = { - "lv_obj_set_style_blur_backdrop", - (PyCFunction)py_lv_obj_set_style_blur_backdrop, +static PyMethodDef py_lv_obj_get_style_text_opa_def = { + "lv_obj_get_style_text_opa", + (PyCFunction)py_lv_obj_get_style_text_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22604,30 +22754,30 @@ static PyMethodDef py_lv_obj_set_style_blur_backdrop_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_blur_quality(lv_obj_t *obj, lv_blur_quality_t value, lv_style_selector_t selector) + * const lv_font_t *lv_obj_get_style_text_font(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_blur_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_font(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_blur_quality_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_font_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_blur_quality_t, lv_style_selector_t))lv_obj_set_style_blur_quality)(obj, value, selector); + _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_font)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_obj_set_style_blur_quality_def = { - "lv_obj_set_style_blur_quality", - (PyCFunction)py_lv_obj_set_style_blur_quality, +static PyMethodDef py_lv_obj_get_style_text_font_def = { + "lv_obj_get_style_text_font", + (PyCFunction)py_lv_obj_get_style_text_font, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22635,30 +22785,30 @@ static PyMethodDef py_lv_obj_set_style_blur_quality_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_drop_shadow_radius(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_text_letter_space(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_drop_shadow_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_letter_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_radius)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_letter_space)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_drop_shadow_radius_def = { - "lv_obj_set_style_drop_shadow_radius", - (PyCFunction)py_lv_obj_set_style_drop_shadow_radius, +static PyMethodDef py_lv_obj_get_style_text_letter_space_def = { + "lv_obj_get_style_text_letter_space", + (PyCFunction)py_lv_obj_get_style_text_letter_space, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22666,30 +22816,30 @@ static PyMethodDef py_lv_obj_set_style_drop_shadow_radius_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_drop_shadow_offset_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_text_line_space(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_drop_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_line_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_offset_x)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_line_space)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_drop_shadow_offset_x_def = { - "lv_obj_set_style_drop_shadow_offset_x", - (PyCFunction)py_lv_obj_set_style_drop_shadow_offset_x, +static PyMethodDef py_lv_obj_get_style_text_line_space_def = { + "lv_obj_get_style_text_line_space", + (PyCFunction)py_lv_obj_get_style_text_line_space, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22697,30 +22847,30 @@ static PyMethodDef py_lv_obj_set_style_drop_shadow_offset_x_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_drop_shadow_offset_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_drop_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_decor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_text_decor_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_offset_y)(obj, value, selector); + _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_decor)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_drop_shadow_offset_y_def = { - "lv_obj_set_style_drop_shadow_offset_y", - (PyCFunction)py_lv_obj_set_style_drop_shadow_offset_y, +static PyMethodDef py_lv_obj_get_style_text_decor_def = { + "lv_obj_get_style_text_decor", + (PyCFunction)py_lv_obj_get_style_text_decor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22728,30 +22878,30 @@ static PyMethodDef py_lv_obj_set_style_drop_shadow_offset_y_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_drop_shadow_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_drop_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_text_align_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_color)(obj, value, selector); + _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_align)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_drop_shadow_color_def = { - "lv_obj_set_style_drop_shadow_color", - (PyCFunction)py_lv_obj_set_style_drop_shadow_color, +static PyMethodDef py_lv_obj_get_style_text_align_def = { + "lv_obj_get_style_text_align", + (PyCFunction)py_lv_obj_get_style_text_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22759,30 +22909,30 @@ static PyMethodDef py_lv_obj_set_style_drop_shadow_color_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_drop_shadow_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_text_outline_stroke_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_drop_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_opa)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_drop_shadow_opa_def = { - "lv_obj_set_style_drop_shadow_opa", - (PyCFunction)py_lv_obj_set_style_drop_shadow_opa, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_def = { + "lv_obj_get_style_text_outline_stroke_color", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22790,30 +22940,30 @@ static PyMethodDef py_lv_obj_set_style_drop_shadow_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_drop_shadow_quality(lv_obj_t *obj, lv_blur_quality_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_text_outline_stroke_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_drop_shadow_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_blur_quality_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_blur_quality_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_quality)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_drop_shadow_quality_def = { - "lv_obj_set_style_drop_shadow_quality", - (PyCFunction)py_lv_obj_set_style_drop_shadow_quality, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_filtered_def = { + "lv_obj_get_style_text_outline_stroke_color_filtered", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22821,30 +22971,30 @@ static PyMethodDef py_lv_obj_set_style_drop_shadow_quality_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_radius(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_text_outline_stroke_width(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_radius)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_width)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_radius_def = { - "lv_obj_set_style_radius", - (PyCFunction)py_lv_obj_set_style_radius, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_width_def = { + "lv_obj_get_style_text_outline_stroke_width", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22852,30 +23002,30 @@ static PyMethodDef py_lv_obj_set_style_radius_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_radial_offset(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_text_outline_stroke_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_radial_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_outline_stroke_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_radial_offset)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_radial_offset_def = { - "lv_obj_set_style_radial_offset", - (PyCFunction)py_lv_obj_set_style_radial_offset, +static PyMethodDef py_lv_obj_get_style_text_outline_stroke_opa_def = { + "lv_obj_get_style_text_outline_stroke_opa", + (PyCFunction)py_lv_obj_get_style_text_outline_stroke_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22883,30 +23033,30 @@ static PyMethodDef py_lv_obj_set_style_radial_offset_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_clip_corner(lv_obj_t *obj, bool value, lv_style_selector_t selector) + * lv_text_leading_trim_t lv_obj_get_style_text_leading_trim(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_clip_corner(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_text_leading_trim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool value = (value_val != 0); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_text_leading_trim_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_clip_corner)(obj, value, selector); + _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_leading_trim)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_clip_corner_def = { - "lv_obj_set_style_clip_corner", - (PyCFunction)py_lv_obj_set_style_clip_corner, +static PyMethodDef py_lv_obj_get_style_text_leading_trim_def = { + "lv_obj_get_style_text_leading_trim", + (PyCFunction)py_lv_obj_get_style_text_leading_trim, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22914,30 +23064,30 @@ static PyMethodDef py_lv_obj_set_style_clip_corner_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_blur_radius(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_blur_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_radius)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_opa_def = { - "lv_obj_set_style_opa", - (PyCFunction)py_lv_obj_set_style_opa, +static PyMethodDef py_lv_obj_get_style_blur_radius_def = { + "lv_obj_get_style_blur_radius", + (PyCFunction)py_lv_obj_get_style_blur_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22945,30 +23095,30 @@ static PyMethodDef py_lv_obj_set_style_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_opa_layered(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * bool lv_obj_get_style_blur_backdrop(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_opa_layered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_blur_backdrop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_opa_layered)(obj, value, selector); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_backdrop)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_set_style_opa_layered_def = { - "lv_obj_set_style_opa_layered", - (PyCFunction)py_lv_obj_set_style_opa_layered, +static PyMethodDef py_lv_obj_get_style_blur_backdrop_def = { + "lv_obj_get_style_blur_backdrop", + (PyCFunction)py_lv_obj_get_style_blur_backdrop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -22976,30 +23126,30 @@ static PyMethodDef py_lv_obj_set_style_opa_layered_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_color_filter_dsc(lv_obj_t *obj, const lv_color_filter_dsc_t *value, lv_style_selector_t selector) + * lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_color_filter_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_blur_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_blur_quality_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_color_filter_dsc_t *, lv_style_selector_t))lv_obj_set_style_color_filter_dsc)(obj, value, selector); + _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_quality)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_color_filter_dsc_def = { - "lv_obj_set_style_color_filter_dsc", - (PyCFunction)py_lv_obj_set_style_color_filter_dsc, +static PyMethodDef py_lv_obj_get_style_blur_quality_def = { + "lv_obj_get_style_blur_quality", + (PyCFunction)py_lv_obj_get_style_blur_quality, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23007,30 +23157,30 @@ static PyMethodDef py_lv_obj_set_style_color_filter_dsc_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_color_filter_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_drop_shadow_radius(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_color_filter_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_color_filter_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_radius)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_color_filter_opa_def = { - "lv_obj_set_style_color_filter_opa", - (PyCFunction)py_lv_obj_set_style_color_filter_opa, +static PyMethodDef py_lv_obj_get_style_drop_shadow_radius_def = { + "lv_obj_get_style_drop_shadow_radius", + (PyCFunction)py_lv_obj_get_style_drop_shadow_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23038,30 +23188,30 @@ static PyMethodDef py_lv_obj_set_style_color_filter_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_recolor(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_drop_shadow_offset_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t value = mp_write_lv_color_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_recolor)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_recolor_def = { - "lv_obj_set_style_recolor", - (PyCFunction)py_lv_obj_set_style_recolor, +static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_x_def = { + "lv_obj_get_style_drop_shadow_offset_x", + (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23069,30 +23219,30 @@ static PyMethodDef py_lv_obj_set_style_recolor_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_recolor_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_drop_shadow_offset_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_opa_t value = (lv_opa_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_recolor_opa)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_recolor_opa_def = { - "lv_obj_set_style_recolor_opa", - (PyCFunction)py_lv_obj_set_style_recolor_opa, +static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_y_def = { + "lv_obj_get_style_drop_shadow_offset_y", + (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23100,30 +23250,30 @@ static PyMethodDef py_lv_obj_set_style_recolor_opa_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_anim(lv_obj_t *obj, const lv_anim_t *value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_drop_shadow_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_anim_t *, lv_style_selector_t))lv_obj_set_style_anim)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_anim_def = { - "lv_obj_set_style_anim", - (PyCFunction)py_lv_obj_set_style_anim, +static PyMethodDef py_lv_obj_get_style_drop_shadow_color_def = { + "lv_obj_get_style_drop_shadow_color", + (PyCFunction)py_lv_obj_get_style_drop_shadow_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23131,30 +23281,30 @@ static PyMethodDef py_lv_obj_set_style_anim_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_anim_duration(lv_obj_t *obj, uint32_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_drop_shadow_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t value = (uint32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, lv_style_selector_t))lv_obj_set_style_anim_duration)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_anim_duration_def = { - "lv_obj_set_style_anim_duration", - (PyCFunction)py_lv_obj_set_style_anim_duration, +static PyMethodDef py_lv_obj_get_style_drop_shadow_color_filtered_def = { + "lv_obj_get_style_drop_shadow_color_filtered", + (PyCFunction)py_lv_obj_get_style_drop_shadow_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23162,30 +23312,30 @@ static PyMethodDef py_lv_obj_set_style_anim_duration_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_transition(lv_obj_t *obj, const lv_style_transition_dsc_t *value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_drop_shadow_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_transition(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_style_transition_dsc_t *, lv_style_selector_t))lv_obj_set_style_transition)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_transition_def = { - "lv_obj_set_style_transition", - (PyCFunction)py_lv_obj_set_style_transition, +static PyMethodDef py_lv_obj_get_style_drop_shadow_opa_def = { + "lv_obj_get_style_drop_shadow_opa", + (PyCFunction)py_lv_obj_get_style_drop_shadow_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23193,30 +23343,30 @@ static PyMethodDef py_lv_obj_set_style_transition_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_blend_mode(lv_obj_t *obj, lv_blend_mode_t value, lv_style_selector_t selector) + * lv_blur_quality_t lv_obj_get_style_drop_shadow_quality(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_drop_shadow_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_blend_mode_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_blur_quality_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_blend_mode_t, lv_style_selector_t))lv_obj_set_style_blend_mode)(obj, value, selector); + _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_quality)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_blend_mode_def = { - "lv_obj_set_style_blend_mode", - (PyCFunction)py_lv_obj_set_style_blend_mode, +static PyMethodDef py_lv_obj_get_style_drop_shadow_quality_def = { + "lv_obj_get_style_drop_shadow_quality", + (PyCFunction)py_lv_obj_get_style_drop_shadow_quality, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23224,30 +23374,30 @@ static PyMethodDef py_lv_obj_set_style_blend_mode_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_layout(lv_obj_t *obj, uint16_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_radius(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint16_t value = (uint16_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint16_t, lv_style_selector_t))lv_obj_set_style_layout)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radius)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_layout_def = { - "lv_obj_set_style_layout", - (PyCFunction)py_lv_obj_set_style_layout, +static PyMethodDef py_lv_obj_get_style_radius_def = { + "lv_obj_get_style_radius", + (PyCFunction)py_lv_obj_get_style_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23255,30 +23405,30 @@ static PyMethodDef py_lv_obj_set_style_layout_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_base_dir(lv_obj_t *obj, lv_base_dir_t value, lv_style_selector_t selector) + * int32_t lv_obj_get_style_radial_offset(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_base_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_radial_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_base_dir_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_base_dir_t, lv_style_selector_t))lv_obj_set_style_base_dir)(obj, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radial_offset)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_base_dir_def = { - "lv_obj_set_style_base_dir", - (PyCFunction)py_lv_obj_set_style_base_dir, +static PyMethodDef py_lv_obj_get_style_radial_offset_def = { + "lv_obj_get_style_radial_offset", + (PyCFunction)py_lv_obj_get_style_radial_offset, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23286,30 +23436,30 @@ static PyMethodDef py_lv_obj_set_style_base_dir_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_bitmap_mask_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) + * bool lv_obj_get_style_clip_corner(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_bitmap_mask_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_clip_corner(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const void *value = (const void *)mp_to_ptr(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_obj_set_style_bitmap_mask_src)(obj, value, selector); + _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_clip_corner)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_set_style_bitmap_mask_src_def = { - "lv_obj_set_style_bitmap_mask_src", - (PyCFunction)py_lv_obj_set_style_bitmap_mask_src, +static PyMethodDef py_lv_obj_get_style_clip_corner_def = { + "lv_obj_get_style_clip_corner", + (PyCFunction)py_lv_obj_get_style_clip_corner, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23317,30 +23467,30 @@ static PyMethodDef py_lv_obj_set_style_bitmap_mask_src_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_rotary_sensitivity(lv_obj_t *obj, uint32_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_rotary_sensitivity(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t value = (uint32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, lv_style_selector_t))lv_obj_set_style_rotary_sensitivity)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_rotary_sensitivity_def = { - "lv_obj_set_style_rotary_sensitivity", - (PyCFunction)py_lv_obj_set_style_rotary_sensitivity, +static PyMethodDef py_lv_obj_get_style_opa_def = { + "lv_obj_get_style_opa", + (PyCFunction)py_lv_obj_get_style_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23348,30 +23498,30 @@ static PyMethodDef py_lv_obj_set_style_rotary_sensitivity_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_flex_flow(lv_obj_t *obj, lv_flex_flow_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_opa_layered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_opa_layered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_flex_flow_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_flow_t, lv_style_selector_t))lv_obj_set_style_flex_flow)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_layered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_flex_flow_def = { - "lv_obj_set_style_flex_flow", - (PyCFunction)py_lv_obj_set_style_flex_flow, +static PyMethodDef py_lv_obj_get_style_opa_layered_def = { + "lv_obj_get_style_opa_layered", + (PyCFunction)py_lv_obj_get_style_opa_layered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23379,30 +23529,30 @@ static PyMethodDef py_lv_obj_set_style_flex_flow_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_flex_main_place(lv_obj_t *obj, lv_flex_align_t value, lv_style_selector_t selector) + * const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_flex_main_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_color_filter_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_flex_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_color_filter_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_style_selector_t))lv_obj_set_style_flex_main_place)(obj, value, selector); + _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_dsc)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); } -static PyMethodDef py_lv_obj_set_style_flex_main_place_def = { - "lv_obj_set_style_flex_main_place", - (PyCFunction)py_lv_obj_set_style_flex_main_place, +static PyMethodDef py_lv_obj_get_style_color_filter_dsc_def = { + "lv_obj_get_style_color_filter_dsc", + (PyCFunction)py_lv_obj_get_style_color_filter_dsc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23410,30 +23560,30 @@ static PyMethodDef py_lv_obj_set_style_flex_main_place_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_flex_cross_place(lv_obj_t *obj, lv_flex_align_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_color_filter_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_flex_cross_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_color_filter_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_flex_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_style_selector_t))lv_obj_set_style_flex_cross_place)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_flex_cross_place_def = { - "lv_obj_set_style_flex_cross_place", - (PyCFunction)py_lv_obj_set_style_flex_cross_place, +static PyMethodDef py_lv_obj_get_style_color_filter_opa_def = { + "lv_obj_get_style_color_filter_opa", + (PyCFunction)py_lv_obj_get_style_color_filter_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23441,30 +23591,30 @@ static PyMethodDef py_lv_obj_set_style_flex_cross_place_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_flex_track_place(lv_obj_t *obj, lv_flex_align_t value, lv_style_selector_t selector) + * lv_color_t lv_obj_get_style_recolor(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_flex_track_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_flex_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_style_selector_t))lv_obj_set_style_flex_track_place)(obj, value, selector); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_set_style_flex_track_place_def = { - "lv_obj_set_style_flex_track_place", - (PyCFunction)py_lv_obj_set_style_flex_track_place, +static PyMethodDef py_lv_obj_get_style_recolor_def = { + "lv_obj_get_style_recolor", + (PyCFunction)py_lv_obj_get_style_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23472,30 +23622,30 @@ static PyMethodDef py_lv_obj_set_style_flex_track_place_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_flex_grow(lv_obj_t *obj, uint8_t value, lv_style_selector_t selector) + * lv_opa_t lv_obj_get_style_recolor_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint8_t value = (uint8_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_opa_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint8_t, lv_style_selector_t))lv_obj_set_style_flex_grow)(obj, value, selector); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_flex_grow_def = { - "lv_obj_set_style_flex_grow", - (PyCFunction)py_lv_obj_set_style_flex_grow, +static PyMethodDef py_lv_obj_get_style_recolor_opa_def = { + "lv_obj_get_style_recolor_opa", + (PyCFunction)py_lv_obj_get_style_recolor_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23503,30 +23653,30 @@ static PyMethodDef py_lv_obj_set_style_flex_grow_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_column_dsc_array(lv_obj_t *obj, const int32_t *value, lv_style_selector_t selector) + * const lv_anim_t *lv_obj_get_style_anim(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_column_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_anim_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const int32_t *, lv_style_selector_t))lv_obj_set_style_grid_column_dsc_array)(obj, value, selector); + _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_anim_t((void*)_res); } -static PyMethodDef py_lv_obj_set_style_grid_column_dsc_array_def = { - "lv_obj_set_style_grid_column_dsc_array", - (PyCFunction)py_lv_obj_set_style_grid_column_dsc_array, +static PyMethodDef py_lv_obj_get_style_anim_def = { + "lv_obj_get_style_anim", + (PyCFunction)py_lv_obj_get_style_anim, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23534,30 +23684,30 @@ static PyMethodDef py_lv_obj_set_style_grid_column_dsc_array_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_column_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) + * uint32_t lv_obj_get_style_anim_duration(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_column_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_column_align)(obj, value, selector); + _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim_duration)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_grid_column_align_def = { - "lv_obj_set_style_grid_column_align", - (PyCFunction)py_lv_obj_set_style_grid_column_align, +static PyMethodDef py_lv_obj_get_style_anim_duration_def = { + "lv_obj_get_style_anim_duration", + (PyCFunction)py_lv_obj_get_style_anim_duration, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23565,30 +23715,30 @@ static PyMethodDef py_lv_obj_set_style_grid_column_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_row_dsc_array(lv_obj_t *obj, const int32_t *value, lv_style_selector_t selector) + * const lv_style_transition_dsc_t *lv_obj_get_style_transition(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_row_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transition(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_style_transition_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const int32_t *, lv_style_selector_t))lv_obj_set_style_grid_row_dsc_array)(obj, value, selector); + _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transition)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); } -static PyMethodDef py_lv_obj_set_style_grid_row_dsc_array_def = { - "lv_obj_set_style_grid_row_dsc_array", - (PyCFunction)py_lv_obj_set_style_grid_row_dsc_array, +static PyMethodDef py_lv_obj_get_style_transition_def = { + "lv_obj_get_style_transition", + (PyCFunction)py_lv_obj_get_style_transition, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23596,30 +23746,30 @@ static PyMethodDef py_lv_obj_set_style_grid_row_dsc_array_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_row_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) + * lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_row_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_blend_mode_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_row_align)(obj, value, selector); + _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blend_mode)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_grid_row_align_def = { - "lv_obj_set_style_grid_row_align", - (PyCFunction)py_lv_obj_set_style_grid_row_align, +static PyMethodDef py_lv_obj_get_style_blend_mode_def = { + "lv_obj_get_style_blend_mode", + (PyCFunction)py_lv_obj_get_style_blend_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23627,30 +23777,30 @@ static PyMethodDef py_lv_obj_set_style_grid_row_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_cell_column_pos(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * uint16_t lv_obj_get_style_layout(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_cell_column_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint16_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_column_pos)(obj, value, selector); + _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_layout)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_grid_cell_column_pos_def = { - "lv_obj_set_style_grid_cell_column_pos", - (PyCFunction)py_lv_obj_set_style_grid_cell_column_pos, +static PyMethodDef py_lv_obj_get_style_layout_def = { + "lv_obj_get_style_layout", + (PyCFunction)py_lv_obj_get_style_layout, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23658,30 +23808,30 @@ static PyMethodDef py_lv_obj_set_style_grid_cell_column_pos_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_cell_x_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) + * lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_cell_x_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_base_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_base_dir_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_cell_x_align)(obj, value, selector); + _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_base_dir)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_grid_cell_x_align_def = { - "lv_obj_set_style_grid_cell_x_align", - (PyCFunction)py_lv_obj_set_style_grid_cell_x_align, +static PyMethodDef py_lv_obj_get_style_base_dir_def = { + "lv_obj_get_style_base_dir", + (PyCFunction)py_lv_obj_get_style_base_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23689,30 +23839,30 @@ static PyMethodDef py_lv_obj_set_style_grid_cell_x_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_cell_column_span(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * const void *lv_obj_get_style_bitmap_mask_src(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_cell_column_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bitmap_mask_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_column_span)(obj, value, selector); + _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bitmap_mask_src)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_set_style_grid_cell_column_span_def = { - "lv_obj_set_style_grid_cell_column_span", - (PyCFunction)py_lv_obj_set_style_grid_cell_column_span, +static PyMethodDef py_lv_obj_get_style_bitmap_mask_src_def = { + "lv_obj_get_style_bitmap_mask_src", + (PyCFunction)py_lv_obj_get_style_bitmap_mask_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23720,30 +23870,30 @@ static PyMethodDef py_lv_obj_set_style_grid_cell_column_span_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_cell_row_pos(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * uint32_t lv_obj_get_style_rotary_sensitivity(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_cell_row_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_rotary_sensitivity(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_row_pos)(obj, value, selector); + _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_rotary_sensitivity)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_set_style_grid_cell_row_pos_def = { - "lv_obj_set_style_grid_cell_row_pos", - (PyCFunction)py_lv_obj_set_style_grid_cell_row_pos, +static PyMethodDef py_lv_obj_get_style_rotary_sensitivity_def = { + "lv_obj_get_style_rotary_sensitivity", + (PyCFunction)py_lv_obj_get_style_rotary_sensitivity, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23751,30 +23901,30 @@ static PyMethodDef py_lv_obj_set_style_grid_cell_row_pos_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_cell_y_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) + * lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_cell_y_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_flex_flow_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_cell_y_align)(obj, value, selector); + _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_flow)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_grid_cell_y_align_def = { - "lv_obj_set_style_grid_cell_y_align", - (PyCFunction)py_lv_obj_set_style_grid_cell_y_align, +static PyMethodDef py_lv_obj_get_style_flex_flow_def = { + "lv_obj_get_style_flex_flow", + (PyCFunction)py_lv_obj_get_style_flex_flow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23782,30 +23932,30 @@ static PyMethodDef py_lv_obj_set_style_grid_cell_y_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_style_grid_cell_row_span(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + * lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_set_style_grid_cell_row_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_main_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_flex_align_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_row_span)(obj, value, selector); + _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_main_place)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_set_style_grid_cell_row_span_def = { - "lv_obj_set_style_grid_cell_row_span", - (PyCFunction)py_lv_obj_set_style_grid_cell_row_span, +static PyMethodDef py_lv_obj_get_style_flex_main_place_def = { + "lv_obj_get_style_flex_main_place", + (PyCFunction)py_lv_obj_get_style_flex_main_place, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23813,31 +23963,30 @@ static PyMethodDef py_lv_obj_set_style_grid_cell_row_span_def = { /* * lvgl extension definition for: - * lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t *obj, lv_part_t part, const char *txt) + * lv_flex_align_t lv_obj_get_style_flex_cross_place(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_calculate_style_text_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_cross_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); lv_part_t part = (int)mp_obj_get_int(part_py); - const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_text_align_t _res; + lv_flex_align_t _res; lvpy_lock(); - _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_obj_calculate_style_text_align)(obj, part, txt); + _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_cross_place)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_calculate_style_text_align_def = { - "lv_obj_calculate_style_text_align", - (PyCFunction)py_lv_obj_calculate_style_text_align, +static PyMethodDef py_lv_obj_get_style_flex_cross_place_def = { + "lv_obj_get_style_flex_cross_place", + (PyCFunction)py_lv_obj_get_style_flex_cross_place, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23845,9 +23994,9 @@ static PyMethodDef py_lv_obj_calculate_style_text_align_def = { /* * lvgl extension definition for: - * lv_opa_t lv_obj_get_style_opa_recursive(const lv_obj_t *obj, lv_part_t part) + * lv_flex_align_t lv_obj_get_style_flex_track_place(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_opa_recursive(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_track_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -23857,18 +24006,18 @@ static PyObject *py_lv_obj_get_style_opa_recursive(PyObject *self, PyObject *py_ lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; + lv_flex_align_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_recursive)(obj, part); + _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_track_place)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_opa_recursive_def = { - "lv_obj_get_style_opa_recursive", - (PyCFunction)py_lv_obj_get_style_opa_recursive, +static PyMethodDef py_lv_obj_get_style_flex_track_place_def = { + "lv_obj_get_style_flex_track_place", + (PyCFunction)py_lv_obj_get_style_flex_track_place, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23876,31 +24025,30 @@ static PyMethodDef py_lv_obj_get_style_opa_recursive_def = { /* * lvgl extension definition for: - * lv_color32_t lv_obj_style_apply_recolor(const lv_obj_t *obj, lv_part_t part, lv_color32_t color) + * uint8_t lv_obj_get_style_flex_grow(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_style_apply_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &color_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); lv_part_t part = (int)mp_obj_get_int(part_py); - lv_color32_t color = mp_write_lv_color32_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + uint8_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(const lv_obj_t *, lv_part_t, lv_color32_t))lv_obj_style_apply_recolor)(obj, part, color); + _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_grow)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_style_apply_recolor_def = { - "lv_obj_style_apply_recolor", - (PyCFunction)py_lv_obj_style_apply_recolor, +static PyMethodDef py_lv_obj_get_style_flex_grow_def = { + "lv_obj_get_style_flex_grow", + (PyCFunction)py_lv_obj_get_style_flex_grow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -23908,9 +24056,9 @@ static PyMethodDef py_lv_obj_style_apply_recolor_def = { /* * lvgl extension definition for: - * lv_color32_t lv_obj_get_style_recolor_recursive(const lv_obj_t *obj, lv_part_t part) + * const int32_t *lv_obj_get_style_grid_column_dsc_array(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_recolor_recursive(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_grid_column_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -23920,484 +24068,576 @@ static PyObject *py_lv_obj_get_style_recolor_recursive(PyObject *self, PyObject lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + const int32_t * _res; lvpy_lock(); - _res = ((lv_color32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_recursive)(obj, part); + _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_dsc_array)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_array_from_i32ptr((void*)_res); } -static PyMethodDef py_lv_obj_get_style_recolor_recursive_def = { - "lv_obj_get_style_recolor_recursive", - (PyCFunction)py_lv_obj_get_style_recolor_recursive, +static PyMethodDef py_lv_obj_get_style_grid_column_dsc_array_def = { + "lv_obj_get_style_grid_column_dsc_array", + (PyCFunction)py_lv_obj_get_style_grid_column_dsc_array, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_subject_value_t (CPython) + * lvgl extension definition for: + * lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t *obj, lv_part_t part) */ - -extern PyMethodDef py_lv_subject_value_t_methods[]; - -static PyObject *py_lv_subject_value_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_get_style_grid_column_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_subject_value_t *data = (lv_subject_value_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "num") == 0) return mp_obj_new_int(data->num); - if (strcmp(attr, "pointer") == 0) return ptr_to_mp((void*)data->pointer); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "float_v") == 0) return mp_obj_new_float_from_f(data->float_v); - for (PyMethodDef *m = py_lv_subject_value_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_grid_align_t _res; + lvpy_lock(); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_align)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_subject_value_t_field_names[] = {"num", "pointer", "color", "float_v", NULL}; +static PyMethodDef py_lv_obj_get_style_grid_column_align_def = { + "lv_obj_get_style_grid_column_align", + (PyCFunction)py_lv_obj_get_style_grid_column_align, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_subject_value_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * const int32_t *lv_obj_get_style_grid_row_dsc_array(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_grid_row_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_subject_value_t_field_names, py_lv_subject_value_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const int32_t * _res; + lvpy_lock(); + _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_dsc_array)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_array_from_i32ptr((void*)_res); } -static PyMethodDef py_lv_subject_value_t_type_methods[] = { - {"__dir__", py_lv_subject_value_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_style_grid_row_dsc_array_def = { + "lv_obj_get_style_grid_row_dsc_array", + (PyCFunction)py_lv_obj_get_style_grid_row_dsc_array, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_subject_value_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_subject_value_t *data = (lv_subject_value_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_subject_value_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "num") == 0) { data->num = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pointer") == 0) { data->pointer = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "float_v") == 0) { data->float_v = (float)mp_obj_get_float(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_subject_value_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_subject_value_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_subject_value_t)); -} -static void py_lv_subject_value_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * lv_grid_align_t lv_obj_get_style_grid_row_align(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_grid_row_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_grid_align_t _res; + lvpy_lock(); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_align)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_subject_value_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_subject_value_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_subject_value_t_dealloc, - .tp_getattro = (getter)py_lv_subject_value_t_getattro, - .tp_setattro = (setter)py_lv_subject_value_t_setattro, - .tp_new = py_lv_subject_value_t_new, - .tp_methods = py_lv_subject_value_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_style_grid_row_align_def = { + "lv_obj_get_style_grid_row_align", + (PyCFunction)py_lv_obj_get_style_grid_row_align, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_subject_value_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_subject_value_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_subject_value_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_subject_value_t*)self->data; -} - -static lv_subject_value_t mp_write_scratch_lv_subject_value_t; -static inline void* mp_write_value_ptr_lv_subject_value_t(PyObject *value) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_grid_cell_column_pos(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_grid_cell_column_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_subject_value_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_subject_value_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_subject_value_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_subject_value_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_subject_value_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_subject_value_t or dict, got None"); - } - memset(&mp_write_scratch_lv_subject_value_t, 0, sizeof(lv_subject_value_t)); - return &mp_write_scratch_lv_subject_value_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_pos)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_subject_value_t(struct_obj) (*((lv_subject_value_t*)mp_write_value_ptr_lv_subject_value_t(struct_obj))) +static PyMethodDef py_lv_obj_get_style_grid_cell_column_pos_def = { + "lv_obj_get_style_grid_cell_column_pos", + (PyCFunction)py_lv_obj_get_style_grid_cell_column_pos, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_subject_value_t(void *field) + +/* + * lvgl extension definition for: + * lv_grid_align_t lv_obj_get_style_grid_cell_x_align(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_grid_cell_x_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_subject_value_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_grid_align_t _res; + lvpy_lock(); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_x_align)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_subject_value_t(field) lv_to_mp_struct_own(&py_lv_subject_value_t_type, copy_buffer(&field, sizeof(lv_subject_value_t))) -#define mp_read_byref_lv_subject_value_t(field) mp_read_ptr_lv_subject_value_t(&field) +static PyMethodDef py_lv_obj_get_style_grid_cell_x_align_def = { + "lv_obj_get_style_grid_cell_x_align", + (PyCFunction)py_lv_obj_get_style_grid_cell_x_align, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_subject_t (CPython) + * lvgl extension definition for: + * int32_t lv_obj_get_style_grid_cell_column_span(const lv_obj_t *obj, lv_part_t part) */ - -extern PyMethodDef py_lv_subject_t_methods[]; - -static PyObject *py_lv_subject_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_get_style_grid_cell_column_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_subject_t *data = (lv_subject_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "subs_ll") == 0) return mp_read_byref_lv_ll_t(data->subs_ll); - if (strcmp(attr, "value") == 0) return mp_read_byref_lv_subject_value_t(data->value); - if (strcmp(attr, "prev_value") == 0) return mp_read_byref_lv_subject_value_t(data->prev_value); - if (strcmp(attr, "min_value") == 0) return mp_read_byref_lv_subject_value_t(data->min_value); - if (strcmp(attr, "max_value") == 0) return mp_read_byref_lv_subject_value_t(data->max_value); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "type") == 0) return mp_obj_new_int_from_uint(data->type); - if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); - if (strcmp(attr, "notify_restart_query") == 0) return mp_obj_new_int_from_uint(data->notify_restart_query); - for (PyMethodDef *m = py_lv_subject_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_span)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_subject_t_field_names[] = {"subs_ll", "value", "prev_value", "min_value", "max_value", "user_data", "type", "size", "notify_restart_query", NULL}; +static PyMethodDef py_lv_obj_get_style_grid_cell_column_span_def = { + "lv_obj_get_style_grid_cell_column_span", + (PyCFunction)py_lv_obj_get_style_grid_cell_column_span, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_subject_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_grid_cell_row_pos(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_grid_cell_row_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_subject_t_field_names, py_lv_subject_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_pos)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_subject_t_type_methods[] = { - {"__dir__", py_lv_subject_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_style_grid_cell_row_pos_def = { + "lv_obj_get_style_grid_cell_row_pos", + (PyCFunction)py_lv_obj_get_style_grid_cell_row_pos, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_subject_t_setattro(PyObject *self, PyObject *name, PyObject *value) + +/* + * lvgl extension definition for: + * lv_grid_align_t lv_obj_get_style_grid_cell_y_align(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_grid_cell_y_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_subject_t *data = (lv_subject_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_subject_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "subs_ll") == 0) { data->subs_ll = mp_write_lv_ll_t(value); result = 0; } - if (strcmp(attr, "value") == 0) { data->value = mp_write_lv_subject_value_t(value); result = 0; } - if (strcmp(attr, "prev_value") == 0) { data->prev_value = mp_write_lv_subject_value_t(value); result = 0; } - if (strcmp(attr, "min_value") == 0) { data->min_value = mp_write_lv_subject_value_t(value); result = 0; } - if (strcmp(attr, "max_value") == 0) { data->max_value = mp_write_lv_subject_value_t(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "type") == 0) { data->type = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "notify_restart_query") == 0) { data->notify_restart_query = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_subject_t' object has no attribute '%s'", attr); - } - return result; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_grid_align_t _res; + lvpy_lock(); + _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_y_align)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyObject *py_lv_subject_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_subject_t)); -} +static PyMethodDef py_lv_obj_get_style_grid_cell_y_align_def = { + "lv_obj_get_style_grid_cell_y_align", + (PyCFunction)py_lv_obj_get_style_grid_cell_y_align, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static void py_lv_subject_t_dealloc(py_lv_struct_t *self) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_grid_cell_row_span(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_grid_cell_row_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_span)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_subject_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_subject_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_subject_t_dealloc, - .tp_getattro = (getter)py_lv_subject_t_getattro, - .tp_setattro = (setter)py_lv_subject_t_setattro, - .tp_new = py_lv_subject_t_new, - .tp_methods = py_lv_subject_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_style_grid_cell_row_span_def = { + "lv_obj_get_style_grid_cell_row_span", + (PyCFunction)py_lv_obj_get_style_grid_cell_row_span, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_subject_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_subject_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_subject_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_subject_t*)self->data; -} - -static lv_subject_t mp_write_scratch_lv_subject_t; -static inline void* mp_write_value_ptr_lv_subject_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_subject_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_subject_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_subject_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_subject_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_subject_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_subject_t or dict, got None"); - } - memset(&mp_write_scratch_lv_subject_t, 0, sizeof(lv_subject_t)); - return &mp_write_scratch_lv_subject_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_width)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_subject_t(struct_obj) (*((lv_subject_t*)mp_write_value_ptr_lv_subject_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_width_def = { + "lv_obj_set_style_width", + (PyCFunction)py_lv_obj_set_style_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_subject_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_min_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_min_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_subject_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_min_width)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_subject_t(field) lv_to_mp_struct_own(&py_lv_subject_t_type, copy_buffer(&field, sizeof(lv_subject_t))) -#define mp_read_byref_lv_subject_t(field) mp_read_ptr_lv_subject_t(&field) - -#define funcptr_lv_observer_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_observer_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_set_style_min_width_def = { + "lv_obj_set_style_min_width", + (PyCFunction)py_lv_obj_set_style_min_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static void lv_observer_t_cb_callback(lv_observer_t *observer, lv_subject_t *subject); /* - * Struct lv_observer_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_max_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_observer_t_methods[]; - -static PyObject *py_lv_observer_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_max_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_observer_t *data = (lv_observer_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "subject") == 0) return mp_read_ptr_lv_subject_t((void*)data->subject); - if (strcmp(attr, "cb") == 0) return mp_lv_funcptr(NULL, data->cb, lv_observer_t_cb_callback, "lv_observer_t_cb", data->user_data); - if (strcmp(attr, "target") == 0) return ptr_to_mp((void*)data->target); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "auto_free_user_data") == 0) return mp_obj_new_int_from_uint(data->auto_free_user_data); - if (strcmp(attr, "notified") == 0) return mp_obj_new_int_from_uint(data->notified); - if (strcmp(attr, "for_obj") == 0) return mp_obj_new_int_from_uint(data->for_obj); - for (PyMethodDef *m = py_lv_observer_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_max_width)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_observer_t_field_names[] = {"subject", "cb", "target", "user_data", "auto_free_user_data", "notified", "for_obj", NULL}; +static PyMethodDef py_lv_obj_set_style_max_width_def = { + "lv_obj_set_style_max_width", + (PyCFunction)py_lv_obj_set_style_max_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + -static PyObject *py_lv_observer_t_dir(PyObject *self, PyObject *unused) +/* + * lvgl extension definition for: + * void lv_obj_set_style_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_observer_t_field_names, py_lv_observer_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_height)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_observer_t_type_methods[] = { - {"__dir__", py_lv_observer_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_height_def = { + "lv_obj_set_style_height", + (PyCFunction)py_lv_obj_set_style_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_observer_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_observer_t *data = (lv_observer_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_observer_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "subject") == 0) { data->subject = (void*)mp_write_ptr_lv_subject_t(value); result = 0; } - if (strcmp(attr, "cb") == 0) { data->cb = mp_lv_callback(value, lv_observer_t_cb_callback, "lv_observer_t_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "target") == 0) { data->target = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "auto_free_user_data") == 0) { data->auto_free_user_data = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "notified") == 0) { data->notified = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "for_obj") == 0) { data->for_obj = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_observer_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_observer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_observer_t)); -} -static void py_lv_observer_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_min_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_min_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_min_height)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_observer_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_observer_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_observer_t_dealloc, - .tp_getattro = (getter)py_lv_observer_t_getattro, - .tp_setattro = (setter)py_lv_observer_t_setattro, - .tp_new = py_lv_observer_t_new, - .tp_methods = py_lv_observer_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_min_height_def = { + "lv_obj_set_style_min_height", + (PyCFunction)py_lv_obj_set_style_min_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_observer_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_max_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_max_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_observer_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_observer_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_observer_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_max_height)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static lv_observer_t mp_write_scratch_lv_observer_t; +static PyMethodDef py_lv_obj_set_style_max_height_def = { + "lv_obj_set_style_max_height", + (PyCFunction)py_lv_obj_set_style_max_height, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_observer_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_length(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_observer_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_observer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_observer_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_observer_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_observer_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_observer_t or dict, got None"); - } - memset(&mp_write_scratch_lv_observer_t, 0, sizeof(lv_observer_t)); - return &mp_write_scratch_lv_observer_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_length)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_observer_t(struct_obj) (*((lv_observer_t*)mp_write_value_ptr_lv_observer_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_length_def = { + "lv_obj_set_style_length", + (PyCFunction)py_lv_obj_set_style_length, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_observer_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_observer_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_x)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_observer_t(field) lv_to_mp_struct_own(&py_lv_observer_t_type, copy_buffer(&field, sizeof(lv_observer_t))) -#define mp_read_byref_lv_observer_t(field) mp_read_ptr_lv_observer_t(&field) +static PyMethodDef py_lv_obj_set_style_x_def = { + "lv_obj_set_style_x", + (PyCFunction)py_lv_obj_set_style_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, lv_subject_t *subject, int32_t ref_value) + * void lv_obj_set_style_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *style_py; PyObject *selector_py; PyObject *subject_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOOl", &style_py, &selector_py, &subject_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + int32_t value = (int32_t)value_val; lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - int32_t ref_value = (int32_t)ref_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, lv_subject_t *, int32_t))lv_obj_bind_style)(obj, style, selector, subject, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_y)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_style_def = { - "lv_obj_bind_style", - (PyCFunction)py_lv_obj_bind_style, +static PyMethodDef py_lv_obj_set_style_y_def = { + "lv_obj_set_style_y", + (PyCFunction)py_lv_obj_set_style_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -24405,1891 +24645,1673 @@ static PyMethodDef py_lv_obj_bind_style_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector, lv_subject_t *subject) + * void lv_obj_set_style_align(lv_obj_t *obj, lv_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *prop_py; PyObject *selector_py; PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "OOO", &prop_py, &selector_py, &subject_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_align_t value = (int)mp_obj_get_int(value_py); lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t, lv_subject_t *))lv_obj_bind_style_prop)(obj, prop, selector, subject); + ((void (*)(lv_obj_t *, lv_align_t, lv_style_selector_t))lv_obj_set_style_align)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_style_prop_def = { - "lv_obj_bind_style_prop", - (PyCFunction)py_lv_obj_bind_style_prop, +static PyMethodDef py_lv_obj_set_style_align_def = { + "lv_obj_set_style_align", + (PyCFunction)py_lv_obj_set_style_align, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_draw_dsc_base_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_transform_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_dsc_base_t_methods[]; - -static PyObject *py_lv_draw_dsc_base_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_transform_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_dsc_base_t *data = (lv_draw_dsc_base_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "obj") == 0) return lv_to_mp((void*)data->obj); - if (strcmp(attr, "part") == 0) return mp_obj_new_int_from_uint(data->part); - if (strcmp(attr, "id1") == 0) return mp_obj_new_int_from_uint(data->id1); - if (strcmp(attr, "id2") == 0) return mp_obj_new_int_from_uint(data->id2); - if (strcmp(attr, "layer") == 0) return mp_read_ptr_lv_layer_t((void*)data->layer); - if (strcmp(attr, "drop_shadow_ofs_x") == 0) return mp_obj_new_int(data->drop_shadow_ofs_x); - if (strcmp(attr, "drop_shadow_ofs_y") == 0) return mp_obj_new_int(data->drop_shadow_ofs_y); - if (strcmp(attr, "drop_shadow_color") == 0) return mp_read_byref_lv_color_t(data->drop_shadow_color); - if (strcmp(attr, "drop_shadow_opa") == 0) return mp_obj_new_int_from_uint(data->drop_shadow_opa); - if (strcmp(attr, "drop_shadow_blur_radius") == 0) return mp_obj_new_int(data->drop_shadow_blur_radius); - if (strcmp(attr, "drop_shadow_quality") == 0) return mp_obj_new_int(data->drop_shadow_quality); - if (strcmp(attr, "dsc_size") == 0) return mp_obj_new_int_from_uint(data->dsc_size); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_draw_dsc_base_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_dsc_base_t_field_names[] = {"obj", "part", "id1", "id2", "layer", "drop_shadow_ofs_x", "drop_shadow_ofs_y", "drop_shadow_color", "drop_shadow_opa", "drop_shadow_blur_radius", "drop_shadow_quality", "dsc_size", "user_data", NULL}; - -static PyObject *py_lv_draw_dsc_base_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_dsc_base_t_field_names, py_lv_draw_dsc_base_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_width)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_dsc_base_t_type_methods[] = { - {"__dir__", py_lv_draw_dsc_base_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_transform_width_def = { + "lv_obj_set_style_transform_width", + (PyCFunction)py_lv_obj_set_style_transform_width, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_dsc_base_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_dsc_base_t *data = (lv_draw_dsc_base_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_dsc_base_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "obj") == 0) { data->obj = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "part") == 0) { data->part = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "id1") == 0) { data->id1 = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "id2") == 0) { data->id2 = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "layer") == 0) { data->layer = (void*)mp_write_ptr_lv_layer_t(value); result = 0; } - if (strcmp(attr, "drop_shadow_ofs_x") == 0) { data->drop_shadow_ofs_x = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "drop_shadow_ofs_y") == 0) { data->drop_shadow_ofs_y = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "drop_shadow_color") == 0) { data->drop_shadow_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "drop_shadow_opa") == 0) { data->drop_shadow_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "drop_shadow_blur_radius") == 0) { data->drop_shadow_blur_radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "drop_shadow_quality") == 0) { data->drop_shadow_quality = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "dsc_size") == 0) { data->dsc_size = (size_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_dsc_base_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_dsc_base_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_dsc_base_t)); -} -static void py_lv_draw_dsc_base_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_transform_height(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_transform_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_height)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_dsc_base_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_dsc_base_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_dsc_base_t_dealloc, - .tp_getattro = (getter)py_lv_draw_dsc_base_t_getattro, - .tp_setattro = (setter)py_lv_draw_dsc_base_t_setattro, - .tp_new = py_lv_draw_dsc_base_t_new, - .tp_methods = py_lv_draw_dsc_base_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_transform_height_def = { + "lv_obj_set_style_transform_height", + (PyCFunction)py_lv_obj_set_style_transform_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_dsc_base_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_dsc_base_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_dsc_base_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_dsc_base_t*)self->data; -} - -static lv_draw_dsc_base_t mp_write_scratch_lv_draw_dsc_base_t; - -static inline void* mp_write_value_ptr_lv_draw_dsc_base_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_dsc_base_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_dsc_base_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_dsc_base_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_dsc_base_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_dsc_base_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_dsc_base_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_dsc_base_t, 0, sizeof(lv_draw_dsc_base_t)); - return &mp_write_scratch_lv_draw_dsc_base_t; -} - -#define mp_write_lv_draw_dsc_base_t(struct_obj) (*((lv_draw_dsc_base_t*)mp_write_value_ptr_lv_draw_dsc_base_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_dsc_base_t(void *field) +/* + * lvgl extension definition for: + * void lv_obj_set_style_translate_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_translate_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_dsc_base_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_translate_x)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_dsc_base_t(field) lv_to_mp_struct_own(&py_lv_draw_dsc_base_t_type, copy_buffer(&field, sizeof(lv_draw_dsc_base_t))) -#define mp_read_byref_lv_draw_dsc_base_t(field) mp_read_ptr_lv_draw_dsc_base_t(&field) +static PyMethodDef py_lv_obj_set_style_translate_x_def = { + "lv_obj_set_style_translate_x", + (PyCFunction)py_lv_obj_set_style_translate_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_rect_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_translate_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_rect_dsc_t_methods[]; - -static PyObject *py_lv_draw_rect_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_translate_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_rect_dsc_t *data = (lv_draw_rect_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); - if (strcmp(attr, "bg_image_src") == 0) return ptr_to_mp((void*)data->bg_image_src); - if (strcmp(attr, "bg_image_symbol_font") == 0) return ptr_to_mp((void*)data->bg_image_symbol_font); - if (strcmp(attr, "bg_image_recolor") == 0) return mp_read_byref_lv_color_t(data->bg_image_recolor); - if (strcmp(attr, "bg_image_opa") == 0) return mp_obj_new_int_from_uint(data->bg_image_opa); - if (strcmp(attr, "bg_image_recolor_opa") == 0) return mp_obj_new_int_from_uint(data->bg_image_recolor_opa); - if (strcmp(attr, "bg_image_tiled") == 0) return mp_obj_new_int_from_uint(data->bg_image_tiled); - if (strcmp(attr, "bg_opa") == 0) return mp_obj_new_int_from_uint(data->bg_opa); - if (strcmp(attr, "border_opa") == 0) return mp_obj_new_int_from_uint(data->border_opa); - if (strcmp(attr, "outline_opa") == 0) return mp_obj_new_int_from_uint(data->outline_opa); - if (strcmp(attr, "shadow_opa") == 0) return mp_obj_new_int_from_uint(data->shadow_opa); - if (strcmp(attr, "bg_color") == 0) return mp_read_byref_lv_color_t(data->bg_color); - if (strcmp(attr, "bg_grad") == 0) return mp_read_byref_lv_grad_dsc_t(data->bg_grad); - if (strcmp(attr, "bg_image_colorkey") == 0) return mp_read_ptr_lv_image_colorkey_t((void*)data->bg_image_colorkey); - if (strcmp(attr, "border_color") == 0) return mp_read_byref_lv_color_t(data->border_color); - if (strcmp(attr, "border_width") == 0) return mp_obj_new_int(data->border_width); - if (strcmp(attr, "border_side") == 0) return mp_obj_new_int(data->border_side); - if (strcmp(attr, "border_post") == 0) return mp_obj_new_int_from_uint(data->border_post); - if (strcmp(attr, "outline_color") == 0) return mp_read_byref_lv_color_t(data->outline_color); - if (strcmp(attr, "outline_width") == 0) return mp_obj_new_int(data->outline_width); - if (strcmp(attr, "outline_pad") == 0) return mp_obj_new_int(data->outline_pad); - if (strcmp(attr, "shadow_color") == 0) return mp_read_byref_lv_color_t(data->shadow_color); - if (strcmp(attr, "shadow_width") == 0) return mp_obj_new_int(data->shadow_width); - if (strcmp(attr, "shadow_offset_x") == 0) return mp_obj_new_int(data->shadow_offset_x); - if (strcmp(attr, "shadow_offset_y") == 0) return mp_obj_new_int(data->shadow_offset_y); - if (strcmp(attr, "shadow_spread") == 0) return mp_obj_new_int(data->shadow_spread); - for (PyMethodDef *m = py_lv_draw_rect_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_translate_y)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_draw_rect_dsc_t_field_names[] = {"base", "radius", "bg_image_src", "bg_image_symbol_font", "bg_image_recolor", "bg_image_opa", "bg_image_recolor_opa", "bg_image_tiled", "bg_opa", "border_opa", "outline_opa", "shadow_opa", "bg_color", "bg_grad", "bg_image_colorkey", "border_color", "border_width", "border_side", "border_post", "outline_color", "outline_width", "outline_pad", "shadow_color", "shadow_width", "shadow_offset_x", "shadow_offset_y", "shadow_spread", NULL}; +static PyMethodDef py_lv_obj_set_style_translate_y_def = { + "lv_obj_set_style_translate_y", + (PyCFunction)py_lv_obj_set_style_translate_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_rect_dsc_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_translate_radial(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_translate_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_rect_dsc_t_field_names, py_lv_draw_rect_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_translate_radial)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_rect_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_rect_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_translate_radial_def = { + "lv_obj_set_style_translate_radial", + (PyCFunction)py_lv_obj_set_style_translate_radial, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_rect_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_rect_dsc_t *data = (lv_draw_rect_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_rect_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "bg_image_src") == 0) { data->bg_image_src = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "bg_image_symbol_font") == 0) { data->bg_image_symbol_font = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "bg_image_recolor") == 0) { data->bg_image_recolor = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "bg_image_opa") == 0) { data->bg_image_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "bg_image_recolor_opa") == 0) { data->bg_image_recolor_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "bg_image_tiled") == 0) { data->bg_image_tiled = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "bg_opa") == 0) { data->bg_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "border_opa") == 0) { data->border_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_opa") == 0) { data->outline_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "shadow_opa") == 0) { data->shadow_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "bg_color") == 0) { data->bg_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "bg_grad") == 0) { data->bg_grad = mp_write_lv_grad_dsc_t(value); result = 0; } - if (strcmp(attr, "bg_image_colorkey") == 0) { data->bg_image_colorkey = (void*)mp_write_ptr_lv_image_colorkey_t(value); result = 0; } - if (strcmp(attr, "border_color") == 0) { data->border_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "border_width") == 0) { data->border_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "border_side") == 0) { data->border_side = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "border_post") == 0) { data->border_post = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_color") == 0) { data->outline_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "outline_width") == 0) { data->outline_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_pad") == 0) { data->outline_pad = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "shadow_color") == 0) { data->shadow_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "shadow_width") == 0) { data->shadow_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "shadow_offset_x") == 0) { data->shadow_offset_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "shadow_offset_y") == 0) { data->shadow_offset_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "shadow_spread") == 0) { data->shadow_spread = (int32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_rect_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_rect_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_rect_dsc_t)); -} -static void py_lv_draw_rect_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_transform_scale_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_transform_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_scale_x)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_rect_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_rect_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_rect_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_rect_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_rect_dsc_t_setattro, - .tp_new = py_lv_draw_rect_dsc_t_new, - .tp_methods = py_lv_draw_rect_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_transform_scale_x_def = { + "lv_obj_set_style_transform_scale_x", + (PyCFunction)py_lv_obj_set_style_transform_scale_x, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_rect_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_rect_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_rect_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_rect_dsc_t*)self->data; -} - -static lv_draw_rect_dsc_t mp_write_scratch_lv_draw_rect_dsc_t; -static inline void* mp_write_value_ptr_lv_draw_rect_dsc_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_transform_scale_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_transform_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_rect_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_rect_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_rect_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_rect_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_rect_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_rect_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_rect_dsc_t, 0, sizeof(lv_draw_rect_dsc_t)); - return &mp_write_scratch_lv_draw_rect_dsc_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_scale_y)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_rect_dsc_t(struct_obj) (*((lv_draw_rect_dsc_t*)mp_write_value_ptr_lv_draw_rect_dsc_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_transform_scale_y_def = { + "lv_obj_set_style_transform_scale_y", + (PyCFunction)py_lv_obj_set_style_transform_scale_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_rect_dsc_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_transform_rotation(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_transform_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_rect_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_rotation)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_rect_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_rect_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_rect_dsc_t))) -#define mp_read_byref_lv_draw_rect_dsc_t(field) mp_read_ptr_lv_draw_rect_dsc_t(&field) +static PyMethodDef py_lv_obj_set_style_transform_rotation_def = { + "lv_obj_set_style_transform_rotation", + (PyCFunction)py_lv_obj_set_style_transform_rotation, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * void lv_obj_init_draw_rect_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_rect_dsc_t *draw_dsc) + * void lv_obj_set_style_transform_pivot_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_init_draw_rect_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_transform_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_draw_rect_dsc_t *draw_dsc = mp_write_ptr_lv_draw_rect_dsc_t(draw_dsc_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_draw_rect_dsc_t *))lv_obj_init_draw_rect_dsc)(obj, part, draw_dsc); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_pivot_x)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_init_draw_rect_dsc_def = { - "lv_obj_init_draw_rect_dsc", - (PyCFunction)py_lv_obj_init_draw_rect_dsc, +static PyMethodDef py_lv_obj_set_style_transform_pivot_x_def = { + "lv_obj_set_style_transform_pivot_x", + (PyCFunction)py_lv_obj_set_style_transform_pivot_x, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_draw_label_hint_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_transform_pivot_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_label_hint_t_methods[]; - -static PyObject *py_lv_draw_label_hint_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_transform_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_label_hint_t *data = (lv_draw_label_hint_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "line_start") == 0) return mp_obj_new_int(data->line_start); - if (strcmp(attr, "y") == 0) return mp_obj_new_int(data->y); - if (strcmp(attr, "coord_y") == 0) return mp_obj_new_int(data->coord_y); - for (PyMethodDef *m = py_lv_draw_label_hint_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_label_hint_t_field_names[] = {"line_start", "y", "coord_y", NULL}; - -static PyObject *py_lv_draw_label_hint_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_label_hint_t_field_names, py_lv_draw_label_hint_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_pivot_y)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_label_hint_t_type_methods[] = { - {"__dir__", py_lv_draw_label_hint_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_transform_pivot_y_def = { + "lv_obj_set_style_transform_pivot_y", + (PyCFunction)py_lv_obj_set_style_transform_pivot_y, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_label_hint_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_label_hint_t *data = (lv_draw_label_hint_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_label_hint_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "line_start") == 0) { data->line_start = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y") == 0) { data->y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "coord_y") == 0) { data->coord_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_label_hint_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_label_hint_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_label_hint_t)); -} -static void py_lv_draw_label_hint_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_transform_skew_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_transform_skew_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_skew_x)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_label_hint_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_label_hint_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_label_hint_t_dealloc, - .tp_getattro = (getter)py_lv_draw_label_hint_t_getattro, - .tp_setattro = (setter)py_lv_draw_label_hint_t_setattro, - .tp_new = py_lv_draw_label_hint_t_new, - .tp_methods = py_lv_draw_label_hint_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_transform_skew_x_def = { + "lv_obj_set_style_transform_skew_x", + (PyCFunction)py_lv_obj_set_style_transform_skew_x, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_label_hint_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_label_hint_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_label_hint_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_label_hint_t*)self->data; -} - -static lv_draw_label_hint_t mp_write_scratch_lv_draw_label_hint_t; -static inline void* mp_write_value_ptr_lv_draw_label_hint_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_transform_skew_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_transform_skew_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_label_hint_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_label_hint_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_label_hint_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_label_hint_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_label_hint_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_label_hint_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_label_hint_t, 0, sizeof(lv_draw_label_hint_t)); - return &mp_write_scratch_lv_draw_label_hint_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_skew_y)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_label_hint_t(struct_obj) (*((lv_draw_label_hint_t*)mp_write_value_ptr_lv_draw_label_hint_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_transform_skew_y_def = { + "lv_obj_set_style_transform_skew_y", + (PyCFunction)py_lv_obj_set_style_transform_skew_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_label_hint_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_pad_top(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_pad_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_label_hint_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_top)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_label_hint_t(field) lv_to_mp_struct_own(&py_lv_draw_label_hint_t_type, copy_buffer(&field, sizeof(lv_draw_label_hint_t))) -#define mp_read_byref_lv_draw_label_hint_t(field) mp_read_ptr_lv_draw_label_hint_t(&field) +static PyMethodDef py_lv_obj_set_style_pad_top_def = { + "lv_obj_set_style_pad_top", + (PyCFunction)py_lv_obj_set_style_pad_top, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_label_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_pad_bottom(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_label_dsc_t_methods[]; - -static PyObject *py_lv_draw_label_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_pad_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_label_dsc_t *data = (lv_draw_label_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "text") == 0) return convert_to_str((void*)data->text); - if (strcmp(attr, "text_size") == 0) return mp_read_byref_lv_point_t(data->text_size); - if (strcmp(attr, "font") == 0) return mp_read_ptr_lv_font_t((void*)data->font); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "line_space") == 0) return mp_obj_new_int(data->line_space); - if (strcmp(attr, "letter_space") == 0) return mp_obj_new_int(data->letter_space); - if (strcmp(attr, "ofs_x") == 0) return mp_obj_new_int(data->ofs_x); - if (strcmp(attr, "ofs_y") == 0) return mp_obj_new_int(data->ofs_y); - if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); - if (strcmp(attr, "sel_start") == 0) return mp_obj_new_int_from_uint(data->sel_start); - if (strcmp(attr, "sel_end") == 0) return mp_obj_new_int_from_uint(data->sel_end); - if (strcmp(attr, "sel_color") == 0) return mp_read_byref_lv_color_t(data->sel_color); - if (strcmp(attr, "sel_bg_color") == 0) return mp_read_byref_lv_color_t(data->sel_bg_color); - if (strcmp(attr, "text_length") == 0) return mp_obj_new_int_from_uint(data->text_length); - if (strcmp(attr, "align") == 0) return mp_obj_new_int(data->align); - if (strcmp(attr, "bidi_dir") == 0) return mp_obj_new_int(data->bidi_dir); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "outline_stroke_opa") == 0) return mp_obj_new_int_from_uint(data->outline_stroke_opa); - if (strcmp(attr, "decor") == 0) return mp_obj_new_int(data->decor); - if (strcmp(attr, "flag") == 0) return mp_obj_new_int(data->flag); - if (strcmp(attr, "text_local") == 0) return mp_obj_new_int_from_uint(data->text_local); - if (strcmp(attr, "text_static") == 0) return mp_obj_new_int_from_uint(data->text_static); - if (strcmp(attr, "has_bided") == 0) return mp_obj_new_int_from_uint(data->has_bided); - if (strcmp(attr, "hint") == 0) return mp_read_ptr_lv_draw_label_hint_t((void*)data->hint); - if (strcmp(attr, "outline_stroke_color") == 0) return mp_read_byref_lv_color_t(data->outline_stroke_color); - if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); - for (PyMethodDef *m = py_lv_draw_label_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_bottom)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_draw_label_dsc_t_field_names[] = {"base", "text", "text_size", "font", "color", "line_space", "letter_space", "ofs_x", "ofs_y", "rotation", "sel_start", "sel_end", "sel_color", "sel_bg_color", "text_length", "align", "bidi_dir", "opa", "outline_stroke_opa", "decor", "flag", "text_local", "text_static", "has_bided", "hint", "outline_stroke_color", "outline_stroke_width", NULL}; +static PyMethodDef py_lv_obj_set_style_pad_bottom_def = { + "lv_obj_set_style_pad_bottom", + (PyCFunction)py_lv_obj_set_style_pad_bottom, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_label_dsc_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_pad_left(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_pad_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_label_dsc_t_field_names, py_lv_draw_label_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_left)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_label_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_label_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_pad_left_def = { + "lv_obj_set_style_pad_left", + (PyCFunction)py_lv_obj_set_style_pad_left, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_label_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_label_dsc_t *data = (lv_draw_label_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_label_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "text") == 0) { data->text = (void*)(char*)convert_from_str(value); result = 0; } - if (strcmp(attr, "text_size") == 0) { data->text_size = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "font") == 0) { data->font = (void*)mp_write_ptr_lv_font_t(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "line_space") == 0) { data->line_space = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "letter_space") == 0) { data->letter_space = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ofs_x") == 0) { data->ofs_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ofs_y") == 0) { data->ofs_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "sel_start") == 0) { data->sel_start = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "sel_end") == 0) { data->sel_end = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "sel_color") == 0) { data->sel_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "sel_bg_color") == 0) { data->sel_bg_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "text_length") == 0) { data->text_length = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "align") == 0) { data->align = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "bidi_dir") == 0) { data->bidi_dir = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_stroke_opa") == 0) { data->outline_stroke_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "decor") == 0) { data->decor = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "flag") == 0) { data->flag = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "text_local") == 0) { data->text_local = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "text_static") == 0) { data->text_static = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "has_bided") == 0) { data->has_bided = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "hint") == 0) { data->hint = (void*)mp_write_ptr_lv_draw_label_hint_t(value); result = 0; } - if (strcmp(attr, "outline_stroke_color") == 0) { data->outline_stroke_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_label_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_label_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_label_dsc_t)); -} -static void py_lv_draw_label_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_pad_right(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_pad_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_right)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_label_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_label_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_label_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_label_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_label_dsc_t_setattro, - .tp_new = py_lv_draw_label_dsc_t_new, - .tp_methods = py_lv_draw_label_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_pad_right_def = { + "lv_obj_set_style_pad_right", + (PyCFunction)py_lv_obj_set_style_pad_right, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_label_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_label_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_label_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_label_dsc_t*)self->data; -} - -static lv_draw_label_dsc_t mp_write_scratch_lv_draw_label_dsc_t; -static inline void* mp_write_value_ptr_lv_draw_label_dsc_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_pad_row(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_pad_row(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_label_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_label_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_label_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_label_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_label_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_label_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_label_dsc_t, 0, sizeof(lv_draw_label_dsc_t)); - return &mp_write_scratch_lv_draw_label_dsc_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_row)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_label_dsc_t(struct_obj) (*((lv_draw_label_dsc_t*)mp_write_value_ptr_lv_draw_label_dsc_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_pad_row_def = { + "lv_obj_set_style_pad_row", + (PyCFunction)py_lv_obj_set_style_pad_row, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_label_dsc_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_pad_column(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_pad_column(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_label_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_column)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_label_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_label_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_label_dsc_t))) -#define mp_read_byref_lv_draw_label_dsc_t(field) mp_read_ptr_lv_draw_label_dsc_t(&field) +static PyMethodDef py_lv_obj_set_style_pad_column_def = { + "lv_obj_set_style_pad_column", + (PyCFunction)py_lv_obj_set_style_pad_column, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * void lv_obj_init_draw_label_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_label_dsc_t *draw_dsc) + * void lv_obj_set_style_pad_radial(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_init_draw_label_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_pad_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_draw_label_dsc_t *draw_dsc = mp_write_ptr_lv_draw_label_dsc_t(draw_dsc_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_draw_label_dsc_t *))lv_obj_init_draw_label_dsc)(obj, part, draw_dsc); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_radial)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_init_draw_label_dsc_def = { - "lv_obj_init_draw_label_dsc", - (PyCFunction)py_lv_obj_init_draw_label_dsc, +static PyMethodDef py_lv_obj_set_style_pad_radial_def = { + "lv_obj_set_style_pad_radial", + (PyCFunction)py_lv_obj_set_style_pad_radial, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_draw_image_sup_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_margin_top(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_image_sup_t_methods[]; - -static PyObject *py_lv_draw_image_sup_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_margin_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_image_sup_t *data = (lv_draw_image_sup_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "alpha_color") == 0) return mp_read_byref_lv_color_t(data->alpha_color); - if (strcmp(attr, "palette") == 0) return mp_read_ptr_lv_color32_t((void*)data->palette); - if (strcmp(attr, "palette_size") == 0) return mp_obj_new_int_from_uint(data->palette_size); - for (PyMethodDef *m = py_lv_draw_image_sup_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_top)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_draw_image_sup_t_field_names[] = {"alpha_color", "palette", "palette_size", NULL}; +static PyMethodDef py_lv_obj_set_style_margin_top_def = { + "lv_obj_set_style_margin_top", + (PyCFunction)py_lv_obj_set_style_margin_top, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_image_sup_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_margin_bottom(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_margin_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_image_sup_t_field_names, py_lv_draw_image_sup_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_bottom)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_image_sup_t_type_methods[] = { - {"__dir__", py_lv_draw_image_sup_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_margin_bottom_def = { + "lv_obj_set_style_margin_bottom", + (PyCFunction)py_lv_obj_set_style_margin_bottom, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_image_sup_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_image_sup_t *data = (lv_draw_image_sup_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_image_sup_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "alpha_color") == 0) { data->alpha_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "palette") == 0) { data->palette = (void*)mp_write_ptr_lv_color32_t(value); result = 0; } - if (strcmp(attr, "palette_size") == 0) { data->palette_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_image_sup_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_image_sup_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_image_sup_t)); -} -static void py_lv_draw_image_sup_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_margin_left(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_margin_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_left)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_image_sup_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_image_sup_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_image_sup_t_dealloc, - .tp_getattro = (getter)py_lv_draw_image_sup_t_getattro, - .tp_setattro = (setter)py_lv_draw_image_sup_t_setattro, - .tp_new = py_lv_draw_image_sup_t_new, - .tp_methods = py_lv_draw_image_sup_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_margin_left_def = { + "lv_obj_set_style_margin_left", + (PyCFunction)py_lv_obj_set_style_margin_left, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_image_sup_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_image_sup_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_image_sup_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_image_sup_t*)self->data; -} - -static lv_draw_image_sup_t mp_write_scratch_lv_draw_image_sup_t; -static inline void* mp_write_value_ptr_lv_draw_image_sup_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_margin_right(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_margin_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_image_sup_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_image_sup_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_image_sup_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_image_sup_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_image_sup_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_image_sup_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_image_sup_t, 0, sizeof(lv_draw_image_sup_t)); - return &mp_write_scratch_lv_draw_image_sup_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_right)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_image_sup_t(struct_obj) (*((lv_draw_image_sup_t*)mp_write_value_ptr_lv_draw_image_sup_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_margin_right_def = { + "lv_obj_set_style_margin_right", + (PyCFunction)py_lv_obj_set_style_margin_right, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_image_sup_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_image_sup_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_bg_color)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_image_sup_t(field) lv_to_mp_struct_own(&py_lv_draw_image_sup_t_type, copy_buffer(&field, sizeof(lv_draw_image_sup_t))) -#define mp_read_byref_lv_draw_image_sup_t(field) mp_read_ptr_lv_draw_image_sup_t(&field) +static PyMethodDef py_lv_obj_set_style_bg_color_def = { + "lv_obj_set_style_bg_color", + (PyCFunction)py_lv_obj_set_style_bg_color, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_image_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_bg_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_image_dsc_t_methods[]; - -static PyObject *py_lv_image_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_bg_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_dsc_t *data = (lv_image_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); - if (strcmp(attr, "data_size") == 0) return mp_obj_new_int_from_uint(data->data_size); - if (strcmp(attr, "data") == 0) return mp_array_from_u8ptr((void*)data->data); - if (strcmp(attr, "reserved") == 0) return ptr_to_mp((void*)data->reserved); - if (strcmp(attr, "reserved_2") == 0) return ptr_to_mp((void*)data->reserved_2); - for (PyMethodDef *m = py_lv_image_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_image_dsc_t_field_names[] = {"header", "data_size", "data", "reserved", "reserved_2", NULL}; +static PyMethodDef py_lv_obj_set_style_bg_opa_def = { + "lv_obj_set_style_bg_opa", + (PyCFunction)py_lv_obj_set_style_bg_opa, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_image_dsc_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_grad_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_grad_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_image_dsc_t_field_names, py_lv_image_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_bg_grad_color)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_dsc_t_type_methods[] = { - {"__dir__", py_lv_image_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_bg_grad_color_def = { + "lv_obj_set_style_bg_grad_color", + (PyCFunction)py_lv_obj_set_style_bg_grad_color, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_image_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_dsc_t *data = (lv_image_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_image_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } - if (strcmp(attr, "data_size") == 0) { data->data_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "data") == 0) { data->data = (void*)mp_array_to_u8ptr(value); result = 0; } - if (strcmp(attr, "reserved") == 0) { data->reserved = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "reserved_2") == 0) { data->reserved_2 = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_image_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_image_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_image_dsc_t)); -} -static void py_lv_image_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_grad_dir(lv_obj_t *obj, lv_grad_dir_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_grad_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_grad_dir_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_grad_dir_t, lv_style_selector_t))lv_obj_set_style_bg_grad_dir)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_image_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_image_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_image_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_image_dsc_t_getattro, - .tp_setattro = (setter)py_lv_image_dsc_t_setattro, - .tp_new = py_lv_image_dsc_t_new, - .tp_methods = py_lv_image_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_bg_grad_dir_def = { + "lv_obj_set_style_bg_grad_dir", + (PyCFunction)py_lv_obj_set_style_bg_grad_dir, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_image_dsc_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_main_stop(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_main_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_image_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_image_dsc_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_bg_main_stop)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static lv_image_dsc_t mp_write_scratch_lv_image_dsc_t; +static PyMethodDef py_lv_obj_set_style_bg_main_stop_def = { + "lv_obj_set_style_bg_main_stop", + (PyCFunction)py_lv_obj_set_style_bg_main_stop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_image_dsc_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_grad_stop(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_grad_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_image_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_image_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_image_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_image_dsc_t, 0, sizeof(lv_image_dsc_t)); - return &mp_write_scratch_lv_image_dsc_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_bg_grad_stop)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_image_dsc_t(struct_obj) (*((lv_image_dsc_t*)mp_write_value_ptr_lv_image_dsc_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_bg_grad_stop_def = { + "lv_obj_set_style_bg_grad_stop", + (PyCFunction)py_lv_obj_set_style_bg_grad_stop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_image_dsc_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_main_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_main_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_image_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_main_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_image_dsc_t(field) lv_to_mp_struct_own(&py_lv_image_dsc_t_type, copy_buffer(&field, sizeof(lv_image_dsc_t))) -#define mp_read_byref_lv_image_dsc_t(field) mp_read_ptr_lv_image_dsc_t(&field) +static PyMethodDef py_lv_obj_set_style_bg_main_opa_def = { + "lv_obj_set_style_bg_main_opa", + (PyCFunction)py_lv_obj_set_style_bg_main_opa, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_image_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_bg_grad_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_image_dsc_t_methods[]; - -static PyObject *py_lv_draw_image_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_bg_grad_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_image_dsc_t *data = (lv_draw_image_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); - if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); - if (strcmp(attr, "clip_radius") == 0) return mp_obj_new_int(data->clip_radius); - if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); - if (strcmp(attr, "scale_x") == 0) return mp_obj_new_int(data->scale_x); - if (strcmp(attr, "scale_y") == 0) return mp_obj_new_int(data->scale_y); - if (strcmp(attr, "skew_x") == 0) return mp_obj_new_int(data->skew_x); - if (strcmp(attr, "skew_y") == 0) return mp_obj_new_int(data->skew_y); - if (strcmp(attr, "pivot") == 0) return mp_read_byref_lv_point_t(data->pivot); - if (strcmp(attr, "recolor") == 0) return mp_read_byref_lv_color_t(data->recolor); - if (strcmp(attr, "recolor_opa") == 0) return mp_obj_new_int_from_uint(data->recolor_opa); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); - if (strcmp(attr, "antialias") == 0) return mp_obj_new_int_from_uint(data->antialias); - if (strcmp(attr, "tile") == 0) return mp_obj_new_int_from_uint(data->tile); - if (strcmp(attr, "colorkey") == 0) return mp_read_ptr_lv_image_colorkey_t((void*)data->colorkey); - if (strcmp(attr, "sup") == 0) return mp_read_ptr_lv_draw_image_sup_t((void*)data->sup); - if (strcmp(attr, "image_area") == 0) return mp_read_byref_lv_area_t(data->image_area); - if (strcmp(attr, "bitmap_mask_src") == 0) return mp_read_ptr_lv_image_dsc_t((void*)data->bitmap_mask_src); - for (PyMethodDef *m = py_lv_draw_image_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_grad_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_draw_image_dsc_t_field_names[] = {"base", "src", "header", "clip_radius", "rotation", "scale_x", "scale_y", "skew_x", "skew_y", "pivot", "recolor", "recolor_opa", "opa", "blend_mode", "antialias", "tile", "colorkey", "sup", "image_area", "bitmap_mask_src", NULL}; +static PyMethodDef py_lv_obj_set_style_bg_grad_opa_def = { + "lv_obj_set_style_bg_grad_opa", + (PyCFunction)py_lv_obj_set_style_bg_grad_opa, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_image_dsc_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_grad(lv_obj_t *obj, const lv_grad_dsc_t *value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_grad(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_image_dsc_t_field_names, py_lv_draw_image_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_grad_dsc_t *value = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_grad_dsc_t *, lv_style_selector_t))lv_obj_set_style_bg_grad)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_image_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_image_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_bg_grad_def = { + "lv_obj_set_style_bg_grad", + (PyCFunction)py_lv_obj_set_style_bg_grad, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_image_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_image_dsc_t *data = (lv_draw_image_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_image_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } - if (strcmp(attr, "clip_radius") == 0) { data->clip_radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "scale_x") == 0) { data->scale_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "scale_y") == 0) { data->scale_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "skew_x") == 0) { data->skew_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "skew_y") == 0) { data->skew_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pivot") == 0) { data->pivot = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "recolor") == 0) { data->recolor = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "recolor_opa") == 0) { data->recolor_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "antialias") == 0) { data->antialias = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "tile") == 0) { data->tile = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "colorkey") == 0) { data->colorkey = (void*)mp_write_ptr_lv_image_colorkey_t(value); result = 0; } - if (strcmp(attr, "sup") == 0) { data->sup = (void*)mp_write_ptr_lv_draw_image_sup_t(value); result = 0; } - if (strcmp(attr, "image_area") == 0) { data->image_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "bitmap_mask_src") == 0) { data->bitmap_mask_src = (void*)mp_write_ptr_lv_image_dsc_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_image_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_image_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_image_dsc_t)); -} -static void py_lv_draw_image_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_image_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const void *value = (const void *)mp_to_ptr(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_obj_set_style_bg_image_src)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_image_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_image_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_image_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_image_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_image_dsc_t_setattro, - .tp_new = py_lv_draw_image_dsc_t_new, - .tp_methods = py_lv_draw_image_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_bg_image_src_def = { + "lv_obj_set_style_bg_image_src", + (PyCFunction)py_lv_obj_set_style_bg_image_src, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_image_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_image_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_image_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_image_dsc_t*)self->data; -} - -static lv_draw_image_dsc_t mp_write_scratch_lv_draw_image_dsc_t; -static inline void* mp_write_value_ptr_lv_draw_image_dsc_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_image_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_image_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_image_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_image_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_image_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_image_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_image_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_image_dsc_t, 0, sizeof(lv_draw_image_dsc_t)); - return &mp_write_scratch_lv_draw_image_dsc_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_image_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_image_dsc_t(struct_obj) (*((lv_draw_image_dsc_t*)mp_write_value_ptr_lv_draw_image_dsc_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_bg_image_opa_def = { + "lv_obj_set_style_bg_image_opa", + (PyCFunction)py_lv_obj_set_style_bg_image_opa, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_image_dsc_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_bg_image_recolor(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_bg_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_image_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_bg_image_recolor)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_image_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_image_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_image_dsc_t))) -#define mp_read_byref_lv_draw_image_dsc_t(field) mp_read_ptr_lv_draw_image_dsc_t(&field) +static PyMethodDef py_lv_obj_set_style_bg_image_recolor_def = { + "lv_obj_set_style_bg_image_recolor", + (PyCFunction)py_lv_obj_set_style_bg_image_recolor, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * void lv_obj_init_draw_image_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_image_dsc_t *draw_dsc) + * void lv_obj_set_style_bg_image_recolor_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_init_draw_image_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_bg_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_draw_image_dsc_t *draw_dsc = mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_draw_image_dsc_t *))lv_obj_init_draw_image_dsc)(obj, part, draw_dsc); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_bg_image_recolor_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_init_draw_image_dsc_def = { - "lv_obj_init_draw_image_dsc", - (PyCFunction)py_lv_obj_init_draw_image_dsc, +static PyMethodDef py_lv_obj_set_style_bg_image_recolor_opa_def = { + "lv_obj_set_style_bg_image_recolor_opa", + (PyCFunction)py_lv_obj_set_style_bg_image_recolor_opa, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_point_precise_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_bg_image_tiled(lv_obj_t *obj, bool value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_point_precise_t_methods[]; - -static PyObject *py_lv_point_precise_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_bg_image_tiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_point_precise_t *data = (lv_point_precise_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "x") == 0) return mp_obj_new_float_from_f(data->x); - if (strcmp(attr, "y") == 0) return mp_obj_new_float_from_f(data->y); - for (PyMethodDef *m = py_lv_point_precise_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool value = (value_val != 0); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_bg_image_tiled)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_point_precise_t_field_names[] = {"x", "y", NULL}; +static PyMethodDef py_lv_obj_set_style_bg_image_tiled_def = { + "lv_obj_set_style_bg_image_tiled", + (PyCFunction)py_lv_obj_set_style_bg_image_tiled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_point_precise_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_border_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_border_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_point_precise_t_field_names, py_lv_point_precise_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_border_color)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_point_precise_t_type_methods[] = { - {"__dir__", py_lv_point_precise_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_border_color_def = { + "lv_obj_set_style_border_color", + (PyCFunction)py_lv_obj_set_style_border_color, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_point_precise_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_point_precise_t *data = (lv_point_precise_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_point_precise_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "x") == 0) { data->x = (float)mp_obj_get_float(value); result = 0; } - if (strcmp(attr, "y") == 0) { data->y = (float)mp_obj_get_float(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_point_precise_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_point_precise_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_point_precise_t)); -} -static void py_lv_point_precise_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_border_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_border_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_border_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_point_precise_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_point_precise_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_point_precise_t_dealloc, - .tp_getattro = (getter)py_lv_point_precise_t_getattro, - .tp_setattro = (setter)py_lv_point_precise_t_setattro, - .tp_new = py_lv_point_precise_t_new, - .tp_methods = py_lv_point_precise_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_border_opa_def = { + "lv_obj_set_style_border_opa", + (PyCFunction)py_lv_obj_set_style_border_opa, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_point_precise_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_point_precise_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_point_precise_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_point_precise_t*)self->data; -} - -static lv_point_precise_t mp_write_scratch_lv_point_precise_t; -static inline void* mp_write_value_ptr_lv_point_precise_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_border_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_border_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_point_precise_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_point_precise_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_point_precise_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_point_precise_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_point_precise_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_point_precise_t or dict, got None"); - } - memset(&mp_write_scratch_lv_point_precise_t, 0, sizeof(lv_point_precise_t)); - return &mp_write_scratch_lv_point_precise_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_border_width)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_point_precise_t(struct_obj) (*((lv_point_precise_t*)mp_write_value_ptr_lv_point_precise_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_border_width_def = { + "lv_obj_set_style_border_width", + (PyCFunction)py_lv_obj_set_style_border_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_point_precise_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_border_side(lv_obj_t *obj, lv_border_side_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_border_side(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_point_precise_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_border_side_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_border_side_t, lv_style_selector_t))lv_obj_set_style_border_side)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_point_precise_t(field) lv_to_mp_struct_own(&py_lv_point_precise_t_type, copy_buffer(&field, sizeof(lv_point_precise_t))) -#define mp_read_byref_lv_point_precise_t(field) mp_read_ptr_lv_point_precise_t(&field) +static PyMethodDef py_lv_obj_set_style_border_side_def = { + "lv_obj_set_style_border_side", + (PyCFunction)py_lv_obj_set_style_border_side, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_line_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_border_post(lv_obj_t *obj, bool value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_line_dsc_t_methods[]; - -static PyObject *py_lv_draw_line_dsc_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_line_dsc_t *data = (lv_draw_line_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "p1") == 0) return mp_read_byref_lv_point_precise_t(data->p1); - if (strcmp(attr, "p2") == 0) return mp_read_byref_lv_point_precise_t(data->p2); - if (strcmp(attr, "points") == 0) return mp_read_ptr_lv_point_precise_t((void*)data->points); - if (strcmp(attr, "point_cnt") == 0) return mp_obj_new_int(data->point_cnt); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); - if (strcmp(attr, "dash_width") == 0) return mp_obj_new_int(data->dash_width); - if (strcmp(attr, "dash_gap") == 0) return mp_obj_new_int(data->dash_gap); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "round_start") == 0) return mp_obj_new_int_from_uint(data->round_start); - if (strcmp(attr, "round_end") == 0) return mp_obj_new_int_from_uint(data->round_end); - if (strcmp(attr, "raw_end") == 0) return mp_obj_new_int_from_uint(data->raw_end); - for (PyMethodDef *m = py_lv_draw_line_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_line_dsc_t_field_names[] = {"base", "p1", "p2", "points", "point_cnt", "color", "width", "dash_width", "dash_gap", "opa", "round_start", "round_end", "raw_end", NULL}; - -static PyObject *py_lv_draw_line_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_obj_set_style_border_post(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_line_dsc_t_field_names, py_lv_draw_line_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool value = (value_val != 0); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_border_post)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_line_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_line_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_border_post_def = { + "lv_obj_set_style_border_post", + (PyCFunction)py_lv_obj_set_style_border_post, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_line_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_line_dsc_t *data = (lv_draw_line_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_line_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "p1") == 0) { data->p1 = mp_write_lv_point_precise_t(value); result = 0; } - if (strcmp(attr, "p2") == 0) { data->p2 = mp_write_lv_point_precise_t(value); result = 0; } - if (strcmp(attr, "points") == 0) { data->points = (void*)mp_write_ptr_lv_point_precise_t(value); result = 0; } - if (strcmp(attr, "point_cnt") == 0) { data->point_cnt = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "dash_width") == 0) { data->dash_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "dash_gap") == 0) { data->dash_gap = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "round_start") == 0) { data->round_start = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "round_end") == 0) { data->round_end = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "raw_end") == 0) { data->raw_end = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_line_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_line_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_line_dsc_t)); -} -static void py_lv_draw_line_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_outline_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_outline_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_outline_width)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_line_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_line_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_line_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_line_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_line_dsc_t_setattro, - .tp_new = py_lv_draw_line_dsc_t_new, - .tp_methods = py_lv_draw_line_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_outline_width_def = { + "lv_obj_set_style_outline_width", + (PyCFunction)py_lv_obj_set_style_outline_width, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_line_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_line_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_line_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_line_dsc_t*)self->data; -} - -static lv_draw_line_dsc_t mp_write_scratch_lv_draw_line_dsc_t; - -static inline void* mp_write_value_ptr_lv_draw_line_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_line_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_line_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_line_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_line_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_line_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_line_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_line_dsc_t, 0, sizeof(lv_draw_line_dsc_t)); - return &mp_write_scratch_lv_draw_line_dsc_t; -} - -#define mp_write_lv_draw_line_dsc_t(struct_obj) (*((lv_draw_line_dsc_t*)mp_write_value_ptr_lv_draw_line_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_line_dsc_t(void *field) +/* + * lvgl extension definition for: + * void lv_obj_set_style_outline_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_outline_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_line_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_outline_color)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_line_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_line_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_line_dsc_t))) -#define mp_read_byref_lv_draw_line_dsc_t(field) mp_read_ptr_lv_draw_line_dsc_t(&field) +static PyMethodDef py_lv_obj_set_style_outline_color_def = { + "lv_obj_set_style_outline_color", + (PyCFunction)py_lv_obj_set_style_outline_color, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * void lv_obj_init_draw_line_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_line_dsc_t *draw_dsc) + * void lv_obj_set_style_outline_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_init_draw_line_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_outline_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_draw_line_dsc_t *draw_dsc = mp_write_ptr_lv_draw_line_dsc_t(draw_dsc_py); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_draw_line_dsc_t *))lv_obj_init_draw_line_dsc)(obj, part, draw_dsc); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_outline_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_init_draw_line_dsc_def = { - "lv_obj_init_draw_line_dsc", - (PyCFunction)py_lv_obj_init_draw_line_dsc, +static PyMethodDef py_lv_obj_set_style_outline_opa_def = { + "lv_obj_set_style_outline_opa", + (PyCFunction)py_lv_obj_set_style_outline_opa, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_draw_arc_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_outline_pad(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_arc_dsc_t_methods[]; - -static PyObject *py_lv_draw_arc_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_outline_pad(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_arc_dsc_t *data = (lv_draw_arc_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); - if (strcmp(attr, "start_angle") == 0) return mp_obj_new_float_from_f(data->start_angle); - if (strcmp(attr, "end_angle") == 0) return mp_obj_new_float_from_f(data->end_angle); - if (strcmp(attr, "center") == 0) return mp_read_byref_lv_point_t(data->center); - if (strcmp(attr, "img_src") == 0) return ptr_to_mp((void*)data->img_src); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int_from_uint(data->radius); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "rounded") == 0) return mp_obj_new_int_from_uint(data->rounded); - for (PyMethodDef *m = py_lv_draw_arc_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_outline_pad)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_draw_arc_dsc_t_field_names[] = {"base", "color", "width", "start_angle", "end_angle", "center", "img_src", "radius", "opa", "rounded", NULL}; +static PyMethodDef py_lv_obj_set_style_outline_pad_def = { + "lv_obj_set_style_outline_pad", + (PyCFunction)py_lv_obj_set_style_outline_pad, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_arc_dsc_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_shadow_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_shadow_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_arc_dsc_t_field_names, py_lv_draw_arc_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_width)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_arc_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_arc_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_shadow_width_def = { + "lv_obj_set_style_shadow_width", + (PyCFunction)py_lv_obj_set_style_shadow_width, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_arc_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_arc_dsc_t *data = (lv_draw_arc_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_arc_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "start_angle") == 0) { data->start_angle = (float)mp_obj_get_float(value); result = 0; } - if (strcmp(attr, "end_angle") == 0) { data->end_angle = (float)mp_obj_get_float(value); result = 0; } - if (strcmp(attr, "center") == 0) { data->center = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "img_src") == 0) { data->img_src = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "rounded") == 0) { data->rounded = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_arc_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_arc_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_arc_dsc_t)); -} -static void py_lv_draw_arc_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_shadow_offset_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_offset_x)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_arc_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_arc_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_arc_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_arc_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_arc_dsc_t_setattro, - .tp_new = py_lv_draw_arc_dsc_t_new, - .tp_methods = py_lv_draw_arc_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_shadow_offset_x_def = { + "lv_obj_set_style_shadow_offset_x", + (PyCFunction)py_lv_obj_set_style_shadow_offset_x, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_arc_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_arc_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_arc_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_arc_dsc_t*)self->data; -} - -static lv_draw_arc_dsc_t mp_write_scratch_lv_draw_arc_dsc_t; -static inline void* mp_write_value_ptr_lv_draw_arc_dsc_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_shadow_offset_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_arc_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_arc_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_arc_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_arc_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_arc_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_arc_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_arc_dsc_t, 0, sizeof(lv_draw_arc_dsc_t)); - return &mp_write_scratch_lv_draw_arc_dsc_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_offset_y)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_arc_dsc_t(struct_obj) (*((lv_draw_arc_dsc_t*)mp_write_value_ptr_lv_draw_arc_dsc_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_shadow_offset_y_def = { + "lv_obj_set_style_shadow_offset_y", + (PyCFunction)py_lv_obj_set_style_shadow_offset_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_arc_dsc_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_shadow_spread(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_shadow_spread(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_arc_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_shadow_spread)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_arc_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_arc_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_arc_dsc_t))) -#define mp_read_byref_lv_draw_arc_dsc_t(field) mp_read_ptr_lv_draw_arc_dsc_t(&field) +static PyMethodDef py_lv_obj_set_style_shadow_spread_def = { + "lv_obj_set_style_shadow_spread", + (PyCFunction)py_lv_obj_set_style_shadow_spread, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * void lv_obj_init_draw_arc_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_arc_dsc_t *draw_dsc) + * void lv_obj_set_style_shadow_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_init_draw_arc_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_draw_arc_dsc_t *draw_dsc = mp_write_ptr_lv_draw_arc_dsc_t(draw_dsc_py); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_draw_arc_dsc_t *))lv_obj_init_draw_arc_dsc)(obj, part, draw_dsc); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_shadow_color)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_init_draw_arc_dsc_def = { - "lv_obj_init_draw_arc_dsc", - (PyCFunction)py_lv_obj_init_draw_arc_dsc, +static PyMethodDef py_lv_obj_set_style_shadow_color_def = { + "lv_obj_set_style_shadow_color", + (PyCFunction)py_lv_obj_set_style_shadow_color, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_draw_blur_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_shadow_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_draw_blur_dsc_t_methods[]; - -static PyObject *py_lv_draw_blur_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_blur_dsc_t *data = (lv_draw_blur_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "blur_radius") == 0) return mp_obj_new_int(data->blur_radius); - if (strcmp(attr, "corner_radius") == 0) return mp_obj_new_int(data->corner_radius); - if (strcmp(attr, "quality") == 0) return mp_obj_new_int(data->quality); - for (PyMethodDef *m = py_lv_draw_blur_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_blur_dsc_t_field_names[] = {"base", "blur_radius", "corner_radius", "quality", NULL}; - -static PyObject *py_lv_draw_blur_dsc_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_blur_dsc_t_field_names, py_lv_draw_blur_dsc_t_methods); -} - -static PyMethodDef py_lv_draw_blur_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_blur_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_draw_blur_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_blur_dsc_t *data = (lv_draw_blur_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_blur_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "blur_radius") == 0) { data->blur_radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "corner_radius") == 0) { data->corner_radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "quality") == 0) { data->quality = (int)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_blur_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_blur_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_blur_dsc_t)); -} - -static void py_lv_draw_blur_dsc_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_shadow_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_blur_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_blur_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_blur_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_blur_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_blur_dsc_t_setattro, - .tp_new = py_lv_draw_blur_dsc_t_new, - .tp_methods = py_lv_draw_blur_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_shadow_opa_def = { + "lv_obj_set_style_shadow_opa", + (PyCFunction)py_lv_obj_set_style_shadow_opa, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_blur_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_blur_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_blur_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_blur_dsc_t*)self->data; -} - -static lv_draw_blur_dsc_t mp_write_scratch_lv_draw_blur_dsc_t; - -static inline void* mp_write_value_ptr_lv_draw_blur_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_blur_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_blur_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_blur_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_blur_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_blur_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_blur_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_blur_dsc_t, 0, sizeof(lv_draw_blur_dsc_t)); - return &mp_write_scratch_lv_draw_blur_dsc_t; -} - -#define mp_write_lv_draw_blur_dsc_t(struct_obj) (*((lv_draw_blur_dsc_t*)mp_write_value_ptr_lv_draw_blur_dsc_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_draw_blur_dsc_t(void *field) -{ - return lv_to_mp_struct(&py_lv_draw_blur_dsc_t_type, field); -} - -#define mp_read_lv_draw_blur_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_blur_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_blur_dsc_t))) -#define mp_read_byref_lv_draw_blur_dsc_t(field) mp_read_ptr_lv_draw_blur_dsc_t(&field) - /* * lvgl extension definition for: - * void lv_obj_init_draw_blur_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_blur_dsc_t *draw_dsc) + * void lv_obj_set_style_image_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_init_draw_blur_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_image_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_draw_blur_dsc_t *draw_dsc = mp_write_ptr_lv_draw_blur_dsc_t(draw_dsc_py); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_draw_blur_dsc_t *))lv_obj_init_draw_blur_dsc)(obj, part, draw_dsc); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_image_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_init_draw_blur_dsc_def = { - "lv_obj_init_draw_blur_dsc", - (PyCFunction)py_lv_obj_init_draw_blur_dsc, +static PyMethodDef py_lv_obj_set_style_image_opa_def = { + "lv_obj_set_style_image_opa", + (PyCFunction)py_lv_obj_set_style_image_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26297,30 +26319,30 @@ static PyMethodDef py_lv_obj_init_draw_blur_dsc_def = { /* * lvgl extension definition for: - * int32_t lv_obj_calculate_ext_draw_size(lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_style_image_recolor(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_calculate_ext_draw_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_image_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *, lv_part_t))lv_obj_calculate_ext_draw_size)(obj, part); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_image_recolor)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_calculate_ext_draw_size_def = { - "lv_obj_calculate_ext_draw_size", - (PyCFunction)py_lv_obj_calculate_ext_draw_size, +static PyMethodDef py_lv_obj_set_style_image_recolor_def = { + "lv_obj_set_style_image_recolor", + (PyCFunction)py_lv_obj_set_style_image_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26328,27 +26350,30 @@ static PyMethodDef py_lv_obj_calculate_ext_draw_size_def = { /* * lvgl extension definition for: - * void lv_obj_refresh_ext_draw_size(lv_obj_t *obj) + * void lv_obj_set_style_image_recolor_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_refresh_ext_draw_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_image_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_refresh_ext_draw_size)(obj); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_image_recolor_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_refresh_ext_draw_size_def = { - "lv_obj_refresh_ext_draw_size", - (PyCFunction)py_lv_obj_refresh_ext_draw_size, +static PyMethodDef py_lv_obj_set_style_image_recolor_opa_def = { + "lv_obj_set_style_image_recolor_opa", + (PyCFunction)py_lv_obj_set_style_image_recolor_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26356,30 +26381,30 @@ static PyMethodDef py_lv_obj_refresh_ext_draw_size_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_obj_class_create_obj(const lv_obj_class_t *class_p, lv_obj_t *parent) + * void lv_obj_set_style_image_colorkey(lv_obj_t *obj, const lv_image_colorkey_t *value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_class_create_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_image_colorkey(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *class_p = mp_to_lv(self); - lv_obj_t *parent = mp_to_lv(parent_py); + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_image_colorkey_t *value = (const lv_image_colorkey_t *)mp_write_ptr_lv_image_colorkey_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_class_t *, lv_obj_t *))lv_obj_class_create_obj)(class_p, parent); + ((void (*)(lv_obj_t *, const lv_image_colorkey_t *, lv_style_selector_t))lv_obj_set_style_image_colorkey)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_class_create_obj_def = { - "lv_obj_class_create_obj", - (PyCFunction)py_lv_obj_class_create_obj, +static PyMethodDef py_lv_obj_set_style_image_colorkey_def = { + "lv_obj_set_style_image_colorkey", + (PyCFunction)py_lv_obj_set_style_image_colorkey, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26387,27 +26412,30 @@ static PyMethodDef py_lv_obj_class_create_obj_def = { /* * lvgl extension definition for: - * void lv_obj_class_init_obj(lv_obj_t *obj) + * void lv_obj_set_style_line_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_class_init_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_line_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_class_init_obj)(obj); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_line_width)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_class_init_obj_def = { - "lv_obj_class_init_obj", - (PyCFunction)py_lv_obj_class_init_obj, +static PyMethodDef py_lv_obj_set_style_line_width_def = { + "lv_obj_set_style_line_width", + (PyCFunction)py_lv_obj_set_style_line_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26415,28 +26443,30 @@ static PyMethodDef py_lv_obj_class_init_obj_def = { /* * lvgl extension definition for: - * bool lv_obj_is_editable(lv_obj_t *obj) + * void lv_obj_set_style_line_dash_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_is_editable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_line_dash_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_editable)(obj); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_line_dash_width)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_is_editable_def = { - "lv_obj_is_editable", - (PyCFunction)py_lv_obj_is_editable, +static PyMethodDef py_lv_obj_set_style_line_dash_width_def = { + "lv_obj_set_style_line_dash_width", + (PyCFunction)py_lv_obj_set_style_line_dash_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26444,28 +26474,30 @@ static PyMethodDef py_lv_obj_is_editable_def = { /* * lvgl extension definition for: - * bool lv_obj_is_group_def(lv_obj_t *obj) + * void lv_obj_set_style_line_dash_gap(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_is_group_def(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_line_dash_gap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_group_def)(obj); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_line_dash_gap)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_is_group_def_def = { - "lv_obj_is_group_def", - (PyCFunction)py_lv_obj_is_group_def, +static PyMethodDef py_lv_obj_set_style_line_dash_gap_def = { + "lv_obj_set_style_line_dash_gap", + (PyCFunction)py_lv_obj_set_style_line_dash_gap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26473,421 +26505,154 @@ static PyMethodDef py_lv_obj_is_group_def_def = { /* * lvgl extension definition for: - * lv_result_t lv_obj_send_event(lv_obj_t *obj, lv_event_code_t event_code, void *param) + * void lv_obj_set_style_line_rounded(lv_obj_t *obj, bool value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_send_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_line_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_code_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_event_code_t event_code = (int)mp_obj_get_int(event_code_py); - void *param = mp_to_ptr(param_py); + bool value = (value_val != 0); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, lv_event_code_t, void *))lv_obj_send_event)(obj, event_code, param); + ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_line_rounded)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_send_event_def = { - "lv_obj_send_event", - (PyCFunction)py_lv_obj_send_event, +static PyMethodDef py_lv_obj_set_style_line_rounded_def = { + "lv_obj_set_style_line_rounded", + (PyCFunction)py_lv_obj_set_style_line_rounded, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_event_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_line_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_event_t_methods[]; - -static PyObject *py_lv_event_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_event_t *data = (lv_event_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "current_target") == 0) return ptr_to_mp((void*)data->current_target); - if (strcmp(attr, "original_target") == 0) return ptr_to_mp((void*)data->original_target); - if (strcmp(attr, "code") == 0) return mp_obj_new_int(data->code); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "param") == 0) return ptr_to_mp((void*)data->param); - if (strcmp(attr, "prev") == 0) return ptr_to_mp((void*)data->prev); - if (strcmp(attr, "deleted") == 0) return mp_obj_new_int_from_uint(data->deleted); - if (strcmp(attr, "stop_processing") == 0) return mp_obj_new_int_from_uint(data->stop_processing); - if (strcmp(attr, "stop_bubbling") == 0) return mp_obj_new_int_from_uint(data->stop_bubbling); - if (strcmp(attr, "stop_trickling") == 0) return mp_obj_new_int_from_uint(data->stop_trickling); - for (PyMethodDef *m = py_lv_event_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_event_t_field_names[] = {"current_target", "original_target", "code", "user_data", "param", "prev", "deleted", "stop_processing", "stop_bubbling", "stop_trickling", NULL}; - -static PyObject *py_lv_event_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_obj_set_style_line_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_event_t_field_names, py_lv_event_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_line_color)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_t_type_methods[] = { - {"__dir__", py_lv_event_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_line_color_def = { + "lv_obj_set_style_line_color", + (PyCFunction)py_lv_obj_set_style_line_color, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_event_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_event_t *data = (lv_event_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_event_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "current_target") == 0) { data->current_target = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "original_target") == 0) { data->original_target = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "code") == 0) { data->code = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "param") == 0) { data->param = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "prev") == 0) { data->prev = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "deleted") == 0) { data->deleted = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "stop_processing") == 0) { data->stop_processing = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "stop_bubbling") == 0) { data->stop_bubbling = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "stop_trickling") == 0) { data->stop_trickling = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_event_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_event_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_event_t)); -} -static void py_lv_event_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_line_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_line_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_line_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_event_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_event_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_event_t_dealloc, - .tp_getattro = (getter)py_lv_event_t_getattro, - .tp_setattro = (setter)py_lv_event_t_setattro, - .tp_new = py_lv_event_t_new, - .tp_methods = py_lv_event_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_line_opa_def = { + "lv_obj_set_style_line_opa", + (PyCFunction)py_lv_obj_set_style_line_opa, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_event_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_event_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_event_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_event_t*)self->data; -} - -static lv_event_t mp_write_scratch_lv_event_t; - -static inline void* mp_write_value_ptr_lv_event_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_event_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_event_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_event_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_event_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_event_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_event_t or dict, got None"); - } - memset(&mp_write_scratch_lv_event_t, 0, sizeof(lv_event_t)); - return &mp_write_scratch_lv_event_t; -} - -#define mp_write_lv_event_t(struct_obj) (*((lv_event_t*)mp_write_value_ptr_lv_event_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_event_t(void *field) -{ - return lv_to_mp_struct(&py_lv_event_t_type, field); -} - -#define mp_read_lv_event_t(field) lv_to_mp_struct_own(&py_lv_event_t_type, copy_buffer(&field, sizeof(lv_event_t))) -#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) - /* * lvgl extension definition for: - * lv_result_t lv_obj_event_base(const lv_obj_class_t *class_p, lv_event_t *e) + * void lv_obj_set_style_arc_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_event_base(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_arc_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *e_py; - if (!PyArg_ParseTuple(py_args, "O", &e_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *class_p = mp_to_lv(self); - lv_event_t *e = mp_write_ptr_lv_event_t(e_py); + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_obj_class_t *, lv_event_t *))lv_obj_event_base)(class_p, e); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_arc_width)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_event_base_def = { - "lv_obj_event_base", - (PyCFunction)py_lv_obj_event_base, +static PyMethodDef py_lv_obj_set_style_arc_width_def = { + "lv_obj_set_style_arc_width", + (PyCFunction)py_lv_obj_set_style_arc_width, METH_VARARGS | METH_KEYWORDS, NULL }; -#define funcptr_lv_event_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_event_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_event_dsc_t_cb' - * lv_event_cb_t cb + * lvgl extension definition for: + * void lv_obj_set_style_arc_rounded(lv_obj_t *obj, bool value, lv_style_selector_t selector) */ - - -/* - * Struct lv_event_dsc_t (CPython) - */ - -extern PyMethodDef py_lv_event_dsc_t_methods[]; - -static PyObject *py_lv_event_dsc_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_event_dsc_t *data = (lv_event_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "cb") == 0) return mp_lv_funcptr(NULL, data->cb, NULL, "lv_event_dsc_t_cb", NULL); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "filter") == 0) return mp_obj_new_int_from_uint(data->filter); - for (PyMethodDef *m = py_lv_event_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_event_dsc_t_field_names[] = {"cb", "user_data", "filter", NULL}; - -static PyObject *py_lv_event_dsc_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_event_dsc_t_field_names, py_lv_event_dsc_t_methods); -} - -static PyMethodDef py_lv_event_dsc_t_type_methods[] = { - {"__dir__", py_lv_event_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_event_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_event_dsc_t *data = (lv_event_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_event_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "cb") == 0) { data->cb = mp_lv_callback(value, NULL, "lv_event_dsc_t_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "filter") == 0) { data->filter = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_event_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_event_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_event_dsc_t)); -} - -static void py_lv_event_dsc_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_event_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_event_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_event_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_event_dsc_t_getattro, - .tp_setattro = (setter)py_lv_event_dsc_t_setattro, - .tp_new = py_lv_event_dsc_t_new, - .tp_methods = py_lv_event_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_event_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_event_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_event_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_event_dsc_t*)self->data; -} - -static lv_event_dsc_t mp_write_scratch_lv_event_dsc_t; - -static inline void* mp_write_value_ptr_lv_event_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_event_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_event_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_event_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_event_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_event_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_event_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_event_dsc_t, 0, sizeof(lv_event_dsc_t)); - return &mp_write_scratch_lv_event_dsc_t; -} - -#define mp_write_lv_event_dsc_t(struct_obj) (*((lv_event_dsc_t*)mp_write_value_ptr_lv_event_dsc_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_event_dsc_t(void *field) -{ - return lv_to_mp_struct(&py_lv_event_dsc_t_type, field); -} - -#define mp_read_lv_event_dsc_t(field) lv_to_mp_struct_own(&py_lv_event_dsc_t_type, copy_buffer(&field, sizeof(lv_event_dsc_t))) -#define mp_read_byref_lv_event_dsc_t(field) mp_read_ptr_lv_event_dsc_t(&field) - - -/* - * Callback function lv_obj_add_event_cb_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_obj_add_event_cb_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_add_event_cb_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - -/* - * lvgl extension definition for: - * lv_event_dsc_t *lv_obj_add_event_cb(lv_obj_t *obj, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) - */ -static PyObject *py_lv_obj_add_event_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_arc_rounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - void *user_data = mp_to_ptr(user_data_py); - lv_event_code_t filter = (int)mp_obj_get_int(filter_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_obj_add_event_cb_event_cb_callback, "lv_obj_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); + bool value = (value_val != 0); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_obj_t *, lv_event_cb_t, lv_event_code_t, void *))lv_obj_add_event_cb)(obj, event_cb, filter, user_data); + ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_arc_rounded)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_event_cb_def = { - "lv_obj_add_event_cb", - (PyCFunction)py_lv_obj_add_event_cb, +static PyMethodDef py_lv_obj_set_style_arc_rounded_def = { + "lv_obj_set_style_arc_rounded", + (PyCFunction)py_lv_obj_set_style_arc_rounded, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26895,28 +26660,30 @@ static PyMethodDef py_lv_obj_add_event_cb_def = { /* * lvgl extension definition for: - * uint32_t lv_obj_get_event_count(lv_obj_t *obj) + * void lv_obj_set_style_arc_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_get_event_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_arc_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_obj_get_event_count)(obj); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_arc_color)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_event_count_def = { - "lv_obj_get_event_count", - (PyCFunction)py_lv_obj_get_event_count, +static PyMethodDef py_lv_obj_set_style_arc_color_def = { + "lv_obj_set_style_arc_color", + (PyCFunction)py_lv_obj_set_style_arc_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26924,30 +26691,30 @@ static PyMethodDef py_lv_obj_get_event_count_def = { /* * lvgl extension definition for: - * lv_event_dsc_t *lv_obj_get_event_dsc(lv_obj_t *obj, uint32_t index) + * void lv_obj_set_style_arc_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_get_event_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_arc_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t index = (uint32_t)index_val; + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_obj_t *, uint32_t))lv_obj_get_event_dsc)(obj, index); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_arc_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_event_dsc_def = { - "lv_obj_get_event_dsc", - (PyCFunction)py_lv_obj_get_event_dsc, +static PyMethodDef py_lv_obj_set_style_arc_opa_def = { + "lv_obj_set_style_arc_opa", + (PyCFunction)py_lv_obj_set_style_arc_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26955,31 +26722,30 @@ static PyMethodDef py_lv_obj_get_event_dsc_def = { /* * lvgl extension definition for: - * bool lv_obj_remove_event(lv_obj_t *obj, uint32_t index) + * void lv_obj_set_style_arc_image_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_remove_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_arc_image_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t index = (uint32_t)index_val; + const void *value = (const void *)mp_to_ptr(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t *_lvpy_release_dsc = lv_obj_get_event_dsc(obj, index); - void *_lvpy_release_ud = _lvpy_release_dsc ? lv_event_dsc_get_user_data(_lvpy_release_dsc) : NULL; - bool _res; + lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, uint32_t))lv_obj_remove_event)(obj, index); + ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_obj_set_style_arc_image_src)(obj, value, selector); lvpy_unlock(); - if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); + PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_remove_event_def = { - "lv_obj_remove_event", - (PyCFunction)py_lv_obj_remove_event, +static PyMethodDef py_lv_obj_set_style_arc_image_src_def = { + "lv_obj_set_style_arc_image_src", + (PyCFunction)py_lv_obj_set_style_arc_image_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -26987,155 +26753,92 @@ static PyMethodDef py_lv_obj_remove_event_def = { /* * lvgl extension definition for: - * bool lv_obj_remove_event_dsc(lv_obj_t *obj, lv_event_dsc_t *dsc) + * void lv_obj_set_style_text_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_remove_event_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(dsc_py); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void *_lvpy_release_ud = lv_event_dsc_get_user_data(dsc); - bool _res; + lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, lv_event_dsc_t *))lv_obj_remove_event_dsc)(obj, dsc); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_text_color)(obj, value, selector); lvpy_unlock(); - if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); + PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_remove_event_dsc_def = { - "lv_obj_remove_event_dsc", - (PyCFunction)py_lv_obj_remove_event_dsc, +static PyMethodDef py_lv_obj_set_style_text_color_def = { + "lv_obj_set_style_text_color", + (PyCFunction)py_lv_obj_set_style_text_color, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_obj_t_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_obj_t_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * uint32_t lv_obj_remove_event_cb(lv_obj_t *obj, lv_event_cb_t event_cb) + * void lv_obj_set_style_text_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_remove_event_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &event_cb_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - void *event_cb = mp_lv_callback(event_cb_py, &lv_obj_t_event_cb_callback, "lv_obj_t_event_cb", &obj->user_data, obj, (NULL), (NULL)); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void *_lvpy_release_ud = lvpy_peek_obj_event_cb_user_data(obj, event_cb, NULL); - uint32_t _res; + lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *, lv_event_cb_t))lv_obj_remove_event_cb)(obj, event_cb); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_text_opa)(obj, value, selector); lvpy_unlock(); - if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); + PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_remove_event_cb_def = { - "lv_obj_remove_event_cb", - (PyCFunction)py_lv_obj_remove_event_cb, +static PyMethodDef py_lv_obj_set_style_text_opa_def = { + "lv_obj_set_style_text_opa", + (PyCFunction)py_lv_obj_set_style_text_opa, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_obj_remove_event_cb_with_user_data_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_obj_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_remove_event_cb_with_user_data_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * uint32_t lv_obj_remove_event_cb_with_user_data(lv_obj_t *obj, lv_event_cb_t event_cb, void *user_data) + * void lv_obj_set_style_text_font(lv_obj_t *obj, const lv_font_t *value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_remove_event_cb_with_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_font(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_obj_remove_event_cb_with_user_data_event_cb_callback, "lv_obj_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); + const lv_font_t *value = (const lv_font_t *)mp_write_ptr_lv_font_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *, lv_event_cb_t, void *))lv_obj_remove_event_cb_with_user_data)(obj, event_cb, user_data); + ((void (*)(lv_obj_t *, const lv_font_t *, lv_style_selector_t))lv_obj_set_style_text_font)(obj, value, selector); lvpy_unlock(); - if (_res > 0) lvpy_release_callback_user_data(user_data); + PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_remove_event_cb_with_user_data_def = { - "lv_obj_remove_event_cb_with_user_data", - (PyCFunction)py_lv_obj_remove_event_cb_with_user_data, +static PyMethodDef py_lv_obj_set_style_text_font_def = { + "lv_obj_set_style_text_font", + (PyCFunction)py_lv_obj_set_style_text_font, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27143,29 +26846,30 @@ static PyMethodDef py_lv_obj_remove_event_cb_with_user_data_def = { /* * lvgl extension definition for: - * void lv_obj_add_flag(lv_obj_t *obj, lv_obj_flag_t f) + * void lv_obj_set_style_text_letter_space(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_letter_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *f_py; - if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_flag_t))lv_obj_add_flag)(obj, f); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_text_letter_space)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_flag_def = { - "lv_obj_add_flag", - (PyCFunction)py_lv_obj_add_flag, +static PyMethodDef py_lv_obj_set_style_text_letter_space_def = { + "lv_obj_set_style_text_letter_space", + (PyCFunction)py_lv_obj_set_style_text_letter_space, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27173,29 +26877,30 @@ static PyMethodDef py_lv_obj_add_flag_def = { /* * lvgl extension definition for: - * void lv_obj_remove_flag(lv_obj_t *obj, lv_obj_flag_t f) + * void lv_obj_set_style_text_line_space(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_remove_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_line_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *f_py; - if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_flag_t))lv_obj_remove_flag)(obj, f); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_text_line_space)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_remove_flag_def = { - "lv_obj_remove_flag", - (PyCFunction)py_lv_obj_remove_flag, +static PyMethodDef py_lv_obj_set_style_text_line_space_def = { + "lv_obj_set_style_text_line_space", + (PyCFunction)py_lv_obj_set_style_text_line_space, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27203,30 +26908,30 @@ static PyMethodDef py_lv_obj_remove_flag_def = { /* * lvgl extension definition for: - * void lv_obj_set_flag(lv_obj_t *obj, lv_obj_flag_t f, bool v) + * void lv_obj_set_style_text_decor(lv_obj_t *obj, lv_text_decor_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_set_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_decor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *f_py; long v_val; - if (!PyArg_ParseTuple(py_args, "Ol", &f_py, &v_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_flag_t f = (int)mp_obj_get_int(f_py); - bool v = (v_val != 0); + lv_text_decor_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_flag_t, bool))lv_obj_set_flag)(obj, f, v); + ((void (*)(lv_obj_t *, lv_text_decor_t, lv_style_selector_t))lv_obj_set_style_text_decor)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_flag_def = { - "lv_obj_set_flag", - (PyCFunction)py_lv_obj_set_flag, +static PyMethodDef py_lv_obj_set_style_text_decor_def = { + "lv_obj_set_style_text_decor", + (PyCFunction)py_lv_obj_set_style_text_decor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27234,29 +26939,30 @@ static PyMethodDef py_lv_obj_set_flag_def = { /* * lvgl extension definition for: - * void lv_obj_add_state(lv_obj_t *obj, lv_state_t state) + * void lv_obj_set_style_text_align(lv_obj_t *obj, lv_text_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; - if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_state_t state = (int)mp_obj_get_int(state_py); + lv_text_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_state_t))lv_obj_add_state)(obj, state); + ((void (*)(lv_obj_t *, lv_text_align_t, lv_style_selector_t))lv_obj_set_style_text_align)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_state_def = { - "lv_obj_add_state", - (PyCFunction)py_lv_obj_add_state, +static PyMethodDef py_lv_obj_set_style_text_align_def = { + "lv_obj_set_style_text_align", + (PyCFunction)py_lv_obj_set_style_text_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27264,29 +26970,30 @@ static PyMethodDef py_lv_obj_add_state_def = { /* * lvgl extension definition for: - * void lv_obj_remove_state(lv_obj_t *obj, lv_state_t state) + * void lv_obj_set_style_text_outline_stroke_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_remove_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_outline_stroke_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; - if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_state_t state = (int)mp_obj_get_int(state_py); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_state_t))lv_obj_remove_state)(obj, state); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_text_outline_stroke_color)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_remove_state_def = { - "lv_obj_remove_state", - (PyCFunction)py_lv_obj_remove_state, +static PyMethodDef py_lv_obj_set_style_text_outline_stroke_color_def = { + "lv_obj_set_style_text_outline_stroke_color", + (PyCFunction)py_lv_obj_set_style_text_outline_stroke_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27294,30 +27001,30 @@ static PyMethodDef py_lv_obj_remove_state_def = { /* * lvgl extension definition for: - * void lv_obj_set_state(lv_obj_t *obj, lv_state_t state, bool v) + * void lv_obj_set_style_text_outline_stroke_width(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_set_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_outline_stroke_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; long v_val; - if (!PyArg_ParseTuple(py_args, "Ol", &state_py, &v_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_state_t state = (int)mp_obj_get_int(state_py); - bool v = (v_val != 0); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_state_t, bool))lv_obj_set_state)(obj, state, v); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_text_outline_stroke_width)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_state_def = { - "lv_obj_set_state", - (PyCFunction)py_lv_obj_set_state, +static PyMethodDef py_lv_obj_set_style_text_outline_stroke_width_def = { + "lv_obj_set_style_text_outline_stroke_width", + (PyCFunction)py_lv_obj_set_style_text_outline_stroke_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27325,29 +27032,30 @@ static PyMethodDef py_lv_obj_set_state_def = { /* * lvgl extension definition for: - * void lv_obj_set_user_data(lv_obj_t *obj, void *user_data) + * void lv_obj_set_style_text_outline_stroke_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_set_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_outline_stroke_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - void *user_data = mp_to_ptr(user_data_py); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, void *))lv_obj_set_user_data)(obj, user_data); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_text_outline_stroke_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_user_data_def = { - "lv_obj_set_user_data", - (PyCFunction)py_lv_obj_set_user_data, +static PyMethodDef py_lv_obj_set_style_text_outline_stroke_opa_def = { + "lv_obj_set_style_text_outline_stroke_opa", + (PyCFunction)py_lv_obj_set_style_text_outline_stroke_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27355,29 +27063,30 @@ static PyMethodDef py_lv_obj_set_user_data_def = { /* * lvgl extension definition for: - * void lv_obj_set_radio_button(lv_obj_t *obj, bool en) + * void lv_obj_set_style_text_leading_trim(lv_obj_t *obj, lv_text_leading_trim_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_set_radio_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_text_leading_trim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + lv_text_leading_trim_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_obj_set_radio_button)(obj, en); + ((void (*)(lv_obj_t *, lv_text_leading_trim_t, lv_style_selector_t))lv_obj_set_style_text_leading_trim)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_radio_button_def = { - "lv_obj_set_radio_button", - (PyCFunction)py_lv_obj_set_radio_button, +static PyMethodDef py_lv_obj_set_style_text_leading_trim_def = { + "lv_obj_set_style_text_leading_trim", + (PyCFunction)py_lv_obj_set_style_text_leading_trim, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27385,30 +27094,30 @@ static PyMethodDef py_lv_obj_set_radio_button_def = { /* * lvgl extension definition for: - * bool lv_obj_has_flag(const lv_obj_t *obj, lv_obj_flag_t f) + * void lv_obj_set_style_blur_radius(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_has_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_blur_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *f_py; - if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_obj_flag_t))lv_obj_has_flag)(obj, f); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_blur_radius)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_has_flag_def = { - "lv_obj_has_flag", - (PyCFunction)py_lv_obj_has_flag, +static PyMethodDef py_lv_obj_set_style_blur_radius_def = { + "lv_obj_set_style_blur_radius", + (PyCFunction)py_lv_obj_set_style_blur_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27416,30 +27125,30 @@ static PyMethodDef py_lv_obj_has_flag_def = { /* * lvgl extension definition for: - * bool lv_obj_has_flag_any(const lv_obj_t *obj, lv_obj_flag_t f) + * void lv_obj_set_style_blur_backdrop(lv_obj_t *obj, bool value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_has_flag_any(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_blur_backdrop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *f_py; - if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + bool value = (value_val != 0); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_obj_flag_t))lv_obj_has_flag_any)(obj, f); + ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_blur_backdrop)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_has_flag_any_def = { - "lv_obj_has_flag_any", - (PyCFunction)py_lv_obj_has_flag_any, +static PyMethodDef py_lv_obj_set_style_blur_backdrop_def = { + "lv_obj_set_style_blur_backdrop", + (PyCFunction)py_lv_obj_set_style_blur_backdrop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27447,28 +27156,30 @@ static PyMethodDef py_lv_obj_has_flag_any_def = { /* * lvgl extension definition for: - * lv_state_t lv_obj_get_state(const lv_obj_t *obj) + * void lv_obj_set_style_blur_quality(lv_obj_t *obj, lv_blur_quality_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_get_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_blur_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_blur_quality_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_state_t _res; lvpy_lock(); - _res = ((lv_state_t (*)(const lv_obj_t *))lv_obj_get_state)(obj); + ((void (*)(lv_obj_t *, lv_blur_quality_t, lv_style_selector_t))lv_obj_set_style_blur_quality)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_state_def = { - "lv_obj_get_state", - (PyCFunction)py_lv_obj_get_state, +static PyMethodDef py_lv_obj_set_style_blur_quality_def = { + "lv_obj_set_style_blur_quality", + (PyCFunction)py_lv_obj_set_style_blur_quality, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27476,30 +27187,30 @@ static PyMethodDef py_lv_obj_get_state_def = { /* * lvgl extension definition for: - * bool lv_obj_has_state(const lv_obj_t *obj, lv_state_t state) + * void lv_obj_set_style_drop_shadow_radius(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_has_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_drop_shadow_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; - if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_state_t state = (int)mp_obj_get_int(state_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_state_t))lv_obj_has_state)(obj, state); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_radius)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_has_state_def = { - "lv_obj_has_state", - (PyCFunction)py_lv_obj_has_state, +static PyMethodDef py_lv_obj_set_style_drop_shadow_radius_def = { + "lv_obj_set_style_drop_shadow_radius", + (PyCFunction)py_lv_obj_set_style_drop_shadow_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27507,214 +27218,61 @@ static PyMethodDef py_lv_obj_has_state_def = { /* * lvgl extension definition for: - * bool lv_obj_is_radio_button(const lv_obj_t *obj) + * void lv_obj_set_style_drop_shadow_offset_x(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_is_radio_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_drop_shadow_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_obj_is_radio_button)(obj); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_offset_x)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_is_radio_button_def = { - "lv_obj_is_radio_button", - (PyCFunction)py_lv_obj_is_radio_button, +static PyMethodDef py_lv_obj_set_style_drop_shadow_offset_x_def = { + "lv_obj_set_style_drop_shadow_offset_x", + (PyCFunction)py_lv_obj_set_style_drop_shadow_offset_x, METH_VARARGS | METH_KEYWORDS, NULL }; -#define funcptr_lv_group_focus_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_group_focus_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_group_t_focus_cb_callback(lv_group_t *); -#define funcptr_lv_group_edge_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_group_edge_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_group_t_edge_cb_callback(lv_group_t *, bool); - -/* - * Struct lv_group_t (CPython) - */ - -extern PyMethodDef py_lv_group_t_methods[]; - -static PyObject *py_lv_group_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_group_t *data = (lv_group_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "obj_ll") == 0) return mp_read_byref_lv_ll_t(data->obj_ll); - if (strcmp(attr, "obj_focus") == 0) return ptr_to_mp((void*)data->obj_focus); - if (strcmp(attr, "focus_cb") == 0) return mp_lv_funcptr(NULL, data->focus_cb, lv_group_t_focus_cb_callback, "lv_group_t_focus_cb", data->user_data); - if (strcmp(attr, "edge_cb") == 0) return mp_lv_funcptr(NULL, data->edge_cb, lv_group_t_edge_cb_callback, "lv_group_t_edge_cb", data->user_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "frozen") == 0) return mp_obj_new_int_from_uint(data->frozen); - if (strcmp(attr, "editing") == 0) return mp_obj_new_int_from_uint(data->editing); - if (strcmp(attr, "refocus_policy") == 0) return mp_obj_new_int_from_uint(data->refocus_policy); - if (strcmp(attr, "wrap") == 0) return mp_obj_new_int_from_uint(data->wrap); - for (PyMethodDef *m = py_lv_group_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_group_t_field_names[] = {"obj_ll", "obj_focus", "focus_cb", "edge_cb", "user_data", "frozen", "editing", "refocus_policy", "wrap", NULL}; - -static PyObject *py_lv_group_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_group_t_field_names, py_lv_group_t_methods); -} - -static PyMethodDef py_lv_group_t_type_methods[] = { - {"__dir__", py_lv_group_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_group_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_group_t *data = (lv_group_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_group_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "obj_ll") == 0) { data->obj_ll = mp_write_lv_ll_t(value); result = 0; } - if (strcmp(attr, "obj_focus") == 0) { data->obj_focus = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "focus_cb") == 0) { data->focus_cb = mp_lv_callback(value, lv_group_t_focus_cb_callback, "lv_group_t_focus_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "edge_cb") == 0) { data->edge_cb = mp_lv_callback(value, lv_group_t_edge_cb_callback, "lv_group_t_edge_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "frozen") == 0) { data->frozen = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "editing") == 0) { data->editing = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "refocus_policy") == 0) { data->refocus_policy = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "wrap") == 0) { data->wrap = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_group_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_group_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_group_t)); -} - -static void py_lv_group_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_group_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_group_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_group_t_dealloc, - .tp_getattro = (getter)py_lv_group_t_getattro, - .tp_setattro = (setter)py_lv_group_t_setattro, - .tp_new = py_lv_group_t_new, - .tp_methods = py_lv_group_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_group_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_group_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_group_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_group_t*)self->data; -} - -static lv_group_t mp_write_scratch_lv_group_t; - -static inline void* mp_write_value_ptr_lv_group_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_group_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_group_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_group_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_group_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_group_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_group_t or dict, got None"); - } - memset(&mp_write_scratch_lv_group_t, 0, sizeof(lv_group_t)); - return &mp_write_scratch_lv_group_t; -} - -#define mp_write_lv_group_t(struct_obj) (*((lv_group_t*)mp_write_value_ptr_lv_group_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_group_t(void *field) -{ - return lv_to_mp_struct(&py_lv_group_t_type, field); -} - -#define mp_read_lv_group_t(field) lv_to_mp_struct_own(&py_lv_group_t_type, copy_buffer(&field, sizeof(lv_group_t))) -#define mp_read_byref_lv_group_t(field) mp_read_ptr_lv_group_t(&field) - /* * lvgl extension definition for: - * lv_group_t *lv_obj_get_group(const lv_obj_t *obj) + * void lv_obj_set_style_drop_shadow_offset_y(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_get_group(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_drop_shadow_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; lvpy_lock(); - _res = ((lv_group_t *(*)(const lv_obj_t *))lv_obj_get_group)(obj); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_offset_y)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_group_def = { - "lv_obj_get_group", - (PyCFunction)py_lv_obj_get_group, +static PyMethodDef py_lv_obj_set_style_drop_shadow_offset_y_def = { + "lv_obj_set_style_drop_shadow_offset_y", + (PyCFunction)py_lv_obj_set_style_drop_shadow_offset_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27722,28 +27280,30 @@ static PyMethodDef py_lv_obj_get_group_def = { /* * lvgl extension definition for: - * void *lv_obj_get_user_data(lv_obj_t *obj) + * void lv_obj_set_style_drop_shadow_color(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_get_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_drop_shadow_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_obj_t *))lv_obj_get_user_data)(obj); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_color)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_user_data_def = { - "lv_obj_get_user_data", - (PyCFunction)py_lv_obj_get_user_data, +static PyMethodDef py_lv_obj_set_style_drop_shadow_color_def = { + "lv_obj_set_style_drop_shadow_color", + (PyCFunction)py_lv_obj_set_style_drop_shadow_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27751,27 +27311,30 @@ static PyMethodDef py_lv_obj_get_user_data_def = { /* * lvgl extension definition for: - * void lv_obj_allocate_spec_attr(lv_obj_t *obj) + * void lv_obj_set_style_drop_shadow_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_allocate_spec_attr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_drop_shadow_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_allocate_spec_attr)(obj); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_allocate_spec_attr_def = { - "lv_obj_allocate_spec_attr", - (PyCFunction)py_lv_obj_allocate_spec_attr, +static PyMethodDef py_lv_obj_set_style_drop_shadow_opa_def = { + "lv_obj_set_style_drop_shadow_opa", + (PyCFunction)py_lv_obj_set_style_drop_shadow_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27779,30 +27342,30 @@ static PyMethodDef py_lv_obj_allocate_spec_attr_def = { /* * lvgl extension definition for: - * bool lv_obj_check_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) + * void lv_obj_set_style_drop_shadow_quality(lv_obj_t *obj, lv_blur_quality_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_check_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_drop_shadow_quality(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *class_p_py; - if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); + lv_blur_quality_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_check_type)(obj, class_p); + ((void (*)(lv_obj_t *, lv_blur_quality_t, lv_style_selector_t))lv_obj_set_style_drop_shadow_quality)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_check_type_def = { - "lv_obj_check_type", - (PyCFunction)py_lv_obj_check_type, +static PyMethodDef py_lv_obj_set_style_drop_shadow_quality_def = { + "lv_obj_set_style_drop_shadow_quality", + (PyCFunction)py_lv_obj_set_style_drop_shadow_quality, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27810,30 +27373,30 @@ static PyMethodDef py_lv_obj_check_type_def = { /* * lvgl extension definition for: - * bool lv_obj_has_class(const lv_obj_t *obj, const lv_obj_class_t *class_p) + * void lv_obj_set_style_radius(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_has_class(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *class_p_py; - if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_has_class)(obj, class_p); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_radius)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_has_class_def = { - "lv_obj_has_class", - (PyCFunction)py_lv_obj_has_class, +static PyMethodDef py_lv_obj_set_style_radius_def = { + "lv_obj_set_style_radius", + (PyCFunction)py_lv_obj_set_style_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27841,28 +27404,30 @@ static PyMethodDef py_lv_obj_has_class_def = { /* * lvgl extension definition for: - * const lv_obj_class_t *lv_obj_get_class(const lv_obj_t *obj) + * void lv_obj_set_style_radial_offset(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_get_class(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_radial_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_obj_class_t * _res; lvpy_lock(); - _res = ((const lv_obj_class_t *(*)(const lv_obj_t *))lv_obj_get_class)(obj); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_radial_offset)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_obj_class_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_class_def = { - "lv_obj_get_class", - (PyCFunction)py_lv_obj_get_class, +static PyMethodDef py_lv_obj_set_style_radial_offset_def = { + "lv_obj_set_style_radial_offset", + (PyCFunction)py_lv_obj_set_style_radial_offset, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27870,28 +27435,30 @@ static PyMethodDef py_lv_obj_get_class_def = { /* * lvgl extension definition for: - * bool lv_obj_is_valid(const lv_obj_t *obj) + * void lv_obj_set_style_clip_corner(lv_obj_t *obj, bool value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_is_valid(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_clip_corner(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + bool value = (value_val != 0); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_obj_is_valid)(obj); + ((void (*)(lv_obj_t *, bool, lv_style_selector_t))lv_obj_set_style_clip_corner)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_is_valid_def = { - "lv_obj_is_valid", - (PyCFunction)py_lv_obj_is_valid, +static PyMethodDef py_lv_obj_set_style_clip_corner_def = { + "lv_obj_set_style_clip_corner", + (PyCFunction)py_lv_obj_set_style_clip_corner, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27899,29 +27466,30 @@ static PyMethodDef py_lv_obj_is_valid_def = { /* * lvgl extension definition for: - * void lv_obj_null_on_delete(lv_obj_t **obj_ptr) + * void lv_obj_set_style_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_null_on_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_ptr_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_ptr_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t **obj_ptr = mp_to_ptr(obj_ptr_py); + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t **))lv_obj_null_on_delete)(obj_ptr); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_opa)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_null_on_delete_def = { - "lv_obj_null_on_delete", - (PyCFunction)py_lv_obj_null_on_delete, +static PyMethodDef py_lv_obj_set_style_opa_def = { + "lv_obj_set_style_opa", + (PyCFunction)py_lv_obj_set_style_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -27929,389 +27497,340 @@ static PyMethodDef py_lv_obj_null_on_delete_def = { /* * lvgl extension definition for: - * void lv_obj_add_screen_load_event(lv_obj_t *obj, lv_event_code_t trigger, lv_obj_t *screen, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay) + * void lv_obj_set_style_opa_layered(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_screen_load_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_opa_layered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *trigger_py; PyObject *screen_py; PyObject *anim_type_py; long duration_val; long delay_val; - if (!PyArg_ParseTuple(py_args, "OOOll", &trigger_py, &screen_py, &anim_type_py, &duration_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); - lv_obj_t *screen = mp_to_lv(screen_py); - lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); - uint32_t duration = (uint32_t)duration_val; - uint32_t delay = (uint32_t)delay_val; + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_event_code_t, lv_obj_t *, lv_screen_load_anim_t, uint32_t, uint32_t))lv_obj_add_screen_load_event)(obj, trigger, screen, anim_type, duration, delay); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_opa_layered)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_screen_load_event_def = { - "lv_obj_add_screen_load_event", - (PyCFunction)py_lv_obj_add_screen_load_event, +static PyMethodDef py_lv_obj_set_style_opa_layered_def = { + "lv_obj_set_style_opa_layered", + (PyCFunction)py_lv_obj_set_style_opa_layered, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_obj_t *lv_screen_create_cb_t(void) - * lv_screen_create_cb_t screen_create_cb - */ - - /* * lvgl extension definition for: - * void lv_obj_add_screen_create_event(lv_obj_t *obj, lv_event_code_t trigger, lv_screen_create_cb_t screen_create_cb, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay) + * void lv_obj_set_style_color_filter_dsc(lv_obj_t *obj, const lv_color_filter_dsc_t *value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_screen_create_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_color_filter_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *trigger_py; PyObject *screen_create_cb_py; PyObject *anim_type_py; long duration_val; long delay_val; - if (!PyArg_ParseTuple(py_args, "OOOll", &trigger_py, &screen_create_cb_py, &anim_type_py, &duration_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); - lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); - uint32_t duration = (uint32_t)duration_val; - uint32_t delay = (uint32_t)delay_val; - void *screen_create_cb = NULL; + const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_event_code_t, lv_screen_create_cb_t, lv_screen_load_anim_t, uint32_t, uint32_t))lv_obj_add_screen_create_event)(obj, trigger, screen_create_cb, anim_type, duration, delay); + ((void (*)(lv_obj_t *, const lv_color_filter_dsc_t *, lv_style_selector_t))lv_obj_set_style_color_filter_dsc)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_screen_create_event_def = { - "lv_obj_add_screen_create_event", - (PyCFunction)py_lv_obj_add_screen_create_event, +static PyMethodDef py_lv_obj_set_style_color_filter_dsc_def = { + "lv_obj_set_style_color_filter_dsc", + (PyCFunction)py_lv_obj_set_style_color_filter_dsc, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_anim_timeline_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_color_filter_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_anim_timeline_dsc_t_methods[]; - -static PyObject *py_lv_anim_timeline_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_color_filter_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_timeline_dsc_t *data = (lv_anim_timeline_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "anim") == 0) return mp_read_byref_lv_anim_t(data->anim); - if (strcmp(attr, "start_time") == 0) return mp_obj_new_int_from_uint(data->start_time); - if (strcmp(attr, "is_started") == 0) return mp_obj_new_int_from_uint(data->is_started); - if (strcmp(attr, "is_completed") == 0) return mp_obj_new_int_from_uint(data->is_completed); - for (PyMethodDef *m = py_lv_anim_timeline_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_anim_timeline_dsc_t_field_names[] = {"anim", "start_time", "is_started", "is_completed", NULL}; - -static PyObject *py_lv_anim_timeline_dsc_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_anim_timeline_dsc_t_field_names, py_lv_anim_timeline_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_color_filter_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_dsc_t_type_methods[] = { - {"__dir__", py_lv_anim_timeline_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_color_filter_opa_def = { + "lv_obj_set_style_color_filter_opa", + (PyCFunction)py_lv_obj_set_style_color_filter_opa, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_anim_timeline_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_timeline_dsc_t *data = (lv_anim_timeline_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_anim_timeline_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "anim") == 0) { data->anim = mp_write_lv_anim_t(value); result = 0; } - if (strcmp(attr, "start_time") == 0) { data->start_time = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "is_started") == 0) { data->is_started = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "is_completed") == 0) { data->is_completed = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_anim_timeline_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_anim_timeline_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_timeline_dsc_t)); -} -static void py_lv_anim_timeline_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_recolor(lv_obj_t *obj, lv_color_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t value = mp_write_lv_color_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_color_t, lv_style_selector_t))lv_obj_set_style_recolor)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_anim_timeline_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_anim_timeline_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_anim_timeline_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_anim_timeline_dsc_t_getattro, - .tp_setattro = (setter)py_lv_anim_timeline_dsc_t_setattro, - .tp_new = py_lv_anim_timeline_dsc_t_new, - .tp_methods = py_lv_anim_timeline_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_recolor_def = { + "lv_obj_set_style_recolor", + (PyCFunction)py_lv_obj_set_style_recolor, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_anim_timeline_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_anim_timeline_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_anim_timeline_dsc_t*)self->data; -} - -static lv_anim_timeline_dsc_t mp_write_scratch_lv_anim_timeline_dsc_t; - -static inline void* mp_write_value_ptr_lv_anim_timeline_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_timeline_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_anim_timeline_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_timeline_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_anim_timeline_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_anim_timeline_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_anim_timeline_dsc_t, 0, sizeof(lv_anim_timeline_dsc_t)); - return &mp_write_scratch_lv_anim_timeline_dsc_t; -} - -#define mp_write_lv_anim_timeline_dsc_t(struct_obj) (*((lv_anim_timeline_dsc_t*)mp_write_value_ptr_lv_anim_timeline_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_anim_timeline_dsc_t(void *field) +/* + * lvgl extension definition for: + * void lv_obj_set_style_recolor_opa(lv_obj_t *obj, lv_opa_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_recolor_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_anim_timeline_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_opa_t value = (lv_opa_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_opa_t, lv_style_selector_t))lv_obj_set_style_recolor_opa)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_anim_timeline_dsc_t(field) lv_to_mp_struct_own(&py_lv_anim_timeline_dsc_t_type, copy_buffer(&field, sizeof(lv_anim_timeline_dsc_t))) -#define mp_read_byref_lv_anim_timeline_dsc_t(field) mp_read_ptr_lv_anim_timeline_dsc_t(&field) +static PyMethodDef py_lv_obj_set_style_recolor_opa_def = { + "lv_obj_set_style_recolor_opa", + (PyCFunction)py_lv_obj_set_style_recolor_opa, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_anim_timeline_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_anim(lv_obj_t *obj, const lv_anim_t *value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_anim_timeline_t_methods[]; - -static PyObject *py_lv_anim_timeline_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_set_style_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_timeline_t *data = (lv_anim_timeline_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "anim_dsc") == 0) return mp_read_ptr_lv_anim_timeline_dsc_t((void*)data->anim_dsc); - if (strcmp(attr, "anim_dsc_cnt") == 0) return mp_obj_new_int_from_uint(data->anim_dsc_cnt); - if (strcmp(attr, "act_time") == 0) return mp_obj_new_int_from_uint(data->act_time); - if (strcmp(attr, "reverse") == 0) return convert_to_bool(data->reverse); - if (strcmp(attr, "delay") == 0) return mp_obj_new_int_from_uint(data->delay); - if (strcmp(attr, "repeat_count") == 0) return mp_obj_new_int_from_uint(data->repeat_count); - if (strcmp(attr, "repeat_delay") == 0) return mp_obj_new_int_from_uint(data->repeat_delay); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_anim_timeline_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_anim_t *, lv_style_selector_t))lv_obj_set_style_anim)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_anim_timeline_t_field_names[] = {"anim_dsc", "anim_dsc_cnt", "act_time", "reverse", "delay", "repeat_count", "repeat_delay", "user_data", NULL}; +static PyMethodDef py_lv_obj_set_style_anim_def = { + "lv_obj_set_style_anim", + (PyCFunction)py_lv_obj_set_style_anim, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_anim_timeline_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_anim_duration(lv_obj_t *obj, uint32_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_anim_timeline_t_field_names, py_lv_anim_timeline_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t value = (uint32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t, lv_style_selector_t))lv_obj_set_style_anim_duration)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_t_type_methods[] = { - {"__dir__", py_lv_anim_timeline_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_set_style_anim_duration_def = { + "lv_obj_set_style_anim_duration", + (PyCFunction)py_lv_obj_set_style_anim_duration, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_anim_timeline_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_timeline_t *data = (lv_anim_timeline_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_anim_timeline_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "anim_dsc") == 0) { data->anim_dsc = (void*)mp_write_ptr_lv_anim_timeline_dsc_t(value); result = 0; } - if (strcmp(attr, "anim_dsc_cnt") == 0) { data->anim_dsc_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "act_time") == 0) { data->act_time = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "reverse") == 0) { data->reverse = mp_obj_is_true(value); result = 0; } - if (strcmp(attr, "delay") == 0) { data->delay = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "repeat_count") == 0) { data->repeat_count = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "repeat_delay") == 0) { data->repeat_delay = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_anim_timeline_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_anim_timeline_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_timeline_t)); -} -static void py_lv_anim_timeline_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_obj_set_style_transition(lv_obj_t *obj, const lv_style_transition_dsc_t *value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_transition(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_style_transition_dsc_t *, lv_style_selector_t))lv_obj_set_style_transition)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_anim_timeline_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_anim_timeline_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_anim_timeline_t_dealloc, - .tp_getattro = (getter)py_lv_anim_timeline_t_getattro, - .tp_setattro = (setter)py_lv_anim_timeline_t_setattro, - .tp_new = py_lv_anim_timeline_t_new, - .tp_methods = py_lv_anim_timeline_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_set_style_transition_def = { + "lv_obj_set_style_transition", + (PyCFunction)py_lv_obj_set_style_transition, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_anim_timeline_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_anim_timeline_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_anim_timeline_t*)self->data; -} - -static lv_anim_timeline_t mp_write_scratch_lv_anim_timeline_t; -static inline void* mp_write_value_ptr_lv_anim_timeline_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_set_style_blend_mode(lv_obj_t *obj, lv_blend_mode_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_timeline_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_anim_timeline_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_timeline_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_anim_timeline_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_anim_timeline_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_t or dict, got None"); - } - memset(&mp_write_scratch_lv_anim_timeline_t, 0, sizeof(lv_anim_timeline_t)); - return &mp_write_scratch_lv_anim_timeline_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_blend_mode_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_blend_mode_t, lv_style_selector_t))lv_obj_set_style_blend_mode)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_anim_timeline_t(struct_obj) (*((lv_anim_timeline_t*)mp_write_value_ptr_lv_anim_timeline_t(struct_obj))) +static PyMethodDef py_lv_obj_set_style_blend_mode_def = { + "lv_obj_set_style_blend_mode", + (PyCFunction)py_lv_obj_set_style_blend_mode, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_anim_timeline_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_style_layout(lv_obj_t *obj, uint16_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_style_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_anim_timeline_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint16_t value = (uint16_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint16_t, lv_style_selector_t))lv_obj_set_style_layout)(obj, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_anim_timeline_t(field) lv_to_mp_struct_own(&py_lv_anim_timeline_t_type, copy_buffer(&field, sizeof(lv_anim_timeline_t))) -#define mp_read_byref_lv_anim_timeline_t(field) mp_read_ptr_lv_anim_timeline_t(&field) +static PyMethodDef py_lv_obj_set_style_layout_def = { + "lv_obj_set_style_layout", + (PyCFunction)py_lv_obj_set_style_layout, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * void lv_obj_add_play_timeline_event(lv_obj_t *obj, lv_event_code_t trigger, lv_anim_timeline_t *at, uint32_t delay, bool reverse) + * void lv_obj_set_style_base_dir(lv_obj_t *obj, lv_base_dir_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_play_timeline_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_base_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *trigger_py; PyObject *at_py; long delay_val; long reverse_val; - if (!PyArg_ParseTuple(py_args, "OOll", &trigger_py, &at_py, &delay_val, &reverse_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); - lv_anim_timeline_t *at = mp_write_ptr_lv_anim_timeline_t(at_py); - uint32_t delay = (uint32_t)delay_val; - bool reverse = (reverse_val != 0); + lv_base_dir_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_event_code_t, lv_anim_timeline_t *, uint32_t, bool))lv_obj_add_play_timeline_event)(obj, trigger, at, delay, reverse); + ((void (*)(lv_obj_t *, lv_base_dir_t, lv_style_selector_t))lv_obj_set_style_base_dir)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_play_timeline_event_def = { - "lv_obj_add_play_timeline_event", - (PyCFunction)py_lv_obj_add_play_timeline_event, +static PyMethodDef py_lv_obj_set_style_base_dir_def = { + "lv_obj_set_style_base_dir", + (PyCFunction)py_lv_obj_set_style_base_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28319,30 +27838,30 @@ static PyMethodDef py_lv_obj_add_play_timeline_event_def = { /* * lvgl extension definition for: - * void lv_obj_redraw(lv_layer_t *layer, lv_obj_t *obj) + * void lv_obj_set_style_bitmap_mask_src(lv_obj_t *obj, const void *value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_redraw(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_bitmap_mask_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const void *value = (const void *)mp_to_ptr(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, lv_obj_t *))lv_obj_redraw)(layer, obj); + ((void (*)(lv_obj_t *, const void *, lv_style_selector_t))lv_obj_set_style_bitmap_mask_src)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_redraw_def = { - "lv_obj_redraw", - (PyCFunction)py_lv_obj_redraw, +static PyMethodDef py_lv_obj_set_style_bitmap_mask_src_def = { + "lv_obj_set_style_bitmap_mask_src", + (PyCFunction)py_lv_obj_set_style_bitmap_mask_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28350,201 +27869,61 @@ static PyMethodDef py_lv_obj_redraw_def = { /* * lvgl extension definition for: - * void lv_obj_remove_from_subject(lv_obj_t *obj, lv_subject_t *subject) + * void lv_obj_set_style_rotary_sensitivity(lv_obj_t *obj, uint32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_remove_from_subject(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_rotary_sensitivity(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + uint32_t value = (uint32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_t *))lv_obj_remove_from_subject)(obj, subject); + ((void (*)(lv_obj_t *, uint32_t, lv_style_selector_t))lv_obj_set_style_rotary_sensitivity)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_remove_from_subject_def = { - "lv_obj_remove_from_subject", - (PyCFunction)py_lv_obj_remove_from_subject, +static PyMethodDef py_lv_obj_set_style_rotary_sensitivity_def = { + "lv_obj_set_style_rotary_sensitivity", + (PyCFunction)py_lv_obj_set_style_rotary_sensitivity, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_subject_increment_dsc_t (CPython) + * lvgl extension definition for: + * void lv_obj_set_style_flex_flow(lv_obj_t *obj, lv_flex_flow_t value, lv_style_selector_t selector) */ - -extern PyMethodDef py_lv_subject_increment_dsc_t_methods[]; - -static PyObject *py_lv_subject_increment_dsc_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_subject_increment_dsc_t *data = (lv_subject_increment_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "subject") == 0) return mp_read_ptr_lv_subject_t((void*)data->subject); - if (strcmp(attr, "step") == 0) return mp_obj_new_int(data->step); - if (strcmp(attr, "rollover") == 0) return convert_to_bool(data->rollover); - if (strcmp(attr, "min_value") == 0) return mp_obj_new_int(data->min_value); - if (strcmp(attr, "max_value") == 0) return mp_obj_new_int(data->max_value); - for (PyMethodDef *m = py_lv_subject_increment_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_subject_increment_dsc_t_field_names[] = {"subject", "step", "rollover", "min_value", "max_value", NULL}; - -static PyObject *py_lv_subject_increment_dsc_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_subject_increment_dsc_t_field_names, py_lv_subject_increment_dsc_t_methods); -} - -static PyMethodDef py_lv_subject_increment_dsc_t_type_methods[] = { - {"__dir__", py_lv_subject_increment_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_subject_increment_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_subject_increment_dsc_t *data = (lv_subject_increment_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_subject_increment_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "subject") == 0) { data->subject = (void*)mp_write_ptr_lv_subject_t(value); result = 0; } - if (strcmp(attr, "step") == 0) { data->step = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "rollover") == 0) { data->rollover = mp_obj_is_true(value); result = 0; } - if (strcmp(attr, "min_value") == 0) { data->min_value = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "max_value") == 0) { data->max_value = (int32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_subject_increment_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_subject_increment_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_subject_increment_dsc_t)); -} - -static void py_lv_subject_increment_dsc_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_subject_increment_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_subject_increment_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_subject_increment_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_subject_increment_dsc_t_getattro, - .tp_setattro = (setter)py_lv_subject_increment_dsc_t_setattro, - .tp_new = py_lv_subject_increment_dsc_t_new, - .tp_methods = py_lv_subject_increment_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_subject_increment_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_subject_increment_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_subject_increment_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_subject_increment_dsc_t*)self->data; -} - -static lv_subject_increment_dsc_t mp_write_scratch_lv_subject_increment_dsc_t; - -static inline void* mp_write_value_ptr_lv_subject_increment_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_subject_increment_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_subject_increment_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_subject_increment_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_subject_increment_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_subject_increment_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_subject_increment_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_subject_increment_dsc_t, 0, sizeof(lv_subject_increment_dsc_t)); - return &mp_write_scratch_lv_subject_increment_dsc_t; -} - -#define mp_write_lv_subject_increment_dsc_t(struct_obj) (*((lv_subject_increment_dsc_t*)mp_write_value_ptr_lv_subject_increment_dsc_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_subject_increment_dsc_t(void *field) -{ - return lv_to_mp_struct(&py_lv_subject_increment_dsc_t_type, field); -} - -#define mp_read_lv_subject_increment_dsc_t(field) lv_to_mp_struct_own(&py_lv_subject_increment_dsc_t_type, copy_buffer(&field, sizeof(lv_subject_increment_dsc_t))) -#define mp_read_byref_lv_subject_increment_dsc_t(field) mp_read_ptr_lv_subject_increment_dsc_t(&field) - - -/* - * lvgl extension definition for: - * lv_subject_increment_dsc_t *lv_obj_add_subject_increment_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, int32_t step) - */ -static PyObject *py_lv_obj_add_subject_increment_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *trigger_py; long step_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &trigger_py, &step_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); - int32_t step = (int32_t)step_val; + lv_flex_flow_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_subject_increment_dsc_t * _res; lvpy_lock(); - _res = ((lv_subject_increment_dsc_t *(*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, int32_t))lv_obj_add_subject_increment_event)(obj, subject, trigger, step); + ((void (*)(lv_obj_t *, lv_flex_flow_t, lv_style_selector_t))lv_obj_set_style_flex_flow)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_subject_increment_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_subject_increment_event_def = { - "lv_obj_add_subject_increment_event", - (PyCFunction)py_lv_obj_add_subject_increment_event, +static PyMethodDef py_lv_obj_set_style_flex_flow_def = { + "lv_obj_set_style_flex_flow", + (PyCFunction)py_lv_obj_set_style_flex_flow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28552,30 +27931,30 @@ static PyMethodDef py_lv_obj_add_subject_increment_event_def = { /* * lvgl extension definition for: - * void lv_obj_set_subject_increment_event_min_value(lv_obj_t *obj, lv_subject_increment_dsc_t *dsc, int32_t min_value) + * void lv_obj_set_style_flex_main_place(lv_obj_t *obj, lv_flex_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_set_subject_increment_event_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_flex_main_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; long min_value_val; - if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &min_value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_increment_dsc_t *dsc = mp_write_ptr_lv_subject_increment_dsc_t(dsc_py); - int32_t min_value = (int32_t)min_value_val; + lv_flex_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_increment_dsc_t *, int32_t))lv_obj_set_subject_increment_event_min_value)(obj, dsc, min_value); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_style_selector_t))lv_obj_set_style_flex_main_place)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_subject_increment_event_min_value_def = { - "lv_obj_set_subject_increment_event_min_value", - (PyCFunction)py_lv_obj_set_subject_increment_event_min_value, +static PyMethodDef py_lv_obj_set_style_flex_main_place_def = { + "lv_obj_set_style_flex_main_place", + (PyCFunction)py_lv_obj_set_style_flex_main_place, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28583,30 +27962,30 @@ static PyMethodDef py_lv_obj_set_subject_increment_event_min_value_def = { /* * lvgl extension definition for: - * void lv_obj_set_subject_increment_event_max_value(lv_obj_t *obj, lv_subject_increment_dsc_t *dsc, int32_t max_value) + * void lv_obj_set_style_flex_cross_place(lv_obj_t *obj, lv_flex_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_set_subject_increment_event_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_flex_cross_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; long max_value_val; - if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &max_value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_increment_dsc_t *dsc = mp_write_ptr_lv_subject_increment_dsc_t(dsc_py); - int32_t max_value = (int32_t)max_value_val; + lv_flex_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_increment_dsc_t *, int32_t))lv_obj_set_subject_increment_event_max_value)(obj, dsc, max_value); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_style_selector_t))lv_obj_set_style_flex_cross_place)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_subject_increment_event_max_value_def = { - "lv_obj_set_subject_increment_event_max_value", - (PyCFunction)py_lv_obj_set_subject_increment_event_max_value, +static PyMethodDef py_lv_obj_set_style_flex_cross_place_def = { + "lv_obj_set_style_flex_cross_place", + (PyCFunction)py_lv_obj_set_style_flex_cross_place, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28614,30 +27993,30 @@ static PyMethodDef py_lv_obj_set_subject_increment_event_max_value_def = { /* * lvgl extension definition for: - * void lv_obj_set_subject_increment_event_rollover(lv_obj_t *obj, lv_subject_increment_dsc_t *dsc, bool rollover) + * void lv_obj_set_style_flex_track_place(lv_obj_t *obj, lv_flex_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_set_subject_increment_event_rollover(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_flex_track_place(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; long rollover_val; - if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &rollover_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_increment_dsc_t *dsc = mp_write_ptr_lv_subject_increment_dsc_t(dsc_py); - bool rollover = (rollover_val != 0); + lv_flex_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_increment_dsc_t *, bool))lv_obj_set_subject_increment_event_rollover)(obj, dsc, rollover); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_style_selector_t))lv_obj_set_style_flex_track_place)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_subject_increment_event_rollover_def = { - "lv_obj_set_subject_increment_event_rollover", - (PyCFunction)py_lv_obj_set_subject_increment_event_rollover, +static PyMethodDef py_lv_obj_set_style_flex_track_place_def = { + "lv_obj_set_style_flex_track_place", + (PyCFunction)py_lv_obj_set_style_flex_track_place, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28645,30 +28024,30 @@ static PyMethodDef py_lv_obj_set_subject_increment_event_rollover_def = { /* * lvgl extension definition for: - * void lv_obj_add_subject_toggle_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger) + * void lv_obj_set_style_flex_grow(lv_obj_t *obj, uint8_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_subject_toggle_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *trigger_py; - if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &trigger_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + uint8_t value = (uint8_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t))lv_obj_add_subject_toggle_event)(obj, subject, trigger); + ((void (*)(lv_obj_t *, uint8_t, lv_style_selector_t))lv_obj_set_style_flex_grow)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_subject_toggle_event_def = { - "lv_obj_add_subject_toggle_event", - (PyCFunction)py_lv_obj_add_subject_toggle_event, +static PyMethodDef py_lv_obj_set_style_flex_grow_def = { + "lv_obj_set_style_flex_grow", + (PyCFunction)py_lv_obj_set_style_flex_grow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28676,31 +28055,30 @@ static PyMethodDef py_lv_obj_add_subject_toggle_event_def = { /* * lvgl extension definition for: - * void lv_obj_add_subject_set_int_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, int32_t value) + * void lv_obj_set_style_grid_column_dsc_array(lv_obj_t *obj, const int32_t *value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_subject_set_int_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_column_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *trigger_py; long value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &trigger_py, &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); - int32_t value = (int32_t)value_val; + const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, int32_t))lv_obj_add_subject_set_int_event)(obj, subject, trigger, value); + ((void (*)(lv_obj_t *, const int32_t *, lv_style_selector_t))lv_obj_set_style_grid_column_dsc_array)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_subject_set_int_event_def = { - "lv_obj_add_subject_set_int_event", - (PyCFunction)py_lv_obj_add_subject_set_int_event, +static PyMethodDef py_lv_obj_set_style_grid_column_dsc_array_def = { + "lv_obj_set_style_grid_column_dsc_array", + (PyCFunction)py_lv_obj_set_style_grid_column_dsc_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28708,31 +28086,30 @@ static PyMethodDef py_lv_obj_add_subject_set_int_event_def = { /* * lvgl extension definition for: - * void lv_obj_add_subject_set_float_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, float value) + * void lv_obj_set_style_grid_column_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_subject_set_float_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_column_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *trigger_py; double value_val; - if (!PyArg_ParseTuple(py_args, "OOd", &subject_py, &trigger_py, &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); - float value = (float)value_val; + lv_grid_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, float))lv_obj_add_subject_set_float_event)(obj, subject, trigger, value); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_column_align)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_subject_set_float_event_def = { - "lv_obj_add_subject_set_float_event", - (PyCFunction)py_lv_obj_add_subject_set_float_event, +static PyMethodDef py_lv_obj_set_style_grid_column_align_def = { + "lv_obj_set_style_grid_column_align", + (PyCFunction)py_lv_obj_set_style_grid_column_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28740,31 +28117,30 @@ static PyMethodDef py_lv_obj_add_subject_set_float_event_def = { /* * lvgl extension definition for: - * void lv_obj_add_subject_set_string_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, const char *value) + * void lv_obj_set_style_grid_row_dsc_array(lv_obj_t *obj, const int32_t *value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_add_subject_set_string_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_row_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *trigger_py; PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "OOO", &subject_py, &trigger_py, &value_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); - const char *value = (const char *)(char*)convert_from_str(value_py); + const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, const char *))lv_obj_add_subject_set_string_event)(obj, subject, trigger, value); + ((void (*)(lv_obj_t *, const int32_t *, lv_style_selector_t))lv_obj_set_style_grid_row_dsc_array)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_add_subject_set_string_event_def = { - "lv_obj_add_subject_set_string_event", - (PyCFunction)py_lv_obj_add_subject_set_string_event, +static PyMethodDef py_lv_obj_set_style_grid_row_dsc_array_def = { + "lv_obj_set_style_grid_row_dsc_array", + (PyCFunction)py_lv_obj_set_style_grid_row_dsc_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28772,32 +28148,30 @@ static PyMethodDef py_lv_obj_add_subject_set_string_event_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_flag_if_eq(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + * void lv_obj_set_style_grid_row_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_flag_if_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_row_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *flag_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); - int32_t ref_value = (int32_t)ref_value_val; + lv_grid_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_eq)(obj, subject, flag, ref_value); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_row_align)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_flag_if_eq_def = { - "lv_obj_bind_flag_if_eq", - (PyCFunction)py_lv_obj_bind_flag_if_eq, +static PyMethodDef py_lv_obj_set_style_grid_row_align_def = { + "lv_obj_set_style_grid_row_align", + (PyCFunction)py_lv_obj_set_style_grid_row_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28805,32 +28179,30 @@ static PyMethodDef py_lv_obj_bind_flag_if_eq_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_flag_if_not_eq(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + * void lv_obj_set_style_grid_cell_column_pos(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_flag_if_not_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_cell_column_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *flag_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_not_eq)(obj, subject, flag, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_column_pos)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_flag_if_not_eq_def = { - "lv_obj_bind_flag_if_not_eq", - (PyCFunction)py_lv_obj_bind_flag_if_not_eq, +static PyMethodDef py_lv_obj_set_style_grid_cell_column_pos_def = { + "lv_obj_set_style_grid_cell_column_pos", + (PyCFunction)py_lv_obj_set_style_grid_cell_column_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28838,32 +28210,30 @@ static PyMethodDef py_lv_obj_bind_flag_if_not_eq_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_flag_if_gt(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + * void lv_obj_set_style_grid_cell_x_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_flag_if_gt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_cell_x_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *flag_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); - int32_t ref_value = (int32_t)ref_value_val; + lv_grid_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_gt)(obj, subject, flag, ref_value); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_cell_x_align)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_flag_if_gt_def = { - "lv_obj_bind_flag_if_gt", - (PyCFunction)py_lv_obj_bind_flag_if_gt, +static PyMethodDef py_lv_obj_set_style_grid_cell_x_align_def = { + "lv_obj_set_style_grid_cell_x_align", + (PyCFunction)py_lv_obj_set_style_grid_cell_x_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28871,32 +28241,30 @@ static PyMethodDef py_lv_obj_bind_flag_if_gt_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_flag_if_ge(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + * void lv_obj_set_style_grid_cell_column_span(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_flag_if_ge(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_cell_column_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *flag_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_ge)(obj, subject, flag, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_column_span)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_flag_if_ge_def = { - "lv_obj_bind_flag_if_ge", - (PyCFunction)py_lv_obj_bind_flag_if_ge, +static PyMethodDef py_lv_obj_set_style_grid_cell_column_span_def = { + "lv_obj_set_style_grid_cell_column_span", + (PyCFunction)py_lv_obj_set_style_grid_cell_column_span, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28904,32 +28272,30 @@ static PyMethodDef py_lv_obj_bind_flag_if_ge_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_flag_if_lt(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + * void lv_obj_set_style_grid_cell_row_pos(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_flag_if_lt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_cell_row_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *flag_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_lt)(obj, subject, flag, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_row_pos)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_flag_if_lt_def = { - "lv_obj_bind_flag_if_lt", - (PyCFunction)py_lv_obj_bind_flag_if_lt, +static PyMethodDef py_lv_obj_set_style_grid_cell_row_pos_def = { + "lv_obj_set_style_grid_cell_row_pos", + (PyCFunction)py_lv_obj_set_style_grid_cell_row_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28937,32 +28303,30 @@ static PyMethodDef py_lv_obj_bind_flag_if_lt_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_flag_if_le(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + * void lv_obj_set_style_grid_cell_y_align(lv_obj_t *obj, lv_grid_align_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_flag_if_le(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_cell_y_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *flag_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); - int32_t ref_value = (int32_t)ref_value_val; + lv_grid_align_t value = (int)mp_obj_get_int(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_le)(obj, subject, flag, ref_value); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_style_selector_t))lv_obj_set_style_grid_cell_y_align)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_flag_if_le_def = { - "lv_obj_bind_flag_if_le", - (PyCFunction)py_lv_obj_bind_flag_if_le, +static PyMethodDef py_lv_obj_set_style_grid_cell_y_align_def = { + "lv_obj_set_style_grid_cell_y_align", + (PyCFunction)py_lv_obj_set_style_grid_cell_y_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -28970,32 +28334,30 @@ static PyMethodDef py_lv_obj_bind_flag_if_le_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_state_if_eq(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + * void lv_obj_set_style_grid_cell_row_span(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_state_if_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_grid_cell_row_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *state_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_state_t state = (int)mp_obj_get_int(state_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_eq)(obj, subject, state, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_grid_cell_row_span)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_state_if_eq_def = { - "lv_obj_bind_state_if_eq", - (PyCFunction)py_lv_obj_bind_state_if_eq, +static PyMethodDef py_lv_obj_set_style_grid_cell_row_span_def = { + "lv_obj_set_style_grid_cell_row_span", + (PyCFunction)py_lv_obj_set_style_grid_cell_row_span, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29003,32 +28365,30 @@ static PyMethodDef py_lv_obj_bind_state_if_eq_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_state_if_not_eq(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + * void lv_obj_set_style_pad_all(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_state_if_not_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_pad_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *state_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_state_t state = (int)mp_obj_get_int(state_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_not_eq)(obj, subject, state, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_all)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_state_if_not_eq_def = { - "lv_obj_bind_state_if_not_eq", - (PyCFunction)py_lv_obj_bind_state_if_not_eq, +static PyMethodDef py_lv_obj_set_style_pad_all_def = { + "lv_obj_set_style_pad_all", + (PyCFunction)py_lv_obj_set_style_pad_all, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29036,32 +28396,30 @@ static PyMethodDef py_lv_obj_bind_state_if_not_eq_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_state_if_gt(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + * void lv_obj_set_style_pad_hor(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_state_if_gt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_pad_hor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *state_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_state_t state = (int)mp_obj_get_int(state_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_gt)(obj, subject, state, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_hor)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_state_if_gt_def = { - "lv_obj_bind_state_if_gt", - (PyCFunction)py_lv_obj_bind_state_if_gt, +static PyMethodDef py_lv_obj_set_style_pad_hor_def = { + "lv_obj_set_style_pad_hor", + (PyCFunction)py_lv_obj_set_style_pad_hor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29069,32 +28427,30 @@ static PyMethodDef py_lv_obj_bind_state_if_gt_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_state_if_ge(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + * void lv_obj_set_style_pad_ver(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_state_if_ge(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_pad_ver(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *state_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_state_t state = (int)mp_obj_get_int(state_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_ge)(obj, subject, state, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_ver)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_state_if_ge_def = { - "lv_obj_bind_state_if_ge", - (PyCFunction)py_lv_obj_bind_state_if_ge, +static PyMethodDef py_lv_obj_set_style_pad_ver_def = { + "lv_obj_set_style_pad_ver", + (PyCFunction)py_lv_obj_set_style_pad_ver, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29102,32 +28458,30 @@ static PyMethodDef py_lv_obj_bind_state_if_ge_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_state_if_lt(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + * void lv_obj_set_style_margin_all(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_state_if_lt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_margin_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *state_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_state_t state = (int)mp_obj_get_int(state_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_lt)(obj, subject, state, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_all)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_state_if_lt_def = { - "lv_obj_bind_state_if_lt", - (PyCFunction)py_lv_obj_bind_state_if_lt, +static PyMethodDef py_lv_obj_set_style_margin_all_def = { + "lv_obj_set_style_margin_all", + (PyCFunction)py_lv_obj_set_style_margin_all, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29135,32 +28489,30 @@ static PyMethodDef py_lv_obj_bind_state_if_lt_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_state_if_le(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + * void lv_obj_set_style_margin_hor(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_state_if_le(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_margin_hor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *state_py; long ref_value_val; - if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - lv_state_t state = (int)mp_obj_get_int(state_py); - int32_t ref_value = (int32_t)ref_value_val; + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_le)(obj, subject, state, ref_value); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_hor)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_state_if_le_def = { - "lv_obj_bind_state_if_le", - (PyCFunction)py_lv_obj_bind_state_if_le, +static PyMethodDef py_lv_obj_set_style_margin_hor_def = { + "lv_obj_set_style_margin_hor", + (PyCFunction)py_lv_obj_set_style_margin_hor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29168,30 +28520,30 @@ static PyMethodDef py_lv_obj_bind_state_if_le_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_obj_bind_checked(lv_obj_t *obj, lv_subject_t *subject) + * void lv_obj_set_style_margin_ver(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_bind_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_margin_ver(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_obj_bind_checked)(obj, subject); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_margin_ver)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_bind_checked_def = { - "lv_obj_bind_checked", - (PyCFunction)py_lv_obj_bind_checked, +static PyMethodDef py_lv_obj_set_style_margin_ver_def = { + "lv_obj_set_style_margin_ver", + (PyCFunction)py_lv_obj_set_style_margin_ver, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29199,30 +28551,30 @@ static PyMethodDef py_lv_obj_bind_checked_def = { /* * lvgl extension definition for: - * void lv_obj_refr(lv_layer_t *layer, lv_obj_t *obj) + * void lv_obj_set_style_pad_gap(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_refr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_pad_gap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_obj_t *obj = mp_to_lv(obj_py); + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, lv_obj_t *))lv_obj_refr)(layer, obj); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_pad_gap)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_refr_def = { - "lv_obj_refr", - (PyCFunction)py_lv_obj_refr, +static PyMethodDef py_lv_obj_set_style_pad_gap_def = { + "lv_obj_set_style_pad_gap", + (PyCFunction)py_lv_obj_set_style_pad_gap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29230,28 +28582,31 @@ static PyMethodDef py_lv_obj_refr_def = { /* * lvgl extension definition for: - * void lv_obj_style_init(void) + * void lv_obj_set_style_size(lv_obj_t *obj, int32_t width, int32_t height, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_style_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long width_val; long height_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "llO", &width_val, &height_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t width = (int32_t)width_val; + int32_t height = (int32_t)height_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_obj_style_init)(); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_style_selector_t))lv_obj_set_style_size)(obj, width, height, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_style_init_def = { - "lv_obj_style_init", - (PyCFunction)py_lv_obj_style_init, +static PyMethodDef py_lv_obj_set_style_size_def = { + "lv_obj_set_style_size", + (PyCFunction)py_lv_obj_set_style_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29259,209 +28614,123 @@ static PyMethodDef py_lv_obj_style_init_def = { /* * lvgl extension definition for: - * void lv_obj_style_deinit(void) + * void lv_obj_set_style_transform_scale(lv_obj_t *obj, int32_t value, lv_style_selector_t selector) */ -static PyObject *py_lv_obj_style_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_style_transform_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long value_val; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_obj_style_deinit)(); + ((void (*)(lv_obj_t *, int32_t, lv_style_selector_t))lv_obj_set_style_transform_scale)(obj, value, selector); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_style_deinit_def = { - "lv_obj_style_deinit", - (PyCFunction)py_lv_obj_style_deinit, +static PyMethodDef py_lv_obj_set_style_transform_scale_def = { + "lv_obj_set_style_transform_scale", + (PyCFunction)py_lv_obj_set_style_transform_scale, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_obj_style_transition_dsc_t_path_cb' - * lv_anim_path_cb_t path_cb - */ - - -/* - * Struct lv_obj_style_transition_dsc_t (CPython) + * lvgl extension definition for: + * int32_t lv_obj_get_style_space_left(const lv_obj_t *obj, lv_part_t part) */ - -extern PyMethodDef py_lv_obj_style_transition_dsc_t_methods[]; - -static PyObject *py_lv_obj_style_transition_dsc_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_obj_style_transition_dsc_t *data = (lv_obj_style_transition_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "time") == 0) return mp_obj_new_int_from_uint(data->time); - if (strcmp(attr, "delay") == 0) return mp_obj_new_int_from_uint(data->delay); - if (strcmp(attr, "selector") == 0) return mp_obj_new_int_from_uint(data->selector); - if (strcmp(attr, "prop") == 0) return mp_obj_new_int_from_uint(data->prop); - if (strcmp(attr, "path_cb") == 0) return mp_lv_funcptr(NULL, data->path_cb, NULL, "lv_obj_style_transition_dsc_t_path_cb", NULL); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_obj_style_transition_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_obj_style_transition_dsc_t_field_names[] = {"time", "delay", "selector", "prop", "path_cb", "user_data", NULL}; - -static PyObject *py_lv_obj_style_transition_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_obj_get_style_space_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_obj_style_transition_dsc_t_field_names, py_lv_obj_style_transition_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_left)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_style_transition_dsc_t_type_methods[] = { - {"__dir__", py_lv_obj_style_transition_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_style_space_left_def = { + "lv_obj_get_style_space_left", + (PyCFunction)py_lv_obj_get_style_space_left, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_obj_style_transition_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_obj_style_transition_dsc_t *data = (lv_obj_style_transition_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_obj_style_transition_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "time") == 0) { data->time = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "delay") == 0) { data->delay = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "selector") == 0) { data->selector = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "prop") == 0) { data->prop = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "path_cb") == 0) { data->path_cb = mp_lv_callback(value, NULL, "lv_obj_style_transition_dsc_t_path_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_obj_style_transition_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_obj_style_transition_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_obj_style_transition_dsc_t)); -} -static void py_lv_obj_style_transition_dsc_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_space_right(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_space_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_right)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_obj_style_transition_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_obj_style_transition_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_obj_style_transition_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_obj_style_transition_dsc_t_getattro, - .tp_setattro = (setter)py_lv_obj_style_transition_dsc_t_setattro, - .tp_new = py_lv_obj_style_transition_dsc_t_new, - .tp_methods = py_lv_obj_style_transition_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_style_space_right_def = { + "lv_obj_get_style_space_right", + (PyCFunction)py_lv_obj_get_style_space_right, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_obj_style_transition_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_obj_style_transition_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_obj_style_transition_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_obj_style_transition_dsc_t*)self->data; -} - -static lv_obj_style_transition_dsc_t mp_write_scratch_lv_obj_style_transition_dsc_t; - -static inline void* mp_write_value_ptr_lv_obj_style_transition_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_obj_style_transition_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_obj_style_transition_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_obj_style_transition_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_obj_style_transition_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_obj_style_transition_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_obj_style_transition_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_obj_style_transition_dsc_t, 0, sizeof(lv_obj_style_transition_dsc_t)); - return &mp_write_scratch_lv_obj_style_transition_dsc_t; -} - -#define mp_write_lv_obj_style_transition_dsc_t(struct_obj) (*((lv_obj_style_transition_dsc_t*)mp_write_value_ptr_lv_obj_style_transition_dsc_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_obj_style_transition_dsc_t(void *field) -{ - return lv_to_mp_struct(&py_lv_obj_style_transition_dsc_t_type, field); -} - -#define mp_read_lv_obj_style_transition_dsc_t(field) lv_to_mp_struct_own(&py_lv_obj_style_transition_dsc_t_type, copy_buffer(&field, sizeof(lv_obj_style_transition_dsc_t))) -#define mp_read_byref_lv_obj_style_transition_dsc_t(field) mp_read_ptr_lv_obj_style_transition_dsc_t(&field) - /* * lvgl extension definition for: - * void lv_obj_style_create_transition(lv_obj_t *obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const lv_obj_style_transition_dsc_t *tr) + * int32_t lv_obj_get_style_space_top(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_style_create_transition(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_space_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *prev_state_py; PyObject *new_state_py; PyObject *tr_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &part_py, &prev_state_py, &new_state_py, &tr_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); lv_part_t part = (int)mp_obj_get_int(part_py); - lv_state_t prev_state = (int)mp_obj_get_int(prev_state_py); - lv_state_t new_state = (int)mp_obj_get_int(new_state_py); - const lv_obj_style_transition_dsc_t *tr = (const lv_obj_style_transition_dsc_t *)mp_write_ptr_lv_obj_style_transition_dsc_t(tr_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_state_t, lv_state_t, const lv_obj_style_transition_dsc_t *))lv_obj_style_create_transition)(obj, part, prev_state, new_state, tr); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_top)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_style_create_transition_def = { - "lv_obj_style_create_transition", - (PyCFunction)py_lv_obj_style_create_transition, +static PyMethodDef py_lv_obj_get_style_space_top_def = { + "lv_obj_get_style_space_top", + (PyCFunction)py_lv_obj_get_style_space_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29469,31 +28738,30 @@ static PyMethodDef py_lv_obj_style_create_transition_def = { /* * lvgl extension definition for: - * lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t *obj, lv_state_t state1, lv_state_t state2) + * int32_t lv_obj_get_style_space_bottom(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_style_state_compare(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_space_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state1_py; PyObject *state2_py; - if (!PyArg_ParseTuple(py_args, "OO", &state1_py, &state2_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_state_t state1 = (int)mp_obj_get_int(state1_py); - lv_state_t state2 = (int)mp_obj_get_int(state2_py); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_state_cmp_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_style_state_cmp_t (*)(lv_obj_t *, lv_state_t, lv_state_t))lv_obj_style_state_compare)(obj, state1, state2); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_bottom)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_style_state_compare_def = { - "lv_obj_style_state_compare", - (PyCFunction)py_lv_obj_style_state_compare, +static PyMethodDef py_lv_obj_get_style_space_bottom_def = { + "lv_obj_get_style_space_bottom", + (PyCFunction)py_lv_obj_get_style_space_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29501,27 +28769,31 @@ static PyMethodDef py_lv_obj_style_state_compare_def = { /* * lvgl extension definition for: - * void lv_obj_update_layer_type(lv_obj_t *obj) + * lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t *obj, lv_part_t part, const char *txt) */ -static PyObject *py_lv_obj_update_layer_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_calculate_style_text_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *part_py; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_text_align_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_update_layer_type)(obj); + _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_obj_calculate_style_text_align)(obj, part, txt); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_update_layer_type_def = { - "lv_obj_update_layer_type", - (PyCFunction)py_lv_obj_update_layer_type, +static PyMethodDef py_lv_obj_calculate_style_text_align_def = { + "lv_obj_calculate_style_text_align", + (PyCFunction)py_lv_obj_calculate_style_text_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29529,31 +28801,30 @@ static PyMethodDef py_lv_obj_update_layer_type_def = { /* * lvgl extension definition for: - * lv_result_t lv_obj_scroll_by_raw(lv_obj_t *obj, int32_t x, int32_t y) + * int32_t lv_obj_get_style_transform_scale_x_safe(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_scroll_by_raw(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_x_safe(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, int32_t, int32_t))lv_obj_scroll_by_raw)(obj, x, y); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x_safe)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_scroll_by_raw_def = { - "lv_obj_scroll_by_raw", - (PyCFunction)py_lv_obj_scroll_by_raw, +static PyMethodDef py_lv_obj_get_style_transform_scale_x_safe_def = { + "lv_obj_get_style_transform_scale_x_safe", + (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29561,28 +28832,30 @@ static PyMethodDef py_lv_obj_scroll_by_raw_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_ext_draw_size(const lv_obj_t *obj) + * int32_t lv_obj_get_style_transform_scale_y_safe(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_ext_draw_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_y_safe(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_ext_draw_size)(obj); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y_safe)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_ext_draw_size_def = { - "lv_obj_get_ext_draw_size", - (PyCFunction)py_lv_obj_get_ext_draw_size, +static PyMethodDef py_lv_obj_get_style_transform_scale_y_safe_def = { + "lv_obj_get_style_transform_scale_y_safe", + (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29590,28 +28863,30 @@ static PyMethodDef py_lv_obj_get_ext_draw_size_def = { /* * lvgl extension definition for: - * lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t *obj) + * lv_opa_t lv_obj_get_style_opa_recursive(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_layer_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_opa_recursive(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_layer_type_t _res; + lv_opa_t _res; lvpy_lock(); - _res = ((lv_layer_type_t (*)(const lv_obj_t *))lv_obj_get_layer_type)(obj); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_recursive)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_layer_type_def = { - "lv_obj_get_layer_type", - (PyCFunction)py_lv_obj_get_layer_type, +static PyMethodDef py_lv_obj_get_style_opa_recursive_def = { + "lv_obj_get_style_opa_recursive", + (PyCFunction)py_lv_obj_get_style_opa_recursive, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29619,27 +28894,31 @@ static PyMethodDef py_lv_obj_get_layer_type_def = { /* * lvgl extension definition for: - * void lv_obj_destruct(lv_obj_t *obj) + * lv_color32_t lv_obj_style_apply_recolor(const lv_obj_t *obj, lv_part_t part, lv_color32_t color) */ -static PyObject *py_lv_obj_destruct(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_style_apply_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *part_py; PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &color_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_color32_t color = mp_write_lv_color32_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_destruct)(obj); + _res = ((lv_color32_t (*)(const lv_obj_t *, lv_part_t, lv_color32_t))lv_obj_style_apply_recolor)(obj, part, color); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_obj_destruct_def = { - "lv_obj_destruct", - (PyCFunction)py_lv_obj_destruct, +static PyMethodDef py_lv_obj_style_apply_recolor_def = { + "lv_obj_style_apply_recolor", + (PyCFunction)py_lv_obj_style_apply_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -29647,61 +28926,9335 @@ static PyMethodDef py_lv_obj_destruct_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_obj_create(lv_obj_t *parent) + * lv_color32_t lv_obj_get_style_recolor_recursive(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_recolor_recursive(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_obj_create)(parent); + _res = ((lv_color32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_recursive)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_obj_create_def = { - "lv_obj_create", - (PyCFunction)py_lv_obj_create, +static PyMethodDef py_lv_obj_get_style_recolor_recursive_def = { + "lv_obj_get_style_recolor_recursive", + (PyCFunction)py_lv_obj_get_style_recolor_recursive, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl obj object definitions (CPython) + * Struct lv_subject_value_t (CPython) */ -static PyObject *py_lv_obj_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_obj_create(type, py_args, py_kwds); -} -static PyObject *py_lv_obj_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +extern PyMethodDef py_lv_subject_value_t_methods[]; + +static PyObject *py_lv_subject_value_t_getattro(PyObject *self, PyObject *name) { - return py_lv_obj_create((PyObject *)type, py_args, py_kwds); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_subject_value_t *data = (lv_subject_value_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "num") == 0) return mp_obj_new_int(data->num); + if (strcmp(attr, "pointer") == 0) return ptr_to_mp((void*)data->pointer); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "float_v") == 0) return mp_obj_new_float_from_f(data->float_v); + for (PyMethodDef *m = py_lv_subject_value_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static void py_lv_obj_dealloc(py_lv_obj_t *self) +static const char *const py_lv_subject_value_t_field_names[] = {"num", "pointer", "color", "float_v", NULL}; + +static PyObject *py_lv_subject_value_t_dir(PyObject *self, PyObject *unused) { - lvpy_dealloc_obj(self); + (void)unused; + return lvpy_struct_dir(self, py_lv_subject_value_t_field_names, py_lv_subject_value_t_methods); } -static PyMethodDef py_lv_obj_methods[] = { +static PyMethodDef py_lv_subject_value_t_type_methods[] = { + {"__dir__", py_lv_subject_value_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_subject_value_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_subject_value_t *data = (lv_subject_value_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_subject_value_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "num") == 0) { data->num = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pointer") == 0) { data->pointer = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "float_v") == 0) { data->float_v = (float)mp_obj_get_float(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_subject_value_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_subject_value_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_subject_value_t)); +} + +static void py_lv_subject_value_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_subject_value_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_subject_value_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_subject_value_t_dealloc, + .tp_getattro = (getter)py_lv_subject_value_t_getattro, + .tp_setattro = (setter)py_lv_subject_value_t_setattro, + .tp_new = py_lv_subject_value_t_new, + .tp_methods = py_lv_subject_value_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_subject_value_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_subject_value_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_subject_value_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_subject_value_t*)self->data; +} + +static lv_subject_value_t mp_write_scratch_lv_subject_value_t; + +static inline void* mp_write_value_ptr_lv_subject_value_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_subject_value_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_subject_value_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_subject_value_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_subject_value_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_subject_value_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_subject_value_t or dict, got None"); + } + memset(&mp_write_scratch_lv_subject_value_t, 0, sizeof(lv_subject_value_t)); + return &mp_write_scratch_lv_subject_value_t; +} + +#define mp_write_lv_subject_value_t(struct_obj) (*((lv_subject_value_t*)mp_write_value_ptr_lv_subject_value_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_subject_value_t(void *field) +{ + return lv_to_mp_struct(&py_lv_subject_value_t_type, field); +} + +#define mp_read_lv_subject_value_t(field) lv_to_mp_struct_own(&py_lv_subject_value_t_type, copy_buffer(&field, sizeof(lv_subject_value_t))) +#define mp_read_byref_lv_subject_value_t(field) mp_read_ptr_lv_subject_value_t(&field) + + +/* + * Struct lv_subject_t (CPython) + */ + +extern PyMethodDef py_lv_subject_t_methods[]; + +static PyObject *py_lv_subject_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_subject_t *data = (lv_subject_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "subs_ll") == 0) return mp_read_byref_lv_ll_t(data->subs_ll); + if (strcmp(attr, "value") == 0) return mp_read_byref_lv_subject_value_t(data->value); + if (strcmp(attr, "prev_value") == 0) return mp_read_byref_lv_subject_value_t(data->prev_value); + if (strcmp(attr, "min_value") == 0) return mp_read_byref_lv_subject_value_t(data->min_value); + if (strcmp(attr, "max_value") == 0) return mp_read_byref_lv_subject_value_t(data->max_value); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "type") == 0) return mp_obj_new_int_from_uint(data->type); + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + if (strcmp(attr, "notify_restart_query") == 0) return mp_obj_new_int_from_uint(data->notify_restart_query); + for (PyMethodDef *m = py_lv_subject_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_subject_t_field_names[] = {"subs_ll", "value", "prev_value", "min_value", "max_value", "user_data", "type", "size", "notify_restart_query", NULL}; + +static PyObject *py_lv_subject_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_subject_t_field_names, py_lv_subject_t_methods); +} + +static PyMethodDef py_lv_subject_t_type_methods[] = { + {"__dir__", py_lv_subject_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_subject_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_subject_t *data = (lv_subject_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_subject_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "subs_ll") == 0) { data->subs_ll = mp_write_lv_ll_t(value); result = 0; } + if (strcmp(attr, "value") == 0) { data->value = mp_write_lv_subject_value_t(value); result = 0; } + if (strcmp(attr, "prev_value") == 0) { data->prev_value = mp_write_lv_subject_value_t(value); result = 0; } + if (strcmp(attr, "min_value") == 0) { data->min_value = mp_write_lv_subject_value_t(value); result = 0; } + if (strcmp(attr, "max_value") == 0) { data->max_value = mp_write_lv_subject_value_t(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "type") == 0) { data->type = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "notify_restart_query") == 0) { data->notify_restart_query = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_subject_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_subject_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_subject_t)); +} + +static void py_lv_subject_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_subject_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_subject_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_subject_t_dealloc, + .tp_getattro = (getter)py_lv_subject_t_getattro, + .tp_setattro = (setter)py_lv_subject_t_setattro, + .tp_new = py_lv_subject_t_new, + .tp_methods = py_lv_subject_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_subject_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_subject_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_subject_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_subject_t*)self->data; +} + +static lv_subject_t mp_write_scratch_lv_subject_t; + +static inline void* mp_write_value_ptr_lv_subject_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_subject_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_subject_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_subject_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_subject_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_subject_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_subject_t or dict, got None"); + } + memset(&mp_write_scratch_lv_subject_t, 0, sizeof(lv_subject_t)); + return &mp_write_scratch_lv_subject_t; +} + +#define mp_write_lv_subject_t(struct_obj) (*((lv_subject_t*)mp_write_value_ptr_lv_subject_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_subject_t(void *field) +{ + return lv_to_mp_struct(&py_lv_subject_t_type, field); +} + +#define mp_read_lv_subject_t(field) lv_to_mp_struct_own(&py_lv_subject_t_type, copy_buffer(&field, sizeof(lv_subject_t))) +#define mp_read_byref_lv_subject_t(field) mp_read_ptr_lv_subject_t(&field) + +#define funcptr_lv_observer_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_observer_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_observer_t_cb_callback(lv_observer_t *observer, lv_subject_t *subject); +#define funcptr_user_cb NULL + +static inline PyObject *mp_lv_funcptr_user_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_observer_t_user_cb' + * void (*user_cb)(void) + */ + + +/* + * Struct lv_observer_t (CPython) + */ + +extern PyMethodDef py_lv_observer_t_methods[]; + +static PyObject *py_lv_observer_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_observer_t *data = (lv_observer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "subject") == 0) return mp_read_ptr_lv_subject_t((void*)data->subject); + if (strcmp(attr, "cb") == 0) return mp_lv_funcptr(NULL, data->cb, lv_observer_t_cb_callback, "lv_observer_t_cb", data->user_data); + if (strcmp(attr, "target") == 0) return ptr_to_mp((void*)data->target); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "user_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->user_cb, NULL, "lv_observer_t_user_cb", NULL); + if (strcmp(attr, "auto_free_user_data") == 0) return mp_obj_new_int_from_uint(data->auto_free_user_data); + if (strcmp(attr, "notified") == 0) return mp_obj_new_int_from_uint(data->notified); + if (strcmp(attr, "for_obj") == 0) return mp_obj_new_int_from_uint(data->for_obj); + for (PyMethodDef *m = py_lv_observer_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_observer_t_field_names[] = {"subject", "cb", "target", "user_data", "user_cb", "auto_free_user_data", "notified", "for_obj", NULL}; + +static PyObject *py_lv_observer_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_observer_t_field_names, py_lv_observer_t_methods); +} + +static PyMethodDef py_lv_observer_t_type_methods[] = { + {"__dir__", py_lv_observer_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_observer_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_observer_t *data = (lv_observer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_observer_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "subject") == 0) { data->subject = (void*)mp_write_ptr_lv_subject_t(value); result = 0; } + if (strcmp(attr, "cb") == 0) { data->cb = mp_lv_callback(value, lv_observer_t_cb_callback, "lv_observer_t_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "target") == 0) { data->target = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_cb") == 0) { data->user_cb = (void*)mp_lv_callback(value, NULL, "lv_observer_t_user_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "auto_free_user_data") == 0) { data->auto_free_user_data = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "notified") == 0) { data->notified = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "for_obj") == 0) { data->for_obj = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_observer_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_observer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_observer_t)); +} + +static void py_lv_observer_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_observer_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_observer_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_observer_t_dealloc, + .tp_getattro = (getter)py_lv_observer_t_getattro, + .tp_setattro = (setter)py_lv_observer_t_setattro, + .tp_new = py_lv_observer_t_new, + .tp_methods = py_lv_observer_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_observer_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_observer_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_observer_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_observer_t*)self->data; +} + +static lv_observer_t mp_write_scratch_lv_observer_t; + +static inline void* mp_write_value_ptr_lv_observer_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_observer_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_observer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_observer_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_observer_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_observer_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_observer_t or dict, got None"); + } + memset(&mp_write_scratch_lv_observer_t, 0, sizeof(lv_observer_t)); + return &mp_write_scratch_lv_observer_t; +} + +#define mp_write_lv_observer_t(struct_obj) (*((lv_observer_t*)mp_write_value_ptr_lv_observer_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_observer_t(void *field) +{ + return lv_to_mp_struct(&py_lv_observer_t_type, field); +} + +#define mp_read_lv_observer_t(field) lv_to_mp_struct_own(&py_lv_observer_t_type, copy_buffer(&field, sizeof(lv_observer_t))) +#define mp_read_byref_lv_observer_t(field) mp_read_ptr_lv_observer_t(&field) + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, lv_subject_t *subject, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; PyObject *subject_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOOl", &style_py, &selector_py, &subject_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, lv_subject_t *, int32_t))lv_obj_bind_style)(obj, style, selector, subject, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_style_def = { + "lv_obj_bind_style", + (PyCFunction)py_lv_obj_bind_style, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector, lv_subject_t *subject) + */ +static PyObject *py_lv_obj_bind_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *prop_py; PyObject *selector_py; PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "OOO", &prop_py, &selector_py, &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t, lv_subject_t *))lv_obj_bind_style_prop)(obj, prop, selector, subject); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_style_prop_def = { + "lv_obj_bind_style_prop", + (PyCFunction)py_lv_obj_bind_style_prop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_draw_dsc_base_t (CPython) + */ + +extern PyMethodDef py_lv_draw_dsc_base_t_methods[]; + +static PyObject *py_lv_draw_dsc_base_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_dsc_base_t *data = (lv_draw_dsc_base_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "obj") == 0) return lv_to_mp((void*)data->obj); + if (strcmp(attr, "part") == 0) return mp_obj_new_int_from_uint(data->part); + if (strcmp(attr, "id1") == 0) return mp_obj_new_int_from_uint(data->id1); + if (strcmp(attr, "id2") == 0) return mp_obj_new_int_from_uint(data->id2); + if (strcmp(attr, "layer") == 0) return mp_read_ptr_lv_layer_t((void*)data->layer); + if (strcmp(attr, "drop_shadow_ofs_x") == 0) return mp_obj_new_int(data->drop_shadow_ofs_x); + if (strcmp(attr, "drop_shadow_ofs_y") == 0) return mp_obj_new_int(data->drop_shadow_ofs_y); + if (strcmp(attr, "drop_shadow_color") == 0) return mp_read_byref_lv_color_t(data->drop_shadow_color); + if (strcmp(attr, "drop_shadow_opa") == 0) return mp_obj_new_int_from_uint(data->drop_shadow_opa); + if (strcmp(attr, "drop_shadow_blur_radius") == 0) return mp_obj_new_int(data->drop_shadow_blur_radius); + if (strcmp(attr, "drop_shadow_quality") == 0) return mp_obj_new_int(data->drop_shadow_quality); + if (strcmp(attr, "dsc_size") == 0) return mp_obj_new_int_from_uint(data->dsc_size); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + for (PyMethodDef *m = py_lv_draw_dsc_base_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_dsc_base_t_field_names[] = {"obj", "part", "id1", "id2", "layer", "drop_shadow_ofs_x", "drop_shadow_ofs_y", "drop_shadow_color", "drop_shadow_opa", "drop_shadow_blur_radius", "drop_shadow_quality", "dsc_size", "user_data", NULL}; + +static PyObject *py_lv_draw_dsc_base_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_dsc_base_t_field_names, py_lv_draw_dsc_base_t_methods); +} + +static PyMethodDef py_lv_draw_dsc_base_t_type_methods[] = { + {"__dir__", py_lv_draw_dsc_base_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_dsc_base_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_dsc_base_t *data = (lv_draw_dsc_base_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_dsc_base_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "obj") == 0) { data->obj = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "part") == 0) { data->part = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "id1") == 0) { data->id1 = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "id2") == 0) { data->id2 = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "layer") == 0) { data->layer = (void*)mp_write_ptr_lv_layer_t(value); result = 0; } + if (strcmp(attr, "drop_shadow_ofs_x") == 0) { data->drop_shadow_ofs_x = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "drop_shadow_ofs_y") == 0) { data->drop_shadow_ofs_y = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "drop_shadow_color") == 0) { data->drop_shadow_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "drop_shadow_opa") == 0) { data->drop_shadow_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "drop_shadow_blur_radius") == 0) { data->drop_shadow_blur_radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "drop_shadow_quality") == 0) { data->drop_shadow_quality = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dsc_size") == 0) { data->dsc_size = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_dsc_base_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_dsc_base_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_dsc_base_t)); +} + +static void py_lv_draw_dsc_base_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_dsc_base_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_dsc_base_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_dsc_base_t_dealloc, + .tp_getattro = (getter)py_lv_draw_dsc_base_t_getattro, + .tp_setattro = (setter)py_lv_draw_dsc_base_t_setattro, + .tp_new = py_lv_draw_dsc_base_t_new, + .tp_methods = py_lv_draw_dsc_base_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_dsc_base_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_dsc_base_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_dsc_base_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_dsc_base_t*)self->data; +} + +static lv_draw_dsc_base_t mp_write_scratch_lv_draw_dsc_base_t; + +static inline void* mp_write_value_ptr_lv_draw_dsc_base_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_dsc_base_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_dsc_base_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_dsc_base_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_dsc_base_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_dsc_base_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_dsc_base_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_dsc_base_t, 0, sizeof(lv_draw_dsc_base_t)); + return &mp_write_scratch_lv_draw_dsc_base_t; +} + +#define mp_write_lv_draw_dsc_base_t(struct_obj) (*((lv_draw_dsc_base_t*)mp_write_value_ptr_lv_draw_dsc_base_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_dsc_base_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_dsc_base_t_type, field); +} + +#define mp_read_lv_draw_dsc_base_t(field) lv_to_mp_struct_own(&py_lv_draw_dsc_base_t_type, copy_buffer(&field, sizeof(lv_draw_dsc_base_t))) +#define mp_read_byref_lv_draw_dsc_base_t(field) mp_read_ptr_lv_draw_dsc_base_t(&field) + + +/* + * Struct lv_draw_rect_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_draw_rect_dsc_t_methods[]; + +static PyObject *py_lv_draw_rect_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_rect_dsc_t *data = (lv_draw_rect_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); + if (strcmp(attr, "bg_image_src") == 0) return ptr_to_mp((void*)data->bg_image_src); + if (strcmp(attr, "bg_image_symbol_font") == 0) return ptr_to_mp((void*)data->bg_image_symbol_font); + if (strcmp(attr, "bg_image_recolor") == 0) return mp_read_byref_lv_color_t(data->bg_image_recolor); + if (strcmp(attr, "bg_image_opa") == 0) return mp_obj_new_int_from_uint(data->bg_image_opa); + if (strcmp(attr, "bg_image_recolor_opa") == 0) return mp_obj_new_int_from_uint(data->bg_image_recolor_opa); + if (strcmp(attr, "bg_image_tiled") == 0) return mp_obj_new_int_from_uint(data->bg_image_tiled); + if (strcmp(attr, "bg_opa") == 0) return mp_obj_new_int_from_uint(data->bg_opa); + if (strcmp(attr, "border_opa") == 0) return mp_obj_new_int_from_uint(data->border_opa); + if (strcmp(attr, "outline_opa") == 0) return mp_obj_new_int_from_uint(data->outline_opa); + if (strcmp(attr, "shadow_opa") == 0) return mp_obj_new_int_from_uint(data->shadow_opa); + if (strcmp(attr, "bg_color") == 0) return mp_read_byref_lv_color_t(data->bg_color); + if (strcmp(attr, "bg_grad") == 0) return mp_read_byref_lv_grad_dsc_t(data->bg_grad); + if (strcmp(attr, "bg_image_colorkey") == 0) return mp_read_ptr_lv_image_colorkey_t((void*)data->bg_image_colorkey); + if (strcmp(attr, "border_color") == 0) return mp_read_byref_lv_color_t(data->border_color); + if (strcmp(attr, "border_width") == 0) return mp_obj_new_int(data->border_width); + if (strcmp(attr, "border_side") == 0) return mp_obj_new_int(data->border_side); + if (strcmp(attr, "border_post") == 0) return mp_obj_new_int_from_uint(data->border_post); + if (strcmp(attr, "outline_color") == 0) return mp_read_byref_lv_color_t(data->outline_color); + if (strcmp(attr, "outline_width") == 0) return mp_obj_new_int(data->outline_width); + if (strcmp(attr, "outline_pad") == 0) return mp_obj_new_int(data->outline_pad); + if (strcmp(attr, "shadow_color") == 0) return mp_read_byref_lv_color_t(data->shadow_color); + if (strcmp(attr, "shadow_width") == 0) return mp_obj_new_int(data->shadow_width); + if (strcmp(attr, "shadow_offset_x") == 0) return mp_obj_new_int(data->shadow_offset_x); + if (strcmp(attr, "shadow_offset_y") == 0) return mp_obj_new_int(data->shadow_offset_y); + if (strcmp(attr, "shadow_spread") == 0) return mp_obj_new_int(data->shadow_spread); + for (PyMethodDef *m = py_lv_draw_rect_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_rect_dsc_t_field_names[] = {"base", "radius", "bg_image_src", "bg_image_symbol_font", "bg_image_recolor", "bg_image_opa", "bg_image_recolor_opa", "bg_image_tiled", "bg_opa", "border_opa", "outline_opa", "shadow_opa", "bg_color", "bg_grad", "bg_image_colorkey", "border_color", "border_width", "border_side", "border_post", "outline_color", "outline_width", "outline_pad", "shadow_color", "shadow_width", "shadow_offset_x", "shadow_offset_y", "shadow_spread", NULL}; + +static PyObject *py_lv_draw_rect_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_rect_dsc_t_field_names, py_lv_draw_rect_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_rect_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_rect_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_rect_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_rect_dsc_t *data = (lv_draw_rect_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_rect_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "bg_image_src") == 0) { data->bg_image_src = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "bg_image_symbol_font") == 0) { data->bg_image_symbol_font = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "bg_image_recolor") == 0) { data->bg_image_recolor = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "bg_image_opa") == 0) { data->bg_image_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "bg_image_recolor_opa") == 0) { data->bg_image_recolor_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "bg_image_tiled") == 0) { data->bg_image_tiled = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "bg_opa") == 0) { data->bg_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "border_opa") == 0) { data->border_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_opa") == 0) { data->outline_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "shadow_opa") == 0) { data->shadow_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "bg_color") == 0) { data->bg_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "bg_grad") == 0) { data->bg_grad = mp_write_lv_grad_dsc_t(value); result = 0; } + if (strcmp(attr, "bg_image_colorkey") == 0) { data->bg_image_colorkey = (void*)mp_write_ptr_lv_image_colorkey_t(value); result = 0; } + if (strcmp(attr, "border_color") == 0) { data->border_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "border_width") == 0) { data->border_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "border_side") == 0) { data->border_side = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "border_post") == 0) { data->border_post = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_color") == 0) { data->outline_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "outline_width") == 0) { data->outline_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_pad") == 0) { data->outline_pad = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "shadow_color") == 0) { data->shadow_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "shadow_width") == 0) { data->shadow_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "shadow_offset_x") == 0) { data->shadow_offset_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "shadow_offset_y") == 0) { data->shadow_offset_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "shadow_spread") == 0) { data->shadow_spread = (int32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_rect_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_rect_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_rect_dsc_t)); +} + +static void py_lv_draw_rect_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_rect_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_rect_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_rect_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_rect_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_rect_dsc_t_setattro, + .tp_new = py_lv_draw_rect_dsc_t_new, + .tp_methods = py_lv_draw_rect_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_rect_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_rect_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_rect_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_rect_dsc_t*)self->data; +} + +static lv_draw_rect_dsc_t mp_write_scratch_lv_draw_rect_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_rect_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_rect_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_rect_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_rect_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_rect_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_rect_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_rect_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_rect_dsc_t, 0, sizeof(lv_draw_rect_dsc_t)); + return &mp_write_scratch_lv_draw_rect_dsc_t; +} + +#define mp_write_lv_draw_rect_dsc_t(struct_obj) (*((lv_draw_rect_dsc_t*)mp_write_value_ptr_lv_draw_rect_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_rect_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_rect_dsc_t_type, field); +} + +#define mp_read_lv_draw_rect_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_rect_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_rect_dsc_t))) +#define mp_read_byref_lv_draw_rect_dsc_t(field) mp_read_ptr_lv_draw_rect_dsc_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_init_draw_rect_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_rect_dsc_t *draw_dsc) + */ +static PyObject *py_lv_obj_init_draw_rect_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_draw_rect_dsc_t *draw_dsc = mp_write_ptr_lv_draw_rect_dsc_t(draw_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_draw_rect_dsc_t *))lv_obj_init_draw_rect_dsc)(obj, part, draw_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_init_draw_rect_dsc_def = { + "lv_obj_init_draw_rect_dsc", + (PyCFunction)py_lv_obj_init_draw_rect_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_draw_label_hint_t (CPython) + */ + +extern PyMethodDef py_lv_draw_label_hint_t_methods[]; + +static PyObject *py_lv_draw_label_hint_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_label_hint_t *data = (lv_draw_label_hint_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "line_start") == 0) return mp_obj_new_int(data->line_start); + if (strcmp(attr, "y") == 0) return mp_obj_new_int(data->y); + if (strcmp(attr, "coord_y") == 0) return mp_obj_new_int(data->coord_y); + for (PyMethodDef *m = py_lv_draw_label_hint_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_label_hint_t_field_names[] = {"line_start", "y", "coord_y", NULL}; + +static PyObject *py_lv_draw_label_hint_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_label_hint_t_field_names, py_lv_draw_label_hint_t_methods); +} + +static PyMethodDef py_lv_draw_label_hint_t_type_methods[] = { + {"__dir__", py_lv_draw_label_hint_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_label_hint_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_label_hint_t *data = (lv_draw_label_hint_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_label_hint_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "line_start") == 0) { data->line_start = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y") == 0) { data->y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "coord_y") == 0) { data->coord_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_label_hint_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_label_hint_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_label_hint_t)); +} + +static void py_lv_draw_label_hint_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_label_hint_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_label_hint_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_label_hint_t_dealloc, + .tp_getattro = (getter)py_lv_draw_label_hint_t_getattro, + .tp_setattro = (setter)py_lv_draw_label_hint_t_setattro, + .tp_new = py_lv_draw_label_hint_t_new, + .tp_methods = py_lv_draw_label_hint_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_label_hint_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_label_hint_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_label_hint_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_label_hint_t*)self->data; +} + +static lv_draw_label_hint_t mp_write_scratch_lv_draw_label_hint_t; + +static inline void* mp_write_value_ptr_lv_draw_label_hint_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_label_hint_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_label_hint_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_label_hint_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_label_hint_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_label_hint_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_label_hint_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_label_hint_t, 0, sizeof(lv_draw_label_hint_t)); + return &mp_write_scratch_lv_draw_label_hint_t; +} + +#define mp_write_lv_draw_label_hint_t(struct_obj) (*((lv_draw_label_hint_t*)mp_write_value_ptr_lv_draw_label_hint_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_label_hint_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_label_hint_t_type, field); +} + +#define mp_read_lv_draw_label_hint_t(field) lv_to_mp_struct_own(&py_lv_draw_label_hint_t_type, copy_buffer(&field, sizeof(lv_draw_label_hint_t))) +#define mp_read_byref_lv_draw_label_hint_t(field) mp_read_ptr_lv_draw_label_hint_t(&field) + + +/* + * Struct lv_draw_label_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_draw_label_dsc_t_methods[]; + +static PyObject *py_lv_draw_label_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_label_dsc_t *data = (lv_draw_label_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "text") == 0) return convert_to_str((void*)data->text); + if (strcmp(attr, "text_size") == 0) return mp_read_byref_lv_point_t(data->text_size); + if (strcmp(attr, "font") == 0) return mp_read_ptr_lv_font_t((void*)data->font); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "line_space") == 0) return mp_obj_new_int(data->line_space); + if (strcmp(attr, "letter_space") == 0) return mp_obj_new_int(data->letter_space); + if (strcmp(attr, "ofs_x") == 0) return mp_obj_new_int(data->ofs_x); + if (strcmp(attr, "ofs_y") == 0) return mp_obj_new_int(data->ofs_y); + if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); + if (strcmp(attr, "sel_start") == 0) return mp_obj_new_int_from_uint(data->sel_start); + if (strcmp(attr, "sel_end") == 0) return mp_obj_new_int_from_uint(data->sel_end); + if (strcmp(attr, "sel_color") == 0) return mp_read_byref_lv_color_t(data->sel_color); + if (strcmp(attr, "sel_bg_color") == 0) return mp_read_byref_lv_color_t(data->sel_bg_color); + if (strcmp(attr, "text_length") == 0) return mp_obj_new_int_from_uint(data->text_length); + if (strcmp(attr, "align") == 0) return mp_obj_new_int(data->align); + if (strcmp(attr, "bidi_dir") == 0) return mp_obj_new_int(data->bidi_dir); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "outline_stroke_opa") == 0) return mp_obj_new_int_from_uint(data->outline_stroke_opa); + if (strcmp(attr, "decor") == 0) return mp_obj_new_int(data->decor); + if (strcmp(attr, "flag") == 0) return mp_obj_new_int(data->flag); + if (strcmp(attr, "text_local") == 0) return mp_obj_new_int_from_uint(data->text_local); + if (strcmp(attr, "text_static") == 0) return mp_obj_new_int_from_uint(data->text_static); + if (strcmp(attr, "has_bided") == 0) return mp_obj_new_int_from_uint(data->has_bided); + if (strcmp(attr, "hint") == 0) return mp_read_ptr_lv_draw_label_hint_t((void*)data->hint); + if (strcmp(attr, "outline_stroke_color") == 0) return mp_read_byref_lv_color_t(data->outline_stroke_color); + if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); + for (PyMethodDef *m = py_lv_draw_label_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_label_dsc_t_field_names[] = {"base", "text", "text_size", "font", "color", "line_space", "letter_space", "ofs_x", "ofs_y", "rotation", "sel_start", "sel_end", "sel_color", "sel_bg_color", "text_length", "align", "bidi_dir", "opa", "outline_stroke_opa", "decor", "flag", "text_local", "text_static", "has_bided", "hint", "outline_stroke_color", "outline_stroke_width", NULL}; + +static PyObject *py_lv_draw_label_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_label_dsc_t_field_names, py_lv_draw_label_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_label_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_label_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_label_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_label_dsc_t *data = (lv_draw_label_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_label_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "text") == 0) { data->text = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "text_size") == 0) { data->text_size = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "font") == 0) { data->font = (void*)mp_write_ptr_lv_font_t(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "line_space") == 0) { data->line_space = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "letter_space") == 0) { data->letter_space = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ofs_x") == 0) { data->ofs_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ofs_y") == 0) { data->ofs_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "sel_start") == 0) { data->sel_start = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "sel_end") == 0) { data->sel_end = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "sel_color") == 0) { data->sel_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "sel_bg_color") == 0) { data->sel_bg_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "text_length") == 0) { data->text_length = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "align") == 0) { data->align = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "bidi_dir") == 0) { data->bidi_dir = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_stroke_opa") == 0) { data->outline_stroke_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "decor") == 0) { data->decor = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "flag") == 0) { data->flag = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "text_local") == 0) { data->text_local = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "text_static") == 0) { data->text_static = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "has_bided") == 0) { data->has_bided = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "hint") == 0) { data->hint = (void*)mp_write_ptr_lv_draw_label_hint_t(value); result = 0; } + if (strcmp(attr, "outline_stroke_color") == 0) { data->outline_stroke_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_label_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_label_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_label_dsc_t)); +} + +static void py_lv_draw_label_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_label_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_label_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_label_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_label_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_label_dsc_t_setattro, + .tp_new = py_lv_draw_label_dsc_t_new, + .tp_methods = py_lv_draw_label_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_label_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_label_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_label_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_label_dsc_t*)self->data; +} + +static lv_draw_label_dsc_t mp_write_scratch_lv_draw_label_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_label_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_label_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_label_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_label_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_label_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_label_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_label_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_label_dsc_t, 0, sizeof(lv_draw_label_dsc_t)); + return &mp_write_scratch_lv_draw_label_dsc_t; +} + +#define mp_write_lv_draw_label_dsc_t(struct_obj) (*((lv_draw_label_dsc_t*)mp_write_value_ptr_lv_draw_label_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_label_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_label_dsc_t_type, field); +} + +#define mp_read_lv_draw_label_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_label_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_label_dsc_t))) +#define mp_read_byref_lv_draw_label_dsc_t(field) mp_read_ptr_lv_draw_label_dsc_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_init_draw_label_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_label_dsc_t *draw_dsc) + */ +static PyObject *py_lv_obj_init_draw_label_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_draw_label_dsc_t *draw_dsc = mp_write_ptr_lv_draw_label_dsc_t(draw_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_draw_label_dsc_t *))lv_obj_init_draw_label_dsc)(obj, part, draw_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_init_draw_label_dsc_def = { + "lv_obj_init_draw_label_dsc", + (PyCFunction)py_lv_obj_init_draw_label_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_draw_image_sup_t (CPython) + */ + +extern PyMethodDef py_lv_draw_image_sup_t_methods[]; + +static PyObject *py_lv_draw_image_sup_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_image_sup_t *data = (lv_draw_image_sup_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "alpha_color") == 0) return mp_read_byref_lv_color_t(data->alpha_color); + if (strcmp(attr, "palette") == 0) return mp_read_ptr_lv_color32_t((void*)data->palette); + if (strcmp(attr, "palette_size") == 0) return mp_obj_new_int_from_uint(data->palette_size); + for (PyMethodDef *m = py_lv_draw_image_sup_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_image_sup_t_field_names[] = {"alpha_color", "palette", "palette_size", NULL}; + +static PyObject *py_lv_draw_image_sup_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_image_sup_t_field_names, py_lv_draw_image_sup_t_methods); +} + +static PyMethodDef py_lv_draw_image_sup_t_type_methods[] = { + {"__dir__", py_lv_draw_image_sup_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_image_sup_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_image_sup_t *data = (lv_draw_image_sup_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_image_sup_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "alpha_color") == 0) { data->alpha_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "palette") == 0) { data->palette = (void*)mp_write_ptr_lv_color32_t(value); result = 0; } + if (strcmp(attr, "palette_size") == 0) { data->palette_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_image_sup_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_image_sup_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_image_sup_t)); +} + +static void py_lv_draw_image_sup_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_image_sup_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_image_sup_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_image_sup_t_dealloc, + .tp_getattro = (getter)py_lv_draw_image_sup_t_getattro, + .tp_setattro = (setter)py_lv_draw_image_sup_t_setattro, + .tp_new = py_lv_draw_image_sup_t_new, + .tp_methods = py_lv_draw_image_sup_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_image_sup_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_image_sup_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_image_sup_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_image_sup_t*)self->data; +} + +static lv_draw_image_sup_t mp_write_scratch_lv_draw_image_sup_t; + +static inline void* mp_write_value_ptr_lv_draw_image_sup_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_image_sup_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_image_sup_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_image_sup_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_image_sup_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_image_sup_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_image_sup_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_image_sup_t, 0, sizeof(lv_draw_image_sup_t)); + return &mp_write_scratch_lv_draw_image_sup_t; +} + +#define mp_write_lv_draw_image_sup_t(struct_obj) (*((lv_draw_image_sup_t*)mp_write_value_ptr_lv_draw_image_sup_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_image_sup_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_image_sup_t_type, field); +} + +#define mp_read_lv_draw_image_sup_t(field) lv_to_mp_struct_own(&py_lv_draw_image_sup_t_type, copy_buffer(&field, sizeof(lv_draw_image_sup_t))) +#define mp_read_byref_lv_draw_image_sup_t(field) mp_read_ptr_lv_draw_image_sup_t(&field) + + +/* + * Struct lv_image_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_image_dsc_t_methods[]; + +static PyObject *py_lv_image_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_dsc_t *data = (lv_image_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); + if (strcmp(attr, "data_size") == 0) return mp_obj_new_int_from_uint(data->data_size); + if (strcmp(attr, "data") == 0) return mp_array_from_u8ptr((void*)data->data); + if (strcmp(attr, "reserved") == 0) return ptr_to_mp((void*)data->reserved); + if (strcmp(attr, "reserved_2") == 0) return ptr_to_mp((void*)data->reserved_2); + for (PyMethodDef *m = py_lv_image_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_image_dsc_t_field_names[] = {"header", "data_size", "data", "reserved", "reserved_2", NULL}; + +static PyObject *py_lv_image_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_image_dsc_t_field_names, py_lv_image_dsc_t_methods); +} + +static PyMethodDef py_lv_image_dsc_t_type_methods[] = { + {"__dir__", py_lv_image_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_image_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_dsc_t *data = (lv_image_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_image_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } + if (strcmp(attr, "data_size") == 0) { data->data_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "data") == 0) { data->data = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "reserved") == 0) { data->reserved = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "reserved_2") == 0) { data->reserved_2 = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_image_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_image_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_image_dsc_t)); +} + +static void py_lv_image_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_image_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_image_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_image_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_image_dsc_t_getattro, + .tp_setattro = (setter)py_lv_image_dsc_t_setattro, + .tp_new = py_lv_image_dsc_t_new, + .tp_methods = py_lv_image_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_image_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_image_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_image_dsc_t*)self->data; +} + +static lv_image_dsc_t mp_write_scratch_lv_image_dsc_t; + +static inline void* mp_write_value_ptr_lv_image_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_image_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_image_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_image_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_image_dsc_t, 0, sizeof(lv_image_dsc_t)); + return &mp_write_scratch_lv_image_dsc_t; +} + +#define mp_write_lv_image_dsc_t(struct_obj) (*((lv_image_dsc_t*)mp_write_value_ptr_lv_image_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_image_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_image_dsc_t_type, field); +} + +#define mp_read_lv_image_dsc_t(field) lv_to_mp_struct_own(&py_lv_image_dsc_t_type, copy_buffer(&field, sizeof(lv_image_dsc_t))) +#define mp_read_byref_lv_image_dsc_t(field) mp_read_ptr_lv_image_dsc_t(&field) + + +/* + * Struct lv_draw_image_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_draw_image_dsc_t_methods[]; + +static PyObject *py_lv_draw_image_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_image_dsc_t *data = (lv_draw_image_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); + if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); + if (strcmp(attr, "clip_radius") == 0) return mp_obj_new_int(data->clip_radius); + if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); + if (strcmp(attr, "scale_x") == 0) return mp_obj_new_int(data->scale_x); + if (strcmp(attr, "scale_y") == 0) return mp_obj_new_int(data->scale_y); + if (strcmp(attr, "skew_x") == 0) return mp_obj_new_int(data->skew_x); + if (strcmp(attr, "skew_y") == 0) return mp_obj_new_int(data->skew_y); + if (strcmp(attr, "pivot") == 0) return mp_read_byref_lv_point_t(data->pivot); + if (strcmp(attr, "recolor") == 0) return mp_read_byref_lv_color_t(data->recolor); + if (strcmp(attr, "recolor_opa") == 0) return mp_obj_new_int_from_uint(data->recolor_opa); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); + if (strcmp(attr, "antialias") == 0) return mp_obj_new_int_from_uint(data->antialias); + if (strcmp(attr, "tile") == 0) return mp_obj_new_int_from_uint(data->tile); + if (strcmp(attr, "colorkey") == 0) return mp_read_ptr_lv_image_colorkey_t((void*)data->colorkey); + if (strcmp(attr, "sup") == 0) return mp_read_ptr_lv_draw_image_sup_t((void*)data->sup); + if (strcmp(attr, "image_area") == 0) return mp_read_byref_lv_area_t(data->image_area); + if (strcmp(attr, "bitmap_mask_src") == 0) return mp_read_ptr_lv_image_dsc_t((void*)data->bitmap_mask_src); + for (PyMethodDef *m = py_lv_draw_image_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_image_dsc_t_field_names[] = {"base", "src", "header", "clip_radius", "rotation", "scale_x", "scale_y", "skew_x", "skew_y", "pivot", "recolor", "recolor_opa", "opa", "blend_mode", "antialias", "tile", "colorkey", "sup", "image_area", "bitmap_mask_src", NULL}; + +static PyObject *py_lv_draw_image_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_image_dsc_t_field_names, py_lv_draw_image_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_image_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_image_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_image_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_image_dsc_t *data = (lv_draw_image_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_image_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } + if (strcmp(attr, "clip_radius") == 0) { data->clip_radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scale_x") == 0) { data->scale_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scale_y") == 0) { data->scale_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "skew_x") == 0) { data->skew_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "skew_y") == 0) { data->skew_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pivot") == 0) { data->pivot = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "recolor") == 0) { data->recolor = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "recolor_opa") == 0) { data->recolor_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "antialias") == 0) { data->antialias = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "tile") == 0) { data->tile = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "colorkey") == 0) { data->colorkey = (void*)mp_write_ptr_lv_image_colorkey_t(value); result = 0; } + if (strcmp(attr, "sup") == 0) { data->sup = (void*)mp_write_ptr_lv_draw_image_sup_t(value); result = 0; } + if (strcmp(attr, "image_area") == 0) { data->image_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "bitmap_mask_src") == 0) { data->bitmap_mask_src = (void*)mp_write_ptr_lv_image_dsc_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_image_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_image_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_image_dsc_t)); +} + +static void py_lv_draw_image_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_image_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_image_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_image_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_image_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_image_dsc_t_setattro, + .tp_new = py_lv_draw_image_dsc_t_new, + .tp_methods = py_lv_draw_image_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_image_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_image_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_image_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_image_dsc_t*)self->data; +} + +static lv_draw_image_dsc_t mp_write_scratch_lv_draw_image_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_image_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_image_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_image_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_image_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_image_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_image_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_image_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_image_dsc_t, 0, sizeof(lv_draw_image_dsc_t)); + return &mp_write_scratch_lv_draw_image_dsc_t; +} + +#define mp_write_lv_draw_image_dsc_t(struct_obj) (*((lv_draw_image_dsc_t*)mp_write_value_ptr_lv_draw_image_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_image_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_image_dsc_t_type, field); +} + +#define mp_read_lv_draw_image_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_image_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_image_dsc_t))) +#define mp_read_byref_lv_draw_image_dsc_t(field) mp_read_ptr_lv_draw_image_dsc_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_init_draw_image_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_image_dsc_t *draw_dsc) + */ +static PyObject *py_lv_obj_init_draw_image_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_draw_image_dsc_t *draw_dsc = mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_draw_image_dsc_t *))lv_obj_init_draw_image_dsc)(obj, part, draw_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_init_draw_image_dsc_def = { + "lv_obj_init_draw_image_dsc", + (PyCFunction)py_lv_obj_init_draw_image_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_point_precise_t (CPython) + */ + +extern PyMethodDef py_lv_point_precise_t_methods[]; + +static PyObject *py_lv_point_precise_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_point_precise_t *data = (lv_point_precise_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "x") == 0) return mp_obj_new_float_from_f(data->x); + if (strcmp(attr, "y") == 0) return mp_obj_new_float_from_f(data->y); + for (PyMethodDef *m = py_lv_point_precise_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_point_precise_t_field_names[] = {"x", "y", NULL}; + +static PyObject *py_lv_point_precise_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_point_precise_t_field_names, py_lv_point_precise_t_methods); +} + +static PyMethodDef py_lv_point_precise_t_type_methods[] = { + {"__dir__", py_lv_point_precise_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_point_precise_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_point_precise_t *data = (lv_point_precise_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_point_precise_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "x") == 0) { data->x = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "y") == 0) { data->y = (float)mp_obj_get_float(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_point_precise_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_point_precise_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_point_precise_t)); +} + +static void py_lv_point_precise_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_point_precise_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_point_precise_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_point_precise_t_dealloc, + .tp_getattro = (getter)py_lv_point_precise_t_getattro, + .tp_setattro = (setter)py_lv_point_precise_t_setattro, + .tp_new = py_lv_point_precise_t_new, + .tp_methods = py_lv_point_precise_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_point_precise_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_point_precise_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_point_precise_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_point_precise_t*)self->data; +} + +static lv_point_precise_t mp_write_scratch_lv_point_precise_t; + +static inline void* mp_write_value_ptr_lv_point_precise_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_point_precise_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_point_precise_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_point_precise_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_point_precise_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_point_precise_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_point_precise_t or dict, got None"); + } + memset(&mp_write_scratch_lv_point_precise_t, 0, sizeof(lv_point_precise_t)); + return &mp_write_scratch_lv_point_precise_t; +} + +#define mp_write_lv_point_precise_t(struct_obj) (*((lv_point_precise_t*)mp_write_value_ptr_lv_point_precise_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_point_precise_t(void *field) +{ + return lv_to_mp_struct(&py_lv_point_precise_t_type, field); +} + +#define mp_read_lv_point_precise_t(field) lv_to_mp_struct_own(&py_lv_point_precise_t_type, copy_buffer(&field, sizeof(lv_point_precise_t))) +#define mp_read_byref_lv_point_precise_t(field) mp_read_ptr_lv_point_precise_t(&field) + + +/* + * Struct lv_draw_line_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_draw_line_dsc_t_methods[]; + +static PyObject *py_lv_draw_line_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_line_dsc_t *data = (lv_draw_line_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "p1") == 0) return mp_read_byref_lv_point_precise_t(data->p1); + if (strcmp(attr, "p2") == 0) return mp_read_byref_lv_point_precise_t(data->p2); + if (strcmp(attr, "points") == 0) return mp_read_ptr_lv_point_precise_t((void*)data->points); + if (strcmp(attr, "point_cnt") == 0) return mp_obj_new_int(data->point_cnt); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); + if (strcmp(attr, "dash_width") == 0) return mp_obj_new_int(data->dash_width); + if (strcmp(attr, "dash_gap") == 0) return mp_obj_new_int(data->dash_gap); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "round_start") == 0) return mp_obj_new_int_from_uint(data->round_start); + if (strcmp(attr, "round_end") == 0) return mp_obj_new_int_from_uint(data->round_end); + if (strcmp(attr, "raw_end") == 0) return mp_obj_new_int_from_uint(data->raw_end); + for (PyMethodDef *m = py_lv_draw_line_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_line_dsc_t_field_names[] = {"base", "p1", "p2", "points", "point_cnt", "color", "width", "dash_width", "dash_gap", "opa", "round_start", "round_end", "raw_end", NULL}; + +static PyObject *py_lv_draw_line_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_line_dsc_t_field_names, py_lv_draw_line_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_line_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_line_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_line_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_line_dsc_t *data = (lv_draw_line_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_line_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "p1") == 0) { data->p1 = mp_write_lv_point_precise_t(value); result = 0; } + if (strcmp(attr, "p2") == 0) { data->p2 = mp_write_lv_point_precise_t(value); result = 0; } + if (strcmp(attr, "points") == 0) { data->points = (void*)mp_write_ptr_lv_point_precise_t(value); result = 0; } + if (strcmp(attr, "point_cnt") == 0) { data->point_cnt = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dash_width") == 0) { data->dash_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dash_gap") == 0) { data->dash_gap = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "round_start") == 0) { data->round_start = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "round_end") == 0) { data->round_end = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "raw_end") == 0) { data->raw_end = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_line_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_line_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_line_dsc_t)); +} + +static void py_lv_draw_line_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_line_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_line_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_line_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_line_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_line_dsc_t_setattro, + .tp_new = py_lv_draw_line_dsc_t_new, + .tp_methods = py_lv_draw_line_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_line_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_line_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_line_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_line_dsc_t*)self->data; +} + +static lv_draw_line_dsc_t mp_write_scratch_lv_draw_line_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_line_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_line_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_line_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_line_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_line_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_line_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_line_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_line_dsc_t, 0, sizeof(lv_draw_line_dsc_t)); + return &mp_write_scratch_lv_draw_line_dsc_t; +} + +#define mp_write_lv_draw_line_dsc_t(struct_obj) (*((lv_draw_line_dsc_t*)mp_write_value_ptr_lv_draw_line_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_line_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_line_dsc_t_type, field); +} + +#define mp_read_lv_draw_line_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_line_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_line_dsc_t))) +#define mp_read_byref_lv_draw_line_dsc_t(field) mp_read_ptr_lv_draw_line_dsc_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_init_draw_line_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_line_dsc_t *draw_dsc) + */ +static PyObject *py_lv_obj_init_draw_line_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_draw_line_dsc_t *draw_dsc = mp_write_ptr_lv_draw_line_dsc_t(draw_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_draw_line_dsc_t *))lv_obj_init_draw_line_dsc)(obj, part, draw_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_init_draw_line_dsc_def = { + "lv_obj_init_draw_line_dsc", + (PyCFunction)py_lv_obj_init_draw_line_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_draw_arc_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_draw_arc_dsc_t_methods[]; + +static PyObject *py_lv_draw_arc_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_arc_dsc_t *data = (lv_draw_arc_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); + if (strcmp(attr, "start_angle") == 0) return mp_obj_new_float_from_f(data->start_angle); + if (strcmp(attr, "end_angle") == 0) return mp_obj_new_float_from_f(data->end_angle); + if (strcmp(attr, "center") == 0) return mp_read_byref_lv_point_t(data->center); + if (strcmp(attr, "img_src") == 0) return ptr_to_mp((void*)data->img_src); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int_from_uint(data->radius); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "rounded") == 0) return mp_obj_new_int_from_uint(data->rounded); + for (PyMethodDef *m = py_lv_draw_arc_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_arc_dsc_t_field_names[] = {"base", "color", "width", "start_angle", "end_angle", "center", "img_src", "radius", "opa", "rounded", NULL}; + +static PyObject *py_lv_draw_arc_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_arc_dsc_t_field_names, py_lv_draw_arc_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_arc_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_arc_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_arc_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_arc_dsc_t *data = (lv_draw_arc_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_arc_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "start_angle") == 0) { data->start_angle = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "end_angle") == 0) { data->end_angle = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "center") == 0) { data->center = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "img_src") == 0) { data->img_src = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "rounded") == 0) { data->rounded = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_arc_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_arc_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_arc_dsc_t)); +} + +static void py_lv_draw_arc_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_arc_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_arc_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_arc_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_arc_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_arc_dsc_t_setattro, + .tp_new = py_lv_draw_arc_dsc_t_new, + .tp_methods = py_lv_draw_arc_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_arc_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_arc_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_arc_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_arc_dsc_t*)self->data; +} + +static lv_draw_arc_dsc_t mp_write_scratch_lv_draw_arc_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_arc_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_arc_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_arc_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_arc_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_arc_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_arc_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_arc_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_arc_dsc_t, 0, sizeof(lv_draw_arc_dsc_t)); + return &mp_write_scratch_lv_draw_arc_dsc_t; +} + +#define mp_write_lv_draw_arc_dsc_t(struct_obj) (*((lv_draw_arc_dsc_t*)mp_write_value_ptr_lv_draw_arc_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_arc_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_arc_dsc_t_type, field); +} + +#define mp_read_lv_draw_arc_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_arc_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_arc_dsc_t))) +#define mp_read_byref_lv_draw_arc_dsc_t(field) mp_read_ptr_lv_draw_arc_dsc_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_init_draw_arc_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_arc_dsc_t *draw_dsc) + */ +static PyObject *py_lv_obj_init_draw_arc_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_draw_arc_dsc_t *draw_dsc = mp_write_ptr_lv_draw_arc_dsc_t(draw_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_draw_arc_dsc_t *))lv_obj_init_draw_arc_dsc)(obj, part, draw_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_init_draw_arc_dsc_def = { + "lv_obj_init_draw_arc_dsc", + (PyCFunction)py_lv_obj_init_draw_arc_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_draw_blur_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_draw_blur_dsc_t_methods[]; + +static PyObject *py_lv_draw_blur_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_blur_dsc_t *data = (lv_draw_blur_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "blur_radius") == 0) return mp_obj_new_int(data->blur_radius); + if (strcmp(attr, "corner_radius") == 0) return mp_obj_new_int(data->corner_radius); + if (strcmp(attr, "quality") == 0) return mp_obj_new_int(data->quality); + for (PyMethodDef *m = py_lv_draw_blur_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_blur_dsc_t_field_names[] = {"base", "blur_radius", "corner_radius", "quality", NULL}; + +static PyObject *py_lv_draw_blur_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_blur_dsc_t_field_names, py_lv_draw_blur_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_blur_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_blur_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_blur_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_blur_dsc_t *data = (lv_draw_blur_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_blur_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "blur_radius") == 0) { data->blur_radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "corner_radius") == 0) { data->corner_radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "quality") == 0) { data->quality = (int)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_blur_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_blur_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_blur_dsc_t)); +} + +static void py_lv_draw_blur_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_blur_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_blur_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_blur_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_blur_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_blur_dsc_t_setattro, + .tp_new = py_lv_draw_blur_dsc_t_new, + .tp_methods = py_lv_draw_blur_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_blur_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_blur_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_blur_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_blur_dsc_t*)self->data; +} + +static lv_draw_blur_dsc_t mp_write_scratch_lv_draw_blur_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_blur_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_blur_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_blur_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_blur_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_blur_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_blur_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_blur_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_blur_dsc_t, 0, sizeof(lv_draw_blur_dsc_t)); + return &mp_write_scratch_lv_draw_blur_dsc_t; +} + +#define mp_write_lv_draw_blur_dsc_t(struct_obj) (*((lv_draw_blur_dsc_t*)mp_write_value_ptr_lv_draw_blur_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_blur_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_blur_dsc_t_type, field); +} + +#define mp_read_lv_draw_blur_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_blur_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_blur_dsc_t))) +#define mp_read_byref_lv_draw_blur_dsc_t(field) mp_read_ptr_lv_draw_blur_dsc_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_init_draw_blur_dsc(lv_obj_t *obj, lv_part_t part, lv_draw_blur_dsc_t *draw_dsc) + */ +static PyObject *py_lv_obj_init_draw_blur_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_draw_blur_dsc_t *draw_dsc = mp_write_ptr_lv_draw_blur_dsc_t(draw_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_draw_blur_dsc_t *))lv_obj_init_draw_blur_dsc)(obj, part, draw_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_init_draw_blur_dsc_def = { + "lv_obj_init_draw_blur_dsc", + (PyCFunction)py_lv_obj_init_draw_blur_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_ext_draw_size(lv_obj_t *obj, int32_t size) + */ +static PyObject *py_lv_obj_set_ext_draw_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t size = (int32_t)size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_ext_draw_size)(obj, size); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_ext_draw_size_def = { + "lv_obj_set_ext_draw_size", + (PyCFunction)py_lv_obj_set_ext_draw_size, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * int32_t lv_obj_calculate_ext_draw_size(lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_calculate_ext_draw_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *, lv_part_t))lv_obj_calculate_ext_draw_size)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_calculate_ext_draw_size_def = { + "lv_obj_calculate_ext_draw_size", + (PyCFunction)py_lv_obj_calculate_ext_draw_size, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_refresh_ext_draw_size(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_refresh_ext_draw_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_refresh_ext_draw_size)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_refresh_ext_draw_size_def = { + "lv_obj_refresh_ext_draw_size", + (PyCFunction)py_lv_obj_refresh_ext_draw_size, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_obj_t *lv_obj_class_create_obj(const lv_obj_class_t *class_p, lv_obj_t *parent) + */ +static PyObject *py_lv_obj_class_create_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *class_p = mp_to_lv(self); + lv_obj_t *parent = mp_to_lv(parent_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(const lv_obj_class_t *, lv_obj_t *))lv_obj_class_create_obj)(class_p, parent); + lvpy_unlock(); + + PyGILState_Release(gstate); + return lv_to_mp((void*)_res); +} + +static PyMethodDef py_lv_obj_class_create_obj_def = { + "lv_obj_class_create_obj", + (PyCFunction)py_lv_obj_class_create_obj, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_class_init_obj(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_class_init_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_class_init_obj)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_class_init_obj_def = { + "lv_obj_class_init_obj", + (PyCFunction)py_lv_obj_class_init_obj, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_editable(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_editable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_editable)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_editable_def = { + "lv_obj_is_editable", + (PyCFunction)py_lv_obj_is_editable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_group_def(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_group_def(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_group_def)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_group_def_def = { + "lv_obj_is_group_def", + (PyCFunction)py_lv_obj_is_group_def, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_send_event(lv_obj_t *obj, lv_event_code_t event_code, void *param) + */ +static PyObject *py_lv_obj_send_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *event_code_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_event_code_t event_code = (int)mp_obj_get_int(event_code_py); + void *param = mp_to_ptr(param_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_obj_t *, lv_event_code_t, void *))lv_obj_send_event)(obj, event_code, param); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_send_event_def = { + "lv_obj_send_event", + (PyCFunction)py_lv_obj_send_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_event_t (CPython) + */ + +extern PyMethodDef py_lv_event_t_methods[]; + +static PyObject *py_lv_event_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_event_t *data = (lv_event_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "current_target") == 0) return ptr_to_mp((void*)data->current_target); + if (strcmp(attr, "original_target") == 0) return ptr_to_mp((void*)data->original_target); + if (strcmp(attr, "code") == 0) return mp_obj_new_int(data->code); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "param") == 0) return ptr_to_mp((void*)data->param); + if (strcmp(attr, "prev") == 0) return ptr_to_mp((void*)data->prev); + if (strcmp(attr, "deleted") == 0) return mp_obj_new_int_from_uint(data->deleted); + if (strcmp(attr, "stop_processing") == 0) return mp_obj_new_int_from_uint(data->stop_processing); + if (strcmp(attr, "stop_bubbling") == 0) return mp_obj_new_int_from_uint(data->stop_bubbling); + if (strcmp(attr, "stop_trickling") == 0) return mp_obj_new_int_from_uint(data->stop_trickling); + for (PyMethodDef *m = py_lv_event_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_event_t_field_names[] = {"current_target", "original_target", "code", "user_data", "param", "prev", "deleted", "stop_processing", "stop_bubbling", "stop_trickling", NULL}; + +static PyObject *py_lv_event_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_event_t_field_names, py_lv_event_t_methods); +} + +static PyMethodDef py_lv_event_t_type_methods[] = { + {"__dir__", py_lv_event_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_event_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_event_t *data = (lv_event_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_event_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "current_target") == 0) { data->current_target = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "original_target") == 0) { data->original_target = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "code") == 0) { data->code = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "param") == 0) { data->param = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "prev") == 0) { data->prev = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "deleted") == 0) { data->deleted = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "stop_processing") == 0) { data->stop_processing = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "stop_bubbling") == 0) { data->stop_bubbling = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "stop_trickling") == 0) { data->stop_trickling = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_event_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_event_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_event_t)); +} + +static void py_lv_event_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_event_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_event_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_event_t_dealloc, + .tp_getattro = (getter)py_lv_event_t_getattro, + .tp_setattro = (setter)py_lv_event_t_setattro, + .tp_new = py_lv_event_t_new, + .tp_methods = py_lv_event_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_event_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_event_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_event_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_event_t*)self->data; +} + +static lv_event_t mp_write_scratch_lv_event_t; + +static inline void* mp_write_value_ptr_lv_event_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_event_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_event_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_event_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_event_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_event_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_event_t or dict, got None"); + } + memset(&mp_write_scratch_lv_event_t, 0, sizeof(lv_event_t)); + return &mp_write_scratch_lv_event_t; +} + +#define mp_write_lv_event_t(struct_obj) (*((lv_event_t*)mp_write_value_ptr_lv_event_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_event_t(void *field) +{ + return lv_to_mp_struct(&py_lv_event_t_type, field); +} + +#define mp_read_lv_event_t(field) lv_to_mp_struct_own(&py_lv_event_t_type, copy_buffer(&field, sizeof(lv_event_t))) +#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_event_base(const lv_obj_class_t *class_p, lv_event_t *e) + */ +static PyObject *py_lv_obj_event_base(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *e_py; + if (!PyArg_ParseTuple(py_args, "O", &e_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *class_p = mp_to_lv(self); + lv_event_t *e = mp_write_ptr_lv_event_t(e_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(const lv_obj_class_t *, lv_event_t *))lv_obj_event_base)(class_p, e); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_event_base_def = { + "lv_obj_event_base", + (PyCFunction)py_lv_obj_event_base, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + +#define funcptr_lv_event_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_event_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_event_dsc_t_cb' + * lv_event_cb_t cb + */ + + +/* + * Struct lv_event_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_event_dsc_t_methods[]; + +static PyObject *py_lv_event_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_event_dsc_t *data = (lv_event_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "cb") == 0) return mp_lv_funcptr(NULL, data->cb, NULL, "lv_event_dsc_t_cb", NULL); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "filter") == 0) return mp_obj_new_int_from_uint(data->filter); + for (PyMethodDef *m = py_lv_event_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_event_dsc_t_field_names[] = {"cb", "user_data", "filter", NULL}; + +static PyObject *py_lv_event_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_event_dsc_t_field_names, py_lv_event_dsc_t_methods); +} + +static PyMethodDef py_lv_event_dsc_t_type_methods[] = { + {"__dir__", py_lv_event_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_event_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_event_dsc_t *data = (lv_event_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_event_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "cb") == 0) { data->cb = mp_lv_callback(value, NULL, "lv_event_dsc_t_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "filter") == 0) { data->filter = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_event_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_event_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_event_dsc_t)); +} + +static void py_lv_event_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_event_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_event_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_event_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_event_dsc_t_getattro, + .tp_setattro = (setter)py_lv_event_dsc_t_setattro, + .tp_new = py_lv_event_dsc_t_new, + .tp_methods = py_lv_event_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_event_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_event_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_event_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_event_dsc_t*)self->data; +} + +static lv_event_dsc_t mp_write_scratch_lv_event_dsc_t; + +static inline void* mp_write_value_ptr_lv_event_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_event_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_event_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_event_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_event_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_event_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_event_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_event_dsc_t, 0, sizeof(lv_event_dsc_t)); + return &mp_write_scratch_lv_event_dsc_t; +} + +#define mp_write_lv_event_dsc_t(struct_obj) (*((lv_event_dsc_t*)mp_write_value_ptr_lv_event_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_event_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_event_dsc_t_type, field); +} + +#define mp_read_lv_event_dsc_t(field) lv_to_mp_struct_own(&py_lv_event_dsc_t_type, copy_buffer(&field, sizeof(lv_event_dsc_t))) +#define mp_read_byref_lv_event_dsc_t(field) mp_read_ptr_lv_event_dsc_t(&field) + + +/* + * Callback function lv_obj_add_event_cb_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_obj_add_event_cb_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_add_event_cb_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_event_dsc_t *lv_obj_add_event_cb(lv_obj_t *obj, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + */ +static PyObject *py_lv_obj_add_event_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + void *user_data = mp_to_ptr(user_data_py); + lv_event_code_t filter = (int)mp_obj_get_int(filter_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_obj_add_event_cb_event_cb_callback, "lv_obj_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_event_dsc_t * _res; + lvpy_lock(); + _res = ((lv_event_dsc_t *(*)(lv_obj_t *, lv_event_cb_t, lv_event_code_t, void *))lv_obj_add_event_cb)(obj, event_cb, filter, user_data); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_event_dsc_t((void*)_res); +} + +static PyMethodDef py_lv_obj_add_event_cb_def = { + "lv_obj_add_event_cb", + (PyCFunction)py_lv_obj_add_event_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * uint32_t lv_obj_get_event_count(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_event_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *))lv_obj_get_event_count)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} + +static PyMethodDef py_lv_obj_get_event_count_def = { + "lv_obj_get_event_count", + (PyCFunction)py_lv_obj_get_event_count, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_event_dsc_t *lv_obj_get_event_dsc(lv_obj_t *obj, uint32_t index) + */ +static PyObject *py_lv_obj_get_event_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t index = (uint32_t)index_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_event_dsc_t * _res; + lvpy_lock(); + _res = ((lv_event_dsc_t *(*)(lv_obj_t *, uint32_t))lv_obj_get_event_dsc)(obj, index); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_event_dsc_t((void*)_res); +} + +static PyMethodDef py_lv_obj_get_event_dsc_def = { + "lv_obj_get_event_dsc", + (PyCFunction)py_lv_obj_get_event_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_remove_event(lv_obj_t *obj, uint32_t index) + */ +static PyObject *py_lv_obj_remove_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t index = (uint32_t)index_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_event_dsc_t *_lvpy_release_dsc = lv_obj_get_event_dsc(obj, index); + void *_lvpy_release_ud = _lvpy_release_dsc ? lv_event_dsc_get_user_data(_lvpy_release_dsc) : NULL; + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, uint32_t))lv_obj_remove_event)(obj, index); + lvpy_unlock(); + if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_remove_event_def = { + "lv_obj_remove_event", + (PyCFunction)py_lv_obj_remove_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_remove_event_dsc(lv_obj_t *obj, lv_event_dsc_t *dsc) + */ +static PyObject *py_lv_obj_remove_event_dsc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void *_lvpy_release_ud = lv_event_dsc_get_user_data(dsc); + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, lv_event_dsc_t *))lv_obj_remove_event_dsc)(obj, dsc); + lvpy_unlock(); + if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_remove_event_dsc_def = { + "lv_obj_remove_event_dsc", + (PyCFunction)py_lv_obj_remove_event_dsc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_t_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_obj_t_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * uint32_t lv_obj_remove_event_cb(lv_obj_t *obj, lv_event_cb_t event_cb) + */ +static PyObject *py_lv_obj_remove_event_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *event_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &event_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + void *event_cb = mp_lv_callback(event_cb_py, &lv_obj_t_event_cb_callback, "lv_obj_t_event_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void *_lvpy_release_ud = lvpy_peek_obj_event_cb_user_data(obj, event_cb, NULL); + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *, lv_event_cb_t))lv_obj_remove_event_cb)(obj, event_cb); + lvpy_unlock(); + if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} + +static PyMethodDef py_lv_obj_remove_event_cb_def = { + "lv_obj_remove_event_cb", + (PyCFunction)py_lv_obj_remove_event_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_remove_event_cb_with_user_data_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_obj_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_remove_event_cb_with_user_data_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * uint32_t lv_obj_remove_event_cb_with_user_data(lv_obj_t *obj, lv_event_cb_t event_cb, void *user_data) + */ +static PyObject *py_lv_obj_remove_event_cb_with_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_obj_remove_event_cb_with_user_data_event_cb_callback, "lv_obj_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *, lv_event_cb_t, void *))lv_obj_remove_event_cb_with_user_data)(obj, event_cb, user_data); + lvpy_unlock(); + if (_res > 0) lvpy_release_callback_user_data(user_data); + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} + +static PyMethodDef py_lv_obj_remove_event_cb_with_user_data_def = { + "lv_obj_remove_event_cb_with_user_data", + (PyCFunction)py_lv_obj_remove_event_cb_with_user_data, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_add_flag(lv_obj_t *obj, lv_obj_flag_t f) + */ +static PyObject *py_lv_obj_add_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *f_py; + if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_obj_flag_t))lv_obj_add_flag)(obj, f); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_flag_def = { + "lv_obj_add_flag", + (PyCFunction)py_lv_obj_add_flag, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_remove_flag(lv_obj_t *obj, lv_obj_flag_t f) + */ +static PyObject *py_lv_obj_remove_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *f_py; + if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_obj_flag_t))lv_obj_remove_flag)(obj, f); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_remove_flag_def = { + "lv_obj_remove_flag", + (PyCFunction)py_lv_obj_remove_flag, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_flag(lv_obj_t *obj, lv_obj_flag_t f, bool v) + */ +static PyObject *py_lv_obj_set_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *f_py; long v_val; + if (!PyArg_ParseTuple(py_args, "Ol", &f_py, &v_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + bool v = (v_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_obj_flag_t, bool))lv_obj_set_flag)(obj, f, v); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_flag_def = { + "lv_obj_set_flag", + (PyCFunction)py_lv_obj_set_flag, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_hidden(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_hidden(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_hidden)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_hidden_def = { + "lv_obj_set_hidden", + (PyCFunction)py_lv_obj_set_hidden, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_clickable(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_clickable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_clickable)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_clickable_def = { + "lv_obj_set_clickable", + (PyCFunction)py_lv_obj_set_clickable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_click_focusable(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_click_focusable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_click_focusable)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_click_focusable_def = { + "lv_obj_set_click_focusable", + (PyCFunction)py_lv_obj_set_click_focusable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_checkable(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_checkable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_checkable)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_checkable_def = { + "lv_obj_set_checkable", + (PyCFunction)py_lv_obj_set_checkable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scrollable(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scrollable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scrollable)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scrollable_def = { + "lv_obj_set_scrollable", + (PyCFunction)py_lv_obj_set_scrollable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_elastic(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_elastic(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_elastic)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_elastic_def = { + "lv_obj_set_scroll_elastic", + (PyCFunction)py_lv_obj_set_scroll_elastic, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_momentum(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_momentum(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_momentum)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_momentum_def = { + "lv_obj_set_scroll_momentum", + (PyCFunction)py_lv_obj_set_scroll_momentum, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_one(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_one(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_one)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_one_def = { + "lv_obj_set_scroll_one", + (PyCFunction)py_lv_obj_set_scroll_one, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_chain(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_chain(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_chain)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_chain_def = { + "lv_obj_set_scroll_chain", + (PyCFunction)py_lv_obj_set_scroll_chain, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_chain_hor(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_chain_hor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_chain_hor)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_chain_hor_def = { + "lv_obj_set_scroll_chain_hor", + (PyCFunction)py_lv_obj_set_scroll_chain_hor, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_chain_ver(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_chain_ver(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_chain_ver)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_chain_ver_def = { + "lv_obj_set_scroll_chain_ver", + (PyCFunction)py_lv_obj_set_scroll_chain_ver, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_on_focus(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_on_focus(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_on_focus)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_on_focus_def = { + "lv_obj_set_scroll_on_focus", + (PyCFunction)py_lv_obj_set_scroll_on_focus, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scroll_with_arrow(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scroll_with_arrow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scroll_with_arrow)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scroll_with_arrow_def = { + "lv_obj_set_scroll_with_arrow", + (PyCFunction)py_lv_obj_set_scroll_with_arrow, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_snappable(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_snappable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_snappable)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_snappable_def = { + "lv_obj_set_snappable", + (PyCFunction)py_lv_obj_set_snappable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_press_lock(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_press_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_press_lock)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_press_lock_def = { + "lv_obj_set_press_lock", + (PyCFunction)py_lv_obj_set_press_lock, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_event_bubble(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_event_bubble(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_event_bubble)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_event_bubble_def = { + "lv_obj_set_event_bubble", + (PyCFunction)py_lv_obj_set_event_bubble, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_gesture_bubble(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_gesture_bubble(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_gesture_bubble)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_gesture_bubble_def = { + "lv_obj_set_gesture_bubble", + (PyCFunction)py_lv_obj_set_gesture_bubble, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_adv_hittest(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_adv_hittest(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_adv_hittest)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_adv_hittest_def = { + "lv_obj_set_adv_hittest", + (PyCFunction)py_lv_obj_set_adv_hittest, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_ignore_layout(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_ignore_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_ignore_layout)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_ignore_layout_def = { + "lv_obj_set_ignore_layout", + (PyCFunction)py_lv_obj_set_ignore_layout, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_floating(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_floating(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_floating)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_floating_def = { + "lv_obj_set_floating", + (PyCFunction)py_lv_obj_set_floating, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_send_draw_task_events(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_send_draw_task_events(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_send_draw_task_events)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_send_draw_task_events_def = { + "lv_obj_set_send_draw_task_events", + (PyCFunction)py_lv_obj_set_send_draw_task_events, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_overflow_visible(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_overflow_visible(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_overflow_visible)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_overflow_visible_def = { + "lv_obj_set_overflow_visible", + (PyCFunction)py_lv_obj_set_overflow_visible, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_event_trickle(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_event_trickle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_event_trickle)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_event_trickle_def = { + "lv_obj_set_event_trickle", + (PyCFunction)py_lv_obj_set_event_trickle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_state_trickle(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_state_trickle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_state_trickle)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_state_trickle_def = { + "lv_obj_set_state_trickle", + (PyCFunction)py_lv_obj_set_state_trickle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_radio_button(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_radio_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_radio_button)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_radio_button_def = { + "lv_obj_set_radio_button", + (PyCFunction)py_lv_obj_set_radio_button, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_flex_in_new_track(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_flex_in_new_track(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_flex_in_new_track)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_flex_in_new_track_def = { + "lv_obj_set_flex_in_new_track", + (PyCFunction)py_lv_obj_set_flex_in_new_track, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_add_state(lv_obj_t *obj, lv_state_t state) + */ +static PyObject *py_lv_obj_add_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *state_py; + if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_state_t state = (int)mp_obj_get_int(state_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_state_t))lv_obj_add_state)(obj, state); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_state_def = { + "lv_obj_add_state", + (PyCFunction)py_lv_obj_add_state, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_remove_state(lv_obj_t *obj, lv_state_t state) + */ +static PyObject *py_lv_obj_remove_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *state_py; + if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_state_t state = (int)mp_obj_get_int(state_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_state_t))lv_obj_remove_state)(obj, state); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_remove_state_def = { + "lv_obj_remove_state", + (PyCFunction)py_lv_obj_remove_state, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_state(lv_obj_t *obj, lv_state_t state, bool v) + */ +static PyObject *py_lv_obj_set_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *state_py; long v_val; + if (!PyArg_ParseTuple(py_args, "Ol", &state_py, &v_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_state_t state = (int)mp_obj_get_int(state_py); + bool v = (v_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_state_t, bool))lv_obj_set_state)(obj, state, v); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_state_def = { + "lv_obj_set_state", + (PyCFunction)py_lv_obj_set_state, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_alt(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_alt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_alt)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_alt_def = { + "lv_obj_set_alt", + (PyCFunction)py_lv_obj_set_alt, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_checked(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_checked)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_checked_def = { + "lv_obj_set_checked", + (PyCFunction)py_lv_obj_set_checked, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_focused(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_focused(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_focused)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_focused_def = { + "lv_obj_set_focused", + (PyCFunction)py_lv_obj_set_focused, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_focus_key(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_focus_key(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_focus_key)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_focus_key_def = { + "lv_obj_set_focus_key", + (PyCFunction)py_lv_obj_set_focus_key, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_edited(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_edited(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_edited)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_edited_def = { + "lv_obj_set_edited", + (PyCFunction)py_lv_obj_set_edited, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_hovered(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_hovered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_hovered)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_hovered_def = { + "lv_obj_set_hovered", + (PyCFunction)py_lv_obj_set_hovered, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_pressed(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_pressed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_pressed)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_pressed_def = { + "lv_obj_set_pressed", + (PyCFunction)py_lv_obj_set_pressed, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_scrolled(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_scrolled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_scrolled)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_scrolled_def = { + "lv_obj_set_scrolled", + (PyCFunction)py_lv_obj_set_scrolled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_disabled(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_disabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_disabled)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_disabled_def = { + "lv_obj_set_disabled", + (PyCFunction)py_lv_obj_set_disabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_state_user_1(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_state_user_1(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_state_user_1)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_state_user_1_def = { + "lv_obj_set_state_user_1", + (PyCFunction)py_lv_obj_set_state_user_1, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_state_user_2(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_state_user_2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_state_user_2)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_state_user_2_def = { + "lv_obj_set_state_user_2", + (PyCFunction)py_lv_obj_set_state_user_2, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_state_user_3(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_state_user_3(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_state_user_3)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_state_user_3_def = { + "lv_obj_set_state_user_3", + (PyCFunction)py_lv_obj_set_state_user_3, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_state_user_4(lv_obj_t *obj, bool en) + */ +static PyObject *py_lv_obj_set_state_user_4(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_obj_set_state_user_4)(obj, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_state_user_4_def = { + "lv_obj_set_state_user_4", + (PyCFunction)py_lv_obj_set_state_user_4, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_user_data(lv_obj_t *obj, void *user_data) + */ +static PyObject *py_lv_obj_set_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + void *user_data = mp_to_ptr(user_data_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, void *))lv_obj_set_user_data)(obj, user_data); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_user_data_def = { + "lv_obj_set_user_data", + (PyCFunction)py_lv_obj_set_user_data, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_user_flag(lv_obj_t *obj, uint32_t bit, bool v) + */ +static PyObject *py_lv_obj_set_user_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long bit_val; long v_val; + if (!PyArg_ParseTuple(py_args, "ll", &bit_val, &v_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t bit = (uint32_t)bit_val; + bool v = (v_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t, bool))lv_obj_set_user_flag)(obj, bit, v); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_user_flag_def = { + "lv_obj_set_user_flag", + (PyCFunction)py_lv_obj_set_user_flag, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_has_flag(const lv_obj_t *obj, lv_obj_flag_t f) + */ +static PyObject *py_lv_obj_has_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *f_py; + if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *, lv_obj_flag_t))lv_obj_has_flag)(obj, f); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_has_flag_def = { + "lv_obj_has_flag", + (PyCFunction)py_lv_obj_has_flag, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_has_flag_any(const lv_obj_t *obj, lv_obj_flag_t f) + */ +static PyObject *py_lv_obj_has_flag_any(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *f_py; + if (!PyArg_ParseTuple(py_args, "O", &f_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_flag_t f = (int)mp_obj_get_int(f_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *, lv_obj_flag_t))lv_obj_has_flag_any)(obj, f); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_has_flag_any_def = { + "lv_obj_has_flag_any", + (PyCFunction)py_lv_obj_has_flag_any, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_hidden(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_hidden(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_hidden)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_hidden_def = { + "lv_obj_is_hidden", + (PyCFunction)py_lv_obj_is_hidden, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_clickable(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_clickable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_clickable)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_clickable_def = { + "lv_obj_is_clickable", + (PyCFunction)py_lv_obj_is_clickable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_click_focusable(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_click_focusable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_click_focusable)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_click_focusable_def = { + "lv_obj_is_click_focusable", + (PyCFunction)py_lv_obj_is_click_focusable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_checkable(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_checkable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_checkable)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_checkable_def = { + "lv_obj_is_checkable", + (PyCFunction)py_lv_obj_is_checkable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scrollable(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scrollable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scrollable)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scrollable_def = { + "lv_obj_is_scrollable", + (PyCFunction)py_lv_obj_is_scrollable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scroll_elastic(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scroll_elastic(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scroll_elastic)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scroll_elastic_def = { + "lv_obj_is_scroll_elastic", + (PyCFunction)py_lv_obj_is_scroll_elastic, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scroll_momentum(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scroll_momentum(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scroll_momentum)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scroll_momentum_def = { + "lv_obj_is_scroll_momentum", + (PyCFunction)py_lv_obj_is_scroll_momentum, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scroll_one(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scroll_one(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scroll_one)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scroll_one_def = { + "lv_obj_is_scroll_one", + (PyCFunction)py_lv_obj_is_scroll_one, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scroll_chain_hor(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scroll_chain_hor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scroll_chain_hor)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scroll_chain_hor_def = { + "lv_obj_is_scroll_chain_hor", + (PyCFunction)py_lv_obj_is_scroll_chain_hor, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scroll_chain_ver(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scroll_chain_ver(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scroll_chain_ver)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scroll_chain_ver_def = { + "lv_obj_is_scroll_chain_ver", + (PyCFunction)py_lv_obj_is_scroll_chain_ver, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scroll_on_focus(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scroll_on_focus(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scroll_on_focus)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scroll_on_focus_def = { + "lv_obj_is_scroll_on_focus", + (PyCFunction)py_lv_obj_is_scroll_on_focus, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scroll_with_arrow(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scroll_with_arrow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scroll_with_arrow)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scroll_with_arrow_def = { + "lv_obj_is_scroll_with_arrow", + (PyCFunction)py_lv_obj_is_scroll_with_arrow, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_snappable(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_snappable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_snappable)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_snappable_def = { + "lv_obj_is_snappable", + (PyCFunction)py_lv_obj_is_snappable, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_press_lock(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_press_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_press_lock)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_press_lock_def = { + "lv_obj_is_press_lock", + (PyCFunction)py_lv_obj_is_press_lock, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_event_bubble(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_event_bubble(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_event_bubble)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_event_bubble_def = { + "lv_obj_is_event_bubble", + (PyCFunction)py_lv_obj_is_event_bubble, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_gesture_bubble(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_gesture_bubble(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_gesture_bubble)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_gesture_bubble_def = { + "lv_obj_is_gesture_bubble", + (PyCFunction)py_lv_obj_is_gesture_bubble, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_adv_hittest(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_adv_hittest(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_adv_hittest)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_adv_hittest_def = { + "lv_obj_is_adv_hittest", + (PyCFunction)py_lv_obj_is_adv_hittest, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_ignore_layout(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_ignore_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_ignore_layout)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_ignore_layout_def = { + "lv_obj_is_ignore_layout", + (PyCFunction)py_lv_obj_is_ignore_layout, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_floating(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_floating(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_floating)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_floating_def = { + "lv_obj_is_floating", + (PyCFunction)py_lv_obj_is_floating, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_send_draw_task_events(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_send_draw_task_events(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_send_draw_task_events)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_send_draw_task_events_def = { + "lv_obj_is_send_draw_task_events", + (PyCFunction)py_lv_obj_is_send_draw_task_events, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_overflow_visible(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_overflow_visible(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_overflow_visible)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_overflow_visible_def = { + "lv_obj_is_overflow_visible", + (PyCFunction)py_lv_obj_is_overflow_visible, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_event_trickle(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_event_trickle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_event_trickle)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_event_trickle_def = { + "lv_obj_is_event_trickle", + (PyCFunction)py_lv_obj_is_event_trickle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_state_trickle(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_state_trickle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_state_trickle)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_state_trickle_def = { + "lv_obj_is_state_trickle", + (PyCFunction)py_lv_obj_is_state_trickle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_radio_button(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_radio_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_radio_button)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_radio_button_def = { + "lv_obj_is_radio_button", + (PyCFunction)py_lv_obj_is_radio_button, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_flex_in_new_track(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_flex_in_new_track(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_flex_in_new_track)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_flex_in_new_track_def = { + "lv_obj_is_flex_in_new_track", + (PyCFunction)py_lv_obj_is_flex_in_new_track, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_state_t lv_obj_get_state(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_state_t _res; + lvpy_lock(); + _res = ((lv_state_t (*)(const lv_obj_t *))lv_obj_get_state)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_get_state_def = { + "lv_obj_get_state", + (PyCFunction)py_lv_obj_get_state, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_has_state(const lv_obj_t *obj, lv_state_t state) + */ +static PyObject *py_lv_obj_has_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *state_py; + if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_state_t state = (int)mp_obj_get_int(state_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *, lv_state_t))lv_obj_has_state)(obj, state); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_has_state_def = { + "lv_obj_has_state", + (PyCFunction)py_lv_obj_has_state, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_alt(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_alt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_alt)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_alt_def = { + "lv_obj_is_alt", + (PyCFunction)py_lv_obj_is_alt, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_checked(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_checked)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_checked_def = { + "lv_obj_is_checked", + (PyCFunction)py_lv_obj_is_checked, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_focused(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_focused(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_focused)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_focused_def = { + "lv_obj_is_focused", + (PyCFunction)py_lv_obj_is_focused, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_focus_key(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_focus_key(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_focus_key)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_focus_key_def = { + "lv_obj_is_focus_key", + (PyCFunction)py_lv_obj_is_focus_key, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_edited(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_edited(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_edited)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_edited_def = { + "lv_obj_is_edited", + (PyCFunction)py_lv_obj_is_edited, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_hovered(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_hovered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_hovered)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_hovered_def = { + "lv_obj_is_hovered", + (PyCFunction)py_lv_obj_is_hovered, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_pressed(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_pressed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_pressed)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_pressed_def = { + "lv_obj_is_pressed", + (PyCFunction)py_lv_obj_is_pressed, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_scrolled(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_scrolled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scrolled)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_scrolled_def = { + "lv_obj_is_scrolled", + (PyCFunction)py_lv_obj_is_scrolled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_disabled(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_disabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_disabled)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_disabled_def = { + "lv_obj_is_disabled", + (PyCFunction)py_lv_obj_is_disabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_state_user_1(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_state_user_1(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_state_user_1)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_state_user_1_def = { + "lv_obj_is_state_user_1", + (PyCFunction)py_lv_obj_is_state_user_1, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_state_user_2(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_state_user_2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_state_user_2)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_state_user_2_def = { + "lv_obj_is_state_user_2", + (PyCFunction)py_lv_obj_is_state_user_2, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_state_user_3(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_state_user_3(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_state_user_3)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_state_user_3_def = { + "lv_obj_is_state_user_3", + (PyCFunction)py_lv_obj_is_state_user_3, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_state_user_4(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_state_user_4(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_state_user_4)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_state_user_4_def = { + "lv_obj_is_state_user_4", + (PyCFunction)py_lv_obj_is_state_user_4, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + +#define funcptr_lv_group_focus_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_group_focus_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_group_t_focus_cb_callback(lv_group_t *); +#define funcptr_lv_group_edge_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_group_edge_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_group_t_edge_cb_callback(lv_group_t *, bool); + +/* + * Struct lv_group_t (CPython) + */ + +extern PyMethodDef py_lv_group_t_methods[]; + +static PyObject *py_lv_group_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_group_t *data = (lv_group_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "obj_ll") == 0) return mp_read_byref_lv_ll_t(data->obj_ll); + if (strcmp(attr, "obj_focus") == 0) return ptr_to_mp((void*)data->obj_focus); + if (strcmp(attr, "focus_cb") == 0) return mp_lv_funcptr(NULL, data->focus_cb, lv_group_t_focus_cb_callback, "lv_group_t_focus_cb", data->user_data); + if (strcmp(attr, "edge_cb") == 0) return mp_lv_funcptr(NULL, data->edge_cb, lv_group_t_edge_cb_callback, "lv_group_t_edge_cb", data->user_data); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "frozen") == 0) return mp_obj_new_int_from_uint(data->frozen); + if (strcmp(attr, "editing") == 0) return mp_obj_new_int_from_uint(data->editing); + if (strcmp(attr, "refocus_policy") == 0) return mp_obj_new_int_from_uint(data->refocus_policy); + if (strcmp(attr, "wrap") == 0) return mp_obj_new_int_from_uint(data->wrap); + for (PyMethodDef *m = py_lv_group_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_group_t_field_names[] = {"obj_ll", "obj_focus", "focus_cb", "edge_cb", "user_data", "frozen", "editing", "refocus_policy", "wrap", NULL}; + +static PyObject *py_lv_group_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_group_t_field_names, py_lv_group_t_methods); +} + +static PyMethodDef py_lv_group_t_type_methods[] = { + {"__dir__", py_lv_group_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_group_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_group_t *data = (lv_group_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_group_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "obj_ll") == 0) { data->obj_ll = mp_write_lv_ll_t(value); result = 0; } + if (strcmp(attr, "obj_focus") == 0) { data->obj_focus = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "focus_cb") == 0) { data->focus_cb = mp_lv_callback(value, lv_group_t_focus_cb_callback, "lv_group_t_focus_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "edge_cb") == 0) { data->edge_cb = mp_lv_callback(value, lv_group_t_edge_cb_callback, "lv_group_t_edge_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "frozen") == 0) { data->frozen = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "editing") == 0) { data->editing = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "refocus_policy") == 0) { data->refocus_policy = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "wrap") == 0) { data->wrap = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_group_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_group_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_group_t)); +} + +static void py_lv_group_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_group_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_group_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_group_t_dealloc, + .tp_getattro = (getter)py_lv_group_t_getattro, + .tp_setattro = (setter)py_lv_group_t_setattro, + .tp_new = py_lv_group_t_new, + .tp_methods = py_lv_group_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_group_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_group_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_group_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_group_t*)self->data; +} + +static lv_group_t mp_write_scratch_lv_group_t; + +static inline void* mp_write_value_ptr_lv_group_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_group_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_group_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_group_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_group_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_group_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_group_t or dict, got None"); + } + memset(&mp_write_scratch_lv_group_t, 0, sizeof(lv_group_t)); + return &mp_write_scratch_lv_group_t; +} + +#define mp_write_lv_group_t(struct_obj) (*((lv_group_t*)mp_write_value_ptr_lv_group_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_group_t(void *field) +{ + return lv_to_mp_struct(&py_lv_group_t_type, field); +} + +#define mp_read_lv_group_t(field) lv_to_mp_struct_own(&py_lv_group_t_type, copy_buffer(&field, sizeof(lv_group_t))) +#define mp_read_byref_lv_group_t(field) mp_read_ptr_lv_group_t(&field) + + +/* + * lvgl extension definition for: + * lv_group_t *lv_obj_get_group(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_group(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_group_t * _res; + lvpy_lock(); + _res = ((lv_group_t *(*)(const lv_obj_t *))lv_obj_get_group)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_group_t((void*)_res); +} + +static PyMethodDef py_lv_obj_get_group_def = { + "lv_obj_get_group", + (PyCFunction)py_lv_obj_get_group, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void *lv_obj_get_user_data(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(lv_obj_t *))lv_obj_get_user_data)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); +} + +static PyMethodDef py_lv_obj_get_user_data_def = { + "lv_obj_get_user_data", + (PyCFunction)py_lv_obj_get_user_data, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_get_user_flag(lv_obj_t *obj, uint32_t bit) + */ +static PyObject *py_lv_obj_get_user_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long bit_val; + if (!PyArg_ParseTuple(py_args, "l", &bit_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t bit = (uint32_t)bit_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, uint32_t))lv_obj_get_user_flag)(obj, bit); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_get_user_flag_def = { + "lv_obj_get_user_flag", + (PyCFunction)py_lv_obj_get_user_flag, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_check_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) + */ +static PyObject *py_lv_obj_check_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *class_p_py; + if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_check_type)(obj, class_p); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_check_type_def = { + "lv_obj_check_type", + (PyCFunction)py_lv_obj_check_type, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_has_class(const lv_obj_t *obj, const lv_obj_class_t *class_p) + */ +static PyObject *py_lv_obj_has_class(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *class_p_py; + if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_has_class)(obj, class_p); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_has_class_def = { + "lv_obj_has_class", + (PyCFunction)py_lv_obj_has_class, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * const lv_obj_class_t *lv_obj_get_class(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_class(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const lv_obj_class_t * _res; + lvpy_lock(); + _res = ((const lv_obj_class_t *(*)(const lv_obj_t *))lv_obj_get_class)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_obj_class_t((void*)_res); +} + +static PyMethodDef py_lv_obj_get_class_def = { + "lv_obj_get_class", + (PyCFunction)py_lv_obj_get_class, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_in_widget_tree(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_in_widget_tree(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_in_widget_tree)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_in_widget_tree_def = { + "lv_obj_is_in_widget_tree", + (PyCFunction)py_lv_obj_is_in_widget_tree, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_null_on_delete(lv_obj_t **obj_ptr) + */ +static PyObject *py_lv_obj_null_on_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *obj_ptr_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_ptr_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t **obj_ptr = mp_to_ptr(obj_ptr_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t **))lv_obj_null_on_delete)(obj_ptr); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_null_on_delete_def = { + "lv_obj_null_on_delete", + (PyCFunction)py_lv_obj_null_on_delete, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_delete_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_delete_dsc_t_methods[]; + +static PyObject *py_lv_delete_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_delete_dsc_t *data = (lv_delete_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + (void)attr; + for (PyMethodDef *m = py_lv_delete_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_delete_dsc_t_field_names[] = {NULL}; + +static PyObject *py_lv_delete_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_delete_dsc_t_field_names, py_lv_delete_dsc_t_methods); +} + +static PyMethodDef py_lv_delete_dsc_t_type_methods[] = { + {"__dir__", py_lv_delete_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_delete_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_delete_dsc_t *data = (lv_delete_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + + (void)value; + if (PyErr_Occurred()) { + + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_delete_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_delete_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, 0); +} + +static void py_lv_delete_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_delete_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_delete_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_delete_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_delete_dsc_t_getattro, + .tp_setattro = (setter)py_lv_delete_dsc_t_setattro, + .tp_new = py_lv_delete_dsc_t_new, + .tp_methods = py_lv_delete_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_delete_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_delete_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_delete_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_delete_dsc_t*)self->data; +} + +#define mp_write_lv_delete_dsc_t(struct_obj) (*((lv_delete_dsc_t*)mp_write_ptr_lv_delete_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_delete_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_delete_dsc_t_type, field); +} + +#define mp_read_lv_delete_dsc_t(field) lv_to_mp_struct_own(&py_lv_delete_dsc_t_type, copy_buffer(&field, sizeof(lv_delete_dsc_t))) +#define mp_read_byref_lv_delete_dsc_t(field) mp_read_ptr_lv_delete_dsc_t(&field) + + +/* + * Callback function lv_obj_add_delete_cb_cb (CPython) + * void lv_delete_cb_t(void *user_data) + */ +static void lv_obj_add_delete_cb_cb_callback(void *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_add_delete_cb_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_delete_dsc_t *lv_obj_add_delete_cb(lv_obj_t *obj, lv_delete_cb_t cb, void *user_data) + */ +static PyObject *py_lv_obj_add_delete_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + void *user_data = mp_to_ptr(user_data_py); + void *cb = mp_lv_callback(cb_py, &lv_obj_add_delete_cb_cb_callback, "lv_obj_add_delete_cb_cb", &user_data, NULL, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_delete_dsc_t * _res; + lvpy_lock(); + _res = ((lv_delete_dsc_t *(*)(lv_obj_t *, lv_delete_cb_t, void *))lv_obj_add_delete_cb)(obj, cb, user_data); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_delete_dsc_t((void*)_res); +} + +static PyMethodDef py_lv_obj_add_delete_cb_def = { + "lv_obj_add_delete_cb", + (PyCFunction)py_lv_obj_add_delete_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_remove_delete_cb(lv_delete_dsc_t *dsc) + */ +static PyObject *py_lv_obj_remove_delete_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_delete_dsc_t *dsc = mp_write_ptr_lv_delete_dsc_t(dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_delete_dsc_t *))lv_obj_remove_delete_cb)(dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_remove_delete_cb_def = { + "lv_obj_remove_delete_cb", + (PyCFunction)py_lv_obj_remove_delete_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_add_screen_load_event(lv_obj_t *obj, lv_event_code_t trigger, lv_obj_t *screen, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay) + */ +static PyObject *py_lv_obj_add_screen_load_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *trigger_py; PyObject *screen_py; PyObject *anim_type_py; long duration_val; long delay_val; + if (!PyArg_ParseTuple(py_args, "OOOll", &trigger_py, &screen_py, &anim_type_py, &duration_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + lv_obj_t *screen = mp_to_lv(screen_py); + lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); + uint32_t duration = (uint32_t)duration_val; + uint32_t delay = (uint32_t)delay_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_event_code_t, lv_obj_t *, lv_screen_load_anim_t, uint32_t, uint32_t))lv_obj_add_screen_load_event)(obj, trigger, screen, anim_type, duration, delay); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_screen_load_event_def = { + "lv_obj_add_screen_load_event", + (PyCFunction)py_lv_obj_add_screen_load_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_obj_t *lv_screen_create_cb_t(void) + * lv_screen_create_cb_t screen_create_cb + */ + + +/* + * lvgl extension definition for: + * void lv_obj_add_screen_create_event(lv_obj_t *obj, lv_event_code_t trigger, lv_screen_create_cb_t screen_create_cb, lv_screen_load_anim_t anim_type, uint32_t duration, uint32_t delay) + */ +static PyObject *py_lv_obj_add_screen_create_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *trigger_py; PyObject *screen_create_cb_py; PyObject *anim_type_py; long duration_val; long delay_val; + if (!PyArg_ParseTuple(py_args, "OOOll", &trigger_py, &screen_create_cb_py, &anim_type_py, &duration_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); + uint32_t duration = (uint32_t)duration_val; + uint32_t delay = (uint32_t)delay_val; + void *screen_create_cb = NULL; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_event_code_t, lv_screen_create_cb_t, lv_screen_load_anim_t, uint32_t, uint32_t))lv_obj_add_screen_create_event)(obj, trigger, screen_create_cb, anim_type, duration, delay); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_screen_create_event_def = { + "lv_obj_add_screen_create_event", + (PyCFunction)py_lv_obj_add_screen_create_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_anim_timeline_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_anim_timeline_dsc_t_methods[]; + +static PyObject *py_lv_anim_timeline_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_timeline_dsc_t *data = (lv_anim_timeline_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "anim") == 0) return mp_read_byref_lv_anim_t(data->anim); + if (strcmp(attr, "start_time") == 0) return mp_obj_new_int_from_uint(data->start_time); + if (strcmp(attr, "is_started") == 0) return mp_obj_new_int_from_uint(data->is_started); + if (strcmp(attr, "is_completed") == 0) return mp_obj_new_int_from_uint(data->is_completed); + for (PyMethodDef *m = py_lv_anim_timeline_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_anim_timeline_dsc_t_field_names[] = {"anim", "start_time", "is_started", "is_completed", NULL}; + +static PyObject *py_lv_anim_timeline_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_anim_timeline_dsc_t_field_names, py_lv_anim_timeline_dsc_t_methods); +} + +static PyMethodDef py_lv_anim_timeline_dsc_t_type_methods[] = { + {"__dir__", py_lv_anim_timeline_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_anim_timeline_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_timeline_dsc_t *data = (lv_anim_timeline_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_anim_timeline_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "anim") == 0) { data->anim = mp_write_lv_anim_t(value); result = 0; } + if (strcmp(attr, "start_time") == 0) { data->start_time = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "is_started") == 0) { data->is_started = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "is_completed") == 0) { data->is_completed = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_anim_timeline_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_anim_timeline_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_timeline_dsc_t)); +} + +static void py_lv_anim_timeline_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_anim_timeline_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_anim_timeline_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_anim_timeline_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_anim_timeline_dsc_t_getattro, + .tp_setattro = (setter)py_lv_anim_timeline_dsc_t_setattro, + .tp_new = py_lv_anim_timeline_dsc_t_new, + .tp_methods = py_lv_anim_timeline_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_anim_timeline_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_anim_timeline_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_anim_timeline_dsc_t*)self->data; +} + +static lv_anim_timeline_dsc_t mp_write_scratch_lv_anim_timeline_dsc_t; + +static inline void* mp_write_value_ptr_lv_anim_timeline_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_timeline_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_anim_timeline_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_timeline_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_anim_timeline_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_anim_timeline_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_anim_timeline_dsc_t, 0, sizeof(lv_anim_timeline_dsc_t)); + return &mp_write_scratch_lv_anim_timeline_dsc_t; +} + +#define mp_write_lv_anim_timeline_dsc_t(struct_obj) (*((lv_anim_timeline_dsc_t*)mp_write_value_ptr_lv_anim_timeline_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_anim_timeline_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_anim_timeline_dsc_t_type, field); +} + +#define mp_read_lv_anim_timeline_dsc_t(field) lv_to_mp_struct_own(&py_lv_anim_timeline_dsc_t_type, copy_buffer(&field, sizeof(lv_anim_timeline_dsc_t))) +#define mp_read_byref_lv_anim_timeline_dsc_t(field) mp_read_ptr_lv_anim_timeline_dsc_t(&field) + + +/* + * Struct lv_anim_timeline_t (CPython) + */ + +extern PyMethodDef py_lv_anim_timeline_t_methods[]; + +static PyObject *py_lv_anim_timeline_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_timeline_t *data = (lv_anim_timeline_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "anim_dsc") == 0) return mp_read_ptr_lv_anim_timeline_dsc_t((void*)data->anim_dsc); + if (strcmp(attr, "anim_dsc_cnt") == 0) return mp_obj_new_int_from_uint(data->anim_dsc_cnt); + if (strcmp(attr, "act_time") == 0) return mp_obj_new_int_from_uint(data->act_time); + if (strcmp(attr, "reverse") == 0) return convert_to_bool(data->reverse); + if (strcmp(attr, "delay") == 0) return mp_obj_new_int_from_uint(data->delay); + if (strcmp(attr, "repeat_count") == 0) return mp_obj_new_int_from_uint(data->repeat_count); + if (strcmp(attr, "repeat_delay") == 0) return mp_obj_new_int_from_uint(data->repeat_delay); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + for (PyMethodDef *m = py_lv_anim_timeline_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_anim_timeline_t_field_names[] = {"anim_dsc", "anim_dsc_cnt", "act_time", "reverse", "delay", "repeat_count", "repeat_delay", "user_data", NULL}; + +static PyObject *py_lv_anim_timeline_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_anim_timeline_t_field_names, py_lv_anim_timeline_t_methods); +} + +static PyMethodDef py_lv_anim_timeline_t_type_methods[] = { + {"__dir__", py_lv_anim_timeline_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_anim_timeline_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_timeline_t *data = (lv_anim_timeline_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_anim_timeline_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "anim_dsc") == 0) { data->anim_dsc = (void*)mp_write_ptr_lv_anim_timeline_dsc_t(value); result = 0; } + if (strcmp(attr, "anim_dsc_cnt") == 0) { data->anim_dsc_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "act_time") == 0) { data->act_time = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "reverse") == 0) { data->reverse = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "delay") == 0) { data->delay = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "repeat_count") == 0) { data->repeat_count = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "repeat_delay") == 0) { data->repeat_delay = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_anim_timeline_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_anim_timeline_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_timeline_t)); +} + +static void py_lv_anim_timeline_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_anim_timeline_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_anim_timeline_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_anim_timeline_t_dealloc, + .tp_getattro = (getter)py_lv_anim_timeline_t_getattro, + .tp_setattro = (setter)py_lv_anim_timeline_t_setattro, + .tp_new = py_lv_anim_timeline_t_new, + .tp_methods = py_lv_anim_timeline_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_anim_timeline_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_anim_timeline_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_anim_timeline_t*)self->data; +} + +static lv_anim_timeline_t mp_write_scratch_lv_anim_timeline_t; + +static inline void* mp_write_value_ptr_lv_anim_timeline_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_timeline_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_anim_timeline_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_timeline_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_anim_timeline_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_anim_timeline_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_timeline_t or dict, got None"); + } + memset(&mp_write_scratch_lv_anim_timeline_t, 0, sizeof(lv_anim_timeline_t)); + return &mp_write_scratch_lv_anim_timeline_t; +} + +#define mp_write_lv_anim_timeline_t(struct_obj) (*((lv_anim_timeline_t*)mp_write_value_ptr_lv_anim_timeline_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_anim_timeline_t(void *field) +{ + return lv_to_mp_struct(&py_lv_anim_timeline_t_type, field); +} + +#define mp_read_lv_anim_timeline_t(field) lv_to_mp_struct_own(&py_lv_anim_timeline_t_type, copy_buffer(&field, sizeof(lv_anim_timeline_t))) +#define mp_read_byref_lv_anim_timeline_t(field) mp_read_ptr_lv_anim_timeline_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_add_play_timeline_event(lv_obj_t *obj, lv_event_code_t trigger, lv_anim_timeline_t *at, uint32_t delay, bool reverse) + */ +static PyObject *py_lv_obj_add_play_timeline_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *trigger_py; PyObject *at_py; long delay_val; long reverse_val; + if (!PyArg_ParseTuple(py_args, "OOll", &trigger_py, &at_py, &delay_val, &reverse_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + lv_anim_timeline_t *at = mp_write_ptr_lv_anim_timeline_t(at_py); + uint32_t delay = (uint32_t)delay_val; + bool reverse = (reverse_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_event_code_t, lv_anim_timeline_t *, uint32_t, bool))lv_obj_add_play_timeline_event)(obj, trigger, at, delay, reverse); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_play_timeline_event_def = { + "lv_obj_add_play_timeline_event", + (PyCFunction)py_lv_obj_add_play_timeline_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_remove_from_subject(lv_obj_t *obj, lv_subject_t *subject) + */ +static PyObject *py_lv_obj_remove_from_subject(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_t *))lv_obj_remove_from_subject)(obj, subject); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_remove_from_subject_def = { + "lv_obj_remove_from_subject", + (PyCFunction)py_lv_obj_remove_from_subject, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_subject_increment_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_subject_increment_dsc_t_methods[]; + +static PyObject *py_lv_subject_increment_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_subject_increment_dsc_t *data = (lv_subject_increment_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "subject") == 0) return mp_read_ptr_lv_subject_t((void*)data->subject); + if (strcmp(attr, "step") == 0) return mp_obj_new_int(data->step); + if (strcmp(attr, "rollover") == 0) return convert_to_bool(data->rollover); + if (strcmp(attr, "min_value") == 0) return mp_obj_new_int(data->min_value); + if (strcmp(attr, "max_value") == 0) return mp_obj_new_int(data->max_value); + for (PyMethodDef *m = py_lv_subject_increment_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_subject_increment_dsc_t_field_names[] = {"subject", "step", "rollover", "min_value", "max_value", NULL}; + +static PyObject *py_lv_subject_increment_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_subject_increment_dsc_t_field_names, py_lv_subject_increment_dsc_t_methods); +} + +static PyMethodDef py_lv_subject_increment_dsc_t_type_methods[] = { + {"__dir__", py_lv_subject_increment_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_subject_increment_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_subject_increment_dsc_t *data = (lv_subject_increment_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_subject_increment_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "subject") == 0) { data->subject = (void*)mp_write_ptr_lv_subject_t(value); result = 0; } + if (strcmp(attr, "step") == 0) { data->step = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "rollover") == 0) { data->rollover = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "min_value") == 0) { data->min_value = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "max_value") == 0) { data->max_value = (int32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_subject_increment_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_subject_increment_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_subject_increment_dsc_t)); +} + +static void py_lv_subject_increment_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_subject_increment_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_subject_increment_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_subject_increment_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_subject_increment_dsc_t_getattro, + .tp_setattro = (setter)py_lv_subject_increment_dsc_t_setattro, + .tp_new = py_lv_subject_increment_dsc_t_new, + .tp_methods = py_lv_subject_increment_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_subject_increment_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_subject_increment_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_subject_increment_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_subject_increment_dsc_t*)self->data; +} + +static lv_subject_increment_dsc_t mp_write_scratch_lv_subject_increment_dsc_t; + +static inline void* mp_write_value_ptr_lv_subject_increment_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_subject_increment_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_subject_increment_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_subject_increment_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_subject_increment_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_subject_increment_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_subject_increment_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_subject_increment_dsc_t, 0, sizeof(lv_subject_increment_dsc_t)); + return &mp_write_scratch_lv_subject_increment_dsc_t; +} + +#define mp_write_lv_subject_increment_dsc_t(struct_obj) (*((lv_subject_increment_dsc_t*)mp_write_value_ptr_lv_subject_increment_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_subject_increment_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_subject_increment_dsc_t_type, field); +} + +#define mp_read_lv_subject_increment_dsc_t(field) lv_to_mp_struct_own(&py_lv_subject_increment_dsc_t_type, copy_buffer(&field, sizeof(lv_subject_increment_dsc_t))) +#define mp_read_byref_lv_subject_increment_dsc_t(field) mp_read_ptr_lv_subject_increment_dsc_t(&field) + + +/* + * lvgl extension definition for: + * lv_subject_increment_dsc_t *lv_obj_add_subject_increment_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, int32_t step) + */ +static PyObject *py_lv_obj_add_subject_increment_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *trigger_py; long step_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &trigger_py, &step_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + int32_t step = (int32_t)step_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_subject_increment_dsc_t * _res; + lvpy_lock(); + _res = ((lv_subject_increment_dsc_t *(*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, int32_t))lv_obj_add_subject_increment_event)(obj, subject, trigger, step); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_subject_increment_dsc_t((void*)_res); +} + +static PyMethodDef py_lv_obj_add_subject_increment_event_def = { + "lv_obj_add_subject_increment_event", + (PyCFunction)py_lv_obj_add_subject_increment_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_subject_increment_event_min_value(lv_obj_t *obj, lv_subject_increment_dsc_t *dsc, int32_t min_value) + */ +static PyObject *py_lv_obj_set_subject_increment_event_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *dsc_py; long min_value_val; + if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &min_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_increment_dsc_t *dsc = mp_write_ptr_lv_subject_increment_dsc_t(dsc_py); + int32_t min_value = (int32_t)min_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_increment_dsc_t *, int32_t))lv_obj_set_subject_increment_event_min_value)(obj, dsc, min_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_subject_increment_event_min_value_def = { + "lv_obj_set_subject_increment_event_min_value", + (PyCFunction)py_lv_obj_set_subject_increment_event_min_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_subject_increment_event_max_value(lv_obj_t *obj, lv_subject_increment_dsc_t *dsc, int32_t max_value) + */ +static PyObject *py_lv_obj_set_subject_increment_event_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *dsc_py; long max_value_val; + if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &max_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_increment_dsc_t *dsc = mp_write_ptr_lv_subject_increment_dsc_t(dsc_py); + int32_t max_value = (int32_t)max_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_increment_dsc_t *, int32_t))lv_obj_set_subject_increment_event_max_value)(obj, dsc, max_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_subject_increment_event_max_value_def = { + "lv_obj_set_subject_increment_event_max_value", + (PyCFunction)py_lv_obj_set_subject_increment_event_max_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_set_subject_increment_event_rollover(lv_obj_t *obj, lv_subject_increment_dsc_t *dsc, bool rollover) + */ +static PyObject *py_lv_obj_set_subject_increment_event_rollover(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *dsc_py; long rollover_val; + if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &rollover_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_increment_dsc_t *dsc = mp_write_ptr_lv_subject_increment_dsc_t(dsc_py); + bool rollover = (rollover_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_increment_dsc_t *, bool))lv_obj_set_subject_increment_event_rollover)(obj, dsc, rollover); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_set_subject_increment_event_rollover_def = { + "lv_obj_set_subject_increment_event_rollover", + (PyCFunction)py_lv_obj_set_subject_increment_event_rollover, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_add_subject_toggle_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger) + */ +static PyObject *py_lv_obj_add_subject_toggle_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *trigger_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &trigger_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t))lv_obj_add_subject_toggle_event)(obj, subject, trigger); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_subject_toggle_event_def = { + "lv_obj_add_subject_toggle_event", + (PyCFunction)py_lv_obj_add_subject_toggle_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_add_subject_set_int_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, int32_t value) + */ +static PyObject *py_lv_obj_add_subject_set_int_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *trigger_py; long value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &trigger_py, &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + int32_t value = (int32_t)value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, int32_t))lv_obj_add_subject_set_int_event)(obj, subject, trigger, value); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_subject_set_int_event_def = { + "lv_obj_add_subject_set_int_event", + (PyCFunction)py_lv_obj_add_subject_set_int_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_add_subject_set_float_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, float value) + */ +static PyObject *py_lv_obj_add_subject_set_float_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *trigger_py; double value_val; + if (!PyArg_ParseTuple(py_args, "OOd", &subject_py, &trigger_py, &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + float value = (float)value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, float))lv_obj_add_subject_set_float_event)(obj, subject, trigger, value); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_subject_set_float_event_def = { + "lv_obj_add_subject_set_float_event", + (PyCFunction)py_lv_obj_add_subject_set_float_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_add_subject_set_string_event(lv_obj_t *obj, lv_subject_t *subject, lv_event_code_t trigger, const char *value) + */ +static PyObject *py_lv_obj_add_subject_set_string_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *trigger_py; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "OOO", &subject_py, &trigger_py, &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_event_code_t trigger = (int)mp_obj_get_int(trigger_py); + const char *value = (const char *)(char*)convert_from_str(value_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_subject_t *, lv_event_code_t, const char *))lv_obj_add_subject_set_string_event)(obj, subject, trigger, value); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_subject_set_string_event_def = { + "lv_obj_add_subject_set_string_event", + (PyCFunction)py_lv_obj_add_subject_set_string_event, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_t_set_bool_cb (CPython) + * void lv_obj_set_bool_t(lv_obj_t *obj, bool value) + */ +static void lv_obj_t_set_bool_cb_callback(lv_obj_t *arg0, bool arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_set_bool_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = convert_to_bool(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_bool(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_bool_t set_bool_cb) + */ +static PyObject *py_lv_obj_bind_bool(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *set_bool_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &set_bool_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + void *set_bool_cb = mp_lv_callback(set_bool_cb_py, &lv_obj_t_set_bool_cb_callback, "lv_obj_t_set_bool_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_bool_t))lv_obj_bind_bool)(obj, subject, set_bool_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_bool_def = { + "lv_obj_bind_bool", + (PyCFunction)py_lv_obj_bind_bool, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_t_set_int_cb (CPython) + * void lv_obj_set_int_t(lv_obj_t *obj, int32_t value) + */ +static void lv_obj_t_set_int_cb_callback(lv_obj_t *arg0, int32_t arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_set_int_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = mp_obj_new_int(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_int(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_int_t set_int_cb) + */ +static PyObject *py_lv_obj_bind_int(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *set_int_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &set_int_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + void *set_int_cb = mp_lv_callback(set_int_cb_py, &lv_obj_t_set_int_cb_callback, "lv_obj_t_set_int_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_int_t))lv_obj_bind_int)(obj, subject, set_int_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_int_def = { + "lv_obj_bind_int", + (PyCFunction)py_lv_obj_bind_int, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_t_set_float_cb (CPython) + * void lv_obj_set_float_t(lv_obj_t *obj, float value) + */ +static void lv_obj_t_set_float_cb_callback(lv_obj_t *arg0, float arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_set_float_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = mp_obj_new_float_from_f(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_float(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_float_t set_float_cb) + */ +static PyObject *py_lv_obj_bind_float(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *set_float_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &set_float_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + void *set_float_cb = mp_lv_callback(set_float_cb_py, &lv_obj_t_set_float_cb_callback, "lv_obj_t_set_float_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_float_t))lv_obj_bind_float)(obj, subject, set_float_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_float_def = { + "lv_obj_bind_float", + (PyCFunction)py_lv_obj_bind_float, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_t_set_string_cb (CPython) + * void lv_obj_set_string_t(lv_obj_t *obj, const char *value) + */ +static void lv_obj_t_set_string_cb_callback(lv_obj_t *arg0, const char *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_set_string_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = convert_to_str((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_string(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_string_t set_string_cb) + */ +static PyObject *py_lv_obj_bind_string(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *set_string_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &set_string_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + void *set_string_cb = mp_lv_callback(set_string_cb_py, &lv_obj_t_set_string_cb_callback, "lv_obj_t_set_string_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_string_t))lv_obj_bind_string)(obj, subject, set_string_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_string_def = { + "lv_obj_bind_string", + (PyCFunction)py_lv_obj_bind_string, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_t_set_color_cb (CPython) + * void lv_obj_set_color_t(lv_obj_t *obj, lv_color_t value) + */ +static void lv_obj_t_set_color_cb_callback(lv_obj_t *arg0, lv_color_t arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_set_color_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = mp_read_lv_color_t(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_color(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_color_t set_color_cb) + */ +static PyObject *py_lv_obj_bind_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *set_color_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &set_color_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + void *set_color_cb = mp_lv_callback(set_color_cb_py, &lv_obj_t_set_color_cb_callback, "lv_obj_t_set_color_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_color_t))lv_obj_bind_color)(obj, subject, set_color_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_color_def = { + "lv_obj_bind_color", + (PyCFunction)py_lv_obj_bind_color, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_obj_t_set_pointer_cb (CPython) + * void lv_obj_set_pointer_t(lv_obj_t *obj, const void *value) + */ +static void lv_obj_t_set_pointer_cb_callback(lv_obj_t *arg0, const void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_set_pointer_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_pointer(lv_obj_t *obj, lv_subject_t *subject, lv_obj_set_pointer_t set_pointer_cb) + */ +static PyObject *py_lv_obj_bind_pointer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *set_pointer_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &set_pointer_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + void *set_pointer_cb = mp_lv_callback(set_pointer_cb_py, &lv_obj_t_set_pointer_cb_callback, "lv_obj_t_set_pointer_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_set_pointer_t))lv_obj_bind_pointer)(obj, subject, set_pointer_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_pointer_def = { + "lv_obj_bind_pointer", + (PyCFunction)py_lv_obj_bind_pointer, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_flag_if_eq(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_flag_if_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *flag_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_eq)(obj, subject, flag, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_flag_if_eq_def = { + "lv_obj_bind_flag_if_eq", + (PyCFunction)py_lv_obj_bind_flag_if_eq, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_flag_if_not_eq(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_flag_if_not_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *flag_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_not_eq)(obj, subject, flag, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_flag_if_not_eq_def = { + "lv_obj_bind_flag_if_not_eq", + (PyCFunction)py_lv_obj_bind_flag_if_not_eq, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_flag_if_gt(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_flag_if_gt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *flag_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_gt)(obj, subject, flag, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_flag_if_gt_def = { + "lv_obj_bind_flag_if_gt", + (PyCFunction)py_lv_obj_bind_flag_if_gt, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_flag_if_ge(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_flag_if_ge(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *flag_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_ge)(obj, subject, flag, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_flag_if_ge_def = { + "lv_obj_bind_flag_if_ge", + (PyCFunction)py_lv_obj_bind_flag_if_ge, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_flag_if_lt(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_flag_if_lt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *flag_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_lt)(obj, subject, flag, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_flag_if_lt_def = { + "lv_obj_bind_flag_if_lt", + (PyCFunction)py_lv_obj_bind_flag_if_lt, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_flag_if_le(lv_obj_t *obj, lv_subject_t *subject, lv_obj_flag_t flag, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_flag_if_le(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *flag_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &flag_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_obj_flag_t flag = (int)mp_obj_get_int(flag_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_obj_flag_t, int32_t))lv_obj_bind_flag_if_le)(obj, subject, flag, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_flag_if_le_def = { + "lv_obj_bind_flag_if_le", + (PyCFunction)py_lv_obj_bind_flag_if_le, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_state_if_eq(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_state_if_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *state_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_state_t state = (int)mp_obj_get_int(state_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_eq)(obj, subject, state, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_state_if_eq_def = { + "lv_obj_bind_state_if_eq", + (PyCFunction)py_lv_obj_bind_state_if_eq, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_state_if_not_eq(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_state_if_not_eq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *state_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_state_t state = (int)mp_obj_get_int(state_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_not_eq)(obj, subject, state, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_state_if_not_eq_def = { + "lv_obj_bind_state_if_not_eq", + (PyCFunction)py_lv_obj_bind_state_if_not_eq, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_state_if_gt(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_state_if_gt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *state_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_state_t state = (int)mp_obj_get_int(state_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_gt)(obj, subject, state, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_state_if_gt_def = { + "lv_obj_bind_state_if_gt", + (PyCFunction)py_lv_obj_bind_state_if_gt, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_state_if_ge(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_state_if_ge(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *state_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_state_t state = (int)mp_obj_get_int(state_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_ge)(obj, subject, state, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_state_if_ge_def = { + "lv_obj_bind_state_if_ge", + (PyCFunction)py_lv_obj_bind_state_if_ge, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_state_if_lt(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_state_if_lt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *state_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_state_t state = (int)mp_obj_get_int(state_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_lt)(obj, subject, state, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_state_if_lt_def = { + "lv_obj_bind_state_if_lt", + (PyCFunction)py_lv_obj_bind_state_if_lt, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_state_if_le(lv_obj_t *obj, lv_subject_t *subject, lv_state_t state, int32_t ref_value) + */ +static PyObject *py_lv_obj_bind_state_if_le(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; PyObject *state_py; long ref_value_val; + if (!PyArg_ParseTuple(py_args, "OOl", &subject_py, &state_py, &ref_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_state_t state = (int)mp_obj_get_int(state_py); + int32_t ref_value = (int32_t)ref_value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, lv_state_t, int32_t))lv_obj_bind_state_if_le)(obj, subject, state, ref_value); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_state_if_le_def = { + "lv_obj_bind_state_if_le", + (PyCFunction)py_lv_obj_bind_state_if_le, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_observer_t *lv_obj_bind_checked(lv_obj_t *obj, lv_subject_t *subject) + */ +static PyObject *py_lv_obj_bind_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_obj_bind_checked)(obj, subject); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_obj_bind_checked_def = { + "lv_obj_bind_checked", + (PyCFunction)py_lv_obj_bind_checked, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_redraw(lv_layer_t *layer, lv_obj_t *obj) + */ +static PyObject *py_lv_obj_redraw(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *layer_py; PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_obj_t *obj = mp_to_lv(obj_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_layer_t *, lv_obj_t *))lv_obj_redraw)(layer, obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_redraw_def = { + "lv_obj_redraw", + (PyCFunction)py_lv_obj_redraw, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_destruct(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_destruct(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_destruct)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_destruct_def = { + "lv_obj_destruct", + (PyCFunction)py_lv_obj_destruct, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_ext_draw_size(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_ext_draw_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_ext_draw_size)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_get_ext_draw_size_def = { + "lv_obj_get_ext_draw_size", + (PyCFunction)py_lv_obj_get_ext_draw_size, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_layer_type_t lv_obj_get_layer_type(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_layer_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_layer_type_t _res; + lvpy_lock(); + _res = ((lv_layer_type_t (*)(const lv_obj_t *))lv_obj_get_layer_type)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_get_layer_type_def = { + "lv_obj_get_layer_type", + (PyCFunction)py_lv_obj_get_layer_type, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_obj_spec_attr_t (CPython) + */ + +extern PyMethodDef py_lv_obj_spec_attr_t_methods[]; + +static PyObject *py_lv_obj_spec_attr_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_obj_spec_attr_t *data = (lv_obj_spec_attr_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "children") == 0) return ptr_to_mp((void*)data->children); + if (strcmp(attr, "group_p") == 0) return mp_read_ptr_lv_group_t((void*)data->group_p); + if (strcmp(attr, "event_list") == 0) return mp_read_byref_lv_event_list_t(data->event_list); + if (strcmp(attr, "scroll") == 0) return mp_read_byref_lv_point_t(data->scroll); + if (strcmp(attr, "ext_click_pad") == 0) return mp_obj_new_int(data->ext_click_pad); + if (strcmp(attr, "ext_draw_size") == 0) return mp_obj_new_int(data->ext_draw_size); + if (strcmp(attr, "child_cnt") == 0) return mp_obj_new_int_from_uint(data->child_cnt); + if (strcmp(attr, "scrollbar_mode") == 0) return mp_obj_new_int_from_uint(data->scrollbar_mode); + if (strcmp(attr, "scroll_snap_x") == 0) return mp_obj_new_int_from_uint(data->scroll_snap_x); + if (strcmp(attr, "scroll_snap_y") == 0) return mp_obj_new_int_from_uint(data->scroll_snap_y); + if (strcmp(attr, "scroll_dir") == 0) return mp_obj_new_int_from_uint(data->scroll_dir); + if (strcmp(attr, "layer_type") == 0) return mp_obj_new_int_from_uint(data->layer_type); + if (strcmp(attr, "name_static") == 0) return mp_obj_new_int_from_uint(data->name_static); + if (strcmp(attr, "user_flags") == 0) return mp_obj_new_int_from_uint(data->user_flags); + for (PyMethodDef *m = py_lv_obj_spec_attr_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_obj_spec_attr_t_field_names[] = {"children", "group_p", "event_list", "scroll", "ext_click_pad", "ext_draw_size", "child_cnt", "scrollbar_mode", "scroll_snap_x", "scroll_snap_y", "scroll_dir", "layer_type", "name_static", "user_flags", NULL}; + +static PyObject *py_lv_obj_spec_attr_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_obj_spec_attr_t_field_names, py_lv_obj_spec_attr_t_methods); +} + +static PyMethodDef py_lv_obj_spec_attr_t_type_methods[] = { + {"__dir__", py_lv_obj_spec_attr_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_obj_spec_attr_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_obj_spec_attr_t *data = (lv_obj_spec_attr_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_obj_spec_attr_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "children") == 0) { data->children = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "group_p") == 0) { data->group_p = (void*)mp_write_ptr_lv_group_t(value); result = 0; } + if (strcmp(attr, "event_list") == 0) { data->event_list = mp_write_lv_event_list_t(value); result = 0; } + if (strcmp(attr, "scroll") == 0) { data->scroll = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "ext_click_pad") == 0) { data->ext_click_pad = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ext_draw_size") == 0) { data->ext_draw_size = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "child_cnt") == 0) { data->child_cnt = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scrollbar_mode") == 0) { data->scrollbar_mode = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scroll_snap_x") == 0) { data->scroll_snap_x = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scroll_snap_y") == 0) { data->scroll_snap_y = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scroll_dir") == 0) { data->scroll_dir = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "layer_type") == 0) { data->layer_type = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "name_static") == 0) { data->name_static = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "user_flags") == 0) { data->user_flags = (uint16_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_obj_spec_attr_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_obj_spec_attr_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_obj_spec_attr_t)); +} + +static void py_lv_obj_spec_attr_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_obj_spec_attr_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_obj_spec_attr_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_obj_spec_attr_t_dealloc, + .tp_getattro = (getter)py_lv_obj_spec_attr_t_getattro, + .tp_setattro = (setter)py_lv_obj_spec_attr_t_setattro, + .tp_new = py_lv_obj_spec_attr_t_new, + .tp_methods = py_lv_obj_spec_attr_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_obj_spec_attr_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_obj_spec_attr_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_obj_spec_attr_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_obj_spec_attr_t*)self->data; +} + +static lv_obj_spec_attr_t mp_write_scratch_lv_obj_spec_attr_t; + +static inline void* mp_write_value_ptr_lv_obj_spec_attr_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_obj_spec_attr_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_obj_spec_attr_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_obj_spec_attr_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_obj_spec_attr_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_obj_spec_attr_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_obj_spec_attr_t or dict, got None"); + } + memset(&mp_write_scratch_lv_obj_spec_attr_t, 0, sizeof(lv_obj_spec_attr_t)); + return &mp_write_scratch_lv_obj_spec_attr_t; +} + +#define mp_write_lv_obj_spec_attr_t(struct_obj) (*((lv_obj_spec_attr_t*)mp_write_value_ptr_lv_obj_spec_attr_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_obj_spec_attr_t(void *field) +{ + return lv_to_mp_struct(&py_lv_obj_spec_attr_t_type, field); +} + +#define mp_read_lv_obj_spec_attr_t(field) lv_to_mp_struct_own(&py_lv_obj_spec_attr_t_type, copy_buffer(&field, sizeof(lv_obj_spec_attr_t))) +#define mp_read_byref_lv_obj_spec_attr_t(field) mp_read_ptr_lv_obj_spec_attr_t(&field) + + +/* + * lvgl extension definition for: + * lv_obj_spec_attr_t *lv_obj_allocate_spec_attr(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_allocate_spec_attr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_spec_attr_t * _res; + lvpy_lock(); + _res = ((lv_obj_spec_attr_t *(*)(lv_obj_t *))lv_obj_allocate_spec_attr)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_obj_spec_attr_t((void*)_res); +} + +static PyMethodDef py_lv_obj_allocate_spec_attr_def = { + "lv_obj_allocate_spec_attr", + (PyCFunction)py_lv_obj_allocate_spec_attr, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_add_child(lv_obj_t *parent, lv_obj_t *child) + */ +static PyObject *py_lv_obj_add_child(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *child_py; + if (!PyArg_ParseTuple(py_args, "O", &child_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = mp_to_lv(self); + lv_obj_t *child = mp_to_lv(child_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_obj_t *, lv_obj_t *))lv_obj_add_child)(parent, child); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_add_child_def = { + "lv_obj_add_child", + (PyCFunction)py_lv_obj_add_child, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_remove_child(lv_obj_t *parent, lv_obj_t *child) + */ +static PyObject *py_lv_obj_remove_child(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *child_py; + if (!PyArg_ParseTuple(py_args, "O", &child_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = mp_to_lv(self); + lv_obj_t *child = mp_to_lv(child_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_obj_remove_child)(parent, child); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_remove_child_def = { + "lv_obj_remove_child", + (PyCFunction)py_lv_obj_remove_child, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_invalidate_expand_blur(lv_display_t *disp) + */ +static PyObject *py_lv_obj_invalidate_expand_blur(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *disp_py; + if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_display_t *))lv_obj_invalidate_expand_blur)(disp); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_invalidate_expand_blur_def = { + "lv_obj_invalidate_expand_blur", + (PyCFunction)py_lv_obj_invalidate_expand_blur, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_result_t lv_obj_scroll_by_raw(lv_obj_t *obj, int32_t x, int32_t y) + */ +static PyObject *py_lv_obj_scroll_by_raw(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_obj_t *, int32_t, int32_t))lv_obj_scroll_by_raw)(obj, x, y); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_scroll_by_raw_def = { + "lv_obj_scroll_by_raw", + (PyCFunction)py_lv_obj_scroll_by_raw, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_style_init(void) + */ +static PyObject *py_lv_obj_style_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_obj_style_init)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_style_init_def = { + "lv_obj_style_init", + (PyCFunction)py_lv_obj_style_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_style_deinit(void) + */ +static PyObject *py_lv_obj_style_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_obj_style_deinit)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_style_deinit_def = { + "lv_obj_style_deinit", + (PyCFunction)py_lv_obj_style_deinit, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_obj_style_transition_dsc_t_path_cb' + * lv_anim_path_cb_t path_cb + */ + + +/* + * Struct lv_obj_style_transition_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_obj_style_transition_dsc_t_methods[]; + +static PyObject *py_lv_obj_style_transition_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_obj_style_transition_dsc_t *data = (lv_obj_style_transition_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "path_cb") == 0) return mp_lv_funcptr(NULL, data->path_cb, NULL, "lv_obj_style_transition_dsc_t_path_cb", NULL); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "selector") == 0) return mp_obj_new_int_from_uint(data->selector); + if (strcmp(attr, "time") == 0) return mp_obj_new_int_from_uint(data->time); + if (strcmp(attr, "delay") == 0) return mp_obj_new_int_from_uint(data->delay); + if (strcmp(attr, "prop") == 0) return mp_obj_new_int_from_uint(data->prop); + for (PyMethodDef *m = py_lv_obj_style_transition_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_obj_style_transition_dsc_t_field_names[] = {"path_cb", "user_data", "selector", "time", "delay", "prop", NULL}; + +static PyObject *py_lv_obj_style_transition_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_obj_style_transition_dsc_t_field_names, py_lv_obj_style_transition_dsc_t_methods); +} + +static PyMethodDef py_lv_obj_style_transition_dsc_t_type_methods[] = { + {"__dir__", py_lv_obj_style_transition_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_obj_style_transition_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_obj_style_transition_dsc_t *data = (lv_obj_style_transition_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_obj_style_transition_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "path_cb") == 0) { data->path_cb = mp_lv_callback(value, NULL, "lv_obj_style_transition_dsc_t_path_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "selector") == 0) { data->selector = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "time") == 0) { data->time = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "delay") == 0) { data->delay = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "prop") == 0) { data->prop = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_obj_style_transition_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_obj_style_transition_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_obj_style_transition_dsc_t)); +} + +static void py_lv_obj_style_transition_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_obj_style_transition_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_obj_style_transition_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_obj_style_transition_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_obj_style_transition_dsc_t_getattro, + .tp_setattro = (setter)py_lv_obj_style_transition_dsc_t_setattro, + .tp_new = py_lv_obj_style_transition_dsc_t_new, + .tp_methods = py_lv_obj_style_transition_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_obj_style_transition_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_obj_style_transition_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_obj_style_transition_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_obj_style_transition_dsc_t*)self->data; +} + +static lv_obj_style_transition_dsc_t mp_write_scratch_lv_obj_style_transition_dsc_t; + +static inline void* mp_write_value_ptr_lv_obj_style_transition_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_obj_style_transition_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_obj_style_transition_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_obj_style_transition_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_obj_style_transition_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_obj_style_transition_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_obj_style_transition_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_obj_style_transition_dsc_t, 0, sizeof(lv_obj_style_transition_dsc_t)); + return &mp_write_scratch_lv_obj_style_transition_dsc_t; +} + +#define mp_write_lv_obj_style_transition_dsc_t(struct_obj) (*((lv_obj_style_transition_dsc_t*)mp_write_value_ptr_lv_obj_style_transition_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_obj_style_transition_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_obj_style_transition_dsc_t_type, field); +} + +#define mp_read_lv_obj_style_transition_dsc_t(field) lv_to_mp_struct_own(&py_lv_obj_style_transition_dsc_t_type, copy_buffer(&field, sizeof(lv_obj_style_transition_dsc_t))) +#define mp_read_byref_lv_obj_style_transition_dsc_t(field) mp_read_ptr_lv_obj_style_transition_dsc_t(&field) + + +/* + * lvgl extension definition for: + * void lv_obj_style_create_transition(lv_obj_t *obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state, const lv_obj_style_transition_dsc_t *tr_dsc) + */ +static PyObject *py_lv_obj_style_create_transition(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *prev_state_py; PyObject *new_state_py; PyObject *tr_dsc_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &part_py, &prev_state_py, &new_state_py, &tr_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_state_t prev_state = (int)mp_obj_get_int(prev_state_py); + lv_state_t new_state = (int)mp_obj_get_int(new_state_py); + const lv_obj_style_transition_dsc_t *tr_dsc = (const lv_obj_style_transition_dsc_t *)mp_write_ptr_lv_obj_style_transition_dsc_t(tr_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_state_t, lv_state_t, const lv_obj_style_transition_dsc_t *))lv_obj_style_create_transition)(obj, part, prev_state, new_state, tr_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_style_create_transition_def = { + "lv_obj_style_create_transition", + (PyCFunction)py_lv_obj_style_create_transition, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t *obj, lv_state_t state1, lv_state_t state2, lv_part_t *changed_part) + */ +static PyObject *py_lv_obj_style_state_compare(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *state1_py; PyObject *state2_py; PyObject *changed_part_py; + if (!PyArg_ParseTuple(py_args, "OOO", &state1_py, &state2_py, &changed_part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_state_t state1 = (int)mp_obj_get_int(state1_py); + lv_state_t state2 = (int)mp_obj_get_int(state2_py); + lv_part_t *changed_part = mp_array_to_i32ptr(changed_part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_style_state_cmp_t _res; + lvpy_lock(); + _res = ((lv_style_state_cmp_t (*)(lv_obj_t *, lv_state_t, lv_state_t, lv_part_t *))lv_obj_style_state_compare)(obj, state1, state2, changed_part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_obj_style_state_compare_def = { + "lv_obj_style_state_compare", + (PyCFunction)py_lv_obj_style_state_compare, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_update_layer_type(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_update_layer_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_update_layer_type)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_update_layer_type_def = { + "lv_obj_update_layer_type", + (PyCFunction)py_lv_obj_update_layer_type, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_style_value_t lv_obj_get_style_prop_internal(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) + */ +static PyObject *py_lv_obj_get_style_prop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_style_value_t _res; + lvpy_lock(); + _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_obj_get_style_prop_internal)(obj, part, prop); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_lv_style_value_t(_res); +} + +static PyMethodDef py_lv_obj_get_style_prop_internal_def = { + "lv_obj_get_style_prop_internal", + (PyCFunction)py_lv_obj_get_style_prop_internal, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_style_value_t lv_obj_style_apply_color_filter_internal(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) + */ +static PyObject *py_lv_obj_style_apply_color_filter_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *v_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &v_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_value_t v = mp_write_lv_style_value_t(v_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_style_value_t _res; + lvpy_lock(); + _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_obj_style_apply_color_filter_internal)(obj, part, v); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_lv_style_value_t(_res); +} + +static PyMethodDef py_lv_obj_style_apply_color_filter_internal_def = { + "lv_obj_style_apply_color_filter_internal", + (PyCFunction)py_lv_obj_style_apply_color_filter_internal, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_update_blur_status(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_update_blur_status(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_update_blur_status)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_update_blur_status_def = { + "lv_obj_update_blur_status", + (PyCFunction)py_lv_obj_update_blur_status, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_refr(lv_layer_t *layer, lv_obj_t *obj) + */ +static PyObject *py_lv_obj_refr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *layer_py; PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_obj_t *obj = mp_to_lv(obj_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_layer_t *, lv_obj_t *))lv_obj_refr)(layer, obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_refr_def = { + "lv_obj_refr", + (PyCFunction)py_lv_obj_refr, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_obj_t *lv_obj_create(lv_obj_t *parent) + */ +static PyObject *py_lv_obj_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_obj_create)(parent); + lvpy_unlock(); + + PyGILState_Release(gstate); + return lv_to_mp((void*)_res); +} + +static PyMethodDef py_lv_obj_create_def = { + "lv_obj_create", + (PyCFunction)py_lv_obj_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl obj object definitions (CPython) + */ +static PyObject *py_lv_obj_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_obj_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_obj_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_obj_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_obj_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_obj_methods[] = { {"style_get_selector_state", (PyCFunction)py_lv_obj_style_get_selector_state, METH_VARARGS | METH_KEYWORDS, NULL}, {"style_get_selector_part", (PyCFunction)py_lv_obj_style_get_selector_part, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move_foreground", (PyCFunction)py_lv_obj_move_foreground, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move_background", (PyCFunction)py_lv_obj_move_background, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_width_internal", (PyCFunction)py_lv_obj_get_style_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_min_width_internal", (PyCFunction)py_lv_obj_get_style_min_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_max_width_internal", (PyCFunction)py_lv_obj_get_style_max_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_height_internal", (PyCFunction)py_lv_obj_get_style_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_min_height_internal", (PyCFunction)py_lv_obj_get_style_min_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_max_height_internal", (PyCFunction)py_lv_obj_get_style_max_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_length_internal", (PyCFunction)py_lv_obj_get_style_length_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_x_internal", (PyCFunction)py_lv_obj_get_style_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_y_internal", (PyCFunction)py_lv_obj_get_style_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_align_internal", (PyCFunction)py_lv_obj_get_style_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_width_internal", (PyCFunction)py_lv_obj_get_style_transform_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_height_internal", (PyCFunction)py_lv_obj_get_style_transform_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_translate_x_internal", (PyCFunction)py_lv_obj_get_style_translate_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_translate_y_internal", (PyCFunction)py_lv_obj_get_style_translate_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_translate_radial_internal", (PyCFunction)py_lv_obj_get_style_translate_radial_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_scale_x_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_scale_y_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_rotation_internal", (PyCFunction)py_lv_obj_get_style_transform_rotation_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_pivot_x_internal", (PyCFunction)py_lv_obj_get_style_transform_pivot_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_pivot_y_internal", (PyCFunction)py_lv_obj_get_style_transform_pivot_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_skew_x_internal", (PyCFunction)py_lv_obj_get_style_transform_skew_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_skew_y_internal", (PyCFunction)py_lv_obj_get_style_transform_skew_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_pad_top_internal", (PyCFunction)py_lv_obj_get_style_pad_top_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_pad_bottom_internal", (PyCFunction)py_lv_obj_get_style_pad_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_pad_left_internal", (PyCFunction)py_lv_obj_get_style_pad_left_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_pad_right_internal", (PyCFunction)py_lv_obj_get_style_pad_right_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_pad_row_internal", (PyCFunction)py_lv_obj_get_style_pad_row_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_pad_column_internal", (PyCFunction)py_lv_obj_get_style_pad_column_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_pad_radial_internal", (PyCFunction)py_lv_obj_get_style_pad_radial_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_margin_top_internal", (PyCFunction)py_lv_obj_get_style_margin_top_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_margin_bottom_internal", (PyCFunction)py_lv_obj_get_style_margin_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_margin_left_internal", (PyCFunction)py_lv_obj_get_style_margin_left_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_margin_right_internal", (PyCFunction)py_lv_obj_get_style_margin_right_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_color_internal", (PyCFunction)py_lv_obj_get_style_bg_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_bg_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_grad_color_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_grad_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_grad_dir_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_dir_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_main_stop_internal", (PyCFunction)py_lv_obj_get_style_bg_main_stop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_grad_stop_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_stop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_main_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_main_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_grad_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_grad_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_image_src_internal", (PyCFunction)py_lv_obj_get_style_bg_image_src_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_image_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_image_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_image_recolor_internal", (PyCFunction)py_lv_obj_get_style_bg_image_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_image_recolor_filtered_internal", (PyCFunction)py_lv_obj_get_style_bg_image_recolor_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_image_recolor_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_image_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bg_image_tiled_internal", (PyCFunction)py_lv_obj_get_style_bg_image_tiled_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_border_color_internal", (PyCFunction)py_lv_obj_get_style_border_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_border_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_border_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_border_opa_internal", (PyCFunction)py_lv_obj_get_style_border_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_border_width_internal", (PyCFunction)py_lv_obj_get_style_border_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_border_side_internal", (PyCFunction)py_lv_obj_get_style_border_side_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_border_post_internal", (PyCFunction)py_lv_obj_get_style_border_post_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_outline_width_internal", (PyCFunction)py_lv_obj_get_style_outline_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_outline_color_internal", (PyCFunction)py_lv_obj_get_style_outline_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_outline_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_outline_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_outline_opa_internal", (PyCFunction)py_lv_obj_get_style_outline_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_outline_pad_internal", (PyCFunction)py_lv_obj_get_style_outline_pad_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_shadow_width_internal", (PyCFunction)py_lv_obj_get_style_shadow_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_shadow_offset_x_internal", (PyCFunction)py_lv_obj_get_style_shadow_offset_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_shadow_offset_y_internal", (PyCFunction)py_lv_obj_get_style_shadow_offset_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_shadow_spread_internal", (PyCFunction)py_lv_obj_get_style_shadow_spread_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_shadow_color_internal", (PyCFunction)py_lv_obj_get_style_shadow_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_shadow_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_shadow_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_shadow_opa_internal", (PyCFunction)py_lv_obj_get_style_shadow_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_image_opa_internal", (PyCFunction)py_lv_obj_get_style_image_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_image_recolor_internal", (PyCFunction)py_lv_obj_get_style_image_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_image_recolor_filtered_internal", (PyCFunction)py_lv_obj_get_style_image_recolor_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_image_recolor_opa_internal", (PyCFunction)py_lv_obj_get_style_image_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_image_colorkey_internal", (PyCFunction)py_lv_obj_get_style_image_colorkey_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_line_width_internal", (PyCFunction)py_lv_obj_get_style_line_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_line_dash_width_internal", (PyCFunction)py_lv_obj_get_style_line_dash_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_line_dash_gap_internal", (PyCFunction)py_lv_obj_get_style_line_dash_gap_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_line_rounded_internal", (PyCFunction)py_lv_obj_get_style_line_rounded_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_line_color_internal", (PyCFunction)py_lv_obj_get_style_line_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_line_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_line_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_line_opa_internal", (PyCFunction)py_lv_obj_get_style_line_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_arc_width_internal", (PyCFunction)py_lv_obj_get_style_arc_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_arc_rounded_internal", (PyCFunction)py_lv_obj_get_style_arc_rounded_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_arc_color_internal", (PyCFunction)py_lv_obj_get_style_arc_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_arc_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_arc_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_arc_opa_internal", (PyCFunction)py_lv_obj_get_style_arc_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_arc_image_src_internal", (PyCFunction)py_lv_obj_get_style_arc_image_src_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_color_internal", (PyCFunction)py_lv_obj_get_style_text_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_text_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_opa_internal", (PyCFunction)py_lv_obj_get_style_text_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_font_internal", (PyCFunction)py_lv_obj_get_style_text_font_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_letter_space_internal", (PyCFunction)py_lv_obj_get_style_text_letter_space_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_line_space_internal", (PyCFunction)py_lv_obj_get_style_text_line_space_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_decor_internal", (PyCFunction)py_lv_obj_get_style_text_decor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_align_internal", (PyCFunction)py_lv_obj_get_style_text_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_outline_stroke_color_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_outline_stroke_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_outline_stroke_width_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_outline_stroke_opa_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_leading_trim_internal", (PyCFunction)py_lv_obj_get_style_text_leading_trim_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_blur_radius_internal", (PyCFunction)py_lv_obj_get_style_blur_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_blur_backdrop_internal", (PyCFunction)py_lv_obj_get_style_blur_backdrop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_blur_quality_internal", (PyCFunction)py_lv_obj_get_style_blur_quality_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_drop_shadow_radius_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_drop_shadow_offset_x_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_drop_shadow_offset_y_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_drop_shadow_color_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_drop_shadow_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_drop_shadow_opa_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_drop_shadow_quality_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_quality_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_radius_internal", (PyCFunction)py_lv_obj_get_style_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_radial_offset_internal", (PyCFunction)py_lv_obj_get_style_radial_offset_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_clip_corner_internal", (PyCFunction)py_lv_obj_get_style_clip_corner_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_opa_internal", (PyCFunction)py_lv_obj_get_style_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_opa_layered_internal", (PyCFunction)py_lv_obj_get_style_opa_layered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_color_filter_dsc_internal", (PyCFunction)py_lv_obj_get_style_color_filter_dsc_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_color_filter_opa_internal", (PyCFunction)py_lv_obj_get_style_color_filter_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_recolor_internal", (PyCFunction)py_lv_obj_get_style_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_recolor_opa_internal", (PyCFunction)py_lv_obj_get_style_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_anim_internal", (PyCFunction)py_lv_obj_get_style_anim_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_anim_duration_internal", (PyCFunction)py_lv_obj_get_style_anim_duration_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transition_internal", (PyCFunction)py_lv_obj_get_style_transition_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_blend_mode_internal", (PyCFunction)py_lv_obj_get_style_blend_mode_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_layout_internal", (PyCFunction)py_lv_obj_get_style_layout_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_base_dir_internal", (PyCFunction)py_lv_obj_get_style_base_dir_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_bitmap_mask_src_internal", (PyCFunction)py_lv_obj_get_style_bitmap_mask_src_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_rotary_sensitivity_internal", (PyCFunction)py_lv_obj_get_style_rotary_sensitivity_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_flex_flow_internal", (PyCFunction)py_lv_obj_get_style_flex_flow_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_flex_main_place_internal", (PyCFunction)py_lv_obj_get_style_flex_main_place_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_flex_cross_place_internal", (PyCFunction)py_lv_obj_get_style_flex_cross_place_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_flex_track_place_internal", (PyCFunction)py_lv_obj_get_style_flex_track_place_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_flex_grow_internal", (PyCFunction)py_lv_obj_get_style_flex_grow_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_column_dsc_array_internal", (PyCFunction)py_lv_obj_get_style_grid_column_dsc_array_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_column_align_internal", (PyCFunction)py_lv_obj_get_style_grid_column_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_row_dsc_array_internal", (PyCFunction)py_lv_obj_get_style_grid_row_dsc_array_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_row_align_internal", (PyCFunction)py_lv_obj_get_style_grid_row_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_cell_column_pos_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_column_pos_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_cell_x_align_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_x_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_cell_column_span_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_column_span_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_cell_row_pos_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_row_pos_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_cell_y_align_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_y_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_grid_cell_row_span_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_row_span_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"calculate_style_text_align_internal", (PyCFunction)py_lv_obj_calculate_style_text_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_left_internal", (PyCFunction)py_lv_obj_get_style_space_left_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_right_internal", (PyCFunction)py_lv_obj_get_style_space_right_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_top_internal", (PyCFunction)py_lv_obj_get_style_space_top_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_bottom_internal", (PyCFunction)py_lv_obj_get_style_space_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_scale_x_safe_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_scale_y_safe_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_flow", (PyCFunction)py_lv_obj_set_flex_flow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_align", (PyCFunction)py_lv_obj_set_flex_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_grow", (PyCFunction)py_lv_obj_set_flex_grow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_dsc_array", (PyCFunction)py_lv_obj_set_grid_dsc_array, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_align", (PyCFunction)py_lv_obj_set_grid_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_cell", (PyCFunction)py_lv_obj_set_grid_cell, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete", (PyCFunction)py_lv_obj_delete, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clean", (PyCFunction)py_lv_obj_clean, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_delayed", (PyCFunction)py_lv_obj_delete_delayed, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_anim_completed_cb", (PyCFunction)py_lv_obj_delete_anim_completed_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_async", (PyCFunction)py_lv_obj_delete_async, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_parent", (PyCFunction)py_lv_obj_set_parent, METH_VARARGS | METH_KEYWORDS, NULL}, + {"swap", (PyCFunction)py_lv_obj_swap, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move_to_index", (PyCFunction)py_lv_obj_move_to_index, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_screen", (PyCFunction)py_lv_obj_get_screen, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_display", (PyCFunction)py_lv_obj_get_display, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_parent", (PyCFunction)py_lv_obj_get_parent, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_child", (PyCFunction)py_lv_obj_get_child, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_child_by_type", (PyCFunction)py_lv_obj_get_child_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_sibling", (PyCFunction)py_lv_obj_get_sibling, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_sibling_by_type", (PyCFunction)py_lv_obj_get_sibling_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_child_count", (PyCFunction)py_lv_obj_get_child_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_child_count_by_type", (PyCFunction)py_lv_obj_get_child_count_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_index", (PyCFunction)py_lv_obj_get_index, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_index_by_type", (PyCFunction)py_lv_obj_get_index_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"tree_walk", (PyCFunction)py_lv_obj_tree_walk, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dump_tree", (PyCFunction)py_lv_obj_dump_tree, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pos", (PyCFunction)py_lv_obj_set_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_x", (PyCFunction)py_lv_obj_set_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_y", (PyCFunction)py_lv_obj_set_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_size", (PyCFunction)py_lv_obj_set_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"refr_size", (PyCFunction)py_lv_obj_refr_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_width", (PyCFunction)py_lv_obj_set_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_height", (PyCFunction)py_lv_obj_set_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_content_width", (PyCFunction)py_lv_obj_set_content_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_content_height", (PyCFunction)py_lv_obj_set_content_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_layout", (PyCFunction)py_lv_obj_set_layout, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_layout_positioned", (PyCFunction)py_lv_obj_is_layout_positioned, METH_VARARGS | METH_KEYWORDS, NULL}, + {"mark_layout_as_dirty", (PyCFunction)py_lv_obj_mark_layout_as_dirty, METH_VARARGS | METH_KEYWORDS, NULL}, + {"update_layout", (PyCFunction)py_lv_obj_update_layout, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_align", (PyCFunction)py_lv_obj_set_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"align", (PyCFunction)py_lv_obj_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"align_to", (PyCFunction)py_lv_obj_align_to, METH_VARARGS | METH_KEYWORDS, NULL}, + {"center", (PyCFunction)py_lv_obj_center, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform", (PyCFunction)py_lv_obj_set_transform, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset_transform", (PyCFunction)py_lv_obj_reset_transform, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_coords", (PyCFunction)py_lv_obj_get_coords, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_x", (PyCFunction)py_lv_obj_get_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_x2", (PyCFunction)py_lv_obj_get_x2, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_y", (PyCFunction)py_lv_obj_get_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_y2", (PyCFunction)py_lv_obj_get_y2, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_x_aligned", (PyCFunction)py_lv_obj_get_x_aligned, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_y_aligned", (PyCFunction)py_lv_obj_get_y_aligned, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_width", (PyCFunction)py_lv_obj_get_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_height", (PyCFunction)py_lv_obj_get_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_content_width", (PyCFunction)py_lv_obj_get_content_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_content_height", (PyCFunction)py_lv_obj_get_content_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_content_coords", (PyCFunction)py_lv_obj_get_content_coords, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_self_width", (PyCFunction)py_lv_obj_get_self_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_self_height", (PyCFunction)py_lv_obj_get_self_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_clamped_width", (PyCFunction)py_lv_obj_get_style_clamped_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_clamped_height", (PyCFunction)py_lv_obj_get_style_clamped_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_style_any_width_content", (PyCFunction)py_lv_obj_is_style_any_width_content, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_style_any_height_content", (PyCFunction)py_lv_obj_is_style_any_height_content, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_width_min", (PyCFunction)py_lv_obj_is_width_min, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_height_min", (PyCFunction)py_lv_obj_is_height_min, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_width_max", (PyCFunction)py_lv_obj_is_width_max, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_height_max", (PyCFunction)py_lv_obj_is_height_max, METH_VARARGS | METH_KEYWORDS, NULL}, + {"refresh_self_size", (PyCFunction)py_lv_obj_refresh_self_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"refr_pos", (PyCFunction)py_lv_obj_refr_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move_to", (PyCFunction)py_lv_obj_move_to, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move_children_by", (PyCFunction)py_lv_obj_move_children_by, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_transform", (PyCFunction)py_lv_obj_get_transform, METH_VARARGS | METH_KEYWORDS, NULL}, + {"transform_point", (PyCFunction)py_lv_obj_transform_point, METH_VARARGS | METH_KEYWORDS, NULL}, + {"transform_point_array", (PyCFunction)py_lv_obj_transform_point_array, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_transformed_area", (PyCFunction)py_lv_obj_get_transformed_area, METH_VARARGS | METH_KEYWORDS, NULL}, + {"invalidate_area", (PyCFunction)py_lv_obj_invalidate_area, METH_VARARGS | METH_KEYWORDS, NULL}, + {"invalidate", (PyCFunction)py_lv_obj_invalidate, METH_VARARGS | METH_KEYWORDS, NULL}, + {"area_is_visible", (PyCFunction)py_lv_obj_area_is_visible, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_visible", (PyCFunction)py_lv_obj_is_visible, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_ext_click_area", (PyCFunction)py_lv_obj_set_ext_click_area, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_click_area", (PyCFunction)py_lv_obj_get_click_area, METH_VARARGS | METH_KEYWORDS, NULL}, + {"hit_test", (PyCFunction)py_lv_obj_hit_test, METH_VARARGS | METH_KEYWORDS, NULL}, + {"calc_dynamic_width", (PyCFunction)py_lv_obj_calc_dynamic_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"calc_dynamic_height", (PyCFunction)py_lv_obj_calc_dynamic_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scrollbar_mode", (PyCFunction)py_lv_obj_set_scrollbar_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_dir", (PyCFunction)py_lv_obj_set_scroll_dir, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_snap_x", (PyCFunction)py_lv_obj_set_scroll_snap_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_snap_y", (PyCFunction)py_lv_obj_set_scroll_snap_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scrollbar_mode", (PyCFunction)py_lv_obj_get_scrollbar_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_dir", (PyCFunction)py_lv_obj_get_scroll_dir, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_snap_x", (PyCFunction)py_lv_obj_get_scroll_snap_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_snap_y", (PyCFunction)py_lv_obj_get_scroll_snap_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_x", (PyCFunction)py_lv_obj_get_scroll_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_y", (PyCFunction)py_lv_obj_get_scroll_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_top", (PyCFunction)py_lv_obj_get_scroll_top, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_bottom", (PyCFunction)py_lv_obj_get_scroll_bottom, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_left", (PyCFunction)py_lv_obj_get_scroll_left, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_right", (PyCFunction)py_lv_obj_get_scroll_right, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_end", (PyCFunction)py_lv_obj_get_scroll_end, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_by", (PyCFunction)py_lv_obj_scroll_by, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_by_bounded", (PyCFunction)py_lv_obj_scroll_by_bounded, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_to", (PyCFunction)py_lv_obj_scroll_to, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_to_x", (PyCFunction)py_lv_obj_scroll_to_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_to_y", (PyCFunction)py_lv_obj_scroll_to_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_to_view", (PyCFunction)py_lv_obj_scroll_to_view, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_to_view_recursive", (PyCFunction)py_lv_obj_scroll_to_view_recursive, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scrolling", (PyCFunction)py_lv_obj_is_scrolling, METH_VARARGS | METH_KEYWORDS, NULL}, + {"stop_scroll_anim", (PyCFunction)py_lv_obj_stop_scroll_anim, METH_VARARGS | METH_KEYWORDS, NULL}, + {"update_snap", (PyCFunction)py_lv_obj_update_snap, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scrollbar_area", (PyCFunction)py_lv_obj_get_scrollbar_area, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scrollbar_invalidate", (PyCFunction)py_lv_obj_scrollbar_invalidate, METH_VARARGS | METH_KEYWORDS, NULL}, + {"readjust_scroll", (PyCFunction)py_lv_obj_readjust_scroll, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_style", (PyCFunction)py_lv_obj_add_style, METH_VARARGS | METH_KEYWORDS, NULL}, + {"replace_style", (PyCFunction)py_lv_obj_replace_style, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_style", (PyCFunction)py_lv_obj_remove_style, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_theme", (PyCFunction)py_lv_obj_remove_theme, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_style_all", (PyCFunction)py_lv_obj_remove_style_all, METH_VARARGS | METH_KEYWORDS, NULL}, + {"report_style_change", (PyCFunction)py_lv_obj_report_style_change, METH_VARARGS | METH_KEYWORDS, NULL}, + {"refresh_style", (PyCFunction)py_lv_obj_refresh_style, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_enabled", (PyCFunction)py_lv_obj_set_style_enabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_enabled", (PyCFunction)py_lv_obj_get_style_enabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"style_set_disabled", (PyCFunction)py_lv_obj_style_set_disabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"style_get_disabled", (PyCFunction)py_lv_obj_style_get_disabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"enable_style_refresh", (PyCFunction)py_lv_obj_enable_style_refresh, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_prop", (PyCFunction)py_lv_obj_get_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_style_prop", (PyCFunction)py_lv_obj_has_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_local_style_prop", (PyCFunction)py_lv_obj_set_local_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_local_style_prop", (PyCFunction)py_lv_obj_get_local_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_local_style_prop", (PyCFunction)py_lv_obj_remove_local_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, + {"style_apply_color_filter", (PyCFunction)py_lv_obj_style_apply_color_filter, METH_VARARGS | METH_KEYWORDS, NULL}, + {"fade_in", (PyCFunction)py_lv_obj_fade_in, METH_VARARGS | METH_KEYWORDS, NULL}, + {"fade_out", (PyCFunction)py_lv_obj_fade_out, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_width", (PyCFunction)py_lv_obj_get_style_width, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_min_width", (PyCFunction)py_lv_obj_get_style_min_width, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_max_width", (PyCFunction)py_lv_obj_get_style_max_width, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -29800,6 +38353,7 @@ static PyMethodDef py_lv_obj_methods[] = { {"get_style_text_outline_stroke_color_filtered", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_text_outline_stroke_width", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_width, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_text_outline_stroke_opa", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_opa, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_text_leading_trim", (PyCFunction)py_lv_obj_get_style_text_leading_trim, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_blur_radius", (PyCFunction)py_lv_obj_get_style_blur_radius, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_blur_backdrop", (PyCFunction)py_lv_obj_get_style_blur_backdrop, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_blur_quality", (PyCFunction)py_lv_obj_get_style_blur_quality, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -29842,152 +38396,6 @@ static PyMethodDef py_lv_obj_methods[] = { {"get_style_grid_cell_row_pos", (PyCFunction)py_lv_obj_get_style_grid_cell_row_pos, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_grid_cell_y_align", (PyCFunction)py_lv_obj_get_style_grid_cell_y_align, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_grid_cell_row_span", (PyCFunction)py_lv_obj_get_style_grid_cell_row_span, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_pad_all", (PyCFunction)py_lv_obj_set_style_pad_all, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_pad_hor", (PyCFunction)py_lv_obj_set_style_pad_hor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_pad_ver", (PyCFunction)py_lv_obj_set_style_pad_ver, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_margin_all", (PyCFunction)py_lv_obj_set_style_margin_all, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_margin_hor", (PyCFunction)py_lv_obj_set_style_margin_hor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_margin_ver", (PyCFunction)py_lv_obj_set_style_margin_ver, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_pad_gap", (PyCFunction)py_lv_obj_set_style_pad_gap, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_size", (PyCFunction)py_lv_obj_set_style_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style_transform_scale", (PyCFunction)py_lv_obj_set_style_transform_scale, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_left", (PyCFunction)py_lv_obj_get_style_space_left, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_right", (PyCFunction)py_lv_obj_get_style_space_right, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_top", (PyCFunction)py_lv_obj_get_style_space_top, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_bottom", (PyCFunction)py_lv_obj_get_style_space_bottom, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_scale_x_safe", (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_scale_y_safe", (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move_foreground", (PyCFunction)py_lv_obj_move_foreground, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move_background", (PyCFunction)py_lv_obj_move_background, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_flow", (PyCFunction)py_lv_obj_set_flex_flow, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_align", (PyCFunction)py_lv_obj_set_flex_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_grow", (PyCFunction)py_lv_obj_set_flex_grow, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_dsc_array", (PyCFunction)py_lv_obj_set_grid_dsc_array, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_align", (PyCFunction)py_lv_obj_set_grid_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_cell", (PyCFunction)py_lv_obj_set_grid_cell, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete", (PyCFunction)py_lv_obj_delete, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clean", (PyCFunction)py_lv_obj_clean, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_delayed", (PyCFunction)py_lv_obj_delete_delayed, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_anim_completed_cb", (PyCFunction)py_lv_obj_delete_anim_completed_cb, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_async", (PyCFunction)py_lv_obj_delete_async, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_parent", (PyCFunction)py_lv_obj_set_parent, METH_VARARGS | METH_KEYWORDS, NULL}, - {"swap", (PyCFunction)py_lv_obj_swap, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move_to_index", (PyCFunction)py_lv_obj_move_to_index, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_screen", (PyCFunction)py_lv_obj_get_screen, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_display", (PyCFunction)py_lv_obj_get_display, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_parent", (PyCFunction)py_lv_obj_get_parent, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_child", (PyCFunction)py_lv_obj_get_child, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_child_by_type", (PyCFunction)py_lv_obj_get_child_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_sibling", (PyCFunction)py_lv_obj_get_sibling, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_sibling_by_type", (PyCFunction)py_lv_obj_get_sibling_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_child_count", (PyCFunction)py_lv_obj_get_child_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_child_count_by_type", (PyCFunction)py_lv_obj_get_child_count_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_index", (PyCFunction)py_lv_obj_get_index, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_index_by_type", (PyCFunction)py_lv_obj_get_index_by_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"tree_walk", (PyCFunction)py_lv_obj_tree_walk, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dump_tree", (PyCFunction)py_lv_obj_dump_tree, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pos", (PyCFunction)py_lv_obj_set_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_x", (PyCFunction)py_lv_obj_set_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_y", (PyCFunction)py_lv_obj_set_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_size", (PyCFunction)py_lv_obj_set_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"refr_size", (PyCFunction)py_lv_obj_refr_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_width", (PyCFunction)py_lv_obj_set_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_height", (PyCFunction)py_lv_obj_set_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_content_width", (PyCFunction)py_lv_obj_set_content_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_content_height", (PyCFunction)py_lv_obj_set_content_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_layout", (PyCFunction)py_lv_obj_set_layout, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_layout_positioned", (PyCFunction)py_lv_obj_is_layout_positioned, METH_VARARGS | METH_KEYWORDS, NULL}, - {"mark_layout_as_dirty", (PyCFunction)py_lv_obj_mark_layout_as_dirty, METH_VARARGS | METH_KEYWORDS, NULL}, - {"update_layout", (PyCFunction)py_lv_obj_update_layout, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_align", (PyCFunction)py_lv_obj_set_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"align", (PyCFunction)py_lv_obj_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"align_to", (PyCFunction)py_lv_obj_align_to, METH_VARARGS | METH_KEYWORDS, NULL}, - {"center", (PyCFunction)py_lv_obj_center, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform", (PyCFunction)py_lv_obj_set_transform, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset_transform", (PyCFunction)py_lv_obj_reset_transform, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_coords", (PyCFunction)py_lv_obj_get_coords, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_x", (PyCFunction)py_lv_obj_get_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_x2", (PyCFunction)py_lv_obj_get_x2, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_y", (PyCFunction)py_lv_obj_get_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_y2", (PyCFunction)py_lv_obj_get_y2, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_x_aligned", (PyCFunction)py_lv_obj_get_x_aligned, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_y_aligned", (PyCFunction)py_lv_obj_get_y_aligned, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_width", (PyCFunction)py_lv_obj_get_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_height", (PyCFunction)py_lv_obj_get_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_content_width", (PyCFunction)py_lv_obj_get_content_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_content_height", (PyCFunction)py_lv_obj_get_content_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_content_coords", (PyCFunction)py_lv_obj_get_content_coords, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_self_width", (PyCFunction)py_lv_obj_get_self_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_self_height", (PyCFunction)py_lv_obj_get_self_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_clamped_width", (PyCFunction)py_lv_obj_get_style_clamped_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_clamped_height", (PyCFunction)py_lv_obj_get_style_clamped_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_width_min", (PyCFunction)py_lv_obj_is_width_min, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_height_min", (PyCFunction)py_lv_obj_is_height_min, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_width_max", (PyCFunction)py_lv_obj_is_width_max, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_height_max", (PyCFunction)py_lv_obj_is_height_max, METH_VARARGS | METH_KEYWORDS, NULL}, - {"refresh_self_size", (PyCFunction)py_lv_obj_refresh_self_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"refr_pos", (PyCFunction)py_lv_obj_refr_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move_to", (PyCFunction)py_lv_obj_move_to, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move_children_by", (PyCFunction)py_lv_obj_move_children_by, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_transform", (PyCFunction)py_lv_obj_get_transform, METH_VARARGS | METH_KEYWORDS, NULL}, - {"transform_point", (PyCFunction)py_lv_obj_transform_point, METH_VARARGS | METH_KEYWORDS, NULL}, - {"transform_point_array", (PyCFunction)py_lv_obj_transform_point_array, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_transformed_area", (PyCFunction)py_lv_obj_get_transformed_area, METH_VARARGS | METH_KEYWORDS, NULL}, - {"invalidate_area", (PyCFunction)py_lv_obj_invalidate_area, METH_VARARGS | METH_KEYWORDS, NULL}, - {"invalidate", (PyCFunction)py_lv_obj_invalidate, METH_VARARGS | METH_KEYWORDS, NULL}, - {"area_is_visible", (PyCFunction)py_lv_obj_area_is_visible, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_visible", (PyCFunction)py_lv_obj_is_visible, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_ext_click_area", (PyCFunction)py_lv_obj_set_ext_click_area, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_click_area", (PyCFunction)py_lv_obj_get_click_area, METH_VARARGS | METH_KEYWORDS, NULL}, - {"hit_test", (PyCFunction)py_lv_obj_hit_test, METH_VARARGS | METH_KEYWORDS, NULL}, - {"calc_dynamic_width", (PyCFunction)py_lv_obj_calc_dynamic_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"calc_dynamic_height", (PyCFunction)py_lv_obj_calc_dynamic_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scrollbar_mode", (PyCFunction)py_lv_obj_set_scrollbar_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scroll_dir", (PyCFunction)py_lv_obj_set_scroll_dir, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scroll_snap_x", (PyCFunction)py_lv_obj_set_scroll_snap_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scroll_snap_y", (PyCFunction)py_lv_obj_set_scroll_snap_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scrollbar_mode", (PyCFunction)py_lv_obj_get_scrollbar_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_dir", (PyCFunction)py_lv_obj_get_scroll_dir, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_snap_x", (PyCFunction)py_lv_obj_get_scroll_snap_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_snap_y", (PyCFunction)py_lv_obj_get_scroll_snap_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_x", (PyCFunction)py_lv_obj_get_scroll_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_y", (PyCFunction)py_lv_obj_get_scroll_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_top", (PyCFunction)py_lv_obj_get_scroll_top, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_bottom", (PyCFunction)py_lv_obj_get_scroll_bottom, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_left", (PyCFunction)py_lv_obj_get_scroll_left, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_right", (PyCFunction)py_lv_obj_get_scroll_right, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_end", (PyCFunction)py_lv_obj_get_scroll_end, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_by", (PyCFunction)py_lv_obj_scroll_by, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_by_bounded", (PyCFunction)py_lv_obj_scroll_by_bounded, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_to", (PyCFunction)py_lv_obj_scroll_to, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_to_x", (PyCFunction)py_lv_obj_scroll_to_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_to_y", (PyCFunction)py_lv_obj_scroll_to_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_to_view", (PyCFunction)py_lv_obj_scroll_to_view, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_to_view_recursive", (PyCFunction)py_lv_obj_scroll_to_view_recursive, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_scrolling", (PyCFunction)py_lv_obj_is_scrolling, METH_VARARGS | METH_KEYWORDS, NULL}, - {"stop_scroll_anim", (PyCFunction)py_lv_obj_stop_scroll_anim, METH_VARARGS | METH_KEYWORDS, NULL}, - {"update_snap", (PyCFunction)py_lv_obj_update_snap, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scrollbar_area", (PyCFunction)py_lv_obj_get_scrollbar_area, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scrollbar_invalidate", (PyCFunction)py_lv_obj_scrollbar_invalidate, METH_VARARGS | METH_KEYWORDS, NULL}, - {"readjust_scroll", (PyCFunction)py_lv_obj_readjust_scroll, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_style", (PyCFunction)py_lv_obj_add_style, METH_VARARGS | METH_KEYWORDS, NULL}, - {"replace_style", (PyCFunction)py_lv_obj_replace_style, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_style", (PyCFunction)py_lv_obj_remove_style, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_theme", (PyCFunction)py_lv_obj_remove_theme, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_style_all", (PyCFunction)py_lv_obj_remove_style_all, METH_VARARGS | METH_KEYWORDS, NULL}, - {"report_style_change", (PyCFunction)py_lv_obj_report_style_change, METH_VARARGS | METH_KEYWORDS, NULL}, - {"refresh_style", (PyCFunction)py_lv_obj_refresh_style, METH_VARARGS | METH_KEYWORDS, NULL}, - {"style_set_disabled", (PyCFunction)py_lv_obj_style_set_disabled, METH_VARARGS | METH_KEYWORDS, NULL}, - {"style_get_disabled", (PyCFunction)py_lv_obj_style_get_disabled, METH_VARARGS | METH_KEYWORDS, NULL}, - {"enable_style_refresh", (PyCFunction)py_lv_obj_enable_style_refresh, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_prop", (PyCFunction)py_lv_obj_get_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_style_prop", (PyCFunction)py_lv_obj_has_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_local_style_prop", (PyCFunction)py_lv_obj_set_local_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_local_style_prop", (PyCFunction)py_lv_obj_get_local_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_local_style_prop", (PyCFunction)py_lv_obj_remove_local_style_prop, METH_VARARGS | METH_KEYWORDS, NULL}, - {"style_apply_color_filter", (PyCFunction)py_lv_obj_style_apply_color_filter, METH_VARARGS | METH_KEYWORDS, NULL}, - {"fade_in", (PyCFunction)py_lv_obj_fade_in, METH_VARARGS | METH_KEYWORDS, NULL}, - {"fade_out", (PyCFunction)py_lv_obj_fade_out, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_width", (PyCFunction)py_lv_obj_set_style_width, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_min_width", (PyCFunction)py_lv_obj_set_style_min_width, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_max_width", (PyCFunction)py_lv_obj_set_style_max_width, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -30075,6 +38483,7 @@ static PyMethodDef py_lv_obj_methods[] = { {"set_style_text_outline_stroke_color", (PyCFunction)py_lv_obj_set_style_text_outline_stroke_color, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_text_outline_stroke_width", (PyCFunction)py_lv_obj_set_style_text_outline_stroke_width, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_text_outline_stroke_opa", (PyCFunction)py_lv_obj_set_style_text_outline_stroke_opa, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_text_leading_trim", (PyCFunction)py_lv_obj_set_style_text_leading_trim, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_blur_radius", (PyCFunction)py_lv_obj_set_style_blur_radius, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_blur_backdrop", (PyCFunction)py_lv_obj_set_style_blur_backdrop, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_blur_quality", (PyCFunction)py_lv_obj_set_style_blur_quality, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -30116,7 +38525,22 @@ static PyMethodDef py_lv_obj_methods[] = { {"set_style_grid_cell_row_pos", (PyCFunction)py_lv_obj_set_style_grid_cell_row_pos, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_grid_cell_y_align", (PyCFunction)py_lv_obj_set_style_grid_cell_y_align, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_style_grid_cell_row_span", (PyCFunction)py_lv_obj_set_style_grid_cell_row_span, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_pad_all", (PyCFunction)py_lv_obj_set_style_pad_all, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_pad_hor", (PyCFunction)py_lv_obj_set_style_pad_hor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_pad_ver", (PyCFunction)py_lv_obj_set_style_pad_ver, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_margin_all", (PyCFunction)py_lv_obj_set_style_margin_all, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_margin_hor", (PyCFunction)py_lv_obj_set_style_margin_hor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_margin_ver", (PyCFunction)py_lv_obj_set_style_margin_ver, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_pad_gap", (PyCFunction)py_lv_obj_set_style_pad_gap, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_size", (PyCFunction)py_lv_obj_set_style_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style_transform_scale", (PyCFunction)py_lv_obj_set_style_transform_scale, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_left", (PyCFunction)py_lv_obj_get_style_space_left, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_right", (PyCFunction)py_lv_obj_get_style_space_right, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_top", (PyCFunction)py_lv_obj_get_style_space_top, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_space_bottom", (PyCFunction)py_lv_obj_get_style_space_bottom, METH_VARARGS | METH_KEYWORDS, NULL}, {"calculate_style_text_align", (PyCFunction)py_lv_obj_calculate_style_text_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_scale_x_safe", (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_transform_scale_y_safe", (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_opa_recursive", (PyCFunction)py_lv_obj_get_style_opa_recursive, METH_VARARGS | METH_KEYWORDS, NULL}, {"style_apply_recolor", (PyCFunction)py_lv_obj_style_apply_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_style_recolor_recursive", (PyCFunction)py_lv_obj_get_style_recolor_recursive, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -30128,6 +38552,7 @@ static PyMethodDef py_lv_obj_methods[] = { {"init_draw_line_dsc", (PyCFunction)py_lv_obj_init_draw_line_dsc, METH_VARARGS | METH_KEYWORDS, NULL}, {"init_draw_arc_dsc", (PyCFunction)py_lv_obj_init_draw_arc_dsc, METH_VARARGS | METH_KEYWORDS, NULL}, {"init_draw_blur_dsc", (PyCFunction)py_lv_obj_init_draw_blur_dsc, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_ext_draw_size", (PyCFunction)py_lv_obj_set_ext_draw_size, METH_VARARGS | METH_KEYWORDS, NULL}, {"calculate_ext_draw_size", (PyCFunction)py_lv_obj_calculate_ext_draw_size, METH_VARARGS | METH_KEYWORDS, NULL}, {"refresh_ext_draw_size", (PyCFunction)py_lv_obj_refresh_ext_draw_size, METH_VARARGS | METH_KEYWORDS, NULL}, {"class_create_obj", (PyCFunction)py_lv_obj_class_create_obj, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -30146,28 +38571,105 @@ static PyMethodDef py_lv_obj_methods[] = { {"add_flag", (PyCFunction)py_lv_obj_add_flag, METH_VARARGS | METH_KEYWORDS, NULL}, {"remove_flag", (PyCFunction)py_lv_obj_remove_flag, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_flag", (PyCFunction)py_lv_obj_set_flag, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_hidden", (PyCFunction)py_lv_obj_set_hidden, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_clickable", (PyCFunction)py_lv_obj_set_clickable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_click_focusable", (PyCFunction)py_lv_obj_set_click_focusable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_checkable", (PyCFunction)py_lv_obj_set_checkable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scrollable", (PyCFunction)py_lv_obj_set_scrollable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_elastic", (PyCFunction)py_lv_obj_set_scroll_elastic, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_momentum", (PyCFunction)py_lv_obj_set_scroll_momentum, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_one", (PyCFunction)py_lv_obj_set_scroll_one, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_chain", (PyCFunction)py_lv_obj_set_scroll_chain, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_chain_hor", (PyCFunction)py_lv_obj_set_scroll_chain_hor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_chain_ver", (PyCFunction)py_lv_obj_set_scroll_chain_ver, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_on_focus", (PyCFunction)py_lv_obj_set_scroll_on_focus, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_with_arrow", (PyCFunction)py_lv_obj_set_scroll_with_arrow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_snappable", (PyCFunction)py_lv_obj_set_snappable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_press_lock", (PyCFunction)py_lv_obj_set_press_lock, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_event_bubble", (PyCFunction)py_lv_obj_set_event_bubble, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_gesture_bubble", (PyCFunction)py_lv_obj_set_gesture_bubble, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_adv_hittest", (PyCFunction)py_lv_obj_set_adv_hittest, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_ignore_layout", (PyCFunction)py_lv_obj_set_ignore_layout, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_floating", (PyCFunction)py_lv_obj_set_floating, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_send_draw_task_events", (PyCFunction)py_lv_obj_set_send_draw_task_events, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_overflow_visible", (PyCFunction)py_lv_obj_set_overflow_visible, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_event_trickle", (PyCFunction)py_lv_obj_set_event_trickle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_state_trickle", (PyCFunction)py_lv_obj_set_state_trickle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_radio_button", (PyCFunction)py_lv_obj_set_radio_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_in_new_track", (PyCFunction)py_lv_obj_set_flex_in_new_track, METH_VARARGS | METH_KEYWORDS, NULL}, {"add_state", (PyCFunction)py_lv_obj_add_state, METH_VARARGS | METH_KEYWORDS, NULL}, {"remove_state", (PyCFunction)py_lv_obj_remove_state, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_state", (PyCFunction)py_lv_obj_set_state, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_alt", (PyCFunction)py_lv_obj_set_alt, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_checked", (PyCFunction)py_lv_obj_set_checked, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_focused", (PyCFunction)py_lv_obj_set_focused, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_focus_key", (PyCFunction)py_lv_obj_set_focus_key, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_edited", (PyCFunction)py_lv_obj_set_edited, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_hovered", (PyCFunction)py_lv_obj_set_hovered, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pressed", (PyCFunction)py_lv_obj_set_pressed, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scrolled", (PyCFunction)py_lv_obj_set_scrolled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_disabled", (PyCFunction)py_lv_obj_set_disabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_state_user_1", (PyCFunction)py_lv_obj_set_state_user_1, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_state_user_2", (PyCFunction)py_lv_obj_set_state_user_2, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_state_user_3", (PyCFunction)py_lv_obj_set_state_user_3, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_state_user_4", (PyCFunction)py_lv_obj_set_state_user_4, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_user_data", (PyCFunction)py_lv_obj_set_user_data, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_radio_button", (PyCFunction)py_lv_obj_set_radio_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_flag", (PyCFunction)py_lv_obj_set_user_flag, METH_VARARGS | METH_KEYWORDS, NULL}, {"has_flag", (PyCFunction)py_lv_obj_has_flag, METH_VARARGS | METH_KEYWORDS, NULL}, {"has_flag_any", (PyCFunction)py_lv_obj_has_flag_any, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_hidden", (PyCFunction)py_lv_obj_is_hidden, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_clickable", (PyCFunction)py_lv_obj_is_clickable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_click_focusable", (PyCFunction)py_lv_obj_is_click_focusable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_checkable", (PyCFunction)py_lv_obj_is_checkable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scrollable", (PyCFunction)py_lv_obj_is_scrollable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scroll_elastic", (PyCFunction)py_lv_obj_is_scroll_elastic, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scroll_momentum", (PyCFunction)py_lv_obj_is_scroll_momentum, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scroll_one", (PyCFunction)py_lv_obj_is_scroll_one, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scroll_chain_hor", (PyCFunction)py_lv_obj_is_scroll_chain_hor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scroll_chain_ver", (PyCFunction)py_lv_obj_is_scroll_chain_ver, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scroll_on_focus", (PyCFunction)py_lv_obj_is_scroll_on_focus, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scroll_with_arrow", (PyCFunction)py_lv_obj_is_scroll_with_arrow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_snappable", (PyCFunction)py_lv_obj_is_snappable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_press_lock", (PyCFunction)py_lv_obj_is_press_lock, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_event_bubble", (PyCFunction)py_lv_obj_is_event_bubble, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_gesture_bubble", (PyCFunction)py_lv_obj_is_gesture_bubble, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_adv_hittest", (PyCFunction)py_lv_obj_is_adv_hittest, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_ignore_layout", (PyCFunction)py_lv_obj_is_ignore_layout, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_floating", (PyCFunction)py_lv_obj_is_floating, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_send_draw_task_events", (PyCFunction)py_lv_obj_is_send_draw_task_events, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_overflow_visible", (PyCFunction)py_lv_obj_is_overflow_visible, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_event_trickle", (PyCFunction)py_lv_obj_is_event_trickle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_state_trickle", (PyCFunction)py_lv_obj_is_state_trickle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_radio_button", (PyCFunction)py_lv_obj_is_radio_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_flex_in_new_track", (PyCFunction)py_lv_obj_is_flex_in_new_track, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_state", (PyCFunction)py_lv_obj_get_state, METH_VARARGS | METH_KEYWORDS, NULL}, {"has_state", (PyCFunction)py_lv_obj_has_state, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_radio_button", (PyCFunction)py_lv_obj_is_radio_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_alt", (PyCFunction)py_lv_obj_is_alt, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_checked", (PyCFunction)py_lv_obj_is_checked, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_focused", (PyCFunction)py_lv_obj_is_focused, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_focus_key", (PyCFunction)py_lv_obj_is_focus_key, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_edited", (PyCFunction)py_lv_obj_is_edited, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_hovered", (PyCFunction)py_lv_obj_is_hovered, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_pressed", (PyCFunction)py_lv_obj_is_pressed, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_scrolled", (PyCFunction)py_lv_obj_is_scrolled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_disabled", (PyCFunction)py_lv_obj_is_disabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_state_user_1", (PyCFunction)py_lv_obj_is_state_user_1, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_state_user_2", (PyCFunction)py_lv_obj_is_state_user_2, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_state_user_3", (PyCFunction)py_lv_obj_is_state_user_3, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_state_user_4", (PyCFunction)py_lv_obj_is_state_user_4, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_group", (PyCFunction)py_lv_obj_get_group, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_user_data", (PyCFunction)py_lv_obj_get_user_data, METH_VARARGS | METH_KEYWORDS, NULL}, - {"allocate_spec_attr", (PyCFunction)py_lv_obj_allocate_spec_attr, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_flag", (PyCFunction)py_lv_obj_get_user_flag, METH_VARARGS | METH_KEYWORDS, NULL}, {"check_type", (PyCFunction)py_lv_obj_check_type, METH_VARARGS | METH_KEYWORDS, NULL}, {"has_class", (PyCFunction)py_lv_obj_has_class, METH_VARARGS | METH_KEYWORDS, NULL}, {"get_class", (PyCFunction)py_lv_obj_get_class, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_valid", (PyCFunction)py_lv_obj_is_valid, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_in_widget_tree", (PyCFunction)py_lv_obj_is_in_widget_tree, METH_VARARGS | METH_KEYWORDS, NULL}, {"null_on_delete", (PyCFunction)py_lv_obj_null_on_delete, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_delete_cb", (PyCFunction)py_lv_obj_add_delete_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_delete_cb", (PyCFunction)py_lv_obj_remove_delete_cb, METH_VARARGS | METH_KEYWORDS, NULL}, {"add_screen_load_event", (PyCFunction)py_lv_obj_add_screen_load_event, METH_VARARGS | METH_KEYWORDS, NULL}, {"add_screen_create_event", (PyCFunction)py_lv_obj_add_screen_create_event, METH_VARARGS | METH_KEYWORDS, NULL}, {"add_play_timeline_event", (PyCFunction)py_lv_obj_add_play_timeline_event, METH_VARARGS | METH_KEYWORDS, NULL}, - {"redraw", (PyCFunction)py_lv_obj_redraw, METH_VARARGS | METH_KEYWORDS, NULL}, {"remove_from_subject", (PyCFunction)py_lv_obj_remove_from_subject, METH_VARARGS | METH_KEYWORDS, NULL}, {"add_subject_increment_event", (PyCFunction)py_lv_obj_add_subject_increment_event, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_subject_increment_event_min_value", (PyCFunction)py_lv_obj_set_subject_increment_event_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -30177,6 +38679,12 @@ static PyMethodDef py_lv_obj_methods[] = { {"add_subject_set_int_event", (PyCFunction)py_lv_obj_add_subject_set_int_event, METH_VARARGS | METH_KEYWORDS, NULL}, {"add_subject_set_float_event", (PyCFunction)py_lv_obj_add_subject_set_float_event, METH_VARARGS | METH_KEYWORDS, NULL}, {"add_subject_set_string_event", (PyCFunction)py_lv_obj_add_subject_set_string_event, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_bool", (PyCFunction)py_lv_obj_bind_bool, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_int", (PyCFunction)py_lv_obj_bind_int, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_float", (PyCFunction)py_lv_obj_bind_float, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_string", (PyCFunction)py_lv_obj_bind_string, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_color", (PyCFunction)py_lv_obj_bind_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_pointer", (PyCFunction)py_lv_obj_bind_pointer, METH_VARARGS | METH_KEYWORDS, NULL}, {"bind_flag_if_eq", (PyCFunction)py_lv_obj_bind_flag_if_eq, METH_VARARGS | METH_KEYWORDS, NULL}, {"bind_flag_if_not_eq", (PyCFunction)py_lv_obj_bind_flag_if_not_eq, METH_VARARGS | METH_KEYWORDS, NULL}, {"bind_flag_if_gt", (PyCFunction)py_lv_obj_bind_flag_if_gt, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -30190,63 +38698,2811 @@ static PyMethodDef py_lv_obj_methods[] = { {"bind_state_if_lt", (PyCFunction)py_lv_obj_bind_state_if_lt, METH_VARARGS | METH_KEYWORDS, NULL}, {"bind_state_if_le", (PyCFunction)py_lv_obj_bind_state_if_le, METH_VARARGS | METH_KEYWORDS, NULL}, {"bind_checked", (PyCFunction)py_lv_obj_bind_checked, METH_VARARGS | METH_KEYWORDS, NULL}, - {"refr", (PyCFunction)py_lv_obj_refr, METH_VARARGS | METH_KEYWORDS, NULL}, + {"redraw", (PyCFunction)py_lv_obj_redraw, METH_VARARGS | METH_KEYWORDS, NULL}, + {"destruct", (PyCFunction)py_lv_obj_destruct, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_ext_draw_size", (PyCFunction)py_lv_obj_get_ext_draw_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer_type", (PyCFunction)py_lv_obj_get_layer_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"allocate_spec_attr", (PyCFunction)py_lv_obj_allocate_spec_attr, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_child", (PyCFunction)py_lv_obj_add_child, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_child", (PyCFunction)py_lv_obj_remove_child, METH_VARARGS | METH_KEYWORDS, NULL}, + {"invalidate_expand_blur", (PyCFunction)py_lv_obj_invalidate_expand_blur, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_by_raw", (PyCFunction)py_lv_obj_scroll_by_raw, METH_VARARGS | METH_KEYWORDS, NULL}, {"style_init", (PyCFunction)py_lv_obj_style_init, METH_VARARGS | METH_KEYWORDS, NULL}, {"style_deinit", (PyCFunction)py_lv_obj_style_deinit, METH_VARARGS | METH_KEYWORDS, NULL}, {"style_create_transition", (PyCFunction)py_lv_obj_style_create_transition, METH_VARARGS | METH_KEYWORDS, NULL}, {"style_state_compare", (PyCFunction)py_lv_obj_style_state_compare, METH_VARARGS | METH_KEYWORDS, NULL}, {"update_layer_type", (PyCFunction)py_lv_obj_update_layer_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_by_raw", (PyCFunction)py_lv_obj_scroll_by_raw, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_ext_draw_size", (PyCFunction)py_lv_obj_get_ext_draw_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer_type", (PyCFunction)py_lv_obj_get_layer_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"destruct", (PyCFunction)py_lv_obj_destruct, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style_prop_internal", (PyCFunction)py_lv_obj_get_style_prop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"style_apply_color_filter_internal", (PyCFunction)py_lv_obj_style_apply_color_filter_internal, METH_VARARGS | METH_KEYWORDS, NULL}, + {"update_blur_status", (PyCFunction)py_lv_obj_update_blur_status, METH_VARARGS | METH_KEYWORDS, NULL}, + {"refr", (PyCFunction)py_lv_obj_refr, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_obj_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.obj", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_obj_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = NULL, - .tp_new = (newfunc)py_lv_obj_new, - .tp_methods = py_lv_obj_methods, - .tp_call = (ternaryfunc)py_lv_obj_call, +PyTypeObject py_lv_obj_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.obj", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_obj_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = NULL, + .tp_new = (newfunc)py_lv_obj_new, + .tp_methods = py_lv_obj_methods, + .tp_call = (ternaryfunc)py_lv_obj_call, +}; + +static py_lv_obj_type_t py_lv_obj_mapping = { + .lv_obj_class = &lv_obj_class, + .py_type = &py_lv_obj_type, +}; + + +/* + * lvgl extension definition for: + * void lv_image_buf_set_palette(lv_image_dsc_t *dsc, uint8_t id, lv_color32_t c) + */ +static PyObject *py_lv_image_buf_set_palette(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long id_val; PyObject *c_py; + if (!PyArg_ParseTuple(py_args, "lO", &id_val, &c_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *dsc = mp_to_lv(self); + uint8_t id = (uint8_t)id_val; + lv_color32_t c = mp_write_lv_color32_t(c_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_dsc_t *, uint8_t, lv_color32_t))lv_image_buf_set_palette)(dsc, id, c); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_buf_set_palette_def = { + "lv_image_buf_set_palette", + (PyCFunction)py_lv_image_buf_set_palette, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_buf_free(lv_image_dsc_t *dsc) + */ +static PyObject *py_lv_image_buf_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *dsc = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_dsc_t *))lv_image_buf_free)(dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_buf_free_def = { + "lv_image_buf_free", + (PyCFunction)py_lv_image_buf_free, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_result_t lv_image_decoder_get_info(const void *src, lv_image_header_t *header) + */ +static PyObject *py_lv_image_decoder_get_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *src_py; PyObject *header_py; + if (!PyArg_ParseTuple(py_args, "OO", &src_py, &header_py)) { PyGILState_Release(gstate); return NULL; } + const void *src = (const void *)mp_to_ptr(src_py); + lv_image_header_t *header = mp_write_ptr_lv_image_header_t(header_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(const void *, lv_image_header_t *))lv_image_decoder_get_info)(src, header); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_decoder_get_info_def = { + "lv_image_decoder_get_info", + (PyCFunction)py_lv_image_decoder_get_info, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_image_decoder_args_t (CPython) + */ + +extern PyMethodDef py_lv_image_decoder_args_t_methods[]; + +static PyObject *py_lv_image_decoder_args_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_decoder_args_t *data = (lv_image_decoder_args_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "stride_align") == 0) return convert_to_bool(data->stride_align); + if (strcmp(attr, "premultiply") == 0) return convert_to_bool(data->premultiply); + if (strcmp(attr, "no_cache") == 0) return convert_to_bool(data->no_cache); + if (strcmp(attr, "use_indexed") == 0) return convert_to_bool(data->use_indexed); + if (strcmp(attr, "flush_cache") == 0) return convert_to_bool(data->flush_cache); + for (PyMethodDef *m = py_lv_image_decoder_args_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_image_decoder_args_t_field_names[] = {"stride_align", "premultiply", "no_cache", "use_indexed", "flush_cache", NULL}; + +static PyObject *py_lv_image_decoder_args_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_image_decoder_args_t_field_names, py_lv_image_decoder_args_t_methods); +} + +static PyMethodDef py_lv_image_decoder_args_t_type_methods[] = { + {"__dir__", py_lv_image_decoder_args_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_image_decoder_args_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_decoder_args_t *data = (lv_image_decoder_args_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_image_decoder_args_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "stride_align") == 0) { data->stride_align = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "premultiply") == 0) { data->premultiply = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "no_cache") == 0) { data->no_cache = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "use_indexed") == 0) { data->use_indexed = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "flush_cache") == 0) { data->flush_cache = mp_obj_is_true(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_image_decoder_args_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_image_decoder_args_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_image_decoder_args_t)); +} + +static void py_lv_image_decoder_args_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_image_decoder_args_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_image_decoder_args_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_image_decoder_args_t_dealloc, + .tp_getattro = (getter)py_lv_image_decoder_args_t_getattro, + .tp_setattro = (setter)py_lv_image_decoder_args_t_setattro, + .tp_new = py_lv_image_decoder_args_t_new, + .tp_methods = py_lv_image_decoder_args_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_image_decoder_args_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_image_decoder_args_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_decoder_args_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_image_decoder_args_t*)self->data; +} + +static lv_image_decoder_args_t mp_write_scratch_lv_image_decoder_args_t; + +static inline void* mp_write_value_ptr_lv_image_decoder_args_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_decoder_args_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_image_decoder_args_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_decoder_args_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_image_decoder_args_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_image_decoder_args_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_decoder_args_t or dict, got None"); + } + memset(&mp_write_scratch_lv_image_decoder_args_t, 0, sizeof(lv_image_decoder_args_t)); + return &mp_write_scratch_lv_image_decoder_args_t; +} + +#define mp_write_lv_image_decoder_args_t(struct_obj) (*((lv_image_decoder_args_t*)mp_write_value_ptr_lv_image_decoder_args_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_image_decoder_args_t(void *field) +{ + return lv_to_mp_struct(&py_lv_image_decoder_args_t_type, field); +} + +#define mp_read_lv_image_decoder_args_t(field) lv_to_mp_struct_own(&py_lv_image_decoder_args_t_type, copy_buffer(&field, sizeof(lv_image_decoder_args_t))) +#define mp_read_byref_lv_image_decoder_args_t(field) mp_read_ptr_lv_image_decoder_args_t(&field) + + +/* + * lvgl extension definition for: + * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) + */ +static PyObject *py_lv_image_decoder_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *src_py; PyObject *args_py; + if (!PyArg_ParseTuple(py_args, "OO", &src_py, &args_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *dsc = mp_to_lv(self); + const void *src = (const void *)mp_to_ptr(src_py); + const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(args_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_image_decoder_open)(dsc, src, args); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_decoder_open_def = { + "lv_image_decoder_open", + (PyCFunction)py_lv_image_decoder_open, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + */ +static PyObject *py_lv_image_decoder_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *full_area_py; PyObject *decoded_area_py; + if (!PyArg_ParseTuple(py_args, "OO", &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *dsc = mp_to_lv(self); + const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); + lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_image_decoder_get_area)(dsc, full_area, decoded_area); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_decoder_get_area_def = { + "lv_image_decoder_get_area", + (PyCFunction)py_lv_image_decoder_get_area, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) + */ +static PyObject *py_lv_image_decoder_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *dsc = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_decoder_dsc_t *))lv_image_decoder_close)(dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_decoder_close_def = { + "lv_image_decoder_close", + (PyCFunction)py_lv_image_decoder_close, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + +#define funcptr_lv_image_decoder_info_f_t NULL + +static inline PyObject *mp_lv_funcptr_lv_image_decoder_info_f_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header); +#define funcptr_lv_image_decoder_open_f_t NULL + +static inline PyObject *mp_lv_funcptr_lv_image_decoder_open_f_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc); +#define funcptr_lv_image_decoder_get_area_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_image_decoder_get_area_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area); +#define funcptr_lv_image_decoder_close_f_t NULL + +static inline PyObject *mp_lv_funcptr_lv_image_decoder_close_f_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc); +#define funcptr_lv_image_decoder_custom_draw_t NULL + +static inline PyObject *mp_lv_funcptr_lv_image_decoder_custom_draw_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_image_decoder_t_custom_draw_cb' + * lv_image_decoder_custom_draw_t custom_draw_cb + */ + + +/* + * Struct lv_image_decoder_t (CPython) + */ + +extern PyMethodDef py_lv_image_decoder_t_methods[]; + +static PyObject *py_lv_image_decoder_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_decoder_t *data = (lv_image_decoder_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "info_cb") == 0) return mp_lv_funcptr(NULL, data->info_cb, lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", data->user_data); + if (strcmp(attr, "open_cb") == 0) return mp_lv_funcptr(NULL, data->open_cb, lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", data->user_data); + if (strcmp(attr, "get_area_cb") == 0) return mp_lv_funcptr(NULL, data->get_area_cb, lv_image_decoder_t_get_area_cb_callback, "lv_image_decoder_t_get_area_cb", data->user_data); + if (strcmp(attr, "close_cb") == 0) return mp_lv_funcptr(NULL, data->close_cb, lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", data->user_data); + if (strcmp(attr, "custom_draw_cb") == 0) return mp_lv_funcptr(NULL, data->custom_draw_cb, NULL, "lv_image_decoder_t_custom_draw_cb", NULL); + if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + for (PyMethodDef *m = py_lv_image_decoder_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_image_decoder_t_field_names[] = {"info_cb", "open_cb", "get_area_cb", "close_cb", "custom_draw_cb", "name", "user_data", NULL}; + +static PyObject *py_lv_image_decoder_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_image_decoder_t_field_names, py_lv_image_decoder_t_methods); +} + +static PyMethodDef py_lv_image_decoder_t_type_methods[] = { + {"__dir__", py_lv_image_decoder_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_image_decoder_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_decoder_t *data = (lv_image_decoder_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_image_decoder_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "info_cb") == 0) { data->info_cb = mp_lv_callback(value, lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "open_cb") == 0) { data->open_cb = mp_lv_callback(value, lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "get_area_cb") == 0) { data->get_area_cb = mp_lv_callback(value, lv_image_decoder_t_get_area_cb_callback, "lv_image_decoder_t_get_area_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "close_cb") == 0) { data->close_cb = mp_lv_callback(value, lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "custom_draw_cb") == 0) { data->custom_draw_cb = mp_lv_callback(value, NULL, "lv_image_decoder_t_custom_draw_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_image_decoder_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_image_decoder_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_image_decoder_t)); +} + +static void py_lv_image_decoder_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_image_decoder_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_image_decoder_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_image_decoder_t_dealloc, + .tp_getattro = (getter)py_lv_image_decoder_t_getattro, + .tp_setattro = (setter)py_lv_image_decoder_t_setattro, + .tp_new = py_lv_image_decoder_t_new, + .tp_methods = py_lv_image_decoder_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_image_decoder_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_image_decoder_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_decoder_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_image_decoder_t*)self->data; +} + +static lv_image_decoder_t mp_write_scratch_lv_image_decoder_t; + +static inline void* mp_write_value_ptr_lv_image_decoder_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_decoder_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_image_decoder_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_decoder_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_image_decoder_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_image_decoder_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_decoder_t or dict, got None"); + } + memset(&mp_write_scratch_lv_image_decoder_t, 0, sizeof(lv_image_decoder_t)); + return &mp_write_scratch_lv_image_decoder_t; +} + +#define mp_write_lv_image_decoder_t(struct_obj) (*((lv_image_decoder_t*)mp_write_value_ptr_lv_image_decoder_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_image_decoder_t(void *field) +{ + return lv_to_mp_struct(&py_lv_image_decoder_t_type, field); +} + +#define mp_read_lv_image_decoder_t(field) lv_to_mp_struct_own(&py_lv_image_decoder_t_type, copy_buffer(&field, sizeof(lv_image_decoder_t))) +#define mp_read_byref_lv_image_decoder_t(field) mp_read_ptr_lv_image_decoder_t(&field) + + +/* + * lvgl extension definition for: + * lv_image_decoder_t *lv_image_decoder_create(void) + */ +static PyObject *py_lv_image_decoder_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_image_decoder_t * _res; + lvpy_lock(); + _res = ((lv_image_decoder_t *(*)(void))lv_image_decoder_create)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_image_decoder_t((void*)_res); +} + +static PyMethodDef py_lv_image_decoder_create_def = { + "lv_image_decoder_create", + (PyCFunction)py_lv_image_decoder_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_decoder_delete(lv_image_decoder_t *decoder) + */ +static PyObject *py_lv_image_decoder_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *decoder = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_decoder_t *))lv_image_decoder_delete)(decoder); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_decoder_delete_def = { + "lv_image_decoder_delete", + (PyCFunction)py_lv_image_decoder_delete, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) + */ +static PyObject *py_lv_image_decoder_get_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *decoder = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_image_decoder_t * _res; + lvpy_lock(); + _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_image_decoder_get_next)(decoder); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_image_decoder_t((void*)_res); +} + +static PyMethodDef py_lv_image_decoder_get_next_def = { + "lv_image_decoder_get_next", + (PyCFunction)py_lv_image_decoder_get_next, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + +#define funcptr_ready_cb NULL + +static inline PyObject *mp_lv_funcptr_ready_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static bool lv_fs_drv_t_ready_cb_callback(lv_fs_drv_t *drv); +#define funcptr_remove_cb NULL + +static inline PyObject *mp_lv_funcptr_remove_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_fs_drv_t_remove_cb_callback(lv_fs_drv_t *drv); +#define funcptr_open_cb NULL + +static inline PyObject *mp_lv_funcptr_open_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void * lv_fs_drv_t_open_cb_callback(lv_fs_drv_t *drv, const char *path, lv_fs_mode_t mode); +#define funcptr_close_cb NULL + +static inline PyObject *mp_lv_funcptr_close_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_fs_res_t lv_fs_drv_t_close_cb_callback(lv_fs_drv_t *drv, void *file_p); +#define funcptr_read_cb NULL + +static inline PyObject *mp_lv_funcptr_read_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_fs_res_t lv_fs_drv_t_read_cb_callback(lv_fs_drv_t *drv, void *file_p, void *buf, uint32_t btr, uint32_t *br); +#define funcptr_write_cb NULL + +static inline PyObject *mp_lv_funcptr_write_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_fs_res_t lv_fs_drv_t_write_cb_callback(lv_fs_drv_t *drv, void *file_p, const void *buf, uint32_t btw, uint32_t *bw); +#define funcptr_seek_cb NULL + +static inline PyObject *mp_lv_funcptr_seek_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_fs_res_t lv_fs_drv_t_seek_cb_callback(lv_fs_drv_t *drv, void *file_p, uint32_t pos, lv_fs_whence_t whence); +#define funcptr_tell_cb NULL + +static inline PyObject *mp_lv_funcptr_tell_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_fs_res_t lv_fs_drv_t_tell_cb_callback(lv_fs_drv_t *drv, void *file_p, uint32_t *pos_p); +#define funcptr_dir_open_cb NULL + +static inline PyObject *mp_lv_funcptr_dir_open_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void * lv_fs_drv_t_dir_open_cb_callback(lv_fs_drv_t *drv, const char *path); +#define funcptr_dir_read_cb NULL + +static inline PyObject *mp_lv_funcptr_dir_read_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_fs_res_t lv_fs_drv_t_dir_read_cb_callback(lv_fs_drv_t *drv, void *rddir_p, char *fn, uint32_t fn_len); +#define funcptr_dir_close_cb NULL + +static inline PyObject *mp_lv_funcptr_dir_close_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_fs_res_t lv_fs_drv_t_dir_close_cb_callback(lv_fs_drv_t *drv, void *rddir_p); + +/* + * Struct lv_fs_drv_t (CPython) + */ + +extern PyMethodDef py_lv_fs_drv_t_methods[]; + +static PyObject *py_lv_fs_drv_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_drv_t *data = (lv_fs_drv_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "letter") == 0) return mp_obj_new_int(data->letter); + if (strcmp(attr, "cache_size") == 0) return mp_obj_new_int_from_uint(data->cache_size); + if (strcmp(attr, "ready_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->ready_cb, lv_fs_drv_t_ready_cb_callback, "lv_fs_drv_t_ready_cb", data->user_data); + if (strcmp(attr, "remove_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->remove_cb, lv_fs_drv_t_remove_cb_callback, "lv_fs_drv_t_remove_cb", data->user_data); + if (strcmp(attr, "open_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->open_cb, lv_fs_drv_t_open_cb_callback, "lv_fs_drv_t_open_cb", data->user_data); + if (strcmp(attr, "close_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->close_cb, lv_fs_drv_t_close_cb_callback, "lv_fs_drv_t_close_cb", data->user_data); + if (strcmp(attr, "read_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->read_cb, lv_fs_drv_t_read_cb_callback, "lv_fs_drv_t_read_cb", data->user_data); + if (strcmp(attr, "write_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->write_cb, lv_fs_drv_t_write_cb_callback, "lv_fs_drv_t_write_cb", data->user_data); + if (strcmp(attr, "seek_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->seek_cb, lv_fs_drv_t_seek_cb_callback, "lv_fs_drv_t_seek_cb", data->user_data); + if (strcmp(attr, "tell_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->tell_cb, lv_fs_drv_t_tell_cb_callback, "lv_fs_drv_t_tell_cb", data->user_data); + if (strcmp(attr, "dir_open_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dir_open_cb, lv_fs_drv_t_dir_open_cb_callback, "lv_fs_drv_t_dir_open_cb", data->user_data); + if (strcmp(attr, "dir_read_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dir_read_cb, lv_fs_drv_t_dir_read_cb_callback, "lv_fs_drv_t_dir_read_cb", data->user_data); + if (strcmp(attr, "dir_close_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dir_close_cb, lv_fs_drv_t_dir_close_cb_callback, "lv_fs_drv_t_dir_close_cb", data->user_data); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + for (PyMethodDef *m = py_lv_fs_drv_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_fs_drv_t_field_names[] = {"letter", "cache_size", "ready_cb", "remove_cb", "open_cb", "close_cb", "read_cb", "write_cb", "seek_cb", "tell_cb", "dir_open_cb", "dir_read_cb", "dir_close_cb", "user_data", NULL}; + +static PyObject *py_lv_fs_drv_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_fs_drv_t_field_names, py_lv_fs_drv_t_methods); +} + +static PyMethodDef py_lv_fs_drv_t_type_methods[] = { + {"__dir__", py_lv_fs_drv_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_fs_drv_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_drv_t *data = (lv_fs_drv_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_fs_drv_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "letter") == 0) { data->letter = (char)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "cache_size") == 0) { data->cache_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ready_cb") == 0) { data->ready_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_ready_cb_callback, "lv_fs_drv_t_ready_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "remove_cb") == 0) { data->remove_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_remove_cb_callback, "lv_fs_drv_t_remove_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "open_cb") == 0) { data->open_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_open_cb_callback, "lv_fs_drv_t_open_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "close_cb") == 0) { data->close_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_close_cb_callback, "lv_fs_drv_t_close_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "read_cb") == 0) { data->read_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_read_cb_callback, "lv_fs_drv_t_read_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "write_cb") == 0) { data->write_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_write_cb_callback, "lv_fs_drv_t_write_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "seek_cb") == 0) { data->seek_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_seek_cb_callback, "lv_fs_drv_t_seek_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "tell_cb") == 0) { data->tell_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_tell_cb_callback, "lv_fs_drv_t_tell_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "dir_open_cb") == 0) { data->dir_open_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_dir_open_cb_callback, "lv_fs_drv_t_dir_open_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "dir_read_cb") == 0) { data->dir_read_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_dir_read_cb_callback, "lv_fs_drv_t_dir_read_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "dir_close_cb") == 0) { data->dir_close_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_dir_close_cb_callback, "lv_fs_drv_t_dir_close_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_fs_drv_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_fs_drv_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_drv_t)); +} + +static void py_lv_fs_drv_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_fs_drv_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_fs_drv_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_fs_drv_t_dealloc, + .tp_getattro = (getter)py_lv_fs_drv_t_getattro, + .tp_setattro = (setter)py_lv_fs_drv_t_setattro, + .tp_new = py_lv_fs_drv_t_new, + .tp_methods = py_lv_fs_drv_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_fs_drv_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_fs_drv_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_drv_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_fs_drv_t*)self->data; +} + +static lv_fs_drv_t mp_write_scratch_lv_fs_drv_t; + +static inline void* mp_write_value_ptr_lv_fs_drv_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_drv_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_fs_drv_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_drv_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_fs_drv_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_fs_drv_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_drv_t or dict, got None"); + } + memset(&mp_write_scratch_lv_fs_drv_t, 0, sizeof(lv_fs_drv_t)); + return &mp_write_scratch_lv_fs_drv_t; +} + +#define mp_write_lv_fs_drv_t(struct_obj) (*((lv_fs_drv_t*)mp_write_value_ptr_lv_fs_drv_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_fs_drv_t(void *field) +{ + return lv_to_mp_struct(&py_lv_fs_drv_t_type, field); +} + +#define mp_read_lv_fs_drv_t(field) lv_to_mp_struct_own(&py_lv_fs_drv_t_type, copy_buffer(&field, sizeof(lv_fs_drv_t))) +#define mp_read_byref_lv_fs_drv_t(field) mp_read_ptr_lv_fs_drv_t(&field) + + +/* + * Struct lv_fs_file_cache_t (CPython) + */ + +extern PyMethodDef py_lv_fs_file_cache_t_methods[]; + +static PyObject *py_lv_fs_file_cache_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_file_cache_t *data = (lv_fs_file_cache_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "start") == 0) return mp_obj_new_int_from_uint(data->start); + if (strcmp(attr, "end") == 0) return mp_obj_new_int_from_uint(data->end); + if (strcmp(attr, "file_position") == 0) return mp_obj_new_int_from_uint(data->file_position); + if (strcmp(attr, "buffer") == 0) return ptr_to_mp((void*)data->buffer); + for (PyMethodDef *m = py_lv_fs_file_cache_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_fs_file_cache_t_field_names[] = {"start", "end", "file_position", "buffer", NULL}; + +static PyObject *py_lv_fs_file_cache_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_fs_file_cache_t_field_names, py_lv_fs_file_cache_t_methods); +} + +static PyMethodDef py_lv_fs_file_cache_t_type_methods[] = { + {"__dir__", py_lv_fs_file_cache_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_fs_file_cache_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_file_cache_t *data = (lv_fs_file_cache_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_fs_file_cache_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "start") == 0) { data->start = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "end") == 0) { data->end = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "file_position") == 0) { data->file_position = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "buffer") == 0) { data->buffer = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_fs_file_cache_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_fs_file_cache_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_file_cache_t)); +} + +static void py_lv_fs_file_cache_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_fs_file_cache_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_fs_file_cache_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_fs_file_cache_t_dealloc, + .tp_getattro = (getter)py_lv_fs_file_cache_t_getattro, + .tp_setattro = (setter)py_lv_fs_file_cache_t_setattro, + .tp_new = py_lv_fs_file_cache_t_new, + .tp_methods = py_lv_fs_file_cache_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_fs_file_cache_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_fs_file_cache_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_file_cache_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_fs_file_cache_t*)self->data; +} + +static lv_fs_file_cache_t mp_write_scratch_lv_fs_file_cache_t; + +static inline void* mp_write_value_ptr_lv_fs_file_cache_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_file_cache_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_fs_file_cache_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_file_cache_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_fs_file_cache_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_fs_file_cache_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_file_cache_t or dict, got None"); + } + memset(&mp_write_scratch_lv_fs_file_cache_t, 0, sizeof(lv_fs_file_cache_t)); + return &mp_write_scratch_lv_fs_file_cache_t; +} + +#define mp_write_lv_fs_file_cache_t(struct_obj) (*((lv_fs_file_cache_t*)mp_write_value_ptr_lv_fs_file_cache_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_fs_file_cache_t(void *field) +{ + return lv_to_mp_struct(&py_lv_fs_file_cache_t_type, field); +} + +#define mp_read_lv_fs_file_cache_t(field) lv_to_mp_struct_own(&py_lv_fs_file_cache_t_type, copy_buffer(&field, sizeof(lv_fs_file_cache_t))) +#define mp_read_byref_lv_fs_file_cache_t(field) mp_read_ptr_lv_fs_file_cache_t(&field) + + +/* + * Struct lv_fs_file_t (CPython) + */ + +extern PyMethodDef py_lv_fs_file_t_methods[]; + +static PyObject *py_lv_fs_file_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_file_t *data = (lv_fs_file_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "file_d") == 0) return ptr_to_mp((void*)data->file_d); + if (strcmp(attr, "drv") == 0) return mp_read_ptr_lv_fs_drv_t((void*)data->drv); + if (strcmp(attr, "cache") == 0) return mp_read_ptr_lv_fs_file_cache_t((void*)data->cache); + for (PyMethodDef *m = py_lv_fs_file_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_fs_file_t_field_names[] = {"file_d", "drv", "cache", NULL}; + +static PyObject *py_lv_fs_file_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_fs_file_t_field_names, py_lv_fs_file_t_methods); +} + +static PyMethodDef py_lv_fs_file_t_type_methods[] = { + {"__dir__", py_lv_fs_file_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_fs_file_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_file_t *data = (lv_fs_file_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_fs_file_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "file_d") == 0) { data->file_d = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "drv") == 0) { data->drv = (void*)mp_write_ptr_lv_fs_drv_t(value); result = 0; } + if (strcmp(attr, "cache") == 0) { data->cache = (void*)mp_write_ptr_lv_fs_file_cache_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_fs_file_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_fs_file_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_file_t)); +} + +static void py_lv_fs_file_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_fs_file_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_fs_file_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_fs_file_t_dealloc, + .tp_getattro = (getter)py_lv_fs_file_t_getattro, + .tp_setattro = (setter)py_lv_fs_file_t_setattro, + .tp_new = py_lv_fs_file_t_new, + .tp_methods = py_lv_fs_file_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_fs_file_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_fs_file_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_file_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_fs_file_t*)self->data; +} + +static lv_fs_file_t mp_write_scratch_lv_fs_file_t; + +static inline void* mp_write_value_ptr_lv_fs_file_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_file_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_fs_file_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_file_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_fs_file_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_fs_file_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_file_t or dict, got None"); + } + memset(&mp_write_scratch_lv_fs_file_t, 0, sizeof(lv_fs_file_t)); + return &mp_write_scratch_lv_fs_file_t; +} + +#define mp_write_lv_fs_file_t(struct_obj) (*((lv_fs_file_t*)mp_write_value_ptr_lv_fs_file_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_fs_file_t(void *field) +{ + return lv_to_mp_struct(&py_lv_fs_file_t_type, field); +} + +#define mp_read_lv_fs_file_t(field) lv_to_mp_struct_own(&py_lv_fs_file_t_type, copy_buffer(&field, sizeof(lv_fs_file_t))) +#define mp_read_byref_lv_fs_file_t(field) mp_read_ptr_lv_fs_file_t(&field) + +#define funcptr_lv_cache_alloc_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_alloc_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_alloc_cb' + * lv_cache_alloc_cb_t alloc_cb + */ + +#define funcptr_lv_cache_init_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_init_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_init_cb' + * lv_cache_init_cb_t init_cb + */ + +#define funcptr_lv_cache_destroy_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_destroy_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_destroy_cb' + * lv_cache_destroy_cb_t destroy_cb + */ + +#define funcptr_lv_cache_get_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_get_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_get_cb' + * lv_cache_get_cb_t get_cb + */ + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_add_cb' + * lv_cache_add_cb_t add_cb + */ + +#define funcptr_lv_cache_remove_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_remove_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_remove_cb' + * lv_cache_remove_cb_t remove_cb + */ + +#define funcptr_lv_cache_drop_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_drop_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_drop_cb' + * lv_cache_drop_cb_t drop_cb + */ + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_drop_all_cb' + * lv_cache_drop_all_cb_t drop_all_cb + */ + +#define funcptr_lv_cache_get_victim_cb NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_get_victim_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_get_victim_cb' + * lv_cache_get_victim_cb get_victim_cb + */ + +#define funcptr_lv_cache_reserve_cond_cb NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_reserve_cond_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_reserve_cond_cb' + * lv_cache_reserve_cond_cb reserve_cond_cb + */ + +#define funcptr_lv_cache_iter_create_cb NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_iter_create_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_class_t_iter_create_cb' + * lv_cache_iter_create_cb iter_create_cb + */ + + +/* + * Struct lv_cache_class_t (CPython) + */ + +extern PyMethodDef py_lv_cache_class_t_methods[]; + +static PyObject *py_lv_cache_class_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_class_t *data = (lv_cache_class_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "alloc_cb") == 0) return mp_lv_funcptr(NULL, data->alloc_cb, NULL, "lv_cache_class_t_alloc_cb", NULL); + if (strcmp(attr, "init_cb") == 0) return mp_lv_funcptr(NULL, data->init_cb, NULL, "lv_cache_class_t_init_cb", NULL); + if (strcmp(attr, "destroy_cb") == 0) return mp_lv_funcptr(NULL, data->destroy_cb, NULL, "lv_cache_class_t_destroy_cb", NULL); + if (strcmp(attr, "get_cb") == 0) return mp_lv_funcptr(NULL, data->get_cb, NULL, "lv_cache_class_t_get_cb", NULL); + if (strcmp(attr, "add_cb") == 0) return mp_lv_funcptr(NULL, data->add_cb, NULL, "lv_cache_class_t_add_cb", NULL); + if (strcmp(attr, "remove_cb") == 0) return mp_lv_funcptr(NULL, data->remove_cb, NULL, "lv_cache_class_t_remove_cb", NULL); + if (strcmp(attr, "drop_cb") == 0) return mp_lv_funcptr(NULL, data->drop_cb, NULL, "lv_cache_class_t_drop_cb", NULL); + if (strcmp(attr, "drop_all_cb") == 0) return mp_lv_funcptr(NULL, data->drop_all_cb, NULL, "lv_cache_class_t_drop_all_cb", NULL); + if (strcmp(attr, "get_victim_cb") == 0) return mp_lv_funcptr(NULL, data->get_victim_cb, NULL, "lv_cache_class_t_get_victim_cb", NULL); + if (strcmp(attr, "reserve_cond_cb") == 0) return mp_lv_funcptr(NULL, data->reserve_cond_cb, NULL, "lv_cache_class_t_reserve_cond_cb", NULL); + if (strcmp(attr, "iter_create_cb") == 0) return mp_lv_funcptr(NULL, data->iter_create_cb, NULL, "lv_cache_class_t_iter_create_cb", NULL); + for (PyMethodDef *m = py_lv_cache_class_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_cache_class_t_field_names[] = {"alloc_cb", "init_cb", "destroy_cb", "get_cb", "add_cb", "remove_cb", "drop_cb", "drop_all_cb", "get_victim_cb", "reserve_cond_cb", "iter_create_cb", NULL}; + +static PyObject *py_lv_cache_class_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_cache_class_t_field_names, py_lv_cache_class_t_methods); +} + +static PyMethodDef py_lv_cache_class_t_type_methods[] = { + {"__dir__", py_lv_cache_class_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_cache_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_class_t *data = (lv_cache_class_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_cache_class_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "alloc_cb") == 0) { data->alloc_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_alloc_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "init_cb") == 0) { data->init_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_init_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "destroy_cb") == 0) { data->destroy_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_destroy_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "get_cb") == 0) { data->get_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_get_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "add_cb") == 0) { data->add_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_add_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "remove_cb") == 0) { data->remove_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_remove_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "drop_cb") == 0) { data->drop_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_drop_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "drop_all_cb") == 0) { data->drop_all_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_drop_all_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "get_victim_cb") == 0) { data->get_victim_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_get_victim_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "reserve_cond_cb") == 0) { data->reserve_cond_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_reserve_cond_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "iter_create_cb") == 0) { data->iter_create_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_iter_create_cb", NULL, NULL, NULL, NULL); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_cache_class_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_cache_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_class_t)); +} + +static void py_lv_cache_class_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_cache_class_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_cache_class_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_cache_class_t_dealloc, + .tp_getattro = (getter)py_lv_cache_class_t_getattro, + .tp_setattro = (setter)py_lv_cache_class_t_setattro, + .tp_new = py_lv_cache_class_t_new, + .tp_methods = py_lv_cache_class_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_cache_class_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_cache_class_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_class_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_cache_class_t*)self->data; +} + +static lv_cache_class_t mp_write_scratch_lv_cache_class_t; + +static inline void* mp_write_value_ptr_lv_cache_class_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_class_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_cache_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_class_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_cache_class_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_cache_class_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_class_t or dict, got None"); + } + memset(&mp_write_scratch_lv_cache_class_t, 0, sizeof(lv_cache_class_t)); + return &mp_write_scratch_lv_cache_class_t; +} + +#define mp_write_lv_cache_class_t(struct_obj) (*((lv_cache_class_t*)mp_write_value_ptr_lv_cache_class_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_cache_class_t(void *field) +{ + return lv_to_mp_struct(&py_lv_cache_class_t_type, field); +} + +#define mp_read_lv_cache_class_t(field) lv_to_mp_struct_own(&py_lv_cache_class_t_type, copy_buffer(&field, sizeof(lv_cache_class_t))) +#define mp_read_byref_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(&field) + +#define funcptr_lv_cache_compare_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_compare_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_ops_t_compare_cb' + * lv_cache_compare_cb_t compare_cb + */ + +#define funcptr_lv_cache_create_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_create_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_ops_t_create_cb' + * lv_cache_create_cb_t create_cb + */ + +#define funcptr_lv_cache_free_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_cache_free_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_cache_ops_t_free_cb' + * lv_cache_free_cb_t free_cb + */ + + +/* + * Struct lv_cache_ops_t (CPython) + */ + +extern PyMethodDef py_lv_cache_ops_t_methods[]; + +static PyObject *py_lv_cache_ops_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_ops_t *data = (lv_cache_ops_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "compare_cb") == 0) return mp_lv_funcptr(NULL, data->compare_cb, NULL, "lv_cache_ops_t_compare_cb", NULL); + if (strcmp(attr, "create_cb") == 0) return mp_lv_funcptr(NULL, data->create_cb, NULL, "lv_cache_ops_t_create_cb", NULL); + if (strcmp(attr, "free_cb") == 0) return mp_lv_funcptr(NULL, data->free_cb, NULL, "lv_cache_ops_t_free_cb", NULL); + for (PyMethodDef *m = py_lv_cache_ops_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_cache_ops_t_field_names[] = {"compare_cb", "create_cb", "free_cb", NULL}; + +static PyObject *py_lv_cache_ops_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_cache_ops_t_field_names, py_lv_cache_ops_t_methods); +} + +static PyMethodDef py_lv_cache_ops_t_type_methods[] = { + {"__dir__", py_lv_cache_ops_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_cache_ops_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_ops_t *data = (lv_cache_ops_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_cache_ops_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "compare_cb") == 0) { data->compare_cb = mp_lv_callback(value, NULL, "lv_cache_ops_t_compare_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "create_cb") == 0) { data->create_cb = mp_lv_callback(value, NULL, "lv_cache_ops_t_create_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "free_cb") == 0) { data->free_cb = mp_lv_callback(value, NULL, "lv_cache_ops_t_free_cb", NULL, NULL, NULL, NULL); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_cache_ops_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_cache_ops_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_ops_t)); +} + +static void py_lv_cache_ops_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_cache_ops_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_cache_ops_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_cache_ops_t_dealloc, + .tp_getattro = (getter)py_lv_cache_ops_t_getattro, + .tp_setattro = (setter)py_lv_cache_ops_t_setattro, + .tp_new = py_lv_cache_ops_t_new, + .tp_methods = py_lv_cache_ops_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_cache_ops_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_cache_ops_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_ops_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_cache_ops_t*)self->data; +} + +static lv_cache_ops_t mp_write_scratch_lv_cache_ops_t; + +static inline void* mp_write_value_ptr_lv_cache_ops_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_ops_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_cache_ops_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_ops_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_cache_ops_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_cache_ops_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_ops_t or dict, got None"); + } + memset(&mp_write_scratch_lv_cache_ops_t, 0, sizeof(lv_cache_ops_t)); + return &mp_write_scratch_lv_cache_ops_t; +} + +#define mp_write_lv_cache_ops_t(struct_obj) (*((lv_cache_ops_t*)mp_write_value_ptr_lv_cache_ops_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_cache_ops_t(void *field) +{ + return lv_to_mp_struct(&py_lv_cache_ops_t_type, field); +} + +#define mp_read_lv_cache_ops_t(field) lv_to_mp_struct_own(&py_lv_cache_ops_t_type, copy_buffer(&field, sizeof(lv_cache_ops_t))) +#define mp_read_byref_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(&field) + + +/* + * Struct lv_cache_t (CPython) + */ + +extern PyMethodDef py_lv_cache_t_methods[]; + +static PyObject *py_lv_cache_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_t *data = (lv_cache_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "clz") == 0) return mp_read_ptr_lv_cache_class_t((void*)data->clz); + if (strcmp(attr, "node_size") == 0) return mp_obj_new_int_from_uint(data->node_size); + if (strcmp(attr, "max_size") == 0) return mp_obj_new_int_from_uint(data->max_size); + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + if (strcmp(attr, "ops") == 0) return mp_read_byref_lv_cache_ops_t(data->ops); + if (strcmp(attr, "lock") == 0) return mp_obj_new_int(data->lock); + if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); + for (PyMethodDef *m = py_lv_cache_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_cache_t_field_names[] = {"clz", "node_size", "max_size", "size", "ops", "lock", "name", NULL}; + +static PyObject *py_lv_cache_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_cache_t_field_names, py_lv_cache_t_methods); +} + +static PyMethodDef py_lv_cache_t_type_methods[] = { + {"__dir__", py_lv_cache_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_cache_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_t *data = (lv_cache_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_cache_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "clz") == 0) { data->clz = (void*)mp_write_ptr_lv_cache_class_t(value); result = 0; } + if (strcmp(attr, "node_size") == 0) { data->node_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "max_size") == 0) { data->max_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ops") == 0) { data->ops = mp_write_lv_cache_ops_t(value); result = 0; } + if (strcmp(attr, "lock") == 0) { data->lock = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_cache_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_cache_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_t)); +} + +static void py_lv_cache_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_cache_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_cache_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_cache_t_dealloc, + .tp_getattro = (getter)py_lv_cache_t_getattro, + .tp_setattro = (setter)py_lv_cache_t_setattro, + .tp_new = py_lv_cache_t_new, + .tp_methods = py_lv_cache_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_cache_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_cache_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_cache_t*)self->data; +} + +static lv_cache_t mp_write_scratch_lv_cache_t; + +static inline void* mp_write_value_ptr_lv_cache_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_cache_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_cache_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_cache_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_t or dict, got None"); + } + memset(&mp_write_scratch_lv_cache_t, 0, sizeof(lv_cache_t)); + return &mp_write_scratch_lv_cache_t; +} + +#define mp_write_lv_cache_t(struct_obj) (*((lv_cache_t*)mp_write_value_ptr_lv_cache_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_cache_t(void *field) +{ + return lv_to_mp_struct(&py_lv_cache_t_type, field); +} + +#define mp_read_lv_cache_t(field) lv_to_mp_struct_own(&py_lv_cache_t_type, copy_buffer(&field, sizeof(lv_cache_t))) +#define mp_read_byref_lv_cache_t(field) mp_read_ptr_lv_cache_t(&field) + + +/* + * Struct lv_cache_entry_t (CPython) + */ + +extern PyMethodDef py_lv_cache_entry_t_methods[]; + +static PyObject *py_lv_cache_entry_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_entry_t *data = (lv_cache_entry_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "cache") == 0) return mp_read_ptr_lv_cache_t((void*)data->cache); + if (strcmp(attr, "ref_cnt") == 0) return mp_obj_new_int(data->ref_cnt); + if (strcmp(attr, "node_size") == 0) return mp_obj_new_int_from_uint(data->node_size); + if (strcmp(attr, "flags") == 0) return mp_obj_new_int_from_uint(data->flags); + for (PyMethodDef *m = py_lv_cache_entry_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_cache_entry_t_field_names[] = {"cache", "ref_cnt", "node_size", "flags", NULL}; + +static PyObject *py_lv_cache_entry_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_cache_entry_t_field_names, py_lv_cache_entry_t_methods); +} + +static PyMethodDef py_lv_cache_entry_t_type_methods[] = { + {"__dir__", py_lv_cache_entry_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_cache_entry_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_cache_entry_t *data = (lv_cache_entry_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_cache_entry_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "cache") == 0) { data->cache = (void*)mp_write_ptr_lv_cache_t(value); result = 0; } + if (strcmp(attr, "ref_cnt") == 0) { data->ref_cnt = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "node_size") == 0) { data->node_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "flags") == 0) { data->flags = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_cache_entry_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_cache_entry_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_entry_t)); +} + +static void py_lv_cache_entry_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_cache_entry_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_cache_entry_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_cache_entry_t_dealloc, + .tp_getattro = (getter)py_lv_cache_entry_t_getattro, + .tp_setattro = (setter)py_lv_cache_entry_t_setattro, + .tp_new = py_lv_cache_entry_t_new, + .tp_methods = py_lv_cache_entry_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_cache_entry_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_cache_entry_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_entry_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_cache_entry_t*)self->data; +} + +static lv_cache_entry_t mp_write_scratch_lv_cache_entry_t; + +static inline void* mp_write_value_ptr_lv_cache_entry_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_entry_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_cache_entry_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_entry_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_cache_entry_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_cache_entry_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_entry_t or dict, got None"); + } + memset(&mp_write_scratch_lv_cache_entry_t, 0, sizeof(lv_cache_entry_t)); + return &mp_write_scratch_lv_cache_entry_t; +} + +#define mp_write_lv_cache_entry_t(struct_obj) (*((lv_cache_entry_t*)mp_write_value_ptr_lv_cache_entry_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_cache_entry_t(void *field) +{ + return lv_to_mp_struct(&py_lv_cache_entry_t_type, field); +} + +#define mp_read_lv_cache_entry_t(field) lv_to_mp_struct_own(&py_lv_cache_entry_t_type, copy_buffer(&field, sizeof(lv_cache_entry_t))) +#define mp_read_byref_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(&field) + + +/* + * Struct lv_image_decoder_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_image_decoder_dsc_t_methods[]; + +static PyObject *py_lv_image_decoder_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "decoder") == 0) return mp_read_ptr_lv_image_decoder_t((void*)data->decoder); + if (strcmp(attr, "args") == 0) return mp_read_byref_lv_image_decoder_args_t(data->args); + if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); + if (strcmp(attr, "src_type") == 0) return mp_obj_new_int(data->src_type); + if (strcmp(attr, "file") == 0) return mp_read_byref_lv_fs_file_t(data->file); + if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); + if (strcmp(attr, "decoded") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->decoded); + if (strcmp(attr, "palette") == 0) return mp_read_ptr_lv_color32_t((void*)data->palette); + if (strcmp(attr, "palette_size") == 0) return mp_obj_new_int_from_uint(data->palette_size); + if (strcmp(attr, "time_to_open") == 0) return mp_obj_new_int_from_uint(data->time_to_open); + if (strcmp(attr, "error_msg") == 0) return convert_to_str((void*)data->error_msg); + if (strcmp(attr, "cache") == 0) return mp_read_ptr_lv_cache_t((void*)data->cache); + if (strcmp(attr, "cache_entry") == 0) return mp_read_ptr_lv_cache_entry_t((void*)data->cache_entry); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + for (PyMethodDef *m = py_lv_image_decoder_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_image_decoder_dsc_t_field_names[] = {"decoder", "args", "src", "src_type", "file", "header", "decoded", "palette", "palette_size", "time_to_open", "error_msg", "cache", "cache_entry", "user_data", NULL}; + +static PyObject *py_lv_image_decoder_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_image_decoder_dsc_t_field_names, py_lv_image_decoder_dsc_t_methods); +} + +static PyMethodDef py_lv_image_decoder_dsc_t_type_methods[] = { + {"__dir__", py_lv_image_decoder_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_image_decoder_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_image_decoder_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "decoder") == 0) { data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(value); result = 0; } + if (strcmp(attr, "args") == 0) { data->args = mp_write_lv_image_decoder_args_t(value); result = 0; } + if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "src_type") == 0) { data->src_type = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "file") == 0) { data->file = mp_write_lv_fs_file_t(value); result = 0; } + if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } + if (strcmp(attr, "decoded") == 0) { data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "palette") == 0) { data->palette = (void*)mp_write_ptr_lv_color32_t(value); result = 0; } + if (strcmp(attr, "palette_size") == 0) { data->palette_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "time_to_open") == 0) { data->time_to_open = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "error_msg") == 0) { data->error_msg = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "cache") == 0) { data->cache = (void*)mp_write_ptr_lv_cache_t(value); result = 0; } + if (strcmp(attr, "cache_entry") == 0) { data->cache_entry = (void*)mp_write_ptr_lv_cache_entry_t(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_image_decoder_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_image_decoder_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_image_decoder_dsc_t)); +} + +static void py_lv_image_decoder_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_image_decoder_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_image_decoder_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_image_decoder_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_image_decoder_dsc_t_getattro, + .tp_setattro = (setter)py_lv_image_decoder_dsc_t_setattro, + .tp_new = py_lv_image_decoder_dsc_t_new, + .tp_methods = py_lv_image_decoder_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_image_decoder_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_image_decoder_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_decoder_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_image_decoder_dsc_t*)self->data; +} + +static lv_image_decoder_dsc_t mp_write_scratch_lv_image_decoder_dsc_t; + +static inline void* mp_write_value_ptr_lv_image_decoder_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_decoder_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_image_decoder_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_decoder_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_image_decoder_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_image_decoder_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_decoder_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_image_decoder_dsc_t, 0, sizeof(lv_image_decoder_dsc_t)); + return &mp_write_scratch_lv_image_decoder_dsc_t; +} + +#define mp_write_lv_image_decoder_dsc_t(struct_obj) (*((lv_image_decoder_dsc_t*)mp_write_value_ptr_lv_image_decoder_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_image_decoder_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_image_decoder_dsc_t_type, field); +} + +#define mp_read_lv_image_decoder_dsc_t(field) lv_to_mp_struct_own(&py_lv_image_decoder_dsc_t_type, copy_buffer(&field, sizeof(lv_image_decoder_dsc_t))) +#define mp_read_byref_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(&field) + + +/* + * Callback function lv_image_decoder_t_info_cb (CPython) + * lv_result_t lv_image_decoder_info_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) + */ +static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, lv_image_header_t *arg2) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (lv_result_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_info_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_result_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + PyObject *py_arg2 = mp_read_ptr_lv_image_header_t((void*)arg2); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_result_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_result_t){0}; } + lv_result_t _c_res = (int)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * lvgl extension definition for: + * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) + */ +static PyObject *py_lv_image_decoder_set_info_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *info_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &info_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *decoder = mp_to_lv(self); + void *info_cb = mp_lv_callback(info_cb_py, &lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", &decoder->user_data, decoder, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_image_decoder_set_info_cb)(decoder, info_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_decoder_set_info_cb_def = { + "lv_image_decoder_set_info_cb", + (PyCFunction)py_lv_image_decoder_set_info_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_image_decoder_t_open_cb (CPython) + * lv_result_t lv_image_decoder_open_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + */ +static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (lv_result_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_open_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_result_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_result_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_result_t){0}; } + lv_result_t _c_res = (int)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * lvgl extension definition for: + * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) + */ +static PyObject *py_lv_image_decoder_set_open_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *open_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &open_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *decoder = mp_to_lv(self); + void *open_cb = mp_lv_callback(open_cb_py, &lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", &decoder->user_data, decoder, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_image_decoder_set_open_cb)(decoder, open_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_decoder_set_open_cb_def = { + "lv_image_decoder_set_open_cb", + (PyCFunction)py_lv_image_decoder_set_open_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_image_decoder_t_get_area_cb (CPython) + * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + */ +static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (lv_result_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_get_area_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_result_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + PyObject *py_arg2 = mp_read_ptr_lv_area_t((void*)arg2); + PyObject *py_arg3 = mp_read_ptr_lv_area_t((void*)arg3); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3) ? PyTuple_Pack(4, py_arg0, py_arg1, py_arg2, py_arg3) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + Py_XDECREF(py_arg3); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_result_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_result_t){0}; } + lv_result_t _c_res = (int)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * lvgl extension definition for: + * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t get_area_cb) + */ +static PyObject *py_lv_image_decoder_set_get_area_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *get_area_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &get_area_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *decoder = mp_to_lv(self); + void *get_area_cb = mp_lv_callback(get_area_cb_py, &lv_image_decoder_t_get_area_cb_callback, "lv_image_decoder_t_get_area_cb", &decoder->user_data, decoder, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_image_decoder_set_get_area_cb)(decoder, get_area_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_decoder_set_get_area_cb_def = { + "lv_image_decoder_set_get_area_cb", + (PyCFunction)py_lv_image_decoder_set_get_area_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_image_decoder_t_close_cb (CPython) + * void lv_image_decoder_close_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + */ +static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_close_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) + */ +static PyObject *py_lv_image_decoder_set_close_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *close_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &close_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *decoder = mp_to_lv(self); + void *close_cb = mp_lv_callback(close_cb_py, &lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", &decoder->user_data, decoder, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_image_decoder_set_close_cb)(decoder, close_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_decoder_set_close_cb_def = { + "lv_image_decoder_set_close_cb", + (PyCFunction)py_lv_image_decoder_set_close_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) + */ +static PyObject *py_lv_image_decoder_post_process(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *decoded_py; + if (!PyArg_ParseTuple(py_args, "O", &decoded_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *dsc = mp_to_lv(self); + lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(decoded_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_draw_buf_t * _res; + lvpy_lock(); + _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_image_decoder_post_process)(dsc, decoded); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_draw_buf_t((void*)_res); +} + +static PyMethodDef py_lv_image_decoder_post_process_def = { + "lv_image_decoder_post_process", + (PyCFunction)py_lv_image_decoder_post_process, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_cache_drop(const void *src) + */ +static PyObject *py_lv_image_cache_drop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + const void *src = (const void *)mp_to_ptr(src_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(const void *))lv_image_cache_drop)(src); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_cache_drop_def = { + "lv_image_cache_drop", + (PyCFunction)py_lv_image_cache_drop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_image_src_t lv_image_src_get_type(const void *src) + */ +static PyObject *py_lv_image_src_get_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + const void *src = (const void *)mp_to_ptr(src_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_image_src_t _res; + lvpy_lock(); + _res = ((lv_image_src_t (*)(const void *))lv_image_src_get_type)(src); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_src_get_type_def = { + "lv_image_src_get_type", + (PyCFunction)py_lv_image_src_get_type, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_src(lv_obj_t *obj, const void *src) + */ +static PyObject *py_lv_image_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const void *src = (const void *)mp_to_ptr(src_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const void *))lv_image_set_src)(obj, src); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_src_def = { + "lv_image_set_src", + (PyCFunction)py_lv_image_set_src, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_offset_x(lv_obj_t *obj, int32_t x) + */ +static PyObject *py_lv_image_set_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t x = (int32_t)x_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_image_set_offset_x)(obj, x); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_offset_x_def = { + "lv_image_set_offset_x", + (PyCFunction)py_lv_image_set_offset_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_offset_y(lv_obj_t *obj, int32_t y) + */ +static PyObject *py_lv_image_set_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long y_val; + if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t y = (int32_t)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_image_set_offset_y)(obj, y); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_offset_y_def = { + "lv_image_set_offset_y", + (PyCFunction)py_lv_image_set_offset_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_rotation(lv_obj_t *obj, int32_t angle) + */ +static PyObject *py_lv_image_set_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long angle_val; + if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t angle = (int32_t)angle_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_image_set_rotation)(obj, angle); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_rotation_def = { + "lv_image_set_rotation", + (PyCFunction)py_lv_image_set_rotation, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_pivot(lv_obj_t *obj, int32_t x, int32_t y) + */ +static PyObject *py_lv_image_set_pivot(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_image_set_pivot)(obj, x, y); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_pivot_def = { + "lv_image_set_pivot", + (PyCFunction)py_lv_image_set_pivot, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_pivot_x(lv_obj_t *obj, int32_t x) + */ +static PyObject *py_lv_image_set_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t x = (int32_t)x_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_image_set_pivot_x)(obj, x); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_pivot_x_def = { + "lv_image_set_pivot_x", + (PyCFunction)py_lv_image_set_pivot_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_pivot_y(lv_obj_t *obj, int32_t y) + */ +static PyObject *py_lv_image_set_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long y_val; + if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t y = (int32_t)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_image_set_pivot_y)(obj, y); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_pivot_y_def = { + "lv_image_set_pivot_y", + (PyCFunction)py_lv_image_set_pivot_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_scale(lv_obj_t *obj, uint32_t zoom) + */ +static PyObject *py_lv_image_set_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long zoom_val; + if (!PyArg_ParseTuple(py_args, "l", &zoom_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t zoom = (uint32_t)zoom_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_image_set_scale)(obj, zoom); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_scale_def = { + "lv_image_set_scale", + (PyCFunction)py_lv_image_set_scale, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_scale_x(lv_obj_t *obj, uint32_t zoom) + */ +static PyObject *py_lv_image_set_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long zoom_val; + if (!PyArg_ParseTuple(py_args, "l", &zoom_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t zoom = (uint32_t)zoom_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_image_set_scale_x)(obj, zoom); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_scale_x_def = { + "lv_image_set_scale_x", + (PyCFunction)py_lv_image_set_scale_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_scale_y(lv_obj_t *obj, uint32_t zoom) + */ +static PyObject *py_lv_image_set_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long zoom_val; + if (!PyArg_ParseTuple(py_args, "l", &zoom_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t zoom = (uint32_t)zoom_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_image_set_scale_y)(obj, zoom); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_scale_y_def = { + "lv_image_set_scale_y", + (PyCFunction)py_lv_image_set_scale_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_blend_mode(lv_obj_t *obj, lv_blend_mode_t blend_mode) + */ +static PyObject *py_lv_image_set_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *blend_mode_py; + if (!PyArg_ParseTuple(py_args, "O", &blend_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_blend_mode_t blend_mode = (int)mp_obj_get_int(blend_mode_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_blend_mode_t))lv_image_set_blend_mode)(obj, blend_mode); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_blend_mode_def = { + "lv_image_set_blend_mode", + (PyCFunction)py_lv_image_set_blend_mode, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_antialias(lv_obj_t *obj, bool antialias) + */ +static PyObject *py_lv_image_set_antialias(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long antialias_val; + if (!PyArg_ParseTuple(py_args, "l", &antialias_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool antialias = (antialias_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_image_set_antialias)(obj, antialias); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_antialias_def = { + "lv_image_set_antialias", + (PyCFunction)py_lv_image_set_antialias, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_inner_align(lv_obj_t *obj, lv_image_align_t align) + */ +static PyObject *py_lv_image_set_inner_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_image_align_t align = (int)mp_obj_get_int(align_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_image_align_t))lv_image_set_inner_align)(obj, align); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_inner_align_def = { + "lv_image_set_inner_align", + (PyCFunction)py_lv_image_set_inner_align, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_set_bitmap_map_src(lv_obj_t *obj, const lv_image_dsc_t *src) + */ +static PyObject *py_lv_image_set_bitmap_map_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_image_dsc_t *src = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(src_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_image_dsc_t *))lv_image_set_bitmap_map_src)(obj, src); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_set_bitmap_map_src_def = { + "lv_image_set_bitmap_map_src", + (PyCFunction)py_lv_image_set_bitmap_map_src, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static py_lv_obj_type_t py_lv_obj_mapping = { - .lv_obj_class = &lv_obj_class, - .py_type = &py_lv_obj_type, + +/* + * lvgl extension definition for: + * const void *lv_image_get_src(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const void * _res; + lvpy_lock(); + _res = ((const void *(*)(lv_obj_t *))lv_image_get_src)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); +} + +static PyMethodDef py_lv_image_get_src_def = { + "lv_image_get_src", + (PyCFunction)py_lv_image_get_src, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * void lv_image_buf_set_palette(lv_image_dsc_t *dsc, uint8_t id, lv_color32_t c) + * int32_t lv_image_get_offset_x(lv_obj_t *obj) */ -static PyObject *py_lv_image_buf_set_palette(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_get_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long id_val; PyObject *c_py; - if (!PyArg_ParseTuple(py_args, "lO", &id_val, &c_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *dsc = mp_to_lv(self); - uint8_t id = (uint8_t)id_val; - lv_color32_t c = mp_write_lv_color32_t(c_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_image_dsc_t *, uint8_t, lv_color32_t))lv_image_buf_set_palette)(dsc, id, c); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_offset_x)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_buf_set_palette_def = { - "lv_image_buf_set_palette", - (PyCFunction)py_lv_image_buf_set_palette, +static PyMethodDef py_lv_image_get_offset_x_def = { + "lv_image_get_offset_x", + (PyCFunction)py_lv_image_get_offset_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -30254,27 +41510,87 @@ static PyMethodDef py_lv_image_buf_set_palette_def = { /* * lvgl extension definition for: - * void lv_image_buf_free(lv_image_dsc_t *dsc) + * int32_t lv_image_get_offset_y(lv_obj_t *obj) */ -static PyObject *py_lv_image_buf_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_get_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *dsc = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_image_dsc_t *))lv_image_buf_free)(dsc); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_offset_y)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_get_offset_y_def = { + "lv_image_get_offset_y", + (PyCFunction)py_lv_image_get_offset_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * int32_t lv_image_get_rotation(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_rotation)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_get_rotation_def = { + "lv_image_get_rotation", + (PyCFunction)py_lv_image_get_rotation, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_get_pivot(lv_obj_t *obj, lv_point_t *pivot) + */ +static PyObject *py_lv_image_get_pivot(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *pivot_py; + if (!PyArg_ParseTuple(py_args, "O", &pivot_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_point_t *pivot = mp_write_ptr_lv_point_t(pivot_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_point_t *))lv_image_get_pivot)(obj, pivot); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_buf_free_def = { - "lv_image_buf_free", - (PyCFunction)py_lv_image_buf_free, +static PyMethodDef py_lv_image_get_pivot_def = { + "lv_image_get_pivot", + (PyCFunction)py_lv_image_get_pivot, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -30282,202 +41598,349 @@ static PyMethodDef py_lv_image_buf_free_def = { /* * lvgl extension definition for: - * lv_result_t lv_image_decoder_get_info(const void *src, lv_image_header_t *header) + * int32_t lv_image_get_scale(lv_obj_t *obj) */ -static PyObject *py_lv_image_decoder_get_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_get_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *src_py; PyObject *header_py; - if (!PyArg_ParseTuple(py_args, "OO", &src_py, &header_py)) { PyGILState_Release(gstate); return NULL; } - const void *src = (const void *)mp_to_ptr(src_py); - lv_image_header_t *header = mp_write_ptr_lv_image_header_t(header_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const void *, lv_image_header_t *))lv_image_decoder_get_info)(src, header); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_scale)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_decoder_get_info_def = { - "lv_image_decoder_get_info", - (PyCFunction)py_lv_image_decoder_get_info, +static PyMethodDef py_lv_image_get_scale_def = { + "lv_image_get_scale", + (PyCFunction)py_lv_image_get_scale, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_image_decoder_args_t (CPython) + * lvgl extension definition for: + * int32_t lv_image_get_scale_x(lv_obj_t *obj) */ +static PyObject *py_lv_image_get_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -extern PyMethodDef py_lv_image_decoder_args_t_methods[]; + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_scale_x)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -static PyObject *py_lv_image_decoder_args_t_getattro(PyObject *self, PyObject *name) +static PyMethodDef py_lv_image_get_scale_x_def = { + "lv_image_get_scale_x", + (PyCFunction)py_lv_image_get_scale_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * int32_t lv_image_get_scale_y(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_decoder_args_t *data = (lv_image_decoder_args_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "stride_align") == 0) return convert_to_bool(data->stride_align); - if (strcmp(attr, "premultiply") == 0) return convert_to_bool(data->premultiply); - if (strcmp(attr, "no_cache") == 0) return convert_to_bool(data->no_cache); - if (strcmp(attr, "use_indexed") == 0) return convert_to_bool(data->use_indexed); - if (strcmp(attr, "flush_cache") == 0) return convert_to_bool(data->flush_cache); - for (PyMethodDef *m = py_lv_image_decoder_args_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_scale_y)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_image_decoder_args_t_field_names[] = {"stride_align", "premultiply", "no_cache", "use_indexed", "flush_cache", NULL}; +static PyMethodDef py_lv_image_get_scale_y_def = { + "lv_image_get_scale_y", + (PyCFunction)py_lv_image_get_scale_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_image_decoder_args_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * int32_t lv_image_get_src_width(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_src_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_image_decoder_args_t_field_names, py_lv_image_decoder_args_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_src_width)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_decoder_args_t_type_methods[] = { - {"__dir__", py_lv_image_decoder_args_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_image_get_src_width_def = { + "lv_image_get_src_width", + (PyCFunction)py_lv_image_get_src_width, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_image_decoder_args_t_setattro(PyObject *self, PyObject *name, PyObject *value) + +/* + * lvgl extension definition for: + * int32_t lv_image_get_src_height(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_src_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_decoder_args_t *data = (lv_image_decoder_args_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_image_decoder_args_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "stride_align") == 0) { data->stride_align = mp_obj_is_true(value); result = 0; } - if (strcmp(attr, "premultiply") == 0) { data->premultiply = mp_obj_is_true(value); result = 0; } - if (strcmp(attr, "no_cache") == 0) { data->no_cache = mp_obj_is_true(value); result = 0; } - if (strcmp(attr, "use_indexed") == 0) { data->use_indexed = mp_obj_is_true(value); result = 0; } - if (strcmp(attr, "flush_cache") == 0) { data->flush_cache = mp_obj_is_true(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_image_decoder_args_t' object has no attribute '%s'", attr); - } - return result; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_src_height)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyObject *py_lv_image_decoder_args_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyMethodDef py_lv_image_get_src_height_def = { + "lv_image_get_src_height", + (PyCFunction)py_lv_image_get_src_height, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * int32_t lv_image_get_transformed_width(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_transformed_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_image_decoder_args_t)); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_transformed_width)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static void py_lv_image_decoder_args_t_dealloc(py_lv_struct_t *self) +static PyMethodDef py_lv_image_get_transformed_width_def = { + "lv_image_get_transformed_width", + (PyCFunction)py_lv_image_get_transformed_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * int32_t lv_image_get_transformed_height(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_transformed_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_image_get_transformed_height)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_image_decoder_args_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_image_decoder_args_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_image_decoder_args_t_dealloc, - .tp_getattro = (getter)py_lv_image_decoder_args_t_getattro, - .tp_setattro = (setter)py_lv_image_decoder_args_t_setattro, - .tp_new = py_lv_image_decoder_args_t_new, - .tp_methods = py_lv_image_decoder_args_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_image_get_transformed_height_def = { + "lv_image_get_transformed_height", + (PyCFunction)py_lv_image_get_transformed_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_image_decoder_args_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_image_decoder_args_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_decoder_args_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_image_decoder_args_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_blend_mode_t _res; + lvpy_lock(); + _res = ((lv_blend_mode_t (*)(lv_obj_t *))lv_image_get_blend_mode)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_get_blend_mode_def = { + "lv_image_get_blend_mode", + (PyCFunction)py_lv_image_get_blend_mode, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_image_get_antialias(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_antialias(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_image_get_antialias)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_image_get_antialias_def = { + "lv_image_get_antialias", + (PyCFunction)py_lv_image_get_antialias, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_image_align_t lv_image_get_inner_align(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_inner_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_image_align_t _res; + lvpy_lock(); + _res = ((lv_image_align_t (*)(lv_obj_t *))lv_image_get_inner_align)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static lv_image_decoder_args_t mp_write_scratch_lv_image_decoder_args_t; - -static inline void* mp_write_value_ptr_lv_image_decoder_args_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_decoder_args_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_image_decoder_args_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_decoder_args_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_image_decoder_args_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_image_decoder_args_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_decoder_args_t or dict, got None"); - } - memset(&mp_write_scratch_lv_image_decoder_args_t, 0, sizeof(lv_image_decoder_args_t)); - return &mp_write_scratch_lv_image_decoder_args_t; -} +static PyMethodDef py_lv_image_get_inner_align_def = { + "lv_image_get_inner_align", + (PyCFunction)py_lv_image_get_inner_align, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -#define mp_write_lv_image_decoder_args_t(struct_obj) (*((lv_image_decoder_args_t*)mp_write_value_ptr_lv_image_decoder_args_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_image_decoder_args_t(void *field) +/* + * lvgl extension definition for: + * const lv_image_dsc_t *lv_image_get_bitmap_map_src(lv_obj_t *obj) + */ +static PyObject *py_lv_image_get_bitmap_map_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_image_decoder_args_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const lv_image_dsc_t * _res; + lvpy_lock(); + _res = ((const lv_image_dsc_t *(*)(lv_obj_t *))lv_image_get_bitmap_map_src)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_image_dsc_t((void*)_res); } -#define mp_read_lv_image_decoder_args_t(field) lv_to_mp_struct_own(&py_lv_image_decoder_args_t_type, copy_buffer(&field, sizeof(lv_image_decoder_args_t))) -#define mp_read_byref_lv_image_decoder_args_t(field) mp_read_ptr_lv_image_decoder_args_t(&field) +static PyMethodDef py_lv_image_get_bitmap_map_src_def = { + "lv_image_get_bitmap_map_src", + (PyCFunction)py_lv_image_get_bitmap_map_src, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) + * lv_observer_t *lv_image_bind_src(lv_obj_t *obj, lv_subject_t *subject) */ -static PyObject *py_lv_image_decoder_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_bind_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; PyObject *args_py; - if (!PyArg_ParseTuple(py_args, "OO", &src_py, &args_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *dsc = mp_to_lv(self); - const void *src = (const void *)mp_to_ptr(src_py); - const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(args_py); + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_image_decoder_open)(dsc, src, args); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_image_bind_src)(obj, subject); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_image_decoder_open_def = { - "lv_image_decoder_open", - (PyCFunction)py_lv_image_decoder_open, +static PyMethodDef py_lv_image_bind_src_def = { + "lv_image_bind_src", + (PyCFunction)py_lv_image_bind_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -30485,31 +41948,30 @@ static PyMethodDef py_lv_image_decoder_open_def = { /* * lvgl extension definition for: - * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + * lv_result_t lv_image_cache_init(uint32_t size) */ -static PyObject *py_lv_image_decoder_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_cache_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *full_area_py; PyObject *decoded_area_py; - if (!PyArg_ParseTuple(py_args, "OO", &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *dsc = mp_to_lv(self); - const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); - lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t size = (uint32_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_image_decoder_get_area)(dsc, full_area, decoded_area); + _res = ((lv_result_t (*)(uint32_t))lv_image_cache_init)(size); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_decoder_get_area_def = { - "lv_image_decoder_get_area", - (PyCFunction)py_lv_image_decoder_get_area, +static PyMethodDef py_lv_image_cache_init_def = { + "lv_image_cache_init", + (PyCFunction)py_lv_image_cache_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -30517,114 +41979,110 @@ static PyMethodDef py_lv_image_decoder_get_area_def = { /* * lvgl extension definition for: - * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) + * void lv_image_cache_resize(uint32_t new_size, bool evict_now) */ -static PyObject *py_lv_image_decoder_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_cache_resize(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *dsc = mp_to_lv(self); + long new_size_val; long evict_now_val; + if (!PyArg_ParseTuple(py_args, "ll", &new_size_val, &evict_now_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t new_size = (uint32_t)new_size_val; + bool evict_now = (evict_now_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_dsc_t *))lv_image_decoder_close)(dsc); + ((void (*)(uint32_t, bool))lv_image_cache_resize)(new_size, evict_now); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_close_def = { - "lv_image_decoder_close", - (PyCFunction)py_lv_image_decoder_close, +static PyMethodDef py_lv_image_cache_resize_def = { + "lv_image_cache_resize", + (PyCFunction)py_lv_image_cache_resize, METH_VARARGS | METH_KEYWORDS, NULL }; -#define funcptr_lv_image_decoder_info_f_t NULL - -static inline PyObject *mp_lv_funcptr_lv_image_decoder_info_f_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header); -#define funcptr_lv_image_decoder_open_f_t NULL - -static inline PyObject *mp_lv_funcptr_lv_image_decoder_open_f_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc); -#define funcptr_lv_image_decoder_get_area_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_image_decoder_get_area_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area); -#define funcptr_lv_image_decoder_close_f_t NULL - -static inline PyObject *mp_lv_funcptr_lv_image_decoder_close_f_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc); -#define funcptr_lv_image_decoder_custom_draw_t NULL - -static inline PyObject *mp_lv_funcptr_lv_image_decoder_custom_draw_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_image_decoder_t_custom_draw_cb' - * lv_image_decoder_custom_draw_t custom_draw_cb + * lvgl extension definition for: + * bool lv_image_cache_is_enabled(void) */ +static PyObject *py_lv_image_cache_is_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(void))lv_image_cache_is_enabled)(); + lvpy_unlock(); + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_image_cache_is_enabled_def = { + "lv_image_cache_is_enabled", + (PyCFunction)py_lv_image_cache_is_enabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* - * Struct lv_image_decoder_t (CPython) + * Struct lv_iter_t (CPython) */ -extern PyMethodDef py_lv_image_decoder_t_methods[]; +extern PyMethodDef py_lv_iter_t_methods[]; -static PyObject *py_lv_image_decoder_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_iter_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_decoder_t *data = (lv_image_decoder_t*)inst->data; + lv_iter_t *data = (lv_iter_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "info_cb") == 0) return mp_lv_funcptr(NULL, data->info_cb, lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", data->user_data); - if (strcmp(attr, "open_cb") == 0) return mp_lv_funcptr(NULL, data->open_cb, lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", data->user_data); - if (strcmp(attr, "get_area_cb") == 0) return mp_lv_funcptr(NULL, data->get_area_cb, lv_image_decoder_t_get_area_cb_callback, "lv_image_decoder_t_get_area_cb", data->user_data); - if (strcmp(attr, "close_cb") == 0) return mp_lv_funcptr(NULL, data->close_cb, lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", data->user_data); - if (strcmp(attr, "custom_draw_cb") == 0) return mp_lv_funcptr(NULL, data->custom_draw_cb, NULL, "lv_image_decoder_t_custom_draw_cb", NULL); - if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_image_decoder_t_methods; m->ml_name != NULL; m++) { + (void)attr; + for (PyMethodDef *m = py_lv_iter_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_image_decoder_t_field_names[] = {"info_cb", "open_cb", "get_area_cb", "close_cb", "custom_draw_cb", "name", "user_data", NULL}; +static const char *const py_lv_iter_t_field_names[] = {NULL}; -static PyObject *py_lv_image_decoder_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_iter_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_image_decoder_t_field_names, py_lv_image_decoder_t_methods); + return lvpy_struct_dir(self, py_lv_iter_t_field_names, py_lv_iter_t_methods); } -static PyMethodDef py_lv_image_decoder_t_type_methods[] = { - {"__dir__", py_lv_image_decoder_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_iter_t_type_methods[] = { + {"__dir__", py_lv_iter_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_image_decoder_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_iter_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_decoder_t *data = (lv_image_decoder_t*)inst->data; + lv_iter_t *data = (lv_iter_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -30632,96 +42090,68 @@ static int py_lv_image_decoder_t_setattro(PyObject *self, PyObject *name, PyObje const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_image_decoder_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "info_cb") == 0) { data->info_cb = mp_lv_callback(value, lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "open_cb") == 0) { data->open_cb = mp_lv_callback(value, lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "get_area_cb") == 0) { data->get_area_cb = mp_lv_callback(value, lv_image_decoder_t_get_area_cb_callback, "lv_image_decoder_t_get_area_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "close_cb") == 0) { data->close_cb = mp_lv_callback(value, lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "custom_draw_cb") == 0) { data->custom_draw_cb = mp_lv_callback(value, NULL, "lv_image_decoder_t_custom_draw_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + + (void)value; if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); + return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_image_decoder_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_iter_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_image_decoder_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_iter_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_image_decoder_t)); + return make_new_lv_struct(type, args, kwds, 0); } -static void py_lv_image_decoder_t_dealloc(py_lv_struct_t *self) +static void py_lv_iter_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_image_decoder_t_type = { +PyTypeObject py_lv_iter_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_image_decoder_t", + .tp_name = "lvgl.lv_iter_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_image_decoder_t_dealloc, - .tp_getattro = (getter)py_lv_image_decoder_t_getattro, - .tp_setattro = (setter)py_lv_image_decoder_t_setattro, - .tp_new = py_lv_image_decoder_t_new, - .tp_methods = py_lv_image_decoder_t_type_methods, + .tp_dealloc = (destructor)py_lv_iter_t_dealloc, + .tp_getattro = (getter)py_lv_iter_t_getattro, + .tp_setattro = (setter)py_lv_iter_t_setattro, + .tp_new = py_lv_iter_t_new, + .tp_methods = py_lv_iter_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_image_decoder_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_iter_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_image_decoder_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_decoder_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_iter_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_iter_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_image_decoder_t*)self->data; -} - -static lv_image_decoder_t mp_write_scratch_lv_image_decoder_t; - -static inline void* mp_write_value_ptr_lv_image_decoder_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_decoder_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_image_decoder_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_decoder_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_image_decoder_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_image_decoder_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_decoder_t or dict, got None"); - } - memset(&mp_write_scratch_lv_image_decoder_t, 0, sizeof(lv_image_decoder_t)); - return &mp_write_scratch_lv_image_decoder_t; + return (lv_iter_t*)self->data; } -#define mp_write_lv_image_decoder_t(struct_obj) (*((lv_image_decoder_t*)mp_write_value_ptr_lv_image_decoder_t(struct_obj))) +#define mp_write_lv_iter_t(struct_obj) (*((lv_iter_t*)mp_write_ptr_lv_iter_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_image_decoder_t(void *field) +static inline PyObject *mp_read_ptr_lv_iter_t(void *field) { - return lv_to_mp_struct(&py_lv_image_decoder_t_type, field); + return lv_to_mp_struct(&py_lv_iter_t_type, field); } -#define mp_read_lv_image_decoder_t(field) lv_to_mp_struct_own(&py_lv_image_decoder_t_type, copy_buffer(&field, sizeof(lv_image_decoder_t))) -#define mp_read_byref_lv_image_decoder_t(field) mp_read_ptr_lv_image_decoder_t(&field) +#define mp_read_lv_iter_t(field) lv_to_mp_struct_own(&py_lv_iter_t_type, copy_buffer(&field, sizeof(lv_iter_t))) +#define mp_read_byref_lv_iter_t(field) mp_read_ptr_lv_iter_t(&field) /* * lvgl extension definition for: - * lv_image_decoder_t *lv_image_decoder_create(void) + * lv_iter_t *lv_image_cache_iter_create(void) */ -static PyObject *py_lv_image_decoder_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_cache_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -30730,18 +42160,18 @@ static PyObject *py_lv_image_decoder_create(PyObject *self, PyObject *py_args, P if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t * _res; + lv_iter_t * _res; lvpy_lock(); - _res = ((lv_image_decoder_t *(*)(void))lv_image_decoder_create)(); + _res = ((lv_iter_t *(*)(void))lv_image_cache_iter_create)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_image_decoder_t((void*)_res); + return mp_read_ptr_lv_iter_t((void*)_res); } -static PyMethodDef py_lv_image_decoder_create_def = { - "lv_image_decoder_create", - (PyCFunction)py_lv_image_decoder_create, +static PyMethodDef py_lv_image_cache_iter_create_def = { + "lv_image_cache_iter_create", + (PyCFunction)py_lv_image_cache_iter_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -30749,27 +42179,28 @@ static PyMethodDef py_lv_image_decoder_create_def = { /* * lvgl extension definition for: - * void lv_image_decoder_delete(lv_image_decoder_t *decoder) + * void lv_image_cache_dump(void) */ -static PyObject *py_lv_image_decoder_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_cache_dump(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - lv_obj_t *decoder = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *))lv_image_decoder_delete)(decoder); + ((void (*)(void))lv_image_cache_dump)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_delete_def = { - "lv_image_decoder_delete", - (PyCFunction)py_lv_image_decoder_delete, +static PyMethodDef py_lv_image_cache_dump_def = { + "lv_image_cache_dump", + (PyCFunction)py_lv_image_cache_dump, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -30777,146 +42208,145 @@ static PyMethodDef py_lv_image_decoder_delete_def = { /* * lvgl extension definition for: - * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) + * void lv_image_buf_get_transformed_area(lv_area_t *res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x, uint16_t scale_y, const lv_point_t *pivot) */ -static PyObject *py_lv_image_decoder_get_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_buf_get_transformed_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *decoder = mp_to_lv(self); + PyObject *res_py; long w_val; long h_val; long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; + if (!PyArg_ParseTuple(py_args, "OlllllO", &res_py, &w_val, &h_val, &angle_val, &scale_x_val, &scale_y_val, &pivot_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *res = mp_write_ptr_lv_area_t(res_py); + int32_t w = (int32_t)w_val; + int32_t h = (int32_t)h_val; + int32_t angle = (int32_t)angle_val; + uint16_t scale_x = (uint16_t)scale_x_val; + uint16_t scale_y = (uint16_t)scale_y_val; + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t * _res; lvpy_lock(); - _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_image_decoder_get_next)(decoder); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, uint16_t, uint16_t, const lv_point_t *))lv_image_buf_get_transformed_area)(res, w, h, angle, scale_x, scale_y, pivot); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_image_decoder_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_get_next_def = { - "lv_image_decoder_get_next", - (PyCFunction)py_lv_image_decoder_get_next, +static PyMethodDef py_lv_image_buf_get_transformed_area_def = { + "lv_image_buf_get_transformed_area", + (PyCFunction)py_lv_image_buf_get_transformed_area, METH_VARARGS | METH_KEYWORDS, NULL }; -#define funcptr_ready_cb NULL - -static inline PyObject *mp_lv_funcptr_ready_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static bool lv_fs_drv_t_ready_cb_callback(lv_fs_drv_t *drv); -#define funcptr_remove_cb NULL - -static inline PyObject *mp_lv_funcptr_remove_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_fs_drv_t_remove_cb_callback(lv_fs_drv_t *drv); -#define funcptr_open_cb NULL - -static inline PyObject *mp_lv_funcptr_open_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void * lv_fs_drv_t_open_cb_callback(lv_fs_drv_t *drv, const char *path, lv_fs_mode_t mode); -#define funcptr_close_cb NULL - -static inline PyObject *mp_lv_funcptr_close_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static lv_fs_res_t lv_fs_drv_t_close_cb_callback(lv_fs_drv_t *drv, void *file_p); -#define funcptr_read_cb NULL - -static inline PyObject *mp_lv_funcptr_read_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static lv_fs_res_t lv_fs_drv_t_read_cb_callback(lv_fs_drv_t *drv, void *file_p, void *buf, uint32_t btr, uint32_t *br); -#define funcptr_write_cb NULL - -static inline PyObject *mp_lv_funcptr_write_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static lv_fs_res_t lv_fs_drv_t_write_cb_callback(lv_fs_drv_t *drv, void *file_p, const void *buf, uint32_t btw, uint32_t *bw); -#define funcptr_seek_cb NULL - -static inline PyObject *mp_lv_funcptr_seek_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static lv_fs_res_t lv_fs_drv_t_seek_cb_callback(lv_fs_drv_t *drv, void *file_p, uint32_t pos, lv_fs_whence_t whence); -#define funcptr_tell_cb NULL - -static inline PyObject *mp_lv_funcptr_tell_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -static lv_fs_res_t lv_fs_drv_t_tell_cb_callback(lv_fs_drv_t *drv, void *file_p, uint32_t *pos_p); -#define funcptr_dir_open_cb NULL +/* + * lvgl extension definition for: + * void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count) + */ +static PyObject *py_lv_image_decoder_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long image_cache_size_val; long image_header_count_val; + if (!PyArg_ParseTuple(py_args, "ll", &image_cache_size_val, &image_header_count_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t image_cache_size = (uint32_t)image_cache_size_val; + uint32_t image_header_count = (uint32_t)image_header_count_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(uint32_t, uint32_t))lv_image_decoder_init)(image_cache_size, image_header_count); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_dir_open_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_image_decoder_init_def = { + "lv_image_decoder_init", + (PyCFunction)py_lv_image_decoder_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static void * lv_fs_drv_t_dir_open_cb_callback(lv_fs_drv_t *drv, const char *path); -#define funcptr_dir_read_cb NULL -static inline PyObject *mp_lv_funcptr_dir_read_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +/* + * lvgl extension definition for: + * void lv_image_decoder_deinit(void) + */ +static PyObject *py_lv_image_decoder_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; -static lv_fs_res_t lv_fs_drv_t_dir_read_cb_callback(lv_fs_drv_t *drv, void *rddir_p, char *fn, uint32_t fn_len); -#define funcptr_dir_close_cb NULL + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_image_decoder_deinit)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_dir_close_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_image_decoder_deinit_def = { + "lv_image_decoder_deinit", + (PyCFunction)py_lv_image_decoder_deinit, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static lv_fs_res_t lv_fs_drv_t_dir_close_cb_callback(lv_fs_drv_t *drv, void *rddir_p); /* - * Struct lv_fs_drv_t (CPython) + * Struct lv_cache_slot_size_t (CPython) */ -extern PyMethodDef py_lv_fs_drv_t_methods[]; +extern PyMethodDef py_lv_cache_slot_size_t_methods[]; -static PyObject *py_lv_fs_drv_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_cache_slot_size_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_drv_t *data = (lv_fs_drv_t*)inst->data; + lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "letter") == 0) return mp_obj_new_int(data->letter); - if (strcmp(attr, "cache_size") == 0) return mp_obj_new_int_from_uint(data->cache_size); - if (strcmp(attr, "ready_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->ready_cb, lv_fs_drv_t_ready_cb_callback, "lv_fs_drv_t_ready_cb", data->user_data); - if (strcmp(attr, "remove_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->remove_cb, lv_fs_drv_t_remove_cb_callback, "lv_fs_drv_t_remove_cb", data->user_data); - if (strcmp(attr, "open_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->open_cb, lv_fs_drv_t_open_cb_callback, "lv_fs_drv_t_open_cb", data->user_data); - if (strcmp(attr, "close_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->close_cb, lv_fs_drv_t_close_cb_callback, "lv_fs_drv_t_close_cb", data->user_data); - if (strcmp(attr, "read_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->read_cb, lv_fs_drv_t_read_cb_callback, "lv_fs_drv_t_read_cb", data->user_data); - if (strcmp(attr, "write_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->write_cb, lv_fs_drv_t_write_cb_callback, "lv_fs_drv_t_write_cb", data->user_data); - if (strcmp(attr, "seek_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->seek_cb, lv_fs_drv_t_seek_cb_callback, "lv_fs_drv_t_seek_cb", data->user_data); - if (strcmp(attr, "tell_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->tell_cb, lv_fs_drv_t_tell_cb_callback, "lv_fs_drv_t_tell_cb", data->user_data); - if (strcmp(attr, "dir_open_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dir_open_cb, lv_fs_drv_t_dir_open_cb_callback, "lv_fs_drv_t_dir_open_cb", data->user_data); - if (strcmp(attr, "dir_read_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dir_read_cb, lv_fs_drv_t_dir_read_cb_callback, "lv_fs_drv_t_dir_read_cb", data->user_data); - if (strcmp(attr, "dir_close_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dir_close_cb, lv_fs_drv_t_dir_close_cb_callback, "lv_fs_drv_t_dir_close_cb", data->user_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_fs_drv_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + for (PyMethodDef *m = py_lv_cache_slot_size_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_fs_drv_t_field_names[] = {"letter", "cache_size", "ready_cb", "remove_cb", "open_cb", "close_cb", "read_cb", "write_cb", "seek_cb", "tell_cb", "dir_open_cb", "dir_read_cb", "dir_close_cb", "user_data", NULL}; +static const char *const py_lv_cache_slot_size_t_field_names[] = {"size", NULL}; -static PyObject *py_lv_fs_drv_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_cache_slot_size_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_fs_drv_t_field_names, py_lv_fs_drv_t_methods); + return lvpy_struct_dir(self, py_lv_cache_slot_size_t_field_names, py_lv_cache_slot_size_t_methods); } -static PyMethodDef py_lv_fs_drv_t_type_methods[] = { - {"__dir__", py_lv_fs_drv_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_cache_slot_size_t_type_methods[] = { + {"__dir__", py_lv_cache_slot_size_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_fs_drv_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_cache_slot_size_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_drv_t *data = (lv_fs_drv_t*)inst->data; + lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -30924,146 +42354,135 @@ static int py_lv_fs_drv_t_setattro(PyObject *self, PyObject *name, PyObject *val const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_fs_drv_t saved; + lv_cache_slot_size_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "letter") == 0) { data->letter = (char)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "cache_size") == 0) { data->cache_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ready_cb") == 0) { data->ready_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_ready_cb_callback, "lv_fs_drv_t_ready_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "remove_cb") == 0) { data->remove_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_remove_cb_callback, "lv_fs_drv_t_remove_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "open_cb") == 0) { data->open_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_open_cb_callback, "lv_fs_drv_t_open_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "close_cb") == 0) { data->close_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_close_cb_callback, "lv_fs_drv_t_close_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "read_cb") == 0) { data->read_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_read_cb_callback, "lv_fs_drv_t_read_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "write_cb") == 0) { data->write_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_write_cb_callback, "lv_fs_drv_t_write_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "seek_cb") == 0) { data->seek_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_seek_cb_callback, "lv_fs_drv_t_seek_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "tell_cb") == 0) { data->tell_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_tell_cb_callback, "lv_fs_drv_t_tell_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "dir_open_cb") == 0) { data->dir_open_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_dir_open_cb_callback, "lv_fs_drv_t_dir_open_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "dir_read_cb") == 0) { data->dir_read_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_dir_read_cb_callback, "lv_fs_drv_t_dir_read_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "dir_close_cb") == 0) { data->dir_close_cb = (void*)mp_lv_callback(value, lv_fs_drv_t_dir_close_cb_callback, "lv_fs_drv_t_dir_close_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (size_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_fs_drv_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_cache_slot_size_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_fs_drv_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_cache_slot_size_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_drv_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_slot_size_t)); } -static void py_lv_fs_drv_t_dealloc(py_lv_struct_t *self) +static void py_lv_cache_slot_size_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_fs_drv_t_type = { +PyTypeObject py_lv_cache_slot_size_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_fs_drv_t", + .tp_name = "lvgl.lv_cache_slot_size_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_fs_drv_t_dealloc, - .tp_getattro = (getter)py_lv_fs_drv_t_getattro, - .tp_setattro = (setter)py_lv_fs_drv_t_setattro, - .tp_new = py_lv_fs_drv_t_new, - .tp_methods = py_lv_fs_drv_t_type_methods, + .tp_dealloc = (destructor)py_lv_cache_slot_size_t_dealloc, + .tp_getattro = (getter)py_lv_cache_slot_size_t_getattro, + .tp_setattro = (setter)py_lv_cache_slot_size_t_setattro, + .tp_new = py_lv_cache_slot_size_t_new, + .tp_methods = py_lv_cache_slot_size_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_fs_drv_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_cache_slot_size_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_fs_drv_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_drv_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_cache_slot_size_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_slot_size_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_fs_drv_t*)self->data; + return (lv_cache_slot_size_t*)self->data; } -static lv_fs_drv_t mp_write_scratch_lv_fs_drv_t; +static lv_cache_slot_size_t mp_write_scratch_lv_cache_slot_size_t; -static inline void* mp_write_value_ptr_lv_fs_drv_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_cache_slot_size_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_drv_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_slot_size_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_fs_drv_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_drv_t)); + memcpy(&mp_write_scratch_lv_cache_slot_size_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_slot_size_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_fs_drv_t; + return &mp_write_scratch_lv_cache_slot_size_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_fs_drv_t(value); + void *p = mp_write_ptr_lv_cache_slot_size_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_drv_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_slot_size_t or dict, got None"); } - memset(&mp_write_scratch_lv_fs_drv_t, 0, sizeof(lv_fs_drv_t)); - return &mp_write_scratch_lv_fs_drv_t; + memset(&mp_write_scratch_lv_cache_slot_size_t, 0, sizeof(lv_cache_slot_size_t)); + return &mp_write_scratch_lv_cache_slot_size_t; } -#define mp_write_lv_fs_drv_t(struct_obj) (*((lv_fs_drv_t*)mp_write_value_ptr_lv_fs_drv_t(struct_obj))) +#define mp_write_lv_cache_slot_size_t(struct_obj) (*((lv_cache_slot_size_t*)mp_write_value_ptr_lv_cache_slot_size_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_fs_drv_t(void *field) +static inline PyObject *mp_read_ptr_lv_cache_slot_size_t(void *field) { - return lv_to_mp_struct(&py_lv_fs_drv_t_type, field); + return lv_to_mp_struct(&py_lv_cache_slot_size_t_type, field); } -#define mp_read_lv_fs_drv_t(field) lv_to_mp_struct_own(&py_lv_fs_drv_t_type, copy_buffer(&field, sizeof(lv_fs_drv_t))) -#define mp_read_byref_lv_fs_drv_t(field) mp_read_ptr_lv_fs_drv_t(&field) +#define mp_read_lv_cache_slot_size_t(field) lv_to_mp_struct_own(&py_lv_cache_slot_size_t_type, copy_buffer(&field, sizeof(lv_cache_slot_size_t))) +#define mp_read_byref_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(&field) /* - * Struct lv_fs_file_cache_t (CPython) + * Struct lv_image_cache_data_t (CPython) */ -extern PyMethodDef py_lv_fs_file_cache_t_methods[]; +extern PyMethodDef py_lv_image_cache_data_t_methods[]; -static PyObject *py_lv_fs_file_cache_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_image_cache_data_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_file_cache_t *data = (lv_fs_file_cache_t*)inst->data; + lv_image_cache_data_t *data = (lv_image_cache_data_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "start") == 0) return mp_obj_new_int_from_uint(data->start); - if (strcmp(attr, "end") == 0) return mp_obj_new_int_from_uint(data->end); - if (strcmp(attr, "file_position") == 0) return mp_obj_new_int_from_uint(data->file_position); - if (strcmp(attr, "buffer") == 0) return ptr_to_mp((void*)data->buffer); - for (PyMethodDef *m = py_lv_fs_file_cache_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "slot") == 0) return mp_read_byref_lv_cache_slot_size_t(data->slot); + if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); + if (strcmp(attr, "src_type") == 0) return mp_obj_new_int(data->src_type); + if (strcmp(attr, "decoded") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->decoded); + if (strcmp(attr, "decoder") == 0) return mp_read_ptr_lv_image_decoder_t((void*)data->decoder); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + for (PyMethodDef *m = py_lv_image_cache_data_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_fs_file_cache_t_field_names[] = {"start", "end", "file_position", "buffer", NULL}; +static const char *const py_lv_image_cache_data_t_field_names[] = {"slot", "src", "src_type", "decoded", "decoder", "user_data", NULL}; -static PyObject *py_lv_fs_file_cache_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_image_cache_data_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_fs_file_cache_t_field_names, py_lv_fs_file_cache_t_methods); + return lvpy_struct_dir(self, py_lv_image_cache_data_t_field_names, py_lv_image_cache_data_t_methods); } -static PyMethodDef py_lv_fs_file_cache_t_type_methods[] = { - {"__dir__", py_lv_fs_file_cache_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_image_cache_data_t_type_methods[] = { + {"__dir__", py_lv_image_cache_data_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_fs_file_cache_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_image_cache_data_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_file_cache_t *data = (lv_fs_file_cache_t*)inst->data; + lv_image_cache_data_t *data = (lv_image_cache_data_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -31071,1656 +42490,2123 @@ static int py_lv_fs_file_cache_t_setattro(PyObject *self, PyObject *name, PyObje const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_fs_file_cache_t saved; + lv_image_cache_data_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "start") == 0) { data->start = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "end") == 0) { data->end = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "file_position") == 0) { data->file_position = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "buffer") == 0) { data->buffer = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "slot") == 0) { data->slot = mp_write_lv_cache_slot_size_t(value); result = 0; } + if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "src_type") == 0) { data->src_type = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "decoded") == 0) { data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "decoder") == 0) { data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_fs_file_cache_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_image_cache_data_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_fs_file_cache_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_image_cache_data_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_file_cache_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_image_cache_data_t)); } -static void py_lv_fs_file_cache_t_dealloc(py_lv_struct_t *self) +static void py_lv_image_cache_data_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_fs_file_cache_t_type = { +PyTypeObject py_lv_image_cache_data_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_fs_file_cache_t", + .tp_name = "lvgl.lv_image_cache_data_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_fs_file_cache_t_dealloc, - .tp_getattro = (getter)py_lv_fs_file_cache_t_getattro, - .tp_setattro = (setter)py_lv_fs_file_cache_t_setattro, - .tp_new = py_lv_fs_file_cache_t_new, - .tp_methods = py_lv_fs_file_cache_t_type_methods, + .tp_dealloc = (destructor)py_lv_image_cache_data_t_dealloc, + .tp_getattro = (getter)py_lv_image_cache_data_t_getattro, + .tp_setattro = (setter)py_lv_image_cache_data_t_setattro, + .tp_new = py_lv_image_cache_data_t_new, + .tp_methods = py_lv_image_cache_data_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_fs_file_cache_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_image_cache_data_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_fs_file_cache_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_file_cache_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_image_cache_data_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_cache_data_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_fs_file_cache_t*)self->data; + return (lv_image_cache_data_t*)self->data; } -static lv_fs_file_cache_t mp_write_scratch_lv_fs_file_cache_t; +static lv_image_cache_data_t mp_write_scratch_lv_image_cache_data_t; -static inline void* mp_write_value_ptr_lv_fs_file_cache_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_image_cache_data_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_file_cache_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_cache_data_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_fs_file_cache_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_file_cache_t)); + memcpy(&mp_write_scratch_lv_image_cache_data_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_cache_data_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_fs_file_cache_t; + return &mp_write_scratch_lv_image_cache_data_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_fs_file_cache_t(value); + void *p = mp_write_ptr_lv_image_cache_data_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_file_cache_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_cache_data_t or dict, got None"); } - memset(&mp_write_scratch_lv_fs_file_cache_t, 0, sizeof(lv_fs_file_cache_t)); - return &mp_write_scratch_lv_fs_file_cache_t; + memset(&mp_write_scratch_lv_image_cache_data_t, 0, sizeof(lv_image_cache_data_t)); + return &mp_write_scratch_lv_image_cache_data_t; } -#define mp_write_lv_fs_file_cache_t(struct_obj) (*((lv_fs_file_cache_t*)mp_write_value_ptr_lv_fs_file_cache_t(struct_obj))) +#define mp_write_lv_image_cache_data_t(struct_obj) (*((lv_image_cache_data_t*)mp_write_value_ptr_lv_image_cache_data_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_fs_file_cache_t(void *field) +static inline PyObject *mp_read_ptr_lv_image_cache_data_t(void *field) { - return lv_to_mp_struct(&py_lv_fs_file_cache_t_type, field); + return lv_to_mp_struct(&py_lv_image_cache_data_t_type, field); +} + +#define mp_read_lv_image_cache_data_t(field) lv_to_mp_struct_own(&py_lv_image_cache_data_t_type, copy_buffer(&field, sizeof(lv_image_cache_data_t))) +#define mp_read_byref_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(&field) + + +/* + * lvgl extension definition for: + * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) + */ +static PyObject *py_lv_image_decoder_add_to_cache(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *search_key_py; PyObject *decoded_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &search_key_py, &decoded_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *decoder = mp_to_lv(self); + void *user_data = mp_to_ptr(user_data_py); + lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(search_key_py); + const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(decoded_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_cache_entry_t * _res; + lvpy_lock(); + _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_image_decoder_add_to_cache)(decoder, search_key, decoded, user_data); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_cache_entry_t((void*)_res); +} + +static PyMethodDef py_lv_image_decoder_add_to_cache_def = { + "lv_image_decoder_add_to_cache", + (PyCFunction)py_lv_image_decoder_add_to_cache, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_result_t lv_image_header_cache_init(uint32_t count) + */ +static PyObject *py_lv_image_header_cache_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long count_val; + if (!PyArg_ParseTuple(py_args, "l", &count_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t count = (uint32_t)count_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(uint32_t))lv_image_header_cache_init)(count); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_image_header_cache_init_def = { + "lv_image_header_cache_init", + (PyCFunction)py_lv_image_header_cache_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_header_cache_resize(uint32_t count, bool evict_now) + */ +static PyObject *py_lv_image_header_cache_resize(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long count_val; long evict_now_val; + if (!PyArg_ParseTuple(py_args, "ll", &count_val, &evict_now_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t count = (uint32_t)count_val; + bool evict_now = (evict_now_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(uint32_t, bool))lv_image_header_cache_resize)(count, evict_now); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_header_cache_resize_def = { + "lv_image_header_cache_resize", + (PyCFunction)py_lv_image_header_cache_resize, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_header_cache_drop(const void *src) + */ +static PyObject *py_lv_image_header_cache_drop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + const void *src = (const void *)mp_to_ptr(src_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(const void *))lv_image_header_cache_drop)(src); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_header_cache_drop_def = { + "lv_image_header_cache_drop", + (PyCFunction)py_lv_image_header_cache_drop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_image_header_cache_is_enabled(void) + */ +static PyObject *py_lv_image_header_cache_is_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(void))lv_image_header_cache_is_enabled)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_image_header_cache_is_enabled_def = { + "lv_image_header_cache_is_enabled", + (PyCFunction)py_lv_image_header_cache_is_enabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_iter_t *lv_image_header_cache_iter_create(void) + */ +static PyObject *py_lv_image_header_cache_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_iter_t * _res; + lvpy_lock(); + _res = ((lv_iter_t *(*)(void))lv_image_header_cache_iter_create)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_iter_t((void*)_res); +} + +static PyMethodDef py_lv_image_header_cache_iter_create_def = { + "lv_image_header_cache_iter_create", + (PyCFunction)py_lv_image_header_cache_iter_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_image_header_cache_dump(void) + */ +static PyObject *py_lv_image_header_cache_dump(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_image_header_cache_dump)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_image_header_cache_dump_def = { + "lv_image_header_cache_dump", + (PyCFunction)py_lv_image_header_cache_dump, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_obj_t *lv_image_create(lv_obj_t *parent) + */ +static PyObject *py_lv_image_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_image_create)(parent); + lvpy_unlock(); + + PyGILState_Release(gstate); + return lv_to_mp((void*)_res); +} + +static PyMethodDef py_lv_image_create_def = { + "lv_image_create", + (PyCFunction)py_lv_image_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl image object definitions (CPython) + */ +static PyObject *py_lv_image_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_image_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_image_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_image_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_image_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_image_methods[] = { + {"buf_set_palette", (PyCFunction)py_lv_image_buf_set_palette, METH_VARARGS | METH_KEYWORDS, NULL}, + {"buf_free", (PyCFunction)py_lv_image_buf_free, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_get_info", (PyCFunction)py_lv_image_decoder_get_info, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_open", (PyCFunction)py_lv_image_decoder_open, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_get_area", (PyCFunction)py_lv_image_decoder_get_area, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_close", (PyCFunction)py_lv_image_decoder_close, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_create", (PyCFunction)py_lv_image_decoder_create, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_delete", (PyCFunction)py_lv_image_decoder_delete, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_get_next", (PyCFunction)py_lv_image_decoder_get_next, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_set_info_cb", (PyCFunction)py_lv_image_decoder_set_info_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_set_open_cb", (PyCFunction)py_lv_image_decoder_set_open_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_set_get_area_cb", (PyCFunction)py_lv_image_decoder_set_get_area_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_set_close_cb", (PyCFunction)py_lv_image_decoder_set_close_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_post_process", (PyCFunction)py_lv_image_decoder_post_process, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cache_drop", (PyCFunction)py_lv_image_cache_drop, METH_VARARGS | METH_KEYWORDS, NULL}, + {"src_get_type", (PyCFunction)py_lv_image_src_get_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_src", (PyCFunction)py_lv_image_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_offset_x", (PyCFunction)py_lv_image_set_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_offset_y", (PyCFunction)py_lv_image_set_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rotation", (PyCFunction)py_lv_image_set_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pivot", (PyCFunction)py_lv_image_set_pivot, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pivot_x", (PyCFunction)py_lv_image_set_pivot_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pivot_y", (PyCFunction)py_lv_image_set_pivot_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scale", (PyCFunction)py_lv_image_set_scale, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scale_x", (PyCFunction)py_lv_image_set_scale_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scale_y", (PyCFunction)py_lv_image_set_scale_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_blend_mode", (PyCFunction)py_lv_image_set_blend_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_antialias", (PyCFunction)py_lv_image_set_antialias, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_inner_align", (PyCFunction)py_lv_image_set_inner_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bitmap_map_src", (PyCFunction)py_lv_image_set_bitmap_map_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_src", (PyCFunction)py_lv_image_get_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_offset_x", (PyCFunction)py_lv_image_get_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_offset_y", (PyCFunction)py_lv_image_get_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rotation", (PyCFunction)py_lv_image_get_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_pivot", (PyCFunction)py_lv_image_get_pivot, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scale", (PyCFunction)py_lv_image_get_scale, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scale_x", (PyCFunction)py_lv_image_get_scale_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scale_y", (PyCFunction)py_lv_image_get_scale_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_src_width", (PyCFunction)py_lv_image_get_src_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_src_height", (PyCFunction)py_lv_image_get_src_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_transformed_width", (PyCFunction)py_lv_image_get_transformed_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_transformed_height", (PyCFunction)py_lv_image_get_transformed_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_blend_mode", (PyCFunction)py_lv_image_get_blend_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_antialias", (PyCFunction)py_lv_image_get_antialias, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_inner_align", (PyCFunction)py_lv_image_get_inner_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bitmap_map_src", (PyCFunction)py_lv_image_get_bitmap_map_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_src", (PyCFunction)py_lv_image_bind_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cache_init", (PyCFunction)py_lv_image_cache_init, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cache_resize", (PyCFunction)py_lv_image_cache_resize, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cache_is_enabled", (PyCFunction)py_lv_image_cache_is_enabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cache_iter_create", (PyCFunction)py_lv_image_cache_iter_create, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cache_dump", (PyCFunction)py_lv_image_cache_dump, METH_VARARGS | METH_KEYWORDS, NULL}, + {"buf_get_transformed_area", (PyCFunction)py_lv_image_buf_get_transformed_area, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_init", (PyCFunction)py_lv_image_decoder_init, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_deinit", (PyCFunction)py_lv_image_decoder_deinit, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decoder_add_to_cache", (PyCFunction)py_lv_image_decoder_add_to_cache, METH_VARARGS | METH_KEYWORDS, NULL}, + {"header_cache_init", (PyCFunction)py_lv_image_header_cache_init, METH_VARARGS | METH_KEYWORDS, NULL}, + {"header_cache_resize", (PyCFunction)py_lv_image_header_cache_resize, METH_VARARGS | METH_KEYWORDS, NULL}, + {"header_cache_drop", (PyCFunction)py_lv_image_header_cache_drop, METH_VARARGS | METH_KEYWORDS, NULL}, + {"header_cache_is_enabled", (PyCFunction)py_lv_image_header_cache_is_enabled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"header_cache_iter_create", (PyCFunction)py_lv_image_header_cache_iter_create, METH_VARARGS | METH_KEYWORDS, NULL}, + {"header_cache_dump", (PyCFunction)py_lv_image_header_cache_dump, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_image_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.image", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_image_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_image_new, + .tp_methods = py_lv_image_methods, + .tp_call = (ternaryfunc)py_lv_image_call, +}; + +static py_lv_obj_type_t py_lv_image_mapping = { + .lv_obj_class = &lv_image_class, + .py_type = &py_lv_image_type, +}; + + +/* + * lvgl extension definition for: + * void lv_animimg_set_src(lv_obj_t *obj, const void *dsc[], size_t num) + */ +static PyObject *py_lv_animimg_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *dsc_py; long num_val; + if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &num_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const void **dsc = (const void **)mp_to_ptr(dsc_py); + size_t num = (size_t)num_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const void *[], size_t))lv_animimg_set_src)(obj, dsc, num); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_fs_file_cache_t(field) lv_to_mp_struct_own(&py_lv_fs_file_cache_t_type, copy_buffer(&field, sizeof(lv_fs_file_cache_t))) -#define mp_read_byref_lv_fs_file_cache_t(field) mp_read_ptr_lv_fs_file_cache_t(&field) +static PyMethodDef py_lv_animimg_set_src_def = { + "lv_animimg_set_src", + (PyCFunction)py_lv_animimg_set_src, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_fs_file_t (CPython) + * lvgl extension definition for: + * void lv_animimg_set_src_reverse(lv_obj_t *obj, const void *dsc[], size_t num) */ - -extern PyMethodDef py_lv_fs_file_t_methods[]; - -static PyObject *py_lv_fs_file_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_file_t *data = (lv_fs_file_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "file_d") == 0) return ptr_to_mp((void*)data->file_d); - if (strcmp(attr, "drv") == 0) return mp_read_ptr_lv_fs_drv_t((void*)data->drv); - if (strcmp(attr, "cache") == 0) return mp_read_ptr_lv_fs_file_cache_t((void*)data->cache); - for (PyMethodDef *m = py_lv_fs_file_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_fs_file_t_field_names[] = {"file_d", "drv", "cache", NULL}; - -static PyObject *py_lv_fs_file_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_animimg_set_src_reverse(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_fs_file_t_field_names, py_lv_fs_file_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *dsc_py; long num_val; + if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &num_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const void **dsc = (const void **)mp_to_ptr(dsc_py); + size_t num = (size_t)num_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const void *[], size_t))lv_animimg_set_src_reverse)(obj, dsc, num); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_file_t_type_methods[] = { - {"__dir__", py_lv_fs_file_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_animimg_set_src_reverse_def = { + "lv_animimg_set_src_reverse", + (PyCFunction)py_lv_animimg_set_src_reverse, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_fs_file_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_file_t *data = (lv_fs_file_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_fs_file_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "file_d") == 0) { data->file_d = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "drv") == 0) { data->drv = (void*)mp_write_ptr_lv_fs_drv_t(value); result = 0; } - if (strcmp(attr, "cache") == 0) { data->cache = (void*)mp_write_ptr_lv_fs_file_cache_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_fs_file_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_fs_file_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * void lv_animimg_start(lv_obj_t *obj) + */ +static PyObject *py_lv_animimg_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_file_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static void py_lv_fs_file_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_animimg_start)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_fs_file_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_fs_file_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_fs_file_t_dealloc, - .tp_getattro = (getter)py_lv_fs_file_t_getattro, - .tp_setattro = (setter)py_lv_fs_file_t_setattro, - .tp_new = py_lv_fs_file_t_new, - .tp_methods = py_lv_fs_file_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_animimg_start_def = { + "lv_animimg_start", + (PyCFunction)py_lv_animimg_start, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_fs_file_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_fs_file_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_file_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_fs_file_t*)self->data; -} - -static lv_fs_file_t mp_write_scratch_lv_fs_file_t; -static inline void* mp_write_value_ptr_lv_fs_file_t(PyObject *value) +/* + * lvgl extension definition for: + * bool lv_animimg_delete(lv_obj_t *obj) + */ +static PyObject *py_lv_animimg_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_file_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_fs_file_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_file_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_fs_file_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_fs_file_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_file_t or dict, got None"); - } - memset(&mp_write_scratch_lv_fs_file_t, 0, sizeof(lv_fs_file_t)); - return &mp_write_scratch_lv_fs_file_t; -} - -#define mp_write_lv_fs_file_t(struct_obj) (*((lv_fs_file_t*)mp_write_value_ptr_lv_fs_file_t(struct_obj))) + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static inline PyObject *mp_read_ptr_lv_fs_file_t(void *field) -{ - return lv_to_mp_struct(&py_lv_fs_file_t_type, field); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_animimg_delete)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -#define mp_read_lv_fs_file_t(field) lv_to_mp_struct_own(&py_lv_fs_file_t_type, copy_buffer(&field, sizeof(lv_fs_file_t))) -#define mp_read_byref_lv_fs_file_t(field) mp_read_ptr_lv_fs_file_t(&field) - -#define funcptr_lv_cache_alloc_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_cache_alloc_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_animimg_delete_def = { + "lv_animimg_delete", + (PyCFunction)py_lv_animimg_delete, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_alloc_cb' - * lv_cache_alloc_cb_t alloc_cb + * lvgl extension definition for: + * void lv_animimg_set_duration(lv_obj_t *obj, uint32_t duration) */ +static PyObject *py_lv_animimg_set_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t duration = (uint32_t)duration_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_cache_init_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_duration)(obj, duration); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_cache_init_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_animimg_set_duration_def = { + "lv_animimg_set_duration", + (PyCFunction)py_lv_animimg_set_duration, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_init_cb' - * lv_cache_init_cb_t init_cb + * lvgl extension definition for: + * void lv_animimg_set_repeat_count(lv_obj_t *obj, uint32_t count) */ +static PyObject *py_lv_animimg_set_repeat_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long count_val; + if (!PyArg_ParseTuple(py_args, "l", &count_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t count = (uint32_t)count_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_cache_destroy_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_repeat_count)(obj, count); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_cache_destroy_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_animimg_set_repeat_count_def = { + "lv_animimg_set_repeat_count", + (PyCFunction)py_lv_animimg_set_repeat_count, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_destroy_cb' - * lv_cache_destroy_cb_t destroy_cb + * lvgl extension definition for: + * void lv_animimg_set_reverse_duration(lv_obj_t *obj, uint32_t duration) */ +static PyObject *py_lv_animimg_set_reverse_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t duration = (uint32_t)duration_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_cache_get_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_reverse_duration)(obj, duration); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_cache_get_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_animimg_set_reverse_duration_def = { + "lv_animimg_set_reverse_duration", + (PyCFunction)py_lv_animimg_set_reverse_duration, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_get_cb' - * lv_cache_get_cb_t get_cb + * lvgl extension definition for: + * void lv_animimg_set_reverse_delay(lv_obj_t *obj, uint32_t duration) */ +static PyObject *py_lv_animimg_set_reverse_delay(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t duration = (uint32_t)duration_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_add_cb' - * lv_cache_add_cb_t add_cb - */ + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_reverse_delay)(obj, duration); + lvpy_unlock(); -#define funcptr_lv_cache_remove_cb_t NULL + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_cache_remove_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_animimg_set_reverse_delay_def = { + "lv_animimg_set_reverse_delay", + (PyCFunction)py_lv_animimg_set_reverse_delay, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_remove_cb' - * lv_cache_remove_cb_t remove_cb + * Callback function lv_obj_t_start_cb (CPython) + * void lv_anim_start_cb_t(lv_anim_t *) */ - -#define funcptr_lv_cache_drop_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_cache_drop_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static void lv_obj_t_start_cb_callback(lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_start_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_drop_cb' - * lv_cache_drop_cb_t drop_cb + * lvgl extension definition for: + * void lv_animimg_set_start_cb(lv_obj_t *obj, lv_anim_start_cb_t start_cb) */ +static PyObject *py_lv_animimg_set_start_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *start_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &start_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + void *start_cb = mp_lv_callback(start_cb_py, &lv_obj_t_start_cb_callback, "lv_obj_t_start_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_drop_all_cb' - * lv_cache_drop_all_cb_t drop_all_cb - */ + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_anim_start_cb_t))lv_animimg_set_start_cb)(obj, start_cb); + lvpy_unlock(); -#define funcptr_lv_cache_get_victim_cb NULL + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_cache_get_victim_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_animimg_set_start_cb_def = { + "lv_animimg_set_start_cb", + (PyCFunction)py_lv_animimg_set_start_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_get_victim_cb' - * lv_cache_get_victim_cb get_victim_cb + * Callback function lv_obj_t_completed_cb (CPython) + * void lv_anim_completed_cb_t(lv_anim_t *) */ - -#define funcptr_lv_cache_reserve_cond_cb NULL - -static inline PyObject *mp_lv_funcptr_lv_cache_reserve_cond_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static void lv_obj_t_completed_cb_callback(lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_completed_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_reserve_cond_cb' - * lv_cache_reserve_cond_cb reserve_cond_cb + * lvgl extension definition for: + * void lv_animimg_set_completed_cb(lv_obj_t *obj, lv_anim_completed_cb_t completed_cb) */ +static PyObject *py_lv_animimg_set_completed_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *completed_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &completed_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + void *completed_cb = mp_lv_callback(completed_cb_py, &lv_obj_t_completed_cb_callback, "lv_obj_t_completed_cb", &obj->user_data, obj, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_cache_iter_create_cb NULL - -static inline PyObject *mp_lv_funcptr_lv_cache_iter_create_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_anim_completed_cb_t))lv_animimg_set_completed_cb)(obj, completed_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} +static PyMethodDef py_lv_animimg_set_completed_cb_def = { + "lv_animimg_set_completed_cb", + (PyCFunction)py_lv_animimg_set_completed_cb, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_class_t_iter_create_cb' - * lv_cache_iter_create_cb iter_create_cb - */ - /* - * Struct lv_cache_class_t (CPython) + * lvgl extension definition for: + * uint8_t lv_animimg_get_src_count(lv_obj_t *obj) */ - -extern PyMethodDef py_lv_cache_class_t_methods[]; - -static PyObject *py_lv_cache_class_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_animimg_get_src_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_class_t *data = (lv_cache_class_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "alloc_cb") == 0) return mp_lv_funcptr(NULL, data->alloc_cb, NULL, "lv_cache_class_t_alloc_cb", NULL); - if (strcmp(attr, "init_cb") == 0) return mp_lv_funcptr(NULL, data->init_cb, NULL, "lv_cache_class_t_init_cb", NULL); - if (strcmp(attr, "destroy_cb") == 0) return mp_lv_funcptr(NULL, data->destroy_cb, NULL, "lv_cache_class_t_destroy_cb", NULL); - if (strcmp(attr, "get_cb") == 0) return mp_lv_funcptr(NULL, data->get_cb, NULL, "lv_cache_class_t_get_cb", NULL); - if (strcmp(attr, "add_cb") == 0) return mp_lv_funcptr(NULL, data->add_cb, NULL, "lv_cache_class_t_add_cb", NULL); - if (strcmp(attr, "remove_cb") == 0) return mp_lv_funcptr(NULL, data->remove_cb, NULL, "lv_cache_class_t_remove_cb", NULL); - if (strcmp(attr, "drop_cb") == 0) return mp_lv_funcptr(NULL, data->drop_cb, NULL, "lv_cache_class_t_drop_cb", NULL); - if (strcmp(attr, "drop_all_cb") == 0) return mp_lv_funcptr(NULL, data->drop_all_cb, NULL, "lv_cache_class_t_drop_all_cb", NULL); - if (strcmp(attr, "get_victim_cb") == 0) return mp_lv_funcptr(NULL, data->get_victim_cb, NULL, "lv_cache_class_t_get_victim_cb", NULL); - if (strcmp(attr, "reserve_cond_cb") == 0) return mp_lv_funcptr(NULL, data->reserve_cond_cb, NULL, "lv_cache_class_t_reserve_cond_cb", NULL); - if (strcmp(attr, "iter_create_cb") == 0) return mp_lv_funcptr(NULL, data->iter_create_cb, NULL, "lv_cache_class_t_iter_create_cb", NULL); - for (PyMethodDef *m = py_lv_cache_class_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint8_t _res; + lvpy_lock(); + _res = ((uint8_t (*)(lv_obj_t *))lv_animimg_get_src_count)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static const char *const py_lv_cache_class_t_field_names[] = {"alloc_cb", "init_cb", "destroy_cb", "get_cb", "add_cb", "remove_cb", "drop_cb", "drop_all_cb", "get_victim_cb", "reserve_cond_cb", "iter_create_cb", NULL}; +static PyMethodDef py_lv_animimg_get_src_count_def = { + "lv_animimg_get_src_count", + (PyCFunction)py_lv_animimg_get_src_count, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + -static PyObject *py_lv_cache_class_t_dir(PyObject *self, PyObject *unused) +/* + * lvgl extension definition for: + * uint32_t lv_animimg_get_duration(lv_obj_t *obj) + */ +static PyObject *py_lv_animimg_get_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_cache_class_t_field_names, py_lv_cache_class_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *))lv_animimg_get_duration)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_cache_class_t_type_methods[] = { - {"__dir__", py_lv_cache_class_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_animimg_get_duration_def = { + "lv_animimg_get_duration", + (PyCFunction)py_lv_animimg_get_duration, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_cache_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_class_t *data = (lv_cache_class_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_cache_class_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "alloc_cb") == 0) { data->alloc_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_alloc_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "init_cb") == 0) { data->init_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_init_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "destroy_cb") == 0) { data->destroy_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_destroy_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "get_cb") == 0) { data->get_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_get_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "add_cb") == 0) { data->add_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_add_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "remove_cb") == 0) { data->remove_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_remove_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "drop_cb") == 0) { data->drop_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_drop_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "drop_all_cb") == 0) { data->drop_all_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_drop_all_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "get_victim_cb") == 0) { data->get_victim_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_get_victim_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "reserve_cond_cb") == 0) { data->reserve_cond_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_reserve_cond_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "iter_create_cb") == 0) { data->iter_create_cb = mp_lv_callback(value, NULL, "lv_cache_class_t_iter_create_cb", NULL, NULL, NULL, NULL); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_cache_class_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_cache_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * uint32_t lv_animimg_get_repeat_count(lv_obj_t *obj) + */ +static PyObject *py_lv_animimg_get_repeat_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_class_t)); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *))lv_animimg_get_repeat_count)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static void py_lv_cache_class_t_dealloc(py_lv_struct_t *self) +static PyMethodDef py_lv_animimg_get_repeat_count_def = { + "lv_animimg_get_repeat_count", + (PyCFunction)py_lv_animimg_get_repeat_count, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_anim_t *lv_animimg_get_anim(lv_obj_t *obj) + */ +static PyObject *py_lv_animimg_get_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_anim_t * _res; + lvpy_lock(); + _res = ((lv_anim_t *(*)(lv_obj_t *))lv_animimg_get_anim)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_anim_t((void*)_res); } -PyTypeObject py_lv_cache_class_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_cache_class_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_cache_class_t_dealloc, - .tp_getattro = (getter)py_lv_cache_class_t_getattro, - .tp_setattro = (setter)py_lv_cache_class_t_setattro, - .tp_new = py_lv_cache_class_t_new, - .tp_methods = py_lv_cache_class_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_animimg_get_anim_def = { + "lv_animimg_get_anim", + (PyCFunction)py_lv_animimg_get_anim, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_cache_class_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * lv_obj_t *lv_animimg_create(lv_obj_t *parent) + */ +static PyObject *py_lv_animimg_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_cache_class_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_class_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_cache_class_t*)self->data; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_animimg_create)(parent); + lvpy_unlock(); + + PyGILState_Release(gstate); + return lv_to_mp((void*)_res); } -static lv_cache_class_t mp_write_scratch_lv_cache_class_t; +static PyMethodDef py_lv_animimg_create_def = { + "lv_animimg_create", + (PyCFunction)py_lv_animimg_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_cache_class_t(PyObject *value) + +/* + * lvgl animimg object definitions (CPython) + */ +static PyObject *py_lv_animimg_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_class_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_cache_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_class_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_cache_class_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_cache_class_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_class_t or dict, got None"); - } - memset(&mp_write_scratch_lv_cache_class_t, 0, sizeof(lv_cache_class_t)); - return &mp_write_scratch_lv_cache_class_t; + (void)type; + return py_lv_animimg_create(type, py_args, py_kwds); } -#define mp_write_lv_cache_class_t(struct_obj) (*((lv_cache_class_t*)mp_write_value_ptr_lv_cache_class_t(struct_obj))) +static PyObject *py_lv_animimg_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_animimg_create((PyObject *)type, py_args, py_kwds); +} -static inline PyObject *mp_read_ptr_lv_cache_class_t(void *field) +static void py_lv_animimg_dealloc(py_lv_obj_t *self) { - return lv_to_mp_struct(&py_lv_cache_class_t_type, field); + lvpy_dealloc_obj(self); } -#define mp_read_lv_cache_class_t(field) lv_to_mp_struct_own(&py_lv_cache_class_t_type, copy_buffer(&field, sizeof(lv_cache_class_t))) -#define mp_read_byref_lv_cache_class_t(field) mp_read_ptr_lv_cache_class_t(&field) +static PyMethodDef py_lv_animimg_methods[] = { + {"set_src", (PyCFunction)py_lv_animimg_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_src_reverse", (PyCFunction)py_lv_animimg_set_src_reverse, METH_VARARGS | METH_KEYWORDS, NULL}, + {"start", (PyCFunction)py_lv_animimg_start, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete", (PyCFunction)py_lv_animimg_delete, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_duration", (PyCFunction)py_lv_animimg_set_duration, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_count", (PyCFunction)py_lv_animimg_set_repeat_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_duration", (PyCFunction)py_lv_animimg_set_reverse_duration, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_delay", (PyCFunction)py_lv_animimg_set_reverse_delay, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_start_cb", (PyCFunction)py_lv_animimg_set_start_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_completed_cb", (PyCFunction)py_lv_animimg_set_completed_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_src_count", (PyCFunction)py_lv_animimg_get_src_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_duration", (PyCFunction)py_lv_animimg_get_duration, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_repeat_count", (PyCFunction)py_lv_animimg_get_repeat_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_anim", (PyCFunction)py_lv_animimg_get_anim, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; -#define funcptr_lv_cache_compare_cb_t NULL +PyTypeObject py_lv_animimg_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.animimg", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_animimg_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_animimg_new, + .tp_methods = py_lv_animimg_methods, + .tp_call = (ternaryfunc)py_lv_animimg_call, +}; -static inline PyObject *mp_lv_funcptr_lv_cache_compare_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static py_lv_obj_type_t py_lv_animimg_mapping = { + .lv_obj_class = &lv_animimg_class, + .py_type = &py_lv_animimg_type, +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_ops_t_compare_cb' - * lv_cache_compare_cb_t compare_cb + * lvgl extension definition for: + * void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start) */ +static PyObject *py_lv_arc_set_start_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *start_py; + if (!PyArg_ParseTuple(py_args, "O", &start_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t start = (float)mp_obj_get_float(start_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_cache_create_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_start_angle)(obj, start); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_cache_create_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_arc_set_start_angle_def = { + "lv_arc_set_start_angle", + (PyCFunction)py_lv_arc_set_start_angle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_ops_t_create_cb' - * lv_cache_create_cb_t create_cb + * lvgl extension definition for: + * void lv_arc_set_end_angle(lv_obj_t *obj, lv_value_precise_t end) */ +static PyObject *py_lv_arc_set_end_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *end_py; + if (!PyArg_ParseTuple(py_args, "O", &end_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t end = (float)mp_obj_get_float(end_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_cache_free_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_end_angle)(obj, end); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_cache_free_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_arc_set_end_angle_def = { + "lv_arc_set_end_angle", + (PyCFunction)py_lv_arc_set_end_angle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_cache_ops_t_free_cb' - * lv_cache_free_cb_t free_cb + * lvgl extension definition for: + * void lv_arc_set_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) */ +static PyObject *py_lv_arc_set_angles(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *start_py; PyObject *end_py; + if (!PyArg_ParseTuple(py_args, "OO", &start_py, &end_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t start = (float)mp_obj_get_float(start_py); + lv_value_precise_t end = (float)mp_obj_get_float(end_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_arc_set_angles)(obj, start, end); + lvpy_unlock(); + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -/* - * Struct lv_cache_ops_t (CPython) - */ +static PyMethodDef py_lv_arc_set_angles_def = { + "lv_arc_set_angles", + (PyCFunction)py_lv_arc_set_angles, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -extern PyMethodDef py_lv_cache_ops_t_methods[]; -static PyObject *py_lv_cache_ops_t_getattro(PyObject *self, PyObject *name) +/* + * lvgl extension definition for: + * void lv_arc_set_bg_start_angle(lv_obj_t *obj, lv_value_precise_t start) + */ +static PyObject *py_lv_arc_set_bg_start_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_ops_t *data = (lv_cache_ops_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "compare_cb") == 0) return mp_lv_funcptr(NULL, data->compare_cb, NULL, "lv_cache_ops_t_compare_cb", NULL); - if (strcmp(attr, "create_cb") == 0) return mp_lv_funcptr(NULL, data->create_cb, NULL, "lv_cache_ops_t_create_cb", NULL); - if (strcmp(attr, "free_cb") == 0) return mp_lv_funcptr(NULL, data->free_cb, NULL, "lv_cache_ops_t_free_cb", NULL); - for (PyMethodDef *m = py_lv_cache_ops_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *start_py; + if (!PyArg_ParseTuple(py_args, "O", &start_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t start = (float)mp_obj_get_float(start_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_bg_start_angle)(obj, start); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_cache_ops_t_field_names[] = {"compare_cb", "create_cb", "free_cb", NULL}; +static PyMethodDef py_lv_arc_set_bg_start_angle_def = { + "lv_arc_set_bg_start_angle", + (PyCFunction)py_lv_arc_set_bg_start_angle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_cache_ops_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_arc_set_bg_end_angle(lv_obj_t *obj, lv_value_precise_t end) + */ +static PyObject *py_lv_arc_set_bg_end_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_cache_ops_t_field_names, py_lv_cache_ops_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *end_py; + if (!PyArg_ParseTuple(py_args, "O", &end_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t end = (float)mp_obj_get_float(end_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_bg_end_angle)(obj, end); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_ops_t_type_methods[] = { - {"__dir__", py_lv_cache_ops_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_arc_set_bg_end_angle_def = { + "lv_arc_set_bg_end_angle", + (PyCFunction)py_lv_arc_set_bg_end_angle, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_cache_ops_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_ops_t *data = (lv_cache_ops_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_cache_ops_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "compare_cb") == 0) { data->compare_cb = mp_lv_callback(value, NULL, "lv_cache_ops_t_compare_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "create_cb") == 0) { data->create_cb = mp_lv_callback(value, NULL, "lv_cache_ops_t_create_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "free_cb") == 0) { data->free_cb = mp_lv_callback(value, NULL, "lv_cache_ops_t_free_cb", NULL, NULL, NULL, NULL); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_cache_ops_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_cache_ops_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_ops_t)); -} -static void py_lv_cache_ops_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_arc_set_bg_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) + */ +static PyObject *py_lv_arc_set_bg_angles(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *start_py; PyObject *end_py; + if (!PyArg_ParseTuple(py_args, "OO", &start_py, &end_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t start = (float)mp_obj_get_float(start_py); + lv_value_precise_t end = (float)mp_obj_get_float(end_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_arc_set_bg_angles)(obj, start, end); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_cache_ops_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_cache_ops_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_cache_ops_t_dealloc, - .tp_getattro = (getter)py_lv_cache_ops_t_getattro, - .tp_setattro = (setter)py_lv_cache_ops_t_setattro, - .tp_new = py_lv_cache_ops_t_new, - .tp_methods = py_lv_cache_ops_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_arc_set_bg_angles_def = { + "lv_arc_set_bg_angles", + (PyCFunction)py_lv_arc_set_bg_angles, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_cache_ops_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_cache_ops_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_ops_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_cache_ops_t*)self->data; -} - -static lv_cache_ops_t mp_write_scratch_lv_cache_ops_t; -static inline void* mp_write_value_ptr_lv_cache_ops_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_arc_set_rotation(lv_obj_t *obj, int32_t rotation) + */ +static PyObject *py_lv_arc_set_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_ops_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_cache_ops_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_ops_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_cache_ops_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_cache_ops_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_ops_t or dict, got None"); - } - memset(&mp_write_scratch_lv_cache_ops_t, 0, sizeof(lv_cache_ops_t)); - return &mp_write_scratch_lv_cache_ops_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long rotation_val; + if (!PyArg_ParseTuple(py_args, "l", &rotation_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t rotation = (int32_t)rotation_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_arc_set_rotation)(obj, rotation); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_cache_ops_t(struct_obj) (*((lv_cache_ops_t*)mp_write_value_ptr_lv_cache_ops_t(struct_obj))) +static PyMethodDef py_lv_arc_set_rotation_def = { + "lv_arc_set_rotation", + (PyCFunction)py_lv_arc_set_rotation, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_cache_ops_t(void *field) + +/* + * lvgl extension definition for: + * void lv_arc_set_mode(lv_obj_t *obj, lv_arc_mode_t type) + */ +static PyObject *py_lv_arc_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_cache_ops_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_arc_mode_t type = (int)mp_obj_get_int(type_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_arc_mode_t))lv_arc_set_mode)(obj, type); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_cache_ops_t(field) lv_to_mp_struct_own(&py_lv_cache_ops_t_type, copy_buffer(&field, sizeof(lv_cache_ops_t))) -#define mp_read_byref_lv_cache_ops_t(field) mp_read_ptr_lv_cache_ops_t(&field) +static PyMethodDef py_lv_arc_set_mode_def = { + "lv_arc_set_mode", + (PyCFunction)py_lv_arc_set_mode, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_cache_t (CPython) + * lvgl extension definition for: + * void lv_arc_set_value(lv_obj_t *obj, int32_t value) */ - -extern PyMethodDef py_lv_cache_t_methods[]; - -static PyObject *py_lv_cache_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_arc_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_t *data = (lv_cache_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "clz") == 0) return mp_read_ptr_lv_cache_class_t((void*)data->clz); - if (strcmp(attr, "node_size") == 0) return mp_obj_new_int_from_uint(data->node_size); - if (strcmp(attr, "max_size") == 0) return mp_obj_new_int_from_uint(data->max_size); - if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); - if (strcmp(attr, "ops") == 0) return mp_read_byref_lv_cache_ops_t(data->ops); - if (strcmp(attr, "lock") == 0) return mp_obj_new_int(data->lock); - if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); - for (PyMethodDef *m = py_lv_cache_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_arc_set_value)(obj, value); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_cache_t_field_names[] = {"clz", "node_size", "max_size", "size", "ops", "lock", "name", NULL}; +static PyMethodDef py_lv_arc_set_value_def = { + "lv_arc_set_value", + (PyCFunction)py_lv_arc_set_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_cache_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_arc_set_range(lv_obj_t *obj, int32_t min, int32_t max) + */ +static PyObject *py_lv_arc_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_cache_t_field_names, py_lv_cache_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_arc_set_range)(obj, min, max); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_t_type_methods[] = { - {"__dir__", py_lv_cache_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_arc_set_range_def = { + "lv_arc_set_range", + (PyCFunction)py_lv_arc_set_range, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_cache_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_t *data = (lv_cache_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_cache_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "clz") == 0) { data->clz = (void*)mp_write_ptr_lv_cache_class_t(value); result = 0; } - if (strcmp(attr, "node_size") == 0) { data->node_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "max_size") == 0) { data->max_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ops") == 0) { data->ops = mp_write_lv_cache_ops_t(value); result = 0; } - if (strcmp(attr, "lock") == 0) { data->lock = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_cache_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_cache_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_t)); -} -static void py_lv_cache_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_arc_set_min_value(lv_obj_t *obj, int32_t min) + */ +static PyObject *py_lv_arc_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long min_val; + if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t min = (int32_t)min_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_arc_set_min_value)(obj, min); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_cache_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_cache_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_cache_t_dealloc, - .tp_getattro = (getter)py_lv_cache_t_getattro, - .tp_setattro = (setter)py_lv_cache_t_setattro, - .tp_new = py_lv_cache_t_new, - .tp_methods = py_lv_cache_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_arc_set_min_value_def = { + "lv_arc_set_min_value", + (PyCFunction)py_lv_arc_set_min_value, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_cache_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * void lv_arc_set_max_value(lv_obj_t *obj, int32_t max) + */ +static PyObject *py_lv_arc_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_cache_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_cache_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long max_val; + if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t max = (int32_t)max_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_arc_set_max_value)(obj, max); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static lv_cache_t mp_write_scratch_lv_cache_t; +static PyMethodDef py_lv_arc_set_max_value_def = { + "lv_arc_set_max_value", + (PyCFunction)py_lv_arc_set_max_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_cache_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_arc_set_change_rate(lv_obj_t *obj, uint32_t rate) + */ +static PyObject *py_lv_arc_set_change_rate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_cache_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_cache_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_cache_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_t or dict, got None"); - } - memset(&mp_write_scratch_lv_cache_t, 0, sizeof(lv_cache_t)); - return &mp_write_scratch_lv_cache_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long rate_val; + if (!PyArg_ParseTuple(py_args, "l", &rate_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t rate = (uint32_t)rate_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_arc_set_change_rate)(obj, rate); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_cache_t(struct_obj) (*((lv_cache_t*)mp_write_value_ptr_lv_cache_t(struct_obj))) +static PyMethodDef py_lv_arc_set_change_rate_def = { + "lv_arc_set_change_rate", + (PyCFunction)py_lv_arc_set_change_rate, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_cache_t(void *field) + +/* + * lvgl extension definition for: + * void lv_arc_set_knob_offset(lv_obj_t *obj, int32_t offset) + */ +static PyObject *py_lv_arc_set_knob_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_cache_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long offset_val; + if (!PyArg_ParseTuple(py_args, "l", &offset_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t offset = (int32_t)offset_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_arc_set_knob_offset)(obj, offset); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_cache_t(field) lv_to_mp_struct_own(&py_lv_cache_t_type, copy_buffer(&field, sizeof(lv_cache_t))) -#define mp_read_byref_lv_cache_t(field) mp_read_ptr_lv_cache_t(&field) +static PyMethodDef py_lv_arc_set_knob_offset_def = { + "lv_arc_set_knob_offset", + (PyCFunction)py_lv_arc_set_knob_offset, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_cache_entry_t (CPython) + * lvgl extension definition for: + * lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj) */ - -extern PyMethodDef py_lv_cache_entry_t_methods[]; - -static PyObject *py_lv_cache_entry_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_arc_get_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_entry_t *data = (lv_cache_entry_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "cache") == 0) return mp_read_ptr_lv_cache_t((void*)data->cache); - if (strcmp(attr, "ref_cnt") == 0) return mp_obj_new_int(data->ref_cnt); - if (strcmp(attr, "node_size") == 0) return mp_obj_new_int_from_uint(data->node_size); - if (strcmp(attr, "flags") == 0) return mp_obj_new_int_from_uint(data->flags); - for (PyMethodDef *m = py_lv_cache_entry_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_value_precise_t _res; + lvpy_lock(); + _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_angle_start)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_float_from_f(_res); } -static const char *const py_lv_cache_entry_t_field_names[] = {"cache", "ref_cnt", "node_size", "flags", NULL}; +static PyMethodDef py_lv_arc_get_angle_start_def = { + "lv_arc_get_angle_start", + (PyCFunction)py_lv_arc_get_angle_start, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_cache_entry_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * lv_value_precise_t lv_arc_get_angle_end(lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_angle_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_cache_entry_t_field_names, py_lv_cache_entry_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_value_precise_t _res; + lvpy_lock(); + _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_angle_end)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_cache_entry_t_type_methods[] = { - {"__dir__", py_lv_cache_entry_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_arc_get_angle_end_def = { + "lv_arc_get_angle_end", + (PyCFunction)py_lv_arc_get_angle_end, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_cache_entry_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_entry_t *data = (lv_cache_entry_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_cache_entry_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "cache") == 0) { data->cache = (void*)mp_write_ptr_lv_cache_t(value); result = 0; } - if (strcmp(attr, "ref_cnt") == 0) { data->ref_cnt = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "node_size") == 0) { data->node_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "flags") == 0) { data->flags = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_cache_entry_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_cache_entry_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * lv_value_precise_t lv_arc_get_bg_angle_start(lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_bg_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_entry_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static void py_lv_cache_entry_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_value_precise_t _res; + lvpy_lock(); + _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_bg_angle_start)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_float_from_f(_res); } -PyTypeObject py_lv_cache_entry_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_cache_entry_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_cache_entry_t_dealloc, - .tp_getattro = (getter)py_lv_cache_entry_t_getattro, - .tp_setattro = (setter)py_lv_cache_entry_t_setattro, - .tp_new = py_lv_cache_entry_t_new, - .tp_methods = py_lv_cache_entry_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_arc_get_bg_angle_start_def = { + "lv_arc_get_bg_angle_start", + (PyCFunction)py_lv_arc_get_bg_angle_start, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_cache_entry_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * lv_value_precise_t lv_arc_get_bg_angle_end(lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_bg_angle_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_cache_entry_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_entry_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_cache_entry_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_value_precise_t _res; + lvpy_lock(); + _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_bg_angle_end)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_float_from_f(_res); } -static lv_cache_entry_t mp_write_scratch_lv_cache_entry_t; +static PyMethodDef py_lv_arc_get_bg_angle_end_def = { + "lv_arc_get_bg_angle_end", + (PyCFunction)py_lv_arc_get_bg_angle_end, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_cache_entry_t(PyObject *value) + +/* + * lvgl extension definition for: + * int32_t lv_arc_get_value(const lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_entry_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_cache_entry_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_entry_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_cache_entry_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_cache_entry_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_entry_t or dict, got None"); - } - memset(&mp_write_scratch_lv_cache_entry_t, 0, sizeof(lv_cache_entry_t)); - return &mp_write_scratch_lv_cache_entry_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_value)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_cache_entry_t(struct_obj) (*((lv_cache_entry_t*)mp_write_value_ptr_lv_cache_entry_t(struct_obj))) +static PyMethodDef py_lv_arc_get_value_def = { + "lv_arc_get_value", + (PyCFunction)py_lv_arc_get_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_cache_entry_t(void *field) + +/* + * lvgl extension definition for: + * int32_t lv_arc_get_min_value(const lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_cache_entry_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_min_value)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_cache_entry_t(field) lv_to_mp_struct_own(&py_lv_cache_entry_t_type, copy_buffer(&field, sizeof(lv_cache_entry_t))) -#define mp_read_byref_lv_cache_entry_t(field) mp_read_ptr_lv_cache_entry_t(&field) +static PyMethodDef py_lv_arc_get_min_value_def = { + "lv_arc_get_min_value", + (PyCFunction)py_lv_arc_get_min_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_image_decoder_dsc_t (CPython) + * lvgl extension definition for: + * int32_t lv_arc_get_max_value(const lv_obj_t *obj) */ - -extern PyMethodDef py_lv_image_decoder_dsc_t_methods[]; - -static PyObject *py_lv_image_decoder_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_arc_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "decoder") == 0) return mp_read_ptr_lv_image_decoder_t((void*)data->decoder); - if (strcmp(attr, "args") == 0) return mp_read_byref_lv_image_decoder_args_t(data->args); - if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); - if (strcmp(attr, "src_type") == 0) return mp_obj_new_int(data->src_type); - if (strcmp(attr, "file") == 0) return mp_read_byref_lv_fs_file_t(data->file); - if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); - if (strcmp(attr, "decoded") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->decoded); - if (strcmp(attr, "palette") == 0) return mp_read_ptr_lv_color32_t((void*)data->palette); - if (strcmp(attr, "palette_size") == 0) return mp_obj_new_int_from_uint(data->palette_size); - if (strcmp(attr, "time_to_open") == 0) return mp_obj_new_int_from_uint(data->time_to_open); - if (strcmp(attr, "error_msg") == 0) return convert_to_str((void*)data->error_msg); - if (strcmp(attr, "cache") == 0) return mp_read_ptr_lv_cache_t((void*)data->cache); - if (strcmp(attr, "cache_entry") == 0) return mp_read_ptr_lv_cache_entry_t((void*)data->cache_entry); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_image_decoder_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_max_value)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_image_decoder_dsc_t_field_names[] = {"decoder", "args", "src", "src_type", "file", "header", "decoded", "palette", "palette_size", "time_to_open", "error_msg", "cache", "cache_entry", "user_data", NULL}; +static PyMethodDef py_lv_arc_get_max_value_def = { + "lv_arc_get_max_value", + (PyCFunction)py_lv_arc_get_max_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_image_decoder_dsc_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_image_decoder_dsc_t_field_names, py_lv_image_decoder_dsc_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_arc_mode_t _res; + lvpy_lock(); + _res = ((lv_arc_mode_t (*)(const lv_obj_t *))lv_arc_get_mode)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_decoder_dsc_t_type_methods[] = { - {"__dir__", py_lv_image_decoder_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_arc_get_mode_def = { + "lv_arc_get_mode", + (PyCFunction)py_lv_arc_get_mode, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_image_decoder_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_decoder_dsc_t *data = (lv_image_decoder_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_image_decoder_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "decoder") == 0) { data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(value); result = 0; } - if (strcmp(attr, "args") == 0) { data->args = mp_write_lv_image_decoder_args_t(value); result = 0; } - if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "src_type") == 0) { data->src_type = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "file") == 0) { data->file = mp_write_lv_fs_file_t(value); result = 0; } - if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } - if (strcmp(attr, "decoded") == 0) { data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "palette") == 0) { data->palette = (void*)mp_write_ptr_lv_color32_t(value); result = 0; } - if (strcmp(attr, "palette_size") == 0) { data->palette_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "time_to_open") == 0) { data->time_to_open = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "error_msg") == 0) { data->error_msg = (void*)(char*)convert_from_str(value); result = 0; } - if (strcmp(attr, "cache") == 0) { data->cache = (void*)mp_write_ptr_lv_cache_t(value); result = 0; } - if (strcmp(attr, "cache_entry") == 0) { data->cache_entry = (void*)mp_write_ptr_lv_cache_entry_t(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_image_decoder_dsc_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_image_decoder_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * int32_t lv_arc_get_rotation(const lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_image_decoder_dsc_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static void py_lv_image_decoder_dsc_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_rotation)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_image_decoder_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_image_decoder_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_image_decoder_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_image_decoder_dsc_t_getattro, - .tp_setattro = (setter)py_lv_image_decoder_dsc_t_setattro, - .tp_new = py_lv_image_decoder_dsc_t_new, - .tp_methods = py_lv_image_decoder_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_arc_get_rotation_def = { + "lv_arc_get_rotation", + (PyCFunction)py_lv_arc_get_rotation, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_image_decoder_dsc_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * int32_t lv_arc_get_knob_offset(const lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_knob_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_image_decoder_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_decoder_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_image_decoder_dsc_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_knob_offset)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static lv_image_decoder_dsc_t mp_write_scratch_lv_image_decoder_dsc_t; +static PyMethodDef py_lv_arc_get_knob_offset_def = { + "lv_arc_get_knob_offset", + (PyCFunction)py_lv_arc_get_knob_offset, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_image_decoder_dsc_t(PyObject *value) + +/* + * lvgl extension definition for: + * uint32_t lv_arc_get_change_rate(lv_obj_t *obj) + */ +static PyObject *py_lv_arc_get_change_rate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_decoder_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_image_decoder_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_decoder_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_image_decoder_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_image_decoder_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_decoder_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_image_decoder_dsc_t, 0, sizeof(lv_image_decoder_dsc_t)); - return &mp_write_scratch_lv_image_decoder_dsc_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *))lv_arc_get_change_rate)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -#define mp_write_lv_image_decoder_dsc_t(struct_obj) (*((lv_image_decoder_dsc_t*)mp_write_value_ptr_lv_image_decoder_dsc_t(struct_obj))) +static PyMethodDef py_lv_arc_get_change_rate_def = { + "lv_arc_get_change_rate", + (PyCFunction)py_lv_arc_get_change_rate, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_image_decoder_dsc_t(void *field) + +/* + * lvgl extension definition for: + * lv_observer_t *lv_arc_bind_value(lv_obj_t *obj, lv_subject_t *subject) + */ +static PyObject *py_lv_arc_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_image_decoder_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_arc_bind_value)(obj, subject); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); } -#define mp_read_lv_image_decoder_dsc_t(field) lv_to_mp_struct_own(&py_lv_image_decoder_dsc_t_type, copy_buffer(&field, sizeof(lv_image_decoder_dsc_t))) -#define mp_read_byref_lv_image_decoder_dsc_t(field) mp_read_ptr_lv_image_decoder_dsc_t(&field) +static PyMethodDef py_lv_arc_bind_value_def = { + "lv_arc_bind_value", + (PyCFunction)py_lv_arc_bind_value, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Callback function lv_image_decoder_t_info_cb (CPython) - * lv_result_t lv_image_decoder_info_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) + * lvgl extension definition for: + * void lv_arc_align_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_align, int32_t r_offset) */ -static lv_result_t lv_image_decoder_t_info_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, lv_image_header_t *arg2) +static PyObject *py_lv_arc_align_obj_to_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_result_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_info_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_result_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - PyObject *py_arg2 = mp_read_ptr_lv_image_header_t((void*)arg2); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_result_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_result_t){0}; } - lv_result_t _c_res = (int)mp_obj_get_int(result); - Py_DECREF(result); + (void)py_kwds; + PyObject *obj_to_align_py; long r_offset_val; + if (!PyArg_ParseTuple(py_args, "Ol", &obj_to_align_py, &r_offset_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *obj_to_align = mp_to_lv(obj_to_align_py); + int32_t r_offset = (int32_t)r_offset_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_arc_align_obj_to_angle)(obj, obj_to_align, r_offset); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + Py_RETURN_NONE; } +static PyMethodDef py_lv_arc_align_obj_to_angle_def = { + "lv_arc_align_obj_to_angle", + (PyCFunction)py_lv_arc_align_obj_to_angle, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) + * void lv_arc_rotate_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_rotate, int32_t r_offset) */ -static PyObject *py_lv_image_decoder_set_info_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arc_rotate_obj_to_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *info_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &info_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *decoder = mp_to_lv(self); - void *info_cb = mp_lv_callback(info_cb_py, &lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", &decoder->user_data, decoder, (NULL), (NULL)); + PyObject *obj_to_rotate_py; long r_offset_val; + if (!PyArg_ParseTuple(py_args, "Ol", &obj_to_rotate_py, &r_offset_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *obj_to_rotate = mp_to_lv(obj_to_rotate_py); + int32_t r_offset = (int32_t)r_offset_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_image_decoder_set_info_cb)(decoder, info_cb); + ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_arc_rotate_obj_to_angle)(obj, obj_to_rotate, r_offset); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_set_info_cb_def = { - "lv_image_decoder_set_info_cb", - (PyCFunction)py_lv_image_decoder_set_info_cb, +static PyMethodDef py_lv_arc_rotate_obj_to_angle_def = { + "lv_arc_rotate_obj_to_angle", + (PyCFunction)py_lv_arc_rotate_obj_to_angle, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_image_decoder_t_open_cb (CPython) - * lv_result_t lv_image_decoder_open_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + * lvgl extension definition for: + * lv_obj_t *lv_arc_create(lv_obj_t *parent) */ -static lv_result_t lv_image_decoder_t_open_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) +static PyObject *py_lv_arc_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_result_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_open_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_result_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_result_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_result_t){0}; } - lv_result_t _c_res = (int)mp_obj_get_int(result); - Py_DECREF(result); + (void)self; + (void)py_kwds; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_arc_create)(parent); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + return lv_to_mp((void*)_res); +} + +static PyMethodDef py_lv_arc_create_def = { + "lv_arc_create", + (PyCFunction)py_lv_arc_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl arc object definitions (CPython) + */ +static PyObject *py_lv_arc_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_arc_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_arc_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_arc_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_arc_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); } +static PyMethodDef py_lv_arc_methods[] = { + {"set_start_angle", (PyCFunction)py_lv_arc_set_start_angle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_end_angle", (PyCFunction)py_lv_arc_set_end_angle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_angles", (PyCFunction)py_lv_arc_set_angles, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_start_angle", (PyCFunction)py_lv_arc_set_bg_start_angle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_end_angle", (PyCFunction)py_lv_arc_set_bg_end_angle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_angles", (PyCFunction)py_lv_arc_set_bg_angles, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rotation", (PyCFunction)py_lv_arc_set_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode", (PyCFunction)py_lv_arc_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_value", (PyCFunction)py_lv_arc_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_range", (PyCFunction)py_lv_arc_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_value", (PyCFunction)py_lv_arc_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_value", (PyCFunction)py_lv_arc_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_change_rate", (PyCFunction)py_lv_arc_set_change_rate, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_knob_offset", (PyCFunction)py_lv_arc_set_knob_offset, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_angle_start", (PyCFunction)py_lv_arc_get_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_angle_end", (PyCFunction)py_lv_arc_get_angle_end, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bg_angle_start", (PyCFunction)py_lv_arc_get_bg_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bg_angle_end", (PyCFunction)py_lv_arc_get_bg_angle_end, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_value", (PyCFunction)py_lv_arc_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_min_value", (PyCFunction)py_lv_arc_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_value", (PyCFunction)py_lv_arc_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode", (PyCFunction)py_lv_arc_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rotation", (PyCFunction)py_lv_arc_get_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_knob_offset", (PyCFunction)py_lv_arc_get_knob_offset, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_change_rate", (PyCFunction)py_lv_arc_get_change_rate, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_value", (PyCFunction)py_lv_arc_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"align_obj_to_angle", (PyCFunction)py_lv_arc_align_obj_to_angle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"rotate_obj_to_angle", (PyCFunction)py_lv_arc_rotate_obj_to_angle, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_arc_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.arc", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_arc_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_arc_new, + .tp_methods = py_lv_arc_methods, + .tp_call = (ternaryfunc)py_lv_arc_call, +}; + +static py_lv_obj_type_t py_lv_arc_mapping = { + .lv_obj_class = &lv_arc_class, + .py_type = &py_lv_arc_type, +}; + /* * lvgl extension definition for: - * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) + * void lv_arclabel_set_text(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_image_decoder_set_open_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *open_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &open_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *decoder = mp_to_lv(self); - void *open_cb = mp_lv_callback(open_cb_py, &lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", &decoder->user_data, decoder, (NULL), (NULL)); + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_image_decoder_set_open_cb)(decoder, open_cb); + ((void (*)(lv_obj_t *, const char *))lv_arclabel_set_text)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_set_open_cb_def = { - "lv_image_decoder_set_open_cb", - (PyCFunction)py_lv_image_decoder_set_open_cb, +static PyMethodDef py_lv_arclabel_set_text_def = { + "lv_arclabel_set_text", + (PyCFunction)py_lv_arclabel_set_text, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_image_decoder_t_read_line_cb (CPython) - * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) - */ -static lv_result_t lv_image_decoder_t_read_line_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_result_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_read_line_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_result_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - PyObject *py_arg2 = mp_read_ptr_lv_area_t((void*)arg2); - PyObject *py_arg3 = mp_read_ptr_lv_area_t((void*)arg3); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3) ? PyTuple_Pack(4, py_arg0, py_arg1, py_arg2, py_arg3) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - Py_XDECREF(py_arg3); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_result_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_result_t){0}; } - lv_result_t _c_res = (int)mp_obj_get_int(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * lvgl extension definition for: - * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t read_line_cb) + * void lv_arclabel_set_text_static(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_image_decoder_set_get_area_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *read_line_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &read_line_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *decoder = mp_to_lv(self); - void *read_line_cb = mp_lv_callback(read_line_cb_py, &lv_image_decoder_t_read_line_cb_callback, "lv_image_decoder_t_read_line_cb", &decoder->user_data, decoder, (NULL), (NULL)); + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_image_decoder_set_get_area_cb)(decoder, read_line_cb); + ((void (*)(lv_obj_t *, const char *))lv_arclabel_set_text_static)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_set_get_area_cb_def = { - "lv_image_decoder_set_get_area_cb", - (PyCFunction)py_lv_image_decoder_set_get_area_cb, +static PyMethodDef py_lv_arclabel_set_text_static_def = { + "lv_arclabel_set_text_static", + (PyCFunction)py_lv_arclabel_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_image_decoder_t_close_cb (CPython) - * void lv_image_decoder_close_f_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) - */ -static void lv_image_decoder_t_close_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_close_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) + * void lv_arclabel_set_angle_start(lv_obj_t *obj, lv_value_precise_t start) */ -static PyObject *py_lv_image_decoder_set_close_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *close_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &close_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *decoder = mp_to_lv(self); - void *close_cb = mp_lv_callback(close_cb_py, &lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", &decoder->user_data, decoder, (NULL), (NULL)); + PyObject *start_py; + if (!PyArg_ParseTuple(py_args, "O", &start_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t start = (float)mp_obj_get_float(start_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_image_decoder_set_close_cb)(decoder, close_cb); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arclabel_set_angle_start)(obj, start); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_set_close_cb_def = { - "lv_image_decoder_set_close_cb", - (PyCFunction)py_lv_image_decoder_set_close_cb, +static PyMethodDef py_lv_arclabel_set_angle_start_def = { + "lv_arclabel_set_angle_start", + (PyCFunction)py_lv_arclabel_set_angle_start, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_cache_slot_size_t (CPython) + * lvgl extension definition for: + * void lv_arclabel_set_angle_size(lv_obj_t *obj, lv_value_precise_t size) */ - -extern PyMethodDef py_lv_cache_slot_size_t_methods[]; - -static PyObject *py_lv_cache_slot_size_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); - for (PyMethodDef *m = py_lv_cache_slot_size_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_cache_slot_size_t_field_names[] = {"size", NULL}; - -static PyObject *py_lv_cache_slot_size_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_cache_slot_size_t_field_names, py_lv_cache_slot_size_t_methods); -} - -static PyMethodDef py_lv_cache_slot_size_t_type_methods[] = { - {"__dir__", py_lv_cache_slot_size_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_cache_slot_size_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_cache_slot_size_t *data = (lv_cache_slot_size_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_cache_slot_size_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "size") == 0) { data->size = (size_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_cache_slot_size_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_cache_slot_size_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_cache_slot_size_t)); -} - -static void py_lv_cache_slot_size_t_dealloc(py_lv_struct_t *self) +static PyObject *py_lv_arclabel_set_angle_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *size_py; + if (!PyArg_ParseTuple(py_args, "O", &size_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_value_precise_t size = (float)mp_obj_get_float(size_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arclabel_set_angle_size)(obj, size); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_cache_slot_size_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_cache_slot_size_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_cache_slot_size_t_dealloc, - .tp_getattro = (getter)py_lv_cache_slot_size_t_getattro, - .tp_setattro = (setter)py_lv_cache_slot_size_t_setattro, - .tp_new = py_lv_cache_slot_size_t_new, - .tp_methods = py_lv_cache_slot_size_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_arclabel_set_angle_size_def = { + "lv_arclabel_set_angle_size", + (PyCFunction)py_lv_arclabel_set_angle_size, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_cache_slot_size_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_cache_slot_size_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_cache_slot_size_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_cache_slot_size_t*)self->data; -} - -static lv_cache_slot_size_t mp_write_scratch_lv_cache_slot_size_t; - -static inline void* mp_write_value_ptr_lv_cache_slot_size_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_cache_slot_size_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_cache_slot_size_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_cache_slot_size_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_cache_slot_size_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_cache_slot_size_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_cache_slot_size_t or dict, got None"); - } - memset(&mp_write_scratch_lv_cache_slot_size_t, 0, sizeof(lv_cache_slot_size_t)); - return &mp_write_scratch_lv_cache_slot_size_t; -} - -#define mp_write_lv_cache_slot_size_t(struct_obj) (*((lv_cache_slot_size_t*)mp_write_value_ptr_lv_cache_slot_size_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_cache_slot_size_t(void *field) -{ - return lv_to_mp_struct(&py_lv_cache_slot_size_t_type, field); -} - -#define mp_read_lv_cache_slot_size_t(field) lv_to_mp_struct_own(&py_lv_cache_slot_size_t_type, copy_buffer(&field, sizeof(lv_cache_slot_size_t))) -#define mp_read_byref_lv_cache_slot_size_t(field) mp_read_ptr_lv_cache_slot_size_t(&field) - /* - * Struct lv_image_cache_data_t (CPython) + * lvgl extension definition for: + * void lv_arclabel_set_offset(lv_obj_t *obj, int32_t offset) */ - -extern PyMethodDef py_lv_image_cache_data_t_methods[]; - -static PyObject *py_lv_image_cache_data_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_cache_data_t *data = (lv_image_cache_data_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "slot") == 0) return mp_read_byref_lv_cache_slot_size_t(data->slot); - if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); - if (strcmp(attr, "src_type") == 0) return mp_obj_new_int(data->src_type); - if (strcmp(attr, "decoded") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->decoded); - if (strcmp(attr, "decoder") == 0) return mp_read_ptr_lv_image_decoder_t((void*)data->decoder); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_image_cache_data_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_image_cache_data_t_field_names[] = {"slot", "src", "src_type", "decoded", "decoder", "user_data", NULL}; - -static PyObject *py_lv_image_cache_data_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_image_cache_data_t_field_names, py_lv_image_cache_data_t_methods); -} - -static PyMethodDef py_lv_image_cache_data_t_type_methods[] = { - {"__dir__", py_lv_image_cache_data_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_image_cache_data_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_cache_data_t *data = (lv_image_cache_data_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_image_cache_data_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "slot") == 0) { data->slot = mp_write_lv_cache_slot_size_t(value); result = 0; } - if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "src_type") == 0) { data->src_type = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "decoded") == 0) { data->decoded = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "decoder") == 0) { data->decoder = (void*)mp_write_ptr_lv_image_decoder_t(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_image_cache_data_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_image_cache_data_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_image_cache_data_t)); -} - -static void py_lv_image_cache_data_t_dealloc(py_lv_struct_t *self) +static PyObject *py_lv_arclabel_set_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long offset_val; + if (!PyArg_ParseTuple(py_args, "l", &offset_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t offset = (int32_t)offset_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_arclabel_set_offset)(obj, offset); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_image_cache_data_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_image_cache_data_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_image_cache_data_t_dealloc, - .tp_getattro = (getter)py_lv_image_cache_data_t_getattro, - .tp_setattro = (setter)py_lv_image_cache_data_t_setattro, - .tp_new = py_lv_image_cache_data_t_new, - .tp_methods = py_lv_image_cache_data_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_arclabel_set_offset_def = { + "lv_arclabel_set_offset", + (PyCFunction)py_lv_arclabel_set_offset, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_image_cache_data_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_image_cache_data_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_cache_data_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_image_cache_data_t*)self->data; -} - -static lv_image_cache_data_t mp_write_scratch_lv_image_cache_data_t; - -static inline void* mp_write_value_ptr_lv_image_cache_data_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_cache_data_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_image_cache_data_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_cache_data_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_image_cache_data_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_image_cache_data_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_cache_data_t or dict, got None"); - } - memset(&mp_write_scratch_lv_image_cache_data_t, 0, sizeof(lv_image_cache_data_t)); - return &mp_write_scratch_lv_image_cache_data_t; -} - -#define mp_write_lv_image_cache_data_t(struct_obj) (*((lv_image_cache_data_t*)mp_write_value_ptr_lv_image_cache_data_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_image_cache_data_t(void *field) -{ - return lv_to_mp_struct(&py_lv_image_cache_data_t_type, field); -} - -#define mp_read_lv_image_cache_data_t(field) lv_to_mp_struct_own(&py_lv_image_cache_data_t_type, copy_buffer(&field, sizeof(lv_image_cache_data_t))) -#define mp_read_byref_lv_image_cache_data_t(field) mp_read_ptr_lv_image_cache_data_t(&field) - /* * lvgl extension definition for: - * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) + * void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir) */ -static PyObject *py_lv_image_decoder_add_to_cache(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *search_key_py; PyObject *decoded_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &search_key_py, &decoded_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *decoder = mp_to_lv(self); - void *user_data = mp_to_ptr(user_data_py); - lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(search_key_py); - const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(decoded_py); + PyObject *dir_py; + if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_arclabel_dir_t dir = (int)mp_obj_get_int(dir_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_image_decoder_add_to_cache)(decoder, search_key, decoded, user_data); + ((void (*)(lv_obj_t *, lv_arclabel_dir_t))lv_arclabel_set_dir)(obj, dir); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_add_to_cache_def = { - "lv_image_decoder_add_to_cache", - (PyCFunction)py_lv_image_decoder_add_to_cache, +static PyMethodDef py_lv_arclabel_set_dir_def = { + "lv_arclabel_set_dir", + (PyCFunction)py_lv_arclabel_set_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32728,30 +44614,29 @@ static PyMethodDef py_lv_image_decoder_add_to_cache_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) + * void lv_arclabel_set_recolor(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_image_decoder_post_process(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *decoded_py; - if (!PyArg_ParseTuple(py_args, "O", &decoded_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *dsc = mp_to_lv(self); - lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(decoded_py); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_image_decoder_post_process)(dsc, decoded); + ((void (*)(lv_obj_t *, bool))lv_arclabel_set_recolor)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_post_process_def = { - "lv_image_decoder_post_process", - (PyCFunction)py_lv_image_decoder_post_process, +static PyMethodDef py_lv_arclabel_set_recolor_def = { + "lv_arclabel_set_recolor", + (PyCFunction)py_lv_arclabel_set_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32759,30 +44644,29 @@ static PyMethodDef py_lv_image_decoder_post_process_def = { /* * lvgl extension definition for: - * lv_image_src_t lv_image_src_get_type(const void *src) + * void lv_arclabel_set_radius(lv_obj_t *obj, uint32_t radius) */ -static PyObject *py_lv_image_src_get_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - const void *src = (const void *)mp_to_ptr(src_py); + long radius_val; + if (!PyArg_ParseTuple(py_args, "l", &radius_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t radius = (uint32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_image_src_t _res; lvpy_lock(); - _res = ((lv_image_src_t (*)(const void *))lv_image_src_get_type)(src); + ((void (*)(lv_obj_t *, uint32_t))lv_arclabel_set_radius)(obj, radius); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_src_get_type_def = { - "lv_image_src_get_type", - (PyCFunction)py_lv_image_src_get_type, +static PyMethodDef py_lv_arclabel_set_radius_def = { + "lv_arclabel_set_radius", + (PyCFunction)py_lv_arclabel_set_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32790,29 +44674,29 @@ static PyMethodDef py_lv_image_src_get_type_def = { /* * lvgl extension definition for: - * void lv_image_set_src(lv_obj_t *obj, const void *src) + * void lv_arclabel_set_center_offset_x(lv_obj_t *obj, uint32_t x) */ -static PyObject *py_lv_image_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_center_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const void *src = (const void *)mp_to_ptr(src_py); + uint32_t x = (uint32_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const void *))lv_image_set_src)(obj, src); + ((void (*)(lv_obj_t *, uint32_t))lv_arclabel_set_center_offset_x)(obj, x); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_set_src_def = { - "lv_image_set_src", - (PyCFunction)py_lv_image_set_src, +static PyMethodDef py_lv_arclabel_set_center_offset_x_def = { + "lv_arclabel_set_center_offset_x", + (PyCFunction)py_lv_arclabel_set_center_offset_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32820,29 +44704,29 @@ static PyMethodDef py_lv_image_set_src_def = { /* * lvgl extension definition for: - * void lv_image_set_offset_x(lv_obj_t *obj, int32_t x) + * void lv_arclabel_set_center_offset_y(lv_obj_t *obj, uint32_t y) */ -static PyObject *py_lv_image_set_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_center_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + long y_val; + if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; + uint32_t y = (uint32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_image_set_offset_x)(obj, x); + ((void (*)(lv_obj_t *, uint32_t))lv_arclabel_set_center_offset_y)(obj, y); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_set_offset_x_def = { - "lv_image_set_offset_x", - (PyCFunction)py_lv_image_set_offset_x, +static PyMethodDef py_lv_arclabel_set_center_offset_y_def = { + "lv_arclabel_set_center_offset_y", + (PyCFunction)py_lv_arclabel_set_center_offset_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32850,29 +44734,29 @@ static PyMethodDef py_lv_image_set_offset_x_def = { /* * lvgl extension definition for: - * void lv_image_set_offset_y(lv_obj_t *obj, int32_t y) + * void lv_arclabel_set_text_vertical_align(lv_obj_t *obj, lv_arclabel_text_align_t align) */ -static PyObject *py_lv_image_set_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_text_vertical_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long y_val; - if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t y = (int32_t)y_val; + lv_arclabel_text_align_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_image_set_offset_y)(obj, y); + ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_arclabel_set_text_vertical_align)(obj, align); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_set_offset_y_def = { - "lv_image_set_offset_y", - (PyCFunction)py_lv_image_set_offset_y, +static PyMethodDef py_lv_arclabel_set_text_vertical_align_def = { + "lv_arclabel_set_text_vertical_align", + (PyCFunction)py_lv_arclabel_set_text_vertical_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32880,29 +44764,29 @@ static PyMethodDef py_lv_image_set_offset_y_def = { /* * lvgl extension definition for: - * void lv_image_set_rotation(lv_obj_t *obj, int32_t angle) + * void lv_arclabel_set_text_horizontal_align(lv_obj_t *obj, lv_arclabel_text_align_t align) */ -static PyObject *py_lv_image_set_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_text_horizontal_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long angle_val; - if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t angle = (int32_t)angle_val; + lv_arclabel_text_align_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_image_set_rotation)(obj, angle); + ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_arclabel_set_text_horizontal_align)(obj, align); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_set_rotation_def = { - "lv_image_set_rotation", - (PyCFunction)py_lv_image_set_rotation, +static PyMethodDef py_lv_arclabel_set_text_horizontal_align_def = { + "lv_arclabel_set_text_horizontal_align", + (PyCFunction)py_lv_arclabel_set_text_horizontal_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32910,30 +44794,29 @@ static PyMethodDef py_lv_image_set_rotation_def = { /* * lvgl extension definition for: - * void lv_image_set_pivot(lv_obj_t *obj, int32_t x, int32_t y) + * void lv_arclabel_set_overflow(lv_obj_t *obj, lv_arclabel_overflow_t overflow) */ -static PyObject *py_lv_image_set_pivot(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *overflow_py; + if (!PyArg_ParseTuple(py_args, "O", &overflow_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + lv_arclabel_overflow_t overflow = (int)mp_obj_get_int(overflow_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_image_set_pivot)(obj, x, y); + ((void (*)(lv_obj_t *, lv_arclabel_overflow_t))lv_arclabel_set_overflow)(obj, overflow); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_set_pivot_def = { - "lv_image_set_pivot", - (PyCFunction)py_lv_image_set_pivot, +static PyMethodDef py_lv_arclabel_set_overflow_def = { + "lv_arclabel_set_overflow", + (PyCFunction)py_lv_arclabel_set_overflow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32941,29 +44824,29 @@ static PyMethodDef py_lv_image_set_pivot_def = { /* * lvgl extension definition for: - * void lv_image_set_pivot_x(lv_obj_t *obj, int32_t x) + * void lv_arclabel_set_end_overlap(lv_obj_t *obj, bool overlap) */ -static PyObject *py_lv_image_set_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_set_end_overlap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + long overlap_val; + if (!PyArg_ParseTuple(py_args, "l", &overlap_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; + bool overlap = (overlap_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_image_set_pivot_x)(obj, x); + ((void (*)(lv_obj_t *, bool))lv_arclabel_set_end_overlap)(obj, overlap); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_set_pivot_x_def = { - "lv_image_set_pivot_x", - (PyCFunction)py_lv_image_set_pivot_x, +static PyMethodDef py_lv_arclabel_set_end_overlap_def = { + "lv_arclabel_set_end_overlap", + (PyCFunction)py_lv_arclabel_set_end_overlap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -32971,29 +44854,28 @@ static PyMethodDef py_lv_image_set_pivot_x_def = { /* * lvgl extension definition for: - * void lv_image_set_pivot_y(lv_obj_t *obj, int32_t y) + * lv_value_precise_t lv_arclabel_get_angle_start(lv_obj_t *obj) */ -static PyObject *py_lv_image_set_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long y_val; - if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_value_precise_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_image_set_pivot_y)(obj, y); + _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arclabel_get_angle_start)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_image_set_pivot_y_def = { - "lv_image_set_pivot_y", - (PyCFunction)py_lv_image_set_pivot_y, +static PyMethodDef py_lv_arclabel_get_angle_start_def = { + "lv_arclabel_get_angle_start", + (PyCFunction)py_lv_arclabel_get_angle_start, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33001,29 +44883,28 @@ static PyMethodDef py_lv_image_set_pivot_y_def = { /* * lvgl extension definition for: - * void lv_image_set_scale(lv_obj_t *obj, uint32_t zoom) + * lv_value_precise_t lv_arclabel_get_angle_size(lv_obj_t *obj) */ -static PyObject *py_lv_image_set_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_angle_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long zoom_val; - if (!PyArg_ParseTuple(py_args, "l", &zoom_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t zoom = (uint32_t)zoom_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_value_precise_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_image_set_scale)(obj, zoom); + _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arclabel_get_angle_size)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_image_set_scale_def = { - "lv_image_set_scale", - (PyCFunction)py_lv_image_set_scale, +static PyMethodDef py_lv_arclabel_get_angle_size_def = { + "lv_arclabel_get_angle_size", + (PyCFunction)py_lv_arclabel_get_angle_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33031,29 +44912,28 @@ static PyMethodDef py_lv_image_set_scale_def = { /* * lvgl extension definition for: - * void lv_image_set_scale_x(lv_obj_t *obj, uint32_t zoom) + * lv_arclabel_dir_t lv_arclabel_get_dir(const lv_obj_t *obj) */ -static PyObject *py_lv_image_set_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long zoom_val; - if (!PyArg_ParseTuple(py_args, "l", &zoom_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t zoom = (uint32_t)zoom_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_arclabel_dir_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_image_set_scale_x)(obj, zoom); + _res = ((lv_arclabel_dir_t (*)(const lv_obj_t *))lv_arclabel_get_dir)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_set_scale_x_def = { - "lv_image_set_scale_x", - (PyCFunction)py_lv_image_set_scale_x, +static PyMethodDef py_lv_arclabel_get_dir_def = { + "lv_arclabel_get_dir", + (PyCFunction)py_lv_arclabel_get_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33061,29 +44941,28 @@ static PyMethodDef py_lv_image_set_scale_x_def = { /* * lvgl extension definition for: - * void lv_image_set_scale_y(lv_obj_t *obj, uint32_t zoom) + * bool lv_arclabel_get_recolor(lv_obj_t *obj) */ -static PyObject *py_lv_image_set_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long zoom_val; - if (!PyArg_ParseTuple(py_args, "l", &zoom_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t zoom = (uint32_t)zoom_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_image_set_scale_y)(obj, zoom); + _res = ((bool (*)(lv_obj_t *))lv_arclabel_get_recolor)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_image_set_scale_y_def = { - "lv_image_set_scale_y", - (PyCFunction)py_lv_image_set_scale_y, +static PyMethodDef py_lv_arclabel_get_recolor_def = { + "lv_arclabel_get_recolor", + (PyCFunction)py_lv_arclabel_get_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33091,29 +44970,28 @@ static PyMethodDef py_lv_image_set_scale_y_def = { /* * lvgl extension definition for: - * void lv_image_set_blend_mode(lv_obj_t *obj, lv_blend_mode_t blend_mode) + * uint32_t lv_arclabel_get_radius(lv_obj_t *obj) */ -static PyObject *py_lv_image_set_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *blend_mode_py; - if (!PyArg_ParseTuple(py_args, "O", &blend_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_blend_mode_t blend_mode = (int)mp_obj_get_int(blend_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_blend_mode_t))lv_image_set_blend_mode)(obj, blend_mode); + _res = ((uint32_t (*)(lv_obj_t *))lv_arclabel_get_radius)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_set_blend_mode_def = { - "lv_image_set_blend_mode", - (PyCFunction)py_lv_image_set_blend_mode, +static PyMethodDef py_lv_arclabel_get_radius_def = { + "lv_arclabel_get_radius", + (PyCFunction)py_lv_arclabel_get_radius, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33121,29 +44999,28 @@ static PyMethodDef py_lv_image_set_blend_mode_def = { /* * lvgl extension definition for: - * void lv_image_set_antialias(lv_obj_t *obj, bool antialias) + * uint32_t lv_arclabel_get_center_offset_x(lv_obj_t *obj) */ -static PyObject *py_lv_image_set_antialias(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_center_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long antialias_val; - if (!PyArg_ParseTuple(py_args, "l", &antialias_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - bool antialias = (antialias_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_image_set_antialias)(obj, antialias); + _res = ((uint32_t (*)(lv_obj_t *))lv_arclabel_get_center_offset_x)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_set_antialias_def = { - "lv_image_set_antialias", - (PyCFunction)py_lv_image_set_antialias, +static PyMethodDef py_lv_arclabel_get_center_offset_x_def = { + "lv_arclabel_get_center_offset_x", + (PyCFunction)py_lv_arclabel_get_center_offset_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33151,29 +45028,28 @@ static PyMethodDef py_lv_image_set_antialias_def = { /* * lvgl extension definition for: - * void lv_image_set_inner_align(lv_obj_t *obj, lv_image_align_t align) + * uint32_t lv_arclabel_get_center_offset_y(lv_obj_t *obj) */ -static PyObject *py_lv_image_set_inner_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_center_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_image_align_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_image_align_t))lv_image_set_inner_align)(obj, align); + _res = ((uint32_t (*)(lv_obj_t *))lv_arclabel_get_center_offset_y)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_set_inner_align_def = { - "lv_image_set_inner_align", - (PyCFunction)py_lv_image_set_inner_align, +static PyMethodDef py_lv_arclabel_get_center_offset_y_def = { + "lv_arclabel_get_center_offset_y", + (PyCFunction)py_lv_arclabel_get_center_offset_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33181,29 +45057,28 @@ static PyMethodDef py_lv_image_set_inner_align_def = { /* * lvgl extension definition for: - * void lv_image_set_bitmap_map_src(lv_obj_t *obj, const lv_image_dsc_t *src) + * lv_arclabel_text_align_t lv_arclabel_get_text_vertical_align(lv_obj_t *obj) */ -static PyObject *py_lv_image_set_bitmap_map_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_text_vertical_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const lv_image_dsc_t *src = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_arclabel_text_align_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_image_dsc_t *))lv_image_set_bitmap_map_src)(obj, src); + _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_arclabel_get_text_vertical_align)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_set_bitmap_map_src_def = { - "lv_image_set_bitmap_map_src", - (PyCFunction)py_lv_image_set_bitmap_map_src, +static PyMethodDef py_lv_arclabel_get_text_vertical_align_def = { + "lv_arclabel_get_text_vertical_align", + (PyCFunction)py_lv_arclabel_get_text_vertical_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33211,9 +45086,9 @@ static PyMethodDef py_lv_image_set_bitmap_map_src_def = { /* * lvgl extension definition for: - * const void *lv_image_get_src(lv_obj_t *obj) + * lv_arclabel_text_align_t lv_arclabel_get_text_horizontal_align(lv_obj_t *obj) */ -static PyObject *py_lv_image_get_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_text_horizontal_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -33221,18 +45096,18 @@ static PyObject *py_lv_image_get_src(PyObject *self, PyObject *py_args, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; + lv_arclabel_text_align_t _res; lvpy_lock(); - _res = ((const void *(*)(lv_obj_t *))lv_image_get_src)(obj); + _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_arclabel_get_text_horizontal_align)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_get_src_def = { - "lv_image_get_src", - (PyCFunction)py_lv_image_get_src, +static PyMethodDef py_lv_arclabel_get_text_horizontal_align_def = { + "lv_arclabel_get_text_horizontal_align", + (PyCFunction)py_lv_arclabel_get_text_horizontal_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33240,9 +45115,9 @@ static PyMethodDef py_lv_image_get_src_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_offset_x(lv_obj_t *obj) + * lv_arclabel_overflow_t lv_arclabel_get_overflow(lv_obj_t *obj) */ -static PyObject *py_lv_image_get_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -33250,18 +45125,18 @@ static PyObject *py_lv_image_get_offset_x(PyObject *self, PyObject *py_args, PyO lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_arclabel_overflow_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_offset_x)(obj); + _res = ((lv_arclabel_overflow_t (*)(lv_obj_t *))lv_arclabel_get_overflow)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_get_offset_x_def = { - "lv_image_get_offset_x", - (PyCFunction)py_lv_image_get_offset_x, +static PyMethodDef py_lv_arclabel_get_overflow_def = { + "lv_arclabel_get_overflow", + (PyCFunction)py_lv_arclabel_get_overflow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33269,9 +45144,9 @@ static PyMethodDef py_lv_image_get_offset_x_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_offset_y(lv_obj_t *obj) + * bool lv_arclabel_get_end_overlap(lv_obj_t *obj) */ -static PyObject *py_lv_image_get_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_end_overlap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -33279,18 +45154,18 @@ static PyObject *py_lv_image_get_offset_y(PyObject *self, PyObject *py_args, PyO lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_offset_y)(obj); + _res = ((bool (*)(lv_obj_t *))lv_arclabel_get_end_overlap)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_image_get_offset_y_def = { - "lv_image_get_offset_y", - (PyCFunction)py_lv_image_get_offset_y, +static PyMethodDef py_lv_arclabel_get_end_overlap_def = { + "lv_arclabel_get_end_overlap", + (PyCFunction)py_lv_arclabel_get_end_overlap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33298,9 +45173,9 @@ static PyMethodDef py_lv_image_get_offset_y_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_rotation(lv_obj_t *obj) + * lv_value_precise_t lv_arclabel_get_text_angle(lv_obj_t *obj) */ -static PyObject *py_lv_image_get_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_get_text_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -33308,18 +45183,18 @@ static PyObject *py_lv_image_get_rotation(PyObject *self, PyObject *py_args, PyO lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_value_precise_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_rotation)(obj); + _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arclabel_get_text_angle)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_image_get_rotation_def = { - "lv_image_get_rotation", - (PyCFunction)py_lv_image_get_rotation, +static PyMethodDef py_lv_arclabel_get_text_angle_def = { + "lv_arclabel_get_text_angle", + (PyCFunction)py_lv_arclabel_get_text_angle, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33327,58 +45202,131 @@ static PyMethodDef py_lv_image_get_rotation_def = { /* * lvgl extension definition for: - * void lv_image_get_pivot(lv_obj_t *obj, lv_point_t *pivot) + * lv_obj_t *lv_arclabel_create(lv_obj_t *parent) */ -static PyObject *py_lv_image_get_pivot(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_arclabel_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *pivot_py; - if (!PyArg_ParseTuple(py_args, "O", &pivot_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_point_t *pivot = mp_write_ptr_lv_point_t(pivot_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_point_t *))lv_image_get_pivot)(obj, pivot); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_arclabel_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_image_get_pivot_def = { - "lv_image_get_pivot", - (PyCFunction)py_lv_image_get_pivot, +static PyMethodDef py_lv_arclabel_create_def = { + "lv_arclabel_create", + (PyCFunction)py_lv_arclabel_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl arclabel object definitions (CPython) + */ +static PyObject *py_lv_arclabel_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_arclabel_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_arclabel_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_arclabel_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_arclabel_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_arclabel_methods[] = { + {"set_text", (PyCFunction)py_lv_arclabel_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_static", (PyCFunction)py_lv_arclabel_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_angle_start", (PyCFunction)py_lv_arclabel_set_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_angle_size", (PyCFunction)py_lv_arclabel_set_angle_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_offset", (PyCFunction)py_lv_arclabel_set_offset, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_dir", (PyCFunction)py_lv_arclabel_set_dir, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_recolor", (PyCFunction)py_lv_arclabel_set_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_radius", (PyCFunction)py_lv_arclabel_set_radius, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_center_offset_x", (PyCFunction)py_lv_arclabel_set_center_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_center_offset_y", (PyCFunction)py_lv_arclabel_set_center_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_vertical_align", (PyCFunction)py_lv_arclabel_set_text_vertical_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_horizontal_align", (PyCFunction)py_lv_arclabel_set_text_horizontal_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_overflow", (PyCFunction)py_lv_arclabel_set_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_end_overlap", (PyCFunction)py_lv_arclabel_set_end_overlap, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_angle_start", (PyCFunction)py_lv_arclabel_get_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_angle_size", (PyCFunction)py_lv_arclabel_get_angle_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dir", (PyCFunction)py_lv_arclabel_get_dir, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_recolor", (PyCFunction)py_lv_arclabel_get_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_radius", (PyCFunction)py_lv_arclabel_get_radius, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_center_offset_x", (PyCFunction)py_lv_arclabel_get_center_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_center_offset_y", (PyCFunction)py_lv_arclabel_get_center_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text_vertical_align", (PyCFunction)py_lv_arclabel_get_text_vertical_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text_horizontal_align", (PyCFunction)py_lv_arclabel_get_text_horizontal_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_overflow", (PyCFunction)py_lv_arclabel_get_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_end_overlap", (PyCFunction)py_lv_arclabel_get_end_overlap, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text_angle", (PyCFunction)py_lv_arclabel_get_text_angle, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_arclabel_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.arclabel", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_arclabel_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_arclabel_new, + .tp_methods = py_lv_arclabel_methods, + .tp_call = (ternaryfunc)py_lv_arclabel_call, +}; + +static py_lv_obj_type_t py_lv_arclabel_mapping = { + .lv_obj_class = &lv_arclabel_class, + .py_type = &py_lv_arclabel_type, +}; + + /* * lvgl extension definition for: - * int32_t lv_image_get_scale(lv_obj_t *obj) + * void lv_label_set_text(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_image_get_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_scale)(obj); + ((void (*)(lv_obj_t *, const char *))lv_label_set_text)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_scale_def = { - "lv_image_get_scale", - (PyCFunction)py_lv_image_get_scale, +static PyMethodDef py_lv_label_set_text_def = { + "lv_label_set_text", + (PyCFunction)py_lv_label_set_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33386,28 +45334,29 @@ static PyMethodDef py_lv_image_get_scale_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_scale_x(lv_obj_t *obj) + * void lv_label_set_text_static(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_image_get_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_scale_x)(obj); + ((void (*)(lv_obj_t *, const char *))lv_label_set_text_static)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_scale_x_def = { - "lv_image_get_scale_x", - (PyCFunction)py_lv_image_get_scale_x, +static PyMethodDef py_lv_label_set_text_static_def = { + "lv_label_set_text_static", + (PyCFunction)py_lv_label_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33415,28 +45364,29 @@ static PyMethodDef py_lv_image_get_scale_x_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_scale_y(lv_obj_t *obj) + * void lv_label_set_long_mode(lv_obj_t *obj, lv_label_long_mode_t long_mode) */ -static PyObject *py_lv_image_get_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_set_long_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *long_mode_py; + if (!PyArg_ParseTuple(py_args, "O", &long_mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_label_long_mode_t long_mode = (int)mp_obj_get_int(long_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_scale_y)(obj); + ((void (*)(lv_obj_t *, lv_label_long_mode_t))lv_label_set_long_mode)(obj, long_mode); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_scale_y_def = { - "lv_image_get_scale_y", - (PyCFunction)py_lv_image_get_scale_y, +static PyMethodDef py_lv_label_set_long_mode_def = { + "lv_label_set_long_mode", + (PyCFunction)py_lv_label_set_long_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33444,28 +45394,29 @@ static PyMethodDef py_lv_image_get_scale_y_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_src_width(lv_obj_t *obj) + * void lv_label_set_max_lines(lv_obj_t *obj, int32_t lines) */ -static PyObject *py_lv_image_get_src_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_set_max_lines(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long lines_val; + if (!PyArg_ParseTuple(py_args, "l", &lines_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t lines = (int32_t)lines_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_src_width)(obj); + ((void (*)(lv_obj_t *, int32_t))lv_label_set_max_lines)(obj, lines); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_src_width_def = { - "lv_image_get_src_width", - (PyCFunction)py_lv_image_get_src_width, +static PyMethodDef py_lv_label_set_max_lines_def = { + "lv_label_set_max_lines", + (PyCFunction)py_lv_label_set_max_lines, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33473,28 +45424,29 @@ static PyMethodDef py_lv_image_get_src_width_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_src_height(lv_obj_t *obj) + * void lv_label_set_text_selection_start(lv_obj_t *obj, uint32_t index) */ -static PyObject *py_lv_image_get_src_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_set_text_selection_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_src_height)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_label_set_text_selection_start)(obj, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_src_height_def = { - "lv_image_get_src_height", - (PyCFunction)py_lv_image_get_src_height, +static PyMethodDef py_lv_label_set_text_selection_start_def = { + "lv_label_set_text_selection_start", + (PyCFunction)py_lv_label_set_text_selection_start, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33502,28 +45454,29 @@ static PyMethodDef py_lv_image_get_src_height_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_transformed_width(lv_obj_t *obj) + * void lv_label_set_text_selection_end(lv_obj_t *obj, uint32_t index) */ -static PyObject *py_lv_image_get_transformed_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_set_text_selection_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_transformed_width)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_label_set_text_selection_end)(obj, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_transformed_width_def = { - "lv_image_get_transformed_width", - (PyCFunction)py_lv_image_get_transformed_width, +static PyMethodDef py_lv_label_set_text_selection_end_def = { + "lv_label_set_text_selection_end", + (PyCFunction)py_lv_label_set_text_selection_end, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33531,28 +45484,29 @@ static PyMethodDef py_lv_image_get_transformed_width_def = { /* * lvgl extension definition for: - * int32_t lv_image_get_transformed_height(lv_obj_t *obj) + * void lv_label_set_recolor(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_image_get_transformed_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_set_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_image_get_transformed_height)(obj); + ((void (*)(lv_obj_t *, bool))lv_label_set_recolor)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_transformed_height_def = { - "lv_image_get_transformed_height", - (PyCFunction)py_lv_image_get_transformed_height, +static PyMethodDef py_lv_label_set_recolor_def = { + "lv_label_set_recolor", + (PyCFunction)py_lv_label_set_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33560,9 +45514,9 @@ static PyMethodDef py_lv_image_get_transformed_height_def = { /* * lvgl extension definition for: - * lv_blend_mode_t lv_image_get_blend_mode(lv_obj_t *obj) + * char *lv_label_get_text(const lv_obj_t *obj) */ -static PyObject *py_lv_image_get_blend_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -33570,18 +45524,18 @@ static PyObject *py_lv_image_get_blend_mode(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_blend_mode_t _res; + char * _res; lvpy_lock(); - _res = ((lv_blend_mode_t (*)(lv_obj_t *))lv_image_get_blend_mode)(obj); + _res = ((char *(*)(const lv_obj_t *))lv_label_get_text)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_image_get_blend_mode_def = { - "lv_image_get_blend_mode", - (PyCFunction)py_lv_image_get_blend_mode, +static PyMethodDef py_lv_label_get_text_def = { + "lv_label_get_text", + (PyCFunction)py_lv_label_get_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33589,9 +45543,9 @@ static PyMethodDef py_lv_image_get_blend_mode_def = { /* * lvgl extension definition for: - * bool lv_image_get_antialias(lv_obj_t *obj) + * lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t *obj) */ -static PyObject *py_lv_image_get_antialias(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_long_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -33599,18 +45553,18 @@ static PyObject *py_lv_image_get_antialias(PyObject *self, PyObject *py_args, Py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_label_long_mode_t _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_image_get_antialias)(obj); + _res = ((lv_label_long_mode_t (*)(const lv_obj_t *))lv_label_get_long_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_get_antialias_def = { - "lv_image_get_antialias", - (PyCFunction)py_lv_image_get_antialias, +static PyMethodDef py_lv_label_get_long_mode_def = { + "lv_label_get_long_mode", + (PyCFunction)py_lv_label_get_long_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33618,9 +45572,9 @@ static PyMethodDef py_lv_image_get_antialias_def = { /* * lvgl extension definition for: - * lv_image_align_t lv_image_get_inner_align(lv_obj_t *obj) + * int32_t lv_label_get_max_lines(const lv_obj_t *obj) */ -static PyObject *py_lv_image_get_inner_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_max_lines(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -33628,18 +45582,18 @@ static PyObject *py_lv_image_get_inner_align(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_image_align_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_image_align_t (*)(lv_obj_t *))lv_image_get_inner_align)(obj); + _res = ((int32_t (*)(const lv_obj_t *))lv_label_get_max_lines)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_get_inner_align_def = { - "lv_image_get_inner_align", - (PyCFunction)py_lv_image_get_inner_align, +static PyMethodDef py_lv_label_get_max_lines_def = { + "lv_label_get_max_lines", + (PyCFunction)py_lv_label_get_max_lines, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33647,28 +45601,30 @@ static PyMethodDef py_lv_image_get_inner_align_def = { /* * lvgl extension definition for: - * const lv_image_dsc_t *lv_image_get_bitmap_map_src(lv_obj_t *obj) + * void lv_label_get_letter_pos(const lv_obj_t *obj, uint32_t char_id, lv_point_t *pos) */ -static PyObject *py_lv_image_get_bitmap_map_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_letter_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long char_id_val; PyObject *pos_py; + if (!PyArg_ParseTuple(py_args, "lO", &char_id_val, &pos_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t char_id = (uint32_t)char_id_val; + lv_point_t *pos = mp_write_ptr_lv_point_t(pos_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_image_dsc_t * _res; lvpy_lock(); - _res = ((const lv_image_dsc_t *(*)(lv_obj_t *))lv_image_get_bitmap_map_src)(obj); + ((void (*)(const lv_obj_t *, uint32_t, lv_point_t *))lv_label_get_letter_pos)(obj, char_id, pos); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_image_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_get_bitmap_map_src_def = { - "lv_image_get_bitmap_map_src", - (PyCFunction)py_lv_image_get_bitmap_map_src, +static PyMethodDef py_lv_label_get_letter_pos_def = { + "lv_label_get_letter_pos", + (PyCFunction)py_lv_label_get_letter_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33676,30 +45632,31 @@ static PyMethodDef py_lv_image_get_bitmap_map_src_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_image_bind_src(lv_obj_t *obj, lv_subject_t *subject) + * uint32_t lv_label_get_letter_on(const lv_obj_t *obj, lv_point_t *pos_in, bool bidi) */ -static PyObject *py_lv_image_bind_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_letter_on(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *pos_in_py; long bidi_val; + if (!PyArg_ParseTuple(py_args, "Ol", &pos_in_py, &bidi_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + lv_point_t *pos_in = mp_write_ptr_lv_point_t(pos_in_py); + bool bidi = (bidi_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_image_bind_src)(obj, subject); + _res = ((uint32_t (*)(const lv_obj_t *, lv_point_t *, bool))lv_label_get_letter_on)(obj, pos_in, bidi); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_bind_src_def = { - "lv_image_bind_src", - (PyCFunction)py_lv_image_bind_src, +static PyMethodDef py_lv_label_get_letter_on_def = { + "lv_label_get_letter_on", + (PyCFunction)py_lv_label_get_letter_on, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33707,30 +45664,30 @@ static PyMethodDef py_lv_image_bind_src_def = { /* * lvgl extension definition for: - * lv_result_t lv_image_header_cache_init(uint32_t count) + * bool lv_label_is_char_under_pos(const lv_obj_t *obj, lv_point_t *pos) */ -static PyObject *py_lv_image_header_cache_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_is_char_under_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long count_val; - if (!PyArg_ParseTuple(py_args, "l", &count_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t count = (uint32_t)count_val; + PyObject *pos_py; + if (!PyArg_ParseTuple(py_args, "O", &pos_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_point_t *pos = mp_write_ptr_lv_point_t(pos_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + bool _res; lvpy_lock(); - _res = ((lv_result_t (*)(uint32_t))lv_image_header_cache_init)(count); + _res = ((bool (*)(const lv_obj_t *, lv_point_t *))lv_label_is_char_under_pos)(obj, pos); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_image_header_cache_init_def = { - "lv_image_header_cache_init", - (PyCFunction)py_lv_image_header_cache_init, +static PyMethodDef py_lv_label_is_char_under_pos_def = { + "lv_label_is_char_under_pos", + (PyCFunction)py_lv_label_is_char_under_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33738,30 +45695,28 @@ static PyMethodDef py_lv_image_header_cache_init_def = { /* * lvgl extension definition for: - * void lv_image_header_cache_resize(uint32_t count, bool evict_now) + * uint32_t lv_label_get_text_selection_start(const lv_obj_t *obj) */ -static PyObject *py_lv_image_header_cache_resize(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_text_selection_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long count_val; long evict_now_val; - if (!PyArg_ParseTuple(py_args, "ll", &count_val, &evict_now_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t count = (uint32_t)count_val; - bool evict_now = (evict_now_val != 0); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(uint32_t, bool))lv_image_header_cache_resize)(count, evict_now); + _res = ((uint32_t (*)(const lv_obj_t *))lv_label_get_text_selection_start)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_header_cache_resize_def = { - "lv_image_header_cache_resize", - (PyCFunction)py_lv_image_header_cache_resize, +static PyMethodDef py_lv_label_get_text_selection_start_def = { + "lv_label_get_text_selection_start", + (PyCFunction)py_lv_label_get_text_selection_start, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33769,29 +45724,28 @@ static PyMethodDef py_lv_image_header_cache_resize_def = { /* * lvgl extension definition for: - * void lv_image_header_cache_drop(const void *src) + * uint32_t lv_label_get_text_selection_end(const lv_obj_t *obj) */ -static PyObject *py_lv_image_header_cache_drop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_text_selection_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - const void *src = (const void *)mp_to_ptr(src_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(const void *))lv_image_header_cache_drop)(src); + _res = ((uint32_t (*)(const lv_obj_t *))lv_label_get_text_selection_end)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_header_cache_drop_def = { - "lv_image_header_cache_drop", - (PyCFunction)py_lv_image_header_cache_drop, +static PyMethodDef py_lv_label_get_text_selection_end_def = { + "lv_label_get_text_selection_end", + (PyCFunction)py_lv_label_get_text_selection_end, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33799,168 +45753,60 @@ static PyMethodDef py_lv_image_header_cache_drop_def = { /* * lvgl extension definition for: - * bool lv_image_header_cache_is_enabled(void) + * bool lv_label_get_recolor(const lv_obj_t *obj) */ -static PyObject *py_lv_image_header_cache_is_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_get_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(void))lv_image_header_cache_is_enabled)(); + _res = ((bool (*)(const lv_obj_t *))lv_label_get_recolor)(obj); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_image_header_cache_is_enabled_def = { - "lv_image_header_cache_is_enabled", - (PyCFunction)py_lv_image_header_cache_is_enabled, +static PyMethodDef py_lv_label_get_recolor_def = { + "lv_label_get_recolor", + (PyCFunction)py_lv_label_get_recolor, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Struct lv_iter_t (CPython) - */ - -extern PyMethodDef py_lv_iter_t_methods[]; - -static PyObject *py_lv_iter_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_iter_t *data = (lv_iter_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - (void)attr; - for (PyMethodDef *m = py_lv_iter_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_iter_t_field_names[] = {NULL}; - -static PyObject *py_lv_iter_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_iter_t_field_names, py_lv_iter_t_methods); -} - -static PyMethodDef py_lv_iter_t_type_methods[] = { - {"__dir__", py_lv_iter_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_iter_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_iter_t *data = (lv_iter_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - - (void)value; - if (PyErr_Occurred()) { - - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_iter_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_iter_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, 0); -} - -static void py_lv_iter_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_iter_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_iter_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_iter_t_dealloc, - .tp_getattro = (getter)py_lv_iter_t_getattro, - .tp_setattro = (setter)py_lv_iter_t_setattro, - .tp_new = py_lv_iter_t_new, - .tp_methods = py_lv_iter_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_iter_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_iter_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_iter_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_iter_t*)self->data; -} - -#define mp_write_lv_iter_t(struct_obj) (*((lv_iter_t*)mp_write_ptr_lv_iter_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_iter_t(void *field) -{ - return lv_to_mp_struct(&py_lv_iter_t_type, field); -} - -#define mp_read_lv_iter_t(field) lv_to_mp_struct_own(&py_lv_iter_t_type, copy_buffer(&field, sizeof(lv_iter_t))) -#define mp_read_byref_lv_iter_t(field) mp_read_ptr_lv_iter_t(&field) - - /* * lvgl extension definition for: - * lv_iter_t *lv_image_header_cache_iter_create(void) + * lv_observer_t *lv_label_bind_text(lv_obj_t *obj, lv_subject_t *subject, const char *fmt) */ -static PyObject *py_lv_image_header_cache_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_bind_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *subject_py; PyObject *fmt_py; + if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &fmt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + const char *fmt = (const char *)(char*)convert_from_str(fmt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_iter_t * _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((lv_iter_t *(*)(void))lv_image_header_cache_iter_create)(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, const char *))lv_label_bind_text)(obj, subject, fmt); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_iter_t((void*)_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_image_header_cache_iter_create_def = { - "lv_image_header_cache_iter_create", - (PyCFunction)py_lv_image_header_cache_iter_create, +static PyMethodDef py_lv_label_bind_text_def = { + "lv_label_bind_text", + (PyCFunction)py_lv_label_bind_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33968,28 +45814,30 @@ static PyMethodDef py_lv_image_header_cache_iter_create_def = { /* * lvgl extension definition for: - * void lv_image_header_cache_dump(void) + * void lv_label_ins_text(lv_obj_t *obj, uint32_t pos, const char *txt) */ -static PyObject *py_lv_image_header_cache_dump(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_ins_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long pos_val; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "lO", &pos_val, &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t pos = (uint32_t)pos_val; + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_image_header_cache_dump)(); + ((void (*)(lv_obj_t *, uint32_t, const char *))lv_label_ins_text)(obj, pos, txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_header_cache_dump_def = { - "lv_image_header_cache_dump", - (PyCFunction)py_lv_image_header_cache_dump, +static PyMethodDef py_lv_label_ins_text_def = { + "lv_label_ins_text", + (PyCFunction)py_lv_label_ins_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -33997,30 +45845,30 @@ static PyMethodDef py_lv_image_header_cache_dump_def = { /* * lvgl extension definition for: - * lv_result_t lv_image_cache_init(uint32_t size) + * void lv_label_cut_text(lv_obj_t *obj, uint32_t pos, uint32_t cnt) */ -static PyObject *py_lv_image_cache_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_cut_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t size = (uint32_t)size_val; + long pos_val; long cnt_val; + if (!PyArg_ParseTuple(py_args, "ll", &pos_val, &cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t pos = (uint32_t)pos_val; + uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(uint32_t))lv_image_cache_init)(size); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_label_cut_text)(obj, pos, cnt); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_cache_init_def = { - "lv_image_cache_init", - (PyCFunction)py_lv_image_cache_init, +static PyMethodDef py_lv_label_cut_text_def = { + "lv_label_cut_text", + (PyCFunction)py_lv_label_cut_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34028,60 +45876,125 @@ static PyMethodDef py_lv_image_cache_init_def = { /* * lvgl extension definition for: - * void lv_image_cache_resize(uint32_t new_size, bool evict_now) + * lv_obj_t *lv_label_create(lv_obj_t *parent) */ -static PyObject *py_lv_image_cache_resize(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_label_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long new_size_val; long evict_now_val; - if (!PyArg_ParseTuple(py_args, "ll", &new_size_val, &evict_now_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t new_size = (uint32_t)new_size_val; - bool evict_now = (evict_now_val != 0); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(uint32_t, bool))lv_image_cache_resize)(new_size, evict_now); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_label_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_image_cache_resize_def = { - "lv_image_cache_resize", - (PyCFunction)py_lv_image_cache_resize, +static PyMethodDef py_lv_label_create_def = { + "lv_label_create", + (PyCFunction)py_lv_label_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl label object definitions (CPython) + */ +static PyObject *py_lv_label_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_label_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_label_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_label_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_label_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_label_methods[] = { + {"set_text", (PyCFunction)py_lv_label_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_static", (PyCFunction)py_lv_label_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_long_mode", (PyCFunction)py_lv_label_set_long_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_lines", (PyCFunction)py_lv_label_set_max_lines, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_selection_start", (PyCFunction)py_lv_label_set_text_selection_start, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_selection_end", (PyCFunction)py_lv_label_set_text_selection_end, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_recolor", (PyCFunction)py_lv_label_set_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text", (PyCFunction)py_lv_label_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_long_mode", (PyCFunction)py_lv_label_get_long_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_lines", (PyCFunction)py_lv_label_get_max_lines, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_letter_pos", (PyCFunction)py_lv_label_get_letter_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_letter_on", (PyCFunction)py_lv_label_get_letter_on, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_char_under_pos", (PyCFunction)py_lv_label_is_char_under_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text_selection_start", (PyCFunction)py_lv_label_get_text_selection_start, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text_selection_end", (PyCFunction)py_lv_label_get_text_selection_end, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_recolor", (PyCFunction)py_lv_label_get_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_text", (PyCFunction)py_lv_label_bind_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ins_text", (PyCFunction)py_lv_label_ins_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cut_text", (PyCFunction)py_lv_label_cut_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_label_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.label", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_label_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_label_new, + .tp_methods = py_lv_label_methods, + .tp_call = (ternaryfunc)py_lv_label_call, +}; + +static py_lv_obj_type_t py_lv_label_mapping = { + .lv_obj_class = &lv_label_class, + .py_type = &py_lv_label_type, +}; + + /* * lvgl extension definition for: - * void lv_image_cache_drop(const void *src) + * void lv_bar_set_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim) */ -static PyObject *py_lv_image_cache_drop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - const void *src = (const void *)mp_to_ptr(src_py); + long value_val; PyObject *anim_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const void *))lv_image_cache_drop)(src); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_bar_set_value)(obj, value, anim); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_cache_drop_def = { - "lv_image_cache_drop", - (PyCFunction)py_lv_image_cache_drop, +static PyMethodDef py_lv_bar_set_value_def = { + "lv_bar_set_value", + (PyCFunction)py_lv_bar_set_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34089,29 +46002,30 @@ static PyMethodDef py_lv_image_cache_drop_def = { /* * lvgl extension definition for: - * bool lv_image_cache_is_enabled(void) + * void lv_bar_set_start_value(lv_obj_t *obj, int32_t start_value, lv_anim_enable_t anim) */ -static PyObject *py_lv_image_cache_is_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_set_start_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long start_value_val; PyObject *anim_py; + if (!PyArg_ParseTuple(py_args, "lO", &start_value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t start_value = (int32_t)start_value_val; + lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(void))lv_image_cache_is_enabled)(); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_bar_set_start_value)(obj, start_value, anim); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_cache_is_enabled_def = { - "lv_image_cache_is_enabled", - (PyCFunction)py_lv_image_cache_is_enabled, +static PyMethodDef py_lv_bar_set_start_value_def = { + "lv_bar_set_start_value", + (PyCFunction)py_lv_bar_set_start_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34119,29 +46033,30 @@ static PyMethodDef py_lv_image_cache_is_enabled_def = { /* * lvgl extension definition for: - * lv_iter_t *lv_image_cache_iter_create(void) + * void lv_bar_set_range(lv_obj_t *obj, int32_t min, int32_t max) */ -static PyObject *py_lv_image_cache_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_iter_t * _res; lvpy_lock(); - _res = ((lv_iter_t *(*)(void))lv_image_cache_iter_create)(); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_bar_set_range)(obj, min, max); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_iter_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_cache_iter_create_def = { - "lv_image_cache_iter_create", - (PyCFunction)py_lv_image_cache_iter_create, +static PyMethodDef py_lv_bar_set_range_def = { + "lv_bar_set_range", + (PyCFunction)py_lv_bar_set_range, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34149,28 +46064,29 @@ static PyMethodDef py_lv_image_cache_iter_create_def = { /* * lvgl extension definition for: - * void lv_image_cache_dump(void) + * void lv_bar_set_min_value(lv_obj_t *obj, int32_t min) */ -static PyObject *py_lv_image_cache_dump(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long min_val; + if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_image_cache_dump)(); + ((void (*)(lv_obj_t *, int32_t))lv_bar_set_min_value)(obj, min); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_cache_dump_def = { - "lv_image_cache_dump", - (PyCFunction)py_lv_image_cache_dump, +static PyMethodDef py_lv_bar_set_min_value_def = { + "lv_bar_set_min_value", + (PyCFunction)py_lv_bar_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34178,35 +46094,29 @@ static PyMethodDef py_lv_image_cache_dump_def = { /* * lvgl extension definition for: - * void lv_image_buf_get_transformed_area(lv_area_t *res, int32_t w, int32_t h, int32_t angle, uint16_t scale_x, uint16_t scale_y, const lv_point_t *pivot) + * void lv_bar_set_max_value(lv_obj_t *obj, int32_t max) */ -static PyObject *py_lv_image_buf_get_transformed_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *res_py; long w_val; long h_val; long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; - if (!PyArg_ParseTuple(py_args, "OlllllO", &res_py, &w_val, &h_val, &angle_val, &scale_x_val, &scale_y_val, &pivot_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *res = mp_write_ptr_lv_area_t(res_py); - int32_t w = (int32_t)w_val; - int32_t h = (int32_t)h_val; - int32_t angle = (int32_t)angle_val; - uint16_t scale_x = (uint16_t)scale_x_val; - uint16_t scale_y = (uint16_t)scale_y_val; - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); + long max_val; + if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, uint16_t, uint16_t, const lv_point_t *))lv_image_buf_get_transformed_area)(res, w, h, angle, scale_x, scale_y, pivot); + ((void (*)(lv_obj_t *, int32_t))lv_bar_set_max_value)(obj, max); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_buf_get_transformed_area_def = { - "lv_image_buf_get_transformed_area", - (PyCFunction)py_lv_image_buf_get_transformed_area, +static PyMethodDef py_lv_bar_set_max_value_def = { + "lv_bar_set_max_value", + (PyCFunction)py_lv_bar_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34214,30 +46124,29 @@ static PyMethodDef py_lv_image_buf_get_transformed_area_def = { /* * lvgl extension definition for: - * void lv_image_decoder_init(uint32_t image_cache_size, uint32_t image_header_count) + * void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode) */ -static PyObject *py_lv_image_decoder_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long image_cache_size_val; long image_header_count_val; - if (!PyArg_ParseTuple(py_args, "ll", &image_cache_size_val, &image_header_count_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t image_cache_size = (uint32_t)image_cache_size_val; - uint32_t image_header_count = (uint32_t)image_header_count_val; + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_bar_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(uint32_t, uint32_t))lv_image_decoder_init)(image_cache_size, image_header_count); + ((void (*)(lv_obj_t *, lv_bar_mode_t))lv_bar_set_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_init_def = { - "lv_image_decoder_init", - (PyCFunction)py_lv_image_decoder_init, +static PyMethodDef py_lv_bar_set_mode_def = { + "lv_bar_set_mode", + (PyCFunction)py_lv_bar_set_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34245,28 +46154,29 @@ static PyMethodDef py_lv_image_decoder_init_def = { /* * lvgl extension definition for: - * void lv_image_decoder_deinit(void) + * void lv_bar_set_orientation(lv_obj_t *obj, lv_bar_orientation_t orientation) */ -static PyObject *py_lv_image_decoder_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_set_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *orientation_py; + if (!PyArg_ParseTuple(py_args, "O", &orientation_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_bar_orientation_t orientation = (int)mp_obj_get_int(orientation_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_image_decoder_deinit)(); + ((void (*)(lv_obj_t *, lv_bar_orientation_t))lv_bar_set_orientation)(obj, orientation); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_deinit_def = { - "lv_image_decoder_deinit", - (PyCFunction)py_lv_image_decoder_deinit, +static PyMethodDef py_lv_bar_set_orientation_def = { + "lv_bar_set_orientation", + (PyCFunction)py_lv_bar_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34274,168 +46184,57 @@ static PyMethodDef py_lv_image_decoder_deinit_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_image_create(lv_obj_t *parent) + * int32_t lv_bar_get_value(const lv_obj_t *obj) */ -static PyObject *py_lv_image_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_image_create)(parent); + _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_image_create_def = { - "lv_image_create", - (PyCFunction)py_lv_image_create, +static PyMethodDef py_lv_bar_get_value_def = { + "lv_bar_get_value", + (PyCFunction)py_lv_bar_get_value, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl image object definitions (CPython) - */ -static PyObject *py_lv_image_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_image_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_image_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_image_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_image_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_image_methods[] = { - {"buf_set_palette", (PyCFunction)py_lv_image_buf_set_palette, METH_VARARGS | METH_KEYWORDS, NULL}, - {"buf_free", (PyCFunction)py_lv_image_buf_free, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_get_info", (PyCFunction)py_lv_image_decoder_get_info, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_open", (PyCFunction)py_lv_image_decoder_open, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_get_area", (PyCFunction)py_lv_image_decoder_get_area, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_close", (PyCFunction)py_lv_image_decoder_close, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_create", (PyCFunction)py_lv_image_decoder_create, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_delete", (PyCFunction)py_lv_image_decoder_delete, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_get_next", (PyCFunction)py_lv_image_decoder_get_next, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_set_info_cb", (PyCFunction)py_lv_image_decoder_set_info_cb, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_set_open_cb", (PyCFunction)py_lv_image_decoder_set_open_cb, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_set_get_area_cb", (PyCFunction)py_lv_image_decoder_set_get_area_cb, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_set_close_cb", (PyCFunction)py_lv_image_decoder_set_close_cb, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_add_to_cache", (PyCFunction)py_lv_image_decoder_add_to_cache, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_post_process", (PyCFunction)py_lv_image_decoder_post_process, METH_VARARGS | METH_KEYWORDS, NULL}, - {"src_get_type", (PyCFunction)py_lv_image_src_get_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_src", (PyCFunction)py_lv_image_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_offset_x", (PyCFunction)py_lv_image_set_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_offset_y", (PyCFunction)py_lv_image_set_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rotation", (PyCFunction)py_lv_image_set_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pivot", (PyCFunction)py_lv_image_set_pivot, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pivot_x", (PyCFunction)py_lv_image_set_pivot_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pivot_y", (PyCFunction)py_lv_image_set_pivot_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scale", (PyCFunction)py_lv_image_set_scale, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scale_x", (PyCFunction)py_lv_image_set_scale_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scale_y", (PyCFunction)py_lv_image_set_scale_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_blend_mode", (PyCFunction)py_lv_image_set_blend_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_antialias", (PyCFunction)py_lv_image_set_antialias, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_inner_align", (PyCFunction)py_lv_image_set_inner_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bitmap_map_src", (PyCFunction)py_lv_image_set_bitmap_map_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_src", (PyCFunction)py_lv_image_get_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_offset_x", (PyCFunction)py_lv_image_get_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_offset_y", (PyCFunction)py_lv_image_get_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rotation", (PyCFunction)py_lv_image_get_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_pivot", (PyCFunction)py_lv_image_get_pivot, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scale", (PyCFunction)py_lv_image_get_scale, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scale_x", (PyCFunction)py_lv_image_get_scale_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scale_y", (PyCFunction)py_lv_image_get_scale_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_src_width", (PyCFunction)py_lv_image_get_src_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_src_height", (PyCFunction)py_lv_image_get_src_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_transformed_width", (PyCFunction)py_lv_image_get_transformed_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_transformed_height", (PyCFunction)py_lv_image_get_transformed_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_blend_mode", (PyCFunction)py_lv_image_get_blend_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_antialias", (PyCFunction)py_lv_image_get_antialias, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_inner_align", (PyCFunction)py_lv_image_get_inner_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_bitmap_map_src", (PyCFunction)py_lv_image_get_bitmap_map_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_src", (PyCFunction)py_lv_image_bind_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"header_cache_init", (PyCFunction)py_lv_image_header_cache_init, METH_VARARGS | METH_KEYWORDS, NULL}, - {"header_cache_resize", (PyCFunction)py_lv_image_header_cache_resize, METH_VARARGS | METH_KEYWORDS, NULL}, - {"header_cache_drop", (PyCFunction)py_lv_image_header_cache_drop, METH_VARARGS | METH_KEYWORDS, NULL}, - {"header_cache_is_enabled", (PyCFunction)py_lv_image_header_cache_is_enabled, METH_VARARGS | METH_KEYWORDS, NULL}, - {"header_cache_iter_create", (PyCFunction)py_lv_image_header_cache_iter_create, METH_VARARGS | METH_KEYWORDS, NULL}, - {"header_cache_dump", (PyCFunction)py_lv_image_header_cache_dump, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cache_init", (PyCFunction)py_lv_image_cache_init, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cache_resize", (PyCFunction)py_lv_image_cache_resize, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cache_drop", (PyCFunction)py_lv_image_cache_drop, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cache_is_enabled", (PyCFunction)py_lv_image_cache_is_enabled, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cache_iter_create", (PyCFunction)py_lv_image_cache_iter_create, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cache_dump", (PyCFunction)py_lv_image_cache_dump, METH_VARARGS | METH_KEYWORDS, NULL}, - {"buf_get_transformed_area", (PyCFunction)py_lv_image_buf_get_transformed_area, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_init", (PyCFunction)py_lv_image_decoder_init, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decoder_deinit", (PyCFunction)py_lv_image_decoder_deinit, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_image_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.image", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_image_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_image_new, - .tp_methods = py_lv_image_methods, - .tp_call = (ternaryfunc)py_lv_image_call, -}; - -static py_lv_obj_type_t py_lv_image_mapping = { - .lv_obj_class = &lv_image_class, - .py_type = &py_lv_image_type, -}; - - /* * lvgl extension definition for: - * void lv_animimg_set_src(lv_obj_t *obj, const void *dsc[], size_t num) + * int32_t lv_bar_get_start_value(const lv_obj_t *obj) */ -static PyObject *py_lv_animimg_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_get_start_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; long num_val; - if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &num_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const void **dsc = (const void **)mp_to_ptr(dsc_py); - size_t num = (size_t)num_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const void *[], size_t))lv_animimg_set_src)(obj, dsc, num); + _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_start_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_animimg_set_src_def = { - "lv_animimg_set_src", - (PyCFunction)py_lv_animimg_set_src, +static PyMethodDef py_lv_bar_get_start_value_def = { + "lv_bar_get_start_value", + (PyCFunction)py_lv_bar_get_start_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34443,30 +46242,28 @@ static PyMethodDef py_lv_animimg_set_src_def = { /* * lvgl extension definition for: - * void lv_animimg_set_src_reverse(lv_obj_t *obj, const void *dsc[], size_t num) + * int32_t lv_bar_get_min_value(const lv_obj_t *obj) */ -static PyObject *py_lv_animimg_set_src_reverse(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; long num_val; - if (!PyArg_ParseTuple(py_args, "Ol", &dsc_py, &num_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const void **dsc = (const void **)mp_to_ptr(dsc_py); - size_t num = (size_t)num_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const void *[], size_t))lv_animimg_set_src_reverse)(obj, dsc, num); + _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_min_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_animimg_set_src_reverse_def = { - "lv_animimg_set_src_reverse", - (PyCFunction)py_lv_animimg_set_src_reverse, +static PyMethodDef py_lv_bar_get_min_value_def = { + "lv_bar_get_min_value", + (PyCFunction)py_lv_bar_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34474,9 +46271,9 @@ static PyMethodDef py_lv_animimg_set_src_reverse_def = { /* * lvgl extension definition for: - * void lv_animimg_start(lv_obj_t *obj) + * int32_t lv_bar_get_max_value(const lv_obj_t *obj) */ -static PyObject *py_lv_animimg_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -34484,17 +46281,18 @@ static PyObject *py_lv_animimg_start(PyObject *self, PyObject *py_args, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_animimg_start)(obj); + _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_max_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_animimg_start_def = { - "lv_animimg_start", - (PyCFunction)py_lv_animimg_start, +static PyMethodDef py_lv_bar_get_max_value_def = { + "lv_bar_get_max_value", + (PyCFunction)py_lv_bar_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34502,9 +46300,9 @@ static PyMethodDef py_lv_animimg_start_def = { /* * lvgl extension definition for: - * bool lv_animimg_delete(lv_obj_t *obj) + * lv_bar_mode_t lv_bar_get_mode(lv_obj_t *obj) */ -static PyObject *py_lv_animimg_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -34512,18 +46310,18 @@ static PyObject *py_lv_animimg_delete(PyObject *self, PyObject *py_args, PyObjec lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_bar_mode_t _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_animimg_delete)(obj); + _res = ((lv_bar_mode_t (*)(lv_obj_t *))lv_bar_get_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_animimg_delete_def = { - "lv_animimg_delete", - (PyCFunction)py_lv_animimg_delete, +static PyMethodDef py_lv_bar_get_mode_def = { + "lv_bar_get_mode", + (PyCFunction)py_lv_bar_get_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34531,29 +46329,28 @@ static PyMethodDef py_lv_animimg_delete_def = { /* * lvgl extension definition for: - * void lv_animimg_set_duration(lv_obj_t *obj, uint32_t duration) + * lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t *obj) */ -static PyObject *py_lv_animimg_set_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_get_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t duration = (uint32_t)duration_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_bar_orientation_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_duration)(obj, duration); + _res = ((lv_bar_orientation_t (*)(lv_obj_t *))lv_bar_get_orientation)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_animimg_set_duration_def = { - "lv_animimg_set_duration", - (PyCFunction)py_lv_animimg_set_duration, +static PyMethodDef py_lv_bar_get_orientation_def = { + "lv_bar_get_orientation", + (PyCFunction)py_lv_bar_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34561,29 +46358,28 @@ static PyMethodDef py_lv_animimg_set_duration_def = { /* * lvgl extension definition for: - * void lv_animimg_set_repeat_count(lv_obj_t *obj, uint32_t count) + * bool lv_bar_is_symmetrical(lv_obj_t *obj) */ -static PyObject *py_lv_animimg_set_repeat_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_is_symmetrical(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long count_val; - if (!PyArg_ParseTuple(py_args, "l", &count_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t count = (uint32_t)count_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_repeat_count)(obj, count); + _res = ((bool (*)(lv_obj_t *))lv_bar_is_symmetrical)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_animimg_set_repeat_count_def = { - "lv_animimg_set_repeat_count", - (PyCFunction)py_lv_animimg_set_repeat_count, +static PyMethodDef py_lv_bar_is_symmetrical_def = { + "lv_bar_is_symmetrical", + (PyCFunction)py_lv_bar_is_symmetrical, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34591,29 +46387,30 @@ static PyMethodDef py_lv_animimg_set_repeat_count_def = { /* * lvgl extension definition for: - * void lv_animimg_set_reverse_duration(lv_obj_t *obj, uint32_t duration) + * lv_observer_t *lv_bar_bind_value(lv_obj_t *obj, lv_subject_t *subject) */ -static PyObject *py_lv_animimg_set_reverse_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t duration = (uint32_t)duration_val; + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_observer_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_reverse_duration)(obj, duration); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_bar_bind_value)(obj, subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_animimg_set_reverse_duration_def = { - "lv_animimg_set_reverse_duration", - (PyCFunction)py_lv_animimg_set_reverse_duration, +static PyMethodDef py_lv_bar_bind_value_def = { + "lv_bar_bind_value", + (PyCFunction)py_lv_bar_bind_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34621,151 +46418,153 @@ static PyMethodDef py_lv_animimg_set_reverse_duration_def = { /* * lvgl extension definition for: - * void lv_animimg_set_reverse_delay(lv_obj_t *obj, uint32_t duration) + * lv_obj_t *lv_bar_create(lv_obj_t *parent) */ -static PyObject *py_lv_animimg_set_reverse_delay(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bar_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t duration = (uint32_t)duration_val; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_animimg_set_reverse_delay)(obj, duration); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_bar_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_animimg_set_reverse_delay_def = { - "lv_animimg_set_reverse_delay", - (PyCFunction)py_lv_animimg_set_reverse_delay, +static PyMethodDef py_lv_bar_create_def = { + "lv_bar_create", + (PyCFunction)py_lv_bar_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_obj_t_start_cb (CPython) - * void lv_anim_start_cb_t(lv_anim_t *) + * lvgl bar object definitions (CPython) */ -static void lv_obj_t_start_cb_callback(lv_anim_t *arg0) +static PyObject *py_lv_bar_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_start_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); + (void)type; + return py_lv_bar_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_bar_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_bar_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_bar_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); } +static PyMethodDef py_lv_bar_methods[] = { + {"set_value", (PyCFunction)py_lv_bar_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_start_value", (PyCFunction)py_lv_bar_set_start_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_range", (PyCFunction)py_lv_bar_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_value", (PyCFunction)py_lv_bar_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_value", (PyCFunction)py_lv_bar_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode", (PyCFunction)py_lv_bar_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_orientation", (PyCFunction)py_lv_bar_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_value", (PyCFunction)py_lv_bar_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_start_value", (PyCFunction)py_lv_bar_get_start_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_min_value", (PyCFunction)py_lv_bar_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_value", (PyCFunction)py_lv_bar_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode", (PyCFunction)py_lv_bar_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_orientation", (PyCFunction)py_lv_bar_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_symmetrical", (PyCFunction)py_lv_bar_is_symmetrical, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_value", (PyCFunction)py_lv_bar_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_bar_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.bar", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_bar_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_bar_new, + .tp_methods = py_lv_bar_methods, + .tp_call = (ternaryfunc)py_lv_bar_call, +}; + +static py_lv_obj_type_t py_lv_bar_mapping = { + .lv_obj_class = &lv_bar_class, + .py_type = &py_lv_bar_type, +}; + /* * lvgl extension definition for: - * void lv_animimg_set_start_cb(lv_obj_t *obj, lv_anim_start_cb_t start_cb) + * void lv_canvas_set_buffer(lv_obj_t *obj, void *buf, int32_t w, int32_t h, lv_color_format_t cf) */ -static PyObject *py_lv_animimg_set_start_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_set_buffer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *start_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &start_cb_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *buf_py; long w_val; long h_val; PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "OllO", &buf_py, &w_val, &h_val, &cf_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - void *start_cb = mp_lv_callback(start_cb_py, &lv_obj_t_start_cb_callback, "lv_obj_t_start_cb", &obj->user_data, obj, (NULL), (NULL)); + void *buf = mp_to_ptr(buf_py); + int32_t w = (int32_t)w_val; + int32_t h = (int32_t)h_val; + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_anim_start_cb_t))lv_animimg_set_start_cb)(obj, start_cb); + ((void (*)(lv_obj_t *, void *, int32_t, int32_t, lv_color_format_t))lv_canvas_set_buffer)(obj, buf, w, h, cf); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_animimg_set_start_cb_def = { - "lv_animimg_set_start_cb", - (PyCFunction)py_lv_animimg_set_start_cb, +static PyMethodDef py_lv_canvas_set_buffer_def = { + "lv_canvas_set_buffer", + (PyCFunction)py_lv_canvas_set_buffer, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_obj_t_completed_cb (CPython) - * void lv_anim_completed_cb_t(lv_anim_t *) - */ -static void lv_obj_t_completed_cb_callback(lv_anim_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_t_completed_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_animimg_set_completed_cb(lv_obj_t *obj, lv_anim_completed_cb_t completed_cb) + * void lv_canvas_set_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_animimg_set_completed_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_set_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *completed_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &completed_cb_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - void *completed_cb = mp_lv_callback(completed_cb_py, &lv_obj_t_completed_cb_callback, "lv_obj_t_completed_cb", &obj->user_data, obj, (NULL), (NULL)); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_anim_completed_cb_t))lv_animimg_set_completed_cb)(obj, completed_cb); + ((void (*)(lv_obj_t *, lv_draw_buf_t *))lv_canvas_set_draw_buf)(obj, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_animimg_set_completed_cb_def = { - "lv_animimg_set_completed_cb", - (PyCFunction)py_lv_animimg_set_completed_cb, +static PyMethodDef py_lv_canvas_set_draw_buf_def = { + "lv_canvas_set_draw_buf", + (PyCFunction)py_lv_canvas_set_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34773,28 +46572,32 @@ static PyMethodDef py_lv_animimg_set_completed_cb_def = { /* * lvgl extension definition for: - * uint8_t lv_animimg_get_src_count(lv_obj_t *obj) + * void lv_canvas_set_px(lv_obj_t *obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa) */ -static PyObject *py_lv_animimg_get_src_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_set_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long x_val; long y_val; PyObject *color_py; long opa_val; + if (!PyArg_ParseTuple(py_args, "llOl", &x_val, &y_val, &color_py, &opa_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + lv_color_t color = mp_write_lv_color_t(color_py); + lv_opa_t opa = (lv_opa_t)opa_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_obj_t *))lv_animimg_get_src_count)(obj); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_color_t, lv_opa_t))lv_canvas_set_px)(obj, x, y, color, opa); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_animimg_get_src_count_def = { - "lv_animimg_get_src_count", - (PyCFunction)py_lv_animimg_get_src_count, +static PyMethodDef py_lv_canvas_set_px_def = { + "lv_canvas_set_px", + (PyCFunction)py_lv_canvas_set_px, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34802,28 +46605,30 @@ static PyMethodDef py_lv_animimg_get_src_count_def = { /* * lvgl extension definition for: - * uint32_t lv_animimg_get_duration(lv_obj_t *obj) + * void lv_canvas_set_palette(lv_obj_t *obj, uint8_t index, lv_color32_t color) */ -static PyObject *py_lv_animimg_get_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_set_palette(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long index_val; PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "lO", &index_val, &color_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint8_t index = (uint8_t)index_val; + lv_color32_t color = mp_write_lv_color32_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_animimg_get_duration)(obj); + ((void (*)(lv_obj_t *, uint8_t, lv_color32_t))lv_canvas_set_palette)(obj, index, color); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_animimg_get_duration_def = { - "lv_animimg_get_duration", - (PyCFunction)py_lv_animimg_get_duration, +static PyMethodDef py_lv_canvas_set_palette_def = { + "lv_canvas_set_palette", + (PyCFunction)py_lv_canvas_set_palette, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34831,9 +46636,9 @@ static PyMethodDef py_lv_animimg_get_duration_def = { /* * lvgl extension definition for: - * uint32_t lv_animimg_get_repeat_count(lv_obj_t *obj) + * lv_draw_buf_t *lv_canvas_get_draw_buf(lv_obj_t *obj) */ -static PyObject *py_lv_animimg_get_repeat_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_get_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -34841,18 +46646,18 @@ static PyObject *py_lv_animimg_get_repeat_count(PyObject *self, PyObject *py_arg lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_animimg_get_repeat_count)(obj); + _res = ((lv_draw_buf_t *(*)(lv_obj_t *))lv_canvas_get_draw_buf)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_animimg_get_repeat_count_def = { - "lv_animimg_get_repeat_count", - (PyCFunction)py_lv_animimg_get_repeat_count, +static PyMethodDef py_lv_canvas_get_draw_buf_def = { + "lv_canvas_get_draw_buf", + (PyCFunction)py_lv_canvas_get_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34860,28 +46665,31 @@ static PyMethodDef py_lv_animimg_get_repeat_count_def = { /* * lvgl extension definition for: - * lv_anim_t *lv_animimg_get_anim(lv_obj_t *obj) + * lv_color32_t lv_canvas_get_px(lv_obj_t *obj, int32_t x, int32_t y) */ -static PyObject *py_lv_animimg_get_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_get_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(lv_obj_t *))lv_animimg_get_anim)(obj); + _res = ((lv_color32_t (*)(lv_obj_t *, int32_t, int32_t))lv_canvas_get_px)(obj, x, y); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_animimg_get_anim_def = { - "lv_animimg_get_anim", - (PyCFunction)py_lv_animimg_get_anim, +static PyMethodDef py_lv_canvas_get_px_def = { + "lv_canvas_get_px", + (PyCFunction)py_lv_canvas_get_px, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -34889,119 +46697,57 @@ static PyMethodDef py_lv_animimg_get_anim_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_animimg_create(lv_obj_t *parent) + * lv_image_dsc_t *lv_canvas_get_image(lv_obj_t *obj) */ -static PyObject *py_lv_animimg_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_get_image(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_image_dsc_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_animimg_create)(parent); + _res = ((lv_image_dsc_t *(*)(lv_obj_t *))lv_canvas_get_image)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_image_dsc_t((void*)_res); } -static PyMethodDef py_lv_animimg_create_def = { - "lv_animimg_create", - (PyCFunction)py_lv_animimg_create, +static PyMethodDef py_lv_canvas_get_image_def = { + "lv_canvas_get_image", + (PyCFunction)py_lv_canvas_get_image, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl animimg object definitions (CPython) - */ -static PyObject *py_lv_animimg_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_animimg_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_animimg_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_animimg_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_animimg_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_animimg_methods[] = { - {"set_src", (PyCFunction)py_lv_animimg_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_src_reverse", (PyCFunction)py_lv_animimg_set_src_reverse, METH_VARARGS | METH_KEYWORDS, NULL}, - {"start", (PyCFunction)py_lv_animimg_start, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete", (PyCFunction)py_lv_animimg_delete, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_duration", (PyCFunction)py_lv_animimg_set_duration, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_count", (PyCFunction)py_lv_animimg_set_repeat_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_duration", (PyCFunction)py_lv_animimg_set_reverse_duration, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_delay", (PyCFunction)py_lv_animimg_set_reverse_delay, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_start_cb", (PyCFunction)py_lv_animimg_set_start_cb, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_completed_cb", (PyCFunction)py_lv_animimg_set_completed_cb, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_src_count", (PyCFunction)py_lv_animimg_get_src_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_duration", (PyCFunction)py_lv_animimg_get_duration, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_repeat_count", (PyCFunction)py_lv_animimg_get_repeat_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_anim", (PyCFunction)py_lv_animimg_get_anim, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_animimg_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.animimg", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_animimg_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_animimg_new, - .tp_methods = py_lv_animimg_methods, - .tp_call = (ternaryfunc)py_lv_animimg_call, -}; - -static py_lv_obj_type_t py_lv_animimg_mapping = { - .lv_obj_class = &lv_animimg_class, - .py_type = &py_lv_animimg_type, -}; - - /* * lvgl extension definition for: - * void lv_arc_set_start_angle(lv_obj_t *obj, lv_value_precise_t start) + * const void *lv_canvas_get_buf(lv_obj_t *obj) */ -static PyObject *py_lv_arc_set_start_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_get_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *start_py; - if (!PyArg_ParseTuple(py_args, "O", &start_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t start = (float)mp_obj_get_float(start_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_start_angle)(obj, start); + _res = ((const void *(*)(lv_obj_t *))lv_canvas_get_buf)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_arc_set_start_angle_def = { - "lv_arc_set_start_angle", - (PyCFunction)py_lv_arc_set_start_angle, +static PyMethodDef py_lv_canvas_get_buf_def = { + "lv_canvas_get_buf", + (PyCFunction)py_lv_canvas_get_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35009,29 +46755,31 @@ static PyMethodDef py_lv_arc_set_start_angle_def = { /* * lvgl extension definition for: - * void lv_arc_set_end_angle(lv_obj_t *obj, lv_value_precise_t end) + * void lv_canvas_copy_buf(lv_obj_t *obj, const lv_area_t *canvas_area, lv_draw_buf_t *src_buf, const lv_area_t *src_area) */ -static PyObject *py_lv_arc_set_end_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_copy_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *end_py; - if (!PyArg_ParseTuple(py_args, "O", &end_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *canvas_area_py; PyObject *src_buf_py; PyObject *src_area_py; + if (!PyArg_ParseTuple(py_args, "OOO", &canvas_area_py, &src_buf_py, &src_area_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t end = (float)mp_obj_get_float(end_py); + const lv_area_t *canvas_area = (const lv_area_t *)mp_write_ptr_lv_area_t(canvas_area_py); + lv_draw_buf_t *src_buf = mp_write_ptr_lv_draw_buf_t(src_buf_py); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(src_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_end_angle)(obj, end); + ((void (*)(lv_obj_t *, const lv_area_t *, lv_draw_buf_t *, const lv_area_t *))lv_canvas_copy_buf)(obj, canvas_area, src_buf, src_area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_end_angle_def = { - "lv_arc_set_end_angle", - (PyCFunction)py_lv_arc_set_end_angle, +static PyMethodDef py_lv_canvas_copy_buf_def = { + "lv_canvas_copy_buf", + (PyCFunction)py_lv_canvas_copy_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35039,30 +46787,30 @@ static PyMethodDef py_lv_arc_set_end_angle_def = { /* * lvgl extension definition for: - * void lv_arc_set_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) + * void lv_canvas_fill_bg(lv_obj_t *obj, lv_color_t color, lv_opa_t opa) */ -static PyObject *py_lv_arc_set_angles(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_fill_bg(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *start_py; PyObject *end_py; - if (!PyArg_ParseTuple(py_args, "OO", &start_py, &end_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_py; long opa_val; + if (!PyArg_ParseTuple(py_args, "Ol", &color_py, &opa_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t start = (float)mp_obj_get_float(start_py); - lv_value_precise_t end = (float)mp_obj_get_float(end_py); + lv_color_t color = mp_write_lv_color_t(color_py); + lv_opa_t opa = (lv_opa_t)opa_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_arc_set_angles)(obj, start, end); + ((void (*)(lv_obj_t *, lv_color_t, lv_opa_t))lv_canvas_fill_bg)(obj, color, opa); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_angles_def = { - "lv_arc_set_angles", - (PyCFunction)py_lv_arc_set_angles, +static PyMethodDef py_lv_canvas_fill_bg_def = { + "lv_canvas_fill_bg", + (PyCFunction)py_lv_canvas_fill_bg, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35070,29 +46818,29 @@ static PyMethodDef py_lv_arc_set_angles_def = { /* * lvgl extension definition for: - * void lv_arc_set_bg_start_angle(lv_obj_t *obj, lv_value_precise_t start) + * void lv_canvas_init_layer(lv_obj_t *obj, lv_layer_t *layer) */ -static PyObject *py_lv_arc_set_bg_start_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_init_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *start_py; - if (!PyArg_ParseTuple(py_args, "O", &start_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t start = (float)mp_obj_get_float(start_py); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_bg_start_angle)(obj, start); + ((void (*)(lv_obj_t *, lv_layer_t *))lv_canvas_init_layer)(obj, layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_bg_start_angle_def = { - "lv_arc_set_bg_start_angle", - (PyCFunction)py_lv_arc_set_bg_start_angle, +static PyMethodDef py_lv_canvas_init_layer_def = { + "lv_canvas_init_layer", + (PyCFunction)py_lv_canvas_init_layer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35100,29 +46848,29 @@ static PyMethodDef py_lv_arc_set_bg_start_angle_def = { /* * lvgl extension definition for: - * void lv_arc_set_bg_end_angle(lv_obj_t *obj, lv_value_precise_t end) + * void lv_canvas_finish_layer(lv_obj_t *canvas, lv_layer_t *layer) */ -static PyObject *py_lv_arc_set_bg_end_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_finish_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *end_py; - if (!PyArg_ParseTuple(py_args, "O", &end_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t end = (float)mp_obj_get_float(end_py); + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *canvas = mp_to_lv(self); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arc_set_bg_end_angle)(obj, end); + ((void (*)(lv_obj_t *, lv_layer_t *))lv_canvas_finish_layer)(canvas, layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_bg_end_angle_def = { - "lv_arc_set_bg_end_angle", - (PyCFunction)py_lv_arc_set_bg_end_angle, +static PyMethodDef py_lv_canvas_finish_layer_def = { + "lv_canvas_finish_layer", + (PyCFunction)py_lv_canvas_finish_layer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35130,30 +46878,33 @@ static PyMethodDef py_lv_arc_set_bg_end_angle_def = { /* * lvgl extension definition for: - * void lv_arc_set_bg_angles(lv_obj_t *obj, lv_value_precise_t start, lv_value_precise_t end) + * uint32_t lv_canvas_buf_size(int32_t w, int32_t h, uint8_t bpp, uint8_t stride) */ -static PyObject *py_lv_arc_set_bg_angles(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_buf_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *start_py; PyObject *end_py; - if (!PyArg_ParseTuple(py_args, "OO", &start_py, &end_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t start = (float)mp_obj_get_float(start_py); - lv_value_precise_t end = (float)mp_obj_get_float(end_py); + long w_val; long h_val; long bpp_val; long stride_val; + if (!PyArg_ParseTuple(py_args, "llll", &w_val, &h_val, &bpp_val, &stride_val)) { PyGILState_Release(gstate); return NULL; } + int32_t w = (int32_t)w_val; + int32_t h = (int32_t)h_val; + uint8_t bpp = (uint8_t)bpp_val; + uint8_t stride = (uint8_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t, lv_value_precise_t))lv_arc_set_bg_angles)(obj, start, end); + _res = ((uint32_t (*)(int32_t, int32_t, uint8_t, uint8_t))lv_canvas_buf_size)(w, h, bpp, stride); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_arc_set_bg_angles_def = { - "lv_arc_set_bg_angles", - (PyCFunction)py_lv_arc_set_bg_angles, +static PyMethodDef py_lv_canvas_buf_size_def = { + "lv_canvas_buf_size", + (PyCFunction)py_lv_canvas_buf_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35161,59 +46912,118 @@ static PyMethodDef py_lv_arc_set_bg_angles_def = { /* * lvgl extension definition for: - * void lv_arc_set_rotation(lv_obj_t *obj, int32_t rotation) + * lv_obj_t *lv_canvas_create(lv_obj_t *parent) */ -static PyObject *py_lv_arc_set_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_canvas_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long rotation_val; - if (!PyArg_ParseTuple(py_args, "l", &rotation_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t rotation = (int32_t)rotation_val; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_arc_set_rotation)(obj, rotation); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_canvas_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arc_set_rotation_def = { - "lv_arc_set_rotation", - (PyCFunction)py_lv_arc_set_rotation, +static PyMethodDef py_lv_canvas_create_def = { + "lv_canvas_create", + (PyCFunction)py_lv_canvas_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl canvas object definitions (CPython) + */ +static PyObject *py_lv_canvas_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_canvas_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_canvas_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_canvas_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_canvas_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_canvas_methods[] = { + {"set_buffer", (PyCFunction)py_lv_canvas_set_buffer, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_draw_buf", (PyCFunction)py_lv_canvas_set_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_px", (PyCFunction)py_lv_canvas_set_px, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_palette", (PyCFunction)py_lv_canvas_set_palette, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_draw_buf", (PyCFunction)py_lv_canvas_get_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_px", (PyCFunction)py_lv_canvas_get_px, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_image", (PyCFunction)py_lv_canvas_get_image, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_buf", (PyCFunction)py_lv_canvas_get_buf, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy_buf", (PyCFunction)py_lv_canvas_copy_buf, METH_VARARGS | METH_KEYWORDS, NULL}, + {"fill_bg", (PyCFunction)py_lv_canvas_fill_bg, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_layer", (PyCFunction)py_lv_canvas_init_layer, METH_VARARGS | METH_KEYWORDS, NULL}, + {"finish_layer", (PyCFunction)py_lv_canvas_finish_layer, METH_VARARGS | METH_KEYWORDS, NULL}, + {"buf_size", (PyCFunction)py_lv_canvas_buf_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_canvas_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.canvas", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_canvas_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_canvas_new, + .tp_methods = py_lv_canvas_methods, + .tp_call = (ternaryfunc)py_lv_canvas_call, +}; + +static py_lv_obj_type_t py_lv_canvas_mapping = { + .lv_obj_class = &lv_canvas_class, + .py_type = &py_lv_canvas_type, +}; + + /* * lvgl extension definition for: - * void lv_arc_set_mode(lv_obj_t *obj, lv_arc_mode_t type) + * void lv_barcode_set_dark_color(lv_obj_t *obj, lv_color_t color) */ -static PyObject *py_lv_arc_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_set_dark_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *type_py; - if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_arc_mode_t type = (int)mp_obj_get_int(type_py); + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_arc_mode_t))lv_arc_set_mode)(obj, type); + ((void (*)(lv_obj_t *, lv_color_t))lv_barcode_set_dark_color)(obj, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_mode_def = { - "lv_arc_set_mode", - (PyCFunction)py_lv_arc_set_mode, +static PyMethodDef py_lv_barcode_set_dark_color_def = { + "lv_barcode_set_dark_color", + (PyCFunction)py_lv_barcode_set_dark_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35221,29 +47031,29 @@ static PyMethodDef py_lv_arc_set_mode_def = { /* * lvgl extension definition for: - * void lv_arc_set_value(lv_obj_t *obj, int32_t value) + * void lv_barcode_set_light_color(lv_obj_t *obj, lv_color_t color) */ -static PyObject *py_lv_arc_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_set_light_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_arc_set_value)(obj, value); + ((void (*)(lv_obj_t *, lv_color_t))lv_barcode_set_light_color)(obj, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_value_def = { - "lv_arc_set_value", - (PyCFunction)py_lv_arc_set_value, +static PyMethodDef py_lv_barcode_set_light_color_def = { + "lv_barcode_set_light_color", + (PyCFunction)py_lv_barcode_set_light_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35251,30 +47061,29 @@ static PyMethodDef py_lv_arc_set_value_def = { /* * lvgl extension definition for: - * void lv_arc_set_range(lv_obj_t *obj, int32_t min, int32_t max) + * void lv_barcode_set_scale(lv_obj_t *obj, uint16_t scale) */ -static PyObject *py_lv_arc_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_set_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + long scale_val; + if (!PyArg_ParseTuple(py_args, "l", &scale_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; + uint16_t scale = (uint16_t)scale_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_arc_set_range)(obj, min, max); + ((void (*)(lv_obj_t *, uint16_t))lv_barcode_set_scale)(obj, scale); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_range_def = { - "lv_arc_set_range", - (PyCFunction)py_lv_arc_set_range, +static PyMethodDef py_lv_barcode_set_scale_def = { + "lv_barcode_set_scale", + (PyCFunction)py_lv_barcode_set_scale, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35282,29 +47091,29 @@ static PyMethodDef py_lv_arc_set_range_def = { /* * lvgl extension definition for: - * void lv_arc_set_min_value(lv_obj_t *obj, int32_t min) + * void lv_barcode_set_direction(lv_obj_t *obj, lv_dir_t direction) */ -static PyObject *py_lv_arc_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_set_direction(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; - if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *direction_py; + if (!PyArg_ParseTuple(py_args, "O", &direction_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; + lv_dir_t direction = (int)mp_obj_get_int(direction_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_arc_set_min_value)(obj, min); + ((void (*)(lv_obj_t *, lv_dir_t))lv_barcode_set_direction)(obj, direction); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_min_value_def = { - "lv_arc_set_min_value", - (PyCFunction)py_lv_arc_set_min_value, +static PyMethodDef py_lv_barcode_set_direction_def = { + "lv_barcode_set_direction", + (PyCFunction)py_lv_barcode_set_direction, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35312,29 +47121,29 @@ static PyMethodDef py_lv_arc_set_min_value_def = { /* * lvgl extension definition for: - * void lv_arc_set_max_value(lv_obj_t *obj, int32_t max) + * void lv_barcode_set_tiled(lv_obj_t *obj, bool tiled) */ -static PyObject *py_lv_arc_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_set_tiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long max_val; - if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } + long tiled_val; + if (!PyArg_ParseTuple(py_args, "l", &tiled_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t max = (int32_t)max_val; + bool tiled = (tiled_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_arc_set_max_value)(obj, max); + ((void (*)(lv_obj_t *, bool))lv_barcode_set_tiled)(obj, tiled); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_max_value_def = { - "lv_arc_set_max_value", - (PyCFunction)py_lv_arc_set_max_value, +static PyMethodDef py_lv_barcode_set_tiled_def = { + "lv_barcode_set_tiled", + (PyCFunction)py_lv_barcode_set_tiled, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35342,29 +47151,29 @@ static PyMethodDef py_lv_arc_set_max_value_def = { /* * lvgl extension definition for: - * void lv_arc_set_change_rate(lv_obj_t *obj, uint32_t rate) + * void lv_barcode_set_encoding(lv_obj_t *obj, lv_barcode_encoding_t encoding) */ -static PyObject *py_lv_arc_set_change_rate(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_set_encoding(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long rate_val; - if (!PyArg_ParseTuple(py_args, "l", &rate_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *encoding_py; + if (!PyArg_ParseTuple(py_args, "O", &encoding_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t rate = (uint32_t)rate_val; + lv_barcode_encoding_t encoding = (int)mp_obj_get_int(encoding_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_arc_set_change_rate)(obj, rate); + ((void (*)(lv_obj_t *, lv_barcode_encoding_t))lv_barcode_set_encoding)(obj, encoding); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_set_change_rate_def = { - "lv_arc_set_change_rate", - (PyCFunction)py_lv_arc_set_change_rate, +static PyMethodDef py_lv_barcode_set_encoding_def = { + "lv_barcode_set_encoding", + (PyCFunction)py_lv_barcode_set_encoding, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35372,29 +47181,30 @@ static PyMethodDef py_lv_arc_set_change_rate_def = { /* * lvgl extension definition for: - * void lv_arc_set_knob_offset(lv_obj_t *obj, int32_t offset) + * lv_result_t lv_barcode_update(lv_obj_t *obj, const char *data) */ -static PyObject *py_lv_arc_set_knob_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_update(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long offset_val; - if (!PyArg_ParseTuple(py_args, "l", &offset_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t offset = (int32_t)offset_val; + const char *data = (const char *)(char*)convert_from_str(data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_arc_set_knob_offset)(obj, offset); + _res = ((lv_result_t (*)(lv_obj_t *, const char *))lv_barcode_update)(obj, data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_arc_set_knob_offset_def = { - "lv_arc_set_knob_offset", - (PyCFunction)py_lv_arc_set_knob_offset, +static PyMethodDef py_lv_barcode_update_def = { + "lv_barcode_update", + (PyCFunction)py_lv_barcode_update, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35402,9 +47212,9 @@ static PyMethodDef py_lv_arc_set_knob_offset_def = { /* * lvgl extension definition for: - * lv_value_precise_t lv_arc_get_angle_start(lv_obj_t *obj) + * lv_result_t lv_barcode_render(lv_obj_t *obj) */ -static PyObject *py_lv_arc_get_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_render(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -35412,18 +47222,18 @@ static PyObject *py_lv_arc_get_angle_start(PyObject *self, PyObject *py_args, Py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_value_precise_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_angle_start)(obj); + _res = ((lv_result_t (*)(lv_obj_t *))lv_barcode_render)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_arc_get_angle_start_def = { - "lv_arc_get_angle_start", - (PyCFunction)py_lv_arc_get_angle_start, +static PyMethodDef py_lv_barcode_render_def = { + "lv_barcode_render", + (PyCFunction)py_lv_barcode_render, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35431,28 +47241,29 @@ static PyMethodDef py_lv_arc_get_angle_start_def = { /* * lvgl extension definition for: - * lv_value_precise_t lv_arc_get_angle_end(lv_obj_t *obj) + * void lv_barcode_set_update_mode(lv_obj_t *obj, lv_barcode_update_mode_t mode) */ -static PyObject *py_lv_arc_get_angle_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_set_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_barcode_update_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_value_precise_t _res; lvpy_lock(); - _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_angle_end)(obj); + ((void (*)(lv_obj_t *, lv_barcode_update_mode_t))lv_barcode_set_update_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_get_angle_end_def = { - "lv_arc_get_angle_end", - (PyCFunction)py_lv_arc_get_angle_end, +static PyMethodDef py_lv_barcode_set_update_mode_def = { + "lv_barcode_set_update_mode", + (PyCFunction)py_lv_barcode_set_update_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35460,9 +47271,9 @@ static PyMethodDef py_lv_arc_get_angle_end_def = { /* * lvgl extension definition for: - * lv_value_precise_t lv_arc_get_bg_angle_start(lv_obj_t *obj) + * lv_barcode_update_mode_t lv_barcode_get_update_mode(lv_obj_t *obj) */ -static PyObject *py_lv_arc_get_bg_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_get_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -35470,18 +47281,18 @@ static PyObject *py_lv_arc_get_bg_angle_start(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_value_precise_t _res; + lv_barcode_update_mode_t _res; lvpy_lock(); - _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_bg_angle_start)(obj); + _res = ((lv_barcode_update_mode_t (*)(lv_obj_t *))lv_barcode_get_update_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_arc_get_bg_angle_start_def = { - "lv_arc_get_bg_angle_start", - (PyCFunction)py_lv_arc_get_bg_angle_start, +static PyMethodDef py_lv_barcode_get_update_mode_def = { + "lv_barcode_get_update_mode", + (PyCFunction)py_lv_barcode_get_update_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35489,9 +47300,9 @@ static PyMethodDef py_lv_arc_get_bg_angle_start_def = { /* * lvgl extension definition for: - * lv_value_precise_t lv_arc_get_bg_angle_end(lv_obj_t *obj) + * bool lv_barcode_is_render_valid(lv_obj_t *obj) */ -static PyObject *py_lv_arc_get_bg_angle_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_is_render_valid(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -35499,18 +47310,18 @@ static PyObject *py_lv_arc_get_bg_angle_end(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_value_precise_t _res; + bool _res; lvpy_lock(); - _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arc_get_bg_angle_end)(obj); + _res = ((bool (*)(lv_obj_t *))lv_barcode_is_render_valid)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_arc_get_bg_angle_end_def = { - "lv_arc_get_bg_angle_end", - (PyCFunction)py_lv_arc_get_bg_angle_end, +static PyMethodDef py_lv_barcode_is_render_valid_def = { + "lv_barcode_is_render_valid", + (PyCFunction)py_lv_barcode_is_render_valid, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35518,9 +47329,9 @@ static PyMethodDef py_lv_arc_get_bg_angle_end_def = { /* * lvgl extension definition for: - * int32_t lv_arc_get_value(const lv_obj_t *obj) + * lv_color_t lv_barcode_get_dark_color(lv_obj_t *obj) */ -static PyObject *py_lv_arc_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_get_dark_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -35528,18 +47339,18 @@ static PyObject *py_lv_arc_get_value(PyObject *self, PyObject *py_args, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_value)(obj); + _res = ((lv_color_t (*)(lv_obj_t *))lv_barcode_get_dark_color)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_arc_get_value_def = { - "lv_arc_get_value", - (PyCFunction)py_lv_arc_get_value, +static PyMethodDef py_lv_barcode_get_dark_color_def = { + "lv_barcode_get_dark_color", + (PyCFunction)py_lv_barcode_get_dark_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35547,9 +47358,9 @@ static PyMethodDef py_lv_arc_get_value_def = { /* * lvgl extension definition for: - * int32_t lv_arc_get_min_value(const lv_obj_t *obj) + * lv_color_t lv_barcode_get_light_color(lv_obj_t *obj) */ -static PyObject *py_lv_arc_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_get_light_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -35557,18 +47368,18 @@ static PyObject *py_lv_arc_get_min_value(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_min_value)(obj); + _res = ((lv_color_t (*)(lv_obj_t *))lv_barcode_get_light_color)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_arc_get_min_value_def = { - "lv_arc_get_min_value", - (PyCFunction)py_lv_arc_get_min_value, +static PyMethodDef py_lv_barcode_get_light_color_def = { + "lv_barcode_get_light_color", + (PyCFunction)py_lv_barcode_get_light_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35576,9 +47387,9 @@ static PyMethodDef py_lv_arc_get_min_value_def = { /* * lvgl extension definition for: - * int32_t lv_arc_get_max_value(const lv_obj_t *obj) + * uint16_t lv_barcode_get_scale(lv_obj_t *obj) */ -static PyObject *py_lv_arc_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_get_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -35586,18 +47397,18 @@ static PyObject *py_lv_arc_get_max_value(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint16_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_max_value)(obj); + _res = ((uint16_t (*)(lv_obj_t *))lv_barcode_get_scale)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_arc_get_max_value_def = { - "lv_arc_get_max_value", - (PyCFunction)py_lv_arc_get_max_value, +static PyMethodDef py_lv_barcode_get_scale_def = { + "lv_barcode_get_scale", + (PyCFunction)py_lv_barcode_get_scale, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35605,9 +47416,9 @@ static PyMethodDef py_lv_arc_get_max_value_def = { /* * lvgl extension definition for: - * lv_arc_mode_t lv_arc_get_mode(const lv_obj_t *obj) + * lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t *obj) */ -static PyObject *py_lv_arc_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_get_encoding(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -35615,18 +47426,18 @@ static PyObject *py_lv_arc_get_mode(PyObject *self, PyObject *py_args, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_arc_mode_t _res; + lv_barcode_encoding_t _res; lvpy_lock(); - _res = ((lv_arc_mode_t (*)(const lv_obj_t *))lv_arc_get_mode)(obj); + _res = ((lv_barcode_encoding_t (*)(const lv_obj_t *))lv_barcode_get_encoding)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_arc_get_mode_def = { - "lv_arc_get_mode", - (PyCFunction)py_lv_arc_get_mode, +static PyMethodDef py_lv_barcode_get_encoding_def = { + "lv_barcode_get_encoding", + (PyCFunction)py_lv_barcode_get_encoding, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35634,86 +47445,197 @@ static PyMethodDef py_lv_arc_get_mode_def = { /* * lvgl extension definition for: - * int32_t lv_arc_get_rotation(const lv_obj_t *obj) + * lv_obj_t *lv_barcode_create(lv_obj_t *parent) */ -static PyObject *py_lv_arc_get_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_barcode_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_rotation)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_barcode_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arc_get_rotation_def = { - "lv_arc_get_rotation", - (PyCFunction)py_lv_arc_get_rotation, +static PyMethodDef py_lv_barcode_create_def = { + "lv_barcode_create", + (PyCFunction)py_lv_barcode_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl barcode object definitions (CPython) + */ +static PyObject *py_lv_barcode_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_barcode_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_barcode_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_barcode_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_barcode_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_barcode_methods[] = { + {"set_dark_color", (PyCFunction)py_lv_barcode_set_dark_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_light_color", (PyCFunction)py_lv_barcode_set_light_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scale", (PyCFunction)py_lv_barcode_set_scale, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_direction", (PyCFunction)py_lv_barcode_set_direction, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tiled", (PyCFunction)py_lv_barcode_set_tiled, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_encoding", (PyCFunction)py_lv_barcode_set_encoding, METH_VARARGS | METH_KEYWORDS, NULL}, + {"update", (PyCFunction)py_lv_barcode_update, METH_VARARGS | METH_KEYWORDS, NULL}, + {"render", (PyCFunction)py_lv_barcode_render, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_update_mode", (PyCFunction)py_lv_barcode_set_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_update_mode", (PyCFunction)py_lv_barcode_get_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_render_valid", (PyCFunction)py_lv_barcode_is_render_valid, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dark_color", (PyCFunction)py_lv_barcode_get_dark_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_light_color", (PyCFunction)py_lv_barcode_get_light_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scale", (PyCFunction)py_lv_barcode_get_scale, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_encoding", (PyCFunction)py_lv_barcode_get_encoding, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_barcode_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.barcode", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_barcode_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_barcode_new, + .tp_methods = py_lv_barcode_methods, + .tp_call = (ternaryfunc)py_lv_barcode_call, +}; + +static py_lv_obj_type_t py_lv_barcode_mapping = { + .lv_obj_class = &lv_barcode_class, + .py_type = &py_lv_barcode_type, +}; + + /* * lvgl extension definition for: - * int32_t lv_arc_get_knob_offset(const lv_obj_t *obj) + * lv_obj_t *lv_button_create(lv_obj_t *parent) */ -static PyObject *py_lv_arc_get_knob_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_button_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_arc_get_knob_offset)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_button_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arc_get_knob_offset_def = { - "lv_arc_get_knob_offset", - (PyCFunction)py_lv_arc_get_knob_offset, +static PyMethodDef py_lv_button_create_def = { + "lv_button_create", + (PyCFunction)py_lv_button_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl button object definitions (CPython) + */ +static PyObject *py_lv_button_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_button_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_button_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_button_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_button_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_button_methods[] = { + + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_button_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.button", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_button_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_button_new, + .tp_methods = py_lv_button_methods, + .tp_call = (ternaryfunc)py_lv_button_call, +}; + +static py_lv_obj_type_t py_lv_button_mapping = { + .lv_obj_class = &lv_button_class, + .py_type = &py_lv_button_type, +}; + + /* * lvgl extension definition for: - * uint32_t lv_arc_get_change_rate(lv_obj_t *obj) + * void lv_buttonmatrix_set_map(lv_obj_t *obj, const char * const map[]) */ -static PyObject *py_lv_arc_get_change_rate(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_set_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *map_py; + if (!PyArg_ParseTuple(py_args, "O", &map_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char * const *map = (const char * const *)lvpy_str_arr_arg(self, map_py, "lv_buttonmatrix_set_map:map"); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_arc_get_change_rate)(obj); + ((void (*)(lv_obj_t *, const char * const []))lv_buttonmatrix_set_map)(obj, map); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_get_change_rate_def = { - "lv_arc_get_change_rate", - (PyCFunction)py_lv_arc_get_change_rate, +static PyMethodDef py_lv_buttonmatrix_set_map_def = { + "lv_buttonmatrix_set_map", + (PyCFunction)py_lv_buttonmatrix_set_map, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35721,30 +47643,29 @@ static PyMethodDef py_lv_arc_get_change_rate_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_arc_bind_value(lv_obj_t *obj, lv_subject_t *subject) + * void lv_buttonmatrix_set_ctrl_map(lv_obj_t *obj, const lv_buttonmatrix_ctrl_t ctrl_map[]) */ -static PyObject *py_lv_arc_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_set_ctrl_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ctrl_map_py; + if (!PyArg_ParseTuple(py_args, "O", &ctrl_map_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_to_ptr(ctrl_map_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_arc_bind_value)(obj, subject); + ((void (*)(lv_obj_t *, const lv_buttonmatrix_ctrl_t []))lv_buttonmatrix_set_ctrl_map)(obj, ctrl_map); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_bind_value_def = { - "lv_arc_bind_value", - (PyCFunction)py_lv_arc_bind_value, +static PyMethodDef py_lv_buttonmatrix_set_ctrl_map_def = { + "lv_buttonmatrix_set_ctrl_map", + (PyCFunction)py_lv_buttonmatrix_set_ctrl_map, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35752,30 +47673,29 @@ static PyMethodDef py_lv_arc_bind_value_def = { /* * lvgl extension definition for: - * void lv_arc_align_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_align, int32_t r_offset) + * void lv_buttonmatrix_set_selected_button(lv_obj_t *obj, uint32_t btn_id) */ -static PyObject *py_lv_arc_align_obj_to_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_set_selected_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *obj_to_align_py; long r_offset_val; - if (!PyArg_ParseTuple(py_args, "Ol", &obj_to_align_py, &r_offset_val)) { PyGILState_Release(gstate); return NULL; } + long btn_id_val; + if (!PyArg_ParseTuple(py_args, "l", &btn_id_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_t *obj_to_align = mp_to_lv(obj_to_align_py); - int32_t r_offset = (int32_t)r_offset_val; + uint32_t btn_id = (uint32_t)btn_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_arc_align_obj_to_angle)(obj, obj_to_align, r_offset); + ((void (*)(lv_obj_t *, uint32_t))lv_buttonmatrix_set_selected_button)(obj, btn_id); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_align_obj_to_angle_def = { - "lv_arc_align_obj_to_angle", - (PyCFunction)py_lv_arc_align_obj_to_angle, +static PyMethodDef py_lv_buttonmatrix_set_selected_button_def = { + "lv_buttonmatrix_set_selected_button", + (PyCFunction)py_lv_buttonmatrix_set_selected_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35783,30 +47703,30 @@ static PyMethodDef py_lv_arc_align_obj_to_angle_def = { /* * lvgl extension definition for: - * void lv_arc_rotate_obj_to_angle(const lv_obj_t *obj, lv_obj_t *obj_to_rotate, int32_t r_offset) + * void lv_buttonmatrix_set_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) */ -static PyObject *py_lv_arc_rotate_obj_to_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_set_button_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *obj_to_rotate_py; long r_offset_val; - if (!PyArg_ParseTuple(py_args, "Ol", &obj_to_rotate_py, &r_offset_val)) { PyGILState_Release(gstate); return NULL; } + long btn_id_val; PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "lO", &btn_id_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_t *obj_to_rotate = mp_to_lv(obj_to_rotate_py); - int32_t r_offset = (int32_t)r_offset_val; + uint32_t btn_id = (uint32_t)btn_id_val; + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_obj_t *, int32_t))lv_arc_rotate_obj_to_angle)(obj, obj_to_rotate, r_offset); + ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_set_button_ctrl)(obj, btn_id, ctrl); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_rotate_obj_to_angle_def = { - "lv_arc_rotate_obj_to_angle", - (PyCFunction)py_lv_arc_rotate_obj_to_angle, +static PyMethodDef py_lv_buttonmatrix_set_button_ctrl_def = { + "lv_buttonmatrix_set_button_ctrl", + (PyCFunction)py_lv_buttonmatrix_set_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35814,133 +47734,90 @@ static PyMethodDef py_lv_arc_rotate_obj_to_angle_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_arc_create(lv_obj_t *parent) + * void lv_buttonmatrix_clear_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) */ -static PyObject *py_lv_arc_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_clear_button_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + long btn_id_val; PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "lO", &btn_id_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t btn_id = (uint32_t)btn_id_val; + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_arc_create)(parent); + ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_clear_button_ctrl)(obj, btn_id, ctrl); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_create_def = { - "lv_arc_create", - (PyCFunction)py_lv_arc_create, +static PyMethodDef py_lv_buttonmatrix_clear_button_ctrl_def = { + "lv_buttonmatrix_clear_button_ctrl", + (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl arc object definitions (CPython) + * lvgl extension definition for: + * void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) */ -static PyObject *py_lv_arc_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_arc_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_arc_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_arc_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_arc_dealloc(py_lv_obj_t *self) +static PyObject *py_lv_buttonmatrix_set_button_ctrl_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - lvpy_dealloc_obj(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "O", &ctrl_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_set_button_ctrl_all)(obj, ctrl); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arc_methods[] = { - {"set_start_angle", (PyCFunction)py_lv_arc_set_start_angle, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_end_angle", (PyCFunction)py_lv_arc_set_end_angle, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_angles", (PyCFunction)py_lv_arc_set_angles, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_start_angle", (PyCFunction)py_lv_arc_set_bg_start_angle, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_end_angle", (PyCFunction)py_lv_arc_set_bg_end_angle, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_angles", (PyCFunction)py_lv_arc_set_bg_angles, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rotation", (PyCFunction)py_lv_arc_set_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode", (PyCFunction)py_lv_arc_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_value", (PyCFunction)py_lv_arc_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_range", (PyCFunction)py_lv_arc_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_value", (PyCFunction)py_lv_arc_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_value", (PyCFunction)py_lv_arc_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_change_rate", (PyCFunction)py_lv_arc_set_change_rate, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_knob_offset", (PyCFunction)py_lv_arc_set_knob_offset, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_angle_start", (PyCFunction)py_lv_arc_get_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_angle_end", (PyCFunction)py_lv_arc_get_angle_end, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_bg_angle_start", (PyCFunction)py_lv_arc_get_bg_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_bg_angle_end", (PyCFunction)py_lv_arc_get_bg_angle_end, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_value", (PyCFunction)py_lv_arc_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_min_value", (PyCFunction)py_lv_arc_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_value", (PyCFunction)py_lv_arc_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode", (PyCFunction)py_lv_arc_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rotation", (PyCFunction)py_lv_arc_get_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_knob_offset", (PyCFunction)py_lv_arc_get_knob_offset, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_change_rate", (PyCFunction)py_lv_arc_get_change_rate, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_value", (PyCFunction)py_lv_arc_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"align_obj_to_angle", (PyCFunction)py_lv_arc_align_obj_to_angle, METH_VARARGS | METH_KEYWORDS, NULL}, - {"rotate_obj_to_angle", (PyCFunction)py_lv_arc_rotate_obj_to_angle, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_arc_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.arc", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_arc_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_arc_new, - .tp_methods = py_lv_arc_methods, - .tp_call = (ternaryfunc)py_lv_arc_call, -}; - -static py_lv_obj_type_t py_lv_arc_mapping = { - .lv_obj_class = &lv_arc_class, - .py_type = &py_lv_arc_type, +static PyMethodDef py_lv_buttonmatrix_set_button_ctrl_all_def = { + "lv_buttonmatrix_set_button_ctrl_all", + (PyCFunction)py_lv_buttonmatrix_set_button_ctrl_all, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * void lv_arclabel_set_text(lv_obj_t *obj, const char *text) + * void lv_buttonmatrix_clear_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) */ -static PyObject *py_lv_arclabel_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_clear_button_ctrl_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "O", &ctrl_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_arclabel_set_text)(obj, text); + ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_clear_button_ctrl_all)(obj, ctrl); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_text_def = { - "lv_arclabel_set_text", - (PyCFunction)py_lv_arclabel_set_text, +static PyMethodDef py_lv_buttonmatrix_clear_button_ctrl_all_def = { + "lv_buttonmatrix_clear_button_ctrl_all", + (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl_all, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35948,29 +47825,30 @@ static PyMethodDef py_lv_arclabel_set_text_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_text_static(lv_obj_t *obj, const char *text) + * void lv_buttonmatrix_set_button_width(lv_obj_t *obj, uint32_t btn_id, uint32_t width) */ -static PyObject *py_lv_arclabel_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_set_button_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + long btn_id_val; long width_val; + if (!PyArg_ParseTuple(py_args, "ll", &btn_id_val, &width_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + uint32_t btn_id = (uint32_t)btn_id_val; + uint32_t width = (uint32_t)width_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_arclabel_set_text_static)(obj, text); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_buttonmatrix_set_button_width)(obj, btn_id, width); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_text_static_def = { - "lv_arclabel_set_text_static", - (PyCFunction)py_lv_arclabel_set_text_static, +static PyMethodDef py_lv_buttonmatrix_set_button_width_def = { + "lv_buttonmatrix_set_button_width", + (PyCFunction)py_lv_buttonmatrix_set_button_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -35978,29 +47856,29 @@ static PyMethodDef py_lv_arclabel_set_text_static_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_angle_start(lv_obj_t *obj, lv_value_precise_t start) + * void lv_buttonmatrix_set_one_checked(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_arclabel_set_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_set_one_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *start_py; - if (!PyArg_ParseTuple(py_args, "O", &start_py)) { PyGILState_Release(gstate); return NULL; } + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t start = (float)mp_obj_get_float(start_py); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arclabel_set_angle_start)(obj, start); + ((void (*)(lv_obj_t *, bool))lv_buttonmatrix_set_one_checked)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_angle_start_def = { - "lv_arclabel_set_angle_start", - (PyCFunction)py_lv_arclabel_set_angle_start, +static PyMethodDef py_lv_buttonmatrix_set_one_checked_def = { + "lv_buttonmatrix_set_one_checked", + (PyCFunction)py_lv_buttonmatrix_set_one_checked, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36008,29 +47886,28 @@ static PyMethodDef py_lv_arclabel_set_angle_start_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_angle_size(lv_obj_t *obj, lv_value_precise_t size) + * uint32_t lv_buttonmatrix_get_selected_button(const lv_obj_t *obj) */ -static PyObject *py_lv_arclabel_set_angle_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_get_selected_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *size_py; - if (!PyArg_ParseTuple(py_args, "O", &size_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_value_precise_t size = (float)mp_obj_get_float(size_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_value_precise_t))lv_arclabel_set_angle_size)(obj, size); + _res = ((uint32_t (*)(const lv_obj_t *))lv_buttonmatrix_get_selected_button)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_arclabel_set_angle_size_def = { - "lv_arclabel_set_angle_size", - (PyCFunction)py_lv_arclabel_set_angle_size, +static PyMethodDef py_lv_buttonmatrix_get_selected_button_def = { + "lv_buttonmatrix_get_selected_button", + (PyCFunction)py_lv_buttonmatrix_get_selected_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36038,29 +47915,30 @@ static PyMethodDef py_lv_arclabel_set_angle_size_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_offset(lv_obj_t *obj, int32_t offset) + * const char *lv_buttonmatrix_get_button_text(const lv_obj_t *obj, uint32_t btn_id) */ -static PyObject *py_lv_arclabel_set_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_get_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long offset_val; - if (!PyArg_ParseTuple(py_args, "l", &offset_val)) { PyGILState_Release(gstate); return NULL; } + long btn_id_val; + if (!PyArg_ParseTuple(py_args, "l", &btn_id_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t offset = (int32_t)offset_val; + uint32_t btn_id = (uint32_t)btn_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_arclabel_set_offset)(obj, offset); + _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_buttonmatrix_get_button_text)(obj, btn_id); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_arclabel_set_offset_def = { - "lv_arclabel_set_offset", - (PyCFunction)py_lv_arclabel_set_offset, +static PyMethodDef py_lv_buttonmatrix_get_button_text_def = { + "lv_buttonmatrix_get_button_text", + (PyCFunction)py_lv_buttonmatrix_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36068,29 +47946,31 @@ static PyMethodDef py_lv_arclabel_set_offset_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_dir(lv_obj_t *obj, lv_arclabel_dir_t dir) + * bool lv_buttonmatrix_has_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) */ -static PyObject *py_lv_arclabel_set_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_has_button_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dir_py; - if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } + long btn_id_val; PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "lO", &btn_id_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_arclabel_dir_t dir = (int)mp_obj_get_int(dir_py); + uint32_t btn_id = (uint32_t)btn_id_val; + lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_arclabel_dir_t))lv_arclabel_set_dir)(obj, dir); + _res = ((bool (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_has_button_ctrl)(obj, btn_id, ctrl); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_arclabel_set_dir_def = { - "lv_arclabel_set_dir", - (PyCFunction)py_lv_arclabel_set_dir, +static PyMethodDef py_lv_buttonmatrix_has_button_ctrl_def = { + "lv_buttonmatrix_has_button_ctrl", + (PyCFunction)py_lv_buttonmatrix_has_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36098,29 +47978,28 @@ static PyMethodDef py_lv_arclabel_set_dir_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_recolor(lv_obj_t *obj, bool en) + * bool lv_buttonmatrix_get_one_checked(const lv_obj_t *obj) */ -static PyObject *py_lv_arclabel_set_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_get_one_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_arclabel_set_recolor)(obj, en); + _res = ((bool (*)(const lv_obj_t *))lv_buttonmatrix_get_one_checked)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_arclabel_set_recolor_def = { - "lv_arclabel_set_recolor", - (PyCFunction)py_lv_arclabel_set_recolor, +static PyMethodDef py_lv_buttonmatrix_get_one_checked_def = { + "lv_buttonmatrix_get_one_checked", + (PyCFunction)py_lv_buttonmatrix_get_one_checked, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36128,59 +48007,120 @@ static PyMethodDef py_lv_arclabel_set_recolor_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_radius(lv_obj_t *obj, uint32_t radius) + * lv_obj_t *lv_buttonmatrix_create(lv_obj_t *parent) */ -static PyObject *py_lv_arclabel_set_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_buttonmatrix_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long radius_val; - if (!PyArg_ParseTuple(py_args, "l", &radius_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t radius = (uint32_t)radius_val; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_arclabel_set_radius)(obj, radius); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_buttonmatrix_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arclabel_set_radius_def = { - "lv_arclabel_set_radius", - (PyCFunction)py_lv_arclabel_set_radius, +static PyMethodDef py_lv_buttonmatrix_create_def = { + "lv_buttonmatrix_create", + (PyCFunction)py_lv_buttonmatrix_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl buttonmatrix object definitions (CPython) + */ +static PyObject *py_lv_buttonmatrix_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_buttonmatrix_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_buttonmatrix_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_buttonmatrix_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_buttonmatrix_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_buttonmatrix_methods[] = { + {"set_map", (PyCFunction)py_lv_buttonmatrix_set_map, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_ctrl_map", (PyCFunction)py_lv_buttonmatrix_set_ctrl_map, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_selected_button", (PyCFunction)py_lv_buttonmatrix_set_selected_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_button_ctrl", (PyCFunction)py_lv_buttonmatrix_set_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_button_ctrl", (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_button_ctrl_all", (PyCFunction)py_lv_buttonmatrix_set_button_ctrl_all, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_button_ctrl_all", (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl_all, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_button_width", (PyCFunction)py_lv_buttonmatrix_set_button_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_one_checked", (PyCFunction)py_lv_buttonmatrix_set_one_checked, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected_button", (PyCFunction)py_lv_buttonmatrix_get_selected_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_button_text", (PyCFunction)py_lv_buttonmatrix_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_button_ctrl", (PyCFunction)py_lv_buttonmatrix_has_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_one_checked", (PyCFunction)py_lv_buttonmatrix_get_one_checked, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_buttonmatrix_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.buttonmatrix", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_buttonmatrix_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_buttonmatrix_new, + .tp_methods = py_lv_buttonmatrix_methods, + .tp_call = (ternaryfunc)py_lv_buttonmatrix_call, +}; + +static py_lv_obj_type_t py_lv_buttonmatrix_mapping = { + .lv_obj_class = &lv_buttonmatrix_class, + .py_type = &py_lv_buttonmatrix_type, +}; + + /* * lvgl extension definition for: - * void lv_arclabel_set_center_offset_x(lv_obj_t *obj, uint32_t x) + * void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day) */ -static PyObject *py_lv_arclabel_set_center_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_today_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + long year_val; long month_val; long day_val; + if (!PyArg_ParseTuple(py_args, "lll", &year_val, &month_val, &day_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t x = (uint32_t)x_val; + uint32_t year = (uint32_t)year_val; + uint32_t month = (uint32_t)month_val; + uint32_t day = (uint32_t)day_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_arclabel_set_center_offset_x)(obj, x); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, uint32_t))lv_calendar_set_today_date)(obj, year, month, day); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_center_offset_x_def = { - "lv_arclabel_set_center_offset_x", - (PyCFunction)py_lv_arclabel_set_center_offset_x, +static PyMethodDef py_lv_calendar_set_today_date_def = { + "lv_calendar_set_today_date", + (PyCFunction)py_lv_calendar_set_today_date, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36188,29 +48128,29 @@ static PyMethodDef py_lv_arclabel_set_center_offset_x_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_center_offset_y(lv_obj_t *obj, uint32_t y) + * void lv_calendar_set_today_year(lv_obj_t *obj, uint32_t year) */ -static PyObject *py_lv_arclabel_set_center_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_today_year(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long y_val; - if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } + long year_val; + if (!PyArg_ParseTuple(py_args, "l", &year_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t y = (uint32_t)y_val; + uint32_t year = (uint32_t)year_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_arclabel_set_center_offset_y)(obj, y); + ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_today_year)(obj, year); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_center_offset_y_def = { - "lv_arclabel_set_center_offset_y", - (PyCFunction)py_lv_arclabel_set_center_offset_y, +static PyMethodDef py_lv_calendar_set_today_year_def = { + "lv_calendar_set_today_year", + (PyCFunction)py_lv_calendar_set_today_year, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36218,29 +48158,29 @@ static PyMethodDef py_lv_arclabel_set_center_offset_y_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_text_vertical_align(lv_obj_t *obj, lv_arclabel_text_align_t align) + * void lv_calendar_set_today_month(lv_obj_t *obj, uint32_t month) */ -static PyObject *py_lv_arclabel_set_text_vertical_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_today_month(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } + long month_val; + if (!PyArg_ParseTuple(py_args, "l", &month_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_arclabel_text_align_t align = (int)mp_obj_get_int(align_py); + uint32_t month = (uint32_t)month_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_arclabel_set_text_vertical_align)(obj, align); + ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_today_month)(obj, month); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_text_vertical_align_def = { - "lv_arclabel_set_text_vertical_align", - (PyCFunction)py_lv_arclabel_set_text_vertical_align, +static PyMethodDef py_lv_calendar_set_today_month_def = { + "lv_calendar_set_today_month", + (PyCFunction)py_lv_calendar_set_today_month, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36248,29 +48188,29 @@ static PyMethodDef py_lv_arclabel_set_text_vertical_align_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_text_horizontal_align(lv_obj_t *obj, lv_arclabel_text_align_t align) + * void lv_calendar_set_today_day(lv_obj_t *obj, uint32_t day) */ -static PyObject *py_lv_arclabel_set_text_horizontal_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_today_day(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } + long day_val; + if (!PyArg_ParseTuple(py_args, "l", &day_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_arclabel_text_align_t align = (int)mp_obj_get_int(align_py); + uint32_t day = (uint32_t)day_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_arclabel_text_align_t))lv_arclabel_set_text_horizontal_align)(obj, align); + ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_today_day)(obj, day); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_text_horizontal_align_def = { - "lv_arclabel_set_text_horizontal_align", - (PyCFunction)py_lv_arclabel_set_text_horizontal_align, +static PyMethodDef py_lv_calendar_set_today_day_def = { + "lv_calendar_set_today_day", + (PyCFunction)py_lv_calendar_set_today_day, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36278,29 +48218,30 @@ static PyMethodDef py_lv_arclabel_set_text_horizontal_align_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_overflow(lv_obj_t *obj, lv_arclabel_overflow_t overflow) + * void lv_calendar_set_month_shown(lv_obj_t *obj, uint32_t year, uint32_t month) */ -static PyObject *py_lv_arclabel_set_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_month_shown(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *overflow_py; - if (!PyArg_ParseTuple(py_args, "O", &overflow_py)) { PyGILState_Release(gstate); return NULL; } + long year_val; long month_val; + if (!PyArg_ParseTuple(py_args, "ll", &year_val, &month_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_arclabel_overflow_t overflow = (int)mp_obj_get_int(overflow_py); + uint32_t year = (uint32_t)year_val; + uint32_t month = (uint32_t)month_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_arclabel_overflow_t))lv_arclabel_set_overflow)(obj, overflow); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_calendar_set_month_shown)(obj, year, month); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_overflow_def = { - "lv_arclabel_set_overflow", - (PyCFunction)py_lv_arclabel_set_overflow, +static PyMethodDef py_lv_calendar_set_month_shown_def = { + "lv_calendar_set_month_shown", + (PyCFunction)py_lv_calendar_set_month_shown, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36308,29 +48249,29 @@ static PyMethodDef py_lv_arclabel_set_overflow_def = { /* * lvgl extension definition for: - * void lv_arclabel_set_end_overlap(lv_obj_t *obj, bool overlap) + * void lv_calendar_set_shown_year(lv_obj_t *obj, uint32_t year) */ -static PyObject *py_lv_arclabel_set_end_overlap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_shown_year(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long overlap_val; - if (!PyArg_ParseTuple(py_args, "l", &overlap_val)) { PyGILState_Release(gstate); return NULL; } + long year_val; + if (!PyArg_ParseTuple(py_args, "l", &year_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool overlap = (overlap_val != 0); + uint32_t year = (uint32_t)year_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_arclabel_set_end_overlap)(obj, overlap); + ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_shown_year)(obj, year); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_set_end_overlap_def = { - "lv_arclabel_set_end_overlap", - (PyCFunction)py_lv_arclabel_set_end_overlap, +static PyMethodDef py_lv_calendar_set_shown_year_def = { + "lv_calendar_set_shown_year", + (PyCFunction)py_lv_calendar_set_shown_year, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36338,57 +48279,195 @@ static PyMethodDef py_lv_arclabel_set_end_overlap_def = { /* * lvgl extension definition for: - * lv_value_precise_t lv_arclabel_get_angle_start(lv_obj_t *obj) + * void lv_calendar_set_shown_month(lv_obj_t *obj, uint32_t month) */ -static PyObject *py_lv_arclabel_get_angle_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_shown_month(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long month_val; + if (!PyArg_ParseTuple(py_args, "l", &month_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t month = (uint32_t)month_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_value_precise_t _res; lvpy_lock(); - _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arclabel_get_angle_start)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_shown_month)(obj, month); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_get_angle_start_def = { - "lv_arclabel_get_angle_start", - (PyCFunction)py_lv_arclabel_get_angle_start, +static PyMethodDef py_lv_calendar_set_shown_month_def = { + "lv_calendar_set_shown_month", + (PyCFunction)py_lv_calendar_set_shown_month, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Struct lv_calendar_date_t (CPython) + */ + +extern PyMethodDef py_lv_calendar_date_t_methods[]; + +static PyObject *py_lv_calendar_date_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_calendar_date_t *data = (lv_calendar_date_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "year") == 0) return mp_obj_new_int_from_uint(data->year); + if (strcmp(attr, "month") == 0) return mp_obj_new_int_from_uint(data->month); + if (strcmp(attr, "day") == 0) return mp_obj_new_int_from_uint(data->day); + for (PyMethodDef *m = py_lv_calendar_date_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_calendar_date_t_field_names[] = {"year", "month", "day", NULL}; + +static PyObject *py_lv_calendar_date_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_calendar_date_t_field_names, py_lv_calendar_date_t_methods); +} + +static PyMethodDef py_lv_calendar_date_t_type_methods[] = { + {"__dir__", py_lv_calendar_date_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_calendar_date_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_calendar_date_t *data = (lv_calendar_date_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_calendar_date_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "year") == 0) { data->year = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "month") == 0) { data->month = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "day") == 0) { data->day = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_calendar_date_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_calendar_date_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_calendar_date_t)); +} + +static void py_lv_calendar_date_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_calendar_date_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_calendar_date_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_calendar_date_t_dealloc, + .tp_getattro = (getter)py_lv_calendar_date_t_getattro, + .tp_setattro = (setter)py_lv_calendar_date_t_setattro, + .tp_new = py_lv_calendar_date_t_new, + .tp_methods = py_lv_calendar_date_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_calendar_date_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_calendar_date_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_calendar_date_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_calendar_date_t*)self->data; +} + +static lv_calendar_date_t mp_write_scratch_lv_calendar_date_t; + +static inline void* mp_write_value_ptr_lv_calendar_date_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_calendar_date_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_calendar_date_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_calendar_date_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_calendar_date_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_calendar_date_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_calendar_date_t or dict, got None"); + } + memset(&mp_write_scratch_lv_calendar_date_t, 0, sizeof(lv_calendar_date_t)); + return &mp_write_scratch_lv_calendar_date_t; +} + +#define mp_write_lv_calendar_date_t(struct_obj) (*((lv_calendar_date_t*)mp_write_value_ptr_lv_calendar_date_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_calendar_date_t(void *field) +{ + return lv_to_mp_struct(&py_lv_calendar_date_t_type, field); +} + +#define mp_read_lv_calendar_date_t(field) lv_to_mp_struct_own(&py_lv_calendar_date_t_type, copy_buffer(&field, sizeof(lv_calendar_date_t))) +#define mp_read_byref_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(&field) + + /* * lvgl extension definition for: - * lv_value_precise_t lv_arclabel_get_angle_size(lv_obj_t *obj) + * void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], size_t date_num) */ -static PyObject *py_lv_arclabel_get_angle_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_highlighted_dates(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *highlighted_py; long date_num_val; + if (!PyArg_ParseTuple(py_args, "Ol", &highlighted_py, &date_num_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_calendar_date_t *highlighted = mp_to_ptr(highlighted_py); + size_t date_num = (size_t)date_num_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_value_precise_t _res; lvpy_lock(); - _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arclabel_get_angle_size)(obj); + ((void (*)(lv_obj_t *, lv_calendar_date_t [], size_t))lv_calendar_set_highlighted_dates)(obj, highlighted, date_num); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_get_angle_size_def = { - "lv_arclabel_get_angle_size", - (PyCFunction)py_lv_arclabel_get_angle_size, +static PyMethodDef py_lv_calendar_set_highlighted_dates_def = { + "lv_calendar_set_highlighted_dates", + (PyCFunction)py_lv_calendar_set_highlighted_dates, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36396,28 +48475,29 @@ static PyMethodDef py_lv_arclabel_get_angle_size_def = { /* * lvgl extension definition for: - * lv_arclabel_dir_t lv_arclabel_get_dir(const lv_obj_t *obj) + * void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names) */ -static PyObject *py_lv_arclabel_get_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_set_day_names(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *day_names_py; + if (!PyArg_ParseTuple(py_args, "O", &day_names_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char **day_names = (const char **)mp_write_ptr_C_Pointer(day_names_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_arclabel_dir_t _res; lvpy_lock(); - _res = ((lv_arclabel_dir_t (*)(const lv_obj_t *))lv_arclabel_get_dir)(obj); + ((void (*)(lv_obj_t *, const char **))lv_calendar_set_day_names)(obj, day_names); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_get_dir_def = { - "lv_arclabel_get_dir", - (PyCFunction)py_lv_arclabel_get_dir, +static PyMethodDef py_lv_calendar_set_day_names_def = { + "lv_calendar_set_day_names", + (PyCFunction)py_lv_calendar_set_day_names, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36425,9 +48505,9 @@ static PyMethodDef py_lv_arclabel_get_dir_def = { /* * lvgl extension definition for: - * bool lv_arclabel_get_recolor(lv_obj_t *obj) + * lv_obj_t *lv_calendar_get_btnmatrix(const lv_obj_t *obj) */ -static PyObject *py_lv_arclabel_get_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_get_btnmatrix(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -36435,18 +48515,18 @@ static PyObject *py_lv_arclabel_get_recolor(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_arclabel_get_recolor)(obj); + _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_calendar_get_btnmatrix)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arclabel_get_recolor_def = { - "lv_arclabel_get_recolor", - (PyCFunction)py_lv_arclabel_get_recolor, +static PyMethodDef py_lv_calendar_get_btnmatrix_def = { + "lv_calendar_get_btnmatrix", + (PyCFunction)py_lv_calendar_get_btnmatrix, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36454,9 +48534,9 @@ static PyMethodDef py_lv_arclabel_get_recolor_def = { /* * lvgl extension definition for: - * uint32_t lv_arclabel_get_radius(lv_obj_t *obj) + * const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *obj) */ -static PyObject *py_lv_arclabel_get_radius(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_get_today_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -36464,18 +48544,18 @@ static PyObject *py_lv_arclabel_get_radius(PyObject *self, PyObject *py_args, Py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + const lv_calendar_date_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_arclabel_get_radius)(obj); + _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_calendar_get_today_date)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_calendar_date_t((void*)_res); } -static PyMethodDef py_lv_arclabel_get_radius_def = { - "lv_arclabel_get_radius", - (PyCFunction)py_lv_arclabel_get_radius, +static PyMethodDef py_lv_calendar_get_today_date_def = { + "lv_calendar_get_today_date", + (PyCFunction)py_lv_calendar_get_today_date, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36483,9 +48563,9 @@ static PyMethodDef py_lv_arclabel_get_radius_def = { /* * lvgl extension definition for: - * uint32_t lv_arclabel_get_center_offset_x(lv_obj_t *obj) + * const lv_calendar_date_t *lv_calendar_get_showed_date(const lv_obj_t *obj) */ -static PyObject *py_lv_arclabel_get_center_offset_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_get_showed_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -36493,18 +48573,18 @@ static PyObject *py_lv_arclabel_get_center_offset_x(PyObject *self, PyObject *py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + const lv_calendar_date_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_arclabel_get_center_offset_x)(obj); + _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_calendar_get_showed_date)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_calendar_date_t((void*)_res); } -static PyMethodDef py_lv_arclabel_get_center_offset_x_def = { - "lv_arclabel_get_center_offset_x", - (PyCFunction)py_lv_arclabel_get_center_offset_x, +static PyMethodDef py_lv_calendar_get_showed_date_def = { + "lv_calendar_get_showed_date", + (PyCFunction)py_lv_calendar_get_showed_date, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36512,9 +48592,9 @@ static PyMethodDef py_lv_arclabel_get_center_offset_x_def = { /* * lvgl extension definition for: - * uint32_t lv_arclabel_get_center_offset_y(lv_obj_t *obj) + * lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *obj) */ -static PyObject *py_lv_arclabel_get_center_offset_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_get_highlighted_dates(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -36522,18 +48602,18 @@ static PyObject *py_lv_arclabel_get_center_offset_y(PyObject *self, PyObject *py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_calendar_date_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_arclabel_get_center_offset_y)(obj); + _res = ((lv_calendar_date_t *(*)(const lv_obj_t *))lv_calendar_get_highlighted_dates)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_calendar_date_t((void*)_res); } -static PyMethodDef py_lv_arclabel_get_center_offset_y_def = { - "lv_arclabel_get_center_offset_y", - (PyCFunction)py_lv_arclabel_get_center_offset_y, +static PyMethodDef py_lv_calendar_get_highlighted_dates_def = { + "lv_calendar_get_highlighted_dates", + (PyCFunction)py_lv_calendar_get_highlighted_dates, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36541,9 +48621,9 @@ static PyMethodDef py_lv_arclabel_get_center_offset_y_def = { /* * lvgl extension definition for: - * lv_arclabel_text_align_t lv_arclabel_get_text_vertical_align(lv_obj_t *obj) + * size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *obj) */ -static PyObject *py_lv_arclabel_get_text_vertical_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_get_highlighted_dates_num(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -36551,18 +48631,18 @@ static PyObject *py_lv_arclabel_get_text_vertical_align(PyObject *self, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_arclabel_text_align_t _res; + size_t _res; lvpy_lock(); - _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_arclabel_get_text_vertical_align)(obj); + _res = ((size_t (*)(const lv_obj_t *))lv_calendar_get_highlighted_dates_num)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_arclabel_get_text_vertical_align_def = { - "lv_arclabel_get_text_vertical_align", - (PyCFunction)py_lv_arclabel_get_text_vertical_align, +static PyMethodDef py_lv_calendar_get_highlighted_dates_num_def = { + "lv_calendar_get_highlighted_dates_num", + (PyCFunction)py_lv_calendar_get_highlighted_dates_num, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36570,28 +48650,30 @@ static PyMethodDef py_lv_arclabel_get_text_vertical_align_def = { /* * lvgl extension definition for: - * lv_arclabel_text_align_t lv_arclabel_get_text_horizontal_align(lv_obj_t *obj) + * lv_result_t lv_calendar_get_pressed_date(const lv_obj_t *obj, lv_calendar_date_t *date) */ -static PyObject *py_lv_arclabel_get_text_horizontal_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_get_pressed_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *date_py; + if (!PyArg_ParseTuple(py_args, "O", &date_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_calendar_date_t *date = mp_write_ptr_lv_calendar_date_t(date_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_arclabel_text_align_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_arclabel_text_align_t (*)(lv_obj_t *))lv_arclabel_get_text_horizontal_align)(obj); + _res = ((lv_result_t (*)(const lv_obj_t *, lv_calendar_date_t *))lv_calendar_get_pressed_date)(obj, date); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_arclabel_get_text_horizontal_align_def = { - "lv_arclabel_get_text_horizontal_align", - (PyCFunction)py_lv_arclabel_get_text_horizontal_align, +static PyMethodDef py_lv_calendar_get_pressed_date_def = { + "lv_calendar_get_pressed_date", + (PyCFunction)py_lv_calendar_get_pressed_date, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36599,28 +48681,28 @@ static PyMethodDef py_lv_arclabel_get_text_horizontal_align_def = { /* * lvgl extension definition for: - * lv_arclabel_overflow_t lv_arclabel_get_overflow(lv_obj_t *obj) + * lv_obj_t *lv_calendar_add_header_arrow(lv_obj_t *parent) */ -static PyObject *py_lv_arclabel_get_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_add_header_arrow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *parent = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_arclabel_overflow_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_arclabel_overflow_t (*)(lv_obj_t *))lv_arclabel_get_overflow)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_calendar_add_header_arrow)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arclabel_get_overflow_def = { - "lv_arclabel_get_overflow", - (PyCFunction)py_lv_arclabel_get_overflow, +static PyMethodDef py_lv_calendar_add_header_arrow_def = { + "lv_calendar_add_header_arrow", + (PyCFunction)py_lv_calendar_add_header_arrow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36628,28 +48710,28 @@ static PyMethodDef py_lv_arclabel_get_overflow_def = { /* * lvgl extension definition for: - * bool lv_arclabel_get_end_overlap(lv_obj_t *obj) + * lv_obj_t *lv_calendar_add_header_dropdown(lv_obj_t *parent) */ -static PyObject *py_lv_arclabel_get_end_overlap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_add_header_dropdown(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *parent = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_arclabel_get_end_overlap)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_calendar_add_header_dropdown)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arclabel_get_end_overlap_def = { - "lv_arclabel_get_end_overlap", - (PyCFunction)py_lv_arclabel_get_end_overlap, +static PyMethodDef py_lv_calendar_add_header_dropdown_def = { + "lv_calendar_add_header_dropdown", + (PyCFunction)py_lv_calendar_add_header_dropdown, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36657,28 +48739,29 @@ static PyMethodDef py_lv_arclabel_get_end_overlap_def = { /* * lvgl extension definition for: - * lv_value_precise_t lv_arclabel_get_text_angle(lv_obj_t *obj) + * void lv_calendar_header_dropdown_set_year_list(lv_obj_t *parent, const char *years_list) */ -static PyObject *py_lv_arclabel_get_text_angle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_header_dropdown_set_year_list(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *years_list_py; + if (!PyArg_ParseTuple(py_args, "O", &years_list_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = mp_to_lv(self); + const char *years_list = (const char *)(char*)convert_from_str(years_list_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_value_precise_t _res; lvpy_lock(); - _res = ((lv_value_precise_t (*)(lv_obj_t *))lv_arclabel_get_text_angle)(obj); + ((void (*)(lv_obj_t *, const char *))lv_calendar_header_dropdown_set_year_list)(parent, years_list); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_arclabel_get_text_angle_def = { - "lv_arclabel_get_text_angle", - (PyCFunction)py_lv_arclabel_get_text_angle, +static PyMethodDef py_lv_calendar_header_dropdown_set_year_list_def = { + "lv_calendar_header_dropdown_set_year_list", + (PyCFunction)py_lv_calendar_header_dropdown_set_year_list, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36686,9 +48769,9 @@ static PyMethodDef py_lv_arclabel_get_text_angle_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_arclabel_create(lv_obj_t *parent) + * lv_obj_t *lv_calendar_create(lv_obj_t *parent) */ -static PyObject *py_lv_arclabel_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -36704,113 +48787,105 @@ static PyObject *py_lv_arclabel_create(PyObject *self, PyObject *py_args, PyObje lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_arclabel_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_calendar_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_arclabel_create_def = { - "lv_arclabel_create", - (PyCFunction)py_lv_arclabel_create, +static PyMethodDef py_lv_calendar_create_def = { + "lv_calendar_create", + (PyCFunction)py_lv_calendar_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl arclabel object definitions (CPython) + * lvgl calendar object definitions (CPython) */ -static PyObject *py_lv_arclabel_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_arclabel_create(type, py_args, py_kwds); + return py_lv_calendar_create(type, py_args, py_kwds); } -static PyObject *py_lv_arclabel_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calendar_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_arclabel_create((PyObject *)type, py_args, py_kwds); + return py_lv_calendar_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_arclabel_dealloc(py_lv_obj_t *self) +static void py_lv_calendar_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_arclabel_methods[] = { - {"set_text", (PyCFunction)py_lv_arclabel_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_static", (PyCFunction)py_lv_arclabel_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_angle_start", (PyCFunction)py_lv_arclabel_set_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_angle_size", (PyCFunction)py_lv_arclabel_set_angle_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_offset", (PyCFunction)py_lv_arclabel_set_offset, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_dir", (PyCFunction)py_lv_arclabel_set_dir, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_recolor", (PyCFunction)py_lv_arclabel_set_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_radius", (PyCFunction)py_lv_arclabel_set_radius, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_center_offset_x", (PyCFunction)py_lv_arclabel_set_center_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_center_offset_y", (PyCFunction)py_lv_arclabel_set_center_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_vertical_align", (PyCFunction)py_lv_arclabel_set_text_vertical_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_horizontal_align", (PyCFunction)py_lv_arclabel_set_text_horizontal_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_overflow", (PyCFunction)py_lv_arclabel_set_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_end_overlap", (PyCFunction)py_lv_arclabel_set_end_overlap, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_angle_start", (PyCFunction)py_lv_arclabel_get_angle_start, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_angle_size", (PyCFunction)py_lv_arclabel_get_angle_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dir", (PyCFunction)py_lv_arclabel_get_dir, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_recolor", (PyCFunction)py_lv_arclabel_get_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_radius", (PyCFunction)py_lv_arclabel_get_radius, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_center_offset_x", (PyCFunction)py_lv_arclabel_get_center_offset_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_center_offset_y", (PyCFunction)py_lv_arclabel_get_center_offset_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text_vertical_align", (PyCFunction)py_lv_arclabel_get_text_vertical_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text_horizontal_align", (PyCFunction)py_lv_arclabel_get_text_horizontal_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_overflow", (PyCFunction)py_lv_arclabel_get_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_end_overlap", (PyCFunction)py_lv_arclabel_get_end_overlap, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text_angle", (PyCFunction)py_lv_arclabel_get_text_angle, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_calendar_methods[] = { + {"set_today_date", (PyCFunction)py_lv_calendar_set_today_date, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_today_year", (PyCFunction)py_lv_calendar_set_today_year, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_today_month", (PyCFunction)py_lv_calendar_set_today_month, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_today_day", (PyCFunction)py_lv_calendar_set_today_day, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_month_shown", (PyCFunction)py_lv_calendar_set_month_shown, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shown_year", (PyCFunction)py_lv_calendar_set_shown_year, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shown_month", (PyCFunction)py_lv_calendar_set_shown_month, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_highlighted_dates", (PyCFunction)py_lv_calendar_set_highlighted_dates, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_day_names", (PyCFunction)py_lv_calendar_set_day_names, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_btnmatrix", (PyCFunction)py_lv_calendar_get_btnmatrix, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_today_date", (PyCFunction)py_lv_calendar_get_today_date, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_showed_date", (PyCFunction)py_lv_calendar_get_showed_date, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_highlighted_dates", (PyCFunction)py_lv_calendar_get_highlighted_dates, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_highlighted_dates_num", (PyCFunction)py_lv_calendar_get_highlighted_dates_num, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_pressed_date", (PyCFunction)py_lv_calendar_get_pressed_date, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_header_arrow", (PyCFunction)py_lv_calendar_add_header_arrow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_header_dropdown", (PyCFunction)py_lv_calendar_add_header_dropdown, METH_VARARGS | METH_KEYWORDS, NULL}, + {"header_dropdown_set_year_list", (PyCFunction)py_lv_calendar_header_dropdown_set_year_list, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_arclabel_type = { +PyTypeObject py_lv_calendar_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.arclabel", + .tp_name = "lvgl.calendar", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_arclabel_dealloc, + .tp_dealloc = (destructor)py_lv_calendar_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_arclabel_new, - .tp_methods = py_lv_arclabel_methods, - .tp_call = (ternaryfunc)py_lv_arclabel_call, + .tp_new = (newfunc)py_lv_calendar_new, + .tp_methods = py_lv_calendar_methods, + .tp_call = (ternaryfunc)py_lv_calendar_call, }; -static py_lv_obj_type_t py_lv_arclabel_mapping = { - .lv_obj_class = &lv_arclabel_class, - .py_type = &py_lv_arclabel_type, +static py_lv_obj_type_t py_lv_calendar_mapping = { + .lv_obj_class = &lv_calendar_class, + .py_type = &py_lv_calendar_type, }; /* * lvgl extension definition for: - * void lv_label_set_text(lv_obj_t *obj, const char *text) + * void lv_chart_set_type(lv_obj_t *obj, lv_chart_type_t type) */ -static PyObject *py_lv_label_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + lv_chart_type_t type = (int)mp_obj_get_int(type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_label_set_text)(obj, text); + ((void (*)(lv_obj_t *, lv_chart_type_t))lv_chart_set_type)(obj, type); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_set_text_def = { - "lv_label_set_text", - (PyCFunction)py_lv_label_set_text, +static PyMethodDef py_lv_chart_set_type_def = { + "lv_chart_set_type", + (PyCFunction)py_lv_chart_set_type, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36818,29 +48893,29 @@ static PyMethodDef py_lv_label_set_text_def = { /* * lvgl extension definition for: - * void lv_label_set_text_static(lv_obj_t *obj, const char *text) + * void lv_chart_set_point_count(lv_obj_t *obj, uint32_t cnt) */ -static PyObject *py_lv_label_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_point_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + long cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_label_set_text_static)(obj, text); + ((void (*)(lv_obj_t *, uint32_t))lv_chart_set_point_count)(obj, cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_set_text_static_def = { - "lv_label_set_text_static", - (PyCFunction)py_lv_label_set_text_static, +static PyMethodDef py_lv_chart_set_point_count_def = { + "lv_chart_set_point_count", + (PyCFunction)py_lv_chart_set_point_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36848,29 +48923,31 @@ static PyMethodDef py_lv_label_set_text_static_def = { /* * lvgl extension definition for: - * void lv_label_set_long_mode(lv_obj_t *obj, lv_label_long_mode_t long_mode) + * void lv_chart_set_axis_range(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min, int32_t max) */ -static PyObject *py_lv_label_set_long_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_axis_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *long_mode_py; - if (!PyArg_ParseTuple(py_args, "O", &long_mode_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *axis_py; long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "Oll", &axis_py, &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_label_long_mode_t long_mode = (int)mp_obj_get_int(long_mode_py); + lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_label_long_mode_t))lv_label_set_long_mode)(obj, long_mode); + ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t, int32_t))lv_chart_set_axis_range)(obj, axis, min, max); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_set_long_mode_def = { - "lv_label_set_long_mode", - (PyCFunction)py_lv_label_set_long_mode, +static PyMethodDef py_lv_chart_set_axis_range_def = { + "lv_chart_set_axis_range", + (PyCFunction)py_lv_chart_set_axis_range, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36878,29 +48955,30 @@ static PyMethodDef py_lv_label_set_long_mode_def = { /* * lvgl extension definition for: - * void lv_label_set_text_selection_start(lv_obj_t *obj, uint32_t index) + * void lv_chart_set_axis_min_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min) */ -static PyObject *py_lv_label_set_text_selection_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_axis_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *axis_py; long min_val; + if (!PyArg_ParseTuple(py_args, "Ol", &axis_py, &min_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t index = (uint32_t)index_val; + lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); + int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_label_set_text_selection_start)(obj, index); + ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_chart_set_axis_min_value)(obj, axis, min); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_set_text_selection_start_def = { - "lv_label_set_text_selection_start", - (PyCFunction)py_lv_label_set_text_selection_start, +static PyMethodDef py_lv_chart_set_axis_min_value_def = { + "lv_chart_set_axis_min_value", + (PyCFunction)py_lv_chart_set_axis_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36908,29 +48986,30 @@ static PyMethodDef py_lv_label_set_text_selection_start_def = { /* * lvgl extension definition for: - * void lv_label_set_text_selection_end(lv_obj_t *obj, uint32_t index) + * void lv_chart_set_axis_max_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t max) */ -static PyObject *py_lv_label_set_text_selection_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_axis_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *axis_py; long max_val; + if (!PyArg_ParseTuple(py_args, "Ol", &axis_py, &max_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t index = (uint32_t)index_val; + lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_label_set_text_selection_end)(obj, index); + ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_chart_set_axis_max_value)(obj, axis, max); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_set_text_selection_end_def = { - "lv_label_set_text_selection_end", - (PyCFunction)py_lv_label_set_text_selection_end, +static PyMethodDef py_lv_chart_set_axis_max_value_def = { + "lv_chart_set_axis_max_value", + (PyCFunction)py_lv_chart_set_axis_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36938,29 +49017,29 @@ static PyMethodDef py_lv_label_set_text_selection_end_def = { /* * lvgl extension definition for: - * void lv_label_set_recolor(lv_obj_t *obj, bool en) + * void lv_chart_set_update_mode(lv_obj_t *obj, lv_chart_update_mode_t update_mode) */ -static PyObject *py_lv_label_set_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *update_mode_py; + if (!PyArg_ParseTuple(py_args, "O", &update_mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + lv_chart_update_mode_t update_mode = (int)mp_obj_get_int(update_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_label_set_recolor)(obj, en); + ((void (*)(lv_obj_t *, lv_chart_update_mode_t))lv_chart_set_update_mode)(obj, update_mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_set_recolor_def = { - "lv_label_set_recolor", - (PyCFunction)py_lv_label_set_recolor, +static PyMethodDef py_lv_chart_set_update_mode_def = { + "lv_chart_set_update_mode", + (PyCFunction)py_lv_chart_set_update_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36968,28 +49047,30 @@ static PyMethodDef py_lv_label_set_recolor_def = { /* * lvgl extension definition for: - * char *lv_label_get_text(const lv_obj_t *obj) + * void lv_chart_set_div_line_count(lv_obj_t *obj, uint32_t hdiv, uint32_t vdiv) */ -static PyObject *py_lv_label_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long hdiv_val; long vdiv_val; + if (!PyArg_ParseTuple(py_args, "ll", &hdiv_val, &vdiv_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t hdiv = (uint32_t)hdiv_val; + uint32_t vdiv = (uint32_t)vdiv_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; lvpy_lock(); - _res = ((char *(*)(const lv_obj_t *))lv_label_get_text)(obj); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_chart_set_div_line_count)(obj, hdiv, vdiv); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_label_get_text_def = { - "lv_label_get_text", - (PyCFunction)py_lv_label_get_text, +static PyMethodDef py_lv_chart_set_div_line_count_def = { + "lv_chart_set_div_line_count", + (PyCFunction)py_lv_chart_set_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -36997,28 +49078,29 @@ static PyMethodDef py_lv_label_get_text_def = { /* * lvgl extension definition for: - * lv_label_long_mode_t lv_label_get_long_mode(const lv_obj_t *obj) + * void lv_chart_set_hor_div_line_count(lv_obj_t *obj, uint32_t cnt) */ -static PyObject *py_lv_label_get_long_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_hor_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_label_long_mode_t _res; lvpy_lock(); - _res = ((lv_label_long_mode_t (*)(const lv_obj_t *))lv_label_get_long_mode)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_chart_set_hor_div_line_count)(obj, cnt); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_label_get_long_mode_def = { - "lv_label_get_long_mode", - (PyCFunction)py_lv_label_get_long_mode, +static PyMethodDef py_lv_chart_set_hor_div_line_count_def = { + "lv_chart_set_hor_div_line_count", + (PyCFunction)py_lv_chart_set_hor_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37026,30 +49108,29 @@ static PyMethodDef py_lv_label_get_long_mode_def = { /* * lvgl extension definition for: - * void lv_label_get_letter_pos(const lv_obj_t *obj, uint32_t char_id, lv_point_t *pos) + * void lv_chart_set_ver_div_line_count(lv_obj_t *obj, uint32_t cnt) */ -static PyObject *py_lv_label_get_letter_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_ver_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long char_id_val; PyObject *pos_py; - if (!PyArg_ParseTuple(py_args, "lO", &char_id_val, &pos_py)) { PyGILState_Release(gstate); return NULL; } + long cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t char_id = (uint32_t)char_id_val; - lv_point_t *pos = mp_write_ptr_lv_point_t(pos_py); + uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_obj_t *, uint32_t, lv_point_t *))lv_label_get_letter_pos)(obj, char_id, pos); + ((void (*)(lv_obj_t *, uint32_t))lv_chart_set_ver_div_line_count)(obj, cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_get_letter_pos_def = { - "lv_label_get_letter_pos", - (PyCFunction)py_lv_label_get_letter_pos, +static PyMethodDef py_lv_chart_set_ver_div_line_count_def = { + "lv_chart_set_ver_div_line_count", + (PyCFunction)py_lv_chart_set_ver_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37057,31 +49138,57 @@ static PyMethodDef py_lv_label_get_letter_pos_def = { /* * lvgl extension definition for: - * uint32_t lv_label_get_letter_on(const lv_obj_t *obj, lv_point_t *pos_in, bool bidi) + * lv_chart_type_t lv_chart_get_type(const lv_obj_t *obj) */ -static PyObject *py_lv_label_get_letter_on(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *pos_in_py; long bidi_val; - if (!PyArg_ParseTuple(py_args, "Ol", &pos_in_py, &bidi_val)) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_chart_type_t _res; + lvpy_lock(); + _res = ((lv_chart_type_t (*)(const lv_obj_t *))lv_chart_get_type)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_chart_get_type_def = { + "lv_chart_get_type", + (PyCFunction)py_lv_chart_get_type, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * uint32_t lv_chart_get_point_count(const lv_obj_t *obj) + */ +static PyObject *py_lv_chart_get_point_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + lv_obj_t *obj = mp_to_lv(self); - lv_point_t *pos_in = mp_write_ptr_lv_point_t(pos_in_py); - bool bidi = (bidi_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *, lv_point_t *, bool))lv_label_get_letter_on)(obj, pos_in, bidi); + _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_point_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_label_get_letter_on_def = { - "lv_label_get_letter_on", - (PyCFunction)py_lv_label_get_letter_on, +static PyMethodDef py_lv_chart_get_point_count_def = { + "lv_chart_get_point_count", + (PyCFunction)py_lv_chart_get_point_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37089,30 +49196,28 @@ static PyMethodDef py_lv_label_get_letter_on_def = { /* * lvgl extension definition for: - * bool lv_label_is_char_under_pos(const lv_obj_t *obj, lv_point_t *pos) + * lv_chart_update_mode_t lv_chart_get_update_mode(const lv_obj_t *obj) */ -static PyObject *py_lv_label_is_char_under_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *pos_py; - if (!PyArg_ParseTuple(py_args, "O", &pos_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_point_t *pos = mp_write_ptr_lv_point_t(pos_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_chart_update_mode_t _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_point_t *))lv_label_is_char_under_pos)(obj, pos); + _res = ((lv_chart_update_mode_t (*)(const lv_obj_t *))lv_chart_get_update_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_label_is_char_under_pos_def = { - "lv_label_is_char_under_pos", - (PyCFunction)py_lv_label_is_char_under_pos, +static PyMethodDef py_lv_chart_get_update_mode_def = { + "lv_chart_get_update_mode", + (PyCFunction)py_lv_chart_get_update_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37120,9 +49225,9 @@ static PyMethodDef py_lv_label_is_char_under_pos_def = { /* * lvgl extension definition for: - * uint32_t lv_label_get_text_selection_start(const lv_obj_t *obj) + * uint32_t lv_chart_get_hor_div_line_count(const lv_obj_t *obj) */ -static PyObject *py_lv_label_get_text_selection_start(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_hor_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -37132,16 +49237,16 @@ static PyObject *py_lv_label_get_text_selection_start(PyObject *self, PyObject * uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_label_get_text_selection_start)(obj); + _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_hor_div_line_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_label_get_text_selection_start_def = { - "lv_label_get_text_selection_start", - (PyCFunction)py_lv_label_get_text_selection_start, +static PyMethodDef py_lv_chart_get_hor_div_line_count_def = { + "lv_chart_get_hor_div_line_count", + (PyCFunction)py_lv_chart_get_hor_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37149,9 +49254,9 @@ static PyMethodDef py_lv_label_get_text_selection_start_def = { /* * lvgl extension definition for: - * uint32_t lv_label_get_text_selection_end(const lv_obj_t *obj) + * uint32_t lv_chart_get_ver_div_line_count(const lv_obj_t *obj) */ -static PyObject *py_lv_label_get_text_selection_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_ver_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -37161,77 +49266,194 @@ static PyObject *py_lv_label_get_text_selection_end(PyObject *self, PyObject *py uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_label_get_text_selection_end)(obj); + _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_ver_div_line_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_label_get_text_selection_end_def = { - "lv_label_get_text_selection_end", - (PyCFunction)py_lv_label_get_text_selection_end, +static PyMethodDef py_lv_chart_get_ver_div_line_count_def = { + "lv_chart_get_ver_div_line_count", + (PyCFunction)py_lv_chart_get_ver_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl extension definition for: - * bool lv_label_get_recolor(const lv_obj_t *obj) - */ -static PyObject *py_lv_label_get_recolor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +/* + * Struct lv_chart_series_t (CPython) + */ + +extern PyMethodDef py_lv_chart_series_t_methods[]; + +static PyObject *py_lv_chart_series_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_chart_series_t *data = (lv_chart_series_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "x_points") == 0) return mp_array_from_i32ptr((void*)data->x_points); + if (strcmp(attr, "y_points") == 0) return mp_array_from_i32ptr((void*)data->y_points); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "start_point") == 0) return mp_obj_new_int_from_uint(data->start_point); + if (strcmp(attr, "hidden") == 0) return mp_obj_new_int_from_uint(data->hidden); + if (strcmp(attr, "x_ext_buf_assigned") == 0) return mp_obj_new_int_from_uint(data->x_ext_buf_assigned); + if (strcmp(attr, "y_ext_buf_assigned") == 0) return mp_obj_new_int_from_uint(data->y_ext_buf_assigned); + if (strcmp(attr, "x_axis_sec") == 0) return mp_obj_new_int_from_uint(data->x_axis_sec); + if (strcmp(attr, "y_axis_sec") == 0) return mp_obj_new_int_from_uint(data->y_axis_sec); + for (PyMethodDef *m = py_lv_chart_series_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_chart_series_t_field_names[] = {"x_points", "y_points", "color", "start_point", "hidden", "x_ext_buf_assigned", "y_ext_buf_assigned", "x_axis_sec", "y_axis_sec", NULL}; + +static PyObject *py_lv_chart_series_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_chart_series_t_field_names, py_lv_chart_series_t_methods); +} + +static PyMethodDef py_lv_chart_series_t_type_methods[] = { + {"__dir__", py_lv_chart_series_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_chart_series_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_chart_series_t *data = (lv_chart_series_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_chart_series_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "x_points") == 0) { data->x_points = (void*)mp_array_to_i32ptr(value); result = 0; } + if (strcmp(attr, "y_points") == 0) { data->y_points = (void*)mp_array_to_i32ptr(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "start_point") == 0) { data->start_point = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "hidden") == 0) { data->hidden = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x_ext_buf_assigned") == 0) { data->x_ext_buf_assigned = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y_ext_buf_assigned") == 0) { data->y_ext_buf_assigned = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x_axis_sec") == 0) { data->x_axis_sec = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y_axis_sec") == 0) { data->y_axis_sec = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_chart_series_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_chart_series_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_chart_series_t)); +} + +static void py_lv_chart_series_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_chart_series_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_chart_series_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_chart_series_t_dealloc, + .tp_getattro = (getter)py_lv_chart_series_t_getattro, + .tp_setattro = (setter)py_lv_chart_series_t_setattro, + .tp_new = py_lv_chart_series_t_new, + .tp_methods = py_lv_chart_series_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_chart_series_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_chart_series_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_chart_series_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_chart_series_t*)self->data; +} + +static lv_chart_series_t mp_write_scratch_lv_chart_series_t; + +static inline void* mp_write_value_ptr_lv_chart_series_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_chart_series_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_chart_series_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_chart_series_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_chart_series_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_chart_series_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_chart_series_t or dict, got None"); + } + memset(&mp_write_scratch_lv_chart_series_t, 0, sizeof(lv_chart_series_t)); + return &mp_write_scratch_lv_chart_series_t; +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_label_get_recolor)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); +#define mp_write_lv_chart_series_t(struct_obj) (*((lv_chart_series_t*)mp_write_value_ptr_lv_chart_series_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_chart_series_t(void *field) +{ + return lv_to_mp_struct(&py_lv_chart_series_t_type, field); } -static PyMethodDef py_lv_label_get_recolor_def = { - "lv_label_get_recolor", - (PyCFunction)py_lv_label_get_recolor, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_chart_series_t(field) lv_to_mp_struct_own(&py_lv_chart_series_t_type, copy_buffer(&field, sizeof(lv_chart_series_t))) +#define mp_read_byref_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(&field) /* * lvgl extension definition for: - * lv_observer_t *lv_label_bind_text(lv_obj_t *obj, lv_subject_t *subject, const char *fmt) + * uint32_t lv_chart_get_x_start_point(const lv_obj_t *obj, lv_chart_series_t *ser) */ -static PyObject *py_lv_label_bind_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_x_start_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; PyObject *fmt_py; - if (!PyArg_ParseTuple(py_args, "OO", &subject_py, &fmt_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; + if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - const char *fmt = (const char *)(char*)convert_from_str(fmt_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *, const char *))lv_label_bind_text)(obj, subject, fmt); + _res = ((uint32_t (*)(const lv_obj_t *, lv_chart_series_t *))lv_chart_get_x_start_point)(obj, ser); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_label_bind_text_def = { - "lv_label_bind_text", - (PyCFunction)py_lv_label_bind_text, +static PyMethodDef py_lv_chart_get_x_start_point_def = { + "lv_chart_get_x_start_point", + (PyCFunction)py_lv_chart_get_x_start_point, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37239,30 +49461,31 @@ static PyMethodDef py_lv_label_bind_text_def = { /* * lvgl extension definition for: - * void lv_label_ins_text(lv_obj_t *obj, uint32_t pos, const char *txt) + * void lv_chart_get_point_pos_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, lv_point_t *p_out) */ -static PyObject *py_lv_label_ins_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_point_pos_by_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long pos_val; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "lO", &pos_val, &txt_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; long id_val; PyObject *p_out_py; + if (!PyArg_ParseTuple(py_args, "OlO", &ser_py, &id_val, &p_out_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t pos = (uint32_t)pos_val; - const char *txt = (const char *)(char*)convert_from_str(txt_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + uint32_t id = (uint32_t)id_val; + lv_point_t *p_out = mp_write_ptr_lv_point_t(p_out_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, const char *))lv_label_ins_text)(obj, pos, txt); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, lv_point_t *))lv_chart_get_point_pos_by_id)(obj, ser, id, p_out); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_ins_text_def = { - "lv_label_ins_text", - (PyCFunction)py_lv_label_ins_text, +static PyMethodDef py_lv_chart_get_point_pos_by_id_def = { + "lv_chart_get_point_pos_by_id", + (PyCFunction)py_lv_chart_get_point_pos_by_id, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37270,30 +49493,27 @@ static PyMethodDef py_lv_label_ins_text_def = { /* * lvgl extension definition for: - * void lv_label_cut_text(lv_obj_t *obj, uint32_t pos, uint32_t cnt) + * void lv_chart_refresh(lv_obj_t *obj) */ -static PyObject *py_lv_label_cut_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_refresh(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long pos_val; long cnt_val; - if (!PyArg_ParseTuple(py_args, "ll", &pos_val, &cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t pos = (uint32_t)pos_val; - uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_label_cut_text)(obj, pos, cnt); + ((void (*)(lv_obj_t *))lv_chart_refresh)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_label_cut_text_def = { - "lv_label_cut_text", - (PyCFunction)py_lv_label_cut_text, +static PyMethodDef py_lv_chart_refresh_def = { + "lv_chart_refresh", + (PyCFunction)py_lv_chart_refresh, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37301,123 +49521,61 @@ static PyMethodDef py_lv_label_cut_text_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_label_create(lv_obj_t *parent) + * lv_chart_series_t *lv_chart_add_series(lv_obj_t *obj, lv_color_t color, lv_chart_axis_t axis) */ -static PyObject *py_lv_label_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_add_series(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + PyObject *color_py; PyObject *axis_py; + if (!PyArg_ParseTuple(py_args, "OO", &color_py, &axis_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_color_t color = mp_write_lv_color_t(color_py); + lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_chart_series_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_label_create)(parent); + _res = ((lv_chart_series_t *(*)(lv_obj_t *, lv_color_t, lv_chart_axis_t))lv_chart_add_series)(obj, color, axis); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_chart_series_t((void*)_res); } -static PyMethodDef py_lv_label_create_def = { - "lv_label_create", - (PyCFunction)py_lv_label_create, +static PyMethodDef py_lv_chart_add_series_def = { + "lv_chart_add_series", + (PyCFunction)py_lv_chart_add_series, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl label object definitions (CPython) - */ -static PyObject *py_lv_label_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_label_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_label_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_label_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_label_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_label_methods[] = { - {"set_text", (PyCFunction)py_lv_label_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_static", (PyCFunction)py_lv_label_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_long_mode", (PyCFunction)py_lv_label_set_long_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_selection_start", (PyCFunction)py_lv_label_set_text_selection_start, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_selection_end", (PyCFunction)py_lv_label_set_text_selection_end, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_recolor", (PyCFunction)py_lv_label_set_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text", (PyCFunction)py_lv_label_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_long_mode", (PyCFunction)py_lv_label_get_long_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_letter_pos", (PyCFunction)py_lv_label_get_letter_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_letter_on", (PyCFunction)py_lv_label_get_letter_on, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_char_under_pos", (PyCFunction)py_lv_label_is_char_under_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text_selection_start", (PyCFunction)py_lv_label_get_text_selection_start, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text_selection_end", (PyCFunction)py_lv_label_get_text_selection_end, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_recolor", (PyCFunction)py_lv_label_get_recolor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_text", (PyCFunction)py_lv_label_bind_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ins_text", (PyCFunction)py_lv_label_ins_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cut_text", (PyCFunction)py_lv_label_cut_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_label_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.label", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_label_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_label_new, - .tp_methods = py_lv_label_methods, - .tp_call = (ternaryfunc)py_lv_label_call, -}; - -static py_lv_obj_type_t py_lv_label_mapping = { - .lv_obj_class = &lv_label_class, - .py_type = &py_lv_label_type, -}; - - /* * lvgl extension definition for: - * void lv_bar_set_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim) + * void lv_chart_remove_series(lv_obj_t *obj, lv_chart_series_t *series) */ -static PyObject *py_lv_bar_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_remove_series(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *anim_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *series_py; + if (!PyArg_ParseTuple(py_args, "O", &series_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_anim_enable_t anim = mp_obj_is_true(anim_py); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(series_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_bar_set_value)(obj, value, anim); + ((void (*)(lv_obj_t *, lv_chart_series_t *))lv_chart_remove_series)(obj, series); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_set_value_def = { - "lv_bar_set_value", - (PyCFunction)py_lv_bar_set_value, +static PyMethodDef py_lv_chart_remove_series_def = { + "lv_chart_remove_series", + (PyCFunction)py_lv_chart_remove_series, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37425,30 +49583,30 @@ static PyMethodDef py_lv_bar_set_value_def = { /* * lvgl extension definition for: - * void lv_bar_set_start_value(lv_obj_t *obj, int32_t start_value, lv_anim_enable_t anim) + * void lv_chart_hide_series(lv_obj_t *chart, lv_chart_series_t *series, bool hide) */ -static PyObject *py_lv_bar_set_start_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_hide_series(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long start_value_val; PyObject *anim_py; - if (!PyArg_ParseTuple(py_args, "lO", &start_value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t start_value = (int32_t)start_value_val; - lv_anim_enable_t anim = mp_obj_is_true(anim_py); + PyObject *series_py; long hide_val; + if (!PyArg_ParseTuple(py_args, "Ol", &series_py, &hide_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(series_py); + bool hide = (hide_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_bar_set_start_value)(obj, start_value, anim); + ((void (*)(lv_obj_t *, lv_chart_series_t *, bool))lv_chart_hide_series)(chart, series, hide); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_set_start_value_def = { - "lv_bar_set_start_value", - (PyCFunction)py_lv_bar_set_start_value, +static PyMethodDef py_lv_chart_hide_series_def = { + "lv_chart_hide_series", + (PyCFunction)py_lv_chart_hide_series, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37456,30 +49614,30 @@ static PyMethodDef py_lv_bar_set_start_value_def = { /* * lvgl extension definition for: - * void lv_bar_set_range(lv_obj_t *obj, int32_t min, int32_t max) + * void lv_chart_set_series_color(lv_obj_t *chart, lv_chart_series_t *series, lv_color_t color) */ -static PyObject *py_lv_bar_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_series_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; + PyObject *series_py; PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "OO", &series_py, &color_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(series_py); + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_bar_set_range)(obj, min, max); + ((void (*)(lv_obj_t *, lv_chart_series_t *, lv_color_t))lv_chart_set_series_color)(chart, series, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_set_range_def = { - "lv_bar_set_range", - (PyCFunction)py_lv_bar_set_range, +static PyMethodDef py_lv_chart_set_series_color_def = { + "lv_chart_set_series_color", + (PyCFunction)py_lv_chart_set_series_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37487,29 +49645,30 @@ static PyMethodDef py_lv_bar_set_range_def = { /* * lvgl extension definition for: - * void lv_bar_set_min_value(lv_obj_t *obj, int32_t min) + * lv_color_t lv_chart_get_series_color(lv_obj_t *chart, const lv_chart_series_t *series) */ -static PyObject *py_lv_bar_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_series_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; - if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; + PyObject *series_py; + if (!PyArg_ParseTuple(py_args, "O", &series_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + const lv_chart_series_t *series = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(series_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_bar_set_min_value)(obj, min); + _res = ((lv_color_t (*)(lv_obj_t *, const lv_chart_series_t *))lv_chart_get_series_color)(chart, series); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_bar_set_min_value_def = { - "lv_bar_set_min_value", - (PyCFunction)py_lv_bar_set_min_value, +static PyMethodDef py_lv_chart_get_series_color_def = { + "lv_chart_get_series_color", + (PyCFunction)py_lv_chart_get_series_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37517,29 +49676,30 @@ static PyMethodDef py_lv_bar_set_min_value_def = { /* * lvgl extension definition for: - * void lv_bar_set_max_value(lv_obj_t *obj, int32_t max) + * void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id) */ -static PyObject *py_lv_bar_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_x_start_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long max_val; - if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; long id_val; + if (!PyArg_ParseTuple(py_args, "Ol", &ser_py, &id_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t max = (int32_t)max_val; + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + uint32_t id = (uint32_t)id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_bar_set_max_value)(obj, max); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t))lv_chart_set_x_start_point)(obj, ser, id); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_set_max_value_def = { - "lv_bar_set_max_value", - (PyCFunction)py_lv_bar_set_max_value, +static PyMethodDef py_lv_chart_set_x_start_point_def = { + "lv_chart_set_x_start_point", + (PyCFunction)py_lv_chart_set_x_start_point, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37547,175 +49707,203 @@ static PyMethodDef py_lv_bar_set_max_value_def = { /* * lvgl extension definition for: - * void lv_bar_set_mode(lv_obj_t *obj, lv_bar_mode_t mode) + * lv_chart_series_t *lv_chart_get_series_next(const lv_obj_t *obj, const lv_chart_series_t *ser) */ -static PyObject *py_lv_bar_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_series_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; + if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_bar_mode_t mode = (int)mp_obj_get_int(mode_py); + const lv_chart_series_t *ser = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(ser_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_chart_series_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_bar_mode_t))lv_bar_set_mode)(obj, mode); + _res = ((lv_chart_series_t *(*)(const lv_obj_t *, const lv_chart_series_t *))lv_chart_get_series_next)(obj, ser); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_chart_series_t((void*)_res); } -static PyMethodDef py_lv_bar_set_mode_def = { - "lv_bar_set_mode", - (PyCFunction)py_lv_bar_set_mode, +static PyMethodDef py_lv_chart_get_series_next_def = { + "lv_chart_get_series_next", + (PyCFunction)py_lv_chart_get_series_next, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void lv_bar_set_orientation(lv_obj_t *obj, lv_bar_orientation_t orientation) + * Struct lv_chart_cursor_t (CPython) */ -static PyObject *py_lv_bar_set_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_chart_cursor_t_methods[]; + +static PyObject *py_lv_chart_cursor_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *orientation_py; - if (!PyArg_ParseTuple(py_args, "O", &orientation_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_bar_orientation_t orientation = (int)mp_obj_get_int(orientation_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_bar_orientation_t))lv_bar_set_orientation)(obj, orientation); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_chart_cursor_t *data = (lv_chart_cursor_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "pos") == 0) return mp_read_byref_lv_point_t(data->pos); + if (strcmp(attr, "point_id") == 0) return mp_obj_new_int(data->point_id); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "ser") == 0) return mp_read_ptr_lv_chart_series_t((void*)data->ser); + if (strcmp(attr, "dir") == 0) return mp_obj_new_int(data->dir); + if (strcmp(attr, "pos_set") == 0) return mp_obj_new_int_from_uint(data->pos_set); + for (PyMethodDef *m = py_lv_chart_cursor_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_bar_set_orientation_def = { - "lv_bar_set_orientation", - (PyCFunction)py_lv_bar_set_orientation, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_chart_cursor_t_field_names[] = {"pos", "point_id", "color", "ser", "dir", "pos_set", NULL}; -/* - * lvgl extension definition for: - * int32_t lv_bar_get_value(const lv_obj_t *obj) - */ -static PyObject *py_lv_bar_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_cursor_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_value)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_chart_cursor_t_field_names, py_lv_chart_cursor_t_methods); } -static PyMethodDef py_lv_bar_get_value_def = { - "lv_bar_get_value", - (PyCFunction)py_lv_bar_get_value, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_chart_cursor_t_type_methods[] = { + {"__dir__", py_lv_chart_cursor_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_chart_cursor_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_chart_cursor_t *data = (lv_chart_cursor_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_chart_cursor_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "pos") == 0) { data->pos = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "point_id") == 0) { data->point_id = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "ser") == 0) { data->ser = (void*)mp_write_ptr_lv_chart_series_t(value); result = 0; } + if (strcmp(attr, "dir") == 0) { data->dir = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pos_set") == 0) { data->pos_set = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_chart_cursor_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * int32_t lv_bar_get_start_value(const lv_obj_t *obj) - */ -static PyObject *py_lv_bar_get_start_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_cursor_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_chart_cursor_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_start_value)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); +static void py_lv_chart_cursor_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_bar_get_start_value_def = { - "lv_bar_get_start_value", - (PyCFunction)py_lv_bar_get_start_value, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_chart_cursor_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_chart_cursor_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_chart_cursor_t_dealloc, + .tp_getattro = (getter)py_lv_chart_cursor_t_getattro, + .tp_setattro = (setter)py_lv_chart_cursor_t_setattro, + .tp_new = py_lv_chart_cursor_t_new, + .tp_methods = py_lv_chart_cursor_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; +static inline void* mp_write_ptr_lv_chart_cursor_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_chart_cursor_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_chart_cursor_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_chart_cursor_t*)self->data; +} -/* - * lvgl extension definition for: - * int32_t lv_bar_get_min_value(const lv_obj_t *obj) - */ -static PyObject *py_lv_bar_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static lv_chart_cursor_t mp_write_scratch_lv_chart_cursor_t; + +static inline void* mp_write_value_ptr_lv_chart_cursor_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_chart_cursor_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_chart_cursor_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_chart_cursor_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_chart_cursor_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_chart_cursor_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_chart_cursor_t or dict, got None"); + } + memset(&mp_write_scratch_lv_chart_cursor_t, 0, sizeof(lv_chart_cursor_t)); + return &mp_write_scratch_lv_chart_cursor_t; +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_min_value)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); +#define mp_write_lv_chart_cursor_t(struct_obj) (*((lv_chart_cursor_t*)mp_write_value_ptr_lv_chart_cursor_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_chart_cursor_t(void *field) +{ + return lv_to_mp_struct(&py_lv_chart_cursor_t_type, field); } -static PyMethodDef py_lv_bar_get_min_value_def = { - "lv_bar_get_min_value", - (PyCFunction)py_lv_bar_get_min_value, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_chart_cursor_t(field) lv_to_mp_struct_own(&py_lv_chart_cursor_t_type, copy_buffer(&field, sizeof(lv_chart_cursor_t))) +#define mp_read_byref_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(&field) /* * lvgl extension definition for: - * int32_t lv_bar_get_max_value(const lv_obj_t *obj) + * lv_chart_cursor_t *lv_chart_add_cursor(lv_obj_t *obj, lv_color_t color, lv_dir_t dir) */ -static PyObject *py_lv_bar_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_add_cursor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *color_py; PyObject *dir_py; + if (!PyArg_ParseTuple(py_args, "OO", &color_py, &dir_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_color_t color = mp_write_lv_color_t(color_py); + lv_dir_t dir = (int)mp_obj_get_int(dir_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_chart_cursor_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_bar_get_max_value)(obj); + _res = ((lv_chart_cursor_t *(*)(lv_obj_t *, lv_color_t, lv_dir_t))lv_chart_add_cursor)(obj, color, dir); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_chart_cursor_t((void*)_res); } -static PyMethodDef py_lv_bar_get_max_value_def = { - "lv_bar_get_max_value", - (PyCFunction)py_lv_bar_get_max_value, +static PyMethodDef py_lv_chart_add_cursor_def = { + "lv_chart_add_cursor", + (PyCFunction)py_lv_chart_add_cursor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37723,28 +49911,29 @@ static PyMethodDef py_lv_bar_get_max_value_def = { /* * lvgl extension definition for: - * lv_bar_mode_t lv_bar_get_mode(lv_obj_t *obj) + * void lv_chart_remove_cursor(lv_obj_t *obj, lv_chart_cursor_t *cursor) */ -static PyObject *py_lv_bar_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_remove_cursor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *cursor_py; + if (!PyArg_ParseTuple(py_args, "O", &cursor_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_bar_mode_t _res; lvpy_lock(); - _res = ((lv_bar_mode_t (*)(lv_obj_t *))lv_bar_get_mode)(obj); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *))lv_chart_remove_cursor)(obj, cursor); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_get_mode_def = { - "lv_bar_get_mode", - (PyCFunction)py_lv_bar_get_mode, +static PyMethodDef py_lv_chart_remove_cursor_def = { + "lv_chart_remove_cursor", + (PyCFunction)py_lv_chart_remove_cursor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37752,28 +49941,30 @@ static PyMethodDef py_lv_bar_get_mode_def = { /* * lvgl extension definition for: - * lv_bar_orientation_t lv_bar_get_orientation(lv_obj_t *obj) + * void lv_chart_set_cursor_pos(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_point_t *pos) */ -static PyObject *py_lv_bar_get_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *cursor_py; PyObject *pos_py; + if (!PyArg_ParseTuple(py_args, "OO", &cursor_py, &pos_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); + lv_point_t *pos = mp_write_ptr_lv_point_t(pos_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_bar_orientation_t _res; lvpy_lock(); - _res = ((lv_bar_orientation_t (*)(lv_obj_t *))lv_bar_get_orientation)(obj); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_point_t *))lv_chart_set_cursor_pos)(chart, cursor, pos); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_get_orientation_def = { - "lv_bar_get_orientation", - (PyCFunction)py_lv_bar_get_orientation, +static PyMethodDef py_lv_chart_set_cursor_pos_def = { + "lv_chart_set_cursor_pos", + (PyCFunction)py_lv_chart_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37781,28 +49972,30 @@ static PyMethodDef py_lv_bar_get_orientation_def = { /* * lvgl extension definition for: - * bool lv_bar_is_symmetrical(lv_obj_t *obj) + * void lv_chart_set_cursor_pos_x(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t x) */ -static PyObject *py_lv_bar_is_symmetrical(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_cursor_pos_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *cursor_py; long x_val; + if (!PyArg_ParseTuple(py_args, "Ol", &cursor_py, &x_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); + int32_t x = (int32_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_bar_is_symmetrical)(obj); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_chart_set_cursor_pos_x)(chart, cursor, x); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_is_symmetrical_def = { - "lv_bar_is_symmetrical", - (PyCFunction)py_lv_bar_is_symmetrical, +static PyMethodDef py_lv_chart_set_cursor_pos_x_def = { + "lv_chart_set_cursor_pos_x", + (PyCFunction)py_lv_chart_set_cursor_pos_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37810,30 +50003,30 @@ static PyMethodDef py_lv_bar_is_symmetrical_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_bar_bind_value(lv_obj_t *obj, lv_subject_t *subject) + * void lv_chart_set_cursor_pos_y(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t y) */ -static PyObject *py_lv_bar_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_cursor_pos_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + PyObject *cursor_py; long y_val; + if (!PyArg_ParseTuple(py_args, "Ol", &cursor_py, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_bar_bind_value)(obj, subject); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_chart_set_cursor_pos_y)(chart, cursor, y); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_bind_value_def = { - "lv_bar_bind_value", - (PyCFunction)py_lv_bar_bind_value, +static PyMethodDef py_lv_chart_set_cursor_pos_y_def = { + "lv_chart_set_cursor_pos_y", + (PyCFunction)py_lv_chart_set_cursor_pos_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -37841,197 +50034,93 @@ static PyMethodDef py_lv_bar_bind_value_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_bar_create(lv_obj_t *parent) + * void lv_chart_set_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_chart_series_t *ser, uint32_t point_id) */ -static PyObject *py_lv_bar_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_cursor_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + PyObject *cursor_py; PyObject *ser_py; long point_id_val; + if (!PyArg_ParseTuple(py_args, "OOl", &cursor_py, &ser_py, &point_id_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + uint32_t point_id = (uint32_t)point_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_bar_create)(parent); + ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_chart_series_t *, uint32_t))lv_chart_set_cursor_point)(chart, cursor, ser, point_id); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_bar_create_def = { - "lv_bar_create", - (PyCFunction)py_lv_bar_create, +static PyMethodDef py_lv_chart_set_cursor_point_def = { + "lv_chart_set_cursor_point", + (PyCFunction)py_lv_chart_set_cursor_point, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl bar object definitions (CPython) - */ -static PyObject *py_lv_bar_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_bar_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_bar_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_bar_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_bar_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_bar_methods[] = { - {"set_value", (PyCFunction)py_lv_bar_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_start_value", (PyCFunction)py_lv_bar_set_start_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_range", (PyCFunction)py_lv_bar_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_value", (PyCFunction)py_lv_bar_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_value", (PyCFunction)py_lv_bar_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode", (PyCFunction)py_lv_bar_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_orientation", (PyCFunction)py_lv_bar_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_value", (PyCFunction)py_lv_bar_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_start_value", (PyCFunction)py_lv_bar_get_start_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_min_value", (PyCFunction)py_lv_bar_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_value", (PyCFunction)py_lv_bar_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode", (PyCFunction)py_lv_bar_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_orientation", (PyCFunction)py_lv_bar_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_symmetrical", (PyCFunction)py_lv_bar_is_symmetrical, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_value", (PyCFunction)py_lv_bar_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_bar_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.bar", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_bar_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_bar_new, - .tp_methods = py_lv_bar_methods, - .tp_call = (ternaryfunc)py_lv_bar_call, -}; - -static py_lv_obj_type_t py_lv_bar_mapping = { - .lv_obj_class = &lv_bar_class, - .py_type = &py_lv_bar_type, -}; - - /* * lvgl extension definition for: - * lv_obj_t *lv_button_create(lv_obj_t *parent) + * lv_point_t lv_chart_get_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor) */ -static PyObject *py_lv_button_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_cursor_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + PyObject *cursor_py; + if (!PyArg_ParseTuple(py_args, "O", &cursor_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *chart = mp_to_lv(self); + lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_point_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_button_create)(parent); + _res = ((lv_point_t (*)(lv_obj_t *, lv_chart_cursor_t *))lv_chart_get_cursor_point)(chart, cursor); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_lv_point_t(_res); } -static PyMethodDef py_lv_button_create_def = { - "lv_button_create", - (PyCFunction)py_lv_button_create, +static PyMethodDef py_lv_chart_get_cursor_point_def = { + "lv_chart_get_cursor_point", + (PyCFunction)py_lv_chart_get_cursor_point, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl button object definitions (CPython) - */ -static PyObject *py_lv_button_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_button_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_button_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_button_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_button_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_button_methods[] = { - - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_button_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.button", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_button_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_button_new, - .tp_methods = py_lv_button_methods, - .tp_call = (ternaryfunc)py_lv_button_call, -}; - -static py_lv_obj_type_t py_lv_button_mapping = { - .lv_obj_class = &lv_button_class, - .py_type = &py_lv_button_type, -}; - - /* * lvgl extension definition for: - * void lv_buttonmatrix_set_map(lv_obj_t *obj, const char * const map[]) + * void lv_chart_set_all_values(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) */ -static PyObject *py_lv_buttonmatrix_set_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_all_values(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *map_py; - if (!PyArg_ParseTuple(py_args, "O", &map_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; long value_val; + if (!PyArg_ParseTuple(py_args, "Ol", &ser_py, &value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char * const *map = (const char * const *)lvpy_str_arr_arg(self, map_py, "lv_buttonmatrix_set_map:map"); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char * const []))lv_buttonmatrix_set_map)(obj, map); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_chart_set_all_values)(obj, ser, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_set_map_def = { - "lv_buttonmatrix_set_map", - (PyCFunction)py_lv_buttonmatrix_set_map, +static PyMethodDef py_lv_chart_set_all_values_def = { + "lv_chart_set_all_values", + (PyCFunction)py_lv_chart_set_all_values, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38039,29 +50128,30 @@ static PyMethodDef py_lv_buttonmatrix_set_map_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_set_ctrl_map(lv_obj_t *obj, const lv_buttonmatrix_ctrl_t ctrl_map[]) + * void lv_chart_set_next_value(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) */ -static PyObject *py_lv_buttonmatrix_set_ctrl_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_next_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ctrl_map_py; - if (!PyArg_ParseTuple(py_args, "O", &ctrl_map_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; long value_val; + if (!PyArg_ParseTuple(py_args, "Ol", &ser_py, &value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_to_ptr(ctrl_map_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_buttonmatrix_ctrl_t []))lv_buttonmatrix_set_ctrl_map)(obj, ctrl_map); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_chart_set_next_value)(obj, ser, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_set_ctrl_map_def = { - "lv_buttonmatrix_set_ctrl_map", - (PyCFunction)py_lv_buttonmatrix_set_ctrl_map, +static PyMethodDef py_lv_chart_set_next_value_def = { + "lv_chart_set_next_value", + (PyCFunction)py_lv_chart_set_next_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38069,29 +50159,31 @@ static PyMethodDef py_lv_buttonmatrix_set_ctrl_map_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_set_selected_button(lv_obj_t *obj, uint32_t btn_id) + * void lv_chart_set_next_value2(lv_obj_t *obj, lv_chart_series_t *ser, int32_t x_value, int32_t y_value) */ -static PyObject *py_lv_buttonmatrix_set_selected_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_next_value2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long btn_id_val; - if (!PyArg_ParseTuple(py_args, "l", &btn_id_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; long x_value_val; long y_value_val; + if (!PyArg_ParseTuple(py_args, "Oll", &ser_py, &x_value_val, &y_value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t btn_id = (uint32_t)btn_id_val; + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + int32_t x_value = (int32_t)x_value_val; + int32_t y_value = (int32_t)y_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_buttonmatrix_set_selected_button)(obj, btn_id); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t, int32_t))lv_chart_set_next_value2)(obj, ser, x_value, y_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_set_selected_button_def = { - "lv_buttonmatrix_set_selected_button", - (PyCFunction)py_lv_buttonmatrix_set_selected_button, +static PyMethodDef py_lv_chart_set_next_value2_def = { + "lv_chart_set_next_value2", + (PyCFunction)py_lv_chart_set_next_value2, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38099,30 +50191,31 @@ static PyMethodDef py_lv_buttonmatrix_set_selected_button_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_set_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) + * void lv_chart_set_series_values(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t values[], size_t values_cnt) */ -static PyObject *py_lv_buttonmatrix_set_button_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_series_values(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long btn_id_val; PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "lO", &btn_id_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; PyObject *values_py; long values_cnt_val; + if (!PyArg_ParseTuple(py_args, "OOl", &ser_py, &values_py, &values_cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t btn_id = (uint32_t)btn_id_val; - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + const int32_t *values = (const int32_t *)mp_to_ptr(values_py); + size_t values_cnt = (size_t)values_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_set_button_ctrl)(obj, btn_id, ctrl); + ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], size_t))lv_chart_set_series_values)(obj, ser, values, values_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_set_button_ctrl_def = { - "lv_buttonmatrix_set_button_ctrl", - (PyCFunction)py_lv_buttonmatrix_set_button_ctrl, +static PyMethodDef py_lv_chart_set_series_values_def = { + "lv_chart_set_series_values", + (PyCFunction)py_lv_chart_set_series_values, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38130,30 +50223,32 @@ static PyMethodDef py_lv_buttonmatrix_set_button_ctrl_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_clear_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) + * void lv_chart_set_series_values2(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t x_values[], const int32_t y_values[], size_t values_cnt) */ -static PyObject *py_lv_buttonmatrix_clear_button_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_series_values2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long btn_id_val; PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "lO", &btn_id_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; PyObject *x_values_py; PyObject *y_values_py; long values_cnt_val; + if (!PyArg_ParseTuple(py_args, "OOOl", &ser_py, &x_values_py, &y_values_py, &values_cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t btn_id = (uint32_t)btn_id_val; - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + const int32_t *x_values = (const int32_t *)mp_to_ptr(x_values_py); + const int32_t *y_values = (const int32_t *)mp_to_ptr(y_values_py); + size_t values_cnt = (size_t)values_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_clear_button_ctrl)(obj, btn_id, ctrl); + ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], const int32_t [], size_t))lv_chart_set_series_values2)(obj, ser, x_values, y_values, values_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_clear_button_ctrl_def = { - "lv_buttonmatrix_clear_button_ctrl", - (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl, +static PyMethodDef py_lv_chart_set_series_values2_def = { + "lv_chart_set_series_values2", + (PyCFunction)py_lv_chart_set_series_values2, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38161,29 +50256,31 @@ static PyMethodDef py_lv_buttonmatrix_clear_button_ctrl_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_set_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) + * void lv_chart_set_series_value_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t value) */ -static PyObject *py_lv_buttonmatrix_set_button_ctrl_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_series_value_by_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "O", &ctrl_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; long id_val; long value_val; + if (!PyArg_ParseTuple(py_args, "Oll", &ser_py, &id_val, &value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + uint32_t id = (uint32_t)id_val; + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_set_button_ctrl_all)(obj, ctrl); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t))lv_chart_set_series_value_by_id)(obj, ser, id, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_set_button_ctrl_all_def = { - "lv_buttonmatrix_set_button_ctrl_all", - (PyCFunction)py_lv_buttonmatrix_set_button_ctrl_all, +static PyMethodDef py_lv_chart_set_series_value_by_id_def = { + "lv_chart_set_series_value_by_id", + (PyCFunction)py_lv_chart_set_series_value_by_id, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38191,29 +50288,32 @@ static PyMethodDef py_lv_buttonmatrix_set_button_ctrl_all_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_clear_button_ctrl_all(lv_obj_t *obj, lv_buttonmatrix_ctrl_t ctrl) + * void lv_chart_set_series_value_by_id2(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t x_value, int32_t y_value) */ -static PyObject *py_lv_buttonmatrix_clear_button_ctrl_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_series_value_by_id2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "O", &ctrl_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; long id_val; long x_value_val; long y_value_val; + if (!PyArg_ParseTuple(py_args, "Olll", &ser_py, &id_val, &x_value_val, &y_value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + uint32_t id = (uint32_t)id_val; + int32_t x_value = (int32_t)x_value_val; + int32_t y_value = (int32_t)y_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_clear_button_ctrl_all)(obj, ctrl); + ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t, int32_t))lv_chart_set_series_value_by_id2)(obj, ser, id, x_value, y_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_clear_button_ctrl_all_def = { - "lv_buttonmatrix_clear_button_ctrl_all", - (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl_all, +static PyMethodDef py_lv_chart_set_series_value_by_id2_def = { + "lv_chart_set_series_value_by_id2", + (PyCFunction)py_lv_chart_set_series_value_by_id2, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38221,30 +50321,30 @@ static PyMethodDef py_lv_buttonmatrix_clear_button_ctrl_all_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_set_button_width(lv_obj_t *obj, uint32_t btn_id, uint32_t width) + * void lv_chart_set_series_ext_y_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) */ -static PyObject *py_lv_buttonmatrix_set_button_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_series_ext_y_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long btn_id_val; long width_val; - if (!PyArg_ParseTuple(py_args, "ll", &btn_id_val, &width_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; PyObject *array_py; + if (!PyArg_ParseTuple(py_args, "OO", &ser_py, &array_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t btn_id = (uint32_t)btn_id_val; - uint32_t width = (uint32_t)width_val; + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + int32_t *array = mp_to_ptr(array_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_buttonmatrix_set_button_width)(obj, btn_id, width); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_chart_set_series_ext_y_array)(obj, ser, array); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_set_button_width_def = { - "lv_buttonmatrix_set_button_width", - (PyCFunction)py_lv_buttonmatrix_set_button_width, +static PyMethodDef py_lv_chart_set_series_ext_y_array_def = { + "lv_chart_set_series_ext_y_array", + (PyCFunction)py_lv_chart_set_series_ext_y_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38252,29 +50352,30 @@ static PyMethodDef py_lv_buttonmatrix_set_button_width_def = { /* * lvgl extension definition for: - * void lv_buttonmatrix_set_one_checked(lv_obj_t *obj, bool en) + * void lv_chart_set_series_ext_x_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) */ -static PyObject *py_lv_buttonmatrix_set_one_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_set_series_ext_x_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; PyObject *array_py; + if (!PyArg_ParseTuple(py_args, "OO", &ser_py, &array_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + int32_t *array = mp_to_ptr(array_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_buttonmatrix_set_one_checked)(obj, en); + ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_chart_set_series_ext_x_array)(obj, ser, array); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_buttonmatrix_set_one_checked_def = { - "lv_buttonmatrix_set_one_checked", - (PyCFunction)py_lv_buttonmatrix_set_one_checked, +static PyMethodDef py_lv_chart_set_series_ext_x_array_def = { + "lv_chart_set_series_ext_x_array", + (PyCFunction)py_lv_chart_set_series_ext_x_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38282,28 +50383,30 @@ static PyMethodDef py_lv_buttonmatrix_set_one_checked_def = { /* * lvgl extension definition for: - * uint32_t lv_buttonmatrix_get_selected_button(const lv_obj_t *obj) + * int32_t *lv_chart_get_series_y_array(const lv_obj_t *obj, lv_chart_series_t *ser) */ -static PyObject *py_lv_buttonmatrix_get_selected_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_series_y_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *ser_py; + if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int32_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_buttonmatrix_get_selected_button)(obj); + _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_chart_get_series_y_array)(obj, ser); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_array_from_i32ptr((void*)_res); } -static PyMethodDef py_lv_buttonmatrix_get_selected_button_def = { - "lv_buttonmatrix_get_selected_button", - (PyCFunction)py_lv_buttonmatrix_get_selected_button, +static PyMethodDef py_lv_chart_get_series_y_array_def = { + "lv_chart_get_series_y_array", + (PyCFunction)py_lv_chart_get_series_y_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38311,30 +50414,30 @@ static PyMethodDef py_lv_buttonmatrix_get_selected_button_def = { /* * lvgl extension definition for: - * const char *lv_buttonmatrix_get_button_text(const lv_obj_t *obj, uint32_t btn_id) + * int32_t *lv_chart_get_series_x_array(const lv_obj_t *obj, lv_chart_series_t *ser) */ -static PyObject *py_lv_buttonmatrix_get_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_series_x_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long btn_id_val; - if (!PyArg_ParseTuple(py_args, "l", &btn_id_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *ser_py; + if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t btn_id = (uint32_t)btn_id_val; + lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + int32_t * _res; lvpy_lock(); - _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_buttonmatrix_get_button_text)(obj, btn_id); + _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_chart_get_series_x_array)(obj, ser); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_array_from_i32ptr((void*)_res); } -static PyMethodDef py_lv_buttonmatrix_get_button_text_def = { - "lv_buttonmatrix_get_button_text", - (PyCFunction)py_lv_buttonmatrix_get_button_text, +static PyMethodDef py_lv_chart_get_series_x_array_def = { + "lv_chart_get_series_x_array", + (PyCFunction)py_lv_chart_get_series_x_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38342,31 +50445,28 @@ static PyMethodDef py_lv_buttonmatrix_get_button_text_def = { /* * lvgl extension definition for: - * bool lv_buttonmatrix_has_button_ctrl(lv_obj_t *obj, uint32_t btn_id, lv_buttonmatrix_ctrl_t ctrl) + * uint32_t lv_chart_get_pressed_point(const lv_obj_t *obj) */ -static PyObject *py_lv_buttonmatrix_has_button_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_pressed_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long btn_id_val; PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "lO", &btn_id_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t btn_id = (uint32_t)btn_id_val; - lv_buttonmatrix_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, uint32_t, lv_buttonmatrix_ctrl_t))lv_buttonmatrix_has_button_ctrl)(obj, btn_id, ctrl); + _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_pressed_point)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_buttonmatrix_has_button_ctrl_def = { - "lv_buttonmatrix_has_button_ctrl", - (PyCFunction)py_lv_buttonmatrix_has_button_ctrl, +static PyMethodDef py_lv_chart_get_pressed_point_def = { + "lv_chart_get_pressed_point", + (PyCFunction)py_lv_chart_get_pressed_point, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38374,9 +50474,9 @@ static PyMethodDef py_lv_buttonmatrix_has_button_ctrl_def = { /* * lvgl extension definition for: - * bool lv_buttonmatrix_get_one_checked(const lv_obj_t *obj) + * int32_t lv_chart_get_first_point_center_offset(lv_obj_t *obj) */ -static PyObject *py_lv_buttonmatrix_get_one_checked(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_get_first_point_center_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -38384,18 +50484,18 @@ static PyObject *py_lv_buttonmatrix_get_one_checked(PyObject *self, PyObject *py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_buttonmatrix_get_one_checked)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_chart_get_first_point_center_offset)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_buttonmatrix_get_one_checked_def = { - "lv_buttonmatrix_get_one_checked", - (PyCFunction)py_lv_buttonmatrix_get_one_checked, +static PyMethodDef py_lv_chart_get_first_point_center_offset_def = { + "lv_chart_get_first_point_center_offset", + (PyCFunction)py_lv_chart_get_first_point_center_offset, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38403,9 +50503,9 @@ static PyMethodDef py_lv_buttonmatrix_get_one_checked_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_buttonmatrix_create(lv_obj_t *parent) + * lv_obj_t *lv_chart_create(lv_obj_t *parent) */ -static PyObject *py_lv_buttonmatrix_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -38421,132 +50521,131 @@ static PyObject *py_lv_buttonmatrix_create(PyObject *self, PyObject *py_args, Py lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_buttonmatrix_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_chart_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_buttonmatrix_create_def = { - "lv_buttonmatrix_create", - (PyCFunction)py_lv_buttonmatrix_create, +static PyMethodDef py_lv_chart_create_def = { + "lv_chart_create", + (PyCFunction)py_lv_chart_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl buttonmatrix object definitions (CPython) + * lvgl chart object definitions (CPython) */ -static PyObject *py_lv_buttonmatrix_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_buttonmatrix_create(type, py_args, py_kwds); + return py_lv_chart_create(type, py_args, py_kwds); } -static PyObject *py_lv_buttonmatrix_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_chart_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_buttonmatrix_create((PyObject *)type, py_args, py_kwds); + return py_lv_chart_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_buttonmatrix_dealloc(py_lv_obj_t *self) +static void py_lv_chart_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_buttonmatrix_methods[] = { - {"set_map", (PyCFunction)py_lv_buttonmatrix_set_map, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_ctrl_map", (PyCFunction)py_lv_buttonmatrix_set_ctrl_map, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_selected_button", (PyCFunction)py_lv_buttonmatrix_set_selected_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_button_ctrl", (PyCFunction)py_lv_buttonmatrix_set_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_button_ctrl", (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_button_ctrl_all", (PyCFunction)py_lv_buttonmatrix_set_button_ctrl_all, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_button_ctrl_all", (PyCFunction)py_lv_buttonmatrix_clear_button_ctrl_all, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_button_width", (PyCFunction)py_lv_buttonmatrix_set_button_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_one_checked", (PyCFunction)py_lv_buttonmatrix_set_one_checked, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected_button", (PyCFunction)py_lv_buttonmatrix_get_selected_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_button_text", (PyCFunction)py_lv_buttonmatrix_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_button_ctrl", (PyCFunction)py_lv_buttonmatrix_has_button_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_one_checked", (PyCFunction)py_lv_buttonmatrix_get_one_checked, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_chart_methods[] = { + {"set_type", (PyCFunction)py_lv_chart_set_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_point_count", (PyCFunction)py_lv_chart_set_point_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_axis_range", (PyCFunction)py_lv_chart_set_axis_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_axis_min_value", (PyCFunction)py_lv_chart_set_axis_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_axis_max_value", (PyCFunction)py_lv_chart_set_axis_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_update_mode", (PyCFunction)py_lv_chart_set_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_div_line_count", (PyCFunction)py_lv_chart_set_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_hor_div_line_count", (PyCFunction)py_lv_chart_set_hor_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_ver_div_line_count", (PyCFunction)py_lv_chart_set_ver_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_type", (PyCFunction)py_lv_chart_get_type, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_point_count", (PyCFunction)py_lv_chart_get_point_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_update_mode", (PyCFunction)py_lv_chart_get_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_hor_div_line_count", (PyCFunction)py_lv_chart_get_hor_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_ver_div_line_count", (PyCFunction)py_lv_chart_get_ver_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_x_start_point", (PyCFunction)py_lv_chart_get_x_start_point, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_point_pos_by_id", (PyCFunction)py_lv_chart_get_point_pos_by_id, METH_VARARGS | METH_KEYWORDS, NULL}, + {"refresh", (PyCFunction)py_lv_chart_refresh, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_series", (PyCFunction)py_lv_chart_add_series, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_series", (PyCFunction)py_lv_chart_remove_series, METH_VARARGS | METH_KEYWORDS, NULL}, + {"hide_series", (PyCFunction)py_lv_chart_hide_series, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_series_color", (PyCFunction)py_lv_chart_set_series_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_series_color", (PyCFunction)py_lv_chart_get_series_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_x_start_point", (PyCFunction)py_lv_chart_set_x_start_point, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_series_next", (PyCFunction)py_lv_chart_get_series_next, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_cursor", (PyCFunction)py_lv_chart_add_cursor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_cursor", (PyCFunction)py_lv_chart_remove_cursor, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor_pos", (PyCFunction)py_lv_chart_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor_pos_x", (PyCFunction)py_lv_chart_set_cursor_pos_x, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor_pos_y", (PyCFunction)py_lv_chart_set_cursor_pos_y, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor_point", (PyCFunction)py_lv_chart_set_cursor_point, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cursor_point", (PyCFunction)py_lv_chart_get_cursor_point, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_all_values", (PyCFunction)py_lv_chart_set_all_values, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_next_value", (PyCFunction)py_lv_chart_set_next_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_next_value2", (PyCFunction)py_lv_chart_set_next_value2, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_series_values", (PyCFunction)py_lv_chart_set_series_values, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_series_values2", (PyCFunction)py_lv_chart_set_series_values2, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_series_value_by_id", (PyCFunction)py_lv_chart_set_series_value_by_id, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_series_value_by_id2", (PyCFunction)py_lv_chart_set_series_value_by_id2, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_series_ext_y_array", (PyCFunction)py_lv_chart_set_series_ext_y_array, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_series_ext_x_array", (PyCFunction)py_lv_chart_set_series_ext_x_array, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_series_y_array", (PyCFunction)py_lv_chart_get_series_y_array, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_series_x_array", (PyCFunction)py_lv_chart_get_series_x_array, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_pressed_point", (PyCFunction)py_lv_chart_get_pressed_point, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_first_point_center_offset", (PyCFunction)py_lv_chart_get_first_point_center_offset, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_buttonmatrix_type = { +PyTypeObject py_lv_chart_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.buttonmatrix", + .tp_name = "lvgl.chart", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_buttonmatrix_dealloc, + .tp_dealloc = (destructor)py_lv_chart_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_buttonmatrix_new, - .tp_methods = py_lv_buttonmatrix_methods, - .tp_call = (ternaryfunc)py_lv_buttonmatrix_call, -}; - -static py_lv_obj_type_t py_lv_buttonmatrix_mapping = { - .lv_obj_class = &lv_buttonmatrix_class, - .py_type = &py_lv_buttonmatrix_type, + .tp_new = (newfunc)py_lv_chart_new, + .tp_methods = py_lv_chart_methods, + .tp_call = (ternaryfunc)py_lv_chart_call, }; - -/* - * lvgl extension definition for: - * void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day) - */ -static PyObject *py_lv_calendar_set_today_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long year_val; long month_val; long day_val; - if (!PyArg_ParseTuple(py_args, "lll", &year_val, &month_val, &day_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t year = (uint32_t)year_val; - uint32_t month = (uint32_t)month_val; - uint32_t day = (uint32_t)day_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, uint32_t))lv_calendar_set_today_date)(obj, year, month, day); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_calendar_set_today_date_def = { - "lv_calendar_set_today_date", - (PyCFunction)py_lv_calendar_set_today_date, - METH_VARARGS | METH_KEYWORDS, - NULL +static py_lv_obj_type_t py_lv_chart_mapping = { + .lv_obj_class = &lv_chart_class, + .py_type = &py_lv_chart_type, }; /* * lvgl extension definition for: - * void lv_calendar_set_today_year(lv_obj_t *obj, uint32_t year) + * void lv_checkbox_set_text(lv_obj_t *obj, const char *txt) */ -static PyObject *py_lv_calendar_set_today_year(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_checkbox_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long year_val; - if (!PyArg_ParseTuple(py_args, "l", &year_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t year = (uint32_t)year_val; + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_today_year)(obj, year); + ((void (*)(lv_obj_t *, const char *))lv_checkbox_set_text)(obj, txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_set_today_year_def = { - "lv_calendar_set_today_year", - (PyCFunction)py_lv_calendar_set_today_year, +static PyMethodDef py_lv_checkbox_set_text_def = { + "lv_checkbox_set_text", + (PyCFunction)py_lv_checkbox_set_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38554,29 +50653,29 @@ static PyMethodDef py_lv_calendar_set_today_year_def = { /* * lvgl extension definition for: - * void lv_calendar_set_today_month(lv_obj_t *obj, uint32_t month) + * void lv_checkbox_set_text_static(lv_obj_t *obj, const char *txt) */ -static PyObject *py_lv_calendar_set_today_month(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_checkbox_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long month_val; - if (!PyArg_ParseTuple(py_args, "l", &month_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t month = (uint32_t)month_val; + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_today_month)(obj, month); + ((void (*)(lv_obj_t *, const char *))lv_checkbox_set_text_static)(obj, txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_set_today_month_def = { - "lv_calendar_set_today_month", - (PyCFunction)py_lv_calendar_set_today_month, +static PyMethodDef py_lv_checkbox_set_text_static_def = { + "lv_checkbox_set_text_static", + (PyCFunction)py_lv_checkbox_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38584,60 +50683,28 @@ static PyMethodDef py_lv_calendar_set_today_month_def = { /* * lvgl extension definition for: - * void lv_calendar_set_today_day(lv_obj_t *obj, uint32_t day) + * const char *lv_checkbox_get_text(const lv_obj_t *obj) */ -static PyObject *py_lv_calendar_set_today_day(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_checkbox_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long day_val; - if (!PyArg_ParseTuple(py_args, "l", &day_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t day = (uint32_t)day_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_today_day)(obj, day); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} -static PyMethodDef py_lv_calendar_set_today_day_def = { - "lv_calendar_set_today_day", - (PyCFunction)py_lv_calendar_set_today_day, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_calendar_set_month_shown(lv_obj_t *obj, uint32_t year, uint32_t month) - */ -static PyObject *py_lv_calendar_set_month_shown(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long year_val; long month_val; - if (!PyArg_ParseTuple(py_args, "ll", &year_val, &month_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t year = (uint32_t)year_val; - uint32_t month = (uint32_t)month_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_calendar_set_month_shown)(obj, year, month); + _res = ((const char *(*)(const lv_obj_t *))lv_checkbox_get_text)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_calendar_set_month_shown_def = { - "lv_calendar_set_month_shown", - (PyCFunction)py_lv_calendar_set_month_shown, +static PyMethodDef py_lv_checkbox_get_text_def = { + "lv_checkbox_get_text", + (PyCFunction)py_lv_checkbox_get_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38645,255 +50712,108 @@ static PyMethodDef py_lv_calendar_set_month_shown_def = { /* * lvgl extension definition for: - * void lv_calendar_set_shown_year(lv_obj_t *obj, uint32_t year) + * lv_obj_t *lv_checkbox_create(lv_obj_t *parent) */ -static PyObject *py_lv_calendar_set_shown_year(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_checkbox_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long year_val; - if (!PyArg_ParseTuple(py_args, "l", &year_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t year = (uint32_t)year_val; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_shown_year)(obj, year); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_checkbox_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_calendar_set_shown_year_def = { - "lv_calendar_set_shown_year", - (PyCFunction)py_lv_calendar_set_shown_year, +static PyMethodDef py_lv_checkbox_create_def = { + "lv_checkbox_create", + (PyCFunction)py_lv_checkbox_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void lv_calendar_set_shown_month(lv_obj_t *obj, uint32_t month) + * lvgl checkbox object definitions (CPython) */ -static PyObject *py_lv_calendar_set_shown_month(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_checkbox_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long month_val; - if (!PyArg_ParseTuple(py_args, "l", &month_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t month = (uint32_t)month_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_calendar_set_shown_month)(obj, month); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + (void)type; + return py_lv_checkbox_create(type, py_args, py_kwds); } -static PyMethodDef py_lv_calendar_set_shown_month_def = { - "lv_calendar_set_shown_month", - (PyCFunction)py_lv_calendar_set_shown_month, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * Struct lv_calendar_date_t (CPython) - */ - -extern PyMethodDef py_lv_calendar_date_t_methods[]; - -static PyObject *py_lv_calendar_date_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_checkbox_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_calendar_date_t *data = (lv_calendar_date_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "year") == 0) return mp_obj_new_int_from_uint(data->year); - if (strcmp(attr, "month") == 0) return mp_obj_new_int_from_uint(data->month); - if (strcmp(attr, "day") == 0) return mp_obj_new_int_from_uint(data->day); - for (PyMethodDef *m = py_lv_calendar_date_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + return py_lv_checkbox_create((PyObject *)type, py_args, py_kwds); } -static const char *const py_lv_calendar_date_t_field_names[] = {"year", "month", "day", NULL}; - -static PyObject *py_lv_calendar_date_t_dir(PyObject *self, PyObject *unused) +static void py_lv_checkbox_dealloc(py_lv_obj_t *self) { - (void)unused; - return lvpy_struct_dir(self, py_lv_calendar_date_t_field_names, py_lv_calendar_date_t_methods); + lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_calendar_date_t_type_methods[] = { - {"__dir__", py_lv_calendar_date_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_checkbox_methods[] = { + {"set_text", (PyCFunction)py_lv_checkbox_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_static", (PyCFunction)py_lv_checkbox_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text", (PyCFunction)py_lv_checkbox_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} }; -static int py_lv_calendar_date_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_calendar_date_t *data = (lv_calendar_date_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_calendar_date_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "year") == 0) { data->year = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "month") == 0) { data->month = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "day") == 0) { data->day = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_calendar_date_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_calendar_date_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_calendar_date_t)); -} - -static void py_lv_calendar_date_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_calendar_date_t_type = { +PyTypeObject py_lv_checkbox_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_calendar_date_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_calendar_date_t_dealloc, - .tp_getattro = (getter)py_lv_calendar_date_t_getattro, - .tp_setattro = (setter)py_lv_calendar_date_t_setattro, - .tp_new = py_lv_calendar_date_t_new, - .tp_methods = py_lv_calendar_date_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .tp_name = "lvgl.checkbox", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_checkbox_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_checkbox_new, + .tp_methods = py_lv_checkbox_methods, + .tp_call = (ternaryfunc)py_lv_checkbox_call, }; -static inline void* mp_write_ptr_lv_calendar_date_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_calendar_date_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_calendar_date_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_calendar_date_t*)self->data; -} - -static lv_calendar_date_t mp_write_scratch_lv_calendar_date_t; - -static inline void* mp_write_value_ptr_lv_calendar_date_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_calendar_date_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_calendar_date_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_calendar_date_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_calendar_date_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_calendar_date_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_calendar_date_t or dict, got None"); - } - memset(&mp_write_scratch_lv_calendar_date_t, 0, sizeof(lv_calendar_date_t)); - return &mp_write_scratch_lv_calendar_date_t; -} - -#define mp_write_lv_calendar_date_t(struct_obj) (*((lv_calendar_date_t*)mp_write_value_ptr_lv_calendar_date_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_calendar_date_t(void *field) -{ - return lv_to_mp_struct(&py_lv_calendar_date_t_type, field); -} - -#define mp_read_lv_calendar_date_t(field) lv_to_mp_struct_own(&py_lv_calendar_date_t_type, copy_buffer(&field, sizeof(lv_calendar_date_t))) -#define mp_read_byref_lv_calendar_date_t(field) mp_read_ptr_lv_calendar_date_t(&field) - - -/* - * lvgl extension definition for: - * void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], size_t date_num) - */ -static PyObject *py_lv_calendar_set_highlighted_dates(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *highlighted_py; long date_num_val; - if (!PyArg_ParseTuple(py_args, "Ol", &highlighted_py, &date_num_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_calendar_date_t *highlighted = mp_to_ptr(highlighted_py); - size_t date_num = (size_t)date_num_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_calendar_date_t [], size_t))lv_calendar_set_highlighted_dates)(obj, highlighted, date_num); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_calendar_set_highlighted_dates_def = { - "lv_calendar_set_highlighted_dates", - (PyCFunction)py_lv_calendar_set_highlighted_dates, - METH_VARARGS | METH_KEYWORDS, - NULL +static py_lv_obj_type_t py_lv_checkbox_mapping = { + .lv_obj_class = &lv_checkbox_class, + .py_type = &py_lv_checkbox_type, }; /* * lvgl extension definition for: - * void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names) + * void lv_dropdown_set_text(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_calendar_set_day_names(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *day_names_py; - if (!PyArg_ParseTuple(py_args, "O", &day_names_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char **day_names = (const char **)mp_write_ptr_C_Pointer(day_names_py); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char **))lv_calendar_set_day_names)(obj, day_names); + ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_text)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_set_day_names_def = { - "lv_calendar_set_day_names", - (PyCFunction)py_lv_calendar_set_day_names, +static PyMethodDef py_lv_dropdown_set_text_def = { + "lv_dropdown_set_text", + (PyCFunction)py_lv_dropdown_set_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38901,28 +50821,29 @@ static PyMethodDef py_lv_calendar_set_day_names_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_calendar_get_btnmatrix(const lv_obj_t *obj) + * void lv_dropdown_set_text_static(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_calendar_get_btnmatrix(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_calendar_get_btnmatrix)(obj); + ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_text_static)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_get_btnmatrix_def = { - "lv_calendar_get_btnmatrix", - (PyCFunction)py_lv_calendar_get_btnmatrix, +static PyMethodDef py_lv_dropdown_set_text_static_def = { + "lv_dropdown_set_text_static", + (PyCFunction)py_lv_dropdown_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38930,28 +50851,29 @@ static PyMethodDef py_lv_calendar_get_btnmatrix_def = { /* * lvgl extension definition for: - * const lv_calendar_date_t *lv_calendar_get_today_date(const lv_obj_t *calendar) + * void lv_dropdown_set_options(lv_obj_t *obj, const char *options) */ -static PyObject *py_lv_calendar_get_today_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *calendar = mp_to_lv(self); + PyObject *options_py; + if (!PyArg_ParseTuple(py_args, "O", &options_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *options = (const char *)(char*)convert_from_str(options_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_calendar_date_t * _res; lvpy_lock(); - _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_calendar_get_today_date)(calendar); + ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_options)(obj, options); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_calendar_date_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_get_today_date_def = { - "lv_calendar_get_today_date", - (PyCFunction)py_lv_calendar_get_today_date, +static PyMethodDef py_lv_dropdown_set_options_def = { + "lv_dropdown_set_options", + (PyCFunction)py_lv_dropdown_set_options, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38959,28 +50881,29 @@ static PyMethodDef py_lv_calendar_get_today_date_def = { /* * lvgl extension definition for: - * const lv_calendar_date_t *lv_calendar_get_showed_date(const lv_obj_t *calendar) + * void lv_dropdown_set_options_static(lv_obj_t *obj, const char *options) */ -static PyObject *py_lv_calendar_get_showed_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_options_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *calendar = mp_to_lv(self); + PyObject *options_py; + if (!PyArg_ParseTuple(py_args, "O", &options_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *options = (const char *)(char*)convert_from_str(options_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_calendar_date_t * _res; lvpy_lock(); - _res = ((const lv_calendar_date_t *(*)(const lv_obj_t *))lv_calendar_get_showed_date)(calendar); + ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_options_static)(obj, options); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_calendar_date_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_get_showed_date_def = { - "lv_calendar_get_showed_date", - (PyCFunction)py_lv_calendar_get_showed_date, +static PyMethodDef py_lv_dropdown_set_options_static_def = { + "lv_dropdown_set_options_static", + (PyCFunction)py_lv_dropdown_set_options_static, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -38988,28 +50911,30 @@ static PyMethodDef py_lv_calendar_get_showed_date_def = { /* * lvgl extension definition for: - * lv_calendar_date_t *lv_calendar_get_highlighted_dates(const lv_obj_t *calendar) + * void lv_dropdown_add_option(lv_obj_t *obj, const char *option, uint32_t pos) */ -static PyObject *py_lv_calendar_get_highlighted_dates(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_add_option(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *calendar = mp_to_lv(self); + PyObject *option_py; long pos_val; + if (!PyArg_ParseTuple(py_args, "Ol", &option_py, &pos_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *option = (const char *)(char*)convert_from_str(option_py); + uint32_t pos = (uint32_t)pos_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_calendar_date_t * _res; lvpy_lock(); - _res = ((lv_calendar_date_t *(*)(const lv_obj_t *))lv_calendar_get_highlighted_dates)(calendar); + ((void (*)(lv_obj_t *, const char *, uint32_t))lv_dropdown_add_option)(obj, option, pos); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_calendar_date_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_get_highlighted_dates_def = { - "lv_calendar_get_highlighted_dates", - (PyCFunction)py_lv_calendar_get_highlighted_dates, +static PyMethodDef py_lv_dropdown_add_option_def = { + "lv_dropdown_add_option", + (PyCFunction)py_lv_dropdown_add_option, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39017,28 +50942,27 @@ static PyMethodDef py_lv_calendar_get_highlighted_dates_def = { /* * lvgl extension definition for: - * size_t lv_calendar_get_highlighted_dates_num(const lv_obj_t *calendar) + * void lv_dropdown_clear_options(lv_obj_t *obj) */ -static PyObject *py_lv_calendar_get_highlighted_dates_num(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_clear_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *calendar = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; lvpy_lock(); - _res = ((size_t (*)(const lv_obj_t *))lv_calendar_get_highlighted_dates_num)(calendar); + ((void (*)(lv_obj_t *))lv_dropdown_clear_options)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_get_highlighted_dates_num_def = { - "lv_calendar_get_highlighted_dates_num", - (PyCFunction)py_lv_calendar_get_highlighted_dates_num, +static PyMethodDef py_lv_dropdown_clear_options_def = { + "lv_dropdown_clear_options", + (PyCFunction)py_lv_dropdown_clear_options, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39046,30 +50970,29 @@ static PyMethodDef py_lv_calendar_get_highlighted_dates_num_def = { /* * lvgl extension definition for: - * lv_result_t lv_calendar_get_pressed_date(const lv_obj_t *calendar, lv_calendar_date_t *date) + * void lv_dropdown_set_selected(lv_obj_t *obj, uint32_t sel_opt) */ -static PyObject *py_lv_calendar_get_pressed_date(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *date_py; - if (!PyArg_ParseTuple(py_args, "O", &date_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *calendar = mp_to_lv(self); - lv_calendar_date_t *date = mp_write_ptr_lv_calendar_date_t(date_py); + long sel_opt_val; + if (!PyArg_ParseTuple(py_args, "l", &sel_opt_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t sel_opt = (uint32_t)sel_opt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_obj_t *, lv_calendar_date_t *))lv_calendar_get_pressed_date)(calendar, date); + ((void (*)(lv_obj_t *, uint32_t))lv_dropdown_set_selected)(obj, sel_opt); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_get_pressed_date_def = { - "lv_calendar_get_pressed_date", - (PyCFunction)py_lv_calendar_get_pressed_date, +static PyMethodDef py_lv_dropdown_set_selected_def = { + "lv_dropdown_set_selected", + (PyCFunction)py_lv_dropdown_set_selected, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39077,28 +51000,29 @@ static PyMethodDef py_lv_calendar_get_pressed_date_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_calendar_add_header_arrow(lv_obj_t *parent) + * void lv_dropdown_set_dir(lv_obj_t *obj, lv_dir_t dir) */ -static PyObject *py_lv_calendar_add_header_arrow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *parent = mp_to_lv(self); + PyObject *dir_py; + if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_dir_t dir = (int)mp_obj_get_int(dir_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_calendar_add_header_arrow)(parent); + ((void (*)(lv_obj_t *, lv_dir_t))lv_dropdown_set_dir)(obj, dir); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_add_header_arrow_def = { - "lv_calendar_add_header_arrow", - (PyCFunction)py_lv_calendar_add_header_arrow, +static PyMethodDef py_lv_dropdown_set_dir_def = { + "lv_dropdown_set_dir", + (PyCFunction)py_lv_dropdown_set_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39106,28 +51030,29 @@ static PyMethodDef py_lv_calendar_add_header_arrow_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_calendar_add_header_dropdown(lv_obj_t *parent) + * void lv_dropdown_set_symbol(lv_obj_t *obj, const void *symbol) */ -static PyObject *py_lv_calendar_add_header_dropdown(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_symbol(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *parent = mp_to_lv(self); + PyObject *symbol_py; + if (!PyArg_ParseTuple(py_args, "O", &symbol_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const void *symbol = (const void *)mp_to_ptr(symbol_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_calendar_add_header_dropdown)(parent); + ((void (*)(lv_obj_t *, const void *))lv_dropdown_set_symbol)(obj, symbol); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_add_header_dropdown_def = { - "lv_calendar_add_header_dropdown", - (PyCFunction)py_lv_calendar_add_header_dropdown, +static PyMethodDef py_lv_dropdown_set_symbol_def = { + "lv_dropdown_set_symbol", + (PyCFunction)py_lv_dropdown_set_symbol, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39135,29 +51060,29 @@ static PyMethodDef py_lv_calendar_add_header_dropdown_def = { /* * lvgl extension definition for: - * void lv_calendar_header_dropdown_set_year_list(lv_obj_t *parent, const char *years_list) + * void lv_dropdown_set_selected_highlight(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_calendar_header_dropdown_set_year_list(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_set_selected_highlight(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *years_list_py; - if (!PyArg_ParseTuple(py_args, "O", &years_list_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = mp_to_lv(self); - const char *years_list = (const char *)(char*)convert_from_str(years_list_py); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_calendar_header_dropdown_set_year_list)(parent, years_list); + ((void (*)(lv_obj_t *, bool))lv_dropdown_set_selected_highlight)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_calendar_header_dropdown_set_year_list_def = { - "lv_calendar_header_dropdown_set_year_list", - (PyCFunction)py_lv_calendar_header_dropdown_set_year_list, +static PyMethodDef py_lv_dropdown_set_selected_highlight_def = { + "lv_dropdown_set_selected_highlight", + (PyCFunction)py_lv_dropdown_set_selected_highlight, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39165,126 +51090,57 @@ static PyMethodDef py_lv_calendar_header_dropdown_set_year_list_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_calendar_create(lv_obj_t *parent) + * lv_obj_t *lv_dropdown_get_list(lv_obj_t *obj) */ -static PyObject *py_lv_calendar_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_list(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_calendar_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_dropdown_get_list)(obj); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_calendar_create_def = { - "lv_calendar_create", - (PyCFunction)py_lv_calendar_create, +static PyMethodDef py_lv_dropdown_get_list_def = { + "lv_dropdown_get_list", + (PyCFunction)py_lv_dropdown_get_list, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl calendar object definitions (CPython) - */ -static PyObject *py_lv_calendar_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_calendar_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_calendar_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_calendar_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_calendar_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_calendar_methods[] = { - {"set_today_date", (PyCFunction)py_lv_calendar_set_today_date, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_today_year", (PyCFunction)py_lv_calendar_set_today_year, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_today_month", (PyCFunction)py_lv_calendar_set_today_month, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_today_day", (PyCFunction)py_lv_calendar_set_today_day, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_month_shown", (PyCFunction)py_lv_calendar_set_month_shown, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shown_year", (PyCFunction)py_lv_calendar_set_shown_year, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shown_month", (PyCFunction)py_lv_calendar_set_shown_month, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_highlighted_dates", (PyCFunction)py_lv_calendar_set_highlighted_dates, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_day_names", (PyCFunction)py_lv_calendar_set_day_names, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_btnmatrix", (PyCFunction)py_lv_calendar_get_btnmatrix, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_today_date", (PyCFunction)py_lv_calendar_get_today_date, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_showed_date", (PyCFunction)py_lv_calendar_get_showed_date, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_highlighted_dates", (PyCFunction)py_lv_calendar_get_highlighted_dates, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_highlighted_dates_num", (PyCFunction)py_lv_calendar_get_highlighted_dates_num, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_pressed_date", (PyCFunction)py_lv_calendar_get_pressed_date, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_header_arrow", (PyCFunction)py_lv_calendar_add_header_arrow, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_header_dropdown", (PyCFunction)py_lv_calendar_add_header_dropdown, METH_VARARGS | METH_KEYWORDS, NULL}, - {"header_dropdown_set_year_list", (PyCFunction)py_lv_calendar_header_dropdown_set_year_list, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_calendar_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.calendar", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_calendar_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_calendar_new, - .tp_methods = py_lv_calendar_methods, - .tp_call = (ternaryfunc)py_lv_calendar_call, -}; - -static py_lv_obj_type_t py_lv_calendar_mapping = { - .lv_obj_class = &lv_calendar_class, - .py_type = &py_lv_calendar_type, -}; - - /* * lvgl extension definition for: - * void lv_canvas_set_buffer(lv_obj_t *obj, void *buf, int32_t w, int32_t h, lv_color_format_t cf) + * const char *lv_dropdown_get_text(lv_obj_t *obj) */ -static PyObject *py_lv_canvas_set_buffer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; long w_val; long h_val; PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "OllO", &buf_py, &w_val, &h_val, &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - void *buf = mp_to_ptr(buf_py); - int32_t w = (int32_t)w_val; - int32_t h = (int32_t)h_val; - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, void *, int32_t, int32_t, lv_color_format_t))lv_canvas_set_buffer)(obj, buf, w, h, cf); + _res = ((const char *(*)(lv_obj_t *))lv_dropdown_get_text)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_canvas_set_buffer_def = { - "lv_canvas_set_buffer", - (PyCFunction)py_lv_canvas_set_buffer, +static PyMethodDef py_lv_dropdown_get_text_def = { + "lv_dropdown_get_text", + (PyCFunction)py_lv_dropdown_get_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39292,29 +51148,28 @@ static PyMethodDef py_lv_canvas_set_buffer_def = { /* * lvgl extension definition for: - * void lv_canvas_set_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) + * const char *lv_dropdown_get_options(const lv_obj_t *obj) */ -static PyObject *py_lv_canvas_set_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_draw_buf_t *))lv_canvas_set_draw_buf)(obj, draw_buf); + _res = ((const char *(*)(const lv_obj_t *))lv_dropdown_get_options)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_canvas_set_draw_buf_def = { - "lv_canvas_set_draw_buf", - (PyCFunction)py_lv_canvas_set_draw_buf, +static PyMethodDef py_lv_dropdown_get_options_def = { + "lv_dropdown_get_options", + (PyCFunction)py_lv_dropdown_get_options, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39322,32 +51177,28 @@ static PyMethodDef py_lv_canvas_set_draw_buf_def = { /* * lvgl extension definition for: - * void lv_canvas_set_px(lv_obj_t *obj, int32_t x, int32_t y, lv_color_t color, lv_opa_t opa) + * uint32_t lv_dropdown_get_selected(const lv_obj_t *obj) */ -static PyObject *py_lv_canvas_set_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; PyObject *color_py; long opa_val; - if (!PyArg_ParseTuple(py_args, "llOl", &x_val, &y_val, &color_py, &opa_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; - lv_color_t color = mp_write_lv_color_t(color_py); - lv_opa_t opa = (lv_opa_t)opa_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_color_t, lv_opa_t))lv_canvas_set_px)(obj, x, y, color, opa); + _res = ((uint32_t (*)(const lv_obj_t *))lv_dropdown_get_selected)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_canvas_set_px_def = { - "lv_canvas_set_px", - (PyCFunction)py_lv_canvas_set_px, +static PyMethodDef py_lv_dropdown_get_selected_def = { + "lv_dropdown_get_selected", + (PyCFunction)py_lv_dropdown_get_selected, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39355,30 +51206,28 @@ static PyMethodDef py_lv_canvas_set_px_def = { /* * lvgl extension definition for: - * void lv_canvas_set_palette(lv_obj_t *obj, uint8_t index, lv_color32_t color) + * uint32_t lv_dropdown_get_option_count(const lv_obj_t *obj) */ -static PyObject *py_lv_canvas_set_palette(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_option_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "lO", &index_val, &color_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint8_t index = (uint8_t)index_val; - lv_color32_t color = mp_write_lv_color32_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint8_t, lv_color32_t))lv_canvas_set_palette)(obj, index, color); + _res = ((uint32_t (*)(const lv_obj_t *))lv_dropdown_get_option_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_canvas_set_palette_def = { - "lv_canvas_set_palette", - (PyCFunction)py_lv_canvas_set_palette, +static PyMethodDef py_lv_dropdown_get_option_count_def = { + "lv_dropdown_get_option_count", + (PyCFunction)py_lv_dropdown_get_option_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39386,28 +51235,30 @@ static PyMethodDef py_lv_canvas_set_palette_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_canvas_get_draw_buf(lv_obj_t *obj) + * void lv_dropdown_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) */ -static PyObject *py_lv_canvas_get_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_selected_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *buf_py; long buf_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + char *buf = (char*)convert_from_str(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_obj_t *))lv_canvas_get_draw_buf)(obj); + ((void (*)(const lv_obj_t *, char *, uint32_t))lv_dropdown_get_selected_str)(obj, buf, buf_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_canvas_get_draw_buf_def = { - "lv_canvas_get_draw_buf", - (PyCFunction)py_lv_canvas_get_draw_buf, +static PyMethodDef py_lv_dropdown_get_selected_str_def = { + "lv_dropdown_get_selected_str", + (PyCFunction)py_lv_dropdown_get_selected_str, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39415,31 +51266,30 @@ static PyMethodDef py_lv_canvas_get_draw_buf_def = { /* * lvgl extension definition for: - * lv_color32_t lv_canvas_get_px(lv_obj_t *obj, int32_t x, int32_t y) + * int32_t lv_dropdown_get_option_index(lv_obj_t *obj, const char *option) */ -static PyObject *py_lv_canvas_get_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_option_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *option_py; + if (!PyArg_ParseTuple(py_args, "O", &option_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + const char *option = (const char *)(char*)convert_from_str(option_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_obj_t *, int32_t, int32_t))lv_canvas_get_px)(obj, x, y); + _res = ((int32_t (*)(lv_obj_t *, const char *))lv_dropdown_get_option_index)(obj, option); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_canvas_get_px_def = { - "lv_canvas_get_px", - (PyCFunction)py_lv_canvas_get_px, +static PyMethodDef py_lv_dropdown_get_option_index_def = { + "lv_dropdown_get_option_index", + (PyCFunction)py_lv_dropdown_get_option_index, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39447,28 +51297,28 @@ static PyMethodDef py_lv_canvas_get_px_def = { /* * lvgl extension definition for: - * lv_image_dsc_t *lv_canvas_get_image(lv_obj_t *canvas) + * const char *lv_dropdown_get_symbol(lv_obj_t *obj) */ -static PyObject *py_lv_canvas_get_image(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_symbol(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *canvas = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_image_dsc_t * _res; + const char * _res; lvpy_lock(); - _res = ((lv_image_dsc_t *(*)(lv_obj_t *))lv_canvas_get_image)(canvas); + _res = ((const char *(*)(lv_obj_t *))lv_dropdown_get_symbol)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_image_dsc_t((void*)_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_canvas_get_image_def = { - "lv_canvas_get_image", - (PyCFunction)py_lv_canvas_get_image, +static PyMethodDef py_lv_dropdown_get_symbol_def = { + "lv_dropdown_get_symbol", + (PyCFunction)py_lv_dropdown_get_symbol, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39476,28 +51326,28 @@ static PyMethodDef py_lv_canvas_get_image_def = { /* * lvgl extension definition for: - * const void *lv_canvas_get_buf(lv_obj_t *canvas) + * bool lv_dropdown_get_selected_highlight(lv_obj_t *obj) */ -static PyObject *py_lv_canvas_get_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_selected_highlight(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *canvas = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; + bool _res; lvpy_lock(); - _res = ((const void *(*)(lv_obj_t *))lv_canvas_get_buf)(canvas); + _res = ((bool (*)(lv_obj_t *))lv_dropdown_get_selected_highlight)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_canvas_get_buf_def = { - "lv_canvas_get_buf", - (PyCFunction)py_lv_canvas_get_buf, +static PyMethodDef py_lv_dropdown_get_selected_highlight_def = { + "lv_dropdown_get_selected_highlight", + (PyCFunction)py_lv_dropdown_get_selected_highlight, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39505,31 +51355,28 @@ static PyMethodDef py_lv_canvas_get_buf_def = { /* * lvgl extension definition for: - * void lv_canvas_copy_buf(lv_obj_t *obj, const lv_area_t *canvas_area, lv_draw_buf_t *src_buf, const lv_area_t *src_area) + * lv_dir_t lv_dropdown_get_dir(const lv_obj_t *obj) */ -static PyObject *py_lv_canvas_copy_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_get_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *canvas_area_py; PyObject *src_buf_py; PyObject *src_area_py; - if (!PyArg_ParseTuple(py_args, "OOO", &canvas_area_py, &src_buf_py, &src_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const lv_area_t *canvas_area = (const lv_area_t *)mp_write_ptr_lv_area_t(canvas_area_py); - lv_draw_buf_t *src_buf = mp_write_ptr_lv_draw_buf_t(src_buf_py); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(src_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_dir_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_area_t *, lv_draw_buf_t *, const lv_area_t *))lv_canvas_copy_buf)(obj, canvas_area, src_buf, src_area); + _res = ((lv_dir_t (*)(const lv_obj_t *))lv_dropdown_get_dir)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_canvas_copy_buf_def = { - "lv_canvas_copy_buf", - (PyCFunction)py_lv_canvas_copy_buf, +static PyMethodDef py_lv_dropdown_get_dir_def = { + "lv_dropdown_get_dir", + (PyCFunction)py_lv_dropdown_get_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39537,30 +51384,27 @@ static PyMethodDef py_lv_canvas_copy_buf_def = { /* * lvgl extension definition for: - * void lv_canvas_fill_bg(lv_obj_t *obj, lv_color_t color, lv_opa_t opa) + * void lv_dropdown_open(lv_obj_t *dropdown_obj) */ -static PyObject *py_lv_canvas_fill_bg(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *color_py; long opa_val; - if (!PyArg_ParseTuple(py_args, "Ol", &color_py, &opa_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - lv_opa_t opa = (lv_opa_t)opa_val; + + lv_obj_t *dropdown_obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t, lv_opa_t))lv_canvas_fill_bg)(obj, color, opa); + ((void (*)(lv_obj_t *))lv_dropdown_open)(dropdown_obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_canvas_fill_bg_def = { - "lv_canvas_fill_bg", - (PyCFunction)py_lv_canvas_fill_bg, +static PyMethodDef py_lv_dropdown_open_def = { + "lv_dropdown_open", + (PyCFunction)py_lv_dropdown_open, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39568,29 +51412,27 @@ static PyMethodDef py_lv_canvas_fill_bg_def = { /* * lvgl extension definition for: - * void lv_canvas_init_layer(lv_obj_t *canvas, lv_layer_t *layer) + * void lv_dropdown_close(lv_obj_t *obj) */ -static PyObject *py_lv_canvas_init_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *canvas = mp_to_lv(self); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_layer_t *))lv_canvas_init_layer)(canvas, layer); + ((void (*)(lv_obj_t *))lv_dropdown_close)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_canvas_init_layer_def = { - "lv_canvas_init_layer", - (PyCFunction)py_lv_canvas_init_layer, +static PyMethodDef py_lv_dropdown_close_def = { + "lv_dropdown_close", + (PyCFunction)py_lv_dropdown_close, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39598,29 +51440,28 @@ static PyMethodDef py_lv_canvas_init_layer_def = { /* * lvgl extension definition for: - * void lv_canvas_finish_layer(lv_obj_t *canvas, lv_layer_t *layer) + * bool lv_dropdown_is_open(lv_obj_t *obj) */ -static PyObject *py_lv_canvas_finish_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_is_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *canvas = mp_to_lv(self); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_layer_t *))lv_canvas_finish_layer)(canvas, layer); + _res = ((bool (*)(lv_obj_t *))lv_dropdown_is_open)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_canvas_finish_layer_def = { - "lv_canvas_finish_layer", - (PyCFunction)py_lv_canvas_finish_layer, +static PyMethodDef py_lv_dropdown_is_open_def = { + "lv_dropdown_is_open", + (PyCFunction)py_lv_dropdown_is_open, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39628,33 +51469,30 @@ static PyMethodDef py_lv_canvas_finish_layer_def = { /* * lvgl extension definition for: - * uint32_t lv_canvas_buf_size(int32_t w, int32_t h, uint8_t bpp, uint8_t stride) + * lv_observer_t *lv_dropdown_bind_value(lv_obj_t *obj, lv_subject_t *subject) */ -static PyObject *py_lv_canvas_buf_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long w_val; long h_val; long bpp_val; long stride_val; - if (!PyArg_ParseTuple(py_args, "llll", &w_val, &h_val, &bpp_val, &stride_val)) { PyGILState_Release(gstate); return NULL; } - int32_t w = (int32_t)w_val; - int32_t h = (int32_t)h_val; - uint8_t bpp = (uint8_t)bpp_val; - uint8_t stride = (uint8_t)stride_val; + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(int32_t, int32_t, uint8_t, uint8_t))lv_canvas_buf_size)(w, h, bpp, stride); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_dropdown_bind_value)(obj, subject); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_canvas_buf_size_def = { - "lv_canvas_buf_size", - (PyCFunction)py_lv_canvas_buf_size, +static PyMethodDef py_lv_dropdown_bind_value_def = { + "lv_dropdown_bind_value", + (PyCFunction)py_lv_dropdown_bind_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39662,9 +51500,9 @@ static PyMethodDef py_lv_canvas_buf_size_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_canvas_create(lv_obj_t *parent) + * lv_obj_t *lv_dropdown_create(lv_obj_t *parent) */ -static PyObject *py_lv_canvas_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -39680,100 +51518,111 @@ static PyObject *py_lv_canvas_create(PyObject *self, PyObject *py_args, PyObject lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_canvas_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_dropdown_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_canvas_create_def = { - "lv_canvas_create", - (PyCFunction)py_lv_canvas_create, +static PyMethodDef py_lv_dropdown_create_def = { + "lv_dropdown_create", + (PyCFunction)py_lv_dropdown_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl canvas object definitions (CPython) + * lvgl dropdown object definitions (CPython) */ -static PyObject *py_lv_canvas_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_canvas_create(type, py_args, py_kwds); + return py_lv_dropdown_create(type, py_args, py_kwds); } -static PyObject *py_lv_canvas_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dropdown_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_canvas_create((PyObject *)type, py_args, py_kwds); + return py_lv_dropdown_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_canvas_dealloc(py_lv_obj_t *self) +static void py_lv_dropdown_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_canvas_methods[] = { - {"set_buffer", (PyCFunction)py_lv_canvas_set_buffer, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_draw_buf", (PyCFunction)py_lv_canvas_set_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_px", (PyCFunction)py_lv_canvas_set_px, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_palette", (PyCFunction)py_lv_canvas_set_palette, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_draw_buf", (PyCFunction)py_lv_canvas_get_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_px", (PyCFunction)py_lv_canvas_get_px, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_image", (PyCFunction)py_lv_canvas_get_image, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_buf", (PyCFunction)py_lv_canvas_get_buf, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy_buf", (PyCFunction)py_lv_canvas_copy_buf, METH_VARARGS | METH_KEYWORDS, NULL}, - {"fill_bg", (PyCFunction)py_lv_canvas_fill_bg, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_layer", (PyCFunction)py_lv_canvas_init_layer, METH_VARARGS | METH_KEYWORDS, NULL}, - {"finish_layer", (PyCFunction)py_lv_canvas_finish_layer, METH_VARARGS | METH_KEYWORDS, NULL}, - {"buf_size", (PyCFunction)py_lv_canvas_buf_size, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_dropdown_methods[] = { + {"set_text", (PyCFunction)py_lv_dropdown_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_static", (PyCFunction)py_lv_dropdown_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_options", (PyCFunction)py_lv_dropdown_set_options, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_options_static", (PyCFunction)py_lv_dropdown_set_options_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_option", (PyCFunction)py_lv_dropdown_add_option, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_options", (PyCFunction)py_lv_dropdown_clear_options, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_selected", (PyCFunction)py_lv_dropdown_set_selected, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_dir", (PyCFunction)py_lv_dropdown_set_dir, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_symbol", (PyCFunction)py_lv_dropdown_set_symbol, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_selected_highlight", (PyCFunction)py_lv_dropdown_set_selected_highlight, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_list", (PyCFunction)py_lv_dropdown_get_list, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text", (PyCFunction)py_lv_dropdown_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_options", (PyCFunction)py_lv_dropdown_get_options, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected", (PyCFunction)py_lv_dropdown_get_selected, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_option_count", (PyCFunction)py_lv_dropdown_get_option_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected_str", (PyCFunction)py_lv_dropdown_get_selected_str, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_option_index", (PyCFunction)py_lv_dropdown_get_option_index, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_symbol", (PyCFunction)py_lv_dropdown_get_symbol, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected_highlight", (PyCFunction)py_lv_dropdown_get_selected_highlight, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dir", (PyCFunction)py_lv_dropdown_get_dir, METH_VARARGS | METH_KEYWORDS, NULL}, + {"open", (PyCFunction)py_lv_dropdown_open, METH_VARARGS | METH_KEYWORDS, NULL}, + {"close", (PyCFunction)py_lv_dropdown_close, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_open", (PyCFunction)py_lv_dropdown_is_open, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_value", (PyCFunction)py_lv_dropdown_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_canvas_type = { +PyTypeObject py_lv_dropdown_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.canvas", + .tp_name = "lvgl.dropdown", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_canvas_dealloc, + .tp_dealloc = (destructor)py_lv_dropdown_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_canvas_new, - .tp_methods = py_lv_canvas_methods, - .tp_call = (ternaryfunc)py_lv_canvas_call, + .tp_new = (newfunc)py_lv_dropdown_new, + .tp_methods = py_lv_dropdown_methods, + .tp_call = (ternaryfunc)py_lv_dropdown_call, }; -static py_lv_obj_type_t py_lv_canvas_mapping = { - .lv_obj_class = &lv_canvas_class, - .py_type = &py_lv_canvas_type, +static py_lv_obj_type_t py_lv_dropdown_mapping = { + .lv_obj_class = &lv_dropdown_class, + .py_type = &py_lv_dropdown_type, }; /* * lvgl extension definition for: - * void lv_chart_set_type(lv_obj_t *obj, lv_chart_type_t type) + * void lv_gif_set_color_format(lv_obj_t *obj, lv_color_format_t color_format) */ -static PyObject *py_lv_chart_set_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_set_color_format(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *type_py; - if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "O", &color_format_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_type_t type = (int)mp_obj_get_int(type_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_type_t))lv_chart_set_type)(obj, type); + ((void (*)(lv_obj_t *, lv_color_format_t))lv_gif_set_color_format)(obj, color_format); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_type_def = { - "lv_chart_set_type", - (PyCFunction)py_lv_chart_set_type, +static PyMethodDef py_lv_gif_set_color_format_def = { + "lv_gif_set_color_format", + (PyCFunction)py_lv_gif_set_color_format, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39781,29 +51630,29 @@ static PyMethodDef py_lv_chart_set_type_def = { /* * lvgl extension definition for: - * void lv_chart_set_point_count(lv_obj_t *obj, uint32_t cnt) + * void lv_gif_set_src(lv_obj_t *obj, const void *src) */ -static PyObject *py_lv_chart_set_point_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t cnt = (uint32_t)cnt_val; + const void *src = (const void *)mp_to_ptr(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_chart_set_point_count)(obj, cnt); + ((void (*)(lv_obj_t *, const void *))lv_gif_set_src)(obj, src); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_point_count_def = { - "lv_chart_set_point_count", - (PyCFunction)py_lv_chart_set_point_count, +static PyMethodDef py_lv_gif_set_src_def = { + "lv_gif_set_src", + (PyCFunction)py_lv_gif_set_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39811,62 +51660,27 @@ static PyMethodDef py_lv_chart_set_point_count_def = { /* * lvgl extension definition for: - * void lv_chart_set_axis_range(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min, int32_t max) + * void lv_gif_restart(lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_axis_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_restart(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *axis_py; long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "Oll", &axis_py, &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t, int32_t))lv_chart_set_axis_range)(obj, axis, min, max); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_chart_set_axis_range_def = { - "lv_chart_set_axis_range", - (PyCFunction)py_lv_chart_set_axis_range, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - -/* - * lvgl extension definition for: - * void lv_chart_set_axis_min_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t min) - */ -static PyObject *py_lv_chart_set_axis_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *axis_py; long min_val; - if (!PyArg_ParseTuple(py_args, "Ol", &axis_py, &min_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); - int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_chart_set_axis_min_value)(obj, axis, min); + ((void (*)(lv_obj_t *))lv_gif_restart)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_axis_min_value_def = { - "lv_chart_set_axis_min_value", - (PyCFunction)py_lv_chart_set_axis_min_value, +static PyMethodDef py_lv_gif_restart_def = { + "lv_gif_restart", + (PyCFunction)py_lv_gif_restart, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39874,30 +51688,27 @@ static PyMethodDef py_lv_chart_set_axis_min_value_def = { /* * lvgl extension definition for: - * void lv_chart_set_axis_max_value(lv_obj_t *obj, lv_chart_axis_t axis, int32_t max) + * void lv_gif_pause(lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_axis_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_pause(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *axis_py; long max_val; - if (!PyArg_ParseTuple(py_args, "Ol", &axis_py, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); - int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_axis_t, int32_t))lv_chart_set_axis_max_value)(obj, axis, max); + ((void (*)(lv_obj_t *))lv_gif_pause)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_axis_max_value_def = { - "lv_chart_set_axis_max_value", - (PyCFunction)py_lv_chart_set_axis_max_value, +static PyMethodDef py_lv_gif_pause_def = { + "lv_gif_pause", + (PyCFunction)py_lv_gif_pause, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39905,29 +51716,27 @@ static PyMethodDef py_lv_chart_set_axis_max_value_def = { /* * lvgl extension definition for: - * void lv_chart_set_update_mode(lv_obj_t *obj, lv_chart_update_mode_t update_mode) + * void lv_gif_resume(lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_resume(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *update_mode_py; - if (!PyArg_ParseTuple(py_args, "O", &update_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_chart_update_mode_t update_mode = (int)mp_obj_get_int(update_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_update_mode_t))lv_chart_set_update_mode)(obj, update_mode); + ((void (*)(lv_obj_t *))lv_gif_resume)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_update_mode_def = { - "lv_chart_set_update_mode", - (PyCFunction)py_lv_chart_set_update_mode, +static PyMethodDef py_lv_gif_resume_def = { + "lv_gif_resume", + (PyCFunction)py_lv_gif_resume, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39935,30 +51744,28 @@ static PyMethodDef py_lv_chart_set_update_mode_def = { /* * lvgl extension definition for: - * void lv_chart_set_div_line_count(lv_obj_t *obj, uint32_t hdiv, uint32_t vdiv) + * bool lv_gif_is_loaded(lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_is_loaded(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long hdiv_val; long vdiv_val; - if (!PyArg_ParseTuple(py_args, "ll", &hdiv_val, &vdiv_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t hdiv = (uint32_t)hdiv_val; - uint32_t vdiv = (uint32_t)vdiv_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_chart_set_div_line_count)(obj, hdiv, vdiv); + _res = ((bool (*)(lv_obj_t *))lv_gif_is_loaded)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_chart_set_div_line_count_def = { - "lv_chart_set_div_line_count", - (PyCFunction)py_lv_chart_set_div_line_count, +static PyMethodDef py_lv_gif_is_loaded_def = { + "lv_gif_is_loaded", + (PyCFunction)py_lv_gif_is_loaded, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39966,29 +51773,28 @@ static PyMethodDef py_lv_chart_set_div_line_count_def = { /* * lvgl extension definition for: - * void lv_chart_set_hor_div_line_count(lv_obj_t *obj, uint32_t cnt) + * int32_t lv_gif_get_loop_count(lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_hor_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_get_loop_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_chart_set_hor_div_line_count)(obj, cnt); + _res = ((int32_t (*)(lv_obj_t *))lv_gif_get_loop_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_chart_set_hor_div_line_count_def = { - "lv_chart_set_hor_div_line_count", - (PyCFunction)py_lv_chart_set_hor_div_line_count, +static PyMethodDef py_lv_gif_get_loop_count_def = { + "lv_gif_get_loop_count", + (PyCFunction)py_lv_gif_get_loop_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -39996,29 +51802,29 @@ static PyMethodDef py_lv_chart_set_hor_div_line_count_def = { /* * lvgl extension definition for: - * void lv_chart_set_ver_div_line_count(lv_obj_t *obj, uint32_t cnt) + * void lv_gif_set_loop_count(lv_obj_t *obj, int32_t count) */ -static PyObject *py_lv_chart_set_ver_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_set_loop_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } + long count_val; + if (!PyArg_ParseTuple(py_args, "l", &count_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t cnt = (uint32_t)cnt_val; + int32_t count = (int32_t)count_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_chart_set_ver_div_line_count)(obj, cnt); + ((void (*)(lv_obj_t *, int32_t))lv_gif_set_loop_count)(obj, count); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_ver_div_line_count_def = { - "lv_chart_set_ver_div_line_count", - (PyCFunction)py_lv_chart_set_ver_div_line_count, +static PyMethodDef py_lv_gif_set_loop_count_def = { + "lv_gif_set_loop_count", + (PyCFunction)py_lv_gif_set_loop_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40026,28 +51832,29 @@ static PyMethodDef py_lv_chart_set_ver_div_line_count_def = { /* * lvgl extension definition for: - * lv_chart_type_t lv_chart_get_type(const lv_obj_t *obj) + * void lv_gif_set_auto_pause_invisible(lv_obj_t *obj, bool auto_pause) */ -static PyObject *py_lv_chart_get_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_set_auto_pause_invisible(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long auto_pause_val; + if (!PyArg_ParseTuple(py_args, "l", &auto_pause_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + bool auto_pause = (auto_pause_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_chart_type_t _res; lvpy_lock(); - _res = ((lv_chart_type_t (*)(const lv_obj_t *))lv_chart_get_type)(obj); + ((void (*)(lv_obj_t *, bool))lv_gif_set_auto_pause_invisible)(obj, auto_pause); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_get_type_def = { - "lv_chart_get_type", - (PyCFunction)py_lv_chart_get_type, +static PyMethodDef py_lv_gif_set_auto_pause_invisible_def = { + "lv_gif_set_auto_pause_invisible", + (PyCFunction)py_lv_gif_set_auto_pause_invisible, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40055,28 +51862,32 @@ static PyMethodDef py_lv_chart_get_type_def = { /* * lvgl extension definition for: - * uint32_t lv_chart_get_point_count(const lv_obj_t *obj) + * bool lv_gif_get_size(const char *src, uint16_t *w, uint16_t *h) */ -static PyObject *py_lv_chart_get_point_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *src_py; PyObject *w_py; PyObject *h_py; + if (!PyArg_ParseTuple(py_args, "OOO", &src_py, &w_py, &h_py)) { PyGILState_Release(gstate); return NULL; } + const char *src = (const char *)(char*)convert_from_str(src_py); + uint16_t *w = mp_array_to_u16ptr(w_py); + uint16_t *h = mp_array_to_u16ptr(h_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_point_count)(obj); + _res = ((bool (*)(const char *, uint16_t *, uint16_t *))lv_gif_get_size)(src, w, h); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_chart_get_point_count_def = { - "lv_chart_get_point_count", - (PyCFunction)py_lv_chart_get_point_count, +static PyMethodDef py_lv_gif_get_size_def = { + "lv_gif_get_size", + (PyCFunction)py_lv_gif_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40084,9 +51895,9 @@ static PyMethodDef py_lv_chart_get_point_count_def = { /* * lvgl extension definition for: - * lv_chart_update_mode_t lv_chart_get_update_mode(const lv_obj_t *obj) + * int32_t lv_gif_get_frame_count(lv_obj_t *obj) */ -static PyObject *py_lv_chart_get_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_get_frame_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -40094,18 +51905,18 @@ static PyObject *py_lv_chart_get_update_mode(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_chart_update_mode_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_chart_update_mode_t (*)(const lv_obj_t *))lv_chart_get_update_mode)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_gif_get_frame_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_chart_get_update_mode_def = { - "lv_chart_get_update_mode", - (PyCFunction)py_lv_chart_get_update_mode, +static PyMethodDef py_lv_gif_get_frame_count_def = { + "lv_gif_get_frame_count", + (PyCFunction)py_lv_gif_get_frame_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40113,9 +51924,9 @@ static PyMethodDef py_lv_chart_get_update_mode_def = { /* * lvgl extension definition for: - * uint32_t lv_chart_get_hor_div_line_count(const lv_obj_t *obj) + * int32_t lv_gif_get_current_frame_index(lv_obj_t *obj) */ -static PyObject *py_lv_chart_get_hor_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_get_current_frame_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -40123,18 +51934,18 @@ static PyObject *py_lv_chart_get_hor_div_line_count(PyObject *self, PyObject *py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_hor_div_line_count)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_gif_get_current_frame_index)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_chart_get_hor_div_line_count_def = { - "lv_chart_get_hor_div_line_count", - (PyCFunction)py_lv_chart_get_hor_div_line_count, +static PyMethodDef py_lv_gif_get_current_frame_index_def = { + "lv_gif_get_current_frame_index", + (PyCFunction)py_lv_gif_get_current_frame_index, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40142,238 +51953,120 @@ static PyMethodDef py_lv_chart_get_hor_div_line_count_def = { /* * lvgl extension definition for: - * uint32_t lv_chart_get_ver_div_line_count(const lv_obj_t *obj) + * lv_obj_t *lv_gif_create(lv_obj_t *parent) */ -static PyObject *py_lv_chart_get_ver_div_line_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_gif_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_ver_div_line_count)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_gif_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_get_ver_div_line_count_def = { - "lv_chart_get_ver_div_line_count", - (PyCFunction)py_lv_chart_get_ver_div_line_count, +static PyMethodDef py_lv_gif_create_def = { + "lv_gif_create", + (PyCFunction)py_lv_gif_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_chart_series_t (CPython) + * lvgl gif object definitions (CPython) */ - -extern PyMethodDef py_lv_chart_series_t_methods[]; - -static PyObject *py_lv_chart_series_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_chart_series_t *data = (lv_chart_series_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "x_points") == 0) return mp_array_from_i32ptr((void*)data->x_points); - if (strcmp(attr, "y_points") == 0) return mp_array_from_i32ptr((void*)data->y_points); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "start_point") == 0) return mp_obj_new_int_from_uint(data->start_point); - if (strcmp(attr, "hidden") == 0) return mp_obj_new_int_from_uint(data->hidden); - if (strcmp(attr, "x_ext_buf_assigned") == 0) return mp_obj_new_int_from_uint(data->x_ext_buf_assigned); - if (strcmp(attr, "y_ext_buf_assigned") == 0) return mp_obj_new_int_from_uint(data->y_ext_buf_assigned); - if (strcmp(attr, "x_axis_sec") == 0) return mp_obj_new_int_from_uint(data->x_axis_sec); - if (strcmp(attr, "y_axis_sec") == 0) return mp_obj_new_int_from_uint(data->y_axis_sec); - for (PyMethodDef *m = py_lv_chart_series_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_chart_series_t_field_names[] = {"x_points", "y_points", "color", "start_point", "hidden", "x_ext_buf_assigned", "y_ext_buf_assigned", "x_axis_sec", "y_axis_sec", NULL}; - -static PyObject *py_lv_chart_series_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_chart_series_t_field_names, py_lv_chart_series_t_methods); -} - -static PyMethodDef py_lv_chart_series_t_type_methods[] = { - {"__dir__", py_lv_chart_series_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_chart_series_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_chart_series_t *data = (lv_chart_series_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_chart_series_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "x_points") == 0) { data->x_points = (void*)mp_array_to_i32ptr(value); result = 0; } - if (strcmp(attr, "y_points") == 0) { data->y_points = (void*)mp_array_to_i32ptr(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "start_point") == 0) { data->start_point = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "hidden") == 0) { data->hidden = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "x_ext_buf_assigned") == 0) { data->x_ext_buf_assigned = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y_ext_buf_assigned") == 0) { data->y_ext_buf_assigned = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "x_axis_sec") == 0) { data->x_axis_sec = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y_axis_sec") == 0) { data->y_axis_sec = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_chart_series_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_chart_series_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_chart_series_t)); -} - -static void py_lv_chart_series_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_chart_series_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_chart_series_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_chart_series_t_dealloc, - .tp_getattro = (getter)py_lv_chart_series_t_getattro, - .tp_setattro = (setter)py_lv_chart_series_t_setattro, - .tp_new = py_lv_chart_series_t_new, - .tp_methods = py_lv_chart_series_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_chart_series_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_chart_series_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_chart_series_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_chart_series_t*)self->data; -} - -static lv_chart_series_t mp_write_scratch_lv_chart_series_t; - -static inline void* mp_write_value_ptr_lv_chart_series_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_chart_series_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_chart_series_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_chart_series_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_chart_series_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_chart_series_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_chart_series_t or dict, got None"); - } - memset(&mp_write_scratch_lv_chart_series_t, 0, sizeof(lv_chart_series_t)); - return &mp_write_scratch_lv_chart_series_t; -} - -#define mp_write_lv_chart_series_t(struct_obj) (*((lv_chart_series_t*)mp_write_value_ptr_lv_chart_series_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_chart_series_t(void *field) +static PyObject *py_lv_gif_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_chart_series_t_type, field); + (void)type; + return py_lv_gif_create(type, py_args, py_kwds); } - -#define mp_read_lv_chart_series_t(field) lv_to_mp_struct_own(&py_lv_chart_series_t_type, copy_buffer(&field, sizeof(lv_chart_series_t))) -#define mp_read_byref_lv_chart_series_t(field) mp_read_ptr_lv_chart_series_t(&field) - - -/* - * lvgl extension definition for: - * uint32_t lv_chart_get_x_start_point(const lv_obj_t *obj, lv_chart_series_t *ser) - */ -static PyObject *py_lv_chart_get_x_start_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *ser_py; - if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *, lv_chart_series_t *))lv_chart_get_x_start_point)(obj, ser); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + +static PyObject *py_lv_gif_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_gif_create((PyObject *)type, py_args, py_kwds); } -static PyMethodDef py_lv_chart_get_x_start_point_def = { - "lv_chart_get_x_start_point", - (PyCFunction)py_lv_chart_get_x_start_point, - METH_VARARGS | METH_KEYWORDS, - NULL +static void py_lv_gif_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_gif_methods[] = { + {"set_color_format", (PyCFunction)py_lv_gif_set_color_format, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_src", (PyCFunction)py_lv_gif_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"restart", (PyCFunction)py_lv_gif_restart, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pause", (PyCFunction)py_lv_gif_pause, METH_VARARGS | METH_KEYWORDS, NULL}, + {"resume", (PyCFunction)py_lv_gif_resume, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_loaded", (PyCFunction)py_lv_gif_is_loaded, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_loop_count", (PyCFunction)py_lv_gif_get_loop_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_loop_count", (PyCFunction)py_lv_gif_set_loop_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_auto_pause_invisible", (PyCFunction)py_lv_gif_set_auto_pause_invisible, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_size", (PyCFunction)py_lv_gif_get_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_frame_count", (PyCFunction)py_lv_gif_get_frame_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_current_frame_index", (PyCFunction)py_lv_gif_get_current_frame_index, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_gif_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.gif", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_gif_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_gif_new, + .tp_methods = py_lv_gif_methods, + .tp_call = (ternaryfunc)py_lv_gif_call, +}; + +static py_lv_obj_type_t py_lv_gif_mapping = { + .lv_obj_class = &lv_gif_class, + .py_type = &py_lv_gif_type, }; /* * lvgl extension definition for: - * void lv_chart_get_point_pos_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, lv_point_t *p_out) + * void lv_imagebutton_set_src(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left, const void *src_mid, const void *src_right) */ -static PyObject *py_lv_chart_get_point_pos_by_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; long id_val; PyObject *p_out_py; - if (!PyArg_ParseTuple(py_args, "OlO", &ser_py, &id_val, &p_out_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *state_py; PyObject *src_left_py; PyObject *src_mid_py; PyObject *src_right_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &state_py, &src_left_py, &src_mid_py, &src_right_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - uint32_t id = (uint32_t)id_val; - lv_point_t *p_out = mp_write_ptr_lv_point_t(p_out_py); + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); + const void *src_left = (const void *)mp_to_ptr(src_left_py); + const void *src_mid = (const void *)mp_to_ptr(src_mid_py); + const void *src_right = (const void *)mp_to_ptr(src_right_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, lv_point_t *))lv_chart_get_point_pos_by_id)(obj, ser, id, p_out); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *, const void *, const void *))lv_imagebutton_set_src)(obj, state, src_left, src_mid, src_right); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_get_point_pos_by_id_def = { - "lv_chart_get_point_pos_by_id", - (PyCFunction)py_lv_chart_get_point_pos_by_id, +static PyMethodDef py_lv_imagebutton_set_src_def = { + "lv_imagebutton_set_src", + (PyCFunction)py_lv_imagebutton_set_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40381,27 +52074,30 @@ static PyMethodDef py_lv_chart_get_point_pos_by_id_def = { /* * lvgl extension definition for: - * void lv_chart_refresh(lv_obj_t *obj) + * void lv_imagebutton_set_src_left(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left) */ -static PyObject *py_lv_chart_refresh(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_set_src_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *state_py; PyObject *src_left_py; + if (!PyArg_ParseTuple(py_args, "OO", &state_py, &src_left_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); + const void *src_left = (const void *)mp_to_ptr(src_left_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_chart_refresh)(obj); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_imagebutton_set_src_left)(obj, state, src_left); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_refresh_def = { - "lv_chart_refresh", - (PyCFunction)py_lv_chart_refresh, +static PyMethodDef py_lv_imagebutton_set_src_left_def = { + "lv_imagebutton_set_src_left", + (PyCFunction)py_lv_imagebutton_set_src_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40409,31 +52105,30 @@ static PyMethodDef py_lv_chart_refresh_def = { /* * lvgl extension definition for: - * lv_chart_series_t *lv_chart_add_series(lv_obj_t *obj, lv_color_t color, lv_chart_axis_t axis) + * void lv_imagebutton_set_src_right(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_right) */ -static PyObject *py_lv_chart_add_series(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_set_src_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *color_py; PyObject *axis_py; - if (!PyArg_ParseTuple(py_args, "OO", &color_py, &axis_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *state_py; PyObject *src_right_py; + if (!PyArg_ParseTuple(py_args, "OO", &state_py, &src_right_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - lv_chart_axis_t axis = (int)mp_obj_get_int(axis_py); + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); + const void *src_right = (const void *)mp_to_ptr(src_right_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_chart_series_t * _res; lvpy_lock(); - _res = ((lv_chart_series_t *(*)(lv_obj_t *, lv_color_t, lv_chart_axis_t))lv_chart_add_series)(obj, color, axis); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_imagebutton_set_src_right)(obj, state, src_right); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_chart_series_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_add_series_def = { - "lv_chart_add_series", - (PyCFunction)py_lv_chart_add_series, +static PyMethodDef py_lv_imagebutton_set_src_right_def = { + "lv_imagebutton_set_src_right", + (PyCFunction)py_lv_imagebutton_set_src_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40441,29 +52136,30 @@ static PyMethodDef py_lv_chart_add_series_def = { /* * lvgl extension definition for: - * void lv_chart_remove_series(lv_obj_t *obj, lv_chart_series_t *series) + * void lv_imagebutton_set_src_mid(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_mid) */ -static PyObject *py_lv_chart_remove_series(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_set_src_mid(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *series_py; - if (!PyArg_ParseTuple(py_args, "O", &series_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *state_py; PyObject *src_mid_py; + if (!PyArg_ParseTuple(py_args, "OO", &state_py, &src_mid_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(series_py); + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); + const void *src_mid = (const void *)mp_to_ptr(src_mid_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *))lv_chart_remove_series)(obj, series); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_imagebutton_set_src_mid)(obj, state, src_mid); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_remove_series_def = { - "lv_chart_remove_series", - (PyCFunction)py_lv_chart_remove_series, +static PyMethodDef py_lv_imagebutton_set_src_mid_def = { + "lv_imagebutton_set_src_mid", + (PyCFunction)py_lv_imagebutton_set_src_mid, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40471,30 +52167,29 @@ static PyMethodDef py_lv_chart_remove_series_def = { /* * lvgl extension definition for: - * void lv_chart_hide_series(lv_obj_t *chart, lv_chart_series_t *series, bool hide) + * void lv_imagebutton_set_state(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static PyObject *py_lv_chart_hide_series(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_set_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *series_py; long hide_val; - if (!PyArg_ParseTuple(py_args, "Ol", &series_py, &hide_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(series_py); - bool hide = (hide_val != 0); + PyObject *state_py; + if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, bool))lv_chart_hide_series)(chart, series, hide); + ((void (*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_set_state)(obj, state); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_hide_series_def = { - "lv_chart_hide_series", - (PyCFunction)py_lv_chart_hide_series, +static PyMethodDef py_lv_imagebutton_set_state_def = { + "lv_imagebutton_set_state", + (PyCFunction)py_lv_imagebutton_set_state, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40502,30 +52197,30 @@ static PyMethodDef py_lv_chart_hide_series_def = { /* * lvgl extension definition for: - * void lv_chart_set_series_color(lv_obj_t *chart, lv_chart_series_t *series, lv_color_t color) + * const void *lv_imagebutton_get_src_left(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static PyObject *py_lv_chart_set_series_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_get_src_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *series_py; PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "OO", &series_py, &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - lv_chart_series_t *series = mp_write_ptr_lv_chart_series_t(series_py); - lv_color_t color = mp_write_lv_color_t(color_py); + PyObject *state_py; + if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, lv_color_t))lv_chart_set_series_color)(chart, series, color); + _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_get_src_left)(obj, state); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_set_series_color_def = { - "lv_chart_set_series_color", - (PyCFunction)py_lv_chart_set_series_color, +static PyMethodDef py_lv_imagebutton_get_src_left_def = { + "lv_imagebutton_get_src_left", + (PyCFunction)py_lv_imagebutton_get_src_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40533,30 +52228,30 @@ static PyMethodDef py_lv_chart_set_series_color_def = { /* * lvgl extension definition for: - * lv_color_t lv_chart_get_series_color(lv_obj_t *chart, const lv_chart_series_t *series) + * const void *lv_imagebutton_get_src_middle(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static PyObject *py_lv_chart_get_series_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_get_src_middle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *series_py; - if (!PyArg_ParseTuple(py_args, "O", &series_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - const lv_chart_series_t *series = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(series_py); + PyObject *state_py; + if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + const void * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_obj_t *, const lv_chart_series_t *))lv_chart_get_series_color)(chart, series); + _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_get_src_middle)(obj, state); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_get_series_color_def = { - "lv_chart_get_series_color", - (PyCFunction)py_lv_chart_get_series_color, +static PyMethodDef py_lv_imagebutton_get_src_middle_def = { + "lv_imagebutton_get_src_middle", + (PyCFunction)py_lv_imagebutton_get_src_middle, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40564,30 +52259,30 @@ static PyMethodDef py_lv_chart_get_series_color_def = { /* * lvgl extension definition for: - * void lv_chart_set_x_start_point(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id) + * const void *lv_imagebutton_get_src_right(lv_obj_t *obj, lv_imagebutton_state_t state) */ -static PyObject *py_lv_chart_set_x_start_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_get_src_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; long id_val; - if (!PyArg_ParseTuple(py_args, "Ol", &ser_py, &id_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *state_py; + if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - uint32_t id = (uint32_t)id_val; + lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t))lv_chart_set_x_start_point)(obj, ser, id); + _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_get_src_right)(obj, state); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_set_x_start_point_def = { - "lv_chart_set_x_start_point", - (PyCFunction)py_lv_chart_set_x_start_point, +static PyMethodDef py_lv_imagebutton_get_src_right_def = { + "lv_imagebutton_get_src_right", + (PyCFunction)py_lv_imagebutton_get_src_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40595,203 +52290,143 @@ static PyMethodDef py_lv_chart_set_x_start_point_def = { /* * lvgl extension definition for: - * lv_chart_series_t *lv_chart_get_series_next(const lv_obj_t *chart, const lv_chart_series_t *ser) + * lv_obj_t *lv_imagebutton_create(lv_obj_t *parent) */ -static PyObject *py_lv_chart_get_series_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imagebutton_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *ser_py; - if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - const lv_chart_series_t *ser = (const lv_chart_series_t *)mp_write_ptr_lv_chart_series_t(ser_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_chart_series_t * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_chart_series_t *(*)(const lv_obj_t *, const lv_chart_series_t *))lv_chart_get_series_next)(chart, ser); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_imagebutton_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_chart_series_t((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_get_series_next_def = { - "lv_chart_get_series_next", - (PyCFunction)py_lv_chart_get_series_next, +static PyMethodDef py_lv_imagebutton_create_def = { + "lv_imagebutton_create", + (PyCFunction)py_lv_imagebutton_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_chart_cursor_t (CPython) + * lvgl imagebutton object definitions (CPython) */ - -extern PyMethodDef py_lv_chart_cursor_t_methods[]; - -static PyObject *py_lv_chart_cursor_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_chart_cursor_t *data = (lv_chart_cursor_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "pos") == 0) return mp_read_byref_lv_point_t(data->pos); - if (strcmp(attr, "point_id") == 0) return mp_obj_new_int(data->point_id); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "ser") == 0) return mp_read_ptr_lv_chart_series_t((void*)data->ser); - if (strcmp(attr, "dir") == 0) return mp_obj_new_int(data->dir); - if (strcmp(attr, "pos_set") == 0) return mp_obj_new_int_from_uint(data->pos_set); - for (PyMethodDef *m = py_lv_chart_cursor_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_chart_cursor_t_field_names[] = {"pos", "point_id", "color", "ser", "dir", "pos_set", NULL}; - -static PyObject *py_lv_chart_cursor_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_imagebutton_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_chart_cursor_t_field_names, py_lv_chart_cursor_t_methods); + (void)type; + return py_lv_imagebutton_create(type, py_args, py_kwds); } -static PyMethodDef py_lv_chart_cursor_t_type_methods[] = { - {"__dir__", py_lv_chart_cursor_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_chart_cursor_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static PyObject *py_lv_imagebutton_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_chart_cursor_t *data = (lv_chart_cursor_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_chart_cursor_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "pos") == 0) { data->pos = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "point_id") == 0) { data->point_id = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "ser") == 0) { data->ser = (void*)mp_write_ptr_lv_chart_series_t(value); result = 0; } - if (strcmp(attr, "dir") == 0) { data->dir = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pos_set") == 0) { data->pos_set = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_chart_cursor_t' object has no attribute '%s'", attr); - } - return result; + return py_lv_imagebutton_create((PyObject *)type, py_args, py_kwds); } -static PyObject *py_lv_chart_cursor_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static void py_lv_imagebutton_dealloc(py_lv_obj_t *self) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_chart_cursor_t)); + lvpy_dealloc_obj(self); } -static void py_lv_chart_cursor_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} +static PyMethodDef py_lv_imagebutton_methods[] = { + {"set_src", (PyCFunction)py_lv_imagebutton_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_src_left", (PyCFunction)py_lv_imagebutton_set_src_left, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_src_right", (PyCFunction)py_lv_imagebutton_set_src_right, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_src_mid", (PyCFunction)py_lv_imagebutton_set_src_mid, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_state", (PyCFunction)py_lv_imagebutton_set_state, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_src_left", (PyCFunction)py_lv_imagebutton_get_src_left, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_src_middle", (PyCFunction)py_lv_imagebutton_get_src_middle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_src_right", (PyCFunction)py_lv_imagebutton_get_src_right, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; -PyTypeObject py_lv_chart_cursor_t_type = { +PyTypeObject py_lv_imagebutton_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_chart_cursor_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_chart_cursor_t_dealloc, - .tp_getattro = (getter)py_lv_chart_cursor_t_getattro, - .tp_setattro = (setter)py_lv_chart_cursor_t_setattro, - .tp_new = py_lv_chart_cursor_t_new, - .tp_methods = py_lv_chart_cursor_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + .tp_name = "lvgl.imagebutton", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_imagebutton_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_imagebutton_new, + .tp_methods = py_lv_imagebutton_methods, + .tp_call = (ternaryfunc)py_lv_imagebutton_call, }; -static inline void* mp_write_ptr_lv_chart_cursor_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_chart_cursor_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_chart_cursor_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_chart_cursor_t*)self->data; -} - -static lv_chart_cursor_t mp_write_scratch_lv_chart_cursor_t; - -static inline void* mp_write_value_ptr_lv_chart_cursor_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_chart_cursor_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_chart_cursor_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_chart_cursor_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_chart_cursor_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_chart_cursor_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_chart_cursor_t or dict, got None"); - } - memset(&mp_write_scratch_lv_chart_cursor_t, 0, sizeof(lv_chart_cursor_t)); - return &mp_write_scratch_lv_chart_cursor_t; -} +static py_lv_obj_type_t py_lv_imagebutton_mapping = { + .lv_obj_class = &lv_imagebutton_class, + .py_type = &py_lv_imagebutton_type, +}; -#define mp_write_lv_chart_cursor_t(struct_obj) (*((lv_chart_cursor_t*)mp_write_value_ptr_lv_chart_cursor_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_chart_cursor_t(void *field) +/* + * lvgl extension definition for: + * void lv_keyboard_set_textarea(lv_obj_t *obj, lv_obj_t *ta) + */ +static PyObject *py_lv_keyboard_set_textarea(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_chart_cursor_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *ta_py; + if (!PyArg_ParseTuple(py_args, "O", &ta_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *ta = mp_to_lv(ta_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_keyboard_set_textarea)(obj, ta); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_chart_cursor_t(field) lv_to_mp_struct_own(&py_lv_chart_cursor_t_type, copy_buffer(&field, sizeof(lv_chart_cursor_t))) -#define mp_read_byref_lv_chart_cursor_t(field) mp_read_ptr_lv_chart_cursor_t(&field) +static PyMethodDef py_lv_keyboard_set_textarea_def = { + "lv_keyboard_set_textarea", + (PyCFunction)py_lv_keyboard_set_textarea, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * lv_chart_cursor_t *lv_chart_add_cursor(lv_obj_t *obj, lv_color_t color, lv_dir_t dir) + * void lv_keyboard_set_mode(lv_obj_t *obj, lv_keyboard_mode_t mode) */ -static PyObject *py_lv_chart_add_cursor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *color_py; PyObject *dir_py; - if (!PyArg_ParseTuple(py_args, "OO", &color_py, &dir_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - lv_dir_t dir = (int)mp_obj_get_int(dir_py); + lv_keyboard_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_chart_cursor_t * _res; lvpy_lock(); - _res = ((lv_chart_cursor_t *(*)(lv_obj_t *, lv_color_t, lv_dir_t))lv_chart_add_cursor)(obj, color, dir); + ((void (*)(lv_obj_t *, lv_keyboard_mode_t))lv_keyboard_set_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_chart_cursor_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_add_cursor_def = { - "lv_chart_add_cursor", - (PyCFunction)py_lv_chart_add_cursor, +static PyMethodDef py_lv_keyboard_set_mode_def = { + "lv_keyboard_set_mode", + (PyCFunction)py_lv_keyboard_set_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40799,29 +52434,29 @@ static PyMethodDef py_lv_chart_add_cursor_def = { /* * lvgl extension definition for: - * void lv_chart_remove_cursor(lv_obj_t *obj, lv_chart_cursor_t *cursor) + * void lv_keyboard_set_popovers(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_chart_remove_cursor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_set_popovers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cursor_py; - if (!PyArg_ParseTuple(py_args, "O", &cursor_py)) { PyGILState_Release(gstate); return NULL; } + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *))lv_chart_remove_cursor)(obj, cursor); + ((void (*)(lv_obj_t *, bool))lv_keyboard_set_popovers)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_remove_cursor_def = { - "lv_chart_remove_cursor", - (PyCFunction)py_lv_chart_remove_cursor, +static PyMethodDef py_lv_keyboard_set_popovers_def = { + "lv_keyboard_set_popovers", + (PyCFunction)py_lv_keyboard_set_popovers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40829,30 +52464,31 @@ static PyMethodDef py_lv_chart_remove_cursor_def = { /* * lvgl extension definition for: - * void lv_chart_set_cursor_pos(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_point_t *pos) + * void lv_keyboard_set_map(lv_obj_t *obj, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[]) */ -static PyObject *py_lv_chart_set_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_set_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cursor_py; PyObject *pos_py; - if (!PyArg_ParseTuple(py_args, "OO", &cursor_py, &pos_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); - lv_point_t *pos = mp_write_ptr_lv_point_t(pos_py); + PyObject *mode_py; PyObject *map_py; PyObject *ctrl_map_py; + if (!PyArg_ParseTuple(py_args, "OOO", &mode_py, &map_py, &ctrl_map_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_keyboard_mode_t mode = (int)mp_obj_get_int(mode_py); + const char * const *map = (const char * const *)lvpy_str_arr_arg(self, map_py, "lv_keyboard_set_map:map"); + const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_to_ptr(ctrl_map_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_point_t *))lv_chart_set_cursor_pos)(chart, cursor, pos); + ((void (*)(lv_obj_t *, lv_keyboard_mode_t, const char * const [], const lv_buttonmatrix_ctrl_t []))lv_keyboard_set_map)(obj, mode, map, ctrl_map); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_cursor_pos_def = { - "lv_chart_set_cursor_pos", - (PyCFunction)py_lv_chart_set_cursor_pos, +static PyMethodDef py_lv_keyboard_set_map_def = { + "lv_keyboard_set_map", + (PyCFunction)py_lv_keyboard_set_map, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40860,30 +52496,28 @@ static PyMethodDef py_lv_chart_set_cursor_pos_def = { /* * lvgl extension definition for: - * void lv_chart_set_cursor_pos_x(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t x) + * lv_obj_t *lv_keyboard_get_textarea(const lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_cursor_pos_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_get_textarea(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cursor_py; long x_val; - if (!PyArg_ParseTuple(py_args, "Ol", &cursor_py, &x_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); - int32_t x = (int32_t)x_val; + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_chart_set_cursor_pos_x)(chart, cursor, x); + _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_keyboard_get_textarea)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_set_cursor_pos_x_def = { - "lv_chart_set_cursor_pos_x", - (PyCFunction)py_lv_chart_set_cursor_pos_x, +static PyMethodDef py_lv_keyboard_get_textarea_def = { + "lv_keyboard_get_textarea", + (PyCFunction)py_lv_keyboard_get_textarea, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40891,30 +52525,28 @@ static PyMethodDef py_lv_chart_set_cursor_pos_x_def = { /* * lvgl extension definition for: - * void lv_chart_set_cursor_pos_y(lv_obj_t *chart, lv_chart_cursor_t *cursor, int32_t y) + * lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_cursor_pos_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cursor_py; long y_val; - if (!PyArg_ParseTuple(py_args, "Ol", &cursor_py, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); - int32_t y = (int32_t)y_val; + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_keyboard_mode_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, int32_t))lv_chart_set_cursor_pos_y)(chart, cursor, y); + _res = ((lv_keyboard_mode_t (*)(const lv_obj_t *))lv_keyboard_get_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_chart_set_cursor_pos_y_def = { - "lv_chart_set_cursor_pos_y", - (PyCFunction)py_lv_chart_set_cursor_pos_y, +static PyMethodDef py_lv_keyboard_get_mode_def = { + "lv_keyboard_get_mode", + (PyCFunction)py_lv_keyboard_get_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40922,31 +52554,28 @@ static PyMethodDef py_lv_chart_set_cursor_pos_y_def = { /* * lvgl extension definition for: - * void lv_chart_set_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor, lv_chart_series_t *ser, uint32_t point_id) + * bool lv_keyboard_get_popovers(const lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_cursor_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_get_popovers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cursor_py; PyObject *ser_py; long point_id_val; - if (!PyArg_ParseTuple(py_args, "OOl", &cursor_py, &ser_py, &point_id_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - uint32_t point_id = (uint32_t)point_id_val; + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_cursor_t *, lv_chart_series_t *, uint32_t))lv_chart_set_cursor_point)(chart, cursor, ser, point_id); + _res = ((bool (*)(const lv_obj_t *))lv_keyboard_get_popovers)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_chart_set_cursor_point_def = { - "lv_chart_set_cursor_point", - (PyCFunction)py_lv_chart_set_cursor_point, +static PyMethodDef py_lv_keyboard_get_popovers_def = { + "lv_keyboard_get_popovers", + (PyCFunction)py_lv_keyboard_get_popovers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40954,30 +52583,28 @@ static PyMethodDef py_lv_chart_set_cursor_point_def = { /* * lvgl extension definition for: - * lv_point_t lv_chart_get_cursor_point(lv_obj_t *chart, lv_chart_cursor_t *cursor) + * uint32_t lv_keyboard_get_selected_button(const lv_obj_t *obj) */ -static PyObject *py_lv_chart_get_cursor_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_get_selected_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cursor_py; - if (!PyArg_ParseTuple(py_args, "O", &cursor_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *chart = mp_to_lv(self); - lv_chart_cursor_t *cursor = mp_write_ptr_lv_chart_cursor_t(cursor_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_point_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_point_t (*)(lv_obj_t *, lv_chart_cursor_t *))lv_chart_get_cursor_point)(chart, cursor); + _res = ((uint32_t (*)(const lv_obj_t *))lv_keyboard_get_selected_button)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_point_t(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_chart_get_cursor_point_def = { - "lv_chart_get_cursor_point", - (PyCFunction)py_lv_chart_get_cursor_point, +static PyMethodDef py_lv_keyboard_get_selected_button_def = { + "lv_keyboard_get_selected_button", + (PyCFunction)py_lv_keyboard_get_selected_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -40985,30 +52612,30 @@ static PyMethodDef py_lv_chart_get_cursor_point_def = { /* * lvgl extension definition for: - * void lv_chart_set_all_values(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) + * const char *lv_keyboard_get_button_text(const lv_obj_t *obj, uint32_t btn_id) */ -static PyObject *py_lv_chart_set_all_values(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_get_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; long value_val; - if (!PyArg_ParseTuple(py_args, "Ol", &ser_py, &value_val)) { PyGILState_Release(gstate); return NULL; } + long btn_id_val; + if (!PyArg_ParseTuple(py_args, "l", &btn_id_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - int32_t value = (int32_t)value_val; + uint32_t btn_id = (uint32_t)btn_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_chart_set_all_values)(obj, ser, value); + _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_keyboard_get_button_text)(obj, btn_id); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_chart_set_all_values_def = { - "lv_chart_set_all_values", - (PyCFunction)py_lv_chart_set_all_values, +static PyMethodDef py_lv_keyboard_get_button_text_def = { + "lv_keyboard_get_button_text", + (PyCFunction)py_lv_keyboard_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41016,30 +52643,29 @@ static PyMethodDef py_lv_chart_set_all_values_def = { /* * lvgl extension definition for: - * void lv_chart_set_next_value(lv_obj_t *obj, lv_chart_series_t *ser, int32_t value) + * void lv_keyboard_def_event_cb(lv_event_t *e) */ -static PyObject *py_lv_chart_set_next_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_def_event_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *ser_py; long value_val; - if (!PyArg_ParseTuple(py_args, "Ol", &ser_py, &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - int32_t value = (int32_t)value_val; + PyObject *e_py; + if (!PyArg_ParseTuple(py_args, "O", &e_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_t *e = mp_write_ptr_lv_event_t(e_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t))lv_chart_set_next_value)(obj, ser, value); + ((void (*)(lv_event_t *))lv_keyboard_def_event_cb)(e); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_next_value_def = { - "lv_chart_set_next_value", - (PyCFunction)py_lv_chart_set_next_value, +static PyMethodDef py_lv_keyboard_def_event_cb_def = { + "lv_keyboard_def_event_cb", + (PyCFunction)py_lv_keyboard_def_event_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41047,63 +52673,115 @@ static PyMethodDef py_lv_chart_set_next_value_def = { /* * lvgl extension definition for: - * void lv_chart_set_next_value2(lv_obj_t *obj, lv_chart_series_t *ser, int32_t x_value, int32_t y_value) + * lv_obj_t *lv_keyboard_create(lv_obj_t *parent) */ -static PyObject *py_lv_chart_set_next_value2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_keyboard_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *ser_py; long x_value_val; long y_value_val; - if (!PyArg_ParseTuple(py_args, "Oll", &ser_py, &x_value_val, &y_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - int32_t x_value = (int32_t)x_value_val; - int32_t y_value = (int32_t)y_value_val; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t, int32_t))lv_chart_set_next_value2)(obj, ser, x_value, y_value); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_keyboard_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_set_next_value2_def = { - "lv_chart_set_next_value2", - (PyCFunction)py_lv_chart_set_next_value2, +static PyMethodDef py_lv_keyboard_create_def = { + "lv_keyboard_create", + (PyCFunction)py_lv_keyboard_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl keyboard object definitions (CPython) + */ +static PyObject *py_lv_keyboard_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_keyboard_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_keyboard_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_keyboard_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_keyboard_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_keyboard_methods[] = { + {"set_textarea", (PyCFunction)py_lv_keyboard_set_textarea, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode", (PyCFunction)py_lv_keyboard_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_popovers", (PyCFunction)py_lv_keyboard_set_popovers, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_map", (PyCFunction)py_lv_keyboard_set_map, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_textarea", (PyCFunction)py_lv_keyboard_get_textarea, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode", (PyCFunction)py_lv_keyboard_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_popovers", (PyCFunction)py_lv_keyboard_get_popovers, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected_button", (PyCFunction)py_lv_keyboard_get_selected_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_button_text", (PyCFunction)py_lv_keyboard_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"def_event_cb", (PyCFunction)py_lv_keyboard_def_event_cb, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_keyboard_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.keyboard", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_keyboard_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_keyboard_new, + .tp_methods = py_lv_keyboard_methods, + .tp_call = (ternaryfunc)py_lv_keyboard_call, +}; + +static py_lv_obj_type_t py_lv_keyboard_mapping = { + .lv_obj_class = &lv_keyboard_class, + .py_type = &py_lv_keyboard_type, +}; + + /* * lvgl extension definition for: - * void lv_chart_set_series_values(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t values[], size_t values_cnt) + * void lv_led_set_color(lv_obj_t *obj, lv_color_t color) */ -static PyObject *py_lv_chart_set_series_values(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_set_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; PyObject *values_py; long values_cnt_val; - if (!PyArg_ParseTuple(py_args, "OOl", &ser_py, &values_py, &values_cnt_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - const int32_t *values = (const int32_t *)mp_to_ptr(values_py); - size_t values_cnt = (size_t)values_cnt_val; + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], size_t))lv_chart_set_series_values)(obj, ser, values, values_cnt); + ((void (*)(lv_obj_t *, lv_color_t))lv_led_set_color)(obj, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_series_values_def = { - "lv_chart_set_series_values", - (PyCFunction)py_lv_chart_set_series_values, +static PyMethodDef py_lv_led_set_color_def = { + "lv_led_set_color", + (PyCFunction)py_lv_led_set_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41111,32 +52789,29 @@ static PyMethodDef py_lv_chart_set_series_values_def = { /* * lvgl extension definition for: - * void lv_chart_set_series_values2(lv_obj_t *obj, lv_chart_series_t *ser, const int32_t x_values[], const int32_t y_values[], size_t values_cnt) + * void lv_led_set_brightness(lv_obj_t *obj, uint8_t bright) */ -static PyObject *py_lv_chart_set_series_values2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_set_brightness(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; PyObject *x_values_py; PyObject *y_values_py; long values_cnt_val; - if (!PyArg_ParseTuple(py_args, "OOOl", &ser_py, &x_values_py, &y_values_py, &values_cnt_val)) { PyGILState_Release(gstate); return NULL; } + long bright_val; + if (!PyArg_ParseTuple(py_args, "l", &bright_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - const int32_t *x_values = (const int32_t *)mp_to_ptr(x_values_py); - const int32_t *y_values = (const int32_t *)mp_to_ptr(y_values_py); - size_t values_cnt = (size_t)values_cnt_val; + uint8_t bright = (uint8_t)bright_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, const int32_t [], const int32_t [], size_t))lv_chart_set_series_values2)(obj, ser, x_values, y_values, values_cnt); + ((void (*)(lv_obj_t *, uint8_t))lv_led_set_brightness)(obj, bright); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_series_values2_def = { - "lv_chart_set_series_values2", - (PyCFunction)py_lv_chart_set_series_values2, +static PyMethodDef py_lv_led_set_brightness_def = { + "lv_led_set_brightness", + (PyCFunction)py_lv_led_set_brightness, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41144,31 +52819,27 @@ static PyMethodDef py_lv_chart_set_series_values2_def = { /* * lvgl extension definition for: - * void lv_chart_set_series_value_by_id(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t value) + * void lv_led_on(lv_obj_t *led) */ -static PyObject *py_lv_chart_set_series_value_by_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_on(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; long id_val; long value_val; - if (!PyArg_ParseTuple(py_args, "Oll", &ser_py, &id_val, &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - uint32_t id = (uint32_t)id_val; - int32_t value = (int32_t)value_val; + + lv_obj_t *led = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t))lv_chart_set_series_value_by_id)(obj, ser, id, value); + ((void (*)(lv_obj_t *))lv_led_on)(led); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_series_value_by_id_def = { - "lv_chart_set_series_value_by_id", - (PyCFunction)py_lv_chart_set_series_value_by_id, +static PyMethodDef py_lv_led_on_def = { + "lv_led_on", + (PyCFunction)py_lv_led_on, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41176,32 +52847,27 @@ static PyMethodDef py_lv_chart_set_series_value_by_id_def = { /* * lvgl extension definition for: - * void lv_chart_set_series_value_by_id2(lv_obj_t *obj, lv_chart_series_t *ser, uint32_t id, int32_t x_value, int32_t y_value) + * void lv_led_off(lv_obj_t *led) */ -static PyObject *py_lv_chart_set_series_value_by_id2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_off(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; long id_val; long x_value_val; long y_value_val; - if (!PyArg_ParseTuple(py_args, "Olll", &ser_py, &id_val, &x_value_val, &y_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - uint32_t id = (uint32_t)id_val; - int32_t x_value = (int32_t)x_value_val; - int32_t y_value = (int32_t)y_value_val; + + lv_obj_t *led = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, uint32_t, int32_t, int32_t))lv_chart_set_series_value_by_id2)(obj, ser, id, x_value, y_value); + ((void (*)(lv_obj_t *))lv_led_off)(led); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_series_value_by_id2_def = { - "lv_chart_set_series_value_by_id2", - (PyCFunction)py_lv_chart_set_series_value_by_id2, +static PyMethodDef py_lv_led_off_def = { + "lv_led_off", + (PyCFunction)py_lv_led_off, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41209,30 +52875,27 @@ static PyMethodDef py_lv_chart_set_series_value_by_id2_def = { /* * lvgl extension definition for: - * void lv_chart_set_series_ext_y_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) + * void lv_led_toggle(lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_series_ext_y_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_toggle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; PyObject *array_py; - if (!PyArg_ParseTuple(py_args, "OO", &ser_py, &array_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - int32_t *array = mp_to_ptr(array_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_chart_set_series_ext_y_array)(obj, ser, array); + ((void (*)(lv_obj_t *))lv_led_toggle)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_set_series_ext_y_array_def = { - "lv_chart_set_series_ext_y_array", - (PyCFunction)py_lv_chart_set_series_ext_y_array, +static PyMethodDef py_lv_led_toggle_def = { + "lv_led_toggle", + (PyCFunction)py_lv_led_toggle, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41240,30 +52903,28 @@ static PyMethodDef py_lv_chart_set_series_ext_y_array_def = { /* * lvgl extension definition for: - * void lv_chart_set_series_ext_x_array(lv_obj_t *obj, lv_chart_series_t *ser, int32_t array[]) + * uint8_t lv_led_get_brightness(const lv_obj_t *obj) */ -static PyObject *py_lv_chart_set_series_ext_x_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_get_brightness(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; PyObject *array_py; - if (!PyArg_ParseTuple(py_args, "OO", &ser_py, &array_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); - int32_t *array = mp_to_ptr(array_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint8_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_chart_series_t *, int32_t []))lv_chart_set_series_ext_x_array)(obj, ser, array); + _res = ((uint8_t (*)(const lv_obj_t *))lv_led_get_brightness)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_chart_set_series_ext_x_array_def = { - "lv_chart_set_series_ext_x_array", - (PyCFunction)py_lv_chart_set_series_ext_x_array, +static PyMethodDef py_lv_led_get_brightness_def = { + "lv_led_get_brightness", + (PyCFunction)py_lv_led_get_brightness, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41271,30 +52932,28 @@ static PyMethodDef py_lv_chart_set_series_ext_x_array_def = { /* * lvgl extension definition for: - * int32_t *lv_chart_get_series_y_array(const lv_obj_t *obj, lv_chart_series_t *ser) + * lv_color_t lv_led_get_color(const lv_obj_t *obj) */ -static PyObject *py_lv_chart_get_series_y_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_get_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ser_py; - if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t * _res; + lv_color_t _res; lvpy_lock(); - _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_chart_get_series_y_array)(obj, ser); + _res = ((lv_color_t (*)(const lv_obj_t *))lv_led_get_color)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_array_from_i32ptr((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_chart_get_series_y_array_def = { - "lv_chart_get_series_y_array", - (PyCFunction)py_lv_chart_get_series_y_array, +static PyMethodDef py_lv_led_get_color_def = { + "lv_led_get_color", + (PyCFunction)py_lv_led_get_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41302,59 +52961,113 @@ static PyMethodDef py_lv_chart_get_series_y_array_def = { /* * lvgl extension definition for: - * int32_t *lv_chart_get_series_x_array(const lv_obj_t *obj, lv_chart_series_t *ser) + * lv_obj_t *lv_led_create(lv_obj_t *parent) */ -static PyObject *py_lv_chart_get_series_x_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_led_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *ser_py; - if (!PyArg_ParseTuple(py_args, "O", &ser_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_chart_series_t *ser = mp_write_ptr_lv_chart_series_t(ser_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t *(*)(const lv_obj_t *, lv_chart_series_t *))lv_chart_get_series_x_array)(obj, ser); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_led_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_array_from_i32ptr((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_chart_get_series_x_array_def = { - "lv_chart_get_series_x_array", - (PyCFunction)py_lv_chart_get_series_x_array, +static PyMethodDef py_lv_led_create_def = { + "lv_led_create", + (PyCFunction)py_lv_led_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl led object definitions (CPython) + */ +static PyObject *py_lv_led_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_led_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_led_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_led_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_led_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_led_methods[] = { + {"set_color", (PyCFunction)py_lv_led_set_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_brightness", (PyCFunction)py_lv_led_set_brightness, METH_VARARGS | METH_KEYWORDS, NULL}, + {"on", (PyCFunction)py_lv_led_on, METH_VARARGS | METH_KEYWORDS, NULL}, + {"off", (PyCFunction)py_lv_led_off, METH_VARARGS | METH_KEYWORDS, NULL}, + {"toggle", (PyCFunction)py_lv_led_toggle, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_brightness", (PyCFunction)py_lv_led_get_brightness, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_color", (PyCFunction)py_lv_led_get_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_led_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.led", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_led_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_led_new, + .tp_methods = py_lv_led_methods, + .tp_call = (ternaryfunc)py_lv_led_call, +}; + +static py_lv_obj_type_t py_lv_led_mapping = { + .lv_obj_class = &lv_led_class, + .py_type = &py_lv_led_type, +}; + + /* * lvgl extension definition for: - * uint32_t lv_chart_get_pressed_point(const lv_obj_t *obj) + * void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num) */ -static PyObject *py_lv_chart_get_pressed_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_set_points(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *points_py; long point_num_val; + if (!PyArg_ParseTuple(py_args, "Ol", &points_py, &point_num_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const lv_point_precise_t *points = (const lv_point_precise_t *)lvpy_struct_arr_arg(self, points_py, "lv_line_set_points:points", sizeof(lv_point_precise_t), mp_write_value_ptr_lv_point_precise_t); + uint32_t point_num = (uint32_t)point_num_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_chart_get_pressed_point)(obj); + ((void (*)(lv_obj_t *, const lv_point_precise_t [], uint32_t))lv_line_set_points)(obj, points, point_num); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_get_pressed_point_def = { - "lv_chart_get_pressed_point", - (PyCFunction)py_lv_chart_get_pressed_point, +static PyMethodDef py_lv_line_set_points_def = { + "lv_line_set_points", + (PyCFunction)py_lv_line_set_points, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41362,28 +53075,30 @@ static PyMethodDef py_lv_chart_get_pressed_point_def = { /* * lvgl extension definition for: - * int32_t lv_chart_get_first_point_center_offset(lv_obj_t *obj) + * void lv_line_set_points_mutable(lv_obj_t *obj, lv_point_precise_t points[], uint32_t point_num) */ -static PyObject *py_lv_chart_get_first_point_center_offset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_set_points_mutable(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *points_py; long point_num_val; + if (!PyArg_ParseTuple(py_args, "Ol", &points_py, &point_num_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_point_precise_t *points = mp_to_ptr(points_py); + uint32_t point_num = (uint32_t)point_num_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_chart_get_first_point_center_offset)(obj); + ((void (*)(lv_obj_t *, lv_point_precise_t [], uint32_t))lv_line_set_points_mutable)(obj, points, point_num); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_get_first_point_center_offset_def = { - "lv_chart_get_first_point_center_offset", - (PyCFunction)py_lv_chart_get_first_point_center_offset, +static PyMethodDef py_lv_line_set_points_mutable_def = { + "lv_line_set_points_mutable", + (PyCFunction)py_lv_line_set_points_mutable, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41391,149 +53106,116 @@ static PyMethodDef py_lv_chart_get_first_point_center_offset_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_chart_create(lv_obj_t *parent) + * void lv_line_set_y_invert(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_chart_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_set_y_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_chart_create)(parent); + ((void (*)(lv_obj_t *, bool))lv_line_set_y_invert)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_chart_create_def = { - "lv_chart_create", - (PyCFunction)py_lv_chart_create, +static PyMethodDef py_lv_line_set_y_invert_def = { + "lv_line_set_y_invert", + (PyCFunction)py_lv_line_set_y_invert, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl chart object definitions (CPython) - */ -static PyObject *py_lv_chart_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_chart_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_chart_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_chart_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_chart_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_chart_methods[] = { - {"set_type", (PyCFunction)py_lv_chart_set_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_point_count", (PyCFunction)py_lv_chart_set_point_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_axis_range", (PyCFunction)py_lv_chart_set_axis_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_axis_min_value", (PyCFunction)py_lv_chart_set_axis_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_axis_max_value", (PyCFunction)py_lv_chart_set_axis_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_update_mode", (PyCFunction)py_lv_chart_set_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_div_line_count", (PyCFunction)py_lv_chart_set_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_hor_div_line_count", (PyCFunction)py_lv_chart_set_hor_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_ver_div_line_count", (PyCFunction)py_lv_chart_set_ver_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_type", (PyCFunction)py_lv_chart_get_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_point_count", (PyCFunction)py_lv_chart_get_point_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_update_mode", (PyCFunction)py_lv_chart_get_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_hor_div_line_count", (PyCFunction)py_lv_chart_get_hor_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_ver_div_line_count", (PyCFunction)py_lv_chart_get_ver_div_line_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_x_start_point", (PyCFunction)py_lv_chart_get_x_start_point, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_point_pos_by_id", (PyCFunction)py_lv_chart_get_point_pos_by_id, METH_VARARGS | METH_KEYWORDS, NULL}, - {"refresh", (PyCFunction)py_lv_chart_refresh, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_series", (PyCFunction)py_lv_chart_add_series, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_series", (PyCFunction)py_lv_chart_remove_series, METH_VARARGS | METH_KEYWORDS, NULL}, - {"hide_series", (PyCFunction)py_lv_chart_hide_series, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_series_color", (PyCFunction)py_lv_chart_set_series_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_series_color", (PyCFunction)py_lv_chart_get_series_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_x_start_point", (PyCFunction)py_lv_chart_set_x_start_point, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_series_next", (PyCFunction)py_lv_chart_get_series_next, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_cursor", (PyCFunction)py_lv_chart_add_cursor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_cursor", (PyCFunction)py_lv_chart_remove_cursor, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor_pos", (PyCFunction)py_lv_chart_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor_pos_x", (PyCFunction)py_lv_chart_set_cursor_pos_x, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor_pos_y", (PyCFunction)py_lv_chart_set_cursor_pos_y, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor_point", (PyCFunction)py_lv_chart_set_cursor_point, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cursor_point", (PyCFunction)py_lv_chart_get_cursor_point, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_all_values", (PyCFunction)py_lv_chart_set_all_values, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_next_value", (PyCFunction)py_lv_chart_set_next_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_next_value2", (PyCFunction)py_lv_chart_set_next_value2, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_series_values", (PyCFunction)py_lv_chart_set_series_values, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_series_values2", (PyCFunction)py_lv_chart_set_series_values2, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_series_value_by_id", (PyCFunction)py_lv_chart_set_series_value_by_id, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_series_value_by_id2", (PyCFunction)py_lv_chart_set_series_value_by_id2, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_series_ext_y_array", (PyCFunction)py_lv_chart_set_series_ext_y_array, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_series_ext_x_array", (PyCFunction)py_lv_chart_set_series_ext_x_array, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_series_y_array", (PyCFunction)py_lv_chart_get_series_y_array, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_series_x_array", (PyCFunction)py_lv_chart_get_series_x_array, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_pressed_point", (PyCFunction)py_lv_chart_get_pressed_point, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_first_point_center_offset", (PyCFunction)py_lv_chart_get_first_point_center_offset, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; + * lvgl extension definition for: + * const lv_point_precise_t *lv_line_get_points(lv_obj_t *obj) + */ +static PyObject *py_lv_line_get_points(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -PyTypeObject py_lv_chart_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.chart", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_chart_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_chart_new, - .tp_methods = py_lv_chart_methods, - .tp_call = (ternaryfunc)py_lv_chart_call, + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const lv_point_precise_t * _res; + lvpy_lock(); + _res = ((const lv_point_precise_t *(*)(lv_obj_t *))lv_line_get_points)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_point_precise_t((void*)_res); +} + +static PyMethodDef py_lv_line_get_points_def = { + "lv_line_get_points", + (PyCFunction)py_lv_line_get_points, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static py_lv_obj_type_t py_lv_chart_mapping = { - .lv_obj_class = &lv_chart_class, - .py_type = &py_lv_chart_type, + +/* + * lvgl extension definition for: + * uint32_t lv_line_get_point_count(lv_obj_t *obj) + */ +static PyObject *py_lv_line_get_point_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *))lv_line_get_point_count)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} + +static PyMethodDef py_lv_line_get_point_count_def = { + "lv_line_get_point_count", + (PyCFunction)py_lv_line_get_point_count, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * void lv_checkbox_set_text(lv_obj_t *obj, const char *txt) + * bool lv_line_is_point_array_mutable(lv_obj_t *obj) */ -static PyObject *py_lv_checkbox_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_is_point_array_mutable(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_checkbox_set_text)(obj, txt); + _res = ((bool (*)(lv_obj_t *))lv_line_is_point_array_mutable)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_checkbox_set_text_def = { - "lv_checkbox_set_text", - (PyCFunction)py_lv_checkbox_set_text, +static PyMethodDef py_lv_line_is_point_array_mutable_def = { + "lv_line_is_point_array_mutable", + (PyCFunction)py_lv_line_is_point_array_mutable, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41541,29 +53223,28 @@ static PyMethodDef py_lv_checkbox_set_text_def = { /* * lvgl extension definition for: - * void lv_checkbox_set_text_static(lv_obj_t *obj, const char *txt) + * lv_point_precise_t *lv_line_get_points_mutable(lv_obj_t *obj) */ -static PyObject *py_lv_checkbox_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_get_points_mutable(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_point_precise_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_checkbox_set_text_static)(obj, txt); + _res = ((lv_point_precise_t *(*)(lv_obj_t *))lv_line_get_points_mutable)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_point_precise_t((void*)_res); } -static PyMethodDef py_lv_checkbox_set_text_static_def = { - "lv_checkbox_set_text_static", - (PyCFunction)py_lv_checkbox_set_text_static, +static PyMethodDef py_lv_line_get_points_mutable_def = { + "lv_line_get_points_mutable", + (PyCFunction)py_lv_line_get_points_mutable, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41571,9 +53252,9 @@ static PyMethodDef py_lv_checkbox_set_text_static_def = { /* * lvgl extension definition for: - * const char *lv_checkbox_get_text(const lv_obj_t *obj) + * bool lv_line_get_y_invert(const lv_obj_t *obj) */ -static PyObject *py_lv_checkbox_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_get_y_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -41581,18 +53262,18 @@ static PyObject *py_lv_checkbox_get_text(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + bool _res; lvpy_lock(); - _res = ((const char *(*)(const lv_obj_t *))lv_checkbox_get_text)(obj); + _res = ((bool (*)(const lv_obj_t *))lv_line_get_y_invert)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_checkbox_get_text_def = { - "lv_checkbox_get_text", - (PyCFunction)py_lv_checkbox_get_text, +static PyMethodDef py_lv_line_get_y_invert_def = { + "lv_line_get_y_invert", + (PyCFunction)py_lv_line_get_y_invert, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41600,9 +53281,9 @@ static PyMethodDef py_lv_checkbox_get_text_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_checkbox_create(lv_obj_t *parent) + * lv_obj_t *lv_line_create(lv_obj_t *parent) */ -static PyObject *py_lv_checkbox_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -41618,90 +53299,96 @@ static PyObject *py_lv_checkbox_create(PyObject *self, PyObject *py_args, PyObje lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_checkbox_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_line_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_checkbox_create_def = { - "lv_checkbox_create", - (PyCFunction)py_lv_checkbox_create, +static PyMethodDef py_lv_line_create_def = { + "lv_line_create", + (PyCFunction)py_lv_line_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl checkbox object definitions (CPython) + * lvgl line object definitions (CPython) */ -static PyObject *py_lv_checkbox_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_checkbox_create(type, py_args, py_kwds); + return py_lv_line_create(type, py_args, py_kwds); } -static PyObject *py_lv_checkbox_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_line_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_checkbox_create((PyObject *)type, py_args, py_kwds); + return py_lv_line_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_checkbox_dealloc(py_lv_obj_t *self) +static void py_lv_line_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_checkbox_methods[] = { - {"set_text", (PyCFunction)py_lv_checkbox_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_static", (PyCFunction)py_lv_checkbox_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text", (PyCFunction)py_lv_checkbox_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_line_methods[] = { + {"set_points", (PyCFunction)py_lv_line_set_points, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_points_mutable", (PyCFunction)py_lv_line_set_points_mutable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_y_invert", (PyCFunction)py_lv_line_set_y_invert, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_points", (PyCFunction)py_lv_line_get_points, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_point_count", (PyCFunction)py_lv_line_get_point_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_point_array_mutable", (PyCFunction)py_lv_line_is_point_array_mutable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_points_mutable", (PyCFunction)py_lv_line_get_points_mutable, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_y_invert", (PyCFunction)py_lv_line_get_y_invert, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_checkbox_type = { +PyTypeObject py_lv_line_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.checkbox", + .tp_name = "lvgl.line", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_checkbox_dealloc, + .tp_dealloc = (destructor)py_lv_line_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_checkbox_new, - .tp_methods = py_lv_checkbox_methods, - .tp_call = (ternaryfunc)py_lv_checkbox_call, + .tp_new = (newfunc)py_lv_line_new, + .tp_methods = py_lv_line_methods, + .tp_call = (ternaryfunc)py_lv_line_call, }; -static py_lv_obj_type_t py_lv_checkbox_mapping = { - .lv_obj_class = &lv_checkbox_class, - .py_type = &py_lv_checkbox_type, +static py_lv_obj_type_t py_lv_line_mapping = { + .lv_obj_class = &lv_line_class, + .py_type = &py_lv_line_type, }; /* * lvgl extension definition for: - * void lv_dropdown_set_text(lv_obj_t *obj, const char *text) + * lv_obj_t *lv_list_add_text(lv_obj_t *list, const char *txt) */ -static PyObject *py_lv_dropdown_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_list_add_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *list = mp_to_lv(self); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_text)(obj, text); + _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_list_add_text)(list, txt); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_set_text_def = { - "lv_dropdown_set_text", - (PyCFunction)py_lv_dropdown_set_text, +static PyMethodDef py_lv_list_add_text_def = { + "lv_list_add_text", + (PyCFunction)py_lv_list_add_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41709,29 +53396,31 @@ static PyMethodDef py_lv_dropdown_set_text_def = { /* * lvgl extension definition for: - * void lv_dropdown_set_text_static(lv_obj_t *obj, const char *text) + * lv_obj_t *lv_list_add_button(lv_obj_t *list, const void *icon, const char *txt) */ -static PyObject *py_lv_dropdown_set_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_list_add_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + PyObject *icon_py; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "OO", &icon_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *list = mp_to_lv(self); + const void *icon = (const void *)mp_to_ptr(icon_py); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_text_static)(obj, text); + _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, const char *))lv_list_add_button)(list, icon, txt); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_set_text_static_def = { - "lv_dropdown_set_text_static", - (PyCFunction)py_lv_dropdown_set_text_static, +static PyMethodDef py_lv_list_add_button_def = { + "lv_list_add_button", + (PyCFunction)py_lv_list_add_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41739,29 +53428,30 @@ static PyMethodDef py_lv_dropdown_set_text_static_def = { /* * lvgl extension definition for: - * void lv_dropdown_set_options(lv_obj_t *obj, const char *options) + * const char *lv_list_get_button_text(lv_obj_t *list, lv_obj_t *btn) */ -static PyObject *py_lv_dropdown_set_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_list_get_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *options_py; - if (!PyArg_ParseTuple(py_args, "O", &options_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *options = (const char *)(char*)convert_from_str(options_py); + PyObject *btn_py; + if (!PyArg_ParseTuple(py_args, "O", &btn_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *list = mp_to_lv(self); + lv_obj_t *btn = mp_to_lv(btn_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_options)(obj, options); + _res = ((const char *(*)(lv_obj_t *, lv_obj_t *))lv_list_get_button_text)(list, btn); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_dropdown_set_options_def = { - "lv_dropdown_set_options", - (PyCFunction)py_lv_dropdown_set_options, +static PyMethodDef py_lv_list_get_button_text_def = { + "lv_list_get_button_text", + (PyCFunction)py_lv_list_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41769,29 +53459,30 @@ static PyMethodDef py_lv_dropdown_set_options_def = { /* * lvgl extension definition for: - * void lv_dropdown_set_options_static(lv_obj_t *obj, const char *options) + * void lv_list_set_button_text(lv_obj_t *list, lv_obj_t *btn, const char *txt) */ -static PyObject *py_lv_dropdown_set_options_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_list_set_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *options_py; - if (!PyArg_ParseTuple(py_args, "O", &options_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *options = (const char *)(char*)convert_from_str(options_py); + PyObject *btn_py; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "OO", &btn_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *list = mp_to_lv(self); + lv_obj_t *btn = mp_to_lv(btn_py); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_dropdown_set_options_static)(obj, options); + ((void (*)(lv_obj_t *, lv_obj_t *, const char *))lv_list_set_button_text)(list, btn, txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_set_options_static_def = { - "lv_dropdown_set_options_static", - (PyCFunction)py_lv_dropdown_set_options_static, +static PyMethodDef py_lv_list_set_button_text_def = { + "lv_list_set_button_text", + (PyCFunction)py_lv_list_set_button_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41799,30 +53490,109 @@ static PyMethodDef py_lv_dropdown_set_options_static_def = { /* * lvgl extension definition for: - * void lv_dropdown_add_option(lv_obj_t *obj, const char *option, uint32_t pos) + * lv_obj_t *lv_list_create(lv_obj_t *parent) */ -static PyObject *py_lv_dropdown_add_option(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_list_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *option_py; long pos_val; - if (!PyArg_ParseTuple(py_args, "Ol", &option_py, &pos_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_list_create)(parent); + lvpy_unlock(); + + PyGILState_Release(gstate); + return lv_to_mp((void*)_res); +} + +static PyMethodDef py_lv_list_create_def = { + "lv_list_create", + (PyCFunction)py_lv_list_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl list object definitions (CPython) + */ +static PyObject *py_lv_list_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_list_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_list_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_list_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_list_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_list_methods[] = { + {"add_text", (PyCFunction)py_lv_list_add_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_button", (PyCFunction)py_lv_list_add_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_button_text", (PyCFunction)py_lv_list_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_button_text", (PyCFunction)py_lv_list_set_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_list_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.list", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_list_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_list_new, + .tp_methods = py_lv_list_methods, + .tp_call = (ternaryfunc)py_lv_list_call, +}; + +static py_lv_obj_type_t py_lv_list_mapping = { + .lv_obj_class = &lv_list_class, + .py_type = &py_lv_list_type, +}; + + +/* + * lvgl extension definition for: + * void lv_menu_set_page(lv_obj_t *obj, lv_obj_t *page) + */ +static PyObject *py_lv_menu_set_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *page_py; + if (!PyArg_ParseTuple(py_args, "O", &page_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *option = (const char *)(char*)convert_from_str(option_py); - uint32_t pos = (uint32_t)pos_val; + lv_obj_t *page = mp_to_lv(page_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *, uint32_t))lv_dropdown_add_option)(obj, option, pos); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_menu_set_page)(obj, page); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_add_option_def = { - "lv_dropdown_add_option", - (PyCFunction)py_lv_dropdown_add_option, +static PyMethodDef py_lv_menu_set_page_def = { + "lv_menu_set_page", + (PyCFunction)py_lv_menu_set_page, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41830,27 +53600,29 @@ static PyMethodDef py_lv_dropdown_add_option_def = { /* * lvgl extension definition for: - * void lv_dropdown_clear_options(lv_obj_t *obj) + * void lv_menu_set_page_title(lv_obj_t *page_obj, const char * const title) */ -static PyObject *py_lv_dropdown_clear_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_set_page_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *title_py; + if (!PyArg_ParseTuple(py_args, "O", &title_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *page_obj = mp_to_lv(self); + const char * const title = (const char * const)(char*)convert_from_str(title_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_dropdown_clear_options)(obj); + ((void (*)(lv_obj_t *, const char * const))lv_menu_set_page_title)(page_obj, title); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_clear_options_def = { - "lv_dropdown_clear_options", - (PyCFunction)py_lv_dropdown_clear_options, +static PyMethodDef py_lv_menu_set_page_title_def = { + "lv_menu_set_page_title", + (PyCFunction)py_lv_menu_set_page_title, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41858,29 +53630,29 @@ static PyMethodDef py_lv_dropdown_clear_options_def = { /* * lvgl extension definition for: - * void lv_dropdown_set_selected(lv_obj_t *obj, uint32_t sel_opt) + * void lv_menu_set_page_title_static(lv_obj_t *page_obj, const char * const title) */ -static PyObject *py_lv_dropdown_set_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_set_page_title_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long sel_opt_val; - if (!PyArg_ParseTuple(py_args, "l", &sel_opt_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t sel_opt = (uint32_t)sel_opt_val; + PyObject *title_py; + if (!PyArg_ParseTuple(py_args, "O", &title_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *page_obj = mp_to_lv(self); + const char * const title = (const char * const)(char*)convert_from_str(title_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_dropdown_set_selected)(obj, sel_opt); + ((void (*)(lv_obj_t *, const char * const))lv_menu_set_page_title_static)(page_obj, title); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_set_selected_def = { - "lv_dropdown_set_selected", - (PyCFunction)py_lv_dropdown_set_selected, +static PyMethodDef py_lv_menu_set_page_title_static_def = { + "lv_menu_set_page_title_static", + (PyCFunction)py_lv_menu_set_page_title_static, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41888,29 +53660,29 @@ static PyMethodDef py_lv_dropdown_set_selected_def = { /* * lvgl extension definition for: - * void lv_dropdown_set_dir(lv_obj_t *obj, lv_dir_t dir) + * void lv_menu_set_sidebar_page(lv_obj_t *obj, lv_obj_t *page) */ -static PyObject *py_lv_dropdown_set_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_set_sidebar_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dir_py; - if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *page_py; + if (!PyArg_ParseTuple(py_args, "O", &page_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_dir_t dir = (int)mp_obj_get_int(dir_py); + lv_obj_t *page = mp_to_lv(page_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_dir_t))lv_dropdown_set_dir)(obj, dir); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_menu_set_sidebar_page)(obj, page); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_set_dir_def = { - "lv_dropdown_set_dir", - (PyCFunction)py_lv_dropdown_set_dir, +static PyMethodDef py_lv_menu_set_sidebar_page_def = { + "lv_menu_set_sidebar_page", + (PyCFunction)py_lv_menu_set_sidebar_page, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41918,29 +53690,29 @@ static PyMethodDef py_lv_dropdown_set_dir_def = { /* * lvgl extension definition for: - * void lv_dropdown_set_symbol(lv_obj_t *obj, const void *symbol) + * void lv_menu_set_mode_header(lv_obj_t *obj, lv_menu_mode_header_t mode) */ -static PyObject *py_lv_dropdown_set_symbol(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_set_mode_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *symbol_py; - if (!PyArg_ParseTuple(py_args, "O", &symbol_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const void *symbol = (const void *)mp_to_ptr(symbol_py); + lv_menu_mode_header_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const void *))lv_dropdown_set_symbol)(obj, symbol); + ((void (*)(lv_obj_t *, lv_menu_mode_header_t))lv_menu_set_mode_header)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_set_symbol_def = { - "lv_dropdown_set_symbol", - (PyCFunction)py_lv_dropdown_set_symbol, +static PyMethodDef py_lv_menu_set_mode_header_def = { + "lv_menu_set_mode_header", + (PyCFunction)py_lv_menu_set_mode_header, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41948,29 +53720,29 @@ static PyMethodDef py_lv_dropdown_set_symbol_def = { /* * lvgl extension definition for: - * void lv_dropdown_set_selected_highlight(lv_obj_t *obj, bool en) + * void lv_menu_set_mode_root_back_button(lv_obj_t *obj, lv_menu_mode_root_back_button_t mode) */ -static PyObject *py_lv_dropdown_set_selected_highlight(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_set_mode_root_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + lv_menu_mode_root_back_button_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_dropdown_set_selected_highlight)(obj, en); + ((void (*)(lv_obj_t *, lv_menu_mode_root_back_button_t))lv_menu_set_mode_root_back_button)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_set_selected_highlight_def = { - "lv_dropdown_set_selected_highlight", - (PyCFunction)py_lv_dropdown_set_selected_highlight, +static PyMethodDef py_lv_menu_set_mode_root_back_button_def = { + "lv_menu_set_mode_root_back_button", + (PyCFunction)py_lv_menu_set_mode_root_back_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -41978,28 +53750,30 @@ static PyMethodDef py_lv_dropdown_set_selected_highlight_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_dropdown_get_list(lv_obj_t *obj) + * void lv_menu_set_load_page_event(lv_obj_t *menu, lv_obj_t *obj, lv_obj_t *page) */ -static PyObject *py_lv_dropdown_get_list(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_set_load_page_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *obj_py; PyObject *page_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &page_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *menu = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(obj_py); + lv_obj_t *page = mp_to_lv(page_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_dropdown_get_list)(obj); + ((void (*)(lv_obj_t *, lv_obj_t *, lv_obj_t *))lv_menu_set_load_page_event)(menu, obj, page); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_get_list_def = { - "lv_dropdown_get_list", - (PyCFunction)py_lv_dropdown_get_list, +static PyMethodDef py_lv_menu_set_load_page_event_def = { + "lv_menu_set_load_page_event", + (PyCFunction)py_lv_menu_set_load_page_event, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42007,9 +53781,9 @@ static PyMethodDef py_lv_dropdown_get_list_def = { /* * lvgl extension definition for: - * const char *lv_dropdown_get_text(lv_obj_t *obj) + * lv_obj_t *lv_menu_get_cur_main_page(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_cur_main_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42017,18 +53791,18 @@ static PyObject *py_lv_dropdown_get_text(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((const char *(*)(lv_obj_t *))lv_dropdown_get_text)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_cur_main_page)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_get_text_def = { - "lv_dropdown_get_text", - (PyCFunction)py_lv_dropdown_get_text, +static PyMethodDef py_lv_menu_get_cur_main_page_def = { + "lv_menu_get_cur_main_page", + (PyCFunction)py_lv_menu_get_cur_main_page, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42036,9 +53810,9 @@ static PyMethodDef py_lv_dropdown_get_text_def = { /* * lvgl extension definition for: - * const char *lv_dropdown_get_options(const lv_obj_t *obj) + * lv_obj_t *lv_menu_get_cur_sidebar_page(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_cur_sidebar_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42046,18 +53820,18 @@ static PyObject *py_lv_dropdown_get_options(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((const char *(*)(const lv_obj_t *))lv_dropdown_get_options)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_cur_sidebar_page)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_get_options_def = { - "lv_dropdown_get_options", - (PyCFunction)py_lv_dropdown_get_options, +static PyMethodDef py_lv_menu_get_cur_sidebar_page_def = { + "lv_menu_get_cur_sidebar_page", + (PyCFunction)py_lv_menu_get_cur_sidebar_page, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42065,9 +53839,9 @@ static PyMethodDef py_lv_dropdown_get_options_def = { /* * lvgl extension definition for: - * uint32_t lv_dropdown_get_selected(const lv_obj_t *obj) + * lv_obj_t *lv_menu_get_main_header(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_main_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42075,18 +53849,18 @@ static PyObject *py_lv_dropdown_get_selected(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_dropdown_get_selected)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_main_header)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_get_selected_def = { - "lv_dropdown_get_selected", - (PyCFunction)py_lv_dropdown_get_selected, +static PyMethodDef py_lv_menu_get_main_header_def = { + "lv_menu_get_main_header", + (PyCFunction)py_lv_menu_get_main_header, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42094,9 +53868,9 @@ static PyMethodDef py_lv_dropdown_get_selected_def = { /* * lvgl extension definition for: - * uint32_t lv_dropdown_get_option_count(const lv_obj_t *obj) + * lv_obj_t *lv_menu_get_main_header_back_button(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_option_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_main_header_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42104,18 +53878,18 @@ static PyObject *py_lv_dropdown_get_option_count(PyObject *self, PyObject *py_ar lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_dropdown_get_option_count)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_main_header_back_button)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_get_option_count_def = { - "lv_dropdown_get_option_count", - (PyCFunction)py_lv_dropdown_get_option_count, +static PyMethodDef py_lv_menu_get_main_header_back_button_def = { + "lv_menu_get_main_header_back_button", + (PyCFunction)py_lv_menu_get_main_header_back_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42123,30 +53897,28 @@ static PyMethodDef py_lv_dropdown_get_option_count_def = { /* * lvgl extension definition for: - * void lv_dropdown_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) + * lv_obj_t *lv_menu_get_sidebar_header(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_selected_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_sidebar_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; long buf_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - char *buf = (char*)convert_from_str(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(const lv_obj_t *, char *, uint32_t))lv_dropdown_get_selected_str)(obj, buf, buf_size); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_sidebar_header)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_get_selected_str_def = { - "lv_dropdown_get_selected_str", - (PyCFunction)py_lv_dropdown_get_selected_str, +static PyMethodDef py_lv_menu_get_sidebar_header_def = { + "lv_menu_get_sidebar_header", + (PyCFunction)py_lv_menu_get_sidebar_header, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42154,30 +53926,28 @@ static PyMethodDef py_lv_dropdown_get_selected_str_def = { /* * lvgl extension definition for: - * int32_t lv_dropdown_get_option_index(lv_obj_t *obj, const char *option) + * lv_obj_t *lv_menu_get_sidebar_header_back_button(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_option_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_sidebar_header_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *option_py; - if (!PyArg_ParseTuple(py_args, "O", &option_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const char *option = (const char *)(char*)convert_from_str(option_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *, const char *))lv_dropdown_get_option_index)(obj, option); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_sidebar_header_back_button)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_get_option_index_def = { - "lv_dropdown_get_option_index", - (PyCFunction)py_lv_dropdown_get_option_index, +static PyMethodDef py_lv_menu_get_sidebar_header_back_button_def = { + "lv_menu_get_sidebar_header_back_button", + (PyCFunction)py_lv_menu_get_sidebar_header_back_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42185,28 +53955,30 @@ static PyMethodDef py_lv_dropdown_get_option_index_def = { /* * lvgl extension definition for: - * const char *lv_dropdown_get_symbol(lv_obj_t *obj) + * bool lv_menu_back_button_is_root(lv_obj_t *menu, lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_symbol(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_back_button_is_root(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *menu = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + bool _res; lvpy_lock(); - _res = ((const char *(*)(lv_obj_t *))lv_dropdown_get_symbol)(obj); + _res = ((bool (*)(lv_obj_t *, lv_obj_t *))lv_menu_back_button_is_root)(menu, obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_dropdown_get_symbol_def = { - "lv_dropdown_get_symbol", - (PyCFunction)py_lv_dropdown_get_symbol, +static PyMethodDef py_lv_menu_back_button_is_root_def = { + "lv_menu_back_button_is_root", + (PyCFunction)py_lv_menu_back_button_is_root, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42214,9 +53986,9 @@ static PyMethodDef py_lv_dropdown_get_symbol_def = { /* * lvgl extension definition for: - * bool lv_dropdown_get_selected_highlight(lv_obj_t *obj) + * lv_menu_mode_header_t lv_menu_get_mode_header(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_selected_highlight(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_mode_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42224,18 +53996,18 @@ static PyObject *py_lv_dropdown_get_selected_highlight(PyObject *self, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_menu_mode_header_t _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_dropdown_get_selected_highlight)(obj); + _res = ((lv_menu_mode_header_t (*)(lv_obj_t *))lv_menu_get_mode_header)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_dropdown_get_selected_highlight_def = { - "lv_dropdown_get_selected_highlight", - (PyCFunction)py_lv_dropdown_get_selected_highlight, +static PyMethodDef py_lv_menu_get_mode_header_def = { + "lv_menu_get_mode_header", + (PyCFunction)py_lv_menu_get_mode_header, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42243,9 +54015,9 @@ static PyMethodDef py_lv_dropdown_get_selected_highlight_def = { /* * lvgl extension definition for: - * lv_dir_t lv_dropdown_get_dir(const lv_obj_t *obj) + * lv_menu_mode_root_back_button_t lv_menu_get_mode_root_back_button(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_get_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_get_mode_root_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42253,18 +54025,18 @@ static PyObject *py_lv_dropdown_get_dir(PyObject *self, PyObject *py_args, PyObj lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_dir_t _res; + lv_menu_mode_root_back_button_t _res; lvpy_lock(); - _res = ((lv_dir_t (*)(const lv_obj_t *))lv_dropdown_get_dir)(obj); + _res = ((lv_menu_mode_root_back_button_t (*)(lv_obj_t *))lv_menu_get_mode_root_back_button)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_dropdown_get_dir_def = { - "lv_dropdown_get_dir", - (PyCFunction)py_lv_dropdown_get_dir, +static PyMethodDef py_lv_menu_get_mode_root_back_button_def = { + "lv_menu_get_mode_root_back_button", + (PyCFunction)py_lv_menu_get_mode_root_back_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42272,27 +54044,27 @@ static PyMethodDef py_lv_dropdown_get_dir_def = { /* * lvgl extension definition for: - * void lv_dropdown_open(lv_obj_t *dropdown_obj) + * void lv_menu_clear_history(lv_obj_t *obj) */ -static PyObject *py_lv_dropdown_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_clear_history(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *dropdown_obj = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_dropdown_open)(dropdown_obj); + ((void (*)(lv_obj_t *))lv_menu_clear_history)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_dropdown_open_def = { - "lv_dropdown_open", - (PyCFunction)py_lv_dropdown_open, +static PyMethodDef py_lv_menu_clear_history_def = { + "lv_menu_clear_history", + (PyCFunction)py_lv_menu_clear_history, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42300,97 +54072,257 @@ static PyMethodDef py_lv_dropdown_open_def = { /* * lvgl extension definition for: - * void lv_dropdown_close(lv_obj_t *obj) + * lv_obj_t *lv_menu_create(lv_obj_t *parent) */ -static PyObject *py_lv_dropdown_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_dropdown_close)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_close_def = { - "lv_dropdown_close", - (PyCFunction)py_lv_dropdown_close, +static PyMethodDef py_lv_menu_create_def = { + "lv_menu_create", + (PyCFunction)py_lv_menu_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl menu object definitions (CPython) + */ +static PyObject *py_lv_menu_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_menu_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_menu_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_menu_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_menu_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_menu_methods[] = { + {"set_page", (PyCFunction)py_lv_menu_set_page, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_page_title", (PyCFunction)py_lv_menu_set_page_title, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_page_title_static", (PyCFunction)py_lv_menu_set_page_title_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_sidebar_page", (PyCFunction)py_lv_menu_set_sidebar_page, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode_header", (PyCFunction)py_lv_menu_set_mode_header, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode_root_back_button", (PyCFunction)py_lv_menu_set_mode_root_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_load_page_event", (PyCFunction)py_lv_menu_set_load_page_event, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cur_main_page", (PyCFunction)py_lv_menu_get_cur_main_page, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cur_sidebar_page", (PyCFunction)py_lv_menu_get_cur_sidebar_page, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_main_header", (PyCFunction)py_lv_menu_get_main_header, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_main_header_back_button", (PyCFunction)py_lv_menu_get_main_header_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_sidebar_header", (PyCFunction)py_lv_menu_get_sidebar_header, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_sidebar_header_back_button", (PyCFunction)py_lv_menu_get_sidebar_header_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"back_button_is_root", (PyCFunction)py_lv_menu_back_button_is_root, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode_header", (PyCFunction)py_lv_menu_get_mode_header, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode_root_back_button", (PyCFunction)py_lv_menu_get_mode_root_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_history", (PyCFunction)py_lv_menu_clear_history, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_menu_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.menu", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_menu_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_menu_new, + .tp_methods = py_lv_menu_methods, + .tp_call = (ternaryfunc)py_lv_menu_call, +}; + +static py_lv_obj_type_t py_lv_menu_mapping = { + .lv_obj_class = &lv_menu_class, + .py_type = &py_lv_menu_type, +}; + + /* * lvgl extension definition for: - * bool lv_dropdown_is_open(lv_obj_t *obj) + * lv_obj_t *lv_menu_page_create(lv_obj_t *menu, const char * const title) */ -static PyObject *py_lv_dropdown_is_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_page_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *parent_py; PyObject *title_py; + if (!PyArg_ParseTuple(py_args, "|OO", &parent_py, &title_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *menu = NULL; + if (parent_py && parent_py != Py_None) { + menu = mp_to_lv(parent_py); + if (!menu) {{ PyGILState_Release(gstate); return NULL; }} + } + const char * const title = (const char * const)(char*)convert_from_str(title_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_dropdown_is_open)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, const char * const))lv_menu_page_create)(menu, title); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_is_open_def = { - "lv_dropdown_is_open", - (PyCFunction)py_lv_dropdown_is_open, +static PyMethodDef py_lv_menu_page_create_def = { + "lv_menu_page_create", + (PyCFunction)py_lv_menu_page_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl menu_page object definitions (CPython) + */ +static PyObject *py_lv_menu_page_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_menu_page_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_menu_page_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_menu_page_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_menu_page_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_menu_page_methods[] = { + + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_menu_page_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.menu_page", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_menu_page_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_menu_page_new, + .tp_methods = py_lv_menu_page_methods, + .tp_call = (ternaryfunc)py_lv_menu_page_call, +}; + +static py_lv_obj_type_t py_lv_menu_page_mapping = { + .lv_obj_class = &lv_menu_page_class, + .py_type = &py_lv_menu_page_type, +}; + + /* * lvgl extension definition for: - * lv_observer_t *lv_dropdown_bind_value(lv_obj_t *obj, lv_subject_t *subject) + * lv_obj_t *lv_menu_cont_create(lv_obj_t *parent) */ -static PyObject *py_lv_dropdown_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_cont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_dropdown_bind_value)(obj, subject); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_cont_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_bind_value_def = { - "lv_dropdown_bind_value", - (PyCFunction)py_lv_dropdown_bind_value, +static PyMethodDef py_lv_menu_cont_create_def = { + "lv_menu_cont_create", + (PyCFunction)py_lv_menu_cont_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl menu_cont object definitions (CPython) + */ +static PyObject *py_lv_menu_cont_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_menu_cont_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_menu_cont_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_menu_cont_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_menu_cont_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_menu_cont_methods[] = { + + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_menu_cont_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.menu_cont", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_menu_cont_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_menu_cont_new, + .tp_methods = py_lv_menu_cont_methods, + .tp_call = (ternaryfunc)py_lv_menu_cont_call, +}; + +static py_lv_obj_type_t py_lv_menu_cont_mapping = { + .lv_obj_class = &lv_menu_cont_class, + .py_type = &py_lv_menu_cont_type, +}; + + /* * lvgl extension definition for: - * lv_obj_t *lv_dropdown_create(lv_obj_t *parent) + * lv_obj_t *lv_menu_section_create(lv_obj_t *parent) */ -static PyObject *py_lv_dropdown_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_section_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -42406,141 +54338,166 @@ static PyObject *py_lv_dropdown_create(PyObject *self, PyObject *py_args, PyObje lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_dropdown_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_section_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_dropdown_create_def = { - "lv_dropdown_create", - (PyCFunction)py_lv_dropdown_create, +static PyMethodDef py_lv_menu_section_create_def = { + "lv_menu_section_create", + (PyCFunction)py_lv_menu_section_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl dropdown object definitions (CPython) + * lvgl menu_section object definitions (CPython) */ -static PyObject *py_lv_dropdown_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_section_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_dropdown_create(type, py_args, py_kwds); + return py_lv_menu_section_create(type, py_args, py_kwds); } -static PyObject *py_lv_dropdown_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_section_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_dropdown_create((PyObject *)type, py_args, py_kwds); + return py_lv_menu_section_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_dropdown_dealloc(py_lv_obj_t *self) +static void py_lv_menu_section_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_dropdown_methods[] = { - {"set_text", (PyCFunction)py_lv_dropdown_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_static", (PyCFunction)py_lv_dropdown_set_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_options", (PyCFunction)py_lv_dropdown_set_options, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_options_static", (PyCFunction)py_lv_dropdown_set_options_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_option", (PyCFunction)py_lv_dropdown_add_option, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_options", (PyCFunction)py_lv_dropdown_clear_options, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_selected", (PyCFunction)py_lv_dropdown_set_selected, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_dir", (PyCFunction)py_lv_dropdown_set_dir, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_symbol", (PyCFunction)py_lv_dropdown_set_symbol, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_selected_highlight", (PyCFunction)py_lv_dropdown_set_selected_highlight, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_list", (PyCFunction)py_lv_dropdown_get_list, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text", (PyCFunction)py_lv_dropdown_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_options", (PyCFunction)py_lv_dropdown_get_options, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected", (PyCFunction)py_lv_dropdown_get_selected, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_option_count", (PyCFunction)py_lv_dropdown_get_option_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected_str", (PyCFunction)py_lv_dropdown_get_selected_str, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_option_index", (PyCFunction)py_lv_dropdown_get_option_index, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_symbol", (PyCFunction)py_lv_dropdown_get_symbol, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected_highlight", (PyCFunction)py_lv_dropdown_get_selected_highlight, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dir", (PyCFunction)py_lv_dropdown_get_dir, METH_VARARGS | METH_KEYWORDS, NULL}, - {"open", (PyCFunction)py_lv_dropdown_open, METH_VARARGS | METH_KEYWORDS, NULL}, - {"close", (PyCFunction)py_lv_dropdown_close, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_open", (PyCFunction)py_lv_dropdown_is_open, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_value", (PyCFunction)py_lv_dropdown_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_menu_section_methods[] = { + {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_dropdown_type = { +PyTypeObject py_lv_menu_section_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.dropdown", + .tp_name = "lvgl.menu_section", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_dropdown_dealloc, + .tp_dealloc = (destructor)py_lv_menu_section_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_dropdown_new, - .tp_methods = py_lv_dropdown_methods, - .tp_call = (ternaryfunc)py_lv_dropdown_call, + .tp_new = (newfunc)py_lv_menu_section_new, + .tp_methods = py_lv_menu_section_methods, + .tp_call = (ternaryfunc)py_lv_menu_section_call, }; -static py_lv_obj_type_t py_lv_dropdown_mapping = { - .lv_obj_class = &lv_dropdown_class, - .py_type = &py_lv_dropdown_type, +static py_lv_obj_type_t py_lv_menu_section_mapping = { + .lv_obj_class = &lv_menu_section_class, + .py_type = &py_lv_menu_section_type, }; /* * lvgl extension definition for: - * void lv_gif_set_color_format(lv_obj_t *obj, lv_color_format_t color_format) + * lv_obj_t *lv_menu_separator_create(lv_obj_t *parent) */ -static PyObject *py_lv_gif_set_color_format(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_menu_separator_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "O", &color_format_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_format_t))lv_gif_set_color_format)(obj, color_format); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_separator_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_set_color_format_def = { - "lv_gif_set_color_format", - (PyCFunction)py_lv_gif_set_color_format, +static PyMethodDef py_lv_menu_separator_create_def = { + "lv_menu_separator_create", + (PyCFunction)py_lv_menu_separator_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl menu_separator object definitions (CPython) + */ +static PyObject *py_lv_menu_separator_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_menu_separator_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_menu_separator_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_menu_separator_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_menu_separator_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_menu_separator_methods[] = { + + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_menu_separator_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.menu_separator", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_menu_separator_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_menu_separator_new, + .tp_methods = py_lv_menu_separator_methods, + .tp_call = (ternaryfunc)py_lv_menu_separator_call, +}; + +static py_lv_obj_type_t py_lv_menu_separator_mapping = { + .lv_obj_class = &lv_menu_separator_class, + .py_type = &py_lv_menu_separator_type, +}; + + /* * lvgl extension definition for: - * void lv_gif_set_src(lv_obj_t *obj, const void *src) + * lv_obj_t *lv_msgbox_add_title(lv_obj_t *obj, const char *title) */ -static PyObject *py_lv_gif_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_add_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *title_py; + if (!PyArg_ParseTuple(py_args, "O", &title_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const void *src = (const void *)mp_to_ptr(src_py); + const char *title = (const char *)(char*)convert_from_str(title_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const void *))lv_gif_set_src)(obj, src); + _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_msgbox_add_title)(obj, title); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_set_src_def = { - "lv_gif_set_src", - (PyCFunction)py_lv_gif_set_src, +static PyMethodDef py_lv_msgbox_add_title_def = { + "lv_msgbox_add_title", + (PyCFunction)py_lv_msgbox_add_title, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42548,27 +54505,30 @@ static PyMethodDef py_lv_gif_set_src_def = { /* * lvgl extension definition for: - * void lv_gif_restart(lv_obj_t *obj) + * lv_obj_t *lv_msgbox_add_header_button(lv_obj_t *obj, const void *icon) */ -static PyObject *py_lv_gif_restart(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_add_header_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *icon_py; + if (!PyArg_ParseTuple(py_args, "O", &icon_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const void *icon = (const void *)mp_to_ptr(icon_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_gif_restart)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, const void *))lv_msgbox_add_header_button)(obj, icon); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_restart_def = { - "lv_gif_restart", - (PyCFunction)py_lv_gif_restart, +static PyMethodDef py_lv_msgbox_add_header_button_def = { + "lv_msgbox_add_header_button", + (PyCFunction)py_lv_msgbox_add_header_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42576,27 +54536,30 @@ static PyMethodDef py_lv_gif_restart_def = { /* * lvgl extension definition for: - * void lv_gif_pause(lv_obj_t *obj) + * lv_obj_t *lv_msgbox_add_text(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_gif_pause(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_add_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_gif_pause)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_msgbox_add_text)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_pause_def = { - "lv_gif_pause", - (PyCFunction)py_lv_gif_pause, +static PyMethodDef py_lv_msgbox_add_text_def = { + "lv_msgbox_add_text", + (PyCFunction)py_lv_msgbox_add_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42604,27 +54567,30 @@ static PyMethodDef py_lv_gif_pause_def = { /* * lvgl extension definition for: - * void lv_gif_resume(lv_obj_t *obj) + * lv_obj_t *lv_msgbox_add_footer_button(lv_obj_t *obj, const char *text) */ -static PyObject *py_lv_gif_resume(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_add_footer_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_gif_resume)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_msgbox_add_footer_button)(obj, text); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_resume_def = { - "lv_gif_resume", - (PyCFunction)py_lv_gif_resume, +static PyMethodDef py_lv_msgbox_add_footer_button_def = { + "lv_msgbox_add_footer_button", + (PyCFunction)py_lv_msgbox_add_footer_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42632,9 +54598,9 @@ static PyMethodDef py_lv_gif_resume_def = { /* * lvgl extension definition for: - * bool lv_gif_is_loaded(lv_obj_t *obj) + * lv_obj_t *lv_msgbox_add_close_button(lv_obj_t *obj) */ -static PyObject *py_lv_gif_is_loaded(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_add_close_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42642,18 +54608,18 @@ static PyObject *py_lv_gif_is_loaded(PyObject *self, PyObject *py_args, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_gif_is_loaded)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_add_close_button)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_is_loaded_def = { - "lv_gif_is_loaded", - (PyCFunction)py_lv_gif_is_loaded, +static PyMethodDef py_lv_msgbox_add_close_button_def = { + "lv_msgbox_add_close_button", + (PyCFunction)py_lv_msgbox_add_close_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42661,9 +54627,9 @@ static PyMethodDef py_lv_gif_is_loaded_def = { /* * lvgl extension definition for: - * int32_t lv_gif_get_loop_count(lv_obj_t *obj) + * lv_obj_t *lv_msgbox_get_header(lv_obj_t *obj) */ -static PyObject *py_lv_gif_get_loop_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_get_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42671,18 +54637,18 @@ static PyObject *py_lv_gif_get_loop_count(PyObject *self, PyObject *py_args, PyO lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_gif_get_loop_count)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_header)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_get_loop_count_def = { - "lv_gif_get_loop_count", - (PyCFunction)py_lv_gif_get_loop_count, +static PyMethodDef py_lv_msgbox_get_header_def = { + "lv_msgbox_get_header", + (PyCFunction)py_lv_msgbox_get_header, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42690,29 +54656,28 @@ static PyMethodDef py_lv_gif_get_loop_count_def = { /* * lvgl extension definition for: - * void lv_gif_set_loop_count(lv_obj_t *obj, int32_t count) + * lv_obj_t *lv_msgbox_get_footer(lv_obj_t *obj) */ -static PyObject *py_lv_gif_set_loop_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_get_footer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long count_val; - if (!PyArg_ParseTuple(py_args, "l", &count_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t count = (int32_t)count_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_gif_set_loop_count)(obj, count); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_footer)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_set_loop_count_def = { - "lv_gif_set_loop_count", - (PyCFunction)py_lv_gif_set_loop_count, +static PyMethodDef py_lv_msgbox_get_footer_def = { + "lv_msgbox_get_footer", + (PyCFunction)py_lv_msgbox_get_footer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42720,29 +54685,28 @@ static PyMethodDef py_lv_gif_set_loop_count_def = { /* * lvgl extension definition for: - * void lv_gif_set_auto_pause_invisible(lv_obj_t *obj, bool auto_pause) + * lv_obj_t *lv_msgbox_get_content(lv_obj_t *obj) */ -static PyObject *py_lv_gif_set_auto_pause_invisible(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_get_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long auto_pause_val; - if (!PyArg_ParseTuple(py_args, "l", &auto_pause_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - bool auto_pause = (auto_pause_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_gif_set_auto_pause_invisible)(obj, auto_pause); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_content)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_set_auto_pause_invisible_def = { - "lv_gif_set_auto_pause_invisible", - (PyCFunction)py_lv_gif_set_auto_pause_invisible, +static PyMethodDef py_lv_msgbox_get_content_def = { + "lv_msgbox_get_content", + (PyCFunction)py_lv_msgbox_get_content, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42750,32 +54714,28 @@ static PyMethodDef py_lv_gif_set_auto_pause_invisible_def = { /* * lvgl extension definition for: - * bool lv_gif_get_size(const char *src, uint16_t *w, uint16_t *h) + * lv_obj_t *lv_msgbox_get_title(lv_obj_t *obj) */ -static PyObject *py_lv_gif_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_get_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *src_py; PyObject *w_py; PyObject *h_py; - if (!PyArg_ParseTuple(py_args, "OOO", &src_py, &w_py, &h_py)) { PyGILState_Release(gstate); return NULL; } - const char *src = (const char *)(char*)convert_from_str(src_py); - uint16_t *w = mp_array_to_u16ptr(w_py); - uint16_t *h = mp_array_to_u16ptr(h_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(const char *, uint16_t *, uint16_t *))lv_gif_get_size)(src, w, h); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_title)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_get_size_def = { - "lv_gif_get_size", - (PyCFunction)py_lv_gif_get_size, +static PyMethodDef py_lv_msgbox_get_title_def = { + "lv_msgbox_get_title", + (PyCFunction)py_lv_msgbox_get_title, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42783,9 +54743,9 @@ static PyMethodDef py_lv_gif_get_size_def = { /* * lvgl extension definition for: - * int32_t lv_gif_get_frame_count(lv_obj_t *obj) + * void lv_msgbox_close(lv_obj_t *obj) */ -static PyObject *py_lv_gif_get_frame_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42793,18 +54753,17 @@ static PyObject *py_lv_gif_get_frame_count(PyObject *self, PyObject *py_args, Py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_gif_get_frame_count)(obj); + ((void (*)(lv_obj_t *))lv_msgbox_close)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_gif_get_frame_count_def = { - "lv_gif_get_frame_count", - (PyCFunction)py_lv_gif_get_frame_count, +static PyMethodDef py_lv_msgbox_close_def = { + "lv_msgbox_close", + (PyCFunction)py_lv_msgbox_close, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42812,9 +54771,9 @@ static PyMethodDef py_lv_gif_get_frame_count_def = { /* * lvgl extension definition for: - * int32_t lv_gif_get_current_frame_index(lv_obj_t *obj) + * void lv_msgbox_close_async(lv_obj_t *obj) */ -static PyObject *py_lv_gif_get_current_frame_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_close_async(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -42822,18 +54781,17 @@ static PyObject *py_lv_gif_get_current_frame_index(PyObject *self, PyObject *py_ lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_gif_get_current_frame_index)(obj); + ((void (*)(lv_obj_t *))lv_msgbox_close_async)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_gif_get_current_frame_index_def = { - "lv_gif_get_current_frame_index", - (PyCFunction)py_lv_gif_get_current_frame_index, +static PyMethodDef py_lv_msgbox_close_async_def = { + "lv_msgbox_close_async", + (PyCFunction)py_lv_msgbox_close_async, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42841,9 +54799,9 @@ static PyMethodDef py_lv_gif_get_current_frame_index_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_gif_create(lv_obj_t *parent) + * lv_obj_t *lv_msgbox_create(lv_obj_t *parent) */ -static PyObject *py_lv_gif_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -42859,102 +54817,98 @@ static PyObject *py_lv_gif_create(PyObject *self, PyObject *py_args, PyObject *p lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_gif_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_gif_create_def = { - "lv_gif_create", - (PyCFunction)py_lv_gif_create, +static PyMethodDef py_lv_msgbox_create_def = { + "lv_msgbox_create", + (PyCFunction)py_lv_msgbox_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl gif object definitions (CPython) + * lvgl msgbox object definitions (CPython) */ -static PyObject *py_lv_gif_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_gif_create(type, py_args, py_kwds); + return py_lv_msgbox_create(type, py_args, py_kwds); } -static PyObject *py_lv_gif_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_msgbox_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_gif_create((PyObject *)type, py_args, py_kwds); + return py_lv_msgbox_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_gif_dealloc(py_lv_obj_t *self) +static void py_lv_msgbox_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_gif_methods[] = { - {"set_color_format", (PyCFunction)py_lv_gif_set_color_format, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_src", (PyCFunction)py_lv_gif_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"restart", (PyCFunction)py_lv_gif_restart, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pause", (PyCFunction)py_lv_gif_pause, METH_VARARGS | METH_KEYWORDS, NULL}, - {"resume", (PyCFunction)py_lv_gif_resume, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_loaded", (PyCFunction)py_lv_gif_is_loaded, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_loop_count", (PyCFunction)py_lv_gif_get_loop_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_loop_count", (PyCFunction)py_lv_gif_set_loop_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_auto_pause_invisible", (PyCFunction)py_lv_gif_set_auto_pause_invisible, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_size", (PyCFunction)py_lv_gif_get_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_frame_count", (PyCFunction)py_lv_gif_get_frame_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_current_frame_index", (PyCFunction)py_lv_gif_get_current_frame_index, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_msgbox_methods[] = { + {"add_title", (PyCFunction)py_lv_msgbox_add_title, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_header_button", (PyCFunction)py_lv_msgbox_add_header_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_text", (PyCFunction)py_lv_msgbox_add_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_footer_button", (PyCFunction)py_lv_msgbox_add_footer_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_close_button", (PyCFunction)py_lv_msgbox_add_close_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_header", (PyCFunction)py_lv_msgbox_get_header, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_footer", (PyCFunction)py_lv_msgbox_get_footer, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_content", (PyCFunction)py_lv_msgbox_get_content, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_title", (PyCFunction)py_lv_msgbox_get_title, METH_VARARGS | METH_KEYWORDS, NULL}, + {"close", (PyCFunction)py_lv_msgbox_close, METH_VARARGS | METH_KEYWORDS, NULL}, + {"close_async", (PyCFunction)py_lv_msgbox_close_async, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_gif_type = { +PyTypeObject py_lv_msgbox_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.gif", + .tp_name = "lvgl.msgbox", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_gif_dealloc, + .tp_dealloc = (destructor)py_lv_msgbox_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_gif_new, - .tp_methods = py_lv_gif_methods, - .tp_call = (ternaryfunc)py_lv_gif_call, + .tp_new = (newfunc)py_lv_msgbox_new, + .tp_methods = py_lv_msgbox_methods, + .tp_call = (ternaryfunc)py_lv_msgbox_call, }; -static py_lv_obj_type_t py_lv_gif_mapping = { - .lv_obj_class = &lv_gif_class, - .py_type = &py_lv_gif_type, +static py_lv_obj_type_t py_lv_msgbox_mapping = { + .lv_obj_class = &lv_msgbox_class, + .py_type = &py_lv_msgbox_type, }; /* * lvgl extension definition for: - * void lv_imagebutton_set_src(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left, const void *src_mid, const void *src_right) + * void lv_qrcode_set_size(lv_obj_t *obj, int32_t size) */ -static PyObject *py_lv_imagebutton_set_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_set_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; PyObject *src_left_py; PyObject *src_mid_py; PyObject *src_right_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &state_py, &src_left_py, &src_mid_py, &src_right_py)) { PyGILState_Release(gstate); return NULL; } + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); - const void *src_left = (const void *)mp_to_ptr(src_left_py); - const void *src_mid = (const void *)mp_to_ptr(src_mid_py); - const void *src_right = (const void *)mp_to_ptr(src_right_py); + int32_t size = (int32_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *, const void *, const void *))lv_imagebutton_set_src)(obj, state, src_left, src_mid, src_right); + ((void (*)(lv_obj_t *, int32_t))lv_qrcode_set_size)(obj, size); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_imagebutton_set_src_def = { - "lv_imagebutton_set_src", - (PyCFunction)py_lv_imagebutton_set_src, +static PyMethodDef py_lv_qrcode_set_size_def = { + "lv_qrcode_set_size", + (PyCFunction)py_lv_qrcode_set_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42962,30 +54916,29 @@ static PyMethodDef py_lv_imagebutton_set_src_def = { /* * lvgl extension definition for: - * void lv_imagebutton_set_src_left(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left) + * void lv_qrcode_set_dark_color(lv_obj_t *obj, lv_color_t color) */ -static PyObject *py_lv_imagebutton_set_src_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_set_dark_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; PyObject *src_left_py; - if (!PyArg_ParseTuple(py_args, "OO", &state_py, &src_left_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); - const void *src_left = (const void *)mp_to_ptr(src_left_py); + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_imagebutton_set_src_left)(obj, state, src_left); + ((void (*)(lv_obj_t *, lv_color_t))lv_qrcode_set_dark_color)(obj, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_imagebutton_set_src_left_def = { - "lv_imagebutton_set_src_left", - (PyCFunction)py_lv_imagebutton_set_src_left, +static PyMethodDef py_lv_qrcode_set_dark_color_def = { + "lv_qrcode_set_dark_color", + (PyCFunction)py_lv_qrcode_set_dark_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -42993,30 +54946,29 @@ static PyMethodDef py_lv_imagebutton_set_src_left_def = { /* * lvgl extension definition for: - * void lv_imagebutton_set_src_right(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_right) + * void lv_qrcode_set_light_color(lv_obj_t *obj, lv_color_t color) */ -static PyObject *py_lv_imagebutton_set_src_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_set_light_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; PyObject *src_right_py; - if (!PyArg_ParseTuple(py_args, "OO", &state_py, &src_right_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); - const void *src_right = (const void *)mp_to_ptr(src_right_py); + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_imagebutton_set_src_right)(obj, state, src_right); + ((void (*)(lv_obj_t *, lv_color_t))lv_qrcode_set_light_color)(obj, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_imagebutton_set_src_right_def = { - "lv_imagebutton_set_src_right", - (PyCFunction)py_lv_imagebutton_set_src_right, +static PyMethodDef py_lv_qrcode_set_light_color_def = { + "lv_qrcode_set_light_color", + (PyCFunction)py_lv_qrcode_set_light_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43024,30 +54976,61 @@ static PyMethodDef py_lv_imagebutton_set_src_right_def = { /* * lvgl extension definition for: - * void lv_imagebutton_set_src_mid(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_mid) + * lv_result_t lv_qrcode_update(lv_obj_t *obj, const void *data, uint32_t data_len) */ -static PyObject *py_lv_imagebutton_set_src_mid(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_update(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; PyObject *src_mid_py; - if (!PyArg_ParseTuple(py_args, "OO", &state_py, &src_mid_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *data_py; long data_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &data_py, &data_len_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); - const void *src_mid = (const void *)mp_to_ptr(src_mid_py); + const void *data = (const void *)mp_to_ptr(data_py); + uint32_t data_len = (uint32_t)data_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t, const void *))lv_imagebutton_set_src_mid)(obj, state, src_mid); + _res = ((lv_result_t (*)(lv_obj_t *, const void *, uint32_t))lv_qrcode_update)(obj, data, data_len); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_qrcode_update_def = { + "lv_qrcode_update", + (PyCFunction)py_lv_qrcode_update, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_qrcode_set_data(lv_obj_t *obj, const char *data) + */ +static PyObject *py_lv_qrcode_set_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *data = (const char *)(char*)convert_from_str(data_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const char *))lv_qrcode_set_data)(obj, data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_imagebutton_set_src_mid_def = { - "lv_imagebutton_set_src_mid", - (PyCFunction)py_lv_imagebutton_set_src_mid, +static PyMethodDef py_lv_qrcode_set_data_def = { + "lv_qrcode_set_data", + (PyCFunction)py_lv_qrcode_set_data, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43055,29 +55038,58 @@ static PyMethodDef py_lv_imagebutton_set_src_mid_def = { /* * lvgl extension definition for: - * void lv_imagebutton_set_state(lv_obj_t *obj, lv_imagebutton_state_t state) + * lv_result_t lv_qrcode_render(lv_obj_t *obj) */ -static PyObject *py_lv_imagebutton_set_state(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_render(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; - if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_set_state)(obj, state); + _res = ((lv_result_t (*)(lv_obj_t *))lv_qrcode_render)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_qrcode_render_def = { + "lv_qrcode_render", + (PyCFunction)py_lv_qrcode_render, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_qrcode_set_quiet_zone(lv_obj_t *obj, bool enable) + */ +static PyObject *py_lv_qrcode_set_quiet_zone(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long enable_val; + if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool enable = (enable_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_qrcode_set_quiet_zone)(obj, enable); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_imagebutton_set_state_def = { - "lv_imagebutton_set_state", - (PyCFunction)py_lv_imagebutton_set_state, +static PyMethodDef py_lv_qrcode_set_quiet_zone_def = { + "lv_qrcode_set_quiet_zone", + (PyCFunction)py_lv_qrcode_set_quiet_zone, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43085,30 +55097,29 @@ static PyMethodDef py_lv_imagebutton_set_state_def = { /* * lvgl extension definition for: - * const void *lv_imagebutton_get_src_left(lv_obj_t *obj, lv_imagebutton_state_t state) + * void lv_qrcode_set_update_mode(lv_obj_t *obj, lv_qrcode_update_mode_t mode) */ -static PyObject *py_lv_imagebutton_get_src_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_set_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; - if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); + lv_qrcode_update_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; lvpy_lock(); - _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_get_src_left)(obj, state); + ((void (*)(lv_obj_t *, lv_qrcode_update_mode_t))lv_qrcode_set_update_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_imagebutton_get_src_left_def = { - "lv_imagebutton_get_src_left", - (PyCFunction)py_lv_imagebutton_get_src_left, +static PyMethodDef py_lv_qrcode_set_update_mode_def = { + "lv_qrcode_set_update_mode", + (PyCFunction)py_lv_qrcode_set_update_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43116,30 +55127,28 @@ static PyMethodDef py_lv_imagebutton_get_src_left_def = { /* * lvgl extension definition for: - * const void *lv_imagebutton_get_src_middle(lv_obj_t *obj, lv_imagebutton_state_t state) + * lv_qrcode_update_mode_t lv_qrcode_get_update_mode(lv_obj_t *obj) */ -static PyObject *py_lv_imagebutton_get_src_middle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_get_update_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; - if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; + lv_qrcode_update_mode_t _res; lvpy_lock(); - _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_get_src_middle)(obj, state); + _res = ((lv_qrcode_update_mode_t (*)(lv_obj_t *))lv_qrcode_get_update_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_imagebutton_get_src_middle_def = { - "lv_imagebutton_get_src_middle", - (PyCFunction)py_lv_imagebutton_get_src_middle, +static PyMethodDef py_lv_qrcode_get_update_mode_def = { + "lv_qrcode_get_update_mode", + (PyCFunction)py_lv_qrcode_get_update_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43147,30 +55156,28 @@ static PyMethodDef py_lv_imagebutton_get_src_middle_def = { /* * lvgl extension definition for: - * const void *lv_imagebutton_get_src_right(lv_obj_t *obj, lv_imagebutton_state_t state) + * bool lv_qrcode_is_render_valid(lv_obj_t *obj) */ -static PyObject *py_lv_imagebutton_get_src_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_is_render_valid(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *state_py; - if (!PyArg_ParseTuple(py_args, "O", &state_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_imagebutton_state_t state = (int)mp_obj_get_int(state_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; + bool _res; lvpy_lock(); - _res = ((const void *(*)(lv_obj_t *, lv_imagebutton_state_t))lv_imagebutton_get_src_right)(obj, state); + _res = ((bool (*)(lv_obj_t *))lv_qrcode_is_render_valid)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_imagebutton_get_src_right_def = { - "lv_imagebutton_get_src_right", - (PyCFunction)py_lv_imagebutton_get_src_right, +static PyMethodDef py_lv_qrcode_is_render_valid_def = { + "lv_qrcode_is_render_valid", + (PyCFunction)py_lv_qrcode_is_render_valid, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43178,9 +55185,9 @@ static PyMethodDef py_lv_imagebutton_get_src_right_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_imagebutton_create(lv_obj_t *parent) + * lv_obj_t *lv_qrcode_create(lv_obj_t *parent) */ -static PyObject *py_lv_imagebutton_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -43196,95 +55203,98 @@ static PyObject *py_lv_imagebutton_create(PyObject *self, PyObject *py_args, PyO lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_imagebutton_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_qrcode_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_imagebutton_create_def = { - "lv_imagebutton_create", - (PyCFunction)py_lv_imagebutton_create, +static PyMethodDef py_lv_qrcode_create_def = { + "lv_qrcode_create", + (PyCFunction)py_lv_qrcode_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl imagebutton object definitions (CPython) + * lvgl qrcode object definitions (CPython) */ -static PyObject *py_lv_imagebutton_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_imagebutton_create(type, py_args, py_kwds); + return py_lv_qrcode_create(type, py_args, py_kwds); } -static PyObject *py_lv_imagebutton_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_qrcode_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_imagebutton_create((PyObject *)type, py_args, py_kwds); + return py_lv_qrcode_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_imagebutton_dealloc(py_lv_obj_t *self) +static void py_lv_qrcode_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_imagebutton_methods[] = { - {"set_src", (PyCFunction)py_lv_imagebutton_set_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_src_left", (PyCFunction)py_lv_imagebutton_set_src_left, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_src_right", (PyCFunction)py_lv_imagebutton_set_src_right, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_src_mid", (PyCFunction)py_lv_imagebutton_set_src_mid, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_state", (PyCFunction)py_lv_imagebutton_set_state, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_src_left", (PyCFunction)py_lv_imagebutton_get_src_left, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_src_middle", (PyCFunction)py_lv_imagebutton_get_src_middle, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_src_right", (PyCFunction)py_lv_imagebutton_get_src_right, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_qrcode_methods[] = { + {"set_size", (PyCFunction)py_lv_qrcode_set_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_dark_color", (PyCFunction)py_lv_qrcode_set_dark_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_light_color", (PyCFunction)py_lv_qrcode_set_light_color, METH_VARARGS | METH_KEYWORDS, NULL}, + {"update", (PyCFunction)py_lv_qrcode_update, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_data", (PyCFunction)py_lv_qrcode_set_data, METH_VARARGS | METH_KEYWORDS, NULL}, + {"render", (PyCFunction)py_lv_qrcode_render, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_quiet_zone", (PyCFunction)py_lv_qrcode_set_quiet_zone, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_update_mode", (PyCFunction)py_lv_qrcode_set_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_update_mode", (PyCFunction)py_lv_qrcode_get_update_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_render_valid", (PyCFunction)py_lv_qrcode_is_render_valid, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_imagebutton_type = { +PyTypeObject py_lv_qrcode_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.imagebutton", + .tp_name = "lvgl.qrcode", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_imagebutton_dealloc, + .tp_dealloc = (destructor)py_lv_qrcode_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_imagebutton_new, - .tp_methods = py_lv_imagebutton_methods, - .tp_call = (ternaryfunc)py_lv_imagebutton_call, + .tp_new = (newfunc)py_lv_qrcode_new, + .tp_methods = py_lv_qrcode_methods, + .tp_call = (ternaryfunc)py_lv_qrcode_call, }; -static py_lv_obj_type_t py_lv_imagebutton_mapping = { - .lv_obj_class = &lv_imagebutton_class, - .py_type = &py_lv_imagebutton_type, +static py_lv_obj_type_t py_lv_qrcode_mapping = { + .lv_obj_class = &lv_qrcode_class, + .py_type = &py_lv_qrcode_type, }; /* * lvgl extension definition for: - * void lv_keyboard_set_textarea(lv_obj_t *kb, lv_obj_t *ta) + * void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode) */ -static PyObject *py_lv_keyboard_set_textarea(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_set_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ta_py; - if (!PyArg_ParseTuple(py_args, "O", &ta_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *kb = mp_to_lv(self); - lv_obj_t *ta = mp_to_lv(ta_py); + PyObject *options_py; PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "OO", &options_py, &mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *options = (const char *)(char*)convert_from_str(options_py); + lv_roller_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_keyboard_set_textarea)(kb, ta); + ((void (*)(lv_obj_t *, const char *, lv_roller_mode_t))lv_roller_set_options)(obj, options, mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_keyboard_set_textarea_def = { - "lv_keyboard_set_textarea", - (PyCFunction)py_lv_keyboard_set_textarea, +static PyMethodDef py_lv_roller_set_options_def = { + "lv_roller_set_options", + (PyCFunction)py_lv_roller_set_options, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43292,29 +55302,30 @@ static PyMethodDef py_lv_keyboard_set_textarea_def = { /* * lvgl extension definition for: - * void lv_keyboard_set_mode(lv_obj_t *kb, lv_keyboard_mode_t mode) + * void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim) */ -static PyObject *py_lv_keyboard_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_set_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *kb = mp_to_lv(self); - lv_keyboard_mode_t mode = (int)mp_obj_get_int(mode_py); + long sel_opt_val; PyObject *anim_py; + if (!PyArg_ParseTuple(py_args, "lO", &sel_opt_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t sel_opt = (uint32_t)sel_opt_val; + lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_keyboard_mode_t))lv_keyboard_set_mode)(kb, mode); + ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_roller_set_selected)(obj, sel_opt, anim); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_keyboard_set_mode_def = { - "lv_keyboard_set_mode", - (PyCFunction)py_lv_keyboard_set_mode, +static PyMethodDef py_lv_roller_set_selected_def = { + "lv_roller_set_selected", + (PyCFunction)py_lv_roller_set_selected, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43322,29 +55333,31 @@ static PyMethodDef py_lv_keyboard_set_mode_def = { /* * lvgl extension definition for: - * void lv_keyboard_set_popovers(lv_obj_t *kb, bool en) + * bool lv_roller_set_selected_str(lv_obj_t *obj, const char *sel_opt, lv_anim_enable_t anim) */ -static PyObject *py_lv_keyboard_set_popovers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_set_selected_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *kb = mp_to_lv(self); - bool en = (en_val != 0); + PyObject *sel_opt_py; PyObject *anim_py; + if (!PyArg_ParseTuple(py_args, "OO", &sel_opt_py, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *sel_opt = (const char *)(char*)convert_from_str(sel_opt_py); + lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_keyboard_set_popovers)(kb, en); + _res = ((bool (*)(lv_obj_t *, const char *, lv_anim_enable_t))lv_roller_set_selected_str)(obj, sel_opt, anim); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_keyboard_set_popovers_def = { - "lv_keyboard_set_popovers", - (PyCFunction)py_lv_keyboard_set_popovers, +static PyMethodDef py_lv_roller_set_selected_str_def = { + "lv_roller_set_selected_str", + (PyCFunction)py_lv_roller_set_selected_str, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43352,31 +55365,29 @@ static PyMethodDef py_lv_keyboard_set_popovers_def = { /* * lvgl extension definition for: - * void lv_keyboard_set_map(lv_obj_t *kb, lv_keyboard_mode_t mode, const char * const map[], const lv_buttonmatrix_ctrl_t ctrl_map[]) + * void lv_roller_set_visible_row_count(lv_obj_t *obj, uint32_t row_cnt) */ -static PyObject *py_lv_keyboard_set_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_set_visible_row_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; PyObject *map_py; PyObject *ctrl_map_py; - if (!PyArg_ParseTuple(py_args, "OOO", &mode_py, &map_py, &ctrl_map_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *kb = mp_to_lv(self); - lv_keyboard_mode_t mode = (int)mp_obj_get_int(mode_py); - const char * const *map = (const char * const *)lvpy_str_arr_arg(self, map_py, "lv_keyboard_set_map:map"); - const lv_buttonmatrix_ctrl_t *ctrl_map = (const lv_buttonmatrix_ctrl_t *)mp_to_ptr(ctrl_map_py); + long row_cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &row_cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t row_cnt = (uint32_t)row_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_keyboard_mode_t, const char * const [], const lv_buttonmatrix_ctrl_t []))lv_keyboard_set_map)(kb, mode, map, ctrl_map); + ((void (*)(lv_obj_t *, uint32_t))lv_roller_set_visible_row_count)(obj, row_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_keyboard_set_map_def = { - "lv_keyboard_set_map", - (PyCFunction)py_lv_keyboard_set_map, +static PyMethodDef py_lv_roller_set_visible_row_count_def = { + "lv_roller_set_visible_row_count", + (PyCFunction)py_lv_roller_set_visible_row_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43384,28 +55395,28 @@ static PyMethodDef py_lv_keyboard_set_map_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_keyboard_get_textarea(const lv_obj_t *kb) + * uint32_t lv_roller_get_selected(const lv_obj_t *obj) */ -static PyObject *py_lv_keyboard_get_textarea(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_get_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *kb = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_keyboard_get_textarea)(kb); + _res = ((uint32_t (*)(const lv_obj_t *))lv_roller_get_selected)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_keyboard_get_textarea_def = { - "lv_keyboard_get_textarea", - (PyCFunction)py_lv_keyboard_get_textarea, +static PyMethodDef py_lv_roller_get_selected_def = { + "lv_roller_get_selected", + (PyCFunction)py_lv_roller_get_selected, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43413,28 +55424,30 @@ static PyMethodDef py_lv_keyboard_get_textarea_def = { /* * lvgl extension definition for: - * lv_keyboard_mode_t lv_keyboard_get_mode(const lv_obj_t *kb) + * void lv_roller_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) */ -static PyObject *py_lv_keyboard_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_get_selected_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *kb = mp_to_lv(self); + PyObject *buf_py; long buf_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + char *buf = (char*)convert_from_str(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_keyboard_mode_t _res; lvpy_lock(); - _res = ((lv_keyboard_mode_t (*)(const lv_obj_t *))lv_keyboard_get_mode)(kb); + ((void (*)(const lv_obj_t *, char *, uint32_t))lv_roller_get_selected_str)(obj, buf, buf_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_keyboard_get_mode_def = { - "lv_keyboard_get_mode", - (PyCFunction)py_lv_keyboard_get_mode, +static PyMethodDef py_lv_roller_get_selected_str_def = { + "lv_roller_get_selected_str", + (PyCFunction)py_lv_roller_get_selected_str, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43442,9 +55455,9 @@ static PyMethodDef py_lv_keyboard_get_mode_def = { /* * lvgl extension definition for: - * bool lv_keyboard_get_popovers(const lv_obj_t *obj) + * const char *lv_roller_get_options(const lv_obj_t *obj) */ -static PyObject *py_lv_keyboard_get_popovers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_get_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -43452,18 +55465,18 @@ static PyObject *py_lv_keyboard_get_popovers(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + const char * _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_keyboard_get_popovers)(obj); + _res = ((const char *(*)(const lv_obj_t *))lv_roller_get_options)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_keyboard_get_popovers_def = { - "lv_keyboard_get_popovers", - (PyCFunction)py_lv_keyboard_get_popovers, +static PyMethodDef py_lv_roller_get_options_def = { + "lv_roller_get_options", + (PyCFunction)py_lv_roller_get_options, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43471,9 +55484,9 @@ static PyMethodDef py_lv_keyboard_get_popovers_def = { /* * lvgl extension definition for: - * uint32_t lv_keyboard_get_selected_button(const lv_obj_t *obj) + * uint32_t lv_roller_get_option_count(const lv_obj_t *obj) */ -static PyObject *py_lv_keyboard_get_selected_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_get_option_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -43483,16 +55496,16 @@ static PyObject *py_lv_keyboard_get_selected_button(PyObject *self, PyObject *py uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_keyboard_get_selected_button)(obj); + _res = ((uint32_t (*)(const lv_obj_t *))lv_roller_get_option_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_keyboard_get_selected_button_def = { - "lv_keyboard_get_selected_button", - (PyCFunction)py_lv_keyboard_get_selected_button, +static PyMethodDef py_lv_roller_get_option_count_def = { + "lv_roller_get_option_count", + (PyCFunction)py_lv_roller_get_option_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43500,30 +55513,32 @@ static PyMethodDef py_lv_keyboard_get_selected_button_def = { /* * lvgl extension definition for: - * const char *lv_keyboard_get_button_text(const lv_obj_t *obj, uint32_t btn_id) + * lv_result_t lv_roller_get_option_str(const lv_obj_t *obj, uint32_t option, char *buf, uint32_t buf_size) */ -static PyObject *py_lv_keyboard_get_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_get_option_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long btn_id_val; - if (!PyArg_ParseTuple(py_args, "l", &btn_id_val)) { PyGILState_Release(gstate); return NULL; } + long option_val; PyObject *buf_py; long buf_size_val; + if (!PyArg_ParseTuple(py_args, "lOl", &option_val, &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t btn_id = (uint32_t)btn_id_val; + uint32_t option = (uint32_t)option_val; + char *buf = (char*)convert_from_str(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_result_t _res; lvpy_lock(); - _res = ((const char *(*)(const lv_obj_t *, uint32_t))lv_keyboard_get_button_text)(obj, btn_id); + _res = ((lv_result_t (*)(const lv_obj_t *, uint32_t, char *, uint32_t))lv_roller_get_option_str)(obj, option, buf, buf_size); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_keyboard_get_button_text_def = { - "lv_keyboard_get_button_text", - (PyCFunction)py_lv_keyboard_get_button_text, +static PyMethodDef py_lv_roller_get_option_str_def = { + "lv_roller_get_option_str", + (PyCFunction)py_lv_roller_get_option_str, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43531,29 +55546,30 @@ static PyMethodDef py_lv_keyboard_get_button_text_def = { /* * lvgl extension definition for: - * void lv_keyboard_def_event_cb(lv_event_t *e) + * lv_observer_t *lv_roller_bind_value(lv_obj_t *obj, lv_subject_t *subject) */ -static PyObject *py_lv_keyboard_def_event_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *e_py; - if (!PyArg_ParseTuple(py_args, "O", &e_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_t *e = mp_write_ptr_lv_event_t(e_py); + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_observer_t * _res; lvpy_lock(); - ((void (*)(lv_event_t *))lv_keyboard_def_event_cb)(e); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_roller_bind_value)(obj, subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_keyboard_def_event_cb_def = { - "lv_keyboard_def_event_cb", - (PyCFunction)py_lv_keyboard_def_event_cb, +static PyMethodDef py_lv_roller_bind_value_def = { + "lv_roller_bind_value", + (PyCFunction)py_lv_roller_bind_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43561,9 +55577,9 @@ static PyMethodDef py_lv_keyboard_def_event_cb_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_keyboard_create(lv_obj_t *parent) + * lv_obj_t *lv_roller_create(lv_obj_t *parent) */ -static PyObject *py_lv_keyboard_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -43579,155 +55595,97 @@ static PyObject *py_lv_keyboard_create(PyObject *self, PyObject *py_args, PyObje lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_keyboard_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_roller_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_keyboard_create_def = { - "lv_keyboard_create", - (PyCFunction)py_lv_keyboard_create, +static PyMethodDef py_lv_roller_create_def = { + "lv_roller_create", + (PyCFunction)py_lv_roller_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl keyboard object definitions (CPython) + * lvgl roller object definitions (CPython) */ -static PyObject *py_lv_keyboard_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_keyboard_create(type, py_args, py_kwds); + return py_lv_roller_create(type, py_args, py_kwds); } -static PyObject *py_lv_keyboard_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_roller_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_keyboard_create((PyObject *)type, py_args, py_kwds); + return py_lv_roller_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_keyboard_dealloc(py_lv_obj_t *self) +static void py_lv_roller_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_keyboard_methods[] = { - {"set_textarea", (PyCFunction)py_lv_keyboard_set_textarea, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode", (PyCFunction)py_lv_keyboard_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_popovers", (PyCFunction)py_lv_keyboard_set_popovers, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_map", (PyCFunction)py_lv_keyboard_set_map, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_textarea", (PyCFunction)py_lv_keyboard_get_textarea, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode", (PyCFunction)py_lv_keyboard_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_popovers", (PyCFunction)py_lv_keyboard_get_popovers, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected_button", (PyCFunction)py_lv_keyboard_get_selected_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_button_text", (PyCFunction)py_lv_keyboard_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"def_event_cb", (PyCFunction)py_lv_keyboard_def_event_cb, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_roller_methods[] = { + {"set_options", (PyCFunction)py_lv_roller_set_options, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_selected", (PyCFunction)py_lv_roller_set_selected, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_selected_str", (PyCFunction)py_lv_roller_set_selected_str, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_visible_row_count", (PyCFunction)py_lv_roller_set_visible_row_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected", (PyCFunction)py_lv_roller_get_selected, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected_str", (PyCFunction)py_lv_roller_get_selected_str, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_options", (PyCFunction)py_lv_roller_get_options, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_option_count", (PyCFunction)py_lv_roller_get_option_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_option_str", (PyCFunction)py_lv_roller_get_option_str, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_value", (PyCFunction)py_lv_roller_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_keyboard_type = { +PyTypeObject py_lv_roller_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.keyboard", + .tp_name = "lvgl.roller", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_keyboard_dealloc, + .tp_dealloc = (destructor)py_lv_roller_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_keyboard_new, - .tp_methods = py_lv_keyboard_methods, - .tp_call = (ternaryfunc)py_lv_keyboard_call, -}; - -static py_lv_obj_type_t py_lv_keyboard_mapping = { - .lv_obj_class = &lv_keyboard_class, - .py_type = &py_lv_keyboard_type, -}; - - -/* - * lvgl extension definition for: - * void lv_led_set_color(lv_obj_t *led, lv_color_t color) - */ -static PyObject *py_lv_led_set_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *led = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t))lv_led_set_color)(led, color); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_led_set_color_def = { - "lv_led_set_color", - (PyCFunction)py_lv_led_set_color, - METH_VARARGS | METH_KEYWORDS, - NULL + .tp_new = (newfunc)py_lv_roller_new, + .tp_methods = py_lv_roller_methods, + .tp_call = (ternaryfunc)py_lv_roller_call, }; - -/* - * lvgl extension definition for: - * void lv_led_set_brightness(lv_obj_t *led, uint8_t bright) - */ -static PyObject *py_lv_led_set_brightness(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long bright_val; - if (!PyArg_ParseTuple(py_args, "l", &bright_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *led = mp_to_lv(self); - uint8_t bright = (uint8_t)bright_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint8_t))lv_led_set_brightness)(led, bright); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_led_set_brightness_def = { - "lv_led_set_brightness", - (PyCFunction)py_lv_led_set_brightness, - METH_VARARGS | METH_KEYWORDS, - NULL +static py_lv_obj_type_t py_lv_roller_mapping = { + .lv_obj_class = &lv_roller_class, + .py_type = &py_lv_roller_type, }; /* * lvgl extension definition for: - * void lv_led_on(lv_obj_t *led) + * void lv_scale_set_mode(lv_obj_t *obj, lv_scale_mode_t mode) */ -static PyObject *py_lv_led_on(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *led = mp_to_lv(self); + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_scale_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_led_on)(led); + ((void (*)(lv_obj_t *, lv_scale_mode_t))lv_scale_set_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_led_on_def = { - "lv_led_on", - (PyCFunction)py_lv_led_on, +static PyMethodDef py_lv_scale_set_mode_def = { + "lv_scale_set_mode", + (PyCFunction)py_lv_scale_set_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43735,27 +55693,29 @@ static PyMethodDef py_lv_led_on_def = { /* * lvgl extension definition for: - * void lv_led_off(lv_obj_t *led) + * void lv_scale_set_total_tick_count(lv_obj_t *obj, uint32_t total_tick_count) */ -static PyObject *py_lv_led_off(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_total_tick_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *led = mp_to_lv(self); + long total_tick_count_val; + if (!PyArg_ParseTuple(py_args, "l", &total_tick_count_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t total_tick_count = (uint32_t)total_tick_count_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_led_off)(led); + ((void (*)(lv_obj_t *, uint32_t))lv_scale_set_total_tick_count)(obj, total_tick_count); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_led_off_def = { - "lv_led_off", - (PyCFunction)py_lv_led_off, +static PyMethodDef py_lv_scale_set_total_tick_count_def = { + "lv_scale_set_total_tick_count", + (PyCFunction)py_lv_scale_set_total_tick_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43763,27 +55723,29 @@ static PyMethodDef py_lv_led_off_def = { /* * lvgl extension definition for: - * void lv_led_toggle(lv_obj_t *led) + * void lv_scale_set_major_tick_every(lv_obj_t *obj, uint32_t major_tick_every) */ -static PyObject *py_lv_led_toggle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_major_tick_every(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *led = mp_to_lv(self); + long major_tick_every_val; + if (!PyArg_ParseTuple(py_args, "l", &major_tick_every_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t major_tick_every = (uint32_t)major_tick_every_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_led_toggle)(led); + ((void (*)(lv_obj_t *, uint32_t))lv_scale_set_major_tick_every)(obj, major_tick_every); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_led_toggle_def = { - "lv_led_toggle", - (PyCFunction)py_lv_led_toggle, +static PyMethodDef py_lv_scale_set_major_tick_every_def = { + "lv_scale_set_major_tick_every", + (PyCFunction)py_lv_scale_set_major_tick_every, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43791,28 +55753,29 @@ static PyMethodDef py_lv_led_toggle_def = { /* * lvgl extension definition for: - * uint8_t lv_led_get_brightness(const lv_obj_t *obj) + * void lv_scale_set_label_show(lv_obj_t *obj, bool show_label) */ -static PyObject *py_lv_led_get_brightness(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_label_show(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long show_label_val; + if (!PyArg_ParseTuple(py_args, "l", &show_label_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + bool show_label = (show_label_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(const lv_obj_t *))lv_led_get_brightness)(obj); + ((void (*)(lv_obj_t *, bool))lv_scale_set_label_show)(obj, show_label); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_led_get_brightness_def = { - "lv_led_get_brightness", - (PyCFunction)py_lv_led_get_brightness, +static PyMethodDef py_lv_scale_set_label_show_def = { + "lv_scale_set_label_show", + (PyCFunction)py_lv_scale_set_label_show, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43820,142 +55783,60 @@ static PyMethodDef py_lv_led_get_brightness_def = { /* * lvgl extension definition for: - * lv_color_t lv_led_get_color(const lv_obj_t *obj) + * void lv_scale_set_range(lv_obj_t *obj, int32_t min, int32_t max) */ -static PyObject *py_lv_led_get_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *))lv_led_get_color)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); -} - -static PyMethodDef py_lv_led_get_color_def = { - "lv_led_get_color", - (PyCFunction)py_lv_led_get_color, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_led_create(lv_obj_t *parent) - */ -static PyObject *py_lv_led_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_led_create)(parent); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_scale_set_range)(obj, min, max); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_led_create_def = { - "lv_led_create", - (PyCFunction)py_lv_led_create, +static PyMethodDef py_lv_scale_set_range_def = { + "lv_scale_set_range", + (PyCFunction)py_lv_scale_set_range, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl led object definitions (CPython) - */ -static PyObject *py_lv_led_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_led_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_led_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_led_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_led_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_led_methods[] = { - {"set_color", (PyCFunction)py_lv_led_set_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_brightness", (PyCFunction)py_lv_led_set_brightness, METH_VARARGS | METH_KEYWORDS, NULL}, - {"on", (PyCFunction)py_lv_led_on, METH_VARARGS | METH_KEYWORDS, NULL}, - {"off", (PyCFunction)py_lv_led_off, METH_VARARGS | METH_KEYWORDS, NULL}, - {"toggle", (PyCFunction)py_lv_led_toggle, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_brightness", (PyCFunction)py_lv_led_get_brightness, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_color", (PyCFunction)py_lv_led_get_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_led_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.led", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_led_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_led_new, - .tp_methods = py_lv_led_methods, - .tp_call = (ternaryfunc)py_lv_led_call, -}; - -static py_lv_obj_type_t py_lv_led_mapping = { - .lv_obj_class = &lv_led_class, - .py_type = &py_lv_led_type, -}; - - /* * lvgl extension definition for: - * void lv_line_set_points(lv_obj_t *obj, const lv_point_precise_t points[], uint32_t point_num) + * void lv_scale_set_min_value(lv_obj_t *obj, int32_t min) */ -static PyObject *py_lv_line_set_points(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *points_py; long point_num_val; - if (!PyArg_ParseTuple(py_args, "Ol", &points_py, &point_num_val)) { PyGILState_Release(gstate); return NULL; } + long min_val; + if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const lv_point_precise_t *points = (const lv_point_precise_t *)lvpy_struct_arr_arg(self, points_py, "lv_line_set_points:points", sizeof(lv_point_precise_t), mp_write_value_ptr_lv_point_precise_t); - uint32_t point_num = (uint32_t)point_num_val; + int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_point_precise_t [], uint32_t))lv_line_set_points)(obj, points, point_num); + ((void (*)(lv_obj_t *, int32_t))lv_scale_set_min_value)(obj, min); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_line_set_points_def = { - "lv_line_set_points", - (PyCFunction)py_lv_line_set_points, +static PyMethodDef py_lv_scale_set_min_value_def = { + "lv_scale_set_min_value", + (PyCFunction)py_lv_scale_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43963,30 +55844,29 @@ static PyMethodDef py_lv_line_set_points_def = { /* * lvgl extension definition for: - * void lv_line_set_points_mutable(lv_obj_t *obj, lv_point_precise_t points[], uint32_t point_num) + * void lv_scale_set_max_value(lv_obj_t *obj, int32_t max) */ -static PyObject *py_lv_line_set_points_mutable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *points_py; long point_num_val; - if (!PyArg_ParseTuple(py_args, "Ol", &points_py, &point_num_val)) { PyGILState_Release(gstate); return NULL; } + long max_val; + if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_point_precise_t *points = mp_to_ptr(points_py); - uint32_t point_num = (uint32_t)point_num_val; + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_point_precise_t [], uint32_t))lv_line_set_points_mutable)(obj, points, point_num); + ((void (*)(lv_obj_t *, int32_t))lv_scale_set_max_value)(obj, max); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_line_set_points_mutable_def = { - "lv_line_set_points_mutable", - (PyCFunction)py_lv_line_set_points_mutable, +static PyMethodDef py_lv_scale_set_max_value_def = { + "lv_scale_set_max_value", + (PyCFunction)py_lv_scale_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -43994,29 +55874,29 @@ static PyMethodDef py_lv_line_set_points_mutable_def = { /* * lvgl extension definition for: - * void lv_line_set_y_invert(lv_obj_t *obj, bool en) + * void lv_scale_set_angle_range(lv_obj_t *obj, uint32_t angle_range) */ -static PyObject *py_lv_line_set_y_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_angle_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + long angle_range_val; + if (!PyArg_ParseTuple(py_args, "l", &angle_range_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + uint32_t angle_range = (uint32_t)angle_range_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_line_set_y_invert)(obj, en); + ((void (*)(lv_obj_t *, uint32_t))lv_scale_set_angle_range)(obj, angle_range); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_line_set_y_invert_def = { - "lv_line_set_y_invert", - (PyCFunction)py_lv_line_set_y_invert, +static PyMethodDef py_lv_scale_set_angle_range_def = { + "lv_scale_set_angle_range", + (PyCFunction)py_lv_scale_set_angle_range, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44024,28 +55904,29 @@ static PyMethodDef py_lv_line_set_y_invert_def = { /* * lvgl extension definition for: - * const lv_point_precise_t *lv_line_get_points(lv_obj_t *obj) + * void lv_scale_set_rotation(lv_obj_t *obj, int32_t rotation) */ -static PyObject *py_lv_line_get_points(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long rotation_val; + if (!PyArg_ParseTuple(py_args, "l", &rotation_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t rotation = (int32_t)rotation_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_point_precise_t * _res; lvpy_lock(); - _res = ((const lv_point_precise_t *(*)(lv_obj_t *))lv_line_get_points)(obj); + ((void (*)(lv_obj_t *, int32_t))lv_scale_set_rotation)(obj, rotation); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_point_precise_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_line_get_points_def = { - "lv_line_get_points", - (PyCFunction)py_lv_line_get_points, +static PyMethodDef py_lv_scale_set_rotation_def = { + "lv_scale_set_rotation", + (PyCFunction)py_lv_scale_set_rotation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44053,28 +55934,31 @@ static PyMethodDef py_lv_line_get_points_def = { /* * lvgl extension definition for: - * uint32_t lv_line_get_point_count(lv_obj_t *obj) + * void lv_scale_set_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, int32_t value) */ -static PyObject *py_lv_line_get_point_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_line_needle_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *needle_line_py; long needle_length_val; long value_val; + if (!PyArg_ParseTuple(py_args, "Oll", &needle_line_py, &needle_length_val, &value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *needle_line = mp_to_lv(needle_line_py); + int32_t needle_length = (int32_t)needle_length_val; + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_line_get_point_count)(obj); + ((void (*)(lv_obj_t *, lv_obj_t *, int32_t, int32_t))lv_scale_set_line_needle_value)(obj, needle_line, needle_length, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_line_get_point_count_def = { - "lv_line_get_point_count", - (PyCFunction)py_lv_line_get_point_count, +static PyMethodDef py_lv_scale_set_line_needle_value_def = { + "lv_scale_set_line_needle_value", + (PyCFunction)py_lv_scale_set_line_needle_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44082,28 +55966,30 @@ static PyMethodDef py_lv_line_get_point_count_def = { /* * lvgl extension definition for: - * bool lv_line_is_point_array_mutable(lv_obj_t *obj) + * void lv_scale_set_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, int32_t value) */ -static PyObject *py_lv_line_is_point_array_mutable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_image_needle_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *needle_img_py; long value_val; + if (!PyArg_ParseTuple(py_args, "Ol", &needle_img_py, &value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *needle_img = mp_to_lv(needle_img_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_line_is_point_array_mutable)(obj); + ((void (*)(lv_obj_t *, lv_obj_t *, int32_t))lv_scale_set_image_needle_value)(obj, needle_img, value); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_line_is_point_array_mutable_def = { - "lv_line_is_point_array_mutable", - (PyCFunction)py_lv_line_is_point_array_mutable, +static PyMethodDef py_lv_scale_set_image_needle_value_def = { + "lv_scale_set_image_needle_value", + (PyCFunction)py_lv_scale_set_image_needle_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44111,28 +55997,29 @@ static PyMethodDef py_lv_line_is_point_array_mutable_def = { /* * lvgl extension definition for: - * lv_point_precise_t *lv_line_get_points_mutable(lv_obj_t *obj) + * void lv_scale_set_text_src(lv_obj_t *obj, const char *txt_src[]) */ -static PyObject *py_lv_line_get_points_mutable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_text_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *txt_src_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_src_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char **txt_src = (const char **)lvpy_str_arr_arg(self, txt_src_py, "lv_scale_set_text_src:txt_src"); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_point_precise_t * _res; lvpy_lock(); - _res = ((lv_point_precise_t *(*)(lv_obj_t *))lv_line_get_points_mutable)(obj); + ((void (*)(lv_obj_t *, const char *[]))lv_scale_set_text_src)(obj, txt_src); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_point_precise_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_line_get_points_mutable_def = { - "lv_line_get_points_mutable", - (PyCFunction)py_lv_line_get_points_mutable, +static PyMethodDef py_lv_scale_set_text_src_def = { + "lv_scale_set_text_src", + (PyCFunction)py_lv_scale_set_text_src, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44140,28 +56027,29 @@ static PyMethodDef py_lv_line_get_points_mutable_def = { /* * lvgl extension definition for: - * bool lv_line_get_y_invert(const lv_obj_t *obj) + * void lv_scale_set_post_draw(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_line_get_y_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_post_draw(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_line_get_y_invert)(obj); + ((void (*)(lv_obj_t *, bool))lv_scale_set_post_draw)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_line_get_y_invert_def = { - "lv_line_get_y_invert", - (PyCFunction)py_lv_line_get_y_invert, +static PyMethodDef py_lv_scale_set_post_draw_def = { + "lv_scale_set_post_draw", + (PyCFunction)py_lv_scale_set_post_draw, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44169,208 +56057,213 @@ static PyMethodDef py_lv_line_get_y_invert_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_line_create(lv_obj_t *parent) + * void lv_scale_set_draw_ticks_on_top(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_line_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_draw_ticks_on_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_line_create)(parent); + ((void (*)(lv_obj_t *, bool))lv_scale_set_draw_ticks_on_top)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_line_create_def = { - "lv_line_create", - (PyCFunction)py_lv_line_create, +static PyMethodDef py_lv_scale_set_draw_ticks_on_top_def = { + "lv_scale_set_draw_ticks_on_top", + (PyCFunction)py_lv_scale_set_draw_ticks_on_top, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl line object definitions (CPython) + * Struct lv_scale_section_t (CPython) */ -static PyObject *py_lv_line_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_line_create(type, py_args, py_kwds); -} -static PyObject *py_lv_line_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +extern PyMethodDef py_lv_scale_section_t_methods[]; + +static PyObject *py_lv_scale_section_t_getattro(PyObject *self, PyObject *name) { - return py_lv_line_create((PyObject *)type, py_args, py_kwds); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_scale_section_t *data = (lv_scale_section_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "main_style") == 0) return mp_read_ptr_lv_style_t((void*)data->main_style); + if (strcmp(attr, "indicator_style") == 0) return mp_read_ptr_lv_style_t((void*)data->indicator_style); + if (strcmp(attr, "items_style") == 0) return mp_read_ptr_lv_style_t((void*)data->items_style); + if (strcmp(attr, "range_min") == 0) return mp_obj_new_int(data->range_min); + if (strcmp(attr, "range_max") == 0) return mp_obj_new_int(data->range_max); + if (strcmp(attr, "first_tick_idx_in_section") == 0) return mp_obj_new_int_from_uint(data->first_tick_idx_in_section); + if (strcmp(attr, "last_tick_idx_in_section") == 0) return mp_obj_new_int_from_uint(data->last_tick_idx_in_section); + if (strcmp(attr, "first_tick_in_section_width") == 0) return mp_obj_new_int(data->first_tick_in_section_width); + if (strcmp(attr, "last_tick_in_section_width") == 0) return mp_obj_new_int(data->last_tick_in_section_width); + if (strcmp(attr, "first_tick_in_section") == 0) return mp_read_byref_lv_point_t(data->first_tick_in_section); + if (strcmp(attr, "last_tick_in_section") == 0) return mp_read_byref_lv_point_t(data->last_tick_in_section); + if (strcmp(attr, "first_tick_idx_is_major") == 0) return mp_obj_new_int_from_uint(data->first_tick_idx_is_major); + if (strcmp(attr, "last_tick_idx_is_major") == 0) return mp_obj_new_int_from_uint(data->last_tick_idx_is_major); + for (PyMethodDef *m = py_lv_scale_section_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static void py_lv_line_dealloc(py_lv_obj_t *self) +static const char *const py_lv_scale_section_t_field_names[] = {"main_style", "indicator_style", "items_style", "range_min", "range_max", "first_tick_idx_in_section", "last_tick_idx_in_section", "first_tick_in_section_width", "last_tick_in_section_width", "first_tick_in_section", "last_tick_in_section", "first_tick_idx_is_major", "last_tick_idx_is_major", NULL}; + +static PyObject *py_lv_scale_section_t_dir(PyObject *self, PyObject *unused) { - lvpy_dealloc_obj(self); + (void)unused; + return lvpy_struct_dir(self, py_lv_scale_section_t_field_names, py_lv_scale_section_t_methods); } -static PyMethodDef py_lv_line_methods[] = { - {"set_points", (PyCFunction)py_lv_line_set_points, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_points_mutable", (PyCFunction)py_lv_line_set_points_mutable, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_y_invert", (PyCFunction)py_lv_line_set_y_invert, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_points", (PyCFunction)py_lv_line_get_points, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_point_count", (PyCFunction)py_lv_line_get_point_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_point_array_mutable", (PyCFunction)py_lv_line_is_point_array_mutable, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_points_mutable", (PyCFunction)py_lv_line_get_points_mutable, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_y_invert", (PyCFunction)py_lv_line_get_y_invert, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_line_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.line", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_line_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_line_new, - .tp_methods = py_lv_line_methods, - .tp_call = (ternaryfunc)py_lv_line_call, +static PyMethodDef py_lv_scale_section_t_type_methods[] = { + {"__dir__", py_lv_scale_section_t_dir, METH_NOARGS, NULL}, + {NULL} }; -static py_lv_obj_type_t py_lv_line_mapping = { - .lv_obj_class = &lv_line_class, - .py_type = &py_lv_line_type, -}; +static int py_lv_scale_section_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_scale_section_t *data = (lv_scale_section_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_scale_section_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "main_style") == 0) { data->main_style = (void*)mp_write_ptr_lv_style_t(value); result = 0; } + if (strcmp(attr, "indicator_style") == 0) { data->indicator_style = (void*)mp_write_ptr_lv_style_t(value); result = 0; } + if (strcmp(attr, "items_style") == 0) { data->items_style = (void*)mp_write_ptr_lv_style_t(value); result = 0; } + if (strcmp(attr, "range_min") == 0) { data->range_min = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "range_max") == 0) { data->range_max = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "first_tick_idx_in_section") == 0) { data->first_tick_idx_in_section = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_tick_idx_in_section") == 0) { data->last_tick_idx_in_section = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "first_tick_in_section_width") == 0) { data->first_tick_in_section_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_tick_in_section_width") == 0) { data->last_tick_in_section_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "first_tick_in_section") == 0) { data->first_tick_in_section = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "last_tick_in_section") == 0) { data->last_tick_in_section = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "first_tick_idx_is_major") == 0) { data->first_tick_idx_is_major = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_tick_idx_is_major") == 0) { data->last_tick_idx_is_major = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_scale_section_t' object has no attribute '%s'", attr); + } + return result; +} +static PyObject *py_lv_scale_section_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_scale_section_t)); +} -/* - * lvgl extension definition for: - * lv_obj_t *lv_list_add_text(lv_obj_t *list, const char *txt) - */ -static PyObject *py_lv_list_add_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_scale_section_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *list = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_list_add_text)(list, txt); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_list_add_text_def = { - "lv_list_add_text", - (PyCFunction)py_lv_list_add_text, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_scale_section_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_scale_section_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_scale_section_t_dealloc, + .tp_getattro = (getter)py_lv_scale_section_t_getattro, + .tp_setattro = (setter)py_lv_scale_section_t_setattro, + .tp_new = py_lv_scale_section_t_new, + .tp_methods = py_lv_scale_section_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_obj_t *lv_list_add_button(lv_obj_t *list, const void *icon, const char *txt) - */ -static PyObject *py_lv_list_add_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_scale_section_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *icon_py; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "OO", &icon_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *list = mp_to_lv(self); - const void *icon = (const void *)mp_to_ptr(icon_py); - const char *txt = (const char *)(char*)convert_from_str(txt_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, const char *))lv_list_add_button)(list, icon, txt); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_scale_section_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_scale_section_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_scale_section_t*)self->data; } -static PyMethodDef py_lv_list_add_button_def = { - "lv_list_add_button", - (PyCFunction)py_lv_list_add_button, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_scale_section_t mp_write_scratch_lv_scale_section_t; +static inline void* mp_write_value_ptr_lv_scale_section_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_scale_section_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_scale_section_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_scale_section_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_scale_section_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_scale_section_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_scale_section_t or dict, got None"); + } + memset(&mp_write_scratch_lv_scale_section_t, 0, sizeof(lv_scale_section_t)); + return &mp_write_scratch_lv_scale_section_t; +} -/* - * lvgl extension definition for: - * const char *lv_list_get_button_text(lv_obj_t *list, lv_obj_t *btn) - */ -static PyObject *py_lv_list_get_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +#define mp_write_lv_scale_section_t(struct_obj) (*((lv_scale_section_t*)mp_write_value_ptr_lv_scale_section_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_scale_section_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *btn_py; - if (!PyArg_ParseTuple(py_args, "O", &btn_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *list = mp_to_lv(self); - lv_obj_t *btn = mp_to_lv(btn_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const char * _res; - lvpy_lock(); - _res = ((const char *(*)(lv_obj_t *, lv_obj_t *))lv_list_get_button_text)(list, btn); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return lv_to_mp_struct(&py_lv_scale_section_t_type, field); } -static PyMethodDef py_lv_list_get_button_text_def = { - "lv_list_get_button_text", - (PyCFunction)py_lv_list_get_button_text, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_scale_section_t(field) lv_to_mp_struct_own(&py_lv_scale_section_t_type, copy_buffer(&field, sizeof(lv_scale_section_t))) +#define mp_read_byref_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(&field) /* * lvgl extension definition for: - * void lv_list_set_button_text(lv_obj_t *list, lv_obj_t *btn, const char *txt) + * lv_scale_section_t *lv_scale_add_section(lv_obj_t *obj) */ -static PyObject *py_lv_list_set_button_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_add_section(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *btn_py; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "OO", &btn_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *list = mp_to_lv(self); - lv_obj_t *btn = mp_to_lv(btn_py); - const char *txt = (const char *)(char*)convert_from_str(txt_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_scale_section_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *, const char *))lv_list_set_button_text)(list, btn, txt); + _res = ((lv_scale_section_t *(*)(lv_obj_t *))lv_scale_add_section)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_scale_section_t((void*)_res); } -static PyMethodDef py_lv_list_set_button_text_def = { - "lv_list_set_button_text", - (PyCFunction)py_lv_list_set_button_text, +static PyMethodDef py_lv_scale_add_section_def = { + "lv_scale_add_section", + (PyCFunction)py_lv_scale_add_section, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44378,109 +56271,62 @@ static PyMethodDef py_lv_list_set_button_text_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_list_create(lv_obj_t *parent) + * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) */ -static PyObject *py_lv_list_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_section_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *section = mp_to_lv(self); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_list_create)(parent); + ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_scale_section_set_range)(section, min, max); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_list_create_def = { - "lv_list_create", - (PyCFunction)py_lv_list_create, +static PyMethodDef py_lv_scale_section_set_range_def = { + "lv_scale_section_set_range", + (PyCFunction)py_lv_scale_section_set_range, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl list object definitions (CPython) - */ -static PyObject *py_lv_list_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_list_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_list_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_list_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_list_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_list_methods[] = { - {"add_text", (PyCFunction)py_lv_list_add_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_button", (PyCFunction)py_lv_list_add_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_button_text", (PyCFunction)py_lv_list_get_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_button_text", (PyCFunction)py_lv_list_set_button_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_list_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.list", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_list_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_list_new, - .tp_methods = py_lv_list_methods, - .tp_call = (ternaryfunc)py_lv_list_call, -}; - -static py_lv_obj_type_t py_lv_list_mapping = { - .lv_obj_class = &lv_list_class, - .py_type = &py_lv_list_type, -}; - - /* * lvgl extension definition for: - * void lv_menu_set_page(lv_obj_t *obj, lv_obj_t *page) + * void lv_scale_set_section_range(lv_obj_t *scale, lv_scale_section_t *section, int32_t min, int32_t max) */ -static PyObject *py_lv_menu_set_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_section_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *page_py; - if (!PyArg_ParseTuple(py_args, "O", &page_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_obj_t *page = mp_to_lv(page_py); + PyObject *section_py; long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "Oll", §ion_py, &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scale = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_menu_set_page)(obj, page); + ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t, int32_t))lv_scale_set_section_range)(scale, section, min, max); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_set_page_def = { - "lv_menu_set_page", - (PyCFunction)py_lv_menu_set_page, +static PyMethodDef py_lv_scale_set_section_range_def = { + "lv_scale_set_section_range", + (PyCFunction)py_lv_scale_set_section_range, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44488,29 +56334,30 @@ static PyMethodDef py_lv_menu_set_page_def = { /* * lvgl extension definition for: - * void lv_menu_set_page_title(lv_obj_t *page, const char * const title) + * void lv_scale_set_section_min_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t min) */ -static PyObject *py_lv_menu_set_page_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_section_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *title_py; - if (!PyArg_ParseTuple(py_args, "O", &title_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *page = mp_to_lv(self); - const char * const title = (const char * const)(char*)convert_from_str(title_py); + PyObject *section_py; long min_val; + if (!PyArg_ParseTuple(py_args, "Ol", §ion_py, &min_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scale = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char * const))lv_menu_set_page_title)(page, title); + ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_scale_set_section_min_value)(scale, section, min); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_set_page_title_def = { - "lv_menu_set_page_title", - (PyCFunction)py_lv_menu_set_page_title, +static PyMethodDef py_lv_scale_set_section_min_value_def = { + "lv_scale_set_section_min_value", + (PyCFunction)py_lv_scale_set_section_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44518,29 +56365,30 @@ static PyMethodDef py_lv_menu_set_page_title_def = { /* * lvgl extension definition for: - * void lv_menu_set_page_title_static(lv_obj_t *page, const char * const title) + * void lv_scale_set_section_max_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t max) */ -static PyObject *py_lv_menu_set_page_title_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_section_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *title_py; - if (!PyArg_ParseTuple(py_args, "O", &title_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *page = mp_to_lv(self); - const char * const title = (const char * const)(char*)convert_from_str(title_py); + PyObject *section_py; long max_val; + if (!PyArg_ParseTuple(py_args, "Ol", §ion_py, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scale = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char * const))lv_menu_set_page_title_static)(page, title); + ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_scale_set_section_max_value)(scale, section, max); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_set_page_title_static_def = { - "lv_menu_set_page_title_static", - (PyCFunction)py_lv_menu_set_page_title_static, +static PyMethodDef py_lv_scale_set_section_max_value_def = { + "lv_scale_set_section_max_value", + (PyCFunction)py_lv_scale_set_section_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44548,29 +56396,30 @@ static PyMethodDef py_lv_menu_set_page_title_static_def = { /* * lvgl extension definition for: - * void lv_menu_set_sidebar_page(lv_obj_t *obj, lv_obj_t *page) + * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) */ -static PyObject *py_lv_menu_set_sidebar_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_section_set_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *page_py; - if (!PyArg_ParseTuple(py_args, "O", &page_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_obj_t *page = mp_to_lv(page_py); + PyObject *part_py; PyObject *section_part_style_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, §ion_part_style_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *section = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_t *section_part_style = mp_write_ptr_lv_style_t(section_part_style_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_menu_set_sidebar_page)(obj, page); + ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_scale_section_set_style)(section, part, section_part_style); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_set_sidebar_page_def = { - "lv_menu_set_sidebar_page", - (PyCFunction)py_lv_menu_set_sidebar_page, +static PyMethodDef py_lv_scale_section_set_style_def = { + "lv_scale_section_set_style", + (PyCFunction)py_lv_scale_section_set_style, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44578,29 +56427,30 @@ static PyMethodDef py_lv_menu_set_sidebar_page_def = { /* * lvgl extension definition for: - * void lv_menu_set_mode_header(lv_obj_t *obj, lv_menu_mode_header_t mode) + * void lv_scale_set_section_style_main(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) */ -static PyObject *py_lv_menu_set_mode_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_section_style_main(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_menu_mode_header_t mode = (int)mp_obj_get_int(mode_py); + PyObject *section_py; PyObject *style_py; + if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &style_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scale = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_menu_mode_header_t))lv_menu_set_mode_header)(obj, mode); + ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_scale_set_section_style_main)(scale, section, style); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_set_mode_header_def = { - "lv_menu_set_mode_header", - (PyCFunction)py_lv_menu_set_mode_header, +static PyMethodDef py_lv_scale_set_section_style_main_def = { + "lv_scale_set_section_style_main", + (PyCFunction)py_lv_scale_set_section_style_main, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44608,29 +56458,30 @@ static PyMethodDef py_lv_menu_set_mode_header_def = { /* * lvgl extension definition for: - * void lv_menu_set_mode_root_back_button(lv_obj_t *obj, lv_menu_mode_root_back_button_t mode) + * void lv_scale_set_section_style_indicator(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) */ -static PyObject *py_lv_menu_set_mode_root_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_section_style_indicator(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_menu_mode_root_back_button_t mode = (int)mp_obj_get_int(mode_py); + PyObject *section_py; PyObject *style_py; + if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &style_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scale = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_menu_mode_root_back_button_t))lv_menu_set_mode_root_back_button)(obj, mode); + ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_scale_set_section_style_indicator)(scale, section, style); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_set_mode_root_back_button_def = { - "lv_menu_set_mode_root_back_button", - (PyCFunction)py_lv_menu_set_mode_root_back_button, +static PyMethodDef py_lv_scale_set_section_style_indicator_def = { + "lv_scale_set_section_style_indicator", + (PyCFunction)py_lv_scale_set_section_style_indicator, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44638,30 +56489,30 @@ static PyMethodDef py_lv_menu_set_mode_root_back_button_def = { /* * lvgl extension definition for: - * void lv_menu_set_load_page_event(lv_obj_t *menu, lv_obj_t *obj, lv_obj_t *page) + * void lv_scale_set_section_style_items(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) */ -static PyObject *py_lv_menu_set_load_page_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_set_section_style_items(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *obj_py; PyObject *page_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &page_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *menu = mp_to_lv(self); - lv_obj_t *obj = mp_to_lv(obj_py); - lv_obj_t *page = mp_to_lv(page_py); + PyObject *section_py; PyObject *style_py; + if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &style_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scale = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *, lv_obj_t *))lv_menu_set_load_page_event)(menu, obj, page); + ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_scale_set_section_style_items)(scale, section, style); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_set_load_page_event_def = { - "lv_menu_set_load_page_event", - (PyCFunction)py_lv_menu_set_load_page_event, +static PyMethodDef py_lv_scale_set_section_style_items_def = { + "lv_scale_set_section_style_items", + (PyCFunction)py_lv_scale_set_section_style_items, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44669,9 +56520,9 @@ static PyMethodDef py_lv_menu_set_load_page_event_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_menu_get_cur_main_page(lv_obj_t *obj) + * lv_scale_mode_t lv_scale_get_mode(lv_obj_t *obj) */ -static PyObject *py_lv_menu_get_cur_main_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -44679,18 +56530,18 @@ static PyObject *py_lv_menu_get_cur_main_page(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_scale_mode_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_cur_main_page)(obj); + _res = ((lv_scale_mode_t (*)(lv_obj_t *))lv_scale_get_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_menu_get_cur_main_page_def = { - "lv_menu_get_cur_main_page", - (PyCFunction)py_lv_menu_get_cur_main_page, +static PyMethodDef py_lv_scale_get_mode_def = { + "lv_scale_get_mode", + (PyCFunction)py_lv_scale_get_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44698,9 +56549,9 @@ static PyMethodDef py_lv_menu_get_cur_main_page_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_menu_get_cur_sidebar_page(lv_obj_t *obj) + * int32_t lv_scale_get_total_tick_count(lv_obj_t *obj) */ -static PyObject *py_lv_menu_get_cur_sidebar_page(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_total_tick_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -44708,18 +56559,18 @@ static PyObject *py_lv_menu_get_cur_sidebar_page(PyObject *self, PyObject *py_ar lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_cur_sidebar_page)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_total_tick_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_menu_get_cur_sidebar_page_def = { - "lv_menu_get_cur_sidebar_page", - (PyCFunction)py_lv_menu_get_cur_sidebar_page, +static PyMethodDef py_lv_scale_get_total_tick_count_def = { + "lv_scale_get_total_tick_count", + (PyCFunction)py_lv_scale_get_total_tick_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44727,9 +56578,9 @@ static PyMethodDef py_lv_menu_get_cur_sidebar_page_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_menu_get_main_header(lv_obj_t *obj) + * int32_t lv_scale_get_major_tick_every(lv_obj_t *obj) */ -static PyObject *py_lv_menu_get_main_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_major_tick_every(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -44737,18 +56588,18 @@ static PyObject *py_lv_menu_get_main_header(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_main_header)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_major_tick_every)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_menu_get_main_header_def = { - "lv_menu_get_main_header", - (PyCFunction)py_lv_menu_get_main_header, +static PyMethodDef py_lv_scale_get_major_tick_every_def = { + "lv_scale_get_major_tick_every", + (PyCFunction)py_lv_scale_get_major_tick_every, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44756,9 +56607,9 @@ static PyMethodDef py_lv_menu_get_main_header_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_menu_get_main_header_back_button(lv_obj_t *obj) + * int32_t lv_scale_get_rotation(lv_obj_t *obj) */ -static PyObject *py_lv_menu_get_main_header_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -44766,18 +56617,18 @@ static PyObject *py_lv_menu_get_main_header_back_button(PyObject *self, PyObject lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_main_header_back_button)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_rotation)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_menu_get_main_header_back_button_def = { - "lv_menu_get_main_header_back_button", - (PyCFunction)py_lv_menu_get_main_header_back_button, +static PyMethodDef py_lv_scale_get_rotation_def = { + "lv_scale_get_rotation", + (PyCFunction)py_lv_scale_get_rotation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44785,9 +56636,9 @@ static PyMethodDef py_lv_menu_get_main_header_back_button_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_menu_get_sidebar_header(lv_obj_t *obj) + * bool lv_scale_get_label_show(lv_obj_t *obj) */ -static PyObject *py_lv_menu_get_sidebar_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_label_show(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -44795,18 +56646,18 @@ static PyObject *py_lv_menu_get_sidebar_header(PyObject *self, PyObject *py_args lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_sidebar_header)(obj); + _res = ((bool (*)(lv_obj_t *))lv_scale_get_label_show)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_menu_get_sidebar_header_def = { - "lv_menu_get_sidebar_header", - (PyCFunction)py_lv_menu_get_sidebar_header, +static PyMethodDef py_lv_scale_get_label_show_def = { + "lv_scale_get_label_show", + (PyCFunction)py_lv_scale_get_label_show, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44814,9 +56665,9 @@ static PyMethodDef py_lv_menu_get_sidebar_header_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_menu_get_sidebar_header_back_button(lv_obj_t *obj) + * uint32_t lv_scale_get_angle_range(lv_obj_t *obj) */ -static PyObject *py_lv_menu_get_sidebar_header_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_angle_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -44824,18 +56675,18 @@ static PyObject *py_lv_menu_get_sidebar_header_back_button(PyObject *self, PyObj lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_get_sidebar_header_back_button)(obj); + _res = ((uint32_t (*)(lv_obj_t *))lv_scale_get_angle_range)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_menu_get_sidebar_header_back_button_def = { - "lv_menu_get_sidebar_header_back_button", - (PyCFunction)py_lv_menu_get_sidebar_header_back_button, +static PyMethodDef py_lv_scale_get_angle_range_def = { + "lv_scale_get_angle_range", + (PyCFunction)py_lv_scale_get_angle_range, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44843,30 +56694,28 @@ static PyMethodDef py_lv_menu_get_sidebar_header_back_button_def = { /* * lvgl extension definition for: - * bool lv_menu_back_button_is_root(lv_obj_t *menu, lv_obj_t *obj) + * int32_t lv_scale_get_range_min_value(lv_obj_t *obj) */ -static PyObject *py_lv_menu_back_button_is_root(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_range_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *menu = mp_to_lv(self); - lv_obj_t *obj = mp_to_lv(obj_py); + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, lv_obj_t *))lv_menu_back_button_is_root)(menu, obj); + _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_range_min_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_menu_back_button_is_root_def = { - "lv_menu_back_button_is_root", - (PyCFunction)py_lv_menu_back_button_is_root, +static PyMethodDef py_lv_scale_get_range_min_value_def = { + "lv_scale_get_range_min_value", + (PyCFunction)py_lv_scale_get_range_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44874,9 +56723,9 @@ static PyMethodDef py_lv_menu_back_button_is_root_def = { /* * lvgl extension definition for: - * lv_menu_mode_header_t lv_menu_get_mode_header(lv_obj_t *obj) + * int32_t lv_scale_get_range_max_value(lv_obj_t *obj) */ -static PyObject *py_lv_menu_get_mode_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_get_range_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -44884,18 +56733,18 @@ static PyObject *py_lv_menu_get_mode_header(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_menu_mode_header_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_menu_mode_header_t (*)(lv_obj_t *))lv_menu_get_mode_header)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_range_max_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_menu_get_mode_header_def = { - "lv_menu_get_mode_header", - (PyCFunction)py_lv_menu_get_mode_header, +static PyMethodDef py_lv_scale_get_range_max_value_def = { + "lv_scale_get_range_max_value", + (PyCFunction)py_lv_scale_get_range_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44903,28 +56752,31 @@ static PyMethodDef py_lv_menu_get_mode_header_def = { /* * lvgl extension definition for: - * lv_menu_mode_root_back_button_t lv_menu_get_mode_root_back_button(lv_obj_t *obj) + * lv_observer_t *lv_scale_bind_section_min_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) */ -static PyObject *py_lv_menu_get_mode_root_back_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_bind_section_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *section_py; PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &subject_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_menu_mode_root_back_button_t _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((lv_menu_mode_root_back_button_t (*)(lv_obj_t *))lv_menu_get_mode_root_back_button)(obj); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_scale_bind_section_min_value)(obj, section, subject); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_menu_get_mode_root_back_button_def = { - "lv_menu_get_mode_root_back_button", - (PyCFunction)py_lv_menu_get_mode_root_back_button, +static PyMethodDef py_lv_scale_bind_section_min_value_def = { + "lv_scale_bind_section_min_value", + (PyCFunction)py_lv_scale_bind_section_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44932,27 +56784,31 @@ static PyMethodDef py_lv_menu_get_mode_root_back_button_def = { /* * lvgl extension definition for: - * void lv_menu_clear_history(lv_obj_t *obj) + * lv_observer_t *lv_scale_bind_section_max_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) */ -static PyObject *py_lv_menu_clear_history(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_bind_section_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *section_py; PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &subject_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_observer_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_menu_clear_history)(obj); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_scale_bind_section_max_value)(obj, section, subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_menu_clear_history_def = { - "lv_menu_clear_history", - (PyCFunction)py_lv_menu_clear_history, +static PyMethodDef py_lv_scale_bind_section_max_value_def = { + "lv_scale_bind_section_max_value", + (PyCFunction)py_lv_scale_bind_section_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -44960,432 +56816,358 @@ static PyMethodDef py_lv_menu_clear_history_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_menu_create(lv_obj_t *parent) + * lv_observer_t *lv_scale_bind_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, lv_subject_t *subject) */ -static PyObject *py_lv_menu_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_bind_line_needle_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + PyObject *needle_line_py; long needle_length_val; PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "OlO", &needle_line_py, &needle_length_val, &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *needle_line = mp_to_lv(needle_line_py); + int32_t needle_length = (int32_t)needle_length_val; + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_create)(parent); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_obj_t *, int32_t, lv_subject_t *))lv_scale_bind_line_needle_value)(obj, needle_line, needle_length, subject); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_menu_create_def = { - "lv_menu_create", - (PyCFunction)py_lv_menu_create, +static PyMethodDef py_lv_scale_bind_line_needle_value_def = { + "lv_scale_bind_line_needle_value", + (PyCFunction)py_lv_scale_bind_line_needle_value, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl menu object definitions (CPython) + * lvgl extension definition for: + * lv_observer_t *lv_scale_bind_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, lv_subject_t *subject) */ -static PyObject *py_lv_menu_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_menu_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_menu_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_menu_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_menu_dealloc(py_lv_obj_t *self) +static PyObject *py_lv_scale_bind_image_needle_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - lvpy_dealloc_obj(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *needle_img_py; PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "OO", &needle_img_py, &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *needle_img = mp_to_lv(needle_img_py); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_obj_t *, lv_subject_t *))lv_scale_bind_image_needle_value)(obj, needle_img, subject); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_menu_methods[] = { - {"set_page", (PyCFunction)py_lv_menu_set_page, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_page_title", (PyCFunction)py_lv_menu_set_page_title, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_page_title_static", (PyCFunction)py_lv_menu_set_page_title_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_sidebar_page", (PyCFunction)py_lv_menu_set_sidebar_page, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode_header", (PyCFunction)py_lv_menu_set_mode_header, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode_root_back_button", (PyCFunction)py_lv_menu_set_mode_root_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_load_page_event", (PyCFunction)py_lv_menu_set_load_page_event, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cur_main_page", (PyCFunction)py_lv_menu_get_cur_main_page, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cur_sidebar_page", (PyCFunction)py_lv_menu_get_cur_sidebar_page, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_main_header", (PyCFunction)py_lv_menu_get_main_header, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_main_header_back_button", (PyCFunction)py_lv_menu_get_main_header_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_sidebar_header", (PyCFunction)py_lv_menu_get_sidebar_header, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_sidebar_header_back_button", (PyCFunction)py_lv_menu_get_sidebar_header_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"back_button_is_root", (PyCFunction)py_lv_menu_back_button_is_root, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode_header", (PyCFunction)py_lv_menu_get_mode_header, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode_root_back_button", (PyCFunction)py_lv_menu_get_mode_root_back_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_history", (PyCFunction)py_lv_menu_clear_history, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_menu_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.menu", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_menu_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_menu_new, - .tp_methods = py_lv_menu_methods, - .tp_call = (ternaryfunc)py_lv_menu_call, -}; - -static py_lv_obj_type_t py_lv_menu_mapping = { - .lv_obj_class = &lv_menu_class, - .py_type = &py_lv_menu_type, +static PyMethodDef py_lv_scale_bind_image_needle_value_def = { + "lv_scale_bind_image_needle_value", + (PyCFunction)py_lv_scale_bind_image_needle_value, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * lv_obj_t *lv_menu_page_create(lv_obj_t *menu, const char * const title) + * lv_obj_t *lv_scale_create(lv_obj_t *parent) */ -static PyObject *py_lv_menu_page_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *parent_py; PyObject *title_py; - if (!PyArg_ParseTuple(py_args, "|OO", &parent_py, &title_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *menu = NULL; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; if (parent_py && parent_py != Py_None) { - menu = mp_to_lv(parent_py); - if (!menu) {{ PyGILState_Release(gstate); return NULL; }} + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} } - const char * const title = (const char * const)(char*)convert_from_str(title_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const char * const))lv_menu_page_create)(menu, title); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_scale_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_menu_page_create_def = { - "lv_menu_page_create", - (PyCFunction)py_lv_menu_page_create, +static PyMethodDef py_lv_scale_create_def = { + "lv_scale_create", + (PyCFunction)py_lv_scale_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl menu_page object definitions (CPython) + * lvgl scale object definitions (CPython) */ -static PyObject *py_lv_menu_page_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_menu_page_create(type, py_args, py_kwds); + return py_lv_scale_create(type, py_args, py_kwds); } -static PyObject *py_lv_menu_page_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_menu_page_create((PyObject *)type, py_args, py_kwds); + return py_lv_scale_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_menu_page_dealloc(py_lv_obj_t *self) +static void py_lv_scale_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_menu_page_methods[] = { - +static PyMethodDef py_lv_scale_methods[] = { + {"set_mode", (PyCFunction)py_lv_scale_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_total_tick_count", (PyCFunction)py_lv_scale_set_total_tick_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_major_tick_every", (PyCFunction)py_lv_scale_set_major_tick_every, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_label_show", (PyCFunction)py_lv_scale_set_label_show, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_range", (PyCFunction)py_lv_scale_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_value", (PyCFunction)py_lv_scale_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_value", (PyCFunction)py_lv_scale_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_angle_range", (PyCFunction)py_lv_scale_set_angle_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rotation", (PyCFunction)py_lv_scale_set_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_line_needle_value", (PyCFunction)py_lv_scale_set_line_needle_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_image_needle_value", (PyCFunction)py_lv_scale_set_image_needle_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_src", (PyCFunction)py_lv_scale_set_text_src, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_post_draw", (PyCFunction)py_lv_scale_set_post_draw, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_draw_ticks_on_top", (PyCFunction)py_lv_scale_set_draw_ticks_on_top, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_section", (PyCFunction)py_lv_scale_add_section, METH_VARARGS | METH_KEYWORDS, NULL}, + {"section_set_range", (PyCFunction)py_lv_scale_section_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_section_range", (PyCFunction)py_lv_scale_set_section_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_section_min_value", (PyCFunction)py_lv_scale_set_section_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_section_max_value", (PyCFunction)py_lv_scale_set_section_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"section_set_style", (PyCFunction)py_lv_scale_section_set_style, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_section_style_main", (PyCFunction)py_lv_scale_set_section_style_main, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_section_style_indicator", (PyCFunction)py_lv_scale_set_section_style_indicator, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_section_style_items", (PyCFunction)py_lv_scale_set_section_style_items, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode", (PyCFunction)py_lv_scale_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_total_tick_count", (PyCFunction)py_lv_scale_get_total_tick_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_major_tick_every", (PyCFunction)py_lv_scale_get_major_tick_every, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rotation", (PyCFunction)py_lv_scale_get_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_label_show", (PyCFunction)py_lv_scale_get_label_show, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_angle_range", (PyCFunction)py_lv_scale_get_angle_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_range_min_value", (PyCFunction)py_lv_scale_get_range_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_range_max_value", (PyCFunction)py_lv_scale_get_range_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_section_min_value", (PyCFunction)py_lv_scale_bind_section_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_section_max_value", (PyCFunction)py_lv_scale_bind_section_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_line_needle_value", (PyCFunction)py_lv_scale_bind_line_needle_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_image_needle_value", (PyCFunction)py_lv_scale_bind_image_needle_value, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_menu_page_type = { +PyTypeObject py_lv_scale_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.menu_page", + .tp_name = "lvgl.scale", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_menu_page_dealloc, + .tp_dealloc = (destructor)py_lv_scale_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_menu_page_new, - .tp_methods = py_lv_menu_page_methods, - .tp_call = (ternaryfunc)py_lv_menu_page_call, + .tp_new = (newfunc)py_lv_scale_new, + .tp_methods = py_lv_scale_methods, + .tp_call = (ternaryfunc)py_lv_scale_call, }; -static py_lv_obj_type_t py_lv_menu_page_mapping = { - .lv_obj_class = &lv_menu_page_class, - .py_type = &py_lv_menu_page_type, +static py_lv_obj_type_t py_lv_scale_mapping = { + .lv_obj_class = &lv_scale_class, + .py_type = &py_lv_scale_type, }; /* * lvgl extension definition for: - * lv_obj_t *lv_menu_cont_create(lv_obj_t *parent) + * void lv_slider_set_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim) */ -static PyObject *py_lv_menu_cont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + long value_val; PyObject *anim_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_cont_create)(parent); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_slider_set_value)(obj, value, anim); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} - -static PyMethodDef py_lv_menu_cont_create_def = { - "lv_menu_cont_create", - (PyCFunction)py_lv_menu_cont_create, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl menu_cont object definitions (CPython) - */ -static PyObject *py_lv_menu_cont_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_menu_cont_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_menu_cont_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_menu_cont_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_menu_cont_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); + Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_cont_methods[] = { - - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_menu_cont_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.menu_cont", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_menu_cont_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_menu_cont_new, - .tp_methods = py_lv_menu_cont_methods, - .tp_call = (ternaryfunc)py_lv_menu_cont_call, -}; - -static py_lv_obj_type_t py_lv_menu_cont_mapping = { - .lv_obj_class = &lv_menu_cont_class, - .py_type = &py_lv_menu_cont_type, +static PyMethodDef py_lv_slider_set_value_def = { + "lv_slider_set_value", + (PyCFunction)py_lv_slider_set_value, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * lv_obj_t *lv_menu_section_create(lv_obj_t *parent) + * void lv_slider_set_start_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim) */ -static PyObject *py_lv_menu_section_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_set_start_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + long value_val; PyObject *anim_py; + if (!PyArg_ParseTuple(py_args, "lO", &value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t value = (int32_t)value_val; + lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_section_create)(parent); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_slider_set_start_value)(obj, value, anim); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_section_create_def = { - "lv_menu_section_create", - (PyCFunction)py_lv_menu_section_create, +static PyMethodDef py_lv_slider_set_start_value_def = { + "lv_slider_set_start_value", + (PyCFunction)py_lv_slider_set_start_value, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl menu_section object definitions (CPython) + * lvgl extension definition for: + * void lv_slider_set_range(lv_obj_t *obj, int32_t min, int32_t max) */ -static PyObject *py_lv_menu_section_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_menu_section_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_menu_section_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_menu_section_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_menu_section_dealloc(py_lv_obj_t *self) +static PyObject *py_lv_slider_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - lvpy_dealloc_obj(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_slider_set_range)(obj, min, max); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_section_methods[] = { - - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_menu_section_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.menu_section", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_menu_section_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_menu_section_new, - .tp_methods = py_lv_menu_section_methods, - .tp_call = (ternaryfunc)py_lv_menu_section_call, -}; - -static py_lv_obj_type_t py_lv_menu_section_mapping = { - .lv_obj_class = &lv_menu_section_class, - .py_type = &py_lv_menu_section_type, +static PyMethodDef py_lv_slider_set_range_def = { + "lv_slider_set_range", + (PyCFunction)py_lv_slider_set_range, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * lv_obj_t *lv_menu_separator_create(lv_obj_t *parent) + * void lv_slider_set_min_value(lv_obj_t *obj, int32_t min) */ -static PyObject *py_lv_menu_separator_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + long min_val; + if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_menu_separator_create)(parent); + ((void (*)(lv_obj_t *, int32_t))lv_slider_set_min_value)(obj, min); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_separator_create_def = { - "lv_menu_separator_create", - (PyCFunction)py_lv_menu_separator_create, +static PyMethodDef py_lv_slider_set_min_value_def = { + "lv_slider_set_min_value", + (PyCFunction)py_lv_slider_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl menu_separator object definitions (CPython) + * lvgl extension definition for: + * void lv_slider_set_max_value(lv_obj_t *obj, int32_t max) */ -static PyObject *py_lv_menu_separator_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_menu_separator_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_menu_separator_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_menu_separator_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_menu_separator_dealloc(py_lv_obj_t *self) +static PyObject *py_lv_slider_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - lvpy_dealloc_obj(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long max_val; + if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t max = (int32_t)max_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_slider_set_max_value)(obj, max); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_menu_separator_methods[] = { - - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_menu_separator_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.menu_separator", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_menu_separator_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_menu_separator_new, - .tp_methods = py_lv_menu_separator_methods, - .tp_call = (ternaryfunc)py_lv_menu_separator_call, -}; - -static py_lv_obj_type_t py_lv_menu_separator_mapping = { - .lv_obj_class = &lv_menu_separator_class, - .py_type = &py_lv_menu_separator_type, +static PyMethodDef py_lv_slider_set_max_value_def = { + "lv_slider_set_max_value", + (PyCFunction)py_lv_slider_set_max_value, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_add_title(lv_obj_t *obj, const char *title) + * void lv_slider_set_mode(lv_obj_t *obj, lv_slider_mode_t mode) */ -static PyObject *py_lv_msgbox_add_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *title_py; - if (!PyArg_ParseTuple(py_args, "O", &title_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *title = (const char *)(char*)convert_from_str(title_py); + lv_slider_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_msgbox_add_title)(obj, title); + ((void (*)(lv_obj_t *, lv_slider_mode_t))lv_slider_set_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_msgbox_add_title_def = { - "lv_msgbox_add_title", - (PyCFunction)py_lv_msgbox_add_title, +static PyMethodDef py_lv_slider_set_mode_def = { + "lv_slider_set_mode", + (PyCFunction)py_lv_slider_set_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45393,30 +57175,29 @@ static PyMethodDef py_lv_msgbox_add_title_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_add_header_button(lv_obj_t *obj, const void *icon) + * void lv_slider_set_orientation(lv_obj_t *obj, lv_slider_orientation_t orientation) */ -static PyObject *py_lv_msgbox_add_header_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_set_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *icon_py; - if (!PyArg_ParseTuple(py_args, "O", &icon_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *orientation_py; + if (!PyArg_ParseTuple(py_args, "O", &orientation_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const void *icon = (const void *)mp_to_ptr(icon_py); + lv_slider_orientation_t orientation = (int)mp_obj_get_int(orientation_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const void *))lv_msgbox_add_header_button)(obj, icon); + ((void (*)(lv_obj_t *, lv_slider_orientation_t))lv_slider_set_orientation)(obj, orientation); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_msgbox_add_header_button_def = { - "lv_msgbox_add_header_button", - (PyCFunction)py_lv_msgbox_add_header_button, +static PyMethodDef py_lv_slider_set_orientation_def = { + "lv_slider_set_orientation", + (PyCFunction)py_lv_slider_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45424,30 +57205,28 @@ static PyMethodDef py_lv_msgbox_add_header_button_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_add_text(lv_obj_t *obj, const char *text) + * int32_t lv_slider_get_value(const lv_obj_t *obj) */ -static PyObject *py_lv_msgbox_add_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_msgbox_add_text)(obj, text); + _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_msgbox_add_text_def = { - "lv_msgbox_add_text", - (PyCFunction)py_lv_msgbox_add_text, +static PyMethodDef py_lv_slider_get_value_def = { + "lv_slider_get_value", + (PyCFunction)py_lv_slider_get_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45455,30 +57234,28 @@ static PyMethodDef py_lv_msgbox_add_text_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_add_footer_button(lv_obj_t *obj, const char *text) + * int32_t lv_slider_get_left_value(const lv_obj_t *obj) */ -static PyObject *py_lv_msgbox_add_footer_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_get_left_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_msgbox_add_footer_button)(obj, text); + _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_left_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_msgbox_add_footer_button_def = { - "lv_msgbox_add_footer_button", - (PyCFunction)py_lv_msgbox_add_footer_button, +static PyMethodDef py_lv_slider_get_left_value_def = { + "lv_slider_get_left_value", + (PyCFunction)py_lv_slider_get_left_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45486,9 +57263,9 @@ static PyMethodDef py_lv_msgbox_add_footer_button_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_add_close_button(lv_obj_t *obj) + * int32_t lv_slider_get_min_value(const lv_obj_t *obj) */ -static PyObject *py_lv_msgbox_add_close_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -45496,18 +57273,18 @@ static PyObject *py_lv_msgbox_add_close_button(PyObject *self, PyObject *py_args lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_add_close_button)(obj); + _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_min_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_msgbox_add_close_button_def = { - "lv_msgbox_add_close_button", - (PyCFunction)py_lv_msgbox_add_close_button, +static PyMethodDef py_lv_slider_get_min_value_def = { + "lv_slider_get_min_value", + (PyCFunction)py_lv_slider_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45515,9 +57292,9 @@ static PyMethodDef py_lv_msgbox_add_close_button_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_get_header(lv_obj_t *obj) + * int32_t lv_slider_get_max_value(const lv_obj_t *obj) */ -static PyObject *py_lv_msgbox_get_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -45525,18 +57302,18 @@ static PyObject *py_lv_msgbox_get_header(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_header)(obj); + _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_max_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_msgbox_get_header_def = { - "lv_msgbox_get_header", - (PyCFunction)py_lv_msgbox_get_header, +static PyMethodDef py_lv_slider_get_max_value_def = { + "lv_slider_get_max_value", + (PyCFunction)py_lv_slider_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45544,9 +57321,9 @@ static PyMethodDef py_lv_msgbox_get_header_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_get_footer(lv_obj_t *obj) + * bool lv_slider_is_dragged(const lv_obj_t *obj) */ -static PyObject *py_lv_msgbox_get_footer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_is_dragged(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -45554,18 +57331,18 @@ static PyObject *py_lv_msgbox_get_footer(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_footer)(obj); + _res = ((bool (*)(const lv_obj_t *))lv_slider_is_dragged)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_msgbox_get_footer_def = { - "lv_msgbox_get_footer", - (PyCFunction)py_lv_msgbox_get_footer, +static PyMethodDef py_lv_slider_is_dragged_def = { + "lv_slider_is_dragged", + (PyCFunction)py_lv_slider_is_dragged, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45573,28 +57350,28 @@ static PyMethodDef py_lv_msgbox_get_footer_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_get_content(lv_obj_t *obj) + * lv_slider_mode_t lv_slider_get_mode(lv_obj_t *slider) */ -static PyObject *py_lv_msgbox_get_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *slider = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_slider_mode_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_content)(obj); + _res = ((lv_slider_mode_t (*)(lv_obj_t *))lv_slider_get_mode)(slider); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_msgbox_get_content_def = { - "lv_msgbox_get_content", - (PyCFunction)py_lv_msgbox_get_content, +static PyMethodDef py_lv_slider_get_mode_def = { + "lv_slider_get_mode", + (PyCFunction)py_lv_slider_get_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45602,9 +57379,9 @@ static PyMethodDef py_lv_msgbox_get_content_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_get_title(lv_obj_t *obj) + * lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t *obj) */ -static PyObject *py_lv_msgbox_get_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_get_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -45612,18 +57389,18 @@ static PyObject *py_lv_msgbox_get_title(PyObject *self, PyObject *py_args, PyObj lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_slider_orientation_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_get_title)(obj); + _res = ((lv_slider_orientation_t (*)(lv_obj_t *))lv_slider_get_orientation)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_msgbox_get_title_def = { - "lv_msgbox_get_title", - (PyCFunction)py_lv_msgbox_get_title, +static PyMethodDef py_lv_slider_get_orientation_def = { + "lv_slider_get_orientation", + (PyCFunction)py_lv_slider_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45631,27 +57408,28 @@ static PyMethodDef py_lv_msgbox_get_title_def = { /* * lvgl extension definition for: - * void lv_msgbox_close(lv_obj_t *mbox) + * bool lv_slider_is_symmetrical(lv_obj_t *obj) */ -static PyObject *py_lv_msgbox_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_is_symmetrical(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *mbox = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_msgbox_close)(mbox); + _res = ((bool (*)(lv_obj_t *))lv_slider_is_symmetrical)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_msgbox_close_def = { - "lv_msgbox_close", - (PyCFunction)py_lv_msgbox_close, +static PyMethodDef py_lv_slider_is_symmetrical_def = { + "lv_slider_is_symmetrical", + (PyCFunction)py_lv_slider_is_symmetrical, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45659,27 +57437,30 @@ static PyMethodDef py_lv_msgbox_close_def = { /* * lvgl extension definition for: - * void lv_msgbox_close_async(lv_obj_t *mbox) + * lv_observer_t *lv_slider_bind_value(lv_obj_t *obj, lv_subject_t *subject) */ -static PyObject *py_lv_msgbox_close_async(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *mbox = mp_to_lv(self); + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_observer_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_msgbox_close_async)(mbox); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_slider_bind_value)(obj, subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_msgbox_close_async_def = { - "lv_msgbox_close_async", - (PyCFunction)py_lv_msgbox_close_async, +static PyMethodDef py_lv_slider_bind_value_def = { + "lv_slider_bind_value", + (PyCFunction)py_lv_slider_bind_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45687,9 +57468,9 @@ static PyMethodDef py_lv_msgbox_close_async_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_msgbox_create(lv_obj_t *parent) + * lv_obj_t *lv_slider_create(lv_obj_t *parent) */ -static PyObject *py_lv_msgbox_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -45705,202 +57486,222 @@ static PyObject *py_lv_msgbox_create(PyObject *self, PyObject *py_args, PyObject lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_msgbox_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_slider_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_msgbox_create_def = { - "lv_msgbox_create", - (PyCFunction)py_lv_msgbox_create, +static PyMethodDef py_lv_slider_create_def = { + "lv_slider_create", + (PyCFunction)py_lv_slider_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl msgbox object definitions (CPython) + * lvgl slider object definitions (CPython) */ -static PyObject *py_lv_msgbox_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_msgbox_create(type, py_args, py_kwds); + return py_lv_slider_create(type, py_args, py_kwds); } -static PyObject *py_lv_msgbox_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_slider_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_msgbox_create((PyObject *)type, py_args, py_kwds); + return py_lv_slider_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_msgbox_dealloc(py_lv_obj_t *self) +static void py_lv_slider_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_msgbox_methods[] = { - {"add_title", (PyCFunction)py_lv_msgbox_add_title, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_header_button", (PyCFunction)py_lv_msgbox_add_header_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_text", (PyCFunction)py_lv_msgbox_add_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_footer_button", (PyCFunction)py_lv_msgbox_add_footer_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_close_button", (PyCFunction)py_lv_msgbox_add_close_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_header", (PyCFunction)py_lv_msgbox_get_header, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_footer", (PyCFunction)py_lv_msgbox_get_footer, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_content", (PyCFunction)py_lv_msgbox_get_content, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_title", (PyCFunction)py_lv_msgbox_get_title, METH_VARARGS | METH_KEYWORDS, NULL}, - {"close", (PyCFunction)py_lv_msgbox_close, METH_VARARGS | METH_KEYWORDS, NULL}, - {"close_async", (PyCFunction)py_lv_msgbox_close_async, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_slider_methods[] = { + {"set_value", (PyCFunction)py_lv_slider_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_start_value", (PyCFunction)py_lv_slider_set_start_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_range", (PyCFunction)py_lv_slider_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_value", (PyCFunction)py_lv_slider_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_value", (PyCFunction)py_lv_slider_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode", (PyCFunction)py_lv_slider_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_orientation", (PyCFunction)py_lv_slider_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_value", (PyCFunction)py_lv_slider_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_left_value", (PyCFunction)py_lv_slider_get_left_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_min_value", (PyCFunction)py_lv_slider_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_value", (PyCFunction)py_lv_slider_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_dragged", (PyCFunction)py_lv_slider_is_dragged, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode", (PyCFunction)py_lv_slider_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_orientation", (PyCFunction)py_lv_slider_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_symmetrical", (PyCFunction)py_lv_slider_is_symmetrical, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_value", (PyCFunction)py_lv_slider_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_msgbox_type = { +PyTypeObject py_lv_slider_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.msgbox", + .tp_name = "lvgl.slider", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_msgbox_dealloc, + .tp_dealloc = (destructor)py_lv_slider_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_msgbox_new, - .tp_methods = py_lv_msgbox_methods, - .tp_call = (ternaryfunc)py_lv_msgbox_call, + .tp_new = (newfunc)py_lv_slider_new, + .tp_methods = py_lv_slider_methods, + .tp_call = (ternaryfunc)py_lv_slider_call, }; -static py_lv_obj_type_t py_lv_msgbox_mapping = { - .lv_obj_class = &lv_msgbox_class, - .py_type = &py_lv_msgbox_type, +static py_lv_obj_type_t py_lv_slider_mapping = { + .lv_obj_class = &lv_slider_class, + .py_type = &py_lv_slider_type, +}; + + +/* + * Struct lv_span_t (CPython) + */ + +extern PyMethodDef py_lv_span_t_methods[]; + +static PyObject *py_lv_span_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_span_t *data = (lv_span_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "txt") == 0) return convert_to_str((void*)data->txt); + if (strcmp(attr, "style") == 0) return mp_read_byref_lv_style_t(data->style); + if (strcmp(attr, "static_flag") == 0) return mp_obj_new_int_from_uint(data->static_flag); + if (strcmp(attr, "trailing_pos") == 0) return mp_read_byref_lv_point_t(data->trailing_pos); + if (strcmp(attr, "trailing_height") == 0) return mp_obj_new_int(data->trailing_height); + for (PyMethodDef *m = py_lv_span_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_span_t_field_names[] = {"txt", "style", "static_flag", "trailing_pos", "trailing_height", NULL}; + +static PyObject *py_lv_span_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_span_t_field_names, py_lv_span_t_methods); +} + +static PyMethodDef py_lv_span_t_type_methods[] = { + {"__dir__", py_lv_span_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_span_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_span_t *data = (lv_span_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_span_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "txt") == 0) { data->txt = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "style") == 0) { data->style = mp_write_lv_style_t(value); result = 0; } + if (strcmp(attr, "static_flag") == 0) { data->static_flag = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "trailing_pos") == 0) { data->trailing_pos = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "trailing_height") == 0) { data->trailing_height = (int32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_span_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_span_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_span_t)); +} -/* - * lvgl extension definition for: - * void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode) - */ -static PyObject *py_lv_roller_set_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_span_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *options_py; PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "OO", &options_py, &mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *options = (const char *)(char*)convert_from_str(options_py); - lv_roller_mode_t mode = (int)mp_obj_get_int(mode_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const char *, lv_roller_mode_t))lv_roller_set_options)(obj, options, mode); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_roller_set_options_def = { - "lv_roller_set_options", - (PyCFunction)py_lv_roller_set_options, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_span_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_span_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_span_t_dealloc, + .tp_getattro = (getter)py_lv_span_t_getattro, + .tp_setattro = (setter)py_lv_span_t_setattro, + .tp_new = py_lv_span_t_new, + .tp_methods = py_lv_span_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim) - */ -static PyObject *py_lv_roller_set_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_span_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long sel_opt_val; PyObject *anim_py; - if (!PyArg_ParseTuple(py_args, "lO", &sel_opt_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t sel_opt = (uint32_t)sel_opt_val; - lv_anim_enable_t anim = mp_obj_is_true(anim_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_roller_set_selected)(obj, sel_opt, anim); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_span_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_span_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_span_t*)self->data; } -static PyMethodDef py_lv_roller_set_selected_def = { - "lv_roller_set_selected", - (PyCFunction)py_lv_roller_set_selected, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_span_t mp_write_scratch_lv_span_t; -/* - * lvgl extension definition for: - * bool lv_roller_set_selected_str(lv_obj_t *obj, const char *sel_opt, lv_anim_enable_t anim) - */ -static PyObject *py_lv_roller_set_selected_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_span_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *sel_opt_py; PyObject *anim_py; - if (!PyArg_ParseTuple(py_args, "OO", &sel_opt_py, &anim_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *sel_opt = (const char *)(char*)convert_from_str(sel_opt_py); - lv_anim_enable_t anim = mp_obj_is_true(anim_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, const char *, lv_anim_enable_t))lv_roller_set_selected_str)(obj, sel_opt, anim); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_span_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_span_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_span_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_span_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_span_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_span_t or dict, got None"); + } + memset(&mp_write_scratch_lv_span_t, 0, sizeof(lv_span_t)); + return &mp_write_scratch_lv_span_t; } -static PyMethodDef py_lv_roller_set_selected_str_def = { - "lv_roller_set_selected_str", - (PyCFunction)py_lv_roller_set_selected_str, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_span_t(struct_obj) (*((lv_span_t*)mp_write_value_ptr_lv_span_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_roller_set_visible_row_count(lv_obj_t *obj, uint32_t row_cnt) - */ -static PyObject *py_lv_roller_set_visible_row_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_span_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &row_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t row_cnt = (uint32_t)row_cnt_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_roller_set_visible_row_count)(obj, row_cnt); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_span_t_type, field); } -static PyMethodDef py_lv_roller_set_visible_row_count_def = { - "lv_roller_set_visible_row_count", - (PyCFunction)py_lv_roller_set_visible_row_count, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_span_t(field) lv_to_mp_struct_own(&py_lv_span_t_type, copy_buffer(&field, sizeof(lv_span_t))) +#define mp_read_byref_lv_span_t(field) mp_read_ptr_lv_span_t(&field) /* * lvgl extension definition for: - * uint32_t lv_roller_get_selected(const lv_obj_t *obj) + * lv_span_t *lv_spangroup_add_span(lv_obj_t *obj) */ -static PyObject *py_lv_roller_get_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_add_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -45908,18 +57709,18 @@ static PyObject *py_lv_roller_get_selected(PyObject *self, PyObject *py_args, Py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_span_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_roller_get_selected)(obj); + _res = ((lv_span_t *(*)(lv_obj_t *))lv_spangroup_add_span)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_span_t((void*)_res); } -static PyMethodDef py_lv_roller_get_selected_def = { - "lv_roller_get_selected", - (PyCFunction)py_lv_roller_get_selected, +static PyMethodDef py_lv_spangroup_add_span_def = { + "lv_spangroup_add_span", + (PyCFunction)py_lv_spangroup_add_span, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45927,30 +57728,29 @@ static PyMethodDef py_lv_roller_get_selected_def = { /* * lvgl extension definition for: - * void lv_roller_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size) + * void lv_spangroup_delete_span(lv_obj_t *obj, lv_span_t *span) */ -static PyObject *py_lv_roller_get_selected_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_delete_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; long buf_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *span_py; + if (!PyArg_ParseTuple(py_args, "O", &span_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - char *buf = (char*)convert_from_str(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; + lv_span_t *span = mp_write_ptr_lv_span_t(span_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_obj_t *, char *, uint32_t))lv_roller_get_selected_str)(obj, buf, buf_size); + ((void (*)(lv_obj_t *, lv_span_t *))lv_spangroup_delete_span)(obj, span); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_roller_get_selected_str_def = { - "lv_roller_get_selected_str", - (PyCFunction)py_lv_roller_get_selected_str, +static PyMethodDef py_lv_spangroup_delete_span_def = { + "lv_spangroup_delete_span", + (PyCFunction)py_lv_spangroup_delete_span, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45958,28 +57758,30 @@ static PyMethodDef py_lv_roller_get_selected_str_def = { /* * lvgl extension definition for: - * const char *lv_roller_get_options(const lv_obj_t *obj) + * void lv_spangroup_set_span_text(lv_obj_t *obj, lv_span_t *span, const char *text) */ -static PyObject *py_lv_roller_get_options(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_span_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *span_py; PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "OO", &span_py, &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_span_t *span = mp_write_ptr_lv_span_t(span_py); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; lvpy_lock(); - _res = ((const char *(*)(const lv_obj_t *))lv_roller_get_options)(obj); + ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_spangroup_set_span_text)(obj, span, text); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_roller_get_options_def = { - "lv_roller_get_options", - (PyCFunction)py_lv_roller_get_options, +static PyMethodDef py_lv_spangroup_set_span_text_def = { + "lv_spangroup_set_span_text", + (PyCFunction)py_lv_spangroup_set_span_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -45987,28 +57789,30 @@ static PyMethodDef py_lv_roller_get_options_def = { /* * lvgl extension definition for: - * uint32_t lv_roller_get_option_count(const lv_obj_t *obj) + * void lv_spangroup_set_span_text_static(lv_obj_t *obj, lv_span_t *span, const char *text) */ -static PyObject *py_lv_roller_get_option_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_span_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *span_py; PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "OO", &span_py, &text_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_span_t *span = mp_write_ptr_lv_span_t(span_py); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_roller_get_option_count)(obj); + ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_spangroup_set_span_text_static)(obj, span, text); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_roller_get_option_count_def = { - "lv_roller_get_option_count", - (PyCFunction)py_lv_roller_get_option_count, +static PyMethodDef py_lv_spangroup_set_span_text_static_def = { + "lv_spangroup_set_span_text_static", + (PyCFunction)py_lv_spangroup_set_span_text_static, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46016,32 +57820,30 @@ static PyMethodDef py_lv_roller_get_option_count_def = { /* * lvgl extension definition for: - * lv_result_t lv_roller_get_option_str(const lv_obj_t *obj, uint32_t option, char *buf, uint32_t buf_size) + * void lv_spangroup_set_span_style(lv_obj_t *obj, lv_span_t *span, const lv_style_t *style) */ -static PyObject *py_lv_roller_get_option_str(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_span_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long option_val; PyObject *buf_py; long buf_size_val; - if (!PyArg_ParseTuple(py_args, "lOl", &option_val, &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *span_py; PyObject *style_py; + if (!PyArg_ParseTuple(py_args, "OO", &span_py, &style_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t option = (uint32_t)option_val; - char *buf = (char*)convert_from_str(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; + lv_span_t *span = mp_write_ptr_lv_span_t(span_py); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_obj_t *, uint32_t, char *, uint32_t))lv_roller_get_option_str)(obj, option, buf, buf_size); + ((void (*)(lv_obj_t *, lv_span_t *, const lv_style_t *))lv_spangroup_set_span_style)(obj, span, style); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_roller_get_option_str_def = { - "lv_roller_get_option_str", - (PyCFunction)py_lv_roller_get_option_str, +static PyMethodDef py_lv_spangroup_set_span_style_def = { + "lv_spangroup_set_span_style", + (PyCFunction)py_lv_spangroup_set_span_style, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46049,146 +57851,59 @@ static PyMethodDef py_lv_roller_get_option_str_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_roller_bind_value(lv_obj_t *obj, lv_subject_t *subject) + * void lv_spangroup_set_align(lv_obj_t *obj, lv_text_align_t align) */ -static PyObject *py_lv_roller_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_observer_t * _res; - lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_roller_bind_value)(obj, subject); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); -} - -static PyMethodDef py_lv_roller_bind_value_def = { - "lv_roller_bind_value", - (PyCFunction)py_lv_roller_bind_value, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_roller_create(lv_obj_t *parent) - */ -static PyObject *py_lv_roller_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + lv_text_align_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_roller_create)(parent); + ((void (*)(lv_obj_t *, lv_text_align_t))lv_spangroup_set_align)(obj, align); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_roller_create_def = { - "lv_roller_create", - (PyCFunction)py_lv_roller_create, +static PyMethodDef py_lv_spangroup_set_align_def = { + "lv_spangroup_set_align", + (PyCFunction)py_lv_spangroup_set_align, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl roller object definitions (CPython) - */ -static PyObject *py_lv_roller_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_roller_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_roller_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_roller_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_roller_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_roller_methods[] = { - {"set_options", (PyCFunction)py_lv_roller_set_options, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_selected", (PyCFunction)py_lv_roller_set_selected, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_selected_str", (PyCFunction)py_lv_roller_set_selected_str, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_visible_row_count", (PyCFunction)py_lv_roller_set_visible_row_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected", (PyCFunction)py_lv_roller_get_selected, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected_str", (PyCFunction)py_lv_roller_get_selected_str, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_options", (PyCFunction)py_lv_roller_get_options, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_option_count", (PyCFunction)py_lv_roller_get_option_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_option_str", (PyCFunction)py_lv_roller_get_option_str, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_value", (PyCFunction)py_lv_roller_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_roller_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.roller", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_roller_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_roller_new, - .tp_methods = py_lv_roller_methods, - .tp_call = (ternaryfunc)py_lv_roller_call, -}; - -static py_lv_obj_type_t py_lv_roller_mapping = { - .lv_obj_class = &lv_roller_class, - .py_type = &py_lv_roller_type, -}; - - /* * lvgl extension definition for: - * void lv_scale_set_mode(lv_obj_t *obj, lv_scale_mode_t mode) + * void lv_spangroup_set_overflow(lv_obj_t *obj, lv_span_overflow_t overflow) */ -static PyObject *py_lv_scale_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *overflow_py; + if (!PyArg_ParseTuple(py_args, "O", &overflow_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_scale_mode_t mode = (int)mp_obj_get_int(mode_py); + lv_span_overflow_t overflow = (int)mp_obj_get_int(overflow_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scale_mode_t))lv_scale_set_mode)(obj, mode); + ((void (*)(lv_obj_t *, lv_span_overflow_t))lv_spangroup_set_overflow)(obj, overflow); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_mode_def = { - "lv_scale_set_mode", - (PyCFunction)py_lv_scale_set_mode, +static PyMethodDef py_lv_spangroup_set_overflow_def = { + "lv_spangroup_set_overflow", + (PyCFunction)py_lv_spangroup_set_overflow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46196,29 +57911,29 @@ static PyMethodDef py_lv_scale_set_mode_def = { /* * lvgl extension definition for: - * void lv_scale_set_total_tick_count(lv_obj_t *obj, uint32_t total_tick_count) + * void lv_spangroup_set_indent(lv_obj_t *obj, int32_t indent) */ -static PyObject *py_lv_scale_set_total_tick_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_indent(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long total_tick_count_val; - if (!PyArg_ParseTuple(py_args, "l", &total_tick_count_val)) { PyGILState_Release(gstate); return NULL; } + long indent_val; + if (!PyArg_ParseTuple(py_args, "l", &indent_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t total_tick_count = (uint32_t)total_tick_count_val; + int32_t indent = (int32_t)indent_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_scale_set_total_tick_count)(obj, total_tick_count); + ((void (*)(lv_obj_t *, int32_t))lv_spangroup_set_indent)(obj, indent); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_total_tick_count_def = { - "lv_scale_set_total_tick_count", - (PyCFunction)py_lv_scale_set_total_tick_count, +static PyMethodDef py_lv_spangroup_set_indent_def = { + "lv_spangroup_set_indent", + (PyCFunction)py_lv_spangroup_set_indent, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46226,29 +57941,29 @@ static PyMethodDef py_lv_scale_set_total_tick_count_def = { /* * lvgl extension definition for: - * void lv_scale_set_major_tick_every(lv_obj_t *obj, uint32_t major_tick_every) + * void lv_spangroup_set_mode(lv_obj_t *obj, lv_span_mode_t mode) */ -static PyObject *py_lv_scale_set_major_tick_every(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long major_tick_every_val; - if (!PyArg_ParseTuple(py_args, "l", &major_tick_every_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t major_tick_every = (uint32_t)major_tick_every_val; + lv_span_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_scale_set_major_tick_every)(obj, major_tick_every); + ((void (*)(lv_obj_t *, lv_span_mode_t))lv_spangroup_set_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_major_tick_every_def = { - "lv_scale_set_major_tick_every", - (PyCFunction)py_lv_scale_set_major_tick_every, +static PyMethodDef py_lv_spangroup_set_mode_def = { + "lv_spangroup_set_mode", + (PyCFunction)py_lv_spangroup_set_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46256,29 +57971,29 @@ static PyMethodDef py_lv_scale_set_major_tick_every_def = { /* * lvgl extension definition for: - * void lv_scale_set_label_show(lv_obj_t *obj, bool show_label) + * void lv_spangroup_set_max_lines(lv_obj_t *obj, int32_t lines) */ -static PyObject *py_lv_scale_set_label_show(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_set_max_lines(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long show_label_val; - if (!PyArg_ParseTuple(py_args, "l", &show_label_val)) { PyGILState_Release(gstate); return NULL; } + long lines_val; + if (!PyArg_ParseTuple(py_args, "l", &lines_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool show_label = (show_label_val != 0); + int32_t lines = (int32_t)lines_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_scale_set_label_show)(obj, show_label); + ((void (*)(lv_obj_t *, int32_t))lv_spangroup_set_max_lines)(obj, lines); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_label_show_def = { - "lv_scale_set_label_show", - (PyCFunction)py_lv_scale_set_label_show, +static PyMethodDef py_lv_spangroup_set_max_lines_def = { + "lv_spangroup_set_max_lines", + (PyCFunction)py_lv_spangroup_set_max_lines, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46286,30 +58001,30 @@ static PyMethodDef py_lv_scale_set_label_show_def = { /* * lvgl extension definition for: - * void lv_scale_set_range(lv_obj_t *obj, int32_t min, int32_t max) + * lv_span_t *lv_spangroup_get_child(const lv_obj_t *obj, int32_t id) */ -static PyObject *py_lv_scale_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_child(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + long id_val; + if (!PyArg_ParseTuple(py_args, "l", &id_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; + int32_t id = (int32_t)id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_span_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_scale_set_range)(obj, min, max); + _res = ((lv_span_t *(*)(const lv_obj_t *, int32_t))lv_spangroup_get_child)(obj, id); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_span_t((void*)_res); } -static PyMethodDef py_lv_scale_set_range_def = { - "lv_scale_set_range", - (PyCFunction)py_lv_scale_set_range, +static PyMethodDef py_lv_spangroup_get_child_def = { + "lv_spangroup_get_child", + (PyCFunction)py_lv_spangroup_get_child, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46317,29 +58032,28 @@ static PyMethodDef py_lv_scale_set_range_def = { /* * lvgl extension definition for: - * void lv_scale_set_min_value(lv_obj_t *obj, int32_t min) + * uint32_t lv_spangroup_get_span_count(const lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_span_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; - if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_scale_set_min_value)(obj, min); + _res = ((uint32_t (*)(const lv_obj_t *))lv_spangroup_get_span_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_scale_set_min_value_def = { - "lv_scale_set_min_value", - (PyCFunction)py_lv_scale_set_min_value, +static PyMethodDef py_lv_spangroup_get_span_count_def = { + "lv_spangroup_get_span_count", + (PyCFunction)py_lv_spangroup_get_span_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46347,29 +58061,28 @@ static PyMethodDef py_lv_scale_set_min_value_def = { /* * lvgl extension definition for: - * void lv_scale_set_max_value(lv_obj_t *obj, int32_t max) + * lv_text_align_t lv_spangroup_get_align(lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long max_val; - if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_text_align_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_scale_set_max_value)(obj, max); + _res = ((lv_text_align_t (*)(lv_obj_t *))lv_spangroup_get_align)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_scale_set_max_value_def = { - "lv_scale_set_max_value", - (PyCFunction)py_lv_scale_set_max_value, +static PyMethodDef py_lv_spangroup_get_align_def = { + "lv_spangroup_get_align", + (PyCFunction)py_lv_spangroup_get_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46377,29 +58090,28 @@ static PyMethodDef py_lv_scale_set_max_value_def = { /* * lvgl extension definition for: - * void lv_scale_set_angle_range(lv_obj_t *obj, uint32_t angle_range) + * lv_span_overflow_t lv_spangroup_get_overflow(lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_angle_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long angle_range_val; - if (!PyArg_ParseTuple(py_args, "l", &angle_range_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t angle_range = (uint32_t)angle_range_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_span_overflow_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_scale_set_angle_range)(obj, angle_range); + _res = ((lv_span_overflow_t (*)(lv_obj_t *))lv_spangroup_get_overflow)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_scale_set_angle_range_def = { - "lv_scale_set_angle_range", - (PyCFunction)py_lv_scale_set_angle_range, +static PyMethodDef py_lv_spangroup_get_overflow_def = { + "lv_spangroup_get_overflow", + (PyCFunction)py_lv_spangroup_get_overflow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46407,29 +58119,28 @@ static PyMethodDef py_lv_scale_set_angle_range_def = { /* * lvgl extension definition for: - * void lv_scale_set_rotation(lv_obj_t *obj, int32_t rotation) + * int32_t lv_spangroup_get_indent(lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_indent(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long rotation_val; - if (!PyArg_ParseTuple(py_args, "l", &rotation_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t rotation = (int32_t)rotation_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_scale_set_rotation)(obj, rotation); + _res = ((int32_t (*)(lv_obj_t *))lv_spangroup_get_indent)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_scale_set_rotation_def = { - "lv_scale_set_rotation", - (PyCFunction)py_lv_scale_set_rotation, +static PyMethodDef py_lv_spangroup_get_indent_def = { + "lv_spangroup_get_indent", + (PyCFunction)py_lv_spangroup_get_indent, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46437,31 +58148,28 @@ static PyMethodDef py_lv_scale_set_rotation_def = { /* * lvgl extension definition for: - * void lv_scale_set_line_needle_value(lv_obj_t *obj, lv_obj_t *needle_line, int32_t needle_length, int32_t value) + * lv_span_mode_t lv_spangroup_get_mode(lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_line_needle_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *needle_line_py; long needle_length_val; long value_val; - if (!PyArg_ParseTuple(py_args, "Oll", &needle_line_py, &needle_length_val, &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_obj_t *needle_line = mp_to_lv(needle_line_py); - int32_t needle_length = (int32_t)needle_length_val; - int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_span_mode_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *, int32_t, int32_t))lv_scale_set_line_needle_value)(obj, needle_line, needle_length, value); + _res = ((lv_span_mode_t (*)(lv_obj_t *))lv_spangroup_get_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_scale_set_line_needle_value_def = { - "lv_scale_set_line_needle_value", - (PyCFunction)py_lv_scale_set_line_needle_value, +static PyMethodDef py_lv_spangroup_get_mode_def = { + "lv_spangroup_get_mode", + (PyCFunction)py_lv_spangroup_get_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46469,30 +58177,28 @@ static PyMethodDef py_lv_scale_set_line_needle_value_def = { /* * lvgl extension definition for: - * void lv_scale_set_image_needle_value(lv_obj_t *obj, lv_obj_t *needle_img, int32_t value) + * int32_t lv_spangroup_get_max_lines(lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_image_needle_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_max_lines(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *needle_img_py; long value_val; - if (!PyArg_ParseTuple(py_args, "Ol", &needle_img_py, &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_obj_t *needle_img = mp_to_lv(needle_img_py); - int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *, int32_t))lv_scale_set_image_needle_value)(obj, needle_img, value); + _res = ((int32_t (*)(lv_obj_t *))lv_spangroup_get_max_lines)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_scale_set_image_needle_value_def = { - "lv_scale_set_image_needle_value", - (PyCFunction)py_lv_scale_set_image_needle_value, +static PyMethodDef py_lv_spangroup_get_max_lines_def = { + "lv_spangroup_get_max_lines", + (PyCFunction)py_lv_spangroup_get_max_lines, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46500,29 +58206,28 @@ static PyMethodDef py_lv_scale_set_image_needle_value_def = { /* * lvgl extension definition for: - * void lv_scale_set_text_src(lv_obj_t *obj, const char *txt_src[]) + * int32_t lv_spangroup_get_max_line_height(lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_text_src(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_max_line_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *txt_src_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_src_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const char **txt_src = (const char **)lvpy_str_arr_arg(self, txt_src_py, "lv_scale_set_text_src:txt_src"); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *[]))lv_scale_set_text_src)(obj, txt_src); + _res = ((int32_t (*)(lv_obj_t *))lv_spangroup_get_max_line_height)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_scale_set_text_src_def = { - "lv_scale_set_text_src", - (PyCFunction)py_lv_scale_set_text_src, +static PyMethodDef py_lv_spangroup_get_max_line_height_def = { + "lv_spangroup_get_max_line_height", + (PyCFunction)py_lv_spangroup_get_max_line_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46530,29 +58235,30 @@ static PyMethodDef py_lv_scale_set_text_src_def = { /* * lvgl extension definition for: - * void lv_scale_set_post_draw(lv_obj_t *obj, bool en) + * uint32_t lv_spangroup_get_expand_width(lv_obj_t *obj, uint32_t max_width) */ -static PyObject *py_lv_scale_set_post_draw(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_expand_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + long max_width_val; + if (!PyArg_ParseTuple(py_args, "l", &max_width_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + uint32_t max_width = (uint32_t)max_width_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_scale_set_post_draw)(obj, en); + _res = ((uint32_t (*)(lv_obj_t *, uint32_t))lv_spangroup_get_expand_width)(obj, max_width); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_scale_set_post_draw_def = { - "lv_scale_set_post_draw", - (PyCFunction)py_lv_scale_set_post_draw, +static PyMethodDef py_lv_spangroup_get_expand_width_def = { + "lv_spangroup_get_expand_width", + (PyCFunction)py_lv_spangroup_get_expand_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46560,91 +58266,82 @@ static PyMethodDef py_lv_scale_set_post_draw_def = { /* * lvgl extension definition for: - * void lv_scale_set_draw_ticks_on_top(lv_obj_t *obj, bool en) + * int32_t lv_spangroup_get_expand_height(lv_obj_t *obj, int32_t width) */ -static PyObject *py_lv_scale_set_draw_ticks_on_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_expand_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + long width_val; + if (!PyArg_ParseTuple(py_args, "l", &width_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + int32_t width = (int32_t)width_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_scale_set_draw_ticks_on_top)(obj, en); + _res = ((int32_t (*)(lv_obj_t *, int32_t))lv_spangroup_get_expand_height)(obj, width); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_scale_set_draw_ticks_on_top_def = { - "lv_scale_set_draw_ticks_on_top", - (PyCFunction)py_lv_scale_set_draw_ticks_on_top, +static PyMethodDef py_lv_spangroup_get_expand_height_def = { + "lv_spangroup_get_expand_height", + (PyCFunction)py_lv_spangroup_get_expand_height, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_scale_section_t (CPython) + * Struct lv_span_coords_t (CPython) */ -extern PyMethodDef py_lv_scale_section_t_methods[]; +extern PyMethodDef py_lv_span_coords_t_methods[]; -static PyObject *py_lv_scale_section_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_span_coords_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_scale_section_t *data = (lv_scale_section_t*)inst->data; + lv_span_coords_t *data = (lv_span_coords_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "main_style") == 0) return mp_read_ptr_lv_style_t((void*)data->main_style); - if (strcmp(attr, "indicator_style") == 0) return mp_read_ptr_lv_style_t((void*)data->indicator_style); - if (strcmp(attr, "items_style") == 0) return mp_read_ptr_lv_style_t((void*)data->items_style); - if (strcmp(attr, "range_min") == 0) return mp_obj_new_int(data->range_min); - if (strcmp(attr, "range_max") == 0) return mp_obj_new_int(data->range_max); - if (strcmp(attr, "first_tick_idx_in_section") == 0) return mp_obj_new_int_from_uint(data->first_tick_idx_in_section); - if (strcmp(attr, "last_tick_idx_in_section") == 0) return mp_obj_new_int_from_uint(data->last_tick_idx_in_section); - if (strcmp(attr, "first_tick_in_section_width") == 0) return mp_obj_new_int(data->first_tick_in_section_width); - if (strcmp(attr, "last_tick_in_section_width") == 0) return mp_obj_new_int(data->last_tick_in_section_width); - if (strcmp(attr, "first_tick_in_section") == 0) return mp_read_byref_lv_point_t(data->first_tick_in_section); - if (strcmp(attr, "last_tick_in_section") == 0) return mp_read_byref_lv_point_t(data->last_tick_in_section); - if (strcmp(attr, "first_tick_idx_is_major") == 0) return mp_obj_new_int_from_uint(data->first_tick_idx_is_major); - if (strcmp(attr, "last_tick_idx_is_major") == 0) return mp_obj_new_int_from_uint(data->last_tick_idx_is_major); - for (PyMethodDef *m = py_lv_scale_section_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "heading") == 0) return mp_read_byref_lv_area_t(data->heading); + if (strcmp(attr, "middle") == 0) return mp_read_byref_lv_area_t(data->middle); + if (strcmp(attr, "trailing") == 0) return mp_read_byref_lv_area_t(data->trailing); + for (PyMethodDef *m = py_lv_span_coords_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_scale_section_t_field_names[] = {"main_style", "indicator_style", "items_style", "range_min", "range_max", "first_tick_idx_in_section", "last_tick_idx_in_section", "first_tick_in_section_width", "last_tick_in_section_width", "first_tick_in_section", "last_tick_in_section", "first_tick_idx_is_major", "last_tick_idx_is_major", NULL}; +static const char *const py_lv_span_coords_t_field_names[] = {"heading", "middle", "trailing", NULL}; -static PyObject *py_lv_scale_section_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_span_coords_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_scale_section_t_field_names, py_lv_scale_section_t_methods); + return lvpy_struct_dir(self, py_lv_span_coords_t_field_names, py_lv_span_coords_t_methods); } -static PyMethodDef py_lv_scale_section_t_type_methods[] = { - {"__dir__", py_lv_scale_section_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_span_coords_t_type_methods[] = { + {"__dir__", py_lv_span_coords_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_scale_section_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_span_coords_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_scale_section_t *data = (lv_scale_section_t*)inst->data; + lv_span_coords_t *data = (lv_span_coords_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -46652,102 +58349,154 @@ static int py_lv_scale_section_t_setattro(PyObject *self, PyObject *name, PyObje const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_scale_section_t saved; + lv_span_coords_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "main_style") == 0) { data->main_style = (void*)mp_write_ptr_lv_style_t(value); result = 0; } - if (strcmp(attr, "indicator_style") == 0) { data->indicator_style = (void*)mp_write_ptr_lv_style_t(value); result = 0; } - if (strcmp(attr, "items_style") == 0) { data->items_style = (void*)mp_write_ptr_lv_style_t(value); result = 0; } - if (strcmp(attr, "range_min") == 0) { data->range_min = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "range_max") == 0) { data->range_max = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "first_tick_idx_in_section") == 0) { data->first_tick_idx_in_section = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_tick_idx_in_section") == 0) { data->last_tick_idx_in_section = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "first_tick_in_section_width") == 0) { data->first_tick_in_section_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_tick_in_section_width") == 0) { data->last_tick_in_section_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "first_tick_in_section") == 0) { data->first_tick_in_section = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "last_tick_in_section") == 0) { data->last_tick_in_section = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "first_tick_idx_is_major") == 0) { data->first_tick_idx_is_major = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_tick_idx_is_major") == 0) { data->last_tick_idx_is_major = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "heading") == 0) { data->heading = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "middle") == 0) { data->middle = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "trailing") == 0) { data->trailing = mp_write_lv_area_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_scale_section_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_span_coords_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_scale_section_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_span_coords_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_scale_section_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_span_coords_t)); } -static void py_lv_scale_section_t_dealloc(py_lv_struct_t *self) +static void py_lv_span_coords_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_scale_section_t_type = { +PyTypeObject py_lv_span_coords_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_scale_section_t", + .tp_name = "lvgl.lv_span_coords_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_scale_section_t_dealloc, - .tp_getattro = (getter)py_lv_scale_section_t_getattro, - .tp_setattro = (setter)py_lv_scale_section_t_setattro, - .tp_new = py_lv_scale_section_t_new, - .tp_methods = py_lv_scale_section_t_type_methods, + .tp_dealloc = (destructor)py_lv_span_coords_t_dealloc, + .tp_getattro = (getter)py_lv_span_coords_t_getattro, + .tp_setattro = (setter)py_lv_span_coords_t_setattro, + .tp_new = py_lv_span_coords_t_new, + .tp_methods = py_lv_span_coords_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_scale_section_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_span_coords_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_scale_section_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_scale_section_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_span_coords_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_span_coords_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_scale_section_t*)self->data; + return (lv_span_coords_t*)self->data; } -static lv_scale_section_t mp_write_scratch_lv_scale_section_t; +static lv_span_coords_t mp_write_scratch_lv_span_coords_t; -static inline void* mp_write_value_ptr_lv_scale_section_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_span_coords_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_scale_section_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_span_coords_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_scale_section_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_scale_section_t)); + memcpy(&mp_write_scratch_lv_span_coords_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_span_coords_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_scale_section_t; + return &mp_write_scratch_lv_span_coords_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_scale_section_t(value); + void *p = mp_write_ptr_lv_span_coords_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_scale_section_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_span_coords_t or dict, got None"); } - memset(&mp_write_scratch_lv_scale_section_t, 0, sizeof(lv_scale_section_t)); - return &mp_write_scratch_lv_scale_section_t; + memset(&mp_write_scratch_lv_span_coords_t, 0, sizeof(lv_span_coords_t)); + return &mp_write_scratch_lv_span_coords_t; } -#define mp_write_lv_scale_section_t(struct_obj) (*((lv_scale_section_t*)mp_write_value_ptr_lv_scale_section_t(struct_obj))) +#define mp_write_lv_span_coords_t(struct_obj) (*((lv_span_coords_t*)mp_write_value_ptr_lv_span_coords_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_scale_section_t(void *field) +static inline PyObject *mp_read_ptr_lv_span_coords_t(void *field) { - return lv_to_mp_struct(&py_lv_scale_section_t_type, field); + return lv_to_mp_struct(&py_lv_span_coords_t_type, field); } -#define mp_read_lv_scale_section_t(field) lv_to_mp_struct_own(&py_lv_scale_section_t_type, copy_buffer(&field, sizeof(lv_scale_section_t))) -#define mp_read_byref_lv_scale_section_t(field) mp_read_ptr_lv_scale_section_t(&field) +#define mp_read_lv_span_coords_t(field) lv_to_mp_struct_own(&py_lv_span_coords_t_type, copy_buffer(&field, sizeof(lv_span_coords_t))) +#define mp_read_byref_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(&field) /* * lvgl extension definition for: - * lv_scale_section_t *lv_scale_add_section(lv_obj_t *obj) + * lv_span_coords_t lv_spangroup_get_span_coords(lv_obj_t *obj, const lv_span_t *span) */ -static PyObject *py_lv_scale_add_section(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_get_span_coords(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *span_py; + if (!PyArg_ParseTuple(py_args, "O", &span_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_span_t *span = (const lv_span_t *)mp_write_ptr_lv_span_t(span_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_span_coords_t _res; + lvpy_lock(); + _res = ((lv_span_coords_t (*)(lv_obj_t *, const lv_span_t *))lv_spangroup_get_span_coords)(obj, span); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_lv_span_coords_t(_res); +} + +static PyMethodDef py_lv_spangroup_get_span_coords_def = { + "lv_spangroup_get_span_coords", + (PyCFunction)py_lv_spangroup_get_span_coords, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_span_t *lv_spangroup_get_span_by_point(lv_obj_t *obj, const lv_point_t *p) + */ +static PyObject *py_lv_spangroup_get_span_by_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_point_t *p = (const lv_point_t *)mp_write_ptr_lv_point_t(p_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_span_t * _res; + lvpy_lock(); + _res = ((lv_span_t *(*)(lv_obj_t *, const lv_point_t *))lv_spangroup_get_span_by_point)(obj, p); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_span_t((void*)_res); +} + +static PyMethodDef py_lv_spangroup_get_span_by_point_def = { + "lv_spangroup_get_span_by_point", + (PyCFunction)py_lv_spangroup_get_span_by_point, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_spangroup_refresh(lv_obj_t *obj) + */ +static PyObject *py_lv_spangroup_refresh(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -46755,18 +58504,17 @@ static PyObject *py_lv_scale_add_section(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_scale_section_t * _res; lvpy_lock(); - _res = ((lv_scale_section_t *(*)(lv_obj_t *))lv_scale_add_section)(obj); + ((void (*)(lv_obj_t *))lv_spangroup_refresh)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_scale_section_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_add_section_def = { - "lv_scale_add_section", - (PyCFunction)py_lv_scale_add_section, +static PyMethodDef py_lv_spangroup_refresh_def = { + "lv_spangroup_refresh", + (PyCFunction)py_lv_spangroup_refresh, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46774,30 +58522,220 @@ static PyMethodDef py_lv_scale_add_section_def = { /* * lvgl extension definition for: - * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) + * lv_observer_t *lv_spangroup_bind_span_text(lv_obj_t *obj, lv_span_t *span, lv_subject_t *subject, const char *fmt) */ -static PyObject *py_lv_scale_section_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spangroup_bind_span_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *section = mp_to_lv(self); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; + PyObject *span_py; PyObject *subject_py; PyObject *fmt_py; + if (!PyArg_ParseTuple(py_args, "OOO", &span_py, &subject_py, &fmt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_span_t *span = mp_write_ptr_lv_span_t(span_py); + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); + const char *fmt = (const char *)(char*)convert_from_str(fmt_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_observer_t * _res; + lvpy_lock(); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_span_t *, lv_subject_t *, const char *))lv_spangroup_bind_span_text)(obj, span, subject, fmt); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_observer_t((void*)_res); +} + +static PyMethodDef py_lv_spangroup_bind_span_text_def = { + "lv_spangroup_bind_span_text", + (PyCFunction)py_lv_spangroup_bind_span_text, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_obj_t *lv_spangroup_create(lv_obj_t *parent) + */ +static PyObject *py_lv_spangroup_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_spangroup_create)(parent); + lvpy_unlock(); + + PyGILState_Release(gstate); + return lv_to_mp((void*)_res); +} + +static PyMethodDef py_lv_spangroup_create_def = { + "lv_spangroup_create", + (PyCFunction)py_lv_spangroup_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl spangroup object definitions (CPython) + */ +static PyObject *py_lv_spangroup_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_spangroup_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_spangroup_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_spangroup_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_spangroup_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_spangroup_methods[] = { + {"add_span", (PyCFunction)py_lv_spangroup_add_span, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_span", (PyCFunction)py_lv_spangroup_delete_span, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_span_text", (PyCFunction)py_lv_spangroup_set_span_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_span_text_static", (PyCFunction)py_lv_spangroup_set_span_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_span_style", (PyCFunction)py_lv_spangroup_set_span_style, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_align", (PyCFunction)py_lv_spangroup_set_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_overflow", (PyCFunction)py_lv_spangroup_set_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_indent", (PyCFunction)py_lv_spangroup_set_indent, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode", (PyCFunction)py_lv_spangroup_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_lines", (PyCFunction)py_lv_spangroup_set_max_lines, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_child", (PyCFunction)py_lv_spangroup_get_child, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_span_count", (PyCFunction)py_lv_spangroup_get_span_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_align", (PyCFunction)py_lv_spangroup_get_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_overflow", (PyCFunction)py_lv_spangroup_get_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_indent", (PyCFunction)py_lv_spangroup_get_indent, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode", (PyCFunction)py_lv_spangroup_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_lines", (PyCFunction)py_lv_spangroup_get_max_lines, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_line_height", (PyCFunction)py_lv_spangroup_get_max_line_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_expand_width", (PyCFunction)py_lv_spangroup_get_expand_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_expand_height", (PyCFunction)py_lv_spangroup_get_expand_height, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_span_coords", (PyCFunction)py_lv_spangroup_get_span_coords, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_span_by_point", (PyCFunction)py_lv_spangroup_get_span_by_point, METH_VARARGS | METH_KEYWORDS, NULL}, + {"refresh", (PyCFunction)py_lv_spangroup_refresh, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_span_text", (PyCFunction)py_lv_spangroup_bind_span_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_spangroup_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.spangroup", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_spangroup_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_spangroup_new, + .tp_methods = py_lv_spangroup_methods, + .tp_call = (ternaryfunc)py_lv_spangroup_call, +}; + +static py_lv_obj_type_t py_lv_spangroup_mapping = { + .lv_obj_class = &lv_spangroup_class, + .py_type = &py_lv_spangroup_type, +}; + + +/* + * lvgl extension definition for: + * void lv_textarea_add_char(lv_obj_t *obj, uint32_t c) + */ +static PyObject *py_lv_textarea_add_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t c = (uint32_t)c_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_textarea_add_char)(obj, c); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_textarea_add_char_def = { + "lv_textarea_add_char", + (PyCFunction)py_lv_textarea_add_char, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_textarea_add_text(lv_obj_t *obj, const char *txt) + */ +static PyObject *py_lv_textarea_add_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *txt = (const char *)(char*)convert_from_str(txt_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const char *))lv_textarea_add_text)(obj, txt); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_textarea_add_text_def = { + "lv_textarea_add_text", + (PyCFunction)py_lv_textarea_add_text, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_textarea_delete_char(lv_obj_t *obj) + */ +static PyObject *py_lv_textarea_delete_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_scale_section_set_range)(section, min, max); + ((void (*)(lv_obj_t *))lv_textarea_delete_char)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_section_set_range_def = { - "lv_scale_section_set_range", - (PyCFunction)py_lv_scale_section_set_range, +static PyMethodDef py_lv_textarea_delete_char_def = { + "lv_textarea_delete_char", + (PyCFunction)py_lv_textarea_delete_char, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46805,31 +58743,27 @@ static PyMethodDef py_lv_scale_section_set_range_def = { /* * lvgl extension definition for: - * void lv_scale_set_section_range(lv_obj_t *scale, lv_scale_section_t *section, int32_t min, int32_t max) + * void lv_textarea_delete_char_forward(lv_obj_t *obj) */ -static PyObject *py_lv_scale_set_section_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_delete_char_forward(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "Oll", §ion_py, &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scale = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t, int32_t))lv_scale_set_section_range)(scale, section, min, max); + ((void (*)(lv_obj_t *))lv_textarea_delete_char_forward)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_section_range_def = { - "lv_scale_set_section_range", - (PyCFunction)py_lv_scale_set_section_range, +static PyMethodDef py_lv_textarea_delete_char_forward_def = { + "lv_textarea_delete_char_forward", + (PyCFunction)py_lv_textarea_delete_char_forward, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46837,30 +58771,29 @@ static PyMethodDef py_lv_scale_set_section_range_def = { /* * lvgl extension definition for: - * void lv_scale_set_section_min_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t min) + * void lv_textarea_set_text(lv_obj_t *obj, const char *txt) */ -static PyObject *py_lv_scale_set_section_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; long min_val; - if (!PyArg_ParseTuple(py_args, "Ol", §ion_py, &min_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scale = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - int32_t min = (int32_t)min_val; + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_scale_set_section_min_value)(scale, section, min); + ((void (*)(lv_obj_t *, const char *))lv_textarea_set_text)(obj, txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_section_min_value_def = { - "lv_scale_set_section_min_value", - (PyCFunction)py_lv_scale_set_section_min_value, +static PyMethodDef py_lv_textarea_set_text_def = { + "lv_textarea_set_text", + (PyCFunction)py_lv_textarea_set_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46868,30 +58801,29 @@ static PyMethodDef py_lv_scale_set_section_min_value_def = { /* * lvgl extension definition for: - * void lv_scale_set_section_max_value(lv_obj_t *scale, lv_scale_section_t *section, int32_t max) + * void lv_textarea_set_placeholder_text(lv_obj_t *obj, const char *txt) */ -static PyObject *py_lv_scale_set_section_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_placeholder_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; long max_val; - if (!PyArg_ParseTuple(py_args, "Ol", §ion_py, &max_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scale = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - int32_t max = (int32_t)max_val; + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scale_section_t *, int32_t))lv_scale_set_section_max_value)(scale, section, max); + ((void (*)(lv_obj_t *, const char *))lv_textarea_set_placeholder_text)(obj, txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_section_max_value_def = { - "lv_scale_set_section_max_value", - (PyCFunction)py_lv_scale_set_section_max_value, +static PyMethodDef py_lv_textarea_set_placeholder_text_def = { + "lv_textarea_set_placeholder_text", + (PyCFunction)py_lv_textarea_set_placeholder_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46899,30 +58831,29 @@ static PyMethodDef py_lv_scale_set_section_max_value_def = { /* * lvgl extension definition for: - * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) + * void lv_textarea_set_cursor_pos(lv_obj_t *obj, int32_t pos) */ -static PyObject *py_lv_scale_section_set_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *section_part_style_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, §ion_part_style_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *section = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_style_t *section_part_style = mp_write_ptr_lv_style_t(section_part_style_py); + long pos_val; + if (!PyArg_ParseTuple(py_args, "l", &pos_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t pos = (int32_t)pos_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_scale_section_set_style)(section, part, section_part_style); + ((void (*)(lv_obj_t *, int32_t))lv_textarea_set_cursor_pos)(obj, pos); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_section_set_style_def = { - "lv_scale_section_set_style", - (PyCFunction)py_lv_scale_section_set_style, +static PyMethodDef py_lv_textarea_set_cursor_pos_def = { + "lv_textarea_set_cursor_pos", + (PyCFunction)py_lv_textarea_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46930,30 +58861,29 @@ static PyMethodDef py_lv_scale_section_set_style_def = { /* * lvgl extension definition for: - * void lv_scale_set_section_style_main(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) + * void lv_textarea_set_cursor_click_pos(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_scale_set_section_style_main(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_cursor_click_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; PyObject *style_py; - if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &style_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scale = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_scale_set_section_style_main)(scale, section, style); + ((void (*)(lv_obj_t *, bool))lv_textarea_set_cursor_click_pos)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_section_style_main_def = { - "lv_scale_set_section_style_main", - (PyCFunction)py_lv_scale_set_section_style_main, +static PyMethodDef py_lv_textarea_set_cursor_click_pos_def = { + "lv_textarea_set_cursor_click_pos", + (PyCFunction)py_lv_textarea_set_cursor_click_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46961,30 +58891,29 @@ static PyMethodDef py_lv_scale_set_section_style_main_def = { /* * lvgl extension definition for: - * void lv_scale_set_section_style_indicator(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) + * void lv_textarea_set_password_mode(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_scale_set_section_style_indicator(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_password_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; PyObject *style_py; - if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &style_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scale = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_scale_set_section_style_indicator)(scale, section, style); + ((void (*)(lv_obj_t *, bool))lv_textarea_set_password_mode)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_section_style_indicator_def = { - "lv_scale_set_section_style_indicator", - (PyCFunction)py_lv_scale_set_section_style_indicator, +static PyMethodDef py_lv_textarea_set_password_mode_def = { + "lv_textarea_set_password_mode", + (PyCFunction)py_lv_textarea_set_password_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -46992,30 +58921,29 @@ static PyMethodDef py_lv_scale_set_section_style_indicator_def = { /* * lvgl extension definition for: - * void lv_scale_set_section_style_items(lv_obj_t *scale, lv_scale_section_t *section, const lv_style_t *style) + * void lv_textarea_set_password_bullet(lv_obj_t *obj, const char *bullet) */ -static PyObject *py_lv_scale_set_section_style_items(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_password_bullet(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; PyObject *style_py; - if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &style_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scale = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + PyObject *bullet_py; + if (!PyArg_ParseTuple(py_args, "O", &bullet_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const char *bullet = (const char *)(char*)convert_from_str(bullet_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scale_section_t *, const lv_style_t *))lv_scale_set_section_style_items)(scale, section, style); + ((void (*)(lv_obj_t *, const char *))lv_textarea_set_password_bullet)(obj, bullet); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_set_section_style_items_def = { - "lv_scale_set_section_style_items", - (PyCFunction)py_lv_scale_set_section_style_items, +static PyMethodDef py_lv_textarea_set_password_bullet_def = { + "lv_textarea_set_password_bullet", + (PyCFunction)py_lv_textarea_set_password_bullet, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47023,28 +58951,29 @@ static PyMethodDef py_lv_scale_set_section_style_items_def = { /* * lvgl extension definition for: - * lv_scale_mode_t lv_scale_get_mode(lv_obj_t *obj) + * void lv_textarea_set_one_line(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_scale_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_one_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_scale_mode_t _res; lvpy_lock(); - _res = ((lv_scale_mode_t (*)(lv_obj_t *))lv_scale_get_mode)(obj); + ((void (*)(lv_obj_t *, bool))lv_textarea_set_one_line)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_mode_def = { - "lv_scale_get_mode", - (PyCFunction)py_lv_scale_get_mode, +static PyMethodDef py_lv_textarea_set_one_line_def = { + "lv_textarea_set_one_line", + (PyCFunction)py_lv_textarea_set_one_line, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47052,28 +58981,29 @@ static PyMethodDef py_lv_scale_get_mode_def = { /* * lvgl extension definition for: - * int32_t lv_scale_get_total_tick_count(lv_obj_t *obj) + * void lv_textarea_set_accepted_chars(lv_obj_t *obj, const char *list) */ -static PyObject *py_lv_scale_get_total_tick_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_accepted_chars(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *list_py; + if (!PyArg_ParseTuple(py_args, "O", &list_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *list = (const char *)(char*)convert_from_str(list_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_total_tick_count)(obj); + ((void (*)(lv_obj_t *, const char *))lv_textarea_set_accepted_chars)(obj, list); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_total_tick_count_def = { - "lv_scale_get_total_tick_count", - (PyCFunction)py_lv_scale_get_total_tick_count, +static PyMethodDef py_lv_textarea_set_accepted_chars_def = { + "lv_textarea_set_accepted_chars", + (PyCFunction)py_lv_textarea_set_accepted_chars, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47081,28 +59011,29 @@ static PyMethodDef py_lv_scale_get_total_tick_count_def = { /* * lvgl extension definition for: - * int32_t lv_scale_get_major_tick_every(lv_obj_t *obj) + * void lv_textarea_set_accepted_chars_static(lv_obj_t *obj, const char *list) */ -static PyObject *py_lv_scale_get_major_tick_every(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_accepted_chars_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *list_py; + if (!PyArg_ParseTuple(py_args, "O", &list_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *list = (const char *)(char*)convert_from_str(list_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_major_tick_every)(obj); + ((void (*)(lv_obj_t *, const char *))lv_textarea_set_accepted_chars_static)(obj, list); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_major_tick_every_def = { - "lv_scale_get_major_tick_every", - (PyCFunction)py_lv_scale_get_major_tick_every, +static PyMethodDef py_lv_textarea_set_accepted_chars_static_def = { + "lv_textarea_set_accepted_chars_static", + (PyCFunction)py_lv_textarea_set_accepted_chars_static, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47110,28 +59041,29 @@ static PyMethodDef py_lv_scale_get_major_tick_every_def = { /* * lvgl extension definition for: - * int32_t lv_scale_get_rotation(lv_obj_t *obj) + * void lv_textarea_set_max_length(lv_obj_t *obj, uint32_t num) */ -static PyObject *py_lv_scale_get_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_max_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long num_val; + if (!PyArg_ParseTuple(py_args, "l", &num_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t num = (uint32_t)num_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_rotation)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_textarea_set_max_length)(obj, num); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_rotation_def = { - "lv_scale_get_rotation", - (PyCFunction)py_lv_scale_get_rotation, +static PyMethodDef py_lv_textarea_set_max_length_def = { + "lv_textarea_set_max_length", + (PyCFunction)py_lv_textarea_set_max_length, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47139,28 +59071,29 @@ static PyMethodDef py_lv_scale_get_rotation_def = { /* * lvgl extension definition for: - * bool lv_scale_get_label_show(lv_obj_t *obj) + * void lv_textarea_set_insert_replace(lv_obj_t *obj, const char *txt) */ -static PyObject *py_lv_scale_get_label_show(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_insert_replace(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_scale_get_label_show)(obj); + ((void (*)(lv_obj_t *, const char *))lv_textarea_set_insert_replace)(obj, txt); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_label_show_def = { - "lv_scale_get_label_show", - (PyCFunction)py_lv_scale_get_label_show, +static PyMethodDef py_lv_textarea_set_insert_replace_def = { + "lv_textarea_set_insert_replace", + (PyCFunction)py_lv_textarea_set_insert_replace, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47168,28 +59101,29 @@ static PyMethodDef py_lv_scale_get_label_show_def = { /* * lvgl extension definition for: - * uint32_t lv_scale_get_angle_range(lv_obj_t *obj) + * void lv_textarea_set_text_selection(lv_obj_t *obj, bool en) */ -static PyObject *py_lv_scale_get_angle_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_text_selection(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_scale_get_angle_range)(obj); + ((void (*)(lv_obj_t *, bool))lv_textarea_set_text_selection)(obj, en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_angle_range_def = { - "lv_scale_get_angle_range", - (PyCFunction)py_lv_scale_get_angle_range, +static PyMethodDef py_lv_textarea_set_text_selection_def = { + "lv_textarea_set_text_selection", + (PyCFunction)py_lv_textarea_set_text_selection, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47197,28 +59131,29 @@ static PyMethodDef py_lv_scale_get_angle_range_def = { /* * lvgl extension definition for: - * int32_t lv_scale_get_range_min_value(lv_obj_t *obj) + * void lv_textarea_set_password_show_time(lv_obj_t *obj, uint32_t time) */ -static PyObject *py_lv_scale_get_range_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_password_show_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long time_val; + if (!PyArg_ParseTuple(py_args, "l", &time_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t time = (uint32_t)time_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_range_min_value)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_textarea_set_password_show_time)(obj, time); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_range_min_value_def = { - "lv_scale_get_range_min_value", - (PyCFunction)py_lv_scale_get_range_min_value, +static PyMethodDef py_lv_textarea_set_password_show_time_def = { + "lv_textarea_set_password_show_time", + (PyCFunction)py_lv_textarea_set_password_show_time, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47226,28 +59161,29 @@ static PyMethodDef py_lv_scale_get_range_min_value_def = { /* * lvgl extension definition for: - * int32_t lv_scale_get_range_max_value(lv_obj_t *obj) + * void lv_textarea_set_align(lv_obj_t *obj, lv_text_align_t align) */ -static PyObject *py_lv_scale_get_range_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_set_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_text_align_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_scale_get_range_max_value)(obj); + ((void (*)(lv_obj_t *, lv_text_align_t))lv_textarea_set_align)(obj, align); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_get_range_max_value_def = { - "lv_scale_get_range_max_value", - (PyCFunction)py_lv_scale_get_range_max_value, +static PyMethodDef py_lv_textarea_set_align_def = { + "lv_textarea_set_align", + (PyCFunction)py_lv_textarea_set_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47255,31 +59191,28 @@ static PyMethodDef py_lv_scale_get_range_max_value_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_scale_bind_section_min_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) + * const char *lv_textarea_get_text(const lv_obj_t *obj) */ -static PyObject *py_lv_scale_bind_section_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + const char * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_scale_bind_section_min_value)(obj, section, subject); + _res = ((const char *(*)(const lv_obj_t *))lv_textarea_get_text)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_scale_bind_section_min_value_def = { - "lv_scale_bind_section_min_value", - (PyCFunction)py_lv_scale_bind_section_min_value, +static PyMethodDef py_lv_textarea_get_text_def = { + "lv_textarea_get_text", + (PyCFunction)py_lv_textarea_get_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47287,31 +59220,28 @@ static PyMethodDef py_lv_scale_bind_section_min_value_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_scale_bind_section_max_value(lv_obj_t *obj, lv_scale_section_t *section, lv_subject_t *subject) + * const char *lv_textarea_get_placeholder_text(lv_obj_t *obj) */ -static PyObject *py_lv_scale_bind_section_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_placeholder_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *section_py; PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "OO", §ion_py, &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_scale_section_t *section = mp_write_ptr_lv_scale_section_t(section_py); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + const char * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_scale_section_t *, lv_subject_t *))lv_scale_bind_section_max_value)(obj, section, subject); + _res = ((const char *(*)(lv_obj_t *))lv_textarea_get_placeholder_text)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_scale_bind_section_max_value_def = { - "lv_scale_bind_section_max_value", - (PyCFunction)py_lv_scale_bind_section_max_value, +static PyMethodDef py_lv_textarea_get_placeholder_text_def = { + "lv_textarea_get_placeholder_text", + (PyCFunction)py_lv_textarea_get_placeholder_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47319,139 +59249,57 @@ static PyMethodDef py_lv_scale_bind_section_max_value_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_scale_create(lv_obj_t *parent) + * lv_obj_t *lv_textarea_get_label(const lv_obj_t *obj) */ -static PyObject *py_lv_scale_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_label(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } + + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_scale_create)(parent); + _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_textarea_get_label)(obj); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_scale_create_def = { - "lv_scale_create", - (PyCFunction)py_lv_scale_create, +static PyMethodDef py_lv_textarea_get_label_def = { + "lv_textarea_get_label", + (PyCFunction)py_lv_textarea_get_label, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl scale object definitions (CPython) - */ -static PyObject *py_lv_scale_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_scale_create(type, py_args, py_kwds); -} - -static PyObject *py_lv_scale_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_scale_create((PyObject *)type, py_args, py_kwds); -} - -static void py_lv_scale_dealloc(py_lv_obj_t *self) -{ - lvpy_dealloc_obj(self); -} - -static PyMethodDef py_lv_scale_methods[] = { - {"set_mode", (PyCFunction)py_lv_scale_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_total_tick_count", (PyCFunction)py_lv_scale_set_total_tick_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_major_tick_every", (PyCFunction)py_lv_scale_set_major_tick_every, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_label_show", (PyCFunction)py_lv_scale_set_label_show, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_range", (PyCFunction)py_lv_scale_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_value", (PyCFunction)py_lv_scale_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_value", (PyCFunction)py_lv_scale_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_angle_range", (PyCFunction)py_lv_scale_set_angle_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rotation", (PyCFunction)py_lv_scale_set_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_line_needle_value", (PyCFunction)py_lv_scale_set_line_needle_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_image_needle_value", (PyCFunction)py_lv_scale_set_image_needle_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_src", (PyCFunction)py_lv_scale_set_text_src, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_post_draw", (PyCFunction)py_lv_scale_set_post_draw, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_draw_ticks_on_top", (PyCFunction)py_lv_scale_set_draw_ticks_on_top, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_section", (PyCFunction)py_lv_scale_add_section, METH_VARARGS | METH_KEYWORDS, NULL}, - {"section_set_range", (PyCFunction)py_lv_scale_section_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_section_range", (PyCFunction)py_lv_scale_set_section_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_section_min_value", (PyCFunction)py_lv_scale_set_section_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_section_max_value", (PyCFunction)py_lv_scale_set_section_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"section_set_style", (PyCFunction)py_lv_scale_section_set_style, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_section_style_main", (PyCFunction)py_lv_scale_set_section_style_main, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_section_style_indicator", (PyCFunction)py_lv_scale_set_section_style_indicator, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_section_style_items", (PyCFunction)py_lv_scale_set_section_style_items, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode", (PyCFunction)py_lv_scale_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_total_tick_count", (PyCFunction)py_lv_scale_get_total_tick_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_major_tick_every", (PyCFunction)py_lv_scale_get_major_tick_every, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rotation", (PyCFunction)py_lv_scale_get_rotation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_label_show", (PyCFunction)py_lv_scale_get_label_show, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_angle_range", (PyCFunction)py_lv_scale_get_angle_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_range_min_value", (PyCFunction)py_lv_scale_get_range_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_range_max_value", (PyCFunction)py_lv_scale_get_range_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_section_min_value", (PyCFunction)py_lv_scale_bind_section_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_section_max_value", (PyCFunction)py_lv_scale_bind_section_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_scale_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.scale", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_scale_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_scale_new, - .tp_methods = py_lv_scale_methods, - .tp_call = (ternaryfunc)py_lv_scale_call, -}; - -static py_lv_obj_type_t py_lv_scale_mapping = { - .lv_obj_class = &lv_scale_class, - .py_type = &py_lv_scale_type, -}; - - /* * lvgl extension definition for: - * void lv_slider_set_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim) + * uint32_t lv_textarea_get_cursor_pos(const lv_obj_t *obj) */ -static PyObject *py_lv_slider_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *anim_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_slider_set_value)(obj, value, anim); + _res = ((uint32_t (*)(const lv_obj_t *))lv_textarea_get_cursor_pos)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_slider_set_value_def = { - "lv_slider_set_value", - (PyCFunction)py_lv_slider_set_value, +static PyMethodDef py_lv_textarea_get_cursor_pos_def = { + "lv_textarea_get_cursor_pos", + (PyCFunction)py_lv_textarea_get_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47459,30 +59307,28 @@ static PyMethodDef py_lv_slider_set_value_def = { /* * lvgl extension definition for: - * void lv_slider_set_start_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim) + * bool lv_textarea_get_cursor_click_pos(lv_obj_t *obj) */ -static PyObject *py_lv_slider_set_start_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_cursor_click_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; PyObject *anim_py; - if (!PyArg_ParseTuple(py_args, "lO", &value_val, &anim_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t value = (int32_t)value_val; - lv_anim_enable_t anim = mp_obj_is_true(anim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_slider_set_start_value)(obj, value, anim); + _res = ((bool (*)(lv_obj_t *))lv_textarea_get_cursor_click_pos)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_slider_set_start_value_def = { - "lv_slider_set_start_value", - (PyCFunction)py_lv_slider_set_start_value, +static PyMethodDef py_lv_textarea_get_cursor_click_pos_def = { + "lv_textarea_get_cursor_click_pos", + (PyCFunction)py_lv_textarea_get_cursor_click_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47490,30 +59336,28 @@ static PyMethodDef py_lv_slider_set_start_value_def = { /* * lvgl extension definition for: - * void lv_slider_set_range(lv_obj_t *obj, int32_t min, int32_t max) + * bool lv_textarea_get_password_mode(const lv_obj_t *obj) */ -static PyObject *py_lv_slider_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_password_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_slider_set_range)(obj, min, max); + _res = ((bool (*)(const lv_obj_t *))lv_textarea_get_password_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_slider_set_range_def = { - "lv_slider_set_range", - (PyCFunction)py_lv_slider_set_range, +static PyMethodDef py_lv_textarea_get_password_mode_def = { + "lv_textarea_get_password_mode", + (PyCFunction)py_lv_textarea_get_password_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47521,29 +59365,28 @@ static PyMethodDef py_lv_slider_set_range_def = { /* * lvgl extension definition for: - * void lv_slider_set_min_value(lv_obj_t *obj, int32_t min) + * const char *lv_textarea_get_password_bullet(lv_obj_t *obj) */ -static PyObject *py_lv_slider_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_password_bullet(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; - if (!PyArg_ParseTuple(py_args, "l", &min_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t min = (int32_t)min_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_slider_set_min_value)(obj, min); + _res = ((const char *(*)(lv_obj_t *))lv_textarea_get_password_bullet)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_slider_set_min_value_def = { - "lv_slider_set_min_value", - (PyCFunction)py_lv_slider_set_min_value, +static PyMethodDef py_lv_textarea_get_password_bullet_def = { + "lv_textarea_get_password_bullet", + (PyCFunction)py_lv_textarea_get_password_bullet, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47551,29 +59394,28 @@ static PyMethodDef py_lv_slider_set_min_value_def = { /* * lvgl extension definition for: - * void lv_slider_set_max_value(lv_obj_t *obj, int32_t max) + * bool lv_textarea_get_one_line(const lv_obj_t *obj) */ -static PyObject *py_lv_slider_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_one_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long max_val; - if (!PyArg_ParseTuple(py_args, "l", &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_slider_set_max_value)(obj, max); + _res = ((bool (*)(const lv_obj_t *))lv_textarea_get_one_line)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_slider_set_max_value_def = { - "lv_slider_set_max_value", - (PyCFunction)py_lv_slider_set_max_value, +static PyMethodDef py_lv_textarea_get_one_line_def = { + "lv_textarea_get_one_line", + (PyCFunction)py_lv_textarea_get_one_line, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47581,29 +59423,28 @@ static PyMethodDef py_lv_slider_set_max_value_def = { /* * lvgl extension definition for: - * void lv_slider_set_mode(lv_obj_t *obj, lv_slider_mode_t mode) + * const char *lv_textarea_get_accepted_chars(lv_obj_t *obj) */ -static PyObject *py_lv_slider_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_accepted_chars(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_slider_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_slider_mode_t))lv_slider_set_mode)(obj, mode); + _res = ((const char *(*)(lv_obj_t *))lv_textarea_get_accepted_chars)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_slider_set_mode_def = { - "lv_slider_set_mode", - (PyCFunction)py_lv_slider_set_mode, +static PyMethodDef py_lv_textarea_get_accepted_chars_def = { + "lv_textarea_get_accepted_chars", + (PyCFunction)py_lv_textarea_get_accepted_chars, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47611,29 +59452,28 @@ static PyMethodDef py_lv_slider_set_mode_def = { /* * lvgl extension definition for: - * void lv_slider_set_orientation(lv_obj_t *obj, lv_slider_orientation_t orientation) + * uint32_t lv_textarea_get_max_length(lv_obj_t *obj) */ -static PyObject *py_lv_slider_set_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_max_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *orientation_py; - if (!PyArg_ParseTuple(py_args, "O", &orientation_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_slider_orientation_t orientation = (int)mp_obj_get_int(orientation_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_slider_orientation_t))lv_slider_set_orientation)(obj, orientation); + _res = ((uint32_t (*)(lv_obj_t *))lv_textarea_get_max_length)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_slider_set_orientation_def = { - "lv_slider_set_orientation", - (PyCFunction)py_lv_slider_set_orientation, +static PyMethodDef py_lv_textarea_get_max_length_def = { + "lv_textarea_get_max_length", + (PyCFunction)py_lv_textarea_get_max_length, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47641,9 +59481,9 @@ static PyMethodDef py_lv_slider_set_orientation_def = { /* * lvgl extension definition for: - * int32_t lv_slider_get_value(const lv_obj_t *obj) + * bool lv_textarea_text_is_selected(const lv_obj_t *obj) */ -static PyObject *py_lv_slider_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_text_is_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -47651,18 +59491,18 @@ static PyObject *py_lv_slider_get_value(PyObject *self, PyObject *py_args, PyObj lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_value)(obj); + _res = ((bool (*)(const lv_obj_t *))lv_textarea_text_is_selected)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_slider_get_value_def = { - "lv_slider_get_value", - (PyCFunction)py_lv_slider_get_value, +static PyMethodDef py_lv_textarea_text_is_selected_def = { + "lv_textarea_text_is_selected", + (PyCFunction)py_lv_textarea_text_is_selected, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47670,9 +59510,9 @@ static PyMethodDef py_lv_slider_get_value_def = { /* * lvgl extension definition for: - * int32_t lv_slider_get_left_value(const lv_obj_t *obj) + * bool lv_textarea_get_text_selection(lv_obj_t *obj) */ -static PyObject *py_lv_slider_get_left_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_text_selection(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -47680,18 +59520,18 @@ static PyObject *py_lv_slider_get_left_value(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_left_value)(obj); + _res = ((bool (*)(lv_obj_t *))lv_textarea_get_text_selection)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_slider_get_left_value_def = { - "lv_slider_get_left_value", - (PyCFunction)py_lv_slider_get_left_value, +static PyMethodDef py_lv_textarea_get_text_selection_def = { + "lv_textarea_get_text_selection", + (PyCFunction)py_lv_textarea_get_text_selection, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47699,9 +59539,9 @@ static PyMethodDef py_lv_slider_get_left_value_def = { /* * lvgl extension definition for: - * int32_t lv_slider_get_min_value(const lv_obj_t *obj) + * uint32_t lv_textarea_get_password_show_time(lv_obj_t *obj) */ -static PyObject *py_lv_slider_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_password_show_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -47709,18 +59549,18 @@ static PyObject *py_lv_slider_get_min_value(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_min_value)(obj); + _res = ((uint32_t (*)(lv_obj_t *))lv_textarea_get_password_show_time)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_slider_get_min_value_def = { - "lv_slider_get_min_value", - (PyCFunction)py_lv_slider_get_min_value, +static PyMethodDef py_lv_textarea_get_password_show_time_def = { + "lv_textarea_get_password_show_time", + (PyCFunction)py_lv_textarea_get_password_show_time, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47728,9 +59568,9 @@ static PyMethodDef py_lv_slider_get_min_value_def = { /* * lvgl extension definition for: - * int32_t lv_slider_get_max_value(const lv_obj_t *obj) + * uint32_t lv_textarea_get_current_char(lv_obj_t *obj) */ -static PyObject *py_lv_slider_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_get_current_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -47738,18 +59578,18 @@ static PyObject *py_lv_slider_get_max_value(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_slider_get_max_value)(obj); + _res = ((uint32_t (*)(lv_obj_t *))lv_textarea_get_current_char)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_slider_get_max_value_def = { - "lv_slider_get_max_value", - (PyCFunction)py_lv_slider_get_max_value, +static PyMethodDef py_lv_textarea_get_current_char_def = { + "lv_textarea_get_current_char", + (PyCFunction)py_lv_textarea_get_current_char, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47757,9 +59597,9 @@ static PyMethodDef py_lv_slider_get_max_value_def = { /* * lvgl extension definition for: - * bool lv_slider_is_dragged(const lv_obj_t *obj) + * void lv_textarea_clear_selection(lv_obj_t *obj) */ -static PyObject *py_lv_slider_is_dragged(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_clear_selection(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -47767,18 +59607,17 @@ static PyObject *py_lv_slider_is_dragged(PyObject *self, PyObject *py_args, PyOb lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_slider_is_dragged)(obj); + ((void (*)(lv_obj_t *))lv_textarea_clear_selection)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_slider_is_dragged_def = { - "lv_slider_is_dragged", - (PyCFunction)py_lv_slider_is_dragged, +static PyMethodDef py_lv_textarea_clear_selection_def = { + "lv_textarea_clear_selection", + (PyCFunction)py_lv_textarea_clear_selection, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47786,28 +59625,27 @@ static PyMethodDef py_lv_slider_is_dragged_def = { /* * lvgl extension definition for: - * lv_slider_mode_t lv_slider_get_mode(lv_obj_t *slider) + * void lv_textarea_cursor_right(lv_obj_t *obj) */ -static PyObject *py_lv_slider_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_cursor_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *slider = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_slider_mode_t _res; lvpy_lock(); - _res = ((lv_slider_mode_t (*)(lv_obj_t *))lv_slider_get_mode)(slider); + ((void (*)(lv_obj_t *))lv_textarea_cursor_right)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_slider_get_mode_def = { - "lv_slider_get_mode", - (PyCFunction)py_lv_slider_get_mode, +static PyMethodDef py_lv_textarea_cursor_right_def = { + "lv_textarea_cursor_right", + (PyCFunction)py_lv_textarea_cursor_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47815,28 +59653,27 @@ static PyMethodDef py_lv_slider_get_mode_def = { /* * lvgl extension definition for: - * lv_slider_orientation_t lv_slider_get_orientation(lv_obj_t *slider) + * void lv_textarea_cursor_left(lv_obj_t *obj) */ -static PyObject *py_lv_slider_get_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_cursor_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *slider = mp_to_lv(self); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_slider_orientation_t _res; lvpy_lock(); - _res = ((lv_slider_orientation_t (*)(lv_obj_t *))lv_slider_get_orientation)(slider); + ((void (*)(lv_obj_t *))lv_textarea_cursor_left)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_slider_get_orientation_def = { - "lv_slider_get_orientation", - (PyCFunction)py_lv_slider_get_orientation, +static PyMethodDef py_lv_textarea_cursor_left_def = { + "lv_textarea_cursor_left", + (PyCFunction)py_lv_textarea_cursor_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47844,9 +59681,9 @@ static PyMethodDef py_lv_slider_get_orientation_def = { /* * lvgl extension definition for: - * bool lv_slider_is_symmetrical(lv_obj_t *obj) + * void lv_textarea_cursor_down(lv_obj_t *obj) */ -static PyObject *py_lv_slider_is_symmetrical(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_cursor_down(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -47854,18 +59691,17 @@ static PyObject *py_lv_slider_is_symmetrical(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_slider_is_symmetrical)(obj); + ((void (*)(lv_obj_t *))lv_textarea_cursor_down)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_slider_is_symmetrical_def = { - "lv_slider_is_symmetrical", - (PyCFunction)py_lv_slider_is_symmetrical, +static PyMethodDef py_lv_textarea_cursor_down_def = { + "lv_textarea_cursor_down", + (PyCFunction)py_lv_textarea_cursor_down, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47873,30 +59709,27 @@ static PyMethodDef py_lv_slider_is_symmetrical_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_slider_bind_value(lv_obj_t *obj, lv_subject_t *subject) + * void lv_textarea_cursor_up(lv_obj_t *obj) */ -static PyObject *py_lv_slider_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_cursor_up(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_slider_bind_value)(obj, subject); + ((void (*)(lv_obj_t *))lv_textarea_cursor_up)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_slider_bind_value_def = { - "lv_slider_bind_value", - (PyCFunction)py_lv_slider_bind_value, +static PyMethodDef py_lv_textarea_cursor_up_def = { + "lv_textarea_cursor_up", + (PyCFunction)py_lv_textarea_cursor_up, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -47904,9 +59737,9 @@ static PyMethodDef py_lv_slider_bind_value_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_slider_create(lv_obj_t *parent) + * lv_obj_t *lv_textarea_create(lv_obj_t *parent) */ -static PyObject *py_lv_slider_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -47922,241 +59755,245 @@ static PyObject *py_lv_slider_create(PyObject *self, PyObject *py_args, PyObject lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_slider_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_textarea_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_slider_create_def = { - "lv_slider_create", - (PyCFunction)py_lv_slider_create, +static PyMethodDef py_lv_textarea_create_def = { + "lv_textarea_create", + (PyCFunction)py_lv_textarea_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl slider object definitions (CPython) + * lvgl textarea object definitions (CPython) */ -static PyObject *py_lv_slider_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_slider_create(type, py_args, py_kwds); + return py_lv_textarea_create(type, py_args, py_kwds); } -static PyObject *py_lv_slider_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_textarea_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_slider_create((PyObject *)type, py_args, py_kwds); + return py_lv_textarea_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_slider_dealloc(py_lv_obj_t *self) +static void py_lv_textarea_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_slider_methods[] = { - {"set_value", (PyCFunction)py_lv_slider_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_start_value", (PyCFunction)py_lv_slider_set_start_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_range", (PyCFunction)py_lv_slider_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_value", (PyCFunction)py_lv_slider_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_value", (PyCFunction)py_lv_slider_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode", (PyCFunction)py_lv_slider_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_orientation", (PyCFunction)py_lv_slider_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_value", (PyCFunction)py_lv_slider_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_left_value", (PyCFunction)py_lv_slider_get_left_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_min_value", (PyCFunction)py_lv_slider_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_value", (PyCFunction)py_lv_slider_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_dragged", (PyCFunction)py_lv_slider_is_dragged, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode", (PyCFunction)py_lv_slider_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_orientation", (PyCFunction)py_lv_slider_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_symmetrical", (PyCFunction)py_lv_slider_is_symmetrical, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_value", (PyCFunction)py_lv_slider_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_textarea_methods[] = { + {"add_char", (PyCFunction)py_lv_textarea_add_char, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_text", (PyCFunction)py_lv_textarea_add_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_char", (PyCFunction)py_lv_textarea_delete_char, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_char_forward", (PyCFunction)py_lv_textarea_delete_char_forward, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text", (PyCFunction)py_lv_textarea_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_placeholder_text", (PyCFunction)py_lv_textarea_set_placeholder_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor_pos", (PyCFunction)py_lv_textarea_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor_click_pos", (PyCFunction)py_lv_textarea_set_cursor_click_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_password_mode", (PyCFunction)py_lv_textarea_set_password_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_password_bullet", (PyCFunction)py_lv_textarea_set_password_bullet, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_one_line", (PyCFunction)py_lv_textarea_set_one_line, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_accepted_chars", (PyCFunction)py_lv_textarea_set_accepted_chars, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_accepted_chars_static", (PyCFunction)py_lv_textarea_set_accepted_chars_static, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_length", (PyCFunction)py_lv_textarea_set_max_length, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_insert_replace", (PyCFunction)py_lv_textarea_set_insert_replace, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_selection", (PyCFunction)py_lv_textarea_set_text_selection, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_password_show_time", (PyCFunction)py_lv_textarea_set_password_show_time, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_align", (PyCFunction)py_lv_textarea_set_align, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text", (PyCFunction)py_lv_textarea_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_placeholder_text", (PyCFunction)py_lv_textarea_get_placeholder_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_label", (PyCFunction)py_lv_textarea_get_label, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cursor_pos", (PyCFunction)py_lv_textarea_get_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cursor_click_pos", (PyCFunction)py_lv_textarea_get_cursor_click_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_password_mode", (PyCFunction)py_lv_textarea_get_password_mode, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_password_bullet", (PyCFunction)py_lv_textarea_get_password_bullet, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_one_line", (PyCFunction)py_lv_textarea_get_one_line, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_accepted_chars", (PyCFunction)py_lv_textarea_get_accepted_chars, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_length", (PyCFunction)py_lv_textarea_get_max_length, METH_VARARGS | METH_KEYWORDS, NULL}, + {"text_is_selected", (PyCFunction)py_lv_textarea_text_is_selected, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text_selection", (PyCFunction)py_lv_textarea_get_text_selection, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_password_show_time", (PyCFunction)py_lv_textarea_get_password_show_time, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_current_char", (PyCFunction)py_lv_textarea_get_current_char, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_selection", (PyCFunction)py_lv_textarea_clear_selection, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cursor_right", (PyCFunction)py_lv_textarea_cursor_right, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cursor_left", (PyCFunction)py_lv_textarea_cursor_left, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cursor_down", (PyCFunction)py_lv_textarea_cursor_down, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cursor_up", (PyCFunction)py_lv_textarea_cursor_up, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_slider_type = { +PyTypeObject py_lv_textarea_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.slider", + .tp_name = "lvgl.textarea", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_slider_dealloc, + .tp_dealloc = (destructor)py_lv_textarea_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_slider_new, - .tp_methods = py_lv_slider_methods, - .tp_call = (ternaryfunc)py_lv_slider_call, + .tp_new = (newfunc)py_lv_textarea_new, + .tp_methods = py_lv_textarea_methods, + .tp_call = (ternaryfunc)py_lv_textarea_call, }; -static py_lv_obj_type_t py_lv_slider_mapping = { - .lv_obj_class = &lv_slider_class, - .py_type = &py_lv_slider_type, +static py_lv_obj_type_t py_lv_textarea_mapping = { + .lv_obj_class = &lv_textarea_class, + .py_type = &py_lv_textarea_type, }; /* - * Struct lv_span_t (CPython) + * lvgl extension definition for: + * void lv_spinbox_set_value(lv_obj_t *obj, int32_t v) */ - -extern PyMethodDef py_lv_span_t_methods[]; - -static PyObject *py_lv_span_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_span_t *data = (lv_span_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "txt") == 0) return convert_to_str((void*)data->txt); - if (strcmp(attr, "style") == 0) return mp_read_byref_lv_style_t(data->style); - if (strcmp(attr, "static_flag") == 0) return mp_obj_new_int_from_uint(data->static_flag); - if (strcmp(attr, "trailing_pos") == 0) return mp_read_byref_lv_point_t(data->trailing_pos); - if (strcmp(attr, "trailing_height") == 0) return mp_obj_new_int(data->trailing_height); - for (PyMethodDef *m = py_lv_span_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_span_t_field_names[] = {"txt", "style", "static_flag", "trailing_pos", "trailing_height", NULL}; - -static PyObject *py_lv_span_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_spinbox_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_span_t_field_names, py_lv_span_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long v_val; + if (!PyArg_ParseTuple(py_args, "l", &v_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t v = (int32_t)v_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t))lv_spinbox_set_value)(obj, v); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_span_t_type_methods[] = { - {"__dir__", py_lv_span_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_spinbox_set_value_def = { + "lv_spinbox_set_value", + (PyCFunction)py_lv_spinbox_set_value, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_span_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_span_t *data = (lv_span_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_span_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "txt") == 0) { data->txt = (void*)(char*)convert_from_str(value); result = 0; } - if (strcmp(attr, "style") == 0) { data->style = mp_write_lv_style_t(value); result = 0; } - if (strcmp(attr, "static_flag") == 0) { data->static_flag = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "trailing_pos") == 0) { data->trailing_pos = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "trailing_height") == 0) { data->trailing_height = (int32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_span_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_span_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_span_t)); -} -static void py_lv_span_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_spinbox_set_rollover(lv_obj_t *obj, bool rollover) + */ +static PyObject *py_lv_spinbox_set_rollover(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long rollover_val; + if (!PyArg_ParseTuple(py_args, "l", &rollover_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + bool rollover = (rollover_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, bool))lv_spinbox_set_rollover)(obj, rollover); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_span_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_span_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_span_t_dealloc, - .tp_getattro = (getter)py_lv_span_t_getattro, - .tp_setattro = (setter)py_lv_span_t_setattro, - .tp_new = py_lv_span_t_new, - .tp_methods = py_lv_span_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_spinbox_set_rollover_def = { + "lv_spinbox_set_rollover", + (PyCFunction)py_lv_spinbox_set_rollover, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_span_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_span_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_span_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_span_t*)self->data; -} - -static lv_span_t mp_write_scratch_lv_span_t; -static inline void* mp_write_value_ptr_lv_span_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_spinbox_set_digit_format(lv_obj_t *obj, uint32_t digit_count, uint32_t sep_pos) + */ +static PyObject *py_lv_spinbox_set_digit_format(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_span_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_span_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_span_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_span_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_span_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_span_t or dict, got None"); - } - memset(&mp_write_scratch_lv_span_t, 0, sizeof(lv_span_t)); - return &mp_write_scratch_lv_span_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long digit_count_val; long sep_pos_val; + if (!PyArg_ParseTuple(py_args, "ll", &digit_count_val, &sep_pos_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t digit_count = (uint32_t)digit_count_val; + uint32_t sep_pos = (uint32_t)sep_pos_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_spinbox_set_digit_format)(obj, digit_count, sep_pos); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_span_t(struct_obj) (*((lv_span_t*)mp_write_value_ptr_lv_span_t(struct_obj))) +static PyMethodDef py_lv_spinbox_set_digit_format_def = { + "lv_spinbox_set_digit_format", + (PyCFunction)py_lv_spinbox_set_digit_format, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_span_t(void *field) + +/* + * lvgl extension definition for: + * void lv_spinbox_set_digit_count(lv_obj_t *obj, uint32_t digit_count) + */ +static PyObject *py_lv_spinbox_set_digit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_span_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long digit_count_val; + if (!PyArg_ParseTuple(py_args, "l", &digit_count_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t digit_count = (uint32_t)digit_count_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_digit_count)(obj, digit_count); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_span_t(field) lv_to_mp_struct_own(&py_lv_span_t_type, copy_buffer(&field, sizeof(lv_span_t))) -#define mp_read_byref_lv_span_t(field) mp_read_ptr_lv_span_t(&field) +static PyMethodDef py_lv_spinbox_set_digit_count_def = { + "lv_spinbox_set_digit_count", + (PyCFunction)py_lv_spinbox_set_digit_count, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_add_span(lv_obj_t *obj) + * void lv_spinbox_set_dec_point_pos(lv_obj_t *obj, uint32_t dec_point_pos) */ -static PyObject *py_lv_spangroup_add_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_set_dec_point_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long dec_point_pos_val; + if (!PyArg_ParseTuple(py_args, "l", &dec_point_pos_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t dec_point_pos = (uint32_t)dec_point_pos_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_span_t * _res; lvpy_lock(); - _res = ((lv_span_t *(*)(lv_obj_t *))lv_spangroup_add_span)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_dec_point_pos)(obj, dec_point_pos); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_span_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_add_span_def = { - "lv_spangroup_add_span", - (PyCFunction)py_lv_spangroup_add_span, +static PyMethodDef py_lv_spinbox_set_dec_point_pos_def = { + "lv_spinbox_set_dec_point_pos", + (PyCFunction)py_lv_spinbox_set_dec_point_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48164,29 +60001,29 @@ static PyMethodDef py_lv_spangroup_add_span_def = { /* * lvgl extension definition for: - * void lv_spangroup_delete_span(lv_obj_t *obj, lv_span_t *span) + * void lv_spinbox_set_step(lv_obj_t *obj, uint32_t step) */ -static PyObject *py_lv_spangroup_delete_span(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_set_step(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *span_py; - if (!PyArg_ParseTuple(py_args, "O", &span_py)) { PyGILState_Release(gstate); return NULL; } + long step_val; + if (!PyArg_ParseTuple(py_args, "l", &step_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_span_t *span = mp_write_ptr_lv_span_t(span_py); + uint32_t step = (uint32_t)step_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_span_t *))lv_spangroup_delete_span)(obj, span); + ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_step)(obj, step); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_delete_span_def = { - "lv_spangroup_delete_span", - (PyCFunction)py_lv_spangroup_delete_span, +static PyMethodDef py_lv_spinbox_set_step_def = { + "lv_spinbox_set_step", + (PyCFunction)py_lv_spinbox_set_step, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48194,30 +60031,30 @@ static PyMethodDef py_lv_spangroup_delete_span_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_span_text(lv_obj_t *obj, lv_span_t *span, const char *text) + * void lv_spinbox_set_range(lv_obj_t *obj, int32_t min_value, int32_t max_value) */ -static PyObject *py_lv_spangroup_set_span_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *span_py; PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "OO", &span_py, &text_py)) { PyGILState_Release(gstate); return NULL; } + long min_value_val; long max_value_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_value_val, &max_value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_span_t *span = mp_write_ptr_lv_span_t(span_py); - const char *text = (const char *)(char*)convert_from_str(text_py); + int32_t min_value = (int32_t)min_value_val; + int32_t max_value = (int32_t)max_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_spangroup_set_span_text)(obj, span, text); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_spinbox_set_range)(obj, min_value, max_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_set_span_text_def = { - "lv_spangroup_set_span_text", - (PyCFunction)py_lv_spangroup_set_span_text, +static PyMethodDef py_lv_spinbox_set_range_def = { + "lv_spinbox_set_range", + (PyCFunction)py_lv_spinbox_set_range, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48225,30 +60062,29 @@ static PyMethodDef py_lv_spangroup_set_span_text_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_span_text_static(lv_obj_t *obj, lv_span_t *span, const char *text) + * void lv_spinbox_set_min_value(lv_obj_t *obj, int32_t min_value) */ -static PyObject *py_lv_spangroup_set_span_text_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *span_py; PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "OO", &span_py, &text_py)) { PyGILState_Release(gstate); return NULL; } + long min_value_val; + if (!PyArg_ParseTuple(py_args, "l", &min_value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_span_t *span = mp_write_ptr_lv_span_t(span_py); - const char *text = (const char *)(char*)convert_from_str(text_py); + int32_t min_value = (int32_t)min_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_span_t *, const char *))lv_spangroup_set_span_text_static)(obj, span, text); + ((void (*)(lv_obj_t *, int32_t))lv_spinbox_set_min_value)(obj, min_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_set_span_text_static_def = { - "lv_spangroup_set_span_text_static", - (PyCFunction)py_lv_spangroup_set_span_text_static, +static PyMethodDef py_lv_spinbox_set_min_value_def = { + "lv_spinbox_set_min_value", + (PyCFunction)py_lv_spinbox_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48256,30 +60092,29 @@ static PyMethodDef py_lv_spangroup_set_span_text_static_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_span_style(lv_obj_t *obj, lv_span_t *span, const lv_style_t *style) + * void lv_spinbox_set_max_value(lv_obj_t *obj, int32_t max_value) */ -static PyObject *py_lv_spangroup_set_span_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *span_py; PyObject *style_py; - if (!PyArg_ParseTuple(py_args, "OO", &span_py, &style_py)) { PyGILState_Release(gstate); return NULL; } + long max_value_val; + if (!PyArg_ParseTuple(py_args, "l", &max_value_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_span_t *span = mp_write_ptr_lv_span_t(span_py); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + int32_t max_value = (int32_t)max_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_span_t *, const lv_style_t *))lv_spangroup_set_span_style)(obj, span, style); + ((void (*)(lv_obj_t *, int32_t))lv_spinbox_set_max_value)(obj, max_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_set_span_style_def = { - "lv_spangroup_set_span_style", - (PyCFunction)py_lv_spangroup_set_span_style, +static PyMethodDef py_lv_spinbox_set_max_value_def = { + "lv_spinbox_set_max_value", + (PyCFunction)py_lv_spinbox_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48287,29 +60122,29 @@ static PyMethodDef py_lv_spangroup_set_span_style_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_align(lv_obj_t *obj, lv_text_align_t align) + * void lv_spinbox_set_cursor_pos(lv_obj_t *obj, uint32_t pos) */ -static PyObject *py_lv_spangroup_set_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_set_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } + long pos_val; + if (!PyArg_ParseTuple(py_args, "l", &pos_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_text_align_t align = (int)mp_obj_get_int(align_py); + uint32_t pos = (uint32_t)pos_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_text_align_t))lv_spangroup_set_align)(obj, align); + ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_cursor_pos)(obj, pos); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_set_align_def = { - "lv_spangroup_set_align", - (PyCFunction)py_lv_spangroup_set_align, +static PyMethodDef py_lv_spinbox_set_cursor_pos_def = { + "lv_spinbox_set_cursor_pos", + (PyCFunction)py_lv_spinbox_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48317,29 +60152,29 @@ static PyMethodDef py_lv_spangroup_set_align_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_overflow(lv_obj_t *obj, lv_span_overflow_t overflow) + * void lv_spinbox_set_digit_step_direction(lv_obj_t *obj, lv_dir_t direction) */ -static PyObject *py_lv_spangroup_set_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_set_digit_step_direction(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *overflow_py; - if (!PyArg_ParseTuple(py_args, "O", &overflow_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *direction_py; + if (!PyArg_ParseTuple(py_args, "O", &direction_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_span_overflow_t overflow = (int)mp_obj_get_int(overflow_py); + lv_dir_t direction = (int)mp_obj_get_int(direction_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_span_overflow_t))lv_spangroup_set_overflow)(obj, overflow); + ((void (*)(lv_obj_t *, lv_dir_t))lv_spinbox_set_digit_step_direction)(obj, direction); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_set_overflow_def = { - "lv_spangroup_set_overflow", - (PyCFunction)py_lv_spangroup_set_overflow, +static PyMethodDef py_lv_spinbox_set_digit_step_direction_def = { + "lv_spinbox_set_digit_step_direction", + (PyCFunction)py_lv_spinbox_set_digit_step_direction, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48347,29 +60182,28 @@ static PyMethodDef py_lv_spangroup_set_overflow_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_indent(lv_obj_t *obj, int32_t indent) + * bool lv_spinbox_get_rollover(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_set_indent(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_rollover(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long indent_val; - if (!PyArg_ParseTuple(py_args, "l", &indent_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t indent = (int32_t)indent_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_spangroup_set_indent)(obj, indent); + _res = ((bool (*)(lv_obj_t *))lv_spinbox_get_rollover)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_spangroup_set_indent_def = { - "lv_spangroup_set_indent", - (PyCFunction)py_lv_spangroup_set_indent, +static PyMethodDef py_lv_spinbox_get_rollover_def = { + "lv_spinbox_get_rollover", + (PyCFunction)py_lv_spinbox_get_rollover, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48377,29 +60211,28 @@ static PyMethodDef py_lv_spangroup_set_indent_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_mode(lv_obj_t *obj, lv_span_mode_t mode) + * int32_t lv_spinbox_get_value(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_set_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_span_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_span_mode_t))lv_spangroup_set_mode)(obj, mode); + _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_spangroup_set_mode_def = { - "lv_spangroup_set_mode", - (PyCFunction)py_lv_spangroup_set_mode, +static PyMethodDef py_lv_spinbox_get_value_def = { + "lv_spinbox_get_value", + (PyCFunction)py_lv_spinbox_get_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48407,29 +60240,28 @@ static PyMethodDef py_lv_spangroup_set_mode_def = { /* * lvgl extension definition for: - * void lv_spangroup_set_max_lines(lv_obj_t *obj, int32_t lines) + * int32_t lv_spinbox_get_step(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_set_max_lines(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_step(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long lines_val; - if (!PyArg_ParseTuple(py_args, "l", &lines_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t lines = (int32_t)lines_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_spangroup_set_max_lines)(obj, lines); + _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_step)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_spangroup_set_max_lines_def = { - "lv_spangroup_set_max_lines", - (PyCFunction)py_lv_spangroup_set_max_lines, +static PyMethodDef py_lv_spinbox_get_step_def = { + "lv_spinbox_get_step", + (PyCFunction)py_lv_spinbox_get_step, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48437,30 +60269,28 @@ static PyMethodDef py_lv_spangroup_set_max_lines_def = { /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_get_child(const lv_obj_t *obj, int32_t id) + * uint32_t lv_spinbox_get_digit_count(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_child(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_digit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long id_val; - if (!PyArg_ParseTuple(py_args, "l", &id_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t id = (int32_t)id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_span_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_span_t *(*)(const lv_obj_t *, int32_t))lv_spangroup_get_child)(obj, id); + _res = ((uint32_t (*)(lv_obj_t *))lv_spinbox_get_digit_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_span_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_spangroup_get_child_def = { - "lv_spangroup_get_child", - (PyCFunction)py_lv_spangroup_get_child, +static PyMethodDef py_lv_spinbox_get_digit_count_def = { + "lv_spinbox_get_digit_count", + (PyCFunction)py_lv_spinbox_get_digit_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48468,9 +60298,9 @@ static PyMethodDef py_lv_spangroup_get_child_def = { /* * lvgl extension definition for: - * uint32_t lv_spangroup_get_span_count(const lv_obj_t *obj) + * uint32_t lv_spinbox_get_dec_point_pos(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_span_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_dec_point_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -48480,16 +60310,16 @@ static PyObject *py_lv_spangroup_get_span_count(PyObject *self, PyObject *py_arg uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_spangroup_get_span_count)(obj); + _res = ((uint32_t (*)(lv_obj_t *))lv_spinbox_get_dec_point_pos)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_spangroup_get_span_count_def = { - "lv_spangroup_get_span_count", - (PyCFunction)py_lv_spangroup_get_span_count, +static PyMethodDef py_lv_spinbox_get_dec_point_pos_def = { + "lv_spinbox_get_dec_point_pos", + (PyCFunction)py_lv_spinbox_get_dec_point_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48497,9 +60327,9 @@ static PyMethodDef py_lv_spangroup_get_span_count_def = { /* * lvgl extension definition for: - * lv_text_align_t lv_spangroup_get_align(lv_obj_t *obj) + * int32_t lv_spinbox_get_min_value(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -48507,18 +60337,18 @@ static PyObject *py_lv_spangroup_get_align(PyObject *self, PyObject *py_args, Py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_text_align_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_text_align_t (*)(lv_obj_t *))lv_spangroup_get_align)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_min_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_spangroup_get_align_def = { - "lv_spangroup_get_align", - (PyCFunction)py_lv_spangroup_get_align, +static PyMethodDef py_lv_spinbox_get_min_value_def = { + "lv_spinbox_get_min_value", + (PyCFunction)py_lv_spinbox_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48526,9 +60356,9 @@ static PyMethodDef py_lv_spangroup_get_align_def = { /* * lvgl extension definition for: - * lv_span_overflow_t lv_spangroup_get_overflow(lv_obj_t *obj) + * int32_t lv_spinbox_get_max_value(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_overflow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -48536,18 +60366,18 @@ static PyObject *py_lv_spangroup_get_overflow(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_span_overflow_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_span_overflow_t (*)(lv_obj_t *))lv_spangroup_get_overflow)(obj); + _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_max_value)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_spangroup_get_overflow_def = { - "lv_spangroup_get_overflow", - (PyCFunction)py_lv_spangroup_get_overflow, +static PyMethodDef py_lv_spinbox_get_max_value_def = { + "lv_spinbox_get_max_value", + (PyCFunction)py_lv_spinbox_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48555,9 +60385,9 @@ static PyMethodDef py_lv_spangroup_get_overflow_def = { /* * lvgl extension definition for: - * int32_t lv_spangroup_get_indent(lv_obj_t *obj) + * lv_dir_t lv_spinbox_get_digit_step_direction(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_indent(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_get_digit_step_direction(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -48565,18 +60395,18 @@ static PyObject *py_lv_spangroup_get_indent(PyObject *self, PyObject *py_args, P lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_dir_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_spangroup_get_indent)(obj); + _res = ((lv_dir_t (*)(lv_obj_t *))lv_spinbox_get_digit_step_direction)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_spangroup_get_indent_def = { - "lv_spangroup_get_indent", - (PyCFunction)py_lv_spangroup_get_indent, +static PyMethodDef py_lv_spinbox_get_digit_step_direction_def = { + "lv_spinbox_get_digit_step_direction", + (PyCFunction)py_lv_spinbox_get_digit_step_direction, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48584,9 +60414,9 @@ static PyMethodDef py_lv_spangroup_get_indent_def = { /* * lvgl extension definition for: - * lv_span_mode_t lv_spangroup_get_mode(lv_obj_t *obj) + * void lv_spinbox_step_next(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_step_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -48594,18 +60424,17 @@ static PyObject *py_lv_spangroup_get_mode(PyObject *self, PyObject *py_args, PyO lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_span_mode_t _res; lvpy_lock(); - _res = ((lv_span_mode_t (*)(lv_obj_t *))lv_spangroup_get_mode)(obj); + ((void (*)(lv_obj_t *))lv_spinbox_step_next)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_get_mode_def = { - "lv_spangroup_get_mode", - (PyCFunction)py_lv_spangroup_get_mode, +static PyMethodDef py_lv_spinbox_step_next_def = { + "lv_spinbox_step_next", + (PyCFunction)py_lv_spinbox_step_next, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48613,9 +60442,9 @@ static PyMethodDef py_lv_spangroup_get_mode_def = { /* * lvgl extension definition for: - * int32_t lv_spangroup_get_max_lines(lv_obj_t *obj) + * void lv_spinbox_step_prev(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_max_lines(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_step_prev(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -48623,18 +60452,17 @@ static PyObject *py_lv_spangroup_get_max_lines(PyObject *self, PyObject *py_args lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_spangroup_get_max_lines)(obj); + ((void (*)(lv_obj_t *))lv_spinbox_step_prev)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_get_max_lines_def = { - "lv_spangroup_get_max_lines", - (PyCFunction)py_lv_spangroup_get_max_lines, +static PyMethodDef py_lv_spinbox_step_prev_def = { + "lv_spinbox_step_prev", + (PyCFunction)py_lv_spinbox_step_prev, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48642,9 +60470,9 @@ static PyMethodDef py_lv_spangroup_get_max_lines_def = { /* * lvgl extension definition for: - * int32_t lv_spangroup_get_max_line_height(lv_obj_t *obj) + * void lv_spinbox_increment(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_max_line_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_increment(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -48652,18 +60480,17 @@ static PyObject *py_lv_spangroup_get_max_line_height(PyObject *self, PyObject *p lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_spangroup_get_max_line_height)(obj); + ((void (*)(lv_obj_t *))lv_spinbox_increment)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_get_max_line_height_def = { - "lv_spangroup_get_max_line_height", - (PyCFunction)py_lv_spangroup_get_max_line_height, +static PyMethodDef py_lv_spinbox_increment_def = { + "lv_spinbox_increment", + (PyCFunction)py_lv_spinbox_increment, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48671,30 +60498,27 @@ static PyMethodDef py_lv_spangroup_get_max_line_height_def = { /* * lvgl extension definition for: - * uint32_t lv_spangroup_get_expand_width(lv_obj_t *obj, uint32_t max_width) + * void lv_spinbox_decrement(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_expand_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_decrement(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long max_width_val; - if (!PyArg_ParseTuple(py_args, "l", &max_width_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - uint32_t max_width = (uint32_t)max_width_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *, uint32_t))lv_spangroup_get_expand_width)(obj, max_width); + ((void (*)(lv_obj_t *))lv_spinbox_decrement)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_get_expand_width_def = { - "lv_spangroup_get_expand_width", - (PyCFunction)py_lv_spangroup_get_expand_width, +static PyMethodDef py_lv_spinbox_decrement_def = { + "lv_spinbox_decrement", + (PyCFunction)py_lv_spinbox_decrement, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48702,196 +60526,279 @@ static PyMethodDef py_lv_spangroup_get_expand_width_def = { /* * lvgl extension definition for: - * int32_t lv_spangroup_get_expand_height(lv_obj_t *obj, int32_t width) + * lv_observer_t *lv_spinbox_bind_value(lv_obj_t *obj, lv_subject_t *subject) */ -static PyObject *py_lv_spangroup_get_expand_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinbox_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long width_val; - if (!PyArg_ParseTuple(py_args, "l", &width_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *subject_py; + if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t width = (int32_t)width_val; + lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *, int32_t))lv_spangroup_get_expand_height)(obj, width); + _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_spinbox_bind_value)(obj, subject); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_spangroup_get_expand_height_def = { - "lv_spangroup_get_expand_height", - (PyCFunction)py_lv_spangroup_get_expand_height, +static PyMethodDef py_lv_spinbox_bind_value_def = { + "lv_spinbox_bind_value", + (PyCFunction)py_lv_spinbox_bind_value, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_span_coords_t (CPython) + * lvgl extension definition for: + * lv_obj_t *lv_spinbox_create(lv_obj_t *parent) */ - -extern PyMethodDef py_lv_span_coords_t_methods[]; - -static PyObject *py_lv_span_coords_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_spinbox_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_span_coords_t *data = (lv_span_coords_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "heading") == 0) return mp_read_byref_lv_area_t(data->heading); - if (strcmp(attr, "middle") == 0) return mp_read_byref_lv_area_t(data->middle); - if (strcmp(attr, "trailing") == 0) return mp_read_byref_lv_area_t(data->trailing); - for (PyMethodDef *m = py_lv_span_coords_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} } - return PyObject_GenericGetAttr((PyObject *)self, name); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_obj_t * _res; + lvpy_lock(); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_spinbox_create)(parent); + lvpy_unlock(); + + PyGILState_Release(gstate); + return lv_to_mp((void*)_res); } -static const char *const py_lv_span_coords_t_field_names[] = {"heading", "middle", "trailing", NULL}; +static PyMethodDef py_lv_spinbox_create_def = { + "lv_spinbox_create", + (PyCFunction)py_lv_spinbox_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_span_coords_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl spinbox object definitions (CPython) + */ +static PyObject *py_lv_spinbox_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_span_coords_t_field_names, py_lv_span_coords_t_methods); + (void)type; + return py_lv_spinbox_create(type, py_args, py_kwds); } -static PyMethodDef py_lv_span_coords_t_type_methods[] = { - {"__dir__", py_lv_span_coords_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_span_coords_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static PyObject *py_lv_spinbox_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_span_coords_t *data = (lv_span_coords_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_span_coords_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "heading") == 0) { data->heading = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "middle") == 0) { data->middle = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "trailing") == 0) { data->trailing = mp_write_lv_area_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_span_coords_t' object has no attribute '%s'", attr); - } - return result; + return py_lv_spinbox_create((PyObject *)type, py_args, py_kwds); } -static PyObject *py_lv_span_coords_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static void py_lv_spinbox_dealloc(py_lv_obj_t *self) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_span_coords_t)); + lvpy_dealloc_obj(self); } -static void py_lv_span_coords_t_dealloc(py_lv_struct_t *self) +static PyMethodDef py_lv_spinbox_methods[] = { + {"set_value", (PyCFunction)py_lv_spinbox_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rollover", (PyCFunction)py_lv_spinbox_set_rollover, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_digit_format", (PyCFunction)py_lv_spinbox_set_digit_format, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_digit_count", (PyCFunction)py_lv_spinbox_set_digit_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_dec_point_pos", (PyCFunction)py_lv_spinbox_set_dec_point_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_step", (PyCFunction)py_lv_spinbox_set_step, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_range", (PyCFunction)py_lv_spinbox_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_value", (PyCFunction)py_lv_spinbox_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_value", (PyCFunction)py_lv_spinbox_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor_pos", (PyCFunction)py_lv_spinbox_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_digit_step_direction", (PyCFunction)py_lv_spinbox_set_digit_step_direction, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rollover", (PyCFunction)py_lv_spinbox_get_rollover, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_value", (PyCFunction)py_lv_spinbox_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_step", (PyCFunction)py_lv_spinbox_get_step, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_digit_count", (PyCFunction)py_lv_spinbox_get_digit_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dec_point_pos", (PyCFunction)py_lv_spinbox_get_dec_point_pos, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_min_value", (PyCFunction)py_lv_spinbox_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_value", (PyCFunction)py_lv_spinbox_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_digit_step_direction", (PyCFunction)py_lv_spinbox_get_digit_step_direction, METH_VARARGS | METH_KEYWORDS, NULL}, + {"step_next", (PyCFunction)py_lv_spinbox_step_next, METH_VARARGS | METH_KEYWORDS, NULL}, + {"step_prev", (PyCFunction)py_lv_spinbox_step_prev, METH_VARARGS | METH_KEYWORDS, NULL}, + {"increment", (PyCFunction)py_lv_spinbox_increment, METH_VARARGS | METH_KEYWORDS, NULL}, + {"decrement", (PyCFunction)py_lv_spinbox_decrement, METH_VARARGS | METH_KEYWORDS, NULL}, + {"bind_value", (PyCFunction)py_lv_spinbox_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_spinbox_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.spinbox", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_spinbox_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_spinbox_new, + .tp_methods = py_lv_spinbox_methods, + .tp_call = (ternaryfunc)py_lv_spinbox_call, +}; + +static py_lv_obj_type_t py_lv_spinbox_mapping = { + .lv_obj_class = &lv_spinbox_class, + .py_type = &py_lv_spinbox_type, +}; + + +/* + * lvgl extension definition for: + * void lv_spinner_set_anim_params(lv_obj_t *obj, uint32_t t, uint32_t angle) + */ +static PyObject *py_lv_spinner_set_anim_params(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long t_val; long angle_val; + if (!PyArg_ParseTuple(py_args, "ll", &t_val, &angle_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t t = (uint32_t)t_val; + uint32_t angle = (uint32_t)angle_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_spinner_set_anim_params)(obj, t, angle); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_span_coords_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_span_coords_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_span_coords_t_dealloc, - .tp_getattro = (getter)py_lv_span_coords_t_getattro, - .tp_setattro = (setter)py_lv_span_coords_t_setattro, - .tp_new = py_lv_span_coords_t_new, - .tp_methods = py_lv_span_coords_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_spinner_set_anim_params_def = { + "lv_spinner_set_anim_params", + (PyCFunction)py_lv_spinner_set_anim_params, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_span_coords_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * void lv_spinner_set_anim_duration(lv_obj_t *obj, uint32_t t) + */ +static PyObject *py_lv_spinner_set_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_span_coords_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_span_coords_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_span_coords_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long t_val; + if (!PyArg_ParseTuple(py_args, "l", &t_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t t = (uint32_t)t_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_spinner_set_anim_duration)(obj, t); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static lv_span_coords_t mp_write_scratch_lv_span_coords_t; +static PyMethodDef py_lv_spinner_set_anim_duration_def = { + "lv_spinner_set_anim_duration", + (PyCFunction)py_lv_spinner_set_anim_duration, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_span_coords_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_spinner_set_arc_sweep(lv_obj_t *obj, uint32_t angle) + */ +static PyObject *py_lv_spinner_set_arc_sweep(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_span_coords_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_span_coords_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_span_coords_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_span_coords_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_span_coords_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_span_coords_t or dict, got None"); - } - memset(&mp_write_scratch_lv_span_coords_t, 0, sizeof(lv_span_coords_t)); - return &mp_write_scratch_lv_span_coords_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long angle_val; + if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t angle = (uint32_t)angle_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t))lv_spinner_set_arc_sweep)(obj, angle); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_span_coords_t(struct_obj) (*((lv_span_coords_t*)mp_write_value_ptr_lv_span_coords_t(struct_obj))) +static PyMethodDef py_lv_spinner_set_arc_sweep_def = { + "lv_spinner_set_arc_sweep", + (PyCFunction)py_lv_spinner_set_arc_sweep, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_span_coords_t(void *field) + +/* + * lvgl extension definition for: + * uint32_t lv_spinner_get_anim_duration(lv_obj_t *obj) + */ +static PyObject *py_lv_spinner_get_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_span_coords_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_obj_t *))lv_spinner_get_anim_duration)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -#define mp_read_lv_span_coords_t(field) lv_to_mp_struct_own(&py_lv_span_coords_t_type, copy_buffer(&field, sizeof(lv_span_coords_t))) -#define mp_read_byref_lv_span_coords_t(field) mp_read_ptr_lv_span_coords_t(&field) +static PyMethodDef py_lv_spinner_get_anim_duration_def = { + "lv_spinner_get_anim_duration", + (PyCFunction)py_lv_spinner_get_anim_duration, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * lv_span_coords_t lv_spangroup_get_span_coords(lv_obj_t *obj, const lv_span_t *span) + * uint32_t lv_spinner_get_arc_sweep(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_get_span_coords(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinner_get_arc_sweep(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *span_py; - if (!PyArg_ParseTuple(py_args, "O", &span_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const lv_span_t *span = (const lv_span_t *)mp_write_ptr_lv_span_t(span_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_span_coords_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_span_coords_t (*)(lv_obj_t *, const lv_span_t *))lv_spangroup_get_span_coords)(obj, span); + _res = ((uint32_t (*)(lv_obj_t *))lv_spinner_get_arc_sweep)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_span_coords_t(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_spangroup_get_span_coords_def = { - "lv_spangroup_get_span_coords", - (PyCFunction)py_lv_spangroup_get_span_coords, +static PyMethodDef py_lv_spinner_get_arc_sweep_def = { + "lv_spinner_get_arc_sweep", + (PyCFunction)py_lv_spinner_get_arc_sweep, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48899,58 +60806,110 @@ static PyMethodDef py_lv_spangroup_get_span_coords_def = { /* * lvgl extension definition for: - * lv_span_t *lv_spangroup_get_span_by_point(lv_obj_t *obj, const lv_point_t *point) + * lv_obj_t *lv_spinner_create(lv_obj_t *parent) */ -static PyObject *py_lv_spangroup_get_span_by_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_spinner_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_span_t * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_span_t *(*)(lv_obj_t *, const lv_point_t *))lv_spangroup_get_span_by_point)(obj, point); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_spinner_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_span_t((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_spangroup_get_span_by_point_def = { - "lv_spangroup_get_span_by_point", - (PyCFunction)py_lv_spangroup_get_span_by_point, +static PyMethodDef py_lv_spinner_create_def = { + "lv_spinner_create", + (PyCFunction)py_lv_spinner_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl spinner object definitions (CPython) + */ +static PyObject *py_lv_spinner_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_spinner_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_spinner_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_spinner_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_spinner_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_spinner_methods[] = { + {"set_anim_params", (PyCFunction)py_lv_spinner_set_anim_params, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_anim_duration", (PyCFunction)py_lv_spinner_set_anim_duration, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_arc_sweep", (PyCFunction)py_lv_spinner_set_arc_sweep, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_anim_duration", (PyCFunction)py_lv_spinner_get_anim_duration, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_arc_sweep", (PyCFunction)py_lv_spinner_get_arc_sweep, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_spinner_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.spinner", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_spinner_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_spinner_new, + .tp_methods = py_lv_spinner_methods, + .tp_call = (ternaryfunc)py_lv_spinner_call, +}; + +static py_lv_obj_type_t py_lv_spinner_mapping = { + .lv_obj_class = &lv_spinner_class, + .py_type = &py_lv_spinner_type, +}; + + /* * lvgl extension definition for: - * void lv_spangroup_refresh(lv_obj_t *obj) + * void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation) */ -static PyObject *py_lv_spangroup_refresh(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_switch_set_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *orientation_py; + if (!PyArg_ParseTuple(py_args, "O", &orientation_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_switch_orientation_t orientation = (int)mp_obj_get_int(orientation_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_spangroup_refresh)(obj); + ((void (*)(lv_obj_t *, lv_switch_orientation_t))lv_switch_set_orientation)(obj, orientation); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_spangroup_refresh_def = { - "lv_spangroup_refresh", - (PyCFunction)py_lv_spangroup_refresh, +static PyMethodDef py_lv_switch_set_orientation_def = { + "lv_switch_set_orientation", + (PyCFunction)py_lv_switch_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48958,32 +60917,28 @@ static PyMethodDef py_lv_spangroup_refresh_def = { /* * lvgl extension definition for: - * lv_observer_t *lv_spangroup_bind_span_text(lv_obj_t *obj, lv_span_t *span, lv_subject_t *subject, const char *fmt) + * lv_switch_orientation_t lv_switch_get_orientation(lv_obj_t *obj) */ -static PyObject *py_lv_spangroup_bind_span_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_switch_get_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *span_py; PyObject *subject_py; PyObject *fmt_py; - if (!PyArg_ParseTuple(py_args, "OOO", &span_py, &subject_py, &fmt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_span_t *span = mp_write_ptr_lv_span_t(span_py); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - const char *fmt = (const char *)(char*)convert_from_str(fmt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + lv_switch_orientation_t _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_span_t *, lv_subject_t *, const char *))lv_spangroup_bind_span_text)(obj, span, subject, fmt); + _res = ((lv_switch_orientation_t (*)(lv_obj_t *))lv_switch_get_orientation)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_spangroup_bind_span_text_def = { - "lv_spangroup_bind_span_text", - (PyCFunction)py_lv_spangroup_bind_span_text, +static PyMethodDef py_lv_switch_get_orientation_def = { + "lv_switch_get_orientation", + (PyCFunction)py_lv_switch_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -48991,9 +60946,9 @@ static PyMethodDef py_lv_spangroup_bind_span_text_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_spangroup_create(lv_obj_t *parent) + * lv_obj_t *lv_switch_create(lv_obj_t *parent) */ -static PyObject *py_lv_spangroup_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_switch_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -49009,111 +60964,91 @@ static PyObject *py_lv_spangroup_create(PyObject *self, PyObject *py_args, PyObj lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_spangroup_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_switch_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_spangroup_create_def = { - "lv_spangroup_create", - (PyCFunction)py_lv_spangroup_create, +static PyMethodDef py_lv_switch_create_def = { + "lv_switch_create", + (PyCFunction)py_lv_switch_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl spangroup object definitions (CPython) + * lvgl switch object definitions (CPython) */ -static PyObject *py_lv_spangroup_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_switch_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_spangroup_create(type, py_args, py_kwds); + return py_lv_switch_create(type, py_args, py_kwds); } -static PyObject *py_lv_spangroup_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_switch_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_spangroup_create((PyObject *)type, py_args, py_kwds); + return py_lv_switch_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_spangroup_dealloc(py_lv_obj_t *self) +static void py_lv_switch_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_spangroup_methods[] = { - {"add_span", (PyCFunction)py_lv_spangroup_add_span, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_span", (PyCFunction)py_lv_spangroup_delete_span, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_span_text", (PyCFunction)py_lv_spangroup_set_span_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_span_text_static", (PyCFunction)py_lv_spangroup_set_span_text_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_span_style", (PyCFunction)py_lv_spangroup_set_span_style, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_align", (PyCFunction)py_lv_spangroup_set_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_overflow", (PyCFunction)py_lv_spangroup_set_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_indent", (PyCFunction)py_lv_spangroup_set_indent, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode", (PyCFunction)py_lv_spangroup_set_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_lines", (PyCFunction)py_lv_spangroup_set_max_lines, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_child", (PyCFunction)py_lv_spangroup_get_child, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_span_count", (PyCFunction)py_lv_spangroup_get_span_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_align", (PyCFunction)py_lv_spangroup_get_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_overflow", (PyCFunction)py_lv_spangroup_get_overflow, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_indent", (PyCFunction)py_lv_spangroup_get_indent, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode", (PyCFunction)py_lv_spangroup_get_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_lines", (PyCFunction)py_lv_spangroup_get_max_lines, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_line_height", (PyCFunction)py_lv_spangroup_get_max_line_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_expand_width", (PyCFunction)py_lv_spangroup_get_expand_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_expand_height", (PyCFunction)py_lv_spangroup_get_expand_height, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_span_coords", (PyCFunction)py_lv_spangroup_get_span_coords, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_span_by_point", (PyCFunction)py_lv_spangroup_get_span_by_point, METH_VARARGS | METH_KEYWORDS, NULL}, - {"refresh", (PyCFunction)py_lv_spangroup_refresh, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_span_text", (PyCFunction)py_lv_spangroup_bind_span_text, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_switch_methods[] = { + {"set_orientation", (PyCFunction)py_lv_switch_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_orientation", (PyCFunction)py_lv_switch_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_spangroup_type = { +PyTypeObject py_lv_switch_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.spangroup", + .tp_name = "lvgl.switch", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_spangroup_dealloc, + .tp_dealloc = (destructor)py_lv_switch_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_spangroup_new, - .tp_methods = py_lv_spangroup_methods, - .tp_call = (ternaryfunc)py_lv_spangroup_call, + .tp_new = (newfunc)py_lv_switch_new, + .tp_methods = py_lv_switch_methods, + .tp_call = (ternaryfunc)py_lv_switch_call, }; -static py_lv_obj_type_t py_lv_spangroup_mapping = { - .lv_obj_class = &lv_spangroup_class, - .py_type = &py_lv_spangroup_type, +static py_lv_obj_type_t py_lv_switch_mapping = { + .lv_obj_class = &lv_switch_class, + .py_type = &py_lv_switch_type, }; /* * lvgl extension definition for: - * void lv_textarea_add_char(lv_obj_t *obj, uint32_t c) + * void lv_table_set_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col, const char *txt) */ -static PyObject *py_lv_textarea_add_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_set_cell_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + long row_val; long col_val; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &txt_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t c = (uint32_t)c_val; + uint32_t row = (uint32_t)row_val; + uint32_t col = (uint32_t)col_val; + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_textarea_add_char)(obj, c); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, const char *))lv_table_set_cell_value)(obj, row, col, txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_add_char_def = { - "lv_textarea_add_char", - (PyCFunction)py_lv_textarea_add_char, +static PyMethodDef py_lv_table_set_cell_value_def = { + "lv_table_set_cell_value", + (PyCFunction)py_lv_table_set_cell_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49121,29 +61056,29 @@ static PyMethodDef py_lv_textarea_add_char_def = { /* * lvgl extension definition for: - * void lv_textarea_add_text(lv_obj_t *obj, const char *txt) + * void lv_table_set_row_count(lv_obj_t *obj, uint32_t row_cnt) */ -static PyObject *py_lv_textarea_add_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_set_row_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + long row_cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &row_cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t row_cnt = (uint32_t)row_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_textarea_add_text)(obj, txt); + ((void (*)(lv_obj_t *, uint32_t))lv_table_set_row_count)(obj, row_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_add_text_def = { - "lv_textarea_add_text", - (PyCFunction)py_lv_textarea_add_text, +static PyMethodDef py_lv_table_set_row_count_def = { + "lv_table_set_row_count", + (PyCFunction)py_lv_table_set_row_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49151,27 +61086,29 @@ static PyMethodDef py_lv_textarea_add_text_def = { /* * lvgl extension definition for: - * void lv_textarea_delete_char(lv_obj_t *obj) + * void lv_table_set_column_count(lv_obj_t *obj, uint32_t col_cnt) */ -static PyObject *py_lv_textarea_delete_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_set_column_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long col_cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &col_cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t col_cnt = (uint32_t)col_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_textarea_delete_char)(obj); + ((void (*)(lv_obj_t *, uint32_t))lv_table_set_column_count)(obj, col_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_delete_char_def = { - "lv_textarea_delete_char", - (PyCFunction)py_lv_textarea_delete_char, +static PyMethodDef py_lv_table_set_column_count_def = { + "lv_table_set_column_count", + (PyCFunction)py_lv_table_set_column_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49179,27 +61116,62 @@ static PyMethodDef py_lv_textarea_delete_char_def = { /* * lvgl extension definition for: - * void lv_textarea_delete_char_forward(lv_obj_t *obj) + * void lv_table_set_column_width(lv_obj_t *obj, uint32_t col_id, int32_t w) */ -static PyObject *py_lv_textarea_delete_char_forward(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_set_column_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; + long col_id_val; long w_val; + if (!PyArg_ParseTuple(py_args, "ll", &col_id_val, &w_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t col_id = (uint32_t)col_id_val; + int32_t w = (int32_t)w_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t, int32_t))lv_table_set_column_width)(obj, col_id, w); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_table_set_column_width_def = { + "lv_table_set_column_width", + (PyCFunction)py_lv_table_set_column_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + +/* + * lvgl extension definition for: + * void lv_table_set_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) + */ +static PyObject *py_lv_table_set_cell_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long row_val; long col_val; PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + uint32_t row = (uint32_t)row_val; + uint32_t col = (uint32_t)col_val; + lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_textarea_delete_char_forward)(obj); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_table_set_cell_ctrl)(obj, row, col, ctrl); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_delete_char_forward_def = { - "lv_textarea_delete_char_forward", - (PyCFunction)py_lv_textarea_delete_char_forward, +static PyMethodDef py_lv_table_set_cell_ctrl_def = { + "lv_table_set_cell_ctrl", + (PyCFunction)py_lv_table_set_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49207,29 +61179,31 @@ static PyMethodDef py_lv_textarea_delete_char_forward_def = { /* * lvgl extension definition for: - * void lv_textarea_set_text(lv_obj_t *obj, const char *txt) + * void lv_table_clear_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) */ -static PyObject *py_lv_textarea_set_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_clear_cell_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + long row_val; long col_val; PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t row = (uint32_t)row_val; + uint32_t col = (uint32_t)col_val; + lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_textarea_set_text)(obj, txt); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_table_clear_cell_ctrl)(obj, row, col, ctrl); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_set_text_def = { - "lv_textarea_set_text", - (PyCFunction)py_lv_textarea_set_text, +static PyMethodDef py_lv_table_clear_cell_ctrl_def = { + "lv_table_clear_cell_ctrl", + (PyCFunction)py_lv_table_clear_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49237,29 +61211,31 @@ static PyMethodDef py_lv_textarea_set_text_def = { /* * lvgl extension definition for: - * void lv_textarea_set_placeholder_text(lv_obj_t *obj, const char *txt) + * void lv_table_set_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col, void *user_data) */ -static PyObject *py_lv_textarea_set_placeholder_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_set_cell_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + long row_val; long col_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); + void *user_data = mp_to_ptr(user_data_py); + uint16_t row = (uint16_t)row_val; + uint16_t col = (uint16_t)col_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_textarea_set_placeholder_text)(obj, txt); + ((void (*)(lv_obj_t *, uint16_t, uint16_t, void *))lv_table_set_cell_user_data)(obj, row, col, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_set_placeholder_text_def = { - "lv_textarea_set_placeholder_text", - (PyCFunction)py_lv_textarea_set_placeholder_text, +static PyMethodDef py_lv_table_set_cell_user_data_def = { + "lv_table_set_cell_user_data", + (PyCFunction)py_lv_table_set_cell_user_data, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49267,29 +61243,30 @@ static PyMethodDef py_lv_textarea_set_placeholder_text_def = { /* * lvgl extension definition for: - * void lv_textarea_set_cursor_pos(lv_obj_t *obj, int32_t pos) + * void lv_table_set_selected_cell(lv_obj_t *obj, uint16_t row, uint16_t col) */ -static PyObject *py_lv_textarea_set_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_set_selected_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long pos_val; - if (!PyArg_ParseTuple(py_args, "l", &pos_val)) { PyGILState_Release(gstate); return NULL; } + long row_val; long col_val; + if (!PyArg_ParseTuple(py_args, "ll", &row_val, &col_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - int32_t pos = (int32_t)pos_val; + uint16_t row = (uint16_t)row_val; + uint16_t col = (uint16_t)col_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_textarea_set_cursor_pos)(obj, pos); + ((void (*)(lv_obj_t *, uint16_t, uint16_t))lv_table_set_selected_cell)(obj, row, col); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_set_cursor_pos_def = { - "lv_textarea_set_cursor_pos", - (PyCFunction)py_lv_textarea_set_cursor_pos, +static PyMethodDef py_lv_table_set_selected_cell_def = { + "lv_table_set_selected_cell", + (PyCFunction)py_lv_table_set_selected_cell, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49297,29 +61274,31 @@ static PyMethodDef py_lv_textarea_set_cursor_pos_def = { /* * lvgl extension definition for: - * void lv_textarea_set_cursor_click_pos(lv_obj_t *obj, bool en) + * const char *lv_table_get_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col) */ -static PyObject *py_lv_textarea_set_cursor_click_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_get_cell_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + long row_val; long col_val; + if (!PyArg_ParseTuple(py_args, "ll", &row_val, &col_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + uint32_t row = (uint32_t)row_val; + uint32_t col = (uint32_t)col_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_textarea_set_cursor_click_pos)(obj, en); + _res = ((const char *(*)(lv_obj_t *, uint32_t, uint32_t))lv_table_get_cell_value)(obj, row, col); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_textarea_set_cursor_click_pos_def = { - "lv_textarea_set_cursor_click_pos", - (PyCFunction)py_lv_textarea_set_cursor_click_pos, +static PyMethodDef py_lv_table_get_cell_value_def = { + "lv_table_get_cell_value", + (PyCFunction)py_lv_table_get_cell_value, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49327,29 +61306,28 @@ static PyMethodDef py_lv_textarea_set_cursor_click_pos_def = { /* * lvgl extension definition for: - * void lv_textarea_set_password_mode(lv_obj_t *obj, bool en) + * uint32_t lv_table_get_row_count(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_set_password_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_get_row_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_textarea_set_password_mode)(obj, en); + _res = ((uint32_t (*)(lv_obj_t *))lv_table_get_row_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_textarea_set_password_mode_def = { - "lv_textarea_set_password_mode", - (PyCFunction)py_lv_textarea_set_password_mode, +static PyMethodDef py_lv_table_get_row_count_def = { + "lv_table_get_row_count", + (PyCFunction)py_lv_table_get_row_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49357,29 +61335,28 @@ static PyMethodDef py_lv_textarea_set_password_mode_def = { /* * lvgl extension definition for: - * void lv_textarea_set_password_bullet(lv_obj_t *obj, const char *bullet) + * uint32_t lv_table_get_column_count(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_set_password_bullet(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_get_column_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bullet_py; - if (!PyArg_ParseTuple(py_args, "O", &bullet_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - const char *bullet = (const char *)(char*)convert_from_str(bullet_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_textarea_set_password_bullet)(obj, bullet); + _res = ((uint32_t (*)(lv_obj_t *))lv_table_get_column_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_textarea_set_password_bullet_def = { - "lv_textarea_set_password_bullet", - (PyCFunction)py_lv_textarea_set_password_bullet, +static PyMethodDef py_lv_table_get_column_count_def = { + "lv_table_get_column_count", + (PyCFunction)py_lv_table_get_column_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49387,29 +61364,30 @@ static PyMethodDef py_lv_textarea_set_password_bullet_def = { /* * lvgl extension definition for: - * void lv_textarea_set_one_line(lv_obj_t *obj, bool en) + * int32_t lv_table_get_column_width(lv_obj_t *obj, uint32_t col) */ -static PyObject *py_lv_textarea_set_one_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_get_column_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + long col_val; + if (!PyArg_ParseTuple(py_args, "l", &col_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + uint32_t col = (uint32_t)col_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_textarea_set_one_line)(obj, en); + _res = ((int32_t (*)(lv_obj_t *, uint32_t))lv_table_get_column_width)(obj, col); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_textarea_set_one_line_def = { - "lv_textarea_set_one_line", - (PyCFunction)py_lv_textarea_set_one_line, +static PyMethodDef py_lv_table_get_column_width_def = { + "lv_table_get_column_width", + (PyCFunction)py_lv_table_get_column_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49417,29 +61395,32 @@ static PyMethodDef py_lv_textarea_set_one_line_def = { /* * lvgl extension definition for: - * void lv_textarea_set_accepted_chars(lv_obj_t *obj, const char *list) + * bool lv_table_has_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) */ -static PyObject *py_lv_textarea_set_accepted_chars(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_has_cell_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *list_py; - if (!PyArg_ParseTuple(py_args, "O", &list_py)) { PyGILState_Release(gstate); return NULL; } + long row_val; long col_val; PyObject *ctrl_py; + if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *list = (const char *)(char*)convert_from_str(list_py); + uint32_t row = (uint32_t)row_val; + uint32_t col = (uint32_t)col_val; + lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_textarea_set_accepted_chars)(obj, list); + _res = ((bool (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_table_has_cell_ctrl)(obj, row, col, ctrl); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_textarea_set_accepted_chars_def = { - "lv_textarea_set_accepted_chars", - (PyCFunction)py_lv_textarea_set_accepted_chars, +static PyMethodDef py_lv_table_has_cell_ctrl_def = { + "lv_table_has_cell_ctrl", + (PyCFunction)py_lv_table_has_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49447,29 +61428,30 @@ static PyMethodDef py_lv_textarea_set_accepted_chars_def = { /* * lvgl extension definition for: - * void lv_textarea_set_accepted_chars_static(lv_obj_t *obj, const char *list) + * void lv_table_get_selected_cell(lv_obj_t *obj, uint32_t *row, uint32_t *col) */ -static PyObject *py_lv_textarea_set_accepted_chars_static(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_get_selected_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *list_py; - if (!PyArg_ParseTuple(py_args, "O", &list_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *row_py; PyObject *col_py; + if (!PyArg_ParseTuple(py_args, "OO", &row_py, &col_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const char *list = (const char *)(char*)convert_from_str(list_py); + uint32_t *row = mp_array_to_u32ptr(row_py); + uint32_t *col = mp_array_to_u32ptr(col_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_textarea_set_accepted_chars_static)(obj, list); + ((void (*)(lv_obj_t *, uint32_t *, uint32_t *))lv_table_get_selected_cell)(obj, row, col); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_set_accepted_chars_static_def = { - "lv_textarea_set_accepted_chars_static", - (PyCFunction)py_lv_textarea_set_accepted_chars_static, +static PyMethodDef py_lv_table_get_selected_cell_def = { + "lv_table_get_selected_cell", + (PyCFunction)py_lv_table_get_selected_cell, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49477,29 +61459,31 @@ static PyMethodDef py_lv_textarea_set_accepted_chars_static_def = { /* * lvgl extension definition for: - * void lv_textarea_set_max_length(lv_obj_t *obj, uint32_t num) + * void *lv_table_get_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col) */ -static PyObject *py_lv_textarea_set_max_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_get_cell_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long num_val; - if (!PyArg_ParseTuple(py_args, "l", &num_val)) { PyGILState_Release(gstate); return NULL; } + long row_val; long col_val; + if (!PyArg_ParseTuple(py_args, "ll", &row_val, &col_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t num = (uint32_t)num_val; + uint16_t row = (uint16_t)row_val; + uint16_t col = (uint16_t)col_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_textarea_set_max_length)(obj, num); + _res = ((void *(*)(lv_obj_t *, uint16_t, uint16_t))lv_table_get_cell_user_data)(obj, row, col); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_set_max_length_def = { - "lv_textarea_set_max_length", - (PyCFunction)py_lv_textarea_set_max_length, +static PyMethodDef py_lv_table_get_cell_user_data_def = { + "lv_table_get_cell_user_data", + (PyCFunction)py_lv_table_get_cell_user_data, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49507,59 +61491,121 @@ static PyMethodDef py_lv_textarea_set_max_length_def = { /* * lvgl extension definition for: - * void lv_textarea_set_insert_replace(lv_obj_t *obj, const char *txt) + * lv_obj_t *lv_table_create(lv_obj_t *parent) */ -static PyObject *py_lv_textarea_set_insert_replace(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_table_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_textarea_set_insert_replace)(obj, txt); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_table_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_set_insert_replace_def = { - "lv_textarea_set_insert_replace", - (PyCFunction)py_lv_textarea_set_insert_replace, +static PyMethodDef py_lv_table_create_def = { + "lv_table_create", + (PyCFunction)py_lv_table_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl table object definitions (CPython) + */ +static PyObject *py_lv_table_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_table_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_table_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_table_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_table_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_table_methods[] = { + {"set_cell_value", (PyCFunction)py_lv_table_set_cell_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_row_count", (PyCFunction)py_lv_table_set_row_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_column_count", (PyCFunction)py_lv_table_set_column_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_column_width", (PyCFunction)py_lv_table_set_column_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cell_ctrl", (PyCFunction)py_lv_table_set_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_cell_ctrl", (PyCFunction)py_lv_table_clear_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cell_user_data", (PyCFunction)py_lv_table_set_cell_user_data, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_selected_cell", (PyCFunction)py_lv_table_set_selected_cell, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cell_value", (PyCFunction)py_lv_table_get_cell_value, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_row_count", (PyCFunction)py_lv_table_get_row_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_column_count", (PyCFunction)py_lv_table_get_column_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_column_width", (PyCFunction)py_lv_table_get_column_width, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_cell_ctrl", (PyCFunction)py_lv_table_has_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_selected_cell", (PyCFunction)py_lv_table_get_selected_cell, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cell_user_data", (PyCFunction)py_lv_table_get_cell_user_data, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_table_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.table", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_table_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_table_new, + .tp_methods = py_lv_table_methods, + .tp_call = (ternaryfunc)py_lv_table_call, +}; + +static py_lv_obj_type_t py_lv_table_mapping = { + .lv_obj_class = &lv_table_class, + .py_type = &py_lv_table_type, +}; + + /* * lvgl extension definition for: - * void lv_textarea_set_text_selection(lv_obj_t *obj, bool en) + * lv_obj_t *lv_tabview_add_tab(lv_obj_t *obj, const char *name) */ -static PyObject *py_lv_textarea_set_text_selection(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_add_tab(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *name_py; + if (!PyArg_ParseTuple(py_args, "O", &name_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - bool en = (en_val != 0); + const char *name = (const char *)(char*)convert_from_str(name_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_textarea_set_text_selection)(obj, en); + _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_tabview_add_tab)(obj, name); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_set_text_selection_def = { - "lv_textarea_set_text_selection", - (PyCFunction)py_lv_textarea_set_text_selection, +static PyMethodDef py_lv_tabview_add_tab_def = { + "lv_tabview_add_tab", + (PyCFunction)py_lv_tabview_add_tab, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49567,29 +61613,30 @@ static PyMethodDef py_lv_textarea_set_text_selection_def = { /* * lvgl extension definition for: - * void lv_textarea_set_password_show_time(lv_obj_t *obj, uint32_t time) + * void lv_tabview_set_tab_text(lv_obj_t *obj, uint32_t idx, const char *new_name) */ -static PyObject *py_lv_textarea_set_password_show_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_set_tab_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long time_val; - if (!PyArg_ParseTuple(py_args, "l", &time_val)) { PyGILState_Release(gstate); return NULL; } + long idx_val; PyObject *new_name_py; + if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &new_name_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t time = (uint32_t)time_val; + uint32_t idx = (uint32_t)idx_val; + const char *new_name = (const char *)(char*)convert_from_str(new_name_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_textarea_set_password_show_time)(obj, time); + ((void (*)(lv_obj_t *, uint32_t, const char *))lv_tabview_set_tab_text)(obj, idx, new_name); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_set_password_show_time_def = { - "lv_textarea_set_password_show_time", - (PyCFunction)py_lv_textarea_set_password_show_time, +static PyMethodDef py_lv_tabview_set_tab_text_def = { + "lv_tabview_set_tab_text", + (PyCFunction)py_lv_tabview_set_tab_text, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49597,29 +61644,30 @@ static PyMethodDef py_lv_textarea_set_password_show_time_def = { /* * lvgl extension definition for: - * void lv_textarea_set_align(lv_obj_t *obj, lv_text_align_t align) + * void lv_tabview_set_active(lv_obj_t *obj, uint32_t idx, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_textarea_set_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_set_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } + long idx_val; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_text_align_t align = (int)mp_obj_get_int(align_py); + uint32_t idx = (uint32_t)idx_val; + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_text_align_t))lv_textarea_set_align)(obj, align); + ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_tabview_set_active)(obj, idx, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_set_align_def = { - "lv_textarea_set_align", - (PyCFunction)py_lv_textarea_set_align, +static PyMethodDef py_lv_tabview_set_active_def = { + "lv_tabview_set_active", + (PyCFunction)py_lv_tabview_set_active, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49627,28 +61675,29 @@ static PyMethodDef py_lv_textarea_set_align_def = { /* * lvgl extension definition for: - * const char *lv_textarea_get_text(const lv_obj_t *obj) + * void lv_tabview_set_tab_bar_position(lv_obj_t *obj, lv_dir_t dir) */ -static PyObject *py_lv_textarea_get_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_set_tab_bar_position(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *dir_py; + if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_dir_t dir = (int)mp_obj_get_int(dir_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; lvpy_lock(); - _res = ((const char *(*)(const lv_obj_t *))lv_textarea_get_text)(obj); + ((void (*)(lv_obj_t *, lv_dir_t))lv_tabview_set_tab_bar_position)(obj, dir); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_get_text_def = { - "lv_textarea_get_text", - (PyCFunction)py_lv_textarea_get_text, +static PyMethodDef py_lv_tabview_set_tab_bar_position_def = { + "lv_tabview_set_tab_bar_position", + (PyCFunction)py_lv_tabview_set_tab_bar_position, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49656,28 +61705,29 @@ static PyMethodDef py_lv_textarea_get_text_def = { /* * lvgl extension definition for: - * const char *lv_textarea_get_placeholder_text(lv_obj_t *obj) + * void lv_tabview_set_tab_bar_size(lv_obj_t *obj, int32_t size) */ -static PyObject *py_lv_textarea_get_placeholder_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_set_tab_bar_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t size = (int32_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; lvpy_lock(); - _res = ((const char *(*)(lv_obj_t *))lv_textarea_get_placeholder_text)(obj); + ((void (*)(lv_obj_t *, int32_t))lv_tabview_set_tab_bar_size)(obj, size); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_get_placeholder_text_def = { - "lv_textarea_get_placeholder_text", - (PyCFunction)py_lv_textarea_get_placeholder_text, +static PyMethodDef py_lv_tabview_set_tab_bar_size_def = { + "lv_tabview_set_tab_bar_size", + (PyCFunction)py_lv_tabview_set_tab_bar_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49685,9 +61735,9 @@ static PyMethodDef py_lv_textarea_get_placeholder_text_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_textarea_get_label(const lv_obj_t *obj) + * uint32_t lv_tabview_get_tab_count(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_get_label(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_get_tab_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -49695,18 +61745,18 @@ static PyObject *py_lv_textarea_get_label(PyObject *self, PyObject *py_args, PyO lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_textarea_get_label)(obj); + _res = ((uint32_t (*)(lv_obj_t *))lv_tabview_get_tab_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_textarea_get_label_def = { - "lv_textarea_get_label", - (PyCFunction)py_lv_textarea_get_label, +static PyMethodDef py_lv_tabview_get_tab_count_def = { + "lv_tabview_get_tab_count", + (PyCFunction)py_lv_tabview_get_tab_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49714,9 +61764,9 @@ static PyMethodDef py_lv_textarea_get_label_def = { /* * lvgl extension definition for: - * uint32_t lv_textarea_get_cursor_pos(const lv_obj_t *obj) + * uint32_t lv_tabview_get_tab_active(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_get_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_get_tab_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -49726,16 +61776,16 @@ static PyObject *py_lv_textarea_get_cursor_pos(PyObject *self, PyObject *py_args uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_textarea_get_cursor_pos)(obj); + _res = ((uint32_t (*)(lv_obj_t *))lv_tabview_get_tab_active)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_textarea_get_cursor_pos_def = { - "lv_textarea_get_cursor_pos", - (PyCFunction)py_lv_textarea_get_cursor_pos, +static PyMethodDef py_lv_tabview_get_tab_active_def = { + "lv_tabview_get_tab_active", + (PyCFunction)py_lv_tabview_get_tab_active, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49743,28 +61793,30 @@ static PyMethodDef py_lv_textarea_get_cursor_pos_def = { /* * lvgl extension definition for: - * bool lv_textarea_get_cursor_click_pos(lv_obj_t *obj) + * lv_obj_t *lv_tabview_get_tab_button(lv_obj_t *obj, int32_t idx) */ -static PyObject *py_lv_textarea_get_cursor_click_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_get_tab_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long idx_val; + if (!PyArg_ParseTuple(py_args, "l", &idx_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + int32_t idx = (int32_t)idx_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_textarea_get_cursor_click_pos)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, int32_t))lv_tabview_get_tab_button)(obj, idx); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_get_cursor_click_pos_def = { - "lv_textarea_get_cursor_click_pos", - (PyCFunction)py_lv_textarea_get_cursor_click_pos, +static PyMethodDef py_lv_tabview_get_tab_button_def = { + "lv_tabview_get_tab_button", + (PyCFunction)py_lv_tabview_get_tab_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49772,9 +61824,9 @@ static PyMethodDef py_lv_textarea_get_cursor_click_pos_def = { /* * lvgl extension definition for: - * bool lv_textarea_get_password_mode(const lv_obj_t *obj) + * lv_obj_t *lv_tabview_get_content(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_get_password_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_get_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -49782,18 +61834,18 @@ static PyObject *py_lv_textarea_get_password_mode(PyObject *self, PyObject *py_a lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_textarea_get_password_mode)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tabview_get_content)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_get_password_mode_def = { - "lv_textarea_get_password_mode", - (PyCFunction)py_lv_textarea_get_password_mode, +static PyMethodDef py_lv_tabview_get_content_def = { + "lv_tabview_get_content", + (PyCFunction)py_lv_tabview_get_content, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49801,9 +61853,9 @@ static PyMethodDef py_lv_textarea_get_password_mode_def = { /* * lvgl extension definition for: - * const char *lv_textarea_get_password_bullet(lv_obj_t *obj) + * lv_obj_t *lv_tabview_get_tab_bar(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_get_password_bullet(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_get_tab_bar(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -49811,18 +61863,18 @@ static PyObject *py_lv_textarea_get_password_bullet(PyObject *self, PyObject *py lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((const char *(*)(lv_obj_t *))lv_textarea_get_password_bullet)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tabview_get_tab_bar)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_get_password_bullet_def = { - "lv_textarea_get_password_bullet", - (PyCFunction)py_lv_textarea_get_password_bullet, +static PyMethodDef py_lv_tabview_get_tab_bar_def = { + "lv_tabview_get_tab_bar", + (PyCFunction)py_lv_tabview_get_tab_bar, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49830,9 +61882,9 @@ static PyMethodDef py_lv_textarea_get_password_bullet_def = { /* * lvgl extension definition for: - * bool lv_textarea_get_one_line(const lv_obj_t *obj) + * lv_dir_t lv_tabview_get_tab_bar_position(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_get_one_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_get_tab_bar_position(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -49840,18 +61892,18 @@ static PyObject *py_lv_textarea_get_one_line(PyObject *self, PyObject *py_args, lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_dir_t _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_textarea_get_one_line)(obj); + _res = ((lv_dir_t (*)(lv_obj_t *))lv_tabview_get_tab_bar_position)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_textarea_get_one_line_def = { - "lv_textarea_get_one_line", - (PyCFunction)py_lv_textarea_get_one_line, +static PyMethodDef py_lv_tabview_get_tab_bar_position_def = { + "lv_tabview_get_tab_bar_position", + (PyCFunction)py_lv_tabview_get_tab_bar_position, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49859,86 +61911,119 @@ static PyMethodDef py_lv_textarea_get_one_line_def = { /* * lvgl extension definition for: - * const char *lv_textarea_get_accepted_chars(lv_obj_t *obj) + * lv_obj_t *lv_tabview_create(lv_obj_t *parent) */ -static PyObject *py_lv_textarea_get_accepted_chars(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((const char *(*)(lv_obj_t *))lv_textarea_get_accepted_chars)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tabview_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_get_accepted_chars_def = { - "lv_textarea_get_accepted_chars", - (PyCFunction)py_lv_textarea_get_accepted_chars, +static PyMethodDef py_lv_tabview_create_def = { + "lv_tabview_create", + (PyCFunction)py_lv_tabview_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * uint32_t lv_textarea_get_max_length(lv_obj_t *obj) + * lvgl tabview object definitions (CPython) */ -static PyObject *py_lv_textarea_get_max_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tabview_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + (void)type; + return py_lv_tabview_create(type, py_args, py_kwds); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_textarea_get_max_length)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); +static PyObject *py_lv_tabview_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_tabview_create((PyObject *)type, py_args, py_kwds); } -static PyMethodDef py_lv_textarea_get_max_length_def = { - "lv_textarea_get_max_length", - (PyCFunction)py_lv_textarea_get_max_length, - METH_VARARGS | METH_KEYWORDS, - NULL +static void py_lv_tabview_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_tabview_methods[] = { + {"add_tab", (PyCFunction)py_lv_tabview_add_tab, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tab_text", (PyCFunction)py_lv_tabview_set_tab_text, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_active", (PyCFunction)py_lv_tabview_set_active, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tab_bar_position", (PyCFunction)py_lv_tabview_set_tab_bar_position, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tab_bar_size", (PyCFunction)py_lv_tabview_set_tab_bar_size, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tab_count", (PyCFunction)py_lv_tabview_get_tab_count, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tab_active", (PyCFunction)py_lv_tabview_get_tab_active, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tab_button", (PyCFunction)py_lv_tabview_get_tab_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_content", (PyCFunction)py_lv_tabview_get_content, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tab_bar", (PyCFunction)py_lv_tabview_get_tab_bar, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tab_bar_position", (PyCFunction)py_lv_tabview_get_tab_bar_position, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_tabview_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.tabview", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_tabview_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_tabview_new, + .tp_methods = py_lv_tabview_methods, + .tp_call = (ternaryfunc)py_lv_tabview_call, +}; + +static py_lv_obj_type_t py_lv_tabview_mapping = { + .lv_obj_class = &lv_tabview_class, + .py_type = &py_lv_tabview_type, }; /* * lvgl extension definition for: - * bool lv_textarea_text_is_selected(const lv_obj_t *obj) + * lv_obj_t *lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir) */ -static PyObject *py_lv_textarea_text_is_selected(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tileview_add_tile(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + long col_id_val; long row_id_val; PyObject *dir_py; + if (!PyArg_ParseTuple(py_args, "llO", &col_id_val, &row_id_val, &dir_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *tv = mp_to_lv(self); + uint8_t col_id = (uint8_t)col_id_val; + uint8_t row_id = (uint8_t)row_id_val; + lv_dir_t dir = (int)mp_obj_get_int(dir_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_textarea_text_is_selected)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, uint8_t, uint8_t, lv_dir_t))lv_tileview_add_tile)(tv, col_id, row_id, dir); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_text_is_selected_def = { - "lv_textarea_text_is_selected", - (PyCFunction)py_lv_textarea_text_is_selected, +static PyMethodDef py_lv_tileview_add_tile_def = { + "lv_tileview_add_tile", + (PyCFunction)py_lv_tileview_add_tile, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49946,28 +62031,30 @@ static PyMethodDef py_lv_textarea_text_is_selected_def = { /* * lvgl extension definition for: - * bool lv_textarea_get_text_selection(lv_obj_t *obj) + * void lv_tileview_set_tile(lv_obj_t *obj, lv_obj_t *tile_obj, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_textarea_get_text_selection(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tileview_set_tile(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *tile_obj_py; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "OO", &tile_obj_py, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *tile_obj = mp_to_lv(tile_obj_py); + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_textarea_get_text_selection)(obj); + ((void (*)(lv_obj_t *, lv_obj_t *, lv_anim_enable_t))lv_tileview_set_tile)(obj, tile_obj, anim_en); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_get_text_selection_def = { - "lv_textarea_get_text_selection", - (PyCFunction)py_lv_textarea_get_text_selection, +static PyMethodDef py_lv_tileview_set_tile_def = { + "lv_tileview_set_tile", + (PyCFunction)py_lv_tileview_set_tile, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -49975,28 +62062,31 @@ static PyMethodDef py_lv_textarea_get_text_selection_def = { /* * lvgl extension definition for: - * uint32_t lv_textarea_get_password_show_time(lv_obj_t *obj) + * void lv_tileview_set_tile_by_index(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_textarea_get_password_show_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tileview_set_tile_by_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + long col_id_val; long row_id_val; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "llO", &col_id_val, &row_id_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *tv = mp_to_lv(self); + uint32_t col_id = (uint32_t)col_id_val; + uint32_t row_id = (uint32_t)row_id_val; + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_textarea_get_password_show_time)(obj); + ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_anim_enable_t))lv_tileview_set_tile_by_index)(tv, col_id, row_id, anim_en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_textarea_get_password_show_time_def = { - "lv_textarea_get_password_show_time", - (PyCFunction)py_lv_textarea_get_password_show_time, +static PyMethodDef py_lv_tileview_set_tile_by_index_def = { + "lv_tileview_set_tile_by_index", + (PyCFunction)py_lv_tileview_set_tile_by_index, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -50004,9 +62094,9 @@ static PyMethodDef py_lv_textarea_get_password_show_time_def = { /* * lvgl extension definition for: - * uint32_t lv_textarea_get_current_char(lv_obj_t *obj) + * lv_obj_t *lv_tileview_get_tile_active(lv_obj_t *obj) */ -static PyObject *py_lv_textarea_get_current_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tileview_get_tile_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -50014,18 +62104,18 @@ static PyObject *py_lv_textarea_get_current_char(PyObject *self, PyObject *py_ar lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_textarea_get_current_char)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tileview_get_tile_active)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_get_current_char_def = { - "lv_textarea_get_current_char", - (PyCFunction)py_lv_textarea_get_current_char, +static PyMethodDef py_lv_tileview_get_tile_active_def = { + "lv_tileview_get_tile_active", + (PyCFunction)py_lv_tileview_get_tile_active, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -50033,55 +62123,110 @@ static PyMethodDef py_lv_textarea_get_current_char_def = { /* * lvgl extension definition for: - * void lv_textarea_clear_selection(lv_obj_t *obj) + * lv_obj_t *lv_tileview_create(lv_obj_t *parent) */ -static PyObject *py_lv_textarea_clear_selection(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tileview_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *parent = NULL; + if (parent_py && parent_py != Py_None) { + parent = mp_to_lv(parent_py); + if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_textarea_clear_selection)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tileview_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_clear_selection_def = { - "lv_textarea_clear_selection", - (PyCFunction)py_lv_textarea_clear_selection, +static PyMethodDef py_lv_tileview_create_def = { + "lv_tileview_create", + (PyCFunction)py_lv_tileview_create, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * lvgl tileview object definitions (CPython) + */ +static PyObject *py_lv_tileview_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +{ + (void)type; + return py_lv_tileview_create(type, py_args, py_kwds); +} + +static PyObject *py_lv_tileview_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +{ + return py_lv_tileview_create((PyObject *)type, py_args, py_kwds); +} + +static void py_lv_tileview_dealloc(py_lv_obj_t *self) +{ + lvpy_dealloc_obj(self); +} + +static PyMethodDef py_lv_tileview_methods[] = { + {"add_tile", (PyCFunction)py_lv_tileview_add_tile, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tile", (PyCFunction)py_lv_tileview_set_tile, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tile_by_index", (PyCFunction)py_lv_tileview_set_tile_by_index, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tile_active", (PyCFunction)py_lv_tileview_get_tile_active, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL, NULL, 0, NULL} +}; + +PyTypeObject py_lv_tileview_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.tileview", + .tp_basicsize = sizeof(py_lv_obj_t), + .tp_dealloc = (destructor)py_lv_tileview_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT, + .tp_base = &py_lv_obj_type, + .tp_new = (newfunc)py_lv_tileview_new, + .tp_methods = py_lv_tileview_methods, + .tp_call = (ternaryfunc)py_lv_tileview_call, +}; + +static py_lv_obj_type_t py_lv_tileview_mapping = { + .lv_obj_class = &lv_tileview_class, + .py_type = &py_lv_tileview_type, +}; + + /* * lvgl extension definition for: - * void lv_textarea_cursor_right(lv_obj_t *obj) + * lv_obj_t *lv_win_add_title(lv_obj_t *win, const char *txt) */ -static PyObject *py_lv_textarea_cursor_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_win_add_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *win = mp_to_lv(self); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_textarea_cursor_right)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_win_add_title)(win, txt); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_cursor_right_def = { - "lv_textarea_cursor_right", - (PyCFunction)py_lv_textarea_cursor_right, +static PyMethodDef py_lv_win_add_title_def = { + "lv_win_add_title", + (PyCFunction)py_lv_win_add_title, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -50089,27 +62234,31 @@ static PyMethodDef py_lv_textarea_cursor_right_def = { /* * lvgl extension definition for: - * void lv_textarea_cursor_left(lv_obj_t *obj) + * lv_obj_t *lv_win_add_button(lv_obj_t *win, const void *icon, int32_t btn_w) */ -static PyObject *py_lv_textarea_cursor_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_win_add_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); + PyObject *icon_py; long btn_w_val; + if (!PyArg_ParseTuple(py_args, "Ol", &icon_py, &btn_w_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *win = mp_to_lv(self); + const void *icon = (const void *)mp_to_ptr(icon_py); + int32_t btn_w = (int32_t)btn_w_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_textarea_cursor_left)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, int32_t))lv_win_add_button)(win, icon, btn_w); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_cursor_left_def = { - "lv_textarea_cursor_left", - (PyCFunction)py_lv_textarea_cursor_left, +static PyMethodDef py_lv_win_add_button_def = { + "lv_win_add_button", + (PyCFunction)py_lv_win_add_button, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -50117,27 +62266,28 @@ static PyMethodDef py_lv_textarea_cursor_left_def = { /* * lvgl extension definition for: - * void lv_textarea_cursor_down(lv_obj_t *obj) + * lv_obj_t *lv_win_get_header(lv_obj_t *win) */ -static PyObject *py_lv_textarea_cursor_down(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_win_get_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *win = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_textarea_cursor_down)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_win_get_header)(win); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_cursor_down_def = { - "lv_textarea_cursor_down", - (PyCFunction)py_lv_textarea_cursor_down, +static PyMethodDef py_lv_win_get_header_def = { + "lv_win_get_header", + (PyCFunction)py_lv_win_get_header, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -50145,27 +62295,28 @@ static PyMethodDef py_lv_textarea_cursor_down_def = { /* * lvgl extension definition for: - * void lv_textarea_cursor_up(lv_obj_t *obj) + * lv_obj_t *lv_win_get_content(lv_obj_t *win) */ -static PyObject *py_lv_textarea_cursor_up(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_win_get_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); + lv_obj_t *win = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_textarea_cursor_up)(obj); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_win_get_content)(win); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_cursor_up_def = { - "lv_textarea_cursor_up", - (PyCFunction)py_lv_textarea_cursor_up, +static PyMethodDef py_lv_win_get_content_def = { + "lv_win_get_content", + (PyCFunction)py_lv_win_get_content, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -50173,9 +62324,9 @@ static PyMethodDef py_lv_textarea_cursor_up_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_textarea_create(lv_obj_t *parent) + * lv_obj_t *lv_win_create(lv_obj_t *parent) */ -static PyObject *py_lv_textarea_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_win_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -50191,3397 +62342,3084 @@ static PyObject *py_lv_textarea_create(PyObject *self, PyObject *py_args, PyObje lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_textarea_create)(parent); + _res = ((lv_obj_t *(*)(lv_obj_t *))lv_win_create)(parent); lvpy_unlock(); PyGILState_Release(gstate); return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_textarea_create_def = { - "lv_textarea_create", - (PyCFunction)py_lv_textarea_create, +static PyMethodDef py_lv_win_create_def = { + "lv_win_create", + (PyCFunction)py_lv_win_create, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl textarea object definitions (CPython) + * lvgl win object definitions (CPython) */ -static PyObject *py_lv_textarea_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_win_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) { (void)type; - return py_lv_textarea_create(type, py_args, py_kwds); + return py_lv_win_create(type, py_args, py_kwds); } -static PyObject *py_lv_textarea_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_win_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) { - return py_lv_textarea_create((PyObject *)type, py_args, py_kwds); + return py_lv_win_create((PyObject *)type, py_args, py_kwds); } -static void py_lv_textarea_dealloc(py_lv_obj_t *self) +static void py_lv_win_dealloc(py_lv_obj_t *self) { lvpy_dealloc_obj(self); } -static PyMethodDef py_lv_textarea_methods[] = { - {"add_char", (PyCFunction)py_lv_textarea_add_char, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_text", (PyCFunction)py_lv_textarea_add_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_char", (PyCFunction)py_lv_textarea_delete_char, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_char_forward", (PyCFunction)py_lv_textarea_delete_char_forward, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text", (PyCFunction)py_lv_textarea_set_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_placeholder_text", (PyCFunction)py_lv_textarea_set_placeholder_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor_pos", (PyCFunction)py_lv_textarea_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor_click_pos", (PyCFunction)py_lv_textarea_set_cursor_click_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_password_mode", (PyCFunction)py_lv_textarea_set_password_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_password_bullet", (PyCFunction)py_lv_textarea_set_password_bullet, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_one_line", (PyCFunction)py_lv_textarea_set_one_line, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_accepted_chars", (PyCFunction)py_lv_textarea_set_accepted_chars, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_accepted_chars_static", (PyCFunction)py_lv_textarea_set_accepted_chars_static, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_length", (PyCFunction)py_lv_textarea_set_max_length, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_insert_replace", (PyCFunction)py_lv_textarea_set_insert_replace, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_selection", (PyCFunction)py_lv_textarea_set_text_selection, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_password_show_time", (PyCFunction)py_lv_textarea_set_password_show_time, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_align", (PyCFunction)py_lv_textarea_set_align, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text", (PyCFunction)py_lv_textarea_get_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_placeholder_text", (PyCFunction)py_lv_textarea_get_placeholder_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_label", (PyCFunction)py_lv_textarea_get_label, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cursor_pos", (PyCFunction)py_lv_textarea_get_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cursor_click_pos", (PyCFunction)py_lv_textarea_get_cursor_click_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_password_mode", (PyCFunction)py_lv_textarea_get_password_mode, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_password_bullet", (PyCFunction)py_lv_textarea_get_password_bullet, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_one_line", (PyCFunction)py_lv_textarea_get_one_line, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_accepted_chars", (PyCFunction)py_lv_textarea_get_accepted_chars, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_length", (PyCFunction)py_lv_textarea_get_max_length, METH_VARARGS | METH_KEYWORDS, NULL}, - {"text_is_selected", (PyCFunction)py_lv_textarea_text_is_selected, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text_selection", (PyCFunction)py_lv_textarea_get_text_selection, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_password_show_time", (PyCFunction)py_lv_textarea_get_password_show_time, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_current_char", (PyCFunction)py_lv_textarea_get_current_char, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_selection", (PyCFunction)py_lv_textarea_clear_selection, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cursor_right", (PyCFunction)py_lv_textarea_cursor_right, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cursor_left", (PyCFunction)py_lv_textarea_cursor_left, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cursor_down", (PyCFunction)py_lv_textarea_cursor_down, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cursor_up", (PyCFunction)py_lv_textarea_cursor_up, METH_VARARGS | METH_KEYWORDS, NULL}, +static PyMethodDef py_lv_win_methods[] = { + {"add_title", (PyCFunction)py_lv_win_add_title, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_button", (PyCFunction)py_lv_win_add_button, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_header", (PyCFunction)py_lv_win_get_header, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_content", (PyCFunction)py_lv_win_get_content, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} }; -PyTypeObject py_lv_textarea_type = { +PyTypeObject py_lv_win_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.textarea", + .tp_name = "lvgl.win", .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_textarea_dealloc, + .tp_dealloc = (destructor)py_lv_win_dealloc, .tp_flags = Py_TPFLAGS_DEFAULT, .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_textarea_new, - .tp_methods = py_lv_textarea_methods, - .tp_call = (ternaryfunc)py_lv_textarea_call, + .tp_new = (newfunc)py_lv_win_new, + .tp_methods = py_lv_win_methods, + .tp_call = (ternaryfunc)py_lv_win_call, }; -static py_lv_obj_type_t py_lv_textarea_mapping = { - .lv_obj_class = &lv_textarea_class, - .py_type = &py_lv_textarea_type, +static py_lv_obj_type_t py_lv_win_mapping = { + .lv_obj_class = &lv_win_class, + .py_type = &py_lv_win_type, }; +#define funcptr_create_cb NULL + +static inline PyObject *mp_lv_funcptr_create_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + /* - * lvgl extension definition for: - * void lv_spinbox_set_value(lv_obj_t *obj, int32_t v) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_font_class_t_create_cb' + * lv_font_t *(*create_cb)(const lv_font_info_t *info, const void *src) */ -static PyObject *py_lv_spinbox_set_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long v_val; - if (!PyArg_ParseTuple(py_args, "l", &v_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t v = (int32_t)v_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_spinbox_set_value)(obj, v); - lvpy_unlock(); +#define funcptr_delete_cb NULL + +static inline PyObject *mp_lv_funcptr_delete_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_font_class_t_delete_cb' + * void (*delete_cb)(lv_font_t *font) + */ - PyGILState_Release(gstate); - Py_RETURN_NONE; -} +#define funcptr_dup_src_cb NULL -static PyMethodDef py_lv_spinbox_set_value_def = { - "lv_spinbox_set_value", - (PyCFunction)py_lv_spinbox_set_value, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_dup_src_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * void lv_spinbox_set_rollover(lv_obj_t *obj, bool rollover) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_font_class_t_dup_src_cb' + * void *(*dup_src_cb)(const void *src) */ -static PyObject *py_lv_spinbox_set_rollover(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long rollover_val; - if (!PyArg_ParseTuple(py_args, "l", &rollover_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - bool rollover = (rollover_val != 0); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_spinbox_set_rollover)(obj, rollover); - lvpy_unlock(); +#define funcptr_free_src_cb NULL + +static inline PyObject *mp_lv_funcptr_free_src_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_font_class_t_free_src_cb' + * void (*free_src_cb)(void *src) + */ - PyGILState_Release(gstate); - Py_RETURN_NONE; + +/* + * Struct lv_font_class_t (CPython) + */ + +extern PyMethodDef py_lv_font_class_t_methods[]; + +static PyObject *py_lv_font_class_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_class_t *data = (lv_font_class_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "create_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->create_cb, NULL, "lv_font_class_t_create_cb", NULL); + if (strcmp(attr, "delete_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->delete_cb, NULL, "lv_font_class_t_delete_cb", NULL); + if (strcmp(attr, "dup_src_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dup_src_cb, NULL, "lv_font_class_t_dup_src_cb", NULL); + if (strcmp(attr, "free_src_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->free_src_cb, NULL, "lv_font_class_t_free_src_cb", NULL); + for (PyMethodDef *m = py_lv_font_class_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_spinbox_set_rollover_def = { - "lv_spinbox_set_rollover", - (PyCFunction)py_lv_spinbox_set_rollover, - METH_VARARGS | METH_KEYWORDS, - NULL +static const char *const py_lv_font_class_t_field_names[] = {"create_cb", "delete_cb", "dup_src_cb", "free_src_cb", NULL}; + +static PyObject *py_lv_font_class_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_font_class_t_field_names, py_lv_font_class_t_methods); +} + +static PyMethodDef py_lv_font_class_t_type_methods[] = { + {"__dir__", py_lv_font_class_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_font_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_class_t *data = (lv_font_class_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_font_class_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "create_cb") == 0) { data->create_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_create_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "delete_cb") == 0) { data->delete_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_delete_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "dup_src_cb") == 0) { data->dup_src_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_dup_src_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "free_src_cb") == 0) { data->free_src_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_free_src_cb", NULL, NULL, NULL, NULL); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_font_class_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * void lv_spinbox_set_digit_format(lv_obj_t *obj, uint32_t digit_count, uint32_t sep_pos) - */ -static PyObject *py_lv_spinbox_set_digit_format(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long digit_count_val; long sep_pos_val; - if (!PyArg_ParseTuple(py_args, "ll", &digit_count_val, &sep_pos_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t digit_count = (uint32_t)digit_count_val; - uint32_t sep_pos = (uint32_t)sep_pos_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_spinbox_set_digit_format)(obj, digit_count, sep_pos); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return make_new_lv_struct(type, args, kwds, sizeof(lv_font_class_t)); +} + +static void py_lv_font_class_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_font_class_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_font_class_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_font_class_t_dealloc, + .tp_getattro = (getter)py_lv_font_class_t_getattro, + .tp_setattro = (setter)py_lv_font_class_t_setattro, + .tp_new = py_lv_font_class_t_new, + .tp_methods = py_lv_font_class_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_font_class_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_font_class_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_class_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_font_class_t*)self->data; +} + +static lv_font_class_t mp_write_scratch_lv_font_class_t; + +static inline void* mp_write_value_ptr_lv_font_class_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_class_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_font_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_class_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_font_class_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_font_class_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_class_t or dict, got None"); + } + memset(&mp_write_scratch_lv_font_class_t, 0, sizeof(lv_font_class_t)); + return &mp_write_scratch_lv_font_class_t; } -static PyMethodDef py_lv_spinbox_set_digit_format_def = { - "lv_spinbox_set_digit_format", - (PyCFunction)py_lv_spinbox_set_digit_format, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_font_class_t(struct_obj) (*((lv_font_class_t*)mp_write_value_ptr_lv_font_class_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_spinbox_set_digit_count(lv_obj_t *obj, uint32_t digit_count) - */ -static PyObject *py_lv_spinbox_set_digit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_font_class_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long digit_count_val; - if (!PyArg_ParseTuple(py_args, "l", &digit_count_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t digit_count = (uint32_t)digit_count_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_digit_count)(obj, digit_count); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_font_class_t_type, field); } -static PyMethodDef py_lv_spinbox_set_digit_count_def = { - "lv_spinbox_set_digit_count", - (PyCFunction)py_lv_spinbox_set_digit_count, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_font_class_t(field) lv_to_mp_struct_own(&py_lv_font_class_t_type, copy_buffer(&field, sizeof(lv_font_class_t))) +#define mp_read_byref_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(&field) + +#define funcptr_lv_tree_constructor_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_tree_constructor_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * void lv_spinbox_set_dec_point_pos(lv_obj_t *obj, uint32_t dec_point_pos) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_tree_class_t_constructor_cb' + * lv_tree_constructor_cb_t constructor_cb */ -static PyObject *py_lv_spinbox_set_dec_point_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long dec_point_pos_val; - if (!PyArg_ParseTuple(py_args, "l", &dec_point_pos_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t dec_point_pos = (uint32_t)dec_point_pos_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_dec_point_pos)(obj, dec_point_pos); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_spinbox_set_dec_point_pos_def = { - "lv_spinbox_set_dec_point_pos", - (PyCFunction)py_lv_spinbox_set_dec_point_pos, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* - * lvgl extension definition for: - * void lv_spinbox_set_step(lv_obj_t *obj, uint32_t step) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_tree_class_t_destructor_cb' + * lv_tree_destructor_cb_t destructor_cb */ -static PyObject *py_lv_spinbox_set_step(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long step_val; - if (!PyArg_ParseTuple(py_args, "l", &step_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t step = (uint32_t)step_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_step)(obj, step); - lvpy_unlock(); - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_spinbox_set_step_def = { - "lv_spinbox_set_step", - (PyCFunction)py_lv_spinbox_set_step, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* - * lvgl extension definition for: - * void lv_spinbox_set_range(lv_obj_t *obj, int32_t min_value, int32_t max_value) + * Struct lv_tree_class_t (CPython) */ -static PyObject *py_lv_spinbox_set_range(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_tree_class_t_methods[]; + +static PyObject *py_lv_tree_class_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long min_value_val; long max_value_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_value_val, &max_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t min_value = (int32_t)min_value_val; - int32_t max_value = (int32_t)max_value_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_spinbox_set_range)(obj, min_value, max_value); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_tree_class_t *data = (lv_tree_class_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base_class") == 0) return ptr_to_mp((void*)data->base_class); + if (strcmp(attr, "instance_size") == 0) return mp_obj_new_int_from_uint(data->instance_size); + if (strcmp(attr, "constructor_cb") == 0) return mp_lv_funcptr(NULL, data->constructor_cb, NULL, "lv_tree_class_t_constructor_cb", NULL); + if (strcmp(attr, "destructor_cb") == 0) return mp_lv_funcptr(NULL, data->destructor_cb, NULL, "lv_tree_class_t_destructor_cb", NULL); + for (PyMethodDef *m = py_lv_tree_class_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_spinbox_set_range_def = { - "lv_spinbox_set_range", - (PyCFunction)py_lv_spinbox_set_range, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_tree_class_t_field_names[] = {"base_class", "instance_size", "constructor_cb", "destructor_cb", NULL}; -/* - * lvgl extension definition for: - * void lv_spinbox_set_min_value(lv_obj_t *obj, int32_t min_value) - */ -static PyObject *py_lv_spinbox_set_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tree_class_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long min_value_val; - if (!PyArg_ParseTuple(py_args, "l", &min_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t min_value = (int32_t)min_value_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_spinbox_set_min_value)(obj, min_value); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + (void)unused; + return lvpy_struct_dir(self, py_lv_tree_class_t_field_names, py_lv_tree_class_t_methods); } -static PyMethodDef py_lv_spinbox_set_min_value_def = { - "lv_spinbox_set_min_value", - (PyCFunction)py_lv_spinbox_set_min_value, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_tree_class_t_type_methods[] = { + {"__dir__", py_lv_tree_class_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * void lv_spinbox_set_max_value(lv_obj_t *obj, int32_t max_value) - */ -static PyObject *py_lv_spinbox_set_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_tree_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long max_value_val; - if (!PyArg_ParseTuple(py_args, "l", &max_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t max_value = (int32_t)max_value_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_spinbox_set_max_value)(obj, max_value); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_tree_class_t *data = (lv_tree_class_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_tree_class_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base_class") == 0) { data->base_class = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "instance_size") == 0) { data->instance_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "constructor_cb") == 0) { data->constructor_cb = mp_lv_callback(value, NULL, "lv_tree_class_t_constructor_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "destructor_cb") == 0) { data->destructor_cb = mp_lv_callback(value, NULL, "lv_tree_class_t_destructor_cb", NULL, NULL, NULL, NULL); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_tree_class_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_spinbox_set_max_value_def = { - "lv_spinbox_set_max_value", - (PyCFunction)py_lv_spinbox_set_max_value, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_tree_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_tree_class_t)); +} -/* - * lvgl extension definition for: - * void lv_spinbox_set_cursor_pos(lv_obj_t *obj, uint32_t pos) - */ -static PyObject *py_lv_spinbox_set_cursor_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_tree_class_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long pos_val; - if (!PyArg_ParseTuple(py_args, "l", &pos_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t pos = (uint32_t)pos_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_spinbox_set_cursor_pos)(obj, pos); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_spinbox_set_cursor_pos_def = { - "lv_spinbox_set_cursor_pos", - (PyCFunction)py_lv_spinbox_set_cursor_pos, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_tree_class_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_tree_class_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_tree_class_t_dealloc, + .tp_getattro = (getter)py_lv_tree_class_t_getattro, + .tp_setattro = (setter)py_lv_tree_class_t_setattro, + .tp_new = py_lv_tree_class_t_new, + .tp_methods = py_lv_tree_class_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * void lv_spinbox_set_digit_step_direction(lv_obj_t *obj, lv_dir_t direction) - */ -static PyObject *py_lv_spinbox_set_digit_step_direction(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_tree_class_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *direction_py; - if (!PyArg_ParseTuple(py_args, "O", &direction_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_dir_t direction = (int)mp_obj_get_int(direction_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_dir_t))lv_spinbox_set_digit_step_direction)(obj, direction); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_tree_class_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_tree_class_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_tree_class_t*)self->data; } -static PyMethodDef py_lv_spinbox_set_digit_step_direction_def = { - "lv_spinbox_set_digit_step_direction", - (PyCFunction)py_lv_spinbox_set_digit_step_direction, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_tree_class_t mp_write_scratch_lv_tree_class_t; -/* - * lvgl extension definition for: - * bool lv_spinbox_get_rollover(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_get_rollover(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_tree_class_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_tree_class_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_tree_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_tree_class_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_tree_class_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_tree_class_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_tree_class_t or dict, got None"); + } + memset(&mp_write_scratch_lv_tree_class_t, 0, sizeof(lv_tree_class_t)); + return &mp_write_scratch_lv_tree_class_t; +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_spinbox_get_rollover)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); +#define mp_write_lv_tree_class_t(struct_obj) (*((lv_tree_class_t*)mp_write_value_ptr_lv_tree_class_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_tree_class_t(void *field) +{ + return lv_to_mp_struct(&py_lv_tree_class_t_type, field); } -static PyMethodDef py_lv_spinbox_get_rollover_def = { - "lv_spinbox_get_rollover", - (PyCFunction)py_lv_spinbox_get_rollover, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_tree_class_t(field) lv_to_mp_struct_own(&py_lv_tree_class_t_type, copy_buffer(&field, sizeof(lv_tree_class_t))) +#define mp_read_byref_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(&field) /* - * lvgl extension definition for: - * int32_t lv_spinbox_get_value(lv_obj_t *obj) + * Struct lv_color16_t (CPython) */ -static PyObject *py_lv_spinbox_get_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_color16_t_methods[]; + +static PyObject *py_lv_color16_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color16_t *data = (lv_color16_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "blue") == 0) return mp_obj_new_int_from_uint(data->blue); + if (strcmp(attr, "green") == 0) return mp_obj_new_int_from_uint(data->green); + if (strcmp(attr, "red") == 0) return mp_obj_new_int_from_uint(data->red); + for (PyMethodDef *m = py_lv_color16_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_value)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); +static const char *const py_lv_color16_t_field_names[] = {"blue", "green", "red", NULL}; + +static PyObject *py_lv_color16_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_color16_t_field_names, py_lv_color16_t_methods); } -static PyMethodDef py_lv_spinbox_get_value_def = { - "lv_spinbox_get_value", - (PyCFunction)py_lv_spinbox_get_value, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_color16_t_type_methods[] = { + {"__dir__", py_lv_color16_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_color16_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color16_t *data = (lv_color16_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_color16_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "blue") == 0) { data->blue = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "green") == 0) { data->green = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "red") == 0) { data->red = (uint16_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_color16_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * int32_t lv_spinbox_get_step(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_get_step(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color16_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_color16_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_step)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); +static void py_lv_color16_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_spinbox_get_step_def = { - "lv_spinbox_get_step", - (PyCFunction)py_lv_spinbox_get_step, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_color16_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_color16_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_color16_t_dealloc, + .tp_getattro = (getter)py_lv_color16_t_getattro, + .tp_setattro = (setter)py_lv_color16_t_setattro, + .tp_new = py_lv_color16_t_new, + .tp_methods = py_lv_color16_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * uint32_t lv_spinbox_get_digit_count(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_get_digit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_color16_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_color16_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color16_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_color16_t*)self->data; +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_spinbox_get_digit_count)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); +static lv_color16_t mp_write_scratch_lv_color16_t; + +static inline void* mp_write_value_ptr_lv_color16_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color16_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_color16_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color16_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_color16_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_color16_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color16_t or dict, got None"); + } + memset(&mp_write_scratch_lv_color16_t, 0, sizeof(lv_color16_t)); + return &mp_write_scratch_lv_color16_t; } -static PyMethodDef py_lv_spinbox_get_digit_count_def = { - "lv_spinbox_get_digit_count", - (PyCFunction)py_lv_spinbox_get_digit_count, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_color16_t(struct_obj) (*((lv_color16_t*)mp_write_value_ptr_lv_color16_t(struct_obj))) -/* - * lvgl extension definition for: - * uint32_t lv_spinbox_get_dec_point_pos(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_get_dec_point_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_color16_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_spinbox_get_dec_point_pos)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp_struct(&py_lv_color16_t_type, field); } -static PyMethodDef py_lv_spinbox_get_dec_point_pos_def = { - "lv_spinbox_get_dec_point_pos", - (PyCFunction)py_lv_spinbox_get_dec_point_pos, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_color16_t(field) lv_to_mp_struct_own(&py_lv_color16_t_type, copy_buffer(&field, sizeof(lv_color16_t))) +#define mp_read_byref_lv_color16_t(field) mp_read_ptr_lv_color16_t(&field) /* - * lvgl extension definition for: - * int32_t lv_spinbox_get_min_value(lv_obj_t *obj) + * Struct lv_mem_monitor_t (CPython) */ -static PyObject *py_lv_spinbox_get_min_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_min_value)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} +extern PyMethodDef py_lv_mem_monitor_t_methods[]; -static PyMethodDef py_lv_spinbox_get_min_value_def = { - "lv_spinbox_get_min_value", - (PyCFunction)py_lv_spinbox_get_min_value, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static PyObject *py_lv_mem_monitor_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_mem_monitor_t *data = (lv_mem_monitor_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "total_size") == 0) return mp_obj_new_int_from_uint(data->total_size); + if (strcmp(attr, "free_cnt") == 0) return mp_obj_new_int_from_uint(data->free_cnt); + if (strcmp(attr, "free_size") == 0) return mp_obj_new_int_from_uint(data->free_size); + if (strcmp(attr, "free_biggest_size") == 0) return mp_obj_new_int_from_uint(data->free_biggest_size); + if (strcmp(attr, "used_cnt") == 0) return mp_obj_new_int_from_uint(data->used_cnt); + if (strcmp(attr, "max_used") == 0) return mp_obj_new_int_from_uint(data->max_used); + if (strcmp(attr, "used_pct") == 0) return mp_obj_new_int_from_uint(data->used_pct); + if (strcmp(attr, "frag_pct") == 0) return mp_obj_new_int_from_uint(data->frag_pct); + for (PyMethodDef *m = py_lv_mem_monitor_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} +static const char *const py_lv_mem_monitor_t_field_names[] = {"total_size", "free_cnt", "free_size", "free_biggest_size", "used_cnt", "max_used", "used_pct", "frag_pct", NULL}; -/* - * lvgl extension definition for: - * int32_t lv_spinbox_get_max_value(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_get_max_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_monitor_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_spinbox_get_max_value)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_mem_monitor_t_field_names, py_lv_mem_monitor_t_methods); } -static PyMethodDef py_lv_spinbox_get_max_value_def = { - "lv_spinbox_get_max_value", - (PyCFunction)py_lv_spinbox_get_max_value, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_mem_monitor_t_type_methods[] = { + {"__dir__", py_lv_mem_monitor_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_mem_monitor_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_mem_monitor_t *data = (lv_mem_monitor_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_mem_monitor_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "total_size") == 0) { data->total_size = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "free_cnt") == 0) { data->free_cnt = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "free_size") == 0) { data->free_size = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "free_biggest_size") == 0) { data->free_biggest_size = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "used_cnt") == 0) { data->used_cnt = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "max_used") == 0) { data->max_used = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "used_pct") == 0) { data->used_pct = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "frag_pct") == 0) { data->frag_pct = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_mem_monitor_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * lv_dir_t lv_spinbox_get_digit_step_direction(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_get_digit_step_direction(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_monitor_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_mem_monitor_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_dir_t _res; - lvpy_lock(); - _res = ((lv_dir_t (*)(lv_obj_t *))lv_spinbox_get_digit_step_direction)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); +static void py_lv_mem_monitor_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_spinbox_get_digit_step_direction_def = { - "lv_spinbox_get_digit_step_direction", - (PyCFunction)py_lv_spinbox_get_digit_step_direction, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_mem_monitor_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_mem_monitor_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_mem_monitor_t_dealloc, + .tp_getattro = (getter)py_lv_mem_monitor_t_getattro, + .tp_setattro = (setter)py_lv_mem_monitor_t_setattro, + .tp_new = py_lv_mem_monitor_t_new, + .tp_methods = py_lv_mem_monitor_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; +static inline void* mp_write_ptr_lv_mem_monitor_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_mem_monitor_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_mem_monitor_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_mem_monitor_t*)self->data; +} + +static lv_mem_monitor_t mp_write_scratch_lv_mem_monitor_t; -/* - * lvgl extension definition for: - * void lv_spinbox_step_next(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_step_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_mem_monitor_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_mem_monitor_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_mem_monitor_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_mem_monitor_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_mem_monitor_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_mem_monitor_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_mem_monitor_t or dict, got None"); + } + memset(&mp_write_scratch_lv_mem_monitor_t, 0, sizeof(lv_mem_monitor_t)); + return &mp_write_scratch_lv_mem_monitor_t; +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_spinbox_step_next)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; +#define mp_write_lv_mem_monitor_t(struct_obj) (*((lv_mem_monitor_t*)mp_write_value_ptr_lv_mem_monitor_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_mem_monitor_t(void *field) +{ + return lv_to_mp_struct(&py_lv_mem_monitor_t_type, field); } -static PyMethodDef py_lv_spinbox_step_next_def = { - "lv_spinbox_step_next", - (PyCFunction)py_lv_spinbox_step_next, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_mem_monitor_t(field) lv_to_mp_struct_own(&py_lv_mem_monitor_t_type, copy_buffer(&field, sizeof(lv_mem_monitor_t))) +#define mp_read_byref_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(&field) +typedef __typeof__( ((lv_font_glyph_dsc_t*)(0))->gid ) lv_font_glyph_dsc_gid_t; /* - * lvgl extension definition for: - * void lv_spinbox_step_prev(lv_obj_t *obj) + * Struct lv_font_glyph_dsc_gid_t (CPython) */ -static PyObject *py_lv_spinbox_step_prev(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_font_glyph_dsc_gid_t_methods[]; + +static PyObject *py_lv_font_glyph_dsc_gid_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "index") == 0) return mp_obj_new_int_from_uint(data->index); + if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); + for (PyMethodDef *m = py_lv_font_glyph_dsc_gid_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_spinbox_step_prev)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; +static const char *const py_lv_font_glyph_dsc_gid_t_field_names[] = {"index", "src", NULL}; + +static PyObject *py_lv_font_glyph_dsc_gid_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_font_glyph_dsc_gid_t_field_names, py_lv_font_glyph_dsc_gid_t_methods); } -static PyMethodDef py_lv_spinbox_step_prev_def = { - "lv_spinbox_step_prev", - (PyCFunction)py_lv_spinbox_step_prev, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_font_glyph_dsc_gid_t_type_methods[] = { + {"__dir__", py_lv_font_glyph_dsc_gid_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_font_glyph_dsc_gid_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_font_glyph_dsc_gid_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "index") == 0) { data->index = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_font_glyph_dsc_gid_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * void lv_spinbox_increment(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_increment(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_glyph_dsc_gid_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_font_glyph_dsc_gid_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_spinbox_increment)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; +static void py_lv_font_glyph_dsc_gid_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_spinbox_increment_def = { - "lv_spinbox_increment", - (PyCFunction)py_lv_spinbox_increment, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_font_glyph_dsc_gid_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_font_glyph_dsc_gid_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_font_glyph_dsc_gid_t_dealloc, + .tp_getattro = (getter)py_lv_font_glyph_dsc_gid_t_getattro, + .tp_setattro = (setter)py_lv_font_glyph_dsc_gid_t_setattro, + .tp_new = py_lv_font_glyph_dsc_gid_t_new, + .tp_methods = py_lv_font_glyph_dsc_gid_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * void lv_spinbox_decrement(lv_obj_t *obj) - */ -static PyObject *py_lv_spinbox_decrement(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_font_glyph_dsc_gid_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_spinbox_decrement)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_font_glyph_dsc_gid_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_gid_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_font_glyph_dsc_gid_t*)self->data; } -static PyMethodDef py_lv_spinbox_decrement_def = { - "lv_spinbox_decrement", - (PyCFunction)py_lv_spinbox_decrement, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_font_glyph_dsc_gid_t mp_write_scratch_lv_font_glyph_dsc_gid_t; + +static inline void* mp_write_value_ptr_lv_font_glyph_dsc_gid_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_glyph_dsc_gid_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_font_glyph_dsc_gid_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_glyph_dsc_gid_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_font_glyph_dsc_gid_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_font_glyph_dsc_gid_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_gid_t or dict, got None"); + } + memset(&mp_write_scratch_lv_font_glyph_dsc_gid_t, 0, sizeof(lv_font_glyph_dsc_gid_t)); + return &mp_write_scratch_lv_font_glyph_dsc_gid_t; +} +#define mp_write_lv_font_glyph_dsc_gid_t(struct_obj) (*((lv_font_glyph_dsc_gid_t*)mp_write_value_ptr_lv_font_glyph_dsc_gid_t(struct_obj))) -/* - * lvgl extension definition for: - * lv_observer_t *lv_spinbox_bind_value(lv_obj_t *obj, lv_subject_t *subject) - */ -static PyObject *py_lv_spinbox_bind_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_font_glyph_dsc_gid_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *subject_py; - if (!PyArg_ParseTuple(py_args, "O", &subject_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_subject_t *subject = mp_write_ptr_lv_subject_t(subject_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_observer_t * _res; - lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_obj_t *, lv_subject_t *))lv_spinbox_bind_value)(obj, subject); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return lv_to_mp_struct(&py_lv_font_glyph_dsc_gid_t_type, field); } -static PyMethodDef py_lv_spinbox_bind_value_def = { - "lv_spinbox_bind_value", - (PyCFunction)py_lv_spinbox_bind_value, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_font_glyph_dsc_gid_t(field) lv_to_mp_struct_own(&py_lv_font_glyph_dsc_gid_t_type, copy_buffer(&field, sizeof(lv_font_glyph_dsc_gid_t))) +#define mp_read_byref_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(&field) /* - * lvgl extension definition for: - * lv_obj_t *lv_spinbox_create(lv_obj_t *parent) + * Struct lv_font_glyph_dsc_t (CPython) */ -static PyObject *py_lv_spinbox_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_font_glyph_dsc_t_methods[]; + +static PyObject *py_lv_font_glyph_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_spinbox_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "resolved_font") == 0) return mp_read_ptr_lv_font_t((void*)data->resolved_font); + if (strcmp(attr, "entry") == 0) return ptr_to_mp((void*)data->entry); + if (strcmp(attr, "gid") == 0) return mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); + if (strcmp(attr, "format") == 0) return mp_obj_new_int(data->format); + if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); + if (strcmp(attr, "adv_w") == 0) return mp_obj_new_int_from_uint(data->adv_w); + if (strcmp(attr, "box_w") == 0) return mp_obj_new_int_from_uint(data->box_w); + if (strcmp(attr, "box_h") == 0) return mp_obj_new_int_from_uint(data->box_h); + if (strcmp(attr, "ofs_x") == 0) return mp_obj_new_int(data->ofs_x); + if (strcmp(attr, "ofs_y") == 0) return mp_obj_new_int(data->ofs_y); + if (strcmp(attr, "stride") == 0) return mp_obj_new_int_from_uint(data->stride); + if (strcmp(attr, "is_placeholder") == 0) return mp_obj_new_int_from_uint(data->is_placeholder); + if (strcmp(attr, "req_raw_bitmap") == 0) return mp_obj_new_int_from_uint(data->req_raw_bitmap); + for (PyMethodDef *m = py_lv_font_glyph_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_font_glyph_dsc_t_field_names[] = {"resolved_font", "entry", "gid", "format", "outline_stroke_width", "adv_w", "box_w", "box_h", "ofs_x", "ofs_y", "stride", "is_placeholder", "req_raw_bitmap", NULL}; + +static PyObject *py_lv_font_glyph_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_font_glyph_dsc_t_field_names, py_lv_font_glyph_dsc_t_methods); } -static PyMethodDef py_lv_spinbox_create_def = { - "lv_spinbox_create", - (PyCFunction)py_lv_spinbox_create, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_font_glyph_dsc_t_type_methods[] = { + {"__dir__", py_lv_font_glyph_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl spinbox object definitions (CPython) - */ -static PyObject *py_lv_spinbox_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static int py_lv_font_glyph_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - (void)type; - return py_lv_spinbox_create(type, py_args, py_kwds); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_font_glyph_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "resolved_font") == 0) { data->resolved_font = (void*)mp_write_ptr_lv_font_t(value); result = 0; } + if (strcmp(attr, "entry") == 0) { data->entry = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "gid") == 0) { data->gid = mp_write_lv_font_glyph_dsc_gid_t(value); result = 0; } + if (strcmp(attr, "format") == 0) { data->format = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "adv_w") == 0) { data->adv_w = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "box_w") == 0) { data->box_w = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "box_h") == 0) { data->box_h = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ofs_x") == 0) { data->ofs_x = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ofs_y") == 0) { data->ofs_y = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "stride") == 0) { data->stride = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "is_placeholder") == 0) { data->is_placeholder = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "req_raw_bitmap") == 0) { data->req_raw_bitmap = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_font_glyph_dsc_t' object has no attribute '%s'", attr); + } + return result; } -static PyObject *py_lv_spinbox_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_glyph_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return py_lv_spinbox_create((PyObject *)type, py_args, py_kwds); + return make_new_lv_struct(type, args, kwds, sizeof(lv_font_glyph_dsc_t)); } -static void py_lv_spinbox_dealloc(py_lv_obj_t *self) +static void py_lv_font_glyph_dsc_t_dealloc(py_lv_struct_t *self) { - lvpy_dealloc_obj(self); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_spinbox_methods[] = { - {"set_value", (PyCFunction)py_lv_spinbox_set_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rollover", (PyCFunction)py_lv_spinbox_set_rollover, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_digit_format", (PyCFunction)py_lv_spinbox_set_digit_format, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_digit_count", (PyCFunction)py_lv_spinbox_set_digit_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_dec_point_pos", (PyCFunction)py_lv_spinbox_set_dec_point_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_step", (PyCFunction)py_lv_spinbox_set_step, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_range", (PyCFunction)py_lv_spinbox_set_range, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_value", (PyCFunction)py_lv_spinbox_set_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_value", (PyCFunction)py_lv_spinbox_set_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor_pos", (PyCFunction)py_lv_spinbox_set_cursor_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_digit_step_direction", (PyCFunction)py_lv_spinbox_set_digit_step_direction, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rollover", (PyCFunction)py_lv_spinbox_get_rollover, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_value", (PyCFunction)py_lv_spinbox_get_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_step", (PyCFunction)py_lv_spinbox_get_step, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_digit_count", (PyCFunction)py_lv_spinbox_get_digit_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dec_point_pos", (PyCFunction)py_lv_spinbox_get_dec_point_pos, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_min_value", (PyCFunction)py_lv_spinbox_get_min_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_value", (PyCFunction)py_lv_spinbox_get_max_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_digit_step_direction", (PyCFunction)py_lv_spinbox_get_digit_step_direction, METH_VARARGS | METH_KEYWORDS, NULL}, - {"step_next", (PyCFunction)py_lv_spinbox_step_next, METH_VARARGS | METH_KEYWORDS, NULL}, - {"step_prev", (PyCFunction)py_lv_spinbox_step_prev, METH_VARARGS | METH_KEYWORDS, NULL}, - {"increment", (PyCFunction)py_lv_spinbox_increment, METH_VARARGS | METH_KEYWORDS, NULL}, - {"decrement", (PyCFunction)py_lv_spinbox_decrement, METH_VARARGS | METH_KEYWORDS, NULL}, - {"bind_value", (PyCFunction)py_lv_spinbox_bind_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_spinbox_type = { +PyTypeObject py_lv_font_glyph_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.spinbox", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_spinbox_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_spinbox_new, - .tp_methods = py_lv_spinbox_methods, - .tp_call = (ternaryfunc)py_lv_spinbox_call, + .tp_name = "lvgl.lv_font_glyph_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_font_glyph_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_font_glyph_dsc_t_getattro, + .tp_setattro = (setter)py_lv_font_glyph_dsc_t_setattro, + .tp_new = py_lv_font_glyph_dsc_t_new, + .tp_methods = py_lv_font_glyph_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static py_lv_obj_type_t py_lv_spinbox_mapping = { - .lv_obj_class = &lv_spinbox_class, - .py_type = &py_lv_spinbox_type, -}; +static inline void* mp_write_ptr_lv_font_glyph_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_font_glyph_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_font_glyph_dsc_t*)self->data; +} +static lv_font_glyph_dsc_t mp_write_scratch_lv_font_glyph_dsc_t; -/* - * lvgl extension definition for: - * void lv_spinner_set_anim_params(lv_obj_t *obj, uint32_t t, uint32_t angle) - */ -static PyObject *py_lv_spinner_set_anim_params(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_font_glyph_dsc_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long t_val; long angle_val; - if (!PyArg_ParseTuple(py_args, "ll", &t_val, &angle_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t t = (uint32_t)t_val; - uint32_t angle = (uint32_t)angle_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_spinner_set_anim_params)(obj, t, angle); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_glyph_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_font_glyph_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_glyph_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_font_glyph_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_font_glyph_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_font_glyph_dsc_t, 0, sizeof(lv_font_glyph_dsc_t)); + return &mp_write_scratch_lv_font_glyph_dsc_t; } -static PyMethodDef py_lv_spinner_set_anim_params_def = { - "lv_spinner_set_anim_params", - (PyCFunction)py_lv_spinner_set_anim_params, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_font_glyph_dsc_t(struct_obj) (*((lv_font_glyph_dsc_t*)mp_write_value_ptr_lv_font_glyph_dsc_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_spinner_set_anim_duration(lv_obj_t *obj, uint32_t t) - */ -static PyObject *py_lv_spinner_set_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_font_glyph_dsc_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long t_val; - if (!PyArg_ParseTuple(py_args, "l", &t_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t t = (uint32_t)t_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_spinner_set_anim_duration)(obj, t); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_font_glyph_dsc_t_type, field); } -static PyMethodDef py_lv_spinner_set_anim_duration_def = { - "lv_spinner_set_anim_duration", - (PyCFunction)py_lv_spinner_set_anim_duration, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_font_glyph_dsc_t(field) lv_to_mp_struct_own(&py_lv_font_glyph_dsc_t_type, copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) +#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) /* - * lvgl extension definition for: - * void lv_spinner_set_arc_sweep(lv_obj_t *obj, uint32_t angle) + * Struct lv_font_info_t (CPython) */ -static PyObject *py_lv_spinner_set_arc_sweep(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_font_info_t_methods[]; + +static PyObject *py_lv_font_info_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long angle_val; - if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t angle = (uint32_t)angle_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_spinner_set_arc_sweep)(obj, angle); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_info_t *data = (lv_font_info_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); + if (strcmp(attr, "class_p") == 0) return mp_read_ptr_lv_font_class_t((void*)data->class_p); + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + if (strcmp(attr, "render_mode") == 0) return mp_obj_new_int_from_uint(data->render_mode); + if (strcmp(attr, "style") == 0) return mp_obj_new_int_from_uint(data->style); + if (strcmp(attr, "weight") == 0) return mp_obj_new_int(data->weight); + if (strcmp(attr, "kerning") == 0) return mp_obj_new_int(data->kerning); + for (PyMethodDef *m = py_lv_font_info_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_spinner_set_arc_sweep_def = { - "lv_spinner_set_arc_sweep", - (PyCFunction)py_lv_spinner_set_arc_sweep, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_font_info_t_field_names[] = {"name", "class_p", "size", "render_mode", "style", "weight", "kerning", NULL}; -/* - * lvgl extension definition for: - * uint32_t lv_spinner_get_anim_duration(lv_obj_t *obj) - */ -static PyObject *py_lv_spinner_get_anim_duration(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_info_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_spinner_get_anim_duration)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_font_info_t_field_names, py_lv_font_info_t_methods); } -static PyMethodDef py_lv_spinner_get_anim_duration_def = { - "lv_spinner_get_anim_duration", - (PyCFunction)py_lv_spinner_get_anim_duration, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_font_info_t_type_methods[] = { + {"__dir__", py_lv_font_info_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_font_info_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_info_t *data = (lv_font_info_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_font_info_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "class_p") == 0) { data->class_p = (void*)mp_write_ptr_lv_font_class_t(value); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "render_mode") == 0) { data->render_mode = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "style") == 0) { data->style = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "weight") == 0) { data->weight = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "kerning") == 0) { data->kerning = (int)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_font_info_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * uint32_t lv_spinner_get_arc_sweep(lv_obj_t *obj) - */ -static PyObject *py_lv_spinner_get_arc_sweep(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_info_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_font_info_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_spinner_get_arc_sweep)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); +static void py_lv_font_info_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_spinner_get_arc_sweep_def = { - "lv_spinner_get_arc_sweep", - (PyCFunction)py_lv_spinner_get_arc_sweep, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_font_info_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_font_info_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_font_info_t_dealloc, + .tp_getattro = (getter)py_lv_font_info_t_getattro, + .tp_setattro = (setter)py_lv_font_info_t_setattro, + .tp_new = py_lv_font_info_t_new, + .tp_methods = py_lv_font_info_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_obj_t *lv_spinner_create(lv_obj_t *parent) - */ -static PyObject *py_lv_spinner_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_font_info_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_font_info_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_info_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_spinner_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_font_info_t*)self->data; } -static PyMethodDef py_lv_spinner_create_def = { - "lv_spinner_create", - (PyCFunction)py_lv_spinner_create, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_font_info_t mp_write_scratch_lv_font_info_t; -/* - * lvgl spinner object definitions (CPython) - */ -static PyObject *py_lv_spinner_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_font_info_t(PyObject *value) { - (void)type; - return py_lv_spinner_create(type, py_args, py_kwds); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_info_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_font_info_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_info_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_font_info_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_font_info_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_info_t or dict, got None"); + } + memset(&mp_write_scratch_lv_font_info_t, 0, sizeof(lv_font_info_t)); + return &mp_write_scratch_lv_font_info_t; } -static PyObject *py_lv_spinner_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_spinner_create((PyObject *)type, py_args, py_kwds); -} +#define mp_write_lv_font_info_t(struct_obj) (*((lv_font_info_t*)mp_write_value_ptr_lv_font_info_t(struct_obj))) -static void py_lv_spinner_dealloc(py_lv_obj_t *self) +static inline PyObject *mp_read_ptr_lv_font_info_t(void *field) { - lvpy_dealloc_obj(self); + return lv_to_mp_struct(&py_lv_font_info_t_type, field); } -static PyMethodDef py_lv_spinner_methods[] = { - {"set_anim_params", (PyCFunction)py_lv_spinner_set_anim_params, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_anim_duration", (PyCFunction)py_lv_spinner_set_anim_duration, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_arc_sweep", (PyCFunction)py_lv_spinner_set_arc_sweep, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_anim_duration", (PyCFunction)py_lv_spinner_get_anim_duration, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_arc_sweep", (PyCFunction)py_lv_spinner_get_arc_sweep, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; +#define mp_read_lv_font_info_t(field) lv_to_mp_struct_own(&py_lv_font_info_t_type, copy_buffer(&field, sizeof(lv_font_info_t))) +#define mp_read_byref_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(&field) -PyTypeObject py_lv_spinner_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.spinner", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_spinner_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_spinner_new, - .tp_methods = py_lv_spinner_methods, - .tp_call = (ternaryfunc)py_lv_spinner_call, -}; +#define funcptr_lv_layout_update_cb_t NULL -static py_lv_obj_type_t py_lv_spinner_mapping = { - .lv_obj_class = &lv_spinner_class, - .py_type = &py_lv_spinner_type, -}; +static inline PyObject *mp_lv_funcptr_lv_layout_update_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * void lv_switch_set_orientation(lv_obj_t *obj, lv_switch_orientation_t orientation) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_layout_callbacks_t_layout_update_cb' + * lv_layout_update_cb_t layout_update_cb */ -static PyObject *py_lv_switch_set_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *orientation_py; - if (!PyArg_ParseTuple(py_args, "O", &orientation_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_switch_orientation_t orientation = (int)mp_obj_get_int(orientation_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_switch_orientation_t))lv_switch_set_orientation)(obj, orientation); - lvpy_unlock(); - PyGILState_Release(gstate); - Py_RETURN_NONE; -} +#define funcptr_lv_layout_get_min_size_cb_t NULL -static PyMethodDef py_lv_switch_set_orientation_def = { - "lv_switch_set_orientation", - (PyCFunction)py_lv_switch_set_orientation, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_layout_get_min_size_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * lv_switch_orientation_t lv_switch_get_orientation(lv_obj_t *obj) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_layout_callbacks_t_get_min_size_cb' + * lv_layout_get_min_size_cb_t get_min_size_cb */ -static PyObject *py_lv_switch_get_orientation(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_switch_orientation_t _res; - lvpy_lock(); - _res = ((lv_switch_orientation_t (*)(lv_obj_t *))lv_switch_get_orientation)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} -static PyMethodDef py_lv_switch_get_orientation_def = { - "lv_switch_get_orientation", - (PyCFunction)py_lv_switch_get_orientation, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +/* + * Struct lv_layout_callbacks_t (CPython) + */ + +extern PyMethodDef py_lv_layout_callbacks_t_methods[]; + +static PyObject *py_lv_layout_callbacks_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "layout_update_cb") == 0) return mp_lv_funcptr(NULL, data->layout_update_cb, NULL, "lv_layout_callbacks_t_layout_update_cb", NULL); + if (strcmp(attr, "get_min_size_cb") == 0) return mp_lv_funcptr(NULL, data->get_min_size_cb, NULL, "lv_layout_callbacks_t_get_min_size_cb", NULL); + for (PyMethodDef *m = py_lv_layout_callbacks_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} +static const char *const py_lv_layout_callbacks_t_field_names[] = {"layout_update_cb", "get_min_size_cb", NULL}; -/* - * lvgl extension definition for: - * lv_obj_t *lv_switch_create(lv_obj_t *parent) - */ -static PyObject *py_lv_switch_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_callbacks_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_switch_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_layout_callbacks_t_field_names, py_lv_layout_callbacks_t_methods); } -static PyMethodDef py_lv_switch_create_def = { - "lv_switch_create", - (PyCFunction)py_lv_switch_create, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_layout_callbacks_t_type_methods[] = { + {"__dir__", py_lv_layout_callbacks_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl switch object definitions (CPython) - */ -static PyObject *py_lv_switch_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static int py_lv_layout_callbacks_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - (void)type; - return py_lv_switch_create(type, py_args, py_kwds); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_layout_callbacks_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "layout_update_cb") == 0) { data->layout_update_cb = mp_lv_callback(value, NULL, "lv_layout_callbacks_t_layout_update_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "get_min_size_cb") == 0) { data->get_min_size_cb = mp_lv_callback(value, NULL, "lv_layout_callbacks_t_get_min_size_cb", NULL, NULL, NULL, NULL); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_layout_callbacks_t' object has no attribute '%s'", attr); + } + return result; } -static PyObject *py_lv_switch_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_callbacks_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return py_lv_switch_create((PyObject *)type, py_args, py_kwds); + return make_new_lv_struct(type, args, kwds, sizeof(lv_layout_callbacks_t)); } -static void py_lv_switch_dealloc(py_lv_obj_t *self) +static void py_lv_layout_callbacks_t_dealloc(py_lv_struct_t *self) { - lvpy_dealloc_obj(self); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_switch_methods[] = { - {"set_orientation", (PyCFunction)py_lv_switch_set_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_orientation", (PyCFunction)py_lv_switch_get_orientation, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_switch_type = { +PyTypeObject py_lv_layout_callbacks_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.switch", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_switch_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_switch_new, - .tp_methods = py_lv_switch_methods, - .tp_call = (ternaryfunc)py_lv_switch_call, + .tp_name = "lvgl.lv_layout_callbacks_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_layout_callbacks_t_dealloc, + .tp_getattro = (getter)py_lv_layout_callbacks_t_getattro, + .tp_setattro = (setter)py_lv_layout_callbacks_t_setattro, + .tp_new = py_lv_layout_callbacks_t_new, + .tp_methods = py_lv_layout_callbacks_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static py_lv_obj_type_t py_lv_switch_mapping = { - .lv_obj_class = &lv_switch_class, - .py_type = &py_lv_switch_type, -}; +static inline void* mp_write_ptr_lv_layout_callbacks_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_layout_callbacks_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_layout_callbacks_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_layout_callbacks_t*)self->data; +} +static lv_layout_callbacks_t mp_write_scratch_lv_layout_callbacks_t; -/* - * lvgl extension definition for: - * void lv_table_set_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col, const char *txt) - */ -static PyObject *py_lv_table_set_cell_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_layout_callbacks_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t row = (uint32_t)row_val; - uint32_t col = (uint32_t)col_val; - const char *txt = (const char *)(char*)convert_from_str(txt_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, const char *))lv_table_set_cell_value)(obj, row, col, txt); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_layout_callbacks_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_layout_callbacks_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_layout_callbacks_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_layout_callbacks_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_layout_callbacks_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_layout_callbacks_t or dict, got None"); + } + memset(&mp_write_scratch_lv_layout_callbacks_t, 0, sizeof(lv_layout_callbacks_t)); + return &mp_write_scratch_lv_layout_callbacks_t; } -static PyMethodDef py_lv_table_set_cell_value_def = { - "lv_table_set_cell_value", - (PyCFunction)py_lv_table_set_cell_value, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_layout_callbacks_t(struct_obj) (*((lv_layout_callbacks_t*)mp_write_value_ptr_lv_layout_callbacks_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_table_set_row_count(lv_obj_t *obj, uint32_t row_cnt) - */ -static PyObject *py_lv_table_set_row_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_layout_callbacks_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &row_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t row_cnt = (uint32_t)row_cnt_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_table_set_row_count)(obj, row_cnt); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_layout_callbacks_t_type, field); } -static PyMethodDef py_lv_table_set_row_count_def = { - "lv_table_set_row_count", - (PyCFunction)py_lv_table_set_row_count, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_layout_callbacks_t(field) lv_to_mp_struct_own(&py_lv_layout_callbacks_t_type, copy_buffer(&field, sizeof(lv_layout_callbacks_t))) +#define mp_read_byref_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(&field) + +#define funcptr_lv_timer_handler_resume_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_timer_handler_resume_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * void lv_table_set_column_count(lv_obj_t *obj, uint32_t col_cnt) + * Struct lv_draw_fill_dsc_t (CPython) */ -static PyObject *py_lv_table_set_column_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_draw_fill_dsc_t_methods[]; + +static PyObject *py_lv_draw_fill_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long col_cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &col_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t col_cnt = (uint32_t)col_cnt_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_table_set_column_count)(obj, col_cnt); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "grad") == 0) return mp_read_byref_lv_grad_dsc_t(data->grad); + for (PyMethodDef *m = py_lv_draw_fill_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_table_set_column_count_def = { - "lv_table_set_column_count", - (PyCFunction)py_lv_table_set_column_count, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_draw_fill_dsc_t_field_names[] = {"base", "radius", "opa", "color", "grad", NULL}; -/* - * lvgl extension definition for: - * void lv_table_set_column_width(lv_obj_t *obj, uint32_t col_id, int32_t w) - */ -static PyObject *py_lv_table_set_column_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_fill_dsc_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long col_id_val; long w_val; - if (!PyArg_ParseTuple(py_args, "ll", &col_id_val, &w_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t col_id = (uint32_t)col_id_val; - int32_t w = (int32_t)w_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, int32_t))lv_table_set_column_width)(obj, col_id, w); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_fill_dsc_t_field_names, py_lv_draw_fill_dsc_t_methods); } -static PyMethodDef py_lv_table_set_column_width_def = { - "lv_table_set_column_width", - (PyCFunction)py_lv_table_set_column_width, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_draw_fill_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_fill_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * void lv_table_set_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) - */ -static PyObject *py_lv_table_set_cell_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_draw_fill_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t row = (uint32_t)row_val; - uint32_t col = (uint32_t)col_val; - lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_table_set_cell_ctrl)(obj, row, col, ctrl); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_fill_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "grad") == 0) { data->grad = mp_write_lv_grad_dsc_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_fill_dsc_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_table_set_cell_ctrl_def = { - "lv_table_set_cell_ctrl", - (PyCFunction)py_lv_table_set_cell_ctrl, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_draw_fill_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_fill_dsc_t)); +} -/* - * lvgl extension definition for: - * void lv_table_clear_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) - */ -static PyObject *py_lv_table_clear_cell_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_draw_fill_dsc_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t row = (uint32_t)row_val; - uint32_t col = (uint32_t)col_val; - lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_table_clear_cell_ctrl)(obj, row, col, ctrl); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_table_clear_cell_ctrl_def = { - "lv_table_clear_cell_ctrl", - (PyCFunction)py_lv_table_clear_cell_ctrl, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_draw_fill_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_fill_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_fill_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_fill_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_fill_dsc_t_setattro, + .tp_new = py_lv_draw_fill_dsc_t_new, + .tp_methods = py_lv_draw_fill_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * void lv_table_set_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col, void *user_data) - */ -static PyObject *py_lv_table_set_cell_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_draw_fill_dsc_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - void *user_data = mp_to_ptr(user_data_py); - uint16_t row = (uint16_t)row_val; - uint16_t col = (uint16_t)col_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint16_t, uint16_t, void *))lv_table_set_cell_user_data)(obj, row, col, user_data); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_fill_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_fill_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_fill_dsc_t*)self->data; } -static PyMethodDef py_lv_table_set_cell_user_data_def = { - "lv_table_set_cell_user_data", - (PyCFunction)py_lv_table_set_cell_user_data, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_draw_fill_dsc_t mp_write_scratch_lv_draw_fill_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_fill_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_fill_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_fill_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_fill_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_fill_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_fill_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_fill_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_fill_dsc_t, 0, sizeof(lv_draw_fill_dsc_t)); + return &mp_write_scratch_lv_draw_fill_dsc_t; +} +#define mp_write_lv_draw_fill_dsc_t(struct_obj) (*((lv_draw_fill_dsc_t*)mp_write_value_ptr_lv_draw_fill_dsc_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_table_set_selected_cell(lv_obj_t *obj, uint16_t row, uint16_t col) - */ -static PyObject *py_lv_table_set_selected_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_draw_fill_dsc_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; - if (!PyArg_ParseTuple(py_args, "ll", &row_val, &col_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint16_t row = (uint16_t)row_val; - uint16_t col = (uint16_t)col_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint16_t, uint16_t))lv_table_set_selected_cell)(obj, row, col); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_draw_fill_dsc_t_type, field); } -static PyMethodDef py_lv_table_set_selected_cell_def = { - "lv_table_set_selected_cell", - (PyCFunction)py_lv_table_set_selected_cell, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_draw_fill_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_fill_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_fill_dsc_t))) +#define mp_read_byref_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(&field) /* - * lvgl extension definition for: - * const char *lv_table_get_cell_value(lv_obj_t *obj, uint32_t row, uint32_t col) + * Struct lv_draw_border_dsc_t (CPython) */ -static PyObject *py_lv_table_get_cell_value(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_draw_border_dsc_t_methods[]; + +static PyObject *py_lv_draw_border_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; - if (!PyArg_ParseTuple(py_args, "ll", &row_val, &col_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t row = (uint32_t)row_val; - uint32_t col = (uint32_t)col_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const char * _res; - lvpy_lock(); - _res = ((const char *(*)(lv_obj_t *, uint32_t, uint32_t))lv_table_get_cell_value)(obj, row, col); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_str((void*)_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "side") == 0) return mp_obj_new_int(data->side); + for (PyMethodDef *m = py_lv_draw_border_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_border_dsc_t_field_names[] = {"base", "radius", "color", "width", "opa", "side", NULL}; + +static PyObject *py_lv_draw_border_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_border_dsc_t_field_names, py_lv_draw_border_dsc_t_methods); } -static PyMethodDef py_lv_table_get_cell_value_def = { - "lv_table_get_cell_value", - (PyCFunction)py_lv_table_get_cell_value, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_draw_border_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_border_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_draw_border_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_border_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "side") == 0) { data->side = (int)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_border_dsc_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * uint32_t lv_table_get_row_count(lv_obj_t *obj) - */ -static PyObject *py_lv_table_get_row_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_border_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_border_dsc_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_table_get_row_count)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); +static void py_lv_draw_border_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_table_get_row_count_def = { - "lv_table_get_row_count", - (PyCFunction)py_lv_table_get_row_count, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_draw_border_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_border_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_border_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_border_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_border_dsc_t_setattro, + .tp_new = py_lv_draw_border_dsc_t_new, + .tp_methods = py_lv_draw_border_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * uint32_t lv_table_get_column_count(lv_obj_t *obj) - */ -static PyObject *py_lv_table_get_column_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_draw_border_dsc_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_table_get_column_count)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_border_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_border_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_border_dsc_t*)self->data; } -static PyMethodDef py_lv_table_get_column_count_def = { - "lv_table_get_column_count", - (PyCFunction)py_lv_table_get_column_count, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_draw_border_dsc_t mp_write_scratch_lv_draw_border_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_border_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_border_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_border_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_border_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_border_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_border_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_border_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_border_dsc_t, 0, sizeof(lv_draw_border_dsc_t)); + return &mp_write_scratch_lv_draw_border_dsc_t; +} +#define mp_write_lv_draw_border_dsc_t(struct_obj) (*((lv_draw_border_dsc_t*)mp_write_value_ptr_lv_draw_border_dsc_t(struct_obj))) -/* - * lvgl extension definition for: - * int32_t lv_table_get_column_width(lv_obj_t *obj, uint32_t col) - */ -static PyObject *py_lv_table_get_column_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_draw_border_dsc_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long col_val; - if (!PyArg_ParseTuple(py_args, "l", &col_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t col = (uint32_t)col_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *, uint32_t))lv_table_get_column_width)(obj, col); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_draw_border_dsc_t_type, field); } -static PyMethodDef py_lv_table_get_column_width_def = { - "lv_table_get_column_width", - (PyCFunction)py_lv_table_get_column_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_draw_border_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_border_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_border_dsc_t))) +#define mp_read_byref_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(&field) /* - * lvgl extension definition for: - * bool lv_table_has_cell_ctrl(lv_obj_t *obj, uint32_t row, uint32_t col, lv_table_cell_ctrl_t ctrl) + * Struct lv_draw_box_shadow_dsc_t (CPython) */ -static PyObject *py_lv_table_has_cell_ctrl(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_draw_box_shadow_dsc_t_methods[]; + +static PyObject *py_lv_draw_box_shadow_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; PyObject *ctrl_py; - if (!PyArg_ParseTuple(py_args, "llO", &row_val, &col_val, &ctrl_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t row = (uint32_t)row_val; - uint32_t col = (uint32_t)col_val; - lv_table_cell_ctrl_t ctrl = (int)mp_obj_get_int(ctrl_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, uint32_t, uint32_t, lv_table_cell_ctrl_t))lv_table_has_cell_ctrl)(obj, row, col, ctrl); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); + if (strcmp(attr, "spread") == 0) return mp_obj_new_int(data->spread); + if (strcmp(attr, "ofs_x") == 0) return mp_obj_new_int(data->ofs_x); + if (strcmp(attr, "ofs_y") == 0) return mp_obj_new_int(data->ofs_y); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "bg_cover") == 0) return mp_obj_new_int_from_uint(data->bg_cover); + for (PyMethodDef *m = py_lv_draw_box_shadow_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_table_has_cell_ctrl_def = { - "lv_table_has_cell_ctrl", - (PyCFunction)py_lv_table_has_cell_ctrl, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_draw_box_shadow_dsc_t_field_names[] = {"base", "radius", "color", "width", "spread", "ofs_x", "ofs_y", "opa", "bg_cover", NULL}; -/* - * lvgl extension definition for: - * void lv_table_get_selected_cell(lv_obj_t *obj, uint32_t *row, uint32_t *col) - */ -static PyObject *py_lv_table_get_selected_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_box_shadow_dsc_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *row_py; PyObject *col_py; - if (!PyArg_ParseTuple(py_args, "OO", &row_py, &col_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t *row = mp_array_to_u32ptr(row_py); - uint32_t *col = mp_array_to_u32ptr(col_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t *, uint32_t *))lv_table_get_selected_cell)(obj, row, col); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_box_shadow_dsc_t_field_names, py_lv_draw_box_shadow_dsc_t_methods); } -static PyMethodDef py_lv_table_get_selected_cell_def = { - "lv_table_get_selected_cell", - (PyCFunction)py_lv_table_get_selected_cell, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_draw_box_shadow_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_box_shadow_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_draw_box_shadow_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_box_shadow_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "spread") == 0) { data->spread = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ofs_x") == 0) { data->ofs_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ofs_y") == 0) { data->ofs_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "bg_cover") == 0) { data->bg_cover = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_box_shadow_dsc_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * void *lv_table_get_cell_user_data(lv_obj_t *obj, uint16_t row, uint16_t col) - */ -static PyObject *py_lv_table_get_cell_user_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_box_shadow_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long row_val; long col_val; - if (!PyArg_ParseTuple(py_args, "ll", &row_val, &col_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint16_t row = (uint16_t)row_val; - uint16_t col = (uint16_t)col_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - void * _res; - lvpy_lock(); - _res = ((void *(*)(lv_obj_t *, uint16_t, uint16_t))lv_table_get_cell_user_data)(obj, row, col); - lvpy_unlock(); - - PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_box_shadow_dsc_t)); } -static PyMethodDef py_lv_table_get_cell_user_data_def = { - "lv_table_get_cell_user_data", - (PyCFunction)py_lv_table_get_cell_user_data, - METH_VARARGS | METH_KEYWORDS, - NULL +static void py_lv_draw_box_shadow_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_box_shadow_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_box_shadow_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_box_shadow_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_box_shadow_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_box_shadow_dsc_t_setattro, + .tp_new = py_lv_draw_box_shadow_dsc_t_new, + .tp_methods = py_lv_draw_box_shadow_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; +static inline void* mp_write_ptr_lv_draw_box_shadow_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_box_shadow_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_box_shadow_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_box_shadow_dsc_t*)self->data; +} + +static lv_draw_box_shadow_dsc_t mp_write_scratch_lv_draw_box_shadow_dsc_t; -/* - * lvgl extension definition for: - * lv_obj_t *lv_table_create(lv_obj_t *parent) - */ -static PyObject *py_lv_table_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_draw_box_shadow_dsc_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_box_shadow_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_box_shadow_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_box_shadow_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_box_shadow_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_box_shadow_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_box_shadow_dsc_t or dict, got None"); } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_table_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + memset(&mp_write_scratch_lv_draw_box_shadow_dsc_t, 0, sizeof(lv_draw_box_shadow_dsc_t)); + return &mp_write_scratch_lv_draw_box_shadow_dsc_t; } -static PyMethodDef py_lv_table_create_def = { - "lv_table_create", - (PyCFunction)py_lv_table_create, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_write_lv_draw_box_shadow_dsc_t(struct_obj) (*((lv_draw_box_shadow_dsc_t*)mp_write_value_ptr_lv_draw_box_shadow_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_box_shadow_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_box_shadow_dsc_t_type, field); +} + +#define mp_read_lv_draw_box_shadow_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_box_shadow_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_box_shadow_dsc_t))) +#define mp_read_byref_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(&field) /* - * lvgl table object definitions (CPython) + * Struct lv_draw_letter_dsc_t (CPython) */ -static PyObject *py_lv_table_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) -{ - (void)type; - return py_lv_table_create(type, py_args, py_kwds); -} -static PyObject *py_lv_table_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +extern PyMethodDef py_lv_draw_letter_dsc_t_methods[]; + +static PyObject *py_lv_draw_letter_dsc_t_getattro(PyObject *self, PyObject *name) { - return py_lv_table_create((PyObject *)type, py_args, py_kwds); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "unicode") == 0) return mp_obj_new_int_from_uint(data->unicode); + if (strcmp(attr, "font") == 0) return mp_read_ptr_lv_font_t((void*)data->font); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); + if (strcmp(attr, "scale_x") == 0) return mp_obj_new_int(data->scale_x); + if (strcmp(attr, "scale_y") == 0) return mp_obj_new_int(data->scale_y); + if (strcmp(attr, "skew_x") == 0) return mp_obj_new_int(data->skew_x); + if (strcmp(attr, "skew_y") == 0) return mp_obj_new_int(data->skew_y); + if (strcmp(attr, "pivot") == 0) return mp_read_byref_lv_point_t(data->pivot); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "decor") == 0) return mp_obj_new_int(data->decor); + if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); + if (strcmp(attr, "outline_stroke_opa") == 0) return mp_obj_new_int_from_uint(data->outline_stroke_opa); + if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); + if (strcmp(attr, "outline_stroke_color") == 0) return mp_read_byref_lv_color_t(data->outline_stroke_color); + for (PyMethodDef *m = py_lv_draw_letter_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static void py_lv_table_dealloc(py_lv_obj_t *self) +static const char *const py_lv_draw_letter_dsc_t_field_names[] = {"base", "unicode", "font", "color", "rotation", "scale_x", "scale_y", "skew_x", "skew_y", "pivot", "opa", "decor", "blend_mode", "outline_stroke_opa", "outline_stroke_width", "outline_stroke_color", NULL}; + +static PyObject *py_lv_draw_letter_dsc_t_dir(PyObject *self, PyObject *unused) { - lvpy_dealloc_obj(self); + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_letter_dsc_t_field_names, py_lv_draw_letter_dsc_t_methods); } -static PyMethodDef py_lv_table_methods[] = { - {"set_cell_value", (PyCFunction)py_lv_table_set_cell_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_row_count", (PyCFunction)py_lv_table_set_row_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_column_count", (PyCFunction)py_lv_table_set_column_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_column_width", (PyCFunction)py_lv_table_set_column_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cell_ctrl", (PyCFunction)py_lv_table_set_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_cell_ctrl", (PyCFunction)py_lv_table_clear_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cell_user_data", (PyCFunction)py_lv_table_set_cell_user_data, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_selected_cell", (PyCFunction)py_lv_table_set_selected_cell, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cell_value", (PyCFunction)py_lv_table_get_cell_value, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_row_count", (PyCFunction)py_lv_table_get_row_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_column_count", (PyCFunction)py_lv_table_get_column_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_column_width", (PyCFunction)py_lv_table_get_column_width, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_cell_ctrl", (PyCFunction)py_lv_table_has_cell_ctrl, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_selected_cell", (PyCFunction)py_lv_table_get_selected_cell, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cell_user_data", (PyCFunction)py_lv_table_get_cell_user_data, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_table_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.table", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_table_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_table_new, - .tp_methods = py_lv_table_methods, - .tp_call = (ternaryfunc)py_lv_table_call, +static PyMethodDef py_lv_draw_letter_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_letter_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} }; -static py_lv_obj_type_t py_lv_table_mapping = { - .lv_obj_class = &lv_table_class, - .py_type = &py_lv_table_type, -}; +static int py_lv_draw_letter_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_letter_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "unicode") == 0) { data->unicode = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "font") == 0) { data->font = (void*)mp_write_ptr_lv_font_t(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scale_x") == 0) { data->scale_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scale_y") == 0) { data->scale_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "skew_x") == 0) { data->skew_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "skew_y") == 0) { data->skew_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pivot") == 0) { data->pivot = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "decor") == 0) { data->decor = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_stroke_opa") == 0) { data->outline_stroke_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_stroke_color") == 0) { data->outline_stroke_color = mp_write_lv_color_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_letter_dsc_t' object has no attribute '%s'", attr); + } + return result; +} +static PyObject *py_lv_draw_letter_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_letter_dsc_t)); +} -/* - * lvgl extension definition for: - * lv_obj_t *lv_tabview_add_tab(lv_obj_t *obj, const char *name) - */ -static PyObject *py_lv_tabview_add_tab(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_draw_letter_dsc_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *name_py; - if (!PyArg_ParseTuple(py_args, "O", &name_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *name = (const char *)(char*)convert_from_str(name_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_tabview_add_tab)(obj, name); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_tabview_add_tab_def = { - "lv_tabview_add_tab", - (PyCFunction)py_lv_tabview_add_tab, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_draw_letter_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_letter_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_letter_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_letter_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_letter_dsc_t_setattro, + .tp_new = py_lv_draw_letter_dsc_t_new, + .tp_methods = py_lv_draw_letter_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * void lv_tabview_set_tab_text(lv_obj_t *obj, uint32_t idx, const char *new_name) - */ -static PyObject *py_lv_tabview_set_tab_text(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_draw_letter_dsc_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long idx_val; PyObject *new_name_py; - if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &new_name_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t idx = (uint32_t)idx_val; - const char *new_name = (const char *)(char*)convert_from_str(new_name_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, const char *))lv_tabview_set_tab_text)(obj, idx, new_name); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_letter_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_letter_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_letter_dsc_t*)self->data; } -static PyMethodDef py_lv_tabview_set_tab_text_def = { - "lv_tabview_set_tab_text", - (PyCFunction)py_lv_tabview_set_tab_text, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_draw_letter_dsc_t mp_write_scratch_lv_draw_letter_dsc_t; -/* - * lvgl extension definition for: - * void lv_tabview_set_active(lv_obj_t *obj, uint32_t idx, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_tabview_set_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_draw_letter_dsc_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long idx_val; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t idx = (uint32_t)idx_val; - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, lv_anim_enable_t))lv_tabview_set_active)(obj, idx, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_letter_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_letter_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_letter_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_letter_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_letter_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_letter_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_letter_dsc_t, 0, sizeof(lv_draw_letter_dsc_t)); + return &mp_write_scratch_lv_draw_letter_dsc_t; } -static PyMethodDef py_lv_tabview_set_active_def = { - "lv_tabview_set_active", - (PyCFunction)py_lv_tabview_set_active, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_draw_letter_dsc_t(struct_obj) (*((lv_draw_letter_dsc_t*)mp_write_value_ptr_lv_draw_letter_dsc_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_tabview_set_tab_bar_position(lv_obj_t *obj, lv_dir_t dir) - */ -static PyObject *py_lv_tabview_set_tab_bar_position(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_draw_letter_dsc_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *dir_py; - if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_dir_t dir = (int)mp_obj_get_int(dir_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_dir_t))lv_tabview_set_tab_bar_position)(obj, dir); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_draw_letter_dsc_t_type, field); } -static PyMethodDef py_lv_tabview_set_tab_bar_position_def = { - "lv_tabview_set_tab_bar_position", - (PyCFunction)py_lv_tabview_set_tab_bar_position, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_draw_letter_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_letter_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_letter_dsc_t))) +#define mp_read_byref_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(&field) /* - * lvgl extension definition for: - * void lv_tabview_set_tab_bar_size(lv_obj_t *obj, int32_t size) + * Struct lv_draw_glyph_dsc_t (CPython) */ -static PyObject *py_lv_tabview_set_tab_bar_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_draw_glyph_dsc_t_methods[]; + +static PyObject *py_lv_draw_glyph_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t size = (int32_t)size_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_tabview_set_tab_bar_size)(obj, size); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "glyph_data") == 0) return ptr_to_mp((void*)data->glyph_data); + if (strcmp(attr, "format") == 0) return mp_obj_new_int(data->format); + if (strcmp(attr, "letter_coords") == 0) return mp_read_ptr_lv_area_t((void*)data->letter_coords); + if (strcmp(attr, "bg_coords") == 0) return mp_read_ptr_lv_area_t((void*)data->bg_coords); + if (strcmp(attr, "g") == 0) return mp_read_ptr_lv_font_glyph_dsc_t((void*)data->g); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "outline_stroke_color") == 0) return mp_read_byref_lv_color_t(data->outline_stroke_color); + if (strcmp(attr, "outline_stroke_opa") == 0) return mp_obj_new_int_from_uint(data->outline_stroke_opa); + if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); + if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); + if (strcmp(attr, "pivot") == 0) return mp_read_byref_lv_point_t(data->pivot); + if (strcmp(attr, "_draw_buf") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->_draw_buf); + for (PyMethodDef *m = py_lv_draw_glyph_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_tabview_set_tab_bar_size_def = { - "lv_tabview_set_tab_bar_size", - (PyCFunction)py_lv_tabview_set_tab_bar_size, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_draw_glyph_dsc_t_field_names[] = {"glyph_data", "format", "letter_coords", "bg_coords", "g", "color", "opa", "outline_stroke_color", "outline_stroke_opa", "outline_stroke_width", "rotation", "pivot", "_draw_buf", NULL}; -/* - * lvgl extension definition for: - * uint32_t lv_tabview_get_tab_count(lv_obj_t *obj) - */ -static PyObject *py_lv_tabview_get_tab_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_glyph_dsc_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_tabview_get_tab_count)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_glyph_dsc_t_field_names, py_lv_draw_glyph_dsc_t_methods); } -static PyMethodDef py_lv_tabview_get_tab_count_def = { - "lv_tabview_get_tab_count", - (PyCFunction)py_lv_tabview_get_tab_count, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_draw_glyph_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_glyph_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_draw_glyph_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_glyph_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "glyph_data") == 0) { data->glyph_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "format") == 0) { data->format = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "letter_coords") == 0) { data->letter_coords = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "bg_coords") == 0) { data->bg_coords = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "g") == 0) { data->g = (void*)mp_write_ptr_lv_font_glyph_dsc_t(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_stroke_color") == 0) { data->outline_stroke_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "outline_stroke_opa") == 0) { data->outline_stroke_opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pivot") == 0) { data->pivot = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "_draw_buf") == 0) { data->_draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_glyph_dsc_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * uint32_t lv_tabview_get_tab_active(lv_obj_t *obj) - */ -static PyObject *py_lv_tabview_get_tab_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_glyph_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_glyph_dsc_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_obj_t *))lv_tabview_get_tab_active)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); +static void py_lv_draw_glyph_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_tabview_get_tab_active_def = { - "lv_tabview_get_tab_active", - (PyCFunction)py_lv_tabview_get_tab_active, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_draw_glyph_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_glyph_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_glyph_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_glyph_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_glyph_dsc_t_setattro, + .tp_new = py_lv_draw_glyph_dsc_t_new, + .tp_methods = py_lv_draw_glyph_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_obj_t *lv_tabview_get_tab_button(lv_obj_t *obj, int32_t idx) - */ -static PyObject *py_lv_tabview_get_tab_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_draw_glyph_dsc_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long idx_val; - if (!PyArg_ParseTuple(py_args, "l", &idx_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t idx = (int32_t)idx_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, int32_t))lv_tabview_get_tab_button)(obj, idx); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_glyph_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_glyph_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_glyph_dsc_t*)self->data; } -static PyMethodDef py_lv_tabview_get_tab_button_def = { - "lv_tabview_get_tab_button", - (PyCFunction)py_lv_tabview_get_tab_button, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_draw_glyph_dsc_t mp_write_scratch_lv_draw_glyph_dsc_t; -/* - * lvgl extension definition for: - * lv_obj_t *lv_tabview_get_content(lv_obj_t *obj) - */ -static PyObject *py_lv_tabview_get_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_draw_glyph_dsc_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tabview_get_content)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_glyph_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_glyph_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_glyph_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_glyph_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_glyph_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_glyph_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_glyph_dsc_t, 0, sizeof(lv_draw_glyph_dsc_t)); + return &mp_write_scratch_lv_draw_glyph_dsc_t; } -static PyMethodDef py_lv_tabview_get_content_def = { - "lv_tabview_get_content", - (PyCFunction)py_lv_tabview_get_content, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_draw_glyph_dsc_t(struct_obj) (*((lv_draw_glyph_dsc_t*)mp_write_value_ptr_lv_draw_glyph_dsc_t(struct_obj))) -/* - * lvgl extension definition for: - * lv_obj_t *lv_tabview_get_tab_bar(lv_obj_t *obj) - */ -static PyObject *py_lv_tabview_get_tab_bar(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_draw_glyph_dsc_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tabview_get_tab_bar)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return lv_to_mp_struct(&py_lv_draw_glyph_dsc_t_type, field); } -static PyMethodDef py_lv_tabview_get_tab_bar_def = { - "lv_tabview_get_tab_bar", - (PyCFunction)py_lv_tabview_get_tab_bar, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_draw_glyph_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_glyph_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_glyph_dsc_t))) +#define mp_read_byref_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(&field) /* - * lvgl extension definition for: - * lv_dir_t lv_tabview_get_tab_bar_position(lv_obj_t *obj) + * Struct lv_fs_path_ex_t (CPython) */ -static PyObject *py_lv_tabview_get_tab_bar_position(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_dir_t _res; - lvpy_lock(); - _res = ((lv_dir_t (*)(lv_obj_t *))lv_tabview_get_tab_bar_position)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} +extern PyMethodDef py_lv_fs_path_ex_t_methods[]; -static PyMethodDef py_lv_tabview_get_tab_bar_position_def = { - "lv_tabview_get_tab_bar_position", - (PyCFunction)py_lv_tabview_get_tab_bar_position, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static PyObject *py_lv_fs_path_ex_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "path") == 0) return ptr_to_mp(data->path); + for (PyMethodDef *m = py_lv_fs_path_ex_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} +static const char *const py_lv_fs_path_ex_t_field_names[] = {"path", NULL}; -/* - * lvgl extension definition for: - * lv_obj_t *lv_tabview_create(lv_obj_t *parent) - */ -static PyObject *py_lv_tabview_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_path_ex_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tabview_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_fs_path_ex_t_field_names, py_lv_fs_path_ex_t_methods); } -static PyMethodDef py_lv_tabview_create_def = { - "lv_tabview_create", - (PyCFunction)py_lv_tabview_create, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_fs_path_ex_t_type_methods[] = { + {"__dir__", py_lv_fs_path_ex_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl tabview object definitions (CPython) - */ -static PyObject *py_lv_tabview_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static int py_lv_fs_path_ex_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - (void)type; - return py_lv_tabview_create(type, py_args, py_kwds); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_fs_path_ex_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "path") == 0) { memcpy((void*)&data->path, mp_to_ptr(value), sizeof(char)*64); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_fs_path_ex_t' object has no attribute '%s'", attr); + } + return result; } -static PyObject *py_lv_tabview_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_path_ex_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return py_lv_tabview_create((PyObject *)type, py_args, py_kwds); + return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_path_ex_t)); } -static void py_lv_tabview_dealloc(py_lv_obj_t *self) +static void py_lv_fs_path_ex_t_dealloc(py_lv_struct_t *self) { - lvpy_dealloc_obj(self); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_tabview_methods[] = { - {"add_tab", (PyCFunction)py_lv_tabview_add_tab, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tab_text", (PyCFunction)py_lv_tabview_set_tab_text, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_active", (PyCFunction)py_lv_tabview_set_active, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tab_bar_position", (PyCFunction)py_lv_tabview_set_tab_bar_position, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tab_bar_size", (PyCFunction)py_lv_tabview_set_tab_bar_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tab_count", (PyCFunction)py_lv_tabview_get_tab_count, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tab_active", (PyCFunction)py_lv_tabview_get_tab_active, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tab_button", (PyCFunction)py_lv_tabview_get_tab_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_content", (PyCFunction)py_lv_tabview_get_content, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tab_bar", (PyCFunction)py_lv_tabview_get_tab_bar, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tab_bar_position", (PyCFunction)py_lv_tabview_get_tab_bar_position, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_tabview_type = { +PyTypeObject py_lv_fs_path_ex_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.tabview", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_tabview_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_tabview_new, - .tp_methods = py_lv_tabview_methods, - .tp_call = (ternaryfunc)py_lv_tabview_call, -}; - -static py_lv_obj_type_t py_lv_tabview_mapping = { - .lv_obj_class = &lv_tabview_class, - .py_type = &py_lv_tabview_type, + .tp_name = "lvgl.lv_fs_path_ex_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_fs_path_ex_t_dealloc, + .tp_getattro = (getter)py_lv_fs_path_ex_t_getattro, + .tp_setattro = (setter)py_lv_fs_path_ex_t_setattro, + .tp_new = py_lv_fs_path_ex_t_new, + .tp_methods = py_lv_fs_path_ex_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_obj_t *lv_tileview_add_tile(lv_obj_t *tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir) - */ -static PyObject *py_lv_tileview_add_tile(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_fs_path_ex_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long col_id_val; long row_id_val; PyObject *dir_py; - if (!PyArg_ParseTuple(py_args, "llO", &col_id_val, &row_id_val, &dir_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *tv = mp_to_lv(self); - uint8_t col_id = (uint8_t)col_id_val; - uint8_t row_id = (uint8_t)row_id_val; - lv_dir_t dir = (int)mp_obj_get_int(dir_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, uint8_t, uint8_t, lv_dir_t))lv_tileview_add_tile)(tv, col_id, row_id, dir); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_fs_path_ex_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_path_ex_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_fs_path_ex_t*)self->data; } -static PyMethodDef py_lv_tileview_add_tile_def = { - "lv_tileview_add_tile", - (PyCFunction)py_lv_tileview_add_tile, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_fs_path_ex_t mp_write_scratch_lv_fs_path_ex_t; -/* - * lvgl extension definition for: - * void lv_tileview_set_tile(lv_obj_t *tv, lv_obj_t *tile_obj, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_tileview_set_tile(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_fs_path_ex_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *tile_obj_py; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "OO", &tile_obj_py, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *tv = mp_to_lv(self); - lv_obj_t *tile_obj = mp_to_lv(tile_obj_py); - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *, lv_anim_enable_t))lv_tileview_set_tile)(tv, tile_obj, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_path_ex_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_fs_path_ex_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_path_ex_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_fs_path_ex_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_fs_path_ex_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_path_ex_t or dict, got None"); + } + memset(&mp_write_scratch_lv_fs_path_ex_t, 0, sizeof(lv_fs_path_ex_t)); + return &mp_write_scratch_lv_fs_path_ex_t; } -static PyMethodDef py_lv_tileview_set_tile_def = { - "lv_tileview_set_tile", - (PyCFunction)py_lv_tileview_set_tile, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_fs_path_ex_t(struct_obj) (*((lv_fs_path_ex_t*)mp_write_value_ptr_lv_fs_path_ex_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_tileview_set_tile_by_index(lv_obj_t *tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_tileview_set_tile_by_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_fs_path_ex_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long col_id_val; long row_id_val; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "llO", &col_id_val, &row_id_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *tv = mp_to_lv(self); - uint32_t col_id = (uint32_t)col_id_val; - uint32_t row_id = (uint32_t)row_id_val; - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t, lv_anim_enable_t))lv_tileview_set_tile_by_index)(tv, col_id, row_id, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_fs_path_ex_t_type, field); } -static PyMethodDef py_lv_tileview_set_tile_by_index_def = { - "lv_tileview_set_tile_by_index", - (PyCFunction)py_lv_tileview_set_tile_by_index, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_fs_path_ex_t(field) lv_to_mp_struct_own(&py_lv_fs_path_ex_t_type, copy_buffer(&field, sizeof(lv_fs_path_ex_t))) +#define mp_read_byref_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(&field) /* - * lvgl extension definition for: - * lv_obj_t *lv_tileview_get_tile_active(lv_obj_t *obj) + * Struct lv_fs_dir_t (CPython) */ -static PyObject *py_lv_tileview_get_tile_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tileview_get_tile_active)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} +extern PyMethodDef py_lv_fs_dir_t_methods[]; -static PyMethodDef py_lv_tileview_get_tile_active_def = { - "lv_tileview_get_tile_active", - (PyCFunction)py_lv_tileview_get_tile_active, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static PyObject *py_lv_fs_dir_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_dir_t *data = (lv_fs_dir_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "dir_d") == 0) return ptr_to_mp((void*)data->dir_d); + if (strcmp(attr, "drv") == 0) return mp_read_ptr_lv_fs_drv_t((void*)data->drv); + for (PyMethodDef *m = py_lv_fs_dir_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} +static const char *const py_lv_fs_dir_t_field_names[] = {"dir_d", "drv", NULL}; -/* - * lvgl extension definition for: - * lv_obj_t *lv_tileview_create(lv_obj_t *parent) - */ -static PyObject *py_lv_tileview_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_dir_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} - } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_tileview_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_fs_dir_t_field_names, py_lv_fs_dir_t_methods); } -static PyMethodDef py_lv_tileview_create_def = { - "lv_tileview_create", - (PyCFunction)py_lv_tileview_create, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_fs_dir_t_type_methods[] = { + {"__dir__", py_lv_fs_dir_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl tileview object definitions (CPython) - */ -static PyObject *py_lv_tileview_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static int py_lv_fs_dir_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - (void)type; - return py_lv_tileview_create(type, py_args, py_kwds); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_fs_dir_t *data = (lv_fs_dir_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_fs_dir_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "dir_d") == 0) { data->dir_d = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "drv") == 0) { data->drv = (void*)mp_write_ptr_lv_fs_drv_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_fs_dir_t' object has no attribute '%s'", attr); + } + return result; } -static PyObject *py_lv_tileview_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_dir_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return py_lv_tileview_create((PyObject *)type, py_args, py_kwds); + return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_dir_t)); } -static void py_lv_tileview_dealloc(py_lv_obj_t *self) +static void py_lv_fs_dir_t_dealloc(py_lv_struct_t *self) { - lvpy_dealloc_obj(self); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_tileview_methods[] = { - {"add_tile", (PyCFunction)py_lv_tileview_add_tile, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tile", (PyCFunction)py_lv_tileview_set_tile, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tile_by_index", (PyCFunction)py_lv_tileview_set_tile_by_index, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tile_active", (PyCFunction)py_lv_tileview_get_tile_active, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_tileview_type = { +PyTypeObject py_lv_fs_dir_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.tileview", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_tileview_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_tileview_new, - .tp_methods = py_lv_tileview_methods, - .tp_call = (ternaryfunc)py_lv_tileview_call, -}; - -static py_lv_obj_type_t py_lv_tileview_mapping = { - .lv_obj_class = &lv_tileview_class, - .py_type = &py_lv_tileview_type, + .tp_name = "lvgl.lv_fs_dir_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_fs_dir_t_dealloc, + .tp_getattro = (getter)py_lv_fs_dir_t_getattro, + .tp_setattro = (setter)py_lv_fs_dir_t_setattro, + .tp_new = py_lv_fs_dir_t_new, + .tp_methods = py_lv_fs_dir_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_obj_t *lv_win_add_title(lv_obj_t *win, const char *txt) - */ -static PyObject *py_lv_win_add_title(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_fs_dir_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "O", &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *win = mp_to_lv(self); - const char *txt = (const char *)(char*)convert_from_str(txt_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const char *))lv_win_add_title)(win, txt); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_fs_dir_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_dir_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_fs_dir_t*)self->data; } -static PyMethodDef py_lv_win_add_title_def = { - "lv_win_add_title", - (PyCFunction)py_lv_win_add_title, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_fs_dir_t mp_write_scratch_lv_fs_dir_t; -/* - * lvgl extension definition for: - * lv_obj_t *lv_win_add_button(lv_obj_t *win, const void *icon, int32_t btn_w) - */ -static PyObject *py_lv_win_add_button(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_fs_dir_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *icon_py; long btn_w_val; - if (!PyArg_ParseTuple(py_args, "Ol", &icon_py, &btn_w_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *win = mp_to_lv(self); - const void *icon = (const void *)mp_to_ptr(icon_py); - int32_t btn_w = (int32_t)btn_w_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, const void *, int32_t))lv_win_add_button)(win, icon, btn_w); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_dir_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_fs_dir_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_dir_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_fs_dir_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_fs_dir_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_dir_t or dict, got None"); + } + memset(&mp_write_scratch_lv_fs_dir_t, 0, sizeof(lv_fs_dir_t)); + return &mp_write_scratch_lv_fs_dir_t; } -static PyMethodDef py_lv_win_add_button_def = { - "lv_win_add_button", - (PyCFunction)py_lv_win_add_button, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_fs_dir_t(struct_obj) (*((lv_fs_dir_t*)mp_write_value_ptr_lv_fs_dir_t(struct_obj))) -/* - * lvgl extension definition for: - * lv_obj_t *lv_win_get_header(lv_obj_t *win) - */ -static PyObject *py_lv_win_get_header(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_fs_dir_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *win = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_win_get_header)(win); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return lv_to_mp_struct(&py_lv_fs_dir_t_type, field); } -static PyMethodDef py_lv_win_get_header_def = { - "lv_win_get_header", - (PyCFunction)py_lv_win_get_header, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_fs_dir_t(field) lv_to_mp_struct_own(&py_lv_fs_dir_t_type, copy_buffer(&field, sizeof(lv_fs_dir_t))) +#define mp_read_byref_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(&field) /* - * lvgl extension definition for: - * lv_obj_t *lv_win_get_content(lv_obj_t *win) + * Struct lv_draw_triangle_dsc_t (CPython) */ -static PyObject *py_lv_win_get_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *win = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_win_get_content)(win); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} - -static PyMethodDef py_lv_win_get_content_def = { - "lv_win_get_content", - (PyCFunction)py_lv_win_get_content, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +extern PyMethodDef py_lv_draw_triangle_dsc_t_methods[]; -/* - * lvgl extension definition for: - * lv_obj_t *lv_win_create(lv_obj_t *parent) - */ -static PyObject *py_lv_win_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_triangle_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "p") == 0) return lvpy_struct_array_new(self, data->p, 3, sizeof(lv_point_precise_t), mp_read_ptr_lv_point_precise_t, mp_write_value_ptr_lv_point_precise_t); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "grad") == 0) return mp_read_byref_lv_grad_dsc_t(data->grad); + for (PyMethodDef *m = py_lv_draw_triangle_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_win_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_win_create_def = { - "lv_win_create", - (PyCFunction)py_lv_win_create, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_draw_triangle_dsc_t_field_names[] = {"base", "p", "color", "opa", "grad", NULL}; -/* - * lvgl win object definitions (CPython) - */ -static PyObject *py_lv_win_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_triangle_dsc_t_dir(PyObject *self, PyObject *unused) { - (void)type; - return py_lv_win_create(type, py_args, py_kwds); + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_triangle_dsc_t_field_names, py_lv_draw_triangle_dsc_t_methods); } -static PyObject *py_lv_win_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyMethodDef py_lv_draw_triangle_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_triangle_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_triangle_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - return py_lv_win_create((PyObject *)type, py_args, py_kwds); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_triangle_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "p") == 0) { lvpy_struct_array_assign(data->p, 3, sizeof(lv_point_precise_t), mp_write_value_ptr_lv_point_precise_t, value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "grad") == 0) { data->grad = mp_write_lv_grad_dsc_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_triangle_dsc_t' object has no attribute '%s'", attr); + } + return result; } -static void py_lv_win_dealloc(py_lv_obj_t *self) +static PyObject *py_lv_draw_triangle_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - lvpy_dealloc_obj(self); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_triangle_dsc_t)); } -static PyMethodDef py_lv_win_methods[] = { - {"add_title", (PyCFunction)py_lv_win_add_title, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_button", (PyCFunction)py_lv_win_add_button, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_header", (PyCFunction)py_lv_win_get_header, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_content", (PyCFunction)py_lv_win_get_content, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; +static void py_lv_draw_triangle_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} -PyTypeObject py_lv_win_type = { +PyTypeObject py_lv_draw_triangle_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.win", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_win_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_win_new, - .tp_methods = py_lv_win_methods, - .tp_call = (ternaryfunc)py_lv_win_call, + .tp_name = "lvgl.lv_draw_triangle_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_triangle_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_triangle_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_triangle_dsc_t_setattro, + .tp_new = py_lv_draw_triangle_dsc_t_new, + .tp_methods = py_lv_draw_triangle_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static py_lv_obj_type_t py_lv_win_mapping = { - .lv_obj_class = &lv_win_class, - .py_type = &py_lv_win_type, -}; +static inline void* mp_write_ptr_lv_draw_triangle_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_triangle_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_triangle_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_triangle_dsc_t*)self->data; +} +static lv_draw_triangle_dsc_t mp_write_scratch_lv_draw_triangle_dsc_t; -/* - * lvgl extension definition for: - * void lv_barcode_set_dark_color(lv_obj_t *obj, lv_color_t color) - */ -static PyObject *py_lv_barcode_set_dark_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_draw_triangle_dsc_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t))lv_barcode_set_dark_color)(obj, color); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_triangle_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_triangle_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_triangle_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_triangle_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_triangle_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_triangle_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_triangle_dsc_t, 0, sizeof(lv_draw_triangle_dsc_t)); + return &mp_write_scratch_lv_draw_triangle_dsc_t; } -static PyMethodDef py_lv_barcode_set_dark_color_def = { - "lv_barcode_set_dark_color", - (PyCFunction)py_lv_barcode_set_dark_color, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_draw_triangle_dsc_t(struct_obj) (*((lv_draw_triangle_dsc_t*)mp_write_value_ptr_lv_draw_triangle_dsc_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_barcode_set_light_color(lv_obj_t *obj, lv_color_t color) - */ -static PyObject *py_lv_barcode_set_light_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_draw_triangle_dsc_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t))lv_barcode_set_light_color)(obj, color); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_draw_triangle_dsc_t_type, field); } -static PyMethodDef py_lv_barcode_set_light_color_def = { - "lv_barcode_set_light_color", - (PyCFunction)py_lv_barcode_set_light_color, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_draw_triangle_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_triangle_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_triangle_dsc_t))) +#define mp_read_byref_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(&field) + +#define funcptr_lv_indev_read_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_indev_read_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static void lv_indev_t_read_cb_callback(lv_indev_t *indev, lv_indev_data_t *data); +typedef __typeof__( ((lv_indev_t*)(0))->pointer ) lv_indev_pointer_t; /* - * lvgl extension definition for: - * void lv_barcode_set_scale(lv_obj_t *obj, uint16_t scale) + * Struct lv_indev_pointer_t (CPython) */ -static PyObject *py_lv_barcode_set_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_indev_pointer_t_methods[]; + +static PyObject *py_lv_indev_pointer_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long scale_val; - if (!PyArg_ParseTuple(py_args, "l", &scale_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint16_t scale = (uint16_t)scale_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint16_t))lv_barcode_set_scale)(obj, scale); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_pointer_t *data = (lv_indev_pointer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "act_point") == 0) return mp_read_byref_lv_point_t(data->act_point); + if (strcmp(attr, "last_point") == 0) return mp_read_byref_lv_point_t(data->last_point); + if (strcmp(attr, "last_raw_point") == 0) return mp_read_byref_lv_point_t(data->last_raw_point); + if (strcmp(attr, "vect") == 0) return mp_read_byref_lv_point_t(data->vect); + if (strcmp(attr, "vect_hist") == 0) return lvpy_struct_array_new(self, data->vect_hist, 8, sizeof(lv_point_t), mp_read_ptr_lv_point_t, mp_write_value_ptr_lv_point_t); + if (strcmp(attr, "vect_hist_timestamp") == 0) return ptr_to_mp(data->vect_hist_timestamp); + if (strcmp(attr, "vect_hist_index") == 0) return mp_obj_new_int_from_uint(data->vect_hist_index); + if (strcmp(attr, "scroll_sum") == 0) return mp_read_byref_lv_point_t(data->scroll_sum); + if (strcmp(attr, "scroll_throw_vect") == 0) return mp_read_byref_lv_point_t(data->scroll_throw_vect); + if (strcmp(attr, "scroll_throw_vect_ori") == 0) return mp_read_byref_lv_point_t(data->scroll_throw_vect_ori); + if (strcmp(attr, "act_obj") == 0) return lv_to_mp((void*)data->act_obj); + if (strcmp(attr, "scroll_obj") == 0) return lv_to_mp((void*)data->scroll_obj); + if (strcmp(attr, "last_pressed") == 0) return lv_to_mp((void*)data->last_pressed); + if (strcmp(attr, "last_hovered") == 0) return lv_to_mp((void*)data->last_hovered); + if (strcmp(attr, "scroll_area") == 0) return mp_read_byref_lv_area_t(data->scroll_area); + if (strcmp(attr, "gesture_sum") == 0) return mp_read_byref_lv_point_t(data->gesture_sum); + if (strcmp(attr, "diff") == 0) return mp_obj_new_int(data->diff); + if (strcmp(attr, "short_click_streak") == 0) return mp_obj_new_int_from_uint(data->short_click_streak); + if (strcmp(attr, "last_short_click_point") == 0) return mp_read_byref_lv_point_t(data->last_short_click_point); + if (strcmp(attr, "last_short_click_timestamp") == 0) return mp_obj_new_int_from_uint(data->last_short_click_timestamp); + if (strcmp(attr, "scroll_dir") == 0) return mp_obj_new_int_from_uint(data->scroll_dir); + if (strcmp(attr, "gesture_dir") == 0) return mp_obj_new_int_from_uint(data->gesture_dir); + if (strcmp(attr, "gesture_sent") == 0) return mp_obj_new_int_from_uint(data->gesture_sent); + if (strcmp(attr, "press_moved") == 0) return mp_obj_new_int_from_uint(data->press_moved); + if (strcmp(attr, "pressed") == 0) return mp_obj_new_int_from_uint(data->pressed); + if (strcmp(attr, "ccw_rotation") == 0) return mp_obj_new_int_from_uint(data->ccw_rotation); + for (PyMethodDef *m = py_lv_indev_pointer_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_barcode_set_scale_def = { - "lv_barcode_set_scale", - (PyCFunction)py_lv_barcode_set_scale, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_indev_pointer_t_field_names[] = {"act_point", "last_point", "last_raw_point", "vect", "vect_hist", "vect_hist_timestamp", "vect_hist_index", "scroll_sum", "scroll_throw_vect", "scroll_throw_vect_ori", "act_obj", "scroll_obj", "last_pressed", "last_hovered", "scroll_area", "gesture_sum", "diff", "short_click_streak", "last_short_click_point", "last_short_click_timestamp", "scroll_dir", "gesture_dir", "gesture_sent", "press_moved", "pressed", "ccw_rotation", NULL}; -/* - * lvgl extension definition for: - * void lv_barcode_set_direction(lv_obj_t *obj, lv_dir_t direction) - */ -static PyObject *py_lv_barcode_set_direction(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_pointer_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *direction_py; - if (!PyArg_ParseTuple(py_args, "O", &direction_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_dir_t direction = (int)mp_obj_get_int(direction_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_dir_t))lv_barcode_set_direction)(obj, direction); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + (void)unused; + return lvpy_struct_dir(self, py_lv_indev_pointer_t_field_names, py_lv_indev_pointer_t_methods); } -static PyMethodDef py_lv_barcode_set_direction_def = { - "lv_barcode_set_direction", - (PyCFunction)py_lv_barcode_set_direction, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_indev_pointer_t_type_methods[] = { + {"__dir__", py_lv_indev_pointer_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * void lv_barcode_set_tiled(lv_obj_t *obj, bool tiled) - */ -static PyObject *py_lv_barcode_set_tiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_indev_pointer_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long tiled_val; - if (!PyArg_ParseTuple(py_args, "l", &tiled_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - bool tiled = (tiled_val != 0); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_barcode_set_tiled)(obj, tiled); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_pointer_t *data = (lv_indev_pointer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_indev_pointer_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "act_point") == 0) { data->act_point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "last_point") == 0) { data->last_point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "last_raw_point") == 0) { data->last_raw_point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "vect") == 0) { data->vect = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "vect_hist") == 0) { lvpy_struct_array_assign(data->vect_hist, 8, sizeof(lv_point_t), mp_write_value_ptr_lv_point_t, value); result = 0; } + if (strcmp(attr, "vect_hist_timestamp") == 0) { memcpy((void*)&data->vect_hist_timestamp, mp_to_ptr(value), sizeof(uint32_t)*8); result = 0; } + if (strcmp(attr, "vect_hist_index") == 0) { data->vect_hist_index = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scroll_sum") == 0) { data->scroll_sum = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "scroll_throw_vect") == 0) { data->scroll_throw_vect = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "scroll_throw_vect_ori") == 0) { data->scroll_throw_vect_ori = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "act_obj") == 0) { data->act_obj = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "scroll_obj") == 0) { data->scroll_obj = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "last_pressed") == 0) { data->last_pressed = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "last_hovered") == 0) { data->last_hovered = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "scroll_area") == 0) { data->scroll_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "gesture_sum") == 0) { data->gesture_sum = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "diff") == 0) { data->diff = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "short_click_streak") == 0) { data->short_click_streak = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_short_click_point") == 0) { data->last_short_click_point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "last_short_click_timestamp") == 0) { data->last_short_click_timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scroll_dir") == 0) { data->scroll_dir = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "gesture_dir") == 0) { data->gesture_dir = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "gesture_sent") == 0) { data->gesture_sent = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "press_moved") == 0) { data->press_moved = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pressed") == 0) { data->pressed = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ccw_rotation") == 0) { data->ccw_rotation = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_indev_pointer_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_barcode_set_tiled_def = { - "lv_barcode_set_tiled", - (PyCFunction)py_lv_barcode_set_tiled, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_indev_pointer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_pointer_t)); +} -/* - * lvgl extension definition for: - * void lv_barcode_set_encoding(lv_obj_t *obj, lv_barcode_encoding_t encoding) - */ -static PyObject *py_lv_barcode_set_encoding(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_indev_pointer_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *encoding_py; - if (!PyArg_ParseTuple(py_args, "O", &encoding_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_barcode_encoding_t encoding = (int)mp_obj_get_int(encoding_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_barcode_encoding_t))lv_barcode_set_encoding)(obj, encoding); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_barcode_set_encoding_def = { - "lv_barcode_set_encoding", - (PyCFunction)py_lv_barcode_set_encoding, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_indev_pointer_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_indev_pointer_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_indev_pointer_t_dealloc, + .tp_getattro = (getter)py_lv_indev_pointer_t_getattro, + .tp_setattro = (setter)py_lv_indev_pointer_t_setattro, + .tp_new = py_lv_indev_pointer_t_new, + .tp_methods = py_lv_indev_pointer_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_result_t lv_barcode_update(lv_obj_t *obj, const char *data) - */ -static PyObject *py_lv_barcode_update(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_indev_pointer_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *data = (const char *)(char*)convert_from_str(data_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, const char *))lv_barcode_update)(obj, data); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_indev_pointer_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_pointer_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_indev_pointer_t*)self->data; } -static PyMethodDef py_lv_barcode_update_def = { - "lv_barcode_update", - (PyCFunction)py_lv_barcode_update, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_indev_pointer_t mp_write_scratch_lv_indev_pointer_t; -/* - * lvgl extension definition for: - * lv_color_t lv_barcode_get_dark_color(lv_obj_t *obj) - */ -static PyObject *py_lv_barcode_get_dark_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_indev_pointer_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(lv_obj_t *))lv_barcode_get_dark_color)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_pointer_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_indev_pointer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_pointer_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_indev_pointer_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_indev_pointer_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_pointer_t or dict, got None"); + } + memset(&mp_write_scratch_lv_indev_pointer_t, 0, sizeof(lv_indev_pointer_t)); + return &mp_write_scratch_lv_indev_pointer_t; } -static PyMethodDef py_lv_barcode_get_dark_color_def = { - "lv_barcode_get_dark_color", - (PyCFunction)py_lv_barcode_get_dark_color, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_indev_pointer_t(struct_obj) (*((lv_indev_pointer_t*)mp_write_value_ptr_lv_indev_pointer_t(struct_obj))) -/* - * lvgl extension definition for: - * lv_color_t lv_barcode_get_light_color(lv_obj_t *obj) - */ -static PyObject *py_lv_barcode_get_light_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_indev_pointer_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(lv_obj_t *))lv_barcode_get_light_color)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp_struct(&py_lv_indev_pointer_t_type, field); } -static PyMethodDef py_lv_barcode_get_light_color_def = { - "lv_barcode_get_light_color", - (PyCFunction)py_lv_barcode_get_light_color, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_indev_pointer_t(field) lv_to_mp_struct_own(&py_lv_indev_pointer_t_type, copy_buffer(&field, sizeof(lv_indev_pointer_t))) +#define mp_read_byref_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(&field) +typedef __typeof__( ((lv_indev_t*)(0))->keypad ) lv_indev_keypad_t; /* - * lvgl extension definition for: - * uint16_t lv_barcode_get_scale(lv_obj_t *obj) + * Struct lv_indev_keypad_t (CPython) */ -static PyObject *py_lv_barcode_get_scale(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_indev_keypad_t_methods[]; + +static PyObject *py_lv_indev_keypad_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_keypad_t *data = (lv_indev_keypad_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "last_state") == 0) return mp_obj_new_int(data->last_state); + if (strcmp(attr, "last_key") == 0) return mp_obj_new_int_from_uint(data->last_key); + for (PyMethodDef *m = py_lv_indev_keypad_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint16_t _res; - lvpy_lock(); - _res = ((uint16_t (*)(lv_obj_t *))lv_barcode_get_scale)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); +static const char *const py_lv_indev_keypad_t_field_names[] = {"last_state", "last_key", NULL}; + +static PyObject *py_lv_indev_keypad_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_indev_keypad_t_field_names, py_lv_indev_keypad_t_methods); } -static PyMethodDef py_lv_barcode_get_scale_def = { - "lv_barcode_get_scale", - (PyCFunction)py_lv_barcode_get_scale, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_indev_keypad_t_type_methods[] = { + {"__dir__", py_lv_indev_keypad_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_indev_keypad_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_keypad_t *data = (lv_indev_keypad_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_indev_keypad_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "last_state") == 0) { data->last_state = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_key") == 0) { data->last_key = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_indev_keypad_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * lv_barcode_encoding_t lv_barcode_get_encoding(const lv_obj_t *obj) - */ -static PyObject *py_lv_barcode_get_encoding(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_keypad_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_keypad_t)); +} - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_barcode_encoding_t _res; - lvpy_lock(); - _res = ((lv_barcode_encoding_t (*)(const lv_obj_t *))lv_barcode_get_encoding)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); +static void py_lv_indev_keypad_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_barcode_get_encoding_def = { - "lv_barcode_get_encoding", - (PyCFunction)py_lv_barcode_get_encoding, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_indev_keypad_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_indev_keypad_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_indev_keypad_t_dealloc, + .tp_getattro = (getter)py_lv_indev_keypad_t_getattro, + .tp_setattro = (setter)py_lv_indev_keypad_t_setattro, + .tp_new = py_lv_indev_keypad_t_new, + .tp_methods = py_lv_indev_keypad_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_obj_t *lv_barcode_create(lv_obj_t *parent) - */ -static PyObject *py_lv_barcode_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_indev_keypad_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_indev_keypad_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_keypad_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_barcode_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_indev_keypad_t*)self->data; } -static PyMethodDef py_lv_barcode_create_def = { - "lv_barcode_create", - (PyCFunction)py_lv_barcode_create, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_indev_keypad_t mp_write_scratch_lv_indev_keypad_t; -/* - * lvgl barcode object definitions (CPython) - */ -static PyObject *py_lv_barcode_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_indev_keypad_t(PyObject *value) { - (void)type; - return py_lv_barcode_create(type, py_args, py_kwds); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_keypad_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_indev_keypad_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_keypad_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_indev_keypad_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_indev_keypad_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_keypad_t or dict, got None"); + } + memset(&mp_write_scratch_lv_indev_keypad_t, 0, sizeof(lv_indev_keypad_t)); + return &mp_write_scratch_lv_indev_keypad_t; } -static PyObject *py_lv_barcode_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) -{ - return py_lv_barcode_create((PyObject *)type, py_args, py_kwds); -} +#define mp_write_lv_indev_keypad_t(struct_obj) (*((lv_indev_keypad_t*)mp_write_value_ptr_lv_indev_keypad_t(struct_obj))) -static void py_lv_barcode_dealloc(py_lv_obj_t *self) +static inline PyObject *mp_read_ptr_lv_indev_keypad_t(void *field) { - lvpy_dealloc_obj(self); + return lv_to_mp_struct(&py_lv_indev_keypad_t_type, field); } -static PyMethodDef py_lv_barcode_methods[] = { - {"set_dark_color", (PyCFunction)py_lv_barcode_set_dark_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_light_color", (PyCFunction)py_lv_barcode_set_light_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scale", (PyCFunction)py_lv_barcode_set_scale, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_direction", (PyCFunction)py_lv_barcode_set_direction, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tiled", (PyCFunction)py_lv_barcode_set_tiled, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_encoding", (PyCFunction)py_lv_barcode_set_encoding, METH_VARARGS | METH_KEYWORDS, NULL}, - {"update", (PyCFunction)py_lv_barcode_update, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dark_color", (PyCFunction)py_lv_barcode_get_dark_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_light_color", (PyCFunction)py_lv_barcode_get_light_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scale", (PyCFunction)py_lv_barcode_get_scale, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_encoding", (PyCFunction)py_lv_barcode_get_encoding, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; +#define mp_read_lv_indev_keypad_t(field) lv_to_mp_struct_own(&py_lv_indev_keypad_t_type, copy_buffer(&field, sizeof(lv_indev_keypad_t))) +#define mp_read_byref_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(&field) -PyTypeObject py_lv_barcode_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.barcode", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_barcode_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_barcode_new, - .tp_methods = py_lv_barcode_methods, - .tp_call = (ternaryfunc)py_lv_barcode_call, -}; +#define funcptr_lv_indev_key_remap_cb_t NULL -static py_lv_obj_type_t py_lv_barcode_mapping = { - .lv_obj_class = &lv_barcode_class, - .py_type = &py_lv_barcode_type, -}; +static inline PyObject *mp_lv_funcptr_lv_indev_key_remap_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *indev, lv_key_t key); /* - * lvgl extension definition for: - * void lv_qrcode_set_size(lv_obj_t *obj, int32_t size) + * Struct lv_indev_gesture_motion_t (CPython) */ -static PyObject *py_lv_qrcode_set_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_indev_gesture_motion_t_methods[]; + +static PyObject *py_lv_indev_gesture_motion_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t size = (int32_t)size_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_qrcode_set_size)(obj, size); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_gesture_motion_t *data = (lv_indev_gesture_motion_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "finger") == 0) return mp_obj_new_int(data->finger); + if (strcmp(attr, "start_point") == 0) return mp_read_byref_lv_point_t(data->start_point); + if (strcmp(attr, "point") == 0) return mp_read_byref_lv_point_t(data->point); + if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); + for (PyMethodDef *m = py_lv_indev_gesture_motion_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_qrcode_set_size_def = { - "lv_qrcode_set_size", - (PyCFunction)py_lv_qrcode_set_size, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_indev_gesture_motion_t_field_names[] = {"finger", "start_point", "point", "state", NULL}; -/* - * lvgl extension definition for: - * void lv_qrcode_set_dark_color(lv_obj_t *obj, lv_color_t color) - */ -static PyObject *py_lv_qrcode_set_dark_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_motion_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t))lv_qrcode_set_dark_color)(obj, color); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + (void)unused; + return lvpy_struct_dir(self, py_lv_indev_gesture_motion_t_field_names, py_lv_indev_gesture_motion_t_methods); } -static PyMethodDef py_lv_qrcode_set_dark_color_def = { - "lv_qrcode_set_dark_color", - (PyCFunction)py_lv_qrcode_set_dark_color, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_indev_gesture_motion_t_type_methods[] = { + {"__dir__", py_lv_indev_gesture_motion_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * void lv_qrcode_set_light_color(lv_obj_t *obj, lv_color_t color) - */ -static PyObject *py_lv_qrcode_set_light_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_indev_gesture_motion_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_color_t color = mp_write_lv_color_t(color_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_color_t))lv_qrcode_set_light_color)(obj, color); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_gesture_motion_t *data = (lv_indev_gesture_motion_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_indev_gesture_motion_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "finger") == 0) { data->finger = (int8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "start_point") == 0) { data->start_point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "point") == 0) { data->point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_indev_gesture_motion_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_qrcode_set_light_color_def = { - "lv_qrcode_set_light_color", - (PyCFunction)py_lv_qrcode_set_light_color, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_indev_gesture_motion_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_gesture_motion_t)); +} -/* - * lvgl extension definition for: - * lv_result_t lv_qrcode_update(lv_obj_t *obj, const void *data, uint32_t data_len) - */ -static PyObject *py_lv_qrcode_update(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_indev_gesture_motion_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *data_py; long data_len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &data_py, &data_len_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const void *data = (const void *)mp_to_ptr(data_py); - uint32_t data_len = (uint32_t)data_len_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, const void *, uint32_t))lv_qrcode_update)(obj, data, data_len); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_qrcode_update_def = { - "lv_qrcode_update", - (PyCFunction)py_lv_qrcode_update, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_indev_gesture_motion_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_indev_gesture_motion_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_indev_gesture_motion_t_dealloc, + .tp_getattro = (getter)py_lv_indev_gesture_motion_t_getattro, + .tp_setattro = (setter)py_lv_indev_gesture_motion_t_setattro, + .tp_new = py_lv_indev_gesture_motion_t_new, + .tp_methods = py_lv_indev_gesture_motion_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * void lv_qrcode_set_data(lv_obj_t *obj, const char *data) - */ -static PyObject *py_lv_qrcode_set_data(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_indev_gesture_motion_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const char *data = (const char *)(char*)convert_from_str(data_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const char *))lv_qrcode_set_data)(obj, data); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_indev_gesture_motion_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_motion_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_indev_gesture_motion_t*)self->data; } -static PyMethodDef py_lv_qrcode_set_data_def = { - "lv_qrcode_set_data", - (PyCFunction)py_lv_qrcode_set_data, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_indev_gesture_motion_t mp_write_scratch_lv_indev_gesture_motion_t; + +static inline void* mp_write_value_ptr_lv_indev_gesture_motion_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_gesture_motion_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_indev_gesture_motion_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_gesture_motion_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_indev_gesture_motion_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_indev_gesture_motion_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_motion_t or dict, got None"); + } + memset(&mp_write_scratch_lv_indev_gesture_motion_t, 0, sizeof(lv_indev_gesture_motion_t)); + return &mp_write_scratch_lv_indev_gesture_motion_t; +} +#define mp_write_lv_indev_gesture_motion_t(struct_obj) (*((lv_indev_gesture_motion_t*)mp_write_value_ptr_lv_indev_gesture_motion_t(struct_obj))) -/* - * lvgl extension definition for: - * void lv_qrcode_set_quiet_zone(lv_obj_t *obj, bool enable) - */ -static PyObject *py_lv_qrcode_set_quiet_zone(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_indev_gesture_motion_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long enable_val; - if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - bool enable = (enable_val != 0); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, bool))lv_qrcode_set_quiet_zone)(obj, enable); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp_struct(&py_lv_indev_gesture_motion_t_type, field); } -static PyMethodDef py_lv_qrcode_set_quiet_zone_def = { - "lv_qrcode_set_quiet_zone", - (PyCFunction)py_lv_qrcode_set_quiet_zone, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_indev_gesture_motion_t(field) lv_to_mp_struct_own(&py_lv_indev_gesture_motion_t_type, copy_buffer(&field, sizeof(lv_indev_gesture_motion_t))) +#define mp_read_byref_lv_indev_gesture_motion_t(field) mp_read_ptr_lv_indev_gesture_motion_t(&field) /* - * lvgl extension definition for: - * lv_obj_t *lv_qrcode_create(lv_obj_t *parent) + * Struct lv_indev_gesture_t (CPython) */ -static PyObject *py_lv_qrcode_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_indev_gesture_t_methods[]; + +static PyObject *py_lv_indev_gesture_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "|O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *parent = NULL; - if (parent_py && parent_py != Py_None) { - parent = mp_to_lv(parent_py); - if (!parent) {{ PyGILState_Release(gstate); return NULL; }} + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_gesture_t *data = (lv_indev_gesture_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; } - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *))lv_qrcode_create)(parent); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "motions") == 0) return lvpy_struct_array_new(self, data->motions, 2, sizeof(lv_indev_gesture_motion_t), mp_read_ptr_lv_indev_gesture_motion_t, mp_write_value_ptr_lv_indev_gesture_motion_t); + if (strcmp(attr, "center") == 0) return mp_read_byref_lv_point_t(data->center); + if (strcmp(attr, "scale") == 0) return mp_obj_new_float_from_f(data->scale); + if (strcmp(attr, "p_scale") == 0) return mp_obj_new_float_from_f(data->p_scale); + if (strcmp(attr, "scale_factors_x") == 0) return ptr_to_mp(data->scale_factors_x); + if (strcmp(attr, "scale_factors_y") == 0) return ptr_to_mp(data->scale_factors_y); + if (strcmp(attr, "delta_x") == 0) return mp_obj_new_float_from_f(data->delta_x); + if (strcmp(attr, "delta_y") == 0) return mp_obj_new_float_from_f(data->delta_y); + if (strcmp(attr, "p_delta_x") == 0) return mp_obj_new_float_from_f(data->p_delta_x); + if (strcmp(attr, "p_delta_y") == 0) return mp_obj_new_float_from_f(data->p_delta_y); + if (strcmp(attr, "rotation") == 0) return mp_obj_new_float_from_f(data->rotation); + if (strcmp(attr, "p_rotation") == 0) return mp_obj_new_float_from_f(data->p_rotation); + if (strcmp(attr, "finger_cnt") == 0) return mp_obj_new_int_from_uint(data->finger_cnt); + for (PyMethodDef *m = py_lv_indev_gesture_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_qrcode_create_def = { - "lv_qrcode_create", - (PyCFunction)py_lv_qrcode_create, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static const char *const py_lv_indev_gesture_t_field_names[] = {"motions", "center", "scale", "p_scale", "scale_factors_x", "scale_factors_y", "delta_x", "delta_y", "p_delta_x", "p_delta_y", "rotation", "p_rotation", "finger_cnt", NULL}; +static PyObject *py_lv_indev_gesture_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_indev_gesture_t_field_names, py_lv_indev_gesture_t_methods); +} -/* - * lvgl qrcode object definitions (CPython) - */ -static PyObject *py_lv_qrcode_call(PyObject *type, PyObject *py_args, PyObject *py_kwds) +static PyMethodDef py_lv_indev_gesture_t_type_methods[] = { + {"__dir__", py_lv_indev_gesture_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_indev_gesture_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - (void)type; - return py_lv_qrcode_create(type, py_args, py_kwds); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_gesture_t *data = (lv_indev_gesture_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_indev_gesture_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "motions") == 0) { lvpy_struct_array_assign(data->motions, 2, sizeof(lv_indev_gesture_motion_t), mp_write_value_ptr_lv_indev_gesture_motion_t, value); result = 0; } + if (strcmp(attr, "center") == 0) { data->center = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "scale") == 0) { data->scale = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "p_scale") == 0) { data->p_scale = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "scale_factors_x") == 0) { memcpy((void*)&data->scale_factors_x, mp_to_ptr(value), sizeof(float)*2); result = 0; } + if (strcmp(attr, "scale_factors_y") == 0) { memcpy((void*)&data->scale_factors_y, mp_to_ptr(value), sizeof(float)*2); result = 0; } + if (strcmp(attr, "delta_x") == 0) { data->delta_x = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "delta_y") == 0) { data->delta_y = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "p_delta_x") == 0) { data->p_delta_x = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "p_delta_y") == 0) { data->p_delta_y = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "rotation") == 0) { data->rotation = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "p_rotation") == 0) { data->p_rotation = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "finger_cnt") == 0) { data->finger_cnt = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_indev_gesture_t' object has no attribute '%s'", attr); + } + return result; } -static PyObject *py_lv_qrcode_new(PyTypeObject *type, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return py_lv_qrcode_create((PyObject *)type, py_args, py_kwds); + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_gesture_t)); } -static void py_lv_qrcode_dealloc(py_lv_obj_t *self) +static void py_lv_indev_gesture_t_dealloc(py_lv_struct_t *self) { - lvpy_dealloc_obj(self); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_qrcode_methods[] = { - {"set_size", (PyCFunction)py_lv_qrcode_set_size, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_dark_color", (PyCFunction)py_lv_qrcode_set_dark_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_light_color", (PyCFunction)py_lv_qrcode_set_light_color, METH_VARARGS | METH_KEYWORDS, NULL}, - {"update", (PyCFunction)py_lv_qrcode_update, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_data", (PyCFunction)py_lv_qrcode_set_data, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_quiet_zone", (PyCFunction)py_lv_qrcode_set_quiet_zone, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL, NULL, 0, NULL} -}; - -PyTypeObject py_lv_qrcode_type = { +PyTypeObject py_lv_indev_gesture_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.qrcode", - .tp_basicsize = sizeof(py_lv_obj_t), - .tp_dealloc = (destructor)py_lv_qrcode_dealloc, - .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_base = &py_lv_obj_type, - .tp_new = (newfunc)py_lv_qrcode_new, - .tp_methods = py_lv_qrcode_methods, - .tp_call = (ternaryfunc)py_lv_qrcode_call, + .tp_name = "lvgl.lv_indev_gesture_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_indev_gesture_t_dealloc, + .tp_getattro = (getter)py_lv_indev_gesture_t_getattro, + .tp_setattro = (setter)py_lv_indev_gesture_t_setattro, + .tp_new = py_lv_indev_gesture_t_new, + .tp_methods = py_lv_indev_gesture_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static py_lv_obj_type_t py_lv_qrcode_mapping = { - .lv_obj_class = &lv_qrcode_class, - .py_type = &py_lv_qrcode_type, -}; +static inline void* mp_write_ptr_lv_indev_gesture_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_indev_gesture_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_indev_gesture_t*)self->data; +} -#define funcptr_lv_tree_constructor_cb_t NULL +static lv_indev_gesture_t mp_write_scratch_lv_indev_gesture_t; -static inline PyObject *mp_lv_funcptr_lv_tree_constructor_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static inline void* mp_write_value_ptr_lv_indev_gesture_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_gesture_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_indev_gesture_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_gesture_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_indev_gesture_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_indev_gesture_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_t or dict, got None"); + } + memset(&mp_write_scratch_lv_indev_gesture_t, 0, sizeof(lv_indev_gesture_t)); + return &mp_write_scratch_lv_indev_gesture_t; +} +#define mp_write_lv_indev_gesture_t(struct_obj) (*((lv_indev_gesture_t*)mp_write_value_ptr_lv_indev_gesture_t(struct_obj))) -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_tree_class_t_constructor_cb' - * lv_tree_constructor_cb_t constructor_cb - */ - +static inline PyObject *mp_read_ptr_lv_indev_gesture_t(void *field) +{ + return lv_to_mp_struct(&py_lv_indev_gesture_t_type, field); +} + +#define mp_read_lv_indev_gesture_t(field) lv_to_mp_struct_own(&py_lv_indev_gesture_t_type, copy_buffer(&field, sizeof(lv_indev_gesture_t))) +#define mp_read_byref_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_tree_class_t_destructor_cb' - * lv_tree_destructor_cb_t destructor_cb - */ - /* - * Struct lv_tree_class_t (CPython) + * Struct lv_indev_gesture_configuration_t (CPython) */ -extern PyMethodDef py_lv_tree_class_t_methods[]; +extern PyMethodDef py_lv_indev_gesture_configuration_t_methods[]; -static PyObject *py_lv_tree_class_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_indev_gesture_configuration_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_tree_class_t *data = (lv_tree_class_t*)inst->data; + lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "base_class") == 0) return ptr_to_mp((void*)data->base_class); - if (strcmp(attr, "instance_size") == 0) return mp_obj_new_int_from_uint(data->instance_size); - if (strcmp(attr, "constructor_cb") == 0) return mp_lv_funcptr(NULL, data->constructor_cb, NULL, "lv_tree_class_t_constructor_cb", NULL); - if (strcmp(attr, "destructor_cb") == 0) return mp_lv_funcptr(NULL, data->destructor_cb, NULL, "lv_tree_class_t_destructor_cb", NULL); - for (PyMethodDef *m = py_lv_tree_class_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "pinch_up_threshold") == 0) return mp_obj_new_float_from_f(data->pinch_up_threshold); + if (strcmp(attr, "pinch_down_threshold") == 0) return mp_obj_new_float_from_f(data->pinch_down_threshold); + if (strcmp(attr, "rotation_angle_rad_threshold") == 0) return mp_obj_new_float_from_f(data->rotation_angle_rad_threshold); + for (PyMethodDef *m = py_lv_indev_gesture_configuration_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_tree_class_t_field_names[] = {"base_class", "instance_size", "constructor_cb", "destructor_cb", NULL}; +static const char *const py_lv_indev_gesture_configuration_t_field_names[] = {"pinch_up_threshold", "pinch_down_threshold", "rotation_angle_rad_threshold", NULL}; -static PyObject *py_lv_tree_class_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_indev_gesture_configuration_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_tree_class_t_field_names, py_lv_tree_class_t_methods); + return lvpy_struct_dir(self, py_lv_indev_gesture_configuration_t_field_names, py_lv_indev_gesture_configuration_t_methods); } -static PyMethodDef py_lv_tree_class_t_type_methods[] = { - {"__dir__", py_lv_tree_class_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_indev_gesture_configuration_t_type_methods[] = { + {"__dir__", py_lv_indev_gesture_configuration_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_tree_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_indev_gesture_configuration_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_tree_class_t *data = (lv_tree_class_t*)inst->data; + lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -53589,180 +65427,152 @@ static int py_lv_tree_class_t_setattro(PyObject *self, PyObject *name, PyObject const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_tree_class_t saved; + lv_indev_gesture_configuration_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base_class") == 0) { data->base_class = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "instance_size") == 0) { data->instance_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "constructor_cb") == 0) { data->constructor_cb = mp_lv_callback(value, NULL, "lv_tree_class_t_constructor_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "destructor_cb") == 0) { data->destructor_cb = mp_lv_callback(value, NULL, "lv_tree_class_t_destructor_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "pinch_up_threshold") == 0) { data->pinch_up_threshold = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "pinch_down_threshold") == 0) { data->pinch_down_threshold = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "rotation_angle_rad_threshold") == 0) { data->rotation_angle_rad_threshold = (float)mp_obj_get_float(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_tree_class_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_indev_gesture_configuration_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_tree_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_indev_gesture_configuration_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_tree_class_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_gesture_configuration_t)); } -static void py_lv_tree_class_t_dealloc(py_lv_struct_t *self) +static void py_lv_indev_gesture_configuration_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_tree_class_t_type = { +PyTypeObject py_lv_indev_gesture_configuration_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_tree_class_t", + .tp_name = "lvgl.lv_indev_gesture_configuration_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_tree_class_t_dealloc, - .tp_getattro = (getter)py_lv_tree_class_t_getattro, - .tp_setattro = (setter)py_lv_tree_class_t_setattro, - .tp_new = py_lv_tree_class_t_new, - .tp_methods = py_lv_tree_class_t_type_methods, + .tp_dealloc = (destructor)py_lv_indev_gesture_configuration_t_dealloc, + .tp_getattro = (getter)py_lv_indev_gesture_configuration_t_getattro, + .tp_setattro = (setter)py_lv_indev_gesture_configuration_t_setattro, + .tp_new = py_lv_indev_gesture_configuration_t_new, + .tp_methods = py_lv_indev_gesture_configuration_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_tree_class_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_indev_gesture_configuration_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_tree_class_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_tree_class_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_indev_gesture_configuration_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_configuration_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_tree_class_t*)self->data; + return (lv_indev_gesture_configuration_t*)self->data; } -static lv_tree_class_t mp_write_scratch_lv_tree_class_t; +static lv_indev_gesture_configuration_t mp_write_scratch_lv_indev_gesture_configuration_t; -static inline void* mp_write_value_ptr_lv_tree_class_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_indev_gesture_configuration_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_tree_class_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_gesture_configuration_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_tree_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_tree_class_t)); + memcpy(&mp_write_scratch_lv_indev_gesture_configuration_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_gesture_configuration_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_tree_class_t; + return &mp_write_scratch_lv_indev_gesture_configuration_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_tree_class_t(value); + void *p = mp_write_ptr_lv_indev_gesture_configuration_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_tree_class_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_configuration_t or dict, got None"); } - memset(&mp_write_scratch_lv_tree_class_t, 0, sizeof(lv_tree_class_t)); - return &mp_write_scratch_lv_tree_class_t; + memset(&mp_write_scratch_lv_indev_gesture_configuration_t, 0, sizeof(lv_indev_gesture_configuration_t)); + return &mp_write_scratch_lv_indev_gesture_configuration_t; } -#define mp_write_lv_tree_class_t(struct_obj) (*((lv_tree_class_t*)mp_write_value_ptr_lv_tree_class_t(struct_obj))) +#define mp_write_lv_indev_gesture_configuration_t(struct_obj) (*((lv_indev_gesture_configuration_t*)mp_write_value_ptr_lv_indev_gesture_configuration_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_tree_class_t(void *field) +static inline PyObject *mp_read_ptr_lv_indev_gesture_configuration_t(void *field) { - return lv_to_mp_struct(&py_lv_tree_class_t_type, field); + return lv_to_mp_struct(&py_lv_indev_gesture_configuration_t_type, field); } -#define mp_read_lv_tree_class_t(field) lv_to_mp_struct_own(&py_lv_tree_class_t_type, copy_buffer(&field, sizeof(lv_tree_class_t))) -#define mp_read_byref_lv_tree_class_t(field) mp_read_ptr_lv_tree_class_t(&field) - -#define funcptr_create_cb NULL - -static inline PyObject *mp_lv_funcptr_create_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_font_class_t_create_cb' - * lv_font_t *(*create_cb)(const lv_font_info_t *info, const void *src) - */ - -#define funcptr_delete_cb NULL - -static inline PyObject *mp_lv_funcptr_delete_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_font_class_t_delete_cb' - * void (*delete_cb)(lv_font_t *font) - */ - -#define funcptr_dup_src_cb NULL - -static inline PyObject *mp_lv_funcptr_dup_src_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - +#define mp_read_lv_indev_gesture_configuration_t(field) lv_to_mp_struct_own(&py_lv_indev_gesture_configuration_t_type, copy_buffer(&field, sizeof(lv_indev_gesture_configuration_t))) +#define mp_read_byref_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_font_class_t_dup_src_cb' - * void *(*dup_src_cb)(const void *src) - */ - -#define funcptr_free_src_cb NULL +#define funcptr_lv_recognizer_func_t NULL -static inline PyObject *mp_lv_funcptr_free_src_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static inline PyObject *mp_lv_funcptr_lv_recognizer_func_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* * Function NOT generated: - * Missing 'user_data' field for callback 'lv_font_class_t_free_src_cb' - * void (*free_src_cb)(void *src) + * Missing 'user_data' field for callback 'lv_indev_gesture_recognizer_t_recog_fn' + * lv_recognizer_func_t recog_fn */ /* - * Struct lv_font_class_t (CPython) + * Struct lv_indev_gesture_recognizer_t (CPython) */ -extern PyMethodDef py_lv_font_class_t_methods[]; +extern PyMethodDef py_lv_indev_gesture_recognizer_t_methods[]; -static PyObject *py_lv_font_class_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_indev_gesture_recognizer_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_class_t *data = (lv_font_class_t*)inst->data; + lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "create_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->create_cb, NULL, "lv_font_class_t_create_cb", NULL); - if (strcmp(attr, "delete_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->delete_cb, NULL, "lv_font_class_t_delete_cb", NULL); - if (strcmp(attr, "dup_src_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dup_src_cb, NULL, "lv_font_class_t_dup_src_cb", NULL); - if (strcmp(attr, "free_src_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->free_src_cb, NULL, "lv_font_class_t_free_src_cb", NULL); - for (PyMethodDef *m = py_lv_font_class_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); + if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); + if (strcmp(attr, "info") == 0) return mp_read_ptr_lv_indev_gesture_t((void*)data->info); + if (strcmp(attr, "scale") == 0) return mp_obj_new_float_from_f(data->scale); + if (strcmp(attr, "rotation") == 0) return mp_obj_new_float_from_f(data->rotation); + if (strcmp(attr, "distance") == 0) return mp_obj_new_float_from_f(data->distance); + if (strcmp(attr, "speed") == 0) return mp_obj_new_float_from_f(data->speed); + if (strcmp(attr, "two_fingers_swipe_dir") == 0) return mp_obj_new_int(data->two_fingers_swipe_dir); + if (strcmp(attr, "config") == 0) return mp_read_ptr_lv_indev_gesture_configuration_t((void*)data->config); + if (strcmp(attr, "recog_fn") == 0) return mp_lv_funcptr(NULL, data->recog_fn, NULL, "lv_indev_gesture_recognizer_t_recog_fn", NULL); + for (PyMethodDef *m = py_lv_indev_gesture_recognizer_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_font_class_t_field_names[] = {"create_cb", "delete_cb", "dup_src_cb", "free_src_cb", NULL}; +static const char *const py_lv_indev_gesture_recognizer_t_field_names[] = {"type", "state", "info", "scale", "rotation", "distance", "speed", "two_fingers_swipe_dir", "config", "recog_fn", NULL}; -static PyObject *py_lv_font_class_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_indev_gesture_recognizer_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_font_class_t_field_names, py_lv_font_class_t_methods); + return lvpy_struct_dir(self, py_lv_indev_gesture_recognizer_t_field_names, py_lv_indev_gesture_recognizer_t_methods); } -static PyMethodDef py_lv_font_class_t_type_methods[] = { - {"__dir__", py_lv_font_class_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_indev_gesture_recognizer_t_type_methods[] = { + {"__dir__", py_lv_indev_gesture_recognizer_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_font_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_indev_gesture_recognizer_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_class_t *data = (lv_font_class_t*)inst->data; + lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -53770,135 +65580,175 @@ static int py_lv_font_class_t_setattro(PyObject *self, PyObject *name, PyObject const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_font_class_t saved; + lv_indev_gesture_recognizer_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "create_cb") == 0) { data->create_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_create_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "delete_cb") == 0) { data->delete_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_delete_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "dup_src_cb") == 0) { data->dup_src_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_dup_src_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "free_src_cb") == 0) { data->free_src_cb = (void*)mp_lv_callback(value, NULL, "lv_font_class_t_free_src_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "info") == 0) { data->info = (void*)mp_write_ptr_lv_indev_gesture_t(value); result = 0; } + if (strcmp(attr, "scale") == 0) { data->scale = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "rotation") == 0) { data->rotation = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "distance") == 0) { data->distance = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "speed") == 0) { data->speed = (float)mp_obj_get_float(value); result = 0; } + if (strcmp(attr, "two_fingers_swipe_dir") == 0) { data->two_fingers_swipe_dir = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "config") == 0) { data->config = (void*)mp_write_ptr_lv_indev_gesture_configuration_t(value); result = 0; } + if (strcmp(attr, "recog_fn") == 0) { data->recog_fn = mp_lv_callback(value, NULL, "lv_indev_gesture_recognizer_t_recog_fn", NULL, NULL, NULL, NULL); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_font_class_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_indev_gesture_recognizer_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_font_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_indev_gesture_recognizer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_font_class_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_gesture_recognizer_t)); } -static void py_lv_font_class_t_dealloc(py_lv_struct_t *self) +static void py_lv_indev_gesture_recognizer_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_font_class_t_type = { +PyTypeObject py_lv_indev_gesture_recognizer_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_font_class_t", + .tp_name = "lvgl.lv_indev_gesture_recognizer_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_font_class_t_dealloc, - .tp_getattro = (getter)py_lv_font_class_t_getattro, - .tp_setattro = (setter)py_lv_font_class_t_setattro, - .tp_new = py_lv_font_class_t_new, - .tp_methods = py_lv_font_class_t_type_methods, + .tp_dealloc = (destructor)py_lv_indev_gesture_recognizer_t_dealloc, + .tp_getattro = (getter)py_lv_indev_gesture_recognizer_t_getattro, + .tp_setattro = (setter)py_lv_indev_gesture_recognizer_t_setattro, + .tp_new = py_lv_indev_gesture_recognizer_t_new, + .tp_methods = py_lv_indev_gesture_recognizer_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_font_class_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_indev_gesture_recognizer_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_font_class_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_class_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_indev_gesture_recognizer_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_recognizer_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_font_class_t*)self->data; + return (lv_indev_gesture_recognizer_t*)self->data; } -static lv_font_class_t mp_write_scratch_lv_font_class_t; +static lv_indev_gesture_recognizer_t mp_write_scratch_lv_indev_gesture_recognizer_t; -static inline void* mp_write_value_ptr_lv_font_class_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_indev_gesture_recognizer_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_class_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_gesture_recognizer_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_font_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_class_t)); + memcpy(&mp_write_scratch_lv_indev_gesture_recognizer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_gesture_recognizer_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_font_class_t; + return &mp_write_scratch_lv_indev_gesture_recognizer_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_font_class_t(value); + void *p = mp_write_ptr_lv_indev_gesture_recognizer_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_class_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_recognizer_t or dict, got None"); } - memset(&mp_write_scratch_lv_font_class_t, 0, sizeof(lv_font_class_t)); - return &mp_write_scratch_lv_font_class_t; + memset(&mp_write_scratch_lv_indev_gesture_recognizer_t, 0, sizeof(lv_indev_gesture_recognizer_t)); + return &mp_write_scratch_lv_indev_gesture_recognizer_t; } -#define mp_write_lv_font_class_t(struct_obj) (*((lv_font_class_t*)mp_write_value_ptr_lv_font_class_t(struct_obj))) +#define mp_write_lv_indev_gesture_recognizer_t(struct_obj) (*((lv_indev_gesture_recognizer_t*)mp_write_value_ptr_lv_indev_gesture_recognizer_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_font_class_t(void *field) +static inline PyObject *mp_read_ptr_lv_indev_gesture_recognizer_t(void *field) { - return lv_to_mp_struct(&py_lv_font_class_t_type, field); + return lv_to_mp_struct(&py_lv_indev_gesture_recognizer_t_type, field); } -#define mp_read_lv_font_class_t(field) lv_to_mp_struct_own(&py_lv_font_class_t_type, copy_buffer(&field, sizeof(lv_font_class_t))) -#define mp_read_byref_lv_font_class_t(field) mp_read_ptr_lv_font_class_t(&field) +#define mp_read_lv_indev_gesture_recognizer_t(field) lv_to_mp_struct_own(&py_lv_indev_gesture_recognizer_t_type, copy_buffer(&field, sizeof(lv_indev_gesture_recognizer_t))) +#define mp_read_byref_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(&field) /* - * Struct lv_color16_t (CPython) + * Struct lv_indev_t (CPython) */ -extern PyMethodDef py_lv_color16_t_methods[]; +extern PyMethodDef py_lv_indev_t_methods[]; -static PyObject *py_lv_color16_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_indev_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color16_t *data = (lv_color16_t*)inst->data; + lv_indev_t *data = (lv_indev_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "blue") == 0) return mp_obj_new_int_from_uint(data->blue); - if (strcmp(attr, "green") == 0) return mp_obj_new_int_from_uint(data->green); - if (strcmp(attr, "red") == 0) return mp_obj_new_int_from_uint(data->red); - for (PyMethodDef *m = py_lv_color16_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); + if (strcmp(attr, "read_cb") == 0) return mp_lv_funcptr(NULL, data->read_cb, lv_indev_t_read_cb_callback, "lv_indev_t_read_cb", data->user_data); + if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); + if (strcmp(attr, "prev_state") == 0) return mp_obj_new_int(data->prev_state); + if (strcmp(attr, "mode") == 0) return mp_obj_new_int(data->mode); + if (strcmp(attr, "long_pr_sent") == 0) return mp_obj_new_int_from_uint(data->long_pr_sent); + if (strcmp(attr, "reset_query") == 0) return mp_obj_new_int_from_uint(data->reset_query); + if (strcmp(attr, "enabled") == 0) return mp_obj_new_int_from_uint(data->enabled); + if (strcmp(attr, "wait_until_release") == 0) return mp_obj_new_int_from_uint(data->wait_until_release); + if (strcmp(attr, "stop_processing_query") == 0) return mp_obj_new_int_from_uint(data->stop_processing_query); + if (strcmp(attr, "timestamp") == 0) return mp_obj_new_int_from_uint(data->timestamp); + if (strcmp(attr, "pr_timestamp") == 0) return mp_obj_new_int_from_uint(data->pr_timestamp); + if (strcmp(attr, "longpr_rep_timestamp") == 0) return mp_obj_new_int_from_uint(data->longpr_rep_timestamp); + if (strcmp(attr, "driver_data") == 0) return ptr_to_mp((void*)data->driver_data); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "disp") == 0) return mp_read_ptr_lv_display_t((void*)data->disp); + if (strcmp(attr, "read_timer") == 0) return mp_read_ptr_lv_timer_t((void*)data->read_timer); + if (strcmp(attr, "scroll_limit") == 0) return mp_obj_new_int_from_uint(data->scroll_limit); + if (strcmp(attr, "scroll_throw") == 0) return mp_obj_new_int_from_uint(data->scroll_throw); + if (strcmp(attr, "gesture_min_velocity") == 0) return mp_obj_new_int_from_uint(data->gesture_min_velocity); + if (strcmp(attr, "gesture_min_distance") == 0) return mp_obj_new_int_from_uint(data->gesture_min_distance); + if (strcmp(attr, "long_press_time") == 0) return mp_obj_new_int_from_uint(data->long_press_time); + if (strcmp(attr, "double_click_time") == 0) return mp_obj_new_int_from_uint(data->double_click_time); + if (strcmp(attr, "long_press_repeat_time") == 0) return mp_obj_new_int_from_uint(data->long_press_repeat_time); + if (strcmp(attr, "rotary_sensitivity") == 0) return mp_obj_new_int(data->rotary_sensitivity); + if (strcmp(attr, "pointer") == 0) return mp_read_byref_lv_indev_pointer_t(data->pointer); + if (strcmp(attr, "keypad") == 0) return mp_read_byref_lv_indev_keypad_t(data->keypad); + if (strcmp(attr, "cursor") == 0) return lv_to_mp((void*)data->cursor); + if (strcmp(attr, "group") == 0) return mp_read_ptr_lv_group_t((void*)data->group); + if (strcmp(attr, "btn_points") == 0) return mp_read_ptr_lv_point_t((void*)data->btn_points); + if (strcmp(attr, "event_list") == 0) return mp_read_byref_lv_event_list_t(data->event_list); + if (strcmp(attr, "scroll_throw_anim") == 0) return mp_read_ptr_lv_anim_t((void*)data->scroll_throw_anim); + if (strcmp(attr, "key_remap_cb") == 0) return mp_lv_funcptr(NULL, data->key_remap_cb, lv_indev_t_key_remap_cb_callback, "lv_indev_t_key_remap_cb", data->user_data); + if (strcmp(attr, "recognizers") == 0) return lvpy_struct_array_new(self, data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_read_ptr_lv_indev_gesture_recognizer_t, mp_write_value_ptr_lv_indev_gesture_recognizer_t); + if (strcmp(attr, "cur_gesture") == 0) return mp_obj_new_int(data->cur_gesture); + if (strcmp(attr, "gesture_data") == 0) return ptr_to_mp(data->gesture_data); + if (strcmp(attr, "gesture_type") == 0) return ptr_to_mp(data->gesture_type); + for (PyMethodDef *m = py_lv_indev_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_color16_t_field_names[] = {"blue", "green", "red", NULL}; +static const char *const py_lv_indev_t_field_names[] = {"type", "read_cb", "state", "prev_state", "mode", "long_pr_sent", "reset_query", "enabled", "wait_until_release", "stop_processing_query", "timestamp", "pr_timestamp", "longpr_rep_timestamp", "driver_data", "user_data", "disp", "read_timer", "scroll_limit", "scroll_throw", "gesture_min_velocity", "gesture_min_distance", "long_press_time", "double_click_time", "long_press_repeat_time", "rotary_sensitivity", "pointer", "keypad", "cursor", "group", "btn_points", "event_list", "scroll_throw_anim", "key_remap_cb", "recognizers", "cur_gesture", "gesture_data", "gesture_type", NULL}; -static PyObject *py_lv_color16_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_indev_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_color16_t_field_names, py_lv_color16_t_methods); + return lvpy_struct_dir(self, py_lv_indev_t_field_names, py_lv_indev_t_methods); } -static PyMethodDef py_lv_color16_t_type_methods[] = { - {"__dir__", py_lv_color16_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_indev_t_type_methods[] = { + {"__dir__", py_lv_indev_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_color16_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_indev_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color16_t *data = (lv_color16_t*)inst->data; + lv_indev_t *data = (lv_indev_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -53906,139 +65756,169 @@ static int py_lv_color16_t_setattro(PyObject *self, PyObject *name, PyObject *va const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_color16_t saved; + lv_indev_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "blue") == 0) { data->blue = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "green") == 0) { data->green = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "red") == 0) { data->red = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "read_cb") == 0) { data->read_cb = mp_lv_callback(value, lv_indev_t_read_cb_callback, "lv_indev_t_read_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "prev_state") == 0) { data->prev_state = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "mode") == 0) { data->mode = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "long_pr_sent") == 0) { data->long_pr_sent = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "reset_query") == 0) { data->reset_query = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "enabled") == 0) { data->enabled = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "wait_until_release") == 0) { data->wait_until_release = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "stop_processing_query") == 0) { data->stop_processing_query = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "timestamp") == 0) { data->timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pr_timestamp") == 0) { data->pr_timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "longpr_rep_timestamp") == 0) { data->longpr_rep_timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "driver_data") == 0) { data->driver_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "disp") == 0) { data->disp = (void*)mp_write_ptr_lv_display_t(value); result = 0; } + if (strcmp(attr, "read_timer") == 0) { data->read_timer = (void*)mp_write_ptr_lv_timer_t(value); result = 0; } + if (strcmp(attr, "scroll_limit") == 0) { data->scroll_limit = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "scroll_throw") == 0) { data->scroll_throw = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "gesture_min_velocity") == 0) { data->gesture_min_velocity = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "gesture_min_distance") == 0) { data->gesture_min_distance = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "long_press_time") == 0) { data->long_press_time = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "double_click_time") == 0) { data->double_click_time = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "long_press_repeat_time") == 0) { data->long_press_repeat_time = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "rotary_sensitivity") == 0) { data->rotary_sensitivity = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pointer") == 0) { data->pointer = mp_write_lv_indev_pointer_t(value); result = 0; } + if (strcmp(attr, "keypad") == 0) { data->keypad = mp_write_lv_indev_keypad_t(value); result = 0; } + if (strcmp(attr, "cursor") == 0) { data->cursor = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "group") == 0) { data->group = (void*)mp_write_ptr_lv_group_t(value); result = 0; } + if (strcmp(attr, "btn_points") == 0) { data->btn_points = (void*)mp_write_ptr_lv_point_t(value); result = 0; } + if (strcmp(attr, "event_list") == 0) { data->event_list = mp_write_lv_event_list_t(value); result = 0; } + if (strcmp(attr, "scroll_throw_anim") == 0) { data->scroll_throw_anim = (void*)mp_write_ptr_lv_anim_t(value); result = 0; } + if (strcmp(attr, "key_remap_cb") == 0) { data->key_remap_cb = mp_lv_callback(value, lv_indev_t_key_remap_cb_callback, "lv_indev_t_key_remap_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "recognizers") == 0) { lvpy_struct_array_assign(data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_write_value_ptr_lv_indev_gesture_recognizer_t, value); result = 0; } + if (strcmp(attr, "cur_gesture") == 0) { data->cur_gesture = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "gesture_data") == 0) { memcpy((void*)&data->gesture_data, mp_to_ptr(value), sizeof(void *)*LV_INDEV_GESTURE_CNT); result = 0; } + if (strcmp(attr, "gesture_type") == 0) { memcpy((void*)&data->gesture_type, mp_to_ptr(value), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_color16_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_indev_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_color16_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_indev_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_color16_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_t)); } -static void py_lv_color16_t_dealloc(py_lv_struct_t *self) +static void py_lv_indev_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_color16_t_type = { +PyTypeObject py_lv_indev_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_color16_t", + .tp_name = "lvgl.lv_indev_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_color16_t_dealloc, - .tp_getattro = (getter)py_lv_color16_t_getattro, - .tp_setattro = (setter)py_lv_color16_t_setattro, - .tp_new = py_lv_color16_t_new, - .tp_methods = py_lv_color16_t_type_methods, + .tp_dealloc = (destructor)py_lv_indev_t_dealloc, + .tp_getattro = (getter)py_lv_indev_t_getattro, + .tp_setattro = (setter)py_lv_indev_t_setattro, + .tp_new = py_lv_indev_t_new, + .tp_methods = py_lv_indev_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_color16_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_indev_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_color16_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color16_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_indev_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_color16_t*)self->data; + return (lv_indev_t*)self->data; } -static lv_color16_t mp_write_scratch_lv_color16_t; +static lv_indev_t mp_write_scratch_lv_indev_t; -static inline void* mp_write_value_ptr_lv_color16_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_indev_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color16_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_color16_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color16_t)); + memcpy(&mp_write_scratch_lv_indev_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_color16_t; + return &mp_write_scratch_lv_indev_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_color16_t(value); + void *p = mp_write_ptr_lv_indev_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color16_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_t or dict, got None"); } - memset(&mp_write_scratch_lv_color16_t, 0, sizeof(lv_color16_t)); - return &mp_write_scratch_lv_color16_t; + memset(&mp_write_scratch_lv_indev_t, 0, sizeof(lv_indev_t)); + return &mp_write_scratch_lv_indev_t; } -#define mp_write_lv_color16_t(struct_obj) (*((lv_color16_t*)mp_write_value_ptr_lv_color16_t(struct_obj))) +#define mp_write_lv_indev_t(struct_obj) (*((lv_indev_t*)mp_write_value_ptr_lv_indev_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_color16_t(void *field) +static inline PyObject *mp_read_ptr_lv_indev_t(void *field) { - return lv_to_mp_struct(&py_lv_color16_t_type, field); + return lv_to_mp_struct(&py_lv_indev_t_type, field); } -#define mp_read_lv_color16_t(field) lv_to_mp_struct_own(&py_lv_color16_t_type, copy_buffer(&field, sizeof(lv_color16_t))) -#define mp_read_byref_lv_color16_t(field) mp_read_ptr_lv_color16_t(&field) +#define mp_read_lv_indev_t(field) lv_to_mp_struct_own(&py_lv_indev_t_type, copy_buffer(&field, sizeof(lv_indev_t))) +#define mp_read_byref_lv_indev_t(field) mp_read_ptr_lv_indev_t(&field) /* - * Struct lv_mem_monitor_t (CPython) + * Struct lv_draw_mask_rect_dsc_t (CPython) */ -extern PyMethodDef py_lv_mem_monitor_t_methods[]; +extern PyMethodDef py_lv_draw_mask_rect_dsc_t_methods[]; -static PyObject *py_lv_mem_monitor_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_mask_rect_dsc_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_mem_monitor_t *data = (lv_mem_monitor_t*)inst->data; + lv_draw_mask_rect_dsc_t *data = (lv_draw_mask_rect_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "total_size") == 0) return mp_obj_new_int_from_uint(data->total_size); - if (strcmp(attr, "free_cnt") == 0) return mp_obj_new_int_from_uint(data->free_cnt); - if (strcmp(attr, "free_size") == 0) return mp_obj_new_int_from_uint(data->free_size); - if (strcmp(attr, "free_biggest_size") == 0) return mp_obj_new_int_from_uint(data->free_biggest_size); - if (strcmp(attr, "used_cnt") == 0) return mp_obj_new_int_from_uint(data->used_cnt); - if (strcmp(attr, "max_used") == 0) return mp_obj_new_int_from_uint(data->max_used); - if (strcmp(attr, "used_pct") == 0) return mp_obj_new_int_from_uint(data->used_pct); - if (strcmp(attr, "frag_pct") == 0) return mp_obj_new_int_from_uint(data->frag_pct); - for (PyMethodDef *m = py_lv_mem_monitor_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); + if (strcmp(attr, "area") == 0) return mp_read_byref_lv_area_t(data->area); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); + if (strcmp(attr, "keep_outside") == 0) return mp_obj_new_int_from_uint(data->keep_outside); + for (PyMethodDef *m = py_lv_draw_mask_rect_dsc_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_mem_monitor_t_field_names[] = {"total_size", "free_cnt", "free_size", "free_biggest_size", "used_cnt", "max_used", "used_pct", "frag_pct", NULL}; +static const char *const py_lv_draw_mask_rect_dsc_t_field_names[] = {"base", "area", "radius", "keep_outside", NULL}; -static PyObject *py_lv_mem_monitor_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_mask_rect_dsc_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_mem_monitor_t_field_names, py_lv_mem_monitor_t_methods); + return lvpy_struct_dir(self, py_lv_draw_mask_rect_dsc_t_field_names, py_lv_draw_mask_rect_dsc_t_methods); } -static PyMethodDef py_lv_mem_monitor_t_type_methods[] = { - {"__dir__", py_lv_mem_monitor_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_mask_rect_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_mask_rect_dsc_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_mem_monitor_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_mask_rect_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_mem_monitor_t *data = (lv_mem_monitor_t*)inst->data; + lv_draw_mask_rect_dsc_t *data = (lv_draw_mask_rect_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -54046,157 +65926,141 @@ static int py_lv_mem_monitor_t_setattro(PyObject *self, PyObject *name, PyObject const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_mem_monitor_t saved; + lv_draw_mask_rect_dsc_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "total_size") == 0) { data->total_size = (size_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "free_cnt") == 0) { data->free_cnt = (size_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "free_size") == 0) { data->free_size = (size_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "free_biggest_size") == 0) { data->free_biggest_size = (size_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "used_cnt") == 0) { data->used_cnt = (size_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "max_used") == 0) { data->max_used = (size_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "used_pct") == 0) { data->used_pct = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "frag_pct") == 0) { data->frag_pct = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } + if (strcmp(attr, "area") == 0) { data->area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "keep_outside") == 0) { data->keep_outside = (uint32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_mem_monitor_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_mask_rect_dsc_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_mem_monitor_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_mask_rect_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_mem_monitor_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_mask_rect_dsc_t)); } -static void py_lv_mem_monitor_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_mask_rect_dsc_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_mem_monitor_t_type = { +PyTypeObject py_lv_draw_mask_rect_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_mem_monitor_t", + .tp_name = "lvgl.lv_draw_mask_rect_dsc_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_mem_monitor_t_dealloc, - .tp_getattro = (getter)py_lv_mem_monitor_t_getattro, - .tp_setattro = (setter)py_lv_mem_monitor_t_setattro, - .tp_new = py_lv_mem_monitor_t_new, - .tp_methods = py_lv_mem_monitor_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_mask_rect_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_mask_rect_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_mask_rect_dsc_t_setattro, + .tp_new = py_lv_draw_mask_rect_dsc_t_new, + .tp_methods = py_lv_draw_mask_rect_dsc_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_mem_monitor_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_mask_rect_dsc_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_mem_monitor_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_mem_monitor_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_mask_rect_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_mask_rect_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_mem_monitor_t*)self->data; + return (lv_draw_mask_rect_dsc_t*)self->data; } -static lv_mem_monitor_t mp_write_scratch_lv_mem_monitor_t; +static lv_draw_mask_rect_dsc_t mp_write_scratch_lv_draw_mask_rect_dsc_t; -static inline void* mp_write_value_ptr_lv_mem_monitor_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_mask_rect_dsc_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_mem_monitor_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_mask_rect_dsc_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_mem_monitor_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_mem_monitor_t)); + memcpy(&mp_write_scratch_lv_draw_mask_rect_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_mask_rect_dsc_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_mem_monitor_t; + return &mp_write_scratch_lv_draw_mask_rect_dsc_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_mem_monitor_t(value); + void *p = mp_write_ptr_lv_draw_mask_rect_dsc_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_mem_monitor_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_mask_rect_dsc_t or dict, got None"); } - memset(&mp_write_scratch_lv_mem_monitor_t, 0, sizeof(lv_mem_monitor_t)); - return &mp_write_scratch_lv_mem_monitor_t; + memset(&mp_write_scratch_lv_draw_mask_rect_dsc_t, 0, sizeof(lv_draw_mask_rect_dsc_t)); + return &mp_write_scratch_lv_draw_mask_rect_dsc_t; } -#define mp_write_lv_mem_monitor_t(struct_obj) (*((lv_mem_monitor_t*)mp_write_value_ptr_lv_mem_monitor_t(struct_obj))) +#define mp_write_lv_draw_mask_rect_dsc_t(struct_obj) (*((lv_draw_mask_rect_dsc_t*)mp_write_value_ptr_lv_draw_mask_rect_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_mem_monitor_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_mask_rect_dsc_t(void *field) { - return lv_to_mp_struct(&py_lv_mem_monitor_t_type, field); + return lv_to_mp_struct(&py_lv_draw_mask_rect_dsc_t_type, field); } -#define mp_read_lv_mem_monitor_t(field) lv_to_mp_struct_own(&py_lv_mem_monitor_t_type, copy_buffer(&field, sizeof(lv_mem_monitor_t))) -#define mp_read_byref_lv_mem_monitor_t(field) mp_read_ptr_lv_mem_monitor_t(&field) - -#define funcptr_lv_delay_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_delay_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -#define funcptr_lv_tick_get_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_tick_get_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -#define funcptr_lv_timer_handler_resume_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_timer_handler_resume_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -#define funcptr_lv_async_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_async_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +#define mp_read_lv_draw_mask_rect_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_mask_rect_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_mask_rect_dsc_t))) +#define mp_read_byref_lv_draw_mask_rect_dsc_t(field) mp_read_ptr_lv_draw_mask_rect_dsc_t(&field) /* - * Struct lv_rb_node_t (CPython) + * Struct lv_indev_data_t (CPython) */ -extern PyMethodDef py_lv_rb_node_t_methods[]; +extern PyMethodDef py_lv_indev_data_t_methods[]; -static PyObject *py_lv_rb_node_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_indev_data_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_rb_node_t *data = (lv_rb_node_t*)inst->data; + lv_indev_data_t *data = (lv_indev_data_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); - if (strcmp(attr, "left") == 0) return ptr_to_mp((void*)data->left); - if (strcmp(attr, "right") == 0) return ptr_to_mp((void*)data->right); - if (strcmp(attr, "color") == 0) return mp_obj_new_int(data->color); - if (strcmp(attr, "data") == 0) return ptr_to_mp((void*)data->data); - for (PyMethodDef *m = py_lv_rb_node_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "gesture_type") == 0) return ptr_to_mp(data->gesture_type); + if (strcmp(attr, "gesture_data") == 0) return ptr_to_mp(data->gesture_data); + if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); + if (strcmp(attr, "point") == 0) return mp_read_byref_lv_point_t(data->point); + if (strcmp(attr, "key") == 0) return mp_obj_new_int_from_uint(data->key); + if (strcmp(attr, "btn_id") == 0) return mp_obj_new_int_from_uint(data->btn_id); + if (strcmp(attr, "enc_diff") == 0) return mp_obj_new_int(data->enc_diff); + if (strcmp(attr, "timestamp") == 0) return mp_obj_new_int_from_uint(data->timestamp); + if (strcmp(attr, "continue_reading") == 0) return convert_to_bool(data->continue_reading); + for (PyMethodDef *m = py_lv_indev_data_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_rb_node_t_field_names[] = {"parent", "left", "right", "color", "data", NULL}; +static const char *const py_lv_indev_data_t_field_names[] = {"gesture_type", "gesture_data", "state", "point", "key", "btn_id", "enc_diff", "timestamp", "continue_reading", NULL}; -static PyObject *py_lv_rb_node_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_indev_data_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_rb_node_t_field_names, py_lv_rb_node_t_methods); + return lvpy_struct_dir(self, py_lv_indev_data_t_field_names, py_lv_indev_data_t_methods); } -static PyMethodDef py_lv_rb_node_t_type_methods[] = { - {"__dir__", py_lv_rb_node_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_indev_data_t_type_methods[] = { + {"__dir__", py_lv_indev_data_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_rb_node_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_indev_data_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_rb_node_t *data = (lv_rb_node_t*)inst->data; + lv_indev_data_t *data = (lv_indev_data_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -54204,147 +66068,141 @@ static int py_lv_rb_node_t_setattro(PyObject *self, PyObject *name, PyObject *va const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_rb_node_t saved; + lv_indev_data_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "left") == 0) { data->left = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "right") == 0) { data->right = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "data") == 0) { data->data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "gesture_type") == 0) { memcpy((void*)&data->gesture_type, mp_to_ptr(value), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); result = 0; } + if (strcmp(attr, "gesture_data") == 0) { memcpy((void*)&data->gesture_data, mp_to_ptr(value), sizeof(void *)*LV_INDEV_GESTURE_CNT); result = 0; } + if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "point") == 0) { data->point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "key") == 0) { data->key = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "btn_id") == 0) { data->btn_id = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "enc_diff") == 0) { data->enc_diff = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "timestamp") == 0) { data->timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "continue_reading") == 0) { data->continue_reading = mp_obj_is_true(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_rb_node_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_indev_data_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_rb_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_indev_data_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_node_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_data_t)); } -static void py_lv_rb_node_t_dealloc(py_lv_struct_t *self) +static void py_lv_indev_data_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_rb_node_t_type = { +PyTypeObject py_lv_indev_data_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_rb_node_t", + .tp_name = "lvgl.lv_indev_data_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_rb_node_t_dealloc, - .tp_getattro = (getter)py_lv_rb_node_t_getattro, - .tp_setattro = (setter)py_lv_rb_node_t_setattro, - .tp_new = py_lv_rb_node_t_new, - .tp_methods = py_lv_rb_node_t_type_methods, + .tp_dealloc = (destructor)py_lv_indev_data_t_dealloc, + .tp_getattro = (getter)py_lv_indev_data_t_getattro, + .tp_setattro = (setter)py_lv_indev_data_t_setattro, + .tp_new = py_lv_indev_data_t_new, + .tp_methods = py_lv_indev_data_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_rb_node_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_indev_data_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_rb_node_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_node_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_indev_data_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_data_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_rb_node_t*)self->data; + return (lv_indev_data_t*)self->data; } -static lv_rb_node_t mp_write_scratch_lv_rb_node_t; +static lv_indev_data_t mp_write_scratch_lv_indev_data_t; -static inline void* mp_write_value_ptr_lv_rb_node_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_indev_data_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_node_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_data_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_rb_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_node_t)); + memcpy(&mp_write_scratch_lv_indev_data_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_data_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_rb_node_t; + return &mp_write_scratch_lv_indev_data_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_rb_node_t(value); + void *p = mp_write_ptr_lv_indev_data_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_node_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_data_t or dict, got None"); } - memset(&mp_write_scratch_lv_rb_node_t, 0, sizeof(lv_rb_node_t)); - return &mp_write_scratch_lv_rb_node_t; + memset(&mp_write_scratch_lv_indev_data_t, 0, sizeof(lv_indev_data_t)); + return &mp_write_scratch_lv_indev_data_t; } -#define mp_write_lv_rb_node_t(struct_obj) (*((lv_rb_node_t*)mp_write_value_ptr_lv_rb_node_t(struct_obj))) +#define mp_write_lv_indev_data_t(struct_obj) (*((lv_indev_data_t*)mp_write_value_ptr_lv_indev_data_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_rb_node_t(void *field) +static inline PyObject *mp_read_ptr_lv_indev_data_t(void *field) { - return lv_to_mp_struct(&py_lv_rb_node_t_type, field); + return lv_to_mp_struct(&py_lv_indev_data_t_type, field); } -#define mp_read_lv_rb_node_t(field) lv_to_mp_struct_own(&py_lv_rb_node_t_type, copy_buffer(&field, sizeof(lv_rb_node_t))) -#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) - -#define funcptr_lv_rb_compare_t NULL - -static inline PyObject *mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - +#define mp_read_lv_indev_data_t(field) lv_to_mp_struct_own(&py_lv_indev_data_t_type, copy_buffer(&field, sizeof(lv_indev_data_t))) +#define mp_read_byref_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_rb_t_compare' - * lv_rb_compare_t compare - */ - /* - * Struct lv_rb_t (CPython) + * Struct lv_binfont_dsc_t (CPython) */ -extern PyMethodDef py_lv_rb_t_methods[]; +extern PyMethodDef py_lv_binfont_dsc_t_methods[]; -static PyObject *py_lv_rb_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_binfont_dsc_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_rb_t *data = (lv_rb_t*)inst->data; + lv_binfont_dsc_t *data = (lv_binfont_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "root") == 0) return mp_read_ptr_lv_rb_node_t((void*)data->root); - if (strcmp(attr, "compare") == 0) return mp_lv_funcptr(NULL, data->compare, NULL, "lv_rb_t_compare", NULL); - if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); - for (PyMethodDef *m = py_lv_rb_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "path") == 0) return convert_to_str((void*)data->path); + if (strcmp(attr, "buffer") == 0) return ptr_to_mp((void*)data->buffer); + if (strcmp(attr, "buffer_size") == 0) return mp_obj_new_int_from_uint(data->buffer_size); + if (strcmp(attr, "dynamic_glyph_load") == 0) return convert_to_bool(data->dynamic_glyph_load); + for (PyMethodDef *m = py_lv_binfont_dsc_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_rb_t_field_names[] = {"root", "compare", "size", NULL}; +static const char *const py_lv_binfont_dsc_t_field_names[] = {"path", "buffer", "buffer_size", "dynamic_glyph_load", NULL}; -static PyObject *py_lv_rb_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_binfont_dsc_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_rb_t_field_names, py_lv_rb_t_methods); + return lvpy_struct_dir(self, py_lv_binfont_dsc_t_field_names, py_lv_binfont_dsc_t_methods); } -static PyMethodDef py_lv_rb_t_type_methods[] = { - {"__dir__", py_lv_rb_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_binfont_dsc_t_type_methods[] = { + {"__dir__", py_lv_binfont_dsc_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_rb_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_binfont_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_rb_t *data = (lv_rb_t*)inst->data; + lv_binfont_dsc_t *data = (lv_binfont_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -54352,132 +66210,157 @@ static int py_lv_rb_t_setattro(PyObject *self, PyObject *name, PyObject *value) const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_rb_t saved; + lv_binfont_dsc_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "root") == 0) { data->root = (void*)mp_write_ptr_lv_rb_node_t(value); result = 0; } - if (strcmp(attr, "compare") == 0) { data->compare = mp_lv_callback(value, NULL, "lv_rb_t_compare", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "size") == 0) { data->size = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "path") == 0) { data->path = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "buffer") == 0) { data->buffer = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "buffer_size") == 0) { data->buffer_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dynamic_glyph_load") == 0) { data->dynamic_glyph_load = mp_obj_is_true(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_rb_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_binfont_dsc_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_rb_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_binfont_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_binfont_dsc_t)); } -static void py_lv_rb_t_dealloc(py_lv_struct_t *self) +static void py_lv_binfont_dsc_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_rb_t_type = { +PyTypeObject py_lv_binfont_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_rb_t", + .tp_name = "lvgl.lv_binfont_dsc_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_rb_t_dealloc, - .tp_getattro = (getter)py_lv_rb_t_getattro, - .tp_setattro = (setter)py_lv_rb_t_setattro, - .tp_new = py_lv_rb_t_new, - .tp_methods = py_lv_rb_t_type_methods, + .tp_dealloc = (destructor)py_lv_binfont_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_binfont_dsc_t_getattro, + .tp_setattro = (setter)py_lv_binfont_dsc_t_setattro, + .tp_new = py_lv_binfont_dsc_t_new, + .tp_methods = py_lv_binfont_dsc_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_rb_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_binfont_dsc_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_rb_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_binfont_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_binfont_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_rb_t*)self->data; + return (lv_binfont_dsc_t*)self->data; } -static lv_rb_t mp_write_scratch_lv_rb_t; +static lv_binfont_dsc_t mp_write_scratch_lv_binfont_dsc_t; -static inline void* mp_write_value_ptr_lv_rb_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_binfont_dsc_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_binfont_dsc_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_rb_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_t)); + memcpy(&mp_write_scratch_lv_binfont_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_binfont_dsc_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_rb_t; + return &mp_write_scratch_lv_binfont_dsc_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_rb_t(value); + void *p = mp_write_ptr_lv_binfont_dsc_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_binfont_dsc_t or dict, got None"); } - memset(&mp_write_scratch_lv_rb_t, 0, sizeof(lv_rb_t)); - return &mp_write_scratch_lv_rb_t; + memset(&mp_write_scratch_lv_binfont_dsc_t, 0, sizeof(lv_binfont_dsc_t)); + return &mp_write_scratch_lv_binfont_dsc_t; } -#define mp_write_lv_rb_t(struct_obj) (*((lv_rb_t*)mp_write_value_ptr_lv_rb_t(struct_obj))) +#define mp_write_lv_binfont_dsc_t(struct_obj) (*((lv_binfont_dsc_t*)mp_write_value_ptr_lv_binfont_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_rb_t(void *field) +static inline PyObject *mp_read_ptr_lv_binfont_dsc_t(void *field) { - return lv_to_mp_struct(&py_lv_rb_t_type, field); + return lv_to_mp_struct(&py_lv_binfont_dsc_t_type, field); } -#define mp_read_lv_rb_t(field) lv_to_mp_struct_own(&py_lv_rb_t_type, copy_buffer(&field, sizeof(lv_rb_t))) -#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) +#define mp_read_lv_binfont_dsc_t(field) lv_to_mp_struct_own(&py_lv_binfont_dsc_t_type, copy_buffer(&field, sizeof(lv_binfont_dsc_t))) +#define mp_read_byref_lv_binfont_dsc_t(field) mp_read_ptr_lv_binfont_dsc_t(&field) + +#define funcptr_lv_async_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_async_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +#define funcptr_lv_delay_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_delay_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +#define funcptr_lv_tick_get_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_tick_get_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +#define funcptr_lv_draw_sw_blend_handler_t NULL + +static inline PyObject *mp_lv_funcptr_lv_draw_sw_blend_handler_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * Struct lv_circle_buf_t (CPython) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_sw_custom_blend_handler_t_handler' + * lv_draw_sw_blend_handler_t handler */ + -extern PyMethodDef py_lv_circle_buf_t_methods[]; +/* + * Struct lv_draw_sw_custom_blend_handler_t (CPython) + */ -static PyObject *py_lv_circle_buf_t_getattro(PyObject *self, PyObject *name) +extern PyMethodDef py_lv_draw_sw_custom_blend_handler_t_methods[]; + +static PyObject *py_lv_draw_sw_custom_blend_handler_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_circle_buf_t *data = (lv_circle_buf_t*)inst->data; + lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - (void)attr; - for (PyMethodDef *m = py_lv_circle_buf_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "dest_cf") == 0) return mp_obj_new_int(data->dest_cf); + if (strcmp(attr, "handler") == 0) return mp_lv_funcptr(NULL, data->handler, NULL, "lv_draw_sw_custom_blend_handler_t_handler", NULL); + for (PyMethodDef *m = py_lv_draw_sw_custom_blend_handler_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_circle_buf_t_field_names[] = {NULL}; +static const char *const py_lv_draw_sw_custom_blend_handler_t_field_names[] = {"dest_cf", "handler", NULL}; -static PyObject *py_lv_circle_buf_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_custom_blend_handler_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_circle_buf_t_field_names, py_lv_circle_buf_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_custom_blend_handler_t_field_names, py_lv_draw_sw_custom_blend_handler_t_methods); } -static PyMethodDef py_lv_circle_buf_t_type_methods[] = { - {"__dir__", py_lv_circle_buf_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_custom_blend_handler_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_custom_blend_handler_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_circle_buf_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_custom_blend_handler_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_circle_buf_t *data = (lv_circle_buf_t*)inst->data; + lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -54485,112 +66368,143 @@ static int py_lv_circle_buf_t_setattro(PyObject *self, PyObject *name, PyObject const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - - (void)value; + lv_draw_sw_custom_blend_handler_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "dest_cf") == 0) { data->dest_cf = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "handler") == 0) { data->handler = mp_lv_callback(value, NULL, "lv_draw_sw_custom_blend_handler_t_handler", NULL, NULL, NULL, NULL); result = 0; } if (PyErr_Occurred()) { - + memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_circle_buf_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_custom_blend_handler_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_circle_buf_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_custom_blend_handler_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, 0); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_custom_blend_handler_t)); } -static void py_lv_circle_buf_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_custom_blend_handler_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_circle_buf_t_type = { +PyTypeObject py_lv_draw_sw_custom_blend_handler_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_circle_buf_t", + .tp_name = "lvgl.lv_draw_sw_custom_blend_handler_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_circle_buf_t_dealloc, - .tp_getattro = (getter)py_lv_circle_buf_t_getattro, - .tp_setattro = (setter)py_lv_circle_buf_t_setattro, - .tp_new = py_lv_circle_buf_t_new, - .tp_methods = py_lv_circle_buf_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_custom_blend_handler_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_custom_blend_handler_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_custom_blend_handler_t_setattro, + .tp_new = py_lv_draw_sw_custom_blend_handler_t_new, + .tp_methods = py_lv_draw_sw_custom_blend_handler_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_circle_buf_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_custom_blend_handler_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_circle_buf_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_circle_buf_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_custom_blend_handler_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_custom_blend_handler_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_circle_buf_t*)self->data; + return (lv_draw_sw_custom_blend_handler_t*)self->data; } -#define mp_write_lv_circle_buf_t(struct_obj) (*((lv_circle_buf_t*)mp_write_ptr_lv_circle_buf_t(struct_obj))) +static lv_draw_sw_custom_blend_handler_t mp_write_scratch_lv_draw_sw_custom_blend_handler_t; -static inline PyObject *mp_read_ptr_lv_circle_buf_t(void *field) +static inline void* mp_write_value_ptr_lv_draw_sw_custom_blend_handler_t(PyObject *value) { - return lv_to_mp_struct(&py_lv_circle_buf_t_type, field); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_custom_blend_handler_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_sw_custom_blend_handler_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_custom_blend_handler_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_sw_custom_blend_handler_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_sw_custom_blend_handler_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_custom_blend_handler_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_sw_custom_blend_handler_t, 0, sizeof(lv_draw_sw_custom_blend_handler_t)); + return &mp_write_scratch_lv_draw_sw_custom_blend_handler_t; } -#define mp_read_lv_circle_buf_t(field) lv_to_mp_struct_own(&py_lv_circle_buf_t_type, copy_buffer(&field, sizeof(lv_circle_buf_t))) -#define mp_read_byref_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(&field) +#define mp_write_lv_draw_sw_custom_blend_handler_t(struct_obj) (*((lv_draw_sw_custom_blend_handler_t*)mp_write_value_ptr_lv_draw_sw_custom_blend_handler_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_sw_custom_blend_handler_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_sw_custom_blend_handler_t_type, field); +} + +#define mp_read_lv_draw_sw_custom_blend_handler_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_custom_blend_handler_t_type, copy_buffer(&field, sizeof(lv_draw_sw_custom_blend_handler_t))) +#define mp_read_byref_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(&field) + +#define funcptr_lv_draw_sw_mask_xcb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_draw_sw_mask_xcb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * Struct lv_tree_node_t (CPython) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_sw_mask_common_dsc_t_cb' + * lv_draw_sw_mask_xcb_t cb */ + -extern PyMethodDef py_lv_tree_node_t_methods[]; +/* + * Struct lv_draw_sw_mask_common_dsc_t (CPython) + */ -static PyObject *py_lv_tree_node_t_getattro(PyObject *self, PyObject *name) +extern PyMethodDef py_lv_draw_sw_mask_common_dsc_t_methods[]; + +static PyObject *py_lv_draw_sw_mask_common_dsc_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_tree_node_t *data = (lv_tree_node_t*)inst->data; + lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); - if (strcmp(attr, "children") == 0) return ptr_to_mp((void*)data->children); - if (strcmp(attr, "child_cnt") == 0) return mp_obj_new_int_from_uint(data->child_cnt); - if (strcmp(attr, "child_cap") == 0) return mp_obj_new_int_from_uint(data->child_cap); - if (strcmp(attr, "class_p") == 0) return mp_read_ptr_lv_tree_class_t((void*)data->class_p); - for (PyMethodDef *m = py_lv_tree_node_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "cb") == 0) return mp_lv_funcptr(NULL, data->cb, NULL, "lv_draw_sw_mask_common_dsc_t_cb", NULL); + if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); + for (PyMethodDef *m = py_lv_draw_sw_mask_common_dsc_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_tree_node_t_field_names[] = {"parent", "children", "child_cnt", "child_cap", "class_p", NULL}; +static const char *const py_lv_draw_sw_mask_common_dsc_t_field_names[] = {"cb", "type", NULL}; -static PyObject *py_lv_tree_node_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_common_dsc_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_tree_node_t_field_names, py_lv_tree_node_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_common_dsc_t_field_names, py_lv_draw_sw_mask_common_dsc_t_methods); } -static PyMethodDef py_lv_tree_node_t_type_methods[] = { - {"__dir__", py_lv_tree_node_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_common_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_common_dsc_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_tree_node_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_common_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_tree_node_t *data = (lv_tree_node_t*)inst->data; + lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -54598,136 +66512,134 @@ static int py_lv_tree_node_t_setattro(PyObject *self, PyObject *name, PyObject * const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_tree_node_t saved; + lv_draw_sw_mask_common_dsc_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "children") == 0) { data->children = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "child_cnt") == 0) { data->child_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "child_cap") == 0) { data->child_cap = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "class_p") == 0) { data->class_p = (void*)mp_write_ptr_lv_tree_class_t(value); result = 0; } + if (strcmp(attr, "cb") == 0) { data->cb = mp_lv_callback(value, NULL, "lv_draw_sw_mask_common_dsc_t_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_tree_node_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_common_dsc_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_tree_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_common_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_tree_node_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_common_dsc_t)); } -static void py_lv_tree_node_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_common_dsc_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_tree_node_t_type = { +PyTypeObject py_lv_draw_sw_mask_common_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_tree_node_t", + .tp_name = "lvgl.lv_draw_sw_mask_common_dsc_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_tree_node_t_dealloc, - .tp_getattro = (getter)py_lv_tree_node_t_getattro, - .tp_setattro = (setter)py_lv_tree_node_t_setattro, - .tp_new = py_lv_tree_node_t_new, - .tp_methods = py_lv_tree_node_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_common_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_common_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_common_dsc_t_setattro, + .tp_new = py_lv_draw_sw_mask_common_dsc_t_new, + .tp_methods = py_lv_draw_sw_mask_common_dsc_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_tree_node_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_common_dsc_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_tree_node_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_tree_node_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_common_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_common_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_tree_node_t*)self->data; + return (lv_draw_sw_mask_common_dsc_t*)self->data; } -static lv_tree_node_t mp_write_scratch_lv_tree_node_t; +static lv_draw_sw_mask_common_dsc_t mp_write_scratch_lv_draw_sw_mask_common_dsc_t; -static inline void* mp_write_value_ptr_lv_tree_node_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_common_dsc_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_tree_node_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_common_dsc_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_tree_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_tree_node_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_common_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_common_dsc_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_tree_node_t; + return &mp_write_scratch_lv_draw_sw_mask_common_dsc_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_tree_node_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_common_dsc_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_tree_node_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_common_dsc_t or dict, got None"); } - memset(&mp_write_scratch_lv_tree_node_t, 0, sizeof(lv_tree_node_t)); - return &mp_write_scratch_lv_tree_node_t; + memset(&mp_write_scratch_lv_draw_sw_mask_common_dsc_t, 0, sizeof(lv_draw_sw_mask_common_dsc_t)); + return &mp_write_scratch_lv_draw_sw_mask_common_dsc_t; } -#define mp_write_lv_tree_node_t(struct_obj) (*((lv_tree_node_t*)mp_write_value_ptr_lv_tree_node_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_common_dsc_t(struct_obj) (*((lv_draw_sw_mask_common_dsc_t*)mp_write_value_ptr_lv_draw_sw_mask_common_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_tree_node_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_common_dsc_t(void *field) { - return lv_to_mp_struct(&py_lv_tree_node_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_common_dsc_t_type, field); } -#define mp_read_lv_tree_node_t(field) lv_to_mp_struct_own(&py_lv_tree_node_t_type, copy_buffer(&field, sizeof(lv_tree_node_t))) -#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) +#define mp_read_lv_draw_sw_mask_common_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_common_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_common_dsc_t))) +#define mp_read_byref_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(&field) -typedef __typeof__( ((lv_font_glyph_dsc_t*)(0))->gid ) lv_font_glyph_dsc_gid_t; +typedef __typeof__( ((lv_draw_sw_mask_line_param_t*)(0))->cfg ) lv_draw_sw_mask_line_param_cfg_t; /* - * Struct lv_font_glyph_dsc_gid_t (CPython) + * Struct lv_draw_sw_mask_line_param_cfg_t (CPython) */ -extern PyMethodDef py_lv_font_glyph_dsc_gid_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_line_param_cfg_t_methods[]; -static PyObject *py_lv_font_glyph_dsc_gid_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_line_param_cfg_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)inst->data; + lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "index") == 0) return mp_obj_new_int_from_uint(data->index); - if (strcmp(attr, "src") == 0) return ptr_to_mp((void*)data->src); - for (PyMethodDef *m = py_lv_font_glyph_dsc_gid_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "p1") == 0) return mp_read_byref_lv_point_t(data->p1); + if (strcmp(attr, "p2") == 0) return mp_read_byref_lv_point_t(data->p2); + if (strcmp(attr, "side") == 0) return mp_obj_new_int(data->side); + for (PyMethodDef *m = py_lv_draw_sw_mask_line_param_cfg_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_font_glyph_dsc_gid_t_field_names[] = {"index", "src", NULL}; +static const char *const py_lv_draw_sw_mask_line_param_cfg_t_field_names[] = {"p1", "p2", "side", NULL}; -static PyObject *py_lv_font_glyph_dsc_gid_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_line_param_cfg_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_font_glyph_dsc_gid_t_field_names, py_lv_font_glyph_dsc_gid_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_line_param_cfg_t_field_names, py_lv_draw_sw_mask_line_param_cfg_t_methods); } -static PyMethodDef py_lv_font_glyph_dsc_gid_t_type_methods[] = { - {"__dir__", py_lv_font_glyph_dsc_gid_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_line_param_cfg_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_line_param_cfg_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_font_glyph_dsc_gid_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_line_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)inst->data; + lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -54735,143 +66647,140 @@ static int py_lv_font_glyph_dsc_gid_t_setattro(PyObject *self, PyObject *name, P const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_font_glyph_dsc_gid_t saved; + lv_draw_sw_mask_line_param_cfg_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "index") == 0) { data->index = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "src") == 0) { data->src = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "p1") == 0) { data->p1 = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "p2") == 0) { data->p2 = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "side") == 0) { data->side = (int)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_font_glyph_dsc_gid_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_line_param_cfg_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_font_glyph_dsc_gid_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_line_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_font_glyph_dsc_gid_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_line_param_cfg_t)); } -static void py_lv_font_glyph_dsc_gid_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_line_param_cfg_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_font_glyph_dsc_gid_t_type = { +PyTypeObject py_lv_draw_sw_mask_line_param_cfg_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_font_glyph_dsc_gid_t", + .tp_name = "lvgl.lv_draw_sw_mask_line_param_cfg_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_font_glyph_dsc_gid_t_dealloc, - .tp_getattro = (getter)py_lv_font_glyph_dsc_gid_t_getattro, - .tp_setattro = (setter)py_lv_font_glyph_dsc_gid_t_setattro, - .tp_new = py_lv_font_glyph_dsc_gid_t_new, - .tp_methods = py_lv_font_glyph_dsc_gid_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_line_param_cfg_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_line_param_cfg_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_line_param_cfg_t_setattro, + .tp_new = py_lv_draw_sw_mask_line_param_cfg_t_new, + .tp_methods = py_lv_draw_sw_mask_line_param_cfg_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_font_glyph_dsc_gid_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_font_glyph_dsc_gid_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_gid_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_line_param_cfg_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_font_glyph_dsc_gid_t*)self->data; + return (lv_draw_sw_mask_line_param_cfg_t*)self->data; } -static lv_font_glyph_dsc_gid_t mp_write_scratch_lv_font_glyph_dsc_gid_t; +static lv_draw_sw_mask_line_param_cfg_t mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t; -static inline void* mp_write_value_ptr_lv_font_glyph_dsc_gid_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_line_param_cfg_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_glyph_dsc_gid_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_line_param_cfg_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_font_glyph_dsc_gid_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_glyph_dsc_gid_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_line_param_cfg_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_font_glyph_dsc_gid_t; + return &mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_font_glyph_dsc_gid_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_gid_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_cfg_t or dict, got None"); } - memset(&mp_write_scratch_lv_font_glyph_dsc_gid_t, 0, sizeof(lv_font_glyph_dsc_gid_t)); - return &mp_write_scratch_lv_font_glyph_dsc_gid_t; + memset(&mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t, 0, sizeof(lv_draw_sw_mask_line_param_cfg_t)); + return &mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t; } -#define mp_write_lv_font_glyph_dsc_gid_t(struct_obj) (*((lv_font_glyph_dsc_gid_t*)mp_write_value_ptr_lv_font_glyph_dsc_gid_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_line_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_line_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_line_param_cfg_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_font_glyph_dsc_gid_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(void *field) { - return lv_to_mp_struct(&py_lv_font_glyph_dsc_gid_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_line_param_cfg_t_type, field); } -#define mp_read_lv_font_glyph_dsc_gid_t(field) lv_to_mp_struct_own(&py_lv_font_glyph_dsc_gid_t_type, copy_buffer(&field, sizeof(lv_font_glyph_dsc_gid_t))) -#define mp_read_byref_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(&field) +#define mp_read_lv_draw_sw_mask_line_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_line_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(&field) /* - * Struct lv_font_glyph_dsc_t (CPython) + * Struct lv_draw_sw_mask_line_param_t (CPython) */ -extern PyMethodDef py_lv_font_glyph_dsc_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_line_param_t_methods[]; -static PyObject *py_lv_font_glyph_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_line_param_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)inst->data; + lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "resolved_font") == 0) return mp_read_ptr_lv_font_t((void*)data->resolved_font); - if (strcmp(attr, "adv_w") == 0) return mp_obj_new_int_from_uint(data->adv_w); - if (strcmp(attr, "box_w") == 0) return mp_obj_new_int_from_uint(data->box_w); - if (strcmp(attr, "box_h") == 0) return mp_obj_new_int_from_uint(data->box_h); - if (strcmp(attr, "ofs_x") == 0) return mp_obj_new_int(data->ofs_x); - if (strcmp(attr, "ofs_y") == 0) return mp_obj_new_int(data->ofs_y); - if (strcmp(attr, "stride") == 0) return mp_obj_new_int_from_uint(data->stride); - if (strcmp(attr, "format") == 0) return mp_obj_new_int(data->format); - if (strcmp(attr, "is_placeholder") == 0) return mp_obj_new_int_from_uint(data->is_placeholder); - if (strcmp(attr, "req_raw_bitmap") == 0) return mp_obj_new_int_from_uint(data->req_raw_bitmap); - if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); - if (strcmp(attr, "gid") == 0) return mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); - if (strcmp(attr, "entry") == 0) return mp_read_ptr_lv_cache_entry_t((void*)data->entry); - for (PyMethodDef *m = py_lv_font_glyph_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); + if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(data->cfg); + if (strcmp(attr, "origo") == 0) return mp_read_byref_lv_point_t(data->origo); + if (strcmp(attr, "xy_steep") == 0) return mp_obj_new_int(data->xy_steep); + if (strcmp(attr, "yx_steep") == 0) return mp_obj_new_int(data->yx_steep); + if (strcmp(attr, "steep") == 0) return mp_obj_new_int(data->steep); + if (strcmp(attr, "spx") == 0) return mp_obj_new_int(data->spx); + if (strcmp(attr, "flat") == 0) return mp_obj_new_int_from_uint(data->flat); + if (strcmp(attr, "inv") == 0) return mp_obj_new_int_from_uint(data->inv); + for (PyMethodDef *m = py_lv_draw_sw_mask_line_param_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_font_glyph_dsc_t_field_names[] = {"resolved_font", "adv_w", "box_w", "box_h", "ofs_x", "ofs_y", "stride", "format", "is_placeholder", "req_raw_bitmap", "outline_stroke_width", "gid", "entry", NULL}; +static const char *const py_lv_draw_sw_mask_line_param_t_field_names[] = {"dsc", "cfg", "origo", "xy_steep", "yx_steep", "steep", "spx", "flat", "inv", NULL}; -static PyObject *py_lv_font_glyph_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_line_param_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_font_glyph_dsc_t_field_names, py_lv_font_glyph_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_line_param_t_field_names, py_lv_draw_sw_mask_line_param_t_methods); } -static PyMethodDef py_lv_font_glyph_dsc_t_type_methods[] = { - {"__dir__", py_lv_font_glyph_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_line_param_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_line_param_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_font_glyph_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_line_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)inst->data; + lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -54879,147 +66788,141 @@ static int py_lv_font_glyph_dsc_t_setattro(PyObject *self, PyObject *name, PyObj const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_font_glyph_dsc_t saved; + lv_draw_sw_mask_line_param_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "resolved_font") == 0) { data->resolved_font = (void*)mp_write_ptr_lv_font_t(value); result = 0; } - if (strcmp(attr, "adv_w") == 0) { data->adv_w = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "box_w") == 0) { data->box_w = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "box_h") == 0) { data->box_h = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ofs_x") == 0) { data->ofs_x = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ofs_y") == 0) { data->ofs_y = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "stride") == 0) { data->stride = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "format") == 0) { data->format = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "is_placeholder") == 0) { data->is_placeholder = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "req_raw_bitmap") == 0) { data->req_raw_bitmap = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "gid") == 0) { data->gid = mp_write_lv_font_glyph_dsc_gid_t(value); result = 0; } - if (strcmp(attr, "entry") == 0) { data->entry = (void*)mp_write_ptr_lv_cache_entry_t(value); result = 0; } + if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } + if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_line_param_cfg_t(value); result = 0; } + if (strcmp(attr, "origo") == 0) { data->origo = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "xy_steep") == 0) { data->xy_steep = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "yx_steep") == 0) { data->yx_steep = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "steep") == 0) { data->steep = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "spx") == 0) { data->spx = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "flat") == 0) { data->flat = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "inv") == 0) { data->inv = (uint8_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_font_glyph_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_line_param_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_font_glyph_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_line_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_font_glyph_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_line_param_t)); } -static void py_lv_font_glyph_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_line_param_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_font_glyph_dsc_t_type = { +PyTypeObject py_lv_draw_sw_mask_line_param_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_font_glyph_dsc_t", + .tp_name = "lvgl.lv_draw_sw_mask_line_param_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_font_glyph_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_font_glyph_dsc_t_getattro, - .tp_setattro = (setter)py_lv_font_glyph_dsc_t_setattro, - .tp_new = py_lv_font_glyph_dsc_t_new, - .tp_methods = py_lv_font_glyph_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_line_param_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_line_param_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_line_param_t_setattro, + .tp_new = py_lv_draw_sw_mask_line_param_t_new, + .tp_methods = py_lv_draw_sw_mask_line_param_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_font_glyph_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_font_glyph_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_line_param_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_font_glyph_dsc_t*)self->data; + return (lv_draw_sw_mask_line_param_t*)self->data; } -static lv_font_glyph_dsc_t mp_write_scratch_lv_font_glyph_dsc_t; +static lv_draw_sw_mask_line_param_t mp_write_scratch_lv_draw_sw_mask_line_param_t; -static inline void* mp_write_value_ptr_lv_font_glyph_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_line_param_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_glyph_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_line_param_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_font_glyph_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_glyph_dsc_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_line_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_line_param_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_font_glyph_dsc_t; + return &mp_write_scratch_lv_draw_sw_mask_line_param_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_font_glyph_dsc_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_line_param_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_glyph_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_t or dict, got None"); } - memset(&mp_write_scratch_lv_font_glyph_dsc_t, 0, sizeof(lv_font_glyph_dsc_t)); - return &mp_write_scratch_lv_font_glyph_dsc_t; + memset(&mp_write_scratch_lv_draw_sw_mask_line_param_t, 0, sizeof(lv_draw_sw_mask_line_param_t)); + return &mp_write_scratch_lv_draw_sw_mask_line_param_t; } -#define mp_write_lv_font_glyph_dsc_t(struct_obj) (*((lv_font_glyph_dsc_t*)mp_write_value_ptr_lv_font_glyph_dsc_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_line_param_t(struct_obj) (*((lv_draw_sw_mask_line_param_t*)mp_write_value_ptr_lv_draw_sw_mask_line_param_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_font_glyph_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_line_param_t(void *field) { - return lv_to_mp_struct(&py_lv_font_glyph_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_line_param_t_type, field); } -#define mp_read_lv_font_glyph_dsc_t(field) lv_to_mp_struct_own(&py_lv_font_glyph_dsc_t_type, copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) -#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_line_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_line_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_t))) +#define mp_read_byref_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(&field) +typedef __typeof__( ((lv_draw_sw_mask_angle_param_t*)(0))->cfg ) lv_draw_sw_mask_angle_param_cfg_t; /* - * Struct lv_font_info_t (CPython) + * Struct lv_draw_sw_mask_angle_param_cfg_t (CPython) */ -extern PyMethodDef py_lv_font_info_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_angle_param_cfg_t_methods[]; -static PyObject *py_lv_font_info_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_angle_param_cfg_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_info_t *data = (lv_font_info_t*)inst->data; + lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); - if (strcmp(attr, "class_p") == 0) return mp_read_ptr_lv_font_class_t((void*)data->class_p); - if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); - if (strcmp(attr, "render_mode") == 0) return mp_obj_new_int_from_uint(data->render_mode); - if (strcmp(attr, "style") == 0) return mp_obj_new_int_from_uint(data->style); - if (strcmp(attr, "kerning") == 0) return mp_obj_new_int(data->kerning); - for (PyMethodDef *m = py_lv_font_info_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "vertex_p") == 0) return mp_read_byref_lv_point_t(data->vertex_p); + if (strcmp(attr, "start_angle") == 0) return mp_obj_new_int(data->start_angle); + if (strcmp(attr, "end_angle") == 0) return mp_obj_new_int(data->end_angle); + for (PyMethodDef *m = py_lv_draw_sw_mask_angle_param_cfg_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_font_info_t_field_names[] = {"name", "class_p", "size", "render_mode", "style", "kerning", NULL}; +static const char *const py_lv_draw_sw_mask_angle_param_cfg_t_field_names[] = {"vertex_p", "start_angle", "end_angle", NULL}; -static PyObject *py_lv_font_info_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_angle_param_cfg_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_font_info_t_field_names, py_lv_font_info_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_angle_param_cfg_t_field_names, py_lv_draw_sw_mask_angle_param_cfg_t_methods); } -static PyMethodDef py_lv_font_info_t_type_methods[] = { - {"__dir__", py_lv_font_info_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_angle_param_cfg_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_angle_param_cfg_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_font_info_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_angle_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_info_t *data = (lv_font_info_t*)inst->data; + lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -55027,158 +66930,136 @@ static int py_lv_font_info_t_setattro(PyObject *self, PyObject *name, PyObject * const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_font_info_t saved; + lv_draw_sw_mask_angle_param_cfg_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } - if (strcmp(attr, "class_p") == 0) { data->class_p = (void*)mp_write_ptr_lv_font_class_t(value); result = 0; } - if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "render_mode") == 0) { data->render_mode = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "style") == 0) { data->style = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "kerning") == 0) { data->kerning = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "vertex_p") == 0) { data->vertex_p = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "start_angle") == 0) { data->start_angle = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "end_angle") == 0) { data->end_angle = (int32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_font_info_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_angle_param_cfg_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_font_info_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_angle_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_font_info_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_angle_param_cfg_t)); } -static void py_lv_font_info_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_angle_param_cfg_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_font_info_t_type = { +PyTypeObject py_lv_draw_sw_mask_angle_param_cfg_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_font_info_t", + .tp_name = "lvgl.lv_draw_sw_mask_angle_param_cfg_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_font_info_t_dealloc, - .tp_getattro = (getter)py_lv_font_info_t_getattro, - .tp_setattro = (setter)py_lv_font_info_t_setattro, - .tp_new = py_lv_font_info_t_new, - .tp_methods = py_lv_font_info_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_angle_param_cfg_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_angle_param_cfg_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_angle_param_cfg_t_setattro, + .tp_new = py_lv_draw_sw_mask_angle_param_cfg_t_new, + .tp_methods = py_lv_draw_sw_mask_angle_param_cfg_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_font_info_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_font_info_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_info_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_angle_param_cfg_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_font_info_t*)self->data; + return (lv_draw_sw_mask_angle_param_cfg_t*)self->data; } -static lv_font_info_t mp_write_scratch_lv_font_info_t; +static lv_draw_sw_mask_angle_param_cfg_t mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t; -static inline void* mp_write_value_ptr_lv_font_info_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_angle_param_cfg_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_info_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_angle_param_cfg_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_font_info_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_info_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_angle_param_cfg_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_font_info_t; + return &mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_font_info_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_info_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_cfg_t or dict, got None"); } - memset(&mp_write_scratch_lv_font_info_t, 0, sizeof(lv_font_info_t)); - return &mp_write_scratch_lv_font_info_t; + memset(&mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t, 0, sizeof(lv_draw_sw_mask_angle_param_cfg_t)); + return &mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t; } -#define mp_write_lv_font_info_t(struct_obj) (*((lv_font_info_t*)mp_write_value_ptr_lv_font_info_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_angle_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_angle_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_angle_param_cfg_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_font_info_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(void *field) { - return lv_to_mp_struct(&py_lv_font_info_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_angle_param_cfg_t_type, field); } -#define mp_read_lv_font_info_t(field) lv_to_mp_struct_own(&py_lv_font_info_t_type, copy_buffer(&field, sizeof(lv_font_info_t))) -#define mp_read_byref_lv_font_info_t(field) mp_read_ptr_lv_font_info_t(&field) - -#define funcptr_lv_layout_update_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_layout_update_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_layout_callbacks_t_layout_update_cb' - * lv_layout_update_cb_t layout_update_cb - */ - -#define funcptr_lv_layout_get_min_size_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_layout_get_min_size_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - +#define mp_read_lv_draw_sw_mask_angle_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_angle_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_layout_callbacks_t_get_min_size_cb' - * lv_layout_get_min_size_cb_t get_min_size_cb - */ - /* - * Struct lv_layout_callbacks_t (CPython) + * Struct lv_draw_sw_mask_angle_param_t (CPython) */ -extern PyMethodDef py_lv_layout_callbacks_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_angle_param_t_methods[]; -static PyObject *py_lv_layout_callbacks_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_angle_param_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)inst->data; + lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "layout_update_cb") == 0) return mp_lv_funcptr(NULL, data->layout_update_cb, NULL, "lv_layout_callbacks_t_layout_update_cb", NULL); - if (strcmp(attr, "get_min_size_cb") == 0) return mp_lv_funcptr(NULL, data->get_min_size_cb, NULL, "lv_layout_callbacks_t_get_min_size_cb", NULL); - for (PyMethodDef *m = py_lv_layout_callbacks_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); + if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(data->cfg); + if (strcmp(attr, "start_line") == 0) return mp_read_byref_lv_draw_sw_mask_line_param_t(data->start_line); + if (strcmp(attr, "end_line") == 0) return mp_read_byref_lv_draw_sw_mask_line_param_t(data->end_line); + if (strcmp(attr, "delta_deg") == 0) return mp_obj_new_int_from_uint(data->delta_deg); + for (PyMethodDef *m = py_lv_draw_sw_mask_angle_param_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_layout_callbacks_t_field_names[] = {"layout_update_cb", "get_min_size_cb", NULL}; +static const char *const py_lv_draw_sw_mask_angle_param_t_field_names[] = {"dsc", "cfg", "start_line", "end_line", "delta_deg", NULL}; -static PyObject *py_lv_layout_callbacks_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_angle_param_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_layout_callbacks_t_field_names, py_lv_layout_callbacks_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_angle_param_t_field_names, py_lv_draw_sw_mask_angle_param_t_methods); } -static PyMethodDef py_lv_layout_callbacks_t_type_methods[] = { - {"__dir__", py_lv_layout_callbacks_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_angle_param_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_angle_param_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_layout_callbacks_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_angle_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_layout_callbacks_t *data = (lv_layout_callbacks_t*)inst->data; + lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -55186,131 +67067,137 @@ static int py_lv_layout_callbacks_t_setattro(PyObject *self, PyObject *name, PyO const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_layout_callbacks_t saved; + lv_draw_sw_mask_angle_param_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "layout_update_cb") == 0) { data->layout_update_cb = mp_lv_callback(value, NULL, "lv_layout_callbacks_t_layout_update_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "get_min_size_cb") == 0) { data->get_min_size_cb = mp_lv_callback(value, NULL, "lv_layout_callbacks_t_get_min_size_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } + if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_angle_param_cfg_t(value); result = 0; } + if (strcmp(attr, "start_line") == 0) { data->start_line = mp_write_lv_draw_sw_mask_line_param_t(value); result = 0; } + if (strcmp(attr, "end_line") == 0) { data->end_line = mp_write_lv_draw_sw_mask_line_param_t(value); result = 0; } + if (strcmp(attr, "delta_deg") == 0) { data->delta_deg = (uint16_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_layout_callbacks_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_angle_param_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_layout_callbacks_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_angle_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_layout_callbacks_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_angle_param_t)); } -static void py_lv_layout_callbacks_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_angle_param_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_layout_callbacks_t_type = { +PyTypeObject py_lv_draw_sw_mask_angle_param_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_layout_callbacks_t", + .tp_name = "lvgl.lv_draw_sw_mask_angle_param_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_layout_callbacks_t_dealloc, - .tp_getattro = (getter)py_lv_layout_callbacks_t_getattro, - .tp_setattro = (setter)py_lv_layout_callbacks_t_setattro, - .tp_new = py_lv_layout_callbacks_t_new, - .tp_methods = py_lv_layout_callbacks_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_angle_param_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_angle_param_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_angle_param_t_setattro, + .tp_new = py_lv_draw_sw_mask_angle_param_t_new, + .tp_methods = py_lv_draw_sw_mask_angle_param_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_layout_callbacks_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_layout_callbacks_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_layout_callbacks_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_angle_param_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_layout_callbacks_t*)self->data; + return (lv_draw_sw_mask_angle_param_t*)self->data; } -static lv_layout_callbacks_t mp_write_scratch_lv_layout_callbacks_t; +static lv_draw_sw_mask_angle_param_t mp_write_scratch_lv_draw_sw_mask_angle_param_t; -static inline void* mp_write_value_ptr_lv_layout_callbacks_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_angle_param_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_layout_callbacks_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_angle_param_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_layout_callbacks_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_layout_callbacks_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_angle_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_angle_param_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_layout_callbacks_t; + return &mp_write_scratch_lv_draw_sw_mask_angle_param_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_layout_callbacks_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_angle_param_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_layout_callbacks_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_t or dict, got None"); } - memset(&mp_write_scratch_lv_layout_callbacks_t, 0, sizeof(lv_layout_callbacks_t)); - return &mp_write_scratch_lv_layout_callbacks_t; + memset(&mp_write_scratch_lv_draw_sw_mask_angle_param_t, 0, sizeof(lv_draw_sw_mask_angle_param_t)); + return &mp_write_scratch_lv_draw_sw_mask_angle_param_t; } -#define mp_write_lv_layout_callbacks_t(struct_obj) (*((lv_layout_callbacks_t*)mp_write_value_ptr_lv_layout_callbacks_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_angle_param_t(struct_obj) (*((lv_draw_sw_mask_angle_param_t*)mp_write_value_ptr_lv_draw_sw_mask_angle_param_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_layout_callbacks_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_angle_param_t(void *field) { - return lv_to_mp_struct(&py_lv_layout_callbacks_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_angle_param_t_type, field); } -#define mp_read_lv_layout_callbacks_t(field) lv_to_mp_struct_own(&py_lv_layout_callbacks_t_type, copy_buffer(&field, sizeof(lv_layout_callbacks_t))) -#define mp_read_byref_lv_layout_callbacks_t(field) mp_read_ptr_lv_layout_callbacks_t(&field) +#define mp_read_lv_draw_sw_mask_angle_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_angle_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_t))) +#define mp_read_byref_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(&field) +typedef __typeof__( ((lv_draw_sw_mask_radius_param_t*)(0))->cfg ) lv_draw_sw_mask_radius_param_cfg_t; /* - * Struct lv_fs_path_ex_t (CPython) + * Struct lv_draw_sw_mask_radius_param_cfg_t (CPython) */ -extern PyMethodDef py_lv_fs_path_ex_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_radius_param_cfg_t_methods[]; -static PyObject *py_lv_fs_path_ex_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_radius_param_cfg_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)inst->data; + lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "path") == 0) return ptr_to_mp(data->path); - for (PyMethodDef *m = py_lv_fs_path_ex_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "rect") == 0) return mp_read_byref_lv_area_t(data->rect); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); + if (strcmp(attr, "outer") == 0) return mp_obj_new_int_from_uint(data->outer); + for (PyMethodDef *m = py_lv_draw_sw_mask_radius_param_cfg_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_fs_path_ex_t_field_names[] = {"path", NULL}; +static const char *const py_lv_draw_sw_mask_radius_param_cfg_t_field_names[] = {"rect", "radius", "outer", NULL}; -static PyObject *py_lv_fs_path_ex_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_radius_param_cfg_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_fs_path_ex_t_field_names, py_lv_fs_path_ex_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_radius_param_cfg_t_field_names, py_lv_draw_sw_mask_radius_param_cfg_t_methods); } -static PyMethodDef py_lv_fs_path_ex_t_type_methods[] = { - {"__dir__", py_lv_fs_path_ex_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_radius_param_cfg_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_radius_param_cfg_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_fs_path_ex_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_radius_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_path_ex_t *data = (lv_fs_path_ex_t*)inst->data; + lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -55318,131 +67205,138 @@ static int py_lv_fs_path_ex_t_setattro(PyObject *self, PyObject *name, PyObject const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_fs_path_ex_t saved; + lv_draw_sw_mask_radius_param_cfg_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "path") == 0) { memcpy((void*)&data->path, mp_to_ptr(value), sizeof(char)*64); result = 0; } + if (strcmp(attr, "rect") == 0) { data->rect = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "outer") == 0) { data->outer = (uint8_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_fs_path_ex_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_radius_param_cfg_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_fs_path_ex_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_radius_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_path_ex_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_radius_param_cfg_t)); } -static void py_lv_fs_path_ex_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_radius_param_cfg_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_fs_path_ex_t_type = { +PyTypeObject py_lv_draw_sw_mask_radius_param_cfg_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_fs_path_ex_t", + .tp_name = "lvgl.lv_draw_sw_mask_radius_param_cfg_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_fs_path_ex_t_dealloc, - .tp_getattro = (getter)py_lv_fs_path_ex_t_getattro, - .tp_setattro = (setter)py_lv_fs_path_ex_t_setattro, - .tp_new = py_lv_fs_path_ex_t_new, - .tp_methods = py_lv_fs_path_ex_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_radius_param_cfg_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_radius_param_cfg_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_radius_param_cfg_t_setattro, + .tp_new = py_lv_draw_sw_mask_radius_param_cfg_t_new, + .tp_methods = py_lv_draw_sw_mask_radius_param_cfg_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_fs_path_ex_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_fs_path_ex_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_path_ex_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_radius_param_cfg_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_fs_path_ex_t*)self->data; + return (lv_draw_sw_mask_radius_param_cfg_t*)self->data; } -static lv_fs_path_ex_t mp_write_scratch_lv_fs_path_ex_t; +static lv_draw_sw_mask_radius_param_cfg_t mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t; -static inline void* mp_write_value_ptr_lv_fs_path_ex_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_radius_param_cfg_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_path_ex_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_radius_param_cfg_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_fs_path_ex_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_path_ex_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_radius_param_cfg_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_fs_path_ex_t; + return &mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_fs_path_ex_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_path_ex_t or dict, got None"); - } - memset(&mp_write_scratch_lv_fs_path_ex_t, 0, sizeof(lv_fs_path_ex_t)); - return &mp_write_scratch_lv_fs_path_ex_t; + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_cfg_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t, 0, sizeof(lv_draw_sw_mask_radius_param_cfg_t)); + return &mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t; } -#define mp_write_lv_fs_path_ex_t(struct_obj) (*((lv_fs_path_ex_t*)mp_write_value_ptr_lv_fs_path_ex_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_radius_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_radius_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_radius_param_cfg_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_fs_path_ex_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(void *field) { - return lv_to_mp_struct(&py_lv_fs_path_ex_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_radius_param_cfg_t_type, field); } -#define mp_read_lv_fs_path_ex_t(field) lv_to_mp_struct_own(&py_lv_fs_path_ex_t_type, copy_buffer(&field, sizeof(lv_fs_path_ex_t))) -#define mp_read_byref_lv_fs_path_ex_t(field) mp_read_ptr_lv_fs_path_ex_t(&field) +#define mp_read_lv_draw_sw_mask_radius_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_radius_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(&field) /* - * Struct lv_fs_dir_t (CPython) + * Struct lv_draw_sw_mask_radius_circle_dsc_t (CPython) */ -extern PyMethodDef py_lv_fs_dir_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_radius_circle_dsc_t_methods[]; -static PyObject *py_lv_fs_dir_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_radius_circle_dsc_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_dir_t *data = (lv_fs_dir_t*)inst->data; + lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "dir_d") == 0) return ptr_to_mp((void*)data->dir_d); - if (strcmp(attr, "drv") == 0) return mp_read_ptr_lv_fs_drv_t((void*)data->drv); - for (PyMethodDef *m = py_lv_fs_dir_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "buf") == 0) return mp_array_from_u8ptr((void*)data->buf); + if (strcmp(attr, "cir_opa") == 0) return mp_array_from_u8ptr((void*)data->cir_opa); + if (strcmp(attr, "x_start_on_y") == 0) return mp_array_from_u16ptr((void*)data->x_start_on_y); + if (strcmp(attr, "opa_start_on_y") == 0) return mp_array_from_u16ptr((void*)data->opa_start_on_y); + if (strcmp(attr, "life") == 0) return mp_obj_new_int(data->life); + if (strcmp(attr, "used_cnt") == 0) return mp_obj_new_int_from_uint(data->used_cnt); + if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); + for (PyMethodDef *m = py_lv_draw_sw_mask_radius_circle_dsc_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_fs_dir_t_field_names[] = {"dir_d", "drv", NULL}; +static const char *const py_lv_draw_sw_mask_radius_circle_dsc_t_field_names[] = {"buf", "cir_opa", "x_start_on_y", "opa_start_on_y", "life", "used_cnt", "radius", NULL}; -static PyObject *py_lv_fs_dir_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_radius_circle_dsc_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_fs_dir_t_field_names, py_lv_fs_dir_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_radius_circle_dsc_t_field_names, py_lv_draw_sw_mask_radius_circle_dsc_t_methods); } -static PyMethodDef py_lv_fs_dir_t_type_methods[] = { - {"__dir__", py_lv_fs_dir_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_radius_circle_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_radius_circle_dsc_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_fs_dir_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_radius_circle_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_fs_dir_t *data = (lv_fs_dir_t*)inst->data; + lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -55450,135 +67344,138 @@ static int py_lv_fs_dir_t_setattro(PyObject *self, PyObject *name, PyObject *val const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_fs_dir_t saved; + lv_draw_sw_mask_radius_circle_dsc_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dir_d") == 0) { data->dir_d = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "drv") == 0) { data->drv = (void*)mp_write_ptr_lv_fs_drv_t(value); result = 0; } + if (strcmp(attr, "buf") == 0) { data->buf = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "cir_opa") == 0) { data->cir_opa = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "x_start_on_y") == 0) { data->x_start_on_y = (void*)mp_array_to_u16ptr(value); result = 0; } + if (strcmp(attr, "opa_start_on_y") == 0) { data->opa_start_on_y = (void*)mp_array_to_u16ptr(value); result = 0; } + if (strcmp(attr, "life") == 0) { data->life = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "used_cnt") == 0) { data->used_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_fs_dir_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_radius_circle_dsc_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_fs_dir_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_radius_circle_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_fs_dir_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_radius_circle_dsc_t)); } -static void py_lv_fs_dir_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_radius_circle_dsc_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_fs_dir_t_type = { +PyTypeObject py_lv_draw_sw_mask_radius_circle_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_fs_dir_t", + .tp_name = "lvgl.lv_draw_sw_mask_radius_circle_dsc_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_fs_dir_t_dealloc, - .tp_getattro = (getter)py_lv_fs_dir_t_getattro, - .tp_setattro = (setter)py_lv_fs_dir_t_setattro, - .tp_new = py_lv_fs_dir_t_new, - .tp_methods = py_lv_fs_dir_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_radius_circle_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_radius_circle_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_radius_circle_dsc_t_setattro, + .tp_new = py_lv_draw_sw_mask_radius_circle_dsc_t_new, + .tp_methods = py_lv_draw_sw_mask_radius_circle_dsc_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_fs_dir_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_fs_dir_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_fs_dir_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_radius_circle_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_circle_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_fs_dir_t*)self->data; + return (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; } -static lv_fs_dir_t mp_write_scratch_lv_fs_dir_t; +static lv_draw_sw_mask_radius_circle_dsc_t mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t; -static inline void* mp_write_value_ptr_lv_fs_dir_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_radius_circle_dsc_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_fs_dir_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_radius_circle_dsc_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_fs_dir_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_fs_dir_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_radius_circle_dsc_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_fs_dir_t; + return &mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_fs_dir_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_fs_dir_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_circle_dsc_t or dict, got None"); } - memset(&mp_write_scratch_lv_fs_dir_t, 0, sizeof(lv_fs_dir_t)); - return &mp_write_scratch_lv_fs_dir_t; + memset(&mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t, 0, sizeof(lv_draw_sw_mask_radius_circle_dsc_t)); + return &mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t; } -#define mp_write_lv_fs_dir_t(struct_obj) (*((lv_fs_dir_t*)mp_write_value_ptr_lv_fs_dir_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj) (*((lv_draw_sw_mask_radius_circle_dsc_t*)mp_write_value_ptr_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_fs_dir_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(void *field) { - return lv_to_mp_struct(&py_lv_fs_dir_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_radius_circle_dsc_t_type, field); } -#define mp_read_lv_fs_dir_t(field) lv_to_mp_struct_own(&py_lv_fs_dir_t_type, copy_buffer(&field, sizeof(lv_fs_dir_t))) -#define mp_read_byref_lv_fs_dir_t(field) mp_read_ptr_lv_fs_dir_t(&field) +#define mp_read_lv_draw_sw_mask_radius_circle_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_radius_circle_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_circle_dsc_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(&field) /* - * Struct lv_draw_fill_dsc_t (CPython) + * Struct lv_draw_sw_mask_radius_param_t (CPython) */ -extern PyMethodDef py_lv_draw_fill_dsc_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_radius_param_t_methods[]; -static PyObject *py_lv_draw_fill_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_radius_param_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)inst->data; + lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "grad") == 0) return mp_read_byref_lv_grad_dsc_t(data->grad); - for (PyMethodDef *m = py_lv_draw_fill_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); + if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(data->cfg); + if (strcmp(attr, "circle") == 0) return mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t((void*)data->circle); + for (PyMethodDef *m = py_lv_draw_sw_mask_radius_param_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_fill_dsc_t_field_names[] = {"base", "radius", "opa", "color", "grad", NULL}; +static const char *const py_lv_draw_sw_mask_radius_param_t_field_names[] = {"dsc", "cfg", "circle", NULL}; -static PyObject *py_lv_draw_fill_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_radius_param_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_fill_dsc_t_field_names, py_lv_draw_fill_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_radius_param_t_field_names, py_lv_draw_sw_mask_radius_param_t_methods); } -static PyMethodDef py_lv_draw_fill_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_fill_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_radius_param_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_radius_param_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_fill_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_radius_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_fill_dsc_t *data = (lv_draw_fill_dsc_t*)inst->data; + lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -55586,139 +67483,137 @@ static int py_lv_draw_fill_dsc_t_setattro(PyObject *self, PyObject *name, PyObje const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_fill_dsc_t saved; + lv_draw_sw_mask_radius_param_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "grad") == 0) { data->grad = mp_write_lv_grad_dsc_t(value); result = 0; } + if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } + if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_radius_param_cfg_t(value); result = 0; } + if (strcmp(attr, "circle") == 0) { data->circle = (void*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_fill_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_radius_param_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_fill_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_radius_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_fill_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_radius_param_t)); } -static void py_lv_draw_fill_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_radius_param_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_fill_dsc_t_type = { +PyTypeObject py_lv_draw_sw_mask_radius_param_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_fill_dsc_t", + .tp_name = "lvgl.lv_draw_sw_mask_radius_param_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_fill_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_fill_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_fill_dsc_t_setattro, - .tp_new = py_lv_draw_fill_dsc_t_new, - .tp_methods = py_lv_draw_fill_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_radius_param_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_radius_param_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_radius_param_t_setattro, + .tp_new = py_lv_draw_sw_mask_radius_param_t_new, + .tp_methods = py_lv_draw_sw_mask_radius_param_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_fill_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_fill_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_fill_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_radius_param_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_fill_dsc_t*)self->data; + return (lv_draw_sw_mask_radius_param_t*)self->data; } -static lv_draw_fill_dsc_t mp_write_scratch_lv_draw_fill_dsc_t; +static lv_draw_sw_mask_radius_param_t mp_write_scratch_lv_draw_sw_mask_radius_param_t; -static inline void* mp_write_value_ptr_lv_draw_fill_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_radius_param_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_fill_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_radius_param_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_fill_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_fill_dsc_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_radius_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_radius_param_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_fill_dsc_t; + return &mp_write_scratch_lv_draw_sw_mask_radius_param_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_fill_dsc_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_radius_param_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_fill_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_fill_dsc_t, 0, sizeof(lv_draw_fill_dsc_t)); - return &mp_write_scratch_lv_draw_fill_dsc_t; + memset(&mp_write_scratch_lv_draw_sw_mask_radius_param_t, 0, sizeof(lv_draw_sw_mask_radius_param_t)); + return &mp_write_scratch_lv_draw_sw_mask_radius_param_t; } -#define mp_write_lv_draw_fill_dsc_t(struct_obj) (*((lv_draw_fill_dsc_t*)mp_write_value_ptr_lv_draw_fill_dsc_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_radius_param_t(struct_obj) (*((lv_draw_sw_mask_radius_param_t*)mp_write_value_ptr_lv_draw_sw_mask_radius_param_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_fill_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_radius_param_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_fill_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_radius_param_t_type, field); } -#define mp_read_lv_draw_fill_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_fill_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_fill_dsc_t))) -#define mp_read_byref_lv_draw_fill_dsc_t(field) mp_read_ptr_lv_draw_fill_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_radius_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_radius_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_t))) +#define mp_read_byref_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(&field) +typedef __typeof__( ((lv_draw_sw_mask_fade_param_t*)(0))->cfg ) lv_draw_sw_mask_fade_param_cfg_t; /* - * Struct lv_draw_border_dsc_t (CPython) + * Struct lv_draw_sw_mask_fade_param_cfg_t (CPython) */ -extern PyMethodDef py_lv_draw_border_dsc_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_fade_param_cfg_t_methods[]; -static PyObject *py_lv_draw_border_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_fade_param_cfg_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)inst->data; + lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "side") == 0) return mp_obj_new_int(data->side); - for (PyMethodDef *m = py_lv_draw_border_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "coords") == 0) return mp_read_byref_lv_area_t(data->coords); + if (strcmp(attr, "y_top") == 0) return mp_obj_new_int(data->y_top); + if (strcmp(attr, "y_bottom") == 0) return mp_obj_new_int(data->y_bottom); + if (strcmp(attr, "opa_top") == 0) return mp_obj_new_int_from_uint(data->opa_top); + if (strcmp(attr, "opa_bottom") == 0) return mp_obj_new_int_from_uint(data->opa_bottom); + for (PyMethodDef *m = py_lv_draw_sw_mask_fade_param_cfg_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_border_dsc_t_field_names[] = {"base", "radius", "color", "width", "opa", "side", NULL}; +static const char *const py_lv_draw_sw_mask_fade_param_cfg_t_field_names[] = {"coords", "y_top", "y_bottom", "opa_top", "opa_bottom", NULL}; -static PyObject *py_lv_draw_border_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_fade_param_cfg_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_border_dsc_t_field_names, py_lv_draw_border_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_fade_param_cfg_t_field_names, py_lv_draw_sw_mask_fade_param_cfg_t_methods); } -static PyMethodDef py_lv_draw_border_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_border_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_fade_param_cfg_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_fade_param_cfg_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_border_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_fade_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_border_dsc_t *data = (lv_draw_border_dsc_t*)inst->data; + lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -55726,143 +67621,135 @@ static int py_lv_draw_border_dsc_t_setattro(PyObject *self, PyObject *name, PyOb const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_border_dsc_t saved; + lv_draw_sw_mask_fade_param_cfg_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "side") == 0) { data->side = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "coords") == 0) { data->coords = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "y_top") == 0) { data->y_top = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y_bottom") == 0) { data->y_bottom = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa_top") == 0) { data->opa_top = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa_bottom") == 0) { data->opa_bottom = (uint8_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_border_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_fade_param_cfg_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_border_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_fade_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_border_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_fade_param_cfg_t)); } -static void py_lv_draw_border_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_fade_param_cfg_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_border_dsc_t_type = { +PyTypeObject py_lv_draw_sw_mask_fade_param_cfg_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_border_dsc_t", + .tp_name = "lvgl.lv_draw_sw_mask_fade_param_cfg_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_border_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_border_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_border_dsc_t_setattro, - .tp_new = py_lv_draw_border_dsc_t_new, - .tp_methods = py_lv_draw_border_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_fade_param_cfg_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_fade_param_cfg_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_fade_param_cfg_t_setattro, + .tp_new = py_lv_draw_sw_mask_fade_param_cfg_t_new, + .tp_methods = py_lv_draw_sw_mask_fade_param_cfg_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_border_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_border_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_border_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_fade_param_cfg_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_border_dsc_t*)self->data; + return (lv_draw_sw_mask_fade_param_cfg_t*)self->data; } -static lv_draw_border_dsc_t mp_write_scratch_lv_draw_border_dsc_t; +static lv_draw_sw_mask_fade_param_cfg_t mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t; -static inline void* mp_write_value_ptr_lv_draw_border_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_fade_param_cfg_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_border_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_fade_param_cfg_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_border_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_border_dsc_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_fade_param_cfg_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_border_dsc_t; + return &mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_border_dsc_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_border_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_cfg_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_border_dsc_t, 0, sizeof(lv_draw_border_dsc_t)); - return &mp_write_scratch_lv_draw_border_dsc_t; + memset(&mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t, 0, sizeof(lv_draw_sw_mask_fade_param_cfg_t)); + return &mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t; } -#define mp_write_lv_draw_border_dsc_t(struct_obj) (*((lv_draw_border_dsc_t*)mp_write_value_ptr_lv_draw_border_dsc_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_fade_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_fade_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_fade_param_cfg_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_border_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_border_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_fade_param_cfg_t_type, field); } -#define mp_read_lv_draw_border_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_border_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_border_dsc_t))) -#define mp_read_byref_lv_draw_border_dsc_t(field) mp_read_ptr_lv_draw_border_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_fade_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_fade_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(&field) /* - * Struct lv_draw_box_shadow_dsc_t (CPython) + * Struct lv_draw_sw_mask_fade_param_t (CPython) */ -extern PyMethodDef py_lv_draw_box_shadow_dsc_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_fade_param_t_methods[]; -static PyObject *py_lv_draw_box_shadow_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_fade_param_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)inst->data; + lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "width") == 0) return mp_obj_new_int(data->width); - if (strcmp(attr, "spread") == 0) return mp_obj_new_int(data->spread); - if (strcmp(attr, "ofs_x") == 0) return mp_obj_new_int(data->ofs_x); - if (strcmp(attr, "ofs_y") == 0) return mp_obj_new_int(data->ofs_y); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "bg_cover") == 0) return mp_obj_new_int_from_uint(data->bg_cover); - for (PyMethodDef *m = py_lv_draw_box_shadow_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); + if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(data->cfg); + for (PyMethodDef *m = py_lv_draw_sw_mask_fade_param_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_box_shadow_dsc_t_field_names[] = {"base", "radius", "color", "width", "spread", "ofs_x", "ofs_y", "opa", "bg_cover", NULL}; +static const char *const py_lv_draw_sw_mask_fade_param_t_field_names[] = {"dsc", "cfg", NULL}; -static PyObject *py_lv_draw_box_shadow_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_fade_param_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_box_shadow_dsc_t_field_names, py_lv_draw_box_shadow_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_fade_param_t_field_names, py_lv_draw_sw_mask_fade_param_t_methods); } -static PyMethodDef py_lv_draw_box_shadow_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_box_shadow_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_fade_param_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_fade_param_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_box_shadow_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_fade_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_box_shadow_dsc_t *data = (lv_draw_box_shadow_dsc_t*)inst->data; + lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -55870,153 +67757,133 @@ static int py_lv_draw_box_shadow_dsc_t_setattro(PyObject *self, PyObject *name, const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_box_shadow_dsc_t saved; + lv_draw_sw_mask_fade_param_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "width") == 0) { data->width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "spread") == 0) { data->spread = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ofs_x") == 0) { data->ofs_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ofs_y") == 0) { data->ofs_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "bg_cover") == 0) { data->bg_cover = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } + if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_fade_param_cfg_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_box_shadow_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_fade_param_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_box_shadow_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_fade_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_box_shadow_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_fade_param_t)); } -static void py_lv_draw_box_shadow_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_fade_param_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_box_shadow_dsc_t_type = { +PyTypeObject py_lv_draw_sw_mask_fade_param_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_box_shadow_dsc_t", + .tp_name = "lvgl.lv_draw_sw_mask_fade_param_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_box_shadow_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_box_shadow_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_box_shadow_dsc_t_setattro, - .tp_new = py_lv_draw_box_shadow_dsc_t_new, - .tp_methods = py_lv_draw_box_shadow_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_fade_param_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_fade_param_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_fade_param_t_setattro, + .tp_new = py_lv_draw_sw_mask_fade_param_t_new, + .tp_methods = py_lv_draw_sw_mask_fade_param_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_box_shadow_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_box_shadow_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_box_shadow_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_fade_param_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_box_shadow_dsc_t*)self->data; + return (lv_draw_sw_mask_fade_param_t*)self->data; } -static lv_draw_box_shadow_dsc_t mp_write_scratch_lv_draw_box_shadow_dsc_t; +static lv_draw_sw_mask_fade_param_t mp_write_scratch_lv_draw_sw_mask_fade_param_t; -static inline void* mp_write_value_ptr_lv_draw_box_shadow_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_fade_param_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_box_shadow_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_fade_param_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_box_shadow_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_box_shadow_dsc_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_fade_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_fade_param_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_box_shadow_dsc_t; + return &mp_write_scratch_lv_draw_sw_mask_fade_param_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_box_shadow_dsc_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_fade_param_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_box_shadow_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_box_shadow_dsc_t, 0, sizeof(lv_draw_box_shadow_dsc_t)); - return &mp_write_scratch_lv_draw_box_shadow_dsc_t; + memset(&mp_write_scratch_lv_draw_sw_mask_fade_param_t, 0, sizeof(lv_draw_sw_mask_fade_param_t)); + return &mp_write_scratch_lv_draw_sw_mask_fade_param_t; } -#define mp_write_lv_draw_box_shadow_dsc_t(struct_obj) (*((lv_draw_box_shadow_dsc_t*)mp_write_value_ptr_lv_draw_box_shadow_dsc_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_fade_param_t(struct_obj) (*((lv_draw_sw_mask_fade_param_t*)mp_write_value_ptr_lv_draw_sw_mask_fade_param_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_box_shadow_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_fade_param_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_box_shadow_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_fade_param_t_type, field); } -#define mp_read_lv_draw_box_shadow_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_box_shadow_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_box_shadow_dsc_t))) -#define mp_read_byref_lv_draw_box_shadow_dsc_t(field) mp_read_ptr_lv_draw_box_shadow_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_fade_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_fade_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_t))) +#define mp_read_byref_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(&field) +typedef __typeof__( ((lv_draw_sw_mask_map_param_t*)(0))->cfg ) lv_draw_sw_mask_map_param_cfg_t; /* - * Struct lv_draw_letter_dsc_t (CPython) + * Struct lv_draw_sw_mask_map_param_cfg_t (CPython) */ -extern PyMethodDef py_lv_draw_letter_dsc_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_map_param_cfg_t_methods[]; -static PyObject *py_lv_draw_letter_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_map_param_cfg_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)inst->data; + lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "unicode") == 0) return mp_obj_new_int_from_uint(data->unicode); - if (strcmp(attr, "font") == 0) return mp_read_ptr_lv_font_t((void*)data->font); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); - if (strcmp(attr, "scale_x") == 0) return mp_obj_new_int(data->scale_x); - if (strcmp(attr, "scale_y") == 0) return mp_obj_new_int(data->scale_y); - if (strcmp(attr, "skew_x") == 0) return mp_obj_new_int(data->skew_x); - if (strcmp(attr, "skew_y") == 0) return mp_obj_new_int(data->skew_y); - if (strcmp(attr, "pivot") == 0) return mp_read_byref_lv_point_t(data->pivot); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "decor") == 0) return mp_obj_new_int(data->decor); - if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); - if (strcmp(attr, "outline_stroke_opa") == 0) return mp_obj_new_int_from_uint(data->outline_stroke_opa); - if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); - if (strcmp(attr, "outline_stroke_color") == 0) return mp_read_byref_lv_color_t(data->outline_stroke_color); - for (PyMethodDef *m = py_lv_draw_letter_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "coords") == 0) return mp_read_byref_lv_area_t(data->coords); + if (strcmp(attr, "map") == 0) return mp_array_from_u8ptr((void*)data->map); + for (PyMethodDef *m = py_lv_draw_sw_mask_map_param_cfg_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_letter_dsc_t_field_names[] = {"base", "unicode", "font", "color", "rotation", "scale_x", "scale_y", "skew_x", "skew_y", "pivot", "opa", "decor", "blend_mode", "outline_stroke_opa", "outline_stroke_width", "outline_stroke_color", NULL}; +static const char *const py_lv_draw_sw_mask_map_param_cfg_t_field_names[] = {"coords", "map", NULL}; -static PyObject *py_lv_draw_letter_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_map_param_cfg_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_letter_dsc_t_field_names, py_lv_draw_letter_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_map_param_cfg_t_field_names, py_lv_draw_sw_mask_map_param_cfg_t_methods); } -static PyMethodDef py_lv_draw_letter_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_letter_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_map_param_cfg_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_map_param_cfg_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_letter_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_map_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_letter_dsc_t *data = (lv_draw_letter_dsc_t*)inst->data; + lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -56024,157 +67891,132 @@ static int py_lv_draw_letter_dsc_t_setattro(PyObject *self, PyObject *name, PyOb const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_letter_dsc_t saved; + lv_draw_sw_mask_map_param_cfg_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "unicode") == 0) { data->unicode = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "font") == 0) { data->font = (void*)mp_write_ptr_lv_font_t(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "scale_x") == 0) { data->scale_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "scale_y") == 0) { data->scale_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "skew_x") == 0) { data->skew_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "skew_y") == 0) { data->skew_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pivot") == 0) { data->pivot = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "decor") == 0) { data->decor = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_stroke_opa") == 0) { data->outline_stroke_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_stroke_color") == 0) { data->outline_stroke_color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "coords") == 0) { data->coords = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "map") == 0) { data->map = (void*)mp_array_to_u8ptr(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_letter_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_map_param_cfg_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_letter_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_map_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_letter_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_map_param_cfg_t)); } -static void py_lv_draw_letter_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_map_param_cfg_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_letter_dsc_t_type = { +PyTypeObject py_lv_draw_sw_mask_map_param_cfg_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_letter_dsc_t", + .tp_name = "lvgl.lv_draw_sw_mask_map_param_cfg_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_letter_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_letter_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_letter_dsc_t_setattro, - .tp_new = py_lv_draw_letter_dsc_t_new, - .tp_methods = py_lv_draw_letter_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_map_param_cfg_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_map_param_cfg_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_map_param_cfg_t_setattro, + .tp_new = py_lv_draw_sw_mask_map_param_cfg_t_new, + .tp_methods = py_lv_draw_sw_mask_map_param_cfg_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_letter_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_letter_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_letter_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_map_param_cfg_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_letter_dsc_t*)self->data; + return (lv_draw_sw_mask_map_param_cfg_t*)self->data; } -static lv_draw_letter_dsc_t mp_write_scratch_lv_draw_letter_dsc_t; +static lv_draw_sw_mask_map_param_cfg_t mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t; -static inline void* mp_write_value_ptr_lv_draw_letter_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_map_param_cfg_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_letter_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_map_param_cfg_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_letter_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_letter_dsc_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_map_param_cfg_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_letter_dsc_t; + return &mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_letter_dsc_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_letter_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_cfg_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_letter_dsc_t, 0, sizeof(lv_draw_letter_dsc_t)); - return &mp_write_scratch_lv_draw_letter_dsc_t; + memset(&mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t, 0, sizeof(lv_draw_sw_mask_map_param_cfg_t)); + return &mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t; } -#define mp_write_lv_draw_letter_dsc_t(struct_obj) (*((lv_draw_letter_dsc_t*)mp_write_value_ptr_lv_draw_letter_dsc_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_map_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_map_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_map_param_cfg_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_letter_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_letter_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_map_param_cfg_t_type, field); } -#define mp_read_lv_draw_letter_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_letter_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_letter_dsc_t))) -#define mp_read_byref_lv_draw_letter_dsc_t(field) mp_read_ptr_lv_draw_letter_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_map_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_map_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_cfg_t))) +#define mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(&field) /* - * Struct lv_draw_glyph_dsc_t (CPython) + * Struct lv_draw_sw_mask_map_param_t (CPython) */ -extern PyMethodDef py_lv_draw_glyph_dsc_t_methods[]; +extern PyMethodDef py_lv_draw_sw_mask_map_param_t_methods[]; -static PyObject *py_lv_draw_glyph_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_mask_map_param_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)inst->data; + lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "glyph_data") == 0) return ptr_to_mp((void*)data->glyph_data); - if (strcmp(attr, "format") == 0) return mp_obj_new_int(data->format); - if (strcmp(attr, "letter_coords") == 0) return mp_read_ptr_lv_area_t((void*)data->letter_coords); - if (strcmp(attr, "bg_coords") == 0) return mp_read_ptr_lv_area_t((void*)data->bg_coords); - if (strcmp(attr, "g") == 0) return mp_read_ptr_lv_font_glyph_dsc_t((void*)data->g); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "outline_stroke_color") == 0) return mp_read_byref_lv_color_t(data->outline_stroke_color); - if (strcmp(attr, "outline_stroke_opa") == 0) return mp_obj_new_int_from_uint(data->outline_stroke_opa); - if (strcmp(attr, "outline_stroke_width") == 0) return mp_obj_new_int(data->outline_stroke_width); - if (strcmp(attr, "rotation") == 0) return mp_obj_new_int(data->rotation); - if (strcmp(attr, "pivot") == 0) return mp_read_byref_lv_point_t(data->pivot); - if (strcmp(attr, "_draw_buf") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->_draw_buf); - for (PyMethodDef *m = py_lv_draw_glyph_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); + if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(data->cfg); + for (PyMethodDef *m = py_lv_draw_sw_mask_map_param_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_glyph_dsc_t_field_names[] = {"glyph_data", "format", "letter_coords", "bg_coords", "g", "color", "opa", "outline_stroke_color", "outline_stroke_opa", "outline_stroke_width", "rotation", "pivot", "_draw_buf", NULL}; +static const char *const py_lv_draw_sw_mask_map_param_t_field_names[] = {"dsc", "cfg", NULL}; -static PyObject *py_lv_draw_glyph_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_mask_map_param_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_glyph_dsc_t_field_names, py_lv_draw_glyph_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_mask_map_param_t_field_names, py_lv_draw_sw_mask_map_param_t_methods); } -static PyMethodDef py_lv_draw_glyph_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_glyph_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_mask_map_param_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_mask_map_param_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_glyph_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_mask_map_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_glyph_dsc_t *data = (lv_draw_glyph_dsc_t*)inst->data; + lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -56182,146 +68024,139 @@ static int py_lv_draw_glyph_dsc_t_setattro(PyObject *self, PyObject *name, PyObj const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_glyph_dsc_t saved; + lv_draw_sw_mask_map_param_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "glyph_data") == 0) { data->glyph_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "format") == 0) { data->format = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "letter_coords") == 0) { data->letter_coords = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "bg_coords") == 0) { data->bg_coords = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "g") == 0) { data->g = (void*)mp_write_ptr_lv_font_glyph_dsc_t(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_stroke_color") == 0) { data->outline_stroke_color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "outline_stroke_opa") == 0) { data->outline_stroke_opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outline_stroke_width") == 0) { data->outline_stroke_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "rotation") == 0) { data->rotation = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pivot") == 0) { data->pivot = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "_draw_buf") == 0) { data->_draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } + if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_map_param_cfg_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_glyph_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_map_param_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_glyph_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_mask_map_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_glyph_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_map_param_t)); } -static void py_lv_draw_glyph_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_mask_map_param_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_glyph_dsc_t_type = { +PyTypeObject py_lv_draw_sw_mask_map_param_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_glyph_dsc_t", + .tp_name = "lvgl.lv_draw_sw_mask_map_param_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_glyph_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_glyph_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_glyph_dsc_t_setattro, - .tp_new = py_lv_draw_glyph_dsc_t_new, - .tp_methods = py_lv_draw_glyph_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_mask_map_param_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_mask_map_param_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_mask_map_param_t_setattro, + .tp_new = py_lv_draw_sw_mask_map_param_t_new, + .tp_methods = py_lv_draw_sw_mask_map_param_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_glyph_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_glyph_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_glyph_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_map_param_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_glyph_dsc_t*)self->data; + return (lv_draw_sw_mask_map_param_t*)self->data; } -static lv_draw_glyph_dsc_t mp_write_scratch_lv_draw_glyph_dsc_t; +static lv_draw_sw_mask_map_param_t mp_write_scratch_lv_draw_sw_mask_map_param_t; -static inline void* mp_write_value_ptr_lv_draw_glyph_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_mask_map_param_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_glyph_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_map_param_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_glyph_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_glyph_dsc_t)); + memcpy(&mp_write_scratch_lv_draw_sw_mask_map_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_map_param_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_glyph_dsc_t; + return &mp_write_scratch_lv_draw_sw_mask_map_param_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_glyph_dsc_t(value); + void *p = mp_write_ptr_lv_draw_sw_mask_map_param_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_glyph_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_glyph_dsc_t, 0, sizeof(lv_draw_glyph_dsc_t)); - return &mp_write_scratch_lv_draw_glyph_dsc_t; + memset(&mp_write_scratch_lv_draw_sw_mask_map_param_t, 0, sizeof(lv_draw_sw_mask_map_param_t)); + return &mp_write_scratch_lv_draw_sw_mask_map_param_t; } -#define mp_write_lv_draw_glyph_dsc_t(struct_obj) (*((lv_draw_glyph_dsc_t*)mp_write_value_ptr_lv_draw_glyph_dsc_t(struct_obj))) +#define mp_write_lv_draw_sw_mask_map_param_t(struct_obj) (*((lv_draw_sw_mask_map_param_t*)mp_write_value_ptr_lv_draw_sw_mask_map_param_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_glyph_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_mask_map_param_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_glyph_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_mask_map_param_t_type, field); } -#define mp_read_lv_draw_glyph_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_glyph_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_glyph_dsc_t))) -#define mp_read_byref_lv_draw_glyph_dsc_t(field) mp_read_ptr_lv_draw_glyph_dsc_t(&field) +#define mp_read_lv_draw_sw_mask_map_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_map_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_t))) +#define mp_read_byref_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(&field) /* - * Struct lv_draw_triangle_dsc_t (CPython) + * Struct lv_draw_sw_blend_fill_dsc_t (CPython) */ -extern PyMethodDef py_lv_draw_triangle_dsc_t_methods[]; +extern PyMethodDef py_lv_draw_sw_blend_fill_dsc_t_methods[]; -static PyObject *py_lv_draw_triangle_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_blend_fill_dsc_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)inst->data; + lv_draw_sw_blend_fill_dsc_t *data = (lv_draw_sw_blend_fill_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "p") == 0) return lvpy_struct_array_new(self, data->p, 3, sizeof(lv_point_precise_t), mp_read_ptr_lv_point_precise_t, mp_write_value_ptr_lv_point_precise_t); + if (strcmp(attr, "dest_buf") == 0) return ptr_to_mp((void*)data->dest_buf); + if (strcmp(attr, "dest_w") == 0) return mp_obj_new_int(data->dest_w); + if (strcmp(attr, "dest_h") == 0) return mp_obj_new_int(data->dest_h); + if (strcmp(attr, "dest_stride") == 0) return mp_obj_new_int(data->dest_stride); + if (strcmp(attr, "mask_buf") == 0) return mp_array_from_u8ptr((void*)data->mask_buf); + if (strcmp(attr, "mask_stride") == 0) return mp_obj_new_int(data->mask_stride); if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "grad") == 0) return mp_read_byref_lv_grad_dsc_t(data->grad); - for (PyMethodDef *m = py_lv_draw_triangle_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "relative_area") == 0) return mp_read_byref_lv_area_t(data->relative_area); + for (PyMethodDef *m = py_lv_draw_sw_blend_fill_dsc_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_triangle_dsc_t_field_names[] = {"base", "p", "color", "opa", "grad", NULL}; +static const char *const py_lv_draw_sw_blend_fill_dsc_t_field_names[] = {"dest_buf", "dest_w", "dest_h", "dest_stride", "mask_buf", "mask_stride", "color", "opa", "relative_area", NULL}; -static PyObject *py_lv_draw_triangle_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_blend_fill_dsc_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_triangle_dsc_t_field_names, py_lv_draw_triangle_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_blend_fill_dsc_t_field_names, py_lv_draw_sw_blend_fill_dsc_t_methods); } -static PyMethodDef py_lv_draw_triangle_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_triangle_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_blend_fill_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_blend_fill_dsc_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_triangle_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_blend_fill_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_triangle_dsc_t *data = (lv_draw_triangle_dsc_t*)inst->data; + lv_draw_sw_blend_fill_dsc_t *data = (lv_draw_sw_blend_fill_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -56329,164 +68164,150 @@ static int py_lv_draw_triangle_dsc_t_setattro(PyObject *self, PyObject *name, Py const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_triangle_dsc_t saved; + lv_draw_sw_blend_fill_dsc_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "p") == 0) { lvpy_struct_array_assign(data->p, 3, sizeof(lv_point_precise_t), mp_write_value_ptr_lv_point_precise_t, value); result = 0; } + if (strcmp(attr, "dest_buf") == 0) { data->dest_buf = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "dest_w") == 0) { data->dest_w = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dest_h") == 0) { data->dest_h = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dest_stride") == 0) { data->dest_stride = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "mask_buf") == 0) { data->mask_buf = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "mask_stride") == 0) { data->mask_stride = (int32_t)mp_obj_get_int(value); result = 0; } if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "grad") == 0) { data->grad = mp_write_lv_grad_dsc_t(value); result = 0; } + if (strcmp(attr, "relative_area") == 0) { data->relative_area = mp_write_lv_area_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_triangle_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_blend_fill_dsc_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_triangle_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_blend_fill_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_triangle_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_blend_fill_dsc_t)); } -static void py_lv_draw_triangle_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_blend_fill_dsc_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_triangle_dsc_t_type = { +PyTypeObject py_lv_draw_sw_blend_fill_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_triangle_dsc_t", + .tp_name = "lvgl.lv_draw_sw_blend_fill_dsc_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_triangle_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_triangle_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_triangle_dsc_t_setattro, - .tp_new = py_lv_draw_triangle_dsc_t_new, - .tp_methods = py_lv_draw_triangle_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_blend_fill_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_blend_fill_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_blend_fill_dsc_t_setattro, + .tp_new = py_lv_draw_sw_blend_fill_dsc_t_new, + .tp_methods = py_lv_draw_sw_blend_fill_dsc_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_triangle_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_triangle_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_triangle_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_blend_fill_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_fill_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_triangle_dsc_t*)self->data; + return (lv_draw_sw_blend_fill_dsc_t*)self->data; } -static lv_draw_triangle_dsc_t mp_write_scratch_lv_draw_triangle_dsc_t; +static lv_draw_sw_blend_fill_dsc_t mp_write_scratch_lv_draw_sw_blend_fill_dsc_t; -static inline void* mp_write_value_ptr_lv_draw_triangle_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_blend_fill_dsc_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_triangle_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_blend_fill_dsc_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_triangle_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_triangle_dsc_t)); + memcpy(&mp_write_scratch_lv_draw_sw_blend_fill_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_blend_fill_dsc_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_triangle_dsc_t; + return &mp_write_scratch_lv_draw_sw_blend_fill_dsc_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_triangle_dsc_t(value); + void *p = mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_triangle_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_fill_dsc_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_triangle_dsc_t, 0, sizeof(lv_draw_triangle_dsc_t)); - return &mp_write_scratch_lv_draw_triangle_dsc_t; + memset(&mp_write_scratch_lv_draw_sw_blend_fill_dsc_t, 0, sizeof(lv_draw_sw_blend_fill_dsc_t)); + return &mp_write_scratch_lv_draw_sw_blend_fill_dsc_t; } -#define mp_write_lv_draw_triangle_dsc_t(struct_obj) (*((lv_draw_triangle_dsc_t*)mp_write_value_ptr_lv_draw_triangle_dsc_t(struct_obj))) +#define mp_write_lv_draw_sw_blend_fill_dsc_t(struct_obj) (*((lv_draw_sw_blend_fill_dsc_t*)mp_write_value_ptr_lv_draw_sw_blend_fill_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_triangle_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_triangle_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_blend_fill_dsc_t_type, field); } -#define mp_read_lv_draw_triangle_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_triangle_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_triangle_dsc_t))) -#define mp_read_byref_lv_draw_triangle_dsc_t(field) mp_read_ptr_lv_draw_triangle_dsc_t(&field) - -#define funcptr_lv_indev_read_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_indev_read_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +#define mp_read_lv_draw_sw_blend_fill_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_blend_fill_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_blend_fill_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_fill_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_fill_dsc_t(&field) -static void lv_indev_t_read_cb_callback(lv_indev_t *indev, lv_indev_data_t *data); -typedef __typeof__( ((lv_indev_t*)(0))->pointer ) lv_indev_pointer_t; /* - * Struct lv_indev_pointer_t (CPython) + * Struct lv_draw_sw_blend_image_dsc_t (CPython) */ -extern PyMethodDef py_lv_indev_pointer_t_methods[]; +extern PyMethodDef py_lv_draw_sw_blend_image_dsc_t_methods[]; -static PyObject *py_lv_indev_pointer_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_blend_image_dsc_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_pointer_t *data = (lv_indev_pointer_t*)inst->data; + lv_draw_sw_blend_image_dsc_t *data = (lv_draw_sw_blend_image_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "act_point") == 0) return mp_read_byref_lv_point_t(data->act_point); - if (strcmp(attr, "last_point") == 0) return mp_read_byref_lv_point_t(data->last_point); - if (strcmp(attr, "last_raw_point") == 0) return mp_read_byref_lv_point_t(data->last_raw_point); - if (strcmp(attr, "vect") == 0) return mp_read_byref_lv_point_t(data->vect); - if (strcmp(attr, "vect_hist") == 0) return lvpy_struct_array_new(self, data->vect_hist, 8, sizeof(lv_point_t), mp_read_ptr_lv_point_t, mp_write_value_ptr_lv_point_t); - if (strcmp(attr, "vect_hist_timestamp") == 0) return ptr_to_mp(data->vect_hist_timestamp); - if (strcmp(attr, "vect_hist_index") == 0) return mp_obj_new_int_from_uint(data->vect_hist_index); - if (strcmp(attr, "scroll_sum") == 0) return mp_read_byref_lv_point_t(data->scroll_sum); - if (strcmp(attr, "scroll_throw_vect") == 0) return mp_read_byref_lv_point_t(data->scroll_throw_vect); - if (strcmp(attr, "scroll_throw_vect_ori") == 0) return mp_read_byref_lv_point_t(data->scroll_throw_vect_ori); - if (strcmp(attr, "act_obj") == 0) return lv_to_mp((void*)data->act_obj); - if (strcmp(attr, "scroll_obj") == 0) return lv_to_mp((void*)data->scroll_obj); - if (strcmp(attr, "last_pressed") == 0) return lv_to_mp((void*)data->last_pressed); - if (strcmp(attr, "last_hovered") == 0) return lv_to_mp((void*)data->last_hovered); - if (strcmp(attr, "scroll_area") == 0) return mp_read_byref_lv_area_t(data->scroll_area); - if (strcmp(attr, "gesture_sum") == 0) return mp_read_byref_lv_point_t(data->gesture_sum); - if (strcmp(attr, "diff") == 0) return mp_obj_new_int(data->diff); - if (strcmp(attr, "short_click_streak") == 0) return mp_obj_new_int_from_uint(data->short_click_streak); - if (strcmp(attr, "last_short_click_point") == 0) return mp_read_byref_lv_point_t(data->last_short_click_point); - if (strcmp(attr, "last_short_click_timestamp") == 0) return mp_obj_new_int_from_uint(data->last_short_click_timestamp); - if (strcmp(attr, "scroll_dir") == 0) return mp_obj_new_int_from_uint(data->scroll_dir); - if (strcmp(attr, "gesture_dir") == 0) return mp_obj_new_int_from_uint(data->gesture_dir); - if (strcmp(attr, "gesture_sent") == 0) return mp_obj_new_int_from_uint(data->gesture_sent); - if (strcmp(attr, "press_moved") == 0) return mp_obj_new_int_from_uint(data->press_moved); - if (strcmp(attr, "pressed") == 0) return mp_obj_new_int_from_uint(data->pressed); - for (PyMethodDef *m = py_lv_indev_pointer_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "dest_buf") == 0) return ptr_to_mp((void*)data->dest_buf); + if (strcmp(attr, "dest_w") == 0) return mp_obj_new_int(data->dest_w); + if (strcmp(attr, "dest_h") == 0) return mp_obj_new_int(data->dest_h); + if (strcmp(attr, "dest_stride") == 0) return mp_obj_new_int(data->dest_stride); + if (strcmp(attr, "mask_buf") == 0) return mp_array_from_u8ptr((void*)data->mask_buf); + if (strcmp(attr, "mask_stride") == 0) return mp_obj_new_int(data->mask_stride); + if (strcmp(attr, "src_buf") == 0) return ptr_to_mp((void*)data->src_buf); + if (strcmp(attr, "src_stride") == 0) return mp_obj_new_int(data->src_stride); + if (strcmp(attr, "src_color_format") == 0) return mp_obj_new_int(data->src_color_format); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); + if (strcmp(attr, "relative_area") == 0) return mp_read_byref_lv_area_t(data->relative_area); + if (strcmp(attr, "src_area") == 0) return mp_read_byref_lv_area_t(data->src_area); + for (PyMethodDef *m = py_lv_draw_sw_blend_image_dsc_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_indev_pointer_t_field_names[] = {"act_point", "last_point", "last_raw_point", "vect", "vect_hist", "vect_hist_timestamp", "vect_hist_index", "scroll_sum", "scroll_throw_vect", "scroll_throw_vect_ori", "act_obj", "scroll_obj", "last_pressed", "last_hovered", "scroll_area", "gesture_sum", "diff", "short_click_streak", "last_short_click_point", "last_short_click_timestamp", "scroll_dir", "gesture_dir", "gesture_sent", "press_moved", "pressed", NULL}; +static const char *const py_lv_draw_sw_blend_image_dsc_t_field_names[] = {"dest_buf", "dest_w", "dest_h", "dest_stride", "mask_buf", "mask_stride", "src_buf", "src_stride", "src_color_format", "opa", "blend_mode", "relative_area", "src_area", NULL}; -static PyObject *py_lv_indev_pointer_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_blend_image_dsc_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_indev_pointer_t_field_names, py_lv_indev_pointer_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_blend_image_dsc_t_field_names, py_lv_draw_sw_blend_image_dsc_t_methods); } -static PyMethodDef py_lv_indev_pointer_t_type_methods[] = { - {"__dir__", py_lv_indev_pointer_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_blend_image_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_blend_image_dsc_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_indev_pointer_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_blend_image_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_pointer_t *data = (lv_indev_pointer_t*)inst->data; + lv_draw_sw_blend_image_dsc_t *data = (lv_draw_sw_blend_image_dsc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -56494,156 +68315,144 @@ static int py_lv_indev_pointer_t_setattro(PyObject *self, PyObject *name, PyObje const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_indev_pointer_t saved; + lv_draw_sw_blend_image_dsc_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "act_point") == 0) { data->act_point = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "last_point") == 0) { data->last_point = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "last_raw_point") == 0) { data->last_raw_point = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "vect") == 0) { data->vect = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "vect_hist") == 0) { lvpy_struct_array_assign(data->vect_hist, 8, sizeof(lv_point_t), mp_write_value_ptr_lv_point_t, value); result = 0; } - if (strcmp(attr, "vect_hist_timestamp") == 0) { memcpy((void*)&data->vect_hist_timestamp, mp_to_ptr(value), sizeof(uint32_t)*8); result = 0; } - if (strcmp(attr, "vect_hist_index") == 0) { data->vect_hist_index = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "scroll_sum") == 0) { data->scroll_sum = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "scroll_throw_vect") == 0) { data->scroll_throw_vect = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "scroll_throw_vect_ori") == 0) { data->scroll_throw_vect_ori = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "act_obj") == 0) { data->act_obj = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "scroll_obj") == 0) { data->scroll_obj = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "last_pressed") == 0) { data->last_pressed = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "last_hovered") == 0) { data->last_hovered = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "scroll_area") == 0) { data->scroll_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "gesture_sum") == 0) { data->gesture_sum = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "diff") == 0) { data->diff = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "short_click_streak") == 0) { data->short_click_streak = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_short_click_point") == 0) { data->last_short_click_point = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "last_short_click_timestamp") == 0) { data->last_short_click_timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "scroll_dir") == 0) { data->scroll_dir = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "gesture_dir") == 0) { data->gesture_dir = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "gesture_sent") == 0) { data->gesture_sent = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "press_moved") == 0) { data->press_moved = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pressed") == 0) { data->pressed = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dest_buf") == 0) { data->dest_buf = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "dest_w") == 0) { data->dest_w = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dest_h") == 0) { data->dest_h = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dest_stride") == 0) { data->dest_stride = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "mask_buf") == 0) { data->mask_buf = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "mask_stride") == 0) { data->mask_stride = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "src_buf") == 0) { data->src_buf = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "src_stride") == 0) { data->src_stride = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "src_color_format") == 0) { data->src_color_format = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "relative_area") == 0) { data->relative_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "src_area") == 0) { data->src_area = mp_write_lv_area_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_pointer_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_blend_image_dsc_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_indev_pointer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_blend_image_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_pointer_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_blend_image_dsc_t)); } -static void py_lv_indev_pointer_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_blend_image_dsc_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_indev_pointer_t_type = { +PyTypeObject py_lv_draw_sw_blend_image_dsc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_pointer_t", + .tp_name = "lvgl.lv_draw_sw_blend_image_dsc_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_pointer_t_dealloc, - .tp_getattro = (getter)py_lv_indev_pointer_t_getattro, - .tp_setattro = (setter)py_lv_indev_pointer_t_setattro, - .tp_new = py_lv_indev_pointer_t_new, - .tp_methods = py_lv_indev_pointer_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_blend_image_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_blend_image_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_blend_image_dsc_t_setattro, + .tp_new = py_lv_draw_sw_blend_image_dsc_t_new, + .tp_methods = py_lv_draw_sw_blend_image_dsc_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_indev_pointer_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_blend_image_dsc_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_pointer_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_pointer_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_blend_image_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_image_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_pointer_t*)self->data; + return (lv_draw_sw_blend_image_dsc_t*)self->data; } -static lv_indev_pointer_t mp_write_scratch_lv_indev_pointer_t; +static lv_draw_sw_blend_image_dsc_t mp_write_scratch_lv_draw_sw_blend_image_dsc_t; -static inline void* mp_write_value_ptr_lv_indev_pointer_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_blend_image_dsc_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_pointer_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_blend_image_dsc_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_indev_pointer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_pointer_t)); + memcpy(&mp_write_scratch_lv_draw_sw_blend_image_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_blend_image_dsc_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_indev_pointer_t; + return &mp_write_scratch_lv_draw_sw_blend_image_dsc_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_indev_pointer_t(value); + void *p = mp_write_ptr_lv_draw_sw_blend_image_dsc_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_pointer_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_image_dsc_t or dict, got None"); } - memset(&mp_write_scratch_lv_indev_pointer_t, 0, sizeof(lv_indev_pointer_t)); - return &mp_write_scratch_lv_indev_pointer_t; + memset(&mp_write_scratch_lv_draw_sw_blend_image_dsc_t, 0, sizeof(lv_draw_sw_blend_image_dsc_t)); + return &mp_write_scratch_lv_draw_sw_blend_image_dsc_t; } -#define mp_write_lv_indev_pointer_t(struct_obj) (*((lv_indev_pointer_t*)mp_write_value_ptr_lv_indev_pointer_t(struct_obj))) +#define mp_write_lv_draw_sw_blend_image_dsc_t(struct_obj) (*((lv_draw_sw_blend_image_dsc_t*)mp_write_value_ptr_lv_draw_sw_blend_image_dsc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_indev_pointer_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_blend_image_dsc_t(void *field) { - return lv_to_mp_struct(&py_lv_indev_pointer_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_blend_image_dsc_t_type, field); } -#define mp_read_lv_indev_pointer_t(field) lv_to_mp_struct_own(&py_lv_indev_pointer_t_type, copy_buffer(&field, sizeof(lv_indev_pointer_t))) -#define mp_read_byref_lv_indev_pointer_t(field) mp_read_ptr_lv_indev_pointer_t(&field) +#define mp_read_lv_draw_sw_blend_image_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_blend_image_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_blend_image_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_image_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_image_dsc_t(&field) -typedef __typeof__( ((lv_indev_t*)(0))->keypad ) lv_indev_keypad_t; /* - * Struct lv_indev_keypad_t (CPython) + * Struct lv_draw_sw_grad_calc_t (CPython) */ -extern PyMethodDef py_lv_indev_keypad_t_methods[]; +extern PyMethodDef py_lv_draw_sw_grad_calc_t_methods[]; -static PyObject *py_lv_indev_keypad_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_sw_grad_calc_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_keypad_t *data = (lv_indev_keypad_t*)inst->data; + lv_draw_sw_grad_calc_t *data = (lv_draw_sw_grad_calc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "last_state") == 0) return mp_obj_new_int(data->last_state); - if (strcmp(attr, "last_key") == 0) return mp_obj_new_int_from_uint(data->last_key); - for (PyMethodDef *m = py_lv_indev_keypad_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "color_map") == 0) return mp_read_ptr_lv_color_t((void*)data->color_map); + if (strcmp(attr, "opa_map") == 0) return mp_array_from_u8ptr((void*)data->opa_map); + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + for (PyMethodDef *m = py_lv_draw_sw_grad_calc_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_indev_keypad_t_field_names[] = {"last_state", "last_key", NULL}; +static const char *const py_lv_draw_sw_grad_calc_t_field_names[] = {"color_map", "opa_map", "size", NULL}; -static PyObject *py_lv_indev_keypad_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_sw_grad_calc_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_indev_keypad_t_field_names, py_lv_indev_keypad_t_methods); + return lvpy_struct_dir(self, py_lv_draw_sw_grad_calc_t_field_names, py_lv_draw_sw_grad_calc_t_methods); } -static PyMethodDef py_lv_indev_keypad_t_type_methods[] = { - {"__dir__", py_lv_indev_keypad_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_sw_grad_calc_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_grad_calc_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_indev_keypad_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_sw_grad_calc_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_keypad_t *data = (lv_indev_keypad_t*)inst->data; + lv_draw_sw_grad_calc_t *data = (lv_draw_sw_grad_calc_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -56651,101 +68460,97 @@ static int py_lv_indev_keypad_t_setattro(PyObject *self, PyObject *name, PyObjec const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_indev_keypad_t saved; + lv_draw_sw_grad_calc_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "last_state") == 0) { data->last_state = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_key") == 0) { data->last_key = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color_map") == 0) { data->color_map = (void*)mp_write_ptr_lv_color_t(value); result = 0; } + if (strcmp(attr, "opa_map") == 0) { data->opa_map = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_keypad_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_grad_calc_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_indev_keypad_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_sw_grad_calc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_keypad_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_grad_calc_t)); } -static void py_lv_indev_keypad_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_sw_grad_calc_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_indev_keypad_t_type = { +PyTypeObject py_lv_draw_sw_grad_calc_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_keypad_t", + .tp_name = "lvgl.lv_draw_sw_grad_calc_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_keypad_t_dealloc, - .tp_getattro = (getter)py_lv_indev_keypad_t_getattro, - .tp_setattro = (setter)py_lv_indev_keypad_t_setattro, - .tp_new = py_lv_indev_keypad_t_new, - .tp_methods = py_lv_indev_keypad_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_sw_grad_calc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_grad_calc_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_grad_calc_t_setattro, + .tp_new = py_lv_draw_sw_grad_calc_t_new, + .tp_methods = py_lv_draw_sw_grad_calc_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_indev_keypad_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_sw_grad_calc_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_keypad_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_keypad_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_grad_calc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_grad_calc_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_keypad_t*)self->data; + return (lv_draw_sw_grad_calc_t*)self->data; } -static lv_indev_keypad_t mp_write_scratch_lv_indev_keypad_t; +static lv_draw_sw_grad_calc_t mp_write_scratch_lv_draw_sw_grad_calc_t; -static inline void* mp_write_value_ptr_lv_indev_keypad_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_sw_grad_calc_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_keypad_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_grad_calc_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_indev_keypad_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_keypad_t)); + memcpy(&mp_write_scratch_lv_draw_sw_grad_calc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_grad_calc_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_indev_keypad_t; + return &mp_write_scratch_lv_draw_sw_grad_calc_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_indev_keypad_t(value); + void *p = mp_write_ptr_lv_draw_sw_grad_calc_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_keypad_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_grad_calc_t or dict, got None"); } - memset(&mp_write_scratch_lv_indev_keypad_t, 0, sizeof(lv_indev_keypad_t)); - return &mp_write_scratch_lv_indev_keypad_t; + memset(&mp_write_scratch_lv_draw_sw_grad_calc_t, 0, sizeof(lv_draw_sw_grad_calc_t)); + return &mp_write_scratch_lv_draw_sw_grad_calc_t; } -#define mp_write_lv_indev_keypad_t(struct_obj) (*((lv_indev_keypad_t*)mp_write_value_ptr_lv_indev_keypad_t(struct_obj))) +#define mp_write_lv_draw_sw_grad_calc_t(struct_obj) (*((lv_draw_sw_grad_calc_t*)mp_write_value_ptr_lv_draw_sw_grad_calc_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_indev_keypad_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_sw_grad_calc_t(void *field) { - return lv_to_mp_struct(&py_lv_indev_keypad_t_type, field); + return lv_to_mp_struct(&py_lv_draw_sw_grad_calc_t_type, field); } -#define mp_read_lv_indev_keypad_t(field) lv_to_mp_struct_own(&py_lv_indev_keypad_t_type, copy_buffer(&field, sizeof(lv_indev_keypad_t))) -#define mp_read_byref_lv_indev_keypad_t(field) mp_read_ptr_lv_indev_keypad_t(&field) - -#define funcptr_lv_indev_key_remap_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_indev_key_remap_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +#define mp_read_lv_draw_sw_grad_calc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_grad_calc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_grad_calc_t))) +#define mp_read_byref_lv_draw_sw_grad_calc_t(field) mp_read_ptr_lv_draw_sw_grad_calc_t(&field) -static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *indev, lv_key_t key); /* - * Struct lv_indev_gesture_t (CPython) + * Struct lv_circle_buf_t (CPython) */ -extern PyMethodDef py_lv_indev_gesture_t_methods[]; +extern PyMethodDef py_lv_circle_buf_t_methods[]; -static PyObject *py_lv_indev_gesture_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_circle_buf_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_gesture_t *data = (lv_indev_gesture_t*)inst->data; + lv_circle_buf_t *data = (lv_circle_buf_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; @@ -56753,34 +68558,34 @@ static PyObject *py_lv_indev_gesture_t_getattro(PyObject *self, PyObject *name) const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; (void)attr; - for (PyMethodDef *m = py_lv_indev_gesture_t_methods; m->ml_name != NULL; m++) { + for (PyMethodDef *m = py_lv_circle_buf_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_indev_gesture_t_field_names[] = {NULL}; +static const char *const py_lv_circle_buf_t_field_names[] = {NULL}; -static PyObject *py_lv_indev_gesture_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_circle_buf_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_indev_gesture_t_field_names, py_lv_indev_gesture_t_methods); + return lvpy_struct_dir(self, py_lv_circle_buf_t_field_names, py_lv_circle_buf_t_methods); } -static PyMethodDef py_lv_indev_gesture_t_type_methods[] = { - {"__dir__", py_lv_indev_gesture_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_circle_buf_t_type_methods[] = { + {"__dir__", py_lv_circle_buf_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_indev_gesture_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_circle_buf_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_gesture_t *data = (lv_indev_gesture_t*)inst->data; + lv_circle_buf_t *data = (lv_circle_buf_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -56795,66 +68600,84 @@ static int py_lv_indev_gesture_t_setattro(PyObject *self, PyObject *name, PyObje return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_gesture_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_circle_buf_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_indev_gesture_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_circle_buf_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { return make_new_lv_struct(type, args, kwds, 0); } -static void py_lv_indev_gesture_t_dealloc(py_lv_struct_t *self) +static void py_lv_circle_buf_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_indev_gesture_t_type = { +PyTypeObject py_lv_circle_buf_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_gesture_t", + .tp_name = "lvgl.lv_circle_buf_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_gesture_t_dealloc, - .tp_getattro = (getter)py_lv_indev_gesture_t_getattro, - .tp_setattro = (setter)py_lv_indev_gesture_t_setattro, - .tp_new = py_lv_indev_gesture_t_new, - .tp_methods = py_lv_indev_gesture_t_type_methods, + .tp_dealloc = (destructor)py_lv_circle_buf_t_dealloc, + .tp_getattro = (getter)py_lv_circle_buf_t_getattro, + .tp_setattro = (setter)py_lv_circle_buf_t_setattro, + .tp_new = py_lv_circle_buf_t_new, + .tp_methods = py_lv_circle_buf_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_indev_gesture_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_circle_buf_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_gesture_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_circle_buf_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_circle_buf_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_gesture_t*)self->data; + return (lv_circle_buf_t*)self->data; } -#define mp_write_lv_indev_gesture_t(struct_obj) (*((lv_indev_gesture_t*)mp_write_ptr_lv_indev_gesture_t(struct_obj))) +#define mp_write_lv_circle_buf_t(struct_obj) (*((lv_circle_buf_t*)mp_write_ptr_lv_circle_buf_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_indev_gesture_t(void *field) +static inline PyObject *mp_read_ptr_lv_circle_buf_t(void *field) { - return lv_to_mp_struct(&py_lv_indev_gesture_t_type, field); + return lv_to_mp_struct(&py_lv_circle_buf_t_type, field); } -#define mp_read_lv_indev_gesture_t(field) lv_to_mp_struct_own(&py_lv_indev_gesture_t_type, copy_buffer(&field, sizeof(lv_indev_gesture_t))) -#define mp_read_byref_lv_indev_gesture_t(field) mp_read_ptr_lv_indev_gesture_t(&field) +#define mp_read_lv_circle_buf_t(field) lv_to_mp_struct_own(&py_lv_circle_buf_t_type, copy_buffer(&field, sizeof(lv_circle_buf_t))) +#define mp_read_byref_lv_circle_buf_t(field) mp_read_ptr_lv_circle_buf_t(&field) + +#define funcptr_lv_lru_free_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_lru_free_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * Struct lv_indev_gesture_configuration_t (CPython) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_lru_t_value_free' + * lv_lru_free_cb_t value_free */ + -extern PyMethodDef py_lv_indev_gesture_configuration_t_methods[]; +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_lru_t_key_free' + * lv_lru_free_cb_t key_free + */ + -static PyObject *py_lv_indev_gesture_configuration_t_getattro(PyObject *self, PyObject *name) +/* + * Struct lv_lru_item_t (CPython) + */ + +extern PyMethodDef py_lv_lru_item_t_methods[]; + +static PyObject *py_lv_lru_item_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)inst->data; + lv_lru_item_t *data = (lv_lru_item_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; @@ -56862,34 +68685,34 @@ static PyObject *py_lv_indev_gesture_configuration_t_getattro(PyObject *self, Py const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; (void)attr; - for (PyMethodDef *m = py_lv_indev_gesture_configuration_t_methods; m->ml_name != NULL; m++) { + for (PyMethodDef *m = py_lv_lru_item_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_indev_gesture_configuration_t_field_names[] = {NULL}; +static const char *const py_lv_lru_item_t_field_names[] = {NULL}; -static PyObject *py_lv_indev_gesture_configuration_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_lru_item_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_indev_gesture_configuration_t_field_names, py_lv_indev_gesture_configuration_t_methods); + return lvpy_struct_dir(self, py_lv_lru_item_t_field_names, py_lv_lru_item_t_methods); } -static PyMethodDef py_lv_indev_gesture_configuration_t_type_methods[] = { - {"__dir__", py_lv_indev_gesture_configuration_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_lru_item_t_type_methods[] = { + {"__dir__", py_lv_lru_item_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_indev_gesture_configuration_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_lru_item_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_gesture_configuration_t *data = (lv_indev_gesture_configuration_t*)inst->data; + lv_lru_item_t *data = (lv_lru_item_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -56904,121 +68727,110 @@ static int py_lv_indev_gesture_configuration_t_setattro(PyObject *self, PyObject return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_gesture_configuration_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_lru_item_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_indev_gesture_configuration_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_lru_item_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { return make_new_lv_struct(type, args, kwds, 0); } -static void py_lv_indev_gesture_configuration_t_dealloc(py_lv_struct_t *self) +static void py_lv_lru_item_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_indev_gesture_configuration_t_type = { +PyTypeObject py_lv_lru_item_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_gesture_configuration_t", + .tp_name = "lvgl.lv_lru_item_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_gesture_configuration_t_dealloc, - .tp_getattro = (getter)py_lv_indev_gesture_configuration_t_getattro, - .tp_setattro = (setter)py_lv_indev_gesture_configuration_t_setattro, - .tp_new = py_lv_indev_gesture_configuration_t_new, - .tp_methods = py_lv_indev_gesture_configuration_t_type_methods, + .tp_dealloc = (destructor)py_lv_lru_item_t_dealloc, + .tp_getattro = (getter)py_lv_lru_item_t_getattro, + .tp_setattro = (setter)py_lv_lru_item_t_setattro, + .tp_new = py_lv_lru_item_t_new, + .tp_methods = py_lv_lru_item_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_indev_gesture_configuration_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_lru_item_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_gesture_configuration_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_configuration_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_lru_item_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_lru_item_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_gesture_configuration_t*)self->data; + return (lv_lru_item_t*)self->data; } -#define mp_write_lv_indev_gesture_configuration_t(struct_obj) (*((lv_indev_gesture_configuration_t*)mp_write_ptr_lv_indev_gesture_configuration_t(struct_obj))) +#define mp_write_lv_lru_item_t(struct_obj) (*((lv_lru_item_t*)mp_write_ptr_lv_lru_item_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_indev_gesture_configuration_t(void *field) +static inline PyObject *mp_read_ptr_lv_lru_item_t(void *field) { - return lv_to_mp_struct(&py_lv_indev_gesture_configuration_t_type, field); + return lv_to_mp_struct(&py_lv_lru_item_t_type, field); } -#define mp_read_lv_indev_gesture_configuration_t(field) lv_to_mp_struct_own(&py_lv_indev_gesture_configuration_t_type, copy_buffer(&field, sizeof(lv_indev_gesture_configuration_t))) -#define mp_read_byref_lv_indev_gesture_configuration_t(field) mp_read_ptr_lv_indev_gesture_configuration_t(&field) - -#define funcptr_lv_recognizer_func_t NULL - -static inline PyObject *mp_lv_funcptr_lv_recognizer_func_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - +#define mp_read_lv_lru_item_t(field) lv_to_mp_struct_own(&py_lv_lru_item_t_type, copy_buffer(&field, sizeof(lv_lru_item_t))) +#define mp_read_byref_lv_lru_item_t(field) mp_read_ptr_lv_lru_item_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_indev_gesture_recognizer_t_recog_fn' - * lv_recognizer_func_t recog_fn - */ - /* - * Struct lv_indev_gesture_recognizer_t (CPython) + * Struct lv_lru_t (CPython) */ -extern PyMethodDef py_lv_indev_gesture_recognizer_t_methods[]; +extern PyMethodDef py_lv_lru_t_methods[]; -static PyObject *py_lv_indev_gesture_recognizer_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_lru_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)inst->data; + lv_lru_t *data = (lv_lru_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); - if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); - if (strcmp(attr, "info") == 0) return mp_read_ptr_lv_indev_gesture_t((void*)data->info); - if (strcmp(attr, "scale") == 0) return mp_obj_new_float_from_f(data->scale); - if (strcmp(attr, "rotation") == 0) return mp_obj_new_float_from_f(data->rotation); - if (strcmp(attr, "distance") == 0) return mp_obj_new_float_from_f(data->distance); - if (strcmp(attr, "speed") == 0) return mp_obj_new_float_from_f(data->speed); - if (strcmp(attr, "two_fingers_swipe_dir") == 0) return mp_obj_new_int(data->two_fingers_swipe_dir); - if (strcmp(attr, "config") == 0) return mp_read_ptr_lv_indev_gesture_configuration_t((void*)data->config); - if (strcmp(attr, "recog_fn") == 0) return mp_lv_funcptr(NULL, data->recog_fn, NULL, "lv_indev_gesture_recognizer_t_recog_fn", NULL); - for (PyMethodDef *m = py_lv_indev_gesture_recognizer_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "items") == 0) return ptr_to_mp((void*)data->items); + if (strcmp(attr, "access_count") == 0) return mp_obj_new_int_from_ull(data->access_count); + if (strcmp(attr, "free_memory") == 0) return mp_obj_new_int_from_uint(data->free_memory); + if (strcmp(attr, "total_memory") == 0) return mp_obj_new_int_from_uint(data->total_memory); + if (strcmp(attr, "average_item_length") == 0) return mp_obj_new_int_from_uint(data->average_item_length); + if (strcmp(attr, "hash_table_size") == 0) return mp_obj_new_int_from_uint(data->hash_table_size); + if (strcmp(attr, "seed") == 0) return mp_obj_new_int_from_uint(data->seed); + if (strcmp(attr, "value_free") == 0) return mp_lv_funcptr(NULL, data->value_free, NULL, "lv_lru_t_value_free", NULL); + if (strcmp(attr, "key_free") == 0) return mp_lv_funcptr(NULL, data->key_free, NULL, "lv_lru_t_key_free", NULL); + if (strcmp(attr, "free_items") == 0) return mp_read_ptr_lv_lru_item_t((void*)data->free_items); + for (PyMethodDef *m = py_lv_lru_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_indev_gesture_recognizer_t_field_names[] = {"type", "state", "info", "scale", "rotation", "distance", "speed", "two_fingers_swipe_dir", "config", "recog_fn", NULL}; +static const char *const py_lv_lru_t_field_names[] = {"items", "access_count", "free_memory", "total_memory", "average_item_length", "hash_table_size", "seed", "value_free", "key_free", "free_items", NULL}; -static PyObject *py_lv_indev_gesture_recognizer_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_lru_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_indev_gesture_recognizer_t_field_names, py_lv_indev_gesture_recognizer_t_methods); + return lvpy_struct_dir(self, py_lv_lru_t_field_names, py_lv_lru_t_methods); } -static PyMethodDef py_lv_indev_gesture_recognizer_t_type_methods[] = { - {"__dir__", py_lv_indev_gesture_recognizer_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_lru_t_type_methods[] = { + {"__dir__", py_lv_lru_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_indev_gesture_recognizer_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_lru_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_gesture_recognizer_t *data = (lv_indev_gesture_recognizer_t*)inst->data; + lv_lru_t *data = (lv_lru_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -57026,174 +68838,139 @@ static int py_lv_indev_gesture_recognizer_t_setattro(PyObject *self, PyObject *n const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_indev_gesture_recognizer_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "info") == 0) { data->info = (void*)mp_write_ptr_lv_indev_gesture_t(value); result = 0; } - if (strcmp(attr, "scale") == 0) { data->scale = (float)mp_obj_get_float(value); result = 0; } - if (strcmp(attr, "rotation") == 0) { data->rotation = (float)mp_obj_get_float(value); result = 0; } - if (strcmp(attr, "distance") == 0) { data->distance = (float)mp_obj_get_float(value); result = 0; } - if (strcmp(attr, "speed") == 0) { data->speed = (float)mp_obj_get_float(value); result = 0; } - if (strcmp(attr, "two_fingers_swipe_dir") == 0) { data->two_fingers_swipe_dir = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "config") == 0) { data->config = (void*)mp_write_ptr_lv_indev_gesture_configuration_t(value); result = 0; } - if (strcmp(attr, "recog_fn") == 0) { data->recog_fn = mp_lv_callback(value, NULL, "lv_indev_gesture_recognizer_t_recog_fn", NULL, NULL, NULL, NULL); result = 0; } + lv_lru_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "items") == 0) { data->items = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "access_count") == 0) { data->access_count = (uint64_t)mp_obj_get_ull(value); result = 0; } + if (strcmp(attr, "free_memory") == 0) { data->free_memory = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "total_memory") == 0) { data->total_memory = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "average_item_length") == 0) { data->average_item_length = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "hash_table_size") == 0) { data->hash_table_size = (size_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "seed") == 0) { data->seed = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "value_free") == 0) { data->value_free = mp_lv_callback(value, NULL, "lv_lru_t_value_free", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "key_free") == 0) { data->key_free = mp_lv_callback(value, NULL, "lv_lru_t_key_free", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "free_items") == 0) { data->free_items = (void*)mp_write_ptr_lv_lru_item_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_gesture_recognizer_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_lru_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_indev_gesture_recognizer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_lru_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_gesture_recognizer_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_lru_t)); } -static void py_lv_indev_gesture_recognizer_t_dealloc(py_lv_struct_t *self) +static void py_lv_lru_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_indev_gesture_recognizer_t_type = { +PyTypeObject py_lv_lru_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_gesture_recognizer_t", + .tp_name = "lvgl.lv_lru_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_gesture_recognizer_t_dealloc, - .tp_getattro = (getter)py_lv_indev_gesture_recognizer_t_getattro, - .tp_setattro = (setter)py_lv_indev_gesture_recognizer_t_setattro, - .tp_new = py_lv_indev_gesture_recognizer_t_new, - .tp_methods = py_lv_indev_gesture_recognizer_t_type_methods, + .tp_dealloc = (destructor)py_lv_lru_t_dealloc, + .tp_getattro = (getter)py_lv_lru_t_getattro, + .tp_setattro = (setter)py_lv_lru_t_setattro, + .tp_new = py_lv_lru_t_new, + .tp_methods = py_lv_lru_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_indev_gesture_recognizer_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_lru_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_gesture_recognizer_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_recognizer_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_lru_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_lru_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_gesture_recognizer_t*)self->data; + return (lv_lru_t*)self->data; } -static lv_indev_gesture_recognizer_t mp_write_scratch_lv_indev_gesture_recognizer_t; +static lv_lru_t mp_write_scratch_lv_lru_t; -static inline void* mp_write_value_ptr_lv_indev_gesture_recognizer_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_lru_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_gesture_recognizer_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_lru_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_indev_gesture_recognizer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_gesture_recognizer_t)); + memcpy(&mp_write_scratch_lv_lru_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_lru_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_indev_gesture_recognizer_t; + return &mp_write_scratch_lv_lru_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_indev_gesture_recognizer_t(value); + void *p = mp_write_ptr_lv_lru_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_gesture_recognizer_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_lru_t or dict, got None"); } - memset(&mp_write_scratch_lv_indev_gesture_recognizer_t, 0, sizeof(lv_indev_gesture_recognizer_t)); - return &mp_write_scratch_lv_indev_gesture_recognizer_t; + memset(&mp_write_scratch_lv_lru_t, 0, sizeof(lv_lru_t)); + return &mp_write_scratch_lv_lru_t; } -#define mp_write_lv_indev_gesture_recognizer_t(struct_obj) (*((lv_indev_gesture_recognizer_t*)mp_write_value_ptr_lv_indev_gesture_recognizer_t(struct_obj))) +#define mp_write_lv_lru_t(struct_obj) (*((lv_lru_t*)mp_write_value_ptr_lv_lru_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_indev_gesture_recognizer_t(void *field) +static inline PyObject *mp_read_ptr_lv_lru_t(void *field) { - return lv_to_mp_struct(&py_lv_indev_gesture_recognizer_t_type, field); + return lv_to_mp_struct(&py_lv_lru_t_type, field); } -#define mp_read_lv_indev_gesture_recognizer_t(field) lv_to_mp_struct_own(&py_lv_indev_gesture_recognizer_t_type, copy_buffer(&field, sizeof(lv_indev_gesture_recognizer_t))) -#define mp_read_byref_lv_indev_gesture_recognizer_t(field) mp_read_ptr_lv_indev_gesture_recognizer_t(&field) +#define mp_read_lv_lru_t(field) lv_to_mp_struct_own(&py_lv_lru_t_type, copy_buffer(&field, sizeof(lv_lru_t))) +#define mp_read_byref_lv_lru_t(field) mp_read_ptr_lv_lru_t(&field) /* - * Struct lv_indev_t (CPython) + * Struct lv_pending_t (CPython) */ -extern PyMethodDef py_lv_indev_t_methods[]; +extern PyMethodDef py_lv_pending_t_methods[]; -static PyObject *py_lv_indev_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_pending_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_t *data = (lv_indev_t*)inst->data; + lv_pending_t *data = (lv_pending_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); - if (strcmp(attr, "read_cb") == 0) return mp_lv_funcptr(NULL, data->read_cb, lv_indev_t_read_cb_callback, "lv_indev_t_read_cb", data->user_data); - if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); - if (strcmp(attr, "prev_state") == 0) return mp_obj_new_int(data->prev_state); - if (strcmp(attr, "mode") == 0) return mp_obj_new_int(data->mode); - if (strcmp(attr, "long_pr_sent") == 0) return mp_obj_new_int_from_uint(data->long_pr_sent); - if (strcmp(attr, "reset_query") == 0) return mp_obj_new_int_from_uint(data->reset_query); - if (strcmp(attr, "enabled") == 0) return mp_obj_new_int_from_uint(data->enabled); - if (strcmp(attr, "wait_until_release") == 0) return mp_obj_new_int_from_uint(data->wait_until_release); - if (strcmp(attr, "stop_processing_query") == 0) return mp_obj_new_int_from_uint(data->stop_processing_query); - if (strcmp(attr, "timestamp") == 0) return mp_obj_new_int_from_uint(data->timestamp); - if (strcmp(attr, "pr_timestamp") == 0) return mp_obj_new_int_from_uint(data->pr_timestamp); - if (strcmp(attr, "longpr_rep_timestamp") == 0) return mp_obj_new_int_from_uint(data->longpr_rep_timestamp); - if (strcmp(attr, "driver_data") == 0) return ptr_to_mp((void*)data->driver_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "disp") == 0) return mp_read_ptr_lv_display_t((void*)data->disp); - if (strcmp(attr, "read_timer") == 0) return mp_read_ptr_lv_timer_t((void*)data->read_timer); - if (strcmp(attr, "scroll_limit") == 0) return mp_obj_new_int_from_uint(data->scroll_limit); - if (strcmp(attr, "scroll_throw") == 0) return mp_obj_new_int_from_uint(data->scroll_throw); - if (strcmp(attr, "gesture_min_velocity") == 0) return mp_obj_new_int_from_uint(data->gesture_min_velocity); - if (strcmp(attr, "gesture_min_distance") == 0) return mp_obj_new_int_from_uint(data->gesture_min_distance); - if (strcmp(attr, "long_press_time") == 0) return mp_obj_new_int_from_uint(data->long_press_time); - if (strcmp(attr, "long_press_repeat_time") == 0) return mp_obj_new_int_from_uint(data->long_press_repeat_time); - if (strcmp(attr, "rotary_sensitivity") == 0) return mp_obj_new_int(data->rotary_sensitivity); - if (strcmp(attr, "pointer") == 0) return mp_read_byref_lv_indev_pointer_t(data->pointer); - if (strcmp(attr, "keypad") == 0) return mp_read_byref_lv_indev_keypad_t(data->keypad); - if (strcmp(attr, "cursor") == 0) return lv_to_mp((void*)data->cursor); - if (strcmp(attr, "group") == 0) return mp_read_ptr_lv_group_t((void*)data->group); - if (strcmp(attr, "btn_points") == 0) return mp_read_ptr_lv_point_t((void*)data->btn_points); - if (strcmp(attr, "event_list") == 0) return mp_read_byref_lv_event_list_t(data->event_list); - if (strcmp(attr, "scroll_throw_anim") == 0) return mp_read_ptr_lv_anim_t((void*)data->scroll_throw_anim); - if (strcmp(attr, "key_remap_cb") == 0) return mp_lv_funcptr(NULL, data->key_remap_cb, lv_indev_t_key_remap_cb_callback, "lv_indev_t_key_remap_cb", data->user_data); - if (strcmp(attr, "recognizers") == 0) return lvpy_struct_array_new(self, data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_read_ptr_lv_indev_gesture_recognizer_t, mp_write_value_ptr_lv_indev_gesture_recognizer_t); - if (strcmp(attr, "cur_gesture") == 0) return mp_obj_new_int(data->cur_gesture); - if (strcmp(attr, "gesture_data") == 0) return ptr_to_mp(data->gesture_data); - if (strcmp(attr, "gesture_type") == 0) return ptr_to_mp(data->gesture_type); - for (PyMethodDef *m = py_lv_indev_t_methods; m->ml_name != NULL; m++) { + (void)attr; + for (PyMethodDef *m = py_lv_pending_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_indev_t_field_names[] = {"type", "read_cb", "state", "prev_state", "mode", "long_pr_sent", "reset_query", "enabled", "wait_until_release", "stop_processing_query", "timestamp", "pr_timestamp", "longpr_rep_timestamp", "driver_data", "user_data", "disp", "read_timer", "scroll_limit", "scroll_throw", "gesture_min_velocity", "gesture_min_distance", "long_press_time", "long_press_repeat_time", "rotary_sensitivity", "pointer", "keypad", "cursor", "group", "btn_points", "event_list", "scroll_throw_anim", "key_remap_cb", "recognizers", "cur_gesture", "gesture_data", "gesture_type", NULL}; +static const char *const py_lv_pending_t_field_names[] = {NULL}; -static PyObject *py_lv_indev_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_pending_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_indev_t_field_names, py_lv_indev_t_methods); + return lvpy_struct_dir(self, py_lv_pending_t_field_names, py_lv_pending_t_methods); } -static PyMethodDef py_lv_indev_t_type_methods[] = { - {"__dir__", py_lv_indev_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_pending_t_type_methods[] = { + {"__dir__", py_lv_pending_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_indev_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_pending_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_t *data = (lv_indev_t*)inst->data; + lv_pending_t *data = (lv_pending_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -57201,173 +68978,112 @@ static int py_lv_indev_t_setattro(PyObject *self, PyObject *name, PyObject *valu const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_indev_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "read_cb") == 0) { data->read_cb = mp_lv_callback(value, lv_indev_t_read_cb_callback, "lv_indev_t_read_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "prev_state") == 0) { data->prev_state = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "mode") == 0) { data->mode = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "long_pr_sent") == 0) { data->long_pr_sent = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "reset_query") == 0) { data->reset_query = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "enabled") == 0) { data->enabled = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "wait_until_release") == 0) { data->wait_until_release = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "stop_processing_query") == 0) { data->stop_processing_query = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "timestamp") == 0) { data->timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pr_timestamp") == 0) { data->pr_timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "longpr_rep_timestamp") == 0) { data->longpr_rep_timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "driver_data") == 0) { data->driver_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "disp") == 0) { data->disp = (void*)mp_write_ptr_lv_display_t(value); result = 0; } - if (strcmp(attr, "read_timer") == 0) { data->read_timer = (void*)mp_write_ptr_lv_timer_t(value); result = 0; } - if (strcmp(attr, "scroll_limit") == 0) { data->scroll_limit = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "scroll_throw") == 0) { data->scroll_throw = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "gesture_min_velocity") == 0) { data->gesture_min_velocity = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "gesture_min_distance") == 0) { data->gesture_min_distance = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "long_press_time") == 0) { data->long_press_time = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "long_press_repeat_time") == 0) { data->long_press_repeat_time = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "rotary_sensitivity") == 0) { data->rotary_sensitivity = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pointer") == 0) { data->pointer = mp_write_lv_indev_pointer_t(value); result = 0; } - if (strcmp(attr, "keypad") == 0) { data->keypad = mp_write_lv_indev_keypad_t(value); result = 0; } - if (strcmp(attr, "cursor") == 0) { data->cursor = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "group") == 0) { data->group = (void*)mp_write_ptr_lv_group_t(value); result = 0; } - if (strcmp(attr, "btn_points") == 0) { data->btn_points = (void*)mp_write_ptr_lv_point_t(value); result = 0; } - if (strcmp(attr, "event_list") == 0) { data->event_list = mp_write_lv_event_list_t(value); result = 0; } - if (strcmp(attr, "scroll_throw_anim") == 0) { data->scroll_throw_anim = (void*)mp_write_ptr_lv_anim_t(value); result = 0; } - if (strcmp(attr, "key_remap_cb") == 0) { data->key_remap_cb = mp_lv_callback(value, lv_indev_t_key_remap_cb_callback, "lv_indev_t_key_remap_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "recognizers") == 0) { lvpy_struct_array_assign(data->recognizers, LV_INDEV_GESTURE_CNT, sizeof(lv_indev_gesture_recognizer_t), mp_write_value_ptr_lv_indev_gesture_recognizer_t, value); result = 0; } - if (strcmp(attr, "cur_gesture") == 0) { data->cur_gesture = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "gesture_data") == 0) { memcpy((void*)&data->gesture_data, mp_to_ptr(value), sizeof(void *)*LV_INDEV_GESTURE_CNT); result = 0; } - if (strcmp(attr, "gesture_type") == 0) { memcpy((void*)&data->gesture_type, mp_to_ptr(value), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); result = 0; } + + (void)value; if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); + return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_pending_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_indev_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_pending_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_t)); + return make_new_lv_struct(type, args, kwds, 0); } -static void py_lv_indev_t_dealloc(py_lv_struct_t *self) +static void py_lv_pending_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_indev_t_type = { +PyTypeObject py_lv_pending_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_t", + .tp_name = "lvgl.lv_pending_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_t_dealloc, - .tp_getattro = (getter)py_lv_indev_t_getattro, - .tp_setattro = (setter)py_lv_indev_t_setattro, - .tp_new = py_lv_indev_t_new, - .tp_methods = py_lv_indev_t_type_methods, + .tp_dealloc = (destructor)py_lv_pending_t_dealloc, + .tp_getattro = (getter)py_lv_pending_t_getattro, + .tp_setattro = (setter)py_lv_pending_t_setattro, + .tp_new = py_lv_pending_t_new, + .tp_methods = py_lv_pending_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_indev_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_pending_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_pending_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_pending_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_t*)self->data; -} - -static lv_indev_t mp_write_scratch_lv_indev_t; - -static inline void* mp_write_value_ptr_lv_indev_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_indev_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_indev_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_indev_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_t or dict, got None"); - } - memset(&mp_write_scratch_lv_indev_t, 0, sizeof(lv_indev_t)); - return &mp_write_scratch_lv_indev_t; + return (lv_pending_t*)self->data; } -#define mp_write_lv_indev_t(struct_obj) (*((lv_indev_t*)mp_write_value_ptr_lv_indev_t(struct_obj))) +#define mp_write_lv_pending_t(struct_obj) (*((lv_pending_t*)mp_write_ptr_lv_pending_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_indev_t(void *field) +static inline PyObject *mp_read_ptr_lv_pending_t(void *field) { - return lv_to_mp_struct(&py_lv_indev_t_type, field); + return lv_to_mp_struct(&py_lv_pending_t_type, field); } -#define mp_read_lv_indev_t(field) lv_to_mp_struct_own(&py_lv_indev_t_type, copy_buffer(&field, sizeof(lv_indev_t))) -#define mp_read_byref_lv_indev_t(field) mp_read_ptr_lv_indev_t(&field) +#define mp_read_lv_pending_t(field) lv_to_mp_struct_own(&py_lv_pending_t_type, copy_buffer(&field, sizeof(lv_pending_t))) +#define mp_read_byref_lv_pending_t(field) mp_read_ptr_lv_pending_t(&field) /* - * Struct lv_indev_data_t (CPython) + * Struct lv_rb_node_t (CPython) */ -extern PyMethodDef py_lv_indev_data_t_methods[]; +extern PyMethodDef py_lv_rb_node_t_methods[]; -static PyObject *py_lv_indev_data_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_rb_node_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_data_t *data = (lv_indev_data_t*)inst->data; + lv_rb_node_t *data = (lv_rb_node_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "gesture_type") == 0) return ptr_to_mp(data->gesture_type); - if (strcmp(attr, "gesture_data") == 0) return ptr_to_mp(data->gesture_data); - if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); - if (strcmp(attr, "point") == 0) return mp_read_byref_lv_point_t(data->point); - if (strcmp(attr, "key") == 0) return mp_obj_new_int_from_uint(data->key); - if (strcmp(attr, "btn_id") == 0) return mp_obj_new_int_from_uint(data->btn_id); - if (strcmp(attr, "enc_diff") == 0) return mp_obj_new_int(data->enc_diff); - if (strcmp(attr, "timestamp") == 0) return mp_obj_new_int_from_uint(data->timestamp); - if (strcmp(attr, "continue_reading") == 0) return convert_to_bool(data->continue_reading); - for (PyMethodDef *m = py_lv_indev_data_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); + if (strcmp(attr, "left") == 0) return ptr_to_mp((void*)data->left); + if (strcmp(attr, "right") == 0) return ptr_to_mp((void*)data->right); + if (strcmp(attr, "color") == 0) return mp_obj_new_int(data->color); + if (strcmp(attr, "data") == 0) return ptr_to_mp((void*)data->data); + for (PyMethodDef *m = py_lv_rb_node_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_indev_data_t_field_names[] = {"gesture_type", "gesture_data", "state", "point", "key", "btn_id", "enc_diff", "timestamp", "continue_reading", NULL}; +static const char *const py_lv_rb_node_t_field_names[] = {"parent", "left", "right", "color", "data", NULL}; -static PyObject *py_lv_indev_data_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_rb_node_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_indev_data_t_field_names, py_lv_indev_data_t_methods); + return lvpy_struct_dir(self, py_lv_rb_node_t_field_names, py_lv_rb_node_t_methods); } -static PyMethodDef py_lv_indev_data_t_type_methods[] = { - {"__dir__", py_lv_indev_data_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_rb_node_t_type_methods[] = { + {"__dir__", py_lv_rb_node_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_indev_data_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_rb_node_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_data_t *data = (lv_indev_data_t*)inst->data; + lv_rb_node_t *data = (lv_rb_node_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -57375,141 +69091,147 @@ static int py_lv_indev_data_t_setattro(PyObject *self, PyObject *name, PyObject const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_indev_data_t saved; + lv_rb_node_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "gesture_type") == 0) { memcpy((void*)&data->gesture_type, mp_to_ptr(value), sizeof(lv_indev_gesture_type_t)*LV_INDEV_GESTURE_CNT); result = 0; } - if (strcmp(attr, "gesture_data") == 0) { memcpy((void*)&data->gesture_data, mp_to_ptr(value), sizeof(void *)*LV_INDEV_GESTURE_CNT); result = 0; } - if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "point") == 0) { data->point = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "key") == 0) { data->key = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "btn_id") == 0) { data->btn_id = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "enc_diff") == 0) { data->enc_diff = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "timestamp") == 0) { data->timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "continue_reading") == 0) { data->continue_reading = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "left") == 0) { data->left = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "right") == 0) { data->right = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "data") == 0) { data->data = (void*)mp_to_ptr(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_data_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_rb_node_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_indev_data_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_rb_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_data_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_node_t)); } -static void py_lv_indev_data_t_dealloc(py_lv_struct_t *self) +static void py_lv_rb_node_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_indev_data_t_type = { +PyTypeObject py_lv_rb_node_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_data_t", + .tp_name = "lvgl.lv_rb_node_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_data_t_dealloc, - .tp_getattro = (getter)py_lv_indev_data_t_getattro, - .tp_setattro = (setter)py_lv_indev_data_t_setattro, - .tp_new = py_lv_indev_data_t_new, - .tp_methods = py_lv_indev_data_t_type_methods, + .tp_dealloc = (destructor)py_lv_rb_node_t_dealloc, + .tp_getattro = (getter)py_lv_rb_node_t_getattro, + .tp_setattro = (setter)py_lv_rb_node_t_setattro, + .tp_new = py_lv_rb_node_t_new, + .tp_methods = py_lv_rb_node_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_indev_data_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_rb_node_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_data_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_data_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_rb_node_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_node_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_data_t*)self->data; + return (lv_rb_node_t*)self->data; } -static lv_indev_data_t mp_write_scratch_lv_indev_data_t; +static lv_rb_node_t mp_write_scratch_lv_rb_node_t; -static inline void* mp_write_value_ptr_lv_indev_data_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_rb_node_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_data_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_node_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_indev_data_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_data_t)); + memcpy(&mp_write_scratch_lv_rb_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_node_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_indev_data_t; + return &mp_write_scratch_lv_rb_node_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_indev_data_t(value); + void *p = mp_write_ptr_lv_rb_node_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_data_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_node_t or dict, got None"); } - memset(&mp_write_scratch_lv_indev_data_t, 0, sizeof(lv_indev_data_t)); - return &mp_write_scratch_lv_indev_data_t; + memset(&mp_write_scratch_lv_rb_node_t, 0, sizeof(lv_rb_node_t)); + return &mp_write_scratch_lv_rb_node_t; } -#define mp_write_lv_indev_data_t(struct_obj) (*((lv_indev_data_t*)mp_write_value_ptr_lv_indev_data_t(struct_obj))) +#define mp_write_lv_rb_node_t(struct_obj) (*((lv_rb_node_t*)mp_write_value_ptr_lv_rb_node_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_indev_data_t(void *field) +static inline PyObject *mp_read_ptr_lv_rb_node_t(void *field) { - return lv_to_mp_struct(&py_lv_indev_data_t_type, field); + return lv_to_mp_struct(&py_lv_rb_node_t_type, field); } -#define mp_read_lv_indev_data_t(field) lv_to_mp_struct_own(&py_lv_indev_data_t_type, copy_buffer(&field, sizeof(lv_indev_data_t))) -#define mp_read_byref_lv_indev_data_t(field) mp_read_ptr_lv_indev_data_t(&field) +#define mp_read_lv_rb_node_t(field) lv_to_mp_struct_own(&py_lv_rb_node_t_type, copy_buffer(&field, sizeof(lv_rb_node_t))) +#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) + +#define funcptr_lv_rb_compare_t NULL + +static inline PyObject *mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * Struct lv_draw_mask_rect_dsc_t (CPython) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_rb_t_compare' + * lv_rb_compare_t compare */ + -extern PyMethodDef py_lv_draw_mask_rect_dsc_t_methods[]; +/* + * Struct lv_rb_t (CPython) + */ -static PyObject *py_lv_draw_mask_rect_dsc_t_getattro(PyObject *self, PyObject *name) +extern PyMethodDef py_lv_rb_t_methods[]; + +static PyObject *py_lv_rb_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_mask_rect_dsc_t *data = (lv_draw_mask_rect_dsc_t*)inst->data; + lv_rb_t *data = (lv_rb_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "base") == 0) return mp_read_byref_lv_draw_dsc_base_t(data->base); - if (strcmp(attr, "area") == 0) return mp_read_byref_lv_area_t(data->area); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); - if (strcmp(attr, "keep_outside") == 0) return mp_obj_new_int_from_uint(data->keep_outside); - for (PyMethodDef *m = py_lv_draw_mask_rect_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "root") == 0) return mp_read_ptr_lv_rb_node_t((void*)data->root); + if (strcmp(attr, "compare") == 0) return mp_lv_funcptr(NULL, data->compare, NULL, "lv_rb_t_compare", NULL); + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + for (PyMethodDef *m = py_lv_rb_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_mask_rect_dsc_t_field_names[] = {"base", "area", "radius", "keep_outside", NULL}; +static const char *const py_lv_rb_t_field_names[] = {"root", "compare", "size", NULL}; -static PyObject *py_lv_draw_mask_rect_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_rb_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_mask_rect_dsc_t_field_names, py_lv_draw_mask_rect_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_rb_t_field_names, py_lv_rb_t_methods); } -static PyMethodDef py_lv_draw_mask_rect_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_mask_rect_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_rb_t_type_methods[] = { + {"__dir__", py_lv_rb_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_mask_rect_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_rb_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_mask_rect_dsc_t *data = (lv_draw_mask_rect_dsc_t*)inst->data; + lv_rb_t *data = (lv_rb_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -57517,145 +69239,135 @@ static int py_lv_draw_mask_rect_dsc_t_setattro(PyObject *self, PyObject *name, P const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_mask_rect_dsc_t saved; + lv_rb_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base") == 0) { data->base = mp_write_lv_draw_dsc_base_t(value); result = 0; } - if (strcmp(attr, "area") == 0) { data->area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "keep_outside") == 0) { data->keep_outside = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "root") == 0) { data->root = (void*)mp_write_ptr_lv_rb_node_t(value); result = 0; } + if (strcmp(attr, "compare") == 0) { data->compare = mp_lv_callback(value, NULL, "lv_rb_t_compare", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (size_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_mask_rect_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_rb_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_mask_rect_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_rb_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_mask_rect_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_t)); } -static void py_lv_draw_mask_rect_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_rb_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_mask_rect_dsc_t_type = { +PyTypeObject py_lv_rb_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_mask_rect_dsc_t", + .tp_name = "lvgl.lv_rb_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_mask_rect_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_mask_rect_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_mask_rect_dsc_t_setattro, - .tp_new = py_lv_draw_mask_rect_dsc_t_new, - .tp_methods = py_lv_draw_mask_rect_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_rb_t_dealloc, + .tp_getattro = (getter)py_lv_rb_t_getattro, + .tp_setattro = (setter)py_lv_rb_t_setattro, + .tp_new = py_lv_rb_t_new, + .tp_methods = py_lv_rb_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_mask_rect_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_rb_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_mask_rect_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_mask_rect_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_rb_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_mask_rect_dsc_t*)self->data; + return (lv_rb_t*)self->data; } -static lv_draw_mask_rect_dsc_t mp_write_scratch_lv_draw_mask_rect_dsc_t; +static lv_rb_t mp_write_scratch_lv_rb_t; -static inline void* mp_write_value_ptr_lv_draw_mask_rect_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_rb_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_mask_rect_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_mask_rect_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_mask_rect_dsc_t)); + memcpy(&mp_write_scratch_lv_rb_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_mask_rect_dsc_t; + return &mp_write_scratch_lv_rb_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_mask_rect_dsc_t(value); + void *p = mp_write_ptr_lv_rb_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_mask_rect_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_mask_rect_dsc_t, 0, sizeof(lv_draw_mask_rect_dsc_t)); - return &mp_write_scratch_lv_draw_mask_rect_dsc_t; + memset(&mp_write_scratch_lv_rb_t, 0, sizeof(lv_rb_t)); + return &mp_write_scratch_lv_rb_t; } -#define mp_write_lv_draw_mask_rect_dsc_t(struct_obj) (*((lv_draw_mask_rect_dsc_t*)mp_write_value_ptr_lv_draw_mask_rect_dsc_t(struct_obj))) +#define mp_write_lv_rb_t(struct_obj) (*((lv_rb_t*)mp_write_value_ptr_lv_rb_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_mask_rect_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_rb_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_mask_rect_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_rb_t_type, field); } -#define mp_read_lv_draw_mask_rect_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_mask_rect_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_mask_rect_dsc_t))) -#define mp_read_byref_lv_draw_mask_rect_dsc_t(field) mp_read_ptr_lv_draw_mask_rect_dsc_t(&field) - -#define funcptr_lv_draw_sw_mask_xcb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_draw_sw_mask_xcb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - +#define mp_read_lv_rb_t(field) lv_to_mp_struct_own(&py_lv_rb_t_type, copy_buffer(&field, sizeof(lv_rb_t))) +#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_sw_mask_common_dsc_t_cb' - * lv_draw_sw_mask_xcb_t cb - */ - /* - * Struct lv_draw_sw_mask_common_dsc_t (CPython) + * Struct lv_text_attributes_t (CPython) */ -extern PyMethodDef py_lv_draw_sw_mask_common_dsc_t_methods[]; +extern PyMethodDef py_lv_text_attributes_t_methods[]; -static PyObject *py_lv_draw_sw_mask_common_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_text_attributes_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)inst->data; + lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "cb") == 0) return mp_lv_funcptr(NULL, data->cb, NULL, "lv_draw_sw_mask_common_dsc_t_cb", NULL); - if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); - for (PyMethodDef *m = py_lv_draw_sw_mask_common_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "letter_space") == 0) return mp_obj_new_int(data->letter_space); + if (strcmp(attr, "line_space") == 0) return mp_obj_new_int(data->line_space); + if (strcmp(attr, "max_width") == 0) return mp_obj_new_int(data->max_width); + if (strcmp(attr, "text_flags") == 0) return mp_obj_new_int(data->text_flags); + for (PyMethodDef *m = py_lv_text_attributes_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_sw_mask_common_dsc_t_field_names[] = {"cb", "type", NULL}; +static const char *const py_lv_text_attributes_t_field_names[] = {"letter_space", "line_space", "max_width", "text_flags", NULL}; -static PyObject *py_lv_draw_sw_mask_common_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_text_attributes_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_common_dsc_t_field_names, py_lv_draw_sw_mask_common_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_text_attributes_t_field_names, py_lv_text_attributes_t_methods); } -static PyMethodDef py_lv_draw_sw_mask_common_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_common_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_text_attributes_t_type_methods[] = { + {"__dir__", py_lv_text_attributes_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_sw_mask_common_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_text_attributes_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_common_dsc_t *data = (lv_draw_sw_mask_common_dsc_t*)inst->data; + lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -57663,134 +69375,137 @@ static int py_lv_draw_sw_mask_common_dsc_t_setattro(PyObject *self, PyObject *na const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_sw_mask_common_dsc_t saved; + lv_text_attributes_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "cb") == 0) { data->cb = mp_lv_callback(value, NULL, "lv_draw_sw_mask_common_dsc_t_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "letter_space") == 0) { data->letter_space = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "line_space") == 0) { data->line_space = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "max_width") == 0) { data->max_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "text_flags") == 0) { data->text_flags = (int)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_common_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_text_attributes_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_sw_mask_common_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_text_attributes_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_common_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_text_attributes_t)); } -static void py_lv_draw_sw_mask_common_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_text_attributes_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_sw_mask_common_dsc_t_type = { +PyTypeObject py_lv_text_attributes_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_common_dsc_t", + .tp_name = "lvgl.lv_text_attributes_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_common_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_common_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_common_dsc_t_setattro, - .tp_new = py_lv_draw_sw_mask_common_dsc_t_new, - .tp_methods = py_lv_draw_sw_mask_common_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_text_attributes_t_dealloc, + .tp_getattro = (getter)py_lv_text_attributes_t_getattro, + .tp_setattro = (setter)py_lv_text_attributes_t_setattro, + .tp_new = py_lv_text_attributes_t_new, + .tp_methods = py_lv_text_attributes_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_sw_mask_common_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_text_attributes_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_common_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_common_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_text_attributes_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_common_dsc_t*)self->data; + return (lv_text_attributes_t*)self->data; } -static lv_draw_sw_mask_common_dsc_t mp_write_scratch_lv_draw_sw_mask_common_dsc_t; +static lv_text_attributes_t mp_write_scratch_lv_text_attributes_t; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_common_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_text_attributes_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_common_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_text_attributes_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_common_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_common_dsc_t)); + memcpy(&mp_write_scratch_lv_text_attributes_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_text_attributes_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_common_dsc_t; + return &mp_write_scratch_lv_text_attributes_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_common_dsc_t(value); + void *p = mp_write_ptr_lv_text_attributes_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_common_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_sw_mask_common_dsc_t, 0, sizeof(lv_draw_sw_mask_common_dsc_t)); - return &mp_write_scratch_lv_draw_sw_mask_common_dsc_t; + memset(&mp_write_scratch_lv_text_attributes_t, 0, sizeof(lv_text_attributes_t)); + return &mp_write_scratch_lv_text_attributes_t; } -#define mp_write_lv_draw_sw_mask_common_dsc_t(struct_obj) (*((lv_draw_sw_mask_common_dsc_t*)mp_write_value_ptr_lv_draw_sw_mask_common_dsc_t(struct_obj))) +#define mp_write_lv_text_attributes_t(struct_obj) (*((lv_text_attributes_t*)mp_write_value_ptr_lv_text_attributes_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_common_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_text_attributes_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_common_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_text_attributes_t_type, field); } -#define mp_read_lv_draw_sw_mask_common_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_common_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_common_dsc_t))) -#define mp_read_byref_lv_draw_sw_mask_common_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_common_dsc_t(&field) +#define mp_read_lv_text_attributes_t(field) lv_to_mp_struct_own(&py_lv_text_attributes_t_type, copy_buffer(&field, sizeof(lv_text_attributes_t))) +#define mp_read_byref_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(&field) -typedef __typeof__( ((lv_draw_sw_mask_line_param_t*)(0))->cfg ) lv_draw_sw_mask_line_param_cfg_t; /* - * Struct lv_draw_sw_mask_line_param_cfg_t (CPython) + * Struct lv_tree_node_t (CPython) */ -extern PyMethodDef py_lv_draw_sw_mask_line_param_cfg_t_methods[]; +extern PyMethodDef py_lv_tree_node_t_methods[]; -static PyObject *py_lv_draw_sw_mask_line_param_cfg_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_tree_node_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)inst->data; + lv_tree_node_t *data = (lv_tree_node_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "p1") == 0) return mp_read_byref_lv_point_t(data->p1); - if (strcmp(attr, "p2") == 0) return mp_read_byref_lv_point_t(data->p2); - if (strcmp(attr, "side") == 0) return mp_obj_new_int(data->side); - for (PyMethodDef *m = py_lv_draw_sw_mask_line_param_cfg_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); + if (strcmp(attr, "children") == 0) return ptr_to_mp((void*)data->children); + if (strcmp(attr, "child_cnt") == 0) return mp_obj_new_int_from_uint(data->child_cnt); + if (strcmp(attr, "child_cap") == 0) return mp_obj_new_int_from_uint(data->child_cap); + if (strcmp(attr, "class_p") == 0) return mp_read_ptr_lv_tree_class_t((void*)data->class_p); + for (PyMethodDef *m = py_lv_tree_node_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_sw_mask_line_param_cfg_t_field_names[] = {"p1", "p2", "side", NULL}; +static const char *const py_lv_tree_node_t_field_names[] = {"parent", "children", "child_cnt", "child_cap", "class_p", NULL}; -static PyObject *py_lv_draw_sw_mask_line_param_cfg_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_tree_node_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_line_param_cfg_t_field_names, py_lv_draw_sw_mask_line_param_cfg_t_methods); + return lvpy_struct_dir(self, py_lv_tree_node_t_field_names, py_lv_tree_node_t_methods); } -static PyMethodDef py_lv_draw_sw_mask_line_param_cfg_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_line_param_cfg_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_tree_node_t_type_methods[] = { + {"__dir__", py_lv_tree_node_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_sw_mask_line_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_tree_node_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_line_param_cfg_t *data = (lv_draw_sw_mask_line_param_cfg_t*)inst->data; + lv_tree_node_t *data = (lv_tree_node_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -57798,696 +69513,1305 @@ static int py_lv_draw_sw_mask_line_param_cfg_t_setattro(PyObject *self, PyObject const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_sw_mask_line_param_cfg_t saved; + lv_tree_node_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "p1") == 0) { data->p1 = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "p2") == 0) { data->p2 = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "side") == 0) { data->side = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "children") == 0) { data->children = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "child_cnt") == 0) { data->child_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "child_cap") == 0) { data->child_cap = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "class_p") == 0) { data->class_p = (void*)mp_write_ptr_lv_tree_class_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_line_param_cfg_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_tree_node_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_sw_mask_line_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_tree_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_line_param_cfg_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_tree_node_t)); } -static void py_lv_draw_sw_mask_line_param_cfg_t_dealloc(py_lv_struct_t *self) +static void py_lv_tree_node_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_sw_mask_line_param_cfg_t_type = { +PyTypeObject py_lv_tree_node_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_line_param_cfg_t", + .tp_name = "lvgl.lv_tree_node_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_line_param_cfg_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_line_param_cfg_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_line_param_cfg_t_setattro, - .tp_new = py_lv_draw_sw_mask_line_param_cfg_t_new, - .tp_methods = py_lv_draw_sw_mask_line_param_cfg_t_type_methods, + .tp_dealloc = (destructor)py_lv_tree_node_t_dealloc, + .tp_getattro = (getter)py_lv_tree_node_t_getattro, + .tp_setattro = (setter)py_lv_tree_node_t_setattro, + .tp_new = py_lv_tree_node_t_new, + .tp_methods = py_lv_tree_node_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_tree_node_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_line_param_cfg_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_tree_node_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_tree_node_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_line_param_cfg_t*)self->data; + return (lv_tree_node_t*)self->data; } -static lv_draw_sw_mask_line_param_cfg_t mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t; +static lv_tree_node_t mp_write_scratch_lv_tree_node_t; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_line_param_cfg_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_tree_node_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_line_param_cfg_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_tree_node_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_line_param_cfg_t)); + memcpy(&mp_write_scratch_lv_tree_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_tree_node_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t; + return &mp_write_scratch_lv_tree_node_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_line_param_cfg_t(value); + void *p = mp_write_ptr_lv_tree_node_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_cfg_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_tree_node_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t, 0, sizeof(lv_draw_sw_mask_line_param_cfg_t)); - return &mp_write_scratch_lv_draw_sw_mask_line_param_cfg_t; + memset(&mp_write_scratch_lv_tree_node_t, 0, sizeof(lv_tree_node_t)); + return &mp_write_scratch_lv_tree_node_t; } -#define mp_write_lv_draw_sw_mask_line_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_line_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_line_param_cfg_t(struct_obj))) +#define mp_write_lv_tree_node_t(struct_obj) (*((lv_tree_node_t*)mp_write_value_ptr_lv_tree_node_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(void *field) +static inline PyObject *mp_read_ptr_lv_tree_node_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_line_param_cfg_t_type, field); + return lv_to_mp_struct(&py_lv_tree_node_t_type, field); +} + +#define mp_read_lv_tree_node_t(field) lv_to_mp_struct_own(&py_lv_tree_node_t_type, copy_buffer(&field, sizeof(lv_tree_node_t))) +#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) + + +/* + * + * Global Module Functions + * + */ + + +/* + * lvgl extension definition for: + * inline static int32_t lv_sqr(int32_t x) + */ +static PyObject *py_lv_sqr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int32_t))lv_sqr)(x); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_sqr_def = { + "lv_sqr", + (PyCFunction)py_lv_sqr, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static uint16_t lv_color_swap_16(uint16_t c) + */ +static PyObject *py_lv_color_swap_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t c = (uint16_t)c_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint16_t _res; + lvpy_lock(); + _res = ((uint16_t (*)(uint16_t))lv_color_swap_16)(c); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} + +static PyMethodDef py_lv_color_swap_16_def = { + "lv_color_swap_16", + (PyCFunction)py_lv_color_swap_16, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static void lv_memzero(void *dst, size_t len) + */ +static PyObject *py_lv_memzero(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *dst_py; long len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &dst_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + size_t len = (size_t)len_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void *, size_t))lv_memzero)(dst, len); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_memzero_def = { + "lv_memzero", + (PyCFunction)py_lv_memzero, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static bool lv_streq(const char *s1, const char *s2) + */ +static PyObject *py_lv_streq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *s1_py; PyObject *s2_py; + if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } + const char *s1 = (const char *)(char*)convert_from_str(s1_py); + const char *s2 = (const char *)(char*)convert_from_str(s2_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const char *, const char *))lv_streq)(s1, s2); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_streq_def = { + "lv_streq", + (PyCFunction)py_lv_streq, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) + */ +static PyObject *py_lv_style_get_prop_group(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_style_prop_t))lv_style_get_prop_group)(prop); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} + +static PyMethodDef py_lv_style_get_prop_group_def = { + "lv_style_get_prop_group", + (PyCFunction)py_lv_style_get_prop_group, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) + */ +static PyObject *py_lv_style_prop_has_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *prop_py; long flag_val; + if (!PyArg_ParseTuple(py_args, "Ol", &prop_py, &flag_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + uint8_t flag = (uint8_t)flag_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_style_prop_has_flag)(prop, flag); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_style_prop_has_flag_def = { + "lv_style_prop_has_flag", + (PyCFunction)py_lv_style_prop_has_flag, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static uint32_t lv_task_handler(void) + */ +static PyObject *py_lv_task_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + Py_BEGIN_ALLOW_THREADS + _res = ((uint32_t (*)(void))lv_task_handler)(); + Py_END_ALLOW_THREADS + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} + +static PyMethodDef py_lv_task_handler_def = { + "lv_task_handler", + (PyCFunction)py_lv_task_handler, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static int lv_version_major(void) + */ +static PyObject *py_lv_version_major(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int _res; + lvpy_lock(); + _res = ((int (*)(void))lv_version_major)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_version_major_def = { + "lv_version_major", + (PyCFunction)py_lv_version_major, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static int lv_version_minor(void) + */ +static PyObject *py_lv_version_minor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int _res; + lvpy_lock(); + _res = ((int (*)(void))lv_version_minor)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_version_minor_def = { + "lv_version_minor", + (PyCFunction)py_lv_version_minor, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static int lv_version_patch(void) + */ +static PyObject *py_lv_version_patch(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int _res; + lvpy_lock(); + _res = ((int (*)(void))lv_version_patch)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_version_patch_def = { + "lv_version_patch", + (PyCFunction)py_lv_version_patch, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static const char *lv_version_info(void) + */ +static PyObject *py_lv_version_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const char * _res; + lvpy_lock(); + _res = ((const char *(*)(void))lv_version_info)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_str((void*)_res); +} + +static PyMethodDef py_lv_version_info_def = { + "lv_version_info", + (PyCFunction)py_lv_version_info, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_thread_init_callback (CPython) + * void callback(void *) + */ +static void lv_thread_init_callback_callback(void *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_thread_init_callback"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) + */ +static PyObject *py_lv_thread_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *thread_py; PyObject *name_py; PyObject *prio_py; PyObject *callback_py; long stack_size_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOOOlO", &thread_py, &name_py, &prio_py, &callback_py, &stack_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + lv_thread_t *thread = mp_to_ptr(thread_py); + const char * const name = (const char * const)(char*)convert_from_str(name_py); + lv_thread_prio_t prio = (int)mp_obj_get_int(prio_py); + size_t stack_size = (size_t)stack_size_val; + void *callback = mp_lv_callback(callback_py, &lv_thread_init_callback_callback, "lv_thread_init_callback", &user_data, NULL, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_thread_init)(thread, name, prio, callback, stack_size, user_data); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_thread_init_def = { + "lv_thread_init", + (PyCFunction)py_lv_thread_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) + */ +static PyObject *py_lv_thread_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *thread_py; + if (!PyArg_ParseTuple(py_args, "O", &thread_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_t *thread = mp_to_ptr(thread_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_thread_t *))lv_thread_delete)(thread); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_draw_sw_mask_line_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_line_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_cfg_t(&field) +static PyMethodDef py_lv_thread_delete_def = { + "lv_thread_delete", + (PyCFunction)py_lv_thread_delete, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_sw_mask_line_param_t (CPython) + * lvgl extension definition for: + * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) */ - -extern PyMethodDef py_lv_draw_sw_mask_line_param_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_line_param_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_mutex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); - if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_line_param_cfg_t(data->cfg); - if (strcmp(attr, "origo") == 0) return mp_read_byref_lv_point_t(data->origo); - if (strcmp(attr, "xy_steep") == 0) return mp_obj_new_int(data->xy_steep); - if (strcmp(attr, "yx_steep") == 0) return mp_obj_new_int(data->yx_steep); - if (strcmp(attr, "steep") == 0) return mp_obj_new_int(data->steep); - if (strcmp(attr, "spx") == 0) return mp_obj_new_int(data->spx); - if (strcmp(attr, "flat") == 0) return mp_obj_new_int_from_uint(data->flat); - if (strcmp(attr, "inv") == 0) return mp_obj_new_int_from_uint(data->inv); - for (PyMethodDef *m = py_lv_draw_sw_mask_line_param_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_init)(mutex); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_draw_sw_mask_line_param_t_field_names[] = {"dsc", "cfg", "origo", "xy_steep", "yx_steep", "steep", "spx", "flat", "inv", NULL}; +static PyMethodDef py_lv_mutex_init_def = { + "lv_mutex_init", + (PyCFunction)py_lv_mutex_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_line_param_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * inline static lv_result_t lv_mutex_lock(lv_mutex_t *mutex) + */ +static PyObject *py_lv_mutex_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_line_param_t_field_names, py_lv_draw_sw_mask_line_param_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock)(mutex); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_mask_line_param_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_line_param_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_mutex_lock_def = { + "lv_mutex_lock", + (PyCFunction)py_lv_mutex_lock, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_line_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_line_param_t *data = (lv_draw_sw_mask_line_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_line_param_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } - if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_line_param_cfg_t(value); result = 0; } - if (strcmp(attr, "origo") == 0) { data->origo = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "xy_steep") == 0) { data->xy_steep = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "yx_steep") == 0) { data->yx_steep = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "steep") == 0) { data->steep = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "spx") == 0) { data->spx = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "flat") == 0) { data->flat = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "inv") == 0) { data->inv = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_line_param_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_mask_line_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_line_param_t)); -} -static void py_lv_draw_sw_mask_line_param_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * inline static lv_result_t lv_mutex_lock_isr(lv_mutex_t *mutex) + */ +static PyObject *py_lv_mutex_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock_isr)(mutex); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_draw_sw_mask_line_param_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_line_param_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_line_param_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_line_param_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_line_param_t_setattro, - .tp_new = py_lv_draw_sw_mask_line_param_t_new, - .tp_methods = py_lv_draw_sw_mask_line_param_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_mutex_lock_isr_def = { + "lv_mutex_lock_isr", + (PyCFunction)py_lv_mutex_lock_isr, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_line_param_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_line_param_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_line_param_t*)self->data; -} - -static lv_draw_sw_mask_line_param_t mp_write_scratch_lv_draw_sw_mask_line_param_t; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_line_param_t(PyObject *value) +/* + * lvgl extension definition for: + * inline static lv_result_t lv_mutex_unlock(lv_mutex_t *mutex) + */ +static PyObject *py_lv_mutex_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_line_param_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_line_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_line_param_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_line_param_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_line_param_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_line_param_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_line_param_t, 0, sizeof(lv_draw_sw_mask_line_param_t)); - return &mp_write_scratch_lv_draw_sw_mask_line_param_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_unlock)(mutex); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_draw_sw_mask_line_param_t(struct_obj) (*((lv_draw_sw_mask_line_param_t*)mp_write_value_ptr_lv_draw_sw_mask_line_param_t(struct_obj))) +static PyMethodDef py_lv_mutex_unlock_def = { + "lv_mutex_unlock", + (PyCFunction)py_lv_mutex_unlock, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_line_param_t(void *field) + +/* + * lvgl extension definition for: + * inline static lv_result_t lv_mutex_delete(lv_mutex_t *mutex) + */ +static PyObject *py_lv_mutex_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_line_param_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_delete)(mutex); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_draw_sw_mask_line_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_line_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_line_param_t))) -#define mp_read_byref_lv_draw_sw_mask_line_param_t(field) mp_read_ptr_lv_draw_sw_mask_line_param_t(&field) +static PyMethodDef py_lv_mutex_delete_def = { + "lv_mutex_delete", + (PyCFunction)py_lv_mutex_delete, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -typedef __typeof__( ((lv_draw_sw_mask_angle_param_t*)(0))->cfg ) lv_draw_sw_mask_angle_param_cfg_t; /* - * Struct lv_draw_sw_mask_angle_param_cfg_t (CPython) + * lvgl extension definition for: + * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) */ - -extern PyMethodDef py_lv_draw_sw_mask_angle_param_cfg_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_angle_param_cfg_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_thread_sync_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "vertex_p") == 0) return mp_read_byref_lv_point_t(data->vertex_p); - if (strcmp(attr, "start_angle") == 0) return mp_obj_new_int(data->start_angle); - if (strcmp(attr, "end_angle") == 0) return mp_obj_new_int(data->end_angle); - for (PyMethodDef *m = py_lv_draw_sw_mask_angle_param_cfg_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_init)(sync); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_draw_sw_mask_angle_param_cfg_t_field_names[] = {"vertex_p", "start_angle", "end_angle", NULL}; +static PyMethodDef py_lv_thread_sync_init_def = { + "lv_thread_sync_init", + (PyCFunction)py_lv_thread_sync_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_angle_param_cfg_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * inline static lv_result_t lv_thread_sync_wait(lv_thread_sync_t *sync) + */ +static PyObject *py_lv_thread_sync_wait(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_angle_param_cfg_t_field_names, py_lv_draw_sw_mask_angle_param_cfg_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_wait)(sync); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_mask_angle_param_cfg_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_angle_param_cfg_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_thread_sync_wait_def = { + "lv_thread_sync_wait", + (PyCFunction)py_lv_thread_sync_wait, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_angle_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_angle_param_cfg_t *data = (lv_draw_sw_mask_angle_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_angle_param_cfg_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "vertex_p") == 0) { data->vertex_p = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "start_angle") == 0) { data->start_angle = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "end_angle") == 0) { data->end_angle = (int32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_angle_param_cfg_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_mask_angle_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_angle_param_cfg_t)); -} -static void py_lv_draw_sw_mask_angle_param_cfg_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * inline static lv_result_t lv_thread_sync_signal(lv_thread_sync_t *sync) + */ +static PyObject *py_lv_thread_sync_signal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal)(sync); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_draw_sw_mask_angle_param_cfg_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_angle_param_cfg_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_angle_param_cfg_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_angle_param_cfg_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_angle_param_cfg_t_setattro, - .tp_new = py_lv_draw_sw_mask_angle_param_cfg_t_new, - .tp_methods = py_lv_draw_sw_mask_angle_param_cfg_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_thread_sync_signal_def = { + "lv_thread_sync_signal", + (PyCFunction)py_lv_thread_sync_signal, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * inline static lv_result_t lv_thread_sync_signal_isr(lv_thread_sync_t *sync) + */ +static PyObject *py_lv_thread_sync_signal_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_angle_param_cfg_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_angle_param_cfg_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal_isr)(sync); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static lv_draw_sw_mask_angle_param_cfg_t mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t; +static PyMethodDef py_lv_thread_sync_signal_isr_def = { + "lv_thread_sync_signal_isr", + (PyCFunction)py_lv_thread_sync_signal_isr, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_angle_param_cfg_t(PyObject *value) + +/* + * lvgl extension definition for: + * inline static lv_result_t lv_thread_sync_delete(lv_thread_sync_t *sync) + */ +static PyObject *py_lv_thread_sync_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_angle_param_cfg_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_angle_param_cfg_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_angle_param_cfg_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_cfg_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t, 0, sizeof(lv_draw_sw_mask_angle_param_cfg_t)); - return &mp_write_scratch_lv_draw_sw_mask_angle_param_cfg_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_delete)(sync); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_draw_sw_mask_angle_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_angle_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_angle_param_cfg_t(struct_obj))) +static PyMethodDef py_lv_thread_sync_delete_def = { + "lv_thread_sync_delete", + (PyCFunction)py_lv_thread_sync_delete, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(void *field) + +/* + * lvgl extension definition for: + * inline static uint16_t lv_color_16_16_mix_inlined(uint16_t c1, uint16_t c2, uint8_t mix) + */ +static PyObject *py_lv_color_16_16_mix_inlined(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_angle_param_cfg_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long c1_val; long c2_val; long mix_val; + if (!PyArg_ParseTuple(py_args, "lll", &c1_val, &c2_val, &mix_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t c1 = (uint16_t)c1_val; + uint16_t c2 = (uint16_t)c2_val; + uint8_t mix = (uint8_t)mix_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint16_t _res; + lvpy_lock(); + _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_color_16_16_mix_inlined)(c1, c2, mix); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -#define mp_read_lv_draw_sw_mask_angle_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_angle_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_cfg_t(&field) +static PyMethodDef py_lv_color_16_16_mix_inlined_def = { + "lv_color_16_16_mix_inlined", + (PyCFunction)py_lv_color_16_16_mix_inlined, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_sw_mask_angle_param_t (CPython) + * lvgl extension definition for: + * inline static void lv_bidi_calculate_align_internal(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) */ - -extern PyMethodDef py_lv_draw_sw_mask_angle_param_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_angle_param_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_bidi_calculate_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); - if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_angle_param_cfg_t(data->cfg); - if (strcmp(attr, "start_line") == 0) return mp_read_byref_lv_draw_sw_mask_line_param_t(data->start_line); - if (strcmp(attr, "end_line") == 0) return mp_read_byref_lv_draw_sw_mask_line_param_t(data->end_line); - if (strcmp(attr, "delta_deg") == 0) return mp_obj_new_int_from_uint(data->delta_deg); - for (PyMethodDef *m = py_lv_draw_sw_mask_angle_param_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *align_py; PyObject *base_dir_py; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "OOO", &align_py, &base_dir_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_text_align_t *align = mp_array_to_i32ptr(align_py); + lv_base_dir_t *base_dir = mp_array_to_i32ptr(base_dir_py); + const char *txt = (const char *)(char*)convert_from_str(txt_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_bidi_calculate_align_internal)(align, base_dir, txt); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static const char *const py_lv_draw_sw_mask_angle_param_t_field_names[] = {"dsc", "cfg", "start_line", "end_line", "delta_deg", NULL}; +static PyMethodDef py_lv_bidi_calculate_align_internal_def = { + "lv_bidi_calculate_align_internal", + (PyCFunction)py_lv_bidi_calculate_align_internal, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_angle_param_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * inline static bool lv_text_is_break_char(uint32_t letter) + */ +static PyObject *py_lv_text_is_break_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_angle_param_t_field_names, py_lv_draw_sw_mask_angle_param_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(uint32_t))lv_text_is_break_char)(letter); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_mask_angle_param_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_angle_param_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_text_is_break_char_def = { + "lv_text_is_break_char", + (PyCFunction)py_lv_text_is_break_char, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_angle_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_angle_param_t *data = (lv_draw_sw_mask_angle_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_angle_param_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } - if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_angle_param_cfg_t(value); result = 0; } - if (strcmp(attr, "start_line") == 0) { data->start_line = mp_write_lv_draw_sw_mask_line_param_t(value); result = 0; } - if (strcmp(attr, "end_line") == 0) { data->end_line = mp_write_lv_draw_sw_mask_line_param_t(value); result = 0; } - if (strcmp(attr, "delta_deg") == 0) { data->delta_deg = (uint16_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_angle_param_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_mask_angle_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_angle_param_t)); -} -static void py_lv_draw_sw_mask_angle_param_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * inline static bool lv_text_is_hanging_space(uint32_t letter) + */ +static PyObject *py_lv_text_is_hanging_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(uint32_t))lv_text_is_hanging_space)(letter); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -PyTypeObject py_lv_draw_sw_mask_angle_param_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_angle_param_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_angle_param_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_angle_param_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_angle_param_t_setattro, - .tp_new = py_lv_draw_sw_mask_angle_param_t_new, - .tp_methods = py_lv_draw_sw_mask_angle_param_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_text_is_hanging_space_def = { + "lv_text_is_hanging_space", + (PyCFunction)py_lv_text_is_hanging_space, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_angle_param_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_angle_param_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_angle_param_t*)self->data; -} - -static lv_draw_sw_mask_angle_param_t mp_write_scratch_lv_draw_sw_mask_angle_param_t; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_angle_param_t(PyObject *value) +/* + * lvgl extension definition for: + * inline static bool lv_text_is_a_word(uint32_t letter) + */ +static PyObject *py_lv_text_is_a_word(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_angle_param_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_angle_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_angle_param_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_angle_param_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_angle_param_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_angle_param_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_angle_param_t, 0, sizeof(lv_draw_sw_mask_angle_param_t)); - return &mp_write_scratch_lv_draw_sw_mask_angle_param_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(uint32_t))lv_text_is_a_word)(letter); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -#define mp_write_lv_draw_sw_mask_angle_param_t(struct_obj) (*((lv_draw_sw_mask_angle_param_t*)mp_write_value_ptr_lv_draw_sw_mask_angle_param_t(struct_obj))) +static PyMethodDef py_lv_text_is_a_word_def = { + "lv_text_is_a_word", + (PyCFunction)py_lv_text_is_a_word, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_angle_param_t(void *field) + +/* + * lvgl extension definition for: + * inline static bool lv_text_is_marker(uint32_t letter) + */ +static PyObject *py_lv_text_is_marker(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_angle_param_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(uint32_t))lv_text_is_marker)(letter); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -#define mp_read_lv_draw_sw_mask_angle_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_angle_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_angle_param_t))) -#define mp_read_byref_lv_draw_sw_mask_angle_param_t(field) mp_read_ptr_lv_draw_sw_mask_angle_param_t(&field) +static PyMethodDef py_lv_text_is_marker_def = { + "lv_text_is_marker", + (PyCFunction)py_lv_text_is_marker, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -typedef __typeof__( ((lv_draw_sw_mask_radius_param_t*)(0))->cfg ) lv_draw_sw_mask_radius_param_cfg_t; /* - * Struct lv_draw_sw_mask_radius_param_cfg_t (CPython) + * lvgl extension definition for: + * inline static uint32_t lv_swap_bytes_32(uint32_t x) */ - -extern PyMethodDef py_lv_draw_sw_mask_radius_param_cfg_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_radius_param_cfg_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_swap_bytes_32(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "rect") == 0) return mp_read_byref_lv_area_t(data->rect); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); - if (strcmp(attr, "outer") == 0) return mp_obj_new_int_from_uint(data->outer); - for (PyMethodDef *m = py_lv_draw_sw_mask_radius_param_cfg_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t x = (uint32_t)x_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(uint32_t))lv_swap_bytes_32)(x); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static const char *const py_lv_draw_sw_mask_radius_param_cfg_t_field_names[] = {"rect", "radius", "outer", NULL}; +static PyMethodDef py_lv_swap_bytes_32_def = { + "lv_swap_bytes_32", + (PyCFunction)py_lv_swap_bytes_32, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_radius_param_cfg_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * inline static uint16_t lv_swap_bytes_16(uint16_t x) + */ +static PyObject *py_lv_swap_bytes_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_radius_param_cfg_t_field_names, py_lv_draw_sw_mask_radius_param_cfg_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t x = (uint16_t)x_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint16_t _res; + lvpy_lock(); + _res = ((uint16_t (*)(uint16_t))lv_swap_bytes_16)(x); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_mask_radius_param_cfg_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_radius_param_cfg_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_swap_bytes_16_def = { + "lv_swap_bytes_16", + (PyCFunction)py_lv_swap_bytes_16, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_radius_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_radius_param_cfg_t *data = (lv_draw_sw_mask_radius_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_radius_param_cfg_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "rect") == 0) { data->rect = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "outer") == 0) { data->outer = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_radius_param_cfg_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_draw_sw_mask_radius_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * int32_t lv_trigo_sin(int16_t angle) + */ +static PyObject *py_lv_trigo_sin(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_radius_param_cfg_t)); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long angle_val; + if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } + int16_t angle = (int16_t)angle_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int16_t))lv_trigo_sin)(angle); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static void py_lv_draw_sw_mask_radius_param_cfg_t_dealloc(py_lv_struct_t *self) +static PyMethodDef py_lv_trigo_sin_def = { + "lv_trigo_sin", + (PyCFunction)py_lv_trigo_sin, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * int32_t lv_trigo_cos(int16_t angle) + */ +static PyObject *py_lv_trigo_cos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long angle_val; + if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } + int16_t angle = (int16_t)angle_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int16_t))lv_trigo_cos)(angle); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_draw_sw_mask_radius_param_cfg_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_radius_param_cfg_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_radius_param_cfg_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_radius_param_cfg_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_radius_param_cfg_t_setattro, - .tp_new = py_lv_draw_sw_mask_radius_param_cfg_t_new, - .tp_methods = py_lv_draw_sw_mask_radius_param_cfg_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_trigo_cos_def = { + "lv_trigo_cos", + (PyCFunction)py_lv_trigo_cos, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * int32_t lv_cubic_bezier(int32_t x, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + */ +static PyObject *py_lv_cubic_bezier(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_radius_param_cfg_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_radius_param_cfg_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; long x1_val; long y1_val; long x2_val; long y2_val; + if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + int32_t x1 = (int32_t)x1_val; + int32_t y1 = (int32_t)y1_val; + int32_t x2 = (int32_t)x2_val; + int32_t y2 = (int32_t)y2_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_cubic_bezier)(x, x1, y1, x2, y2); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static lv_draw_sw_mask_radius_param_cfg_t mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t; +static PyMethodDef py_lv_cubic_bezier_def = { + "lv_cubic_bezier", + (PyCFunction)py_lv_cubic_bezier, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_radius_param_cfg_t(PyObject *value) + +/* + * lvgl extension definition for: + * int32_t lv_bezier3(int32_t t, int32_t u0, uint32_t u1, int32_t u2, int32_t u3) + */ +static PyObject *py_lv_bezier3(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_radius_param_cfg_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_radius_param_cfg_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_radius_param_cfg_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_cfg_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t, 0, sizeof(lv_draw_sw_mask_radius_param_cfg_t)); - return &mp_write_scratch_lv_draw_sw_mask_radius_param_cfg_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long t_val; long u0_val; long u1_val; long u2_val; long u3_val; + if (!PyArg_ParseTuple(py_args, "lllll", &t_val, &u0_val, &u1_val, &u2_val, &u3_val)) { PyGILState_Release(gstate); return NULL; } + int32_t t = (int32_t)t_val; + int32_t u0 = (int32_t)u0_val; + uint32_t u1 = (uint32_t)u1_val; + int32_t u2 = (int32_t)u2_val; + int32_t u3 = (int32_t)u3_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int32_t, int32_t, uint32_t, int32_t, int32_t))lv_bezier3)(t, u0, u1, u2, u3); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_draw_sw_mask_radius_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_radius_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_radius_param_cfg_t(struct_obj))) +static PyMethodDef py_lv_bezier3_def = { + "lv_bezier3", + (PyCFunction)py_lv_bezier3, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(void *field) + +/* + * lvgl extension definition for: + * uint16_t lv_atan2(int x, int y) + */ +static PyObject *py_lv_atan2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_radius_param_cfg_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + int x = (int)x_val; + int y = (int)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint16_t _res; + lvpy_lock(); + _res = ((uint16_t (*)(int, int))lv_atan2)(x, y); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -#define mp_read_lv_draw_sw_mask_radius_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_radius_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_cfg_t(&field) +static PyMethodDef py_lv_atan2_def = { + "lv_atan2", + (PyCFunction)py_lv_atan2, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_sw_mask_radius_circle_dsc_t (CPython) + * Struct lv_sqrt_res_t (CPython) */ -extern PyMethodDef py_lv_draw_sw_mask_radius_circle_dsc_t_methods[]; +extern PyMethodDef py_lv_sqrt_res_t_methods[]; -static PyObject *py_lv_draw_sw_mask_radius_circle_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_sqrt_res_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)inst->data; + lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "buf") == 0) return mp_array_from_u8ptr((void*)data->buf); - if (strcmp(attr, "cir_opa") == 0) return mp_array_from_u8ptr((void*)data->cir_opa); - if (strcmp(attr, "x_start_on_y") == 0) return mp_array_from_u16ptr((void*)data->x_start_on_y); - if (strcmp(attr, "opa_start_on_y") == 0) return mp_array_from_u16ptr((void*)data->opa_start_on_y); - if (strcmp(attr, "life") == 0) return mp_obj_new_int(data->life); - if (strcmp(attr, "used_cnt") == 0) return mp_obj_new_int_from_uint(data->used_cnt); - if (strcmp(attr, "radius") == 0) return mp_obj_new_int(data->radius); - for (PyMethodDef *m = py_lv_draw_sw_mask_radius_circle_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "i") == 0) return mp_obj_new_int_from_uint(data->i); + if (strcmp(attr, "f") == 0) return mp_obj_new_int_from_uint(data->f); + for (PyMethodDef *m = py_lv_sqrt_res_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_sw_mask_radius_circle_dsc_t_field_names[] = {"buf", "cir_opa", "x_start_on_y", "opa_start_on_y", "life", "used_cnt", "radius", NULL}; +static const char *const py_lv_sqrt_res_t_field_names[] = {"i", "f", NULL}; -static PyObject *py_lv_draw_sw_mask_radius_circle_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_sqrt_res_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_radius_circle_dsc_t_field_names, py_lv_draw_sw_mask_radius_circle_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_sqrt_res_t_field_names, py_lv_sqrt_res_t_methods); } -static PyMethodDef py_lv_draw_sw_mask_radius_circle_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_radius_circle_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_sqrt_res_t_type_methods[] = { + {"__dir__", py_lv_sqrt_res_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_sw_mask_radius_circle_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_sqrt_res_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_radius_circle_dsc_t *data = (lv_draw_sw_mask_radius_circle_dsc_t*)inst->data; + lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -58495,1080 +70819,1545 @@ static int py_lv_draw_sw_mask_radius_circle_dsc_t_setattro(PyObject *self, PyObj const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_sw_mask_radius_circle_dsc_t saved; + lv_sqrt_res_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "buf") == 0) { data->buf = (void*)mp_array_to_u8ptr(value); result = 0; } - if (strcmp(attr, "cir_opa") == 0) { data->cir_opa = (void*)mp_array_to_u8ptr(value); result = 0; } - if (strcmp(attr, "x_start_on_y") == 0) { data->x_start_on_y = (void*)mp_array_to_u16ptr(value); result = 0; } - if (strcmp(attr, "opa_start_on_y") == 0) { data->opa_start_on_y = (void*)mp_array_to_u16ptr(value); result = 0; } - if (strcmp(attr, "life") == 0) { data->life = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "used_cnt") == 0) { data->used_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "radius") == 0) { data->radius = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "i") == 0) { data->i = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "f") == 0) { data->f = (uint16_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_radius_circle_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_sqrt_res_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_sw_mask_radius_circle_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_sqrt_res_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_radius_circle_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_sqrt_res_t)); } -static void py_lv_draw_sw_mask_radius_circle_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_sqrt_res_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_sw_mask_radius_circle_dsc_t_type = { +PyTypeObject py_lv_sqrt_res_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_radius_circle_dsc_t", + .tp_name = "lvgl.lv_sqrt_res_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_radius_circle_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_radius_circle_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_radius_circle_dsc_t_setattro, - .tp_new = py_lv_draw_sw_mask_radius_circle_dsc_t_new, - .tp_methods = py_lv_draw_sw_mask_radius_circle_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_sqrt_res_t_dealloc, + .tp_getattro = (getter)py_lv_sqrt_res_t_getattro, + .tp_setattro = (setter)py_lv_sqrt_res_t_setattro, + .tp_new = py_lv_sqrt_res_t_new, + .tp_methods = py_lv_sqrt_res_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_sqrt_res_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_radius_circle_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_circle_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_sqrt_res_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_radius_circle_dsc_t*)self->data; + return (lv_sqrt_res_t*)self->data; } -static lv_draw_sw_mask_radius_circle_dsc_t mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t; +static lv_sqrt_res_t mp_write_scratch_lv_sqrt_res_t; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_radius_circle_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_sqrt_res_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_radius_circle_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_sqrt_res_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_radius_circle_dsc_t)); + memcpy(&mp_write_scratch_lv_sqrt_res_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_sqrt_res_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t; + return &mp_write_scratch_lv_sqrt_res_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(value); + void *p = mp_write_ptr_lv_sqrt_res_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_circle_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t, 0, sizeof(lv_draw_sw_mask_radius_circle_dsc_t)); - return &mp_write_scratch_lv_draw_sw_mask_radius_circle_dsc_t; + memset(&mp_write_scratch_lv_sqrt_res_t, 0, sizeof(lv_sqrt_res_t)); + return &mp_write_scratch_lv_sqrt_res_t; } -#define mp_write_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj) (*((lv_draw_sw_mask_radius_circle_dsc_t*)mp_write_value_ptr_lv_draw_sw_mask_radius_circle_dsc_t(struct_obj))) +#define mp_write_lv_sqrt_res_t(struct_obj) (*((lv_sqrt_res_t*)mp_write_value_ptr_lv_sqrt_res_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_sqrt_res_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_radius_circle_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_sqrt_res_t_type, field); } -#define mp_read_lv_draw_sw_mask_radius_circle_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_radius_circle_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_circle_dsc_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_circle_dsc_t(field) mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t(&field) +#define mp_read_lv_sqrt_res_t(field) lv_to_mp_struct_own(&py_lv_sqrt_res_t_type, copy_buffer(&field, sizeof(lv_sqrt_res_t))) +#define mp_read_byref_lv_sqrt_res_t(field) mp_read_ptr_lv_sqrt_res_t(&field) /* - * Struct lv_draw_sw_mask_radius_param_t (CPython) + * lvgl extension definition for: + * void lv_sqrt(uint32_t x, lv_sqrt_res_t *q, uint32_t mask) */ +static PyObject *py_lv_sqrt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; PyObject *q_py; long mask_val; + if (!PyArg_ParseTuple(py_args, "lOl", &x_val, &q_py, &mask_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t x = (uint32_t)x_val; + lv_sqrt_res_t *q = mp_write_ptr_lv_sqrt_res_t(q_py); + uint32_t mask = (uint32_t)mask_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(uint32_t, lv_sqrt_res_t *, uint32_t))lv_sqrt)(x, q, mask); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -extern PyMethodDef py_lv_draw_sw_mask_radius_param_t_methods[]; +static PyMethodDef py_lv_sqrt_def = { + "lv_sqrt", + (PyCFunction)py_lv_sqrt, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_radius_param_t_getattro(PyObject *self, PyObject *name) + +/* + * lvgl extension definition for: + * int32_t lv_sqrt32(uint32_t x) + */ +static PyObject *py_lv_sqrt32(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); - if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_radius_param_cfg_t(data->cfg); - if (strcmp(attr, "circle") == 0) return mp_read_ptr_lv_draw_sw_mask_radius_circle_dsc_t((void*)data->circle); - for (PyMethodDef *m = py_lv_draw_sw_mask_radius_param_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t x = (uint32_t)x_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(uint32_t))lv_sqrt32)(x); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_draw_sw_mask_radius_param_t_field_names[] = {"dsc", "cfg", "circle", NULL}; +static PyMethodDef py_lv_sqrt32_def = { + "lv_sqrt32", + (PyCFunction)py_lv_sqrt32, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_radius_param_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * int64_t lv_pow(int64_t base, int8_t exp) + */ +static PyObject *py_lv_pow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_radius_param_t_field_names, py_lv_draw_sw_mask_radius_param_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long base_val; long exp_val; + if (!PyArg_ParseTuple(py_args, "ll", &base_val, &exp_val)) { PyGILState_Release(gstate); return NULL; } + int64_t base = (int64_t)base_val; + int8_t exp = (int8_t)exp_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int64_t _res; + lvpy_lock(); + _res = ((int64_t (*)(int64_t, int8_t))lv_pow)(base, exp); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_ll(_res); } -static PyMethodDef py_lv_draw_sw_mask_radius_param_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_radius_param_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_pow_def = { + "lv_pow", + (PyCFunction)py_lv_pow, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_radius_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) + +/* + * lvgl extension definition for: + * int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out) + */ +static PyObject *py_lv_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_radius_param_t *data = (lv_draw_sw_mask_radius_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_radius_param_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } - if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_radius_param_cfg_t(value); result = 0; } - if (strcmp(attr, "circle") == 0) { data->circle = (void*)mp_write_ptr_lv_draw_sw_mask_radius_circle_dsc_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_radius_param_t' object has no attribute '%s'", attr); - } - return result; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; long min_in_val; long max_in_val; long min_out_val; long max_out_val; + if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &min_in_val, &max_in_val, &min_out_val, &max_out_val)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + int32_t min_in = (int32_t)min_in_val; + int32_t max_in = (int32_t)max_in_val; + int32_t min_out = (int32_t)min_out_val; + int32_t max_out = (int32_t)max_out_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_map)(x, min_in, max_in, min_out, max_out); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyObject *py_lv_draw_sw_mask_radius_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyMethodDef py_lv_map_def = { + "lv_map", + (PyCFunction)py_lv_map, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_rand_set_seed(uint32_t seed) + */ +static PyObject *py_lv_rand_set_seed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_radius_param_t)); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long seed_val; + if (!PyArg_ParseTuple(py_args, "l", &seed_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t seed = (uint32_t)seed_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(uint32_t))lv_rand_set_seed)(seed); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static void py_lv_draw_sw_mask_radius_param_t_dealloc(py_lv_struct_t *self) +static PyMethodDef py_lv_rand_set_seed_def = { + "lv_rand_set_seed", + (PyCFunction)py_lv_rand_set_seed, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * uint32_t lv_rand(uint32_t min, uint32_t max) + */ +static PyObject *py_lv_rand(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t min = (uint32_t)min_val; + uint32_t max = (uint32_t)max_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(uint32_t, uint32_t))lv_rand)(min, max); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -PyTypeObject py_lv_draw_sw_mask_radius_param_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_radius_param_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_radius_param_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_radius_param_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_radius_param_t_setattro, - .tp_new = py_lv_draw_sw_mask_radius_param_t_new, - .tp_methods = py_lv_draw_sw_mask_radius_param_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_rand_def = { + "lv_rand", + (PyCFunction)py_lv_rand, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_radius_param_t(PyObject *self_in) + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) + * lv_anim_exec_xcb_t exec_cb + */ + + +/* + * lvgl extension definition for: + * bool lv_anim_delete(void *var, lv_anim_exec_xcb_t exec_cb) + */ +static PyObject *py_lv_anim_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_radius_param_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_radius_param_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *var_py; PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + void *var = mp_to_ptr(var_py); + void *exec_cb = NULL; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(void *, lv_anim_exec_xcb_t))lv_anim_delete)(var, exec_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -static lv_draw_sw_mask_radius_param_t mp_write_scratch_lv_draw_sw_mask_radius_param_t; +static PyMethodDef py_lv_anim_delete_def = { + "lv_anim_delete", + (PyCFunction)py_lv_anim_delete, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_radius_param_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_anim_delete_all(void) + */ +static PyObject *py_lv_anim_delete_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_radius_param_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_radius_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_radius_param_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_radius_param_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_radius_param_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_radius_param_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_radius_param_t, 0, sizeof(lv_draw_sw_mask_radius_param_t)); - return &mp_write_scratch_lv_draw_sw_mask_radius_param_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_anim_delete_all)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_sw_mask_radius_param_t(struct_obj) (*((lv_draw_sw_mask_radius_param_t*)mp_write_value_ptr_lv_draw_sw_mask_radius_param_t(struct_obj))) +static PyMethodDef py_lv_anim_delete_all_def = { + "lv_anim_delete_all", + (PyCFunction)py_lv_anim_delete_all, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) + * lv_anim_exec_xcb_t exec_cb + */ + + +/* + * lvgl extension definition for: + * lv_anim_t *lv_anim_get(void *var, lv_anim_exec_xcb_t exec_cb) + */ +static PyObject *py_lv_anim_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *var_py; PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + void *var = mp_to_ptr(var_py); + void *exec_cb = NULL; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_anim_t * _res; + lvpy_lock(); + _res = ((lv_anim_t *(*)(void *, lv_anim_exec_xcb_t))lv_anim_get)(var, exec_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_anim_t((void*)_res); +} + +static PyMethodDef py_lv_anim_get_def = { + "lv_anim_get", + (PyCFunction)py_lv_anim_get, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_timer_t *lv_anim_get_timer(void) + */ +static PyObject *py_lv_anim_get_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_timer_t * _res; + lvpy_lock(); + _res = ((lv_timer_t *(*)(void))lv_anim_get_timer)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_timer_t((void*)_res); +} + +static PyMethodDef py_lv_anim_get_timer_def = { + "lv_anim_get_timer", + (PyCFunction)py_lv_anim_get_timer, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_radius_param_t(void *field) +/* + * lvgl extension definition for: + * uint16_t lv_anim_count_running(void) + */ +static PyObject *py_lv_anim_count_running(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_radius_param_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint16_t _res; + lvpy_lock(); + _res = ((uint16_t (*)(void))lv_anim_count_running)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -#define mp_read_lv_draw_sw_mask_radius_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_radius_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_radius_param_t))) -#define mp_read_byref_lv_draw_sw_mask_radius_param_t(field) mp_read_ptr_lv_draw_sw_mask_radius_param_t(&field) +static PyMethodDef py_lv_anim_count_running_def = { + "lv_anim_count_running", + (PyCFunction)py_lv_anim_count_running, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -typedef __typeof__( ((lv_draw_sw_mask_fade_param_t*)(0))->cfg ) lv_draw_sw_mask_fade_param_cfg_t; /* - * Struct lv_draw_sw_mask_fade_param_cfg_t (CPython) + * lvgl extension definition for: + * uint32_t lv_anim_speed(uint32_t speed) */ - -extern PyMethodDef py_lv_draw_sw_mask_fade_param_cfg_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_fade_param_cfg_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_anim_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "coords") == 0) return mp_read_byref_lv_area_t(data->coords); - if (strcmp(attr, "y_top") == 0) return mp_obj_new_int(data->y_top); - if (strcmp(attr, "y_bottom") == 0) return mp_obj_new_int(data->y_bottom); - if (strcmp(attr, "opa_top") == 0) return mp_obj_new_int_from_uint(data->opa_top); - if (strcmp(attr, "opa_bottom") == 0) return mp_obj_new_int_from_uint(data->opa_bottom); - for (PyMethodDef *m = py_lv_draw_sw_mask_fade_param_cfg_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long speed_val; + if (!PyArg_ParseTuple(py_args, "l", &speed_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed = (uint32_t)speed_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(uint32_t))lv_anim_speed)(speed); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static const char *const py_lv_draw_sw_mask_fade_param_cfg_t_field_names[] = {"coords", "y_top", "y_bottom", "opa_top", "opa_bottom", NULL}; +static PyMethodDef py_lv_anim_speed_def = { + "lv_anim_speed", + (PyCFunction)py_lv_anim_speed, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_fade_param_cfg_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * uint32_t lv_anim_speed_clamped(uint32_t speed, uint32_t min_time, uint32_t max_time) + */ +static PyObject *py_lv_anim_speed_clamped(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_fade_param_cfg_t_field_names, py_lv_draw_sw_mask_fade_param_cfg_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long speed_val; long min_time_val; long max_time_val; + if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &min_time_val, &max_time_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed = (uint32_t)speed_val; + uint32_t min_time = (uint32_t)min_time_val; + uint32_t max_time = (uint32_t)max_time_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(uint32_t, uint32_t, uint32_t))lv_anim_speed_clamped)(speed, min_time, max_time); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_mask_fade_param_cfg_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_fade_param_cfg_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_anim_speed_clamped_def = { + "lv_anim_speed_clamped", + (PyCFunction)py_lv_anim_speed_clamped, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_fade_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_fade_param_cfg_t *data = (lv_draw_sw_mask_fade_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_fade_param_cfg_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "coords") == 0) { data->coords = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "y_top") == 0) { data->y_top = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y_bottom") == 0) { data->y_bottom = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa_top") == 0) { data->opa_top = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "opa_bottom") == 0) { data->opa_bottom = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_fade_param_cfg_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_mask_fade_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_fade_param_cfg_t)); -} -static void py_lv_draw_sw_mask_fade_param_cfg_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * uint32_t lv_anim_resolve_speed(uint32_t speed_or_time, int32_t start, int32_t end) + */ +static PyObject *py_lv_anim_resolve_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long speed_or_time_val; long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "lll", &speed_or_time_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed_or_time = (uint32_t)speed_or_time_val; + int32_t start = (int32_t)start_val; + int32_t end = (int32_t)end_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_resolve_speed)(speed_or_time, start, end); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -PyTypeObject py_lv_draw_sw_mask_fade_param_cfg_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_fade_param_cfg_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_fade_param_cfg_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_fade_param_cfg_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_fade_param_cfg_t_setattro, - .tp_new = py_lv_draw_sw_mask_fade_param_cfg_t_new, - .tp_methods = py_lv_draw_sw_mask_fade_param_cfg_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_anim_resolve_speed_def = { + "lv_anim_resolve_speed", + (PyCFunction)py_lv_anim_resolve_speed, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * uint32_t lv_anim_speed_to_time(uint32_t speed, int32_t start, int32_t end) + */ +static PyObject *py_lv_anim_speed_to_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_fade_param_cfg_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_fade_param_cfg_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long speed_val; long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed = (uint32_t)speed_val; + int32_t start = (int32_t)start_val; + int32_t end = (int32_t)end_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_speed_to_time)(speed, start, end); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static lv_draw_sw_mask_fade_param_cfg_t mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t; +static PyMethodDef py_lv_anim_speed_to_time_def = { + "lv_anim_speed_to_time", + (PyCFunction)py_lv_anim_speed_to_time, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_fade_param_cfg_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_anim_refr_now(void) + */ +static PyObject *py_lv_anim_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_fade_param_cfg_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_fade_param_cfg_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_fade_param_cfg_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_cfg_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t, 0, sizeof(lv_draw_sw_mask_fade_param_cfg_t)); - return &mp_write_scratch_lv_draw_sw_mask_fade_param_cfg_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_anim_refr_now)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_sw_mask_fade_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_fade_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_fade_param_cfg_t(struct_obj))) +static PyMethodDef py_lv_anim_refr_now_def = { + "lv_anim_refr_now", + (PyCFunction)py_lv_anim_refr_now, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(void *field) + +/* + * lvgl extension definition for: + * lv_anim_timeline_t *lv_anim_timeline_create(void) + */ +static PyObject *py_lv_anim_timeline_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_fade_param_cfg_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_anim_timeline_t * _res; + lvpy_lock(); + _res = ((lv_anim_timeline_t *(*)(void))lv_anim_timeline_create)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_anim_timeline_t((void*)_res); } -#define mp_read_lv_draw_sw_mask_fade_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_fade_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_cfg_t(&field) +static PyMethodDef py_lv_anim_timeline_create_def = { + "lv_anim_timeline_create", + (PyCFunction)py_lv_anim_timeline_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_sw_mask_fade_param_t (CPython) + * lvgl extension definition for: + * int32_t lv_pct(int32_t x) */ - -extern PyMethodDef py_lv_draw_sw_mask_fade_param_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_fade_param_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_pct(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); - if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_fade_param_cfg_t(data->cfg); - for (PyMethodDef *m = py_lv_draw_sw_mask_fade_param_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int32_t))lv_pct)(x); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_draw_sw_mask_fade_param_t_field_names[] = {"dsc", "cfg", NULL}; +static PyMethodDef py_lv_pct_def = { + "lv_pct", + (PyCFunction)py_lv_pct, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_fade_param_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * int32_t lv_pct_to_px(int32_t v, int32_t base) + */ +static PyObject *py_lv_pct_to_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_fade_param_t_field_names, py_lv_draw_sw_mask_fade_param_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long v_val; long base_val; + if (!PyArg_ParseTuple(py_args, "ll", &v_val, &base_val)) { PyGILState_Release(gstate); return NULL; } + int32_t v = (int32_t)v_val; + int32_t base = (int32_t)base_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(int32_t, int32_t))lv_pct_to_px)(v, base); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_mask_fade_param_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_fade_param_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_pct_to_px_def = { + "lv_pct_to_px", + (PyCFunction)py_lv_pct_to_px, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_fade_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_fade_param_t *data = (lv_draw_sw_mask_fade_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_fade_param_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } - if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_fade_param_cfg_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_fade_param_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_draw_sw_mask_fade_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * uint32_t lv_event_register_id(void) + */ +static PyObject *py_lv_event_register_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_fade_param_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; -static void py_lv_draw_sw_mask_fade_param_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(void))lv_event_register_id)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -PyTypeObject py_lv_draw_sw_mask_fade_param_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_fade_param_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_fade_param_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_fade_param_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_fade_param_t_setattro, - .tp_new = py_lv_draw_sw_mask_fade_param_t_new, - .tp_methods = py_lv_draw_sw_mask_fade_param_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_event_register_id_def = { + "lv_event_register_id", + (PyCFunction)py_lv_event_register_id, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_fade_param_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_fade_param_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_fade_param_t*)self->data; -} - -static lv_draw_sw_mask_fade_param_t mp_write_scratch_lv_draw_sw_mask_fade_param_t; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_fade_param_t(PyObject *value) +/* + * lvgl extension definition for: + * const char *lv_event_code_get_name(lv_event_code_t code) + */ +static PyObject *py_lv_event_code_get_name(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_fade_param_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_fade_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_fade_param_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_fade_param_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_fade_param_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_fade_param_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_fade_param_t, 0, sizeof(lv_draw_sw_mask_fade_param_t)); - return &mp_write_scratch_lv_draw_sw_mask_fade_param_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *code_py; + if (!PyArg_ParseTuple(py_args, "O", &code_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_code_t code = (int)mp_obj_get_int(code_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const char * _res; + lvpy_lock(); + _res = ((const char *(*)(lv_event_code_t))lv_event_code_get_name)(code); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_str((void*)_res); } -#define mp_write_lv_draw_sw_mask_fade_param_t(struct_obj) (*((lv_draw_sw_mask_fade_param_t*)mp_write_value_ptr_lv_draw_sw_mask_fade_param_t(struct_obj))) +static PyMethodDef py_lv_event_code_get_name_def = { + "lv_event_code_get_name", + (PyCFunction)py_lv_event_code_get_name, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_fade_param_t(void *field) + +/* + * lvgl extension definition for: + * lv_group_t *lv_group_create(void) + */ +static PyObject *py_lv_group_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_fade_param_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_group_t * _res; + lvpy_lock(); + _res = ((lv_group_t *(*)(void))lv_group_create)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_group_t((void*)_res); } -#define mp_read_lv_draw_sw_mask_fade_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_fade_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_fade_param_t))) -#define mp_read_byref_lv_draw_sw_mask_fade_param_t(field) mp_read_ptr_lv_draw_sw_mask_fade_param_t(&field) +static PyMethodDef py_lv_group_create_def = { + "lv_group_create", + (PyCFunction)py_lv_group_create, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -typedef __typeof__( ((lv_draw_sw_mask_map_param_t*)(0))->cfg ) lv_draw_sw_mask_map_param_cfg_t; /* - * Struct lv_draw_sw_mask_map_param_cfg_t (CPython) + * lvgl extension definition for: + * lv_group_t *lv_group_get_default(void) */ - -extern PyMethodDef py_lv_draw_sw_mask_map_param_cfg_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_map_param_cfg_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_group_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "coords") == 0) return mp_read_byref_lv_area_t(data->coords); - if (strcmp(attr, "map") == 0) return mp_array_from_u8ptr((void*)data->map); - for (PyMethodDef *m = py_lv_draw_sw_mask_map_param_cfg_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_sw_mask_map_param_cfg_t_field_names[] = {"coords", "map", NULL}; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; -static PyObject *py_lv_draw_sw_mask_map_param_cfg_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_map_param_cfg_t_field_names, py_lv_draw_sw_mask_map_param_cfg_t_methods); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_group_t * _res; + lvpy_lock(); + _res = ((lv_group_t *(*)(void))lv_group_get_default)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_group_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_mask_map_param_cfg_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_map_param_cfg_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_group_get_default_def = { + "lv_group_get_default", + (PyCFunction)py_lv_group_get_default, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_map_param_cfg_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_map_param_cfg_t *data = (lv_draw_sw_mask_map_param_cfg_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_map_param_cfg_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "coords") == 0) { data->coords = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "map") == 0) { data->map = (void*)mp_array_to_u8ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_map_param_cfg_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_mask_map_param_cfg_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_map_param_cfg_t)); -} -static void py_lv_draw_sw_mask_map_param_cfg_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void lv_group_swap_obj(lv_obj_t *obj1, lv_obj_t *obj2) + */ +static PyObject *py_lv_group_swap_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *obj1_py; PyObject *obj2_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj1_py, &obj2_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj1 = mp_to_lv(obj1_py); + lv_obj_t *obj2 = mp_to_lv(obj2_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_group_swap_obj)(obj1, obj2); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_sw_mask_map_param_cfg_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_map_param_cfg_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_map_param_cfg_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_map_param_cfg_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_map_param_cfg_t_setattro, - .tp_new = py_lv_draw_sw_mask_map_param_cfg_t_new, - .tp_methods = py_lv_draw_sw_mask_map_param_cfg_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_group_swap_obj_def = { + "lv_group_swap_obj", + (PyCFunction)py_lv_group_swap_obj, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * void lv_group_remove_obj(lv_obj_t *obj) + */ +static PyObject *py_lv_group_remove_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_map_param_cfg_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_cfg_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_map_param_cfg_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_group_remove_obj)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static lv_draw_sw_mask_map_param_cfg_t mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t; +static PyMethodDef py_lv_group_remove_obj_def = { + "lv_group_remove_obj", + (PyCFunction)py_lv_group_remove_obj, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_map_param_cfg_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_group_focus_obj(lv_obj_t *obj) + */ +static PyObject *py_lv_group_focus_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_map_param_cfg_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_map_param_cfg_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_map_param_cfg_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_cfg_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t, 0, sizeof(lv_draw_sw_mask_map_param_cfg_t)); - return &mp_write_scratch_lv_draw_sw_mask_map_param_cfg_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_group_focus_obj)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_sw_mask_map_param_cfg_t(struct_obj) (*((lv_draw_sw_mask_map_param_cfg_t*)mp_write_value_ptr_lv_draw_sw_mask_map_param_cfg_t(struct_obj))) +static PyMethodDef py_lv_group_focus_obj_def = { + "lv_group_focus_obj", + (PyCFunction)py_lv_group_focus_obj, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(void *field) + +/* + * lvgl extension definition for: + * uint32_t lv_group_get_count(void) + */ +static PyObject *py_lv_group_get_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_map_param_cfg_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(void))lv_group_get_count)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -#define mp_read_lv_draw_sw_mask_map_param_cfg_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_map_param_cfg_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_cfg_t))) -#define mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_cfg_t(&field) +static PyMethodDef py_lv_group_get_count_def = { + "lv_group_get_count", + (PyCFunction)py_lv_group_get_count, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_draw_sw_mask_map_param_t (CPython) + * lvgl extension definition for: + * lv_group_t *lv_group_by_index(uint32_t index) */ - -extern PyMethodDef py_lv_draw_sw_mask_map_param_t_methods[]; - -static PyObject *py_lv_draw_sw_mask_map_param_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_group_by_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "dsc") == 0) return mp_read_byref_lv_draw_sw_mask_common_dsc_t(data->dsc); - if (strcmp(attr, "cfg") == 0) return mp_read_byref_lv_draw_sw_mask_map_param_cfg_t(data->cfg); - for (PyMethodDef *m = py_lv_draw_sw_mask_map_param_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t index = (uint32_t)index_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_group_t * _res; + lvpy_lock(); + _res = ((lv_group_t *(*)(uint32_t))lv_group_by_index)(index); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_group_t((void*)_res); } -static const char *const py_lv_draw_sw_mask_map_param_t_field_names[] = {"dsc", "cfg", NULL}; +static PyMethodDef py_lv_group_by_index_def = { + "lv_group_by_index", + (PyCFunction)py_lv_group_by_index, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_mask_map_param_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void lv_init(void) + */ +static PyObject *py_lv_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_mask_map_param_t_field_names, py_lv_draw_sw_mask_map_param_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_init)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_map_param_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_mask_map_param_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_init_def = { + "lv_init", + (PyCFunction)py_lv_init, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_mask_map_param_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_mask_map_param_t *data = (lv_draw_sw_mask_map_param_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_mask_map_param_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dsc") == 0) { data->dsc = mp_write_lv_draw_sw_mask_common_dsc_t(value); result = 0; } - if (strcmp(attr, "cfg") == 0) { data->cfg = mp_write_lv_draw_sw_mask_map_param_cfg_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_mask_map_param_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_draw_sw_mask_map_param_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * void lv_deinit(void) + */ +static PyObject *py_lv_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_mask_map_param_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; -static void py_lv_draw_sw_mask_map_param_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_deinit)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_draw_sw_mask_map_param_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_mask_map_param_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_mask_map_param_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_mask_map_param_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_mask_map_param_t_setattro, - .tp_new = py_lv_draw_sw_mask_map_param_t_new, - .tp_methods = py_lv_draw_sw_mask_map_param_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_deinit_def = { + "lv_deinit", + (PyCFunction)py_lv_deinit, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_mask_map_param_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * bool lv_is_initialized(void) + */ +static PyObject *py_lv_is_initialized(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_mask_map_param_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_mask_map_param_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(void))lv_is_initialized)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -static lv_draw_sw_mask_map_param_t mp_write_scratch_lv_draw_sw_mask_map_param_t; +static PyMethodDef py_lv_is_initialized_def = { + "lv_is_initialized", + (PyCFunction)py_lv_is_initialized, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_draw_sw_mask_map_param_t(PyObject *value) + +/* + * lvgl extension definition for: + * void lv_mem_init(void) + */ +static PyObject *py_lv_mem_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_mask_map_param_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_mask_map_param_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_mask_map_param_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_mask_map_param_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_mask_map_param_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_mask_map_param_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_mask_map_param_t, 0, sizeof(lv_draw_sw_mask_map_param_t)); - return &mp_write_scratch_lv_draw_sw_mask_map_param_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_mem_init)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_draw_sw_mask_map_param_t(struct_obj) (*((lv_draw_sw_mask_map_param_t*)mp_write_value_ptr_lv_draw_sw_mask_map_param_t(struct_obj))) +static PyMethodDef py_lv_mem_init_def = { + "lv_mem_init", + (PyCFunction)py_lv_mem_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_mask_map_param_t(void *field) + +/* + * lvgl extension definition for: + * void lv_mem_deinit(void) + */ +static PyObject *py_lv_mem_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_mask_map_param_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_mem_deinit)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_sw_mask_map_param_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_mask_map_param_t_type, copy_buffer(&field, sizeof(lv_draw_sw_mask_map_param_t))) -#define mp_read_byref_lv_draw_sw_mask_map_param_t(field) mp_read_ptr_lv_draw_sw_mask_map_param_t(&field) +static PyMethodDef py_lv_mem_deinit_def = { + "lv_mem_deinit", + (PyCFunction)py_lv_mem_deinit, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -#define funcptr_lv_draw_sw_blend_handler_t NULL -static inline PyObject *mp_lv_funcptr_lv_draw_sw_blend_handler_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +/* + * lvgl extension definition for: + * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) + */ +static PyObject *py_lv_mem_add_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *mem_py; long bytes_val; + if (!PyArg_ParseTuple(py_args, "Ol", &mem_py, &bytes_val)) { PyGILState_Release(gstate); return NULL; } + void *mem = mp_to_ptr(mem_py); + size_t bytes = (size_t)bytes_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_mem_pool_t _res; + lvpy_lock(); + _res = ((lv_mem_pool_t (*)(void *, size_t))lv_mem_add_pool)(mem, bytes); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp(_res); +} + +static PyMethodDef py_lv_mem_add_pool_def = { + "lv_mem_add_pool", + (PyCFunction)py_lv_mem_add_pool, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_sw_custom_blend_handler_t_handler' - * lv_draw_sw_blend_handler_t handler + * lvgl extension definition for: + * void lv_mem_remove_pool(lv_mem_pool_t pool) */ +static PyObject *py_lv_mem_remove_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *pool_py; + if (!PyArg_ParseTuple(py_args, "O", &pool_py)) { PyGILState_Release(gstate); return NULL; } + lv_mem_pool_t pool = mp_to_ptr(pool_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_mem_pool_t))lv_mem_remove_pool)(pool); + lvpy_unlock(); + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -/* - * Struct lv_draw_sw_custom_blend_handler_t (CPython) - */ +static PyMethodDef py_lv_mem_remove_pool_def = { + "lv_mem_remove_pool", + (PyCFunction)py_lv_mem_remove_pool, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -extern PyMethodDef py_lv_draw_sw_custom_blend_handler_t_methods[]; -static PyObject *py_lv_draw_sw_custom_blend_handler_t_getattro(PyObject *self, PyObject *name) +/* + * lvgl extension definition for: + * void *lv_malloc(size_t size) + */ +static PyObject *py_lv_malloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "dest_cf") == 0) return mp_obj_new_int(data->dest_cf); - if (strcmp(attr, "handler") == 0) return mp_lv_funcptr(NULL, data->handler, NULL, "lv_draw_sw_custom_blend_handler_t_handler", NULL); - for (PyMethodDef *m = py_lv_draw_sw_custom_blend_handler_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(size_t))lv_malloc)(size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -static const char *const py_lv_draw_sw_custom_blend_handler_t_field_names[] = {"dest_cf", "handler", NULL}; +static PyMethodDef py_lv_malloc_def = { + "lv_malloc", + (PyCFunction)py_lv_malloc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_sw_custom_blend_handler_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void *lv_calloc(size_t num, size_t size) + */ +static PyObject *py_lv_calloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_custom_blend_handler_t_field_names, py_lv_draw_sw_custom_blend_handler_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long num_val; long size_val; + if (!PyArg_ParseTuple(py_args, "ll", &num_val, &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t num = (size_t)num_val; + size_t size = (size_t)size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(size_t, size_t))lv_calloc)(num, size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_sw_custom_blend_handler_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_custom_blend_handler_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_calloc_def = { + "lv_calloc", + (PyCFunction)py_lv_calloc, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_sw_custom_blend_handler_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_custom_blend_handler_t *data = (lv_draw_sw_custom_blend_handler_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_custom_blend_handler_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dest_cf") == 0) { data->dest_cf = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "handler") == 0) { data->handler = mp_lv_callback(value, NULL, "lv_draw_sw_custom_blend_handler_t_handler", NULL, NULL, NULL, NULL); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_custom_blend_handler_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_custom_blend_handler_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_custom_blend_handler_t)); -} -static void py_lv_draw_sw_custom_blend_handler_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void *lv_zalloc(size_t size) + */ +static PyObject *py_lv_zalloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(size_t))lv_zalloc)(size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -PyTypeObject py_lv_draw_sw_custom_blend_handler_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_custom_blend_handler_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_custom_blend_handler_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_custom_blend_handler_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_custom_blend_handler_t_setattro, - .tp_new = py_lv_draw_sw_custom_blend_handler_t_new, - .tp_methods = py_lv_draw_sw_custom_blend_handler_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_zalloc_def = { + "lv_zalloc", + (PyCFunction)py_lv_zalloc, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_sw_custom_blend_handler_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_custom_blend_handler_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_custom_blend_handler_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_custom_blend_handler_t*)self->data; -} - -static lv_draw_sw_custom_blend_handler_t mp_write_scratch_lv_draw_sw_custom_blend_handler_t; -static inline void* mp_write_value_ptr_lv_draw_sw_custom_blend_handler_t(PyObject *value) +/* + * lvgl extension definition for: + * void *lv_malloc_zeroed(size_t size) + */ +static PyObject *py_lv_malloc_zeroed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_custom_blend_handler_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_custom_blend_handler_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_custom_blend_handler_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_custom_blend_handler_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_custom_blend_handler_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_custom_blend_handler_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_custom_blend_handler_t, 0, sizeof(lv_draw_sw_custom_blend_handler_t)); - return &mp_write_scratch_lv_draw_sw_custom_blend_handler_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(size_t))lv_malloc_zeroed)(size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -#define mp_write_lv_draw_sw_custom_blend_handler_t(struct_obj) (*((lv_draw_sw_custom_blend_handler_t*)mp_write_value_ptr_lv_draw_sw_custom_blend_handler_t(struct_obj))) +static PyMethodDef py_lv_malloc_zeroed_def = { + "lv_malloc_zeroed", + (PyCFunction)py_lv_malloc_zeroed, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_sw_custom_blend_handler_t(void *field) + +/* + * lvgl extension definition for: + * void lv_free(void *data) + */ +static PyObject *py_lv_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_sw_custom_blend_handler_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } + void *data = mp_to_ptr(data_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void *))lv_free)(data); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_sw_custom_blend_handler_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_custom_blend_handler_t_type, copy_buffer(&field, sizeof(lv_draw_sw_custom_blend_handler_t))) -#define mp_read_byref_lv_draw_sw_custom_blend_handler_t(field) mp_read_ptr_lv_draw_sw_custom_blend_handler_t(&field) +static PyMethodDef py_lv_free_def = { + "lv_free", + (PyCFunction)py_lv_free, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_text_attributes_t (CPython) + * lvgl extension definition for: + * void *lv_realloc(void *data_p, size_t new_size) */ - -extern PyMethodDef py_lv_text_attributes_t_methods[]; - -static PyObject *py_lv_text_attributes_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_realloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "letter_space") == 0) return mp_obj_new_int(data->letter_space); - if (strcmp(attr, "line_space") == 0) return mp_obj_new_int(data->line_space); - if (strcmp(attr, "max_width") == 0) return mp_obj_new_int(data->max_width); - if (strcmp(attr, "text_flags") == 0) return mp_obj_new_int(data->text_flags); - for (PyMethodDef *m = py_lv_text_attributes_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *data_p_py; long new_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } + void *data_p = mp_to_ptr(data_p_py); + size_t new_size = (size_t)new_size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(void *, size_t))lv_realloc)(data_p, new_size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -static const char *const py_lv_text_attributes_t_field_names[] = {"letter_space", "line_space", "max_width", "text_flags", NULL}; +static PyMethodDef py_lv_realloc_def = { + "lv_realloc", + (PyCFunction)py_lv_realloc, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_text_attributes_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * void *lv_reallocf(void *data_p, size_t new_size) + */ +static PyObject *py_lv_reallocf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_text_attributes_t_field_names, py_lv_text_attributes_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *data_p_py; long new_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } + void *data_p = mp_to_ptr(data_p_py); + size_t new_size = (size_t)new_size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(void *, size_t))lv_reallocf)(data_p, new_size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_text_attributes_t_type_methods[] = { - {"__dir__", py_lv_text_attributes_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_reallocf_def = { + "lv_reallocf", + (PyCFunction)py_lv_reallocf, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_text_attributes_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_text_attributes_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "letter_space") == 0) { data->letter_space = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "line_space") == 0) { data->line_space = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "max_width") == 0) { data->max_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "text_flags") == 0) { data->text_flags = (int)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_text_attributes_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_text_attributes_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_text_attributes_t)); -} -static void py_lv_text_attributes_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * void *lv_malloc_core(size_t size) + */ +static PyObject *py_lv_malloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(size_t))lv_malloc_core)(size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -PyTypeObject py_lv_text_attributes_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_text_attributes_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_text_attributes_t_dealloc, - .tp_getattro = (getter)py_lv_text_attributes_t_getattro, - .tp_setattro = (setter)py_lv_text_attributes_t_setattro, - .tp_new = py_lv_text_attributes_t_new, - .tp_methods = py_lv_text_attributes_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_malloc_core_def = { + "lv_malloc_core", + (PyCFunction)py_lv_malloc_core, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_text_attributes_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_text_attributes_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_text_attributes_t*)self->data; -} - -static lv_text_attributes_t mp_write_scratch_lv_text_attributes_t; -static inline void* mp_write_value_ptr_lv_text_attributes_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_free_core(void *p) + */ +static PyObject *py_lv_free_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_text_attributes_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_text_attributes_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_text_attributes_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_text_attributes_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_text_attributes_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t or dict, got None"); - } - memset(&mp_write_scratch_lv_text_attributes_t, 0, sizeof(lv_text_attributes_t)); - return &mp_write_scratch_lv_text_attributes_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } + void *p = mp_to_ptr(p_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void *))lv_free_core)(p); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_text_attributes_t(struct_obj) (*((lv_text_attributes_t*)mp_write_value_ptr_lv_text_attributes_t(struct_obj))) +static PyMethodDef py_lv_free_core_def = { + "lv_free_core", + (PyCFunction)py_lv_free_core, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_text_attributes_t(void *field) + +/* + * lvgl extension definition for: + * void *lv_realloc_core(void *p, size_t new_size) + */ +static PyObject *py_lv_realloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_text_attributes_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *p_py; long new_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } + void *p = mp_to_ptr(p_py); + size_t new_size = (size_t)new_size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(void *, size_t))lv_realloc_core)(p, new_size); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } -#define mp_read_lv_text_attributes_t(field) lv_to_mp_struct_own(&py_lv_text_attributes_t_type, copy_buffer(&field, sizeof(lv_text_attributes_t))) -#define mp_read_byref_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(&field) +static PyMethodDef py_lv_realloc_core_def = { + "lv_realloc_core", + (PyCFunction)py_lv_realloc_core, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * - * Global Module Functions - * + * lvgl extension definition for: + * lv_result_t lv_mem_test_core(void) */ +static PyObject *py_lv_mem_test_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(void))lv_mem_test_core)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} + +static PyMethodDef py_lv_mem_test_core_def = { + "lv_mem_test_core", + (PyCFunction)py_lv_mem_test_core, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * inline static void lv_memzero(void *dst, size_t len) + * lv_result_t lv_mem_test(void) */ -static PyObject *py_lv_memzero(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_test(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; long len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &dst_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - size_t len = (size_t)len_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(void *, size_t))lv_memzero)(dst, len); + _res = ((lv_result_t (*)(void))lv_mem_test)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_memzero_def = { - "lv_memzero", - (PyCFunction)py_lv_memzero, +static PyMethodDef py_lv_mem_test_def = { + "lv_mem_test", + (PyCFunction)py_lv_mem_test, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59576,31 +72365,30 @@ static PyMethodDef py_lv_memzero_def = { /* * lvgl extension definition for: - * inline static bool lv_streq(const char *s1, const char *s2) + * uint8_t lv_color_format_get_bpp(lv_color_format_t cf) */ -static PyObject *py_lv_streq(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_format_get_bpp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *s1_py; PyObject *s2_py; - if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } - const char *s1 = (const char *)(char*)convert_from_str(s1_py); - const char *s2 = (const char *)(char*)convert_from_str(s2_py); + PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint8_t _res; lvpy_lock(); - _res = ((bool (*)(const char *, const char *))lv_streq)(s1, s2); + _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_bpp)(cf); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_streq_def = { - "lv_streq", - (PyCFunction)py_lv_streq, +static PyMethodDef py_lv_color_format_get_bpp_def = { + "lv_color_format_get_bpp", + (PyCFunction)py_lv_color_format_get_bpp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59608,30 +72396,30 @@ static PyMethodDef py_lv_streq_def = { /* * lvgl extension definition for: - * inline static int32_t lv_sqr(int32_t x) + * uint8_t lv_color_format_get_size(lv_color_format_t cf) */ -static PyObject *py_lv_sqr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_format_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; + PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint8_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t))lv_sqr)(x); + _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_size)(cf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_sqr_def = { - "lv_sqr", - (PyCFunction)py_lv_sqr, +static PyMethodDef py_lv_color_format_get_size_def = { + "lv_color_format_get_size", + (PyCFunction)py_lv_color_format_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59639,30 +72427,30 @@ static PyMethodDef py_lv_sqr_def = { /* * lvgl extension definition for: - * inline static uint16_t lv_color_swap_16(uint16_t c) + * bool lv_color_format_has_alpha(lv_color_format_t src_cf) */ -static PyObject *py_lv_color_swap_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_format_has_alpha(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t c = (uint16_t)c_val; + PyObject *src_cf_py; + if (!PyArg_ParseTuple(py_args, "O", &src_cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t src_cf = (int)mp_obj_get_int(src_cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + bool _res; lvpy_lock(); - _res = ((uint16_t (*)(uint16_t))lv_color_swap_16)(c); + _res = ((bool (*)(lv_color_format_t))lv_color_format_has_alpha)(src_cf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_color_swap_16_def = { - "lv_color_swap_16", - (PyCFunction)py_lv_color_swap_16, +static PyMethodDef py_lv_color_format_has_alpha_def = { + "lv_color_format_has_alpha", + (PyCFunction)py_lv_color_format_has_alpha, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59670,30 +72458,30 @@ static PyMethodDef py_lv_color_swap_16_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_swap_bytes_32(uint32_t x) + * lv_color_t lv_color_hex(uint32_t c) */ -static PyObject *py_lv_swap_bytes_32(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_hex(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t x = (uint32_t)x_val; + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t c = (uint32_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_swap_bytes_32)(x); + _res = ((lv_color_t (*)(uint32_t))lv_color_hex)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_swap_bytes_32_def = { - "lv_swap_bytes_32", - (PyCFunction)py_lv_swap_bytes_32, +static PyMethodDef py_lv_color_hex_def = { + "lv_color_hex", + (PyCFunction)py_lv_color_hex, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59701,30 +72489,32 @@ static PyMethodDef py_lv_swap_bytes_32_def = { /* * lvgl extension definition for: - * inline static uint16_t lv_swap_bytes_16(uint16_t x) + * lv_color_t lv_color_make(uint8_t r, uint8_t g, uint8_t b) */ -static PyObject *py_lv_swap_bytes_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t x = (uint16_t)x_val; + long r_val; long g_val; long b_val; + if (!PyArg_ParseTuple(py_args, "lll", &r_val, &g_val, &b_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t r = (uint8_t)r_val; + uint8_t g = (uint8_t)g_val; + uint8_t b = (uint8_t)b_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((uint16_t (*)(uint16_t))lv_swap_bytes_16)(x); + _res = ((lv_color_t (*)(uint8_t, uint8_t, uint8_t))lv_color_make)(r, g, b); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_swap_bytes_16_def = { - "lv_swap_bytes_16", - (PyCFunction)py_lv_swap_bytes_16, +static PyMethodDef py_lv_color_make_def = { + "lv_color_make", + (PyCFunction)py_lv_color_make, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59732,31 +72522,33 @@ static PyMethodDef py_lv_swap_bytes_16_def = { /* * lvgl extension definition for: - * inline static void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) + * lv_color32_t lv_color32_make(uint8_t r, uint8_t g, uint8_t b, uint8_t a) */ -static PyObject *py_lv_bidi_calculate_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *align_py; PyObject *base_dir_py; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "OOO", &align_py, &base_dir_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_text_align_t *align = mp_array_to_i32ptr(align_py); - lv_base_dir_t *base_dir = mp_array_to_i32ptr(base_dir_py); - const char *txt = (const char *)(char*)convert_from_str(txt_py); + long r_val; long g_val; long b_val; long a_val; + if (!PyArg_ParseTuple(py_args, "llll", &r_val, &g_val, &b_val, &a_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t r = (uint8_t)r_val; + uint8_t g = (uint8_t)g_val; + uint8_t b = (uint8_t)b_val; + uint8_t a = (uint8_t)a_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_bidi_calculate_align)(align, base_dir, txt); + _res = ((lv_color32_t (*)(uint8_t, uint8_t, uint8_t, uint8_t))lv_color32_make)(r, g, b, a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_bidi_calculate_align_def = { - "lv_bidi_calculate_align", - (PyCFunction)py_lv_bidi_calculate_align, +static PyMethodDef py_lv_color32_make_def = { + "lv_color32_make", + (PyCFunction)py_lv_color32_make, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59764,30 +72556,30 @@ static PyMethodDef py_lv_bidi_calculate_align_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) + * lv_color_t lv_color_hex3(uint32_t c) */ -static PyObject *py_lv_style_get_prop_group(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_hex3(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t c = (uint32_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_style_prop_t))lv_style_get_prop_group)(prop); + _res = ((lv_color_t (*)(uint32_t))lv_color_hex3)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_style_get_prop_group_def = { - "lv_style_get_prop_group", - (PyCFunction)py_lv_style_get_prop_group, +static PyMethodDef py_lv_color_hex3_def = { + "lv_color_hex3", + (PyCFunction)py_lv_color_hex3, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59795,31 +72587,32 @@ static PyMethodDef py_lv_style_get_prop_group_def = { /* * lvgl extension definition for: - * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) + * uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix) */ -static PyObject *py_lv_style_prop_has_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_16_16_mix(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *prop_py; long flag_val; - if (!PyArg_ParseTuple(py_args, "Ol", &prop_py, &flag_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - uint8_t flag = (uint8_t)flag_val; + long c1_val; long c2_val; long mix_val; + if (!PyArg_ParseTuple(py_args, "lll", &c1_val, &c2_val, &mix_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t c1 = (uint16_t)c1_val; + uint16_t c2 = (uint16_t)c2_val; + uint8_t mix = (uint8_t)mix_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint16_t _res; lvpy_lock(); - _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_style_prop_has_flag)(prop, flag); + _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_color_16_16_mix)(c1, c2, mix); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_style_prop_has_flag_def = { - "lv_style_prop_has_flag", - (PyCFunction)py_lv_style_prop_has_flag, +static PyMethodDef py_lv_color_16_16_mix_def = { + "lv_color_16_16_mix", + (PyCFunction)py_lv_color_16_16_mix, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59827,98 +72620,230 @@ static PyMethodDef py_lv_style_prop_has_flag_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_task_handler(void) + * lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) */ -static PyObject *py_lv_task_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_hsv_to_rgb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long h_val; long s_val; long v_val; + if (!PyArg_ParseTuple(py_args, "lll", &h_val, &s_val, &v_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t h = (uint16_t)h_val; + uint8_t s = (uint8_t)s_val; + uint8_t v = (uint8_t)v_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_color_t _res; lvpy_lock(); - Py_BEGIN_ALLOW_THREADS - _res = ((uint32_t (*)(void))lv_task_handler)(); - Py_END_ALLOW_THREADS + _res = ((lv_color_t (*)(uint16_t, uint8_t, uint8_t))lv_color_hsv_to_rgb)(h, s, v); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_task_handler_def = { - "lv_task_handler", - (PyCFunction)py_lv_task_handler, +static PyMethodDef py_lv_color_hsv_to_rgb_def = { + "lv_color_hsv_to_rgb", + (PyCFunction)py_lv_color_hsv_to_rgb, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_thread_init_callback (CPython) - * void callback(void *) + * Struct lv_color_hsv_t (CPython) */ -static void lv_thread_init_callback_callback(void *arg0) + +extern PyMethodDef py_lv_color_hsv_t_methods[]; + +static PyObject *py_lv_color_hsv_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "h") == 0) return mp_obj_new_int_from_uint(data->h); + if (strcmp(attr, "s") == 0) return mp_obj_new_int_from_uint(data->s); + if (strcmp(attr, "v") == 0) return mp_obj_new_int_from_uint(data->v); + for (PyMethodDef *m = py_lv_color_hsv_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_color_hsv_t_field_names[] = {"h", "s", "v", NULL}; + +static PyObject *py_lv_color_hsv_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_color_hsv_t_field_names, py_lv_color_hsv_t_methods); +} + +static PyMethodDef py_lv_color_hsv_t_type_methods[] = { + {"__dir__", py_lv_color_hsv_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_color_hsv_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_color_hsv_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "h") == 0) { data->h = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "s") == 0) { data->s = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "v") == 0) { data->v = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_color_hsv_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_color_hsv_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_color_hsv_t)); +} + +static void py_lv_color_hsv_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_color_hsv_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_color_hsv_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_color_hsv_t_dealloc, + .tp_getattro = (getter)py_lv_color_hsv_t_getattro, + .tp_setattro = (setter)py_lv_color_hsv_t_setattro, + .tp_new = py_lv_color_hsv_t_new, + .tp_methods = py_lv_color_hsv_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_color_hsv_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_color_hsv_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_color_hsv_t*)self->data; +} + +static lv_color_hsv_t mp_write_scratch_lv_color_hsv_t; + +static inline void* mp_write_value_ptr_lv_color_hsv_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_hsv_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_color_hsv_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_hsv_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_color_hsv_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_color_hsv_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t or dict, got None"); + } + memset(&mp_write_scratch_lv_color_hsv_t, 0, sizeof(lv_color_hsv_t)); + return &mp_write_scratch_lv_color_hsv_t; +} + +#define mp_write_lv_color_hsv_t(struct_obj) (*((lv_color_hsv_t*)mp_write_value_ptr_lv_color_hsv_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_color_hsv_t(void *field) +{ + return lv_to_mp_struct(&py_lv_color_hsv_t_type, field); +} + +#define mp_read_lv_color_hsv_t(field) lv_to_mp_struct_own(&py_lv_color_hsv_t_type, copy_buffer(&field, sizeof(lv_color_hsv_t))) +#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) + + +/* + * lvgl extension definition for: + * lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8) + */ +static PyObject *py_lv_color_rgb_to_hsv(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_thread_init_callback"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)self; + (void)py_kwds; + long r8_val; long g8_val; long b8_val; + if (!PyArg_ParseTuple(py_args, "lll", &r8_val, &g8_val, &b8_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t r8 = (uint8_t)r8_val; + uint8_t g8 = (uint8_t)g8_val; + uint8_t b8 = (uint8_t)b8_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_color_hsv_t _res; + lvpy_lock(); + _res = ((lv_color_hsv_t (*)(uint8_t, uint8_t, uint8_t))lv_color_rgb_to_hsv)(r8, g8, b8); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_read_lv_color_hsv_t(_res); } +static PyMethodDef py_lv_color_rgb_to_hsv_def = { + "lv_color_rgb_to_hsv", + (PyCFunction)py_lv_color_rgb_to_hsv, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) + * lv_color_t lv_color_white(void) */ -static PyObject *py_lv_thread_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_white(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *thread_py; PyObject *name_py; PyObject *prio_py; PyObject *callback_py; long stack_size_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOOOlO", &thread_py, &name_py, &prio_py, &callback_py, &stack_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - lv_thread_t *thread = mp_to_ptr(thread_py); - const char * const name = (const char * const)(char*)convert_from_str(name_py); - lv_thread_prio_t prio = (int)mp_obj_get_int(prio_py); - size_t stack_size = (size_t)stack_size_val; - void *callback = mp_lv_callback(callback_py, &lv_thread_init_callback_callback, "lv_thread_init_callback", &user_data, NULL, (NULL), (NULL)); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_thread_init)(thread, name, prio, callback, stack_size, user_data); + _res = ((lv_color_t (*)(void))lv_color_white)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_thread_init_def = { - "lv_thread_init", - (PyCFunction)py_lv_thread_init, +static PyMethodDef py_lv_color_white_def = { + "lv_color_white", + (PyCFunction)py_lv_color_white, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59926,30 +72851,29 @@ static PyMethodDef py_lv_thread_init_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) + * lv_color_t lv_color_black(void) */ -static PyObject *py_lv_thread_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_black(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *thread_py; - if (!PyArg_ParseTuple(py_args, "O", &thread_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_t *thread = mp_to_ptr(thread_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_t *))lv_thread_delete)(thread); + _res = ((lv_color_t (*)(void))lv_color_black)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_thread_delete_def = { - "lv_thread_delete", - (PyCFunction)py_lv_thread_delete, +static PyMethodDef py_lv_color_black_def = { + "lv_color_black", + (PyCFunction)py_lv_color_black, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59957,30 +72881,30 @@ static PyMethodDef py_lv_thread_delete_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) + * uint8_t lv_color24_luminance(const uint8_t *c) */ -static PyObject *py_lv_mutex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color24_luminance(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + PyObject *c_py; + if (!PyArg_ParseTuple(py_args, "O", &c_py)) { PyGILState_Release(gstate); return NULL; } + const uint8_t *c = (const uint8_t *)mp_array_to_u8ptr(c_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint8_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_init)(mutex); + _res = ((uint8_t (*)(const uint8_t *))lv_color24_luminance)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_mutex_init_def = { - "lv_mutex_init", - (PyCFunction)py_lv_mutex_init, +static PyMethodDef py_lv_color24_luminance_def = { + "lv_color24_luminance", + (PyCFunction)py_lv_color24_luminance, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -59988,30 +72912,30 @@ static PyMethodDef py_lv_mutex_init_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_mutex_lock(lv_mutex_t *mutex) + * lv_color_t lv_palette_main(lv_palette_t p) */ -static PyObject *py_lv_mutex_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_palette_main(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } + lv_palette_t p = (int)mp_obj_get_int(p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock)(mutex); + _res = ((lv_color_t (*)(lv_palette_t))lv_palette_main)(p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_mutex_lock_def = { - "lv_mutex_lock", - (PyCFunction)py_lv_mutex_lock, +static PyMethodDef py_lv_palette_main_def = { + "lv_palette_main", + (PyCFunction)py_lv_palette_main, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60019,30 +72943,31 @@ static PyMethodDef py_lv_mutex_lock_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_mutex_lock_isr(lv_mutex_t *mutex) + * lv_color_t lv_palette_lighten(lv_palette_t p, uint8_t lvl) */ -static PyObject *py_lv_mutex_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_palette_lighten(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + PyObject *p_py; long lvl_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_palette_t p = (int)mp_obj_get_int(p_py); + uint8_t lvl = (uint8_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock_isr)(mutex); + _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_lighten)(p, lvl); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_mutex_lock_isr_def = { - "lv_mutex_lock_isr", - (PyCFunction)py_lv_mutex_lock_isr, +static PyMethodDef py_lv_palette_lighten_def = { + "lv_palette_lighten", + (PyCFunction)py_lv_palette_lighten, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60050,30 +72975,31 @@ static PyMethodDef py_lv_mutex_lock_isr_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_mutex_unlock(lv_mutex_t *mutex) + * lv_color_t lv_palette_darken(lv_palette_t p, uint8_t lvl) */ -static PyObject *py_lv_mutex_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_palette_darken(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + PyObject *p_py; long lvl_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_palette_t p = (int)mp_obj_get_int(p_py); + uint8_t lvl = (uint8_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_unlock)(mutex); + _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_darken)(p, lvl); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_mutex_unlock_def = { - "lv_mutex_unlock", - (PyCFunction)py_lv_mutex_unlock, +static PyMethodDef py_lv_palette_darken_def = { + "lv_palette_darken", + (PyCFunction)py_lv_palette_darken, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60081,30 +73007,32 @@ static PyMethodDef py_lv_mutex_unlock_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_mutex_delete(lv_mutex_t *mutex) + * void *lv_memcpy(void *dst, const void *src, size_t len) */ -static PyObject *py_lv_mutex_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); + PyObject *dst_py; PyObject *src_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + const void *src = (const void *)mp_to_ptr(src_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + void * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_delete)(mutex); + _res = ((void *(*)(void *, const void *, size_t))lv_memcpy)(dst, src, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_mutex_delete_def = { - "lv_mutex_delete", - (PyCFunction)py_lv_mutex_delete, +static PyMethodDef py_lv_memcpy_def = { + "lv_memcpy", + (PyCFunction)py_lv_memcpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60112,30 +73040,31 @@ static PyMethodDef py_lv_mutex_delete_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) + * void lv_memset(void *dst, uint8_t v, size_t len) */ -static PyObject *py_lv_thread_sync_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); + PyObject *dst_py; long v_val; long len_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dst_py, &v_val, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + uint8_t v = (uint8_t)v_val; + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_init)(sync); + ((void (*)(void *, uint8_t, size_t))lv_memset)(dst, v, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_thread_sync_init_def = { - "lv_thread_sync_init", - (PyCFunction)py_lv_thread_sync_init, +static PyMethodDef py_lv_memset_def = { + "lv_memset", + (PyCFunction)py_lv_memset, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60143,30 +73072,32 @@ static PyMethodDef py_lv_thread_sync_init_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_wait(lv_thread_sync_t *sync) + * void *lv_memmove(void *dst, const void *src, size_t len) */ -static PyObject *py_lv_thread_sync_wait(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memmove(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); + PyObject *dst_py; PyObject *src_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + const void *src = (const void *)mp_to_ptr(src_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + void * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_wait)(sync); + _res = ((void *(*)(void *, const void *, size_t))lv_memmove)(dst, src, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_thread_sync_wait_def = { - "lv_thread_sync_wait", - (PyCFunction)py_lv_thread_sync_wait, +static PyMethodDef py_lv_memmove_def = { + "lv_memmove", + (PyCFunction)py_lv_memmove, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60174,30 +73105,32 @@ static PyMethodDef py_lv_thread_sync_wait_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_signal(lv_thread_sync_t *sync) + * int lv_memcmp(const void *p1, const void *p2, size_t len) */ -static PyObject *py_lv_thread_sync_signal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); + PyObject *p1_py; PyObject *p2_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &p1_py, &p2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + const void *p1 = (const void *)mp_to_ptr(p1_py); + const void *p2 = (const void *)mp_to_ptr(p2_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal)(sync); + _res = ((int (*)(const void *, const void *, size_t))lv_memcmp)(p1, p2, len); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_thread_sync_signal_def = { - "lv_thread_sync_signal", - (PyCFunction)py_lv_thread_sync_signal, +static PyMethodDef py_lv_memcmp_def = { + "lv_memcmp", + (PyCFunction)py_lv_memcmp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60205,30 +73138,30 @@ static PyMethodDef py_lv_thread_sync_signal_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_signal_isr(lv_thread_sync_t *sync) + * size_t lv_strlen(const char *str) */ -static PyObject *py_lv_thread_sync_signal_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); + PyObject *str_py; + if (!PyArg_ParseTuple(py_args, "O", &str_py)) { PyGILState_Release(gstate); return NULL; } + const char *str = (const char *)(char*)convert_from_str(str_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + size_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal_isr)(sync); + _res = ((size_t (*)(const char *))lv_strlen)(str); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_thread_sync_signal_isr_def = { - "lv_thread_sync_signal_isr", - (PyCFunction)py_lv_thread_sync_signal_isr, +static PyMethodDef py_lv_strlen_def = { + "lv_strlen", + (PyCFunction)py_lv_strlen, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60236,30 +73169,31 @@ static PyMethodDef py_lv_thread_sync_signal_isr_def = { /* * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_delete(lv_thread_sync_t *sync) + * size_t lv_strnlen(const char *str, size_t max_len) */ -static PyObject *py_lv_thread_sync_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strnlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); + PyObject *str_py; long max_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } + const char *str = (const char *)(char*)convert_from_str(str_py); + size_t max_len = (size_t)max_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + size_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_delete)(sync); + _res = ((size_t (*)(const char *, size_t))lv_strnlen)(str, max_len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_thread_sync_delete_def = { - "lv_thread_sync_delete", - (PyCFunction)py_lv_thread_sync_delete, +static PyMethodDef py_lv_strnlen_def = { + "lv_strnlen", + (PyCFunction)py_lv_strnlen, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60267,30 +73201,32 @@ static PyMethodDef py_lv_thread_sync_delete_def = { /* * lvgl extension definition for: - * inline static bool lv_text_is_break_char(uint32_t letter) + * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) */ -static PyObject *py_lv_text_is_break_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strlcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t letter = (uint32_t)letter_val; + PyObject *dst_py; PyObject *src_py; long dst_size_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dst_size_val)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t dst_size = (size_t)dst_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + size_t _res; lvpy_lock(); - _res = ((bool (*)(uint32_t))lv_text_is_break_char)(letter); + _res = ((size_t (*)(char *, const char *, size_t))lv_strlcpy)(dst, src, dst_size); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_text_is_break_char_def = { - "lv_text_is_break_char", - (PyCFunction)py_lv_text_is_break_char, +static PyMethodDef py_lv_strlcpy_def = { + "lv_strlcpy", + (PyCFunction)py_lv_strlcpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60298,30 +73234,32 @@ static PyMethodDef py_lv_text_is_break_char_def = { /* * lvgl extension definition for: - * inline static bool lv_text_is_a_word(uint32_t letter) + * char *lv_strncpy(char *dst, const char *src, size_t dest_size) */ -static PyObject *py_lv_text_is_a_word(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strncpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t letter = (uint32_t)letter_val; + PyObject *dst_py; PyObject *src_py; long dest_size_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dest_size_val)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t dest_size = (size_t)dest_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + char * _res; lvpy_lock(); - _res = ((bool (*)(uint32_t))lv_text_is_a_word)(letter); + _res = ((char *(*)(char *, const char *, size_t))lv_strncpy)(dst, src, dest_size); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_text_is_a_word_def = { - "lv_text_is_a_word", - (PyCFunction)py_lv_text_is_a_word, +static PyMethodDef py_lv_strncpy_def = { + "lv_strncpy", + (PyCFunction)py_lv_strncpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60329,30 +73267,31 @@ static PyMethodDef py_lv_text_is_a_word_def = { /* * lvgl extension definition for: - * inline static bool lv_text_is_marker(uint32_t letter) + * char *lv_strcpy(char *dst, const char *src) */ -static PyObject *py_lv_text_is_marker(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t letter = (uint32_t)letter_val; + PyObject *dst_py; PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + char * _res; lvpy_lock(); - _res = ((bool (*)(uint32_t))lv_text_is_marker)(letter); + _res = ((char *(*)(char *, const char *))lv_strcpy)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_text_is_marker_def = { - "lv_text_is_marker", - (PyCFunction)py_lv_text_is_marker, +static PyMethodDef py_lv_strcpy_def = { + "lv_strcpy", + (PyCFunction)py_lv_strcpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60360,29 +73299,31 @@ static PyMethodDef py_lv_text_is_marker_def = { /* * lvgl extension definition for: - * inline static int lv_version_major(void) + * int lv_strcmp(const char *s1, const char *s2) */ -static PyObject *py_lv_version_major(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *s1_py; PyObject *s2_py; + if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } + const char *s1 = (const char *)(char*)convert_from_str(s1_py); + const char *s2 = (const char *)(char*)convert_from_str(s2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int _res; lvpy_lock(); - _res = ((int (*)(void))lv_version_major)(); + _res = ((int (*)(const char *, const char *))lv_strcmp)(s1, s2); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_version_major_def = { - "lv_version_major", - (PyCFunction)py_lv_version_major, +static PyMethodDef py_lv_strcmp_def = { + "lv_strcmp", + (PyCFunction)py_lv_strcmp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60390,29 +73331,32 @@ static PyMethodDef py_lv_version_major_def = { /* * lvgl extension definition for: - * inline static int lv_version_minor(void) + * int lv_strncmp(const char *s1, const char *s2, size_t len) */ -static PyObject *py_lv_version_minor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strncmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *s1_py; PyObject *s2_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &s1_py, &s2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + const char *s1 = (const char *)(char*)convert_from_str(s1_py); + const char *s2 = (const char *)(char*)convert_from_str(s2_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int _res; lvpy_lock(); - _res = ((int (*)(void))lv_version_minor)(); + _res = ((int (*)(const char *, const char *, size_t))lv_strncmp)(s1, s2, len); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_version_minor_def = { - "lv_version_minor", - (PyCFunction)py_lv_version_minor, +static PyMethodDef py_lv_strncmp_def = { + "lv_strncmp", + (PyCFunction)py_lv_strncmp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60420,29 +73364,30 @@ static PyMethodDef py_lv_version_minor_def = { /* * lvgl extension definition for: - * inline static int lv_version_patch(void) + * char *lv_strdup(const char *src) */ -static PyObject *py_lv_version_patch(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strdup(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + const char *src = (const char *)(char*)convert_from_str(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + char * _res; lvpy_lock(); - _res = ((int (*)(void))lv_version_patch)(); + _res = ((char *(*)(const char *))lv_strdup)(src); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_version_patch_def = { - "lv_version_patch", - (PyCFunction)py_lv_version_patch, +static PyMethodDef py_lv_strdup_def = { + "lv_strdup", + (PyCFunction)py_lv_strdup, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60450,29 +73395,31 @@ static PyMethodDef py_lv_version_patch_def = { /* * lvgl extension definition for: - * inline static const char *lv_version_info(void) + * char *lv_strndup(const char *src, size_t max_len) */ -static PyObject *py_lv_version_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strndup(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *src_py; long max_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &src_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t max_len = (size_t)max_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + char * _res; lvpy_lock(); - _res = ((const char *(*)(void))lv_version_info)(); + _res = ((char *(*)(const char *, size_t))lv_strndup)(src, max_len); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_str((void*)_res); } -static PyMethodDef py_lv_version_info_def = { - "lv_version_info", - (PyCFunction)py_lv_version_info, +static PyMethodDef py_lv_strndup_def = { + "lv_strndup", + (PyCFunction)py_lv_strndup, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60480,28 +73427,31 @@ static PyMethodDef py_lv_version_info_def = { /* * lvgl extension definition for: - * void lv_init(void) + * char *lv_strcat(char *dst, const char *src) */ -static PyObject *py_lv_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strcat(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dst_py; PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + char * _res; lvpy_lock(); - ((void (*)(void))lv_init)(); + _res = ((char *(*)(char *, const char *))lv_strcat)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_init_def = { - "lv_init", - (PyCFunction)py_lv_init, +static PyMethodDef py_lv_strcat_def = { + "lv_strcat", + (PyCFunction)py_lv_strcat, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60509,28 +73459,32 @@ static PyMethodDef py_lv_init_def = { /* * lvgl extension definition for: - * void lv_deinit(void) + * char *lv_strncat(char *dst, const char *src, size_t src_len) */ -static PyObject *py_lv_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strncat(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dst_py; PyObject *src_py; long src_len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &src_len_val)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t src_len = (size_t)src_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + char * _res; lvpy_lock(); - ((void (*)(void))lv_deinit)(); + _res = ((char *(*)(char *, const char *, size_t))lv_strncat)(dst, src, src_len); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_deinit_def = { - "lv_deinit", - (PyCFunction)py_lv_deinit, +static PyMethodDef py_lv_strncat_def = { + "lv_strncat", + (PyCFunction)py_lv_strncat, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60538,29 +73492,31 @@ static PyMethodDef py_lv_deinit_def = { /* * lvgl extension definition for: - * bool lv_is_initialized(void) + * char *lv_strchr(const char *str, int c) */ -static PyObject *py_lv_is_initialized(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strchr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *str_py; long c_val; + if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &c_val)) { PyGILState_Release(gstate); return NULL; } + const char *str = (const char *)(char*)convert_from_str(str_py); + int c = (int)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + char * _res; lvpy_lock(); - _res = ((bool (*)(void))lv_is_initialized)(); + _res = ((char *(*)(const char *, int))lv_strchr)(str, c); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_is_initialized_def = { - "lv_is_initialized", - (PyCFunction)py_lv_is_initialized, +static PyMethodDef py_lv_strchr_def = { + "lv_strchr", + (PyCFunction)py_lv_strchr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60568,32 +73524,29 @@ static PyMethodDef py_lv_is_initialized_def = { /* * lvgl extension definition for: - * void *lv_memcpy(void *dst, const void *src, size_t len) + * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) */ -static PyObject *py_lv_memcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_get_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - const void *src = (const void *)mp_to_ptr(src_py); - size_t len = (size_t)len_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((void *(*)(void *, const void *, size_t))lv_memcpy)(dst, src, len); + _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static PyMethodDef py_lv_memcpy_def = { - "lv_memcpy", - (PyCFunction)py_lv_memcpy, +static PyMethodDef py_lv_draw_buf_get_handlers_def = { + "lv_draw_buf_get_handlers", + (PyCFunction)py_lv_draw_buf_get_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60601,31 +73554,29 @@ static PyMethodDef py_lv_memcpy_def = { /* * lvgl extension definition for: - * void lv_memset(void *dst, uint8_t v, size_t len) + * lv_draw_buf_handlers_t *lv_draw_buf_get_font_handlers(void) */ -static PyObject *py_lv_memset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_get_font_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; long v_val; long len_val; - if (!PyArg_ParseTuple(py_args, "Oll", &dst_py, &v_val, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - uint8_t v = (uint8_t)v_val; - size_t len = (size_t)len_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_handlers_t * _res; lvpy_lock(); - ((void (*)(void *, uint8_t, size_t))lv_memset)(dst, v, len); + _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_font_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static PyMethodDef py_lv_memset_def = { - "lv_memset", - (PyCFunction)py_lv_memset, +static PyMethodDef py_lv_draw_buf_get_font_handlers_def = { + "lv_draw_buf_get_font_handlers", + (PyCFunction)py_lv_draw_buf_get_font_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60633,32 +73584,29 @@ static PyMethodDef py_lv_memset_def = { /* * lvgl extension definition for: - * void *lv_memmove(void *dst, const void *src, size_t len) + * lv_draw_buf_handlers_t *lv_draw_buf_get_image_handlers(void) */ -static PyObject *py_lv_memmove(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_get_image_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - const void *src = (const void *)mp_to_ptr(src_py); - size_t len = (size_t)len_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((void *(*)(void *, const void *, size_t))lv_memmove)(dst, src, len); + _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_image_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static PyMethodDef py_lv_memmove_def = { - "lv_memmove", - (PyCFunction)py_lv_memmove, +static PyMethodDef py_lv_draw_buf_get_image_handlers_def = { + "lv_draw_buf_get_image_handlers", + (PyCFunction)py_lv_draw_buf_get_image_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60666,32 +73614,31 @@ static PyMethodDef py_lv_memmove_def = { /* * lvgl extension definition for: - * int lv_memcmp(const void *p1, const void *p2, size_t len) + * void *lv_draw_buf_align(void *buf, lv_color_format_t color_format) */ -static PyObject *py_lv_memcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p1_py; PyObject *p2_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &p1_py, &p2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - const void *p1 = (const void *)mp_to_ptr(p1_py); - const void *p2 = (const void *)mp_to_ptr(p2_py); - size_t len = (size_t)len_val; + PyObject *buf_py; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + void * _res; lvpy_lock(); - _res = ((int (*)(const void *, const void *, size_t))lv_memcmp)(p1, p2, len); + _res = ((void *(*)(void *, lv_color_format_t))lv_draw_buf_align)(buf, color_format); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_memcmp_def = { - "lv_memcmp", - (PyCFunction)py_lv_memcmp, +static PyMethodDef py_lv_draw_buf_align_def = { + "lv_draw_buf_align", + (PyCFunction)py_lv_draw_buf_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60699,30 +73646,31 @@ static PyMethodDef py_lv_memcmp_def = { /* * lvgl extension definition for: - * size_t lv_strlen(const char *str) + * uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format) */ -static PyObject *py_lv_strlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_width_to_stride(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *str_py; - if (!PyArg_ParseTuple(py_args, "O", &str_py)) { PyGILState_Release(gstate); return NULL; } - const char *str = (const char *)(char*)convert_from_str(str_py); + long w_val; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + uint32_t w = (uint32_t)w_val; + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; + uint32_t _res; lvpy_lock(); - _res = ((size_t (*)(const char *))lv_strlen)(str); + _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride)(w, color_format); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_strlen_def = { - "lv_strlen", - (PyCFunction)py_lv_strlen, +static PyMethodDef py_lv_draw_buf_width_to_stride_def = { + "lv_draw_buf_width_to_stride", + (PyCFunction)py_lv_draw_buf_width_to_stride, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60730,31 +73678,33 @@ static PyMethodDef py_lv_strlen_def = { /* * lvgl extension definition for: - * size_t lv_strnlen(const char *str, size_t max_len) + * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static PyObject *py_lv_strnlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *str_py; long max_len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } - const char *str = (const char *)(char*)convert_from_str(str_py); - size_t max_len = (size_t)max_len_val; + long w_val; long h_val; PyObject *cf_py; long stride_val; + if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((size_t (*)(const char *, size_t))lv_strnlen)(str, max_len); + _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create)(w, h, cf, stride); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_strnlen_def = { - "lv_strnlen", - (PyCFunction)py_lv_strnlen, +static PyMethodDef py_lv_draw_buf_create_def = { + "lv_draw_buf_create", + (PyCFunction)py_lv_draw_buf_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60762,32 +73712,29 @@ static PyMethodDef py_lv_strnlen_def = { /* * lvgl extension definition for: - * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) + * const lv_font_t *lv_font_get_default(void) */ -static PyObject *py_lv_strlcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long dst_size_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dst_size_val)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t dst_size = (size_t)dst_size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; + const lv_font_t * _res; lvpy_lock(); - _res = ((size_t (*)(char *, const char *, size_t))lv_strlcpy)(dst, src, dst_size); + _res = ((const lv_font_t *(*)(void))lv_font_get_default)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_strlcpy_def = { - "lv_strlcpy", - (PyCFunction)py_lv_strlcpy, +static PyMethodDef py_lv_font_get_default_def = { + "lv_font_get_default", + (PyCFunction)py_lv_font_get_default, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60795,32 +73742,35 @@ static PyMethodDef py_lv_strlcpy_def = { /* * lvgl extension definition for: - * char *lv_strncpy(char *dst, const char *src, size_t dest_size) + * void lv_text_get_size(lv_point_t *size_res, const char *text, const lv_font_t *font, int32_t letter_space, int32_t line_space, int32_t max_width, lv_text_flag_t flag) */ -static PyObject *py_lv_strncpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long dest_size_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dest_size_val)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t dest_size = (size_t)dest_size_val; + PyObject *size_res_py; PyObject *text_py; PyObject *font_py; long letter_space_val; long line_space_val; long max_width_val; PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "OOOlllO", &size_res_py, &text_py, &font_py, &letter_space_val, &line_space_val, &max_width_val, &flag_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); + const char *text = (const char *)(char*)convert_from_str(text_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + int32_t letter_space = (int32_t)letter_space_val; + int32_t line_space = (int32_t)line_space_val; + int32_t max_width = (int32_t)max_width_val; + lv_text_flag_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *, size_t))lv_strncpy)(dst, src, dest_size); + ((void (*)(lv_point_t *, const char *, const lv_font_t *, int32_t, int32_t, int32_t, lv_text_flag_t))lv_text_get_size)(size_res, text, font, letter_space, line_space, max_width, flag); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_strncpy_def = { - "lv_strncpy", - (PyCFunction)py_lv_strncpy, +static PyMethodDef py_lv_text_get_size_def = { + "lv_text_get_size", + (PyCFunction)py_lv_text_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60828,63 +73778,96 @@ static PyMethodDef py_lv_strncpy_def = { /* * lvgl extension definition for: - * char *lv_strcpy(char *dst, const char *src) + * void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) */ -static PyObject *py_lv_strcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bidi_calculate_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); + PyObject *align_py; PyObject *base_dir_py; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "OOO", &align_py, &base_dir_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_text_align_t *align = mp_array_to_i32ptr(align_py); + lv_base_dir_t *base_dir = mp_array_to_i32ptr(base_dir_py); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *))lv_strcpy)(dst, src); + ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_bidi_calculate_align)(align, base_dir, txt); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_strcpy_def = { - "lv_strcpy", - (PyCFunction)py_lv_strcpy, +static PyMethodDef py_lv_bidi_calculate_align_def = { + "lv_bidi_calculate_align", + (PyCFunction)py_lv_bidi_calculate_align, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_layout_register_cb (CPython) + * void lv_layout_update_cb_t(lv_obj_t *, void *user_data) + */ +static void lv_layout_register_cb_callback(lv_obj_t *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_layout_register_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * int lv_strcmp(const char *s1, const char *s2) + * uint32_t lv_layout_register(lv_layout_update_cb_t cb, void *user_data) */ -static PyObject *py_lv_strcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_register(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *s1_py; PyObject *s2_py; - if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } - const char *s1 = (const char *)(char*)convert_from_str(s1_py); - const char *s2 = (const char *)(char*)convert_from_str(s2_py); + PyObject *cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + void *cb = mp_lv_callback(cb_py, &lv_layout_register_cb_callback, "lv_layout_register_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + uint32_t _res; lvpy_lock(); - _res = ((int (*)(const char *, const char *))lv_strcmp)(s1, s2); + _res = ((uint32_t (*)(lv_layout_update_cb_t, void *))lv_layout_register)(cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_strcmp_def = { - "lv_strcmp", - (PyCFunction)py_lv_strcmp, +static PyMethodDef py_lv_layout_register_def = { + "lv_layout_register", + (PyCFunction)py_lv_layout_register, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60892,32 +73875,28 @@ static PyMethodDef py_lv_strcmp_def = { /* * lvgl extension definition for: - * int lv_strncmp(const char *s1, const char *s2, size_t len) + * void lv_flex_init(void) */ -static PyObject *py_lv_strncmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_flex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *s1_py; PyObject *s2_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &s1_py, &s2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - const char *s1 = (const char *)(char*)convert_from_str(s1_py); - const char *s2 = (const char *)(char*)convert_from_str(s2_py); - size_t len = (size_t)len_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; lvpy_lock(); - _res = ((int (*)(const char *, const char *, size_t))lv_strncmp)(s1, s2, len); + ((void (*)(void))lv_flex_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_strncmp_def = { - "lv_strncmp", - (PyCFunction)py_lv_strncmp, +static PyMethodDef py_lv_flex_init_def = { + "lv_flex_init", + (PyCFunction)py_lv_flex_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60925,30 +73904,28 @@ static PyMethodDef py_lv_strncmp_def = { /* * lvgl extension definition for: - * char *lv_strdup(const char *src) + * void lv_grid_init(void) */ -static PyObject *py_lv_strdup(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grid_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - const char *src = (const char *)(char*)convert_from_str(src_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; lvpy_lock(); - _res = ((char *(*)(const char *))lv_strdup)(src); + ((void (*)(void))lv_grid_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_strdup_def = { - "lv_strdup", - (PyCFunction)py_lv_strdup, +static PyMethodDef py_lv_grid_init_def = { + "lv_grid_init", + (PyCFunction)py_lv_grid_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60956,31 +73933,30 @@ static PyMethodDef py_lv_strdup_def = { /* * lvgl extension definition for: - * char *lv_strndup(const char *src, size_t max_len) + * int32_t lv_grid_fr(uint8_t x) */ -static PyObject *py_lv_strndup(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grid_fr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *src_py; long max_len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &src_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t max_len = (size_t)max_len_val; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t x = (uint8_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + int32_t _res; lvpy_lock(); - _res = ((char *(*)(const char *, size_t))lv_strndup)(src, max_len); + _res = ((int32_t (*)(uint8_t))lv_grid_fr)(x); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_strndup_def = { - "lv_strndup", - (PyCFunction)py_lv_strndup, +static PyMethodDef py_lv_grid_fr_def = { + "lv_grid_fr", + (PyCFunction)py_lv_grid_fr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -60988,31 +73964,30 @@ static PyMethodDef py_lv_strndup_def = { /* * lvgl extension definition for: - * char *lv_strcat(char *dst, const char *src) + * lv_style_prop_t lv_style_register_prop(uint8_t flag) */ -static PyObject *py_lv_strcat(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_register_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); + long flag_val; + if (!PyArg_ParseTuple(py_args, "l", &flag_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t flag = (uint8_t)flag_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_style_prop_t _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *))lv_strcat)(dst, src); + _res = ((lv_style_prop_t (*)(uint8_t))lv_style_register_prop)(flag); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_strcat_def = { - "lv_strcat", - (PyCFunction)py_lv_strcat, +static PyMethodDef py_lv_style_register_prop_def = { + "lv_style_register_prop", + (PyCFunction)py_lv_style_register_prop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61020,32 +73995,29 @@ static PyMethodDef py_lv_strcat_def = { /* * lvgl extension definition for: - * char *lv_strncat(char *dst, const char *src, size_t src_len) + * lv_style_prop_t lv_style_get_num_custom_props(void) */ -static PyObject *py_lv_strncat(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_get_num_custom_props(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long src_len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &src_len_val)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t src_len = (size_t)src_len_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_style_prop_t _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *, size_t))lv_strncat)(dst, src, src_len); + _res = ((lv_style_prop_t (*)(void))lv_style_get_num_custom_props)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_strncat_def = { - "lv_strncat", - (PyCFunction)py_lv_strncat, +static PyMethodDef py_lv_style_get_num_custom_props_def = { + "lv_style_get_num_custom_props", + (PyCFunction)py_lv_style_get_num_custom_props, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61053,31 +74025,30 @@ static PyMethodDef py_lv_strncat_def = { /* * lvgl extension definition for: - * char *lv_strchr(const char *str, int c) + * lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop) */ -static PyObject *py_lv_strchr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_prop_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *str_py; long c_val; - if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &c_val)) { PyGILState_Release(gstate); return NULL; } - const char *str = (const char *)(char*)convert_from_str(str_py); - int c = (int)c_val; + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_style_value_t _res; lvpy_lock(); - _res = ((char *(*)(const char *, int))lv_strchr)(str, c); + _res = ((lv_style_value_t (*)(lv_style_prop_t))lv_style_prop_get_default)(prop); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_read_lv_style_value_t(_res); } -static PyMethodDef py_lv_strchr_def = { - "lv_strchr", - (PyCFunction)py_lv_strchr, +static PyMethodDef py_lv_style_prop_get_default_def = { + "lv_style_prop_get_default", + (PyCFunction)py_lv_style_prop_get_default, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61085,28 +74056,30 @@ static PyMethodDef py_lv_strchr_def = { /* * lvgl extension definition for: - * void lv_mem_init(void) + * uint8_t lv_style_prop_lookup_flags(lv_style_prop_t prop) */ -static PyObject *py_lv_mem_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_prop_lookup_flags(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint8_t _res; lvpy_lock(); - ((void (*)(void))lv_mem_init)(); + _res = ((uint8_t (*)(lv_style_prop_t))lv_style_prop_lookup_flags)(prop); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_mem_init_def = { - "lv_mem_init", - (PyCFunction)py_lv_mem_init, +static PyMethodDef py_lv_style_prop_lookup_flags_def = { + "lv_style_prop_lookup_flags", + (PyCFunction)py_lv_style_prop_lookup_flags, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61114,9 +74087,9 @@ static PyMethodDef py_lv_mem_init_def = { /* * lvgl extension definition for: - * void lv_mem_deinit(void) + * uint32_t lv_timer_handler(void) */ -static PyObject *py_lv_mem_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -61125,17 +74098,18 @@ static PyObject *py_lv_mem_deinit(PyObject *self, PyObject *py_args, PyObject *p if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_mem_deinit)(); + _res = ((uint32_t (*)(void))lv_timer_handler)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_mem_deinit_def = { - "lv_mem_deinit", - (PyCFunction)py_lv_mem_deinit, +static PyMethodDef py_lv_timer_handler_def = { + "lv_timer_handler", + (PyCFunction)py_lv_timer_handler, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61143,31 +74117,30 @@ static PyMethodDef py_lv_mem_deinit_def = { /* * lvgl extension definition for: - * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) + * uint32_t lv_timer_handler_run_in_period(uint32_t period) */ -static PyObject *py_lv_mem_add_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_handler_run_in_period(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *mem_py; long bytes_val; - if (!PyArg_ParseTuple(py_args, "Ol", &mem_py, &bytes_val)) { PyGILState_Release(gstate); return NULL; } - void *mem = mp_to_ptr(mem_py); - size_t bytes = (size_t)bytes_val; + long period_val; + if (!PyArg_ParseTuple(py_args, "l", &period_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t period = (uint32_t)period_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_mem_pool_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_mem_pool_t (*)(void *, size_t))lv_mem_add_pool)(mem, bytes); + _res = ((uint32_t (*)(uint32_t))lv_timer_handler_run_in_period)(period); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_mem_add_pool_def = { - "lv_mem_add_pool", - (PyCFunction)py_lv_mem_add_pool, +static PyMethodDef py_lv_timer_handler_run_in_period_def = { + "lv_timer_handler_run_in_period", + (PyCFunction)py_lv_timer_handler_run_in_period, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61175,29 +74148,29 @@ static PyMethodDef py_lv_mem_add_pool_def = { /* * lvgl extension definition for: - * void lv_mem_remove_pool(lv_mem_pool_t pool) + * uint32_t lv_timer_get_time_to_next(void) */ -static PyObject *py_lv_mem_remove_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_time_to_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *pool_py; - if (!PyArg_ParseTuple(py_args, "O", &pool_py)) { PyGILState_Release(gstate); return NULL; } - lv_mem_pool_t pool = mp_to_ptr(pool_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_mem_pool_t))lv_mem_remove_pool)(pool); + _res = ((uint32_t (*)(void))lv_timer_get_time_to_next)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_mem_remove_pool_def = { - "lv_mem_remove_pool", - (PyCFunction)py_lv_mem_remove_pool, +static PyMethodDef py_lv_timer_get_time_to_next_def = { + "lv_timer_get_time_to_next", + (PyCFunction)py_lv_timer_get_time_to_next, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61205,62 +74178,66 @@ static PyMethodDef py_lv_mem_remove_pool_def = { /* * lvgl extension definition for: - * void *lv_malloc(size_t size) + * void lv_timer_periodic_handler(void) */ -static PyObject *py_lv_malloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_periodic_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_malloc)(size); + ((void (*)(void))lv_timer_periodic_handler)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_malloc_def = { - "lv_malloc", - (PyCFunction)py_lv_malloc, +static PyMethodDef py_lv_timer_periodic_handler_def = { + "lv_timer_periodic_handler", + (PyCFunction)py_lv_timer_periodic_handler, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback cannot be the first argument + * lv_timer_handler_resume_cb_t cb + */ + + /* * lvgl extension definition for: - * void *lv_calloc(size_t num, size_t size) + * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) */ -static PyObject *py_lv_calloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_handler_set_resume_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long num_val; long size_val; - if (!PyArg_ParseTuple(py_args, "ll", &num_val, &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t num = (size_t)num_val; - size_t size = (size_t)size_val; + PyObject *cb_py; PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &data_py)) { PyGILState_Release(gstate); return NULL; } + void *data = mp_to_ptr(data_py); + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(size_t, size_t))lv_calloc)(num, size); + ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_timer_handler_set_resume_cb)(cb, data); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_calloc_def = { - "lv_calloc", - (PyCFunction)py_lv_calloc, +static PyMethodDef py_lv_timer_handler_set_resume_cb_def = { + "lv_timer_handler_set_resume_cb", + (PyCFunction)py_lv_timer_handler_set_resume_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61268,91 +74245,93 @@ static PyMethodDef py_lv_calloc_def = { /* * lvgl extension definition for: - * void *lv_zalloc(size_t size) + * lv_timer_t *lv_timer_create_basic(void) */ -static PyObject *py_lv_zalloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_create_basic(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_timer_t * _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_zalloc)(size); + _res = ((lv_timer_t *(*)(void))lv_timer_create_basic)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_zalloc_def = { - "lv_zalloc", - (PyCFunction)py_lv_zalloc, +static PyMethodDef py_lv_timer_create_basic_def = { + "lv_timer_create_basic", + (PyCFunction)py_lv_timer_create_basic, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void *lv_malloc_zeroed(size_t size) + * Callback function lv_timer_create_timer_xcb (CPython) + * void lv_timer_cb_t(lv_timer_t *) */ -static PyObject *py_lv_malloc_zeroed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - void * _res; - lvpy_lock(); - _res = ((void *(*)(size_t))lv_malloc_zeroed)(size); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_timer_create_timer_xcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_timer_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_malloc_zeroed_def = { - "lv_malloc_zeroed", - (PyCFunction)py_lv_malloc_zeroed, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_free(void *data) + * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) */ -static PyObject *py_lv_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - void *data = mp_to_ptr(data_py); + PyObject *timer_xcb_py; long period_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OlO", &timer_xcb_py, &period_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + uint32_t period = (uint32_t)period_val; + void *timer_xcb = mp_lv_callback(timer_xcb_py, &lv_timer_create_timer_xcb_callback, "lv_timer_create_timer_xcb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_timer_t * _res; lvpy_lock(); - ((void (*)(void *))lv_free)(data); + _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_timer_create)(timer_xcb, period, user_data); lvpy_unlock(); - + lvpy_timer_bind(_res); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_free_def = { - "lv_free", - (PyCFunction)py_lv_free, +static PyMethodDef py_lv_timer_create_def = { + "lv_timer_create", + (PyCFunction)py_lv_timer_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61360,31 +74339,29 @@ static PyMethodDef py_lv_free_def = { /* * lvgl extension definition for: - * void *lv_realloc(void *data_p, size_t new_size) + * void lv_timer_enable(bool en) */ -static PyObject *py_lv_realloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_enable(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *data_p_py; long new_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } - void *data_p = mp_to_ptr(data_p_py); - size_t new_size = (size_t)new_size_val; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(void *, size_t))lv_realloc)(data_p, new_size); + ((void (*)(bool))lv_timer_enable)(en); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_realloc_def = { - "lv_realloc", - (PyCFunction)py_lv_realloc, +static PyMethodDef py_lv_timer_enable_def = { + "lv_timer_enable", + (PyCFunction)py_lv_timer_enable, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61392,31 +74369,29 @@ static PyMethodDef py_lv_realloc_def = { /* * lvgl extension definition for: - * void *lv_reallocf(void *data_p, size_t new_size) + * uint32_t lv_timer_get_idle(void) */ -static PyObject *py_lv_reallocf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_idle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *data_p_py; long new_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } - void *data_p = mp_to_ptr(data_p_py); - size_t new_size = (size_t)new_size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(void *, size_t))lv_reallocf)(data_p, new_size); + _res = ((uint32_t (*)(void))lv_timer_get_idle)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_reallocf_def = { - "lv_reallocf", - (PyCFunction)py_lv_reallocf, +static PyMethodDef py_lv_timer_get_idle_def = { + "lv_timer_get_idle", + (PyCFunction)py_lv_timer_get_idle, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61424,30 +74399,29 @@ static PyMethodDef py_lv_reallocf_def = { /* * lvgl extension definition for: - * void *lv_malloc_core(size_t size) + * uint32_t lv_timer_get_time_until_next(void) */ -static PyObject *py_lv_malloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_time_until_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_malloc_core)(size); + _res = ((uint32_t (*)(void))lv_timer_get_time_until_next)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_malloc_core_def = { - "lv_malloc_core", - (PyCFunction)py_lv_malloc_core, +static PyMethodDef py_lv_timer_get_time_until_next_def = { + "lv_timer_get_time_until_next", + (PyCFunction)py_lv_timer_get_time_until_next, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61455,29 +74429,31 @@ static PyMethodDef py_lv_malloc_core_def = { /* * lvgl extension definition for: - * void lv_free_core(void *p) + * lv_display_t *lv_display_create(int32_t hor_res, int32_t ver_res) */ -static PyObject *py_lv_free_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } - void *p = mp_to_ptr(p_py); + long hor_res_val; long ver_res_val; + if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + int32_t hor_res = (int32_t)hor_res_val; + int32_t ver_res = (int32_t)ver_res_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_display_t * _res; lvpy_lock(); - ((void (*)(void *))lv_free_core)(p); + _res = ((lv_display_t *(*)(int32_t, int32_t))lv_display_create)(hor_res, ver_res); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_free_core_def = { - "lv_free_core", - (PyCFunction)py_lv_free_core, +static PyMethodDef py_lv_display_create_def = { + "lv_display_create", + (PyCFunction)py_lv_display_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61485,31 +74461,29 @@ static PyMethodDef py_lv_free_core_def = { /* * lvgl extension definition for: - * void *lv_realloc_core(void *p, size_t new_size) + * lv_display_t *lv_display_get_default(void) */ -static PyObject *py_lv_realloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; long new_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } - void *p = mp_to_ptr(p_py); - size_t new_size = (size_t)new_size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_display_t * _res; lvpy_lock(); - _res = ((void *(*)(void *, size_t))lv_realloc_core)(p, new_size); + _res = ((lv_display_t *(*)(void))lv_display_get_default)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_realloc_core_def = { - "lv_realloc_core", - (PyCFunction)py_lv_realloc_core, +static PyMethodDef py_lv_display_get_default_def = { + "lv_display_get_default", + (PyCFunction)py_lv_display_get_default, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61517,29 +74491,29 @@ static PyMethodDef py_lv_realloc_core_def = { /* * lvgl extension definition for: - * lv_result_t lv_mem_test_core(void) + * void lv_screen_load(lv_obj_t *scr) */ -static PyObject *py_lv_mem_test_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_screen_load(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *scr_py; + if (!PyArg_ParseTuple(py_args, "O", &scr_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scr = mp_to_lv(scr_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(void))lv_mem_test_core)(); + ((void (*)(lv_obj_t *))lv_screen_load)(scr); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_mem_test_core_def = { - "lv_mem_test_core", - (PyCFunction)py_lv_mem_test_core, +static PyMethodDef py_lv_screen_load_def = { + "lv_screen_load", + (PyCFunction)py_lv_screen_load, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61547,29 +74521,33 @@ static PyMethodDef py_lv_mem_test_core_def = { /* * lvgl extension definition for: - * lv_result_t lv_mem_test(void) + * void lv_screen_load_anim(lv_obj_t *scr, lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay, bool auto_del) */ -static PyObject *py_lv_mem_test(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_screen_load_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *scr_py; PyObject *anim_type_py; long time_val; long delay_val; long auto_del_val; + if (!PyArg_ParseTuple(py_args, "OOlll", &scr_py, &anim_type_py, &time_val, &delay_val, &auto_del_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scr = mp_to_lv(scr_py); + lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); + uint32_t time = (uint32_t)time_val; + uint32_t delay = (uint32_t)delay_val; + bool auto_del = (auto_del_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(void))lv_mem_test)(); + ((void (*)(lv_obj_t *, lv_screen_load_anim_t, uint32_t, uint32_t, bool))lv_screen_load_anim)(scr, anim_type, time, delay, auto_del); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_mem_test_def = { - "lv_mem_test", - (PyCFunction)py_lv_mem_test, +static PyMethodDef py_lv_screen_load_anim_def = { + "lv_screen_load_anim", + (PyCFunction)py_lv_screen_load_anim, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61577,31 +74555,29 @@ static PyMethodDef py_lv_mem_test_def = { /* * lvgl extension definition for: - * void lv_tick_inc(uint32_t tick_period) + * lv_obj_t *lv_screen_active(void) */ -static PyObject *py_lv_tick_inc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_screen_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long tick_period_val; - if (!PyArg_ParseTuple(py_args, "l", &tick_period_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t tick_period = (uint32_t)tick_period_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - Py_BEGIN_ALLOW_THREADS - ((void (*)(uint32_t))lv_tick_inc)(tick_period); - Py_END_ALLOW_THREADS + _res = ((lv_obj_t *(*)(void))lv_screen_active)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_tick_inc_def = { - "lv_tick_inc", - (PyCFunction)py_lv_tick_inc, +static PyMethodDef py_lv_screen_active_def = { + "lv_screen_active", + (PyCFunction)py_lv_screen_active, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61609,9 +74585,9 @@ static PyMethodDef py_lv_tick_inc_def = { /* * lvgl extension definition for: - * uint32_t lv_tick_get(void) + * lv_obj_t *lv_layer_top(void) */ -static PyObject *py_lv_tick_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -61620,18 +74596,18 @@ static PyObject *py_lv_tick_get(PyObject *self, PyObject *py_args, PyObject *py_ if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_tick_get)(); + _res = ((lv_obj_t *(*)(void))lv_layer_top)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_tick_get_def = { - "lv_tick_get", - (PyCFunction)py_lv_tick_get, +static PyMethodDef py_lv_layer_top_def = { + "lv_layer_top", + (PyCFunction)py_lv_layer_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61639,30 +74615,29 @@ static PyMethodDef py_lv_tick_get_def = { /* * lvgl extension definition for: - * uint32_t lv_tick_elaps(uint32_t prev_tick) + * lv_obj_t *lv_layer_sys(void) */ -static PyObject *py_lv_tick_elaps(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_sys(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long prev_tick_val; - if (!PyArg_ParseTuple(py_args, "l", &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t prev_tick = (uint32_t)prev_tick_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_tick_elaps)(prev_tick); + _res = ((lv_obj_t *(*)(void))lv_layer_sys)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_tick_elaps_def = { - "lv_tick_elaps", - (PyCFunction)py_lv_tick_elaps, +static PyMethodDef py_lv_layer_sys_def = { + "lv_layer_sys", + (PyCFunction)py_lv_layer_sys, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61670,31 +74645,29 @@ static PyMethodDef py_lv_tick_elaps_def = { /* * lvgl extension definition for: - * uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick) + * lv_obj_t *lv_layer_bottom(void) */ -static PyObject *py_lv_tick_diff(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long tick_val; long prev_tick_val; - if (!PyArg_ParseTuple(py_args, "ll", &tick_val, &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t tick = (uint32_t)tick_val; - uint32_t prev_tick = (uint32_t)prev_tick_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, uint32_t))lv_tick_diff)(tick, prev_tick); + _res = ((lv_obj_t *(*)(void))lv_layer_bottom)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_tick_diff_def = { - "lv_tick_diff", - (PyCFunction)py_lv_tick_diff, +static PyMethodDef py_lv_layer_bottom_def = { + "lv_layer_bottom", + (PyCFunction)py_lv_layer_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61702,103 +74675,98 @@ static PyMethodDef py_lv_tick_diff_def = { /* * lvgl extension definition for: - * void lv_delay_ms(uint32_t ms) + * int32_t lv_dpx(int32_t n) */ -static PyObject *py_lv_delay_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dpx(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long ms_val; - if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t ms = (uint32_t)ms_val; + long n_val; + if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } + int32_t n = (int32_t)n_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(uint32_t))lv_delay_ms)(ms); + _res = ((int32_t (*)(int32_t))lv_dpx)(n); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_delay_ms_def = { - "lv_delay_ms", - (PyCFunction)py_lv_delay_ms, +static PyMethodDef py_lv_dpx_def = { + "lv_dpx", + (PyCFunction)py_lv_dpx, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback cannot be the first argument - * lv_delay_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_delay_set_cb(lv_delay_cb_t cb) + * int32_t lv_clamp_width(int32_t width, int32_t min_width, int32_t max_width, int32_t ref_width) */ -static PyObject *py_lv_delay_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_clamp_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } - void *cb = NULL; + long width_val; long min_width_val; long max_width_val; long ref_width_val; + if (!PyArg_ParseTuple(py_args, "llll", &width_val, &min_width_val, &max_width_val, &ref_width_val)) { PyGILState_Release(gstate); return NULL; } + int32_t width = (int32_t)width_val; + int32_t min_width = (int32_t)min_width_val; + int32_t max_width = (int32_t)max_width_val; + int32_t ref_width = (int32_t)ref_width_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_delay_cb_t))lv_delay_set_cb)(cb); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_width)(width, min_width, max_width, ref_width); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_delay_set_cb_def = { - "lv_delay_set_cb", - (PyCFunction)py_lv_delay_set_cb, +static PyMethodDef py_lv_clamp_width_def = { + "lv_clamp_width", + (PyCFunction)py_lv_clamp_width, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback cannot be the first argument - * lv_tick_get_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_tick_set_cb(lv_tick_get_cb_t cb) + * int32_t lv_clamp_height(int32_t height, int32_t min_height, int32_t max_height, int32_t ref_height) */ -static PyObject *py_lv_tick_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_clamp_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } - void *cb = NULL; + long height_val; long min_height_val; long max_height_val; long ref_height_val; + if (!PyArg_ParseTuple(py_args, "llll", &height_val, &min_height_val, &max_height_val, &ref_height_val)) { PyGILState_Release(gstate); return NULL; } + int32_t height = (int32_t)height_val; + int32_t min_height = (int32_t)min_height_val; + int32_t max_height = (int32_t)max_height_val; + int32_t ref_height = (int32_t)ref_height_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_tick_get_cb_t))lv_tick_set_cb)(cb); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_height)(height, min_height, max_height, ref_height); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_tick_set_cb_def = { - "lv_tick_set_cb", - (PyCFunction)py_lv_tick_set_cb, +static PyMethodDef py_lv_clamp_height_def = { + "lv_clamp_height", + (PyCFunction)py_lv_clamp_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61806,9 +74774,9 @@ static PyMethodDef py_lv_tick_set_cb_def = { /* * lvgl extension definition for: - * lv_tick_get_cb_t lv_tick_get_cb(void) + * void lv_draw_init(void) */ -static PyObject *py_lv_tick_get_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -61817,18 +74785,17 @@ static PyObject *py_lv_tick_get_cb(PyObject *self, PyObject *py_args, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_tick_get_cb_t _res; lvpy_lock(); - _res = ((lv_tick_get_cb_t (*)(void))lv_tick_get_cb)(); + ((void (*)(void))lv_draw_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_tick_get_cb_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_tick_get_cb_def = { - "lv_tick_get_cb", - (PyCFunction)py_lv_tick_get_cb, +static PyMethodDef py_lv_draw_init_def = { + "lv_draw_init", + (PyCFunction)py_lv_draw_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61836,9 +74803,9 @@ static PyMethodDef py_lv_tick_get_cb_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_handler(void) + * void lv_draw_deinit(void) */ -static PyObject *py_lv_timer_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -61847,18 +74814,17 @@ static PyObject *py_lv_timer_handler(PyObject *self, PyObject *py_args, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_timer_handler)(); + ((void (*)(void))lv_draw_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_handler_def = { - "lv_timer_handler", - (PyCFunction)py_lv_timer_handler, +static PyMethodDef py_lv_draw_deinit_def = { + "lv_draw_deinit", + (PyCFunction)py_lv_draw_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61866,30 +74832,30 @@ static PyMethodDef py_lv_timer_handler_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_handler_run_in_period(uint32_t period) + * void *lv_draw_create_unit(size_t size) */ -static PyObject *py_lv_timer_handler_run_in_period(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_create_unit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long period_val; - if (!PyArg_ParseTuple(py_args, "l", &period_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t period = (uint32_t)period_val; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + void * _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_timer_handler_run_in_period)(period); + _res = ((void *(*)(size_t))lv_draw_create_unit)(size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_timer_handler_run_in_period_def = { - "lv_timer_handler_run_in_period", - (PyCFunction)py_lv_timer_handler_run_in_period, +static PyMethodDef py_lv_draw_create_unit_def = { + "lv_draw_create_unit", + (PyCFunction)py_lv_draw_create_unit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61897,66 +74863,63 @@ static PyMethodDef py_lv_timer_handler_run_in_period_def = { /* * lvgl extension definition for: - * void lv_timer_periodic_handler(void) + * lv_draw_task_t *lv_draw_add_task(lv_layer_t *layer, const lv_area_t *coords, lv_draw_task_type_t type) */ -static PyObject *py_lv_timer_periodic_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_add_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *coords_py; PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &coords_py, &type_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + lv_draw_task_type_t type = (int)mp_obj_get_int(type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t * _res; lvpy_lock(); - ((void (*)(void))lv_timer_periodic_handler)(); + _res = ((lv_draw_task_t *(*)(lv_layer_t *, const lv_area_t *, lv_draw_task_type_t))lv_draw_add_task)(layer, coords, type); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_timer_periodic_handler_def = { - "lv_timer_periodic_handler", - (PyCFunction)py_lv_timer_periodic_handler, +static PyMethodDef py_lv_draw_add_task_def = { + "lv_draw_add_task", + (PyCFunction)py_lv_draw_add_task, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback cannot be the first argument - * lv_timer_handler_resume_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) + * void lv_draw_finalize_task_creation(lv_layer_t *layer, lv_draw_task_t *t) */ -static PyObject *py_lv_timer_handler_set_resume_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_finalize_task_creation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &data_py)) { PyGILState_Release(gstate); return NULL; } - void *data = mp_to_ptr(data_py); - void *cb = NULL; + PyObject *layer_py; PyObject *t_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &t_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(t_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_timer_handler_set_resume_cb)(cb, data); + ((void (*)(lv_layer_t *, lv_draw_task_t *))lv_draw_finalize_task_creation)(layer, t); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_handler_set_resume_cb_def = { - "lv_timer_handler_set_resume_cb", - (PyCFunction)py_lv_timer_handler_set_resume_cb, +static PyMethodDef py_lv_draw_finalize_task_creation_def = { + "lv_draw_finalize_task_creation", + (PyCFunction)py_lv_draw_finalize_task_creation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -61964,9 +74927,9 @@ static PyMethodDef py_lv_timer_handler_set_resume_cb_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create_basic(void) + * void lv_draw_dispatch(void) */ -static PyObject *py_lv_timer_create_basic(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -61975,82 +74938,46 @@ static PyObject *py_lv_timer_create_basic(PyObject *self, PyObject *py_args, PyO if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(void))lv_timer_create_basic)(); + ((void (*)(void))lv_draw_dispatch)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_create_basic_def = { - "lv_timer_create_basic", - (PyCFunction)py_lv_timer_create_basic, +static PyMethodDef py_lv_draw_dispatch_def = { + "lv_draw_dispatch", + (PyCFunction)py_lv_draw_dispatch, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_timer_create_timer_xcb (CPython) - * void lv_timer_cb_t(lv_timer_t *) - */ -static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_timer_create_timer_xcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_timer_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) + * void lv_draw_dispatch_wait_for_request(void) */ -static PyObject *py_lv_timer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch_wait_for_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *timer_xcb_py; long period_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OlO", &timer_xcb_py, &period_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - uint32_t period = (uint32_t)period_val; - void *timer_xcb = mp_lv_callback(timer_xcb_py, &lv_timer_create_timer_xcb_callback, "lv_timer_create_timer_xcb", &user_data, NULL, (NULL), (NULL)); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_timer_create)(timer_xcb, period, user_data); + ((void (*)(void))lv_draw_dispatch_wait_for_request)(); lvpy_unlock(); - lvpy_timer_bind(_res); + PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_create_def = { - "lv_timer_create", - (PyCFunction)py_lv_timer_create, +static PyMethodDef py_lv_draw_dispatch_wait_for_request_def = { + "lv_draw_dispatch_wait_for_request", + (PyCFunction)py_lv_draw_dispatch_wait_for_request, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62058,29 +74985,28 @@ static PyMethodDef py_lv_timer_create_def = { /* * lvgl extension definition for: - * void lv_timer_enable(bool en) + * void lv_draw_wait_for_finish(void) */ -static PyObject *py_lv_timer_enable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_wait_for_finish(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; - (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - bool en = (en_val != 0); + (void)py_kwds; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(bool))lv_timer_enable)(en); + ((void (*)(void))lv_draw_wait_for_finish)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_enable_def = { - "lv_timer_enable", - (PyCFunction)py_lv_timer_enable, +static PyMethodDef py_lv_draw_wait_for_finish_def = { + "lv_draw_wait_for_finish", + (PyCFunction)py_lv_draw_wait_for_finish, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62088,9 +75014,9 @@ static PyMethodDef py_lv_timer_enable_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_get_idle(void) + * void lv_draw_dispatch_request(void) */ -static PyObject *py_lv_timer_get_idle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -62099,18 +75025,17 @@ static PyObject *py_lv_timer_get_idle(PyObject *self, PyObject *py_args, PyObjec if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_timer_get_idle)(); + ((void (*)(void))lv_draw_dispatch_request)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_get_idle_def = { - "lv_timer_get_idle", - (PyCFunction)py_lv_timer_get_idle, +static PyMethodDef py_lv_draw_dispatch_request_def = { + "lv_draw_dispatch_request", + (PyCFunction)py_lv_draw_dispatch_request, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62118,9 +75043,9 @@ static PyMethodDef py_lv_timer_get_idle_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_get_time_until_next(void) + * uint32_t lv_draw_get_unit_count(void) */ -static PyObject *py_lv_timer_get_time_until_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_unit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -62131,16 +75056,16 @@ static PyObject *py_lv_timer_get_time_until_next(PyObject *self, PyObject *py_ar uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_timer_get_time_until_next)(); + _res = ((uint32_t (*)(void))lv_draw_get_unit_count)(); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_timer_get_time_until_next_def = { - "lv_timer_get_time_until_next", - (PyCFunction)py_lv_timer_get_time_until_next, +static PyMethodDef py_lv_draw_get_unit_count_def = { + "lv_draw_get_unit_count", + (PyCFunction)py_lv_draw_get_unit_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62148,30 +75073,32 @@ static PyMethodDef py_lv_timer_get_time_until_next_def = { /* * lvgl extension definition for: - * int32_t lv_trigo_sin(int16_t angle) + * lv_draw_task_t *lv_draw_get_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) */ -static PyObject *py_lv_trigo_sin(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long angle_val; - if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } - int16_t angle = (int16_t)angle_val; + PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; + if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); + uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_draw_task_t * _res; lvpy_lock(); - _res = ((int32_t (*)(int16_t))lv_trigo_sin)(angle); + _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_available_task)(layer, t_prev, draw_unit_id); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_trigo_sin_def = { - "lv_trigo_sin", - (PyCFunction)py_lv_trigo_sin, +static PyMethodDef py_lv_draw_get_available_task_def = { + "lv_draw_get_available_task", + (PyCFunction)py_lv_draw_get_available_task, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62179,30 +75106,32 @@ static PyMethodDef py_lv_trigo_sin_def = { /* * lvgl extension definition for: - * int32_t lv_trigo_cos(int16_t angle) + * lv_draw_task_t *lv_draw_get_next_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) */ -static PyObject *py_lv_trigo_cos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_next_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long angle_val; - if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } - int16_t angle = (int16_t)angle_val; + PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; + if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); + uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_draw_task_t * _res; lvpy_lock(); - _res = ((int32_t (*)(int16_t))lv_trigo_cos)(angle); + _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_next_available_task)(layer, t_prev, draw_unit_id); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_trigo_cos_def = { - "lv_trigo_cos", - (PyCFunction)py_lv_trigo_cos, +static PyMethodDef py_lv_draw_get_next_available_task_def = { + "lv_draw_get_next_available_task", + (PyCFunction)py_lv_draw_get_next_available_task, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62210,34 +75139,31 @@ static PyMethodDef py_lv_trigo_cos_def = { /* * lvgl extension definition for: - * int32_t lv_cubic_bezier(int32_t x, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + * void lv_draw_unit_send_event(const char *name, lv_event_code_t code, void *param) */ -static PyObject *py_lv_cubic_bezier(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_unit_send_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long x1_val; long y1_val; long x2_val; long y2_val; - if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; - int32_t x1 = (int32_t)x1_val; - int32_t y1 = (int32_t)y1_val; - int32_t x2 = (int32_t)x2_val; - int32_t y2 = (int32_t)y2_val; + PyObject *name_py; PyObject *code_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OOO", &name_py, &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + const char *name = (const char *)(char*)convert_from_str(name_py); + lv_event_code_t code = (int)mp_obj_get_int(code_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_cubic_bezier)(x, x1, y1, x2, y2); + ((void (*)(const char *, lv_event_code_t, void *))lv_draw_unit_send_event)(name, code, param); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cubic_bezier_def = { - "lv_cubic_bezier", - (PyCFunction)py_lv_cubic_bezier, +static PyMethodDef py_lv_draw_unit_send_event_def = { + "lv_draw_unit_send_event", + (PyCFunction)py_lv_draw_unit_send_event, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62245,34 +75171,32 @@ static PyMethodDef py_lv_cubic_bezier_def = { /* * lvgl extension definition for: - * int32_t lv_bezier3(int32_t t, int32_t u0, uint32_t u1, int32_t u2, int32_t u3) + * lv_layer_t *lv_draw_layer_create(lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) */ -static PyObject *py_lv_bezier3(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long t_val; long u0_val; long u1_val; long u2_val; long u3_val; - if (!PyArg_ParseTuple(py_args, "lllll", &t_val, &u0_val, &u1_val, &u2_val, &u3_val)) { PyGILState_Release(gstate); return NULL; } - int32_t t = (int32_t)t_val; - int32_t u0 = (int32_t)u0_val; - uint32_t u1 = (uint32_t)u1_val; - int32_t u2 = (int32_t)u2_val; - int32_t u3 = (int32_t)u3_val; + PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_layer_t * _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, uint32_t, int32_t, int32_t))lv_bezier3)(t, u0, u1, u2, u3); + _res = ((lv_layer_t *(*)(lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_create)(parent_layer, color_format, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_layer_t((void*)_res); } -static PyMethodDef py_lv_bezier3_def = { - "lv_bezier3", - (PyCFunction)py_lv_bezier3, +static PyMethodDef py_lv_draw_layer_create_def = { + "lv_draw_layer_create", + (PyCFunction)py_lv_draw_layer_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62280,196 +75204,63 @@ static PyMethodDef py_lv_bezier3_def = { /* * lvgl extension definition for: - * uint16_t lv_atan2(int x, int y) + * void lv_draw_layer_init(lv_layer_t *layer, lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) */ -static PyObject *py_lv_atan2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - int x = (int)x_val; - int y = (int)y_val; + PyObject *layer_py; PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &layer_py, &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(int, int))lv_atan2)(x, y); + ((void (*)(lv_layer_t *, lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_init)(layer, parent_layer, color_format, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_atan2_def = { - "lv_atan2", - (PyCFunction)py_lv_atan2, +static PyMethodDef py_lv_draw_layer_init_def = { + "lv_draw_layer_init", + (PyCFunction)py_lv_draw_layer_init, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Struct lv_sqrt_res_t (CPython) - */ - -extern PyMethodDef py_lv_sqrt_res_t_methods[]; - -static PyObject *py_lv_sqrt_res_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "i") == 0) return mp_obj_new_int_from_uint(data->i); - if (strcmp(attr, "f") == 0) return mp_obj_new_int_from_uint(data->f); - for (PyMethodDef *m = py_lv_sqrt_res_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_sqrt_res_t_field_names[] = {"i", "f", NULL}; - -static PyObject *py_lv_sqrt_res_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_sqrt_res_t_field_names, py_lv_sqrt_res_t_methods); -} - -static PyMethodDef py_lv_sqrt_res_t_type_methods[] = { - {"__dir__", py_lv_sqrt_res_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_sqrt_res_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_sqrt_res_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "i") == 0) { data->i = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "f") == 0) { data->f = (uint16_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_sqrt_res_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_sqrt_res_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_sqrt_res_t)); -} - -static void py_lv_sqrt_res_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_sqrt_res_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_sqrt_res_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_sqrt_res_t_dealloc, - .tp_getattro = (getter)py_lv_sqrt_res_t_getattro, - .tp_setattro = (setter)py_lv_sqrt_res_t_setattro, - .tp_new = py_lv_sqrt_res_t_new, - .tp_methods = py_lv_sqrt_res_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_sqrt_res_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_sqrt_res_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_sqrt_res_t*)self->data; -} - -static lv_sqrt_res_t mp_write_scratch_lv_sqrt_res_t; - -static inline void* mp_write_value_ptr_lv_sqrt_res_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_sqrt_res_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_sqrt_res_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_sqrt_res_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_sqrt_res_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_sqrt_res_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t or dict, got None"); - } - memset(&mp_write_scratch_lv_sqrt_res_t, 0, sizeof(lv_sqrt_res_t)); - return &mp_write_scratch_lv_sqrt_res_t; -} - -#define mp_write_lv_sqrt_res_t(struct_obj) (*((lv_sqrt_res_t*)mp_write_value_ptr_lv_sqrt_res_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_sqrt_res_t(void *field) -{ - return lv_to_mp_struct(&py_lv_sqrt_res_t_type, field); -} - -#define mp_read_lv_sqrt_res_t(field) lv_to_mp_struct_own(&py_lv_sqrt_res_t_type, copy_buffer(&field, sizeof(lv_sqrt_res_t))) -#define mp_read_byref_lv_sqrt_res_t(field) mp_read_ptr_lv_sqrt_res_t(&field) - - /* * lvgl extension definition for: - * void lv_sqrt(uint32_t x, lv_sqrt_res_t *q, uint32_t mask) + * void *lv_draw_layer_alloc_buf(lv_layer_t *layer) */ -static PyObject *py_lv_sqrt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_alloc_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; PyObject *q_py; long mask_val; - if (!PyArg_ParseTuple(py_args, "lOl", &x_val, &q_py, &mask_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t x = (uint32_t)x_val; - lv_sqrt_res_t *q = mp_write_ptr_lv_sqrt_res_t(q_py); - uint32_t mask = (uint32_t)mask_val; + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(uint32_t, lv_sqrt_res_t *, uint32_t))lv_sqrt)(x, q, mask); + _res = ((void *(*)(lv_layer_t *))lv_draw_layer_alloc_buf)(layer); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_sqrt_def = { - "lv_sqrt", - (PyCFunction)py_lv_sqrt, +static PyMethodDef py_lv_draw_layer_alloc_buf_def = { + "lv_draw_layer_alloc_buf", + (PyCFunction)py_lv_draw_layer_alloc_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62477,30 +75268,32 @@ static PyMethodDef py_lv_sqrt_def = { /* * lvgl extension definition for: - * int32_t lv_sqrt32(uint32_t x) + * void *lv_draw_layer_go_to_xy(lv_layer_t *layer, int32_t x, int32_t y) */ -static PyObject *py_lv_sqrt32(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_go_to_xy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t x = (uint32_t)x_val; + PyObject *layer_py; long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "Oll", &layer_py, &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + void * _res; lvpy_lock(); - _res = ((int32_t (*)(uint32_t))lv_sqrt32)(x); + _res = ((void *(*)(lv_layer_t *, int32_t, int32_t))lv_draw_layer_go_to_xy)(layer, x, y); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_sqrt32_def = { - "lv_sqrt32", - (PyCFunction)py_lv_sqrt32, +static PyMethodDef py_lv_draw_layer_go_to_xy_def = { + "lv_draw_layer_go_to_xy", + (PyCFunction)py_lv_draw_layer_go_to_xy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62508,31 +75301,32 @@ static PyMethodDef py_lv_sqrt32_def = { /* * lvgl extension definition for: - * int64_t lv_pow(int64_t base, int8_t exp) + * lv_layer_t *lv_draw_layer_create_drop_shadow(lv_layer_t *parent_layer, const lv_draw_dsc_base_t *base, const lv_area_t *area) */ -static PyObject *py_lv_pow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_create_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long base_val; long exp_val; - if (!PyArg_ParseTuple(py_args, "ll", &base_val, &exp_val)) { PyGILState_Release(gstate); return NULL; } - int64_t base = (int64_t)base_val; - int8_t exp = (int8_t)exp_val; + PyObject *parent_layer_py; PyObject *base_py; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &base_py, &area_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); + const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int64_t _res; + lv_layer_t * _res; lvpy_lock(); - _res = ((int64_t (*)(int64_t, int8_t))lv_pow)(base, exp); + _res = ((lv_layer_t *(*)(lv_layer_t *, const lv_draw_dsc_base_t *, const lv_area_t *))lv_draw_layer_create_drop_shadow)(parent_layer, base, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_ll(_res); + return mp_read_ptr_lv_layer_t((void*)_res); } -static PyMethodDef py_lv_pow_def = { - "lv_pow", - (PyCFunction)py_lv_pow, +static PyMethodDef py_lv_draw_layer_create_drop_shadow_def = { + "lv_draw_layer_create_drop_shadow", + (PyCFunction)py_lv_draw_layer_create_drop_shadow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62540,34 +75334,30 @@ static PyMethodDef py_lv_pow_def = { /* * lvgl extension definition for: - * int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out) + * void lv_draw_layer_finish_drop_shadow(lv_layer_t *drop_shadow_layer, const lv_draw_dsc_base_t *base) */ -static PyObject *py_lv_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_finish_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long min_in_val; long max_in_val; long min_out_val; long max_out_val; - if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &min_in_val, &max_in_val, &min_out_val, &max_out_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; - int32_t min_in = (int32_t)min_in_val; - int32_t max_in = (int32_t)max_in_val; - int32_t min_out = (int32_t)min_out_val; - int32_t max_out = (int32_t)max_out_val; + PyObject *drop_shadow_layer_py; PyObject *base_py; + if (!PyArg_ParseTuple(py_args, "OO", &drop_shadow_layer_py, &base_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *drop_shadow_layer = mp_write_ptr_lv_layer_t(drop_shadow_layer_py); + const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_map)(x, min_in, max_in, min_out, max_out); + ((void (*)(lv_layer_t *, const lv_draw_dsc_base_t *))lv_draw_layer_finish_drop_shadow)(drop_shadow_layer, base); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_map_def = { - "lv_map", - (PyCFunction)py_lv_map, +static PyMethodDef py_lv_draw_layer_finish_drop_shadow_def = { + "lv_draw_layer_finish_drop_shadow", + (PyCFunction)py_lv_draw_layer_finish_drop_shadow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62575,29 +75365,29 @@ static PyMethodDef py_lv_map_def = { /* * lvgl extension definition for: - * void lv_rand_set_seed(uint32_t seed) + * void lv_draw_layer_dealloc_buf(lv_layer_t *layer) */ -static PyObject *py_lv_rand_set_seed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_dealloc_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long seed_val; - if (!PyArg_ParseTuple(py_args, "l", &seed_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t seed = (uint32_t)seed_val; + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(uint32_t))lv_rand_set_seed)(seed); + ((void (*)(lv_layer_t *))lv_draw_layer_dealloc_buf)(layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_rand_set_seed_def = { - "lv_rand_set_seed", - (PyCFunction)py_lv_rand_set_seed, +static PyMethodDef py_lv_draw_layer_dealloc_buf_def = { + "lv_draw_layer_dealloc_buf", + (PyCFunction)py_lv_draw_layer_dealloc_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62605,196 +75395,123 @@ static PyMethodDef py_lv_rand_set_seed_def = { /* * lvgl extension definition for: - * uint32_t lv_rand(uint32_t min, uint32_t max) + * void lv_draw_layer_deinit(lv_layer_t *layer) */ -static PyObject *py_lv_rand(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t min = (uint32_t)min_val; - uint32_t max = (uint32_t)max_val; + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, uint32_t))lv_rand)(min, max); + ((void (*)(lv_layer_t *))lv_draw_layer_deinit)(layer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rand_def = { - "lv_rand", - (PyCFunction)py_lv_rand, +static PyMethodDef py_lv_draw_layer_deinit_def = { + "lv_draw_layer_deinit", + (PyCFunction)py_lv_draw_layer_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_async_call_async_xcb (CPython) - * void lv_async_cb_t(void *) - */ -static void lv_async_call_async_xcb_callback(void *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_async_xcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) + * void lv_draw_layer_delete(lv_layer_t *layer) */ -static PyObject *py_lv_async_call(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *async_xcb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_async_xcb_callback, "lv_async_call_async_xcb", &user_data, NULL, (NULL), (NULL)); + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call)(async_xcb, user_data); + ((void (*)(lv_layer_t *))lv_draw_layer_delete)(layer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_async_call_def = { - "lv_async_call", - (PyCFunction)py_lv_async_call, +static PyMethodDef py_lv_draw_layer_delete_def = { + "lv_draw_layer_delete", + (PyCFunction)py_lv_draw_layer_delete, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_async_call_cancel_async_xcb (CPython) - * void lv_async_cb_t(void *) - */ -static void lv_async_call_cancel_async_xcb_callback(void *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_cancel_async_xcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_result_t lv_async_call_cancel(lv_async_cb_t async_xcb, void *user_data) + * void lv_draw_fill(lv_layer_t *layer, const lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_async_call_cancel(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_fill(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; - (void)py_kwds; - PyObject *async_xcb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_cancel_async_xcb_callback, "lv_async_call_cancel_async_xcb", &user_data, NULL, (NULL), (NULL)); + (void)py_kwds; + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_fill_dsc_t *dsc = (const lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call_cancel)(async_xcb, user_data); + ((void (*)(lv_layer_t *, const lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_fill)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_async_call_cancel_def = { - "lv_async_call_cancel", - (PyCFunction)py_lv_async_call_cancel, +static PyMethodDef py_lv_draw_fill_def = { + "lv_draw_fill", + (PyCFunction)py_lv_draw_fill, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) - * lv_anim_exec_xcb_t exec_cb - */ - - /* * lvgl extension definition for: - * bool lv_anim_delete(void *var, lv_anim_exec_xcb_t exec_cb) + * void lv_draw_border(lv_layer_t *layer, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_anim_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_border(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *var_py; PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - void *var = mp_to_ptr(var_py); - void *exec_cb = NULL; + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(void *, lv_anim_exec_xcb_t))lv_anim_delete)(var, exec_cb); + ((void (*)(lv_layer_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_border)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_delete_def = { - "lv_anim_delete", - (PyCFunction)py_lv_anim_delete, +static PyMethodDef py_lv_draw_border_def = { + "lv_draw_border", + (PyCFunction)py_lv_draw_border, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62802,67 +75519,63 @@ static PyMethodDef py_lv_anim_delete_def = { /* * lvgl extension definition for: - * void lv_anim_delete_all(void) + * void lv_draw_box_shadow(lv_layer_t *layer, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_anim_delete_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_box_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_anim_delete_all)(); + ((void (*)(lv_layer_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_box_shadow)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_delete_all_def = { - "lv_anim_delete_all", - (PyCFunction)py_lv_anim_delete_all, +static PyMethodDef py_lv_draw_box_shadow_def = { + "lv_draw_box_shadow", + (PyCFunction)py_lv_draw_box_shadow, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) - * lv_anim_exec_xcb_t exec_cb - */ - - /* * lvgl extension definition for: - * lv_anim_t *lv_anim_get(void *var, lv_anim_exec_xcb_t exec_cb) + * void lv_draw_rect(lv_layer_t *layer, const lv_draw_rect_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_anim_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *var_py; PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - void *var = mp_to_ptr(var_py); - void *exec_cb = NULL; + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_rect_dsc_t *dsc = (const lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(void *, lv_anim_exec_xcb_t))lv_anim_get)(var, exec_cb); + ((void (*)(lv_layer_t *, const lv_draw_rect_dsc_t *, const lv_area_t *))lv_draw_rect)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_get_def = { - "lv_anim_get", - (PyCFunction)py_lv_anim_get, +static PyMethodDef py_lv_draw_rect_def = { + "lv_draw_rect", + (PyCFunction)py_lv_draw_rect, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62870,29 +75583,31 @@ static PyMethodDef py_lv_anim_get_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_anim_get_timer(void) + * void lv_draw_label(lv_layer_t *layer, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_anim_get_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_label(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(void))lv_anim_get_timer)(); + ((void (*)(lv_layer_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_label)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_get_timer_def = { - "lv_anim_get_timer", - (PyCFunction)py_lv_anim_get_timer, +static PyMethodDef py_lv_draw_label_def = { + "lv_draw_label", + (PyCFunction)py_lv_draw_label, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62900,29 +75615,32 @@ static PyMethodDef py_lv_anim_get_timer_def = { /* * lvgl extension definition for: - * uint16_t lv_anim_count_running(void) + * void lv_draw_character(lv_layer_t *layer, lv_draw_label_dsc_t *dsc, const lv_point_t *point, uint32_t unicode_letter) */ -static PyObject *py_lv_anim_count_running(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_character(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; long unicode_letter_val; + if (!PyArg_ParseTuple(py_args, "OOOl", &layer_py, &dsc_py, &point_py, &unicode_letter_val)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_label_dsc_t *dsc = mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); + uint32_t unicode_letter = (uint32_t)unicode_letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(void))lv_anim_count_running)(); + ((void (*)(lv_layer_t *, lv_draw_label_dsc_t *, const lv_point_t *, uint32_t))lv_draw_character)(layer, dsc, point, unicode_letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_count_running_def = { - "lv_anim_count_running", - (PyCFunction)py_lv_anim_count_running, +static PyMethodDef py_lv_draw_character_def = { + "lv_draw_character", + (PyCFunction)py_lv_draw_character, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62930,30 +75648,31 @@ static PyMethodDef py_lv_anim_count_running_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_speed(uint32_t speed) + * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) */ -static PyObject *py_lv_anim_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_letter(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_val; - if (!PyArg_ParseTuple(py_args, "l", &speed_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed = (uint32_t)speed_val; + PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_anim_speed)(speed); + ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_draw_letter)(layer, dsc, point); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_speed_def = { - "lv_anim_speed", - (PyCFunction)py_lv_anim_speed, +static PyMethodDef py_lv_draw_letter_def = { + "lv_draw_letter", + (PyCFunction)py_lv_draw_letter, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62961,32 +75680,30 @@ static PyMethodDef py_lv_anim_speed_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_speed_clamped(uint32_t speed, uint32_t min_time, uint32_t max_time) + * lv_fs_drv_t *lv_fs_get_drv(char letter) */ -static PyObject *py_lv_anim_speed_clamped(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_drv(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_val; long min_time_val; long max_time_val; - if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &min_time_val, &max_time_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed = (uint32_t)speed_val; - uint32_t min_time = (uint32_t)min_time_val; - uint32_t max_time = (uint32_t)max_time_val; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + char letter = (char)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_fs_drv_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, uint32_t, uint32_t))lv_anim_speed_clamped)(speed, min_time, max_time); + _res = ((lv_fs_drv_t *(*)(char))lv_fs_get_drv)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_fs_drv_t((void*)_res); } -static PyMethodDef py_lv_anim_speed_clamped_def = { - "lv_anim_speed_clamped", - (PyCFunction)py_lv_anim_speed_clamped, +static PyMethodDef py_lv_fs_get_drv_def = { + "lv_fs_get_drv", + (PyCFunction)py_lv_fs_get_drv, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -62994,32 +75711,29 @@ static PyMethodDef py_lv_anim_speed_clamped_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_resolve_speed(uint32_t speed, int32_t start, int32_t end) + * void lv_fs_remove_drive(char letter) */ -static PyObject *py_lv_anim_resolve_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_remove_drive(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_val; long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed = (uint32_t)speed_val; - int32_t start = (int32_t)start_val; - int32_t end = (int32_t)end_val; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + char letter = (char)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_resolve_speed)(speed, start, end); + ((void (*)(char))lv_fs_remove_drive)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_resolve_speed_def = { - "lv_anim_resolve_speed", - (PyCFunction)py_lv_anim_resolve_speed, +static PyMethodDef py_lv_fs_remove_drive_def = { + "lv_fs_remove_drive", + (PyCFunction)py_lv_fs_remove_drive, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63027,32 +75741,30 @@ static PyMethodDef py_lv_anim_resolve_speed_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_speed_to_time(uint32_t speed, int32_t start, int32_t end) + * bool lv_fs_is_ready(char letter) */ -static PyObject *py_lv_anim_speed_to_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_is_ready(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_val; long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed = (uint32_t)speed_val; - int32_t start = (int32_t)start_val; - int32_t end = (int32_t)end_val; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + char letter = (char)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_speed_to_time)(speed, start, end); + _res = ((bool (*)(char))lv_fs_is_ready)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_speed_to_time_def = { - "lv_anim_speed_to_time", - (PyCFunction)py_lv_anim_speed_to_time, +static PyMethodDef py_lv_fs_is_ready_def = { + "lv_fs_is_ready", + (PyCFunction)py_lv_fs_is_ready, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63060,28 +75772,31 @@ static PyMethodDef py_lv_anim_speed_to_time_def = { /* * lvgl extension definition for: - * void lv_anim_refr_now(void) + * lv_fs_res_t lv_fs_path_get_size(const char *path, uint32_t *size_res) */ -static PyObject *py_lv_anim_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_path_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *path_py; PyObject *size_res_py; + if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_res_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); + uint32_t *size_res = mp_array_to_u32ptr(size_res_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(void))lv_anim_refr_now)(); + _res = ((lv_fs_res_t (*)(const char *, uint32_t *))lv_fs_path_get_size)(path, size_res); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_refr_now_def = { - "lv_anim_refr_now", - (PyCFunction)py_lv_anim_refr_now, +static PyMethodDef py_lv_fs_path_get_size_def = { + "lv_fs_path_get_size", + (PyCFunction)py_lv_fs_path_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63089,29 +75804,32 @@ static PyMethodDef py_lv_anim_refr_now_def = { /* * lvgl extension definition for: - * lv_anim_timeline_t *lv_anim_timeline_create(void) + * lv_fs_res_t lv_fs_load_to_buf(void *buf, uint32_t buf_size, const char *path) */ -static PyObject *py_lv_anim_timeline_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_load_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *buf_py; long buf_size_val; PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &buf_size_val, &path_py)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t * _res; + lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_anim_timeline_t *(*)(void))lv_anim_timeline_create)(); + _res = ((lv_fs_res_t (*)(void *, uint32_t, const char *))lv_fs_load_to_buf)(buf, buf_size, path); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_timeline_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_create_def = { - "lv_anim_timeline_create", - (PyCFunction)py_lv_anim_timeline_create, +static PyMethodDef py_lv_fs_load_to_buf_def = { + "lv_fs_load_to_buf", + (PyCFunction)py_lv_fs_load_to_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63119,30 +75837,31 @@ static PyMethodDef py_lv_anim_timeline_create_def = { /* * lvgl extension definition for: - * int32_t lv_pct(int32_t x) + * void *lv_fs_load_with_alloc(const char *path, uint32_t *size) */ -static PyObject *py_lv_pct(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_load_with_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; + PyObject *path_py; PyObject *size_py; + if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); + uint32_t *size = mp_array_to_u32ptr(size_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + void * _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t))lv_pct)(x); + _res = ((void *(*)(const char *, uint32_t *))lv_fs_load_with_alloc)(path, size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_pct_def = { - "lv_pct", - (PyCFunction)py_lv_pct, +static PyMethodDef py_lv_fs_load_with_alloc_def = { + "lv_fs_load_with_alloc", + (PyCFunction)py_lv_fs_load_with_alloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63150,31 +75869,30 @@ static PyMethodDef py_lv_pct_def = { /* * lvgl extension definition for: - * int32_t lv_pct_to_px(int32_t v, int32_t base) + * char *lv_fs_get_letters(char *buf) */ -static PyObject *py_lv_pct_to_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_letters(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long v_val; long base_val; - if (!PyArg_ParseTuple(py_args, "ll", &v_val, &base_val)) { PyGILState_Release(gstate); return NULL; } - int32_t v = (int32_t)v_val; - int32_t base = (int32_t)base_val; + PyObject *buf_py; + if (!PyArg_ParseTuple(py_args, "O", &buf_py)) { PyGILState_Release(gstate); return NULL; } + char *buf = (char*)convert_from_str(buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + char * _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t))lv_pct_to_px)(v, base); + _res = ((char *(*)(char *))lv_fs_get_letters)(buf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_pct_to_px_def = { - "lv_pct_to_px", - (PyCFunction)py_lv_pct_to_px, +static PyMethodDef py_lv_fs_get_letters_def = { + "lv_fs_get_letters", + (PyCFunction)py_lv_fs_get_letters, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63182,30 +75900,30 @@ static PyMethodDef py_lv_pct_to_px_def = { /* * lvgl extension definition for: - * uint8_t lv_color_format_get_bpp(lv_color_format_t cf) + * const char *lv_fs_get_ext(const char *fn) */ -static PyObject *py_lv_color_format_get_bpp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_ext(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + PyObject *fn_py; + if (!PyArg_ParseTuple(py_args, "O", &fn_py)) { PyGILState_Release(gstate); return NULL; } + const char *fn = (const char *)(char*)convert_from_str(fn_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + const char * _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_bpp)(cf); + _res = ((const char *(*)(const char *))lv_fs_get_ext)(fn); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_color_format_get_bpp_def = { - "lv_color_format_get_bpp", - (PyCFunction)py_lv_color_format_get_bpp, +static PyMethodDef py_lv_fs_get_ext_def = { + "lv_fs_get_ext", + (PyCFunction)py_lv_fs_get_ext, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63213,30 +75931,30 @@ static PyMethodDef py_lv_color_format_get_bpp_def = { /* * lvgl extension definition for: - * uint8_t lv_color_format_get_size(lv_color_format_t cf) + * char *lv_fs_up(char *path) */ -static PyObject *py_lv_color_format_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_up(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + char *path = (char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + char * _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_size)(cf); + _res = ((char *(*)(char *))lv_fs_up)(path); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_color_format_get_size_def = { - "lv_color_format_get_size", - (PyCFunction)py_lv_color_format_get_size, +static PyMethodDef py_lv_fs_up_def = { + "lv_fs_up", + (PyCFunction)py_lv_fs_up, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63244,30 +75962,30 @@ static PyMethodDef py_lv_color_format_get_size_def = { /* * lvgl extension definition for: - * bool lv_color_format_has_alpha(lv_color_format_t src_cf) + * const char *lv_fs_get_last(const char *path) */ -static PyObject *py_lv_color_format_has_alpha(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_last(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *src_cf_py; - if (!PyArg_ParseTuple(py_args, "O", &src_cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t src_cf = (int)mp_obj_get_int(src_cf_py); + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + const char * _res; lvpy_lock(); - _res = ((bool (*)(lv_color_format_t))lv_color_format_has_alpha)(src_cf); + _res = ((const char *(*)(const char *))lv_fs_get_last)(path); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_color_format_has_alpha_def = { - "lv_color_format_has_alpha", - (PyCFunction)py_lv_color_format_has_alpha, +static PyMethodDef py_lv_fs_get_last_def = { + "lv_fs_get_last", + (PyCFunction)py_lv_fs_get_last, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63275,30 +75993,33 @@ static PyMethodDef py_lv_color_format_has_alpha_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_hex(uint32_t c) + * int lv_fs_path_join(char *buf, size_t buf_sz, const char *base, const char *end) */ -static PyObject *py_lv_color_hex(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_path_join(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t c = (uint32_t)c_val; + PyObject *buf_py; long buf_sz_val; PyObject *base_py; PyObject *end_py; + if (!PyArg_ParseTuple(py_args, "OlOO", &buf_py, &buf_sz_val, &base_py, &end_py)) { PyGILState_Release(gstate); return NULL; } + char *buf = (char*)convert_from_str(buf_py); + size_t buf_sz = (size_t)buf_sz_val; + const char *base = (const char *)(char*)convert_from_str(base_py); + const char *end = (const char *)(char*)convert_from_str(end_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + int _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint32_t))lv_color_hex)(c); + _res = ((int (*)(char *, size_t, const char *, const char *))lv_fs_path_join)(buf, buf_sz, base, end); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_hex_def = { - "lv_color_hex", - (PyCFunction)py_lv_color_hex, +static PyMethodDef py_lv_fs_path_join_def = { + "lv_fs_path_join", + (PyCFunction)py_lv_fs_path_join, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63306,32 +76027,31 @@ static PyMethodDef py_lv_color_hex_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_make(uint8_t r, uint8_t g, uint8_t b) + * void lv_draw_image(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_color_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_image(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long r_val; long g_val; long b_val; - if (!PyArg_ParseTuple(py_args, "lll", &r_val, &g_val, &b_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t r = (uint8_t)r_val; - uint8_t g = (uint8_t)g_val; - uint8_t b = (uint8_t)b_val; + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint8_t, uint8_t, uint8_t))lv_color_make)(r, g, b); + ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_image)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_make_def = { - "lv_color_make", - (PyCFunction)py_lv_color_make, +static PyMethodDef py_lv_draw_image_def = { + "lv_draw_image", + (PyCFunction)py_lv_draw_image, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63339,33 +76059,31 @@ static PyMethodDef py_lv_color_make_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color32_make(uint8_t r, uint8_t g, uint8_t b, uint8_t a) + * void lv_draw_layer(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_color32_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long r_val; long g_val; long b_val; long a_val; - if (!PyArg_ParseTuple(py_args, "llll", &r_val, &g_val, &b_val, &a_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t r = (uint8_t)r_val; - uint8_t g = (uint8_t)g_val; - uint8_t b = (uint8_t)b_val; - uint8_t a = (uint8_t)a_val; + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(uint8_t, uint8_t, uint8_t, uint8_t))lv_color32_make)(r, g, b, a); + ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_layer)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color32_make_def = { - "lv_color32_make", - (PyCFunction)py_lv_color32_make, +static PyMethodDef py_lv_draw_layer_def = { + "lv_draw_layer", + (PyCFunction)py_lv_draw_layer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63373,30 +76091,30 @@ static PyMethodDef py_lv_color32_make_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_hex3(uint32_t c) + * void lv_draw_line(lv_layer_t *layer, const lv_draw_line_dsc_t *dsc) */ -static PyObject *py_lv_color_hex3(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t c = (uint32_t)c_val; + PyObject *layer_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint32_t))lv_color_hex3)(c); + ((void (*)(lv_layer_t *, const lv_draw_line_dsc_t *))lv_draw_line)(layer, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_hex3_def = { - "lv_color_hex3", - (PyCFunction)py_lv_color_hex3, +static PyMethodDef py_lv_draw_line_def = { + "lv_draw_line", + (PyCFunction)py_lv_draw_line, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63404,32 +76122,30 @@ static PyMethodDef py_lv_color_hex3_def = { /* * lvgl extension definition for: - * uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix) + * void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc) */ -static PyObject *py_lv_color_16_16_mix(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_arc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long c1_val; long c2_val; long mix_val; - if (!PyArg_ParseTuple(py_args, "lll", &c1_val, &c2_val, &mix_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t c1 = (uint16_t)c1_val; - uint16_t c2 = (uint16_t)c2_val; - uint8_t mix = (uint8_t)mix_val; + PyObject *layer_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_color_16_16_mix)(c1, c2, mix); + ((void (*)(lv_layer_t *, const lv_draw_arc_dsc_t *))lv_draw_arc)(layer, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_16_16_mix_def = { - "lv_color_16_16_mix", - (PyCFunction)py_lv_color_16_16_mix, +static PyMethodDef py_lv_draw_arc_def = { + "lv_draw_arc", + (PyCFunction)py_lv_draw_arc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63437,200 +76153,99 @@ static PyMethodDef py_lv_color_16_16_mix_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) + * void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area) */ -static PyObject *py_lv_color_hsv_to_rgb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_arc_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long h_val; long s_val; long v_val; - if (!PyArg_ParseTuple(py_args, "lll", &h_val, &s_val, &v_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t h = (uint16_t)h_val; - uint8_t s = (uint8_t)s_val; - uint8_t v = (uint8_t)v_val; + long x_val; long y_val; long radius_val; PyObject *start_angle_py; PyObject *end_angle_py; long w_val; long rounded_val; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "lllOOllO", &x_val, &y_val, &radius_val, &start_angle_py, &end_angle_py, &w_val, &rounded_val, &area_py)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + uint16_t radius = (uint16_t)radius_val; + lv_value_precise_t start_angle = (float)mp_obj_get_float(start_angle_py); + lv_value_precise_t end_angle = (float)mp_obj_get_float(end_angle_py); + int32_t w = (int32_t)w_val; + bool rounded = (rounded_val != 0); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint16_t, uint8_t, uint8_t))lv_color_hsv_to_rgb)(h, s, v); + ((void (*)(int32_t, int32_t, uint16_t, lv_value_precise_t, lv_value_precise_t, int32_t, bool, lv_area_t *))lv_draw_arc_get_area)(x, y, radius, start_angle, end_angle, w, rounded, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_hsv_to_rgb_def = { - "lv_color_hsv_to_rgb", - (PyCFunction)py_lv_color_hsv_to_rgb, +static PyMethodDef py_lv_draw_arc_get_area_def = { + "lv_draw_arc_get_area", + (PyCFunction)py_lv_draw_arc_get_area, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_color_hsv_t (CPython) + * lvgl extension definition for: + * void lv_draw_triangle(lv_layer_t *layer, const lv_draw_triangle_dsc_t *draw_dsc) */ - -extern PyMethodDef py_lv_color_hsv_t_methods[]; - -static PyObject *py_lv_color_hsv_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "h") == 0) return mp_obj_new_int_from_uint(data->h); - if (strcmp(attr, "s") == 0) return mp_obj_new_int_from_uint(data->s); - if (strcmp(attr, "v") == 0) return mp_obj_new_int_from_uint(data->v); - for (PyMethodDef *m = py_lv_color_hsv_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_color_hsv_t_field_names[] = {"h", "s", "v", NULL}; - -static PyObject *py_lv_color_hsv_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_color_hsv_t_field_names, py_lv_color_hsv_t_methods); -} - -static PyMethodDef py_lv_color_hsv_t_type_methods[] = { - {"__dir__", py_lv_color_hsv_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_color_hsv_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_color_hsv_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "h") == 0) { data->h = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "s") == 0) { data->s = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "v") == 0) { data->v = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_color_hsv_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_color_hsv_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_color_hsv_t)); -} - -static void py_lv_color_hsv_t_dealloc(py_lv_struct_t *self) +static PyObject *py_lv_draw_triangle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *layer_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_triangle_dsc_t *draw_dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(draw_dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_layer_t *, const lv_draw_triangle_dsc_t *))lv_draw_triangle)(layer, draw_dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_color_hsv_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_color_hsv_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_color_hsv_t_dealloc, - .tp_getattro = (getter)py_lv_color_hsv_t_getattro, - .tp_setattro = (setter)py_lv_color_hsv_t_setattro, - .tp_new = py_lv_color_hsv_t_new, - .tp_methods = py_lv_color_hsv_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_draw_triangle_def = { + "lv_draw_triangle", + (PyCFunction)py_lv_draw_triangle, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_color_hsv_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_color_hsv_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_color_hsv_t*)self->data; -} - -static lv_color_hsv_t mp_write_scratch_lv_color_hsv_t; - -static inline void* mp_write_value_ptr_lv_color_hsv_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_hsv_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_color_hsv_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_hsv_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_color_hsv_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_color_hsv_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t or dict, got None"); - } - memset(&mp_write_scratch_lv_color_hsv_t, 0, sizeof(lv_color_hsv_t)); - return &mp_write_scratch_lv_color_hsv_t; -} - -#define mp_write_lv_color_hsv_t(struct_obj) (*((lv_color_hsv_t*)mp_write_value_ptr_lv_color_hsv_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_color_hsv_t(void *field) -{ - return lv_to_mp_struct(&py_lv_color_hsv_t_type, field); -} - -#define mp_read_lv_color_hsv_t(field) lv_to_mp_struct_own(&py_lv_color_hsv_t_type, copy_buffer(&field, sizeof(lv_color_hsv_t))) -#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) - /* * lvgl extension definition for: - * lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8) + * void lv_draw_blur(lv_layer_t *layer, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_color_rgb_to_hsv(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_blur(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long r8_val; long g8_val; long b8_val; - if (!PyArg_ParseTuple(py_args, "lll", &r8_val, &g8_val, &b8_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t r8 = (uint8_t)r8_val; - uint8_t g8 = (uint8_t)g8_val; - uint8_t b8 = (uint8_t)b8_val; + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_hsv_t _res; lvpy_lock(); - _res = ((lv_color_hsv_t (*)(uint8_t, uint8_t, uint8_t))lv_color_rgb_to_hsv)(r8, g8, b8); + ((void (*)(lv_layer_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_blur)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_hsv_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_rgb_to_hsv_def = { - "lv_color_rgb_to_hsv", - (PyCFunction)py_lv_color_rgb_to_hsv, +static PyMethodDef py_lv_draw_blur_def = { + "lv_draw_blur", + (PyCFunction)py_lv_draw_blur, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63638,9 +76253,9 @@ static PyMethodDef py_lv_color_rgb_to_hsv_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_white(void) + * lv_indev_t *lv_indev_create(void) */ -static PyObject *py_lv_color_white(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -63649,18 +76264,18 @@ static PyObject *py_lv_color_white(PyObject *self, PyObject *py_args, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_indev_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(void))lv_color_white)(); + _res = ((lv_indev_t *(*)(void))lv_indev_create)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_indev_t((void*)_res); } -static PyMethodDef py_lv_color_white_def = { - "lv_color_white", - (PyCFunction)py_lv_color_white, +static PyMethodDef py_lv_indev_create_def = { + "lv_indev_create", + (PyCFunction)py_lv_indev_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63668,29 +76283,29 @@ static PyMethodDef py_lv_color_white_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_black(void) + * void lv_indev_read_timer_cb(lv_timer_t *timer) */ -static PyObject *py_lv_color_black(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_read_timer_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *timer_py; + if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(void))lv_color_black)(); + ((void (*)(lv_timer_t *))lv_indev_read_timer_cb)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_black_def = { - "lv_color_black", - (PyCFunction)py_lv_color_black, +static PyMethodDef py_lv_indev_read_timer_cb_def = { + "lv_indev_read_timer_cb", + (PyCFunction)py_lv_indev_read_timer_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63698,30 +76313,29 @@ static PyMethodDef py_lv_color_black_def = { /* * lvgl extension definition for: - * uint8_t lv_color24_luminance(const uint8_t *c) + * lv_indev_t *lv_indev_active(void) */ -static PyObject *py_lv_color24_luminance(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *c_py; - if (!PyArg_ParseTuple(py_args, "O", &c_py)) { PyGILState_Release(gstate); return NULL; } - const uint8_t *c = (const uint8_t *)mp_array_to_u8ptr(c_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + lv_indev_t * _res; lvpy_lock(); - _res = ((uint8_t (*)(const uint8_t *))lv_color24_luminance)(c); + _res = ((lv_indev_t *(*)(void))lv_indev_active)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_indev_t((void*)_res); } -static PyMethodDef py_lv_color24_luminance_def = { - "lv_color24_luminance", - (PyCFunction)py_lv_color24_luminance, +static PyMethodDef py_lv_indev_active_def = { + "lv_indev_active", + (PyCFunction)py_lv_indev_active, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63729,30 +76343,29 @@ static PyMethodDef py_lv_color24_luminance_def = { /* * lvgl extension definition for: - * lv_color_t lv_palette_main(lv_palette_t p) + * lv_obj_t *lv_indev_get_active_obj(void) */ -static PyObject *py_lv_palette_main(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_active_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } - lv_palette_t p = (int)mp_obj_get_int(p_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_palette_t))lv_palette_main)(p); + _res = ((lv_obj_t *(*)(void))lv_indev_get_active_obj)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_palette_main_def = { - "lv_palette_main", - (PyCFunction)py_lv_palette_main, +static PyMethodDef py_lv_indev_get_active_obj_def = { + "lv_indev_get_active_obj", + (PyCFunction)py_lv_indev_get_active_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63760,31 +76373,31 @@ static PyMethodDef py_lv_palette_main_def = { /* * lvgl extension definition for: - * lv_color_t lv_palette_lighten(lv_palette_t p, uint8_t lvl) + * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) */ -static PyObject *py_lv_palette_lighten(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_search_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; long lvl_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_palette_t p = (int)mp_obj_get_int(p_py); - uint8_t lvl = (uint8_t)lvl_val; + PyObject *obj_py; PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_lighten)(p, lvl); + _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_indev_search_obj)(obj, point); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_palette_lighten_def = { - "lv_palette_lighten", - (PyCFunction)py_lv_palette_lighten, +static PyMethodDef py_lv_indev_search_obj_def = { + "lv_indev_search_obj", + (PyCFunction)py_lv_indev_search_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63792,31 +76405,30 @@ static PyMethodDef py_lv_palette_lighten_def = { /* * lvgl extension definition for: - * lv_color_t lv_palette_darken(lv_palette_t p, uint8_t lvl) + * lv_subject_t *lv_subject_create(lv_subject_type_t type) */ -static PyObject *py_lv_palette_darken(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; long lvl_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_palette_t p = (int)mp_obj_get_int(p_py); - uint8_t lvl = (uint8_t)lvl_val; + PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_type_t type = (int)mp_obj_get_int(type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_subject_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_darken)(p, lvl); + _res = ((lv_subject_t *(*)(lv_subject_type_t))lv_subject_create)(type); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_subject_t((void*)_res); } -static PyMethodDef py_lv_palette_darken_def = { - "lv_palette_darken", - (PyCFunction)py_lv_palette_darken, +static PyMethodDef py_lv_subject_create_def = { + "lv_subject_create", + (PyCFunction)py_lv_subject_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63824,29 +76436,29 @@ static PyMethodDef py_lv_palette_darken_def = { /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) + * void lv_refr_now(lv_display_t *disp) */ -static PyObject *py_lv_draw_buf_get_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *disp_py; + if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_handlers)(); + ((void (*)(lv_display_t *))lv_refr_now)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_get_handlers_def = { - "lv_draw_buf_get_handlers", - (PyCFunction)py_lv_draw_buf_get_handlers, +static PyMethodDef py_lv_refr_now_def = { + "lv_refr_now", + (PyCFunction)py_lv_refr_now, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63854,29 +76466,29 @@ static PyMethodDef py_lv_draw_buf_get_handlers_def = { /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_font_handlers(void) + * void lv_display_refr_timer(lv_timer_t *timer) */ -static PyObject *py_lv_draw_buf_get_font_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_refr_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *timer_py; + if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_font_handlers)(); + ((void (*)(lv_timer_t *))lv_display_refr_timer)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_get_font_handlers_def = { - "lv_draw_buf_get_font_handlers", - (PyCFunction)py_lv_draw_buf_get_font_handlers, +static PyMethodDef py_lv_display_refr_timer_def = { + "lv_display_refr_timer", + (PyCFunction)py_lv_display_refr_timer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63884,29 +76496,30 @@ static PyMethodDef py_lv_draw_buf_get_font_handlers_def = { /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_image_handlers(void) + * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) */ -static PyObject *py_lv_draw_buf_get_image_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_mask_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_image_handlers)(); + ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_mask_rect)(layer, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_get_image_handlers_def = { - "lv_draw_buf_get_image_handlers", - (PyCFunction)py_lv_draw_buf_get_image_handlers, +static PyMethodDef py_lv_draw_mask_rect_def = { + "lv_draw_mask_rect", + (PyCFunction)py_lv_draw_mask_rect, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63914,31 +76527,31 @@ static PyMethodDef py_lv_draw_buf_get_image_handlers_def = { /* * lvgl extension definition for: - * void *lv_draw_buf_align(void *buf, lv_color_format_t color_format) + * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) */ -static PyObject *py_lv_draw_buf_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_take(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + PyObject *obj_py; PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((void *(*)(void *, lv_color_format_t))lv_draw_buf_align)(buf, color_format); + _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_take)(obj, cf); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_align_def = { - "lv_draw_buf_align", - (PyCFunction)py_lv_draw_buf_align, +static PyMethodDef py_lv_snapshot_take_def = { + "lv_snapshot_take", + (PyCFunction)py_lv_snapshot_take, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63946,31 +76559,31 @@ static PyMethodDef py_lv_draw_buf_align_def = { /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format) + * lv_draw_buf_t *lv_snapshot_create_draw_buf(lv_obj_t *obj, lv_color_format_t cf) */ -static PyObject *py_lv_draw_buf_width_to_stride(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_create_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long w_val; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - uint32_t w = (uint32_t)w_val; - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + PyObject *obj_py; PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride)(w, color_format); + _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_create_draw_buf)(obj, cf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_width_to_stride_def = { - "lv_draw_buf_width_to_stride", - (PyCFunction)py_lv_draw_buf_width_to_stride, +static PyMethodDef py_lv_snapshot_create_draw_buf_def = { + "lv_snapshot_create_draw_buf", + (PyCFunction)py_lv_snapshot_create_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -63978,116 +76591,94 @@ static PyMethodDef py_lv_draw_buf_width_to_stride_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_draw_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_reshape_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long w_val; long h_val; PyObject *cf_py; long stride_val; - if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t stride = (uint32_t)stride_val; + PyObject *obj_py; PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create)(w, h, cf, stride); + _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_snapshot_reshape_draw_buf)(obj, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_buf_create_def = { - "lv_draw_buf_create", - (PyCFunction)py_lv_draw_buf_create, +static PyMethodDef py_lv_snapshot_reshape_draw_buf_def = { + "lv_snapshot_reshape_draw_buf", + (PyCFunction)py_lv_snapshot_reshape_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int cmp(const void *pRef, const void *pElement) - * int (*cmp)(const void *pRef, const void *pElement) - */ - - /* * lvgl extension definition for: - * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) + * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_utils_bsearch(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_take_to_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *key_py; PyObject *base_py; long n_val; long size_val; PyObject *cmp_py; - if (!PyArg_ParseTuple(py_args, "OOllO", &key_py, &base_py, &n_val, &size_val, &cmp_py)) { PyGILState_Release(gstate); return NULL; } - const void *key = (const void *)mp_to_ptr(key_py); - const void *base = (const void *)mp_to_ptr(base_py); - size_t n = (size_t)n_val; - size_t size = (size_t)size_val; - void *cmp = NULL; + PyObject *obj_py; PyObject *cf_py; PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "OOO", &obj_py, &cf_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_result_t _res; lvpy_lock(); - _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_utils_bsearch)(key, base, n, size, cmp); + _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_snapshot_take_to_draw_buf)(obj, cf, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_utils_bsearch_def = { - "lv_utils_bsearch", - (PyCFunction)py_lv_utils_bsearch, +static PyMethodDef py_lv_snapshot_take_to_draw_buf_def = { + "lv_snapshot_take_to_draw_buf", + (PyCFunction)py_lv_snapshot_take_to_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) - * lv_iter_next_cb next_cb - */ - - /* * lvgl extension definition for: - * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) + * void lv_snapshot_free(lv_image_dsc_t *dsc) */ -static PyObject *py_lv_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *instance_py; long elem_size_val; long context_size_val; PyObject *next_cb_py; - if (!PyArg_ParseTuple(py_args, "OllO", &instance_py, &elem_size_val, &context_size_val, &next_cb_py)) { PyGILState_Release(gstate); return NULL; } - void *instance = mp_to_ptr(instance_py); - uint32_t elem_size = (uint32_t)elem_size_val; - uint32_t context_size = (uint32_t)context_size_val; - void *next_cb = NULL; + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_iter_t * _res; lvpy_lock(); - _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_iter_create)(instance, elem_size, context_size, next_cb); + ((void (*)(lv_image_dsc_t *))lv_snapshot_free)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_iter_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_iter_create_def = { - "lv_iter_create", - (PyCFunction)py_lv_iter_create, +static PyMethodDef py_lv_snapshot_free_def = { + "lv_snapshot_free", + (PyCFunction)py_lv_snapshot_free, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64095,31 +76686,34 @@ static PyMethodDef py_lv_iter_create_def = { /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) + * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) */ -static PyObject *py_lv_circle_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_take_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + PyObject *obj_py; PyObject *cf_py; PyObject *dsc_py; PyObject *buf_py; long buf_size_val; + if (!PyArg_ParseTuple(py_args, "OOOOl", &obj_py, &cf_py, &dsc_py, &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_circle_buf_create)(capacity, element_size); + _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_snapshot_take_to_buf)(obj, cf, dsc, buf, buf_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_circle_buf_create_def = { - "lv_circle_buf_create", - (PyCFunction)py_lv_circle_buf_create, +static PyMethodDef py_lv_snapshot_take_to_buf_def = { + "lv_snapshot_take_to_buf", + (PyCFunction)py_lv_snapshot_take_to_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64127,32 +76721,36 @@ static PyMethodDef py_lv_circle_buf_create_def = { /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) + * void lv_draw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) */ -static PyObject *py_lv_circle_buf_create_from_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_i1_to_argb8888(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + PyObject *buf_i1_py; PyObject *buf_argb8888_py; long width_val; long height_val; long buf_i1_stride_val; long buf_argb8888_stride_val; long index0_color_val; long index1_color_val; + if (!PyArg_ParseTuple(py_args, "OOllllll", &buf_i1_py, &buf_argb8888_py, &width_val, &height_val, &buf_i1_stride_val, &buf_argb8888_stride_val, &index0_color_val, &index1_color_val)) { PyGILState_Release(gstate); return NULL; } + const void *buf_i1 = (const void *)mp_to_ptr(buf_i1_py); + void *buf_argb8888 = mp_to_ptr(buf_argb8888_py); + uint32_t width = (uint32_t)width_val; + uint32_t height = (uint32_t)height_val; + uint32_t buf_i1_stride = (uint32_t)buf_i1_stride_val; + uint32_t buf_argb8888_stride = (uint32_t)buf_argb8888_stride_val; + uint32_t index0_color = (uint32_t)index0_color_val; + uint32_t index1_color = (uint32_t)index1_color_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t * _res; lvpy_lock(); - _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_circle_buf_create_from_buf)(buf, capacity, element_size); + ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_draw_i1_to_argb8888)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_create_from_buf_def = { - "lv_circle_buf_create_from_buf", - (PyCFunction)py_lv_circle_buf_create_from_buf, +static PyMethodDef py_lv_draw_i1_to_argb8888_def = { + "lv_draw_i1_to_argb8888", + (PyCFunction)py_lv_draw_i1_to_argb8888, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64160,30 +76758,30 @@ static PyMethodDef py_lv_circle_buf_create_from_buf_def = { /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) + * void lv_draw_rgb565_swap(void *buf, uint32_t buf_size_px) */ -static PyObject *py_lv_circle_buf_create_from_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_rgb565_swap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *array_py; - if (!PyArg_ParseTuple(py_args, "O", &array_py)) { PyGILState_Release(gstate); return NULL; } - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(array_py); + PyObject *buf_py; long buf_size_px_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_px_val)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size_px = (uint32_t)buf_size_px_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t * _res; lvpy_lock(); - _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_circle_buf_create_from_array)(array); + ((void (*)(void *, uint32_t))lv_draw_rgb565_swap)(buf, buf_size_px); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_create_from_array_def = { - "lv_circle_buf_create_from_array", - (PyCFunction)py_lv_circle_buf_create_from_array, +static PyMethodDef py_lv_draw_rgb565_swap_def = { + "lv_draw_rgb565_swap", + (PyCFunction)py_lv_draw_rgb565_swap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64191,28 +76789,30 @@ static PyMethodDef py_lv_circle_buf_create_from_array_def = { /* * lvgl extension definition for: - * void lv_lock(void) + * void lv_draw_i1_invert(void *buf, uint32_t buf_size) */ -static PyObject *py_lv_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_i1_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *buf_py; long buf_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_lock)(); + ((void (*)(void *, uint32_t))lv_draw_i1_invert)(buf, buf_size); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_lock_def = { - "lv_lock", - (PyCFunction)py_lv_lock, +static PyMethodDef py_lv_draw_i1_invert_def = { + "lv_draw_i1_invert", + (PyCFunction)py_lv_draw_i1_invert, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64220,29 +76820,35 @@ static PyMethodDef py_lv_lock_def = { /* * lvgl extension definition for: - * lv_result_t lv_lock_isr(void) + * void lv_draw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) */ -static PyObject *py_lv_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_i1_convert_to_vtiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *buf_py; long buf_size_val; long width_val; long height_val; PyObject *out_buf_py; long out_buf_size_val; long bit_order_lsb_val; + if (!PyArg_ParseTuple(py_args, "OlllOll", &buf_py, &buf_size_val, &width_val, &height_val, &out_buf_py, &out_buf_size_val, &bit_order_lsb_val)) { PyGILState_Release(gstate); return NULL; } + const void *buf = (const void *)mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; + uint32_t width = (uint32_t)width_val; + uint32_t height = (uint32_t)height_val; + void *out_buf = mp_to_ptr(out_buf_py); + uint32_t out_buf_size = (uint32_t)out_buf_size_val; + bool bit_order_lsb = (bit_order_lsb_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(void))lv_lock_isr)(); + ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_draw_i1_convert_to_vtiled)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_lock_isr_def = { - "lv_lock_isr", - (PyCFunction)py_lv_lock_isr, +static PyMethodDef py_lv_draw_i1_convert_to_vtiled_def = { + "lv_draw_i1_convert_to_vtiled", + (PyCFunction)py_lv_draw_i1_convert_to_vtiled, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64250,28 +76856,36 @@ static PyMethodDef py_lv_lock_isr_def = { /* * lvgl extension definition for: - * void lv_unlock(void) + * void lv_draw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) */ -static PyObject *py_lv_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_rotate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *src_py; PyObject *dest_py; long src_width_val; long src_height_val; long src_stride_val; long dest_stride_val; PyObject *rotation_py; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "OOllllOO", &src_py, &dest_py, &src_width_val, &src_height_val, &src_stride_val, &dest_stride_val, &rotation_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + const void *src = (const void *)mp_to_ptr(src_py); + void *dest = mp_to_ptr(dest_py); + int32_t src_width = (int32_t)src_width_val; + int32_t src_height = (int32_t)src_height_val; + int32_t src_stride = (int32_t)src_stride_val; + int32_t dest_stride = (int32_t)dest_stride_val; + lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_unlock)(); + ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_draw_rotate)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_unlock_def = { - "lv_unlock", - (PyCFunction)py_lv_unlock, +static PyMethodDef py_lv_draw_rotate_def = { + "lv_draw_rotate", + (PyCFunction)py_lv_draw_rotate, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64279,29 +76893,30 @@ static PyMethodDef py_lv_unlock_def = { /* * lvgl extension definition for: - * void lv_sleep_ms(uint32_t ms) + * lv_font_t *lv_binfont_create(const char *path) */ -static PyObject *py_lv_sleep_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_binfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long ms_val; - if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t ms = (uint32_t)ms_val; + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_font_t * _res; lvpy_lock(); - ((void (*)(uint32_t))lv_sleep_ms)(ms); + _res = ((lv_font_t *(*)(const char *))lv_binfont_create)(path); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_sleep_ms_def = { - "lv_sleep_ms", - (PyCFunction)py_lv_sleep_ms, +static PyMethodDef py_lv_binfont_create_def = { + "lv_binfont_create", + (PyCFunction)py_lv_binfont_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64309,29 +76924,31 @@ static PyMethodDef py_lv_sleep_ms_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_font_get_default(void) + * lv_font_t *lv_binfont_create_from_buffer(void *buffer, uint32_t size) */ -static PyObject *py_lv_font_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_binfont_create_from_buffer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *buffer_py; long size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buffer_py, &size_val)) { PyGILState_Release(gstate); return NULL; } + void *buffer = mp_to_ptr(buffer_py); + uint32_t size = (uint32_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; + lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(void))lv_font_get_default)(); + _res = ((lv_font_t *(*)(void *, uint32_t))lv_binfont_create_from_buffer)(buffer, size); lvpy_unlock(); PyGILState_Release(gstate); return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_font_get_default_def = { - "lv_font_get_default", - (PyCFunction)py_lv_font_get_default, +static PyMethodDef py_lv_binfont_create_from_buffer_def = { + "lv_binfont_create_from_buffer", + (PyCFunction)py_lv_binfont_create_from_buffer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64339,60 +76956,60 @@ static PyMethodDef py_lv_font_get_default_def = { /* * lvgl extension definition for: - * void lv_text_get_size(lv_point_t *size_res, const char *text, const lv_font_t *font, int32_t letter_space, int32_t line_space, int32_t max_width, lv_text_flag_t flag) + * void lv_binfont_destroy(lv_font_t *font) */ -static PyObject *py_lv_text_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_binfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *size_res_py; PyObject *text_py; PyObject *font_py; long letter_space_val; long line_space_val; long max_width_val; PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "OOOlllO", &size_res_py, &text_py, &font_py, &letter_space_val, &line_space_val, &max_width_val, &flag_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); - const char *text = (const char *)(char*)convert_from_str(text_py); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - int32_t letter_space = (int32_t)letter_space_val; - int32_t line_space = (int32_t)line_space_val; - int32_t max_width = (int32_t)max_width_val; - lv_text_flag_t flag = (int)mp_obj_get_int(flag_py); + PyObject *font_py; + if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_t *font = mp_write_ptr_lv_font_t(font_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, const char *, const lv_font_t *, int32_t, int32_t, int32_t, lv_text_flag_t))lv_text_get_size)(size_res, text, font, letter_space, line_space, max_width, flag); + ((void (*)(lv_font_t *))lv_binfont_destroy)(font); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_get_size_def = { - "lv_text_get_size", - (PyCFunction)py_lv_text_get_size, +static PyMethodDef py_lv_binfont_destroy_def = { + "lv_binfont_destroy", + (PyCFunction)py_lv_binfont_destroy, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_layout_register_cb (CPython) - * void lv_layout_update_cb_t(lv_obj_t *, void *user_data) + * Callback function lv_imgfont_create_path_cb (CPython) + * const void *lv_imgfont_get_path_cb_t(const lv_font_t *font, uint32_t unicode, uint32_t unicode_next, int32_t *offset_y, void *user_data) */ -static void lv_layout_register_cb_callback(lv_obj_t *arg0, void *arg1) +static const void * lv_imgfont_create_path_cb_callback(const lv_font_t *arg0, uint32_t arg1, uint32_t arg2, int32_t *arg3, void *arg4) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_layout_register_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + PyObject *callbacks = get_callback_dict_from_user_data(arg4); + if (!callbacks) { PyGILState_Release(gstate); return NULL; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_imgfont_create_path_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return NULL; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = lv_to_mp((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); + PyObject *py_arg1 = mp_obj_new_int_from_uint(arg1); + PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); + PyObject *py_arg3 = mp_array_from_i32ptr((void*)arg3); + PyObject *py_arg4 = ptr_to_mp((void*)arg4); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3 && py_arg4) ? PyTuple_Pack(5, py_arg0, py_arg1, py_arg2, py_arg3, py_arg4) : NULL; Py_XDECREF(py_arg0); Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + Py_XDECREF(py_arg2); + Py_XDECREF(py_arg3); + Py_XDECREF(py_arg4); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return NULL; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); PyObject *result = PyObject_CallObject(py_cb, py_args); @@ -64400,39 +77017,42 @@ static void lv_layout_register_cb_callback(lv_obj_t *arg0, void *arg1) Py_DECREF(py_cb); lvpy_nesting_dec(); lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return NULL; } + const void * _c_res = mp_to_ptr(result); + Py_DECREF(result); PyGILState_Release(gstate); + return _c_res; } /* * lvgl extension definition for: - * uint32_t lv_layout_register(lv_layout_update_cb_t cb, void *user_data) + * lv_font_t *lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void *user_data) */ -static PyObject *py_lv_layout_register(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imgfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + long height_val; PyObject *path_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "lOO", &height_val, &path_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } void *user_data = mp_to_ptr(user_data_py); - void *cb = mp_lv_callback(cb_py, &lv_layout_register_cb_callback, "lv_layout_register_cb", &user_data, NULL, (NULL), (NULL)); + uint16_t height = (uint16_t)height_val; + void *path_cb = mp_lv_callback(path_cb_py, &lv_imgfont_create_path_cb_callback, "lv_imgfont_create_path_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_font_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_layout_update_cb_t, void *))lv_layout_register)(cb, user_data); + _res = ((lv_font_t *(*)(uint16_t, lv_imgfont_get_path_cb_t, void *))lv_imgfont_create)(height, path_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_layout_register_def = { - "lv_layout_register", - (PyCFunction)py_lv_layout_register, +static PyMethodDef py_lv_imgfont_create_def = { + "lv_imgfont_create", + (PyCFunction)py_lv_imgfont_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64440,28 +77060,29 @@ static PyMethodDef py_lv_layout_register_def = { /* * lvgl extension definition for: - * void lv_flex_init(void) + * void lv_imgfont_destroy(lv_font_t *font) */ -static PyObject *py_lv_flex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imgfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *font_py; + if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_t *font = mp_write_ptr_lv_font_t(font_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_flex_init)(); + ((void (*)(lv_font_t *))lv_imgfont_destroy)(font); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_flex_init_def = { - "lv_flex_init", - (PyCFunction)py_lv_flex_init, +static PyMethodDef py_lv_imgfont_destroy_def = { + "lv_imgfont_destroy", + (PyCFunction)py_lv_imgfont_destroy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64469,9 +77090,9 @@ static PyMethodDef py_lv_flex_init_def = { /* * lvgl extension definition for: - * void lv_grid_init(void) + * void lv_fs_memfs_init(void) */ -static PyObject *py_lv_grid_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_memfs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -64481,16 +77102,16 @@ static PyObject *py_lv_grid_init(PyObject *self, PyObject *py_args, PyObject *py if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_grid_init)(); + ((void (*)(void))lv_fs_memfs_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_grid_init_def = { - "lv_grid_init", - (PyCFunction)py_lv_grid_init, +static PyMethodDef py_lv_fs_memfs_init_def = { + "lv_fs_memfs_init", + (PyCFunction)py_lv_fs_memfs_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64498,30 +77119,28 @@ static PyMethodDef py_lv_grid_init_def = { /* * lvgl extension definition for: - * int32_t lv_grid_fr(uint8_t x) + * void lv_bin_decoder_init(void) */ -static PyObject *py_lv_grid_fr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t x = (uint8_t)x_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(uint8_t))lv_grid_fr)(x); + ((void (*)(void))lv_bin_decoder_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_grid_fr_def = { - "lv_grid_fr", - (PyCFunction)py_lv_grid_fr, +static PyMethodDef py_lv_bin_decoder_init_def = { + "lv_bin_decoder_init", + (PyCFunction)py_lv_bin_decoder_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64529,30 +77148,32 @@ static PyMethodDef py_lv_grid_fr_def = { /* * lvgl extension definition for: - * lv_style_prop_t lv_style_register_prop(uint8_t flag) + * lv_result_t lv_bin_decoder_info(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) */ -static PyObject *py_lv_style_register_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long flag_val; - if (!PyArg_ParseTuple(py_args, "l", &flag_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t flag = (uint8_t)flag_val; + PyObject *decoder_py; PyObject *dsc_py; PyObject *header_py; + if (!PyArg_ParseTuple(py_args, "OOO", &decoder_py, &dsc_py, &header_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + lv_image_header_t *header = mp_write_ptr_lv_image_header_t(header_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_style_prop_t (*)(uint8_t))lv_style_register_prop)(flag); + _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, lv_image_header_t *))lv_bin_decoder_info)(decoder, dsc, header); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_style_register_prop_def = { - "lv_style_register_prop", - (PyCFunction)py_lv_style_register_prop, +static PyMethodDef py_lv_bin_decoder_info_def = { + "lv_bin_decoder_info", + (PyCFunction)py_lv_bin_decoder_info, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64560,29 +77181,33 @@ static PyMethodDef py_lv_style_register_prop_def = { /* * lvgl extension definition for: - * lv_style_prop_t lv_style_get_num_custom_props(void) + * lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) */ -static PyObject *py_lv_style_get_num_custom_props(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *decoder_py; PyObject *dsc_py; PyObject *full_area_py; PyObject *decoded_area_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &decoder_py, &dsc_py, &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); + lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_style_prop_t (*)(void))lv_style_get_num_custom_props)(); + _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_bin_decoder_get_area)(decoder, dsc, full_area, decoded_area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_style_get_num_custom_props_def = { - "lv_style_get_num_custom_props", - (PyCFunction)py_lv_style_get_num_custom_props, +static PyMethodDef py_lv_bin_decoder_get_area_def = { + "lv_bin_decoder_get_area", + (PyCFunction)py_lv_bin_decoder_get_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64590,30 +77215,31 @@ static PyMethodDef py_lv_style_get_num_custom_props_def = { /* * lvgl extension definition for: - * lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop) + * lv_result_t lv_bin_decoder_open(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) */ -static PyObject *py_lv_style_prop_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + PyObject *decoder_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_value_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_style_value_t (*)(lv_style_prop_t))lv_style_prop_get_default)(prop); + _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_open)(decoder, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_style_value_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_style_prop_get_default_def = { - "lv_style_prop_get_default", - (PyCFunction)py_lv_style_prop_get_default, +static PyMethodDef py_lv_bin_decoder_open_def = { + "lv_bin_decoder_open", + (PyCFunction)py_lv_bin_decoder_open, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64621,30 +77247,30 @@ static PyMethodDef py_lv_style_prop_get_default_def = { /* * lvgl extension definition for: - * uint8_t lv_style_prop_lookup_flags(lv_style_prop_t prop) + * void lv_bin_decoder_close(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) */ -static PyObject *py_lv_style_prop_lookup_flags(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + PyObject *decoder_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_style_prop_t))lv_style_prop_lookup_flags)(prop); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_close)(decoder, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_style_prop_lookup_flags_def = { - "lv_style_prop_lookup_flags", - (PyCFunction)py_lv_style_prop_lookup_flags, +static PyMethodDef py_lv_bin_decoder_close_def = { + "lv_bin_decoder_close", + (PyCFunction)py_lv_bin_decoder_close, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64652,9 +77278,9 @@ static PyMethodDef py_lv_style_prop_lookup_flags_def = { /* * lvgl extension definition for: - * uint32_t lv_event_register_id(void) + * void lv_lodepng_init(void) */ -static PyObject *py_lv_event_register_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lodepng_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -64663,18 +77289,17 @@ static PyObject *py_lv_event_register_id(PyObject *self, PyObject *py_args, PyOb if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_event_register_id)(); + ((void (*)(void))lv_lodepng_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_register_id_def = { - "lv_event_register_id", - (PyCFunction)py_lv_event_register_id, +static PyMethodDef py_lv_lodepng_init_def = { + "lv_lodepng_init", + (PyCFunction)py_lv_lodepng_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64682,92 +77307,154 @@ static PyMethodDef py_lv_event_register_id_def = { /* * lvgl extension definition for: - * const char *lv_event_code_get_name(lv_event_code_t code) + * void lv_lodepng_deinit(void) */ -static PyObject *py_lv_event_code_get_name(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lodepng_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *code_py; - if (!PyArg_ParseTuple(py_args, "O", &code_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_code_t code = (int)mp_obj_get_int(code_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; lvpy_lock(); - _res = ((const char *(*)(lv_event_code_t))lv_event_code_get_name)(code); + ((void (*)(void))lv_lodepng_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_code_get_name_def = { - "lv_event_code_get_name", - (PyCFunction)py_lv_event_code_get_name, +static PyMethodDef py_lv_lodepng_deinit_def = { + "lv_lodepng_deinit", + (PyCFunction)py_lv_lodepng_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_async_call_async_xcb (CPython) + * void lv_async_cb_t(void *) + */ +static void lv_async_call_async_xcb_callback(void *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_async_xcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_display_t *lv_display_create(int32_t hor_res, int32_t ver_res) + * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) */ -static PyObject *py_lv_display_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_async_call(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long hor_res_val; long ver_res_val; - if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } - int32_t hor_res = (int32_t)hor_res_val; - int32_t ver_res = (int32_t)ver_res_val; + PyObject *async_xcb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_async_xcb_callback, "lv_async_call_async_xcb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_display_t *(*)(int32_t, int32_t))lv_display_create)(hor_res, ver_res); + _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call)(async_xcb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_create_def = { - "lv_display_create", - (PyCFunction)py_lv_display_create, +static PyMethodDef py_lv_async_call_def = { + "lv_async_call", + (PyCFunction)py_lv_async_call, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_async_call_cancel_async_xcb (CPython) + * void lv_async_cb_t(void *) + */ +static void lv_async_call_cancel_async_xcb_callback(void *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_cancel_async_xcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_display_t *lv_display_get_default(void) + * lv_result_t lv_async_call_cancel(lv_async_cb_t async_xcb, void *user_data) */ -static PyObject *py_lv_display_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_async_call_cancel(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *async_xcb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_cancel_async_xcb_callback, "lv_async_call_cancel_async_xcb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_display_t *(*)(void))lv_display_get_default)(); + _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call_cancel)(async_xcb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_default_def = { - "lv_display_get_default", - (PyCFunction)py_lv_display_get_default, +static PyMethodDef py_lv_async_call_cancel_def = { + "lv_async_call_cancel", + (PyCFunction)py_lv_async_call_cancel, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64775,29 +77462,28 @@ static PyMethodDef py_lv_display_get_default_def = { /* * lvgl extension definition for: - * void lv_screen_load(struct _lv_obj_t *scr) + * void lv_lock(void) */ -static PyObject *py_lv_screen_load(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *scr_py; - if (!PyArg_ParseTuple(py_args, "O", &scr_py)) { PyGILState_Release(gstate); return NULL; } - struct _lv_obj_t *scr = mp_to_lv(scr_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(struct _lv_obj_t *))lv_screen_load)(scr); + ((void (*)(void))lv_lock)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_screen_load_def = { - "lv_screen_load", - (PyCFunction)py_lv_screen_load, +static PyMethodDef py_lv_lock_def = { + "lv_lock", + (PyCFunction)py_lv_lock, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64805,33 +77491,29 @@ static PyMethodDef py_lv_screen_load_def = { /* * lvgl extension definition for: - * void lv_screen_load_anim(lv_obj_t *scr, lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay, bool auto_del) + * lv_result_t lv_lock_isr(void) */ -static PyObject *py_lv_screen_load_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *scr_py; PyObject *anim_type_py; long time_val; long delay_val; long auto_del_val; - if (!PyArg_ParseTuple(py_args, "OOlll", &scr_py, &anim_type_py, &time_val, &delay_val, &auto_del_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scr = mp_to_lv(scr_py); - lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); - uint32_t time = (uint32_t)time_val; - uint32_t delay = (uint32_t)delay_val; - bool auto_del = (auto_del_val != 0); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_screen_load_anim_t, uint32_t, uint32_t, bool))lv_screen_load_anim)(scr, anim_type, time, delay, auto_del); + _res = ((lv_result_t (*)(void))lv_lock_isr)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_screen_load_anim_def = { - "lv_screen_load_anim", - (PyCFunction)py_lv_screen_load_anim, +static PyMethodDef py_lv_lock_isr_def = { + "lv_lock_isr", + (PyCFunction)py_lv_lock_isr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64839,9 +77521,9 @@ static PyMethodDef py_lv_screen_load_anim_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_screen_active(void) + * void lv_unlock(void) */ -static PyObject *py_lv_screen_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -64850,18 +77532,17 @@ static PyObject *py_lv_screen_active(PyObject *self, PyObject *py_args, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_screen_active)(); + ((void (*)(void))lv_unlock)(); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_screen_active_def = { - "lv_screen_active", - (PyCFunction)py_lv_screen_active, +static PyMethodDef py_lv_unlock_def = { + "lv_unlock", + (PyCFunction)py_lv_unlock, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64869,29 +77550,29 @@ static PyMethodDef py_lv_screen_active_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_layer_top(void) + * void lv_sleep_ms(uint32_t ms) */ -static PyObject *py_lv_layer_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_sleep_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long ms_val; + if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t ms = (uint32_t)ms_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_layer_top)(); + ((void (*)(uint32_t))lv_sleep_ms)(ms); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_layer_top_def = { - "lv_layer_top", - (PyCFunction)py_lv_layer_top, +static PyMethodDef py_lv_sleep_ms_def = { + "lv_sleep_ms", + (PyCFunction)py_lv_sleep_ms, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64899,9 +77580,9 @@ static PyMethodDef py_lv_layer_top_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_layer_sys(void) + * lv_theme_t *lv_theme_create(void) */ -static PyObject *py_lv_layer_sys(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -64910,18 +77591,18 @@ static PyObject *py_lv_layer_sys(PyObject *self, PyObject *py_args, PyObject *py if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_layer_sys)(); + _res = ((lv_theme_t *(*)(void))lv_theme_create)(); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_layer_sys_def = { - "lv_layer_sys", - (PyCFunction)py_lv_layer_sys, +static PyMethodDef py_lv_theme_create_def = { + "lv_theme_create", + (PyCFunction)py_lv_theme_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64929,29 +77610,30 @@ static PyMethodDef py_lv_layer_sys_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_layer_bottom(void) + * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) */ -static PyObject *py_lv_layer_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_from_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_layer_bottom)(); + _res = ((lv_theme_t *(*)(lv_obj_t *))lv_theme_get_from_obj)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_layer_bottom_def = { - "lv_layer_bottom", - (PyCFunction)py_lv_layer_bottom, +static PyMethodDef py_lv_theme_get_from_obj_def = { + "lv_theme_get_from_obj", + (PyCFunction)py_lv_theme_get_from_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64959,30 +77641,29 @@ static PyMethodDef py_lv_layer_bottom_def = { /* * lvgl extension definition for: - * int32_t lv_dpx(int32_t n) + * void lv_theme_apply(lv_obj_t *obj) */ -static PyObject *py_lv_dpx(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long n_val; - if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } - int32_t n = (int32_t)n_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t))lv_dpx)(n); + ((void (*)(lv_obj_t *))lv_theme_apply)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_dpx_def = { - "lv_dpx", - (PyCFunction)py_lv_dpx, +static PyMethodDef py_lv_theme_apply_def = { + "lv_theme_apply", + (PyCFunction)py_lv_theme_apply, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -64990,33 +77671,30 @@ static PyMethodDef py_lv_dpx_def = { /* * lvgl extension definition for: - * int32_t lv_clamp_width(int32_t width, int32_t min_width, int32_t max_width, int32_t ref_width) + * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) */ -static PyObject *py_lv_clamp_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_font_small(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long width_val; long min_width_val; long max_width_val; long ref_width_val; - if (!PyArg_ParseTuple(py_args, "llll", &width_val, &min_width_val, &max_width_val, &ref_width_val)) { PyGILState_Release(gstate); return NULL; } - int32_t width = (int32_t)width_val; - int32_t min_width = (int32_t)min_width_val; - int32_t max_width = (int32_t)max_width_val; - int32_t ref_width = (int32_t)ref_width_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + const lv_font_t * _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_width)(width, min_width, max_width, ref_width); + _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_small)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_clamp_width_def = { - "lv_clamp_width", - (PyCFunction)py_lv_clamp_width, +static PyMethodDef py_lv_theme_get_font_small_def = { + "lv_theme_get_font_small", + (PyCFunction)py_lv_theme_get_font_small, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65024,33 +77702,30 @@ static PyMethodDef py_lv_clamp_width_def = { /* * lvgl extension definition for: - * int32_t lv_clamp_height(int32_t height, int32_t min_height, int32_t max_height, int32_t ref_height) + * const lv_font_t *lv_theme_get_font_normal(lv_obj_t *obj) */ -static PyObject *py_lv_clamp_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_font_normal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long height_val; long min_height_val; long max_height_val; long ref_height_val; - if (!PyArg_ParseTuple(py_args, "llll", &height_val, &min_height_val, &max_height_val, &ref_height_val)) { PyGILState_Release(gstate); return NULL; } - int32_t height = (int32_t)height_val; - int32_t min_height = (int32_t)min_height_val; - int32_t max_height = (int32_t)max_height_val; - int32_t ref_height = (int32_t)ref_height_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + const lv_font_t * _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_height)(height, min_height, max_height, ref_height); + _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_normal)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_clamp_height_def = { - "lv_clamp_height", - (PyCFunction)py_lv_clamp_height, +static PyMethodDef py_lv_theme_get_font_normal_def = { + "lv_theme_get_font_normal", + (PyCFunction)py_lv_theme_get_font_normal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65058,30 +77733,30 @@ static PyMethodDef py_lv_clamp_height_def = { /* * lvgl extension definition for: - * lv_fs_drv_t *lv_fs_get_drv(char letter) + * const lv_font_t *lv_theme_get_font_large(lv_obj_t *obj) */ -static PyObject *py_lv_fs_get_drv(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_font_large(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - char letter = (char)letter_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_drv_t * _res; + const lv_font_t * _res; lvpy_lock(); - _res = ((lv_fs_drv_t *(*)(char))lv_fs_get_drv)(letter); + _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_large)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_fs_drv_t((void*)_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_fs_get_drv_def = { - "lv_fs_get_drv", - (PyCFunction)py_lv_fs_get_drv, +static PyMethodDef py_lv_theme_get_font_large_def = { + "lv_theme_get_font_large", + (PyCFunction)py_lv_theme_get_font_large, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65089,29 +77764,30 @@ static PyMethodDef py_lv_fs_get_drv_def = { /* * lvgl extension definition for: - * void lv_fs_remove_drive(char letter) + * lv_color_t lv_theme_get_color_primary(lv_obj_t *obj) */ -static PyObject *py_lv_fs_remove_drive(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_color_primary(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - char letter = (char)letter_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(char))lv_fs_remove_drive)(letter); + _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_primary)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_fs_remove_drive_def = { - "lv_fs_remove_drive", - (PyCFunction)py_lv_fs_remove_drive, +static PyMethodDef py_lv_theme_get_color_primary_def = { + "lv_theme_get_color_primary", + (PyCFunction)py_lv_theme_get_color_primary, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65119,30 +77795,30 @@ static PyMethodDef py_lv_fs_remove_drive_def = { /* * lvgl extension definition for: - * bool lv_fs_is_ready(char letter) + * lv_color_t lv_theme_get_color_secondary(lv_obj_t *obj) */ -static PyObject *py_lv_fs_is_ready(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_color_secondary(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - char letter = (char)letter_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_color_t _res; lvpy_lock(); - _res = ((bool (*)(char))lv_fs_is_ready)(letter); + _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_secondary)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_fs_is_ready_def = { - "lv_fs_is_ready", - (PyCFunction)py_lv_fs_is_ready, +static PyMethodDef py_lv_theme_get_color_secondary_def = { + "lv_theme_get_color_secondary", + (PyCFunction)py_lv_theme_get_color_secondary, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65150,31 +77826,34 @@ static PyMethodDef py_lv_fs_is_ready_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_path_get_size(const char *path, uint32_t *size_res) + * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) */ -static PyObject *py_lv_fs_path_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; PyObject *size_res_py; - if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_res_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); - uint32_t *size_res = mp_array_to_u32ptr(size_res_py); + PyObject *disp_py; PyObject *color_primary_py; PyObject *color_secondary_py; long dark_val; PyObject *font_py; + if (!PyArg_ParseTuple(py_args, "OOOlO", &disp_py, &color_primary_py, &color_secondary_py, &dark_val, &font_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + lv_color_t color_primary = mp_write_lv_color_t(color_primary_py); + lv_color_t color_secondary = mp_write_lv_color_t(color_secondary_py); + bool dark = (dark_val != 0); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(const char *, uint32_t *))lv_fs_path_get_size)(path, size_res); + _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_theme_default_init)(disp, color_primary, color_secondary, dark, font); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_fs_path_get_size_def = { - "lv_fs_path_get_size", - (PyCFunction)py_lv_fs_path_get_size, +static PyMethodDef py_lv_theme_default_init_def = { + "lv_theme_default_init", + (PyCFunction)py_lv_theme_default_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65182,32 +77861,29 @@ static PyMethodDef py_lv_fs_path_get_size_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_load_to_buf(void *buf, uint32_t buf_size, const char *path) + * bool lv_theme_default_is_inited(void) */ -static PyObject *py_lv_fs_load_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_is_inited(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_val; PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &buf_size_val, &path_py)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; - const char *path = (const char *)(char*)convert_from_str(path_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + bool _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(void *, uint32_t, const char *))lv_fs_load_to_buf)(buf, buf_size, path); + _res = ((bool (*)(void))lv_theme_default_is_inited)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_fs_load_to_buf_def = { - "lv_fs_load_to_buf", - (PyCFunction)py_lv_fs_load_to_buf, +static PyMethodDef py_lv_theme_default_is_inited_def = { + "lv_theme_default_is_inited", + (PyCFunction)py_lv_theme_default_is_inited, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65215,31 +77891,29 @@ static PyMethodDef py_lv_fs_load_to_buf_def = { /* * lvgl extension definition for: - * void *lv_fs_load_with_alloc(const char *path, uint32_t *size) + * lv_theme_t *lv_theme_default_get(void) */ -static PyObject *py_lv_fs_load_with_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; PyObject *size_py; - if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); - uint32_t *size = mp_array_to_u32ptr(size_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((void *(*)(const char *, uint32_t *))lv_fs_load_with_alloc)(path, size); + _res = ((lv_theme_t *(*)(void))lv_theme_default_get)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_fs_load_with_alloc_def = { - "lv_fs_load_with_alloc", - (PyCFunction)py_lv_fs_load_with_alloc, +static PyMethodDef py_lv_theme_default_get_def = { + "lv_theme_default_get", + (PyCFunction)py_lv_theme_default_get, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65247,30 +77921,28 @@ static PyMethodDef py_lv_fs_load_with_alloc_def = { /* * lvgl extension definition for: - * char *lv_fs_get_letters(char *buf) + * void lv_theme_default_deinit(void) */ -static PyObject *py_lv_fs_get_letters(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; - if (!PyArg_ParseTuple(py_args, "O", &buf_py)) { PyGILState_Release(gstate); return NULL; } - char *buf = (char*)convert_from_str(buf_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; lvpy_lock(); - _res = ((char *(*)(char *))lv_fs_get_letters)(buf); + ((void (*)(void))lv_theme_default_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_get_letters_def = { - "lv_fs_get_letters", - (PyCFunction)py_lv_fs_get_letters, +static PyMethodDef py_lv_theme_default_deinit_def = { + "lv_theme_default_deinit", + (PyCFunction)py_lv_theme_default_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65278,30 +77950,31 @@ static PyMethodDef py_lv_fs_get_letters_def = { /* * lvgl extension definition for: - * const char *lv_fs_get_ext(const char *fn) + * void lv_tick_inc(uint32_t tick_period) */ -static PyObject *py_lv_fs_get_ext(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_inc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *fn_py; - if (!PyArg_ParseTuple(py_args, "O", &fn_py)) { PyGILState_Release(gstate); return NULL; } - const char *fn = (const char *)(char*)convert_from_str(fn_py); + long tick_period_val; + if (!PyArg_ParseTuple(py_args, "l", &tick_period_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t tick_period = (uint32_t)tick_period_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; lvpy_lock(); - _res = ((const char *(*)(const char *))lv_fs_get_ext)(fn); + Py_BEGIN_ALLOW_THREADS + ((void (*)(uint32_t))lv_tick_inc)(tick_period); + Py_END_ALLOW_THREADS lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_get_ext_def = { - "lv_fs_get_ext", - (PyCFunction)py_lv_fs_get_ext, +static PyMethodDef py_lv_tick_inc_def = { + "lv_tick_inc", + (PyCFunction)py_lv_tick_inc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65309,30 +77982,29 @@ static PyMethodDef py_lv_fs_get_ext_def = { /* * lvgl extension definition for: - * char *lv_fs_up(char *path) + * uint32_t lv_tick_get(void) */ -static PyObject *py_lv_fs_up(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - char *path = (char*)convert_from_str(path_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + uint32_t _res; lvpy_lock(); - _res = ((char *(*)(char *))lv_fs_up)(path); + _res = ((uint32_t (*)(void))lv_tick_get)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_fs_up_def = { - "lv_fs_up", - (PyCFunction)py_lv_fs_up, +static PyMethodDef py_lv_tick_get_def = { + "lv_tick_get", + (PyCFunction)py_lv_tick_get, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65340,30 +78012,30 @@ static PyMethodDef py_lv_fs_up_def = { /* * lvgl extension definition for: - * const char *lv_fs_get_last(const char *path) + * uint32_t lv_tick_elaps(uint32_t prev_tick) */ -static PyObject *py_lv_fs_get_last(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_elaps(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); + long prev_tick_val; + if (!PyArg_ParseTuple(py_args, "l", &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t prev_tick = (uint32_t)prev_tick_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + uint32_t _res; lvpy_lock(); - _res = ((const char *(*)(const char *))lv_fs_get_last)(path); + _res = ((uint32_t (*)(uint32_t))lv_tick_elaps)(prev_tick); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_fs_get_last_def = { - "lv_fs_get_last", - (PyCFunction)py_lv_fs_get_last, +static PyMethodDef py_lv_tick_elaps_def = { + "lv_tick_elaps", + (PyCFunction)py_lv_tick_elaps, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65371,33 +78043,31 @@ static PyMethodDef py_lv_fs_get_last_def = { /* * lvgl extension definition for: - * int lv_fs_path_join(char *buf, size_t buf_sz, const char *base, const char *end) + * uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick) */ -static PyObject *py_lv_fs_path_join(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_diff(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long buf_sz_val; PyObject *base_py; PyObject *end_py; - if (!PyArg_ParseTuple(py_args, "OlOO", &buf_py, &buf_sz_val, &base_py, &end_py)) { PyGILState_Release(gstate); return NULL; } - char *buf = (char*)convert_from_str(buf_py); - size_t buf_sz = (size_t)buf_sz_val; - const char *base = (const char *)(char*)convert_from_str(base_py); - const char *end = (const char *)(char*)convert_from_str(end_py); + long tick_val; long prev_tick_val; + if (!PyArg_ParseTuple(py_args, "ll", &tick_val, &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t tick = (uint32_t)tick_val; + uint32_t prev_tick = (uint32_t)prev_tick_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + uint32_t _res; lvpy_lock(); - _res = ((int (*)(char *, size_t, const char *, const char *))lv_fs_path_join)(buf, buf_sz, base, end); + _res = ((uint32_t (*)(uint32_t, uint32_t))lv_tick_diff)(tick, prev_tick); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_fs_path_join_def = { - "lv_fs_path_join", - (PyCFunction)py_lv_fs_path_join, +static PyMethodDef py_lv_tick_diff_def = { + "lv_tick_diff", + (PyCFunction)py_lv_tick_diff, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65405,88 +78075,103 @@ static PyMethodDef py_lv_fs_path_join_def = { /* * lvgl extension definition for: - * void lv_draw_init(void) + * void lv_delay_ms(uint32_t ms) */ -static PyObject *py_lv_draw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_delay_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long ms_val; + if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t ms = (uint32_t)ms_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_init)(); + ((void (*)(uint32_t))lv_delay_ms)(ms); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_init_def = { - "lv_draw_init", - (PyCFunction)py_lv_draw_init, +static PyMethodDef py_lv_delay_ms_def = { + "lv_delay_ms", + (PyCFunction)py_lv_delay_ms, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback cannot be the first argument + * lv_delay_cb_t cb + */ + + /* * lvgl extension definition for: - * void lv_draw_deinit(void) + * void lv_delay_set_cb(lv_delay_cb_t cb) */ -static PyObject *py_lv_draw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_delay_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_deinit)(); + ((void (*)(lv_delay_cb_t))lv_delay_set_cb)(cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_deinit_def = { - "lv_draw_deinit", - (PyCFunction)py_lv_draw_deinit, +static PyMethodDef py_lv_delay_set_cb_def = { + "lv_delay_set_cb", + (PyCFunction)py_lv_delay_set_cb, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback cannot be the first argument + * lv_tick_get_cb_t cb + */ + + /* * lvgl extension definition for: - * void *lv_draw_create_unit(size_t size) + * void lv_tick_set_cb(lv_tick_get_cb_t cb) */ -static PyObject *py_lv_draw_create_unit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_draw_create_unit)(size); + ((void (*)(lv_tick_get_cb_t))lv_tick_set_cb)(cb); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_create_unit_def = { - "lv_draw_create_unit", - (PyCFunction)py_lv_draw_create_unit, +static PyMethodDef py_lv_tick_set_cb_def = { + "lv_tick_set_cb", + (PyCFunction)py_lv_tick_set_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65494,32 +78179,29 @@ static PyMethodDef py_lv_draw_create_unit_def = { /* * lvgl extension definition for: - * lv_draw_task_t *lv_draw_add_task(lv_layer_t *layer, const lv_area_t *coords, lv_draw_task_type_t type) + * lv_tick_get_cb_t lv_tick_get_cb(void) */ -static PyObject *py_lv_draw_add_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_get_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *coords_py; PyObject *type_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &coords_py, &type_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - lv_draw_task_type_t type = (int)mp_obj_get_int(type_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t * _res; + lv_tick_get_cb_t _res; lvpy_lock(); - _res = ((lv_draw_task_t *(*)(lv_layer_t *, const lv_area_t *, lv_draw_task_type_t))lv_draw_add_task)(layer, coords, type); + _res = ((lv_tick_get_cb_t (*)(void))lv_tick_get_cb)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_task_t((void*)_res); + return mp_lv_funcptr_lv_tick_get_cb_t(_res); } -static PyMethodDef py_lv_draw_add_task_def = { - "lv_draw_add_task", - (PyCFunction)py_lv_draw_add_task, +static PyMethodDef py_lv_tick_get_cb_def = { + "lv_tick_get_cb", + (PyCFunction)py_lv_tick_get_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65527,30 +78209,28 @@ static PyMethodDef py_lv_draw_add_task_def = { /* * lvgl extension definition for: - * void lv_draw_finalize_task_creation(lv_layer_t *layer, lv_draw_task_t *t) + * void lv_span_stack_init(void) */ -static PyObject *py_lv_draw_finalize_task_creation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_stack_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *t_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &t_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(t_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, lv_draw_task_t *))lv_draw_finalize_task_creation)(layer, t); + ((void (*)(void))lv_span_stack_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_finalize_task_creation_def = { - "lv_draw_finalize_task_creation", - (PyCFunction)py_lv_draw_finalize_task_creation, +static PyMethodDef py_lv_span_stack_init_def = { + "lv_span_stack_init", + (PyCFunction)py_lv_span_stack_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65558,9 +78238,9 @@ static PyMethodDef py_lv_draw_finalize_task_creation_def = { /* * lvgl extension definition for: - * void lv_draw_dispatch(void) + * void lv_span_stack_deinit(void) */ -static PyObject *py_lv_draw_dispatch(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_stack_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -65570,16 +78250,16 @@ static PyObject *py_lv_draw_dispatch(PyObject *self, PyObject *py_args, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_dispatch)(); + ((void (*)(void))lv_span_stack_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_dispatch_def = { - "lv_draw_dispatch", - (PyCFunction)py_lv_draw_dispatch, +static PyMethodDef py_lv_span_stack_deinit_def = { + "lv_span_stack_deinit", + (PyCFunction)py_lv_span_stack_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65587,9 +78267,9 @@ static PyMethodDef py_lv_draw_dispatch_def = { /* * lvgl extension definition for: - * void lv_draw_dispatch_wait_for_request(void) + * void lv_os_init(void) */ -static PyObject *py_lv_draw_dispatch_wait_for_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_os_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -65599,16 +78279,16 @@ static PyObject *py_lv_draw_dispatch_wait_for_request(PyObject *self, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_dispatch_wait_for_request)(); + ((void (*)(void))lv_os_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_dispatch_wait_for_request_def = { - "lv_draw_dispatch_wait_for_request", - (PyCFunction)py_lv_draw_dispatch_wait_for_request, +static PyMethodDef py_lv_os_init_def = { + "lv_os_init", + (PyCFunction)py_lv_os_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65616,9 +78296,9 @@ static PyMethodDef py_lv_draw_dispatch_wait_for_request_def = { /* * lvgl extension definition for: - * void lv_draw_wait_for_finish(void) + * uint32_t lv_os_get_idle_percent(void) */ -static PyObject *py_lv_draw_wait_for_finish(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_os_get_idle_percent(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -65627,46 +78307,59 @@ static PyObject *py_lv_draw_wait_for_finish(PyObject *self, PyObject *py_args, P if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_wait_for_finish)(); + _res = ((uint32_t (*)(void))lv_os_get_idle_percent)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_wait_for_finish_def = { - "lv_draw_wait_for_finish", - (PyCFunction)py_lv_draw_wait_for_finish, +static PyMethodDef py_lv_os_get_idle_percent_def = { + "lv_os_get_idle_percent", + (PyCFunction)py_lv_os_get_idle_percent, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) + * lv_iter_next_cb next_cb + */ + + /* * lvgl extension definition for: - * void lv_draw_dispatch_request(void) + * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) */ -static PyObject *py_lv_draw_dispatch_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *instance_py; long elem_size_val; long context_size_val; PyObject *next_cb_py; + if (!PyArg_ParseTuple(py_args, "OllO", &instance_py, &elem_size_val, &context_size_val, &next_cb_py)) { PyGILState_Release(gstate); return NULL; } + void *instance = mp_to_ptr(instance_py); + uint32_t elem_size = (uint32_t)elem_size_val; + uint32_t context_size = (uint32_t)context_size_val; + void *next_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_iter_t * _res; lvpy_lock(); - ((void (*)(void))lv_draw_dispatch_request)(); + _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_iter_create)(instance, elem_size, context_size, next_cb); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_iter_t((void*)_res); } -static PyMethodDef py_lv_draw_dispatch_request_def = { - "lv_draw_dispatch_request", - (PyCFunction)py_lv_draw_dispatch_request, +static PyMethodDef py_lv_iter_create_def = { + "lv_iter_create", + (PyCFunction)py_lv_iter_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65674,29 +78367,31 @@ static PyMethodDef py_lv_draw_dispatch_request_def = { /* * lvgl extension definition for: - * uint32_t lv_draw_get_unit_count(void) + * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) */ -static PyObject *py_lv_draw_get_unit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long node_size_val; PyObject *cache_py; + if (!PyArg_ParseTuple(py_args, "lO", &node_size_val, &cache_py)) { PyGILState_Release(gstate); return NULL; } + const uint32_t node_size = (const uint32_t)node_size_val; + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_cache_entry_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_draw_get_unit_count)(); + _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_cache_entry_alloc)(node_size, cache); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_draw_get_unit_count_def = { - "lv_draw_get_unit_count", - (PyCFunction)py_lv_draw_get_unit_count, +static PyMethodDef py_lv_cache_entry_alloc_def = { + "lv_cache_entry_alloc", + (PyCFunction)py_lv_cache_entry_alloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65704,32 +78399,30 @@ static PyMethodDef py_lv_draw_get_unit_count_def = { /* * lvgl extension definition for: - * lv_draw_task_t *lv_draw_get_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) + * uint32_t lv_cache_entry_get_size(const uint32_t node_size) */ -static PyObject *py_lv_draw_get_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; - if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); - uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; + long node_size_val; + if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } + const uint32_t node_size = (const uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_available_task)(layer, t_prev, draw_unit_id); + _res = ((uint32_t (*)(const uint32_t))lv_cache_entry_get_size)(node_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_task_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_get_available_task_def = { - "lv_draw_get_available_task", - (PyCFunction)py_lv_draw_get_available_task, +static PyMethodDef py_lv_cache_entry_get_size_def = { + "lv_cache_entry_get_size", + (PyCFunction)py_lv_cache_entry_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65737,32 +78430,31 @@ static PyMethodDef py_lv_draw_get_available_task_def = { /* * lvgl extension definition for: - * lv_draw_task_t *lv_draw_get_next_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) + * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) */ -static PyObject *py_lv_draw_get_next_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_entry(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; - if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); - uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; + PyObject *data_py; long node_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &data_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } + void *data = mp_to_ptr(data_py); + const uint32_t node_size = (const uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t * _res; + lv_cache_entry_t * _res; lvpy_lock(); - _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_next_available_task)(layer, t_prev, draw_unit_id); + _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_cache_entry_get_entry)(data, node_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_task_t((void*)_res); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_draw_get_next_available_task_def = { - "lv_draw_get_next_available_task", - (PyCFunction)py_lv_draw_get_next_available_task, +static PyMethodDef py_lv_cache_entry_get_entry_def = { + "lv_cache_entry_get_entry", + (PyCFunction)py_lv_cache_entry_get_entry, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65770,31 +78462,28 @@ static PyMethodDef py_lv_draw_get_next_available_task_def = { /* * lvgl extension definition for: - * void lv_draw_unit_send_event(const char *name, lv_event_code_t code, void *param) + * void lv_draw_sw_init(void) */ -static PyObject *py_lv_draw_unit_send_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *name_py; PyObject *code_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OOO", &name_py, &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } - const char *name = (const char *)(char*)convert_from_str(name_py); - lv_event_code_t code = (int)mp_obj_get_int(code_py); - void *param = mp_to_ptr(param_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const char *, lv_event_code_t, void *))lv_draw_unit_send_event)(name, code, param); + ((void (*)(void))lv_draw_sw_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_unit_send_event_def = { - "lv_draw_unit_send_event", - (PyCFunction)py_lv_draw_unit_send_event, +static PyMethodDef py_lv_draw_sw_init_def = { + "lv_draw_sw_init", + (PyCFunction)py_lv_draw_sw_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65802,32 +78491,28 @@ static PyMethodDef py_lv_draw_unit_send_event_def = { /* * lvgl extension definition for: - * lv_layer_t *lv_draw_layer_create(lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + * void lv_draw_sw_deinit(void) */ -static PyObject *py_lv_draw_layer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_layer_t * _res; lvpy_lock(); - _res = ((lv_layer_t *(*)(lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_create)(parent_layer, color_format, area); + ((void (*)(void))lv_draw_sw_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_layer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_layer_create_def = { - "lv_draw_layer_create", - (PyCFunction)py_lv_draw_layer_create, +static PyMethodDef py_lv_draw_sw_deinit_def = { + "lv_draw_sw_deinit", + (PyCFunction)py_lv_draw_sw_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65835,32 +78520,37 @@ static PyMethodDef py_lv_draw_layer_create_def = { /* * lvgl extension definition for: - * void lv_draw_layer_init(lv_layer_t *layer, lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t src_cf, void *dest_buf) */ -static PyObject *py_lv_draw_layer_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &layer_py, &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + PyObject *dest_area_py; PyObject *src_buf_py; long src_w_val; long src_h_val; long src_stride_val; PyObject *draw_dsc_py; PyObject *sup_py; PyObject *src_cf_py; PyObject *dest_buf_py; + if (!PyArg_ParseTuple(py_args, "OOlllOOOO", &dest_area_py, &src_buf_py, &src_w_val, &src_h_val, &src_stride_val, &draw_dsc_py, &sup_py, &src_cf_py, &dest_buf_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); + const void *src_buf = (const void *)mp_to_ptr(src_buf_py); + int32_t src_w = (int32_t)src_w_val; + int32_t src_h = (int32_t)src_h_val; + int32_t src_stride = (int32_t)src_stride_val; + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(sup_py); + lv_color_format_t src_cf = (int)mp_obj_get_int(src_cf_py); + void *dest_buf = mp_to_ptr(dest_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_init)(layer, parent_layer, color_format, area); + ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_draw_sw_transform)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, src_cf, dest_buf); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_layer_init_def = { - "lv_draw_layer_init", - (PyCFunction)py_lv_draw_layer_init, +static PyMethodDef py_lv_draw_sw_transform_def = { + "lv_draw_sw_transform", + (PyCFunction)py_lv_draw_sw_transform, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65868,30 +78558,30 @@ static PyMethodDef py_lv_draw_layer_init_def = { /* * lvgl extension definition for: - * void *lv_draw_layer_alloc_buf(lv_layer_t *layer) + * bool lv_draw_sw_unregister_blend_handler(lv_color_format_t dest_cf) */ -static PyObject *py_lv_draw_layer_alloc_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_unregister_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + PyObject *dest_cf_py; + if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + bool _res; lvpy_lock(); - _res = ((void *(*)(lv_layer_t *))lv_draw_layer_alloc_buf)(layer); + _res = ((bool (*)(lv_color_format_t))lv_draw_sw_unregister_blend_handler)(dest_cf); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_layer_alloc_buf_def = { - "lv_draw_layer_alloc_buf", - (PyCFunction)py_lv_draw_layer_alloc_buf, +static PyMethodDef py_lv_draw_sw_unregister_blend_handler_def = { + "lv_draw_sw_unregister_blend_handler", + (PyCFunction)py_lv_draw_sw_unregister_blend_handler, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65899,32 +78589,30 @@ static PyMethodDef py_lv_draw_layer_alloc_buf_def = { /* * lvgl extension definition for: - * void *lv_draw_layer_go_to_xy(lv_layer_t *layer, int32_t x, int32_t y) + * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) */ -static PyObject *py_lv_draw_layer_go_to_xy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_get_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "Oll", &layer_py, &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + PyObject *dest_cf_py; + if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_draw_sw_blend_handler_t _res; lvpy_lock(); - _res = ((void *(*)(lv_layer_t *, int32_t, int32_t))lv_draw_layer_go_to_xy)(layer, x, y); + _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_draw_sw_get_blend_handler)(dest_cf); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); } -static PyMethodDef py_lv_draw_layer_go_to_xy_def = { - "lv_draw_layer_go_to_xy", - (PyCFunction)py_lv_draw_layer_go_to_xy, +static PyMethodDef py_lv_draw_sw_get_blend_handler_def = { + "lv_draw_sw_get_blend_handler", + (PyCFunction)py_lv_draw_sw_get_blend_handler, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65932,32 +78620,28 @@ static PyMethodDef py_lv_draw_layer_go_to_xy_def = { /* * lvgl extension definition for: - * lv_layer_t *lv_draw_layer_create_drop_shadow(lv_layer_t *parent_layer, const lv_draw_dsc_base_t *base, const lv_area_t *area) + * void lv_timer_core_init(void) */ -static PyObject *py_lv_draw_layer_create_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *parent_layer_py; PyObject *base_py; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &base_py, &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); - const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_layer_t * _res; lvpy_lock(); - _res = ((lv_layer_t *(*)(lv_layer_t *, const lv_draw_dsc_base_t *, const lv_area_t *))lv_draw_layer_create_drop_shadow)(parent_layer, base, area); + ((void (*)(void))lv_timer_core_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_layer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_layer_create_drop_shadow_def = { - "lv_draw_layer_create_drop_shadow", - (PyCFunction)py_lv_draw_layer_create_drop_shadow, +static PyMethodDef py_lv_timer_core_init_def = { + "lv_timer_core_init", + (PyCFunction)py_lv_timer_core_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65965,30 +78649,28 @@ static PyMethodDef py_lv_draw_layer_create_drop_shadow_def = { /* * lvgl extension definition for: - * void lv_draw_layer_finish_drop_shadow(lv_layer_t *drop_shadow_layer, const lv_draw_dsc_base_t *base) + * void lv_timer_core_deinit(void) */ -static PyObject *py_lv_draw_layer_finish_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *drop_shadow_layer_py; PyObject *base_py; - if (!PyArg_ParseTuple(py_args, "OO", &drop_shadow_layer_py, &base_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *drop_shadow_layer = mp_write_ptr_lv_layer_t(drop_shadow_layer_py); - const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_dsc_base_t *))lv_draw_layer_finish_drop_shadow)(drop_shadow_layer, base); + ((void (*)(void))lv_timer_core_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_layer_finish_drop_shadow_def = { - "lv_draw_layer_finish_drop_shadow", - (PyCFunction)py_lv_draw_layer_finish_drop_shadow, +static PyMethodDef py_lv_timer_core_deinit_def = { + "lv_timer_core_deinit", + (PyCFunction)py_lv_timer_core_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -65996,31 +78678,28 @@ static PyMethodDef py_lv_draw_layer_finish_drop_shadow_def = { /* * lvgl extension definition for: - * void lv_draw_fill(lv_layer_t *layer, const lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * void lv_anim_core_init(void) */ -static PyObject *py_lv_draw_fill(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_fill_dsc_t *dsc = (const lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_fill)(layer, dsc, coords); + ((void (*)(void))lv_anim_core_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_fill_def = { - "lv_draw_fill", - (PyCFunction)py_lv_draw_fill, +static PyMethodDef py_lv_anim_core_init_def = { + "lv_anim_core_init", + (PyCFunction)py_lv_anim_core_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66028,31 +78707,28 @@ static PyMethodDef py_lv_draw_fill_def = { /* * lvgl extension definition for: - * void lv_draw_border(lv_layer_t *layer, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * void lv_anim_core_deinit(void) */ -static PyObject *py_lv_draw_border(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_border)(layer, dsc, coords); + ((void (*)(void))lv_anim_core_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_border_def = { - "lv_draw_border", - (PyCFunction)py_lv_draw_border, +static PyMethodDef py_lv_anim_core_deinit_def = { + "lv_anim_core_deinit", + (PyCFunction)py_lv_anim_core_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66060,31 +78736,29 @@ static PyMethodDef py_lv_draw_border_def = { /* * lvgl extension definition for: - * void lv_draw_box_shadow(lv_layer_t *layer, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * void lv_anim_enable_vsync_mode(bool enable) */ -static PyObject *py_lv_draw_box_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_enable_vsync_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long enable_val; + if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + bool enable = (enable_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_box_shadow)(layer, dsc, coords); + ((void (*)(bool))lv_anim_enable_vsync_mode)(enable); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_box_shadow_def = { - "lv_draw_box_shadow", - (PyCFunction)py_lv_draw_box_shadow, +static PyMethodDef py_lv_anim_enable_vsync_mode_def = { + "lv_anim_enable_vsync_mode", + (PyCFunction)py_lv_anim_enable_vsync_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66092,31 +78766,28 @@ static PyMethodDef py_lv_draw_box_shadow_def = { /* * lvgl extension definition for: - * void lv_draw_rect(lv_layer_t *layer, const lv_draw_rect_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_buf_init_handlers(void) */ -static PyObject *py_lv_draw_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_init_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_rect_dsc_t *dsc = (const lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_rect_dsc_t *, const lv_area_t *))lv_draw_rect)(layer, dsc, coords); + ((void (*)(void))lv_draw_buf_init_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_rect_def = { - "lv_draw_rect", - (PyCFunction)py_lv_draw_rect, +static PyMethodDef py_lv_draw_buf_init_handlers_def = { + "lv_draw_buf_init_handlers", + (PyCFunction)py_lv_draw_buf_init_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66124,31 +78795,28 @@ static PyMethodDef py_lv_draw_rect_def = { /* * lvgl extension definition for: - * void lv_draw_label(lv_layer_t *layer, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_sw_mask_init(void) */ -static PyObject *py_lv_draw_label(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_label)(layer, dsc, coords); + ((void (*)(void))lv_draw_sw_mask_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_label_def = { - "lv_draw_label", - (PyCFunction)py_lv_draw_label, +static PyMethodDef py_lv_draw_sw_mask_init_def = { + "lv_draw_sw_mask_init", + (PyCFunction)py_lv_draw_sw_mask_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66156,32 +78824,28 @@ static PyMethodDef py_lv_draw_label_def = { /* * lvgl extension definition for: - * void lv_draw_character(lv_layer_t *layer, lv_draw_label_dsc_t *dsc, const lv_point_t *point, uint32_t unicode_letter) + * void lv_draw_sw_mask_deinit(void) */ -static PyObject *py_lv_draw_character(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; long unicode_letter_val; - if (!PyArg_ParseTuple(py_args, "OOOl", &layer_py, &dsc_py, &point_py, &unicode_letter_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_label_dsc_t *dsc = mp_write_ptr_lv_draw_label_dsc_t(dsc_py); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); - uint32_t unicode_letter = (uint32_t)unicode_letter_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, lv_draw_label_dsc_t *, const lv_point_t *, uint32_t))lv_draw_character)(layer, dsc, point, unicode_letter); + ((void (*)(void))lv_draw_sw_mask_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_character_def = { - "lv_draw_character", - (PyCFunction)py_lv_draw_character, +static PyMethodDef py_lv_draw_sw_mask_deinit_def = { + "lv_draw_sw_mask_deinit", + (PyCFunction)py_lv_draw_sw_mask_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66189,31 +78853,34 @@ static PyMethodDef py_lv_draw_character_def = { /* * lvgl extension definition for: - * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) + * lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void *masks[], lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len) */ -static PyObject *py_lv_draw_letter(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); + PyObject *masks_py; PyObject *mask_buf_py; long abs_x_val; long abs_y_val; long len_val; + if (!PyArg_ParseTuple(py_args, "OOlll", &masks_py, &mask_buf_py, &abs_x_val, &abs_y_val, &len_val)) { PyGILState_Release(gstate); return NULL; } + void **masks = mp_to_ptr(masks_py); + lv_opa_t *mask_buf = mp_array_to_u8ptr(mask_buf_py); + int32_t abs_x = (int32_t)abs_x_val; + int32_t abs_y = (int32_t)abs_y_val; + int32_t len = (int32_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_mask_res_t _res; lvpy_lock(); - ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_draw_letter)(layer, dsc, point); + _res = ((lv_draw_sw_mask_res_t (*)(void *[], lv_opa_t *, int32_t, int32_t, int32_t))lv_draw_sw_mask_apply)(masks, mask_buf, abs_x, abs_y, len); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_letter_def = { - "lv_draw_letter", - (PyCFunction)py_lv_draw_letter, +static PyMethodDef py_lv_draw_sw_mask_apply_def = { + "lv_draw_sw_mask_apply", + (PyCFunction)py_lv_draw_sw_mask_apply, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66221,31 +78888,29 @@ static PyMethodDef py_lv_draw_letter_def = { /* * lvgl extension definition for: - * void lv_draw_image(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_sw_mask_free_param(void *p) */ -static PyObject *py_lv_draw_image(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_free_param(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } + void *p = mp_to_ptr(p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_image)(layer, dsc, coords); + ((void (*)(void *))lv_draw_sw_mask_free_param)(p); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_image_def = { - "lv_draw_image", - (PyCFunction)py_lv_draw_image, +static PyMethodDef py_lv_draw_sw_mask_free_param_def = { + "lv_draw_sw_mask_free_param", + (PyCFunction)py_lv_draw_sw_mask_free_param, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66253,31 +78918,28 @@ static PyMethodDef py_lv_draw_image_def = { /* * lvgl extension definition for: - * void lv_draw_layer(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_sw_mask_cleanup(void) */ -static PyObject *py_lv_draw_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_cleanup(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_layer)(layer, dsc, coords); + ((void (*)(void))lv_draw_sw_mask_cleanup)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_layer_def = { - "lv_draw_layer", - (PyCFunction)py_lv_draw_layer, +static PyMethodDef py_lv_draw_sw_mask_cleanup_def = { + "lv_draw_sw_mask_cleanup", + (PyCFunction)py_lv_draw_sw_mask_cleanup, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66285,30 +78947,28 @@ static PyMethodDef py_lv_draw_layer_def = { /* * lvgl extension definition for: - * void lv_draw_line(lv_layer_t *layer, const lv_draw_line_dsc_t *dsc) + * void lv_layout_init(void) */ -static PyObject *py_lv_draw_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_line_dsc_t *))lv_draw_line)(layer, dsc); + ((void (*)(void))lv_layout_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_line_def = { - "lv_draw_line", - (PyCFunction)py_lv_draw_line, +static PyMethodDef py_lv_layout_init_def = { + "lv_layout_init", + (PyCFunction)py_lv_layout_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66316,30 +78976,28 @@ static PyMethodDef py_lv_draw_line_def = { /* * lvgl extension definition for: - * void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc) + * void lv_layout_deinit(void) */ -static PyObject *py_lv_draw_arc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_arc_dsc_t *))lv_draw_arc)(layer, dsc); + ((void (*)(void))lv_layout_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_arc_def = { - "lv_draw_arc", - (PyCFunction)py_lv_draw_arc, +static PyMethodDef py_lv_layout_deinit_def = { + "lv_layout_deinit", + (PyCFunction)py_lv_layout_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66347,36 +79005,32 @@ static PyMethodDef py_lv_draw_arc_def = { /* * lvgl extension definition for: - * void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area) + * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) */ -static PyObject *py_lv_draw_arc_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_get_min_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long y_val; long radius_val; PyObject *start_angle_py; PyObject *end_angle_py; long w_val; long rounded_val; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "lllOOllO", &x_val, &y_val, &radius_val, &start_angle_py, &end_angle_py, &w_val, &rounded_val, &area_py)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; - uint16_t radius = (uint16_t)radius_val; - lv_value_precise_t start_angle = (float)mp_obj_get_float(start_angle_py); - lv_value_precise_t end_angle = (float)mp_obj_get_float(end_angle_py); - int32_t w = (int32_t)w_val; - bool rounded = (rounded_val != 0); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + PyObject *obj_py; PyObject *size_py; long width_val; + if (!PyArg_ParseTuple(py_args, "OOl", &obj_py, &size_py, &width_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + int32_t *size = mp_array_to_i32ptr(size_py); + bool width = (width_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(int32_t, int32_t, uint16_t, lv_value_precise_t, lv_value_precise_t, int32_t, bool, lv_area_t *))lv_draw_arc_get_area)(x, y, radius, start_angle, end_angle, w, rounded, area); + _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_layout_get_min_size)(obj, size, width); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_arc_get_area_def = { - "lv_draw_arc_get_area", - (PyCFunction)py_lv_draw_arc_get_area, +static PyMethodDef py_lv_layout_get_min_size_def = { + "lv_layout_get_min_size", + (PyCFunction)py_lv_layout_get_min_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66384,30 +79038,29 @@ static PyMethodDef py_lv_draw_arc_get_area_def = { /* * lvgl extension definition for: - * void lv_draw_triangle(lv_layer_t *layer, const lv_draw_triangle_dsc_t *draw_dsc) + * void lv_layout_apply(lv_obj_t *obj) */ -static PyObject *py_lv_draw_triangle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_triangle_dsc_t *draw_dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(draw_dsc_py); + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_triangle_dsc_t *))lv_draw_triangle)(layer, draw_dsc); + ((void (*)(lv_obj_t *))lv_layout_apply)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_triangle_def = { - "lv_draw_triangle", - (PyCFunction)py_lv_draw_triangle, +static PyMethodDef py_lv_layout_apply_def = { + "lv_layout_apply", + (PyCFunction)py_lv_layout_apply, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66415,31 +79068,28 @@ static PyMethodDef py_lv_draw_triangle_def = { /* * lvgl extension definition for: - * void lv_draw_blur(lv_layer_t *layer, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * void lv_group_init(void) */ -static PyObject *py_lv_draw_blur(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_blur)(layer, dsc, coords); + ((void (*)(void))lv_group_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_blur_def = { - "lv_draw_blur", - (PyCFunction)py_lv_draw_blur, +static PyMethodDef py_lv_group_init_def = { + "lv_group_init", + (PyCFunction)py_lv_group_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66447,9 +79097,9 @@ static PyMethodDef py_lv_draw_blur_def = { /* * lvgl extension definition for: - * lv_group_t *lv_group_create(void) + * void lv_group_deinit(void) */ -static PyObject *py_lv_group_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -66458,18 +79108,17 @@ static PyObject *py_lv_group_create(PyObject *self, PyObject *py_args, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; lvpy_lock(); - _res = ((lv_group_t *(*)(void))lv_group_create)(); + ((void (*)(void))lv_group_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_create_def = { - "lv_group_create", - (PyCFunction)py_lv_group_create, +static PyMethodDef py_lv_group_deinit_def = { + "lv_group_deinit", + (PyCFunction)py_lv_group_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66477,29 +79126,29 @@ static PyMethodDef py_lv_group_create_def = { /* * lvgl extension definition for: - * lv_group_t *lv_group_get_default(void) + * void lv_event_mark_deleted(void *target) */ -static PyObject *py_lv_group_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_mark_deleted(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *target_py; + if (!PyArg_ParseTuple(py_args, "O", &target_py)) { PyGILState_Release(gstate); return NULL; } + void *target = mp_to_ptr(target_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; lvpy_lock(); - _res = ((lv_group_t *(*)(void))lv_group_get_default)(); + ((void (*)(void *))lv_event_mark_deleted)(target); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_default_def = { - "lv_group_get_default", - (PyCFunction)py_lv_group_get_default, +static PyMethodDef py_lv_event_mark_deleted_def = { + "lv_event_mark_deleted", + (PyCFunction)py_lv_event_mark_deleted, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66507,30 +79156,28 @@ static PyMethodDef py_lv_group_get_default_def = { /* * lvgl extension definition for: - * void lv_group_swap_obj(lv_obj_t *obj1, lv_obj_t *obj2) + * void lv_subject_global_init(void) */ -static PyObject *py_lv_group_swap_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_global_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj1_py; PyObject *obj2_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj1_py, &obj2_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj1 = mp_to_lv(obj1_py); - lv_obj_t *obj2 = mp_to_lv(obj2_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_group_swap_obj)(obj1, obj2); + ((void (*)(void))lv_subject_global_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_swap_obj_def = { - "lv_group_swap_obj", - (PyCFunction)py_lv_group_swap_obj, +static PyMethodDef py_lv_subject_global_init_def = { + "lv_subject_global_init", + (PyCFunction)py_lv_subject_global_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66538,29 +79185,28 @@ static PyMethodDef py_lv_group_swap_obj_def = { /* * lvgl extension definition for: - * void lv_group_remove_obj(lv_obj_t *obj) + * void lv_subject_global_deinit(void) */ -static PyObject *py_lv_group_remove_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_global_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_group_remove_obj)(obj); + ((void (*)(void))lv_subject_global_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_remove_obj_def = { - "lv_group_remove_obj", - (PyCFunction)py_lv_group_remove_obj, +static PyMethodDef py_lv_subject_global_deinit_def = { + "lv_subject_global_deinit", + (PyCFunction)py_lv_subject_global_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66568,29 +79214,28 @@ static PyMethodDef py_lv_group_remove_obj_def = { /* * lvgl extension definition for: - * void lv_group_focus_obj(lv_obj_t *obj) + * void lv_refr_init(void) */ -static PyObject *py_lv_group_focus_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_group_focus_obj)(obj); + ((void (*)(void))lv_refr_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_focus_obj_def = { - "lv_group_focus_obj", - (PyCFunction)py_lv_group_focus_obj, +static PyMethodDef py_lv_refr_init_def = { + "lv_refr_init", + (PyCFunction)py_lv_refr_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66598,9 +79243,9 @@ static PyMethodDef py_lv_group_focus_obj_def = { /* * lvgl extension definition for: - * uint32_t lv_group_get_count(void) + * void lv_refr_deinit(void) */ -static PyObject *py_lv_group_get_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -66609,18 +79254,17 @@ static PyObject *py_lv_group_get_count(PyObject *self, PyObject *py_args, PyObje if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_group_get_count)(); + ((void (*)(void))lv_refr_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_count_def = { - "lv_group_get_count", - (PyCFunction)py_lv_group_get_count, +static PyMethodDef py_lv_refr_deinit_def = { + "lv_refr_deinit", + (PyCFunction)py_lv_refr_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66628,30 +79272,31 @@ static PyMethodDef py_lv_group_get_count_def = { /* * lvgl extension definition for: - * lv_group_t *lv_group_by_index(uint32_t index) + * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) */ -static PyObject *py_lv_group_by_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_inv_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t index = (uint32_t)index_val; + PyObject *disp_py; PyObject *area_p_py; + if (!PyArg_ParseTuple(py_args, "OO", &disp_py, &area_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_group_t *(*)(uint32_t))lv_group_by_index)(index); + _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_inv_area)(disp, area_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_group_by_index_def = { - "lv_group_by_index", - (PyCFunction)py_lv_group_by_index, +static PyMethodDef py_lv_inv_area_def = { + "lv_inv_area", + (PyCFunction)py_lv_inv_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66659,9 +79304,9 @@ static PyMethodDef py_lv_group_by_index_def = { /* * lvgl extension definition for: - * lv_indev_t *lv_indev_create(void) + * lv_display_t *lv_refr_get_disp_refreshing(void) */ -static PyObject *py_lv_indev_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_get_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -66670,18 +79315,18 @@ static PyObject *py_lv_indev_create(PyObject *self, PyObject *py_args, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_t * _res; + lv_display_t * _res; lvpy_lock(); - _res = ((lv_indev_t *(*)(void))lv_indev_create)(); + _res = ((lv_display_t *(*)(void))lv_refr_get_disp_refreshing)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_indev_t((void*)_res); + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_indev_create_def = { - "lv_indev_create", - (PyCFunction)py_lv_indev_create, +static PyMethodDef py_lv_refr_get_disp_refreshing_def = { + "lv_refr_get_disp_refreshing", + (PyCFunction)py_lv_refr_get_disp_refreshing, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66689,29 +79334,29 @@ static PyMethodDef py_lv_indev_create_def = { /* * lvgl extension definition for: - * void lv_indev_read_timer_cb(lv_timer_t *timer) + * void lv_refr_set_disp_refreshing(lv_display_t *disp) */ -static PyObject *py_lv_indev_read_timer_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_set_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *timer_py; - if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); + PyObject *disp_py; + if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_indev_read_timer_cb)(timer); + ((void (*)(lv_display_t *))lv_refr_set_disp_refreshing)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_read_timer_cb_def = { - "lv_indev_read_timer_cb", - (PyCFunction)py_lv_indev_read_timer_cb, +static PyMethodDef py_lv_refr_set_disp_refreshing_def = { + "lv_refr_set_disp_refreshing", + (PyCFunction)py_lv_refr_set_disp_refreshing, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66719,29 +79364,31 @@ static PyMethodDef py_lv_indev_read_timer_cb_def = { /* * lvgl extension definition for: - * lv_indev_t *lv_indev_active(void) + * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) */ -static PyObject *py_lv_indev_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_get_top_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *area_p_py; PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "OO", &area_p_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_t * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_indev_t *(*)(void))lv_indev_active)(); + _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_refr_get_top_obj)(area_p, obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_indev_t((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_indev_active_def = { - "lv_indev_active", - (PyCFunction)py_lv_indev_active, +static PyMethodDef py_lv_refr_get_top_obj_def = { + "lv_refr_get_top_obj", + (PyCFunction)py_lv_refr_get_top_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66749,29 +79396,33 @@ static PyMethodDef py_lv_indev_active_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_indev_get_active_obj(void) + * void lv_draw_sw_grad_color_calculate(const lv_grad_dsc_t *dsc, int32_t range, int32_t frac, lv_color_t *color_out, lv_opa_t *opa_out) */ -static PyObject *py_lv_indev_get_active_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_grad_color_calculate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dsc_py; long range_val; long frac_val; PyObject *color_out_py; PyObject *opa_out_py; + if (!PyArg_ParseTuple(py_args, "OllOO", &dsc_py, &range_val, &frac_val, &color_out_py, &opa_out_py)) { PyGILState_Release(gstate); return NULL; } + const lv_grad_dsc_t *dsc = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(dsc_py); + int32_t range = (int32_t)range_val; + int32_t frac = (int32_t)frac_val; + lv_color_t *color_out = mp_write_ptr_lv_color_t(color_out_py); + lv_opa_t *opa_out = mp_array_to_u8ptr(opa_out_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_indev_get_active_obj)(); + ((void (*)(const lv_grad_dsc_t *, int32_t, int32_t, lv_color_t *, lv_opa_t *))lv_draw_sw_grad_color_calculate)(dsc, range, frac, color_out, opa_out); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_active_obj_def = { - "lv_indev_get_active_obj", - (PyCFunction)py_lv_indev_get_active_obj, +static PyMethodDef py_lv_draw_sw_grad_color_calculate_def = { + "lv_draw_sw_grad_color_calculate", + (PyCFunction)py_lv_draw_sw_grad_color_calculate, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66779,31 +79430,32 @@ static PyMethodDef py_lv_indev_get_active_obj_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) + * lv_draw_sw_grad_calc_t *lv_draw_sw_grad_get(const lv_grad_dsc_t *gradient, int32_t w, int32_t h) */ -static PyObject *py_lv_indev_search_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_grad_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + PyObject *gradient_py; long w_val; long h_val; + if (!PyArg_ParseTuple(py_args, "Oll", &gradient_py, &w_val, &h_val)) { PyGILState_Release(gstate); return NULL; } + const lv_grad_dsc_t *gradient = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(gradient_py); + int32_t w = (int32_t)w_val; + int32_t h = (int32_t)h_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_draw_sw_grad_calc_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_indev_search_obj)(obj, point); + _res = ((lv_draw_sw_grad_calc_t *(*)(const lv_grad_dsc_t *, int32_t, int32_t))lv_draw_sw_grad_get)(gradient, w, h); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_draw_sw_grad_calc_t((void*)_res); } -static PyMethodDef py_lv_indev_search_obj_def = { - "lv_indev_search_obj", - (PyCFunction)py_lv_indev_search_obj, +static PyMethodDef py_lv_draw_sw_grad_get_def = { + "lv_draw_sw_grad_get", + (PyCFunction)py_lv_draw_sw_grad_get, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66811,29 +79463,28 @@ static PyMethodDef py_lv_indev_search_obj_def = { /* * lvgl extension definition for: - * void lv_refr_now(lv_display_t *disp) + * void lv_fs_init(void) */ -static PyObject *py_lv_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *disp_py; - if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_refr_now)(disp); + ((void (*)(void))lv_fs_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_now_def = { - "lv_refr_now", - (PyCFunction)py_lv_refr_now, +static PyMethodDef py_lv_fs_init_def = { + "lv_fs_init", + (PyCFunction)py_lv_fs_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66841,29 +79492,28 @@ static PyMethodDef py_lv_refr_now_def = { /* * lvgl extension definition for: - * void lv_display_refr_timer(lv_timer_t *timer) + * void lv_fs_deinit(void) */ -static PyObject *py_lv_display_refr_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *timer_py; - if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_display_refr_timer)(timer); + ((void (*)(void))lv_fs_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_refr_timer_def = { - "lv_display_refr_timer", - (PyCFunction)py_lv_display_refr_timer, +static PyMethodDef py_lv_fs_deinit_def = { + "lv_fs_deinit", + (PyCFunction)py_lv_fs_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66871,30 +79521,30 @@ static PyMethodDef py_lv_display_refr_timer_def = { /* * lvgl extension definition for: - * lv_font_t *lv_binfont_create(const char *path) + * void lv_indev_scroll_get_snap_dist(lv_obj_t *obj, lv_point_t *p) */ -static PyObject *py_lv_binfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_scroll_get_snap_dist(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); + PyObject *obj_py; PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &p_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_point_t *p = mp_write_ptr_lv_point_t(p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_font_t * _res; lvpy_lock(); - _res = ((lv_font_t *(*)(const char *))lv_binfont_create)(path); + ((void (*)(lv_obj_t *, lv_point_t *))lv_indev_scroll_get_snap_dist)(obj, p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_binfont_create_def = { - "lv_binfont_create", - (PyCFunction)py_lv_binfont_create, +static PyMethodDef py_lv_indev_scroll_get_snap_dist_def = { + "lv_indev_scroll_get_snap_dist", + (PyCFunction)py_lv_indev_scroll_get_snap_dist, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66902,31 +79552,31 @@ static PyMethodDef py_lv_binfont_create_def = { /* * lvgl extension definition for: - * lv_font_t *lv_binfont_create_from_buffer(void *buffer, uint32_t size) + * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_binfont_create_from_buffer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buffer_py; long size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buffer_py, &size_val)) { PyGILState_Release(gstate); return NULL; } - void *buffer = mp_to_ptr(buffer_py); - uint32_t size = (uint32_t)size_val; + long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_font_t * _res; + lv_circle_buf_t * _res; lvpy_lock(); - _res = ((lv_font_t *(*)(void *, uint32_t))lv_binfont_create_from_buffer)(buffer, size); + _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_circle_buf_create)(capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static PyMethodDef py_lv_binfont_create_from_buffer_def = { - "lv_binfont_create_from_buffer", - (PyCFunction)py_lv_binfont_create_from_buffer, +static PyMethodDef py_lv_circle_buf_create_def = { + "lv_circle_buf_create", + (PyCFunction)py_lv_circle_buf_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -66934,133 +79584,111 @@ static PyMethodDef py_lv_binfont_create_from_buffer_def = { /* * lvgl extension definition for: - * void lv_binfont_destroy(lv_font_t *font) + * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_binfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_create_from_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *font_py; - if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_t *font = mp_write_ptr_lv_font_t(font_py); + PyObject *buf_py; long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_circle_buf_t * _res; lvpy_lock(); - ((void (*)(lv_font_t *))lv_binfont_destroy)(font); + _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_circle_buf_create_from_buf)(buf, capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static PyMethodDef py_lv_binfont_destroy_def = { - "lv_binfont_destroy", - (PyCFunction)py_lv_binfont_destroy, +static PyMethodDef py_lv_circle_buf_create_from_buf_def = { + "lv_circle_buf_create_from_buf", + (PyCFunction)py_lv_circle_buf_create_from_buf, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_imgfont_create_path_cb (CPython) - * const void *lv_imgfont_get_path_cb_t(const lv_font_t *font, uint32_t unicode, uint32_t unicode_next, int32_t *offset_y, void *user_data) - */ -static const void * lv_imgfont_create_path_cb_callback(const lv_font_t *arg0, uint32_t arg1, uint32_t arg2, int32_t *arg3, void *arg4) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg4); - if (!callbacks) { PyGILState_Release(gstate); return NULL; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_imgfont_create_path_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return NULL; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); - PyObject *py_arg1 = mp_obj_new_int_from_uint(arg1); - PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); - PyObject *py_arg3 = mp_array_from_i32ptr((void*)arg3); - PyObject *py_arg4 = ptr_to_mp((void*)arg4); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3 && py_arg4) ? PyTuple_Pack(5, py_arg0, py_arg1, py_arg2, py_arg3, py_arg4) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - Py_XDECREF(py_arg3); - Py_XDECREF(py_arg4); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return NULL; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return NULL; } - const void * _c_res = mp_to_ptr(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * lvgl extension definition for: - * lv_font_t *lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void *user_data) + * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) */ -static PyObject *py_lv_imgfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_create_from_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long height_val; PyObject *path_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "lOO", &height_val, &path_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - uint16_t height = (uint16_t)height_val; - void *path_cb = mp_lv_callback(path_cb_py, &lv_imgfont_create_path_cb_callback, "lv_imgfont_create_path_cb", &user_data, NULL, (NULL), (NULL)); + PyObject *array_py; + if (!PyArg_ParseTuple(py_args, "O", &array_py)) { PyGILState_Release(gstate); return NULL; } + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(array_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_font_t * _res; + lv_circle_buf_t * _res; lvpy_lock(); - _res = ((lv_font_t *(*)(uint16_t, lv_imgfont_get_path_cb_t, void *))lv_imgfont_create)(height, path_cb, user_data); + _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_circle_buf_create_from_array)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static PyMethodDef py_lv_imgfont_create_def = { - "lv_imgfont_create", - (PyCFunction)py_lv_imgfont_create, +static PyMethodDef py_lv_circle_buf_create_from_array_def = { + "lv_circle_buf_create_from_array", + (PyCFunction)py_lv_circle_buf_create_from_array, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * lv_lru_free_cb_t value_free + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * lv_lru_free_cb_t key_free + */ + + /* * lvgl extension definition for: - * void lv_imgfont_destroy(lv_font_t *font) + * lv_lru_t *lv_lru_create(size_t cache_size, size_t average_length, lv_lru_free_cb_t value_free, lv_lru_free_cb_t key_free) */ -static PyObject *py_lv_imgfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lru_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *font_py; - if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_t *font = mp_write_ptr_lv_font_t(font_py); + long cache_size_val; long average_length_val; PyObject *value_free_py; PyObject *key_free_py; + if (!PyArg_ParseTuple(py_args, "llOO", &cache_size_val, &average_length_val, &value_free_py, &key_free_py)) { PyGILState_Release(gstate); return NULL; } + size_t cache_size = (size_t)cache_size_val; + size_t average_length = (size_t)average_length_val; + void *value_free = NULL; + void *key_free = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_lru_t * _res; lvpy_lock(); - ((void (*)(lv_font_t *))lv_imgfont_destroy)(font); + _res = ((lv_lru_t *(*)(size_t, size_t, lv_lru_free_cb_t, lv_lru_free_cb_t))lv_lru_create)(cache_size, average_length, value_free, key_free); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_lru_t((void*)_res); } -static PyMethodDef py_lv_imgfont_destroy_def = { - "lv_imgfont_destroy", - (PyCFunction)py_lv_imgfont_destroy, +static PyMethodDef py_lv_lru_create_def = { + "lv_lru_create", + (PyCFunction)py_lv_lru_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67068,28 +79696,31 @@ static PyMethodDef py_lv_imgfont_destroy_def = { /* * lvgl extension definition for: - * void lv_span_stack_init(void) + * lv_pending_t *lv_pending_create(size_t obj_size, uint32_t capacity_default) */ -static PyObject *py_lv_span_stack_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pending_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long obj_size_val; long capacity_default_val; + if (!PyArg_ParseTuple(py_args, "ll", &obj_size_val, &capacity_default_val)) { PyGILState_Release(gstate); return NULL; } + size_t obj_size = (size_t)obj_size_val; + uint32_t capacity_default = (uint32_t)capacity_default_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_pending_t * _res; lvpy_lock(); - ((void (*)(void))lv_span_stack_init)(); + _res = ((lv_pending_t *(*)(size_t, uint32_t))lv_pending_create)(obj_size, capacity_default); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_pending_t((void*)_res); } -static PyMethodDef py_lv_span_stack_init_def = { - "lv_span_stack_init", - (PyCFunction)py_lv_span_stack_init, +static PyMethodDef py_lv_pending_create_def = { + "lv_pending_create", + (PyCFunction)py_lv_pending_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67097,28 +79728,32 @@ static PyMethodDef py_lv_span_stack_init_def = { /* * lvgl extension definition for: - * void lv_span_stack_deinit(void) + * void lv_text_get_size_attributes(lv_point_t *size_res, const char *text, const lv_font_t *font, lv_text_attributes_t *attributes) */ -static PyObject *py_lv_span_stack_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_size_attributes(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *size_res_py; PyObject *text_py; PyObject *font_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &size_res_py, &text_py, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); + const char *text = (const char *)(char*)convert_from_str(text_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_span_stack_deinit)(); + ((void (*)(lv_point_t *, const char *, const lv_font_t *, lv_text_attributes_t *))lv_text_get_size_attributes)(size_res, text, font, attributes); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_span_stack_deinit_def = { - "lv_span_stack_deinit", - (PyCFunction)py_lv_span_stack_deinit, +static PyMethodDef py_lv_text_get_size_attributes_def = { + "lv_text_get_size_attributes", + (PyCFunction)py_lv_text_get_size_attributes, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67126,28 +79761,33 @@ static PyMethodDef py_lv_span_stack_deinit_def = { /* * lvgl extension definition for: - * void lv_bin_decoder_init(void) + * int32_t lv_text_get_width(const char *txt, uint32_t length, const lv_font_t *font, const lv_text_attributes_t *attributes) */ -static PyObject *py_lv_bin_decoder_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *txt_py; long length_val; PyObject *font_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OlOO", &txt_py, &length_val, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t length = (uint32_t)length_val; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + const lv_text_attributes_t *attributes = (const lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(void))lv_bin_decoder_init)(); + _res = ((int32_t (*)(const char *, uint32_t, const lv_font_t *, const lv_text_attributes_t *))lv_text_get_width)(txt, length, font, attributes); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_bin_decoder_init_def = { - "lv_bin_decoder_init", - (PyCFunction)py_lv_bin_decoder_init, +static PyMethodDef py_lv_text_get_width_def = { + "lv_text_get_width", + (PyCFunction)py_lv_text_get_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67155,32 +79795,33 @@ static PyMethodDef py_lv_bin_decoder_init_def = { /* * lvgl extension definition for: - * lv_result_t lv_bin_decoder_info(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) + * int32_t lv_text_get_line_width(const char *txt, uint32_t length, const lv_font_t *font, const lv_text_attributes_t *attributes) */ -static PyObject *py_lv_bin_decoder_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_line_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; PyObject *header_py; - if (!PyArg_ParseTuple(py_args, "OOO", &decoder_py, &dsc_py, &header_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); - lv_image_header_t *header = mp_write_ptr_lv_image_header_t(header_py); + PyObject *txt_py; long length_val; PyObject *font_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OlOO", &txt_py, &length_val, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t length = (uint32_t)length_val; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + const lv_text_attributes_t *attributes = (const lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, lv_image_header_t *))lv_bin_decoder_info)(decoder, dsc, header); + _res = ((int32_t (*)(const char *, uint32_t, const lv_font_t *, const lv_text_attributes_t *))lv_text_get_line_width)(txt, length, font, attributes); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_bin_decoder_info_def = { - "lv_bin_decoder_info", - (PyCFunction)py_lv_bin_decoder_info, +static PyMethodDef py_lv_text_get_line_width_def = { + "lv_text_get_line_width", + (PyCFunction)py_lv_text_get_line_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67188,33 +79829,31 @@ static PyMethodDef py_lv_bin_decoder_info_def = { /* * lvgl extension definition for: - * lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + * bool lv_text_is_cmd(lv_text_cmd_state_t *state, uint32_t c) */ -static PyObject *py_lv_bin_decoder_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_is_cmd(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; PyObject *full_area_py; PyObject *decoded_area_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &decoder_py, &dsc_py, &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); - const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); - lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); + PyObject *state_py; long c_val; + if (!PyArg_ParseTuple(py_args, "Ol", &state_py, &c_val)) { PyGILState_Release(gstate); return NULL; } + lv_text_cmd_state_t *state = mp_to_ptr(state_py); + uint32_t c = (uint32_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + bool _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_bin_decoder_get_area)(decoder, dsc, full_area, decoded_area); + _res = ((bool (*)(lv_text_cmd_state_t *, uint32_t))lv_text_is_cmd)(state, c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_bin_decoder_get_area_def = { - "lv_bin_decoder_get_area", - (PyCFunction)py_lv_bin_decoder_get_area, +static PyMethodDef py_lv_text_is_cmd_def = { + "lv_text_is_cmd", + (PyCFunction)py_lv_text_is_cmd, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67222,31 +79861,34 @@ static PyMethodDef py_lv_bin_decoder_get_area_def = { /* * lvgl extension definition for: - * lv_result_t lv_bin_decoder_open(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + * uint32_t lv_text_get_next_line(const char *txt, uint32_t len, const lv_font_t *font, int32_t *used_width, lv_text_attributes_t *attributes) */ -static PyObject *py_lv_bin_decoder_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_next_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + PyObject *txt_py; long len_val; PyObject *font_py; PyObject *used_width_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OlOOO", &txt_py, &len_val, &font_py, &used_width_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t len = (uint32_t)len_val; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + int32_t *used_width = mp_array_to_i32ptr(used_width_py); + lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_open)(decoder, dsc); + _res = ((uint32_t (*)(const char *, uint32_t, const lv_font_t *, int32_t *, lv_text_attributes_t *))lv_text_get_next_line)(txt, len, font, used_width, attributes); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_bin_decoder_open_def = { - "lv_bin_decoder_open", - (PyCFunction)py_lv_bin_decoder_open, +static PyMethodDef py_lv_text_get_next_line_def = { + "lv_text_get_next_line", + (PyCFunction)py_lv_text_get_next_line, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67254,30 +79896,31 @@ static PyMethodDef py_lv_bin_decoder_open_def = { /* * lvgl extension definition for: - * void lv_bin_decoder_close(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + * void lv_text_ins(char *txt_buf, uint32_t pos, const char *ins_txt) */ -static PyObject *py_lv_bin_decoder_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_ins(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + PyObject *txt_buf_py; long pos_val; PyObject *ins_txt_py; + if (!PyArg_ParseTuple(py_args, "OlO", &txt_buf_py, &pos_val, &ins_txt_py)) { PyGILState_Release(gstate); return NULL; } + char *txt_buf = (char*)convert_from_str(txt_buf_py); + uint32_t pos = (uint32_t)pos_val; + const char *ins_txt = (const char *)(char*)convert_from_str(ins_txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_close)(decoder, dsc); + ((void (*)(char *, uint32_t, const char *))lv_text_ins)(txt_buf, pos, ins_txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_bin_decoder_close_def = { - "lv_bin_decoder_close", - (PyCFunction)py_lv_bin_decoder_close, +static PyMethodDef py_lv_text_ins_def = { + "lv_text_ins", + (PyCFunction)py_lv_text_ins, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67285,28 +79928,31 @@ static PyMethodDef py_lv_bin_decoder_close_def = { /* * lvgl extension definition for: - * void lv_fs_memfs_init(void) + * void lv_text_cut(char *txt, uint32_t pos, uint32_t len) */ -static PyObject *py_lv_fs_memfs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_cut(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *txt_py; long pos_val; long len_val; + if (!PyArg_ParseTuple(py_args, "Oll", &txt_py, &pos_val, &len_val)) { PyGILState_Release(gstate); return NULL; } + char *txt = (char*)convert_from_str(txt_py); + uint32_t pos = (uint32_t)pos_val; + uint32_t len = (uint32_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_fs_memfs_init)(); + ((void (*)(char *, uint32_t, uint32_t))lv_text_cut)(txt, pos, len); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_memfs_init_def = { - "lv_fs_memfs_init", - (PyCFunction)py_lv_fs_memfs_init, +static PyMethodDef py_lv_text_cut_def = { + "lv_text_cut", + (PyCFunction)py_lv_text_cut, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67314,28 +79960,32 @@ static PyMethodDef py_lv_fs_memfs_init_def = { /* * lvgl extension definition for: - * void lv_lodepng_init(void) + * void lv_text_encoded_letter_next_2(const char *txt, uint32_t *letter, uint32_t *letter_next, uint32_t *ofs) */ -static PyObject *py_lv_lodepng_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_encoded_letter_next_2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *txt_py; PyObject *letter_py; PyObject *letter_next_py; PyObject *ofs_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &txt_py, &letter_py, &letter_next_py, &ofs_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t *letter = mp_array_to_u32ptr(letter_py); + uint32_t *letter_next = mp_array_to_u32ptr(letter_next_py); + uint32_t *ofs = mp_array_to_u32ptr(ofs_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_lodepng_init)(); + ((void (*)(const char *, uint32_t *, uint32_t *, uint32_t *))lv_text_encoded_letter_next_2)(txt, letter, letter_next, ofs); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_lodepng_init_def = { - "lv_lodepng_init", - (PyCFunction)py_lv_lodepng_init, +static PyMethodDef py_lv_text_encoded_letter_next_2_def = { + "lv_text_encoded_letter_next_2", + (PyCFunction)py_lv_text_encoded_letter_next_2, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67343,65 +79993,77 @@ static PyMethodDef py_lv_lodepng_init_def = { /* * lvgl extension definition for: - * void lv_lodepng_deinit(void) + * void lv_text_get_size_internal(lv_point_t *size_res, const char *text, const lv_font_t *font, int32_t letter_space, int32_t line_space, int32_t max_width, lv_text_flag_t flag) */ -static PyObject *py_lv_lodepng_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_size_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *size_res_py; PyObject *text_py; PyObject *font_py; long letter_space_val; long line_space_val; long max_width_val; PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "OOOlllO", &size_res_py, &text_py, &font_py, &letter_space_val, &line_space_val, &max_width_val, &flag_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); + const char *text = (const char *)(char*)convert_from_str(text_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + int32_t letter_space = (int32_t)letter_space_val; + int32_t line_space = (int32_t)line_space_val; + int32_t max_width = (int32_t)max_width_val; + lv_text_flag_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_lodepng_deinit)(); + ((void (*)(lv_point_t *, const char *, const lv_font_t *, int32_t, int32_t, int32_t, lv_text_flag_t))lv_text_get_size_internal)(size_res, text, font, letter_space, line_space, max_width, flag); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_lodepng_deinit_def = { - "lv_lodepng_deinit", - (PyCFunction)py_lv_lodepng_deinit, +static PyMethodDef py_lv_text_get_size_internal_def = { + "lv_text_get_size_internal", + (PyCFunction)py_lv_text_get_size_internal, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! int cmp(const void *pRef, const void *pElement) + * int (*cmp)(const void *pRef, const void *pElement) + */ + + /* * lvgl extension definition for: - * void lv_draw_sw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) + * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) */ -static PyObject *py_lv_draw_sw_i1_to_argb8888(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_utils_bsearch(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_i1_py; PyObject *buf_argb8888_py; long width_val; long height_val; long buf_i1_stride_val; long buf_argb8888_stride_val; long index0_color_val; long index1_color_val; - if (!PyArg_ParseTuple(py_args, "OOllllll", &buf_i1_py, &buf_argb8888_py, &width_val, &height_val, &buf_i1_stride_val, &buf_argb8888_stride_val, &index0_color_val, &index1_color_val)) { PyGILState_Release(gstate); return NULL; } - const void *buf_i1 = (const void *)mp_to_ptr(buf_i1_py); - void *buf_argb8888 = mp_to_ptr(buf_argb8888_py); - uint32_t width = (uint32_t)width_val; - uint32_t height = (uint32_t)height_val; - uint32_t buf_i1_stride = (uint32_t)buf_i1_stride_val; - uint32_t buf_argb8888_stride = (uint32_t)buf_argb8888_stride_val; - uint32_t index0_color = (uint32_t)index0_color_val; - uint32_t index1_color = (uint32_t)index1_color_val; + PyObject *key_py; PyObject *base_py; long n_val; long size_val; PyObject *cmp_py; + if (!PyArg_ParseTuple(py_args, "OOllO", &key_py, &base_py, &n_val, &size_val, &cmp_py)) { PyGILState_Release(gstate); return NULL; } + const void *key = (const void *)mp_to_ptr(key_py); + const void *base = (const void *)mp_to_ptr(base_py); + size_t n = (size_t)n_val; + size_t size = (size_t)size_val; + void *cmp = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_draw_sw_i1_to_argb8888)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); + _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_utils_bsearch)(key, base, n, size, cmp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_sw_i1_to_argb8888_def = { - "lv_draw_sw_i1_to_argb8888", - (PyCFunction)py_lv_draw_sw_i1_to_argb8888, +static PyMethodDef py_lv_utils_bsearch_def = { + "lv_utils_bsearch", + (PyCFunction)py_lv_utils_bsearch, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67409,30 +80071,31 @@ static PyMethodDef py_lv_draw_sw_i1_to_argb8888_def = { /* * lvgl extension definition for: - * void lv_draw_sw_rgb565_swap(void *buf, uint32_t buf_size_px) + * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) */ -static PyObject *py_lv_draw_sw_rgb565_swap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_is_in_range_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_px_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_px_val)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size_px = (uint32_t)buf_size_px_val; + PyObject *l_color_py; PyObject *h_color_py; + if (!PyArg_ParseTuple(py_args, "OO", &l_color_py, &h_color_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + lv_color_t l_color = mp_write_lv_color_t(l_color_py); + lv_color_t h_color = mp_write_lv_color_t(h_color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(void *, uint32_t))lv_draw_sw_rgb565_swap)(buf, buf_size_px); + _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_color_is_in_range)(color, l_color, h_color); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_rgb565_swap_def = { - "lv_draw_sw_rgb565_swap", - (PyCFunction)py_lv_draw_sw_rgb565_swap, +static PyMethodDef py_lv_color_is_in_range_struct_method_def = { + "lv_color_is_in_range", + (PyCFunction)py_lv_color_is_in_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67440,30 +80103,30 @@ static PyMethodDef py_lv_draw_sw_rgb565_swap_def = { /* * lvgl extension definition for: - * void lv_draw_sw_i1_invert(void *buf, uint32_t buf_size) + * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) */ -static PyObject *py_lv_draw_sw_i1_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; + long opa_val; + if (!PyArg_ParseTuple(py_args, "l", &opa_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + lv_opa_t opa = (lv_opa_t)opa_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(void *, uint32_t))lv_draw_sw_i1_invert)(buf, buf_size); + _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_color_to_32)(color, opa); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_draw_sw_i1_invert_def = { - "lv_draw_sw_i1_invert", - (PyCFunction)py_lv_draw_sw_i1_invert, +static PyMethodDef py_lv_color_to_32_struct_method_def = { + "lv_color_to_32", + (PyCFunction)py_lv_color_to_32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67471,35 +80134,28 @@ static PyMethodDef py_lv_draw_sw_i1_invert_def = { /* * lvgl extension definition for: - * void lv_draw_sw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) + * uint32_t lv_color_to_int(lv_color_t c) */ -static PyObject *py_lv_draw_sw_i1_convert_to_vtiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_val; long width_val; long height_val; PyObject *out_buf_py; long out_buf_size_val; long bit_order_lsb_val; - if (!PyArg_ParseTuple(py_args, "OlllOll", &buf_py, &buf_size_val, &width_val, &height_val, &out_buf_py, &out_buf_size_val, &bit_order_lsb_val)) { PyGILState_Release(gstate); return NULL; } - const void *buf = (const void *)mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; - uint32_t width = (uint32_t)width_val; - uint32_t height = (uint32_t)height_val; - void *out_buf = mp_to_ptr(out_buf_py); - uint32_t out_buf_size = (uint32_t)out_buf_size_val; - bool bit_order_lsb = (bit_order_lsb_val != 0); + + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_draw_sw_i1_convert_to_vtiled)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); + _res = ((uint32_t (*)(lv_color_t))lv_color_to_int)(c); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_i1_convert_to_vtiled_def = { - "lv_draw_sw_i1_convert_to_vtiled", - (PyCFunction)py_lv_draw_sw_i1_convert_to_vtiled, +static PyMethodDef py_lv_color_to_int_struct_method_def = { + "lv_color_to_int", + (PyCFunction)py_lv_color_to_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67507,36 +80163,30 @@ static PyMethodDef py_lv_draw_sw_i1_convert_to_vtiled_def = { /* * lvgl extension definition for: - * void lv_draw_sw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) + * bool lv_color_eq(lv_color_t c1, lv_color_t c2) */ -static PyObject *py_lv_draw_sw_rotate(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *src_py; PyObject *dest_py; long src_width_val; long src_height_val; long src_stride_val; long dest_stride_val; PyObject *rotation_py; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "OOllllOO", &src_py, &dest_py, &src_width_val, &src_height_val, &src_stride_val, &dest_stride_val, &rotation_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - const void *src = (const void *)mp_to_ptr(src_py); - void *dest = mp_to_ptr(dest_py); - int32_t src_width = (int32_t)src_width_val; - int32_t src_height = (int32_t)src_height_val; - int32_t src_stride = (int32_t)src_stride_val; - int32_t dest_stride = (int32_t)dest_stride_val; - lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + PyObject *c2_py; + if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } + lv_color_t c2 = mp_write_lv_color_t(c2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_draw_sw_rotate)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); + _res = ((bool (*)(lv_color_t, lv_color_t))lv_color_eq)(c1, c2); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_rotate_def = { - "lv_draw_sw_rotate", - (PyCFunction)py_lv_draw_sw_rotate, +static PyMethodDef py_lv_color_eq_struct_method_def = { + "lv_color_eq", + (PyCFunction)py_lv_color_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67544,31 +80194,28 @@ static PyMethodDef py_lv_draw_sw_rotate_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) + * uint16_t lv_color_to_u16(lv_color_t color) */ -static PyObject *py_lv_snapshot_take(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_u16_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + uint16_t _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_take)(obj, cf); + _res = ((uint16_t (*)(lv_color_t))lv_color_to_u16)(color); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_snapshot_take_def = { - "lv_snapshot_take", - (PyCFunction)py_lv_snapshot_take, +static PyMethodDef py_lv_color_to_u16_struct_method_def = { + "lv_color_to_u16", + (PyCFunction)py_lv_color_to_u16_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67576,31 +80223,28 @@ static PyMethodDef py_lv_snapshot_take_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_snapshot_create_draw_buf(lv_obj_t *obj, lv_color_format_t cf) + * uint32_t lv_color_to_u32(lv_color_t color) */ -static PyObject *py_lv_snapshot_create_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_u32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_create_draw_buf)(obj, cf); + _res = ((uint32_t (*)(lv_color_t))lv_color_to_u32)(color); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_snapshot_create_draw_buf_def = { - "lv_snapshot_create_draw_buf", - (PyCFunction)py_lv_snapshot_create_draw_buf, +static PyMethodDef py_lv_color_to_u32_struct_method_def = { + "lv_color_to_u32", + (PyCFunction)py_lv_color_to_u32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67608,31 +80252,30 @@ static PyMethodDef py_lv_snapshot_create_draw_buf_def = { /* * lvgl extension definition for: - * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) + * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) */ -static PyObject *py_lv_snapshot_reshape_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_lighten_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); + long lvl_val; + if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + lv_opa_t lvl = (lv_opa_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_snapshot_reshape_draw_buf)(obj, draw_buf); + _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_lighten)(c, lvl); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_snapshot_reshape_draw_buf_def = { - "lv_snapshot_reshape_draw_buf", - (PyCFunction)py_lv_snapshot_reshape_draw_buf, +static PyMethodDef py_lv_color_lighten_struct_method_def = { + "lv_color_lighten", + (PyCFunction)py_lv_color_lighten_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67640,32 +80283,30 @@ static PyMethodDef py_lv_snapshot_reshape_draw_buf_def = { /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) + * lv_color_t lv_color_darken(lv_color_t c, lv_opa_t lvl) */ -static PyObject *py_lv_snapshot_take_to_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_darken_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "OOO", &obj_py, &cf_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); + long lvl_val; + if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + lv_opa_t lvl = (lv_opa_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_snapshot_take_to_draw_buf)(obj, cf, draw_buf); + _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_darken)(c, lvl); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_snapshot_take_to_draw_buf_def = { - "lv_snapshot_take_to_draw_buf", - (PyCFunction)py_lv_snapshot_take_to_draw_buf, +static PyMethodDef py_lv_color_darken_struct_method_def = { + "lv_color_darken", + (PyCFunction)py_lv_color_darken_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67673,29 +80314,28 @@ static PyMethodDef py_lv_snapshot_take_to_draw_buf_def = { /* * lvgl extension definition for: - * void lv_snapshot_free(lv_image_dsc_t *dsc) + * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) */ -static PyObject *py_lv_snapshot_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_hsv_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); + + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_hsv_t _res; lvpy_lock(); - ((void (*)(lv_image_dsc_t *))lv_snapshot_free)(dsc); + _res = ((lv_color_hsv_t (*)(lv_color_t))lv_color_to_hsv)(color); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_hsv_t(_res); } -static PyMethodDef py_lv_snapshot_free_def = { - "lv_snapshot_free", - (PyCFunction)py_lv_snapshot_free, +static PyMethodDef py_lv_color_to_hsv_struct_method_def = { + "lv_color_to_hsv", + (PyCFunction)py_lv_color_to_hsv_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67703,34 +80343,28 @@ static PyMethodDef py_lv_snapshot_free_def = { /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) + * uint8_t lv_color_luminance(lv_color_t c) */ -static PyObject *py_lv_snapshot_take_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; PyObject *dsc_py; PyObject *buf_py; long buf_size_val; - if (!PyArg_ParseTuple(py_args, "OOOOl", &obj_py, &cf_py, &dsc_py, &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; + + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint8_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_snapshot_take_to_buf)(obj, cf, dsc, buf, buf_size); + _res = ((uint8_t (*)(lv_color_t))lv_color_luminance)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_snapshot_take_to_buf_def = { - "lv_snapshot_take_to_buf", - (PyCFunction)py_lv_snapshot_take_to_buf, +static PyMethodDef py_lv_color_luminance_struct_method_def = { + "lv_color_luminance", + (PyCFunction)py_lv_color_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67738,29 +80372,31 @@ static PyMethodDef py_lv_snapshot_take_to_buf_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_create(void) + * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) */ -static PyObject *py_lv_theme_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *c2_py; long mix_val; + if (!PyArg_ParseTuple(py_args, "Ol", &c2_py, &mix_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } + lv_color_t c2 = mp_write_lv_color_t(c2_py); + uint8_t mix = (uint8_t)mix_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(void))lv_theme_create)(); + _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_color_mix)(c1, c2, mix); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_theme_create_def = { - "lv_theme_create", - (PyCFunction)py_lv_theme_create, +static PyMethodDef py_lv_color_mix_struct_method_def = { + "lv_color_mix", + (PyCFunction)py_lv_color_mix_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67768,60 +80404,78 @@ static PyMethodDef py_lv_theme_create_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) + * uint8_t lv_color_brightness(lv_color_t c) */ -static PyObject *py_lv_theme_get_from_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_brightness_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; + uint8_t _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(lv_obj_t *))lv_theme_get_from_obj)(obj); + _res = ((uint8_t (*)(lv_color_t))lv_color_brightness)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_theme_get_from_obj_def = { - "lv_theme_get_from_obj", - (PyCFunction)py_lv_theme_get_from_obj, +static PyMethodDef py_lv_color_brightness_struct_method_def = { + "lv_color_brightness", + (PyCFunction)py_lv_color_brightness_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_color_t_methods[] = { + {"is_in_range", (PyCFunction)py_lv_color_is_in_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_32", (PyCFunction)py_lv_color_to_32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_int", (PyCFunction)py_lv_color_to_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"eq", (PyCFunction)py_lv_color_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_u16", (PyCFunction)py_lv_color_to_u16_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_u32", (PyCFunction)py_lv_color_to_u32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"lighten", (PyCFunction)py_lv_color_lighten_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"darken", (PyCFunction)py_lv_color_darken_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_hsv", (PyCFunction)py_lv_color_to_hsv_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"luminance", (PyCFunction)py_lv_color_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"mix", (PyCFunction)py_lv_color_mix_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"brightness", (PyCFunction)py_lv_color_brightness_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_theme_apply(lv_obj_t *obj) + * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) */ -static PyObject *py_lv_theme_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_init_stops_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *colors_py; PyObject *opa_py; PyObject *fracs_py; long num_stops_val; + if (!PyArg_ParseTuple(py_args, "OOOl", &colors_py, &opa_py, &fracs_py, &num_stops_val)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *grad = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + const lv_color_t *colors = (const lv_color_t *)lvpy_struct_arr_arg(self, colors_py, "lv_grad_init_stops:colors", sizeof(lv_color_t), mp_write_value_ptr_lv_color_t); + const lv_opa_t *opa = (const lv_opa_t *)mp_to_ptr(opa_py); + const uint8_t *fracs = (const uint8_t *)mp_to_ptr(fracs_py); + int num_stops = (int)num_stops_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_theme_apply)(obj); + ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_grad_init_stops)(grad, colors, opa, fracs, num_stops); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_apply_def = { - "lv_theme_apply", - (PyCFunction)py_lv_theme_apply, +static PyMethodDef py_lv_grad_init_stops_struct_method_def = { + "lv_grad_init_stops", + (PyCFunction)py_lv_grad_init_stops_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67829,30 +80483,27 @@ static PyMethodDef py_lv_theme_apply_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) + * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) */ -static PyObject *py_lv_theme_get_font_small(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_horizontal_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_small)(obj); + ((void (*)(lv_grad_dsc_t *))lv_grad_horizontal_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_font_small_def = { - "lv_theme_get_font_small", - (PyCFunction)py_lv_theme_get_font_small, +static PyMethodDef py_lv_grad_horizontal_init_struct_method_def = { + "lv_grad_horizontal_init", + (PyCFunction)py_lv_grad_horizontal_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67860,30 +80511,27 @@ static PyMethodDef py_lv_theme_get_font_small_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_normal(lv_obj_t *obj) + * void lv_grad_vertical_init(lv_grad_dsc_t *dsc) */ -static PyObject *py_lv_theme_get_font_normal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_vertical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_normal)(obj); + ((void (*)(lv_grad_dsc_t *))lv_grad_vertical_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_font_normal_def = { - "lv_theme_get_font_normal", - (PyCFunction)py_lv_theme_get_font_normal, +static PyMethodDef py_lv_grad_vertical_init_struct_method_def = { + "lv_grad_vertical_init", + (PyCFunction)py_lv_grad_vertical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67891,30 +80539,33 @@ static PyMethodDef py_lv_theme_get_font_normal_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_large(lv_obj_t *obj) + * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) */ -static PyObject *py_lv_theme_get_font_large(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_linear_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + long from_x_val; long from_y_val; long to_x_val; long to_y_val; PyObject *extend_py; + if (!PyArg_ParseTuple(py_args, "llllO", &from_x_val, &from_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t from_x = (int32_t)from_x_val; + int32_t from_y = (int32_t)from_y_val; + int32_t to_x = (int32_t)to_x_val; + int32_t to_y = (int32_t)to_y_val; + lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_large)(obj); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_linear_init)(dsc, from_x, from_y, to_x, to_y, extend); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_font_large_def = { - "lv_theme_get_font_large", - (PyCFunction)py_lv_theme_get_font_large, +static PyMethodDef py_lv_grad_linear_init_struct_method_def = { + "lv_grad_linear_init", + (PyCFunction)py_lv_grad_linear_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67922,30 +80573,33 @@ static PyMethodDef py_lv_theme_get_font_large_def = { /* * lvgl extension definition for: - * lv_color_t lv_theme_get_color_primary(lv_obj_t *obj) + * void lv_grad_radial_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) */ -static PyObject *py_lv_theme_get_color_primary(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_radial_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + long center_x_val; long center_y_val; long to_x_val; long to_y_val; PyObject *extend_py; + if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t center_x = (int32_t)center_x_val; + int32_t center_y = (int32_t)center_y_val; + int32_t to_x = (int32_t)to_x_val; + int32_t to_y = (int32_t)to_y_val; + lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_primary)(obj); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_radial_init)(dsc, center_x, center_y, to_x, to_y, extend); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_color_primary_def = { - "lv_theme_get_color_primary", - (PyCFunction)py_lv_theme_get_color_primary, +static PyMethodDef py_lv_grad_radial_init_struct_method_def = { + "lv_grad_radial_init", + (PyCFunction)py_lv_grad_radial_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67953,30 +80607,31 @@ static PyMethodDef py_lv_theme_get_color_primary_def = { /* * lvgl extension definition for: - * lv_color_t lv_theme_get_color_secondary(lv_obj_t *obj) + * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) */ -static PyObject *py_lv_theme_get_color_secondary(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_radial_set_focal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + long center_x_val; long center_y_val; long radius_val; + if (!PyArg_ParseTuple(py_args, "lll", ¢er_x_val, ¢er_y_val, &radius_val)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t center_x = (int32_t)center_x_val; + int32_t center_y = (int32_t)center_y_val; + int32_t radius = (int32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_secondary)(obj); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_grad_radial_set_focal)(dsc, center_x, center_y, radius); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_color_secondary_def = { - "lv_theme_get_color_secondary", - (PyCFunction)py_lv_theme_get_color_secondary, +static PyMethodDef py_lv_grad_radial_set_focal_struct_method_def = { + "lv_grad_radial_set_focal", + (PyCFunction)py_lv_grad_radial_set_focal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -67984,64 +80639,82 @@ static PyMethodDef py_lv_theme_get_color_secondary_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) + * void lv_grad_conical_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t start_angle, int32_t end_angle, lv_grad_extend_t extend) */ -static PyObject *py_lv_theme_default_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_conical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *disp_py; PyObject *color_primary_py; PyObject *color_secondary_py; long dark_val; PyObject *font_py; - if (!PyArg_ParseTuple(py_args, "OOOlO", &disp_py, &color_primary_py, &color_secondary_py, &dark_val, &font_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); - lv_color_t color_primary = mp_write_lv_color_t(color_primary_py); - lv_color_t color_secondary = mp_write_lv_color_t(color_secondary_py); - bool dark = (dark_val != 0); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + long center_x_val; long center_y_val; long start_angle_val; long end_angle_val; PyObject *extend_py; + if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &start_angle_val, &end_angle_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t center_x = (int32_t)center_x_val; + int32_t center_y = (int32_t)center_y_val; + int32_t start_angle = (int32_t)start_angle_val; + int32_t end_angle = (int32_t)end_angle_val; + lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_theme_default_init)(disp, color_primary, color_secondary, dark, font); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_conical_init)(dsc, center_x, center_y, start_angle, end_angle, extend); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_default_init_def = { - "lv_theme_default_init", - (PyCFunction)py_lv_theme_default_init, +static PyMethodDef py_lv_grad_conical_init_struct_method_def = { + "lv_grad_conical_init", + (PyCFunction)py_lv_grad_conical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_grad_dsc_t_methods[] = { + {"init_stops", (PyCFunction)py_lv_grad_init_stops_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"horizontal_init", (PyCFunction)py_lv_grad_horizontal_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"vertical_init", (PyCFunction)py_lv_grad_vertical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"linear_init", (PyCFunction)py_lv_grad_linear_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"radial_init", (PyCFunction)py_lv_grad_radial_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"radial_set_focal", (PyCFunction)py_lv_grad_radial_set_focal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"conical_init", (PyCFunction)py_lv_grad_conical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_grad_stop_t_methods[] = {{NULL}}; +PyMethodDef py_lv_grad_dsc_params_t_methods[] = {{NULL}}; +PyMethodDef py_lv_grad_dsc_params_linear_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * bool lv_theme_default_is_inited(void) + * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) */ -static PyObject *py_lv_theme_default_is_inited(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; + if (!PyArg_ParseTuple(py_args, "lllOl", &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *point = (lv_point_t *)mp_write_ptr_lv_point_t(self); + int32_t angle = (int32_t)angle_val; + int32_t scale_x = (int32_t)scale_x_val; + int32_t scale_y = (int32_t)scale_y_val; + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); + bool zoom_first = (zoom_first_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(void))lv_theme_default_is_inited)(); + ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_transform)(point, angle, scale_x, scale_y, pivot, zoom_first); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_default_is_inited_def = { - "lv_theme_default_is_inited", - (PyCFunction)py_lv_theme_default_is_inited, +static PyMethodDef py_lv_point_transform_struct_method_def = { + "lv_point_transform", + (PyCFunction)py_lv_point_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68049,29 +80722,34 @@ static PyMethodDef py_lv_theme_default_is_inited_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_default_get(void) + * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) */ -static PyObject *py_lv_theme_default_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_array_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long count_val; long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; + if (!PyArg_ParseTuple(py_args, "llllOl", &count_val, &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *points = (lv_point_t *)mp_write_ptr_lv_point_t(self); + size_t count = (size_t)count_val; + int32_t angle = (int32_t)angle_val; + int32_t scale_x = (int32_t)scale_x_val; + int32_t scale_y = (int32_t)scale_y_val; + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); + bool zoom_first = (zoom_first_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(void))lv_theme_default_get)(); + ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_array_transform)(points, count, angle, scale_x, scale_y, pivot, zoom_first); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_default_get_def = { - "lv_theme_default_get", - (PyCFunction)py_lv_theme_default_get, +static PyMethodDef py_lv_point_array_transform_struct_method_def = { + "lv_point_array_transform", + (PyCFunction)py_lv_point_array_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68079,28 +80757,28 @@ static PyMethodDef py_lv_theme_default_get_def = { /* * lvgl extension definition for: - * void lv_theme_default_deinit(void) + * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) */ -static PyObject *py_lv_theme_default_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_to_precise_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - + const lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_point_precise_t _res; lvpy_lock(); - ((void (*)(void))lv_theme_default_deinit)(); + _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_point_to_precise)(p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_point_precise_t(_res); } -static PyMethodDef py_lv_theme_default_deinit_def = { - "lv_theme_default_deinit", - (PyCFunction)py_lv_theme_default_deinit, +static PyMethodDef py_lv_point_to_precise_struct_method_def = { + "lv_point_to_precise", + (PyCFunction)py_lv_point_to_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68108,30 +80786,30 @@ static PyMethodDef py_lv_theme_default_deinit_def = { /* * lvgl extension definition for: - * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) + * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) */ -static PyObject *py_lv_draw_mask_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_mask_rect)(layer, dsc); + ((void (*)(lv_point_t *, int32_t, int32_t))lv_point_set)(p, x, y); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_mask_rect_def = { - "lv_draw_mask_rect", - (PyCFunction)py_lv_draw_mask_rect, +static PyMethodDef py_lv_point_set_struct_method_def = { + "lv_point_set", + (PyCFunction)py_lv_point_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68139,57 +80817,71 @@ static PyMethodDef py_lv_draw_mask_rect_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_init(void) + * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) */ -static PyObject *py_lv_draw_sw_mask_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_swap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *p2_py; + if (!PyArg_ParseTuple(py_args, "O", &p2_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *p1 = (lv_point_t *)mp_write_ptr_lv_point_t(self); + lv_point_t *p2 = mp_write_ptr_lv_point_t(p2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_sw_mask_init)(); + ((void (*)(lv_point_t *, lv_point_t *))lv_point_swap)(p1, p2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_init_def = { - "lv_draw_sw_mask_init", - (PyCFunction)py_lv_draw_sw_mask_init, +static PyMethodDef py_lv_point_swap_struct_method_def = { + "lv_point_swap", + (PyCFunction)py_lv_point_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_point_t_methods[] = { + {"transform", (PyCFunction)py_lv_point_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"array_transform", (PyCFunction)py_lv_point_array_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_precise", (PyCFunction)py_lv_point_to_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set", (PyCFunction)py_lv_point_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"swap", (PyCFunction)py_lv_point_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_grad_dsc_params_radial_t_methods[] = {{NULL}}; +PyMethodDef py_lv_grad_dsc_params_conical_t_methods[] = {{NULL}}; +PyMethodDef py_lv_image_colorkey_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_draw_sw_mask_deinit(void) + * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) */ -static PyObject *py_lv_draw_sw_mask_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_line_height_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_sw_mask_deinit)(); + _res = ((int32_t (*)(const lv_font_t *))lv_font_get_line_height_internal)(font); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_mask_deinit_def = { - "lv_draw_sw_mask_deinit", - (PyCFunction)py_lv_draw_sw_mask_deinit, +static PyMethodDef py_lv_font_get_line_height_internal_struct_method_def = { + "lv_font_get_line_height_internal", + (PyCFunction)py_lv_font_get_line_height_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68197,34 +80889,28 @@ static PyMethodDef py_lv_draw_sw_mask_deinit_def = { /* * lvgl extension definition for: - * lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void *masks[], lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len) + * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) */ -static PyObject *py_lv_draw_sw_mask_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_has_static_bitmap_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *masks_py; PyObject *mask_buf_py; long abs_x_val; long abs_y_val; long len_val; - if (!PyArg_ParseTuple(py_args, "OOlll", &masks_py, &mask_buf_py, &abs_x_val, &abs_y_val, &len_val)) { PyGILState_Release(gstate); return NULL; } - void **masks = mp_to_ptr(masks_py); - lv_opa_t *mask_buf = mp_array_to_u8ptr(mask_buf_py); - int32_t abs_x = (int32_t)abs_x_val; - int32_t abs_y = (int32_t)abs_y_val; - int32_t len = (int32_t)len_val; + + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_res_t _res; + bool _res; lvpy_lock(); - _res = ((lv_draw_sw_mask_res_t (*)(void *[], lv_opa_t *, int32_t, int32_t, int32_t))lv_draw_sw_mask_apply)(masks, mask_buf, abs_x, abs_y, len); + _res = ((bool (*)(const lv_font_t *))lv_font_has_static_bitmap_internal)(font); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_mask_apply_def = { - "lv_draw_sw_mask_apply", - (PyCFunction)py_lv_draw_sw_mask_apply, +static PyMethodDef py_lv_font_has_static_bitmap_internal_struct_method_def = { + "lv_font_has_static_bitmap_internal", + (PyCFunction)py_lv_font_has_static_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68232,29 +80918,30 @@ static PyMethodDef py_lv_draw_sw_mask_apply_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_free_param(void *p) + * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_draw_sw_mask_free_param(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_bottom_trim_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } - void *p = mp_to_ptr(p_py); + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(void *))lv_draw_sw_mask_free_param)(p); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_bottom_trim_internal)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_mask_free_param_def = { - "lv_draw_sw_mask_free_param", - (PyCFunction)py_lv_draw_sw_mask_free_param, +static PyMethodDef py_lv_font_get_bottom_trim_internal_struct_method_def = { + "lv_font_get_bottom_trim_internal", + (PyCFunction)py_lv_font_get_bottom_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68262,28 +80949,30 @@ static PyMethodDef py_lv_draw_sw_mask_free_param_def = { /* * lvgl extension definition for: - * void lv_draw_sw_init(void) + * inline static int32_t lv_font_get_top_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_draw_sw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_top_trim_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_sw_init)(); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_top_trim_internal)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_init_def = { - "lv_draw_sw_init", - (PyCFunction)py_lv_draw_sw_init, +static PyMethodDef py_lv_font_get_top_trim_internal_struct_method_def = { + "lv_font_get_top_trim_internal", + (PyCFunction)py_lv_font_get_top_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68291,28 +80980,32 @@ static PyMethodDef py_lv_draw_sw_init_def = { /* * lvgl extension definition for: - * void lv_draw_sw_deinit(void) + * bool lv_font_get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_draw_sw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *dsc_out_py; long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(void))lv_draw_sw_deinit)(); + _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc)(font, dsc_out, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_deinit_def = { - "lv_draw_sw_deinit", - (PyCFunction)py_lv_draw_sw_deinit, +static PyMethodDef py_lv_font_get_glyph_dsc_struct_method_def = { + "lv_font_get_glyph_dsc", + (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68320,37 +81013,31 @@ static PyMethodDef py_lv_draw_sw_deinit_def = { /* * lvgl extension definition for: - * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t cf, void *dest_buf) + * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_draw_sw_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *dest_area_py; PyObject *src_buf_py; long src_w_val; long src_h_val; long src_stride_val; PyObject *draw_dsc_py; PyObject *sup_py; PyObject *cf_py; PyObject *dest_buf_py; - if (!PyArg_ParseTuple(py_args, "OOlllOOOO", &dest_area_py, &src_buf_py, &src_w_val, &src_h_val, &src_stride_val, &draw_dsc_py, &sup_py, &cf_py, &dest_buf_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); - const void *src_buf = (const void *)mp_to_ptr(src_buf_py); - int32_t src_w = (int32_t)src_w_val; - int32_t src_h = (int32_t)src_h_val; - int32_t src_stride = (int32_t)src_stride_val; - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(sup_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - void *dest_buf = mp_to_ptr(dest_buf_py); + long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "ll", &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint16_t _res; lvpy_lock(); - ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_draw_sw_transform)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, cf, dest_buf); + _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_font_get_glyph_width)(font, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_transform_def = { - "lv_draw_sw_transform", - (PyCFunction)py_lv_draw_sw_transform, +static PyMethodDef py_lv_font_get_glyph_width_struct_method_def = { + "lv_font_get_glyph_width", + (PyCFunction)py_lv_font_get_glyph_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68358,30 +81045,28 @@ static PyMethodDef py_lv_draw_sw_transform_def = { /* * lvgl extension definition for: - * bool lv_draw_sw_unregister_blend_handler(lv_color_format_t dest_cf) + * int32_t lv_font_get_line_height(const lv_font_t *font) */ -static PyObject *py_lv_draw_sw_unregister_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_line_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *dest_cf_py; - if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); + + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_color_format_t))lv_draw_sw_unregister_blend_handler)(dest_cf); + _res = ((int32_t (*)(const lv_font_t *))lv_font_get_line_height)(font); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_unregister_blend_handler_def = { - "lv_draw_sw_unregister_blend_handler", - (PyCFunction)py_lv_draw_sw_unregister_blend_handler, +static PyMethodDef py_lv_font_get_line_height_struct_method_def = { + "lv_font_get_line_height", + (PyCFunction)py_lv_font_get_line_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68389,30 +81074,29 @@ static PyMethodDef py_lv_draw_sw_unregister_blend_handler_def = { /* * lvgl extension definition for: - * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) + * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) */ -static PyObject *py_lv_draw_sw_get_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_set_kerning_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *dest_cf_py; - if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); + PyObject *kerning_py; + if (!PyArg_ParseTuple(py_args, "O", &kerning_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_kerning_t kerning = (int)mp_obj_get_int(kerning_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_blend_handler_t _res; lvpy_lock(); - _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_draw_sw_get_blend_handler)(dest_cf); + ((void (*)(lv_font_t *, lv_font_kerning_t))lv_font_set_kerning)(font, kerning); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_get_blend_handler_def = { - "lv_draw_sw_get_blend_handler", - (PyCFunction)py_lv_draw_sw_get_blend_handler, +static PyMethodDef py_lv_font_set_kerning_struct_method_def = { + "lv_font_set_kerning", + (PyCFunction)py_lv_font_set_kerning_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68420,28 +81104,28 @@ static PyMethodDef py_lv_draw_sw_get_blend_handler_def = { /* * lvgl extension definition for: - * void lv_os_init(void) + * bool lv_font_has_static_bitmap(const lv_font_t *font) */ -static PyObject *py_lv_os_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_has_static_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(void))lv_os_init)(); + _res = ((bool (*)(const lv_font_t *))lv_font_has_static_bitmap)(font); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_os_init_def = { - "lv_os_init", - (PyCFunction)py_lv_os_init, +static PyMethodDef py_lv_font_has_static_bitmap_struct_method_def = { + "lv_font_has_static_bitmap", + (PyCFunction)py_lv_font_has_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68449,29 +81133,30 @@ static PyMethodDef py_lv_os_init_def = { /* * lvgl extension definition for: - * uint32_t lv_os_get_idle_percent(void) + * int32_t lv_font_get_top_trim(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_os_get_idle_percent(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_top_trim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_os_get_idle_percent)(); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_top_trim)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_os_get_idle_percent_def = { - "lv_os_get_idle_percent", - (PyCFunction)py_lv_os_get_idle_percent, +static PyMethodDef py_lv_font_get_top_trim_struct_method_def = { + "lv_font_get_top_trim", + (PyCFunction)py_lv_font_get_top_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68479,28 +81164,30 @@ static PyMethodDef py_lv_os_get_idle_percent_def = { /* * lvgl extension definition for: - * void lv_timer_core_init(void) + * int32_t lv_font_get_bottom_trim(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_timer_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_bottom_trim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(void))lv_timer_core_init)(); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_bottom_trim)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_timer_core_init_def = { - "lv_timer_core_init", - (PyCFunction)py_lv_timer_core_init, +static PyMethodDef py_lv_font_get_bottom_trim_struct_method_def = { + "lv_font_get_bottom_trim", + (PyCFunction)py_lv_font_get_bottom_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68508,28 +81195,32 @@ static PyMethodDef py_lv_timer_core_init_def = { /* * lvgl extension definition for: - * void lv_timer_core_deinit(void) + * bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next) */ -static PyObject *py_lv_timer_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_dsc_fmt_txt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *dsc_out_py; long unicode_letter_val; long unicode_letter_next_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &unicode_letter_val, &unicode_letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); + uint32_t unicode_letter = (uint32_t)unicode_letter_val; + uint32_t unicode_letter_next = (uint32_t)unicode_letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(void))lv_timer_core_deinit)(); + _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc_fmt_txt)(font, dsc_out, unicode_letter, unicode_letter_next); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_timer_core_deinit_def = { - "lv_timer_core_deinit", - (PyCFunction)py_lv_timer_core_deinit, +static PyMethodDef py_lv_font_get_glyph_dsc_fmt_txt_struct_method_def = { + "lv_font_get_glyph_dsc_fmt_txt", + (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68537,28 +81228,32 @@ static PyMethodDef py_lv_timer_core_deinit_def = { /* * lvgl extension definition for: - * void lv_anim_core_init(void) + * bool lv_font_get_glyph_dsc_internal(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_anim_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_dsc_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *dsc_out_py; long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(void))lv_anim_core_init)(); + _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc_internal)(font, dsc_out, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_core_init_def = { - "lv_anim_core_init", - (PyCFunction)py_lv_anim_core_init, +static PyMethodDef py_lv_font_get_glyph_dsc_internal_struct_method_def = { + "lv_font_get_glyph_dsc_internal", + (PyCFunction)py_lv_font_get_glyph_dsc_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68566,87 +81261,151 @@ static PyMethodDef py_lv_anim_core_init_def = { /* * lvgl extension definition for: - * void lv_anim_core_deinit(void) + * uint16_t lv_font_get_glyph_width_internal(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_anim_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_width_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "ll", &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint16_t _res; lvpy_lock(); - ((void (*)(void))lv_anim_core_deinit)(); + _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_font_get_glyph_width_internal)(font, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_core_deinit_def = { - "lv_anim_core_deinit", - (PyCFunction)py_lv_anim_core_deinit, +static PyMethodDef py_lv_font_get_glyph_width_internal_struct_method_def = { + "lv_font_get_glyph_width_internal", + (PyCFunction)py_lv_font_get_glyph_width_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_font_t_methods[] = { + {"get_line_height_internal", (PyCFunction)py_lv_font_get_line_height_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_static_bitmap_internal", (PyCFunction)py_lv_font_has_static_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bottom_trim_internal", (PyCFunction)py_lv_font_get_bottom_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_top_trim_internal", (PyCFunction)py_lv_font_get_top_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_dsc", (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_width", (PyCFunction)py_lv_font_get_glyph_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_line_height", (PyCFunction)py_lv_font_get_line_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_kerning", (PyCFunction)py_lv_font_set_kerning_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_static_bitmap", (PyCFunction)py_lv_font_has_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_top_trim", (PyCFunction)py_lv_font_get_top_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bottom_trim", (PyCFunction)py_lv_font_get_bottom_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_dsc_fmt_txt", (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_dsc_internal", (PyCFunction)py_lv_font_get_glyph_dsc_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_width_internal", (PyCFunction)py_lv_font_get_glyph_width_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + +/* + * Callback function lv_color_filter_dsc_t_cb (CPython) + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + */ +static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (lv_color_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_color_filter_dsc_t_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_color_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + PyObject *py_arg1 = mp_read_lv_color_t(arg1); + PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_color_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_color_t){0}; } + lv_color_t _c_res = mp_write_lv_color_t(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * lvgl extension definition for: - * void lv_anim_enable_vsync_mode(bool enable) + * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) */ -static PyObject *py_lv_anim_enable_vsync_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_filter_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long enable_val; - if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } - bool enable = (enable_val != 0); + PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_filter_dsc_t *dsc = (lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(self); + void *cb = mp_lv_callback(cb_py, &lv_color_filter_dsc_t_cb_callback, "lv_color_filter_dsc_t_cb", &dsc->user_data, dsc, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(bool))lv_anim_enable_vsync_mode)(enable); + ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_color_filter_dsc_init)(dsc, cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_enable_vsync_mode_def = { - "lv_anim_enable_vsync_mode", - (PyCFunction)py_lv_anim_enable_vsync_mode, +static PyMethodDef py_lv_color_filter_dsc_init_struct_method_def = { + "lv_color_filter_dsc_init", + (PyCFunction)py_lv_color_filter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_color_filter_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_color_filter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_draw_buf_init_handlers(void) + * void lv_anim_init(lv_anim_t *a) */ -static PyObject *py_lv_draw_buf_init_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_buf_init_handlers)(); + ((void (*)(lv_anim_t *))lv_anim_init)(a); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_init_handlers_def = { - "lv_draw_buf_init_handlers", - (PyCFunction)py_lv_draw_buf_init_handlers, +static PyMethodDef py_lv_anim_init_struct_method_def = { + "lv_anim_init", + (PyCFunction)py_lv_anim_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68654,62 +81413,66 @@ static PyMethodDef py_lv_draw_buf_init_handlers_def = { /* * lvgl extension definition for: - * uint32_t lv_cache_entry_get_size(const uint32_t node_size) + * void lv_anim_set_var(lv_anim_t *a, void *var) */ -static PyObject *py_lv_cache_entry_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_var_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long node_size_val; - if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } - const uint32_t node_size = (const uint32_t)node_size_val; + PyObject *var_py; + if (!PyArg_ParseTuple(py_args, "O", &var_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *var = mp_to_ptr(var_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const uint32_t))lv_cache_entry_get_size)(node_size); + ((void (*)(lv_anim_t *, void *))lv_anim_set_var)(a, var); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_get_size_def = { - "lv_cache_entry_get_size", - (PyCFunction)py_lv_cache_entry_get_size, +static PyMethodDef py_lv_anim_set_var_struct_method_def = { + "lv_anim_set_var", + (PyCFunction)py_lv_anim_set_var_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) + * lv_anim_exec_xcb_t exec_cb + */ + + /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) + * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) */ -static PyObject *py_lv_cache_entry_get_entry(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *data_py; long node_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &data_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } - void *data = mp_to_ptr(data_py); - const uint32_t node_size = (const uint32_t)node_size_val; + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *exec_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_cache_entry_get_entry)(data, node_size); + ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_anim_set_exec_cb)(a, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_get_entry_def = { - "lv_cache_entry_get_entry", - (PyCFunction)py_lv_cache_entry_get_entry, +static PyMethodDef py_lv_anim_set_exec_cb_struct_method_def = { + "lv_anim_set_exec_cb", + (PyCFunction)py_lv_anim_set_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68717,31 +81480,29 @@ static PyMethodDef py_lv_cache_entry_get_entry_def = { /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) + * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) */ -static PyObject *py_lv_cache_entry_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - long node_size_val; PyObject *cache_py; - if (!PyArg_ParseTuple(py_args, "lO", &node_size_val, &cache_py)) { PyGILState_Release(gstate); return NULL; } - const uint32_t node_size = (const uint32_t)node_size_val; - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t duration = (uint32_t)duration_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_cache_entry_alloc)(node_size, cache); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_duration)(a, duration); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_alloc_def = { - "lv_cache_entry_alloc", - (PyCFunction)py_lv_cache_entry_alloc, +static PyMethodDef py_lv_anim_set_duration_struct_method_def = { + "lv_anim_set_duration", + (PyCFunction)py_lv_anim_set_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68749,28 +81510,29 @@ static PyMethodDef py_lv_cache_entry_alloc_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_cleanup(void) + * void lv_anim_set_delay(lv_anim_t *a, uint32_t delay) */ -static PyObject *py_lv_draw_sw_mask_cleanup(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long delay_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t delay = (uint32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_sw_mask_cleanup)(); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_delay)(a, delay); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_cleanup_def = { - "lv_draw_sw_mask_cleanup", - (PyCFunction)py_lv_draw_sw_mask_cleanup, +static PyMethodDef py_lv_anim_set_delay_struct_method_def = { + "lv_anim_set_delay", + (PyCFunction)py_lv_anim_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68778,28 +81540,27 @@ static PyMethodDef py_lv_draw_sw_mask_cleanup_def = { /* * lvgl extension definition for: - * void lv_layout_init(void) + * void lv_anim_resume(lv_anim_t *a) */ -static PyObject *py_lv_layout_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_resume_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_layout_init)(); + ((void (*)(lv_anim_t *))lv_anim_resume)(a); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_layout_init_def = { - "lv_layout_init", - (PyCFunction)py_lv_layout_init, +static PyMethodDef py_lv_anim_resume_struct_method_def = { + "lv_anim_resume", + (PyCFunction)py_lv_anim_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68807,28 +81568,27 @@ static PyMethodDef py_lv_layout_init_def = { /* * lvgl extension definition for: - * void lv_layout_deinit(void) + * void lv_anim_pause(lv_anim_t *a) */ -static PyObject *py_lv_layout_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_layout_deinit)(); + ((void (*)(lv_anim_t *))lv_anim_pause)(a); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_layout_deinit_def = { - "lv_layout_deinit", - (PyCFunction)py_lv_layout_deinit, +static PyMethodDef py_lv_anim_pause_struct_method_def = { + "lv_anim_pause", + (PyCFunction)py_lv_anim_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68836,32 +81596,29 @@ static PyMethodDef py_lv_layout_deinit_def = { /* * lvgl extension definition for: - * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) + * void lv_anim_pause_for(lv_anim_t *a, uint32_t ms) */ -static PyObject *py_lv_layout_get_min_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_pause_for_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *size_py; long width_val; - if (!PyArg_ParseTuple(py_args, "OOl", &obj_py, &size_py, &width_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - int32_t *size = mp_array_to_i32ptr(size_py); - bool width = (width_val != 0); + long ms_val; + if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t ms = (uint32_t)ms_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_layout_get_min_size)(obj, size, width); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_pause_for)(a, ms); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_layout_get_min_size_def = { - "lv_layout_get_min_size", - (PyCFunction)py_lv_layout_get_min_size, +static PyMethodDef py_lv_anim_pause_for_struct_method_def = { + "lv_anim_pause_for", + (PyCFunction)py_lv_anim_pause_for_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68869,29 +81626,28 @@ static PyMethodDef py_lv_layout_get_min_size_def = { /* * lvgl extension definition for: - * void lv_layout_apply(lv_obj_t *obj) + * bool lv_anim_is_paused(lv_anim_t *a) */ -static PyObject *py_lv_layout_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_is_paused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_layout_apply)(obj); + _res = ((bool (*)(lv_anim_t *))lv_anim_is_paused)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_layout_apply_def = { - "lv_layout_apply", - (PyCFunction)py_lv_layout_apply, +static PyMethodDef py_lv_anim_is_paused_struct_method_def = { + "lv_anim_is_paused", + (PyCFunction)py_lv_anim_is_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -68899,351 +81655,402 @@ static PyMethodDef py_lv_layout_apply_def = { /* * lvgl extension definition for: - * void lv_indev_scroll_get_snap_dist(lv_obj_t *obj, lv_point_t *p) + * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) */ -static PyObject *py_lv_indev_scroll_get_snap_dist(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_values_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &p_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_point_t *p = mp_write_ptr_lv_point_t(p_py); + long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + int32_t start = (int32_t)start_val; + int32_t end = (int32_t)end_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_point_t *))lv_indev_scroll_get_snap_dist)(obj, p); + ((void (*)(lv_anim_t *, int32_t, int32_t))lv_anim_set_values)(a, start, end); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_scroll_get_snap_dist_def = { - "lv_indev_scroll_get_snap_dist", - (PyCFunction)py_lv_indev_scroll_get_snap_dist, +static PyMethodDef py_lv_anim_set_values_struct_method_def = { + "lv_anim_set_values", + (PyCFunction)py_lv_anim_set_values_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_anim_t_exec_cb (CPython) + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + */ +static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_exec_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_arg1 = mp_obj_new_int(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_text_get_size_attributes(lv_point_t *size_res, const char *text, const lv_font_t *font, lv_text_attributes_t *attributes) + * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static PyObject *py_lv_text_get_size_attributes(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_custom_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *size_res_py; PyObject *text_py; PyObject *font_py; PyObject *attributes_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &size_res_py, &text_py, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); - const char *text = (const char *)(char*)convert_from_str(text_py); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, const char *, const lv_font_t *, lv_text_attributes_t *))lv_text_get_size_attributes)(size_res, text, font, attributes); + ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_set_custom_exec_cb)(a, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_get_size_attributes_def = { - "lv_text_get_size_attributes", - (PyCFunction)py_lv_text_get_size_attributes, +static PyMethodDef py_lv_anim_set_custom_exec_cb_struct_method_def = { + "lv_anim_set_custom_exec_cb", + (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * int32_t lv_text_get_width(const char *txt, uint32_t length, const lv_font_t *font, const lv_text_attributes_t *attributes) + * Callback function lv_anim_t_path_cb (CPython) + * int32_t lv_anim_path_cb_t(const lv_anim_t *) */ -static PyObject *py_lv_text_get_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *txt_py; long length_val; PyObject *font_py; PyObject *attributes_py; - if (!PyArg_ParseTuple(py_args, "OlOO", &txt_py, &length_val, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } - const char *txt = (const char *)(char*)convert_from_str(txt_py); - uint32_t length = (uint32_t)length_val; - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - const lv_text_attributes_t *attributes = (const lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(attributes_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const char *, uint32_t, const lv_font_t *, const lv_text_attributes_t *))lv_text_get_width)(txt, length, font, attributes); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_path_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } + int32_t _c_res = (int32_t)mp_obj_get_int(result); + Py_DECREF(result); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return _c_res; } -static PyMethodDef py_lv_text_get_width_def = { - "lv_text_get_width", - (PyCFunction)py_lv_text_get_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * bool lv_text_is_cmd(lv_text_cmd_state_t *state, uint32_t c) + * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) */ -static PyObject *py_lv_text_is_cmd(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_path_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *state_py; long c_val; - if (!PyArg_ParseTuple(py_args, "Ol", &state_py, &c_val)) { PyGILState_Release(gstate); return NULL; } - lv_text_cmd_state_t *state = mp_to_ptr(state_py); - uint32_t c = (uint32_t)c_val; + PyObject *path_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &path_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *path_cb = mp_lv_callback(path_cb_py, &lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_text_cmd_state_t *, uint32_t))lv_text_is_cmd)(state, c); + ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_anim_set_path_cb)(a, path_cb); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_text_is_cmd_def = { - "lv_text_is_cmd", - (PyCFunction)py_lv_text_is_cmd, +static PyMethodDef py_lv_anim_set_path_cb_struct_method_def = { + "lv_anim_set_path_cb", + (PyCFunction)py_lv_anim_set_path_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * uint32_t lv_text_get_next_line(const char *txt, uint32_t len, const lv_font_t *font, int32_t *used_width, lv_text_attributes_t *attributes) + * Callback function lv_anim_t_start_cb (CPython) + * void lv_anim_start_cb_t(lv_anim_t *) */ -static PyObject *py_lv_text_get_next_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *txt_py; long len_val; PyObject *font_py; PyObject *used_width_py; PyObject *attributes_py; - if (!PyArg_ParseTuple(py_args, "OlOOO", &txt_py, &len_val, &font_py, &used_width_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } - const char *txt = (const char *)(char*)convert_from_str(txt_py); - uint32_t len = (uint32_t)len_val; - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - int32_t *used_width = mp_array_to_i32ptr(used_width_py); - lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(const char *, uint32_t, const lv_font_t *, int32_t *, lv_text_attributes_t *))lv_text_get_next_line)(txt, len, font, used_width, attributes); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_start_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_text_get_next_line_def = { - "lv_text_get_next_line", - (PyCFunction)py_lv_text_get_next_line, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_text_ins(char *txt_buf, uint32_t pos, const char *ins_txt) + * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) */ -static PyObject *py_lv_text_ins(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_start_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *txt_buf_py; long pos_val; PyObject *ins_txt_py; - if (!PyArg_ParseTuple(py_args, "OlO", &txt_buf_py, &pos_val, &ins_txt_py)) { PyGILState_Release(gstate); return NULL; } - char *txt_buf = (char*)convert_from_str(txt_buf_py); - uint32_t pos = (uint32_t)pos_val; - const char *ins_txt = (const char *)(char*)convert_from_str(ins_txt_py); + PyObject *start_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &start_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *start_cb = mp_lv_callback(start_cb_py, &lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(char *, uint32_t, const char *))lv_text_ins)(txt_buf, pos, ins_txt); + ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_anim_set_start_cb)(a, start_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_ins_def = { - "lv_text_ins", - (PyCFunction)py_lv_text_ins, +static PyMethodDef py_lv_anim_set_start_cb_struct_method_def = { + "lv_anim_set_start_cb", + (PyCFunction)py_lv_anim_set_start_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void lv_text_cut(char *txt, uint32_t pos, uint32_t len) + * Callback function lv_anim_t_get_value_cb (CPython) + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) */ -static PyObject *py_lv_text_cut(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *txt_py; long pos_val; long len_val; - if (!PyArg_ParseTuple(py_args, "Oll", &txt_py, &pos_val, &len_val)) { PyGILState_Release(gstate); return NULL; } - char *txt = (char*)convert_from_str(txt_py); - uint32_t pos = (uint32_t)pos_val; - uint32_t len = (uint32_t)len_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(char *, uint32_t, uint32_t))lv_text_cut)(txt, pos, len); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_get_value_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } + int32_t _c_res = (int32_t)mp_obj_get_int(result); + Py_DECREF(result); PyGILState_Release(gstate); - Py_RETURN_NONE; + return _c_res; } -static PyMethodDef py_lv_text_cut_def = { - "lv_text_cut", - (PyCFunction)py_lv_text_cut, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_text_encoded_letter_next_2(const char *txt, uint32_t *letter, uint32_t *letter_next, uint32_t *ofs) + * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) */ -static PyObject *py_lv_text_encoded_letter_next_2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_get_value_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *txt_py; PyObject *letter_py; PyObject *letter_next_py; PyObject *ofs_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &txt_py, &letter_py, &letter_next_py, &ofs_py)) { PyGILState_Release(gstate); return NULL; } - const char *txt = (const char *)(char*)convert_from_str(txt_py); - uint32_t *letter = mp_array_to_u32ptr(letter_py); - uint32_t *letter_next = mp_array_to_u32ptr(letter_next_py); - uint32_t *ofs = mp_array_to_u32ptr(ofs_py); + PyObject *get_value_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &get_value_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *get_value_cb = mp_lv_callback(get_value_cb_py, &lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const char *, uint32_t *, uint32_t *, uint32_t *))lv_text_encoded_letter_next_2)(txt, letter, letter_next, ofs); + ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_anim_set_get_value_cb)(a, get_value_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_encoded_letter_next_2_def = { - "lv_text_encoded_letter_next_2", - (PyCFunction)py_lv_text_encoded_letter_next_2, +static PyMethodDef py_lv_anim_set_get_value_cb_struct_method_def = { + "lv_anim_set_get_value_cb", + (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void lv_refr_init(void) + * Callback function lv_anim_t_completed_cb (CPython) + * void lv_anim_completed_cb_t(lv_anim_t *) */ -static PyObject *py_lv_refr_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - - - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(void))lv_refr_init)(); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_completed_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_init_def = { - "lv_refr_init", - (PyCFunction)py_lv_refr_init, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_refr_deinit(void) + * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) */ -static PyObject *py_lv_refr_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_completed_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *completed_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &completed_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *completed_cb = mp_lv_callback(completed_cb_py, &lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_refr_deinit)(); + ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_anim_set_completed_cb)(a, completed_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_deinit_def = { - "lv_refr_deinit", - (PyCFunction)py_lv_refr_deinit, +static PyMethodDef py_lv_anim_set_completed_cb_struct_method_def = { + "lv_anim_set_completed_cb", + (PyCFunction)py_lv_anim_set_completed_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_anim_t_deleted_cb (CPython) + * void lv_anim_deleted_cb_t(lv_anim_t *) + */ +static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_deleted_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) + * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) */ -static PyObject *py_lv_inv_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_deleted_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *disp_py; PyObject *area_p_py; - if (!PyArg_ParseTuple(py_args, "OO", &disp_py, &area_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); + PyObject *deleted_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &deleted_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *deleted_cb = mp_lv_callback(deleted_cb_py, &lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_inv_area)(disp, area_p); + ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_anim_set_deleted_cb)(a, deleted_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_inv_area_def = { - "lv_inv_area", - (PyCFunction)py_lv_inv_area, +static PyMethodDef py_lv_anim_set_deleted_cb_struct_method_def = { + "lv_anim_set_deleted_cb", + (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69251,29 +82058,29 @@ static PyMethodDef py_lv_inv_area_def = { /* * lvgl extension definition for: - * lv_display_t *lv_refr_get_disp_refreshing(void) + * void lv_anim_set_reverse_duration(lv_anim_t *a, uint32_t duration) */ -static PyObject *py_lv_refr_get_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_reverse_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t duration = (uint32_t)duration_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; lvpy_lock(); - _res = ((lv_display_t *(*)(void))lv_refr_get_disp_refreshing)(); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_duration)(a, duration); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_get_disp_refreshing_def = { - "lv_refr_get_disp_refreshing", - (PyCFunction)py_lv_refr_get_disp_refreshing, +static PyMethodDef py_lv_anim_set_reverse_duration_struct_method_def = { + "lv_anim_set_reverse_duration", + (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69281,29 +82088,29 @@ static PyMethodDef py_lv_refr_get_disp_refreshing_def = { /* * lvgl extension definition for: - * void lv_refr_set_disp_refreshing(lv_display_t *disp) + * void lv_anim_set_reverse_time(lv_anim_t *a, uint32_t duration) */ -static PyObject *py_lv_refr_set_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_reverse_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *disp_py; - if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t duration = (uint32_t)duration_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_refr_set_disp_refreshing)(disp); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_time)(a, duration); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_set_disp_refreshing_def = { - "lv_refr_set_disp_refreshing", - (PyCFunction)py_lv_refr_set_disp_refreshing, +static PyMethodDef py_lv_anim_set_reverse_time_struct_method_def = { + "lv_anim_set_reverse_time", + (PyCFunction)py_lv_anim_set_reverse_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69311,31 +82118,29 @@ static PyMethodDef py_lv_refr_set_disp_refreshing_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) + * void lv_anim_set_reverse_delay(lv_anim_t *a, uint32_t delay) */ -static PyObject *py_lv_refr_get_top_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_reverse_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *area_p_py; PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "OO", &area_p_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); - lv_obj_t *obj = mp_to_lv(obj_py); + long delay_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t delay = (uint32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_refr_get_top_obj)(area_p, obj); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_delay)(a, delay); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_get_top_obj_def = { - "lv_refr_get_top_obj", - (PyCFunction)py_lv_refr_get_top_obj, +static PyMethodDef py_lv_anim_set_reverse_delay_struct_method_def = { + "lv_anim_set_reverse_delay", + (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69343,28 +82148,29 @@ static PyMethodDef py_lv_refr_get_top_obj_def = { /* * lvgl extension definition for: - * void lv_group_init(void) + * void lv_anim_set_repeat_count(lv_anim_t *a, uint32_t cnt) */ -static PyObject *py_lv_group_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_group_init)(); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_count)(a, cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_init_def = { - "lv_group_init", - (PyCFunction)py_lv_group_init, +static PyMethodDef py_lv_anim_set_repeat_count_struct_method_def = { + "lv_anim_set_repeat_count", + (PyCFunction)py_lv_anim_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69372,28 +82178,29 @@ static PyMethodDef py_lv_group_init_def = { /* * lvgl extension definition for: - * void lv_group_deinit(void) + * void lv_anim_set_repeat_delay(lv_anim_t *a, uint32_t delay) */ -static PyObject *py_lv_group_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long delay_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t delay = (uint32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_group_deinit)(); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_delay)(a, delay); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_deinit_def = { - "lv_group_deinit", - (PyCFunction)py_lv_group_deinit, +static PyMethodDef py_lv_anim_set_repeat_delay_struct_method_def = { + "lv_anim_set_repeat_delay", + (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69401,28 +82208,29 @@ static PyMethodDef py_lv_group_deinit_def = { /* * lvgl extension definition for: - * void lv_fs_init(void) + * void lv_anim_set_early_apply(lv_anim_t *a, bool en) */ -static PyObject *py_lv_fs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_early_apply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_fs_init)(); + ((void (*)(lv_anim_t *, bool))lv_anim_set_early_apply)(a, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_init_def = { - "lv_fs_init", - (PyCFunction)py_lv_fs_init, +static PyMethodDef py_lv_anim_set_early_apply_struct_method_def = { + "lv_anim_set_early_apply", + (PyCFunction)py_lv_anim_set_early_apply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69430,28 +82238,29 @@ static PyMethodDef py_lv_fs_init_def = { /* * lvgl extension definition for: - * void lv_fs_deinit(void) + * void lv_anim_set_user_data(lv_anim_t *a, void *user_data) */ -static PyObject *py_lv_fs_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - - + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_fs_deinit)(); + ((void (*)(lv_anim_t *, void *))lv_anim_set_user_data)(a, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_deinit_def = { - "lv_fs_deinit", - (PyCFunction)py_lv_fs_deinit, +static PyMethodDef py_lv_anim_set_user_data_struct_method_def = { + "lv_anim_set_user_data", + (PyCFunction)py_lv_anim_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69459,29 +82268,32 @@ static PyMethodDef py_lv_fs_deinit_def = { /* * lvgl extension definition for: - * void lv_event_mark_deleted(void *target) + * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) */ -static PyObject *py_lv_event_mark_deleted(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_bezier3_param_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *target_py; - if (!PyArg_ParseTuple(py_args, "O", &target_py)) { PyGILState_Release(gstate); return NULL; } - void *target = mp_to_ptr(target_py); + long x1_val; long y1_val; long x2_val; long y2_val; + if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + int16_t x1 = (int16_t)x1_val; + int16_t y1 = (int16_t)y1_val; + int16_t x2 = (int16_t)x2_val; + int16_t y2 = (int16_t)y2_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void *))lv_event_mark_deleted)(target); + ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_anim_set_bezier3_param)(a, x1, y1, x2, y2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_event_mark_deleted_def = { - "lv_event_mark_deleted", - (PyCFunction)py_lv_event_mark_deleted, +static PyMethodDef py_lv_anim_set_bezier3_param_struct_method_def = { + "lv_anim_set_bezier3_param", + (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69489,31 +82301,28 @@ static PyMethodDef py_lv_event_mark_deleted_def = { /* * lvgl extension definition for: - * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) + * lv_anim_t *lv_anim_start(const lv_anim_t *a) */ -static PyObject *py_lv_color_is_in_range_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_start_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *l_color_py; PyObject *h_color_py; - if (!PyArg_ParseTuple(py_args, "OO", &l_color_py, &h_color_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } - lv_color_t l_color = mp_write_lv_color_t(l_color_py); - lv_color_t h_color = mp_write_lv_color_t(h_color_py); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_anim_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_color_is_in_range)(color, l_color, h_color); + _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_anim_start)(a); lvpy_unlock(); - + lvpy_anim_bind(_res); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_ptr_lv_anim_t((void*)_res); } -static PyMethodDef py_lv_color_is_in_range_struct_method_def = { - "lv_color_is_in_range", - (PyCFunction)py_lv_color_is_in_range_struct_method, +static PyMethodDef py_lv_anim_start_struct_method_def = { + "lv_anim_start", + (PyCFunction)py_lv_anim_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69521,30 +82330,28 @@ static PyMethodDef py_lv_color_is_in_range_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) + * uint32_t lv_anim_get_delay(const lv_anim_t *a) */ -static PyObject *py_lv_color_to_32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long opa_val; - if (!PyArg_ParseTuple(py_args, "l", &opa_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } - lv_opa_t opa = (lv_opa_t)opa_val; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_color_to_32)(color, opa); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_delay)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_color_to_32_struct_method_def = { - "lv_color_to_32", - (PyCFunction)py_lv_color_to_32_struct_method, +static PyMethodDef py_lv_anim_get_delay_struct_method_def = { + "lv_anim_get_delay", + (PyCFunction)py_lv_anim_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69552,28 +82359,28 @@ static PyMethodDef py_lv_color_to_32_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_color_to_int(lv_color_t c) + * uint32_t lv_anim_get_playtime(const lv_anim_t *a) */ -static PyObject *py_lv_color_to_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_playtime_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_color_t))lv_color_to_int)(c); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_playtime)(a); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_color_to_int_struct_method_def = { - "lv_color_to_int", - (PyCFunction)py_lv_color_to_int_struct_method, +static PyMethodDef py_lv_anim_get_playtime_struct_method_def = { + "lv_anim_get_playtime", + (PyCFunction)py_lv_anim_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69581,30 +82388,28 @@ static PyMethodDef py_lv_color_to_int_struct_method_def = { /* * lvgl extension definition for: - * bool lv_color_eq(lv_color_t c1, lv_color_t c2) + * uint32_t lv_anim_get_time(const lv_anim_t *a) */ -static PyObject *py_lv_color_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *c2_py; - if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } - lv_color_t c2 = mp_write_lv_color_t(c2_py); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_color_t, lv_color_t))lv_color_eq)(c1, c2); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_time)(a); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_color_eq_struct_method_def = { - "lv_color_eq", - (PyCFunction)py_lv_color_eq_struct_method, +static PyMethodDef py_lv_anim_get_time_struct_method_def = { + "lv_anim_get_time", + (PyCFunction)py_lv_anim_get_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69612,28 +82417,28 @@ static PyMethodDef py_lv_color_eq_struct_method_def = { /* * lvgl extension definition for: - * uint16_t lv_color_to_u16(lv_color_t color) + * uint32_t lv_anim_get_repeat_count(const lv_anim_t *a) */ -static PyObject *py_lv_color_to_u16_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + uint32_t _res; lvpy_lock(); - _res = ((uint16_t (*)(lv_color_t))lv_color_to_u16)(color); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_repeat_count)(a); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_color_to_u16_struct_method_def = { - "lv_color_to_u16", - (PyCFunction)py_lv_color_to_u16_struct_method, +static PyMethodDef py_lv_anim_get_repeat_count_struct_method_def = { + "lv_anim_get_repeat_count", + (PyCFunction)py_lv_anim_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69641,28 +82446,28 @@ static PyMethodDef py_lv_color_to_u16_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_color_to_u32(lv_color_t color) + * void *lv_anim_get_user_data(const lv_anim_t *a) */ -static PyObject *py_lv_color_to_u32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + void * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_color_t))lv_color_to_u32)(color); + _res = ((void *(*)(const lv_anim_t *))lv_anim_get_user_data)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_color_to_u32_struct_method_def = { - "lv_color_to_u32", - (PyCFunction)py_lv_color_to_u32_struct_method, +static PyMethodDef py_lv_anim_get_user_data_struct_method_def = { + "lv_anim_get_user_data", + (PyCFunction)py_lv_anim_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69670,30 +82475,30 @@ static PyMethodDef py_lv_color_to_u32_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) + * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static PyObject *py_lv_color_lighten_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_custom_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long lvl_val; - if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } - lv_opa_t lvl = (lv_opa_t)lvl_val; + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + bool _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_lighten)(c, lvl); + _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_delete)(a, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_color_lighten_struct_method_def = { - "lv_color_lighten", - (PyCFunction)py_lv_color_lighten_struct_method, +static PyMethodDef py_lv_anim_custom_delete_struct_method_def = { + "lv_anim_custom_delete", + (PyCFunction)py_lv_anim_custom_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69701,30 +82506,30 @@ static PyMethodDef py_lv_color_lighten_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_darken(lv_color_t c, lv_opa_t lvl) + * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static PyObject *py_lv_color_darken_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_custom_get_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long lvl_val; - if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } - lv_opa_t lvl = (lv_opa_t)lvl_val; + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_anim_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_darken)(c, lvl); + _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_get)(a, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_anim_t((void*)_res); } -static PyMethodDef py_lv_color_darken_struct_method_def = { - "lv_color_darken", - (PyCFunction)py_lv_color_darken_struct_method, +static PyMethodDef py_lv_anim_custom_get_struct_method_def = { + "lv_anim_custom_get", + (PyCFunction)py_lv_anim_custom_get_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69732,28 +82537,28 @@ static PyMethodDef py_lv_color_darken_struct_method_def = { /* * lvgl extension definition for: - * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) + * int32_t lv_anim_path_linear(const lv_anim_t *a) */ -static PyObject *py_lv_color_to_hsv_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_linear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_hsv_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_color_hsv_t (*)(lv_color_t))lv_color_to_hsv)(color); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_linear)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_hsv_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_to_hsv_struct_method_def = { - "lv_color_to_hsv", - (PyCFunction)py_lv_color_to_hsv_struct_method, +static PyMethodDef py_lv_anim_path_linear_struct_method_def = { + "lv_anim_path_linear", + (PyCFunction)py_lv_anim_path_linear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69761,28 +82566,28 @@ static PyMethodDef py_lv_color_to_hsv_struct_method_def = { /* * lvgl extension definition for: - * uint8_t lv_color_luminance(lv_color_t c) + * int32_t lv_anim_path_ease_in(const lv_anim_t *a) */ -static PyObject *py_lv_color_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_ease_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_t))lv_color_luminance)(c); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_luminance_struct_method_def = { - "lv_color_luminance", - (PyCFunction)py_lv_color_luminance_struct_method, +static PyMethodDef py_lv_anim_path_ease_in_struct_method_def = { + "lv_anim_path_ease_in", + (PyCFunction)py_lv_anim_path_ease_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69790,31 +82595,28 @@ static PyMethodDef py_lv_color_luminance_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) + * int32_t lv_anim_path_ease_out(const lv_anim_t *a) */ -static PyObject *py_lv_color_mix_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_ease_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *c2_py; long mix_val; - if (!PyArg_ParseTuple(py_args, "Ol", &c2_py, &mix_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } - lv_color_t c2 = mp_write_lv_color_t(c2_py); - uint8_t mix = (uint8_t)mix_val; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_color_mix)(c1, c2, mix); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_out)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_mix_struct_method_def = { - "lv_color_mix", - (PyCFunction)py_lv_color_mix_struct_method, +static PyMethodDef py_lv_anim_path_ease_out_struct_method_def = { + "lv_anim_path_ease_out", + (PyCFunction)py_lv_anim_path_ease_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69822,78 +82624,57 @@ static PyMethodDef py_lv_color_mix_struct_method_def = { /* * lvgl extension definition for: - * uint8_t lv_color_brightness(lv_color_t c) + * int32_t lv_anim_path_ease_in_out(const lv_anim_t *a) */ -static PyObject *py_lv_color_brightness_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_ease_in_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_t))lv_color_brightness)(c); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in_out)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_brightness_struct_method_def = { - "lv_color_brightness", - (PyCFunction)py_lv_color_brightness_struct_method, +static PyMethodDef py_lv_anim_path_ease_in_out_struct_method_def = { + "lv_anim_path_ease_in_out", + (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_color_t_methods[] = { - {"is_in_range", (PyCFunction)py_lv_color_is_in_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_32", (PyCFunction)py_lv_color_to_32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_int", (PyCFunction)py_lv_color_to_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"eq", (PyCFunction)py_lv_color_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_u16", (PyCFunction)py_lv_color_to_u16_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_u32", (PyCFunction)py_lv_color_to_u32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"lighten", (PyCFunction)py_lv_color_lighten_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"darken", (PyCFunction)py_lv_color_darken_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_hsv", (PyCFunction)py_lv_color_to_hsv_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"luminance", (PyCFunction)py_lv_color_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"mix", (PyCFunction)py_lv_color_mix_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"brightness", (PyCFunction)py_lv_color_brightness_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) + * int32_t lv_anim_path_overshoot(const lv_anim_t *a) */ -static PyObject *py_lv_grad_init_stops_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_overshoot_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *colors_py; PyObject *opa_py; PyObject *fracs_py; long num_stops_val; - if (!PyArg_ParseTuple(py_args, "OOOl", &colors_py, &opa_py, &fracs_py, &num_stops_val)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *grad = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - const lv_color_t *colors = (const lv_color_t *)lvpy_struct_arr_arg(self, colors_py, "lv_grad_init_stops:colors", sizeof(lv_color_t), mp_write_value_ptr_lv_color_t); - const lv_opa_t *opa = (const lv_opa_t *)mp_to_ptr(opa_py); - const uint8_t *fracs = (const uint8_t *)mp_to_ptr(fracs_py); - int num_stops = (int)num_stops_val; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_grad_init_stops)(grad, colors, opa, fracs, num_stops); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_overshoot)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_grad_init_stops_struct_method_def = { - "lv_grad_init_stops", - (PyCFunction)py_lv_grad_init_stops_struct_method, +static PyMethodDef py_lv_anim_path_overshoot_struct_method_def = { + "lv_anim_path_overshoot", + (PyCFunction)py_lv_anim_path_overshoot_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69901,27 +82682,28 @@ static PyMethodDef py_lv_grad_init_stops_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) + * int32_t lv_anim_path_bounce(const lv_anim_t *a) */ -static PyObject *py_lv_grad_horizontal_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_bounce_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *))lv_grad_horizontal_init)(dsc); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_bounce)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_grad_horizontal_init_struct_method_def = { - "lv_grad_horizontal_init", - (PyCFunction)py_lv_grad_horizontal_init_struct_method, +static PyMethodDef py_lv_anim_path_bounce_struct_method_def = { + "lv_anim_path_bounce", + (PyCFunction)py_lv_anim_path_bounce_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69929,27 +82711,28 @@ static PyMethodDef py_lv_grad_horizontal_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_vertical_init(lv_grad_dsc_t *dsc) + * int32_t lv_anim_path_step(const lv_anim_t *a) */ -static PyObject *py_lv_grad_vertical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_step_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *))lv_grad_vertical_init)(dsc); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_step)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_grad_vertical_init_struct_method_def = { - "lv_grad_vertical_init", - (PyCFunction)py_lv_grad_vertical_init_struct_method, +static PyMethodDef py_lv_anim_path_step_struct_method_def = { + "lv_anim_path_step", + (PyCFunction)py_lv_anim_path_step_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -69957,99 +82740,176 @@ static PyMethodDef py_lv_grad_vertical_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + * int32_t lv_anim_path_custom_bezier3(const lv_anim_t *a) */ -static PyObject *py_lv_grad_linear_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_custom_bezier3_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long from_x_val; long from_y_val; long to_x_val; long to_y_val; PyObject *extend_py; - if (!PyArg_ParseTuple(py_args, "llllO", &from_x_val, &from_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t from_x = (int32_t)from_x_val; - int32_t from_y = (int32_t)from_y_val; - int32_t to_x = (int32_t)to_x_val; - int32_t to_y = (int32_t)to_y_val; - lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_linear_init)(dsc, from_x, from_y, to_x, to_y, extend); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_custom_bezier3)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_grad_linear_init_struct_method_def = { - "lv_grad_linear_init", - (PyCFunction)py_lv_grad_linear_init_struct_method, +static PyMethodDef py_lv_anim_path_custom_bezier3_struct_method_def = { + "lv_anim_path_custom_bezier3", + (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_anim_t_methods[] = { + {"init", (PyCFunction)py_lv_anim_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_var", (PyCFunction)py_lv_anim_set_var_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_exec_cb", (PyCFunction)py_lv_anim_set_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_duration", (PyCFunction)py_lv_anim_set_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_delay", (PyCFunction)py_lv_anim_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"resume", (PyCFunction)py_lv_anim_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pause", (PyCFunction)py_lv_anim_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pause_for", (PyCFunction)py_lv_anim_pause_for_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_paused", (PyCFunction)py_lv_anim_is_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_values", (PyCFunction)py_lv_anim_set_values_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_custom_exec_cb", (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_path_cb", (PyCFunction)py_lv_anim_set_path_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_start_cb", (PyCFunction)py_lv_anim_set_start_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_get_value_cb", (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_completed_cb", (PyCFunction)py_lv_anim_set_completed_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_deleted_cb", (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_duration", (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_time", (PyCFunction)py_lv_anim_set_reverse_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_delay", (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_count", (PyCFunction)py_lv_anim_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_delay", (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_early_apply", (PyCFunction)py_lv_anim_set_early_apply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_anim_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bezier3_param", (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"start", (PyCFunction)py_lv_anim_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_delay", (PyCFunction)py_lv_anim_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_playtime", (PyCFunction)py_lv_anim_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_time", (PyCFunction)py_lv_anim_get_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_repeat_count", (PyCFunction)py_lv_anim_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_anim_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"custom_delete", (PyCFunction)py_lv_anim_custom_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"custom_get", (PyCFunction)py_lv_anim_custom_get_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_linear", (PyCFunction)py_lv_anim_path_linear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_ease_in", (PyCFunction)py_lv_anim_path_ease_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_ease_out", (PyCFunction)py_lv_anim_path_ease_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_ease_in_out", (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_overshoot", (PyCFunction)py_lv_anim_path_overshoot_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_bounce", (PyCFunction)py_lv_anim_path_bounce_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_step", (PyCFunction)py_lv_anim_path_step_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_custom_bezier3", (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_anim_parameter_t_methods[] = {{NULL}}; +PyMethodDef py_lv_anim_bezier3_para_t_methods[] = {{NULL}}; + +/* + * Callback function lv_style_transition_dsc_init_path_cb (CPython) + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ +static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_style_transition_dsc_init_path_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } + int32_t _c_res = (int32_t)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * lvgl extension definition for: - * void lv_grad_radial_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) */ -static PyObject *py_lv_grad_radial_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_transition_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long center_x_val; long center_y_val; long to_x_val; long to_y_val; PyObject *extend_py; - if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t center_x = (int32_t)center_x_val; - int32_t center_y = (int32_t)center_y_val; - int32_t to_x = (int32_t)to_x_val; - int32_t to_y = (int32_t)to_y_val; - lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + PyObject *props_py; PyObject *path_cb_py; long time_val; long delay_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOllO", &props_py, &path_cb_py, &time_val, &delay_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_transition_dsc_t *tr = (lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(self); + void *user_data = mp_to_ptr(user_data_py); + const lv_style_prop_t *props = (const lv_style_prop_t *)mp_to_ptr(props_py); + uint32_t time = (uint32_t)time_val; + uint32_t delay = (uint32_t)delay_val; + void *path_cb = mp_lv_callback(path_cb_py, &lv_style_transition_dsc_init_path_cb_callback, "lv_style_transition_dsc_init_path_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_radial_init)(dsc, center_x, center_y, to_x, to_y, extend); + ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_style_transition_dsc_init)(tr, props, path_cb, time, delay, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_grad_radial_init_struct_method_def = { - "lv_grad_radial_init", - (PyCFunction)py_lv_grad_radial_init_struct_method, +static PyMethodDef py_lv_style_transition_dsc_init_struct_method_def = { + "lv_style_transition_dsc_init", + (PyCFunction)py_lv_style_transition_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_style_transition_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_style_transition_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) + * void lv_display_delete(lv_display_t *disp) */ -static PyObject *py_lv_grad_radial_set_focal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long center_x_val; long center_y_val; long radius_val; - if (!PyArg_ParseTuple(py_args, "lll", ¢er_x_val, ¢er_y_val, &radius_val)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t center_x = (int32_t)center_x_val; - int32_t center_y = (int32_t)center_y_val; - int32_t radius = (int32_t)radius_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_grad_radial_set_focal)(dsc, center_x, center_y, radius); + ((void (*)(lv_display_t *))lv_display_delete)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_grad_radial_set_focal_struct_method_def = { - "lv_grad_radial_set_focal", - (PyCFunction)py_lv_grad_radial_set_focal_struct_method, +static PyMethodDef py_lv_display_delete_struct_method_def = { + "lv_display_delete", + (PyCFunction)py_lv_display_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70057,82 +82917,56 @@ static PyMethodDef py_lv_grad_radial_set_focal_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_conical_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t start_angle, int32_t end_angle, lv_grad_extend_t extend) + * void lv_display_set_default(lv_display_t *disp) */ -static PyObject *py_lv_grad_conical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_default_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long center_x_val; long center_y_val; long start_angle_val; long end_angle_val; PyObject *extend_py; - if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &start_angle_val, &end_angle_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t center_x = (int32_t)center_x_val; - int32_t center_y = (int32_t)center_y_val; - int32_t start_angle = (int32_t)start_angle_val; - int32_t end_angle = (int32_t)end_angle_val; - lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_conical_init)(dsc, center_x, center_y, start_angle, end_angle, extend); + ((void (*)(lv_display_t *))lv_display_set_default)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_grad_conical_init_struct_method_def = { - "lv_grad_conical_init", - (PyCFunction)py_lv_grad_conical_init_struct_method, +static PyMethodDef py_lv_display_set_default_struct_method_def = { + "lv_display_set_default", + (PyCFunction)py_lv_display_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_grad_dsc_t_methods[] = { - {"init_stops", (PyCFunction)py_lv_grad_init_stops_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"horizontal_init", (PyCFunction)py_lv_grad_horizontal_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"vertical_init", (PyCFunction)py_lv_grad_vertical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"linear_init", (PyCFunction)py_lv_grad_linear_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"radial_init", (PyCFunction)py_lv_grad_radial_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"radial_set_focal", (PyCFunction)py_lv_grad_radial_set_focal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"conical_init", (PyCFunction)py_lv_grad_conical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_grad_stop_t_methods[] = {{NULL}}; -PyMethodDef py_lv_grad_dsc_params_t_methods[] = {{NULL}}; -PyMethodDef py_lv_grad_dsc_params_linear_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + * lv_display_t *lv_display_get_next(lv_display_t *disp) */ -static PyObject *py_lv_point_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; - if (!PyArg_ParseTuple(py_args, "lllOl", &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *point = (lv_point_t *)mp_write_ptr_lv_point_t(self); - int32_t angle = (int32_t)angle_val; - int32_t scale_x = (int32_t)scale_x_val; - int32_t scale_y = (int32_t)scale_y_val; - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); - bool zoom_first = (zoom_first_val != 0); + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_display_t * _res; lvpy_lock(); - ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_transform)(point, angle, scale_x, scale_y, pivot, zoom_first); + _res = ((lv_display_t *(*)(lv_display_t *))lv_display_get_next)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_point_transform_struct_method_def = { - "lv_point_transform", - (PyCFunction)py_lv_point_transform_struct_method, +static PyMethodDef py_lv_display_get_next_struct_method_def = { + "lv_display_get_next", + (PyCFunction)py_lv_display_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70140,34 +82974,30 @@ static PyMethodDef py_lv_point_transform_struct_method_def = { /* * lvgl extension definition for: - * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) */ -static PyObject *py_lv_point_array_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long count_val; long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; - if (!PyArg_ParseTuple(py_args, "llllOl", &count_val, &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *points = (lv_point_t *)mp_write_ptr_lv_point_t(self); - size_t count = (size_t)count_val; - int32_t angle = (int32_t)angle_val; - int32_t scale_x = (int32_t)scale_x_val; - int32_t scale_y = (int32_t)scale_y_val; - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); - bool zoom_first = (zoom_first_val != 0); + long hor_res_val; long ver_res_val; + if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t hor_res = (int32_t)hor_res_val; + int32_t ver_res = (int32_t)ver_res_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_array_transform)(points, count, angle, scale_x, scale_y, pivot, zoom_first); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_resolution)(disp, hor_res, ver_res); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_point_array_transform_struct_method_def = { - "lv_point_array_transform", - (PyCFunction)py_lv_point_array_transform_struct_method, +static PyMethodDef py_lv_display_set_resolution_struct_method_def = { + "lv_display_set_resolution", + (PyCFunction)py_lv_display_set_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70175,28 +83005,30 @@ static PyMethodDef py_lv_point_array_transform_struct_method_def = { /* * lvgl extension definition for: - * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) + * void lv_display_set_physical_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) */ -static PyObject *py_lv_point_to_precise_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_physical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); + long hor_res_val; long ver_res_val; + if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t hor_res = (int32_t)hor_res_val; + int32_t ver_res = (int32_t)ver_res_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_point_precise_t _res; lvpy_lock(); - _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_point_to_precise)(p); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_physical_resolution)(disp, hor_res, ver_res); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_point_precise_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_point_to_precise_struct_method_def = { - "lv_point_to_precise", - (PyCFunction)py_lv_point_to_precise_struct_method, +static PyMethodDef py_lv_display_set_physical_resolution_struct_method_def = { + "lv_display_set_physical_resolution", + (PyCFunction)py_lv_display_set_physical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70204,30 +83036,30 @@ static PyMethodDef py_lv_point_to_precise_struct_method_def = { /* * lvgl extension definition for: - * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) + * void lv_display_set_offset(lv_display_t *disp, int32_t x, int32_t y) */ -static PyObject *py_lv_point_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_offset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long x_val; long y_val; if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); int32_t x = (int32_t)x_val; int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, int32_t, int32_t))lv_point_set)(p, x, y); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_offset)(disp, x, y); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_point_set_struct_method_def = { - "lv_point_set", - (PyCFunction)py_lv_point_set_struct_method, +static PyMethodDef py_lv_display_set_offset_struct_method_def = { + "lv_display_set_offset", + (PyCFunction)py_lv_display_set_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70235,75 +83067,59 @@ static PyMethodDef py_lv_point_set_struct_method_def = { /* * lvgl extension definition for: - * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) + * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) */ -static PyObject *py_lv_point_swap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *p2_py; - if (!PyArg_ParseTuple(py_args, "O", &p2_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *p1 = (lv_point_t *)mp_write_ptr_lv_point_t(self); - lv_point_t *p2 = mp_write_ptr_lv_point_t(p2_py); + PyObject *rotation_py; + if (!PyArg_ParseTuple(py_args, "O", &rotation_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, lv_point_t *))lv_point_swap)(p1, p2); + ((void (*)(lv_display_t *, lv_display_rotation_t))lv_display_set_rotation)(disp, rotation); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_point_swap_struct_method_def = { - "lv_point_swap", - (PyCFunction)py_lv_point_swap_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -PyMethodDef py_lv_point_t_methods[] = { - {"transform", (PyCFunction)py_lv_point_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"array_transform", (PyCFunction)py_lv_point_array_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_precise", (PyCFunction)py_lv_point_to_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set", (PyCFunction)py_lv_point_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"swap", (PyCFunction)py_lv_point_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} +static PyMethodDef py_lv_display_set_rotation_struct_method_def = { + "lv_display_set_rotation", + (PyCFunction)py_lv_display_set_rotation_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL }; -PyMethodDef py_lv_grad_dsc_params_radial_t_methods[] = {{NULL}}; -PyMethodDef py_lv_grad_dsc_params_conical_t_methods[] = {{NULL}}; -PyMethodDef py_lv_image_colorkey_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * bool lv_font_get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) + * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) */ -static PyObject *py_lv_font_get_glyph_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_out_py; long letter_val; long letter_next_val; - if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); - uint32_t letter = (uint32_t)letter_val; - uint32_t letter_next = (uint32_t)letter_next_val; + long enable_val; + if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + bool enable = (enable_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc)(font, dsc_out, letter, letter_next); + ((void (*)(lv_display_t *, bool))lv_display_set_matrix_rotation)(disp, enable); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_dsc_struct_method_def = { - "lv_font_get_glyph_dsc", - (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, +static PyMethodDef py_lv_display_set_matrix_rotation_struct_method_def = { + "lv_display_set_matrix_rotation", + (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70311,31 +83127,29 @@ static PyMethodDef py_lv_font_get_glyph_dsc_struct_method_def = { /* * lvgl extension definition for: - * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) + * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) */ -static PyObject *py_lv_font_get_glyph_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long letter_val; long letter_next_val; - if (!PyArg_ParseTuple(py_args, "ll", &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - uint32_t letter = (uint32_t)letter_val; - uint32_t letter_next = (uint32_t)letter_next_val; + long dpi_val; + if (!PyArg_ParseTuple(py_args, "l", &dpi_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t dpi = (int32_t)dpi_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_font_get_glyph_width)(font, letter, letter_next); + ((void (*)(lv_display_t *, int32_t))lv_display_set_dpi)(disp, dpi); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_width_struct_method_def = { - "lv_font_get_glyph_width", - (PyCFunction)py_lv_font_get_glyph_width_struct_method, +static PyMethodDef py_lv_display_set_dpi_struct_method_def = { + "lv_display_set_dpi", + (PyCFunction)py_lv_display_set_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70343,28 +83157,28 @@ static PyMethodDef py_lv_font_get_glyph_width_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_font_get_line_height(const lv_font_t *font) + * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_font_get_line_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_font_t *))lv_font_get_line_height)(font); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_horizontal_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_font_get_line_height_struct_method_def = { - "lv_font_get_line_height", - (PyCFunction)py_lv_font_get_line_height_struct_method, +static PyMethodDef py_lv_display_get_horizontal_resolution_struct_method_def = { + "lv_display_get_horizontal_resolution", + (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70372,29 +83186,28 @@ static PyMethodDef py_lv_font_get_line_height_struct_method_def = { /* * lvgl extension definition for: - * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) + * int32_t lv_display_get_vertical_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_font_set_kerning_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *kerning_py; - if (!PyArg_ParseTuple(py_args, "O", &kerning_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_font_kerning_t kerning = (int)mp_obj_get_int(kerning_py); + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_font_t *, lv_font_kerning_t))lv_font_set_kerning)(font, kerning); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_vertical_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_font_set_kerning_struct_method_def = { - "lv_font_set_kerning", - (PyCFunction)py_lv_font_set_kerning_struct_method, +static PyMethodDef py_lv_display_get_vertical_resolution_struct_method_def = { + "lv_display_get_vertical_resolution", + (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70402,28 +83215,28 @@ static PyMethodDef py_lv_font_set_kerning_struct_method_def = { /* * lvgl extension definition for: - * bool lv_font_has_static_bitmap(const lv_font_t *font) + * int32_t lv_display_get_original_horizontal_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_font_has_static_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_original_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *))lv_font_has_static_bitmap)(font); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_horizontal_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_font_has_static_bitmap_struct_method_def = { - "lv_font_has_static_bitmap", - (PyCFunction)py_lv_font_has_static_bitmap_struct_method, +static PyMethodDef py_lv_display_get_original_horizontal_resolution_struct_method_def = { + "lv_display_get_original_horizontal_resolution", + (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70431,144 +83244,115 @@ static PyMethodDef py_lv_font_has_static_bitmap_struct_method_def = { /* * lvgl extension definition for: - * bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next) + * int32_t lv_display_get_original_vertical_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_font_get_glyph_dsc_fmt_txt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_original_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_out_py; long unicode_letter_val; long unicode_letter_next_val; - if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &unicode_letter_val, &unicode_letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); - uint32_t unicode_letter = (uint32_t)unicode_letter_val; - uint32_t unicode_letter_next = (uint32_t)unicode_letter_next_val; + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc_fmt_txt)(font, dsc_out, unicode_letter, unicode_letter_next); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_vertical_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_font_get_glyph_dsc_fmt_txt_struct_method_def = { - "lv_font_get_glyph_dsc_fmt_txt", - (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, +static PyMethodDef py_lv_display_get_original_vertical_resolution_struct_method_def = { + "lv_display_get_original_vertical_resolution", + (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_font_t_methods[] = { - {"get_glyph_dsc", (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_width", (PyCFunction)py_lv_font_get_glyph_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_line_height", (PyCFunction)py_lv_font_get_line_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_kerning", (PyCFunction)py_lv_font_set_kerning_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_static_bitmap", (PyCFunction)py_lv_font_has_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_dsc_fmt_txt", (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* - * Callback function lv_color_filter_dsc_t_cb (CPython) - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + * lvgl extension definition for: + * int32_t lv_display_get_physical_horizontal_resolution(const lv_display_t *disp) */ -static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +static PyObject *py_lv_display_get_physical_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_color_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_color_filter_dsc_t_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_color_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - PyObject *py_arg1 = mp_read_lv_color_t(arg1); - PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_color_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_color_t){0}; } - lv_color_t _c_res = mp_write_lv_color_t(result); - Py_DECREF(result); + (void)py_kwds; + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_horizontal_resolution)(disp); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + return mp_obj_new_int(_res); } +static PyMethodDef py_lv_display_get_physical_horizontal_resolution_struct_method_def = { + "lv_display_get_physical_horizontal_resolution", + (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) + * int32_t lv_display_get_physical_vertical_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_color_filter_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_physical_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_filter_dsc_t *dsc = (lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(self); - void *cb = mp_lv_callback(cb_py, &lv_color_filter_dsc_t_cb_callback, "lv_color_filter_dsc_t_cb", &dsc->user_data, dsc, (NULL), (NULL)); + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_color_filter_dsc_init)(dsc, cb); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_vertical_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_filter_dsc_init_struct_method_def = { - "lv_color_filter_dsc_init", - (PyCFunction)py_lv_color_filter_dsc_init_struct_method, +static PyMethodDef py_lv_display_get_physical_vertical_resolution_struct_method_def = { + "lv_display_get_physical_vertical_resolution", + (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_color_filter_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_color_filter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_anim_init(lv_anim_t *a) + * int32_t lv_display_get_offset_x(const lv_display_t *disp) */ -static PyObject *py_lv_anim_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *))lv_anim_init)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_x)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_init_struct_method_def = { - "lv_anim_init", - (PyCFunction)py_lv_anim_init_struct_method, +static PyMethodDef py_lv_display_get_offset_x_struct_method_def = { + "lv_display_get_offset_x", + (PyCFunction)py_lv_display_get_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70576,66 +83360,57 @@ static PyMethodDef py_lv_anim_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_var(lv_anim_t *a, void *var) + * int32_t lv_display_get_offset_y(const lv_display_t *disp) */ -static PyObject *py_lv_anim_set_var_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *var_py; - if (!PyArg_ParseTuple(py_args, "O", &var_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *var = mp_to_ptr(var_py); + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, void *))lv_anim_set_var)(a, var); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_y)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_var_struct_method_def = { - "lv_anim_set_var", - (PyCFunction)py_lv_anim_set_var_struct_method, +static PyMethodDef py_lv_display_get_offset_y_struct_method_def = { + "lv_display_get_offset_y", + (PyCFunction)py_lv_display_get_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) - * lv_anim_exec_xcb_t exec_cb - */ - - /* * lvgl extension definition for: - * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) + * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = NULL; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_display_rotation_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_anim_set_exec_cb)(a, exec_cb); + _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_display_get_rotation)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_exec_cb_struct_method_def = { - "lv_anim_set_exec_cb", - (PyCFunction)py_lv_anim_set_exec_cb_struct_method, +static PyMethodDef py_lv_display_get_rotation_struct_method_def = { + "lv_display_get_rotation", + (PyCFunction)py_lv_display_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70643,29 +83418,28 @@ static PyMethodDef py_lv_anim_set_exec_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) + * bool lv_display_get_matrix_rotation(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t duration = (uint32_t)duration_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_duration)(a, duration); + _res = ((bool (*)(lv_display_t *))lv_display_get_matrix_rotation)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_set_duration_struct_method_def = { - "lv_anim_set_duration", - (PyCFunction)py_lv_anim_set_duration_struct_method, +static PyMethodDef py_lv_display_get_matrix_rotation_struct_method_def = { + "lv_display_get_matrix_rotation", + (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70673,29 +83447,28 @@ static PyMethodDef py_lv_anim_set_duration_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_delay(lv_anim_t *a, uint32_t delay) + * int32_t lv_display_get_dpi(const lv_display_t *disp) */ -static PyObject *py_lv_anim_set_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t delay = (uint32_t)delay_val; + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_delay)(a, delay); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_dpi)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_delay_struct_method_def = { - "lv_anim_set_delay", - (PyCFunction)py_lv_anim_set_delay_struct_method, +static PyMethodDef py_lv_display_get_dpi_struct_method_def = { + "lv_display_get_dpi", + (PyCFunction)py_lv_display_get_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70703,27 +83476,32 @@ static PyMethodDef py_lv_anim_set_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_resume(lv_anim_t *a) + * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) */ -static PyObject *py_lv_anim_resume_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; PyObject *render_mode_py; + if (!PyArg_ParseTuple(py_args, "OOlO", &buf1_py, &buf2_py, &buf_size_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *buf1 = mp_to_ptr(buf1_py); + void *buf2 = mp_to_ptr(buf2_py); + uint32_t buf_size = (uint32_t)buf_size_val; + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *))lv_anim_resume)(a); + ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_display_set_buffers)(disp, buf1, buf2, buf_size, render_mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_resume_struct_method_def = { - "lv_anim_resume", - (PyCFunction)py_lv_anim_resume_struct_method, +static PyMethodDef py_lv_display_set_buffers_struct_method_def = { + "lv_display_set_buffers", + (PyCFunction)py_lv_display_set_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70731,27 +83509,33 @@ static PyMethodDef py_lv_anim_resume_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_pause(lv_anim_t *a) + * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) */ -static PyObject *py_lv_anim_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_buffers_with_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; long stride_val; PyObject *render_mode_py; + if (!PyArg_ParseTuple(py_args, "OOllO", &buf1_py, &buf2_py, &buf_size_val, &stride_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *buf1 = mp_to_ptr(buf1_py); + void *buf2 = mp_to_ptr(buf2_py); + uint32_t buf_size = (uint32_t)buf_size_val; + uint32_t stride = (uint32_t)stride_val; + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *))lv_anim_pause)(a); + ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_display_set_buffers_with_stride)(disp, buf1, buf2, buf_size, stride, render_mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_pause_struct_method_def = { - "lv_anim_pause", - (PyCFunction)py_lv_anim_pause_struct_method, +static PyMethodDef py_lv_display_set_buffers_with_stride_struct_method_def = { + "lv_display_set_buffers_with_stride", + (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70759,29 +83543,30 @@ static PyMethodDef py_lv_anim_pause_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_pause_for(lv_anim_t *a, uint32_t ms) + * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) */ -static PyObject *py_lv_anim_pause_for_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_draw_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long ms_val; - if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t ms = (uint32_t)ms_val; + PyObject *buf1_py; PyObject *buf2_py; + if (!PyArg_ParseTuple(py_args, "OO", &buf1_py, &buf2_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(buf1_py); + lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(buf2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_pause_for)(a, ms); + ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_display_set_draw_buffers)(disp, buf1, buf2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_pause_for_struct_method_def = { - "lv_anim_pause_for", - (PyCFunction)py_lv_anim_pause_for_struct_method, +static PyMethodDef py_lv_display_set_draw_buffers_struct_method_def = { + "lv_display_set_draw_buffers", + (PyCFunction)py_lv_display_set_draw_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70789,28 +83574,29 @@ static PyMethodDef py_lv_anim_pause_for_struct_method_def = { /* * lvgl extension definition for: - * bool lv_anim_is_paused(lv_anim_t *a) + * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) */ -static PyObject *py_lv_anim_is_paused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_3rd_draw_buffer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *buf3_py; + if (!PyArg_ParseTuple(py_args, "O", &buf3_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(buf3_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_anim_t *))lv_anim_is_paused)(a); + ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_display_set_3rd_draw_buffer)(disp, buf3); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_is_paused_struct_method_def = { - "lv_anim_is_paused", - (PyCFunction)py_lv_anim_is_paused_struct_method, +static PyMethodDef py_lv_display_set_3rd_draw_buffer_struct_method_def = { + "lv_display_set_3rd_draw_buffer", + (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70818,54 +83604,55 @@ static PyMethodDef py_lv_anim_is_paused_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) + * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) */ -static PyObject *py_lv_anim_set_values_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - int32_t start = (int32_t)start_val; - int32_t end = (int32_t)end_val; + PyObject *render_mode_py; + if (!PyArg_ParseTuple(py_args, "O", &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, int32_t, int32_t))lv_anim_set_values)(a, start, end); + ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_display_set_render_mode)(disp, render_mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_values_struct_method_def = { - "lv_anim_set_values", - (PyCFunction)py_lv_anim_set_values_struct_method, +static PyMethodDef py_lv_display_set_render_mode_struct_method_def = { + "lv_display_set_render_mode", + (PyCFunction)py_lv_display_set_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_exec_cb (CPython) - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + * Callback function lv_display_t_flush_cb (CPython) + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) */ -static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) +static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_exec_cb"); + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_flush_cb"); if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_arg1 = mp_obj_new_int(arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_area_t((void*)arg1); + PyObject *py_arg2 = mp_array_from_u8ptr((void*)arg2); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; Py_XDECREF(py_arg0); Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); @@ -70882,114 +83669,143 @@ static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) /* * lvgl extension definition for: - * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) */ -static PyObject *py_lv_anim_set_custom_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_flush_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); + PyObject *flush_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &flush_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *flush_cb = mp_lv_callback(flush_cb_py, &lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", &disp->user_data, disp, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_set_custom_exec_cb)(a, exec_cb); + ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_display_set_flush_cb)(disp, flush_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_custom_exec_cb_struct_method_def = { - "lv_anim_set_custom_exec_cb", - (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, +static PyMethodDef py_lv_display_set_flush_cb_struct_method_def = { + "lv_display_set_flush_cb", + (PyCFunction)py_lv_display_set_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_path_cb (CPython) - * int32_t lv_anim_path_cb_t(const lv_anim_t *) + * lvgl extension definition for: + * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) */ -static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) +static PyObject *py_lv_display_get_flush_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_display_flush_cb_t _res; + lvpy_lock(); + _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_display_get_flush_cb)(disp); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_lv_funcptr_lv_display_flush_cb_t(_res); +} + +static PyMethodDef py_lv_display_get_flush_cb_struct_method_def = { + "lv_display_get_flush_cb", + (PyCFunction)py_lv_display_get_flush_cb_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Callback function lv_display_t_wait_cb (CPython) + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ +static void lv_display_t_wait_cb_callback(lv_display_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_path_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_wait_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); PyObject *result = PyObject_CallObject(py_cb, py_args); Py_DECREF(py_args); Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } - int32_t _c_res = (int32_t)mp_obj_get_int(result); - Py_DECREF(result); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - return _c_res; } /* * lvgl extension definition for: - * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) + * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) */ -static PyObject *py_lv_anim_set_path_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_flush_wait_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *path_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &path_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *path_cb = mp_lv_callback(path_cb_py, &lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", &a->user_data, a, (NULL), (NULL)); + PyObject *wait_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &wait_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *wait_cb = mp_lv_callback(wait_cb_py, &lv_display_t_wait_cb_callback, "lv_display_t_wait_cb", &disp->user_data, disp, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_anim_set_path_cb)(a, path_cb); + ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_display_set_flush_wait_cb)(disp, wait_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_path_cb_struct_method_def = { - "lv_anim_set_path_cb", - (PyCFunction)py_lv_anim_set_path_cb_struct_method, +static PyMethodDef py_lv_display_set_flush_wait_cb_struct_method_def = { + "lv_display_set_flush_wait_cb", + (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_start_cb (CPython) - * void lv_anim_start_cb_t(lv_anim_t *) + * Callback function lv_display_t_sync_cb (CPython) + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) */ -static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) +static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_start_cb"); + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_sync_cb"); if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_area_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); @@ -71006,214 +83822,207 @@ static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) /* * lvgl extension definition for: - * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) + * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) */ -static PyObject *py_lv_anim_set_start_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_sync_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *start_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &start_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *start_cb = mp_lv_callback(start_cb_py, &lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", &a->user_data, a, (NULL), (NULL)); + PyObject *sync_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *sync_cb = mp_lv_callback(sync_cb_py, &lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", &disp->user_data, disp, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_anim_set_start_cb)(a, start_cb); + ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_display_set_sync_cb)(disp, sync_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_start_cb_struct_method_def = { - "lv_anim_set_start_cb", - (PyCFunction)py_lv_anim_set_start_cb_struct_method, +static PyMethodDef py_lv_display_set_sync_cb_struct_method_def = { + "lv_display_set_sync_cb", + (PyCFunction)py_lv_display_set_sync_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_get_value_cb (CPython) - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + * lvgl extension definition for: + * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) */ -static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) +static PyObject *py_lv_display_set_sync_wait_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_get_value_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } - int32_t _c_res = (int32_t)mp_obj_get_int(result); - Py_DECREF(result); + (void)py_kwds; + PyObject *wait_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &wait_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *wait_cb = mp_lv_callback(wait_cb_py, &lv_display_t_wait_cb_callback, "lv_display_t_wait_cb", &disp->user_data, disp, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_display_set_sync_wait_cb)(disp, wait_cb); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + Py_RETURN_NONE; } +static PyMethodDef py_lv_display_set_sync_wait_cb_struct_method_def = { + "lv_display_set_sync_wait_cb", + (PyCFunction)py_lv_display_set_sync_wait_cb_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) + * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) */ -static PyObject *py_lv_anim_set_get_value_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *get_value_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &get_value_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *get_value_cb = mp_lv_callback(get_value_cb_py, &lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", &a->user_data, a, (NULL), (NULL)); + PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "O", &color_format_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_anim_set_get_value_cb)(a, get_value_cb); + ((void (*)(lv_display_t *, lv_color_format_t))lv_display_set_color_format)(disp, color_format); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_get_value_cb_struct_method_def = { - "lv_anim_set_get_value_cb", - (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, +static PyMethodDef py_lv_display_set_color_format_struct_method_def = { + "lv_display_set_color_format", + (PyCFunction)py_lv_display_set_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_completed_cb (CPython) - * void lv_anim_completed_cb_t(lv_anim_t *) + * lvgl extension definition for: + * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) */ -static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) +static PyObject *py_lv_display_get_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_completed_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_color_format_t _res; + lvpy_lock(); + _res = ((lv_color_format_t (*)(lv_display_t *))lv_display_get_color_format)(disp); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } +static PyMethodDef py_lv_display_get_color_format_struct_method_def = { + "lv_display_get_color_format", + (PyCFunction)py_lv_display_get_color_format_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) + * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) */ -static PyObject *py_lv_anim_set_completed_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *completed_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &completed_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *completed_cb = mp_lv_callback(completed_cb_py, &lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", &a->user_data, a, (NULL), (NULL)); + long tile_cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &tile_cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + uint32_t tile_cnt = (uint32_t)tile_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_anim_set_completed_cb)(a, completed_cb); + ((void (*)(lv_display_t *, uint32_t))lv_display_set_tile_cnt)(disp, tile_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_completed_cb_struct_method_def = { - "lv_anim_set_completed_cb", - (PyCFunction)py_lv_anim_set_completed_cb_struct_method, +static PyMethodDef py_lv_display_set_tile_cnt_struct_method_def = { + "lv_display_set_tile_cnt", + (PyCFunction)py_lv_display_set_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_deleted_cb (CPython) - * void lv_anim_deleted_cb_t(lv_anim_t *) + * lvgl extension definition for: + * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) */ -static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +static PyObject *py_lv_display_get_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_deleted_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_display_t *))lv_display_get_tile_cnt)(disp); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } +static PyMethodDef py_lv_display_get_tile_cnt_struct_method_def = { + "lv_display_get_tile_cnt", + (PyCFunction)py_lv_display_get_tile_cnt_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) + * void lv_display_set_antialiasing(lv_display_t *disp, bool en) */ -static PyObject *py_lv_anim_set_deleted_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *deleted_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &deleted_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *deleted_cb = mp_lv_callback(deleted_cb_py, &lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", &a->user_data, a, (NULL), (NULL)); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_anim_set_deleted_cb)(a, deleted_cb); + ((void (*)(lv_display_t *, bool))lv_display_set_antialiasing)(disp, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_deleted_cb_struct_method_def = { - "lv_anim_set_deleted_cb", - (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, +static PyMethodDef py_lv_display_set_antialiasing_struct_method_def = { + "lv_display_set_antialiasing", + (PyCFunction)py_lv_display_set_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71221,29 +84030,28 @@ static PyMethodDef py_lv_anim_set_deleted_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_reverse_duration(lv_anim_t *a, uint32_t duration) + * bool lv_display_get_antialiasing(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_reverse_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t duration = (uint32_t)duration_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_duration)(a, duration); + _res = ((bool (*)(lv_display_t *))lv_display_get_antialiasing)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_set_reverse_duration_struct_method_def = { - "lv_anim_set_reverse_duration", - (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, +static PyMethodDef py_lv_display_get_antialiasing_struct_method_def = { + "lv_display_get_antialiasing", + (PyCFunction)py_lv_display_get_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71251,29 +84059,27 @@ static PyMethodDef py_lv_anim_set_reverse_duration_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_reverse_time(lv_anim_t *a, uint32_t duration) + * void lv_display_flush_ready(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_reverse_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_flush_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t duration = (uint32_t)duration_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_time)(a, duration); + ((void (*)(lv_display_t *))lv_display_flush_ready)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_reverse_time_struct_method_def = { - "lv_anim_set_reverse_time", - (PyCFunction)py_lv_anim_set_reverse_time_struct_method, +static PyMethodDef py_lv_display_flush_ready_struct_method_def = { + "lv_display_flush_ready", + (PyCFunction)py_lv_display_flush_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71281,29 +84087,28 @@ static PyMethodDef py_lv_anim_set_reverse_time_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_reverse_delay(lv_anim_t *a, uint32_t delay) + * bool lv_display_flush_is_last(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_reverse_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_flush_is_last_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t delay = (uint32_t)delay_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_delay)(a, delay); + _res = ((bool (*)(lv_display_t *))lv_display_flush_is_last)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_set_reverse_delay_struct_method_def = { - "lv_anim_set_reverse_delay", - (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, +static PyMethodDef py_lv_display_flush_is_last_struct_method_def = { + "lv_display_flush_is_last", + (PyCFunction)py_lv_display_flush_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71311,29 +84116,27 @@ static PyMethodDef py_lv_anim_set_reverse_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_repeat_count(lv_anim_t *a, uint32_t cnt) + * void lv_display_sync_ready(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_sync_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t cnt = (uint32_t)cnt_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_count)(a, cnt); + ((void (*)(lv_display_t *))lv_display_sync_ready)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_repeat_count_struct_method_def = { - "lv_anim_set_repeat_count", - (PyCFunction)py_lv_anim_set_repeat_count_struct_method, +static PyMethodDef py_lv_display_sync_ready_struct_method_def = { + "lv_display_sync_ready", + (PyCFunction)py_lv_display_sync_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71341,29 +84144,28 @@ static PyMethodDef py_lv_anim_set_repeat_count_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_repeat_delay(lv_anim_t *a, uint32_t delay) + * bool lv_display_sync_is_last(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_sync_is_last_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t delay = (uint32_t)delay_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_delay)(a, delay); + _res = ((bool (*)(lv_display_t *))lv_display_sync_is_last)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_set_repeat_delay_struct_method_def = { - "lv_anim_set_repeat_delay", - (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, +static PyMethodDef py_lv_display_sync_is_last_struct_method_def = { + "lv_display_sync_is_last", + (PyCFunction)py_lv_display_sync_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71371,29 +84173,28 @@ static PyMethodDef py_lv_anim_set_repeat_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_early_apply(lv_anim_t *a, bool en) + * bool lv_display_is_double_buffered(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_early_apply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_is_double_buffered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - bool en = (en_val != 0); + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_anim_t *, bool))lv_anim_set_early_apply)(a, en); + _res = ((bool (*)(lv_display_t *))lv_display_is_double_buffered)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_set_early_apply_struct_method_def = { - "lv_anim_set_early_apply", - (PyCFunction)py_lv_anim_set_early_apply_struct_method, +static PyMethodDef py_lv_display_is_double_buffered_struct_method_def = { + "lv_display_is_double_buffered", + (PyCFunction)py_lv_display_is_double_buffered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71401,29 +84202,28 @@ static PyMethodDef py_lv_anim_set_early_apply_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_user_data(lv_anim_t *a, void *user_data) + * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *user_data = mp_to_ptr(user_data_py); + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_display_render_mode_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, void *))lv_anim_set_user_data)(a, user_data); + _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_display_get_render_mode)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_user_data_struct_method_def = { - "lv_anim_set_user_data", - (PyCFunction)py_lv_anim_set_user_data_struct_method, +static PyMethodDef py_lv_display_get_render_mode_struct_method_def = { + "lv_display_get_render_mode", + (PyCFunction)py_lv_display_get_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71431,32 +84231,28 @@ static PyMethodDef py_lv_anim_set_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) + * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_bezier3_param_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_screen_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x1_val; long y1_val; long x2_val; long y2_val; - if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - int16_t x1 = (int16_t)x1_val; - int16_t y1 = (int16_t)y1_val; - int16_t x2 = (int16_t)x2_val; - int16_t y2 = (int16_t)y2_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_anim_set_bezier3_param)(a, x1, y1, x2, y2); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_active)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_anim_set_bezier3_param_struct_method_def = { - "lv_anim_set_bezier3_param", - (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, +static PyMethodDef py_lv_display_get_screen_active_struct_method_def = { + "lv_display_get_screen_active", + (PyCFunction)py_lv_display_get_screen_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71464,28 +84260,28 @@ static PyMethodDef py_lv_anim_set_bezier3_param_struct_method_def = { /* * lvgl extension definition for: - * lv_anim_t *lv_anim_start(const lv_anim_t *a) + * lv_obj_t *lv_display_get_screen_prev(lv_display_t *disp) */ -static PyObject *py_lv_anim_start_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_screen_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_anim_start)(a); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_prev)(disp); lvpy_unlock(); - lvpy_anim_bind(_res); + PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_anim_start_struct_method_def = { - "lv_anim_start", - (PyCFunction)py_lv_anim_start_struct_method, +static PyMethodDef py_lv_display_get_screen_prev_struct_method_def = { + "lv_display_get_screen_prev", + (PyCFunction)py_lv_display_get_screen_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71493,28 +84289,28 @@ static PyMethodDef py_lv_anim_start_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_delay(const lv_anim_t *a) + * lv_obj_t *lv_display_get_screen_loading(lv_display_t *disp) */ -static PyObject *py_lv_anim_get_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_screen_loading_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_delay)(a); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_loading)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_anim_get_delay_struct_method_def = { - "lv_anim_get_delay", - (PyCFunction)py_lv_anim_get_delay_struct_method, +static PyMethodDef py_lv_display_get_screen_loading_struct_method_def = { + "lv_display_get_screen_loading", + (PyCFunction)py_lv_display_get_screen_loading_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71522,28 +84318,28 @@ static PyMethodDef py_lv_anim_get_delay_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_playtime(const lv_anim_t *a) + * lv_obj_t *lv_display_get_layer_top(lv_display_t *disp) */ -static PyObject *py_lv_anim_get_playtime_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_layer_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_playtime)(a); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_top)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_anim_get_playtime_struct_method_def = { - "lv_anim_get_playtime", - (PyCFunction)py_lv_anim_get_playtime_struct_method, +static PyMethodDef py_lv_display_get_layer_top_struct_method_def = { + "lv_display_get_layer_top", + (PyCFunction)py_lv_display_get_layer_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71551,28 +84347,28 @@ static PyMethodDef py_lv_anim_get_playtime_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_time(const lv_anim_t *a) + * lv_obj_t *lv_display_get_layer_sys(lv_display_t *disp) */ -static PyObject *py_lv_anim_get_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_layer_sys_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_time)(a); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_sys)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_anim_get_time_struct_method_def = { - "lv_anim_get_time", - (PyCFunction)py_lv_anim_get_time_struct_method, +static PyMethodDef py_lv_display_get_layer_sys_struct_method_def = { + "lv_display_get_layer_sys", + (PyCFunction)py_lv_display_get_layer_sys_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71580,57 +84376,92 @@ static PyMethodDef py_lv_anim_get_time_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_repeat_count(const lv_anim_t *a) + * lv_obj_t *lv_display_get_layer_bottom(lv_display_t *disp) */ -static PyObject *py_lv_anim_get_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_layer_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_repeat_count)(a); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_bottom)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_anim_get_repeat_count_struct_method_def = { - "lv_anim_get_repeat_count", - (PyCFunction)py_lv_anim_get_repeat_count_struct_method, +static PyMethodDef py_lv_display_get_layer_bottom_struct_method_def = { + "lv_display_get_layer_bottom", + (PyCFunction)py_lv_display_get_layer_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_display_add_event_cb_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_add_event_cb_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void *lv_anim_get_user_data(const lv_anim_t *a) + * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ -static PyObject *py_lv_anim_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_add_event_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *user_data = mp_to_ptr(user_data_py); + lv_event_code_t filter = (int)mp_obj_get_int(filter_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_add_event_cb_event_cb_callback, "lv_display_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_event_dsc_t * _res; lvpy_lock(); - _res = ((void *(*)(const lv_anim_t *))lv_anim_get_user_data)(a); + _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_display_add_event_cb)(disp, event_cb, filter, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_anim_get_user_data_struct_method_def = { - "lv_anim_get_user_data", - (PyCFunction)py_lv_anim_get_user_data_struct_method, +static PyMethodDef py_lv_display_add_event_cb_struct_method_def = { + "lv_display_add_event_cb", + (PyCFunction)py_lv_display_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71638,30 +84469,28 @@ static PyMethodDef py_lv_anim_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * uint32_t lv_display_get_event_count(lv_display_t *disp) */ -static PyObject *py_lv_anim_custom_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_event_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_delete)(a, exec_cb); + _res = ((uint32_t (*)(lv_display_t *))lv_display_get_event_count)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_custom_delete_struct_method_def = { - "lv_anim_custom_delete", - (PyCFunction)py_lv_anim_custom_delete_struct_method, +static PyMethodDef py_lv_display_get_event_count_struct_method_def = { + "lv_display_get_event_count", + (PyCFunction)py_lv_display_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71669,30 +84498,30 @@ static PyMethodDef py_lv_anim_custom_delete_struct_method_def = { /* * lvgl extension definition for: - * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) */ -static PyObject *py_lv_anim_custom_get_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_event_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; + lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_get)(a, exec_cb); + _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_display_get_event_dsc)(disp, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_anim_custom_get_struct_method_def = { - "lv_anim_custom_get", - (PyCFunction)py_lv_anim_custom_get_struct_method, +static PyMethodDef py_lv_display_get_event_dsc_struct_method_def = { + "lv_display_get_event_dsc", + (PyCFunction)py_lv_display_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71700,86 +84529,93 @@ static PyMethodDef py_lv_anim_custom_get_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_linear(const lv_anim_t *a) + * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) */ -static PyObject *py_lv_anim_path_linear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_remove_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_linear)(a); + _res = ((bool (*)(lv_display_t *, uint32_t))lv_display_remove_event)(disp, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_path_linear_struct_method_def = { - "lv_anim_path_linear", - (PyCFunction)py_lv_anim_path_linear_struct_method, +static PyMethodDef py_lv_display_remove_event_struct_method_def = { + "lv_display_remove_event", + (PyCFunction)py_lv_display_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * int32_t lv_anim_path_ease_in(const lv_anim_t *a) + * Callback function lv_display_remove_event_cb_with_user_data_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) */ -static PyObject *py_lv_anim_path_ease_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in)(a); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_remove_event_cb_with_user_data_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_path_ease_in_struct_method_def = { - "lv_anim_path_ease_in", - (PyCFunction)py_lv_anim_path_ease_in_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * int32_t lv_anim_path_ease_out(const lv_anim_t *a) + * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static PyObject *py_lv_anim_path_ease_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_remove_event_cb_with_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_remove_event_cb_with_user_data_event_cb_callback, "lv_display_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_out)(a); + _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_remove_event_cb_with_user_data)(disp, event_cb, user_data); lvpy_unlock(); - + if (_res > 0) lvpy_release_callback_user_data(user_data); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_path_ease_out_struct_method_def = { - "lv_anim_path_ease_out", - (PyCFunction)py_lv_anim_path_ease_out_struct_method, +static PyMethodDef py_lv_display_remove_event_cb_with_user_data_struct_method_def = { + "lv_display_remove_event_cb_with_user_data", + (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71787,28 +84623,31 @@ static PyMethodDef py_lv_anim_path_ease_out_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_ease_in_out(const lv_anim_t *a) + * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) */ -static PyObject *py_lv_anim_path_ease_in_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_send_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *code_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OO", &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_event_code_t code = (int)mp_obj_get_int(code_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in_out)(a); + _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_display_send_event)(disp, code, param); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_path_ease_in_out_struct_method_def = { - "lv_anim_path_ease_in_out", - (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, +static PyMethodDef py_lv_display_send_event_struct_method_def = { + "lv_display_send_event", + (PyCFunction)py_lv_display_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71816,28 +84655,29 @@ static PyMethodDef py_lv_anim_path_ease_in_out_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_overshoot(const lv_anim_t *a) + * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) */ -static PyObject *py_lv_anim_path_overshoot_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *th_py; + if (!PyArg_ParseTuple(py_args, "O", &th_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_theme_t *th = mp_write_ptr_lv_theme_t(th_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_overshoot)(a); + ((void (*)(lv_display_t *, lv_theme_t *))lv_display_set_theme)(disp, th); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_path_overshoot_struct_method_def = { - "lv_anim_path_overshoot", - (PyCFunction)py_lv_anim_path_overshoot_struct_method, +static PyMethodDef py_lv_display_set_theme_struct_method_def = { + "lv_display_set_theme", + (PyCFunction)py_lv_display_set_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71845,28 +84685,28 @@ static PyMethodDef py_lv_anim_path_overshoot_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_bounce(const lv_anim_t *a) + * lv_theme_t *lv_display_get_theme(lv_display_t *disp) */ -static PyObject *py_lv_anim_path_bounce_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_bounce)(a); + _res = ((lv_theme_t *(*)(lv_display_t *))lv_display_get_theme)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_anim_path_bounce_struct_method_def = { - "lv_anim_path_bounce", - (PyCFunction)py_lv_anim_path_bounce_struct_method, +static PyMethodDef py_lv_display_get_theme_struct_method_def = { + "lv_display_get_theme", + (PyCFunction)py_lv_display_get_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71874,28 +84714,28 @@ static PyMethodDef py_lv_anim_path_bounce_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_step(const lv_anim_t *a) + * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) */ -static PyObject *py_lv_anim_path_step_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_inactive_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_step)(a); + _res = ((uint32_t (*)(const lv_display_t *))lv_display_get_inactive_time)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_path_step_struct_method_def = { - "lv_anim_path_step", - (PyCFunction)py_lv_anim_path_step_struct_method, +static PyMethodDef py_lv_display_get_inactive_time_struct_method_def = { + "lv_display_get_inactive_time", + (PyCFunction)py_lv_display_get_inactive_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71903,158 +84743,67 @@ static PyMethodDef py_lv_anim_path_step_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_custom_bezier3(const lv_anim_t *a) + * void lv_display_trigger_activity(lv_display_t *disp) */ -static PyObject *py_lv_anim_path_custom_bezier3_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_trigger_activity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_custom_bezier3)(a); + ((void (*)(lv_display_t *))lv_display_trigger_activity)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_path_custom_bezier3_struct_method_def = { - "lv_anim_path_custom_bezier3", - (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, +static PyMethodDef py_lv_display_trigger_activity_struct_method_def = { + "lv_display_trigger_activity", + (PyCFunction)py_lv_display_trigger_activity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_anim_t_methods[] = { - {"init", (PyCFunction)py_lv_anim_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_var", (PyCFunction)py_lv_anim_set_var_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_exec_cb", (PyCFunction)py_lv_anim_set_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_duration", (PyCFunction)py_lv_anim_set_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_delay", (PyCFunction)py_lv_anim_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"resume", (PyCFunction)py_lv_anim_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pause", (PyCFunction)py_lv_anim_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pause_for", (PyCFunction)py_lv_anim_pause_for_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_paused", (PyCFunction)py_lv_anim_is_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_values", (PyCFunction)py_lv_anim_set_values_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_custom_exec_cb", (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_path_cb", (PyCFunction)py_lv_anim_set_path_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_start_cb", (PyCFunction)py_lv_anim_set_start_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_get_value_cb", (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_completed_cb", (PyCFunction)py_lv_anim_set_completed_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_deleted_cb", (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_duration", (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_time", (PyCFunction)py_lv_anim_set_reverse_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_delay", (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_count", (PyCFunction)py_lv_anim_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_delay", (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_early_apply", (PyCFunction)py_lv_anim_set_early_apply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_anim_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bezier3_param", (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"start", (PyCFunction)py_lv_anim_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_delay", (PyCFunction)py_lv_anim_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_playtime", (PyCFunction)py_lv_anim_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_time", (PyCFunction)py_lv_anim_get_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_repeat_count", (PyCFunction)py_lv_anim_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_anim_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"custom_delete", (PyCFunction)py_lv_anim_custom_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"custom_get", (PyCFunction)py_lv_anim_custom_get_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_linear", (PyCFunction)py_lv_anim_path_linear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_ease_in", (PyCFunction)py_lv_anim_path_ease_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_ease_out", (PyCFunction)py_lv_anim_path_ease_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_ease_in_out", (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_overshoot", (PyCFunction)py_lv_anim_path_overshoot_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_bounce", (PyCFunction)py_lv_anim_path_bounce_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_step", (PyCFunction)py_lv_anim_path_step_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_custom_bezier3", (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_anim_parameter_t_methods[] = {{NULL}}; -PyMethodDef py_lv_anim_bezier3_para_t_methods[] = {{NULL}}; - -/* - * Callback function lv_style_transition_dsc_init_path_cb (CPython) - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ -static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_style_transition_dsc_init_path_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } - int32_t _c_res = (int32_t)mp_obj_get_int(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * lvgl extension definition for: - * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) + * void lv_display_enable_invalidation(lv_display_t *disp, bool en) */ -static PyObject *py_lv_style_transition_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_enable_invalidation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *props_py; PyObject *path_cb_py; long time_val; long delay_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOllO", &props_py, &path_cb_py, &time_val, &delay_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_transition_dsc_t *tr = (lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(self); - void *user_data = mp_to_ptr(user_data_py); - const lv_style_prop_t *props = (const lv_style_prop_t *)mp_to_ptr(props_py); - uint32_t time = (uint32_t)time_val; - uint32_t delay = (uint32_t)delay_val; - void *path_cb = mp_lv_callback(path_cb_py, &lv_style_transition_dsc_init_path_cb_callback, "lv_style_transition_dsc_init_path_cb", &user_data, NULL, (NULL), (NULL)); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_style_transition_dsc_init)(tr, props, path_cb, time, delay, user_data); + ((void (*)(lv_display_t *, bool))lv_display_enable_invalidation)(disp, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_transition_dsc_init_struct_method_def = { - "lv_style_transition_dsc_init", - (PyCFunction)py_lv_style_transition_dsc_init_struct_method, +static PyMethodDef py_lv_display_enable_invalidation_struct_method_def = { + "lv_display_enable_invalidation", + (PyCFunction)py_lv_display_enable_invalidation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_style_transition_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_style_transition_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_display_delete(lv_display_t *disp) + * bool lv_display_is_invalidation_enabled(lv_display_t *disp) */ -static PyObject *py_lv_display_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_is_invalidation_enabled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -72062,17 +84811,18 @@ static PyObject *py_lv_display_delete_struct_method(PyObject *self, PyObject *py lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_delete)(disp); + _res = ((bool (*)(lv_display_t *))lv_display_is_invalidation_enabled)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_delete_struct_method_def = { - "lv_display_delete", - (PyCFunction)py_lv_display_delete_struct_method, +static PyMethodDef py_lv_display_is_invalidation_enabled_struct_method_def = { + "lv_display_is_invalidation_enabled", + (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72080,9 +84830,9 @@ static PyMethodDef py_lv_display_delete_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_default(lv_display_t *disp) + * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) */ -static PyObject *py_lv_display_set_default_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -72090,17 +84840,18 @@ static PyObject *py_lv_display_set_default_struct_method(PyObject *self, PyObjec lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_timer_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_set_default)(disp); + _res = ((lv_timer_t *(*)(lv_display_t *))lv_display_get_refr_timer)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_display_set_default_struct_method_def = { - "lv_display_set_default", - (PyCFunction)py_lv_display_set_default_struct_method, +static PyMethodDef py_lv_display_get_refr_timer_struct_method_def = { + "lv_display_get_refr_timer", + (PyCFunction)py_lv_display_get_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72108,9 +84859,9 @@ static PyMethodDef py_lv_display_set_default_struct_method_def = { /* * lvgl extension definition for: - * lv_display_t *lv_display_get_next(lv_display_t *disp) + * void lv_display_delete_refr_timer(lv_display_t *disp) */ -static PyObject *py_lv_display_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_delete_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -72118,111 +84869,143 @@ static PyObject *py_lv_display_get_next_struct_method(PyObject *self, PyObject * lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; lvpy_lock(); - _res = ((lv_display_t *(*)(lv_display_t *))lv_display_get_next)(disp); + ((void (*)(lv_display_t *))lv_display_delete_refr_timer)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_next_struct_method_def = { - "lv_display_get_next", - (PyCFunction)py_lv_display_get_next_struct_method, +static PyMethodDef py_lv_display_delete_refr_timer_struct_method_def = { + "lv_display_delete_refr_timer", + (PyCFunction)py_lv_display_delete_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) + * Callback function lv_display_register_vsync_event_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) */ -static PyObject *py_lv_display_set_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long hor_res_val; long ver_res_val; - if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t hor_res = (int32_t)hor_res_val; - int32_t ver_res = (int32_t)ver_res_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_resolution)(disp, hor_res, ver_res); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_register_vsync_event_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_resolution_struct_method_def = { - "lv_display_set_resolution", - (PyCFunction)py_lv_display_set_resolution_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_display_set_physical_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) + * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static PyObject *py_lv_display_set_physical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_register_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long hor_res_val; long ver_res_val; - if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t hor_res = (int32_t)hor_res_val; - int32_t ver_res = (int32_t)ver_res_val; + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_register_vsync_event_event_cb_callback, "lv_display_register_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_physical_resolution)(disp, hor_res, ver_res); + _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_register_vsync_event)(disp, event_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_set_physical_resolution_struct_method_def = { - "lv_display_set_physical_resolution", - (PyCFunction)py_lv_display_set_physical_resolution_struct_method, +static PyMethodDef py_lv_display_register_vsync_event_struct_method_def = { + "lv_display_register_vsync_event", + (PyCFunction)py_lv_display_register_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_display_unregister_vsync_event_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_display_unregister_vsync_event_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_unregister_vsync_event_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_display_set_offset(lv_display_t *disp, int32_t x, int32_t y) + * bool lv_display_unregister_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static PyObject *py_lv_display_set_offset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_unregister_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_unregister_vsync_event_event_cb_callback, "lv_display_unregister_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_offset)(disp, x, y); + _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_unregister_vsync_event)(disp, event_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_set_offset_struct_method_def = { - "lv_display_set_offset", - (PyCFunction)py_lv_display_set_offset_struct_method, +static PyMethodDef py_lv_display_unregister_vsync_event_struct_method_def = { + "lv_display_unregister_vsync_event", + (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72230,29 +85013,30 @@ static PyMethodDef py_lv_display_set_offset_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) + * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) */ -static PyObject *py_lv_display_set_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_send_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *rotation_py; - if (!PyArg_ParseTuple(py_args, "O", &rotation_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "O", ¶m_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_rotation_t))lv_display_set_rotation)(disp, rotation); + _res = ((lv_result_t (*)(lv_display_t *, void *))lv_display_send_vsync_event)(disp, param); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_set_rotation_struct_method_def = { - "lv_display_set_rotation", - (PyCFunction)py_lv_display_set_rotation_struct_method, +static PyMethodDef py_lv_display_send_vsync_event_struct_method_def = { + "lv_display_send_vsync_event", + (PyCFunction)py_lv_display_send_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72260,29 +85044,29 @@ static PyMethodDef py_lv_display_set_rotation_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) + * void lv_display_set_user_data(lv_display_t *disp, void *user_data) */ -static PyObject *py_lv_display_set_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long enable_val; - if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - bool enable = (enable_val != 0); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, bool))lv_display_set_matrix_rotation)(disp, enable); + ((void (*)(lv_display_t *, void *))lv_display_set_user_data)(disp, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_matrix_rotation_struct_method_def = { - "lv_display_set_matrix_rotation", - (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, +static PyMethodDef py_lv_display_set_user_data_struct_method_def = { + "lv_display_set_user_data", + (PyCFunction)py_lv_display_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72290,29 +85074,29 @@ static PyMethodDef py_lv_display_set_matrix_rotation_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) + * void lv_display_set_driver_data(lv_display_t *disp, void *driver_data) */ -static PyObject *py_lv_display_set_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long dpi_val; - if (!PyArg_ParseTuple(py_args, "l", &dpi_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *driver_data_py; + if (!PyArg_ParseTuple(py_args, "O", &driver_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t dpi = (int32_t)dpi_val; + void *driver_data = mp_to_ptr(driver_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, int32_t))lv_display_set_dpi)(disp, dpi); + ((void (*)(lv_display_t *, void *))lv_display_set_driver_data)(disp, driver_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_dpi_struct_method_def = { - "lv_display_set_dpi", - (PyCFunction)py_lv_display_set_dpi_struct_method, +static PyMethodDef py_lv_display_set_driver_data_struct_method_def = { + "lv_display_set_driver_data", + (PyCFunction)py_lv_display_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72320,28 +85104,28 @@ static PyMethodDef py_lv_display_set_dpi_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) + * void *lv_display_get_user_data(lv_display_t *disp) */ -static PyObject *py_lv_display_get_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + void * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_horizontal_resolution)(disp); + _res = ((void *(*)(lv_display_t *))lv_display_get_user_data)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_horizontal_resolution_struct_method_def = { - "lv_display_get_horizontal_resolution", - (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, +static PyMethodDef py_lv_display_get_user_data_struct_method_def = { + "lv_display_get_user_data", + (PyCFunction)py_lv_display_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72349,28 +85133,28 @@ static PyMethodDef py_lv_display_get_horizontal_resolution_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_vertical_resolution(const lv_display_t *disp) + * void *lv_display_get_driver_data(lv_display_t *disp) */ -static PyObject *py_lv_display_get_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + void * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_vertical_resolution)(disp); + _res = ((void *(*)(lv_display_t *))lv_display_get_driver_data)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_vertical_resolution_struct_method_def = { - "lv_display_get_vertical_resolution", - (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, +static PyMethodDef py_lv_display_get_driver_data_struct_method_def = { + "lv_display_get_driver_data", + (PyCFunction)py_lv_display_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72378,28 +85162,28 @@ static PyMethodDef py_lv_display_get_vertical_resolution_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_original_horizontal_resolution(const lv_display_t *disp) + * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) */ -static PyObject *py_lv_display_get_original_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_buf_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_horizontal_resolution)(disp); + _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_display_get_buf_active)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_get_original_horizontal_resolution_struct_method_def = { - "lv_display_get_original_horizontal_resolution", - (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, +static PyMethodDef py_lv_display_get_buf_active_struct_method_def = { + "lv_display_get_buf_active", + (PyCFunction)py_lv_display_get_buf_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72407,28 +85191,29 @@ static PyMethodDef py_lv_display_get_original_horizontal_resolution_struct_metho /* * lvgl extension definition for: - * int32_t lv_display_get_original_vertical_resolution(const lv_display_t *disp) + * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) */ -static PyObject *py_lv_display_get_original_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_rotate_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_vertical_resolution)(disp); + ((void (*)(lv_display_t *, lv_area_t *))lv_display_rotate_area)(disp, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_original_vertical_resolution_struct_method_def = { - "lv_display_get_original_vertical_resolution", - (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, +static PyMethodDef py_lv_display_rotate_area_struct_method_def = { + "lv_display_rotate_area", + (PyCFunction)py_lv_display_rotate_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72436,28 +85221,29 @@ static PyMethodDef py_lv_display_get_original_vertical_resolution_struct_method_ /* * lvgl extension definition for: - * int32_t lv_display_get_physical_horizontal_resolution(const lv_display_t *disp) + * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) */ -static PyObject *py_lv_display_get_physical_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_rotate_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_horizontal_resolution)(disp); + ((void (*)(lv_display_t *, lv_point_t *))lv_display_rotate_point)(disp, point); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_physical_horizontal_resolution_struct_method_def = { - "lv_display_get_physical_horizontal_resolution", - (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, +static PyMethodDef py_lv_display_rotate_point_struct_method_def = { + "lv_display_rotate_point", + (PyCFunction)py_lv_display_rotate_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72465,28 +85251,29 @@ static PyMethodDef py_lv_display_get_physical_horizontal_resolution_struct_metho /* * lvgl extension definition for: - * int32_t lv_display_get_physical_vertical_resolution(const lv_display_t *disp) + * void lv_display_rotate_point_ccw(lv_display_t *disp, lv_point_t *point) */ -static PyObject *py_lv_display_get_physical_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_rotate_point_ccw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_vertical_resolution)(disp); + ((void (*)(lv_display_t *, lv_point_t *))lv_display_rotate_point_ccw)(disp, point); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_physical_vertical_resolution_struct_method_def = { - "lv_display_get_physical_vertical_resolution", - (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, +static PyMethodDef py_lv_display_rotate_point_ccw_struct_method_def = { + "lv_display_rotate_point_ccw", + (PyCFunction)py_lv_display_rotate_point_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72494,28 +85281,28 @@ static PyMethodDef py_lv_display_get_physical_vertical_resolution_struct_method_ /* * lvgl extension definition for: - * int32_t lv_display_get_offset_x(const lv_display_t *disp) + * uint32_t lv_display_get_draw_buf_size(lv_display_t *disp) */ -static PyObject *py_lv_display_get_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_x)(disp); + _res = ((uint32_t (*)(lv_display_t *))lv_display_get_draw_buf_size)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_offset_x_struct_method_def = { - "lv_display_get_offset_x", - (PyCFunction)py_lv_display_get_offset_x_struct_method, +static PyMethodDef py_lv_display_get_draw_buf_size_struct_method_def = { + "lv_display_get_draw_buf_size", + (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72523,28 +85310,31 @@ static PyMethodDef py_lv_display_get_offset_x_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_offset_y(const lv_display_t *disp) + * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) */ -static PyObject *py_lv_display_get_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_invalidated_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long width_val; long height_val; + if (!PyArg_ParseTuple(py_args, "ll", &width_val, &height_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + uint32_t width = (uint32_t)width_val; + uint32_t height = (uint32_t)height_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_y)(disp); + _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_display_get_invalidated_draw_buf_size)(disp, width, height); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_offset_y_struct_method_def = { - "lv_display_get_offset_y", - (PyCFunction)py_lv_display_get_offset_y_struct_method, +static PyMethodDef py_lv_display_get_invalidated_draw_buf_size_struct_method_def = { + "lv_display_get_invalidated_draw_buf_size", + (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72552,28 +85342,30 @@ static PyMethodDef py_lv_display_get_offset_y_struct_method_def = { /* * lvgl extension definition for: - * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) + * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) */ -static PyObject *py_lv_display_get_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_dpx_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long n_val; + if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t n = (int32_t)n_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_rotation_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_display_get_rotation)(disp); + _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_display_dpx)(disp, n); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_rotation_struct_method_def = { - "lv_display_get_rotation", - (PyCFunction)py_lv_display_get_rotation_struct_method, +static PyMethodDef py_lv_display_dpx_struct_method_def = { + "lv_display_dpx", + (PyCFunction)py_lv_display_dpx_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72581,28 +85373,30 @@ static PyMethodDef py_lv_display_get_rotation_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_get_matrix_rotation(lv_display_t *disp) + * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) */ -static PyObject *py_lv_display_get_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_get_matrix_rotation)(disp); + _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_draw_dispatch_layer)(disp, layer); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_display_get_matrix_rotation_struct_method_def = { - "lv_display_get_matrix_rotation", - (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, +static PyMethodDef py_lv_draw_dispatch_layer_struct_method_def = { + "lv_draw_dispatch_layer", + (PyCFunction)py_lv_draw_dispatch_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72610,61 +85404,142 @@ static PyMethodDef py_lv_display_get_matrix_rotation_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_dpi(const lv_display_t *disp) + * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) */ -static PyObject *py_lv_display_get_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_draw_buf_handlers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *handlers_py; + if (!PyArg_ParseTuple(py_args, "O", &handlers_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(handlers_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_dpi)(disp); + ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_display_set_draw_buf_handlers)(disp, handlers); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_dpi_struct_method_def = { - "lv_display_get_dpi", - (PyCFunction)py_lv_display_get_dpi_struct_method, +static PyMethodDef py_lv_display_set_draw_buf_handlers_struct_method_def = { + "lv_display_set_draw_buf_handlers", + (PyCFunction)py_lv_display_set_draw_buf_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_display_t_methods[] = { + {"delete", (PyCFunction)py_lv_display_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_default", (PyCFunction)py_lv_display_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_next", (PyCFunction)py_lv_display_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_resolution", (PyCFunction)py_lv_display_set_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_physical_resolution", (PyCFunction)py_lv_display_set_physical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_offset", (PyCFunction)py_lv_display_set_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rotation", (PyCFunction)py_lv_display_set_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_matrix_rotation", (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_dpi", (PyCFunction)py_lv_display_set_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_horizontal_resolution", (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_vertical_resolution", (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_original_horizontal_resolution", (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_original_vertical_resolution", (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_physical_horizontal_resolution", (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_physical_vertical_resolution", (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_offset_x", (PyCFunction)py_lv_display_get_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_offset_y", (PyCFunction)py_lv_display_get_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rotation", (PyCFunction)py_lv_display_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_matrix_rotation", (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dpi", (PyCFunction)py_lv_display_get_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_buffers", (PyCFunction)py_lv_display_set_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_buffers_with_stride", (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_draw_buffers", (PyCFunction)py_lv_display_set_draw_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_3rd_draw_buffer", (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_render_mode", (PyCFunction)py_lv_display_set_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flush_cb", (PyCFunction)py_lv_display_set_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_flush_cb", (PyCFunction)py_lv_display_get_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flush_wait_cb", (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_sync_cb", (PyCFunction)py_lv_display_set_sync_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_sync_wait_cb", (PyCFunction)py_lv_display_set_sync_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_color_format", (PyCFunction)py_lv_display_set_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_color_format", (PyCFunction)py_lv_display_get_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tile_cnt", (PyCFunction)py_lv_display_set_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tile_cnt", (PyCFunction)py_lv_display_get_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_antialiasing", (PyCFunction)py_lv_display_set_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_antialiasing", (PyCFunction)py_lv_display_get_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"flush_ready", (PyCFunction)py_lv_display_flush_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"flush_is_last", (PyCFunction)py_lv_display_flush_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sync_ready", (PyCFunction)py_lv_display_sync_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sync_is_last", (PyCFunction)py_lv_display_sync_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_double_buffered", (PyCFunction)py_lv_display_is_double_buffered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_render_mode", (PyCFunction)py_lv_display_get_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_screen_active", (PyCFunction)py_lv_display_get_screen_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_screen_prev", (PyCFunction)py_lv_display_get_screen_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_screen_loading", (PyCFunction)py_lv_display_get_screen_loading_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer_top", (PyCFunction)py_lv_display_get_layer_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer_sys", (PyCFunction)py_lv_display_get_layer_sys_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer_bottom", (PyCFunction)py_lv_display_get_layer_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_event_cb", (PyCFunction)py_lv_display_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_event_count", (PyCFunction)py_lv_display_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_event_dsc", (PyCFunction)py_lv_display_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_event", (PyCFunction)py_lv_display_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_event_cb_with_user_data", (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"send_event", (PyCFunction)py_lv_display_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_theme", (PyCFunction)py_lv_display_set_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_theme", (PyCFunction)py_lv_display_get_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_inactive_time", (PyCFunction)py_lv_display_get_inactive_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"trigger_activity", (PyCFunction)py_lv_display_trigger_activity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"enable_invalidation", (PyCFunction)py_lv_display_enable_invalidation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_invalidation_enabled", (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_refr_timer", (PyCFunction)py_lv_display_get_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_refr_timer", (PyCFunction)py_lv_display_delete_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"register_vsync_event", (PyCFunction)py_lv_display_register_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"unregister_vsync_event", (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"send_vsync_event", (PyCFunction)py_lv_display_send_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_display_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_driver_data", (PyCFunction)py_lv_display_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_display_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_driver_data", (PyCFunction)py_lv_display_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_buf_active", (PyCFunction)py_lv_display_get_buf_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"rotate_area", (PyCFunction)py_lv_display_rotate_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"rotate_point", (PyCFunction)py_lv_display_rotate_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"rotate_point_ccw", (PyCFunction)py_lv_display_rotate_point_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_draw_buf_size", (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_invalidated_draw_buf_size", (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dpx", (PyCFunction)py_lv_display_dpx_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"draw_dispatch_layer", (PyCFunction)py_lv_draw_dispatch_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_draw_buf_handlers", (PyCFunction)py_lv_display_set_draw_buf_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) + * void lv_draw_buf_invalidate_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ -static PyObject *py_lv_display_set_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_invalidate_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; PyObject *render_mode_py; - if (!PyArg_ParseTuple(py_args, "OOlO", &buf1_py, &buf2_py, &buf_size_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *buf1 = mp_to_ptr(buf1_py); - void *buf2 = mp_to_ptr(buf2_py); - uint32_t buf_size = (uint32_t)buf_size_val; - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_display_set_buffers)(disp, buf1, buf2, buf_size, render_mode); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_invalidate_cache)(draw_buf, area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_buffers_struct_method_def = { - "lv_display_set_buffers", - (PyCFunction)py_lv_display_set_buffers_struct_method, +static PyMethodDef py_lv_draw_buf_invalidate_cache_struct_method_def = { + "lv_draw_buf_invalidate_cache", + (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72672,33 +85547,29 @@ static PyMethodDef py_lv_display_set_buffers_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) + * void lv_draw_buf_flush_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ -static PyObject *py_lv_display_set_buffers_with_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_flush_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; long stride_val; PyObject *render_mode_py; - if (!PyArg_ParseTuple(py_args, "OOllO", &buf1_py, &buf2_py, &buf_size_val, &stride_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *buf1 = mp_to_ptr(buf1_py); - void *buf2 = mp_to_ptr(buf2_py); - uint32_t buf_size = (uint32_t)buf_size_val; - uint32_t stride = (uint32_t)stride_val; - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_display_set_buffers_with_stride)(disp, buf1, buf2, buf_size, stride, render_mode); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_flush_cache)(draw_buf, area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_buffers_with_stride_struct_method_def = { - "lv_display_set_buffers_with_stride", - (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, +static PyMethodDef py_lv_draw_buf_flush_cache_struct_method_def = { + "lv_draw_buf_flush_cache", + (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72706,30 +85577,29 @@ static PyMethodDef py_lv_display_set_buffers_with_stride_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) + * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) */ -static PyObject *py_lv_display_set_draw_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf1_py; PyObject *buf2_py; - if (!PyArg_ParseTuple(py_args, "OO", &buf1_py, &buf2_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(buf1_py); - lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(buf2_py); + PyObject *a_py; + if (!PyArg_ParseTuple(py_args, "O", &a_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(a_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_display_set_draw_buffers)(disp, buf1, buf2); + ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_clear)(draw_buf, a); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_draw_buffers_struct_method_def = { - "lv_display_set_draw_buffers", - (PyCFunction)py_lv_display_set_draw_buffers_struct_method, +static PyMethodDef py_lv_draw_buf_clear_struct_method_def = { + "lv_draw_buf_clear", + (PyCFunction)py_lv_draw_buf_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72737,29 +85607,28 @@ static PyMethodDef py_lv_display_set_draw_buffers_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) + * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_set_3rd_draw_buffer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_dup_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf3_py; - if (!PyArg_ParseTuple(py_args, "O", &buf3_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(buf3_py); + + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_display_set_3rd_draw_buffer)(disp, buf3); + _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_draw_buf_dup)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_set_3rd_draw_buffer_struct_method_def = { - "lv_display_set_3rd_draw_buffer", - (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, +static PyMethodDef py_lv_draw_buf_dup_struct_method_def = { + "lv_draw_buf_dup", + (PyCFunction)py_lv_draw_buf_dup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72767,155 +85636,97 @@ static PyMethodDef py_lv_display_set_3rd_draw_buffer_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) + * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) */ -static PyObject *py_lv_display_set_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *render_mode_py; - if (!PyArg_ParseTuple(py_args, "O", &render_mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); + long w_val; long h_val; PyObject *cf_py; long stride_val; PyObject *data_py; long data_size_val; + if (!PyArg_ParseTuple(py_args, "llOlOl", &w_val, &h_val, &cf_py, &stride_val, &data_py, &data_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t stride = (uint32_t)stride_val; + void *data = mp_to_ptr(data_py); + uint32_t data_size = (uint32_t)data_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_display_set_render_mode)(disp, render_mode); + _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_draw_buf_init)(draw_buf, w, h, cf, stride, data, data_size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_set_render_mode_struct_method_def = { - "lv_display_set_render_mode", - (PyCFunction)py_lv_display_set_render_mode_struct_method, +static PyMethodDef py_lv_draw_buf_init_struct_method_def = { + "lv_draw_buf_init", + (PyCFunction)py_lv_draw_buf_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_t_flush_cb (CPython) - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) - */ -static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_flush_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_area_t((void*)arg1); - PyObject *py_arg2 = mp_array_from_u8ptr((void*)arg2); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) + * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) */ -static PyObject *py_lv_display_set_flush_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_reshape_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flush_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &flush_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *flush_cb = mp_lv_callback(flush_cb_py, &lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", &disp->user_data, disp, (NULL), (NULL)); + PyObject *cf_py; long w_val; long h_val; long stride_val; + if (!PyArg_ParseTuple(py_args, "Olll", &cf_py, &w_val, &h_val, &stride_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_display_set_flush_cb)(disp, flush_cb); + _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_draw_buf_reshape)(draw_buf, cf, w, h, stride); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_set_flush_cb_struct_method_def = { - "lv_display_set_flush_cb", - (PyCFunction)py_lv_display_set_flush_cb_struct_method, +static PyMethodDef py_lv_draw_buf_reshape_struct_method_def = { + "lv_draw_buf_reshape", + (PyCFunction)py_lv_draw_buf_reshape_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_t_wait_cb (CPython) - * void lv_display_flush_wait_cb_t(lv_display_t *disp) - */ -static void lv_display_t_wait_cb_callback(lv_display_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_wait_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) + * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_set_flush_wait_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *wait_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &wait_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *wait_cb = mp_lv_callback(wait_cb_py, &lv_display_t_wait_cb_callback, "lv_display_t_wait_cb", &disp->user_data, disp, (NULL), (NULL)); + + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_display_set_flush_wait_cb)(disp, wait_cb); + ((void (*)(lv_draw_buf_t *))lv_draw_buf_destroy)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_flush_wait_cb_struct_method_def = { - "lv_display_set_flush_wait_cb", - (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, +static PyMethodDef py_lv_draw_buf_destroy_struct_method_def = { + "lv_draw_buf_destroy", + (PyCFunction)py_lv_draw_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72923,29 +85734,31 @@ static PyMethodDef py_lv_display_set_flush_wait_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) + * void lv_draw_buf_copy(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) */ -static PyObject *py_lv_display_set_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "O", &color_format_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + PyObject *dest_area_py; PyObject *src_py; PyObject *src_area_py; + if (!PyArg_ParseTuple(py_args, "OOO", &dest_area_py, &src_py, &src_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *dest = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); + const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(src_py); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(src_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_color_format_t))lv_display_set_color_format)(disp, color_format); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_copy)(dest, dest_area, src, src_area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_color_format_struct_method_def = { - "lv_display_set_color_format", - (PyCFunction)py_lv_display_set_color_format_struct_method, +static PyMethodDef py_lv_draw_buf_copy_struct_method_def = { + "lv_draw_buf_copy", + (PyCFunction)py_lv_draw_buf_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72953,28 +85766,31 @@ static PyMethodDef py_lv_display_set_color_format_struct_method_def = { /* * lvgl extension definition for: - * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) + * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static PyObject *py_lv_display_get_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_goto_xy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t x = (uint32_t)x_val; + uint32_t y = (uint32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t _res; + void * _res; lvpy_lock(); - _res = ((lv_color_format_t (*)(lv_display_t *))lv_display_get_color_format)(disp); + _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_draw_buf_goto_xy)(buf, x, y); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_color_format_struct_method_def = { - "lv_display_get_color_format", - (PyCFunction)py_lv_display_get_color_format_struct_method, +static PyMethodDef py_lv_draw_buf_goto_xy_struct_method_def = { + "lv_draw_buf_goto_xy", + (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72982,29 +85798,31 @@ static PyMethodDef py_lv_display_get_color_format_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) + * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static PyObject *py_lv_display_set_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_is_position_valid_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long tile_cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &tile_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t tile_cnt = (uint32_t)tile_cnt_val; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t x = (uint32_t)x_val; + uint32_t y = (uint32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *, uint32_t))lv_display_set_tile_cnt)(disp, tile_cnt); + _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_draw_buf_is_position_valid)(buf, x, y); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_set_tile_cnt_struct_method_def = { - "lv_display_set_tile_cnt", - (PyCFunction)py_lv_display_set_tile_cnt_struct_method, +static PyMethodDef py_lv_draw_buf_is_position_valid_struct_method_def = { + "lv_draw_buf_is_position_valid", + (PyCFunction)py_lv_draw_buf_is_position_valid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73012,28 +85830,30 @@ static PyMethodDef py_lv_display_set_tile_cnt_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) + * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) */ -static PyObject *py_lv_display_get_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_adjust_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long stride_val; + if (!PyArg_ParseTuple(py_args, "l", &stride_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *src = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *))lv_display_get_tile_cnt)(disp); + _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_draw_buf_adjust_stride)(src, stride); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_tile_cnt_struct_method_def = { - "lv_display_get_tile_cnt", - (PyCFunction)py_lv_display_get_tile_cnt_struct_method, +static PyMethodDef py_lv_draw_buf_adjust_stride_struct_method_def = { + "lv_draw_buf_adjust_stride", + (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73041,29 +85861,28 @@ static PyMethodDef py_lv_display_get_tile_cnt_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_antialiasing(lv_display_t *disp, bool en) + * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_set_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - bool en = (en_val != 0); + + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, bool))lv_display_set_antialiasing)(disp, en); + _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_draw_buf_premultiply)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_set_antialiasing_struct_method_def = { - "lv_display_set_antialiasing", - (PyCFunction)py_lv_display_set_antialiasing_struct_method, +static PyMethodDef py_lv_draw_buf_premultiply_struct_method_def = { + "lv_draw_buf_premultiply", + (PyCFunction)py_lv_draw_buf_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73071,28 +85890,30 @@ static PyMethodDef py_lv_display_set_antialiasing_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_get_antialiasing(lv_display_t *disp) + * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static PyObject *py_lv_display_get_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_has_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_get_antialiasing)(disp); + _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_has_flag)(draw_buf, flag); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_display_get_antialiasing_struct_method_def = { - "lv_display_get_antialiasing", - (PyCFunction)py_lv_display_get_antialiasing_struct_method, +static PyMethodDef py_lv_draw_buf_has_flag_struct_method_def = { + "lv_draw_buf_has_flag", + (PyCFunction)py_lv_draw_buf_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73100,27 +85921,29 @@ static PyMethodDef py_lv_display_get_antialiasing_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_flush_ready(lv_display_t *disp) + * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static PyObject *py_lv_display_flush_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_set_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_flush_ready)(disp); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_set_flag)(draw_buf, flag); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_flush_ready_struct_method_def = { - "lv_display_flush_ready", - (PyCFunction)py_lv_display_flush_ready_struct_method, +static PyMethodDef py_lv_draw_buf_set_flag_struct_method_def = { + "lv_draw_buf_set_flag", + (PyCFunction)py_lv_draw_buf_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73128,28 +85951,29 @@ static PyMethodDef py_lv_display_flush_ready_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_flush_is_last(lv_display_t *disp) + * void lv_draw_buf_clear_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static PyObject *py_lv_display_flush_is_last_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_clear_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_flush_is_last)(disp); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_clear_flag)(draw_buf, flag); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_flush_is_last_struct_method_def = { - "lv_display_flush_is_last", - (PyCFunction)py_lv_display_flush_is_last_struct_method, +static PyMethodDef py_lv_draw_buf_clear_flag_struct_method_def = { + "lv_draw_buf_clear_flag", + (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73157,28 +85981,30 @@ static PyMethodDef py_lv_display_flush_is_last_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_is_double_buffered(lv_display_t *disp) + * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) */ -static PyObject *py_lv_display_is_double_buffered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_from_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *img_py; + if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(img_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_result_t _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_is_double_buffered)(disp); + _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_draw_buf_from_image)(buf, img); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_is_double_buffered_struct_method_def = { - "lv_display_is_double_buffered", - (PyCFunction)py_lv_display_is_double_buffered_struct_method, +static PyMethodDef py_lv_draw_buf_from_image_struct_method_def = { + "lv_draw_buf_from_image", + (PyCFunction)py_lv_draw_buf_from_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73186,28 +86012,29 @@ static PyMethodDef py_lv_display_is_double_buffered_struct_method_def = { /* * lvgl extension definition for: - * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) + * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) */ -static PyObject *py_lv_display_get_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_to_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *img_py; + if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(img_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_render_mode_t _res; lvpy_lock(); - _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_display_get_render_mode)(disp); + ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_draw_buf_to_image)(buf, img); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_render_mode_struct_method_def = { - "lv_display_get_render_mode", - (PyCFunction)py_lv_display_get_render_mode_struct_method, +static PyMethodDef py_lv_draw_buf_to_image_struct_method_def = { + "lv_draw_buf_to_image", + (PyCFunction)py_lv_draw_buf_to_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73215,28 +86042,30 @@ static PyMethodDef py_lv_display_get_render_mode_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) + * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) */ -static PyObject *py_lv_display_get_screen_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_set_palette_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long index_val; PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "lO", &index_val, &color_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint8_t index = (uint8_t)index_val; + lv_color32_t color = mp_write_lv_color32_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_active)(disp); + ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_draw_buf_set_palette)(draw_buf, index, color); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_screen_active_struct_method_def = { - "lv_display_get_screen_active", - (PyCFunction)py_lv_display_get_screen_active_struct_method, +static PyMethodDef py_lv_draw_buf_set_palette_struct_method_def = { + "lv_draw_buf_set_palette", + (PyCFunction)py_lv_draw_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73244,28 +86073,30 @@ static PyMethodDef py_lv_display_get_screen_active_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_prev(lv_display_t *disp) + * void lv_draw_buf_clear_ex(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ -static PyObject *py_lv_display_get_screen_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_clear_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *a_py; PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "OO", &a_py, &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(a_py); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_prev)(disp); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_draw_buf_clear_ex)(draw_buf, a, layer); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_screen_prev_struct_method_def = { - "lv_display_get_screen_prev", - (PyCFunction)py_lv_display_get_screen_prev_struct_method, +static PyMethodDef py_lv_draw_buf_clear_ex_struct_method_def = { + "lv_draw_buf_clear_ex", + (PyCFunction)py_lv_draw_buf_clear_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73273,28 +86104,28 @@ static PyMethodDef py_lv_display_get_screen_prev_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_loading(lv_display_t *disp) + * lv_result_t lv_draw_buf_convert_premultiply(lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_get_screen_loading_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_convert_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_loading)(disp); + _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_draw_buf_convert_premultiply)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_screen_loading_struct_method_def = { - "lv_display_get_screen_loading", - (PyCFunction)py_lv_display_get_screen_loading_struct_method, +static PyMethodDef py_lv_draw_buf_convert_premultiply_struct_method_def = { + "lv_draw_buf_convert_premultiply", + (PyCFunction)py_lv_draw_buf_convert_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73302,149 +86133,202 @@ static PyMethodDef py_lv_display_get_screen_loading_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_layer_top(lv_display_t *disp) + * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) */ -static PyObject *py_lv_display_get_layer_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_save_to_file_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_top)(disp); + _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_draw_buf_save_to_file)(draw_buf, path); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_layer_top_struct_method_def = { - "lv_display_get_layer_top", - (PyCFunction)py_lv_display_get_layer_top_struct_method, +static PyMethodDef py_lv_draw_buf_save_to_file_struct_method_def = { + "lv_draw_buf_save_to_file", + (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_buf_t_methods[] = { + {"invalidate_cache", (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"flush_cache", (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear", (PyCFunction)py_lv_draw_buf_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dup", (PyCFunction)py_lv_draw_buf_dup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_draw_buf_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reshape", (PyCFunction)py_lv_draw_buf_reshape_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"destroy", (PyCFunction)py_lv_draw_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy", (PyCFunction)py_lv_draw_buf_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"goto_xy", (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_position_valid", (PyCFunction)py_lv_draw_buf_is_position_valid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"adjust_stride", (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"premultiply", (PyCFunction)py_lv_draw_buf_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_flag", (PyCFunction)py_lv_draw_buf_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flag", (PyCFunction)py_lv_draw_buf_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_flag", (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"from_image", (PyCFunction)py_lv_draw_buf_from_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_image", (PyCFunction)py_lv_draw_buf_to_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_palette", (PyCFunction)py_lv_draw_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_ex", (PyCFunction)py_lv_draw_buf_clear_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"convert_premultiply", (PyCFunction)py_lv_draw_buf_convert_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"save_to_file", (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_image_header_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_layer_sys(lv_display_t *disp) + * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) */ -static PyObject *py_lv_display_get_layer_sys_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_init_with_default_handlers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_sys)(disp); + ((void (*)(lv_draw_buf_handlers_t *))lv_draw_buf_init_with_default_handlers)(handlers); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_layer_sys_struct_method_def = { - "lv_display_get_layer_sys", - (PyCFunction)py_lv_display_get_layer_sys_struct_method, +static PyMethodDef py_lv_draw_buf_init_with_default_handlers_struct_method_def = { + "lv_draw_buf_init_with_default_handlers", + (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) + * lv_draw_buf_malloc_cb_t buf_malloc_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_free_cb_t(void *draw_buf) + * lv_draw_buf_free_cb_t buf_free_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * lv_draw_buf_copy_cb_t buf_copy_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) + * lv_draw_buf_align_cb_t align_pointer_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ + + /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_layer_bottom(lv_display_t *disp) + * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) */ -static PyObject *py_lv_display_get_layer_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_handlers_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *buf_malloc_cb_py; PyObject *buf_free_cb_py; PyObject *buf_copy_cb_py; PyObject *align_pointer_cb_py; PyObject *invalidate_cache_cb_py; PyObject *flush_cache_cb_py; PyObject *width_to_stride_cb_py; + if (!PyArg_ParseTuple(py_args, "OOOOOOO", &buf_malloc_cb_py, &buf_free_cb_py, &buf_copy_cb_py, &align_pointer_cb_py, &invalidate_cache_cb_py, &flush_cache_cb_py, &width_to_stride_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + void *buf_malloc_cb = NULL; + void *buf_free_cb = NULL; + void *buf_copy_cb = NULL; + void *align_pointer_cb = NULL; + void *invalidate_cache_cb = NULL; + void *flush_cache_cb = NULL; + void *width_to_stride_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_bottom)(disp); + ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_draw_buf_handlers_init)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_layer_bottom_struct_method_def = { - "lv_display_get_layer_bottom", - (PyCFunction)py_lv_display_get_layer_bottom_struct_method, +static PyMethodDef py_lv_draw_buf_handlers_init_struct_method_def = { + "lv_draw_buf_handlers_init", + (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_add_event_cb_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_add_event_cb_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) */ -static PyObject *py_lv_display_add_event_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_align_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - lv_event_code_t filter = (int)mp_obj_get_int(filter_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_add_event_cb_event_cb_callback, "lv_display_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); + PyObject *buf_py; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + void *buf = mp_to_ptr(buf_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_display_add_event_cb)(disp, event_cb, filter, user_data); + _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_draw_buf_align_ex)(handlers, buf, color_format); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_add_event_cb_struct_method_def = { - "lv_display_add_event_cb", - (PyCFunction)py_lv_display_add_event_cb_struct_method, +static PyMethodDef py_lv_draw_buf_align_ex_struct_method_def = { + "lv_draw_buf_align_ex", + (PyCFunction)py_lv_draw_buf_align_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73452,28 +86336,31 @@ static PyMethodDef py_lv_display_add_event_cb_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_event_count(lv_display_t *disp) + * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) */ -static PyObject *py_lv_display_get_event_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_width_to_stride_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long w_val; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + uint32_t w = (uint32_t)w_val; + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *))lv_display_get_event_count)(disp); + _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride_ex)(handlers, w, color_format); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_event_count_struct_method_def = { - "lv_display_get_event_count", - (PyCFunction)py_lv_display_get_event_count_struct_method, +static PyMethodDef py_lv_draw_buf_width_to_stride_ex_struct_method_def = { + "lv_draw_buf_width_to_stride_ex", + (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73481,30 +86368,33 @@ static PyMethodDef py_lv_display_get_event_count_struct_method_def = { /* * lvgl extension definition for: - * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) + * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static PyObject *py_lv_display_get_event_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_create_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t index = (uint32_t)index_val; + long w_val; long h_val; PyObject *cf_py; long stride_val; + if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_display_get_event_dsc)(disp, index); + _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create_ex)(handlers, w, h, cf, stride); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_get_event_dsc_struct_method_def = { - "lv_display_get_event_dsc", - (PyCFunction)py_lv_display_get_event_dsc_struct_method, +static PyMethodDef py_lv_draw_buf_create_ex_struct_method_def = { + "lv_draw_buf_create_ex", + (PyCFunction)py_lv_draw_buf_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73512,93 +86402,71 @@ static PyMethodDef py_lv_display_get_event_dsc_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_delete_event(lv_display_t *disp, uint32_t index) + * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_delete_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_dup_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t index = (uint32_t)index_val; + PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, uint32_t))lv_display_delete_event)(disp, index); + _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_draw_buf_dup_ex)(handlers, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_delete_event_struct_method_def = { - "lv_display_delete_event", - (PyCFunction)py_lv_display_delete_event_struct_method, +static PyMethodDef py_lv_draw_buf_dup_ex_struct_method_def = { + "lv_draw_buf_dup_ex", + (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_remove_event_cb_with_user_data_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_remove_event_cb_with_user_data_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} +PyMethodDef py_lv_draw_buf_handlers_t_methods[] = { + {"init_with_default_handlers", (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"align_ex", (PyCFunction)py_lv_draw_buf_align_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"width_to_stride_ex", (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"create_ex", (PyCFunction)py_lv_draw_buf_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dup_ex", (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; /* * lvgl extension definition for: - * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * void lv_ll_init(lv_ll_t *ll_p, uint32_t node_size) */ -static PyObject *py_lv_display_remove_event_cb_with_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_remove_event_cb_with_user_data_event_cb_callback, "lv_display_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); + long node_size_val; + if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + uint32_t node_size = (uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_remove_event_cb_with_user_data)(disp, event_cb, user_data); + ((void (*)(lv_ll_t *, uint32_t))lv_ll_init)(ll_p, node_size); lvpy_unlock(); - if (_res > 0) lvpy_release_callback_user_data(user_data); + PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_remove_event_cb_with_user_data_struct_method_def = { - "lv_display_remove_event_cb_with_user_data", - (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, +static PyMethodDef py_lv_ll_init_struct_method_def = { + "lv_ll_init", + (PyCFunction)py_lv_ll_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73606,31 +86474,28 @@ static PyMethodDef py_lv_display_remove_event_cb_with_user_data_struct_method_de /* * lvgl extension definition for: - * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) + * void *lv_ll_ins_head(lv_ll_t *ll_p) */ -static PyObject *py_lv_display_send_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_ins_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *code_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OO", &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_event_code_t code = (int)mp_obj_get_int(code_py); - void *param = mp_to_ptr(param_py); + + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + void * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_display_send_event)(disp, code, param); + _res = ((void *(*)(lv_ll_t *))lv_ll_ins_head)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_send_event_struct_method_def = { - "lv_display_send_event", - (PyCFunction)py_lv_display_send_event_struct_method, +static PyMethodDef py_lv_ll_ins_head_struct_method_def = { + "lv_ll_ins_head", + (PyCFunction)py_lv_ll_ins_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73638,29 +86503,30 @@ static PyMethodDef py_lv_display_send_event_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) + * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) */ -static PyObject *py_lv_display_set_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_ins_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *th_py; - if (!PyArg_ParseTuple(py_args, "O", &th_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_theme_t *th = mp_write_ptr_lv_theme_t(th_py); + PyObject *n_act_py; + if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *n_act = mp_to_ptr(n_act_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_theme_t *))lv_display_set_theme)(disp, th); + _res = ((void *(*)(lv_ll_t *, void *))lv_ll_ins_prev)(ll_p, n_act); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_set_theme_struct_method_def = { - "lv_display_set_theme", - (PyCFunction)py_lv_display_set_theme_struct_method, +static PyMethodDef py_lv_ll_ins_prev_struct_method_def = { + "lv_ll_ins_prev", + (PyCFunction)py_lv_ll_ins_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73668,28 +86534,28 @@ static PyMethodDef py_lv_display_set_theme_struct_method_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_display_get_theme(lv_display_t *disp) + * void *lv_ll_ins_tail(lv_ll_t *ll_p) */ -static PyObject *py_lv_display_get_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_ins_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(lv_display_t *))lv_display_get_theme)(disp); + _res = ((void *(*)(lv_ll_t *))lv_ll_ins_tail)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_theme_struct_method_def = { - "lv_display_get_theme", - (PyCFunction)py_lv_display_get_theme_struct_method, +static PyMethodDef py_lv_ll_ins_tail_struct_method_def = { + "lv_ll_ins_tail", + (PyCFunction)py_lv_ll_ins_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73697,56 +86563,66 @@ static PyMethodDef py_lv_display_get_theme_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) + * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) */ -static PyObject *py_lv_display_get_inactive_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *node_p_py; + if (!PyArg_ParseTuple(py_args, "O", &node_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *node_p = mp_to_ptr(node_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_display_t *))lv_display_get_inactive_time)(disp); + ((void (*)(lv_ll_t *, void *))lv_ll_remove)(ll_p, node_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_inactive_time_struct_method_def = { - "lv_display_get_inactive_time", - (PyCFunction)py_lv_display_get_inactive_time_struct_method, +static PyMethodDef py_lv_ll_remove_struct_method_def = { + "lv_ll_remove", + (PyCFunction)py_lv_ll_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void cleanup(void *) + * void (*cleanup)(void *) + */ + + /* * lvgl extension definition for: - * void lv_display_trigger_activity(lv_display_t *disp) + * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) */ -static PyObject *py_lv_display_trigger_activity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_clear_custom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *cleanup_py; + if (!PyArg_ParseTuple(py_args, "O", &cleanup_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *cleanup = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_trigger_activity)(disp); + ((void (*)(lv_ll_t *, void (*)(void *)))lv_ll_clear_custom)(ll_p, cleanup); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_trigger_activity_struct_method_def = { - "lv_display_trigger_activity", - (PyCFunction)py_lv_display_trigger_activity_struct_method, +static PyMethodDef py_lv_ll_clear_custom_struct_method_def = { + "lv_ll_clear_custom", + (PyCFunction)py_lv_ll_clear_custom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73754,29 +86630,27 @@ static PyMethodDef py_lv_display_trigger_activity_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_enable_invalidation(lv_display_t *disp, bool en) + * void lv_ll_clear(lv_ll_t *ll_p) */ -static PyObject *py_lv_display_enable_invalidation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - bool en = (en_val != 0); + + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, bool))lv_display_enable_invalidation)(disp, en); + ((void (*)(lv_ll_t *))lv_ll_clear)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_enable_invalidation_struct_method_def = { - "lv_display_enable_invalidation", - (PyCFunction)py_lv_display_enable_invalidation_struct_method, +static PyMethodDef py_lv_ll_clear_struct_method_def = { + "lv_ll_clear", + (PyCFunction)py_lv_ll_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73784,28 +86658,31 @@ static PyMethodDef py_lv_display_enable_invalidation_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_is_invalidation_enabled(lv_display_t *disp) + * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) */ -static PyObject *py_lv_display_is_invalidation_enabled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_chg_list_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *ll_new_p_py; PyObject *node_py; long head_val; + if (!PyArg_ParseTuple(py_args, "OOl", &ll_new_p_py, &node_py, &head_val)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_ori_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(ll_new_p_py); + void *node = mp_to_ptr(node_py); + bool head = (head_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_is_invalidation_enabled)(disp); + ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_ll_chg_list)(ll_ori_p, ll_new_p, node, head); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_is_invalidation_enabled_struct_method_def = { - "lv_display_is_invalidation_enabled", - (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, +static PyMethodDef py_lv_ll_chg_list_struct_method_def = { + "lv_ll_chg_list", + (PyCFunction)py_lv_ll_chg_list_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73813,28 +86690,28 @@ static PyMethodDef py_lv_display_is_invalidation_enabled_struct_method_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) + * void *lv_ll_get_head(const lv_ll_t *ll_p) */ -static PyObject *py_lv_display_get_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(lv_display_t *))lv_display_get_refr_timer)(disp); + _res = ((void *(*)(const lv_ll_t *))lv_ll_get_head)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_refr_timer_struct_method_def = { - "lv_display_get_refr_timer", - (PyCFunction)py_lv_display_get_refr_timer_struct_method, +static PyMethodDef py_lv_ll_get_head_struct_method_def = { + "lv_ll_get_head", + (PyCFunction)py_lv_ll_get_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73842,153 +86719,119 @@ static PyMethodDef py_lv_display_get_refr_timer_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_delete_refr_timer(lv_display_t *disp) + * void *lv_ll_get_tail(const lv_ll_t *ll_p) */ -static PyObject *py_lv_display_delete_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_delete_refr_timer)(disp); + _res = ((void *(*)(const lv_ll_t *))lv_ll_get_tail)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_delete_refr_timer_struct_method_def = { - "lv_display_delete_refr_timer", - (PyCFunction)py_lv_display_delete_refr_timer_struct_method, +static PyMethodDef py_lv_ll_get_tail_struct_method_def = { + "lv_ll_get_tail", + (PyCFunction)py_lv_ll_get_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_register_vsync_event_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_register_vsync_event_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) */ -static PyObject *py_lv_display_register_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_register_vsync_event_event_cb_callback, "lv_display_register_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); + PyObject *n_act_py; + if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + const void *n_act = (const void *)mp_to_ptr(n_act_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + void * _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_register_vsync_event)(disp, event_cb, user_data); + _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_next)(ll_p, n_act); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_register_vsync_event_struct_method_def = { - "lv_display_register_vsync_event", - (PyCFunction)py_lv_display_register_vsync_event_struct_method, +static PyMethodDef py_lv_ll_get_next_struct_method_def = { + "lv_ll_get_next", + (PyCFunction)py_lv_ll_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_display_unregister_vsync_event_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * void *lv_ll_get_prev(const lv_ll_t *ll_p, const void *n_act) */ -static void lv_display_unregister_vsync_event_event_cb_callback(lv_event_t *arg0) +static PyObject *py_lv_ll_get_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_unregister_vsync_event_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + PyObject *n_act_py; + if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + const void *n_act = (const void *)mp_to_ptr(n_act_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_prev)(ll_p, n_act); + lvpy_unlock(); + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } +static PyMethodDef py_lv_ll_get_prev_struct_method_def = { + "lv_ll_get_prev", + (PyCFunction)py_lv_ll_get_prev_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * bool lv_display_unregister_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) */ -static PyObject *py_lv_display_unregister_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_len_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_unregister_vsync_event_event_cb_callback, "lv_display_unregister_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); + + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_unregister_vsync_event)(disp, event_cb, user_data); + _res = ((uint32_t (*)(const lv_ll_t *))lv_ll_get_len)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_unregister_vsync_event_struct_method_def = { - "lv_display_unregister_vsync_event", - (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, +static PyMethodDef py_lv_ll_get_len_struct_method_def = { + "lv_ll_get_len", + (PyCFunction)py_lv_ll_get_len_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73996,30 +86839,30 @@ static PyMethodDef py_lv_display_unregister_vsync_event_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) + * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) */ -static PyObject *py_lv_display_send_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_move_before_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "O", ¶m_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *param = mp_to_ptr(param_py); + PyObject *n_act_py; PyObject *n_after_py; + if (!PyArg_ParseTuple(py_args, "OO", &n_act_py, &n_after_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *n_act = mp_to_ptr(n_act_py); + void *n_after = mp_to_ptr(n_after_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_display_t *, void *))lv_display_send_vsync_event)(disp, param); + ((void (*)(lv_ll_t *, void *, void *))lv_ll_move_before)(ll_p, n_act, n_after); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_send_vsync_event_struct_method_def = { - "lv_display_send_vsync_event", - (PyCFunction)py_lv_display_send_vsync_event_struct_method, +static PyMethodDef py_lv_ll_move_before_struct_method_def = { + "lv_ll_move_before", + (PyCFunction)py_lv_ll_move_before_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74027,59 +86870,81 @@ static PyMethodDef py_lv_display_send_vsync_event_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_user_data(lv_display_t *disp, void *user_data) + * bool lv_ll_is_empty(lv_ll_t *ll_p) */ -static PyObject *py_lv_display_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); + + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *, void *))lv_display_set_user_data)(disp, user_data); + _res = ((bool (*)(lv_ll_t *))lv_ll_is_empty)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_set_user_data_struct_method_def = { - "lv_display_set_user_data", - (PyCFunction)py_lv_display_set_user_data_struct_method, +static PyMethodDef py_lv_ll_is_empty_struct_method_def = { + "lv_ll_is_empty", + (PyCFunction)py_lv_ll_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_ll_t_methods[] = { + {"init", (PyCFunction)py_lv_ll_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ins_head", (PyCFunction)py_lv_ll_ins_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ins_prev", (PyCFunction)py_lv_ll_ins_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ins_tail", (PyCFunction)py_lv_ll_ins_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_ll_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_custom", (PyCFunction)py_lv_ll_clear_custom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear", (PyCFunction)py_lv_ll_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"chg_list", (PyCFunction)py_lv_ll_chg_list_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_head", (PyCFunction)py_lv_ll_get_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tail", (PyCFunction)py_lv_ll_get_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_next", (PyCFunction)py_lv_ll_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_prev", (PyCFunction)py_lv_ll_get_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_len", (PyCFunction)py_lv_ll_get_len_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move_before", (PyCFunction)py_lv_ll_move_before_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_empty", (PyCFunction)py_lv_ll_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_display_set_driver_data(lv_display_t *disp, void *driver_data) + * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) */ -static PyObject *py_lv_display_set_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *driver_data_py; - if (!PyArg_ParseTuple(py_args, "O", &driver_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *driver_data = mp_to_ptr(driver_data_py); + long x1_val; long y1_val; long x2_val; long y2_val; + if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t x1 = (int32_t)x1_val; + int32_t y1 = (int32_t)y1_val; + int32_t x2 = (int32_t)x2_val; + int32_t y2 = (int32_t)y2_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, void *))lv_display_set_driver_data)(disp, driver_data); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_area_set)(area_p, x1, y1, x2, y2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_driver_data_struct_method_def = { - "lv_display_set_driver_data", - (PyCFunction)py_lv_display_set_driver_data_struct_method, +static PyMethodDef py_lv_area_set_struct_method_def = { + "lv_area_set", + (PyCFunction)py_lv_area_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74087,28 +86952,29 @@ static PyMethodDef py_lv_display_set_driver_data_struct_method_def = { /* * lvgl extension definition for: - * void *lv_display_get_user_data(lv_display_t *disp) + * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) */ -static PyObject *py_lv_display_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *dest = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_display_t *))lv_display_get_user_data)(disp); + ((void (*)(lv_area_t *, const lv_area_t *))lv_area_copy)(dest, src); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_user_data_struct_method_def = { - "lv_display_get_user_data", - (PyCFunction)py_lv_display_get_user_data_struct_method, +static PyMethodDef py_lv_area_copy_struct_method_def = { + "lv_area_copy", + (PyCFunction)py_lv_area_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74116,28 +86982,28 @@ static PyMethodDef py_lv_display_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * void *lv_display_get_driver_data(lv_display_t *disp) + * int32_t lv_area_get_width(const lv_area_t *area_p) */ -static PyObject *py_lv_display_get_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_get_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + int32_t _res; lvpy_lock(); - _res = ((void *(*)(lv_display_t *))lv_display_get_driver_data)(disp); + _res = ((int32_t (*)(const lv_area_t *))lv_area_get_width)(area_p); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_driver_data_struct_method_def = { - "lv_display_get_driver_data", - (PyCFunction)py_lv_display_get_driver_data_struct_method, +static PyMethodDef py_lv_area_get_width_struct_method_def = { + "lv_area_get_width", + (PyCFunction)py_lv_area_get_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74145,28 +87011,28 @@ static PyMethodDef py_lv_display_get_driver_data_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) + * int32_t lv_area_get_height(const lv_area_t *area_p) */ -static PyObject *py_lv_display_get_buf_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_get_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_display_get_buf_active)(disp); + _res = ((int32_t (*)(const lv_area_t *))lv_area_get_height)(area_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_buf_active_struct_method_def = { - "lv_display_get_buf_active", - (PyCFunction)py_lv_display_get_buf_active_struct_method, +static PyMethodDef py_lv_area_get_height_struct_method_def = { + "lv_area_get_height", + (PyCFunction)py_lv_area_get_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74174,29 +87040,29 @@ static PyMethodDef py_lv_display_get_buf_active_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) + * void lv_area_set_width(lv_area_t *area_p, int32_t w) */ -static PyObject *py_lv_display_rotate_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + long w_val; + if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t w = (int32_t)w_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_area_t *))lv_display_rotate_area)(disp, area); + ((void (*)(lv_area_t *, int32_t))lv_area_set_width)(area_p, w); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_rotate_area_struct_method_def = { - "lv_display_rotate_area", - (PyCFunction)py_lv_display_rotate_area_struct_method, +static PyMethodDef py_lv_area_set_width_struct_method_def = { + "lv_area_set_width", + (PyCFunction)py_lv_area_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74204,29 +87070,29 @@ static PyMethodDef py_lv_display_rotate_area_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) + * void lv_area_set_height(lv_area_t *area_p, int32_t h) */ -static PyObject *py_lv_display_rotate_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + long h_val; + if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t h = (int32_t)h_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_point_t *))lv_display_rotate_point)(disp, point); + ((void (*)(lv_area_t *, int32_t))lv_area_set_height)(area_p, h); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_rotate_point_struct_method_def = { - "lv_display_rotate_point", - (PyCFunction)py_lv_display_rotate_point_struct_method, +static PyMethodDef py_lv_area_set_height_struct_method_def = { + "lv_area_set_height", + (PyCFunction)py_lv_area_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74234,28 +87100,28 @@ static PyMethodDef py_lv_display_rotate_point_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_draw_buf_size(lv_display_t *disp) + * uint32_t lv_area_get_size(const lv_area_t *area_p) */ -static PyObject *py_lv_display_get_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *))lv_display_get_draw_buf_size)(disp); + _res = ((uint32_t (*)(const lv_area_t *))lv_area_get_size)(area_p); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_draw_buf_size_struct_method_def = { - "lv_display_get_draw_buf_size", - (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, +static PyMethodDef py_lv_area_get_size_struct_method_def = { + "lv_area_get_size", + (PyCFunction)py_lv_area_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74263,31 +87129,30 @@ static PyMethodDef py_lv_display_get_draw_buf_size_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) + * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) */ -static PyObject *py_lv_display_get_invalidated_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_increase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long width_val; long height_val; - if (!PyArg_ParseTuple(py_args, "ll", &width_val, &height_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t width = (uint32_t)width_val; - uint32_t height = (uint32_t)height_val; + long w_extra_val; long h_extra_val; + if (!PyArg_ParseTuple(py_args, "ll", &w_extra_val, &h_extra_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t w_extra = (int32_t)w_extra_val; + int32_t h_extra = (int32_t)h_extra_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_display_get_invalidated_draw_buf_size)(disp, width, height); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_increase)(area, w_extra, h_extra); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_invalidated_draw_buf_size_struct_method_def = { - "lv_display_get_invalidated_draw_buf_size", - (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, +static PyMethodDef py_lv_area_increase_struct_method_def = { + "lv_area_increase", + (PyCFunction)py_lv_area_increase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74295,30 +87160,30 @@ static PyMethodDef py_lv_display_get_invalidated_draw_buf_size_struct_method_def /* * lvgl extension definition for: - * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) + * void lv_area_move(lv_area_t *area, int32_t x_ofs, int32_t y_ofs) */ -static PyObject *py_lv_display_dpx_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_move_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long n_val; - if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t n = (int32_t)n_val; + long x_ofs_val; long y_ofs_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t x_ofs = (int32_t)x_ofs_val; + int32_t y_ofs = (int32_t)y_ofs_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_display_dpx)(disp, n); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_move)(area, x_ofs, y_ofs); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_dpx_struct_method_def = { - "lv_display_dpx", - (PyCFunction)py_lv_display_dpx_struct_method, +static PyMethodDef py_lv_area_move_struct_method_def = { + "lv_area_move", + (PyCFunction)py_lv_area_move_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74326,137 +87191,63 @@ static PyMethodDef py_lv_display_dpx_struct_method_def = { /* * lvgl extension definition for: - * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) + * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) */ -static PyObject *py_lv_draw_dispatch_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + PyObject *to_align_py; PyObject *align_py; long ofs_x_val; long ofs_y_val; + if (!PyArg_ParseTuple(py_args, "OOll", &to_align_py, &align_py, &ofs_x_val, &ofs_y_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *base = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_area_t *to_align = mp_write_ptr_lv_area_t(to_align_py); + lv_align_t align = (int)mp_obj_get_int(align_py); + int32_t ofs_x = (int32_t)ofs_x_val; + int32_t ofs_y = (int32_t)ofs_y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_draw_dispatch_layer)(disp, layer); + ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_area_align)(base, to_align, align, ofs_x, ofs_y); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_dispatch_layer_struct_method_def = { - "lv_draw_dispatch_layer", - (PyCFunction)py_lv_draw_dispatch_layer_struct_method, +static PyMethodDef py_lv_area_align_struct_method_def = { + "lv_area_align", + (PyCFunction)py_lv_area_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_display_t_methods[] = { - {"delete", (PyCFunction)py_lv_display_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_default", (PyCFunction)py_lv_display_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_next", (PyCFunction)py_lv_display_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_resolution", (PyCFunction)py_lv_display_set_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_physical_resolution", (PyCFunction)py_lv_display_set_physical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_offset", (PyCFunction)py_lv_display_set_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rotation", (PyCFunction)py_lv_display_set_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_matrix_rotation", (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_dpi", (PyCFunction)py_lv_display_set_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_horizontal_resolution", (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_vertical_resolution", (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_original_horizontal_resolution", (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_original_vertical_resolution", (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_physical_horizontal_resolution", (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_physical_vertical_resolution", (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_offset_x", (PyCFunction)py_lv_display_get_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_offset_y", (PyCFunction)py_lv_display_get_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rotation", (PyCFunction)py_lv_display_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_matrix_rotation", (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dpi", (PyCFunction)py_lv_display_get_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_buffers", (PyCFunction)py_lv_display_set_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_buffers_with_stride", (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_draw_buffers", (PyCFunction)py_lv_display_set_draw_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_3rd_draw_buffer", (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_render_mode", (PyCFunction)py_lv_display_set_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flush_cb", (PyCFunction)py_lv_display_set_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flush_wait_cb", (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_color_format", (PyCFunction)py_lv_display_set_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_color_format", (PyCFunction)py_lv_display_get_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tile_cnt", (PyCFunction)py_lv_display_set_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tile_cnt", (PyCFunction)py_lv_display_get_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_antialiasing", (PyCFunction)py_lv_display_set_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_antialiasing", (PyCFunction)py_lv_display_get_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"flush_ready", (PyCFunction)py_lv_display_flush_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"flush_is_last", (PyCFunction)py_lv_display_flush_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_double_buffered", (PyCFunction)py_lv_display_is_double_buffered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_render_mode", (PyCFunction)py_lv_display_get_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_screen_active", (PyCFunction)py_lv_display_get_screen_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_screen_prev", (PyCFunction)py_lv_display_get_screen_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_screen_loading", (PyCFunction)py_lv_display_get_screen_loading_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer_top", (PyCFunction)py_lv_display_get_layer_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer_sys", (PyCFunction)py_lv_display_get_layer_sys_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer_bottom", (PyCFunction)py_lv_display_get_layer_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_event_cb", (PyCFunction)py_lv_display_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_event_count", (PyCFunction)py_lv_display_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_event_dsc", (PyCFunction)py_lv_display_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_event", (PyCFunction)py_lv_display_delete_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_event_cb_with_user_data", (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"send_event", (PyCFunction)py_lv_display_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_theme", (PyCFunction)py_lv_display_set_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_theme", (PyCFunction)py_lv_display_get_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_inactive_time", (PyCFunction)py_lv_display_get_inactive_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"trigger_activity", (PyCFunction)py_lv_display_trigger_activity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"enable_invalidation", (PyCFunction)py_lv_display_enable_invalidation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_invalidation_enabled", (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_refr_timer", (PyCFunction)py_lv_display_get_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_refr_timer", (PyCFunction)py_lv_display_delete_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"register_vsync_event", (PyCFunction)py_lv_display_register_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"unregister_vsync_event", (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"send_vsync_event", (PyCFunction)py_lv_display_send_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_display_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_driver_data", (PyCFunction)py_lv_display_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_display_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_driver_data", (PyCFunction)py_lv_display_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_buf_active", (PyCFunction)py_lv_display_get_buf_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"rotate_area", (PyCFunction)py_lv_display_rotate_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"rotate_point", (PyCFunction)py_lv_display_rotate_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_draw_buf_size", (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_invalidated_draw_buf_size", (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dpx", (PyCFunction)py_lv_display_dpx_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"draw_dispatch_layer", (PyCFunction)py_lv_draw_dispatch_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * inline static bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_area_set_pos(lv_area_t *area_p, int32_t x, int32_t y) */ -static PyObject *py_lv_draw_buf_has_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_has_flag)(draw_buf, flag); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_set_pos)(area_p, x, y); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_has_flag_struct_method_def = { - "lv_draw_buf_has_flag", - (PyCFunction)py_lv_draw_buf_has_flag_struct_method, +static PyMethodDef py_lv_area_set_pos_struct_method_def = { + "lv_area_set_pos", + (PyCFunction)py_lv_area_set_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74464,29 +87255,31 @@ static PyMethodDef py_lv_draw_buf_has_flag_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_draw_buf_set_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_intersect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); + PyObject *a1_p_py; PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_set_flag)(draw_buf, flag); + _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_intersect)(res_p, a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_set_flag_struct_method_def = { - "lv_draw_buf_set_flag", - (PyCFunction)py_lv_draw_buf_set_flag_struct_method, +static PyMethodDef py_lv_area_intersect_struct_method_def = { + "lv_area_intersect", + (PyCFunction)py_lv_area_intersect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74494,29 +87287,32 @@ static PyMethodDef py_lv_draw_buf_set_flag_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_draw_buf_clear_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_draw_buf_clear_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_diff_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); + PyObject *res_p_py; PyObject *a1_p_py; PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "OOO", &res_p_py, &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *res_p = mp_to_ptr(res_p_py); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int8_t _res; lvpy_lock(); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_clear_flag)(draw_buf, flag); + _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_area_diff)(res_p, a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_buf_clear_flag_struct_method_def = { - "lv_draw_buf_clear_flag", - (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, +static PyMethodDef py_lv_area_diff_struct_method_def = { + "lv_area_diff", + (PyCFunction)py_lv_area_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74524,29 +87320,30 @@ static PyMethodDef py_lv_draw_buf_clear_flag_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_invalidate_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_draw_buf_invalidate_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_join_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + PyObject *a1_p_py; PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *a_res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_invalidate_cache)(draw_buf, area); + ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_join)(a_res_p, a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_invalidate_cache_struct_method_def = { - "lv_draw_buf_invalidate_cache", - (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, +static PyMethodDef py_lv_area_join_struct_method_def = { + "lv_area_join", + (PyCFunction)py_lv_area_join_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74554,29 +87351,31 @@ static PyMethodDef py_lv_draw_buf_invalidate_cache_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_flush_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) */ -static PyObject *py_lv_draw_buf_flush_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_point_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + PyObject *p_p_py; long radius_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *a_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(p_p_py); + int32_t radius = (int32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_flush_cache)(draw_buf, area); + _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_area_is_point_on)(a_p, p_p, radius); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_flush_cache_struct_method_def = { - "lv_draw_buf_flush_cache", - (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, +static PyMethodDef py_lv_area_is_point_on_struct_method_def = { + "lv_area_is_point_on", + (PyCFunction)py_lv_area_is_point_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74584,29 +87383,30 @@ static PyMethodDef py_lv_draw_buf_flush_cache_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) + * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_draw_buf_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a_py; - if (!PyArg_ParseTuple(py_args, "O", &a_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(a_py); + PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "O", &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *a1_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_clear)(draw_buf, a); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_on)(a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_clear_struct_method_def = { - "lv_draw_buf_clear", - (PyCFunction)py_lv_draw_buf_clear_struct_method, +static PyMethodDef py_lv_area_is_on_struct_method_def = { + "lv_area_is_on", + (PyCFunction)py_lv_area_is_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74614,28 +87414,31 @@ static PyMethodDef py_lv_draw_buf_clear_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) + * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) */ -static PyObject *py_lv_draw_buf_dup_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + PyObject *aholder_p_py; long radius_val; + if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *ain_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); + int32_t radius = (int32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_draw_buf_dup)(draw_buf); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_in)(ain_p, aholder_p, radius); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_dup_struct_method_def = { - "lv_draw_buf_dup", - (PyCFunction)py_lv_draw_buf_dup_struct_method, +static PyMethodDef py_lv_area_is_in_struct_method_def = { + "lv_area_is_in", + (PyCFunction)py_lv_area_is_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74643,35 +87446,31 @@ static PyMethodDef py_lv_draw_buf_dup_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) + * bool lv_area_is_out(const lv_area_t *aout_p, const lv_area_t *aholder_p, int32_t radius) */ -static PyObject *py_lv_draw_buf_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; long h_val; PyObject *cf_py; long stride_val; PyObject *data_py; long data_size_val; - if (!PyArg_ParseTuple(py_args, "llOlOl", &w_val, &h_val, &cf_py, &stride_val, &data_py, &data_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t stride = (uint32_t)stride_val; - void *data = mp_to_ptr(data_py); - uint32_t data_size = (uint32_t)data_size_val; + PyObject *aholder_p_py; long radius_val; + if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *aout_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); + int32_t radius = (int32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + bool _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_draw_buf_init)(draw_buf, w, h, cf, stride, data, data_size); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_out)(aout_p, aholder_p, radius); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_init_struct_method_def = { - "lv_draw_buf_init", - (PyCFunction)py_lv_draw_buf_init_struct_method, +static PyMethodDef py_lv_area_is_out_struct_method_def = { + "lv_area_is_out", + (PyCFunction)py_lv_area_is_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74679,61 +87478,82 @@ static PyMethodDef py_lv_draw_buf_init_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) + * bool lv_area_is_equal(const lv_area_t *a, const lv_area_t *b) */ -static PyObject *py_lv_draw_buf_reshape_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_equal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cf_py; long w_val; long h_val; long stride_val; - if (!PyArg_ParseTuple(py_args, "Olll", &cf_py, &w_val, &h_val, &stride_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - uint32_t stride = (uint32_t)stride_val; + PyObject *b_py; + if (!PyArg_ParseTuple(py_args, "O", &b_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *a = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *b = (const lv_area_t *)mp_write_ptr_lv_area_t(b_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_draw_buf_reshape)(draw_buf, cf, w, h, stride); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_equal)(a, b); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_reshape_struct_method_def = { - "lv_draw_buf_reshape", - (PyCFunction)py_lv_draw_buf_reshape_struct_method, +static PyMethodDef py_lv_area_is_equal_struct_method_def = { + "lv_area_is_equal", + (PyCFunction)py_lv_area_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_area_t_methods[] = { + {"set", (PyCFunction)py_lv_area_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy", (PyCFunction)py_lv_area_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_width", (PyCFunction)py_lv_area_get_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_height", (PyCFunction)py_lv_area_get_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_width", (PyCFunction)py_lv_area_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_height", (PyCFunction)py_lv_area_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_size", (PyCFunction)py_lv_area_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"increase", (PyCFunction)py_lv_area_increase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move", (PyCFunction)py_lv_area_move_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"align", (PyCFunction)py_lv_area_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pos", (PyCFunction)py_lv_area_set_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"intersect", (PyCFunction)py_lv_area_intersect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"diff", (PyCFunction)py_lv_area_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"join", (PyCFunction)py_lv_area_join_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_point_on", (PyCFunction)py_lv_area_is_point_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_on", (PyCFunction)py_lv_area_is_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_in", (PyCFunction)py_lv_area_is_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_out", (PyCFunction)py_lv_area_is_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_equal", (PyCFunction)py_lv_area_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) + * void lv_layer_init(lv_layer_t *layer) */ -static PyObject *py_lv_draw_buf_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_t *))lv_draw_buf_destroy)(draw_buf); + ((void (*)(lv_layer_t *))lv_layer_init)(layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_destroy_struct_method_def = { - "lv_draw_buf_destroy", - (PyCFunction)py_lv_draw_buf_destroy_struct_method, +static PyMethodDef py_lv_layer_init_struct_method_def = { + "lv_layer_init", + (PyCFunction)py_lv_layer_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74741,63 +87561,63 @@ static PyMethodDef py_lv_draw_buf_destroy_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_copy(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * void lv_layer_reset(lv_layer_t *layer) */ -static PyObject *py_lv_draw_buf_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dest_area_py; PyObject *src_py; PyObject *src_area_py; - if (!PyArg_ParseTuple(py_args, "OOO", &dest_area_py, &src_py, &src_area_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *dest = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); - const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(src_py); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(src_area_py); + + lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_copy)(dest, dest_area, src, src_area); + ((void (*)(lv_layer_t *))lv_layer_reset)(layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_copy_struct_method_def = { - "lv_draw_buf_copy", - (PyCFunction)py_lv_draw_buf_copy_struct_method, +static PyMethodDef py_lv_layer_reset_struct_method_def = { + "lv_layer_reset", + (PyCFunction)py_lv_layer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_layer_t_methods[] = { + {"init", (PyCFunction)py_lv_layer_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset", (PyCFunction)py_lv_layer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) */ -static PyObject *py_lv_draw_buf_goto_xy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_dependent_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint32_t x = (uint32_t)x_val; - uint32_t y = (uint32_t)y_val; + + lv_draw_task_t *t_check = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_draw_buf_goto_xy)(buf, x, y); + _res = ((uint32_t (*)(lv_draw_task_t *))lv_draw_get_dependent_count)(t_check); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_buf_goto_xy_struct_method_def = { - "lv_draw_buf_goto_xy", - (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, +static PyMethodDef py_lv_draw_get_dependent_count_struct_method_def = { + "lv_draw_get_dependent_count", + (PyCFunction)py_lv_draw_get_dependent_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74805,30 +87625,28 @@ static PyMethodDef py_lv_draw_buf_goto_xy_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) + * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) */ -static PyObject *py_lv_draw_buf_adjust_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long stride_val; - if (!PyArg_ParseTuple(py_args, "l", &stride_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *src = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint32_t stride = (uint32_t)stride_val; + + const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_draw_task_type_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_draw_buf_adjust_stride)(src, stride); + _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_draw_task_get_type)(t); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_buf_adjust_stride_struct_method_def = { - "lv_draw_buf_adjust_stride", - (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, +static PyMethodDef py_lv_draw_task_get_type_struct_method_def = { + "lv_draw_task_get_type", + (PyCFunction)py_lv_draw_task_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74836,28 +87654,28 @@ static PyMethodDef py_lv_draw_buf_adjust_stride_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) + * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) */ -static PyObject *py_lv_draw_buf_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_draw_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + void * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_draw_buf_premultiply)(draw_buf); + _res = ((void *(*)(const lv_draw_task_t *))lv_draw_task_get_draw_dsc)(t); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_premultiply_struct_method_def = { - "lv_draw_buf_premultiply", - (PyCFunction)py_lv_draw_buf_premultiply_struct_method, +static PyMethodDef py_lv_draw_task_get_draw_dsc_struct_method_def = { + "lv_draw_task_get_draw_dsc", + (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74865,30 +87683,29 @@ static PyMethodDef py_lv_draw_buf_premultiply_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) + * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) */ -static PyObject *py_lv_draw_buf_from_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *img_py; - if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(img_py); + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_draw_buf_from_image)(buf, img); + ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_draw_task_get_area)(t, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_from_image_struct_method_def = { - "lv_draw_buf_from_image", - (PyCFunction)py_lv_draw_buf_from_image_struct_method, +static PyMethodDef py_lv_draw_task_get_area_struct_method_def = { + "lv_draw_task_get_area", + (PyCFunction)py_lv_draw_task_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74896,29 +87713,28 @@ static PyMethodDef py_lv_draw_buf_from_image_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) + * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_draw_buf_to_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_fill_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *img_py; - if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(img_py); + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_fill_dsc_t * _res; lvpy_lock(); - ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_draw_buf_to_image)(buf, img); + _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_fill_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_to_image_struct_method_def = { - "lv_draw_buf_to_image", - (PyCFunction)py_lv_draw_buf_to_image_struct_method, +static PyMethodDef py_lv_draw_task_get_fill_dsc_struct_method_def = { + "lv_draw_task_get_fill_dsc", + (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74926,30 +87742,28 @@ static PyMethodDef py_lv_draw_buf_to_image_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) + * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_draw_buf_set_palette_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_border_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "lO", &index_val, &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint8_t index = (uint8_t)index_val; - lv_color32_t color = mp_write_lv_color32_t(color_py); + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_border_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_draw_buf_set_palette)(draw_buf, index, color); + _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_border_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_set_palette_struct_method_def = { - "lv_draw_buf_set_palette", - (PyCFunction)py_lv_draw_buf_set_palette_struct_method, +static PyMethodDef py_lv_draw_task_get_border_dsc_struct_method_def = { + "lv_draw_task_get_border_dsc", + (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74957,82 +87771,57 @@ static PyMethodDef py_lv_draw_buf_set_palette_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) + * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_draw_buf_save_to_file_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_box_shadow_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const char *path = (const char *)(char*)convert_from_str(path_py); + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_draw_box_shadow_dsc_t * _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_draw_buf_save_to_file)(draw_buf, path); + _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_box_shadow_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_save_to_file_struct_method_def = { - "lv_draw_buf_save_to_file", - (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, +static PyMethodDef py_lv_draw_task_get_box_shadow_dsc_struct_method_def = { + "lv_draw_task_get_box_shadow_dsc", + (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_buf_t_methods[] = { - {"has_flag", (PyCFunction)py_lv_draw_buf_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flag", (PyCFunction)py_lv_draw_buf_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_flag", (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"invalidate_cache", (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"flush_cache", (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear", (PyCFunction)py_lv_draw_buf_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dup", (PyCFunction)py_lv_draw_buf_dup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_draw_buf_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reshape", (PyCFunction)py_lv_draw_buf_reshape_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"destroy", (PyCFunction)py_lv_draw_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy", (PyCFunction)py_lv_draw_buf_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"goto_xy", (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"adjust_stride", (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"premultiply", (PyCFunction)py_lv_draw_buf_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"from_image", (PyCFunction)py_lv_draw_buf_from_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_image", (PyCFunction)py_lv_draw_buf_to_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_palette", (PyCFunction)py_lv_draw_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"save_to_file", (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_image_header_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) + * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_draw_buf_init_with_default_handlers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_label_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_label_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_draw_buf_handlers_t *))lv_draw_buf_init_with_default_handlers)(handlers); + _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_label_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_init_with_default_handlers_struct_method_def = { - "lv_draw_buf_init_with_default_handlers", - (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, +static PyMethodDef py_lv_draw_task_get_label_dsc_struct_method_def = { + "lv_draw_task_get_label_dsc", + (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75040,148 +87829,79 @@ static PyMethodDef py_lv_draw_buf_init_with_default_handlers_struct_method_def = /* * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_free_cb_t(void *draw_buf) - * lv_draw_buf_free_cb_t buf_free_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) - * lv_draw_buf_align_cb_t align_pointer_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - * lv_draw_buf_cache_operation_cb_t flush_cache_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * lv_draw_glyph_cb_t cb */ /* * lvgl extension definition for: - * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) + * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) */ -static PyObject *py_lv_draw_buf_handlers_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_label_iterate_characters_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_malloc_cb_py; PyObject *buf_free_cb_py; PyObject *buf_copy_cb_py; PyObject *align_pointer_cb_py; PyObject *invalidate_cache_cb_py; PyObject *flush_cache_cb_py; PyObject *width_to_stride_cb_py; - if (!PyArg_ParseTuple(py_args, "OOOOOOO", &buf_malloc_cb_py, &buf_free_cb_py, &buf_copy_cb_py, &align_pointer_cb_py, &invalidate_cache_cb_py, &flush_cache_cb_py, &width_to_stride_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - void *buf_malloc_cb = NULL; - void *buf_free_cb = NULL; - void *buf_copy_cb = NULL; - void *align_pointer_cb = NULL; - void *invalidate_cache_cb = NULL; - void *flush_cache_cb = NULL; - void *width_to_stride_cb = NULL; + PyObject *dsc_py; PyObject *coords_py; PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "OOO", &dsc_py, &coords_py, &cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_draw_buf_handlers_init)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_draw_label_iterate_characters)(t, dsc, coords, cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_handlers_init_struct_method_def = { - "lv_draw_buf_handlers_init", - (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, +static PyMethodDef py_lv_draw_label_iterate_characters_struct_method_def = { + "lv_draw_label_iterate_characters", + (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * lv_draw_glyph_cb_t cb */ -static PyObject *py_lv_draw_buf_align_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *buf_py; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - void *buf = mp_to_ptr(buf_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - void * _res; - lvpy_lock(); - _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_draw_buf_align_ex)(handlers, buf, color_format); - lvpy_unlock(); - PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); -} - -static PyMethodDef py_lv_draw_buf_align_ex_struct_method_def = { - "lv_draw_buf_align_ex", - (PyCFunction)py_lv_draw_buf_align_ex_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) + * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static PyObject *py_lv_draw_buf_width_to_stride_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_unit_draw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - uint32_t w = (uint32_t)w_val; - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + PyObject *dsc_py; PyObject *pos_py; PyObject *font_py; long letter_val; PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "OOOlO", &dsc_py, &pos_py, &font_py, &letter_val, &cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(dsc_py); + const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(pos_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + uint32_t letter = (uint32_t)letter_val; + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride_ex)(handlers, w, color_format); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_draw_unit_draw_letter)(t, dsc, pos, font, letter, cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_width_to_stride_ex_struct_method_def = { - "lv_draw_buf_width_to_stride_ex", - (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, +static PyMethodDef py_lv_draw_unit_draw_letter_struct_method_def = { + "lv_draw_unit_draw_letter", + (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75189,33 +87909,28 @@ static PyMethodDef py_lv_draw_buf_width_to_stride_ex_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_draw_buf_create_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_image_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; long h_val; PyObject *cf_py; long stride_val; - if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t stride = (uint32_t)stride_val; + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + lv_draw_image_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create_ex)(handlers, w, h, cf, stride); + _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_image_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_create_ex_struct_method_def = { - "lv_draw_buf_create_ex", - (PyCFunction)py_lv_draw_buf_create_ex_struct_method, +static PyMethodDef py_lv_draw_task_get_image_dsc_struct_method_def = { + "lv_draw_task_get_image_dsc", + (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75223,104 +87938,66 @@ static PyMethodDef py_lv_draw_buf_create_ex_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) + * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_draw_buf_dup_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_line_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(draw_buf_py); + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + lv_draw_line_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_draw_buf_dup_ex)(handlers, draw_buf); + _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_line_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_dup_ex_struct_method_def = { - "lv_draw_buf_dup_ex", - (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, +static PyMethodDef py_lv_draw_task_get_line_dsc_struct_method_def = { + "lv_draw_task_get_line_dsc", + (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_buf_handlers_t_methods[] = { - {"init_with_default_handlers", (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"align_ex", (PyCFunction)py_lv_draw_buf_align_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"width_to_stride_ex", (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"create_ex", (PyCFunction)py_lv_draw_buf_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dup_ex", (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* - * lvgl extension definition for: - * inline static void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + * Function NOT generated: + * Callback: user_data NOT FOUND! void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) */ -static PyObject *py_lv_area_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *dest = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(src_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_area_t *, const lv_area_t *))lv_area_copy)(dest, src); - lvpy_unlock(); - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_area_copy_struct_method_def = { - "lv_area_copy", - (PyCFunction)py_lv_area_copy_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) */ -static PyObject *py_lv_area_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_line_iterate_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x1_val; long y1_val; long x2_val; long y2_val; - if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t x1 = (int32_t)x1_val; - int32_t y1 = (int32_t)y1_val; - int32_t x2 = (int32_t)x2_val; - int32_t y2 = (int32_t)y2_val; + PyObject *dsc_py; PyObject *draw_line_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &draw_line_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(dsc_py); + void *draw_line_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_area_set)(area_p, x1, y1, x2, y2); + ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_draw_line_iterate)(t, dsc, draw_line_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_set_struct_method_def = { - "lv_area_set", - (PyCFunction)py_lv_area_set_struct_method, +static PyMethodDef py_lv_draw_line_iterate_struct_method_def = { + "lv_draw_line_iterate", + (PyCFunction)py_lv_draw_line_iterate_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75328,28 +88005,28 @@ static PyMethodDef py_lv_area_set_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_area_get_width(const lv_area_t *area_p) + * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_get_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_arc_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_draw_arc_dsc_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_area_t *))lv_area_get_width)(area_p); + _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_arc_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_get_width_struct_method_def = { - "lv_area_get_width", - (PyCFunction)py_lv_area_get_width_struct_method, +static PyMethodDef py_lv_draw_task_get_arc_dsc_struct_method_def = { + "lv_draw_task_get_arc_dsc", + (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75357,28 +88034,28 @@ static PyMethodDef py_lv_area_get_width_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_area_get_height(const lv_area_t *area_p) + * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_get_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_triangle_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_draw_triangle_dsc_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_area_t *))lv_area_get_height)(area_p); + _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_triangle_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_get_height_struct_method_def = { - "lv_area_get_height", - (PyCFunction)py_lv_area_get_height_struct_method, +static PyMethodDef py_lv_draw_task_get_triangle_dsc_struct_method_def = { + "lv_draw_task_get_triangle_dsc", + (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75386,29 +88063,28 @@ static PyMethodDef py_lv_area_get_height_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_set_width(lv_area_t *area_p, int32_t w) + * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_set_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_blur_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; - if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t w = (int32_t)w_val; + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_blur_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_area_t *, int32_t))lv_area_set_width)(area_p, w); + _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_blur_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_set_width_struct_method_def = { - "lv_area_set_width", - (PyCFunction)py_lv_area_set_width_struct_method, +static PyMethodDef py_lv_draw_task_get_blur_dsc_struct_method_def = { + "lv_draw_task_get_blur_dsc", + (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75416,29 +88092,28 @@ static PyMethodDef py_lv_area_set_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_set_height(lv_area_t *area_p, int32_t h) + * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_set_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_mask_rect_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long h_val; - if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t h = (int32_t)h_val; + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_mask_rect_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_area_t *, int32_t))lv_area_set_height)(area_p, h); + _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_mask_rect_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_set_height_struct_method_def = { - "lv_area_set_height", - (PyCFunction)py_lv_area_set_height_struct_method, +static PyMethodDef py_lv_draw_task_get_mask_rect_dsc_struct_method_def = { + "lv_draw_task_get_mask_rect_dsc", + (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75446,59 +88121,210 @@ static PyMethodDef py_lv_area_set_height_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_area_get_size(const lv_area_t *area_p) + * void lv_draw_cleanup_task(lv_draw_task_t *t) */ -static PyObject *py_lv_area_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_cleanup_task_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_area_t *))lv_area_get_size)(area_p); + ((void (*)(lv_draw_task_t *))lv_draw_cleanup_task)(t); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_get_size_struct_method_def = { - "lv_area_get_size", - (PyCFunction)py_lv_area_get_size_struct_method, +static PyMethodDef py_lv_draw_cleanup_task_struct_method_def = { + "lv_draw_cleanup_task", + (PyCFunction)py_lv_draw_cleanup_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Struct lv_draw_sw_blend_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_draw_sw_blend_dsc_t_methods[]; + +static PyObject *py_lv_draw_sw_blend_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "blend_area") == 0) return mp_read_ptr_lv_area_t((void*)data->blend_area); + if (strcmp(attr, "src_buf") == 0) return ptr_to_mp((void*)data->src_buf); + if (strcmp(attr, "src_stride") == 0) return mp_obj_new_int_from_uint(data->src_stride); + if (strcmp(attr, "src_color_format") == 0) return mp_obj_new_int(data->src_color_format); + if (strcmp(attr, "src_area") == 0) return mp_read_ptr_lv_area_t((void*)data->src_area); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "mask_buf") == 0) return mp_array_from_u8ptr((void*)data->mask_buf); + if (strcmp(attr, "mask_res") == 0) return mp_obj_new_int(data->mask_res); + if (strcmp(attr, "mask_area") == 0) return mp_read_ptr_lv_area_t((void*)data->mask_area); + if (strcmp(attr, "mask_stride") == 0) return mp_obj_new_int(data->mask_stride); + if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); + for (PyMethodDef *m = py_lv_draw_sw_blend_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_draw_sw_blend_dsc_t_field_names[] = {"blend_area", "src_buf", "src_stride", "src_color_format", "src_area", "opa", "color", "mask_buf", "mask_res", "mask_area", "mask_stride", "blend_mode", NULL}; + +static PyObject *py_lv_draw_sw_blend_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_sw_blend_dsc_t_field_names, py_lv_draw_sw_blend_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_sw_blend_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_blend_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_sw_blend_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_sw_blend_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "blend_area") == 0) { data->blend_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "src_buf") == 0) { data->src_buf = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "src_stride") == 0) { data->src_stride = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "src_color_format") == 0) { data->src_color_format = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "src_area") == 0) { data->src_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "mask_buf") == 0) { data->mask_buf = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "mask_res") == 0) { data->mask_res = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "mask_area") == 0) { data->mask_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "mask_stride") == 0) { data->mask_stride = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_blend_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_sw_blend_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_blend_dsc_t)); +} + +static void py_lv_draw_sw_blend_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_sw_blend_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_sw_blend_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_sw_blend_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_blend_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_blend_dsc_t_setattro, + .tp_new = py_lv_draw_sw_blend_dsc_t_new, + .tp_methods = py_lv_draw_sw_blend_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_blend_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_sw_blend_dsc_t*)self->data; +} + +static lv_draw_sw_blend_dsc_t mp_write_scratch_lv_draw_sw_blend_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_sw_blend_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_blend_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_sw_blend_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_blend_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_sw_blend_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_sw_blend_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_sw_blend_dsc_t, 0, sizeof(lv_draw_sw_blend_dsc_t)); + return &mp_write_scratch_lv_draw_sw_blend_dsc_t; +} + +#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) (*((lv_draw_sw_blend_dsc_t*)mp_write_value_ptr_lv_draw_sw_blend_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_sw_blend_dsc_t_type, field); +} + +#define mp_read_lv_draw_sw_blend_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_blend_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) + + /* * lvgl extension definition for: - * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) + * void lv_draw_sw_blend(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) */ -static PyObject *py_lv_area_increase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_extra_val; long h_extra_val; - if (!PyArg_ParseTuple(py_args, "ll", &w_extra_val, &h_extra_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t w_extra = (int32_t)w_extra_val; - int32_t h_extra = (int32_t)h_extra_val; + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_increase)(area, w_extra, h_extra); + ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_draw_sw_blend)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_increase_struct_method_def = { - "lv_area_increase", - (PyCFunction)py_lv_area_increase_struct_method, +static PyMethodDef py_lv_draw_sw_blend_struct_method_def = { + "lv_draw_sw_blend", + (PyCFunction)py_lv_draw_sw_blend_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75506,30 +88332,30 @@ static PyMethodDef py_lv_area_increase_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_move(lv_area_t *area, int32_t x_ofs, int32_t y_ofs) + * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_move_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_fill_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_ofs_val; long y_ofs_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t x_ofs = (int32_t)x_ofs_val; - int32_t y_ofs = (int32_t)y_ofs_val; + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_move)(area, x_ofs, y_ofs); + ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_sw_fill)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_move_struct_method_def = { - "lv_area_move", - (PyCFunction)py_lv_area_move_struct_method, +static PyMethodDef py_lv_draw_sw_fill_struct_method_def = { + "lv_draw_sw_fill", + (PyCFunction)py_lv_draw_sw_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75537,32 +88363,30 @@ static PyMethodDef py_lv_area_move_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) + * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_border_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *to_align_py; PyObject *align_py; long ofs_x_val; long ofs_y_val; - if (!PyArg_ParseTuple(py_args, "OOll", &to_align_py, &align_py, &ofs_x_val, &ofs_y_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *base = (lv_area_t *)mp_write_ptr_lv_area_t(self); - lv_area_t *to_align = mp_write_ptr_lv_area_t(to_align_py); - lv_align_t align = (int)mp_obj_get_int(align_py); - int32_t ofs_x = (int32_t)ofs_x_val; - int32_t ofs_y = (int32_t)ofs_y_val; + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_area_align)(base, to_align, align, ofs_x, ofs_y); + ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_sw_border)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_align_struct_method_def = { - "lv_area_align", - (PyCFunction)py_lv_area_align_struct_method, +static PyMethodDef py_lv_draw_sw_border_struct_method_def = { + "lv_draw_sw_border", + (PyCFunction)py_lv_draw_sw_border_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75570,30 +88394,30 @@ static PyMethodDef py_lv_area_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_set_pos(lv_area_t *area_p, int32_t x, int32_t y) + * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_set_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_box_shadow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_set_pos)(area_p, x, y); + ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_sw_box_shadow)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_set_pos_struct_method_def = { - "lv_area_set_pos", - (PyCFunction)py_lv_area_set_pos_struct_method, +static PyMethodDef py_lv_draw_sw_box_shadow_struct_method_def = { + "lv_draw_sw_box_shadow", + (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75601,31 +88425,30 @@ static PyMethodDef py_lv_area_set_pos_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_intersect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a1_p_py; PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + PyObject *draw_dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_intersect)(res_p, a1_p, a2_p); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_image)(t, draw_dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_intersect_struct_method_def = { - "lv_area_intersect", - (PyCFunction)py_lv_area_intersect_struct_method, +static PyMethodDef py_lv_draw_sw_image_struct_method_def = { + "lv_draw_sw_image", + (PyCFunction)py_lv_draw_sw_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75633,32 +88456,30 @@ static PyMethodDef py_lv_area_intersect_struct_method_def = { /* * lvgl extension definition for: - * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_diff_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *res_p_py; PyObject *a1_p_py; PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "OOO", &res_p_py, &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *res_p = mp_to_ptr(res_p_py); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int8_t _res; lvpy_lock(); - _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_area_diff)(res_p, a1_p, a2_p); + ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_draw_sw_letter)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_diff_struct_method_def = { - "lv_area_diff", - (PyCFunction)py_lv_area_diff_struct_method, +static PyMethodDef py_lv_draw_sw_letter_struct_method_def = { + "lv_draw_sw_letter", + (PyCFunction)py_lv_draw_sw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75666,30 +88487,30 @@ static PyMethodDef py_lv_area_diff_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_join_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_label_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a1_p_py; PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *a_res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_join)(a_res_p, a1_p, a2_p); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_sw_label)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_join_struct_method_def = { - "lv_area_join", - (PyCFunction)py_lv_area_join_struct_method, +static PyMethodDef py_lv_draw_sw_label_struct_method_def = { + "lv_draw_sw_label", + (PyCFunction)py_lv_draw_sw_label_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75697,31 +88518,30 @@ static PyMethodDef py_lv_area_join_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) + * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_is_point_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_arc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *p_p_py; long radius_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *a_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(p_p_py); - int32_t radius = (int32_t)radius_val; + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_area_is_point_on)(a_p, p_p, radius); + ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_draw_sw_arc)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_point_on_struct_method_def = { - "lv_area_is_point_on", - (PyCFunction)py_lv_area_is_point_on_struct_method, +static PyMethodDef py_lv_draw_sw_arc_struct_method_def = { + "lv_draw_sw_arc", + (PyCFunction)py_lv_draw_sw_arc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75729,30 +88549,29 @@ static PyMethodDef py_lv_area_is_point_on_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_line(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) */ -static PyObject *py_lv_area_is_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_line_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "O", &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *a1_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_on)(a1_p, a2_p); + ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_draw_sw_line)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_on_struct_method_def = { - "lv_area_is_on", - (PyCFunction)py_lv_area_is_on_struct_method, +static PyMethodDef py_lv_draw_sw_line_struct_method_def = { + "lv_draw_sw_line", + (PyCFunction)py_lv_draw_sw_line_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75760,31 +88579,30 @@ static PyMethodDef py_lv_area_is_on_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) + * void lv_draw_sw_layer(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_is_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *aholder_p_py; long radius_val; - if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *ain_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); - int32_t radius = (int32_t)radius_val; + PyObject *draw_dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_in)(ain_p, aholder_p, radius); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_layer)(t, draw_dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_in_struct_method_def = { - "lv_area_is_in", - (PyCFunction)py_lv_area_is_in_struct_method, +static PyMethodDef py_lv_draw_sw_layer_struct_method_def = { + "lv_draw_sw_layer", + (PyCFunction)py_lv_draw_sw_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75792,31 +88610,29 @@ static PyMethodDef py_lv_area_is_in_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_out(const lv_area_t *aout_p, const lv_area_t *aholder_p, int32_t radius) + * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) */ -static PyObject *py_lv_area_is_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_triangle_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *aholder_p_py; long radius_val; - if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *aout_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); - int32_t radius = (int32_t)radius_val; + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_out)(aout_p, aholder_p, radius); + ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_draw_sw_triangle)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_out_struct_method_def = { - "lv_area_is_out", - (PyCFunction)py_lv_area_is_out_struct_method, +static PyMethodDef py_lv_draw_sw_triangle_struct_method_def = { + "lv_draw_sw_triangle", + (PyCFunction)py_lv_draw_sw_triangle_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75824,240 +88640,281 @@ static PyMethodDef py_lv_area_is_out_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_equal(const lv_area_t *a, const lv_area_t *b) + * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_is_equal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blur_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *b_py; - if (!PyArg_ParseTuple(py_args, "O", &b_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *a = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *b = (const lv_area_t *)mp_write_ptr_lv_area_t(b_py); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_equal)(a, b); + ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_sw_blur)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_equal_struct_method_def = { - "lv_area_is_equal", - (PyCFunction)py_lv_area_is_equal_struct_method, +static PyMethodDef py_lv_draw_sw_blur_struct_method_def = { + "lv_draw_sw_blur", + (PyCFunction)py_lv_draw_sw_blur_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_area_t_methods[] = { - {"copy", (PyCFunction)py_lv_area_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set", (PyCFunction)py_lv_area_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_width", (PyCFunction)py_lv_area_get_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_height", (PyCFunction)py_lv_area_get_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_width", (PyCFunction)py_lv_area_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_height", (PyCFunction)py_lv_area_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_size", (PyCFunction)py_lv_area_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"increase", (PyCFunction)py_lv_area_increase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move", (PyCFunction)py_lv_area_move_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"align", (PyCFunction)py_lv_area_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pos", (PyCFunction)py_lv_area_set_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"intersect", (PyCFunction)py_lv_area_intersect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"diff", (PyCFunction)py_lv_area_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"join", (PyCFunction)py_lv_area_join_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_point_on", (PyCFunction)py_lv_area_is_point_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_on", (PyCFunction)py_lv_area_is_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_in", (PyCFunction)py_lv_area_is_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_out", (PyCFunction)py_lv_area_is_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_equal", (PyCFunction)py_lv_area_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_ll_init(lv_ll_t *ll_p, uint32_t node_size) + * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) */ -static PyObject *py_lv_ll_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_rect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long node_size_val; - if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - uint32_t node_size = (uint32_t)node_size_val; + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_ll_t *, uint32_t))lv_ll_init)(ll_p, node_size); + ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_sw_mask_rect)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_init_struct_method_def = { - "lv_ll_init", - (PyCFunction)py_lv_ll_init_struct_method, +static PyMethodDef py_lv_draw_sw_mask_rect_struct_method_def = { + "lv_draw_sw_mask_rect", + (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_draw_image_core_cb draw_core_cb + */ + + /* * lvgl extension definition for: - * void *lv_ll_ins_head(lv_ll_t *ll_p) + * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static PyObject *py_lv_ll_ins_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_image_normal_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); + void *draw_core_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_ll_t *))lv_ll_ins_head)(ll_p); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_normal_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_ins_head_struct_method_def = { - "lv_ll_ins_head", - (PyCFunction)py_lv_ll_ins_head_struct_method, +static PyMethodDef py_lv_draw_image_normal_helper_struct_method_def = { + "lv_draw_image_normal_helper", + (PyCFunction)py_lv_draw_image_normal_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_draw_image_core_cb draw_core_cb + */ + + /* * lvgl extension definition for: - * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) + * void lv_draw_image_tiled_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static PyObject *py_lv_ll_ins_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_image_tiled_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *n_act_py; - if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *n_act = mp_to_ptr(n_act_py); + PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); + void *draw_core_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_ll_t *, void *))lv_ll_ins_prev)(ll_p, n_act); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_tiled_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_ins_prev_struct_method_def = { - "lv_ll_ins_prev", - (PyCFunction)py_lv_ll_ins_prev_struct_method, +static PyMethodDef py_lv_draw_image_tiled_helper_struct_method_def = { + "lv_draw_image_tiled_helper", + (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * lv_draw_glyph_cb_t cb + */ + + /* * lvgl extension definition for: - * void *lv_ll_ins_tail(lv_ll_t *ll_p) + * void lv_draw_unit_draw_letter_internal(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static PyObject *py_lv_ll_ins_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_unit_draw_letter_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *dsc_py; PyObject *pos_py; PyObject *font_py; long letter_val; PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "OOOlO", &dsc_py, &pos_py, &font_py, &letter_val, &cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(dsc_py); + const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(pos_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + uint32_t letter = (uint32_t)letter_val; + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_ll_t *))lv_ll_ins_tail)(ll_p); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_draw_unit_draw_letter_internal)(t, dsc, pos, font, letter, cb); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_ins_tail_struct_method_def = { - "lv_ll_ins_tail", - (PyCFunction)py_lv_ll_ins_tail_struct_method, +static PyMethodDef py_lv_draw_unit_draw_letter_internal_struct_method_def = { + "lv_draw_unit_draw_letter_internal", + (PyCFunction)py_lv_draw_unit_draw_letter_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_task_t_methods[] = { + {"get_dependent_count", (PyCFunction)py_lv_draw_get_dependent_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_type", (PyCFunction)py_lv_draw_task_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_draw_dsc", (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_area", (PyCFunction)py_lv_draw_task_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_fill_dsc", (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_border_dsc", (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_box_shadow_dsc", (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_label_dsc", (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"label_iterate_characters", (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"unit_draw_letter", (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_image_dsc", (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_line_dsc", (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"line_iterate", (PyCFunction)py_lv_draw_line_iterate_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_arc_dsc", (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_triangle_dsc", (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_blur_dsc", (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mask_rect_dsc", (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cleanup_task", (PyCFunction)py_lv_draw_cleanup_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_blend", (PyCFunction)py_lv_draw_sw_blend_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_fill", (PyCFunction)py_lv_draw_sw_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_border", (PyCFunction)py_lv_draw_sw_border_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_box_shadow", (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_image", (PyCFunction)py_lv_draw_sw_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_letter", (PyCFunction)py_lv_draw_sw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_label", (PyCFunction)py_lv_draw_sw_label_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_arc", (PyCFunction)py_lv_draw_sw_arc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_line", (PyCFunction)py_lv_draw_sw_line_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_layer", (PyCFunction)py_lv_draw_sw_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_triangle", (PyCFunction)py_lv_draw_sw_triangle_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_blur", (PyCFunction)py_lv_draw_sw_blur_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_mask_rect", (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"image_normal_helper", (PyCFunction)py_lv_draw_image_normal_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"image_tiled_helper", (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"unit_draw_letter_internal", (PyCFunction)py_lv_draw_unit_draw_letter_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_unit_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) + * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) */ -static PyObject *py_lv_ll_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_unpremultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *node_p_py; - if (!PyArg_ParseTuple(py_args, "O", &node_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *node_p = mp_to_ptr(node_p_py); + + lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(lv_ll_t *, void *))lv_ll_remove)(ll_p, node_p); + _res = ((lv_color32_t (*)(lv_color32_t))lv_color32_unpremultiply)(c); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_ll_remove_struct_method_def = { - "lv_ll_remove", - (PyCFunction)py_lv_ll_remove_struct_method, +static PyMethodDef py_lv_color32_unpremultiply_struct_method_def = { + "lv_color32_unpremultiply", + (PyCFunction)py_lv_color32_unpremultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void cleanup(void *) - * void (*cleanup)(void *) - */ - - /* * lvgl extension definition for: - * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) + * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) */ -static PyObject *py_lv_ll_clear_custom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_lumi_of_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cleanup_py; - if (!PyArg_ParseTuple(py_args, "O", &cleanup_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *cleanup = NULL; + long premultiplied_val; + if (!PyArg_ParseTuple(py_args, "l", &premultiplied_val)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } + bool premultiplied = (premultiplied_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint8_t _res; lvpy_lock(); - ((void (*)(lv_ll_t *, void (*)(void *)))lv_ll_clear_custom)(ll_p, cleanup); + _res = ((uint8_t (*)(lv_color32_t, bool))lv_color32_lumi_of)(c, premultiplied); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_ll_clear_custom_struct_method_def = { - "lv_ll_clear_custom", - (PyCFunction)py_lv_ll_clear_custom_struct_method, +static PyMethodDef py_lv_color32_lumi_of_struct_method_def = { + "lv_color32_lumi_of", + (PyCFunction)py_lv_color32_lumi_of_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76065,27 +88922,30 @@ static PyMethodDef py_lv_ll_clear_custom_struct_method_def = { /* * lvgl extension definition for: - * void lv_ll_clear(lv_ll_t *ll_p) + * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_ll_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix32_inlined_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(lv_ll_t *))lv_ll_clear)(ll_p); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_inlined)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_ll_clear_struct_method_def = { - "lv_ll_clear", - (PyCFunction)py_lv_ll_clear_struct_method, +static PyMethodDef py_lv_color_mix32_inlined_struct_method_def = { + "lv_color_mix32_inlined", + (PyCFunction)py_lv_color_mix32_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76093,31 +88953,30 @@ static PyMethodDef py_lv_ll_clear_struct_method_def = { /* * lvgl extension definition for: - * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) + * inline static lv_color32_t lv_color_mix32_premultiplied_inlined(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_ll_chg_list_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix32_premultiplied_inlined_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ll_new_p_py; PyObject *node_py; long head_val; - if (!PyArg_ParseTuple(py_args, "OOl", &ll_new_p_py, &node_py, &head_val)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_ori_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(ll_new_p_py); - void *node = mp_to_ptr(node_py); - bool head = (head_val != 0); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_ll_chg_list)(ll_ori_p, ll_new_p, node, head); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_premultiplied_inlined)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_ll_chg_list_struct_method_def = { - "lv_ll_chg_list", - (PyCFunction)py_lv_ll_chg_list_struct_method, +static PyMethodDef py_lv_color_mix32_premultiplied_inlined_struct_method_def = { + "lv_color_mix32_premultiplied_inlined", + (PyCFunction)py_lv_color_mix32_premultiplied_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76125,28 +88984,30 @@ static PyMethodDef py_lv_ll_chg_list_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_get_head(const lv_ll_t *ll_p) + * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) */ -static PyObject *py_lv_ll_get_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *c2_py; + if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t c1 = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c1 = *p_; } + lv_color32_t c2 = mp_write_lv_color32_t(c2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + bool _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *))lv_ll_get_head)(ll_p); + _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_color32_eq)(c1, c2); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_ll_get_head_struct_method_def = { - "lv_ll_get_head", - (PyCFunction)py_lv_ll_get_head_struct_method, +static PyMethodDef py_lv_color32_eq_struct_method_def = { + "lv_color32_eq", + (PyCFunction)py_lv_color32_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76154,28 +89015,27 @@ static PyMethodDef py_lv_ll_get_head_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_get_tail(const lv_ll_t *ll_p) + * void lv_color_premultiply(lv_color32_t *c) */ -static PyObject *py_lv_ll_get_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + lv_color32_t *c = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *))lv_ll_get_tail)(ll_p); + ((void (*)(lv_color32_t *))lv_color_premultiply)(c); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_get_tail_struct_method_def = { - "lv_ll_get_tail", - (PyCFunction)py_lv_ll_get_tail_struct_method, +static PyMethodDef py_lv_color_premultiply_struct_method_def = { + "lv_color_premultiply", + (PyCFunction)py_lv_color_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76183,30 +89043,28 @@ static PyMethodDef py_lv_ll_get_tail_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) + * uint8_t lv_color32_luminance(lv_color32_t c) */ -static PyObject *py_lv_ll_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *n_act_py; - if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - const void *n_act = (const void *)mp_to_ptr(n_act_py); + + lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint8_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_next)(ll_p, n_act); + _res = ((uint8_t (*)(lv_color32_t))lv_color32_luminance)(c); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_ll_get_next_struct_method_def = { - "lv_ll_get_next", - (PyCFunction)py_lv_ll_get_next_struct_method, +static PyMethodDef py_lv_color32_luminance_struct_method_def = { + "lv_color32_luminance", + (PyCFunction)py_lv_color32_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76214,30 +89072,30 @@ static PyMethodDef py_lv_ll_get_next_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_get_prev(const lv_ll_t *ll_p, const void *n_act) + * lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_ll_get_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *n_act_py; - if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - const void *n_act = (const void *)mp_to_ptr(n_act_py); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_prev)(ll_p, n_act); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_ll_get_prev_struct_method_def = { - "lv_ll_get_prev", - (PyCFunction)py_lv_ll_get_prev_struct_method, +static PyMethodDef py_lv_color_mix32_struct_method_def = { + "lv_color_mix32", + (PyCFunction)py_lv_color_mix32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76245,28 +89103,30 @@ static PyMethodDef py_lv_ll_get_prev_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) + * lv_color32_t lv_color_mix32_premultiplied(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_ll_get_len_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix32_premultiplied_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_color32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_ll_t *))lv_ll_get_len)(ll_p); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_premultiplied)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_ll_get_len_struct_method_def = { - "lv_ll_get_len", - (PyCFunction)py_lv_ll_get_len_struct_method, +static PyMethodDef py_lv_color_mix32_premultiplied_struct_method_def = { + "lv_color_mix32_premultiplied", + (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76274,107 +89134,141 @@ static PyMethodDef py_lv_ll_get_len_struct_method_def = { /* * lvgl extension definition for: - * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) + * lv_color32_t lv_color_over32(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_ll_move_before_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_over32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *n_act_py; PyObject *n_after_py; - if (!PyArg_ParseTuple(py_args, "OO", &n_act_py, &n_after_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *n_act = mp_to_ptr(n_act_py); - void *n_after = mp_to_ptr(n_after_py); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(lv_ll_t *, void *, void *))lv_ll_move_before)(ll_p, n_act, n_after); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_over32)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_ll_move_before_struct_method_def = { - "lv_ll_move_before", - (PyCFunction)py_lv_ll_move_before_struct_method, +static PyMethodDef py_lv_color_over32_struct_method_def = { + "lv_color_over32", + (PyCFunction)py_lv_color_over32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_color32_t_methods[] = { + {"unpremultiply", (PyCFunction)py_lv_color32_unpremultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"lumi_of", (PyCFunction)py_lv_color32_lumi_of_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32_inlined", (PyCFunction)py_lv_color_mix32_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32_premultiplied_inlined", (PyCFunction)py_lv_color_mix32_premultiplied_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"eq", (PyCFunction)py_lv_color32_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_premultiply", (PyCFunction)py_lv_color_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"luminance", (PyCFunction)py_lv_color32_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32", (PyCFunction)py_lv_color_mix32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32_premultiplied", (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_over32", (PyCFunction)py_lv_color_over32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * bool lv_ll_is_empty(lv_ll_t *ll_p) + * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) */ -static PyObject *py_lv_ll_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *e_py; long preprocess_val; + if (!PyArg_ParseTuple(py_args, "Ol", &e_py, &preprocess_val)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + lv_event_t *e = mp_write_ptr_lv_event_t(e_py); + bool preprocess = (preprocess_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_result_t _res; lvpy_lock(); - _res = ((bool (*)(lv_ll_t *))lv_ll_is_empty)(ll_p); + _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_event_send)(list, e, preprocess); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_ll_is_empty_struct_method_def = { - "lv_ll_is_empty", - (PyCFunction)py_lv_ll_is_empty_struct_method, +static PyMethodDef py_lv_event_send_struct_method_def = { + "lv_event_send", + (PyCFunction)py_lv_event_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_ll_t_methods[] = { - {"init", (PyCFunction)py_lv_ll_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ins_head", (PyCFunction)py_lv_ll_ins_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ins_prev", (PyCFunction)py_lv_ll_ins_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ins_tail", (PyCFunction)py_lv_ll_ins_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove", (PyCFunction)py_lv_ll_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_custom", (PyCFunction)py_lv_ll_clear_custom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear", (PyCFunction)py_lv_ll_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"chg_list", (PyCFunction)py_lv_ll_chg_list_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_head", (PyCFunction)py_lv_ll_get_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tail", (PyCFunction)py_lv_ll_get_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_next", (PyCFunction)py_lv_ll_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_prev", (PyCFunction)py_lv_ll_get_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_len", (PyCFunction)py_lv_ll_get_len_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move_before", (PyCFunction)py_lv_ll_move_before_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_empty", (PyCFunction)py_lv_ll_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; +/* + * Callback function lv_event_add_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_event_add_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_event_add_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} /* * lvgl extension definition for: - * void lv_layer_init(lv_layer_t *layer) + * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) */ -static PyObject *py_lv_layer_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); + PyObject *cb_py; PyObject *filter_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + void *user_data = mp_to_ptr(user_data_py); + lv_event_code_t filter = (int)mp_obj_get_int(filter_py); + void *cb = mp_lv_callback(cb_py, &lv_event_add_cb_callback, "lv_event_add_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_event_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_layer_t *))lv_layer_init)(layer); + _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_event_add)(list, cb, filter, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_layer_init_struct_method_def = { - "lv_layer_init", - (PyCFunction)py_lv_layer_init_struct_method, +static PyMethodDef py_lv_event_add_struct_method_def = { + "lv_event_add", + (PyCFunction)py_lv_event_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76382,63 +89276,59 @@ static PyMethodDef py_lv_layer_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_layer_reset(lv_layer_t *layer) + * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) */ -static PyObject *py_lv_layer_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_remove_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_layer_t *))lv_layer_reset)(layer); + _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_event_remove_dsc)(list, dsc); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_layer_reset_struct_method_def = { - "lv_layer_reset", - (PyCFunction)py_lv_layer_reset_struct_method, +static PyMethodDef py_lv_event_remove_dsc_struct_method_def = { + "lv_event_remove_dsc", + (PyCFunction)py_lv_event_remove_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_layer_t_methods[] = { - {"init", (PyCFunction)py_lv_layer_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset", (PyCFunction)py_lv_layer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) + * uint32_t lv_event_get_count(lv_event_list_t *list) */ -static PyObject *py_lv_draw_get_dependent_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *t_check = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_draw_task_t *))lv_draw_get_dependent_count)(t_check); + _res = ((uint32_t (*)(lv_event_list_t *))lv_event_get_count)(list); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_get_dependent_count_struct_method_def = { - "lv_draw_get_dependent_count", - (PyCFunction)py_lv_draw_get_dependent_count_struct_method, +static PyMethodDef py_lv_event_get_count_struct_method_def = { + "lv_event_get_count", + (PyCFunction)py_lv_event_get_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76446,28 +89336,30 @@ static PyMethodDef py_lv_draw_get_dependent_count_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) + * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) */ -static PyObject *py_lv_draw_task_get_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_type_t _res; + lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_draw_task_get_type)(t); + _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_event_get_dsc)(list, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } - -static PyMethodDef py_lv_draw_task_get_type_struct_method_def = { - "lv_draw_task_get_type", - (PyCFunction)py_lv_draw_task_get_type_struct_method, + +static PyMethodDef py_lv_event_get_dsc_struct_method_def = { + "lv_event_get_dsc", + (PyCFunction)py_lv_event_get_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76475,28 +89367,30 @@ static PyMethodDef py_lv_draw_task_get_type_struct_method_def = { /* * lvgl extension definition for: - * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) + * bool lv_event_remove(lv_event_list_t *list, uint32_t index) */ -static PyObject *py_lv_draw_task_get_draw_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + bool _res; lvpy_lock(); - _res = ((void *(*)(const lv_draw_task_t *))lv_draw_task_get_draw_dsc)(t); + _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_event_remove)(list, index); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_task_get_draw_dsc_struct_method_def = { - "lv_draw_task_get_draw_dsc", - (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, +static PyMethodDef py_lv_event_remove_struct_method_def = { + "lv_event_remove", + (PyCFunction)py_lv_event_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76504,29 +89398,27 @@ static PyMethodDef py_lv_draw_task_get_draw_dsc_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) + * void lv_event_remove_all(lv_event_list_t *list) */ -static PyObject *py_lv_draw_task_get_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_remove_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_draw_task_get_area)(t, area); + ((void (*)(lv_event_list_t *))lv_event_remove_all)(list); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_area_struct_method_def = { - "lv_draw_task_get_area", - (PyCFunction)py_lv_draw_task_get_area_struct_method, +static PyMethodDef py_lv_event_remove_all_struct_method_def = { + "lv_event_remove_all", + (PyCFunction)py_lv_event_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76534,57 +89426,74 @@ static PyMethodDef py_lv_draw_task_get_area_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) + * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) */ -static PyObject *py_lv_draw_task_get_fill_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_push_and_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *code_py; PyObject *original_target_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OOO", &code_py, &original_target_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *event_list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + lv_event_code_t code = (int)mp_obj_get_int(code_py); + void *original_target = mp_to_ptr(original_target_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_fill_dsc_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_fill_dsc)(task); + _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_event_push_and_send)(event_list, code, original_target, param); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_task_get_fill_dsc_struct_method_def = { - "lv_draw_task_get_fill_dsc", - (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, +static PyMethodDef py_lv_event_push_and_send_struct_method_def = { + "lv_event_push_and_send", + (PyCFunction)py_lv_event_push_and_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_event_list_t_methods[] = { + {"send", (PyCFunction)py_lv_event_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add", (PyCFunction)py_lv_event_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_dsc", (PyCFunction)py_lv_event_remove_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_count", (PyCFunction)py_lv_event_get_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dsc", (PyCFunction)py_lv_event_get_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_event_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_all", (PyCFunction)py_lv_event_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"push_and_send", (PyCFunction)py_lv_event_push_and_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) + * inline static uint32_t lv_array_size(const lv_array_t *array) */ -static PyObject *py_lv_draw_task_get_border_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_border_dsc_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_border_dsc)(task); + _res = ((uint32_t (*)(const lv_array_t *))lv_array_size)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_task_get_border_dsc_struct_method_def = { - "lv_draw_task_get_border_dsc", - (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, +static PyMethodDef py_lv_array_size_struct_method_def = { + "lv_array_size", + (PyCFunction)py_lv_array_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76592,28 +89501,28 @@ static PyMethodDef py_lv_draw_task_get_border_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) + * inline static uint32_t lv_array_capacity(const lv_array_t *array) */ -static PyObject *py_lv_draw_task_get_box_shadow_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_capacity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_box_shadow_dsc_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_box_shadow_dsc)(task); + _res = ((uint32_t (*)(const lv_array_t *))lv_array_capacity)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_task_get_box_shadow_dsc_struct_method_def = { - "lv_draw_task_get_box_shadow_dsc", - (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, +static PyMethodDef py_lv_array_capacity_struct_method_def = { + "lv_array_capacity", + (PyCFunction)py_lv_array_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76621,108 +89530,85 @@ static PyMethodDef py_lv_draw_task_get_box_shadow_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) + * inline static bool lv_array_is_empty(const lv_array_t *array) */ -static PyObject *py_lv_draw_task_get_label_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_label_dsc_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_label_dsc)(task); + _res = ((bool (*)(const lv_array_t *))lv_array_is_empty)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_task_get_label_dsc_struct_method_def = { - "lv_draw_task_get_label_dsc", - (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, +static PyMethodDef py_lv_array_is_empty_struct_method_def = { + "lv_array_is_empty", + (PyCFunction)py_lv_array_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) - * lv_draw_glyph_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) + * inline static bool lv_array_is_full(const lv_array_t *array) */ -static PyObject *py_lv_draw_label_iterate_characters_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_is_full_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "OOO", &dsc_py, &coords_py, &cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - void *cb = NULL; + + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_draw_label_iterate_characters)(t, dsc, coords, cb); + _res = ((bool (*)(const lv_array_t *))lv_array_is_full)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_label_iterate_characters_struct_method_def = { - "lv_draw_label_iterate_characters", - (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, +static PyMethodDef py_lv_array_is_full_struct_method_def = { + "lv_array_is_full", + (PyCFunction)py_lv_array_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) - * lv_draw_glyph_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) + * inline static void lv_array_clear(lv_array_t *array) */ -static PyObject *py_lv_draw_unit_draw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *pos_py; PyObject *font_py; long letter_val; PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "OOOlO", &dsc_py, &pos_py, &font_py, &letter_val, &cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(dsc_py); - const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(pos_py); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - uint32_t letter = (uint32_t)letter_val; - void *cb = NULL; + + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_draw_unit_draw_letter)(t, dsc, pos, font, letter, cb); + ((void (*)(lv_array_t *))lv_array_clear)(array); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_unit_draw_letter_struct_method_def = { - "lv_draw_unit_draw_letter", - (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, +static PyMethodDef py_lv_array_clear_struct_method_def = { + "lv_array_clear", + (PyCFunction)py_lv_array_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76730,28 +89616,28 @@ static PyMethodDef py_lv_draw_unit_draw_letter_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) + * inline static void *lv_array_front(const lv_array_t *array) */ -static PyObject *py_lv_draw_task_get_image_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_front_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_image_dsc_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_image_dsc)(task); + _res = ((void *(*)(const lv_array_t *))lv_array_front)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_task_get_image_dsc_struct_method_def = { - "lv_draw_task_get_image_dsc", - (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, +static PyMethodDef py_lv_array_front_struct_method_def = { + "lv_array_front", + (PyCFunction)py_lv_array_front_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76759,66 +89645,60 @@ static PyMethodDef py_lv_draw_task_get_image_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) + * inline static void *lv_array_back(const lv_array_t *array) */ -static PyObject *py_lv_draw_task_get_line_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_line_dsc_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_line_dsc)(task); + _res = ((void *(*)(const lv_array_t *))lv_array_back)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_task_get_line_dsc_struct_method_def = { - "lv_draw_task_get_line_dsc", - (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, +static PyMethodDef py_lv_array_back_struct_method_def = { + "lv_array_back", + (PyCFunction)py_lv_array_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) - * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) - */ - - /* * lvgl extension definition for: - * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) + * lv_result_t lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_draw_line_iterate_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *draw_line_cb_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &draw_line_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(dsc_py); - void *draw_line_cb = NULL; + long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_draw_line_iterate)(t, dsc, draw_line_cb); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_array_init)(array, capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_line_iterate_struct_method_def = { - "lv_draw_line_iterate", - (PyCFunction)py_lv_draw_line_iterate_struct_method, +static PyMethodDef py_lv_array_init_struct_method_def = { + "lv_array_init", + (PyCFunction)py_lv_array_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76826,28 +89706,31 @@ static PyMethodDef py_lv_draw_line_iterate_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) + * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_draw_task_get_arc_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_init_from_buf_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *buf_py; long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + void *buf = mp_to_ptr(buf_py); + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_arc_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_arc_dsc)(task); + ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_array_init_from_buf)(array, buf, capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_arc_dsc_struct_method_def = { - "lv_draw_task_get_arc_dsc", - (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, +static PyMethodDef py_lv_array_init_from_buf_struct_method_def = { + "lv_array_init_from_buf", + (PyCFunction)py_lv_array_init_from_buf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76855,28 +89738,30 @@ static PyMethodDef py_lv_draw_task_get_arc_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) + * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) */ -static PyObject *py_lv_draw_task_get_triangle_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_resize_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + long new_capacity_val; + if (!PyArg_ParseTuple(py_args, "l", &new_capacity_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t new_capacity = (uint32_t)new_capacity_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_triangle_dsc_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_triangle_dsc)(task); + _res = ((bool (*)(lv_array_t *, uint32_t))lv_array_resize)(array, new_capacity); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_task_get_triangle_dsc_struct_method_def = { - "lv_draw_task_get_triangle_dsc", - (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, +static PyMethodDef py_lv_array_resize_struct_method_def = { + "lv_array_resize", + (PyCFunction)py_lv_array_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76884,28 +89769,27 @@ static PyMethodDef py_lv_draw_task_get_triangle_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) + * void lv_array_deinit(lv_array_t *array) */ -static PyObject *py_lv_draw_task_get_blur_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_deinit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_blur_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_blur_dsc)(task); + ((void (*)(lv_array_t *))lv_array_deinit)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_blur_dsc_struct_method_def = { - "lv_draw_task_get_blur_dsc", - (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, +static PyMethodDef py_lv_array_deinit_struct_method_def = { + "lv_array_deinit", + (PyCFunction)py_lv_array_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76913,211 +89797,57 @@ static PyMethodDef py_lv_draw_task_get_blur_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) + * void lv_array_copy(lv_array_t *target, const lv_array_t *source) */ -static PyObject *py_lv_draw_task_get_mask_rect_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *source_py; + if (!PyArg_ParseTuple(py_args, "O", &source_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *target = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(source_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_mask_rect_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_mask_rect_dsc)(task); + ((void (*)(lv_array_t *, const lv_array_t *))lv_array_copy)(target, source); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_mask_rect_dsc_struct_method_def = { - "lv_draw_task_get_mask_rect_dsc", - (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, +static PyMethodDef py_lv_array_copy_struct_method_def = { + "lv_array_copy", + (PyCFunction)py_lv_array_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Struct lv_draw_sw_blend_dsc_t (CPython) - */ - -extern PyMethodDef py_lv_draw_sw_blend_dsc_t_methods[]; - -static PyObject *py_lv_draw_sw_blend_dsc_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "blend_area") == 0) return mp_read_ptr_lv_area_t((void*)data->blend_area); - if (strcmp(attr, "src_buf") == 0) return ptr_to_mp((void*)data->src_buf); - if (strcmp(attr, "src_stride") == 0) return mp_obj_new_int_from_uint(data->src_stride); - if (strcmp(attr, "src_color_format") == 0) return mp_obj_new_int(data->src_color_format); - if (strcmp(attr, "src_area") == 0) return mp_read_ptr_lv_area_t((void*)data->src_area); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "mask_buf") == 0) return mp_array_from_u8ptr((void*)data->mask_buf); - if (strcmp(attr, "mask_res") == 0) return mp_obj_new_int(data->mask_res); - if (strcmp(attr, "mask_area") == 0) return mp_read_ptr_lv_area_t((void*)data->mask_area); - if (strcmp(attr, "mask_stride") == 0) return mp_obj_new_int(data->mask_stride); - if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); - for (PyMethodDef *m = py_lv_draw_sw_blend_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_sw_blend_dsc_t_field_names[] = {"blend_area", "src_buf", "src_stride", "src_color_format", "src_area", "opa", "color", "mask_buf", "mask_res", "mask_area", "mask_stride", "blend_mode", NULL}; - -static PyObject *py_lv_draw_sw_blend_dsc_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_blend_dsc_t_field_names, py_lv_draw_sw_blend_dsc_t_methods); -} - -static PyMethodDef py_lv_draw_sw_blend_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_blend_dsc_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_draw_sw_blend_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_blend_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "blend_area") == 0) { data->blend_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "src_buf") == 0) { data->src_buf = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "src_stride") == 0) { data->src_stride = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "src_color_format") == 0) { data->src_color_format = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "src_area") == 0) { data->src_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "mask_buf") == 0) { data->mask_buf = (void*)mp_array_to_u8ptr(value); result = 0; } - if (strcmp(attr, "mask_res") == 0) { data->mask_res = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "mask_area") == 0) { data->mask_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "mask_stride") == 0) { data->mask_stride = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_blend_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_blend_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_blend_dsc_t)); -} - -static void py_lv_draw_sw_blend_dsc_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_draw_sw_blend_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_blend_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_blend_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_blend_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_blend_dsc_t_setattro, - .tp_new = py_lv_draw_sw_blend_dsc_t_new, - .tp_methods = py_lv_draw_sw_blend_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_blend_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_blend_dsc_t*)self->data; -} - -static lv_draw_sw_blend_dsc_t mp_write_scratch_lv_draw_sw_blend_dsc_t; - -static inline void* mp_write_value_ptr_lv_draw_sw_blend_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_blend_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_blend_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_blend_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_blend_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_blend_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_blend_dsc_t, 0, sizeof(lv_draw_sw_blend_dsc_t)); - return &mp_write_scratch_lv_draw_sw_blend_dsc_t; -} - -#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) (*((lv_draw_sw_blend_dsc_t*)mp_write_value_ptr_lv_draw_sw_blend_dsc_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) -{ - return lv_to_mp_struct(&py_lv_draw_sw_blend_dsc_t_type, field); -} - -#define mp_read_lv_draw_sw_blend_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_blend_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) -#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) - - /* * lvgl extension definition for: - * void lv_draw_sw_blend(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * void lv_array_shrink(lv_array_t *array) */ -static PyObject *py_lv_draw_sw_blend_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_shrink_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(dsc_py); + + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_draw_sw_blend)(t, dsc); + ((void (*)(lv_array_t *))lv_array_shrink)(array); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_blend_struct_method_def = { - "lv_draw_sw_blend", - (PyCFunction)py_lv_draw_sw_blend_struct_method, +static PyMethodDef py_lv_array_shrink_struct_method_def = { + "lv_array_shrink", + (PyCFunction)py_lv_array_shrink_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77125,30 +89855,30 @@ static PyMethodDef py_lv_draw_sw_blend_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) */ -static PyObject *py_lv_draw_sw_fill_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_sw_fill)(t, dsc, coords); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove)(array, index); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_fill_struct_method_def = { - "lv_draw_sw_fill", - (PyCFunction)py_lv_draw_sw_fill_struct_method, +static PyMethodDef py_lv_array_remove_struct_method_def = { + "lv_array_remove", + (PyCFunction)py_lv_array_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77156,30 +89886,30 @@ static PyMethodDef py_lv_draw_sw_fill_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_array_remove_unordered(lv_array_t *array, uint32_t index) */ -static PyObject *py_lv_draw_sw_border_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_remove_unordered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_sw_border)(t, dsc, coords); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove_unordered)(array, index); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_border_struct_method_def = { - "lv_draw_sw_border", - (PyCFunction)py_lv_draw_sw_border_struct_method, +static PyMethodDef py_lv_array_remove_unordered_struct_method_def = { + "lv_array_remove_unordered", + (PyCFunction)py_lv_array_remove_unordered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77187,30 +89917,31 @@ static PyMethodDef py_lv_draw_sw_border_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_array_erase(lv_array_t *array, uint32_t start, uint32_t end) */ -static PyObject *py_lv_draw_sw_box_shadow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_erase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t start = (uint32_t)start_val; + uint32_t end = (uint32_t)end_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_sw_box_shadow)(t, dsc, coords); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_array_erase)(array, start, end); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_box_shadow_struct_method_def = { - "lv_draw_sw_box_shadow", - (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, +static PyMethodDef py_lv_array_erase_struct_method_def = { + "lv_array_erase", + (PyCFunction)py_lv_array_erase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77218,30 +89949,30 @@ static PyMethodDef py_lv_draw_sw_box_shadow_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) */ -static PyObject *py_lv_draw_sw_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_concat_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + PyObject *other_py; + if (!PyArg_ParseTuple(py_args, "O", &other_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(other_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_image)(t, draw_dsc, coords); + _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_array_concat)(array, other); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_image_struct_method_def = { - "lv_draw_sw_image", - (PyCFunction)py_lv_draw_sw_image_struct_method, +static PyMethodDef py_lv_array_concat_struct_method_def = { + "lv_array_concat", + (PyCFunction)py_lv_array_concat_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77249,30 +89980,30 @@ static PyMethodDef py_lv_draw_sw_image_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) */ -static PyObject *py_lv_draw_sw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_push_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + PyObject *element_py; + if (!PyArg_ParseTuple(py_args, "O", &element_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const void *element = (const void *)mp_to_ptr(element_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_draw_sw_letter)(t, dsc, coords); + _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_array_push_back)(array, element); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_letter_struct_method_def = { - "lv_draw_sw_letter", - (PyCFunction)py_lv_draw_sw_letter_struct_method, +static PyMethodDef py_lv_array_push_back_struct_method_def = { + "lv_array_push_back", + (PyCFunction)py_lv_array_push_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77280,30 +90011,31 @@ static PyMethodDef py_lv_draw_sw_letter_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) */ -static PyObject *py_lv_draw_sw_label_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_assign_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long index_val; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "lO", &index_val, &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; + const void *value = (const void *)mp_to_ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_sw_label)(t, dsc, coords); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_array_assign)(array, index, value); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_label_struct_method_def = { - "lv_draw_sw_label", - (PyCFunction)py_lv_draw_sw_label_struct_method, +static PyMethodDef py_lv_array_assign_struct_method_def = { + "lv_array_assign", + (PyCFunction)py_lv_array_assign_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77311,60 +90043,85 @@ static PyMethodDef py_lv_draw_sw_label_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) + * void *lv_array_at(const lv_array_t *array, uint32_t index) */ -static PyObject *py_lv_draw_sw_arc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_at_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_draw_sw_arc)(t, dsc, coords); + _res = ((void *(*)(const lv_array_t *, uint32_t))lv_array_at)(array, index); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_sw_arc_struct_method_def = { - "lv_draw_sw_arc", - (PyCFunction)py_lv_draw_sw_arc_struct_method, +static PyMethodDef py_lv_array_at_struct_method_def = { + "lv_array_at", + (PyCFunction)py_lv_array_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_array_t_methods[] = { + {"size", (PyCFunction)py_lv_array_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"capacity", (PyCFunction)py_lv_array_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_empty", (PyCFunction)py_lv_array_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_full", (PyCFunction)py_lv_array_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear", (PyCFunction)py_lv_array_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"front", (PyCFunction)py_lv_array_front_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"back", (PyCFunction)py_lv_array_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_array_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_from_buf", (PyCFunction)py_lv_array_init_from_buf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"resize", (PyCFunction)py_lv_array_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"deinit", (PyCFunction)py_lv_array_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy", (PyCFunction)py_lv_array_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"shrink", (PyCFunction)py_lv_array_shrink_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_array_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_unordered", (PyCFunction)py_lv_array_remove_unordered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"erase", (PyCFunction)py_lv_array_erase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"concat", (PyCFunction)py_lv_array_concat_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"push_back", (PyCFunction)py_lv_array_push_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"assign", (PyCFunction)py_lv_array_assign_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"at", (PyCFunction)py_lv_array_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_draw_sw_line(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) */ -static PyObject *py_lv_draw_sw_line_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *dst = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_draw_sw_line)(t, dsc); + ((void (*)(lv_theme_t *, const lv_theme_t *))lv_theme_copy)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_line_struct_method_def = { - "lv_draw_sw_line", - (PyCFunction)py_lv_draw_sw_line_struct_method, +static PyMethodDef py_lv_theme_copy_struct_method_def = { + "lv_theme_copy", + (PyCFunction)py_lv_theme_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77372,60 +90129,92 @@ static PyMethodDef py_lv_draw_sw_line_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_layer(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) */ -static PyObject *py_lv_draw_sw_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_set_parent_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + lv_theme_t *parent = mp_write_ptr_lv_theme_t(parent_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_layer)(t, draw_dsc, coords); + ((void (*)(lv_theme_t *, lv_theme_t *))lv_theme_set_parent)(theme, parent); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_layer_struct_method_def = { - "lv_draw_sw_layer", - (PyCFunction)py_lv_draw_sw_layer_struct_method, +static PyMethodDef py_lv_theme_set_parent_struct_method_def = { + "lv_theme_set_parent", + (PyCFunction)py_lv_theme_set_parent_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_theme_t_apply_cb (CPython) + * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) + */ +static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_theme_t_apply_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_theme_t((void*)arg0); + PyObject *py_arg1 = lv_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) + * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) */ -static PyObject *py_lv_draw_sw_triangle_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_set_apply_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(dsc_py); + PyObject *apply_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &apply_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + void *apply_cb = mp_lv_callback(apply_cb_py, &lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", &theme->user_data, theme, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_draw_sw_triangle)(t, dsc); + ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_theme_set_apply_cb)(theme, apply_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_triangle_struct_method_def = { - "lv_draw_sw_triangle", - (PyCFunction)py_lv_draw_sw_triangle_struct_method, +static PyMethodDef py_lv_theme_set_apply_cb_struct_method_def = { + "lv_theme_set_apply_cb", + (PyCFunction)py_lv_theme_set_apply_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77433,30 +90222,29 @@ static PyMethodDef py_lv_draw_sw_triangle_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * void lv_theme_set_user_data(lv_theme_t *theme, void *user_data) */ -static PyObject *py_lv_draw_sw_blur_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_sw_blur)(t, dsc, coords); + ((void (*)(lv_theme_t *, void *))lv_theme_set_user_data)(theme, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_blur_struct_method_def = { - "lv_draw_sw_blur", - (PyCFunction)py_lv_draw_sw_blur_struct_method, +static PyMethodDef py_lv_theme_set_user_data_struct_method_def = { + "lv_theme_set_user_data", + (PyCFunction)py_lv_theme_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77464,178 +90252,123 @@ static PyMethodDef py_lv_draw_sw_blur_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) + * void *lv_theme_get_user_data(const lv_theme_t *theme) */ -static PyObject *py_lv_draw_sw_mask_rect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); + + const lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_sw_mask_rect)(t, dsc); + _res = ((void *(*)(const lv_theme_t *))lv_theme_get_user_data)(theme); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_sw_mask_rect_struct_method_def = { - "lv_draw_sw_mask_rect", - (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, +static PyMethodDef py_lv_theme_get_user_data_struct_method_def = { + "lv_theme_get_user_data", + (PyCFunction)py_lv_theme_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) - * lv_draw_image_core_cb draw_core_cb - */ - - /* * lvgl extension definition for: - * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * void lv_theme_delete(lv_theme_t *theme) */ -static PyObject *py_lv_draw_image_normal_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); - void *draw_core_cb = NULL; + + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_normal_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); + ((void (*)(lv_theme_t *))lv_theme_delete)(theme); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_image_normal_helper_struct_method_def = { - "lv_draw_image_normal_helper", - (PyCFunction)py_lv_draw_image_normal_helper_struct_method, +static PyMethodDef py_lv_theme_delete_struct_method_def = { + "lv_theme_delete", + (PyCFunction)py_lv_theme_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) - * lv_draw_image_core_cb draw_core_cb - */ - +PyMethodDef py_lv_theme_t_methods[] = { + {"copy", (PyCFunction)py_lv_theme_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_parent", (PyCFunction)py_lv_theme_set_parent_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_apply_cb", (PyCFunction)py_lv_theme_set_apply_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_theme_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_theme_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete", (PyCFunction)py_lv_theme_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + /* * lvgl extension definition for: - * void lv_draw_image_tiled_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * void lv_timer_delete(lv_timer_t *timer) */ -static PyObject *py_lv_draw_image_tiled_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); - void *draw_core_cb = NULL; + + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_tiled_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); + ((void (*)(lv_timer_t *))lv_timer_delete)(timer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_image_tiled_helper_struct_method_def = { - "lv_draw_image_tiled_helper", - (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, +static PyMethodDef py_lv_timer_delete_struct_method_def = { + "lv_timer_delete", + (PyCFunction)py_lv_timer_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_task_t_methods[] = { - {"get_dependent_count", (PyCFunction)py_lv_draw_get_dependent_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_type", (PyCFunction)py_lv_draw_task_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_draw_dsc", (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_area", (PyCFunction)py_lv_draw_task_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_fill_dsc", (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_border_dsc", (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_box_shadow_dsc", (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_label_dsc", (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"label_iterate_characters", (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"unit_draw_letter", (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_image_dsc", (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_line_dsc", (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"line_iterate", (PyCFunction)py_lv_draw_line_iterate_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_arc_dsc", (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_triangle_dsc", (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_blur_dsc", (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mask_rect_dsc", (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_blend", (PyCFunction)py_lv_draw_sw_blend_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_fill", (PyCFunction)py_lv_draw_sw_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_border", (PyCFunction)py_lv_draw_sw_border_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_box_shadow", (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_image", (PyCFunction)py_lv_draw_sw_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_letter", (PyCFunction)py_lv_draw_sw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_label", (PyCFunction)py_lv_draw_sw_label_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_arc", (PyCFunction)py_lv_draw_sw_arc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_line", (PyCFunction)py_lv_draw_sw_line_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_layer", (PyCFunction)py_lv_draw_sw_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_triangle", (PyCFunction)py_lv_draw_sw_triangle_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_blur", (PyCFunction)py_lv_draw_sw_blur_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_mask_rect", (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"image_normal_helper", (PyCFunction)py_lv_draw_image_normal_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"image_tiled_helper", (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_draw_unit_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) + * void lv_timer_pause(lv_timer_t *timer) */ -static PyObject *py_lv_color32_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *c2_py; - if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t c1 = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c1 = *p_; } - lv_color32_t c2 = mp_write_lv_color32_t(c2_py); + + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_color32_eq)(c1, c2); + ((void (*)(lv_timer_t *))lv_timer_pause)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color32_eq_struct_method_def = { - "lv_color32_eq", - (PyCFunction)py_lv_color32_eq_struct_method, +static PyMethodDef py_lv_timer_pause_struct_method_def = { + "lv_timer_pause", + (PyCFunction)py_lv_timer_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77643,56 +90376,88 @@ static PyMethodDef py_lv_color32_eq_struct_method_def = { /* * lvgl extension definition for: - * void lv_color_premultiply(lv_color32_t *c) + * void lv_timer_resume(lv_timer_t *timer) */ -static PyObject *py_lv_color_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_resume_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color32_t *c = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_color32_t *))lv_color_premultiply)(c); + ((void (*)(lv_timer_t *))lv_timer_resume)(timer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_color_premultiply_struct_method_def = { - "lv_color_premultiply", - (PyCFunction)py_lv_color_premultiply_struct_method, +static PyMethodDef py_lv_timer_resume_struct_method_def = { + "lv_timer_resume", + (PyCFunction)py_lv_timer_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_timer_t_timer_cb (CPython) + * void lv_timer_cb_t(lv_timer_t *) + */ +static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_timer_t_timer_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_timer_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * uint8_t lv_color32_luminance(lv_color32_t c) + * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) */ -static PyObject *py_lv_color32_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_set_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } + PyObject *timer_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &timer_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + void *timer_cb = mp_lv_callback(timer_cb_py, &lv_timer_t_timer_cb_callback, "lv_timer_t_timer_cb", &timer->user_data, timer, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color32_t))lv_color32_luminance)(c); + ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_timer_set_cb)(timer, timer_cb); lvpy_unlock(); - + lvpy_timer_bind(timer); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color32_luminance_struct_method_def = { - "lv_color32_luminance", - (PyCFunction)py_lv_color32_luminance_struct_method, +static PyMethodDef py_lv_timer_set_cb_struct_method_def = { + "lv_timer_set_cb", + (PyCFunction)py_lv_timer_set_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77700,30 +90465,29 @@ static PyMethodDef py_lv_color32_luminance_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg) + * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) */ -static PyObject *py_lv_color_mix32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_set_period_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + long period_val; + if (!PyArg_ParseTuple(py_args, "l", &period_val)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + uint32_t period = (uint32_t)period_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32)(fg, bg); + ((void (*)(lv_timer_t *, uint32_t))lv_timer_set_period)(timer, period); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_mix32_struct_method_def = { - "lv_color_mix32", - (PyCFunction)py_lv_color_mix32_struct_method, +static PyMethodDef py_lv_timer_set_period_struct_method_def = { + "lv_timer_set_period", + (PyCFunction)py_lv_timer_set_period_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77731,30 +90495,27 @@ static PyMethodDef py_lv_color_mix32_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_mix32_premultiplied(lv_color32_t fg, lv_color32_t bg) + * void lv_timer_ready(lv_timer_t *timer) */ -static PyObject *py_lv_color_mix32_premultiplied_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_premultiplied)(fg, bg); + ((void (*)(lv_timer_t *))lv_timer_ready)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_mix32_premultiplied_struct_method_def = { - "lv_color_mix32_premultiplied", - (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, +static PyMethodDef py_lv_timer_ready_struct_method_def = { + "lv_timer_ready", + (PyCFunction)py_lv_timer_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77762,137 +90523,89 @@ static PyMethodDef py_lv_color_mix32_premultiplied_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_over32(lv_color32_t fg, lv_color32_t bg) + * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) */ -static PyObject *py_lv_color_over32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + long repeat_count_val; + if (!PyArg_ParseTuple(py_args, "l", &repeat_count_val)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + int32_t repeat_count = (int32_t)repeat_count_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_over32)(fg, bg); + ((void (*)(lv_timer_t *, int32_t))lv_timer_set_repeat_count)(timer, repeat_count); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_over32_struct_method_def = { - "lv_color_over32", - (PyCFunction)py_lv_color_over32_struct_method, +static PyMethodDef py_lv_timer_set_repeat_count_struct_method_def = { + "lv_timer_set_repeat_count", + (PyCFunction)py_lv_timer_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_color32_t_methods[] = { - {"eq", (PyCFunction)py_lv_color32_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_premultiply", (PyCFunction)py_lv_color_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"luminance", (PyCFunction)py_lv_color32_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_mix32", (PyCFunction)py_lv_color_mix32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_mix32_premultiplied", (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_over32", (PyCFunction)py_lv_color_over32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) + * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) */ -static PyObject *py_lv_event_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_set_auto_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *e_py; long preprocess_val; - if (!PyArg_ParseTuple(py_args, "Ol", &e_py, &preprocess_val)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - lv_event_t *e = mp_write_ptr_lv_event_t(e_py); - bool preprocess = (preprocess_val != 0); + long auto_delete_val; + if (!PyArg_ParseTuple(py_args, "l", &auto_delete_val)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + bool auto_delete = (auto_delete_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_event_send)(list, e, preprocess); + ((void (*)(lv_timer_t *, bool))lv_timer_set_auto_delete)(timer, auto_delete); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_send_struct_method_def = { - "lv_event_send", - (PyCFunction)py_lv_event_send_struct_method, +static PyMethodDef py_lv_timer_set_auto_delete_struct_method_def = { + "lv_timer_set_auto_delete", + (PyCFunction)py_lv_timer_set_auto_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_event_add_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_event_add_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_event_add_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) + * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) */ -static PyObject *py_lv_event_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cb_py; PyObject *filter_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); void *user_data = mp_to_ptr(user_data_py); - lv_event_code_t filter = (int)mp_obj_get_int(filter_py); - void *cb = mp_lv_callback(cb_py, &lv_event_add_cb_callback, "lv_event_add_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_event_add)(list, cb, filter, user_data); + ((void (*)(lv_timer_t *, void *))lv_timer_set_user_data)(timer, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_add_struct_method_def = { - "lv_event_add", - (PyCFunction)py_lv_event_add_struct_method, +static PyMethodDef py_lv_timer_set_user_data_struct_method_def = { + "lv_timer_set_user_data", + (PyCFunction)py_lv_timer_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77900,30 +90613,27 @@ static PyMethodDef py_lv_event_add_struct_method_def = { /* * lvgl extension definition for: - * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) + * void lv_timer_reset(lv_timer_t *timer) */ -static PyObject *py_lv_event_remove_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(dsc_py); + + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_event_remove_dsc)(list, dsc); + ((void (*)(lv_timer_t *))lv_timer_reset)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_remove_dsc_struct_method_def = { - "lv_event_remove_dsc", - (PyCFunction)py_lv_event_remove_dsc_struct_method, +static PyMethodDef py_lv_timer_reset_struct_method_def = { + "lv_timer_reset", + (PyCFunction)py_lv_timer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77931,28 +90641,28 @@ static PyMethodDef py_lv_event_remove_dsc_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_event_get_count(lv_event_list_t *list) + * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) */ -static PyObject *py_lv_event_get_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_timer_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_event_list_t *))lv_event_get_count)(list); + _res = ((lv_timer_t *(*)(lv_timer_t *))lv_timer_get_next)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_event_get_count_struct_method_def = { - "lv_event_get_count", - (PyCFunction)py_lv_event_get_count_struct_method, +static PyMethodDef py_lv_timer_get_next_struct_method_def = { + "lv_timer_get_next", + (PyCFunction)py_lv_timer_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77960,30 +90670,28 @@ static PyMethodDef py_lv_event_get_count_struct_method_def = { /* * lvgl extension definition for: - * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) + * void *lv_timer_get_user_data(lv_timer_t *timer) */ -static PyObject *py_lv_event_get_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - uint32_t index = (uint32_t)index_val; + + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_event_get_dsc)(list, index); + _res = ((void *(*)(lv_timer_t *))lv_timer_get_user_data)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_event_get_dsc_struct_method_def = { - "lv_event_get_dsc", - (PyCFunction)py_lv_event_get_dsc_struct_method, +static PyMethodDef py_lv_timer_get_user_data_struct_method_def = { + "lv_timer_get_user_data", + (PyCFunction)py_lv_timer_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77991,58 +90699,77 @@ static PyMethodDef py_lv_event_get_dsc_struct_method_def = { /* * lvgl extension definition for: - * bool lv_event_remove(lv_event_list_t *list, uint32_t index) + * bool lv_timer_get_paused(lv_timer_t *timer) */ -static PyObject *py_lv_event_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_paused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - uint32_t index = (uint32_t)index_val; + + lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_event_remove)(list, index); + _res = ((bool (*)(lv_timer_t *))lv_timer_get_paused)(timer); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_event_remove_struct_method_def = { - "lv_event_remove", - (PyCFunction)py_lv_event_remove_struct_method, +static PyMethodDef py_lv_timer_get_paused_struct_method_def = { + "lv_timer_get_paused", + (PyCFunction)py_lv_timer_get_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_timer_t_methods[] = { + {"delete", (PyCFunction)py_lv_timer_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pause", (PyCFunction)py_lv_timer_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"resume", (PyCFunction)py_lv_timer_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cb", (PyCFunction)py_lv_timer_set_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_period", (PyCFunction)py_lv_timer_set_period_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ready", (PyCFunction)py_lv_timer_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_count", (PyCFunction)py_lv_timer_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_auto_delete", (PyCFunction)py_lv_timer_set_auto_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_timer_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset", (PyCFunction)py_lv_timer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_next", (PyCFunction)py_lv_timer_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_timer_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_paused", (PyCFunction)py_lv_timer_get_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_event_remove_all(lv_event_list_t *list) + * lv_obj_t *lv_obj_class_create_obj(const lv_obj_class_t *class_p, lv_obj_t *parent) */ -static PyObject *py_lv_event_remove_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_class_create_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + const lv_obj_class_t *class_p = (lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(self); + lv_obj_t *parent = mp_to_lv(parent_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_event_list_t *))lv_event_remove_all)(list); + _res = ((lv_obj_t *(*)(const lv_obj_class_t *, lv_obj_t *))lv_obj_class_create_obj)(class_p, parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_event_remove_all_struct_method_def = { - "lv_event_remove_all", - (PyCFunction)py_lv_event_remove_all_struct_method, +static PyMethodDef py_lv_obj_class_create_obj_struct_method_def = { + "lv_obj_class_create_obj", + (PyCFunction)py_lv_obj_class_create_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78050,74 +90777,67 @@ static PyMethodDef py_lv_event_remove_all_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) + * lv_result_t lv_obj_event_base(const lv_obj_class_t *class_p, lv_event_t *e) */ -static PyObject *py_lv_event_push_and_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_event_base_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *code_py; PyObject *original_target_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OOO", &code_py, &original_target_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *event_list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - lv_event_code_t code = (int)mp_obj_get_int(code_py); - void *original_target = mp_to_ptr(original_target_py); - void *param = mp_to_ptr(param_py); + PyObject *e_py; + if (!PyArg_ParseTuple(py_args, "O", &e_py)) { PyGILState_Release(gstate); return NULL; } + const lv_obj_class_t *class_p = (lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(self); + lv_event_t *e = mp_write_ptr_lv_event_t(e_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_event_push_and_send)(event_list, code, original_target, param); + _res = ((lv_result_t (*)(const lv_obj_class_t *, lv_event_t *))lv_obj_event_base)(class_p, e); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_event_push_and_send_struct_method_def = { - "lv_event_push_and_send", - (PyCFunction)py_lv_event_push_and_send_struct_method, +static PyMethodDef py_lv_obj_event_base_struct_method_def = { + "lv_obj_event_base", + (PyCFunction)py_lv_obj_event_base_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_event_list_t_methods[] = { - {"send", (PyCFunction)py_lv_event_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add", (PyCFunction)py_lv_event_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_dsc", (PyCFunction)py_lv_event_remove_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_count", (PyCFunction)py_lv_event_get_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dsc", (PyCFunction)py_lv_event_get_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove", (PyCFunction)py_lv_event_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_all", (PyCFunction)py_lv_event_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"push_and_send", (PyCFunction)py_lv_event_push_and_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_obj_class_t_methods[] = { + {"create_obj", (PyCFunction)py_lv_obj_class_create_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"event_base", (PyCFunction)py_lv_obj_event_base_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; +PyMethodDef py_lv_matrix_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * inline static uint32_t lv_array_size(const lv_array_t *array) + * inline static bool lv_style_is_const_internal(const lv_style_t *style) */ -static PyObject *py_lv_array_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_is_const_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_array_t *))lv_array_size)(array); + _res = ((bool (*)(const lv_style_t *))lv_style_is_const_internal)(style); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_array_size_struct_method_def = { - "lv_array_size", - (PyCFunction)py_lv_array_size_struct_method, +static PyMethodDef py_lv_style_is_const_internal_struct_method_def = { + "lv_style_is_const_internal", + (PyCFunction)py_lv_style_is_const_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78125,28 +90845,31 @@ static PyMethodDef py_lv_array_size_struct_method_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_array_capacity(const lv_array_t *array) + * inline static lv_style_res_t lv_style_get_prop_internal(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) */ -static PyObject *py_lv_array_capacity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_get_prop_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + PyObject *prop_py; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &value_py)) { PyGILState_Release(gstate); return NULL; } + const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_style_value_t *value = mp_write_ptr_lv_style_value_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_style_res_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_array_t *))lv_array_capacity)(array); + _res = ((lv_style_res_t (*)(const lv_style_t *, lv_style_prop_t, lv_style_value_t *))lv_style_get_prop_internal)(style, prop, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_array_capacity_struct_method_def = { - "lv_array_capacity", - (PyCFunction)py_lv_array_capacity_struct_method, +static PyMethodDef py_lv_style_get_prop_internal_struct_method_def = { + "lv_style_get_prop_internal", + (PyCFunction)py_lv_style_get_prop_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78154,28 +90877,27 @@ static PyMethodDef py_lv_array_capacity_struct_method_def = { /* * lvgl extension definition for: - * inline static bool lv_array_is_empty(const lv_array_t *array) + * void lv_style_init(lv_style_t *style) */ -static PyObject *py_lv_array_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_array_t *))lv_array_is_empty)(array); + ((void (*)(lv_style_t *))lv_style_init)(style); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_is_empty_struct_method_def = { - "lv_array_is_empty", - (PyCFunction)py_lv_array_is_empty_struct_method, +static PyMethodDef py_lv_style_init_struct_method_def = { + "lv_style_init", + (PyCFunction)py_lv_style_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78183,28 +90905,27 @@ static PyMethodDef py_lv_array_is_empty_struct_method_def = { /* * lvgl extension definition for: - * inline static bool lv_array_is_full(const lv_array_t *array) + * void lv_style_reset(lv_style_t *style) */ -static PyObject *py_lv_array_is_full_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_array_t *))lv_array_is_full)(array); + ((void (*)(lv_style_t *))lv_style_reset)(style); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_is_full_struct_method_def = { - "lv_array_is_full", - (PyCFunction)py_lv_array_is_full_struct_method, +static PyMethodDef py_lv_style_reset_struct_method_def = { + "lv_style_reset", + (PyCFunction)py_lv_style_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78212,27 +90933,29 @@ static PyMethodDef py_lv_array_is_full_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_array_clear(lv_array_t *array) + * void lv_style_copy(lv_style_t *dst, const lv_style_t *src) */ -static PyObject *py_lv_array_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *dst = (lv_style_t *)mp_write_ptr_lv_style_t(self); + const lv_style_t *src = (const lv_style_t *)mp_write_ptr_lv_style_t(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_array_t *))lv_array_clear)(array); + ((void (*)(lv_style_t *, const lv_style_t *))lv_style_copy)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_array_clear_struct_method_def = { - "lv_array_clear", - (PyCFunction)py_lv_array_clear_struct_method, +static PyMethodDef py_lv_style_copy_struct_method_def = { + "lv_style_copy", + (PyCFunction)py_lv_style_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78240,28 +90963,29 @@ static PyMethodDef py_lv_array_clear_struct_method_def = { /* * lvgl extension definition for: - * inline static void *lv_array_front(const lv_array_t *array) + * void lv_style_merge(lv_style_t *dst, const lv_style_t *src) */ -static PyObject *py_lv_array_front_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_merge_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *dst = (lv_style_t *)mp_write_ptr_lv_style_t(self); + const lv_style_t *src = (const lv_style_t *)mp_write_ptr_lv_style_t(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_array_t *))lv_array_front)(array); + ((void (*)(lv_style_t *, const lv_style_t *))lv_style_merge)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_front_struct_method_def = { - "lv_array_front", - (PyCFunction)py_lv_array_front_struct_method, +static PyMethodDef py_lv_style_merge_struct_method_def = { + "lv_style_merge", + (PyCFunction)py_lv_style_merge_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78269,28 +90993,28 @@ static PyMethodDef py_lv_array_front_struct_method_def = { /* * lvgl extension definition for: - * inline static void *lv_array_back(const lv_array_t *array) + * bool lv_style_is_const(const lv_style_t *style) */ -static PyObject *py_lv_array_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_is_const_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + bool _res; lvpy_lock(); - _res = ((void *(*)(const lv_array_t *))lv_array_back)(array); + _res = ((bool (*)(const lv_style_t *))lv_style_is_const)(style); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_array_back_struct_method_def = { - "lv_array_back", - (PyCFunction)py_lv_array_back_struct_method, +static PyMethodDef py_lv_style_is_const_struct_method_def = { + "lv_style_is_const", + (PyCFunction)py_lv_style_is_const_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78298,30 +91022,30 @@ static PyMethodDef py_lv_array_back_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) + * bool lv_style_remove_prop(lv_style_t *style, lv_style_prop_t prop) */ -static PyObject *py_lv_array_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_remove_prop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_array_t *, uint32_t, uint32_t))lv_array_init)(array, capacity, element_size); + _res = ((bool (*)(lv_style_t *, lv_style_prop_t))lv_style_remove_prop)(style, prop); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_array_init_struct_method_def = { - "lv_array_init", - (PyCFunction)py_lv_array_init_struct_method, +static PyMethodDef py_lv_style_remove_prop_struct_method_def = { + "lv_style_remove_prop", + (PyCFunction)py_lv_style_remove_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78329,31 +91053,30 @@ static PyMethodDef py_lv_array_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) + * void lv_style_set_prop(lv_style_t *style, lv_style_prop_t prop, lv_style_value_t value) */ -static PyObject *py_lv_array_init_from_buf_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_prop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - void *buf = mp_to_ptr(buf_py); - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + PyObject *prop_py; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_style_value_t value = mp_write_lv_style_value_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_array_init_from_buf)(array, buf, capacity, element_size); + ((void (*)(lv_style_t *, lv_style_prop_t, lv_style_value_t))lv_style_set_prop)(style, prop, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_array_init_from_buf_struct_method_def = { - "lv_array_init_from_buf", - (PyCFunction)py_lv_array_init_from_buf_struct_method, +static PyMethodDef py_lv_style_set_prop_struct_method_def = { + "lv_style_set_prop", + (PyCFunction)py_lv_style_set_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78361,30 +91084,31 @@ static PyMethodDef py_lv_array_init_from_buf_struct_method_def = { /* * lvgl extension definition for: - * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) + * lv_style_res_t lv_style_get_prop(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) */ -static PyObject *py_lv_array_resize_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_get_prop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long new_capacity_val; - if (!PyArg_ParseTuple(py_args, "l", &new_capacity_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t new_capacity = (uint32_t)new_capacity_val; + PyObject *prop_py; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &value_py)) { PyGILState_Release(gstate); return NULL; } + const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_style_value_t *value = mp_write_ptr_lv_style_value_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_style_res_t _res; lvpy_lock(); - _res = ((bool (*)(lv_array_t *, uint32_t))lv_array_resize)(array, new_capacity); + _res = ((lv_style_res_t (*)(const lv_style_t *, lv_style_prop_t, lv_style_value_t *))lv_style_get_prop)(style, prop, value); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_array_resize_struct_method_def = { - "lv_array_resize", - (PyCFunction)py_lv_array_resize_struct_method, +static PyMethodDef py_lv_style_get_prop_struct_method_def = { + "lv_style_get_prop", + (PyCFunction)py_lv_style_get_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78392,27 +91116,28 @@ static PyMethodDef py_lv_array_resize_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_deinit(lv_array_t *array) + * bool lv_style_is_empty(const lv_style_t *style) */ -static PyObject *py_lv_array_deinit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_array_t *))lv_array_deinit)(array); + _res = ((bool (*)(const lv_style_t *))lv_style_is_empty)(style); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_array_deinit_struct_method_def = { - "lv_array_deinit", - (PyCFunction)py_lv_array_deinit_struct_method, +static PyMethodDef py_lv_style_is_empty_struct_method_def = { + "lv_style_is_empty", + (PyCFunction)py_lv_style_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78420,29 +91145,29 @@ static PyMethodDef py_lv_array_deinit_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_copy(lv_array_t *target, const lv_array_t *source) + * void lv_style_set_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *source_py; - if (!PyArg_ParseTuple(py_args, "O", &source_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *target = (lv_array_t *)mp_write_ptr_lv_array_t(self); - const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(source_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_array_t *, const lv_array_t *))lv_array_copy)(target, source); + ((void (*)(lv_style_t *, int32_t))lv_style_set_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_array_copy_struct_method_def = { - "lv_array_copy", - (PyCFunction)py_lv_array_copy_struct_method, +static PyMethodDef py_lv_style_set_width_struct_method_def = { + "lv_style_set_width", + (PyCFunction)py_lv_style_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78450,27 +91175,29 @@ static PyMethodDef py_lv_array_copy_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_shrink(lv_array_t *array) + * void lv_style_set_min_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_shrink_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_min_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_array_t *))lv_array_shrink)(array); + ((void (*)(lv_style_t *, int32_t))lv_style_set_min_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_array_shrink_struct_method_def = { - "lv_array_shrink", - (PyCFunction)py_lv_array_shrink_struct_method, +static PyMethodDef py_lv_style_set_min_width_struct_method_def = { + "lv_style_set_min_width", + (PyCFunction)py_lv_style_set_min_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78478,30 +91205,29 @@ static PyMethodDef py_lv_array_shrink_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) + * void lv_style_set_max_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_max_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove)(array, index); + ((void (*)(lv_style_t *, int32_t))lv_style_set_max_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_remove_struct_method_def = { - "lv_array_remove", - (PyCFunction)py_lv_array_remove_struct_method, +static PyMethodDef py_lv_style_set_max_width_struct_method_def = { + "lv_style_set_max_width", + (PyCFunction)py_lv_style_set_max_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78509,30 +91235,29 @@ static PyMethodDef py_lv_array_remove_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_remove_unordered(lv_array_t *array, uint32_t index) + * void lv_style_set_height(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_remove_unordered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove_unordered)(array, index); + ((void (*)(lv_style_t *, int32_t))lv_style_set_height)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_remove_unordered_struct_method_def = { - "lv_array_remove_unordered", - (PyCFunction)py_lv_array_remove_unordered_struct_method, +static PyMethodDef py_lv_style_set_height_struct_method_def = { + "lv_style_set_height", + (PyCFunction)py_lv_style_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78540,31 +91265,29 @@ static PyMethodDef py_lv_array_remove_unordered_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_erase(lv_array_t *array, uint32_t start, uint32_t end) + * void lv_style_set_min_height(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_erase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_min_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t start = (uint32_t)start_val; - uint32_t end = (uint32_t)end_val; + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_array_erase)(array, start, end); + ((void (*)(lv_style_t *, int32_t))lv_style_set_min_height)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_erase_struct_method_def = { - "lv_array_erase", - (PyCFunction)py_lv_array_erase_struct_method, +static PyMethodDef py_lv_style_set_min_height_struct_method_def = { + "lv_style_set_min_height", + (PyCFunction)py_lv_style_set_min_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78572,30 +91295,29 @@ static PyMethodDef py_lv_array_erase_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) + * void lv_style_set_max_height(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_concat_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_max_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *other_py; - if (!PyArg_ParseTuple(py_args, "O", &other_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(other_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_array_concat)(array, other); + ((void (*)(lv_style_t *, int32_t))lv_style_set_max_height)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_concat_struct_method_def = { - "lv_array_concat", - (PyCFunction)py_lv_array_concat_struct_method, +static PyMethodDef py_lv_style_set_max_height_struct_method_def = { + "lv_style_set_max_height", + (PyCFunction)py_lv_style_set_max_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78603,30 +91325,29 @@ static PyMethodDef py_lv_array_concat_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) + * void lv_style_set_length(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_push_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_length_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *element_py; - if (!PyArg_ParseTuple(py_args, "O", &element_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - const void *element = (const void *)mp_to_ptr(element_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_array_push_back)(array, element); + ((void (*)(lv_style_t *, int32_t))lv_style_set_length)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_push_back_struct_method_def = { - "lv_array_push_back", - (PyCFunction)py_lv_array_push_back_struct_method, +static PyMethodDef py_lv_style_set_length_struct_method_def = { + "lv_style_set_length", + (PyCFunction)py_lv_style_set_length_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78634,31 +91355,29 @@ static PyMethodDef py_lv_array_push_back_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) + * void lv_style_set_x(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_assign_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "lO", &index_val, &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; - const void *value = (const void *)mp_to_ptr(value_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_array_assign)(array, index, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_x)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_assign_struct_method_def = { - "lv_array_assign", - (PyCFunction)py_lv_array_assign_struct_method, +static PyMethodDef py_lv_style_set_x_struct_method_def = { + "lv_style_set_x", + (PyCFunction)py_lv_style_set_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78666,85 +91385,59 @@ static PyMethodDef py_lv_array_assign_struct_method_def = { /* * lvgl extension definition for: - * void *lv_array_at(const lv_array_t *array, uint32_t index) + * void lv_style_set_y(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_array_at_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_array_t *, uint32_t))lv_array_at)(array, index); + ((void (*)(lv_style_t *, int32_t))lv_style_set_y)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_at_struct_method_def = { - "lv_array_at", - (PyCFunction)py_lv_array_at_struct_method, +static PyMethodDef py_lv_style_set_y_struct_method_def = { + "lv_style_set_y", + (PyCFunction)py_lv_style_set_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_array_t_methods[] = { - {"size", (PyCFunction)py_lv_array_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"capacity", (PyCFunction)py_lv_array_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_empty", (PyCFunction)py_lv_array_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_full", (PyCFunction)py_lv_array_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear", (PyCFunction)py_lv_array_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"front", (PyCFunction)py_lv_array_front_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"back", (PyCFunction)py_lv_array_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_array_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_from_buf", (PyCFunction)py_lv_array_init_from_buf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"resize", (PyCFunction)py_lv_array_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"deinit", (PyCFunction)py_lv_array_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy", (PyCFunction)py_lv_array_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"shrink", (PyCFunction)py_lv_array_shrink_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove", (PyCFunction)py_lv_array_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_unordered", (PyCFunction)py_lv_array_remove_unordered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"erase", (PyCFunction)py_lv_array_erase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"concat", (PyCFunction)py_lv_array_concat_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"push_back", (PyCFunction)py_lv_array_push_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"assign", (PyCFunction)py_lv_array_assign_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"at", (PyCFunction)py_lv_array_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) + * void lv_style_set_align(lv_style_t *style, lv_align_t value) */ -static PyObject *py_lv_theme_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - lv_theme_t *dst = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); - const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(src_py); + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_theme_t *, const lv_theme_t *))lv_theme_copy)(dst, src); + ((void (*)(lv_style_t *, lv_align_t))lv_style_set_align)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_copy_struct_method_def = { - "lv_theme_copy", - (PyCFunction)py_lv_theme_copy_struct_method, +static PyMethodDef py_lv_style_set_align_struct_method_def = { + "lv_style_set_align", + (PyCFunction)py_lv_style_set_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78752,92 +91445,59 @@ static PyMethodDef py_lv_theme_copy_struct_method_def = { /* * lvgl extension definition for: - * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) + * void lv_style_set_transform_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_theme_set_parent_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); - lv_theme_t *parent = mp_write_ptr_lv_theme_t(parent_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_theme_t *, lv_theme_t *))lv_theme_set_parent)(theme, parent); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_set_parent_struct_method_def = { - "lv_theme_set_parent", - (PyCFunction)py_lv_theme_set_parent_struct_method, +static PyMethodDef py_lv_style_set_transform_width_struct_method_def = { + "lv_style_set_transform_width", + (PyCFunction)py_lv_style_set_transform_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_theme_t_apply_cb (CPython) - * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) - */ -static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_theme_t_apply_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_theme_t((void*)arg0); - PyObject *py_arg1 = lv_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) + * void lv_style_set_transform_height(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_theme_set_apply_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *apply_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &apply_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); - void *apply_cb = mp_lv_callback(apply_cb_py, &lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", &theme->user_data, theme, (NULL), (NULL)); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_theme_set_apply_cb)(theme, apply_cb); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_height)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_set_apply_cb_struct_method_def = { - "lv_theme_set_apply_cb", - (PyCFunction)py_lv_theme_set_apply_cb_struct_method, +static PyMethodDef py_lv_style_set_transform_height_struct_method_def = { + "lv_style_set_transform_height", + (PyCFunction)py_lv_style_set_transform_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78845,64 +91505,59 @@ static PyMethodDef py_lv_theme_set_apply_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_theme_delete(lv_theme_t *theme) + * void lv_style_set_translate_x(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_theme_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_translate_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_theme_t *))lv_theme_delete)(theme); + ((void (*)(lv_style_t *, int32_t))lv_style_set_translate_x)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_delete_struct_method_def = { - "lv_theme_delete", - (PyCFunction)py_lv_theme_delete_struct_method, +static PyMethodDef py_lv_style_set_translate_x_struct_method_def = { + "lv_style_set_translate_x", + (PyCFunction)py_lv_style_set_translate_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_theme_t_methods[] = { - {"copy", (PyCFunction)py_lv_theme_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_parent", (PyCFunction)py_lv_theme_set_parent_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_apply_cb", (PyCFunction)py_lv_theme_set_apply_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete", (PyCFunction)py_lv_theme_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_timer_delete(lv_timer_t *timer) + * void lv_style_set_translate_y(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_translate_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_timer_delete)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_translate_y)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_delete_struct_method_def = { - "lv_timer_delete", - (PyCFunction)py_lv_timer_delete_struct_method, +static PyMethodDef py_lv_style_set_translate_y_struct_method_def = { + "lv_style_set_translate_y", + (PyCFunction)py_lv_style_set_translate_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78910,27 +91565,29 @@ static PyMethodDef py_lv_timer_delete_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_pause(lv_timer_t *timer) + * void lv_style_set_translate_radial(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_translate_radial_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_timer_pause)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_translate_radial)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_pause_struct_method_def = { - "lv_timer_pause", - (PyCFunction)py_lv_timer_pause_struct_method, +static PyMethodDef py_lv_style_set_translate_radial_struct_method_def = { + "lv_style_set_translate_radial", + (PyCFunction)py_lv_style_set_translate_radial_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78938,88 +91595,59 @@ static PyMethodDef py_lv_timer_pause_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_resume(lv_timer_t *timer) + * void lv_style_set_transform_scale_x(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_resume_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_scale_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_timer_resume)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_scale_x)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_resume_struct_method_def = { - "lv_timer_resume", - (PyCFunction)py_lv_timer_resume_struct_method, +static PyMethodDef py_lv_style_set_transform_scale_x_struct_method_def = { + "lv_style_set_transform_scale_x", + (PyCFunction)py_lv_style_set_transform_scale_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_timer_t_timer_cb (CPython) - * void lv_timer_cb_t(lv_timer_t *) - */ -static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_timer_t_timer_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_timer_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) + * void lv_style_set_transform_scale_y(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_set_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_scale_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *timer_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &timer_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); - void *timer_cb = mp_lv_callback(timer_cb_py, &lv_timer_t_timer_cb_callback, "lv_timer_t_timer_cb", &timer->user_data, timer, (NULL), (NULL)); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_timer_set_cb)(timer, timer_cb); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_scale_y)(style, value); lvpy_unlock(); - lvpy_timer_bind(timer); + PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_set_cb_struct_method_def = { - "lv_timer_set_cb", - (PyCFunction)py_lv_timer_set_cb_struct_method, +static PyMethodDef py_lv_style_set_transform_scale_y_struct_method_def = { + "lv_style_set_transform_scale_y", + (PyCFunction)py_lv_style_set_transform_scale_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79027,29 +91655,29 @@ static PyMethodDef py_lv_timer_set_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) + * void lv_style_set_transform_rotation(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_set_period_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long period_val; - if (!PyArg_ParseTuple(py_args, "l", &period_val)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); - uint32_t period = (uint32_t)period_val; + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *, uint32_t))lv_timer_set_period)(timer, period); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_rotation)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_set_period_struct_method_def = { - "lv_timer_set_period", - (PyCFunction)py_lv_timer_set_period_struct_method, +static PyMethodDef py_lv_style_set_transform_rotation_struct_method_def = { + "lv_style_set_transform_rotation", + (PyCFunction)py_lv_style_set_transform_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79057,27 +91685,29 @@ static PyMethodDef py_lv_timer_set_period_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_ready(lv_timer_t *timer) + * void lv_style_set_transform_pivot_x(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_pivot_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_timer_ready)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_pivot_x)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_ready_struct_method_def = { - "lv_timer_ready", - (PyCFunction)py_lv_timer_ready_struct_method, +static PyMethodDef py_lv_style_set_transform_pivot_x_struct_method_def = { + "lv_style_set_transform_pivot_x", + (PyCFunction)py_lv_style_set_transform_pivot_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79085,29 +91715,29 @@ static PyMethodDef py_lv_timer_ready_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) + * void lv_style_set_transform_pivot_y(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_pivot_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long repeat_count_val; - if (!PyArg_ParseTuple(py_args, "l", &repeat_count_val)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); - int32_t repeat_count = (int32_t)repeat_count_val; + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *, int32_t))lv_timer_set_repeat_count)(timer, repeat_count); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_pivot_y)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_set_repeat_count_struct_method_def = { - "lv_timer_set_repeat_count", - (PyCFunction)py_lv_timer_set_repeat_count_struct_method, +static PyMethodDef py_lv_style_set_transform_pivot_y_struct_method_def = { + "lv_style_set_transform_pivot_y", + (PyCFunction)py_lv_style_set_transform_pivot_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79115,29 +91745,29 @@ static PyMethodDef py_lv_timer_set_repeat_count_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) + * void lv_style_set_transform_skew_x(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_set_auto_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_skew_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long auto_delete_val; - if (!PyArg_ParseTuple(py_args, "l", &auto_delete_val)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); - bool auto_delete = (auto_delete_val != 0); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *, bool))lv_timer_set_auto_delete)(timer, auto_delete); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_skew_x)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_set_auto_delete_struct_method_def = { - "lv_timer_set_auto_delete", - (PyCFunction)py_lv_timer_set_auto_delete_struct_method, +static PyMethodDef py_lv_style_set_transform_skew_x_struct_method_def = { + "lv_style_set_transform_skew_x", + (PyCFunction)py_lv_style_set_transform_skew_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79145,29 +91775,29 @@ static PyMethodDef py_lv_timer_set_auto_delete_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) + * void lv_style_set_transform_skew_y(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_skew_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); - void *user_data = mp_to_ptr(user_data_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *, void *))lv_timer_set_user_data)(timer, user_data); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_skew_y)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_set_user_data_struct_method_def = { - "lv_timer_set_user_data", - (PyCFunction)py_lv_timer_set_user_data_struct_method, +static PyMethodDef py_lv_style_set_transform_skew_y_struct_method_def = { + "lv_style_set_transform_skew_y", + (PyCFunction)py_lv_style_set_transform_skew_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79175,27 +91805,29 @@ static PyMethodDef py_lv_timer_set_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_timer_reset(lv_timer_t *timer) + * void lv_style_set_pad_top(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_timer_reset)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_top)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_reset_struct_method_def = { - "lv_timer_reset", - (PyCFunction)py_lv_timer_reset_struct_method, +static PyMethodDef py_lv_style_set_pad_top_struct_method_def = { + "lv_style_set_pad_top", + (PyCFunction)py_lv_style_set_pad_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79203,28 +91835,29 @@ static PyMethodDef py_lv_timer_reset_struct_method_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) + * void lv_style_set_pad_bottom(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(lv_timer_t *))lv_timer_get_next)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_bottom)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_get_next_struct_method_def = { - "lv_timer_get_next", - (PyCFunction)py_lv_timer_get_next_struct_method, +static PyMethodDef py_lv_style_set_pad_bottom_struct_method_def = { + "lv_style_set_pad_bottom", + (PyCFunction)py_lv_style_set_pad_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79232,28 +91865,29 @@ static PyMethodDef py_lv_timer_get_next_struct_method_def = { /* * lvgl extension definition for: - * void *lv_timer_get_user_data(lv_timer_t *timer) + * void lv_style_set_pad_left(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_left_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_timer_t *))lv_timer_get_user_data)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_left)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_get_user_data_struct_method_def = { - "lv_timer_get_user_data", - (PyCFunction)py_lv_timer_get_user_data_struct_method, +static PyMethodDef py_lv_style_set_pad_left_struct_method_def = { + "lv_style_set_pad_left", + (PyCFunction)py_lv_style_set_pad_left_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79261,77 +91895,59 @@ static PyMethodDef py_lv_timer_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * bool lv_timer_get_paused(lv_timer_t *timer) + * void lv_style_set_pad_right(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_timer_get_paused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_right_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_timer_t *timer = (lv_timer_t *)mp_write_ptr_lv_timer_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_timer_t *))lv_timer_get_paused)(timer); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_right)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_timer_get_paused_struct_method_def = { - "lv_timer_get_paused", - (PyCFunction)py_lv_timer_get_paused_struct_method, +static PyMethodDef py_lv_style_set_pad_right_struct_method_def = { + "lv_style_set_pad_right", + (PyCFunction)py_lv_style_set_pad_right_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_timer_t_methods[] = { - {"delete", (PyCFunction)py_lv_timer_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pause", (PyCFunction)py_lv_timer_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"resume", (PyCFunction)py_lv_timer_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cb", (PyCFunction)py_lv_timer_set_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_period", (PyCFunction)py_lv_timer_set_period_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ready", (PyCFunction)py_lv_timer_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_count", (PyCFunction)py_lv_timer_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_auto_delete", (PyCFunction)py_lv_timer_set_auto_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_timer_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset", (PyCFunction)py_lv_timer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_next", (PyCFunction)py_lv_timer_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_timer_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_paused", (PyCFunction)py_lv_timer_get_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_obj_t *lv_obj_class_create_obj(const lv_obj_class_t *class_p, lv_obj_t *parent) + * void lv_style_set_pad_row(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_obj_class_create_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_row_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - const lv_obj_class_t *class_p = (lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(self); - lv_obj_t *parent = mp_to_lv(parent_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_class_t *, lv_obj_t *))lv_obj_class_create_obj)(class_p, parent); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_row)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_class_create_obj_struct_method_def = { - "lv_obj_class_create_obj", - (PyCFunction)py_lv_obj_class_create_obj_struct_method, +static PyMethodDef py_lv_style_set_pad_row_struct_method_def = { + "lv_style_set_pad_row", + (PyCFunction)py_lv_style_set_pad_row_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79339,67 +91955,59 @@ static PyMethodDef py_lv_obj_class_create_obj_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_obj_event_base(const lv_obj_class_t *class_p, lv_event_t *e) + * void lv_style_set_pad_column(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_obj_event_base_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_column_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *e_py; - if (!PyArg_ParseTuple(py_args, "O", &e_py)) { PyGILState_Release(gstate); return NULL; } - const lv_obj_class_t *class_p = (lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(self); - lv_event_t *e = mp_write_ptr_lv_event_t(e_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_obj_class_t *, lv_event_t *))lv_obj_event_base)(class_p, e); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_column)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_event_base_struct_method_def = { - "lv_obj_event_base", - (PyCFunction)py_lv_obj_event_base_struct_method, +static PyMethodDef py_lv_style_set_pad_column_struct_method_def = { + "lv_style_set_pad_column", + (PyCFunction)py_lv_style_set_pad_column_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_obj_class_t_methods[] = { - {"create_obj", (PyCFunction)py_lv_obj_class_create_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"event_base", (PyCFunction)py_lv_obj_event_base_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_matrix_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * inline static bool lv_style_is_const(const lv_style_t *style) + * void lv_style_set_pad_radial(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_is_const_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_radial_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_style_t *))lv_style_is_const)(style); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_radial)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_style_is_const_struct_method_def = { - "lv_style_is_const", - (PyCFunction)py_lv_style_is_const_struct_method, +static PyMethodDef py_lv_style_set_pad_radial_struct_method_def = { + "lv_style_set_pad_radial", + (PyCFunction)py_lv_style_set_pad_radial_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79407,31 +92015,29 @@ static PyMethodDef py_lv_style_is_const_struct_method_def = { /* * lvgl extension definition for: - * inline static lv_style_res_t lv_style_get_prop_inlined(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) + * void lv_style_set_margin_top(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_get_prop_inlined_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_margin_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *prop_py; PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &value_py)) { PyGILState_Release(gstate); return NULL; } - const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - lv_style_value_t *value = mp_write_ptr_lv_style_value_t(value_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_res_t _res; lvpy_lock(); - _res = ((lv_style_res_t (*)(const lv_style_t *, lv_style_prop_t, lv_style_value_t *))lv_style_get_prop_inlined)(style, prop, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_top)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_style_get_prop_inlined_struct_method_def = { - "lv_style_get_prop_inlined", - (PyCFunction)py_lv_style_get_prop_inlined_struct_method, +static PyMethodDef py_lv_style_set_margin_top_struct_method_def = { + "lv_style_set_margin_top", + (PyCFunction)py_lv_style_set_margin_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79439,30 +92045,29 @@ static PyMethodDef py_lv_style_get_prop_inlined_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) + * void lv_style_set_margin_bottom(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_margin_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long width_val; long height_val; - if (!PyArg_ParseTuple(py_args, "ll", &width_val, &height_val)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t width = (int32_t)width_val; - int32_t height = (int32_t)height_val; + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t, int32_t))lv_style_set_size)(style, width, height); + ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_bottom)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_size_struct_method_def = { - "lv_style_set_size", - (PyCFunction)py_lv_style_set_size_struct_method, +static PyMethodDef py_lv_style_set_margin_bottom_struct_method_def = { + "lv_style_set_margin_bottom", + (PyCFunction)py_lv_style_set_margin_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79470,9 +92075,9 @@ static PyMethodDef py_lv_style_set_size_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_pad_all(lv_style_t *style, int32_t value) + * void lv_style_set_margin_left(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_pad_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_margin_left_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -79483,16 +92088,16 @@ static PyObject *py_lv_style_set_pad_all_struct_method(PyObject *self, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_all)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_left)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_all_struct_method_def = { - "lv_style_set_pad_all", - (PyCFunction)py_lv_style_set_pad_all_struct_method, +static PyMethodDef py_lv_style_set_margin_left_struct_method_def = { + "lv_style_set_margin_left", + (PyCFunction)py_lv_style_set_margin_left_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79500,9 +92105,9 @@ static PyMethodDef py_lv_style_set_pad_all_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_pad_hor(lv_style_t *style, int32_t value) + * void lv_style_set_margin_right(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_pad_hor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_margin_right_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -79513,16 +92118,16 @@ static PyObject *py_lv_style_set_pad_hor_struct_method(PyObject *self, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_hor)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_right)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_hor_struct_method_def = { - "lv_style_set_pad_hor", - (PyCFunction)py_lv_style_set_pad_hor_struct_method, +static PyMethodDef py_lv_style_set_margin_right_struct_method_def = { + "lv_style_set_margin_right", + (PyCFunction)py_lv_style_set_margin_right_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79530,29 +92135,29 @@ static PyMethodDef py_lv_style_set_pad_hor_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_pad_ver(lv_style_t *style, int32_t value) + * void lv_style_set_bg_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_pad_ver_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_ver)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_bg_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_ver_struct_method_def = { - "lv_style_set_pad_ver", - (PyCFunction)py_lv_style_set_pad_ver_struct_method, +static PyMethodDef py_lv_style_set_bg_color_struct_method_def = { + "lv_style_set_bg_color", + (PyCFunction)py_lv_style_set_bg_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79560,29 +92165,29 @@ static PyMethodDef py_lv_style_set_pad_ver_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_pad_gap(lv_style_t *style, int32_t value) + * void lv_style_set_bg_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_pad_gap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_gap)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_gap_struct_method_def = { - "lv_style_set_pad_gap", - (PyCFunction)py_lv_style_set_pad_gap_struct_method, +static PyMethodDef py_lv_style_set_bg_opa_struct_method_def = { + "lv_style_set_bg_opa", + (PyCFunction)py_lv_style_set_bg_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79590,29 +92195,29 @@ static PyMethodDef py_lv_style_set_pad_gap_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_margin_hor(lv_style_t *style, int32_t value) + * void lv_style_set_bg_grad_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_margin_hor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_grad_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_hor)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_bg_grad_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_margin_hor_struct_method_def = { - "lv_style_set_margin_hor", - (PyCFunction)py_lv_style_set_margin_hor_struct_method, +static PyMethodDef py_lv_style_set_bg_grad_color_struct_method_def = { + "lv_style_set_bg_grad_color", + (PyCFunction)py_lv_style_set_bg_grad_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79620,29 +92225,29 @@ static PyMethodDef py_lv_style_set_margin_hor_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_margin_ver(lv_style_t *style, int32_t value) + * void lv_style_set_bg_grad_dir(lv_style_t *style, lv_grad_dir_t value) */ -static PyObject *py_lv_style_set_margin_ver_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_grad_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_grad_dir_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_ver)(style, value); + ((void (*)(lv_style_t *, lv_grad_dir_t))lv_style_set_bg_grad_dir)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_margin_ver_struct_method_def = { - "lv_style_set_margin_ver", - (PyCFunction)py_lv_style_set_margin_ver_struct_method, +static PyMethodDef py_lv_style_set_bg_grad_dir_struct_method_def = { + "lv_style_set_bg_grad_dir", + (PyCFunction)py_lv_style_set_bg_grad_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79650,9 +92255,9 @@ static PyMethodDef py_lv_style_set_margin_ver_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_margin_all(lv_style_t *style, int32_t value) + * void lv_style_set_bg_main_stop(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_margin_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_main_stop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -79663,16 +92268,16 @@ static PyObject *py_lv_style_set_margin_all_struct_method(PyObject *self, PyObje if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_all)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_bg_main_stop)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_margin_all_struct_method_def = { - "lv_style_set_margin_all", - (PyCFunction)py_lv_style_set_margin_all_struct_method, +static PyMethodDef py_lv_style_set_bg_main_stop_struct_method_def = { + "lv_style_set_bg_main_stop", + (PyCFunction)py_lv_style_set_bg_main_stop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79680,9 +92285,9 @@ static PyMethodDef py_lv_style_set_margin_all_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_style_set_transform_scale(lv_style_t *style, int32_t value) + * void lv_style_set_bg_grad_stop(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_transform_scale_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_grad_stop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -79693,16 +92298,16 @@ static PyObject *py_lv_style_set_transform_scale_struct_method(PyObject *self, P if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_scale)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_bg_grad_stop)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_scale_struct_method_def = { - "lv_style_set_transform_scale", - (PyCFunction)py_lv_style_set_transform_scale_struct_method, +static PyMethodDef py_lv_style_set_bg_grad_stop_struct_method_def = { + "lv_style_set_bg_grad_stop", + (PyCFunction)py_lv_style_set_bg_grad_stop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79710,27 +92315,29 @@ static PyMethodDef py_lv_style_set_transform_scale_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_init(lv_style_t *style) + * void lv_style_set_bg_main_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_main_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *))lv_style_init)(style); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_main_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_init_struct_method_def = { - "lv_style_init", - (PyCFunction)py_lv_style_init_struct_method, +static PyMethodDef py_lv_style_set_bg_main_opa_struct_method_def = { + "lv_style_set_bg_main_opa", + (PyCFunction)py_lv_style_set_bg_main_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79738,27 +92345,29 @@ static PyMethodDef py_lv_style_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_reset(lv_style_t *style) + * void lv_style_set_bg_grad_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_grad_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *))lv_style_reset)(style); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_grad_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_reset_struct_method_def = { - "lv_style_reset", - (PyCFunction)py_lv_style_reset_struct_method, +static PyMethodDef py_lv_style_set_bg_grad_opa_struct_method_def = { + "lv_style_set_bg_grad_opa", + (PyCFunction)py_lv_style_set_bg_grad_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79766,29 +92375,29 @@ static PyMethodDef py_lv_style_reset_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_copy(lv_style_t *dst, const lv_style_t *src) + * void lv_style_set_bg_grad(lv_style_t *style, const lv_grad_dsc_t *value) */ -static PyObject *py_lv_style_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_grad_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *dst = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_style_t *src = (const lv_style_t *)mp_write_ptr_lv_style_t(src_py); + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + const lv_grad_dsc_t *value = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const lv_style_t *))lv_style_copy)(dst, src); + ((void (*)(lv_style_t *, const lv_grad_dsc_t *))lv_style_set_bg_grad)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_copy_struct_method_def = { - "lv_style_copy", - (PyCFunction)py_lv_style_copy_struct_method, +static PyMethodDef py_lv_style_set_bg_grad_struct_method_def = { + "lv_style_set_bg_grad", + (PyCFunction)py_lv_style_set_bg_grad_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79796,29 +92405,29 @@ static PyMethodDef py_lv_style_copy_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_merge(lv_style_t *dst, const lv_style_t *src) + * void lv_style_set_bg_image_src(lv_style_t *style, const void *value) */ -static PyObject *py_lv_style_merge_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_image_src_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *dst = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_style_t *src = (const lv_style_t *)mp_write_ptr_lv_style_t(src_py); + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + const void *value = (const void *)mp_to_ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const lv_style_t *))lv_style_merge)(dst, src); + ((void (*)(lv_style_t *, const void *))lv_style_set_bg_image_src)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_merge_struct_method_def = { - "lv_style_merge", - (PyCFunction)py_lv_style_merge_struct_method, +static PyMethodDef py_lv_style_set_bg_image_src_struct_method_def = { + "lv_style_set_bg_image_src", + (PyCFunction)py_lv_style_set_bg_image_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79826,30 +92435,29 @@ static PyMethodDef py_lv_style_merge_struct_method_def = { /* * lvgl extension definition for: - * bool lv_style_remove_prop(lv_style_t *style, lv_style_prop_t prop) + * void lv_style_set_bg_image_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_remove_prop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_image_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_style_t *, lv_style_prop_t))lv_style_remove_prop)(style, prop); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_image_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_style_remove_prop_struct_method_def = { - "lv_style_remove_prop", - (PyCFunction)py_lv_style_remove_prop_struct_method, +static PyMethodDef py_lv_style_set_bg_image_opa_struct_method_def = { + "lv_style_set_bg_image_opa", + (PyCFunction)py_lv_style_set_bg_image_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79857,30 +92465,29 @@ static PyMethodDef py_lv_style_remove_prop_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_prop(lv_style_t *style, lv_style_prop_t prop, lv_style_value_t value) + * void lv_style_set_bg_image_recolor(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_prop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_image_recolor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *prop_py; PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &value_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - lv_style_value_t value = mp_write_lv_style_value_t(value_py); + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_style_prop_t, lv_style_value_t))lv_style_set_prop)(style, prop, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_bg_image_recolor)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_prop_struct_method_def = { - "lv_style_set_prop", - (PyCFunction)py_lv_style_set_prop_struct_method, +static PyMethodDef py_lv_style_set_bg_image_recolor_struct_method_def = { + "lv_style_set_bg_image_recolor", + (PyCFunction)py_lv_style_set_bg_image_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79888,31 +92495,29 @@ static PyMethodDef py_lv_style_set_prop_struct_method_def = { /* * lvgl extension definition for: - * lv_style_res_t lv_style_get_prop(const lv_style_t *style, lv_style_prop_t prop, lv_style_value_t *value) + * void lv_style_set_bg_image_recolor_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_get_prop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_image_recolor_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *prop_py; PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &value_py)) { PyGILState_Release(gstate); return NULL; } - const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - lv_style_value_t *value = mp_write_ptr_lv_style_value_t(value_py); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_res_t _res; lvpy_lock(); - _res = ((lv_style_res_t (*)(const lv_style_t *, lv_style_prop_t, lv_style_value_t *))lv_style_get_prop)(style, prop, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_image_recolor_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_style_get_prop_struct_method_def = { - "lv_style_get_prop", - (PyCFunction)py_lv_style_get_prop_struct_method, +static PyMethodDef py_lv_style_set_bg_image_recolor_opa_struct_method_def = { + "lv_style_set_bg_image_recolor_opa", + (PyCFunction)py_lv_style_set_bg_image_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79920,28 +92525,29 @@ static PyMethodDef py_lv_style_get_prop_struct_method_def = { /* * lvgl extension definition for: - * bool lv_style_is_empty(const lv_style_t *style) + * void lv_style_set_bg_image_tiled(lv_style_t *style, bool value) */ -static PyObject *py_lv_style_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bg_image_tiled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); + bool value = (value_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_style_t *))lv_style_is_empty)(style); + ((void (*)(lv_style_t *, bool))lv_style_set_bg_image_tiled)(style, value); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } - -static PyMethodDef py_lv_style_is_empty_struct_method_def = { - "lv_style_is_empty", - (PyCFunction)py_lv_style_is_empty_struct_method, + +static PyMethodDef py_lv_style_set_bg_image_tiled_struct_method_def = { + "lv_style_set_bg_image_tiled", + (PyCFunction)py_lv_style_set_bg_image_tiled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79949,29 +92555,29 @@ static PyMethodDef py_lv_style_is_empty_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_width(lv_style_t *style, int32_t value) + * void lv_style_set_border_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_border_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_width)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_border_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_width_struct_method_def = { - "lv_style_set_width", - (PyCFunction)py_lv_style_set_width_struct_method, +static PyMethodDef py_lv_style_set_border_color_struct_method_def = { + "lv_style_set_border_color", + (PyCFunction)py_lv_style_set_border_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79979,29 +92585,29 @@ static PyMethodDef py_lv_style_set_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_min_width(lv_style_t *style, int32_t value) + * void lv_style_set_border_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_min_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_border_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_min_width)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_border_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_min_width_struct_method_def = { - "lv_style_set_min_width", - (PyCFunction)py_lv_style_set_min_width_struct_method, +static PyMethodDef py_lv_style_set_border_opa_struct_method_def = { + "lv_style_set_border_opa", + (PyCFunction)py_lv_style_set_border_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80009,9 +92615,9 @@ static PyMethodDef py_lv_style_set_min_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_max_width(lv_style_t *style, int32_t value) + * void lv_style_set_border_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_max_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_border_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80022,16 +92628,16 @@ static PyObject *py_lv_style_set_max_width_struct_method(PyObject *self, PyObjec if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_max_width)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_border_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_max_width_struct_method_def = { - "lv_style_set_max_width", - (PyCFunction)py_lv_style_set_max_width_struct_method, +static PyMethodDef py_lv_style_set_border_width_struct_method_def = { + "lv_style_set_border_width", + (PyCFunction)py_lv_style_set_border_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80039,29 +92645,29 @@ static PyMethodDef py_lv_style_set_max_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_height(lv_style_t *style, int32_t value) + * void lv_style_set_border_side(lv_style_t *style, lv_border_side_t value) */ -static PyObject *py_lv_style_set_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_border_side_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_border_side_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_height)(style, value); + ((void (*)(lv_style_t *, lv_border_side_t))lv_style_set_border_side)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_height_struct_method_def = { - "lv_style_set_height", - (PyCFunction)py_lv_style_set_height_struct_method, +static PyMethodDef py_lv_style_set_border_side_struct_method_def = { + "lv_style_set_border_side", + (PyCFunction)py_lv_style_set_border_side_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80069,29 +92675,29 @@ static PyMethodDef py_lv_style_set_height_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_min_height(lv_style_t *style, int32_t value) + * void lv_style_set_border_post(lv_style_t *style, bool value) */ -static PyObject *py_lv_style_set_min_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_border_post_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + bool value = (value_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_min_height)(style, value); + ((void (*)(lv_style_t *, bool))lv_style_set_border_post)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_min_height_struct_method_def = { - "lv_style_set_min_height", - (PyCFunction)py_lv_style_set_min_height_struct_method, +static PyMethodDef py_lv_style_set_border_post_struct_method_def = { + "lv_style_set_border_post", + (PyCFunction)py_lv_style_set_border_post_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80099,9 +92705,9 @@ static PyMethodDef py_lv_style_set_min_height_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_max_height(lv_style_t *style, int32_t value) + * void lv_style_set_outline_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_max_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_outline_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80112,16 +92718,16 @@ static PyObject *py_lv_style_set_max_height_struct_method(PyObject *self, PyObje if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_max_height)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_outline_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_max_height_struct_method_def = { - "lv_style_set_max_height", - (PyCFunction)py_lv_style_set_max_height_struct_method, +static PyMethodDef py_lv_style_set_outline_width_struct_method_def = { + "lv_style_set_outline_width", + (PyCFunction)py_lv_style_set_outline_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80129,29 +92735,29 @@ static PyMethodDef py_lv_style_set_max_height_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_length(lv_style_t *style, int32_t value) + * void lv_style_set_outline_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_length_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_outline_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_length)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_outline_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_length_struct_method_def = { - "lv_style_set_length", - (PyCFunction)py_lv_style_set_length_struct_method, +static PyMethodDef py_lv_style_set_outline_color_struct_method_def = { + "lv_style_set_outline_color", + (PyCFunction)py_lv_style_set_outline_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80159,29 +92765,29 @@ static PyMethodDef py_lv_style_set_length_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_x(lv_style_t *style, int32_t value) + * void lv_style_set_outline_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_outline_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_x)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_outline_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_x_struct_method_def = { - "lv_style_set_x", - (PyCFunction)py_lv_style_set_x_struct_method, +static PyMethodDef py_lv_style_set_outline_opa_struct_method_def = { + "lv_style_set_outline_opa", + (PyCFunction)py_lv_style_set_outline_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80189,9 +92795,9 @@ static PyMethodDef py_lv_style_set_x_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_y(lv_style_t *style, int32_t value) + * void lv_style_set_outline_pad(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_outline_pad_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80202,16 +92808,16 @@ static PyObject *py_lv_style_set_y_struct_method(PyObject *self, PyObject *py_ar if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_y)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_outline_pad)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_y_struct_method_def = { - "lv_style_set_y", - (PyCFunction)py_lv_style_set_y_struct_method, +static PyMethodDef py_lv_style_set_outline_pad_struct_method_def = { + "lv_style_set_outline_pad", + (PyCFunction)py_lv_style_set_outline_pad_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80219,29 +92825,29 @@ static PyMethodDef py_lv_style_set_y_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_align(lv_style_t *style, lv_align_t value) + * void lv_style_set_shadow_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_shadow_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_align_t value = (int)mp_obj_get_int(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_align_t))lv_style_set_align)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_align_struct_method_def = { - "lv_style_set_align", - (PyCFunction)py_lv_style_set_align_struct_method, +static PyMethodDef py_lv_style_set_shadow_width_struct_method_def = { + "lv_style_set_shadow_width", + (PyCFunction)py_lv_style_set_shadow_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80249,9 +92855,9 @@ static PyMethodDef py_lv_style_set_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_width(lv_style_t *style, int32_t value) + * void lv_style_set_shadow_offset_x(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_transform_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_shadow_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80262,16 +92868,16 @@ static PyObject *py_lv_style_set_transform_width_struct_method(PyObject *self, P if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_width)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_offset_x)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_width_struct_method_def = { - "lv_style_set_transform_width", - (PyCFunction)py_lv_style_set_transform_width_struct_method, +static PyMethodDef py_lv_style_set_shadow_offset_x_struct_method_def = { + "lv_style_set_shadow_offset_x", + (PyCFunction)py_lv_style_set_shadow_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80279,9 +92885,9 @@ static PyMethodDef py_lv_style_set_transform_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_height(lv_style_t *style, int32_t value) + * void lv_style_set_shadow_offset_y(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_transform_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_shadow_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80292,16 +92898,16 @@ static PyObject *py_lv_style_set_transform_height_struct_method(PyObject *self, if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_height)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_offset_y)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_height_struct_method_def = { - "lv_style_set_transform_height", - (PyCFunction)py_lv_style_set_transform_height_struct_method, +static PyMethodDef py_lv_style_set_shadow_offset_y_struct_method_def = { + "lv_style_set_shadow_offset_y", + (PyCFunction)py_lv_style_set_shadow_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80309,9 +92915,9 @@ static PyMethodDef py_lv_style_set_transform_height_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_translate_x(lv_style_t *style, int32_t value) + * void lv_style_set_shadow_spread(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_translate_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_shadow_spread_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80322,16 +92928,16 @@ static PyObject *py_lv_style_set_translate_x_struct_method(PyObject *self, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_translate_x)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_spread)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_translate_x_struct_method_def = { - "lv_style_set_translate_x", - (PyCFunction)py_lv_style_set_translate_x_struct_method, +static PyMethodDef py_lv_style_set_shadow_spread_struct_method_def = { + "lv_style_set_shadow_spread", + (PyCFunction)py_lv_style_set_shadow_spread_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80339,29 +92945,29 @@ static PyMethodDef py_lv_style_set_translate_x_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_translate_y(lv_style_t *style, int32_t value) + * void lv_style_set_shadow_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_translate_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_shadow_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_translate_y)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_shadow_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_translate_y_struct_method_def = { - "lv_style_set_translate_y", - (PyCFunction)py_lv_style_set_translate_y_struct_method, +static PyMethodDef py_lv_style_set_shadow_color_struct_method_def = { + "lv_style_set_shadow_color", + (PyCFunction)py_lv_style_set_shadow_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80369,29 +92975,29 @@ static PyMethodDef py_lv_style_set_translate_y_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_translate_radial(lv_style_t *style, int32_t value) + * void lv_style_set_shadow_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_translate_radial_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_shadow_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_translate_radial)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_shadow_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_translate_radial_struct_method_def = { - "lv_style_set_translate_radial", - (PyCFunction)py_lv_style_set_translate_radial_struct_method, +static PyMethodDef py_lv_style_set_shadow_opa_struct_method_def = { + "lv_style_set_shadow_opa", + (PyCFunction)py_lv_style_set_shadow_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80399,29 +93005,29 @@ static PyMethodDef py_lv_style_set_translate_radial_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_scale_x(lv_style_t *style, int32_t value) + * void lv_style_set_image_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_transform_scale_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_image_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_scale_x)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_image_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_scale_x_struct_method_def = { - "lv_style_set_transform_scale_x", - (PyCFunction)py_lv_style_set_transform_scale_x_struct_method, +static PyMethodDef py_lv_style_set_image_opa_struct_method_def = { + "lv_style_set_image_opa", + (PyCFunction)py_lv_style_set_image_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80429,29 +93035,29 @@ static PyMethodDef py_lv_style_set_transform_scale_x_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_scale_y(lv_style_t *style, int32_t value) + * void lv_style_set_image_recolor(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_transform_scale_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_image_recolor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_scale_y)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_image_recolor)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_scale_y_struct_method_def = { - "lv_style_set_transform_scale_y", - (PyCFunction)py_lv_style_set_transform_scale_y_struct_method, +static PyMethodDef py_lv_style_set_image_recolor_struct_method_def = { + "lv_style_set_image_recolor", + (PyCFunction)py_lv_style_set_image_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80459,29 +93065,29 @@ static PyMethodDef py_lv_style_set_transform_scale_y_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_rotation(lv_style_t *style, int32_t value) + * void lv_style_set_image_recolor_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_transform_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_image_recolor_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_rotation)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_image_recolor_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_rotation_struct_method_def = { - "lv_style_set_transform_rotation", - (PyCFunction)py_lv_style_set_transform_rotation_struct_method, +static PyMethodDef py_lv_style_set_image_recolor_opa_struct_method_def = { + "lv_style_set_image_recolor_opa", + (PyCFunction)py_lv_style_set_image_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80489,29 +93095,29 @@ static PyMethodDef py_lv_style_set_transform_rotation_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_pivot_x(lv_style_t *style, int32_t value) + * void lv_style_set_image_colorkey(lv_style_t *style, const lv_image_colorkey_t *value) */ -static PyObject *py_lv_style_set_transform_pivot_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_image_colorkey_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + const lv_image_colorkey_t *value = (const lv_image_colorkey_t *)mp_write_ptr_lv_image_colorkey_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_pivot_x)(style, value); + ((void (*)(lv_style_t *, const lv_image_colorkey_t *))lv_style_set_image_colorkey)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_pivot_x_struct_method_def = { - "lv_style_set_transform_pivot_x", - (PyCFunction)py_lv_style_set_transform_pivot_x_struct_method, +static PyMethodDef py_lv_style_set_image_colorkey_struct_method_def = { + "lv_style_set_image_colorkey", + (PyCFunction)py_lv_style_set_image_colorkey_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80519,9 +93125,9 @@ static PyMethodDef py_lv_style_set_transform_pivot_x_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_pivot_y(lv_style_t *style, int32_t value) + * void lv_style_set_line_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_transform_pivot_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_line_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80532,16 +93138,16 @@ static PyObject *py_lv_style_set_transform_pivot_y_struct_method(PyObject *self, if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_pivot_y)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_line_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_pivot_y_struct_method_def = { - "lv_style_set_transform_pivot_y", - (PyCFunction)py_lv_style_set_transform_pivot_y_struct_method, +static PyMethodDef py_lv_style_set_line_width_struct_method_def = { + "lv_style_set_line_width", + (PyCFunction)py_lv_style_set_line_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80549,9 +93155,9 @@ static PyMethodDef py_lv_style_set_transform_pivot_y_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_skew_x(lv_style_t *style, int32_t value) + * void lv_style_set_line_dash_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_transform_skew_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_line_dash_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80562,16 +93168,16 @@ static PyObject *py_lv_style_set_transform_skew_x_struct_method(PyObject *self, if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_skew_x)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_line_dash_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_skew_x_struct_method_def = { - "lv_style_set_transform_skew_x", - (PyCFunction)py_lv_style_set_transform_skew_x_struct_method, +static PyMethodDef py_lv_style_set_line_dash_width_struct_method_def = { + "lv_style_set_line_dash_width", + (PyCFunction)py_lv_style_set_line_dash_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80579,9 +93185,9 @@ static PyMethodDef py_lv_style_set_transform_skew_x_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transform_skew_y(lv_style_t *style, int32_t value) + * void lv_style_set_line_dash_gap(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_transform_skew_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_line_dash_gap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80592,16 +93198,16 @@ static PyObject *py_lv_style_set_transform_skew_y_struct_method(PyObject *self, if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_skew_y)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_line_dash_gap)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transform_skew_y_struct_method_def = { - "lv_style_set_transform_skew_y", - (PyCFunction)py_lv_style_set_transform_skew_y_struct_method, +static PyMethodDef py_lv_style_set_line_dash_gap_struct_method_def = { + "lv_style_set_line_dash_gap", + (PyCFunction)py_lv_style_set_line_dash_gap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80609,29 +93215,29 @@ static PyMethodDef py_lv_style_set_transform_skew_y_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_pad_top(lv_style_t *style, int32_t value) + * void lv_style_set_line_rounded(lv_style_t *style, bool value) */ -static PyObject *py_lv_style_set_pad_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_line_rounded_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + bool value = (value_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_top)(style, value); + ((void (*)(lv_style_t *, bool))lv_style_set_line_rounded)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_top_struct_method_def = { - "lv_style_set_pad_top", - (PyCFunction)py_lv_style_set_pad_top_struct_method, +static PyMethodDef py_lv_style_set_line_rounded_struct_method_def = { + "lv_style_set_line_rounded", + (PyCFunction)py_lv_style_set_line_rounded_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80639,29 +93245,29 @@ static PyMethodDef py_lv_style_set_pad_top_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_pad_bottom(lv_style_t *style, int32_t value) + * void lv_style_set_line_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_pad_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_line_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_bottom)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_line_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_bottom_struct_method_def = { - "lv_style_set_pad_bottom", - (PyCFunction)py_lv_style_set_pad_bottom_struct_method, +static PyMethodDef py_lv_style_set_line_color_struct_method_def = { + "lv_style_set_line_color", + (PyCFunction)py_lv_style_set_line_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80669,29 +93275,29 @@ static PyMethodDef py_lv_style_set_pad_bottom_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_pad_left(lv_style_t *style, int32_t value) + * void lv_style_set_line_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_pad_left_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_line_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_left)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_line_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_left_struct_method_def = { - "lv_style_set_pad_left", - (PyCFunction)py_lv_style_set_pad_left_struct_method, +static PyMethodDef py_lv_style_set_line_opa_struct_method_def = { + "lv_style_set_line_opa", + (PyCFunction)py_lv_style_set_line_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80699,9 +93305,9 @@ static PyMethodDef py_lv_style_set_pad_left_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_pad_right(lv_style_t *style, int32_t value) + * void lv_style_set_arc_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_pad_right_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_arc_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -80712,16 +93318,16 @@ static PyObject *py_lv_style_set_pad_right_struct_method(PyObject *self, PyObjec if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_right)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_arc_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_right_struct_method_def = { - "lv_style_set_pad_right", - (PyCFunction)py_lv_style_set_pad_right_struct_method, +static PyMethodDef py_lv_style_set_arc_width_struct_method_def = { + "lv_style_set_arc_width", + (PyCFunction)py_lv_style_set_arc_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80729,29 +93335,29 @@ static PyMethodDef py_lv_style_set_pad_right_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_pad_row(lv_style_t *style, int32_t value) + * void lv_style_set_arc_rounded(lv_style_t *style, bool value) */ -static PyObject *py_lv_style_set_pad_row_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_arc_rounded_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + bool value = (value_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_row)(style, value); + ((void (*)(lv_style_t *, bool))lv_style_set_arc_rounded)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_row_struct_method_def = { - "lv_style_set_pad_row", - (PyCFunction)py_lv_style_set_pad_row_struct_method, +static PyMethodDef py_lv_style_set_arc_rounded_struct_method_def = { + "lv_style_set_arc_rounded", + (PyCFunction)py_lv_style_set_arc_rounded_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80759,29 +93365,29 @@ static PyMethodDef py_lv_style_set_pad_row_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_pad_column(lv_style_t *style, int32_t value) + * void lv_style_set_arc_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_pad_column_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_arc_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_column)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_arc_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_column_struct_method_def = { - "lv_style_set_pad_column", - (PyCFunction)py_lv_style_set_pad_column_struct_method, +static PyMethodDef py_lv_style_set_arc_color_struct_method_def = { + "lv_style_set_arc_color", + (PyCFunction)py_lv_style_set_arc_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80789,29 +93395,29 @@ static PyMethodDef py_lv_style_set_pad_column_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_pad_radial(lv_style_t *style, int32_t value) + * void lv_style_set_arc_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_pad_radial_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_arc_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_radial)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_arc_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_pad_radial_struct_method_def = { - "lv_style_set_pad_radial", - (PyCFunction)py_lv_style_set_pad_radial_struct_method, +static PyMethodDef py_lv_style_set_arc_opa_struct_method_def = { + "lv_style_set_arc_opa", + (PyCFunction)py_lv_style_set_arc_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80819,29 +93425,29 @@ static PyMethodDef py_lv_style_set_pad_radial_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_margin_top(lv_style_t *style, int32_t value) + * void lv_style_set_arc_image_src(lv_style_t *style, const void *value) */ -static PyObject *py_lv_style_set_margin_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_arc_image_src_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + const void *value = (const void *)mp_to_ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_top)(style, value); + ((void (*)(lv_style_t *, const void *))lv_style_set_arc_image_src)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_margin_top_struct_method_def = { - "lv_style_set_margin_top", - (PyCFunction)py_lv_style_set_margin_top_struct_method, +static PyMethodDef py_lv_style_set_arc_image_src_struct_method_def = { + "lv_style_set_arc_image_src", + (PyCFunction)py_lv_style_set_arc_image_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80849,29 +93455,29 @@ static PyMethodDef py_lv_style_set_margin_top_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_margin_bottom(lv_style_t *style, int32_t value) + * void lv_style_set_text_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_margin_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_bottom)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_text_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_margin_bottom_struct_method_def = { - "lv_style_set_margin_bottom", - (PyCFunction)py_lv_style_set_margin_bottom_struct_method, +static PyMethodDef py_lv_style_set_text_color_struct_method_def = { + "lv_style_set_text_color", + (PyCFunction)py_lv_style_set_text_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80879,29 +93485,29 @@ static PyMethodDef py_lv_style_set_margin_bottom_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_margin_left(lv_style_t *style, int32_t value) + * void lv_style_set_text_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_margin_left_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_left)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_text_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_margin_left_struct_method_def = { - "lv_style_set_margin_left", - (PyCFunction)py_lv_style_set_margin_left_struct_method, +static PyMethodDef py_lv_style_set_text_opa_struct_method_def = { + "lv_style_set_text_opa", + (PyCFunction)py_lv_style_set_text_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80909,29 +93515,29 @@ static PyMethodDef py_lv_style_set_margin_left_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_margin_right(lv_style_t *style, int32_t value) + * void lv_style_set_text_font(lv_style_t *style, const lv_font_t *value) */ -static PyObject *py_lv_style_set_margin_right_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_font_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + const lv_font_t *value = (const lv_font_t *)mp_write_ptr_lv_font_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_right)(style, value); + ((void (*)(lv_style_t *, const lv_font_t *))lv_style_set_text_font)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_margin_right_struct_method_def = { - "lv_style_set_margin_right", - (PyCFunction)py_lv_style_set_margin_right_struct_method, +static PyMethodDef py_lv_style_set_text_font_struct_method_def = { + "lv_style_set_text_font", + (PyCFunction)py_lv_style_set_text_font_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80939,29 +93545,29 @@ static PyMethodDef py_lv_style_set_margin_right_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_text_letter_space(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_bg_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_letter_space_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_bg_color)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_text_letter_space)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_color_struct_method_def = { - "lv_style_set_bg_color", - (PyCFunction)py_lv_style_set_bg_color_struct_method, +static PyMethodDef py_lv_style_set_text_letter_space_struct_method_def = { + "lv_style_set_text_letter_space", + (PyCFunction)py_lv_style_set_text_letter_space_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80969,29 +93575,29 @@ static PyMethodDef py_lv_style_set_bg_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_text_line_space(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_bg_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_line_space_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_opa)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_text_line_space)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_opa_struct_method_def = { - "lv_style_set_bg_opa", - (PyCFunction)py_lv_style_set_bg_opa_struct_method, +static PyMethodDef py_lv_style_set_text_line_space_struct_method_def = { + "lv_style_set_text_line_space", + (PyCFunction)py_lv_style_set_text_line_space_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80999,29 +93605,29 @@ static PyMethodDef py_lv_style_set_bg_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_grad_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_text_decor(lv_style_t *style, lv_text_decor_t value) */ -static PyObject *py_lv_style_set_bg_grad_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_decor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *value_py; if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + lv_text_decor_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_bg_grad_color)(style, value); + ((void (*)(lv_style_t *, lv_text_decor_t))lv_style_set_text_decor)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_grad_color_struct_method_def = { - "lv_style_set_bg_grad_color", - (PyCFunction)py_lv_style_set_bg_grad_color_struct_method, +static PyMethodDef py_lv_style_set_text_decor_struct_method_def = { + "lv_style_set_text_decor", + (PyCFunction)py_lv_style_set_text_decor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81029,29 +93635,29 @@ static PyMethodDef py_lv_style_set_bg_grad_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_grad_dir(lv_style_t *style, lv_grad_dir_t value) + * void lv_style_set_text_align(lv_style_t *style, lv_text_align_t value) */ -static PyObject *py_lv_style_set_bg_grad_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *value_py; if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_grad_dir_t value = (int)mp_obj_get_int(value_py); + lv_text_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_grad_dir_t))lv_style_set_bg_grad_dir)(style, value); + ((void (*)(lv_style_t *, lv_text_align_t))lv_style_set_text_align)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_grad_dir_struct_method_def = { - "lv_style_set_bg_grad_dir", - (PyCFunction)py_lv_style_set_bg_grad_dir_struct_method, +static PyMethodDef py_lv_style_set_text_align_struct_method_def = { + "lv_style_set_text_align", + (PyCFunction)py_lv_style_set_text_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81059,29 +93665,29 @@ static PyMethodDef py_lv_style_set_bg_grad_dir_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_main_stop(lv_style_t *style, int32_t value) + * void lv_style_set_text_outline_stroke_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_bg_main_stop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_outline_stroke_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_bg_main_stop)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_text_outline_stroke_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_main_stop_struct_method_def = { - "lv_style_set_bg_main_stop", - (PyCFunction)py_lv_style_set_bg_main_stop_struct_method, +static PyMethodDef py_lv_style_set_text_outline_stroke_color_struct_method_def = { + "lv_style_set_text_outline_stroke_color", + (PyCFunction)py_lv_style_set_text_outline_stroke_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81089,9 +93695,9 @@ static PyMethodDef py_lv_style_set_bg_main_stop_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_grad_stop(lv_style_t *style, int32_t value) + * void lv_style_set_text_outline_stroke_width(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_bg_grad_stop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_outline_stroke_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -81102,16 +93708,16 @@ static PyObject *py_lv_style_set_bg_grad_stop_struct_method(PyObject *self, PyOb if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_bg_grad_stop)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_text_outline_stroke_width)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_grad_stop_struct_method_def = { - "lv_style_set_bg_grad_stop", - (PyCFunction)py_lv_style_set_bg_grad_stop_struct_method, +static PyMethodDef py_lv_style_set_text_outline_stroke_width_struct_method_def = { + "lv_style_set_text_outline_stroke_width", + (PyCFunction)py_lv_style_set_text_outline_stroke_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81119,9 +93725,9 @@ static PyMethodDef py_lv_style_set_bg_grad_stop_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_main_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_text_outline_stroke_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_bg_main_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_outline_stroke_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -81132,16 +93738,16 @@ static PyObject *py_lv_style_set_bg_main_opa_struct_method(PyObject *self, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_main_opa)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_text_outline_stroke_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_main_opa_struct_method_def = { - "lv_style_set_bg_main_opa", - (PyCFunction)py_lv_style_set_bg_main_opa_struct_method, +static PyMethodDef py_lv_style_set_text_outline_stroke_opa_struct_method_def = { + "lv_style_set_text_outline_stroke_opa", + (PyCFunction)py_lv_style_set_text_outline_stroke_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81149,29 +93755,29 @@ static PyMethodDef py_lv_style_set_bg_main_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_grad_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_text_leading_trim(lv_style_t *style, lv_text_leading_trim_t value) */ -static PyObject *py_lv_style_set_bg_grad_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_text_leading_trim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_text_leading_trim_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_grad_opa)(style, value); + ((void (*)(lv_style_t *, lv_text_leading_trim_t))lv_style_set_text_leading_trim)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_grad_opa_struct_method_def = { - "lv_style_set_bg_grad_opa", - (PyCFunction)py_lv_style_set_bg_grad_opa_struct_method, +static PyMethodDef py_lv_style_set_text_leading_trim_struct_method_def = { + "lv_style_set_text_leading_trim", + (PyCFunction)py_lv_style_set_text_leading_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81179,29 +93785,29 @@ static PyMethodDef py_lv_style_set_bg_grad_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_grad(lv_style_t *style, const lv_grad_dsc_t *value) + * void lv_style_set_blur_radius(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_bg_grad_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_blur_radius_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_grad_dsc_t *value = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const lv_grad_dsc_t *))lv_style_set_bg_grad)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_blur_radius)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_grad_struct_method_def = { - "lv_style_set_bg_grad", - (PyCFunction)py_lv_style_set_bg_grad_struct_method, +static PyMethodDef py_lv_style_set_blur_radius_struct_method_def = { + "lv_style_set_blur_radius", + (PyCFunction)py_lv_style_set_blur_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81209,29 +93815,29 @@ static PyMethodDef py_lv_style_set_bg_grad_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_image_src(lv_style_t *style, const void *value) + * void lv_style_set_blur_backdrop(lv_style_t *style, bool value) */ -static PyObject *py_lv_style_set_bg_image_src_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_blur_backdrop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const void *value = (const void *)mp_to_ptr(value_py); + bool value = (value_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const void *))lv_style_set_bg_image_src)(style, value); + ((void (*)(lv_style_t *, bool))lv_style_set_blur_backdrop)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_image_src_struct_method_def = { - "lv_style_set_bg_image_src", - (PyCFunction)py_lv_style_set_bg_image_src_struct_method, +static PyMethodDef py_lv_style_set_blur_backdrop_struct_method_def = { + "lv_style_set_blur_backdrop", + (PyCFunction)py_lv_style_set_blur_backdrop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81239,29 +93845,29 @@ static PyMethodDef py_lv_style_set_bg_image_src_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_image_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_blur_quality(lv_style_t *style, lv_blur_quality_t value) */ -static PyObject *py_lv_style_set_bg_image_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_blur_quality_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_blur_quality_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_image_opa)(style, value); + ((void (*)(lv_style_t *, lv_blur_quality_t))lv_style_set_blur_quality)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_image_opa_struct_method_def = { - "lv_style_set_bg_image_opa", - (PyCFunction)py_lv_style_set_bg_image_opa_struct_method, +static PyMethodDef py_lv_style_set_blur_quality_struct_method_def = { + "lv_style_set_blur_quality", + (PyCFunction)py_lv_style_set_blur_quality_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81269,29 +93875,29 @@ static PyMethodDef py_lv_style_set_bg_image_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_image_recolor(lv_style_t *style, lv_color_t value) + * void lv_style_set_drop_shadow_radius(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_bg_image_recolor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_drop_shadow_radius_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_bg_image_recolor)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_drop_shadow_radius)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_image_recolor_struct_method_def = { - "lv_style_set_bg_image_recolor", - (PyCFunction)py_lv_style_set_bg_image_recolor_struct_method, +static PyMethodDef py_lv_style_set_drop_shadow_radius_struct_method_def = { + "lv_style_set_drop_shadow_radius", + (PyCFunction)py_lv_style_set_drop_shadow_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81299,29 +93905,29 @@ static PyMethodDef py_lv_style_set_bg_image_recolor_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_image_recolor_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_drop_shadow_offset_x(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_bg_image_recolor_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_drop_shadow_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_bg_image_recolor_opa)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_drop_shadow_offset_x)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_image_recolor_opa_struct_method_def = { - "lv_style_set_bg_image_recolor_opa", - (PyCFunction)py_lv_style_set_bg_image_recolor_opa_struct_method, +static PyMethodDef py_lv_style_set_drop_shadow_offset_x_struct_method_def = { + "lv_style_set_drop_shadow_offset_x", + (PyCFunction)py_lv_style_set_drop_shadow_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81329,29 +93935,29 @@ static PyMethodDef py_lv_style_set_bg_image_recolor_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bg_image_tiled(lv_style_t *style, bool value) + * void lv_style_set_drop_shadow_offset_y(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_bg_image_tiled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_drop_shadow_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - bool value = (value_val != 0); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, bool))lv_style_set_bg_image_tiled)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_drop_shadow_offset_y)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bg_image_tiled_struct_method_def = { - "lv_style_set_bg_image_tiled", - (PyCFunction)py_lv_style_set_bg_image_tiled_struct_method, +static PyMethodDef py_lv_style_set_drop_shadow_offset_y_struct_method_def = { + "lv_style_set_drop_shadow_offset_y", + (PyCFunction)py_lv_style_set_drop_shadow_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81359,9 +93965,9 @@ static PyMethodDef py_lv_style_set_bg_image_tiled_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_border_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_drop_shadow_color(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_border_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_drop_shadow_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -81372,16 +93978,16 @@ static PyObject *py_lv_style_set_border_color_struct_method(PyObject *self, PyOb if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_border_color)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_drop_shadow_color)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_border_color_struct_method_def = { - "lv_style_set_border_color", - (PyCFunction)py_lv_style_set_border_color_struct_method, +static PyMethodDef py_lv_style_set_drop_shadow_color_struct_method_def = { + "lv_style_set_drop_shadow_color", + (PyCFunction)py_lv_style_set_drop_shadow_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81389,9 +93995,9 @@ static PyMethodDef py_lv_style_set_border_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_border_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_drop_shadow_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_border_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_drop_shadow_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -81402,16 +94008,16 @@ static PyObject *py_lv_style_set_border_opa_struct_method(PyObject *self, PyObje if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_border_opa)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_drop_shadow_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_border_opa_struct_method_def = { - "lv_style_set_border_opa", - (PyCFunction)py_lv_style_set_border_opa_struct_method, +static PyMethodDef py_lv_style_set_drop_shadow_opa_struct_method_def = { + "lv_style_set_drop_shadow_opa", + (PyCFunction)py_lv_style_set_drop_shadow_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81419,29 +94025,29 @@ static PyMethodDef py_lv_style_set_border_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_border_width(lv_style_t *style, int32_t value) + * void lv_style_set_drop_shadow_quality(lv_style_t *style, lv_blur_quality_t value) */ -static PyObject *py_lv_style_set_border_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_drop_shadow_quality_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_blur_quality_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_border_width)(style, value); + ((void (*)(lv_style_t *, lv_blur_quality_t))lv_style_set_drop_shadow_quality)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_border_width_struct_method_def = { - "lv_style_set_border_width", - (PyCFunction)py_lv_style_set_border_width_struct_method, +static PyMethodDef py_lv_style_set_drop_shadow_quality_struct_method_def = { + "lv_style_set_drop_shadow_quality", + (PyCFunction)py_lv_style_set_drop_shadow_quality_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81449,29 +94055,29 @@ static PyMethodDef py_lv_style_set_border_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_border_side(lv_style_t *style, lv_border_side_t value) + * void lv_style_set_radius(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_border_side_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_radius_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_border_side_t value = (int)mp_obj_get_int(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_border_side_t))lv_style_set_border_side)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_radius)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_border_side_struct_method_def = { - "lv_style_set_border_side", - (PyCFunction)py_lv_style_set_border_side_struct_method, +static PyMethodDef py_lv_style_set_radius_struct_method_def = { + "lv_style_set_radius", + (PyCFunction)py_lv_style_set_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81479,29 +94085,29 @@ static PyMethodDef py_lv_style_set_border_side_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_border_post(lv_style_t *style, bool value) + * void lv_style_set_radial_offset(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_border_post_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_radial_offset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - bool value = (value_val != 0); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, bool))lv_style_set_border_post)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_radial_offset)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_border_post_struct_method_def = { - "lv_style_set_border_post", - (PyCFunction)py_lv_style_set_border_post_struct_method, +static PyMethodDef py_lv_style_set_radial_offset_struct_method_def = { + "lv_style_set_radial_offset", + (PyCFunction)py_lv_style_set_radial_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81509,29 +94115,29 @@ static PyMethodDef py_lv_style_set_border_post_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_outline_width(lv_style_t *style, int32_t value) + * void lv_style_set_clip_corner(lv_style_t *style, bool value) */ -static PyObject *py_lv_style_set_outline_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_clip_corner_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + bool value = (value_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_outline_width)(style, value); + ((void (*)(lv_style_t *, bool))lv_style_set_clip_corner)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_outline_width_struct_method_def = { - "lv_style_set_outline_width", - (PyCFunction)py_lv_style_set_outline_width_struct_method, +static PyMethodDef py_lv_style_set_clip_corner_struct_method_def = { + "lv_style_set_clip_corner", + (PyCFunction)py_lv_style_set_clip_corner_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81539,29 +94145,29 @@ static PyMethodDef py_lv_style_set_outline_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_outline_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_outline_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_outline_color)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_outline_color_struct_method_def = { - "lv_style_set_outline_color", - (PyCFunction)py_lv_style_set_outline_color_struct_method, +static PyMethodDef py_lv_style_set_opa_struct_method_def = { + "lv_style_set_opa", + (PyCFunction)py_lv_style_set_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81569,9 +94175,9 @@ static PyMethodDef py_lv_style_set_outline_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_outline_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_opa_layered(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_outline_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_opa_layered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -81582,16 +94188,16 @@ static PyObject *py_lv_style_set_outline_opa_struct_method(PyObject *self, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_outline_opa)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_opa_layered)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_outline_opa_struct_method_def = { - "lv_style_set_outline_opa", - (PyCFunction)py_lv_style_set_outline_opa_struct_method, +static PyMethodDef py_lv_style_set_opa_layered_struct_method_def = { + "lv_style_set_opa_layered", + (PyCFunction)py_lv_style_set_opa_layered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81599,29 +94205,29 @@ static PyMethodDef py_lv_style_set_outline_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_outline_pad(lv_style_t *style, int32_t value) + * void lv_style_set_color_filter_dsc(lv_style_t *style, const lv_color_filter_dsc_t *value) */ -static PyObject *py_lv_style_set_outline_pad_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_color_filter_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_outline_pad)(style, value); + ((void (*)(lv_style_t *, const lv_color_filter_dsc_t *))lv_style_set_color_filter_dsc)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_outline_pad_struct_method_def = { - "lv_style_set_outline_pad", - (PyCFunction)py_lv_style_set_outline_pad_struct_method, +static PyMethodDef py_lv_style_set_color_filter_dsc_struct_method_def = { + "lv_style_set_color_filter_dsc", + (PyCFunction)py_lv_style_set_color_filter_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81629,29 +94235,29 @@ static PyMethodDef py_lv_style_set_outline_pad_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_shadow_width(lv_style_t *style, int32_t value) + * void lv_style_set_color_filter_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_shadow_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_color_filter_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_width)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_color_filter_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_shadow_width_struct_method_def = { - "lv_style_set_shadow_width", - (PyCFunction)py_lv_style_set_shadow_width_struct_method, +static PyMethodDef py_lv_style_set_color_filter_opa_struct_method_def = { + "lv_style_set_color_filter_opa", + (PyCFunction)py_lv_style_set_color_filter_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81659,29 +94265,29 @@ static PyMethodDef py_lv_style_set_shadow_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_shadow_offset_x(lv_style_t *style, int32_t value) + * void lv_style_set_recolor(lv_style_t *style, lv_color_t value) */ -static PyObject *py_lv_style_set_shadow_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_recolor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_color_t value = mp_write_lv_color_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_offset_x)(style, value); + ((void (*)(lv_style_t *, lv_color_t))lv_style_set_recolor)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_shadow_offset_x_struct_method_def = { - "lv_style_set_shadow_offset_x", - (PyCFunction)py_lv_style_set_shadow_offset_x_struct_method, +static PyMethodDef py_lv_style_set_recolor_struct_method_def = { + "lv_style_set_recolor", + (PyCFunction)py_lv_style_set_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81689,29 +94295,29 @@ static PyMethodDef py_lv_style_set_shadow_offset_x_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_shadow_offset_y(lv_style_t *style, int32_t value) + * void lv_style_set_recolor_opa(lv_style_t *style, lv_opa_t value) */ -static PyObject *py_lv_style_set_shadow_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_recolor_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_opa_t value = (lv_opa_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_offset_y)(style, value); + ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_recolor_opa)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_shadow_offset_y_struct_method_def = { - "lv_style_set_shadow_offset_y", - (PyCFunction)py_lv_style_set_shadow_offset_y_struct_method, +static PyMethodDef py_lv_style_set_recolor_opa_struct_method_def = { + "lv_style_set_recolor_opa", + (PyCFunction)py_lv_style_set_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81719,29 +94325,29 @@ static PyMethodDef py_lv_style_set_shadow_offset_y_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_shadow_spread(lv_style_t *style, int32_t value) + * void lv_style_set_anim(lv_style_t *style, const lv_anim_t *value) */ -static PyObject *py_lv_style_set_shadow_spread_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_anim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_shadow_spread)(style, value); + ((void (*)(lv_style_t *, const lv_anim_t *))lv_style_set_anim)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_shadow_spread_struct_method_def = { - "lv_style_set_shadow_spread", - (PyCFunction)py_lv_style_set_shadow_spread_struct_method, +static PyMethodDef py_lv_style_set_anim_struct_method_def = { + "lv_style_set_anim", + (PyCFunction)py_lv_style_set_anim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81749,29 +94355,29 @@ static PyMethodDef py_lv_style_set_shadow_spread_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_shadow_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_anim_duration(lv_style_t *style, uint32_t value) */ -static PyObject *py_lv_style_set_shadow_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_anim_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + uint32_t value = (uint32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_shadow_color)(style, value); + ((void (*)(lv_style_t *, uint32_t))lv_style_set_anim_duration)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_shadow_color_struct_method_def = { - "lv_style_set_shadow_color", - (PyCFunction)py_lv_style_set_shadow_color_struct_method, +static PyMethodDef py_lv_style_set_anim_duration_struct_method_def = { + "lv_style_set_anim_duration", + (PyCFunction)py_lv_style_set_anim_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81779,29 +94385,29 @@ static PyMethodDef py_lv_style_set_shadow_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_shadow_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_transition(lv_style_t *style, const lv_style_transition_dsc_t *value) */ -static PyObject *py_lv_style_set_shadow_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transition_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_shadow_opa)(style, value); + ((void (*)(lv_style_t *, const lv_style_transition_dsc_t *))lv_style_set_transition)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_shadow_opa_struct_method_def = { - "lv_style_set_shadow_opa", - (PyCFunction)py_lv_style_set_shadow_opa_struct_method, +static PyMethodDef py_lv_style_set_transition_struct_method_def = { + "lv_style_set_transition", + (PyCFunction)py_lv_style_set_transition_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81809,29 +94415,29 @@ static PyMethodDef py_lv_style_set_shadow_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_image_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_blend_mode(lv_style_t *style, lv_blend_mode_t value) */ -static PyObject *py_lv_style_set_image_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_blend_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_blend_mode_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_image_opa)(style, value); + ((void (*)(lv_style_t *, lv_blend_mode_t))lv_style_set_blend_mode)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_image_opa_struct_method_def = { - "lv_style_set_image_opa", - (PyCFunction)py_lv_style_set_image_opa_struct_method, +static PyMethodDef py_lv_style_set_blend_mode_struct_method_def = { + "lv_style_set_blend_mode", + (PyCFunction)py_lv_style_set_blend_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81839,29 +94445,29 @@ static PyMethodDef py_lv_style_set_image_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_image_recolor(lv_style_t *style, lv_color_t value) + * void lv_style_set_layout(lv_style_t *style, uint16_t value) */ -static PyObject *py_lv_style_set_image_recolor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_layout_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + uint16_t value = (uint16_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_image_recolor)(style, value); + ((void (*)(lv_style_t *, uint16_t))lv_style_set_layout)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_image_recolor_struct_method_def = { - "lv_style_set_image_recolor", - (PyCFunction)py_lv_style_set_image_recolor_struct_method, +static PyMethodDef py_lv_style_set_layout_struct_method_def = { + "lv_style_set_layout", + (PyCFunction)py_lv_style_set_layout_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81869,29 +94475,29 @@ static PyMethodDef py_lv_style_set_image_recolor_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_image_recolor_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_base_dir(lv_style_t *style, lv_base_dir_t value) */ -static PyObject *py_lv_style_set_image_recolor_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_base_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_base_dir_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_image_recolor_opa)(style, value); + ((void (*)(lv_style_t *, lv_base_dir_t))lv_style_set_base_dir)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_image_recolor_opa_struct_method_def = { - "lv_style_set_image_recolor_opa", - (PyCFunction)py_lv_style_set_image_recolor_opa_struct_method, +static PyMethodDef py_lv_style_set_base_dir_struct_method_def = { + "lv_style_set_base_dir", + (PyCFunction)py_lv_style_set_base_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81899,29 +94505,29 @@ static PyMethodDef py_lv_style_set_image_recolor_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_image_colorkey(lv_style_t *style, const lv_image_colorkey_t *value) + * void lv_style_set_bitmap_mask_src(lv_style_t *style, const void *value) */ -static PyObject *py_lv_style_set_image_colorkey_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_bitmap_mask_src_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *value_py; if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_image_colorkey_t *value = (const lv_image_colorkey_t *)mp_write_ptr_lv_image_colorkey_t(value_py); + const void *value = (const void *)mp_to_ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const lv_image_colorkey_t *))lv_style_set_image_colorkey)(style, value); + ((void (*)(lv_style_t *, const void *))lv_style_set_bitmap_mask_src)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_image_colorkey_struct_method_def = { - "lv_style_set_image_colorkey", - (PyCFunction)py_lv_style_set_image_colorkey_struct_method, +static PyMethodDef py_lv_style_set_bitmap_mask_src_struct_method_def = { + "lv_style_set_bitmap_mask_src", + (PyCFunction)py_lv_style_set_bitmap_mask_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81929,29 +94535,29 @@ static PyMethodDef py_lv_style_set_image_colorkey_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_line_width(lv_style_t *style, int32_t value) + * void lv_style_set_rotary_sensitivity(lv_style_t *style, uint32_t value) */ -static PyObject *py_lv_style_set_line_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_rotary_sensitivity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + uint32_t value = (uint32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_line_width)(style, value); + ((void (*)(lv_style_t *, uint32_t))lv_style_set_rotary_sensitivity)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; -} - -static PyMethodDef py_lv_style_set_line_width_struct_method_def = { - "lv_style_set_line_width", - (PyCFunction)py_lv_style_set_line_width_struct_method, +} + +static PyMethodDef py_lv_style_set_rotary_sensitivity_struct_method_def = { + "lv_style_set_rotary_sensitivity", + (PyCFunction)py_lv_style_set_rotary_sensitivity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81959,29 +94565,29 @@ static PyMethodDef py_lv_style_set_line_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_line_dash_width(lv_style_t *style, int32_t value) + * void lv_style_set_flex_flow(lv_style_t *style, lv_flex_flow_t value) */ -static PyObject *py_lv_style_set_line_dash_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_flex_flow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_flex_flow_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_line_dash_width)(style, value); + ((void (*)(lv_style_t *, lv_flex_flow_t))lv_style_set_flex_flow)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_line_dash_width_struct_method_def = { - "lv_style_set_line_dash_width", - (PyCFunction)py_lv_style_set_line_dash_width_struct_method, +static PyMethodDef py_lv_style_set_flex_flow_struct_method_def = { + "lv_style_set_flex_flow", + (PyCFunction)py_lv_style_set_flex_flow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81989,29 +94595,29 @@ static PyMethodDef py_lv_style_set_line_dash_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_line_dash_gap(lv_style_t *style, int32_t value) + * void lv_style_set_flex_main_place(lv_style_t *style, lv_flex_align_t value) */ -static PyObject *py_lv_style_set_line_dash_gap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_flex_main_place_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_flex_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_line_dash_gap)(style, value); + ((void (*)(lv_style_t *, lv_flex_align_t))lv_style_set_flex_main_place)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_line_dash_gap_struct_method_def = { - "lv_style_set_line_dash_gap", - (PyCFunction)py_lv_style_set_line_dash_gap_struct_method, +static PyMethodDef py_lv_style_set_flex_main_place_struct_method_def = { + "lv_style_set_flex_main_place", + (PyCFunction)py_lv_style_set_flex_main_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82019,29 +94625,29 @@ static PyMethodDef py_lv_style_set_line_dash_gap_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_line_rounded(lv_style_t *style, bool value) + * void lv_style_set_flex_cross_place(lv_style_t *style, lv_flex_align_t value) */ -static PyObject *py_lv_style_set_line_rounded_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_flex_cross_place_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - bool value = (value_val != 0); + lv_flex_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, bool))lv_style_set_line_rounded)(style, value); + ((void (*)(lv_style_t *, lv_flex_align_t))lv_style_set_flex_cross_place)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_line_rounded_struct_method_def = { - "lv_style_set_line_rounded", - (PyCFunction)py_lv_style_set_line_rounded_struct_method, +static PyMethodDef py_lv_style_set_flex_cross_place_struct_method_def = { + "lv_style_set_flex_cross_place", + (PyCFunction)py_lv_style_set_flex_cross_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82049,29 +94655,29 @@ static PyMethodDef py_lv_style_set_line_rounded_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_line_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_flex_track_place(lv_style_t *style, lv_flex_align_t value) */ -static PyObject *py_lv_style_set_line_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_flex_track_place_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *value_py; if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + lv_flex_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_line_color)(style, value); + ((void (*)(lv_style_t *, lv_flex_align_t))lv_style_set_flex_track_place)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_line_color_struct_method_def = { - "lv_style_set_line_color", - (PyCFunction)py_lv_style_set_line_color_struct_method, +static PyMethodDef py_lv_style_set_flex_track_place_struct_method_def = { + "lv_style_set_flex_track_place", + (PyCFunction)py_lv_style_set_flex_track_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82079,29 +94685,29 @@ static PyMethodDef py_lv_style_set_line_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_line_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_flex_grow(lv_style_t *style, uint8_t value) */ -static PyObject *py_lv_style_set_line_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_flex_grow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + uint8_t value = (uint8_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_line_opa)(style, value); + ((void (*)(lv_style_t *, uint8_t))lv_style_set_flex_grow)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_line_opa_struct_method_def = { - "lv_style_set_line_opa", - (PyCFunction)py_lv_style_set_line_opa_struct_method, +static PyMethodDef py_lv_style_set_flex_grow_struct_method_def = { + "lv_style_set_flex_grow", + (PyCFunction)py_lv_style_set_flex_grow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82109,29 +94715,29 @@ static PyMethodDef py_lv_style_set_line_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_arc_width(lv_style_t *style, int32_t value) + * void lv_style_set_grid_column_dsc_array(lv_style_t *style, const int32_t *value) */ -static PyObject *py_lv_style_set_arc_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_column_dsc_array_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_arc_width)(style, value); + ((void (*)(lv_style_t *, const int32_t *))lv_style_set_grid_column_dsc_array)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_arc_width_struct_method_def = { - "lv_style_set_arc_width", - (PyCFunction)py_lv_style_set_arc_width_struct_method, +static PyMethodDef py_lv_style_set_grid_column_dsc_array_struct_method_def = { + "lv_style_set_grid_column_dsc_array", + (PyCFunction)py_lv_style_set_grid_column_dsc_array_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82139,29 +94745,29 @@ static PyMethodDef py_lv_style_set_arc_width_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_arc_rounded(lv_style_t *style, bool value) + * void lv_style_set_grid_column_align(lv_style_t *style, lv_grid_align_t value) */ -static PyObject *py_lv_style_set_arc_rounded_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_column_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - bool value = (value_val != 0); + lv_grid_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, bool))lv_style_set_arc_rounded)(style, value); + ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_column_align)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_arc_rounded_struct_method_def = { - "lv_style_set_arc_rounded", - (PyCFunction)py_lv_style_set_arc_rounded_struct_method, +static PyMethodDef py_lv_style_set_grid_column_align_struct_method_def = { + "lv_style_set_grid_column_align", + (PyCFunction)py_lv_style_set_grid_column_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82169,29 +94775,29 @@ static PyMethodDef py_lv_style_set_arc_rounded_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_arc_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_grid_row_dsc_array(lv_style_t *style, const int32_t *value) */ -static PyObject *py_lv_style_set_arc_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_row_dsc_array_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *value_py; if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_arc_color)(style, value); + ((void (*)(lv_style_t *, const int32_t *))lv_style_set_grid_row_dsc_array)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_arc_color_struct_method_def = { - "lv_style_set_arc_color", - (PyCFunction)py_lv_style_set_arc_color_struct_method, +static PyMethodDef py_lv_style_set_grid_row_dsc_array_struct_method_def = { + "lv_style_set_grid_row_dsc_array", + (PyCFunction)py_lv_style_set_grid_row_dsc_array_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82199,29 +94805,29 @@ static PyMethodDef py_lv_style_set_arc_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_arc_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_grid_row_align(lv_style_t *style, lv_grid_align_t value) */ -static PyObject *py_lv_style_set_arc_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_row_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_grid_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_arc_opa)(style, value); + ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_row_align)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_arc_opa_struct_method_def = { - "lv_style_set_arc_opa", - (PyCFunction)py_lv_style_set_arc_opa_struct_method, +static PyMethodDef py_lv_style_set_grid_row_align_struct_method_def = { + "lv_style_set_grid_row_align", + (PyCFunction)py_lv_style_set_grid_row_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82229,29 +94835,29 @@ static PyMethodDef py_lv_style_set_arc_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_arc_image_src(lv_style_t *style, const void *value) + * void lv_style_set_grid_cell_column_pos(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_arc_image_src_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_cell_column_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const void *value = (const void *)mp_to_ptr(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const void *))lv_style_set_arc_image_src)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_column_pos)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_arc_image_src_struct_method_def = { - "lv_style_set_arc_image_src", - (PyCFunction)py_lv_style_set_arc_image_src_struct_method, +static PyMethodDef py_lv_style_set_grid_cell_column_pos_struct_method_def = { + "lv_style_set_grid_cell_column_pos", + (PyCFunction)py_lv_style_set_grid_cell_column_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82259,29 +94865,29 @@ static PyMethodDef py_lv_style_set_arc_image_src_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_grid_cell_x_align(lv_style_t *style, lv_grid_align_t value) */ -static PyObject *py_lv_style_set_text_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_cell_x_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *value_py; if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + lv_grid_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_text_color)(style, value); + ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_cell_x_align)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_color_struct_method_def = { - "lv_style_set_text_color", - (PyCFunction)py_lv_style_set_text_color_struct_method, +static PyMethodDef py_lv_style_set_grid_cell_x_align_struct_method_def = { + "lv_style_set_grid_cell_x_align", + (PyCFunction)py_lv_style_set_grid_cell_x_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82289,29 +94895,29 @@ static PyMethodDef py_lv_style_set_text_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_grid_cell_column_span(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_text_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_cell_column_span_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_text_opa)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_column_span)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_opa_struct_method_def = { - "lv_style_set_text_opa", - (PyCFunction)py_lv_style_set_text_opa_struct_method, +static PyMethodDef py_lv_style_set_grid_cell_column_span_struct_method_def = { + "lv_style_set_grid_cell_column_span", + (PyCFunction)py_lv_style_set_grid_cell_column_span_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82319,29 +94925,29 @@ static PyMethodDef py_lv_style_set_text_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_font(lv_style_t *style, const lv_font_t *value) + * void lv_style_set_grid_cell_row_pos(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_text_font_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_cell_row_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_font_t *value = (const lv_font_t *)mp_write_ptr_lv_font_t(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const lv_font_t *))lv_style_set_text_font)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_row_pos)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_font_struct_method_def = { - "lv_style_set_text_font", - (PyCFunction)py_lv_style_set_text_font_struct_method, +static PyMethodDef py_lv_style_set_grid_cell_row_pos_struct_method_def = { + "lv_style_set_grid_cell_row_pos", + (PyCFunction)py_lv_style_set_grid_cell_row_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82349,29 +94955,29 @@ static PyMethodDef py_lv_style_set_text_font_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_letter_space(lv_style_t *style, int32_t value) + * void lv_style_set_grid_cell_y_align(lv_style_t *style, lv_grid_align_t value) */ -static PyObject *py_lv_style_set_text_letter_space_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_cell_y_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_grid_align_t value = (int)mp_obj_get_int(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_text_letter_space)(style, value); + ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_cell_y_align)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_letter_space_struct_method_def = { - "lv_style_set_text_letter_space", - (PyCFunction)py_lv_style_set_text_letter_space_struct_method, +static PyMethodDef py_lv_style_set_grid_cell_y_align_struct_method_def = { + "lv_style_set_grid_cell_y_align", + (PyCFunction)py_lv_style_set_grid_cell_y_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82379,9 +94985,9 @@ static PyMethodDef py_lv_style_set_text_letter_space_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_line_space(lv_style_t *style, int32_t value) + * void lv_style_set_grid_cell_row_span(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_text_line_space_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_grid_cell_row_span_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -82392,16 +94998,16 @@ static PyObject *py_lv_style_set_text_line_space_struct_method(PyObject *self, P if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_text_line_space)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_row_span)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_line_space_struct_method_def = { - "lv_style_set_text_line_space", - (PyCFunction)py_lv_style_set_text_line_space_struct_method, +static PyMethodDef py_lv_style_set_grid_cell_row_span_struct_method_def = { + "lv_style_set_grid_cell_row_span", + (PyCFunction)py_lv_style_set_grid_cell_row_span_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82409,29 +95015,30 @@ static PyMethodDef py_lv_style_set_text_line_space_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_decor(lv_style_t *style, lv_text_decor_t value) + * void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) */ -static PyObject *py_lv_style_set_text_decor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long width_val; long height_val; + if (!PyArg_ParseTuple(py_args, "ll", &width_val, &height_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_text_decor_t value = (int)mp_obj_get_int(value_py); + int32_t width = (int32_t)width_val; + int32_t height = (int32_t)height_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_text_decor_t))lv_style_set_text_decor)(style, value); + ((void (*)(lv_style_t *, int32_t, int32_t))lv_style_set_size)(style, width, height); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_decor_struct_method_def = { - "lv_style_set_text_decor", - (PyCFunction)py_lv_style_set_text_decor_struct_method, +static PyMethodDef py_lv_style_set_size_struct_method_def = { + "lv_style_set_size", + (PyCFunction)py_lv_style_set_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82439,29 +95046,29 @@ static PyMethodDef py_lv_style_set_text_decor_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_align(lv_style_t *style, lv_text_align_t value) + * void lv_style_set_pad_all(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_text_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_text_align_t value = (int)mp_obj_get_int(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_text_align_t))lv_style_set_text_align)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_all)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_align_struct_method_def = { - "lv_style_set_text_align", - (PyCFunction)py_lv_style_set_text_align_struct_method, +static PyMethodDef py_lv_style_set_pad_all_struct_method_def = { + "lv_style_set_pad_all", + (PyCFunction)py_lv_style_set_pad_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82469,29 +95076,29 @@ static PyMethodDef py_lv_style_set_text_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_text_outline_stroke_color(lv_style_t *style, lv_color_t value) + * void lv_style_set_pad_hor(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_text_outline_stroke_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_hor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_text_outline_stroke_color)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_hor)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_outline_stroke_color_struct_method_def = { - "lv_style_set_text_outline_stroke_color", - (PyCFunction)py_lv_style_set_text_outline_stroke_color_struct_method, +static PyMethodDef py_lv_style_set_pad_hor_struct_method_def = { + "lv_style_set_pad_hor", + (PyCFunction)py_lv_style_set_pad_hor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82499,9 +95106,9 @@ static PyMethodDef py_lv_style_set_text_outline_stroke_color_struct_method_def = /* * lvgl extension definition for: - * void lv_style_set_text_outline_stroke_width(lv_style_t *style, int32_t value) + * void lv_style_set_pad_ver(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_text_outline_stroke_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_ver_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -82512,16 +95119,16 @@ static PyObject *py_lv_style_set_text_outline_stroke_width_struct_method(PyObjec if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_text_outline_stroke_width)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_ver)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_outline_stroke_width_struct_method_def = { - "lv_style_set_text_outline_stroke_width", - (PyCFunction)py_lv_style_set_text_outline_stroke_width_struct_method, +static PyMethodDef py_lv_style_set_pad_ver_struct_method_def = { + "lv_style_set_pad_ver", + (PyCFunction)py_lv_style_set_pad_ver_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82529,29 +95136,29 @@ static PyMethodDef py_lv_style_set_text_outline_stroke_width_struct_method_def = /* * lvgl extension definition for: - * void lv_style_set_text_outline_stroke_opa(lv_style_t *style, lv_opa_t value) + * void lv_style_set_pad_gap(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_text_outline_stroke_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_pad_gap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_text_outline_stroke_opa)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_pad_gap)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_text_outline_stroke_opa_struct_method_def = { - "lv_style_set_text_outline_stroke_opa", - (PyCFunction)py_lv_style_set_text_outline_stroke_opa_struct_method, +static PyMethodDef py_lv_style_set_pad_gap_struct_method_def = { + "lv_style_set_pad_gap", + (PyCFunction)py_lv_style_set_pad_gap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82559,9 +95166,9 @@ static PyMethodDef py_lv_style_set_text_outline_stroke_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_blur_radius(lv_style_t *style, int32_t value) + * void lv_style_set_margin_hor(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_blur_radius_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_margin_hor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -82572,16 +95179,16 @@ static PyObject *py_lv_style_set_blur_radius_struct_method(PyObject *self, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_blur_radius)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_hor)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_blur_radius_struct_method_def = { - "lv_style_set_blur_radius", - (PyCFunction)py_lv_style_set_blur_radius_struct_method, +static PyMethodDef py_lv_style_set_margin_hor_struct_method_def = { + "lv_style_set_margin_hor", + (PyCFunction)py_lv_style_set_margin_hor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82589,29 +95196,29 @@ static PyMethodDef py_lv_style_set_blur_radius_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_blur_backdrop(lv_style_t *style, bool value) + * void lv_style_set_margin_ver(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_blur_backdrop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_margin_ver_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - bool value = (value_val != 0); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, bool))lv_style_set_blur_backdrop)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_ver)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_blur_backdrop_struct_method_def = { - "lv_style_set_blur_backdrop", - (PyCFunction)py_lv_style_set_blur_backdrop_struct_method, +static PyMethodDef py_lv_style_set_margin_ver_struct_method_def = { + "lv_style_set_margin_ver", + (PyCFunction)py_lv_style_set_margin_ver_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82619,29 +95226,29 @@ static PyMethodDef py_lv_style_set_blur_backdrop_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_blur_quality(lv_style_t *style, lv_blur_quality_t value) + * void lv_style_set_margin_all(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_blur_quality_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_margin_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } + long value_val; + if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_blur_quality_t value = (int)mp_obj_get_int(value_py); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_blur_quality_t))lv_style_set_blur_quality)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_margin_all)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_blur_quality_struct_method_def = { - "lv_style_set_blur_quality", - (PyCFunction)py_lv_style_set_blur_quality_struct_method, +static PyMethodDef py_lv_style_set_margin_all_struct_method_def = { + "lv_style_set_margin_all", + (PyCFunction)py_lv_style_set_margin_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82649,9 +95256,9 @@ static PyMethodDef py_lv_style_set_blur_quality_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_drop_shadow_radius(lv_style_t *style, int32_t value) + * void lv_style_set_transform_scale(lv_style_t *style, int32_t value) */ -static PyObject *py_lv_style_set_drop_shadow_radius_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_set_transform_scale_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -82662,76 +95269,199 @@ static PyObject *py_lv_style_set_drop_shadow_radius_struct_method(PyObject *self if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_drop_shadow_radius)(style, value); + ((void (*)(lv_style_t *, int32_t))lv_style_set_transform_scale)(style, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_drop_shadow_radius_struct_method_def = { - "lv_style_set_drop_shadow_radius", - (PyCFunction)py_lv_style_set_drop_shadow_radius_struct_method, +static PyMethodDef py_lv_style_set_transform_scale_struct_method_def = { + "lv_style_set_transform_scale", + (PyCFunction)py_lv_style_set_transform_scale_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_style_t_methods[] = { + {"is_const_internal", (PyCFunction)py_lv_style_is_const_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_prop_internal", (PyCFunction)py_lv_style_get_prop_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_style_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset", (PyCFunction)py_lv_style_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy", (PyCFunction)py_lv_style_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"merge", (PyCFunction)py_lv_style_merge_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_const", (PyCFunction)py_lv_style_is_const_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_prop", (PyCFunction)py_lv_style_remove_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_prop", (PyCFunction)py_lv_style_set_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_prop", (PyCFunction)py_lv_style_get_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_empty", (PyCFunction)py_lv_style_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_width", (PyCFunction)py_lv_style_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_width", (PyCFunction)py_lv_style_set_min_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_width", (PyCFunction)py_lv_style_set_max_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_height", (PyCFunction)py_lv_style_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_height", (PyCFunction)py_lv_style_set_min_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_height", (PyCFunction)py_lv_style_set_max_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_length", (PyCFunction)py_lv_style_set_length_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_x", (PyCFunction)py_lv_style_set_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_y", (PyCFunction)py_lv_style_set_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_align", (PyCFunction)py_lv_style_set_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_width", (PyCFunction)py_lv_style_set_transform_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_height", (PyCFunction)py_lv_style_set_transform_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_translate_x", (PyCFunction)py_lv_style_set_translate_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_translate_y", (PyCFunction)py_lv_style_set_translate_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_translate_radial", (PyCFunction)py_lv_style_set_translate_radial_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_scale_x", (PyCFunction)py_lv_style_set_transform_scale_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_scale_y", (PyCFunction)py_lv_style_set_transform_scale_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_rotation", (PyCFunction)py_lv_style_set_transform_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_pivot_x", (PyCFunction)py_lv_style_set_transform_pivot_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_pivot_y", (PyCFunction)py_lv_style_set_transform_pivot_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_skew_x", (PyCFunction)py_lv_style_set_transform_skew_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_skew_y", (PyCFunction)py_lv_style_set_transform_skew_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_top", (PyCFunction)py_lv_style_set_pad_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_bottom", (PyCFunction)py_lv_style_set_pad_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_left", (PyCFunction)py_lv_style_set_pad_left_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_right", (PyCFunction)py_lv_style_set_pad_right_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_row", (PyCFunction)py_lv_style_set_pad_row_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_column", (PyCFunction)py_lv_style_set_pad_column_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_radial", (PyCFunction)py_lv_style_set_pad_radial_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_margin_top", (PyCFunction)py_lv_style_set_margin_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_margin_bottom", (PyCFunction)py_lv_style_set_margin_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_margin_left", (PyCFunction)py_lv_style_set_margin_left_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_margin_right", (PyCFunction)py_lv_style_set_margin_right_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_color", (PyCFunction)py_lv_style_set_bg_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_opa", (PyCFunction)py_lv_style_set_bg_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_grad_color", (PyCFunction)py_lv_style_set_bg_grad_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_grad_dir", (PyCFunction)py_lv_style_set_bg_grad_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_main_stop", (PyCFunction)py_lv_style_set_bg_main_stop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_grad_stop", (PyCFunction)py_lv_style_set_bg_grad_stop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_main_opa", (PyCFunction)py_lv_style_set_bg_main_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_grad_opa", (PyCFunction)py_lv_style_set_bg_grad_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_grad", (PyCFunction)py_lv_style_set_bg_grad_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_image_src", (PyCFunction)py_lv_style_set_bg_image_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_image_opa", (PyCFunction)py_lv_style_set_bg_image_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_image_recolor", (PyCFunction)py_lv_style_set_bg_image_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_image_recolor_opa", (PyCFunction)py_lv_style_set_bg_image_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bg_image_tiled", (PyCFunction)py_lv_style_set_bg_image_tiled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_border_color", (PyCFunction)py_lv_style_set_border_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_border_opa", (PyCFunction)py_lv_style_set_border_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_border_width", (PyCFunction)py_lv_style_set_border_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_border_side", (PyCFunction)py_lv_style_set_border_side_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_border_post", (PyCFunction)py_lv_style_set_border_post_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_outline_width", (PyCFunction)py_lv_style_set_outline_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_outline_color", (PyCFunction)py_lv_style_set_outline_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_outline_opa", (PyCFunction)py_lv_style_set_outline_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_outline_pad", (PyCFunction)py_lv_style_set_outline_pad_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shadow_width", (PyCFunction)py_lv_style_set_shadow_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shadow_offset_x", (PyCFunction)py_lv_style_set_shadow_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shadow_offset_y", (PyCFunction)py_lv_style_set_shadow_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shadow_spread", (PyCFunction)py_lv_style_set_shadow_spread_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shadow_color", (PyCFunction)py_lv_style_set_shadow_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_shadow_opa", (PyCFunction)py_lv_style_set_shadow_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_image_opa", (PyCFunction)py_lv_style_set_image_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_image_recolor", (PyCFunction)py_lv_style_set_image_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_image_recolor_opa", (PyCFunction)py_lv_style_set_image_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_image_colorkey", (PyCFunction)py_lv_style_set_image_colorkey_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_line_width", (PyCFunction)py_lv_style_set_line_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_line_dash_width", (PyCFunction)py_lv_style_set_line_dash_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_line_dash_gap", (PyCFunction)py_lv_style_set_line_dash_gap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_line_rounded", (PyCFunction)py_lv_style_set_line_rounded_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_line_color", (PyCFunction)py_lv_style_set_line_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_line_opa", (PyCFunction)py_lv_style_set_line_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_arc_width", (PyCFunction)py_lv_style_set_arc_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_arc_rounded", (PyCFunction)py_lv_style_set_arc_rounded_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_arc_color", (PyCFunction)py_lv_style_set_arc_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_arc_opa", (PyCFunction)py_lv_style_set_arc_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_arc_image_src", (PyCFunction)py_lv_style_set_arc_image_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_color", (PyCFunction)py_lv_style_set_text_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_opa", (PyCFunction)py_lv_style_set_text_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_font", (PyCFunction)py_lv_style_set_text_font_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_letter_space", (PyCFunction)py_lv_style_set_text_letter_space_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_line_space", (PyCFunction)py_lv_style_set_text_line_space_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_decor", (PyCFunction)py_lv_style_set_text_decor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_align", (PyCFunction)py_lv_style_set_text_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_outline_stroke_color", (PyCFunction)py_lv_style_set_text_outline_stroke_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_outline_stroke_width", (PyCFunction)py_lv_style_set_text_outline_stroke_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_outline_stroke_opa", (PyCFunction)py_lv_style_set_text_outline_stroke_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_leading_trim", (PyCFunction)py_lv_style_set_text_leading_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_blur_radius", (PyCFunction)py_lv_style_set_blur_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_blur_backdrop", (PyCFunction)py_lv_style_set_blur_backdrop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_blur_quality", (PyCFunction)py_lv_style_set_blur_quality_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_drop_shadow_radius", (PyCFunction)py_lv_style_set_drop_shadow_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_drop_shadow_offset_x", (PyCFunction)py_lv_style_set_drop_shadow_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_drop_shadow_offset_y", (PyCFunction)py_lv_style_set_drop_shadow_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_drop_shadow_color", (PyCFunction)py_lv_style_set_drop_shadow_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_drop_shadow_opa", (PyCFunction)py_lv_style_set_drop_shadow_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_drop_shadow_quality", (PyCFunction)py_lv_style_set_drop_shadow_quality_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_radius", (PyCFunction)py_lv_style_set_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_radial_offset", (PyCFunction)py_lv_style_set_radial_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_clip_corner", (PyCFunction)py_lv_style_set_clip_corner_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_opa", (PyCFunction)py_lv_style_set_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_opa_layered", (PyCFunction)py_lv_style_set_opa_layered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_color_filter_dsc", (PyCFunction)py_lv_style_set_color_filter_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_color_filter_opa", (PyCFunction)py_lv_style_set_color_filter_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_recolor", (PyCFunction)py_lv_style_set_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_recolor_opa", (PyCFunction)py_lv_style_set_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_anim", (PyCFunction)py_lv_style_set_anim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_anim_duration", (PyCFunction)py_lv_style_set_anim_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transition", (PyCFunction)py_lv_style_set_transition_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_blend_mode", (PyCFunction)py_lv_style_set_blend_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_layout", (PyCFunction)py_lv_style_set_layout_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_base_dir", (PyCFunction)py_lv_style_set_base_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bitmap_mask_src", (PyCFunction)py_lv_style_set_bitmap_mask_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rotary_sensitivity", (PyCFunction)py_lv_style_set_rotary_sensitivity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_flow", (PyCFunction)py_lv_style_set_flex_flow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_main_place", (PyCFunction)py_lv_style_set_flex_main_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_cross_place", (PyCFunction)py_lv_style_set_flex_cross_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_track_place", (PyCFunction)py_lv_style_set_flex_track_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flex_grow", (PyCFunction)py_lv_style_set_flex_grow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_column_dsc_array", (PyCFunction)py_lv_style_set_grid_column_dsc_array_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_column_align", (PyCFunction)py_lv_style_set_grid_column_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_row_dsc_array", (PyCFunction)py_lv_style_set_grid_row_dsc_array_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_row_align", (PyCFunction)py_lv_style_set_grid_row_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_cell_column_pos", (PyCFunction)py_lv_style_set_grid_cell_column_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_cell_x_align", (PyCFunction)py_lv_style_set_grid_cell_x_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_cell_column_span", (PyCFunction)py_lv_style_set_grid_cell_column_span_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_cell_row_pos", (PyCFunction)py_lv_style_set_grid_cell_row_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_cell_y_align", (PyCFunction)py_lv_style_set_grid_cell_y_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_grid_cell_row_span", (PyCFunction)py_lv_style_set_grid_cell_row_span_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_size", (PyCFunction)py_lv_style_set_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_all", (PyCFunction)py_lv_style_set_pad_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_hor", (PyCFunction)py_lv_style_set_pad_hor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_ver", (PyCFunction)py_lv_style_set_pad_ver_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pad_gap", (PyCFunction)py_lv_style_set_pad_gap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_margin_hor", (PyCFunction)py_lv_style_set_margin_hor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_margin_ver", (PyCFunction)py_lv_style_set_margin_ver_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_margin_all", (PyCFunction)py_lv_style_set_margin_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_transform_scale", (PyCFunction)py_lv_style_set_transform_scale_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_style_value_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_style_set_drop_shadow_offset_x(lv_style_t *style, int32_t value) + * void lv_observer_delete(lv_observer_t *observer) */ -static PyObject *py_lv_style_set_drop_shadow_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_observer_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_drop_shadow_offset_x)(style, value); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} -static PyMethodDef py_lv_style_set_drop_shadow_offset_x_struct_method_def = { - "lv_style_set_drop_shadow_offset_x", - (PyCFunction)py_lv_style_set_drop_shadow_offset_x_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_style_set_drop_shadow_offset_y(lv_style_t *style, int32_t value) - */ -static PyObject *py_lv_style_set_drop_shadow_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_drop_shadow_offset_y)(style, value); + ((void (*)(lv_observer_t *))lv_observer_delete)(observer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_drop_shadow_offset_y_struct_method_def = { - "lv_style_set_drop_shadow_offset_y", - (PyCFunction)py_lv_style_set_drop_shadow_offset_y_struct_method, +static PyMethodDef py_lv_observer_delete_struct_method_def = { + "lv_observer_delete", + (PyCFunction)py_lv_observer_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82739,29 +95469,28 @@ static PyMethodDef py_lv_style_set_drop_shadow_offset_y_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_drop_shadow_color(lv_style_t *style, lv_color_t value) + * void *lv_observer_get_target(lv_observer_t *observer) */ -static PyObject *py_lv_style_set_drop_shadow_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_observer_get_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + + lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_drop_shadow_color)(style, value); + _res = ((void *(*)(lv_observer_t *))lv_observer_get_target)(observer); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_style_set_drop_shadow_color_struct_method_def = { - "lv_style_set_drop_shadow_color", - (PyCFunction)py_lv_style_set_drop_shadow_color_struct_method, +static PyMethodDef py_lv_observer_get_target_struct_method_def = { + "lv_observer_get_target", + (PyCFunction)py_lv_observer_get_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82769,29 +95498,28 @@ static PyMethodDef py_lv_style_set_drop_shadow_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_drop_shadow_opa(lv_style_t *style, lv_opa_t value) + * lv_obj_t *lv_observer_get_target_obj(lv_observer_t *observer) */ -static PyObject *py_lv_style_set_drop_shadow_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_observer_get_target_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + + lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_drop_shadow_opa)(style, value); + _res = ((lv_obj_t *(*)(lv_observer_t *))lv_observer_get_target_obj)(observer); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_style_set_drop_shadow_opa_struct_method_def = { - "lv_style_set_drop_shadow_opa", - (PyCFunction)py_lv_style_set_drop_shadow_opa_struct_method, +static PyMethodDef py_lv_observer_get_target_obj_struct_method_def = { + "lv_observer_get_target_obj", + (PyCFunction)py_lv_observer_get_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82799,29 +95527,28 @@ static PyMethodDef py_lv_style_set_drop_shadow_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_drop_shadow_quality(lv_style_t *style, lv_blur_quality_t value) + * void *lv_observer_get_user_data(const lv_observer_t *observer) */ -static PyObject *py_lv_style_set_drop_shadow_quality_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_observer_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_blur_quality_t value = (int)mp_obj_get_int(value_py); + + const lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_blur_quality_t))lv_style_set_drop_shadow_quality)(style, value); + _res = ((void *(*)(const lv_observer_t *))lv_observer_get_user_data)(observer); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_style_set_drop_shadow_quality_struct_method_def = { - "lv_style_set_drop_shadow_quality", - (PyCFunction)py_lv_style_set_drop_shadow_quality_struct_method, +static PyMethodDef py_lv_observer_get_user_data_struct_method_def = { + "lv_observer_get_user_data", + (PyCFunction)py_lv_observer_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82829,89 +95556,67 @@ static PyMethodDef py_lv_style_set_drop_shadow_quality_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_radius(lv_style_t *style, int32_t value) + * void lv_observer_set_user_data(lv_observer_t *observer, void *user_data) */ -static PyObject *py_lv_style_set_radius_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_observer_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_radius)(style, value); + ((void (*)(lv_observer_t *, void *))lv_observer_set_user_data)(observer, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_radius_struct_method_def = { - "lv_style_set_radius", - (PyCFunction)py_lv_style_set_radius_struct_method, +static PyMethodDef py_lv_observer_set_user_data_struct_method_def = { + "lv_observer_set_user_data", + (PyCFunction)py_lv_observer_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl extension definition for: - * void lv_style_set_radial_offset(lv_style_t *style, int32_t value) - */ -static PyObject *py_lv_style_set_radial_offset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_radial_offset)(style, value); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_style_set_radial_offset_struct_method_def = { - "lv_style_set_radial_offset", - (PyCFunction)py_lv_style_set_radial_offset_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL +PyMethodDef py_lv_observer_t_methods[] = { + {"delete", (PyCFunction)py_lv_observer_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_target", (PyCFunction)py_lv_observer_get_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_target_obj", (PyCFunction)py_lv_observer_get_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_observer_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_observer_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} }; /* * lvgl extension definition for: - * void lv_style_set_clip_corner(lv_style_t *style, bool value) + * void lv_subject_delete(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_clip_corner_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - bool value = (value_val != 0); + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, bool))lv_style_set_clip_corner)(style, value); + ((void (*)(lv_subject_t *))lv_subject_delete)(subject); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_clip_corner_struct_method_def = { - "lv_style_set_clip_corner", - (PyCFunction)py_lv_style_set_clip_corner_struct_method, +static PyMethodDef py_lv_subject_delete_struct_method_def = { + "lv_subject_delete", + (PyCFunction)py_lv_subject_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82919,29 +95624,29 @@ static PyMethodDef py_lv_style_set_clip_corner_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_opa(lv_style_t *style, lv_opa_t value) + * void lv_subject_init_int(lv_subject_t *subject, int32_t value) */ -static PyObject *py_lv_style_set_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_init_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_opa)(style, value); + ((void (*)(lv_subject_t *, int32_t))lv_subject_init_int)(subject, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_opa_struct_method_def = { - "lv_style_set_opa", - (PyCFunction)py_lv_style_set_opa_struct_method, +static PyMethodDef py_lv_subject_init_int_struct_method_def = { + "lv_subject_init_int", + (PyCFunction)py_lv_subject_init_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82949,29 +95654,29 @@ static PyMethodDef py_lv_style_set_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_opa_layered(lv_style_t *style, lv_opa_t value) + * void lv_subject_set_int(lv_subject_t *subject, int32_t value) */ -static PyObject *py_lv_style_set_opa_layered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; long value_val; if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + int32_t value = (int32_t)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_opa_layered)(style, value); + ((void (*)(lv_subject_t *, int32_t))lv_subject_set_int)(subject, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_opa_layered_struct_method_def = { - "lv_style_set_opa_layered", - (PyCFunction)py_lv_style_set_opa_layered_struct_method, +static PyMethodDef py_lv_subject_set_int_struct_method_def = { + "lv_subject_set_int", + (PyCFunction)py_lv_subject_set_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82979,59 +95684,28 @@ static PyMethodDef py_lv_style_set_opa_layered_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_color_filter_dsc(lv_style_t *style, const lv_color_filter_dsc_t *value) + * int32_t lv_subject_get_int(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_color_filter_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(value_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_style_t *, const lv_color_filter_dsc_t *))lv_style_set_color_filter_dsc)(style, value); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_style_set_color_filter_dsc_struct_method_def = { - "lv_style_set_color_filter_dsc", - (PyCFunction)py_lv_style_set_color_filter_dsc_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - -/* - * lvgl extension definition for: - * void lv_style_set_color_filter_opa(lv_style_t *style, lv_opa_t value) - */ -static PyObject *py_lv_style_set_color_filter_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_color_filter_opa)(style, value); + _res = ((int32_t (*)(lv_subject_t *))lv_subject_get_int)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_style_set_color_filter_opa_struct_method_def = { - "lv_style_set_color_filter_opa", - (PyCFunction)py_lv_style_set_color_filter_opa_struct_method, +static PyMethodDef py_lv_subject_get_int_struct_method_def = { + "lv_subject_get_int", + (PyCFunction)py_lv_subject_get_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83039,29 +95713,28 @@ static PyMethodDef py_lv_style_set_color_filter_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_recolor(lv_style_t *style, lv_color_t value) + * int32_t lv_subject_get_previous_int(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_recolor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_previous_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_color_t value = mp_write_lv_color_t(value_py); + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_color_t))lv_style_set_recolor)(style, value); + _res = ((int32_t (*)(lv_subject_t *))lv_subject_get_previous_int)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_style_set_recolor_struct_method_def = { - "lv_style_set_recolor", - (PyCFunction)py_lv_style_set_recolor_struct_method, +static PyMethodDef py_lv_subject_get_previous_int_struct_method_def = { + "lv_subject_get_previous_int", + (PyCFunction)py_lv_subject_get_previous_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83069,29 +95742,29 @@ static PyMethodDef py_lv_style_set_recolor_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_recolor_opa(lv_style_t *style, lv_opa_t value) + * void lv_subject_set_min_value_int(lv_subject_t *subject, int32_t min_value) */ -static PyObject *py_lv_style_set_recolor_opa_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_min_value_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_opa_t value = (lv_opa_t)value_val; + long min_value_val; + if (!PyArg_ParseTuple(py_args, "l", &min_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + int32_t min_value = (int32_t)min_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_opa_t))lv_style_set_recolor_opa)(style, value); + ((void (*)(lv_subject_t *, int32_t))lv_subject_set_min_value_int)(subject, min_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_recolor_opa_struct_method_def = { - "lv_style_set_recolor_opa", - (PyCFunction)py_lv_style_set_recolor_opa_struct_method, +static PyMethodDef py_lv_subject_set_min_value_int_struct_method_def = { + "lv_subject_set_min_value_int", + (PyCFunction)py_lv_subject_set_min_value_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83099,29 +95772,29 @@ static PyMethodDef py_lv_style_set_recolor_opa_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_anim(lv_style_t *style, const lv_anim_t *value) + * void lv_subject_set_max_value_int(lv_subject_t *subject, int32_t max_value) */ -static PyObject *py_lv_style_set_anim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_max_value_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(value_py); + long max_value_val; + if (!PyArg_ParseTuple(py_args, "l", &max_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + int32_t max_value = (int32_t)max_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const lv_anim_t *))lv_style_set_anim)(style, value); + ((void (*)(lv_subject_t *, int32_t))lv_subject_set_max_value_int)(subject, max_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_anim_struct_method_def = { - "lv_style_set_anim", - (PyCFunction)py_lv_style_set_anim_struct_method, +static PyMethodDef py_lv_subject_set_max_value_int_struct_method_def = { + "lv_subject_set_max_value_int", + (PyCFunction)py_lv_subject_set_max_value_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83129,29 +95802,29 @@ static PyMethodDef py_lv_style_set_anim_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_anim_duration(lv_style_t *style, uint32_t value) + * void lv_subject_init_float(lv_subject_t *subject, float value) */ -static PyObject *py_lv_style_set_anim_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_init_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - uint32_t value = (uint32_t)value_val; + double value_val; + if (!PyArg_ParseTuple(py_args, "d", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + float value = (float)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, uint32_t))lv_style_set_anim_duration)(style, value); + ((void (*)(lv_subject_t *, float))lv_subject_init_float)(subject, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_anim_duration_struct_method_def = { - "lv_style_set_anim_duration", - (PyCFunction)py_lv_style_set_anim_duration_struct_method, +static PyMethodDef py_lv_subject_init_float_struct_method_def = { + "lv_subject_init_float", + (PyCFunction)py_lv_subject_init_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83159,29 +95832,29 @@ static PyMethodDef py_lv_style_set_anim_duration_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_transition(lv_style_t *style, const lv_style_transition_dsc_t *value) + * void lv_subject_set_float(lv_subject_t *subject, float value) */ -static PyObject *py_lv_style_set_transition_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(value_py); + double value_val; + if (!PyArg_ParseTuple(py_args, "d", &value_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + float value = (float)value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const lv_style_transition_dsc_t *))lv_style_set_transition)(style, value); + ((void (*)(lv_subject_t *, float))lv_subject_set_float)(subject, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_transition_struct_method_def = { - "lv_style_set_transition", - (PyCFunction)py_lv_style_set_transition_struct_method, +static PyMethodDef py_lv_subject_set_float_struct_method_def = { + "lv_subject_set_float", + (PyCFunction)py_lv_subject_set_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83189,29 +95862,28 @@ static PyMethodDef py_lv_style_set_transition_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_blend_mode(lv_style_t *style, lv_blend_mode_t value) + * float lv_subject_get_float(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_blend_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_blend_mode_t value = (int)mp_obj_get_int(value_py); + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + float _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_blend_mode_t))lv_style_set_blend_mode)(style, value); + _res = ((float (*)(lv_subject_t *))lv_subject_get_float)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_style_set_blend_mode_struct_method_def = { - "lv_style_set_blend_mode", - (PyCFunction)py_lv_style_set_blend_mode_struct_method, +static PyMethodDef py_lv_subject_get_float_struct_method_def = { + "lv_subject_get_float", + (PyCFunction)py_lv_subject_get_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83219,29 +95891,28 @@ static PyMethodDef py_lv_style_set_blend_mode_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_layout(lv_style_t *style, uint16_t value) + * float lv_subject_get_previous_float(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_layout_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_previous_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - uint16_t value = (uint16_t)value_val; + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + float _res; lvpy_lock(); - ((void (*)(lv_style_t *, uint16_t))lv_style_set_layout)(style, value); + _res = ((float (*)(lv_subject_t *))lv_subject_get_previous_float)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_style_set_layout_struct_method_def = { - "lv_style_set_layout", - (PyCFunction)py_lv_style_set_layout_struct_method, +static PyMethodDef py_lv_subject_get_previous_float_struct_method_def = { + "lv_subject_get_previous_float", + (PyCFunction)py_lv_subject_get_previous_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83249,29 +95920,29 @@ static PyMethodDef py_lv_style_set_layout_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_base_dir(lv_style_t *style, lv_base_dir_t value) + * void lv_subject_set_min_value_float(lv_subject_t *subject, float min_value) */ -static PyObject *py_lv_style_set_base_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_min_value_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_base_dir_t value = (int)mp_obj_get_int(value_py); + double min_value_val; + if (!PyArg_ParseTuple(py_args, "d", &min_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + float min_value = (float)min_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_base_dir_t))lv_style_set_base_dir)(style, value); + ((void (*)(lv_subject_t *, float))lv_subject_set_min_value_float)(subject, min_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_base_dir_struct_method_def = { - "lv_style_set_base_dir", - (PyCFunction)py_lv_style_set_base_dir_struct_method, +static PyMethodDef py_lv_subject_set_min_value_float_struct_method_def = { + "lv_subject_set_min_value_float", + (PyCFunction)py_lv_subject_set_min_value_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83279,29 +95950,29 @@ static PyMethodDef py_lv_style_set_base_dir_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_bitmap_mask_src(lv_style_t *style, const void *value) + * void lv_subject_set_max_value_float(lv_subject_t *subject, float max_value) */ -static PyObject *py_lv_style_set_bitmap_mask_src_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_max_value_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const void *value = (const void *)mp_to_ptr(value_py); + double max_value_val; + if (!PyArg_ParseTuple(py_args, "d", &max_value_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + float max_value = (float)max_value_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const void *))lv_style_set_bitmap_mask_src)(style, value); + ((void (*)(lv_subject_t *, float))lv_subject_set_max_value_float)(subject, max_value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_bitmap_mask_src_struct_method_def = { - "lv_style_set_bitmap_mask_src", - (PyCFunction)py_lv_style_set_bitmap_mask_src_struct_method, +static PyMethodDef py_lv_subject_set_max_value_float_struct_method_def = { + "lv_subject_set_max_value_float", + (PyCFunction)py_lv_subject_set_max_value_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83309,29 +95980,32 @@ static PyMethodDef py_lv_style_set_bitmap_mask_src_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_rotary_sensitivity(lv_style_t *style, uint32_t value) + * void lv_subject_init_string(lv_subject_t *subject, char *buf, char *prev_buf, size_t size, const char *value) */ -static PyObject *py_lv_style_set_rotary_sensitivity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_init_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - uint32_t value = (uint32_t)value_val; + PyObject *buf_py; PyObject *prev_buf_py; long size_val; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "OOlO", &buf_py, &prev_buf_py, &size_val, &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + char *buf = (char*)convert_from_str(buf_py); + char *prev_buf = (char*)convert_from_str(prev_buf_py); + size_t size = (size_t)size_val; + const char *value = (const char *)(char*)convert_from_str(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, uint32_t))lv_style_set_rotary_sensitivity)(style, value); + ((void (*)(lv_subject_t *, char *, char *, size_t, const char *))lv_subject_init_string)(subject, buf, prev_buf, size, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_rotary_sensitivity_struct_method_def = { - "lv_style_set_rotary_sensitivity", - (PyCFunction)py_lv_style_set_rotary_sensitivity_struct_method, +static PyMethodDef py_lv_subject_init_string_struct_method_def = { + "lv_subject_init_string", + (PyCFunction)py_lv_subject_init_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83339,29 +96013,31 @@ static PyMethodDef py_lv_style_set_rotary_sensitivity_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_flex_flow(lv_style_t *style, lv_flex_flow_t value) + * void lv_subject_set_string_buffer_static(lv_subject_t *subject, char *buf, char *prev_buf, size_t size) */ -static PyObject *py_lv_style_set_flex_flow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_string_buffer_static_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_flex_flow_t value = (int)mp_obj_get_int(value_py); + PyObject *buf_py; PyObject *prev_buf_py; long size_val; + if (!PyArg_ParseTuple(py_args, "OOl", &buf_py, &prev_buf_py, &size_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + char *buf = (char*)convert_from_str(buf_py); + char *prev_buf = (char*)convert_from_str(prev_buf_py); + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_flex_flow_t))lv_style_set_flex_flow)(style, value); + ((void (*)(lv_subject_t *, char *, char *, size_t))lv_subject_set_string_buffer_static)(subject, buf, prev_buf, size); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_flex_flow_struct_method_def = { - "lv_style_set_flex_flow", - (PyCFunction)py_lv_style_set_flex_flow_struct_method, +static PyMethodDef py_lv_subject_set_string_buffer_static_struct_method_def = { + "lv_subject_set_string_buffer_static", + (PyCFunction)py_lv_subject_set_string_buffer_static_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83369,29 +96045,29 @@ static PyMethodDef py_lv_style_set_flex_flow_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_flex_main_place(lv_style_t *style, lv_flex_align_t value) + * void lv_subject_set_string(lv_subject_t *subject, const char *buf) */ -static PyObject *py_lv_style_set_flex_main_place_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_flex_align_t value = (int)mp_obj_get_int(value_py); + PyObject *buf_py; + if (!PyArg_ParseTuple(py_args, "O", &buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + const char *buf = (const char *)(char*)convert_from_str(buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_flex_align_t))lv_style_set_flex_main_place)(style, value); + ((void (*)(lv_subject_t *, const char *))lv_subject_set_string)(subject, buf); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_flex_main_place_struct_method_def = { - "lv_style_set_flex_main_place", - (PyCFunction)py_lv_style_set_flex_main_place_struct_method, +static PyMethodDef py_lv_subject_set_string_struct_method_def = { + "lv_subject_set_string", + (PyCFunction)py_lv_subject_set_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83399,29 +96075,29 @@ static PyMethodDef py_lv_style_set_flex_main_place_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_flex_cross_place(lv_style_t *style, lv_flex_align_t value) + * void lv_subject_snprintf(lv_subject_t *subject, const char *format, ...) */ -static PyObject *py_lv_style_set_flex_cross_place_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_snprintf_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_flex_align_t value = (int)mp_obj_get_int(value_py); + PyObject *format_py; + if (!PyArg_ParseTuple(py_args, "O", &format_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + const char *format = (const char *)(char*)convert_from_str(format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_flex_align_t))lv_style_set_flex_cross_place)(style, value); + ((void (*)(lv_subject_t *, const char *, ...))lv_subject_snprintf)(subject, format); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; -} - -static PyMethodDef py_lv_style_set_flex_cross_place_struct_method_def = { - "lv_style_set_flex_cross_place", - (PyCFunction)py_lv_style_set_flex_cross_place_struct_method, +} + +static PyMethodDef py_lv_subject_snprintf_struct_method_def = { + "lv_subject_snprintf", + (PyCFunction)py_lv_subject_snprintf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83429,29 +96105,28 @@ static PyMethodDef py_lv_style_set_flex_cross_place_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_flex_track_place(lv_style_t *style, lv_flex_align_t value) + * const char *lv_subject_get_string(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_flex_track_place_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_flex_align_t value = (int)mp_obj_get_int(value_py); + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_flex_align_t))lv_style_set_flex_track_place)(style, value); + _res = ((const char *(*)(lv_subject_t *))lv_subject_get_string)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_style_set_flex_track_place_struct_method_def = { - "lv_style_set_flex_track_place", - (PyCFunction)py_lv_style_set_flex_track_place_struct_method, +static PyMethodDef py_lv_subject_get_string_struct_method_def = { + "lv_subject_get_string", + (PyCFunction)py_lv_subject_get_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83459,29 +96134,28 @@ static PyMethodDef py_lv_style_set_flex_track_place_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_flex_grow(lv_style_t *style, uint8_t value) + * const char *lv_subject_get_previous_string(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_flex_grow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_previous_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - uint8_t value = (uint8_t)value_val; + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_style_t *, uint8_t))lv_style_set_flex_grow)(style, value); + _res = ((const char *(*)(lv_subject_t *))lv_subject_get_previous_string)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_style_set_flex_grow_struct_method_def = { - "lv_style_set_flex_grow", - (PyCFunction)py_lv_style_set_flex_grow_struct_method, +static PyMethodDef py_lv_subject_get_previous_string_struct_method_def = { + "lv_subject_get_previous_string", + (PyCFunction)py_lv_subject_get_previous_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83489,29 +96163,29 @@ static PyMethodDef py_lv_style_set_flex_grow_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_column_dsc_array(lv_style_t *style, const int32_t *value) + * void lv_subject_init_pointer(lv_subject_t *subject, void *value) */ -static PyObject *py_lv_style_set_grid_column_dsc_array_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_init_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *value_py; if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + void *value = mp_to_ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, const int32_t *))lv_style_set_grid_column_dsc_array)(style, value); + ((void (*)(lv_subject_t *, void *))lv_subject_init_pointer)(subject, value); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_grid_column_dsc_array_struct_method_def = { - "lv_style_set_grid_column_dsc_array", - (PyCFunction)py_lv_style_set_grid_column_dsc_array_struct_method, +static PyMethodDef py_lv_subject_init_pointer_struct_method_def = { + "lv_subject_init_pointer", + (PyCFunction)py_lv_subject_init_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83519,29 +96193,29 @@ static PyMethodDef py_lv_style_set_grid_column_dsc_array_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_column_align(lv_style_t *style, lv_grid_align_t value) + * void lv_subject_set_pointer(lv_subject_t *subject, void *ptr) */ -static PyObject *py_lv_style_set_grid_column_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); + PyObject *ptr_py; + if (!PyArg_ParseTuple(py_args, "O", &ptr_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + void *ptr = mp_to_ptr(ptr_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_column_align)(style, value); + ((void (*)(lv_subject_t *, void *))lv_subject_set_pointer)(subject, ptr); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_grid_column_align_struct_method_def = { - "lv_style_set_grid_column_align", - (PyCFunction)py_lv_style_set_grid_column_align_struct_method, +static PyMethodDef py_lv_subject_set_pointer_struct_method_def = { + "lv_subject_set_pointer", + (PyCFunction)py_lv_subject_set_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83549,29 +96223,28 @@ static PyMethodDef py_lv_style_set_grid_column_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_row_dsc_array(lv_style_t *style, const int32_t *value) + * const void *lv_subject_get_pointer(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_grid_row_dsc_array_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - const int32_t *value = (const int32_t *)mp_array_to_i32ptr(value_py); + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_style_t *, const int32_t *))lv_style_set_grid_row_dsc_array)(style, value); + _res = ((const void *(*)(lv_subject_t *))lv_subject_get_pointer)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_style_set_grid_row_dsc_array_struct_method_def = { - "lv_style_set_grid_row_dsc_array", - (PyCFunction)py_lv_style_set_grid_row_dsc_array_struct_method, +static PyMethodDef py_lv_subject_get_pointer_struct_method_def = { + "lv_subject_get_pointer", + (PyCFunction)py_lv_subject_get_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83579,29 +96252,28 @@ static PyMethodDef py_lv_style_set_grid_row_dsc_array_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_row_align(lv_style_t *style, lv_grid_align_t value) + * const void *lv_subject_get_previous_pointer(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_grid_row_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_previous_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_row_align)(style, value); + _res = ((const void *(*)(lv_subject_t *))lv_subject_get_previous_pointer)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_style_set_grid_row_align_struct_method_def = { - "lv_style_set_grid_row_align", - (PyCFunction)py_lv_style_set_grid_row_align_struct_method, +static PyMethodDef py_lv_subject_get_previous_pointer_struct_method_def = { + "lv_subject_get_previous_pointer", + (PyCFunction)py_lv_subject_get_previous_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83609,29 +96281,29 @@ static PyMethodDef py_lv_style_set_grid_row_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_cell_column_pos(lv_style_t *style, int32_t value) + * void lv_subject_init_color(lv_subject_t *subject, lv_color_t color) */ -static PyObject *py_lv_style_set_grid_cell_column_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_init_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_column_pos)(style, value); + ((void (*)(lv_subject_t *, lv_color_t))lv_subject_init_color)(subject, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_grid_cell_column_pos_struct_method_def = { - "lv_style_set_grid_cell_column_pos", - (PyCFunction)py_lv_style_set_grid_cell_column_pos_struct_method, +static PyMethodDef py_lv_subject_init_color_struct_method_def = { + "lv_subject_init_color", + (PyCFunction)py_lv_subject_init_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83639,29 +96311,29 @@ static PyMethodDef py_lv_style_set_grid_cell_column_pos_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_cell_x_align(lv_style_t *style, lv_grid_align_t value) + * void lv_subject_set_color(lv_subject_t *subject, lv_color_t color) */ -static PyObject *py_lv_style_set_grid_cell_x_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); + PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_color_t color = mp_write_lv_color_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_cell_x_align)(style, value); + ((void (*)(lv_subject_t *, lv_color_t))lv_subject_set_color)(subject, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_grid_cell_x_align_struct_method_def = { - "lv_style_set_grid_cell_x_align", - (PyCFunction)py_lv_style_set_grid_cell_x_align_struct_method, +static PyMethodDef py_lv_subject_set_color_struct_method_def = { + "lv_subject_set_color", + (PyCFunction)py_lv_subject_set_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83669,29 +96341,28 @@ static PyMethodDef py_lv_style_set_grid_cell_x_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_cell_column_span(lv_style_t *style, int32_t value) + * lv_color_t lv_subject_get_color(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_grid_cell_column_span_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_column_span)(style, value); + _res = ((lv_color_t (*)(lv_subject_t *))lv_subject_get_color)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_style_set_grid_cell_column_span_struct_method_def = { - "lv_style_set_grid_cell_column_span", - (PyCFunction)py_lv_style_set_grid_cell_column_span_struct_method, +static PyMethodDef py_lv_subject_get_color_struct_method_def = { + "lv_subject_get_color", + (PyCFunction)py_lv_subject_get_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83699,29 +96370,28 @@ static PyMethodDef py_lv_style_set_grid_cell_column_span_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_cell_row_pos(lv_style_t *style, int32_t value) + * lv_color_t lv_subject_get_previous_color(lv_subject_t *subject) */ -static PyObject *py_lv_style_set_grid_cell_row_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_previous_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_row_pos)(style, value); + _res = ((lv_color_t (*)(lv_subject_t *))lv_subject_get_previous_color)(subject); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_style_set_grid_cell_row_pos_struct_method_def = { - "lv_style_set_grid_cell_row_pos", - (PyCFunction)py_lv_style_set_grid_cell_row_pos_struct_method, +static PyMethodDef py_lv_subject_get_previous_color_struct_method_def = { + "lv_subject_get_previous_color", + (PyCFunction)py_lv_subject_get_previous_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83729,29 +96399,30 @@ static PyMethodDef py_lv_style_set_grid_cell_row_pos_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_cell_y_align(lv_style_t *style, lv_grid_align_t value) + * void lv_subject_init_group(lv_subject_t *group_subject, lv_subject_t *list[], uint32_t list_len) */ -static PyObject *py_lv_style_set_grid_cell_y_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_init_group_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - lv_grid_align_t value = (int)mp_obj_get_int(value_py); + PyObject *list_py; long list_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &list_py, &list_len_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *group_subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_subject_t **list = mp_to_ptr(list_py); + uint32_t list_len = (uint32_t)list_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, lv_grid_align_t))lv_style_set_grid_cell_y_align)(style, value); + ((void (*)(lv_subject_t *, lv_subject_t *[], uint32_t))lv_subject_init_group)(group_subject, list, list_len); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_grid_cell_y_align_struct_method_def = { - "lv_style_set_grid_cell_y_align", - (PyCFunction)py_lv_style_set_grid_cell_y_align_struct_method, +static PyMethodDef py_lv_subject_init_group_struct_method_def = { + "lv_subject_init_group", + (PyCFunction)py_lv_subject_init_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83759,210 +96430,58 @@ static PyMethodDef py_lv_style_set_grid_cell_y_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_style_set_grid_cell_row_span(lv_style_t *style, int32_t value) + * void lv_subject_set_group_list_static(lv_subject_t *subject, lv_subject_t *list[], uint32_t list_len) */ -static PyObject *py_lv_style_set_grid_cell_row_span_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_set_group_list_static_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = (lv_style_t *)mp_write_ptr_lv_style_t(self); - int32_t value = (int32_t)value_val; + PyObject *list_py; long list_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &list_py, &list_len_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_subject_t **list = mp_to_ptr(list_py); + uint32_t list_len = (uint32_t)list_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_t *, int32_t))lv_style_set_grid_cell_row_span)(style, value); + ((void (*)(lv_subject_t *, lv_subject_t *[], uint32_t))lv_subject_set_group_list_static)(subject, list, list_len); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_set_grid_cell_row_span_struct_method_def = { - "lv_style_set_grid_cell_row_span", - (PyCFunction)py_lv_style_set_grid_cell_row_span_struct_method, +static PyMethodDef py_lv_subject_set_group_list_static_struct_method_def = { + "lv_subject_set_group_list_static", + (PyCFunction)py_lv_subject_set_group_list_static_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_style_t_methods[] = { - {"is_const", (PyCFunction)py_lv_style_is_const_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_prop_inlined", (PyCFunction)py_lv_style_get_prop_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_size", (PyCFunction)py_lv_style_set_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_all", (PyCFunction)py_lv_style_set_pad_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_hor", (PyCFunction)py_lv_style_set_pad_hor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_ver", (PyCFunction)py_lv_style_set_pad_ver_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_gap", (PyCFunction)py_lv_style_set_pad_gap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_margin_hor", (PyCFunction)py_lv_style_set_margin_hor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_margin_ver", (PyCFunction)py_lv_style_set_margin_ver_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_margin_all", (PyCFunction)py_lv_style_set_margin_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_scale", (PyCFunction)py_lv_style_set_transform_scale_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_style_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset", (PyCFunction)py_lv_style_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy", (PyCFunction)py_lv_style_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"merge", (PyCFunction)py_lv_style_merge_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_prop", (PyCFunction)py_lv_style_remove_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_prop", (PyCFunction)py_lv_style_set_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_prop", (PyCFunction)py_lv_style_get_prop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_empty", (PyCFunction)py_lv_style_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_width", (PyCFunction)py_lv_style_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_width", (PyCFunction)py_lv_style_set_min_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_width", (PyCFunction)py_lv_style_set_max_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_height", (PyCFunction)py_lv_style_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_height", (PyCFunction)py_lv_style_set_min_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_height", (PyCFunction)py_lv_style_set_max_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_length", (PyCFunction)py_lv_style_set_length_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_x", (PyCFunction)py_lv_style_set_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_y", (PyCFunction)py_lv_style_set_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_align", (PyCFunction)py_lv_style_set_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_width", (PyCFunction)py_lv_style_set_transform_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_height", (PyCFunction)py_lv_style_set_transform_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_translate_x", (PyCFunction)py_lv_style_set_translate_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_translate_y", (PyCFunction)py_lv_style_set_translate_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_translate_radial", (PyCFunction)py_lv_style_set_translate_radial_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_scale_x", (PyCFunction)py_lv_style_set_transform_scale_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_scale_y", (PyCFunction)py_lv_style_set_transform_scale_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_rotation", (PyCFunction)py_lv_style_set_transform_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_pivot_x", (PyCFunction)py_lv_style_set_transform_pivot_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_pivot_y", (PyCFunction)py_lv_style_set_transform_pivot_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_skew_x", (PyCFunction)py_lv_style_set_transform_skew_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transform_skew_y", (PyCFunction)py_lv_style_set_transform_skew_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_top", (PyCFunction)py_lv_style_set_pad_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_bottom", (PyCFunction)py_lv_style_set_pad_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_left", (PyCFunction)py_lv_style_set_pad_left_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_right", (PyCFunction)py_lv_style_set_pad_right_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_row", (PyCFunction)py_lv_style_set_pad_row_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_column", (PyCFunction)py_lv_style_set_pad_column_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pad_radial", (PyCFunction)py_lv_style_set_pad_radial_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_margin_top", (PyCFunction)py_lv_style_set_margin_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_margin_bottom", (PyCFunction)py_lv_style_set_margin_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_margin_left", (PyCFunction)py_lv_style_set_margin_left_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_margin_right", (PyCFunction)py_lv_style_set_margin_right_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_color", (PyCFunction)py_lv_style_set_bg_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_opa", (PyCFunction)py_lv_style_set_bg_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_grad_color", (PyCFunction)py_lv_style_set_bg_grad_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_grad_dir", (PyCFunction)py_lv_style_set_bg_grad_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_main_stop", (PyCFunction)py_lv_style_set_bg_main_stop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_grad_stop", (PyCFunction)py_lv_style_set_bg_grad_stop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_main_opa", (PyCFunction)py_lv_style_set_bg_main_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_grad_opa", (PyCFunction)py_lv_style_set_bg_grad_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_grad", (PyCFunction)py_lv_style_set_bg_grad_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_image_src", (PyCFunction)py_lv_style_set_bg_image_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_image_opa", (PyCFunction)py_lv_style_set_bg_image_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_image_recolor", (PyCFunction)py_lv_style_set_bg_image_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_image_recolor_opa", (PyCFunction)py_lv_style_set_bg_image_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bg_image_tiled", (PyCFunction)py_lv_style_set_bg_image_tiled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_border_color", (PyCFunction)py_lv_style_set_border_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_border_opa", (PyCFunction)py_lv_style_set_border_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_border_width", (PyCFunction)py_lv_style_set_border_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_border_side", (PyCFunction)py_lv_style_set_border_side_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_border_post", (PyCFunction)py_lv_style_set_border_post_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_outline_width", (PyCFunction)py_lv_style_set_outline_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_outline_color", (PyCFunction)py_lv_style_set_outline_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_outline_opa", (PyCFunction)py_lv_style_set_outline_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_outline_pad", (PyCFunction)py_lv_style_set_outline_pad_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shadow_width", (PyCFunction)py_lv_style_set_shadow_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shadow_offset_x", (PyCFunction)py_lv_style_set_shadow_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shadow_offset_y", (PyCFunction)py_lv_style_set_shadow_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shadow_spread", (PyCFunction)py_lv_style_set_shadow_spread_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shadow_color", (PyCFunction)py_lv_style_set_shadow_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_shadow_opa", (PyCFunction)py_lv_style_set_shadow_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_image_opa", (PyCFunction)py_lv_style_set_image_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_image_recolor", (PyCFunction)py_lv_style_set_image_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_image_recolor_opa", (PyCFunction)py_lv_style_set_image_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_image_colorkey", (PyCFunction)py_lv_style_set_image_colorkey_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_line_width", (PyCFunction)py_lv_style_set_line_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_line_dash_width", (PyCFunction)py_lv_style_set_line_dash_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_line_dash_gap", (PyCFunction)py_lv_style_set_line_dash_gap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_line_rounded", (PyCFunction)py_lv_style_set_line_rounded_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_line_color", (PyCFunction)py_lv_style_set_line_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_line_opa", (PyCFunction)py_lv_style_set_line_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_arc_width", (PyCFunction)py_lv_style_set_arc_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_arc_rounded", (PyCFunction)py_lv_style_set_arc_rounded_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_arc_color", (PyCFunction)py_lv_style_set_arc_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_arc_opa", (PyCFunction)py_lv_style_set_arc_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_arc_image_src", (PyCFunction)py_lv_style_set_arc_image_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_color", (PyCFunction)py_lv_style_set_text_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_opa", (PyCFunction)py_lv_style_set_text_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_font", (PyCFunction)py_lv_style_set_text_font_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_letter_space", (PyCFunction)py_lv_style_set_text_letter_space_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_line_space", (PyCFunction)py_lv_style_set_text_line_space_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_decor", (PyCFunction)py_lv_style_set_text_decor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_align", (PyCFunction)py_lv_style_set_text_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_outline_stroke_color", (PyCFunction)py_lv_style_set_text_outline_stroke_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_outline_stroke_width", (PyCFunction)py_lv_style_set_text_outline_stroke_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_outline_stroke_opa", (PyCFunction)py_lv_style_set_text_outline_stroke_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_blur_radius", (PyCFunction)py_lv_style_set_blur_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_blur_backdrop", (PyCFunction)py_lv_style_set_blur_backdrop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_blur_quality", (PyCFunction)py_lv_style_set_blur_quality_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_drop_shadow_radius", (PyCFunction)py_lv_style_set_drop_shadow_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_drop_shadow_offset_x", (PyCFunction)py_lv_style_set_drop_shadow_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_drop_shadow_offset_y", (PyCFunction)py_lv_style_set_drop_shadow_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_drop_shadow_color", (PyCFunction)py_lv_style_set_drop_shadow_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_drop_shadow_opa", (PyCFunction)py_lv_style_set_drop_shadow_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_drop_shadow_quality", (PyCFunction)py_lv_style_set_drop_shadow_quality_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_radius", (PyCFunction)py_lv_style_set_radius_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_radial_offset", (PyCFunction)py_lv_style_set_radial_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_clip_corner", (PyCFunction)py_lv_style_set_clip_corner_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_opa", (PyCFunction)py_lv_style_set_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_opa_layered", (PyCFunction)py_lv_style_set_opa_layered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_color_filter_dsc", (PyCFunction)py_lv_style_set_color_filter_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_color_filter_opa", (PyCFunction)py_lv_style_set_color_filter_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_recolor", (PyCFunction)py_lv_style_set_recolor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_recolor_opa", (PyCFunction)py_lv_style_set_recolor_opa_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_anim", (PyCFunction)py_lv_style_set_anim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_anim_duration", (PyCFunction)py_lv_style_set_anim_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_transition", (PyCFunction)py_lv_style_set_transition_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_blend_mode", (PyCFunction)py_lv_style_set_blend_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_layout", (PyCFunction)py_lv_style_set_layout_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_base_dir", (PyCFunction)py_lv_style_set_base_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bitmap_mask_src", (PyCFunction)py_lv_style_set_bitmap_mask_src_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rotary_sensitivity", (PyCFunction)py_lv_style_set_rotary_sensitivity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_flow", (PyCFunction)py_lv_style_set_flex_flow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_main_place", (PyCFunction)py_lv_style_set_flex_main_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_cross_place", (PyCFunction)py_lv_style_set_flex_cross_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_track_place", (PyCFunction)py_lv_style_set_flex_track_place_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flex_grow", (PyCFunction)py_lv_style_set_flex_grow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_column_dsc_array", (PyCFunction)py_lv_style_set_grid_column_dsc_array_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_column_align", (PyCFunction)py_lv_style_set_grid_column_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_row_dsc_array", (PyCFunction)py_lv_style_set_grid_row_dsc_array_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_row_align", (PyCFunction)py_lv_style_set_grid_row_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_cell_column_pos", (PyCFunction)py_lv_style_set_grid_cell_column_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_cell_x_align", (PyCFunction)py_lv_style_set_grid_cell_x_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_cell_column_span", (PyCFunction)py_lv_style_set_grid_cell_column_span_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_cell_row_pos", (PyCFunction)py_lv_style_set_grid_cell_row_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_cell_y_align", (PyCFunction)py_lv_style_set_grid_cell_y_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_grid_cell_row_span", (PyCFunction)py_lv_style_set_grid_cell_row_span_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_style_value_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_observer_remove(lv_observer_t *observer) + * void lv_subject_deinit(lv_subject_t *subject) */ -static PyObject *py_lv_observer_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_deinit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_observer_t *))lv_observer_remove)(observer); + ((void (*)(lv_subject_t *))lv_subject_deinit)(subject); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_observer_remove_struct_method_def = { - "lv_observer_remove", - (PyCFunction)py_lv_observer_remove_struct_method, +static PyMethodDef py_lv_subject_deinit_struct_method_def = { + "lv_subject_deinit", + (PyCFunction)py_lv_subject_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83970,155 +96489,227 @@ static PyMethodDef py_lv_observer_remove_struct_method_def = { /* * lvgl extension definition for: - * void *lv_observer_get_target(lv_observer_t *observer) + * lv_subject_t *lv_subject_get_group_element(lv_subject_t *subject, int32_t index) */ -static PyObject *py_lv_observer_get_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_get_group_element_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + int32_t index = (int32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_subject_t * _res; lvpy_lock(); - _res = ((void *(*)(lv_observer_t *))lv_observer_get_target)(observer); + _res = ((lv_subject_t *(*)(lv_subject_t *, int32_t))lv_subject_get_group_element)(subject, index); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_subject_t((void*)_res); } -static PyMethodDef py_lv_observer_get_target_struct_method_def = { - "lv_observer_get_target", - (PyCFunction)py_lv_observer_get_target_struct_method, +static PyMethodDef py_lv_subject_get_group_element_struct_method_def = { + "lv_subject_get_group_element", + (PyCFunction)py_lv_subject_get_group_element_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_subject_add_observer_observer_cb (CPython) + * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) + */ +static void lv_subject_add_observer_observer_cb_callback(lv_observer_t *arg0, lv_subject_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_subject_add_observer_observer_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_observer_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_subject_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_obj_t *lv_observer_get_target_obj(lv_observer_t *observer) + * lv_observer_t *lv_subject_add_observer(lv_subject_t *subject, lv_observer_cb_t observer_cb, void *user_data) */ -static PyObject *py_lv_observer_get_target_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_add_observer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); + PyObject *observer_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &observer_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *observer_cb = mp_lv_callback(observer_cb_py, &lv_subject_add_observer_observer_cb_callback, "lv_subject_add_observer_observer_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_observer_t *))lv_observer_get_target_obj)(observer); + _res = ((lv_observer_t *(*)(lv_subject_t *, lv_observer_cb_t, void *))lv_subject_add_observer)(subject, observer_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_observer_get_target_obj_struct_method_def = { - "lv_observer_get_target_obj", - (PyCFunction)py_lv_observer_get_target_obj_struct_method, +static PyMethodDef py_lv_subject_add_observer_struct_method_def = { + "lv_subject_add_observer", + (PyCFunction)py_lv_subject_add_observer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_subject_add_observer_obj_observer_cb (CPython) + * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) + */ +static void lv_subject_add_observer_obj_observer_cb_callback(lv_observer_t *arg0, lv_subject_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_subject_add_observer_obj_observer_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_observer_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_subject_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void *lv_observer_get_user_data(const lv_observer_t *observer) + * lv_observer_t *lv_subject_add_observer_obj(lv_subject_t *subject, lv_observer_cb_t observer_cb, lv_obj_t *obj, void *user_data) */ -static PyObject *py_lv_observer_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_add_observer_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_observer_t *observer = (lv_observer_t *)mp_write_ptr_lv_observer_t(self); + PyObject *observer_cb_py; PyObject *obj_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &observer_cb_py, &obj_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + void *user_data = mp_to_ptr(user_data_py); + lv_obj_t *obj = mp_to_lv(obj_py); + void *observer_cb = mp_lv_callback(observer_cb_py, &lv_subject_add_observer_obj_observer_cb_callback, "lv_subject_add_observer_obj_observer_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_observer_t * _res; lvpy_lock(); - _res = ((void *(*)(const lv_observer_t *))lv_observer_get_user_data)(observer); + _res = ((lv_observer_t *(*)(lv_subject_t *, lv_observer_cb_t, lv_obj_t *, void *))lv_subject_add_observer_obj)(subject, observer_cb, obj, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_observer_get_user_data_struct_method_def = { - "lv_observer_get_user_data", - (PyCFunction)py_lv_observer_get_user_data_struct_method, +static PyMethodDef py_lv_subject_add_observer_obj_struct_method_def = { + "lv_subject_add_observer_obj", + (PyCFunction)py_lv_subject_add_observer_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_observer_t_methods[] = { - {"remove", (PyCFunction)py_lv_observer_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_target", (PyCFunction)py_lv_observer_get_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_target_obj", (PyCFunction)py_lv_observer_get_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_observer_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* - * lvgl extension definition for: - * void lv_subject_init_int(lv_subject_t *subject, int32_t value) + * Callback function lv_subject_add_observer_with_target_observer_cb (CPython) + * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) */ -static PyObject *py_lv_subject_init_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_subject_add_observer_with_target_observer_cb_callback(lv_observer_t *arg0, lv_subject_t *arg1) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - int32_t value = (int32_t)value_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_subject_t *, int32_t))lv_subject_init_int)(subject, value); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_subject_add_observer_with_target_observer_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_observer_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_subject_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_init_int_struct_method_def = { - "lv_subject_init_int", - (PyCFunction)py_lv_subject_init_int_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_subject_set_int(lv_subject_t *subject, int32_t value) + * lv_observer_t *lv_subject_add_observer_with_target(lv_subject_t *subject, lv_observer_cb_t observer_cb, void *target, void *user_data) */ -static PyObject *py_lv_subject_set_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_add_observer_with_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long value_val; - if (!PyArg_ParseTuple(py_args, "l", &value_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *observer_cb_py; PyObject *target_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &observer_cb_py, &target_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - int32_t value = (int32_t)value_val; + void *user_data = mp_to_ptr(user_data_py); + void *target = mp_to_ptr(target_py); + void *observer_cb = mp_lv_callback(observer_cb_py, &lv_subject_add_observer_with_target_observer_cb_callback, "lv_subject_add_observer_with_target_observer_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_observer_t * _res; lvpy_lock(); - ((void (*)(lv_subject_t *, int32_t))lv_subject_set_int)(subject, value); + _res = ((lv_observer_t *(*)(lv_subject_t *, lv_observer_cb_t, void *, void *))lv_subject_add_observer_with_target)(subject, observer_cb, target, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_observer_t((void*)_res); } -static PyMethodDef py_lv_subject_set_int_struct_method_def = { - "lv_subject_set_int", - (PyCFunction)py_lv_subject_set_int_struct_method, +static PyMethodDef py_lv_subject_add_observer_with_target_struct_method_def = { + "lv_subject_add_observer_with_target", + (PyCFunction)py_lv_subject_add_observer_with_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84126,9 +96717,9 @@ static PyMethodDef py_lv_subject_set_int_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_subject_get_int(lv_subject_t *subject) + * void lv_subject_notify(lv_subject_t *subject) */ -static PyObject *py_lv_subject_get_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_notify_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84136,137 +96727,194 @@ static PyObject *py_lv_subject_get_int_struct_method(PyObject *self, PyObject *p lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_subject_t *))lv_subject_get_int)(subject); + ((void (*)(lv_subject_t *))lv_subject_notify)(subject); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_get_int_struct_method_def = { - "lv_subject_get_int", - (PyCFunction)py_lv_subject_get_int_struct_method, +static PyMethodDef py_lv_subject_notify_struct_method_def = { + "lv_subject_notify", + (PyCFunction)py_lv_subject_notify_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_subject_t_methods[] = { + {"delete", (PyCFunction)py_lv_subject_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_int", (PyCFunction)py_lv_subject_init_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_int", (PyCFunction)py_lv_subject_set_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_int", (PyCFunction)py_lv_subject_get_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_previous_int", (PyCFunction)py_lv_subject_get_previous_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_value_int", (PyCFunction)py_lv_subject_set_min_value_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_value_int", (PyCFunction)py_lv_subject_set_max_value_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_float", (PyCFunction)py_lv_subject_init_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_float", (PyCFunction)py_lv_subject_set_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_float", (PyCFunction)py_lv_subject_get_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_previous_float", (PyCFunction)py_lv_subject_get_previous_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_min_value_float", (PyCFunction)py_lv_subject_set_min_value_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_value_float", (PyCFunction)py_lv_subject_set_max_value_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_string", (PyCFunction)py_lv_subject_init_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_string_buffer_static", (PyCFunction)py_lv_subject_set_string_buffer_static_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_string", (PyCFunction)py_lv_subject_set_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"snprintf", (PyCFunction)py_lv_subject_snprintf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_string", (PyCFunction)py_lv_subject_get_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_previous_string", (PyCFunction)py_lv_subject_get_previous_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_pointer", (PyCFunction)py_lv_subject_init_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pointer", (PyCFunction)py_lv_subject_set_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_pointer", (PyCFunction)py_lv_subject_get_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_previous_pointer", (PyCFunction)py_lv_subject_get_previous_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_color", (PyCFunction)py_lv_subject_init_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_color", (PyCFunction)py_lv_subject_set_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_color", (PyCFunction)py_lv_subject_get_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_previous_color", (PyCFunction)py_lv_subject_get_previous_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_group", (PyCFunction)py_lv_subject_init_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_group_list_static", (PyCFunction)py_lv_subject_set_group_list_static_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"deinit", (PyCFunction)py_lv_subject_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_group_element", (PyCFunction)py_lv_subject_get_group_element_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_observer", (PyCFunction)py_lv_subject_add_observer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_observer_obj", (PyCFunction)py_lv_subject_add_observer_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_observer_with_target", (PyCFunction)py_lv_subject_add_observer_with_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"notify", (PyCFunction)py_lv_subject_notify_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_subject_value_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * int32_t lv_subject_get_previous_int(lv_subject_t *subject) + * void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t *dsc) */ -static PyObject *py_lv_subject_get_previous_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_rect_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_draw_rect_dsc_t *dsc = (lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_subject_t *))lv_subject_get_previous_int)(subject); + ((void (*)(lv_draw_rect_dsc_t *))lv_draw_rect_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_get_previous_int_struct_method_def = { - "lv_subject_get_previous_int", - (PyCFunction)py_lv_subject_get_previous_int_struct_method, +static PyMethodDef py_lv_draw_rect_dsc_init_struct_method_def = { + "lv_draw_rect_dsc_init", + (PyCFunction)py_lv_draw_rect_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_rect_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_rect_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_dsc_base_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_subject_set_min_value_int(lv_subject_t *subject, int32_t min_value) + * void lv_draw_label_dsc_init(lv_draw_label_dsc_t *dsc) */ -static PyObject *py_lv_subject_set_min_value_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_label_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_value_val; - if (!PyArg_ParseTuple(py_args, "l", &min_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - int32_t min_value = (int32_t)min_value_val; + + lv_draw_label_dsc_t *dsc = (lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, int32_t))lv_subject_set_min_value_int)(subject, min_value); + ((void (*)(lv_draw_label_dsc_t *))lv_draw_label_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_set_min_value_int_struct_method_def = { - "lv_subject_set_min_value_int", - (PyCFunction)py_lv_subject_set_min_value_int_struct_method, +static PyMethodDef py_lv_draw_label_dsc_init_struct_method_def = { + "lv_draw_label_dsc_init", + (PyCFunction)py_lv_draw_label_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_label_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_label_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_label_hint_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_subject_set_max_value_int(lv_subject_t *subject, int32_t max_value) + * void lv_draw_image_dsc_init(lv_draw_image_dsc_t *dsc) */ -static PyObject *py_lv_subject_set_max_value_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_image_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long max_value_val; - if (!PyArg_ParseTuple(py_args, "l", &max_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - int32_t max_value = (int32_t)max_value_val; + + lv_draw_image_dsc_t *dsc = (lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, int32_t))lv_subject_set_max_value_int)(subject, max_value); + ((void (*)(lv_draw_image_dsc_t *))lv_draw_image_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_set_max_value_int_struct_method_def = { - "lv_subject_set_max_value_int", - (PyCFunction)py_lv_subject_set_max_value_int_struct_method, +static PyMethodDef py_lv_draw_image_dsc_init_struct_method_def = { + "lv_draw_image_dsc_init", + (PyCFunction)py_lv_draw_image_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_image_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_image_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_image_sup_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_subject_init_float(lv_subject_t *subject, float value) + * void lv_image_buf_set_palette(lv_image_dsc_t *dsc, uint8_t id, lv_color32_t c) */ -static PyObject *py_lv_subject_init_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_buf_set_palette_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - double value_val; - if (!PyArg_ParseTuple(py_args, "d", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - float value = (float)value_val; + long id_val; PyObject *c_py; + if (!PyArg_ParseTuple(py_args, "lO", &id_val, &c_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_dsc_t *dsc = (lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(self); + uint8_t id = (uint8_t)id_val; + lv_color32_t c = mp_write_lv_color32_t(c_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, float))lv_subject_init_float)(subject, value); + ((void (*)(lv_image_dsc_t *, uint8_t, lv_color32_t))lv_image_buf_set_palette)(dsc, id, c); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_init_float_struct_method_def = { - "lv_subject_init_float", - (PyCFunction)py_lv_subject_init_float_struct_method, +static PyMethodDef py_lv_image_buf_set_palette_struct_method_def = { + "lv_image_buf_set_palette", + (PyCFunction)py_lv_image_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84274,87 +96922,97 @@ static PyMethodDef py_lv_subject_init_float_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_set_float(lv_subject_t *subject, float value) + * void lv_image_buf_free(lv_image_dsc_t *dsc) */ -static PyObject *py_lv_subject_set_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_buf_free_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - double value_val; - if (!PyArg_ParseTuple(py_args, "d", &value_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - float value = (float)value_val; + + lv_image_dsc_t *dsc = (lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, float))lv_subject_set_float)(subject, value); + ((void (*)(lv_image_dsc_t *))lv_image_buf_free)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_set_float_struct_method_def = { - "lv_subject_set_float", - (PyCFunction)py_lv_subject_set_float_struct_method, +static PyMethodDef py_lv_image_buf_free_struct_method_def = { + "lv_image_buf_free", + (PyCFunction)py_lv_image_buf_free_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_image_dsc_t_methods[] = { + {"buf_set_palette", (PyCFunction)py_lv_image_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"buf_free", (PyCFunction)py_lv_image_buf_free_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * float lv_subject_get_float(lv_subject_t *subject) + * void lv_draw_line_dsc_init(lv_draw_line_dsc_t *dsc) */ -static PyObject *py_lv_subject_get_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_line_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_draw_line_dsc_t *dsc = (lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - float _res; lvpy_lock(); - _res = ((float (*)(lv_subject_t *))lv_subject_get_float)(subject); + ((void (*)(lv_draw_line_dsc_t *))lv_draw_line_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_get_float_struct_method_def = { - "lv_subject_get_float", - (PyCFunction)py_lv_subject_get_float_struct_method, +static PyMethodDef py_lv_draw_line_dsc_init_struct_method_def = { + "lv_draw_line_dsc_init", + (PyCFunction)py_lv_draw_line_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_line_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_line_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * float lv_subject_get_previous_float(lv_subject_t *subject) + * lv_point_t lv_point_from_precise(const lv_point_precise_t *p) */ -static PyObject *py_lv_subject_get_previous_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_from_precise_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + const lv_point_precise_t *p = (lv_point_precise_t *)mp_write_ptr_lv_point_precise_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - float _res; + lv_point_t _res; lvpy_lock(); - _res = ((float (*)(lv_subject_t *))lv_subject_get_previous_float)(subject); + _res = ((lv_point_t (*)(const lv_point_precise_t *))lv_point_from_precise)(p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + return mp_read_lv_point_t(_res); } -static PyMethodDef py_lv_subject_get_previous_float_struct_method_def = { - "lv_subject_get_previous_float", - (PyCFunction)py_lv_subject_get_previous_float_struct_method, +static PyMethodDef py_lv_point_from_precise_struct_method_def = { + "lv_point_from_precise", + (PyCFunction)py_lv_point_from_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84362,29 +97020,30 @@ static PyMethodDef py_lv_subject_get_previous_float_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_set_min_value_float(lv_subject_t *subject, float min_value) + * void lv_point_precise_set(lv_point_precise_t *p, lv_value_precise_t x, lv_value_precise_t y) */ -static PyObject *py_lv_subject_set_min_value_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_precise_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - double min_value_val; - if (!PyArg_ParseTuple(py_args, "d", &min_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - float min_value = (float)min_value_val; + PyObject *x_py; PyObject *y_py; + if (!PyArg_ParseTuple(py_args, "OO", &x_py, &y_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_precise_t *p = (lv_point_precise_t *)mp_write_ptr_lv_point_precise_t(self); + lv_value_precise_t x = (float)mp_obj_get_float(x_py); + lv_value_precise_t y = (float)mp_obj_get_float(y_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, float))lv_subject_set_min_value_float)(subject, min_value); + ((void (*)(lv_point_precise_t *, lv_value_precise_t, lv_value_precise_t))lv_point_precise_set)(p, x, y); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_set_min_value_float_struct_method_def = { - "lv_subject_set_min_value_float", - (PyCFunction)py_lv_subject_set_min_value_float_struct_method, +static PyMethodDef py_lv_point_precise_set_struct_method_def = { + "lv_point_precise_set", + (PyCFunction)py_lv_point_precise_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84392,122 +97051,134 @@ static PyMethodDef py_lv_subject_set_min_value_float_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_set_max_value_float(lv_subject_t *subject, float max_value) + * void lv_point_precise_swap(lv_point_precise_t *p1, lv_point_precise_t *p2) */ -static PyObject *py_lv_subject_set_max_value_float_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_point_precise_swap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - double max_value_val; - if (!PyArg_ParseTuple(py_args, "d", &max_value_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - float max_value = (float)max_value_val; + PyObject *p2_py; + if (!PyArg_ParseTuple(py_args, "O", &p2_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_precise_t *p1 = (lv_point_precise_t *)mp_write_ptr_lv_point_precise_t(self); + lv_point_precise_t *p2 = mp_write_ptr_lv_point_precise_t(p2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, float))lv_subject_set_max_value_float)(subject, max_value); + ((void (*)(lv_point_precise_t *, lv_point_precise_t *))lv_point_precise_swap)(p1, p2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_set_max_value_float_struct_method_def = { - "lv_subject_set_max_value_float", - (PyCFunction)py_lv_subject_set_max_value_float_struct_method, +static PyMethodDef py_lv_point_precise_swap_struct_method_def = { + "lv_point_precise_swap", + (PyCFunction)py_lv_point_precise_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_point_precise_t_methods[] = { + {"from_precise", (PyCFunction)py_lv_point_from_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set", (PyCFunction)py_lv_point_precise_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"swap", (PyCFunction)py_lv_point_precise_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_subject_init_string(lv_subject_t *subject, char *buf, char *prev_buf, size_t size, const char *value) + * void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t *dsc) */ -static PyObject *py_lv_subject_init_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_arc_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; PyObject *prev_buf_py; long size_val; PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "OOlO", &buf_py, &prev_buf_py, &size_val, &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - char *buf = (char*)convert_from_str(buf_py); - char *prev_buf = (char*)convert_from_str(prev_buf_py); - size_t size = (size_t)size_val; - const char *value = (const char *)(char*)convert_from_str(value_py); + + lv_draw_arc_dsc_t *dsc = (lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, char *, char *, size_t, const char *))lv_subject_init_string)(subject, buf, prev_buf, size, value); + ((void (*)(lv_draw_arc_dsc_t *))lv_draw_arc_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_init_string_struct_method_def = { - "lv_subject_init_string", - (PyCFunction)py_lv_subject_init_string_struct_method, +static PyMethodDef py_lv_draw_arc_dsc_init_struct_method_def = { + "lv_draw_arc_dsc_init", + (PyCFunction)py_lv_draw_arc_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_arc_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_arc_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_subject_copy_string(lv_subject_t *subject, const char *buf) + * void lv_draw_blur_dsc_init(lv_draw_blur_dsc_t *dsc) */ -static PyObject *py_lv_subject_copy_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_blur_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; - if (!PyArg_ParseTuple(py_args, "O", &buf_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - const char *buf = (const char *)(char*)convert_from_str(buf_py); + + lv_draw_blur_dsc_t *dsc = (lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, const char *))lv_subject_copy_string)(subject, buf); + ((void (*)(lv_draw_blur_dsc_t *))lv_draw_blur_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_copy_string_struct_method_def = { - "lv_subject_copy_string", - (PyCFunction)py_lv_subject_copy_string_struct_method, +static PyMethodDef py_lv_draw_blur_dsc_init_struct_method_def = { + "lv_draw_blur_dsc_init", + (PyCFunction)py_lv_draw_blur_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_blur_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_blur_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_subject_snprintf(lv_subject_t *subject, const char *format, ...) + * void *lv_event_get_target(lv_event_t *e) */ -static PyObject *py_lv_subject_snprintf_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *format_py; - if (!PyArg_ParseTuple(py_args, "O", &format_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - const char *format = (const char *)(char*)convert_from_str(format_py); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_subject_t *, const char *, ...))lv_subject_snprintf)(subject, format); + _res = ((void *(*)(lv_event_t *))lv_event_get_target)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_subject_snprintf_struct_method_def = { - "lv_subject_snprintf", - (PyCFunction)py_lv_subject_snprintf_struct_method, +static PyMethodDef py_lv_event_get_target_struct_method_def = { + "lv_event_get_target", + (PyCFunction)py_lv_event_get_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84515,28 +97186,28 @@ static PyMethodDef py_lv_subject_snprintf_struct_method_def = { /* * lvgl extension definition for: - * const char *lv_subject_get_string(lv_subject_t *subject) + * void *lv_event_get_current_target(lv_event_t *e) */ -static PyObject *py_lv_subject_get_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_current_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + void * _res; lvpy_lock(); - _res = ((const char *(*)(lv_subject_t *))lv_subject_get_string)(subject); + _res = ((void *(*)(lv_event_t *))lv_event_get_current_target)(e); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_subject_get_string_struct_method_def = { - "lv_subject_get_string", - (PyCFunction)py_lv_subject_get_string_struct_method, +static PyMethodDef py_lv_event_get_current_target_struct_method_def = { + "lv_event_get_current_target", + (PyCFunction)py_lv_event_get_current_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84544,28 +97215,28 @@ static PyMethodDef py_lv_subject_get_string_struct_method_def = { /* * lvgl extension definition for: - * const char *lv_subject_get_previous_string(lv_subject_t *subject) + * lv_event_code_t lv_event_get_code(lv_event_t *e) */ -static PyObject *py_lv_subject_get_previous_string_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_code_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_event_code_t _res; lvpy_lock(); - _res = ((const char *(*)(lv_subject_t *))lv_subject_get_previous_string)(subject); + _res = ((lv_event_code_t (*)(lv_event_t *))lv_event_get_code)(e); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_subject_get_previous_string_struct_method_def = { - "lv_subject_get_previous_string", - (PyCFunction)py_lv_subject_get_previous_string_struct_method, +static PyMethodDef py_lv_event_get_code_struct_method_def = { + "lv_event_get_code", + (PyCFunction)py_lv_event_get_code_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84573,29 +97244,28 @@ static PyMethodDef py_lv_subject_get_previous_string_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_init_pointer(lv_subject_t *subject, void *value) + * void *lv_event_get_param(lv_event_t *e) */ -static PyObject *py_lv_subject_init_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_param_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "O", &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - void *value = mp_to_ptr(value_py); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_subject_t *, void *))lv_subject_init_pointer)(subject, value); + _res = ((void *(*)(lv_event_t *))lv_event_get_param)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_subject_init_pointer_struct_method_def = { - "lv_subject_init_pointer", - (PyCFunction)py_lv_subject_init_pointer_struct_method, +static PyMethodDef py_lv_event_get_param_struct_method_def = { + "lv_event_get_param", + (PyCFunction)py_lv_event_get_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84603,29 +97273,28 @@ static PyMethodDef py_lv_subject_init_pointer_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_set_pointer(lv_subject_t *subject, void *ptr) + * void *lv_event_get_user_data(lv_event_t *e) */ -static PyObject *py_lv_subject_set_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ptr_py; - if (!PyArg_ParseTuple(py_args, "O", &ptr_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - void *ptr = mp_to_ptr(ptr_py); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_subject_t *, void *))lv_subject_set_pointer)(subject, ptr); + _res = ((void *(*)(lv_event_t *))lv_event_get_user_data)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_subject_set_pointer_struct_method_def = { - "lv_subject_set_pointer", - (PyCFunction)py_lv_subject_set_pointer_struct_method, +static PyMethodDef py_lv_event_get_user_data_struct_method_def = { + "lv_event_get_user_data", + (PyCFunction)py_lv_event_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84633,28 +97302,27 @@ static PyMethodDef py_lv_subject_set_pointer_struct_method_def = { /* * lvgl extension definition for: - * const void *lv_subject_get_pointer(lv_subject_t *subject) + * void lv_event_stop_bubbling(lv_event_t *e) */ -static PyObject *py_lv_subject_get_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_stop_bubbling_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; lvpy_lock(); - _res = ((const void *(*)(lv_subject_t *))lv_subject_get_pointer)(subject); + ((void (*)(lv_event_t *))lv_event_stop_bubbling)(e); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_get_pointer_struct_method_def = { - "lv_subject_get_pointer", - (PyCFunction)py_lv_subject_get_pointer_struct_method, +static PyMethodDef py_lv_event_stop_bubbling_struct_method_def = { + "lv_event_stop_bubbling", + (PyCFunction)py_lv_event_stop_bubbling_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84662,28 +97330,27 @@ static PyMethodDef py_lv_subject_get_pointer_struct_method_def = { /* * lvgl extension definition for: - * const void *lv_subject_get_previous_pointer(lv_subject_t *subject) + * void lv_event_stop_trickling(lv_event_t *e) */ -static PyObject *py_lv_subject_get_previous_pointer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_stop_trickling_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; lvpy_lock(); - _res = ((const void *(*)(lv_subject_t *))lv_subject_get_previous_pointer)(subject); + ((void (*)(lv_event_t *))lv_event_stop_trickling)(e); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_get_previous_pointer_struct_method_def = { - "lv_subject_get_previous_pointer", - (PyCFunction)py_lv_subject_get_previous_pointer_struct_method, +static PyMethodDef py_lv_event_stop_trickling_struct_method_def = { + "lv_event_stop_trickling", + (PyCFunction)py_lv_event_stop_trickling_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84691,29 +97358,27 @@ static PyMethodDef py_lv_subject_get_previous_pointer_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_init_color(lv_subject_t *subject, lv_color_t color) + * void lv_event_stop_processing(lv_event_t *e) */ -static PyObject *py_lv_subject_init_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_stop_processing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - lv_color_t color = mp_write_lv_color_t(color_py); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, lv_color_t))lv_subject_init_color)(subject, color); + ((void (*)(lv_event_t *))lv_event_stop_processing)(e); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_init_color_struct_method_def = { - "lv_subject_init_color", - (PyCFunction)py_lv_subject_init_color_struct_method, +static PyMethodDef py_lv_event_stop_processing_struct_method_def = { + "lv_event_stop_processing", + (PyCFunction)py_lv_event_stop_processing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84721,29 +97386,27 @@ static PyMethodDef py_lv_subject_init_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_set_color(lv_subject_t *subject, lv_color_t color) + * void lv_event_free_user_data_cb(lv_event_t *e) */ -static PyObject *py_lv_subject_set_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_free_user_data_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "O", &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - lv_color_t color = mp_write_lv_color_t(color_py); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_subject_t *, lv_color_t))lv_subject_set_color)(subject, color); + ((void (*)(lv_event_t *))lv_event_free_user_data_cb)(e); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_set_color_struct_method_def = { - "lv_subject_set_color", - (PyCFunction)py_lv_subject_set_color_struct_method, +static PyMethodDef py_lv_event_free_user_data_cb_struct_method_def = { + "lv_event_free_user_data_cb", + (PyCFunction)py_lv_event_free_user_data_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84751,28 +97414,28 @@ static PyMethodDef py_lv_subject_set_color_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_subject_get_color(lv_subject_t *subject) + * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) */ -static PyObject *py_lv_subject_get_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_invalidated_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_area_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_subject_t *))lv_subject_get_color)(subject); + _res = ((lv_area_t *(*)(lv_event_t *))lv_event_get_invalidated_area)(e); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_area_t((void*)_res); } -static PyMethodDef py_lv_subject_get_color_struct_method_def = { - "lv_subject_get_color", - (PyCFunction)py_lv_subject_get_color_struct_method, +static PyMethodDef py_lv_event_get_invalidated_area_struct_method_def = { + "lv_event_get_invalidated_area", + (PyCFunction)py_lv_event_get_invalidated_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84780,28 +97443,28 @@ static PyMethodDef py_lv_subject_get_color_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_subject_get_previous_color(lv_subject_t *subject) + * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) */ -static PyObject *py_lv_subject_get_previous_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_current_target_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_subject_t *))lv_subject_get_previous_color)(subject); + _res = ((lv_obj_t *(*)(lv_event_t *))lv_event_get_current_target_obj)(e); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_subject_get_previous_color_struct_method_def = { - "lv_subject_get_previous_color", - (PyCFunction)py_lv_subject_get_previous_color_struct_method, +static PyMethodDef py_lv_event_get_current_target_obj_struct_method_def = { + "lv_event_get_current_target_obj", + (PyCFunction)py_lv_event_get_current_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84809,30 +97472,28 @@ static PyMethodDef py_lv_subject_get_previous_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_init_group(lv_subject_t *group_subject, lv_subject_t *list[], uint32_t list_len) + * lv_obj_t *lv_event_get_target_obj(lv_event_t *e) */ -static PyObject *py_lv_subject_init_group_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_target_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *list_py; long list_len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &list_py, &list_len_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *group_subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - lv_subject_t **list = mp_to_ptr(list_py); - uint32_t list_len = (uint32_t)list_len_val; + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_subject_t *, lv_subject_t *[], uint32_t))lv_subject_init_group)(group_subject, list, list_len); + _res = ((lv_obj_t *(*)(lv_event_t *))lv_event_get_target_obj)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_subject_init_group_struct_method_def = { - "lv_subject_init_group", - (PyCFunction)py_lv_subject_init_group_struct_method, +static PyMethodDef py_lv_event_get_target_obj_struct_method_def = { + "lv_event_get_target_obj", + (PyCFunction)py_lv_event_get_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84840,27 +97501,28 @@ static PyMethodDef py_lv_subject_init_group_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_deinit(lv_subject_t *subject) + * lv_indev_t *lv_event_get_indev(lv_event_t *e) */ -static PyObject *py_lv_subject_deinit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_indev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_indev_t * _res; lvpy_lock(); - ((void (*)(lv_subject_t *))lv_subject_deinit)(subject); + _res = ((lv_indev_t *(*)(lv_event_t *))lv_event_get_indev)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_indev_t((void*)_res); } -static PyMethodDef py_lv_subject_deinit_struct_method_def = { - "lv_subject_deinit", - (PyCFunction)py_lv_subject_deinit_struct_method, +static PyMethodDef py_lv_event_get_indev_struct_method_def = { + "lv_event_get_indev", + (PyCFunction)py_lv_event_get_indev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84868,227 +97530,115 @@ static PyMethodDef py_lv_subject_deinit_struct_method_def = { /* * lvgl extension definition for: - * lv_subject_t *lv_subject_get_group_element(lv_subject_t *subject, int32_t index) + * lv_layer_t *lv_event_get_layer(lv_event_t *e) */ -static PyObject *py_lv_subject_get_group_element_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - int32_t index = (int32_t)index_val; + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_subject_t * _res; + lv_layer_t * _res; lvpy_lock(); - _res = ((lv_subject_t *(*)(lv_subject_t *, int32_t))lv_subject_get_group_element)(subject, index); + _res = ((lv_layer_t *(*)(lv_event_t *))lv_event_get_layer)(e); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_subject_t((void*)_res); + return mp_read_ptr_lv_layer_t((void*)_res); } -static PyMethodDef py_lv_subject_get_group_element_struct_method_def = { - "lv_subject_get_group_element", - (PyCFunction)py_lv_subject_get_group_element_struct_method, +static PyMethodDef py_lv_event_get_layer_struct_method_def = { + "lv_event_get_layer", + (PyCFunction)py_lv_event_get_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_subject_add_observer_observer_cb (CPython) - * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) - */ -static void lv_subject_add_observer_observer_cb_callback(lv_observer_t *arg0, lv_subject_t *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_subject_add_observer_observer_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_observer_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_subject_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_observer_t *lv_subject_add_observer(lv_subject_t *subject, lv_observer_cb_t observer_cb, void *user_data) + * const lv_area_t *lv_event_get_old_size(lv_event_t *e) */ -static PyObject *py_lv_subject_add_observer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_old_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *observer_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &observer_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *observer_cb = mp_lv_callback(observer_cb_py, &lv_subject_add_observer_observer_cb_callback, "lv_subject_add_observer_observer_cb", &user_data, NULL, (NULL), (NULL)); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + const lv_area_t * _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_subject_t *, lv_observer_cb_t, void *))lv_subject_add_observer)(subject, observer_cb, user_data); + _res = ((const lv_area_t *(*)(lv_event_t *))lv_event_get_old_size)(e); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return mp_read_ptr_lv_area_t((void*)_res); } -static PyMethodDef py_lv_subject_add_observer_struct_method_def = { - "lv_subject_add_observer", - (PyCFunction)py_lv_subject_add_observer_struct_method, +static PyMethodDef py_lv_event_get_old_size_struct_method_def = { + "lv_event_get_old_size", + (PyCFunction)py_lv_event_get_old_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_subject_add_observer_obj_observer_cb (CPython) - * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) - */ -static void lv_subject_add_observer_obj_observer_cb_callback(lv_observer_t *arg0, lv_subject_t *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_subject_add_observer_obj_observer_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_observer_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_subject_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_observer_t *lv_subject_add_observer_obj(lv_subject_t *subject, lv_observer_cb_t observer_cb, lv_obj_t *obj, void *user_data) + * uint32_t lv_event_get_key(lv_event_t *e) */ -static PyObject *py_lv_subject_add_observer_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_key_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *observer_cb_py; PyObject *obj_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &observer_cb_py, &obj_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - void *user_data = mp_to_ptr(user_data_py); - lv_obj_t *obj = mp_to_lv(obj_py); - void *observer_cb = mp_lv_callback(observer_cb_py, &lv_subject_add_observer_obj_observer_cb_callback, "lv_subject_add_observer_obj_observer_cb", &user_data, NULL, (NULL), (NULL)); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_subject_t *, lv_observer_cb_t, lv_obj_t *, void *))lv_subject_add_observer_obj)(subject, observer_cb, obj, user_data); + _res = ((uint32_t (*)(lv_event_t *))lv_event_get_key)(e); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_subject_add_observer_obj_struct_method_def = { - "lv_subject_add_observer_obj", - (PyCFunction)py_lv_subject_add_observer_obj_struct_method, +static PyMethodDef py_lv_event_get_key_struct_method_def = { + "lv_event_get_key", + (PyCFunction)py_lv_event_get_key_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_subject_add_observer_with_target_observer_cb (CPython) - * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) - */ -static void lv_subject_add_observer_with_target_observer_cb_callback(lv_observer_t *arg0, lv_subject_t *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_subject_add_observer_with_target_observer_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_observer_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_subject_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_observer_t *lv_subject_add_observer_with_target(lv_subject_t *subject, lv_observer_cb_t observer_cb, void *target, void *user_data) + * int32_t lv_event_get_rotary_diff(lv_event_t *e) */ -static PyObject *py_lv_subject_add_observer_with_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_rotary_diff_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *observer_cb_py; PyObject *target_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &observer_cb_py, &target_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *target = mp_to_ptr(target_py); - void *observer_cb = mp_lv_callback(observer_cb_py, &lv_subject_add_observer_with_target_observer_cb_callback, "lv_subject_add_observer_with_target_observer_cb", &user_data, NULL, (NULL), (NULL)); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_observer_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_observer_t *(*)(lv_subject_t *, lv_observer_cb_t, void *, void *))lv_subject_add_observer_with_target)(subject, observer_cb, target, user_data); + _res = ((int32_t (*)(lv_event_t *))lv_event_get_rotary_diff)(e); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_observer_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_subject_add_observer_with_target_struct_method_def = { - "lv_subject_add_observer_with_target", - (PyCFunction)py_lv_subject_add_observer_with_target_struct_method, +static PyMethodDef py_lv_event_get_rotary_diff_struct_method_def = { + "lv_event_get_rotary_diff", + (PyCFunction)py_lv_event_get_rotary_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85096,299 +97646,278 @@ static PyMethodDef py_lv_subject_add_observer_with_target_struct_method_def = { /* * lvgl extension definition for: - * void lv_subject_notify(lv_subject_t *subject) + * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) */ -static PyObject *py_lv_subject_notify_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_scroll_anim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_subject_t *subject = (lv_subject_t *)mp_write_ptr_lv_subject_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_anim_t * _res; lvpy_lock(); - ((void (*)(lv_subject_t *))lv_subject_notify)(subject); + _res = ((lv_anim_t *(*)(lv_event_t *))lv_event_get_scroll_anim)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_anim_t((void*)_res); } -static PyMethodDef py_lv_subject_notify_struct_method_def = { - "lv_subject_notify", - (PyCFunction)py_lv_subject_notify_struct_method, +static PyMethodDef py_lv_event_get_scroll_anim_struct_method_def = { + "lv_event_get_scroll_anim", + (PyCFunction)py_lv_event_get_scroll_anim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_subject_t_methods[] = { - {"init_int", (PyCFunction)py_lv_subject_init_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_int", (PyCFunction)py_lv_subject_set_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_int", (PyCFunction)py_lv_subject_get_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_previous_int", (PyCFunction)py_lv_subject_get_previous_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_value_int", (PyCFunction)py_lv_subject_set_min_value_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_value_int", (PyCFunction)py_lv_subject_set_max_value_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_float", (PyCFunction)py_lv_subject_init_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_float", (PyCFunction)py_lv_subject_set_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_float", (PyCFunction)py_lv_subject_get_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_previous_float", (PyCFunction)py_lv_subject_get_previous_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_min_value_float", (PyCFunction)py_lv_subject_set_min_value_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_value_float", (PyCFunction)py_lv_subject_set_max_value_float_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_string", (PyCFunction)py_lv_subject_init_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy_string", (PyCFunction)py_lv_subject_copy_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"snprintf", (PyCFunction)py_lv_subject_snprintf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_string", (PyCFunction)py_lv_subject_get_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_previous_string", (PyCFunction)py_lv_subject_get_previous_string_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_pointer", (PyCFunction)py_lv_subject_init_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pointer", (PyCFunction)py_lv_subject_set_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_pointer", (PyCFunction)py_lv_subject_get_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_previous_pointer", (PyCFunction)py_lv_subject_get_previous_pointer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_color", (PyCFunction)py_lv_subject_init_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_color", (PyCFunction)py_lv_subject_set_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_color", (PyCFunction)py_lv_subject_get_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_previous_color", (PyCFunction)py_lv_subject_get_previous_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_group", (PyCFunction)py_lv_subject_init_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"deinit", (PyCFunction)py_lv_subject_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_group_element", (PyCFunction)py_lv_subject_get_group_element_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_observer", (PyCFunction)py_lv_subject_add_observer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_observer_obj", (PyCFunction)py_lv_subject_add_observer_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_observer_with_target", (PyCFunction)py_lv_subject_add_observer_with_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"notify", (PyCFunction)py_lv_subject_notify_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_subject_value_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_draw_rect_dsc_init(lv_draw_rect_dsc_t *dsc) + * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) */ -static PyObject *py_lv_draw_rect_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_set_ext_draw_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_rect_dsc_t *dsc = (lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(self); + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + int32_t size = (int32_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_rect_dsc_t *))lv_draw_rect_dsc_init)(dsc); + ((void (*)(lv_event_t *, int32_t))lv_event_set_ext_draw_size)(e, size); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_rect_dsc_init_struct_method_def = { - "lv_draw_rect_dsc_init", - (PyCFunction)py_lv_draw_rect_dsc_init_struct_method, +static PyMethodDef py_lv_event_set_ext_draw_size_struct_method_def = { + "lv_event_set_ext_draw_size", + (PyCFunction)py_lv_event_set_ext_draw_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_rect_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_rect_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_draw_dsc_base_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_draw_label_dsc_init(lv_draw_label_dsc_t *dsc) + * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) */ -static PyObject *py_lv_draw_label_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_self_size_info_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_label_dsc_t *dsc = (lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_point_t * _res; lvpy_lock(); - ((void (*)(lv_draw_label_dsc_t *))lv_draw_label_dsc_init)(dsc); + _res = ((lv_point_t *(*)(lv_event_t *))lv_event_get_self_size_info)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_point_t((void*)_res); } -static PyMethodDef py_lv_draw_label_dsc_init_struct_method_def = { - "lv_draw_label_dsc_init", - (PyCFunction)py_lv_draw_label_dsc_init_struct_method, +static PyMethodDef py_lv_event_get_self_size_info_struct_method_def = { + "lv_event_get_self_size_info", + (PyCFunction)py_lv_event_get_self_size_info_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_label_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_label_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_draw_label_hint_t_methods[] = {{NULL}}; - /* - * lvgl extension definition for: - * void lv_draw_image_dsc_init(lv_draw_image_dsc_t *dsc) + * Struct lv_hit_test_info_t (CPython) */ -static PyObject *py_lv_draw_image_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_hit_test_info_t_methods[]; + +static PyObject *py_lv_hit_test_info_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_hit_test_info_t *data = (lv_hit_test_info_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "point") == 0) return mp_read_ptr_lv_point_t((void*)data->point); + if (strcmp(attr, "res") == 0) return convert_to_bool(data->res); + for (PyMethodDef *m = py_lv_hit_test_info_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} - lv_draw_image_dsc_t *dsc = (lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_draw_image_dsc_t *))lv_draw_image_dsc_init)(dsc); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; +static const char *const py_lv_hit_test_info_t_field_names[] = {"point", "res", NULL}; + +static PyObject *py_lv_hit_test_info_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_hit_test_info_t_field_names, py_lv_hit_test_info_t_methods); +} + +static PyMethodDef py_lv_hit_test_info_t_type_methods[] = { + {"__dir__", py_lv_hit_test_info_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_hit_test_info_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_hit_test_info_t *data = (lv_hit_test_info_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_hit_test_info_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "point") == 0) { data->point = (void*)mp_write_ptr_lv_point_t(value); result = 0; } + if (strcmp(attr, "res") == 0) { data->res = mp_obj_is_true(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_hit_test_info_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_draw_image_dsc_init_struct_method_def = { - "lv_draw_image_dsc_init", - (PyCFunction)py_lv_draw_image_dsc_init_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static PyObject *py_lv_hit_test_info_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_hit_test_info_t)); +} +static void py_lv_hit_test_info_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} -PyMethodDef py_lv_draw_image_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_image_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} +PyTypeObject py_lv_hit_test_info_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_hit_test_info_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_hit_test_info_t_dealloc, + .tp_getattro = (getter)py_lv_hit_test_info_t_getattro, + .tp_setattro = (setter)py_lv_hit_test_info_t_setattro, + .tp_new = py_lv_hit_test_info_t_new, + .tp_methods = py_lv_hit_test_info_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -PyMethodDef py_lv_draw_image_sup_t_methods[] = {{NULL}}; - -/* - * lvgl extension definition for: - * void lv_image_buf_set_palette(lv_image_dsc_t *dsc, uint8_t id, lv_color32_t c) - */ -static PyObject *py_lv_image_buf_set_palette_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_hit_test_info_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long id_val; PyObject *c_py; - if (!PyArg_ParseTuple(py_args, "lO", &id_val, &c_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_dsc_t *dsc = (lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(self); - uint8_t id = (uint8_t)id_val; - lv_color32_t c = mp_write_lv_color32_t(c_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_image_dsc_t *, uint8_t, lv_color32_t))lv_image_buf_set_palette)(dsc, id, c); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_hit_test_info_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_hit_test_info_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_hit_test_info_t*)self->data; } -static PyMethodDef py_lv_image_buf_set_palette_struct_method_def = { - "lv_image_buf_set_palette", - (PyCFunction)py_lv_image_buf_set_palette_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_hit_test_info_t mp_write_scratch_lv_hit_test_info_t; -/* - * lvgl extension definition for: - * void lv_image_buf_free(lv_image_dsc_t *dsc) - */ -static PyObject *py_lv_image_buf_free_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_hit_test_info_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_image_dsc_t *dsc = (lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_image_dsc_t *))lv_image_buf_free)(dsc); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_hit_test_info_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_hit_test_info_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_hit_test_info_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_hit_test_info_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_hit_test_info_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_hit_test_info_t or dict, got None"); + } + memset(&mp_write_scratch_lv_hit_test_info_t, 0, sizeof(lv_hit_test_info_t)); + return &mp_write_scratch_lv_hit_test_info_t; } -static PyMethodDef py_lv_image_buf_free_struct_method_def = { - "lv_image_buf_free", - (PyCFunction)py_lv_image_buf_free_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_write_lv_hit_test_info_t(struct_obj) (*((lv_hit_test_info_t*)mp_write_value_ptr_lv_hit_test_info_t(struct_obj))) +static inline PyObject *mp_read_ptr_lv_hit_test_info_t(void *field) +{ + return lv_to_mp_struct(&py_lv_hit_test_info_t_type, field); +} -PyMethodDef py_lv_image_dsc_t_methods[] = { - {"buf_set_palette", (PyCFunction)py_lv_image_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"buf_free", (PyCFunction)py_lv_image_buf_free_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; +#define mp_read_lv_hit_test_info_t(field) lv_to_mp_struct_own(&py_lv_hit_test_info_t_type, copy_buffer(&field, sizeof(lv_hit_test_info_t))) +#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) /* * lvgl extension definition for: - * void lv_draw_line_dsc_init(lv_draw_line_dsc_t *dsc) + * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) */ -static PyObject *py_lv_draw_line_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_hit_test_info_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_line_dsc_t *dsc = (lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_hit_test_info_t * _res; lvpy_lock(); - ((void (*)(lv_draw_line_dsc_t *))lv_draw_line_dsc_init)(dsc); + _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_event_get_hit_test_info)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_hit_test_info_t((void*)_res); } -static PyMethodDef py_lv_draw_line_dsc_init_struct_method_def = { - "lv_draw_line_dsc_init", - (PyCFunction)py_lv_draw_line_dsc_init_struct_method, +static PyMethodDef py_lv_event_get_hit_test_info_struct_method_def = { + "lv_event_get_hit_test_info", + (PyCFunction)py_lv_event_get_hit_test_info_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_line_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_line_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_point_t lv_point_from_precise(const lv_point_precise_t *p) + * const lv_area_t *lv_event_get_cover_area(lv_event_t *e) */ -static PyObject *py_lv_point_from_precise_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_cover_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_point_precise_t *p = (lv_point_precise_t *)mp_write_ptr_lv_point_precise_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_point_t _res; + const lv_area_t * _res; lvpy_lock(); - _res = ((lv_point_t (*)(const lv_point_precise_t *))lv_point_from_precise)(p); + _res = ((const lv_area_t *(*)(lv_event_t *))lv_event_get_cover_area)(e); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_point_t(_res); + return mp_read_ptr_lv_area_t((void*)_res); } -static PyMethodDef py_lv_point_from_precise_struct_method_def = { - "lv_point_from_precise", - (PyCFunction)py_lv_point_from_precise_struct_method, +static PyMethodDef py_lv_event_get_cover_area_struct_method_def = { + "lv_event_get_cover_area", + (PyCFunction)py_lv_event_get_cover_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85396,30 +97925,29 @@ static PyMethodDef py_lv_point_from_precise_struct_method_def = { /* * lvgl extension definition for: - * void lv_point_precise_set(lv_point_precise_t *p, lv_value_precise_t x, lv_value_precise_t y) + * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) */ -static PyObject *py_lv_point_precise_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_set_cover_res_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *x_py; PyObject *y_py; - if (!PyArg_ParseTuple(py_args, "OO", &x_py, &y_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_precise_t *p = (lv_point_precise_t *)mp_write_ptr_lv_point_precise_t(self); - lv_value_precise_t x = (float)mp_obj_get_float(x_py); - lv_value_precise_t y = (float)mp_obj_get_float(y_py); + PyObject *res_py; + if (!PyArg_ParseTuple(py_args, "O", &res_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_cover_res_t res = (int)mp_obj_get_int(res_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_precise_t *, lv_value_precise_t, lv_value_precise_t))lv_point_precise_set)(p, x, y); + ((void (*)(lv_event_t *, lv_cover_res_t))lv_event_set_cover_res)(e, res); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_point_precise_set_struct_method_def = { - "lv_point_precise_set", - (PyCFunction)py_lv_point_precise_set_struct_method, +static PyMethodDef py_lv_event_set_cover_res_struct_method_def = { + "lv_event_set_cover_res", + (PyCFunction)py_lv_event_set_cover_res_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85427,134 +97955,115 @@ static PyMethodDef py_lv_point_precise_set_struct_method_def = { /* * lvgl extension definition for: - * void lv_point_precise_swap(lv_point_precise_t *p1, lv_point_precise_t *p2) + * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) */ -static PyObject *py_lv_point_precise_swap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_draw_task_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *p2_py; - if (!PyArg_ParseTuple(py_args, "O", &p2_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_precise_t *p1 = (lv_point_precise_t *)mp_write_ptr_lv_point_precise_t(self); - lv_point_precise_t *p2 = mp_write_ptr_lv_point_precise_t(p2_py); + + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t * _res; lvpy_lock(); - ((void (*)(lv_point_precise_t *, lv_point_precise_t *))lv_point_precise_swap)(p1, p2); + _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_event_get_draw_task)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_point_precise_swap_struct_method_def = { - "lv_point_precise_swap", - (PyCFunction)py_lv_point_precise_swap_struct_method, +static PyMethodDef py_lv_event_get_draw_task_struct_method_def = { + "lv_event_get_draw_task", + (PyCFunction)py_lv_event_get_draw_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_point_precise_t_methods[] = { - {"from_precise", (PyCFunction)py_lv_point_from_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set", (PyCFunction)py_lv_point_precise_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"swap", (PyCFunction)py_lv_point_precise_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_arc_dsc_init(lv_draw_arc_dsc_t *dsc) + * lv_state_t lv_event_get_prev_state(lv_event_t *e) */ -static PyObject *py_lv_draw_arc_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_prev_state_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_arc_dsc_t *dsc = (lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(self); + lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_state_t _res; lvpy_lock(); - ((void (*)(lv_draw_arc_dsc_t *))lv_draw_arc_dsc_init)(dsc); + _res = ((lv_state_t (*)(lv_event_t *))lv_event_get_prev_state)(e); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_arc_dsc_init_struct_method_def = { - "lv_draw_arc_dsc_init", - (PyCFunction)py_lv_draw_arc_dsc_init_struct_method, +static PyMethodDef py_lv_event_get_prev_state_struct_method_def = { + "lv_event_get_prev_state", + (PyCFunction)py_lv_event_get_prev_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_arc_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_arc_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_blur_dsc_init(lv_draw_blur_dsc_t *dsc) + * float lv_event_get_pinch_scale(lv_event_t *gesture_event) */ -static PyObject *py_lv_draw_blur_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_pinch_scale_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_blur_dsc_t *dsc = (lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(self); + lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + float _res; lvpy_lock(); - ((void (*)(lv_draw_blur_dsc_t *))lv_draw_blur_dsc_init)(dsc); + _res = ((float (*)(lv_event_t *))lv_event_get_pinch_scale)(gesture_event); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_draw_blur_dsc_init_struct_method_def = { - "lv_draw_blur_dsc_init", - (PyCFunction)py_lv_draw_blur_dsc_init_struct_method, +static PyMethodDef py_lv_event_get_pinch_scale_struct_method_def = { + "lv_event_get_pinch_scale", + (PyCFunction)py_lv_event_get_pinch_scale_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_blur_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_blur_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void *lv_event_get_target(lv_event_t *e) + * float lv_event_get_rotation(lv_event_t *gesture_event) */ -static PyObject *py_lv_event_get_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + float _res; lvpy_lock(); - _res = ((void *(*)(lv_event_t *))lv_event_get_target)(e); + _res = ((float (*)(lv_event_t *))lv_event_get_rotation)(gesture_event); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_event_get_target_struct_method_def = { - "lv_event_get_target", - (PyCFunction)py_lv_event_get_target_struct_method, +static PyMethodDef py_lv_event_get_rotation_struct_method_def = { + "lv_event_get_rotation", + (PyCFunction)py_lv_event_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85562,28 +98071,28 @@ static PyMethodDef py_lv_event_get_target_struct_method_def = { /* * lvgl extension definition for: - * void *lv_event_get_current_target(lv_event_t *e) + * float lv_event_get_two_fingers_swipe_distance(lv_event_t *gesture_event) */ -static PyObject *py_lv_event_get_current_target_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_two_fingers_swipe_distance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + float _res; lvpy_lock(); - _res = ((void *(*)(lv_event_t *))lv_event_get_current_target)(e); + _res = ((float (*)(lv_event_t *))lv_event_get_two_fingers_swipe_distance)(gesture_event); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_float_from_f(_res); } -static PyMethodDef py_lv_event_get_current_target_struct_method_def = { - "lv_event_get_current_target", - (PyCFunction)py_lv_event_get_current_target_struct_method, +static PyMethodDef py_lv_event_get_two_fingers_swipe_distance_struct_method_def = { + "lv_event_get_two_fingers_swipe_distance", + (PyCFunction)py_lv_event_get_two_fingers_swipe_distance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85591,28 +98100,28 @@ static PyMethodDef py_lv_event_get_current_target_struct_method_def = { /* * lvgl extension definition for: - * lv_event_code_t lv_event_get_code(lv_event_t *e) + * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) */ -static PyObject *py_lv_event_get_code_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_two_fingers_swipe_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_code_t _res; + lv_dir_t _res; lvpy_lock(); - _res = ((lv_event_code_t (*)(lv_event_t *))lv_event_get_code)(e); + _res = ((lv_dir_t (*)(lv_event_t *))lv_event_get_two_fingers_swipe_dir)(gesture_event); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_event_get_code_struct_method_def = { - "lv_event_get_code", - (PyCFunction)py_lv_event_get_code_struct_method, +static PyMethodDef py_lv_event_get_two_fingers_swipe_dir_struct_method_def = { + "lv_event_get_two_fingers_swipe_dir", + (PyCFunction)py_lv_event_get_two_fingers_swipe_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85620,28 +98129,30 @@ static PyMethodDef py_lv_event_get_code_struct_method_def = { /* * lvgl extension definition for: - * void *lv_event_get_param(lv_event_t *e) + * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) */ -static PyObject *py_lv_event_get_param_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_gesture_state_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_indev_gesture_type_t type = (int)mp_obj_get_int(type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_indev_gesture_state_t _res; lvpy_lock(); - _res = ((void *(*)(lv_event_t *))lv_event_get_param)(e); + _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_event_get_gesture_state)(gesture_event, type); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_event_get_param_struct_method_def = { - "lv_event_get_param", - (PyCFunction)py_lv_event_get_param_struct_method, +static PyMethodDef py_lv_event_get_gesture_state_struct_method_def = { + "lv_event_get_gesture_state", + (PyCFunction)py_lv_event_get_gesture_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85649,28 +98160,28 @@ static PyMethodDef py_lv_event_get_param_struct_method_def = { /* * lvgl extension definition for: - * void *lv_event_get_user_data(lv_event_t *e) + * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) */ -static PyObject *py_lv_event_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_gesture_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_indev_gesture_type_t _res; lvpy_lock(); - _res = ((void *(*)(lv_event_t *))lv_event_get_user_data)(e); + _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_event_get_gesture_type)(gesture_event); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_event_get_user_data_struct_method_def = { - "lv_event_get_user_data", - (PyCFunction)py_lv_event_get_user_data_struct_method, +static PyMethodDef py_lv_event_get_gesture_type_struct_method_def = { + "lv_event_get_gesture_type", + (PyCFunction)py_lv_event_get_gesture_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85678,9 +98189,9 @@ static PyMethodDef py_lv_event_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_event_stop_bubbling(lv_event_t *e) + * void lv_event_push(lv_event_t *e) */ -static PyObject *py_lv_event_stop_bubbling_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_push_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -85689,16 +98200,16 @@ static PyObject *py_lv_event_stop_bubbling_struct_method(PyObject *self, PyObjec if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_event_t *))lv_event_stop_bubbling)(e); + ((void (*)(lv_event_t *))lv_event_push)(e); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_event_stop_bubbling_struct_method_def = { - "lv_event_stop_bubbling", - (PyCFunction)py_lv_event_stop_bubbling_struct_method, +static PyMethodDef py_lv_event_push_struct_method_def = { + "lv_event_push", + (PyCFunction)py_lv_event_push_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85706,9 +98217,9 @@ static PyMethodDef py_lv_event_stop_bubbling_struct_method_def = { /* * lvgl extension definition for: - * void lv_event_stop_trickling(lv_event_t *e) + * void lv_event_pop(lv_event_t *e) */ -static PyObject *py_lv_event_stop_trickling_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_pop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -85717,44 +98228,83 @@ static PyObject *py_lv_event_stop_trickling_struct_method(PyObject *self, PyObje if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_event_t *))lv_event_stop_trickling)(e); + ((void (*)(lv_event_t *))lv_event_pop)(e); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_event_stop_trickling_struct_method_def = { - "lv_event_stop_trickling", - (PyCFunction)py_lv_event_stop_trickling_struct_method, +static PyMethodDef py_lv_event_pop_struct_method_def = { + "lv_event_pop", + (PyCFunction)py_lv_event_pop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_event_t_methods[] = { + {"get_target", (PyCFunction)py_lv_event_get_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_current_target", (PyCFunction)py_lv_event_get_current_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_code", (PyCFunction)py_lv_event_get_code_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_param", (PyCFunction)py_lv_event_get_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_event_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"stop_bubbling", (PyCFunction)py_lv_event_stop_bubbling_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"stop_trickling", (PyCFunction)py_lv_event_stop_trickling_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"stop_processing", (PyCFunction)py_lv_event_stop_processing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"free_user_data_cb", (PyCFunction)py_lv_event_free_user_data_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_invalidated_area", (PyCFunction)py_lv_event_get_invalidated_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_current_target_obj", (PyCFunction)py_lv_event_get_current_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_target_obj", (PyCFunction)py_lv_event_get_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_indev", (PyCFunction)py_lv_event_get_indev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer", (PyCFunction)py_lv_event_get_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_old_size", (PyCFunction)py_lv_event_get_old_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_key", (PyCFunction)py_lv_event_get_key_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rotary_diff", (PyCFunction)py_lv_event_get_rotary_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_anim", (PyCFunction)py_lv_event_get_scroll_anim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_ext_draw_size", (PyCFunction)py_lv_event_set_ext_draw_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_self_size_info", (PyCFunction)py_lv_event_get_self_size_info_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_hit_test_info", (PyCFunction)py_lv_event_get_hit_test_info_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cover_area", (PyCFunction)py_lv_event_get_cover_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cover_res", (PyCFunction)py_lv_event_set_cover_res_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_draw_task", (PyCFunction)py_lv_event_get_draw_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_prev_state", (PyCFunction)py_lv_event_get_prev_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_pinch_scale", (PyCFunction)py_lv_event_get_pinch_scale_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rotation", (PyCFunction)py_lv_event_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_two_fingers_swipe_distance", (PyCFunction)py_lv_event_get_two_fingers_swipe_distance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_two_fingers_swipe_dir", (PyCFunction)py_lv_event_get_two_fingers_swipe_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_gesture_state", (PyCFunction)py_lv_event_get_gesture_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_gesture_type", (PyCFunction)py_lv_event_get_gesture_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"push", (PyCFunction)py_lv_event_push_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pop", (PyCFunction)py_lv_event_pop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_event_stop_processing(lv_event_t *e) + * lv_event_cb_t lv_event_dsc_get_cb(lv_event_dsc_t *dsc) */ -static PyObject *py_lv_event_stop_processing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_dsc_get_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_event_dsc_t *dsc = (lv_event_dsc_t *)mp_write_ptr_lv_event_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_event_cb_t _res; lvpy_lock(); - ((void (*)(lv_event_t *))lv_event_stop_processing)(e); + _res = ((lv_event_cb_t (*)(lv_event_dsc_t *))lv_event_dsc_get_cb)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_lv_funcptr_lv_event_cb_t(_res); } -static PyMethodDef py_lv_event_stop_processing_struct_method_def = { - "lv_event_stop_processing", - (PyCFunction)py_lv_event_stop_processing_struct_method, +static PyMethodDef py_lv_event_dsc_get_cb_struct_method_def = { + "lv_event_dsc_get_cb", + (PyCFunction)py_lv_event_dsc_get_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85762,56 +98312,63 @@ static PyMethodDef py_lv_event_stop_processing_struct_method_def = { /* * lvgl extension definition for: - * void lv_event_free_user_data_cb(lv_event_t *e) + * void *lv_event_dsc_get_user_data(lv_event_dsc_t *dsc) */ -static PyObject *py_lv_event_free_user_data_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_dsc_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_event_dsc_t *dsc = (lv_event_dsc_t *)mp_write_ptr_lv_event_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_event_t *))lv_event_free_user_data_cb)(e); + _res = ((void *(*)(lv_event_dsc_t *))lv_event_dsc_get_user_data)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_event_free_user_data_cb_struct_method_def = { - "lv_event_free_user_data_cb", - (PyCFunction)py_lv_event_free_user_data_cb_struct_method, +static PyMethodDef py_lv_event_dsc_get_user_data_struct_method_def = { + "lv_event_dsc_get_user_data", + (PyCFunction)py_lv_event_dsc_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_event_dsc_t_methods[] = { + {"get_cb", (PyCFunction)py_lv_event_dsc_get_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_event_dsc_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) + * void lv_group_delete(lv_group_t *group) */ -static PyObject *py_lv_event_get_invalidated_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_area_t * _res; lvpy_lock(); - _res = ((lv_area_t *(*)(lv_event_t *))lv_event_get_invalidated_area)(e); + ((void (*)(lv_group_t *))lv_group_delete)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_area_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_invalidated_area_struct_method_def = { - "lv_event_get_invalidated_area", - (PyCFunction)py_lv_event_get_invalidated_area_struct_method, +static PyMethodDef py_lv_group_delete_struct_method_def = { + "lv_group_delete", + (PyCFunction)py_lv_group_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85819,28 +98376,27 @@ static PyMethodDef py_lv_event_get_invalidated_area_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) + * void lv_group_set_default(lv_group_t *group) */ -static PyObject *py_lv_event_get_current_target_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_set_default_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_event_t *))lv_event_get_current_target_obj)(e); + ((void (*)(lv_group_t *))lv_group_set_default)(group); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_current_target_obj_struct_method_def = { - "lv_event_get_current_target_obj", - (PyCFunction)py_lv_event_get_current_target_obj_struct_method, +static PyMethodDef py_lv_group_set_default_struct_method_def = { + "lv_group_set_default", + (PyCFunction)py_lv_group_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85848,28 +98404,29 @@ static PyMethodDef py_lv_event_get_current_target_obj_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_event_get_target_obj(lv_event_t *e) + * void lv_group_add_obj(lv_group_t *group, lv_obj_t *obj) */ -static PyObject *py_lv_event_get_target_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_add_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_event_t *))lv_event_get_target_obj)(e); + ((void (*)(lv_group_t *, lv_obj_t *))lv_group_add_obj)(group, obj); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_target_obj_struct_method_def = { - "lv_event_get_target_obj", - (PyCFunction)py_lv_event_get_target_obj_struct_method, +static PyMethodDef py_lv_group_add_obj_struct_method_def = { + "lv_group_add_obj", + (PyCFunction)py_lv_group_add_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85877,28 +98434,27 @@ static PyMethodDef py_lv_event_get_target_obj_struct_method_def = { /* * lvgl extension definition for: - * lv_indev_t *lv_event_get_indev(lv_event_t *e) + * void lv_group_remove_all_objs(lv_group_t *group) */ -static PyObject *py_lv_event_get_indev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_remove_all_objs_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_t * _res; lvpy_lock(); - _res = ((lv_indev_t *(*)(lv_event_t *))lv_event_get_indev)(e); + ((void (*)(lv_group_t *))lv_group_remove_all_objs)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_indev_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_indev_struct_method_def = { - "lv_event_get_indev", - (PyCFunction)py_lv_event_get_indev_struct_method, +static PyMethodDef py_lv_group_remove_all_objs_struct_method_def = { + "lv_group_remove_all_objs", + (PyCFunction)py_lv_group_remove_all_objs_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85906,28 +98462,27 @@ static PyMethodDef py_lv_event_get_indev_struct_method_def = { /* * lvgl extension definition for: - * lv_layer_t *lv_event_get_layer(lv_event_t *e) + * void lv_group_focus_next(lv_group_t *group) */ -static PyObject *py_lv_event_get_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_focus_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_layer_t * _res; lvpy_lock(); - _res = ((lv_layer_t *(*)(lv_event_t *))lv_event_get_layer)(e); + ((void (*)(lv_group_t *))lv_group_focus_next)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_layer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_layer_struct_method_def = { - "lv_event_get_layer", - (PyCFunction)py_lv_event_get_layer_struct_method, +static PyMethodDef py_lv_group_focus_next_struct_method_def = { + "lv_group_focus_next", + (PyCFunction)py_lv_group_focus_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85935,28 +98490,27 @@ static PyMethodDef py_lv_event_get_layer_struct_method_def = { /* * lvgl extension definition for: - * const lv_area_t *lv_event_get_old_size(lv_event_t *e) + * void lv_group_focus_prev(lv_group_t *group) */ -static PyObject *py_lv_event_get_old_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_focus_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_area_t * _res; lvpy_lock(); - _res = ((const lv_area_t *(*)(lv_event_t *))lv_event_get_old_size)(e); + ((void (*)(lv_group_t *))lv_group_focus_prev)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_area_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_old_size_struct_method_def = { - "lv_event_get_old_size", - (PyCFunction)py_lv_event_get_old_size_struct_method, +static PyMethodDef py_lv_group_focus_prev_struct_method_def = { + "lv_group_focus_prev", + (PyCFunction)py_lv_group_focus_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85964,28 +98518,29 @@ static PyMethodDef py_lv_event_get_old_size_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_event_get_key(lv_event_t *e) + * void lv_group_focus_freeze(lv_group_t *group, bool en) */ -static PyObject *py_lv_event_get_key_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_focus_freeze_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_event_t *))lv_event_get_key)(e); + ((void (*)(lv_group_t *, bool))lv_group_focus_freeze)(group, en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_key_struct_method_def = { - "lv_event_get_key", - (PyCFunction)py_lv_event_get_key_struct_method, +static PyMethodDef py_lv_group_focus_freeze_struct_method_def = { + "lv_group_focus_freeze", + (PyCFunction)py_lv_group_focus_freeze_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85993,87 +98548,154 @@ static PyMethodDef py_lv_event_get_key_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_event_get_rotary_diff(lv_event_t *e) + * lv_result_t lv_group_send_data(lv_group_t *group, uint32_t c) */ -static PyObject *py_lv_event_get_rotary_diff_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_send_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + uint32_t c = (uint32_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_event_t *))lv_event_get_rotary_diff)(e); + _res = ((lv_result_t (*)(lv_group_t *, uint32_t))lv_group_send_data)(group, c); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_event_get_rotary_diff_struct_method_def = { - "lv_event_get_rotary_diff", - (PyCFunction)py_lv_event_get_rotary_diff_struct_method, +static PyMethodDef py_lv_group_send_data_struct_method_def = { + "lv_group_send_data", + (PyCFunction)py_lv_group_send_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_group_t_focus_cb (CPython) + * void lv_group_focus_cb_t(lv_group_t *) + */ +static void lv_group_t_focus_cb_callback(lv_group_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_group_t_focus_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_group_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) + * void lv_group_set_focus_cb(lv_group_t *group, lv_group_focus_cb_t focus_cb) */ -static PyObject *py_lv_event_get_scroll_anim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_set_focus_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + PyObject *focus_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &focus_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + void *focus_cb = mp_lv_callback(focus_cb_py, &lv_group_t_focus_cb_callback, "lv_group_t_focus_cb", &group->user_data, group, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(lv_event_t *))lv_event_get_scroll_anim)(e); + ((void (*)(lv_group_t *, lv_group_focus_cb_t))lv_group_set_focus_cb)(group, focus_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_scroll_anim_struct_method_def = { - "lv_event_get_scroll_anim", - (PyCFunction)py_lv_event_get_scroll_anim_struct_method, +static PyMethodDef py_lv_group_set_focus_cb_struct_method_def = { + "lv_group_set_focus_cb", + (PyCFunction)py_lv_group_set_focus_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_group_t_edge_cb (CPython) + * void lv_group_edge_cb_t(lv_group_t *, bool) + */ +static void lv_group_t_edge_cb_callback(lv_group_t *arg0, bool arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_group_t_edge_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_group_t((void*)arg0); + PyObject *py_arg1 = convert_to_bool(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) + * void lv_group_set_edge_cb(lv_group_t *group, lv_group_edge_cb_t edge_cb) */ -static PyObject *py_lv_event_set_ext_draw_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_set_edge_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); - int32_t size = (int32_t)size_val; + PyObject *edge_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &edge_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + void *edge_cb = mp_lv_callback(edge_cb_py, &lv_group_t_edge_cb_callback, "lv_group_t_edge_cb", &group->user_data, group, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_event_t *, int32_t))lv_event_set_ext_draw_size)(e, size); + ((void (*)(lv_group_t *, lv_group_edge_cb_t))lv_group_set_edge_cb)(group, edge_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_event_set_ext_draw_size_struct_method_def = { - "lv_event_set_ext_draw_size", - (PyCFunction)py_lv_event_set_ext_draw_size_struct_method, +static PyMethodDef py_lv_group_set_edge_cb_struct_method_def = { + "lv_group_set_edge_cb", + (PyCFunction)py_lv_group_set_edge_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86081,190 +98703,59 @@ static PyMethodDef py_lv_event_set_ext_draw_size_struct_method_def = { /* * lvgl extension definition for: - * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) + * void lv_group_set_refocus_policy(lv_group_t *group, lv_group_refocus_policy_t policy) */ -static PyObject *py_lv_event_get_self_size_info_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_set_refocus_policy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + PyObject *policy_py; + if (!PyArg_ParseTuple(py_args, "O", &policy_py)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + lv_group_refocus_policy_t policy = (int)mp_obj_get_int(policy_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_point_t * _res; lvpy_lock(); - _res = ((lv_point_t *(*)(lv_event_t *))lv_event_get_self_size_info)(e); + ((void (*)(lv_group_t *, lv_group_refocus_policy_t))lv_group_set_refocus_policy)(group, policy); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_point_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_self_size_info_struct_method_def = { - "lv_event_get_self_size_info", - (PyCFunction)py_lv_event_get_self_size_info_struct_method, +static PyMethodDef py_lv_group_set_refocus_policy_struct_method_def = { + "lv_group_set_refocus_policy", + (PyCFunction)py_lv_group_set_refocus_policy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Struct lv_hit_test_info_t (CPython) - */ - -extern PyMethodDef py_lv_hit_test_info_t_methods[]; - -static PyObject *py_lv_hit_test_info_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_hit_test_info_t *data = (lv_hit_test_info_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "point") == 0) return mp_read_ptr_lv_point_t((void*)data->point); - if (strcmp(attr, "res") == 0) return convert_to_bool(data->res); - for (PyMethodDef *m = py_lv_hit_test_info_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_hit_test_info_t_field_names[] = {"point", "res", NULL}; - -static PyObject *py_lv_hit_test_info_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_hit_test_info_t_field_names, py_lv_hit_test_info_t_methods); -} - -static PyMethodDef py_lv_hit_test_info_t_type_methods[] = { - {"__dir__", py_lv_hit_test_info_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_hit_test_info_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_hit_test_info_t *data = (lv_hit_test_info_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_hit_test_info_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "point") == 0) { data->point = (void*)mp_write_ptr_lv_point_t(value); result = 0; } - if (strcmp(attr, "res") == 0) { data->res = mp_obj_is_true(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_hit_test_info_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_hit_test_info_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_hit_test_info_t)); -} - -static void py_lv_hit_test_info_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_hit_test_info_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_hit_test_info_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_hit_test_info_t_dealloc, - .tp_getattro = (getter)py_lv_hit_test_info_t_getattro, - .tp_setattro = (setter)py_lv_hit_test_info_t_setattro, - .tp_new = py_lv_hit_test_info_t_new, - .tp_methods = py_lv_hit_test_info_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_hit_test_info_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_hit_test_info_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_hit_test_info_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_hit_test_info_t*)self->data; -} - -static lv_hit_test_info_t mp_write_scratch_lv_hit_test_info_t; - -static inline void* mp_write_value_ptr_lv_hit_test_info_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_hit_test_info_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_hit_test_info_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_hit_test_info_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_hit_test_info_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_hit_test_info_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_hit_test_info_t or dict, got None"); - } - memset(&mp_write_scratch_lv_hit_test_info_t, 0, sizeof(lv_hit_test_info_t)); - return &mp_write_scratch_lv_hit_test_info_t; -} - -#define mp_write_lv_hit_test_info_t(struct_obj) (*((lv_hit_test_info_t*)mp_write_value_ptr_lv_hit_test_info_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_hit_test_info_t(void *field) -{ - return lv_to_mp_struct(&py_lv_hit_test_info_t_type, field); -} - -#define mp_read_lv_hit_test_info_t(field) lv_to_mp_struct_own(&py_lv_hit_test_info_t_type, copy_buffer(&field, sizeof(lv_hit_test_info_t))) -#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) - - /* * lvgl extension definition for: - * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) + * void lv_group_set_editing(lv_group_t *group, bool edit) */ -static PyObject *py_lv_event_get_hit_test_info_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_set_editing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + long edit_val; + if (!PyArg_ParseTuple(py_args, "l", &edit_val)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + bool edit = (edit_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_hit_test_info_t * _res; lvpy_lock(); - _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_event_get_hit_test_info)(e); + ((void (*)(lv_group_t *, bool))lv_group_set_editing)(group, edit); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_hit_test_info_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_hit_test_info_struct_method_def = { - "lv_event_get_hit_test_info", - (PyCFunction)py_lv_event_get_hit_test_info_struct_method, +static PyMethodDef py_lv_group_set_editing_struct_method_def = { + "lv_group_set_editing", + (PyCFunction)py_lv_group_set_editing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86272,28 +98763,29 @@ static PyMethodDef py_lv_event_get_hit_test_info_struct_method_def = { /* * lvgl extension definition for: - * const lv_area_t *lv_event_get_cover_area(lv_event_t *e) + * void lv_group_set_wrap(lv_group_t *group, bool en) */ -static PyObject *py_lv_event_get_cover_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_set_wrap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_area_t * _res; lvpy_lock(); - _res = ((const lv_area_t *(*)(lv_event_t *))lv_event_get_cover_area)(e); + ((void (*)(lv_group_t *, bool))lv_group_set_wrap)(group, en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_area_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_cover_area_struct_method_def = { - "lv_event_get_cover_area", - (PyCFunction)py_lv_event_get_cover_area_struct_method, +static PyMethodDef py_lv_group_set_wrap_struct_method_def = { + "lv_group_set_wrap", + (PyCFunction)py_lv_group_set_wrap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86301,29 +98793,28 @@ static PyMethodDef py_lv_event_get_cover_area_struct_method_def = { /* * lvgl extension definition for: - * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) + * lv_obj_t *lv_group_get_focused(const lv_group_t *group) */ -static PyObject *py_lv_event_set_cover_res_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_focused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *res_py; - if (!PyArg_ParseTuple(py_args, "O", &res_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); - lv_cover_res_t res = (int)mp_obj_get_int(res_py); + + const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_event_t *, lv_cover_res_t))lv_event_set_cover_res)(e, res); + _res = ((lv_obj_t *(*)(const lv_group_t *))lv_group_get_focused)(group); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_event_set_cover_res_struct_method_def = { - "lv_event_set_cover_res", - (PyCFunction)py_lv_event_set_cover_res_struct_method, +static PyMethodDef py_lv_group_get_focused_struct_method_def = { + "lv_group_get_focused", + (PyCFunction)py_lv_group_get_focused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86331,28 +98822,28 @@ static PyMethodDef py_lv_event_set_cover_res_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) + * lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t *group) */ -static PyObject *py_lv_event_get_draw_task_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_focus_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t * _res; + lv_group_focus_cb_t _res; lvpy_lock(); - _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_event_get_draw_task)(e); + _res = ((lv_group_focus_cb_t (*)(const lv_group_t *))lv_group_get_focus_cb)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_task_t((void*)_res); + return mp_lv_funcptr_lv_group_focus_cb_t(_res); } -static PyMethodDef py_lv_event_get_draw_task_struct_method_def = { - "lv_event_get_draw_task", - (PyCFunction)py_lv_event_get_draw_task_struct_method, +static PyMethodDef py_lv_group_get_focus_cb_struct_method_def = { + "lv_group_get_focus_cb", + (PyCFunction)py_lv_group_get_focus_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86360,28 +98851,28 @@ static PyMethodDef py_lv_event_get_draw_task_struct_method_def = { /* * lvgl extension definition for: - * lv_state_t lv_event_get_prev_state(lv_event_t *e) + * lv_group_edge_cb_t lv_group_get_edge_cb(const lv_group_t *group) */ -static PyObject *py_lv_event_get_prev_state_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_edge_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_state_t _res; + lv_group_edge_cb_t _res; lvpy_lock(); - _res = ((lv_state_t (*)(lv_event_t *))lv_event_get_prev_state)(e); + _res = ((lv_group_edge_cb_t (*)(const lv_group_t *))lv_group_get_edge_cb)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_lv_funcptr_lv_group_edge_cb_t(_res); } -static PyMethodDef py_lv_event_get_prev_state_struct_method_def = { - "lv_event_get_prev_state", - (PyCFunction)py_lv_event_get_prev_state_struct_method, +static PyMethodDef py_lv_group_get_edge_cb_struct_method_def = { + "lv_group_get_edge_cb", + (PyCFunction)py_lv_group_get_edge_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86389,28 +98880,28 @@ static PyMethodDef py_lv_event_get_prev_state_struct_method_def = { /* * lvgl extension definition for: - * float lv_event_get_pinch_scale(lv_event_t *gesture_event) + * bool lv_group_get_editing(const lv_group_t *group) */ -static PyObject *py_lv_event_get_pinch_scale_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_editing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); + const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - float _res; + bool _res; lvpy_lock(); - _res = ((float (*)(lv_event_t *))lv_event_get_pinch_scale)(gesture_event); + _res = ((bool (*)(const lv_group_t *))lv_group_get_editing)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_event_get_pinch_scale_struct_method_def = { - "lv_event_get_pinch_scale", - (PyCFunction)py_lv_event_get_pinch_scale_struct_method, +static PyMethodDef py_lv_group_get_editing_struct_method_def = { + "lv_group_get_editing", + (PyCFunction)py_lv_group_get_editing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86418,28 +98909,28 @@ static PyMethodDef py_lv_event_get_pinch_scale_struct_method_def = { /* * lvgl extension definition for: - * float lv_event_get_rotation(lv_event_t *gesture_event) + * bool lv_group_get_wrap(lv_group_t *group) */ -static PyObject *py_lv_event_get_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_wrap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - float _res; + bool _res; lvpy_lock(); - _res = ((float (*)(lv_event_t *))lv_event_get_rotation)(gesture_event); + _res = ((bool (*)(lv_group_t *))lv_group_get_wrap)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_event_get_rotation_struct_method_def = { - "lv_event_get_rotation", - (PyCFunction)py_lv_event_get_rotation_struct_method, +static PyMethodDef py_lv_group_get_wrap_struct_method_def = { + "lv_group_get_wrap", + (PyCFunction)py_lv_group_get_wrap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86447,28 +98938,28 @@ static PyMethodDef py_lv_event_get_rotation_struct_method_def = { /* * lvgl extension definition for: - * float lv_event_get_two_fingers_swipe_distance(lv_event_t *gesture_event) + * uint32_t lv_group_get_obj_count(lv_group_t *group) */ -static PyObject *py_lv_event_get_two_fingers_swipe_distance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_obj_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - float _res; + uint32_t _res; lvpy_lock(); - _res = ((float (*)(lv_event_t *))lv_event_get_two_fingers_swipe_distance)(gesture_event); + _res = ((uint32_t (*)(lv_group_t *))lv_group_get_obj_count)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_float_from_f(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_event_get_two_fingers_swipe_distance_struct_method_def = { - "lv_event_get_two_fingers_swipe_distance", - (PyCFunction)py_lv_event_get_two_fingers_swipe_distance_struct_method, +static PyMethodDef py_lv_group_get_obj_count_struct_method_def = { + "lv_group_get_obj_count", + (PyCFunction)py_lv_group_get_obj_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86476,28 +98967,30 @@ static PyMethodDef py_lv_event_get_two_fingers_swipe_distance_struct_method_def /* * lvgl extension definition for: - * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) + * lv_obj_t *lv_group_get_obj_by_index(lv_group_t *group, uint32_t index) */ -static PyObject *py_lv_event_get_two_fingers_swipe_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_obj_by_index_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_dir_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_dir_t (*)(lv_event_t *))lv_event_get_two_fingers_swipe_dir)(gesture_event); + _res = ((lv_obj_t *(*)(lv_group_t *, uint32_t))lv_group_get_obj_by_index)(group, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_event_get_two_fingers_swipe_dir_struct_method_def = { - "lv_event_get_two_fingers_swipe_dir", - (PyCFunction)py_lv_event_get_two_fingers_swipe_dir_struct_method, +static PyMethodDef py_lv_group_get_obj_by_index_struct_method_def = { + "lv_group_get_obj_by_index", + (PyCFunction)py_lv_group_get_obj_by_index_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86505,30 +98998,29 @@ static PyMethodDef py_lv_event_get_two_fingers_swipe_dir_struct_method_def = { /* * lvgl extension definition for: - * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) + * void lv_group_set_user_data(lv_group_t *group, void *user_data) */ -static PyObject *py_lv_event_get_gesture_state_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *type_py; - if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); - lv_indev_gesture_type_t type = (int)mp_obj_get_int(type_py); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_gesture_state_t _res; lvpy_lock(); - _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_event_get_gesture_state)(gesture_event, type); + ((void (*)(lv_group_t *, void *))lv_group_set_user_data)(group, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_gesture_state_struct_method_def = { - "lv_event_get_gesture_state", - (PyCFunction)py_lv_event_get_gesture_state_struct_method, +static PyMethodDef py_lv_group_set_user_data_struct_method_def = { + "lv_group_set_user_data", + (PyCFunction)py_lv_group_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86536,56 +99028,84 @@ static PyMethodDef py_lv_event_get_gesture_state_struct_method_def = { /* * lvgl extension definition for: - * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) + * void *lv_group_get_user_data(const lv_group_t *group) */ -static PyObject *py_lv_event_get_gesture_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *gesture_event = (lv_event_t *)mp_write_ptr_lv_event_t(self); + const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_gesture_type_t _res; + void * _res; lvpy_lock(); - _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_event_get_gesture_type)(gesture_event); + _res = ((void *(*)(const lv_group_t *))lv_group_get_user_data)(group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_event_get_gesture_type_struct_method_def = { - "lv_event_get_gesture_type", - (PyCFunction)py_lv_event_get_gesture_type_struct_method, +static PyMethodDef py_lv_group_get_user_data_struct_method_def = { + "lv_group_get_user_data", + (PyCFunction)py_lv_group_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_group_t_methods[] = { + {"delete", (PyCFunction)py_lv_group_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_default", (PyCFunction)py_lv_group_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_obj", (PyCFunction)py_lv_group_add_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_all_objs", (PyCFunction)py_lv_group_remove_all_objs_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"focus_next", (PyCFunction)py_lv_group_focus_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"focus_prev", (PyCFunction)py_lv_group_focus_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"focus_freeze", (PyCFunction)py_lv_group_focus_freeze_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"send_data", (PyCFunction)py_lv_group_send_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_focus_cb", (PyCFunction)py_lv_group_set_focus_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_edge_cb", (PyCFunction)py_lv_group_set_edge_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_refocus_policy", (PyCFunction)py_lv_group_set_refocus_policy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_editing", (PyCFunction)py_lv_group_set_editing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_wrap", (PyCFunction)py_lv_group_set_wrap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_focused", (PyCFunction)py_lv_group_get_focused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_focus_cb", (PyCFunction)py_lv_group_get_focus_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_edge_cb", (PyCFunction)py_lv_group_get_edge_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_editing", (PyCFunction)py_lv_group_get_editing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_wrap", (PyCFunction)py_lv_group_get_wrap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_obj_count", (PyCFunction)py_lv_group_get_obj_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_obj_by_index", (PyCFunction)py_lv_group_get_obj_by_index_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_group_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_group_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_delete_dsc_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_event_push(lv_event_t *e) + * void lv_anim_timeline_delete(lv_anim_timeline_t *at) */ -static PyObject *py_lv_event_push_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_event_t *))lv_event_push)(e); + ((void (*)(lv_anim_timeline_t *))lv_anim_timeline_delete)(at); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_event_push_struct_method_def = { - "lv_event_push", - (PyCFunction)py_lv_event_push_struct_method, +static PyMethodDef py_lv_anim_timeline_delete_struct_method_def = { + "lv_anim_timeline_delete", + (PyCFunction)py_lv_anim_timeline_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86593,94 +99113,59 @@ static PyMethodDef py_lv_event_push_struct_method_def = { /* * lvgl extension definition for: - * void lv_event_pop(lv_event_t *e) + * void lv_anim_timeline_add(lv_anim_timeline_t *at, uint32_t start_time, const lv_anim_t *a) */ -static PyObject *py_lv_event_pop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_t *e = (lv_event_t *)mp_write_ptr_lv_event_t(self); + long start_time_val; PyObject *a_py; + if (!PyArg_ParseTuple(py_args, "lO", &start_time_val, &a_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + uint32_t start_time = (uint32_t)start_time_val; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(a_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_event_t *))lv_event_pop)(e); + ((void (*)(lv_anim_timeline_t *, uint32_t, const lv_anim_t *))lv_anim_timeline_add)(at, start_time, a); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_event_pop_struct_method_def = { - "lv_event_pop", - (PyCFunction)py_lv_event_pop_struct_method, +static PyMethodDef py_lv_anim_timeline_add_struct_method_def = { + "lv_anim_timeline_add", + (PyCFunction)py_lv_anim_timeline_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_event_t_methods[] = { - {"get_target", (PyCFunction)py_lv_event_get_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_current_target", (PyCFunction)py_lv_event_get_current_target_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_code", (PyCFunction)py_lv_event_get_code_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_param", (PyCFunction)py_lv_event_get_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_event_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"stop_bubbling", (PyCFunction)py_lv_event_stop_bubbling_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"stop_trickling", (PyCFunction)py_lv_event_stop_trickling_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"stop_processing", (PyCFunction)py_lv_event_stop_processing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"free_user_data_cb", (PyCFunction)py_lv_event_free_user_data_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_invalidated_area", (PyCFunction)py_lv_event_get_invalidated_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_current_target_obj", (PyCFunction)py_lv_event_get_current_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_target_obj", (PyCFunction)py_lv_event_get_target_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_indev", (PyCFunction)py_lv_event_get_indev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer", (PyCFunction)py_lv_event_get_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_old_size", (PyCFunction)py_lv_event_get_old_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_key", (PyCFunction)py_lv_event_get_key_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rotary_diff", (PyCFunction)py_lv_event_get_rotary_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_anim", (PyCFunction)py_lv_event_get_scroll_anim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_ext_draw_size", (PyCFunction)py_lv_event_set_ext_draw_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_self_size_info", (PyCFunction)py_lv_event_get_self_size_info_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_hit_test_info", (PyCFunction)py_lv_event_get_hit_test_info_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cover_area", (PyCFunction)py_lv_event_get_cover_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cover_res", (PyCFunction)py_lv_event_set_cover_res_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_draw_task", (PyCFunction)py_lv_event_get_draw_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_prev_state", (PyCFunction)py_lv_event_get_prev_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_pinch_scale", (PyCFunction)py_lv_event_get_pinch_scale_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rotation", (PyCFunction)py_lv_event_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_two_fingers_swipe_distance", (PyCFunction)py_lv_event_get_two_fingers_swipe_distance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_two_fingers_swipe_dir", (PyCFunction)py_lv_event_get_two_fingers_swipe_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_gesture_state", (PyCFunction)py_lv_event_get_gesture_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_gesture_type", (PyCFunction)py_lv_event_get_gesture_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"push", (PyCFunction)py_lv_event_push_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pop", (PyCFunction)py_lv_event_pop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_event_cb_t lv_event_dsc_get_cb(lv_event_dsc_t *dsc) + * uint32_t lv_anim_timeline_start(lv_anim_timeline_t *at) */ -static PyObject *py_lv_event_dsc_get_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_start_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_dsc_t *dsc = (lv_event_dsc_t *)mp_write_ptr_lv_event_dsc_t(self); + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_cb_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_event_cb_t (*)(lv_event_dsc_t *))lv_event_dsc_get_cb)(dsc); + _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_start)(at); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_event_cb_t(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_event_dsc_get_cb_struct_method_def = { - "lv_event_dsc_get_cb", - (PyCFunction)py_lv_event_dsc_get_cb_struct_method, +static PyMethodDef py_lv_anim_timeline_start_struct_method_def = { + "lv_anim_timeline_start", + (PyCFunction)py_lv_anim_timeline_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86688,63 +99173,56 @@ static PyMethodDef py_lv_event_dsc_get_cb_struct_method_def = { /* * lvgl extension definition for: - * void *lv_event_dsc_get_user_data(lv_event_dsc_t *dsc) + * uint32_t lv_anim_timeline_restart(lv_anim_timeline_t *at) */ -static PyObject *py_lv_event_dsc_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_restart_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_dsc_t *dsc = (lv_event_dsc_t *)mp_write_ptr_lv_event_dsc_t(self); + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(lv_event_dsc_t *))lv_event_dsc_get_user_data)(dsc); + _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_restart)(at); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_event_dsc_get_user_data_struct_method_def = { - "lv_event_dsc_get_user_data", - (PyCFunction)py_lv_event_dsc_get_user_data_struct_method, +static PyMethodDef py_lv_anim_timeline_restart_struct_method_def = { + "lv_anim_timeline_restart", + (PyCFunction)py_lv_anim_timeline_restart_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_event_dsc_t_methods[] = { - {"get_cb", (PyCFunction)py_lv_event_dsc_get_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_event_dsc_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_group_delete(lv_group_t *group) + * void lv_anim_timeline_pause(lv_anim_timeline_t *at) */ -static PyObject *py_lv_group_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_group_t *))lv_group_delete)(group); + ((void (*)(lv_anim_timeline_t *))lv_anim_timeline_pause)(at); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_delete_struct_method_def = { - "lv_group_delete", - (PyCFunction)py_lv_group_delete_struct_method, +static PyMethodDef py_lv_anim_timeline_pause_struct_method_def = { + "lv_anim_timeline_pause", + (PyCFunction)py_lv_anim_timeline_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86752,27 +99230,29 @@ static PyMethodDef py_lv_group_delete_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_set_default(lv_group_t *group) + * void lv_anim_timeline_set_reverse(lv_anim_timeline_t *at, bool reverse) */ -static PyObject *py_lv_group_set_default_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_set_reverse_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + long reverse_val; + if (!PyArg_ParseTuple(py_args, "l", &reverse_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + bool reverse = (reverse_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_group_t *))lv_group_set_default)(group); + ((void (*)(lv_anim_timeline_t *, bool))lv_anim_timeline_set_reverse)(at, reverse); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_set_default_struct_method_def = { - "lv_group_set_default", - (PyCFunction)py_lv_group_set_default_struct_method, +static PyMethodDef py_lv_anim_timeline_set_reverse_struct_method_def = { + "lv_anim_timeline_set_reverse", + (PyCFunction)py_lv_anim_timeline_set_reverse_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86780,29 +99260,29 @@ static PyMethodDef py_lv_group_set_default_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_add_obj(lv_group_t *group, lv_obj_t *obj) + * void lv_anim_timeline_set_delay(lv_anim_timeline_t *at, uint32_t delay) */ -static PyObject *py_lv_group_add_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_set_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - lv_obj_t *obj = mp_to_lv(obj_py); + long delay_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + uint32_t delay = (uint32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_group_t *, lv_obj_t *))lv_group_add_obj)(group, obj); + ((void (*)(lv_anim_timeline_t *, uint32_t))lv_anim_timeline_set_delay)(at, delay); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_add_obj_struct_method_def = { - "lv_group_add_obj", - (PyCFunction)py_lv_group_add_obj_struct_method, +static PyMethodDef py_lv_anim_timeline_set_delay_struct_method_def = { + "lv_anim_timeline_set_delay", + (PyCFunction)py_lv_anim_timeline_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86810,27 +99290,29 @@ static PyMethodDef py_lv_group_add_obj_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_remove_all_objs(lv_group_t *group) + * void lv_anim_timeline_set_repeat_count(lv_anim_timeline_t *at, uint32_t cnt) */ -static PyObject *py_lv_group_remove_all_objs_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + long cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_group_t *))lv_group_remove_all_objs)(group); + ((void (*)(lv_anim_timeline_t *, uint32_t))lv_anim_timeline_set_repeat_count)(at, cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_remove_all_objs_struct_method_def = { - "lv_group_remove_all_objs", - (PyCFunction)py_lv_group_remove_all_objs_struct_method, +static PyMethodDef py_lv_anim_timeline_set_repeat_count_struct_method_def = { + "lv_anim_timeline_set_repeat_count", + (PyCFunction)py_lv_anim_timeline_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86838,27 +99320,29 @@ static PyMethodDef py_lv_group_remove_all_objs_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_focus_next(lv_group_t *group) + * void lv_anim_timeline_set_repeat_delay(lv_anim_timeline_t *at, uint32_t delay) */ -static PyObject *py_lv_group_focus_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_set_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + long delay_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + uint32_t delay = (uint32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_group_t *))lv_group_focus_next)(group); + ((void (*)(lv_anim_timeline_t *, uint32_t))lv_anim_timeline_set_repeat_delay)(at, delay); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_focus_next_struct_method_def = { - "lv_group_focus_next", - (PyCFunction)py_lv_group_focus_next_struct_method, +static PyMethodDef py_lv_anim_timeline_set_repeat_delay_struct_method_def = { + "lv_anim_timeline_set_repeat_delay", + (PyCFunction)py_lv_anim_timeline_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86866,27 +99350,29 @@ static PyMethodDef py_lv_group_focus_next_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_focus_prev(lv_group_t *group) + * void lv_anim_timeline_set_progress(lv_anim_timeline_t *at, uint16_t progress) */ -static PyObject *py_lv_group_focus_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_set_progress_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + long progress_val; + if (!PyArg_ParseTuple(py_args, "l", &progress_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + uint16_t progress = (uint16_t)progress_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_group_t *))lv_group_focus_prev)(group); + ((void (*)(lv_anim_timeline_t *, uint16_t))lv_anim_timeline_set_progress)(at, progress); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_focus_prev_struct_method_def = { - "lv_group_focus_prev", - (PyCFunction)py_lv_group_focus_prev_struct_method, +static PyMethodDef py_lv_anim_timeline_set_progress_struct_method_def = { + "lv_anim_timeline_set_progress", + (PyCFunction)py_lv_anim_timeline_set_progress_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86894,29 +99380,29 @@ static PyMethodDef py_lv_group_focus_prev_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_focus_freeze(lv_group_t *group, bool en) + * void lv_anim_timeline_set_user_data(lv_anim_timeline_t *at, void *user_data) */ -static PyObject *py_lv_group_focus_freeze_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - bool en = (en_val != 0); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_group_t *, bool))lv_group_focus_freeze)(group, en); + ((void (*)(lv_anim_timeline_t *, void *))lv_anim_timeline_set_user_data)(at, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_group_focus_freeze_struct_method_def = { - "lv_group_focus_freeze", - (PyCFunction)py_lv_group_focus_freeze_struct_method, +static PyMethodDef py_lv_anim_timeline_set_user_data_struct_method_def = { + "lv_anim_timeline_set_user_data", + (PyCFunction)py_lv_anim_timeline_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86924,154 +99410,115 @@ static PyMethodDef py_lv_group_focus_freeze_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_group_send_data(lv_group_t *group, uint32_t c) + * uint32_t lv_anim_timeline_get_playtime(lv_anim_timeline_t *at) */ -static PyObject *py_lv_group_send_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_get_playtime_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - uint32_t c = (uint32_t)c_val; + + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_group_t *, uint32_t))lv_group_send_data)(group, c); + _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_playtime)(at); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_send_data_struct_method_def = { - "lv_group_send_data", - (PyCFunction)py_lv_group_send_data_struct_method, +static PyMethodDef py_lv_anim_timeline_get_playtime_struct_method_def = { + "lv_anim_timeline_get_playtime", + (PyCFunction)py_lv_anim_timeline_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_group_t_focus_cb (CPython) - * void lv_group_focus_cb_t(lv_group_t *) - */ -static void lv_group_t_focus_cb_callback(lv_group_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_group_t_focus_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_group_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_group_set_focus_cb(lv_group_t *group, lv_group_focus_cb_t focus_cb) + * bool lv_anim_timeline_get_reverse(lv_anim_timeline_t *at) */ -static PyObject *py_lv_group_set_focus_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_get_reverse_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *focus_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &focus_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - void *focus_cb = mp_lv_callback(focus_cb_py, &lv_group_t_focus_cb_callback, "lv_group_t_focus_cb", &group->user_data, group, (NULL), (NULL)); + + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_group_t *, lv_group_focus_cb_t))lv_group_set_focus_cb)(group, focus_cb); + _res = ((bool (*)(lv_anim_timeline_t *))lv_anim_timeline_get_reverse)(at); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_group_set_focus_cb_struct_method_def = { - "lv_group_set_focus_cb", - (PyCFunction)py_lv_group_set_focus_cb_struct_method, +static PyMethodDef py_lv_anim_timeline_get_reverse_struct_method_def = { + "lv_anim_timeline_get_reverse", + (PyCFunction)py_lv_anim_timeline_get_reverse_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_group_t_edge_cb (CPython) - * void lv_group_edge_cb_t(lv_group_t *, bool) + * lvgl extension definition for: + * uint32_t lv_anim_timeline_get_delay(lv_anim_timeline_t *at) */ -static void lv_group_t_edge_cb_callback(lv_group_t *arg0, bool arg1) +static PyObject *py_lv_anim_timeline_get_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_group_t_edge_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_group_t((void*)arg0); - PyObject *py_arg1 = convert_to_bool(arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_delay)(at); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } +static PyMethodDef py_lv_anim_timeline_get_delay_struct_method_def = { + "lv_anim_timeline_get_delay", + (PyCFunction)py_lv_anim_timeline_get_delay_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_group_set_edge_cb(lv_group_t *group, lv_group_edge_cb_t edge_cb) + * uint16_t lv_anim_timeline_get_progress(lv_anim_timeline_t *at) */ -static PyObject *py_lv_group_set_edge_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_get_progress_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *edge_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &edge_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - void *edge_cb = mp_lv_callback(edge_cb_py, &lv_group_t_edge_cb_callback, "lv_group_t_edge_cb", &group->user_data, group, (NULL), (NULL)); + + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint16_t _res; lvpy_lock(); - ((void (*)(lv_group_t *, lv_group_edge_cb_t))lv_group_set_edge_cb)(group, edge_cb); + _res = ((uint16_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_progress)(at); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_set_edge_cb_struct_method_def = { - "lv_group_set_edge_cb", - (PyCFunction)py_lv_group_set_edge_cb_struct_method, +static PyMethodDef py_lv_anim_timeline_get_progress_struct_method_def = { + "lv_anim_timeline_get_progress", + (PyCFunction)py_lv_anim_timeline_get_progress_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87079,29 +99526,28 @@ static PyMethodDef py_lv_group_set_edge_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_set_refocus_policy(lv_group_t *group, lv_group_refocus_policy_t policy) + * uint32_t lv_anim_timeline_get_repeat_count(lv_anim_timeline_t *at) */ -static PyObject *py_lv_group_set_refocus_policy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_get_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *policy_py; - if (!PyArg_ParseTuple(py_args, "O", &policy_py)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - lv_group_refocus_policy_t policy = (int)mp_obj_get_int(policy_py); + + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_group_t *, lv_group_refocus_policy_t))lv_group_set_refocus_policy)(group, policy); + _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_repeat_count)(at); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_set_refocus_policy_struct_method_def = { - "lv_group_set_refocus_policy", - (PyCFunction)py_lv_group_set_refocus_policy_struct_method, +static PyMethodDef py_lv_anim_timeline_get_repeat_count_struct_method_def = { + "lv_anim_timeline_get_repeat_count", + (PyCFunction)py_lv_anim_timeline_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87109,29 +99555,28 @@ static PyMethodDef py_lv_group_set_refocus_policy_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_set_editing(lv_group_t *group, bool edit) + * uint32_t lv_anim_timeline_get_repeat_delay(lv_anim_timeline_t *at) */ -static PyObject *py_lv_group_set_editing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_get_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long edit_val; - if (!PyArg_ParseTuple(py_args, "l", &edit_val)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - bool edit = (edit_val != 0); + + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_group_t *, bool))lv_group_set_editing)(group, edit); + _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_repeat_delay)(at); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_set_editing_struct_method_def = { - "lv_group_set_editing", - (PyCFunction)py_lv_group_set_editing_struct_method, +static PyMethodDef py_lv_anim_timeline_get_repeat_delay_struct_method_def = { + "lv_anim_timeline_get_repeat_delay", + (PyCFunction)py_lv_anim_timeline_get_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87139,29 +99584,28 @@ static PyMethodDef py_lv_group_set_editing_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_set_wrap(lv_group_t *group, bool en) + * void *lv_anim_timeline_get_user_data(lv_anim_timeline_t *at) */ -static PyObject *py_lv_group_set_wrap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - bool en = (en_val != 0); + + lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_group_t *, bool))lv_group_set_wrap)(group, en); + _res = ((void *(*)(lv_anim_timeline_t *))lv_anim_timeline_get_user_data)(at); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_group_set_wrap_struct_method_def = { - "lv_group_set_wrap", - (PyCFunction)py_lv_group_set_wrap_struct_method, + return ptr_to_mp((void*)_res); +} + +static PyMethodDef py_lv_anim_timeline_get_user_data_struct_method_def = { + "lv_anim_timeline_get_user_data", + (PyCFunction)py_lv_anim_timeline_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87169,57 +99613,87 @@ static PyMethodDef py_lv_group_set_wrap_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_group_get_focused(const lv_group_t *group) + * void lv_anim_timeline_merge(lv_anim_timeline_t *dest, const lv_anim_timeline_t *src, int32_t delay) */ -static PyObject *py_lv_group_get_focused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_merge_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + PyObject *src_py; long delay_val; + if (!PyArg_ParseTuple(py_args, "Ol", &src_py, &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_timeline_t *dest = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + const lv_anim_timeline_t *src = (const lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(src_py); + int32_t delay = (int32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_group_t *))lv_group_get_focused)(group); + ((void (*)(lv_anim_timeline_t *, const lv_anim_timeline_t *, int32_t))lv_anim_timeline_merge)(dest, src, delay); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_focused_struct_method_def = { - "lv_group_get_focused", - (PyCFunction)py_lv_group_get_focused_struct_method, +static PyMethodDef py_lv_anim_timeline_merge_struct_method_def = { + "lv_anim_timeline_merge", + (PyCFunction)py_lv_anim_timeline_merge_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_anim_timeline_t_methods[] = { + {"delete", (PyCFunction)py_lv_anim_timeline_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add", (PyCFunction)py_lv_anim_timeline_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"start", (PyCFunction)py_lv_anim_timeline_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"restart", (PyCFunction)py_lv_anim_timeline_restart_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pause", (PyCFunction)py_lv_anim_timeline_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse", (PyCFunction)py_lv_anim_timeline_set_reverse_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_delay", (PyCFunction)py_lv_anim_timeline_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_count", (PyCFunction)py_lv_anim_timeline_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_delay", (PyCFunction)py_lv_anim_timeline_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_progress", (PyCFunction)py_lv_anim_timeline_set_progress_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_anim_timeline_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_playtime", (PyCFunction)py_lv_anim_timeline_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_reverse", (PyCFunction)py_lv_anim_timeline_get_reverse_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_delay", (PyCFunction)py_lv_anim_timeline_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_progress", (PyCFunction)py_lv_anim_timeline_get_progress_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_repeat_count", (PyCFunction)py_lv_anim_timeline_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_repeat_delay", (PyCFunction)py_lv_anim_timeline_get_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_anim_timeline_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"merge", (PyCFunction)py_lv_anim_timeline_merge_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_anim_timeline_dsc_t_methods[] = {{NULL}}; +PyMethodDef py_lv_subject_increment_dsc_t_methods[] = {{NULL}}; +PyMethodDef py_lv_obj_spec_attr_t_methods[] = {{NULL}}; +PyMethodDef py_lv_obj_style_transition_dsc_t_methods[] = {{NULL}}; +PyMethodDef py_lv_image_decoder_args_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t *group) + * void lv_image_decoder_delete(lv_image_decoder_t *decoder) */ -static PyObject *py_lv_group_get_focus_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_focus_cb_t _res; lvpy_lock(); - _res = ((lv_group_focus_cb_t (*)(const lv_group_t *))lv_group_get_focus_cb)(group); + ((void (*)(lv_image_decoder_t *))lv_image_decoder_delete)(decoder); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_group_focus_cb_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_focus_cb_struct_method_def = { - "lv_group_get_focus_cb", - (PyCFunction)py_lv_group_get_focus_cb_struct_method, +static PyMethodDef py_lv_image_decoder_delete_struct_method_def = { + "lv_image_decoder_delete", + (PyCFunction)py_lv_image_decoder_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87227,28 +99701,28 @@ static PyMethodDef py_lv_group_get_focus_cb_struct_method_def = { /* * lvgl extension definition for: - * lv_group_edge_cb_t lv_group_get_edge_cb(const lv_group_t *group) + * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) */ -static PyObject *py_lv_group_get_edge_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_edge_cb_t _res; + lv_image_decoder_t * _res; lvpy_lock(); - _res = ((lv_group_edge_cb_t (*)(const lv_group_t *))lv_group_get_edge_cb)(group); + _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_image_decoder_get_next)(decoder); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_group_edge_cb_t(_res); + return mp_read_ptr_lv_image_decoder_t((void*)_res); } -static PyMethodDef py_lv_group_get_edge_cb_struct_method_def = { - "lv_group_get_edge_cb", - (PyCFunction)py_lv_group_get_edge_cb_struct_method, +static PyMethodDef py_lv_image_decoder_get_next_struct_method_def = { + "lv_image_decoder_get_next", + (PyCFunction)py_lv_image_decoder_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87256,28 +99730,29 @@ static PyMethodDef py_lv_group_get_edge_cb_struct_method_def = { /* * lvgl extension definition for: - * bool lv_group_get_editing(const lv_group_t *group) + * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) */ -static PyObject *py_lv_group_get_editing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_set_info_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + PyObject *info_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &info_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); + void *info_cb = mp_lv_callback(info_cb_py, &lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", &decoder->user_data, decoder, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_group_t *))lv_group_get_editing)(group); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_image_decoder_set_info_cb)(decoder, info_cb); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_editing_struct_method_def = { - "lv_group_get_editing", - (PyCFunction)py_lv_group_get_editing_struct_method, +static PyMethodDef py_lv_image_decoder_set_info_cb_struct_method_def = { + "lv_image_decoder_set_info_cb", + (PyCFunction)py_lv_image_decoder_set_info_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87285,28 +99760,29 @@ static PyMethodDef py_lv_group_get_editing_struct_method_def = { /* * lvgl extension definition for: - * bool lv_group_get_wrap(lv_group_t *group) + * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) */ -static PyObject *py_lv_group_get_wrap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_set_open_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + PyObject *open_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &open_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); + void *open_cb = mp_lv_callback(open_cb_py, &lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", &decoder->user_data, decoder, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_group_t *))lv_group_get_wrap)(group); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_image_decoder_set_open_cb)(decoder, open_cb); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_wrap_struct_method_def = { - "lv_group_get_wrap", - (PyCFunction)py_lv_group_get_wrap_struct_method, +static PyMethodDef py_lv_image_decoder_set_open_cb_struct_method_def = { + "lv_image_decoder_set_open_cb", + (PyCFunction)py_lv_image_decoder_set_open_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87314,28 +99790,29 @@ static PyMethodDef py_lv_group_get_wrap_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_group_get_obj_count(lv_group_t *group) + * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t get_area_cb) */ -static PyObject *py_lv_group_get_obj_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_set_get_area_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + PyObject *get_area_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &get_area_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); + void *get_area_cb = mp_lv_callback(get_area_cb_py, &lv_image_decoder_t_get_area_cb_callback, "lv_image_decoder_t_get_area_cb", &decoder->user_data, decoder, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_group_t *))lv_group_get_obj_count)(group); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_image_decoder_set_get_area_cb)(decoder, get_area_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_obj_count_struct_method_def = { - "lv_group_get_obj_count", - (PyCFunction)py_lv_group_get_obj_count_struct_method, +static PyMethodDef py_lv_image_decoder_set_get_area_cb_struct_method_def = { + "lv_image_decoder_set_get_area_cb", + (PyCFunction)py_lv_image_decoder_set_get_area_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87343,30 +99820,29 @@ static PyMethodDef py_lv_group_get_obj_count_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_group_get_obj_by_index(lv_group_t *group, uint32_t index) + * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) */ -static PyObject *py_lv_group_get_obj_by_index_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_set_close_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); - uint32_t index = (uint32_t)index_val; + PyObject *close_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &close_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); + void *close_cb = mp_lv_callback(close_cb_py, &lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", &decoder->user_data, decoder, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_group_t *, uint32_t))lv_group_get_obj_by_index)(group, index); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_image_decoder_set_close_cb)(decoder, close_cb); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_group_get_obj_by_index_struct_method_def = { - "lv_group_get_obj_by_index", - (PyCFunction)py_lv_group_get_obj_by_index_struct_method, +static PyMethodDef py_lv_image_decoder_set_close_cb_struct_method_def = { + "lv_image_decoder_set_close_cb", + (PyCFunction)py_lv_image_decoder_set_close_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87374,113 +99850,108 @@ static PyMethodDef py_lv_group_get_obj_by_index_struct_method_def = { /* * lvgl extension definition for: - * void lv_group_set_user_data(lv_group_t *group, void *user_data) + * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) */ -static PyObject *py_lv_group_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_add_to_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + PyObject *search_key_py; PyObject *decoded_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &search_key_py, &decoded_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); void *user_data = mp_to_ptr(user_data_py); + lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(search_key_py); + const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(decoded_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t * _res; lvpy_lock(); - ((void (*)(lv_group_t *, void *))lv_group_set_user_data)(group, user_data); + _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_image_decoder_add_to_cache)(decoder, search_key, decoded, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_group_set_user_data_struct_method_def = { - "lv_group_set_user_data", - (PyCFunction)py_lv_group_set_user_data_struct_method, +static PyMethodDef py_lv_image_decoder_add_to_cache_struct_method_def = { + "lv_image_decoder_add_to_cache", + (PyCFunction)py_lv_image_decoder_add_to_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_image_decoder_t_methods[] = { + {"delete", (PyCFunction)py_lv_image_decoder_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_next", (PyCFunction)py_lv_image_decoder_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_info_cb", (PyCFunction)py_lv_image_decoder_set_info_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_open_cb", (PyCFunction)py_lv_image_decoder_set_open_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_get_area_cb", (PyCFunction)py_lv_image_decoder_set_get_area_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_close_cb", (PyCFunction)py_lv_image_decoder_set_close_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_to_cache", (PyCFunction)py_lv_image_decoder_add_to_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void *lv_group_get_user_data(const lv_group_t *group) + * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) */ -static PyObject *py_lv_group_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_open_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_group_t *group = (lv_group_t *)mp_write_ptr_lv_group_t(self); + PyObject *src_py; PyObject *args_py; + if (!PyArg_ParseTuple(py_args, "OO", &src_py, &args_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); + const void *src = (const void *)mp_to_ptr(src_py); + const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(args_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_result_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_group_t *))lv_group_get_user_data)(group); + _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_image_decoder_open)(dsc, src, args); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_group_get_user_data_struct_method_def = { - "lv_group_get_user_data", - (PyCFunction)py_lv_group_get_user_data_struct_method, +static PyMethodDef py_lv_image_decoder_open_struct_method_def = { + "lv_image_decoder_open", + (PyCFunction)py_lv_image_decoder_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_group_t_methods[] = { - {"delete", (PyCFunction)py_lv_group_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_default", (PyCFunction)py_lv_group_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_obj", (PyCFunction)py_lv_group_add_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_all_objs", (PyCFunction)py_lv_group_remove_all_objs_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"focus_next", (PyCFunction)py_lv_group_focus_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"focus_prev", (PyCFunction)py_lv_group_focus_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"focus_freeze", (PyCFunction)py_lv_group_focus_freeze_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"send_data", (PyCFunction)py_lv_group_send_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_focus_cb", (PyCFunction)py_lv_group_set_focus_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_edge_cb", (PyCFunction)py_lv_group_set_edge_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_refocus_policy", (PyCFunction)py_lv_group_set_refocus_policy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_editing", (PyCFunction)py_lv_group_set_editing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_wrap", (PyCFunction)py_lv_group_set_wrap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_focused", (PyCFunction)py_lv_group_get_focused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_focus_cb", (PyCFunction)py_lv_group_get_focus_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_edge_cb", (PyCFunction)py_lv_group_get_edge_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_editing", (PyCFunction)py_lv_group_get_editing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_wrap", (PyCFunction)py_lv_group_get_wrap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_obj_count", (PyCFunction)py_lv_group_get_obj_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_obj_by_index", (PyCFunction)py_lv_group_get_obj_by_index_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_group_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_group_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_anim_timeline_delete(lv_anim_timeline_t *at) + * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) */ -static PyObject *py_lv_anim_timeline_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_get_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *full_area_py; PyObject *decoded_area_py; + if (!PyArg_ParseTuple(py_args, "OO", &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); + const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); + lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *))lv_anim_timeline_delete)(at); + _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_image_decoder_get_area)(dsc, full_area, decoded_area); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_delete_struct_method_def = { - "lv_anim_timeline_delete", - (PyCFunction)py_lv_anim_timeline_delete_struct_method, +static PyMethodDef py_lv_image_decoder_get_area_struct_method_def = { + "lv_image_decoder_get_area", + (PyCFunction)py_lv_image_decoder_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87488,30 +99959,27 @@ static PyMethodDef py_lv_anim_timeline_delete_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_add(lv_anim_timeline_t *at, uint32_t start_time, const lv_anim_t *a) + * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) */ -static PyObject *py_lv_anim_timeline_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_close_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long start_time_val; PyObject *a_py; - if (!PyArg_ParseTuple(py_args, "lO", &start_time_val, &a_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - uint32_t start_time = (uint32_t)start_time_val; - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(a_py); + + lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, uint32_t, const lv_anim_t *))lv_anim_timeline_add)(at, start_time, a); + ((void (*)(lv_image_decoder_dsc_t *))lv_image_decoder_close)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_add_struct_method_def = { - "lv_anim_timeline_add", - (PyCFunction)py_lv_anim_timeline_add_struct_method, +static PyMethodDef py_lv_image_decoder_close_struct_method_def = { + "lv_image_decoder_close", + (PyCFunction)py_lv_image_decoder_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87519,56 +99987,71 @@ static PyMethodDef py_lv_anim_timeline_add_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_timeline_start(lv_anim_timeline_t *at) + * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) */ -static PyObject *py_lv_anim_timeline_start_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_image_decoder_post_process_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *decoded_py; + if (!PyArg_ParseTuple(py_args, "O", &decoded_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); + lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(decoded_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_start)(at); + _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_image_decoder_post_process)(dsc, decoded); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_anim_timeline_start_struct_method_def = { - "lv_anim_timeline_start", - (PyCFunction)py_lv_anim_timeline_start_struct_method, +static PyMethodDef py_lv_image_decoder_post_process_struct_method_def = { + "lv_image_decoder_post_process", + (PyCFunction)py_lv_image_decoder_post_process_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_image_decoder_dsc_t_methods[] = { + {"open", (PyCFunction)py_lv_image_decoder_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_area", (PyCFunction)py_lv_image_decoder_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"close", (PyCFunction)py_lv_image_decoder_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"post_process", (PyCFunction)py_lv_image_decoder_post_process_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_anim_timeline_pause(lv_anim_timeline_t *at) + * lv_fs_res_t lv_fs_open(lv_fs_file_t *file_p, const char *path, lv_fs_mode_t mode) */ -static PyObject *py_lv_anim_timeline_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_open_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *path_py; PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "OO", &path_py, &mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); + const char *path = (const char *)(char*)convert_from_str(path_py); + lv_fs_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *))lv_anim_timeline_pause)(at); + _res = ((lv_fs_res_t (*)(lv_fs_file_t *, const char *, lv_fs_mode_t))lv_fs_open)(file_p, path, mode); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_pause_struct_method_def = { - "lv_anim_timeline_pause", - (PyCFunction)py_lv_anim_timeline_pause_struct_method, +static PyMethodDef py_lv_fs_open_struct_method_def = { + "lv_fs_open", + (PyCFunction)py_lv_fs_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87576,29 +100059,28 @@ static PyMethodDef py_lv_anim_timeline_pause_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_set_reverse(lv_anim_timeline_t *at, bool reverse) + * lv_fs_res_t lv_fs_close(lv_fs_file_t *file_p) */ -static PyObject *py_lv_anim_timeline_set_reverse_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_close_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long reverse_val; - if (!PyArg_ParseTuple(py_args, "l", &reverse_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - bool reverse = (reverse_val != 0); + + lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, bool))lv_anim_timeline_set_reverse)(at, reverse); + _res = ((lv_fs_res_t (*)(lv_fs_file_t *))lv_fs_close)(file_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_set_reverse_struct_method_def = { - "lv_anim_timeline_set_reverse", - (PyCFunction)py_lv_anim_timeline_set_reverse_struct_method, +static PyMethodDef py_lv_fs_close_struct_method_def = { + "lv_fs_close", + (PyCFunction)py_lv_fs_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87606,29 +100088,32 @@ static PyMethodDef py_lv_anim_timeline_set_reverse_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_set_delay(lv_anim_timeline_t *at, uint32_t delay) + * lv_fs_res_t lv_fs_read(lv_fs_file_t *file_p, void *buf, uint32_t btr, uint32_t *br) */ -static PyObject *py_lv_anim_timeline_set_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - uint32_t delay = (uint32_t)delay_val; + PyObject *buf_py; long btr_val; PyObject *br_py; + if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &btr_val, &br_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); + void *buf = mp_to_ptr(buf_py); + uint32_t btr = (uint32_t)btr_val; + uint32_t *br = mp_array_to_u32ptr(br_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, uint32_t))lv_anim_timeline_set_delay)(at, delay); + _res = ((lv_fs_res_t (*)(lv_fs_file_t *, void *, uint32_t, uint32_t *))lv_fs_read)(file_p, buf, btr, br); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_set_delay_struct_method_def = { - "lv_anim_timeline_set_delay", - (PyCFunction)py_lv_anim_timeline_set_delay_struct_method, +static PyMethodDef py_lv_fs_read_struct_method_def = { + "lv_fs_read", + (PyCFunction)py_lv_fs_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87636,29 +100121,32 @@ static PyMethodDef py_lv_anim_timeline_set_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_set_repeat_count(lv_anim_timeline_t *at, uint32_t cnt) + * lv_fs_res_t lv_fs_write(lv_fs_file_t *file_p, const void *buf, uint32_t btw, uint32_t *bw) */ -static PyObject *py_lv_anim_timeline_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_write_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - uint32_t cnt = (uint32_t)cnt_val; + PyObject *buf_py; long btw_val; PyObject *bw_py; + if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &btw_val, &bw_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); + const void *buf = (const void *)mp_to_ptr(buf_py); + uint32_t btw = (uint32_t)btw_val; + uint32_t *bw = mp_array_to_u32ptr(bw_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, uint32_t))lv_anim_timeline_set_repeat_count)(at, cnt); + _res = ((lv_fs_res_t (*)(lv_fs_file_t *, const void *, uint32_t, uint32_t *))lv_fs_write)(file_p, buf, btw, bw); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_set_repeat_count_struct_method_def = { - "lv_anim_timeline_set_repeat_count", - (PyCFunction)py_lv_anim_timeline_set_repeat_count_struct_method, +static PyMethodDef py_lv_fs_write_struct_method_def = { + "lv_fs_write", + (PyCFunction)py_lv_fs_write_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87666,29 +100154,31 @@ static PyMethodDef py_lv_anim_timeline_set_repeat_count_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_set_repeat_delay(lv_anim_timeline_t *at, uint32_t delay) + * lv_fs_res_t lv_fs_seek(lv_fs_file_t *file_p, uint32_t pos, lv_fs_whence_t whence) */ -static PyObject *py_lv_anim_timeline_set_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_seek_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - uint32_t delay = (uint32_t)delay_val; + long pos_val; PyObject *whence_py; + if (!PyArg_ParseTuple(py_args, "lO", &pos_val, &whence_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); + uint32_t pos = (uint32_t)pos_val; + lv_fs_whence_t whence = (int)mp_obj_get_int(whence_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, uint32_t))lv_anim_timeline_set_repeat_delay)(at, delay); + _res = ((lv_fs_res_t (*)(lv_fs_file_t *, uint32_t, lv_fs_whence_t))lv_fs_seek)(file_p, pos, whence); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_set_repeat_delay_struct_method_def = { - "lv_anim_timeline_set_repeat_delay", - (PyCFunction)py_lv_anim_timeline_set_repeat_delay_struct_method, +static PyMethodDef py_lv_fs_seek_struct_method_def = { + "lv_fs_seek", + (PyCFunction)py_lv_fs_seek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87696,29 +100186,30 @@ static PyMethodDef py_lv_anim_timeline_set_repeat_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_set_progress(lv_anim_timeline_t *at, uint16_t progress) + * lv_fs_res_t lv_fs_tell(lv_fs_file_t *file_p, uint32_t *pos) */ -static PyObject *py_lv_anim_timeline_set_progress_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_tell_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long progress_val; - if (!PyArg_ParseTuple(py_args, "l", &progress_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - uint16_t progress = (uint16_t)progress_val; + PyObject *pos_py; + if (!PyArg_ParseTuple(py_args, "O", &pos_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); + uint32_t *pos = mp_array_to_u32ptr(pos_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, uint16_t))lv_anim_timeline_set_progress)(at, progress); + _res = ((lv_fs_res_t (*)(lv_fs_file_t *, uint32_t *))lv_fs_tell)(file_p, pos); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_set_progress_struct_method_def = { - "lv_anim_timeline_set_progress", - (PyCFunction)py_lv_anim_timeline_set_progress_struct_method, +static PyMethodDef py_lv_fs_tell_struct_method_def = { + "lv_fs_tell", + (PyCFunction)py_lv_fs_tell_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87726,58 +100217,70 @@ static PyMethodDef py_lv_anim_timeline_set_progress_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_set_user_data(lv_anim_timeline_t *at, void *user_data) + * lv_fs_res_t lv_fs_get_size(lv_fs_file_t *file_p, uint32_t *size_res) */ -static PyObject *py_lv_anim_timeline_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - void *user_data = mp_to_ptr(user_data_py); + PyObject *size_res_py; + if (!PyArg_ParseTuple(py_args, "O", &size_res_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); + uint32_t *size_res = mp_array_to_u32ptr(size_res_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, void *))lv_anim_timeline_set_user_data)(at, user_data); + _res = ((lv_fs_res_t (*)(lv_fs_file_t *, uint32_t *))lv_fs_get_size)(file_p, size_res); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_timeline_set_user_data_struct_method_def = { - "lv_anim_timeline_set_user_data", - (PyCFunction)py_lv_anim_timeline_set_user_data_struct_method, +static PyMethodDef py_lv_fs_get_size_struct_method_def = { + "lv_fs_get_size", + (PyCFunction)py_lv_fs_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_fs_file_t_methods[] = { + {"open", (PyCFunction)py_lv_fs_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"close", (PyCFunction)py_lv_fs_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"read", (PyCFunction)py_lv_fs_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"write", (PyCFunction)py_lv_fs_write_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"seek", (PyCFunction)py_lv_fs_seek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"tell", (PyCFunction)py_lv_fs_tell_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_size", (PyCFunction)py_lv_fs_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * uint32_t lv_anim_timeline_get_playtime(lv_anim_timeline_t *at) + * void lv_fs_drv_init(lv_fs_drv_t *drv) */ -static PyObject *py_lv_anim_timeline_get_playtime_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_drv_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + lv_fs_drv_t *drv = (lv_fs_drv_t *)mp_write_ptr_lv_fs_drv_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_playtime)(at); + ((void (*)(lv_fs_drv_t *))lv_fs_drv_init)(drv); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_get_playtime_struct_method_def = { - "lv_anim_timeline_get_playtime", - (PyCFunction)py_lv_anim_timeline_get_playtime_struct_method, +static PyMethodDef py_lv_fs_drv_init_struct_method_def = { + "lv_fs_drv_init", + (PyCFunction)py_lv_fs_drv_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87785,57 +100288,65 @@ static PyMethodDef py_lv_anim_timeline_get_playtime_struct_method_def = { /* * lvgl extension definition for: - * bool lv_anim_timeline_get_reverse(lv_anim_timeline_t *at) + * void lv_fs_drv_register(lv_fs_drv_t *drv) */ -static PyObject *py_lv_anim_timeline_get_reverse_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_drv_register_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + lv_fs_drv_t *drv = (lv_fs_drv_t *)mp_write_ptr_lv_fs_drv_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_anim_timeline_t *))lv_anim_timeline_get_reverse)(at); + ((void (*)(lv_fs_drv_t *))lv_fs_drv_register)(drv); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_get_reverse_struct_method_def = { - "lv_anim_timeline_get_reverse", - (PyCFunction)py_lv_anim_timeline_get_reverse_struct_method, +static PyMethodDef py_lv_fs_drv_register_struct_method_def = { + "lv_fs_drv_register", + (PyCFunction)py_lv_fs_drv_register_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_fs_drv_t_methods[] = { + {"init", (PyCFunction)py_lv_fs_drv_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"register", (PyCFunction)py_lv_fs_drv_register_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_fs_file_cache_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * uint32_t lv_anim_timeline_get_delay(lv_anim_timeline_t *at) + * void lv_cache_destroy(lv_cache_t *cache, void *user_data) */ -static PyObject *py_lv_anim_timeline_get_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_delay)(at); + ((void (*)(lv_cache_t *, void *))lv_cache_destroy)(cache, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_get_delay_struct_method_def = { - "lv_anim_timeline_get_delay", - (PyCFunction)py_lv_anim_timeline_get_delay_struct_method, +static PyMethodDef py_lv_cache_destroy_struct_method_def = { + "lv_cache_destroy", + (PyCFunction)py_lv_cache_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87843,28 +100354,31 @@ static PyMethodDef py_lv_anim_timeline_get_delay_struct_method_def = { /* * lvgl extension definition for: - * uint16_t lv_anim_timeline_get_progress(lv_anim_timeline_t *at) + * lv_cache_entry_t *lv_cache_acquire(lv_cache_t *cache, const void *key, void *user_data) */ -static PyObject *py_lv_anim_timeline_get_progress_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_acquire_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *key_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + const void *key = (const void *)mp_to_ptr(key_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + lv_cache_entry_t * _res; lvpy_lock(); - _res = ((uint16_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_progress)(at); + _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_cache_acquire)(cache, key, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_anim_timeline_get_progress_struct_method_def = { - "lv_anim_timeline_get_progress", - (PyCFunction)py_lv_anim_timeline_get_progress_struct_method, +static PyMethodDef py_lv_cache_acquire_struct_method_def = { + "lv_cache_acquire", + (PyCFunction)py_lv_cache_acquire_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87872,28 +100386,31 @@ static PyMethodDef py_lv_anim_timeline_get_progress_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_timeline_get_repeat_count(lv_anim_timeline_t *at) + * lv_cache_entry_t *lv_cache_acquire_or_create(lv_cache_t *cache, const void *key, void *user_data) */ -static PyObject *py_lv_anim_timeline_get_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_acquire_or_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *key_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + const void *key = (const void *)mp_to_ptr(key_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_cache_entry_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_repeat_count)(at); + _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_cache_acquire_or_create)(cache, key, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_anim_timeline_get_repeat_count_struct_method_def = { - "lv_anim_timeline_get_repeat_count", - (PyCFunction)py_lv_anim_timeline_get_repeat_count_struct_method, +static PyMethodDef py_lv_cache_acquire_or_create_struct_method_def = { + "lv_cache_acquire_or_create", + (PyCFunction)py_lv_cache_acquire_or_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87901,28 +100418,31 @@ static PyMethodDef py_lv_anim_timeline_get_repeat_count_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_timeline_get_repeat_delay(lv_anim_timeline_t *at) + * lv_cache_entry_t *lv_cache_add(lv_cache_t *cache, const void *key, void *user_data) */ -static PyObject *py_lv_anim_timeline_get_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *key_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + const void *key = (const void *)mp_to_ptr(key_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_cache_entry_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_anim_timeline_t *))lv_anim_timeline_get_repeat_delay)(at); + _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_cache_add)(cache, key, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_anim_timeline_get_repeat_delay_struct_method_def = { - "lv_anim_timeline_get_repeat_delay", - (PyCFunction)py_lv_anim_timeline_get_repeat_delay_struct_method, +static PyMethodDef py_lv_cache_add_struct_method_def = { + "lv_cache_add", + (PyCFunction)py_lv_cache_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87930,28 +100450,30 @@ static PyMethodDef py_lv_anim_timeline_get_repeat_delay_struct_method_def = { /* * lvgl extension definition for: - * void *lv_anim_timeline_get_user_data(lv_anim_timeline_t *at) + * void lv_cache_release(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) */ -static PyObject *py_lv_anim_timeline_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_release_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_anim_timeline_t *at = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); + PyObject *entry_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &entry_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(entry_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_anim_timeline_t *))lv_anim_timeline_get_user_data)(at); + ((void (*)(lv_cache_t *, lv_cache_entry_t *, void *))lv_cache_release)(cache, entry, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_get_user_data_struct_method_def = { - "lv_anim_timeline_get_user_data", - (PyCFunction)py_lv_anim_timeline_get_user_data_struct_method, +static PyMethodDef py_lv_cache_release_struct_method_def = { + "lv_cache_release", + (PyCFunction)py_lv_cache_release_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87959,85 +100481,61 @@ static PyMethodDef py_lv_anim_timeline_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_timeline_merge(lv_anim_timeline_t *dest, const lv_anim_timeline_t *src, int32_t delay) + * void lv_cache_reserve(lv_cache_t *cache, uint32_t reserved_size, void *user_data) */ -static PyObject *py_lv_anim_timeline_merge_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_reserve_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; long delay_val; - if (!PyArg_ParseTuple(py_args, "Ol", &src_py, &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t *dest = (lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(self); - const lv_anim_timeline_t *src = (const lv_anim_timeline_t *)mp_write_ptr_lv_anim_timeline_t(src_py); - int32_t delay = (int32_t)delay_val; + long reserved_size_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "lO", &reserved_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + uint32_t reserved_size = (uint32_t)reserved_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_timeline_t *, const lv_anim_timeline_t *, int32_t))lv_anim_timeline_merge)(dest, src, delay); + ((void (*)(lv_cache_t *, uint32_t, void *))lv_cache_reserve)(cache, reserved_size, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_timeline_merge_struct_method_def = { - "lv_anim_timeline_merge", - (PyCFunction)py_lv_anim_timeline_merge_struct_method, +static PyMethodDef py_lv_cache_reserve_struct_method_def = { + "lv_cache_reserve", + (PyCFunction)py_lv_cache_reserve_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_anim_timeline_t_methods[] = { - {"delete", (PyCFunction)py_lv_anim_timeline_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add", (PyCFunction)py_lv_anim_timeline_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"start", (PyCFunction)py_lv_anim_timeline_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pause", (PyCFunction)py_lv_anim_timeline_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse", (PyCFunction)py_lv_anim_timeline_set_reverse_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_delay", (PyCFunction)py_lv_anim_timeline_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_count", (PyCFunction)py_lv_anim_timeline_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_delay", (PyCFunction)py_lv_anim_timeline_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_progress", (PyCFunction)py_lv_anim_timeline_set_progress_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_anim_timeline_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_playtime", (PyCFunction)py_lv_anim_timeline_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_reverse", (PyCFunction)py_lv_anim_timeline_get_reverse_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_delay", (PyCFunction)py_lv_anim_timeline_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_progress", (PyCFunction)py_lv_anim_timeline_get_progress_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_repeat_count", (PyCFunction)py_lv_anim_timeline_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_repeat_delay", (PyCFunction)py_lv_anim_timeline_get_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_anim_timeline_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"merge", (PyCFunction)py_lv_anim_timeline_merge_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_anim_timeline_dsc_t_methods[] = {{NULL}}; -PyMethodDef py_lv_subject_increment_dsc_t_methods[] = {{NULL}}; -PyMethodDef py_lv_obj_style_transition_dsc_t_methods[] = {{NULL}}; -PyMethodDef py_lv_image_decoder_args_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_image_decoder_delete(lv_image_decoder_t *decoder) + * void lv_cache_drop(lv_cache_t *cache, const void *key, void *user_data) */ -static PyObject *py_lv_image_decoder_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_drop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); + PyObject *key_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + const void *key = (const void *)mp_to_ptr(key_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *))lv_image_decoder_delete)(decoder); + ((void (*)(lv_cache_t *, const void *, void *))lv_cache_drop)(cache, key, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_delete_struct_method_def = { - "lv_image_decoder_delete", - (PyCFunction)py_lv_image_decoder_delete_struct_method, +static PyMethodDef py_lv_cache_drop_struct_method_def = { + "lv_cache_drop", + (PyCFunction)py_lv_cache_drop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88045,28 +100543,29 @@ static PyMethodDef py_lv_image_decoder_delete_struct_method_def = { /* * lvgl extension definition for: - * lv_image_decoder_t *lv_image_decoder_get_next(lv_image_decoder_t *decoder) + * void lv_cache_drop_all(lv_cache_t *cache, void *user_data) */ -static PyObject *py_lv_image_decoder_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_drop_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t * _res; lvpy_lock(); - _res = ((lv_image_decoder_t *(*)(lv_image_decoder_t *))lv_image_decoder_get_next)(decoder); + ((void (*)(lv_cache_t *, void *))lv_cache_drop_all)(cache, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_image_decoder_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_get_next_struct_method_def = { - "lv_image_decoder_get_next", - (PyCFunction)py_lv_image_decoder_get_next_struct_method, +static PyMethodDef py_lv_cache_drop_all_struct_method_def = { + "lv_cache_drop_all", + (PyCFunction)py_lv_cache_drop_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88074,29 +100573,30 @@ static PyMethodDef py_lv_image_decoder_get_next_struct_method_def = { /* * lvgl extension definition for: - * void lv_image_decoder_set_info_cb(lv_image_decoder_t *decoder, lv_image_decoder_info_f_t info_cb) + * bool lv_cache_evict_one(lv_cache_t *cache, void *user_data) */ -static PyObject *py_lv_image_decoder_set_info_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_evict_one_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *info_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &info_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); - void *info_cb = mp_lv_callback(info_cb_py, &lv_image_decoder_t_info_cb_callback, "lv_image_decoder_t_info_cb", &decoder->user_data, decoder, (NULL), (NULL)); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_info_f_t))lv_image_decoder_set_info_cb)(decoder, info_cb); + _res = ((bool (*)(lv_cache_t *, void *))lv_cache_evict_one)(cache, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_image_decoder_set_info_cb_struct_method_def = { - "lv_image_decoder_set_info_cb", - (PyCFunction)py_lv_image_decoder_set_info_cb_struct_method, +static PyMethodDef py_lv_cache_evict_one_struct_method_def = { + "lv_cache_evict_one", + (PyCFunction)py_lv_cache_evict_one_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88104,29 +100604,30 @@ static PyMethodDef py_lv_image_decoder_set_info_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_image_decoder_set_open_cb(lv_image_decoder_t *decoder, lv_image_decoder_open_f_t open_cb) + * void lv_cache_set_max_size(lv_cache_t *cache, size_t max_size, void *user_data) */ -static PyObject *py_lv_image_decoder_set_open_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_set_max_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *open_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &open_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); - void *open_cb = mp_lv_callback(open_cb_py, &lv_image_decoder_t_open_cb_callback, "lv_image_decoder_t_open_cb", &decoder->user_data, decoder, (NULL), (NULL)); + long max_size_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "lO", &max_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + size_t max_size = (size_t)max_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_open_f_t))lv_image_decoder_set_open_cb)(decoder, open_cb); + ((void (*)(lv_cache_t *, size_t, void *))lv_cache_set_max_size)(cache, max_size, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_set_open_cb_struct_method_def = { - "lv_image_decoder_set_open_cb", - (PyCFunction)py_lv_image_decoder_set_open_cb_struct_method, +static PyMethodDef py_lv_cache_set_max_size_struct_method_def = { + "lv_cache_set_max_size", + (PyCFunction)py_lv_cache_set_max_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88134,29 +100635,30 @@ static PyMethodDef py_lv_image_decoder_set_open_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_image_decoder_set_get_area_cb(lv_image_decoder_t *decoder, lv_image_decoder_get_area_cb_t read_line_cb) + * size_t lv_cache_get_max_size(lv_cache_t *cache, void *user_data) */ -static PyObject *py_lv_image_decoder_set_get_area_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_get_max_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *read_line_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &read_line_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); - void *read_line_cb = mp_lv_callback(read_line_cb_py, &lv_image_decoder_t_read_line_cb_callback, "lv_image_decoder_t_read_line_cb", &decoder->user_data, decoder, (NULL), (NULL)); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + size_t _res; lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_get_area_cb_t))lv_image_decoder_set_get_area_cb)(decoder, read_line_cb); + _res = ((size_t (*)(lv_cache_t *, void *))lv_cache_get_max_size)(cache, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_decoder_set_get_area_cb_struct_method_def = { - "lv_image_decoder_set_get_area_cb", - (PyCFunction)py_lv_image_decoder_set_get_area_cb_struct_method, +static PyMethodDef py_lv_cache_get_max_size_struct_method_def = { + "lv_cache_get_max_size", + (PyCFunction)py_lv_cache_get_max_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88164,29 +100666,30 @@ static PyMethodDef py_lv_image_decoder_set_get_area_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_image_decoder_set_close_cb(lv_image_decoder_t *decoder, lv_image_decoder_close_f_t close_cb) + * size_t lv_cache_get_size(lv_cache_t *cache, void *user_data) */ -static PyObject *py_lv_image_decoder_set_close_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *close_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &close_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); - void *close_cb = mp_lv_callback(close_cb_py, &lv_image_decoder_t_close_cb_callback, "lv_image_decoder_t_close_cb", &decoder->user_data, decoder, (NULL), (NULL)); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + size_t _res; lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_close_f_t))lv_image_decoder_set_close_cb)(decoder, close_cb); + _res = ((size_t (*)(lv_cache_t *, void *))lv_cache_get_size)(cache, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_decoder_set_close_cb_struct_method_def = { - "lv_image_decoder_set_close_cb", - (PyCFunction)py_lv_image_decoder_set_close_cb_struct_method, +static PyMethodDef py_lv_cache_get_size_struct_method_def = { + "lv_cache_get_size", + (PyCFunction)py_lv_cache_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88194,208 +100697,257 @@ static PyMethodDef py_lv_image_decoder_set_close_cb_struct_method_def = { /* * lvgl extension definition for: - * lv_cache_entry_t *lv_image_decoder_add_to_cache(lv_image_decoder_t *decoder, lv_image_cache_data_t *search_key, const lv_draw_buf_t *decoded, void *user_data) + * size_t lv_cache_get_free_size(lv_cache_t *cache, void *user_data) */ -static PyObject *py_lv_image_decoder_add_to_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_get_free_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *search_key_py; PyObject *decoded_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &search_key_py, &decoded_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = (lv_image_decoder_t *)mp_write_ptr_lv_image_decoder_t(self); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); void *user_data = mp_to_ptr(user_data_py); - lv_image_cache_data_t *search_key = mp_write_ptr_lv_image_cache_data_t(search_key_py); - const lv_draw_buf_t *decoded = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(decoded_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; + size_t _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(lv_image_decoder_t *, lv_image_cache_data_t *, const lv_draw_buf_t *, void *))lv_image_decoder_add_to_cache)(decoder, search_key, decoded, user_data); + _res = ((size_t (*)(lv_cache_t *, void *))lv_cache_get_free_size)(cache, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_image_decoder_add_to_cache_struct_method_def = { - "lv_image_decoder_add_to_cache", - (PyCFunction)py_lv_image_decoder_add_to_cache_struct_method, +static PyMethodDef py_lv_cache_get_free_size_struct_method_def = { + "lv_cache_get_free_size", + (PyCFunction)py_lv_cache_get_free_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_image_decoder_t_methods[] = { - {"delete", (PyCFunction)py_lv_image_decoder_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_next", (PyCFunction)py_lv_image_decoder_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_info_cb", (PyCFunction)py_lv_image_decoder_set_info_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_open_cb", (PyCFunction)py_lv_image_decoder_set_open_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_get_area_cb", (PyCFunction)py_lv_image_decoder_set_get_area_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_close_cb", (PyCFunction)py_lv_image_decoder_set_close_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_to_cache", (PyCFunction)py_lv_image_decoder_add_to_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_result_t lv_image_decoder_open(lv_image_decoder_dsc_t *dsc, const void *src, const lv_image_decoder_args_t *args) + * bool lv_cache_is_enabled(lv_cache_t *cache) */ -static PyObject *py_lv_image_decoder_open_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_is_enabled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; PyObject *args_py; - if (!PyArg_ParseTuple(py_args, "OO", &src_py, &args_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); - const void *src = (const void *)mp_to_ptr(src_py); - const lv_image_decoder_args_t *args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(args_py); + + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + bool _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const void *, const lv_image_decoder_args_t *))lv_image_decoder_open)(dsc, src, args); + _res = ((bool (*)(lv_cache_t *))lv_cache_is_enabled)(cache); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_image_decoder_open_struct_method_def = { - "lv_image_decoder_open", - (PyCFunction)py_lv_image_decoder_open_struct_method, +static PyMethodDef py_lv_cache_is_enabled_struct_method_def = { + "lv_cache_is_enabled", + (PyCFunction)py_lv_cache_is_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) + * lv_cache_compare_cb_t compare_cb + */ + + /* * lvgl extension definition for: - * lv_result_t lv_image_decoder_get_area(lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + * void lv_cache_set_compare_cb(lv_cache_t *cache, lv_cache_compare_cb_t compare_cb, void *user_data) */ -static PyObject *py_lv_image_decoder_get_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_set_compare_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *full_area_py; PyObject *decoded_area_py; - if (!PyArg_ParseTuple(py_args, "OO", &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); - const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); - lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); + PyObject *compare_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &compare_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *compare_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_image_decoder_get_area)(dsc, full_area, decoded_area); + ((void (*)(lv_cache_t *, lv_cache_compare_cb_t, void *))lv_cache_set_compare_cb)(cache, compare_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_get_area_struct_method_def = { - "lv_image_decoder_get_area", - (PyCFunction)py_lv_image_decoder_get_area_struct_method, +static PyMethodDef py_lv_cache_set_compare_cb_struct_method_def = { + "lv_cache_set_compare_cb", + (PyCFunction)py_lv_cache_set_compare_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_cache_set_create_cb_alloc_cb (CPython) + * bool lv_cache_create_cb_t(void *node, void *user_data) + */ +static bool lv_cache_set_create_cb_alloc_cb_callback(void *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_cache_set_create_cb_alloc_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } + bool _c_res = mp_obj_is_true(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * lvgl extension definition for: - * void lv_image_decoder_close(lv_image_decoder_dsc_t *dsc) + * void lv_cache_set_create_cb(lv_cache_t *cache, lv_cache_create_cb_t alloc_cb, void *user_data) */ -static PyObject *py_lv_image_decoder_close_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_set_create_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); + PyObject *alloc_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &alloc_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *alloc_cb = mp_lv_callback(alloc_cb_py, &lv_cache_set_create_cb_alloc_cb_callback, "lv_cache_set_create_cb_alloc_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_image_decoder_dsc_t *))lv_image_decoder_close)(dsc); + ((void (*)(lv_cache_t *, lv_cache_create_cb_t, void *))lv_cache_set_create_cb)(cache, alloc_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_close_struct_method_def = { - "lv_image_decoder_close", - (PyCFunction)py_lv_image_decoder_close_struct_method, +static PyMethodDef py_lv_cache_set_create_cb_struct_method_def = { + "lv_cache_set_create_cb", + (PyCFunction)py_lv_cache_set_create_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_cache_set_free_cb_free_cb (CPython) + * void lv_cache_free_cb_t(void *node, void *user_data) + */ +static void lv_cache_set_free_cb_free_cb_callback(void *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_cache_set_free_cb_free_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_draw_buf_t *lv_image_decoder_post_process(lv_image_decoder_dsc_t *dsc, lv_draw_buf_t *decoded) + * void lv_cache_set_free_cb(lv_cache_t *cache, lv_cache_free_cb_t free_cb, void *user_data) */ -static PyObject *py_lv_image_decoder_post_process_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_set_free_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *decoded_py; - if (!PyArg_ParseTuple(py_args, "O", &decoded_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_dsc_t *dsc = (lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(self); - lv_draw_buf_t *decoded = mp_write_ptr_lv_draw_buf_t(decoded_py); + PyObject *free_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &free_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *free_cb = mp_lv_callback(free_cb_py, &lv_cache_set_free_cb_free_cb_callback, "lv_cache_set_free_cb_free_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_image_decoder_dsc_t *, lv_draw_buf_t *))lv_image_decoder_post_process)(dsc, decoded); + ((void (*)(lv_cache_t *, lv_cache_free_cb_t, void *))lv_cache_set_free_cb)(cache, free_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_image_decoder_post_process_struct_method_def = { - "lv_image_decoder_post_process", - (PyCFunction)py_lv_image_decoder_post_process_struct_method, +static PyMethodDef py_lv_cache_set_free_cb_struct_method_def = { + "lv_cache_set_free_cb", + (PyCFunction)py_lv_cache_set_free_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_image_decoder_dsc_t_methods[] = { - {"open", (PyCFunction)py_lv_image_decoder_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_area", (PyCFunction)py_lv_image_decoder_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"close", (PyCFunction)py_lv_image_decoder_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"post_process", (PyCFunction)py_lv_image_decoder_post_process_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_open(lv_fs_file_t *file_p, const char *path, lv_fs_mode_t mode) + * void lv_cache_set_name(lv_cache_t *cache, const char *name) */ -static PyObject *py_lv_fs_open_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_set_name_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *path_py; PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "OO", &path_py, &mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); - const char *path = (const char *)(char*)convert_from_str(path_py); - lv_fs_mode_t mode = (int)mp_obj_get_int(mode_py); + PyObject *name_py; + if (!PyArg_ParseTuple(py_args, "O", &name_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + const char *name = (const char *)(char*)convert_from_str(name_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_file_t *, const char *, lv_fs_mode_t))lv_fs_open)(file_p, path, mode); + ((void (*)(lv_cache_t *, const char *))lv_cache_set_name)(cache, name); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_open_struct_method_def = { - "lv_fs_open", - (PyCFunction)py_lv_fs_open_struct_method, +static PyMethodDef py_lv_cache_set_name_struct_method_def = { + "lv_cache_set_name", + (PyCFunction)py_lv_cache_set_name_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88403,28 +100955,28 @@ static PyMethodDef py_lv_fs_open_struct_method_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_close(lv_fs_file_t *file_p) + * const char *lv_cache_get_name(lv_cache_t *cache) */ -static PyObject *py_lv_fs_close_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_get_name_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + const char * _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_file_t *))lv_fs_close)(file_p); + _res = ((const char *(*)(lv_cache_t *))lv_cache_get_name)(cache); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_fs_close_struct_method_def = { - "lv_fs_close", - (PyCFunction)py_lv_fs_close_struct_method, +static PyMethodDef py_lv_cache_get_name_struct_method_def = { + "lv_cache_get_name", + (PyCFunction)py_lv_cache_get_name_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88432,97 +100984,122 @@ static PyMethodDef py_lv_fs_close_struct_method_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_read(lv_fs_file_t *file_p, void *buf, uint32_t btr, uint32_t *br) + * lv_iter_t *lv_cache_iter_create(lv_cache_t *cache) */ -static PyObject *py_lv_fs_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_iter_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; long btr_val; PyObject *br_py; - if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &btr_val, &br_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); - void *buf = mp_to_ptr(buf_py); - uint32_t btr = (uint32_t)btr_val; - uint32_t *br = mp_array_to_u32ptr(br_py); + + lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + lv_iter_t * _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_file_t *, void *, uint32_t, uint32_t *))lv_fs_read)(file_p, buf, btr, br); + _res = ((lv_iter_t *(*)(lv_cache_t *))lv_cache_iter_create)(cache); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_iter_t((void*)_res); } -static PyMethodDef py_lv_fs_read_struct_method_def = { - "lv_fs_read", - (PyCFunction)py_lv_fs_read_struct_method, +static PyMethodDef py_lv_cache_iter_create_struct_method_def = { + "lv_cache_iter_create", + (PyCFunction)py_lv_cache_iter_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_cache_t_methods[] = { + {"destroy", (PyCFunction)py_lv_cache_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"acquire", (PyCFunction)py_lv_cache_acquire_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"acquire_or_create", (PyCFunction)py_lv_cache_acquire_or_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add", (PyCFunction)py_lv_cache_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"release", (PyCFunction)py_lv_cache_release_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reserve", (PyCFunction)py_lv_cache_reserve_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"drop", (PyCFunction)py_lv_cache_drop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"drop_all", (PyCFunction)py_lv_cache_drop_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"evict_one", (PyCFunction)py_lv_cache_evict_one_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_max_size", (PyCFunction)py_lv_cache_set_max_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_max_size", (PyCFunction)py_lv_cache_get_max_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_size", (PyCFunction)py_lv_cache_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_free_size", (PyCFunction)py_lv_cache_get_free_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_enabled", (PyCFunction)py_lv_cache_is_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_compare_cb", (PyCFunction)py_lv_cache_set_compare_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_create_cb", (PyCFunction)py_lv_cache_set_create_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_free_cb", (PyCFunction)py_lv_cache_set_free_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_name", (PyCFunction)py_lv_cache_set_name_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_name", (PyCFunction)py_lv_cache_get_name_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"iter_create", (PyCFunction)py_lv_cache_iter_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_write(lv_fs_file_t *file_p, const void *buf, uint32_t btw, uint32_t *bw) + * lv_cache_t *lv_cache_create(const lv_cache_class_t *cache_class, size_t node_size, size_t max_size, lv_cache_ops_t ops) */ -static PyObject *py_lv_fs_write_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; long btw_val; PyObject *bw_py; - if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &btw_val, &bw_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); - const void *buf = (const void *)mp_to_ptr(buf_py); - uint32_t btw = (uint32_t)btw_val; - uint32_t *bw = mp_array_to_u32ptr(bw_py); + long node_size_val; long max_size_val; PyObject *ops_py; + if (!PyArg_ParseTuple(py_args, "llO", &node_size_val, &max_size_val, &ops_py)) { PyGILState_Release(gstate); return NULL; } + const lv_cache_class_t *cache_class = (lv_cache_class_t *)mp_write_ptr_lv_cache_class_t(self); + size_t node_size = (size_t)node_size_val; + size_t max_size = (size_t)max_size_val; + lv_cache_ops_t ops = mp_write_lv_cache_ops_t(ops_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + lv_cache_t * _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_file_t *, const void *, uint32_t, uint32_t *))lv_fs_write)(file_p, buf, btw, bw); + _res = ((lv_cache_t *(*)(const lv_cache_class_t *, size_t, size_t, lv_cache_ops_t))lv_cache_create)(cache_class, node_size, max_size, ops); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_cache_t((void*)_res); } -static PyMethodDef py_lv_fs_write_struct_method_def = { - "lv_fs_write", - (PyCFunction)py_lv_fs_write_struct_method, +static PyMethodDef py_lv_cache_create_struct_method_def = { + "lv_cache_create", + (PyCFunction)py_lv_cache_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_cache_class_t_methods[] = { + {"create", (PyCFunction)py_lv_cache_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_cache_ops_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_seek(lv_fs_file_t *file_p, uint32_t pos, lv_fs_whence_t whence) + * const lv_cache_t *lv_cache_entry_get_cache(const lv_cache_entry_t *entry) */ -static PyObject *py_lv_fs_seek_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long pos_val; PyObject *whence_py; - if (!PyArg_ParseTuple(py_args, "lO", &pos_val, &whence_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); - uint32_t pos = (uint32_t)pos_val; - lv_fs_whence_t whence = (int)mp_obj_get_int(whence_py); + + const lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + const lv_cache_t * _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_file_t *, uint32_t, lv_fs_whence_t))lv_fs_seek)(file_p, pos, whence); + _res = ((const lv_cache_t *(*)(const lv_cache_entry_t *))lv_cache_entry_get_cache)(entry); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_cache_t((void*)_res); } -static PyMethodDef py_lv_fs_seek_struct_method_def = { - "lv_fs_seek", - (PyCFunction)py_lv_fs_seek_struct_method, +static PyMethodDef py_lv_cache_entry_get_cache_struct_method_def = { + "lv_cache_entry_get_cache", + (PyCFunction)py_lv_cache_entry_get_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88530,30 +101107,30 @@ static PyMethodDef py_lv_fs_seek_struct_method_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_tell(lv_fs_file_t *file_p, uint32_t *pos) + * void lv_cache_entry_init(lv_cache_entry_t *entry, const lv_cache_t *cache, const uint32_t node_size) */ -static PyObject *py_lv_fs_tell_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *pos_py; - if (!PyArg_ParseTuple(py_args, "O", &pos_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); - uint32_t *pos = mp_array_to_u32ptr(pos_py); + PyObject *cache_py; long node_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &cache_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); + const uint32_t node_size = (const uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_file_t *, uint32_t *))lv_fs_tell)(file_p, pos); + ((void (*)(lv_cache_entry_t *, const lv_cache_t *, const uint32_t))lv_cache_entry_init)(entry, cache, node_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_tell_struct_method_def = { - "lv_fs_tell", - (PyCFunction)py_lv_fs_tell_struct_method, +static PyMethodDef py_lv_cache_entry_init_struct_method_def = { + "lv_cache_entry_init", + (PyCFunction)py_lv_cache_entry_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88561,70 +101138,56 @@ static PyMethodDef py_lv_fs_tell_struct_method_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_get_size(lv_fs_file_t *file_p, uint32_t *size_res) + * void lv_cache_entry_delete(lv_cache_entry_t *entry) */ -static PyObject *py_lv_fs_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *size_res_py; - if (!PyArg_ParseTuple(py_args, "O", &size_res_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_file_t *file_p = (lv_fs_file_t *)mp_write_ptr_lv_fs_file_t(self); - uint32_t *size_res = mp_array_to_u32ptr(size_res_py); + + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_file_t *, uint32_t *))lv_fs_get_size)(file_p, size_res); + ((void (*)(lv_cache_entry_t *))lv_cache_entry_delete)(entry); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_get_size_struct_method_def = { - "lv_fs_get_size", - (PyCFunction)py_lv_fs_get_size_struct_method, +static PyMethodDef py_lv_cache_entry_delete_struct_method_def = { + "lv_cache_entry_delete", + (PyCFunction)py_lv_cache_entry_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_fs_file_t_methods[] = { - {"open", (PyCFunction)py_lv_fs_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"close", (PyCFunction)py_lv_fs_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"read", (PyCFunction)py_lv_fs_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"write", (PyCFunction)py_lv_fs_write_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"seek", (PyCFunction)py_lv_fs_seek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"tell", (PyCFunction)py_lv_fs_tell_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_size", (PyCFunction)py_lv_fs_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_fs_drv_init(lv_fs_drv_t *drv) + * int32_t lv_cache_entry_get_ref(lv_cache_entry_t *entry) */ -static PyObject *py_lv_fs_drv_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_fs_drv_t *drv = (lv_fs_drv_t *)mp_write_ptr_lv_fs_drv_t(self); + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_fs_drv_t *))lv_fs_drv_init)(drv); + _res = ((int32_t (*)(lv_cache_entry_t *))lv_cache_entry_get_ref)(entry); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_fs_drv_init_struct_method_def = { - "lv_fs_drv_init", - (PyCFunction)py_lv_fs_drv_init_struct_method, +static PyMethodDef py_lv_cache_entry_get_ref_struct_method_def = { + "lv_cache_entry_get_ref", + (PyCFunction)py_lv_cache_entry_get_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88632,65 +101195,57 @@ static PyMethodDef py_lv_fs_drv_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_fs_drv_register(lv_fs_drv_t *drv) + * uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t *entry) */ -static PyObject *py_lv_fs_drv_register_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_node_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_fs_drv_t *drv = (lv_fs_drv_t *)mp_write_ptr_lv_fs_drv_t(self); + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_fs_drv_t *))lv_fs_drv_register)(drv); + _res = ((uint32_t (*)(lv_cache_entry_t *))lv_cache_entry_get_node_size)(entry); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_fs_drv_register_struct_method_def = { - "lv_fs_drv_register", - (PyCFunction)py_lv_fs_drv_register_struct_method, +static PyMethodDef py_lv_cache_entry_get_node_size_struct_method_def = { + "lv_cache_entry_get_node_size", + (PyCFunction)py_lv_cache_entry_get_node_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_fs_drv_t_methods[] = { - {"init", (PyCFunction)py_lv_fs_drv_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"register", (PyCFunction)py_lv_fs_drv_register_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_fs_file_cache_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_cache_destroy(lv_cache_t *cache, void *user_data) + * bool lv_cache_entry_is_invalid(lv_cache_entry_t *entry) */ -static PyObject *py_lv_cache_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_is_invalid_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); + + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_cache_t *, void *))lv_cache_destroy)(cache, user_data); + _res = ((bool (*)(lv_cache_entry_t *))lv_cache_entry_is_invalid)(entry); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_cache_destroy_struct_method_def = { - "lv_cache_destroy", - (PyCFunction)py_lv_cache_destroy_struct_method, +static PyMethodDef py_lv_cache_entry_is_invalid_struct_method_def = { + "lv_cache_entry_is_invalid", + (PyCFunction)py_lv_cache_entry_is_invalid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88698,31 +101253,28 @@ static PyMethodDef py_lv_cache_destroy_struct_method_def = { /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_acquire(lv_cache_t *cache, const void *key, void *user_data) + * void *lv_cache_entry_get_data(lv_cache_entry_t *entry) */ -static PyObject *py_lv_cache_acquire_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - const void *key = (const void *)mp_to_ptr(key_py); + + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_cache_acquire)(cache, key, user_data); + _res = ((void *(*)(lv_cache_entry_t *))lv_cache_entry_get_data)(entry); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_cache_acquire_struct_method_def = { - "lv_cache_acquire", - (PyCFunction)py_lv_cache_acquire_struct_method, +static PyMethodDef py_lv_cache_entry_get_data_struct_method_def = { + "lv_cache_entry_get_data", + (PyCFunction)py_lv_cache_entry_get_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88730,31 +101282,27 @@ static PyMethodDef py_lv_cache_acquire_struct_method_def = { /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_acquire_or_create(lv_cache_t *cache, const void *key, void *user_data) + * void lv_cache_entry_reset_ref(lv_cache_entry_t *entry) */ -static PyObject *py_lv_cache_acquire_or_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_reset_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - const void *key = (const void *)mp_to_ptr(key_py); + + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_cache_acquire_or_create)(cache, key, user_data); + ((void (*)(lv_cache_entry_t *))lv_cache_entry_reset_ref)(entry); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_acquire_or_create_struct_method_def = { - "lv_cache_acquire_or_create", - (PyCFunction)py_lv_cache_acquire_or_create_struct_method, +static PyMethodDef py_lv_cache_entry_reset_ref_struct_method_def = { + "lv_cache_entry_reset_ref", + (PyCFunction)py_lv_cache_entry_reset_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88762,31 +101310,27 @@ static PyMethodDef py_lv_cache_acquire_or_create_struct_method_def = { /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_add(lv_cache_t *cache, const void *key, void *user_data) + * void lv_cache_entry_inc_ref(lv_cache_entry_t *entry) */ -static PyObject *py_lv_cache_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_inc_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - const void *key = (const void *)mp_to_ptr(key_py); + + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(lv_cache_t *, const void *, void *))lv_cache_add)(cache, key, user_data); + ((void (*)(lv_cache_entry_t *))lv_cache_entry_inc_ref)(entry); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_add_struct_method_def = { - "lv_cache_add", - (PyCFunction)py_lv_cache_add_struct_method, +static PyMethodDef py_lv_cache_entry_inc_ref_struct_method_def = { + "lv_cache_entry_inc_ref", + (PyCFunction)py_lv_cache_entry_inc_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88794,30 +101338,27 @@ static PyMethodDef py_lv_cache_add_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_release(lv_cache_t *cache, lv_cache_entry_t *entry, void *user_data) + * void lv_cache_entry_dec_ref(lv_cache_entry_t *entry) */ -static PyObject *py_lv_cache_release_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_dec_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *entry_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &entry_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - lv_cache_entry_t *entry = mp_write_ptr_lv_cache_entry_t(entry_py); + + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_t *, lv_cache_entry_t *, void *))lv_cache_release)(cache, entry, user_data); + ((void (*)(lv_cache_entry_t *))lv_cache_entry_dec_ref)(entry); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_release_struct_method_def = { - "lv_cache_release", - (PyCFunction)py_lv_cache_release_struct_method, +static PyMethodDef py_lv_cache_entry_dec_ref_struct_method_def = { + "lv_cache_entry_dec_ref", + (PyCFunction)py_lv_cache_entry_dec_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88825,30 +101366,29 @@ static PyMethodDef py_lv_cache_release_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_reserve(lv_cache_t *cache, uint32_t reserved_size, void *user_data) + * void lv_cache_entry_set_node_size(lv_cache_entry_t *entry, uint32_t node_size) */ -static PyObject *py_lv_cache_reserve_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_set_node_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long reserved_size_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "lO", &reserved_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - uint32_t reserved_size = (uint32_t)reserved_size_val; + long node_size_val; + if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + uint32_t node_size = (uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_t *, uint32_t, void *))lv_cache_reserve)(cache, reserved_size, user_data); + ((void (*)(lv_cache_entry_t *, uint32_t))lv_cache_entry_set_node_size)(entry, node_size); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_reserve_struct_method_def = { - "lv_cache_reserve", - (PyCFunction)py_lv_cache_reserve_struct_method, +static PyMethodDef py_lv_cache_entry_set_node_size_struct_method_def = { + "lv_cache_entry_set_node_size", + (PyCFunction)py_lv_cache_entry_set_node_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88856,30 +101396,29 @@ static PyMethodDef py_lv_cache_reserve_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_drop(lv_cache_t *cache, const void *key, void *user_data) + * void lv_cache_entry_set_cache(lv_cache_entry_t *entry, const lv_cache_t *cache) */ -static PyObject *py_lv_cache_drop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_set_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &key_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - const void *key = (const void *)mp_to_ptr(key_py); + PyObject *cache_py; + if (!PyArg_ParseTuple(py_args, "O", &cache_py)) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_t *, const void *, void *))lv_cache_drop)(cache, key, user_data); + ((void (*)(lv_cache_entry_t *, const lv_cache_t *))lv_cache_entry_set_cache)(entry, cache); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_drop_struct_method_def = { - "lv_cache_drop", - (PyCFunction)py_lv_cache_drop_struct_method, +static PyMethodDef py_lv_cache_entry_set_cache_struct_method_def = { + "lv_cache_entry_set_cache", + (PyCFunction)py_lv_cache_entry_set_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88887,29 +101426,28 @@ static PyMethodDef py_lv_cache_drop_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_drop_all(lv_cache_t *cache, void *user_data) + * void *lv_cache_entry_acquire_data(lv_cache_entry_t *entry) */ -static PyObject *py_lv_cache_drop_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_acquire_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); + + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_cache_t *, void *))lv_cache_drop_all)(cache, user_data); + _res = ((void *(*)(lv_cache_entry_t *))lv_cache_entry_acquire_data)(entry); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_cache_drop_all_struct_method_def = { - "lv_cache_drop_all", - (PyCFunction)py_lv_cache_drop_all_struct_method, +static PyMethodDef py_lv_cache_entry_acquire_data_struct_method_def = { + "lv_cache_entry_acquire_data", + (PyCFunction)py_lv_cache_entry_acquire_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88917,30 +101455,29 @@ static PyMethodDef py_lv_cache_drop_all_struct_method_def = { /* * lvgl extension definition for: - * bool lv_cache_evict_one(lv_cache_t *cache, void *user_data) + * void lv_cache_entry_release_data(lv_cache_entry_t *entry, void *user_data) */ -static PyObject *py_lv_cache_evict_one_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_release_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; PyObject *user_data_py; if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_cache_t *, void *))lv_cache_evict_one)(cache, user_data); + ((void (*)(lv_cache_entry_t *, void *))lv_cache_entry_release_data)(entry, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_evict_one_struct_method_def = { - "lv_cache_evict_one", - (PyCFunction)py_lv_cache_evict_one_struct_method, +static PyMethodDef py_lv_cache_entry_release_data_struct_method_def = { + "lv_cache_entry_release_data", + (PyCFunction)py_lv_cache_entry_release_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88948,30 +101485,29 @@ static PyMethodDef py_lv_cache_evict_one_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_set_max_size(lv_cache_t *cache, size_t max_size, void *user_data) + * void lv_cache_entry_set_flag(lv_cache_entry_t *entry, uint8_t flags) */ -static PyObject *py_lv_cache_set_max_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_set_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long max_size_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "lO", &max_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - size_t max_size = (size_t)max_size_val; + long flags_val; + if (!PyArg_ParseTuple(py_args, "l", &flags_val)) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + uint8_t flags = (uint8_t)flags_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_t *, size_t, void *))lv_cache_set_max_size)(cache, max_size, user_data); + ((void (*)(lv_cache_entry_t *, uint8_t))lv_cache_entry_set_flag)(entry, flags); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_set_max_size_struct_method_def = { - "lv_cache_set_max_size", - (PyCFunction)py_lv_cache_set_max_size_struct_method, +static PyMethodDef py_lv_cache_entry_set_flag_struct_method_def = { + "lv_cache_entry_set_flag", + (PyCFunction)py_lv_cache_entry_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88979,30 +101515,29 @@ static PyMethodDef py_lv_cache_set_max_size_struct_method_def = { /* * lvgl extension definition for: - * size_t lv_cache_get_max_size(lv_cache_t *cache, void *user_data) + * void lv_cache_entry_remove_flag(lv_cache_entry_t *entry, uint8_t flags) */ -static PyObject *py_lv_cache_get_max_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_remove_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); + long flags_val; + if (!PyArg_ParseTuple(py_args, "l", &flags_val)) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + uint8_t flags = (uint8_t)flags_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; lvpy_lock(); - _res = ((size_t (*)(lv_cache_t *, void *))lv_cache_get_max_size)(cache, user_data); + ((void (*)(lv_cache_entry_t *, uint8_t))lv_cache_entry_remove_flag)(entry, flags); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_get_max_size_struct_method_def = { - "lv_cache_get_max_size", - (PyCFunction)py_lv_cache_get_max_size_struct_method, +static PyMethodDef py_lv_cache_entry_remove_flag_struct_method_def = { + "lv_cache_entry_remove_flag", + (PyCFunction)py_lv_cache_entry_remove_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89010,61 +101545,81 @@ static PyMethodDef py_lv_cache_get_max_size_struct_method_def = { /* * lvgl extension definition for: - * size_t lv_cache_get_size(lv_cache_t *cache, void *user_data) + * bool lv_cache_entry_has_flag(lv_cache_entry_t *entry, uint8_t flags) */ -static PyObject *py_lv_cache_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_has_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); + long flags_val; + if (!PyArg_ParseTuple(py_args, "l", &flags_val)) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + uint8_t flags = (uint8_t)flags_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; + bool _res; lvpy_lock(); - _res = ((size_t (*)(lv_cache_t *, void *))lv_cache_get_size)(cache, user_data); + _res = ((bool (*)(lv_cache_entry_t *, uint8_t))lv_cache_entry_has_flag)(entry, flags); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_cache_get_size_struct_method_def = { - "lv_cache_get_size", - (PyCFunction)py_lv_cache_get_size_struct_method, +static PyMethodDef py_lv_cache_entry_has_flag_struct_method_def = { + "lv_cache_entry_has_flag", + (PyCFunction)py_lv_cache_entry_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_cache_entry_t_methods[] = { + {"get_cache", (PyCFunction)py_lv_cache_entry_get_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_cache_entry_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete", (PyCFunction)py_lv_cache_entry_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_ref", (PyCFunction)py_lv_cache_entry_get_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_node_size", (PyCFunction)py_lv_cache_entry_get_node_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_invalid", (PyCFunction)py_lv_cache_entry_is_invalid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_data", (PyCFunction)py_lv_cache_entry_get_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset_ref", (PyCFunction)py_lv_cache_entry_reset_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"inc_ref", (PyCFunction)py_lv_cache_entry_inc_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dec_ref", (PyCFunction)py_lv_cache_entry_dec_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_node_size", (PyCFunction)py_lv_cache_entry_set_node_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cache", (PyCFunction)py_lv_cache_entry_set_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"acquire_data", (PyCFunction)py_lv_cache_entry_acquire_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"release_data", (PyCFunction)py_lv_cache_entry_release_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flag", (PyCFunction)py_lv_cache_entry_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_flag", (PyCFunction)py_lv_cache_entry_remove_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_flag", (PyCFunction)py_lv_cache_entry_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * size_t lv_cache_get_free_size(lv_cache_t *cache, void *user_data) + * void *lv_iter_get_context(const lv_iter_t *iter) */ -static PyObject *py_lv_cache_get_free_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_get_context_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); + + const lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; + void * _res; lvpy_lock(); - _res = ((size_t (*)(lv_cache_t *, void *))lv_cache_get_free_size)(cache, user_data); + _res = ((void *(*)(const lv_iter_t *))lv_iter_get_context)(iter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_cache_get_free_size_struct_method_def = { - "lv_cache_get_free_size", - (PyCFunction)py_lv_cache_get_free_size_struct_method, +static PyMethodDef py_lv_iter_get_context_struct_method_def = { + "lv_iter_get_context", + (PyCFunction)py_lv_iter_get_context_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89072,196 +101627,119 @@ static PyMethodDef py_lv_cache_get_free_size_struct_method_def = { /* * lvgl extension definition for: - * bool lv_cache_is_enabled(lv_cache_t *cache) + * void lv_iter_destroy(lv_iter_t *iter) */ -static PyObject *py_lv_cache_is_enabled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_cache_t *))lv_cache_is_enabled)(cache); + ((void (*)(lv_iter_t *))lv_iter_destroy)(iter); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_is_enabled_struct_method_def = { - "lv_cache_is_enabled", - (PyCFunction)py_lv_cache_is_enabled_struct_method, +static PyMethodDef py_lv_iter_destroy_struct_method_def = { + "lv_iter_destroy", + (PyCFunction)py_lv_iter_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_cache_compare_res_t lv_cache_compare_cb_t(const void *a, const void *b) - * lv_cache_compare_cb_t compare_cb - */ - - /* * lvgl extension definition for: - * void lv_cache_set_compare_cb(lv_cache_t *cache, lv_cache_compare_cb_t compare_cb, void *user_data) + * lv_result_t lv_iter_next(lv_iter_t *iter, void *elem) */ -static PyObject *py_lv_cache_set_compare_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *compare_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &compare_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *compare_cb = NULL; + PyObject *elem_py; + if (!PyArg_ParseTuple(py_args, "O", &elem_py)) { PyGILState_Release(gstate); return NULL; } + lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + void *elem = mp_to_ptr(elem_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_cache_t *, lv_cache_compare_cb_t, void *))lv_cache_set_compare_cb)(cache, compare_cb, user_data); + _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_iter_next)(iter, elem); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_cache_set_compare_cb_struct_method_def = { - "lv_cache_set_compare_cb", - (PyCFunction)py_lv_cache_set_compare_cb_struct_method, +static PyMethodDef py_lv_iter_next_struct_method_def = { + "lv_iter_next", + (PyCFunction)py_lv_iter_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_cache_set_create_cb_alloc_cb (CPython) - * bool lv_cache_create_cb_t(void *node, void *user_data) - */ -static bool lv_cache_set_create_cb_alloc_cb_callback(void *arg0, void *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_cache_set_create_cb_alloc_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } - bool _c_res = mp_obj_is_true(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * lvgl extension definition for: - * void lv_cache_set_create_cb(lv_cache_t *cache, lv_cache_create_cb_t alloc_cb, void *user_data) + * void lv_iter_make_peekable(lv_iter_t *iter, uint32_t capacity) */ -static PyObject *py_lv_cache_set_create_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_make_peekable_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *alloc_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &alloc_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *alloc_cb = mp_lv_callback(alloc_cb_py, &lv_cache_set_create_cb_alloc_cb_callback, "lv_cache_set_create_cb_alloc_cb", &user_data, NULL, (NULL), (NULL)); + long capacity_val; + if (!PyArg_ParseTuple(py_args, "l", &capacity_val)) { PyGILState_Release(gstate); return NULL; } + lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + uint32_t capacity = (uint32_t)capacity_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_t *, lv_cache_create_cb_t, void *))lv_cache_set_create_cb)(cache, alloc_cb, user_data); + ((void (*)(lv_iter_t *, uint32_t))lv_iter_make_peekable)(iter, capacity); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_set_create_cb_struct_method_def = { - "lv_cache_set_create_cb", - (PyCFunction)py_lv_cache_set_create_cb_struct_method, +static PyMethodDef py_lv_iter_make_peekable_struct_method_def = { + "lv_iter_make_peekable", + (PyCFunction)py_lv_iter_make_peekable_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_cache_set_free_cb_free_cb (CPython) - * void lv_cache_free_cb_t(void *node, void *user_data) - */ -static void lv_cache_set_free_cb_free_cb_callback(void *arg0, void *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_cache_set_free_cb_free_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_cache_set_free_cb(lv_cache_t *cache, lv_cache_free_cb_t free_cb, void *user_data) + * lv_result_t lv_iter_peek(lv_iter_t *iter, void *elem) */ -static PyObject *py_lv_cache_set_free_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_peek_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *free_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &free_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *free_cb = mp_lv_callback(free_cb_py, &lv_cache_set_free_cb_free_cb_callback, "lv_cache_set_free_cb_free_cb", &user_data, NULL, (NULL), (NULL)); + PyObject *elem_py; + if (!PyArg_ParseTuple(py_args, "O", &elem_py)) { PyGILState_Release(gstate); return NULL; } + lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + void *elem = mp_to_ptr(elem_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_cache_t *, lv_cache_free_cb_t, void *))lv_cache_set_free_cb)(cache, free_cb, user_data); + _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_iter_peek)(iter, elem); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_cache_set_free_cb_struct_method_def = { - "lv_cache_set_free_cb", - (PyCFunction)py_lv_cache_set_free_cb_struct_method, +static PyMethodDef py_lv_iter_peek_struct_method_def = { + "lv_iter_peek", + (PyCFunction)py_lv_iter_peek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89269,29 +101747,28 @@ static PyMethodDef py_lv_cache_set_free_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_set_name(lv_cache_t *cache, const char *name) + * lv_result_t lv_iter_peek_advance(lv_iter_t *iter) */ -static PyObject *py_lv_cache_set_name_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_peek_advance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *name_py; - if (!PyArg_ParseTuple(py_args, "O", &name_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); - const char *name = (const char *)(char*)convert_from_str(name_py); + + lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_cache_t *, const char *))lv_cache_set_name)(cache, name); + _res = ((lv_result_t (*)(lv_iter_t *))lv_iter_peek_advance)(iter); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_cache_set_name_struct_method_def = { - "lv_cache_set_name", - (PyCFunction)py_lv_cache_set_name_struct_method, +static PyMethodDef py_lv_iter_peek_advance_struct_method_def = { + "lv_iter_peek_advance", + (PyCFunction)py_lv_iter_peek_advance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89299,180 +101776,182 @@ static PyMethodDef py_lv_cache_set_name_struct_method_def = { /* * lvgl extension definition for: - * const char *lv_cache_get_name(lv_cache_t *cache) + * lv_result_t lv_iter_peek_reset(lv_iter_t *iter) */ -static PyObject *py_lv_cache_get_name_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_peek_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_result_t _res; lvpy_lock(); - _res = ((const char *(*)(lv_cache_t *))lv_cache_get_name)(cache); + _res = ((lv_result_t (*)(lv_iter_t *))lv_iter_peek_reset)(iter); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_cache_get_name_struct_method_def = { - "lv_cache_get_name", - (PyCFunction)py_lv_cache_get_name_struct_method, +static PyMethodDef py_lv_iter_peek_reset_struct_method_def = { + "lv_iter_peek_reset", + (PyCFunction)py_lv_iter_peek_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_iter_inspect_cb(void *elem) + * lv_iter_inspect_cb inspect_cb + */ + + /* * lvgl extension definition for: - * lv_iter_t *lv_cache_iter_create(lv_cache_t *cache) + * void lv_iter_inspect(lv_iter_t *iter, lv_iter_inspect_cb inspect_cb) */ -static PyObject *py_lv_cache_iter_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_inspect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_t *cache = (lv_cache_t *)mp_write_ptr_lv_cache_t(self); + PyObject *inspect_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &inspect_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + void *inspect_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_iter_t * _res; lvpy_lock(); - _res = ((lv_iter_t *(*)(lv_cache_t *))lv_cache_iter_create)(cache); + ((void (*)(lv_iter_t *, lv_iter_inspect_cb))lv_iter_inspect)(iter, inspect_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_iter_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_iter_create_struct_method_def = { - "lv_cache_iter_create", - (PyCFunction)py_lv_cache_iter_create_struct_method, +static PyMethodDef py_lv_iter_inspect_struct_method_def = { + "lv_iter_inspect", + (PyCFunction)py_lv_iter_inspect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_cache_t_methods[] = { - {"destroy", (PyCFunction)py_lv_cache_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"acquire", (PyCFunction)py_lv_cache_acquire_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"acquire_or_create", (PyCFunction)py_lv_cache_acquire_or_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add", (PyCFunction)py_lv_cache_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"release", (PyCFunction)py_lv_cache_release_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reserve", (PyCFunction)py_lv_cache_reserve_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"drop", (PyCFunction)py_lv_cache_drop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"drop_all", (PyCFunction)py_lv_cache_drop_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"evict_one", (PyCFunction)py_lv_cache_evict_one_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_max_size", (PyCFunction)py_lv_cache_set_max_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_max_size", (PyCFunction)py_lv_cache_get_max_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_size", (PyCFunction)py_lv_cache_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_free_size", (PyCFunction)py_lv_cache_get_free_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_enabled", (PyCFunction)py_lv_cache_is_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_compare_cb", (PyCFunction)py_lv_cache_set_compare_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_create_cb", (PyCFunction)py_lv_cache_set_create_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_free_cb", (PyCFunction)py_lv_cache_set_free_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_name", (PyCFunction)py_lv_cache_set_name_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_name", (PyCFunction)py_lv_cache_get_name_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"iter_create", (PyCFunction)py_lv_cache_iter_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_iter_t_methods[] = { + {"get_context", (PyCFunction)py_lv_iter_get_context_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"destroy", (PyCFunction)py_lv_iter_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"next", (PyCFunction)py_lv_iter_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"make_peekable", (PyCFunction)py_lv_iter_make_peekable_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"peek", (PyCFunction)py_lv_iter_peek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"peek_advance", (PyCFunction)py_lv_iter_peek_advance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"peek_reset", (PyCFunction)py_lv_iter_peek_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"inspect", (PyCFunction)py_lv_iter_inspect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; +PyMethodDef py_lv_image_cache_data_t_methods[] = {{NULL}}; +PyMethodDef py_lv_cache_slot_size_t_methods[] = {{NULL}}; +PyMethodDef py_lv_calendar_date_t_methods[] = {{NULL}}; +PyMethodDef py_lv_chart_series_t_methods[] = {{NULL}}; +PyMethodDef py_lv_chart_cursor_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * lv_cache_t *lv_cache_create(const lv_cache_class_t *cache_class, size_t node_size, size_t max_size, lv_cache_ops_t ops) + * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) */ -static PyObject *py_lv_cache_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_section_set_range_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long node_size_val; long max_size_val; PyObject *ops_py; - if (!PyArg_ParseTuple(py_args, "llO", &node_size_val, &max_size_val, &ops_py)) { PyGILState_Release(gstate); return NULL; } - const lv_cache_class_t *cache_class = (lv_cache_class_t *)mp_write_ptr_lv_cache_class_t(self); - size_t node_size = (size_t)node_size_val; - size_t max_size = (size_t)max_size_val; - lv_cache_ops_t ops = mp_write_lv_cache_ops_t(ops_py); + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + lv_scale_section_t *section = (lv_scale_section_t *)mp_write_ptr_lv_scale_section_t(self); + int32_t min = (int32_t)min_val; + int32_t max = (int32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_t * _res; lvpy_lock(); - _res = ((lv_cache_t *(*)(const lv_cache_class_t *, size_t, size_t, lv_cache_ops_t))lv_cache_create)(cache_class, node_size, max_size, ops); + ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_scale_section_set_range)(section, min, max); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_create_struct_method_def = { - "lv_cache_create", - (PyCFunction)py_lv_cache_create_struct_method, +static PyMethodDef py_lv_scale_section_set_range_struct_method_def = { + "lv_scale_section_set_range", + (PyCFunction)py_lv_scale_section_set_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_cache_class_t_methods[] = { - {"create", (PyCFunction)py_lv_cache_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_cache_ops_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * int32_t lv_cache_entry_get_ref(lv_cache_entry_t *entry) + * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) */ -static PyObject *py_lv_cache_entry_get_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_scale_section_set_style_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + PyObject *part_py; PyObject *section_part_style_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, §ion_part_style_py)) { PyGILState_Release(gstate); return NULL; } + lv_scale_section_t *section = (lv_scale_section_t *)mp_write_ptr_lv_scale_section_t(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_t *section_part_style = mp_write_ptr_lv_style_t(section_part_style_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_cache_entry_t *))lv_cache_entry_get_ref)(entry); + ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_scale_section_set_style)(section, part, section_part_style); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_get_ref_struct_method_def = { - "lv_cache_entry_get_ref", - (PyCFunction)py_lv_cache_entry_get_ref_struct_method, +static PyMethodDef py_lv_scale_section_set_style_struct_method_def = { + "lv_scale_section_set_style", + (PyCFunction)py_lv_scale_section_set_style_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_scale_section_t_methods[] = { + {"set_range", (PyCFunction)py_lv_scale_section_set_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_style", (PyCFunction)py_lv_scale_section_set_style_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * uint32_t lv_cache_entry_get_node_size(lv_cache_entry_t *entry) + * void lv_span_set_text(lv_span_t *span, const char *text) */ -static PyObject *py_lv_cache_entry_get_node_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_set_text_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_cache_entry_t *))lv_cache_entry_get_node_size)(entry); + ((void (*)(lv_span_t *, const char *))lv_span_set_text)(span, text); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_get_node_size_struct_method_def = { - "lv_cache_entry_get_node_size", - (PyCFunction)py_lv_cache_entry_get_node_size_struct_method, +static PyMethodDef py_lv_span_set_text_struct_method_def = { + "lv_span_set_text", + (PyCFunction)py_lv_span_set_text_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89480,28 +101959,29 @@ static PyMethodDef py_lv_cache_entry_get_node_size_struct_method_def = { /* * lvgl extension definition for: - * bool lv_cache_entry_is_invalid(lv_cache_entry_t *entry) + * void lv_span_set_text_fmt(lv_span_t *span, const char *fmt, ...) */ -static PyObject *py_lv_cache_entry_is_invalid_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_set_text_fmt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + PyObject *fmt_py; + if (!PyArg_ParseTuple(py_args, "O", &fmt_py)) { PyGILState_Release(gstate); return NULL; } + lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); + const char *fmt = (const char *)(char*)convert_from_str(fmt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_cache_entry_t *))lv_cache_entry_is_invalid)(entry); + ((void (*)(lv_span_t *, const char *, ...))lv_span_set_text_fmt)(span, fmt); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_is_invalid_struct_method_def = { - "lv_cache_entry_is_invalid", - (PyCFunction)py_lv_cache_entry_is_invalid_struct_method, +static PyMethodDef py_lv_span_set_text_fmt_struct_method_def = { + "lv_span_set_text_fmt", + (PyCFunction)py_lv_span_set_text_fmt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89509,28 +101989,29 @@ static PyMethodDef py_lv_cache_entry_is_invalid_struct_method_def = { /* * lvgl extension definition for: - * void *lv_cache_entry_get_data(lv_cache_entry_t *entry) + * void lv_span_set_text_static(lv_span_t *span, const char *text) */ -static PyObject *py_lv_cache_entry_get_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_set_text_static_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + PyObject *text_py; + if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } + lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); + const char *text = (const char *)(char*)convert_from_str(text_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_cache_entry_t *))lv_cache_entry_get_data)(entry); + ((void (*)(lv_span_t *, const char *))lv_span_set_text_static)(span, text); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_get_data_struct_method_def = { - "lv_cache_entry_get_data", - (PyCFunction)py_lv_cache_entry_get_data_struct_method, +static PyMethodDef py_lv_span_set_text_static_struct_method_def = { + "lv_span_set_text_static", + (PyCFunction)py_lv_span_set_text_static_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89538,28 +102019,28 @@ static PyMethodDef py_lv_cache_entry_get_data_struct_method_def = { /* * lvgl extension definition for: - * const lv_cache_t *lv_cache_entry_get_cache(const lv_cache_entry_t *entry) + * lv_style_t *lv_span_get_style(lv_span_t *span) */ -static PyObject *py_lv_cache_entry_get_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_get_style_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_cache_t * _res; + lv_style_t * _res; lvpy_lock(); - _res = ((const lv_cache_t *(*)(const lv_cache_entry_t *))lv_cache_entry_get_cache)(entry); + _res = ((lv_style_t *(*)(lv_span_t *))lv_span_get_style)(span); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_t((void*)_res); + return mp_read_ptr_lv_style_t((void*)_res); } -static PyMethodDef py_lv_cache_entry_get_cache_struct_method_def = { - "lv_cache_entry_get_cache", - (PyCFunction)py_lv_cache_entry_get_cache_struct_method, +static PyMethodDef py_lv_span_get_style_struct_method_def = { + "lv_span_get_style", + (PyCFunction)py_lv_span_get_style_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89567,86 +102048,106 @@ static PyMethodDef py_lv_cache_entry_get_cache_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_entry_init(lv_cache_entry_t *entry, const lv_cache_t *cache, const uint32_t node_size) + * const char *lv_span_get_text(lv_span_t *span) */ -static PyObject *py_lv_cache_entry_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_get_text_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cache_py; long node_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &cache_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); - const uint32_t node_size = (const uint32_t)node_size_val; + + lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(lv_cache_entry_t *, const lv_cache_t *, const uint32_t))lv_cache_entry_init)(entry, cache, node_size); + _res = ((const char *(*)(lv_span_t *))lv_span_get_text)(span); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_cache_entry_init_struct_method_def = { - "lv_cache_entry_init", - (PyCFunction)py_lv_cache_entry_init_struct_method, +static PyMethodDef py_lv_span_get_text_struct_method_def = { + "lv_span_get_text", + (PyCFunction)py_lv_span_get_text_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_span_t_methods[] = { + {"set_text", (PyCFunction)py_lv_span_set_text_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_fmt", (PyCFunction)py_lv_span_set_text_fmt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_text_static", (PyCFunction)py_lv_span_set_text_static_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_style", (PyCFunction)py_lv_span_get_style_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_text", (PyCFunction)py_lv_span_get_text_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_span_coords_t_methods[] = {{NULL}}; +PyMethodDef py_lv_font_class_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_cache_entry_delete(lv_cache_entry_t *entry) + * lv_tree_node_t *lv_tree_node_create(const lv_tree_class_t *class_p, lv_tree_node_t *parent) */ -static PyObject *py_lv_cache_entry_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tree_node_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + const lv_tree_class_t *class_p = (lv_tree_class_t *)mp_write_ptr_lv_tree_class_t(self); + lv_tree_node_t *parent = mp_write_ptr_lv_tree_node_t(parent_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_tree_node_t * _res; lvpy_lock(); - ((void (*)(lv_cache_entry_t *))lv_cache_entry_delete)(entry); + _res = ((lv_tree_node_t *(*)(const lv_tree_class_t *, lv_tree_node_t *))lv_tree_node_create)(class_p, parent); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_tree_node_t((void*)_res); } -static PyMethodDef py_lv_cache_entry_delete_struct_method_def = { - "lv_cache_entry_delete", - (PyCFunction)py_lv_cache_entry_delete_struct_method, +static PyMethodDef py_lv_tree_node_create_struct_method_def = { + "lv_tree_node_create", + (PyCFunction)py_lv_tree_node_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_tree_class_t_methods[] = { + {"node_create", (PyCFunction)py_lv_tree_node_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_cache_entry_reset_ref(lv_cache_entry_t *entry) + * inline static lv_color_t lv_color16_to_color(lv_color16_t c) */ -static PyObject *py_lv_cache_entry_reset_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color16_to_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + lv_color16_t c = {0}; { lv_color16_t *p_ = (lv_color16_t *)mp_write_ptr_lv_color16_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_cache_entry_t *))lv_cache_entry_reset_ref)(entry); + _res = ((lv_color_t (*)(lv_color16_t))lv_color16_to_color)(c); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_cache_entry_reset_ref_struct_method_def = { - "lv_cache_entry_reset_ref", - (PyCFunction)py_lv_cache_entry_reset_ref_struct_method, +static PyMethodDef py_lv_color16_to_color_struct_method_def = { + "lv_color16_to_color", + (PyCFunction)py_lv_color16_to_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89654,27 +102155,29 @@ static PyMethodDef py_lv_cache_entry_reset_ref_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_entry_inc_ref(lv_cache_entry_t *entry) + * void lv_color16_premultiply(lv_color16_t *c, lv_opa_t a) */ -static PyObject *py_lv_cache_entry_inc_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color16_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + long a_val; + if (!PyArg_ParseTuple(py_args, "l", &a_val)) { PyGILState_Release(gstate); return NULL; } + lv_color16_t *c = (lv_color16_t *)mp_write_ptr_lv_color16_t(self); + lv_opa_t a = (lv_opa_t)a_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_entry_t *))lv_cache_entry_inc_ref)(entry); + ((void (*)(lv_color16_t *, lv_opa_t))lv_color16_premultiply)(c, a); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_inc_ref_struct_method_def = { - "lv_cache_entry_inc_ref", - (PyCFunction)py_lv_cache_entry_inc_ref_struct_method, +static PyMethodDef py_lv_color16_premultiply_struct_method_def = { + "lv_color16_premultiply", + (PyCFunction)py_lv_color16_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89682,57 +102185,64 @@ static PyMethodDef py_lv_cache_entry_inc_ref_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_entry_dec_ref(lv_cache_entry_t *entry) + * uint8_t lv_color16_luminance(const lv_color16_t c) */ -static PyObject *py_lv_cache_entry_dec_ref_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color16_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + lv_color16_t c = {0}; { lv_color16_t *p_ = (lv_color16_t *)mp_write_ptr_lv_color16_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint8_t _res; lvpy_lock(); - ((void (*)(lv_cache_entry_t *))lv_cache_entry_dec_ref)(entry); + _res = ((uint8_t (*)(const lv_color16_t))lv_color16_luminance)(c); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_cache_entry_dec_ref_struct_method_def = { - "lv_cache_entry_dec_ref", - (PyCFunction)py_lv_cache_entry_dec_ref_struct_method, +static PyMethodDef py_lv_color16_luminance_struct_method_def = { + "lv_color16_luminance", + (PyCFunction)py_lv_color16_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_color16_t_methods[] = { + {"to_color", (PyCFunction)py_lv_color16_to_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"premultiply", (PyCFunction)py_lv_color16_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"luminance", (PyCFunction)py_lv_color16_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_cache_entry_set_node_size(lv_cache_entry_t *entry, uint32_t node_size) + * void lv_mem_monitor_core(lv_mem_monitor_t *mon_p) */ -static PyObject *py_lv_cache_entry_set_node_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_monitor_core_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long node_size_val; - if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); - uint32_t node_size = (uint32_t)node_size_val; + + lv_mem_monitor_t *mon_p = (lv_mem_monitor_t *)mp_write_ptr_lv_mem_monitor_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_entry_t *, uint32_t))lv_cache_entry_set_node_size)(entry, node_size); + ((void (*)(lv_mem_monitor_t *))lv_mem_monitor_core)(mon_p); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_set_node_size_struct_method_def = { - "lv_cache_entry_set_node_size", - (PyCFunction)py_lv_cache_entry_set_node_size_struct_method, +static PyMethodDef py_lv_mem_monitor_core_struct_method_def = { + "lv_mem_monitor_core", + (PyCFunction)py_lv_mem_monitor_core_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89740,58 +102250,65 @@ static PyMethodDef py_lv_cache_entry_set_node_size_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_entry_set_cache(lv_cache_entry_t *entry, const lv_cache_t *cache) + * void lv_mem_monitor(lv_mem_monitor_t *mon_p) */ -static PyObject *py_lv_cache_entry_set_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_monitor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cache_py; - if (!PyArg_ParseTuple(py_args, "O", &cache_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); + + lv_mem_monitor_t *mon_p = (lv_mem_monitor_t *)mp_write_ptr_lv_mem_monitor_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_entry_t *, const lv_cache_t *))lv_cache_entry_set_cache)(entry, cache); + ((void (*)(lv_mem_monitor_t *))lv_mem_monitor)(mon_p); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_set_cache_struct_method_def = { - "lv_cache_entry_set_cache", - (PyCFunction)py_lv_cache_entry_set_cache_struct_method, +static PyMethodDef py_lv_mem_monitor_struct_method_def = { + "lv_mem_monitor", + (PyCFunction)py_lv_mem_monitor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_mem_monitor_t_methods[] = { + {"core", (PyCFunction)py_lv_mem_monitor_core_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"monitor", (PyCFunction)py_lv_mem_monitor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void *lv_cache_entry_acquire_data(lv_cache_entry_t *entry) + * const void *lv_font_get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_cache_entry_acquire_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); + PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + const void * _res; lvpy_lock(); - _res = ((void *(*)(lv_cache_entry_t *))lv_cache_entry_acquire_data)(entry); + _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_font_get_glyph_bitmap)(g_dsc, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_cache_entry_acquire_data_struct_method_def = { - "lv_cache_entry_acquire_data", - (PyCFunction)py_lv_cache_entry_acquire_data_struct_method, +static PyMethodDef py_lv_font_get_glyph_bitmap_struct_method_def = { + "lv_font_get_glyph_bitmap", + (PyCFunction)py_lv_font_get_glyph_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89799,29 +102316,28 @@ static PyMethodDef py_lv_cache_entry_acquire_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_entry_release_data(lv_cache_entry_t *entry, void *user_data) + * const void *lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t *g_dsc) */ -static PyObject *py_lv_cache_entry_release_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_static_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); - void *user_data = mp_to_ptr(user_data_py); + + lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_cache_entry_t *, void *))lv_cache_entry_release_data)(entry, user_data); + _res = ((const void *(*)(lv_font_glyph_dsc_t *))lv_font_get_glyph_static_bitmap)(g_dsc); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_cache_entry_release_data_struct_method_def = { - "lv_cache_entry_release_data", - (PyCFunction)py_lv_cache_entry_release_data_struct_method, +static PyMethodDef py_lv_font_get_glyph_static_bitmap_struct_method_def = { + "lv_font_get_glyph_static_bitmap", + (PyCFunction)py_lv_font_get_glyph_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89829,29 +102345,27 @@ static PyMethodDef py_lv_cache_entry_release_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_entry_set_flag(lv_cache_entry_t *entry, uint8_t flags) + * void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t *g_dsc) */ -static PyObject *py_lv_cache_entry_set_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_glyph_release_draw_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long flags_val; - if (!PyArg_ParseTuple(py_args, "l", &flags_val)) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); - uint8_t flags = (uint8_t)flags_val; + + lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_cache_entry_t *, uint8_t))lv_cache_entry_set_flag)(entry, flags); + ((void (*)(lv_font_glyph_dsc_t *))lv_font_glyph_release_draw_data)(g_dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_set_flag_struct_method_def = { - "lv_cache_entry_set_flag", - (PyCFunction)py_lv_cache_entry_set_flag_struct_method, +static PyMethodDef py_lv_font_glyph_release_draw_data_struct_method_def = { + "lv_font_glyph_release_draw_data", + (PyCFunction)py_lv_font_glyph_release_draw_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89859,29 +102373,30 @@ static PyMethodDef py_lv_cache_entry_set_flag_struct_method_def = { /* * lvgl extension definition for: - * void lv_cache_entry_remove_flag(lv_cache_entry_t *entry, uint8_t flags) + * const void *lv_font_get_bitmap_fmt_txt(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_cache_entry_remove_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_bitmap_fmt_txt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long flags_val; - if (!PyArg_ParseTuple(py_args, "l", &flags_val)) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); - uint8_t flags = (uint8_t)flags_val; + PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_cache_entry_t *, uint8_t))lv_cache_entry_remove_flag)(entry, flags); + _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_font_get_bitmap_fmt_txt)(g_dsc, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_cache_entry_remove_flag_struct_method_def = { - "lv_cache_entry_remove_flag", - (PyCFunction)py_lv_cache_entry_remove_flag_struct_method, +static PyMethodDef py_lv_font_get_bitmap_fmt_txt_struct_method_def = { + "lv_font_get_bitmap_fmt_txt", + (PyCFunction)py_lv_font_get_bitmap_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89889,83 +102404,61 @@ static PyMethodDef py_lv_cache_entry_remove_flag_struct_method_def = { /* * lvgl extension definition for: - * bool lv_cache_entry_has_flag(lv_cache_entry_t *entry, uint8_t flags) + * int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t *lhs, const lv_font_glyph_dsc_t *rhs) */ -static PyObject *py_lv_cache_entry_has_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_glyph_dsc_compare_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long flags_val; - if (!PyArg_ParseTuple(py_args, "l", &flags_val)) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t *entry = (lv_cache_entry_t *)mp_write_ptr_lv_cache_entry_t(self); - uint8_t flags = (uint8_t)flags_val; + PyObject *rhs_py; + if (!PyArg_ParseTuple(py_args, "O", &rhs_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_glyph_dsc_t *lhs = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); + const lv_font_glyph_dsc_t *rhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(rhs_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_cache_entry_t *, uint8_t))lv_cache_entry_has_flag)(entry, flags); + _res = ((int32_t (*)(const lv_font_glyph_dsc_t *, const lv_font_glyph_dsc_t *))lv_font_glyph_dsc_compare)(lhs, rhs); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_cache_entry_has_flag_struct_method_def = { - "lv_cache_entry_has_flag", - (PyCFunction)py_lv_cache_entry_has_flag_struct_method, +static PyMethodDef py_lv_font_glyph_dsc_compare_struct_method_def = { + "lv_font_glyph_dsc_compare", + (PyCFunction)py_lv_font_glyph_dsc_compare_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_cache_entry_t_methods[] = { - {"get_ref", (PyCFunction)py_lv_cache_entry_get_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_node_size", (PyCFunction)py_lv_cache_entry_get_node_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_invalid", (PyCFunction)py_lv_cache_entry_is_invalid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_data", (PyCFunction)py_lv_cache_entry_get_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cache", (PyCFunction)py_lv_cache_entry_get_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_cache_entry_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete", (PyCFunction)py_lv_cache_entry_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset_ref", (PyCFunction)py_lv_cache_entry_reset_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"inc_ref", (PyCFunction)py_lv_cache_entry_inc_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dec_ref", (PyCFunction)py_lv_cache_entry_dec_ref_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_node_size", (PyCFunction)py_lv_cache_entry_set_node_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cache", (PyCFunction)py_lv_cache_entry_set_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"acquire_data", (PyCFunction)py_lv_cache_entry_acquire_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"release_data", (PyCFunction)py_lv_cache_entry_release_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flag", (PyCFunction)py_lv_cache_entry_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_flag", (PyCFunction)py_lv_cache_entry_remove_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_flag", (PyCFunction)py_lv_cache_entry_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_image_cache_data_t_methods[] = {{NULL}}; -PyMethodDef py_lv_cache_slot_size_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void *lv_iter_get_context(const lv_iter_t *iter) + * const void *lv_font_get_glyph_bitmap_internal(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_iter_get_context_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_bitmap_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + const void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_iter_t *))lv_iter_get_context)(iter); + _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_font_get_glyph_bitmap_internal)(g_dsc, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_iter_get_context_struct_method_def = { - "lv_iter_get_context", - (PyCFunction)py_lv_iter_get_context_struct_method, +static PyMethodDef py_lv_font_get_glyph_bitmap_internal_struct_method_def = { + "lv_font_get_glyph_bitmap_internal", + (PyCFunction)py_lv_font_get_glyph_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89973,27 +102466,28 @@ static PyMethodDef py_lv_iter_get_context_struct_method_def = { /* * lvgl extension definition for: - * void lv_iter_destroy(lv_iter_t *iter) + * const void *lv_font_get_glyph_static_bitmap_internal(lv_font_glyph_dsc_t *g_dsc) */ -static PyObject *py_lv_iter_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_static_bitmap_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const void * _res; lvpy_lock(); - ((void (*)(lv_iter_t *))lv_iter_destroy)(iter); + _res = ((const void *(*)(lv_font_glyph_dsc_t *))lv_font_get_glyph_static_bitmap_internal)(g_dsc); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_iter_destroy_struct_method_def = { - "lv_iter_destroy", - (PyCFunction)py_lv_iter_destroy_struct_method, +static PyMethodDef py_lv_font_get_glyph_static_bitmap_internal_struct_method_def = { + "lv_font_get_glyph_static_bitmap_internal", + (PyCFunction)py_lv_font_get_glyph_static_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90001,301 +102495,318 @@ static PyMethodDef py_lv_iter_destroy_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_iter_next(lv_iter_t *iter, void *elem) + * void lv_font_glyph_release_draw_data_internal(lv_font_glyph_dsc_t *g_dsc) */ -static PyObject *py_lv_iter_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_glyph_release_draw_data_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *elem_py; - if (!PyArg_ParseTuple(py_args, "O", &elem_py)) { PyGILState_Release(gstate); return NULL; } - lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); - void *elem = mp_to_ptr(elem_py); + + lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_iter_next)(iter, elem); + ((void (*)(lv_font_glyph_dsc_t *))lv_font_glyph_release_draw_data_internal)(g_dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_iter_next_struct_method_def = { - "lv_iter_next", - (PyCFunction)py_lv_iter_next_struct_method, +static PyMethodDef py_lv_font_glyph_release_draw_data_internal_struct_method_def = { + "lv_font_glyph_release_draw_data_internal", + (PyCFunction)py_lv_font_glyph_release_draw_data_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_font_glyph_dsc_t_methods[] = { + {"get_glyph_bitmap", (PyCFunction)py_lv_font_get_glyph_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_static_bitmap", (PyCFunction)py_lv_font_get_glyph_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"release_draw_data", (PyCFunction)py_lv_font_glyph_release_draw_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bitmap_fmt_txt", (PyCFunction)py_lv_font_get_bitmap_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"compare", (PyCFunction)py_lv_font_glyph_dsc_compare_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_bitmap_internal", (PyCFunction)py_lv_font_get_glyph_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_static_bitmap_internal", (PyCFunction)py_lv_font_get_glyph_static_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"release_draw_data_internal", (PyCFunction)py_lv_font_glyph_release_draw_data_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_font_glyph_dsc_gid_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_iter_make_peekable(lv_iter_t *iter, uint32_t capacity) + * bool lv_font_info_is_equal(const lv_font_info_t *ft_info_1, const lv_font_info_t *ft_info_2) */ -static PyObject *py_lv_iter_make_peekable_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_info_is_equal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long capacity_val; - if (!PyArg_ParseTuple(py_args, "l", &capacity_val)) { PyGILState_Release(gstate); return NULL; } - lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); - uint32_t capacity = (uint32_t)capacity_val; + PyObject *ft_info_2_py; + if (!PyArg_ParseTuple(py_args, "O", &ft_info_2_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_info_t *ft_info_1 = (lv_font_info_t *)mp_write_ptr_lv_font_info_t(self); + const lv_font_info_t *ft_info_2 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(ft_info_2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_iter_t *, uint32_t))lv_iter_make_peekable)(iter, capacity); + _res = ((bool (*)(const lv_font_info_t *, const lv_font_info_t *))lv_font_info_is_equal)(ft_info_1, ft_info_2); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_iter_make_peekable_struct_method_def = { - "lv_iter_make_peekable", - (PyCFunction)py_lv_iter_make_peekable_struct_method, +static PyMethodDef py_lv_font_info_is_equal_struct_method_def = { + "lv_font_info_is_equal", + (PyCFunction)py_lv_font_info_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_font_info_t_methods[] = { + {"is_equal", (PyCFunction)py_lv_font_info_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_result_t lv_iter_peek(lv_iter_t *iter, void *elem) + * uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void *user_data) */ -static PyObject *py_lv_iter_peek_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *elem_py; - if (!PyArg_ParseTuple(py_args, "O", &elem_py)) { PyGILState_Release(gstate); return NULL; } - lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); - void *elem = mp_to_ptr(elem_py); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_layout_callbacks_t callbacks = {0}; { lv_layout_callbacks_t *p_ = (lv_layout_callbacks_t *)mp_write_ptr_lv_layout_callbacks_t(self); if (p_) callbacks = *p_; } + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_iter_t *, void *))lv_iter_peek)(iter, elem); + _res = ((uint32_t (*)(lv_layout_callbacks_t, void *))lv_layout_create)(callbacks, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_iter_peek_struct_method_def = { - "lv_iter_peek", - (PyCFunction)py_lv_iter_peek_struct_method, +static PyMethodDef py_lv_layout_create_struct_method_def = { + "lv_layout_create", + (PyCFunction)py_lv_layout_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_layout_callbacks_t_methods[] = { + {"create", (PyCFunction)py_lv_layout_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_result_t lv_iter_peek_advance(lv_iter_t *iter) + * void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t *dsc) */ -static PyObject *py_lv_iter_peek_advance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_fill_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + lv_draw_fill_dsc_t *dsc = (lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_iter_t *))lv_iter_peek_advance)(iter); + ((void (*)(lv_draw_fill_dsc_t *))lv_draw_fill_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_iter_peek_advance_struct_method_def = { - "lv_iter_peek_advance", - (PyCFunction)py_lv_iter_peek_advance_struct_method, +static PyMethodDef py_lv_draw_fill_dsc_init_struct_method_def = { + "lv_draw_fill_dsc_init", + (PyCFunction)py_lv_draw_fill_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_fill_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_fill_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_result_t lv_iter_peek_reset(lv_iter_t *iter) + * void lv_draw_border_dsc_init(lv_draw_border_dsc_t *dsc) */ -static PyObject *py_lv_iter_peek_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_border_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); + lv_draw_border_dsc_t *dsc = (lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_iter_t *))lv_iter_peek_reset)(iter); + ((void (*)(lv_draw_border_dsc_t *))lv_draw_border_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_iter_peek_reset_struct_method_def = { - "lv_iter_peek_reset", - (PyCFunction)py_lv_iter_peek_reset_struct_method, +static PyMethodDef py_lv_draw_border_dsc_init_struct_method_def = { + "lv_draw_border_dsc_init", + (PyCFunction)py_lv_draw_border_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_iter_inspect_cb(void *elem) - * lv_iter_inspect_cb inspect_cb - */ - +PyMethodDef py_lv_draw_border_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_border_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + /* * lvgl extension definition for: - * void lv_iter_inspect(lv_iter_t *iter, lv_iter_inspect_cb inspect_cb) + * void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t *dsc) */ -static PyObject *py_lv_iter_inspect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_box_shadow_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *inspect_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &inspect_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_iter_t *iter = (lv_iter_t *)mp_write_ptr_lv_iter_t(self); - void *inspect_cb = NULL; + + lv_draw_box_shadow_dsc_t *dsc = (lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_iter_t *, lv_iter_inspect_cb))lv_iter_inspect)(iter, inspect_cb); + ((void (*)(lv_draw_box_shadow_dsc_t *))lv_draw_box_shadow_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_iter_inspect_struct_method_def = { - "lv_iter_inspect", - (PyCFunction)py_lv_iter_inspect_struct_method, +static PyMethodDef py_lv_draw_box_shadow_dsc_init_struct_method_def = { + "lv_draw_box_shadow_dsc_init", + (PyCFunction)py_lv_draw_box_shadow_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_iter_t_methods[] = { - {"get_context", (PyCFunction)py_lv_iter_get_context_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"destroy", (PyCFunction)py_lv_iter_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"next", (PyCFunction)py_lv_iter_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"make_peekable", (PyCFunction)py_lv_iter_make_peekable_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"peek", (PyCFunction)py_lv_iter_peek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"peek_advance", (PyCFunction)py_lv_iter_peek_advance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"peek_reset", (PyCFunction)py_lv_iter_peek_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"inspect", (PyCFunction)py_lv_iter_inspect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_draw_box_shadow_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_box_shadow_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -PyMethodDef py_lv_calendar_date_t_methods[] = {{NULL}}; -PyMethodDef py_lv_chart_series_t_methods[] = {{NULL}}; -PyMethodDef py_lv_chart_cursor_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * void lv_scale_section_set_range(lv_scale_section_t *section, int32_t min, int32_t max) + * void lv_draw_letter_dsc_init(lv_draw_letter_dsc_t *dsc) */ -static PyObject *py_lv_scale_section_set_range_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_letter_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } - lv_scale_section_t *section = (lv_scale_section_t *)mp_write_ptr_lv_scale_section_t(self); - int32_t min = (int32_t)min_val; - int32_t max = (int32_t)max_val; + + lv_draw_letter_dsc_t *dsc = (lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_scale_section_t *, int32_t, int32_t))lv_scale_section_set_range)(section, min, max); + ((void (*)(lv_draw_letter_dsc_t *))lv_draw_letter_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_section_set_range_struct_method_def = { - "lv_scale_section_set_range", - (PyCFunction)py_lv_scale_section_set_range_struct_method, +static PyMethodDef py_lv_draw_letter_dsc_init_struct_method_def = { + "lv_draw_letter_dsc_init", + (PyCFunction)py_lv_draw_letter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_letter_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_letter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_scale_section_set_style(lv_scale_section_t *section, lv_part_t part, lv_style_t *section_part_style) + * void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t *dsc) */ -static PyObject *py_lv_scale_section_set_style_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_glyph_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *section_part_style_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, §ion_part_style_py)) { PyGILState_Release(gstate); return NULL; } - lv_scale_section_t *section = (lv_scale_section_t *)mp_write_ptr_lv_scale_section_t(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_style_t *section_part_style = mp_write_ptr_lv_style_t(section_part_style_py); + + lv_draw_glyph_dsc_t *dsc = (lv_draw_glyph_dsc_t *)mp_write_ptr_lv_draw_glyph_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_scale_section_t *, lv_part_t, lv_style_t *))lv_scale_section_set_style)(section, part, section_part_style); + ((void (*)(lv_draw_glyph_dsc_t *))lv_draw_glyph_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_scale_section_set_style_struct_method_def = { - "lv_scale_section_set_style", - (PyCFunction)py_lv_scale_section_set_style_struct_method, +static PyMethodDef py_lv_draw_glyph_dsc_init_struct_method_def = { + "lv_draw_glyph_dsc_init", + (PyCFunction)py_lv_draw_glyph_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_scale_section_t_methods[] = { - {"set_range", (PyCFunction)py_lv_scale_section_set_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_style", (PyCFunction)py_lv_scale_section_set_style_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_draw_glyph_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_glyph_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; /* * lvgl extension definition for: - * void lv_span_set_text(lv_span_t *span, const char *text) + * void lv_fs_make_path_from_buffer(lv_fs_path_ex_t *path, char letter, const void *buf, uint32_t size, const char *ext) */ -static PyObject *py_lv_span_set_text_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_make_path_from_buffer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } - lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + long letter_val; PyObject *buf_py; long size_val; PyObject *ext_py; + if (!PyArg_ParseTuple(py_args, "lOlO", &letter_val, &buf_py, &size_val, &ext_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_path_ex_t *path = (lv_fs_path_ex_t *)mp_write_ptr_lv_fs_path_ex_t(self); + char letter = (char)letter_val; + const void *buf = (const void *)mp_to_ptr(buf_py); + uint32_t size = (uint32_t)size_val; + const char *ext = (const char *)(char*)convert_from_str(ext_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_span_t *, const char *))lv_span_set_text)(span, text); + ((void (*)(lv_fs_path_ex_t *, char, const void *, uint32_t, const char *))lv_fs_make_path_from_buffer)(path, letter, buf, size, ext); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_span_set_text_struct_method_def = { - "lv_span_set_text", - (PyCFunction)py_lv_span_set_text_struct_method, +static PyMethodDef py_lv_fs_make_path_from_buffer_struct_method_def = { + "lv_fs_make_path_from_buffer", + (PyCFunction)py_lv_fs_make_path_from_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90303,59 +102814,69 @@ static PyMethodDef py_lv_span_set_text_struct_method_def = { /* * lvgl extension definition for: - * void lv_span_set_text_fmt(lv_span_t *span, const char *fmt, ...) + * lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t *path, void **buffer, uint32_t *size) */ -static PyObject *py_lv_span_set_text_fmt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_buffer_from_path_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *fmt_py; - if (!PyArg_ParseTuple(py_args, "O", &fmt_py)) { PyGILState_Release(gstate); return NULL; } - lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); - const char *fmt = (const char *)(char*)convert_from_str(fmt_py); + PyObject *buffer_py; PyObject *size_py; + if (!PyArg_ParseTuple(py_args, "OO", &buffer_py, &size_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_path_ex_t *path = (lv_fs_path_ex_t *)mp_write_ptr_lv_fs_path_ex_t(self); + void **buffer = mp_to_ptr(buffer_py); + uint32_t *size = mp_array_to_u32ptr(size_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_span_t *, const char *, ...))lv_span_set_text_fmt)(span, fmt); + _res = ((lv_result_t (*)(lv_fs_path_ex_t *, void **, uint32_t *))lv_fs_get_buffer_from_path)(path, buffer, size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_span_set_text_fmt_struct_method_def = { - "lv_span_set_text_fmt", - (PyCFunction)py_lv_span_set_text_fmt_struct_method, +static PyMethodDef py_lv_fs_get_buffer_from_path_struct_method_def = { + "lv_fs_get_buffer_from_path", + (PyCFunction)py_lv_fs_get_buffer_from_path_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_fs_path_ex_t_methods[] = { + {"make_path_from_buffer", (PyCFunction)py_lv_fs_make_path_from_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_buffer_from_path", (PyCFunction)py_lv_fs_get_buffer_from_path_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_span_set_text_static(lv_span_t *span, const char *text) + * lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t *rddir_p, const char *path) */ -static PyObject *py_lv_span_set_text_static_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_dir_open_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *text_py; - if (!PyArg_ParseTuple(py_args, "O", &text_py)) { PyGILState_Release(gstate); return NULL; } - lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); - const char *text = (const char *)(char*)convert_from_str(text_py); + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + lv_fs_dir_t *rddir_p = (lv_fs_dir_t *)mp_write_ptr_lv_fs_dir_t(self); + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_res_t _res; lvpy_lock(); - ((void (*)(lv_span_t *, const char *))lv_span_set_text_static)(span, text); + _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, const char *))lv_fs_dir_open)(rddir_p, path); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_span_set_text_static_struct_method_def = { - "lv_span_set_text_static", - (PyCFunction)py_lv_span_set_text_static_struct_method, +static PyMethodDef py_lv_fs_dir_open_struct_method_def = { + "lv_fs_dir_open", + (PyCFunction)py_lv_fs_dir_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90363,28 +102884,31 @@ static PyMethodDef py_lv_span_set_text_static_struct_method_def = { /* * lvgl extension definition for: - * lv_style_t *lv_span_get_style(lv_span_t *span) + * lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t *rddir_p, char *fn, uint32_t fn_len) */ -static PyObject *py_lv_span_get_style_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_dir_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); + PyObject *fn_py; long fn_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &fn_py, &fn_len_val)) { PyGILState_Release(gstate); return NULL; } + lv_fs_dir_t *rddir_p = (lv_fs_dir_t *)mp_write_ptr_lv_fs_dir_t(self); + char *fn = (char*)convert_from_str(fn_py); + uint32_t fn_len = (uint32_t)fn_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_t * _res; + lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_style_t *(*)(lv_span_t *))lv_span_get_style)(span); + _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, char *, uint32_t))lv_fs_dir_read)(rddir_p, fn, fn_len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_style_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_span_get_style_struct_method_def = { - "lv_span_get_style", - (PyCFunction)py_lv_span_get_style_struct_method, +static PyMethodDef py_lv_fs_dir_read_struct_method_def = { + "lv_fs_dir_read", + (PyCFunction)py_lv_fs_dir_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90392,106 +102916,98 @@ static PyMethodDef py_lv_span_get_style_struct_method_def = { /* * lvgl extension definition for: - * const char *lv_span_get_text(lv_span_t *span) + * lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t *rddir_p) */ -static PyObject *py_lv_span_get_text_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_dir_close_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_span_t *span = (lv_span_t *)mp_write_ptr_lv_span_t(self); + lv_fs_dir_t *rddir_p = (lv_fs_dir_t *)mp_write_ptr_lv_fs_dir_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_fs_res_t _res; lvpy_lock(); - _res = ((const char *(*)(lv_span_t *))lv_span_get_text)(span); + _res = ((lv_fs_res_t (*)(lv_fs_dir_t *))lv_fs_dir_close)(rddir_p); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_span_get_text_struct_method_def = { - "lv_span_get_text", - (PyCFunction)py_lv_span_get_text_struct_method, +static PyMethodDef py_lv_fs_dir_close_struct_method_def = { + "lv_fs_dir_close", + (PyCFunction)py_lv_fs_dir_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_span_t_methods[] = { - {"set_text", (PyCFunction)py_lv_span_set_text_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_fmt", (PyCFunction)py_lv_span_set_text_fmt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_text_static", (PyCFunction)py_lv_span_set_text_static_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style", (PyCFunction)py_lv_span_get_style_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_text", (PyCFunction)py_lv_span_get_text_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_fs_dir_t_methods[] = { + {"open", (PyCFunction)py_lv_fs_dir_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"read", (PyCFunction)py_lv_fs_dir_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"close", (PyCFunction)py_lv_fs_dir_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -PyMethodDef py_lv_span_coords_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * lv_tree_node_t *lv_tree_node_create(const lv_tree_class_t *class_p, lv_tree_node_t *parent) + * void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t *draw_dsc) */ -static PyObject *py_lv_tree_node_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_triangle_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - const lv_tree_class_t *class_p = (lv_tree_class_t *)mp_write_ptr_lv_tree_class_t(self); - lv_tree_node_t *parent = mp_write_ptr_lv_tree_node_t(parent_py); + + lv_draw_triangle_dsc_t *draw_dsc = (lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_tree_node_t * _res; lvpy_lock(); - _res = ((lv_tree_node_t *(*)(const lv_tree_class_t *, lv_tree_node_t *))lv_tree_node_create)(class_p, parent); + ((void (*)(lv_draw_triangle_dsc_t *))lv_draw_triangle_dsc_init)(draw_dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_tree_node_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_tree_node_create_struct_method_def = { - "lv_tree_node_create", - (PyCFunction)py_lv_tree_node_create_struct_method, +static PyMethodDef py_lv_draw_triangle_dsc_init_struct_method_def = { + "lv_draw_triangle_dsc_init", + (PyCFunction)py_lv_draw_triangle_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_tree_class_t_methods[] = { - {"node_create", (PyCFunction)py_lv_tree_node_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_draw_triangle_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_triangle_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -PyMethodDef py_lv_font_class_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * inline static lv_color_t lv_color16_to_color(lv_color16_t c) + * void lv_indev_delete(lv_indev_t *indev) */ -static PyObject *py_lv_color16_to_color_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color16_t c = {0}; { lv_color16_t *p_ = (lv_color16_t *)mp_write_ptr_lv_color16_t(self); if (p_) c = *p_; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_color16_t))lv_color16_to_color)(c); + ((void (*)(lv_indev_t *))lv_indev_delete)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color16_to_color_struct_method_def = { - "lv_color16_to_color", - (PyCFunction)py_lv_color16_to_color_struct_method, +static PyMethodDef py_lv_indev_delete_struct_method_def = { + "lv_indev_delete", + (PyCFunction)py_lv_indev_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90499,29 +103015,28 @@ static PyMethodDef py_lv_color16_to_color_struct_method_def = { /* * lvgl extension definition for: - * void lv_color16_premultiply(lv_color16_t *c, lv_opa_t a) + * lv_indev_t *lv_indev_get_next(lv_indev_t *indev) */ -static PyObject *py_lv_color16_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long a_val; - if (!PyArg_ParseTuple(py_args, "l", &a_val)) { PyGILState_Release(gstate); return NULL; } - lv_color16_t *c = (lv_color16_t *)mp_write_ptr_lv_color16_t(self); - lv_opa_t a = (lv_opa_t)a_val; + + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_indev_t * _res; lvpy_lock(); - ((void (*)(lv_color16_t *, lv_opa_t))lv_color16_premultiply)(c, a); + _res = ((lv_indev_t *(*)(lv_indev_t *))lv_indev_get_next)(indev); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_indev_t((void*)_res); } -static PyMethodDef py_lv_color16_premultiply_struct_method_def = { - "lv_color16_premultiply", - (PyCFunction)py_lv_color16_premultiply_struct_method, +static PyMethodDef py_lv_indev_get_next_struct_method_def = { + "lv_indev_get_next", + (PyCFunction)py_lv_indev_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90529,64 +103044,57 @@ static PyMethodDef py_lv_color16_premultiply_struct_method_def = { /* * lvgl extension definition for: - * uint8_t lv_color16_luminance(const lv_color16_t c) + * void lv_indev_read(lv_indev_t *indev) */ -static PyObject *py_lv_color16_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color16_t c = {0}; { lv_color16_t *p_ = (lv_color16_t *)mp_write_ptr_lv_color16_t(self); if (p_) c = *p_; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(const lv_color16_t))lv_color16_luminance)(c); + ((void (*)(lv_indev_t *))lv_indev_read)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color16_luminance_struct_method_def = { - "lv_color16_luminance", - (PyCFunction)py_lv_color16_luminance_struct_method, +static PyMethodDef py_lv_indev_read_struct_method_def = { + "lv_indev_read", + (PyCFunction)py_lv_indev_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_color16_t_methods[] = { - {"to_color", (PyCFunction)py_lv_color16_to_color_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"premultiply", (PyCFunction)py_lv_color16_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"luminance", (PyCFunction)py_lv_color16_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_mem_monitor_core(lv_mem_monitor_t *mon_p) + * void lv_indev_enable(lv_indev_t *indev, bool enable) */ -static PyObject *py_lv_mem_monitor_core_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_enable_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_mem_monitor_t *mon_p = (lv_mem_monitor_t *)mp_write_ptr_lv_mem_monitor_t(self); + long enable_val; + if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + bool enable = (enable_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_mem_monitor_t *))lv_mem_monitor_core)(mon_p); + ((void (*)(lv_indev_t *, bool))lv_indev_enable)(indev, enable); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_mem_monitor_core_struct_method_def = { - "lv_mem_monitor_core", - (PyCFunction)py_lv_mem_monitor_core_struct_method, +static PyMethodDef py_lv_indev_enable_struct_method_def = { + "lv_indev_enable", + (PyCFunction)py_lv_indev_enable_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90594,73 +103102,92 @@ static PyMethodDef py_lv_mem_monitor_core_struct_method_def = { /* * lvgl extension definition for: - * void lv_mem_monitor(lv_mem_monitor_t *mon_p) + * void lv_indev_set_type(lv_indev_t *indev, lv_indev_type_t indev_type) */ -static PyObject *py_lv_mem_monitor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_mem_monitor_t *mon_p = (lv_mem_monitor_t *)mp_write_ptr_lv_mem_monitor_t(self); + PyObject *indev_type_py; + if (!PyArg_ParseTuple(py_args, "O", &indev_type_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_indev_type_t indev_type = (int)mp_obj_get_int(indev_type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_mem_monitor_t *))lv_mem_monitor)(mon_p); + ((void (*)(lv_indev_t *, lv_indev_type_t))lv_indev_set_type)(indev, indev_type); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_mem_monitor_struct_method_def = { - "lv_mem_monitor", - (PyCFunction)py_lv_mem_monitor_struct_method, +static PyMethodDef py_lv_indev_set_type_struct_method_def = { + "lv_indev_set_type", + (PyCFunction)py_lv_indev_set_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_mem_monitor_t_methods[] = { - {"core", (PyCFunction)py_lv_mem_monitor_core_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"monitor", (PyCFunction)py_lv_mem_monitor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) - * lv_rb_compare_t compare + * Callback function lv_indev_t_read_cb (CPython) + * void lv_indev_read_cb_t(lv_indev_t *indev, lv_indev_data_t *data) */ - +static void lv_indev_t_read_cb_callback(lv_indev_t *arg0, lv_indev_data_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_t_read_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_indev_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_indev_data_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + /* * lvgl extension definition for: - * bool lv_rb_init(lv_rb_t *tree, lv_rb_compare_t compare, size_t node_size) + * void lv_indev_set_read_cb(lv_indev_t *indev, lv_indev_read_cb_t read_cb) */ -static PyObject *py_lv_rb_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_read_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *compare_py; long node_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &compare_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); - size_t node_size = (size_t)node_size_val; - void *compare = NULL; + PyObject *read_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &read_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + void *read_cb = mp_lv_callback(read_cb_py, &lv_indev_t_read_cb_callback, "lv_indev_t_read_cb", &indev->user_data, indev, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_rb_t *, lv_rb_compare_t, size_t))lv_rb_init)(tree, compare, node_size); + ((void (*)(lv_indev_t *, lv_indev_read_cb_t))lv_indev_set_read_cb)(indev, read_cb); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_init_struct_method_def = { - "lv_rb_init", - (PyCFunction)py_lv_rb_init_struct_method, +static PyMethodDef py_lv_indev_set_read_cb_struct_method_def = { + "lv_indev_set_read_cb", + (PyCFunction)py_lv_indev_set_read_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90668,30 +103195,29 @@ static PyMethodDef py_lv_rb_init_struct_method_def = { /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_insert(lv_rb_t *tree, void *key) + * void lv_indev_set_user_data(lv_indev_t *indev, void *user_data) */ -static PyObject *py_lv_rb_insert_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; - if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); - void *key = mp_to_ptr(key_py); + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_rb_node_t * _res; lvpy_lock(); - _res = ((lv_rb_node_t *(*)(lv_rb_t *, void *))lv_rb_insert)(tree, key); + ((void (*)(lv_indev_t *, void *))lv_indev_set_user_data)(indev, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_rb_node_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_insert_struct_method_def = { - "lv_rb_insert", - (PyCFunction)py_lv_rb_insert_struct_method, +static PyMethodDef py_lv_indev_set_user_data_struct_method_def = { + "lv_indev_set_user_data", + (PyCFunction)py_lv_indev_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90699,30 +103225,29 @@ static PyMethodDef py_lv_rb_insert_struct_method_def = { /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_find(lv_rb_t *tree, const void *key) + * void lv_indev_set_driver_data(lv_indev_t *indev, void *driver_data) */ -static PyObject *py_lv_rb_find_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; - if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); - const void *key = (const void *)mp_to_ptr(key_py); + PyObject *driver_data_py; + if (!PyArg_ParseTuple(py_args, "O", &driver_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + void *driver_data = mp_to_ptr(driver_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_rb_node_t * _res; lvpy_lock(); - _res = ((lv_rb_node_t *(*)(lv_rb_t *, const void *))lv_rb_find)(tree, key); + ((void (*)(lv_indev_t *, void *))lv_indev_set_driver_data)(indev, driver_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_rb_node_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_find_struct_method_def = { - "lv_rb_find", - (PyCFunction)py_lv_rb_find_struct_method, +static PyMethodDef py_lv_indev_set_driver_data_struct_method_def = { + "lv_indev_set_driver_data", + (PyCFunction)py_lv_indev_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90730,30 +103255,29 @@ static PyMethodDef py_lv_rb_find_struct_method_def = { /* * lvgl extension definition for: - * void *lv_rb_remove_node(lv_rb_t *tree, lv_rb_node_t *node) + * void lv_indev_set_display(lv_indev_t *indev, struct _lv_display_t *disp) */ -static PyObject *py_lv_rb_remove_node_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_display_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *node_py; - if (!PyArg_ParseTuple(py_args, "O", &node_py)) { PyGILState_Release(gstate); return NULL; } - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(node_py); + PyObject *disp_py; + if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + struct _lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_rb_t *, lv_rb_node_t *))lv_rb_remove_node)(tree, node); + ((void (*)(lv_indev_t *, struct _lv_display_t *))lv_indev_set_display)(indev, disp); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_remove_node_struct_method_def = { - "lv_rb_remove_node", - (PyCFunction)py_lv_rb_remove_node_struct_method, +static PyMethodDef py_lv_indev_set_display_struct_method_def = { + "lv_indev_set_display", + (PyCFunction)py_lv_indev_set_display_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90761,30 +103285,29 @@ static PyMethodDef py_lv_rb_remove_node_struct_method_def = { /* * lvgl extension definition for: - * void *lv_rb_remove(lv_rb_t *tree, const void *key) + * void lv_indev_set_long_press_time(lv_indev_t *indev, uint16_t long_press_time) */ -static PyObject *py_lv_rb_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_long_press_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; - if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); - const void *key = (const void *)mp_to_ptr(key_py); + long long_press_time_val; + if (!PyArg_ParseTuple(py_args, "l", &long_press_time_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint16_t long_press_time = (uint16_t)long_press_time_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_rb_t *, const void *))lv_rb_remove)(tree, key); + ((void (*)(lv_indev_t *, uint16_t))lv_indev_set_long_press_time)(indev, long_press_time); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_remove_struct_method_def = { - "lv_rb_remove", - (PyCFunction)py_lv_rb_remove_struct_method, +static PyMethodDef py_lv_indev_set_long_press_time_struct_method_def = { + "lv_indev_set_long_press_time", + (PyCFunction)py_lv_indev_set_long_press_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90792,30 +103315,29 @@ static PyMethodDef py_lv_rb_remove_struct_method_def = { /* * lvgl extension definition for: - * bool lv_rb_drop_node(lv_rb_t *tree, lv_rb_node_t *node) + * void lv_indev_set_long_press_repeat_time(lv_indev_t *indev, uint16_t long_press_repeat_time) */ -static PyObject *py_lv_rb_drop_node_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_long_press_repeat_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *node_py; - if (!PyArg_ParseTuple(py_args, "O", &node_py)) { PyGILState_Release(gstate); return NULL; } - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); - lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(node_py); + long long_press_repeat_time_val; + if (!PyArg_ParseTuple(py_args, "l", &long_press_repeat_time_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint16_t long_press_repeat_time = (uint16_t)long_press_repeat_time_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_rb_t *, lv_rb_node_t *))lv_rb_drop_node)(tree, node); + ((void (*)(lv_indev_t *, uint16_t))lv_indev_set_long_press_repeat_time)(indev, long_press_repeat_time); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_drop_node_struct_method_def = { - "lv_rb_drop_node", - (PyCFunction)py_lv_rb_drop_node_struct_method, +static PyMethodDef py_lv_indev_set_long_press_repeat_time_struct_method_def = { + "lv_indev_set_long_press_repeat_time", + (PyCFunction)py_lv_indev_set_long_press_repeat_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90823,30 +103345,29 @@ static PyMethodDef py_lv_rb_drop_node_struct_method_def = { /* * lvgl extension definition for: - * bool lv_rb_drop(lv_rb_t *tree, const void *key) + * void lv_indev_set_double_click_time(lv_indev_t *indev, uint16_t double_click_time) */ -static PyObject *py_lv_rb_drop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_double_click_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *key_py; - if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); - const void *key = (const void *)mp_to_ptr(key_py); + long double_click_time_val; + if (!PyArg_ParseTuple(py_args, "l", &double_click_time_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint16_t double_click_time = (uint16_t)double_click_time_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_rb_t *, const void *))lv_rb_drop)(tree, key); + ((void (*)(lv_indev_t *, uint16_t))lv_indev_set_double_click_time)(indev, double_click_time); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_drop_struct_method_def = { - "lv_rb_drop", - (PyCFunction)py_lv_rb_drop_struct_method, +static PyMethodDef py_lv_indev_set_double_click_time_struct_method_def = { + "lv_indev_set_double_click_time", + (PyCFunction)py_lv_indev_set_double_click_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90854,28 +103375,29 @@ static PyMethodDef py_lv_rb_drop_struct_method_def = { /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_minimum(lv_rb_t *node) + * void lv_indev_set_scroll_limit(lv_indev_t *indev, uint8_t scroll_limit) */ -static PyObject *py_lv_rb_minimum_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_scroll_limit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_rb_t *node = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + long scroll_limit_val; + if (!PyArg_ParseTuple(py_args, "l", &scroll_limit_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint8_t scroll_limit = (uint8_t)scroll_limit_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_rb_node_t * _res; lvpy_lock(); - _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_rb_minimum)(node); + ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_scroll_limit)(indev, scroll_limit); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_rb_node_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_minimum_struct_method_def = { - "lv_rb_minimum", - (PyCFunction)py_lv_rb_minimum_struct_method, +static PyMethodDef py_lv_indev_set_scroll_limit_struct_method_def = { + "lv_indev_set_scroll_limit", + (PyCFunction)py_lv_indev_set_scroll_limit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90883,28 +103405,29 @@ static PyMethodDef py_lv_rb_minimum_struct_method_def = { /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_maximum(lv_rb_t *node) + * void lv_indev_set_scroll_throw(lv_indev_t *indev, uint8_t scroll_throw) */ -static PyObject *py_lv_rb_maximum_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_scroll_throw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_rb_t *node = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + long scroll_throw_val; + if (!PyArg_ParseTuple(py_args, "l", &scroll_throw_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint8_t scroll_throw = (uint8_t)scroll_throw_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_rb_node_t * _res; lvpy_lock(); - _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_rb_maximum)(node); + ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_scroll_throw)(indev, scroll_throw); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_rb_node_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_maximum_struct_method_def = { - "lv_rb_maximum", - (PyCFunction)py_lv_rb_maximum_struct_method, +static PyMethodDef py_lv_indev_set_scroll_throw_struct_method_def = { + "lv_indev_set_scroll_throw", + (PyCFunction)py_lv_indev_set_scroll_throw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90912,71 +103435,59 @@ static PyMethodDef py_lv_rb_maximum_struct_method_def = { /* * lvgl extension definition for: - * void lv_rb_destroy(lv_rb_t *tree) + * void lv_indev_set_gesture_min_velocity(lv_indev_t *indev, uint8_t min_velocity) */ -static PyObject *py_lv_rb_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_gesture_min_velocity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + long min_velocity_val; + if (!PyArg_ParseTuple(py_args, "l", &min_velocity_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint8_t min_velocity = (uint8_t)min_velocity_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_rb_t *))lv_rb_destroy)(tree); + ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_gesture_min_velocity)(indev, min_velocity); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_destroy_struct_method_def = { - "lv_rb_destroy", - (PyCFunction)py_lv_rb_destroy_struct_method, +static PyMethodDef py_lv_indev_set_gesture_min_velocity_struct_method_def = { + "lv_indev_set_gesture_min_velocity", + (PyCFunction)py_lv_indev_set_gesture_min_velocity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_rb_t_methods[] = { - {"init", (PyCFunction)py_lv_rb_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"insert", (PyCFunction)py_lv_rb_insert_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"find", (PyCFunction)py_lv_rb_find_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_node", (PyCFunction)py_lv_rb_remove_node_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove", (PyCFunction)py_lv_rb_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"drop_node", (PyCFunction)py_lv_rb_drop_node_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"drop", (PyCFunction)py_lv_rb_drop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"minimum", (PyCFunction)py_lv_rb_minimum_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"maximum", (PyCFunction)py_lv_rb_maximum_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"destroy", (PyCFunction)py_lv_rb_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_minimum_from(lv_rb_node_t *node) + * void lv_indev_set_gesture_min_distance(lv_indev_t *indev, uint8_t min_distance) */ -static PyObject *py_lv_rb_minimum_from_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_gesture_min_distance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_rb_node_t *node = (lv_rb_node_t *)mp_write_ptr_lv_rb_node_t(self); + long min_distance_val; + if (!PyArg_ParseTuple(py_args, "l", &min_distance_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint8_t min_distance = (uint8_t)min_distance_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_rb_node_t * _res; lvpy_lock(); - _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_rb_minimum_from)(node); + ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_gesture_min_distance)(indev, min_distance); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_rb_node_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_rb_minimum_from_struct_method_def = { - "lv_rb_minimum_from", - (PyCFunction)py_lv_rb_minimum_from_struct_method, +static PyMethodDef py_lv_indev_set_gesture_min_distance_struct_method_def = { + "lv_indev_set_gesture_min_distance", + (PyCFunction)py_lv_indev_set_gesture_min_distance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90984,66 +103495,57 @@ static PyMethodDef py_lv_rb_minimum_from_struct_method_def = { /* * lvgl extension definition for: - * lv_rb_node_t *lv_rb_maximum_from(lv_rb_node_t *node) + * lv_indev_type_t lv_indev_get_type(const lv_indev_t *indev) */ -static PyObject *py_lv_rb_maximum_from_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_rb_node_t *node = (lv_rb_node_t *)mp_write_ptr_lv_rb_node_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_rb_node_t * _res; + lv_indev_type_t _res; lvpy_lock(); - _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_rb_maximum_from)(node); + _res = ((lv_indev_type_t (*)(const lv_indev_t *))lv_indev_get_type)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_rb_node_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_rb_maximum_from_struct_method_def = { - "lv_rb_maximum_from", - (PyCFunction)py_lv_rb_maximum_from_struct_method, +static PyMethodDef py_lv_indev_get_type_struct_method_def = { + "lv_indev_get_type", + (PyCFunction)py_lv_indev_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_rb_node_t_methods[] = { - {"minimum_from", (PyCFunction)py_lv_rb_minimum_from_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"maximum_from", (PyCFunction)py_lv_rb_maximum_from_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_resize(lv_circle_buf_t *circle_buf, uint32_t capacity) + * lv_indev_read_cb_t lv_indev_get_read_cb(lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_resize_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_read_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long capacity_val; - if (!PyArg_ParseTuple(py_args, "l", &capacity_val)) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); - uint32_t capacity = (uint32_t)capacity_val; + + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_indev_read_cb_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_circle_buf_t *, uint32_t))lv_circle_buf_resize)(circle_buf, capacity); + _res = ((lv_indev_read_cb_t (*)(lv_indev_t *))lv_indev_get_read_cb)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_lv_funcptr_lv_indev_read_cb_t(_res); } -static PyMethodDef py_lv_circle_buf_resize_struct_method_def = { - "lv_circle_buf_resize", - (PyCFunction)py_lv_circle_buf_resize_struct_method, +static PyMethodDef py_lv_indev_get_read_cb_struct_method_def = { + "lv_indev_get_read_cb", + (PyCFunction)py_lv_indev_get_read_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91051,27 +103553,28 @@ static PyMethodDef py_lv_circle_buf_resize_struct_method_def = { /* * lvgl extension definition for: - * void lv_circle_buf_destroy(lv_circle_buf_t *circle_buf) + * lv_indev_state_t lv_indev_get_state(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_state_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_indev_state_t _res; lvpy_lock(); - ((void (*)(lv_circle_buf_t *))lv_circle_buf_destroy)(circle_buf); + _res = ((lv_indev_state_t (*)(const lv_indev_t *))lv_indev_get_state)(indev); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_circle_buf_destroy_struct_method_def = { - "lv_circle_buf_destroy", - (PyCFunction)py_lv_circle_buf_destroy_struct_method, +static PyMethodDef py_lv_indev_get_state_struct_method_def = { + "lv_indev_get_state", + (PyCFunction)py_lv_indev_get_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91079,28 +103582,28 @@ static PyMethodDef py_lv_circle_buf_destroy_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_circle_buf_size(const lv_circle_buf_t *circle_buf) + * lv_group_t *lv_indev_get_group(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_group_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_group_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_circle_buf_size)(circle_buf); + _res = ((lv_group_t *(*)(const lv_indev_t *))lv_indev_get_group)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_group_t((void*)_res); } -static PyMethodDef py_lv_circle_buf_size_struct_method_def = { - "lv_circle_buf_size", - (PyCFunction)py_lv_circle_buf_size_struct_method, +static PyMethodDef py_lv_indev_get_group_struct_method_def = { + "lv_indev_get_group", + (PyCFunction)py_lv_indev_get_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91108,28 +103611,28 @@ static PyMethodDef py_lv_circle_buf_size_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_circle_buf_capacity(const lv_circle_buf_t *circle_buf) + * lv_display_t *lv_indev_get_display(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_capacity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_display_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_display_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_circle_buf_capacity)(circle_buf); + _res = ((lv_display_t *(*)(const lv_indev_t *))lv_indev_get_display)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_circle_buf_capacity_struct_method_def = { - "lv_circle_buf_capacity", - (PyCFunction)py_lv_circle_buf_capacity_struct_method, +static PyMethodDef py_lv_indev_get_display_struct_method_def = { + "lv_indev_get_display", + (PyCFunction)py_lv_indev_get_display_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91137,28 +103640,28 @@ static PyMethodDef py_lv_circle_buf_capacity_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_circle_buf_remain(const lv_circle_buf_t *circle_buf) + * void *lv_indev_get_user_data(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_remain_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + void * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_circle_buf_remain)(circle_buf); + _res = ((void *(*)(const lv_indev_t *))lv_indev_get_user_data)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_circle_buf_remain_struct_method_def = { - "lv_circle_buf_remain", - (PyCFunction)py_lv_circle_buf_remain_struct_method, +static PyMethodDef py_lv_indev_get_user_data_struct_method_def = { + "lv_indev_get_user_data", + (PyCFunction)py_lv_indev_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91166,28 +103669,28 @@ static PyMethodDef py_lv_circle_buf_remain_struct_method_def = { /* * lvgl extension definition for: - * bool lv_circle_buf_is_empty(const lv_circle_buf_t *circle_buf) + * void *lv_indev_get_driver_data(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + void * _res; lvpy_lock(); - _res = ((bool (*)(const lv_circle_buf_t *))lv_circle_buf_is_empty)(circle_buf); + _res = ((void *(*)(const lv_indev_t *))lv_indev_get_driver_data)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_circle_buf_is_empty_struct_method_def = { - "lv_circle_buf_is_empty", - (PyCFunction)py_lv_circle_buf_is_empty_struct_method, +static PyMethodDef py_lv_indev_get_driver_data_struct_method_def = { + "lv_indev_get_driver_data", + (PyCFunction)py_lv_indev_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91195,28 +103698,28 @@ static PyMethodDef py_lv_circle_buf_is_empty_struct_method_def = { /* * lvgl extension definition for: - * bool lv_circle_buf_is_full(const lv_circle_buf_t *circle_buf) + * bool lv_indev_get_press_moved(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_is_full_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_press_moved_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_circle_buf_t *))lv_circle_buf_is_full)(circle_buf); + _res = ((bool (*)(const lv_indev_t *))lv_indev_get_press_moved)(indev); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_circle_buf_is_full_struct_method_def = { - "lv_circle_buf_is_full", - (PyCFunction)py_lv_circle_buf_is_full_struct_method, +static PyMethodDef py_lv_indev_get_press_moved_struct_method_def = { + "lv_indev_get_press_moved", + (PyCFunction)py_lv_indev_get_press_moved_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91224,27 +103727,29 @@ static PyMethodDef py_lv_circle_buf_is_full_struct_method_def = { /* * lvgl extension definition for: - * void lv_circle_buf_reset(lv_circle_buf_t *circle_buf) + * void lv_indev_reset(lv_indev_t *indev, lv_obj_t *obj) */ -static PyObject *py_lv_circle_buf_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_circle_buf_t *))lv_circle_buf_reset)(circle_buf); + ((void (*)(lv_indev_t *, lv_obj_t *))lv_indev_reset)(indev, obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_reset_struct_method_def = { - "lv_circle_buf_reset", - (PyCFunction)py_lv_circle_buf_reset_struct_method, +static PyMethodDef py_lv_indev_reset_struct_method_def = { + "lv_indev_reset", + (PyCFunction)py_lv_indev_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91252,28 +103757,27 @@ static PyMethodDef py_lv_circle_buf_reset_struct_method_def = { /* * lvgl extension definition for: - * void *lv_circle_buf_head(const lv_circle_buf_t *circle_buf) + * void lv_indev_stop_processing(lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_stop_processing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_circle_buf_t *))lv_circle_buf_head)(circle_buf); + ((void (*)(lv_indev_t *))lv_indev_stop_processing)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_head_struct_method_def = { - "lv_circle_buf_head", - (PyCFunction)py_lv_circle_buf_head_struct_method, +static PyMethodDef py_lv_indev_stop_processing_struct_method_def = { + "lv_indev_stop_processing", + (PyCFunction)py_lv_indev_stop_processing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91281,28 +103785,27 @@ static PyMethodDef py_lv_circle_buf_head_struct_method_def = { /* * lvgl extension definition for: - * void *lv_circle_buf_tail(const lv_circle_buf_t *circle_buf) + * void lv_indev_reset_long_press(lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_reset_long_press_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_circle_buf_t *))lv_circle_buf_tail)(circle_buf); + ((void (*)(lv_indev_t *))lv_indev_reset_long_press)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_tail_struct_method_def = { - "lv_circle_buf_tail", - (PyCFunction)py_lv_circle_buf_tail_struct_method, +static PyMethodDef py_lv_indev_reset_long_press_struct_method_def = { + "lv_indev_reset_long_press", + (PyCFunction)py_lv_indev_reset_long_press_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91310,30 +103813,29 @@ static PyMethodDef py_lv_circle_buf_tail_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_read(lv_circle_buf_t *circle_buf, void *data) + * void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj) */ -static PyObject *py_lv_circle_buf_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_cursor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); - void *data = mp_to_ptr(data_py); + PyObject *cur_obj_py; + if (!PyArg_ParseTuple(py_args, "O", &cur_obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_obj_t *cur_obj = mp_to_lv(cur_obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_circle_buf_t *, void *))lv_circle_buf_read)(circle_buf, data); + ((void (*)(lv_indev_t *, lv_obj_t *))lv_indev_set_cursor)(indev, cur_obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_read_struct_method_def = { - "lv_circle_buf_read", - (PyCFunction)py_lv_circle_buf_read_struct_method, +static PyMethodDef py_lv_indev_set_cursor_struct_method_def = { + "lv_indev_set_cursor", + (PyCFunction)py_lv_indev_set_cursor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91341,102 +103843,59 @@ static PyMethodDef py_lv_circle_buf_read_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_write(lv_circle_buf_t *circle_buf, const void *data) + * void lv_indev_set_group(lv_indev_t *indev, lv_group_t *group) */ -static PyObject *py_lv_circle_buf_write_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_group_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); - const void *data = (const void *)mp_to_ptr(data_py); + PyObject *group_py; + if (!PyArg_ParseTuple(py_args, "O", &group_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_group_t *group = mp_write_ptr_lv_group_t(group_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_circle_buf_t *, const void *))lv_circle_buf_write)(circle_buf, data); + ((void (*)(lv_indev_t *, lv_group_t *))lv_indev_set_group)(indev, group); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_write_struct_method_def = { - "lv_circle_buf_write", - (PyCFunction)py_lv_circle_buf_write_struct_method, +static PyMethodDef py_lv_indev_set_group_struct_method_def = { + "lv_indev_set_group", + (PyCFunction)py_lv_indev_set_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_circle_buf_fill_fill_cb (CPython) - * bool lv_circle_buf_fill_cb_t(void *buf, uint32_t buff_len, int32_t index, void *user_data) - */ -static bool lv_circle_buf_fill_fill_cb_callback(void *arg0, uint32_t arg1, int32_t arg2, void *arg3) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg3); - if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_circle_buf_fill_fill_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_arg1 = mp_obj_new_int_from_uint(arg1); - PyObject *py_arg2 = mp_obj_new_int(arg2); - PyObject *py_arg3 = ptr_to_mp((void*)arg3); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3) ? PyTuple_Pack(4, py_arg0, py_arg1, py_arg2, py_arg3) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - Py_XDECREF(py_arg3); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } - bool _c_res = mp_obj_is_true(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * lvgl extension definition for: - * uint32_t lv_circle_buf_fill(lv_circle_buf_t *circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, void *user_data) + * void lv_indev_set_button_points(lv_indev_t *indev, const lv_point_t points[]) */ -static PyObject *py_lv_circle_buf_fill_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_button_points_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long count_val; PyObject *fill_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "lOO", &count_val, &fill_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); - void *user_data = mp_to_ptr(user_data_py); - uint32_t count = (uint32_t)count_val; - void *fill_cb = mp_lv_callback(fill_cb_py, &lv_circle_buf_fill_fill_cb_callback, "lv_circle_buf_fill_fill_cb", &user_data, NULL, (NULL), (NULL)); + PyObject *points_py; + if (!PyArg_ParseTuple(py_args, "O", &points_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + const lv_point_t *points = (const lv_point_t *)lvpy_struct_arr_arg(self, points_py, "lv_indev_set_button_points:points", sizeof(lv_point_t), mp_write_value_ptr_lv_point_t); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_circle_buf_t *, uint32_t, lv_circle_buf_fill_cb_t, void *))lv_circle_buf_fill)(circle_buf, count, fill_cb, user_data); + ((void (*)(lv_indev_t *, const lv_point_t []))lv_indev_set_button_points)(indev, points); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_fill_struct_method_def = { - "lv_circle_buf_fill", - (PyCFunction)py_lv_circle_buf_fill_struct_method, +static PyMethodDef py_lv_indev_set_button_points_struct_method_def = { + "lv_indev_set_button_points", + (PyCFunction)py_lv_indev_set_button_points_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91444,28 +103903,29 @@ static PyMethodDef py_lv_circle_buf_fill_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_skip(lv_circle_buf_t *circle_buf) + * void lv_indev_get_point(const lv_indev_t *indev, lv_point_t *point) */ -static PyObject *py_lv_circle_buf_skip_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_circle_buf_t *))lv_circle_buf_skip)(circle_buf); + ((void (*)(const lv_indev_t *, lv_point_t *))lv_indev_get_point)(indev, point); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_skip_struct_method_def = { - "lv_circle_buf_skip", - (PyCFunction)py_lv_circle_buf_skip_struct_method, +static PyMethodDef py_lv_indev_get_point_struct_method_def = { + "lv_indev_get_point", + (PyCFunction)py_lv_indev_get_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91473,30 +103933,28 @@ static PyMethodDef py_lv_circle_buf_skip_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_peek(const lv_circle_buf_t *circle_buf, void *data) + * lv_dir_t lv_indev_get_gesture_dir(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_peek_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_gesture_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); - void *data = mp_to_ptr(data_py); + + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_dir_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_circle_buf_t *, void *))lv_circle_buf_peek)(circle_buf, data); + _res = ((lv_dir_t (*)(const lv_indev_t *))lv_indev_get_gesture_dir)(indev); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_circle_buf_peek_struct_method_def = { - "lv_circle_buf_peek", - (PyCFunction)py_lv_circle_buf_peek_struct_method, +static PyMethodDef py_lv_indev_get_gesture_dir_struct_method_def = { + "lv_indev_get_gesture_dir", + (PyCFunction)py_lv_indev_get_gesture_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91504,256 +103962,145 @@ static PyMethodDef py_lv_circle_buf_peek_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t *circle_buf, uint32_t index, void *data) + * uint32_t lv_indev_get_key(const lv_indev_t *indev) */ -static PyObject *py_lv_circle_buf_peek_at_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_key_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "lO", &index_val, &data_py)) { PyGILState_Release(gstate); return NULL; } - const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); - uint32_t index = (uint32_t)index_val; - void *data = mp_to_ptr(data_py); + + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_circle_buf_t *, uint32_t, void *))lv_circle_buf_peek_at)(circle_buf, index, data); + _res = ((uint32_t (*)(const lv_indev_t *))lv_indev_get_key)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_circle_buf_peek_at_struct_method_def = { - "lv_circle_buf_peek_at", - (PyCFunction)py_lv_circle_buf_peek_at_struct_method, +static PyMethodDef py_lv_indev_get_key_struct_method_def = { + "lv_indev_get_key", + (PyCFunction)py_lv_indev_get_key_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_circle_buf_t_methods[] = { - {"resize", (PyCFunction)py_lv_circle_buf_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"destroy", (PyCFunction)py_lv_circle_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"size", (PyCFunction)py_lv_circle_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"capacity", (PyCFunction)py_lv_circle_buf_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remain", (PyCFunction)py_lv_circle_buf_remain_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_empty", (PyCFunction)py_lv_circle_buf_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_full", (PyCFunction)py_lv_circle_buf_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset", (PyCFunction)py_lv_circle_buf_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"head", (PyCFunction)py_lv_circle_buf_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"tail", (PyCFunction)py_lv_circle_buf_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"read", (PyCFunction)py_lv_circle_buf_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"write", (PyCFunction)py_lv_circle_buf_write_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"fill", (PyCFunction)py_lv_circle_buf_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"skip", (PyCFunction)py_lv_circle_buf_skip_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"peek", (PyCFunction)py_lv_circle_buf_peek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"peek_at", (PyCFunction)py_lv_circle_buf_peek_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_tree_node_delete(lv_tree_node_t *node) + * uint8_t lv_indev_get_short_click_streak(const lv_indev_t *indev) */ -static PyObject *py_lv_tree_node_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_short_click_streak_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_tree_node_t *node = (lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint8_t _res; lvpy_lock(); - ((void (*)(lv_tree_node_t *))lv_tree_node_delete)(node); + _res = ((uint8_t (*)(const lv_indev_t *))lv_indev_get_short_click_streak)(indev); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_tree_node_delete_struct_method_def = { - "lv_tree_node_delete", - (PyCFunction)py_lv_tree_node_delete_struct_method, +static PyMethodDef py_lv_indev_get_short_click_streak_struct_method_def = { + "lv_indev_get_short_click_streak", + (PyCFunction)py_lv_indev_get_short_click_streak_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_tree_walk_cb (CPython) - * bool lv_tree_traverse_cb_t(const lv_tree_node_t *node, void *user_data) + * lvgl extension definition for: + * lv_dir_t lv_indev_get_scroll_dir(const lv_indev_t *indev) */ -static bool lv_tree_walk_cb_callback(const lv_tree_node_t *arg0, void *arg1) +static PyObject *py_lv_indev_get_scroll_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_tree_walk_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_tree_node_t((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } - bool _c_res = mp_obj_is_true(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - + (void)py_kwds; -/* - * Callback function lv_tree_walk_bcb (CPython) - * bool lv_tree_before_cb_t(const lv_tree_node_t *node, void *user_data) - */ -static bool lv_tree_walk_bcb_callback(const lv_tree_node_t *arg0, void *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_tree_walk_bcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_tree_node_t((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } - bool _c_res = mp_obj_is_true(result); - Py_DECREF(result); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_dir_t _res; + lvpy_lock(); + _res = ((lv_dir_t (*)(const lv_indev_t *))lv_indev_get_scroll_dir)(indev); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + return mp_obj_new_int(_res); } - -/* - * Callback function lv_tree_walk_acb (CPython) - * void lv_tree_after_cb_t(const lv_tree_node_t *node, void *user_data) - */ -static void lv_tree_walk_acb_callback(const lv_tree_node_t *arg0, void *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_tree_walk_acb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_tree_node_t((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} +static PyMethodDef py_lv_indev_get_scroll_dir_struct_method_def = { + "lv_indev_get_scroll_dir", + (PyCFunction)py_lv_indev_get_scroll_dir_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * bool lv_tree_walk(const lv_tree_node_t *node, lv_tree_walk_mode_t mode, lv_tree_traverse_cb_t cb, lv_tree_before_cb_t bcb, lv_tree_after_cb_t acb, void *user_data) + * lv_obj_t *lv_indev_get_scroll_obj(const lv_indev_t *indev) */ -static PyObject *py_lv_tree_walk_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_scroll_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; PyObject *cb_py; PyObject *bcb_py; PyObject *acb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOOOO", &mode_py, &cb_py, &bcb_py, &acb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - const lv_tree_node_t *node = (lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(self); - void *user_data = mp_to_ptr(user_data_py); - lv_tree_walk_mode_t mode = (uint8_t)mp_obj_get_int(mode_py); - void *cb = mp_lv_callback(cb_py, &lv_tree_walk_cb_callback, "lv_tree_walk_cb", &user_data, NULL, (NULL), (NULL)); - void *bcb = mp_lv_callback(bcb_py, &lv_tree_walk_bcb_callback, "lv_tree_walk_bcb", &user_data, NULL, (NULL), (NULL)); - void *acb = mp_lv_callback(acb_py, &lv_tree_walk_acb_callback, "lv_tree_walk_acb", &user_data, NULL, (NULL), (NULL)); + + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((bool (*)(const lv_tree_node_t *, lv_tree_walk_mode_t, lv_tree_traverse_cb_t, lv_tree_before_cb_t, lv_tree_after_cb_t, void *))lv_tree_walk)(node, mode, cb, bcb, acb, user_data); + _res = ((lv_obj_t *(*)(const lv_indev_t *))lv_indev_get_scroll_obj)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_tree_walk_struct_method_def = { - "lv_tree_walk", - (PyCFunction)py_lv_tree_walk_struct_method, +static PyMethodDef py_lv_indev_get_scroll_obj_struct_method_def = { + "lv_indev_get_scroll_obj", + (PyCFunction)py_lv_indev_get_scroll_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_tree_node_t_methods[] = { - {"delete", (PyCFunction)py_lv_tree_node_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"walk", (PyCFunction)py_lv_tree_walk_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * const void *lv_font_get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * void lv_indev_get_vect(const lv_indev_t *indev, lv_point_t *point) */ -static PyObject *py_lv_font_get_glyph_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_vect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; lvpy_lock(); - _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_font_get_glyph_bitmap)(g_dsc, draw_buf); + ((void (*)(const lv_indev_t *, lv_point_t *))lv_indev_get_vect)(indev, point); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_bitmap_struct_method_def = { - "lv_font_get_glyph_bitmap", - (PyCFunction)py_lv_font_get_glyph_bitmap_struct_method, +static PyMethodDef py_lv_indev_get_vect_struct_method_def = { + "lv_indev_get_vect", + (PyCFunction)py_lv_indev_get_vect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91761,28 +104108,28 @@ static PyMethodDef py_lv_font_get_glyph_bitmap_struct_method_def = { /* * lvgl extension definition for: - * const void *lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t *g_dsc) + * lv_obj_t *lv_indev_get_cursor(lv_indev_t *indev) */ -static PyObject *py_lv_font_get_glyph_static_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_cursor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((const void *(*)(lv_font_glyph_dsc_t *))lv_font_get_glyph_static_bitmap)(g_dsc); + _res = ((lv_obj_t *(*)(lv_indev_t *))lv_indev_get_cursor)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_font_get_glyph_static_bitmap_struct_method_def = { - "lv_font_get_glyph_static_bitmap", - (PyCFunction)py_lv_font_get_glyph_static_bitmap_struct_method, +static PyMethodDef py_lv_indev_get_cursor_struct_method_def = { + "lv_indev_get_cursor", + (PyCFunction)py_lv_indev_get_cursor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91790,27 +104137,27 @@ static PyMethodDef py_lv_font_get_glyph_static_bitmap_struct_method_def = { /* * lvgl extension definition for: - * void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t *g_dsc) + * void lv_indev_wait_release(lv_indev_t *indev) */ -static PyObject *py_lv_font_glyph_release_draw_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_wait_release_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_font_glyph_dsc_t *))lv_font_glyph_release_draw_data)(g_dsc); + ((void (*)(lv_indev_t *))lv_indev_wait_release)(indev); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_font_glyph_release_draw_data_struct_method_def = { - "lv_font_glyph_release_draw_data", - (PyCFunction)py_lv_font_glyph_release_draw_data_struct_method, +static PyMethodDef py_lv_indev_wait_release_struct_method_def = { + "lv_indev_wait_release", + (PyCFunction)py_lv_indev_wait_release_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91818,147 +104165,151 @@ static PyMethodDef py_lv_font_glyph_release_draw_data_struct_method_def = { /* * lvgl extension definition for: - * const void *lv_font_get_bitmap_fmt_txt(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * lv_timer_t *lv_indev_get_read_timer(lv_indev_t *indev) */ -static PyObject *py_lv_font_get_bitmap_fmt_txt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_read_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_glyph_dsc_t *g_dsc = (lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(self); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); + + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; + lv_timer_t * _res; lvpy_lock(); - _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_font_get_bitmap_fmt_txt)(g_dsc, draw_buf); + _res = ((lv_timer_t *(*)(lv_indev_t *))lv_indev_get_read_timer)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_font_get_bitmap_fmt_txt_struct_method_def = { - "lv_font_get_bitmap_fmt_txt", - (PyCFunction)py_lv_font_get_bitmap_fmt_txt_struct_method, +static PyMethodDef py_lv_indev_get_read_timer_struct_method_def = { + "lv_indev_get_read_timer", + (PyCFunction)py_lv_indev_get_read_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_font_glyph_dsc_t_methods[] = { - {"get_glyph_bitmap", (PyCFunction)py_lv_font_get_glyph_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_static_bitmap", (PyCFunction)py_lv_font_get_glyph_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"release_draw_data", (PyCFunction)py_lv_font_glyph_release_draw_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_bitmap_fmt_txt", (PyCFunction)py_lv_font_get_bitmap_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_font_glyph_dsc_gid_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * bool lv_font_info_is_equal(const lv_font_info_t *ft_info_1, const lv_font_info_t *ft_info_2) + * void lv_indev_set_mode(lv_indev_t *indev, lv_indev_mode_t mode) */ -static PyObject *py_lv_font_info_is_equal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ft_info_2_py; - if (!PyArg_ParseTuple(py_args, "O", &ft_info_2_py)) { PyGILState_Release(gstate); return NULL; } - const lv_font_info_t *ft_info_1 = (lv_font_info_t *)mp_write_ptr_lv_font_info_t(self); - const lv_font_info_t *ft_info_2 = (const lv_font_info_t *)mp_write_ptr_lv_font_info_t(ft_info_2_py); + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_indev_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_info_t *, const lv_font_info_t *))lv_font_info_is_equal)(ft_info_1, ft_info_2); + ((void (*)(lv_indev_t *, lv_indev_mode_t))lv_indev_set_mode)(indev, mode); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_info_is_equal_struct_method_def = { - "lv_font_info_is_equal", - (PyCFunction)py_lv_font_info_is_equal_struct_method, +static PyMethodDef py_lv_indev_set_mode_struct_method_def = { + "lv_indev_set_mode", + (PyCFunction)py_lv_indev_set_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_font_info_t_methods[] = { - {"is_equal", (PyCFunction)py_lv_font_info_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * uint32_t lv_layout_create(lv_layout_callbacks_t callbacks, void *user_data) + * lv_indev_mode_t lv_indev_get_mode(lv_indev_t *indev) */ -static PyObject *py_lv_layout_create_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_layout_callbacks_t callbacks = {0}; { lv_layout_callbacks_t *p_ = (lv_layout_callbacks_t *)mp_write_ptr_lv_layout_callbacks_t(self); if (p_) callbacks = *p_; } - void *user_data = mp_to_ptr(user_data_py); + + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_indev_mode_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_layout_callbacks_t, void *))lv_layout_create)(callbacks, user_data); + _res = ((lv_indev_mode_t (*)(lv_indev_t *))lv_indev_get_mode)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_layout_create_struct_method_def = { - "lv_layout_create", - (PyCFunction)py_lv_layout_create_struct_method, +static PyMethodDef py_lv_indev_get_mode_struct_method_def = { + "lv_indev_get_mode", + (PyCFunction)py_lv_indev_get_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_layout_callbacks_t_methods[] = { - {"create", (PyCFunction)py_lv_layout_create_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; +/* + * Callback function lv_indev_add_event_cb_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_indev_add_event_cb_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_add_event_cb_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} /* * lvgl extension definition for: - * void lv_fs_make_path_from_buffer(lv_fs_path_ex_t *path, char letter, const void *buf, uint32_t size, const char *ext) + * lv_event_dsc_t *lv_indev_add_event_cb(lv_indev_t *indev, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ -static PyObject *py_lv_fs_make_path_from_buffer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_add_event_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long letter_val; PyObject *buf_py; long size_val; PyObject *ext_py; - if (!PyArg_ParseTuple(py_args, "lOlO", &letter_val, &buf_py, &size_val, &ext_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_path_ex_t *path = (lv_fs_path_ex_t *)mp_write_ptr_lv_fs_path_ex_t(self); - char letter = (char)letter_val; - const void *buf = (const void *)mp_to_ptr(buf_py); - uint32_t size = (uint32_t)size_val; - const char *ext = (const char *)(char*)convert_from_str(ext_py); + PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + void *user_data = mp_to_ptr(user_data_py); + lv_event_code_t filter = (int)mp_obj_get_int(filter_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_indev_add_event_cb_event_cb_callback, "lv_indev_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_event_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_fs_path_ex_t *, char, const void *, uint32_t, const char *))lv_fs_make_path_from_buffer)(path, letter, buf, size, ext); + _res = ((lv_event_dsc_t *(*)(lv_indev_t *, lv_event_cb_t, lv_event_code_t, void *))lv_indev_add_event_cb)(indev, event_cb, filter, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_fs_make_path_from_buffer_struct_method_def = { - "lv_fs_make_path_from_buffer", - (PyCFunction)py_lv_fs_make_path_from_buffer_struct_method, +static PyMethodDef py_lv_indev_add_event_cb_struct_method_def = { + "lv_indev_add_event_cb", + (PyCFunction)py_lv_indev_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -91966,69 +104317,59 @@ static PyMethodDef py_lv_fs_make_path_from_buffer_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_fs_get_buffer_from_path(lv_fs_path_ex_t *path, void **buffer, uint32_t *size) + * uint32_t lv_indev_get_event_count(lv_indev_t *indev) */ -static PyObject *py_lv_fs_get_buffer_from_path_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_event_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buffer_py; PyObject *size_py; - if (!PyArg_ParseTuple(py_args, "OO", &buffer_py, &size_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_path_ex_t *path = (lv_fs_path_ex_t *)mp_write_ptr_lv_fs_path_ex_t(self); - void **buffer = mp_to_ptr(buffer_py); - uint32_t *size = mp_array_to_u32ptr(size_py); + + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_fs_path_ex_t *, void **, uint32_t *))lv_fs_get_buffer_from_path)(path, buffer, size); + _res = ((uint32_t (*)(lv_indev_t *))lv_indev_get_event_count)(indev); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_fs_get_buffer_from_path_struct_method_def = { - "lv_fs_get_buffer_from_path", - (PyCFunction)py_lv_fs_get_buffer_from_path_struct_method, +static PyMethodDef py_lv_indev_get_event_count_struct_method_def = { + "lv_indev_get_event_count", + (PyCFunction)py_lv_indev_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_fs_path_ex_t_methods[] = { - {"make_path_from_buffer", (PyCFunction)py_lv_fs_make_path_from_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_buffer_from_path", (PyCFunction)py_lv_fs_get_buffer_from_path_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_open(lv_fs_dir_t *rddir_p, const char *path) + * lv_event_dsc_t *lv_indev_get_event_dsc(lv_indev_t *indev, uint32_t index) */ -static PyObject *py_lv_fs_dir_open_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_event_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - lv_fs_dir_t *rddir_p = (lv_fs_dir_t *)mp_write_ptr_lv_fs_dir_t(self); - const char *path = (const char *)(char*)convert_from_str(path_py); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, const char *))lv_fs_dir_open)(rddir_p, path); + _res = ((lv_event_dsc_t *(*)(lv_indev_t *, uint32_t))lv_indev_get_event_dsc)(indev, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_fs_dir_open_struct_method_def = { - "lv_fs_dir_open", - (PyCFunction)py_lv_fs_dir_open_struct_method, +static PyMethodDef py_lv_indev_get_event_dsc_struct_method_def = { + "lv_indev_get_event_dsc", + (PyCFunction)py_lv_indev_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92036,300 +104377,334 @@ static PyMethodDef py_lv_fs_dir_open_struct_method_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_read(lv_fs_dir_t *rddir_p, char *fn, uint32_t fn_len) + * bool lv_indev_remove_event(lv_indev_t *indev, uint32_t index) */ -static PyObject *py_lv_fs_dir_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_remove_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *fn_py; long fn_len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &fn_py, &fn_len_val)) { PyGILState_Release(gstate); return NULL; } - lv_fs_dir_t *rddir_p = (lv_fs_dir_t *)mp_write_ptr_lv_fs_dir_t(self); - char *fn = (char*)convert_from_str(fn_py); - uint32_t fn_len = (uint32_t)fn_len_val; + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_fs_res_t _res; + lv_event_dsc_t *_lvpy_release_dsc = lv_indev_get_event_dsc(indev, index); + void *_lvpy_release_ud = _lvpy_release_dsc ? lv_event_dsc_get_user_data(_lvpy_release_dsc) : NULL; + bool _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_dir_t *, char *, uint32_t))lv_fs_dir_read)(rddir_p, fn, fn_len); + _res = ((bool (*)(lv_indev_t *, uint32_t))lv_indev_remove_event)(indev, index); lvpy_unlock(); - + if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_fs_dir_read_struct_method_def = { - "lv_fs_dir_read", - (PyCFunction)py_lv_fs_dir_read_struct_method, +static PyMethodDef py_lv_indev_remove_event_struct_method_def = { + "lv_indev_remove_event", + (PyCFunction)py_lv_indev_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_indev_remove_event_cb_with_user_data_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_indev_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_remove_event_cb_with_user_data_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t *rddir_p) + * uint32_t lv_indev_remove_event_cb_with_user_data(lv_indev_t *indev, lv_event_cb_t event_cb, void *user_data) */ -static PyObject *py_lv_fs_dir_close_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_remove_event_cb_with_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_fs_dir_t *rddir_p = (lv_fs_dir_t *)mp_write_ptr_lv_fs_dir_t(self); + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_indev_remove_event_cb_with_user_data_event_cb_callback, "lv_indev_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(lv_fs_dir_t *))lv_fs_dir_close)(rddir_p); + _res = ((uint32_t (*)(lv_indev_t *, lv_event_cb_t, void *))lv_indev_remove_event_cb_with_user_data)(indev, event_cb, user_data); lvpy_unlock(); - + if (_res > 0) lvpy_release_callback_user_data(user_data); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_fs_dir_close_struct_method_def = { - "lv_fs_dir_close", - (PyCFunction)py_lv_fs_dir_close_struct_method, +static PyMethodDef py_lv_indev_remove_event_cb_with_user_data_struct_method_def = { + "lv_indev_remove_event_cb_with_user_data", + (PyCFunction)py_lv_indev_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_fs_dir_t_methods[] = { - {"open", (PyCFunction)py_lv_fs_dir_open_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"read", (PyCFunction)py_lv_fs_dir_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"close", (PyCFunction)py_lv_fs_dir_close_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_fill_dsc_init(lv_draw_fill_dsc_t *dsc) + * lv_result_t lv_indev_send_event(lv_indev_t *indev, lv_event_code_t code, void *param) */ -static PyObject *py_lv_draw_fill_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_send_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_fill_dsc_t *dsc = (lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(self); + PyObject *code_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OO", &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_event_code_t code = (int)mp_obj_get_int(code_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_fill_dsc_t *))lv_draw_fill_dsc_init)(dsc); + _res = ((lv_result_t (*)(lv_indev_t *, lv_event_code_t, void *))lv_indev_send_event)(indev, code, param); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_fill_dsc_init_struct_method_def = { - "lv_draw_fill_dsc_init", - (PyCFunction)py_lv_draw_fill_dsc_init_struct_method, +static PyMethodDef py_lv_indev_send_event_struct_method_def = { + "lv_indev_send_event", + (PyCFunction)py_lv_indev_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_fill_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_fill_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; +/* + * Callback function lv_indev_t_remap_cb (CPython) + * lv_key_t lv_indev_key_remap_cb_t(lv_indev_t *indev, lv_key_t key) + */ +static lv_key_t lv_indev_t_remap_cb_callback(lv_indev_t *arg0, lv_key_t arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (lv_key_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_t_remap_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_key_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_indev_t((void*)arg0); + PyObject *py_arg1 = mp_obj_new_int(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_key_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_key_t){0}; } + lv_key_t _c_res = (int)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} /* * lvgl extension definition for: - * void lv_draw_border_dsc_init(lv_draw_border_dsc_t *dsc) + * void lv_indev_set_key_remap_cb(lv_indev_t *indev, lv_indev_key_remap_cb_t remap_cb) */ -static PyObject *py_lv_draw_border_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_key_remap_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_border_dsc_t *dsc = (lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(self); + PyObject *remap_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &remap_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + void *remap_cb = mp_lv_callback(remap_cb_py, &lv_indev_t_remap_cb_callback, "lv_indev_t_remap_cb", &indev->user_data, indev, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_border_dsc_t *))lv_draw_border_dsc_init)(dsc); + ((void (*)(lv_indev_t *, lv_indev_key_remap_cb_t))lv_indev_set_key_remap_cb)(indev, remap_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_border_dsc_init_struct_method_def = { - "lv_draw_border_dsc_init", - (PyCFunction)py_lv_draw_border_dsc_init_struct_method, +static PyMethodDef py_lv_indev_set_key_remap_cb_struct_method_def = { + "lv_indev_set_key_remap_cb", + (PyCFunction)py_lv_indev_set_key_remap_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_border_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_border_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_box_shadow_dsc_init(lv_draw_box_shadow_dsc_t *dsc) + * void lv_indev_set_ccw(lv_indev_t *indev) */ -static PyObject *py_lv_draw_box_shadow_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_ccw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_box_shadow_dsc_t *dsc = (lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(self); + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_box_shadow_dsc_t *))lv_draw_box_shadow_dsc_init)(dsc); + ((void (*)(lv_indev_t *))lv_indev_set_ccw)(indev); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_box_shadow_dsc_init_struct_method_def = { - "lv_draw_box_shadow_dsc_init", - (PyCFunction)py_lv_draw_box_shadow_dsc_init_struct_method, +static PyMethodDef py_lv_indev_set_ccw_struct_method_def = { + "lv_indev_set_ccw", + (PyCFunction)py_lv_indev_set_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_box_shadow_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_box_shadow_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_letter_dsc_init(lv_draw_letter_dsc_t *dsc) + * void lv_indev_clear_ccw(lv_indev_t *indev) */ -static PyObject *py_lv_draw_letter_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_clear_ccw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_letter_dsc_t *dsc = (lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(self); + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_letter_dsc_t *))lv_draw_letter_dsc_init)(dsc); + ((void (*)(lv_indev_t *))lv_indev_clear_ccw)(indev); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_letter_dsc_init_struct_method_def = { - "lv_draw_letter_dsc_init", - (PyCFunction)py_lv_draw_letter_dsc_init_struct_method, +static PyMethodDef py_lv_indev_clear_ccw_struct_method_def = { + "lv_indev_clear_ccw", + (PyCFunction)py_lv_indev_clear_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_letter_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_letter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_glyph_dsc_init(lv_draw_glyph_dsc_t *dsc) + * bool lv_indev_get_ccw(const lv_indev_t *indev) */ -static PyObject *py_lv_draw_glyph_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_ccw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_glyph_dsc_t *dsc = (lv_draw_glyph_dsc_t *)mp_write_ptr_lv_draw_glyph_dsc_t(self); + const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_glyph_dsc_t *))lv_draw_glyph_dsc_init)(dsc); + _res = ((bool (*)(const lv_indev_t *))lv_indev_get_ccw)(indev); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_glyph_dsc_init_struct_method_def = { - "lv_draw_glyph_dsc_init", - (PyCFunction)py_lv_draw_glyph_dsc_init_struct_method, +static PyMethodDef py_lv_indev_get_ccw_struct_method_def = { + "lv_indev_get_ccw", + (PyCFunction)py_lv_indev_get_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_glyph_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_glyph_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_triangle_dsc_init(lv_draw_triangle_dsc_t *draw_dsc) + * void lv_indev_gesture_init(lv_indev_t *indev) */ -static PyObject *py_lv_draw_triangle_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_triangle_dsc_t *draw_dsc = (lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(self); + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_triangle_dsc_t *))lv_draw_triangle_dsc_init)(draw_dsc); + ((void (*)(lv_indev_t *))lv_indev_gesture_init)(indev); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_triangle_dsc_init_struct_method_def = { - "lv_draw_triangle_dsc_init", - (PyCFunction)py_lv_draw_triangle_dsc_init_struct_method, +static PyMethodDef py_lv_indev_gesture_init_struct_method_def = { + "lv_indev_gesture_init", + (PyCFunction)py_lv_indev_gesture_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_triangle_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_triangle_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_indev_delete(lv_indev_t *indev) + * void lv_indev_set_pinch_up_threshold(lv_indev_t *indev, float threshold) */ -static PyObject *py_lv_indev_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_pinch_up_threshold_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + double threshold_val; + if (!PyArg_ParseTuple(py_args, "d", &threshold_val)) { PyGILState_Release(gstate); return NULL; } lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + float threshold = (float)threshold_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_delete)(indev); + ((void (*)(lv_indev_t *, float))lv_indev_set_pinch_up_threshold)(indev, threshold); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_delete_struct_method_def = { - "lv_indev_delete", - (PyCFunction)py_lv_indev_delete_struct_method, +static PyMethodDef py_lv_indev_set_pinch_up_threshold_struct_method_def = { + "lv_indev_set_pinch_up_threshold", + (PyCFunction)py_lv_indev_set_pinch_up_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92337,28 +104712,29 @@ static PyMethodDef py_lv_indev_delete_struct_method_def = { /* * lvgl extension definition for: - * lv_indev_t *lv_indev_get_next(lv_indev_t *indev) + * void lv_indev_set_pinch_down_threshold(lv_indev_t *indev, float threshold) */ -static PyObject *py_lv_indev_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_pinch_down_threshold_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + double threshold_val; + if (!PyArg_ParseTuple(py_args, "d", &threshold_val)) { PyGILState_Release(gstate); return NULL; } lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + float threshold = (float)threshold_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_t * _res; lvpy_lock(); - _res = ((lv_indev_t *(*)(lv_indev_t *))lv_indev_get_next)(indev); + ((void (*)(lv_indev_t *, float))lv_indev_set_pinch_down_threshold)(indev, threshold); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_indev_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_next_struct_method_def = { - "lv_indev_get_next", - (PyCFunction)py_lv_indev_get_next_struct_method, +static PyMethodDef py_lv_indev_set_pinch_down_threshold_struct_method_def = { + "lv_indev_set_pinch_down_threshold", + (PyCFunction)py_lv_indev_set_pinch_down_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92366,57 +104742,197 @@ static PyMethodDef py_lv_indev_get_next_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_read(lv_indev_t *indev) + * void lv_indev_set_rotation_rad_threshold(lv_indev_t *indev, float threshold) */ -static PyObject *py_lv_indev_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_rotation_rad_threshold_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + double threshold_val; + if (!PyArg_ParseTuple(py_args, "d", &threshold_val)) { PyGILState_Release(gstate); return NULL; } lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + float threshold = (float)threshold_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_read)(indev); + ((void (*)(lv_indev_t *, float))lv_indev_set_rotation_rad_threshold)(indev, threshold); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_read_struct_method_def = { - "lv_indev_read", - (PyCFunction)py_lv_indev_read_struct_method, +static PyMethodDef py_lv_indev_set_rotation_rad_threshold_struct_method_def = { + "lv_indev_set_rotation_rad_threshold", + (PyCFunction)py_lv_indev_set_rotation_rad_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Struct lv_indev_touch_data_t (CPython) + */ + +extern PyMethodDef py_lv_indev_touch_data_t_methods[]; + +static PyObject *py_lv_indev_touch_data_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "point") == 0) return mp_read_byref_lv_point_t(data->point); + if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); + if (strcmp(attr, "id") == 0) return mp_obj_new_int_from_uint(data->id); + if (strcmp(attr, "timestamp") == 0) return mp_obj_new_int_from_uint(data->timestamp); + for (PyMethodDef *m = py_lv_indev_touch_data_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_indev_touch_data_t_field_names[] = {"point", "state", "id", "timestamp", NULL}; + +static PyObject *py_lv_indev_touch_data_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_indev_touch_data_t_field_names, py_lv_indev_touch_data_t_methods); +} + +static PyMethodDef py_lv_indev_touch_data_t_type_methods[] = { + {"__dir__", py_lv_indev_touch_data_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_indev_touch_data_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_indev_touch_data_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "point") == 0) { data->point = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "id") == 0) { data->id = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "timestamp") == 0) { data->timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_indev_touch_data_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_indev_touch_data_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_touch_data_t)); +} + +static void py_lv_indev_touch_data_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_indev_touch_data_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_indev_touch_data_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_indev_touch_data_t_dealloc, + .tp_getattro = (getter)py_lv_indev_touch_data_t_getattro, + .tp_setattro = (setter)py_lv_indev_touch_data_t_setattro, + .tp_new = py_lv_indev_touch_data_t_new, + .tp_methods = py_lv_indev_touch_data_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_indev_touch_data_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_indev_touch_data_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_touch_data_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_indev_touch_data_t*)self->data; +} + +static lv_indev_touch_data_t mp_write_scratch_lv_indev_touch_data_t; + +static inline void* mp_write_value_ptr_lv_indev_touch_data_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_touch_data_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_indev_touch_data_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_touch_data_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_indev_touch_data_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_indev_touch_data_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_touch_data_t or dict, got None"); + } + memset(&mp_write_scratch_lv_indev_touch_data_t, 0, sizeof(lv_indev_touch_data_t)); + return &mp_write_scratch_lv_indev_touch_data_t; +} + +#define mp_write_lv_indev_touch_data_t(struct_obj) (*((lv_indev_touch_data_t*)mp_write_value_ptr_lv_indev_touch_data_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_indev_touch_data_t(void *field) +{ + return lv_to_mp_struct(&py_lv_indev_touch_data_t_type, field); +} + +#define mp_read_lv_indev_touch_data_t(field) lv_to_mp_struct_own(&py_lv_indev_touch_data_t_type, copy_buffer(&field, sizeof(lv_indev_touch_data_t))) +#define mp_read_byref_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(&field) + + /* * lvgl extension definition for: - * void lv_indev_enable(lv_indev_t *indev, bool enable) + * void lv_indev_gesture_recognizers_update(lv_indev_t *indev, lv_indev_touch_data_t *touches, uint16_t touch_cnt) */ -static PyObject *py_lv_indev_enable_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_recognizers_update_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long enable_val; - if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *touches_py; long touch_cnt_val; + if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - bool enable = (enable_val != 0); + lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); + uint16_t touch_cnt = (uint16_t)touch_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, bool))lv_indev_enable)(indev, enable); + ((void (*)(lv_indev_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_recognizers_update)(indev, touches, touch_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_enable_struct_method_def = { - "lv_indev_enable", - (PyCFunction)py_lv_indev_enable_struct_method, +static PyMethodDef py_lv_indev_gesture_recognizers_update_struct_method_def = { + "lv_indev_gesture_recognizers_update", + (PyCFunction)py_lv_indev_gesture_recognizers_update_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92424,92 +104940,85 @@ static PyMethodDef py_lv_indev_enable_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_type(lv_indev_t *indev, lv_indev_type_t indev_type) + * void lv_indev_gesture_recognizers_set_data(lv_indev_t *indev, lv_indev_data_t *data) */ -static PyObject *py_lv_indev_set_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_recognizers_set_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *indev_type_py; - if (!PyArg_ParseTuple(py_args, "O", &indev_type_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_indev_type_t indev_type = (int)mp_obj_get_int(indev_type_py); + lv_indev_data_t *data = mp_write_ptr_lv_indev_data_t(data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_indev_type_t))lv_indev_set_type)(indev, indev_type); + ((void (*)(lv_indev_t *, lv_indev_data_t *))lv_indev_gesture_recognizers_set_data)(indev, data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_type_struct_method_def = { - "lv_indev_set_type", - (PyCFunction)py_lv_indev_set_type_struct_method, +static PyMethodDef py_lv_indev_gesture_recognizers_set_data_struct_method_def = { + "lv_indev_gesture_recognizers_set_data", + (PyCFunction)py_lv_indev_gesture_recognizers_set_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_indev_t_read_cb (CPython) - * void lv_indev_read_cb_t(lv_indev_t *indev, lv_indev_data_t *data) + * lvgl extension definition for: + * void lv_indev_scroll_handler(lv_indev_t *indev) */ -static void lv_indev_t_read_cb_callback(lv_indev_t *arg0, lv_indev_data_t *arg1) +static PyObject *py_lv_indev_scroll_handler_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_t_read_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_indev_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_indev_data_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_indev_t *))lv_indev_scroll_handler)(indev); + lvpy_unlock(); + PyGILState_Release(gstate); + Py_RETURN_NONE; } +static PyMethodDef py_lv_indev_scroll_handler_struct_method_def = { + "lv_indev_scroll_handler", + (PyCFunction)py_lv_indev_scroll_handler_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_indev_set_read_cb(lv_indev_t *indev, lv_indev_read_cb_t read_cb) + * void lv_indev_scroll_throw_handler(lv_indev_t *indev) */ -static PyObject *py_lv_indev_set_read_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_scroll_throw_handler_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *read_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &read_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - void *read_cb = mp_lv_callback(read_cb_py, &lv_indev_t_read_cb_callback, "lv_indev_t_read_cb", &indev->user_data, indev, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_indev_read_cb_t))lv_indev_set_read_cb)(indev, read_cb); + ((void (*)(lv_indev_t *))lv_indev_scroll_throw_handler)(indev); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_read_cb_struct_method_def = { - "lv_indev_set_read_cb", - (PyCFunction)py_lv_indev_set_read_cb_struct_method, +static PyMethodDef py_lv_indev_scroll_throw_handler_struct_method_def = { + "lv_indev_scroll_throw_handler", + (PyCFunction)py_lv_indev_scroll_throw_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92517,29 +105026,30 @@ static PyMethodDef py_lv_indev_set_read_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_user_data(lv_indev_t *indev, void *user_data) + * int32_t lv_indev_scroll_throw_predict(lv_indev_t *indev, lv_dir_t dir) */ -static PyObject *py_lv_indev_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_scroll_throw_predict_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *dir_py; + if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - void *user_data = mp_to_ptr(user_data_py); + lv_dir_t dir = (int)mp_obj_get_int(dir_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_indev_t *, void *))lv_indev_set_user_data)(indev, user_data); + _res = ((int32_t (*)(lv_indev_t *, lv_dir_t))lv_indev_scroll_throw_predict)(indev, dir); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_set_user_data_struct_method_def = { - "lv_indev_set_user_data", - (PyCFunction)py_lv_indev_set_user_data_struct_method, +static PyMethodDef py_lv_indev_scroll_throw_predict_struct_method_def = { + "lv_indev_scroll_throw_predict", + (PyCFunction)py_lv_indev_scroll_throw_predict_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92547,59 +105057,128 @@ static PyMethodDef py_lv_indev_set_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_driver_data(lv_indev_t *indev, void *driver_data) + * lv_obj_t *lv_indev_find_scroll_obj(lv_indev_t *indev) */ -static PyObject *py_lv_indev_set_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_find_scroll_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *driver_data_py; - if (!PyArg_ParseTuple(py_args, "O", &driver_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - void *driver_data = mp_to_ptr(driver_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_indev_t *, void *))lv_indev_set_driver_data)(indev, driver_data); + _res = ((lv_obj_t *(*)(lv_indev_t *))lv_indev_find_scroll_obj)(indev); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_indev_set_driver_data_struct_method_def = { - "lv_indev_set_driver_data", - (PyCFunction)py_lv_indev_set_driver_data_struct_method, +static PyMethodDef py_lv_indev_find_scroll_obj_struct_method_def = { + "lv_indev_find_scroll_obj", + (PyCFunction)py_lv_indev_find_scroll_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_indev_t_methods[] = { + {"delete", (PyCFunction)py_lv_indev_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_next", (PyCFunction)py_lv_indev_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"read", (PyCFunction)py_lv_indev_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"enable", (PyCFunction)py_lv_indev_enable_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_type", (PyCFunction)py_lv_indev_set_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_read_cb", (PyCFunction)py_lv_indev_set_read_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_indev_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_driver_data", (PyCFunction)py_lv_indev_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_display", (PyCFunction)py_lv_indev_set_display_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_long_press_time", (PyCFunction)py_lv_indev_set_long_press_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_long_press_repeat_time", (PyCFunction)py_lv_indev_set_long_press_repeat_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_double_click_time", (PyCFunction)py_lv_indev_set_double_click_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_limit", (PyCFunction)py_lv_indev_set_scroll_limit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_scroll_throw", (PyCFunction)py_lv_indev_set_scroll_throw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_gesture_min_velocity", (PyCFunction)py_lv_indev_set_gesture_min_velocity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_gesture_min_distance", (PyCFunction)py_lv_indev_set_gesture_min_distance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_type", (PyCFunction)py_lv_indev_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_read_cb", (PyCFunction)py_lv_indev_get_read_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_state", (PyCFunction)py_lv_indev_get_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_group", (PyCFunction)py_lv_indev_get_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_display", (PyCFunction)py_lv_indev_get_display_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_indev_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_driver_data", (PyCFunction)py_lv_indev_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_press_moved", (PyCFunction)py_lv_indev_get_press_moved_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset", (PyCFunction)py_lv_indev_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"stop_processing", (PyCFunction)py_lv_indev_stop_processing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset_long_press", (PyCFunction)py_lv_indev_reset_long_press_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_cursor", (PyCFunction)py_lv_indev_set_cursor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_group", (PyCFunction)py_lv_indev_set_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_button_points", (PyCFunction)py_lv_indev_set_button_points_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_point", (PyCFunction)py_lv_indev_get_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_gesture_dir", (PyCFunction)py_lv_indev_get_gesture_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_key", (PyCFunction)py_lv_indev_get_key_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_short_click_streak", (PyCFunction)py_lv_indev_get_short_click_streak_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_dir", (PyCFunction)py_lv_indev_get_scroll_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_scroll_obj", (PyCFunction)py_lv_indev_get_scroll_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_vect", (PyCFunction)py_lv_indev_get_vect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_cursor", (PyCFunction)py_lv_indev_get_cursor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"wait_release", (PyCFunction)py_lv_indev_wait_release_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_read_timer", (PyCFunction)py_lv_indev_get_read_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_mode", (PyCFunction)py_lv_indev_set_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mode", (PyCFunction)py_lv_indev_get_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_event_cb", (PyCFunction)py_lv_indev_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_event_count", (PyCFunction)py_lv_indev_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_event_dsc", (PyCFunction)py_lv_indev_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_event", (PyCFunction)py_lv_indev_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_event_cb_with_user_data", (PyCFunction)py_lv_indev_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"send_event", (PyCFunction)py_lv_indev_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_key_remap_cb", (PyCFunction)py_lv_indev_set_key_remap_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_ccw", (PyCFunction)py_lv_indev_set_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_ccw", (PyCFunction)py_lv_indev_clear_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_ccw", (PyCFunction)py_lv_indev_get_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"gesture_init", (PyCFunction)py_lv_indev_gesture_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pinch_up_threshold", (PyCFunction)py_lv_indev_set_pinch_up_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pinch_down_threshold", (PyCFunction)py_lv_indev_set_pinch_down_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rotation_rad_threshold", (PyCFunction)py_lv_indev_set_rotation_rad_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"gesture_recognizers_update", (PyCFunction)py_lv_indev_gesture_recognizers_update_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"gesture_recognizers_set_data", (PyCFunction)py_lv_indev_gesture_recognizers_set_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_handler", (PyCFunction)py_lv_indev_scroll_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_throw_handler", (PyCFunction)py_lv_indev_scroll_throw_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"scroll_throw_predict", (PyCFunction)py_lv_indev_scroll_throw_predict_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"find_scroll_obj", (PyCFunction)py_lv_indev_find_scroll_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_indev_pointer_t_methods[] = {{NULL}}; +PyMethodDef py_lv_indev_keypad_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_indev_set_display(lv_indev_t *indev, struct _lv_display_t *disp) + * void lv_indev_gesture_detect_pinch(lv_indev_gesture_recognizer_t *recognizer, lv_indev_touch_data_t *touches, uint16_t touch_cnt) */ -static PyObject *py_lv_indev_set_display_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_detect_pinch_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *disp_py; - if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - struct _lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + PyObject *touches_py; long touch_cnt_val; + if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); + lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); + uint16_t touch_cnt = (uint16_t)touch_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, struct _lv_display_t *))lv_indev_set_display)(indev, disp); + ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_detect_pinch)(recognizer, touches, touch_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_display_struct_method_def = { - "lv_indev_set_display", - (PyCFunction)py_lv_indev_set_display_struct_method, +static PyMethodDef py_lv_indev_gesture_detect_pinch_struct_method_def = { + "lv_indev_gesture_detect_pinch", + (PyCFunction)py_lv_indev_gesture_detect_pinch_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92607,29 +105186,30 @@ static PyMethodDef py_lv_indev_set_display_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_long_press_time(lv_indev_t *indev, uint16_t long_press_time) + * void lv_indev_gesture_detect_rotation(lv_indev_gesture_recognizer_t *recognizer, lv_indev_touch_data_t *touches, uint16_t touch_cnt) */ -static PyObject *py_lv_indev_set_long_press_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_detect_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long long_press_time_val; - if (!PyArg_ParseTuple(py_args, "l", &long_press_time_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint16_t long_press_time = (uint16_t)long_press_time_val; + PyObject *touches_py; long touch_cnt_val; + if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); + lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); + uint16_t touch_cnt = (uint16_t)touch_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, uint16_t))lv_indev_set_long_press_time)(indev, long_press_time); + ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_detect_rotation)(recognizer, touches, touch_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_long_press_time_struct_method_def = { - "lv_indev_set_long_press_time", - (PyCFunction)py_lv_indev_set_long_press_time_struct_method, +static PyMethodDef py_lv_indev_gesture_detect_rotation_struct_method_def = { + "lv_indev_gesture_detect_rotation", + (PyCFunction)py_lv_indev_gesture_detect_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92637,29 +105217,30 @@ static PyMethodDef py_lv_indev_set_long_press_time_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_long_press_repeat_time(lv_indev_t *indev, uint16_t long_press_repeat_time) + * void lv_indev_gesture_detect_two_fingers_swipe(lv_indev_gesture_recognizer_t *recognizer, lv_indev_touch_data_t *touches, uint16_t touch_cnt) */ -static PyObject *py_lv_indev_set_long_press_repeat_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_gesture_detect_two_fingers_swipe_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long long_press_repeat_time_val; - if (!PyArg_ParseTuple(py_args, "l", &long_press_repeat_time_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint16_t long_press_repeat_time = (uint16_t)long_press_repeat_time_val; + PyObject *touches_py; long touch_cnt_val; + if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); + lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); + uint16_t touch_cnt = (uint16_t)touch_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, uint16_t))lv_indev_set_long_press_repeat_time)(indev, long_press_repeat_time); + ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_detect_two_fingers_swipe)(recognizer, touches, touch_cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_long_press_repeat_time_struct_method_def = { - "lv_indev_set_long_press_repeat_time", - (PyCFunction)py_lv_indev_set_long_press_repeat_time_struct_method, +static PyMethodDef py_lv_indev_gesture_detect_two_fingers_swipe_struct_method_def = { + "lv_indev_gesture_detect_two_fingers_swipe", + (PyCFunction)py_lv_indev_gesture_detect_two_fingers_swipe_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92667,29 +105248,29 @@ static PyMethodDef py_lv_indev_set_long_press_repeat_time_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_scroll_limit(lv_indev_t *indev, uint8_t scroll_limit) + * void lv_indev_get_gesture_center_point(lv_indev_gesture_recognizer_t *recognizer, lv_point_t *point) */ -static PyObject *py_lv_indev_set_scroll_limit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_gesture_center_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long scroll_limit_val; - if (!PyArg_ParseTuple(py_args, "l", &scroll_limit_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint8_t scroll_limit = (uint8_t)scroll_limit_val; + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_scroll_limit)(indev, scroll_limit); + ((void (*)(lv_indev_gesture_recognizer_t *, lv_point_t *))lv_indev_get_gesture_center_point)(recognizer, point); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_scroll_limit_struct_method_def = { - "lv_indev_set_scroll_limit", - (PyCFunction)py_lv_indev_set_scroll_limit_struct_method, +static PyMethodDef py_lv_indev_get_gesture_center_point_struct_method_def = { + "lv_indev_get_gesture_center_point", + (PyCFunction)py_lv_indev_get_gesture_center_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92697,29 +105278,29 @@ static PyMethodDef py_lv_indev_set_scroll_limit_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_scroll_throw(lv_indev_t *indev, uint8_t scroll_throw) + * void lv_indev_get_gesture_primary_point(lv_indev_gesture_recognizer_t *recognizer, lv_point_t *point) */ -static PyObject *py_lv_indev_set_scroll_throw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_gesture_primary_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long scroll_throw_val; - if (!PyArg_ParseTuple(py_args, "l", &scroll_throw_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint8_t scroll_throw = (uint8_t)scroll_throw_val; + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_scroll_throw)(indev, scroll_throw); + ((void (*)(lv_indev_gesture_recognizer_t *, lv_point_t *))lv_indev_get_gesture_primary_point)(recognizer, point); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; -} - -static PyMethodDef py_lv_indev_set_scroll_throw_struct_method_def = { - "lv_indev_set_scroll_throw", - (PyCFunction)py_lv_indev_set_scroll_throw_struct_method, +} + +static PyMethodDef py_lv_indev_get_gesture_primary_point_struct_method_def = { + "lv_indev_get_gesture_primary_point", + (PyCFunction)py_lv_indev_get_gesture_primary_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92727,175 +105308,217 @@ static PyMethodDef py_lv_indev_set_scroll_throw_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_gesture_min_velocity(lv_indev_t *indev, uint8_t min_velocity) + * bool lv_indev_recognizer_is_active(lv_indev_gesture_recognizer_t *recognizer) */ -static PyObject *py_lv_indev_set_gesture_min_velocity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_recognizer_is_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_velocity_val; - if (!PyArg_ParseTuple(py_args, "l", &min_velocity_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint8_t min_velocity = (uint8_t)min_velocity_val; + + lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_gesture_min_velocity)(indev, min_velocity); + _res = ((bool (*)(lv_indev_gesture_recognizer_t *))lv_indev_recognizer_is_active)(recognizer); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_indev_set_gesture_min_velocity_struct_method_def = { - "lv_indev_set_gesture_min_velocity", - (PyCFunction)py_lv_indev_set_gesture_min_velocity_struct_method, +static PyMethodDef py_lv_indev_recognizer_is_active_struct_method_def = { + "lv_indev_recognizer_is_active", + (PyCFunction)py_lv_indev_recognizer_is_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_indev_gesture_recognizer_t_methods[] = { + {"detect_pinch", (PyCFunction)py_lv_indev_gesture_detect_pinch_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"detect_rotation", (PyCFunction)py_lv_indev_gesture_detect_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"detect_two_fingers_swipe", (PyCFunction)py_lv_indev_gesture_detect_two_fingers_swipe_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_gesture_center_point", (PyCFunction)py_lv_indev_get_gesture_center_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_gesture_primary_point", (PyCFunction)py_lv_indev_get_gesture_primary_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"recognizer_is_active", (PyCFunction)py_lv_indev_recognizer_is_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_indev_gesture_t_methods[] = {{NULL}}; +PyMethodDef py_lv_indev_gesture_motion_t_methods[] = {{NULL}}; +PyMethodDef py_lv_indev_gesture_configuration_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_indev_set_gesture_min_distance(lv_indev_t *indev, uint8_t min_distance) + * void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t *dsc) */ -static PyObject *py_lv_indev_set_gesture_min_distance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_mask_rect_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long min_distance_val; - if (!PyArg_ParseTuple(py_args, "l", &min_distance_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint8_t min_distance = (uint8_t)min_distance_val; + + lv_draw_mask_rect_dsc_t *dsc = (lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, uint8_t))lv_indev_set_gesture_min_distance)(indev, min_distance); + ((void (*)(lv_draw_mask_rect_dsc_t *))lv_draw_mask_rect_dsc_init)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_gesture_min_distance_struct_method_def = { - "lv_indev_set_gesture_min_distance", - (PyCFunction)py_lv_indev_set_gesture_min_distance_struct_method, +static PyMethodDef py_lv_draw_mask_rect_dsc_init_struct_method_def = { + "lv_draw_mask_rect_dsc_init", + (PyCFunction)py_lv_draw_mask_rect_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_mask_rect_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_mask_rect_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_indev_type_t lv_indev_get_type(const lv_indev_t *indev) + * void lv_indev_set_gesture_data(lv_indev_data_t *data, lv_indev_gesture_recognizer_t *recognizer, lv_indev_gesture_type_t type) */ -static PyObject *py_lv_indev_get_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_set_gesture_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + PyObject *recognizer_py; PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "OO", &recognizer_py, &type_py)) { PyGILState_Release(gstate); return NULL; } + lv_indev_data_t *data = (lv_indev_data_t *)mp_write_ptr_lv_indev_data_t(self); + lv_indev_gesture_recognizer_t *recognizer = mp_write_ptr_lv_indev_gesture_recognizer_t(recognizer_py); + lv_indev_gesture_type_t type = (int)mp_obj_get_int(type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_type_t _res; lvpy_lock(); - _res = ((lv_indev_type_t (*)(const lv_indev_t *))lv_indev_get_type)(indev); + ((void (*)(lv_indev_data_t *, lv_indev_gesture_recognizer_t *, lv_indev_gesture_type_t))lv_indev_set_gesture_data)(data, recognizer, type); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_type_struct_method_def = { - "lv_indev_get_type", - (PyCFunction)py_lv_indev_get_type_struct_method, +static PyMethodDef py_lv_indev_set_gesture_data_struct_method_def = { + "lv_indev_set_gesture_data", + (PyCFunction)py_lv_indev_set_gesture_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_indev_data_t_methods[] = { + {"set_gesture_data", (PyCFunction)py_lv_indev_set_gesture_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_indev_read_cb_t lv_indev_get_read_cb(lv_indev_t *indev) + * lv_font_t *lv_binfont_create_ex(const lv_binfont_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_read_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_binfont_create_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + const lv_binfont_dsc_t *dsc = (lv_binfont_dsc_t *)mp_write_ptr_lv_binfont_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_read_cb_t _res; + lv_font_t * _res; lvpy_lock(); - _res = ((lv_indev_read_cb_t (*)(lv_indev_t *))lv_indev_get_read_cb)(indev); + _res = ((lv_font_t *(*)(const lv_binfont_dsc_t *))lv_binfont_create_ex)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_indev_read_cb_t(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_indev_get_read_cb_struct_method_def = { - "lv_indev_get_read_cb", - (PyCFunction)py_lv_indev_get_read_cb_struct_method, +static PyMethodDef py_lv_binfont_create_ex_struct_method_def = { + "lv_binfont_create_ex", + (PyCFunction)py_lv_binfont_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_binfont_dsc_t_methods[] = { + {"create_ex", (PyCFunction)py_lv_binfont_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_indev_state_t lv_indev_get_state(const lv_indev_t *indev) + * bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t *handler) */ -static PyObject *py_lv_indev_get_state_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_register_blend_handler_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_custom_blend_handler_t *handler = (lv_draw_sw_custom_blend_handler_t *)mp_write_ptr_lv_draw_sw_custom_blend_handler_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_state_t _res; + bool _res; lvpy_lock(); - _res = ((lv_indev_state_t (*)(const lv_indev_t *))lv_indev_get_state)(indev); + _res = ((bool (*)(lv_draw_sw_custom_blend_handler_t *))lv_draw_sw_register_blend_handler)(handler); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_indev_get_state_struct_method_def = { - "lv_indev_get_state", - (PyCFunction)py_lv_indev_get_state_struct_method, +static PyMethodDef py_lv_draw_sw_register_blend_handler_struct_method_def = { + "lv_draw_sw_register_blend_handler", + (PyCFunction)py_lv_draw_sw_register_blend_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_custom_blend_handler_t_methods[] = { + {"register_blend_handler", (PyCFunction)py_lv_draw_sw_register_blend_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_group_t *lv_indev_get_group(const lv_indev_t *indev) + * void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t *param, int32_t p1x, int32_t p1y, int32_t p2x, int32_t p2y, lv_draw_sw_mask_line_side_t side) */ -static PyObject *py_lv_indev_get_group_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_line_points_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + long p1x_val; long p1y_val; long p2x_val; long p2y_val; PyObject *side_py; + if (!PyArg_ParseTuple(py_args, "llllO", &p1x_val, &p1y_val, &p2x_val, &p2y_val, &side_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_mask_line_param_t *param = (lv_draw_sw_mask_line_param_t *)mp_write_ptr_lv_draw_sw_mask_line_param_t(self); + int32_t p1x = (int32_t)p1x_val; + int32_t p1y = (int32_t)p1y_val; + int32_t p2x = (int32_t)p2x_val; + int32_t p2y = (int32_t)p2y_val; + lv_draw_sw_mask_line_side_t side = (int)mp_obj_get_int(side_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; lvpy_lock(); - _res = ((lv_group_t *(*)(const lv_indev_t *))lv_indev_get_group)(indev); + ((void (*)(lv_draw_sw_mask_line_param_t *, int32_t, int32_t, int32_t, int32_t, lv_draw_sw_mask_line_side_t))lv_draw_sw_mask_line_points_init)(param, p1x, p1y, p2x, p2y, side); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_group_struct_method_def = { - "lv_indev_get_group", - (PyCFunction)py_lv_indev_get_group_struct_method, +static PyMethodDef py_lv_draw_sw_mask_line_points_init_struct_method_def = { + "lv_draw_sw_mask_line_points_init", + (PyCFunction)py_lv_draw_sw_mask_line_points_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -92903,173 +105526,229 @@ static PyMethodDef py_lv_indev_get_group_struct_method_def = { /* * lvgl extension definition for: - * lv_display_t *lv_indev_get_display(const lv_indev_t *indev) + * void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t *param, int32_t px, int32_t py, int16_t angle, lv_draw_sw_mask_line_side_t side) */ -static PyObject *py_lv_indev_get_display_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_line_angle_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + long px_val; long py_val; long angle_val; PyObject *side_py; + if (!PyArg_ParseTuple(py_args, "lllO", &px_val, &py_val, &angle_val, &side_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_mask_line_param_t *param = (lv_draw_sw_mask_line_param_t *)mp_write_ptr_lv_draw_sw_mask_line_param_t(self); + int32_t px = (int32_t)px_val; + int32_t py = (int32_t)py_val; + int16_t angle = (int16_t)angle_val; + lv_draw_sw_mask_line_side_t side = (int)mp_obj_get_int(side_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; lvpy_lock(); - _res = ((lv_display_t *(*)(const lv_indev_t *))lv_indev_get_display)(indev); + ((void (*)(lv_draw_sw_mask_line_param_t *, int32_t, int32_t, int16_t, lv_draw_sw_mask_line_side_t))lv_draw_sw_mask_line_angle_init)(param, px, py, angle, side); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_display_struct_method_def = { - "lv_indev_get_display", - (PyCFunction)py_lv_indev_get_display_struct_method, +static PyMethodDef py_lv_draw_sw_mask_line_angle_init_struct_method_def = { + "lv_draw_sw_mask_line_angle_init", + (PyCFunction)py_lv_draw_sw_mask_line_angle_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_mask_line_param_t_methods[] = { + {"points_init", (PyCFunction)py_lv_draw_sw_mask_line_points_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"angle_init", (PyCFunction)py_lv_draw_sw_mask_line_angle_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_sw_mask_common_dsc_t_methods[] = {{NULL}}; +PyMethodDef py_lv_draw_sw_mask_line_param_cfg_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void *lv_indev_get_user_data(const lv_indev_t *indev) + * void lv_draw_sw_mask_angle_init(lv_draw_sw_mask_angle_param_t *param, int32_t vertex_x, int32_t vertex_y, int32_t start_angle, int32_t end_angle) */ -static PyObject *py_lv_indev_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_angle_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + long vertex_x_val; long vertex_y_val; long start_angle_val; long end_angle_val; + if (!PyArg_ParseTuple(py_args, "llll", &vertex_x_val, &vertex_y_val, &start_angle_val, &end_angle_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_mask_angle_param_t *param = (lv_draw_sw_mask_angle_param_t *)mp_write_ptr_lv_draw_sw_mask_angle_param_t(self); + int32_t vertex_x = (int32_t)vertex_x_val; + int32_t vertex_y = (int32_t)vertex_y_val; + int32_t start_angle = (int32_t)start_angle_val; + int32_t end_angle = (int32_t)end_angle_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_indev_t *))lv_indev_get_user_data)(indev); + ((void (*)(lv_draw_sw_mask_angle_param_t *, int32_t, int32_t, int32_t, int32_t))lv_draw_sw_mask_angle_init)(param, vertex_x, vertex_y, start_angle, end_angle); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_user_data_struct_method_def = { - "lv_indev_get_user_data", - (PyCFunction)py_lv_indev_get_user_data_struct_method, +static PyMethodDef py_lv_draw_sw_mask_angle_init_struct_method_def = { + "lv_draw_sw_mask_angle_init", + (PyCFunction)py_lv_draw_sw_mask_angle_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_mask_angle_param_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_sw_mask_angle_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_sw_mask_angle_param_cfg_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void *lv_indev_get_driver_data(const lv_indev_t *indev) + * lv_result_t lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t *param, const lv_area_t *rect, int32_t radius, bool inv) */ -static PyObject *py_lv_indev_get_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_radius_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + PyObject *rect_py; long radius_val; long inv_val; + if (!PyArg_ParseTuple(py_args, "Oll", &rect_py, &radius_val, &inv_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_mask_radius_param_t *param = (lv_draw_sw_mask_radius_param_t *)mp_write_ptr_lv_draw_sw_mask_radius_param_t(self); + const lv_area_t *rect = (const lv_area_t *)mp_write_ptr_lv_area_t(rect_py); + int32_t radius = (int32_t)radius_val; + bool inv = (inv_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_result_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_indev_t *))lv_indev_get_driver_data)(indev); + _res = ((lv_result_t (*)(lv_draw_sw_mask_radius_param_t *, const lv_area_t *, int32_t, bool))lv_draw_sw_mask_radius_init)(param, rect, radius, inv); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_get_driver_data_struct_method_def = { - "lv_indev_get_driver_data", - (PyCFunction)py_lv_indev_get_driver_data_struct_method, +static PyMethodDef py_lv_draw_sw_mask_radius_init_struct_method_def = { + "lv_draw_sw_mask_radius_init", + (PyCFunction)py_lv_draw_sw_mask_radius_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_mask_radius_param_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_sw_mask_radius_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_sw_mask_radius_param_cfg_t_methods[] = {{NULL}}; +PyMethodDef py_lv_draw_sw_mask_radius_circle_dsc_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * bool lv_indev_get_press_moved(const lv_indev_t *indev) + * void lv_draw_sw_mask_fade_init(lv_draw_sw_mask_fade_param_t *param, const lv_area_t *coords, lv_opa_t opa_top, int32_t y_top, lv_opa_t opa_bottom, int32_t y_bottom) */ -static PyObject *py_lv_indev_get_press_moved_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_fade_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + PyObject *coords_py; long opa_top_val; long y_top_val; long opa_bottom_val; long y_bottom_val; + if (!PyArg_ParseTuple(py_args, "Ollll", &coords_py, &opa_top_val, &y_top_val, &opa_bottom_val, &y_bottom_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_mask_fade_param_t *param = (lv_draw_sw_mask_fade_param_t *)mp_write_ptr_lv_draw_sw_mask_fade_param_t(self); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + lv_opa_t opa_top = (lv_opa_t)opa_top_val; + int32_t y_top = (int32_t)y_top_val; + lv_opa_t opa_bottom = (lv_opa_t)opa_bottom_val; + int32_t y_bottom = (int32_t)y_bottom_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_indev_t *))lv_indev_get_press_moved)(indev); + ((void (*)(lv_draw_sw_mask_fade_param_t *, const lv_area_t *, lv_opa_t, int32_t, lv_opa_t, int32_t))lv_draw_sw_mask_fade_init)(param, coords, opa_top, y_top, opa_bottom, y_bottom); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_press_moved_struct_method_def = { - "lv_indev_get_press_moved", - (PyCFunction)py_lv_indev_get_press_moved_struct_method, +static PyMethodDef py_lv_draw_sw_mask_fade_init_struct_method_def = { + "lv_draw_sw_mask_fade_init", + (PyCFunction)py_lv_draw_sw_mask_fade_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_mask_fade_param_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_sw_mask_fade_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_sw_mask_fade_param_cfg_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_indev_reset(lv_indev_t *indev, lv_obj_t *obj) + * void lv_draw_sw_mask_map_init(lv_draw_sw_mask_map_param_t *param, const lv_area_t *coords, const lv_opa_t *map) */ -static PyObject *py_lv_indev_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_map_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *coords_py; PyObject *map_py; + if (!PyArg_ParseTuple(py_args, "OO", &coords_py, &map_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_mask_map_param_t *param = (lv_draw_sw_mask_map_param_t *)mp_write_ptr_lv_draw_sw_mask_map_param_t(self); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + const lv_opa_t *map = (const lv_opa_t *)mp_array_to_u8ptr(map_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_obj_t *))lv_indev_reset)(indev, obj); + ((void (*)(lv_draw_sw_mask_map_param_t *, const lv_area_t *, const lv_opa_t *))lv_draw_sw_mask_map_init)(param, coords, map); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_reset_struct_method_def = { - "lv_indev_reset", - (PyCFunction)py_lv_indev_reset_struct_method, +static PyMethodDef py_lv_draw_sw_mask_map_init_struct_method_def = { + "lv_draw_sw_mask_map_init", + (PyCFunction)py_lv_draw_sw_mask_map_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_mask_map_param_t_methods[] = { + {"init", (PyCFunction)py_lv_draw_sw_mask_map_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_sw_mask_map_param_cfg_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_indev_stop_processing(lv_indev_t *indev) + * void lv_draw_sw_blend_color_to_a8(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_stop_processing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_a8_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_stop_processing)(indev); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_a8)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_stop_processing_struct_method_def = { - "lv_indev_stop_processing", - (PyCFunction)py_lv_indev_stop_processing_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_a8_struct_method_def = { + "lv_draw_sw_blend_color_to_a8", + (PyCFunction)py_lv_draw_sw_blend_color_to_a8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93077,27 +105756,27 @@ static PyMethodDef py_lv_indev_stop_processing_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_reset_long_press(lv_indev_t *indev) + * void lv_draw_sw_blend_color_to_al88(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_reset_long_press_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_al88_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_reset_long_press)(indev); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_al88)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_reset_long_press_struct_method_def = { - "lv_indev_reset_long_press", - (PyCFunction)py_lv_indev_reset_long_press_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_al88_struct_method_def = { + "lv_draw_sw_blend_color_to_al88", + (PyCFunction)py_lv_draw_sw_blend_color_to_al88_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93105,29 +105784,27 @@ static PyMethodDef py_lv_indev_reset_long_press_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj) + * void lv_draw_sw_blend_color_to_argb8888(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_set_cursor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_argb8888_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cur_obj_py; - if (!PyArg_ParseTuple(py_args, "O", &cur_obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_obj_t *cur_obj = mp_to_lv(cur_obj_py); + + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_obj_t *))lv_indev_set_cursor)(indev, cur_obj); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_argb8888)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_cursor_struct_method_def = { - "lv_indev_set_cursor", - (PyCFunction)py_lv_indev_set_cursor_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_argb8888_struct_method_def = { + "lv_draw_sw_blend_color_to_argb8888", + (PyCFunction)py_lv_draw_sw_blend_color_to_argb8888_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93135,29 +105812,27 @@ static PyMethodDef py_lv_indev_set_cursor_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_group(lv_indev_t *indev, lv_group_t *group) + * void lv_draw_sw_blend_color_to_argb8888_premultiplied(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_set_group_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_argb8888_premultiplied_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *group_py; - if (!PyArg_ParseTuple(py_args, "O", &group_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_group_t *group = mp_write_ptr_lv_group_t(group_py); + + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_group_t *))lv_indev_set_group)(indev, group); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_argb8888_premultiplied)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_group_struct_method_def = { - "lv_indev_set_group", - (PyCFunction)py_lv_indev_set_group_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_argb8888_premultiplied_struct_method_def = { + "lv_draw_sw_blend_color_to_argb8888_premultiplied", + (PyCFunction)py_lv_draw_sw_blend_color_to_argb8888_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93165,29 +105840,27 @@ static PyMethodDef py_lv_indev_set_group_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_button_points(lv_indev_t *indev, const lv_point_t points[]) + * void lv_draw_sw_blend_color_to_i1(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_set_button_points_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_i1_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *points_py; - if (!PyArg_ParseTuple(py_args, "O", &points_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - const lv_point_t *points = (const lv_point_t *)lvpy_struct_arr_arg(self, points_py, "lv_indev_set_button_points:points", sizeof(lv_point_t), mp_write_value_ptr_lv_point_t); + + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, const lv_point_t []))lv_indev_set_button_points)(indev, points); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_i1)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_button_points_struct_method_def = { - "lv_indev_set_button_points", - (PyCFunction)py_lv_indev_set_button_points_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_i1_struct_method_def = { + "lv_draw_sw_blend_color_to_i1", + (PyCFunction)py_lv_draw_sw_blend_color_to_i1_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93195,29 +105868,27 @@ static PyMethodDef py_lv_indev_set_button_points_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_get_point(const lv_indev_t *indev, lv_point_t *point) + * void lv_draw_sw_blend_color_to_l8(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_l8_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_indev_t *, lv_point_t *))lv_indev_get_point)(indev, point); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_l8)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_point_struct_method_def = { - "lv_indev_get_point", - (PyCFunction)py_lv_indev_get_point_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_l8_struct_method_def = { + "lv_draw_sw_blend_color_to_l8", + (PyCFunction)py_lv_draw_sw_blend_color_to_l8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93225,28 +105896,27 @@ static PyMethodDef py_lv_indev_get_point_struct_method_def = { /* * lvgl extension definition for: - * lv_dir_t lv_indev_get_gesture_dir(const lv_indev_t *indev) + * void lv_draw_sw_blend_color_to_rgb565(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_gesture_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_rgb565_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_dir_t _res; lvpy_lock(); - _res = ((lv_dir_t (*)(const lv_indev_t *))lv_indev_get_gesture_dir)(indev); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_rgb565)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_gesture_dir_struct_method_def = { - "lv_indev_get_gesture_dir", - (PyCFunction)py_lv_indev_get_gesture_dir_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_rgb565_struct_method_def = { + "lv_draw_sw_blend_color_to_rgb565", + (PyCFunction)py_lv_draw_sw_blend_color_to_rgb565_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93254,28 +105924,27 @@ static PyMethodDef py_lv_indev_get_gesture_dir_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_indev_get_key(const lv_indev_t *indev) + * void lv_draw_sw_blend_color_to_rgb565_swapped(lv_draw_sw_blend_fill_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_key_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_rgb565_swapped_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_indev_t *))lv_indev_get_key)(indev); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *))lv_draw_sw_blend_color_to_rgb565_swapped)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_key_struct_method_def = { - "lv_indev_get_key", - (PyCFunction)py_lv_indev_get_key_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_rgb565_swapped_struct_method_def = { + "lv_draw_sw_blend_color_to_rgb565_swapped", + (PyCFunction)py_lv_draw_sw_blend_color_to_rgb565_swapped_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93283,57 +105952,71 @@ static PyMethodDef py_lv_indev_get_key_struct_method_def = { /* * lvgl extension definition for: - * uint8_t lv_indev_get_short_click_streak(const lv_indev_t *indev) + * void lv_draw_sw_blend_color_to_rgb888(lv_draw_sw_blend_fill_dsc_t *dsc, uint32_t dest_px_size) */ -static PyObject *py_lv_indev_get_short_click_streak_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_color_to_rgb888_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + long dest_px_size_val; + if (!PyArg_ParseTuple(py_args, "l", &dest_px_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_blend_fill_dsc_t *dsc = (lv_draw_sw_blend_fill_dsc_t *)mp_write_ptr_lv_draw_sw_blend_fill_dsc_t(self); + uint32_t dest_px_size = (uint32_t)dest_px_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(const lv_indev_t *))lv_indev_get_short_click_streak)(indev); + ((void (*)(lv_draw_sw_blend_fill_dsc_t *, uint32_t))lv_draw_sw_blend_color_to_rgb888)(dsc, dest_px_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_short_click_streak_struct_method_def = { - "lv_indev_get_short_click_streak", - (PyCFunction)py_lv_indev_get_short_click_streak_struct_method, +static PyMethodDef py_lv_draw_sw_blend_color_to_rgb888_struct_method_def = { + "lv_draw_sw_blend_color_to_rgb888", + (PyCFunction)py_lv_draw_sw_blend_color_to_rgb888_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_blend_fill_dsc_t_methods[] = { + {"color_to_a8", (PyCFunction)py_lv_draw_sw_blend_color_to_a8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_al88", (PyCFunction)py_lv_draw_sw_blend_color_to_al88_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_argb8888", (PyCFunction)py_lv_draw_sw_blend_color_to_argb8888_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_argb8888_premultiplied", (PyCFunction)py_lv_draw_sw_blend_color_to_argb8888_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_i1", (PyCFunction)py_lv_draw_sw_blend_color_to_i1_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_l8", (PyCFunction)py_lv_draw_sw_blend_color_to_l8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_rgb565", (PyCFunction)py_lv_draw_sw_blend_color_to_rgb565_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_rgb565_swapped", (PyCFunction)py_lv_draw_sw_blend_color_to_rgb565_swapped_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_to_rgb888", (PyCFunction)py_lv_draw_sw_blend_color_to_rgb888_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * lv_dir_t lv_indev_get_scroll_dir(const lv_indev_t *indev) + * void lv_draw_sw_blend_image_to_a8(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_scroll_dir_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_a8_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_dir_t _res; lvpy_lock(); - _res = ((lv_dir_t (*)(const lv_indev_t *))lv_indev_get_scroll_dir)(indev); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_a8)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_scroll_dir_struct_method_def = { - "lv_indev_get_scroll_dir", - (PyCFunction)py_lv_indev_get_scroll_dir_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_a8_struct_method_def = { + "lv_draw_sw_blend_image_to_a8", + (PyCFunction)py_lv_draw_sw_blend_image_to_a8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93341,28 +106024,27 @@ static PyMethodDef py_lv_indev_get_scroll_dir_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_indev_get_scroll_obj(const lv_indev_t *indev) + * void lv_draw_sw_blend_image_to_al88(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_scroll_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_al88_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_indev_t *))lv_indev_get_scroll_obj)(indev); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_al88)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_scroll_obj_struct_method_def = { - "lv_indev_get_scroll_obj", - (PyCFunction)py_lv_indev_get_scroll_obj_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_al88_struct_method_def = { + "lv_draw_sw_blend_image_to_al88", + (PyCFunction)py_lv_draw_sw_blend_image_to_al88_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93370,29 +106052,27 @@ static PyMethodDef py_lv_indev_get_scroll_obj_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_get_vect(const lv_indev_t *indev, lv_point_t *point) + * void lv_draw_sw_blend_image_to_argb8888(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_vect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_argb8888_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - const lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_indev_t *, lv_point_t *))lv_indev_get_vect)(indev, point); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_argb8888)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_vect_struct_method_def = { - "lv_indev_get_vect", - (PyCFunction)py_lv_indev_get_vect_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_argb8888_struct_method_def = { + "lv_draw_sw_blend_image_to_argb8888", + (PyCFunction)py_lv_draw_sw_blend_image_to_argb8888_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93400,28 +106080,27 @@ static PyMethodDef py_lv_indev_get_vect_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_indev_get_cursor(lv_indev_t *indev) + * void lv_draw_sw_blend_image_to_argb8888_premultiplied(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_cursor_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_argb8888_premultiplied_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_indev_t *))lv_indev_get_cursor)(indev); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_argb8888_premultiplied)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_cursor_struct_method_def = { - "lv_indev_get_cursor", - (PyCFunction)py_lv_indev_get_cursor_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_argb8888_premultiplied_struct_method_def = { + "lv_draw_sw_blend_image_to_argb8888_premultiplied", + (PyCFunction)py_lv_draw_sw_blend_image_to_argb8888_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93429,27 +106108,27 @@ static PyMethodDef py_lv_indev_get_cursor_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_wait_release(lv_indev_t *indev) + * void lv_draw_sw_blend_image_to_i1(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_wait_release_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_i1_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_wait_release)(indev); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_i1)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_wait_release_struct_method_def = { - "lv_indev_wait_release", - (PyCFunction)py_lv_indev_wait_release_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_i1_struct_method_def = { + "lv_draw_sw_blend_image_to_i1", + (PyCFunction)py_lv_draw_sw_blend_image_to_i1_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93457,28 +106136,27 @@ static PyMethodDef py_lv_indev_wait_release_struct_method_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_indev_get_read_timer(lv_indev_t *indev) + * void lv_draw_sw_blend_image_to_l8(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_read_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_l8_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(lv_indev_t *))lv_indev_get_read_timer)(indev); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_l8)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_read_timer_struct_method_def = { - "lv_indev_get_read_timer", - (PyCFunction)py_lv_indev_get_read_timer_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_l8_struct_method_def = { + "lv_draw_sw_blend_image_to_l8", + (PyCFunction)py_lv_draw_sw_blend_image_to_l8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93486,29 +106164,27 @@ static PyMethodDef py_lv_indev_get_read_timer_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_mode(lv_indev_t *indev, lv_indev_mode_t mode) + * void lv_draw_sw_blend_image_to_rgb565(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_set_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_rgb565_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_indev_mode_t mode = (int)mp_obj_get_int(mode_py); + + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_indev_mode_t))lv_indev_set_mode)(indev, mode); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_rgb565)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_mode_struct_method_def = { - "lv_indev_set_mode", - (PyCFunction)py_lv_indev_set_mode_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_rgb565_struct_method_def = { + "lv_draw_sw_blend_image_to_rgb565", + (PyCFunction)py_lv_draw_sw_blend_image_to_rgb565_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93516,120 +106192,136 @@ static PyMethodDef py_lv_indev_set_mode_struct_method_def = { /* * lvgl extension definition for: - * lv_indev_mode_t lv_indev_get_mode(lv_indev_t *indev) + * void lv_draw_sw_blend_image_to_rgb565_swapped(lv_draw_sw_blend_image_dsc_t *dsc) */ -static PyObject *py_lv_indev_get_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_image_to_rgb565_swapped_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_mode_t _res; lvpy_lock(); - _res = ((lv_indev_mode_t (*)(lv_indev_t *))lv_indev_get_mode)(indev); + ((void (*)(lv_draw_sw_blend_image_dsc_t *))lv_draw_sw_blend_image_to_rgb565_swapped)(dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_mode_struct_method_def = { - "lv_indev_get_mode", - (PyCFunction)py_lv_indev_get_mode_struct_method, +static PyMethodDef py_lv_draw_sw_blend_image_to_rgb565_swapped_struct_method_def = { + "lv_draw_sw_blend_image_to_rgb565_swapped", + (PyCFunction)py_lv_draw_sw_blend_image_to_rgb565_swapped_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_indev_add_event_cb_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * void lv_draw_sw_blend_image_to_rgb888(lv_draw_sw_blend_image_dsc_t *dsc, uint32_t dest_px_size) */ -static void lv_indev_add_event_cb_event_cb_callback(lv_event_t *arg0) +static PyObject *py_lv_draw_sw_blend_image_to_rgb888_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_add_event_cb_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + long dest_px_size_val; + if (!PyArg_ParseTuple(py_args, "l", &dest_px_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_blend_image_dsc_t *dsc = (lv_draw_sw_blend_image_dsc_t *)mp_write_ptr_lv_draw_sw_blend_image_dsc_t(self); + uint32_t dest_px_size = (uint32_t)dest_px_size_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_draw_sw_blend_image_dsc_t *, uint32_t))lv_draw_sw_blend_image_to_rgb888)(dsc, dest_px_size); + lvpy_unlock(); + PyGILState_Release(gstate); + Py_RETURN_NONE; } +static PyMethodDef py_lv_draw_sw_blend_image_to_rgb888_struct_method_def = { + "lv_draw_sw_blend_image_to_rgb888", + (PyCFunction)py_lv_draw_sw_blend_image_to_rgb888_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +PyMethodDef py_lv_draw_sw_blend_image_dsc_t_methods[] = { + {"to_a8", (PyCFunction)py_lv_draw_sw_blend_image_to_a8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_al88", (PyCFunction)py_lv_draw_sw_blend_image_to_al88_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_argb8888", (PyCFunction)py_lv_draw_sw_blend_image_to_argb8888_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_argb8888_premultiplied", (PyCFunction)py_lv_draw_sw_blend_image_to_argb8888_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_i1", (PyCFunction)py_lv_draw_sw_blend_image_to_i1_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_l8", (PyCFunction)py_lv_draw_sw_blend_image_to_l8_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_rgb565", (PyCFunction)py_lv_draw_sw_blend_image_to_rgb565_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_rgb565_swapped", (PyCFunction)py_lv_draw_sw_blend_image_to_rgb565_swapped_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_rgb888", (PyCFunction)py_lv_draw_sw_blend_image_to_rgb888_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + /* * lvgl extension definition for: - * void lv_indev_add_event_cb(lv_indev_t *indev, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * void lv_draw_sw_grad_cleanup(lv_draw_sw_grad_calc_t *grad) */ -static PyObject *py_lv_indev_add_event_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_grad_cleanup_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - void *user_data = mp_to_ptr(user_data_py); - lv_event_code_t filter = (int)mp_obj_get_int(filter_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_indev_add_event_cb_event_cb_callback, "lv_indev_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); + + lv_draw_sw_grad_calc_t *grad = (lv_draw_sw_grad_calc_t *)mp_write_ptr_lv_draw_sw_grad_calc_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_event_cb_t, lv_event_code_t, void *))lv_indev_add_event_cb)(indev, event_cb, filter, user_data); + ((void (*)(lv_draw_sw_grad_calc_t *))lv_draw_sw_grad_cleanup)(grad); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_add_event_cb_struct_method_def = { - "lv_indev_add_event_cb", - (PyCFunction)py_lv_indev_add_event_cb_struct_method, +static PyMethodDef py_lv_draw_sw_grad_cleanup_struct_method_def = { + "lv_draw_sw_grad_cleanup", + (PyCFunction)py_lv_draw_sw_grad_cleanup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_sw_grad_calc_t_methods[] = { + {"cleanup", (PyCFunction)py_lv_draw_sw_grad_cleanup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * uint32_t lv_indev_get_event_count(lv_indev_t *indev) + * lv_result_t lv_circle_buf_resize(lv_circle_buf_t *circle_buf, uint32_t capacity) */ -static PyObject *py_lv_indev_get_event_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_resize_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + long capacity_val; + if (!PyArg_ParseTuple(py_args, "l", &capacity_val)) { PyGILState_Release(gstate); return NULL; } + lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + uint32_t capacity = (uint32_t)capacity_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_indev_t *))lv_indev_get_event_count)(indev); + _res = ((lv_result_t (*)(lv_circle_buf_t *, uint32_t))lv_circle_buf_resize)(circle_buf, capacity); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_get_event_count_struct_method_def = { - "lv_indev_get_event_count", - (PyCFunction)py_lv_indev_get_event_count_struct_method, +static PyMethodDef py_lv_circle_buf_resize_struct_method_def = { + "lv_circle_buf_resize", + (PyCFunction)py_lv_circle_buf_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93637,30 +106329,27 @@ static PyMethodDef py_lv_indev_get_event_count_struct_method_def = { /* * lvgl extension definition for: - * lv_event_dsc_t *lv_indev_get_event_dsc(lv_indev_t *indev, uint32_t index) + * void lv_circle_buf_destroy(lv_circle_buf_t *circle_buf) */ -static PyObject *py_lv_indev_get_event_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint32_t index = (uint32_t)index_val; + + lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_indev_t *, uint32_t))lv_indev_get_event_dsc)(indev, index); + ((void (*)(lv_circle_buf_t *))lv_circle_buf_destroy)(circle_buf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_event_dsc_struct_method_def = { - "lv_indev_get_event_dsc", - (PyCFunction)py_lv_indev_get_event_dsc_struct_method, +static PyMethodDef py_lv_circle_buf_destroy_struct_method_def = { + "lv_circle_buf_destroy", + (PyCFunction)py_lv_circle_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93668,94 +106357,86 @@ static PyMethodDef py_lv_indev_get_event_dsc_struct_method_def = { /* * lvgl extension definition for: - * bool lv_indev_remove_event(lv_indev_t *indev, uint32_t index) + * uint32_t lv_circle_buf_size(const lv_circle_buf_t *circle_buf) */ -static PyObject *py_lv_indev_remove_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - uint32_t index = (uint32_t)index_val; + + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t *_lvpy_release_dsc = lv_indev_get_event_dsc(indev, index); - void *_lvpy_release_ud = _lvpy_release_dsc ? lv_event_dsc_get_user_data(_lvpy_release_dsc) : NULL; - bool _res; + + uint32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_indev_t *, uint32_t))lv_indev_remove_event)(indev, index); + _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_circle_buf_size)(circle_buf); lvpy_unlock(); - if (_res) lvpy_release_callback_user_data(_lvpy_release_ud); + PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_indev_remove_event_struct_method_def = { - "lv_indev_remove_event", - (PyCFunction)py_lv_indev_remove_event_struct_method, +static PyMethodDef py_lv_circle_buf_size_struct_method_def = { + "lv_circle_buf_size", + (PyCFunction)py_lv_circle_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_indev_remove_event_cb_with_user_data_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * uint32_t lv_circle_buf_capacity(const lv_circle_buf_t *circle_buf) */ -static void lv_indev_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) +static PyObject *py_lv_circle_buf_capacity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_remove_event_cb_with_user_data_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_circle_buf_capacity)(circle_buf); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } +static PyMethodDef py_lv_circle_buf_capacity_struct_method_def = { + "lv_circle_buf_capacity", + (PyCFunction)py_lv_circle_buf_capacity_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * uint32_t lv_indev_remove_event_cb_with_user_data(lv_indev_t *indev, lv_event_cb_t event_cb, void *user_data) + * uint32_t lv_circle_buf_remain(const lv_circle_buf_t *circle_buf) */ -static PyObject *py_lv_indev_remove_event_cb_with_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_remain_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_indev_remove_event_cb_with_user_data_event_cb_callback, "lv_indev_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); + + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_indev_t *, lv_event_cb_t, void *))lv_indev_remove_event_cb_with_user_data)(indev, event_cb, user_data); + _res = ((uint32_t (*)(const lv_circle_buf_t *))lv_circle_buf_remain)(circle_buf); lvpy_unlock(); - if (_res > 0) lvpy_release_callback_user_data(user_data); + PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_indev_remove_event_cb_with_user_data_struct_method_def = { - "lv_indev_remove_event_cb_with_user_data", - (PyCFunction)py_lv_indev_remove_event_cb_with_user_data_struct_method, +static PyMethodDef py_lv_circle_buf_remain_struct_method_def = { + "lv_circle_buf_remain", + (PyCFunction)py_lv_circle_buf_remain_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93763,96 +106444,85 @@ static PyMethodDef py_lv_indev_remove_event_cb_with_user_data_struct_method_def /* * lvgl extension definition for: - * lv_result_t lv_indev_send_event(lv_indev_t *indev, lv_event_code_t code, void *param) + * bool lv_circle_buf_is_empty(const lv_circle_buf_t *circle_buf) */ -static PyObject *py_lv_indev_send_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *code_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OO", &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_event_code_t code = (int)mp_obj_get_int(code_py); - void *param = mp_to_ptr(param_py); + + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + bool _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_indev_t *, lv_event_code_t, void *))lv_indev_send_event)(indev, code, param); + _res = ((bool (*)(const lv_circle_buf_t *))lv_circle_buf_is_empty)(circle_buf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_indev_send_event_struct_method_def = { - "lv_indev_send_event", - (PyCFunction)py_lv_indev_send_event_struct_method, +static PyMethodDef py_lv_circle_buf_is_empty_struct_method_def = { + "lv_circle_buf_is_empty", + (PyCFunction)py_lv_circle_buf_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_indev_t_remap_cb (CPython) - * lv_key_t lv_indev_key_remap_cb_t(lv_indev_t *indev, lv_key_t key) + * lvgl extension definition for: + * bool lv_circle_buf_is_full(const lv_circle_buf_t *circle_buf) */ -static lv_key_t lv_indev_t_remap_cb_callback(lv_indev_t *arg0, lv_key_t arg1) +static PyObject *py_lv_circle_buf_is_full_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_key_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_indev_t_remap_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_key_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_indev_t((void*)arg0); - PyObject *py_arg1 = mp_obj_new_int(arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_key_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_key_t){0}; } - lv_key_t _c_res = (int)mp_obj_get_int(result); - Py_DECREF(result); + (void)py_kwds; + + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_circle_buf_t *))lv_circle_buf_is_full)(circle_buf); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + return convert_to_bool(_res); } +static PyMethodDef py_lv_circle_buf_is_full_struct_method_def = { + "lv_circle_buf_is_full", + (PyCFunction)py_lv_circle_buf_is_full_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_indev_set_key_remap_cb(lv_indev_t *indev, lv_indev_key_remap_cb_t remap_cb) + * void lv_circle_buf_reset(lv_circle_buf_t *circle_buf) */ -static PyObject *py_lv_indev_set_key_remap_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *remap_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &remap_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - void *remap_cb = mp_lv_callback(remap_cb_py, &lv_indev_t_remap_cb_callback, "lv_indev_t_remap_cb", &indev->user_data, indev, (NULL), (NULL)); + + lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_indev_key_remap_cb_t))lv_indev_set_key_remap_cb)(indev, remap_cb); + ((void (*)(lv_circle_buf_t *))lv_circle_buf_reset)(circle_buf); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_set_key_remap_cb_struct_method_def = { - "lv_indev_set_key_remap_cb", - (PyCFunction)py_lv_indev_set_key_remap_cb_struct_method, +static PyMethodDef py_lv_circle_buf_reset_struct_method_def = { + "lv_circle_buf_reset", + (PyCFunction)py_lv_circle_buf_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93860,27 +106530,28 @@ static PyMethodDef py_lv_indev_set_key_remap_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_gesture_init(lv_indev_t *indev) + * void *lv_circle_buf_head(const lv_circle_buf_t *circle_buf) */ -static PyObject *py_lv_indev_gesture_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_gesture_init)(indev); + _res = ((void *(*)(const lv_circle_buf_t *))lv_circle_buf_head)(circle_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_indev_gesture_init_struct_method_def = { - "lv_indev_gesture_init", - (PyCFunction)py_lv_indev_gesture_init_struct_method, +static PyMethodDef py_lv_circle_buf_head_struct_method_def = { + "lv_circle_buf_head", + (PyCFunction)py_lv_circle_buf_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93888,29 +106559,28 @@ static PyMethodDef py_lv_indev_gesture_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_pinch_up_threshold(lv_indev_t *indev, float threshold) + * void *lv_circle_buf_tail(const lv_circle_buf_t *circle_buf) */ -static PyObject *py_lv_indev_set_pinch_up_threshold_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - double threshold_val; - if (!PyArg_ParseTuple(py_args, "d", &threshold_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - float threshold = (float)threshold_val; + + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_indev_t *, float))lv_indev_set_pinch_up_threshold)(indev, threshold); + _res = ((void *(*)(const lv_circle_buf_t *))lv_circle_buf_tail)(circle_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_indev_set_pinch_up_threshold_struct_method_def = { - "lv_indev_set_pinch_up_threshold", - (PyCFunction)py_lv_indev_set_pinch_up_threshold_struct_method, +static PyMethodDef py_lv_circle_buf_tail_struct_method_def = { + "lv_circle_buf_tail", + (PyCFunction)py_lv_circle_buf_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93918,29 +106588,30 @@ static PyMethodDef py_lv_indev_set_pinch_up_threshold_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_pinch_down_threshold(lv_indev_t *indev, float threshold) + * lv_result_t lv_circle_buf_read(lv_circle_buf_t *circle_buf, void *data) */ -static PyObject *py_lv_indev_set_pinch_down_threshold_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_read_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - double threshold_val; - if (!PyArg_ParseTuple(py_args, "d", &threshold_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - float threshold = (float)threshold_val; + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } + lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + void *data = mp_to_ptr(data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_indev_t *, float))lv_indev_set_pinch_down_threshold)(indev, threshold); + _res = ((lv_result_t (*)(lv_circle_buf_t *, void *))lv_circle_buf_read)(circle_buf, data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_set_pinch_down_threshold_struct_method_def = { - "lv_indev_set_pinch_down_threshold", - (PyCFunction)py_lv_indev_set_pinch_down_threshold_struct_method, +static PyMethodDef py_lv_circle_buf_read_struct_method_def = { + "lv_circle_buf_read", + (PyCFunction)py_lv_circle_buf_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -93948,227 +106619,243 @@ static PyMethodDef py_lv_indev_set_pinch_down_threshold_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_set_rotation_rad_threshold(lv_indev_t *indev, float threshold) + * lv_result_t lv_circle_buf_write(lv_circle_buf_t *circle_buf, const void *data) */ -static PyObject *py_lv_indev_set_rotation_rad_threshold_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_write_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - double threshold_val; - if (!PyArg_ParseTuple(py_args, "d", &threshold_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - float threshold = (float)threshold_val; + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } + lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + const void *data = (const void *)mp_to_ptr(data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_indev_t *, float))lv_indev_set_rotation_rad_threshold)(indev, threshold); + _res = ((lv_result_t (*)(lv_circle_buf_t *, const void *))lv_circle_buf_write)(circle_buf, data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_set_rotation_rad_threshold_struct_method_def = { - "lv_indev_set_rotation_rad_threshold", - (PyCFunction)py_lv_indev_set_rotation_rad_threshold_struct_method, +static PyMethodDef py_lv_circle_buf_write_struct_method_def = { + "lv_circle_buf_write", + (PyCFunction)py_lv_circle_buf_write_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_indev_touch_data_t (CPython) + * Callback function lv_circle_buf_fill_fill_cb (CPython) + * bool lv_circle_buf_fill_cb_t(void *buf, uint32_t buff_len, int32_t index, void *user_data) */ - -extern PyMethodDef py_lv_indev_touch_data_t_methods[]; - -static PyObject *py_lv_indev_touch_data_t_getattro(PyObject *self, PyObject *name) +static bool lv_circle_buf_fill_fill_cb_callback(void *arg0, uint32_t arg1, int32_t arg2, void *arg3) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "point") == 0) return mp_read_byref_lv_point_t(data->point); - if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); - if (strcmp(attr, "id") == 0) return mp_obj_new_int_from_uint(data->id); - if (strcmp(attr, "timestamp") == 0) return mp_obj_new_int_from_uint(data->timestamp); - for (PyMethodDef *m = py_lv_indev_touch_data_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg3); + if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_circle_buf_fill_fill_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_arg1 = mp_obj_new_int_from_uint(arg1); + PyObject *py_arg2 = mp_obj_new_int(arg2); + PyObject *py_arg3 = ptr_to_mp((void*)arg3); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3) ? PyTuple_Pack(4, py_arg0, py_arg1, py_arg2, py_arg3) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + Py_XDECREF(py_arg3); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } + bool _c_res = mp_obj_is_true(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; } -static const char *const py_lv_indev_touch_data_t_field_names[] = {"point", "state", "id", "timestamp", NULL}; -static PyObject *py_lv_indev_touch_data_t_dir(PyObject *self, PyObject *unused) +/* + * lvgl extension definition for: + * uint32_t lv_circle_buf_fill(lv_circle_buf_t *circle_buf, uint32_t count, lv_circle_buf_fill_cb_t fill_cb, void *user_data) + */ +static PyObject *py_lv_circle_buf_fill_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_indev_touch_data_t_field_names, py_lv_indev_touch_data_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long count_val; PyObject *fill_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "lOO", &count_val, &fill_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + void *user_data = mp_to_ptr(user_data_py); + uint32_t count = (uint32_t)count_val; + void *fill_cb = mp_lv_callback(fill_cb_py, &lv_circle_buf_fill_fill_cb_callback, "lv_circle_buf_fill_fill_cb", &user_data, NULL, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(lv_circle_buf_t *, uint32_t, lv_circle_buf_fill_cb_t, void *))lv_circle_buf_fill)(circle_buf, count, fill_cb, user_data); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_indev_touch_data_t_type_methods[] = { - {"__dir__", py_lv_indev_touch_data_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_circle_buf_fill_struct_method_def = { + "lv_circle_buf_fill", + (PyCFunction)py_lv_circle_buf_fill_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_indev_touch_data_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_indev_touch_data_t *data = (lv_indev_touch_data_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_indev_touch_data_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "point") == 0) { data->point = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "id") == 0) { data->id = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "timestamp") == 0) { data->timestamp = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_indev_touch_data_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_indev_touch_data_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_indev_touch_data_t)); -} - -static void py_lv_indev_touch_data_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_indev_touch_data_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_indev_touch_data_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_indev_touch_data_t_dealloc, - .tp_getattro = (getter)py_lv_indev_touch_data_t_getattro, - .tp_setattro = (setter)py_lv_indev_touch_data_t_setattro, - .tp_new = py_lv_indev_touch_data_t_new, - .tp_methods = py_lv_indev_touch_data_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; -static inline void* mp_write_ptr_lv_indev_touch_data_t(PyObject *self_in) +/* + * lvgl extension definition for: + * lv_result_t lv_circle_buf_skip(lv_circle_buf_t *circle_buf) + */ +static PyObject *py_lv_circle_buf_skip_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_indev_touch_data_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_indev_touch_data_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_indev_touch_data_t*)self->data; -} - -static lv_indev_touch_data_t mp_write_scratch_lv_indev_touch_data_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static inline void* mp_write_value_ptr_lv_indev_touch_data_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_indev_touch_data_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_indev_touch_data_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_indev_touch_data_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_indev_touch_data_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_indev_touch_data_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_indev_touch_data_t or dict, got None"); - } - memset(&mp_write_scratch_lv_indev_touch_data_t, 0, sizeof(lv_indev_touch_data_t)); - return &mp_write_scratch_lv_indev_touch_data_t; + lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_circle_buf_t *))lv_circle_buf_skip)(circle_buf); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_indev_touch_data_t(struct_obj) (*((lv_indev_touch_data_t*)mp_write_value_ptr_lv_indev_touch_data_t(struct_obj))) +static PyMethodDef py_lv_circle_buf_skip_struct_method_def = { + "lv_circle_buf_skip", + (PyCFunction)py_lv_circle_buf_skip_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_indev_touch_data_t(void *field) + +/* + * lvgl extension definition for: + * lv_result_t lv_circle_buf_peek(const lv_circle_buf_t *circle_buf, void *data) + */ +static PyObject *py_lv_circle_buf_peek_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_indev_touch_data_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + void *data = mp_to_ptr(data_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(const lv_circle_buf_t *, void *))lv_circle_buf_peek)(circle_buf, data); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_indev_touch_data_t(field) lv_to_mp_struct_own(&py_lv_indev_touch_data_t_type, copy_buffer(&field, sizeof(lv_indev_touch_data_t))) -#define mp_read_byref_lv_indev_touch_data_t(field) mp_read_ptr_lv_indev_touch_data_t(&field) +static PyMethodDef py_lv_circle_buf_peek_struct_method_def = { + "lv_circle_buf_peek", + (PyCFunction)py_lv_circle_buf_peek_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * void lv_indev_gesture_recognizers_update(lv_indev_t *indev, lv_indev_touch_data_t *touches, uint16_t touch_cnt) + * lv_result_t lv_circle_buf_peek_at(const lv_circle_buf_t *circle_buf, uint32_t index, void *data) */ -static PyObject *py_lv_indev_gesture_recognizers_update_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_peek_at_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *touches_py; long touch_cnt_val; - if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); - uint16_t touch_cnt = (uint16_t)touch_cnt_val; + long index_val; PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "lO", &index_val, &data_py)) { PyGILState_Release(gstate); return NULL; } + const lv_circle_buf_t *circle_buf = (lv_circle_buf_t *)mp_write_ptr_lv_circle_buf_t(self); + uint32_t index = (uint32_t)index_val; + void *data = mp_to_ptr(data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_indev_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_recognizers_update)(indev, touches, touch_cnt); + _res = ((lv_result_t (*)(const lv_circle_buf_t *, uint32_t, void *))lv_circle_buf_peek_at)(circle_buf, index, data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_gesture_recognizers_update_struct_method_def = { - "lv_indev_gesture_recognizers_update", - (PyCFunction)py_lv_indev_gesture_recognizers_update_struct_method, +static PyMethodDef py_lv_circle_buf_peek_at_struct_method_def = { + "lv_circle_buf_peek_at", + (PyCFunction)py_lv_circle_buf_peek_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_circle_buf_t_methods[] = { + {"resize", (PyCFunction)py_lv_circle_buf_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"destroy", (PyCFunction)py_lv_circle_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"size", (PyCFunction)py_lv_circle_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"capacity", (PyCFunction)py_lv_circle_buf_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remain", (PyCFunction)py_lv_circle_buf_remain_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_empty", (PyCFunction)py_lv_circle_buf_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_full", (PyCFunction)py_lv_circle_buf_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset", (PyCFunction)py_lv_circle_buf_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"head", (PyCFunction)py_lv_circle_buf_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"tail", (PyCFunction)py_lv_circle_buf_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"read", (PyCFunction)py_lv_circle_buf_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"write", (PyCFunction)py_lv_circle_buf_write_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"fill", (PyCFunction)py_lv_circle_buf_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"skip", (PyCFunction)py_lv_circle_buf_skip_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"peek", (PyCFunction)py_lv_circle_buf_peek_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"peek_at", (PyCFunction)py_lv_circle_buf_peek_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_indev_gesture_recognizers_set_data(lv_indev_t *indev, lv_indev_data_t *data) + * void lv_lru_delete(lv_lru_t *cache) */ -static PyObject *py_lv_indev_gesture_recognizers_set_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lru_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_indev_data_t *data = mp_write_ptr_lv_indev_data_t(data_py); + + lv_lru_t *cache = (lv_lru_t *)mp_write_ptr_lv_lru_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_t *, lv_indev_data_t *))lv_indev_gesture_recognizers_set_data)(indev, data); + ((void (*)(lv_lru_t *))lv_lru_delete)(cache); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_gesture_recognizers_set_data_struct_method_def = { - "lv_indev_gesture_recognizers_set_data", - (PyCFunction)py_lv_indev_gesture_recognizers_set_data_struct_method, +static PyMethodDef py_lv_lru_delete_struct_method_def = { + "lv_lru_delete", + (PyCFunction)py_lv_lru_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94176,27 +106863,33 @@ static PyMethodDef py_lv_indev_gesture_recognizers_set_data_struct_method_def = /* * lvgl extension definition for: - * void lv_indev_scroll_handler(lv_indev_t *indev) + * lv_lru_res_t lv_lru_set(lv_lru_t *cache, const void *key, size_t key_length, void *value, size_t value_length) */ -static PyObject *py_lv_indev_scroll_handler_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lru_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + PyObject *key_py; long key_length_val; PyObject *value_py; long value_length_val; + if (!PyArg_ParseTuple(py_args, "OlOl", &key_py, &key_length_val, &value_py, &value_length_val)) { PyGILState_Release(gstate); return NULL; } + lv_lru_t *cache = (lv_lru_t *)mp_write_ptr_lv_lru_t(self); + const void *key = (const void *)mp_to_ptr(key_py); + size_t key_length = (size_t)key_length_val; + void *value = mp_to_ptr(value_py); + size_t value_length = (size_t)value_length_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_lru_res_t _res; lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_scroll_handler)(indev); + _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t, void *, size_t))lv_lru_set)(cache, key, key_length, value, value_length); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_scroll_handler_struct_method_def = { - "lv_indev_scroll_handler", - (PyCFunction)py_lv_indev_scroll_handler_struct_method, +static PyMethodDef py_lv_lru_set_struct_method_def = { + "lv_lru_set", + (PyCFunction)py_lv_lru_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94204,27 +106897,32 @@ static PyMethodDef py_lv_indev_scroll_handler_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_scroll_throw_handler(lv_indev_t *indev) + * lv_lru_res_t lv_lru_get(lv_lru_t *cache, const void *key, size_t key_size, void **value) */ -static PyObject *py_lv_indev_scroll_throw_handler_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lru_get_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + PyObject *key_py; long key_size_val; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "OlO", &key_py, &key_size_val, &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_lru_t *cache = (lv_lru_t *)mp_write_ptr_lv_lru_t(self); + const void *key = (const void *)mp_to_ptr(key_py); + size_t key_size = (size_t)key_size_val; + void **value = mp_to_ptr(value_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_lru_res_t _res; lvpy_lock(); - ((void (*)(lv_indev_t *))lv_indev_scroll_throw_handler)(indev); + _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t, void **))lv_lru_get)(cache, key, key_size, value); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_scroll_throw_handler_struct_method_def = { - "lv_indev_scroll_throw_handler", - (PyCFunction)py_lv_indev_scroll_throw_handler_struct_method, +static PyMethodDef py_lv_lru_get_struct_method_def = { + "lv_lru_get", + (PyCFunction)py_lv_lru_get_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94232,30 +106930,31 @@ static PyMethodDef py_lv_indev_scroll_throw_handler_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_indev_scroll_throw_predict(lv_indev_t *indev, lv_dir_t dir) + * lv_lru_res_t lv_lru_remove(lv_lru_t *cache, const void *key, size_t key_size) */ -static PyObject *py_lv_indev_scroll_throw_predict_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lru_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dir_py; - if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); - lv_dir_t dir = (int)mp_obj_get_int(dir_py); + PyObject *key_py; long key_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &key_py, &key_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_lru_t *cache = (lv_lru_t *)mp_write_ptr_lv_lru_t(self); + const void *key = (const void *)mp_to_ptr(key_py); + size_t key_size = (size_t)key_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_lru_res_t _res; lvpy_lock(); - _res = ((int32_t (*)(lv_indev_t *, lv_dir_t))lv_indev_scroll_throw_predict)(indev, dir); + _res = ((lv_lru_res_t (*)(lv_lru_t *, const void *, size_t))lv_lru_remove)(cache, key, key_size); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_indev_scroll_throw_predict_struct_method_def = { - "lv_indev_scroll_throw_predict", - (PyCFunction)py_lv_indev_scroll_throw_predict_struct_method, +static PyMethodDef py_lv_lru_remove_struct_method_def = { + "lv_lru_remove", + (PyCFunction)py_lv_lru_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94263,155 +106962,130 @@ static PyMethodDef py_lv_indev_scroll_throw_predict_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_indev_find_scroll_obj(lv_indev_t *indev) + * void lv_lru_remove_lru_item(lv_lru_t *cache) */ -static PyObject *py_lv_indev_find_scroll_obj_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lru_remove_lru_item_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_indev_t *indev = (lv_indev_t *)mp_write_ptr_lv_indev_t(self); + lv_lru_t *cache = (lv_lru_t *)mp_write_ptr_lv_lru_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_indev_t *))lv_indev_find_scroll_obj)(indev); + ((void (*)(lv_lru_t *))lv_lru_remove_lru_item)(cache); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_find_scroll_obj_struct_method_def = { - "lv_indev_find_scroll_obj", - (PyCFunction)py_lv_indev_find_scroll_obj_struct_method, +static PyMethodDef py_lv_lru_remove_lru_item_struct_method_def = { + "lv_lru_remove_lru_item", + (PyCFunction)py_lv_lru_remove_lru_item_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_indev_t_methods[] = { - {"delete", (PyCFunction)py_lv_indev_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_next", (PyCFunction)py_lv_indev_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"read", (PyCFunction)py_lv_indev_read_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"enable", (PyCFunction)py_lv_indev_enable_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_type", (PyCFunction)py_lv_indev_set_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_read_cb", (PyCFunction)py_lv_indev_set_read_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_indev_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_driver_data", (PyCFunction)py_lv_indev_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_display", (PyCFunction)py_lv_indev_set_display_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_long_press_time", (PyCFunction)py_lv_indev_set_long_press_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_long_press_repeat_time", (PyCFunction)py_lv_indev_set_long_press_repeat_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scroll_limit", (PyCFunction)py_lv_indev_set_scroll_limit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_scroll_throw", (PyCFunction)py_lv_indev_set_scroll_throw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_gesture_min_velocity", (PyCFunction)py_lv_indev_set_gesture_min_velocity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_gesture_min_distance", (PyCFunction)py_lv_indev_set_gesture_min_distance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_type", (PyCFunction)py_lv_indev_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_read_cb", (PyCFunction)py_lv_indev_get_read_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_state", (PyCFunction)py_lv_indev_get_state_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_group", (PyCFunction)py_lv_indev_get_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_display", (PyCFunction)py_lv_indev_get_display_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_indev_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_driver_data", (PyCFunction)py_lv_indev_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_press_moved", (PyCFunction)py_lv_indev_get_press_moved_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset", (PyCFunction)py_lv_indev_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"stop_processing", (PyCFunction)py_lv_indev_stop_processing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset_long_press", (PyCFunction)py_lv_indev_reset_long_press_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_cursor", (PyCFunction)py_lv_indev_set_cursor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_group", (PyCFunction)py_lv_indev_set_group_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_button_points", (PyCFunction)py_lv_indev_set_button_points_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_point", (PyCFunction)py_lv_indev_get_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_gesture_dir", (PyCFunction)py_lv_indev_get_gesture_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_key", (PyCFunction)py_lv_indev_get_key_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_short_click_streak", (PyCFunction)py_lv_indev_get_short_click_streak_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_dir", (PyCFunction)py_lv_indev_get_scroll_dir_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_scroll_obj", (PyCFunction)py_lv_indev_get_scroll_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_vect", (PyCFunction)py_lv_indev_get_vect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_cursor", (PyCFunction)py_lv_indev_get_cursor_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"wait_release", (PyCFunction)py_lv_indev_wait_release_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_read_timer", (PyCFunction)py_lv_indev_get_read_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_mode", (PyCFunction)py_lv_indev_set_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mode", (PyCFunction)py_lv_indev_get_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_event_cb", (PyCFunction)py_lv_indev_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_event_count", (PyCFunction)py_lv_indev_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_event_dsc", (PyCFunction)py_lv_indev_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_event", (PyCFunction)py_lv_indev_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_event_cb_with_user_data", (PyCFunction)py_lv_indev_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"send_event", (PyCFunction)py_lv_indev_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_key_remap_cb", (PyCFunction)py_lv_indev_set_key_remap_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"gesture_init", (PyCFunction)py_lv_indev_gesture_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pinch_up_threshold", (PyCFunction)py_lv_indev_set_pinch_up_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pinch_down_threshold", (PyCFunction)py_lv_indev_set_pinch_down_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rotation_rad_threshold", (PyCFunction)py_lv_indev_set_rotation_rad_threshold_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"gesture_recognizers_update", (PyCFunction)py_lv_indev_gesture_recognizers_update_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"gesture_recognizers_set_data", (PyCFunction)py_lv_indev_gesture_recognizers_set_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_handler", (PyCFunction)py_lv_indev_scroll_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_throw_handler", (PyCFunction)py_lv_indev_scroll_throw_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"scroll_throw_predict", (PyCFunction)py_lv_indev_scroll_throw_predict_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"find_scroll_obj", (PyCFunction)py_lv_indev_find_scroll_obj_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_lru_t_methods[] = { + {"delete", (PyCFunction)py_lv_lru_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set", (PyCFunction)py_lv_lru_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get", (PyCFunction)py_lv_lru_get_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_lru_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_lru_item", (PyCFunction)py_lv_lru_remove_lru_item_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -PyMethodDef py_lv_indev_pointer_t_methods[] = {{NULL}}; -PyMethodDef py_lv_indev_keypad_t_methods[] = {{NULL}}; +PyMethodDef py_lv_lru_item_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * void lv_indev_gesture_detect_pinch(lv_indev_gesture_recognizer_t *recognizer, lv_indev_touch_data_t *touches, uint16_t touch_cnt) + * void lv_pending_destroy(lv_pending_t *pending) */ -static PyObject *py_lv_indev_gesture_detect_pinch_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pending_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *touches_py; long touch_cnt_val; - if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); - lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); - uint16_t touch_cnt = (uint16_t)touch_cnt_val; + + lv_pending_t *pending = (lv_pending_t *)mp_write_ptr_lv_pending_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_detect_pinch)(recognizer, touches, touch_cnt); + ((void (*)(lv_pending_t *))lv_pending_destroy)(pending); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_gesture_detect_pinch_struct_method_def = { - "lv_indev_gesture_detect_pinch", - (PyCFunction)py_lv_indev_gesture_detect_pinch_struct_method, +static PyMethodDef py_lv_pending_destroy_struct_method_def = { + "lv_pending_destroy", + (PyCFunction)py_lv_pending_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_pending_set_free_cb_free_cb (CPython) + * void lv_pending_free_cb_t(void *obj, void *user_data) + */ +static void lv_pending_set_free_cb_free_cb_callback(void *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_pending_set_free_cb_free_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_indev_gesture_detect_rotation(lv_indev_gesture_recognizer_t *recognizer, lv_indev_touch_data_t *touches, uint16_t touch_cnt) + * void lv_pending_set_free_cb(lv_pending_t *pending, lv_pending_free_cb_t free_cb, void *user_data) */ -static PyObject *py_lv_indev_gesture_detect_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pending_set_free_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *touches_py; long touch_cnt_val; - if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); - lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); - uint16_t touch_cnt = (uint16_t)touch_cnt_val; + PyObject *free_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &free_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_pending_t *pending = (lv_pending_t *)mp_write_ptr_lv_pending_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *free_cb = mp_lv_callback(free_cb_py, &lv_pending_set_free_cb_free_cb_callback, "lv_pending_set_free_cb_free_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_detect_rotation)(recognizer, touches, touch_cnt); + ((void (*)(lv_pending_t *, lv_pending_free_cb_t, void *))lv_pending_set_free_cb)(pending, free_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_gesture_detect_rotation_struct_method_def = { - "lv_indev_gesture_detect_rotation", - (PyCFunction)py_lv_indev_gesture_detect_rotation_struct_method, +static PyMethodDef py_lv_pending_set_free_cb_struct_method_def = { + "lv_pending_set_free_cb", + (PyCFunction)py_lv_pending_set_free_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94419,30 +107093,29 @@ static PyMethodDef py_lv_indev_gesture_detect_rotation_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_gesture_detect_two_fingers_swipe(lv_indev_gesture_recognizer_t *recognizer, lv_indev_touch_data_t *touches, uint16_t touch_cnt) + * void lv_pending_add(lv_pending_t *pending, void *obj) */ -static PyObject *py_lv_indev_gesture_detect_two_fingers_swipe_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pending_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *touches_py; long touch_cnt_val; - if (!PyArg_ParseTuple(py_args, "Ol", &touches_py, &touch_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); - lv_indev_touch_data_t *touches = mp_write_ptr_lv_indev_touch_data_t(touches_py); - uint16_t touch_cnt = (uint16_t)touch_cnt_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_pending_t *pending = (lv_pending_t *)mp_write_ptr_lv_pending_t(self); + void *obj = mp_to_ptr(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_gesture_recognizer_t *, lv_indev_touch_data_t *, uint16_t))lv_indev_gesture_detect_two_fingers_swipe)(recognizer, touches, touch_cnt); + ((void (*)(lv_pending_t *, void *))lv_pending_add)(pending, obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_gesture_detect_two_fingers_swipe_struct_method_def = { - "lv_indev_gesture_detect_two_fingers_swipe", - (PyCFunction)py_lv_indev_gesture_detect_two_fingers_swipe_struct_method, +static PyMethodDef py_lv_pending_add_struct_method_def = { + "lv_pending_add", + (PyCFunction)py_lv_pending_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94450,29 +107123,27 @@ static PyMethodDef py_lv_indev_gesture_detect_two_fingers_swipe_struct_method_de /* * lvgl extension definition for: - * void lv_indev_get_gesture_center_point(lv_indev_gesture_recognizer_t *recognizer, lv_point_t *point) + * void lv_pending_remove_all(lv_pending_t *pending) */ -static PyObject *py_lv_indev_get_gesture_center_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pending_remove_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + + lv_pending_t *pending = (lv_pending_t *)mp_write_ptr_lv_pending_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_gesture_recognizer_t *, lv_point_t *))lv_indev_get_gesture_center_point)(recognizer, point); + ((void (*)(lv_pending_t *))lv_pending_remove_all)(pending); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_gesture_center_point_struct_method_def = { - "lv_indev_get_gesture_center_point", - (PyCFunction)py_lv_indev_get_gesture_center_point_struct_method, +static PyMethodDef py_lv_pending_remove_all_struct_method_def = { + "lv_pending_remove_all", + (PyCFunction)py_lv_pending_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94480,176 +107151,291 @@ static PyMethodDef py_lv_indev_get_gesture_center_point_struct_method_def = { /* * lvgl extension definition for: - * void lv_indev_get_gesture_primary_point(lv_indev_gesture_recognizer_t *recognizer, lv_point_t *point) + * void lv_pending_swap(lv_pending_t *pending) */ -static PyObject *py_lv_indev_get_gesture_primary_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pending_swap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + + lv_pending_t *pending = (lv_pending_t *)mp_write_ptr_lv_pending_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_indev_gesture_recognizer_t *, lv_point_t *))lv_indev_get_gesture_primary_point)(recognizer, point); + ((void (*)(lv_pending_t *))lv_pending_swap)(pending); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_gesture_primary_point_struct_method_def = { - "lv_indev_get_gesture_primary_point", - (PyCFunction)py_lv_indev_get_gesture_primary_point_struct_method, +static PyMethodDef py_lv_pending_swap_struct_method_def = { + "lv_pending_swap", + (PyCFunction)py_lv_pending_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_pending_t_methods[] = { + {"destroy", (PyCFunction)py_lv_pending_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_free_cb", (PyCFunction)py_lv_pending_set_free_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add", (PyCFunction)py_lv_pending_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_all", (PyCFunction)py_lv_pending_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"swap", (PyCFunction)py_lv_pending_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) + * lv_rb_compare_t compare + */ + + /* * lvgl extension definition for: - * bool lv_indev_recognizer_is_active(lv_indev_gesture_recognizer_t *recognizer) + * bool lv_rb_init(lv_rb_t *tree, lv_rb_compare_t compare, size_t node_size) */ -static PyObject *py_lv_indev_recognizer_is_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_indev_gesture_recognizer_t *recognizer = (lv_indev_gesture_recognizer_t *)mp_write_ptr_lv_indev_gesture_recognizer_t(self); + PyObject *compare_py; long node_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &compare_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + size_t node_size = (size_t)node_size_val; + void *compare = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(lv_indev_gesture_recognizer_t *))lv_indev_recognizer_is_active)(recognizer); + _res = ((bool (*)(lv_rb_t *, lv_rb_compare_t, size_t))lv_rb_init)(tree, compare, node_size); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_indev_recognizer_is_active_struct_method_def = { - "lv_indev_recognizer_is_active", - (PyCFunction)py_lv_indev_recognizer_is_active_struct_method, +static PyMethodDef py_lv_rb_init_struct_method_def = { + "lv_rb_init", + (PyCFunction)py_lv_rb_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_indev_gesture_recognizer_t_methods[] = { - {"detect_pinch", (PyCFunction)py_lv_indev_gesture_detect_pinch_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"detect_rotation", (PyCFunction)py_lv_indev_gesture_detect_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"detect_two_fingers_swipe", (PyCFunction)py_lv_indev_gesture_detect_two_fingers_swipe_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_gesture_center_point", (PyCFunction)py_lv_indev_get_gesture_center_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_gesture_primary_point", (PyCFunction)py_lv_indev_get_gesture_primary_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"recognizer_is_active", (PyCFunction)py_lv_indev_recognizer_is_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} +/* + * lvgl extension definition for: + * lv_rb_node_t *lv_rb_insert(lv_rb_t *tree, void *key) + */ +static PyObject *py_lv_rb_insert_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *key_py; + if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + void *key = mp_to_ptr(key_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_rb_node_t * _res; + lvpy_lock(); + _res = ((lv_rb_node_t *(*)(lv_rb_t *, void *))lv_rb_insert)(tree, key); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_rb_node_t((void*)_res); +} + +static PyMethodDef py_lv_rb_insert_struct_method_def = { + "lv_rb_insert", + (PyCFunction)py_lv_rb_insert_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL }; -PyMethodDef py_lv_indev_gesture_t_methods[] = {{NULL}}; -PyMethodDef py_lv_indev_gesture_configuration_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * void lv_indev_set_gesture_data(lv_indev_data_t *data, lv_indev_gesture_recognizer_t *recognizer, lv_indev_gesture_type_t type) + * lv_rb_node_t *lv_rb_find(lv_rb_t *tree, const void *key) */ -static PyObject *py_lv_indev_set_gesture_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_find_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *recognizer_py; PyObject *type_py; - if (!PyArg_ParseTuple(py_args, "OO", &recognizer_py, &type_py)) { PyGILState_Release(gstate); return NULL; } - lv_indev_data_t *data = (lv_indev_data_t *)mp_write_ptr_lv_indev_data_t(self); - lv_indev_gesture_recognizer_t *recognizer = mp_write_ptr_lv_indev_gesture_recognizer_t(recognizer_py); - lv_indev_gesture_type_t type = (int)mp_obj_get_int(type_py); + PyObject *key_py; + if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + const void *key = (const void *)mp_to_ptr(key_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_rb_node_t * _res; lvpy_lock(); - ((void (*)(lv_indev_data_t *, lv_indev_gesture_recognizer_t *, lv_indev_gesture_type_t))lv_indev_set_gesture_data)(data, recognizer, type); + _res = ((lv_rb_node_t *(*)(lv_rb_t *, const void *))lv_rb_find)(tree, key); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static PyMethodDef py_lv_indev_set_gesture_data_struct_method_def = { - "lv_indev_set_gesture_data", - (PyCFunction)py_lv_indev_set_gesture_data_struct_method, +static PyMethodDef py_lv_rb_find_struct_method_def = { + "lv_rb_find", + (PyCFunction)py_lv_rb_find_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_indev_data_t_methods[] = { - {"set_gesture_data", (PyCFunction)py_lv_indev_set_gesture_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} +/* + * lvgl extension definition for: + * void *lv_rb_remove_node(lv_rb_t *tree, lv_rb_node_t *node) + */ +static PyObject *py_lv_rb_remove_node_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *node_py; + if (!PyArg_ParseTuple(py_args, "O", &node_py)) { PyGILState_Release(gstate); return NULL; } + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(node_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(lv_rb_t *, lv_rb_node_t *))lv_rb_remove_node)(tree, node); + lvpy_unlock(); + + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); +} + +static PyMethodDef py_lv_rb_remove_node_struct_method_def = { + "lv_rb_remove_node", + (PyCFunction)py_lv_rb_remove_node_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * void lv_draw_mask_rect_dsc_init(lv_draw_mask_rect_dsc_t *dsc) + * void *lv_rb_remove(lv_rb_t *tree, const void *key) */ -static PyObject *py_lv_draw_mask_rect_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_mask_rect_dsc_t *dsc = (lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(self); + PyObject *key_py; + if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + const void *key = (const void *)mp_to_ptr(key_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_draw_mask_rect_dsc_t *))lv_draw_mask_rect_dsc_init)(dsc); + _res = ((void *(*)(lv_rb_t *, const void *))lv_rb_remove)(tree, key); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_mask_rect_dsc_init_struct_method_def = { - "lv_draw_mask_rect_dsc_init", - (PyCFunction)py_lv_draw_mask_rect_dsc_init_struct_method, +static PyMethodDef py_lv_rb_remove_struct_method_def = { + "lv_rb_remove", + (PyCFunction)py_lv_rb_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_mask_rect_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_mask_rect_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} +/* + * lvgl extension definition for: + * bool lv_rb_drop_node(lv_rb_t *tree, lv_rb_node_t *node) + */ +static PyObject *py_lv_rb_drop_node_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *node_py; + if (!PyArg_ParseTuple(py_args, "O", &node_py)) { PyGILState_Release(gstate); return NULL; } + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + lv_rb_node_t *node = mp_write_ptr_lv_rb_node_t(node_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_rb_t *, lv_rb_node_t *))lv_rb_drop_node)(tree, node); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_rb_drop_node_struct_method_def = { + "lv_rb_drop_node", + (PyCFunction)py_lv_rb_drop_node_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* * lvgl extension definition for: - * void lv_draw_sw_mask_line_points_init(lv_draw_sw_mask_line_param_t *param, int32_t p1x, int32_t p1y, int32_t p2x, int32_t p2y, lv_draw_sw_mask_line_side_t side) + * bool lv_rb_drop(lv_rb_t *tree, const void *key) */ -static PyObject *py_lv_draw_sw_mask_line_points_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_drop_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long p1x_val; long p1y_val; long p2x_val; long p2y_val; PyObject *side_py; - if (!PyArg_ParseTuple(py_args, "llllO", &p1x_val, &p1y_val, &p2x_val, &p2y_val, &side_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_line_param_t *param = (lv_draw_sw_mask_line_param_t *)mp_write_ptr_lv_draw_sw_mask_line_param_t(self); - int32_t p1x = (int32_t)p1x_val; - int32_t p1y = (int32_t)p1y_val; - int32_t p2x = (int32_t)p2x_val; - int32_t p2y = (int32_t)p2y_val; - lv_draw_sw_mask_line_side_t side = (int)mp_obj_get_int(side_py); + PyObject *key_py; + if (!PyArg_ParseTuple(py_args, "O", &key_py)) { PyGILState_Release(gstate); return NULL; } + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); + const void *key = (const void *)mp_to_ptr(key_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_rb_t *, const void *))lv_rb_drop)(tree, key); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_rb_drop_struct_method_def = { + "lv_rb_drop", + (PyCFunction)py_lv_rb_drop_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_rb_node_t *lv_rb_minimum(lv_rb_t *node) + */ +static PyObject *py_lv_rb_minimum_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_rb_t *node = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_rb_node_t * _res; lvpy_lock(); - ((void (*)(lv_draw_sw_mask_line_param_t *, int32_t, int32_t, int32_t, int32_t, lv_draw_sw_mask_line_side_t))lv_draw_sw_mask_line_points_init)(param, p1x, p1y, p2x, p2y, side); + _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_rb_minimum)(node); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_mask_line_points_init_struct_method_def = { - "lv_draw_sw_mask_line_points_init", - (PyCFunction)py_lv_draw_sw_mask_line_points_init_struct_method, +static PyMethodDef py_lv_rb_minimum_struct_method_def = { + "lv_rb_minimum", + (PyCFunction)py_lv_rb_minimum_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -94657,270 +107443,344 @@ static PyMethodDef py_lv_draw_sw_mask_line_points_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_line_angle_init(lv_draw_sw_mask_line_param_t *param, int32_t px, int32_t py, int16_t angle, lv_draw_sw_mask_line_side_t side) + * lv_rb_node_t *lv_rb_maximum(lv_rb_t *node) */ -static PyObject *py_lv_draw_sw_mask_line_angle_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_maximum_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long px_val; long py_val; long angle_val; PyObject *side_py; - if (!PyArg_ParseTuple(py_args, "lllO", &px_val, &py_val, &angle_val, &side_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_line_param_t *param = (lv_draw_sw_mask_line_param_t *)mp_write_ptr_lv_draw_sw_mask_line_param_t(self); - int32_t px = (int32_t)px_val; - int32_t py = (int32_t)py_val; - int16_t angle = (int16_t)angle_val; - lv_draw_sw_mask_line_side_t side = (int)mp_obj_get_int(side_py); + + lv_rb_t *node = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_rb_node_t * _res; lvpy_lock(); - ((void (*)(lv_draw_sw_mask_line_param_t *, int32_t, int32_t, int16_t, lv_draw_sw_mask_line_side_t))lv_draw_sw_mask_line_angle_init)(param, px, py, angle, side); + _res = ((lv_rb_node_t *(*)(lv_rb_t *))lv_rb_maximum)(node); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_mask_line_angle_init_struct_method_def = { - "lv_draw_sw_mask_line_angle_init", - (PyCFunction)py_lv_draw_sw_mask_line_angle_init_struct_method, +static PyMethodDef py_lv_rb_maximum_struct_method_def = { + "lv_rb_maximum", + (PyCFunction)py_lv_rb_maximum_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_sw_mask_line_param_t_methods[] = { - {"points_init", (PyCFunction)py_lv_draw_sw_mask_line_points_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"angle_init", (PyCFunction)py_lv_draw_sw_mask_line_angle_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_draw_sw_mask_common_dsc_t_methods[] = {{NULL}}; -PyMethodDef py_lv_draw_sw_mask_line_param_cfg_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_draw_sw_mask_angle_init(lv_draw_sw_mask_angle_param_t *param, int32_t vertex_x, int32_t vertex_y, int32_t start_angle, int32_t end_angle) + * void lv_rb_destroy(lv_rb_t *tree) */ -static PyObject *py_lv_draw_sw_mask_angle_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long vertex_x_val; long vertex_y_val; long start_angle_val; long end_angle_val; - if (!PyArg_ParseTuple(py_args, "llll", &vertex_x_val, &vertex_y_val, &start_angle_val, &end_angle_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_angle_param_t *param = (lv_draw_sw_mask_angle_param_t *)mp_write_ptr_lv_draw_sw_mask_angle_param_t(self); - int32_t vertex_x = (int32_t)vertex_x_val; - int32_t vertex_y = (int32_t)vertex_y_val; - int32_t start_angle = (int32_t)start_angle_val; - int32_t end_angle = (int32_t)end_angle_val; + + lv_rb_t *tree = (lv_rb_t *)mp_write_ptr_lv_rb_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_sw_mask_angle_param_t *, int32_t, int32_t, int32_t, int32_t))lv_draw_sw_mask_angle_init)(param, vertex_x, vertex_y, start_angle, end_angle); + ((void (*)(lv_rb_t *))lv_rb_destroy)(tree); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_angle_init_struct_method_def = { - "lv_draw_sw_mask_angle_init", - (PyCFunction)py_lv_draw_sw_mask_angle_init_struct_method, +static PyMethodDef py_lv_rb_destroy_struct_method_def = { + "lv_rb_destroy", + (PyCFunction)py_lv_rb_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_sw_mask_angle_param_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_sw_mask_angle_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_rb_t_methods[] = { + {"init", (PyCFunction)py_lv_rb_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"insert", (PyCFunction)py_lv_rb_insert_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"find", (PyCFunction)py_lv_rb_find_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_node", (PyCFunction)py_lv_rb_remove_node_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_rb_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"drop_node", (PyCFunction)py_lv_rb_drop_node_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"drop", (PyCFunction)py_lv_rb_drop_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"minimum", (PyCFunction)py_lv_rb_minimum_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"maximum", (PyCFunction)py_lv_rb_maximum_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"destroy", (PyCFunction)py_lv_rb_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -PyMethodDef py_lv_draw_sw_mask_angle_param_cfg_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * void lv_draw_sw_mask_radius_init(lv_draw_sw_mask_radius_param_t *param, const lv_area_t *rect, int32_t radius, bool inv) + * lv_rb_node_t *lv_rb_minimum_from(lv_rb_node_t *node) */ -static PyObject *py_lv_draw_sw_mask_radius_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_minimum_from_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *rect_py; long radius_val; long inv_val; - if (!PyArg_ParseTuple(py_args, "Oll", &rect_py, &radius_val, &inv_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_radius_param_t *param = (lv_draw_sw_mask_radius_param_t *)mp_write_ptr_lv_draw_sw_mask_radius_param_t(self); - const lv_area_t *rect = (const lv_area_t *)mp_write_ptr_lv_area_t(rect_py); - int32_t radius = (int32_t)radius_val; - bool inv = (inv_val != 0); + + lv_rb_node_t *node = (lv_rb_node_t *)mp_write_ptr_lv_rb_node_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_rb_node_t * _res; lvpy_lock(); - ((void (*)(lv_draw_sw_mask_radius_param_t *, const lv_area_t *, int32_t, bool))lv_draw_sw_mask_radius_init)(param, rect, radius, inv); + _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_rb_minimum_from)(node); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_mask_radius_init_struct_method_def = { - "lv_draw_sw_mask_radius_init", - (PyCFunction)py_lv_draw_sw_mask_radius_init_struct_method, +static PyMethodDef py_lv_rb_minimum_from_struct_method_def = { + "lv_rb_minimum_from", + (PyCFunction)py_lv_rb_minimum_from_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_sw_mask_radius_param_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_sw_mask_radius_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_draw_sw_mask_radius_param_cfg_t_methods[] = {{NULL}}; -PyMethodDef py_lv_draw_sw_mask_radius_circle_dsc_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_draw_sw_mask_fade_init(lv_draw_sw_mask_fade_param_t *param, const lv_area_t *coords, lv_opa_t opa_top, int32_t y_top, lv_opa_t opa_bottom, int32_t y_bottom) + * lv_rb_node_t *lv_rb_maximum_from(lv_rb_node_t *node) */ -static PyObject *py_lv_draw_sw_mask_fade_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_maximum_from_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *coords_py; long opa_top_val; long y_top_val; long opa_bottom_val; long y_bottom_val; - if (!PyArg_ParseTuple(py_args, "Ollll", &coords_py, &opa_top_val, &y_top_val, &opa_bottom_val, &y_bottom_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_fade_param_t *param = (lv_draw_sw_mask_fade_param_t *)mp_write_ptr_lv_draw_sw_mask_fade_param_t(self); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - lv_opa_t opa_top = (lv_opa_t)opa_top_val; - int32_t y_top = (int32_t)y_top_val; - lv_opa_t opa_bottom = (lv_opa_t)opa_bottom_val; - int32_t y_bottom = (int32_t)y_bottom_val; + + lv_rb_node_t *node = (lv_rb_node_t *)mp_write_ptr_lv_rb_node_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_rb_node_t * _res; lvpy_lock(); - ((void (*)(lv_draw_sw_mask_fade_param_t *, const lv_area_t *, lv_opa_t, int32_t, lv_opa_t, int32_t))lv_draw_sw_mask_fade_init)(param, coords, opa_top, y_top, opa_bottom, y_bottom); + _res = ((lv_rb_node_t *(*)(lv_rb_node_t *))lv_rb_maximum_from)(node); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_rb_node_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_mask_fade_init_struct_method_def = { - "lv_draw_sw_mask_fade_init", - (PyCFunction)py_lv_draw_sw_mask_fade_init_struct_method, +static PyMethodDef py_lv_rb_maximum_from_struct_method_def = { + "lv_rb_maximum_from", + (PyCFunction)py_lv_rb_maximum_from_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_sw_mask_fade_param_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_sw_mask_fade_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_rb_node_t_methods[] = { + {"minimum_from", (PyCFunction)py_lv_rb_minimum_from_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"maximum_from", (PyCFunction)py_lv_rb_maximum_from_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -PyMethodDef py_lv_draw_sw_mask_fade_param_cfg_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * void lv_draw_sw_mask_map_init(lv_draw_sw_mask_map_param_t *param, const lv_area_t *coords, const lv_opa_t *map) + * void lv_text_attributes_init(lv_text_attributes_t *attributes) */ -static PyObject *py_lv_draw_sw_mask_map_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_attributes_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *coords_py; PyObject *map_py; - if (!PyArg_ParseTuple(py_args, "OO", &coords_py, &map_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_map_param_t *param = (lv_draw_sw_mask_map_param_t *)mp_write_ptr_lv_draw_sw_mask_map_param_t(self); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - const lv_opa_t *map = (const lv_opa_t *)mp_array_to_u8ptr(map_py); + + lv_text_attributes_t *attributes = (lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_sw_mask_map_param_t *, const lv_area_t *, const lv_opa_t *))lv_draw_sw_mask_map_init)(param, coords, map); + ((void (*)(lv_text_attributes_t *))lv_text_attributes_init)(attributes); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_map_init_struct_method_def = { - "lv_draw_sw_mask_map_init", - (PyCFunction)py_lv_draw_sw_mask_map_init_struct_method, +static PyMethodDef py_lv_text_attributes_init_struct_method_def = { + "lv_text_attributes_init", + (PyCFunction)py_lv_text_attributes_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_sw_mask_map_param_t_methods[] = { - {"init", (PyCFunction)py_lv_draw_sw_mask_map_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_text_attributes_t_methods[] = { + {"init", (PyCFunction)py_lv_text_attributes_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -PyMethodDef py_lv_draw_sw_mask_map_param_cfg_t_methods[] = {{NULL}}; /* * lvgl extension definition for: - * bool lv_draw_sw_register_blend_handler(lv_draw_sw_custom_blend_handler_t *handler) + * void lv_tree_node_delete(lv_tree_node_t *node) */ -static PyObject *py_lv_draw_sw_register_blend_handler_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tree_node_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_sw_custom_blend_handler_t *handler = (lv_draw_sw_custom_blend_handler_t *)mp_write_ptr_lv_draw_sw_custom_blend_handler_t(self); + lv_tree_node_t *node = (lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_draw_sw_custom_blend_handler_t *))lv_draw_sw_register_blend_handler)(handler); + ((void (*)(lv_tree_node_t *))lv_tree_node_delete)(node); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_register_blend_handler_struct_method_def = { - "lv_draw_sw_register_blend_handler", - (PyCFunction)py_lv_draw_sw_register_blend_handler_struct_method, +static PyMethodDef py_lv_tree_node_delete_struct_method_def = { + "lv_tree_node_delete", + (PyCFunction)py_lv_tree_node_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_sw_custom_blend_handler_t_methods[] = { - {"register_blend_handler", (PyCFunction)py_lv_draw_sw_register_blend_handler_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; +/* + * Callback function lv_tree_walk_cb (CPython) + * bool lv_tree_traverse_cb_t(const lv_tree_node_t *node, void *user_data) + */ +static bool lv_tree_walk_cb_callback(const lv_tree_node_t *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_tree_walk_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_tree_node_t((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } + bool _c_res = mp_obj_is_true(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * Callback function lv_tree_walk_bcb (CPython) + * bool lv_tree_before_cb_t(const lv_tree_node_t *node, void *user_data) + */ +static bool lv_tree_walk_bcb_callback(const lv_tree_node_t *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_tree_walk_bcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_tree_node_t((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } + bool _c_res = mp_obj_is_true(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * Callback function lv_tree_walk_acb (CPython) + * void lv_tree_after_cb_t(const lv_tree_node_t *node, void *user_data) + */ +static void lv_tree_walk_acb_callback(const lv_tree_node_t *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_tree_walk_acb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_tree_node_t((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} /* * lvgl extension definition for: - * void lv_text_attributes_init(lv_text_attributes_t *attributes) + * bool lv_tree_walk(const lv_tree_node_t *node, lv_tree_walk_mode_t mode, lv_tree_traverse_cb_t cb, lv_tree_before_cb_t bcb, lv_tree_after_cb_t acb, void *user_data) */ -static PyObject *py_lv_text_attributes_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tree_walk_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_text_attributes_t *attributes = (lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(self); + PyObject *mode_py; PyObject *cb_py; PyObject *bcb_py; PyObject *acb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOOOO", &mode_py, &cb_py, &bcb_py, &acb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + const lv_tree_node_t *node = (lv_tree_node_t *)mp_write_ptr_lv_tree_node_t(self); + void *user_data = mp_to_ptr(user_data_py); + lv_tree_walk_mode_t mode = (uint8_t)mp_obj_get_int(mode_py); + void *cb = mp_lv_callback(cb_py, &lv_tree_walk_cb_callback, "lv_tree_walk_cb", &user_data, NULL, (NULL), (NULL)); + void *bcb = mp_lv_callback(bcb_py, &lv_tree_walk_bcb_callback, "lv_tree_walk_bcb", &user_data, NULL, (NULL), (NULL)); + void *acb = mp_lv_callback(acb_py, &lv_tree_walk_acb_callback, "lv_tree_walk_acb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_text_attributes_t *))lv_text_attributes_init)(attributes); + _res = ((bool (*)(const lv_tree_node_t *, lv_tree_walk_mode_t, lv_tree_traverse_cb_t, lv_tree_before_cb_t, lv_tree_after_cb_t, void *))lv_tree_walk)(node, mode, cb, bcb, acb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_text_attributes_init_struct_method_def = { - "lv_text_attributes_init", - (PyCFunction)py_lv_text_attributes_init_struct_method, +static PyMethodDef py_lv_tree_walk_struct_method_def = { + "lv_tree_walk", + (PyCFunction)py_lv_tree_walk_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_text_attributes_t_methods[] = { - {"init", (PyCFunction)py_lv_text_attributes_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_tree_node_t_methods[] = { + {"delete", (PyCFunction)py_lv_tree_node_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"walk", (PyCFunction)py_lv_tree_walk_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; @@ -94929,6 +107789,8 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; /* * Functions not generated: + * lv_color_is_in_range + * lv_color16_to_color * lv_array_size * lv_array_capacity * lv_array_is_empty @@ -94936,71 +107798,19 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_array_clear * lv_array_front * lv_array_back - * lv_area_copy - * lv_color_is_in_range - * lv_color16_to_color - * lv_draw_buf_has_flag - * lv_draw_buf_set_flag - * lv_draw_buf_clear_flag - * lv_style_is_const - * lv_style_get_prop_inlined - * lv_style_set_size - * lv_style_set_pad_all - * lv_style_set_pad_hor - * lv_style_set_pad_ver - * lv_style_set_pad_gap - * lv_style_set_margin_hor - * lv_style_set_margin_ver - * lv_style_set_margin_all - * lv_style_set_transform_scale + * lv_color32_unpremultiply + * lv_color32_lumi_of + * lv_color_mix32_inlined + * lv_color_mix32_premultiplied_inlined + * lv_font_get_line_height_internal + * lv_font_has_static_bitmap_internal + * lv_style_is_const_internal + * lv_style_get_prop_internal + * lv_font_get_bottom_trim_internal + * lv_font_get_top_trim_internal * mp_lv_init_gc * mp_lv_deinit_gc * mp_lv_get_roots - * lv_mem_monitor_core - * lv_mem_monitor - * lv_snprintf - * lv_vsnprintf - * lv_ll_init - * lv_ll_ins_head - * lv_ll_ins_prev - * lv_ll_ins_tail - * lv_ll_remove - * lv_ll_clear_custom - * lv_ll_clear - * lv_ll_chg_list - * lv_ll_get_head - * lv_ll_get_tail - * lv_ll_get_next - * lv_ll_get_prev - * lv_ll_get_len - * lv_ll_move_before - * lv_ll_is_empty - * lv_timer_delete - * lv_timer_pause - * lv_timer_resume - * lv_timer_set_cb - * lv_timer_set_period - * lv_timer_ready - * lv_timer_set_repeat_count - * lv_timer_set_auto_delete - * lv_timer_set_user_data - * lv_timer_reset - * lv_timer_get_next - * lv_timer_get_user_data - * lv_timer_get_paused - * lv_array_init - * lv_array_init_from_buf - * lv_array_resize - * lv_array_deinit - * lv_array_copy - * lv_array_shrink - * lv_array_remove - * lv_array_remove_unordered - * lv_array_erase - * lv_array_concat - * lv_array_push_back - * lv_array_assign - * lv_array_at * lv_anim_init * lv_anim_set_var * lv_anim_set_exec_cb @@ -95044,6 +107854,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_anim_timeline_delete * lv_anim_timeline_add * lv_anim_timeline_start + * lv_anim_timeline_restart * lv_anim_timeline_pause * lv_anim_timeline_set_reverse * lv_anim_timeline_set_delay @@ -95059,19 +107870,8 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_anim_timeline_get_repeat_delay * lv_anim_timeline_get_user_data * lv_anim_timeline_merge - * lv_rb_init - * lv_rb_insert - * lv_rb_find - * lv_rb_remove_node - * lv_rb_remove - * lv_rb_drop_node - * lv_rb_drop - * lv_rb_minimum - * lv_rb_maximum - * lv_rb_minimum_from - * lv_rb_maximum_from - * lv_rb_destroy * lv_area_set + * lv_area_copy * lv_area_get_width * lv_area_get_height * lv_area_set_width @@ -95088,6 +107888,48 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_point_precise_set * lv_point_swap * lv_point_precise_swap + * lv_event_send + * lv_event_add + * lv_event_remove_dsc + * lv_event_get_count + * lv_event_get_dsc + * lv_event_dsc_get_cb + * lv_event_dsc_get_user_data + * lv_event_remove + * lv_event_remove_all + * lv_event_get_target + * lv_event_get_current_target + * lv_event_get_code + * lv_event_get_param + * lv_event_get_user_data + * lv_event_stop_bubbling + * lv_event_stop_trickling + * lv_event_stop_processing + * lv_event_free_user_data_cb + * lv_group_delete + * lv_group_set_default + * lv_group_add_obj + * lv_group_remove_all_objs + * lv_group_focus_next + * lv_group_focus_prev + * lv_group_focus_freeze + * lv_group_send_data + * lv_group_set_focus_cb + * lv_group_set_edge_cb + * lv_group_set_refocus_policy + * lv_group_set_editing + * lv_group_set_wrap + * lv_group_get_focused + * lv_group_get_focus_cb + * lv_group_get_edge_cb + * lv_group_get_editing + * lv_group_get_wrap + * lv_group_get_obj_count + * lv_group_get_obj_by_index + * lv_group_set_user_data + * lv_group_get_user_data + * lv_mem_monitor_core + * lv_mem_monitor * lv_color_to_32 * lv_color_to_int * lv_color_eq @@ -95123,39 +107965,15 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_draw_buf_destroy * lv_draw_buf_copy * lv_draw_buf_goto_xy + * lv_draw_buf_is_position_valid * lv_draw_buf_adjust_stride * lv_draw_buf_premultiply + * lv_draw_buf_has_flag + * lv_draw_buf_set_flag + * lv_draw_buf_clear_flag * lv_draw_buf_from_image * lv_draw_buf_to_image * lv_draw_buf_set_palette - * lv_draw_buf_save_to_file - * lv_iter_get_context - * lv_iter_destroy - * lv_iter_next - * lv_iter_make_peekable - * lv_iter_peek - * lv_iter_peek_advance - * lv_iter_peek_reset - * lv_iter_inspect - * lv_circle_buf_resize - * lv_circle_buf_destroy - * lv_circle_buf_size - * lv_circle_buf_capacity - * lv_circle_buf_remain - * lv_circle_buf_is_empty - * lv_circle_buf_is_full - * lv_circle_buf_reset - * lv_circle_buf_head - * lv_circle_buf_tail - * lv_circle_buf_read - * lv_circle_buf_write - * lv_circle_buf_fill - * lv_circle_buf_skip - * lv_circle_buf_peek - * lv_circle_buf_peek_at - * lv_tree_node_create - * lv_tree_node_delete - * lv_tree_walk * lv_font_get_glyph_bitmap * lv_font_get_glyph_static_bitmap * lv_font_get_glyph_dsc @@ -95165,6 +107983,10 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_font_set_kerning * lv_font_info_is_equal * lv_font_has_static_bitmap + * lv_snprintf + * lv_vsnprintf + * lv_font_get_top_trim + * lv_font_get_bottom_trim * lv_grad_init_stops * lv_grad_horizontal_init * lv_grad_vertical_init @@ -95177,6 +107999,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_style_reset * lv_style_copy * lv_style_merge + * lv_style_is_const * lv_style_remove_prop * lv_style_set_prop * lv_style_get_prop @@ -95269,6 +108092,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_style_set_text_outline_stroke_color * lv_style_set_text_outline_stroke_width * lv_style_set_text_outline_stroke_opa + * lv_style_set_text_leading_trim * lv_style_set_blur_radius * lv_style_set_blur_backdrop * lv_style_set_blur_quality @@ -95310,24 +108134,28 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_style_set_grid_cell_row_pos * lv_style_set_grid_cell_y_align * lv_style_set_grid_cell_row_span - * lv_event_send - * lv_event_add - * lv_event_remove_dsc - * lv_event_get_count - * lv_event_get_dsc - * lv_event_dsc_get_cb - * lv_event_dsc_get_user_data - * lv_event_remove - * lv_event_remove_all - * lv_event_get_target - * lv_event_get_current_target - * lv_event_get_code - * lv_event_get_param - * lv_event_get_user_data - * lv_event_stop_bubbling - * lv_event_stop_trickling - * lv_event_stop_processing - * lv_event_free_user_data_cb + * lv_style_set_size + * lv_style_set_pad_all + * lv_style_set_pad_hor + * lv_style_set_pad_ver + * lv_style_set_pad_gap + * lv_style_set_margin_hor + * lv_style_set_margin_ver + * lv_style_set_margin_all + * lv_style_set_transform_scale + * lv_timer_delete + * lv_timer_pause + * lv_timer_resume + * lv_timer_set_cb + * lv_timer_set_period + * lv_timer_ready + * lv_timer_set_repeat_count + * lv_timer_set_auto_delete + * lv_timer_set_user_data + * lv_timer_reset + * lv_timer_get_next + * lv_timer_get_user_data + * lv_timer_get_paused * lv_display_delete * lv_display_set_default * lv_display_get_next @@ -95354,7 +108182,10 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_display_set_3rd_draw_buffer * lv_display_set_render_mode * lv_display_set_flush_cb + * lv_display_get_flush_cb * lv_display_set_flush_wait_cb + * lv_display_set_sync_cb + * lv_display_set_sync_wait_cb * lv_display_set_color_format * lv_display_get_color_format * lv_display_set_tile_cnt @@ -95363,6 +108194,8 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_display_get_antialiasing * lv_display_flush_ready * lv_display_flush_is_last + * lv_display_sync_ready + * lv_display_sync_is_last * lv_display_is_double_buffered * lv_display_get_render_mode * lv_display_get_screen_active @@ -95374,7 +108207,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_display_add_event_cb * lv_display_get_event_count * lv_display_get_event_dsc - * lv_display_delete_event + * lv_display_remove_event * lv_display_remove_event_cb_with_user_data * lv_display_send_event * lv_event_get_invalidated_area @@ -95396,23 +108229,10 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_display_get_buf_active * lv_display_rotate_area * lv_display_rotate_point + * lv_display_rotate_point_ccw * lv_display_get_draw_buf_size * lv_display_get_invalidated_draw_buf_size * lv_display_dpx - * lv_fs_drv_init - * lv_fs_drv_register - * lv_fs_open - * lv_fs_make_path_from_buffer - * lv_fs_get_buffer_from_path - * lv_fs_close - * lv_fs_read - * lv_fs_write - * lv_fs_seek - * lv_fs_tell - * lv_fs_get_size - * lv_fs_dir_open - * lv_fs_dir_read - * lv_fs_dir_close * lv_draw_dispatch_layer * lv_draw_get_dependent_count * lv_layer_init @@ -95433,6 +108253,20 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_draw_glyph_dsc_init * lv_draw_label_iterate_characters * lv_draw_unit_draw_letter + * lv_fs_drv_init + * lv_fs_drv_register + * lv_fs_open + * lv_fs_make_path_from_buffer + * lv_fs_get_buffer_from_path + * lv_fs_close + * lv_fs_read + * lv_fs_write + * lv_fs_seek + * lv_fs_tell + * lv_fs_get_size + * lv_fs_dir_open + * lv_fs_dir_read + * lv_fs_dir_close * lv_draw_image_dsc_init * lv_draw_task_get_image_dsc * lv_draw_line_dsc_init @@ -95444,28 +108278,6 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_draw_task_get_triangle_dsc * lv_draw_blur_dsc_init * lv_draw_task_get_blur_dsc - * lv_group_delete - * lv_group_set_default - * lv_group_add_obj - * lv_group_remove_all_objs - * lv_group_focus_next - * lv_group_focus_prev - * lv_group_focus_freeze - * lv_group_send_data - * lv_group_set_focus_cb - * lv_group_set_edge_cb - * lv_group_set_refocus_policy - * lv_group_set_editing - * lv_group_set_wrap - * lv_group_get_focused - * lv_group_get_focus_cb - * lv_group_get_edge_cb - * lv_group_get_editing - * lv_group_get_wrap - * lv_group_get_obj_count - * lv_group_get_obj_by_index - * lv_group_set_user_data - * lv_group_get_user_data * lv_indev_delete * lv_indev_get_next * lv_indev_read @@ -95477,6 +108289,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_indev_set_display * lv_indev_set_long_press_time * lv_indev_set_long_press_repeat_time + * lv_indev_set_double_click_time * lv_indev_set_scroll_limit * lv_indev_set_scroll_throw * lv_indev_set_gesture_min_velocity @@ -95514,6 +108327,9 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_indev_remove_event_cb_with_user_data * lv_indev_send_event * lv_indev_set_key_remap_cb + * lv_indev_set_ccw + * lv_indev_clear_ccw + * lv_indev_get_ccw * lv_event_get_current_target_obj * lv_event_get_target_obj * lv_event_get_indev @@ -95529,6 +108345,22 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_event_set_cover_res * lv_event_get_draw_task * lv_event_get_prev_state + * lv_ll_init + * lv_ll_ins_head + * lv_ll_ins_prev + * lv_ll_ins_tail + * lv_ll_remove + * lv_ll_clear_custom + * lv_ll_clear + * lv_ll_chg_list + * lv_ll_get_head + * lv_ll_get_tail + * lv_ll_get_next + * lv_ll_get_prev + * lv_ll_get_len + * lv_ll_move_before + * lv_ll_is_empty + * lv_subject_delete * lv_subject_init_int * lv_subject_set_int * lv_subject_get_int @@ -95542,7 +108374,8 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_subject_set_min_value_float * lv_subject_set_max_value_float * lv_subject_init_string - * lv_subject_copy_string + * lv_subject_set_string_buffer_static + * lv_subject_set_string * lv_subject_snprintf * lv_subject_get_string * lv_subject_get_previous_string @@ -95555,16 +108388,20 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_subject_get_color * lv_subject_get_previous_color * lv_subject_init_group + * lv_subject_set_group_list_static * lv_subject_deinit * lv_subject_get_group_element * lv_subject_add_observer * lv_subject_add_observer_obj * lv_subject_add_observer_with_target - * lv_observer_remove + * lv_observer_delete * lv_observer_get_target * lv_observer_get_target_obj * lv_observer_get_user_data + * lv_observer_set_user_data * lv_subject_notify + * lv_draw_mask_rect_dsc_init + * lv_draw_task_get_mask_rect_dsc * lv_indev_gesture_init * lv_indev_gesture_detect_pinch * lv_indev_gesture_detect_rotation @@ -95584,8 +108421,17 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_indev_recognizer_is_active * lv_indev_gesture_recognizers_update * lv_indev_gesture_recognizers_set_data + * lv_binfont_create_ex * lv_font_get_bitmap_fmt_txt * lv_font_get_glyph_dsc_fmt_txt + * lv_tjpgd_init + * lv_tjpgd_deinit + * lv_theme_copy + * lv_theme_set_parent + * lv_theme_set_apply_cb + * lv_theme_set_user_data + * lv_theme_get_user_data + * lv_theme_delete * lv_animimg_get_src * lv_arclabel_set_text_fmt * lv_label_set_text_fmt @@ -95597,45 +108443,17 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_span_set_text_fmt * lv_span_set_text_static * lv_spangroup_set_span_text_fmt - * lv_span_set_text_static * lv_span_get_style * lv_span_get_text * lv_table_set_cell_value_fmt - * lv_tjpgd_init - * lv_tjpgd_deinit - * lv_theme_copy - * lv_theme_set_parent - * lv_theme_set_apply_cb - * lv_theme_delete - * lv_draw_mask_rect_dsc_init - * lv_draw_task_get_mask_rect_dsc - * lv_draw_sw_mask_line_points_init - * lv_draw_sw_mask_line_angle_init - * lv_draw_sw_mask_angle_init - * lv_draw_sw_mask_radius_init - * lv_draw_sw_mask_fade_init - * lv_draw_sw_mask_map_init - * lv_draw_sw_blend - * lv_draw_sw_fill - * lv_draw_sw_border - * lv_draw_sw_box_shadow - * lv_draw_sw_image - * lv_draw_sw_letter - * lv_draw_sw_label - * lv_draw_sw_arc - * lv_draw_sw_line - * lv_draw_sw_layer - * lv_draw_sw_triangle - * lv_draw_sw_blur - * lv_draw_sw_mask_rect - * lv_draw_sw_register_blend_handler - * lv_cache_entry_get_ref - * lv_cache_entry_get_node_size - * lv_cache_entry_is_invalid - * lv_cache_entry_get_data - * lv_cache_entry_get_cache - * lv_cache_entry_init - * lv_cache_entry_delete + * lv_iter_get_context + * lv_iter_destroy + * lv_iter_next + * lv_iter_make_peekable + * lv_iter_peek + * lv_iter_peek_advance + * lv_iter_peek_reset + * lv_iter_inspect * lv_cache_create * lv_cache_destroy * lv_cache_acquire @@ -95657,13 +108475,95 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_cache_set_name * lv_cache_get_name * lv_cache_iter_create + * lv_cache_entry_get_cache + * lv_cache_entry_init + * lv_cache_entry_delete + * lv_cache_entry_get_ref + * lv_cache_entry_get_node_size + * lv_cache_entry_is_invalid + * lv_cache_entry_get_data + * lv_draw_cleanup_task + * lv_draw_sw_blend + * lv_draw_sw_fill + * lv_draw_sw_border + * lv_draw_sw_box_shadow + * lv_draw_sw_image + * lv_draw_sw_letter + * lv_draw_sw_label + * lv_draw_sw_arc + * lv_draw_sw_line + * lv_draw_sw_layer + * lv_draw_sw_triangle + * lv_draw_sw_blur + * lv_draw_sw_mask_rect + * lv_draw_sw_register_blend_handler + * lv_draw_buf_clear_ex + * lv_draw_sw_mask_line_points_init + * lv_draw_sw_mask_line_angle_init + * lv_draw_sw_mask_angle_init + * lv_draw_sw_mask_radius_init + * lv_draw_sw_mask_fade_init + * lv_draw_sw_mask_map_init * lv_global_default + * lv_array_init + * lv_array_init_from_buf + * lv_array_resize + * lv_array_deinit + * lv_array_copy + * lv_array_shrink + * lv_array_remove + * lv_array_remove_unordered + * lv_array_erase + * lv_array_concat + * lv_array_push_back + * lv_array_assign + * lv_array_at + * lv_event_push + * lv_event_pop + * lv_event_push_and_send + * lv_display_set_draw_buf_handlers + * lv_draw_buf_convert_premultiply + * lv_draw_image_normal_helper + * lv_draw_image_tiled_helper + * lv_draw_unit_draw_letter_internal + * lv_area_set_pos + * lv_area_intersect + * lv_area_diff + * lv_area_join + * lv_area_is_point_on + * lv_area_is_on + * lv_area_is_in + * lv_area_is_out + * lv_area_is_equal + * lv_draw_sw_blend_color_to_a8 + * lv_draw_sw_blend_image_to_a8 + * lv_draw_sw_blend_color_to_al88 + * lv_draw_sw_blend_image_to_al88 + * lv_draw_sw_blend_color_to_argb8888 + * lv_draw_sw_blend_image_to_argb8888 + * lv_draw_sw_blend_color_to_argb8888_premultiplied + * lv_draw_sw_blend_image_to_argb8888_premultiplied + * lv_draw_sw_blend_color_to_i1 + * lv_draw_sw_blend_image_to_i1 + * lv_draw_sw_blend_color_to_l8 + * lv_draw_sw_blend_image_to_l8 + * lv_draw_sw_blend_color_to_rgb565 + * lv_draw_sw_blend_image_to_rgb565 + * lv_draw_sw_blend_color_to_rgb565_swapped + * lv_draw_sw_blend_image_to_rgb565_swapped + * lv_draw_sw_blend_color_to_rgb888 + * lv_draw_sw_blend_image_to_rgb888 + * lv_draw_sw_grad_cleanup + * lv_font_glyph_dsc_compare + * lv_font_get_glyph_bitmap_internal + * lv_font_get_glyph_static_bitmap_internal + * lv_font_glyph_release_draw_data_internal + * lv_font_get_glyph_dsc_internal + * lv_font_get_glyph_width_internal * lv_indev_scroll_handler * lv_indev_scroll_throw_handler * lv_indev_scroll_throw_predict * lv_indev_find_scroll_obj - * lv_text_attributes_init - * lv_text_set_text_vfmt * lv_cache_entry_reset_ref * lv_cache_entry_inc_ref * lv_cache_entry_dec_ref @@ -95674,20 +108574,50 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_cache_entry_set_flag * lv_cache_entry_remove_flag * lv_cache_entry_has_flag - * lv_draw_image_normal_helper - * lv_draw_image_tiled_helper - * lv_area_set_pos - * lv_area_intersect - * lv_area_diff - * lv_area_join - * lv_area_is_point_on - * lv_area_is_on - * lv_area_is_in - * lv_area_is_out - * lv_area_is_equal - * lv_event_push - * lv_event_pop - * lv_event_push_and_send + * lv_circle_buf_resize + * lv_circle_buf_destroy + * lv_circle_buf_size + * lv_circle_buf_capacity + * lv_circle_buf_remain + * lv_circle_buf_is_empty + * lv_circle_buf_is_full + * lv_circle_buf_reset + * lv_circle_buf_head + * lv_circle_buf_tail + * lv_circle_buf_read + * lv_circle_buf_write + * lv_circle_buf_fill + * lv_circle_buf_skip + * lv_circle_buf_peek + * lv_circle_buf_peek_at + * lv_lru_delete + * lv_lru_set + * lv_lru_get + * lv_lru_remove + * lv_lru_remove_lru_item + * lv_pending_destroy + * lv_pending_set_free_cb + * lv_pending_add + * lv_pending_remove_all + * lv_pending_swap + * lv_rb_init + * lv_rb_insert + * lv_rb_find + * lv_rb_remove_node + * lv_rb_remove + * lv_rb_drop_node + * lv_rb_drop + * lv_rb_minimum + * lv_rb_maximum + * lv_rb_minimum_from + * lv_rb_maximum_from + * lv_rb_destroy + * lv_text_attributes_init + * lv_text_set_text_vfmt + * lv_tree_node_create + * lv_tree_node_delete + * lv_tree_walk + * lv_draw_buf_save_to_file * */ @@ -95695,7 +108625,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; /* * Callback function lv_font_t_get_glyph_dsc (CPython) - * bool get_glyph_dsc(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t letter, uint32_t letter_next) + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) { @@ -95734,14 +108664,14 @@ static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyp /* * Function NOT generated: - * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *, lv_draw_buf_t *) + * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ /* * Callback function lv_font_t_release_glyph (CPython) - * void release_glyph(const lv_font_t *, lv_font_glyph_dsc_t *) + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) */ static void lv_font_t_release_glyph_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1) { @@ -95924,80 +108854,28 @@ static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0 */ -/* - * Callback function lv_display_t_flush_wait_cb (CPython) - * void lv_display_flush_wait_cb_t(lv_display_t *disp) - */ -static void lv_display_t_flush_wait_cb_callback(lv_display_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_flush_wait_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ - - /* * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) - * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + * Callback: user_data NOT FOUND! void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ /* - * Function NOT generated: - * Callback: user_data NOT FOUND! int32_t delete_cb(lv_draw_unit_t *draw_unit) - * int32_t delete_cb(lv_draw_unit_t *draw_unit) - */ - - -/* - * Callback function lv_draw_unit_t_event_cb (CPython) - * void event_cb(lv_event_t *event) + * Callback function lv_display_t_flush_wait_cb (CPython) + * void lv_display_flush_wait_cb_t(lv_display_t *disp) */ -static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) +static void lv_display_t_flush_wait_cb_callback(lv_display_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_draw_unit_t_event_cb"); + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_flush_wait_cb"); if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; Py_XDECREF(py_arg0); if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } @@ -96015,24 +108893,22 @@ static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) /* - * Callback function lv_display_t_layer_init (CPython) - * void layer_init(lv_display_t *disp, lv_layer_t *layer) + * Callback function lv_display_t_sync_wait_cb (CPython) + * void lv_display_sync_wait_cb_t(lv_display_t *disp) */ -static void lv_display_t_layer_init_callback(lv_display_t *arg0, lv_layer_t *arg1) +static void lv_display_t_sync_wait_cb_callback(lv_display_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_layer_init"); + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_sync_wait_cb"); if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_layer_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); @@ -96048,24 +108924,50 @@ static void lv_display_t_layer_init_callback(lv_display_t *arg0, lv_layer_t *arg /* - * Callback function lv_display_t_layer_deinit (CPython) - * void layer_deinit(lv_display_t *disp, lv_layer_t *layer) + * Function NOT generated: + * Callback: user_data NOT FOUND! int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) */ -static void lv_display_t_layer_deinit_callback(lv_display_t *arg0, lv_layer_t *arg1) + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! int32_t delete_cb(lv_draw_unit_t *draw_unit) + * int32_t delete_cb(lv_draw_unit_t *draw_unit) + */ + + +/* + * Callback function lv_draw_unit_t_event_cb (CPython) + * void event_cb(lv_event_t *event) + */ +static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_layer_deinit"); + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_draw_unit_t_event_cb"); if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_layer_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); @@ -96212,6 +109114,13 @@ static void lv_observer_t_cb_callback(lv_observer_t *arg0, lv_subject_t *arg1) } +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void user_cb(void) + * void user_cb(void) + */ + + /* * Callback function lv_event_dsc_t_cb (CPython) * void lv_event_cb_t(lv_event_t *e) @@ -96276,45 +109185,6 @@ static int32_t lv_obj_style_transition_dsc_t_path_cb_callback(const lv_anim_t *a } -/* - * Callback function lv_image_decoder_t_get_area_cb (CPython) - * lv_result_t lv_image_decoder_get_area_cb_t(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) - */ -static lv_result_t lv_image_decoder_t_get_area_cb_callback(lv_image_decoder_t *arg0, lv_image_decoder_dsc_t *arg1, const lv_area_t *arg2, lv_area_t *arg3) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_result_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_image_decoder_t_get_area_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_result_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_image_decoder_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_image_decoder_dsc_t((void*)arg1); - PyObject *py_arg2 = mp_read_ptr_lv_area_t((void*)arg2); - PyObject *py_arg3 = mp_read_ptr_lv_area_t((void*)arg3); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3) ? PyTuple_Pack(4, py_arg0, py_arg1, py_arg2, py_arg3) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - Py_XDECREF(py_arg3); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_result_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_result_t){0}; } - lv_result_t _c_res = (int)mp_obj_get_int(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * Callback function lv_image_decoder_t_custom_draw_cb (CPython) * void lv_image_decoder_custom_draw_t(lv_layer_t *layer, const lv_image_decoder_dsc_t *dsc, const lv_area_t *coords, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *clip_area) @@ -96855,20 +109725,6 @@ static lv_fs_res_t lv_fs_drv_t_dir_close_cb_callback(lv_fs_drv_t *arg0, void *ar */ -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - * void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) - */ - - /* * Function NOT generated: * Callback: user_data NOT FOUND! lv_font_t *create_cb(const lv_font_info_t *info, const void *src) @@ -96923,8 +109779,15 @@ static void lv_font_class_t_delete_cb_callback(lv_font_t *arg0) /* * Function NOT generated: - * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) - * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) + * Callback: user_data NOT FOUND! void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * void lv_tree_constructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) + * void lv_tree_destructor_cb_t(const lv_tree_class_t *class_p, lv_tree_node_t *node) */ @@ -97042,6 +109905,13 @@ static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *arg0, lv_key_t arg1 */ +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + */ + + /* * Function NOT generated: * Callback: user_data NOT FOUND! lv_draw_sw_mask_res_t lv_draw_sw_mask_xcb_t(lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len, void *p) @@ -97051,8 +109921,22 @@ static lv_key_t lv_indev_t_key_remap_cb_callback(lv_indev_t *arg0, lv_key_t arg1 /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) - * void lv_draw_sw_blend_handler_t(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * void lv_lru_free_cb_t(void *v) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * void lv_lru_free_cb_t(void *v) + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) + * lv_rb_compare_res_t lv_rb_compare_t(const void *a, const void *b) */ PyMethodDef py_lv_draw_sw_blend_dsc_t_methods[] = {{NULL}}; @@ -97067,10 +109951,11 @@ py_lv_obj_type_t *py_lv_obj_types[] = { &py_lv_arclabel_mapping, &py_lv_label_mapping, &py_lv_bar_mapping, + &py_lv_canvas_mapping, + &py_lv_barcode_mapping, &py_lv_button_mapping, &py_lv_buttonmatrix_mapping, &py_lv_calendar_mapping, - &py_lv_canvas_mapping, &py_lv_chart_mapping, &py_lv_checkbox_mapping, &py_lv_dropdown_mapping, @@ -97086,6 +109971,7 @@ py_lv_obj_type_t *py_lv_obj_types[] = { &py_lv_menu_section_mapping, &py_lv_menu_separator_mapping, &py_lv_msgbox_mapping, + &py_lv_qrcode_mapping, &py_lv_roller_mapping, &py_lv_scale_mapping, &py_lv_slider_mapping, @@ -97098,8 +109984,6 @@ py_lv_obj_type_t *py_lv_obj_types[] = { &py_lv_tabview_mapping, &py_lv_tileview_mapping, &py_lv_win_mapping, - &py_lv_barcode_mapping, - &py_lv_qrcode_mapping, NULL }; @@ -97201,24 +110085,28 @@ PyMODINIT_FUNC PyInit_lvgl(void) if (PyModule_AddIntConstant(m, "TEXTAREA_CURSOR_LAST", ENUM_LV_TEXTAREA_CURSOR_LAST) < 0) return NULL; if (PyModule_AddIntConstant(m, "PART_TEXTAREA_PLACEHOLDER", ENUM_LV_PART_TEXTAREA_PLACEHOLDER) < 0) return NULL; if (PyModule_AddIntConstant(m, "TABLE_CELL_NONE", ENUM_LV_TABLE_CELL_NONE) < 0) return NULL; - if (PyType_Ready(&py_lv_ENUM_LV_LOG_LEVEL_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_ENUM_LV_LOG_LEVEL_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "LOG_LEVEL", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_ENUM_LV_COORD_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_ENUM_LV_COORD_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "COORD", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_ENUM_LV_LOG_LEVEL_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_ENUM_LV_LOG_LEVEL_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "LOG_LEVEL", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_OPA_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_OPA_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "OPA", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_TREE_WALK_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_TREE_WALK_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "TREE_WALK", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_STYLE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_STYLE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "STYLE", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_TREE_WALK_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_TREE_WALK_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "TREE_WALK", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_RESULT_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_RESULT_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "RESULT", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_RB_COLOR_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_RB_COLOR_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "RB_COLOR", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_ALIGN_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_ALIGN_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "ALIGN", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_DIR_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_DIR_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DIR", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_EVENT_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_EVENT_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "EVENT", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_KEY_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_KEY_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "KEY", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_GROUP_REFOCUS_POLICY_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_GROUP_REFOCUS_POLICY_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "GROUP_REFOCUS_POLICY", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_COLOR_FORMAT_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_COLOR_FORMAT_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "COLOR_FORMAT", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_PALETTE_type) < 0) return NULL; @@ -97233,6 +110121,8 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *ns = PyType_GenericNew(&py_lv_LV_TEXT_FLAG_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "TEXT_FLAG", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_TEXT_ALIGN_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_TEXT_ALIGN_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "TEXT_ALIGN", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_TEXT_LEADING_TRIM_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_TEXT_LEADING_TRIM_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "TEXT_LEADING_TRIM", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_BASE_DIR_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_BASE_DIR_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "BASE_DIR", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_GRAD_DIR_type) < 0) return NULL; @@ -97257,8 +110147,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *ns = PyType_GenericNew(&py_lv_LV_BLUR_QUALITY_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "BLUR_QUALITY", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_STYLE_RES_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_STYLE_RES_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "STYLE_RES", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_EVENT_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_EVENT_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "EVENT", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_DISPLAY_ROTATION_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_DISPLAY_ROTATION_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DISPLAY_ROTATION", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_DISPLAY_RENDER_MODE_type) < 0) return NULL; @@ -97275,22 +110163,18 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *ns = PyType_GenericNew(&py_lv_LV_PART_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "PART", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_STYLE_STATE_CMP_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_STYLE_STATE_CMP_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "STYLE_STATE_CMP", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_DRAW_TASK_TYPE_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_DRAW_TASK_TYPE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DRAW_TASK_TYPE", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_DRAW_TASK_STATE_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_DRAW_TASK_STATE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DRAW_TASK_STATE", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_FS_RES_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_FS_RES_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "FS_RES", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_FS_MODE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_FS_MODE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "FS_MODE", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_FS_SEEK_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_FS_SEEK_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "FS_SEEK", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_DRAW_TASK_TYPE_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_DRAW_TASK_TYPE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DRAW_TASK_TYPE", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_DRAW_TASK_STATE_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_DRAW_TASK_STATE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DRAW_TASK_STATE", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_LAYER_TYPE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_LAYER_TYPE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "LAYER_TYPE", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_KEY_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_KEY_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "KEY", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_GROUP_REFOCUS_POLICY_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_GROUP_REFOCUS_POLICY_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "GROUP_REFOCUS_POLICY", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_INDEV_TYPE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_INDEV_TYPE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "INDEV_TYPE", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_INDEV_STATE_type) < 0) return NULL; @@ -97317,16 +110201,20 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *ns = PyType_GenericNew(&py_lv_LV_SPAN_OVERFLOW_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "SPAN_OVERFLOW", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_SPAN_MODE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_SPAN_MODE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "SPAN_MODE", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_THREAD_PRIO_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_THREAD_PRIO_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "THREAD_PRIO", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_CACHE_RESERVE_COND_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_CACHE_RESERVE_COND_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "CACHE_RESERVE_COND", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_DRAW_SW_MASK_RES_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_DRAW_SW_MASK_RES_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DRAW_SW_MASK_RES", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_DRAW_SW_MASK_TYPE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_DRAW_SW_MASK_TYPE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DRAW_SW_MASK_TYPE", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_DRAW_SW_MASK_LINE_SIDE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_DRAW_SW_MASK_LINE_SIDE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "DRAW_SW_MASK_LINE_SIDE", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_THREAD_PRIO_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_THREAD_PRIO_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "THREAD_PRIO", ns) < 0) return NULL; } - if (PyType_Ready(&py_lv_LV_CACHE_RESERVE_COND_type) < 0) return NULL; - { PyObject *ns = PyType_GenericNew(&py_lv_LV_CACHE_RESERVE_COND_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "CACHE_RESERVE_COND", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_LRU_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_LRU_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "LRU", ns) < 0) return NULL; } + if (PyType_Ready(&py_lv_LV_RB_COLOR_type) < 0) return NULL; + { PyObject *ns = PyType_GenericNew(&py_lv_LV_RB_COLOR_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "RB_COLOR", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_TEXT_CMD_STATE_type) < 0) return NULL; { PyObject *ns = PyType_GenericNew(&py_lv_LV_TEXT_CMD_STATE_type, NULL, NULL); if (ns == NULL) return NULL; if (PyModule_AddObject(m, "TEXT_CMD_STATE", ns) < 0) return NULL; } if (PyType_Ready(&py_lv_LV_SYMBOL_type) < 0) return NULL; @@ -97406,16 +110294,16 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_draw_buf_handlers_t_type); Py_INCREF((PyObject *)&py_lv_draw_buf_handlers_t_type); if (PyModule_AddObject(m, "draw_buf_handlers_t", (PyObject *)&py_lv_draw_buf_handlers_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_area_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_area_t_type, sizeof(lv_area_t)); - lv_struct_expose_size(&py_lv_area_t_type); - Py_INCREF((PyObject *)&py_lv_area_t_type); - if (PyModule_AddObject(m, "area_t", (PyObject *)&py_lv_area_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_ll_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_ll_t_type, sizeof(lv_ll_t)); lv_struct_expose_size(&py_lv_ll_t_type); Py_INCREF((PyObject *)&py_lv_ll_t_type); if (PyModule_AddObject(m, "ll_t", (PyObject *)&py_lv_ll_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_area_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_area_t_type, sizeof(lv_area_t)); + lv_struct_expose_size(&py_lv_area_t_type); + Py_INCREF((PyObject *)&py_lv_area_t_type); + if (PyModule_AddObject(m, "area_t", (PyObject *)&py_lv_area_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_layer_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_layer_t_type, sizeof(lv_layer_t)); lv_struct_expose_size(&py_lv_layer_t_type); @@ -97559,6 +110447,9 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_group_t_type); Py_INCREF((PyObject *)&py_lv_group_t_type); if (PyModule_AddObject(m, "group_t", (PyObject *)&py_lv_group_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_delete_dsc_t_type) < 0) return NULL; + Py_INCREF((PyObject *)&py_lv_delete_dsc_t_type); + if (PyModule_AddObject(m, "delete_dsc_t", (PyObject *)&py_lv_delete_dsc_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_anim_timeline_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_anim_timeline_t_type, sizeof(lv_anim_timeline_t)); lv_struct_expose_size(&py_lv_anim_timeline_t_type); @@ -97629,6 +110520,9 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_cache_entry_t_type); Py_INCREF((PyObject *)&py_lv_cache_entry_t_type); if (PyModule_AddObject(m, "cache_entry_t", (PyObject *)&py_lv_cache_entry_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_iter_t_type) < 0) return NULL; + Py_INCREF((PyObject *)&py_lv_iter_t_type); + if (PyModule_AddObject(m, "iter_t", (PyObject *)&py_lv_iter_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_image_cache_data_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_image_cache_data_t_type, sizeof(lv_image_cache_data_t)); lv_struct_expose_size(&py_lv_image_cache_data_t_type); @@ -97639,9 +110533,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_cache_slot_size_t_type); Py_INCREF((PyObject *)&py_lv_cache_slot_size_t_type); if (PyModule_AddObject(m, "cache_slot_size_t", (PyObject *)&py_lv_cache_slot_size_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_iter_t_type) < 0) return NULL; - Py_INCREF((PyObject *)&py_lv_iter_t_type); - if (PyModule_AddObject(m, "iter_t", (PyObject *)&py_lv_iter_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_calendar_date_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_calendar_date_t_type, sizeof(lv_calendar_date_t)); lv_struct_expose_size(&py_lv_calendar_date_t_type); @@ -97672,16 +110563,16 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_span_coords_t_type); Py_INCREF((PyObject *)&py_lv_span_coords_t_type); if (PyModule_AddObject(m, "span_coords_t", (PyObject *)&py_lv_span_coords_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_tree_class_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_tree_class_t_type, sizeof(lv_tree_class_t)); - lv_struct_expose_size(&py_lv_tree_class_t_type); - Py_INCREF((PyObject *)&py_lv_tree_class_t_type); - if (PyModule_AddObject(m, "tree_class_t", (PyObject *)&py_lv_tree_class_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_font_class_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_font_class_t_type, sizeof(lv_font_class_t)); lv_struct_expose_size(&py_lv_font_class_t_type); Py_INCREF((PyObject *)&py_lv_font_class_t_type); if (PyModule_AddObject(m, "font_class_t", (PyObject *)&py_lv_font_class_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_tree_class_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_tree_class_t_type, sizeof(lv_tree_class_t)); + lv_struct_expose_size(&py_lv_tree_class_t_type); + Py_INCREF((PyObject *)&py_lv_tree_class_t_type); + if (PyModule_AddObject(m, "tree_class_t", (PyObject *)&py_lv_tree_class_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_color16_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_color16_t_type, sizeof(lv_color16_t)); lv_struct_expose_size(&py_lv_color16_t_type); @@ -97692,24 +110583,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_mem_monitor_t_type); Py_INCREF((PyObject *)&py_lv_mem_monitor_t_type); if (PyModule_AddObject(m, "mem_monitor_t", (PyObject *)&py_lv_mem_monitor_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_rb_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_rb_t_type, sizeof(lv_rb_t)); - lv_struct_expose_size(&py_lv_rb_t_type); - Py_INCREF((PyObject *)&py_lv_rb_t_type); - if (PyModule_AddObject(m, "rb_t", (PyObject *)&py_lv_rb_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_rb_node_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_rb_node_t_type, sizeof(lv_rb_node_t)); - lv_struct_expose_size(&py_lv_rb_node_t_type); - Py_INCREF((PyObject *)&py_lv_rb_node_t_type); - if (PyModule_AddObject(m, "rb_node_t", (PyObject *)&py_lv_rb_node_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_circle_buf_t_type) < 0) return NULL; - Py_INCREF((PyObject *)&py_lv_circle_buf_t_type); - if (PyModule_AddObject(m, "circle_buf_t", (PyObject *)&py_lv_circle_buf_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_tree_node_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_tree_node_t_type, sizeof(lv_tree_node_t)); - lv_struct_expose_size(&py_lv_tree_node_t_type); - Py_INCREF((PyObject *)&py_lv_tree_node_t_type); - if (PyModule_AddObject(m, "tree_node_t", (PyObject *)&py_lv_tree_node_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_font_glyph_dsc_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_font_glyph_dsc_t_type, sizeof(lv_font_glyph_dsc_t)); lv_struct_expose_size(&py_lv_font_glyph_dsc_t_type); @@ -97725,16 +110598,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_layout_callbacks_t_type); Py_INCREF((PyObject *)&py_lv_layout_callbacks_t_type); if (PyModule_AddObject(m, "layout_callbacks_t", (PyObject *)&py_lv_layout_callbacks_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_fs_path_ex_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_fs_path_ex_t_type, sizeof(lv_fs_path_ex_t)); - lv_struct_expose_size(&py_lv_fs_path_ex_t_type); - Py_INCREF((PyObject *)&py_lv_fs_path_ex_t_type); - if (PyModule_AddObject(m, "fs_path_ex_t", (PyObject *)&py_lv_fs_path_ex_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_fs_dir_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_fs_dir_t_type, sizeof(lv_fs_dir_t)); - lv_struct_expose_size(&py_lv_fs_dir_t_type); - Py_INCREF((PyObject *)&py_lv_fs_dir_t_type); - if (PyModule_AddObject(m, "fs_dir_t", (PyObject *)&py_lv_fs_dir_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_draw_fill_dsc_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_draw_fill_dsc_t_type, sizeof(lv_draw_fill_dsc_t)); lv_struct_expose_size(&py_lv_draw_fill_dsc_t_type); @@ -97760,6 +110623,16 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_draw_glyph_dsc_t_type); Py_INCREF((PyObject *)&py_lv_draw_glyph_dsc_t_type); if (PyModule_AddObject(m, "draw_glyph_dsc_t", (PyObject *)&py_lv_draw_glyph_dsc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_fs_path_ex_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_fs_path_ex_t_type, sizeof(lv_fs_path_ex_t)); + lv_struct_expose_size(&py_lv_fs_path_ex_t_type); + Py_INCREF((PyObject *)&py_lv_fs_path_ex_t_type); + if (PyModule_AddObject(m, "fs_path_ex_t", (PyObject *)&py_lv_fs_path_ex_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_fs_dir_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_fs_dir_t_type, sizeof(lv_fs_dir_t)); + lv_struct_expose_size(&py_lv_fs_dir_t_type); + Py_INCREF((PyObject *)&py_lv_fs_dir_t_type); + if (PyModule_AddObject(m, "fs_dir_t", (PyObject *)&py_lv_fs_dir_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_draw_triangle_dsc_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_draw_triangle_dsc_t_type, sizeof(lv_draw_triangle_dsc_t)); lv_struct_expose_size(&py_lv_draw_triangle_dsc_t_type); @@ -97776,21 +110649,40 @@ PyMODINIT_FUNC PyInit_lvgl(void) Py_INCREF((PyObject *)&py_lv_indev_gesture_recognizer_t_type); if (PyModule_AddObject(m, "indev_gesture_recognizer_t", (PyObject *)&py_lv_indev_gesture_recognizer_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_indev_gesture_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_indev_gesture_t_type, sizeof(lv_indev_gesture_t)); + lv_struct_expose_size(&py_lv_indev_gesture_t_type); Py_INCREF((PyObject *)&py_lv_indev_gesture_t_type); if (PyModule_AddObject(m, "indev_gesture_t", (PyObject *)&py_lv_indev_gesture_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_indev_gesture_motion_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_indev_gesture_motion_t_type, sizeof(lv_indev_gesture_motion_t)); + lv_struct_expose_size(&py_lv_indev_gesture_motion_t_type); + Py_INCREF((PyObject *)&py_lv_indev_gesture_motion_t_type); + if (PyModule_AddObject(m, "indev_gesture_motion_t", (PyObject *)&py_lv_indev_gesture_motion_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_indev_gesture_configuration_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_indev_gesture_configuration_t_type, sizeof(lv_indev_gesture_configuration_t)); + lv_struct_expose_size(&py_lv_indev_gesture_configuration_t_type); Py_INCREF((PyObject *)&py_lv_indev_gesture_configuration_t_type); if (PyModule_AddObject(m, "indev_gesture_configuration_t", (PyObject *)&py_lv_indev_gesture_configuration_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_indev_data_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_indev_data_t_type, sizeof(lv_indev_data_t)); - lv_struct_expose_size(&py_lv_indev_data_t_type); - Py_INCREF((PyObject *)&py_lv_indev_data_t_type); - if (PyModule_AddObject(m, "indev_data_t", (PyObject *)&py_lv_indev_data_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_draw_mask_rect_dsc_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_draw_mask_rect_dsc_t_type, sizeof(lv_draw_mask_rect_dsc_t)); lv_struct_expose_size(&py_lv_draw_mask_rect_dsc_t_type); Py_INCREF((PyObject *)&py_lv_draw_mask_rect_dsc_t_type); if (PyModule_AddObject(m, "draw_mask_rect_dsc_t", (PyObject *)&py_lv_draw_mask_rect_dsc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_indev_data_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_indev_data_t_type, sizeof(lv_indev_data_t)); + lv_struct_expose_size(&py_lv_indev_data_t_type); + Py_INCREF((PyObject *)&py_lv_indev_data_t_type); + if (PyModule_AddObject(m, "indev_data_t", (PyObject *)&py_lv_indev_data_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_binfont_dsc_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_binfont_dsc_t_type, sizeof(lv_binfont_dsc_t)); + lv_struct_expose_size(&py_lv_binfont_dsc_t_type); + Py_INCREF((PyObject *)&py_lv_binfont_dsc_t_type); + if (PyModule_AddObject(m, "binfont_dsc_t", (PyObject *)&py_lv_binfont_dsc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_draw_sw_custom_blend_handler_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_draw_sw_custom_blend_handler_t_type, sizeof(lv_draw_sw_custom_blend_handler_t)); + lv_struct_expose_size(&py_lv_draw_sw_custom_blend_handler_t_type); + Py_INCREF((PyObject *)&py_lv_draw_sw_custom_blend_handler_t_type); + if (PyModule_AddObject(m, "draw_sw_custom_blend_handler_t", (PyObject *)&py_lv_draw_sw_custom_blend_handler_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_draw_sw_mask_line_param_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_draw_sw_mask_line_param_t_type, sizeof(lv_draw_sw_mask_line_param_t)); lv_struct_expose_size(&py_lv_draw_sw_mask_line_param_t_type); @@ -97826,16 +110718,55 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_draw_sw_mask_map_param_t_type); Py_INCREF((PyObject *)&py_lv_draw_sw_mask_map_param_t_type); if (PyModule_AddObject(m, "draw_sw_mask_map_param_t", (PyObject *)&py_lv_draw_sw_mask_map_param_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_draw_sw_custom_blend_handler_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_draw_sw_custom_blend_handler_t_type, sizeof(lv_draw_sw_custom_blend_handler_t)); - lv_struct_expose_size(&py_lv_draw_sw_custom_blend_handler_t_type); - Py_INCREF((PyObject *)&py_lv_draw_sw_custom_blend_handler_t_type); - if (PyModule_AddObject(m, "draw_sw_custom_blend_handler_t", (PyObject *)&py_lv_draw_sw_custom_blend_handler_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_draw_sw_blend_fill_dsc_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_draw_sw_blend_fill_dsc_t_type, sizeof(lv_draw_sw_blend_fill_dsc_t)); + lv_struct_expose_size(&py_lv_draw_sw_blend_fill_dsc_t_type); + Py_INCREF((PyObject *)&py_lv_draw_sw_blend_fill_dsc_t_type); + if (PyModule_AddObject(m, "draw_sw_blend_fill_dsc_t", (PyObject *)&py_lv_draw_sw_blend_fill_dsc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_draw_sw_blend_image_dsc_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_draw_sw_blend_image_dsc_t_type, sizeof(lv_draw_sw_blend_image_dsc_t)); + lv_struct_expose_size(&py_lv_draw_sw_blend_image_dsc_t_type); + Py_INCREF((PyObject *)&py_lv_draw_sw_blend_image_dsc_t_type); + if (PyModule_AddObject(m, "draw_sw_blend_image_dsc_t", (PyObject *)&py_lv_draw_sw_blend_image_dsc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_draw_sw_grad_calc_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_draw_sw_grad_calc_t_type, sizeof(lv_draw_sw_grad_calc_t)); + lv_struct_expose_size(&py_lv_draw_sw_grad_calc_t_type); + Py_INCREF((PyObject *)&py_lv_draw_sw_grad_calc_t_type); + if (PyModule_AddObject(m, "draw_sw_grad_calc_t", (PyObject *)&py_lv_draw_sw_grad_calc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_circle_buf_t_type) < 0) return NULL; + Py_INCREF((PyObject *)&py_lv_circle_buf_t_type); + if (PyModule_AddObject(m, "circle_buf_t", (PyObject *)&py_lv_circle_buf_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_lru_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_lru_t_type, sizeof(lv_lru_t)); + lv_struct_expose_size(&py_lv_lru_t_type); + Py_INCREF((PyObject *)&py_lv_lru_t_type); + if (PyModule_AddObject(m, "lru_t", (PyObject *)&py_lv_lru_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_lru_item_t_type) < 0) return NULL; + Py_INCREF((PyObject *)&py_lv_lru_item_t_type); + if (PyModule_AddObject(m, "lru_item_t", (PyObject *)&py_lv_lru_item_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_pending_t_type) < 0) return NULL; + Py_INCREF((PyObject *)&py_lv_pending_t_type); + if (PyModule_AddObject(m, "pending_t", (PyObject *)&py_lv_pending_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_rb_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_rb_t_type, sizeof(lv_rb_t)); + lv_struct_expose_size(&py_lv_rb_t_type); + Py_INCREF((PyObject *)&py_lv_rb_t_type); + if (PyModule_AddObject(m, "rb_t", (PyObject *)&py_lv_rb_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_rb_node_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_rb_node_t_type, sizeof(lv_rb_node_t)); + lv_struct_expose_size(&py_lv_rb_node_t_type); + Py_INCREF((PyObject *)&py_lv_rb_node_t_type); + if (PyModule_AddObject(m, "rb_node_t", (PyObject *)&py_lv_rb_node_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_text_attributes_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_text_attributes_t_type, sizeof(lv_text_attributes_t)); lv_struct_expose_size(&py_lv_text_attributes_t_type); Py_INCREF((PyObject *)&py_lv_text_attributes_t_type); if (PyModule_AddObject(m, "text_attributes_t", (PyObject *)&py_lv_text_attributes_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_tree_node_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_tree_node_t_type, sizeof(lv_tree_node_t)); + lv_struct_expose_size(&py_lv_tree_node_t_type); + Py_INCREF((PyObject *)&py_lv_tree_node_t_type); + if (PyModule_AddObject(m, "tree_node_t", (PyObject *)&py_lv_tree_node_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_sqrt_res_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_sqrt_res_t_type, sizeof(lv_sqrt_res_t)); lv_struct_expose_size(&py_lv_sqrt_res_t_type); @@ -97867,6 +110798,7 @@ PyMODINIT_FUNC PyInit_lvgl(void) if (PyType_Ready(&py_lv_grad_dsc_params_conical_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_anim_parameter_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_anim_bezier3_para_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_obj_spec_attr_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_font_glyph_dsc_gid_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_indev_pointer_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_indev_keypad_t_type) < 0) return NULL; @@ -97876,7 +110808,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) if (PyType_Ready(&py_lv_draw_sw_mask_fade_param_cfg_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_draw_sw_mask_map_param_cfg_t_type) < 0) return NULL; { PyObject *obj = lv_to_mp_struct(&py_lv_color_filter_dsc_t_type, (void *)&lv_color_filter_shade); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "color_filter_shade", obj) < 0) { Py_DECREF(obj); return NULL; } } - { PyObject *obj = lv_to_mp_struct(&py_lv_tree_class_t_type, (void *)&lv_tree_node_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "tree_node_class", obj) < 0) { Py_DECREF(obj); return NULL; } } #if LV_FONT_MONTSERRAT_14 { PyObject *obj = lv_to_mp_struct(&py_lv_font_t_type, (void *)&lv_font_montserrat_14); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "font_montserrat_14", obj) < 0) { Py_DECREF(obj); return NULL; } } #endif @@ -97902,12 +110833,13 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_arclabel_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "arclabel_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_label_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "label_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_bar_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "bar_class", obj) < 0) { Py_DECREF(obj); return NULL; } } + { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_canvas_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "canvas_class", obj) < 0) { Py_DECREF(obj); return NULL; } } + { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_barcode_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "barcode_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_button_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "button_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_buttonmatrix_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "buttonmatrix_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_calendar_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "calendar_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_calendar_header_arrow_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "calendar_header_arrow_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_calendar_header_dropdown_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "calendar_header_dropdown_class", obj) < 0) { Py_DECREF(obj); return NULL; } } - { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_canvas_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "canvas_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_chart_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "chart_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_checkbox_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "checkbox_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_dropdown_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "dropdown_class", obj) < 0) { Py_DECREF(obj); return NULL; } } @@ -97936,6 +110868,7 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_msgbox_header_button_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "msgbox_header_button_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_msgbox_footer_button_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "msgbox_footer_button_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_msgbox_backdrop_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "msgbox_backdrop_class", obj) < 0) { Py_DECREF(obj); return NULL; } } + { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_qrcode_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "qrcode_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_roller_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "roller_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_scale_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "scale_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_slider_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "slider_class", obj) < 0) { Py_DECREF(obj); return NULL; } } @@ -97949,13 +110882,12 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_tileview_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "tileview_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_tileview_tile_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "tileview_tile_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_win_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "win_class", obj) < 0) { Py_DECREF(obj); return NULL; } } - { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_barcode_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "barcode_class", obj) < 0) { Py_DECREF(obj); return NULL; } } - { PyObject *obj = lv_to_mp_struct(&py_lv_obj_class_t_type, (void *)&lv_qrcode_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "qrcode_class", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_cache_class_t_type, (void *)&lv_cache_class_lru_rb_count); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "cache_class_lru_rb_count", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_cache_class_t_type, (void *)&lv_cache_class_lru_rb_size); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "cache_class_lru_rb_size", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_cache_class_t_type, (void *)&lv_cache_class_lru_ll_count); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "cache_class_lru_ll_count", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_cache_class_t_type, (void *)&lv_cache_class_lru_ll_size); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "cache_class_lru_ll_size", obj) < 0) { Py_DECREF(obj); return NULL; } } { PyObject *obj = lv_to_mp_struct(&py_lv_cache_class_t_type, (void *)&lv_cache_class_sc_da); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "cache_class_sc_da", obj) < 0) { Py_DECREF(obj); return NULL; } } + { PyObject *obj = lv_to_mp_struct(&py_lv_tree_class_t_type, (void *)&lv_tree_node_class); if (obj == NULL) return NULL; if (PyModule_AddObject(m, "tree_node_class", obj) < 0) { Py_DECREF(obj); return NULL; } } if (PyType_Ready(&py_lv_obj_type) < 0) return NULL; { if (PyType_Ready(&py_lv_LV_OBJ_TREE_WALK_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_OBJ_TREE_WALK_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_obj_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_obj_type)->tp_dict, "TREE_WALK", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } { if (PyType_Ready(&py_lv_LV_OBJ_POINT_TRANSFORM_FLAG_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_OBJ_POINT_TRANSFORM_FLAG_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_obj_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_obj_type)->tp_dict, "POINT_TRANSFORM_FLAG", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } @@ -97994,6 +110926,14 @@ PyMODINIT_FUNC PyInit_lvgl(void) { if (PyType_Ready(&py_lv_LV_BAR_ORIENTATION_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_BAR_ORIENTATION_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_bar_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_bar_type)->tp_dict, "ORIENTATION", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } Py_INCREF((PyObject *)&py_lv_bar_type); if (PyModule_AddObject(m, "bar", (PyObject *)&py_lv_bar_type) < 0) return NULL; + if (PyType_Ready(&py_lv_canvas_type) < 0) return NULL; + Py_INCREF((PyObject *)&py_lv_canvas_type); + if (PyModule_AddObject(m, "canvas", (PyObject *)&py_lv_canvas_type) < 0) return NULL; + if (PyType_Ready(&py_lv_barcode_type) < 0) return NULL; + { if (PyType_Ready(&py_lv_LV_BARCODE_ENCODING_CODE128_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_BARCODE_ENCODING_CODE128_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_barcode_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_barcode_type)->tp_dict, "ENCODING_CODE128", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } + { if (PyType_Ready(&py_lv_LV_BARCODE_UPDATE_MODE_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_BARCODE_UPDATE_MODE_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_barcode_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_barcode_type)->tp_dict, "UPDATE_MODE", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } + Py_INCREF((PyObject *)&py_lv_barcode_type); + if (PyModule_AddObject(m, "barcode", (PyObject *)&py_lv_barcode_type) < 0) return NULL; if (PyType_Ready(&py_lv_button_type) < 0) return NULL; Py_INCREF((PyObject *)&py_lv_button_type); if (PyModule_AddObject(m, "button", (PyObject *)&py_lv_button_type) < 0) return NULL; @@ -98004,9 +110944,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) if (PyType_Ready(&py_lv_calendar_type) < 0) return NULL; Py_INCREF((PyObject *)&py_lv_calendar_type); if (PyModule_AddObject(m, "calendar", (PyObject *)&py_lv_calendar_type) < 0) return NULL; - if (PyType_Ready(&py_lv_canvas_type) < 0) return NULL; - Py_INCREF((PyObject *)&py_lv_canvas_type); - if (PyModule_AddObject(m, "canvas", (PyObject *)&py_lv_canvas_type) < 0) return NULL; if (PyType_Ready(&py_lv_chart_type) < 0) return NULL; { if (PyType_Ready(&py_lv_LV_CHART_TYPE_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_CHART_TYPE_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_chart_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_chart_type)->tp_dict, "TYPE", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } { if (PyType_Ready(&py_lv_LV_CHART_UPDATE_MODE_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_CHART_UPDATE_MODE_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_chart_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_chart_type)->tp_dict, "UPDATE_MODE", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } @@ -98059,6 +110996,10 @@ PyMODINIT_FUNC PyInit_lvgl(void) if (PyType_Ready(&py_lv_msgbox_type) < 0) return NULL; Py_INCREF((PyObject *)&py_lv_msgbox_type); if (PyModule_AddObject(m, "msgbox", (PyObject *)&py_lv_msgbox_type) < 0) return NULL; + if (PyType_Ready(&py_lv_qrcode_type) < 0) return NULL; + { if (PyType_Ready(&py_lv_LV_QRCODE_UPDATE_MODE_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_QRCODE_UPDATE_MODE_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_qrcode_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_qrcode_type)->tp_dict, "UPDATE_MODE", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } + Py_INCREF((PyObject *)&py_lv_qrcode_type); + if (PyModule_AddObject(m, "qrcode", (PyObject *)&py_lv_qrcode_type) < 0) return NULL; if (PyType_Ready(&py_lv_roller_type) < 0) return NULL; { if (PyType_Ready(&py_lv_LV_ROLLER_MODE_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_ROLLER_MODE_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_roller_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_roller_type)->tp_dict, "MODE", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } Py_INCREF((PyObject *)&py_lv_roller_type); @@ -98101,23 +111042,17 @@ PyMODINIT_FUNC PyInit_lvgl(void) if (PyType_Ready(&py_lv_win_type) < 0) return NULL; Py_INCREF((PyObject *)&py_lv_win_type); if (PyModule_AddObject(m, "win", (PyObject *)&py_lv_win_type) < 0) return NULL; - if (PyType_Ready(&py_lv_barcode_type) < 0) return NULL; - { if (PyType_Ready(&py_lv_LV_BARCODE_ENCODING_CODE128_type) < 0) return NULL; PyObject *_enum_ns = (PyObject *)PyType_GenericNew(&py_lv_LV_BARCODE_ENCODING_CODE128_type, NULL, NULL); if (_enum_ns == NULL) return NULL; if (((PyTypeObject *)&py_lv_barcode_type)->tp_dict && PyDict_SetItemString(((PyTypeObject *)&py_lv_barcode_type)->tp_dict, "ENCODING_CODE128", _enum_ns) < 0) { Py_DECREF(_enum_ns); return NULL; } Py_DECREF(_enum_ns); } - Py_INCREF((PyObject *)&py_lv_barcode_type); - if (PyModule_AddObject(m, "barcode", (PyObject *)&py_lv_barcode_type) < 0) return NULL; - if (PyType_Ready(&py_lv_qrcode_type) < 0) return NULL; - Py_INCREF((PyObject *)&py_lv_qrcode_type); - if (PyModule_AddObject(m, "qrcode", (PyObject *)&py_lv_qrcode_type) < 0) return NULL; - { PyObject *fn = PyCFunction_New(&py_lv_memzero_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memzero", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_streq_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "streq", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_sqr_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "sqr", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_color_swap_16_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "color_swap_16", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_swap_bytes_32_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "swap_bytes_32", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_swap_bytes_16_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "swap_bytes_16", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_bidi_calculate_align_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bidi_calculate_align", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_memzero_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memzero", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_streq_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "streq", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_style_get_prop_group_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "style_get_prop_group", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_style_prop_has_flag_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "style_prop_has_flag", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_task_handler_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "task_handler", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_version_major_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_major", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_version_minor_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_minor", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_version_patch_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_patch", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_version_info_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_info", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_thread_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "thread_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_thread_delete_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "thread_delete", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_mutex_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mutex_init", fn) < 0) return NULL; } @@ -98130,63 +111065,14 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_thread_sync_signal_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "thread_sync_signal", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_thread_sync_signal_isr_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "thread_sync_signal_isr", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_thread_sync_delete_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "thread_sync_delete", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_color_16_16_mix_inlined_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "color_16_16_mix_inlined", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_bidi_calculate_align_internal_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bidi_calculate_align_internal", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_is_break_char_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_break_char", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_is_hanging_space_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_hanging_space", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_is_a_word_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_a_word", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_is_marker_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_marker", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_version_major_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_major", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_version_minor_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_minor", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_version_patch_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_patch", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_version_info_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "version_info", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_is_initialized_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "is_initialized", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_memcpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memcpy", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_memset_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memset", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_memmove_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memmove", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_memcmp_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memcmp", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strlen_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strlen", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strnlen_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strnlen", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strlcpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strlcpy", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strncpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strncpy", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strcpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strcpy", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strcmp_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strcmp", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strncmp_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strncmp", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strdup_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strdup", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strndup_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strndup", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strcat_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strcat", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strncat_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strncat", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_strchr_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strchr", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_mem_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_init", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_mem_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_deinit", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_mem_add_pool_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_add_pool", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_mem_remove_pool_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_remove_pool", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_malloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "malloc", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_calloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "calloc", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_zalloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "zalloc", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_malloc_zeroed_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "malloc_zeroed", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_free_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "free", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_realloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "realloc", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_reallocf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "reallocf", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_malloc_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "malloc_core", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_free_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "free_core", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_realloc_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "realloc_core", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_mem_test_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_test_core", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_mem_test_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_test", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_tick_inc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_inc", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_tick_get_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_get", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_tick_elaps_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_elaps", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_tick_diff_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_diff", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_delay_ms_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "delay_ms", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_delay_set_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "delay_set_cb", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_tick_set_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_set_cb", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_tick_get_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_get_cb", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_handler_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_handler", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_handler_run_in_period_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_handler_run_in_period", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_periodic_handler_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_periodic_handler", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_handler_set_resume_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_handler_set_resume_cb", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_create_basic_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_create_basic", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_create", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_enable_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_enable", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_get_idle_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_get_idle", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_timer_get_time_until_next_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_get_time_until_next", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_swap_bytes_32_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "swap_bytes_32", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_swap_bytes_16_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "swap_bytes_16", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_trigo_sin_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "trigo_sin", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_trigo_cos_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "trigo_cos", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_cubic_bezier_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "cubic_bezier", fn) < 0) return NULL; } @@ -98198,8 +111084,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_map_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "map", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_rand_set_seed_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "rand_set_seed", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_rand_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "rand", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_async_call_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "async_call", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_async_call_cancel_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "async_call_cancel", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_anim_delete_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "anim_delete", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_anim_delete_all_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "anim_delete_all", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_anim_get_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "anim_get", fn) < 0) return NULL; } @@ -98213,6 +111097,32 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_anim_timeline_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "anim_timeline_create", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_pct_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "pct", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_pct_to_px_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "pct_to_px", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_event_register_id_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "event_register_id", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_event_code_get_name_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "event_code_get_name", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_create", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_get_default_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_get_default", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_swap_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_swap_obj", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_remove_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_remove_obj", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_focus_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_focus_obj", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_get_count_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_get_count", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_by_index_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_by_index", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_is_initialized_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "is_initialized", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_mem_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_init", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_mem_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_deinit", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_mem_add_pool_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_add_pool", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_mem_remove_pool_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_remove_pool", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_malloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "malloc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_calloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "calloc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_zalloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "zalloc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_malloc_zeroed_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "malloc_zeroed", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_free_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "free", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_realloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "realloc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_reallocf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "reallocf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_malloc_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "malloc_core", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_free_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "free_core", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_realloc_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "realloc_core", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_mem_test_core_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_test_core", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_mem_test_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "mem_test", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_color_format_get_bpp_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "color_format_get_bpp", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_color_format_get_size_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "color_format_get_size", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_color_format_has_alpha_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "color_format_has_alpha", fn) < 0) return NULL; } @@ -98229,23 +111139,31 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_palette_main_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "palette_main", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_palette_lighten_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "palette_lighten", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_palette_darken_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "palette_darken", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_memcpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memcpy", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_memset_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memset", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_memmove_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memmove", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_memcmp_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "memcmp", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strlen_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strlen", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strnlen_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strnlen", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strlcpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strlcpy", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strncpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strncpy", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strcpy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strcpy", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strcmp_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strcmp", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strncmp_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strncmp", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strdup_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strdup", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strndup_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strndup", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strcat_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strcat", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strncat_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strncat", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_strchr_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "strchr", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_buf_get_handlers_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_buf_get_handlers", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_buf_get_font_handlers_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_buf_get_font_handlers", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_buf_get_image_handlers_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_buf_get_image_handlers", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_buf_align_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_buf_align", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_buf_width_to_stride_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_buf_width_to_stride", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_buf_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_buf_create", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_utils_bsearch_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "utils_bsearch", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_iter_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "iter_create", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_circle_buf_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "circle_buf_create", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_circle_buf_create_from_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "circle_buf_create_from_buf", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_circle_buf_create_from_array_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "circle_buf_create_from_array", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_lock_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "lock", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_lock_isr_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "lock_isr", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_unlock_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "unlock", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_sleep_ms_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "sleep_ms", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_font_get_default_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "font_get_default", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_get_size_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_size", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_bidi_calculate_align_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bidi_calculate_align", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_layout_register_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "layout_register", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_flex_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "flex_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_grid_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "grid_init", fn) < 0) return NULL; } @@ -98254,8 +111172,16 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_style_get_num_custom_props_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "style_get_num_custom_props", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_style_prop_get_default_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "style_prop_get_default", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_style_prop_lookup_flags_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "style_prop_lookup_flags", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_event_register_id_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "event_register_id", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_event_code_get_name_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "event_code_get_name", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_handler_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_handler", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_handler_run_in_period_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_handler_run_in_period", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_get_time_to_next_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_get_time_to_next", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_periodic_handler_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_periodic_handler", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_handler_set_resume_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_handler_set_resume_cb", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_create_basic_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_create_basic", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_create", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_enable_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_enable", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_get_idle_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_get_idle", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_timer_get_time_until_next_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_get_time_until_next", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_display_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "display_create", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_display_get_default_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "display_get_default", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_screen_load_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "screen_load", fn) < 0) return NULL; } @@ -98267,17 +111193,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_dpx_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "dpx", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_clamp_width_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "clamp_width", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_clamp_height_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "clamp_height", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_get_drv_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_drv", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_remove_drive_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_remove_drive", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_is_ready_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_is_ready", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_path_get_size_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_path_get_size", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_load_to_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_load_to_buf", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_load_with_alloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_load_with_alloc", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_get_letters_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_letters", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_get_ext_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_ext", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_up_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_up", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_get_last_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_last", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_path_join_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_path_join", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_deinit", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_create_unit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_create_unit", fn) < 0) return NULL; } @@ -98297,6 +111212,9 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_draw_layer_go_to_xy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_layer_go_to_xy", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_layer_create_drop_shadow_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_layer_create_drop_shadow", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_layer_finish_drop_shadow_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_layer_finish_drop_shadow", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_layer_dealloc_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_layer_dealloc_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_layer_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_layer_deinit", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_layer_delete_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_layer_delete", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_fill_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_fill", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_border_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_border", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_box_shadow_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_box_shadow", fn) < 0) return NULL; } @@ -98304,6 +111222,17 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_draw_label_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_label", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_character_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_character", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_letter_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_letter", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_get_drv_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_drv", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_remove_drive_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_remove_drive", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_is_ready_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_is_ready", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_path_get_size_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_path_get_size", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_load_to_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_load_to_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_load_with_alloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_load_with_alloc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_get_letters_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_letters", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_get_ext_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_ext", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_up_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_up", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_get_last_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_get_last", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_path_join_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_path_join", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_image_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_image", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_layer_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_layer", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_line_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_line", fn) < 0) return NULL; } @@ -98311,46 +111240,45 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_draw_arc_get_area_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_arc_get_area", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_triangle_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_triangle", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_blur_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_blur", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_create", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_get_default_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_get_default", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_swap_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_swap_obj", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_remove_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_remove_obj", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_focus_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_focus_obj", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_get_count_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_get_count", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_by_index_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_by_index", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_indev_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "indev_create", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_indev_read_timer_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "indev_read_timer_cb", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_indev_active_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "indev_active", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_indev_get_active_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "indev_get_active_obj", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_indev_search_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "indev_search_obj", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_subject_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "subject_create", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_refr_now_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "refr_now", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_display_refr_timer_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "display_refr_timer", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_mask_rect_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_mask_rect", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_snapshot_take_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_take", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_snapshot_create_draw_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_create_draw_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_snapshot_reshape_draw_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_reshape_draw_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_snapshot_take_to_draw_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_take_to_draw_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_snapshot_free_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_free", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_snapshot_take_to_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_take_to_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_i1_to_argb8888_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_i1_to_argb8888", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_rgb565_swap_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_rgb565_swap", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_i1_invert_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_i1_invert", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_i1_convert_to_vtiled_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_i1_convert_to_vtiled", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_rotate_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_rotate", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_binfont_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "binfont_create", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_binfont_create_from_buffer_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "binfont_create_from_buffer", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_binfont_destroy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "binfont_destroy", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_imgfont_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "imgfont_create", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_imgfont_destroy_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "imgfont_destroy", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_span_stack_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "span_stack_init", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_span_stack_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "span_stack_deinit", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_fs_memfs_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_memfs_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_bin_decoder_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bin_decoder_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_bin_decoder_info_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bin_decoder_info", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_bin_decoder_get_area_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bin_decoder_get_area", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_bin_decoder_open_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bin_decoder_open", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_bin_decoder_close_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bin_decoder_close", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_fs_memfs_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_memfs_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_lodepng_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "lodepng_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_lodepng_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "lodepng_deinit", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_i1_to_argb8888_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_i1_to_argb8888", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_rgb565_swap_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_rgb565_swap", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_i1_invert_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_i1_invert", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_i1_convert_to_vtiled_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_i1_convert_to_vtiled", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_rotate_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_rotate", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_snapshot_take_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_take", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_snapshot_create_draw_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_create_draw_buf", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_snapshot_reshape_draw_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_reshape_draw_buf", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_snapshot_take_to_draw_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_take_to_draw_buf", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_snapshot_free_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_free", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_snapshot_take_to_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "snapshot_take_to_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_async_call_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "async_call", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_async_call_cancel_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "async_call_cancel", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_lock_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "lock", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_lock_isr_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "lock_isr", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_unlock_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "unlock", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_sleep_ms_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "sleep_ms", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_theme_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "theme_create", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_theme_get_from_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "theme_get_from_obj", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_theme_apply_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "theme_apply", fn) < 0) return NULL; } @@ -98363,50 +111291,72 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_theme_default_is_inited_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "theme_default_is_inited", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_theme_default_get_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "theme_default_get", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_theme_default_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "theme_default_deinit", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_mask_rect_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_mask_rect", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_init", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_deinit", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_apply_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_apply", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_free_param_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_free_param", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_tick_inc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_inc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_tick_get_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_get", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_tick_elaps_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_elaps", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_tick_diff_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_diff", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_delay_ms_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "delay_ms", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_delay_set_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "delay_set_cb", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_tick_set_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_set_cb", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_tick_get_cb_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "tick_get_cb", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_span_stack_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "span_stack_init", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_span_stack_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "span_stack_deinit", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_os_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "os_init", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_os_get_idle_percent_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "os_get_idle_percent", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_iter_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "iter_create", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_cache_entry_alloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "cache_entry_alloc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_cache_entry_get_size_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "cache_entry_get_size", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_cache_entry_get_entry_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "cache_entry_get_entry", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_deinit", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_transform_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_transform", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_unregister_blend_handler_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_unregister_blend_handler", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_get_blend_handler_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_get_blend_handler", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_os_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "os_init", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_os_get_idle_percent_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "os_get_idle_percent", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_timer_core_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_core_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_timer_core_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "timer_core_deinit", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_anim_core_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "anim_core_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_anim_core_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "anim_core_deinit", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_anim_enable_vsync_mode_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "anim_enable_vsync_mode", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_buf_init_handlers_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_buf_init_handlers", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_cache_entry_get_size_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "cache_entry_get_size", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_cache_entry_get_entry_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "cache_entry_get_entry", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_cache_entry_alloc_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "cache_entry_alloc", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_init", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_deinit", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_apply_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_apply", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_free_param_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_free_param", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_mask_cleanup_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_mask_cleanup", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_layout_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "layout_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_layout_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "layout_deinit", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_layout_get_min_size_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "layout_get_min_size", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_layout_apply_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "layout_apply", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_indev_scroll_get_snap_dist_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "indev_scroll_get_snap_dist", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_get_size_attributes_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_size_attributes", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_get_width_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_width", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_is_cmd_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_cmd", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_get_next_line_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_next_line", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_ins_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_ins", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_cut_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_cut", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_encoded_letter_next_2_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_encoded_letter_next_2", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_init", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_group_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_deinit", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_event_mark_deleted_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "event_mark_deleted", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_subject_global_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "subject_global_init", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_subject_global_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "subject_global_deinit", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_refr_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "refr_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_refr_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "refr_deinit", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_inv_area_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "inv_area", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_refr_get_disp_refreshing_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "refr_get_disp_refreshing", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_refr_set_disp_refreshing_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "refr_set_disp_refreshing", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_refr_get_top_obj_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "refr_get_top_obj", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_init", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_group_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "group_deinit", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_grad_color_calculate_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_grad_color_calculate", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_draw_sw_grad_get_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "draw_sw_grad_get", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_fs_init_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_init", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_fs_deinit_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "fs_deinit", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_event_mark_deleted_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "event_mark_deleted", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_indev_scroll_get_snap_dist_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "indev_scroll_get_snap_dist", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_circle_buf_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "circle_buf_create", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_circle_buf_create_from_buf_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "circle_buf_create_from_buf", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_circle_buf_create_from_array_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "circle_buf_create_from_array", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_lru_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "lru_create", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_pending_create_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "pending_create", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_get_size_attributes_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_size_attributes", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_get_width_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_width", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_get_line_width_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_line_width", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_is_cmd_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_cmd", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_get_next_line_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_next_line", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_ins_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_ins", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_cut_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_cut", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_encoded_letter_next_2_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_encoded_letter_next_2", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_text_get_size_internal_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_size_internal", fn) < 0) return NULL; } + { PyObject *fn = PyCFunction_New(&py_lv_utils_bsearch_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "utils_bsearch", fn) < 0) return NULL; } return m; } diff --git a/lv_conf.h b/lv_conf.h index fd2c73b..44b7d0f 100644 --- a/lv_conf.h +++ b/lv_conf.h @@ -29,8 +29,9 @@ COLOR SETTINGS *====================*/ -/*Color depth: 8 (A8), 16 (RGB565), 24 (RGB888), 32 (XRGB8888)*/ -#define LV_COLOR_DEPTH 16 +/*The color format LVGL renders in: RGB565, 16 bits a pixel. + *LV_COLOR_DEPTH is derived from it.*/ +#define LV_COLOR_FORMAT_DEFAULT LV_COLOR_FORMAT_RGB565 /*========================= STDLIB WRAPPER SETTINGS @@ -70,9 +71,6 @@ /*Size of the memory available for `lv_malloc()` in bytes (>= 2kB)*/ #define LV_MEM_SIZE (64 * 1024U) /*[bytes]*/ - /*Size of the memory expand for `lv_malloc()` in bytes*/ - #define LV_MEM_POOL_EXPAND_SIZE 0 - /*Set an address for the memory pool instead of allocating it as a normal array. Can be in external SRAM too.*/ #define LV_MEM_ADR 0 /*0: unused*/ /*Instead of an address give a memory allocator that will be called to get a memory pool for LVGL. E.g. my_malloc*/ @@ -281,13 +279,21 @@ *-----------*/ /*Enable asserts if an operation is failed or an invalid data is found. - *If LV_USE_LOG is enabled an error message will be printed on failure*/ + *If LV_USE_LOG is enabled an error message will be printed on failure. + *LV_USE_ASSERT is the master switch, and LVGL turns it off by default: + *without it the two checks below compile to nothing.*/ +#define LV_USE_ASSERT 1 #define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/ #define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/ #define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/ #define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/ #define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/ +/*Argument checks: a public function given a NULL pointer, or an argument out + *of range, logs (when LV_USE_LOG is on) and returns instead of dereferencing + *it. LVGL turns them on by default; set them here so the choice is ours.*/ +#define LV_USE_CHECK_ARG 1 + /*Add a custom handler when assert happens e.g. to restart the MCU*/ #if defined(LV_CIRCUITPYTHON_BUILD) /* A halted board drops off USB and needs a hand on its reset button to @@ -296,11 +302,9 @@ * "Third-party firmware fatal error." and leaves CIRCUITPY reachable. * The CircuitPython port provides the function; it is weak here, so a * consumer without it still links and halts as before. */ - #define LV_ASSERT_HANDLER_INCLUDE __attribute__((weak)) void lv_circuitpython_assert_failed(void); #define LV_ASSERT_HANDLER { if (lv_circuitpython_assert_failed) { lv_circuitpython_assert_failed(); } while(1); } #elif defined(LV_CPYTHON_BUILD) -#define LV_ASSERT_HANDLER_INCLUDE #define LV_ASSERT_HANDLER while(1); /*Halt by default*/ #else /* On MicroPython a spinning assert locks the scheduler out: USB serial and @@ -314,7 +318,6 @@ * follows the call. Passing the full path and the function name as well * cost about 50 KB of flash on an ESP32-S3, and with code run from PSRAM * (XIP) it took 128 KB of PSRAM from the heap. */ - #define LV_ASSERT_HANDLER_INCLUDE #if !defined(PYCPARSER) && !defined(__ASSEMBLY__) __attribute__((noreturn)) void lv_micropython_assert_failed(const char *file, int line); #endif @@ -639,13 +642,6 @@ extern void mp_lv_deinit_gc(void); #define LV_USE_CALENDAR 1 #if LV_USE_CALENDAR #define LV_CALENDAR_WEEK_STARTS_MONDAY 0 - #if LV_CALENDAR_WEEK_STARTS_MONDAY - #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"} - #else - #define LV_CALENDAR_DEFAULT_DAY_NAMES {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"} - #endif - - #define LV_CALENDAR_DEFAULT_MONTH_NAMES {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} #define LV_USE_CALENDAR_HEADER_ARROW 1 #define LV_USE_CALENDAR_HEADER_DROPDOWN 1 #endif /*LV_USE_CALENDAR*/ @@ -889,14 +885,10 @@ extern void mp_lv_deinit_gc(void); /* Enable ThorVG (vector graphics library) from the src/libs folder */ #define LV_USE_THORVG_INTERNAL 0 -/* Enable ThorVG by assuming that its installed and linked to the project */ -#define LV_USE_THORVG_EXTERNAL 0 /*Use lvgl built-in LZ4 lib*/ #define LV_USE_LZ4_INTERNAL 0 -/*Use external LZ4 library*/ -#define LV_USE_LZ4_EXTERNAL 0 /*FFmpeg library for image decoding and playing videos *Supports all major image formats so do not enable other image decoder with it*/ diff --git a/lvgl b/lvgl index 85aa60d..d8a4e1d 160000 --- a/lvgl +++ b/lvgl @@ -1 +1 @@ -Subproject commit 85aa60d18b3d5e5588d7b247abf90198f07c8a63 +Subproject commit d8a4e1dfb7e9ff0d81956fbab601969f682beb28 diff --git a/ports/circuitpython/src/lv_mem_core_circuitpython.c b/ports/circuitpython/src/lv_mem_core_circuitpython.c index 9d4c0a5..65c6b9a 100644 --- a/ports/circuitpython/src/lv_mem_core_circuitpython.c +++ b/ports/circuitpython/src/lv_mem_core_circuitpython.c @@ -16,7 +16,7 @@ /********************* * INCLUDES *********************/ -#include "lvgl/src/stdlib/lv_mem.h" +#include "lvgl/lvgl.h" /* Must match lv_conf.h when building for CircuitPython. */ #ifndef LV_STDLIB_CIRCUITPYTHON_OVERRIDE diff --git a/ports/cpython/JPEGIO_COMMIT b/ports/cpython/JPEGIO_COMMIT index 651e049..02f9dac 100644 --- a/ports/cpython/JPEGIO_COMMIT +++ b/ports/cpython/JPEGIO_COMMIT @@ -1 +1 @@ -59cb3bd346028fc531ce5d9d4b5e0d0b245c35be +5e94a722ffc57073f3c1407fd92600f7ea90cf45 diff --git a/ports/cpython/src/jpegio/lvgl_decoder.c b/ports/cpython/src/jpegio/lvgl_decoder.c index d72406c..73363f9 100644 --- a/ports/cpython/src/jpegio/lvgl_decoder.c +++ b/ports/cpython/src/jpegio/lvgl_decoder.c @@ -2,7 +2,7 @@ // jpegio's LVGL image decoder: baseline JPEG through jpegio's own TJpgDec, // registered with LVGL's public lv_image_decoder_create API. Phase 2 of the // org's docs/jpegio-vision.md: LVGL's built-in TJPGD is off (LV_USE_TJPGD 0 -// in lvgl-bindings' lv_conf.h on MicroPython), so a firmware with both +// in omnipython-lvgl's lv_conf.h on MicroPython), so a firmware with both // usermods carries one TJpgDec -- jpegio's, vendored in tjpgd/ -- and this // file is that object code's second user. // @@ -30,8 +30,11 @@ // decoder instead of being claimed. #include "lvgl/lvgl.h" -#include "lvgl/src/draw/lv_image_decoder_private.h" // lv_image_decoder_t.info_cb, lv_image_cache_data_t -#include "lvgl/src/core/lv_global.h" // LV_GLOBAL_DEFAULT()->image_cache_draw_buf_handlers +// lv_image_decoder_t.info_cb, lv_image_cache_data_t and +// LV_GLOBAL_DEFAULT()->image_cache_draw_buf_handlers. lvgl_private.h is where +// every LVGL release keeps them: 9.6 moved the decoder's header from src/draw/ +// to src/image/. +#include "lvgl/src/lvgl_private.h" #include diff --git a/ports/cpython/src/jpegio/lvgl_decoder.h b/ports/cpython/src/jpegio/lvgl_decoder.h index 96318c2..57af151 100644 --- a/ports/cpython/src/jpegio/lvgl_decoder.h +++ b/ports/cpython/src/jpegio/lvgl_decoder.h @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT // jpegio's LVGL image decoder (lvgl_decoder.c). Compiled only when the -// lvgl-micropython sibling usermod is on the same build (JPEGIO_LVGL_DECODER). +// omnipython-lvgl usermod (lvgl) is on the same build (JPEGIO_LVGL_DECODER). #ifndef JPEGIO_LVGL_DECODER_H #define JPEGIO_LVGL_DECODER_H diff --git a/ports/cpython/src/jpegio/tjpgd/LICENSE b/ports/cpython/src/jpegio/tjpgd/LICENSE new file mode 100644 index 0000000..41b8fd6 --- /dev/null +++ b/ports/cpython/src/jpegio/tjpgd/LICENSE @@ -0,0 +1,8 @@ +TJpgDec - Tiny JPEG Decompressor R0.03 (C)ChaN, 2021 + +Copyright (C) 2021, ChaN, all right reserved. + +The TJpgDec module is a free software and there is NO WARRANTY. +No restriction on use. You can use, modify and redistribute it for +personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY. +Redistributions of source code must retain the above copyright notice. diff --git a/ports/cpython/src/jpegio/tjpgd/ORIGIN.txt b/ports/cpython/src/jpegio/tjpgd/ORIGIN.txt new file mode 100644 index 0000000..ed1048d --- /dev/null +++ b/ports/cpython/src/jpegio/tjpgd/ORIGIN.txt @@ -0,0 +1,22 @@ +TJpgDec R0.03 with patch1, by ChaN +Upstream: http://elm-chan.org/fsw/tjpgd/00index.html +Taken from: CircuitPython's lib/tjpgd/src/ + https://github.com/adafruit/circuitpython.git + identical, apart from the changes below, to the copy at commit + 520805e12127bdb51722ba1caa5c670ecd8c4f72 +Files: tjpgd.c, tjpgd.h, tjpgdcnf.h (tjpgdcnf.h is CircuitPython's, verbatim: + JD_SZBUF 512, JD_FORMAT 1, JD_USE_SCALE 1, JD_TBLCLIP 1, JD_FASTDECODE 1) + +Changes: + +1. tjpgd.c, mcu_output: the RGB565 store is ChaN's original `*d++ = w;`. + CircuitPython byte-swaps there with `__builtin_bswap16(w)`; jpegio keeps + native byte order. + +2. tjpgd.h: the stdint.h guard tests for the header with __has_include + instead of testing for _WIN32. Upstream's comment says the test means "a + compiler without stdint.h", but mingw defines _WIN32 and ships stdint.h, + where uint32_t is `unsigned int` rather than the fallback's + `unsigned long`, so every mingw cross-build failed with conflicting types. + The fallback typedefs are kept for the compiler the comment meant, MSVC + before 2010. -DJD_HAS_STDINT=0/1 overrides the detection. diff --git a/ports/cpython/src/jpegio/tjpgd/tjpgd.c b/ports/cpython/src/jpegio/tjpgd/tjpgd.c index 576399c..a0c0add 100644 --- a/ports/cpython/src/jpegio/tjpgd/tjpgd.c +++ b/ports/cpython/src/jpegio/tjpgd/tjpgd.c @@ -945,7 +945,7 @@ static JRESULT mcu_output ( w = (*s++ & 0xF8) << 8; /* RRRRR----------- */ w |= (*s++ & 0xFC) << 3; /* -----GGGGGG----- */ w |= *s++ >> 3; /* -----------BBBBB */ - *d++ = w; /* displayif: native byte order (ChaN R0.03 as released; CircuitPython byte-swaps here) */ + *d++ = w; /* jpegio: native byte order (ChaN R0.03 as released; CircuitPython byte-swaps here) */ } while (--n); } diff --git a/ports/cpython/src/jpegio/tjpgd/tjpgd.h b/ports/cpython/src/jpegio/tjpgd/tjpgd.h index 0831e22..b01eeca 100644 --- a/ports/cpython/src/jpegio/tjpgd/tjpgd.h +++ b/ports/cpython/src/jpegio/tjpgd/tjpgd.h @@ -11,7 +11,7 @@ extern "C" { #include "tjpgdcnf.h" #include -/* Deviation from ChaN R0.03 (see src/jpegio/README.md): upstream selects the +/* Deviation from ChaN R0.03 (see ORIGIN.txt): upstream selects the / fallback typedefs with `#if defined(_WIN32)`, while its own comment says the / test is meant to be "a compiler without stdint.h". mingw is both at once -- / it defines _WIN32 and ships stdint.h, where uint32_t is `unsigned int`, not diff --git a/ports/micropython/src/lv_mem_core_micropython.c b/ports/micropython/src/lv_mem_core_micropython.c index 8138496..845acec 100644 --- a/ports/micropython/src/lv_mem_core_micropython.c +++ b/ports/micropython/src/lv_mem_core_micropython.c @@ -5,7 +5,7 @@ /********************* * INCLUDES *********************/ -#include "lvgl/src/stdlib/lv_mem.h" +#include "lvgl/lvgl.h" #if LV_USE_STDLIB_MALLOC == LV_STDLIB_MICROPYTHON_OVERRIDE #include #include diff --git a/ports/micropython/src/lvmp_tlsf.c b/ports/micropython/src/lvmp_tlsf.c index ad908f7..35846ca 100644 --- a/ports/micropython/src/lvmp_tlsf.c +++ b/ports/micropython/src/lvmp_tlsf.c @@ -10,14 +10,28 @@ * lv_tlsf.c only with LV_STDLIB_BUILTIN, so it is built here, in a translation * unit of its own, with that setting: nothing else in LVGL changes. */ +#if __has_include("lvgl/include/lvgl/config/lv_conf_internal.h") +// LVGL 9.6 moved its public headers to include/lvgl/. +#include "lvgl/include/lvgl/config/lv_conf_internal.h" +#define LVMP_TLSF_HAS_POOL_EXPAND 0 +#else #include "lvgl/src/lv_conf_internal.h" +#define LVMP_TLSF_HAS_POOL_EXPAND 1 +#endif #include "lvmp_pool.h" #if LV_USE_STDLIB_MALLOC == LV_STDLIB_MICROPYTHON_OVERRIDE && LVMP_POOL #undef LV_USE_STDLIB_MALLOC #define LV_USE_STDLIB_MALLOC LV_STDLIB_BUILTIN -// lv_tlsf.c sizes its tables for LV_MEM_SIZE + LV_MEM_POOL_EXPAND_SIZE, which -// lv_conf_internal.h defines only with LV_STDLIB_BUILTIN: one TLSF per pool. +// LVGL 9.6 compiles lv_tlsf.c under LV_USE_TLSF, which lv_conf_internal.h +// has already derived from the real LV_USE_STDLIB_MALLOC: turn it on here. +#undef LV_USE_TLSF +#define LV_USE_TLSF 1 +// lv_tlsf.c sizes its tables for LV_MEM_SIZE (and, before LVGL 9.6, +// LV_MEM_POOL_EXPAND_SIZE), which lv_conf_internal.h defines only with +// LV_STDLIB_BUILTIN: one TLSF per pool. #define LV_MEM_SIZE LVMP_POOL_BYTES +#if LVMP_TLSF_HAS_POOL_EXPAND #define LV_MEM_POOL_EXPAND_SIZE 0 +#endif #include "lvgl/src/stdlib/builtin/lv_tlsf.c" #endif diff --git a/scripts/next_release_version.sh b/scripts/next_release_version.sh index 5d92a5e..b9f27e5 100755 --- a/scripts/next_release_version.sh +++ b/scripts/next_release_version.sh @@ -37,7 +37,7 @@ done read_lvgl_version() { local version_file - for version_file in "$LVGL_DIR/lv_version.h" "$LVGL_DIR/lvgl.h"; do + for version_file in "$LVGL_DIR/include/lvgl/lv_version.h" "$LVGL_DIR/lv_version.h" "$LVGL_DIR/lvgl.h"; do [[ -f "$version_file" ]] || continue LVGL_MAJOR=$(grep -E '^#define LVGL_VERSION_MAJOR' "$version_file" | awk '{print $3}') LVGL_MINOR=$(grep -E '^#define LVGL_VERSION_MINOR' "$version_file" | awk '{print $3}') diff --git a/scripts/verify_bindings.sh b/scripts/verify_bindings.sh index 5a956ed..715a9b6 100755 --- a/scripts/verify_bindings.sh +++ b/scripts/verify_bindings.sh @@ -58,8 +58,9 @@ line_count = len(lines) errors = [] -if line_count < 45000 or line_count > 52000: - errors.append(f"lvgl_circuitpython.c line count {line_count} outside expected 45000–52000") +# LVGL 9.6's added API took the file from about 49,000 lines to 54,000. +if line_count < 45000 or line_count > 60000: + errors.append(f"lvgl_circuitpython.c line count {line_count} outside expected 45000–60000") if "Target: circuitpython" not in text: errors.append("missing Target: circuitpython banner") diff --git a/tools/lvgl_bench.py b/tools/lvgl_bench.py new file mode 100644 index 0000000..c99af46 --- /dev/null +++ b/tools/lvgl_bench.py @@ -0,0 +1,358 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# +# SPDX-License-Identifier: MIT + +"""Time LVGL's rendering and measure its memory, the same way on every interpreter. + +Run it on a board (MicroPython or CircuitPython) after a soft reset, so the +heap holds nothing but this script, or with CPython on a desktop. It prints +one ``BENCH`` line per measurement and a ``BENCH_RESULT=`` JSON line at the +end, so two builds can be compared line by line. + +What it measures: + +* free heap before ``import lvgl``, after it, and after the board's display + starts (``board_config`` and ``display_driver``), where there is one; +* the heap each scene's widgets take; +* the median time of one refresh (``lv.refr_now``) for four fixed scenes: + a full-screen redraw, a scrolling list, rotated and scaled images, and + wrapped text. Each scene is timed on an off-screen display whose flush does + nothing ("render": LVGL alone) and, when the board has a display, on the + board's own ("screen": LVGL and the panel transfer). + +``lv.mem_monitor`` reports nothing under the MicroPython and CircuitPython +allocators, which take LVGL's memory from the garbage-collected heap, so the +heap figures are the measure of LVGL's memory there. CPython reports the +process's resident memory instead. + +Usage:: + + python tools/lvgl_bench.py # CPython: off-screen display only + mpftp run tools/lvgl_bench.py --follow # a board, after mpftp soft-reset + +Pass ``render`` on the command line, or set ``LVGL_BENCH_RENDER_ONLY``, to +skip the board's display. +""" + +import gc +import sys + +try: + from time import ticks_diff, ticks_us +except ImportError: + try: + from time import perf_counter_ns as _ns + except ImportError: + from time import monotonic_ns as _ns + + def ticks_us(): + return _ns() // 1000 + + def ticks_diff(a, b): + return a - b + + +RUNS = 7 +_ANIM_OFF = 0 # lv_anim_enable_t is a bool in LVGL 9: LV_ANIM_OFF is false +SCROLL_STEPS = 12 +WIDTH, HEIGHT = 800, 480 # the off-screen display when there is no board display + +_results = {} + + +def _free(): + """Free heap in bytes, after a collection; None where it can't be read.""" + gc.collect() + mem_free = getattr(gc, "mem_free", None) + if mem_free is not None: + return mem_free() + try: + with open("/proc/self/statm") as f: + # resident pages, negated so that "free" falls as memory is used + return -int(f.read().split()[1]) * 4096 + except (OSError, ValueError, IndexError): + return None + + +def _report(key, value, unit): + _results[key] = value + print("BENCH %s %s %s" % (key, value, unit)) + + +def _median(values): + values = sorted(values) + return values[len(values) // 2] + + +def _render_only(): + if any(arg == "render" for arg in sys.argv[1:]): + return True + try: + import os + + return bool(os.getenv("LVGL_BENCH_RENDER_ONLY")) + except (ImportError, AttributeError): + return False + + +free_start = _free() +import lvgl as lv # noqa: E402 + +free_lvgl = _free() + +screen_disp = None +if not _render_only(): + try: + import board_config # noqa: F401 + import display_driver + + screen_disp = lv.display_get_default() + inst = display_driver.event_loop.current_instance() + if inst is not None: + # The bench drives every refresh itself. + inst.disable() + except ImportError as exc: + print("BENCH no board display: %s" % exc) +free_display = _free() + +if not lv.is_initialized(): + lv.init() + +_report("lvgl_version", "%d.%d.%d" % (lv.version_major(), lv.version_minor(), lv.version_patch()), "") +_report("platform", sys.platform, "") +_report("implementation", sys.implementation.name, "") +if free_start is not None: + _report("heap_free_start", free_start, "B") + _report("heap_import_lvgl", free_start - free_lvgl, "B") + _report("heap_display_init", free_lvgl - free_display, "B") + _report("heap_free_after_display", free_display, "B") + +if screen_disp is not None: + WIDTH = screen_disp.get_horizontal_resolution() + HEIGHT = screen_disp.get_vertical_resolution() +_report("resolution", "%dx%d" % (WIDTH, HEIGHT), "") + + +def _flush(disp, area, color_p): + disp.flush_ready() + + +def _offscreen_display(): + """A display the size of the board's whose flush does nothing, so a + refresh times LVGL's drawing alone. Its draw buffer is a tenth of the + screen, rendered in partial mode, as most boards' are.""" + disp = lv.display_create(WIDTH, HEIGHT) + disp.set_color_format(lv.COLOR_FORMAT.RGB565) + rows = max(1, HEIGHT // 10) + buf = lv.draw_buf_create(WIDTH, rows, lv.COLOR_FORMAT.RGB565, 0) + disp.set_draw_buffers(buf, None) + disp.set_render_mode(lv.DISPLAY_RENDER_MODE.PARTIAL) + disp.set_flush_cb(_flush) + return disp, buf + + +free_before_offscreen = _free() +render_disp, render_buf = _offscreen_display() +if free_before_offscreen is not None: + _report("heap_offscreen_display", free_before_offscreen - _free(), "B") + + +def _time_refresh(disp, before=None, runs=RUNS): + """The median microseconds of one refresh of `disp`. `before(i)` runs + first each time, inside the timing: a scroll step or a text change is part + of the work a refresh pays for.""" + times = [] + for i in range(runs): + t0 = ticks_us() + if before is not None: + before(i) + lv.refr_now(disp) + times.append(ticks_diff(ticks_us(), t0)) + return _median(times) + + +def _font(size): + return getattr(lv, "font_montserrat_%d" % size, None) or lv.font_get_default() + + +# --- scenes: each builds a screen on the display that is default --------- + + +def scene_full(scr): + """A gradient background, a grid of twelve buttons, an arc, a slider and a bar.""" + scr.set_style_bg_color(lv.color_hex(0x203040), 0) + scr.set_style_bg_grad_color(lv.color_hex(0x80A0C0), 0) + scr.set_style_bg_grad_dir(lv.GRAD_DIR.VER, 0) + scr.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) + scr.set_style_pad_all(8, 0) + scr.set_style_pad_gap(8, 0) + bw = (WIDTH - 8 * 5) // 4 + bh = (HEIGHT - 8 * 5) // 5 + for i in range(12): + btn = lv.button(scr) + btn.set_size(bw, bh) + btn.set_style_radius(12, 0) + btn.set_style_shadow_width(10, 0) + label = lv.label(btn) + label.set_text("Button %d" % i) + label.center() + arc = lv.arc(scr) + arc.set_size(bh, bh) + arc.set_value(70) + slider = lv.slider(scr) + slider.set_width(bw * 2) + slider.set_value(40, _ANIM_OFF) + bar = lv.bar(scr) + bar.set_width(bw) + bar.set_value(60, _ANIM_OFF) + return None + + +def scene_list(scr): + """A full-screen column of 40 rows, each a card with two labels; the timing scrolls it.""" + col = lv.obj(scr) + col.set_size(WIDTH, HEIGHT) + col.set_flex_flow(lv.FLEX_FLOW.COLUMN) + col.set_style_pad_gap(4, 0) + for i in range(40): + row = lv.obj(col) + row.set_size(lv.pct(100), 48) + row.set_style_radius(8, 0) + row.set_style_border_width(1, 0) + row.remove_flag(lv.obj.FLAG.SCROLLABLE) + title = lv.label(row) + title.set_text("Row %d" % i) + title.align(lv.ALIGN.LEFT_MID, 0, 0) + detail = lv.label(row) + detail.set_text("detail text for row %d" % i) + detail.align(lv.ALIGN.RIGHT_MID, 0, 0) + col.update_layout() + return col + + +_IMG = 128 +_img_data = None + + +def _image_dsc(): + """An RGB565 test card, 128 pixels square, made here so no file is needed.""" + global _img_data + data = bytearray(_IMG * _IMG * 2) + for y in range(_IMG): + for x in range(_IMG): + r = (x * 31) // (_IMG - 1) + g = (y * 63) // (_IMG - 1) + b = 31 if ((x // 16) + (y // 16)) & 1 else 0 + v = (r << 11) | (g << 5) | b + i = (y * _IMG + x) * 2 + data[i] = v & 0xFF + data[i + 1] = v >> 8 + _img_data = data + return lv.image_dsc_t( + { + "header": { + "magic": lv.IMAGE_HEADER_MAGIC, + "cf": lv.COLOR_FORMAT.RGB565, + "w": _IMG, + "h": _IMG, + "stride": _IMG * 2, + }, + "data_size": len(data), + "data": data, + } + ) + + +_dsc = None + + +def scene_image(scr): + """Three copies of the test card: rotated 30 degrees, scaled 1.5 times, and both.""" + global _dsc + if _dsc is None: + _dsc = _image_dsc() + scr.set_style_bg_color(lv.color_hex(0xFFFFFF), 0) + for i, (angle, scale) in enumerate(((300, 256), (0, 384), (450, 320))): + img = lv.image(scr) + img.set_src(_dsc) + img.set_pivot(_IMG // 2, _IMG // 2) + img.set_rotation(angle) + img.set_scale(scale) + img.set_antialias(True) + img.align(lv.ALIGN.LEFT_MID, (WIDTH * (2 * i + 1)) // 6 - _IMG // 2, 0) + return None + + +_TEXT = ( + "LVGL draws every glyph of this paragraph again on each refresh. " + "The quick brown fox jumps over the lazy dog; pack my box with five dozen " + "liquor jugs. Sphinx of black quartz, judge my vow. 0123456789 " +) + + +def scene_text(scr): + """Two wrapped labels filling the screen; the timing changes their text each refresh.""" + labels = [] + for i, size in enumerate((14, 24)): + label = lv.label(scr) + label.set_width(WIDTH - 16) + label.set_style_text_font(_font(size), 0) + label.set_long_mode(lv.label.LONG_MODE.WRAP) + label.set_text(_TEXT * (4 - 2 * i)) + label.align(lv.ALIGN.TOP_LEFT, 8, 8 + i * (HEIGHT // 2)) + labels.append(label) + return labels + + +SCENES = (("full", scene_full), ("list", scene_list), ("image", scene_image), ("text", scene_text)) + + +def _run_scene(name, build, disp, where): + disp.set_default() + before_build = _free() + scr = lv.obj(None) + state = build(scr) + lv.screen_load(scr) + lv.refr_now(disp) # the first draw lays it out and fills any cache + if before_build is not None and where == "render": + _report("heap_scene_%s" % name, before_build - _free(), "B") + + if name == "list": + def step(i): + state.scroll_by(0, -24 if (i // SCROLL_STEPS) % 2 == 0 else 24, _ANIM_OFF) + + us = _time_refresh(disp, step, SCROLL_STEPS) + elif name == "text": + def step(i): + for n, label in enumerate(state): + label.set_text(_TEXT * (4 - 2 * n) if i % 2 else _TEXT[1:] * (4 - 2 * n)) + + us = _time_refresh(disp, step) + else: + def step(i): + scr.invalidate() + + us = _time_refresh(disp, step) + _report("%s_%s_us" % (where, name), us, "us") + # Back to an empty screen before deleting this one. + lv.screen_load(lv.obj(None)) + scr.delete() + gc.collect() + + +targets = [("render", render_disp)] +if screen_disp is not None: + targets.append(("screen", screen_disp)) +for where, disp in targets: + for name, build in SCENES: + _run_scene(name, build, disp, where) + +if screen_disp is not None: + screen_disp.set_default() + +try: + import json + + print("BENCH_RESULT=" + json.dumps(_results)) +except ImportError: + print("BENCH_RESULT=" + repr(_results)) From 8f2e49db0f1c85d314e8807e8540f9f3648557b0 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 10 Nov 2026 23:58:48 -0600 Subject: [PATCH 2/7] lv_conf: a bad argument still raises on MicroPython LVGL 9.6 turned several asserts into argument checks, which return quietly by default. On MicroPython a failed check now also goes to the assert handler, so Python still gets RuntimeError, as the smoke test's set_tile_cnt(256) expects. CircuitPython's handler reboots into safe mode and CPython's halts, so there a failed check just returns. --- lv_conf.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lv_conf.h b/lv_conf.h index 44b7d0f..7bae37c 100644 --- a/lv_conf.h +++ b/lv_conf.h @@ -291,8 +291,19 @@ /*Argument checks: a public function given a NULL pointer, or an argument out *of range, logs (when LV_USE_LOG is on) and returns instead of dereferencing - *it. LVGL turns them on by default; set them here so the choice is ours.*/ + *it. LVGL turns them on by default; set them here so the choice is ours. + *Several of LVGL 9.5's asserts became these checks in 9.6. + * + *On MicroPython a failed check also goes to the assert handler, which raises + *RuntimeError, so a bad argument from Python still raises as it did when + *these were asserts. CircuitPython's handler reboots into safe mode and + *CPython's halts, so there the call just returns.*/ #define LV_USE_CHECK_ARG 1 +#if defined(LV_CIRCUITPYTHON_BUILD) || defined(LV_CPYTHON_BUILD) +#define LV_CHECK_ARG_ASSERT_ON_FAIL 0 +#else +#define LV_CHECK_ARG_ASSERT_ON_FAIL 1 +#endif /*Add a custom handler when assert happens e.g. to restart the MCU*/ #if defined(LV_CIRCUITPYTHON_BUILD) From bc82d4d19afc8b1d8043b6a6bbdcd00419d1c7be Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:35:20 -0600 Subject: [PATCH 3/7] fonts: generate from LVGL 9.6's moved font generator LVGL 9.6 moved built_in_font_gen.py and its font files to scripts/generators/built_in_font/, leaving the recipe list in scripts/built_in_font/generate_all.py. The script reads the recipes where they are and runs the generator where it now lives. The two CJK fonts gain the eight glyphs 9.6 added for the 24 solar terms. --- fonts/source_han_sans_sc_14_cjk.bin | Bin 161620 -> 162444 bytes fonts/source_han_sans_sc_16_cjk.bin | Bin 195484 -> 196508 bytes scripts/generate_font_bins.py | 9 +++++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fonts/source_han_sans_sc_14_cjk.bin b/fonts/source_han_sans_sc_14_cjk.bin index 71e6adf95185a427765f43cb041a73c94d350252..ff5041360c668f726bd1eba976543fcdd185ed87 100644 GIT binary patch delta 4575 zcmZwKd0bTG9>?+TGlMeX0*I(6E}$YADVw=o83`8>lw3hvDpSkM%1lY^4jHADmP%Gu zE~uH}hN7ZUI=H1JZkV}{VuTsNpn|C6azA-r_rE)@*ZZ6^bIv^Hd49j=`JI_Ft~&E? z)ma#7dM*l^Xf|wJy2N69v!AdIGUj6TEVnDh+{{j{J=d7k=~vv_Sj_NrH`{DW|K#*k z+dbB;gWm1FX(gf^6%N5cL{EDYmN~>Tpq=`6; zkX6!R+`x#{(oXoVkv>2*hJ7P#Mx(XT8#s@?-%1^%8@>pY=FhYN%b z6&QGt(4$tN^a6gwW4}uC@CTwUNz37OS(=2Cc&teJ1ox19g#n=bZ_@jyL{hP|4=sO} z(ol@plJx1m4ITadAd{$ljUeJQ!v2&Nq5`8z84rU0l9r$fBg-Twg36`&xQnqaX)oGV zNFU-l23?nSp!p4^CW;V$Q_4oeN-3q17+m5Yrb=3kI=7@3@dKWymeO$-V{g+qTHKM| z#dQq7OXFxzBTd5v*#BlQ@VQ6wa2c)cv#4PV=sPrT&dpJTcz>fk@M}Q> zD8Yc1G!Bne+z@Bcv9-~ssKK)VM*Gk%&?pVXh;CyX%4oyL+Zw%sV+e1@$ngLpf{e0I zr@hgOIF86*LXNvge9UMsT68da7k^^V<3tngA+(9ZX!iu+Mkx|Hk`DNGV!)joMrSyP z2sK)YhZqxP^gY^y8_mW=bdNAviH8^yX><@BIvahC`xy76(S8JUF-pZ%#C0VF@aSgr z8cv{dccWFX^)Q-<{QhhrdUA8z!I*#1IKp}vEkp%|MUh|Bw;N5yPw3j4o1+?|qK%HG z$NDvQ%V2G!{Qv{43X5I2C><2DlFm>6gfPaLri z?FN!O6eD&J=TU{Y1f$FZl6jAV_-BkZq6`BDa{_gSkU-?YXDHJYr_g1X(I;>rez;LK z8jdiUgp=r$X!J3vFeJ%n8@xv{!*CXzlbKqIOm#rLSB%EvAUaH;s^A(1zDmO3^BS`W<%oNo(WBK=qxWzV zPrqTb9=2&lL*d9~%vH>jJ!bj5xIzhyKRxcCGlvG?`7YtX8APNp5pf42 z-XnbQeV_270O50u7U4EV&!hAq^aG>MVExeOB^*KfkBr_&2?oz6we!iB*8++*jwAA8 zIs$z{UBxkkFEsiP*D-n#r450LjppGNlG7<|X#FXTqXYw%FiLoRM%_%$^Y?L#{le%F z9$!jpxQ^jp(p3b0MWI9y;=g7}!*3bM!6n2jr!_QLLCjE!gq4H=z8TacTtK%~6k*g_ zZS*pJMCcmAu!cC_;vo4O5`y+?jTWF1N#7C&G+9SiQHbdE6ht)0B*rK}_y%H(+Zevl zXa|~aqT_I3=w><&zb$kemk^W1T87uwC>q~t^fP*Fqk6zSoArSLblXnPQELZ1$0>B# z$-@!W91@uB-O|VL>~3l^TJE8ypcDzY!~y=_u^3Q+Vc#3&B496z0awvyAN30!PD(3I zpmQE89W_YWPZ;2JfS#fd(Ff@%+z-*yL&UIvgYd(|0mbP21B(F#Xm!NsbsR;fqf8I{ zfxbVoi0}X-exkGRJ;vNdK0@+&(4Z6}j&mOVCs_Hof^H{ST=@N@!|2IVMoUnIzNdMf z<37d}aAO3VVZvy$)VWGCM7~wz9@p^PEpCn$)hs}qN0;0DCPb|} z+!RIVcbA4xjz%?1fAmKR*41R6ZryX)=&lNODn(LH`=i|h*Ad>CYahj=IAv{WO?C8_ z=emZ@lq!2zXuH&uW=>nc9i^Cqa$oc43w5&|?K(ey&`bO@vUK-Kiu=$|;lFw;*T6>^Yvj`NI-2$7*lLF4b!H znUOnW-)U2=cFWo3&88ICJ)=8DpG>!h zMK_hxYWKG^k}0+4BqW+avBTvaDr>43kXygBnAtJ*?1;*Us0f>^y%qV-Z7fCqZ0WmG z>XgfCPpS!i^vVC^L)Xu16%Q`Zkf0{b%S^w?YEIvH5*!h|s z@AdT?ZjrKu+F##3&EF%`eW6>kGnS4OJ6%Px9I<$*OqOGP6Z?e7T%9;&`q#8(@oMFz zAXjBhrzh>UG#WPc9ItgIp=pw-XBu&VPmHGWX;o^BWwHVfTCOROtAaK;IcM2uZOggt z{7Fkt&UBZnBDY?n$RqPU%CjqybaKuAc4;yFc-N()tHPNx(rH?RI;yj3yDFx;$}E|g zIUO?BMbt=3fYv~aes>Z!L zCO79z)p%`JWBZ&0>!b~>yPDgf7FWeK7d;GYGbu2@8M$`w@t}du)^5?qVq%>pu;J5d zZSv`m<(awB?j4-kdGr3(YH+jcof@aSO5(T0SI_ec^1qq+ozt&vS_m1N;wp2M?#h{V s-P8@P|N9u}^V)&Kwi delta 3780 zcmWmHdtA?V8^`hYl_W_+kwel?TIR-5yPd^y>~=~PN^?65+t_Tz#!f$Gvy+YOhdIvq zJUN7)(~v_><+RK(qN$|i(196qzwSSt-^cgy_|)fcUDxOO){L^sS;duSMOf1xT8y?8 zTjtO4NR6n_$5N+w=2+@*uj%G0tklru=l!v3hW8WKjLJEcC)AS0jvFy-LFz=GKyT;T z#gcxO;;|Femq;HV8|{}$3t`Kop-4y5<ITt=tu(vRDn(j#65?%)Sd(=C03%jmRIS`FV_(iogY z#BOOW%Fum}v=MdpO5<@Dp}$HKk%g#zL<)uIykA-lJ3u6nj=(hOeJ79e2tO!I#&tv= zk{06$5)Mmy;5Z_Ei9B>omwv)M^f)T5f!8szij!z@oN+wGh!fI5I8O5WD8;Z0=@eed zBpogu577CPv@C;ynl+ql^QEQmDv(CvFhXxr(!OL z??~UH6iG$W0W|wla^V366-)cj=&m#kx6$_=rHO$1(p2Q5+XLwr)F_cAl@NmqymTlf z0r(rk%A})cR?g&jfPN1pHyS;XzQJw8{3Wf0-(%_;H_-iW$`bxhr2g1|3Qsu%_MqxN z(kL83{b$n0&z#Z~US5*Pg*)hCrWNq;FeM=sz7aMj79T@}*;$k#Lq8E8|L3GfgD{7l;s@SN#AoI{gp zrmsHXMz%(7V(50qnJ*w3*y^mZt;{r{a;8)x97Jfry9n%lE zhrV@L90B!AQ&EiGK|}?0>N5duAv%}^;nTo09LLZ+#55ZvNOYKXBCsKg<2>4hnp4X{ zIe8;ajtoSGnZCsz=WKcO56 zElt}{x0PuMuA^&f(@OZXF@1n+v~No-z`GrDBeMsOsP?A$@ajO3;V_y+lV9A#%NoJ9Rtl7Q22{D;IN z17SUh6LJyLi{#-k5_^+81ovSa$KmKp@^Kao<0y_el9|R!NIwQ}4ISc5b5Vfq{V7xU zzG8X}htM#=^cC{aae!$RJO`Ra;5Zr&GJT0W^h%_{;FDx}1IN&OFq=dP;*&|{&SZA^ zs_7k^M)M)2?@)yJ|1yr?p_~G_h#h8Hi%P?Z0@4vSf^p;`<~7FQHJU#p(sS> z(L@^FuQTrCk%_1`s21GEz&A}h5HyDFfE#E#mW1OOhP*{rLFn5g90f=iXF3SSJDeV+ zNP5?F6b;6kK1DWOc#r6z7`-PD^;JBcqVGg5Edt&*eTW>i{(y4DQzTDf0W_X$`W~f7 z`p|R$&wph40(a2wW73CW^!~)O8zG<4QBZ{V|3@6vrqB|nkpEM>G@Hr=#U1qfjJt$d z(@YbQg{aSo4(=oF3oax4rkf_T5QFG7SHQ+#}>$PK;~lGK1DO zgM3x{j>^VW#C%U*g=UglWFT@DeH9gdFpa?pMEuC)D8pcvDGedBIVEnP=Nu+SwYi+q zbvDS~Icgq_5|Q(1l(>gi7f{l8VWDXzit)-KW<&U5st}Jc^k=FFVN0kY6e4aZMS`GZ zrjKv~-Io&v_^zO<<07J0(o$9uXP;Hv0USg4Y9>bs64%i15Vn>QMlNF3QNpOSo+gV7 zL~bxGLB(IVi#UOZjcgoc7@We!5x$8qpa}7sNj8GFbY$`^>>P1h**StzDQ^^@&o-JN z>TahQA`iWGn6{$2n`Y>81p7Nj@8Ytc?QXgoy!O!Da1Jf@QmZIO!mp-1aO`6?B*;OVqm&08V!$zK z6W+(U+DJ!(6Wl&zqy0(KLU?B|j!Z;lQrjp*%TuN~$Va!+^fq{&F};a1XPn%=vs`bK zBI%rI7i#}Te2|UKS*CS(?mU+VS!nw^tpm?6@&exqgkGd|;4YFcaq|&ynZFfq39Ya2 zt$^oM7RMnpbY{~#kdJQH*d3}|=VO91Xqm&O7aliE!|*%8Z&D4ofEu~nJ``clAEqO4 z+@hUeFFf+Nh&YN``IJ4<(V)OI3C@E&9Jd+35Sn6_d6&cs1%DRH^YqrR~WC77>wI>L)?lI#Wlpn1q2mbXUf}^Y_rfT zbLpCz*EG9XVsVqHEKMnwvP`Yi%-okS#YDZYq2KTE`2F)c51;2fpEGC9Ip5_RJj<_# zEWZ=7sDtVHVq&g&>))>~u_kg$TgO0Sj%=A7aNL;RwhXVkz?e5mj|aA}CbKjkXpZeO zywn?1<7hj+N9pX~#;o3wQ!ggS^V}{e_zP(+ZeaRu5_9*Em|iJe!Q?Nc zGsyW$`W_GOC6T>PI*y$EBr*?3hmrBMv>O@UkjOYF9YE%{Br?8Z`*-pv2+xtqN=555O_nH1N}jw8k29* z&FEbtZ9=nK(hA&F+AE^H=YasD_Yq&mXayW~jq-8cpMgeKkrib0BeH@?WYshJ7Fi)A zhJ+e@g?{yoK1cTkM%&?RXtWtE!i-iS<}RZb5OTNC0yx5rN1kv_hG7v#2hlgu=reSS z;=&N$hzmpGXrq7NCMGmCI*Lb|7=435F-Db0`is%qNVyjf;$*J1(Rqr-NWjN|3eaq9H-G4`VO)2kLrCvo^a0xS zG}?fBdl|ikMt?K)ttkILWjalR9CAc5s zEXL{R}VA9;mzB?eF97DJcmB)ZJtphzmBYmrb)@1V&{qnFWS7RQETHi;Tcox`NQ zz-sDTx*jv(XW{JF^O@X82yCd zpVE_iS@qw+Y(Uq~jJBcU=Oo(fH2No^c5zZfeL*5>x6w;zu!lrcCEF48B{c%S;^J@z zv-k3}!L)rOChaFN?Eraz@t^j!Q8ng#!{g~7U!dBb-}3xJ#&`4(QV-EHi2L5C6paoW zJ%hj_oD7$deUyEX_JdJ5(tc#@k^B>h4#!BuALmhr_!Ayx_z7k-@_uFxAorxv&&d6S z8hNLvG3r;NuhIK72S@ue{8hkRXZfoDbB;d-ID_o-j5B&&;CYO;7wJjdbBTvHA}=$q z5b3$X21Nd5^fc;M89jkp{=8~b=Xaw5T!i}?H#OYXNw}-o4)+bCU-0-JMi=n-O>TCK ztzkd7Z;^1{W`DTv@HoUQS$VFpDlk?TQD8~99ag8{4xom+4vB)gR@YDvNDX%o33o6F zcRhZGu^}YJhLUjC=X(@1poY64iLqhUqf=pgxXbECjJ=yLFgBbTSrJxy(La(z|0oi} z8(Dpa{?S%D(W9|d1yY(=mBATfwHdAdV)Z6s?y*{m@TOKTApBkuj#v*}5X*;VBpl62 z+(c0et11+=q()II5}r8ryU%I?9QTt5iRXX_PaqM}n(c73AraD+L`XXlA??`@A)XF= zKu98q@FcDjF;1&hi0Ekb3L^e$wFnWNs1ebb8WG7PLLaayK@Ez#SY1VN3W?&bB=R4$ zI*$pdRtM2NjmB(d73s2?jnf#>&FT;abhr8fy?R)Ej7~kR-okyotlmKM->eoRtT&0U zJ|x2Wl8Ej{BB;OB6r9B)=~g@78ep{v%`zDOB^g$Y2UGIIHse2Pq*W!ljk5X- zgGXC^iN0e<^c~A~bQ@>&5gvHV>V0&}v0979el|BR!w}Fm0;Ub_5kL4^RVdAwxLL>PcL~ zi0M|JAZ~`$Lfl3{k<|&56f+0#kD1((NX?wZ0TDNwAwa7+R!`#=UYcvwU>-llHxRwm z23;`&+dNwi#4g-fdhfG!J0R(Zf^6}rlYC@d1JIK%{%^A9LIZhbl}$| zYEs=}P~gW`mArPZH_+G4rH1SHT`)V=P;(r6>(Aq~Sarx!+u|ou#su|rl?BO6oPB3k z1iSbbmpSbsqPJw9etw{*x~qR%?NTf?bn&U!Uc7Ye;;yg{!=A0Itn{_H(X#gIj>R24 z<>en~T5&9Uw$<`t)h6rO?PP#sk^lFKpFiL+e^xuvJNi@{xX6(nP94R6i);zo9lTa@ z9oM(1>|$s0RDmbhrB>dKUT*q?GWYhgUbU>e7IQ<%Nug-?k+l@I+-_DI)%4;z9~x!v=xC%Kg=@qJZj)m zpi8!_V(RsZ=?o07y-zNdnK7v>x|PehK~=rCEn%WWU}w@=I@g7BwyXju8=i~@u@Y1=|Zc#QlotdJN*02^#7A750YX|`#O)i zSzcao?r2a$c4_GK!k_;~NlD34e_iEtcJ})Fg;5HS%6@8Vhd$`JzRg}Qnq5{jS{&Lx zi=9qqN};n;kD&eaBK8MQ=&QMZm#mu4Yo$9 z7ccEIg;ziImshLbpGSEk(A(Qz`ihm}bUy1J5{J{7R_JW0(8|hN>6Mk<(OuS!pSNy& zfh*a)zIx@q4!dI0E0aqq_q#MWY{bYHxol^Wwx1fUyIu8Oo8B;5;qJGOhEMe>pfo_a zg`tYvGi>v*UKJ&gd$NZnZMf`>-0hnm!O(4P-)=#tOKnuvVWM4{SpVcmX<|;n6bF~S dy6oU`yQ{ud7S1c delta 3778 zcmWmHdwh=dAII_c=R3P?ra4U5ma(mt?RMBnv4t5~4U1tkZ8>xcGjm$Q)V)-abh4-r zmD1rS(rESToJ2%9MwSH{*R|{V90Vp8 z?uA9JDls6(swx^BwyM#dxmJ0iVN7Lc(Co?uLG_gjf)58zZz)YI88d20RcWKhApav< zq>Cv1S~`u=t&~x^jWUYAk!s-EE*-(p9nww={Z=}Fg72tD!A@xx@^(pE(RVkAzI#aI z?BzOg_EARP{p5c6)$@DlLv%hMEko;r(z9s#1Buo@lCYno`*8we4@n16__MSPT@Op^ z(f)|E8ts3PUPZHCr3Y{cB}b*B82OvD7n#STua5aSIWB#I%-=~Q*GOxSaDqh4AJTF} zoRk)$`Jd7ZoV}WVkr;JK+K1kMOP?bBw6qr2|0B(Z=ZrK9=P~sx_agV4wBt4ospq97 zXn8?eh=#S&L#V~NV&iW2X!7GE#(79g zZfM$v{2&tf!6b4Uk;n}(?Lc;8(^ts6#`Fo&LQQMoZDLx1$fl;}5Yo)_C<2=EF4Q$Q zzs7}`_F_;A(X3kM^5p#F)-vaxA^Zxa(;U2HjxVj$Uyz2uU}ZHXy0J>1`y% zlZa2Cp@{dAi0?o>qC1*iM0h9DA_R9fJpxNKmE!c(^e1rwU$UtNz7*3D6r_^ybs^!q ziR&o7nfp=Pl`?$YNchsY4|(aPUC6t|bP$EzO}}7l57Q4w>1lca*JPMx!GE5^m|mvu z(LdAl0Xp?Iy@j@YOiR(~R@1{!U(;;-je;y*gsj_4>ydany+?Gm=}DZ$gIH9^%;k@eJeWB}!VnTMLru%kJdbsOOPDl_ zULtR}X)Ai%X?hoN`KDJ8H-Zi!?k>uRDt8WwCN<$N_i-f?_+3@P{!yWVuookB4+Yz1k55)k16G* zKQU!Ci~AghnfEgVnDPKqfYFS~F-)kS$H;$>M87$v&FK9QiS&m})s-K&ZslM5DE*p8 zzYzNvyB=Zl*=z`SoMnc91vCNmsCa_Jj3-G{JVm17X_|)d&yX0ukS`6gE9ovWpQXD< zUPK~oG4+dCMQP7*0`K#DdfzD1M3k zgN&C=A0hq~mN&vzvYAl_|Ena*USq84UZY}_=_mAlopC{%H%yNq@J;p$4j|_(mMC)m zXWEFHSDRL&{o5qM*O;C_@LJRTxQOC+*yJc!$1~u2m&PHlif19mzn&BH*uc6++cMcif*aa%}4ea)Uj)KRPjRP3Pw+ROJ22a&grkwK6Bj11a-Z(4~~2Y4Bp9OPlB zLEaChZOHnOM8;31FOhMGHGqtt`2j%EVG?0SSkS0D;%5>3!eTq)-H=<=s&9XkF+qRS}~H~ejS6K(vb z`KqJMKc<%vdWO#!JZJfg!E=s;=REcBTrfR|z*-h40x$BJ!xhZA#PvE7o_g+w=Q2A3 zEw7LW{g--#%4t6Q9&?%lkD~&f01}}MoE9Q9kTN_T5}t-6JVE>&u3XJv5_1|+AHsEn zHl_^EH6%QtB(7Y|CX}0!O`Ts?IGNSV=@g2ZlPC%!QQpGo0*bD6I*u_doqooMR!;jd zxV6)_=ojv^8R-#D)kukST8otHNW`{rT7lRo60vPbM7HxgJ=e}DESf}Q42j5CZb0ny zPOl^O1`^&l9*C41NqE~+kJxw;-UJd}F9~l4?t`}@32!G7DV=F3(*21}pCUEM>3yUo zJH3O{6v{|VrHs@rBs$#W^aifG+39(-=t`nRHxez9i4DdpoU1VjmKTw~|QgOQLHQiT1ZSJ&8uQJC)%m zMrJ$h!SH@g+tI7P(*|@KKq4uJ`Cpae6my5uD#Q#VkuZovOfHF-!6Xufkcb&dA|cOd z4HAY?M$B-h<%qbGL_|J`kP%K5XmA&!gT@7n4jLCS|MLpDa5p!g9y3NdokhhcdV%4i zoj!sa<1`nI?r~axrataLgRxE-cpe?@zo5 zk5A;rVy7xxM%E-&IMPd49~d&(>2q|M!W_b;GG+K0-KRONL-cfZ0lcM7o6zw-UX07| zl`#dlXNJ=j+%nT?C!z+-;*Swl?$i@SD8~lWmRGsx`J1bn);x7bb!0c2H?_LeYWw`I z>i)rQYs2b=&D^1=>XV5suX}ZDiCdHusy&5Lk#Fjx0P$Z=^`@8HiooiLtK6c%>fqI` Ga`1o7SgsoY diff --git a/scripts/generate_font_bins.py b/scripts/generate_font_bins.py index d1e3df6..0234bed 100755 --- a/scripts/generate_font_bins.py +++ b/scripts/generate_font_bins.py @@ -39,6 +39,11 @@ REPO_ROOT = Path(__file__).resolve().parent.parent BUILT_IN_FONT_DIR = REPO_ROOT / "lvgl" / "scripts" / "built_in_font" +# LVGL 9.6 moved the generator and its font files to scripts/generators/, +# leaving the os.system() recipe list where it was. +FONT_TOOL_DIR = REPO_ROOT / "lvgl" / "scripts" / "generators" / "built_in_font" +if not FONT_TOOL_DIR.is_dir(): + FONT_TOOL_DIR = BUILT_IN_FONT_DIR FONTS_DIR = REPO_ROOT / "fonts" FONTAWESOME = "FontAwesome5-Solid+Brands+Regular.woff" @@ -76,7 +81,7 @@ def os_system_commands(path): def fontawesome_codepoints(): """The built-in symbol set, from built_in_font_gen.py's `syms = "..."`.""" - src = (BUILT_IN_FONT_DIR / "built_in_font_gen.py").read_text(encoding="utf-8") + src = (FONT_TOOL_DIR / "built_in_font_gen.py").read_text(encoding="utf-8") match = re.search(r'^syms\s*=\s*"([0-9,]+)"', src, re.MULTILINE) if not match: sys.exit("error: FontAwesome symbol list not found in built_in_font_gen.py") @@ -165,7 +170,7 @@ def main(): print(f"Generating {out.relative_to(REPO_ROOT)}") subprocess.run( conv + args + ["--format", "bin", "-o", str(out)], - cwd=BUILT_IN_FONT_DIR, + cwd=FONT_TOOL_DIR, check=True, ) From f77c4233e4827f06ff0c96b7ff65c365590f2132 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:52:54 -0600 Subject: [PATCH 4/7] binding: leave LVGL's *_internal helpers out of the API LVGL 9.6's private headers add 164 inline helpers named *_internal, mostly lv_obj_get_style_*_internal. All but one back a public function of the same name without the suffix, so Python gains nothing from them. Leaving them out takes 17.7 KB off an ESP32-S3 image and 15.3 KB off the Arduino GIGA's, and about 6 KB of names off CircuitPython's qstr pool. The API is 2,317 functions. --- binding/api_policy.py | 6 + generated/api.json | 1244 +- generated/lvgl.pyi | 164 - generated/lvgl_circuitpython.c | 14763 ++++++------- generated/lvgl_micropython.c | 14667 ++++++------- generated/lvgl_python.c | 35525 ++++++++++++++----------------- 6 files changed, 30158 insertions(+), 36211 deletions(-) diff --git a/binding/api_policy.py b/binding/api_policy.py index 1460f3d..f788dd4 100644 --- a/binding/api_policy.py +++ b/binding/api_policy.py @@ -166,6 +166,12 @@ def function(self, name: str) -> PolicyDecision: return PolicyDecision("private", reason=unsupported.reason) if not name.startswith(self.module_prefix + "_"): return PolicyDecision("private", reason="outside module prefix") + if name.endswith("_internal"): + # Inline helpers from LVGL's private headers (LVGL 9.6 has 164, + # mostly lv_obj_get_style_*_internal). Each one but + # lv_font_get_glyph_dsc_internal backs a public function of the + # same name without the suffix, so binding them only costs flash. + return PolicyDecision("private", reason="LVGL-internal helper") return PolicyDecision( "public", available_on=self._available_on(name), diff --git a/generated/api.json b/generated/api.json index 4735482..fab6db0 100644 --- a/generated/api.json +++ b/generated/api.json @@ -1,5 +1,5 @@ { - "api_hash": "3a06d8cf5faf1688f83f0d4a1ced36659d59f4881285bd53c2969e40061ae103", + "api_hash": "af91095e37fe3705cd9a2da008224dcfc665ce05aa9d6622f8e99b6e5f8d349e", "constants": [ { "available_on": [ @@ -21536,6 +21536,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "bidi_calculate_align_internal", "return_type": { "kind": "primitive", @@ -21552,7 +21553,7 @@ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -54513,6 +54514,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "unit_draw_letter_internal", "receiver": "draw_task_t", "return_type": { @@ -54528,7 +54530,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -59200,6 +59202,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_bottom_trim_internal", "receiver": "font_t", "return_type": { @@ -59217,7 +59220,7 @@ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -59388,6 +59391,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_glyph_bitmap_internal", "receiver": "font_glyph_dsc_t", "return_type": { @@ -59409,7 +59413,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -59721,6 +59725,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_glyph_dsc_internal", "receiver": "font_t", "return_type": { @@ -59736,7 +59741,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -59831,6 +59836,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_glyph_static_bitmap_internal", "receiver": "font_glyph_dsc_t", "return_type": { @@ -59852,7 +59858,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -60015,6 +60021,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_glyph_width_internal", "receiver": "font_t", "return_type": { @@ -60030,7 +60037,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -60127,6 +60134,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_line_height_internal", "receiver": "font_t", "return_type": { @@ -60144,7 +60152,7 @@ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -60275,6 +60283,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_top_trim_internal", "receiver": "font_t", "return_type": { @@ -60292,7 +60301,7 @@ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -60459,6 +60468,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "release_draw_data_internal", "receiver": "font_glyph_dsc_t", "return_type": { @@ -60474,7 +60484,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -60571,6 +60581,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "has_static_bitmap_internal", "receiver": "font_t", "return_type": { @@ -60588,7 +60599,7 @@ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -90544,8 +90555,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "calculate_style_text_align_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_text_align_t" @@ -90555,13 +90567,13 @@ "conversion": "enum_int", "python_type": "TEXT_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -94198,8 +94210,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_align_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_align_t" @@ -94209,13 +94222,13 @@ "conversion": "enum_int", "python_type": "ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -94424,8 +94437,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_anim_duration_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "uint32_t" @@ -94435,13 +94449,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -94500,8 +94514,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_anim_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -94517,13 +94532,13 @@ "conversion": "struct_pointer", "python_type": "anim_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -94726,8 +94741,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_arc_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -94737,13 +94753,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -94802,8 +94818,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_arc_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -94813,13 +94830,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -94956,8 +94973,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_arc_image_src_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -94973,13 +94991,13 @@ "conversion": "opaque", "python_type": "Any" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -95110,8 +95128,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_arc_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -95121,13 +95140,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -95258,8 +95277,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_arc_rounded_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "primitive", "name": "bool" @@ -95269,13 +95289,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -95406,8 +95426,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_arc_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -95417,13 +95438,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -95554,8 +95575,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_base_dir_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_base_dir_t" @@ -95565,13 +95587,13 @@ "conversion": "enum_int", "python_type": "BASE_DIR | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -95774,8 +95796,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -95785,13 +95808,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -95850,8 +95873,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -95861,13 +95885,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -96148,8 +96172,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_grad_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -96159,13 +96184,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -96224,8 +96249,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_grad_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -96235,13 +96261,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -96372,8 +96398,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_grad_dir_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_grad_dir_t" @@ -96383,13 +96410,13 @@ "conversion": "enum_int", "python_type": "GRAD_DIR | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -96448,8 +96475,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_grad_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -96465,13 +96493,13 @@ "conversion": "struct_pointer", "python_type": "grad_dsc_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -96602,8 +96630,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_grad_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -96613,13 +96642,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -96750,8 +96779,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_grad_stop_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -96761,13 +96791,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -96898,8 +96928,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_image_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -96909,13 +96940,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -97118,8 +97149,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_image_recolor_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -97129,13 +97161,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -97194,8 +97226,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_image_recolor_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -97205,13 +97238,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -97342,8 +97375,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_image_recolor_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -97353,13 +97387,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -97496,8 +97530,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_image_src_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -97513,13 +97548,13 @@ "conversion": "opaque", "python_type": "Any" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -97650,8 +97685,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_image_tiled_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "primitive", "name": "bool" @@ -97661,13 +97697,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -97798,8 +97834,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_main_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -97809,13 +97846,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -97946,8 +97983,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_main_stop_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -97957,13 +97995,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -98094,8 +98132,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bg_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -98105,13 +98144,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -98248,8 +98287,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_bitmap_mask_src_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -98265,13 +98305,13 @@ "conversion": "opaque", "python_type": "Any" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -98402,8 +98442,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_blend_mode_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_blend_mode_t" @@ -98413,13 +98454,13 @@ "conversion": "enum_int", "python_type": "BLEND_MODE | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -98550,8 +98591,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_blur_backdrop_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "primitive", "name": "bool" @@ -98561,13 +98603,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -98698,8 +98740,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_blur_quality_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_blur_quality_t" @@ -98709,13 +98752,13 @@ "conversion": "enum_int", "python_type": "BLUR_QUALITY | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -98846,8 +98889,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_blur_radius_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -98857,13 +98901,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -99066,8 +99110,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_border_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -99077,13 +99122,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -99142,8 +99187,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_border_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -99153,13 +99199,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -99290,8 +99336,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_border_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -99301,13 +99348,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -99438,8 +99485,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_border_post_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "primitive", "name": "bool" @@ -99449,13 +99497,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -99586,8 +99634,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_border_side_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_border_side_t" @@ -99597,13 +99646,13 @@ "conversion": "enum_int", "python_type": "BORDER_SIDE | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -99734,8 +99783,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_border_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -99745,13 +99795,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -99986,8 +100036,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_clip_corner_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "primitive", "name": "bool" @@ -99997,13 +100048,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -100140,8 +100191,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_color_filter_dsc_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -100157,13 +100209,13 @@ "conversion": "struct_pointer", "python_type": "color_filter_dsc_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -100294,8 +100346,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_color_filter_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -100305,13 +100358,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -100514,8 +100567,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_drop_shadow_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -100525,13 +100579,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -100590,8 +100644,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_drop_shadow_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -100601,13 +100656,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -100738,8 +100793,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_drop_shadow_offset_x_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -100749,13 +100805,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -100886,8 +100942,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_drop_shadow_offset_y_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -100897,13 +100954,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -101034,8 +101091,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_drop_shadow_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -101045,13 +101103,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -101182,8 +101240,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_drop_shadow_quality_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_blur_quality_t" @@ -101193,13 +101252,13 @@ "conversion": "enum_int", "python_type": "BLUR_QUALITY | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -101330,8 +101389,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_drop_shadow_radius_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -101341,13 +101401,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -101570,8 +101630,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_flex_cross_place_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_flex_align_t" @@ -101581,13 +101642,13 @@ "conversion": "enum_int", "python_type": "FLEX_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -101718,8 +101779,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_flex_flow_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_flex_flow_t" @@ -101729,13 +101791,13 @@ "conversion": "enum_int", "python_type": "FLEX_FLOW | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -101866,8 +101928,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_flex_grow_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "uint8_t" @@ -101877,13 +101940,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -102014,8 +102077,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_flex_main_place_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_flex_align_t" @@ -102025,13 +102089,13 @@ "conversion": "enum_int", "python_type": "FLEX_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -102162,8 +102226,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_flex_track_place_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_flex_align_t" @@ -102173,13 +102238,13 @@ "conversion": "enum_int", "python_type": "FLEX_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -102310,8 +102375,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_cell_column_pos_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -102321,13 +102387,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -102458,8 +102524,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_cell_column_span_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -102469,13 +102536,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -102606,8 +102673,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_cell_row_pos_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -102617,13 +102685,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -102754,8 +102822,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_cell_row_span_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -102765,13 +102834,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -102902,8 +102971,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_cell_x_align_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_grid_align_t" @@ -102913,13 +102983,13 @@ "conversion": "enum_int", "python_type": "GRID_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -103050,8 +103120,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_cell_y_align_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_grid_align_t" @@ -103061,13 +103132,13 @@ "conversion": "enum_int", "python_type": "GRID_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -103198,8 +103269,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_column_align_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_grid_align_t" @@ -103209,13 +103281,13 @@ "conversion": "enum_int", "python_type": "GRID_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -103352,8 +103424,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_column_dsc_array_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -103369,13 +103442,13 @@ "conversion": "typed_buffer", "python_type": "Any" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -103506,8 +103579,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_row_align_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_grid_align_t" @@ -103517,13 +103591,13 @@ "conversion": "enum_int", "python_type": "GRID_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -103660,8 +103734,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_grid_row_dsc_array_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -103677,13 +103752,13 @@ "conversion": "typed_buffer", "python_type": "Any" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -103814,8 +103889,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_height_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -103825,13 +103901,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -103968,8 +104044,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_image_colorkey_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -103985,13 +104062,13 @@ "conversion": "struct_pointer", "python_type": "image_colorkey_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -104122,8 +104199,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_image_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -104133,13 +104211,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -104342,8 +104420,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_image_recolor_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -104353,13 +104432,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -104418,8 +104497,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_image_recolor_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -104429,13 +104509,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -104566,8 +104646,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_image_recolor_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -104577,13 +104658,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -104714,8 +104795,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_layout_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "uint16_t" @@ -104725,13 +104807,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -104862,8 +104944,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_length_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -104873,13 +104956,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -105082,8 +105165,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_line_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -105093,13 +105177,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -105158,8 +105242,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_line_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -105169,13 +105254,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -105306,8 +105391,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_line_dash_gap_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -105317,13 +105403,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -105454,8 +105540,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_line_dash_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -105465,13 +105552,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -105602,8 +105689,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_line_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -105613,13 +105701,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -105750,8 +105838,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_line_rounded_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "primitive", "name": "bool" @@ -105761,13 +105850,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -105898,8 +105987,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_line_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -105909,13 +105999,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -106046,8 +106136,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_margin_bottom_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -106057,13 +106148,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -106194,8 +106285,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_margin_left_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -106205,13 +106297,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -106342,8 +106434,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_margin_right_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -106353,13 +106446,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -106490,8 +106583,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_margin_top_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -106501,13 +106595,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -106638,8 +106732,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_max_height_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -106649,13 +106744,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -106786,8 +106881,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_max_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -106797,13 +106893,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -106934,8 +107030,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_min_height_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -106945,13 +107042,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -107082,8 +107179,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_min_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -107093,13 +107191,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -107230,8 +107328,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -107241,13 +107340,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -107378,8 +107477,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_opa_layered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -107389,13 +107489,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -107670,8 +107770,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_outline_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -107681,13 +107782,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -107746,8 +107847,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_outline_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -107757,13 +107859,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -107894,8 +107996,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_outline_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -107905,13 +108008,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -108042,8 +108145,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_outline_pad_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -108053,13 +108157,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -108190,8 +108294,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_outline_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -108201,13 +108306,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -108338,8 +108443,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_pad_bottom_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -108349,13 +108455,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -108486,8 +108592,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_pad_column_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -108497,13 +108604,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -108634,8 +108741,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_pad_left_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -108645,13 +108753,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -108782,8 +108890,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_pad_radial_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -108793,13 +108902,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -108930,8 +109039,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_pad_right_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -108941,13 +109051,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -109078,8 +109188,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_pad_row_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -109089,13 +109200,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -109226,8 +109337,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_pad_top_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -109237,13 +109349,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -109406,8 +109518,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_prop_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_style_value_t" @@ -109417,11 +109530,11 @@ "conversion": "struct_value", "python_type": "style_value_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -109552,8 +109665,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_radial_offset_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -109563,13 +109677,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -109700,8 +109814,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_radius_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -109711,13 +109826,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -109848,8 +109963,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_recolor_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -109859,13 +109975,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -109996,8 +110112,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_recolor_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -110007,13 +110124,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -110216,8 +110333,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_rotary_sensitivity_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "uint32_t" @@ -110227,13 +110345,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -110436,8 +110554,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_shadow_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -110447,13 +110566,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -110512,8 +110631,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_shadow_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -110523,13 +110643,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -110660,8 +110780,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_shadow_offset_x_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -110671,13 +110792,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -110808,8 +110929,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_shadow_offset_y_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -110819,13 +110941,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -110956,8 +111078,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_shadow_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -110967,13 +111090,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -111104,8 +111227,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_shadow_spread_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -111115,13 +111239,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -111252,8 +111376,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_shadow_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -111263,13 +111388,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -111400,8 +111525,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_space_bottom_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -111411,13 +111537,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -111548,8 +111674,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_space_left_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -111559,13 +111686,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -111696,8 +111823,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_space_right_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -111707,13 +111835,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -111844,8 +111972,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_space_top_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -111855,13 +111984,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -111992,8 +112121,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_align_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_text_align_t" @@ -112003,13 +112133,13 @@ "conversion": "enum_int", "python_type": "TEXT_ALIGN | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -112212,8 +112342,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -112223,13 +112354,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -112288,8 +112419,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -112299,13 +112431,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -112436,8 +112568,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_decor_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_text_decor_t" @@ -112447,13 +112580,13 @@ "conversion": "enum_int", "python_type": "TEXT_DECOR | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -112590,8 +112723,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_font_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -112607,13 +112741,13 @@ "conversion": "struct_pointer", "python_type": "font_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -112744,8 +112878,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_leading_trim_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_text_leading_trim_t" @@ -112755,13 +112890,13 @@ "conversion": "enum_int", "python_type": "TEXT_LEADING_TRIM | int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -112892,8 +113027,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_letter_space_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -112903,13 +113039,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -113040,8 +113176,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_line_space_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -113051,13 +113188,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -113188,8 +113325,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -113199,13 +113337,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -113408,8 +113546,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_outline_stroke_color_filtered_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -113419,13 +113558,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -113484,8 +113623,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_outline_stroke_color_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_color_t" @@ -113495,13 +113635,13 @@ "conversion": "struct_value", "python_type": "color_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -113632,8 +113772,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_outline_stroke_opa_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_opa_t" @@ -113643,13 +113784,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -113780,8 +113921,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_text_outline_stroke_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -113791,13 +113933,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -113928,8 +114070,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_height_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -113939,13 +114082,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -114076,8 +114219,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_pivot_x_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -114087,13 +114231,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -114224,8 +114368,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_pivot_y_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -114235,13 +114380,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -114372,8 +114517,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_rotation_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -114383,13 +114529,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -114520,8 +114666,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_scale_x_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -114531,13 +114678,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -114668,8 +114815,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_scale_x_safe_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -114679,13 +114827,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -114816,8 +114964,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_scale_y_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -114827,13 +114976,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -114964,8 +115113,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_scale_y_safe_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -114975,13 +115125,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -115112,8 +115262,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_skew_x_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -115123,13 +115274,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -115260,8 +115411,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_skew_y_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -115271,13 +115423,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -115408,8 +115560,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transform_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -115419,13 +115572,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -115562,8 +115715,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_transition_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "pointer", "target": { @@ -115579,13 +115733,13 @@ "conversion": "struct_pointer", "python_type": "style_transition_dsc_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -115716,8 +115870,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_translate_radial_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -115727,13 +115882,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -115864,8 +116019,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_translate_x_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -115875,13 +116031,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -116012,8 +116168,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_translate_y_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -116023,13 +116180,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -116160,8 +116317,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_width_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -116171,13 +116329,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -116308,8 +116466,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_x_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -116319,13 +116478,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -116456,8 +116615,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_style_y_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "int32_t" @@ -116467,13 +116627,13 @@ "conversion": "integer", "python_type": "int" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -141564,8 +141724,9 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "style_apply_color_filter_internal", - "receiver": "obj", + "receiver": "obj_t", "return_type": { "kind": "identifier", "name": "lv_style_value_t" @@ -141575,11 +141736,11 @@ "conversion": "struct_value", "python_type": "style_value_t" }, - "role": "object_method", + "role": "struct_method", "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -157958,6 +158119,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "get_prop_internal", "receiver": "style_t", "return_type": { @@ -157975,7 +158137,7 @@ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -158124,6 +158286,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "is_const_internal", "receiver": "style_t", "return_type": { @@ -158141,7 +158304,7 @@ "static" ], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -174540,6 +174703,7 @@ } } ], + "policy_reason": "LVGL-internal helper", "python_name": "text_get_size_internal", "return_type": { "kind": "primitive", @@ -174554,7 +174718,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "public" + "visibility": "private" }, { "available_on": [ @@ -183093,7 +183257,6 @@ "calc_dynamic_width", "calculate_ext_draw_size", "calculate_style_text_align", - "calculate_style_text_align_internal", "center", "check_type", "class_create_obj", @@ -183149,306 +183312,158 @@ "get_sibling_by_type", "get_state", "get_style_align", - "get_style_align_internal", "get_style_anim", "get_style_anim_duration", - "get_style_anim_duration_internal", - "get_style_anim_internal", "get_style_arc_color", "get_style_arc_color_filtered", - "get_style_arc_color_filtered_internal", - "get_style_arc_color_internal", "get_style_arc_image_src", - "get_style_arc_image_src_internal", "get_style_arc_opa", - "get_style_arc_opa_internal", "get_style_arc_rounded", - "get_style_arc_rounded_internal", "get_style_arc_width", - "get_style_arc_width_internal", "get_style_base_dir", - "get_style_base_dir_internal", "get_style_bg_color", "get_style_bg_color_filtered", - "get_style_bg_color_filtered_internal", - "get_style_bg_color_internal", "get_style_bg_grad", "get_style_bg_grad_color", "get_style_bg_grad_color_filtered", - "get_style_bg_grad_color_filtered_internal", - "get_style_bg_grad_color_internal", "get_style_bg_grad_dir", - "get_style_bg_grad_dir_internal", - "get_style_bg_grad_internal", "get_style_bg_grad_opa", - "get_style_bg_grad_opa_internal", "get_style_bg_grad_stop", - "get_style_bg_grad_stop_internal", "get_style_bg_image_opa", - "get_style_bg_image_opa_internal", "get_style_bg_image_recolor", "get_style_bg_image_recolor_filtered", - "get_style_bg_image_recolor_filtered_internal", - "get_style_bg_image_recolor_internal", "get_style_bg_image_recolor_opa", - "get_style_bg_image_recolor_opa_internal", "get_style_bg_image_src", - "get_style_bg_image_src_internal", "get_style_bg_image_tiled", - "get_style_bg_image_tiled_internal", "get_style_bg_main_opa", - "get_style_bg_main_opa_internal", "get_style_bg_main_stop", - "get_style_bg_main_stop_internal", "get_style_bg_opa", - "get_style_bg_opa_internal", "get_style_bitmap_mask_src", - "get_style_bitmap_mask_src_internal", "get_style_blend_mode", - "get_style_blend_mode_internal", "get_style_blur_backdrop", - "get_style_blur_backdrop_internal", "get_style_blur_quality", - "get_style_blur_quality_internal", "get_style_blur_radius", - "get_style_blur_radius_internal", "get_style_border_color", "get_style_border_color_filtered", - "get_style_border_color_filtered_internal", - "get_style_border_color_internal", "get_style_border_opa", - "get_style_border_opa_internal", "get_style_border_post", - "get_style_border_post_internal", "get_style_border_side", - "get_style_border_side_internal", "get_style_border_width", - "get_style_border_width_internal", "get_style_clamped_height", "get_style_clamped_width", "get_style_clip_corner", - "get_style_clip_corner_internal", "get_style_color_filter_dsc", - "get_style_color_filter_dsc_internal", "get_style_color_filter_opa", - "get_style_color_filter_opa_internal", "get_style_drop_shadow_color", "get_style_drop_shadow_color_filtered", - "get_style_drop_shadow_color_filtered_internal", - "get_style_drop_shadow_color_internal", "get_style_drop_shadow_offset_x", - "get_style_drop_shadow_offset_x_internal", "get_style_drop_shadow_offset_y", - "get_style_drop_shadow_offset_y_internal", "get_style_drop_shadow_opa", - "get_style_drop_shadow_opa_internal", "get_style_drop_shadow_quality", - "get_style_drop_shadow_quality_internal", "get_style_drop_shadow_radius", - "get_style_drop_shadow_radius_internal", "get_style_enabled", "get_style_flex_cross_place", - "get_style_flex_cross_place_internal", "get_style_flex_flow", - "get_style_flex_flow_internal", "get_style_flex_grow", - "get_style_flex_grow_internal", "get_style_flex_main_place", - "get_style_flex_main_place_internal", "get_style_flex_track_place", - "get_style_flex_track_place_internal", "get_style_grid_cell_column_pos", - "get_style_grid_cell_column_pos_internal", "get_style_grid_cell_column_span", - "get_style_grid_cell_column_span_internal", "get_style_grid_cell_row_pos", - "get_style_grid_cell_row_pos_internal", "get_style_grid_cell_row_span", - "get_style_grid_cell_row_span_internal", "get_style_grid_cell_x_align", - "get_style_grid_cell_x_align_internal", "get_style_grid_cell_y_align", - "get_style_grid_cell_y_align_internal", "get_style_grid_column_align", - "get_style_grid_column_align_internal", "get_style_grid_column_dsc_array", - "get_style_grid_column_dsc_array_internal", "get_style_grid_row_align", - "get_style_grid_row_align_internal", "get_style_grid_row_dsc_array", - "get_style_grid_row_dsc_array_internal", "get_style_height", - "get_style_height_internal", "get_style_image_colorkey", - "get_style_image_colorkey_internal", "get_style_image_opa", - "get_style_image_opa_internal", "get_style_image_recolor", "get_style_image_recolor_filtered", - "get_style_image_recolor_filtered_internal", - "get_style_image_recolor_internal", "get_style_image_recolor_opa", - "get_style_image_recolor_opa_internal", "get_style_layout", - "get_style_layout_internal", "get_style_length", - "get_style_length_internal", "get_style_line_color", "get_style_line_color_filtered", - "get_style_line_color_filtered_internal", - "get_style_line_color_internal", "get_style_line_dash_gap", - "get_style_line_dash_gap_internal", "get_style_line_dash_width", - "get_style_line_dash_width_internal", "get_style_line_opa", - "get_style_line_opa_internal", "get_style_line_rounded", - "get_style_line_rounded_internal", "get_style_line_width", - "get_style_line_width_internal", "get_style_margin_bottom", - "get_style_margin_bottom_internal", "get_style_margin_left", - "get_style_margin_left_internal", "get_style_margin_right", - "get_style_margin_right_internal", "get_style_margin_top", - "get_style_margin_top_internal", "get_style_max_height", - "get_style_max_height_internal", "get_style_max_width", - "get_style_max_width_internal", "get_style_min_height", - "get_style_min_height_internal", "get_style_min_width", - "get_style_min_width_internal", "get_style_opa", - "get_style_opa_internal", "get_style_opa_layered", - "get_style_opa_layered_internal", "get_style_opa_recursive", "get_style_outline_color", "get_style_outline_color_filtered", - "get_style_outline_color_filtered_internal", - "get_style_outline_color_internal", "get_style_outline_opa", - "get_style_outline_opa_internal", "get_style_outline_pad", - "get_style_outline_pad_internal", "get_style_outline_width", - "get_style_outline_width_internal", "get_style_pad_bottom", - "get_style_pad_bottom_internal", "get_style_pad_column", - "get_style_pad_column_internal", "get_style_pad_left", - "get_style_pad_left_internal", "get_style_pad_radial", - "get_style_pad_radial_internal", "get_style_pad_right", - "get_style_pad_right_internal", "get_style_pad_row", - "get_style_pad_row_internal", "get_style_pad_top", - "get_style_pad_top_internal", "get_style_prop", - "get_style_prop_internal", "get_style_radial_offset", - "get_style_radial_offset_internal", "get_style_radius", - "get_style_radius_internal", "get_style_recolor", - "get_style_recolor_internal", "get_style_recolor_opa", - "get_style_recolor_opa_internal", "get_style_recolor_recursive", "get_style_rotary_sensitivity", - "get_style_rotary_sensitivity_internal", "get_style_shadow_color", "get_style_shadow_color_filtered", - "get_style_shadow_color_filtered_internal", - "get_style_shadow_color_internal", "get_style_shadow_offset_x", - "get_style_shadow_offset_x_internal", "get_style_shadow_offset_y", - "get_style_shadow_offset_y_internal", "get_style_shadow_opa", - "get_style_shadow_opa_internal", "get_style_shadow_spread", - "get_style_shadow_spread_internal", "get_style_shadow_width", - "get_style_shadow_width_internal", "get_style_space_bottom", - "get_style_space_bottom_internal", "get_style_space_left", - "get_style_space_left_internal", "get_style_space_right", - "get_style_space_right_internal", "get_style_space_top", - "get_style_space_top_internal", "get_style_text_align", - "get_style_text_align_internal", "get_style_text_color", "get_style_text_color_filtered", - "get_style_text_color_filtered_internal", - "get_style_text_color_internal", "get_style_text_decor", - "get_style_text_decor_internal", "get_style_text_font", - "get_style_text_font_internal", "get_style_text_leading_trim", - "get_style_text_leading_trim_internal", "get_style_text_letter_space", - "get_style_text_letter_space_internal", "get_style_text_line_space", - "get_style_text_line_space_internal", "get_style_text_opa", - "get_style_text_opa_internal", "get_style_text_outline_stroke_color", "get_style_text_outline_stroke_color_filtered", - "get_style_text_outline_stroke_color_filtered_internal", - "get_style_text_outline_stroke_color_internal", "get_style_text_outline_stroke_opa", - "get_style_text_outline_stroke_opa_internal", "get_style_text_outline_stroke_width", - "get_style_text_outline_stroke_width_internal", "get_style_transform_height", - "get_style_transform_height_internal", "get_style_transform_pivot_x", - "get_style_transform_pivot_x_internal", "get_style_transform_pivot_y", - "get_style_transform_pivot_y_internal", "get_style_transform_rotation", - "get_style_transform_rotation_internal", "get_style_transform_scale_x", - "get_style_transform_scale_x_internal", "get_style_transform_scale_x_safe", - "get_style_transform_scale_x_safe_internal", "get_style_transform_scale_y", - "get_style_transform_scale_y_internal", "get_style_transform_scale_y_safe", - "get_style_transform_scale_y_safe_internal", "get_style_transform_skew_x", - "get_style_transform_skew_x_internal", "get_style_transform_skew_y", - "get_style_transform_skew_y_internal", "get_style_transform_width", - "get_style_transform_width_internal", "get_style_transition", - "get_style_transition_internal", "get_style_translate_radial", - "get_style_translate_radial_internal", "get_style_translate_x", - "get_style_translate_x_internal", "get_style_translate_y", - "get_style_translate_y_internal", "get_style_width", - "get_style_width_internal", "get_style_x", - "get_style_x_internal", "get_style_y", - "get_style_y_internal", "get_transform", "get_transformed_area", "get_user_data", @@ -183778,7 +183793,6 @@ "set_y", "stop_scroll_anim", "style_apply_color_filter", - "style_apply_color_filter_internal", "style_apply_recolor", "style_create_transition", "style_deinit", diff --git a/generated/lvgl.pyi b/generated/lvgl.pyi index e138f54..38e5d3b 100644 --- a/generated/lvgl.pyi +++ b/generated/lvgl.pyi @@ -1775,7 +1775,6 @@ class draw_task_t(_Struct): def sw_mask_rect(self, dsc: draw_mask_rect_dsc_t) -> None: ... def sw_triangle(self, dsc: draw_triangle_dsc_t) -> None: ... def unit_draw_letter(self, dsc: draw_glyph_dsc_t, pos: point_t, font: font_t, letter: int, cb: Callable[[draw_task_t, draw_glyph_dsc_t, draw_fill_dsc_t, area_t], None]) -> None: ... - def unit_draw_letter_internal(self, dsc: draw_glyph_dsc_t, pos: point_t, font: font_t, letter: int, cb: Callable[[draw_task_t, draw_glyph_dsc_t, draw_fill_dsc_t, area_t], None]) -> None: ... class draw_triangle_dsc_t(_Struct): base: draw_dsc_base_t @@ -1880,11 +1879,8 @@ class font_glyph_dsc_t(_Struct): def compare(self, rhs: font_glyph_dsc_t) -> int: ... def get_bitmap_fmt_txt(self, draw_buf: draw_buf_t) -> Any: ... def get_glyph_bitmap(self, draw_buf: draw_buf_t) -> Any: ... - def get_glyph_bitmap_internal(self, draw_buf: draw_buf_t) -> Any: ... def get_glyph_static_bitmap(self) -> Any: ... - def get_glyph_static_bitmap_internal(self) -> Any: ... def release_draw_data(self) -> None: ... - def release_draw_data_internal(self) -> None: ... class font_info_t(_Struct): name: str @@ -1913,17 +1909,11 @@ class font_t(_Struct): underline_position: int underline_thickness: int def get_bottom_trim(self, trim: TEXT_LEADING_TRIM | int) -> int: ... - def get_bottom_trim_internal(self, trim: TEXT_LEADING_TRIM | int) -> int: ... def get_glyph_dsc_fmt_txt(self, dsc_out: font_glyph_dsc_t, unicode_letter: int, unicode_letter_next: int) -> int: ... - def get_glyph_dsc_internal(self, dsc_out: font_glyph_dsc_t, letter: int, letter_next: int) -> int: ... def get_glyph_width(self, letter: int, letter_next: int) -> int: ... - def get_glyph_width_internal(self, letter: int, letter_next: int) -> int: ... def get_line_height(self) -> int: ... - def get_line_height_internal(self) -> int: ... def get_top_trim(self, trim: TEXT_LEADING_TRIM | int) -> int: ... - def get_top_trim_internal(self, trim: TEXT_LEADING_TRIM | int) -> int: ... def has_static_bitmap(self) -> int: ... - def has_static_bitmap_internal(self) -> int: ... def set_kerning(self, kerning: FONT_KERNING | int) -> None: ... class fs_dir_t(_Struct): @@ -2468,10 +2458,8 @@ class style_t(_Struct): prop_cnt: int def copy(self, src: style_t) -> None: ... def get_prop(self, prop: int, value: style_value_t) -> STYLE_RES | int: ... - def get_prop_internal(self, prop: int, value: style_value_t) -> STYLE_RES | int: ... def init(self) -> None: ... def is_const(self) -> int: ... - def is_const_internal(self) -> int: ... def is_empty(self) -> int: ... def merge(self, src: style_t) -> None: ... def remove_prop(self, prop: int) -> int: ... @@ -3477,7 +3465,6 @@ class obj(_Struct): def calc_dynamic_width(self, prop: int) -> int: ... def calculate_ext_draw_size(self, part: PART | int) -> int: ... def calculate_style_text_align(self, part: PART | int, txt: str) -> TEXT_ALIGN | int: ... - def calculate_style_text_align_internal(self, part: PART | int, txt: str) -> TEXT_ALIGN | int: ... def center(self) -> None: ... def check_type(self, class_p: obj_class_t) -> int: ... @staticmethod @@ -3537,306 +3524,158 @@ class obj(_Struct): def get_sibling_by_type(self, idx: int, class_p: obj_class_t) -> obj: ... def get_state(self) -> STATE | int: ... def get_style_align(self, part: PART | int) -> ALIGN | int: ... - def get_style_align_internal(self, part: PART | int) -> ALIGN | int: ... def get_style_anim(self, part: PART | int) -> anim_t: ... def get_style_anim_duration(self, part: PART | int) -> int: ... - def get_style_anim_duration_internal(self, part: PART | int) -> int: ... - def get_style_anim_internal(self, part: PART | int) -> anim_t: ... def get_style_arc_color(self, part: PART | int) -> color_t: ... def get_style_arc_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_arc_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_arc_color_internal(self, part: PART | int) -> color_t: ... def get_style_arc_image_src(self, part: PART | int) -> Any: ... - def get_style_arc_image_src_internal(self, part: PART | int) -> Any: ... def get_style_arc_opa(self, part: PART | int) -> int: ... - def get_style_arc_opa_internal(self, part: PART | int) -> int: ... def get_style_arc_rounded(self, part: PART | int) -> int: ... - def get_style_arc_rounded_internal(self, part: PART | int) -> int: ... def get_style_arc_width(self, part: PART | int) -> int: ... - def get_style_arc_width_internal(self, part: PART | int) -> int: ... def get_style_base_dir(self, part: PART | int) -> BASE_DIR | int: ... - def get_style_base_dir_internal(self, part: PART | int) -> BASE_DIR | int: ... def get_style_bg_color(self, part: PART | int) -> color_t: ... def get_style_bg_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_bg_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_bg_color_internal(self, part: PART | int) -> color_t: ... def get_style_bg_grad(self, part: PART | int) -> grad_dsc_t: ... def get_style_bg_grad_color(self, part: PART | int) -> color_t: ... def get_style_bg_grad_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_bg_grad_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_bg_grad_color_internal(self, part: PART | int) -> color_t: ... def get_style_bg_grad_dir(self, part: PART | int) -> GRAD_DIR | int: ... - def get_style_bg_grad_dir_internal(self, part: PART | int) -> GRAD_DIR | int: ... - def get_style_bg_grad_internal(self, part: PART | int) -> grad_dsc_t: ... def get_style_bg_grad_opa(self, part: PART | int) -> int: ... - def get_style_bg_grad_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_grad_stop(self, part: PART | int) -> int: ... - def get_style_bg_grad_stop_internal(self, part: PART | int) -> int: ... def get_style_bg_image_opa(self, part: PART | int) -> int: ... - def get_style_bg_image_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_image_recolor(self, part: PART | int) -> color_t: ... def get_style_bg_image_recolor_filtered(self, part: PART | int) -> color_t: ... - def get_style_bg_image_recolor_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_bg_image_recolor_internal(self, part: PART | int) -> color_t: ... def get_style_bg_image_recolor_opa(self, part: PART | int) -> int: ... - def get_style_bg_image_recolor_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_image_src(self, part: PART | int) -> Any: ... - def get_style_bg_image_src_internal(self, part: PART | int) -> Any: ... def get_style_bg_image_tiled(self, part: PART | int) -> int: ... - def get_style_bg_image_tiled_internal(self, part: PART | int) -> int: ... def get_style_bg_main_opa(self, part: PART | int) -> int: ... - def get_style_bg_main_opa_internal(self, part: PART | int) -> int: ... def get_style_bg_main_stop(self, part: PART | int) -> int: ... - def get_style_bg_main_stop_internal(self, part: PART | int) -> int: ... def get_style_bg_opa(self, part: PART | int) -> int: ... - def get_style_bg_opa_internal(self, part: PART | int) -> int: ... def get_style_bitmap_mask_src(self, part: PART | int) -> Any: ... - def get_style_bitmap_mask_src_internal(self, part: PART | int) -> Any: ... def get_style_blend_mode(self, part: PART | int) -> BLEND_MODE | int: ... - def get_style_blend_mode_internal(self, part: PART | int) -> BLEND_MODE | int: ... def get_style_blur_backdrop(self, part: PART | int) -> int: ... - def get_style_blur_backdrop_internal(self, part: PART | int) -> int: ... def get_style_blur_quality(self, part: PART | int) -> BLUR_QUALITY | int: ... - def get_style_blur_quality_internal(self, part: PART | int) -> BLUR_QUALITY | int: ... def get_style_blur_radius(self, part: PART | int) -> int: ... - def get_style_blur_radius_internal(self, part: PART | int) -> int: ... def get_style_border_color(self, part: PART | int) -> color_t: ... def get_style_border_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_border_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_border_color_internal(self, part: PART | int) -> color_t: ... def get_style_border_opa(self, part: PART | int) -> int: ... - def get_style_border_opa_internal(self, part: PART | int) -> int: ... def get_style_border_post(self, part: PART | int) -> int: ... - def get_style_border_post_internal(self, part: PART | int) -> int: ... def get_style_border_side(self, part: PART | int) -> BORDER_SIDE | int: ... - def get_style_border_side_internal(self, part: PART | int) -> BORDER_SIDE | int: ... def get_style_border_width(self, part: PART | int) -> int: ... - def get_style_border_width_internal(self, part: PART | int) -> int: ... def get_style_clamped_height(self) -> int: ... def get_style_clamped_width(self) -> int: ... def get_style_clip_corner(self, part: PART | int) -> int: ... - def get_style_clip_corner_internal(self, part: PART | int) -> int: ... def get_style_color_filter_dsc(self, part: PART | int) -> color_filter_dsc_t: ... - def get_style_color_filter_dsc_internal(self, part: PART | int) -> color_filter_dsc_t: ... def get_style_color_filter_opa(self, part: PART | int) -> int: ... - def get_style_color_filter_opa_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_color(self, part: PART | int) -> color_t: ... def get_style_drop_shadow_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_drop_shadow_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_drop_shadow_color_internal(self, part: PART | int) -> color_t: ... def get_style_drop_shadow_offset_x(self, part: PART | int) -> int: ... - def get_style_drop_shadow_offset_x_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_offset_y(self, part: PART | int) -> int: ... - def get_style_drop_shadow_offset_y_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_opa(self, part: PART | int) -> int: ... - def get_style_drop_shadow_opa_internal(self, part: PART | int) -> int: ... def get_style_drop_shadow_quality(self, part: PART | int) -> BLUR_QUALITY | int: ... - def get_style_drop_shadow_quality_internal(self, part: PART | int) -> BLUR_QUALITY | int: ... def get_style_drop_shadow_radius(self, part: PART | int) -> int: ... - def get_style_drop_shadow_radius_internal(self, part: PART | int) -> int: ... def get_style_enabled(self, style: style_t, selector: int) -> int: ... def get_style_flex_cross_place(self, part: PART | int) -> FLEX_ALIGN | int: ... - def get_style_flex_cross_place_internal(self, part: PART | int) -> FLEX_ALIGN | int: ... def get_style_flex_flow(self, part: PART | int) -> FLEX_FLOW | int: ... - def get_style_flex_flow_internal(self, part: PART | int) -> FLEX_FLOW | int: ... def get_style_flex_grow(self, part: PART | int) -> int: ... - def get_style_flex_grow_internal(self, part: PART | int) -> int: ... def get_style_flex_main_place(self, part: PART | int) -> FLEX_ALIGN | int: ... - def get_style_flex_main_place_internal(self, part: PART | int) -> FLEX_ALIGN | int: ... def get_style_flex_track_place(self, part: PART | int) -> FLEX_ALIGN | int: ... - def get_style_flex_track_place_internal(self, part: PART | int) -> FLEX_ALIGN | int: ... def get_style_grid_cell_column_pos(self, part: PART | int) -> int: ... - def get_style_grid_cell_column_pos_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_column_span(self, part: PART | int) -> int: ... - def get_style_grid_cell_column_span_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_row_pos(self, part: PART | int) -> int: ... - def get_style_grid_cell_row_pos_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_row_span(self, part: PART | int) -> int: ... - def get_style_grid_cell_row_span_internal(self, part: PART | int) -> int: ... def get_style_grid_cell_x_align(self, part: PART | int) -> GRID_ALIGN | int: ... - def get_style_grid_cell_x_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_cell_y_align(self, part: PART | int) -> GRID_ALIGN | int: ... - def get_style_grid_cell_y_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_column_align(self, part: PART | int) -> GRID_ALIGN | int: ... - def get_style_grid_column_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_column_dsc_array(self, part: PART | int) -> Any: ... - def get_style_grid_column_dsc_array_internal(self, part: PART | int) -> Any: ... def get_style_grid_row_align(self, part: PART | int) -> GRID_ALIGN | int: ... - def get_style_grid_row_align_internal(self, part: PART | int) -> GRID_ALIGN | int: ... def get_style_grid_row_dsc_array(self, part: PART | int) -> Any: ... - def get_style_grid_row_dsc_array_internal(self, part: PART | int) -> Any: ... def get_style_height(self, part: PART | int) -> int: ... - def get_style_height_internal(self, part: PART | int) -> int: ... def get_style_image_colorkey(self, part: PART | int) -> image_colorkey_t: ... - def get_style_image_colorkey_internal(self, part: PART | int) -> image_colorkey_t: ... def get_style_image_opa(self, part: PART | int) -> int: ... - def get_style_image_opa_internal(self, part: PART | int) -> int: ... def get_style_image_recolor(self, part: PART | int) -> color_t: ... def get_style_image_recolor_filtered(self, part: PART | int) -> color_t: ... - def get_style_image_recolor_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_image_recolor_internal(self, part: PART | int) -> color_t: ... def get_style_image_recolor_opa(self, part: PART | int) -> int: ... - def get_style_image_recolor_opa_internal(self, part: PART | int) -> int: ... def get_style_layout(self, part: PART | int) -> int: ... - def get_style_layout_internal(self, part: PART | int) -> int: ... def get_style_length(self, part: PART | int) -> int: ... - def get_style_length_internal(self, part: PART | int) -> int: ... def get_style_line_color(self, part: PART | int) -> color_t: ... def get_style_line_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_line_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_line_color_internal(self, part: PART | int) -> color_t: ... def get_style_line_dash_gap(self, part: PART | int) -> int: ... - def get_style_line_dash_gap_internal(self, part: PART | int) -> int: ... def get_style_line_dash_width(self, part: PART | int) -> int: ... - def get_style_line_dash_width_internal(self, part: PART | int) -> int: ... def get_style_line_opa(self, part: PART | int) -> int: ... - def get_style_line_opa_internal(self, part: PART | int) -> int: ... def get_style_line_rounded(self, part: PART | int) -> int: ... - def get_style_line_rounded_internal(self, part: PART | int) -> int: ... def get_style_line_width(self, part: PART | int) -> int: ... - def get_style_line_width_internal(self, part: PART | int) -> int: ... def get_style_margin_bottom(self, part: PART | int) -> int: ... - def get_style_margin_bottom_internal(self, part: PART | int) -> int: ... def get_style_margin_left(self, part: PART | int) -> int: ... - def get_style_margin_left_internal(self, part: PART | int) -> int: ... def get_style_margin_right(self, part: PART | int) -> int: ... - def get_style_margin_right_internal(self, part: PART | int) -> int: ... def get_style_margin_top(self, part: PART | int) -> int: ... - def get_style_margin_top_internal(self, part: PART | int) -> int: ... def get_style_max_height(self, part: PART | int) -> int: ... - def get_style_max_height_internal(self, part: PART | int) -> int: ... def get_style_max_width(self, part: PART | int) -> int: ... - def get_style_max_width_internal(self, part: PART | int) -> int: ... def get_style_min_height(self, part: PART | int) -> int: ... - def get_style_min_height_internal(self, part: PART | int) -> int: ... def get_style_min_width(self, part: PART | int) -> int: ... - def get_style_min_width_internal(self, part: PART | int) -> int: ... def get_style_opa(self, part: PART | int) -> int: ... - def get_style_opa_internal(self, part: PART | int) -> int: ... def get_style_opa_layered(self, part: PART | int) -> int: ... - def get_style_opa_layered_internal(self, part: PART | int) -> int: ... def get_style_opa_recursive(self, part: PART | int) -> int: ... def get_style_outline_color(self, part: PART | int) -> color_t: ... def get_style_outline_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_outline_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_outline_color_internal(self, part: PART | int) -> color_t: ... def get_style_outline_opa(self, part: PART | int) -> int: ... - def get_style_outline_opa_internal(self, part: PART | int) -> int: ... def get_style_outline_pad(self, part: PART | int) -> int: ... - def get_style_outline_pad_internal(self, part: PART | int) -> int: ... def get_style_outline_width(self, part: PART | int) -> int: ... - def get_style_outline_width_internal(self, part: PART | int) -> int: ... def get_style_pad_bottom(self, part: PART | int) -> int: ... - def get_style_pad_bottom_internal(self, part: PART | int) -> int: ... def get_style_pad_column(self, part: PART | int) -> int: ... - def get_style_pad_column_internal(self, part: PART | int) -> int: ... def get_style_pad_left(self, part: PART | int) -> int: ... - def get_style_pad_left_internal(self, part: PART | int) -> int: ... def get_style_pad_radial(self, part: PART | int) -> int: ... - def get_style_pad_radial_internal(self, part: PART | int) -> int: ... def get_style_pad_right(self, part: PART | int) -> int: ... - def get_style_pad_right_internal(self, part: PART | int) -> int: ... def get_style_pad_row(self, part: PART | int) -> int: ... - def get_style_pad_row_internal(self, part: PART | int) -> int: ... def get_style_pad_top(self, part: PART | int) -> int: ... - def get_style_pad_top_internal(self, part: PART | int) -> int: ... def get_style_prop(self, part: PART | int, prop: int) -> style_value_t: ... - def get_style_prop_internal(self, part: PART | int, prop: int) -> style_value_t: ... def get_style_radial_offset(self, part: PART | int) -> int: ... - def get_style_radial_offset_internal(self, part: PART | int) -> int: ... def get_style_radius(self, part: PART | int) -> int: ... - def get_style_radius_internal(self, part: PART | int) -> int: ... def get_style_recolor(self, part: PART | int) -> color_t: ... - def get_style_recolor_internal(self, part: PART | int) -> color_t: ... def get_style_recolor_opa(self, part: PART | int) -> int: ... - def get_style_recolor_opa_internal(self, part: PART | int) -> int: ... def get_style_recolor_recursive(self, part: PART | int) -> color32_t: ... def get_style_rotary_sensitivity(self, part: PART | int) -> int: ... - def get_style_rotary_sensitivity_internal(self, part: PART | int) -> int: ... def get_style_shadow_color(self, part: PART | int) -> color_t: ... def get_style_shadow_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_shadow_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_shadow_color_internal(self, part: PART | int) -> color_t: ... def get_style_shadow_offset_x(self, part: PART | int) -> int: ... - def get_style_shadow_offset_x_internal(self, part: PART | int) -> int: ... def get_style_shadow_offset_y(self, part: PART | int) -> int: ... - def get_style_shadow_offset_y_internal(self, part: PART | int) -> int: ... def get_style_shadow_opa(self, part: PART | int) -> int: ... - def get_style_shadow_opa_internal(self, part: PART | int) -> int: ... def get_style_shadow_spread(self, part: PART | int) -> int: ... - def get_style_shadow_spread_internal(self, part: PART | int) -> int: ... def get_style_shadow_width(self, part: PART | int) -> int: ... - def get_style_shadow_width_internal(self, part: PART | int) -> int: ... def get_style_space_bottom(self, part: PART | int) -> int: ... - def get_style_space_bottom_internal(self, part: PART | int) -> int: ... def get_style_space_left(self, part: PART | int) -> int: ... - def get_style_space_left_internal(self, part: PART | int) -> int: ... def get_style_space_right(self, part: PART | int) -> int: ... - def get_style_space_right_internal(self, part: PART | int) -> int: ... def get_style_space_top(self, part: PART | int) -> int: ... - def get_style_space_top_internal(self, part: PART | int) -> int: ... def get_style_text_align(self, part: PART | int) -> TEXT_ALIGN | int: ... - def get_style_text_align_internal(self, part: PART | int) -> TEXT_ALIGN | int: ... def get_style_text_color(self, part: PART | int) -> color_t: ... def get_style_text_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_text_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_text_color_internal(self, part: PART | int) -> color_t: ... def get_style_text_decor(self, part: PART | int) -> TEXT_DECOR | int: ... - def get_style_text_decor_internal(self, part: PART | int) -> TEXT_DECOR | int: ... def get_style_text_font(self, part: PART | int) -> font_t: ... - def get_style_text_font_internal(self, part: PART | int) -> font_t: ... def get_style_text_leading_trim(self, part: PART | int) -> TEXT_LEADING_TRIM | int: ... - def get_style_text_leading_trim_internal(self, part: PART | int) -> TEXT_LEADING_TRIM | int: ... def get_style_text_letter_space(self, part: PART | int) -> int: ... - def get_style_text_letter_space_internal(self, part: PART | int) -> int: ... def get_style_text_line_space(self, part: PART | int) -> int: ... - def get_style_text_line_space_internal(self, part: PART | int) -> int: ... def get_style_text_opa(self, part: PART | int) -> int: ... - def get_style_text_opa_internal(self, part: PART | int) -> int: ... def get_style_text_outline_stroke_color(self, part: PART | int) -> color_t: ... def get_style_text_outline_stroke_color_filtered(self, part: PART | int) -> color_t: ... - def get_style_text_outline_stroke_color_filtered_internal(self, part: PART | int) -> color_t: ... - def get_style_text_outline_stroke_color_internal(self, part: PART | int) -> color_t: ... def get_style_text_outline_stroke_opa(self, part: PART | int) -> int: ... - def get_style_text_outline_stroke_opa_internal(self, part: PART | int) -> int: ... def get_style_text_outline_stroke_width(self, part: PART | int) -> int: ... - def get_style_text_outline_stroke_width_internal(self, part: PART | int) -> int: ... def get_style_transform_height(self, part: PART | int) -> int: ... - def get_style_transform_height_internal(self, part: PART | int) -> int: ... def get_style_transform_pivot_x(self, part: PART | int) -> int: ... - def get_style_transform_pivot_x_internal(self, part: PART | int) -> int: ... def get_style_transform_pivot_y(self, part: PART | int) -> int: ... - def get_style_transform_pivot_y_internal(self, part: PART | int) -> int: ... def get_style_transform_rotation(self, part: PART | int) -> int: ... - def get_style_transform_rotation_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_x(self, part: PART | int) -> int: ... - def get_style_transform_scale_x_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_x_safe(self, part: PART | int) -> int: ... - def get_style_transform_scale_x_safe_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_y(self, part: PART | int) -> int: ... - def get_style_transform_scale_y_internal(self, part: PART | int) -> int: ... def get_style_transform_scale_y_safe(self, part: PART | int) -> int: ... - def get_style_transform_scale_y_safe_internal(self, part: PART | int) -> int: ... def get_style_transform_skew_x(self, part: PART | int) -> int: ... - def get_style_transform_skew_x_internal(self, part: PART | int) -> int: ... def get_style_transform_skew_y(self, part: PART | int) -> int: ... - def get_style_transform_skew_y_internal(self, part: PART | int) -> int: ... def get_style_transform_width(self, part: PART | int) -> int: ... - def get_style_transform_width_internal(self, part: PART | int) -> int: ... def get_style_transition(self, part: PART | int) -> style_transition_dsc_t: ... - def get_style_transition_internal(self, part: PART | int) -> style_transition_dsc_t: ... def get_style_translate_radial(self, part: PART | int) -> int: ... - def get_style_translate_radial_internal(self, part: PART | int) -> int: ... def get_style_translate_x(self, part: PART | int) -> int: ... - def get_style_translate_x_internal(self, part: PART | int) -> int: ... def get_style_translate_y(self, part: PART | int) -> int: ... - def get_style_translate_y_internal(self, part: PART | int) -> int: ... def get_style_width(self, part: PART | int) -> int: ... - def get_style_width_internal(self, part: PART | int) -> int: ... def get_style_x(self, part: PART | int) -> int: ... - def get_style_x_internal(self, part: PART | int) -> int: ... def get_style_y(self, part: PART | int) -> int: ... - def get_style_y_internal(self, part: PART | int) -> int: ... def get_transform(self) -> matrix_t: ... def get_transformed_area(self, area: area_t, flags: obj.POINT_TRANSFORM_FLAG | int) -> None: ... def get_user_data(self) -> Any: ... @@ -4172,7 +4011,6 @@ class obj(_Struct): def set_y(self, y: int) -> None: ... def stop_scroll_anim(self) -> None: ... def style_apply_color_filter(self, part: PART | int, v: style_value_t) -> style_value_t: ... - def style_apply_color_filter_internal(self, part: PART | int, v: style_value_t) -> style_value_t: ... def style_apply_recolor(self, part: PART | int, color: color32_t) -> color32_t: ... def style_create_transition(self, part: PART | int, prev_state: STATE | int, new_state: STATE | int, tr_dsc: obj_style_transition_dsc_t) -> None: ... @staticmethod @@ -4559,7 +4397,6 @@ def async_call_cancel(async_xcb: Callable[[Any], None], user_data: Any) -> RESUL def atan2(x: int, y: int) -> int: ... def bezier3(t: int, u0: int, u1: int, u2: int, u3: int) -> int: ... def bidi_calculate_align(align: TEXT_ALIGN | int, base_dir: BASE_DIR | int, txt: str) -> None: ... -def bidi_calculate_align_internal(align: TEXT_ALIGN | int, base_dir: BASE_DIR | int, txt: str) -> None: ... def bin_decoder_close(decoder: image_decoder_t, dsc: image_decoder_dsc_t) -> None: ... def bin_decoder_get_area(decoder: image_decoder_t, dsc: image_decoder_dsc_t, full_area: area_t, decoded_area: area_t) -> RESULT | int: ... def bin_decoder_info(decoder: image_decoder_t, dsc: image_decoder_dsc_t, header: image_header_t) -> RESULT | int: ... @@ -4804,7 +4641,6 @@ def text_get_line_width(txt: str, length: int, font: font_t, attributes: text_at def text_get_next_line(txt: str, len: int, font: font_t, used_width: Any, attributes: text_attributes_t) -> int: ... def text_get_size(size_res: point_t, text: str, font: font_t, letter_space: int, line_space: int, max_width: int, flag: TEXT_FLAG | int) -> None: ... def text_get_size_attributes(size_res: point_t, text: str, font: font_t, attributes: text_attributes_t) -> None: ... -def text_get_size_internal(size_res: point_t, text: str, font: font_t, letter_space: int, line_space: int, max_width: int, flag: TEXT_FLAG | int) -> None: ... def text_get_width(txt: str, length: int, font: font_t, attributes: text_attributes_t) -> int: ... def text_ins(txt_buf: str, pos: int, ins_txt: str) -> None: ... def text_is_a_word(letter: int) -> int: ... diff --git a/generated/lvgl_circuitpython.c b/generated/lvgl_circuitpython.c index 8405cf2..43add79 100644 --- a/generated/lvgl_circuitpython.c +++ b/generated/lvgl_circuitpython.c @@ -5679,362 +5679,313 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_background_mpobj, 1, mp_lv_ /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_width_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) */ -static mp_obj_t mp_lv_obj_get_style_width_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_flex_flow_t flow = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_func_ptr)(obj, flow); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_flow_mpobj, 2, mp_lv_obj_set_flex_flow, lv_obj_set_flex_flow); /* * lvgl extension definition for: - * inline static lv_align_t lv_obj_get_style_align_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) */ -static mp_obj_t mp_lv_obj_get_style_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_flex_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_align_t _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_flex_align_t main_place = (int)mp_obj_get_int(mp_args[1]); + lv_flex_align_t cross_place = (int)mp_obj_get_int(mp_args[2]); + lv_flex_align_t track_cross_place = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_func_ptr)(obj, main_place, cross_place, track_cross_place); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_internal_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_align_mpobj, 4, mp_lv_obj_set_flex_align, lv_obj_set_flex_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y_internal */ +static mp_obj_t mp_lv_obj_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint8_t grow = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint8_t))lv_func_ptr)(obj, grow); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_grow_mpobj, 2, mp_lv_obj_set_flex_grow, lv_obj_set_flex_grow); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_internal */ +/* + * Array convertors for int32_t [] + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_internal); +GENMPY_UNUSED static int32_t *mp_arr_to_int32_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation_internal */ + int32_t *lv_arr = (int32_t*)m_malloc(len * sizeof(int32_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (int32_t)mp_obj_get_int(item); + } + return (int32_t *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x_internal */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_int32_t_____(const int32_t *arr) +{ + return mp_array_from_i32ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y_internal */ +static mp_obj_t mp_lv_obj_set_grid_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const int32_t *col_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[1]); + const int32_t *row_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); + ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_func_ptr)(obj, col_dsc, row_dsc); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_dsc_array_mpobj, 3, mp_lv_obj_set_grid_dsc_array, lv_obj_set_grid_dsc_array); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right_internal */ +static mp_obj_t mp_lv_obj_set_grid_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); + lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_func_ptr)(obj, column_align, row_align); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_align_mpobj, 3, mp_lv_obj_set_grid_align, lv_obj_set_grid_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top_internal */ +static mp_obj_t mp_lv_obj_set_grid_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); + int32_t col_pos = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t col_span = (int32_t)mp_obj_get_int(mp_args[3]); + lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[4]); + int32_t row_pos = (int32_t)mp_obj_get_int(mp_args[5]); + int32_t row_span = (int32_t)mp_obj_get_int(mp_args[6]); + ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_func_ptr)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_cell_mpobj, 7, mp_lv_obj_set_grid_cell, lv_obj_set_grid_cell); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_clean */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_clean_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_clean); /* - * Struct lv_color_t + * lvgl extension definition for: + * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) */ -static inline const mp_obj_type_t *get_mp_lv_color_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_t_type())); - return (lv_color_t*)self->data; -} - -#define mp_write_lv_color_t(struct_obj) *((lv_color_t*)mp_write_ptr_lv_color_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_t(void *field) +static mp_obj_t mp_lv_obj_delete_delayed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_color_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t delay_ms = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, delay_ms); + return mp_const_none; } -#define mp_read_lv_color_t(field) mp_read_ptr_lv_color_t(copy_buffer(&field, sizeof(lv_color_t))) -#define mp_read_byref_lv_color_t(field) mp_read_ptr_lv_color_t(&field) + -static void mp_lv_color_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color_t *data = (lv_color_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_delayed_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_delete_delayed); + +#define funcptr_lv_anim_exec_xcb_t NULL - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_anim_exec_xcb_t(void *, int32_t) + */ -static void mp_lv_color_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_funcptr_lv_anim_exec_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_color_t"); + void *arg0 = mp_to_ptr(mp_args[0]); + int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(void *, int32_t))lv_func_ptr)(arg0, arg1); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_color_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color_t_type, - MP_QSTR_lv_color_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_color_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_color_t_attr, - locals_dict, &mp_lv_color_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_exec_xcb_t_mpobj, 2, mp_funcptr_lv_anim_exec_xcb_t, funcptr_lv_anim_exec_xcb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static inline const mp_obj_type_t *get_mp_lv_color_t_type(void) -{ - return &mp_lv_color_t_type; -} + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_anim_t_exec_cb_callback' + * lv_anim_exec_xcb_t exec_cb + */ +#define funcptr_lv_anim_custom_exec_cb_t NULL + /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -static mp_obj_t mp_lv_obj_get_style_bg_color_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_custom_exec_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_lv_color_t(_res); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_anim_t *, int32_t))lv_func_ptr)(arg0, arg1); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, 2, mp_funcptr_lv_anim_custom_exec_cb_t, funcptr_lv_anim_custom_exec_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); +#define funcptr_lv_anim_start_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered_internal); - /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_opa_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_anim_start_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_obj_get_style_bg_opa_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_start_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_opa_t _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + ((void (*)(lv_anim_t *))lv_func_ptr)(arg0); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_start_cb_t_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, funcptr_lv_anim_start_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered_internal */ +static void lv_anim_t_start_cb_callback(lv_anim_t *); +static void lv_anim_t_completed_cb_callback(lv_anim_t *); +static void lv_anim_t_deleted_cb_callback(lv_anim_t *); +#define funcptr_lv_anim_get_value_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered_internal); - /* * lvgl extension definition for: - * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_get_value_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_grad_dir_t _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_anim_t *))lv_func_ptr)(arg0); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_get_value_cb_t_mpobj, 1, mp_funcptr_lv_anim_get_value_cb_t, funcptr_lv_anim_get_value_cb_t); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa_internal); - +static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); +static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); +typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * Struct lv_grad_stop_t + * Struct lv_anim_bezier3_para_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_stop_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_bezier3_para_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_stop_t_type())); - return (lv_grad_stop_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_bezier3_para_t_type())); + return (lv_anim_bezier3_para_t*)self->data; } -#define mp_write_lv_grad_stop_t(struct_obj) *((lv_grad_stop_t*)mp_write_ptr_lv_grad_stop_t(struct_obj)) +#define mp_write_lv_anim_bezier3_para_t(struct_obj) *((lv_anim_bezier3_para_t*)mp_write_ptr_lv_anim_bezier3_para_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_stop_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_bezier3_para_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_stop_t_type(), field); + return lv_to_mp_struct(get_mp_lv_anim_bezier3_para_t_type(), field); } -#define mp_read_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(copy_buffer(&field, sizeof(lv_grad_stop_t))) -#define mp_read_byref_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(&field) +#define mp_read_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) +#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) -static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_stop_t *data = (lv_grad_stop_t*)self->data; + GENMPY_UNUSED lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_frac: dest[0] = mp_obj_new_int_from_uint(data->frac); break; // converting from uint8_t; + case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int16_t; + case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int16_t; + case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int16_t; + case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int16_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6043,9 +5994,10 @@ static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_frac: data->frac = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_x1: data->x1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_y1: data->y1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_x2: data->x2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_y2: data->y2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; default: return; } @@ -6054,105 +6006,67 @@ static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_grad_stop_t_print(const mp_print_t *print, +static void mp_lv_anim_bezier3_para_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_grad_stop_t"); + mp_printf(print, "struct lv_anim_bezier3_para_t"); } -static const mp_obj_dict_t mp_lv_grad_stop_t_locals_dict; +static const mp_obj_dict_t mp_lv_anim_bezier3_para_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_stop_t_type, - MP_QSTR_lv_grad_stop_t, + mp_lv_anim_bezier3_para_t_type, + MP_QSTR_lv_anim_bezier3_para_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_stop_t_print, + print, mp_lv_anim_bezier3_para_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_stop_t_attr, - locals_dict, &mp_lv_grad_stop_t_locals_dict, + attr, mp_lv_anim_bezier3_para_t_attr, + locals_dict, &mp_lv_anim_bezier3_para_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void) { - return &mp_lv_grad_stop_t_type; + return &mp_lv_anim_bezier3_para_t_type; } /* - * Array convertors for lv_grad_stop_t [2] - */ - -GENMPY_UNUSED static lv_grad_stop_t *mp_arr_to_lv_grad_stop_t___2__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_grad_stop_t *lv_arr = (lv_grad_stop_t*)m_malloc(len * sizeof(lv_grad_stop_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_grad_stop_t(item); - } - return (lv_grad_stop_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_grad_stop_t___2__(lv_grad_stop_t *arr) -{ - mp_obj_t obj_arr[2]; - for (size_t i=0; i<2; i++){ - obj_arr[i] = mp_read_lv_grad_stop_t(arr[i]); - } - return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! -} - -typedef __typeof__( ((lv_grad_dsc_t*)(0))->params ) lv_grad_dsc_params_t; -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->linear ) lv_grad_dsc_params_linear_t; - -/* - * Struct lv_point_t + * Struct lv_anim_parameter_t */ -static inline const mp_obj_type_t *get_mp_lv_point_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_point_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_parameter_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_point_t_type())); - return (lv_point_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_parameter_t_type())); + return (lv_anim_parameter_t*)self->data; } -#define mp_write_lv_point_t(struct_obj) *((lv_point_t*)mp_write_ptr_lv_point_t(struct_obj)) +#define mp_write_lv_anim_parameter_t(struct_obj) *((lv_anim_parameter_t*)mp_write_ptr_lv_anim_parameter_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_point_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_parameter_t(void *field) { - return lv_to_mp_struct(get_mp_lv_point_t_type(), field); + return lv_to_mp_struct(get_mp_lv_anim_parameter_t_type(), field); } -#define mp_read_lv_point_t(field) mp_read_ptr_lv_point_t(copy_buffer(&field, sizeof(lv_point_t))) -#define mp_read_byref_lv_point_t(field) mp_read_ptr_lv_point_t(&field) +#define mp_read_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(copy_buffer(&field, sizeof(lv_anim_parameter_t))) +#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) -static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_point_t *data = (lv_point_t*)self->data; + GENMPY_UNUSED lv_anim_parameter_t *data = (lv_anim_parameter_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x: dest[0] = mp_obj_new_int(data->x); break; // converting from int32_t; - case MP_QSTR_y: dest[0] = mp_obj_new_int(data->y); break; // converting from int32_t; + case MP_QSTR_bezier3: dest[0] = mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); break; // converting from lv_anim_bezier3_para_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6161,8 +6075,7 @@ static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_x: data->x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y: data->y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_bezier3: data->bezier3 = mp_write_lv_anim_bezier3_para_t(dest[1]); break; // converting to lv_anim_bezier3_para_t; default: return; } @@ -6171,68 +6084,93 @@ static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_point_t_print(const mp_print_t *print, +static void mp_lv_anim_parameter_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_point_t"); + mp_printf(print, "struct lv_anim_parameter_t"); } -static const mp_obj_dict_t mp_lv_point_t_locals_dict; +static const mp_obj_dict_t mp_lv_anim_parameter_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_point_t_type, - MP_QSTR_lv_point_t, + mp_lv_anim_parameter_t_type, + MP_QSTR_lv_anim_parameter_t, MP_TYPE_FLAG_NONE, - print, mp_lv_point_t_print, + print, mp_lv_anim_parameter_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_point_t_attr, - locals_dict, &mp_lv_point_t_locals_dict, + attr, mp_lv_anim_parameter_t_attr, + locals_dict, &mp_lv_anim_parameter_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_point_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void) { - return &mp_lv_point_t_type; + return &mp_lv_anim_parameter_t_type; } /* - * Struct lv_grad_dsc_params_linear_t + * Struct lv_anim_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_linear_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_linear_t_type())); - return (lv_grad_dsc_params_linear_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_t_type())); + return (lv_anim_t*)self->data; } -#define mp_write_lv_grad_dsc_params_linear_t(struct_obj) *((lv_grad_dsc_params_linear_t*)mp_write_ptr_lv_grad_dsc_params_linear_t(struct_obj)) +#define mp_write_lv_anim_t(struct_obj) *((lv_anim_t*)mp_write_ptr_lv_anim_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_linear_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_linear_t_type(), field); + return lv_to_mp_struct(get_mp_lv_anim_t_type(), field); } -#define mp_read_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_linear_t))) -#define mp_read_byref_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(&field) +#define mp_read_lv_anim_t(field) mp_read_ptr_lv_anim_t(copy_buffer(&field, sizeof(lv_anim_t))) +#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) -static void mp_lv_grad_dsc_params_linear_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_anim_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)self->data; + GENMPY_UNUSED lv_anim_t *data = (lv_anim_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_start: dest[0] = mp_read_byref_lv_point_t(data->start); break; // converting from lv_point_t; - case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; + case MP_QSTR_var: dest[0] = ptr_to_mp((void*)data->var); break; // converting from void *; + case MP_QSTR_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, data->exec_cb, NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL); break; // converting from callback lv_anim_exec_xcb_t; + case MP_QSTR_custom_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, data->user_data); break; // converting from callback lv_anim_custom_exec_cb_t; + case MP_QSTR_start_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->start_cb, lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, data->user_data); break; // converting from callback lv_anim_start_cb_t; + case MP_QSTR_completed_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->completed_cb, lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, data->user_data); break; // converting from callback lv_anim_completed_cb_t; + case MP_QSTR_deleted_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->deleted_cb, lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, data->user_data); break; // converting from callback lv_anim_deleted_cb_t; + case MP_QSTR_get_value_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->get_value_cb, lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, data->user_data); break; // converting from callback lv_anim_get_value_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, data->user_data); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_start_value: dest[0] = mp_obj_new_int(data->start_value); break; // converting from int32_t; + case MP_QSTR_current_value: dest[0] = mp_obj_new_int(data->current_value); break; // converting from int32_t; + case MP_QSTR_end_value: dest[0] = mp_obj_new_int(data->end_value); break; // converting from int32_t; + case MP_QSTR_duration: dest[0] = mp_obj_new_int(data->duration); break; // converting from int32_t; + case MP_QSTR_act_time: dest[0] = mp_obj_new_int(data->act_time); break; // converting from int32_t; + case MP_QSTR_reverse_delay: dest[0] = mp_obj_new_int_from_uint(data->reverse_delay); break; // converting from uint32_t; + case MP_QSTR_reverse_duration: dest[0] = mp_obj_new_int_from_uint(data->reverse_duration); break; // converting from uint32_t; + case MP_QSTR_repeat_delay: dest[0] = mp_obj_new_int_from_uint(data->repeat_delay); break; // converting from uint32_t; + case MP_QSTR_repeat_cnt: dest[0] = mp_obj_new_int_from_uint(data->repeat_cnt); break; // converting from uint32_t; + case MP_QSTR_parameter: dest[0] = mp_read_byref_lv_anim_parameter_t(data->parameter); break; // converting from lv_anim_parameter_t; + case MP_QSTR_last_timer_run: dest[0] = mp_obj_new_int_from_uint(data->last_timer_run); break; // converting from uint32_t; + case MP_QSTR_pause_time: dest[0] = mp_obj_new_int_from_uint(data->pause_time); break; // converting from uint32_t; + case MP_QSTR_pause_duration: dest[0] = mp_obj_new_int_from_uint(data->pause_duration); break; // converting from uint32_t; + case MP_QSTR_is_paused: dest[0] = mp_obj_new_int_from_uint(data->is_paused); break; // converting from uint8_t; + case MP_QSTR_reverse_play_in_progress: dest[0] = mp_obj_new_int_from_uint(data->reverse_play_in_progress); break; // converting from uint8_t; + case MP_QSTR_run_round: dest[0] = mp_obj_new_int_from_uint(data->run_round); break; // converting from uint8_t; + case MP_QSTR_start_cb_called: dest[0] = mp_obj_new_int_from_uint(data->start_cb_called); break; // converting from uint8_t; + case MP_QSTR_early_apply: dest[0] = mp_obj_new_int_from_uint(data->early_apply); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6241,165 +6179,186 @@ static void mp_lv_grad_dsc_params_linear_t_attr(mp_obj_t self_in, qstr attr, mp_ // store attribute switch(attr) { - case MP_QSTR_start: data->start = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_grad_dsc_params_linear_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_grad_dsc_params_linear_t"); -} - -static const mp_obj_dict_t mp_lv_grad_dsc_params_linear_t_locals_dict; - + case MP_QSTR_var: data->var = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_exec_cb: data->exec_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_exec_xcb_t; + case MP_QSTR_custom_exec_cb: data->custom_exec_cb = mp_lv_callback(dest[1], lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_custom_exec_cb_t; + case MP_QSTR_start_cb: data->start_cb = mp_lv_callback(dest[1], lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_start_cb_t; + case MP_QSTR_completed_cb: data->completed_cb = mp_lv_callback(dest[1], lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_completed_cb_t; + case MP_QSTR_deleted_cb: data->deleted_cb = mp_lv_callback(dest[1], lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_deleted_cb_t; + case MP_QSTR_get_value_cb: data->get_value_cb = mp_lv_callback(dest[1], lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_get_value_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_start_value: data->start_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_current_value: data->current_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_end_value: data->end_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_duration: data->duration = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_act_time: data->act_time = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_reverse_delay: data->reverse_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_reverse_duration: data->reverse_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_repeat_delay: data->repeat_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_repeat_cnt: data->repeat_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_parameter: data->parameter = mp_write_lv_anim_parameter_t(dest[1]); break; // converting to lv_anim_parameter_t; + case MP_QSTR_last_timer_run: data->last_timer_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pause_time: data->pause_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pause_duration: data->pause_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_is_paused: data->is_paused = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_reverse_play_in_progress: data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_run_round: data->run_round = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_start_cb_called: data->start_cb_called = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_early_apply: data->early_apply = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_anim_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_anim_t"); +} + +static const mp_obj_dict_t mp_lv_anim_t_locals_dict; + static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_linear_t_type, - MP_QSTR_lv_grad_dsc_params_linear_t, + mp_lv_anim_t_type, + MP_QSTR_lv_anim_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_linear_t_print, + print, mp_lv_anim_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_linear_t_attr, - locals_dict, &mp_lv_grad_dsc_params_linear_t_locals_dict, + attr, mp_lv_anim_t_attr, + locals_dict, &mp_lv_anim_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void) { - return &mp_lv_grad_dsc_params_linear_t_type; + return &mp_lv_anim_t_type; } -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->radial ) lv_grad_dsc_params_radial_t; /* - * Struct lv_grad_dsc_params_radial_t + * lvgl extension definition for: + * void lv_obj_delete_anim_completed_cb(lv_anim_t *a) */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_radial_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_delete_anim_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_radial_t_type())); - return (lv_grad_dsc_params_radial_t*)self->data; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + ((void (*)(lv_anim_t *))lv_func_ptr)(a); + return mp_const_none; } -#define mp_write_lv_grad_dsc_params_radial_t(struct_obj) *((lv_grad_dsc_params_radial_t*)mp_write_ptr_lv_grad_dsc_params_radial_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_radial_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_delete_anim_completed_cb_mpobj, 1, mp_lv_obj_delete_anim_completed_cb, lv_obj_delete_anim_completed_cb); + +/* Reusing lv_obj_move_foreground for lv_obj_delete_async */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_async_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete_async); + + +/* + * lvgl extension definition for: + * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) + */ + +static mp_obj_t mp_lv_obj_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_radial_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *parent = mp_to_lv(mp_args[1]); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(obj, parent); + return mp_const_none; } -#define mp_read_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_radial_t))) -#define mp_read_byref_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(&field) + -static void mp_lv_grad_dsc_params_radial_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_parent_mpobj, 2, mp_lv_obj_set_parent, lv_obj_set_parent); + +/* Reusing lv_obj_set_parent for lv_obj_swap */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_focal: dest[0] = mp_read_byref_lv_point_t(data->focal); break; // converting from lv_point_t; - case MP_QSTR_focal_extent: dest[0] = mp_read_byref_lv_point_t(data->focal_extent); break; // converting from lv_point_t; - case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; - case MP_QSTR_end_extent: dest[0] = mp_read_byref_lv_point_t(data->end_extent); break; // converting from lv_point_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_focal: data->focal = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_focal_extent: data->focal_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_end_extent: data->end_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_swap_mpobj, 2, mp_lv_obj_set_parent, lv_obj_swap); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) + */ -static void mp_lv_grad_dsc_params_radial_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_move_to_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_grad_dsc_params_radial_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t index = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, index); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_grad_dsc_params_radial_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_radial_t_type, - MP_QSTR_lv_grad_dsc_params_radial_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_radial_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_radial_t_attr, - locals_dict, &mp_lv_grad_dsc_params_radial_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_index_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_move_to_index); + -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void) +/* + * lvgl extension definition for: + * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_get_screen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_grad_dsc_params_radial_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return lv_to_mp((void*)_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_screen_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_screen); -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->conical ) lv_grad_dsc_params_conical_t; /* - * Struct lv_grad_dsc_params_conical_t + * Struct lv_image_header_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_conical_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_conical_t_type())); - return (lv_grad_dsc_params_conical_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); + return (lv_image_header_t*)self->data; } -#define mp_write_lv_grad_dsc_params_conical_t(struct_obj) *((lv_grad_dsc_params_conical_t*)mp_write_ptr_lv_grad_dsc_params_conical_t(struct_obj)) +#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_conical_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_conical_t_type(), field); + return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); } -#define mp_read_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_conical_t))) -#define mp_read_byref_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(&field) +#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) +#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) -static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)self->data; + GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_center: dest[0] = mp_read_byref_lv_point_t(data->center); break; // converting from lv_point_t; - case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int16_t; - case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int16_t; + case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; + case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; + case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; + case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; + case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6408,9 +6367,13 @@ static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp // store attribute switch(attr) { - case MP_QSTR_center: data->center = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_start_angle: data->start_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_end_angle: data->end_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -6419,154 +6382,129 @@ static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_grad_dsc_params_conical_t_print(const mp_print_t *print, +static void mp_lv_image_header_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_grad_dsc_params_conical_t"); + mp_printf(print, "struct lv_image_header_t"); } -static const mp_obj_dict_t mp_lv_grad_dsc_params_conical_t_locals_dict; +static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_conical_t_type, - MP_QSTR_lv_grad_dsc_params_conical_t, + mp_lv_image_header_t_type, + MP_QSTR_lv_image_header_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_conical_t_print, + print, mp_lv_image_header_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_conical_t_attr, - locals_dict, &mp_lv_grad_dsc_params_conical_t_locals_dict, + attr, mp_lv_image_header_t_attr, + locals_dict, &mp_lv_image_header_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) { - return &mp_lv_grad_dsc_params_conical_t_type; + return &mp_lv_image_header_t_type; } +#define funcptr_lv_draw_buf_malloc_cb_t NULL + /* - * Struct lv_grad_dsc_params_t + * lvgl extension definition for: + * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_t(mp_obj_t self_in) +static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_t_type())); - return (lv_grad_dsc_params_t*)self->data; + size_t size = (size_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); + return ptr_to_mp((void*)_res); } -#define mp_write_lv_grad_dsc_params_t(struct_obj) *((lv_grad_dsc_params_t*)mp_write_ptr_lv_grad_dsc_params_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -#define mp_read_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_t))) -#define mp_read_byref_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(&field) -static void mp_lv_grad_dsc_params_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)self->data; +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' + * lv_draw_buf_malloc_cb_t buf_malloc_cb + */ + +#define funcptr_lv_draw_buf_free_cb_t NULL - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_linear: dest[0] = mp_read_byref_lv_grad_dsc_params_linear_t(data->linear); break; // converting from lv_grad_dsc_params_linear_t; - case MP_QSTR_radial: dest[0] = mp_read_byref_lv_grad_dsc_params_radial_t(data->radial); break; // converting from lv_grad_dsc_params_radial_t; - case MP_QSTR_conical: dest[0] = mp_read_byref_lv_grad_dsc_params_conical_t(data->conical); break; // converting from lv_grad_dsc_params_conical_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_linear: data->linear = mp_write_lv_grad_dsc_params_linear_t(dest[1]); break; // converting to lv_grad_dsc_params_linear_t; - case MP_QSTR_radial: data->radial = mp_write_lv_grad_dsc_params_radial_t(dest[1]); break; // converting to lv_grad_dsc_params_radial_t; - case MP_QSTR_conical: data->conical = mp_write_lv_grad_dsc_params_conical_t(dest[1]); break; // converting to lv_grad_dsc_params_conical_t; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_draw_buf_free_cb_t(void *draw_buf) + */ -static void mp_lv_grad_dsc_params_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_grad_dsc_params_t"); + void *draw_buf = mp_to_ptr(mp_args[0]); + ((void (*)(void *))lv_func_ptr)(draw_buf); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_grad_dsc_params_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_t_type, - MP_QSTR_lv_grad_dsc_params_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_t_attr, - locals_dict, &mp_lv_grad_dsc_params_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void) -{ - return &mp_lv_grad_dsc_params_t_type; -} + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' + * lv_draw_buf_free_cb_t buf_free_cb + */ +#define funcptr_lv_draw_buf_copy_cb_t NULL + /* - * Struct lv_grad_dsc_t + * Struct lv_area_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_t_type())); - return (lv_grad_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); + return (lv_area_t*)self->data; } -#define mp_write_lv_grad_dsc_t(struct_obj) *((lv_grad_dsc_t*)mp_write_ptr_lv_grad_dsc_t(struct_obj)) +#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_area_t_type(), field); } -#define mp_read_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(copy_buffer(&field, sizeof(lv_grad_dsc_t))) -#define mp_read_byref_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(&field) +#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) +#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) -static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_t *data = (lv_grad_dsc_t*)self->data; + GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_stops: dest[0] = mp_lv_struct_array_new(self_in, data->stops, 2, sizeof(lv_grad_stop_t), mp_read_ptr_lv_grad_stop_t, mp_write_ptr_lv_grad_stop_t); break; // converting from lv_grad_stop_t [2]; - case MP_QSTR_stops_count: dest[0] = mp_obj_new_int_from_uint(data->stops_count); break; // converting from uint8_t; - case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_grad_dir_t; - case MP_QSTR_extend: dest[0] = mp_obj_new_int(data->extend); break; // converting from lv_grad_extend_t; - case MP_QSTR_params: dest[0] = mp_read_byref_lv_grad_dsc_params_t(data->params); break; // converting from lv_grad_dsc_params_t; - case MP_QSTR_state: dest[0] = ptr_to_mp((void*)data->state); break; // converting from void *; + case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; + case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; + case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; + case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6575,12 +6513,10 @@ static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_stops: mp_lv_struct_array_assign(data->stops, 2, sizeof(lv_grad_stop_t), mp_write_ptr_lv_grad_stop_t, dest[1]); break; // converting to lv_grad_stop_t [2]; - case MP_QSTR_stops_count: data->stops_count = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_dir_t; - case MP_QSTR_extend: data->extend = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_extend_t; - case MP_QSTR_params: data->params = mp_write_lv_grad_dsc_params_t(dest[1]); break; // converting to lv_grad_dsc_params_t; - case MP_QSTR_state: data->state = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -6589,240 +6525,296 @@ static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_grad_dsc_t_print(const mp_print_t *print, +static void mp_lv_area_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_grad_dsc_t"); + mp_printf(print, "struct lv_area_t"); } -static const mp_obj_dict_t mp_lv_grad_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_area_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_t_type, - MP_QSTR_lv_grad_dsc_t, + mp_lv_area_t_type, + MP_QSTR_lv_area_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_t_print, + print, mp_lv_area_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_t_attr, - locals_dict, &mp_lv_grad_dsc_t_locals_dict, + attr, mp_lv_area_t_attr, + locals_dict, &mp_lv_area_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) { - return &mp_lv_grad_dsc_t_type; + return &mp_lv_area_t_type; } /* * lvgl extension definition for: - * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_grad_dsc_t * _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_grad_dsc_t((void*)_res); + lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' + * lv_draw_buf_copy_cb_t buf_copy_cb + */ +#define funcptr_lv_draw_buf_align_cb_t NULL + /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bg_image_src_internal(const lv_obj_t *obj, lv_part_t part) + * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_src_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const void * _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + void *buf = mp_to_ptr(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' + * lv_draw_buf_align_cb_t align_pointer_cb + */ -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa_internal */ +#define funcptr_lv_draw_buf_cache_operation_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa_internal); - /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_bg_image_tiled_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_tiled_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return convert_to_bool(_res); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width_internal */ +#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width_internal); - /* * lvgl extension definition for: - * inline static lv_border_side_t lv_obj_get_style_border_side_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_obj_get_style_border_side_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_border_side_t _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_internal_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_internal */ +#define funcptr_lv_draw_buf_clear_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered_internal */ +#define funcptr_dispatch_cb NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad_internal */ +/* + * lvgl extension definition for: + * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width_internal */ +static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_layer_t *layer = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' + * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + */ -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_internal */ +#define funcptr_evaluate_cb NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa_internal */ +/* + * lvgl extension definition for: + * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + */ + +static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_draw_task_t *task = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa_internal); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa_internal); + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' + * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + */ -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_internal */ +#define funcptr_wait_for_finish_cb NULL + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_internal); +/* + * lvgl extension definition for: + * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + */ + +static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered_internal); + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' + * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) + */ -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' + * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) + */ +#define funcptr_event_cb NULL + /* - * Struct lv_image_colorkey_t + * Struct lv_event_t */ -static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_colorkey_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_colorkey_t_type())); - return (lv_image_colorkey_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); + return (lv_event_t*)self->data; } -#define mp_write_lv_image_colorkey_t(struct_obj) *((lv_image_colorkey_t*)mp_write_ptr_lv_image_colorkey_t(struct_obj)) +#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_colorkey_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_colorkey_t_type(), field); + return lv_to_mp_struct(get_mp_lv_event_t_type(), field); } -#define mp_read_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(copy_buffer(&field, sizeof(lv_image_colorkey_t))) -#define mp_read_byref_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(&field) +#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) +#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) -static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_colorkey_t *data = (lv_image_colorkey_t*)self->data; + GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_low: dest[0] = mp_read_byref_lv_color_t(data->low); break; // converting from lv_color_t; - case MP_QSTR_high: dest[0] = mp_read_byref_lv_color_t(data->high); break; // converting from lv_color_t; + case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; + case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; + case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; + case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; + case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; + case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; + case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; + case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6831,8 +6823,16 @@ static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_low: data->low = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_high: data->high = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; + case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -6841,153 +6841,100 @@ static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_image_colorkey_t_print(const mp_print_t *print, +static void mp_lv_event_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_colorkey_t"); + mp_printf(print, "struct lv_event_t"); } -static const mp_obj_dict_t mp_lv_image_colorkey_t_locals_dict; +static const mp_obj_dict_t mp_lv_event_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_colorkey_t_type, - MP_QSTR_lv_image_colorkey_t, + mp_lv_event_t_type, + MP_QSTR_lv_event_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_colorkey_t_print, + print, mp_lv_event_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_colorkey_t_attr, - locals_dict, &mp_lv_image_colorkey_t_locals_dict, + attr, mp_lv_event_t_attr, + locals_dict, &mp_lv_event_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) { - return &mp_lv_image_colorkey_t_type; + return &mp_lv_event_t_type; } /* * lvgl extension definition for: - * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey_internal(const lv_obj_t *obj, lv_part_t part) + * void event_cb(lv_event_t *event) */ -static mp_obj_t mp_lv_obj_get_style_image_colorkey_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_image_colorkey_t * _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_image_colorkey_t((void*)_res); + lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); + ((void (*)(lv_event_t *))lv_func_ptr)(event); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_internal_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap_internal); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width_internal); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa_internal); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' + * void (*event_cb)(lv_event_t *event) + */ -#define funcptr_get_glyph_dsc NULL - -typedef __typeof__( ((lv_font_glyph_dsc_t*)(0))->gid ) lv_font_glyph_dsc_gid_t; /* - * Struct lv_font_glyph_dsc_gid_t + * Struct lv_draw_unit_t */ -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_gid_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_gid_t_type())); - return (lv_font_glyph_dsc_gid_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); + return (lv_draw_unit_t*)self->data; } -#define mp_write_lv_font_glyph_dsc_gid_t(struct_obj) *((lv_font_glyph_dsc_gid_t*)mp_write_ptr_lv_font_glyph_dsc_gid_t(struct_obj)) +#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_gid_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) { - return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_gid_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); } -#define mp_read_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_gid_t))) -#define mp_read_byref_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(&field) +#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) +#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) -static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)self->data; + GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_index: dest[0] = mp_obj_new_int_from_uint(data->index); break; // converting from uint32_t; - case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; + case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6996,8 +6943,14 @@ static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ // store attribute switch(attr) { - case MP_QSTR_index: data->index = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); default: return; } @@ -7006,79 +6959,78 @@ static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ } } -static void mp_lv_font_glyph_dsc_gid_t_print(const mp_print_t *print, +static void mp_lv_draw_unit_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_glyph_dsc_gid_t"); + mp_printf(print, "struct lv_draw_unit_t"); } -static const mp_obj_dict_t mp_lv_font_glyph_dsc_gid_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_glyph_dsc_gid_t_type, - MP_QSTR_lv_font_glyph_dsc_gid_t, + mp_lv_draw_unit_t_type, + MP_QSTR_lv_draw_unit_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_glyph_dsc_gid_t_print, + print, mp_lv_draw_unit_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_glyph_dsc_gid_t_attr, - locals_dict, &mp_lv_font_glyph_dsc_gid_t_locals_dict, + attr, mp_lv_draw_unit_t_attr, + locals_dict, &mp_lv_draw_unit_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) { - return &mp_lv_font_glyph_dsc_gid_t_type; + return &mp_lv_draw_unit_t_type; } /* - * Struct lv_font_glyph_dsc_t + * Struct lv_draw_task_t */ -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); - return (lv_font_glyph_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); + return (lv_draw_task_t*)self->data; } -#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) +#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) { - return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); } -#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) -#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) +#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) +#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) -static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; - case MP_QSTR_entry: dest[0] = ptr_to_mp((void*)data->entry); break; // converting from void *; - case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; - case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; - case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; - case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; - case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; - case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; - case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; - case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; + case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; + case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; + case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; + case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; + case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; + case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7087,19 +7039,18 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_entry: data->entry = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; - case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; + case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -7108,98 +7059,70 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_task_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_glyph_dsc_t"); + mp_printf(print, "struct lv_draw_task_t"); } -static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_glyph_dsc_t_type, - MP_QSTR_lv_font_glyph_dsc_t, + mp_lv_draw_task_t_type, + MP_QSTR_lv_draw_task_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_glyph_dsc_t_print, + print, mp_lv_draw_task_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_glyph_dsc_t_attr, - locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, + attr, mp_lv_draw_task_t_attr, + locals_dict, &mp_lv_draw_task_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) -{ - return &mp_lv_font_glyph_dsc_t_type; -} - - -/* - * lvgl extension definition for: - * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) - */ - -static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) { - const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(font, dsc_out, letter, letter_next); - return convert_to_bool(_res); + return &mp_lv_draw_task_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } - -static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); -#define funcptr_get_glyph_bitmap NULL - /* - * Struct lv_image_header_t + * Struct lv_color32_t */ -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); - return (lv_image_header_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); + return (lv_color32_t*)self->data; } -#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) +#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); + return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); } -#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) -#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) +#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) +#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) -static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; + GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; - case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; - case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; - case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; - case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; + case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7208,13 +7131,10 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des // store attribute switch(attr) { - case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -7223,129 +7143,81 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des } } -static void mp_lv_image_header_t_print(const mp_print_t *print, +static void mp_lv_color32_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_header_t"); + mp_printf(print, "struct lv_color32_t"); } -static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; +static const mp_obj_dict_t mp_lv_color32_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_header_t_type, - MP_QSTR_lv_image_header_t, + mp_lv_color32_t_type, + MP_QSTR_lv_color32_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_header_t_print, + print, mp_lv_color32_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_header_t_attr, - locals_dict, &mp_lv_image_header_t_locals_dict, + attr, mp_lv_color32_t_attr, + locals_dict, &mp_lv_color32_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) -{ - return &mp_lv_image_header_t_type; -} - -#define funcptr_lv_draw_buf_malloc_cb_t NULL - - -/* - * lvgl extension definition for: - * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - size_t size = (size_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ - -#define funcptr_lv_draw_buf_free_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_draw_buf_free_cb_t(void *draw_buf) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) { - void *draw_buf = mp_to_ptr(mp_args[0]); - ((void (*)(void *))lv_func_ptr)(draw_buf); - return mp_const_none; + return &mp_lv_color32_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' - * lv_draw_buf_free_cb_t buf_free_cb - */ -#define funcptr_lv_draw_buf_copy_cb_t NULL - /* - * Struct lv_area_t + * Struct lv_layer_t */ -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); - return (lv_area_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); + return (lv_layer_t*)self->data; } -#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) +#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_area_t_type(), field); + return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); } -#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) -#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) +#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) +#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) -static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; + GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; - case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; - case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; - case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; + case MP_QSTR_draw_buf: dest[0] = ptr_to_mp((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; + case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; + case MP_QSTR_display: dest[0] = ptr_to_mp((void*)data->display); break; // converting from lv_display_t *; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; + case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; + case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; + case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; + case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_buffer_owned: dest[0] = convert_to_bool(data->buffer_owned); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7354,10 +7226,21 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_display: data->display = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_buffer_owned: data->buffer_owned = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -7366,296 +7249,191 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_area_t_print(const mp_print_t *print, +static void mp_lv_layer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_area_t"); + mp_printf(print, "struct lv_layer_t"); } -static const mp_obj_dict_t mp_lv_area_t_locals_dict; +static const mp_obj_dict_t mp_lv_layer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_area_t_type, - MP_QSTR_lv_area_t, + mp_lv_layer_t_type, + MP_QSTR_lv_layer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_area_t_print, + print, mp_lv_layer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_area_t_attr, - locals_dict, &mp_lv_area_t_locals_dict, + attr, mp_lv_layer_t_attr, + locals_dict, &mp_lv_layer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) { - return &mp_lv_area_t_type; + return &mp_lv_layer_t_type; } /* * lvgl extension definition for: - * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ -static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_clear_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); + lv_draw_buf_t *draw_buf = mp_to_ptr(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_func_ptr)(draw_buf, a, layer); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, funcptr_lv_draw_buf_clear_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - -#define funcptr_lv_draw_buf_align_cb_t NULL - - -/* - * lvgl extension definition for: - * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_clear_cb_callback' + * lv_draw_buf_clear_cb_t buf_clear_cb */ - -static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *buf = mp_to_ptr(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' - * lv_draw_buf_align_cb_t align_pointer_cb + * Struct lv_draw_buf_handlers_t */ - -#define funcptr_lv_draw_buf_cache_operation_cb_t NULL +static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void); -/* - * lvgl extension definition for: - * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_handlers_t(mp_obj_t self_in) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_handlers_t_type())); + return (lv_draw_buf_handlers_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t flush_cache_cb - */ - -#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL - - -/* - * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) - */ +#define mp_write_lv_draw_buf_handlers_t(struct_obj) *((lv_draw_buf_handlers_t*)mp_write_ptr_lv_draw_buf_handlers_t(struct_obj)) -static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_handlers_t(void *field) { - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp_struct(get_mp_lv_draw_buf_handlers_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ - -#define funcptr_lv_draw_buf_clear_cb_t NULL - -#define funcptr_dispatch_cb NULL - - -/* - * lvgl extension definition for: - * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ +#define mp_read_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) +#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) -static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_layer_t *layer = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' - * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ - -#define funcptr_evaluate_cb NULL + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)self->data; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_buf_malloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, data->buf_malloc_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL); break; // converting from callback lv_draw_buf_malloc_cb_t; + case MP_QSTR_buf_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, data->buf_free_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL); break; // converting from callback lv_draw_buf_free_cb_t; + case MP_QSTR_buf_copy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, data->buf_copy_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL); break; // converting from callback lv_draw_buf_copy_cb_t; + case MP_QSTR_align_pointer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, data->align_pointer_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL); break; // converting from callback lv_draw_buf_align_cb_t; + case MP_QSTR_invalidate_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->invalidate_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_flush_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->flush_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_width_to_stride_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, data->width_to_stride_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL); break; // converting from callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, data->buf_clear_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL); break; // converting from callback lv_draw_buf_clear_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_buf_malloc_cb: data->buf_malloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_malloc_cb_t; + case MP_QSTR_buf_free_cb: data->buf_free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_free_cb_t; + case MP_QSTR_buf_copy_cb: data->buf_copy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_copy_cb_t; + case MP_QSTR_align_pointer_cb: data->align_pointer_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_align_cb_t; + case MP_QSTR_invalidate_cache_cb: data->invalidate_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_flush_cache_cb: data->flush_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_width_to_stride_cb: data->width_to_stride_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: data->buf_clear_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_clear_cb_t; + default: return; + } -/* - * lvgl extension definition for: - * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_draw_buf_handlers_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_draw_task_t *task = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_draw_buf_handlers_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' - * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ - -#define funcptr_wait_for_finish_cb NULL - +static const mp_obj_dict_t mp_lv_draw_buf_handlers_t_locals_dict; -/* - * lvgl extension definition for: - * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_buf_handlers_t_type, + MP_QSTR_lv_draw_buf_handlers_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_buf_handlers_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_buf_handlers_t_attr, + locals_dict, &mp_lv_draw_buf_handlers_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); - return mp_obj_new_int(_res); + return &mp_lv_draw_buf_handlers_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' - * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) - */ - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' - * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) - */ -#define funcptr_event_cb NULL - /* - * Struct lv_event_t + * Struct lv_draw_buf_t */ -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); - return (lv_event_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_t_type())); + return (lv_draw_buf_t*)self->data; } -#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) +#define mp_write_lv_draw_buf_t(struct_obj) *((lv_draw_buf_t*)mp_write_ptr_lv_draw_buf_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_t(void *field) { - return lv_to_mp_struct(get_mp_lv_event_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_buf_t_type(), field); } -#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) -#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) +#define mp_read_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(copy_buffer(&field, sizeof(lv_draw_buf_t))) +#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) -static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; + GENMPY_UNUSED lv_draw_buf_t *data = (lv_draw_buf_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; - case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; - case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; - case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; - case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; - case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; - case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; - case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; + case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; + case MP_QSTR_data_size: dest[0] = mp_obj_new_int_from_uint(data->data_size); break; // converting from uint32_t; + case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; + case MP_QSTR_unaligned_data: dest[0] = ptr_to_mp((void*)data->unaligned_data); break; // converting from void *; + case MP_QSTR_handlers: dest[0] = mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); break; // converting from lv_draw_buf_handlers_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7664,16 +7442,11 @@ static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; - case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; + case MP_QSTR_data_size: data->data_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; + case MP_QSTR_unaligned_data: data->unaligned_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_handlers: data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(dest[1]); break; // converting to lv_draw_buf_handlers_t *; default: return; } @@ -7682,100 +7455,139 @@ static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_event_t_print(const mp_print_t *print, +static void mp_lv_draw_buf_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_event_t"); + mp_printf(print, "struct lv_draw_buf_t"); } -static const mp_obj_dict_t mp_lv_event_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_buf_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_event_t_type, - MP_QSTR_lv_event_t, + mp_lv_draw_buf_t_type, + MP_QSTR_lv_draw_buf_t, MP_TYPE_FLAG_NONE, - print, mp_lv_event_t_print, + print, mp_lv_draw_buf_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_event_t_attr, - locals_dict, &mp_lv_event_t_locals_dict, + attr, mp_lv_draw_buf_t_attr, + locals_dict, &mp_lv_draw_buf_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void) { - return &mp_lv_event_t_type; + return &mp_lv_draw_buf_t_type; } +#define funcptr_lv_display_flush_cb_t NULL + /* * lvgl extension definition for: - * void event_cb(lv_event_t *event) + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) */ -static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); - ((void (*)(lv_event_t *))lv_func_ptr)(event); + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); + ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); +#define funcptr_lv_display_flush_wait_cb_t NULL /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' - * void (*event_cb)(lv_event_t *event) + * lvgl extension definition for: + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ + +static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_to_ptr(mp_args[0]); + ((void (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); +#define funcptr_lv_display_sync_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) */ + +static mp_obj_t mp_funcptr_lv_display_sync_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_sync_cb_t_mpobj, 2, mp_funcptr_lv_display_sync_cb_t, funcptr_lv_display_sync_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); +static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); /* - * Struct lv_draw_unit_t + * Struct lv_ll_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); - return (lv_draw_unit_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); + return (lv_ll_t*)self->data; } -#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) +#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); + return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); } -#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) -#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) +#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) +#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) -static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; + GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; - case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); + case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; + case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; + case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7784,14 +7596,9 @@ static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); + case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; + case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; default: return; } @@ -7800,289 +7607,37 @@ static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_draw_unit_t_print(const mp_print_t *print, +static void mp_lv_ll_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_unit_t"); + mp_printf(print, "struct lv_ll_t"); } -static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; +static const mp_obj_dict_t mp_lv_ll_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_unit_t_type, - MP_QSTR_lv_draw_unit_t, + mp_lv_ll_t_type, + MP_QSTR_lv_ll_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_unit_t_print, + print, mp_lv_ll_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_unit_t_attr, - locals_dict, &mp_lv_draw_unit_t_locals_dict, + attr, mp_lv_ll_t_attr, + locals_dict, &mp_lv_ll_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) { - return &mp_lv_draw_unit_t_type; + return &mp_lv_ll_t_type; } /* - * Struct lv_draw_task_t - */ - -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); - return (lv_draw_task_t*)self->data; -} - -#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); -} - -#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) -#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) - -static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; - case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; - case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; - case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; - case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; - case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; - case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; - case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; - case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_draw_task_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_draw_task_t"); -} - -static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_task_t_type, - MP_QSTR_lv_draw_task_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_task_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_task_t_attr, - locals_dict, &mp_lv_draw_task_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) -{ - return &mp_lv_draw_task_t_type; -} - -#define funcptr_lv_display_flush_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) - */ - -static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); - ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); -#define funcptr_lv_display_flush_wait_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_display_flush_wait_cb_t(lv_display_t *disp) - */ - -static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_to_ptr(mp_args[0]); - ((void (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); -#define funcptr_lv_display_sync_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) - */ - -static mp_obj_t mp_funcptr_lv_display_sync_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_sync_cb_t_mpobj, 2, mp_funcptr_lv_display_sync_cb_t, funcptr_lv_display_sync_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); -static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); - -/* - * Struct lv_ll_t - */ - -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); - return (lv_ll_t*)self->data; -} - -#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); -} - -#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) -#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) - -static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; - case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; - case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; - case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_ll_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_ll_t"); -} - -static const mp_obj_dict_t mp_lv_ll_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_ll_t_type, - MP_QSTR_lv_ll_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_ll_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_ll_t_attr, - locals_dict, &mp_lv_ll_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) -{ - return &mp_lv_ll_t_type; -} - - -/* - * Array convertors for lv_area_t [32] + * Array convertors for lv_area_t [32] */ GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t___32__(mp_obj_t mp_arr) @@ -8150,8 +7705,6 @@ GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t___32__(uint8_t *arr) return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! } -/* Already started generating lv_draw_buf_t! skipping field '_static_buf1' */ -/* Already started generating lv_draw_buf_t! skipping field '_static_buf2' */ /* * Struct lv_array_t @@ -8345,46 +7898,39 @@ GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_theme_apply_cb_t(void *fun static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); /* - * Struct lv_theme_t + * Struct lv_color_t */ -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_color_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); - return (lv_theme_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_t_type())); + return (lv_color_t*)self->data; } -#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) +#define mp_write_lv_color_t(struct_obj) *((lv_color_t*)mp_write_ptr_lv_color_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_t(void *field) { - return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); + return lv_to_mp_struct(get_mp_lv_color_t_type(), field); } -#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) -#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) +#define mp_read_lv_color_t(field) mp_read_ptr_lv_color_t(copy_buffer(&field, sizeof(lv_color_t))) +#define mp_read_byref_lv_color_t(field) mp_read_ptr_lv_color_t(&field) -static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_color_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; + GENMPY_UNUSED lv_color_t *data = (lv_color_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; - case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; - case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; - case MP_QSTR_font_small: dest[0] = ptr_to_mp((void*)data->font_small); break; // converting from lv_font_t *; - case MP_QSTR_font_normal: dest[0] = ptr_to_mp((void*)data->font_normal); break; // converting from lv_font_t *; - case MP_QSTR_font_large: dest[0] = ptr_to_mp((void*)data->font_large); break; // converting from lv_font_t *; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8393,16 +7939,9 @@ static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_font_small: data->font_small = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_normal: data->font_normal = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_large: data->font_large = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -8411,95 +7950,71 @@ static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_theme_t_print(const mp_print_t *print, +static void mp_lv_color_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_theme_t"); + mp_printf(print, "struct lv_color_t"); } -static const mp_obj_dict_t mp_lv_theme_t_locals_dict; +static const mp_obj_dict_t mp_lv_color_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_theme_t_type, - MP_QSTR_lv_theme_t, + mp_lv_color_t_type, + MP_QSTR_lv_color_t, MP_TYPE_FLAG_NONE, - print, mp_lv_theme_t_print, + print, mp_lv_color_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_theme_t_attr, - locals_dict, &mp_lv_theme_t_locals_dict, + attr, mp_lv_color_t_attr, + locals_dict, &mp_lv_color_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) -{ - return &mp_lv_theme_t_type; -} - -#define funcptr_lv_timer_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_timer_cb_t(lv_timer_t *) - */ - -static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_color_t_type(void) { - lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); - ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); - return mp_const_none; + return &mp_lv_color_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +#define funcptr_get_glyph_dsc NULL -static void lv_timer_t_timer_cb_callback(lv_timer_t *); +typedef __typeof__( ((lv_font_glyph_dsc_t*)(0))->gid ) lv_font_glyph_dsc_gid_t; /* - * Struct lv_timer_t + * Struct lv_font_glyph_dsc_gid_t */ -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_gid_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); - return (lv_timer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_gid_t_type())); + return (lv_font_glyph_dsc_gid_t*)self->data; } -#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) +#define mp_write_lv_font_glyph_dsc_gid_t(struct_obj) *((lv_font_glyph_dsc_gid_t*)mp_write_ptr_lv_font_glyph_dsc_gid_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_gid_t(void *field) { - return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_gid_t_type(), field); } -#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) -#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) +#define mp_read_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_gid_t))) +#define mp_read_byref_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(&field) -static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; + GENMPY_UNUSED lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; - case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; - case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; - case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; - case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; + case MP_QSTR_index: dest[0] = mp_obj_new_int_from_uint(data->index); break; // converting from uint32_t; + case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8508,13 +8023,8 @@ static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_index: data->index = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -8523,119 +8033,79 @@ static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_timer_t_print(const mp_print_t *print, +static void mp_lv_font_glyph_dsc_gid_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_timer_t"); + mp_printf(print, "struct lv_font_glyph_dsc_gid_t"); } -static const mp_obj_dict_t mp_lv_timer_t_locals_dict; +static const mp_obj_dict_t mp_lv_font_glyph_dsc_gid_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_timer_t_type, - MP_QSTR_lv_timer_t, + mp_lv_font_glyph_dsc_gid_t_type, + MP_QSTR_lv_font_glyph_dsc_gid_t, MP_TYPE_FLAG_NONE, - print, mp_lv_timer_t_print, + print, mp_lv_font_glyph_dsc_gid_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_timer_t_attr, - locals_dict, &mp_lv_timer_t_locals_dict, + attr, mp_lv_font_glyph_dsc_gid_t_attr, + locals_dict, &mp_lv_font_glyph_dsc_gid_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void) { - return &mp_lv_timer_t_type; + return &mp_lv_font_glyph_dsc_gid_t_type; } /* - * Struct lv_display_t + * Struct lv_font_glyph_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); - return (lv_display_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); + return (lv_font_glyph_dsc_t*)self->data; } -#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) +#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_display_t_type(), field); + return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); } -#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) -#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) +#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) +#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) -static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; + GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; - case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; - case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; - case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; - case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; - case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; - case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; - case MP_QSTR_buf_1: dest[0] = ptr_to_mp((void*)data->buf_1); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_2: dest[0] = ptr_to_mp((void*)data->buf_2); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_3: dest[0] = ptr_to_mp((void*)data->buf_3); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_act: dest[0] = ptr_to_mp((void*)data->buf_act); break; // converting from lv_draw_buf_t *; - case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; - case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; - case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; - case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; - case MP_QSTR_sync_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, data->sync_cb, lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, data->user_data); break; // converting from callback lv_display_sync_cb_t; - case MP_QSTR_sync_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, data->user_data); break; // converting from callback lv_display_sync_wait_cb_t; - case MP_QSTR_syncing: dest[0] = mp_obj_new_int(data->syncing); break; // converting from int; - case MP_QSTR_syncing_last: dest[0] = mp_obj_new_int(data->syncing_last); break; // converting from int; - case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; - case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; - case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; - case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; - case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; - case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; - case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; - case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; - case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; - case MP_QSTR_layer_head: dest[0] = ptr_to_mp((void*)data->layer_head); break; // converting from lv_layer_t *; - case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; - case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; - case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; - case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; - case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; - case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; - case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; - case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; - case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; - case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; - case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; - case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; - case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; - case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; - case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; - case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; - case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; + case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; + case MP_QSTR_entry: dest[0] = ptr_to_mp((void*)data->entry); break; // converting from void *; + case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; + case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; + case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; + case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; + case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; + case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; + case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8644,59 +8114,19 @@ static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_buf_1: data->buf_1 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_2: data->buf_2 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_3: data->buf_3 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_act: data->buf_act = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_sync_cb: data->sync_cb = mp_lv_callback(dest[1], lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_cb_t; - case MP_QSTR_sync_wait_cb: data->sync_wait_cb = mp_lv_callback(dest[1], lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_wait_cb_t; - case MP_QSTR_syncing: data->syncing = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_syncing_last: data->syncing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; - case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; - case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; - case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; - case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_layer_head: data->layer_head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; - case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; - case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; - case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_entry: data->entry = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -8705,70 +8135,156 @@ static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_display_t_print(const mp_print_t *print, +static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_display_t"); + mp_printf(print, "struct lv_font_glyph_dsc_t"); } -static const mp_obj_dict_t mp_lv_display_t_locals_dict; +static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_display_t_type, - MP_QSTR_lv_display_t, + mp_lv_font_glyph_dsc_t_type, + MP_QSTR_lv_font_glyph_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_display_t_print, + print, mp_lv_font_glyph_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_display_t_attr, - locals_dict, &mp_lv_display_t_locals_dict, + attr, mp_lv_font_glyph_dsc_t_attr, + locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) { - return &mp_lv_display_t_type; + return &mp_lv_font_glyph_dsc_t_type; } /* - * Struct lv_color32_t + * lvgl extension definition for: + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); +static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(font, dsc_out, letter, letter_next); + return convert_to_bool(_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } + +static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); +#define funcptr_get_glyph_bitmap NULL + + +/* + * lvgl extension definition for: + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + */ + +static mp_obj_t mp_funcptr_get_glyph_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); - return (lv_color32_t*)self->data; + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(g_dsc, draw_buf); + return ptr_to_mp((void*)_res); } -#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, funcptr_get_glyph_bitmap); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_t_get_glyph_bitmap_callback' + * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + */ + +#define funcptr_release_glyph NULL + + +/* + * lvgl extension definition for: + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) + */ + +static mp_obj_t mp_funcptr_release_glyph(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(font, g_dsc); + return mp_const_none; } -#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) -#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) + -static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_release_glyph_mpobj, 2, mp_funcptr_release_glyph, funcptr_release_glyph); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + +/* + * Struct lv_font_t + */ + +static inline const mp_obj_type_t *get_mp_lv_font_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_t_type())); + return (lv_font_t*)self->data; +} + +#define mp_write_lv_font_t(struct_obj) *((lv_font_t*)mp_write_ptr_lv_font_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_font_t_type(), field); +} + +#define mp_read_lv_font_t(field) mp_read_ptr_lv_font_t(copy_buffer(&field, sizeof(lv_font_t))) +#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) + +static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; + GENMPY_UNUSED lv_font_t *data = (lv_font_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; - case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; + case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; + case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + case MP_QSTR_line_height: dest[0] = mp_obj_new_int(data->line_height); break; // converting from int32_t; + case MP_QSTR_base_line: dest[0] = mp_obj_new_int(data->base_line); break; // converting from int32_t; + case MP_QSTR_cap_height: dest[0] = mp_obj_new_int(data->cap_height); break; // converting from int32_t; + case MP_QSTR_x_height: dest[0] = mp_obj_new_int(data->x_height); break; // converting from int32_t; + case MP_QSTR_subpx: dest[0] = mp_obj_new_int_from_uint(data->subpx); break; // converting from uint8_t; + case MP_QSTR_kerning: dest[0] = mp_obj_new_int_from_uint(data->kerning); break; // converting from uint8_t; + case MP_QSTR_static_bitmap: dest[0] = mp_obj_new_int_from_uint(data->static_bitmap); break; // converting from uint8_t; + case MP_QSTR_underline_position: dest[0] = mp_obj_new_int(data->underline_position); break; // converting from int8_t; + case MP_QSTR_underline_thickness: dest[0] = mp_obj_new_int(data->underline_thickness); break; // converting from int8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8777,10 +8293,21 @@ static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + case MP_QSTR_line_height: data->line_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_base_line: data->base_line = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_cap_height: data->cap_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x_height: data->x_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_subpx: data->subpx = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_kerning: data->kerning = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_static_bitmap: data->static_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_underline_position: data->underline_position = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; + case MP_QSTR_underline_thickness: data->underline_thickness = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; default: return; } @@ -8789,81 +8316,76 @@ static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_color32_t_print(const mp_print_t *print, +static void mp_lv_font_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color32_t"); + mp_printf(print, "struct lv_font_t"); } -static const mp_obj_dict_t mp_lv_color32_t_locals_dict; +static const mp_obj_dict_t mp_lv_font_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color32_t_type, - MP_QSTR_lv_color32_t, + mp_lv_font_t_type, + MP_QSTR_lv_font_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color32_t_print, + print, mp_lv_font_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color32_t_attr, - locals_dict, &mp_lv_color32_t_locals_dict, + attr, mp_lv_font_t_attr, + locals_dict, &mp_lv_font_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_font_t_type(void) { - return &mp_lv_color32_t_type; + return &mp_lv_font_t_type; } /* - * Struct lv_layer_t + * Struct lv_theme_t */ -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); - return (lv_layer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); + return (lv_theme_t*)self->data; } -#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) +#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) { - return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); } -#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) -#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) +#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) +#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) -static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; + GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_draw_buf: dest[0] = ptr_to_mp((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; - case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; - case MP_QSTR_display: dest[0] = mp_read_ptr_lv_display_t((void*)data->display); break; // converting from lv_display_t *; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; + case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; - case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; - case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; - case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; - case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_buffer_owned: dest[0] = convert_to_bool(data->buffer_owned); break; // converting from bool; + case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; + case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; + case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; + case MP_QSTR_font_small: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_small); break; // converting from lv_font_t *; + case MP_QSTR_font_normal: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_normal); break; // converting from lv_font_t *; + case MP_QSTR_font_large: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_large); break; // converting from lv_font_t *; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8872,21 +8394,16 @@ static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_display: data->display = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_buffer_owned: data->buffer_owned = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_font_small: data->font_small = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_normal: data->font_normal = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_large: data->font_large = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -8895,102 +8412,95 @@ static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_layer_t_print(const mp_print_t *print, +static void mp_lv_theme_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_layer_t"); + mp_printf(print, "struct lv_theme_t"); } -static const mp_obj_dict_t mp_lv_layer_t_locals_dict; +static const mp_obj_dict_t mp_lv_theme_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_layer_t_type, - MP_QSTR_lv_layer_t, + mp_lv_theme_t_type, + MP_QSTR_lv_theme_t, MP_TYPE_FLAG_NONE, - print, mp_lv_layer_t_print, + print, mp_lv_theme_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_layer_t_attr, - locals_dict, &mp_lv_layer_t_locals_dict, + attr, mp_lv_theme_t_attr, + locals_dict, &mp_lv_theme_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) { - return &mp_lv_layer_t_type; + return &mp_lv_theme_t_type; } +#define funcptr_lv_timer_cb_t NULL + /* * lvgl extension definition for: - * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_timer_cb_t(lv_timer_t *) */ -static mp_obj_t mp_funcptr_lv_draw_buf_clear_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_to_ptr(mp_args[0]); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[2]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_func_ptr)(draw_buf, a, layer); + lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); + ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, funcptr_lv_draw_buf_clear_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_clear_cb_callback' - * lv_draw_buf_clear_cb_t buf_clear_cb - */ - +static void lv_timer_t_timer_cb_callback(lv_timer_t *); /* - * Struct lv_draw_buf_handlers_t + * Struct lv_timer_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_handlers_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_handlers_t_type())); - return (lv_draw_buf_handlers_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); + return (lv_timer_t*)self->data; } -#define mp_write_lv_draw_buf_handlers_t(struct_obj) *((lv_draw_buf_handlers_t*)mp_write_ptr_lv_draw_buf_handlers_t(struct_obj)) +#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_handlers_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_buf_handlers_t_type(), field); + return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); } -#define mp_read_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) -#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) +#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) +#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) -static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)self->data; + GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_buf_malloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, data->buf_malloc_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL); break; // converting from callback lv_draw_buf_malloc_cb_t; - case MP_QSTR_buf_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, data->buf_free_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL); break; // converting from callback lv_draw_buf_free_cb_t; - case MP_QSTR_buf_copy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, data->buf_copy_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL); break; // converting from callback lv_draw_buf_copy_cb_t; - case MP_QSTR_align_pointer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, data->align_pointer_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL); break; // converting from callback lv_draw_buf_align_cb_t; - case MP_QSTR_invalidate_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->invalidate_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_flush_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->flush_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_width_to_stride_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, data->width_to_stride_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL); break; // converting from callback lv_draw_buf_width_to_stride_cb_t; - case MP_QSTR_buf_clear_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, data->buf_clear_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL); break; // converting from callback lv_draw_buf_clear_cb_t; + case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; + case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; + case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; + case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; + case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8999,14 +8509,13 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_buf_malloc_cb: data->buf_malloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_malloc_cb_t; - case MP_QSTR_buf_free_cb: data->buf_free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_free_cb_t; - case MP_QSTR_buf_copy_cb: data->buf_copy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_copy_cb_t; - case MP_QSTR_align_pointer_cb: data->align_pointer_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_align_cb_t; - case MP_QSTR_invalidate_cache_cb: data->invalidate_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_flush_cache_cb: data->flush_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_width_to_stride_cb: data->width_to_stride_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_width_to_stride_cb_t; - case MP_QSTR_buf_clear_cb: data->buf_clear_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_clear_cb_t; + case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -9015,71 +8524,121 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_draw_buf_handlers_t_print(const mp_print_t *print, +static void mp_lv_timer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_buf_handlers_t"); + mp_printf(print, "struct lv_timer_t"); } -static const mp_obj_dict_t mp_lv_draw_buf_handlers_t_locals_dict; +static const mp_obj_dict_t mp_lv_timer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_buf_handlers_t_type, - MP_QSTR_lv_draw_buf_handlers_t, + mp_lv_timer_t_type, + MP_QSTR_lv_timer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_buf_handlers_t_print, + print, mp_lv_timer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_buf_handlers_t_attr, - locals_dict, &mp_lv_draw_buf_handlers_t_locals_dict, + attr, mp_lv_timer_t_attr, + locals_dict, &mp_lv_timer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) { - return &mp_lv_draw_buf_handlers_t_type; + return &mp_lv_timer_t_type; } /* - * Struct lv_draw_buf_t + * Struct lv_display_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_t_type())); - return (lv_draw_buf_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); + return (lv_display_t*)self->data; } -#define mp_write_lv_draw_buf_t(struct_obj) *((lv_draw_buf_t*)mp_write_ptr_lv_draw_buf_t(struct_obj)) +#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_buf_t_type(), field); + return lv_to_mp_struct(get_mp_lv_display_t_type(), field); } -#define mp_read_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(copy_buffer(&field, sizeof(lv_draw_buf_t))) -#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) +#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) +#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) -static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_buf_t *data = (lv_draw_buf_t*)self->data; + GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; - case MP_QSTR_data_size: dest[0] = mp_obj_new_int_from_uint(data->data_size); break; // converting from uint32_t; - case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; - case MP_QSTR_unaligned_data: dest[0] = ptr_to_mp((void*)data->unaligned_data); break; // converting from void *; - case MP_QSTR_handlers: dest[0] = mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); break; // converting from lv_draw_buf_handlers_t *; + case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; + case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; + case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; + case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; + case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; + case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; + case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; + case MP_QSTR_buf_1: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_1); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_2: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_2); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_3: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_3); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_act: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_act); break; // converting from lv_draw_buf_t *; + case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; + case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; + case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; + case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; + case MP_QSTR_sync_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, data->sync_cb, lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, data->user_data); break; // converting from callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, data->user_data); break; // converting from callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: dest[0] = mp_obj_new_int(data->syncing); break; // converting from int; + case MP_QSTR_syncing_last: dest[0] = mp_obj_new_int(data->syncing_last); break; // converting from int; + case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; + case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; + case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; + case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; + case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; + case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; + case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; + case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; + case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; + case MP_QSTR__static_buf1: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf1); break; // converting from lv_draw_buf_t; + case MP_QSTR__static_buf2: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf2); break; // converting from lv_draw_buf_t; + case MP_QSTR_layer_head: dest[0] = mp_read_ptr_lv_layer_t((void*)data->layer_head); break; // converting from lv_layer_t *; + case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; + case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; + case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; + case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; + case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; + case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; + case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; + case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; + case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; + case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; + case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; + case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; + case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; + case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; + case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; + case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; + case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9088,144 +8647,227 @@ static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; - case MP_QSTR_data_size: data->data_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; - case MP_QSTR_unaligned_data: data->unaligned_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_handlers: data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(dest[1]); break; // converting to lv_draw_buf_handlers_t *; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_draw_buf_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_draw_buf_t"); -} - -static const mp_obj_dict_t mp_lv_draw_buf_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_buf_t_type, - MP_QSTR_lv_draw_buf_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_buf_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_buf_t_attr, - locals_dict, &mp_lv_draw_buf_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void) -{ - return &mp_lv_draw_buf_t_type; -} - - -/* - * lvgl extension definition for: - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_buf_1: data->buf_1 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_2: data->buf_2 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_3: data->buf_3 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_act: data->buf_act = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_sync_cb: data->sync_cb = mp_lv_callback(dest[1], lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: data->sync_wait_cb = mp_lv_callback(dest[1], lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: data->syncing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_syncing_last: data->syncing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; + case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; + case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; + case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; + case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR__static_buf1: data->_static_buf1 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; + case MP_QSTR__static_buf2: data->_static_buf2 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; + case MP_QSTR_layer_head: data->layer_head = (void*)mp_write_ptr_lv_layer_t(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; + case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; + case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; + case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_display_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_display_t"); +} + +static const mp_obj_dict_t mp_lv_display_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_display_t_type, + MP_QSTR_lv_display_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_display_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_display_t_attr, + locals_dict, &mp_lv_display_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) +{ + return &mp_lv_display_t_type; +} + + +/* + * lvgl extension definition for: + * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_get_glyph_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_display(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(g_dsc, draw_buf); - return ptr_to_mp((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_display_t * _res = ((lv_display_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_display_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, funcptr_get_glyph_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_display_mpobj, 1, mp_lv_obj_get_display, lv_obj_get_display); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_get_screen for lv_obj_get_parent */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_parent_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_parent); + /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_t_get_glyph_bitmap_callback' - * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * lvgl extension definition for: + * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) */ + +static mp_obj_t mp_lv_obj_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_child); -#define funcptr_release_glyph NULL +#define funcptr_constructor_cb NULL /* * lvgl extension definition for: - * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) + * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_release_glyph(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_constructor_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(font, g_dsc); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + ((void (*)(const lv_obj_class_t *, lv_obj_t *))lv_func_ptr)(class_p, obj); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_release_glyph_mpobj, 2, mp_funcptr_release_glyph, funcptr_release_glyph); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_constructor_cb_mpobj, 2, mp_funcptr_constructor_cb, funcptr_constructor_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +#define funcptr_event_cb_1 NULL -static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); /* - * Struct lv_font_t + * lvgl extension definition for: + * void event_cb(const lv_obj_class_t *class_p, lv_event_t *e) */ -static inline const mp_obj_type_t *get_mp_lv_font_t_type(void); +static mp_obj_t mp_funcptr_event_cb_1(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); + ((void (*)(const lv_obj_class_t *, lv_event_t *))lv_func_ptr)(class_p, e); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_1_mpobj, 2, mp_funcptr_event_cb_1, funcptr_event_cb_1); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); + +/* + * Struct lv_obj_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_class_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_t_type())); - return (lv_font_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_class_t_type())); + return (lv_obj_class_t*)self->data; } -#define mp_write_lv_font_t(struct_obj) *((lv_font_t*)mp_write_ptr_lv_font_t(struct_obj)) +#define mp_write_lv_obj_class_t(struct_obj) *((lv_obj_class_t*)mp_write_ptr_lv_obj_class_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_class_t(void *field) { - return lv_to_mp_struct(get_mp_lv_font_t_type(), field); + return lv_to_mp_struct(get_mp_lv_obj_class_t_type(), field); } -#define mp_read_lv_font_t(field) mp_read_ptr_lv_font_t(copy_buffer(&field, sizeof(lv_font_t))) -#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) +#define mp_read_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(copy_buffer(&field, sizeof(lv_obj_class_t))) +#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) -static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_t *data = (lv_font_t*)self->data; + GENMPY_UNUSED lv_obj_class_t *data = (lv_obj_class_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; - case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; + case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_obj_class_t *; + case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, (void*)data->event_cb, lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); - case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); - case MP_QSTR_line_height: dest[0] = mp_obj_new_int(data->line_height); break; // converting from int32_t; - case MP_QSTR_base_line: dest[0] = mp_obj_new_int(data->base_line); break; // converting from int32_t; - case MP_QSTR_cap_height: dest[0] = mp_obj_new_int(data->cap_height); break; // converting from int32_t; - case MP_QSTR_x_height: dest[0] = mp_obj_new_int(data->x_height); break; // converting from int32_t; - case MP_QSTR_subpx: dest[0] = mp_obj_new_int_from_uint(data->subpx); break; // converting from uint8_t; - case MP_QSTR_kerning: dest[0] = mp_obj_new_int_from_uint(data->kerning); break; // converting from uint8_t; - case MP_QSTR_static_bitmap: dest[0] = mp_obj_new_int_from_uint(data->static_bitmap); break; // converting from uint8_t; - case MP_QSTR_underline_position: dest[0] = mp_obj_new_int(data->underline_position); break; // converting from int8_t; - case MP_QSTR_underline_thickness: dest[0] = mp_obj_new_int(data->underline_thickness); break; // converting from int8_t; + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_width_def: dest[0] = mp_obj_new_int(data->width_def); break; // converting from int32_t; + case MP_QSTR_height_def: dest[0] = mp_obj_new_int(data->height_def); break; // converting from int32_t; + case MP_QSTR_editable: dest[0] = mp_obj_new_int_from_uint(data->editable); break; // converting from uint32_t; + case MP_QSTR_group_def: dest[0] = mp_obj_new_int_from_uint(data->group_def); break; // converting from uint32_t; + case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; + case MP_QSTR_theme_inheritable: dest[0] = mp_obj_new_int_from_uint(data->theme_inheritable); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9234,21 +8876,18 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_class_t *; + case MP_QSTR_constructor_cb: data->constructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_destructor_cb: data->destructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); - case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); - case MP_QSTR_line_height: data->line_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_base_line: data->base_line = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_cap_height: data->cap_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_x_height: data->x_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_subpx: data->subpx = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_kerning: data->kerning = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_static_bitmap: data->static_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_underline_position: data->underline_position = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; - case MP_QSTR_underline_thickness: data->underline_thickness = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_width_def: data->width_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_height_def: data->height_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_editable: data->editable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_group_def: data->group_def = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_theme_inheritable: data->theme_inheritable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -9257,262 +8896,372 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_font_t_print(const mp_print_t *print, +static void mp_lv_obj_class_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_t"); + mp_printf(print, "struct lv_obj_class_t"); } -static const mp_obj_dict_t mp_lv_font_t_locals_dict; +static const mp_obj_dict_t mp_lv_obj_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_t_type, - MP_QSTR_lv_font_t, + mp_lv_obj_class_t_type, + MP_QSTR_lv_obj_class_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_t_print, + print, mp_lv_obj_class_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_t_attr, - locals_dict, &mp_lv_font_t_locals_dict, + attr, mp_lv_obj_class_t_attr, + locals_dict, &mp_lv_obj_class_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void) { - return &mp_lv_font_t_type; + return &mp_lv_obj_class_t_type; } /* * lvgl extension definition for: - * inline static const lv_font_t *lv_obj_get_style_text_font_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_lv_obj_get_style_text_font_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_font_t * _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_font_t((void*)_res); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[2]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_func_ptr)(obj, idx, class_p); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_internal_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_child_by_type); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space_internal */ +/* Reusing lv_obj_get_child for lv_obj_get_sibling */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_sibling); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space_internal */ +/* Reusing lv_obj_get_child_by_type for lv_obj_get_sibling_by_type */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_sibling_by_type); /* * lvgl extension definition for: - * inline static lv_text_decor_t lv_obj_get_style_text_decor_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_text_decor_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_decor_t _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_internal_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_mpobj, 1, mp_lv_obj_get_child_count, lv_obj_get_child_count); /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_get_style_text_align_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_lv_obj_get_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_count_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_internal_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_by_type_mpobj, 2, mp_lv_obj_get_child_count_by_type, lv_obj_get_child_count_by_type); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered_internal */ +/* + * lvgl extension definition for: + * int32_t lv_obj_get_index(const lv_obj_t *obj) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width_internal */ +static mp_obj_t mp_lv_obj_get_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_index); /* * lvgl extension definition for: - * inline static lv_text_leading_trim_t lv_obj_get_style_text_leading_trim_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_lv_obj_get_style_text_leading_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_index_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_leading_trim_t _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_internal_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_by_type_mpobj, 2, mp_lv_obj_get_index_by_type, lv_obj_get_index_by_type); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius_internal); +/* + * Callback function lv_obj_tree_walk_cb + * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) + */ + +GENMPY_UNUSED static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_tree_walk_cb)), 2, mp_args); + return (int)mp_obj_get_int(callback_result); +} + + +/* + * lvgl extension definition for: + * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) + */ + +static mp_obj_t mp_lv_obj_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + void *cb = mp_lv_callback(mp_args[1], &lv_obj_tree_walk_cb_callback, MP_QSTR_lv_obj_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_obj_t *start_obj = mp_to_lv(mp_args[0]); + ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_func_ptr)(start_obj, cb, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_tree_walk_mpobj, 3, mp_lv_obj_tree_walk, lv_obj_tree_walk); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_dump_tree */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_dump_tree_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_dump_tree); /* * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_blur_quality_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) */ -static mp_obj_t mp_lv_obj_get_style_blur_quality_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_blur_quality_t _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pos_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_pos); + +/* Reusing lv_obj_move_to_index for lv_obj_set_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_x_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_x); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_y_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_y); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x_internal */ +/* Reusing lv_obj_set_pos for lv_obj_set_size */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_size_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_size); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y_internal); +/* + * lvgl extension definition for: + * bool lv_obj_refr_size(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_refr_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(lv_obj_t *))lv_func_ptr)(obj); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refr_size); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_width); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_height); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_content_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_width); -/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_content_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_height); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius_internal */ +/* Reusing lv_obj_delete_delayed for lv_obj_set_layout */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_layout_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_set_layout); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset_internal); +/* + * lvgl extension definition for: + * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_is_layout_positioned(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(const lv_obj_t *))lv_func_ptr)(obj); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_layout_positioned_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_layout_positioned); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_mark_layout_as_dirty */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_mark_layout_as_dirty_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_mark_layout_as_dirty); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_internal); +/* + * lvgl extension definition for: + * void lv_obj_update_layout(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_update_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + ((void (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layout_mpobj, 1, mp_lv_obj_update_layout, lv_obj_update_layout); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered_internal); +/* + * lvgl extension definition for: + * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) + */ + +static mp_obj_t mp_lv_obj_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_align_t))lv_func_ptr)(obj, align); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_align_mpobj, 2, mp_lv_obj_set_align, lv_obj_set_align); -#define funcptr_lv_color_filter_cb_t NULL +/* + * lvgl extension definition for: + * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + */ + +static mp_obj_t mp_lv_obj_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_align_t align = (int)mp_obj_get_int(mp_args[1]); + int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, align, x_ofs, y_ofs); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_mpobj, 4, mp_lv_obj_align, lv_obj_align); + /* * lvgl extension definition for: - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) */ -static mp_obj_t mp_funcptr_lv_color_filter_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_align_to(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const struct _lv_color_filter_dsc_t *arg0 = (const struct _lv_color_filter_dsc_t *)mp_to_ptr(mp_args[0]); - lv_color_t arg1 = mp_write_lv_color_t(mp_args[1]); - lv_opa_t arg2 = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_color_t _res = ((lv_color_t (*)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t))lv_func_ptr)(arg0, arg1, arg2); - return mp_read_lv_color_t(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(mp_args[1]); + lv_align_t align = (int)mp_obj_get_int(mp_args[2]); + int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, base, align, x_ofs, y_ofs); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_color_filter_cb_t_mpobj, 3, mp_funcptr_lv_color_filter_cb_t, funcptr_lv_color_filter_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_to_mpobj, 5, mp_lv_obj_align_to, lv_obj_align_to); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_move_foreground for lv_obj_center */ -static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_center_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_center); + /* - * Struct lv_color_filter_dsc_t + * Struct lv_matrix_t */ -static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_filter_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_matrix_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_filter_dsc_t_type())); - return (lv_color_filter_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_matrix_t_type())); + return (lv_matrix_t*)self->data; } -#define mp_write_lv_color_filter_dsc_t(struct_obj) *((lv_color_filter_dsc_t*)mp_write_ptr_lv_color_filter_dsc_t(struct_obj)) +#define mp_write_lv_matrix_t(struct_obj) *((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_filter_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_matrix_t(void *field) { - return lv_to_mp_struct(get_mp_lv_color_filter_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_matrix_t_type(), field); } -#define mp_read_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) -#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) +#define mp_read_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(copy_buffer(&field, sizeof(lv_matrix_t))) +#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) -static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)self->data; + GENMPY_UNUSED lv_matrix_t *data = (lv_matrix_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_filter_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, data->user_data); break; // converting from callback lv_color_filter_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9521,8 +9270,7 @@ static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_filter_cb: data->filter_cb = mp_lv_callback(dest[1], lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_color_filter_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + ; default: return; } @@ -9531,200 +9279,254 @@ static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_color_filter_dsc_t_print(const mp_print_t *print, +static void mp_lv_matrix_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color_filter_dsc_t"); + mp_printf(print, "struct lv_matrix_t"); } -static const mp_obj_dict_t mp_lv_color_filter_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_matrix_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color_filter_dsc_t_type, - MP_QSTR_lv_color_filter_dsc_t, + mp_lv_matrix_t_type, + MP_QSTR_lv_matrix_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color_filter_dsc_t_print, + print, mp_lv_matrix_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color_filter_dsc_t_attr, - locals_dict, &mp_lv_color_filter_dsc_t_locals_dict, + attr, mp_lv_matrix_t_attr, + locals_dict, &mp_lv_matrix_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void) { - return &mp_lv_color_filter_dsc_t_type; + return &mp_lv_matrix_t_type; } /* * lvgl extension definition for: - * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) */ -static mp_obj_t mp_lv_obj_get_style_color_filter_dsc_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_color_filter_dsc_t * _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(mp_args[1]); + ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_func_ptr)(obj, matrix); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_internal_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_transform_mpobj, 2, mp_lv_obj_set_transform, lv_obj_set_transform); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_reset_transform */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_reset_transform_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_reset_transform); -#define funcptr_lv_anim_exec_xcb_t NULL - /* * lvgl extension definition for: - * void lv_anim_exec_xcb_t(void *, int32_t) + * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) */ -static mp_obj_t mp_funcptr_lv_anim_exec_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *arg0 = mp_to_ptr(mp_args[0]); - int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(void *, int32_t))lv_func_ptr)(arg0, arg1); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_area_t *coords = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_exec_xcb_t_mpobj, 2, mp_funcptr_lv_anim_exec_xcb_t, funcptr_lv_anim_exec_xcb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_coords); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_get_index for lv_obj_get_x */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x); + +/* Reusing lv_obj_get_index for lv_obj_get_x2 */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_anim_t_exec_cb_callback' - * lv_anim_exec_xcb_t exec_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x2); -#define funcptr_lv_anim_custom_exec_cb_t NULL +/* Reusing lv_obj_get_index for lv_obj_get_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y); + +/* Reusing lv_obj_get_index for lv_obj_get_y2 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y2); + +/* Reusing lv_obj_get_index for lv_obj_get_x_aligned */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x_aligned); + +/* Reusing lv_obj_get_index for lv_obj_get_y_aligned */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y_aligned); + +/* Reusing lv_obj_get_index for lv_obj_get_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_width); + +/* Reusing lv_obj_get_index for lv_obj_get_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_height); + +/* Reusing lv_obj_get_index for lv_obj_get_content_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_width); + +/* Reusing lv_obj_get_index for lv_obj_get_content_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_height); + +/* Reusing lv_obj_get_coords for lv_obj_get_content_coords */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_content_coords); + +/* Reusing lv_obj_get_index for lv_obj_get_self_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_width); + +/* Reusing lv_obj_get_index for lv_obj_get_self_height */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_height); + /* * lvgl extension definition for: - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_lv_anim_custom_exec_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_clamped_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_anim_t *, int32_t))lv_func_ptr)(arg0, arg1); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, 2, mp_funcptr_lv_anim_custom_exec_cb_t, funcptr_lv_anim_custom_exec_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_width); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_get_style_clamped_width for lv_obj_get_style_clamped_height */ -static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); -#define funcptr_lv_anim_start_cb_t NULL +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_height); + +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_width_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_width_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_width_content); + +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_height_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_height_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_height_content); + +/* Reusing lv_obj_refr_size for lv_obj_is_width_min */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_min); + +/* Reusing lv_obj_refr_size for lv_obj_is_height_min */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_min); + +/* Reusing lv_obj_refr_size for lv_obj_is_width_max */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_max); + +/* Reusing lv_obj_refr_size for lv_obj_is_height_max */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_max); + +/* Reusing lv_obj_refr_size for lv_obj_refresh_self_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_self_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refresh_self_size); + +/* Reusing lv_obj_move_foreground for lv_obj_refr_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_pos_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_refr_pos); + +/* Reusing lv_obj_set_pos for lv_obj_move_to */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_mpobj, 3, mp_lv_obj_set_pos, lv_obj_move_to); + /* * lvgl extension definition for: - * void lv_anim_start_cb_t(lv_anim_t *) + * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) */ -static mp_obj_t mp_funcptr_lv_anim_start_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_move_children_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - ((void (*)(lv_anim_t *))lv_func_ptr)(arg0); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x_diff = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y_diff = (int32_t)mp_obj_get_int(mp_args[2]); + bool ignore_floating = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_func_ptr)(obj, x_diff, y_diff, ignore_floating); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_start_cb_t_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, funcptr_lv_anim_start_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_children_by_mpobj, 4, mp_lv_obj_move_children_by, lv_obj_move_children_by); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_anim_t_start_cb_callback(lv_anim_t *); -static void lv_anim_t_completed_cb_callback(lv_anim_t *); -static void lv_anim_t_deleted_cb_callback(lv_anim_t *); -#define funcptr_lv_anim_get_value_cb_t NULL - /* * lvgl extension definition for: - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_lv_anim_get_value_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_anim_t *))lv_func_ptr)(arg0); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_matrix_t * _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_matrix_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_get_value_cb_t_mpobj, 1, mp_funcptr_lv_anim_get_value_cb_t, funcptr_lv_anim_get_value_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transform_mpobj, 1, mp_lv_obj_get_transform, lv_obj_get_transform); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); -static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); -typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * Struct lv_anim_bezier3_para_t + * Struct lv_point_t */ -static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_point_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_bezier3_para_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_point_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_bezier3_para_t_type())); - return (lv_anim_bezier3_para_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_point_t_type())); + return (lv_point_t*)self->data; } -#define mp_write_lv_anim_bezier3_para_t(struct_obj) *((lv_anim_bezier3_para_t*)mp_write_ptr_lv_anim_bezier3_para_t(struct_obj)) +#define mp_write_lv_point_t(struct_obj) *((lv_point_t*)mp_write_ptr_lv_point_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_bezier3_para_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_point_t(void *field) { - return lv_to_mp_struct(get_mp_lv_anim_bezier3_para_t_type(), field); + return lv_to_mp_struct(get_mp_lv_point_t_type(), field); } -#define mp_read_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) -#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) +#define mp_read_lv_point_t(field) mp_read_ptr_lv_point_t(copy_buffer(&field, sizeof(lv_point_t))) +#define mp_read_byref_lv_point_t(field) mp_read_ptr_lv_point_t(&field) -static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)self->data; + GENMPY_UNUSED lv_point_t *data = (lv_point_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int16_t; - case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int16_t; - case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int16_t; - case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int16_t; + case MP_QSTR_x: dest[0] = mp_obj_new_int(data->x); break; // converting from int32_t; + case MP_QSTR_y: dest[0] = mp_obj_new_int(data->y); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9733,10 +9535,8 @@ static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_x1: data->x1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_y1: data->y1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_x2: data->x2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_y2: data->y2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_x: data->x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y: data->y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -9745,993 +9545,777 @@ static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_anim_bezier3_para_t_print(const mp_print_t *print, +static void mp_lv_point_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_anim_bezier3_para_t"); + mp_printf(print, "struct lv_point_t"); } -static const mp_obj_dict_t mp_lv_anim_bezier3_para_t_locals_dict; +static const mp_obj_dict_t mp_lv_point_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_bezier3_para_t_type, - MP_QSTR_lv_anim_bezier3_para_t, + mp_lv_point_t_type, + MP_QSTR_lv_point_t, MP_TYPE_FLAG_NONE, - print, mp_lv_anim_bezier3_para_t_print, + print, mp_lv_point_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_anim_bezier3_para_t_attr, - locals_dict, &mp_lv_anim_bezier3_para_t_locals_dict, + attr, mp_lv_point_t_attr, + locals_dict, &mp_lv_point_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_point_t_type(void) { - return &mp_lv_anim_bezier3_para_t_type; + return &mp_lv_point_t_type; } /* - * Struct lv_anim_parameter_t + * lvgl extension definition for: + * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) */ -static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_parameter_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_transform_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_parameter_t_type())); - return (lv_anim_parameter_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[1]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, p, flags); + return mp_const_none; } -#define mp_write_lv_anim_parameter_t(struct_obj) *((lv_anim_parameter_t*)mp_write_ptr_lv_anim_parameter_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_parameter_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_anim_parameter_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_mpobj, 3, mp_lv_obj_transform_point, lv_obj_transform_point); + -#define mp_read_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(copy_buffer(&field, sizeof(lv_anim_parameter_t))) -#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) +/* + * Array convertors for lv_point_t [] + */ -static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t_____(mp_obj_t mp_arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_parameter_t *data = (lv_anim_parameter_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_bezier3: dest[0] = mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); break; // converting from lv_anim_bezier3_para_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_bezier3: data->bezier3 = mp_write_lv_anim_bezier3_para_t(dest[1]); break; // converting to lv_anim_bezier3_para_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_point_t(item); } + return (lv_point_t *)lv_arr; } -static void mp_lv_anim_parameter_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t_____(lv_point_t *arr) { - mp_printf(print, "struct lv_anim_parameter_t"); + return mp_read_ptr_lv_point_t((void*)arr); } -static const mp_obj_dict_t mp_lv_anim_parameter_t_locals_dict; -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_parameter_t_type, - MP_QSTR_lv_anim_parameter_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_anim_parameter_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_anim_parameter_t_attr, - locals_dict, &mp_lv_anim_parameter_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +/* + * lvgl extension definition for: + * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) + */ -static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void) +static mp_obj_t mp_lv_obj_transform_point_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_anim_parameter_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *points = mp_arr_to_lv_point_t_____(mp_args[1]); + size_t count = (size_t)mp_obj_get_int(mp_args[2]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, points, count, flags); + return mp_const_none; } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_array_mpobj, 4, mp_lv_obj_transform_point_array, lv_obj_transform_point_array); /* - * Struct lv_anim_t + * lvgl extension definition for: + * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) */ -static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_t_type())); - return (lv_anim_t*)self->data; -} - -#define mp_write_lv_anim_t(struct_obj) *((lv_anim_t*)mp_write_ptr_lv_anim_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_t(void *field) +static mp_obj_t mp_lv_obj_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_anim_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, area, flags); + return mp_const_none; } -#define mp_read_lv_anim_t(field) mp_read_ptr_lv_anim_t(copy_buffer(&field, sizeof(lv_anim_t))) -#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) - -static void mp_lv_anim_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_t *data = (lv_anim_t*)self->data; + - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_var: dest[0] = ptr_to_mp((void*)data->var); break; // converting from void *; - case MP_QSTR_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, data->exec_cb, NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL); break; // converting from callback lv_anim_exec_xcb_t; - case MP_QSTR_custom_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, data->user_data); break; // converting from callback lv_anim_custom_exec_cb_t; - case MP_QSTR_start_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->start_cb, lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, data->user_data); break; // converting from callback lv_anim_start_cb_t; - case MP_QSTR_completed_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->completed_cb, lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, data->user_data); break; // converting from callback lv_anim_completed_cb_t; - case MP_QSTR_deleted_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->deleted_cb, lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, data->user_data); break; // converting from callback lv_anim_deleted_cb_t; - case MP_QSTR_get_value_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->get_value_cb, lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, data->user_data); break; // converting from callback lv_anim_get_value_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, data->user_data); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_start_value: dest[0] = mp_obj_new_int(data->start_value); break; // converting from int32_t; - case MP_QSTR_current_value: dest[0] = mp_obj_new_int(data->current_value); break; // converting from int32_t; - case MP_QSTR_end_value: dest[0] = mp_obj_new_int(data->end_value); break; // converting from int32_t; - case MP_QSTR_duration: dest[0] = mp_obj_new_int(data->duration); break; // converting from int32_t; - case MP_QSTR_act_time: dest[0] = mp_obj_new_int(data->act_time); break; // converting from int32_t; - case MP_QSTR_reverse_delay: dest[0] = mp_obj_new_int_from_uint(data->reverse_delay); break; // converting from uint32_t; - case MP_QSTR_reverse_duration: dest[0] = mp_obj_new_int_from_uint(data->reverse_duration); break; // converting from uint32_t; - case MP_QSTR_repeat_delay: dest[0] = mp_obj_new_int_from_uint(data->repeat_delay); break; // converting from uint32_t; - case MP_QSTR_repeat_cnt: dest[0] = mp_obj_new_int_from_uint(data->repeat_cnt); break; // converting from uint32_t; - case MP_QSTR_parameter: dest[0] = mp_read_byref_lv_anim_parameter_t(data->parameter); break; // converting from lv_anim_parameter_t; - case MP_QSTR_last_timer_run: dest[0] = mp_obj_new_int_from_uint(data->last_timer_run); break; // converting from uint32_t; - case MP_QSTR_pause_time: dest[0] = mp_obj_new_int_from_uint(data->pause_time); break; // converting from uint32_t; - case MP_QSTR_pause_duration: dest[0] = mp_obj_new_int_from_uint(data->pause_duration); break; // converting from uint32_t; - case MP_QSTR_is_paused: dest[0] = mp_obj_new_int_from_uint(data->is_paused); break; // converting from uint8_t; - case MP_QSTR_reverse_play_in_progress: dest[0] = mp_obj_new_int_from_uint(data->reverse_play_in_progress); break; // converting from uint8_t; - case MP_QSTR_run_round: dest[0] = mp_obj_new_int_from_uint(data->run_round); break; // converting from uint8_t; - case MP_QSTR_start_cb_called: dest[0] = mp_obj_new_int_from_uint(data->start_cb_called); break; // converting from uint8_t; - case MP_QSTR_early_apply: dest[0] = mp_obj_new_int_from_uint(data->early_apply); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_var: data->var = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_exec_cb: data->exec_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_exec_xcb_t; - case MP_QSTR_custom_exec_cb: data->custom_exec_cb = mp_lv_callback(dest[1], lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_custom_exec_cb_t; - case MP_QSTR_start_cb: data->start_cb = mp_lv_callback(dest[1], lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_start_cb_t; - case MP_QSTR_completed_cb: data->completed_cb = mp_lv_callback(dest[1], lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_completed_cb_t; - case MP_QSTR_deleted_cb: data->deleted_cb = mp_lv_callback(dest[1], lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_deleted_cb_t; - case MP_QSTR_get_value_cb: data->get_value_cb = mp_lv_callback(dest[1], lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_get_value_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_start_value: data->start_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_current_value: data->current_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_end_value: data->end_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_duration: data->duration = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_act_time: data->act_time = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_reverse_delay: data->reverse_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_reverse_duration: data->reverse_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_repeat_delay: data->repeat_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_repeat_cnt: data->repeat_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_parameter: data->parameter = mp_write_lv_anim_parameter_t(dest[1]); break; // converting to lv_anim_parameter_t; - case MP_QSTR_last_timer_run: data->last_timer_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pause_time: data->pause_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pause_duration: data->pause_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_is_paused: data->is_paused = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_reverse_play_in_progress: data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_run_round: data->run_round = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_start_cb_called: data->start_cb_called = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_early_apply: data->early_apply = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transformed_area_mpobj, 3, mp_lv_obj_get_transformed_area, lv_obj_get_transformed_area); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) + */ -static void mp_lv_anim_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_invalidate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_anim_t"); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_func_ptr)(obj, area); + return mp_obj_new_int(_res); } -static const mp_obj_dict_t mp_lv_anim_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_t_type, - MP_QSTR_lv_anim_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_anim_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_anim_t_attr, - locals_dict, &mp_lv_anim_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void) -{ - return &mp_lv_anim_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_area_mpobj, 2, mp_lv_obj_invalidate_area, lv_obj_invalidate_area); /* * lvgl extension definition for: - * inline static const lv_anim_t *lv_obj_get_style_anim_internal(const lv_obj_t *obj, lv_part_t part) + * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_anim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_invalidate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_anim_t * _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_internal_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_mpobj, 1, mp_lv_obj_invalidate, lv_obj_invalidate); /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_anim_duration_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) */ -static mp_obj_t mp_lv_obj_get_style_anim_duration_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_area_is_visible(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + bool _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, area); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_area_is_visible_mpobj, 2, mp_lv_obj_area_is_visible, lv_obj_area_is_visible); +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_visible */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_style_transition_dsc_t_path_xcb_callback' - * lv_anim_path_cb_t path_xcb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_visible); +/* Reusing lv_obj_move_to_index for lv_obj_set_ext_click_area */ -/* - * Struct lv_style_transition_dsc_t - */ - -static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_transition_dsc_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_transition_dsc_t_type())); - return (lv_style_transition_dsc_t*)self->data; -} - -#define mp_write_lv_style_transition_dsc_t(struct_obj) *((lv_style_transition_dsc_t*)mp_write_ptr_lv_style_transition_dsc_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_transition_dsc_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_style_transition_dsc_t_type(), field); -} - -#define mp_read_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) -#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) - -static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_props: dest[0] = ptr_to_mp((void*)data->props); break; // converting from lv_style_prop_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_path_xcb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_xcb, NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint32_t; - case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_props: data->props = (void*)mp_to_ptr(dest[1]); break; // converting to lv_style_prop_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_path_xcb: data->path_xcb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_time: data->time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_delay: data->delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_style_transition_dsc_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_style_transition_dsc_t"); -} - -static const mp_obj_dict_t mp_lv_style_transition_dsc_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_transition_dsc_t_type, - MP_QSTR_lv_style_transition_dsc_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_style_transition_dsc_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_style_transition_dsc_t_attr, - locals_dict, &mp_lv_style_transition_dsc_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_click_area_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_click_area); + +/* Reusing lv_obj_get_coords for lv_obj_get_click_area */ -static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void) -{ - return &mp_lv_style_transition_dsc_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_click_area_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_click_area); /* * lvgl extension definition for: - * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) */ -static mp_obj_t mp_lv_obj_get_style_transition_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_hit_test(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_style_transition_dsc_t * _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + bool _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_internal_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_hit_test_mpobj, 2, mp_lv_obj_hit_test, lv_obj_hit_test); /* * lvgl extension definition for: - * inline static lv_blend_mode_t lv_obj_get_style_blend_mode_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_get_style_blend_mode_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_calc_dynamic_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_blend_mode_t _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_func_ptr)(obj, prop); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_internal_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_width_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_width); +/* Reusing lv_obj_calc_dynamic_width for lv_obj_calc_dynamic_height */ -/* - * lvgl extension definition for: - * inline static uint16_t lv_obj_get_style_layout_internal(const lv_obj_t *obj, lv_part_t part) - */ - -static mp_obj_t mp_lv_obj_get_style_layout_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint16_t _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_internal_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_height_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_height); /* * lvgl extension definition for: - * inline static lv_base_dir_t lv_obj_get_style_base_dir_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) */ -static mp_obj_t mp_lv_obj_get_style_base_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_base_dir_t _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_internal_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir_internal); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src_internal); - -/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollbar_mode_mpobj, 2, mp_lv_obj_set_scrollbar_mode, lv_obj_set_scrollbar_mode); /* * lvgl extension definition for: - * inline static lv_flex_flow_t lv_obj_get_style_flex_flow_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) */ -static mp_obj_t mp_lv_obj_get_style_flex_flow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_flex_flow_t _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_dir_t dir = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_dir_t))lv_func_ptr)(obj, dir); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_internal_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_obj_set_scroll_dir); /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_main_place_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) */ -static mp_obj_t mp_lv_obj_get_style_flex_main_place_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_flex_align_t _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scroll_snap_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_func_ptr)(obj, align); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place_internal); - -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_x_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_x); -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place_internal */ +/* Reusing lv_obj_set_scroll_snap_x for lv_obj_set_scroll_snap_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_y_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_y); /* * lvgl extension definition for: - * inline static uint8_t lv_obj_get_style_flex_grow_internal(const lv_obj_t *obj, lv_part_t part) + * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_flex_grow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint8_t _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + lv_scrollbar_mode_t _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_internal_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_mode_mpobj, 1, mp_lv_obj_get_scrollbar_mode, lv_obj_get_scrollbar_mode); /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) + * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const int32_t * _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_array_from_i32ptr((void*)_res); + lv_dir_t _res = ((lv_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_obj_get_scroll_dir); /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_column_align_internal(const lv_obj_t *obj, lv_part_t part) + * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_grid_column_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_grid_align_t _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_scroll_snap_t _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align_internal); - -/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_x_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_x); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align_internal */ +/* Reusing lv_obj_get_scroll_snap_x for lv_obj_get_scroll_snap_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_y_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_y); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_x); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_y); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_top_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_top); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_bottom_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_bottom); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_left_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_left); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_right_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_right); /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_calculate_style_text_align_internal(const lv_obj_t *obj, lv_part_t part, const char *txt) + * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) */ -static mp_obj_t mp_lv_obj_calculate_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scroll_end(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_point_t *end = mp_write_ptr_lv_point_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, end); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_internal_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_end_mpobj, 2, mp_lv_obj_get_scroll_end, lv_obj_get_scroll_end); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right_internal */ +/* + * lvgl extension definition for: + * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top_internal */ +static mp_obj_t mp_lv_obj_scroll_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t dx = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t dy = (int32_t)mp_obj_get_int(mp_args[2]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, dx, dy, anim_en); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe_internal */ +/* Reusing lv_obj_scroll_by for lv_obj_scroll_by_bounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_bounded_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by_bounded); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe_internal */ +/* Reusing lv_obj_scroll_by for lv_obj_scroll_to */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_to); /* * lvgl extension definition for: - * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) + * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) */ -static mp_obj_t mp_lv_obj_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_scroll_to_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_flex_flow_t flow = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_func_ptr)(obj, flow); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, x, anim_en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_flow_mpobj, 2, mp_lv_obj_set_flex_flow, lv_obj_set_flex_flow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_x_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_x); + +/* Reusing lv_obj_scroll_to_x for lv_obj_scroll_to_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_y_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_y); /* * lvgl extension definition for: - * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) + * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) */ -static mp_obj_t mp_lv_obj_set_flex_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_scroll_to_view(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_flex_align_t main_place = (int)mp_obj_get_int(mp_args[1]); - lv_flex_align_t cross_place = (int)mp_obj_get_int(mp_args[2]); - lv_flex_align_t track_cross_place = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_func_ptr)(obj, main_place, cross_place, track_cross_place); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, anim_en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_align_mpobj, 4, mp_lv_obj_set_flex_align, lv_obj_set_flex_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view); + +/* Reusing lv_obj_scroll_to_view for lv_obj_scroll_to_view_recursive */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_recursive_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view_recursive); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolling */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolling_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolling); + +/* Reusing lv_obj_update_layout for lv_obj_stop_scroll_anim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_stop_scroll_anim_mpobj, 1, mp_lv_obj_update_layout, lv_obj_stop_scroll_anim); + +/* Reusing lv_obj_scroll_to_view for lv_obj_update_snap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_snap_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_update_snap); /* * lvgl extension definition for: - * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) + * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) */ -static mp_obj_t mp_lv_obj_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scrollbar_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint8_t grow = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint8_t))lv_func_ptr)(obj, grow); + lv_area_t *hor_area = mp_write_ptr_lv_area_t(mp_args[1]); + lv_area_t *ver_area = mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor_area, ver_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_grow_mpobj, 2, mp_lv_obj_set_flex_grow, lv_obj_set_flex_grow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_area_mpobj, 3, mp_lv_obj_get_scrollbar_area, lv_obj_get_scrollbar_area); + +/* Reusing lv_obj_move_foreground for lv_obj_scrollbar_invalidate */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scrollbar_invalidate_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_scrollbar_invalidate); + +/* Reusing lv_obj_scroll_to_view for lv_obj_readjust_scroll */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_readjust_scroll_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_readjust_scroll); /* - * Array convertors for int32_t [] + * Struct lv_style_t */ -GENMPY_UNUSED static int32_t *mp_arr_to_int32_t_____(mp_obj_t mp_arr) +static inline const mp_obj_type_t *get_mp_lv_style_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_t(mp_obj_t self_in) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - int32_t *lv_arr = (int32_t*)m_malloc(len * sizeof(int32_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (int32_t)mp_obj_get_int(item); - } - return (int32_t *)lv_arr; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_t_type())); + return (lv_style_t*)self->data; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_int32_t_____(const int32_t *arr) +#define mp_write_lv_style_t(struct_obj) *((lv_style_t*)mp_write_ptr_lv_style_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_t(void *field) { - return mp_array_from_i32ptr((void*)arr); + return lv_to_mp_struct(get_mp_lv_style_t_type(), field); } +#define mp_read_lv_style_t(field) mp_read_ptr_lv_style_t(copy_buffer(&field, sizeof(lv_style_t))) +#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) -/* - * lvgl extension definition for: - * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) - */ +static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_style_t *data = (lv_style_t*)self->data; -static mp_obj_t mp_lv_obj_set_grid_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_values_and_props: dest[0] = ptr_to_mp((void*)data->values_and_props); break; // converting from void *; + case MP_QSTR_has_group: dest[0] = mp_obj_new_int_from_uint(data->has_group); break; // converting from uint32_t; + case MP_QSTR_prop_cnt: dest[0] = mp_obj_new_int_from_uint(data->prop_cnt); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_values_and_props: data->values_and_props = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_has_group: data->has_group = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_prop_cnt: data->prop_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_style_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const int32_t *col_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[1]); - const int32_t *row_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); - ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_func_ptr)(obj, col_dsc, row_dsc); - return mp_const_none; + mp_printf(print, "struct lv_style_t"); } - +static const mp_obj_dict_t mp_lv_style_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_dsc_array_mpobj, 3, mp_lv_obj_set_grid_dsc_array, lv_obj_set_grid_dsc_array); +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_style_t_type, + MP_QSTR_lv_style_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_style_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_style_t_attr, + locals_dict, &mp_lv_style_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_style_t_type(void) +{ + return &mp_lv_style_t_type; +} /* * lvgl extension definition for: - * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) + * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_set_grid_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_add_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); - lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_func_ptr)(obj, column_align, row_align); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_align_mpobj, 3, mp_lv_obj_set_grid_align, lv_obj_set_grid_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_add_style); /* * lvgl extension definition for: - * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) + * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_set_grid_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_replace_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); - int32_t col_pos = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t col_span = (int32_t)mp_obj_get_int(mp_args[3]); - lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[4]); - int32_t row_pos = (int32_t)mp_obj_get_int(mp_args[5]); - int32_t row_span = (int32_t)mp_obj_get_int(mp_args[6]); - ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_func_ptr)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); - return mp_const_none; + const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, old_style, new_style, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_cell_mpobj, 7, mp_lv_obj_set_grid_cell, lv_obj_set_grid_cell); - -/* Reusing lv_obj_move_foreground for lv_obj_delete */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_replace_style_mpobj, 4, mp_lv_obj_replace_style, lv_obj_replace_style); -/* Reusing lv_obj_move_foreground for lv_obj_clean */ +/* Reusing lv_obj_add_style for lv_obj_remove_style */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_clean_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_clean); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_remove_style); /* * lvgl extension definition for: - * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) + * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_delete_delayed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_remove_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t delay_ms = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, delay_ms); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_style_selector_t))lv_func_ptr)(obj, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_delayed_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_delete_delayed); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_obj_delete_anim_completed_cb */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_delete_anim_completed_cb_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_obj_delete_anim_completed_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_theme_mpobj, 2, mp_lv_obj_remove_theme, lv_obj_remove_theme); -/* Reusing lv_obj_move_foreground for lv_obj_delete_async */ +/* Reusing lv_obj_move_foreground for lv_obj_remove_style_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_async_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete_async); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_all_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_remove_style_all); /* * lvgl extension definition for: - * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) + * void lv_obj_report_style_change(lv_style_t *style) */ -static mp_obj_t mp_lv_obj_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_report_style_change(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_obj_t *parent = mp_to_lv(mp_args[1]); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(obj, parent); + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + ((void (*)(lv_style_t *))lv_func_ptr)(style); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_parent_mpobj, 2, mp_lv_obj_set_parent, lv_obj_set_parent); - -/* Reusing lv_obj_set_parent for lv_obj_swap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_swap_mpobj, 2, mp_lv_obj_set_parent, lv_obj_swap); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_report_style_change_mpobj, 1, mp_lv_obj_report_style_change, lv_obj_report_style_change); /* * lvgl extension definition for: - * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) + * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_move_to_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_refresh_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t index = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, index); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_index_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_move_to_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_style_mpobj, 3, mp_lv_obj_refresh_style, lv_obj_refresh_style); /* * lvgl extension definition for: - * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) + * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) */ -static mp_obj_t mp_lv_obj_get_screen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, en); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_screen_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_screen); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_enabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_set_style_enabled); /* * lvgl extension definition for: - * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) + * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_display(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_display_t * _res = ((lv_display_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_display_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_display_mpobj, 1, mp_lv_obj_get_display, lv_obj_get_display); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_enabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_get_style_enabled); -/* Reusing lv_obj_get_screen for lv_obj_get_parent */ +/* Reusing lv_obj_set_style_enabled for lv_obj_style_set_disabled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_parent_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_parent); - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) - */ - -static mp_obj_t mp_lv_obj_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); - return lv_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_child); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_style_set_disabled); -#define funcptr_constructor_cb NULL - - -/* - * lvgl extension definition for: - * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) - */ - -static mp_obj_t mp_funcptr_constructor_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - ((void (*)(const lv_obj_class_t *, lv_obj_t *))lv_func_ptr)(class_p, obj); - return mp_const_none; -} - - +/* Reusing lv_obj_get_style_enabled for lv_obj_style_get_disabled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_constructor_cb_mpobj, 2, mp_funcptr_constructor_cb, funcptr_constructor_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_style_get_disabled); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -#define funcptr_event_cb_1 NULL - /* * lvgl extension definition for: - * void event_cb(const lv_obj_class_t *class_p, lv_event_t *e) + * void lv_obj_enable_style_refresh(bool en) */ -static mp_obj_t mp_funcptr_event_cb_1(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_enable_style_refresh(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); - ((void (*)(const lv_obj_class_t *, lv_event_t *))lv_func_ptr)(class_p, e); + bool en = mp_obj_is_true(mp_args[0]); + ((void (*)(bool))lv_func_ptr)(en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_1_mpobj, 2, mp_funcptr_event_cb_1, funcptr_event_cb_1); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_enable_style_refresh_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_obj_enable_style_refresh); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); /* - * Struct lv_obj_class_t + * Struct lv_style_value_t */ -static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_class_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_value_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_class_t_type())); - return (lv_obj_class_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_value_t_type())); + return (lv_style_value_t*)self->data; } -#define mp_write_lv_obj_class_t(struct_obj) *((lv_obj_class_t*)mp_write_ptr_lv_obj_class_t(struct_obj)) +#define mp_write_lv_style_value_t(struct_obj) *((lv_style_value_t*)mp_write_ptr_lv_style_value_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_class_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_value_t(void *field) { - return lv_to_mp_struct(get_mp_lv_obj_class_t_type(), field); + return lv_to_mp_struct(get_mp_lv_style_value_t_type(), field); } -#define mp_read_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(copy_buffer(&field, sizeof(lv_obj_class_t))) -#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) +#define mp_read_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(copy_buffer(&field, sizeof(lv_style_value_t))) +#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) -static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_obj_class_t *data = (lv_obj_class_t*)self->data; + GENMPY_UNUSED lv_style_value_t *data = (lv_style_value_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_obj_class_t *; - case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, (void*)data->event_cb, lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_width_def: dest[0] = mp_obj_new_int(data->width_def); break; // converting from int32_t; - case MP_QSTR_height_def: dest[0] = mp_obj_new_int(data->height_def); break; // converting from int32_t; - case MP_QSTR_editable: dest[0] = mp_obj_new_int_from_uint(data->editable); break; // converting from uint32_t; - case MP_QSTR_group_def: dest[0] = mp_obj_new_int_from_uint(data->group_def); break; // converting from uint32_t; - case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; - case MP_QSTR_theme_inheritable: dest[0] = mp_obj_new_int_from_uint(data->theme_inheritable); break; // converting from uint32_t; + case MP_QSTR_num: dest[0] = mp_obj_new_int(data->num); break; // converting from int32_t; + case MP_QSTR_ptr: dest[0] = ptr_to_mp((void*)data->ptr); break; // converting from void *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -10740,18 +10324,9 @@ static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_class_t *; - case MP_QSTR_constructor_cb: data->constructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_destructor_cb: data->destructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_width_def: data->width_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_height_def: data->height_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_editable: data->editable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_group_def: data->group_def = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_theme_inheritable: data->theme_inheritable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_num: data->num = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ptr: data->ptr = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; default: return; } @@ -10760,372 +10335,450 @@ static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_obj_class_t_print(const mp_print_t *print, +static void mp_lv_style_value_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_obj_class_t"); + mp_printf(print, "struct lv_style_value_t"); } -static const mp_obj_dict_t mp_lv_obj_class_t_locals_dict; +static const mp_obj_dict_t mp_lv_style_value_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_obj_class_t_type, - MP_QSTR_lv_obj_class_t, + mp_lv_style_value_t_type, + MP_QSTR_lv_style_value_t, MP_TYPE_FLAG_NONE, - print, mp_lv_obj_class_t_print, + print, mp_lv_style_value_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_obj_class_t_attr, - locals_dict, &mp_lv_obj_class_t_locals_dict, + attr, mp_lv_style_value_t_attr, + locals_dict, &mp_lv_style_value_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void) { - return &mp_lv_obj_class_t_type; + return &mp_lv_style_value_t_type; } /* * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) + * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_get_child_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[2]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_func_ptr)(obj, idx, class_p); - return lv_to_mp((void*)_res); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); + return mp_read_lv_style_value_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_child_by_type); - -/* Reusing lv_obj_get_child for lv_obj_get_sibling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_sibling); - -/* Reusing lv_obj_get_child_by_type for lv_obj_get_sibling_by_type */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_sibling_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop); /* * lvgl extension definition for: - * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) + * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_get_child_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_has_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_func_ptr)(obj, selector, prop); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_mpobj, 1, mp_lv_obj_get_child_count, lv_obj_get_child_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_style_prop_mpobj, 3, mp_lv_obj_has_style_prop, lv_obj_has_style_prop); /* * lvgl extension definition for: - * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) + * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_child_count_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_value_t value = mp_write_lv_style_value_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_by_type_mpobj, 2, mp_lv_obj_get_child_count_by_type, lv_obj_get_child_count_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_local_style_prop_mpobj, 4, mp_lv_obj_set_local_style_prop, lv_obj_set_local_style_prop); /* * lvgl extension definition for: - * int32_t lv_obj_get_index(const lv_obj_t *obj) + * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_value_t *value = mp_write_ptr_lv_style_value_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_style_res_t _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_local_style_prop_mpobj, 4, mp_lv_obj_get_local_style_prop, lv_obj_get_local_style_prop); /* * lvgl extension definition for: - * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) + * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_index_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_remove_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_func_ptr)(obj, prop, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_by_type_mpobj, 2, mp_lv_obj_get_index_by_type, lv_obj_get_index_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_local_style_prop_mpobj, 3, mp_lv_obj_remove_local_style_prop, lv_obj_remove_local_style_prop); /* - * Callback function lv_obj_tree_walk_cb - * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) + * lvgl extension definition for: + * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) */ -GENMPY_UNUSED static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) +static mp_obj_t mp_lv_obj_style_apply_color_filter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = lv_to_mp((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_tree_walk_cb)), 2, mp_args); - return (int)mp_obj_get_int(callback_result); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_value_t v = mp_write_lv_style_value_t(mp_args[2]); + lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_func_ptr)(obj, part, v); + return mp_read_lv_style_value_t(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter); + /* * lvgl extension definition for: - * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) + * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) */ -static mp_obj_t mp_lv_obj_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_fade_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *cb = mp_lv_callback(mp_args[1], &lv_obj_tree_walk_cb_callback, MP_QSTR_lv_obj_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_obj_t *start_obj = mp_to_lv(mp_args[0]); - ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_func_ptr)(start_obj, cb, user_data); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t time = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, time, delay); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_tree_walk_mpobj, 3, mp_lv_obj_tree_walk, lv_obj_tree_walk); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_in_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_in); -/* Reusing lv_obj_move_foreground for lv_obj_dump_tree */ +/* Reusing lv_obj_fade_in for lv_obj_fade_out */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_dump_tree_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_dump_tree); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_out_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_out); /* * lvgl extension definition for: - * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) + * int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_set_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pos_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_width); -/* Reusing lv_obj_move_to_index for lv_obj_set_x */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_x_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_width); -/* Reusing lv_obj_move_to_index for lv_obj_set_y */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_y_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_width); -/* Reusing lv_obj_set_pos for lv_obj_set_size */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_size_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_height); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_height); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_height); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_length */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_length); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_x); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_y); /* * lvgl extension definition for: - * bool lv_obj_refr_size(lv_obj_t *obj) + * lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_refr_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - bool _res = ((bool (*)(lv_obj_t *))lv_func_ptr)(obj); - return convert_to_bool(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_align_t _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refr_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align, lv_obj_get_style_align); -/* Reusing lv_obj_move_to_index for lv_obj_set_width */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_width); -/* Reusing lv_obj_move_to_index for lv_obj_set_height */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_height); -/* Reusing lv_obj_move_to_index for lv_obj_set_content_width */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_x); -/* Reusing lv_obj_move_to_index for lv_obj_set_content_height */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_y); -/* Reusing lv_obj_delete_delayed for lv_obj_set_layout */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_layout_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_set_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_radial); +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x */ -/* - * lvgl extension definition for: - * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y */ -static mp_obj_t mp_lv_obj_is_layout_positioned(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - bool _res = ((bool (*)(const lv_obj_t *))lv_func_ptr)(obj); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_rotation */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_rotation); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_layout_positioned_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_layout_positioned); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_x); -/* Reusing lv_obj_move_foreground for lv_obj_mark_layout_as_dirty */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_mark_layout_as_dirty_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_mark_layout_as_dirty); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_y); +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_x */ -/* - * lvgl extension definition for: - * void lv_obj_update_layout(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_x); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_y */ -static mp_obj_t mp_lv_obj_update_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - ((void (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_y); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_top */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_top); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layout_mpobj, 1, mp_lv_obj_update_layout, lv_obj_update_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_bottom); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_left); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_right); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_row */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_row); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_column */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_column); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_radial */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_radial); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_top); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_bottom); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_left); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_right); /* * lvgl extension definition for: - * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) + * lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_align_t))lv_func_ptr)(obj, align); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_align_mpobj, 2, mp_lv_obj_set_align, lv_obj_set_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color_filtered); /* * lvgl extension definition for: - * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + * lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t align = (int)mp_obj_get_int(mp_args[1]); - int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, align, x_ofs, y_ofs); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_opa_t _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_mpobj, 4, mp_lv_obj_align, lv_obj_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_opa); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color_filtered); /* * lvgl extension definition for: - * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + * lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_align_to(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(mp_args[1]); - lv_align_t align = (int)mp_obj_get_int(mp_args[2]); - int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, base, align, x_ofs, y_ofs); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_grad_dir_t _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_to_mpobj, 5, mp_lv_obj_align_to, lv_obj_align_to); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir, lv_obj_get_style_bg_grad_dir); -/* Reusing lv_obj_move_foreground for lv_obj_center */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_main_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_center_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_center); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_main_stop); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_grad_stop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_grad_stop); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_main_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_main_opa); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_grad_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_grad_opa); /* - * Struct lv_matrix_t + * Struct lv_grad_stop_t */ -static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_matrix_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_stop_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_matrix_t_type())); - return (lv_matrix_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_stop_t_type())); + return (lv_grad_stop_t*)self->data; } -#define mp_write_lv_matrix_t(struct_obj) *((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj)) +#define mp_write_lv_grad_stop_t(struct_obj) *((lv_grad_stop_t*)mp_write_ptr_lv_grad_stop_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_matrix_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_stop_t(void *field) { - return lv_to_mp_struct(get_mp_lv_matrix_t_type(), field); + return lv_to_mp_struct(get_mp_lv_grad_stop_t_type(), field); } -#define mp_read_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(copy_buffer(&field, sizeof(lv_matrix_t))) -#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) +#define mp_read_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(copy_buffer(&field, sizeof(lv_grad_stop_t))) +#define mp_read_byref_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(&field) -static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_matrix_t *data = (lv_matrix_t*)self->data; + GENMPY_UNUSED lv_grad_stop_t *data = (lv_grad_stop_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_frac: dest[0] = mp_obj_new_int_from_uint(data->frac); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -11134,7 +10787,9 @@ static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - ; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_frac: data->frac = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -11143,716 +10798,439 @@ static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_matrix_t_print(const mp_print_t *print, +static void mp_lv_grad_stop_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_matrix_t"); + mp_printf(print, "struct lv_grad_stop_t"); } -static const mp_obj_dict_t mp_lv_matrix_t_locals_dict; +static const mp_obj_dict_t mp_lv_grad_stop_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_matrix_t_type, - MP_QSTR_lv_matrix_t, + mp_lv_grad_stop_t_type, + MP_QSTR_lv_grad_stop_t, MP_TYPE_FLAG_NONE, - print, mp_lv_matrix_t_print, + print, mp_lv_grad_stop_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_matrix_t_attr, - locals_dict, &mp_lv_matrix_t_locals_dict, + attr, mp_lv_grad_stop_t_attr, + locals_dict, &mp_lv_grad_stop_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void) { - return &mp_lv_matrix_t_type; + return &mp_lv_grad_stop_t_type; } /* - * lvgl extension definition for: - * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) + * Array convertors for lv_grad_stop_t [2] */ -static mp_obj_t mp_lv_obj_set_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_grad_stop_t *mp_arr_to_lv_grad_stop_t___2__(mp_obj_t mp_arr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(mp_args[1]); - ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_func_ptr)(obj, matrix); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_grad_stop_t *lv_arr = (lv_grad_stop_t*)m_malloc(len * sizeof(lv_grad_stop_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_grad_stop_t(item); + } + return (lv_grad_stop_t *)lv_arr; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_transform_mpobj, 2, mp_lv_obj_set_transform, lv_obj_set_transform); - -/* Reusing lv_obj_move_foreground for lv_obj_reset_transform */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_grad_stop_t___2__(lv_grad_stop_t *arr) +{ + mp_obj_t obj_arr[2]; + for (size_t i=0; i<2; i++){ + obj_arr[i] = mp_read_lv_grad_stop_t(arr[i]); + } + return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_reset_transform_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_reset_transform); - +typedef __typeof__( ((lv_grad_dsc_t*)(0))->params ) lv_grad_dsc_params_t; +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->linear ) lv_grad_dsc_params_linear_t; /* - * lvgl extension definition for: - * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) + * Struct lv_grad_dsc_params_linear_t */ -static mp_obj_t mp_lv_obj_get_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_linear_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *coords = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, coords); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_linear_t_type())); + return (lv_grad_dsc_params_linear_t*)self->data; } - +#define mp_write_lv_grad_dsc_params_linear_t(struct_obj) *((lv_grad_dsc_params_linear_t*)mp_write_ptr_lv_grad_dsc_params_linear_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_coords); - -/* Reusing lv_obj_get_index for lv_obj_get_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x); - -/* Reusing lv_obj_get_index for lv_obj_get_x2 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x2); - -/* Reusing lv_obj_get_index for lv_obj_get_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y); - -/* Reusing lv_obj_get_index for lv_obj_get_y2 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y2); - -/* Reusing lv_obj_get_index for lv_obj_get_x_aligned */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x_aligned); - -/* Reusing lv_obj_get_index for lv_obj_get_y_aligned */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y_aligned); - -/* Reusing lv_obj_get_index for lv_obj_get_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_width); - -/* Reusing lv_obj_get_index for lv_obj_get_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_height); - -/* Reusing lv_obj_get_index for lv_obj_get_content_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_width); - -/* Reusing lv_obj_get_index for lv_obj_get_content_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_height); - -/* Reusing lv_obj_get_coords for lv_obj_get_content_coords */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_content_coords); - -/* Reusing lv_obj_get_index for lv_obj_get_self_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_width); - -/* Reusing lv_obj_get_index for lv_obj_get_self_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_height); - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_get_style_clamped_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_width); - -/* Reusing lv_obj_get_style_clamped_width for lv_obj_get_style_clamped_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_height); - -/* Reusing lv_obj_refr_size for lv_obj_is_style_any_width_content */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_width_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_width_content); - -/* Reusing lv_obj_refr_size for lv_obj_is_style_any_height_content */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_height_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_height_content); - -/* Reusing lv_obj_refr_size for lv_obj_is_width_min */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_min); - -/* Reusing lv_obj_refr_size for lv_obj_is_height_min */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_min); - -/* Reusing lv_obj_refr_size for lv_obj_is_width_max */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_max); - -/* Reusing lv_obj_refr_size for lv_obj_is_height_max */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_max); - -/* Reusing lv_obj_refr_size for lv_obj_refresh_self_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_self_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refresh_self_size); - -/* Reusing lv_obj_move_foreground for lv_obj_refr_pos */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_pos_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_refr_pos); - -/* Reusing lv_obj_set_pos for lv_obj_move_to */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_mpobj, 3, mp_lv_obj_set_pos, lv_obj_move_to); - - -/* - * lvgl extension definition for: - * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) - */ - -static mp_obj_t mp_lv_obj_move_children_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x_diff = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y_diff = (int32_t)mp_obj_get_int(mp_args[2]); - bool ignore_floating = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_func_ptr)(obj, x_diff, y_diff, ignore_floating); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_children_by_mpobj, 4, mp_lv_obj_move_children_by, lv_obj_move_children_by); - - -/* - * lvgl extension definition for: - * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_get_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_linear_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_matrix_t * _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_matrix_t((void*)_res); + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_linear_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transform_mpobj, 1, mp_lv_obj_get_transform, lv_obj_get_transform); - - -/* - * lvgl extension definition for: - * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) - */ +#define mp_read_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_linear_t))) +#define mp_read_byref_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(&field) -static mp_obj_t mp_lv_obj_transform_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_linear_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[1]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, p, flags); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_mpobj, 3, mp_lv_obj_transform_point, lv_obj_transform_point); - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)self->data; -/* - * Array convertors for lv_point_t [] - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_start: dest[0] = mp_read_byref_lv_point_t(data->start); break; // converting from lv_point_t; + case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_start: data->start = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + default: return; + } -GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_t(item); + dest[0] = MP_OBJ_NULL; // indicate success + } } - return (lv_point_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t_____(lv_point_t *arr) +static void mp_lv_grad_dsc_params_linear_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - return mp_read_ptr_lv_point_t((void*)arr); + mp_printf(print, "struct lv_grad_dsc_params_linear_t"); } +static const mp_obj_dict_t mp_lv_grad_dsc_params_linear_t_locals_dict; -/* - * lvgl extension definition for: - * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_linear_t_type, + MP_QSTR_lv_grad_dsc_params_linear_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_linear_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_linear_t_attr, + locals_dict, &mp_lv_grad_dsc_params_linear_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_obj_transform_point_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *points = mp_arr_to_lv_point_t_____(mp_args[1]); - size_t count = (size_t)mp_obj_get_int(mp_args[2]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, points, count, flags); - return mp_const_none; + return &mp_lv_grad_dsc_params_linear_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_array_mpobj, 4, mp_lv_obj_transform_point_array, lv_obj_transform_point_array); +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->radial ) lv_grad_dsc_params_radial_t; /* - * lvgl extension definition for: - * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) + * Struct lv_grad_dsc_params_radial_t */ -static mp_obj_t mp_lv_obj_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, area, flags); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transformed_area_mpobj, 3, mp_lv_obj_get_transformed_area, lv_obj_get_transformed_area); - - -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) - */ +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void); -static mp_obj_t mp_lv_obj_invalidate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_radial_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_func_ptr)(obj, area); - return mp_obj_new_int(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_radial_t_type())); + return (lv_grad_dsc_params_radial_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_area_mpobj, 2, mp_lv_obj_invalidate_area, lv_obj_invalidate_area); - - -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) - */ +#define mp_write_lv_grad_dsc_params_radial_t(struct_obj) *((lv_grad_dsc_params_radial_t*)mp_write_ptr_lv_grad_dsc_params_radial_t(struct_obj)) -static mp_obj_t mp_lv_obj_invalidate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_radial_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_radial_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_mpobj, 1, mp_lv_obj_invalidate, lv_obj_invalidate); - - -/* - * lvgl extension definition for: - * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) - */ +#define mp_read_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_radial_t))) +#define mp_read_byref_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(&field) -static mp_obj_t mp_lv_obj_area_is_visible(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_radial_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - bool _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, area); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_area_is_visible_mpobj, 2, mp_lv_obj_area_is_visible, lv_obj_area_is_visible); - -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_visible */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_visible); - -/* Reusing lv_obj_move_to_index for lv_obj_set_ext_click_area */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_click_area_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_click_area); - -/* Reusing lv_obj_get_coords for lv_obj_get_click_area */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_click_area_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_click_area); - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)self->data; -/* - * lvgl extension definition for: - * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_focal: dest[0] = mp_read_byref_lv_point_t(data->focal); break; // converting from lv_point_t; + case MP_QSTR_focal_extent: dest[0] = mp_read_byref_lv_point_t(data->focal_extent); break; // converting from lv_point_t; + case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; + case MP_QSTR_end_extent: dest[0] = mp_read_byref_lv_point_t(data->end_extent); break; // converting from lv_point_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_focal: data->focal = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_focal_extent: data->focal_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_end_extent: data->end_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + default: return; + } -static mp_obj_t mp_lv_obj_hit_test(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - bool _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); - return convert_to_bool(_res); + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_hit_test_mpobj, 2, mp_lv_obj_hit_test, lv_obj_hit_test); - - -/* - * lvgl extension definition for: - * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) - */ - -static mp_obj_t mp_lv_obj_calc_dynamic_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_radial_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_func_ptr)(obj, prop); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_grad_dsc_params_radial_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_width_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_width); - -/* Reusing lv_obj_calc_dynamic_width for lv_obj_calc_dynamic_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_height_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_height); - +static const mp_obj_dict_t mp_lv_grad_dsc_params_radial_t_locals_dict; -/* - * lvgl extension definition for: - * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_radial_t_type, + MP_QSTR_lv_grad_dsc_params_radial_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_radial_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_radial_t_attr, + locals_dict, &mp_lv_grad_dsc_params_radial_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_obj_set_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; + return &mp_lv_grad_dsc_params_radial_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollbar_mode_mpobj, 2, mp_lv_obj_set_scrollbar_mode, lv_obj_set_scrollbar_mode); +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->conical ) lv_grad_dsc_params_conical_t; /* - * lvgl extension definition for: - * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) + * Struct lv_grad_dsc_params_conical_t */ -static mp_obj_t mp_lv_obj_set_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_dir_t dir = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_dir_t))lv_func_ptr)(obj, dir); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_obj_set_scroll_dir); - - -/* - * lvgl extension definition for: - * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) - */ +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void); -static mp_obj_t mp_lv_obj_set_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_conical_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scroll_snap_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_func_ptr)(obj, align); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_conical_t_type())); + return (lv_grad_dsc_params_conical_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_x_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_x); - -/* Reusing lv_obj_set_scroll_snap_x for lv_obj_set_scroll_snap_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_y_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_y); - - -/* - * lvgl extension definition for: - * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) - */ +#define mp_write_lv_grad_dsc_params_conical_t(struct_obj) *((lv_grad_dsc_params_conical_t*)mp_write_ptr_lv_grad_dsc_params_conical_t(struct_obj)) -static mp_obj_t mp_lv_obj_get_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_conical_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_scrollbar_mode_t _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_conical_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_mode_mpobj, 1, mp_lv_obj_get_scrollbar_mode, lv_obj_get_scrollbar_mode); - - -/* - * lvgl extension definition for: - * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) - */ +#define mp_read_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_conical_t))) +#define mp_read_byref_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(&field) -static mp_obj_t mp_lv_obj_get_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_obj_get_scroll_dir); - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)self->data; -/* - * lvgl extension definition for: - * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_center: dest[0] = mp_read_byref_lv_point_t(data->center); break; // converting from lv_point_t; + case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int16_t; + case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_center: data->center = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_start_angle: data->start_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_end_angle: data->end_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + default: return; + } -static mp_obj_t mp_lv_obj_get_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_scroll_snap_t _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_x_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_x); - -/* Reusing lv_obj_get_scroll_snap_x for lv_obj_get_scroll_snap_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_y_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_y); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_x); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_y); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_top */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_top_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_top); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_bottom */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_bottom_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_bottom); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_left */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_left_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_left); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_right_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_right); - - -/* - * lvgl extension definition for: - * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) - */ - -static mp_obj_t mp_lv_obj_get_scroll_end(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_conical_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_t *end = mp_write_ptr_lv_point_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, end); - return mp_const_none; + mp_printf(print, "struct lv_grad_dsc_params_conical_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_end_mpobj, 2, mp_lv_obj_get_scroll_end, lv_obj_get_scroll_end); - +static const mp_obj_dict_t mp_lv_grad_dsc_params_conical_t_locals_dict; -/* - * lvgl extension definition for: - * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_conical_t_type, + MP_QSTR_lv_grad_dsc_params_conical_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_conical_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_conical_t_attr, + locals_dict, &mp_lv_grad_dsc_params_conical_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_obj_scroll_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t dx = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t dy = (int32_t)mp_obj_get_int(mp_args[2]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, dx, dy, anim_en); - return mp_const_none; + return &mp_lv_grad_dsc_params_conical_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by); - -/* Reusing lv_obj_scroll_by for lv_obj_scroll_by_bounded */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_bounded_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by_bounded); - -/* Reusing lv_obj_scroll_by for lv_obj_scroll_to */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_to); /* - * lvgl extension definition for: - * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) + * Struct lv_grad_dsc_params_t */ -static mp_obj_t mp_lv_obj_scroll_to_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, x, anim_en); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_t_type())); + return (lv_grad_dsc_params_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_x_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_x); - -/* Reusing lv_obj_scroll_to_x for lv_obj_scroll_to_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_y_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_y); - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) - */ +#define mp_write_lv_grad_dsc_params_t(struct_obj) *((lv_grad_dsc_params_t*)mp_write_ptr_lv_grad_dsc_params_t(struct_obj)) -static mp_obj_t mp_lv_obj_scroll_to_view(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_t(void *field) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, anim_en); - return mp_const_none; + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view); - -/* Reusing lv_obj_scroll_to_view for lv_obj_scroll_to_view_recursive */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_recursive_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view_recursive); - -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolling_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolling); - -/* Reusing lv_obj_update_layout for lv_obj_stop_scroll_anim */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_stop_scroll_anim_mpobj, 1, mp_lv_obj_update_layout, lv_obj_stop_scroll_anim); - -/* Reusing lv_obj_scroll_to_view for lv_obj_update_snap */ +#define mp_read_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_t))) +#define mp_read_byref_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_snap_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_update_snap); - +static void mp_lv_grad_dsc_params_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)self->data; -/* - * lvgl extension definition for: - * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_linear: dest[0] = mp_read_byref_lv_grad_dsc_params_linear_t(data->linear); break; // converting from lv_grad_dsc_params_linear_t; + case MP_QSTR_radial: dest[0] = mp_read_byref_lv_grad_dsc_params_radial_t(data->radial); break; // converting from lv_grad_dsc_params_radial_t; + case MP_QSTR_conical: dest[0] = mp_read_byref_lv_grad_dsc_params_conical_t(data->conical); break; // converting from lv_grad_dsc_params_conical_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_linear: data->linear = mp_write_lv_grad_dsc_params_linear_t(dest[1]); break; // converting to lv_grad_dsc_params_linear_t; + case MP_QSTR_radial: data->radial = mp_write_lv_grad_dsc_params_radial_t(dest[1]); break; // converting to lv_grad_dsc_params_radial_t; + case MP_QSTR_conical: data->conical = mp_write_lv_grad_dsc_params_conical_t(dest[1]); break; // converting to lv_grad_dsc_params_conical_t; + default: return; + } -static mp_obj_t mp_lv_obj_get_scrollbar_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_area_t *hor_area = mp_write_ptr_lv_area_t(mp_args[1]); - lv_area_t *ver_area = mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor_area, ver_area); - return mp_const_none; + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - +static void mp_lv_grad_dsc_params_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_grad_dsc_params_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_area_mpobj, 3, mp_lv_obj_get_scrollbar_area, lv_obj_get_scrollbar_area); - -/* Reusing lv_obj_move_foreground for lv_obj_scrollbar_invalidate */ +static const mp_obj_dict_t mp_lv_grad_dsc_params_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scrollbar_invalidate_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_scrollbar_invalidate); - -/* Reusing lv_obj_scroll_to_view for lv_obj_readjust_scroll */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_t_type, + MP_QSTR_lv_grad_dsc_params_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_t_attr, + locals_dict, &mp_lv_grad_dsc_params_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_readjust_scroll_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_readjust_scroll); +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void) +{ + return &mp_lv_grad_dsc_params_t_type; +} /* - * Struct lv_style_t + * Struct lv_grad_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_style_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_t_type())); - return (lv_style_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_t_type())); + return (lv_grad_dsc_t*)self->data; } -#define mp_write_lv_style_t(struct_obj) *((lv_style_t*)mp_write_ptr_lv_style_t(struct_obj)) +#define mp_write_lv_grad_dsc_t(struct_obj) *((lv_grad_dsc_t*)mp_write_ptr_lv_grad_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_style_t_type(), field); + return lv_to_mp_struct(get_mp_lv_grad_dsc_t_type(), field); } -#define mp_read_lv_style_t(field) mp_read_ptr_lv_style_t(copy_buffer(&field, sizeof(lv_style_t))) -#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) +#define mp_read_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(copy_buffer(&field, sizeof(lv_grad_dsc_t))) +#define mp_read_byref_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(&field) -static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_t *data = (lv_style_t*)self->data; + GENMPY_UNUSED lv_grad_dsc_t *data = (lv_grad_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_values_and_props: dest[0] = ptr_to_mp((void*)data->values_and_props); break; // converting from void *; - case MP_QSTR_has_group: dest[0] = mp_obj_new_int_from_uint(data->has_group); break; // converting from uint32_t; - case MP_QSTR_prop_cnt: dest[0] = mp_obj_new_int_from_uint(data->prop_cnt); break; // converting from uint8_t; + case MP_QSTR_stops: dest[0] = mp_lv_struct_array_new(self_in, data->stops, 2, sizeof(lv_grad_stop_t), mp_read_ptr_lv_grad_stop_t, mp_write_ptr_lv_grad_stop_t); break; // converting from lv_grad_stop_t [2]; + case MP_QSTR_stops_count: dest[0] = mp_obj_new_int_from_uint(data->stops_count); break; // converting from uint8_t; + case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_grad_dir_t; + case MP_QSTR_extend: dest[0] = mp_obj_new_int(data->extend); break; // converting from lv_grad_extend_t; + case MP_QSTR_params: dest[0] = mp_read_byref_lv_grad_dsc_params_t(data->params); break; // converting from lv_grad_dsc_params_t; + case MP_QSTR_state: dest[0] = ptr_to_mp((void*)data->state); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -11861,9 +11239,12 @@ static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_values_and_props: data->values_and_props = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_has_group: data->has_group = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_prop_cnt: data->prop_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stops: mp_lv_struct_array_assign(data->stops, 2, sizeof(lv_grad_stop_t), mp_write_ptr_lv_grad_stop_t, dest[1]); break; // converting to lv_grad_stop_t [2]; + case MP_QSTR_stops_count: data->stops_count = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_dir_t; + case MP_QSTR_extend: data->extend = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_extend_t; + case MP_QSTR_params: data->params = mp_write_lv_grad_dsc_params_t(dest[1]); break; // converting to lv_grad_dsc_params_t; + case MP_QSTR_state: data->state = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -11872,234 +11253,240 @@ static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_style_t_print(const mp_print_t *print, +static void mp_lv_grad_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_style_t"); + mp_printf(print, "struct lv_grad_dsc_t"); } -static const mp_obj_dict_t mp_lv_style_t_locals_dict; +static const mp_obj_dict_t mp_lv_grad_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_t_type, - MP_QSTR_lv_style_t, + mp_lv_grad_dsc_t_type, + MP_QSTR_lv_grad_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_style_t_print, + print, mp_lv_grad_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_style_t_attr, - locals_dict, &mp_lv_style_t_locals_dict, + attr, mp_lv_grad_dsc_t_attr, + locals_dict, &mp_lv_grad_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_style_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void) { - return &mp_lv_style_t_type; + return &mp_lv_grad_dsc_t_type; } /* * lvgl extension definition for: - * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + * const lv_grad_dsc_t *lv_obj_get_style_bg_grad(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_add_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_grad_dsc_t * _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_grad_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_add_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad, lv_obj_get_style_bg_grad); /* * lvgl extension definition for: - * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) + * const void *lv_obj_get_style_bg_image_src(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_replace_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, old_style, new_style, selector); - return convert_to_bool(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const void * _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_replace_style_mpobj, 4, mp_lv_obj_replace_style, lv_obj_replace_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bg_image_src); -/* Reusing lv_obj_add_style for lv_obj_remove_style */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_remove_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_opa); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_recolor_opa); /* * lvgl extension definition for: - * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) + * bool lv_obj_get_style_bg_image_tiled(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_remove_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_tiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_style_selector_t))lv_func_ptr)(obj, selector); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_theme_mpobj, 2, mp_lv_obj_remove_theme, lv_obj_remove_theme); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_bg_image_tiled); -/* Reusing lv_obj_move_foreground for lv_obj_remove_style_all */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_all_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_remove_style_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color); +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color_filtered */ -/* - * lvgl extension definition for: - * void lv_obj_report_style_change(lv_style_t *style) - */ - -static mp_obj_t mp_lv_obj_report_style_change(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - ((void (*)(lv_style_t *))lv_func_ptr)(style); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_border_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_border_opa); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_border_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_report_style_change_mpobj, 1, mp_lv_obj_report_style_change, lv_obj_report_style_change); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_border_width); /* * lvgl extension definition for: - * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) + * lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_refresh_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_border_side(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); - return mp_const_none; + lv_border_side_t _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_style_mpobj, 3, mp_lv_obj_refresh_style, lv_obj_refresh_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side, lv_obj_get_style_border_side); +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_border_post */ -/* - * lvgl extension definition for: - * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_border_post); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_width */ -static mp_obj_t mp_lv_obj_set_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool en = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, en); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_width); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_enabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_set_style_enabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color_filtered); +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_outline_opa */ -/* - * lvgl extension definition for: - * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_outline_opa); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_pad */ -static mp_obj_t mp_lv_obj_get_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_pad); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_width */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_width); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_enabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_get_style_enabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_x); -/* Reusing lv_obj_set_style_enabled for lv_obj_style_set_disabled */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_style_set_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_y); -/* Reusing lv_obj_get_style_enabled for lv_obj_style_get_disabled */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_style_get_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_spread); +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color */ -/* - * lvgl extension definition for: - * void lv_obj_enable_style_refresh(bool en) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color_filtered */ -static mp_obj_t mp_lv_obj_enable_style_refresh(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - bool en = mp_obj_is_true(mp_args[0]); - ((void (*)(bool))lv_func_ptr)(en); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_shadow_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_shadow_opa); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_enable_style_refresh_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_obj_enable_style_refresh); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_opa); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_recolor_opa); /* - * Struct lv_style_value_t + * Struct lv_image_colorkey_t */ -static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_value_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_colorkey_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_value_t_type())); - return (lv_style_value_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_colorkey_t_type())); + return (lv_image_colorkey_t*)self->data; } -#define mp_write_lv_style_value_t(struct_obj) *((lv_style_value_t*)mp_write_ptr_lv_style_value_t(struct_obj)) +#define mp_write_lv_image_colorkey_t(struct_obj) *((lv_image_colorkey_t*)mp_write_ptr_lv_image_colorkey_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_value_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_colorkey_t(void *field) { - return lv_to_mp_struct(get_mp_lv_style_value_t_type(), field); + return lv_to_mp_struct(get_mp_lv_image_colorkey_t_type(), field); } -#define mp_read_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(copy_buffer(&field, sizeof(lv_style_value_t))) -#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) +#define mp_read_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(copy_buffer(&field, sizeof(lv_image_colorkey_t))) +#define mp_read_byref_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(&field) -static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_value_t *data = (lv_style_value_t*)self->data; + GENMPY_UNUSED lv_image_colorkey_t *data = (lv_image_colorkey_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_num: dest[0] = mp_obj_new_int(data->num); break; // converting from int32_t; - case MP_QSTR_ptr: dest[0] = ptr_to_mp((void*)data->ptr); break; // converting from void *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_low: dest[0] = mp_read_byref_lv_color_t(data->low); break; // converting from lv_color_t; + case MP_QSTR_high: dest[0] = mp_read_byref_lv_color_t(data->high); break; // converting from lv_color_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -12108,9 +11495,8 @@ static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest // store attribute switch(attr) { - case MP_QSTR_num: data->num = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ptr: data->ptr = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_low: data->low = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_high: data->high = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; default: return; } @@ -12119,736 +11505,758 @@ static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest } } -static void mp_lv_style_value_t_print(const mp_print_t *print, +static void mp_lv_image_colorkey_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_style_value_t"); + mp_printf(print, "struct lv_image_colorkey_t"); } -static const mp_obj_dict_t mp_lv_style_value_t_locals_dict; +static const mp_obj_dict_t mp_lv_image_colorkey_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_value_t_type, - MP_QSTR_lv_style_value_t, + mp_lv_image_colorkey_t_type, + MP_QSTR_lv_image_colorkey_t, MP_TYPE_FLAG_NONE, - print, mp_lv_style_value_t_print, + print, mp_lv_image_colorkey_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_style_value_t_attr, - locals_dict, &mp_lv_style_value_t_locals_dict, + attr, mp_lv_image_colorkey_t_attr, + locals_dict, &mp_lv_image_colorkey_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void) { - return &mp_lv_style_value_t_type; + return &mp_lv_image_colorkey_t_type; } /* * lvgl extension definition for: - * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) + * const lv_image_colorkey_t *lv_obj_get_style_image_colorkey(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_image_colorkey(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); - return mp_read_lv_style_value_t(_res); + const lv_image_colorkey_t * _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_image_colorkey_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey, lv_obj_get_style_image_colorkey); +/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_width */ -/* - * lvgl extension definition for: - * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_width); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_width */ -static mp_obj_t mp_lv_obj_has_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_func_ptr)(obj, selector, prop); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_width); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_gap */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_gap); + +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_line_rounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_style_prop_mpobj, 3, mp_lv_obj_has_style_prop, lv_obj_has_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_line_rounded); +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color */ -/* - * lvgl extension definition for: - * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color_filtered */ -static mp_obj_t mp_lv_obj_set_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_value_t value = mp_write_lv_style_value_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_line_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_line_opa); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_local_style_prop_mpobj, 4, mp_lv_obj_set_local_style_prop, lv_obj_set_local_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_arc_width); +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_arc_rounded */ -/* - * lvgl extension definition for: - * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_arc_rounded); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color */ -static mp_obj_t mp_lv_obj_get_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_value_t *value = mp_write_ptr_lv_style_value_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_style_res_t _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color_filtered */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_arc_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_local_style_prop_mpobj, 4, mp_lv_obj_get_local_style_prop, lv_obj_get_local_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_arc_opa); + +/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_arc_image_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_arc_image_src); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_opa); /* * lvgl extension definition for: - * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) + * const lv_font_t *lv_obj_get_style_text_font(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_remove_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_font(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_func_ptr)(obj, prop, selector); - return convert_to_bool(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_font_t * _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_font_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_local_style_prop_mpobj, 3, mp_lv_obj_remove_local_style_prop, lv_obj_remove_local_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font, lv_obj_get_style_text_font); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_letter_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_letter_space); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_line_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_line_space); /* * lvgl extension definition for: - * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) + * lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_style_apply_color_filter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_decor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_value_t v = mp_write_lv_style_value_t(mp_args[2]); - lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_func_ptr)(obj, part, v); - return mp_read_lv_style_value_t(_res); + lv_text_decor_t _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor, lv_obj_get_style_text_decor); /* * lvgl extension definition for: - * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) + * lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_fade_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t time = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, time, delay); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_in_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_in); - -/* Reusing lv_obj_fade_in for lv_obj_fade_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_out_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_out); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align, lv_obj_get_style_text_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color); -/* Reusing lv_obj_get_style_align_internal for lv_obj_get_style_align */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color_filtered); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_outline_stroke_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_outline_stroke_width); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_outline_stroke_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_outline_stroke_opa); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left */ +/* + * lvgl extension definition for: + * lv_text_leading_trim_t lv_obj_get_style_text_leading_trim(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right */ +static mp_obj_t mp_lv_obj_get_style_text_leading_trim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_text_leading_trim_t _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_mpobj, 2, mp_lv_obj_get_style_text_leading_trim, lv_obj_get_style_text_leading_trim); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_blur_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_blur_radius); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial */ +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_blur_backdrop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_blur_backdrop); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom */ +/* + * lvgl extension definition for: + * lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left */ +static mp_obj_t mp_lv_obj_get_style_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_blur_quality_t _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_blur_quality); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_radius); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_x); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_opa */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_y); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color_filtered); -/* Reusing lv_obj_get_style_bg_grad_dir_internal for lv_obj_get_style_bg_grad_dir */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_drop_shadow_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_drop_shadow_opa); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop */ +/* Reusing lv_obj_get_style_blur_quality for lv_obj_get_style_drop_shadow_quality */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_drop_shadow_quality); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radius); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_radial_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radial_offset); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa */ +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_clip_corner */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_clip_corner); -/* Reusing lv_obj_get_style_bg_grad_internal for lv_obj_get_style_bg_grad */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa); -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bg_image_src */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_layered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_layered); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa */ +#define funcptr_lv_color_filter_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered */ +/* + * lvgl extension definition for: + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa */ +static mp_obj_t mp_funcptr_lv_color_filter_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const struct _lv_color_filter_dsc_t *arg0 = (const struct _lv_color_filter_dsc_t *)mp_to_ptr(mp_args[0]); + lv_color_t arg1 = mp_write_lv_color_t(mp_args[1]); + lv_opa_t arg2 = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_color_t _res = ((lv_color_t (*)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t))lv_func_ptr)(arg0, arg1, arg2); + return mp_read_lv_color_t(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_bg_image_tiled */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_color_filter_cb_t_mpobj, 3, mp_funcptr_lv_color_filter_cb_t, funcptr_lv_color_filter_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered */ +static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa */ +/* + * Struct lv_color_filter_dsc_t + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width */ +static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width); - -/* Reusing lv_obj_get_style_border_side_internal for lv_obj_get_style_border_side */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_filter_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_filter_dsc_t_type())); + return (lv_color_filter_dsc_t*)self->data; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post */ +#define mp_write_lv_color_filter_dsc_t(struct_obj) *((lv_color_filter_dsc_t*)mp_write_ptr_lv_color_filter_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_filter_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_color_filter_dsc_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color */ +#define mp_read_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) +#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered */ +static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_filter_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, data->user_data); break; // converting from callback lv_color_filter_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_filter_cb: data->filter_cb = mp_lv_callback(dest[1], lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_color_filter_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + default: return; + } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width */ +static void mp_lv_color_filter_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_color_filter_dsc_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x */ +static const mp_obj_dict_t mp_lv_color_filter_dsc_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color_filter_dsc_t_type, + MP_QSTR_lv_color_filter_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color_filter_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color_filter_dsc_t_attr, + locals_dict, &mp_lv_color_filter_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y); +static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void) +{ + return &mp_lv_color_filter_dsc_t_type; +} -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color */ +/* + * lvgl extension definition for: + * const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered */ +static mp_obj_t mp_lv_obj_get_style_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_color_filter_dsc_t * _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc, lv_obj_get_style_color_filter_dsc); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_color_filter_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_color_filter_opa); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_recolor); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_recolor_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_recolor_opa); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa); - -/* Reusing lv_obj_get_style_image_colorkey_internal for lv_obj_get_style_image_colorkey */ +/* + * lvgl extension definition for: + * const lv_anim_t *lv_obj_get_style_anim(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width */ +static mp_obj_t mp_lv_obj_get_style_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_anim_t * _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_anim_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim, lv_obj_get_style_anim); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded */ +/* + * lvgl extension definition for: + * uint32_t lv_obj_get_style_anim_duration(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color */ +static mp_obj_t mp_lv_obj_get_style_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_anim_duration); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_style_transition_dsc_t_path_xcb_callback' + * lv_anim_path_cb_t path_xcb + */ -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded */ +/* + * Struct lv_style_transition_dsc_t + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color */ +static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_transition_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_transition_dsc_t_type())); + return (lv_style_transition_dsc_t*)self->data; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa */ +#define mp_write_lv_style_transition_dsc_t(struct_obj) *((lv_style_transition_dsc_t*)mp_write_ptr_lv_style_transition_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_transition_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_style_transition_dsc_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color */ +#define mp_read_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) +#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered */ +static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_props: dest[0] = mp_array_from_u8ptr((void*)data->props); break; // converting from lv_style_prop_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_path_xcb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_xcb, NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint32_t; + case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_props: data->props = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_style_prop_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_path_xcb: data->path_xcb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_time: data->time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_delay: data->delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa); - -/* Reusing lv_obj_get_style_text_font_internal for lv_obj_get_style_text_font */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space */ +static void mp_lv_style_transition_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_style_transition_dsc_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space */ +static const mp_obj_dict_t mp_lv_style_transition_dsc_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space); - -/* Reusing lv_obj_get_style_text_decor_internal for lv_obj_get_style_text_decor */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_style_transition_dsc_t_type, + MP_QSTR_lv_style_transition_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_style_transition_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_style_transition_dsc_t_attr, + locals_dict, &mp_lv_style_transition_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor); +static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void) +{ + return &mp_lv_style_transition_dsc_t_type; +} -/* Reusing lv_obj_get_style_text_align_internal for lv_obj_get_style_text_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color */ +/* + * lvgl extension definition for: + * const lv_style_transition_dsc_t *lv_obj_get_style_transition(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered */ +static mp_obj_t mp_lv_obj_get_style_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_style_transition_dsc_t * _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition, lv_obj_get_style_transition); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa); - -/* Reusing lv_obj_get_style_text_leading_trim_internal for lv_obj_get_style_text_leading_trim */ +/* + * lvgl extension definition for: + * lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius */ +static mp_obj_t mp_lv_obj_get_style_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_blend_mode_t _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode, lv_obj_get_style_blend_mode); -/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_blur_quality */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius */ +/* + * lvgl extension definition for: + * uint16_t lv_obj_get_style_layout(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x */ +static mp_obj_t mp_lv_obj_get_style_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint16_t _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout, lv_obj_get_style_layout); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered */ +/* + * lvgl extension definition for: + * lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa */ +static mp_obj_t mp_lv_obj_get_style_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_base_dir_t _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa); - -/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir, lv_obj_get_style_base_dir); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius */ +/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_bitmap_mask_src */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bitmap_mask_src); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset */ +/* Reusing lv_obj_get_style_anim_duration for lv_obj_get_style_rotary_sensitivity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_rotary_sensitivity); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa */ +/* + * lvgl extension definition for: + * lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered */ +static mp_obj_t mp_lv_obj_get_style_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_flex_flow_t _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered); - -/* Reusing lv_obj_get_style_color_filter_dsc_internal for lv_obj_get_style_color_filter_dsc */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow, lv_obj_get_style_flex_flow); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor */ +/* + * lvgl extension definition for: + * lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa */ +static mp_obj_t mp_lv_obj_get_style_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_flex_align_t _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa); - -/* Reusing lv_obj_get_style_anim_internal for lv_obj_get_style_anim */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_main_place); -/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_anim_duration */ +/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_cross_place */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_cross_place); -/* Reusing lv_obj_get_style_transition_internal for lv_obj_get_style_transition */ +/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_track_place */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_track_place); -/* Reusing lv_obj_get_style_blend_mode_internal for lv_obj_get_style_blend_mode */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode); - -/* Reusing lv_obj_get_style_layout_internal for lv_obj_get_style_layout */ +/* + * lvgl extension definition for: + * uint8_t lv_obj_get_style_flex_grow(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout); - -/* Reusing lv_obj_get_style_base_dir_internal for lv_obj_get_style_base_dir */ +static mp_obj_t mp_lv_obj_get_style_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint8_t _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow, lv_obj_get_style_flex_grow); -/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity); - -/* Reusing lv_obj_get_style_flex_flow_internal for lv_obj_get_style_flex_flow */ +/* + * lvgl extension definition for: + * const int32_t *lv_obj_get_style_grid_column_dsc_array(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow); - -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_main_place */ +static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const int32_t * _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_array_from_i32ptr((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place); - -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_column_dsc_array); -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place); - -/* Reusing lv_obj_get_style_flex_grow_internal for lv_obj_get_style_flex_grow */ +/* + * lvgl extension definition for: + * lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow); - -/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_column_dsc_array */ +static mp_obj_t mp_lv_obj_get_style_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_grid_align_t _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array); - -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_column_align */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_column_align); -/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array */ +/* Reusing lv_obj_get_style_grid_column_dsc_array for lv_obj_get_style_grid_row_dsc_array */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_row_dsc_array); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align */ +/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_row_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_row_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_pos); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align */ +/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_x_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_x_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_span); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_pos); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align */ +/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_y_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_y_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_span); /* @@ -13823,37 +13231,52 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_size_mpobj, 4, mp_lv_o static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_left); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_right); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_top); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_bottom); -/* Reusing lv_obj_calculate_style_text_align_internal for lv_obj_calculate_style_text_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align); +/* + * lvgl extension definition for: + * lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t *obj, lv_part_t part, const char *txt) + */ + +static mp_obj_t mp_lv_obj_calculate_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align, lv_obj_calculate_style_text_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x_safe */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x_safe); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y_safe */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y_safe); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_recursive */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_recursive */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_recursive); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_recursive); /* @@ -17864,14 +17287,6 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_state_compare_mpobj, 4, mp static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layer_type_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_layer_type); -/* Reusing lv_obj_get_style_prop for lv_obj_get_style_prop_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_internal_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop_internal); - -/* Reusing lv_obj_style_apply_color_filter for lv_obj_style_apply_color_filter_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_internal_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter_internal); - /* Reusing lv_obj_move_foreground for lv_obj_update_blur_status */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_blur_status_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_blur_status); @@ -17908,154 +17323,6 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_style_get_selector_part), MP_ROM_PTR(&mp_lv_obj_style_get_selector_part_mpobj) }, { MP_ROM_QSTR(MP_QSTR_move_foreground), MP_ROM_PTR(&mp_lv_obj_move_foreground_mpobj) }, { MP_ROM_QSTR(MP_QSTR_move_background), MP_ROM_PTR(&mp_lv_obj_move_background_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_min_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_max_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_min_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_max_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_length_internal), MP_ROM_PTR(&mp_lv_obj_get_style_length_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_translate_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_translate_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_translate_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_radial_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_rotation_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_rotation_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_top_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_bottom_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_left_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_right_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_row_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_row_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_column_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_column_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_radial_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_top_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_bottom_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_left_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_right_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_dir_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_stop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_stop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_src_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_tiled_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_tiled_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_side_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_side_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_post_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_post_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_pad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_pad_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_spread_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_spread_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_colorkey_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_colorkey_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_gap_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_gap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_rounded_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_rounded_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_image_src_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_font_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_font_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_letter_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_letter_space_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_line_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_line_space_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_decor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_decor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_leading_trim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_leading_trim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blur_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_radius_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blur_backdrop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_backdrop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blur_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_quality_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radius_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_radial_offset_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radial_offset_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_clip_corner_internal), MP_ROM_PTR(&mp_lv_obj_get_style_clip_corner_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_opa_layered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_layered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_dsc_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_dsc_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_anim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_anim_duration_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_duration_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transition_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transition_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blend_mode_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blend_mode_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_layout_internal), MP_ROM_PTR(&mp_lv_obj_get_style_layout_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_base_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_base_dir_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bitmap_mask_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_rotary_sensitivity_internal), MP_ROM_PTR(&mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_flow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_flow_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_main_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_main_place_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_cross_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_cross_place_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_track_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_track_place_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_grow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_grow_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_x_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_y_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calculate_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_calculate_style_text_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_obj_set_flex_flow_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flex_align), MP_ROM_PTR(&mp_lv_obj_set_flex_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_obj_set_flex_grow_mpobj) }, @@ -18646,8 +17913,6 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_style_create_transition), MP_ROM_PTR(&mp_lv_obj_style_create_transition_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_state_compare), MP_ROM_PTR(&mp_lv_obj_style_state_compare_mpobj) }, { MP_ROM_QSTR(MP_QSTR_update_layer_type), MP_ROM_PTR(&mp_lv_obj_update_layer_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_prop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_prop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter_internal), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_update_blur_status), MP_ROM_PTR(&mp_lv_obj_update_blur_status_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr), MP_ROM_PTR(&mp_lv_obj_refr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_OBJ_TREE_WALK_type_base) }, @@ -35333,257 +34598,51 @@ static MP_DEFINE_CONST_OBJ_TYPE( subscr, lv_struct_subscr, attr, mp_lv_rb_t_attr, locals_dict, &mp_lv_rb_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void) -{ - return &mp_lv_rb_t_type; -} - - -/* - * Struct lv_text_attributes_t - */ - -static inline const mp_obj_type_t *get_mp_lv_text_attributes_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_text_attributes_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_text_attributes_t_type())); - return (lv_text_attributes_t*)self->data; -} - -#define mp_write_lv_text_attributes_t(struct_obj) *((lv_text_attributes_t*)mp_write_ptr_lv_text_attributes_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_text_attributes_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_text_attributes_t_type(), field); -} - -#define mp_read_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(copy_buffer(&field, sizeof(lv_text_attributes_t))) -#define mp_read_byref_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(&field) - -static void mp_lv_text_attributes_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_text_attributes_t *data = (lv_text_attributes_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_letter_space: dest[0] = mp_obj_new_int(data->letter_space); break; // converting from int32_t; - case MP_QSTR_line_space: dest[0] = mp_obj_new_int(data->line_space); break; // converting from int32_t; - case MP_QSTR_max_width: dest[0] = mp_obj_new_int(data->max_width); break; // converting from int32_t; - case MP_QSTR_text_flags: dest[0] = mp_obj_new_int(data->text_flags); break; // converting from lv_text_flag_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_letter_space: data->letter_space = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_line_space: data->line_space = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_max_width: data->max_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_text_flags: data->text_flags = (int)mp_obj_get_int(dest[1]); break; // converting to lv_text_flag_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_text_attributes_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_text_attributes_t"); -} - -static const mp_obj_dict_t mp_lv_text_attributes_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_text_attributes_t_type, - MP_QSTR_lv_text_attributes_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_text_attributes_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_text_attributes_t_attr, - locals_dict, &mp_lv_text_attributes_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_text_attributes_t_type(void) -{ - return &mp_lv_text_attributes_t_type; -} - - -static const mp_rom_map_elem_t mp_C_Pointer_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(C_Pointer))) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_C_Pointer_locals_dict, mp_C_Pointer_locals_dict_table); - - -/* - * lvgl extension definition for: - * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) - */ - -static mp_obj_t mp_lv_color_is_in_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - lv_color_t l_color = mp_write_lv_color_t(mp_args[1]); - lv_color_t h_color = mp_write_lv_color_t(mp_args[2]); - bool _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_func_ptr)(color, l_color, h_color); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_is_in_range_mpobj, 3, mp_lv_color_is_in_range, lv_color_is_in_range); - - -/* - * lvgl extension definition for: - * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) - */ - -static mp_obj_t mp_lv_color_to_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(color, opa); - return mp_read_lv_color32_t(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_32_mpobj, 2, mp_lv_color_to_32, lv_color_to_32); - - -/* - * lvgl extension definition for: - * uint32_t lv_color_to_int(lv_color_t c) - */ - -static mp_obj_t mp_lv_color_to_int(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t c = mp_write_lv_color_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_color_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_int_mpobj, 1, mp_lv_color_to_int, lv_color_to_int); - - -/* - * lvgl extension definition for: - * bool lv_color_eq(lv_color_t c1, lv_color_t c2) - */ - -static mp_obj_t mp_lv_color_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); - lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); - bool _res = ((bool (*)(lv_color_t, lv_color_t))lv_func_ptr)(c1, c2); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_eq_mpobj, 2, mp_lv_color_eq, lv_color_eq); - - -/* - * lvgl extension definition for: - * uint16_t lv_color_to_u16(lv_color_t color) - */ - -static mp_obj_t mp_lv_color_to_u16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - uint16_t _res = ((uint16_t (*)(lv_color_t))lv_func_ptr)(color); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u16_mpobj, 1, mp_lv_color_to_u16, lv_color_to_u16); - -/* Reusing lv_color_to_int for lv_color_to_u32 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u32_mpobj, 1, mp_lv_color_to_int, lv_color_to_u32); - - -/* - * lvgl extension definition for: - * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) - */ + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_color_lighten(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_rb_t_type(void) { - lv_color_t c = mp_write_lv_color_t(mp_args[0]); - lv_opa_t lvl = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(c, lvl); - return mp_read_lv_color_t(_res); + return &mp_lv_rb_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_lighten_mpobj, 2, mp_lv_color_lighten, lv_color_lighten); - -/* Reusing lv_color_lighten for lv_color_darken */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_darken_mpobj, 2, mp_lv_color_lighten, lv_color_darken); /* - * Struct lv_color_hsv_t + * Struct lv_text_attributes_t */ -static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_text_attributes_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_hsv_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_text_attributes_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_hsv_t_type())); - return (lv_color_hsv_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_text_attributes_t_type())); + return (lv_text_attributes_t*)self->data; } -#define mp_write_lv_color_hsv_t(struct_obj) *((lv_color_hsv_t*)mp_write_ptr_lv_color_hsv_t(struct_obj)) +#define mp_write_lv_text_attributes_t(struct_obj) *((lv_text_attributes_t*)mp_write_ptr_lv_text_attributes_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_hsv_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_text_attributes_t(void *field) { - return lv_to_mp_struct(get_mp_lv_color_hsv_t_type(), field); + return lv_to_mp_struct(get_mp_lv_text_attributes_t_type(), field); } -#define mp_read_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(copy_buffer(&field, sizeof(lv_color_hsv_t))) -#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) +#define mp_read_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(copy_buffer(&field, sizeof(lv_text_attributes_t))) +#define mp_read_byref_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(&field) -static void mp_lv_color_hsv_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_text_attributes_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color_hsv_t *data = (lv_color_hsv_t*)self->data; + GENMPY_UNUSED lv_text_attributes_t *data = (lv_text_attributes_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint16_t; - case MP_QSTR_s: dest[0] = mp_obj_new_int_from_uint(data->s); break; // converting from uint8_t; - case MP_QSTR_v: dest[0] = mp_obj_new_int_from_uint(data->v); break; // converting from uint8_t; + case MP_QSTR_letter_space: dest[0] = mp_obj_new_int(data->letter_space); break; // converting from int32_t; + case MP_QSTR_line_space: dest[0] = mp_obj_new_int(data->line_space); break; // converting from int32_t; + case MP_QSTR_max_width: dest[0] = mp_obj_new_int(data->max_width); break; // converting from int32_t; + case MP_QSTR_text_flags: dest[0] = mp_obj_new_int(data->text_flags); break; // converting from lv_text_flag_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -35592,9 +34651,10 @@ static void mp_lv_color_hsv_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_h: data->h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_s: data->s = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_v: data->v = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_letter_space: data->letter_space = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_line_space: data->line_space = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_max_width: data->max_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_text_flags: data->text_flags = (int)mp_obj_get_int(dest[1]); break; // converting to lv_text_flag_t; default: return; } @@ -35603,3883 +34663,3937 @@ static void mp_lv_color_hsv_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_color_hsv_t_print(const mp_print_t *print, +static void mp_lv_text_attributes_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color_hsv_t"); + mp_printf(print, "struct lv_text_attributes_t"); } -static const mp_obj_dict_t mp_lv_color_hsv_t_locals_dict; +static const mp_obj_dict_t mp_lv_text_attributes_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color_hsv_t_type, - MP_QSTR_lv_color_hsv_t, + mp_lv_text_attributes_t_type, + MP_QSTR_lv_text_attributes_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color_hsv_t_print, + print, mp_lv_text_attributes_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color_hsv_t_attr, - locals_dict, &mp_lv_color_hsv_t_locals_dict, + attr, mp_lv_text_attributes_t_attr, + locals_dict, &mp_lv_text_attributes_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_text_attributes_t_type(void) { - return &mp_lv_color_hsv_t_type; + return &mp_lv_text_attributes_t_type; } +static const mp_rom_map_elem_t mp_C_Pointer_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(C_Pointer))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_C_Pointer_locals_dict, mp_C_Pointer_locals_dict_table); + +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); + + /* * lvgl extension definition for: - * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) + * void lv_anim_set_var(lv_anim_t *a, void *var) */ -static mp_obj_t mp_lv_color_to_hsv(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - lv_color_hsv_t _res = ((lv_color_hsv_t (*)(lv_color_t))lv_func_ptr)(color); - return mp_read_lv_color_hsv_t(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *var = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_hsv_mpobj, 1, mp_lv_color_to_hsv, lv_color_to_hsv); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); + + +/* + * Function NOT generated: + * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! + * lv_anim_exec_xcb_t exec_cb + */ /* * lvgl extension definition for: - * uint8_t lv_color_luminance(lv_color_t c) + * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) */ -static mp_obj_t mp_lv_color_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t c = mp_write_lv_color_t(mp_args[0]); - uint8_t _res = ((uint8_t (*)(lv_color_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_luminance_mpobj, 1, mp_lv_color_luminance, lv_color_luminance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); /* * lvgl extension definition for: - * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) + * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) */ -static mp_obj_t mp_lv_color_mix(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); - lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); - uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_func_ptr)(c1, c2, mix); - return mp_read_lv_color_t(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix_mpobj, 3, mp_lv_color_mix, lv_color_mix); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); -/* Reusing lv_color_luminance for lv_color_brightness */ +/* Reusing lv_anim_set_duration for lv_anim_set_delay */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_brightness_mpobj, 1, mp_lv_color_luminance, lv_color_brightness); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ -static const mp_rom_map_elem_t mp_lv_color_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_in_range), MP_ROM_PTR(&mp_lv_color_is_in_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_32), MP_ROM_PTR(&mp_lv_color_to_32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_int), MP_ROM_PTR(&mp_lv_color_to_int_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color_eq_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_u16), MP_ROM_PTR(&mp_lv_color_to_u16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_u32), MP_ROM_PTR(&mp_lv_color_to_u32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lighten), MP_ROM_PTR(&mp_lv_color_lighten_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_darken), MP_ROM_PTR(&mp_lv_color_darken_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_hsv), MP_ROM_PTR(&mp_lv_color_to_hsv_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color_luminance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mix), MP_ROM_PTR(&mp_lv_color_mix_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_brightness), MP_ROM_PTR(&mp_lv_color_brightness_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); -}; +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -static MP_DEFINE_CONST_DICT(mp_lv_color_t_locals_dict, mp_lv_color_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); + +/* Reusing lv_anim_set_duration for lv_anim_pause_for */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); + /* - * Array convertors for lv_color_t [] + * lvgl extension definition for: + * bool lv_anim_is_paused(lv_anim_t *a) */ -GENMPY_UNUSED static lv_color_t *mp_arr_to_lv_color_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_color_t *lv_arr = (lv_color_t*)m_malloc(len * sizeof(lv_color_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_color_t(item); - } - return (lv_color_t *)lv_arr; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); + return convert_to_bool(_res); } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_color_t_____(const lv_color_t *arr) -{ - return mp_read_ptr_lv_color_t((void*)arr); -} + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); + /* - * Array convertors for lv_opa_t [] + * lvgl extension definition for: + * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) */ -GENMPY_UNUSED static lv_opa_t *mp_arr_to_lv_opa_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_opa_t *lv_arr = (lv_opa_t*)m_malloc(len * sizeof(lv_opa_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (lv_opa_t *)lv_arr; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_opa_t_____(const lv_opa_t *arr) -{ - return mp_array_from_u8ptr((void*)arr); -} + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); + /* - * Array convertors for uint8_t [] + * Callback function lv_anim_t_exec_cb + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (uint8_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t_____(const uint8_t *arr) +GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) { - return mp_array_from_u8ptr((void*)arr); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); + return; } /* * lvgl extension definition for: - * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) + * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_grad_init_stops(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *grad = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - const lv_color_t *colors = (const lv_color_t *)mp_arr_to_lv_color_t_____(mp_args[1]); - const lv_opa_t *opa = (const lv_opa_t *)mp_arr_to_lv_opa_t_____(mp_args[2]); - const uint8_t *fracs = (const uint8_t *)mp_arr_to_uint8_t_____(mp_args[3]); - int num_stops = (int)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_func_ptr)(grad, colors, opa, fracs, num_stops); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_init_stops_mpobj, 5, mp_lv_grad_init_stops, lv_grad_init_stops); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); +/* + * Callback function lv_anim_t_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); +} + + /* * lvgl extension definition for: - * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) + * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) */ -static mp_obj_t mp_lv_grad_horizontal_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - ((void (*)(lv_grad_dsc_t *))lv_func_ptr)(dsc); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_horizontal_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_horizontal_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); -/* Reusing lv_grad_horizontal_init for lv_grad_vertical_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_vertical_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_vertical_init); - +/* + * Callback function lv_anim_t_start_cb + * void lv_anim_start_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); + return; +} + /* * lvgl extension definition for: - * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) */ -static mp_obj_t mp_lv_grad_linear_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - int32_t from_x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t from_y = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t to_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t to_y = (int32_t)mp_obj_get_int(mp_args[4]); - lv_grad_extend_t extend = (int)mp_obj_get_int(mp_args[5]); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_func_ptr)(dsc, from_x, from_y, to_x, to_y, extend); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_linear_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_linear_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); -/* Reusing lv_grad_linear_init for lv_grad_radial_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_radial_init); - +/* + * Callback function lv_anim_t_get_value_cb + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); +} + /* * lvgl extension definition for: - * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) + * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) */ -static mp_obj_t mp_lv_grad_radial_set_focal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - int32_t center_x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t center_y = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_func_ptr)(dsc, center_x, center_y, radius); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_set_focal_mpobj, 4, mp_lv_grad_radial_set_focal, lv_grad_radial_set_focal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); -/* Reusing lv_grad_linear_init for lv_grad_conical_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_conical_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_conical_init); - +/* + * Callback function lv_anim_t_completed_cb + * void lv_anim_completed_cb_t(lv_anim_t *) + */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init_stops), MP_ROM_PTR(&mp_lv_grad_init_stops_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_horizontal_init), MP_ROM_PTR(&mp_lv_grad_horizontal_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_vertical_init), MP_ROM_PTR(&mp_lv_grad_vertical_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_linear_init), MP_ROM_PTR(&mp_lv_grad_linear_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_radial_init), MP_ROM_PTR(&mp_lv_grad_radial_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_radial_set_focal), MP_ROM_PTR(&mp_lv_grad_radial_set_focal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_conical_init), MP_ROM_PTR(&mp_lv_grad_conical_init_mpobj) }, - -}; +GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); + return; +} -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_t_locals_dict, mp_lv_grad_dsc_t_locals_dict_table); - -static const mp_rom_map_elem_t mp_lv_grad_stop_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_stop_t))) }, - -}; +/* + * lvgl extension definition for: + * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) + */ -static MP_DEFINE_CONST_DICT(mp_lv_grad_stop_t_locals_dict, mp_lv_grad_stop_t_locals_dict_table); - +static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); + return mp_const_none; +} -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_t))) }, + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); -}; -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_t_locals_dict, mp_lv_grad_dsc_params_t_locals_dict_table); - +/* + * Callback function lv_anim_t_deleted_cb + * void lv_anim_deleted_cb_t(lv_anim_t *) + */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_linear_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_linear_t))) }, - -}; +GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); + return; +} -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_linear_t_locals_dict, mp_lv_grad_dsc_params_linear_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) */ -static mp_obj_t mp_lv_point_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[0]); - int32_t angle = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[3]); - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[4]); - bool zoom_first = mp_obj_is_true(mp_args[5]); - ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(point, angle, scale_x, scale_y, pivot, zoom_first); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_transform_mpobj, 6, mp_lv_point_transform, lv_point_transform); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); + +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); + +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); + +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); + +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); + +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); /* * lvgl extension definition for: - * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + * void lv_anim_set_early_apply(lv_anim_t *a, bool en) */ -static mp_obj_t mp_lv_point_array_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_point_t *points = mp_write_ptr_lv_point_t(mp_args[0]); - size_t count = (size_t)mp_obj_get_int(mp_args[1]); - int32_t angle = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[4]); - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[5]); - bool zoom_first = mp_obj_is_true(mp_args[6]); - ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(points, count, angle, scale_x, scale_y, pivot, zoom_first); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_array_transform_mpobj, 7, mp_lv_point_array_transform, lv_point_array_transform); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); + +/* Reusing lv_anim_set_var for lv_anim_set_user_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); /* * lvgl extension definition for: - * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) + * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) */ -static mp_obj_t mp_lv_point_to_precise(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_point_t *p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[0]); - lv_point_precise_t _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_func_ptr)(p); - return mp_read_lv_point_precise_t(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); + int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); + int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); + int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_to_precise_mpobj, 1, mp_lv_point_to_precise, lv_point_to_precise); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); /* * lvgl extension definition for: - * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) + * lv_anim_t *lv_anim_start(const lv_anim_t *a) */ -static mp_obj_t mp_lv_point_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_point_t *, int32_t, int32_t))lv_func_ptr)(p, x, y); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_set_mpobj, 3, mp_lv_point_set, lv_point_set); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); /* * lvgl extension definition for: - * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) + * uint32_t lv_anim_get_delay(const lv_anim_t *a) */ -static mp_obj_t mp_lv_point_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_point_t *p1 = mp_write_ptr_lv_point_t(mp_args[0]); - lv_point_t *p2 = mp_write_ptr_lv_point_t(mp_args[1]); - ((void (*)(lv_point_t *, lv_point_t *))lv_func_ptr)(p1, p2); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_swap_mpobj, 2, mp_lv_point_swap, lv_point_swap); - - -static const mp_rom_map_elem_t mp_lv_point_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_point_t))) }, - { MP_ROM_QSTR(MP_QSTR_transform), MP_ROM_PTR(&mp_lv_point_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_array_transform), MP_ROM_PTR(&mp_lv_point_array_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_precise), MP_ROM_PTR(&mp_lv_point_to_precise_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_point_set_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_point_swap_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_point_t_locals_dict, mp_lv_point_t_locals_dict_table); - +/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_radial_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_radial_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_radial_t_locals_dict, mp_lv_grad_dsc_params_radial_t_locals_dict_table); - +/* Reusing lv_anim_get_delay for lv_anim_get_time */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_conical_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_conical_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_conical_t_locals_dict, mp_lv_grad_dsc_params_conical_t_locals_dict_table); - +/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ -static const mp_rom_map_elem_t mp_lv_image_colorkey_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_colorkey_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_image_colorkey_t_locals_dict, mp_lv_image_colorkey_t_locals_dict_table); - /* * lvgl extension definition for: - * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) + * void *lv_anim_get_user_data(const lv_anim_t *a) */ -static mp_obj_t mp_lv_font_get_line_height_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); - return mp_obj_new_int(_res); + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_internal_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); /* * lvgl extension definition for: - * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) + * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_font_has_static_bitmap_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_internal_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); /* * lvgl extension definition for: - * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) + * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_font_get_bottom_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - lv_text_leading_trim_t trim = (int)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_func_ptr)(font, trim); - return mp_obj_new_int(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim_internal); - -/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim_internal); - -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); /* * lvgl extension definition for: - * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) + * int32_t lv_anim_path_linear(const lv_anim_t *a) */ -static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); - uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); - return mp_obj_new_int_from_uint(_res); + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); -/* Reusing lv_font_get_line_height_internal for lv_font_get_line_height */ +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); +/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ -/* - * lvgl extension definition for: - * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) - */ - -static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); - lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); -/* Reusing lv_font_has_static_bitmap_internal for lv_font_has_static_bitmap */ +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); -/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim */ +/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); -/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_bottom_trim */ +/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_fmt_txt */ +/* Reusing lv_anim_path_linear for lv_anim_path_step */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_fmt_txt_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_fmt_txt); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_internal */ +/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_internal_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); -/* Reusing lv_font_get_glyph_width for lv_font_get_glyph_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_internal_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width_internal); +static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, +}; -static const mp_rom_map_elem_t mp_lv_font_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_line_height_internal), MP_ROM_PTR(&mp_lv_font_get_line_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bottom_trim_internal), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_top_trim_internal), MP_ROM_PTR(&mp_lv_font_get_top_trim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_width), MP_ROM_PTR(&mp_lv_font_get_glyph_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_line_height), MP_ROM_PTR(&mp_lv_font_get_line_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_kerning), MP_ROM_PTR(&mp_lv_font_set_kerning_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_static_bitmap), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_top_trim), MP_ROM_PTR(&mp_lv_font_get_top_trim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bottom_trim), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_fmt_txt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_width_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_width_internal_mpobj) }, +static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_font_t_locals_dict, mp_lv_font_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); -/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap); +static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, +}; -/* - * lvgl extension definition for: - * const void *lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t *g_dsc) - */ - -static mp_obj_t mp_lv_font_get_glyph_static_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); - return ptr_to_mp((void*)_res); -} +static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_set_default */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_default_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_set_default); /* * lvgl extension definition for: - * void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t *g_dsc) + * lv_display_t *lv_display_get_next(lv_display_t *disp) */ -static mp_obj_t mp_lv_font_glyph_release_draw_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - ((void (*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_t * _res = ((lv_display_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_display_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data); - -/* Reusing funcptr_get_glyph_bitmap for lv_font_get_bitmap_fmt_txt */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bitmap_fmt_txt_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_bitmap_fmt_txt); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_next_mpobj, 1, mp_lv_display_get_next, lv_display_get_next); /* * lvgl extension definition for: - * int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t *lhs, const lv_font_glyph_dsc_t *rhs) + * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) */ -static mp_obj_t mp_lv_font_glyph_dsc_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_glyph_dsc_t *lhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - const lv_font_glyph_dsc_t *rhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_font_glyph_dsc_t *, const lv_font_glyph_dsc_t *))lv_func_ptr)(lhs, rhs); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + int32_t hor_res = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t ver_res = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_func_ptr)(disp, hor_res, ver_res); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_dsc_compare_mpobj, 2, mp_lv_font_glyph_dsc_compare, lv_font_glyph_dsc_compare); - -/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_internal_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap_internal); - -/* Reusing lv_font_get_glyph_static_bitmap for lv_font_get_glyph_static_bitmap_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_internal_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap_internal); - -/* Reusing lv_font_glyph_release_draw_data for lv_font_glyph_release_draw_data_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_internal_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data_internal); - - -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_compare), MP_ROM_PTR(&mp_lv_font_glyph_dsc_compare_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_draw_data_internal), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_internal_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_resolution); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); - -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ +/* Reusing lv_display_set_resolution for lv_display_set_physical_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_physical_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_physical_resolution); -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ +/* Reusing lv_display_set_resolution for lv_display_set_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_offset_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_offset); /* * lvgl extension definition for: - * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) + * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) */ -static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, lv_display_rotation_t))lv_func_ptr)(disp, rotation); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_rotation_mpobj, 2, mp_lv_display_set_rotation, lv_display_set_rotation); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) + * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) */ -static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + bool enable = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_display_t *, bool))lv_func_ptr)(disp, enable); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_matrix_rotation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_matrix_rotation); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) + * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) */ -static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_dpi(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - void *data = mp_to_ptr(mp_args[5]); - uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + int32_t dpi = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, int32_t))lv_func_ptr)(disp, dpi); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_dpi_mpobj, 2, mp_lv_display_set_dpi, lv_display_set_dpi); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) + * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_horizontal_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_horizontal_resolution); +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_vertical_resolution */ -/* - * lvgl extension definition for: - * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_vertical_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_horizontal_resolution */ -static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(mp_args[0]); - lv_draw_buf_t *buf = (lv_draw_buf_t *)self->data; - if (buf != NULL) { - ((void (*)(lv_draw_buf_t *))lv_func_ptr)(buf); - self->data = NULL; - } - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_horizontal_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_vertical_resolution */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_vertical_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_horizontal_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_horizontal_resolution); -/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_vertical_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_vertical_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_x_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_x); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_y_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_y); /* * lvgl extension definition for: - * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); - return ptr_to_mp((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_rotation_t _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_rotation_mpobj, 1, mp_lv_display_get_rotation, lv_display_get_rotation); /* * lvgl extension definition for: - * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * bool lv_display_get_matrix_rotation(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_is_position_valid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + bool _res = ((bool (*)(lv_display_t *))lv_func_ptr)(disp); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_is_position_valid_mpobj, 3, mp_lv_draw_buf_is_position_valid, lv_draw_buf_is_position_valid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_matrix_rotation_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_matrix_rotation); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_dpi */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_dpi_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_dpi); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) + * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) */ -static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *buf1 = mp_to_ptr(mp_args[1]); + void *buf2 = mp_to_ptr(mp_args[2]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, render_mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_mpobj, 5, mp_lv_display_set_buffers, lv_display_set_buffers); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) + * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) */ -static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_buffers_with_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *buf1 = mp_to_ptr(mp_args[1]); + void *buf2 = mp_to_ptr(mp_args[2]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[5]); + ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, stride, render_mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_with_stride_mpobj, 6, mp_lv_display_set_buffers_with_stride, lv_display_set_buffers_with_stride); /* * lvgl extension definition for: - * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) */ -static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_draw_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); - return convert_to_bool(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(mp_args[2]); + ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf1, buf2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buffers_mpobj, 3, mp_lv_display_set_draw_buffers, lv_display_set_draw_buffers); /* * lvgl extension definition for: - * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) */ -static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_3rd_draw_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf3); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); - -/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_3rd_draw_buffer_mpobj, 2, mp_lv_display_set_3rd_draw_buffer, lv_display_set_3rd_draw_buffer); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) + * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) */ -static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_func_ptr)(disp, render_mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_render_mode_mpobj, 2, mp_lv_display_set_render_mode, lv_display_set_render_mode); /* - * lvgl extension definition for: - * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) + * Callback function lv_display_t_flush_cb + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) */ -static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); - return mp_const_none; + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); + mp_args[2] = mp_array_from_u8ptr((void*)arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_cb)), 3, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); - /* * lvgl extension definition for: - * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) + * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) */ -static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); - ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *flush_cb = mp_lv_callback(mp_args[1], &lv_display_t_flush_cb_callback, MP_QSTR_lv_display_t_flush_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_func_ptr)(disp, flush_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); - -/* Reusing funcptr_lv_draw_buf_clear_cb_t for lv_draw_buf_clear_ex */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_ex_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, lv_draw_buf_clear_ex); - -/* Reusing lv_draw_buf_premultiply for lv_draw_buf_convert_premultiply */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_convert_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_convert_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_cb_mpobj, 2, mp_lv_display_set_flush_cb, lv_display_set_flush_cb); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) + * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const char *path = (const char *)(char*)convert_from_str(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_flush_cb_t _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_lv_funcptr_lv_display_flush_cb_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); - - -static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, - { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_position_valid), MP_ROM_PTR(&mp_lv_draw_buf_is_position_valid_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_ex), MP_ROM_PTR(&mp_lv_draw_buf_clear_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_convert_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_convert_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_flush_cb_mpobj, 1, mp_lv_display_get_flush_cb, lv_display_get_flush_cb); -}; -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); - +/* + * Callback function lv_display_t_wait_cb + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ -static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, - -}; +GENMPY_UNUSED static void lv_display_t_wait_cb_callback(lv_display_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_wait_cb)), 1, mp_args); + return; +} -static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) + * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) */ -static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_flush_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_func_ptr)(disp, wait_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_wait_cb_mpobj, 2, mp_lv_display_set_flush_wait_cb, lv_display_set_flush_wait_cb); /* - * Function NOT generated: - * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_malloc_cb_t buf_malloc_cb + * Callback function lv_display_t_sync_cb + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) */ - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_free_cb_t buf_free_cb - */ - +GENMPY_UNUSED static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_cb)), 2, mp_args); + return; +} -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - /* - * Function NOT generated: - * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_align_cb_t align_pointer_cb + * lvgl extension definition for: + * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) */ - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ - +static mp_obj_t mp_lv_display_set_sync_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *sync_cb = mp_lv_callback(mp_args[1], &lv_display_t_sync_cb_callback, MP_QSTR_lv_display_t_sync_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_func_ptr)(disp, sync_cb); + return mp_const_none; +} -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t flush_cache_cb - */ - + -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_cb_mpobj, 2, mp_lv_display_set_sync_cb, lv_display_set_sync_cb); /* * lvgl extension definition for: - * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) + * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) */ -static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_sync_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); - lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); - lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); - lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); - lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); - lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); - lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); - ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_func_ptr)(disp, wait_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_wait_cb_mpobj, 2, mp_lv_display_set_sync_wait_cb, lv_display_set_sync_wait_cb); /* * lvgl extension definition for: - * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - void *buf = mp_to_ptr(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); - return ptr_to_mp((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, lv_color_format_t))lv_func_ptr)(disp, color_format); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_color_format_mpobj, 2, mp_lv_display_set_color_format, lv_display_set_color_format); /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) + * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); - return mp_obj_new_int_from_uint(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_color_format_t _res = ((lv_color_format_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_color_format_mpobj, 1, mp_lv_display_get_color_format, lv_display_get_color_format); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) */ -static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t tile_cnt = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, tile_cnt); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_tile_cnt_mpobj, 2, mp_lv_display_set_tile_cnt, lv_display_set_tile_cnt); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) + * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_tile_cnt_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_tile_cnt); +/* Reusing lv_display_set_matrix_rotation for lv_display_set_antialiasing */ -static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, - { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_antialiasing_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_antialiasing); -}; +/* Reusing lv_display_get_matrix_rotation for lv_display_get_antialiasing */ -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_antialiasing_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_antialiasing); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_flush_ready */ -/* - * lvgl extension definition for: - * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_flush_ready); + +/* Reusing lv_display_get_matrix_rotation for lv_display_flush_is_last */ -static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_flush_is_last); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_sync_ready */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_sync_ready); + +/* Reusing lv_display_get_matrix_rotation for lv_display_sync_is_last */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_sync_is_last); + +/* Reusing lv_display_get_matrix_rotation for lv_display_is_double_buffered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_double_buffered_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_double_buffered); /* * lvgl extension definition for: - * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_render_mode_t _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_render_mode_mpobj, 1, mp_lv_display_get_render_mode, lv_display_get_render_mode); /* * lvgl extension definition for: - * int32_t lv_area_get_width(const lv_area_t *area_p) + * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_screen_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_active_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_active); -/* Reusing lv_area_get_width for lv_area_get_height */ +/* Reusing lv_display_get_screen_active for lv_display_get_screen_prev */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_prev_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_prev); +/* Reusing lv_display_get_screen_active for lv_display_get_screen_loading */ -/* - * lvgl extension definition for: - * void lv_area_set_width(lv_area_t *area_p, int32_t w) - */ - -static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_loading_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_loading); + +/* Reusing lv_display_get_screen_active for lv_display_get_layer_top */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_top_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_top); + +/* Reusing lv_display_get_screen_active for lv_display_get_layer_sys */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_sys_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_sys); -/* Reusing lv_area_set_width for lv_area_set_height */ +/* Reusing lv_display_get_screen_active for lv_display_get_layer_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_bottom_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_bottom); /* - * lvgl extension definition for: - * uint32_t lv_area_get_size(const lv_area_t *area_p) + * Callback function lv_display_add_event_cb_event_cb + * void lv_event_cb_t(lv_event_t *e) */ -static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int_from_uint(_res); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_add_event_cb_event_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); - /* * lvgl extension definition for: - * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) + * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ -static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[3]); + void *event_cb = mp_lv_callback(mp_args[1], &lv_display_add_event_cb_event_cb_callback, MP_QSTR_lv_display_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_add_event_cb_mpobj, 4, mp_lv_display_add_event_cb, lv_display_add_event_cb); -/* Reusing lv_area_increase for lv_area_move */ +/* Reusing lv_display_get_tile_cnt for lv_display_get_event_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_count_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_event_count); /* * lvgl extension definition for: - * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) + * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) */ -static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_event_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); - lv_align_t align = (int)mp_obj_get_int(mp_args[2]); - int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); - -/* Reusing lv_area_increase for lv_area_set_pos */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_dsc_mpobj, 2, mp_lv_display_get_event_dsc, lv_display_get_event_dsc); /* * lvgl extension definition for: - * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) */ -static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_remove_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_mpobj, 2, mp_lv_display_remove_event, lv_display_remove_event); +/* + * Callback function lv_display_remove_event_cb_with_user_data_event_cb + * void lv_event_cb_t(lv_event_t *e) + */ + +GENMPY_UNUSED static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb)), 1, mp_args); + return; +} + + /* * lvgl extension definition for: - * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) + * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_remove_event_cb_with_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); - return mp_obj_new_int(_res); + void *user_data = mp_to_ptr(mp_args[2]); + void *event_cb = mp_lv_callback(mp_args[1], &lv_display_remove_event_cb_with_user_data_event_cb_callback, MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_cb_with_user_data_mpobj, 3, mp_lv_display_remove_event_cb_with_user_data, lv_display_remove_event_cb_with_user_data); /* * lvgl extension definition for: - * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) */ -static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_send_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); + void *param = mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_func_ptr)(disp, code, param); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_event_mpobj, 3, mp_lv_display_send_event, lv_display_send_event); /* * lvgl extension definition for: - * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) - */ - -static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); - return convert_to_bool(_res); + * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) + */ + +static mp_obj_t mp_lv_display_set_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_theme_t *th = mp_write_ptr_lv_theme_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_theme_t *))lv_func_ptr)(disp, th); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_theme_mpobj, 2, mp_lv_display_set_theme, lv_display_set_theme); /* * lvgl extension definition for: - * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) + * lv_theme_t *lv_display_get_theme(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); - return convert_to_bool(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_theme_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_theme_mpobj, 1, mp_lv_display_get_theme, lv_display_get_theme); /* * lvgl extension definition for: - * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) + * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) */ -static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_inactive_time(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); - return convert_to_bool(_res); + const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_inactive_time_mpobj, 1, mp_lv_display_get_inactive_time, lv_display_get_inactive_time); -/* Reusing lv_area_is_in for lv_area_is_out */ +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_trigger_activity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_trigger_activity_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_trigger_activity); -/* Reusing lv_area_is_on for lv_area_is_equal */ +/* Reusing lv_display_set_matrix_rotation for lv_display_enable_invalidation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_enable_invalidation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_enable_invalidation); +/* Reusing lv_display_get_matrix_rotation for lv_display_is_invalidation_enabled */ -static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, - { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_invalidation_enabled_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_invalidation_enabled); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_layer_init(lv_layer_t *layer) + * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) */ -static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_refr_timer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - ((void (*)(lv_layer_t *))lv_func_ptr)(layer); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_timer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_refr_timer_mpobj, 1, mp_lv_display_get_refr_timer, lv_display_get_refr_timer); -/* Reusing lv_layer_init for lv_layer_reset */ +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete_refr_timer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_refr_timer_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete_refr_timer); -static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, - -}; +/* + * Callback function lv_display_register_vsync_event_event_cb + * void lv_event_cb_t(lv_event_t *e) + */ + +GENMPY_UNUSED static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_register_vsync_event_event_cb)), 1, mp_args); + return; +} -static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); - /* * lvgl extension definition for: - * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) + * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_register_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); - return mp_obj_new_int_from_uint(_res); + void *user_data = mp_to_ptr(mp_args[2]); + void *event_cb = mp_lv_callback(mp_args[1], &lv_display_register_vsync_event_event_cb_callback, MP_QSTR_lv_display_register_vsync_event_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + bool _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_register_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_register_vsync_event); + +/* Reusing lv_display_register_vsync_event for lv_display_unregister_vsync_event */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_unregister_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_unregister_vsync_event); /* * lvgl extension definition for: - * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) + * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) */ -static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_send_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *param = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_display_t *, void *))lv_func_ptr)(disp, param); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_vsync_event_mpobj, 2, mp_lv_display_send_vsync_event, lv_display_send_vsync_event); /* * lvgl extension definition for: - * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) + * void lv_display_set_user_data(lv_display_t *disp, void *user_data) */ -static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); - return ptr_to_mp((void*)_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + ((void (*)(lv_display_t *, void *))lv_func_ptr)(disp, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_user_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_user_data); + +/* Reusing lv_display_set_user_data for lv_display_set_driver_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_driver_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_driver_data); /* * lvgl extension definition for: - * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) + * void *lv_display_get_user_data(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void * _res = ((void *(*)(lv_display_t *))lv_func_ptr)(disp); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_user_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_user_data); + +/* Reusing lv_display_get_user_data for lv_display_get_driver_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_driver_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_driver_data); /* * lvgl extension definition for: - * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) + * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_buf_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_buf_active_mpobj, 1, mp_lv_display_get_buf_active, lv_display_get_buf_active); /* * lvgl extension definition for: - * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) + * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) */ -static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_rotate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_area_t *))lv_func_ptr)(disp, area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_area_mpobj, 2, mp_lv_display_rotate_area, lv_display_rotate_area); /* * lvgl extension definition for: - * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) + * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) */ -static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_rotate_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_point_t *))lv_func_ptr)(disp, point); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point); + +/* Reusing lv_display_rotate_point for lv_display_rotate_point_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_ccw_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point_ccw); + +/* Reusing lv_display_get_tile_cnt for lv_display_get_draw_buf_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_draw_buf_size_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_draw_buf_size); /* * lvgl extension definition for: - * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) + * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) */ -static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_invalidated_draw_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t width = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t height = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_func_ptr)(disp, width, height); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_invalidated_draw_buf_size_mpobj, 3, mp_lv_display_get_invalidated_draw_buf_size, lv_display_get_invalidated_draw_buf_size); /* - * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb + * lvgl extension definition for: + * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) */ - -#define funcptr_lv_draw_glyph_cb_t NULL +static mp_obj_t mp_lv_display_dpx(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); + int32_t n = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_func_ptr)(disp, n); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_dpx_mpobj, 2, mp_lv_display_dpx, lv_display_dpx); + /* * lvgl extension definition for: - * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) */ -static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_dispatch_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); - const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); + bool _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_func_ptr)(disp, layer); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_dispatch_layer_mpobj, 2, mp_lv_draw_dispatch_layer, lv_draw_dispatch_layer); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) + * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) */ -static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_draw_buf_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_func_ptr)(disp, handlers); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buf_handlers_mpobj, 2, mp_lv_display_set_draw_buf_handlers, lv_display_set_draw_buf_handlers); -/* - * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb - */ +static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_display_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_display_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_default), MP_ROM_PTR(&mp_lv_display_set_default_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_display_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_resolution), MP_ROM_PTR(&mp_lv_display_set_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_physical_resolution), MP_ROM_PTR(&mp_lv_display_set_physical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_display_set_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_display_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_matrix_rotation), MP_ROM_PTR(&mp_lv_display_set_matrix_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dpi), MP_ROM_PTR(&mp_lv_display_set_dpi_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_horizontal_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_vertical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_original_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_original_horizontal_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_original_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_original_vertical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_physical_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_horizontal_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_physical_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_vertical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_display_get_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_display_get_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_display_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_matrix_rotation), MP_ROM_PTR(&mp_lv_display_get_matrix_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dpi), MP_ROM_PTR(&mp_lv_display_get_dpi_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_buffers), MP_ROM_PTR(&mp_lv_display_set_buffers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_buffers_with_stride), MP_ROM_PTR(&mp_lv_display_set_buffers_with_stride_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_buffers), MP_ROM_PTR(&mp_lv_display_set_draw_buffers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_3rd_draw_buffer), MP_ROM_PTR(&mp_lv_display_set_3rd_draw_buffer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_render_mode), MP_ROM_PTR(&mp_lv_display_set_render_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flush_cb), MP_ROM_PTR(&mp_lv_display_set_flush_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_flush_cb), MP_ROM_PTR(&mp_lv_display_get_flush_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flush_wait_cb), MP_ROM_PTR(&mp_lv_display_set_flush_wait_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_cb), MP_ROM_PTR(&mp_lv_display_set_sync_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_wait_cb), MP_ROM_PTR(&mp_lv_display_set_sync_wait_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_display_set_color_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_color_format), MP_ROM_PTR(&mp_lv_display_get_color_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tile_cnt), MP_ROM_PTR(&mp_lv_display_set_tile_cnt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tile_cnt), MP_ROM_PTR(&mp_lv_display_get_tile_cnt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_antialiasing), MP_ROM_PTR(&mp_lv_display_set_antialiasing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_antialiasing), MP_ROM_PTR(&mp_lv_display_get_antialiasing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_ready), MP_ROM_PTR(&mp_lv_display_flush_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_is_last), MP_ROM_PTR(&mp_lv_display_flush_is_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_ready), MP_ROM_PTR(&mp_lv_display_sync_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_is_last), MP_ROM_PTR(&mp_lv_display_sync_is_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_double_buffered), MP_ROM_PTR(&mp_lv_display_is_double_buffered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_render_mode), MP_ROM_PTR(&mp_lv_display_get_render_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen_active), MP_ROM_PTR(&mp_lv_display_get_screen_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen_prev), MP_ROM_PTR(&mp_lv_display_get_screen_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen_loading), MP_ROM_PTR(&mp_lv_display_get_screen_loading_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_top), MP_ROM_PTR(&mp_lv_display_get_layer_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_sys), MP_ROM_PTR(&mp_lv_display_get_layer_sys_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_bottom), MP_ROM_PTR(&mp_lv_display_get_layer_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_event_cb), MP_ROM_PTR(&mp_lv_display_add_event_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_event_count), MP_ROM_PTR(&mp_lv_display_get_event_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_event_dsc), MP_ROM_PTR(&mp_lv_display_get_event_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_event), MP_ROM_PTR(&mp_lv_display_remove_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_display_remove_event_cb_with_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_display_send_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_theme), MP_ROM_PTR(&mp_lv_display_set_theme_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_theme), MP_ROM_PTR(&mp_lv_display_get_theme_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_inactive_time), MP_ROM_PTR(&mp_lv_display_get_inactive_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_trigger_activity), MP_ROM_PTR(&mp_lv_display_trigger_activity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_enable_invalidation), MP_ROM_PTR(&mp_lv_display_enable_invalidation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_invalidation_enabled), MP_ROM_PTR(&mp_lv_display_is_invalidation_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_refr_timer), MP_ROM_PTR(&mp_lv_display_get_refr_timer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_refr_timer), MP_ROM_PTR(&mp_lv_display_delete_refr_timer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_register_vsync_event), MP_ROM_PTR(&mp_lv_display_register_vsync_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unregister_vsync_event), MP_ROM_PTR(&mp_lv_display_unregister_vsync_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_send_vsync_event), MP_ROM_PTR(&mp_lv_display_send_vsync_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_display_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_driver_data), MP_ROM_PTR(&mp_lv_display_set_driver_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_display_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_driver_data), MP_ROM_PTR(&mp_lv_display_get_driver_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_buf_active), MP_ROM_PTR(&mp_lv_display_get_buf_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_area), MP_ROM_PTR(&mp_lv_display_rotate_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_point), MP_ROM_PTR(&mp_lv_display_rotate_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_point_ccw), MP_ROM_PTR(&mp_lv_display_rotate_point_ccw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_draw_buf_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_invalidated_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_invalidated_draw_buf_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_display_dpx_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_dispatch_layer), MP_ROM_PTR(&mp_lv_draw_dispatch_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_buf_handlers), MP_ROM_PTR(&mp_lv_display_set_draw_buf_handlers_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_display_t_locals_dict, mp_lv_display_t_locals_dict_table); + +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); + +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); /* * lvgl extension definition for: - * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) + * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) */ -static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); /* * lvgl extension definition for: - * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) + * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); /* * lvgl extension definition for: - * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) + * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) */ -static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + void *data = mp_to_ptr(mp_args[5]); + uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); - - -/* - * Function NOT generated: - * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! - * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); -#define funcptr_draw_line_cb NULL - /* * lvgl extension definition for: - * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) */ -static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) + * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(mp_args[0]); + lv_draw_buf_t *buf = (lv_draw_buf_t *)self->data; + if (buf != NULL) { + ((void (*)(lv_draw_buf_t *))lv_func_ptr)(buf); + self->data = NULL; + } return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); + +/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); /* * lvgl extension definition for: - * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) + * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); /* * lvgl extension definition for: - * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) + * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_is_position_valid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_is_position_valid_mpobj, 3, mp_lv_draw_buf_is_position_valid, lv_draw_buf_is_position_valid); /* * lvgl extension definition for: - * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) + * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) */ -static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); + lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); /* * lvgl extension definition for: - * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) + * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); /* * lvgl extension definition for: - * void lv_draw_cleanup_task(lv_draw_task_t *t) + * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static mp_obj_t mp_lv_draw_cleanup_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - ((void (*)(lv_draw_task_t *))lv_func_ptr)(t); - return mp_const_none; + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_cleanup_task_mpobj, 1, mp_lv_draw_cleanup_task, lv_draw_cleanup_task); - -/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); /* * lvgl extension definition for: - * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); + +/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); /* * lvgl extension definition for: - * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) */ -static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); /* * lvgl extension definition for: - * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) */ -static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); /* * lvgl extension definition for: - * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) */ -static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); + +/* Reusing funcptr_lv_draw_buf_clear_cb_t for lv_draw_buf_clear_ex */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_ex_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, lv_draw_buf_clear_ex); + +/* Reusing lv_draw_buf_premultiply for lv_draw_buf_convert_premultiply */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_convert_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_convert_premultiply); /* * lvgl extension definition for: - * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) */ -static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const char *path = (const char *)(char*)convert_from_str(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); + + +static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_position_valid), MP_ROM_PTR(&mp_lv_draw_buf_is_position_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_ex), MP_ROM_PTR(&mp_lv_draw_buf_clear_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_convert_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_convert_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) */ -static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); /* - * lvgl extension definition for: - * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) + * Function NOT generated: + * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_malloc_cb_t buf_malloc_cb */ + -static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; -} +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_free_cb_t buf_free_cb + */ + - +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_copy_cb_t buf_copy_cb + */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_align_cb_t align_pointer_cb + */ -/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ -/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ /* * lvgl extension definition for: - * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) + * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) */ -static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); + lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); + lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); + lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); + lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); + lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); + lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); + ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); /* * lvgl extension definition for: - * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + void *buf = mp_to_ptr(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); /* * lvgl extension definition for: - * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) + * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_image_core_cb draw_core_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); -#define funcptr_lv_draw_image_core_cb NULL - /* * lvgl extension definition for: - * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); - lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); - const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); - const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); - -/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); - -/* Reusing lv_draw_unit_draw_letter for lv_draw_unit_draw_letter_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_internal_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter_internal); - - -static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cleanup_task), MP_ROM_PTR(&mp_lv_draw_cleanup_task_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unit_draw_letter_internal), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_internal_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); - -static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, +static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, + { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); /* * lvgl extension definition for: - * void *lv_event_get_target(lv_event_t *e) + * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) */ -static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); - return ptr_to_mp((void*)_res); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); - -/* Reusing lv_event_get_target for lv_event_get_current_target */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); /* * lvgl extension definition for: - * lv_event_code_t lv_event_get_code(lv_event_t *e) + * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) */ -static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int(_res); + lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); - -/* Reusing lv_event_get_target for lv_event_get_param */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); - -/* Reusing lv_event_get_target for lv_event_get_user_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); - -/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); - -/* Reusing funcptr_event_cb for lv_event_stop_trickling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); - -/* Reusing funcptr_event_cb for lv_event_stop_processing */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); - -/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); /* * lvgl extension definition for: - * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) + * int32_t lv_area_get_width(const lv_area_t *area_p) */ -static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); + +/* Reusing lv_area_get_width for lv_area_get_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); /* * lvgl extension definition for: - * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) + * void lv_area_set_width(lv_area_t *area_p, int32_t w) */ -static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); - return lv_to_mp((void*)_res); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); -/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ +/* Reusing lv_area_set_width for lv_area_set_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); /* * lvgl extension definition for: - * lv_indev_t *lv_event_get_indev(lv_event_t *e) + * uint32_t lv_area_get_size(const lv_area_t *area_p) */ -static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_indev_t((void*)_res); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); /* * lvgl extension definition for: - * lv_layer_t *lv_event_get_layer(lv_event_t *e) + * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) */ -static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_layer_t((void*)_res); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); + +/* Reusing lv_area_increase for lv_area_move */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); /* * lvgl extension definition for: - * const lv_area_t *lv_event_get_old_size(lv_event_t *e) + * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) */ -static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); + lv_align_t align = (int)mp_obj_get_int(mp_args[2]); + int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); + +/* Reusing lv_area_increase for lv_area_set_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); /* * lvgl extension definition for: - * uint32_t lv_event_get_key(lv_event_t *e) + * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int_from_uint(_res); + lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); /* * lvgl extension definition for: - * int32_t lv_event_get_rotary_diff(lv_event_t *e) + * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); + lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); /* * lvgl extension definition for: - * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) + * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); /* * lvgl extension definition for: - * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) + * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) */ -static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); - return mp_const_none; + const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); /* * lvgl extension definition for: - * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) + * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_point_t((void*)_res); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); /* - * Struct lv_hit_test_info_t + * lvgl extension definition for: + * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) */ -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) +static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); - return (lv_hit_test_info_t*)self->data; + const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); + return convert_to_bool(_res); } -#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); + +/* Reusing lv_area_is_in for lv_area_is_out */ -#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) -#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); + +/* Reusing lv_area_is_on for lv_area_is_equal */ -static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); + - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; - case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; - case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; - default: return; - } +static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, + +}; - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); + -static void mp_lv_hit_test_info_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +/* + * lvgl extension definition for: + * void lv_layer_init(lv_layer_t *layer) + */ + +static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_hit_test_info_t"); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + ((void (*)(lv_layer_t *))lv_func_ptr)(layer); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_hit_test_info_t_type, - MP_QSTR_lv_hit_test_info_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_hit_test_info_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_hit_test_info_t_attr, - locals_dict, &mp_lv_hit_test_info_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); + +/* Reusing lv_layer_init for lv_layer_reset */ -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) -{ - return &mp_lv_hit_test_info_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); + + +static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) + * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) */ -static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_hit_test_info_t((void*)_res); + lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); - -/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); /* * lvgl extension definition for: - * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) + * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); - return mp_const_none; + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); /* * lvgl extension definition for: - * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) + * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_draw_task_t((void*)_res); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); /* * lvgl extension definition for: - * lv_state_t lv_event_get_prev_state(lv_event_t *e) + * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) */ -static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int(_res); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); /* * lvgl extension definition for: - * float lv_event_get_pinch_scale(lv_event_t *gesture_event) + * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_float_from_f(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); /* * lvgl extension definition for: - * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) + * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); /* * lvgl extension definition for: - * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) + * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); - lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); /* * lvgl extension definition for: - * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) + * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); - -/* Reusing funcptr_event_cb for lv_event_push */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); - -/* Reusing funcptr_event_cb for lv_event_pop */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); - - -static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); - -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete); +/* + * Function NOT generated: + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb + */ -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_set_default */ +#define funcptr_lv_draw_glyph_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_default_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_set_default); - /* * lvgl extension definition for: - * lv_display_t *lv_display_get_next(lv_display_t *disp) + * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) */ -static mp_obj_t mp_lv_display_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_t * _res = ((lv_display_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_display_t((void*)_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); + const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_next_mpobj, 1, mp_lv_display_get_next, lv_display_get_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) + * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_display_set_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - int32_t hor_res = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t ver_res = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_func_ptr)(disp, hor_res, ver_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_resolution); - -/* Reusing lv_display_set_resolution for lv_display_set_physical_resolution */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_physical_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_physical_resolution); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); -/* Reusing lv_display_set_resolution for lv_display_set_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_offset_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_offset); +/* + * Function NOT generated: + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb + */ /* * lvgl extension definition for: - * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) + * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_display_set_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, lv_display_rotation_t))lv_func_ptr)(disp, rotation); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_rotation_mpobj, 2, mp_lv_display_set_rotation, lv_display_set_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); /* * lvgl extension definition for: - * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) + * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - bool enable = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_display_t *, bool))lv_func_ptr)(disp, enable); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_matrix_rotation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_matrix_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); /* * lvgl extension definition for: - * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) + * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_dpi(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - int32_t dpi = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, int32_t))lv_func_ptr)(disp, dpi); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_dpi_mpobj, 2, mp_lv_display_set_dpi, lv_display_set_dpi); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); +/* + * Function NOT generated: + * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! + * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + */ + +#define funcptr_draw_line_cb NULL + + /* * lvgl extension definition for: - * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) + * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) */ -static mp_obj_t mp_lv_display_get_horizontal_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_horizontal_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_vertical_resolution */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_vertical_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_horizontal_resolution */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_horizontal_resolution); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_vertical_resolution */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_vertical_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_horizontal_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_horizontal_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_vertical_resolution */ +/* + * lvgl extension definition for: + * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_vertical_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_x */ +static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_x_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_x); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_y */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_y_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); /* * lvgl extension definition for: - * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) + * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_get_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_rotation_t _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_rotation_mpobj, 1, mp_lv_display_get_rotation, lv_display_get_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); /* * lvgl extension definition for: - * bool lv_display_get_matrix_rotation(lv_display_t *disp) + * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_get_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - bool _res = ((bool (*)(lv_display_t *))lv_func_ptr)(disp); - return convert_to_bool(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_matrix_rotation_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_matrix_rotation); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_dpi */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_dpi_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_dpi); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); /* * lvgl extension definition for: - * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) + * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *buf1 = mp_to_ptr(mp_args[1]); - void *buf2 = mp_to_ptr(mp_args[2]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, render_mode); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_mpobj, 5, mp_lv_display_set_buffers, lv_display_set_buffers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); /* * lvgl extension definition for: - * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) + * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_buffers_with_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *buf1 = mp_to_ptr(mp_args[1]); - void *buf2 = mp_to_ptr(mp_args[2]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[5]); - ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, stride, render_mode); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_with_stride_mpobj, 6, mp_lv_display_set_buffers_with_stride, lv_display_set_buffers_with_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); /* * lvgl extension definition for: - * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) + * void lv_draw_cleanup_task(lv_draw_task_t *t) */ -static mp_obj_t mp_lv_display_set_draw_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_cleanup_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(mp_args[2]); - ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf1, buf2); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + ((void (*)(lv_draw_task_t *))lv_func_ptr)(t); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buffers_mpobj, 3, mp_lv_display_set_draw_buffers, lv_display_set_draw_buffers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_cleanup_task_mpobj, 1, mp_lv_draw_cleanup_task, lv_draw_cleanup_task); + +/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); /* * lvgl extension definition for: - * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) + * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_3rd_draw_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf3); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_3rd_draw_buffer_mpobj, 2, mp_lv_display_set_3rd_draw_buffer, lv_display_set_3rd_draw_buffer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); /* * lvgl extension definition for: - * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) + * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_func_ptr)(disp, render_mode); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_render_mode_mpobj, 2, mp_lv_display_set_render_mode, lv_display_set_render_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); /* - * Callback function lv_display_t_flush_cb - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) + * lvgl extension definition for: + * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -GENMPY_UNUSED static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) +static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); - mp_args[2] = mp_array_from_u8ptr((void*)arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_cb)), 3, mp_args); - return; + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); + /* * lvgl extension definition for: - * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) + * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *flush_cb = mp_lv_callback(mp_args[1], &lv_display_t_flush_cb_callback, MP_QSTR_lv_display_t_flush_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_func_ptr)(disp, flush_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_cb_mpobj, 2, mp_lv_display_set_flush_cb, lv_display_set_flush_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); /* * lvgl extension definition for: - * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) + * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_get_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_flush_cb_t _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_lv_funcptr_lv_display_flush_cb_t(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_flush_cb_mpobj, 1, mp_lv_display_get_flush_cb, lv_display_get_flush_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); /* - * Callback function lv_display_t_wait_cb - * void lv_display_flush_wait_cb_t(lv_display_t *disp) + * lvgl extension definition for: + * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -GENMPY_UNUSED static void lv_display_t_wait_cb_callback(lv_display_t *arg0) +static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_wait_cb)), 1, mp_args); - return; + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); + /* * lvgl extension definition for: - * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) + * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_flush_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_func_ptr)(disp, wait_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_wait_cb_mpobj, 2, mp_lv_display_set_flush_wait_cb, lv_display_set_flush_wait_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); +/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ -/* - * Callback function lv_display_t_sync_cb - * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) - */ - -GENMPY_UNUSED static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_cb)), 2, mp_args); - return; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); + +/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); + /* * lvgl extension definition for: - * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) + * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) */ -static mp_obj_t mp_lv_display_set_sync_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *sync_cb = mp_lv_callback(mp_args[1], &lv_display_t_sync_cb_callback, MP_QSTR_lv_display_t_sync_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_func_ptr)(disp, sync_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_cb_mpobj, 2, mp_lv_display_set_sync_cb, lv_display_set_sync_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); /* * lvgl extension definition for: - * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) + * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_sync_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_func_ptr)(disp, wait_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_wait_cb_mpobj, 2, mp_lv_display_set_sync_wait_cb, lv_display_set_sync_wait_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); /* * lvgl extension definition for: - * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) + * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) */ -static mp_obj_t mp_lv_display_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, lv_color_format_t))lv_func_ptr)(disp, color_format); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_color_format_mpobj, 2, mp_lv_display_set_color_format, lv_display_set_color_format); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); /* - * lvgl extension definition for: - * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) + * Function NOT generated: + * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_image_core_cb draw_core_cb */ - -static mp_obj_t mp_lv_display_get_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_color_format_t _res = ((lv_color_format_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_color_format_mpobj, 1, mp_lv_display_get_color_format, lv_display_get_color_format); +#define funcptr_lv_draw_image_core_cb NULL + /* * lvgl extension definition for: - * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) + * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) */ -static mp_obj_t mp_lv_display_set_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t tile_cnt = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, tile_cnt); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); + lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); + const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); + const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_tile_cnt_mpobj, 2, mp_lv_display_set_tile_cnt, lv_display_set_tile_cnt); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) + * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static mp_obj_t mp_lv_display_get_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int_from_uint(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_tile_cnt_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_tile_cnt); - -/* Reusing lv_display_set_matrix_rotation for lv_display_set_antialiasing */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_antialiasing_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_antialiasing); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); -/* Reusing lv_display_get_matrix_rotation for lv_display_get_antialiasing */ +/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_antialiasing_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_antialiasing); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_flush_ready */ +/* Reusing lv_draw_unit_draw_letter for lv_draw_unit_draw_letter_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_flush_ready); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_internal_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter_internal); -/* Reusing lv_display_get_matrix_rotation for lv_display_flush_is_last */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_flush_is_last); +static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cleanup_task), MP_ROM_PTR(&mp_lv_draw_cleanup_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter_internal), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_internal_mpobj) }, -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_sync_ready */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_sync_ready); - -/* Reusing lv_display_get_matrix_rotation for lv_display_sync_is_last */ +static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_sync_is_last); +static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, -/* Reusing lv_display_get_matrix_rotation for lv_display_is_double_buffered */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_double_buffered_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_double_buffered); - +static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) + * void *lv_event_get_target(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_render_mode_t _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_render_mode_mpobj, 1, mp_lv_display_get_render_mode, lv_display_get_render_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); + +/* Reusing lv_event_get_target for lv_event_get_current_target */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) + * lv_event_code_t lv_event_get_code(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_screen_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return lv_to_mp((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_active_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); -/* Reusing lv_display_get_screen_active for lv_display_get_screen_prev */ +/* Reusing lv_event_get_target for lv_event_get_param */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_prev_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_prev); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); -/* Reusing lv_display_get_screen_active for lv_display_get_screen_loading */ +/* Reusing lv_event_get_target for lv_event_get_user_data */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_loading_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_loading); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); -/* Reusing lv_display_get_screen_active for lv_display_get_layer_top */ +/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_top_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); -/* Reusing lv_display_get_screen_active for lv_display_get_layer_sys */ +/* Reusing funcptr_event_cb for lv_event_stop_trickling */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_sys_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_sys); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); -/* Reusing lv_display_get_screen_active for lv_display_get_layer_bottom */ +/* Reusing funcptr_event_cb for lv_event_stop_processing */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_bottom_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); + +/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); /* - * Callback function lv_display_add_event_cb_event_cb - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) */ -GENMPY_UNUSED static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) +static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_add_event_cb_event_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); + /* * lvgl extension definition for: - * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) */ -static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - void *event_cb = mp_lv_callback(mp_args[1], &lv_display_add_event_cb_event_cb_callback, MP_QSTR_lv_display_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_add_event_cb_mpobj, 4, mp_lv_display_add_event_cb, lv_display_add_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); -/* Reusing lv_display_get_tile_cnt for lv_display_get_event_count */ +/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_count_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_event_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); /* * lvgl extension definition for: - * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) + * lv_indev_t *lv_event_get_indev(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_event_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_indev_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_dsc_mpobj, 2, mp_lv_display_get_event_dsc, lv_display_get_event_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); /* * lvgl extension definition for: - * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) + * lv_layer_t *lv_event_get_layer(lv_event_t *e) */ -static mp_obj_t mp_lv_display_remove_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); - return convert_to_bool(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_layer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_mpobj, 2, mp_lv_display_remove_event, lv_display_remove_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); /* - * Callback function lv_display_remove_event_cb_with_user_data_event_cb - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * const lv_area_t *lv_event_get_old_size(lv_event_t *e) */ -GENMPY_UNUSED static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) +static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); + + +/* + * lvgl extension definition for: + * uint32_t lv_event_get_key(lv_event_t *e) + */ + +static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int_from_uint(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); + /* * lvgl extension definition for: - * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * int32_t lv_event_get_rotary_diff(lv_event_t *e) */ -static mp_obj_t mp_lv_display_remove_event_cb_with_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *event_cb = mp_lv_callback(mp_args[1], &lv_display_remove_event_cb_with_user_data_event_cb_callback, MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); - return mp_obj_new_int_from_uint(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_cb_with_user_data_mpobj, 3, mp_lv_display_remove_event_cb_with_user_data, lv_display_remove_event_cb_with_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); /* * lvgl extension definition for: - * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) + * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) */ -static mp_obj_t mp_lv_display_send_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); - void *param = mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_func_ptr)(disp, code, param); - return mp_obj_new_int(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_event_mpobj, 3, mp_lv_display_send_event, lv_display_send_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); /* * lvgl extension definition for: - * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) + * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) */ -static mp_obj_t mp_lv_display_set_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_theme_t *th = mp_write_ptr_lv_theme_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_theme_t *))lv_func_ptr)(disp, th); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_theme_mpobj, 2, mp_lv_display_set_theme, lv_display_set_theme); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); /* * lvgl extension definition for: - * lv_theme_t *lv_display_get_theme(lv_display_t *disp) + * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_theme_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_point_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_theme_mpobj, 1, mp_lv_display_get_theme, lv_display_get_theme); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); /* - * lvgl extension definition for: - * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) + * Struct lv_hit_test_info_t */ -static mp_obj_t mp_lv_display_get_inactive_time(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) { - const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int_from_uint(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); + return (lv_hit_test_info_t*)self->data; } - +#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_inactive_time_mpobj, 1, mp_lv_display_get_inactive_time, lv_display_get_inactive_time); - -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_trigger_activity */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_trigger_activity_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_trigger_activity); - -/* Reusing lv_display_set_matrix_rotation for lv_display_enable_invalidation */ +#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) +#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_enable_invalidation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_enable_invalidation); - -/* Reusing lv_display_get_matrix_rotation for lv_display_is_invalidation_enabled */ +static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_invalidation_enabled_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_invalidation_enabled); + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; + case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; + case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_hit_test_info_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_hit_test_info_t"); +} + +static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_hit_test_info_t_type, + MP_QSTR_lv_hit_test_info_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_hit_test_info_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_hit_test_info_t_attr, + locals_dict, &mp_lv_hit_test_info_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) +{ + return &mp_lv_hit_test_info_t_type; +} /* * lvgl extension definition for: - * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) + * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_refr_timer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_timer_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_hit_test_info_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_refr_timer_mpobj, 1, mp_lv_display_get_refr_timer, lv_display_get_refr_timer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete_refr_timer */ +/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_refr_timer_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete_refr_timer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); /* - * Callback function lv_display_register_vsync_event_event_cb - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) */ -GENMPY_UNUSED static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) +static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_register_vsync_event_event_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); + /* * lvgl extension definition for: - * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) */ -static mp_obj_t mp_lv_display_register_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *event_cb = mp_lv_callback(mp_args[1], &lv_display_register_vsync_event_event_cb_callback, MP_QSTR_lv_display_register_vsync_event_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - bool _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); - return convert_to_bool(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_register_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_register_vsync_event); - -/* Reusing lv_display_register_vsync_event for lv_display_unregister_vsync_event */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_unregister_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_unregister_vsync_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); /* * lvgl extension definition for: - * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) + * lv_state_t lv_event_get_prev_state(lv_event_t *e) */ -static mp_obj_t mp_lv_display_send_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *param = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_display_t *, void *))lv_func_ptr)(disp, param); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_vsync_event_mpobj, 2, mp_lv_display_send_vsync_event, lv_display_send_vsync_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); /* * lvgl extension definition for: - * void lv_display_set_user_data(lv_display_t *disp, void *user_data) + * float lv_event_get_pinch_scale(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_display_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - ((void (*)(lv_display_t *, void *))lv_func_ptr)(disp, user_data); - return mp_const_none; + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_float_from_f(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_user_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); -/* Reusing lv_display_set_user_data for lv_display_set_driver_data */ +/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_driver_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_driver_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); + +/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); /* * lvgl extension definition for: - * void *lv_display_get_user_data(lv_display_t *disp) + * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_display_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void * _res = ((void *(*)(lv_display_t *))lv_func_ptr)(disp); - return ptr_to_mp((void*)_res); + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_user_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_user_data); - -/* Reusing lv_display_get_user_data for lv_display_get_driver_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_driver_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_driver_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) + * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) */ -static mp_obj_t mp_lv_display_get_buf_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); + lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_buf_active_mpobj, 1, mp_lv_display_get_buf_active, lv_display_get_buf_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); /* * lvgl extension definition for: - * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) + * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_display_rotate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_area_t *))lv_func_ptr)(disp, area); - return mp_const_none; + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_area_mpobj, 2, mp_lv_display_rotate_area, lv_display_rotate_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); + +/* Reusing funcptr_event_cb for lv_event_push */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); + +/* Reusing funcptr_event_cb for lv_event_pop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); + + +static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) + * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) */ -static mp_obj_t mp_lv_display_rotate_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_unpremultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_point_t *))lv_func_ptr)(disp, point); - return mp_const_none; + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t))lv_func_ptr)(c); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point); - -/* Reusing lv_display_rotate_point for lv_display_rotate_point_ccw */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_ccw_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point_ccw); - -/* Reusing lv_display_get_tile_cnt for lv_display_get_draw_buf_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_draw_buf_size_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_draw_buf_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_unpremultiply_mpobj, 1, mp_lv_color32_unpremultiply, lv_color32_unpremultiply); /* * lvgl extension definition for: - * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) + * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) */ -static mp_obj_t mp_lv_display_get_invalidated_draw_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_lumi_of(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t width = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t height = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_func_ptr)(disp, width, height); + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + bool premultiplied = mp_obj_is_true(mp_args[1]); + uint8_t _res = ((uint8_t (*)(lv_color32_t, bool))lv_func_ptr)(c, premultiplied); return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_invalidated_draw_buf_size_mpobj, 3, mp_lv_display_get_invalidated_draw_buf_size, lv_display_get_invalidated_draw_buf_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_lumi_of_mpobj, 2, mp_lv_color32_lumi_of, lv_color32_lumi_of); /* * lvgl extension definition for: - * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) + * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) */ -static mp_obj_t mp_lv_display_dpx(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_mix32_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); - int32_t n = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_func_ptr)(disp, n); - return mp_obj_new_int(_res); + lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_dpx_mpobj, 2, mp_lv_display_dpx, lv_display_dpx); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_inlined); + +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied_inlined */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied_inlined); /* * lvgl extension definition for: - * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) + * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) */ -static mp_obj_t mp_lv_draw_dispatch_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); - bool _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_func_ptr)(disp, layer); + lv_color32_t c1 = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t c2 = mp_write_lv_color32_t(mp_args[1]); + bool _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(c1, c2); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_dispatch_layer_mpobj, 2, mp_lv_draw_dispatch_layer, lv_draw_dispatch_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_eq_mpobj, 2, mp_lv_color32_eq, lv_color32_eq); /* * lvgl extension definition for: - * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) + * void lv_color_premultiply(lv_color32_t *c) */ -static mp_obj_t mp_lv_display_set_draw_buf_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[1]); - ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_func_ptr)(disp, handlers); + lv_color32_t *c = mp_write_ptr_lv_color32_t(mp_args[0]); + ((void (*)(lv_color32_t *))lv_func_ptr)(c); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buf_handlers_mpobj, 2, mp_lv_display_set_draw_buf_handlers, lv_display_set_draw_buf_handlers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_premultiply_mpobj, 1, mp_lv_color_premultiply, lv_color_premultiply); -static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_display_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_display_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_default), MP_ROM_PTR(&mp_lv_display_set_default_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_display_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_resolution), MP_ROM_PTR(&mp_lv_display_set_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_physical_resolution), MP_ROM_PTR(&mp_lv_display_set_physical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_display_set_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_display_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_matrix_rotation), MP_ROM_PTR(&mp_lv_display_set_matrix_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dpi), MP_ROM_PTR(&mp_lv_display_set_dpi_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_horizontal_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_vertical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_original_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_original_horizontal_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_original_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_original_vertical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_physical_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_horizontal_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_physical_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_vertical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_display_get_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_display_get_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_display_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_matrix_rotation), MP_ROM_PTR(&mp_lv_display_get_matrix_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dpi), MP_ROM_PTR(&mp_lv_display_get_dpi_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_buffers), MP_ROM_PTR(&mp_lv_display_set_buffers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_buffers_with_stride), MP_ROM_PTR(&mp_lv_display_set_buffers_with_stride_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_draw_buffers), MP_ROM_PTR(&mp_lv_display_set_draw_buffers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_3rd_draw_buffer), MP_ROM_PTR(&mp_lv_display_set_3rd_draw_buffer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_render_mode), MP_ROM_PTR(&mp_lv_display_set_render_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flush_cb), MP_ROM_PTR(&mp_lv_display_set_flush_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_flush_cb), MP_ROM_PTR(&mp_lv_display_get_flush_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flush_wait_cb), MP_ROM_PTR(&mp_lv_display_set_flush_wait_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_sync_cb), MP_ROM_PTR(&mp_lv_display_set_sync_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_sync_wait_cb), MP_ROM_PTR(&mp_lv_display_set_sync_wait_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_display_set_color_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_color_format), MP_ROM_PTR(&mp_lv_display_get_color_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tile_cnt), MP_ROM_PTR(&mp_lv_display_set_tile_cnt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tile_cnt), MP_ROM_PTR(&mp_lv_display_get_tile_cnt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_antialiasing), MP_ROM_PTR(&mp_lv_display_set_antialiasing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_antialiasing), MP_ROM_PTR(&mp_lv_display_get_antialiasing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_ready), MP_ROM_PTR(&mp_lv_display_flush_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_is_last), MP_ROM_PTR(&mp_lv_display_flush_is_last_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sync_ready), MP_ROM_PTR(&mp_lv_display_sync_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sync_is_last), MP_ROM_PTR(&mp_lv_display_sync_is_last_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_double_buffered), MP_ROM_PTR(&mp_lv_display_is_double_buffered_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_render_mode), MP_ROM_PTR(&mp_lv_display_get_render_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen_active), MP_ROM_PTR(&mp_lv_display_get_screen_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen_prev), MP_ROM_PTR(&mp_lv_display_get_screen_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen_loading), MP_ROM_PTR(&mp_lv_display_get_screen_loading_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_top), MP_ROM_PTR(&mp_lv_display_get_layer_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_sys), MP_ROM_PTR(&mp_lv_display_get_layer_sys_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_bottom), MP_ROM_PTR(&mp_lv_display_get_layer_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_event_cb), MP_ROM_PTR(&mp_lv_display_add_event_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_event_count), MP_ROM_PTR(&mp_lv_display_get_event_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_event_dsc), MP_ROM_PTR(&mp_lv_display_get_event_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_event), MP_ROM_PTR(&mp_lv_display_remove_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_display_remove_event_cb_with_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_display_send_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_theme), MP_ROM_PTR(&mp_lv_display_set_theme_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_theme), MP_ROM_PTR(&mp_lv_display_get_theme_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_inactive_time), MP_ROM_PTR(&mp_lv_display_get_inactive_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_trigger_activity), MP_ROM_PTR(&mp_lv_display_trigger_activity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_enable_invalidation), MP_ROM_PTR(&mp_lv_display_enable_invalidation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_invalidation_enabled), MP_ROM_PTR(&mp_lv_display_is_invalidation_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_refr_timer), MP_ROM_PTR(&mp_lv_display_get_refr_timer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_refr_timer), MP_ROM_PTR(&mp_lv_display_delete_refr_timer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_register_vsync_event), MP_ROM_PTR(&mp_lv_display_register_vsync_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unregister_vsync_event), MP_ROM_PTR(&mp_lv_display_unregister_vsync_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_send_vsync_event), MP_ROM_PTR(&mp_lv_display_send_vsync_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_display_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_driver_data), MP_ROM_PTR(&mp_lv_display_set_driver_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_display_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_driver_data), MP_ROM_PTR(&mp_lv_display_get_driver_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_buf_active), MP_ROM_PTR(&mp_lv_display_get_buf_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_area), MP_ROM_PTR(&mp_lv_display_rotate_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_point), MP_ROM_PTR(&mp_lv_display_rotate_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_point_ccw), MP_ROM_PTR(&mp_lv_display_rotate_point_ccw_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_draw_buf_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_invalidated_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_invalidated_draw_buf_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_display_dpx_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_dispatch_layer), MP_ROM_PTR(&mp_lv_draw_dispatch_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_draw_buf_handlers), MP_ROM_PTR(&mp_lv_display_set_draw_buf_handlers_mpobj) }, +/* + * lvgl extension definition for: + * uint8_t lv_color32_luminance(lv_color32_t c) + */ + +static mp_obj_t mp_lv_color32_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + uint8_t _res = ((uint8_t (*)(lv_color32_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_luminance_mpobj, 1, mp_lv_color32_luminance, lv_color32_luminance); + +/* Reusing lv_color_mix32_inlined for lv_color_mix32 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32); + +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied); + +/* Reusing lv_color_mix32_inlined for lv_color_over32 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_over32); + + +static const mp_rom_map_elem_t mp_lv_color32_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color32_t))) }, + { MP_ROM_QSTR(MP_QSTR_unpremultiply), MP_ROM_PTR(&mp_lv_color32_unpremultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lumi_of), MP_ROM_PTR(&mp_lv_color32_lumi_of_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_inlined), MP_ROM_PTR(&mp_lv_color_mix32_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied_inlined), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color32_eq_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_premultiply), MP_ROM_PTR(&mp_lv_color_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color32_luminance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32), MP_ROM_PTR(&mp_lv_color_mix32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_over32), MP_ROM_PTR(&mp_lv_color_over32_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_display_t_locals_dict, mp_lv_display_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_color32_t_locals_dict, mp_lv_color32_t_locals_dict_table); /* @@ -40341,1067 +39455,849 @@ static const mp_rom_map_elem_t mp_lv_theme_t_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_lv_theme_t_locals_dict, mp_lv_theme_t_locals_dict_table); -/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); - - -/* - * Callback function lv_timer_t_timer_cb - * void lv_timer_cb_t(lv_timer_t *) - */ - -GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); - return; -} - - -/* - * lvgl extension definition for: - * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) - */ - -static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); - /* * lvgl extension definition for: - * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) + * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) */ -static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_is_in_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); - return mp_const_none; + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + lv_color_t l_color = mp_write_lv_color_t(mp_args[1]); + lv_color_t h_color = mp_write_lv_color_t(mp_args[2]); + bool _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_func_ptr)(color, l_color, h_color); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_is_in_range_mpobj, 3, mp_lv_color_is_in_range, lv_color_is_in_range); /* * lvgl extension definition for: - * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) + * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) */ -static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); - return mp_const_none; + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(color, opa); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_32_mpobj, 2, mp_lv_color_to_32, lv_color_to_32); /* * lvgl extension definition for: - * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) + * uint32_t lv_color_to_int(lv_color_t c) */ -static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_int(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool auto_delete = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); - return mp_const_none; + lv_color_t c = mp_write_lv_color_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_color_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_int_mpobj, 1, mp_lv_color_to_int, lv_color_to_int); /* * lvgl extension definition for: - * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) + * bool lv_color_eq(lv_color_t c1, lv_color_t c2) */ -static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); - return mp_const_none; + lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); + lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); + bool _res = ((bool (*)(lv_color_t, lv_color_t))lv_func_ptr)(c1, c2); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_eq_mpobj, 2, mp_lv_color_eq, lv_color_eq); /* * lvgl extension definition for: - * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) + * uint16_t lv_color_to_u16(lv_color_t color) */ -static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_u16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); - return mp_read_ptr_lv_timer_t((void*)_res); + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + uint16_t _res = ((uint16_t (*)(lv_color_t))lv_func_ptr)(color); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u16_mpobj, 1, mp_lv_color_to_u16, lv_color_to_u16); +/* Reusing lv_color_to_int for lv_color_to_u32 */ -/* - * lvgl extension definition for: - * void *lv_timer_get_user_data(lv_timer_t *timer) - */ - -static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u32_mpobj, 1, mp_lv_color_to_int, lv_color_to_u32); /* * lvgl extension definition for: - * bool lv_timer_get_paused(lv_timer_t *timer) + * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) */ -static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_lighten(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); - return convert_to_bool(_res); + lv_color_t c = mp_write_lv_color_t(mp_args[0]); + lv_opa_t lvl = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(c, lvl); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); - - -static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_lighten_mpobj, 2, mp_lv_color_lighten, lv_color_lighten); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); - - -/* - * lvgl extension definition for: - * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) - */ - -static mp_obj_t mp_lv_color32_unpremultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t))lv_func_ptr)(c); - return mp_read_lv_color32_t(_res); -} - - +/* Reusing lv_color_lighten for lv_color_darken */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_unpremultiply_mpobj, 1, mp_lv_color32_unpremultiply, lv_color32_unpremultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_darken_mpobj, 2, mp_lv_color_lighten, lv_color_darken); /* - * lvgl extension definition for: - * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) + * Struct lv_color_hsv_t */ -static mp_obj_t mp_lv_color32_lumi_of(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); - bool premultiplied = mp_obj_is_true(mp_args[1]); - uint8_t _res = ((uint8_t (*)(lv_color32_t, bool))lv_func_ptr)(c, premultiplied); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_lumi_of_mpobj, 2, mp_lv_color32_lumi_of, lv_color32_lumi_of); - - -/* - * lvgl extension definition for: - * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) - */ +static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void); -static mp_obj_t mp_lv_color_mix32_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_hsv_t(mp_obj_t self_in) { - lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); - return mp_read_lv_color32_t(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_hsv_t_type())); + return (lv_color_hsv_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_inlined); - -/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied_inlined */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied_inlined); - - -/* - * lvgl extension definition for: - * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) - */ +#define mp_write_lv_color_hsv_t(struct_obj) *((lv_color_hsv_t*)mp_write_ptr_lv_color_hsv_t(struct_obj)) -static mp_obj_t mp_lv_color32_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_hsv_t(void *field) { - lv_color32_t c1 = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t c2 = mp_write_lv_color32_t(mp_args[1]); - bool _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(c1, c2); - return convert_to_bool(_res); + return lv_to_mp_struct(get_mp_lv_color_hsv_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_eq_mpobj, 2, mp_lv_color32_eq, lv_color32_eq); - - -/* - * lvgl extension definition for: - * void lv_color_premultiply(lv_color32_t *c) - */ +#define mp_read_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(copy_buffer(&field, sizeof(lv_color_hsv_t))) +#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) -static mp_obj_t mp_lv_color_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_color_hsv_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - lv_color32_t *c = mp_write_ptr_lv_color32_t(mp_args[0]); - ((void (*)(lv_color32_t *))lv_func_ptr)(c); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_premultiply_mpobj, 1, mp_lv_color_premultiply, lv_color_premultiply); - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color_hsv_t *data = (lv_color_hsv_t*)self->data; -/* - * lvgl extension definition for: - * uint8_t lv_color32_luminance(lv_color32_t c) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint16_t; + case MP_QSTR_s: dest[0] = mp_obj_new_int_from_uint(data->s); break; // converting from uint8_t; + case MP_QSTR_v: dest[0] = mp_obj_new_int_from_uint(data->v); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_h: data->h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_s: data->s = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_v: data->v = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } -static mp_obj_t mp_lv_color32_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); - uint8_t _res = ((uint8_t (*)(lv_color32_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_luminance_mpobj, 1, mp_lv_color32_luminance, lv_color32_luminance); - -/* Reusing lv_color_mix32_inlined for lv_color_mix32 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32); - -/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied); - -/* Reusing lv_color_mix32_inlined for lv_color_over32 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_over32); - - -static const mp_rom_map_elem_t mp_lv_color32_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color32_t))) }, - { MP_ROM_QSTR(MP_QSTR_unpremultiply), MP_ROM_PTR(&mp_lv_color32_unpremultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lumi_of), MP_ROM_PTR(&mp_lv_color32_lumi_of_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32_inlined), MP_ROM_PTR(&mp_lv_color_mix32_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied_inlined), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color32_eq_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_premultiply), MP_ROM_PTR(&mp_lv_color_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color32_luminance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32), MP_ROM_PTR(&mp_lv_color_mix32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_over32), MP_ROM_PTR(&mp_lv_color_over32_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_color32_t_locals_dict, mp_lv_color32_t_locals_dict_table); - - -/* - * Callback function lv_color_filter_dsc_t_cb - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) - */ - -GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +static void mp_lv_color_hsv_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - mp_args[1] = mp_read_lv_color_t(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); - return mp_write_lv_color_t(callback_result); + mp_printf(print, "struct lv_color_hsv_t"); } +static const mp_obj_dict_t mp_lv_color_hsv_t_locals_dict; -/* - * lvgl extension definition for: - * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color_hsv_t_type, + MP_QSTR_lv_color_hsv_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color_hsv_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color_hsv_t_attr, + locals_dict, &mp_lv_color_hsv_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void) { - lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); - void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); - return mp_const_none; + return &mp_lv_color_hsv_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); - - -static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); /* * lvgl extension definition for: - * void lv_anim_set_var(lv_anim_t *a, void *var) + * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) */ -static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_hsv(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *var = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); - return mp_const_none; + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + lv_color_hsv_t _res = ((lv_color_hsv_t (*)(lv_color_t))lv_func_ptr)(color); + return mp_read_lv_color_hsv_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); - - -/* - * Function NOT generated: - * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! - * lv_anim_exec_xcb_t exec_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_hsv_mpobj, 1, mp_lv_color_to_hsv, lv_color_to_hsv); /* * lvgl extension definition for: - * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) + * uint8_t lv_color_luminance(lv_color_t c) */ -static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); - return mp_const_none; + lv_color_t c = mp_write_lv_color_t(mp_args[0]); + uint8_t _res = ((uint8_t (*)(lv_color_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_luminance_mpobj, 1, mp_lv_color_luminance, lv_color_luminance); /* * lvgl extension definition for: - * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) + * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) */ -static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_mix(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); - return mp_const_none; + lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); + lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); + uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_func_ptr)(c1, c2, mix); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); - -/* Reusing lv_anim_set_duration for lv_anim_set_delay */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix_mpobj, 3, mp_lv_color_mix, lv_color_mix); -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ +/* Reusing lv_color_luminance for lv_color_brightness */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_brightness_mpobj, 1, mp_lv_color_luminance, lv_color_brightness); -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); +static const mp_rom_map_elem_t mp_lv_color_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_t))) }, + { MP_ROM_QSTR(MP_QSTR_is_in_range), MP_ROM_PTR(&mp_lv_color_is_in_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_32), MP_ROM_PTR(&mp_lv_color_to_32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_int), MP_ROM_PTR(&mp_lv_color_to_int_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color_eq_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_u16), MP_ROM_PTR(&mp_lv_color_to_u16_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_u32), MP_ROM_PTR(&mp_lv_color_to_u32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lighten), MP_ROM_PTR(&mp_lv_color_lighten_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_darken), MP_ROM_PTR(&mp_lv_color_darken_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_hsv), MP_ROM_PTR(&mp_lv_color_to_hsv_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color_luminance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mix), MP_ROM_PTR(&mp_lv_color_mix_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_brightness), MP_ROM_PTR(&mp_lv_color_brightness_mpobj) }, -/* Reusing lv_anim_set_duration for lv_anim_pause_for */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); - +static MP_DEFINE_CONST_DICT(mp_lv_color_t_locals_dict, mp_lv_color_t_locals_dict_table); + /* * lvgl extension definition for: - * bool lv_anim_is_paused(lv_anim_t *a) + * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) */ -static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_line_height_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); - return convert_to_bool(_res); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_internal_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height_internal); /* * lvgl extension definition for: - * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) + * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) */ -static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_has_static_bitmap_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); - return mp_const_none; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_internal_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap_internal); -/* - * Callback function lv_anim_t_exec_cb - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) - */ - -GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_args[1] = mp_obj_new_int(arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); - return; -} - - /* * lvgl extension definition for: - * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_bottom_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_const_none; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_func_ptr)(font, trim); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim_internal); +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim_internal */ -/* - * Callback function lv_anim_t_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ - -GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim_internal); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); + /* * lvgl extension definition for: - * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) + * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); - return mp_const_none; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); + uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); +/* Reusing lv_font_get_line_height_internal for lv_font_get_line_height */ -/* - * Callback function lv_anim_t_start_cb - * void lv_anim_start_cb_t(lv_anim_t *) - */ - -GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); - return; -} - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height); + /* * lvgl extension definition for: - * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) + * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) */ -static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); + lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); + lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); +/* Reusing lv_font_has_static_bitmap_internal for lv_font_has_static_bitmap */ -/* - * Callback function lv_anim_t_get_value_cb - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) - */ - -GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_bottom_trim */ -/* - * lvgl extension definition for: - * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_fmt_txt */ -static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_fmt_txt_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_fmt_txt); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_internal */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_internal_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_internal); + +/* Reusing lv_font_get_glyph_width for lv_font_get_glyph_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_internal_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width_internal); -/* - * Callback function lv_anim_t_completed_cb - * void lv_anim_completed_cb_t(lv_anim_t *) - */ +static const mp_rom_map_elem_t mp_lv_font_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_line_height_internal), MP_ROM_PTR(&mp_lv_font_get_line_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim_internal), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim_internal), MP_ROM_PTR(&mp_lv_font_get_top_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_width), MP_ROM_PTR(&mp_lv_font_get_glyph_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_line_height), MP_ROM_PTR(&mp_lv_font_get_line_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_kerning), MP_ROM_PTR(&mp_lv_font_set_kerning_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_static_bitmap), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim), MP_ROM_PTR(&mp_lv_font_get_top_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_width_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_width_internal_mpobj) }, + +}; -GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); - return; -} +static MP_DEFINE_CONST_DICT(mp_lv_font_t_locals_dict, mp_lv_font_t_locals_dict_table); + +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap); + /* * lvgl extension definition for: - * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) + * const void *lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t *g_dsc) */ -static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_glyph_static_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); - return mp_const_none; + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap); /* - * Callback function lv_anim_t_deleted_cb - * void lv_anim_deleted_cb_t(lv_anim_t *) + * lvgl extension definition for: + * void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t *g_dsc) */ -GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +static mp_obj_t mp_lv_font_glyph_release_draw_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); - return; + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + ((void (*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data); + +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_bitmap_fmt_txt */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bitmap_fmt_txt_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_bitmap_fmt_txt); + /* * lvgl extension definition for: - * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) + * int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t *lhs, const lv_font_glyph_dsc_t *rhs) */ -static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_glyph_dsc_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); - return mp_const_none; + const lv_font_glyph_dsc_t *lhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + const lv_font_glyph_dsc_t *rhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_glyph_dsc_t *, const lv_font_glyph_dsc_t *))lv_func_ptr)(lhs, rhs); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_dsc_compare_mpobj, 2, mp_lv_font_glyph_dsc_compare, lv_font_glyph_dsc_compare); -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_internal_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap_internal); -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ +/* Reusing lv_font_get_glyph_static_bitmap for lv_font_get_glyph_static_bitmap_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_internal_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap_internal); -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ +/* Reusing lv_font_glyph_release_draw_data for lv_font_glyph_release_draw_data_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_internal_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data_internal); -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_compare), MP_ROM_PTR(&mp_lv_font_glyph_dsc_compare_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data_internal), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_internal_mpobj) }, -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); - +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); + -/* - * lvgl extension definition for: - * void lv_anim_set_early_apply(lv_anim_t *a, bool en) - */ +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, + +}; -static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); - return mp_const_none; -} +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); -/* Reusing lv_anim_set_var for lv_anim_set_user_data */ +/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); /* - * lvgl extension definition for: - * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) + * Callback function lv_timer_t_timer_cb + * void lv_timer_cb_t(lv_timer_t *) */ -static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); - int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); - int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); - int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); - return mp_const_none; + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); - /* * lvgl extension definition for: - * lv_anim_t *lv_anim_start(const lv_anim_t *a) + * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) */ -static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); /* * lvgl extension definition for: - * uint32_t lv_anim_get_delay(const lv_anim_t *a) + * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) */ -static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_obj_new_int_from_uint(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); - -/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); - -/* Reusing lv_anim_get_delay for lv_anim_get_time */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); -/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ +/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); /* * lvgl extension definition for: - * void *lv_anim_get_user_data(const lv_anim_t *a) + * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) */ -static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); - return ptr_to_mp((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); /* * lvgl extension definition for: - * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) */ -static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return convert_to_bool(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool auto_delete = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); /* * lvgl extension definition for: - * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) */ -static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_read_ptr_lv_anim_t((void*)_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); /* * lvgl extension definition for: - * int32_t lv_anim_path_linear(const lv_anim_t *a) + * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) */ -static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_obj_new_int(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); + return mp_read_ptr_lv_timer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); -/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); - -/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ +/* + * lvgl extension definition for: + * void *lv_timer_get_user_data(lv_timer_t *timer) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); - -/* Reusing lv_anim_path_linear for lv_anim_path_step */ +static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); + return ptr_to_mp((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); - -/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); -static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, +/* + * lvgl extension definition for: + * bool lv_timer_get_paused(lv_timer_t *timer) + */ + +static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); + + +static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, +static const mp_rom_map_elem_t mp_lv_obj_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_class_t))) }, + { MP_ROM_QSTR(MP_QSTR_create_obj), MP_ROM_PTR(&mp_lv_obj_class_create_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_base), MP_ROM_PTR(&mp_lv_obj_event_base_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_obj_class_t_locals_dict, mp_lv_obj_class_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, +static const mp_rom_map_elem_t mp_lv_matrix_t_locals_dict_table[] = { + }; -static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_matrix_t_locals_dict, mp_lv_matrix_t_locals_dict_table); /* - * Array convertors for lv_style_prop_t [] + * lvgl extension definition for: + * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) */ -GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_point_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (lv_style_prop_t *)lv_arr; + lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[0]); + int32_t angle = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[3]); + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[4]); + bool zoom_first = mp_obj_is_true(mp_args[5]); + ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(point, angle, scale_x, scale_y, pivot, zoom_first); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_transform_mpobj, 6, mp_lv_point_transform, lv_point_transform); + + +/* + * lvgl extension definition for: + * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + */ + +static mp_obj_t mp_lv_point_array_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return mp_array_from_u8ptr((void*)arr); + lv_point_t *points = mp_write_ptr_lv_point_t(mp_args[0]); + size_t count = (size_t)mp_obj_get_int(mp_args[1]); + int32_t angle = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[4]); + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[5]); + bool zoom_first = mp_obj_is_true(mp_args[6]); + ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(points, count, angle, scale_x, scale_y, pivot, zoom_first); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_array_transform_mpobj, 7, mp_lv_point_array_transform, lv_point_array_transform); + /* - * Callback function lv_style_transition_dsc_init_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) + * lvgl extension definition for: + * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) */ -GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +static mp_obj_t mp_lv_point_to_precise(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); + const lv_point_t *p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[0]); + lv_point_precise_t _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_func_ptr)(p); + return mp_read_lv_point_precise_t(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_to_precise_mpobj, 1, mp_lv_point_to_precise, lv_point_to_precise); + /* * lvgl extension definition for: - * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) + * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) */ -static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_point_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); - void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); - ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); + lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_point_t *, int32_t, int32_t))lv_func_ptr)(p, x, y); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); - - -static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_set_mpobj, 3, mp_lv_point_set, lv_point_set); -}; -static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); - +/* + * lvgl extension definition for: + * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) + */ -static const mp_rom_map_elem_t mp_lv_obj_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_class_t))) }, - { MP_ROM_QSTR(MP_QSTR_create_obj), MP_ROM_PTR(&mp_lv_obj_class_create_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_base), MP_ROM_PTR(&mp_lv_obj_event_base_mpobj) }, - -}; +static mp_obj_t mp_lv_point_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_point_t *p1 = mp_write_ptr_lv_point_t(mp_args[0]); + lv_point_t *p2 = mp_write_ptr_lv_point_t(mp_args[1]); + ((void (*)(lv_point_t *, lv_point_t *))lv_func_ptr)(p1, p2); + return mp_const_none; +} -static MP_DEFINE_CONST_DICT(mp_lv_obj_class_t_locals_dict, mp_lv_obj_class_t_locals_dict_table); - + -static const mp_rom_map_elem_t mp_lv_matrix_t_locals_dict_table[] = { +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_swap_mpobj, 2, mp_lv_point_swap, lv_point_swap); + +static const mp_rom_map_elem_t mp_lv_point_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_point_t))) }, + { MP_ROM_QSTR(MP_QSTR_transform), MP_ROM_PTR(&mp_lv_point_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_array_transform), MP_ROM_PTR(&mp_lv_point_array_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_precise), MP_ROM_PTR(&mp_lv_point_to_precise_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_point_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_point_swap_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_matrix_t_locals_dict, mp_lv_matrix_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_point_t_locals_dict, mp_lv_point_t_locals_dict_table); /* @@ -42066,567 +40962,936 @@ static mp_obj_t mp_lv_style_set_text_leading_trim(size_t mp_n_args, const mp_obj static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_text_leading_trim_mpobj, 2, mp_lv_style_set_text_leading_trim, lv_style_set_text_leading_trim); -/* Reusing lv_style_set_width for lv_style_set_blur_radius */ +/* Reusing lv_style_set_width for lv_style_set_blur_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_blur_radius); + +/* Reusing lv_style_set_bg_image_tiled for lv_style_set_blur_backdrop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_backdrop_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_blur_backdrop); + + +/* + * lvgl extension definition for: + * void lv_style_set_blur_quality(lv_style_t *style, lv_blur_quality_t value) + */ + +static mp_obj_t mp_lv_style_set_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_blur_quality_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_blur_quality_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_blur_quality); + +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_radius); + +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_x); + +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_y); + +/* Reusing lv_style_set_bg_color for lv_style_set_drop_shadow_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_color_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_drop_shadow_color); + +/* Reusing lv_style_set_bg_opa for lv_style_set_drop_shadow_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_drop_shadow_opa); + +/* Reusing lv_style_set_blur_quality for lv_style_set_drop_shadow_quality */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_drop_shadow_quality); + +/* Reusing lv_style_set_width for lv_style_set_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_radius); + +/* Reusing lv_style_set_width for lv_style_set_radial_offset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_width, lv_style_set_radial_offset); + +/* Reusing lv_style_set_bg_image_tiled for lv_style_set_clip_corner */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_clip_corner_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_clip_corner); + +/* Reusing lv_style_set_bg_opa for lv_style_set_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa); + +/* Reusing lv_style_set_bg_opa for lv_style_set_opa_layered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_layered_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa_layered); + + +/* + * lvgl extension definition for: + * void lv_style_set_color_filter_dsc(lv_style_t *style, const lv_color_filter_dsc_t *value) + */ + +static mp_obj_t mp_lv_style_set_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(mp_args[1]); + ((void (*)(lv_style_t *, const lv_color_filter_dsc_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_dsc_mpobj, 2, mp_lv_style_set_color_filter_dsc, lv_style_set_color_filter_dsc); + +/* Reusing lv_style_set_bg_opa for lv_style_set_color_filter_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_color_filter_opa); + +/* Reusing lv_style_set_bg_color for lv_style_set_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_recolor); + +/* Reusing lv_style_set_bg_opa for lv_style_set_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_recolor_opa); + + +/* + * lvgl extension definition for: + * void lv_style_set_anim(lv_style_t *style, const lv_anim_t *value) + */ + +static mp_obj_t mp_lv_style_set_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[1]); + ((void (*)(lv_style_t *, const lv_anim_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_mpobj, 2, mp_lv_style_set_anim, lv_style_set_anim); + + +/* + * lvgl extension definition for: + * void lv_style_set_anim_duration(lv_style_t *style, uint32_t value) + */ + +static mp_obj_t mp_lv_style_set_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + uint32_t value = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, uint32_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_duration_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_anim_duration); + + +/* + * lvgl extension definition for: + * void lv_style_set_transition(lv_style_t *style, const lv_style_transition_dsc_t *value) + */ + +static mp_obj_t mp_lv_style_set_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(mp_args[1]); + ((void (*)(lv_style_t *, const lv_style_transition_dsc_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transition_mpobj, 2, mp_lv_style_set_transition, lv_style_set_transition); + + +/* + * lvgl extension definition for: + * void lv_style_set_blend_mode(lv_style_t *style, lv_blend_mode_t value) + */ + +static mp_obj_t mp_lv_style_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_blend_mode_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_blend_mode_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blend_mode_mpobj, 2, mp_lv_style_set_blend_mode, lv_style_set_blend_mode); + + +/* + * lvgl extension definition for: + * void lv_style_set_layout(lv_style_t *style, uint16_t value) + */ + +static mp_obj_t mp_lv_style_set_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + uint16_t value = (uint16_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, uint16_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_layout_mpobj, 2, mp_lv_style_set_layout, lv_style_set_layout); + + +/* + * lvgl extension definition for: + * void lv_style_set_base_dir(lv_style_t *style, lv_base_dir_t value) + */ + +static mp_obj_t mp_lv_style_set_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_base_dir_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_base_dir_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_base_dir_mpobj, 2, mp_lv_style_set_base_dir, lv_style_set_base_dir); + +/* Reusing lv_style_set_bg_image_src for lv_style_set_bitmap_mask_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bitmap_mask_src_mpobj, 2, mp_lv_style_set_bg_image_src, lv_style_set_bitmap_mask_src); + +/* Reusing lv_style_set_anim_duration for lv_style_set_rotary_sensitivity */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_rotary_sensitivity_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_rotary_sensitivity); + + +/* + * lvgl extension definition for: + * void lv_style_set_flex_flow(lv_style_t *style, lv_flex_flow_t value) + */ + +static mp_obj_t mp_lv_style_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_flex_flow_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_flex_flow_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_flow_mpobj, 2, mp_lv_style_set_flex_flow, lv_style_set_flex_flow); + + +/* + * lvgl extension definition for: + * void lv_style_set_flex_main_place(lv_style_t *style, lv_flex_align_t value) + */ + +static mp_obj_t mp_lv_style_set_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_flex_align_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_flex_align_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_main_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_main_place); + +/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_cross_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_cross_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_cross_place); + +/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_track_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_track_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_track_place); + + +/* + * lvgl extension definition for: + * void lv_style_set_flex_grow(lv_style_t *style, uint8_t value) + */ + +static mp_obj_t mp_lv_style_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + uint8_t value = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, uint8_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_grow_mpobj, 2, mp_lv_style_set_flex_grow, lv_style_set_flex_grow); + + +/* + * lvgl extension definition for: + * void lv_style_set_grid_column_dsc_array(lv_style_t *style, const int32_t *value) + */ + +static mp_obj_t mp_lv_style_set_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const int32_t *value = (const int32_t *)mp_array_to_i32ptr(mp_args[1]); + ((void (*)(lv_style_t *, const int32_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_column_dsc_array); + + +/* + * lvgl extension definition for: + * void lv_style_set_grid_column_align(lv_style_t *style, lv_grid_align_t value) + */ + +static mp_obj_t mp_lv_style_set_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_grid_align_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_grid_align_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_column_align); + +/* Reusing lv_style_set_grid_column_dsc_array for lv_style_set_grid_row_dsc_array */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_row_dsc_array); + +/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_row_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_row_align); + +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_pos); + +/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_x_align */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_x_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_x_align); + +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_span */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_span); + +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_pos); + +/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_y_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_blur_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_y_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_y_align); -/* Reusing lv_style_set_bg_image_tiled for lv_style_set_blur_backdrop */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_backdrop_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_blur_backdrop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_span); /* * lvgl extension definition for: - * void lv_style_set_blur_quality(lv_style_t *style, lv_blur_quality_t value) + * void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) */ -static mp_obj_t mp_lv_style_set_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_blur_quality_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_blur_quality_t))lv_func_ptr)(style, value); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_blur_quality); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); -/* Reusing lv_style_set_width for lv_style_set_drop_shadow_radius */ +/* Reusing lv_style_set_width for lv_style_set_pad_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_all); -/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_x */ +/* Reusing lv_style_set_width for lv_style_set_pad_hor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_hor); -/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_y */ +/* Reusing lv_style_set_width for lv_style_set_pad_ver */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_ver); -/* Reusing lv_style_set_bg_color for lv_style_set_drop_shadow_color */ +/* Reusing lv_style_set_width for lv_style_set_pad_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_color_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_drop_shadow_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_gap); -/* Reusing lv_style_set_bg_opa for lv_style_set_drop_shadow_opa */ +/* Reusing lv_style_set_width for lv_style_set_margin_hor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_drop_shadow_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_hor); -/* Reusing lv_style_set_blur_quality for lv_style_set_drop_shadow_quality */ +/* Reusing lv_style_set_width for lv_style_set_margin_ver */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_drop_shadow_quality); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_ver); -/* Reusing lv_style_set_width for lv_style_set_radius */ +/* Reusing lv_style_set_width for lv_style_set_margin_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_all); -/* Reusing lv_style_set_width for lv_style_set_radial_offset */ +/* Reusing lv_style_set_width for lv_style_set_transform_scale */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_width, lv_style_set_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale); -/* Reusing lv_style_set_bg_image_tiled for lv_style_set_clip_corner */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_clip_corner_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_clip_corner); +static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_t))) }, + { MP_ROM_QSTR(MP_QSTR_is_const_internal), MP_ROM_PTR(&mp_lv_style_is_const_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prop_internal), MP_ROM_PTR(&mp_lv_style_get_prop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_style_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_style_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_merge), MP_ROM_PTR(&mp_lv_style_merge_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_prop), MP_ROM_PTR(&mp_lv_style_remove_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_prop), MP_ROM_PTR(&mp_lv_style_set_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prop), MP_ROM_PTR(&mp_lv_style_get_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_style_is_empty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_style_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_width), MP_ROM_PTR(&mp_lv_style_set_min_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_width), MP_ROM_PTR(&mp_lv_style_set_max_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_style_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_height), MP_ROM_PTR(&mp_lv_style_set_min_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_height), MP_ROM_PTR(&mp_lv_style_set_max_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_length), MP_ROM_PTR(&mp_lv_style_set_length_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_style_set_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_style_set_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_style_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_width), MP_ROM_PTR(&mp_lv_style_set_transform_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_height), MP_ROM_PTR(&mp_lv_style_set_transform_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_translate_x), MP_ROM_PTR(&mp_lv_style_set_translate_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_translate_y), MP_ROM_PTR(&mp_lv_style_set_translate_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_translate_radial), MP_ROM_PTR(&mp_lv_style_set_translate_radial_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale_x), MP_ROM_PTR(&mp_lv_style_set_transform_scale_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale_y), MP_ROM_PTR(&mp_lv_style_set_transform_scale_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_rotation), MP_ROM_PTR(&mp_lv_style_set_transform_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_x), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_y), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_skew_x), MP_ROM_PTR(&mp_lv_style_set_transform_skew_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_skew_y), MP_ROM_PTR(&mp_lv_style_set_transform_skew_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_top), MP_ROM_PTR(&mp_lv_style_set_pad_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_bottom), MP_ROM_PTR(&mp_lv_style_set_pad_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_left), MP_ROM_PTR(&mp_lv_style_set_pad_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_right), MP_ROM_PTR(&mp_lv_style_set_pad_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_row), MP_ROM_PTR(&mp_lv_style_set_pad_row_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_column), MP_ROM_PTR(&mp_lv_style_set_pad_column_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_radial), MP_ROM_PTR(&mp_lv_style_set_pad_radial_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_top), MP_ROM_PTR(&mp_lv_style_set_margin_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_bottom), MP_ROM_PTR(&mp_lv_style_set_margin_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_left), MP_ROM_PTR(&mp_lv_style_set_margin_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_right), MP_ROM_PTR(&mp_lv_style_set_margin_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_color), MP_ROM_PTR(&mp_lv_style_set_bg_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_opa), MP_ROM_PTR(&mp_lv_style_set_bg_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_color), MP_ROM_PTR(&mp_lv_style_set_bg_grad_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_dir), MP_ROM_PTR(&mp_lv_style_set_bg_grad_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_main_stop), MP_ROM_PTR(&mp_lv_style_set_bg_main_stop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_stop), MP_ROM_PTR(&mp_lv_style_set_bg_grad_stop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_main_opa), MP_ROM_PTR(&mp_lv_style_set_bg_main_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_opa), MP_ROM_PTR(&mp_lv_style_set_bg_grad_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad), MP_ROM_PTR(&mp_lv_style_set_bg_grad_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_src), MP_ROM_PTR(&mp_lv_style_set_bg_image_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_tiled), MP_ROM_PTR(&mp_lv_style_set_bg_image_tiled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_color), MP_ROM_PTR(&mp_lv_style_set_border_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_opa), MP_ROM_PTR(&mp_lv_style_set_border_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_width), MP_ROM_PTR(&mp_lv_style_set_border_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_side), MP_ROM_PTR(&mp_lv_style_set_border_side_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_post), MP_ROM_PTR(&mp_lv_style_set_border_post_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_width), MP_ROM_PTR(&mp_lv_style_set_outline_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_color), MP_ROM_PTR(&mp_lv_style_set_outline_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_opa), MP_ROM_PTR(&mp_lv_style_set_outline_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_pad), MP_ROM_PTR(&mp_lv_style_set_outline_pad_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_width), MP_ROM_PTR(&mp_lv_style_set_shadow_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_spread), MP_ROM_PTR(&mp_lv_style_set_shadow_spread_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_color), MP_ROM_PTR(&mp_lv_style_set_shadow_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_shadow_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_opa), MP_ROM_PTR(&mp_lv_style_set_image_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_recolor), MP_ROM_PTR(&mp_lv_style_set_image_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_image_recolor_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_colorkey), MP_ROM_PTR(&mp_lv_style_set_image_colorkey_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_width), MP_ROM_PTR(&mp_lv_style_set_line_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_dash_width), MP_ROM_PTR(&mp_lv_style_set_line_dash_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_dash_gap), MP_ROM_PTR(&mp_lv_style_set_line_dash_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_rounded), MP_ROM_PTR(&mp_lv_style_set_line_rounded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_color), MP_ROM_PTR(&mp_lv_style_set_line_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_opa), MP_ROM_PTR(&mp_lv_style_set_line_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_width), MP_ROM_PTR(&mp_lv_style_set_arc_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_rounded), MP_ROM_PTR(&mp_lv_style_set_arc_rounded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_color), MP_ROM_PTR(&mp_lv_style_set_arc_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_opa), MP_ROM_PTR(&mp_lv_style_set_arc_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_image_src), MP_ROM_PTR(&mp_lv_style_set_arc_image_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_color), MP_ROM_PTR(&mp_lv_style_set_text_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_opa), MP_ROM_PTR(&mp_lv_style_set_text_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_font), MP_ROM_PTR(&mp_lv_style_set_text_font_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_letter_space), MP_ROM_PTR(&mp_lv_style_set_text_letter_space_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_line_space), MP_ROM_PTR(&mp_lv_style_set_text_line_space_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_decor), MP_ROM_PTR(&mp_lv_style_set_text_decor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_align), MP_ROM_PTR(&mp_lv_style_set_text_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_leading_trim), MP_ROM_PTR(&mp_lv_style_set_text_leading_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blur_radius), MP_ROM_PTR(&mp_lv_style_set_blur_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blur_backdrop), MP_ROM_PTR(&mp_lv_style_set_blur_backdrop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blur_quality), MP_ROM_PTR(&mp_lv_style_set_blur_quality_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_radius), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_color), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_quality), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_quality_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_style_set_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radial_offset), MP_ROM_PTR(&mp_lv_style_set_radial_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_clip_corner), MP_ROM_PTR(&mp_lv_style_set_clip_corner_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_opa), MP_ROM_PTR(&mp_lv_style_set_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_opa_layered), MP_ROM_PTR(&mp_lv_style_set_opa_layered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_color_filter_dsc), MP_ROM_PTR(&mp_lv_style_set_color_filter_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_color_filter_opa), MP_ROM_PTR(&mp_lv_style_set_color_filter_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_style_set_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_recolor_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_anim), MP_ROM_PTR(&mp_lv_style_set_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_style_set_anim_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transition), MP_ROM_PTR(&mp_lv_style_set_transition_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_style_set_blend_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_style_set_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_base_dir), MP_ROM_PTR(&mp_lv_style_set_base_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bitmap_mask_src), MP_ROM_PTR(&mp_lv_style_set_bitmap_mask_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotary_sensitivity), MP_ROM_PTR(&mp_lv_style_set_rotary_sensitivity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_style_set_flex_flow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_main_place), MP_ROM_PTR(&mp_lv_style_set_flex_main_place_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_cross_place), MP_ROM_PTR(&mp_lv_style_set_flex_cross_place_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_track_place), MP_ROM_PTR(&mp_lv_style_set_flex_track_place_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_style_set_flex_grow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_column_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_column_dsc_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_column_align), MP_ROM_PTR(&mp_lv_style_set_grid_column_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_row_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_row_dsc_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_row_align), MP_ROM_PTR(&mp_lv_style_set_grid_row_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_x_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_x_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_y_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_y_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, -/* Reusing lv_style_set_bg_opa for lv_style_set_opa */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa); - -/* Reusing lv_style_set_bg_opa for lv_style_set_opa_layered */ +static MP_DEFINE_CONST_DICT(mp_lv_style_t_locals_dict, mp_lv_style_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_layered_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa_layered); +static const mp_rom_map_elem_t mp_lv_style_value_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_value_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_style_value_t_locals_dict, mp_lv_style_value_t_locals_dict_table); + /* - * lvgl extension definition for: - * void lv_style_set_color_filter_dsc(lv_style_t *style, const lv_color_filter_dsc_t *value) + * Array convertors for lv_color_t [] */ -static mp_obj_t mp_lv_style_set_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_color_t *mp_arr_to_lv_color_t_____(mp_obj_t mp_arr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(mp_args[1]); - ((void (*)(lv_style_t *, const lv_color_filter_dsc_t *))lv_func_ptr)(style, value); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_dsc_mpobj, 2, mp_lv_style_set_color_filter_dsc, lv_style_set_color_filter_dsc); - -/* Reusing lv_style_set_bg_opa for lv_style_set_color_filter_opa */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_color_filter_opa); + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); -/* Reusing lv_style_set_bg_color for lv_style_set_recolor */ + lv_color_t *lv_arr = (lv_color_t*)m_malloc(len * sizeof(lv_color_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_color_t(item); + } + return (lv_color_t *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_recolor); - -/* Reusing lv_style_set_bg_opa for lv_style_set_recolor_opa */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_color_t_____(const lv_color_t *arr) +{ + return mp_read_ptr_lv_color_t((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_recolor_opa); - /* - * lvgl extension definition for: - * void lv_style_set_anim(lv_style_t *style, const lv_anim_t *value) + * Array convertors for lv_opa_t [] */ -static mp_obj_t mp_lv_style_set_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_opa_t *mp_arr_to_lv_opa_t_____(mp_obj_t mp_arr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[1]); - ((void (*)(lv_style_t *, const lv_anim_t *))lv_func_ptr)(style, value); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_opa_t *lv_arr = (lv_opa_t*)m_malloc(len * sizeof(lv_opa_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (lv_opa_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_opa_t_____(const lv_opa_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_mpobj, 2, mp_lv_style_set_anim, lv_style_set_anim); - /* - * lvgl extension definition for: - * void lv_style_set_anim_duration(lv_style_t *style, uint32_t value) + * Array convertors for uint8_t [] */ -static mp_obj_t mp_lv_style_set_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t_____(mp_obj_t mp_arr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - uint32_t value = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, uint32_t))lv_func_ptr)(style, value); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (uint8_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t_____(const uint8_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_duration_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_anim_duration); - /* * lvgl extension definition for: - * void lv_style_set_transition(lv_style_t *style, const lv_style_transition_dsc_t *value) + * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) */ -static mp_obj_t mp_lv_style_set_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_init_stops(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(mp_args[1]); - ((void (*)(lv_style_t *, const lv_style_transition_dsc_t *))lv_func_ptr)(style, value); + lv_grad_dsc_t *grad = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + const lv_color_t *colors = (const lv_color_t *)mp_arr_to_lv_color_t_____(mp_args[1]); + const lv_opa_t *opa = (const lv_opa_t *)mp_arr_to_lv_opa_t_____(mp_args[2]); + const uint8_t *fracs = (const uint8_t *)mp_arr_to_uint8_t_____(mp_args[3]); + int num_stops = (int)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_func_ptr)(grad, colors, opa, fracs, num_stops); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transition_mpobj, 2, mp_lv_style_set_transition, lv_style_set_transition); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_init_stops_mpobj, 5, mp_lv_grad_init_stops, lv_grad_init_stops); /* * lvgl extension definition for: - * void lv_style_set_blend_mode(lv_style_t *style, lv_blend_mode_t value) + * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) */ -static mp_obj_t mp_lv_style_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_horizontal_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_blend_mode_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_blend_mode_t))lv_func_ptr)(style, value); + lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + ((void (*)(lv_grad_dsc_t *))lv_func_ptr)(dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blend_mode_mpobj, 2, mp_lv_style_set_blend_mode, lv_style_set_blend_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_horizontal_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_horizontal_init); + +/* Reusing lv_grad_horizontal_init for lv_grad_vertical_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_vertical_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_vertical_init); /* * lvgl extension definition for: - * void lv_style_set_layout(lv_style_t *style, uint16_t value) + * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) */ -static mp_obj_t mp_lv_style_set_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_linear_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - uint16_t value = (uint16_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, uint16_t))lv_func_ptr)(style, value); + lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t from_x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t from_y = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t to_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t to_y = (int32_t)mp_obj_get_int(mp_args[4]); + lv_grad_extend_t extend = (int)mp_obj_get_int(mp_args[5]); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_func_ptr)(dsc, from_x, from_y, to_x, to_y, extend); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_layout_mpobj, 2, mp_lv_style_set_layout, lv_style_set_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_linear_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_linear_init); + +/* Reusing lv_grad_linear_init for lv_grad_radial_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_radial_init); /* * lvgl extension definition for: - * void lv_style_set_base_dir(lv_style_t *style, lv_base_dir_t value) + * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) */ -static mp_obj_t mp_lv_style_set_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_radial_set_focal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_base_dir_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_base_dir_t))lv_func_ptr)(style, value); + lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t center_x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t center_y = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_func_ptr)(dsc, center_x, center_y, radius); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_base_dir_mpobj, 2, mp_lv_style_set_base_dir, lv_style_set_base_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_set_focal_mpobj, 4, mp_lv_grad_radial_set_focal, lv_grad_radial_set_focal); -/* Reusing lv_style_set_bg_image_src for lv_style_set_bitmap_mask_src */ +/* Reusing lv_grad_linear_init for lv_grad_conical_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bitmap_mask_src_mpobj, 2, mp_lv_style_set_bg_image_src, lv_style_set_bitmap_mask_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_conical_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_conical_init); -/* Reusing lv_style_set_anim_duration for lv_style_set_rotary_sensitivity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_rotary_sensitivity_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_rotary_sensitivity); +static const mp_rom_map_elem_t mp_lv_grad_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init_stops), MP_ROM_PTR(&mp_lv_grad_init_stops_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_horizontal_init), MP_ROM_PTR(&mp_lv_grad_horizontal_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_vertical_init), MP_ROM_PTR(&mp_lv_grad_vertical_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_linear_init), MP_ROM_PTR(&mp_lv_grad_linear_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_radial_init), MP_ROM_PTR(&mp_lv_grad_radial_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_radial_set_focal), MP_ROM_PTR(&mp_lv_grad_radial_set_focal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_conical_init), MP_ROM_PTR(&mp_lv_grad_conical_init_mpobj) }, +}; -/* - * lvgl extension definition for: - * void lv_style_set_flex_flow(lv_style_t *style, lv_flex_flow_t value) - */ - -static mp_obj_t mp_lv_style_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_flex_flow_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_flex_flow_t))lv_func_ptr)(style, value); - return mp_const_none; -} - - +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_t_locals_dict, mp_lv_grad_dsc_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_flow_mpobj, 2, mp_lv_style_set_flex_flow, lv_style_set_flex_flow); +static const mp_rom_map_elem_t mp_lv_grad_stop_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_stop_t))) }, +}; -/* - * lvgl extension definition for: - * void lv_style_set_flex_main_place(lv_style_t *style, lv_flex_align_t value) - */ +static MP_DEFINE_CONST_DICT(mp_lv_grad_stop_t_locals_dict, mp_lv_grad_stop_t_locals_dict_table); + -static mp_obj_t mp_lv_style_set_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_flex_align_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_flex_align_t))lv_func_ptr)(style, value); - return mp_const_none; -} +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_t_locals_dict, mp_lv_grad_dsc_params_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_main_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_main_place); +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_linear_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_linear_t))) }, -/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_cross_place */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_cross_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_cross_place); - -/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_track_place */ +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_linear_t_locals_dict, mp_lv_grad_dsc_params_linear_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_track_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_track_place); +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_radial_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_radial_t))) }, +}; -/* - * lvgl extension definition for: - * void lv_style_set_flex_grow(lv_style_t *style, uint8_t value) - */ +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_radial_t_locals_dict, mp_lv_grad_dsc_params_radial_t_locals_dict_table); + -static mp_obj_t mp_lv_style_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - uint8_t value = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, uint8_t))lv_func_ptr)(style, value); - return mp_const_none; -} +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_conical_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_conical_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_conical_t_locals_dict, mp_lv_grad_dsc_params_conical_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_grow_mpobj, 2, mp_lv_style_set_flex_grow, lv_style_set_flex_grow); +static const mp_rom_map_elem_t mp_lv_image_colorkey_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_colorkey_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_image_colorkey_t_locals_dict, mp_lv_image_colorkey_t_locals_dict_table); + /* - * lvgl extension definition for: - * void lv_style_set_grid_column_dsc_array(lv_style_t *style, const int32_t *value) + * Callback function lv_color_filter_dsc_t_cb + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) */ -static mp_obj_t mp_lv_style_set_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const int32_t *value = (const int32_t *)mp_array_to_i32ptr(mp_args[1]); - ((void (*)(lv_style_t *, const int32_t *))lv_func_ptr)(style, value); - return mp_const_none; + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); + return mp_write_lv_color_t(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_column_dsc_array); - /* * lvgl extension definition for: - * void lv_style_set_grid_column_align(lv_style_t *style, lv_grid_align_t value) + * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) */ -static mp_obj_t mp_lv_style_set_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_grid_align_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_grid_align_t))lv_func_ptr)(style, value); + lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); + void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_column_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); -/* Reusing lv_style_set_grid_column_dsc_array for lv_style_set_grid_row_dsc_array */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_row_dsc_array); +static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, -/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_row_align */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_row_align); - -/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_pos */ +static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_pos); - -/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_x_align */ +/* + * Array convertors for lv_style_prop_t [] + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_x_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_x_align); +GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); -/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_span */ + lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (lv_style_prop_t *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_span); - -/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_pos */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_pos); - -/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_y_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_y_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_y_align); - -/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_span */ +/* + * Callback function lv_style_transition_dsc_init_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_span); - /* * lvgl extension definition for: - * void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) + * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) */ -static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); + void *user_data = mp_to_ptr(mp_args[5]); + const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); + void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); + ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); - -/* Reusing lv_style_set_width for lv_style_set_pad_all */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_all); - -/* Reusing lv_style_set_width for lv_style_set_pad_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_hor); - -/* Reusing lv_style_set_width for lv_style_set_pad_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_ver); - -/* Reusing lv_style_set_width for lv_style_set_pad_gap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_gap); - -/* Reusing lv_style_set_width for lv_style_set_margin_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_hor); - -/* Reusing lv_style_set_width for lv_style_set_margin_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_ver); - -/* Reusing lv_style_set_width for lv_style_set_margin_all */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_all); - -/* Reusing lv_style_set_width for lv_style_set_transform_scale */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale); - - -static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_const_internal), MP_ROM_PTR(&mp_lv_style_is_const_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prop_internal), MP_ROM_PTR(&mp_lv_style_get_prop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_style_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_style_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_merge), MP_ROM_PTR(&mp_lv_style_merge_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_prop), MP_ROM_PTR(&mp_lv_style_remove_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_prop), MP_ROM_PTR(&mp_lv_style_set_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prop), MP_ROM_PTR(&mp_lv_style_get_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_style_is_empty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_style_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_width), MP_ROM_PTR(&mp_lv_style_set_min_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_width), MP_ROM_PTR(&mp_lv_style_set_max_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_style_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_height), MP_ROM_PTR(&mp_lv_style_set_min_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_height), MP_ROM_PTR(&mp_lv_style_set_max_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_length), MP_ROM_PTR(&mp_lv_style_set_length_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_style_set_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_style_set_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_style_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_width), MP_ROM_PTR(&mp_lv_style_set_transform_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_height), MP_ROM_PTR(&mp_lv_style_set_transform_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_translate_x), MP_ROM_PTR(&mp_lv_style_set_translate_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_translate_y), MP_ROM_PTR(&mp_lv_style_set_translate_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_translate_radial), MP_ROM_PTR(&mp_lv_style_set_translate_radial_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale_x), MP_ROM_PTR(&mp_lv_style_set_transform_scale_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale_y), MP_ROM_PTR(&mp_lv_style_set_transform_scale_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_rotation), MP_ROM_PTR(&mp_lv_style_set_transform_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_x), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_y), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_skew_x), MP_ROM_PTR(&mp_lv_style_set_transform_skew_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_skew_y), MP_ROM_PTR(&mp_lv_style_set_transform_skew_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_top), MP_ROM_PTR(&mp_lv_style_set_pad_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_bottom), MP_ROM_PTR(&mp_lv_style_set_pad_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_left), MP_ROM_PTR(&mp_lv_style_set_pad_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_right), MP_ROM_PTR(&mp_lv_style_set_pad_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_row), MP_ROM_PTR(&mp_lv_style_set_pad_row_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_column), MP_ROM_PTR(&mp_lv_style_set_pad_column_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_radial), MP_ROM_PTR(&mp_lv_style_set_pad_radial_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_top), MP_ROM_PTR(&mp_lv_style_set_margin_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_bottom), MP_ROM_PTR(&mp_lv_style_set_margin_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_left), MP_ROM_PTR(&mp_lv_style_set_margin_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_right), MP_ROM_PTR(&mp_lv_style_set_margin_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_color), MP_ROM_PTR(&mp_lv_style_set_bg_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_opa), MP_ROM_PTR(&mp_lv_style_set_bg_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_color), MP_ROM_PTR(&mp_lv_style_set_bg_grad_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_dir), MP_ROM_PTR(&mp_lv_style_set_bg_grad_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_main_stop), MP_ROM_PTR(&mp_lv_style_set_bg_main_stop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_stop), MP_ROM_PTR(&mp_lv_style_set_bg_grad_stop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_main_opa), MP_ROM_PTR(&mp_lv_style_set_bg_main_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_opa), MP_ROM_PTR(&mp_lv_style_set_bg_grad_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad), MP_ROM_PTR(&mp_lv_style_set_bg_grad_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_src), MP_ROM_PTR(&mp_lv_style_set_bg_image_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_tiled), MP_ROM_PTR(&mp_lv_style_set_bg_image_tiled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_color), MP_ROM_PTR(&mp_lv_style_set_border_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_opa), MP_ROM_PTR(&mp_lv_style_set_border_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_width), MP_ROM_PTR(&mp_lv_style_set_border_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_side), MP_ROM_PTR(&mp_lv_style_set_border_side_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_post), MP_ROM_PTR(&mp_lv_style_set_border_post_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_width), MP_ROM_PTR(&mp_lv_style_set_outline_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_color), MP_ROM_PTR(&mp_lv_style_set_outline_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_opa), MP_ROM_PTR(&mp_lv_style_set_outline_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_pad), MP_ROM_PTR(&mp_lv_style_set_outline_pad_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_width), MP_ROM_PTR(&mp_lv_style_set_shadow_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_spread), MP_ROM_PTR(&mp_lv_style_set_shadow_spread_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_color), MP_ROM_PTR(&mp_lv_style_set_shadow_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_shadow_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_opa), MP_ROM_PTR(&mp_lv_style_set_image_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_recolor), MP_ROM_PTR(&mp_lv_style_set_image_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_image_recolor_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_colorkey), MP_ROM_PTR(&mp_lv_style_set_image_colorkey_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_width), MP_ROM_PTR(&mp_lv_style_set_line_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_dash_width), MP_ROM_PTR(&mp_lv_style_set_line_dash_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_dash_gap), MP_ROM_PTR(&mp_lv_style_set_line_dash_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_rounded), MP_ROM_PTR(&mp_lv_style_set_line_rounded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_color), MP_ROM_PTR(&mp_lv_style_set_line_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_opa), MP_ROM_PTR(&mp_lv_style_set_line_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_width), MP_ROM_PTR(&mp_lv_style_set_arc_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_rounded), MP_ROM_PTR(&mp_lv_style_set_arc_rounded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_color), MP_ROM_PTR(&mp_lv_style_set_arc_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_opa), MP_ROM_PTR(&mp_lv_style_set_arc_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_image_src), MP_ROM_PTR(&mp_lv_style_set_arc_image_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_color), MP_ROM_PTR(&mp_lv_style_set_text_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_opa), MP_ROM_PTR(&mp_lv_style_set_text_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_font), MP_ROM_PTR(&mp_lv_style_set_text_font_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_letter_space), MP_ROM_PTR(&mp_lv_style_set_text_letter_space_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_line_space), MP_ROM_PTR(&mp_lv_style_set_text_line_space_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_decor), MP_ROM_PTR(&mp_lv_style_set_text_decor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_align), MP_ROM_PTR(&mp_lv_style_set_text_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_leading_trim), MP_ROM_PTR(&mp_lv_style_set_text_leading_trim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blur_radius), MP_ROM_PTR(&mp_lv_style_set_blur_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blur_backdrop), MP_ROM_PTR(&mp_lv_style_set_blur_backdrop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blur_quality), MP_ROM_PTR(&mp_lv_style_set_blur_quality_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_radius), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_color), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_quality), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_quality_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_style_set_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radial_offset), MP_ROM_PTR(&mp_lv_style_set_radial_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_clip_corner), MP_ROM_PTR(&mp_lv_style_set_clip_corner_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_opa), MP_ROM_PTR(&mp_lv_style_set_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_opa_layered), MP_ROM_PTR(&mp_lv_style_set_opa_layered_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_color_filter_dsc), MP_ROM_PTR(&mp_lv_style_set_color_filter_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_color_filter_opa), MP_ROM_PTR(&mp_lv_style_set_color_filter_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_style_set_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_recolor_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_anim), MP_ROM_PTR(&mp_lv_style_set_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_style_set_anim_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transition), MP_ROM_PTR(&mp_lv_style_set_transition_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_style_set_blend_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_style_set_layout_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_base_dir), MP_ROM_PTR(&mp_lv_style_set_base_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bitmap_mask_src), MP_ROM_PTR(&mp_lv_style_set_bitmap_mask_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotary_sensitivity), MP_ROM_PTR(&mp_lv_style_set_rotary_sensitivity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_style_set_flex_flow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_main_place), MP_ROM_PTR(&mp_lv_style_set_flex_main_place_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_cross_place), MP_ROM_PTR(&mp_lv_style_set_flex_cross_place_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_track_place), MP_ROM_PTR(&mp_lv_style_set_flex_track_place_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_style_set_flex_grow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_column_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_column_dsc_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_column_align), MP_ROM_PTR(&mp_lv_style_set_grid_column_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_row_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_row_dsc_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_row_align), MP_ROM_PTR(&mp_lv_style_set_grid_row_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_x_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_x_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_y_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_y_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_style_t_locals_dict, mp_lv_style_t_locals_dict_table); - -static const mp_rom_map_elem_t mp_lv_style_value_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_value_t))) }, +static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_style_value_t_locals_dict, mp_lv_style_value_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); /* @@ -48049,20 +47314,20 @@ static mp_obj_t mp_lv_sqr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_fu static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sqr_mpobj, 1, mp_lv_sqr, lv_sqr); -static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, +static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, +static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); /* @@ -48338,25 +47603,6 @@ static mp_obj_t mp_lv_color_16_16_mix_inlined(size_t mp_n_args, const mp_obj_t * static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_inlined_mpobj, 3, mp_lv_color_16_16_mix_inlined, lv_color_16_16_mix_inlined); -/* - * lvgl extension definition for: - * inline static void lv_bidi_calculate_align_internal(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) - */ - -static mp_obj_t mp_lv_bidi_calculate_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); - lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_internal_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align_internal); - - /* * lvgl extension definition for: * inline static bool lv_text_is_break_char(uint32_t letter) @@ -49616,9 +48862,24 @@ static mp_obj_t mp_lv_text_get_size(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_mpobj, 7, mp_lv_text_get_size, lv_text_get_size); -/* Reusing lv_bidi_calculate_align_internal for lv_bidi_calculate_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align); +/* + * lvgl extension definition for: + * void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) + */ + +static mp_obj_t mp_lv_bidi_calculate_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); + lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align, lv_bidi_calculate_align); /* @@ -51857,10 +51118,6 @@ static mp_obj_t mp_lv_text_encoded_letter_next_2(size_t mp_n_args, const mp_obj_ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_encoded_letter_next_2_mpobj, 4, mp_lv_text_encoded_letter_next_2, lv_text_encoded_letter_next_2); -/* Reusing lv_text_get_size for lv_text_get_size_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_internal_mpobj, 7, mp_lv_text_get_size, lv_text_get_size_internal); - /* * Function NOT generated: @@ -51914,6 +51171,155 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv /* * Functions not generated: + * lv_obj_get_style_width_internal + * lv_obj_get_style_min_width_internal + * lv_obj_get_style_max_width_internal + * lv_obj_get_style_height_internal + * lv_obj_get_style_min_height_internal + * lv_obj_get_style_max_height_internal + * lv_obj_get_style_length_internal + * lv_obj_get_style_x_internal + * lv_obj_get_style_y_internal + * lv_obj_get_style_align_internal + * lv_obj_get_style_transform_width_internal + * lv_obj_get_style_transform_height_internal + * lv_obj_get_style_translate_x_internal + * lv_obj_get_style_translate_y_internal + * lv_obj_get_style_translate_radial_internal + * lv_obj_get_style_transform_scale_x_internal + * lv_obj_get_style_transform_scale_y_internal + * lv_obj_get_style_transform_rotation_internal + * lv_obj_get_style_transform_pivot_x_internal + * lv_obj_get_style_transform_pivot_y_internal + * lv_obj_get_style_transform_skew_x_internal + * lv_obj_get_style_transform_skew_y_internal + * lv_obj_get_style_pad_top_internal + * lv_obj_get_style_pad_bottom_internal + * lv_obj_get_style_pad_left_internal + * lv_obj_get_style_pad_right_internal + * lv_obj_get_style_pad_row_internal + * lv_obj_get_style_pad_column_internal + * lv_obj_get_style_pad_radial_internal + * lv_obj_get_style_margin_top_internal + * lv_obj_get_style_margin_bottom_internal + * lv_obj_get_style_margin_left_internal + * lv_obj_get_style_margin_right_internal + * lv_obj_get_style_bg_color_internal + * lv_obj_get_style_bg_color_filtered_internal + * lv_obj_get_style_bg_opa_internal + * lv_obj_get_style_bg_grad_color_internal + * lv_obj_get_style_bg_grad_color_filtered_internal + * lv_obj_get_style_bg_grad_dir_internal + * lv_obj_get_style_bg_main_stop_internal + * lv_obj_get_style_bg_grad_stop_internal + * lv_obj_get_style_bg_main_opa_internal + * lv_obj_get_style_bg_grad_opa_internal + * lv_obj_get_style_bg_grad_internal + * lv_obj_get_style_bg_image_src_internal + * lv_obj_get_style_bg_image_opa_internal + * lv_obj_get_style_bg_image_recolor_internal + * lv_obj_get_style_bg_image_recolor_filtered_internal + * lv_obj_get_style_bg_image_recolor_opa_internal + * lv_obj_get_style_bg_image_tiled_internal + * lv_obj_get_style_border_color_internal + * lv_obj_get_style_border_color_filtered_internal + * lv_obj_get_style_border_opa_internal + * lv_obj_get_style_border_width_internal + * lv_obj_get_style_border_side_internal + * lv_obj_get_style_border_post_internal + * lv_obj_get_style_outline_width_internal + * lv_obj_get_style_outline_color_internal + * lv_obj_get_style_outline_color_filtered_internal + * lv_obj_get_style_outline_opa_internal + * lv_obj_get_style_outline_pad_internal + * lv_obj_get_style_shadow_width_internal + * lv_obj_get_style_shadow_offset_x_internal + * lv_obj_get_style_shadow_offset_y_internal + * lv_obj_get_style_shadow_spread_internal + * lv_obj_get_style_shadow_color_internal + * lv_obj_get_style_shadow_color_filtered_internal + * lv_obj_get_style_shadow_opa_internal + * lv_obj_get_style_image_opa_internal + * lv_obj_get_style_image_recolor_internal + * lv_obj_get_style_image_recolor_filtered_internal + * lv_obj_get_style_image_recolor_opa_internal + * lv_obj_get_style_image_colorkey_internal + * lv_obj_get_style_line_width_internal + * lv_obj_get_style_line_dash_width_internal + * lv_obj_get_style_line_dash_gap_internal + * lv_obj_get_style_line_rounded_internal + * lv_obj_get_style_line_color_internal + * lv_obj_get_style_line_color_filtered_internal + * lv_obj_get_style_line_opa_internal + * lv_obj_get_style_arc_width_internal + * lv_obj_get_style_arc_rounded_internal + * lv_obj_get_style_arc_color_internal + * lv_obj_get_style_arc_color_filtered_internal + * lv_obj_get_style_arc_opa_internal + * lv_obj_get_style_arc_image_src_internal + * lv_obj_get_style_text_color_internal + * lv_obj_get_style_text_color_filtered_internal + * lv_obj_get_style_text_opa_internal + * lv_obj_get_style_text_font_internal + * lv_obj_get_style_text_letter_space_internal + * lv_obj_get_style_text_line_space_internal + * lv_obj_get_style_text_decor_internal + * lv_obj_get_style_text_align_internal + * lv_obj_get_style_text_outline_stroke_color_internal + * lv_obj_get_style_text_outline_stroke_color_filtered_internal + * lv_obj_get_style_text_outline_stroke_width_internal + * lv_obj_get_style_text_outline_stroke_opa_internal + * lv_obj_get_style_text_leading_trim_internal + * lv_obj_get_style_blur_radius_internal + * lv_obj_get_style_blur_backdrop_internal + * lv_obj_get_style_blur_quality_internal + * lv_obj_get_style_drop_shadow_radius_internal + * lv_obj_get_style_drop_shadow_offset_x_internal + * lv_obj_get_style_drop_shadow_offset_y_internal + * lv_obj_get_style_drop_shadow_color_internal + * lv_obj_get_style_drop_shadow_color_filtered_internal + * lv_obj_get_style_drop_shadow_opa_internal + * lv_obj_get_style_drop_shadow_quality_internal + * lv_obj_get_style_radius_internal + * lv_obj_get_style_radial_offset_internal + * lv_obj_get_style_clip_corner_internal + * lv_obj_get_style_opa_internal + * lv_obj_get_style_opa_layered_internal + * lv_obj_get_style_color_filter_dsc_internal + * lv_obj_get_style_color_filter_opa_internal + * lv_obj_get_style_recolor_internal + * lv_obj_get_style_recolor_opa_internal + * lv_obj_get_style_anim_internal + * lv_obj_get_style_anim_duration_internal + * lv_obj_get_style_transition_internal + * lv_obj_get_style_blend_mode_internal + * lv_obj_get_style_layout_internal + * lv_obj_get_style_base_dir_internal + * lv_obj_get_style_bitmap_mask_src_internal + * lv_obj_get_style_rotary_sensitivity_internal + * lv_obj_get_style_flex_flow_internal + * lv_obj_get_style_flex_main_place_internal + * lv_obj_get_style_flex_cross_place_internal + * lv_obj_get_style_flex_track_place_internal + * lv_obj_get_style_flex_grow_internal + * lv_obj_get_style_grid_column_dsc_array_internal + * lv_obj_get_style_grid_column_align_internal + * lv_obj_get_style_grid_row_dsc_array_internal + * lv_obj_get_style_grid_row_align_internal + * lv_obj_get_style_grid_cell_column_pos_internal + * lv_obj_get_style_grid_cell_x_align_internal + * lv_obj_get_style_grid_cell_column_span_internal + * lv_obj_get_style_grid_cell_row_pos_internal + * lv_obj_get_style_grid_cell_y_align_internal + * lv_obj_get_style_grid_cell_row_span_internal + * lv_obj_calculate_style_text_align_internal + * lv_obj_get_style_space_left_internal + * lv_obj_get_style_space_right_internal + * lv_obj_get_style_space_top_internal + * lv_obj_get_style_space_bottom_internal + * lv_obj_get_style_transform_scale_x_safe_internal + * lv_obj_get_style_transform_scale_y_safe_internal + * lv_bidi_calculate_align_internal * mp_lv_init_gc * mp_lv_deinit_gc * mp_lv_get_roots @@ -51933,27 +51339,28 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv * lv_spangroup_set_span_text_fmt * lv_table_set_cell_value_fmt * lv_global_default + * lv_obj_get_style_prop_internal + * lv_obj_style_apply_color_filter_internal * lv_text_set_text_vfmt + * lv_text_get_size_internal * */ /* - * Callback function lv_font_t_get_glyph_dsc - * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) + * Callback function lv_anim_t_custom_exec_cb + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) +GENMPY_UNUSED static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) { - mp_obj_t mp_args[4]; - mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_args[3] = mp_obj_new_int_from_uint(arg3); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_get_glyph_dsc)), 4, mp_args); - return mp_obj_is_true(callback_result); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_custom_exec_cb)), 2, mp_args); + return; } @@ -52049,6 +51456,13 @@ GENMPY_UNUSED static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) } +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + */ + + /* * Callback function lv_display_t_flush_wait_cb * void lv_display_flush_wait_cb_t(lv_display_t *disp) @@ -52080,11 +51494,22 @@ GENMPY_UNUSED static void lv_display_t_sync_wait_cb_callback(lv_display_t *arg0) /* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) - * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * Callback function lv_font_t_get_glyph_dsc + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ - + +GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) +{ + mp_obj_t mp_args[4]; + mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_args[3] = mp_obj_new_int_from_uint(arg3); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_get_glyph_dsc)), 4, mp_args); + return mp_obj_is_true(callback_result); +} + /* * Function NOT generated: @@ -52109,54 +51534,6 @@ GENMPY_UNUSED static void lv_font_t_release_glyph_callback(const lv_font_t *arg0 } -/* - * Callback function lv_color_filter_dsc_t_filter_cb - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) - */ - -GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) -{ - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - mp_args[1] = mp_read_lv_color_t(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_filter_cb)), 3, mp_args); - return mp_write_lv_color_t(callback_result); -} - - -/* - * Callback function lv_anim_t_custom_exec_cb - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) - */ - -GENMPY_UNUSED static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_args[1] = mp_obj_new_int(arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_custom_exec_cb)), 2, mp_args); - return; -} - - -/* - * Callback function lv_style_transition_dsc_t_path_xcb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ - -GENMPY_UNUSED static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_t_path_xcb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); -} - - /* * Callback function lv_obj_class_t_constructor_cb * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) @@ -52205,6 +51582,38 @@ GENMPY_UNUSED static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t } +/* + * Callback function lv_color_filter_dsc_t_filter_cb + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + */ + +GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +{ + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_filter_cb)), 3, mp_args); + return mp_write_lv_color_t(callback_result); +} + + +/* + * Callback function lv_style_transition_dsc_t_path_xcb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_t_path_xcb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); +} + + /* * Callback function lv_observer_t_cb * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) @@ -52948,13 +52357,8 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_TEXT_CMD_STATE), MP_ROM_PTR(&mp_lv_LV_TEXT_CMD_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SYMBOL), MP_ROM_PTR(&mp_lv_LV_SYMBOL_type_base) }, { MP_ROM_QSTR(MP_QSTR_C_Pointer), MP_ROM_PTR(&mp_C_Pointer_type) }, - { MP_ROM_QSTR(MP_QSTR_color_t), MP_ROM_PTR(&mp_lv_color_t_type) }, - { MP_ROM_QSTR(MP_QSTR_grad_dsc_t), MP_ROM_PTR(&mp_lv_grad_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_grad_stop_t), MP_ROM_PTR(&mp_lv_grad_stop_t_type) }, - { MP_ROM_QSTR(MP_QSTR_point_t), MP_ROM_PTR(&mp_lv_point_t_type) }, - { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, - { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, - { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, + { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_t), MP_ROM_PTR(&mp_lv_draw_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_header_t), MP_ROM_PTR(&mp_lv_image_header_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_handlers_t), MP_ROM_PTR(&mp_lv_draw_buf_handlers_t_type) }, @@ -52963,20 +52367,25 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_task_t), MP_ROM_PTR(&mp_lv_draw_task_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_unit_t), MP_ROM_PTR(&mp_lv_draw_unit_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_t), MP_ROM_PTR(&mp_lv_event_t_type) }, - { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_list_t), MP_ROM_PTR(&mp_lv_event_list_t_type) }, { MP_ROM_QSTR(MP_QSTR_array_t), MP_ROM_PTR(&mp_lv_array_t_type) }, { MP_ROM_QSTR(MP_QSTR_theme_t), MP_ROM_PTR(&mp_lv_theme_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_t), MP_ROM_PTR(&mp_lv_color_t_type) }, + { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, + { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_timer_t), MP_ROM_PTR(&mp_lv_timer_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, - { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_obj_class_t), MP_ROM_PTR(&mp_lv_obj_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_matrix_t), MP_ROM_PTR(&mp_lv_matrix_t_type) }, + { MP_ROM_QSTR(MP_QSTR_point_t), MP_ROM_PTR(&mp_lv_point_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_t), MP_ROM_PTR(&mp_lv_style_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_value_t), MP_ROM_PTR(&mp_lv_style_value_t_type) }, + { MP_ROM_QSTR(MP_QSTR_grad_dsc_t), MP_ROM_PTR(&mp_lv_grad_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_grad_stop_t), MP_ROM_PTR(&mp_lv_grad_stop_t_type) }, + { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_observer_t), MP_ROM_PTR(&mp_lv_observer_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_t), MP_ROM_PTR(&mp_lv_subject_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_value_t), MP_ROM_PTR(&mp_lv_subject_value_t_type) }, @@ -53060,8 +52469,8 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_text_attributes_t), MP_ROM_PTR(&mp_lv_text_attributes_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_hit_test_info_t), MP_ROM_PTR(&mp_lv_hit_test_info_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_sqrt_res_t), MP_ROM_PTR(&mp_lv_sqrt_res_t_type) }, { MP_ROM_QSTR(MP_QSTR_LvReferenceError), MP_ROM_PTR(&mp_type_LvReferenceError) }, { MP_ROM_QSTR(MP_QSTR_obj), MP_ROM_PTR(&mp_lv_obj_type_base) }, @@ -53128,7 +52537,6 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_thread_sync_signal_isr), MP_ROM_PTR(&mp_lv_thread_sync_signal_isr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_delete), MP_ROM_PTR(&mp_lv_thread_sync_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_16_16_mix_inlined), MP_ROM_PTR(&mp_lv_color_16_16_mix_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align_internal), MP_ROM_PTR(&mp_lv_bidi_calculate_align_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_break_char), MP_ROM_PTR(&mp_lv_text_is_break_char_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_hanging_space), MP_ROM_PTR(&mp_lv_text_is_hanging_space_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_a_word), MP_ROM_PTR(&mp_lv_text_is_a_word_mpobj) }, @@ -53418,7 +52826,6 @@ static const mp_rom_map_elem_t lvgl_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_size_internal), MP_ROM_PTR(&mp_lv_text_get_size_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, }; @@ -53612,13 +53019,8 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_TEXT_CMD_STATE), MP_ROM_PTR(&mp_lv_LV_TEXT_CMD_STATE_type_base) }, { MP_ROM_QSTR(MP_QSTR_SYMBOL), MP_ROM_PTR(&mp_lv_LV_SYMBOL_type_base) }, { MP_ROM_QSTR(MP_QSTR_C_Pointer), MP_ROM_PTR(&mp_C_Pointer_type) }, - { MP_ROM_QSTR(MP_QSTR_color_t), MP_ROM_PTR(&mp_lv_color_t_type) }, - { MP_ROM_QSTR(MP_QSTR_grad_dsc_t), MP_ROM_PTR(&mp_lv_grad_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_grad_stop_t), MP_ROM_PTR(&mp_lv_grad_stop_t_type) }, - { MP_ROM_QSTR(MP_QSTR_point_t), MP_ROM_PTR(&mp_lv_point_t_type) }, - { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, - { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, - { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, + { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_t), MP_ROM_PTR(&mp_lv_draw_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_header_t), MP_ROM_PTR(&mp_lv_image_header_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_handlers_t), MP_ROM_PTR(&mp_lv_draw_buf_handlers_t_type) }, @@ -53627,20 +53029,25 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_draw_task_t), MP_ROM_PTR(&mp_lv_draw_task_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_unit_t), MP_ROM_PTR(&mp_lv_draw_unit_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_t), MP_ROM_PTR(&mp_lv_event_t_type) }, - { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_list_t), MP_ROM_PTR(&mp_lv_event_list_t_type) }, { MP_ROM_QSTR(MP_QSTR_array_t), MP_ROM_PTR(&mp_lv_array_t_type) }, { MP_ROM_QSTR(MP_QSTR_theme_t), MP_ROM_PTR(&mp_lv_theme_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_t), MP_ROM_PTR(&mp_lv_color_t_type) }, + { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, + { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_timer_t), MP_ROM_PTR(&mp_lv_timer_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, - { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_obj_class_t), MP_ROM_PTR(&mp_lv_obj_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_matrix_t), MP_ROM_PTR(&mp_lv_matrix_t_type) }, + { MP_ROM_QSTR(MP_QSTR_point_t), MP_ROM_PTR(&mp_lv_point_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_t), MP_ROM_PTR(&mp_lv_style_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_value_t), MP_ROM_PTR(&mp_lv_style_value_t_type) }, + { MP_ROM_QSTR(MP_QSTR_grad_dsc_t), MP_ROM_PTR(&mp_lv_grad_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_grad_stop_t), MP_ROM_PTR(&mp_lv_grad_stop_t_type) }, + { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_observer_t), MP_ROM_PTR(&mp_lv_observer_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_t), MP_ROM_PTR(&mp_lv_subject_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_value_t), MP_ROM_PTR(&mp_lv_subject_value_t_type) }, @@ -53724,8 +53131,8 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_text_attributes_t), MP_ROM_PTR(&mp_lv_text_attributes_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_hit_test_info_t), MP_ROM_PTR(&mp_lv_hit_test_info_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_sqrt_res_t), MP_ROM_PTR(&mp_lv_sqrt_res_t_type) }, { MP_ROM_QSTR(MP_QSTR_LvReferenceError), MP_ROM_PTR(&mp_type_LvReferenceError) }, { MP_ROM_QSTR(MP_QSTR_obj), MP_ROM_PTR(&mp_lv_obj_type_base) }, @@ -53792,7 +53199,6 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_thread_sync_signal_isr), MP_ROM_PTR(&mp_lv_thread_sync_signal_isr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_delete), MP_ROM_PTR(&mp_lv_thread_sync_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_16_16_mix_inlined), MP_ROM_PTR(&mp_lv_color_16_16_mix_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align_internal), MP_ROM_PTR(&mp_lv_bidi_calculate_align_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_break_char), MP_ROM_PTR(&mp_lv_text_is_break_char_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_hanging_space), MP_ROM_PTR(&mp_lv_text_is_hanging_space_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_a_word), MP_ROM_PTR(&mp_lv_text_is_a_word_mpobj) }, @@ -54082,7 +53488,6 @@ const mp_rom_map_elem_t lvgl_module_entries[] = { { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_size_internal), MP_ROM_PTR(&mp_lv_text_get_size_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, }; diff --git a/generated/lvgl_micropython.c b/generated/lvgl_micropython.c index 169d209..9a3a6a0 100644 --- a/generated/lvgl_micropython.c +++ b/generated/lvgl_micropython.c @@ -6379,362 +6379,313 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_background_mpobj, 1, mp_lv_ /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_width_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) */ -static mp_obj_t mp_lv_obj_get_style_width_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_flex_flow_t flow = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_func_ptr)(obj, flow); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_flow_mpobj, 2, mp_lv_obj_set_flex_flow, lv_obj_set_flex_flow); /* * lvgl extension definition for: - * inline static lv_align_t lv_obj_get_style_align_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) */ -static mp_obj_t mp_lv_obj_get_style_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_flex_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_align_t _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_flex_align_t main_place = (int)mp_obj_get_int(mp_args[1]); + lv_flex_align_t cross_place = (int)mp_obj_get_int(mp_args[2]); + lv_flex_align_t track_cross_place = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_func_ptr)(obj, main_place, cross_place, track_cross_place); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_internal_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_align_mpobj, 4, mp_lv_obj_set_flex_align, lv_obj_set_flex_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y_internal */ +static mp_obj_t mp_lv_obj_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint8_t grow = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint8_t))lv_func_ptr)(obj, grow); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_grow_mpobj, 2, mp_lv_obj_set_flex_grow, lv_obj_set_flex_grow); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_internal */ +/* + * Array convertors for int32_t [] + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_internal); +GENMPY_UNUSED static int32_t *mp_arr_to_int32_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation_internal */ + int32_t *lv_arr = (int32_t*)m_malloc(len * sizeof(int32_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (int32_t)mp_obj_get_int(item); + } + return (int32_t *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x_internal */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_int32_t_____(const int32_t *arr) +{ + return mp_array_from_i32ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y_internal */ +static mp_obj_t mp_lv_obj_set_grid_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const int32_t *col_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[1]); + const int32_t *row_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); + ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_func_ptr)(obj, col_dsc, row_dsc); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_dsc_array_mpobj, 3, mp_lv_obj_set_grid_dsc_array, lv_obj_set_grid_dsc_array); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right_internal */ +static mp_obj_t mp_lv_obj_set_grid_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); + lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_func_ptr)(obj, column_align, row_align); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_align_mpobj, 3, mp_lv_obj_set_grid_align, lv_obj_set_grid_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial_internal */ +/* + * lvgl extension definition for: + * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top_internal */ +static mp_obj_t mp_lv_obj_set_grid_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); + int32_t col_pos = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t col_span = (int32_t)mp_obj_get_int(mp_args[3]); + lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[4]); + int32_t row_pos = (int32_t)mp_obj_get_int(mp_args[5]); + int32_t row_span = (int32_t)mp_obj_get_int(mp_args[6]); + ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_func_ptr)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_cell_mpobj, 7, mp_lv_obj_set_grid_cell, lv_obj_set_grid_cell); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_clean */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_clean_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_clean); /* - * Struct lv_color_t + * lvgl extension definition for: + * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) */ -static inline const mp_obj_type_t *get_mp_lv_color_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_t_type())); - return (lv_color_t*)self->data; -} - -#define mp_write_lv_color_t(struct_obj) *((lv_color_t*)mp_write_ptr_lv_color_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_t(void *field) +static mp_obj_t mp_lv_obj_delete_delayed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_color_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t delay_ms = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, delay_ms); + return mp_const_none; } -#define mp_read_lv_color_t(field) mp_read_ptr_lv_color_t(copy_buffer(&field, sizeof(lv_color_t))) -#define mp_read_byref_lv_color_t(field) mp_read_ptr_lv_color_t(&field) + -static void mp_lv_color_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color_t *data = (lv_color_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_delayed_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_delete_delayed); + +#define funcptr_lv_anim_exec_xcb_t NULL - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_anim_exec_xcb_t(void *, int32_t) + */ -static void mp_lv_color_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_funcptr_lv_anim_exec_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_color_t"); + void *arg0 = mp_to_ptr(mp_args[0]); + int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(void *, int32_t))lv_func_ptr)(arg0, arg1); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_color_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color_t_type, - MP_QSTR_lv_color_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_color_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_color_t_attr, - locals_dict, &mp_lv_color_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_exec_xcb_t_mpobj, 2, mp_funcptr_lv_anim_exec_xcb_t, funcptr_lv_anim_exec_xcb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static inline const mp_obj_type_t *get_mp_lv_color_t_type(void) -{ - return &mp_lv_color_t_type; -} + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_anim_t_exec_cb_callback' + * lv_anim_exec_xcb_t exec_cb + */ +#define funcptr_lv_anim_custom_exec_cb_t NULL + /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -static mp_obj_t mp_lv_obj_get_style_bg_color_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_custom_exec_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_lv_color_t(_res); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_anim_t *, int32_t))lv_func_ptr)(arg0, arg1); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, 2, mp_funcptr_lv_anim_custom_exec_cb_t, funcptr_lv_anim_custom_exec_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); +#define funcptr_lv_anim_start_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered_internal); - /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_opa_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_anim_start_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_obj_get_style_bg_opa_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_start_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_opa_t _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + ((void (*)(lv_anim_t *))lv_func_ptr)(arg0); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_start_cb_t_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, funcptr_lv_anim_start_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered_internal */ +static void lv_anim_t_start_cb_callback(lv_anim_t *); +static void lv_anim_t_completed_cb_callback(lv_anim_t *); +static void lv_anim_t_deleted_cb_callback(lv_anim_t *); +#define funcptr_lv_anim_get_value_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered_internal); - /* * lvgl extension definition for: - * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_anim_get_value_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_grad_dir_t _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_anim_t *))lv_func_ptr)(arg0); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_get_value_cb_t_mpobj, 1, mp_funcptr_lv_anim_get_value_cb_t, funcptr_lv_anim_get_value_cb_t); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa_internal); - +static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); +static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); +typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * Struct lv_grad_stop_t + * Struct lv_anim_bezier3_para_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_stop_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_bezier3_para_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_stop_t_type())); - return (lv_grad_stop_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_bezier3_para_t_type())); + return (lv_anim_bezier3_para_t*)self->data; } -#define mp_write_lv_grad_stop_t(struct_obj) *((lv_grad_stop_t*)mp_write_ptr_lv_grad_stop_t(struct_obj)) +#define mp_write_lv_anim_bezier3_para_t(struct_obj) *((lv_anim_bezier3_para_t*)mp_write_ptr_lv_anim_bezier3_para_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_stop_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_bezier3_para_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_stop_t_type(), field); + return lv_to_mp_struct(get_mp_lv_anim_bezier3_para_t_type(), field); } -#define mp_read_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(copy_buffer(&field, sizeof(lv_grad_stop_t))) -#define mp_read_byref_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(&field) +#define mp_read_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) +#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) -static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_stop_t *data = (lv_grad_stop_t*)self->data; + GENMPY_UNUSED lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_frac: dest[0] = mp_obj_new_int_from_uint(data->frac); break; // converting from uint8_t; + case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int16_t; + case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int16_t; + case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int16_t; + case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int16_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6743,9 +6694,10 @@ static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_frac: data->frac = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_x1: data->x1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_y1: data->y1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_x2: data->x2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_y2: data->y2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; default: return; } @@ -6754,105 +6706,67 @@ static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_grad_stop_t_print(const mp_print_t *print, +static void mp_lv_anim_bezier3_para_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_grad_stop_t"); + mp_printf(print, "struct lv_anim_bezier3_para_t"); } -static const mp_obj_dict_t mp_lv_grad_stop_t_locals_dict; +static const mp_obj_dict_t mp_lv_anim_bezier3_para_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_stop_t_type, - MP_QSTR_lv_grad_stop_t, + mp_lv_anim_bezier3_para_t_type, + MP_QSTR_lv_anim_bezier3_para_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_stop_t_print, + print, mp_lv_anim_bezier3_para_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_stop_t_attr, - locals_dict, &mp_lv_grad_stop_t_locals_dict, + attr, mp_lv_anim_bezier3_para_t_attr, + locals_dict, &mp_lv_anim_bezier3_para_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void) { - return &mp_lv_grad_stop_t_type; + return &mp_lv_anim_bezier3_para_t_type; } /* - * Array convertors for lv_grad_stop_t [2] - */ - -GENMPY_UNUSED static lv_grad_stop_t *mp_arr_to_lv_grad_stop_t___2__(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - //TODO check dim! - lv_grad_stop_t *lv_arr = (lv_grad_stop_t*)m_malloc(len * sizeof(lv_grad_stop_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_grad_stop_t(item); - } - return (lv_grad_stop_t *)lv_arr; -} - -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_grad_stop_t___2__(lv_grad_stop_t *arr) -{ - mp_obj_t obj_arr[2]; - for (size_t i=0; i<2; i++){ - obj_arr[i] = mp_read_lv_grad_stop_t(arr[i]); - } - return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! -} - -typedef __typeof__( ((lv_grad_dsc_t*)(0))->params ) lv_grad_dsc_params_t; -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->linear ) lv_grad_dsc_params_linear_t; - -/* - * Struct lv_point_t + * Struct lv_anim_parameter_t */ -static inline const mp_obj_type_t *get_mp_lv_point_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_point_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_parameter_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_point_t_type())); - return (lv_point_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_parameter_t_type())); + return (lv_anim_parameter_t*)self->data; } -#define mp_write_lv_point_t(struct_obj) *((lv_point_t*)mp_write_ptr_lv_point_t(struct_obj)) +#define mp_write_lv_anim_parameter_t(struct_obj) *((lv_anim_parameter_t*)mp_write_ptr_lv_anim_parameter_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_point_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_parameter_t(void *field) { - return lv_to_mp_struct(get_mp_lv_point_t_type(), field); + return lv_to_mp_struct(get_mp_lv_anim_parameter_t_type(), field); } -#define mp_read_lv_point_t(field) mp_read_ptr_lv_point_t(copy_buffer(&field, sizeof(lv_point_t))) -#define mp_read_byref_lv_point_t(field) mp_read_ptr_lv_point_t(&field) +#define mp_read_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(copy_buffer(&field, sizeof(lv_anim_parameter_t))) +#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) -static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_point_t *data = (lv_point_t*)self->data; + GENMPY_UNUSED lv_anim_parameter_t *data = (lv_anim_parameter_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x: dest[0] = mp_obj_new_int(data->x); break; // converting from int32_t; - case MP_QSTR_y: dest[0] = mp_obj_new_int(data->y); break; // converting from int32_t; + case MP_QSTR_bezier3: dest[0] = mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); break; // converting from lv_anim_bezier3_para_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6861,8 +6775,7 @@ static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_x: data->x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y: data->y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_bezier3: data->bezier3 = mp_write_lv_anim_bezier3_para_t(dest[1]); break; // converting to lv_anim_bezier3_para_t; default: return; } @@ -6871,68 +6784,93 @@ static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_point_t_print(const mp_print_t *print, +static void mp_lv_anim_parameter_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_point_t"); + mp_printf(print, "struct lv_anim_parameter_t"); } -static const mp_obj_dict_t mp_lv_point_t_locals_dict; +static const mp_obj_dict_t mp_lv_anim_parameter_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_point_t_type, - MP_QSTR_lv_point_t, + mp_lv_anim_parameter_t_type, + MP_QSTR_lv_anim_parameter_t, MP_TYPE_FLAG_NONE, - print, mp_lv_point_t_print, + print, mp_lv_anim_parameter_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_point_t_attr, - locals_dict, &mp_lv_point_t_locals_dict, + attr, mp_lv_anim_parameter_t_attr, + locals_dict, &mp_lv_anim_parameter_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_point_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void) { - return &mp_lv_point_t_type; + return &mp_lv_anim_parameter_t_type; } /* - * Struct lv_grad_dsc_params_linear_t + * Struct lv_anim_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_linear_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_linear_t_type())); - return (lv_grad_dsc_params_linear_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_t_type())); + return (lv_anim_t*)self->data; } -#define mp_write_lv_grad_dsc_params_linear_t(struct_obj) *((lv_grad_dsc_params_linear_t*)mp_write_ptr_lv_grad_dsc_params_linear_t(struct_obj)) +#define mp_write_lv_anim_t(struct_obj) *((lv_anim_t*)mp_write_ptr_lv_anim_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_linear_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_linear_t_type(), field); + return lv_to_mp_struct(get_mp_lv_anim_t_type(), field); } -#define mp_read_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_linear_t))) -#define mp_read_byref_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(&field) +#define mp_read_lv_anim_t(field) mp_read_ptr_lv_anim_t(copy_buffer(&field, sizeof(lv_anim_t))) +#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) -static void mp_lv_grad_dsc_params_linear_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_anim_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)self->data; + GENMPY_UNUSED lv_anim_t *data = (lv_anim_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_start: dest[0] = mp_read_byref_lv_point_t(data->start); break; // converting from lv_point_t; - case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; + case MP_QSTR_var: dest[0] = ptr_to_mp((void*)data->var); break; // converting from void *; + case MP_QSTR_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, data->exec_cb, NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL); break; // converting from callback lv_anim_exec_xcb_t; + case MP_QSTR_custom_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, data->user_data); break; // converting from callback lv_anim_custom_exec_cb_t; + case MP_QSTR_start_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->start_cb, lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, data->user_data); break; // converting from callback lv_anim_start_cb_t; + case MP_QSTR_completed_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->completed_cb, lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, data->user_data); break; // converting from callback lv_anim_completed_cb_t; + case MP_QSTR_deleted_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->deleted_cb, lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, data->user_data); break; // converting from callback lv_anim_deleted_cb_t; + case MP_QSTR_get_value_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->get_value_cb, lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, data->user_data); break; // converting from callback lv_anim_get_value_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, data->user_data); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_start_value: dest[0] = mp_obj_new_int(data->start_value); break; // converting from int32_t; + case MP_QSTR_current_value: dest[0] = mp_obj_new_int(data->current_value); break; // converting from int32_t; + case MP_QSTR_end_value: dest[0] = mp_obj_new_int(data->end_value); break; // converting from int32_t; + case MP_QSTR_duration: dest[0] = mp_obj_new_int(data->duration); break; // converting from int32_t; + case MP_QSTR_act_time: dest[0] = mp_obj_new_int(data->act_time); break; // converting from int32_t; + case MP_QSTR_reverse_delay: dest[0] = mp_obj_new_int_from_uint(data->reverse_delay); break; // converting from uint32_t; + case MP_QSTR_reverse_duration: dest[0] = mp_obj_new_int_from_uint(data->reverse_duration); break; // converting from uint32_t; + case MP_QSTR_repeat_delay: dest[0] = mp_obj_new_int_from_uint(data->repeat_delay); break; // converting from uint32_t; + case MP_QSTR_repeat_cnt: dest[0] = mp_obj_new_int_from_uint(data->repeat_cnt); break; // converting from uint32_t; + case MP_QSTR_parameter: dest[0] = mp_read_byref_lv_anim_parameter_t(data->parameter); break; // converting from lv_anim_parameter_t; + case MP_QSTR_last_timer_run: dest[0] = mp_obj_new_int_from_uint(data->last_timer_run); break; // converting from uint32_t; + case MP_QSTR_pause_time: dest[0] = mp_obj_new_int_from_uint(data->pause_time); break; // converting from uint32_t; + case MP_QSTR_pause_duration: dest[0] = mp_obj_new_int_from_uint(data->pause_duration); break; // converting from uint32_t; + case MP_QSTR_is_paused: dest[0] = mp_obj_new_int_from_uint(data->is_paused); break; // converting from uint8_t; + case MP_QSTR_reverse_play_in_progress: dest[0] = mp_obj_new_int_from_uint(data->reverse_play_in_progress); break; // converting from uint8_t; + case MP_QSTR_run_round: dest[0] = mp_obj_new_int_from_uint(data->run_round); break; // converting from uint8_t; + case MP_QSTR_start_cb_called: dest[0] = mp_obj_new_int_from_uint(data->start_cb_called); break; // converting from uint8_t; + case MP_QSTR_early_apply: dest[0] = mp_obj_new_int_from_uint(data->early_apply); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -6941,165 +6879,186 @@ static void mp_lv_grad_dsc_params_linear_t_attr(mp_obj_t self_in, qstr attr, mp_ // store attribute switch(attr) { - case MP_QSTR_start: data->start = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_grad_dsc_params_linear_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_grad_dsc_params_linear_t"); -} - -static const mp_obj_dict_t mp_lv_grad_dsc_params_linear_t_locals_dict; - + case MP_QSTR_var: data->var = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_exec_cb: data->exec_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_exec_xcb_t; + case MP_QSTR_custom_exec_cb: data->custom_exec_cb = mp_lv_callback(dest[1], lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_custom_exec_cb_t; + case MP_QSTR_start_cb: data->start_cb = mp_lv_callback(dest[1], lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_start_cb_t; + case MP_QSTR_completed_cb: data->completed_cb = mp_lv_callback(dest[1], lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_completed_cb_t; + case MP_QSTR_deleted_cb: data->deleted_cb = mp_lv_callback(dest[1], lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_deleted_cb_t; + case MP_QSTR_get_value_cb: data->get_value_cb = mp_lv_callback(dest[1], lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_get_value_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_start_value: data->start_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_current_value: data->current_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_end_value: data->end_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_duration: data->duration = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_act_time: data->act_time = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_reverse_delay: data->reverse_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_reverse_duration: data->reverse_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_repeat_delay: data->repeat_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_repeat_cnt: data->repeat_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_parameter: data->parameter = mp_write_lv_anim_parameter_t(dest[1]); break; // converting to lv_anim_parameter_t; + case MP_QSTR_last_timer_run: data->last_timer_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pause_time: data->pause_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_pause_duration: data->pause_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_is_paused: data->is_paused = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_reverse_play_in_progress: data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_run_round: data->run_round = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_start_cb_called: data->start_cb_called = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_early_apply: data->early_apply = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_anim_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_anim_t"); +} + +static const mp_obj_dict_t mp_lv_anim_t_locals_dict; + static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_linear_t_type, - MP_QSTR_lv_grad_dsc_params_linear_t, + mp_lv_anim_t_type, + MP_QSTR_lv_anim_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_linear_t_print, + print, mp_lv_anim_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_linear_t_attr, - locals_dict, &mp_lv_grad_dsc_params_linear_t_locals_dict, + attr, mp_lv_anim_t_attr, + locals_dict, &mp_lv_anim_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void) { - return &mp_lv_grad_dsc_params_linear_t_type; + return &mp_lv_anim_t_type; } -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->radial ) lv_grad_dsc_params_radial_t; /* - * Struct lv_grad_dsc_params_radial_t + * lvgl extension definition for: + * void lv_obj_delete_anim_completed_cb(lv_anim_t *a) */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_radial_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_delete_anim_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_radial_t_type())); - return (lv_grad_dsc_params_radial_t*)self->data; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + ((void (*)(lv_anim_t *))lv_func_ptr)(a); + return mp_const_none; } -#define mp_write_lv_grad_dsc_params_radial_t(struct_obj) *((lv_grad_dsc_params_radial_t*)mp_write_ptr_lv_grad_dsc_params_radial_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_radial_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_delete_anim_completed_cb_mpobj, 1, mp_lv_obj_delete_anim_completed_cb, lv_obj_delete_anim_completed_cb); + +/* Reusing lv_obj_move_foreground for lv_obj_delete_async */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_async_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete_async); + + +/* + * lvgl extension definition for: + * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) + */ + +static mp_obj_t mp_lv_obj_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_radial_t_type(), field); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_obj_t *parent = mp_to_lv(mp_args[1]); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(obj, parent); + return mp_const_none; } -#define mp_read_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_radial_t))) -#define mp_read_byref_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(&field) + -static void mp_lv_grad_dsc_params_radial_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)self->data; +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_parent_mpobj, 2, mp_lv_obj_set_parent, lv_obj_set_parent); + +/* Reusing lv_obj_set_parent for lv_obj_swap */ - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_focal: dest[0] = mp_read_byref_lv_point_t(data->focal); break; // converting from lv_point_t; - case MP_QSTR_focal_extent: dest[0] = mp_read_byref_lv_point_t(data->focal_extent); break; // converting from lv_point_t; - case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; - case MP_QSTR_end_extent: dest[0] = mp_read_byref_lv_point_t(data->end_extent); break; // converting from lv_point_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_focal: data->focal = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_focal_extent: data->focal_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_end_extent: data->end_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_swap_mpobj, 2, mp_lv_obj_set_parent, lv_obj_swap); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) + */ -static void mp_lv_grad_dsc_params_radial_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_move_to_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_grad_dsc_params_radial_t"); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t index = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, index); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_grad_dsc_params_radial_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_radial_t_type, - MP_QSTR_lv_grad_dsc_params_radial_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_radial_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_radial_t_attr, - locals_dict, &mp_lv_grad_dsc_params_radial_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_index_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_move_to_index); + -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void) +/* + * lvgl extension definition for: + * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_get_screen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_grad_dsc_params_radial_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return lv_to_mp((void*)_res); } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_screen_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_screen); -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->conical ) lv_grad_dsc_params_conical_t; /* - * Struct lv_grad_dsc_params_conical_t + * Struct lv_image_header_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_conical_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_conical_t_type())); - return (lv_grad_dsc_params_conical_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); + return (lv_image_header_t*)self->data; } -#define mp_write_lv_grad_dsc_params_conical_t(struct_obj) *((lv_grad_dsc_params_conical_t*)mp_write_ptr_lv_grad_dsc_params_conical_t(struct_obj)) +#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_conical_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_conical_t_type(), field); + return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); } -#define mp_read_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_conical_t))) -#define mp_read_byref_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(&field) +#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) +#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) -static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)self->data; + GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_center: dest[0] = mp_read_byref_lv_point_t(data->center); break; // converting from lv_point_t; - case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int16_t; - case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int16_t; + case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; + case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; + case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; + case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; + case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7108,9 +7067,13 @@ static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp // store attribute switch(attr) { - case MP_QSTR_center: data->center = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; - case MP_QSTR_start_angle: data->start_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_end_angle: data->end_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -7119,154 +7082,129 @@ static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp } } -static void mp_lv_grad_dsc_params_conical_t_print(const mp_print_t *print, +static void mp_lv_image_header_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_grad_dsc_params_conical_t"); + mp_printf(print, "struct lv_image_header_t"); } -static const mp_obj_dict_t mp_lv_grad_dsc_params_conical_t_locals_dict; +static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_conical_t_type, - MP_QSTR_lv_grad_dsc_params_conical_t, + mp_lv_image_header_t_type, + MP_QSTR_lv_image_header_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_conical_t_print, + print, mp_lv_image_header_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_conical_t_attr, - locals_dict, &mp_lv_grad_dsc_params_conical_t_locals_dict, + attr, mp_lv_image_header_t_attr, + locals_dict, &mp_lv_image_header_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) { - return &mp_lv_grad_dsc_params_conical_t_type; + return &mp_lv_image_header_t_type; } +#define funcptr_lv_draw_buf_malloc_cb_t NULL + /* - * Struct lv_grad_dsc_params_t + * lvgl extension definition for: + * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_t(mp_obj_t self_in) +static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_t_type())); - return (lv_grad_dsc_params_t*)self->data; + size_t size = (size_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); + return ptr_to_mp((void*)_res); } -#define mp_write_lv_grad_dsc_params_t(struct_obj) *((lv_grad_dsc_params_t*)mp_write_ptr_lv_grad_dsc_params_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_grad_dsc_params_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -#define mp_read_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_t))) -#define mp_read_byref_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(&field) -static void mp_lv_grad_dsc_params_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)self->data; +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' + * lv_draw_buf_malloc_cb_t buf_malloc_cb + */ + +#define funcptr_lv_draw_buf_free_cb_t NULL - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_linear: dest[0] = mp_read_byref_lv_grad_dsc_params_linear_t(data->linear); break; // converting from lv_grad_dsc_params_linear_t; - case MP_QSTR_radial: dest[0] = mp_read_byref_lv_grad_dsc_params_radial_t(data->radial); break; // converting from lv_grad_dsc_params_radial_t; - case MP_QSTR_conical: dest[0] = mp_read_byref_lv_grad_dsc_params_conical_t(data->conical); break; // converting from lv_grad_dsc_params_conical_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_linear: data->linear = mp_write_lv_grad_dsc_params_linear_t(dest[1]); break; // converting to lv_grad_dsc_params_linear_t; - case MP_QSTR_radial: data->radial = mp_write_lv_grad_dsc_params_radial_t(dest[1]); break; // converting to lv_grad_dsc_params_radial_t; - case MP_QSTR_conical: data->conical = mp_write_lv_grad_dsc_params_conical_t(dest[1]); break; // converting to lv_grad_dsc_params_conical_t; - default: return; - } - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * void lv_draw_buf_free_cb_t(void *draw_buf) + */ -static void mp_lv_grad_dsc_params_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_grad_dsc_params_t"); + void *draw_buf = mp_to_ptr(mp_args[0]); + ((void (*)(void *))lv_func_ptr)(draw_buf); + return mp_const_none; } -static const mp_obj_dict_t mp_lv_grad_dsc_params_t_locals_dict; + -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_params_t_type, - MP_QSTR_lv_grad_dsc_params_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_params_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_params_t_attr, - locals_dict, &mp_lv_grad_dsc_params_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void) -{ - return &mp_lv_grad_dsc_params_t_type; -} + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' + * lv_draw_buf_free_cb_t buf_free_cb + */ +#define funcptr_lv_draw_buf_copy_cb_t NULL + /* - * Struct lv_grad_dsc_t + * Struct lv_area_t */ -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_t_type())); - return (lv_grad_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); + return (lv_area_t*)self->data; } -#define mp_write_lv_grad_dsc_t(struct_obj) *((lv_grad_dsc_t*)mp_write_ptr_lv_grad_dsc_t(struct_obj)) +#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) { - return lv_to_mp_struct(get_mp_lv_grad_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_area_t_type(), field); } -#define mp_read_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(copy_buffer(&field, sizeof(lv_grad_dsc_t))) -#define mp_read_byref_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(&field) +#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) +#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) -static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_grad_dsc_t *data = (lv_grad_dsc_t*)self->data; + GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_stops: dest[0] = mp_lv_struct_array_new(self_in, data->stops, 2, sizeof(lv_grad_stop_t), mp_read_ptr_lv_grad_stop_t, mp_write_ptr_lv_grad_stop_t); break; // converting from lv_grad_stop_t [2]; - case MP_QSTR_stops_count: dest[0] = mp_obj_new_int_from_uint(data->stops_count); break; // converting from uint8_t; - case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_grad_dir_t; - case MP_QSTR_extend: dest[0] = mp_obj_new_int(data->extend); break; // converting from lv_grad_extend_t; - case MP_QSTR_params: dest[0] = mp_read_byref_lv_grad_dsc_params_t(data->params); break; // converting from lv_grad_dsc_params_t; - case MP_QSTR_state: dest[0] = ptr_to_mp((void*)data->state); break; // converting from void *; + case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; + case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; + case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; + case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7275,12 +7213,10 @@ static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_stops: mp_lv_struct_array_assign(data->stops, 2, sizeof(lv_grad_stop_t), mp_write_ptr_lv_grad_stop_t, dest[1]); break; // converting to lv_grad_stop_t [2]; - case MP_QSTR_stops_count: data->stops_count = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_dir_t; - case MP_QSTR_extend: data->extend = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_extend_t; - case MP_QSTR_params: data->params = mp_write_lv_grad_dsc_params_t(dest[1]); break; // converting to lv_grad_dsc_params_t; - case MP_QSTR_state: data->state = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -7289,240 +7225,296 @@ static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_grad_dsc_t_print(const mp_print_t *print, +static void mp_lv_area_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_grad_dsc_t"); + mp_printf(print, "struct lv_area_t"); } -static const mp_obj_dict_t mp_lv_grad_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_area_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_grad_dsc_t_type, - MP_QSTR_lv_grad_dsc_t, + mp_lv_area_t_type, + MP_QSTR_lv_area_t, MP_TYPE_FLAG_NONE, - print, mp_lv_grad_dsc_t_print, + print, mp_lv_area_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_grad_dsc_t_attr, - locals_dict, &mp_lv_grad_dsc_t_locals_dict, + attr, mp_lv_area_t_attr, + locals_dict, &mp_lv_area_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) { - return &mp_lv_grad_dsc_t_type; + return &mp_lv_area_t_type; } /* * lvgl extension definition for: - * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) */ -static mp_obj_t mp_lv_obj_get_style_bg_grad_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_grad_dsc_t * _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_grad_dsc_t((void*)_res); + lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_internal_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' + * lv_draw_buf_copy_cb_t buf_copy_cb + */ +#define funcptr_lv_draw_buf_align_cb_t NULL + /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bg_image_src_internal(const lv_obj_t *obj, lv_part_t part) + * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_src_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const void * _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + void *buf = mp_to_ptr(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' + * lv_draw_buf_align_cb_t align_pointer_cb + */ -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa_internal */ +#define funcptr_lv_draw_buf_cache_operation_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa_internal); - /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_bg_image_tiled_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ -static mp_obj_t mp_lv_obj_get_style_bg_image_tiled_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return convert_to_bool(_res); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width_internal */ +#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width_internal); - /* * lvgl extension definition for: - * inline static lv_border_side_t lv_obj_get_style_border_side_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_obj_get_style_border_side_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_border_side_t _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_internal_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_internal */ +#define funcptr_lv_draw_buf_clear_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered_internal */ +#define funcptr_dispatch_cb NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad_internal */ +/* + * lvgl extension definition for: + * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width_internal */ +static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_layer_t *layer = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' + * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + */ -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_internal */ +#define funcptr_evaluate_cb NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa_internal */ +/* + * lvgl extension definition for: + * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + */ + +static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + lv_draw_task_t *task = mp_to_ptr(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa_internal); + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa_internal); + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' + * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + */ -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_internal */ +#define funcptr_wait_for_finish_cb NULL + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_internal); +/* + * lvgl extension definition for: + * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) + */ + +static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered_internal); + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' + * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) + */ -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' + * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) + */ +#define funcptr_event_cb NULL + /* - * Struct lv_image_colorkey_t + * Struct lv_event_t */ -static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_colorkey_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_colorkey_t_type())); - return (lv_image_colorkey_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); + return (lv_event_t*)self->data; } -#define mp_write_lv_image_colorkey_t(struct_obj) *((lv_image_colorkey_t*)mp_write_ptr_lv_image_colorkey_t(struct_obj)) +#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_colorkey_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_colorkey_t_type(), field); + return lv_to_mp_struct(get_mp_lv_event_t_type(), field); } -#define mp_read_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(copy_buffer(&field, sizeof(lv_image_colorkey_t))) -#define mp_read_byref_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(&field) +#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) +#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) -static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_colorkey_t *data = (lv_image_colorkey_t*)self->data; + GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_low: dest[0] = mp_read_byref_lv_color_t(data->low); break; // converting from lv_color_t; - case MP_QSTR_high: dest[0] = mp_read_byref_lv_color_t(data->high); break; // converting from lv_color_t; + case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; + case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; + case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; + case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; + case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; + case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; + case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; + case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7531,8 +7523,16 @@ static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_low: data->low = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_high: data->high = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; + case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -7541,153 +7541,100 @@ static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_image_colorkey_t_print(const mp_print_t *print, +static void mp_lv_event_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_colorkey_t"); + mp_printf(print, "struct lv_event_t"); } -static const mp_obj_dict_t mp_lv_image_colorkey_t_locals_dict; +static const mp_obj_dict_t mp_lv_event_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_colorkey_t_type, - MP_QSTR_lv_image_colorkey_t, + mp_lv_event_t_type, + MP_QSTR_lv_event_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_colorkey_t_print, + print, mp_lv_event_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_colorkey_t_attr, - locals_dict, &mp_lv_image_colorkey_t_locals_dict, + attr, mp_lv_event_t_attr, + locals_dict, &mp_lv_event_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) { - return &mp_lv_image_colorkey_t_type; + return &mp_lv_event_t_type; } /* * lvgl extension definition for: - * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey_internal(const lv_obj_t *obj, lv_part_t part) + * void event_cb(lv_event_t *event) */ -static mp_obj_t mp_lv_obj_get_style_image_colorkey_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_image_colorkey_t * _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_image_colorkey_t((void*)_res); + lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); + ((void (*)(lv_event_t *))lv_func_ptr)(event); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_internal_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap_internal); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width_internal); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa_internal); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered_internal */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa_internal); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' + * void (*event_cb)(lv_event_t *event) + */ -#define funcptr_get_glyph_dsc NULL - -typedef __typeof__( ((lv_font_glyph_dsc_t*)(0))->gid ) lv_font_glyph_dsc_gid_t; /* - * Struct lv_font_glyph_dsc_gid_t + * Struct lv_draw_unit_t */ -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_gid_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_gid_t_type())); - return (lv_font_glyph_dsc_gid_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); + return (lv_draw_unit_t*)self->data; } -#define mp_write_lv_font_glyph_dsc_gid_t(struct_obj) *((lv_font_glyph_dsc_gid_t*)mp_write_ptr_lv_font_glyph_dsc_gid_t(struct_obj)) +#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_gid_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) { - return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_gid_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); } -#define mp_read_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_gid_t))) -#define mp_read_byref_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(&field) +#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) +#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) -static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)self->data; + GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_index: dest[0] = mp_obj_new_int_from_uint(data->index); break; // converting from uint32_t; - case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; + case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7696,8 +7643,14 @@ static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ // store attribute switch(attr) { - case MP_QSTR_index: data->index = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); + case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); + case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); + case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); default: return; } @@ -7706,79 +7659,78 @@ static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_ } } -static void mp_lv_font_glyph_dsc_gid_t_print(const mp_print_t *print, +static void mp_lv_draw_unit_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_glyph_dsc_gid_t"); + mp_printf(print, "struct lv_draw_unit_t"); } -static const mp_obj_dict_t mp_lv_font_glyph_dsc_gid_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_glyph_dsc_gid_t_type, - MP_QSTR_lv_font_glyph_dsc_gid_t, + mp_lv_draw_unit_t_type, + MP_QSTR_lv_draw_unit_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_glyph_dsc_gid_t_print, + print, mp_lv_draw_unit_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_glyph_dsc_gid_t_attr, - locals_dict, &mp_lv_font_glyph_dsc_gid_t_locals_dict, + attr, mp_lv_draw_unit_t_attr, + locals_dict, &mp_lv_draw_unit_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) { - return &mp_lv_font_glyph_dsc_gid_t_type; + return &mp_lv_draw_unit_t_type; } /* - * Struct lv_font_glyph_dsc_t + * Struct lv_draw_task_t */ -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); - return (lv_font_glyph_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); + return (lv_draw_task_t*)self->data; } -#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) +#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) { - return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); } -#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) -#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) +#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) +#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) -static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; + GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; - case MP_QSTR_entry: dest[0] = ptr_to_mp((void*)data->entry); break; // converting from void *; - case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; - case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; - case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; - case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; - case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; - case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; - case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; - case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; - case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; - case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; + case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; + case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; + case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; + case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; + case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; + case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; + case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; + case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; + case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7787,19 +7739,18 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d // store attribute switch(attr) { - case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_entry: data->entry = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; - case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; - case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; + case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; + case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -7808,98 +7759,70 @@ static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *d } } -static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, +static void mp_lv_draw_task_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_glyph_dsc_t"); + mp_printf(print, "struct lv_draw_task_t"); } -static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_glyph_dsc_t_type, - MP_QSTR_lv_font_glyph_dsc_t, + mp_lv_draw_task_t_type, + MP_QSTR_lv_draw_task_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_glyph_dsc_t_print, + print, mp_lv_draw_task_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_glyph_dsc_t_attr, - locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, + attr, mp_lv_draw_task_t_attr, + locals_dict, &mp_lv_draw_task_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) -{ - return &mp_lv_font_glyph_dsc_t_type; -} - - -/* - * lvgl extension definition for: - * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) - */ - -static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) { - const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(font, dsc_out, letter, letter_next); - return convert_to_bool(_res); + return &mp_lv_draw_task_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } - -static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); -#define funcptr_get_glyph_bitmap NULL - /* - * Struct lv_image_header_t + * Struct lv_color32_t */ -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_header_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_header_t_type())); - return (lv_image_header_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); + return (lv_color32_t*)self->data; } -#define mp_write_lv_image_header_t(struct_obj) *((lv_image_header_t*)mp_write_ptr_lv_image_header_t(struct_obj)) +#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_header_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) { - return lv_to_mp_struct(get_mp_lv_image_header_t_type(), field); + return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); } -#define mp_read_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(copy_buffer(&field, sizeof(lv_image_header_t))) -#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) +#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) +#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) -static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_image_header_t *data = (lv_image_header_t*)self->data; + GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_magic: dest[0] = mp_obj_new_int_from_uint(data->magic); break; // converting from uint32_t; - case MP_QSTR_cf: dest[0] = mp_obj_new_int_from_uint(data->cf); break; // converting from uint32_t; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; - case MP_QSTR_w: dest[0] = mp_obj_new_int_from_uint(data->w); break; // converting from uint32_t; - case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint32_t; - case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint32_t; - case MP_QSTR_reserved_2: dest[0] = mp_obj_new_int_from_uint(data->reserved_2); break; // converting from uint32_t; + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; + case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -7908,13 +7831,10 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des // store attribute switch(attr) { - case MP_QSTR_magic: data->magic = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_cf: data->cf = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_w: data->w = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_h: data->h = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride: data->stride = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_reserved_2: data->reserved_2 = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -7923,129 +7843,81 @@ static void mp_lv_image_header_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *des } } -static void mp_lv_image_header_t_print(const mp_print_t *print, +static void mp_lv_color32_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_image_header_t"); + mp_printf(print, "struct lv_color32_t"); } -static const mp_obj_dict_t mp_lv_image_header_t_locals_dict; +static const mp_obj_dict_t mp_lv_color32_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_image_header_t_type, - MP_QSTR_lv_image_header_t, + mp_lv_color32_t_type, + MP_QSTR_lv_color32_t, MP_TYPE_FLAG_NONE, - print, mp_lv_image_header_t_print, + print, mp_lv_color32_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_image_header_t_attr, - locals_dict, &mp_lv_image_header_t_locals_dict, + attr, mp_lv_color32_t_attr, + locals_dict, &mp_lv_color32_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_image_header_t_type(void) -{ - return &mp_lv_image_header_t_type; -} - -#define funcptr_lv_draw_buf_malloc_cb_t NULL - - -/* - * lvgl extension definition for: - * void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_malloc_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - size_t size = (size_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(size_t, lv_color_format_t))lv_func_ptr)(size, color_format); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_malloc_cb_t, funcptr_lv_draw_buf_malloc_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_malloc_cb_callback' - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ - -#define funcptr_lv_draw_buf_free_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_draw_buf_free_cb_t(void *draw_buf) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_free_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) { - void *draw_buf = mp_to_ptr(mp_args[0]); - ((void (*)(void *))lv_func_ptr)(draw_buf); - return mp_const_none; + return &mp_lv_color32_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_free_cb_t_mpobj, 1, mp_funcptr_lv_draw_buf_free_cb_t, funcptr_lv_draw_buf_free_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_free_cb_callback' - * lv_draw_buf_free_cb_t buf_free_cb - */ -#define funcptr_lv_draw_buf_copy_cb_t NULL - /* - * Struct lv_area_t + * Struct lv_layer_t */ -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_area_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_area_t_type())); - return (lv_area_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); + return (lv_layer_t*)self->data; } -#define mp_write_lv_area_t(struct_obj) *((lv_area_t*)mp_write_ptr_lv_area_t(struct_obj)) +#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_area_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_area_t_type(), field); + return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); } -#define mp_read_lv_area_t(field) mp_read_ptr_lv_area_t(copy_buffer(&field, sizeof(lv_area_t))) -#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) +#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) +#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) -static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_area_t *data = (lv_area_t*)self->data; + GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int32_t; - case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int32_t; - case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int32_t; - case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int32_t; + case MP_QSTR_draw_buf: dest[0] = ptr_to_mp((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; + case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; + case MP_QSTR_display: dest[0] = ptr_to_mp((void*)data->display); break; // converting from lv_display_t *; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; + case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; + case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; + case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; + case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; + case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_buffer_owned: dest[0] = convert_to_bool(data->buffer_owned); break; // converting from bool; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8054,10 +7926,21 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_x1: data->x1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y1: data->y1 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_x2: data->x2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_y2: data->y2 = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; + case MP_QSTR_display: data->display = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_buffer_owned: data->buffer_owned = mp_obj_is_true(dest[1]); break; // converting to bool; default: return; } @@ -8066,296 +7949,191 @@ static void mp_lv_area_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_area_t_print(const mp_print_t *print, +static void mp_lv_layer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_area_t"); + mp_printf(print, "struct lv_layer_t"); } -static const mp_obj_dict_t mp_lv_area_t_locals_dict; +static const mp_obj_dict_t mp_lv_layer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_area_t_type, - MP_QSTR_lv_area_t, + mp_lv_layer_t_type, + MP_QSTR_lv_layer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_area_t_print, + print, mp_lv_layer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_area_t_attr, - locals_dict, &mp_lv_area_t_locals_dict, + attr, mp_lv_layer_t_attr, + locals_dict, &mp_lv_layer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_area_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) { - return &mp_lv_area_t_type; + return &mp_lv_layer_t_type; } /* * lvgl extension definition for: - * void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ -static mp_obj_t mp_funcptr_lv_draw_buf_copy_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_buf_clear_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *dest = mp_to_ptr(mp_args[0]); - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_to_ptr(mp_args[2]); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(dest, dest_area, src, src_area); + lv_draw_buf_t *draw_buf = mp_to_ptr(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_func_ptr)(draw_buf, a, layer); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, funcptr_lv_draw_buf_copy_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, funcptr_lv_draw_buf_clear_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } /* * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_copy_cb_callback' - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - -#define funcptr_lv_draw_buf_align_cb_t NULL - - -/* - * lvgl extension definition for: - * void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_clear_cb_callback' + * lv_draw_buf_clear_cb_t buf_clear_cb */ - -static mp_obj_t mp_funcptr_lv_draw_buf_align_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *buf = mp_to_ptr(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - void * _res = ((void *(*)(void *, lv_color_format_t))lv_func_ptr)(buf, color_format); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_align_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_align_cb_t, funcptr_lv_draw_buf_align_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_align_pointer_cb_callback' - * lv_draw_buf_align_cb_t align_pointer_cb + * Struct lv_draw_buf_handlers_t */ - -#define funcptr_lv_draw_buf_cache_operation_cb_t NULL +static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void); -/* - * lvgl extension definition for: - * void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - */ - -static mp_obj_t mp_funcptr_lv_draw_buf_cache_operation_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_handlers_t(mp_obj_t self_in) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, area); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_handlers_t_type())); + return (lv_draw_buf_handlers_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, funcptr_lv_draw_buf_cache_operation_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_invalidate_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_flush_cache_cb_callback' - * lv_draw_buf_cache_operation_cb_t flush_cache_cb - */ - -#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL - - -/* - * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) - */ +#define mp_write_lv_draw_buf_handlers_t(struct_obj) *((lv_draw_buf_handlers_t*)mp_write_ptr_lv_draw_buf_handlers_t(struct_obj)) -static mp_obj_t mp_funcptr_lv_draw_buf_width_to_stride_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_handlers_t(void *field) { - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_func_ptr)(w, color_format); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp_struct(get_mp_lv_draw_buf_handlers_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, 2, mp_funcptr_lv_draw_buf_width_to_stride_cb_t, funcptr_lv_draw_buf_width_to_stride_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_width_to_stride_cb_callback' - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ - -#define funcptr_lv_draw_buf_clear_cb_t NULL - -#define funcptr_dispatch_cb NULL - - -/* - * lvgl extension definition for: - * int32_t dispatch_cb(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ +#define mp_read_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) +#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) -static mp_obj_t mp_funcptr_dispatch_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_layer_t *layer = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_layer_t *))lv_func_ptr)(draw_unit, layer); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_dispatch_cb_mpobj, 2, mp_funcptr_dispatch_cb, funcptr_dispatch_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_dispatch_cb_callback' - * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) - */ - -#define funcptr_evaluate_cb NULL + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)self->data; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_buf_malloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, data->buf_malloc_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL); break; // converting from callback lv_draw_buf_malloc_cb_t; + case MP_QSTR_buf_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, data->buf_free_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL); break; // converting from callback lv_draw_buf_free_cb_t; + case MP_QSTR_buf_copy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, data->buf_copy_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL); break; // converting from callback lv_draw_buf_copy_cb_t; + case MP_QSTR_align_pointer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, data->align_pointer_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL); break; // converting from callback lv_draw_buf_align_cb_t; + case MP_QSTR_invalidate_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->invalidate_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_flush_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->flush_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_width_to_stride_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, data->width_to_stride_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL); break; // converting from callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, data->buf_clear_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL); break; // converting from callback lv_draw_buf_clear_cb_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_buf_malloc_cb: data->buf_malloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_malloc_cb_t; + case MP_QSTR_buf_free_cb: data->buf_free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_free_cb_t; + case MP_QSTR_buf_copy_cb: data->buf_copy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_copy_cb_t; + case MP_QSTR_align_pointer_cb: data->align_pointer_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_align_cb_t; + case MP_QSTR_invalidate_cache_cb: data->invalidate_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_flush_cache_cb: data->flush_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; + case MP_QSTR_width_to_stride_cb: data->width_to_stride_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_width_to_stride_cb_t; + case MP_QSTR_buf_clear_cb: data->buf_clear_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_clear_cb_t; + default: return; + } -/* - * lvgl extension definition for: - * int32_t evaluate_cb(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_funcptr_evaluate_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_draw_buf_handlers_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - lv_draw_task_t *task = mp_to_ptr(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *, lv_draw_task_t *))lv_func_ptr)(draw_unit, task); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_draw_buf_handlers_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_evaluate_cb_mpobj, 2, mp_funcptr_evaluate_cb, funcptr_evaluate_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_evaluate_cb_callback' - * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) - */ - -#define funcptr_wait_for_finish_cb NULL - +static const mp_obj_dict_t mp_lv_draw_buf_handlers_t_locals_dict; -/* - * lvgl extension definition for: - * int32_t wait_for_finish_cb(lv_draw_unit_t *draw_unit) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_draw_buf_handlers_t_type, + MP_QSTR_lv_draw_buf_handlers_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_draw_buf_handlers_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_draw_buf_handlers_t_attr, + locals_dict, &mp_lv_draw_buf_handlers_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_funcptr_wait_for_finish_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void) { - lv_draw_unit_t *draw_unit = mp_to_ptr(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_draw_unit_t *))lv_func_ptr)(draw_unit); - return mp_obj_new_int(_res); + return &mp_lv_draw_buf_handlers_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_wait_for_finish_cb_mpobj, 1, mp_funcptr_wait_for_finish_cb, funcptr_wait_for_finish_cb); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_wait_for_finish_cb_callback' - * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) - */ - - -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_delete_cb_callback' - * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) - */ -#define funcptr_event_cb NULL - /* - * Struct lv_event_t + * Struct lv_draw_buf_t */ -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_event_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_event_t_type())); - return (lv_event_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_t_type())); + return (lv_draw_buf_t*)self->data; } -#define mp_write_lv_event_t(struct_obj) *((lv_event_t*)mp_write_ptr_lv_event_t(struct_obj)) +#define mp_write_lv_draw_buf_t(struct_obj) *((lv_draw_buf_t*)mp_write_ptr_lv_draw_buf_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_event_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_t(void *field) { - return lv_to_mp_struct(get_mp_lv_event_t_type(), field); + return lv_to_mp_struct(get_mp_lv_draw_buf_t_type(), field); } -#define mp_read_lv_event_t(field) mp_read_ptr_lv_event_t(copy_buffer(&field, sizeof(lv_event_t))) -#define mp_read_byref_lv_event_t(field) mp_read_ptr_lv_event_t(&field) +#define mp_read_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(copy_buffer(&field, sizeof(lv_draw_buf_t))) +#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) -static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_event_t *data = (lv_event_t*)self->data; + GENMPY_UNUSED lv_draw_buf_t *data = (lv_draw_buf_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_current_target: dest[0] = ptr_to_mp((void*)data->current_target); break; // converting from void *; - case MP_QSTR_original_target: dest[0] = ptr_to_mp((void*)data->original_target); break; // converting from void *; - case MP_QSTR_code: dest[0] = mp_obj_new_int(data->code); break; // converting from lv_event_code_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_param: dest[0] = ptr_to_mp((void*)data->param); break; // converting from void *; - case MP_QSTR_prev: dest[0] = ptr_to_mp((void*)data->prev); break; // converting from lv_event_t *; - case MP_QSTR_deleted: dest[0] = mp_obj_new_int_from_uint(data->deleted); break; // converting from uint8_t; - case MP_QSTR_stop_processing: dest[0] = mp_obj_new_int_from_uint(data->stop_processing); break; // converting from uint8_t; - case MP_QSTR_stop_bubbling: dest[0] = mp_obj_new_int_from_uint(data->stop_bubbling); break; // converting from uint8_t; - case MP_QSTR_stop_trickling: dest[0] = mp_obj_new_int_from_uint(data->stop_trickling); break; // converting from uint8_t; + case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; + case MP_QSTR_data_size: dest[0] = mp_obj_new_int_from_uint(data->data_size); break; // converting from uint32_t; + case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; + case MP_QSTR_unaligned_data: dest[0] = ptr_to_mp((void*)data->unaligned_data); break; // converting from void *; + case MP_QSTR_handlers: dest[0] = mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); break; // converting from lv_draw_buf_handlers_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8364,16 +8142,11 @@ static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_current_target: data->current_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_original_target: data->original_target = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_code: data->code = (int)mp_obj_get_int(dest[1]); break; // converting to lv_event_code_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_param: data->param = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_prev: data->prev = (void*)mp_to_ptr(dest[1]); break; // converting to lv_event_t *; - case MP_QSTR_deleted: data->deleted = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_processing: data->stop_processing = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_bubbling: data->stop_bubbling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_stop_trickling: data->stop_trickling = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; + case MP_QSTR_data_size: data->data_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; + case MP_QSTR_unaligned_data: data->unaligned_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_handlers: data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(dest[1]); break; // converting to lv_draw_buf_handlers_t *; default: return; } @@ -8382,100 +8155,139 @@ static void mp_lv_event_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_event_t_print(const mp_print_t *print, +static void mp_lv_draw_buf_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_event_t"); + mp_printf(print, "struct lv_draw_buf_t"); } -static const mp_obj_dict_t mp_lv_event_t_locals_dict; +static const mp_obj_dict_t mp_lv_draw_buf_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_event_t_type, - MP_QSTR_lv_event_t, + mp_lv_draw_buf_t_type, + MP_QSTR_lv_draw_buf_t, MP_TYPE_FLAG_NONE, - print, mp_lv_event_t_print, + print, mp_lv_draw_buf_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_event_t_attr, - locals_dict, &mp_lv_event_t_locals_dict, + attr, mp_lv_draw_buf_t_attr, + locals_dict, &mp_lv_draw_buf_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_event_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void) { - return &mp_lv_event_t_type; + return &mp_lv_draw_buf_t_type; } +#define funcptr_lv_display_flush_cb_t NULL + /* * lvgl extension definition for: - * void event_cb(lv_event_t *event) + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) */ -static mp_obj_t mp_funcptr_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *event = mp_write_ptr_lv_event_t(mp_args[0]); - ((void (*)(lv_event_t *))lv_func_ptr)(event); + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); + ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_mpobj, 1, mp_funcptr_event_cb, funcptr_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); +#define funcptr_lv_display_flush_wait_cb_t NULL /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_unit_t_event_cb_callback' - * void (*event_cb)(lv_event_t *event) + * lvgl extension definition for: + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ + +static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_to_ptr(mp_args[0]); + ((void (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); +#define funcptr_lv_display_sync_cb_t NULL + + +/* + * lvgl extension definition for: + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) */ + +static mp_obj_t mp_funcptr_lv_display_sync_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_to_ptr(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_sync_cb_t_mpobj, 2, mp_funcptr_lv_display_sync_cb_t, funcptr_lv_display_sync_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); +static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); /* - * Struct lv_draw_unit_t + * Struct lv_ll_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_unit_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_unit_t_type())); - return (lv_draw_unit_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); + return (lv_ll_t*)self->data; } -#define mp_write_lv_draw_unit_t(struct_obj) *((lv_draw_unit_t*)mp_write_ptr_lv_draw_unit_t(struct_obj)) +#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_unit_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_unit_t_type(), field); + return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); } -#define mp_read_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(copy_buffer(&field, sizeof(lv_draw_unit_t))) -#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) +#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) +#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) -static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_unit_t *data = (lv_draw_unit_t*)self->data; + GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_unit_t *; - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_idx: dest[0] = mp_obj_new_int(data->idx); break; // converting from int32_t; - case MP_QSTR_dispatch_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_dispatch_cb_mpobj, (void*)data->dispatch_cb, NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_evaluate_cb_mpobj, (void*)data->evaluate_cb, NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->wait_for_finish_cb, NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_wait_for_finish_cb_mpobj, (void*)data->delete_cb, NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL); break; // converting from callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_mpobj, (void*)data->event_cb, NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL); break; // converting from callback void (*)(lv_event_t *event); + case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; + case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; + case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -8484,14 +8296,9 @@ static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_idx: data->idx = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dispatch_cb: data->dispatch_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_dispatch_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_layer_t *layer); - case MP_QSTR_evaluate_cb: data->evaluate_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_evaluate_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task); - case MP_QSTR_wait_for_finish_cb: data->wait_for_finish_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_wait_for_finish_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_delete_cb: data->delete_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_delete_cb, NULL, NULL, NULL, NULL); break; // converting to callback int32_t (*)(lv_draw_unit_t *draw_unit); - case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_unit_t_event_cb, NULL, NULL, NULL, NULL); break; // converting to callback void (*)(lv_event_t *event); + case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; + case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; default: return; } @@ -8500,289 +8307,37 @@ static void mp_lv_draw_unit_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_draw_unit_t_print(const mp_print_t *print, +static void mp_lv_ll_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_unit_t"); + mp_printf(print, "struct lv_ll_t"); } -static const mp_obj_dict_t mp_lv_draw_unit_t_locals_dict; +static const mp_obj_dict_t mp_lv_ll_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_unit_t_type, - MP_QSTR_lv_draw_unit_t, + mp_lv_ll_t_type, + MP_QSTR_lv_ll_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_unit_t_print, + print, mp_lv_ll_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_unit_t_attr, - locals_dict, &mp_lv_draw_unit_t_locals_dict, + attr, mp_lv_ll_t_attr, + locals_dict, &mp_lv_ll_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_unit_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) { - return &mp_lv_draw_unit_t_type; + return &mp_lv_ll_t_type; } /* - * Struct lv_draw_task_t - */ - -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_task_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_task_t_type())); - return (lv_draw_task_t*)self->data; -} - -#define mp_write_lv_draw_task_t(struct_obj) *((lv_draw_task_t*)mp_write_ptr_lv_draw_task_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_task_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_draw_task_t_type(), field); -} - -#define mp_read_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(copy_buffer(&field, sizeof(lv_draw_task_t))) -#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) - -static void mp_lv_draw_task_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_task_t *data = (lv_draw_task_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_draw_task_t *; - case MP_QSTR_type: dest[0] = mp_obj_new_int(data->type); break; // converting from lv_draw_task_type_t; - case MP_QSTR_area: dest[0] = mp_read_byref_lv_area_t(data->area); break; // converting from lv_area_t; - case MP_QSTR__real_area: dest[0] = mp_read_byref_lv_area_t(data->_real_area); break; // converting from lv_area_t; - case MP_QSTR_clip_area: dest[0] = mp_read_byref_lv_area_t(data->clip_area); break; // converting from lv_area_t; - case MP_QSTR_target_layer: dest[0] = ptr_to_mp((void*)data->target_layer); break; // converting from lv_layer_t *; - case MP_QSTR_draw_unit: dest[0] = mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); break; // converting from lv_draw_unit_t *; - case MP_QSTR_state: dest[0] = mp_obj_new_int(data->state); break; // converting from int; - case MP_QSTR_draw_dsc: dest[0] = ptr_to_mp((void*)data->draw_dsc); break; // converting from void *; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: dest[0] = mp_obj_new_int_from_uint(data->preferred_draw_unit_id); break; // converting from uint8_t; - case MP_QSTR_preference_score: dest[0] = mp_obj_new_int_from_uint(data->preference_score); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_type: data->type = (int)mp_obj_get_int(dest[1]); break; // converting to lv_draw_task_type_t; - case MP_QSTR_area: data->area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__real_area: data->_real_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_clip_area: data->clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_target_layer: data->target_layer = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_draw_unit: data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(dest[1]); break; // converting to lv_draw_unit_t *; - case MP_QSTR_state: data->state = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_draw_dsc: data->draw_dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_preferred_draw_unit_id: data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_preference_score: data->preference_score = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_draw_task_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_draw_task_t"); -} - -static const mp_obj_dict_t mp_lv_draw_task_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_task_t_type, - MP_QSTR_lv_draw_task_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_task_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_task_t_attr, - locals_dict, &mp_lv_draw_task_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_draw_task_t_type(void) -{ - return &mp_lv_draw_task_t_type; -} - -#define funcptr_lv_display_flush_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) - */ - -static mp_obj_t mp_funcptr_lv_display_flush_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - uint8_t *px_map = mp_array_to_u8ptr(mp_args[2]); - ((void (*)(lv_display_t *, const lv_area_t *, uint8_t *))lv_func_ptr)(disp, area, px_map); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_cb_t_mpobj, 3, mp_funcptr_lv_display_flush_cb_t, funcptr_lv_display_flush_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); -#define funcptr_lv_display_flush_wait_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_display_flush_wait_cb_t(lv_display_t *disp) - */ - -static mp_obj_t mp_funcptr_lv_display_flush_wait_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_to_ptr(mp_args[0]); - ((void (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_flush_wait_cb_t_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, funcptr_lv_display_flush_wait_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); -#define funcptr_lv_display_sync_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) - */ - -static mp_obj_t mp_funcptr_lv_display_sync_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_to_ptr(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_display_t *, const lv_area_t *))lv_func_ptr)(disp, area); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_display_sync_cb_t_mpobj, 2, mp_funcptr_lv_display_sync_cb_t, funcptr_lv_display_sync_cb_t); - -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); -static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); - -/* - * Struct lv_ll_t - */ - -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_ll_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_ll_t_type())); - return (lv_ll_t*)self->data; -} - -#define mp_write_lv_ll_t(struct_obj) *((lv_ll_t*)mp_write_ptr_lv_ll_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_ll_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_ll_t_type(), field); -} - -#define mp_read_lv_ll_t(field) mp_read_ptr_lv_ll_t(copy_buffer(&field, sizeof(lv_ll_t))) -#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) - -static void mp_lv_ll_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_ll_t *data = (lv_ll_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_n_size: dest[0] = mp_obj_new_int_from_uint(data->n_size); break; // converting from uint32_t; - case MP_QSTR_head: dest[0] = ptr_to_mp((void*)data->head); break; // converting from lv_ll_node_t *; - case MP_QSTR_tail: dest[0] = ptr_to_mp((void*)data->tail); break; // converting from lv_ll_node_t *; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_n_size: data->n_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_head: data->head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; - case MP_QSTR_tail: data->tail = (void*)mp_to_ptr(dest[1]); break; // converting to lv_ll_node_t *; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_ll_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_ll_t"); -} - -static const mp_obj_dict_t mp_lv_ll_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_ll_t_type, - MP_QSTR_lv_ll_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_ll_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_ll_t_attr, - locals_dict, &mp_lv_ll_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_ll_t_type(void) -{ - return &mp_lv_ll_t_type; -} - - -/* - * Array convertors for lv_area_t [32] + * Array convertors for lv_area_t [32] */ GENMPY_UNUSED static lv_area_t *mp_arr_to_lv_area_t___32__(mp_obj_t mp_arr) @@ -8850,8 +8405,6 @@ GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t___32__(uint8_t *arr) return mp_obj_new_list(32, obj_arr); // TODO: return custom iterable object! } -/* Already started generating lv_draw_buf_t! skipping field '_static_buf1' */ -/* Already started generating lv_draw_buf_t! skipping field '_static_buf2' */ /* * Struct lv_array_t @@ -9045,46 +8598,39 @@ GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_theme_apply_cb_t(void *fun static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); /* - * Struct lv_theme_t + * Struct lv_color_t */ -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_color_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); - return (lv_theme_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_t_type())); + return (lv_color_t*)self->data; } -#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) +#define mp_write_lv_color_t(struct_obj) *((lv_color_t*)mp_write_ptr_lv_color_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_t(void *field) { - return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); + return lv_to_mp_struct(get_mp_lv_color_t_type(), field); } -#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) -#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) +#define mp_read_lv_color_t(field) mp_read_ptr_lv_color_t(copy_buffer(&field, sizeof(lv_color_t))) +#define mp_read_byref_lv_color_t(field) mp_read_ptr_lv_color_t(&field) -static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_color_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; + GENMPY_UNUSED lv_color_t *data = (lv_color_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; - case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; - case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; - case MP_QSTR_font_small: dest[0] = ptr_to_mp((void*)data->font_small); break; // converting from lv_font_t *; - case MP_QSTR_font_normal: dest[0] = ptr_to_mp((void*)data->font_normal); break; // converting from lv_font_t *; - case MP_QSTR_font_large: dest[0] = ptr_to_mp((void*)data->font_large); break; // converting from lv_font_t *; - case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; + case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; + case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; + case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9093,16 +8639,9 @@ static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; - case MP_QSTR_font_small: data->font_small = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_normal: data->font_normal = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_font_large: data->font_large = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; - case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -9111,95 +8650,71 @@ static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_theme_t_print(const mp_print_t *print, +static void mp_lv_color_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_theme_t"); + mp_printf(print, "struct lv_color_t"); } -static const mp_obj_dict_t mp_lv_theme_t_locals_dict; +static const mp_obj_dict_t mp_lv_color_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_theme_t_type, - MP_QSTR_lv_theme_t, + mp_lv_color_t_type, + MP_QSTR_lv_color_t, MP_TYPE_FLAG_NONE, - print, mp_lv_theme_t_print, + print, mp_lv_color_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_theme_t_attr, - locals_dict, &mp_lv_theme_t_locals_dict, + attr, mp_lv_color_t_attr, + locals_dict, &mp_lv_color_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) -{ - return &mp_lv_theme_t_type; -} - -#define funcptr_lv_timer_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_timer_cb_t(lv_timer_t *) - */ - -static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_color_t_type(void) { - lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); - ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); - return mp_const_none; + return &mp_lv_color_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +#define funcptr_get_glyph_dsc NULL -static void lv_timer_t_timer_cb_callback(lv_timer_t *); +typedef __typeof__( ((lv_font_glyph_dsc_t*)(0))->gid ) lv_font_glyph_dsc_gid_t; /* - * Struct lv_timer_t + * Struct lv_font_glyph_dsc_gid_t */ -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_gid_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); - return (lv_timer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_gid_t_type())); + return (lv_font_glyph_dsc_gid_t*)self->data; } -#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) +#define mp_write_lv_font_glyph_dsc_gid_t(struct_obj) *((lv_font_glyph_dsc_gid_t*)mp_write_ptr_lv_font_glyph_dsc_gid_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_gid_t(void *field) { - return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_gid_t_type(), field); } -#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) -#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) +#define mp_read_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_gid_t))) +#define mp_read_byref_lv_font_glyph_dsc_gid_t(field) mp_read_ptr_lv_font_glyph_dsc_gid_t(&field) -static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_font_glyph_dsc_gid_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; + GENMPY_UNUSED lv_font_glyph_dsc_gid_t *data = (lv_font_glyph_dsc_gid_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; - case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; - case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; - case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; - case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; + case MP_QSTR_index: dest[0] = mp_obj_new_int_from_uint(data->index); break; // converting from uint32_t; + case MP_QSTR_src: dest[0] = ptr_to_mp((void*)data->src); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9208,13 +8723,8 @@ static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_index: data->index = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_src: data->src = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -9223,119 +8733,79 @@ static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_timer_t_print(const mp_print_t *print, +static void mp_lv_font_glyph_dsc_gid_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_timer_t"); + mp_printf(print, "struct lv_font_glyph_dsc_gid_t"); } -static const mp_obj_dict_t mp_lv_timer_t_locals_dict; +static const mp_obj_dict_t mp_lv_font_glyph_dsc_gid_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_timer_t_type, - MP_QSTR_lv_timer_t, + mp_lv_font_glyph_dsc_gid_t_type, + MP_QSTR_lv_font_glyph_dsc_gid_t, MP_TYPE_FLAG_NONE, - print, mp_lv_timer_t_print, + print, mp_lv_font_glyph_dsc_gid_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_timer_t_attr, - locals_dict, &mp_lv_timer_t_locals_dict, + attr, mp_lv_font_glyph_dsc_gid_t_attr, + locals_dict, &mp_lv_font_glyph_dsc_gid_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_gid_t_type(void) { - return &mp_lv_timer_t_type; + return &mp_lv_font_glyph_dsc_gid_t_type; } /* - * Struct lv_display_t + * Struct lv_font_glyph_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_glyph_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); - return (lv_display_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_glyph_dsc_t_type())); + return (lv_font_glyph_dsc_t*)self->data; } -#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) +#define mp_write_lv_font_glyph_dsc_t(struct_obj) *((lv_font_glyph_dsc_t*)mp_write_ptr_lv_font_glyph_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_glyph_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_display_t_type(), field); + return lv_to_mp_struct(get_mp_lv_font_glyph_dsc_t_type(), field); } -#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) -#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) +#define mp_read_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(copy_buffer(&field, sizeof(lv_font_glyph_dsc_t))) +#define mp_read_byref_lv_font_glyph_dsc_t(field) mp_read_ptr_lv_font_glyph_dsc_t(&field) -static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_font_glyph_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; + GENMPY_UNUSED lv_font_glyph_dsc_t *data = (lv_font_glyph_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; - case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; - case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; - case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; - case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; - case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; - case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; - case MP_QSTR_buf_1: dest[0] = ptr_to_mp((void*)data->buf_1); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_2: dest[0] = ptr_to_mp((void*)data->buf_2); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_3: dest[0] = ptr_to_mp((void*)data->buf_3); break; // converting from lv_draw_buf_t *; - case MP_QSTR_buf_act: dest[0] = ptr_to_mp((void*)data->buf_act); break; // converting from lv_draw_buf_t *; - case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; - case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; - case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; - case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; - case MP_QSTR_sync_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, data->sync_cb, lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, data->user_data); break; // converting from callback lv_display_sync_cb_t; - case MP_QSTR_sync_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, data->user_data); break; // converting from callback lv_display_sync_wait_cb_t; - case MP_QSTR_syncing: dest[0] = mp_obj_new_int(data->syncing); break; // converting from int; - case MP_QSTR_syncing_last: dest[0] = mp_obj_new_int(data->syncing_last); break; // converting from int; - case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; - case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; - case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; - case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; - case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; - case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; - case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; - case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; - case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; - case MP_QSTR_layer_head: dest[0] = ptr_to_mp((void*)data->layer_head); break; // converting from lv_layer_t *; - case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; - case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; - case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; - case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; - case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; - case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; - case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; - case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; - case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; - case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; - case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; - case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; - case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; - case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; - case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; - case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; - case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; - case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; + case MP_QSTR_resolved_font: dest[0] = ptr_to_mp((void*)data->resolved_font); break; // converting from lv_font_t *; + case MP_QSTR_entry: dest[0] = ptr_to_mp((void*)data->entry); break; // converting from void *; + case MP_QSTR_gid: dest[0] = mp_read_byref_lv_font_glyph_dsc_gid_t(data->gid); break; // converting from lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: dest[0] = mp_obj_new_int(data->format); break; // converting from lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: dest[0] = mp_obj_new_int(data->outline_stroke_width); break; // converting from int32_t; + case MP_QSTR_adv_w: dest[0] = mp_obj_new_int_from_uint(data->adv_w); break; // converting from uint16_t; + case MP_QSTR_box_w: dest[0] = mp_obj_new_int_from_uint(data->box_w); break; // converting from uint16_t; + case MP_QSTR_box_h: dest[0] = mp_obj_new_int_from_uint(data->box_h); break; // converting from uint16_t; + case MP_QSTR_ofs_x: dest[0] = mp_obj_new_int(data->ofs_x); break; // converting from int16_t; + case MP_QSTR_ofs_y: dest[0] = mp_obj_new_int(data->ofs_y); break; // converting from int16_t; + case MP_QSTR_stride: dest[0] = mp_obj_new_int_from_uint(data->stride); break; // converting from uint16_t; + case MP_QSTR_is_placeholder: dest[0] = mp_obj_new_int_from_uint(data->is_placeholder); break; // converting from uint8_t; + case MP_QSTR_req_raw_bitmap: dest[0] = mp_obj_new_int_from_uint(data->req_raw_bitmap); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9344,59 +8814,19 @@ static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_buf_1: data->buf_1 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_2: data->buf_2 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_3: data->buf_3 = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_buf_act: data->buf_act = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; - case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; - case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_sync_cb: data->sync_cb = mp_lv_callback(dest[1], lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_cb_t; - case MP_QSTR_sync_wait_cb: data->sync_wait_cb = mp_lv_callback(dest[1], lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_wait_cb_t; - case MP_QSTR_syncing: data->syncing = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_syncing_last: data->syncing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; - case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; - case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; - case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; - case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; - case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_layer_head: data->layer_head = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; - case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; - case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; - case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; - case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; - case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_resolved_font: data->resolved_font = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_entry: data->entry = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_gid: data->gid = mp_write_lv_font_glyph_dsc_gid_t(dest[1]); break; // converting to lv_font_glyph_dsc_gid_t; + case MP_QSTR_format: data->format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_font_glyph_format_t; + case MP_QSTR_outline_stroke_width: data->outline_stroke_width = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_adv_w: data->adv_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_w: data->box_w = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_box_h: data->box_h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_ofs_x: data->ofs_x = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_ofs_y: data->ofs_y = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_stride: data->stride = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_is_placeholder: data->is_placeholder = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_req_raw_bitmap: data->req_raw_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -9405,70 +8835,156 @@ static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_display_t_print(const mp_print_t *print, +static void mp_lv_font_glyph_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_display_t"); + mp_printf(print, "struct lv_font_glyph_dsc_t"); } -static const mp_obj_dict_t mp_lv_display_t_locals_dict; +static const mp_obj_dict_t mp_lv_font_glyph_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_display_t_type, - MP_QSTR_lv_display_t, + mp_lv_font_glyph_dsc_t_type, + MP_QSTR_lv_font_glyph_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_display_t_print, + print, mp_lv_font_glyph_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_display_t_attr, - locals_dict, &mp_lv_display_t_locals_dict, + attr, mp_lv_font_glyph_dsc_t_attr, + locals_dict, &mp_lv_font_glyph_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_font_glyph_dsc_t_type(void) { - return &mp_lv_display_t_type; + return &mp_lv_font_glyph_dsc_t_type; } /* - * Struct lv_color32_t + * lvgl extension definition for: + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void); +static mp_obj_t mp_funcptr_get_glyph_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_func_ptr)(font, dsc_out, letter, letter_next); + return convert_to_bool(_res); +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color32_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, funcptr_get_glyph_dsc); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, func, NULL, MP_QSTR_, NULL); } + +static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); +#define funcptr_get_glyph_bitmap NULL + + +/* + * lvgl extension definition for: + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + */ + +static mp_obj_t mp_funcptr_get_glyph_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color32_t_type())); - return (lv_color32_t*)self->data; + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(g_dsc, draw_buf); + return ptr_to_mp((void*)_res); } -#define mp_write_lv_color32_t(struct_obj) *((lv_color32_t*)mp_write_ptr_lv_color32_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color32_t(void *field) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, funcptr_get_glyph_bitmap); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, func, NULL, MP_QSTR_, NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_t_get_glyph_bitmap_callback' + * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + */ + +#define funcptr_release_glyph NULL + + +/* + * lvgl extension definition for: + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) + */ + +static mp_obj_t mp_funcptr_release_glyph(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_color32_t_type(), field); + const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(font, g_dsc); + return mp_const_none; } -#define mp_read_lv_color32_t(field) mp_read_ptr_lv_color32_t(copy_buffer(&field, sizeof(lv_color32_t))) -#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) + -static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_release_glyph_mpobj, 2, mp_funcptr_release_glyph, funcptr_release_glyph); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + +/* + * Struct lv_font_t + */ + +static inline const mp_obj_type_t *get_mp_lv_font_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_t_type())); + return (lv_font_t*)self->data; +} + +#define mp_write_lv_font_t(struct_obj) *((lv_font_t*)mp_write_ptr_lv_font_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_font_t_type(), field); +} + +#define mp_read_lv_font_t(field) mp_read_ptr_lv_font_t(copy_buffer(&field, sizeof(lv_font_t))) +#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) + +static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color32_t *data = (lv_color32_t*)self->data; + GENMPY_UNUSED lv_font_t *data = (lv_font_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_blue: dest[0] = mp_obj_new_int_from_uint(data->blue); break; // converting from uint8_t; - case MP_QSTR_green: dest[0] = mp_obj_new_int_from_uint(data->green); break; // converting from uint8_t; - case MP_QSTR_red: dest[0] = mp_obj_new_int_from_uint(data->red); break; // converting from uint8_t; - case MP_QSTR_alpha: dest[0] = mp_obj_new_int_from_uint(data->alpha); break; // converting from uint8_t; + case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; + case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + case MP_QSTR_line_height: dest[0] = mp_obj_new_int(data->line_height); break; // converting from int32_t; + case MP_QSTR_base_line: dest[0] = mp_obj_new_int(data->base_line); break; // converting from int32_t; + case MP_QSTR_cap_height: dest[0] = mp_obj_new_int(data->cap_height); break; // converting from int32_t; + case MP_QSTR_x_height: dest[0] = mp_obj_new_int(data->x_height); break; // converting from int32_t; + case MP_QSTR_subpx: dest[0] = mp_obj_new_int_from_uint(data->subpx); break; // converting from uint8_t; + case MP_QSTR_kerning: dest[0] = mp_obj_new_int_from_uint(data->kerning); break; // converting from uint8_t; + case MP_QSTR_static_bitmap: dest[0] = mp_obj_new_int_from_uint(data->static_bitmap); break; // converting from uint8_t; + case MP_QSTR_underline_position: dest[0] = mp_obj_new_int(data->underline_position); break; // converting from int8_t; + case MP_QSTR_underline_thickness: dest[0] = mp_obj_new_int(data->underline_thickness); break; // converting from int8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9477,10 +8993,21 @@ static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_blue: data->blue = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_green: data->green = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_red: data->red = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_alpha: data->alpha = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); + case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); + case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); + case MP_QSTR_line_height: data->line_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_base_line: data->base_line = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_cap_height: data->cap_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_x_height: data->x_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_subpx: data->subpx = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_kerning: data->kerning = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_static_bitmap: data->static_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_underline_position: data->underline_position = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; + case MP_QSTR_underline_thickness: data->underline_thickness = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; default: return; } @@ -9489,81 +9016,76 @@ static void mp_lv_color32_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_color32_t_print(const mp_print_t *print, +static void mp_lv_font_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color32_t"); + mp_printf(print, "struct lv_font_t"); } -static const mp_obj_dict_t mp_lv_color32_t_locals_dict; +static const mp_obj_dict_t mp_lv_font_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color32_t_type, - MP_QSTR_lv_color32_t, + mp_lv_font_t_type, + MP_QSTR_lv_font_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color32_t_print, + print, mp_lv_font_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color32_t_attr, - locals_dict, &mp_lv_color32_t_locals_dict, + attr, mp_lv_font_t_attr, + locals_dict, &mp_lv_font_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color32_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_font_t_type(void) { - return &mp_lv_color32_t_type; + return &mp_lv_font_t_type; } /* - * Struct lv_layer_t + * Struct lv_theme_t */ -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_layer_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_theme_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_layer_t_type())); - return (lv_layer_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_theme_t_type())); + return (lv_theme_t*)self->data; } -#define mp_write_lv_layer_t(struct_obj) *((lv_layer_t*)mp_write_ptr_lv_layer_t(struct_obj)) +#define mp_write_lv_theme_t(struct_obj) *((lv_theme_t*)mp_write_ptr_lv_theme_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_layer_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_theme_t(void *field) { - return lv_to_mp_struct(get_mp_lv_layer_t_type(), field); + return lv_to_mp_struct(get_mp_lv_theme_t_type(), field); } -#define mp_read_lv_layer_t(field) mp_read_ptr_lv_layer_t(copy_buffer(&field, sizeof(lv_layer_t))) -#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) +#define mp_read_lv_theme_t(field) mp_read_ptr_lv_theme_t(copy_buffer(&field, sizeof(lv_theme_t))) +#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) -static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_theme_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_layer_t *data = (lv_layer_t*)self->data; + GENMPY_UNUSED lv_theme_t *data = (lv_theme_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_draw_buf: dest[0] = ptr_to_mp((void*)data->draw_buf); break; // converting from lv_draw_buf_t *; - case MP_QSTR_draw_task_head: dest[0] = mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); break; // converting from lv_draw_task_t *; - case MP_QSTR_display: dest[0] = mp_read_ptr_lv_display_t((void*)data->display); break; // converting from lv_display_t *; - case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_layer_t *; - case MP_QSTR_next: dest[0] = ptr_to_mp((void*)data->next); break; // converting from lv_layer_t *; + case MP_QSTR_apply_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_theme_apply_cb_t_mpobj, data->apply_cb, lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, data->user_data); break; // converting from callback lv_theme_apply_cb_t; + case MP_QSTR_parent: dest[0] = ptr_to_mp((void*)data->parent); break; // converting from lv_theme_t *; case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_buf_area: dest[0] = mp_read_byref_lv_area_t(data->buf_area); break; // converting from lv_area_t; - case MP_QSTR_phy_clip_area: dest[0] = mp_read_byref_lv_area_t(data->phy_clip_area); break; // converting from lv_area_t; - case MP_QSTR__clip_area: dest[0] = mp_read_byref_lv_area_t(data->_clip_area); break; // converting from lv_area_t; - case MP_QSTR_partial_y_offset: dest[0] = mp_obj_new_int(data->partial_y_offset); break; // converting from int32_t; - case MP_QSTR_recolor: dest[0] = mp_read_byref_lv_color32_t(data->recolor); break; // converting from lv_color32_t; - case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; - case MP_QSTR_all_tasks_added: dest[0] = convert_to_bool(data->all_tasks_added); break; // converting from bool; - case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; - case MP_QSTR_buffer_owned: dest[0] = convert_to_bool(data->buffer_owned); break; // converting from bool; + case MP_QSTR_disp: dest[0] = ptr_to_mp((void*)data->disp); break; // converting from lv_display_t *; + case MP_QSTR_color_primary: dest[0] = mp_read_byref_lv_color_t(data->color_primary); break; // converting from lv_color_t; + case MP_QSTR_color_secondary: dest[0] = mp_read_byref_lv_color_t(data->color_secondary); break; // converting from lv_color_t; + case MP_QSTR_font_small: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_small); break; // converting from lv_font_t *; + case MP_QSTR_font_normal: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_normal); break; // converting from lv_font_t *; + case MP_QSTR_font_large: dest[0] = mp_read_ptr_lv_font_t((void*)data->font_large); break; // converting from lv_font_t *; + case MP_QSTR_flags: dest[0] = mp_obj_new_int_from_uint(data->flags); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9572,21 +9094,16 @@ static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_draw_buf: data->draw_buf = (void*)mp_to_ptr(dest[1]); break; // converting to lv_draw_buf_t *; - case MP_QSTR_draw_task_head: data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(dest[1]); break; // converting to lv_draw_task_t *; - case MP_QSTR_display: data->display = (void*)mp_write_ptr_lv_display_t(dest[1]); break; // converting to lv_display_t *; - case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; - case MP_QSTR_next: data->next = (void*)mp_to_ptr(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_apply_cb: data->apply_cb = mp_lv_callback(dest[1], lv_theme_t_apply_cb_callback ,MP_QSTR_lv_theme_t_apply_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_theme_apply_cb_t; + case MP_QSTR_parent: data->parent = (void*)mp_to_ptr(dest[1]); break; // converting to lv_theme_t *; case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_buf_area: data->buf_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_phy_clip_area: data->phy_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR__clip_area: data->_clip_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; - case MP_QSTR_partial_y_offset: data->partial_y_offset = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_recolor: data->recolor = mp_write_lv_color32_t(dest[1]); break; // converting to lv_color32_t; - case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; - case MP_QSTR_all_tasks_added: data->all_tasks_added = mp_obj_is_true(dest[1]); break; // converting to bool; - case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; - case MP_QSTR_buffer_owned: data->buffer_owned = mp_obj_is_true(dest[1]); break; // converting to bool; + case MP_QSTR_disp: data->disp = (void*)mp_to_ptr(dest[1]); break; // converting to lv_display_t *; + case MP_QSTR_color_primary: data->color_primary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_color_secondary: data->color_secondary = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_font_small: data->font_small = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_normal: data->font_normal = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_font_large: data->font_large = (void*)mp_write_ptr_lv_font_t(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_flags: data->flags = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -9595,102 +9112,95 @@ static void mp_lv_layer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_layer_t_print(const mp_print_t *print, +static void mp_lv_theme_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_layer_t"); + mp_printf(print, "struct lv_theme_t"); } -static const mp_obj_dict_t mp_lv_layer_t_locals_dict; +static const mp_obj_dict_t mp_lv_theme_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_layer_t_type, - MP_QSTR_lv_layer_t, + mp_lv_theme_t_type, + MP_QSTR_lv_theme_t, MP_TYPE_FLAG_NONE, - print, mp_lv_layer_t_print, + print, mp_lv_theme_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_layer_t_attr, - locals_dict, &mp_lv_layer_t_locals_dict, + attr, mp_lv_theme_t_attr, + locals_dict, &mp_lv_theme_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_layer_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_theme_t_type(void) { - return &mp_lv_layer_t_type; + return &mp_lv_theme_t_type; } +#define funcptr_lv_timer_cb_t NULL + /* * lvgl extension definition for: - * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_timer_cb_t(lv_timer_t *) */ -static mp_obj_t mp_funcptr_lv_draw_buf_clear_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_timer_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_to_ptr(mp_args[0]); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[2]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_func_ptr)(draw_buf, a, layer); + lv_timer_t *arg0 = mp_to_ptr(mp_args[0]); + ((void (*)(lv_timer_t *))lv_func_ptr)(arg0); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, funcptr_lv_draw_buf_clear_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_timer_cb_t_mpobj, 1, mp_funcptr_lv_timer_cb_t, funcptr_lv_timer_cb_t); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_draw_buf_handlers_t_buf_clear_cb_callback' - * lv_draw_buf_clear_cb_t buf_clear_cb - */ - +static void lv_timer_t_timer_cb_callback(lv_timer_t *); /* - * Struct lv_draw_buf_handlers_t + * Struct lv_timer_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_handlers_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_timer_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_handlers_t_type())); - return (lv_draw_buf_handlers_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_timer_t_type())); + return (lv_timer_t*)self->data; } -#define mp_write_lv_draw_buf_handlers_t(struct_obj) *((lv_draw_buf_handlers_t*)mp_write_ptr_lv_draw_buf_handlers_t(struct_obj)) +#define mp_write_lv_timer_t(struct_obj) *((lv_timer_t*)mp_write_ptr_lv_timer_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_handlers_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_timer_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_buf_handlers_t_type(), field); + return lv_to_mp_struct(get_mp_lv_timer_t_type(), field); } -#define mp_read_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) -#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) +#define mp_read_lv_timer_t(field) mp_read_ptr_lv_timer_t(copy_buffer(&field, sizeof(lv_timer_t))) +#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) -static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_timer_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)self->data; + GENMPY_UNUSED lv_timer_t *data = (lv_timer_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_buf_malloc_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_malloc_cb_t_mpobj, data->buf_malloc_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL); break; // converting from callback lv_draw_buf_malloc_cb_t; - case MP_QSTR_buf_free_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_free_cb_t_mpobj, data->buf_free_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL); break; // converting from callback lv_draw_buf_free_cb_t; - case MP_QSTR_buf_copy_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_copy_cb_t_mpobj, data->buf_copy_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL); break; // converting from callback lv_draw_buf_copy_cb_t; - case MP_QSTR_align_pointer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_align_cb_t_mpobj, data->align_pointer_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL); break; // converting from callback lv_draw_buf_align_cb_t; - case MP_QSTR_invalidate_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->invalidate_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_flush_cache_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_cache_operation_cb_t_mpobj, data->flush_cache_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL); break; // converting from callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_width_to_stride_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_width_to_stride_cb_t_mpobj, data->width_to_stride_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL); break; // converting from callback lv_draw_buf_width_to_stride_cb_t; - case MP_QSTR_buf_clear_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_draw_buf_clear_cb_t_mpobj, data->buf_clear_cb, NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL); break; // converting from callback lv_draw_buf_clear_cb_t; + case MP_QSTR_period: dest[0] = mp_obj_new_int_from_uint(data->period); break; // converting from uint32_t; + case MP_QSTR_last_run: dest[0] = mp_obj_new_int_from_uint(data->last_run); break; // converting from uint32_t; + case MP_QSTR_timer_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_timer_cb_t_mpobj, data->timer_cb, lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, data->user_data); break; // converting from callback lv_timer_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_repeat_count: dest[0] = mp_obj_new_int(data->repeat_count); break; // converting from int32_t; + case MP_QSTR_paused: dest[0] = mp_obj_new_int(data->paused); break; // converting from int; + case MP_QSTR_auto_delete: dest[0] = mp_obj_new_int_from_uint(data->auto_delete); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9699,14 +9209,13 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_buf_malloc_cb: data->buf_malloc_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_malloc_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_malloc_cb_t; - case MP_QSTR_buf_free_cb: data->buf_free_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_free_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_free_cb_t; - case MP_QSTR_buf_copy_cb: data->buf_copy_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_copy_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_copy_cb_t; - case MP_QSTR_align_pointer_cb: data->align_pointer_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_align_pointer_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_align_cb_t; - case MP_QSTR_invalidate_cache_cb: data->invalidate_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_invalidate_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_flush_cache_cb: data->flush_cache_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_flush_cache_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_cache_operation_cb_t; - case MP_QSTR_width_to_stride_cb: data->width_to_stride_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_width_to_stride_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_width_to_stride_cb_t; - case MP_QSTR_buf_clear_cb: data->buf_clear_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_draw_buf_handlers_t_buf_clear_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_draw_buf_clear_cb_t; + case MP_QSTR_period: data->period = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_run: data->last_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_timer_cb: data->timer_cb = mp_lv_callback(dest[1], lv_timer_t_timer_cb_callback ,MP_QSTR_lv_timer_t_timer_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_timer_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_repeat_count: data->repeat_count = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_paused: data->paused = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_auto_delete: data->auto_delete = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -9715,71 +9224,121 @@ static void mp_lv_draw_buf_handlers_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_draw_buf_handlers_t_print(const mp_print_t *print, +static void mp_lv_timer_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_draw_buf_handlers_t"); + mp_printf(print, "struct lv_timer_t"); } -static const mp_obj_dict_t mp_lv_draw_buf_handlers_t_locals_dict; +static const mp_obj_dict_t mp_lv_timer_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_buf_handlers_t_type, - MP_QSTR_lv_draw_buf_handlers_t, + mp_lv_timer_t_type, + MP_QSTR_lv_timer_t, MP_TYPE_FLAG_NONE, - print, mp_lv_draw_buf_handlers_t_print, + print, mp_lv_timer_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_draw_buf_handlers_t_attr, - locals_dict, &mp_lv_draw_buf_handlers_t_locals_dict, + attr, mp_lv_timer_t_attr, + locals_dict, &mp_lv_timer_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_draw_buf_handlers_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_timer_t_type(void) { - return &mp_lv_draw_buf_handlers_t_type; + return &mp_lv_timer_t_type; } /* - * Struct lv_draw_buf_t + * Struct lv_display_t */ -static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_draw_buf_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_display_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_draw_buf_t_type())); - return (lv_draw_buf_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_display_t_type())); + return (lv_display_t*)self->data; } -#define mp_write_lv_draw_buf_t(struct_obj) *((lv_draw_buf_t*)mp_write_ptr_lv_draw_buf_t(struct_obj)) +#define mp_write_lv_display_t(struct_obj) *((lv_display_t*)mp_write_ptr_lv_display_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_draw_buf_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_display_t(void *field) { - return lv_to_mp_struct(get_mp_lv_draw_buf_t_type(), field); + return lv_to_mp_struct(get_mp_lv_display_t_type(), field); } -#define mp_read_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(copy_buffer(&field, sizeof(lv_draw_buf_t))) -#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) +#define mp_read_lv_display_t(field) mp_read_ptr_lv_display_t(copy_buffer(&field, sizeof(lv_display_t))) +#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) -static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_display_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_draw_buf_t *data = (lv_draw_buf_t*)self->data; + GENMPY_UNUSED lv_display_t *data = (lv_display_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_header: dest[0] = mp_read_byref_lv_image_header_t(data->header); break; // converting from lv_image_header_t; - case MP_QSTR_data_size: dest[0] = mp_obj_new_int_from_uint(data->data_size); break; // converting from uint32_t; - case MP_QSTR_data: dest[0] = mp_array_from_u8ptr((void*)data->data); break; // converting from uint8_t *; - case MP_QSTR_unaligned_data: dest[0] = ptr_to_mp((void*)data->unaligned_data); break; // converting from void *; - case MP_QSTR_handlers: dest[0] = mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); break; // converting from lv_draw_buf_handlers_t *; + case MP_QSTR_hor_res: dest[0] = mp_obj_new_int(data->hor_res); break; // converting from int32_t; + case MP_QSTR_ver_res: dest[0] = mp_obj_new_int(data->ver_res); break; // converting from int32_t; + case MP_QSTR_physical_hor_res: dest[0] = mp_obj_new_int(data->physical_hor_res); break; // converting from int32_t; + case MP_QSTR_physical_ver_res: dest[0] = mp_obj_new_int(data->physical_ver_res); break; // converting from int32_t; + case MP_QSTR_offset_x: dest[0] = mp_obj_new_int(data->offset_x); break; // converting from int32_t; + case MP_QSTR_offset_y: dest[0] = mp_obj_new_int(data->offset_y); break; // converting from int32_t; + case MP_QSTR_dpi: dest[0] = mp_obj_new_int_from_uint(data->dpi); break; // converting from uint32_t; + case MP_QSTR_buf_1: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_1); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_2: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_2); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_3: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_3); break; // converting from lv_draw_buf_t *; + case MP_QSTR_buf_act: dest[0] = mp_read_ptr_lv_draw_buf_t((void*)data->buf_act); break; // converting from lv_draw_buf_t *; + case MP_QSTR_flush_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_cb_t_mpobj, data->flush_cb, lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, data->user_data); break; // converting from callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, data->user_data); break; // converting from callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: dest[0] = mp_obj_new_int(data->flushing); break; // converting from int; + case MP_QSTR_flushing_last: dest[0] = mp_obj_new_int(data->flushing_last); break; // converting from int; + case MP_QSTR_last_area: dest[0] = mp_obj_new_int_from_uint(data->last_area); break; // converting from uint32_t; + case MP_QSTR_last_part: dest[0] = mp_obj_new_int_from_uint(data->last_part); break; // converting from uint32_t; + case MP_QSTR_sync_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_sync_cb_t_mpobj, data->sync_cb, lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, data->user_data); break; // converting from callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_display_flush_wait_cb_t_mpobj, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, data->user_data); break; // converting from callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: dest[0] = mp_obj_new_int(data->syncing); break; // converting from int; + case MP_QSTR_syncing_last: dest[0] = mp_obj_new_int(data->syncing_last); break; // converting from int; + case MP_QSTR_sync_areas: dest[0] = mp_read_byref_lv_ll_t(data->sync_areas); break; // converting from lv_ll_t; + case MP_QSTR_render_mode: dest[0] = mp_obj_new_int(data->render_mode); break; // converting from lv_display_render_mode_t; + case MP_QSTR_antialiasing: dest[0] = mp_obj_new_int_from_uint(data->antialiasing); break; // converting from uint32_t; + case MP_QSTR_tile_cnt: dest[0] = mp_obj_new_int_from_uint(data->tile_cnt); break; // converting from uint32_t; + case MP_QSTR_stride_is_auto: dest[0] = mp_obj_new_int_from_uint(data->stride_is_auto); break; // converting from uint32_t; + case MP_QSTR_rendering_in_progress: dest[0] = mp_obj_new_int_from_uint(data->rendering_in_progress); break; // converting from uint32_t; + case MP_QSTR_color_format: dest[0] = mp_obj_new_int(data->color_format); break; // converting from lv_color_format_t; + case MP_QSTR_inv_areas: dest[0] = mp_lv_struct_array_new(self_in, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_ptr_lv_area_t); break; // converting from lv_area_t [32]; + case MP_QSTR_inv_area_joined: dest[0] = mp_arr_from_uint8_t___32__(data->inv_area_joined); break; // converting from uint8_t [32]; + case MP_QSTR_inv_p: dest[0] = mp_obj_new_int_from_uint(data->inv_p); break; // converting from uint32_t; + case MP_QSTR_inv_en_cnt: dest[0] = mp_obj_new_int(data->inv_en_cnt); break; // converting from int32_t; + case MP_QSTR__static_buf1: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf1); break; // converting from lv_draw_buf_t; + case MP_QSTR__static_buf2: dest[0] = mp_read_byref_lv_draw_buf_t(data->_static_buf2); break; // converting from lv_draw_buf_t; + case MP_QSTR_layer_head: dest[0] = mp_read_ptr_lv_layer_t((void*)data->layer_head); break; // converting from lv_layer_t *; + case MP_QSTR_screens: dest[0] = ptr_to_mp((void*)data->screens); break; // converting from lv_obj_t **; + case MP_QSTR_sys_layer: dest[0] = lv_to_mp((void*)data->sys_layer); break; // converting from lv_obj_t *; + case MP_QSTR_top_layer: dest[0] = lv_to_mp((void*)data->top_layer); break; // converting from lv_obj_t *; + case MP_QSTR_act_scr: dest[0] = lv_to_mp((void*)data->act_scr); break; // converting from lv_obj_t *; + case MP_QSTR_bottom_layer: dest[0] = lv_to_mp((void*)data->bottom_layer); break; // converting from lv_obj_t *; + case MP_QSTR_prev_scr: dest[0] = lv_to_mp((void*)data->prev_scr); break; // converting from lv_obj_t *; + case MP_QSTR_scr_to_load: dest[0] = lv_to_mp((void*)data->scr_to_load); break; // converting from lv_obj_t *; + case MP_QSTR_screen_cnt: dest[0] = mp_obj_new_int_from_uint(data->screen_cnt); break; // converting from uint32_t; + case MP_QSTR_draw_prev_over_act: dest[0] = mp_obj_new_int_from_uint(data->draw_prev_over_act); break; // converting from uint8_t; + case MP_QSTR_del_prev: dest[0] = mp_obj_new_int_from_uint(data->del_prev); break; // converting from uint8_t; + case MP_QSTR_driver_data: dest[0] = ptr_to_mp((void*)data->driver_data); break; // converting from void *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_event_list: dest[0] = mp_read_byref_lv_event_list_t(data->event_list); break; // converting from lv_event_list_t; + case MP_QSTR_rotation: dest[0] = mp_obj_new_int_from_uint(data->rotation); break; // converting from uint32_t; + case MP_QSTR_matrix_rotation: dest[0] = mp_obj_new_int_from_uint(data->matrix_rotation); break; // converting from uint32_t; + case MP_QSTR_theme: dest[0] = mp_read_ptr_lv_theme_t((void*)data->theme); break; // converting from lv_theme_t *; + case MP_QSTR_refr_timer: dest[0] = mp_read_ptr_lv_timer_t((void*)data->refr_timer); break; // converting from lv_timer_t *; + case MP_QSTR_last_activity_time: dest[0] = mp_obj_new_int_from_uint(data->last_activity_time); break; // converting from uint32_t; + case MP_QSTR_refreshed_area: dest[0] = mp_read_byref_lv_area_t(data->refreshed_area); break; // converting from lv_area_t; + case MP_QSTR_vsync_count: dest[0] = mp_obj_new_int_from_uint(data->vsync_count); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9788,144 +9347,227 @@ static void mp_lv_draw_buf_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_header: data->header = mp_write_lv_image_header_t(dest[1]); break; // converting to lv_image_header_t; - case MP_QSTR_data_size: data->data_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_data: data->data = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to uint8_t *; - case MP_QSTR_unaligned_data: data->unaligned_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_handlers: data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(dest[1]); break; // converting to lv_draw_buf_handlers_t *; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_draw_buf_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_draw_buf_t"); -} - -static const mp_obj_dict_t mp_lv_draw_buf_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_draw_buf_t_type, - MP_QSTR_lv_draw_buf_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_draw_buf_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_draw_buf_t_attr, - locals_dict, &mp_lv_draw_buf_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_draw_buf_t_type(void) -{ - return &mp_lv_draw_buf_t_type; -} - - -/* - * lvgl extension definition for: - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + case MP_QSTR_hor_res: data->hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ver_res: data->ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_hor_res: data->physical_hor_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_physical_ver_res: data->physical_ver_res = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_x: data->offset_x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_offset_y: data->offset_y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_dpi: data->dpi = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_buf_1: data->buf_1 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_2: data->buf_2 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_3: data->buf_3 = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_buf_act: data->buf_act = (void*)mp_write_ptr_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t *; + case MP_QSTR_flush_cb: data->flush_cb = mp_lv_callback(dest[1], lv_display_t_flush_cb_callback ,MP_QSTR_lv_display_t_flush_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_cb_t; + case MP_QSTR_flush_wait_cb: data->flush_wait_cb = mp_lv_callback(dest[1], lv_display_t_flush_wait_cb_callback ,MP_QSTR_lv_display_t_flush_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_flush_wait_cb_t; + case MP_QSTR_flushing: data->flushing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_flushing_last: data->flushing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_last_area: data->last_area = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_last_part: data->last_part = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_sync_cb: data->sync_cb = mp_lv_callback(dest[1], lv_display_t_sync_cb_callback ,MP_QSTR_lv_display_t_sync_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_cb_t; + case MP_QSTR_sync_wait_cb: data->sync_wait_cb = mp_lv_callback(dest[1], lv_display_t_sync_wait_cb_callback ,MP_QSTR_lv_display_t_sync_wait_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_display_sync_wait_cb_t; + case MP_QSTR_syncing: data->syncing = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_syncing_last: data->syncing_last = (int)mp_obj_get_int(dest[1]); break; // converting to int; + case MP_QSTR_sync_areas: data->sync_areas = mp_write_lv_ll_t(dest[1]); break; // converting to lv_ll_t; + case MP_QSTR_render_mode: data->render_mode = (int)mp_obj_get_int(dest[1]); break; // converting to lv_display_render_mode_t; + case MP_QSTR_antialiasing: data->antialiasing = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_tile_cnt: data->tile_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_stride_is_auto: data->stride_is_auto = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_rendering_in_progress: data->rendering_in_progress = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_color_format: data->color_format = (int)mp_obj_get_int(dest[1]); break; // converting to lv_color_format_t; + case MP_QSTR_inv_areas: mp_lv_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_ptr_lv_area_t, dest[1]); break; // converting to lv_area_t [32]; + case MP_QSTR_inv_area_joined: memcpy((void*)&data->inv_area_joined, mp_arr_to_uint8_t___32__(dest[1]), sizeof(uint8_t)*32); break; // converting to uint8_t [32]; + case MP_QSTR_inv_p: data->inv_p = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_inv_en_cnt: data->inv_en_cnt = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR__static_buf1: data->_static_buf1 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; + case MP_QSTR__static_buf2: data->_static_buf2 = mp_write_lv_draw_buf_t(dest[1]); break; // converting to lv_draw_buf_t; + case MP_QSTR_layer_head: data->layer_head = (void*)mp_write_ptr_lv_layer_t(dest[1]); break; // converting to lv_layer_t *; + case MP_QSTR_screens: data->screens = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_t **; + case MP_QSTR_sys_layer: data->sys_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_top_layer: data->top_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_act_scr: data->act_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_bottom_layer: data->bottom_layer = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_prev_scr: data->prev_scr = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_scr_to_load: data->scr_to_load = (void*)mp_to_lv(dest[1]); break; // converting to lv_obj_t *; + case MP_QSTR_screen_cnt: data->screen_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_draw_prev_over_act: data->draw_prev_over_act = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_del_prev: data->del_prev = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_driver_data: data->driver_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_event_list: data->event_list = mp_write_lv_event_list_t(dest[1]); break; // converting to lv_event_list_t; + case MP_QSTR_rotation: data->rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_matrix_rotation: data->matrix_rotation = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_theme: data->theme = (void*)mp_write_ptr_lv_theme_t(dest[1]); break; // converting to lv_theme_t *; + case MP_QSTR_refr_timer: data->refr_timer = (void*)mp_write_ptr_lv_timer_t(dest[1]); break; // converting to lv_timer_t *; + case MP_QSTR_last_activity_time: data->last_activity_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_refreshed_area: data->refreshed_area = mp_write_lv_area_t(dest[1]); break; // converting to lv_area_t; + case MP_QSTR_vsync_count: data->vsync_count = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_display_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_display_t"); +} + +static const mp_obj_dict_t mp_lv_display_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_display_t_type, + MP_QSTR_lv_display_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_display_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_display_t_attr, + locals_dict, &mp_lv_display_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_display_t_type(void) +{ + return &mp_lv_display_t_type; +} + + +/* + * lvgl extension definition for: + * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_get_glyph_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_display(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *, lv_draw_buf_t *))lv_func_ptr)(g_dsc, draw_buf); - return ptr_to_mp((void*)_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_display_t * _res = ((lv_display_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_display_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, funcptr_get_glyph_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_display_mpobj, 1, mp_lv_obj_get_display, lv_obj_get_display); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_get_screen for lv_obj_get_parent */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_parent_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_parent); + /* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_font_t_get_glyph_bitmap_callback' - * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * lvgl extension definition for: + * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) */ + +static mp_obj_t mp_lv_obj_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); + return lv_to_mp((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_child); -#define funcptr_release_glyph NULL +#define funcptr_constructor_cb NULL /* * lvgl extension definition for: - * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) + * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_release_glyph(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_constructor_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_to_ptr(mp_args[0]); - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - ((void (*)(const lv_font_t *, lv_font_glyph_dsc_t *))lv_func_ptr)(font, g_dsc); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); + lv_obj_t *obj = mp_to_lv(mp_args[1]); + ((void (*)(const lv_obj_class_t *, lv_obj_t *))lv_func_ptr)(class_p, obj); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_release_glyph_mpobj, 2, mp_funcptr_release_glyph, funcptr_release_glyph); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_constructor_cb_mpobj, 2, mp_funcptr_constructor_cb, funcptr_constructor_cb); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, func, NULL, MP_QSTR_, NULL); } +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +#define funcptr_event_cb_1 NULL -static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); /* - * Struct lv_font_t + * lvgl extension definition for: + * void event_cb(const lv_obj_class_t *class_p, lv_event_t *e) */ -static inline const mp_obj_type_t *get_mp_lv_font_t_type(void); +static mp_obj_t mp_funcptr_event_cb_1(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); + ((void (*)(const lv_obj_class_t *, lv_event_t *))lv_func_ptr)(class_p, e); + return mp_const_none; +} -GENMPY_UNUSED static inline void* mp_write_ptr_lv_font_t(mp_obj_t self_in) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_1_mpobj, 2, mp_funcptr_event_cb_1, funcptr_event_cb_1); + +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, func, NULL, MP_QSTR_, NULL); } + +static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); + +/* + * Struct lv_obj_class_t + */ + +static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_class_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_font_t_type())); - return (lv_font_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_class_t_type())); + return (lv_obj_class_t*)self->data; } -#define mp_write_lv_font_t(struct_obj) *((lv_font_t*)mp_write_ptr_lv_font_t(struct_obj)) +#define mp_write_lv_obj_class_t(struct_obj) *((lv_obj_class_t*)mp_write_ptr_lv_obj_class_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_font_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_class_t(void *field) { - return lv_to_mp_struct(get_mp_lv_font_t_type(), field); + return lv_to_mp_struct(get_mp_lv_obj_class_t_type(), field); } -#define mp_read_lv_font_t(field) mp_read_ptr_lv_font_t(copy_buffer(&field, sizeof(lv_font_t))) -#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) +#define mp_read_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(copy_buffer(&field, sizeof(lv_obj_class_t))) +#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) -static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_font_t *data = (lv_font_t*)self->data; + GENMPY_UNUSED lv_obj_class_t *data = (lv_obj_class_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_dsc: dest[0] = ptr_to_mp((void*)data->dsc); break; // converting from void *; - case MP_QSTR_fallback: dest[0] = ptr_to_mp((void*)data->fallback); break; // converting from lv_font_t *; + case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_obj_class_t *; + case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, (void*)data->event_cb, lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_get_glyph_dsc: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_dsc_mpobj, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, data->user_data); break; // converting from callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: dest[0] = mp_lv_funcptr(&mp_funcptr_get_glyph_bitmap_mpobj, (void*)data->get_glyph_bitmap, NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL); break; // converting from callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); - case MP_QSTR_release_glyph: dest[0] = mp_lv_funcptr(&mp_funcptr_release_glyph_mpobj, (void*)data->release_glyph, lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, data->user_data); break; // converting from callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); - case MP_QSTR_line_height: dest[0] = mp_obj_new_int(data->line_height); break; // converting from int32_t; - case MP_QSTR_base_line: dest[0] = mp_obj_new_int(data->base_line); break; // converting from int32_t; - case MP_QSTR_cap_height: dest[0] = mp_obj_new_int(data->cap_height); break; // converting from int32_t; - case MP_QSTR_x_height: dest[0] = mp_obj_new_int(data->x_height); break; // converting from int32_t; - case MP_QSTR_subpx: dest[0] = mp_obj_new_int_from_uint(data->subpx); break; // converting from uint8_t; - case MP_QSTR_kerning: dest[0] = mp_obj_new_int_from_uint(data->kerning); break; // converting from uint8_t; - case MP_QSTR_static_bitmap: dest[0] = mp_obj_new_int_from_uint(data->static_bitmap); break; // converting from uint8_t; - case MP_QSTR_underline_position: dest[0] = mp_obj_new_int(data->underline_position); break; // converting from int8_t; - case MP_QSTR_underline_thickness: dest[0] = mp_obj_new_int(data->underline_thickness); break; // converting from int8_t; + case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; + case MP_QSTR_width_def: dest[0] = mp_obj_new_int(data->width_def); break; // converting from int32_t; + case MP_QSTR_height_def: dest[0] = mp_obj_new_int(data->height_def); break; // converting from int32_t; + case MP_QSTR_editable: dest[0] = mp_obj_new_int_from_uint(data->editable); break; // converting from uint32_t; + case MP_QSTR_group_def: dest[0] = mp_obj_new_int_from_uint(data->group_def); break; // converting from uint32_t; + case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; + case MP_QSTR_theme_inheritable: dest[0] = mp_obj_new_int_from_uint(data->theme_inheritable); break; // converting from uint32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -9934,21 +9576,18 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_dsc: data->dsc = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_fallback: data->fallback = (void*)mp_to_ptr(dest[1]); break; // converting to lv_font_t *; + case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_class_t *; + case MP_QSTR_constructor_cb: data->constructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_destructor_cb: data->destructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); + case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_get_glyph_dsc: data->get_glyph_dsc = (void*)mp_lv_callback(dest[1], lv_font_t_get_glyph_dsc_callback ,MP_QSTR_lv_font_t_get_glyph_dsc, &data->user_data, NULL, NULL, NULL); break; // converting to callback bool (*)(lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); - case MP_QSTR_get_glyph_bitmap: data->get_glyph_bitmap = (void*)mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_font_t_get_glyph_bitmap, NULL, NULL, NULL, NULL); break; // converting to callback void *(*)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf); - case MP_QSTR_release_glyph: data->release_glyph = (void*)mp_lv_callback(dest[1], lv_font_t_release_glyph_callback ,MP_QSTR_lv_font_t_release_glyph, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); - case MP_QSTR_line_height: data->line_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_base_line: data->base_line = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_cap_height: data->cap_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_x_height: data->x_height = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_subpx: data->subpx = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_kerning: data->kerning = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_static_bitmap: data->static_bitmap = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_underline_position: data->underline_position = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; - case MP_QSTR_underline_thickness: data->underline_thickness = (int8_t)mp_obj_get_int(dest[1]); break; // converting to int8_t; + case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; + case MP_QSTR_width_def: data->width_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_height_def: data->height_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_editable: data->editable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_group_def: data->group_def = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_theme_inheritable: data->theme_inheritable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; default: return; } @@ -9957,262 +9596,372 @@ static void mp_lv_font_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_font_t_print(const mp_print_t *print, +static void mp_lv_obj_class_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_font_t"); + mp_printf(print, "struct lv_obj_class_t"); } -static const mp_obj_dict_t mp_lv_font_t_locals_dict; +static const mp_obj_dict_t mp_lv_obj_class_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_font_t_type, - MP_QSTR_lv_font_t, + mp_lv_obj_class_t_type, + MP_QSTR_lv_obj_class_t, MP_TYPE_FLAG_NONE, - print, mp_lv_font_t_print, + print, mp_lv_obj_class_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_font_t_attr, - locals_dict, &mp_lv_font_t_locals_dict, + attr, mp_lv_obj_class_t_attr, + locals_dict, &mp_lv_obj_class_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_font_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void) { - return &mp_lv_font_t_type; + return &mp_lv_obj_class_t_type; } /* * lvgl extension definition for: - * inline static const lv_font_t *lv_obj_get_style_text_font_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_lv_obj_get_style_text_font_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_font_t * _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_font_t((void*)_res); + int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[2]); + lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_func_ptr)(obj, idx, class_p); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_internal_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_child_by_type); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space_internal */ +/* Reusing lv_obj_get_child for lv_obj_get_sibling */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_sibling); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space_internal */ +/* Reusing lv_obj_get_child_by_type for lv_obj_get_sibling_by_type */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_sibling_by_type); /* * lvgl extension definition for: - * inline static lv_text_decor_t lv_obj_get_style_text_decor_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_text_decor_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_decor_t _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_internal_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_mpobj, 1, mp_lv_obj_get_child_count, lv_obj_get_child_count); /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_get_style_text_align_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_lv_obj_get_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_child_count_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_internal_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_by_type_mpobj, 2, mp_lv_obj_get_child_count_by_type, lv_obj_get_child_count_by_type); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered_internal */ +/* + * lvgl extension definition for: + * int32_t lv_obj_get_index(const lv_obj_t *obj) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width_internal */ +static mp_obj_t mp_lv_obj_get_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_index); /* * lvgl extension definition for: - * inline static lv_text_leading_trim_t lv_obj_get_style_text_leading_trim_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static mp_obj_t mp_lv_obj_get_style_text_leading_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_index_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_text_leading_trim_t _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_internal_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_by_type_mpobj, 2, mp_lv_obj_get_index_by_type, lv_obj_get_index_by_type); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius_internal); +/* + * Callback function lv_obj_tree_walk_cb + * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) + */ + +GENMPY_UNUSED static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = lv_to_mp((void*)arg0); + mp_args[1] = ptr_to_mp((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_tree_walk_cb)), 2, mp_args); + return (int)mp_obj_get_int(callback_result); +} + + +/* + * lvgl extension definition for: + * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) + */ + +static mp_obj_t mp_lv_obj_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + void *user_data = mp_to_ptr(mp_args[2]); + void *cb = mp_lv_callback(mp_args[1], &lv_obj_tree_walk_cb_callback, MP_QSTR_lv_obj_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_obj_t *start_obj = mp_to_lv(mp_args[0]); + ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_func_ptr)(start_obj, cb, user_data); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_tree_walk_mpobj, 3, mp_lv_obj_tree_walk, lv_obj_tree_walk); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_dump_tree */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_dump_tree_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_dump_tree); /* * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_blur_quality_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) */ -static mp_obj_t mp_lv_obj_get_style_blur_quality_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_blur_quality_t _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pos_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_pos); + +/* Reusing lv_obj_move_to_index for lv_obj_set_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_x_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_x); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_y_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_y); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x_internal */ +/* Reusing lv_obj_set_pos for lv_obj_set_size */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_size_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_size); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y_internal); +/* + * lvgl extension definition for: + * bool lv_obj_refr_size(lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_refr_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(lv_obj_t *))lv_func_ptr)(obj); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refr_size); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_width); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_height); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_content_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_width); -/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality_internal */ +/* Reusing lv_obj_move_to_index for lv_obj_set_content_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_height); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius_internal */ +/* Reusing lv_obj_delete_delayed for lv_obj_set_layout */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_layout_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_set_layout); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset_internal); +/* + * lvgl extension definition for: + * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_is_layout_positioned(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + bool _res = ((bool (*)(const lv_obj_t *))lv_func_ptr)(obj); + return convert_to_bool(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_layout_positioned_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_layout_positioned); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_mark_layout_as_dirty */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_mark_layout_as_dirty_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_mark_layout_as_dirty); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_internal); +/* + * lvgl extension definition for: + * void lv_obj_update_layout(const lv_obj_t *obj) + */ + +static mp_obj_t mp_lv_obj_update_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + ((void (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layout_mpobj, 1, mp_lv_obj_update_layout, lv_obj_update_layout); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered_internal); +/* + * lvgl extension definition for: + * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) + */ + +static mp_obj_t mp_lv_obj_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_align_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_align_t))lv_func_ptr)(obj, align); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_align_mpobj, 2, mp_lv_obj_set_align, lv_obj_set_align); -#define funcptr_lv_color_filter_cb_t NULL +/* + * lvgl extension definition for: + * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + */ + +static mp_obj_t mp_lv_obj_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_align_t align = (int)mp_obj_get_int(mp_args[1]); + int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, align, x_ofs, y_ofs); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_mpobj, 4, mp_lv_obj_align, lv_obj_align); + /* * lvgl extension definition for: - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) */ -static mp_obj_t mp_funcptr_lv_color_filter_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_align_to(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const struct _lv_color_filter_dsc_t *arg0 = (const struct _lv_color_filter_dsc_t *)mp_to_ptr(mp_args[0]); - lv_color_t arg1 = mp_write_lv_color_t(mp_args[1]); - lv_opa_t arg2 = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_color_t _res = ((lv_color_t (*)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t))lv_func_ptr)(arg0, arg1, arg2); - return mp_read_lv_color_t(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(mp_args[1]); + lv_align_t align = (int)mp_obj_get_int(mp_args[2]); + int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, base, align, x_ofs, y_ofs); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_color_filter_cb_t_mpobj, 3, mp_funcptr_lv_color_filter_cb_t, funcptr_lv_color_filter_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_to_mpobj, 5, mp_lv_obj_align_to, lv_obj_align_to); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_move_foreground for lv_obj_center */ -static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_center_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_center); + /* - * Struct lv_color_filter_dsc_t + * Struct lv_matrix_t */ -static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_filter_dsc_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_matrix_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_filter_dsc_t_type())); - return (lv_color_filter_dsc_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_matrix_t_type())); + return (lv_matrix_t*)self->data; } -#define mp_write_lv_color_filter_dsc_t(struct_obj) *((lv_color_filter_dsc_t*)mp_write_ptr_lv_color_filter_dsc_t(struct_obj)) +#define mp_write_lv_matrix_t(struct_obj) *((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_filter_dsc_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_matrix_t(void *field) { - return lv_to_mp_struct(get_mp_lv_color_filter_dsc_t_type(), field); + return lv_to_mp_struct(get_mp_lv_matrix_t_type(), field); } -#define mp_read_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) -#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) +#define mp_read_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(copy_buffer(&field, sizeof(lv_matrix_t))) +#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) -static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)self->data; + GENMPY_UNUSED lv_matrix_t *data = (lv_matrix_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_filter_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, data->user_data); break; // converting from callback lv_color_filter_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + ; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -10221,8 +9970,7 @@ static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_filter_cb: data->filter_cb = mp_lv_callback(dest[1], lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_color_filter_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + ; default: return; } @@ -10231,200 +9979,254 @@ static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_color_filter_dsc_t_print(const mp_print_t *print, +static void mp_lv_matrix_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_color_filter_dsc_t"); + mp_printf(print, "struct lv_matrix_t"); } -static const mp_obj_dict_t mp_lv_color_filter_dsc_t_locals_dict; +static const mp_obj_dict_t mp_lv_matrix_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color_filter_dsc_t_type, - MP_QSTR_lv_color_filter_dsc_t, + mp_lv_matrix_t_type, + MP_QSTR_lv_matrix_t, MP_TYPE_FLAG_NONE, - print, mp_lv_color_filter_dsc_t_print, + print, mp_lv_matrix_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_color_filter_dsc_t_attr, - locals_dict, &mp_lv_color_filter_dsc_t_locals_dict, + attr, mp_lv_matrix_t_attr, + locals_dict, &mp_lv_matrix_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void) { - return &mp_lv_color_filter_dsc_t_type; + return &mp_lv_matrix_t_type; } /* * lvgl extension definition for: - * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) */ -static mp_obj_t mp_lv_obj_get_style_color_filter_dsc_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_color_filter_dsc_t * _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(mp_args[1]); + ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_func_ptr)(obj, matrix); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_internal_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc_internal); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa_internal); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_internal_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_transform_mpobj, 2, mp_lv_obj_set_transform, lv_obj_set_transform); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa_internal */ +/* Reusing lv_obj_move_foreground for lv_obj_reset_transform */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_internal_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_reset_transform_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_reset_transform); -#define funcptr_lv_anim_exec_xcb_t NULL - /* * lvgl extension definition for: - * void lv_anim_exec_xcb_t(void *, int32_t) + * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) */ -static mp_obj_t mp_funcptr_lv_anim_exec_xcb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *arg0 = mp_to_ptr(mp_args[0]); - int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(void *, int32_t))lv_func_ptr)(arg0, arg1); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_area_t *coords = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_exec_xcb_t_mpobj, 2, mp_funcptr_lv_anim_exec_xcb_t, funcptr_lv_anim_exec_xcb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_coords); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_get_index for lv_obj_get_x */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x); + +/* Reusing lv_obj_get_index for lv_obj_get_x2 */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_anim_t_exec_cb_callback' - * lv_anim_exec_xcb_t exec_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x2); -#define funcptr_lv_anim_custom_exec_cb_t NULL +/* Reusing lv_obj_get_index for lv_obj_get_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y); + +/* Reusing lv_obj_get_index for lv_obj_get_y2 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y2); + +/* Reusing lv_obj_get_index for lv_obj_get_x_aligned */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x_aligned); + +/* Reusing lv_obj_get_index for lv_obj_get_y_aligned */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y_aligned); + +/* Reusing lv_obj_get_index for lv_obj_get_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_width); + +/* Reusing lv_obj_get_index for lv_obj_get_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_height); + +/* Reusing lv_obj_get_index for lv_obj_get_content_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_width); + +/* Reusing lv_obj_get_index for lv_obj_get_content_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_height); + +/* Reusing lv_obj_get_coords for lv_obj_get_content_coords */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_content_coords); + +/* Reusing lv_obj_get_index for lv_obj_get_self_width */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_width); + +/* Reusing lv_obj_get_index for lv_obj_get_self_height */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_height); + /* * lvgl extension definition for: - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_lv_anim_custom_exec_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_clamped_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - int32_t arg1 = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_anim_t *, int32_t))lv_func_ptr)(arg0, arg1); - return mp_const_none; + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, 2, mp_funcptr_lv_anim_custom_exec_cb_t, funcptr_lv_anim_custom_exec_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_width); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing lv_obj_get_style_clamped_width for lv_obj_get_style_clamped_height */ -static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); -#define funcptr_lv_anim_start_cb_t NULL +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_height); + +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_width_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_width_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_width_content); + +/* Reusing lv_obj_refr_size for lv_obj_is_style_any_height_content */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_height_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_height_content); + +/* Reusing lv_obj_refr_size for lv_obj_is_width_min */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_min); + +/* Reusing lv_obj_refr_size for lv_obj_is_height_min */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_min); + +/* Reusing lv_obj_refr_size for lv_obj_is_width_max */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_max); + +/* Reusing lv_obj_refr_size for lv_obj_is_height_max */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_max); + +/* Reusing lv_obj_refr_size for lv_obj_refresh_self_size */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_self_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refresh_self_size); + +/* Reusing lv_obj_move_foreground for lv_obj_refr_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_pos_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_refr_pos); + +/* Reusing lv_obj_set_pos for lv_obj_move_to */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_mpobj, 3, mp_lv_obj_set_pos, lv_obj_move_to); + /* * lvgl extension definition for: - * void lv_anim_start_cb_t(lv_anim_t *) + * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) */ -static mp_obj_t mp_funcptr_lv_anim_start_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_move_children_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - ((void (*)(lv_anim_t *))lv_func_ptr)(arg0); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t x_diff = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y_diff = (int32_t)mp_obj_get_int(mp_args[2]); + bool ignore_floating = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_func_ptr)(obj, x_diff, y_diff, ignore_floating); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_start_cb_t_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, funcptr_lv_anim_start_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_children_by_mpobj, 4, mp_lv_obj_move_children_by, lv_obj_move_children_by); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_anim_t_start_cb_callback(lv_anim_t *); -static void lv_anim_t_completed_cb_callback(lv_anim_t *); -static void lv_anim_t_deleted_cb_callback(lv_anim_t *); -#define funcptr_lv_anim_get_value_cb_t NULL - /* * lvgl extension definition for: - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) */ -static mp_obj_t mp_funcptr_lv_anim_get_value_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *arg0 = mp_to_ptr(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_anim_t *))lv_func_ptr)(arg0); - return mp_obj_new_int(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_matrix_t * _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_read_ptr_lv_matrix_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_anim_get_value_cb_t_mpobj, 1, mp_funcptr_lv_anim_get_value_cb_t, funcptr_lv_anim_get_value_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transform_mpobj, 1, mp_lv_obj_get_transform, lv_obj_get_transform); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } - -static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); -static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); -typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * Struct lv_anim_bezier3_para_t + * Struct lv_point_t */ -static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_point_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_bezier3_para_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_point_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_bezier3_para_t_type())); - return (lv_anim_bezier3_para_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_point_t_type())); + return (lv_point_t*)self->data; } -#define mp_write_lv_anim_bezier3_para_t(struct_obj) *((lv_anim_bezier3_para_t*)mp_write_ptr_lv_anim_bezier3_para_t(struct_obj)) +#define mp_write_lv_point_t(struct_obj) *((lv_point_t*)mp_write_ptr_lv_point_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_bezier3_para_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_point_t(void *field) { - return lv_to_mp_struct(get_mp_lv_anim_bezier3_para_t_type(), field); + return lv_to_mp_struct(get_mp_lv_point_t_type(), field); } -#define mp_read_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) -#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) +#define mp_read_lv_point_t(field) mp_read_ptr_lv_point_t(copy_buffer(&field, sizeof(lv_point_t))) +#define mp_read_byref_lv_point_t(field) mp_read_ptr_lv_point_t(&field) -static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_point_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)self->data; + GENMPY_UNUSED lv_point_t *data = (lv_point_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_x1: dest[0] = mp_obj_new_int(data->x1); break; // converting from int16_t; - case MP_QSTR_y1: dest[0] = mp_obj_new_int(data->y1); break; // converting from int16_t; - case MP_QSTR_x2: dest[0] = mp_obj_new_int(data->x2); break; // converting from int16_t; - case MP_QSTR_y2: dest[0] = mp_obj_new_int(data->y2); break; // converting from int16_t; + case MP_QSTR_x: dest[0] = mp_obj_new_int(data->x); break; // converting from int32_t; + case MP_QSTR_y: dest[0] = mp_obj_new_int(data->y); break; // converting from int32_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -10433,10 +10235,8 @@ static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t // store attribute switch(attr) { - case MP_QSTR_x1: data->x1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_y1: data->y1 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_x2: data->x2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; - case MP_QSTR_y2: data->y2 = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_x: data->x = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_y: data->y = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; default: return; } @@ -10445,993 +10245,777 @@ static void mp_lv_anim_bezier3_para_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t } } -static void mp_lv_anim_bezier3_para_t_print(const mp_print_t *print, +static void mp_lv_point_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_anim_bezier3_para_t"); + mp_printf(print, "struct lv_point_t"); } -static const mp_obj_dict_t mp_lv_anim_bezier3_para_t_locals_dict; +static const mp_obj_dict_t mp_lv_point_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_bezier3_para_t_type, - MP_QSTR_lv_anim_bezier3_para_t, + mp_lv_point_t_type, + MP_QSTR_lv_point_t, MP_TYPE_FLAG_NONE, - print, mp_lv_anim_bezier3_para_t_print, + print, mp_lv_point_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_anim_bezier3_para_t_attr, - locals_dict, &mp_lv_anim_bezier3_para_t_locals_dict, + attr, mp_lv_point_t_attr, + locals_dict, &mp_lv_point_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_anim_bezier3_para_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_point_t_type(void) { - return &mp_lv_anim_bezier3_para_t_type; + return &mp_lv_point_t_type; } /* - * Struct lv_anim_parameter_t + * lvgl extension definition for: + * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) */ -static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_parameter_t(mp_obj_t self_in) +static mp_obj_t mp_lv_obj_transform_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_parameter_t_type())); - return (lv_anim_parameter_t*)self->data; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[1]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, p, flags); + return mp_const_none; } -#define mp_write_lv_anim_parameter_t(struct_obj) *((lv_anim_parameter_t*)mp_write_ptr_lv_anim_parameter_t(struct_obj)) + -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_parameter_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_anim_parameter_t_type(), field); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_mpobj, 3, mp_lv_obj_transform_point, lv_obj_transform_point); + -#define mp_read_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(copy_buffer(&field, sizeof(lv_anim_parameter_t))) -#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) +/* + * Array convertors for lv_point_t [] + */ -static void mp_lv_anim_parameter_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t_____(mp_obj_t mp_arr) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_parameter_t *data = (lv_anim_parameter_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_bezier3: dest[0] = mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); break; // converting from lv_anim_bezier3_para_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_bezier3: data->bezier3 = mp_write_lv_anim_bezier3_para_t(dest[1]); break; // converting to lv_anim_bezier3_para_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_point_t(item); } + return (lv_point_t *)lv_arr; } -static void mp_lv_anim_parameter_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t_____(lv_point_t *arr) { - mp_printf(print, "struct lv_anim_parameter_t"); + return mp_read_ptr_lv_point_t((void*)arr); } -static const mp_obj_dict_t mp_lv_anim_parameter_t_locals_dict; -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_parameter_t_type, - MP_QSTR_lv_anim_parameter_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_anim_parameter_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_anim_parameter_t_attr, - locals_dict, &mp_lv_anim_parameter_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +/* + * lvgl extension definition for: + * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) + */ -static inline const mp_obj_type_t *get_mp_lv_anim_parameter_t_type(void) +static mp_obj_t mp_lv_obj_transform_point_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return &mp_lv_anim_parameter_t_type; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_point_t *points = mp_arr_to_lv_point_t_____(mp_args[1]); + size_t count = (size_t)mp_obj_get_int(mp_args[2]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[3]); + ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, points, count, flags); + return mp_const_none; } + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_array_mpobj, 4, mp_lv_obj_transform_point_array, lv_obj_transform_point_array); /* - * Struct lv_anim_t + * lvgl extension definition for: + * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) */ -static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_anim_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_anim_t_type())); - return (lv_anim_t*)self->data; -} - -#define mp_write_lv_anim_t(struct_obj) *((lv_anim_t*)mp_write_ptr_lv_anim_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_anim_t(void *field) +static mp_obj_t mp_lv_obj_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return lv_to_mp_struct(get_mp_lv_anim_t_type(), field); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); + ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, area, flags); + return mp_const_none; } -#define mp_read_lv_anim_t(field) mp_read_ptr_lv_anim_t(copy_buffer(&field, sizeof(lv_anim_t))) -#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) - -static void mp_lv_anim_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_anim_t *data = (lv_anim_t*)self->data; + - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_var: dest[0] = ptr_to_mp((void*)data->var); break; // converting from void *; - case MP_QSTR_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_exec_xcb_t_mpobj, data->exec_cb, NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL); break; // converting from callback lv_anim_exec_xcb_t; - case MP_QSTR_custom_exec_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_custom_exec_cb_t_mpobj, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, data->user_data); break; // converting from callback lv_anim_custom_exec_cb_t; - case MP_QSTR_start_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->start_cb, lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, data->user_data); break; // converting from callback lv_anim_start_cb_t; - case MP_QSTR_completed_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->completed_cb, lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, data->user_data); break; // converting from callback lv_anim_completed_cb_t; - case MP_QSTR_deleted_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_start_cb_t_mpobj, data->deleted_cb, lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, data->user_data); break; // converting from callback lv_anim_deleted_cb_t; - case MP_QSTR_get_value_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->get_value_cb, lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, data->user_data); break; // converting from callback lv_anim_get_value_cb_t; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_path_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_cb, lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, data->user_data); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_start_value: dest[0] = mp_obj_new_int(data->start_value); break; // converting from int32_t; - case MP_QSTR_current_value: dest[0] = mp_obj_new_int(data->current_value); break; // converting from int32_t; - case MP_QSTR_end_value: dest[0] = mp_obj_new_int(data->end_value); break; // converting from int32_t; - case MP_QSTR_duration: dest[0] = mp_obj_new_int(data->duration); break; // converting from int32_t; - case MP_QSTR_act_time: dest[0] = mp_obj_new_int(data->act_time); break; // converting from int32_t; - case MP_QSTR_reverse_delay: dest[0] = mp_obj_new_int_from_uint(data->reverse_delay); break; // converting from uint32_t; - case MP_QSTR_reverse_duration: dest[0] = mp_obj_new_int_from_uint(data->reverse_duration); break; // converting from uint32_t; - case MP_QSTR_repeat_delay: dest[0] = mp_obj_new_int_from_uint(data->repeat_delay); break; // converting from uint32_t; - case MP_QSTR_repeat_cnt: dest[0] = mp_obj_new_int_from_uint(data->repeat_cnt); break; // converting from uint32_t; - case MP_QSTR_parameter: dest[0] = mp_read_byref_lv_anim_parameter_t(data->parameter); break; // converting from lv_anim_parameter_t; - case MP_QSTR_last_timer_run: dest[0] = mp_obj_new_int_from_uint(data->last_timer_run); break; // converting from uint32_t; - case MP_QSTR_pause_time: dest[0] = mp_obj_new_int_from_uint(data->pause_time); break; // converting from uint32_t; - case MP_QSTR_pause_duration: dest[0] = mp_obj_new_int_from_uint(data->pause_duration); break; // converting from uint32_t; - case MP_QSTR_is_paused: dest[0] = mp_obj_new_int_from_uint(data->is_paused); break; // converting from uint8_t; - case MP_QSTR_reverse_play_in_progress: dest[0] = mp_obj_new_int_from_uint(data->reverse_play_in_progress); break; // converting from uint8_t; - case MP_QSTR_run_round: dest[0] = mp_obj_new_int_from_uint(data->run_round); break; // converting from uint8_t; - case MP_QSTR_start_cb_called: dest[0] = mp_obj_new_int_from_uint(data->start_cb_called); break; // converting from uint8_t; - case MP_QSTR_early_apply: dest[0] = mp_obj_new_int_from_uint(data->early_apply); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_var: data->var = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_exec_cb: data->exec_cb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_anim_t_exec_cb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_exec_xcb_t; - case MP_QSTR_custom_exec_cb: data->custom_exec_cb = mp_lv_callback(dest[1], lv_anim_t_custom_exec_cb_callback ,MP_QSTR_lv_anim_t_custom_exec_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_custom_exec_cb_t; - case MP_QSTR_start_cb: data->start_cb = mp_lv_callback(dest[1], lv_anim_t_start_cb_callback ,MP_QSTR_lv_anim_t_start_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_start_cb_t; - case MP_QSTR_completed_cb: data->completed_cb = mp_lv_callback(dest[1], lv_anim_t_completed_cb_callback ,MP_QSTR_lv_anim_t_completed_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_completed_cb_t; - case MP_QSTR_deleted_cb: data->deleted_cb = mp_lv_callback(dest[1], lv_anim_t_deleted_cb_callback ,MP_QSTR_lv_anim_t_deleted_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_deleted_cb_t; - case MP_QSTR_get_value_cb: data->get_value_cb = mp_lv_callback(dest[1], lv_anim_t_get_value_cb_callback ,MP_QSTR_lv_anim_t_get_value_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_get_value_cb_t; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_path_cb: data->path_cb = mp_lv_callback(dest[1], lv_anim_t_path_cb_callback ,MP_QSTR_lv_anim_t_path_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_start_value: data->start_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_current_value: data->current_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_end_value: data->end_value = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_duration: data->duration = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_act_time: data->act_time = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_reverse_delay: data->reverse_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_reverse_duration: data->reverse_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_repeat_delay: data->repeat_delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_repeat_cnt: data->repeat_cnt = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_parameter: data->parameter = mp_write_lv_anim_parameter_t(dest[1]); break; // converting to lv_anim_parameter_t; - case MP_QSTR_last_timer_run: data->last_timer_run = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pause_time: data->pause_time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_pause_duration: data->pause_duration = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_is_paused: data->is_paused = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_reverse_play_in_progress: data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_run_round: data->run_round = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_start_cb_called: data->start_cb_called = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_early_apply: data->early_apply = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transformed_area_mpobj, 3, mp_lv_obj_get_transformed_area, lv_obj_get_transformed_area); + - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} +/* + * lvgl extension definition for: + * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) + */ -static void mp_lv_anim_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_obj_invalidate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_anim_t"); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_func_ptr)(obj, area); + return mp_obj_new_int(_res); } -static const mp_obj_dict_t mp_lv_anim_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_anim_t_type, - MP_QSTR_lv_anim_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_anim_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_anim_t_attr, - locals_dict, &mp_lv_anim_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_anim_t_type(void) -{ - return &mp_lv_anim_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_area_mpobj, 2, mp_lv_obj_invalidate_area, lv_obj_invalidate_area); /* * lvgl extension definition for: - * inline static const lv_anim_t *lv_obj_get_style_anim_internal(const lv_obj_t *obj, lv_part_t part) + * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_anim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_invalidate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_anim_t * _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_internal_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_mpobj, 1, mp_lv_obj_invalidate, lv_obj_invalidate); /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_anim_duration_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) */ -static mp_obj_t mp_lv_obj_get_style_anim_duration_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_area_is_visible(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + bool _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, area); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_area_is_visible_mpobj, 2, mp_lv_obj_area_is_visible, lv_obj_area_is_visible); +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_visible */ -/* - * Function NOT generated: - * Missing 'user_data' as a field of the first parameter of the callback function 'lv_style_transition_dsc_t_path_xcb_callback' - * lv_anim_path_cb_t path_xcb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_visible); +/* Reusing lv_obj_move_to_index for lv_obj_set_ext_click_area */ -/* - * Struct lv_style_transition_dsc_t - */ - -static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_transition_dsc_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_transition_dsc_t_type())); - return (lv_style_transition_dsc_t*)self->data; -} - -#define mp_write_lv_style_transition_dsc_t(struct_obj) *((lv_style_transition_dsc_t*)mp_write_ptr_lv_style_transition_dsc_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_transition_dsc_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_style_transition_dsc_t_type(), field); -} - -#define mp_read_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) -#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) - -static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_props: dest[0] = ptr_to_mp((void*)data->props); break; // converting from lv_style_prop_t *; - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_path_xcb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_xcb, NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL); break; // converting from callback lv_anim_path_cb_t; - case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint32_t; - case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint32_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_props: data->props = (void*)mp_to_ptr(dest[1]); break; // converting to lv_style_prop_t *; - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_path_xcb: data->path_xcb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; - case MP_QSTR_time: data->time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_delay: data->delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_style_transition_dsc_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_style_transition_dsc_t"); -} - -static const mp_obj_dict_t mp_lv_style_transition_dsc_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_transition_dsc_t_type, - MP_QSTR_lv_style_transition_dsc_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_style_transition_dsc_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_style_transition_dsc_t_attr, - locals_dict, &mp_lv_style_transition_dsc_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_click_area_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_click_area); + +/* Reusing lv_obj_get_coords for lv_obj_get_click_area */ -static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void) -{ - return &mp_lv_style_transition_dsc_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_click_area_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_click_area); /* * lvgl extension definition for: - * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) */ -static mp_obj_t mp_lv_obj_get_style_transition_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_hit_test(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const lv_style_transition_dsc_t * _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + bool _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_internal_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_hit_test_mpobj, 2, mp_lv_obj_hit_test, lv_obj_hit_test); /* * lvgl extension definition for: - * inline static lv_blend_mode_t lv_obj_get_style_blend_mode_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_get_style_blend_mode_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_calc_dynamic_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_blend_mode_t _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_func_ptr)(obj, prop); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_internal_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_width_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_width); +/* Reusing lv_obj_calc_dynamic_width for lv_obj_calc_dynamic_height */ -/* - * lvgl extension definition for: - * inline static uint16_t lv_obj_get_style_layout_internal(const lv_obj_t *obj, lv_part_t part) - */ - -static mp_obj_t mp_lv_obj_get_style_layout_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint16_t _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_internal_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_height_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_height); /* * lvgl extension definition for: - * inline static lv_base_dir_t lv_obj_get_style_base_dir_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) */ -static mp_obj_t mp_lv_obj_get_style_base_dir_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_base_dir_t _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_func_ptr)(obj, mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_internal_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir_internal); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src_internal); - -/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollbar_mode_mpobj, 2, mp_lv_obj_set_scrollbar_mode, lv_obj_set_scrollbar_mode); /* * lvgl extension definition for: - * inline static lv_flex_flow_t lv_obj_get_style_flex_flow_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) */ -static mp_obj_t mp_lv_obj_get_style_flex_flow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_flex_flow_t _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_dir_t dir = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_dir_t))lv_func_ptr)(obj, dir); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_internal_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_obj_set_scroll_dir); /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_main_place_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) */ -static mp_obj_t mp_lv_obj_get_style_flex_main_place_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_flex_align_t _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_scroll_snap_t align = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_func_ptr)(obj, align); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place_internal); - -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_x_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_x); -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place_internal */ +/* Reusing lv_obj_set_scroll_snap_x for lv_obj_set_scroll_snap_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_internal_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_y_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_y); /* * lvgl extension definition for: - * inline static uint8_t lv_obj_get_style_flex_grow_internal(const lv_obj_t *obj, lv_part_t part) + * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_flex_grow_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - uint8_t _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_obj_new_int_from_uint(_res); + lv_scrollbar_mode_t _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_internal_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_mode_mpobj, 1, mp_lv_obj_get_scrollbar_mode, lv_obj_get_scrollbar_mode); /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) + * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const int32_t * _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); - return mp_array_from_i32ptr((void*)_res); + lv_dir_t _res = ((lv_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_obj_get_scroll_dir); /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_column_align_internal(const lv_obj_t *obj, lv_part_t part) + * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) */ -static mp_obj_t mp_lv_obj_get_style_grid_column_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_grid_align_t _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + lv_scroll_snap_t _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_func_ptr)(obj); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align_internal); - -/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_x_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_x); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align_internal */ +/* Reusing lv_obj_get_scroll_snap_x for lv_obj_get_scroll_snap_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_y_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_y); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_x); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_y); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_top_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_top); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_bottom_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_bottom); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_left_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_left); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span_internal */ +/* Reusing lv_obj_get_index for lv_obj_get_scroll_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_right_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_right); /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_calculate_style_text_align_internal(const lv_obj_t *obj, lv_part_t part, const char *txt) + * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) */ -static mp_obj_t mp_lv_obj_calculate_style_text_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scroll_end(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_point_t *end = mp_write_ptr_lv_point_t(mp_args[1]); + ((void (*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, end); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_internal_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_end_mpobj, 2, mp_lv_obj_get_scroll_end, lv_obj_get_scroll_end); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right_internal */ +/* + * lvgl extension definition for: + * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top_internal */ +static mp_obj_t mp_lv_obj_scroll_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_obj_t *obj = mp_to_lv(mp_args[0]); + int32_t dx = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t dy = (int32_t)mp_obj_get_int(mp_args[2]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, dx, dy, anim_en); + return mp_const_none; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top_internal); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom_internal */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe_internal */ +/* Reusing lv_obj_scroll_by for lv_obj_scroll_by_bounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_bounded_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by_bounded); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe_internal */ +/* Reusing lv_obj_scroll_by for lv_obj_scroll_to */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_to); /* * lvgl extension definition for: - * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) + * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) */ -static mp_obj_t mp_lv_obj_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_scroll_to_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_flex_flow_t flow = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_func_ptr)(obj, flow); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, x, anim_en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_flow_mpobj, 2, mp_lv_obj_set_flex_flow, lv_obj_set_flex_flow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_x_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_x); + +/* Reusing lv_obj_scroll_to_x for lv_obj_scroll_to_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_y_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_y); /* * lvgl extension definition for: - * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) + * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) */ -static mp_obj_t mp_lv_obj_set_flex_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_scroll_to_view(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_flex_align_t main_place = (int)mp_obj_get_int(mp_args[1]); - lv_flex_align_t cross_place = (int)mp_obj_get_int(mp_args[2]); - lv_flex_align_t track_cross_place = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_func_ptr)(obj, main_place, cross_place, track_cross_place); + lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, anim_en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_align_mpobj, 4, mp_lv_obj_set_flex_align, lv_obj_set_flex_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view); + +/* Reusing lv_obj_scroll_to_view for lv_obj_scroll_to_view_recursive */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_recursive_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view_recursive); + +/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolling */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolling_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolling); + +/* Reusing lv_obj_update_layout for lv_obj_stop_scroll_anim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_stop_scroll_anim_mpobj, 1, mp_lv_obj_update_layout, lv_obj_stop_scroll_anim); + +/* Reusing lv_obj_scroll_to_view for lv_obj_update_snap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_snap_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_update_snap); /* * lvgl extension definition for: - * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) + * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) */ -static mp_obj_t mp_lv_obj_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_scrollbar_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint8_t grow = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint8_t))lv_func_ptr)(obj, grow); + lv_area_t *hor_area = mp_write_ptr_lv_area_t(mp_args[1]); + lv_area_t *ver_area = mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor_area, ver_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_flex_grow_mpobj, 2, mp_lv_obj_set_flex_grow, lv_obj_set_flex_grow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_area_mpobj, 3, mp_lv_obj_get_scrollbar_area, lv_obj_get_scrollbar_area); + +/* Reusing lv_obj_move_foreground for lv_obj_scrollbar_invalidate */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scrollbar_invalidate_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_scrollbar_invalidate); + +/* Reusing lv_obj_scroll_to_view for lv_obj_readjust_scroll */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_readjust_scroll_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_readjust_scroll); /* - * Array convertors for int32_t [] + * Struct lv_style_t */ -GENMPY_UNUSED static int32_t *mp_arr_to_int32_t_____(mp_obj_t mp_arr) +static inline const mp_obj_type_t *get_mp_lv_style_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_t(mp_obj_t self_in) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - int32_t *lv_arr = (int32_t*)m_malloc(len * sizeof(int32_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (int32_t)mp_obj_get_int(item); - } - return (int32_t *)lv_arr; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_t_type())); + return (lv_style_t*)self->data; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_int32_t_____(const int32_t *arr) +#define mp_write_lv_style_t(struct_obj) *((lv_style_t*)mp_write_ptr_lv_style_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_t(void *field) { - return mp_array_from_i32ptr((void*)arr); + return lv_to_mp_struct(get_mp_lv_style_t_type(), field); } +#define mp_read_lv_style_t(field) mp_read_ptr_lv_style_t(copy_buffer(&field, sizeof(lv_style_t))) +#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) -/* - * lvgl extension definition for: - * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) - */ +static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_style_t *data = (lv_style_t*)self->data; -static mp_obj_t mp_lv_obj_set_grid_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_values_and_props: dest[0] = ptr_to_mp((void*)data->values_and_props); break; // converting from void *; + case MP_QSTR_has_group: dest[0] = mp_obj_new_int_from_uint(data->has_group); break; // converting from uint32_t; + case MP_QSTR_prop_cnt: dest[0] = mp_obj_new_int_from_uint(data->prop_cnt); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_values_and_props: data->values_and_props = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_has_group: data->has_group = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_prop_cnt: data->prop_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_style_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const int32_t *col_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[1]); - const int32_t *row_dsc = (const int32_t *)mp_arr_to_int32_t_____(mp_args[2]); - ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_func_ptr)(obj, col_dsc, row_dsc); - return mp_const_none; + mp_printf(print, "struct lv_style_t"); } - +static const mp_obj_dict_t mp_lv_style_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_dsc_array_mpobj, 3, mp_lv_obj_set_grid_dsc_array, lv_obj_set_grid_dsc_array); +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_style_t_type, + MP_QSTR_lv_style_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_style_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_style_t_attr, + locals_dict, &mp_lv_style_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_style_t_type(void) +{ + return &mp_lv_style_t_type; +} /* * lvgl extension definition for: - * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) + * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_set_grid_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_add_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); - lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_func_ptr)(obj, column_align, row_align); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_align_mpobj, 3, mp_lv_obj_set_grid_align, lv_obj_set_grid_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_add_style); /* * lvgl extension definition for: - * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) + * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_set_grid_cell(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_replace_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_grid_align_t column_align = (int)mp_obj_get_int(mp_args[1]); - int32_t col_pos = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t col_span = (int32_t)mp_obj_get_int(mp_args[3]); - lv_grid_align_t row_align = (int)mp_obj_get_int(mp_args[4]); - int32_t row_pos = (int32_t)mp_obj_get_int(mp_args[5]); - int32_t row_span = (int32_t)mp_obj_get_int(mp_args[6]); - ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_func_ptr)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); - return mp_const_none; + const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, old_style, new_style, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_grid_cell_mpobj, 7, mp_lv_obj_set_grid_cell, lv_obj_set_grid_cell); - -/* Reusing lv_obj_move_foreground for lv_obj_delete */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_replace_style_mpobj, 4, mp_lv_obj_replace_style, lv_obj_replace_style); -/* Reusing lv_obj_move_foreground for lv_obj_clean */ +/* Reusing lv_obj_add_style for lv_obj_remove_style */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_clean_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_clean); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_remove_style); /* * lvgl extension definition for: - * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) + * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_delete_delayed(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_remove_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t delay_ms = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, uint32_t))lv_func_ptr)(obj, delay_ms); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_obj_t *, lv_style_selector_t))lv_func_ptr)(obj, selector); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_delayed_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_delete_delayed); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_obj_delete_anim_completed_cb */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_delete_anim_completed_cb_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_obj_delete_anim_completed_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_theme_mpobj, 2, mp_lv_obj_remove_theme, lv_obj_remove_theme); -/* Reusing lv_obj_move_foreground for lv_obj_delete_async */ +/* Reusing lv_obj_move_foreground for lv_obj_remove_style_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_delete_async_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_delete_async); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_all_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_remove_style_all); /* * lvgl extension definition for: - * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) + * void lv_obj_report_style_change(lv_style_t *style) */ -static mp_obj_t mp_lv_obj_set_parent(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_report_style_change(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_obj_t *parent = mp_to_lv(mp_args[1]); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_func_ptr)(obj, parent); + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + ((void (*)(lv_style_t *))lv_func_ptr)(style); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_parent_mpobj, 2, mp_lv_obj_set_parent, lv_obj_set_parent); - -/* Reusing lv_obj_set_parent for lv_obj_swap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_swap_mpobj, 2, mp_lv_obj_set_parent, lv_obj_swap); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_report_style_change_mpobj, 1, mp_lv_obj_report_style_change, lv_obj_report_style_change); /* * lvgl extension definition for: - * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) + * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_move_to_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_refresh_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t index = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, int32_t))lv_func_ptr)(obj, index); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_index_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_move_to_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_style_mpobj, 3, mp_lv_obj_refresh_style, lv_obj_refresh_style); /* * lvgl extension definition for: - * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) + * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) */ -static mp_obj_t mp_lv_obj_get_screen(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return lv_to_mp((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool en = mp_obj_is_true(mp_args[3]); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, en); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_screen_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_screen); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_enabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_set_style_enabled); /* * lvgl extension definition for: - * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) + * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_display(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_display_t * _res = ((lv_display_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_display_t((void*)_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_display_mpobj, 1, mp_lv_obj_get_display, lv_obj_get_display); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_enabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_get_style_enabled); -/* Reusing lv_obj_get_screen for lv_obj_get_parent */ +/* Reusing lv_obj_set_style_enabled for lv_obj_style_set_disabled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_parent_mpobj, 1, mp_lv_obj_get_screen, lv_obj_get_parent); - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) - */ - -static mp_obj_t mp_lv_obj_get_child(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_func_ptr)(obj, idx); - return lv_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_child); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_style_set_disabled); -#define funcptr_constructor_cb NULL - - -/* - * lvgl extension definition for: - * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) - */ - -static mp_obj_t mp_funcptr_constructor_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); - lv_obj_t *obj = mp_to_lv(mp_args[1]); - ((void (*)(const lv_obj_class_t *, lv_obj_t *))lv_func_ptr)(class_p, obj); - return mp_const_none; -} - - +/* Reusing lv_obj_get_style_enabled for lv_obj_style_get_disabled */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_constructor_cb_mpobj, 2, mp_funcptr_constructor_cb, funcptr_constructor_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_style_get_disabled); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -#define funcptr_event_cb_1 NULL - /* * lvgl extension definition for: - * void event_cb(const lv_obj_class_t *class_p, lv_event_t *e) + * void lv_obj_enable_style_refresh(bool en) */ -static mp_obj_t mp_funcptr_event_cb_1(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_enable_style_refresh(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_to_ptr(mp_args[0]); - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[1]); - ((void (*)(const lv_obj_class_t *, lv_event_t *))lv_func_ptr)(class_p, e); + bool en = mp_obj_is_true(mp_args[0]); + ((void (*)(bool))lv_func_ptr)(en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_event_cb_1_mpobj, 2, mp_funcptr_event_cb_1, funcptr_event_cb_1); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_enable_style_refresh_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_obj_enable_style_refresh); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, func, NULL, MP_QSTR_, NULL); } - -static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); /* - * Struct lv_obj_class_t + * Struct lv_style_value_t */ -static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_obj_class_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_value_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_obj_class_t_type())); - return (lv_obj_class_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_value_t_type())); + return (lv_style_value_t*)self->data; } -#define mp_write_lv_obj_class_t(struct_obj) *((lv_obj_class_t*)mp_write_ptr_lv_obj_class_t(struct_obj)) +#define mp_write_lv_style_value_t(struct_obj) *((lv_style_value_t*)mp_write_ptr_lv_style_value_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_obj_class_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_value_t(void *field) { - return lv_to_mp_struct(get_mp_lv_obj_class_t_type(), field); + return lv_to_mp_struct(get_mp_lv_style_value_t_type(), field); } -#define mp_read_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(copy_buffer(&field, sizeof(lv_obj_class_t))) -#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) +#define mp_read_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(copy_buffer(&field, sizeof(lv_style_value_t))) +#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) -static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_obj_class_t *data = (lv_obj_class_t*)self->data; + GENMPY_UNUSED lv_style_value_t *data = (lv_style_value_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_base_class: dest[0] = ptr_to_mp((void*)data->base_class); break; // converting from lv_obj_class_t *; - case MP_QSTR_constructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_destructor_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_constructor_cb_mpobj, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_event_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_event_cb_1_mpobj, (void*)data->event_cb, lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, data->user_data); break; // converting from callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); - case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; - case MP_QSTR_name: dest[0] = convert_to_str((void*)data->name); break; // converting from char *; - case MP_QSTR_width_def: dest[0] = mp_obj_new_int(data->width_def); break; // converting from int32_t; - case MP_QSTR_height_def: dest[0] = mp_obj_new_int(data->height_def); break; // converting from int32_t; - case MP_QSTR_editable: dest[0] = mp_obj_new_int_from_uint(data->editable); break; // converting from uint32_t; - case MP_QSTR_group_def: dest[0] = mp_obj_new_int_from_uint(data->group_def); break; // converting from uint32_t; - case MP_QSTR_instance_size: dest[0] = mp_obj_new_int_from_uint(data->instance_size); break; // converting from uint32_t; - case MP_QSTR_theme_inheritable: dest[0] = mp_obj_new_int_from_uint(data->theme_inheritable); break; // converting from uint32_t; + case MP_QSTR_num: dest[0] = mp_obj_new_int(data->num); break; // converting from int32_t; + case MP_QSTR_ptr: dest[0] = ptr_to_mp((void*)data->ptr); break; // converting from void *; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -11440,18 +11024,9 @@ static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_base_class: data->base_class = (void*)mp_to_ptr(dest[1]); break; // converting to lv_obj_class_t *; - case MP_QSTR_constructor_cb: data->constructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_constructor_cb_callback ,MP_QSTR_lv_obj_class_t_constructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_destructor_cb: data->destructor_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_destructor_cb_callback ,MP_QSTR_lv_obj_class_t_destructor_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_obj_t *obj); - case MP_QSTR_event_cb: data->event_cb = (void*)mp_lv_callback(dest[1], lv_obj_class_t_event_cb_callback ,MP_QSTR_lv_obj_class_t_event_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback void (*)(lv_obj_class_t *class_p, lv_event_t *e); - case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_name: data->name = (void*)(char*)convert_from_str(dest[1]); break; // converting to char *; - case MP_QSTR_width_def: data->width_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_height_def: data->height_def = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_editable: data->editable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_group_def: data->group_def = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_instance_size: data->instance_size = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_theme_inheritable: data->theme_inheritable = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_num: data->num = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; + case MP_QSTR_ptr: data->ptr = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; default: return; } @@ -11460,372 +11035,450 @@ static void mp_lv_obj_class_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_obj_class_t_print(const mp_print_t *print, +static void mp_lv_style_value_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_obj_class_t"); + mp_printf(print, "struct lv_style_value_t"); } -static const mp_obj_dict_t mp_lv_obj_class_t_locals_dict; +static const mp_obj_dict_t mp_lv_style_value_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_obj_class_t_type, - MP_QSTR_lv_obj_class_t, + mp_lv_style_value_t_type, + MP_QSTR_lv_style_value_t, MP_TYPE_FLAG_NONE, - print, mp_lv_obj_class_t_print, + print, mp_lv_style_value_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_obj_class_t_attr, - locals_dict, &mp_lv_obj_class_t_locals_dict, + attr, mp_lv_style_value_t_attr, + locals_dict, &mp_lv_style_value_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_obj_class_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void) { - return &mp_lv_obj_class_t_type; + return &mp_lv_style_value_t_type; } /* * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) + * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_get_child_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t idx = (int32_t)mp_obj_get_int(mp_args[1]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[2]); - lv_obj_t * _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_func_ptr)(obj, idx, class_p); - return lv_to_mp((void*)_res); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); + return mp_read_lv_style_value_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_child_by_type); - -/* Reusing lv_obj_get_child for lv_obj_get_sibling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_mpobj, 2, mp_lv_obj_get_child, lv_obj_get_sibling); - -/* Reusing lv_obj_get_child_by_type for lv_obj_get_sibling_by_type */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_sibling_by_type_mpobj, 3, mp_lv_obj_get_child_by_type, lv_obj_get_sibling_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop); /* * lvgl extension definition for: - * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) + * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) */ -static mp_obj_t mp_lv_obj_get_child_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_has_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int_from_uint(_res); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_func_ptr)(obj, selector, prop); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_mpobj, 1, mp_lv_obj_get_child_count, lv_obj_get_child_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_style_prop_mpobj, 3, mp_lv_obj_has_style_prop, lv_obj_has_style_prop); /* * lvgl extension definition for: - * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) + * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_child_count_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_set_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); - uint32_t _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); - return mp_obj_new_int_from_uint(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_value_t value = mp_write_lv_style_value_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_child_count_by_type_mpobj, 2, mp_lv_obj_get_child_count_by_type, lv_obj_get_child_count_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_local_style_prop_mpobj, 4, mp_lv_obj_set_local_style_prop, lv_obj_set_local_style_prop); /* * lvgl extension definition for: - * int32_t lv_obj_get_index(const lv_obj_t *obj) + * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_index(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_obj_t *))lv_func_ptr)(obj); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_value_t *value = mp_write_ptr_lv_style_value_t(mp_args[2]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_style_res_t _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_index); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_local_style_prop_mpobj, 4, mp_lv_obj_get_local_style_prop, lv_obj_get_local_style_prop); /* * lvgl extension definition for: - * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) + * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) */ -static mp_obj_t mp_lv_obj_get_index_by_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_remove_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_func_ptr)(obj, class_p); - return mp_obj_new_int(_res); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_func_ptr)(obj, prop, selector); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_index_by_type_mpobj, 2, mp_lv_obj_get_index_by_type, lv_obj_get_index_by_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_local_style_prop_mpobj, 3, mp_lv_obj_remove_local_style_prop, lv_obj_remove_local_style_prop); /* - * Callback function lv_obj_tree_walk_cb - * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) + * lvgl extension definition for: + * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) */ -GENMPY_UNUSED static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) +static mp_obj_t mp_lv_obj_style_apply_color_filter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = lv_to_mp((void*)arg0); - mp_args[1] = ptr_to_mp((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg1); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_obj_tree_walk_cb)), 2, mp_args); - return (int)mp_obj_get_int(callback_result); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_style_value_t v = mp_write_lv_style_value_t(mp_args[2]); + lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_func_ptr)(obj, part, v); + return mp_read_lv_style_value_t(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter); + /* * lvgl extension definition for: - * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) + * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) */ -static mp_obj_t mp_lv_obj_tree_walk(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_fade_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *cb = mp_lv_callback(mp_args[1], &lv_obj_tree_walk_cb_callback, MP_QSTR_lv_obj_tree_walk_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_obj_t *start_obj = mp_to_lv(mp_args[0]); - ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_func_ptr)(start_obj, cb, user_data); + lv_obj_t *obj = mp_to_lv(mp_args[0]); + uint32_t time = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, time, delay); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_tree_walk_mpobj, 3, mp_lv_obj_tree_walk, lv_obj_tree_walk); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_in_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_in); -/* Reusing lv_obj_move_foreground for lv_obj_dump_tree */ +/* Reusing lv_obj_fade_in for lv_obj_fade_out */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_dump_tree_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_dump_tree); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_out_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_out); /* * lvgl extension definition for: - * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) + * int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_set_pos(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_func_ptr)(obj, x, y); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_pos_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_width); -/* Reusing lv_obj_move_to_index for lv_obj_set_x */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_x_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_width); -/* Reusing lv_obj_move_to_index for lv_obj_set_y */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_y_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_width); -/* Reusing lv_obj_set_pos for lv_obj_set_size */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_size_mpobj, 3, mp_lv_obj_set_pos, lv_obj_set_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_height); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_min_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_min_height); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_max_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_max_height); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_length */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_length); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_x); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_y); /* * lvgl extension definition for: - * bool lv_obj_refr_size(lv_obj_t *obj) + * lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_refr_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - bool _res = ((bool (*)(lv_obj_t *))lv_func_ptr)(obj); - return convert_to_bool(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_align_t _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refr_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align, lv_obj_get_style_align); -/* Reusing lv_obj_move_to_index for lv_obj_set_width */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_width); -/* Reusing lv_obj_move_to_index for lv_obj_set_height */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_height); -/* Reusing lv_obj_move_to_index for lv_obj_set_content_width */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_width_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_x); -/* Reusing lv_obj_move_to_index for lv_obj_set_content_height */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_content_height_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_content_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_y); -/* Reusing lv_obj_delete_delayed for lv_obj_set_layout */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_translate_radial */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_layout_mpobj, 2, mp_lv_obj_delete_delayed, lv_obj_set_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_translate_radial); +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x */ -/* - * lvgl extension definition for: - * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y */ -static mp_obj_t mp_lv_obj_is_layout_positioned(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - bool _res = ((bool (*)(const lv_obj_t *))lv_func_ptr)(obj); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_rotation */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_rotation); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_layout_positioned_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_layout_positioned); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_x); -/* Reusing lv_obj_move_foreground for lv_obj_mark_layout_as_dirty */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_pivot_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_mark_layout_as_dirty_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_mark_layout_as_dirty); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_pivot_y); +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_x */ -/* - * lvgl extension definition for: - * void lv_obj_update_layout(const lv_obj_t *obj) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_x); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_skew_y */ -static mp_obj_t mp_lv_obj_update_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - ((void (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_skew_y); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_top */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_top); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layout_mpobj, 1, mp_lv_obj_update_layout, lv_obj_update_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_bottom); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_left); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_right); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_row */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_row); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_column */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_column); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_pad_radial */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_pad_radial); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_top); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_bottom); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_left */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_left); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_margin_right */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_margin_right); /* * lvgl extension definition for: - * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) + * lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_set_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_color(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_align_t))lv_func_ptr)(obj, align); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_color_t _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_align_mpobj, 2, mp_lv_obj_set_align, lv_obj_set_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_color_filtered); /* * lvgl extension definition for: - * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + * lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_opa(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_align_t align = (int)mp_obj_get_int(mp_args[1]); - int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, align, x_ofs, y_ofs); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_opa_t _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_mpobj, 4, mp_lv_obj_align, lv_obj_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_opa); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_grad_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_grad_color_filtered); /* * lvgl extension definition for: - * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) + * lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_align_to(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(mp_args[1]); - lv_align_t align = (int)mp_obj_get_int(mp_args[2]); - int32_t x_ofs = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y_ofs = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(obj, base, align, x_ofs, y_ofs); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_grad_dir_t _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_align_to_mpobj, 5, mp_lv_obj_align_to, lv_obj_align_to); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir, lv_obj_get_style_bg_grad_dir); -/* Reusing lv_obj_move_foreground for lv_obj_center */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_main_stop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_center_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_center); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_main_stop); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_bg_grad_stop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_bg_grad_stop); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_main_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_main_opa); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_grad_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_grad_opa); /* - * Struct lv_matrix_t + * Struct lv_grad_stop_t */ -static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_matrix_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_stop_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_matrix_t_type())); - return (lv_matrix_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_stop_t_type())); + return (lv_grad_stop_t*)self->data; } -#define mp_write_lv_matrix_t(struct_obj) *((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj)) +#define mp_write_lv_grad_stop_t(struct_obj) *((lv_grad_stop_t*)mp_write_ptr_lv_grad_stop_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_matrix_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_stop_t(void *field) { - return lv_to_mp_struct(get_mp_lv_matrix_t_type(), field); + return lv_to_mp_struct(get_mp_lv_grad_stop_t_type(), field); } -#define mp_read_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(copy_buffer(&field, sizeof(lv_matrix_t))) -#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) +#define mp_read_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(copy_buffer(&field, sizeof(lv_grad_stop_t))) +#define mp_read_byref_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(&field) -static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_grad_stop_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_matrix_t *data = (lv_matrix_t*)self->data; + GENMPY_UNUSED lv_grad_stop_t *data = (lv_grad_stop_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - ; + case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_opa: dest[0] = mp_obj_new_int_from_uint(data->opa); break; // converting from lv_opa_t; + case MP_QSTR_frac: dest[0] = mp_obj_new_int_from_uint(data->frac); break; // converting from uint8_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -11834,7 +11487,9 @@ static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - ; + case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_opa: data->opa = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to lv_opa_t; + case MP_QSTR_frac: data->frac = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; default: return; } @@ -11843,716 +11498,439 @@ static void mp_lv_matrix_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_matrix_t_print(const mp_print_t *print, +static void mp_lv_grad_stop_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_matrix_t"); + mp_printf(print, "struct lv_grad_stop_t"); } -static const mp_obj_dict_t mp_lv_matrix_t_locals_dict; +static const mp_obj_dict_t mp_lv_grad_stop_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_matrix_t_type, - MP_QSTR_lv_matrix_t, + mp_lv_grad_stop_t_type, + MP_QSTR_lv_grad_stop_t, MP_TYPE_FLAG_NONE, - print, mp_lv_matrix_t_print, + print, mp_lv_grad_stop_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_matrix_t_attr, - locals_dict, &mp_lv_matrix_t_locals_dict, + attr, mp_lv_grad_stop_t_attr, + locals_dict, &mp_lv_grad_stop_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_matrix_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_grad_stop_t_type(void) { - return &mp_lv_matrix_t_type; + return &mp_lv_grad_stop_t_type; } /* - * lvgl extension definition for: - * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) + * Array convertors for lv_grad_stop_t [2] */ -static mp_obj_t mp_lv_obj_set_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_grad_stop_t *mp_arr_to_lv_grad_stop_t___2__(mp_obj_t mp_arr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(mp_args[1]); - ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_func_ptr)(obj, matrix); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + //TODO check dim! + lv_grad_stop_t *lv_arr = (lv_grad_stop_t*)m_malloc(len * sizeof(lv_grad_stop_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_grad_stop_t(item); + } + return (lv_grad_stop_t *)lv_arr; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_transform_mpobj, 2, mp_lv_obj_set_transform, lv_obj_set_transform); - -/* Reusing lv_obj_move_foreground for lv_obj_reset_transform */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_grad_stop_t___2__(lv_grad_stop_t *arr) +{ + mp_obj_t obj_arr[2]; + for (size_t i=0; i<2; i++){ + obj_arr[i] = mp_read_lv_grad_stop_t(arr[i]); + } + return mp_obj_new_list(2, obj_arr); // TODO: return custom iterable object! +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_reset_transform_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_reset_transform); - +typedef __typeof__( ((lv_grad_dsc_t*)(0))->params ) lv_grad_dsc_params_t; +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->linear ) lv_grad_dsc_params_linear_t; /* - * lvgl extension definition for: - * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) + * Struct lv_grad_dsc_params_linear_t */ -static mp_obj_t mp_lv_obj_get_coords(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_linear_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *coords = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, coords); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_linear_t_type())); + return (lv_grad_dsc_params_linear_t*)self->data; } - +#define mp_write_lv_grad_dsc_params_linear_t(struct_obj) *((lv_grad_dsc_params_linear_t*)mp_write_ptr_lv_grad_dsc_params_linear_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_coords); - -/* Reusing lv_obj_get_index for lv_obj_get_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x); - -/* Reusing lv_obj_get_index for lv_obj_get_x2 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x2); - -/* Reusing lv_obj_get_index for lv_obj_get_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y); - -/* Reusing lv_obj_get_index for lv_obj_get_y2 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y2_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y2); - -/* Reusing lv_obj_get_index for lv_obj_get_x_aligned */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_x_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_x_aligned); - -/* Reusing lv_obj_get_index for lv_obj_get_y_aligned */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_y_aligned_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_y_aligned); - -/* Reusing lv_obj_get_index for lv_obj_get_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_width); - -/* Reusing lv_obj_get_index for lv_obj_get_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_height); - -/* Reusing lv_obj_get_index for lv_obj_get_content_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_width); - -/* Reusing lv_obj_get_index for lv_obj_get_content_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_content_height); - -/* Reusing lv_obj_get_coords for lv_obj_get_content_coords */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_content_coords_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_content_coords); - -/* Reusing lv_obj_get_index for lv_obj_get_self_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_width_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_width); - -/* Reusing lv_obj_get_index for lv_obj_get_self_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_self_height_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_self_height); - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_get_style_clamped_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_width_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_width); - -/* Reusing lv_obj_get_style_clamped_width for lv_obj_get_style_clamped_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clamped_height_mpobj, 1, mp_lv_obj_get_style_clamped_width, lv_obj_get_style_clamped_height); - -/* Reusing lv_obj_refr_size for lv_obj_is_style_any_width_content */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_width_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_width_content); - -/* Reusing lv_obj_refr_size for lv_obj_is_style_any_height_content */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_style_any_height_content_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_style_any_height_content); - -/* Reusing lv_obj_refr_size for lv_obj_is_width_min */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_min); - -/* Reusing lv_obj_refr_size for lv_obj_is_height_min */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_min_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_min); - -/* Reusing lv_obj_refr_size for lv_obj_is_width_max */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_width_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_width_max); - -/* Reusing lv_obj_refr_size for lv_obj_is_height_max */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_height_max_mpobj, 1, mp_lv_obj_refr_size, lv_obj_is_height_max); - -/* Reusing lv_obj_refr_size for lv_obj_refresh_self_size */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_self_size_mpobj, 1, mp_lv_obj_refr_size, lv_obj_refresh_self_size); - -/* Reusing lv_obj_move_foreground for lv_obj_refr_pos */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refr_pos_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_refr_pos); - -/* Reusing lv_obj_set_pos for lv_obj_move_to */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_to_mpobj, 3, mp_lv_obj_set_pos, lv_obj_move_to); - - -/* - * lvgl extension definition for: - * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) - */ - -static mp_obj_t mp_lv_obj_move_children_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x_diff = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y_diff = (int32_t)mp_obj_get_int(mp_args[2]); - bool ignore_floating = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_func_ptr)(obj, x_diff, y_diff, ignore_floating); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_move_children_by_mpobj, 4, mp_lv_obj_move_children_by, lv_obj_move_children_by); - - -/* - * lvgl extension definition for: - * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) - */ - -static mp_obj_t mp_lv_obj_get_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_linear_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_matrix_t * _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_read_ptr_lv_matrix_t((void*)_res); + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_linear_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transform_mpobj, 1, mp_lv_obj_get_transform, lv_obj_get_transform); - - -/* - * lvgl extension definition for: - * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) - */ +#define mp_read_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_linear_t))) +#define mp_read_byref_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(&field) -static mp_obj_t mp_lv_obj_transform_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_linear_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[1]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, p, flags); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_mpobj, 3, mp_lv_obj_transform_point, lv_obj_transform_point); - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)self->data; -/* - * Array convertors for lv_point_t [] - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_start: dest[0] = mp_read_byref_lv_point_t(data->start); break; // converting from lv_point_t; + case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_start: data->start = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + default: return; + } -GENMPY_UNUSED static lv_point_t *mp_arr_to_lv_point_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_point_t *lv_arr = (lv_point_t*)m_malloc(len * sizeof(lv_point_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_point_t(item); + dest[0] = MP_OBJ_NULL; // indicate success + } } - return (lv_point_t *)lv_arr; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_point_t_____(lv_point_t *arr) +static void mp_lv_grad_dsc_params_linear_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - return mp_read_ptr_lv_point_t((void*)arr); + mp_printf(print, "struct lv_grad_dsc_params_linear_t"); } +static const mp_obj_dict_t mp_lv_grad_dsc_params_linear_t_locals_dict; -/* - * lvgl extension definition for: - * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_linear_t_type, + MP_QSTR_lv_grad_dsc_params_linear_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_linear_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_linear_t_attr, + locals_dict, &mp_lv_grad_dsc_params_linear_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_obj_transform_point_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_linear_t_type(void) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_point_t *points = mp_arr_to_lv_point_t_____(mp_args[1]); - size_t count = (size_t)mp_obj_get_int(mp_args[2]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[3]); - ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, points, count, flags); - return mp_const_none; + return &mp_lv_grad_dsc_params_linear_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_transform_point_array_mpobj, 4, mp_lv_obj_transform_point_array, lv_obj_transform_point_array); +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->radial ) lv_grad_dsc_params_radial_t; /* - * lvgl extension definition for: - * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) + * Struct lv_grad_dsc_params_radial_t */ -static mp_obj_t mp_lv_obj_get_transformed_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(mp_args[2]); - ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_func_ptr)(obj, area, flags); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_transformed_area_mpobj, 3, mp_lv_obj_get_transformed_area, lv_obj_get_transformed_area); - - -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) - */ +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void); -static mp_obj_t mp_lv_obj_invalidate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_radial_t(mp_obj_t self_in) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_func_ptr)(obj, area); - return mp_obj_new_int(_res); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_radial_t_type())); + return (lv_grad_dsc_params_radial_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_area_mpobj, 2, mp_lv_obj_invalidate_area, lv_obj_invalidate_area); - - -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) - */ +#define mp_write_lv_grad_dsc_params_radial_t(struct_obj) *((lv_grad_dsc_params_radial_t*)mp_write_ptr_lv_grad_dsc_params_radial_t(struct_obj)) -static mp_obj_t mp_lv_obj_invalidate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_radial_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_radial_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_invalidate_mpobj, 1, mp_lv_obj_invalidate, lv_obj_invalidate); - - -/* - * lvgl extension definition for: - * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) - */ +#define mp_read_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_radial_t))) +#define mp_read_byref_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(&field) -static mp_obj_t mp_lv_obj_area_is_visible(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_radial_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - bool _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_func_ptr)(obj, area); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_area_is_visible_mpobj, 2, mp_lv_obj_area_is_visible, lv_obj_area_is_visible); - -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_visible */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_visible_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_visible); - -/* Reusing lv_obj_move_to_index for lv_obj_set_ext_click_area */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_ext_click_area_mpobj, 2, mp_lv_obj_move_to_index, lv_obj_set_ext_click_area); - -/* Reusing lv_obj_get_coords for lv_obj_get_click_area */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_click_area_mpobj, 2, mp_lv_obj_get_coords, lv_obj_get_click_area); - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)self->data; -/* - * lvgl extension definition for: - * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_focal: dest[0] = mp_read_byref_lv_point_t(data->focal); break; // converting from lv_point_t; + case MP_QSTR_focal_extent: dest[0] = mp_read_byref_lv_point_t(data->focal_extent); break; // converting from lv_point_t; + case MP_QSTR_end: dest[0] = mp_read_byref_lv_point_t(data->end); break; // converting from lv_point_t; + case MP_QSTR_end_extent: dest[0] = mp_read_byref_lv_point_t(data->end_extent); break; // converting from lv_point_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_focal: data->focal = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_focal_extent: data->focal_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_end: data->end = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_end_extent: data->end_extent = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + default: return; + } -static mp_obj_t mp_lv_obj_hit_test(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - bool _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_func_ptr)(obj, point); - return convert_to_bool(_res); + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_hit_test_mpobj, 2, mp_lv_obj_hit_test, lv_obj_hit_test); - - -/* - * lvgl extension definition for: - * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) - */ - -static mp_obj_t mp_lv_obj_calc_dynamic_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_radial_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_func_ptr)(obj, prop); - return mp_obj_new_int(_res); + mp_printf(print, "struct lv_grad_dsc_params_radial_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_width_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_width); - -/* Reusing lv_obj_calc_dynamic_width for lv_obj_calc_dynamic_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calc_dynamic_height_mpobj, 2, mp_lv_obj_calc_dynamic_width, lv_obj_calc_dynamic_height); - +static const mp_obj_dict_t mp_lv_grad_dsc_params_radial_t_locals_dict; -/* - * lvgl extension definition for: - * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_radial_t_type, + MP_QSTR_lv_grad_dsc_params_radial_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_radial_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_radial_t_attr, + locals_dict, &mp_lv_grad_dsc_params_radial_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_obj_set_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_radial_t_type(void) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_func_ptr)(obj, mode); - return mp_const_none; + return &mp_lv_grad_dsc_params_radial_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scrollbar_mode_mpobj, 2, mp_lv_obj_set_scrollbar_mode, lv_obj_set_scrollbar_mode); +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->conical ) lv_grad_dsc_params_conical_t; /* - * lvgl extension definition for: - * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) + * Struct lv_grad_dsc_params_conical_t */ -static mp_obj_t mp_lv_obj_set_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_dir_t dir = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_dir_t))lv_func_ptr)(obj, dir); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_dir_mpobj, 2, mp_lv_obj_set_scroll_dir, lv_obj_set_scroll_dir); - - -/* - * lvgl extension definition for: - * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) - */ +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void); -static mp_obj_t mp_lv_obj_set_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_conical_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_scroll_snap_t align = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_func_ptr)(obj, align); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_conical_t_type())); + return (lv_grad_dsc_params_conical_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_x_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_x); - -/* Reusing lv_obj_set_scroll_snap_x for lv_obj_set_scroll_snap_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_scroll_snap_y_mpobj, 2, mp_lv_obj_set_scroll_snap_x, lv_obj_set_scroll_snap_y); - - -/* - * lvgl extension definition for: - * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) - */ +#define mp_write_lv_grad_dsc_params_conical_t(struct_obj) *((lv_grad_dsc_params_conical_t*)mp_write_ptr_lv_grad_dsc_params_conical_t(struct_obj)) -static mp_obj_t mp_lv_obj_get_scrollbar_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_conical_t(void *field) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_scrollbar_mode_t _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_conical_t_type(), field); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_mode_mpobj, 1, mp_lv_obj_get_scrollbar_mode, lv_obj_get_scrollbar_mode); - - -/* - * lvgl extension definition for: - * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) - */ +#define mp_read_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_conical_t))) +#define mp_read_byref_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(&field) -static mp_obj_t mp_lv_obj_get_scroll_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_conical_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_dir_mpobj, 1, mp_lv_obj_get_scroll_dir, lv_obj_get_scroll_dir); - + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)self->data; -/* - * lvgl extension definition for: - * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) - */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_center: dest[0] = mp_read_byref_lv_point_t(data->center); break; // converting from lv_point_t; + case MP_QSTR_start_angle: dest[0] = mp_obj_new_int(data->start_angle); break; // converting from int16_t; + case MP_QSTR_end_angle: dest[0] = mp_obj_new_int(data->end_angle); break; // converting from int16_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_center: data->center = mp_write_lv_point_t(dest[1]); break; // converting to lv_point_t; + case MP_QSTR_start_angle: data->start_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + case MP_QSTR_end_angle: data->end_angle = (int16_t)mp_obj_get_int(dest[1]); break; // converting to int16_t; + default: return; + } -static mp_obj_t mp_lv_obj_get_scroll_snap_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_scroll_snap_t _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_func_ptr)(obj); - return mp_obj_new_int(_res); + dest[0] = MP_OBJ_NULL; // indicate success + } + } } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_x_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_x); - -/* Reusing lv_obj_get_scroll_snap_x for lv_obj_get_scroll_snap_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_snap_y_mpobj, 1, mp_lv_obj_get_scroll_snap_x, lv_obj_get_scroll_snap_y); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_x_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_x); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_y_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_y); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_top */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_top_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_top); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_bottom */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_bottom_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_bottom); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_left */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_left_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_left); - -/* Reusing lv_obj_get_index for lv_obj_get_scroll_right */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_right_mpobj, 1, mp_lv_obj_get_index, lv_obj_get_scroll_right); - - -/* - * lvgl extension definition for: - * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) - */ - -static mp_obj_t mp_lv_obj_get_scroll_end(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_conical_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_point_t *end = mp_write_ptr_lv_point_t(mp_args[1]); - ((void (*)(lv_obj_t *, lv_point_t *))lv_func_ptr)(obj, end); - return mp_const_none; + mp_printf(print, "struct lv_grad_dsc_params_conical_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scroll_end_mpobj, 2, mp_lv_obj_get_scroll_end, lv_obj_get_scroll_end); - +static const mp_obj_dict_t mp_lv_grad_dsc_params_conical_t_locals_dict; -/* - * lvgl extension definition for: - * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) - */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_conical_t_type, + MP_QSTR_lv_grad_dsc_params_conical_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_conical_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_conical_t_attr, + locals_dict, &mp_lv_grad_dsc_params_conical_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static mp_obj_t mp_lv_obj_scroll_by(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_conical_t_type(void) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t dx = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t dy = (int32_t)mp_obj_get_int(mp_args[2]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, dx, dy, anim_en); - return mp_const_none; + return &mp_lv_grad_dsc_params_conical_t_type; } - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by); - -/* Reusing lv_obj_scroll_by for lv_obj_scroll_by_bounded */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_by_bounded_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_by_bounded); - -/* Reusing lv_obj_scroll_by for lv_obj_scroll_to */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_mpobj, 4, mp_lv_obj_scroll_by, lv_obj_scroll_to); /* - * lvgl extension definition for: - * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) + * Struct lv_grad_dsc_params_t */ -static mp_obj_t mp_lv_obj_scroll_to_x(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[2]); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_func_ptr)(obj, x, anim_en); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_x_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_x); - -/* Reusing lv_obj_scroll_to_x for lv_obj_scroll_to_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_y_mpobj, 3, mp_lv_obj_scroll_to_x, lv_obj_scroll_to_y); - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) - */ +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void); -static mp_obj_t mp_lv_obj_scroll_to_view(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_params_t(mp_obj_t self_in) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_anim_enable_t anim_en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_func_ptr)(obj, anim_en); - return mp_const_none; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_params_t_type())); + return (lv_grad_dsc_params_t*)self->data; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view); - -/* Reusing lv_obj_scroll_to_view for lv_obj_scroll_to_view_recursive */ +#define mp_write_lv_grad_dsc_params_t(struct_obj) *((lv_grad_dsc_params_t*)mp_write_ptr_lv_grad_dsc_params_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scroll_to_view_recursive_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_scroll_to_view_recursive); - -/* Reusing lv_obj_is_layout_positioned for lv_obj_is_scrolling */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_params_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_grad_dsc_params_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_is_scrolling_mpobj, 1, mp_lv_obj_is_layout_positioned, lv_obj_is_scrolling); - -/* Reusing lv_obj_update_layout for lv_obj_stop_scroll_anim */ +#define mp_read_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(copy_buffer(&field, sizeof(lv_grad_dsc_params_t))) +#define mp_read_byref_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_stop_scroll_anim_mpobj, 1, mp_lv_obj_update_layout, lv_obj_stop_scroll_anim); - -/* Reusing lv_obj_scroll_to_view for lv_obj_update_snap */ +static void mp_lv_grad_dsc_params_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_snap_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_update_snap); - + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_linear: dest[0] = mp_read_byref_lv_grad_dsc_params_linear_t(data->linear); break; // converting from lv_grad_dsc_params_linear_t; + case MP_QSTR_radial: dest[0] = mp_read_byref_lv_grad_dsc_params_radial_t(data->radial); break; // converting from lv_grad_dsc_params_radial_t; + case MP_QSTR_conical: dest[0] = mp_read_byref_lv_grad_dsc_params_conical_t(data->conical); break; // converting from lv_grad_dsc_params_conical_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_linear: data->linear = mp_write_lv_grad_dsc_params_linear_t(dest[1]); break; // converting to lv_grad_dsc_params_linear_t; + case MP_QSTR_radial: data->radial = mp_write_lv_grad_dsc_params_radial_t(dest[1]); break; // converting to lv_grad_dsc_params_radial_t; + case MP_QSTR_conical: data->conical = mp_write_lv_grad_dsc_params_conical_t(dest[1]); break; // converting to lv_grad_dsc_params_conical_t; + default: return; + } -/* - * lvgl extension definition for: - * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) - */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static mp_obj_t mp_lv_obj_get_scrollbar_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static void mp_lv_grad_dsc_params_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_area_t *hor_area = mp_write_ptr_lv_area_t(mp_args[1]); - lv_area_t *ver_area = mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_func_ptr)(obj, hor_area, ver_area); - return mp_const_none; + mp_printf(print, "struct lv_grad_dsc_params_t"); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_scrollbar_area_mpobj, 3, mp_lv_obj_get_scrollbar_area, lv_obj_get_scrollbar_area); - -/* Reusing lv_obj_move_foreground for lv_obj_scrollbar_invalidate */ +static const mp_obj_dict_t mp_lv_grad_dsc_params_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_scrollbar_invalidate_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_scrollbar_invalidate); - -/* Reusing lv_obj_scroll_to_view for lv_obj_readjust_scroll */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_grad_dsc_params_t_type, + MP_QSTR_lv_grad_dsc_params_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_grad_dsc_params_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_grad_dsc_params_t_attr, + locals_dict, &mp_lv_grad_dsc_params_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_readjust_scroll_mpobj, 2, mp_lv_obj_scroll_to_view, lv_obj_readjust_scroll); +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_params_t_type(void) +{ + return &mp_lv_grad_dsc_params_t_type; +} /* - * Struct lv_style_t + * Struct lv_grad_dsc_t */ -static inline const mp_obj_type_t *get_mp_lv_style_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_grad_dsc_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_t_type())); - return (lv_style_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_grad_dsc_t_type())); + return (lv_grad_dsc_t*)self->data; } -#define mp_write_lv_style_t(struct_obj) *((lv_style_t*)mp_write_ptr_lv_style_t(struct_obj)) +#define mp_write_lv_grad_dsc_t(struct_obj) *((lv_grad_dsc_t*)mp_write_ptr_lv_grad_dsc_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_grad_dsc_t(void *field) { - return lv_to_mp_struct(get_mp_lv_style_t_type(), field); + return lv_to_mp_struct(get_mp_lv_grad_dsc_t_type(), field); } -#define mp_read_lv_style_t(field) mp_read_ptr_lv_style_t(copy_buffer(&field, sizeof(lv_style_t))) -#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) +#define mp_read_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(copy_buffer(&field, sizeof(lv_grad_dsc_t))) +#define mp_read_byref_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(&field) -static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_grad_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_t *data = (lv_style_t*)self->data; + GENMPY_UNUSED lv_grad_dsc_t *data = (lv_grad_dsc_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_values_and_props: dest[0] = ptr_to_mp((void*)data->values_and_props); break; // converting from void *; - case MP_QSTR_has_group: dest[0] = mp_obj_new_int_from_uint(data->has_group); break; // converting from uint32_t; - case MP_QSTR_prop_cnt: dest[0] = mp_obj_new_int_from_uint(data->prop_cnt); break; // converting from uint8_t; + case MP_QSTR_stops: dest[0] = mp_lv_struct_array_new(self_in, data->stops, 2, sizeof(lv_grad_stop_t), mp_read_ptr_lv_grad_stop_t, mp_write_ptr_lv_grad_stop_t); break; // converting from lv_grad_stop_t [2]; + case MP_QSTR_stops_count: dest[0] = mp_obj_new_int_from_uint(data->stops_count); break; // converting from uint8_t; + case MP_QSTR_dir: dest[0] = mp_obj_new_int(data->dir); break; // converting from lv_grad_dir_t; + case MP_QSTR_extend: dest[0] = mp_obj_new_int(data->extend); break; // converting from lv_grad_extend_t; + case MP_QSTR_params: dest[0] = mp_read_byref_lv_grad_dsc_params_t(data->params); break; // converting from lv_grad_dsc_params_t; + case MP_QSTR_state: dest[0] = ptr_to_mp((void*)data->state); break; // converting from void *; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -12561,9 +11939,12 @@ static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) // store attribute switch(attr) { - case MP_QSTR_values_and_props: data->values_and_props = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_has_group: data->has_group = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; - case MP_QSTR_prop_cnt: data->prop_cnt = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_stops: mp_lv_struct_array_assign(data->stops, 2, sizeof(lv_grad_stop_t), mp_write_ptr_lv_grad_stop_t, dest[1]); break; // converting to lv_grad_stop_t [2]; + case MP_QSTR_stops_count: data->stops_count = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_dir: data->dir = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_dir_t; + case MP_QSTR_extend: data->extend = (int)mp_obj_get_int(dest[1]); break; // converting to lv_grad_extend_t; + case MP_QSTR_params: data->params = mp_write_lv_grad_dsc_params_t(dest[1]); break; // converting to lv_grad_dsc_params_t; + case MP_QSTR_state: data->state = (void*)mp_to_ptr(dest[1]); break; // converting to void *; default: return; } @@ -12572,234 +11953,240 @@ static void mp_lv_style_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) } } -static void mp_lv_style_t_print(const mp_print_t *print, +static void mp_lv_grad_dsc_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_style_t"); + mp_printf(print, "struct lv_grad_dsc_t"); } -static const mp_obj_dict_t mp_lv_style_t_locals_dict; +static const mp_obj_dict_t mp_lv_grad_dsc_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_t_type, - MP_QSTR_lv_style_t, + mp_lv_grad_dsc_t_type, + MP_QSTR_lv_grad_dsc_t, MP_TYPE_FLAG_NONE, - print, mp_lv_style_t_print, + print, mp_lv_grad_dsc_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_style_t_attr, - locals_dict, &mp_lv_style_t_locals_dict, + attr, mp_lv_grad_dsc_t_attr, + locals_dict, &mp_lv_grad_dsc_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_style_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_grad_dsc_t_type(void) { - return &mp_lv_style_t_type; + return &mp_lv_grad_dsc_t_type; } /* * lvgl extension definition for: - * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + * const lv_grad_dsc_t *lv_obj_get_style_bg_grad(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_add_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_grad(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_grad_dsc_t * _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_grad_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_add_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_add_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad, lv_obj_get_style_bg_grad); /* * lvgl extension definition for: - * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) + * const void *lv_obj_get_style_bg_image_src(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_replace_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_src(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, old_style, new_style, selector); - return convert_to_bool(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const void * _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_replace_style_mpobj, 4, mp_lv_obj_replace_style, lv_obj_replace_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bg_image_src); -/* Reusing lv_obj_add_style for lv_obj_remove_style */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_mpobj, 3, mp_lv_obj_add_style, lv_obj_remove_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_opa); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_bg_image_recolor_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_bg_image_recolor_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_bg_image_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_bg_image_recolor_opa); /* * lvgl extension definition for: - * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) + * bool lv_obj_get_style_bg_image_tiled(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_remove_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_bg_image_tiled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_obj_t *, lv_style_selector_t))lv_func_ptr)(obj, selector); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_theme_mpobj, 2, mp_lv_obj_remove_theme, lv_obj_remove_theme); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_bg_image_tiled); -/* Reusing lv_obj_move_foreground for lv_obj_remove_style_all */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_style_all_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_remove_style_all); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color); +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_border_color_filtered */ -/* - * lvgl extension definition for: - * void lv_obj_report_style_change(lv_style_t *style) - */ - -static mp_obj_t mp_lv_obj_report_style_change(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - ((void (*)(lv_style_t *))lv_func_ptr)(style); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_border_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_border_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_border_opa); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_border_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_report_style_change_mpobj, 1, mp_lv_obj_report_style_change, lv_obj_report_style_change); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_border_width); /* * lvgl extension definition for: - * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) + * lv_border_side_t lv_obj_get_style_border_side(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_refresh_style(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_border_side(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); - return mp_const_none; + lv_border_side_t _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_refresh_style_mpobj, 3, mp_lv_obj_refresh_style, lv_obj_refresh_style); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side, lv_obj_get_style_border_side); +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_border_post */ -/* - * lvgl extension definition for: - * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_border_post); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_width */ -static mp_obj_t mp_lv_obj_set_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool en = mp_obj_is_true(mp_args[3]); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_func_ptr)(obj, style, selector, en); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_width); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_outline_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_enabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_set_style_enabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_outline_color_filtered); +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_outline_opa */ -/* - * lvgl extension definition for: - * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_outline_opa); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_outline_pad */ -static mp_obj_t mp_lv_obj_get_style_enabled(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_func_ptr)(obj, style, selector); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_outline_pad); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_width */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_width); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_enabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_get_style_enabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_x); -/* Reusing lv_obj_set_style_enabled for lv_obj_style_set_disabled */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_set_disabled_mpobj, 4, mp_lv_obj_set_style_enabled, lv_obj_style_set_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_offset_y); -/* Reusing lv_obj_get_style_enabled for lv_obj_style_get_disabled */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_get_disabled_mpobj, 3, mp_lv_obj_get_style_enabled, lv_obj_style_get_disabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_shadow_spread); +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color */ -/* - * lvgl extension definition for: - * void lv_obj_enable_style_refresh(bool en) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_shadow_color_filtered */ -static mp_obj_t mp_lv_obj_enable_style_refresh(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - bool en = mp_obj_is_true(mp_args[0]); - ((void (*)(bool))lv_func_ptr)(en); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_shadow_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_shadow_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_shadow_opa); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_obj_enable_style_refresh_mpobj, 1, mp_lv_obj_enable_style_refresh, lv_obj_enable_style_refresh); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_opa); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_image_recolor_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_image_recolor_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_image_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_image_recolor_opa); /* - * Struct lv_style_value_t + * Struct lv_image_colorkey_t */ -static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void); +static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void); -GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_value_t(mp_obj_t self_in) +GENMPY_UNUSED static inline void* mp_write_ptr_lv_image_colorkey_t(mp_obj_t self_in) { - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_value_t_type())); - return (lv_style_value_t*)self->data; + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_image_colorkey_t_type())); + return (lv_image_colorkey_t*)self->data; } -#define mp_write_lv_style_value_t(struct_obj) *((lv_style_value_t*)mp_write_ptr_lv_style_value_t(struct_obj)) +#define mp_write_lv_image_colorkey_t(struct_obj) *((lv_image_colorkey_t*)mp_write_ptr_lv_image_colorkey_t(struct_obj)) -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_value_t(void *field) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_image_colorkey_t(void *field) { - return lv_to_mp_struct(get_mp_lv_style_value_t_type(), field); + return lv_to_mp_struct(get_mp_lv_image_colorkey_t_type(), field); } -#define mp_read_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(copy_buffer(&field, sizeof(lv_style_value_t))) -#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) +#define mp_read_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(copy_buffer(&field, sizeof(lv_image_colorkey_t))) +#define mp_read_byref_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(&field) -static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +static void mp_lv_image_colorkey_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) { mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_style_value_t *data = (lv_style_value_t*)self->data; + GENMPY_UNUSED lv_image_colorkey_t *data = (lv_image_colorkey_t*)self->data; if (dest[0] == MP_OBJ_NULL) { // load attribute switch(attr) { - case MP_QSTR_num: dest[0] = mp_obj_new_int(data->num); break; // converting from int32_t; - case MP_QSTR_ptr: dest[0] = ptr_to_mp((void*)data->ptr); break; // converting from void *; - case MP_QSTR_color: dest[0] = mp_read_byref_lv_color_t(data->color); break; // converting from lv_color_t; + case MP_QSTR_low: dest[0] = mp_read_byref_lv_color_t(data->low); break; // converting from lv_color_t; + case MP_QSTR_high: dest[0] = mp_read_byref_lv_color_t(data->high); break; // converting from lv_color_t; default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup } } else { @@ -12808,9 +12195,8 @@ static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest // store attribute switch(attr) { - case MP_QSTR_num: data->num = (int32_t)mp_obj_get_int(dest[1]); break; // converting to int32_t; - case MP_QSTR_ptr: data->ptr = (void*)mp_to_ptr(dest[1]); break; // converting to void *; - case MP_QSTR_color: data->color = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_low: data->low = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; + case MP_QSTR_high: data->high = mp_write_lv_color_t(dest[1]); break; // converting to lv_color_t; default: return; } @@ -12819,736 +12205,758 @@ static void mp_lv_style_value_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest } } -static void mp_lv_style_value_t_print(const mp_print_t *print, +static void mp_lv_image_colorkey_t_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - mp_printf(print, "struct lv_style_value_t"); + mp_printf(print, "struct lv_image_colorkey_t"); } -static const mp_obj_dict_t mp_lv_style_value_t_locals_dict; +static const mp_obj_dict_t mp_lv_image_colorkey_t_locals_dict; static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_style_value_t_type, - MP_QSTR_lv_style_value_t, + mp_lv_image_colorkey_t_type, + MP_QSTR_lv_image_colorkey_t, MP_TYPE_FLAG_NONE, - print, mp_lv_style_value_t_print, + print, mp_lv_image_colorkey_t_print, make_new, make_new_lv_struct, binary_op, lv_struct_binary_op, subscr, lv_struct_subscr, - attr, mp_lv_style_value_t_attr, - locals_dict, &mp_lv_style_value_t_locals_dict, + attr, mp_lv_image_colorkey_t_attr, + locals_dict, &mp_lv_image_colorkey_t_locals_dict, buffer, mp_blob_get_buffer, parent, &mp_lv_base_struct_type ); -static inline const mp_obj_type_t *get_mp_lv_style_value_t_type(void) +static inline const mp_obj_type_t *get_mp_lv_image_colorkey_t_type(void) { - return &mp_lv_style_value_t_type; + return &mp_lv_image_colorkey_t_type; } /* * lvgl extension definition for: - * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) + * const lv_image_colorkey_t *lv_obj_get_style_image_colorkey(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_get_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_image_colorkey(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_func_ptr)(obj, part, prop); - return mp_read_lv_style_value_t(_res); + const lv_image_colorkey_t * _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_image_colorkey_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey, lv_obj_get_style_image_colorkey); +/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_width */ -/* - * lvgl extension definition for: - * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_width); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_width */ -static mp_obj_t mp_lv_obj_has_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_func_ptr)(obj, selector, prop); - return convert_to_bool(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_width); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_line_dash_gap */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_line_dash_gap); + +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_line_rounded */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_has_style_prop_mpobj, 3, mp_lv_obj_has_style_prop, lv_obj_has_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_line_rounded); +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color */ -/* - * lvgl extension definition for: - * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_line_color_filtered */ -static mp_obj_t mp_lv_obj_set_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_value_t value = mp_write_lv_style_value_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_line_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_line_opa */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_line_opa); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_local_style_prop_mpobj, 4, mp_lv_obj_set_local_style_prop, lv_obj_set_local_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_arc_width); +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_arc_rounded */ -/* - * lvgl extension definition for: - * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_arc_rounded); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color */ -static mp_obj_t mp_lv_obj_get_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_value_t *value = mp_write_ptr_lv_style_value_t(mp_args[2]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_style_res_t _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_func_ptr)(obj, prop, value, selector); - return mp_obj_new_int(_res); -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_arc_color_filtered */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_arc_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_arc_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_local_style_prop_mpobj, 4, mp_lv_obj_get_local_style_prop, lv_obj_get_local_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_arc_opa); + +/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_arc_image_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_arc_image_src); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color); + +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_color_filtered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_color_filtered); + +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_opa); /* * lvgl extension definition for: - * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) + * const lv_font_t *lv_obj_get_style_text_font(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_remove_local_style_prop(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_font(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_func_ptr)(obj, prop, selector); - return convert_to_bool(_res); + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_font_t * _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_font_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_remove_local_style_prop_mpobj, 3, mp_lv_obj_remove_local_style_prop, lv_obj_remove_local_style_prop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font, lv_obj_get_style_text_font); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_letter_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_letter_space); + +/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_line_space */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_line_space); /* * lvgl extension definition for: - * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) + * lv_text_decor_t lv_obj_get_style_text_decor(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_style_apply_color_filter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_decor(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); lv_part_t part = (int)mp_obj_get_int(mp_args[1]); - lv_style_value_t v = mp_write_lv_style_value_t(mp_args[2]); - lv_style_value_t _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_func_ptr)(obj, part, v); - return mp_read_lv_style_value_t(_res); + lv_text_decor_t _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor, lv_obj_get_style_text_decor); /* * lvgl extension definition for: - * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) + * lv_text_align_t lv_obj_get_style_text_align(const lv_obj_t *obj, lv_part_t part) */ -static mp_obj_t mp_lv_obj_fade_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_obj_get_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_obj_t *obj = mp_to_lv(mp_args[0]); - uint32_t time = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_func_ptr)(obj, time, delay); - return mp_const_none; + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_in_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_in); - -/* Reusing lv_obj_fade_in for lv_obj_fade_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_fade_out_mpobj, 3, mp_lv_obj_fade_in, lv_obj_fade_out); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_height); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_min_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_min_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_min_height); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_max_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_max_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_max_height); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_length */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_length_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_length); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_y); - -/* Reusing lv_obj_get_style_align_internal for lv_obj_get_style_align */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_align_mpobj, 2, mp_lv_obj_get_style_align_internal, lv_obj_get_style_align); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_width */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_height */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_height_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_height); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_y); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_translate_radial */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_translate_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_translate_radial); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align, lv_obj_get_style_text_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_rotation */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_text_outline_stroke_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_rotation_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_text_outline_stroke_color_filtered); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_x */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_text_outline_stroke_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_x); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_text_outline_stroke_width); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_pivot_y */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_text_outline_stroke_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_pivot_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_pivot_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_text_outline_stroke_opa); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_skew_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_skew_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_skew_y); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_top */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_top); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_bottom */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_bottom); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_left */ +/* + * lvgl extension definition for: + * lv_text_leading_trim_t lv_obj_get_style_text_leading_trim(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_left); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_right */ +static mp_obj_t mp_lv_obj_get_style_text_leading_trim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_text_leading_trim_t _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_right); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_row */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_row_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_row); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_mpobj, 2, mp_lv_obj_get_style_text_leading_trim, lv_obj_get_style_text_leading_trim); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_column */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_blur_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_column_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_column); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_blur_radius); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_pad_radial */ +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_blur_backdrop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_pad_radial_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_pad_radial); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_blur_backdrop); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_top); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_bottom */ +/* + * lvgl extension definition for: + * lv_blur_quality_t lv_obj_get_style_blur_quality(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_bottom); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_left */ +static mp_obj_t mp_lv_obj_get_style_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_blur_quality_t _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_left); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_margin_right */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_margin_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_margin_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_blur_quality); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_radius); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_color_filtered */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_x); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_opa */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_drop_shadow_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_drop_shadow_offset_y); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_grad_color_filtered */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_drop_shadow_color_filtered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_grad_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_drop_shadow_color_filtered); -/* Reusing lv_obj_get_style_bg_grad_dir_internal for lv_obj_get_style_bg_grad_dir */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_drop_shadow_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_dir_mpobj, 2, mp_lv_obj_get_style_bg_grad_dir_internal, lv_obj_get_style_bg_grad_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_drop_shadow_opa); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_main_stop */ +/* Reusing lv_obj_get_style_blur_quality for lv_obj_get_style_drop_shadow_quality */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_main_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality, lv_obj_get_style_drop_shadow_quality); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_bg_grad_stop */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_radius */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_stop_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_bg_grad_stop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radius); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_main_opa */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_radial_offset */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_main_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_main_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_radial_offset); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_grad_opa */ +/* Reusing lv_obj_get_style_bg_image_tiled for lv_obj_get_style_clip_corner */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_grad_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled, lv_obj_get_style_clip_corner); -/* Reusing lv_obj_get_style_bg_grad_internal for lv_obj_get_style_bg_grad */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_grad_mpobj, 2, mp_lv_obj_get_style_bg_grad_internal, lv_obj_get_style_bg_grad); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa); -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bg_image_src */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_layered */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bg_image_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_layered); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_opa */ +#define funcptr_lv_color_filter_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_opa); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_bg_image_recolor_filtered */ +/* + * lvgl extension definition for: + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_bg_image_recolor_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_bg_image_recolor_opa */ +static mp_obj_t mp_funcptr_lv_color_filter_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const struct _lv_color_filter_dsc_t *arg0 = (const struct _lv_color_filter_dsc_t *)mp_to_ptr(mp_args[0]); + lv_color_t arg1 = mp_write_lv_color_t(mp_args[1]); + lv_opa_t arg2 = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_color_t _res = ((lv_color_t (*)(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t))lv_func_ptr)(arg0, arg1, arg2); + return mp_read_lv_color_t(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_bg_image_recolor_opa); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_bg_image_tiled */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bg_image_tiled_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_bg_image_tiled); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_color_filter_cb_t_mpobj, 3, mp_funcptr_lv_color_filter_cb_t, funcptr_lv_color_filter_cb_t); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color */ +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_border_color_filtered */ +static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_border_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_border_opa */ +/* + * Struct lv_color_filter_dsc_t + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_border_opa); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_border_width */ +static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_border_width); - -/* Reusing lv_obj_get_style_border_side_internal for lv_obj_get_style_border_side */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_filter_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_filter_dsc_t_type())); + return (lv_color_filter_dsc_t*)self->data; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_side_mpobj, 2, mp_lv_obj_get_style_border_side_internal, lv_obj_get_style_border_side); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_border_post */ +#define mp_write_lv_color_filter_dsc_t(struct_obj) *((lv_color_filter_dsc_t*)mp_write_ptr_lv_color_filter_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_border_post_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_border_post); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_width */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_filter_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_color_filter_dsc_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_width); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color */ +#define mp_read_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) +#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_outline_color_filtered */ +static void mp_lv_color_filter_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_outline_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_outline_opa */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_filter_cb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_color_filter_cb_t_mpobj, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, data->user_data); break; // converting from callback lv_color_filter_cb_t; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_filter_cb: data->filter_cb = mp_lv_callback(dest[1], lv_color_filter_dsc_t_filter_cb_callback ,MP_QSTR_lv_color_filter_dsc_t_filter_cb, &data->user_data, NULL, NULL, NULL); break; // converting to callback lv_color_filter_cb_t; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + default: return; + } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_outline_opa); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_outline_pad */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_outline_pad_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_outline_pad); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_width */ +static void mp_lv_color_filter_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_color_filter_dsc_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_x */ +static const mp_obj_dict_t mp_lv_color_filter_dsc_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_offset_y */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color_filter_dsc_t_type, + MP_QSTR_lv_color_filter_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color_filter_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color_filter_dsc_t_attr, + locals_dict, &mp_lv_color_filter_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_offset_y); +static inline const mp_obj_type_t *get_mp_lv_color_filter_dsc_t_type(void) +{ + return &mp_lv_color_filter_dsc_t_type; +} -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_shadow_spread */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_spread_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_shadow_spread); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color */ +/* + * lvgl extension definition for: + * const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_shadow_color_filtered */ +static mp_obj_t mp_lv_obj_get_style_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_color_filter_dsc_t * _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_shadow_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_shadow_opa */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_shadow_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc, lv_obj_get_style_color_filter_dsc); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_opa */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_color_filter_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_color_filter_opa); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor */ +/* Reusing lv_obj_get_style_bg_color for lv_obj_get_style_recolor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color, lv_obj_get_style_recolor); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_image_recolor_filtered */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_recolor_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_image_recolor_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_recolor_opa); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_image_recolor_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_image_recolor_opa); - -/* Reusing lv_obj_get_style_image_colorkey_internal for lv_obj_get_style_image_colorkey */ +/* + * lvgl extension definition for: + * const lv_anim_t *lv_obj_get_style_anim(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_image_colorkey_mpobj, 2, mp_lv_obj_get_style_image_colorkey_internal, lv_obj_get_style_image_colorkey); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_width */ +static mp_obj_t mp_lv_obj_get_style_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_anim_t * _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_anim_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_width); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_width */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim, lv_obj_get_style_anim); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_line_dash_gap */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_dash_gap_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_line_dash_gap); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_line_rounded */ +/* + * lvgl extension definition for: + * uint32_t lv_obj_get_style_anim_duration(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_line_rounded); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color */ +static mp_obj_t mp_lv_obj_get_style_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint32_t _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_line_color_filtered */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_line_color_filtered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_anim_duration); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_line_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_line_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_line_opa); +/* + * Function NOT generated: + * Missing 'user_data' as a field of the first parameter of the callback function 'lv_style_transition_dsc_t_path_xcb_callback' + * lv_anim_path_cb_t path_xcb + */ -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_arc_width */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_arc_width); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_arc_rounded */ +/* + * Struct lv_style_transition_dsc_t + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_rounded_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_arc_rounded); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color */ +static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_arc_color_filtered */ +GENMPY_UNUSED static inline void* mp_write_ptr_lv_style_transition_dsc_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_style_transition_dsc_t_type())); + return (lv_style_transition_dsc_t*)self->data; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_arc_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_arc_opa */ +#define mp_write_lv_style_transition_dsc_t(struct_obj) *((lv_style_transition_dsc_t*)mp_write_ptr_lv_style_transition_dsc_t(struct_obj)) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_arc_opa); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_arc_image_src */ +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_style_transition_dsc_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_style_transition_dsc_t_type(), field); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_arc_image_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_arc_image_src); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color */ +#define mp_read_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) +#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_color_filtered */ +static void mp_lv_style_transition_dsc_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)self->data; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_opa */ + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_props: dest[0] = mp_array_from_u8ptr((void*)data->props); break; // converting from lv_style_prop_t *; + case MP_QSTR_user_data: dest[0] = ptr_to_mp((void*)data->user_data); break; // converting from void *; + case MP_QSTR_path_xcb: dest[0] = mp_lv_funcptr(&mp_funcptr_lv_anim_get_value_cb_t_mpobj, data->path_xcb, NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL); break; // converting from callback lv_anim_path_cb_t; + case MP_QSTR_time: dest[0] = mp_obj_new_int_from_uint(data->time); break; // converting from uint32_t; + case MP_QSTR_delay: dest[0] = mp_obj_new_int_from_uint(data->delay); break; // converting from uint32_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_props: data->props = (void*)mp_array_to_u8ptr(dest[1]); break; // converting to lv_style_prop_t *; + case MP_QSTR_user_data: data->user_data = (void*)mp_to_ptr(dest[1]); break; // converting to void *; + case MP_QSTR_path_xcb: data->path_xcb = mp_lv_callback(dest[1], NULL ,MP_QSTR_lv_style_transition_dsc_t_path_xcb, NULL, NULL, NULL, NULL); break; // converting to callback lv_anim_path_cb_t; + case MP_QSTR_time: data->time = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + case MP_QSTR_delay: data->delay = (uint32_t)mp_obj_get_int(dest[1]); break; // converting to uint32_t; + default: return; + } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_opa); - -/* Reusing lv_obj_get_style_text_font_internal for lv_obj_get_style_text_font */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_font_mpobj, 2, mp_lv_obj_get_style_text_font_internal, lv_obj_get_style_text_font); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_letter_space */ +static void mp_lv_style_transition_dsc_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_style_transition_dsc_t"); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_letter_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_letter_space); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_line_space */ +static const mp_obj_dict_t mp_lv_style_transition_dsc_t_locals_dict; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_line_space_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_line_space); - -/* Reusing lv_obj_get_style_text_decor_internal for lv_obj_get_style_text_decor */ +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_style_transition_dsc_t_type, + MP_QSTR_lv_style_transition_dsc_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_style_transition_dsc_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_style_transition_dsc_t_attr, + locals_dict, &mp_lv_style_transition_dsc_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_decor_mpobj, 2, mp_lv_obj_get_style_text_decor_internal, lv_obj_get_style_text_decor); +static inline const mp_obj_type_t *get_mp_lv_style_transition_dsc_t_type(void) +{ + return &mp_lv_style_transition_dsc_t_type; +} -/* Reusing lv_obj_get_style_text_align_internal for lv_obj_get_style_text_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_align_mpobj, 2, mp_lv_obj_get_style_text_align_internal, lv_obj_get_style_text_align); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color */ +/* + * lvgl extension definition for: + * const lv_style_transition_dsc_t *lv_obj_get_style_transition(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_text_outline_stroke_color_filtered */ +static mp_obj_t mp_lv_obj_get_style_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const lv_style_transition_dsc_t * _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_text_outline_stroke_color_filtered); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_text_outline_stroke_width */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_width_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_text_outline_stroke_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition, lv_obj_get_style_transition); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_text_outline_stroke_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_outline_stroke_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_text_outline_stroke_opa); - -/* Reusing lv_obj_get_style_text_leading_trim_internal for lv_obj_get_style_text_leading_trim */ +/* + * lvgl extension definition for: + * lv_blend_mode_t lv_obj_get_style_blend_mode(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_text_leading_trim_mpobj, 2, mp_lv_obj_get_style_text_leading_trim_internal, lv_obj_get_style_text_leading_trim); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_blur_radius */ +static mp_obj_t mp_lv_obj_get_style_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_blend_mode_t _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_blur_radius); - -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_blur_backdrop */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_backdrop_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_blur_backdrop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode, lv_obj_get_style_blend_mode); -/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_blur_quality */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blur_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_blur_quality); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_radius */ +/* + * lvgl extension definition for: + * uint16_t lv_obj_get_style_layout(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_radius); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_x */ +static mp_obj_t mp_lv_obj_get_style_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint16_t _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_x_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_x); - -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_drop_shadow_offset_y */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_offset_y_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout, lv_obj_get_style_layout); -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_drop_shadow_color_filtered */ +/* + * lvgl extension definition for: + * lv_base_dir_t lv_obj_get_style_base_dir(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_color_filtered_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_drop_shadow_color_filtered); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_drop_shadow_opa */ +static mp_obj_t mp_lv_obj_get_style_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_base_dir_t _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_drop_shadow_opa); - -/* Reusing lv_obj_get_style_blur_quality_internal for lv_obj_get_style_drop_shadow_quality */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_drop_shadow_quality_mpobj, 2, mp_lv_obj_get_style_blur_quality_internal, lv_obj_get_style_drop_shadow_quality); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir, lv_obj_get_style_base_dir); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radius */ +/* Reusing lv_obj_get_style_bg_image_src for lv_obj_get_style_bitmap_mask_src */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radius_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src, lv_obj_get_style_bitmap_mask_src); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_radial_offset */ +/* Reusing lv_obj_get_style_anim_duration for lv_obj_get_style_rotary_sensitivity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_radial_offset_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration, lv_obj_get_style_rotary_sensitivity); -/* Reusing lv_obj_get_style_bg_image_tiled_internal for lv_obj_get_style_clip_corner */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_clip_corner_mpobj, 2, mp_lv_obj_get_style_bg_image_tiled_internal, lv_obj_get_style_clip_corner); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa */ +/* + * lvgl extension definition for: + * lv_flex_flow_t lv_obj_get_style_flex_flow(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_layered */ +static mp_obj_t mp_lv_obj_get_style_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_flex_flow_t _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_layered_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_layered); - -/* Reusing lv_obj_get_style_color_filter_dsc_internal for lv_obj_get_style_color_filter_dsc */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_dsc_mpobj, 2, mp_lv_obj_get_style_color_filter_dsc_internal, lv_obj_get_style_color_filter_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow, lv_obj_get_style_flex_flow); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_color_filter_opa */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_color_filter_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_color_filter_opa); - -/* Reusing lv_obj_get_style_bg_color_internal for lv_obj_get_style_recolor */ +/* + * lvgl extension definition for: + * lv_flex_align_t lv_obj_get_style_flex_main_place(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_mpobj, 2, mp_lv_obj_get_style_bg_color_internal, lv_obj_get_style_recolor); - -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_recolor_opa */ +static mp_obj_t mp_lv_obj_get_style_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_flex_align_t _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_recolor_opa_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_recolor_opa); - -/* Reusing lv_obj_get_style_anim_internal for lv_obj_get_style_anim */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_mpobj, 2, mp_lv_obj_get_style_anim_internal, lv_obj_get_style_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_main_place); -/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_anim_duration */ +/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_cross_place */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_anim_duration_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_anim_duration); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_cross_place); -/* Reusing lv_obj_get_style_transition_internal for lv_obj_get_style_transition */ +/* Reusing lv_obj_get_style_flex_main_place for lv_obj_get_style_flex_track_place */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transition_mpobj, 2, mp_lv_obj_get_style_transition_internal, lv_obj_get_style_transition); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place, lv_obj_get_style_flex_track_place); -/* Reusing lv_obj_get_style_blend_mode_internal for lv_obj_get_style_blend_mode */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_blend_mode_mpobj, 2, mp_lv_obj_get_style_blend_mode_internal, lv_obj_get_style_blend_mode); - -/* Reusing lv_obj_get_style_layout_internal for lv_obj_get_style_layout */ +/* + * lvgl extension definition for: + * uint8_t lv_obj_get_style_flex_grow(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_layout_mpobj, 2, mp_lv_obj_get_style_layout_internal, lv_obj_get_style_layout); - -/* Reusing lv_obj_get_style_base_dir_internal for lv_obj_get_style_base_dir */ +static mp_obj_t mp_lv_obj_get_style_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + uint8_t _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int_from_uint(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_base_dir_mpobj, 2, mp_lv_obj_get_style_base_dir_internal, lv_obj_get_style_base_dir); - -/* Reusing lv_obj_get_style_bg_image_src_internal for lv_obj_get_style_bitmap_mask_src */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_bitmap_mask_src_mpobj, 2, mp_lv_obj_get_style_bg_image_src_internal, lv_obj_get_style_bitmap_mask_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow, lv_obj_get_style_flex_grow); -/* Reusing lv_obj_get_style_anim_duration_internal for lv_obj_get_style_rotary_sensitivity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_rotary_sensitivity_mpobj, 2, mp_lv_obj_get_style_anim_duration_internal, lv_obj_get_style_rotary_sensitivity); - -/* Reusing lv_obj_get_style_flex_flow_internal for lv_obj_get_style_flex_flow */ +/* + * lvgl extension definition for: + * const int32_t *lv_obj_get_style_grid_column_dsc_array(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_flow_mpobj, 2, mp_lv_obj_get_style_flex_flow_internal, lv_obj_get_style_flex_flow); - -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_main_place */ +static mp_obj_t mp_lv_obj_get_style_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const int32_t * _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_array_from_i32ptr((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_main_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_main_place); - -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_cross_place */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_cross_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_cross_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_column_dsc_array); -/* Reusing lv_obj_get_style_flex_main_place_internal for lv_obj_get_style_flex_track_place */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_track_place_mpobj, 2, mp_lv_obj_get_style_flex_main_place_internal, lv_obj_get_style_flex_track_place); - -/* Reusing lv_obj_get_style_flex_grow_internal for lv_obj_get_style_flex_grow */ +/* + * lvgl extension definition for: + * lv_grid_align_t lv_obj_get_style_grid_column_align(const lv_obj_t *obj, lv_part_t part) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_flex_grow_mpobj, 2, mp_lv_obj_get_style_flex_grow_internal, lv_obj_get_style_flex_grow); - -/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_column_dsc_array */ +static mp_obj_t mp_lv_obj_get_style_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + lv_grid_align_t _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_func_ptr)(obj, part); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_column_dsc_array); - -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_column_align */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_column_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_column_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_column_align); -/* Reusing lv_obj_get_style_grid_column_dsc_array_internal for lv_obj_get_style_grid_row_dsc_array */ +/* Reusing lv_obj_get_style_grid_column_dsc_array for lv_obj_get_style_grid_row_dsc_array */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array_internal, lv_obj_get_style_grid_row_dsc_array); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_dsc_array_mpobj, 2, mp_lv_obj_get_style_grid_column_dsc_array, lv_obj_get_style_grid_row_dsc_array); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_row_align */ +/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_row_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_row_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_row_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_row_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_pos */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_pos); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_x_align */ +/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_x_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_x_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_x_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_x_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_column_span */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_column_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_column_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_column_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_column_span); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_pos */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_pos_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_pos); -/* Reusing lv_obj_get_style_grid_column_align_internal for lv_obj_get_style_grid_cell_y_align */ +/* Reusing lv_obj_get_style_grid_column_align for lv_obj_get_style_grid_cell_y_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align_internal, lv_obj_get_style_grid_cell_y_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_y_align_mpobj, 2, mp_lv_obj_get_style_grid_column_align, lv_obj_get_style_grid_cell_y_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_grid_cell_row_span */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_grid_cell_row_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_grid_cell_row_span); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_grid_cell_row_span_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_grid_cell_row_span); /* @@ -14523,37 +13931,52 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_size_mpobj, 4, mp_lv_o static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_set_style_transform_scale_mpobj, 3, mp_lv_obj_set_style_width, lv_obj_set_style_transform_scale); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_left */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_left */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_left); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_left_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_left); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_right */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_right */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_right); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_right_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_right); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_top */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_top */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_top_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_top); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_space_bottom */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_space_bottom */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_space_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_space_bottom_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_space_bottom); -/* Reusing lv_obj_calculate_style_text_align_internal for lv_obj_calculate_style_text_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align_internal, lv_obj_calculate_style_text_align); +/* + * lvgl extension definition for: + * lv_text_align_t lv_obj_calculate_style_text_align(const lv_obj_t *obj, lv_part_t part, const char *txt) + */ + +static mp_obj_t mp_lv_obj_calculate_style_text_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + const lv_obj_t *obj = (const lv_obj_t *)mp_to_lv(mp_args[0]); + lv_part_t part = (int)mp_obj_get_int(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + lv_text_align_t _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_func_ptr)(obj, part, txt); + return mp_obj_new_int(_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_calculate_style_text_align_mpobj, 3, mp_lv_obj_calculate_style_text_align, lv_obj_calculate_style_text_align); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_x_safe */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_x_safe */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_x_safe); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_x_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_x_safe); -/* Reusing lv_obj_get_style_width_internal for lv_obj_get_style_transform_scale_y_safe */ +/* Reusing lv_obj_get_style_width for lv_obj_get_style_transform_scale_y_safe */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width_internal, lv_obj_get_style_transform_scale_y_safe); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_transform_scale_y_safe_mpobj, 2, mp_lv_obj_get_style_width, lv_obj_get_style_transform_scale_y_safe); -/* Reusing lv_obj_get_style_bg_opa_internal for lv_obj_get_style_opa_recursive */ +/* Reusing lv_obj_get_style_bg_opa for lv_obj_get_style_opa_recursive */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa_internal, lv_obj_get_style_opa_recursive); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_opa_recursive_mpobj, 2, mp_lv_obj_get_style_bg_opa, lv_obj_get_style_opa_recursive); /* @@ -18564,14 +17987,6 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_state_compare_mpobj, 4, mp static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_layer_type_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_layer_type); -/* Reusing lv_obj_get_style_prop for lv_obj_get_style_prop_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_get_style_prop_internal_mpobj, 3, mp_lv_obj_get_style_prop, lv_obj_get_style_prop_internal); - -/* Reusing lv_obj_style_apply_color_filter for lv_obj_style_apply_color_filter_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_style_apply_color_filter_internal_mpobj, 3, mp_lv_obj_style_apply_color_filter, lv_obj_style_apply_color_filter_internal); - /* Reusing lv_obj_move_foreground for lv_obj_update_blur_status */ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_obj_update_blur_status_mpobj, 1, mp_lv_obj_move_foreground, lv_obj_update_blur_status); @@ -18608,154 +18023,6 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_style_get_selector_part), MP_ROM_PTR(&mp_lv_obj_style_get_selector_part_mpobj) }, { MP_ROM_QSTR(MP_QSTR_move_foreground), MP_ROM_PTR(&mp_lv_obj_move_foreground_mpobj) }, { MP_ROM_QSTR(MP_QSTR_move_background), MP_ROM_PTR(&mp_lv_obj_move_background_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_min_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_max_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_min_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_min_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_max_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_max_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_length_internal), MP_ROM_PTR(&mp_lv_obj_get_style_length_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_height_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_translate_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_translate_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_translate_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_translate_radial_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_rotation_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_rotation_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_pivot_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_pivot_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_skew_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_skew_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_top_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_bottom_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_left_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_right_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_row_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_row_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_column_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_column_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_pad_radial_internal), MP_ROM_PTR(&mp_lv_obj_get_style_pad_radial_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_top_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_bottom_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_left_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_margin_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_margin_right_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_dir_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_stop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_stop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_stop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_main_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_main_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_grad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_grad_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_src_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_recolor_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bg_image_tiled_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bg_image_tiled_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_side_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_side_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_border_post_internal), MP_ROM_PTR(&mp_lv_obj_get_style_border_post_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_outline_pad_internal), MP_ROM_PTR(&mp_lv_obj_get_style_outline_pad_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_offset_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_spread_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_spread_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_shadow_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_recolor_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_image_colorkey_internal), MP_ROM_PTR(&mp_lv_obj_get_style_image_colorkey_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_dash_gap_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_dash_gap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_rounded_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_line_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_line_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_rounded_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_rounded_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_arc_image_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_arc_image_src_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_font_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_font_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_letter_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_letter_space_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_line_space_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_line_space_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_decor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_decor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_width_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_width_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_outline_stroke_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_outline_stroke_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_text_leading_trim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_text_leading_trim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blur_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_radius_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blur_backdrop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_backdrop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blur_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blur_quality_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_radius_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_x_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_x_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_offset_y_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_offset_y_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_color_filtered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_color_filtered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_drop_shadow_quality_internal), MP_ROM_PTR(&mp_lv_obj_get_style_drop_shadow_quality_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_radius_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radius_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_radial_offset_internal), MP_ROM_PTR(&mp_lv_obj_get_style_radial_offset_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_clip_corner_internal), MP_ROM_PTR(&mp_lv_obj_get_style_clip_corner_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_opa_layered_internal), MP_ROM_PTR(&mp_lv_obj_get_style_opa_layered_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_dsc_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_dsc_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_color_filter_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_color_filter_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_recolor_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_recolor_opa_internal), MP_ROM_PTR(&mp_lv_obj_get_style_recolor_opa_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_anim_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_anim_duration_internal), MP_ROM_PTR(&mp_lv_obj_get_style_anim_duration_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transition_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transition_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_blend_mode_internal), MP_ROM_PTR(&mp_lv_obj_get_style_blend_mode_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_layout_internal), MP_ROM_PTR(&mp_lv_obj_get_style_layout_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_base_dir_internal), MP_ROM_PTR(&mp_lv_obj_get_style_base_dir_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_bitmap_mask_src_internal), MP_ROM_PTR(&mp_lv_obj_get_style_bitmap_mask_src_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_rotary_sensitivity_internal), MP_ROM_PTR(&mp_lv_obj_get_style_rotary_sensitivity_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_flow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_flow_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_main_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_main_place_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_cross_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_cross_place_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_track_place_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_track_place_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_flex_grow_internal), MP_ROM_PTR(&mp_lv_obj_get_style_flex_grow_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_dsc_array_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_column_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_column_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_dsc_array_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_dsc_array_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_row_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_row_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_pos_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_x_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_x_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_column_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_column_span_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_pos_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_pos_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_y_align_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_y_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_grid_cell_row_span_internal), MP_ROM_PTR(&mp_lv_obj_get_style_grid_cell_row_span_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_calculate_style_text_align_internal), MP_ROM_PTR(&mp_lv_obj_calculate_style_text_align_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_left_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_left_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_right_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_right_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_top_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_top_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_space_bottom_internal), MP_ROM_PTR(&mp_lv_obj_get_style_space_bottom_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_x_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_x_safe_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_transform_scale_y_safe_internal), MP_ROM_PTR(&mp_lv_obj_get_style_transform_scale_y_safe_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_obj_set_flex_flow_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flex_align), MP_ROM_PTR(&mp_lv_obj_set_flex_align_mpobj) }, { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_obj_set_flex_grow_mpobj) }, @@ -19346,8 +18613,6 @@ static const mp_rom_map_elem_t obj_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_style_create_transition), MP_ROM_PTR(&mp_lv_obj_style_create_transition_mpobj) }, { MP_ROM_QSTR(MP_QSTR_style_state_compare), MP_ROM_PTR(&mp_lv_obj_style_state_compare_mpobj) }, { MP_ROM_QSTR(MP_QSTR_update_layer_type), MP_ROM_PTR(&mp_lv_obj_update_layer_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_style_prop_internal), MP_ROM_PTR(&mp_lv_obj_get_style_prop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_style_apply_color_filter_internal), MP_ROM_PTR(&mp_lv_obj_style_apply_color_filter_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_update_blur_status), MP_ROM_PTR(&mp_lv_obj_update_blur_status_mpobj) }, { MP_ROM_QSTR(MP_QSTR_refr), MP_ROM_PTR(&mp_lv_obj_refr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_TREE_WALK), MP_ROM_PTR(&mp_lv_LV_OBJ_TREE_WALK_type_base) }, @@ -36134,4048 +35399,3897 @@ static const mp_rom_map_elem_t mp_C_Pointer_locals_dict_table[] = { static MP_DEFINE_CONST_DICT(mp_C_Pointer_locals_dict, mp_C_Pointer_locals_dict_table); +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ -/* - * lvgl extension definition for: - * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) - */ - -static mp_obj_t mp_lv_color_is_in_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - lv_color_t l_color = mp_write_lv_color_t(mp_args[1]); - lv_color_t h_color = mp_write_lv_color_t(mp_args[2]); - bool _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_func_ptr)(color, l_color, h_color); - return convert_to_bool(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_is_in_range_mpobj, 3, mp_lv_color_is_in_range, lv_color_is_in_range); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); /* * lvgl extension definition for: - * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) + * void lv_anim_set_var(lv_anim_t *a, void *var) */ -static mp_obj_t mp_lv_color_to_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(color, opa); - return mp_read_lv_color32_t(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *var = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_32_mpobj, 2, mp_lv_color_to_32, lv_color_to_32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); /* - * lvgl extension definition for: - * uint32_t lv_color_to_int(lv_color_t c) + * Function NOT generated: + * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! + * lv_anim_exec_xcb_t exec_cb */ - -static mp_obj_t mp_lv_color_to_int(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t c = mp_write_lv_color_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_color_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_int_mpobj, 1, mp_lv_color_to_int, lv_color_to_int); /* * lvgl extension definition for: - * bool lv_color_eq(lv_color_t c1, lv_color_t c2) + * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) */ -static mp_obj_t mp_lv_color_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); - lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); - bool _res = ((bool (*)(lv_color_t, lv_color_t))lv_func_ptr)(c1, c2); - return convert_to_bool(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); + ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_eq_mpobj, 2, mp_lv_color_eq, lv_color_eq); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); /* * lvgl extension definition for: - * uint16_t lv_color_to_u16(lv_color_t color) + * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) */ -static mp_obj_t mp_lv_color_to_u16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - uint16_t _res = ((uint16_t (*)(lv_color_t))lv_func_ptr)(color); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u16_mpobj, 1, mp_lv_color_to_u16, lv_color_to_u16); - -/* Reusing lv_color_to_int for lv_color_to_u32 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u32_mpobj, 1, mp_lv_color_to_int, lv_color_to_u32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); +/* Reusing lv_anim_set_duration for lv_anim_set_delay */ -/* - * lvgl extension definition for: - * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) - */ - -static mp_obj_t mp_lv_color_lighten(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t c = mp_write_lv_color_t(mp_args[0]); - lv_opa_t lvl = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(c, lvl); - return mp_read_lv_color_t(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_lighten_mpobj, 2, mp_lv_color_lighten, lv_color_lighten); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); -/* Reusing lv_color_lighten for lv_color_darken */ +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_darken_mpobj, 2, mp_lv_color_lighten, lv_color_darken); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); +/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -/* - * Struct lv_color_hsv_t - */ - -static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_hsv_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_hsv_t_type())); - return (lv_color_hsv_t*)self->data; -} - -#define mp_write_lv_color_hsv_t(struct_obj) *((lv_color_hsv_t*)mp_write_ptr_lv_color_hsv_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_hsv_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_color_hsv_t_type(), field); -} - -#define mp_read_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(copy_buffer(&field, sizeof(lv_color_hsv_t))) -#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) - -static void mp_lv_color_hsv_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_color_hsv_t *data = (lv_color_hsv_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint16_t; - case MP_QSTR_s: dest[0] = mp_obj_new_int_from_uint(data->s); break; // converting from uint8_t; - case MP_QSTR_v: dest[0] = mp_obj_new_int_from_uint(data->v); break; // converting from uint8_t; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_h: data->h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; - case MP_QSTR_s: data->s = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - case MP_QSTR_v: data->v = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_color_hsv_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) -{ - mp_printf(print, "struct lv_color_hsv_t"); -} - -static const mp_obj_dict_t mp_lv_color_hsv_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_color_hsv_t_type, - MP_QSTR_lv_color_hsv_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_color_hsv_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_color_hsv_t_attr, - locals_dict, &mp_lv_color_hsv_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); - -static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void) -{ - return &mp_lv_color_hsv_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); +/* Reusing lv_anim_set_duration for lv_anim_pause_for */ -/* - * lvgl extension definition for: - * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) - */ - -static mp_obj_t mp_lv_color_to_hsv(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_color_t color = mp_write_lv_color_t(mp_args[0]); - lv_color_hsv_t _res = ((lv_color_hsv_t (*)(lv_color_t))lv_func_ptr)(color); - return mp_read_lv_color_hsv_t(_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_hsv_mpobj, 1, mp_lv_color_to_hsv, lv_color_to_hsv); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); /* * lvgl extension definition for: - * uint8_t lv_color_luminance(lv_color_t c) + * bool lv_anim_is_paused(lv_anim_t *a) */ -static mp_obj_t mp_lv_color_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t c = mp_write_lv_color_t(mp_args[0]); - uint8_t _res = ((uint8_t (*)(lv_color_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_luminance_mpobj, 1, mp_lv_color_luminance, lv_color_luminance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); /* * lvgl extension definition for: - * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) + * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) */ -static mp_obj_t mp_lv_color_mix(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); - lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); - uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); - lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_func_ptr)(c1, c2, mix); - return mp_read_lv_color_t(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix_mpobj, 3, mp_lv_color_mix, lv_color_mix); - -/* Reusing lv_color_luminance for lv_color_brightness */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_brightness_mpobj, 1, mp_lv_color_luminance, lv_color_brightness); - - -static const mp_rom_map_elem_t mp_lv_color_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_in_range), MP_ROM_PTR(&mp_lv_color_is_in_range_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_32), MP_ROM_PTR(&mp_lv_color_to_32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_int), MP_ROM_PTR(&mp_lv_color_to_int_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color_eq_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_u16), MP_ROM_PTR(&mp_lv_color_to_u16_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_u32), MP_ROM_PTR(&mp_lv_color_to_u32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lighten), MP_ROM_PTR(&mp_lv_color_lighten_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_darken), MP_ROM_PTR(&mp_lv_color_darken_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_hsv), MP_ROM_PTR(&mp_lv_color_to_hsv_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color_luminance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_mix), MP_ROM_PTR(&mp_lv_color_mix_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_brightness), MP_ROM_PTR(&mp_lv_color_brightness_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); -}; -static MP_DEFINE_CONST_DICT(mp_lv_color_t_locals_dict, mp_lv_color_t_locals_dict_table); - - -/* - * Array convertors for lv_color_t [] - */ - -GENMPY_UNUSED static lv_color_t *mp_arr_to_lv_color_t_____(mp_obj_t mp_arr) -{ - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_color_t *lv_arr = (lv_color_t*)m_malloc(len * sizeof(lv_color_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = mp_write_lv_color_t(item); - } - return (lv_color_t *)lv_arr; -} +/* + * Callback function lv_anim_t_exec_cb + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + */ -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_color_t_____(const lv_color_t *arr) +GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) { - return mp_read_ptr_lv_color_t((void*)arr); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); + return; } /* - * Array convertors for lv_opa_t [] + * lvgl extension definition for: + * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -GENMPY_UNUSED static lv_opa_t *mp_arr_to_lv_opa_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_opa_t *lv_arr = (lv_opa_t*)m_malloc(len * sizeof(lv_opa_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (lv_opa_t *)lv_arr; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_opa_t_____(const lv_opa_t *arr) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); + + +/* + * Callback function lv_anim_t_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) { - return mp_array_from_u8ptr((void*)arr); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); } /* - * Array convertors for uint8_t [] + * lvgl extension definition for: + * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) */ -GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (uint8_t *)lv_arr; + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t_____(const uint8_t *arr) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); + + +/* + * Callback function lv_anim_t_start_cb + * void lv_anim_start_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) { - return mp_array_from_u8ptr((void*)arr); + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); + return; } /* * lvgl extension definition for: - * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) + * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) */ -static mp_obj_t mp_lv_grad_init_stops(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *grad = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - const lv_color_t *colors = (const lv_color_t *)mp_arr_to_lv_color_t_____(mp_args[1]); - const lv_opa_t *opa = (const lv_opa_t *)mp_arr_to_lv_opa_t_____(mp_args[2]); - const uint8_t *fracs = (const uint8_t *)mp_arr_to_uint8_t_____(mp_args[3]); - int num_stops = (int)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_func_ptr)(grad, colors, opa, fracs, num_stops); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_init_stops_mpobj, 5, mp_lv_grad_init_stops, lv_grad_init_stops); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); +/* + * Callback function lv_anim_t_get_value_cb + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); +} + + /* * lvgl extension definition for: - * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) + * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) */ -static mp_obj_t mp_lv_grad_horizontal_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - ((void (*)(lv_grad_dsc_t *))lv_func_ptr)(dsc); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_horizontal_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_horizontal_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); -/* Reusing lv_grad_horizontal_init for lv_grad_vertical_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_vertical_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_vertical_init); - +/* + * Callback function lv_anim_t_completed_cb + * void lv_anim_completed_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); + return; +} + /* * lvgl extension definition for: - * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) */ -static mp_obj_t mp_lv_grad_linear_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - int32_t from_x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t from_y = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t to_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t to_y = (int32_t)mp_obj_get_int(mp_args[4]); - lv_grad_extend_t extend = (int)mp_obj_get_int(mp_args[5]); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_func_ptr)(dsc, from_x, from_y, to_x, to_y, extend); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_linear_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_linear_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); -/* Reusing lv_grad_linear_init for lv_grad_radial_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_radial_init); - +/* + * Callback function lv_anim_t_deleted_cb + * void lv_anim_deleted_cb_t(lv_anim_t *) + */ + +GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); + return; +} + /* * lvgl extension definition for: - * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) + * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) */ -static mp_obj_t mp_lv_grad_radial_set_focal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); - int32_t center_x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t center_y = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[3]); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_func_ptr)(dsc, center_x, center_y, radius); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_set_focal_mpobj, 4, mp_lv_grad_radial_set_focal, lv_grad_radial_set_focal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); -/* Reusing lv_grad_linear_init for lv_grad_conical_init */ +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_conical_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_conical_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init_stops), MP_ROM_PTR(&mp_lv_grad_init_stops_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_horizontal_init), MP_ROM_PTR(&mp_lv_grad_horizontal_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_vertical_init), MP_ROM_PTR(&mp_lv_grad_vertical_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_linear_init), MP_ROM_PTR(&mp_lv_grad_linear_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_radial_init), MP_ROM_PTR(&mp_lv_grad_radial_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_radial_set_focal), MP_ROM_PTR(&mp_lv_grad_radial_set_focal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_conical_init), MP_ROM_PTR(&mp_lv_grad_conical_init_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_t_locals_dict, mp_lv_grad_dsc_t_locals_dict_table); - +/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ -static const mp_rom_map_elem_t mp_lv_grad_stop_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_stop_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_stop_t_locals_dict, mp_lv_grad_stop_t_locals_dict_table); - +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_t_locals_dict, mp_lv_grad_dsc_params_t_locals_dict_table); - +/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_linear_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_linear_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_linear_t_locals_dict, mp_lv_grad_dsc_params_linear_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + * void lv_anim_set_early_apply(lv_anim_t *a, bool en) */ -static mp_obj_t mp_lv_point_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[0]); - int32_t angle = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[3]); - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[4]); - bool zoom_first = mp_obj_is_true(mp_args[5]); - ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(point, angle, scale_x, scale_y, pivot, zoom_first); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + bool en = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_transform_mpobj, 6, mp_lv_point_transform, lv_point_transform); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); +/* Reusing lv_anim_set_var for lv_anim_set_user_data */ -/* - * lvgl extension definition for: - * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) - */ - -static mp_obj_t mp_lv_point_array_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_point_t *points = mp_write_ptr_lv_point_t(mp_args[0]); - size_t count = (size_t)mp_obj_get_int(mp_args[1]); - int32_t angle = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[4]); - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[5]); - bool zoom_first = mp_obj_is_true(mp_args[6]); - ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(points, count, angle, scale_x, scale_y, pivot, zoom_first); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_array_transform_mpobj, 7, mp_lv_point_array_transform, lv_point_array_transform); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); /* * lvgl extension definition for: - * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) + * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) */ -static mp_obj_t mp_lv_point_to_precise(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_point_t *p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[0]); - lv_point_precise_t _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_func_ptr)(p); - return mp_read_lv_point_precise_t(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); + int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); + int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); + int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_to_precise_mpobj, 1, mp_lv_point_to_precise, lv_point_to_precise); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); /* * lvgl extension definition for: - * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) + * lv_anim_t *lv_anim_start(const lv_anim_t *a) */ -static mp_obj_t mp_lv_point_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[0]); - int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_point_t *, int32_t, int32_t))lv_func_ptr)(p, x, y); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_set_mpobj, 3, mp_lv_point_set, lv_point_set); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); /* * lvgl extension definition for: - * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) + * uint32_t lv_anim_get_delay(const lv_anim_t *a) */ -static mp_obj_t mp_lv_point_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_point_t *p1 = mp_write_ptr_lv_point_t(mp_args[0]); - lv_point_t *p2 = mp_write_ptr_lv_point_t(mp_args[1]); - ((void (*)(lv_point_t *, lv_point_t *))lv_func_ptr)(p1, p2); - return mp_const_none; + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_swap_mpobj, 2, mp_lv_point_swap, lv_point_swap); - - -static const mp_rom_map_elem_t mp_lv_point_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_point_t))) }, - { MP_ROM_QSTR(MP_QSTR_transform), MP_ROM_PTR(&mp_lv_point_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_array_transform), MP_ROM_PTR(&mp_lv_point_array_transform_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_precise), MP_ROM_PTR(&mp_lv_point_to_precise_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_point_set_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_point_swap_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_point_t_locals_dict, mp_lv_point_t_locals_dict_table); - +/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_radial_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_radial_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_radial_t_locals_dict, mp_lv_grad_dsc_params_radial_t_locals_dict_table); - +/* Reusing lv_anim_get_delay for lv_anim_get_time */ -static const mp_rom_map_elem_t mp_lv_grad_dsc_params_conical_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_conical_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_conical_t_locals_dict, mp_lv_grad_dsc_params_conical_t_locals_dict_table); - +/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ -static const mp_rom_map_elem_t mp_lv_image_colorkey_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_colorkey_t))) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_image_colorkey_t_locals_dict, mp_lv_image_colorkey_t_locals_dict_table); - /* * lvgl extension definition for: - * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) + * void *lv_anim_get_user_data(const lv_anim_t *a) */ -static mp_obj_t mp_lv_font_get_line_height_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); - return mp_obj_new_int(_res); + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_internal_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); /* * lvgl extension definition for: - * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) + * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_font_has_static_bitmap_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_internal_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap_internal); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); /* * lvgl extension definition for: - * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) + * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static mp_obj_t mp_lv_font_get_bottom_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - lv_text_leading_trim_t trim = (int)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_func_ptr)(font, trim); - return mp_obj_new_int(_res); + lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); + void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim_internal); - -/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim_internal); - -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); /* * lvgl extension definition for: - * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) + * int32_t lv_anim_path_linear(const lv_anim_t *a) */ -static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); - uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); - return mp_obj_new_int_from_uint(_res); + const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); -/* Reusing lv_font_get_line_height_internal for lv_font_get_line_height */ +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); +/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ -/* - * lvgl extension definition for: - * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) - */ - -static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); - lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); + +/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); + +/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); -/* Reusing lv_font_has_static_bitmap_internal for lv_font_has_static_bitmap */ +/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); -/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim */ +/* Reusing lv_anim_path_linear for lv_anim_path_step */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); -/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_bottom_trim */ +/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_fmt_txt */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_fmt_txt_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_fmt_txt); +static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, -/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_internal */ +}; + +static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_internal_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_internal); +static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, -/* Reusing lv_font_get_glyph_width for lv_font_get_glyph_width_internal */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_internal_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width_internal); - +static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); + -static const mp_rom_map_elem_t mp_lv_font_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_line_height_internal), MP_ROM_PTR(&mp_lv_font_get_line_height_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bottom_trim_internal), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_top_trim_internal), MP_ROM_PTR(&mp_lv_font_get_top_trim_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_width), MP_ROM_PTR(&mp_lv_font_get_glyph_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_line_height), MP_ROM_PTR(&mp_lv_font_get_line_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_kerning), MP_ROM_PTR(&mp_lv_font_set_kerning_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_static_bitmap), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_top_trim), MP_ROM_PTR(&mp_lv_font_get_top_trim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bottom_trim), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_fmt_txt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_width_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_width_internal_mpobj) }, +static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_font_t_locals_dict, mp_lv_font_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); -/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap */ +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_set_default */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_default_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_set_default); /* * lvgl extension definition for: - * const void *lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t *g_dsc) + * lv_display_t *lv_display_get_next(lv_display_t *disp) */ -static mp_obj_t mp_lv_font_get_glyph_static_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); - return ptr_to_mp((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_t * _res = ((lv_display_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_display_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_next_mpobj, 1, mp_lv_display_get_next, lv_display_get_next); /* * lvgl extension definition for: - * void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t *g_dsc) + * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) */ -static mp_obj_t mp_lv_font_glyph_release_draw_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - ((void (*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + int32_t hor_res = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t ver_res = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_func_ptr)(disp, hor_res, ver_res); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_resolution); -/* Reusing funcptr_get_glyph_bitmap for lv_font_get_bitmap_fmt_txt */ +/* Reusing lv_display_set_resolution for lv_display_set_physical_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bitmap_fmt_txt_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_bitmap_fmt_txt); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_physical_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_physical_resolution); + +/* Reusing lv_display_set_resolution for lv_display_set_offset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_offset_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_offset); /* * lvgl extension definition for: - * int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t *lhs, const lv_font_glyph_dsc_t *rhs) + * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) */ -static mp_obj_t mp_lv_font_glyph_dsc_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_font_glyph_dsc_t *lhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); - const lv_font_glyph_dsc_t *rhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_font_glyph_dsc_t *, const lv_font_glyph_dsc_t *))lv_func_ptr)(lhs, rhs); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, lv_display_rotation_t))lv_func_ptr)(disp, rotation); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_dsc_compare_mpobj, 2, mp_lv_font_glyph_dsc_compare, lv_font_glyph_dsc_compare); - -/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_internal_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap_internal); - -/* Reusing lv_font_get_glyph_static_bitmap for lv_font_get_glyph_static_bitmap_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_internal_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap_internal); - -/* Reusing lv_font_glyph_release_draw_data for lv_font_glyph_release_draw_data_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_internal_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data_internal); - - -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_compare), MP_ROM_PTR(&mp_lv_font_glyph_dsc_compare_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_release_draw_data_internal), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_internal_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); - -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); - -/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_rotation_mpobj, 2, mp_lv_display_set_rotation, lv_display_set_rotation); /* * lvgl extension definition for: - * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) + * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) */ -static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + bool enable = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_display_t *, bool))lv_func_ptr)(disp, enable); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_matrix_rotation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_matrix_rotation); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) + * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) */ -static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_dpi(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + int32_t dpi = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, int32_t))lv_func_ptr)(disp, dpi); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_dpi_mpobj, 2, mp_lv_display_set_dpi, lv_display_set_dpi); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) + * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_horizontal_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - void *data = mp_to_ptr(mp_args[5]); - uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); + const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_display_t *))lv_func_ptr)(disp); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_horizontal_resolution); +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_vertical_resolution */ -/* - * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) - */ - -static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_vertical_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_horizontal_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_horizontal_resolution); +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_vertical_resolution */ -/* - * lvgl extension definition for: - * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_vertical_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_horizontal_resolution */ -static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - ((void (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_horizontal_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_vertical_resolution */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_vertical_resolution); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_x_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_x); -/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_y */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_y_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_y); /* * lvgl extension definition for: - * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); - return ptr_to_mp((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_rotation_t _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_rotation_mpobj, 1, mp_lv_display_get_rotation, lv_display_get_rotation); /* * lvgl extension definition for: - * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * bool lv_display_get_matrix_rotation(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_is_position_valid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + bool _res = ((bool (*)(lv_display_t *))lv_func_ptr)(disp); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_is_position_valid_mpobj, 3, mp_lv_draw_buf_is_position_valid, lv_draw_buf_is_position_valid); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_matrix_rotation_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_matrix_rotation); + +/* Reusing lv_display_get_horizontal_resolution for lv_display_get_dpi */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_dpi_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_dpi); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) + * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) */ -static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *buf1 = mp_to_ptr(mp_args[1]); + void *buf2 = mp_to_ptr(mp_args[2]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, render_mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_mpobj, 5, mp_lv_display_set_buffers, lv_display_set_buffers); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) + * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) */ -static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_buffers_with_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *buf1 = mp_to_ptr(mp_args[1]); + void *buf2 = mp_to_ptr(mp_args[2]); + uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[5]); + ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, stride, render_mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_with_stride_mpobj, 6, mp_lv_display_set_buffers_with_stride, lv_display_set_buffers_with_stride); /* * lvgl extension definition for: - * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) */ -static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_draw_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); - return convert_to_bool(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(mp_args[2]); + ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf1, buf2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buffers_mpobj, 3, mp_lv_display_set_draw_buffers, lv_display_set_draw_buffers); /* * lvgl extension definition for: - * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) */ -static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_3rd_draw_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf3); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); - -/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_3rd_draw_buffer_mpobj, 2, mp_lv_display_set_3rd_draw_buffer, lv_display_set_3rd_draw_buffer); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) + * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) */ -static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_func_ptr)(disp, render_mode); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_render_mode_mpobj, 2, mp_lv_display_set_render_mode, lv_display_set_render_mode); /* - * lvgl extension definition for: - * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) + * Callback function lv_display_t_flush_cb + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) */ -static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) { - const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); - ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); - return mp_const_none; + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); + mp_args[2] = mp_array_from_u8ptr((void*)arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_cb)), 3, mp_args); + return; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); - /* * lvgl extension definition for: - * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) + * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) */ -static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); - uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); - lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); - ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *flush_cb = mp_lv_callback(mp_args[1], &lv_display_t_flush_cb_callback, MP_QSTR_lv_display_t_flush_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_func_ptr)(disp, flush_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); - -/* Reusing funcptr_lv_draw_buf_clear_cb_t for lv_draw_buf_clear_ex */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_ex_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, lv_draw_buf_clear_ex); - -/* Reusing lv_draw_buf_premultiply for lv_draw_buf_convert_premultiply */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_convert_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_convert_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_cb_mpobj, 2, mp_lv_display_set_flush_cb, lv_display_set_flush_cb); /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) + * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); - const char *path = (const char *)(char*)convert_from_str(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_flush_cb_t _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_lv_funcptr_lv_display_flush_cb_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); - - -static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, - { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_position_valid), MP_ROM_PTR(&mp_lv_draw_buf_is_position_valid_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_clear_ex), MP_ROM_PTR(&mp_lv_draw_buf_clear_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_convert_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_convert_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_flush_cb_mpobj, 1, mp_lv_display_get_flush_cb, lv_display_get_flush_cb); -}; -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); - +/* + * Callback function lv_display_t_wait_cb + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ -static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, - -}; +GENMPY_UNUSED static void lv_display_t_wait_cb_callback(lv_display_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_wait_cb)), 1, mp_args); + return; +} -static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) + * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) */ -static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_flush_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_func_ptr)(disp, wait_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ - - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_free_cb_t buf_free_cb - */ - - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_align_cb_t align_pointer_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_wait_cb_mpobj, 2, mp_lv_display_set_flush_wait_cb, lv_display_set_flush_wait_cb); /* - * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + * Callback function lv_display_t_sync_cb + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) */ - -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_cache_operation_cb_t flush_cache_cb - */ - +GENMPY_UNUSED static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) +{ + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_cb)), 2, mp_args); + return; +} -/* - * Function NOT generated: - * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ - /* * lvgl extension definition for: - * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) + * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) */ -static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_sync_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); - lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); - lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); - lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); - lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); - lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); - lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); - ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *sync_cb = mp_lv_callback(mp_args[1], &lv_display_t_sync_cb_callback, MP_QSTR_lv_display_t_sync_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_func_ptr)(disp, sync_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_cb_mpobj, 2, mp_lv_display_set_sync_cb, lv_display_set_sync_cb); /* * lvgl extension definition for: - * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) */ -static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_sync_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - void *buf = mp_to_ptr(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); - return ptr_to_mp((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_func_ptr)(disp, wait_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_wait_cb_mpobj, 2, mp_lv_display_set_sync_wait_cb, lv_display_set_sync_wait_cb); /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) + * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); - return mp_obj_new_int_from_uint(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, lv_color_format_t))lv_func_ptr)(disp, color_format); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_color_format_mpobj, 2, mp_lv_display_set_color_format, lv_display_set_color_format); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); - lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_color_format_t _res = ((lv_color_format_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_color_format_mpobj, 1, mp_lv_display_get_color_format, lv_display_get_color_format); /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) + * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) */ -static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t tile_cnt = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, tile_cnt); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); - - -static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, - { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_tile_cnt_mpobj, 2, mp_lv_display_set_tile_cnt, lv_display_set_tile_cnt); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); - /* * lvgl extension definition for: - * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); - int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_tile_cnt_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_tile_cnt); + +/* Reusing lv_display_set_matrix_rotation for lv_display_set_antialiasing */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_antialiasing_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_antialiasing); + +/* Reusing lv_display_get_matrix_rotation for lv_display_get_antialiasing */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_antialiasing_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_antialiasing); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_flush_ready */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_flush_ready); + +/* Reusing lv_display_get_matrix_rotation for lv_display_flush_is_last */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_flush_is_last); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_sync_ready */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_sync_ready); + +/* Reusing lv_display_get_matrix_rotation for lv_display_sync_is_last */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_sync_is_last); + +/* Reusing lv_display_get_matrix_rotation for lv_display_is_double_buffered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_double_buffered_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_double_buffered); /* * lvgl extension definition for: - * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_display_render_mode_t _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_render_mode_mpobj, 1, mp_lv_display_get_render_mode, lv_display_get_render_mode); /* * lvgl extension definition for: - * int32_t lv_area_get_width(const lv_area_t *area_p) + * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_screen_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_active_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_active); -/* Reusing lv_area_get_width for lv_area_get_height */ +/* Reusing lv_display_get_screen_active for lv_display_get_screen_prev */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_prev_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_prev); + +/* Reusing lv_display_get_screen_active for lv_display_get_screen_loading */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_loading_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_loading); + +/* Reusing lv_display_get_screen_active for lv_display_get_layer_top */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_top_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_top); + +/* Reusing lv_display_get_screen_active for lv_display_get_layer_sys */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_sys_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_sys); + +/* Reusing lv_display_get_screen_active for lv_display_get_layer_bottom */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_bottom_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_bottom); +/* + * Callback function lv_display_add_event_cb_event_cb + * void lv_event_cb_t(lv_event_t *e) + */ + +GENMPY_UNUSED static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_add_event_cb_event_cb)), 1, mp_args); + return; +} + + /* * lvgl extension definition for: - * void lv_area_set_width(lv_area_t *area_p, int32_t w) + * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ -static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[3]); + void *event_cb = mp_lv_callback(mp_args[1], &lv_display_add_event_cb_event_cb_callback, MP_QSTR_lv_display_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_add_event_cb_mpobj, 4, mp_lv_display_add_event_cb, lv_display_add_event_cb); -/* Reusing lv_area_set_width for lv_area_set_height */ +/* Reusing lv_display_get_tile_cnt for lv_display_get_event_count */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_count_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_event_count); /* * lvgl extension definition for: - * uint32_t lv_area_get_size(const lv_area_t *area_p) + * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) */ -static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_event_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); - return mp_obj_new_int_from_uint(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_dsc_mpobj, 2, mp_lv_display_get_event_dsc, lv_display_get_event_dsc); /* * lvgl extension definition for: - * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) + * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) */ -static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_remove_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); - int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_mpobj, 2, mp_lv_display_remove_event, lv_display_remove_event); -/* Reusing lv_area_increase for lv_area_move */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); - +/* + * Callback function lv_display_remove_event_cb_with_user_data_event_cb + * void lv_event_cb_t(lv_event_t *e) + */ + +GENMPY_UNUSED static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb)), 1, mp_args); + return; +} + /* * lvgl extension definition for: - * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) + * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_remove_event_cb_with_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); - lv_align_t align = (int)mp_obj_get_int(mp_args[2]); - int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); - int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); - ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); - return mp_const_none; + void *user_data = mp_to_ptr(mp_args[2]); + void *event_cb = mp_lv_callback(mp_args[1], &lv_display_remove_event_cb_with_user_data_event_cb_callback, MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); - -/* Reusing lv_area_increase for lv_area_set_pos */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_cb_with_user_data_mpobj, 3, mp_lv_display_remove_event_cb_with_user_data, lv_display_remove_event_cb_with_user_data); /* * lvgl extension definition for: - * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) */ -static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_send_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); - return convert_to_bool(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); + void *param = mp_to_ptr(mp_args[2]); + lv_result_t _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_func_ptr)(disp, code, param); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_event_mpobj, 3, mp_lv_display_send_event, lv_display_send_event); /* * lvgl extension definition for: - * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) */ -static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_theme_t *th = mp_write_ptr_lv_theme_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_theme_t *))lv_func_ptr)(disp, th); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_theme_mpobj, 2, mp_lv_display_set_theme, lv_display_set_theme); /* * lvgl extension definition for: - * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * lv_theme_t *lv_display_get_theme(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); - return mp_const_none; + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_theme_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_theme_mpobj, 1, mp_lv_display_get_theme, lv_display_get_theme); /* * lvgl extension definition for: - * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) + * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) */ -static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_inactive_time(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); - return convert_to_bool(_res); + const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_display_t *))lv_func_ptr)(disp); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_inactive_time_mpobj, 1, mp_lv_display_get_inactive_time, lv_display_get_inactive_time); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_trigger_activity */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_trigger_activity_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_trigger_activity); + +/* Reusing lv_display_set_matrix_rotation for lv_display_enable_invalidation */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_enable_invalidation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_enable_invalidation); + +/* Reusing lv_display_get_matrix_rotation for lv_display_is_invalidation_enabled */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_invalidation_enabled_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_invalidation_enabled); /* * lvgl extension definition for: - * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) + * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) */ -static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_refr_timer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); - return convert_to_bool(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_timer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_refr_timer_mpobj, 1, mp_lv_display_get_refr_timer, lv_display_get_refr_timer); + +/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete_refr_timer */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_refr_timer_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete_refr_timer); +/* + * Callback function lv_display_register_vsync_event_event_cb + * void lv_event_cb_t(lv_event_t *e) + */ + +GENMPY_UNUSED static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_register_vsync_event_event_cb)), 1, mp_args); + return; +} + + /* * lvgl extension definition for: - * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) + * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_register_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); - int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); - bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); + void *user_data = mp_to_ptr(mp_args[2]); + void *event_cb = mp_lv_callback(mp_args[1], &lv_display_register_vsync_event_event_cb_callback, MP_QSTR_lv_display_register_vsync_event_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + bool _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_register_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_register_vsync_event); -/* Reusing lv_area_is_in for lv_area_is_out */ +/* Reusing lv_display_register_vsync_event for lv_display_unregister_vsync_event */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_unregister_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_unregister_vsync_event); -/* Reusing lv_area_is_on for lv_area_is_equal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); - +/* + * lvgl extension definition for: + * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) + */ -static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, - { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, - -}; +static mp_obj_t mp_lv_display_send_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void *param = mp_to_ptr(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_display_t *, void *))lv_func_ptr)(disp, param); + return mp_obj_new_int(_res); +} -static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); - + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_vsync_event_mpobj, 2, mp_lv_display_send_vsync_event, lv_display_send_vsync_event); + /* * lvgl extension definition for: - * void lv_layer_init(lv_layer_t *layer) + * void lv_display_set_user_data(lv_display_t *disp, void *user_data) */ -static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); - ((void (*)(lv_layer_t *))lv_func_ptr)(layer); + void *user_data = mp_to_ptr(mp_args[1]); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + ((void (*)(lv_display_t *, void *))lv_func_ptr)(disp, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); - -/* Reusing lv_layer_init for lv_layer_reset */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_user_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_user_data); +/* Reusing lv_display_set_user_data for lv_display_set_driver_data */ -static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_driver_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_driver_data); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); - /* * lvgl extension definition for: - * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) + * void *lv_display_get_user_data(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); - return mp_obj_new_int_from_uint(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + void * _res = ((void *(*)(lv_display_t *))lv_func_ptr)(disp); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_user_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_user_data); + +/* Reusing lv_display_get_user_data for lv_display_get_driver_data */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_driver_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_driver_data); /* * lvgl extension definition for: - * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) + * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) */ -static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_buf_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); - return mp_obj_new_int(_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_func_ptr)(disp); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_buf_active_mpobj, 1, mp_lv_display_get_buf_active, lv_display_get_buf_active); /* * lvgl extension definition for: - * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) + * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) */ -static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_rotate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); - return ptr_to_mp((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_area_t *))lv_func_ptr)(disp, area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_area_mpobj, 2, mp_lv_display_rotate_area, lv_display_rotate_area); /* * lvgl extension definition for: - * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) + * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) */ -static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_rotate_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); + ((void (*)(lv_display_t *, lv_point_t *))lv_func_ptr)(disp, point); return mp_const_none; } - + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point); + +/* Reusing lv_display_rotate_point for lv_display_rotate_point_ccw */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_ccw_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point_ccw); + +/* Reusing lv_display_get_tile_cnt for lv_display_get_draw_buf_size */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_draw_buf_size_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_draw_buf_size); /* * lvgl extension definition for: - * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) + * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) */ -static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_get_invalidated_draw_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + uint32_t width = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t height = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_func_ptr)(disp, width, height); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_invalidated_draw_buf_size_mpobj, 3, mp_lv_display_get_invalidated_draw_buf_size, lv_display_get_invalidated_draw_buf_size); /* * lvgl extension definition for: - * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) + * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) */ -static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_dpx(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); + const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); + int32_t n = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_func_ptr)(disp, n); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_dpx_mpobj, 2, mp_lv_display_dpx, lv_display_dpx); /* * lvgl extension definition for: - * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) + * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) */ -static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_dispatch_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); + bool _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_func_ptr)(disp, layer); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_dispatch_layer_mpobj, 2, mp_lv_draw_dispatch_layer, lv_draw_dispatch_layer); /* * lvgl extension definition for: - * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) + * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) */ -static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_display_set_draw_buf_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); + lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[1]); + ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_func_ptr)(disp, handlers); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buf_handlers_mpobj, 2, mp_lv_display_set_draw_buf_handlers, lv_display_set_draw_buf_handlers); -/* - * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb - */ +static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_display_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_display_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_default), MP_ROM_PTR(&mp_lv_display_set_default_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_display_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_resolution), MP_ROM_PTR(&mp_lv_display_set_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_physical_resolution), MP_ROM_PTR(&mp_lv_display_set_physical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_display_set_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_display_set_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_matrix_rotation), MP_ROM_PTR(&mp_lv_display_set_matrix_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_dpi), MP_ROM_PTR(&mp_lv_display_set_dpi_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_horizontal_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_vertical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_original_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_original_horizontal_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_original_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_original_vertical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_physical_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_horizontal_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_physical_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_vertical_resolution_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_display_get_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_display_get_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_display_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_matrix_rotation), MP_ROM_PTR(&mp_lv_display_get_matrix_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_dpi), MP_ROM_PTR(&mp_lv_display_get_dpi_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_buffers), MP_ROM_PTR(&mp_lv_display_set_buffers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_buffers_with_stride), MP_ROM_PTR(&mp_lv_display_set_buffers_with_stride_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_buffers), MP_ROM_PTR(&mp_lv_display_set_draw_buffers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_3rd_draw_buffer), MP_ROM_PTR(&mp_lv_display_set_3rd_draw_buffer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_render_mode), MP_ROM_PTR(&mp_lv_display_set_render_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flush_cb), MP_ROM_PTR(&mp_lv_display_set_flush_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_flush_cb), MP_ROM_PTR(&mp_lv_display_get_flush_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flush_wait_cb), MP_ROM_PTR(&mp_lv_display_set_flush_wait_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_cb), MP_ROM_PTR(&mp_lv_display_set_sync_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_sync_wait_cb), MP_ROM_PTR(&mp_lv_display_set_sync_wait_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_display_set_color_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_color_format), MP_ROM_PTR(&mp_lv_display_get_color_format_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_tile_cnt), MP_ROM_PTR(&mp_lv_display_set_tile_cnt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_tile_cnt), MP_ROM_PTR(&mp_lv_display_get_tile_cnt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_antialiasing), MP_ROM_PTR(&mp_lv_display_set_antialiasing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_antialiasing), MP_ROM_PTR(&mp_lv_display_get_antialiasing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_ready), MP_ROM_PTR(&mp_lv_display_flush_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_is_last), MP_ROM_PTR(&mp_lv_display_flush_is_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_ready), MP_ROM_PTR(&mp_lv_display_sync_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sync_is_last), MP_ROM_PTR(&mp_lv_display_sync_is_last_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_double_buffered), MP_ROM_PTR(&mp_lv_display_is_double_buffered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_render_mode), MP_ROM_PTR(&mp_lv_display_get_render_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen_active), MP_ROM_PTR(&mp_lv_display_get_screen_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen_prev), MP_ROM_PTR(&mp_lv_display_get_screen_prev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_screen_loading), MP_ROM_PTR(&mp_lv_display_get_screen_loading_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_top), MP_ROM_PTR(&mp_lv_display_get_layer_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_sys), MP_ROM_PTR(&mp_lv_display_get_layer_sys_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer_bottom), MP_ROM_PTR(&mp_lv_display_get_layer_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_add_event_cb), MP_ROM_PTR(&mp_lv_display_add_event_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_event_count), MP_ROM_PTR(&mp_lv_display_get_event_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_event_dsc), MP_ROM_PTR(&mp_lv_display_get_event_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_event), MP_ROM_PTR(&mp_lv_display_remove_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_display_remove_event_cb_with_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_display_send_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_theme), MP_ROM_PTR(&mp_lv_display_set_theme_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_theme), MP_ROM_PTR(&mp_lv_display_get_theme_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_inactive_time), MP_ROM_PTR(&mp_lv_display_get_inactive_time_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_trigger_activity), MP_ROM_PTR(&mp_lv_display_trigger_activity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_enable_invalidation), MP_ROM_PTR(&mp_lv_display_enable_invalidation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_invalidation_enabled), MP_ROM_PTR(&mp_lv_display_is_invalidation_enabled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_refr_timer), MP_ROM_PTR(&mp_lv_display_get_refr_timer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete_refr_timer), MP_ROM_PTR(&mp_lv_display_delete_refr_timer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_register_vsync_event), MP_ROM_PTR(&mp_lv_display_register_vsync_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unregister_vsync_event), MP_ROM_PTR(&mp_lv_display_unregister_vsync_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_send_vsync_event), MP_ROM_PTR(&mp_lv_display_send_vsync_event_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_display_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_driver_data), MP_ROM_PTR(&mp_lv_display_set_driver_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_display_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_driver_data), MP_ROM_PTR(&mp_lv_display_get_driver_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_buf_active), MP_ROM_PTR(&mp_lv_display_get_buf_active_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_area), MP_ROM_PTR(&mp_lv_display_rotate_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_point), MP_ROM_PTR(&mp_lv_display_rotate_point_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_rotate_point_ccw), MP_ROM_PTR(&mp_lv_display_rotate_point_ccw_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_draw_buf_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_invalidated_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_invalidated_draw_buf_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_display_dpx_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_draw_dispatch_layer), MP_ROM_PTR(&mp_lv_draw_dispatch_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_draw_buf_handlers), MP_ROM_PTR(&mp_lv_display_set_draw_buf_handlers_mpobj) }, -#define funcptr_lv_draw_glyph_cb_t NULL - - -/* - * lvgl extension definition for: - * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) - */ - -static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); - const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); - return mp_const_none; -} +}; - +static MP_DEFINE_CONST_DICT(mp_lv_display_t_locals_dict, mp_lv_display_t_locals_dict_table); + +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_invalidate_cache */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_invalidate_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_invalidate_cache); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing funcptr_lv_draw_buf_cache_operation_cb_t for lv_draw_buf_flush_cache */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_flush_cache_mpobj, 2, mp_funcptr_lv_draw_buf_cache_operation_cb_t, lv_draw_buf_flush_cache); + /* * lvgl extension definition for: - * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) + * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) */ -static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_clear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_func_ptr)(draw_buf, a); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_glyph_cb_t cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_mpobj, 2, mp_lv_draw_buf_clear, lv_draw_buf_clear); /* * lvgl extension definition for: - * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) + * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); - const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); - uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); - return mp_const_none; + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_mpobj, 1, mp_lv_draw_buf_dup, lv_draw_buf_dup); /* * lvgl extension definition for: - * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) + * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) */ -static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + void *data = mp_to_ptr(mp_args[5]); + uint32_t data_size = (uint32_t)mp_obj_get_int(mp_args[6]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_func_ptr)(draw_buf, w, h, cf, stride, data, data_size); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_mpobj, 7, mp_lv_draw_buf_init, lv_draw_buf_init); /* * lvgl extension definition for: - * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) + * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) */ -static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_reshape(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[1]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[2]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_func_ptr)(draw_buf, cf, w, h, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); - - -/* - * Function NOT generated: - * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! - * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_reshape_mpobj, 5, mp_lv_draw_buf_reshape, lv_draw_buf_reshape); -#define funcptr_draw_line_cb NULL - /* * lvgl extension definition for: - * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_destroy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + ((void (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_destroy_mpobj, 1, mp_lv_draw_buf_destroy, lv_draw_buf_destroy); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } +/* Reusing funcptr_lv_draw_buf_copy_cb_t for lv_draw_buf_copy */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_copy_mpobj, 4, mp_funcptr_lv_draw_buf_copy_cb_t, lv_draw_buf_copy); + /* * lvgl extension definition for: - * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) + * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_goto_xy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); - void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); - return mp_const_none; + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_goto_xy_mpobj, 3, mp_lv_draw_buf_goto_xy, lv_draw_buf_goto_xy); /* * lvgl extension definition for: - * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) + * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_is_position_valid(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t x = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t y = (uint32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_func_ptr)(buf, x, y); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_is_position_valid_mpobj, 3, mp_lv_draw_buf_is_position_valid, lv_draw_buf_is_position_valid); /* * lvgl extension definition for: - * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) + * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) */ -static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_adjust_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); + lv_draw_buf_t *src = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_func_ptr)(src, stride); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_adjust_stride_mpobj, 2, mp_lv_draw_buf_adjust_stride, lv_draw_buf_adjust_stride); /* * lvgl extension definition for: - * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) + * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_func_ptr)(draw_buf); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_premultiply); /* * lvgl extension definition for: - * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) + * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_has_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); - return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + bool _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_has_flag_mpobj, 2, mp_lv_draw_buf_has_flag, lv_draw_buf_has_flag); /* * lvgl extension definition for: - * void lv_draw_cleanup_task(lv_draw_task_t *t) + * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static mp_obj_t mp_lv_draw_cleanup_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_flag(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - ((void (*)(lv_draw_task_t *))lv_func_ptr)(t); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_flags_t flag = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_func_ptr)(draw_buf, flag); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_cleanup_task_mpobj, 1, mp_lv_draw_cleanup_task, lv_draw_cleanup_task); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_set_flag); -/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ +/* Reusing lv_draw_buf_set_flag for lv_draw_buf_clear_flag */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_flag_mpobj, 2, mp_lv_draw_buf_set_flag, lv_draw_buf_clear_flag); /* * lvgl extension definition for: - * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) */ -static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_from_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + lv_draw_buf_t *buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_func_ptr)(buf, img); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_from_image_mpobj, 2, mp_lv_draw_buf_from_image, lv_draw_buf_from_image); /* * lvgl extension definition for: - * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) */ -static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_to_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + const lv_draw_buf_t *buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(mp_args[1]); + ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_func_ptr)(buf, img); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_to_image_mpobj, 2, mp_lv_draw_buf_to_image, lv_draw_buf_to_image); /* * lvgl extension definition for: - * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) */ -static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_set_palette(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(mp_args[0]); + uint8_t index = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color32_t color = mp_write_lv_color32_t(mp_args[2]); + ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_func_ptr)(draw_buf, index, color); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_set_palette_mpobj, 3, mp_lv_draw_buf_set_palette, lv_draw_buf_set_palette); + +/* Reusing funcptr_lv_draw_buf_clear_cb_t for lv_draw_buf_clear_ex */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_clear_ex_mpobj, 3, mp_funcptr_lv_draw_buf_clear_cb_t, lv_draw_buf_clear_ex); + +/* Reusing lv_draw_buf_premultiply for lv_draw_buf_convert_premultiply */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_convert_premultiply_mpobj, 1, mp_lv_draw_buf_premultiply, lv_draw_buf_convert_premultiply); /* * lvgl extension definition for: - * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) */ -static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_save_to_file(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); - return mp_const_none; + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[0]); + const char *path = (const char *)(char*)convert_from_str(mp_args[1]); + lv_result_t _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_func_ptr)(draw_buf, path); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_save_to_file_mpobj, 2, mp_lv_draw_buf_save_to_file, lv_draw_buf_save_to_file); -/* - * lvgl extension definition for: - * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) - */ - -static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; -} +static const mp_rom_map_elem_t mp_lv_draw_buf_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_t))) }, + { MP_ROM_QSTR(MP_QSTR_invalidate_cache), MP_ROM_PTR(&mp_lv_draw_buf_invalidate_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_flush_cache), MP_ROM_PTR(&mp_lv_draw_buf_flush_cache_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear), MP_ROM_PTR(&mp_lv_draw_buf_clear_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup), MP_ROM_PTR(&mp_lv_draw_buf_dup_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reshape), MP_ROM_PTR(&mp_lv_draw_buf_reshape_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_destroy), MP_ROM_PTR(&mp_lv_draw_buf_destroy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_draw_buf_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_goto_xy), MP_ROM_PTR(&mp_lv_draw_buf_goto_xy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_position_valid), MP_ROM_PTR(&mp_lv_draw_buf_is_position_valid_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_adjust_stride), MP_ROM_PTR(&mp_lv_draw_buf_adjust_stride_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_flag), MP_ROM_PTR(&mp_lv_draw_buf_has_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flag), MP_ROM_PTR(&mp_lv_draw_buf_set_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_flag), MP_ROM_PTR(&mp_lv_draw_buf_clear_flag_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_from_image), MP_ROM_PTR(&mp_lv_draw_buf_from_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_image), MP_ROM_PTR(&mp_lv_draw_buf_to_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_palette), MP_ROM_PTR(&mp_lv_draw_buf_set_palette_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_clear_ex), MP_ROM_PTR(&mp_lv_draw_buf_clear_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_convert_premultiply), MP_ROM_PTR(&mp_lv_draw_buf_convert_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_save_to_file), MP_ROM_PTR(&mp_lv_draw_buf_save_to_file_mpobj) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_t_locals_dict, mp_lv_draw_buf_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); +static const mp_rom_map_elem_t mp_lv_image_header_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_header_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_image_header_t_locals_dict, mp_lv_image_header_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) */ -static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_init_with_default_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + ((void (*)(lv_draw_buf_handlers_t *))lv_func_ptr)(handlers); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_init_with_default_handlers_mpobj, 1, mp_lv_draw_buf_init_with_default_handlers, lv_draw_buf_init_with_default_handlers); /* - * lvgl extension definition for: - * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) + * Function NOT generated: + * Callback function 'lv_draw_buf_malloc_cb_t buf_malloc_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_malloc_cb_t buf_malloc_cb */ + -static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; -} +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_free_cb_t buf_free_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_free_cb_t buf_free_cb + */ + - +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_copy_cb_t buf_copy_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_copy_cb_t buf_copy_cb + */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_align_cb_t align_pointer_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_align_cb_t align_pointer_cb + */ + + +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t invalidate_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ -/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_cache_operation_cb_t flush_cache_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ -/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); +/* + * Function NOT generated: + * Callback function 'lv_draw_buf_width_to_stride_cb_t width_to_stride_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ /* * lvgl extension definition for: - * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) + * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) */ -static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_handlers_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); + lv_draw_buf_handlers_t *handlers = mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + lv_draw_buf_malloc_cb_t buf_malloc_cb = mp_to_ptr(mp_args[1]); + lv_draw_buf_free_cb_t buf_free_cb = mp_to_ptr(mp_args[2]); + lv_draw_buf_copy_cb_t buf_copy_cb = mp_to_ptr(mp_args[3]); + lv_draw_buf_align_cb_t align_pointer_cb = mp_to_ptr(mp_args[4]); + lv_draw_buf_cache_operation_cb_t invalidate_cache_cb = mp_to_ptr(mp_args[5]); + lv_draw_buf_cache_operation_cb_t flush_cache_cb = mp_to_ptr(mp_args[6]); + lv_draw_buf_width_to_stride_cb_t width_to_stride_cb = mp_to_ptr(mp_args[7]); + ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_func_ptr)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_handlers_init_mpobj, 8, mp_lv_draw_buf_handlers_init, lv_draw_buf_handlers_init); /* * lvgl extension definition for: - * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_align_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + void *buf = mp_to_ptr(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + void * _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_func_ptr)(handlers, buf, color_format); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_align_ex_mpobj, 3, mp_lv_draw_buf_align_ex, lv_draw_buf_align_ex); /* * lvgl extension definition for: - * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) + * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) */ -static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_width_to_stride_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); - ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[2]); + uint32_t _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_func_ptr)(handlers, w, color_format); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); - - -/* - * Function NOT generated: - * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! - * lv_draw_image_core_cb draw_core_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_width_to_stride_ex_mpobj, 3, mp_lv_draw_buf_width_to_stride_ex, lv_draw_buf_width_to_stride_ex); -#define funcptr_lv_draw_image_core_cb NULL - /* * lvgl extension definition for: - * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_create_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); - lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); - const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); - const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + uint32_t w = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t h = (uint32_t)mp_obj_get_int(mp_args[2]); + lv_color_format_t cf = (int)mp_obj_get_int(mp_args[3]); + uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_func_ptr)(handlers, w, h, cf, stride); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_create_ex_mpobj, 5, mp_lv_draw_buf_create_ex, lv_draw_buf_create_ex); -GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } - /* * lvgl extension definition for: - * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) */ -static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_buf_dup_ex(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); - lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); - return mp_const_none; + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[0]); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(mp_args[1]); + lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_func_ptr)(handlers, draw_buf); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); - -/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); - -/* Reusing lv_draw_unit_draw_letter for lv_draw_unit_draw_letter_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_internal_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter_internal); - - -static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_cleanup_task), MP_ROM_PTR(&mp_lv_draw_cleanup_task_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unit_draw_letter_internal), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_internal_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_buf_dup_ex_mpobj, 2, mp_lv_draw_buf_dup_ex, lv_draw_buf_dup_ex); -}; -static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, +static const mp_rom_map_elem_t mp_lv_draw_buf_handlers_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_buf_handlers_t))) }, + { MP_ROM_QSTR(MP_QSTR_init_with_default_handlers), MP_ROM_PTR(&mp_lv_draw_buf_init_with_default_handlers_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_draw_buf_handlers_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align_ex), MP_ROM_PTR(&mp_lv_draw_buf_align_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_width_to_stride_ex), MP_ROM_PTR(&mp_lv_draw_buf_width_to_stride_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_create_ex), MP_ROM_PTR(&mp_lv_draw_buf_create_ex_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_dup_ex), MP_ROM_PTR(&mp_lv_draw_buf_dup_ex_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_draw_buf_handlers_t_locals_dict, mp_lv_draw_buf_handlers_t_locals_dict_table); /* * lvgl extension definition for: - * void *lv_event_get_target(lv_event_t *e) + * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) */ -static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); - return ptr_to_mp((void*)_res); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t x1 = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y1 = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t x2 = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t y2 = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_func_ptr)(area_p, x1, y1, x2, y2); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); - -/* Reusing lv_event_get_target for lv_event_get_current_target */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_mpobj, 5, mp_lv_area_set, lv_area_set); /* * lvgl extension definition for: - * lv_event_code_t lv_event_get_code(lv_event_t *e) + * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) */ -static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_copy(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int(_res); + lv_area_t *dest = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(lv_area_t *, const lv_area_t *))lv_func_ptr)(dest, src); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); - -/* Reusing lv_event_get_target for lv_event_get_param */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); - -/* Reusing lv_event_get_target for lv_event_get_user_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); - -/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); - -/* Reusing funcptr_event_cb for lv_event_stop_trickling */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); - -/* Reusing funcptr_event_cb for lv_event_stop_processing */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); - -/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_copy_mpobj, 2, mp_lv_area_copy, lv_area_copy); /* * lvgl extension definition for: - * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) + * int32_t lv_area_get_width(const lv_area_t *area_p) */ -static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_get_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_width_mpobj, 1, mp_lv_area_get_width, lv_area_get_width); + +/* Reusing lv_area_get_width for lv_area_get_height */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_height_mpobj, 1, mp_lv_area_get_width, lv_area_get_height); /* * lvgl extension definition for: - * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) + * void lv_area_set_width(lv_area_t *area_p, int32_t w) */ -static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_set_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); - return lv_to_mp((void*)_res); + lv_area_t *area_p = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_area_t *, int32_t))lv_func_ptr)(area_p, w); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_width_mpobj, 2, mp_lv_area_set_width, lv_area_set_width); -/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ +/* Reusing lv_area_set_width for lv_area_set_height */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_height_mpobj, 2, mp_lv_area_set_width, lv_area_set_height); /* * lvgl extension definition for: - * lv_indev_t *lv_event_get_indev(lv_event_t *e) + * uint32_t lv_area_get_size(const lv_area_t *area_p) */ -static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_get_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_indev_t((void*)_res); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(const lv_area_t *))lv_func_ptr)(area_p); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_get_size_mpobj, 1, mp_lv_area_get_size, lv_area_get_size); /* * lvgl extension definition for: - * lv_layer_t *lv_event_get_layer(lv_event_t *e) + * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) */ -static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_increase(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_layer_t((void*)_res); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[0]); + int32_t w_extra = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t h_extra = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_func_ptr)(area, w_extra, h_extra); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_increase_mpobj, 3, mp_lv_area_increase, lv_area_increase); + +/* Reusing lv_area_increase for lv_area_move */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_move_mpobj, 3, mp_lv_area_increase, lv_area_move); /* * lvgl extension definition for: - * const lv_area_t *lv_event_get_old_size(lv_event_t *e) + * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) */ -static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_area_t((void*)_res); + const lv_area_t *base = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + lv_area_t *to_align = mp_write_ptr_lv_area_t(mp_args[1]); + lv_align_t align = (int)mp_obj_get_int(mp_args[2]); + int32_t ofs_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t ofs_y = (int32_t)mp_obj_get_int(mp_args[4]); + ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_func_ptr)(base, to_align, align, ofs_x, ofs_y); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_align_mpobj, 5, mp_lv_area_align, lv_area_align); + +/* Reusing lv_area_increase for lv_area_set_pos */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_set_pos_mpobj, 3, mp_lv_area_increase, lv_area_set_pos); /* * lvgl extension definition for: - * uint32_t lv_event_get_key(lv_event_t *e) + * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_intersect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); - return mp_obj_new_int_from_uint(_res); + lv_area_t *res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + bool _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_intersect_mpobj, 3, mp_lv_area_intersect, lv_area_intersect); /* * lvgl extension definition for: - * int32_t lv_event_get_rotary_diff(lv_event_t *e) + * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); + lv_area_t *res_p = mp_arr_to_lv_area_t_____(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + int8_t _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_func_ptr)(res_p, a1_p, a2_p); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_area_diff_mpobj, 3, mp_lv_area_diff, lv_area_diff); /* * lvgl extension definition for: - * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) + * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_join(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_area_t *a_res_p = mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(a_res_p, a1_p, a2_p); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_join_mpobj, 3, mp_lv_area_join, lv_area_join); /* * lvgl extension definition for: - * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) + * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) */ -static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_point_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); - return mp_const_none; + const lv_area_t *a_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_func_ptr)(a_p, p_p, radius); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_point_on_mpobj, 3, mp_lv_area_is_point_on, lv_area_is_point_on); /* * lvgl extension definition for: - * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) + * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_area_is_on(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_point_t((void*)_res); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_func_ptr)(a1_p, a2_p); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_on_mpobj, 2, mp_lv_area_is_on, lv_area_is_on); /* - * Struct lv_hit_test_info_t + * lvgl extension definition for: + * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) */ -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); - -GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); - return (lv_hit_test_info_t*)self->data; -} - -#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) - -GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) -{ - return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); -} - -#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) -#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) - -static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) -{ - mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); - GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; - - if (dest[0] == MP_OBJ_NULL) { - // load attribute - switch(attr) - { - case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; - case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; - default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup - } - } else { - if (dest[1]) - { - // store attribute - switch(attr) - { - case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; - case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; - default: return; - } - - dest[0] = MP_OBJ_NULL; // indicate success - } - } -} - -static void mp_lv_hit_test_info_t_print(const mp_print_t *print, - mp_obj_t self_in, - mp_print_kind_t kind) +static mp_obj_t mp_lv_area_is_in(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_printf(print, "struct lv_hit_test_info_t"); + const lv_area_t *ain_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[0]); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[1]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[2]); + bool _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_func_ptr)(ain_p, aholder_p, radius); + return convert_to_bool(_res); } -static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; - -static MP_DEFINE_CONST_OBJ_TYPE( - mp_lv_hit_test_info_t_type, - MP_QSTR_lv_hit_test_info_t, - MP_TYPE_FLAG_NONE, - print, mp_lv_hit_test_info_t_print, - make_new, make_new_lv_struct, - binary_op, lv_struct_binary_op, - subscr, lv_struct_subscr, - attr, mp_lv_hit_test_info_t_attr, - locals_dict, &mp_lv_hit_test_info_t_locals_dict, - buffer, mp_blob_get_buffer, - parent, &mp_lv_base_struct_type -); + -static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) -{ - return &mp_lv_hit_test_info_t_type; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_in_mpobj, 3, mp_lv_area_is_in, lv_area_is_in); +/* Reusing lv_area_is_in for lv_area_is_out */ -/* - * lvgl extension definition for: - * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) - */ - -static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_hit_test_info_t((void*)_res); -} - - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_out_mpobj, 3, mp_lv_area_is_in, lv_area_is_out); + +/* Reusing lv_area_is_on for lv_area_is_equal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_area_is_equal_mpobj, 2, mp_lv_area_is_on, lv_area_is_equal); -/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); +static const mp_rom_map_elem_t mp_lv_area_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_area_t))) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_area_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_area_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_width), MP_ROM_PTR(&mp_lv_area_get_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_height), MP_ROM_PTR(&mp_lv_area_get_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_area_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_area_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_size), MP_ROM_PTR(&mp_lv_area_get_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_increase), MP_ROM_PTR(&mp_lv_area_increase_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_move), MP_ROM_PTR(&mp_lv_area_move_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_align), MP_ROM_PTR(&mp_lv_area_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pos), MP_ROM_PTR(&mp_lv_area_set_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_intersect), MP_ROM_PTR(&mp_lv_area_intersect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_diff), MP_ROM_PTR(&mp_lv_area_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_join), MP_ROM_PTR(&mp_lv_area_join_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_point_on), MP_ROM_PTR(&mp_lv_area_is_point_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_on), MP_ROM_PTR(&mp_lv_area_is_on_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_in), MP_ROM_PTR(&mp_lv_area_is_in_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_out), MP_ROM_PTR(&mp_lv_area_is_out_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_equal), MP_ROM_PTR(&mp_lv_area_is_equal_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_area_t_locals_dict, mp_lv_area_t_locals_dict_table); + /* * lvgl extension definition for: - * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) + * void lv_layer_init(lv_layer_t *layer) */ -static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_layer_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[0]); + ((void (*)(lv_layer_t *))lv_func_ptr)(layer); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_init_mpobj, 1, mp_lv_layer_init, lv_layer_init); + +/* Reusing lv_layer_init for lv_layer_reset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_layer_reset_mpobj, 1, mp_lv_layer_init, lv_layer_reset); + + +static const mp_rom_map_elem_t mp_lv_layer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_layer_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_layer_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_layer_reset_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_layer_t_locals_dict, mp_lv_layer_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) + * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) */ -static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_get_dependent_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); - return mp_read_ptr_lv_draw_task_t((void*)_res); + lv_draw_task_t *t_check = mp_write_ptr_lv_draw_task_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_draw_task_t *))lv_func_ptr)(t_check); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_get_dependent_count_mpobj, 1, mp_lv_draw_get_dependent_count, lv_draw_get_dependent_count); /* * lvgl extension definition for: - * lv_state_t lv_event_get_prev_state(lv_event_t *e) + * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); - lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_task_type_t _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_func_ptr)(t); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_type_mpobj, 1, mp_lv_draw_task_get_type, lv_draw_task_get_type); /* * lvgl extension definition for: - * float lv_event_get_pinch_scale(lv_event_t *gesture_event) + * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) */ -static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_draw_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_float_from_f(_res); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + void * _res = ((void *(*)(const lv_draw_task_t *))lv_func_ptr)(t); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); - -/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_draw_dsc_mpobj, 1, mp_lv_draw_task_get_draw_dsc, lv_draw_task_get_draw_dsc); /* * lvgl extension definition for: - * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) + * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) */ -static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + const lv_draw_task_t *t = (const lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); + ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_func_ptr)(t, area); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_area_mpobj, 2, mp_lv_draw_task_get_area, lv_draw_task_get_area); /* * lvgl extension definition for: - * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) + * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_fill_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); - lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t * _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_fill_dsc_mpobj, 1, mp_lv_draw_task_get_fill_dsc, lv_draw_task_get_fill_dsc); /* * lvgl extension definition for: - * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) + * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_border_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); - lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_border_dsc_t * _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); - -/* Reusing funcptr_event_cb for lv_event_push */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); - -/* Reusing funcptr_event_cb for lv_event_pop */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); - - -static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, - { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); - -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete); - -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_set_default */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_default_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_set_default); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_border_dsc_mpobj, 1, mp_lv_draw_task_get_border_dsc, lv_draw_task_get_border_dsc); /* * lvgl extension definition for: - * lv_display_t *lv_display_get_next(lv_display_t *disp) + * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_box_shadow_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_t * _res = ((lv_display_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_display_t((void*)_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_box_shadow_dsc_t * _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_next_mpobj, 1, mp_lv_display_get_next, lv_display_get_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_box_shadow_dsc_mpobj, 1, mp_lv_draw_task_get_box_shadow_dsc, lv_draw_task_get_box_shadow_dsc); /* * lvgl extension definition for: - * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) + * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_label_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - int32_t hor_res = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t ver_res = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_func_ptr)(disp, hor_res, ver_res); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_label_dsc_t * _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_resolution); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_label_dsc_mpobj, 1, mp_lv_draw_task_get_label_dsc, lv_draw_task_get_label_dsc); -/* Reusing lv_display_set_resolution for lv_display_set_physical_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_physical_resolution_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_physical_resolution); +/* + * Function NOT generated: + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb + */ -/* Reusing lv_display_set_resolution for lv_display_set_offset */ +#define funcptr_lv_draw_glyph_cb_t NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_offset_mpobj, 3, mp_lv_display_set_resolution, lv_display_set_offset); - /* * lvgl extension definition for: - * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) + * void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) */ -static mp_obj_t mp_lv_display_set_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_glyph_cb_t(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_rotation_t rotation = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, lv_display_rotation_t))lv_func_ptr)(disp, rotation); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + lv_draw_fill_dsc_t *fill_dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[2]); + const lv_area_t *fill_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[3]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, fill_dsc, fill_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_rotation_mpobj, 2, mp_lv_display_set_rotation, lv_display_set_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_glyph_cb_t_mpobj, 4, mp_funcptr_lv_draw_glyph_cb_t, funcptr_lv_draw_glyph_cb_t); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_glyph_cb_t(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_glyph_cb_t_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) + * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_display_set_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_label_iterate_characters(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - bool enable = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_display_t *, bool))lv_func_ptr)(disp, enable); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[3]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, coords, cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_matrix_rotation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_matrix_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_label_iterate_characters_mpobj, 4, mp_lv_draw_label_iterate_characters, lv_draw_label_iterate_characters); + + +/* + * Function NOT generated: + * Callback function 'lv_draw_glyph_cb_t cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_glyph_cb_t cb + */ /* * lvgl extension definition for: - * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) + * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static mp_obj_t mp_lv_display_set_dpi(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_unit_draw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - int32_t dpi = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, int32_t))lv_func_ptr)(disp, dpi); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(mp_args[1]); + const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[2]); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[3]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_draw_glyph_cb_t cb = mp_to_ptr(mp_args[5]); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_func_ptr)(t, dsc, pos, font, letter, cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_dpi_mpobj, 2, mp_lv_display_set_dpi, lv_display_set_dpi); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter); /* * lvgl extension definition for: - * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) + * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_get_horizontal_resolution(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_image_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_image_dsc_t * _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_horizontal_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_vertical_resolution */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_vertical_resolution); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_image_dsc_mpobj, 1, mp_lv_draw_task_get_image_dsc, lv_draw_task_get_image_dsc); -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_horizontal_resolution */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_horizontal_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_original_vertical_resolution */ +/* + * lvgl extension definition for: + * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_original_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_original_vertical_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_horizontal_resolution */ +static mp_obj_t mp_lv_draw_task_get_line_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t * _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_horizontal_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_horizontal_resolution); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_physical_vertical_resolution */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_physical_vertical_resolution_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_physical_vertical_resolution); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_line_dsc_mpobj, 1, mp_lv_draw_task_get_line_dsc, lv_draw_task_get_line_dsc); -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_x */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_x_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_x); +/* + * Function NOT generated: + * Callback function 'void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)' must receive a struct pointer with user_data member as its first argument! + * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + */ -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_offset_y */ +#define funcptr_draw_line_cb NULL -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_offset_y_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_offset_y); - /* * lvgl extension definition for: - * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) + * void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) */ -static mp_obj_t mp_lv_display_get_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_draw_line_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_rotation_t _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_func_ptr)(t, dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_rotation_mpobj, 1, mp_lv_display_get_rotation, lv_display_get_rotation); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_draw_line_cb_mpobj, 2, mp_funcptr_draw_line_cb, funcptr_draw_line_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_draw_line_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_draw_line_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * bool lv_display_get_matrix_rotation(lv_display_t *disp) + * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) */ -static mp_obj_t mp_lv_display_get_matrix_rotation(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_line_iterate(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - bool _res = ((bool (*)(lv_display_t *))lv_func_ptr)(disp); - return convert_to_bool(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(mp_args[1]); + void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) = mp_to_ptr(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_func_ptr)(t, dsc, draw_line_cb); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_matrix_rotation_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_matrix_rotation); - -/* Reusing lv_display_get_horizontal_resolution for lv_display_get_dpi */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_dpi_mpobj, 1, mp_lv_display_get_horizontal_resolution, lv_display_get_dpi); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_line_iterate_mpobj, 3, mp_lv_draw_line_iterate, lv_draw_line_iterate); /* * lvgl extension definition for: - * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) + * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_arc_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *buf1 = mp_to_ptr(mp_args[1]); - void *buf2 = mp_to_ptr(mp_args[2]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, render_mode); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_arc_dsc_t * _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_mpobj, 5, mp_lv_display_set_buffers, lv_display_set_buffers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_arc_dsc_mpobj, 1, mp_lv_draw_task_get_arc_dsc, lv_draw_task_get_arc_dsc); /* * lvgl extension definition for: - * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) + * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_buffers_with_stride(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_triangle_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *buf1 = mp_to_ptr(mp_args[1]); - void *buf2 = mp_to_ptr(mp_args[2]); - uint32_t buf_size = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t stride = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[5]); - ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_func_ptr)(disp, buf1, buf2, buf_size, stride, render_mode); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_triangle_dsc_t * _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_buffers_with_stride_mpobj, 6, mp_lv_display_set_buffers_with_stride, lv_display_set_buffers_with_stride); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_triangle_dsc_mpobj, 1, mp_lv_draw_task_get_triangle_dsc, lv_draw_task_get_triangle_dsc); /* * lvgl extension definition for: - * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) + * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_draw_buffers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_blur_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(mp_args[2]); - ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf1, buf2); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_blur_dsc_t * _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buffers_mpobj, 3, mp_lv_display_set_draw_buffers, lv_display_set_draw_buffers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_blur_dsc_mpobj, 1, mp_lv_draw_task_get_blur_dsc, lv_draw_task_get_blur_dsc); /* * lvgl extension definition for: - * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) + * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) */ -static mp_obj_t mp_lv_display_set_3rd_draw_buffer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_task_get_mask_rect_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_func_ptr)(disp, buf3); - return mp_const_none; + lv_draw_task_t *task = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_mask_rect_dsc_t * _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_func_ptr)(task); + return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_3rd_draw_buffer_mpobj, 2, mp_lv_display_set_3rd_draw_buffer, lv_display_set_3rd_draw_buffer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_task_get_mask_rect_dsc_mpobj, 1, mp_lv_draw_task_get_mask_rect_dsc, lv_draw_task_get_mask_rect_dsc); /* * lvgl extension definition for: - * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) + * void lv_draw_cleanup_task(lv_draw_task_t *t) */ -static mp_obj_t mp_lv_display_set_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_cleanup_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_func_ptr)(disp, render_mode); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + ((void (*)(lv_draw_task_t *))lv_func_ptr)(t); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_render_mode_mpobj, 2, mp_lv_display_set_render_mode, lv_display_set_render_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_cleanup_task_mpobj, 1, mp_lv_draw_cleanup_task, lv_draw_cleanup_task); + +/* Reusing funcptr_lv_draw_sw_blend_handler_t for lv_draw_sw_blend */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blend_mpobj, 2, mp_funcptr_lv_draw_sw_blend_handler_t, lv_draw_sw_blend); /* - * Callback function lv_display_t_flush_cb - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) + * lvgl extension definition for: + * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -GENMPY_UNUSED static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) +static mp_obj_t mp_lv_draw_sw_fill(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); - mp_args[2] = mp_array_from_u8ptr((void*)arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_flush_cb)), 3, mp_args); - return; + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_fill_mpobj, 3, mp_lv_draw_sw_fill, lv_draw_sw_fill); + /* * lvgl extension definition for: - * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) + * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_border(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *flush_cb = mp_lv_callback(mp_args[1], &lv_display_t_flush_cb_callback, MP_QSTR_lv_display_t_flush_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_func_ptr)(disp, flush_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_cb_mpobj, 2, mp_lv_display_set_flush_cb, lv_display_set_flush_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_border_mpobj, 3, mp_lv_draw_sw_border, lv_draw_sw_border); /* * lvgl extension definition for: - * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) + * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_get_flush_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_box_shadow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_flush_cb_t _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_lv_funcptr_lv_display_flush_cb_t(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_flush_cb_mpobj, 1, mp_lv_display_get_flush_cb, lv_display_get_flush_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_box_shadow_mpobj, 3, mp_lv_draw_sw_box_shadow, lv_draw_sw_box_shadow); /* - * Callback function lv_display_t_wait_cb - * void lv_display_flush_wait_cb_t(lv_display_t *disp) + * lvgl extension definition for: + * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -GENMPY_UNUSED static void lv_display_t_wait_cb_callback(lv_display_t *arg0) +static mp_obj_t mp_lv_draw_sw_image(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_wait_cb)), 1, mp_args); - return; + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, coords); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_image_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_image); + /* * lvgl extension definition for: - * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) + * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_flush_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_letter(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_func_ptr)(disp, wait_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_flush_wait_cb_mpobj, 2, mp_lv_display_set_flush_wait_cb, lv_display_set_flush_wait_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_letter_mpobj, 3, mp_lv_draw_sw_letter, lv_draw_sw_letter); /* - * Callback function lv_display_t_sync_cb - * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) + * lvgl extension definition for: + * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -GENMPY_UNUSED static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) +static mp_obj_t mp_lv_draw_sw_label(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_display_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_area_t((void*)arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_t_sync_cb)), 2, mp_args); - return; + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_label_mpobj, 3, mp_lv_draw_sw_label, lv_draw_sw_label); + /* * lvgl extension definition for: - * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) + * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_sync_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_arc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *sync_cb = mp_lv_callback(mp_args[1], &lv_display_t_sync_cb_callback, MP_QSTR_lv_display_t_sync_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_func_ptr)(disp, sync_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_cb_mpobj, 2, mp_lv_display_set_sync_cb, lv_display_set_sync_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_arc_mpobj, 3, mp_lv_draw_sw_arc, lv_draw_sw_arc); + +/* Reusing funcptr_draw_line_cb for lv_draw_sw_line */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_line_mpobj, 2, mp_funcptr_draw_line_cb, lv_draw_sw_line); + +/* Reusing lv_draw_sw_image for lv_draw_sw_layer */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_layer_mpobj, 3, mp_lv_draw_sw_image, lv_draw_sw_layer); /* * lvgl extension definition for: - * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) + * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) */ -static mp_obj_t mp_lv_display_set_sync_wait_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_triangle(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *wait_cb = mp_lv_callback(mp_args[1], &lv_display_t_wait_cb_callback, MP_QSTR_lv_display_t_wait_cb, &disp->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_func_ptr)(disp, wait_cb); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_func_ptr)(t, dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_sync_wait_cb_mpobj, 2, mp_lv_display_set_sync_wait_cb, lv_display_set_sync_wait_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_triangle_mpobj, 2, mp_lv_draw_sw_triangle, lv_draw_sw_triangle); /* * lvgl extension definition for: - * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) + * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static mp_obj_t mp_lv_display_set_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_blur(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_color_format_t color_format = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, lv_color_format_t))lv_func_ptr)(disp, color_format); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_func_ptr)(t, dsc, coords); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_color_format_mpobj, 2, mp_lv_display_set_color_format, lv_display_set_color_format); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_blur_mpobj, 3, mp_lv_draw_sw_blur, lv_draw_sw_blur); /* * lvgl extension definition for: - * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) + * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) */ -static mp_obj_t mp_lv_display_get_color_format(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_sw_mask_rect(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_color_format_t _res = ((lv_color_format_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(mp_args[1]); + ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_func_ptr)(t, dsc); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_color_format_mpobj, 1, mp_lv_display_get_color_format, lv_display_get_color_format); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_sw_mask_rect_mpobj, 2, mp_lv_draw_sw_mask_rect, lv_draw_sw_mask_rect); + + +/* + * Function NOT generated: + * Callback function 'lv_draw_image_core_cb draw_core_cb' must receive a struct pointer with user_data member as its first argument! + * lv_draw_image_core_cb draw_core_cb + */ +#define funcptr_lv_draw_image_core_cb NULL + /* * lvgl extension definition for: - * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) + * void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) */ -static mp_obj_t mp_lv_display_set_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_funcptr_lv_draw_image_core_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t tile_cnt = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, tile_cnt); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_image_decoder_dsc_t *decoder_dsc = (const lv_image_decoder_dsc_t *)mp_write_ptr_lv_image_decoder_dsc_t(mp_args[2]); + lv_draw_image_sup_t *sup = mp_write_ptr_lv_draw_image_sup_t(mp_args[3]); + const lv_area_t *img_coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[4]); + const lv_area_t *clipped_img_area = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[5]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_image_decoder_dsc_t *, lv_draw_image_sup_t *, const lv_area_t *, const lv_area_t *))lv_func_ptr)(t, draw_dsc, decoder_dsc, sup, img_coords, clipped_img_area); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_tile_cnt_mpobj, 2, mp_lv_display_set_tile_cnt, lv_display_set_tile_cnt); +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_funcptr_lv_draw_image_core_cb_mpobj, 6, mp_funcptr_lv_draw_image_core_cb, funcptr_lv_draw_image_core_cb); +GENMPY_UNUSED static inline mp_obj_t mp_lv_funcptr_lv_draw_image_core_cb(void *func){ return mp_lv_funcptr(&mp_funcptr_lv_draw_image_core_cb_mpobj, func, NULL, MP_QSTR_, NULL); } + /* * lvgl extension definition for: - * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) + * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static mp_obj_t mp_lv_display_get_tile_cnt(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_draw_image_normal_helper(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int_from_uint(_res); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(mp_args[0]); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(mp_args[1]); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(mp_args[2]); + lv_draw_image_core_cb draw_core_cb = mp_to_ptr(mp_args[3]); + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(mp_args[4]); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_func_ptr)(t, draw_dsc, coords, draw_core_cb, decoder_args); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_tile_cnt_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_tile_cnt); - -/* Reusing lv_display_set_matrix_rotation for lv_display_set_antialiasing */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_antialiasing_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_set_antialiasing); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_normal_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_normal_helper); -/* Reusing lv_display_get_matrix_rotation for lv_display_get_antialiasing */ +/* Reusing lv_draw_image_normal_helper for lv_draw_image_tiled_helper */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_antialiasing_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_get_antialiasing); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_image_tiled_helper_mpobj, 5, mp_lv_draw_image_normal_helper, lv_draw_image_tiled_helper); -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_flush_ready */ +/* Reusing lv_draw_unit_draw_letter for lv_draw_unit_draw_letter_internal */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_flush_ready); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_unit_draw_letter_internal_mpobj, 6, mp_lv_draw_unit_draw_letter, lv_draw_unit_draw_letter_internal); -/* Reusing lv_display_get_matrix_rotation for lv_display_flush_is_last */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_flush_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_flush_is_last); +static const mp_rom_map_elem_t mp_lv_draw_task_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_task_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_dependent_count), MP_ROM_PTR(&mp_lv_draw_get_dependent_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_type), MP_ROM_PTR(&mp_lv_draw_task_get_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_draw_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_area), MP_ROM_PTR(&mp_lv_draw_task_get_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_fill_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_fill_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_border_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_border_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_box_shadow_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_box_shadow_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_label_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_label_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_label_iterate_characters), MP_ROM_PTR(&mp_lv_draw_label_iterate_characters_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_image_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_image_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_line_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_line_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_line_iterate), MP_ROM_PTR(&mp_lv_draw_line_iterate_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_arc_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_arc_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_triangle_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_triangle_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_blur_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_blur_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_mask_rect_dsc), MP_ROM_PTR(&mp_lv_draw_task_get_mask_rect_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_cleanup_task), MP_ROM_PTR(&mp_lv_draw_cleanup_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blend), MP_ROM_PTR(&mp_lv_draw_sw_blend_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_fill), MP_ROM_PTR(&mp_lv_draw_sw_fill_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_border), MP_ROM_PTR(&mp_lv_draw_sw_border_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_box_shadow), MP_ROM_PTR(&mp_lv_draw_sw_box_shadow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_image), MP_ROM_PTR(&mp_lv_draw_sw_image_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_letter), MP_ROM_PTR(&mp_lv_draw_sw_letter_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_label), MP_ROM_PTR(&mp_lv_draw_sw_label_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_arc), MP_ROM_PTR(&mp_lv_draw_sw_arc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_line), MP_ROM_PTR(&mp_lv_draw_sw_line_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_layer), MP_ROM_PTR(&mp_lv_draw_sw_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_triangle), MP_ROM_PTR(&mp_lv_draw_sw_triangle_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_blur), MP_ROM_PTR(&mp_lv_draw_sw_blur_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_sw_mask_rect), MP_ROM_PTR(&mp_lv_draw_sw_mask_rect_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_normal_helper), MP_ROM_PTR(&mp_lv_draw_image_normal_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_image_tiled_helper), MP_ROM_PTR(&mp_lv_draw_image_tiled_helper_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_unit_draw_letter_internal), MP_ROM_PTR(&mp_lv_draw_unit_draw_letter_internal_mpobj) }, -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_sync_ready */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_ready_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_sync_ready); - -/* Reusing lv_display_get_matrix_rotation for lv_display_sync_is_last */ +static MP_DEFINE_CONST_DICT(mp_lv_draw_task_t_locals_dict, mp_lv_draw_task_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_sync_is_last_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_sync_is_last); +static const mp_rom_map_elem_t mp_lv_draw_unit_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_draw_unit_t))) }, -/* Reusing lv_display_get_matrix_rotation for lv_display_is_double_buffered */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_double_buffered_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_double_buffered); - +static MP_DEFINE_CONST_DICT(mp_lv_draw_unit_t_locals_dict, mp_lv_draw_unit_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) + * void *lv_event_get_target(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_render_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_target(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_display_render_mode_t _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + void * _res = ((void *(*)(lv_event_t *))lv_func_ptr)(e); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_render_mode_mpobj, 1, mp_lv_display_get_render_mode, lv_display_get_render_mode); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_target); + +/* Reusing lv_event_get_target for lv_event_get_current_target */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_mpobj, 1, mp_lv_event_get_target, lv_event_get_current_target); /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) + * lv_event_code_t lv_event_get_code(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_screen_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_code(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_obj_t * _res = ((lv_obj_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return lv_to_mp((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_event_code_t _res = ((lv_event_code_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_active_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_code_mpobj, 1, mp_lv_event_get_code, lv_event_get_code); -/* Reusing lv_display_get_screen_active for lv_display_get_screen_prev */ +/* Reusing lv_event_get_target for lv_event_get_param */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_prev_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_prev); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_param_mpobj, 1, mp_lv_event_get_target, lv_event_get_param); -/* Reusing lv_display_get_screen_active for lv_display_get_screen_loading */ +/* Reusing lv_event_get_target for lv_event_get_user_data */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_screen_loading_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_screen_loading); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_user_data_mpobj, 1, mp_lv_event_get_target, lv_event_get_user_data); -/* Reusing lv_display_get_screen_active for lv_display_get_layer_top */ +/* Reusing funcptr_event_cb for lv_event_stop_bubbling */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_top_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_top); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_bubbling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_bubbling); -/* Reusing lv_display_get_screen_active for lv_display_get_layer_sys */ +/* Reusing funcptr_event_cb for lv_event_stop_trickling */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_sys_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_sys); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_trickling_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_trickling); -/* Reusing lv_display_get_screen_active for lv_display_get_layer_bottom */ +/* Reusing funcptr_event_cb for lv_event_stop_processing */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_layer_bottom_mpobj, 1, mp_lv_display_get_screen_active, lv_display_get_layer_bottom); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_stop_processing_mpobj, 1, mp_funcptr_event_cb, lv_event_stop_processing); + +/* Reusing funcptr_event_cb for lv_event_free_user_data_cb */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_free_user_data_cb_mpobj, 1, mp_funcptr_event_cb, lv_event_free_user_data_cb); /* - * Callback function lv_display_add_event_cb_event_cb - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * lv_area_t *lv_event_get_invalidated_area(lv_event_t *e) */ -GENMPY_UNUSED static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) +static mp_obj_t mp_lv_event_get_invalidated_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_add_event_cb_event_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_area_t * _res = ((lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_invalidated_area_mpobj, 1, mp_lv_event_get_invalidated_area, lv_event_get_invalidated_area); + /* * lvgl extension definition for: - * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * lv_obj_t *lv_event_get_current_target_obj(lv_event_t *e) */ -static mp_obj_t mp_lv_display_add_event_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_current_target_obj(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[3]); - void *event_cb = mp_lv_callback(mp_args[1], &lv_display_add_event_cb_event_cb_callback, MP_QSTR_lv_display_add_event_cb_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_event_code_t filter = (int)mp_obj_get_int(mp_args[2]); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_func_ptr)(disp, event_cb, filter, user_data); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_obj_t * _res = ((lv_obj_t *(*)(lv_event_t *))lv_func_ptr)(e); + return lv_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_add_event_cb_mpobj, 4, mp_lv_display_add_event_cb, lv_display_add_event_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_current_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_current_target_obj); -/* Reusing lv_display_get_tile_cnt for lv_display_get_event_count */ +/* Reusing lv_event_get_current_target_obj for lv_event_get_target_obj */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_count_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_event_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_target_obj_mpobj, 1, mp_lv_event_get_current_target_obj, lv_event_get_target_obj); /* * lvgl extension definition for: - * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) + * lv_indev_t *lv_event_get_indev(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_event_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_indev(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - lv_event_dsc_t * _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_t * _res = ((lv_indev_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_indev_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_event_dsc_mpobj, 2, mp_lv_display_get_event_dsc, lv_display_get_event_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_indev_mpobj, 1, mp_lv_event_get_indev, lv_event_get_indev); /* * lvgl extension definition for: - * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) + * lv_layer_t *lv_event_get_layer(lv_event_t *e) */ -static mp_obj_t mp_lv_display_remove_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t index = (uint32_t)mp_obj_get_int(mp_args[1]); - bool _res = ((bool (*)(lv_display_t *, uint32_t))lv_func_ptr)(disp, index); - return convert_to_bool(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_layer_t * _res = ((lv_layer_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_layer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_mpobj, 2, mp_lv_display_remove_event, lv_display_remove_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_layer_mpobj, 1, mp_lv_event_get_layer, lv_event_get_layer); /* - * Callback function lv_display_remove_event_cb_with_user_data_event_cb - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * const lv_area_t *lv_event_get_old_size(lv_event_t *e) */ -GENMPY_UNUSED static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) +static mp_obj_t mp_lv_event_get_old_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + const lv_area_t * _res = ((const lv_area_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_area_t((void*)_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_old_size_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_old_size); + /* * lvgl extension definition for: - * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * uint32_t lv_event_get_key(lv_event_t *e) */ -static mp_obj_t mp_lv_display_remove_event_cb_with_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_key(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *event_cb = mp_lv_callback(mp_args[1], &lv_display_remove_event_cb_with_user_data_event_cb_callback, MP_QSTR_lv_display_remove_event_cb_with_user_data_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_event_t *))lv_func_ptr)(e); return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_remove_event_cb_with_user_data_mpobj, 3, mp_lv_display_remove_event_cb_with_user_data, lv_display_remove_event_cb_with_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_key_mpobj, 1, mp_lv_event_get_key, lv_event_get_key); /* * lvgl extension definition for: - * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) + * int32_t lv_event_get_rotary_diff(lv_event_t *e) */ -static mp_obj_t mp_lv_display_send_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_rotary_diff(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_event_code_t code = (int)mp_obj_get_int(mp_args[1]); - void *param = mp_to_ptr(mp_args[2]); - lv_result_t _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_func_ptr)(disp, code, param); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t _res = ((int32_t (*)(lv_event_t *))lv_func_ptr)(e); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_event_mpobj, 3, mp_lv_display_send_event, lv_display_send_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotary_diff_mpobj, 1, mp_lv_event_get_rotary_diff, lv_event_get_rotary_diff); /* * lvgl extension definition for: - * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) + * lv_anim_t *lv_event_get_scroll_anim(lv_event_t *e) */ -static mp_obj_t mp_lv_display_set_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_scroll_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_theme_t *th = mp_write_ptr_lv_theme_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_theme_t *))lv_func_ptr)(disp, th); - return mp_const_none; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_anim_t * _res = ((lv_anim_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_anim_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_theme_mpobj, 2, mp_lv_display_set_theme, lv_display_set_theme); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_scroll_anim_mpobj, 1, mp_lv_event_get_scroll_anim, lv_event_get_scroll_anim); /* * lvgl extension definition for: - * lv_theme_t *lv_display_get_theme(lv_display_t *disp) + * void lv_event_set_ext_draw_size(lv_event_t *e, int32_t size) */ -static mp_obj_t mp_lv_display_get_theme(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_set_ext_draw_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_theme_t * _res = ((lv_theme_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_theme_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + int32_t size = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, int32_t))lv_func_ptr)(e, size); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_theme_mpobj, 1, mp_lv_display_get_theme, lv_display_get_theme); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_ext_draw_size_mpobj, 2, mp_lv_event_set_ext_draw_size, lv_event_set_ext_draw_size); /* * lvgl extension definition for: - * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) + * lv_point_t *lv_event_get_self_size_info(lv_event_t *e) */ -static mp_obj_t mp_lv_display_get_inactive_time(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_self_size_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_display_t *))lv_func_ptr)(disp); - return mp_obj_new_int_from_uint(_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_point_t * _res = ((lv_point_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_point_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_inactive_time_mpobj, 1, mp_lv_display_get_inactive_time, lv_display_get_inactive_time); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_self_size_info_mpobj, 1, mp_lv_event_get_self_size_info, lv_event_get_self_size_info); -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_trigger_activity */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_trigger_activity_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_trigger_activity); +/* + * Struct lv_hit_test_info_t + */ + +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_hit_test_info_t(mp_obj_t self_in) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_hit_test_info_t_type())); + return (lv_hit_test_info_t*)self->data; +} + +#define mp_write_lv_hit_test_info_t(struct_obj) *((lv_hit_test_info_t*)mp_write_ptr_lv_hit_test_info_t(struct_obj)) + +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_hit_test_info_t(void *field) +{ + return lv_to_mp_struct(get_mp_lv_hit_test_info_t_type(), field); +} + +#define mp_read_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(copy_buffer(&field, sizeof(lv_hit_test_info_t))) +#define mp_read_byref_lv_hit_test_info_t(field) mp_read_ptr_lv_hit_test_info_t(&field) + +static void mp_lv_hit_test_info_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_hit_test_info_t *data = (lv_hit_test_info_t*)self->data; + + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_point: dest[0] = mp_read_ptr_lv_point_t((void*)data->point); break; // converting from lv_point_t *; + case MP_QSTR_res: dest[0] = convert_to_bool(data->res); break; // converting from bool; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_point: data->point = (void*)mp_write_ptr_lv_point_t(dest[1]); break; // converting to lv_point_t *; + case MP_QSTR_res: data->res = mp_obj_is_true(dest[1]); break; // converting to bool; + default: return; + } + + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} + +static void mp_lv_hit_test_info_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_hit_test_info_t"); +} + +static const mp_obj_dict_t mp_lv_hit_test_info_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_hit_test_info_t_type, + MP_QSTR_lv_hit_test_info_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_hit_test_info_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_hit_test_info_t_attr, + locals_dict, &mp_lv_hit_test_info_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_hit_test_info_t_type(void) +{ + return &mp_lv_hit_test_info_t_type; +} -/* Reusing lv_display_set_matrix_rotation for lv_display_enable_invalidation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_enable_invalidation_mpobj, 2, mp_lv_display_set_matrix_rotation, lv_display_enable_invalidation); +/* + * lvgl extension definition for: + * lv_hit_test_info_t *lv_event_get_hit_test_info(lv_event_t *e) + */ + +static mp_obj_t mp_lv_event_get_hit_test_info(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_hit_test_info_t * _res = ((lv_hit_test_info_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_hit_test_info_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_hit_test_info_mpobj, 1, mp_lv_event_get_hit_test_info, lv_event_get_hit_test_info); -/* Reusing lv_display_get_matrix_rotation for lv_display_is_invalidation_enabled */ +/* Reusing lv_event_get_old_size for lv_event_get_cover_area */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_is_invalidation_enabled_mpobj, 1, mp_lv_display_get_matrix_rotation, lv_display_is_invalidation_enabled); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_cover_area_mpobj, 1, mp_lv_event_get_old_size, lv_event_get_cover_area); /* * lvgl extension definition for: - * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) + * void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res) */ -static mp_obj_t mp_lv_display_get_refr_timer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_set_cover_res(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_timer_t((void*)_res); + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_cover_res_t res = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_event_t *, lv_cover_res_t))lv_func_ptr)(e, res); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_refr_timer_mpobj, 1, mp_lv_display_get_refr_timer, lv_display_get_refr_timer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_set_cover_res_mpobj, 2, mp_lv_event_set_cover_res, lv_event_set_cover_res); -/* Reusing funcptr_lv_display_flush_wait_cb_t for lv_display_delete_refr_timer */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_delete_refr_timer_mpobj, 1, mp_funcptr_lv_display_flush_wait_cb_t, lv_display_delete_refr_timer); +/* + * lvgl extension definition for: + * lv_draw_task_t *lv_event_get_draw_task(lv_event_t *e) + */ + +static mp_obj_t mp_lv_event_get_draw_task(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_draw_task_t * _res = ((lv_draw_task_t *(*)(lv_event_t *))lv_func_ptr)(e); + return mp_read_ptr_lv_draw_task_t((void*)_res); +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_draw_task_mpobj, 1, mp_lv_event_get_draw_task, lv_event_get_draw_task); /* - * Callback function lv_display_register_vsync_event_event_cb - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * lv_state_t lv_event_get_prev_state(lv_event_t *e) */ -GENMPY_UNUSED static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) +static mp_obj_t mp_lv_event_get_prev_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_event_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_display_register_vsync_event_event_cb)), 1, mp_args); - return; + lv_event_t *e = mp_write_ptr_lv_event_t(mp_args[0]); + lv_state_t _res = ((lv_state_t (*)(lv_event_t *))lv_func_ptr)(e); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_prev_state_mpobj, 1, mp_lv_event_get_prev_state, lv_event_get_prev_state); + /* * lvgl extension definition for: - * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * float lv_event_get_pinch_scale(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_display_register_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_pinch_scale(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[2]); - void *event_cb = mp_lv_callback(mp_args[1], &lv_display_register_vsync_event_event_cb_callback, MP_QSTR_lv_display_register_vsync_event_event_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - bool _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_func_ptr)(disp, event_cb, user_data); - return convert_to_bool(_res); + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + float _res = ((float (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_float_from_f(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_register_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_register_vsync_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_pinch_scale_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_pinch_scale); -/* Reusing lv_display_register_vsync_event for lv_display_unregister_vsync_event */ +/* Reusing lv_event_get_pinch_scale for lv_event_get_rotation */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_unregister_vsync_event_mpobj, 3, mp_lv_display_register_vsync_event, lv_display_unregister_vsync_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_rotation_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_rotation); + +/* Reusing lv_event_get_pinch_scale for lv_event_get_two_fingers_swipe_distance */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_distance_mpobj, 1, mp_lv_event_get_pinch_scale, lv_event_get_two_fingers_swipe_distance); /* * lvgl extension definition for: - * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) + * lv_dir_t lv_event_get_two_fingers_swipe_dir(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_display_send_vsync_event(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_two_fingers_swipe_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void *param = mp_to_ptr(mp_args[1]); - lv_result_t _res = ((lv_result_t (*)(lv_display_t *, void *))lv_func_ptr)(disp, param); + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_dir_t _res = ((lv_dir_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_send_vsync_event_mpobj, 2, mp_lv_display_send_vsync_event, lv_display_send_vsync_event); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_two_fingers_swipe_dir_mpobj, 1, mp_lv_event_get_two_fingers_swipe_dir, lv_event_get_two_fingers_swipe_dir); /* * lvgl extension definition for: - * void lv_display_set_user_data(lv_display_t *disp, void *user_data) + * lv_indev_gesture_state_t lv_event_get_gesture_state(lv_event_t *gesture_event, lv_indev_gesture_type_t type) */ -static mp_obj_t mp_lv_display_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_gesture_state(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[1]); - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - ((void (*)(lv_display_t *, void *))lv_func_ptr)(disp, user_data); - return mp_const_none; + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t type = (int)mp_obj_get_int(mp_args[1]); + lv_indev_gesture_state_t _res = ((lv_indev_gesture_state_t (*)(lv_event_t *, lv_indev_gesture_type_t))lv_func_ptr)(gesture_event, type); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_user_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_user_data); - -/* Reusing lv_display_set_user_data for lv_display_set_driver_data */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_driver_data_mpobj, 2, mp_lv_display_set_user_data, lv_display_set_driver_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_state_mpobj, 2, mp_lv_event_get_gesture_state, lv_event_get_gesture_state); /* * lvgl extension definition for: - * void *lv_display_get_user_data(lv_display_t *disp) + * lv_indev_gesture_type_t lv_event_get_gesture_type(lv_event_t *gesture_event) */ -static mp_obj_t mp_lv_display_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_event_get_gesture_type(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - void * _res = ((void *(*)(lv_display_t *))lv_func_ptr)(disp); - return ptr_to_mp((void*)_res); + lv_event_t *gesture_event = mp_write_ptr_lv_event_t(mp_args[0]); + lv_indev_gesture_type_t _res = ((lv_indev_gesture_type_t (*)(lv_event_t *))lv_func_ptr)(gesture_event); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_user_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_get_gesture_type_mpobj, 1, mp_lv_event_get_gesture_type, lv_event_get_gesture_type); -/* Reusing lv_display_get_user_data for lv_display_get_driver_data */ +/* Reusing funcptr_event_cb for lv_event_push */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_driver_data_mpobj, 1, mp_lv_display_get_user_data, lv_display_get_driver_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_push_mpobj, 1, mp_funcptr_event_cb, lv_event_push); + +/* Reusing funcptr_event_cb for lv_event_pop */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_event_pop_mpobj, 1, mp_funcptr_event_cb, lv_event_pop); + + +static const mp_rom_map_elem_t mp_lv_event_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_event_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_target), MP_ROM_PTR(&mp_lv_event_get_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target), MP_ROM_PTR(&mp_lv_event_get_current_target_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_code), MP_ROM_PTR(&mp_lv_event_get_code_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_param), MP_ROM_PTR(&mp_lv_event_get_param_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_event_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_bubbling), MP_ROM_PTR(&mp_lv_event_stop_bubbling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_trickling), MP_ROM_PTR(&mp_lv_event_stop_trickling_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_stop_processing), MP_ROM_PTR(&mp_lv_event_stop_processing_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_free_user_data_cb), MP_ROM_PTR(&mp_lv_event_free_user_data_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_invalidated_area), MP_ROM_PTR(&mp_lv_event_get_invalidated_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_current_target_obj), MP_ROM_PTR(&mp_lv_event_get_current_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_target_obj), MP_ROM_PTR(&mp_lv_event_get_target_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_indev), MP_ROM_PTR(&mp_lv_event_get_indev_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_layer), MP_ROM_PTR(&mp_lv_event_get_layer_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_old_size), MP_ROM_PTR(&mp_lv_event_get_old_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_key), MP_ROM_PTR(&mp_lv_event_get_key_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotary_diff), MP_ROM_PTR(&mp_lv_event_get_rotary_diff_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_scroll_anim), MP_ROM_PTR(&mp_lv_event_get_scroll_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_ext_draw_size), MP_ROM_PTR(&mp_lv_event_set_ext_draw_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_self_size_info), MP_ROM_PTR(&mp_lv_event_get_self_size_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_hit_test_info), MP_ROM_PTR(&mp_lv_event_get_hit_test_info_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_cover_area), MP_ROM_PTR(&mp_lv_event_get_cover_area_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cover_res), MP_ROM_PTR(&mp_lv_event_set_cover_res_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_draw_task), MP_ROM_PTR(&mp_lv_event_get_draw_task_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prev_state), MP_ROM_PTR(&mp_lv_event_get_prev_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_pinch_scale), MP_ROM_PTR(&mp_lv_event_get_pinch_scale_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_event_get_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_distance), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_distance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_two_fingers_swipe_dir), MP_ROM_PTR(&mp_lv_event_get_two_fingers_swipe_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_state), MP_ROM_PTR(&mp_lv_event_get_gesture_state_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_gesture_type), MP_ROM_PTR(&mp_lv_event_get_gesture_type_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mp_lv_event_push_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mp_lv_event_pop_mpobj) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_event_t_locals_dict, mp_lv_event_t_locals_dict_table); + /* * lvgl extension definition for: - * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) + * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) */ -static mp_obj_t mp_lv_display_get_buf_active(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_unpremultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_draw_buf_t * _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_func_ptr)(disp); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t))lv_func_ptr)(c); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_buf_active_mpobj, 1, mp_lv_display_get_buf_active, lv_display_get_buf_active); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_unpremultiply_mpobj, 1, mp_lv_color32_unpremultiply, lv_color32_unpremultiply); /* * lvgl extension definition for: - * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) + * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) */ -static mp_obj_t mp_lv_display_rotate_area(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_lumi_of(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_area_t *area = mp_write_ptr_lv_area_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_area_t *))lv_func_ptr)(disp, area); - return mp_const_none; + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + bool premultiplied = mp_obj_is_true(mp_args[1]); + uint8_t _res = ((uint8_t (*)(lv_color32_t, bool))lv_func_ptr)(c, premultiplied); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_area_mpobj, 2, mp_lv_display_rotate_area, lv_display_rotate_area); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_lumi_of_mpobj, 2, mp_lv_color32_lumi_of, lv_color32_lumi_of); /* * lvgl extension definition for: - * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) + * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) */ -static mp_obj_t mp_lv_display_rotate_point(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_mix32_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[1]); - ((void (*)(lv_display_t *, lv_point_t *))lv_func_ptr)(disp, point); - return mp_const_none; + lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point); - -/* Reusing lv_display_rotate_point for lv_display_rotate_point_ccw */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_rotate_point_ccw_mpobj, 2, mp_lv_display_rotate_point, lv_display_rotate_point_ccw); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_inlined); -/* Reusing lv_display_get_tile_cnt for lv_display_get_draw_buf_size */ +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied_inlined */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_draw_buf_size_mpobj, 1, mp_lv_display_get_tile_cnt, lv_display_get_draw_buf_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied_inlined); /* * lvgl extension definition for: - * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) + * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) */ -static mp_obj_t mp_lv_display_get_invalidated_draw_buf_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - uint32_t width = (uint32_t)mp_obj_get_int(mp_args[1]); - uint32_t height = (uint32_t)mp_obj_get_int(mp_args[2]); - uint32_t _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_func_ptr)(disp, width, height); - return mp_obj_new_int_from_uint(_res); + lv_color32_t c1 = mp_write_lv_color32_t(mp_args[0]); + lv_color32_t c2 = mp_write_lv_color32_t(mp_args[1]); + bool _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(c1, c2); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_get_invalidated_draw_buf_size_mpobj, 3, mp_lv_display_get_invalidated_draw_buf_size, lv_display_get_invalidated_draw_buf_size); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_eq_mpobj, 2, mp_lv_color32_eq, lv_color32_eq); /* * lvgl extension definition for: - * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) + * void lv_color_premultiply(lv_color32_t *c) */ -static mp_obj_t mp_lv_display_dpx(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_display_t *disp = (const lv_display_t *)mp_write_ptr_lv_display_t(mp_args[0]); - int32_t n = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_func_ptr)(disp, n); - return mp_obj_new_int(_res); + lv_color32_t *c = mp_write_ptr_lv_color32_t(mp_args[0]); + ((void (*)(lv_color32_t *))lv_func_ptr)(c); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_dpx_mpobj, 2, mp_lv_display_dpx, lv_display_dpx); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_premultiply_mpobj, 1, mp_lv_color_premultiply, lv_color_premultiply); /* * lvgl extension definition for: - * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) + * uint8_t lv_color32_luminance(lv_color32_t c) */ -static mp_obj_t mp_lv_draw_dispatch_layer(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color32_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(mp_args[1]); - bool _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_func_ptr)(disp, layer); - return convert_to_bool(_res); + lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); + uint8_t _res = ((uint8_t (*)(lv_color32_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_draw_dispatch_layer_mpobj, 2, mp_lv_draw_dispatch_layer, lv_draw_dispatch_layer); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_luminance_mpobj, 1, mp_lv_color32_luminance, lv_color32_luminance); +/* Reusing lv_color_mix32_inlined for lv_color_mix32 */ -/* - * lvgl extension definition for: - * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) - */ - -static mp_obj_t mp_lv_display_set_draw_buf_handlers(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_display_t *disp = mp_write_ptr_lv_display_t(mp_args[0]); - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(mp_args[1]); - ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_func_ptr)(disp, handlers); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32); + +/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied); + +/* Reusing lv_color_mix32_inlined for lv_color_over32 */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_display_set_draw_buf_handlers_mpobj, 2, mp_lv_display_set_draw_buf_handlers, lv_display_set_draw_buf_handlers); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_over32); -static const mp_rom_map_elem_t mp_lv_display_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_display_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_display_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_default), MP_ROM_PTR(&mp_lv_display_set_default_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_display_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_resolution), MP_ROM_PTR(&mp_lv_display_set_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_physical_resolution), MP_ROM_PTR(&mp_lv_display_set_physical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_offset), MP_ROM_PTR(&mp_lv_display_set_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotation), MP_ROM_PTR(&mp_lv_display_set_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_matrix_rotation), MP_ROM_PTR(&mp_lv_display_set_matrix_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_dpi), MP_ROM_PTR(&mp_lv_display_set_dpi_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_horizontal_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_vertical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_original_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_original_horizontal_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_original_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_original_vertical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_physical_horizontal_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_horizontal_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_physical_vertical_resolution), MP_ROM_PTR(&mp_lv_display_get_physical_vertical_resolution_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_x), MP_ROM_PTR(&mp_lv_display_get_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_offset_y), MP_ROM_PTR(&mp_lv_display_get_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_rotation), MP_ROM_PTR(&mp_lv_display_get_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_matrix_rotation), MP_ROM_PTR(&mp_lv_display_get_matrix_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_dpi), MP_ROM_PTR(&mp_lv_display_get_dpi_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_buffers), MP_ROM_PTR(&mp_lv_display_set_buffers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_buffers_with_stride), MP_ROM_PTR(&mp_lv_display_set_buffers_with_stride_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_draw_buffers), MP_ROM_PTR(&mp_lv_display_set_draw_buffers_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_3rd_draw_buffer), MP_ROM_PTR(&mp_lv_display_set_3rd_draw_buffer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_render_mode), MP_ROM_PTR(&mp_lv_display_set_render_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flush_cb), MP_ROM_PTR(&mp_lv_display_set_flush_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_flush_cb), MP_ROM_PTR(&mp_lv_display_get_flush_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flush_wait_cb), MP_ROM_PTR(&mp_lv_display_set_flush_wait_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_sync_cb), MP_ROM_PTR(&mp_lv_display_set_sync_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_sync_wait_cb), MP_ROM_PTR(&mp_lv_display_set_sync_wait_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_color_format), MP_ROM_PTR(&mp_lv_display_set_color_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_color_format), MP_ROM_PTR(&mp_lv_display_get_color_format_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_tile_cnt), MP_ROM_PTR(&mp_lv_display_set_tile_cnt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_tile_cnt), MP_ROM_PTR(&mp_lv_display_get_tile_cnt_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_antialiasing), MP_ROM_PTR(&mp_lv_display_set_antialiasing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_antialiasing), MP_ROM_PTR(&mp_lv_display_get_antialiasing_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_ready), MP_ROM_PTR(&mp_lv_display_flush_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_flush_is_last), MP_ROM_PTR(&mp_lv_display_flush_is_last_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sync_ready), MP_ROM_PTR(&mp_lv_display_sync_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_sync_is_last), MP_ROM_PTR(&mp_lv_display_sync_is_last_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_double_buffered), MP_ROM_PTR(&mp_lv_display_is_double_buffered_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_render_mode), MP_ROM_PTR(&mp_lv_display_get_render_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen_active), MP_ROM_PTR(&mp_lv_display_get_screen_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen_prev), MP_ROM_PTR(&mp_lv_display_get_screen_prev_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_screen_loading), MP_ROM_PTR(&mp_lv_display_get_screen_loading_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_top), MP_ROM_PTR(&mp_lv_display_get_layer_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_sys), MP_ROM_PTR(&mp_lv_display_get_layer_sys_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_layer_bottom), MP_ROM_PTR(&mp_lv_display_get_layer_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_add_event_cb), MP_ROM_PTR(&mp_lv_display_add_event_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_event_count), MP_ROM_PTR(&mp_lv_display_get_event_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_event_dsc), MP_ROM_PTR(&mp_lv_display_get_event_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_event), MP_ROM_PTR(&mp_lv_display_remove_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_event_cb_with_user_data), MP_ROM_PTR(&mp_lv_display_remove_event_cb_with_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_send_event), MP_ROM_PTR(&mp_lv_display_send_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_theme), MP_ROM_PTR(&mp_lv_display_set_theme_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_theme), MP_ROM_PTR(&mp_lv_display_get_theme_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_inactive_time), MP_ROM_PTR(&mp_lv_display_get_inactive_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_trigger_activity), MP_ROM_PTR(&mp_lv_display_trigger_activity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_enable_invalidation), MP_ROM_PTR(&mp_lv_display_enable_invalidation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_invalidation_enabled), MP_ROM_PTR(&mp_lv_display_is_invalidation_enabled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_refr_timer), MP_ROM_PTR(&mp_lv_display_get_refr_timer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete_refr_timer), MP_ROM_PTR(&mp_lv_display_delete_refr_timer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_register_vsync_event), MP_ROM_PTR(&mp_lv_display_register_vsync_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_unregister_vsync_event), MP_ROM_PTR(&mp_lv_display_unregister_vsync_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_send_vsync_event), MP_ROM_PTR(&mp_lv_display_send_vsync_event_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_display_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_driver_data), MP_ROM_PTR(&mp_lv_display_set_driver_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_display_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_driver_data), MP_ROM_PTR(&mp_lv_display_get_driver_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_buf_active), MP_ROM_PTR(&mp_lv_display_get_buf_active_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_area), MP_ROM_PTR(&mp_lv_display_rotate_area_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_point), MP_ROM_PTR(&mp_lv_display_rotate_point_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_rotate_point_ccw), MP_ROM_PTR(&mp_lv_display_rotate_point_ccw_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_draw_buf_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_invalidated_draw_buf_size), MP_ROM_PTR(&mp_lv_display_get_invalidated_draw_buf_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_dpx), MP_ROM_PTR(&mp_lv_display_dpx_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_draw_dispatch_layer), MP_ROM_PTR(&mp_lv_draw_dispatch_layer_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_draw_buf_handlers), MP_ROM_PTR(&mp_lv_display_set_draw_buf_handlers_mpobj) }, +static const mp_rom_map_elem_t mp_lv_color32_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color32_t))) }, + { MP_ROM_QSTR(MP_QSTR_unpremultiply), MP_ROM_PTR(&mp_lv_color32_unpremultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lumi_of), MP_ROM_PTR(&mp_lv_color32_lumi_of_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_inlined), MP_ROM_PTR(&mp_lv_color_mix32_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied_inlined), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_inlined_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color32_eq_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_premultiply), MP_ROM_PTR(&mp_lv_color_premultiply_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color32_luminance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32), MP_ROM_PTR(&mp_lv_color_mix32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_color_over32), MP_ROM_PTR(&mp_lv_color_over32_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_display_t_locals_dict, mp_lv_display_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_color32_t_locals_dict, mp_lv_color32_t_locals_dict_table); /* @@ -40967,1137 +40081,919 @@ static mp_obj_t mp_lv_theme_set_apply_cb(size_t mp_n_args, const mp_obj_t *mp_ar return mp_const_none; } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_apply_cb_mpobj, 2, mp_lv_theme_set_apply_cb, lv_theme_set_apply_cb); - - -/* - * lvgl extension definition for: - * void lv_theme_set_user_data(lv_theme_t *theme, void *user_data) - */ - -static mp_obj_t mp_lv_theme_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *user_data = mp_to_ptr(mp_args[1]); - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - ((void (*)(lv_theme_t *, void *))lv_func_ptr)(theme, user_data); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_user_data_mpobj, 2, mp_lv_theme_set_user_data, lv_theme_set_user_data); - - -/* - * lvgl extension definition for: - * void *lv_theme_get_user_data(const lv_theme_t *theme) - */ - -static mp_obj_t mp_lv_theme_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_theme_t *theme = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[0]); - void * _res = ((void *(*)(const lv_theme_t *))lv_func_ptr)(theme); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_user_data_mpobj, 1, mp_lv_theme_get_user_data, lv_theme_get_user_data); - - -/* - * lvgl extension definition for: - * void lv_theme_delete(lv_theme_t *theme) - */ - -static mp_obj_t mp_lv_theme_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); - ((void (*)(lv_theme_t *))lv_func_ptr)(theme); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_delete_mpobj, 1, mp_lv_theme_delete, lv_theme_delete); - - -static const mp_rom_map_elem_t mp_lv_theme_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_theme_t))) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_theme_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_theme_set_parent_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_apply_cb), MP_ROM_PTR(&mp_lv_theme_set_apply_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_theme_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_theme_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_theme_delete_mpobj) }, - -}; - -static MP_DEFINE_CONST_DICT(mp_lv_theme_t_locals_dict, mp_lv_theme_t_locals_dict_table); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); - - -/* - * Callback function lv_timer_t_timer_cb - * void lv_timer_cb_t(lv_timer_t *) - */ - -GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); - return; -} - - -/* - * lvgl extension definition for: - * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) - */ - -static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); - - -/* - * lvgl extension definition for: - * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) - */ - -static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); - - -/* - * lvgl extension definition for: - * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) - */ - -static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); - - -/* - * lvgl extension definition for: - * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) - */ - -static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool auto_delete = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); - - -/* - * lvgl extension definition for: - * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) - */ - -static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - void *user_data = mp_to_ptr(mp_args[1]); - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); - -/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_apply_cb_mpobj, 2, mp_lv_theme_set_apply_cb, lv_theme_set_apply_cb); /* * lvgl extension definition for: - * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) + * void lv_theme_set_user_data(lv_theme_t *theme, void *user_data) */ -static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); - return mp_read_ptr_lv_timer_t((void*)_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + ((void (*)(lv_theme_t *, void *))lv_func_ptr)(theme, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_set_user_data_mpobj, 2, mp_lv_theme_set_user_data, lv_theme_set_user_data); /* * lvgl extension definition for: - * void *lv_timer_get_user_data(lv_timer_t *timer) + * void *lv_theme_get_user_data(const lv_theme_t *theme) */ -static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); + const lv_theme_t *theme = (const lv_theme_t *)mp_write_ptr_lv_theme_t(mp_args[0]); + void * _res = ((void *(*)(const lv_theme_t *))lv_func_ptr)(theme); return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_get_user_data_mpobj, 1, mp_lv_theme_get_user_data, lv_theme_get_user_data); /* * lvgl extension definition for: - * bool lv_timer_get_paused(lv_timer_t *timer) + * void lv_theme_delete(lv_theme_t *theme) */ -static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_theme_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); - bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); - return convert_to_bool(_res); + lv_theme_t *theme = mp_write_ptr_lv_theme_t(mp_args[0]); + ((void (*)(lv_theme_t *))lv_func_ptr)(theme); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_theme_delete_mpobj, 1, mp_lv_theme_delete, lv_theme_delete); -static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, - { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, +static const mp_rom_map_elem_t mp_lv_theme_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_theme_t))) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_theme_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_parent), MP_ROM_PTR(&mp_lv_theme_set_parent_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_apply_cb), MP_ROM_PTR(&mp_lv_theme_set_apply_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_theme_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_theme_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_theme_delete_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_theme_t_locals_dict, mp_lv_theme_t_locals_dict_table); /* * lvgl extension definition for: - * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) + * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) */ -static mp_obj_t mp_lv_color32_unpremultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_is_in_range(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t))lv_func_ptr)(c); - return mp_read_lv_color32_t(_res); + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + lv_color_t l_color = mp_write_lv_color_t(mp_args[1]); + lv_color_t h_color = mp_write_lv_color_t(mp_args[2]); + bool _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_func_ptr)(color, l_color, h_color); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_unpremultiply_mpobj, 1, mp_lv_color32_unpremultiply, lv_color32_unpremultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_is_in_range_mpobj, 3, mp_lv_color_is_in_range, lv_color_is_in_range); /* * lvgl extension definition for: - * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) + * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) */ -static mp_obj_t mp_lv_color32_lumi_of(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_32(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); - bool premultiplied = mp_obj_is_true(mp_args[1]); - uint8_t _res = ((uint8_t (*)(lv_color32_t, bool))lv_func_ptr)(c, premultiplied); - return mp_obj_new_int_from_uint(_res); + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + lv_opa_t opa = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color32_t _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(color, opa); + return mp_read_lv_color32_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_lumi_of_mpobj, 2, mp_lv_color32_lumi_of, lv_color32_lumi_of); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_32_mpobj, 2, mp_lv_color_to_32, lv_color_to_32); /* * lvgl extension definition for: - * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) + * uint32_t lv_color_to_int(lv_color_t c) */ -static mp_obj_t mp_lv_color_mix32_inlined(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_int(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color32_t fg = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t bg = mp_write_lv_color32_t(mp_args[1]); - lv_color32_t _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(fg, bg); - return mp_read_lv_color32_t(_res); + lv_color_t c = mp_write_lv_color_t(mp_args[0]); + uint32_t _res = ((uint32_t (*)(lv_color_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_inlined); - -/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied_inlined */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_inlined_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied_inlined); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_int_mpobj, 1, mp_lv_color_to_int, lv_color_to_int); /* * lvgl extension definition for: - * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) + * bool lv_color_eq(lv_color_t c1, lv_color_t c2) */ -static mp_obj_t mp_lv_color32_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_eq(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color32_t c1 = mp_write_lv_color32_t(mp_args[0]); - lv_color32_t c2 = mp_write_lv_color32_t(mp_args[1]); - bool _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_func_ptr)(c1, c2); + lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); + lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); + bool _res = ((bool (*)(lv_color_t, lv_color_t))lv_func_ptr)(c1, c2); return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_eq_mpobj, 2, mp_lv_color32_eq, lv_color32_eq); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_eq_mpobj, 2, mp_lv_color_eq, lv_color_eq); /* * lvgl extension definition for: - * void lv_color_premultiply(lv_color32_t *c) + * uint16_t lv_color_to_u16(lv_color_t color) */ -static mp_obj_t mp_lv_color_premultiply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_u16(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color32_t *c = mp_write_ptr_lv_color32_t(mp_args[0]); - ((void (*)(lv_color32_t *))lv_func_ptr)(c); - return mp_const_none; + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + uint16_t _res = ((uint16_t (*)(lv_color_t))lv_func_ptr)(color); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_premultiply_mpobj, 1, mp_lv_color_premultiply, lv_color_premultiply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u16_mpobj, 1, mp_lv_color_to_u16, lv_color_to_u16); + +/* Reusing lv_color_to_int for lv_color_to_u32 */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_u32_mpobj, 1, mp_lv_color_to_int, lv_color_to_u32); /* * lvgl extension definition for: - * uint8_t lv_color32_luminance(lv_color32_t c) + * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) */ -static mp_obj_t mp_lv_color32_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_lighten(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_color32_t c = mp_write_lv_color32_t(mp_args[0]); - uint8_t _res = ((uint8_t (*)(lv_color32_t))lv_func_ptr)(c); - return mp_obj_new_int_from_uint(_res); + lv_color_t c = mp_write_lv_color_t(mp_args[0]); + lv_opa_t lvl = (uint8_t)mp_obj_get_int(mp_args[1]); + lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_func_ptr)(c, lvl); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color32_luminance_mpobj, 1, mp_lv_color32_luminance, lv_color32_luminance); - -/* Reusing lv_color_mix32_inlined for lv_color_mix32 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32); - -/* Reusing lv_color_mix32_inlined for lv_color_mix32_premultiplied */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix32_premultiplied_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_mix32_premultiplied); - -/* Reusing lv_color_mix32_inlined for lv_color_over32 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_over32_mpobj, 2, mp_lv_color_mix32_inlined, lv_color_over32); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_lighten_mpobj, 2, mp_lv_color_lighten, lv_color_lighten); +/* Reusing lv_color_lighten for lv_color_darken */ -static const mp_rom_map_elem_t mp_lv_color32_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color32_t))) }, - { MP_ROM_QSTR(MP_QSTR_unpremultiply), MP_ROM_PTR(&mp_lv_color32_unpremultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_lumi_of), MP_ROM_PTR(&mp_lv_color32_lumi_of_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32_inlined), MP_ROM_PTR(&mp_lv_color_mix32_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied_inlined), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color32_eq_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_premultiply), MP_ROM_PTR(&mp_lv_color_premultiply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color32_luminance_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32), MP_ROM_PTR(&mp_lv_color_mix32_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_mix32_premultiplied), MP_ROM_PTR(&mp_lv_color_mix32_premultiplied_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_color_over32), MP_ROM_PTR(&mp_lv_color_over32_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_darken_mpobj, 2, mp_lv_color_lighten, lv_color_darken); -}; - -static MP_DEFINE_CONST_DICT(mp_lv_color32_t_locals_dict, mp_lv_color32_t_locals_dict_table); - /* - * Callback function lv_color_filter_dsc_t_cb - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + * Struct lv_color_hsv_t */ -GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void); + +GENMPY_UNUSED static inline void* mp_write_ptr_lv_color_hsv_t(mp_obj_t self_in) { - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - mp_args[1] = mp_read_lv_color_t(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); - return mp_write_lv_color_t(callback_result); + mp_lv_struct_t *self = MP_OBJ_TO_PTR(cast(self_in, get_mp_lv_color_hsv_t_type())); + return (lv_color_hsv_t*)self->data; } +#define mp_write_lv_color_hsv_t(struct_obj) *((lv_color_hsv_t*)mp_write_ptr_lv_color_hsv_t(struct_obj)) -/* - * lvgl extension definition for: - * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) - */ - -static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static inline mp_obj_t mp_read_ptr_lv_color_hsv_t(void *field) { - lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); - void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); - return mp_const_none; + return lv_to_mp_struct(get_mp_lv_color_hsv_t_type(), field); } - +#define mp_read_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(copy_buffer(&field, sizeof(lv_color_hsv_t))) +#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); - +static void mp_lv_color_hsv_t_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) +{ + mp_lv_struct_t *self = MP_OBJ_TO_PTR(self_in); + GENMPY_UNUSED lv_color_hsv_t *data = (lv_color_hsv_t*)self->data; -static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, - -}; + if (dest[0] == MP_OBJ_NULL) { + // load attribute + switch(attr) + { + case MP_QSTR_h: dest[0] = mp_obj_new_int_from_uint(data->h); break; // converting from uint16_t; + case MP_QSTR_s: dest[0] = mp_obj_new_int_from_uint(data->s); break; // converting from uint8_t; + case MP_QSTR_v: dest[0] = mp_obj_new_int_from_uint(data->v); break; // converting from uint8_t; + default: call_parent_methods(self_in, attr, dest); // fallback to locals_dict lookup + } + } else { + if (dest[1]) + { + // store attribute + switch(attr) + { + case MP_QSTR_h: data->h = (uint16_t)mp_obj_get_int(dest[1]); break; // converting to uint16_t; + case MP_QSTR_s: data->s = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + case MP_QSTR_v: data->v = (uint8_t)mp_obj_get_int(dest[1]); break; // converting to uint8_t; + default: return; + } -static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); - -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_init */ + dest[0] = MP_OBJ_NULL; // indicate success + } + } +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_init_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_init); +static void mp_lv_color_hsv_t_print(const mp_print_t *print, + mp_obj_t self_in, + mp_print_kind_t kind) +{ + mp_printf(print, "struct lv_color_hsv_t"); +} + +static const mp_obj_dict_t mp_lv_color_hsv_t_locals_dict; + +static MP_DEFINE_CONST_OBJ_TYPE( + mp_lv_color_hsv_t_type, + MP_QSTR_lv_color_hsv_t, + MP_TYPE_FLAG_NONE, + print, mp_lv_color_hsv_t_print, + make_new, make_new_lv_struct, + binary_op, lv_struct_binary_op, + subscr, lv_struct_subscr, + attr, mp_lv_color_hsv_t_attr, + locals_dict, &mp_lv_color_hsv_t_locals_dict, + buffer, mp_blob_get_buffer, + parent, &mp_lv_base_struct_type +); + +static inline const mp_obj_type_t *get_mp_lv_color_hsv_t_type(void) +{ + return &mp_lv_color_hsv_t_type; +} /* * lvgl extension definition for: - * void lv_anim_set_var(lv_anim_t *a, void *var) + * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) */ -static mp_obj_t mp_lv_anim_set_var(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_to_hsv(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *var = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, void *))lv_func_ptr)(a, var); - return mp_const_none; + lv_color_t color = mp_write_lv_color_t(mp_args[0]); + lv_color_hsv_t _res = ((lv_color_hsv_t (*)(lv_color_t))lv_func_ptr)(color); + return mp_read_lv_color_hsv_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_var_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_var); - - -/* - * Function NOT generated: - * Callback function 'lv_anim_exec_xcb_t exec_cb' must receive a struct pointer with user_data member as its first argument! - * lv_anim_exec_xcb_t exec_cb - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_to_hsv_mpobj, 1, mp_lv_color_to_hsv, lv_color_to_hsv); /* * lvgl extension definition for: - * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) + * uint8_t lv_color_luminance(lv_color_t c) */ -static mp_obj_t mp_lv_anim_set_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_luminance(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_exec_xcb_t exec_cb = mp_to_ptr(mp_args[1]); - ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_func_ptr)(a, exec_cb); - return mp_const_none; + lv_color_t c = mp_write_lv_color_t(mp_args[0]); + uint8_t _res = ((uint8_t (*)(lv_color_t))lv_func_ptr)(c); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_exec_cb_mpobj, 2, mp_lv_anim_set_exec_cb, lv_anim_set_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_luminance_mpobj, 1, mp_lv_color_luminance, lv_color_luminance); /* * lvgl extension definition for: - * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) + * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) */ -static mp_obj_t mp_lv_anim_set_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_mix(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t duration = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_anim_t *, uint32_t))lv_func_ptr)(a, duration); - return mp_const_none; + lv_color_t c1 = mp_write_lv_color_t(mp_args[0]); + lv_color_t c2 = mp_write_lv_color_t(mp_args[1]); + uint8_t mix = (uint8_t)mp_obj_get_int(mp_args[2]); + lv_color_t _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_func_ptr)(c1, c2, mix); + return mp_read_lv_color_t(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_duration); - -/* Reusing lv_anim_set_duration for lv_anim_set_delay */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_mix_mpobj, 3, mp_lv_color_mix, lv_color_mix); -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_resume */ +/* Reusing lv_color_luminance for lv_color_brightness */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_resume_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_resume); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_brightness_mpobj, 1, mp_lv_color_luminance, lv_color_brightness); -/* Reusing funcptr_lv_anim_start_cb_t for lv_anim_pause */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_mpobj, 1, mp_funcptr_lv_anim_start_cb_t, lv_anim_pause); +static const mp_rom_map_elem_t mp_lv_color_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_t))) }, + { MP_ROM_QSTR(MP_QSTR_is_in_range), MP_ROM_PTR(&mp_lv_color_is_in_range_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_32), MP_ROM_PTR(&mp_lv_color_to_32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_int), MP_ROM_PTR(&mp_lv_color_to_int_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_eq), MP_ROM_PTR(&mp_lv_color_eq_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_u16), MP_ROM_PTR(&mp_lv_color_to_u16_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_u32), MP_ROM_PTR(&mp_lv_color_to_u32_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_lighten), MP_ROM_PTR(&mp_lv_color_lighten_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_darken), MP_ROM_PTR(&mp_lv_color_darken_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_hsv), MP_ROM_PTR(&mp_lv_color_to_hsv_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_luminance), MP_ROM_PTR(&mp_lv_color_luminance_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_mix), MP_ROM_PTR(&mp_lv_color_mix_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_brightness), MP_ROM_PTR(&mp_lv_color_brightness_mpobj) }, -/* Reusing lv_anim_set_duration for lv_anim_pause_for */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_pause_for_mpobj, 2, mp_lv_anim_set_duration, lv_anim_pause_for); - +static MP_DEFINE_CONST_DICT(mp_lv_color_t_locals_dict, mp_lv_color_t_locals_dict_table); + /* * lvgl extension definition for: - * bool lv_anim_is_paused(lv_anim_t *a) + * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) */ -static mp_obj_t mp_lv_anim_is_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_line_height_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool _res = ((bool (*)(lv_anim_t *))lv_func_ptr)(a); - return convert_to_bool(_res); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + int32_t _res = ((int32_t (*)(const lv_font_t *))lv_func_ptr)(font); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_is_paused_mpobj, 1, mp_lv_anim_is_paused, lv_anim_is_paused); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_internal_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height_internal); /* * lvgl extension definition for: - * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) + * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) */ -static mp_obj_t mp_lv_anim_set_values(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_has_static_bitmap_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t start = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t end = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_anim_t *, int32_t, int32_t))lv_func_ptr)(a, start, end); - return mp_const_none; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + bool _res = ((bool (*)(const lv_font_t *))lv_func_ptr)(font); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_values_mpobj, 3, mp_lv_anim_set_values, lv_anim_set_values); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_internal_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap_internal); /* - * Callback function lv_anim_t_exec_cb - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + * lvgl extension definition for: + * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -GENMPY_UNUSED static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) +static mp_obj_t mp_lv_font_get_bottom_trim_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_args[1] = mp_obj_new_int(arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_exec_cb)), 2, mp_args); - return; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_func_ptr)(font, trim); + return mp_obj_new_int(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim_internal); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_internal_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim_internal); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc); + /* * lvgl extension definition for: - * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static mp_obj_t mp_lv_anim_set_custom_exec_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_glyph_width(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_const_none; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(mp_args[0]); + uint32_t letter = (uint32_t)mp_obj_get_int(mp_args[1]); + uint32_t letter_next = (uint32_t)mp_obj_get_int(mp_args[2]); + uint16_t _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_func_ptr)(font, letter, letter_next); + return mp_obj_new_int_from_uint(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_custom_exec_cb_mpobj, 2, mp_lv_anim_set_custom_exec_cb, lv_anim_set_custom_exec_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width); +/* Reusing lv_font_get_line_height_internal for lv_font_get_line_height */ -/* - * Callback function lv_anim_t_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ - -GENMPY_UNUSED static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); -} - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_line_height_mpobj, 1, mp_lv_font_get_line_height_internal, lv_font_get_line_height); + /* * lvgl extension definition for: - * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) + * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) */ -static mp_obj_t mp_lv_anim_set_path_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_set_kerning(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *path_cb = mp_lv_callback(mp_args[1], &lv_anim_t_path_cb_callback, MP_QSTR_lv_anim_t_path_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_func_ptr)(a, path_cb); + lv_font_t *font = mp_write_ptr_lv_font_t(mp_args[0]); + lv_font_kerning_t kerning = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_font_t *, lv_font_kerning_t))lv_func_ptr)(font, kerning); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_path_cb_mpobj, 2, mp_lv_anim_set_path_cb, lv_anim_set_path_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_set_kerning_mpobj, 2, mp_lv_font_set_kerning, lv_font_set_kerning); +/* Reusing lv_font_has_static_bitmap_internal for lv_font_has_static_bitmap */ -/* - * Callback function lv_anim_t_start_cb - * void lv_anim_start_cb_t(lv_anim_t *) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_has_static_bitmap_mpobj, 1, mp_lv_font_has_static_bitmap_internal, lv_font_has_static_bitmap); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_top_trim */ -GENMPY_UNUSED static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_start_cb)), 1, mp_args); - return; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_top_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_top_trim); + +/* Reusing lv_font_get_bottom_trim_internal for lv_font_get_bottom_trim */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bottom_trim_mpobj, 2, mp_lv_font_get_bottom_trim_internal, lv_font_get_bottom_trim); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_fmt_txt */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_fmt_txt_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_fmt_txt); + +/* Reusing funcptr_get_glyph_dsc for lv_font_get_glyph_dsc_internal */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_dsc_internal_mpobj, 4, mp_funcptr_get_glyph_dsc, lv_font_get_glyph_dsc_internal); + +/* Reusing lv_font_get_glyph_width for lv_font_get_glyph_width_internal */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_width_internal_mpobj, 3, mp_lv_font_get_glyph_width, lv_font_get_glyph_width_internal); + + +static const mp_rom_map_elem_t mp_lv_font_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_line_height_internal), MP_ROM_PTR(&mp_lv_font_get_line_height_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim_internal), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim_internal), MP_ROM_PTR(&mp_lv_font_get_top_trim_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_width), MP_ROM_PTR(&mp_lv_font_get_glyph_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_line_height), MP_ROM_PTR(&mp_lv_font_get_line_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_kerning), MP_ROM_PTR(&mp_lv_font_set_kerning_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_has_static_bitmap), MP_ROM_PTR(&mp_lv_font_has_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_top_trim), MP_ROM_PTR(&mp_lv_font_get_top_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bottom_trim), MP_ROM_PTR(&mp_lv_font_get_bottom_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_dsc_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_dsc_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_width_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_width_internal_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_font_t_locals_dict, mp_lv_font_t_locals_dict_table); + +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap); + /* * lvgl extension definition for: - * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) + * const void *lv_font_get_glyph_static_bitmap(lv_font_glyph_dsc_t *g_dsc) */ -static mp_obj_t mp_lv_anim_set_start_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_get_glyph_static_bitmap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *start_cb = mp_lv_callback(mp_args[1], &lv_anim_t_start_cb_callback, MP_QSTR_lv_anim_t_start_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_func_ptr)(a, start_cb); - return mp_const_none; + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + const void * _res = ((const void *(*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_start_cb_mpobj, 2, mp_lv_anim_set_start_cb, lv_anim_set_start_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap); /* - * Callback function lv_anim_t_get_value_cb - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + * lvgl extension definition for: + * void lv_font_glyph_release_draw_data(lv_font_glyph_dsc_t *g_dsc) */ -GENMPY_UNUSED static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) +static mp_obj_t mp_lv_font_glyph_release_draw_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_get_value_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); + lv_font_glyph_dsc_t *g_dsc = mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + ((void (*)(lv_font_glyph_dsc_t *))lv_func_ptr)(g_dsc); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data); + +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_bitmap_fmt_txt */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_bitmap_fmt_txt_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_bitmap_fmt_txt); + /* * lvgl extension definition for: - * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) + * int32_t lv_font_glyph_dsc_compare(const lv_font_glyph_dsc_t *lhs, const lv_font_glyph_dsc_t *rhs) */ -static mp_obj_t mp_lv_anim_set_get_value_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_font_glyph_dsc_compare(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *get_value_cb = mp_lv_callback(mp_args[1], &lv_anim_t_get_value_cb_callback, MP_QSTR_lv_anim_t_get_value_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_func_ptr)(a, get_value_cb); - return mp_const_none; + const lv_font_glyph_dsc_t *lhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[0]); + const lv_font_glyph_dsc_t *rhs = (const lv_font_glyph_dsc_t *)mp_write_ptr_lv_font_glyph_dsc_t(mp_args[1]); + int32_t _res = ((int32_t (*)(const lv_font_glyph_dsc_t *, const lv_font_glyph_dsc_t *))lv_func_ptr)(lhs, rhs); + return mp_obj_new_int(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_get_value_cb_mpobj, 2, mp_lv_anim_set_get_value_cb, lv_anim_set_get_value_cb); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_dsc_compare_mpobj, 2, mp_lv_font_glyph_dsc_compare, lv_font_glyph_dsc_compare); +/* Reusing funcptr_get_glyph_bitmap for lv_font_get_glyph_bitmap_internal */ -/* - * Callback function lv_anim_t_completed_cb - * void lv_anim_completed_cb_t(lv_anim_t *) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_bitmap_internal_mpobj, 2, mp_funcptr_get_glyph_bitmap, lv_font_get_glyph_bitmap_internal); + +/* Reusing lv_font_get_glyph_static_bitmap for lv_font_get_glyph_static_bitmap_internal */ -GENMPY_UNUSED static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_completed_cb)), 1, mp_args); - return; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_get_glyph_static_bitmap_internal_mpobj, 1, mp_lv_font_get_glyph_static_bitmap, lv_font_get_glyph_static_bitmap_internal); + +/* Reusing lv_font_glyph_release_draw_data for lv_font_glyph_release_draw_data_internal */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_font_glyph_release_draw_data_internal_mpobj, 1, mp_lv_font_glyph_release_draw_data, lv_font_glyph_release_draw_data_internal); + -/* - * lvgl extension definition for: - * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) - */ +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_bitmap_fmt_txt), MP_ROM_PTR(&mp_lv_font_get_bitmap_fmt_txt_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_compare), MP_ROM_PTR(&mp_lv_font_glyph_dsc_compare_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_glyph_static_bitmap_internal), MP_ROM_PTR(&mp_lv_font_get_glyph_static_bitmap_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_release_draw_data_internal), MP_ROM_PTR(&mp_lv_font_glyph_release_draw_data_internal_mpobj) }, + +}; -static mp_obj_t mp_lv_anim_set_completed_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *completed_cb = mp_lv_callback(mp_args[1], &lv_anim_t_completed_cb_callback, MP_QSTR_lv_anim_t_completed_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_func_ptr)(a, completed_cb); - return mp_const_none; -} +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_t_locals_dict, mp_lv_font_glyph_dsc_t_locals_dict_table); + - +static const mp_rom_map_elem_t mp_lv_font_glyph_dsc_gid_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_font_glyph_dsc_gid_t))) }, + +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_completed_cb_mpobj, 2, mp_lv_anim_set_completed_cb, lv_anim_set_completed_cb); +static MP_DEFINE_CONST_DICT(mp_lv_font_glyph_dsc_gid_t_locals_dict, mp_lv_font_glyph_dsc_gid_t_locals_dict_table); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_delete */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_delete_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_delete); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_pause */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_pause_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_pause); + +/* Reusing funcptr_lv_timer_cb_t for lv_timer_resume */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_resume_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_resume); /* - * Callback function lv_anim_t_deleted_cb - * void lv_anim_deleted_cb_t(lv_anim_t *) + * Callback function lv_timer_t_timer_cb + * void lv_timer_cb_t(lv_timer_t *) */ -GENMPY_UNUSED static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +GENMPY_UNUSED static void lv_timer_t_timer_cb_callback(lv_timer_t *arg0) { mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[0] = mp_read_ptr_lv_timer_t((void*)arg0); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_deleted_cb)), 1, mp_args); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_timer_t_timer_cb)), 1, mp_args); return; } /* * lvgl extension definition for: - * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) + * void lv_timer_set_cb(lv_timer_t *timer, lv_timer_cb_t timer_cb) */ -static mp_obj_t mp_lv_anim_set_deleted_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_cb(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *deleted_cb = mp_lv_callback(mp_args[1], &lv_anim_t_deleted_cb_callback, MP_QSTR_lv_anim_t_deleted_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_func_ptr)(a, deleted_cb); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void *timer_cb = mp_lv_callback(mp_args[1], &lv_timer_t_timer_cb_callback, MP_QSTR_lv_timer_t_timer_cb, &timer->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_timer_t *, lv_timer_cb_t))lv_func_ptr)(timer, timer_cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_deleted_cb_mpobj, 2, mp_lv_anim_set_deleted_cb, lv_anim_set_deleted_cb); - -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_duration */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_duration_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_duration); - -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_time */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_time_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_time); - -/* Reusing lv_anim_set_duration for lv_anim_set_reverse_delay */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_reverse_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_reverse_delay); - -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_count_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_count); - -/* Reusing lv_anim_set_duration for lv_anim_set_repeat_delay */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_repeat_delay_mpobj, 2, mp_lv_anim_set_duration, lv_anim_set_repeat_delay); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_cb_mpobj, 2, mp_lv_timer_set_cb, lv_timer_set_cb); /* * lvgl extension definition for: - * void lv_anim_set_early_apply(lv_anim_t *a, bool en) + * void lv_timer_set_period(lv_timer_t *timer, uint32_t period) */ -static mp_obj_t mp_lv_anim_set_early_apply(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_period(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - bool en = mp_obj_is_true(mp_args[1]); - ((void (*)(lv_anim_t *, bool))lv_func_ptr)(a, en); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + uint32_t period = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, uint32_t))lv_func_ptr)(timer, period); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_early_apply_mpobj, 2, mp_lv_anim_set_early_apply, lv_anim_set_early_apply); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_period_mpobj, 2, mp_lv_timer_set_period, lv_timer_set_period); -/* Reusing lv_anim_set_var for lv_anim_set_user_data */ +/* Reusing funcptr_lv_timer_cb_t for lv_timer_ready */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_user_data_mpobj, 2, mp_lv_anim_set_var, lv_anim_set_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_ready_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_ready); /* * lvgl extension definition for: - * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) + * void lv_timer_set_repeat_count(lv_timer_t *timer, int32_t repeat_count) */ -static mp_obj_t mp_lv_anim_set_bezier3_param(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_repeat_count(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - int16_t x1 = (int16_t)mp_obj_get_int(mp_args[1]); - int16_t y1 = (int16_t)mp_obj_get_int(mp_args[2]); - int16_t x2 = (int16_t)mp_obj_get_int(mp_args[3]); - int16_t y2 = (int16_t)mp_obj_get_int(mp_args[4]); - ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_func_ptr)(a, x1, y1, x2, y2); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + int32_t repeat_count = (int32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_timer_t *, int32_t))lv_func_ptr)(timer, repeat_count); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_set_bezier3_param_mpobj, 5, mp_lv_anim_set_bezier3_param, lv_anim_set_bezier3_param); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_repeat_count_mpobj, 2, mp_lv_timer_set_repeat_count, lv_timer_set_repeat_count); /* * lvgl extension definition for: - * lv_anim_t *lv_anim_start(const lv_anim_t *a) + * void lv_timer_set_auto_delete(lv_timer_t *timer, bool auto_delete) */ -static mp_obj_t mp_lv_anim_start(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_auto_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - lv_anim_t * _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool auto_delete = mp_obj_is_true(mp_args[1]); + ((void (*)(lv_timer_t *, bool))lv_func_ptr)(timer, auto_delete); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_start_mpobj, 1, mp_lv_anim_start, lv_anim_start); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_auto_delete_mpobj, 2, mp_lv_timer_set_auto_delete, lv_timer_set_auto_delete); /* * lvgl extension definition for: - * uint32_t lv_anim_get_delay(const lv_anim_t *a) + * void lv_timer_set_user_data(lv_timer_t *timer, void *user_data) */ -static mp_obj_t mp_lv_anim_get_delay(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_set_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - uint32_t _res = ((uint32_t (*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_obj_new_int_from_uint(_res); + void *user_data = mp_to_ptr(mp_args[1]); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + ((void (*)(lv_timer_t *, void *))lv_func_ptr)(timer, user_data); + return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_delay_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_delay); - -/* Reusing lv_anim_get_delay for lv_anim_get_playtime */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_playtime_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_playtime); - -/* Reusing lv_anim_get_delay for lv_anim_get_time */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_time_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_time); - -/* Reusing lv_anim_get_delay for lv_anim_get_repeat_count */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_repeat_count_mpobj, 1, mp_lv_anim_get_delay, lv_anim_get_repeat_count); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_set_user_data_mpobj, 2, mp_lv_timer_set_user_data, lv_timer_set_user_data); +/* Reusing funcptr_lv_timer_cb_t for lv_timer_reset */ -/* - * lvgl extension definition for: - * void *lv_anim_get_user_data(const lv_anim_t *a) - */ - -static mp_obj_t mp_lv_anim_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - void * _res = ((void *(*)(const lv_anim_t *))lv_func_ptr)(a); - return ptr_to_mp((void*)_res); -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_get_user_data_mpobj, 1, mp_lv_anim_get_user_data, lv_anim_get_user_data); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_reset_mpobj, 1, mp_funcptr_lv_timer_cb_t, lv_timer_reset); /* * lvgl extension definition for: - * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * lv_timer_t *lv_timer_get_next(lv_timer_t *timer) */ -static mp_obj_t mp_lv_anim_custom_delete(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_next(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - bool _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return convert_to_bool(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + lv_timer_t * _res = ((lv_timer_t *(*)(lv_timer_t *))lv_func_ptr)(timer); + return mp_read_ptr_lv_timer_t((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_delete_mpobj, 2, mp_lv_anim_custom_delete, lv_anim_custom_delete); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_next_mpobj, 1, mp_lv_timer_get_next, lv_timer_get_next); /* * lvgl extension definition for: - * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * void *lv_timer_get_user_data(lv_timer_t *timer) */ -static mp_obj_t mp_lv_anim_custom_get(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_user_data(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_anim_t *a = mp_write_ptr_lv_anim_t(mp_args[0]); - void *exec_cb = mp_lv_callback(mp_args[1], &lv_anim_t_exec_cb_callback, MP_QSTR_lv_anim_t_exec_cb, &a->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - lv_anim_t * _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_func_ptr)(a, exec_cb); - return mp_read_ptr_lv_anim_t((void*)_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + void * _res = ((void *(*)(lv_timer_t *))lv_func_ptr)(timer); + return ptr_to_mp((void*)_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_custom_get_mpobj, 2, mp_lv_anim_custom_get, lv_anim_custom_get); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_user_data_mpobj, 1, mp_lv_timer_get_user_data, lv_timer_get_user_data); /* * lvgl extension definition for: - * int32_t lv_anim_path_linear(const lv_anim_t *a) + * bool lv_timer_get_paused(lv_timer_t *timer) */ -static mp_obj_t mp_lv_anim_path_linear(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_timer_get_paused(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - const lv_anim_t *a = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[0]); - int32_t _res = ((int32_t (*)(const lv_anim_t *))lv_func_ptr)(a); - return mp_obj_new_int(_res); + lv_timer_t *timer = mp_write_ptr_lv_timer_t(mp_args[0]); + bool _res = ((bool (*)(lv_timer_t *))lv_func_ptr)(timer); + return convert_to_bool(_res); } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_linear_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_linear); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_out); - -/* Reusing lv_anim_path_linear for lv_anim_path_ease_in_out */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_ease_in_out_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_ease_in_out); - -/* Reusing lv_anim_path_linear for lv_anim_path_overshoot */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_overshoot_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_overshoot); - -/* Reusing lv_anim_path_linear for lv_anim_path_bounce */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_bounce_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_bounce); - -/* Reusing lv_anim_path_linear for lv_anim_path_step */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_step_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_step); - -/* Reusing lv_anim_path_linear for lv_anim_path_custom_bezier3 */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_anim_path_custom_bezier3_mpobj, 1, mp_lv_anim_path_linear, lv_anim_path_custom_bezier3); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_timer_get_paused_mpobj, 1, mp_lv_timer_get_paused, lv_timer_get_paused); -static const mp_rom_map_elem_t mp_lv_anim_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_anim_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_var), MP_ROM_PTR(&mp_lv_anim_set_var_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_duration), MP_ROM_PTR(&mp_lv_anim_set_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_delay), MP_ROM_PTR(&mp_lv_anim_set_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_anim_resume_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_anim_pause_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_pause_for), MP_ROM_PTR(&mp_lv_anim_pause_for_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_paused), MP_ROM_PTR(&mp_lv_anim_is_paused_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_values), MP_ROM_PTR(&mp_lv_anim_set_values_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_custom_exec_cb), MP_ROM_PTR(&mp_lv_anim_set_custom_exec_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_path_cb), MP_ROM_PTR(&mp_lv_anim_set_path_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_start_cb), MP_ROM_PTR(&mp_lv_anim_set_start_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_get_value_cb), MP_ROM_PTR(&mp_lv_anim_set_get_value_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_completed_cb), MP_ROM_PTR(&mp_lv_anim_set_completed_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_deleted_cb), MP_ROM_PTR(&mp_lv_anim_set_deleted_cb_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_duration), MP_ROM_PTR(&mp_lv_anim_set_reverse_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_time), MP_ROM_PTR(&mp_lv_anim_set_reverse_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_reverse_delay), MP_ROM_PTR(&mp_lv_anim_set_reverse_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_anim_set_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_repeat_delay), MP_ROM_PTR(&mp_lv_anim_set_repeat_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_early_apply), MP_ROM_PTR(&mp_lv_anim_set_early_apply_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_anim_set_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bezier3_param), MP_ROM_PTR(&mp_lv_anim_set_bezier3_param_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_start), MP_ROM_PTR(&mp_lv_anim_start_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_delay), MP_ROM_PTR(&mp_lv_anim_get_delay_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_playtime), MP_ROM_PTR(&mp_lv_anim_get_playtime_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_time), MP_ROM_PTR(&mp_lv_anim_get_time_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_repeat_count), MP_ROM_PTR(&mp_lv_anim_get_repeat_count_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_anim_get_user_data_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_delete), MP_ROM_PTR(&mp_lv_anim_custom_delete_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_custom_get), MP_ROM_PTR(&mp_lv_anim_custom_get_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_linear), MP_ROM_PTR(&mp_lv_anim_path_linear_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in), MP_ROM_PTR(&mp_lv_anim_path_ease_in_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_out), MP_ROM_PTR(&mp_lv_anim_path_ease_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_ease_in_out), MP_ROM_PTR(&mp_lv_anim_path_ease_in_out_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_overshoot), MP_ROM_PTR(&mp_lv_anim_path_overshoot_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_bounce), MP_ROM_PTR(&mp_lv_anim_path_bounce_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_step), MP_ROM_PTR(&mp_lv_anim_path_step_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_path_custom_bezier3), MP_ROM_PTR(&mp_lv_anim_path_custom_bezier3_mpobj) }, +static const mp_rom_map_elem_t mp_lv_timer_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_timer_t))) }, + { MP_ROM_QSTR(MP_QSTR_delete), MP_ROM_PTR(&mp_lv_timer_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_pause), MP_ROM_PTR(&mp_lv_timer_pause_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_resume), MP_ROM_PTR(&mp_lv_timer_resume_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_cb), MP_ROM_PTR(&mp_lv_timer_set_cb_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_period), MP_ROM_PTR(&mp_lv_timer_set_period_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_ready), MP_ROM_PTR(&mp_lv_timer_ready_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_repeat_count), MP_ROM_PTR(&mp_lv_timer_set_repeat_count_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_auto_delete), MP_ROM_PTR(&mp_lv_timer_set_auto_delete_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_user_data), MP_ROM_PTR(&mp_lv_timer_set_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_timer_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_next), MP_ROM_PTR(&mp_lv_timer_get_next_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_user_data), MP_ROM_PTR(&mp_lv_timer_get_user_data_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_paused), MP_ROM_PTR(&mp_lv_timer_get_paused_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_anim_t_locals_dict, mp_lv_anim_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_timer_t_locals_dict, mp_lv_timer_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_anim_parameter_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_parameter_t))) }, +static const mp_rom_map_elem_t mp_lv_obj_class_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_class_t))) }, + { MP_ROM_QSTR(MP_QSTR_create_obj), MP_ROM_PTR(&mp_lv_obj_class_create_obj_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_event_base), MP_ROM_PTR(&mp_lv_obj_event_base_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_anim_parameter_t_locals_dict, mp_lv_anim_parameter_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_obj_class_t_locals_dict, mp_lv_obj_class_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_anim_bezier3_para_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_anim_bezier3_para_t))) }, +static const mp_rom_map_elem_t mp_lv_matrix_t_locals_dict_table[] = { + }; -static MP_DEFINE_CONST_DICT(mp_lv_anim_bezier3_para_t_locals_dict, mp_lv_anim_bezier3_para_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_matrix_t_locals_dict, mp_lv_matrix_t_locals_dict_table); /* - * Array convertors for lv_style_prop_t [] + * lvgl extension definition for: + * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) */ -GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) +static mp_obj_t mp_lv_point_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - // A packed buffer is already the C array (lvgl-bindings#37). - if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || - MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) - return mp_to_ptr(mp_arr); - mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); - if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); - mp_int_t len = mp_obj_get_int(mp_len); - - lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); - mp_obj_t iter = mp_getiter(mp_arr, NULL); - mp_obj_t item; - size_t i = 0; - while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { - lv_arr[i++] = (uint8_t)mp_obj_get_int(item); - } - return (lv_style_prop_t *)lv_arr; + lv_point_t *point = mp_write_ptr_lv_point_t(mp_args[0]); + int32_t angle = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[3]); + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[4]); + bool zoom_first = mp_obj_is_true(mp_args[5]); + ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(point, angle, scale_x, scale_y, pivot, zoom_first); + return mp_const_none; } -GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_transform_mpobj, 6, mp_lv_point_transform, lv_point_transform); + + +/* + * lvgl extension definition for: + * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + */ + +static mp_obj_t mp_lv_point_array_transform(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - return mp_array_from_u8ptr((void*)arr); + lv_point_t *points = mp_write_ptr_lv_point_t(mp_args[0]); + size_t count = (size_t)mp_obj_get_int(mp_args[1]); + int32_t angle = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t scale_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t scale_y = (int32_t)mp_obj_get_int(mp_args[4]); + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[5]); + bool zoom_first = mp_obj_is_true(mp_args[6]); + ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_func_ptr)(points, count, angle, scale_x, scale_y, pivot, zoom_first); + return mp_const_none; } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_array_transform_mpobj, 7, mp_lv_point_array_transform, lv_point_array_transform); + /* - * Callback function lv_style_transition_dsc_init_path_cb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) + * lvgl extension definition for: + * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) */ -GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +static mp_obj_t mp_lv_point_to_precise(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); + const lv_point_t *p = (const lv_point_t *)mp_write_ptr_lv_point_t(mp_args[0]); + lv_point_precise_t _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_func_ptr)(p); + return mp_read_lv_point_precise_t(_res); } + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_to_precise_mpobj, 1, mp_lv_point_to_precise, lv_point_to_precise); + /* * lvgl extension definition for: - * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) + * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) */ -static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_point_set(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - void *user_data = mp_to_ptr(mp_args[5]); - const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); - void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); - uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); - uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); - lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); - ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); + lv_point_t *p = mp_write_ptr_lv_point_t(mp_args[0]); + int32_t x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t y = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_point_t *, int32_t, int32_t))lv_func_ptr)(p, x, y); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); - - -static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_set_mpobj, 3, mp_lv_point_set, lv_point_set); -}; -static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); - +/* + * lvgl extension definition for: + * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) + */ -static const mp_rom_map_elem_t mp_lv_obj_class_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_obj_class_t))) }, - { MP_ROM_QSTR(MP_QSTR_create_obj), MP_ROM_PTR(&mp_lv_obj_class_create_obj_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_event_base), MP_ROM_PTR(&mp_lv_obj_event_base_mpobj) }, - -}; +static mp_obj_t mp_lv_point_swap(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_point_t *p1 = mp_write_ptr_lv_point_t(mp_args[0]); + lv_point_t *p2 = mp_write_ptr_lv_point_t(mp_args[1]); + ((void (*)(lv_point_t *, lv_point_t *))lv_func_ptr)(p1, p2); + return mp_const_none; +} -static MP_DEFINE_CONST_DICT(mp_lv_obj_class_t_locals_dict, mp_lv_obj_class_t_locals_dict_table); - + -static const mp_rom_map_elem_t mp_lv_matrix_t_locals_dict_table[] = { +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_point_swap_mpobj, 2, mp_lv_point_swap, lv_point_swap); + +static const mp_rom_map_elem_t mp_lv_point_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_point_t))) }, + { MP_ROM_QSTR(MP_QSTR_transform), MP_ROM_PTR(&mp_lv_point_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_array_transform), MP_ROM_PTR(&mp_lv_point_array_transform_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_to_precise), MP_ROM_PTR(&mp_lv_point_to_precise_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set), MP_ROM_PTR(&mp_lv_point_set_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_swap), MP_ROM_PTR(&mp_lv_point_swap_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_matrix_t_locals_dict, mp_lv_matrix_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_point_t_locals_dict, mp_lv_point_t_locals_dict_table); /* @@ -42768,561 +41664,930 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_radius_mpobj, 2, mp_l /* Reusing lv_style_set_bg_image_tiled for lv_style_set_blur_backdrop */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_backdrop_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_blur_backdrop); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_backdrop_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_blur_backdrop); + + +/* + * lvgl extension definition for: + * void lv_style_set_blur_quality(lv_style_t *style, lv_blur_quality_t value) + */ + +static mp_obj_t mp_lv_style_set_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_blur_quality_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_blur_quality_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_blur_quality); + +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_radius); + +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_x */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_x); + +/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_y */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_y); + +/* Reusing lv_style_set_bg_color for lv_style_set_drop_shadow_color */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_color_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_drop_shadow_color); + +/* Reusing lv_style_set_bg_opa for lv_style_set_drop_shadow_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_drop_shadow_opa); + +/* Reusing lv_style_set_blur_quality for lv_style_set_drop_shadow_quality */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_drop_shadow_quality); + +/* Reusing lv_style_set_width for lv_style_set_radius */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_radius); + +/* Reusing lv_style_set_width for lv_style_set_radial_offset */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_width, lv_style_set_radial_offset); + +/* Reusing lv_style_set_bg_image_tiled for lv_style_set_clip_corner */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_clip_corner_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_clip_corner); + +/* Reusing lv_style_set_bg_opa for lv_style_set_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa); + +/* Reusing lv_style_set_bg_opa for lv_style_set_opa_layered */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_layered_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa_layered); + + +/* + * lvgl extension definition for: + * void lv_style_set_color_filter_dsc(lv_style_t *style, const lv_color_filter_dsc_t *value) + */ + +static mp_obj_t mp_lv_style_set_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(mp_args[1]); + ((void (*)(lv_style_t *, const lv_color_filter_dsc_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_dsc_mpobj, 2, mp_lv_style_set_color_filter_dsc, lv_style_set_color_filter_dsc); + +/* Reusing lv_style_set_bg_opa for lv_style_set_color_filter_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_color_filter_opa); + +/* Reusing lv_style_set_bg_color for lv_style_set_recolor */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_recolor); + +/* Reusing lv_style_set_bg_opa for lv_style_set_recolor_opa */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_recolor_opa); + + +/* + * lvgl extension definition for: + * void lv_style_set_anim(lv_style_t *style, const lv_anim_t *value) + */ + +static mp_obj_t mp_lv_style_set_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[1]); + ((void (*)(lv_style_t *, const lv_anim_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_mpobj, 2, mp_lv_style_set_anim, lv_style_set_anim); + + +/* + * lvgl extension definition for: + * void lv_style_set_anim_duration(lv_style_t *style, uint32_t value) + */ + +static mp_obj_t mp_lv_style_set_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + uint32_t value = (uint32_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, uint32_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_duration_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_anim_duration); + + +/* + * lvgl extension definition for: + * void lv_style_set_transition(lv_style_t *style, const lv_style_transition_dsc_t *value) + */ + +static mp_obj_t mp_lv_style_set_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(mp_args[1]); + ((void (*)(lv_style_t *, const lv_style_transition_dsc_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transition_mpobj, 2, mp_lv_style_set_transition, lv_style_set_transition); + + +/* + * lvgl extension definition for: + * void lv_style_set_blend_mode(lv_style_t *style, lv_blend_mode_t value) + */ + +static mp_obj_t mp_lv_style_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_blend_mode_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_blend_mode_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blend_mode_mpobj, 2, mp_lv_style_set_blend_mode, lv_style_set_blend_mode); + + +/* + * lvgl extension definition for: + * void lv_style_set_layout(lv_style_t *style, uint16_t value) + */ + +static mp_obj_t mp_lv_style_set_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + uint16_t value = (uint16_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, uint16_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_layout_mpobj, 2, mp_lv_style_set_layout, lv_style_set_layout); + + +/* + * lvgl extension definition for: + * void lv_style_set_base_dir(lv_style_t *style, lv_base_dir_t value) + */ + +static mp_obj_t mp_lv_style_set_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_base_dir_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_base_dir_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_base_dir_mpobj, 2, mp_lv_style_set_base_dir, lv_style_set_base_dir); + +/* Reusing lv_style_set_bg_image_src for lv_style_set_bitmap_mask_src */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bitmap_mask_src_mpobj, 2, mp_lv_style_set_bg_image_src, lv_style_set_bitmap_mask_src); + +/* Reusing lv_style_set_anim_duration for lv_style_set_rotary_sensitivity */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_rotary_sensitivity_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_rotary_sensitivity); + + +/* + * lvgl extension definition for: + * void lv_style_set_flex_flow(lv_style_t *style, lv_flex_flow_t value) + */ + +static mp_obj_t mp_lv_style_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_flex_flow_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_flex_flow_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_flow_mpobj, 2, mp_lv_style_set_flex_flow, lv_style_set_flex_flow); + + +/* + * lvgl extension definition for: + * void lv_style_set_flex_main_place(lv_style_t *style, lv_flex_align_t value) + */ + +static mp_obj_t mp_lv_style_set_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + lv_flex_align_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_flex_align_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_main_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_main_place); + +/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_cross_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_cross_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_cross_place); + +/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_track_place */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_track_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_track_place); + + +/* + * lvgl extension definition for: + * void lv_style_set_flex_grow(lv_style_t *style, uint8_t value) + */ + +static mp_obj_t mp_lv_style_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + uint8_t value = (uint8_t)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, uint8_t))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_grow_mpobj, 2, mp_lv_style_set_flex_grow, lv_style_set_flex_grow); + + +/* + * lvgl extension definition for: + * void lv_style_set_grid_column_dsc_array(lv_style_t *style, const int32_t *value) + */ + +static mp_obj_t mp_lv_style_set_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); + const int32_t *value = (const int32_t *)mp_array_to_i32ptr(mp_args[1]); + ((void (*)(lv_style_t *, const int32_t *))lv_func_ptr)(style, value); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_column_dsc_array); /* * lvgl extension definition for: - * void lv_style_set_blur_quality(lv_style_t *style, lv_blur_quality_t value) + * void lv_style_set_grid_column_align(lv_style_t *style, lv_grid_align_t value) */ -static mp_obj_t mp_lv_style_set_blur_quality(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_set_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_blur_quality_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_blur_quality_t))lv_func_ptr)(style, value); + lv_grid_align_t value = (int)mp_obj_get_int(mp_args[1]); + ((void (*)(lv_style_t *, lv_grid_align_t))lv_func_ptr)(style, value); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blur_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_blur_quality); - -/* Reusing lv_style_set_width for lv_style_set_drop_shadow_radius */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_radius); - -/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_x */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_x_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_x); - -/* Reusing lv_style_set_width for lv_style_set_drop_shadow_offset_y */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_offset_y_mpobj, 2, mp_lv_style_set_width, lv_style_set_drop_shadow_offset_y); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_column_align); -/* Reusing lv_style_set_bg_color for lv_style_set_drop_shadow_color */ +/* Reusing lv_style_set_grid_column_dsc_array for lv_style_set_grid_row_dsc_array */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_color_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_drop_shadow_color); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_row_dsc_array); -/* Reusing lv_style_set_bg_opa for lv_style_set_drop_shadow_opa */ +/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_row_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_drop_shadow_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_row_align); -/* Reusing lv_style_set_blur_quality for lv_style_set_drop_shadow_quality */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_drop_shadow_quality_mpobj, 2, mp_lv_style_set_blur_quality, lv_style_set_drop_shadow_quality); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_pos); -/* Reusing lv_style_set_width for lv_style_set_radius */ +/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_x_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radius_mpobj, 2, mp_lv_style_set_width, lv_style_set_radius); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_x_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_x_align); -/* Reusing lv_style_set_width for lv_style_set_radial_offset */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_radial_offset_mpobj, 2, mp_lv_style_set_width, lv_style_set_radial_offset); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_span); -/* Reusing lv_style_set_bg_image_tiled for lv_style_set_clip_corner */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_pos */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_clip_corner_mpobj, 2, mp_lv_style_set_bg_image_tiled, lv_style_set_clip_corner); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_pos); -/* Reusing lv_style_set_bg_opa for lv_style_set_opa */ +/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_y_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_y_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_y_align); -/* Reusing lv_style_set_bg_opa for lv_style_set_opa_layered */ +/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_span */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_opa_layered_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_opa_layered); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_span); /* * lvgl extension definition for: - * void lv_style_set_color_filter_dsc(lv_style_t *style, const lv_color_filter_dsc_t *value) + * void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) */ -static mp_obj_t mp_lv_style_set_color_filter_dsc(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const lv_color_filter_dsc_t *value = (const lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(mp_args[1]); - ((void (*)(lv_style_t *, const lv_color_filter_dsc_t *))lv_func_ptr)(style, value); + int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); + ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_dsc_mpobj, 2, mp_lv_style_set_color_filter_dsc, lv_style_set_color_filter_dsc); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); -/* Reusing lv_style_set_bg_opa for lv_style_set_color_filter_opa */ +/* Reusing lv_style_set_width for lv_style_set_pad_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_color_filter_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_color_filter_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_all); -/* Reusing lv_style_set_bg_color for lv_style_set_recolor */ +/* Reusing lv_style_set_width for lv_style_set_pad_hor */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_mpobj, 2, mp_lv_style_set_bg_color, lv_style_set_recolor); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_hor); -/* Reusing lv_style_set_bg_opa for lv_style_set_recolor_opa */ +/* Reusing lv_style_set_width for lv_style_set_pad_ver */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_recolor_opa_mpobj, 2, mp_lv_style_set_bg_opa, lv_style_set_recolor_opa); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_ver); +/* Reusing lv_style_set_width for lv_style_set_pad_gap */ -/* - * lvgl extension definition for: - * void lv_style_set_anim(lv_style_t *style, const lv_anim_t *value) - */ +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_gap); + +/* Reusing lv_style_set_width for lv_style_set_margin_hor */ -static mp_obj_t mp_lv_style_set_anim(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const lv_anim_t *value = (const lv_anim_t *)mp_write_ptr_lv_anim_t(mp_args[1]); - ((void (*)(lv_style_t *, const lv_anim_t *))lv_func_ptr)(style, value); - return mp_const_none; -} +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_hor); + +/* Reusing lv_style_set_width for lv_style_set_margin_ver */ - +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_ver); + +/* Reusing lv_style_set_width for lv_style_set_margin_all */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_mpobj, 2, mp_lv_style_set_anim, lv_style_set_anim); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_all); + +/* Reusing lv_style_set_width for lv_style_set_transform_scale */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale); + + +static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_t))) }, + { MP_ROM_QSTR(MP_QSTR_is_const_internal), MP_ROM_PTR(&mp_lv_style_is_const_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prop_internal), MP_ROM_PTR(&mp_lv_style_get_prop_internal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_style_reset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_style_copy_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_merge), MP_ROM_PTR(&mp_lv_style_merge_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_remove_prop), MP_ROM_PTR(&mp_lv_style_remove_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_prop), MP_ROM_PTR(&mp_lv_style_set_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_get_prop), MP_ROM_PTR(&mp_lv_style_get_prop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_style_is_empty_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_style_set_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_width), MP_ROM_PTR(&mp_lv_style_set_min_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_width), MP_ROM_PTR(&mp_lv_style_set_max_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_style_set_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_min_height), MP_ROM_PTR(&mp_lv_style_set_min_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_max_height), MP_ROM_PTR(&mp_lv_style_set_max_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_length), MP_ROM_PTR(&mp_lv_style_set_length_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_style_set_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_style_set_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_style_set_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_width), MP_ROM_PTR(&mp_lv_style_set_transform_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_height), MP_ROM_PTR(&mp_lv_style_set_transform_height_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_translate_x), MP_ROM_PTR(&mp_lv_style_set_translate_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_translate_y), MP_ROM_PTR(&mp_lv_style_set_translate_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_translate_radial), MP_ROM_PTR(&mp_lv_style_set_translate_radial_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale_x), MP_ROM_PTR(&mp_lv_style_set_transform_scale_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale_y), MP_ROM_PTR(&mp_lv_style_set_transform_scale_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_rotation), MP_ROM_PTR(&mp_lv_style_set_transform_rotation_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_x), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_y), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_skew_x), MP_ROM_PTR(&mp_lv_style_set_transform_skew_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_skew_y), MP_ROM_PTR(&mp_lv_style_set_transform_skew_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_top), MP_ROM_PTR(&mp_lv_style_set_pad_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_bottom), MP_ROM_PTR(&mp_lv_style_set_pad_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_left), MP_ROM_PTR(&mp_lv_style_set_pad_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_right), MP_ROM_PTR(&mp_lv_style_set_pad_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_row), MP_ROM_PTR(&mp_lv_style_set_pad_row_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_column), MP_ROM_PTR(&mp_lv_style_set_pad_column_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_radial), MP_ROM_PTR(&mp_lv_style_set_pad_radial_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_top), MP_ROM_PTR(&mp_lv_style_set_margin_top_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_bottom), MP_ROM_PTR(&mp_lv_style_set_margin_bottom_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_left), MP_ROM_PTR(&mp_lv_style_set_margin_left_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_right), MP_ROM_PTR(&mp_lv_style_set_margin_right_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_color), MP_ROM_PTR(&mp_lv_style_set_bg_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_opa), MP_ROM_PTR(&mp_lv_style_set_bg_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_color), MP_ROM_PTR(&mp_lv_style_set_bg_grad_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_dir), MP_ROM_PTR(&mp_lv_style_set_bg_grad_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_main_stop), MP_ROM_PTR(&mp_lv_style_set_bg_main_stop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_stop), MP_ROM_PTR(&mp_lv_style_set_bg_grad_stop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_main_opa), MP_ROM_PTR(&mp_lv_style_set_bg_main_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad_opa), MP_ROM_PTR(&mp_lv_style_set_bg_grad_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_grad), MP_ROM_PTR(&mp_lv_style_set_bg_grad_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_src), MP_ROM_PTR(&mp_lv_style_set_bg_image_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bg_image_tiled), MP_ROM_PTR(&mp_lv_style_set_bg_image_tiled_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_color), MP_ROM_PTR(&mp_lv_style_set_border_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_opa), MP_ROM_PTR(&mp_lv_style_set_border_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_width), MP_ROM_PTR(&mp_lv_style_set_border_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_side), MP_ROM_PTR(&mp_lv_style_set_border_side_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_border_post), MP_ROM_PTR(&mp_lv_style_set_border_post_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_width), MP_ROM_PTR(&mp_lv_style_set_outline_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_color), MP_ROM_PTR(&mp_lv_style_set_outline_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_opa), MP_ROM_PTR(&mp_lv_style_set_outline_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_outline_pad), MP_ROM_PTR(&mp_lv_style_set_outline_pad_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_width), MP_ROM_PTR(&mp_lv_style_set_shadow_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_spread), MP_ROM_PTR(&mp_lv_style_set_shadow_spread_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_color), MP_ROM_PTR(&mp_lv_style_set_shadow_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_shadow_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_opa), MP_ROM_PTR(&mp_lv_style_set_image_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_recolor), MP_ROM_PTR(&mp_lv_style_set_image_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_image_recolor_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_image_colorkey), MP_ROM_PTR(&mp_lv_style_set_image_colorkey_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_width), MP_ROM_PTR(&mp_lv_style_set_line_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_dash_width), MP_ROM_PTR(&mp_lv_style_set_line_dash_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_dash_gap), MP_ROM_PTR(&mp_lv_style_set_line_dash_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_rounded), MP_ROM_PTR(&mp_lv_style_set_line_rounded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_color), MP_ROM_PTR(&mp_lv_style_set_line_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_line_opa), MP_ROM_PTR(&mp_lv_style_set_line_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_width), MP_ROM_PTR(&mp_lv_style_set_arc_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_rounded), MP_ROM_PTR(&mp_lv_style_set_arc_rounded_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_color), MP_ROM_PTR(&mp_lv_style_set_arc_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_opa), MP_ROM_PTR(&mp_lv_style_set_arc_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_arc_image_src), MP_ROM_PTR(&mp_lv_style_set_arc_image_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_color), MP_ROM_PTR(&mp_lv_style_set_text_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_opa), MP_ROM_PTR(&mp_lv_style_set_text_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_font), MP_ROM_PTR(&mp_lv_style_set_text_font_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_letter_space), MP_ROM_PTR(&mp_lv_style_set_text_letter_space_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_line_space), MP_ROM_PTR(&mp_lv_style_set_text_line_space_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_decor), MP_ROM_PTR(&mp_lv_style_set_text_decor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_align), MP_ROM_PTR(&mp_lv_style_set_text_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_width_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_text_leading_trim), MP_ROM_PTR(&mp_lv_style_set_text_leading_trim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blur_radius), MP_ROM_PTR(&mp_lv_style_set_blur_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blur_backdrop), MP_ROM_PTR(&mp_lv_style_set_blur_backdrop_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blur_quality), MP_ROM_PTR(&mp_lv_style_set_blur_quality_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_radius), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_x_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_y_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_color), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_color_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_quality), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_quality_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_style_set_radius_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_radial_offset), MP_ROM_PTR(&mp_lv_style_set_radial_offset_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_clip_corner), MP_ROM_PTR(&mp_lv_style_set_clip_corner_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_opa), MP_ROM_PTR(&mp_lv_style_set_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_opa_layered), MP_ROM_PTR(&mp_lv_style_set_opa_layered_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_color_filter_dsc), MP_ROM_PTR(&mp_lv_style_set_color_filter_dsc_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_color_filter_opa), MP_ROM_PTR(&mp_lv_style_set_color_filter_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_style_set_recolor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_recolor_opa_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_anim), MP_ROM_PTR(&mp_lv_style_set_anim_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_style_set_anim_duration_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transition), MP_ROM_PTR(&mp_lv_style_set_transition_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_style_set_blend_mode_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_style_set_layout_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_base_dir), MP_ROM_PTR(&mp_lv_style_set_base_dir_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_bitmap_mask_src), MP_ROM_PTR(&mp_lv_style_set_bitmap_mask_src_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_rotary_sensitivity), MP_ROM_PTR(&mp_lv_style_set_rotary_sensitivity_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_style_set_flex_flow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_main_place), MP_ROM_PTR(&mp_lv_style_set_flex_main_place_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_cross_place), MP_ROM_PTR(&mp_lv_style_set_flex_cross_place_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_track_place), MP_ROM_PTR(&mp_lv_style_set_flex_track_place_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_style_set_flex_grow_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_column_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_column_dsc_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_column_align), MP_ROM_PTR(&mp_lv_style_set_grid_column_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_row_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_row_dsc_array_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_row_align), MP_ROM_PTR(&mp_lv_style_set_grid_row_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_x_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_x_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_pos_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_y_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_y_align_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_span_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_style_t_locals_dict, mp_lv_style_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_style_value_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_value_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_style_value_t_locals_dict, mp_lv_style_value_t_locals_dict_table); + /* - * lvgl extension definition for: - * void lv_style_set_anim_duration(lv_style_t *style, uint32_t value) + * Array convertors for lv_color_t [] */ -static mp_obj_t mp_lv_style_set_anim_duration(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_color_t *mp_arr_to_lv_color_t_____(mp_obj_t mp_arr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - uint32_t value = (uint32_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, uint32_t))lv_func_ptr)(style, value); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_color_t *lv_arr = (lv_color_t*)m_malloc(len * sizeof(lv_color_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = mp_write_lv_color_t(item); + } + return (lv_color_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_color_t_____(const lv_color_t *arr) +{ + return mp_read_ptr_lv_color_t((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_anim_duration_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_anim_duration); - /* - * lvgl extension definition for: - * void lv_style_set_transition(lv_style_t *style, const lv_style_transition_dsc_t *value) + * Array convertors for lv_opa_t [] */ -static mp_obj_t mp_lv_style_set_transition(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_opa_t *mp_arr_to_lv_opa_t_____(mp_obj_t mp_arr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const lv_style_transition_dsc_t *value = (const lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(mp_args[1]); - ((void (*)(lv_style_t *, const lv_style_transition_dsc_t *))lv_func_ptr)(style, value); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + lv_opa_t *lv_arr = (lv_opa_t*)m_malloc(len * sizeof(lv_opa_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (lv_opa_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_opa_t_____(const lv_opa_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transition_mpobj, 2, mp_lv_style_set_transition, lv_style_set_transition); - /* - * lvgl extension definition for: - * void lv_style_set_blend_mode(lv_style_t *style, lv_blend_mode_t value) + * Array convertors for uint8_t [] */ -static mp_obj_t mp_lv_style_set_blend_mode(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static uint8_t *mp_arr_to_uint8_t_____(mp_obj_t mp_arr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_blend_mode_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_blend_mode_t))lv_func_ptr)(style, value); - return mp_const_none; + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); + + uint8_t *lv_arr = (uint8_t*)m_malloc(len * sizeof(uint8_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (uint8_t *)lv_arr; } - +GENMPY_UNUSED static mp_obj_t mp_arr_from_uint8_t_____(const uint8_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_blend_mode_mpobj, 2, mp_lv_style_set_blend_mode, lv_style_set_blend_mode); - /* * lvgl extension definition for: - * void lv_style_set_layout(lv_style_t *style, uint16_t value) + * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) */ -static mp_obj_t mp_lv_style_set_layout(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_init_stops(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - uint16_t value = (uint16_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, uint16_t))lv_func_ptr)(style, value); + lv_grad_dsc_t *grad = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + const lv_color_t *colors = (const lv_color_t *)mp_arr_to_lv_color_t_____(mp_args[1]); + const lv_opa_t *opa = (const lv_opa_t *)mp_arr_to_lv_opa_t_____(mp_args[2]); + const uint8_t *fracs = (const uint8_t *)mp_arr_to_uint8_t_____(mp_args[3]); + int num_stops = (int)mp_obj_get_int(mp_args[4]); + ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_func_ptr)(grad, colors, opa, fracs, num_stops); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_layout_mpobj, 2, mp_lv_style_set_layout, lv_style_set_layout); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_init_stops_mpobj, 5, mp_lv_grad_init_stops, lv_grad_init_stops); /* * lvgl extension definition for: - * void lv_style_set_base_dir(lv_style_t *style, lv_base_dir_t value) + * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) */ -static mp_obj_t mp_lv_style_set_base_dir(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_horizontal_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_base_dir_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_base_dir_t))lv_func_ptr)(style, value); + lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + ((void (*)(lv_grad_dsc_t *))lv_func_ptr)(dsc); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_base_dir_mpobj, 2, mp_lv_style_set_base_dir, lv_style_set_base_dir); - -/* Reusing lv_style_set_bg_image_src for lv_style_set_bitmap_mask_src */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_bitmap_mask_src_mpobj, 2, mp_lv_style_set_bg_image_src, lv_style_set_bitmap_mask_src); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_horizontal_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_horizontal_init); -/* Reusing lv_style_set_anim_duration for lv_style_set_rotary_sensitivity */ +/* Reusing lv_grad_horizontal_init for lv_grad_vertical_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_rotary_sensitivity_mpobj, 2, mp_lv_style_set_anim_duration, lv_style_set_rotary_sensitivity); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_vertical_init_mpobj, 1, mp_lv_grad_horizontal_init, lv_grad_vertical_init); /* * lvgl extension definition for: - * void lv_style_set_flex_flow(lv_style_t *style, lv_flex_flow_t value) + * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) */ -static mp_obj_t mp_lv_style_set_flex_flow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_linear_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_flex_flow_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_flex_flow_t))lv_func_ptr)(style, value); + lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t from_x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t from_y = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t to_x = (int32_t)mp_obj_get_int(mp_args[3]); + int32_t to_y = (int32_t)mp_obj_get_int(mp_args[4]); + lv_grad_extend_t extend = (int)mp_obj_get_int(mp_args[5]); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_func_ptr)(dsc, from_x, from_y, to_x, to_y, extend); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_flow_mpobj, 2, mp_lv_style_set_flex_flow, lv_style_set_flex_flow); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_linear_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_linear_init); + +/* Reusing lv_grad_linear_init for lv_grad_radial_init */ + +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_radial_init); /* * lvgl extension definition for: - * void lv_style_set_flex_main_place(lv_style_t *style, lv_flex_align_t value) + * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) */ -static mp_obj_t mp_lv_style_set_flex_main_place(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_grad_radial_set_focal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_flex_align_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_flex_align_t))lv_func_ptr)(style, value); + lv_grad_dsc_t *dsc = mp_write_ptr_lv_grad_dsc_t(mp_args[0]); + int32_t center_x = (int32_t)mp_obj_get_int(mp_args[1]); + int32_t center_y = (int32_t)mp_obj_get_int(mp_args[2]); + int32_t radius = (int32_t)mp_obj_get_int(mp_args[3]); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_func_ptr)(dsc, center_x, center_y, radius); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_main_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_main_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_radial_set_focal_mpobj, 4, mp_lv_grad_radial_set_focal, lv_grad_radial_set_focal); -/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_cross_place */ +/* Reusing lv_grad_linear_init for lv_grad_conical_init */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_cross_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_cross_place); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_grad_conical_init_mpobj, 6, mp_lv_grad_linear_init, lv_grad_conical_init); -/* Reusing lv_style_set_flex_main_place for lv_style_set_flex_track_place */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_track_place_mpobj, 2, mp_lv_style_set_flex_main_place, lv_style_set_flex_track_place); +static const mp_rom_map_elem_t mp_lv_grad_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init_stops), MP_ROM_PTR(&mp_lv_grad_init_stops_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_horizontal_init), MP_ROM_PTR(&mp_lv_grad_horizontal_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_vertical_init), MP_ROM_PTR(&mp_lv_grad_vertical_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_linear_init), MP_ROM_PTR(&mp_lv_grad_linear_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_radial_init), MP_ROM_PTR(&mp_lv_grad_radial_init_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_radial_set_focal), MP_ROM_PTR(&mp_lv_grad_radial_set_focal_mpobj) }, + { MP_ROM_QSTR(MP_QSTR_conical_init), MP_ROM_PTR(&mp_lv_grad_conical_init_mpobj) }, +}; -/* - * lvgl extension definition for: - * void lv_style_set_flex_grow(lv_style_t *style, uint8_t value) - */ +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_t_locals_dict, mp_lv_grad_dsc_t_locals_dict_table); + -static mp_obj_t mp_lv_style_set_flex_grow(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - uint8_t value = (uint8_t)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, uint8_t))lv_func_ptr)(style, value); - return mp_const_none; -} +static const mp_rom_map_elem_t mp_lv_grad_stop_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_stop_t))) }, + +}; - +static MP_DEFINE_CONST_DICT(mp_lv_grad_stop_t_locals_dict, mp_lv_grad_stop_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_flex_grow_mpobj, 2, mp_lv_style_set_flex_grow, lv_style_set_flex_grow); +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_t_locals_dict, mp_lv_grad_dsc_params_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_linear_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_linear_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_linear_t_locals_dict, mp_lv_grad_dsc_params_linear_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_radial_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_radial_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_radial_t_locals_dict, mp_lv_grad_dsc_params_radial_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_grad_dsc_params_conical_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_grad_dsc_params_conical_t))) }, + +}; + +static MP_DEFINE_CONST_DICT(mp_lv_grad_dsc_params_conical_t_locals_dict, mp_lv_grad_dsc_params_conical_t_locals_dict_table); + + +static const mp_rom_map_elem_t mp_lv_image_colorkey_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_image_colorkey_t))) }, +}; + +static MP_DEFINE_CONST_DICT(mp_lv_image_colorkey_t_locals_dict, mp_lv_image_colorkey_t_locals_dict_table); + /* - * lvgl extension definition for: - * void lv_style_set_grid_column_dsc_array(lv_style_t *style, const int32_t *value) + * Callback function lv_color_filter_dsc_t_cb + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) */ -static mp_obj_t mp_lv_style_set_grid_column_dsc_array(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - const int32_t *value = (const int32_t *)mp_array_to_i32ptr(mp_args[1]); - ((void (*)(lv_style_t *, const int32_t *))lv_func_ptr)(style, value); - return mp_const_none; + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_cb)), 3, mp_args); + return mp_write_lv_color_t(callback_result); } - - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_column_dsc_array); - /* * lvgl extension definition for: - * void lv_style_set_grid_column_align(lv_style_t *style, lv_grid_align_t value) + * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) */ -static mp_obj_t mp_lv_style_set_grid_column_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_color_filter_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - lv_grid_align_t value = (int)mp_obj_get_int(mp_args[1]); - ((void (*)(lv_style_t *, lv_grid_align_t))lv_func_ptr)(style, value); + lv_color_filter_dsc_t *dsc = mp_write_ptr_lv_color_filter_dsc_t(mp_args[0]); + void *cb = mp_lv_callback(mp_args[1], &lv_color_filter_dsc_t_cb_callback, MP_QSTR_lv_color_filter_dsc_t_cb, &dsc->user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_func_ptr)(dsc, cb); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_column_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_column_align); +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_color_filter_dsc_init_mpobj, 2, mp_lv_color_filter_dsc_init, lv_color_filter_dsc_init); -/* Reusing lv_style_set_grid_column_dsc_array for lv_style_set_grid_row_dsc_array */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_dsc_array_mpobj, 2, mp_lv_style_set_grid_column_dsc_array, lv_style_set_grid_row_dsc_array); +static const mp_rom_map_elem_t mp_lv_color_filter_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_filter_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_color_filter_dsc_init_mpobj) }, -/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_row_align */ +}; -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_row_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_row_align); - -/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_pos */ +static MP_DEFINE_CONST_DICT(mp_lv_color_filter_dsc_t_locals_dict, mp_lv_color_filter_dsc_t_locals_dict_table); + -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_pos); - -/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_x_align */ +/* + * Array convertors for lv_style_prop_t [] + */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_x_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_x_align); +GENMPY_UNUSED static lv_style_prop_t *mp_arr_to_lv_style_prop_t_____(mp_obj_t mp_arr) +{ + // A packed buffer is already the C array (lvgl-bindings#37). + if (MP_OBJ_IS_STR_OR_BYTES(mp_arr) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_bytearray) || + MP_OBJ_IS_TYPE(mp_arr, &mp_type_memoryview)) + return mp_to_ptr(mp_arr); + mp_obj_t mp_len = mp_obj_len_maybe(mp_arr); + if (mp_len == MP_OBJ_NULL) return mp_to_ptr(mp_arr); + mp_int_t len = mp_obj_get_int(mp_len); -/* Reusing lv_style_set_width for lv_style_set_grid_cell_column_span */ + lv_style_prop_t *lv_arr = (lv_style_prop_t*)m_malloc(len * sizeof(lv_style_prop_t)); + mp_obj_t iter = mp_getiter(mp_arr, NULL); + mp_obj_t item; + size_t i = 0; + while ((item = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) { + lv_arr[i++] = (uint8_t)mp_obj_get_int(item); + } + return (lv_style_prop_t *)lv_arr; +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_column_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_column_span); - -/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_pos */ +GENMPY_UNUSED static mp_obj_t mp_arr_from_lv_style_prop_t_____(const lv_style_prop_t *arr) +{ + return mp_array_from_u8ptr((void*)arr); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_pos_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_pos); - -/* Reusing lv_style_set_grid_column_align for lv_style_set_grid_cell_y_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_y_align_mpobj, 2, mp_lv_style_set_grid_column_align, lv_style_set_grid_cell_y_align); - -/* Reusing lv_style_set_width for lv_style_set_grid_cell_row_span */ +/* + * Callback function lv_style_transition_dsc_init_path_cb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_init_path_cb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); +} -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_grid_cell_row_span_mpobj, 2, mp_lv_style_set_width, lv_style_set_grid_cell_row_span); - /* * lvgl extension definition for: - * void lv_style_set_size(lv_style_t *style, int32_t width, int32_t height) + * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) */ -static mp_obj_t mp_lv_style_set_size(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +static mp_obj_t mp_lv_style_transition_dsc_init(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) { - lv_style_t *style = mp_write_ptr_lv_style_t(mp_args[0]); - int32_t width = (int32_t)mp_obj_get_int(mp_args[1]); - int32_t height = (int32_t)mp_obj_get_int(mp_args[2]); - ((void (*)(lv_style_t *, int32_t, int32_t))lv_func_ptr)(style, width, height); + void *user_data = mp_to_ptr(mp_args[5]); + const lv_style_prop_t *props = (const lv_style_prop_t *)mp_arr_to_lv_style_prop_t_____(mp_args[1]); + void *path_cb = mp_lv_callback(mp_args[2], &lv_style_transition_dsc_init_path_cb_callback, MP_QSTR_lv_style_transition_dsc_init_path_cb, &user_data, NULL, (mp_lv_get_user_data)NULL, (mp_lv_set_user_data)NULL); + uint32_t time = (uint32_t)mp_obj_get_int(mp_args[3]); + uint32_t delay = (uint32_t)mp_obj_get_int(mp_args[4]); + lv_style_transition_dsc_t *tr = mp_write_ptr_lv_style_transition_dsc_t(mp_args[0]); + ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_func_ptr)(tr, props, path_cb, time, delay, user_data); return mp_const_none; } -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_size_mpobj, 3, mp_lv_style_set_size, lv_style_set_size); - -/* Reusing lv_style_set_width for lv_style_set_pad_all */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_all); - -/* Reusing lv_style_set_width for lv_style_set_pad_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_hor); - -/* Reusing lv_style_set_width for lv_style_set_pad_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_ver); - -/* Reusing lv_style_set_width for lv_style_set_pad_gap */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_pad_gap_mpobj, 2, mp_lv_style_set_width, lv_style_set_pad_gap); - -/* Reusing lv_style_set_width for lv_style_set_margin_hor */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_hor_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_hor); - -/* Reusing lv_style_set_width for lv_style_set_margin_ver */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_ver_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_ver); - -/* Reusing lv_style_set_width for lv_style_set_margin_all */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_margin_all_mpobj, 2, mp_lv_style_set_width, lv_style_set_margin_all); - -/* Reusing lv_style_set_width for lv_style_set_transform_scale */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_set_transform_scale_mpobj, 2, mp_lv_style_set_width, lv_style_set_transform_scale); - - -static const mp_rom_map_elem_t mp_lv_style_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_t))) }, - { MP_ROM_QSTR(MP_QSTR_is_const_internal), MP_ROM_PTR(&mp_lv_style_is_const_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prop_internal), MP_ROM_PTR(&mp_lv_style_get_prop_internal_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_init_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&mp_lv_style_reset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_copy), MP_ROM_PTR(&mp_lv_style_copy_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_merge), MP_ROM_PTR(&mp_lv_style_merge_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_const), MP_ROM_PTR(&mp_lv_style_is_const_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_remove_prop), MP_ROM_PTR(&mp_lv_style_remove_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_prop), MP_ROM_PTR(&mp_lv_style_set_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_get_prop), MP_ROM_PTR(&mp_lv_style_get_prop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_is_empty), MP_ROM_PTR(&mp_lv_style_is_empty_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_width), MP_ROM_PTR(&mp_lv_style_set_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_width), MP_ROM_PTR(&mp_lv_style_set_min_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_width), MP_ROM_PTR(&mp_lv_style_set_max_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_height), MP_ROM_PTR(&mp_lv_style_set_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_min_height), MP_ROM_PTR(&mp_lv_style_set_min_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_max_height), MP_ROM_PTR(&mp_lv_style_set_max_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_length), MP_ROM_PTR(&mp_lv_style_set_length_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_x), MP_ROM_PTR(&mp_lv_style_set_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_y), MP_ROM_PTR(&mp_lv_style_set_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_align), MP_ROM_PTR(&mp_lv_style_set_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_width), MP_ROM_PTR(&mp_lv_style_set_transform_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_height), MP_ROM_PTR(&mp_lv_style_set_transform_height_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_translate_x), MP_ROM_PTR(&mp_lv_style_set_translate_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_translate_y), MP_ROM_PTR(&mp_lv_style_set_translate_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_translate_radial), MP_ROM_PTR(&mp_lv_style_set_translate_radial_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale_x), MP_ROM_PTR(&mp_lv_style_set_transform_scale_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale_y), MP_ROM_PTR(&mp_lv_style_set_transform_scale_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_rotation), MP_ROM_PTR(&mp_lv_style_set_transform_rotation_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_x), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_pivot_y), MP_ROM_PTR(&mp_lv_style_set_transform_pivot_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_skew_x), MP_ROM_PTR(&mp_lv_style_set_transform_skew_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_skew_y), MP_ROM_PTR(&mp_lv_style_set_transform_skew_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_top), MP_ROM_PTR(&mp_lv_style_set_pad_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_bottom), MP_ROM_PTR(&mp_lv_style_set_pad_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_left), MP_ROM_PTR(&mp_lv_style_set_pad_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_right), MP_ROM_PTR(&mp_lv_style_set_pad_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_row), MP_ROM_PTR(&mp_lv_style_set_pad_row_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_column), MP_ROM_PTR(&mp_lv_style_set_pad_column_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_radial), MP_ROM_PTR(&mp_lv_style_set_pad_radial_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_top), MP_ROM_PTR(&mp_lv_style_set_margin_top_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_bottom), MP_ROM_PTR(&mp_lv_style_set_margin_bottom_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_left), MP_ROM_PTR(&mp_lv_style_set_margin_left_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_right), MP_ROM_PTR(&mp_lv_style_set_margin_right_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_color), MP_ROM_PTR(&mp_lv_style_set_bg_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_opa), MP_ROM_PTR(&mp_lv_style_set_bg_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_color), MP_ROM_PTR(&mp_lv_style_set_bg_grad_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_dir), MP_ROM_PTR(&mp_lv_style_set_bg_grad_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_main_stop), MP_ROM_PTR(&mp_lv_style_set_bg_main_stop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_stop), MP_ROM_PTR(&mp_lv_style_set_bg_grad_stop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_main_opa), MP_ROM_PTR(&mp_lv_style_set_bg_main_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad_opa), MP_ROM_PTR(&mp_lv_style_set_bg_grad_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_grad), MP_ROM_PTR(&mp_lv_style_set_bg_grad_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_src), MP_ROM_PTR(&mp_lv_style_set_bg_image_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_bg_image_recolor_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bg_image_tiled), MP_ROM_PTR(&mp_lv_style_set_bg_image_tiled_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_color), MP_ROM_PTR(&mp_lv_style_set_border_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_opa), MP_ROM_PTR(&mp_lv_style_set_border_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_width), MP_ROM_PTR(&mp_lv_style_set_border_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_side), MP_ROM_PTR(&mp_lv_style_set_border_side_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_border_post), MP_ROM_PTR(&mp_lv_style_set_border_post_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_width), MP_ROM_PTR(&mp_lv_style_set_outline_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_color), MP_ROM_PTR(&mp_lv_style_set_outline_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_opa), MP_ROM_PTR(&mp_lv_style_set_outline_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_outline_pad), MP_ROM_PTR(&mp_lv_style_set_outline_pad_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_width), MP_ROM_PTR(&mp_lv_style_set_shadow_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_shadow_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_spread), MP_ROM_PTR(&mp_lv_style_set_shadow_spread_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_color), MP_ROM_PTR(&mp_lv_style_set_shadow_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_shadow_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_opa), MP_ROM_PTR(&mp_lv_style_set_image_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_recolor), MP_ROM_PTR(&mp_lv_style_set_image_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_image_recolor_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_image_colorkey), MP_ROM_PTR(&mp_lv_style_set_image_colorkey_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_width), MP_ROM_PTR(&mp_lv_style_set_line_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_dash_width), MP_ROM_PTR(&mp_lv_style_set_line_dash_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_dash_gap), MP_ROM_PTR(&mp_lv_style_set_line_dash_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_rounded), MP_ROM_PTR(&mp_lv_style_set_line_rounded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_color), MP_ROM_PTR(&mp_lv_style_set_line_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_line_opa), MP_ROM_PTR(&mp_lv_style_set_line_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_width), MP_ROM_PTR(&mp_lv_style_set_arc_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_rounded), MP_ROM_PTR(&mp_lv_style_set_arc_rounded_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_color), MP_ROM_PTR(&mp_lv_style_set_arc_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_opa), MP_ROM_PTR(&mp_lv_style_set_arc_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_arc_image_src), MP_ROM_PTR(&mp_lv_style_set_arc_image_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_color), MP_ROM_PTR(&mp_lv_style_set_text_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_opa), MP_ROM_PTR(&mp_lv_style_set_text_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_font), MP_ROM_PTR(&mp_lv_style_set_text_font_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_letter_space), MP_ROM_PTR(&mp_lv_style_set_text_letter_space_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_line_space), MP_ROM_PTR(&mp_lv_style_set_text_line_space_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_decor), MP_ROM_PTR(&mp_lv_style_set_text_decor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_align), MP_ROM_PTR(&mp_lv_style_set_text_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_color), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_width), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_width_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_outline_stroke_opa), MP_ROM_PTR(&mp_lv_style_set_text_outline_stroke_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_text_leading_trim), MP_ROM_PTR(&mp_lv_style_set_text_leading_trim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blur_radius), MP_ROM_PTR(&mp_lv_style_set_blur_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blur_backdrop), MP_ROM_PTR(&mp_lv_style_set_blur_backdrop_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blur_quality), MP_ROM_PTR(&mp_lv_style_set_blur_quality_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_radius), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_x), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_x_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_offset_y), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_offset_y_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_color), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_color_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_opa), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_drop_shadow_quality), MP_ROM_PTR(&mp_lv_style_set_drop_shadow_quality_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radius), MP_ROM_PTR(&mp_lv_style_set_radius_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_radial_offset), MP_ROM_PTR(&mp_lv_style_set_radial_offset_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_clip_corner), MP_ROM_PTR(&mp_lv_style_set_clip_corner_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_opa), MP_ROM_PTR(&mp_lv_style_set_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_opa_layered), MP_ROM_PTR(&mp_lv_style_set_opa_layered_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_color_filter_dsc), MP_ROM_PTR(&mp_lv_style_set_color_filter_dsc_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_color_filter_opa), MP_ROM_PTR(&mp_lv_style_set_color_filter_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor), MP_ROM_PTR(&mp_lv_style_set_recolor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_recolor_opa), MP_ROM_PTR(&mp_lv_style_set_recolor_opa_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_anim), MP_ROM_PTR(&mp_lv_style_set_anim_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_anim_duration), MP_ROM_PTR(&mp_lv_style_set_anim_duration_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transition), MP_ROM_PTR(&mp_lv_style_set_transition_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_blend_mode), MP_ROM_PTR(&mp_lv_style_set_blend_mode_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_layout), MP_ROM_PTR(&mp_lv_style_set_layout_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_base_dir), MP_ROM_PTR(&mp_lv_style_set_base_dir_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_bitmap_mask_src), MP_ROM_PTR(&mp_lv_style_set_bitmap_mask_src_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_rotary_sensitivity), MP_ROM_PTR(&mp_lv_style_set_rotary_sensitivity_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_flow), MP_ROM_PTR(&mp_lv_style_set_flex_flow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_main_place), MP_ROM_PTR(&mp_lv_style_set_flex_main_place_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_cross_place), MP_ROM_PTR(&mp_lv_style_set_flex_cross_place_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_track_place), MP_ROM_PTR(&mp_lv_style_set_flex_track_place_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_flex_grow), MP_ROM_PTR(&mp_lv_style_set_flex_grow_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_column_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_column_dsc_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_column_align), MP_ROM_PTR(&mp_lv_style_set_grid_column_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_row_dsc_array), MP_ROM_PTR(&mp_lv_style_set_grid_row_dsc_array_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_row_align), MP_ROM_PTR(&mp_lv_style_set_grid_row_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_x_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_x_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_column_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_column_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_pos), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_pos_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_y_align), MP_ROM_PTR(&mp_lv_style_set_grid_cell_y_align_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_grid_cell_row_span), MP_ROM_PTR(&mp_lv_style_set_grid_cell_row_span_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_size), MP_ROM_PTR(&mp_lv_style_set_size_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_all), MP_ROM_PTR(&mp_lv_style_set_pad_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_hor), MP_ROM_PTR(&mp_lv_style_set_pad_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_ver), MP_ROM_PTR(&mp_lv_style_set_pad_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_pad_gap), MP_ROM_PTR(&mp_lv_style_set_pad_gap_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_hor), MP_ROM_PTR(&mp_lv_style_set_margin_hor_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_ver), MP_ROM_PTR(&mp_lv_style_set_margin_ver_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_margin_all), MP_ROM_PTR(&mp_lv_style_set_margin_all_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_set_transform_scale), MP_ROM_PTR(&mp_lv_style_set_transform_scale_mpobj) }, +static MP_DEFINE_CONST_LV_FUN_OBJ_VAR(mp_lv_style_transition_dsc_init_mpobj, 6, mp_lv_style_transition_dsc_init, lv_style_transition_dsc_init); -}; -static MP_DEFINE_CONST_DICT(mp_lv_style_t_locals_dict, mp_lv_style_t_locals_dict_table); - - -static const mp_rom_map_elem_t mp_lv_style_value_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_value_t))) }, +static const mp_rom_map_elem_t mp_lv_style_transition_dsc_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_style_transition_dsc_t))) }, + { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&mp_lv_style_transition_dsc_init_mpobj) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_style_value_t_locals_dict, mp_lv_style_value_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_style_transition_dsc_t_locals_dict, mp_lv_style_transition_dsc_t_locals_dict_table); /* @@ -48745,20 +48010,20 @@ static mp_obj_t mp_lv_sqr(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_fu static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_sqr_mpobj, 1, mp_lv_sqr, lv_sqr); -static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, +static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); -static const mp_rom_map_elem_t mp_lv_hit_test_info_t_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_hit_test_info_t))) }, +static const mp_rom_map_elem_t mp_lv_color_hsv_t_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR___SIZE__), MP_ROM_PTR(MP_ROM_INT(sizeof(lv_color_hsv_t))) }, }; -static MP_DEFINE_CONST_DICT(mp_lv_hit_test_info_t_locals_dict, mp_lv_hit_test_info_t_locals_dict_table); +static MP_DEFINE_CONST_DICT(mp_lv_color_hsv_t_locals_dict, mp_lv_color_hsv_t_locals_dict_table); /* @@ -49034,25 +48299,6 @@ static mp_obj_t mp_lv_color_16_16_mix_inlined(size_t mp_n_args, const mp_obj_t * static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_color_16_16_mix_inlined_mpobj, 3, mp_lv_color_16_16_mix_inlined, lv_color_16_16_mix_inlined); -/* - * lvgl extension definition for: - * inline static void lv_bidi_calculate_align_internal(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) - */ - -static mp_obj_t mp_lv_bidi_calculate_align_internal(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) -{ - lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); - lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); - const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); - ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); - return mp_const_none; -} - - - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_internal_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align_internal); - - /* * lvgl extension definition for: * inline static bool lv_text_is_break_char(uint32_t letter) @@ -50312,9 +49558,24 @@ static mp_obj_t mp_lv_text_get_size(size_t mp_n_args, const mp_obj_t *mp_args, v static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_mpobj, 7, mp_lv_text_get_size, lv_text_get_size); -/* Reusing lv_bidi_calculate_align_internal for lv_bidi_calculate_align */ -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align_internal, lv_bidi_calculate_align); +/* + * lvgl extension definition for: + * void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) + */ + +static mp_obj_t mp_lv_bidi_calculate_align(size_t mp_n_args, const mp_obj_t *mp_args, void *lv_func_ptr) +{ + lv_text_align_t *align = mp_array_to_i32ptr(mp_args[0]); + lv_base_dir_t *base_dir = mp_array_to_i32ptr(mp_args[1]); + const char *txt = (const char *)(char*)convert_from_str(mp_args[2]); + ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_func_ptr)(align, base_dir, txt); + return mp_const_none; +} + + + +static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_bidi_calculate_align_mpobj, 3, mp_lv_bidi_calculate_align, lv_bidi_calculate_align); /* @@ -52553,10 +51814,6 @@ static mp_obj_t mp_lv_text_encoded_letter_next_2(size_t mp_n_args, const mp_obj_ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_encoded_letter_next_2_mpobj, 4, mp_lv_text_encoded_letter_next_2, lv_text_encoded_letter_next_2); -/* Reusing lv_text_get_size for lv_text_get_size_internal */ - -static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_text_get_size_internal_mpobj, 7, mp_lv_text_get_size, lv_text_get_size_internal); - /* * Function NOT generated: @@ -52610,6 +51867,155 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv /* * Functions not generated: + * lv_obj_get_style_width_internal + * lv_obj_get_style_min_width_internal + * lv_obj_get_style_max_width_internal + * lv_obj_get_style_height_internal + * lv_obj_get_style_min_height_internal + * lv_obj_get_style_max_height_internal + * lv_obj_get_style_length_internal + * lv_obj_get_style_x_internal + * lv_obj_get_style_y_internal + * lv_obj_get_style_align_internal + * lv_obj_get_style_transform_width_internal + * lv_obj_get_style_transform_height_internal + * lv_obj_get_style_translate_x_internal + * lv_obj_get_style_translate_y_internal + * lv_obj_get_style_translate_radial_internal + * lv_obj_get_style_transform_scale_x_internal + * lv_obj_get_style_transform_scale_y_internal + * lv_obj_get_style_transform_rotation_internal + * lv_obj_get_style_transform_pivot_x_internal + * lv_obj_get_style_transform_pivot_y_internal + * lv_obj_get_style_transform_skew_x_internal + * lv_obj_get_style_transform_skew_y_internal + * lv_obj_get_style_pad_top_internal + * lv_obj_get_style_pad_bottom_internal + * lv_obj_get_style_pad_left_internal + * lv_obj_get_style_pad_right_internal + * lv_obj_get_style_pad_row_internal + * lv_obj_get_style_pad_column_internal + * lv_obj_get_style_pad_radial_internal + * lv_obj_get_style_margin_top_internal + * lv_obj_get_style_margin_bottom_internal + * lv_obj_get_style_margin_left_internal + * lv_obj_get_style_margin_right_internal + * lv_obj_get_style_bg_color_internal + * lv_obj_get_style_bg_color_filtered_internal + * lv_obj_get_style_bg_opa_internal + * lv_obj_get_style_bg_grad_color_internal + * lv_obj_get_style_bg_grad_color_filtered_internal + * lv_obj_get_style_bg_grad_dir_internal + * lv_obj_get_style_bg_main_stop_internal + * lv_obj_get_style_bg_grad_stop_internal + * lv_obj_get_style_bg_main_opa_internal + * lv_obj_get_style_bg_grad_opa_internal + * lv_obj_get_style_bg_grad_internal + * lv_obj_get_style_bg_image_src_internal + * lv_obj_get_style_bg_image_opa_internal + * lv_obj_get_style_bg_image_recolor_internal + * lv_obj_get_style_bg_image_recolor_filtered_internal + * lv_obj_get_style_bg_image_recolor_opa_internal + * lv_obj_get_style_bg_image_tiled_internal + * lv_obj_get_style_border_color_internal + * lv_obj_get_style_border_color_filtered_internal + * lv_obj_get_style_border_opa_internal + * lv_obj_get_style_border_width_internal + * lv_obj_get_style_border_side_internal + * lv_obj_get_style_border_post_internal + * lv_obj_get_style_outline_width_internal + * lv_obj_get_style_outline_color_internal + * lv_obj_get_style_outline_color_filtered_internal + * lv_obj_get_style_outline_opa_internal + * lv_obj_get_style_outline_pad_internal + * lv_obj_get_style_shadow_width_internal + * lv_obj_get_style_shadow_offset_x_internal + * lv_obj_get_style_shadow_offset_y_internal + * lv_obj_get_style_shadow_spread_internal + * lv_obj_get_style_shadow_color_internal + * lv_obj_get_style_shadow_color_filtered_internal + * lv_obj_get_style_shadow_opa_internal + * lv_obj_get_style_image_opa_internal + * lv_obj_get_style_image_recolor_internal + * lv_obj_get_style_image_recolor_filtered_internal + * lv_obj_get_style_image_recolor_opa_internal + * lv_obj_get_style_image_colorkey_internal + * lv_obj_get_style_line_width_internal + * lv_obj_get_style_line_dash_width_internal + * lv_obj_get_style_line_dash_gap_internal + * lv_obj_get_style_line_rounded_internal + * lv_obj_get_style_line_color_internal + * lv_obj_get_style_line_color_filtered_internal + * lv_obj_get_style_line_opa_internal + * lv_obj_get_style_arc_width_internal + * lv_obj_get_style_arc_rounded_internal + * lv_obj_get_style_arc_color_internal + * lv_obj_get_style_arc_color_filtered_internal + * lv_obj_get_style_arc_opa_internal + * lv_obj_get_style_arc_image_src_internal + * lv_obj_get_style_text_color_internal + * lv_obj_get_style_text_color_filtered_internal + * lv_obj_get_style_text_opa_internal + * lv_obj_get_style_text_font_internal + * lv_obj_get_style_text_letter_space_internal + * lv_obj_get_style_text_line_space_internal + * lv_obj_get_style_text_decor_internal + * lv_obj_get_style_text_align_internal + * lv_obj_get_style_text_outline_stroke_color_internal + * lv_obj_get_style_text_outline_stroke_color_filtered_internal + * lv_obj_get_style_text_outline_stroke_width_internal + * lv_obj_get_style_text_outline_stroke_opa_internal + * lv_obj_get_style_text_leading_trim_internal + * lv_obj_get_style_blur_radius_internal + * lv_obj_get_style_blur_backdrop_internal + * lv_obj_get_style_blur_quality_internal + * lv_obj_get_style_drop_shadow_radius_internal + * lv_obj_get_style_drop_shadow_offset_x_internal + * lv_obj_get_style_drop_shadow_offset_y_internal + * lv_obj_get_style_drop_shadow_color_internal + * lv_obj_get_style_drop_shadow_color_filtered_internal + * lv_obj_get_style_drop_shadow_opa_internal + * lv_obj_get_style_drop_shadow_quality_internal + * lv_obj_get_style_radius_internal + * lv_obj_get_style_radial_offset_internal + * lv_obj_get_style_clip_corner_internal + * lv_obj_get_style_opa_internal + * lv_obj_get_style_opa_layered_internal + * lv_obj_get_style_color_filter_dsc_internal + * lv_obj_get_style_color_filter_opa_internal + * lv_obj_get_style_recolor_internal + * lv_obj_get_style_recolor_opa_internal + * lv_obj_get_style_anim_internal + * lv_obj_get_style_anim_duration_internal + * lv_obj_get_style_transition_internal + * lv_obj_get_style_blend_mode_internal + * lv_obj_get_style_layout_internal + * lv_obj_get_style_base_dir_internal + * lv_obj_get_style_bitmap_mask_src_internal + * lv_obj_get_style_rotary_sensitivity_internal + * lv_obj_get_style_flex_flow_internal + * lv_obj_get_style_flex_main_place_internal + * lv_obj_get_style_flex_cross_place_internal + * lv_obj_get_style_flex_track_place_internal + * lv_obj_get_style_flex_grow_internal + * lv_obj_get_style_grid_column_dsc_array_internal + * lv_obj_get_style_grid_column_align_internal + * lv_obj_get_style_grid_row_dsc_array_internal + * lv_obj_get_style_grid_row_align_internal + * lv_obj_get_style_grid_cell_column_pos_internal + * lv_obj_get_style_grid_cell_x_align_internal + * lv_obj_get_style_grid_cell_column_span_internal + * lv_obj_get_style_grid_cell_row_pos_internal + * lv_obj_get_style_grid_cell_y_align_internal + * lv_obj_get_style_grid_cell_row_span_internal + * lv_obj_calculate_style_text_align_internal + * lv_obj_get_style_space_left_internal + * lv_obj_get_style_space_right_internal + * lv_obj_get_style_space_top_internal + * lv_obj_get_style_space_bottom_internal + * lv_obj_get_style_transform_scale_x_safe_internal + * lv_obj_get_style_transform_scale_y_safe_internal + * lv_bidi_calculate_align_internal * mp_lv_init_gc * mp_lv_deinit_gc * mp_lv_get_roots @@ -52629,27 +52035,28 @@ static MP_DEFINE_CONST_LV_FUN_OBJ_STATIC_VAR(mp_lv_utils_bsearch_mpobj, 5, mp_lv * lv_spangroup_set_span_text_fmt * lv_table_set_cell_value_fmt * lv_global_default + * lv_obj_get_style_prop_internal + * lv_obj_style_apply_color_filter_internal * lv_text_set_text_vfmt + * lv_text_get_size_internal * */ /* - * Callback function lv_font_t_get_glyph_dsc - * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) + * Callback function lv_anim_t_custom_exec_cb + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) */ -GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) +GENMPY_UNUSED static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) { - mp_obj_t mp_args[4]; - mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); - mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_args[3] = mp_obj_new_int_from_uint(arg3); + mp_obj_t mp_args[2]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_args[1] = mp_obj_new_int(arg1); mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_get_glyph_dsc)), 4, mp_args); - return mp_obj_is_true(callback_result); + mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_custom_exec_cb)), 2, mp_args); + return; } @@ -52745,6 +52152,13 @@ GENMPY_UNUSED static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) } +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + */ + + /* * Callback function lv_display_t_flush_wait_cb * void lv_display_flush_wait_cb_t(lv_display_t *disp) @@ -52776,11 +52190,22 @@ GENMPY_UNUSED static void lv_display_t_sync_wait_cb_callback(lv_display_t *arg0) /* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) - * void lv_draw_buf_clear_cb_t(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * Callback function lv_font_t_get_glyph_dsc + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ - + +GENMPY_UNUSED static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) +{ + mp_obj_t mp_args[4]; + mp_args[0] = mp_read_ptr_lv_font_t((void*)arg0); + mp_args[1] = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_args[3] = mp_obj_new_int_from_uint(arg3); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_font_t_get_glyph_dsc)), 4, mp_args); + return mp_obj_is_true(callback_result); +} + /* * Function NOT generated: @@ -52805,54 +52230,6 @@ GENMPY_UNUSED static void lv_font_t_release_glyph_callback(const lv_font_t *arg0 } -/* - * Callback function lv_color_filter_dsc_t_filter_cb - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) - */ - -GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) -{ - mp_obj_t mp_args[3]; - mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - mp_args[1] = mp_read_lv_color_t(arg1); - mp_args[2] = mp_obj_new_int_from_uint(arg2); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_filter_cb)), 3, mp_args); - return mp_write_lv_color_t(callback_result); -} - - -/* - * Callback function lv_anim_t_custom_exec_cb - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) - */ - -GENMPY_UNUSED static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) -{ - mp_obj_t mp_args[2]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_args[1] = mp_obj_new_int(arg1); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_anim_t_custom_exec_cb)), 2, mp_args); - return; -} - - -/* - * Callback function lv_style_transition_dsc_t_path_xcb - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ - -GENMPY_UNUSED static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) -{ - mp_obj_t mp_args[1]; - mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); - mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); - mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_t_path_xcb)), 1, mp_args); - return (int32_t)mp_obj_get_int(callback_result); -} - - /* * Callback function lv_obj_class_t_constructor_cb * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) @@ -52901,6 +52278,38 @@ GENMPY_UNUSED static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t } +/* + * Callback function lv_color_filter_dsc_t_filter_cb + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + */ + +GENMPY_UNUSED static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +{ + mp_obj_t mp_args[3]; + mp_args[0] = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + mp_args[1] = mp_read_lv_color_t(arg1); + mp_args[2] = mp_obj_new_int_from_uint(arg2); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_color_filter_dsc_t_filter_cb)), 3, mp_args); + return mp_write_lv_color_t(callback_result); +} + + +/* + * Callback function lv_style_transition_dsc_t_path_xcb + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ + +GENMPY_UNUSED static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) +{ + mp_obj_t mp_args[1]; + mp_args[0] = mp_read_ptr_lv_anim_t((void*)arg0); + mp_obj_t callbacks = get_callback_dict_from_user_data(arg0->user_data); + mp_obj_t callback_result = mp_lv_nesting_call(mp_obj_dict_get(callbacks, MP_OBJ_NEW_QSTR(MP_QSTR_lv_style_transition_dsc_t_path_xcb)), 1, mp_args); + return (int32_t)mp_obj_get_int(callback_result); +} + + /* * Callback function lv_observer_t_cb * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) @@ -53473,7 +52882,6 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_thread_sync_signal_isr), MP_ROM_PTR(&mp_lv_thread_sync_signal_isr_mpobj) }, { MP_ROM_QSTR(MP_QSTR_thread_sync_delete), MP_ROM_PTR(&mp_lv_thread_sync_delete_mpobj) }, { MP_ROM_QSTR(MP_QSTR_color_16_16_mix_inlined), MP_ROM_PTR(&mp_lv_color_16_16_mix_inlined_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_bidi_calculate_align_internal), MP_ROM_PTR(&mp_lv_bidi_calculate_align_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_break_char), MP_ROM_PTR(&mp_lv_text_is_break_char_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_hanging_space), MP_ROM_PTR(&mp_lv_text_is_hanging_space_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_is_a_word), MP_ROM_PTR(&mp_lv_text_is_a_word_mpobj) }, @@ -53763,7 +53171,6 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_text_ins), MP_ROM_PTR(&mp_lv_text_ins_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_cut), MP_ROM_PTR(&mp_lv_text_cut_mpobj) }, { MP_ROM_QSTR(MP_QSTR_text_encoded_letter_next_2), MP_ROM_PTR(&mp_lv_text_encoded_letter_next_2_mpobj) }, - { MP_ROM_QSTR(MP_QSTR_text_get_size_internal), MP_ROM_PTR(&mp_lv_text_get_size_internal_mpobj) }, { MP_ROM_QSTR(MP_QSTR_utils_bsearch), MP_ROM_PTR(&mp_lv_utils_bsearch_mpobj) }, { MP_ROM_QSTR(MP_QSTR_COORD), MP_ROM_PTR(&mp_lv_ENUM_LV_COORD_type_base) }, @@ -53835,13 +53242,8 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SYMBOL), MP_ROM_PTR(&mp_lv_LV_SYMBOL_type_base) }, { MP_ROM_QSTR(MP_QSTR_C_Pointer), MP_ROM_PTR(&mp_C_Pointer_type) }, - { MP_ROM_QSTR(MP_QSTR_color_t), MP_ROM_PTR(&mp_lv_color_t_type) }, - { MP_ROM_QSTR(MP_QSTR_grad_dsc_t), MP_ROM_PTR(&mp_lv_grad_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_grad_stop_t), MP_ROM_PTR(&mp_lv_grad_stop_t_type) }, - { MP_ROM_QSTR(MP_QSTR_point_t), MP_ROM_PTR(&mp_lv_point_t_type) }, - { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, - { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, - { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, + { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_t), MP_ROM_PTR(&mp_lv_draw_buf_t_type) }, { MP_ROM_QSTR(MP_QSTR_image_header_t), MP_ROM_PTR(&mp_lv_image_header_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_buf_handlers_t), MP_ROM_PTR(&mp_lv_draw_buf_handlers_t_type) }, @@ -53850,20 +53252,25 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_draw_task_t), MP_ROM_PTR(&mp_lv_draw_task_t_type) }, { MP_ROM_QSTR(MP_QSTR_draw_unit_t), MP_ROM_PTR(&mp_lv_draw_unit_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_t), MP_ROM_PTR(&mp_lv_event_t_type) }, - { MP_ROM_QSTR(MP_QSTR_display_t), MP_ROM_PTR(&mp_lv_display_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, { MP_ROM_QSTR(MP_QSTR_ll_t), MP_ROM_PTR(&mp_lv_ll_t_type) }, { MP_ROM_QSTR(MP_QSTR_event_list_t), MP_ROM_PTR(&mp_lv_event_list_t_type) }, { MP_ROM_QSTR(MP_QSTR_array_t), MP_ROM_PTR(&mp_lv_array_t_type) }, { MP_ROM_QSTR(MP_QSTR_theme_t), MP_ROM_PTR(&mp_lv_theme_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_t), MP_ROM_PTR(&mp_lv_color_t_type) }, + { MP_ROM_QSTR(MP_QSTR_font_t), MP_ROM_PTR(&mp_lv_font_t_type) }, + { MP_ROM_QSTR(MP_QSTR_font_glyph_dsc_t), MP_ROM_PTR(&mp_lv_font_glyph_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_timer_t), MP_ROM_PTR(&mp_lv_timer_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color32_t), MP_ROM_PTR(&mp_lv_color32_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, - { MP_ROM_QSTR(MP_QSTR_anim_t), MP_ROM_PTR(&mp_lv_anim_t_type) }, - { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_obj_class_t), MP_ROM_PTR(&mp_lv_obj_class_t_type) }, { MP_ROM_QSTR(MP_QSTR_matrix_t), MP_ROM_PTR(&mp_lv_matrix_t_type) }, + { MP_ROM_QSTR(MP_QSTR_point_t), MP_ROM_PTR(&mp_lv_point_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_t), MP_ROM_PTR(&mp_lv_style_t_type) }, { MP_ROM_QSTR(MP_QSTR_style_value_t), MP_ROM_PTR(&mp_lv_style_value_t_type) }, + { MP_ROM_QSTR(MP_QSTR_grad_dsc_t), MP_ROM_PTR(&mp_lv_grad_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_grad_stop_t), MP_ROM_PTR(&mp_lv_grad_stop_t_type) }, + { MP_ROM_QSTR(MP_QSTR_image_colorkey_t), MP_ROM_PTR(&mp_lv_image_colorkey_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_filter_dsc_t), MP_ROM_PTR(&mp_lv_color_filter_dsc_t_type) }, + { MP_ROM_QSTR(MP_QSTR_style_transition_dsc_t), MP_ROM_PTR(&mp_lv_style_transition_dsc_t_type) }, { MP_ROM_QSTR(MP_QSTR_observer_t), MP_ROM_PTR(&mp_lv_observer_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_t), MP_ROM_PTR(&mp_lv_subject_t_type) }, { MP_ROM_QSTR(MP_QSTR_subject_value_t), MP_ROM_PTR(&mp_lv_subject_value_t_type) }, @@ -53947,8 +53354,8 @@ static const mp_rom_map_elem_t lvgl_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_rb_t), MP_ROM_PTR(&mp_lv_rb_t_type) }, { MP_ROM_QSTR(MP_QSTR_rb_node_t), MP_ROM_PTR(&mp_lv_rb_node_t_type) }, { MP_ROM_QSTR(MP_QSTR_text_attributes_t), MP_ROM_PTR(&mp_lv_text_attributes_t_type) }, - { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_hit_test_info_t), MP_ROM_PTR(&mp_lv_hit_test_info_t_type) }, + { MP_ROM_QSTR(MP_QSTR_color_hsv_t), MP_ROM_PTR(&mp_lv_color_hsv_t_type) }, { MP_ROM_QSTR(MP_QSTR_sqrt_res_t), MP_ROM_PTR(&mp_lv_sqrt_res_t_type) }, diff --git a/generated/lvgl_python.c b/generated/lvgl_python.c index 82ed7a7..a53532f 100644 --- a/generated/lvgl_python.c +++ b/generated/lvgl_python.c @@ -6404,30 +6404,29 @@ static PyMethodDef py_lv_obj_move_background_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_width_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) */ -static PyObject *py_lv_obj_get_style_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *flow_py; + if (!PyArg_ParseTuple(py_args, "O", &flow_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_flex_flow_t flow = (int)mp_obj_get_int(flow_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_width_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_obj_set_flex_flow)(obj, flow); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_width_internal_def = { - "lv_obj_get_style_width_internal", - (PyCFunction)py_lv_obj_get_style_width_internal, +static PyMethodDef py_lv_obj_set_flex_flow_def = { + "lv_obj_set_flex_flow", + (PyCFunction)py_lv_obj_set_flex_flow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6435,30 +6434,31 @@ static PyMethodDef py_lv_obj_get_style_width_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_min_width_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) */ -static PyObject *py_lv_obj_get_style_min_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_flex_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *main_place_py; PyObject *cross_place_py; PyObject *track_cross_place_py; + if (!PyArg_ParseTuple(py_args, "OOO", &main_place_py, &cross_place_py, &track_cross_place_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_flex_align_t main_place = (int)mp_obj_get_int(main_place_py); + lv_flex_align_t cross_place = (int)mp_obj_get_int(cross_place_py); + lv_flex_align_t track_cross_place = (int)mp_obj_get_int(track_cross_place_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_width_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_obj_set_flex_align)(obj, main_place, cross_place, track_cross_place); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_min_width_internal_def = { - "lv_obj_get_style_min_width_internal", - (PyCFunction)py_lv_obj_get_style_min_width_internal, +static PyMethodDef py_lv_obj_set_flex_align_def = { + "lv_obj_set_flex_align", + (PyCFunction)py_lv_obj_set_flex_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6466,30 +6466,29 @@ static PyMethodDef py_lv_obj_get_style_min_width_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_max_width_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) */ -static PyObject *py_lv_obj_get_style_max_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long grow_val; + if (!PyArg_ParseTuple(py_args, "l", &grow_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + uint8_t grow = (uint8_t)grow_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_width_internal)(obj, part); + ((void (*)(lv_obj_t *, uint8_t))lv_obj_set_flex_grow)(obj, grow); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_max_width_internal_def = { - "lv_obj_get_style_max_width_internal", - (PyCFunction)py_lv_obj_get_style_max_width_internal, +static PyMethodDef py_lv_obj_set_flex_grow_def = { + "lv_obj_set_flex_grow", + (PyCFunction)py_lv_obj_set_flex_grow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6497,30 +6496,30 @@ static PyMethodDef py_lv_obj_get_style_max_width_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_height_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) */ -static PyObject *py_lv_obj_get_style_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_grid_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *col_dsc_py; PyObject *row_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &col_dsc_py, &row_dsc_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + const int32_t *col_dsc = (const int32_t *)mp_to_ptr(col_dsc_py); + const int32_t *row_dsc = (const int32_t *)mp_to_ptr(row_dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_height_internal)(obj, part); + ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_obj_set_grid_dsc_array)(obj, col_dsc, row_dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_height_internal_def = { - "lv_obj_get_style_height_internal", - (PyCFunction)py_lv_obj_get_style_height_internal, +static PyMethodDef py_lv_obj_set_grid_dsc_array_def = { + "lv_obj_set_grid_dsc_array", + (PyCFunction)py_lv_obj_set_grid_dsc_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6528,30 +6527,30 @@ static PyMethodDef py_lv_obj_get_style_height_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_min_height_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) */ -static PyObject *py_lv_obj_get_style_min_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_grid_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *column_align_py; PyObject *row_align_py; + if (!PyArg_ParseTuple(py_args, "OO", &column_align_py, &row_align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); + lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_height_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_obj_set_grid_align)(obj, column_align, row_align); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_min_height_internal_def = { - "lv_obj_get_style_min_height_internal", - (PyCFunction)py_lv_obj_get_style_min_height_internal, +static PyMethodDef py_lv_obj_set_grid_align_def = { + "lv_obj_set_grid_align", + (PyCFunction)py_lv_obj_set_grid_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6559,30 +6558,34 @@ static PyMethodDef py_lv_obj_get_style_min_height_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_max_height_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) */ -static PyObject *py_lv_obj_get_style_max_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_grid_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *column_align_py; long col_pos_val; long col_span_val; PyObject *row_align_py; long row_pos_val; long row_span_val; + if (!PyArg_ParseTuple(py_args, "OllOll", &column_align_py, &col_pos_val, &col_span_val, &row_align_py, &row_pos_val, &row_span_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); + int32_t col_pos = (int32_t)col_pos_val; + int32_t col_span = (int32_t)col_span_val; + lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); + int32_t row_pos = (int32_t)row_pos_val; + int32_t row_span = (int32_t)row_span_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_height_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_obj_set_grid_cell)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_max_height_internal_def = { - "lv_obj_get_style_max_height_internal", - (PyCFunction)py_lv_obj_get_style_max_height_internal, +static PyMethodDef py_lv_obj_set_grid_cell_def = { + "lv_obj_set_grid_cell", + (PyCFunction)py_lv_obj_set_grid_cell, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6590,30 +6593,27 @@ static PyMethodDef py_lv_obj_get_style_max_height_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_length_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_delete(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_length_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_length_internal)(obj, part); + ((void (*)(lv_obj_t *))lv_obj_delete)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_length_internal_def = { - "lv_obj_get_style_length_internal", - (PyCFunction)py_lv_obj_get_style_length_internal, +static PyMethodDef py_lv_obj_delete_def = { + "lv_obj_delete", + (PyCFunction)py_lv_obj_delete, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6621,30 +6621,27 @@ static PyMethodDef py_lv_obj_get_style_length_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_x_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_clean(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_clean(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_x_internal)(obj, part); + ((void (*)(lv_obj_t *))lv_obj_clean)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_x_internal_def = { - "lv_obj_get_style_x_internal", - (PyCFunction)py_lv_obj_get_style_x_internal, +static PyMethodDef py_lv_obj_clean_def = { + "lv_obj_clean", + (PyCFunction)py_lv_obj_clean, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -6652,619 +6649,540 @@ static PyMethodDef py_lv_obj_get_style_x_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_y_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) */ -static PyObject *py_lv_obj_get_style_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_delete_delayed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long delay_ms_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_ms_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + uint32_t delay_ms = (uint32_t)delay_ms_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_y_internal)(obj, part); + ((void (*)(lv_obj_t *, uint32_t))lv_obj_delete_delayed)(obj, delay_ms); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_y_internal_def = { - "lv_obj_get_style_y_internal", - (PyCFunction)py_lv_obj_get_style_y_internal, +static PyMethodDef py_lv_obj_delete_delayed_def = { + "lv_obj_delete_delayed", + (PyCFunction)py_lv_obj_delete_delayed, METH_VARARGS | METH_KEYWORDS, NULL }; +#define funcptr_lv_anim_exec_xcb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + /* - * lvgl extension definition for: - * inline static lv_align_t lv_obj_get_style_align_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_anim_t_exec_cb' + * lv_anim_exec_xcb_t exec_cb */ -static PyObject *py_lv_obj_get_style_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_align_t _res; - lvpy_lock(); - _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_align_internal)(obj, part); - lvpy_unlock(); - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} +#define funcptr_lv_anim_custom_exec_cb_t NULL -static PyMethodDef py_lv_obj_get_style_align_internal_def = { - "lv_obj_get_style_align_internal", - (PyCFunction)py_lv_obj_get_style_align_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); +#define funcptr_lv_anim_start_cb_t NULL -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_width_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_width_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} +static inline PyObject *mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -static PyMethodDef py_lv_obj_get_style_transform_width_internal_def = { - "lv_obj_get_style_transform_width_internal", - (PyCFunction)py_lv_obj_get_style_transform_width_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static void lv_anim_t_start_cb_callback(lv_anim_t *); +static void lv_anim_t_completed_cb_callback(lv_anim_t *); +static void lv_anim_t_deleted_cb_callback(lv_anim_t *); +#define funcptr_lv_anim_get_value_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); +static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); +typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_height_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_anim_bezier3_para_t (CPython) */ -static PyObject *py_lv_obj_get_style_transform_height_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_anim_bezier3_para_t_methods[]; + +static PyObject *py_lv_anim_bezier3_para_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_height_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "x1") == 0) return mp_obj_new_int(data->x1); + if (strcmp(attr, "y1") == 0) return mp_obj_new_int(data->y1); + if (strcmp(attr, "x2") == 0) return mp_obj_new_int(data->x2); + if (strcmp(attr, "y2") == 0) return mp_obj_new_int(data->y2); + for (PyMethodDef *m = py_lv_anim_bezier3_para_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_transform_height_internal_def = { - "lv_obj_get_style_transform_height_internal", - (PyCFunction)py_lv_obj_get_style_transform_height_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_anim_bezier3_para_t_field_names[] = {"x1", "y1", "x2", "y2", NULL}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_translate_x_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_translate_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_bezier3_para_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_x_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_anim_bezier3_para_t_field_names, py_lv_anim_bezier3_para_t_methods); } -static PyMethodDef py_lv_obj_get_style_translate_x_internal_def = { - "lv_obj_get_style_translate_x_internal", - (PyCFunction)py_lv_obj_get_style_translate_x_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_anim_bezier3_para_t_type_methods[] = { + {"__dir__", py_lv_anim_bezier3_para_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_translate_y_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_translate_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_anim_bezier3_para_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_y_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_anim_bezier3_para_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "x1") == 0) { data->x1 = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y1") == 0) { data->y1 = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x2") == 0) { data->x2 = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y2") == 0) { data->y2 = (int16_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_anim_bezier3_para_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_obj_get_style_translate_y_internal_def = { - "lv_obj_get_style_translate_y_internal", - (PyCFunction)py_lv_obj_get_style_translate_y_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_anim_bezier3_para_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_bezier3_para_t)); +} -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_translate_radial_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_translate_radial_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_anim_bezier3_para_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_radial_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_translate_radial_internal_def = { - "lv_obj_get_style_translate_radial_internal", - (PyCFunction)py_lv_obj_get_style_translate_radial_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_anim_bezier3_para_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_anim_bezier3_para_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_anim_bezier3_para_t_dealloc, + .tp_getattro = (getter)py_lv_anim_bezier3_para_t_getattro, + .tp_setattro = (setter)py_lv_anim_bezier3_para_t_setattro, + .tp_new = py_lv_anim_bezier3_para_t_new, + .tp_methods = py_lv_anim_bezier3_para_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_x_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_scale_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_anim_bezier3_para_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_anim_bezier3_para_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_bezier3_para_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_anim_bezier3_para_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_transform_scale_x_internal_def = { - "lv_obj_get_style_transform_scale_x_internal", - (PyCFunction)py_lv_obj_get_style_transform_scale_x_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_anim_bezier3_para_t mp_write_scratch_lv_anim_bezier3_para_t; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_y_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_scale_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_anim_bezier3_para_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_bezier3_para_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_anim_bezier3_para_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_bezier3_para_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_anim_bezier3_para_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_anim_bezier3_para_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_bezier3_para_t or dict, got None"); + } + memset(&mp_write_scratch_lv_anim_bezier3_para_t, 0, sizeof(lv_anim_bezier3_para_t)); + return &mp_write_scratch_lv_anim_bezier3_para_t; } -static PyMethodDef py_lv_obj_get_style_transform_scale_y_internal_def = { - "lv_obj_get_style_transform_scale_y_internal", - (PyCFunction)py_lv_obj_get_style_transform_scale_y_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_anim_bezier3_para_t(struct_obj) (*((lv_anim_bezier3_para_t*)mp_write_value_ptr_lv_anim_bezier3_para_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_rotation_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_rotation_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_anim_bezier3_para_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_rotation_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_anim_bezier3_para_t_type, field); } -static PyMethodDef py_lv_obj_get_style_transform_rotation_internal_def = { - "lv_obj_get_style_transform_rotation_internal", - (PyCFunction)py_lv_obj_get_style_transform_rotation_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_anim_bezier3_para_t(field) lv_to_mp_struct_own(&py_lv_anim_bezier3_para_t_type, copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) +#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) /* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_pivot_x_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_anim_parameter_t (CPython) */ -static PyObject *py_lv_obj_get_style_transform_pivot_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_anim_parameter_t_methods[]; + +static PyObject *py_lv_anim_parameter_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_x_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_parameter_t *data = (lv_anim_parameter_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "bezier3") == 0) return mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); + for (PyMethodDef *m = py_lv_anim_parameter_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_transform_pivot_x_internal_def = { - "lv_obj_get_style_transform_pivot_x_internal", - (PyCFunction)py_lv_obj_get_style_transform_pivot_x_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_anim_parameter_t_field_names[] = {"bezier3", NULL}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_pivot_y_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_pivot_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_parameter_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_y_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_anim_parameter_t_field_names, py_lv_anim_parameter_t_methods); } -static PyMethodDef py_lv_obj_get_style_transform_pivot_y_internal_def = { - "lv_obj_get_style_transform_pivot_y_internal", - (PyCFunction)py_lv_obj_get_style_transform_pivot_y_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_anim_parameter_t_type_methods[] = { + {"__dir__", py_lv_anim_parameter_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_anim_parameter_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_parameter_t *data = (lv_anim_parameter_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_anim_parameter_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "bezier3") == 0) { data->bezier3 = mp_write_lv_anim_bezier3_para_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_anim_parameter_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_skew_x_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_skew_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_parameter_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_x_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_parameter_t)); } -static PyMethodDef py_lv_obj_get_style_transform_skew_x_internal_def = { - "lv_obj_get_style_transform_skew_x_internal", - (PyCFunction)py_lv_obj_get_style_transform_skew_x_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static void py_lv_anim_parameter_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} +PyTypeObject py_lv_anim_parameter_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_anim_parameter_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_anim_parameter_t_dealloc, + .tp_getattro = (getter)py_lv_anim_parameter_t_getattro, + .tp_setattro = (setter)py_lv_anim_parameter_t_setattro, + .tp_new = py_lv_anim_parameter_t_new, + .tp_methods = py_lv_anim_parameter_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_skew_y_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_transform_skew_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_anim_parameter_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_y_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_anim_parameter_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_parameter_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_anim_parameter_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_transform_skew_y_internal_def = { - "lv_obj_get_style_transform_skew_y_internal", - (PyCFunction)py_lv_obj_get_style_transform_skew_y_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_anim_parameter_t mp_write_scratch_lv_anim_parameter_t; + +static inline void* mp_write_value_ptr_lv_anim_parameter_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_parameter_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_anim_parameter_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_parameter_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_anim_parameter_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_anim_parameter_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_parameter_t or dict, got None"); + } + memset(&mp_write_scratch_lv_anim_parameter_t, 0, sizeof(lv_anim_parameter_t)); + return &mp_write_scratch_lv_anim_parameter_t; +} +#define mp_write_lv_anim_parameter_t(struct_obj) (*((lv_anim_parameter_t*)mp_write_value_ptr_lv_anim_parameter_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_top_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_top_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_anim_parameter_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_top_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_anim_parameter_t_type, field); } -static PyMethodDef py_lv_obj_get_style_pad_top_internal_def = { - "lv_obj_get_style_pad_top_internal", - (PyCFunction)py_lv_obj_get_style_pad_top_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_anim_parameter_t(field) lv_to_mp_struct_own(&py_lv_anim_parameter_t_type, copy_buffer(&field, sizeof(lv_anim_parameter_t))) +#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) /* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_bottom_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_anim_t (CPython) */ -static PyObject *py_lv_obj_get_style_pad_bottom_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_anim_t_methods[]; + +static PyObject *py_lv_anim_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_bottom_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_t *data = (lv_anim_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "var") == 0) return ptr_to_mp((void*)data->var); + if (strcmp(attr, "exec_cb") == 0) return mp_lv_funcptr(NULL, data->exec_cb, NULL, "lv_anim_t_exec_cb", NULL); + if (strcmp(attr, "custom_exec_cb") == 0) return mp_lv_funcptr(NULL, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback, "lv_anim_t_custom_exec_cb", data->user_data); + if (strcmp(attr, "start_cb") == 0) return mp_lv_funcptr(NULL, data->start_cb, lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", data->user_data); + if (strcmp(attr, "completed_cb") == 0) return mp_lv_funcptr(NULL, data->completed_cb, lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", data->user_data); + if (strcmp(attr, "deleted_cb") == 0) return mp_lv_funcptr(NULL, data->deleted_cb, lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", data->user_data); + if (strcmp(attr, "get_value_cb") == 0) return mp_lv_funcptr(NULL, data->get_value_cb, lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", data->user_data); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "path_cb") == 0) return mp_lv_funcptr(NULL, data->path_cb, lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", data->user_data); + if (strcmp(attr, "start_value") == 0) return mp_obj_new_int(data->start_value); + if (strcmp(attr, "current_value") == 0) return mp_obj_new_int(data->current_value); + if (strcmp(attr, "end_value") == 0) return mp_obj_new_int(data->end_value); + if (strcmp(attr, "duration") == 0) return mp_obj_new_int(data->duration); + if (strcmp(attr, "act_time") == 0) return mp_obj_new_int(data->act_time); + if (strcmp(attr, "reverse_delay") == 0) return mp_obj_new_int_from_uint(data->reverse_delay); + if (strcmp(attr, "reverse_duration") == 0) return mp_obj_new_int_from_uint(data->reverse_duration); + if (strcmp(attr, "repeat_delay") == 0) return mp_obj_new_int_from_uint(data->repeat_delay); + if (strcmp(attr, "repeat_cnt") == 0) return mp_obj_new_int_from_uint(data->repeat_cnt); + if (strcmp(attr, "parameter") == 0) return mp_read_byref_lv_anim_parameter_t(data->parameter); + if (strcmp(attr, "last_timer_run") == 0) return mp_obj_new_int_from_uint(data->last_timer_run); + if (strcmp(attr, "pause_time") == 0) return mp_obj_new_int_from_uint(data->pause_time); + if (strcmp(attr, "pause_duration") == 0) return mp_obj_new_int_from_uint(data->pause_duration); + if (strcmp(attr, "is_paused") == 0) return mp_obj_new_int_from_uint(data->is_paused); + if (strcmp(attr, "reverse_play_in_progress") == 0) return mp_obj_new_int_from_uint(data->reverse_play_in_progress); + if (strcmp(attr, "run_round") == 0) return mp_obj_new_int_from_uint(data->run_round); + if (strcmp(attr, "start_cb_called") == 0) return mp_obj_new_int_from_uint(data->start_cb_called); + if (strcmp(attr, "early_apply") == 0) return mp_obj_new_int_from_uint(data->early_apply); + for (PyMethodDef *m = py_lv_anim_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_pad_bottom_internal_def = { - "lv_obj_get_style_pad_bottom_internal", - (PyCFunction)py_lv_obj_get_style_pad_bottom_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_anim_t_field_names[] = {"var", "exec_cb", "custom_exec_cb", "start_cb", "completed_cb", "deleted_cb", "get_value_cb", "user_data", "path_cb", "start_value", "current_value", "end_value", "duration", "act_time", "reverse_delay", "reverse_duration", "repeat_delay", "repeat_cnt", "parameter", "last_timer_run", "pause_time", "pause_duration", "is_paused", "reverse_play_in_progress", "run_round", "start_cb_called", "early_apply", NULL}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_left_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_left_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_left_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_anim_t_field_names, py_lv_anim_t_methods); } -static PyMethodDef py_lv_obj_get_style_pad_left_internal_def = { - "lv_obj_get_style_pad_left_internal", - (PyCFunction)py_lv_obj_get_style_pad_left_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_anim_t_type_methods[] = { + {"__dir__", py_lv_anim_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_anim_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_anim_t *data = (lv_anim_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_anim_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "var") == 0) { data->var = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "exec_cb") == 0) { data->exec_cb = mp_lv_callback(value, NULL, "lv_anim_t_exec_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "custom_exec_cb") == 0) { data->custom_exec_cb = mp_lv_callback(value, lv_anim_t_custom_exec_cb_callback, "lv_anim_t_custom_exec_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "start_cb") == 0) { data->start_cb = mp_lv_callback(value, lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "completed_cb") == 0) { data->completed_cb = mp_lv_callback(value, lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "deleted_cb") == 0) { data->deleted_cb = mp_lv_callback(value, lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "get_value_cb") == 0) { data->get_value_cb = mp_lv_callback(value, lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "path_cb") == 0) { data->path_cb = mp_lv_callback(value, lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "start_value") == 0) { data->start_value = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "current_value") == 0) { data->current_value = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "end_value") == 0) { data->end_value = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "duration") == 0) { data->duration = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "act_time") == 0) { data->act_time = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "reverse_delay") == 0) { data->reverse_delay = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "reverse_duration") == 0) { data->reverse_duration = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "repeat_delay") == 0) { data->repeat_delay = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "repeat_cnt") == 0) { data->repeat_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "parameter") == 0) { data->parameter = mp_write_lv_anim_parameter_t(value); result = 0; } + if (strcmp(attr, "last_timer_run") == 0) { data->last_timer_run = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pause_time") == 0) { data->pause_time = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "pause_duration") == 0) { data->pause_duration = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "is_paused") == 0) { data->is_paused = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "reverse_play_in_progress") == 0) { data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "run_round") == 0) { data->run_round = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "start_cb_called") == 0) { data->start_cb_called = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "early_apply") == 0) { data->early_apply = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_anim_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_anim_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_t)); +} -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_right_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_right_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_anim_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_right_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_pad_right_internal_def = { - "lv_obj_get_style_pad_right_internal", - (PyCFunction)py_lv_obj_get_style_pad_right_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_anim_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_anim_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_anim_t_dealloc, + .tp_getattro = (getter)py_lv_anim_t_getattro, + .tp_setattro = (setter)py_lv_anim_t_setattro, + .tp_new = py_lv_anim_t_new, + .tp_methods = py_lv_anim_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; +static inline void* mp_write_ptr_lv_anim_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_anim_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_anim_t*)self->data; +} + +static lv_anim_t mp_write_scratch_lv_anim_t; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_row_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_row_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_anim_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_row_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_anim_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_anim_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_anim_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_t or dict, got None"); + } + memset(&mp_write_scratch_lv_anim_t, 0, sizeof(lv_anim_t)); + return &mp_write_scratch_lv_anim_t; } -static PyMethodDef py_lv_obj_get_style_pad_row_internal_def = { - "lv_obj_get_style_pad_row_internal", - (PyCFunction)py_lv_obj_get_style_pad_row_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_write_lv_anim_t(struct_obj) (*((lv_anim_t*)mp_write_value_ptr_lv_anim_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_anim_t(void *field) +{ + return lv_to_mp_struct(&py_lv_anim_t_type, field); +} + +#define mp_read_lv_anim_t(field) lv_to_mp_struct_own(&py_lv_anim_t_type, copy_buffer(&field, sizeof(lv_anim_t))) +#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_column_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_delete_anim_completed_cb(lv_anim_t *a) */ -static PyObject *py_lv_obj_get_style_pad_column_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_delete_anim_completed_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + PyObject *a_py; + if (!PyArg_ParseTuple(py_args, "O", &a_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = mp_write_ptr_lv_anim_t(a_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_column_internal)(obj, part); + ((void (*)(lv_anim_t *))lv_obj_delete_anim_completed_cb)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_pad_column_internal_def = { - "lv_obj_get_style_pad_column_internal", - (PyCFunction)py_lv_obj_get_style_pad_column_internal, +static PyMethodDef py_lv_obj_delete_anim_completed_cb_def = { + "lv_obj_delete_anim_completed_cb", + (PyCFunction)py_lv_obj_delete_anim_completed_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7272,30 +7190,27 @@ static PyMethodDef py_lv_obj_get_style_pad_column_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_pad_radial_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_delete_async(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_pad_radial_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_delete_async(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_radial_internal)(obj, part); + ((void (*)(lv_obj_t *))lv_obj_delete_async)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_pad_radial_internal_def = { - "lv_obj_get_style_pad_radial_internal", - (PyCFunction)py_lv_obj_get_style_pad_radial_internal, +static PyMethodDef py_lv_obj_delete_async_def = { + "lv_obj_delete_async", + (PyCFunction)py_lv_obj_delete_async, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7303,30 +7218,29 @@ static PyMethodDef py_lv_obj_get_style_pad_radial_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_top_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) */ -static PyObject *py_lv_obj_get_style_margin_top_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_parent(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_obj_t *parent = mp_to_lv(parent_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_top_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_obj_set_parent)(obj, parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_margin_top_internal_def = { - "lv_obj_get_style_margin_top_internal", - (PyCFunction)py_lv_obj_get_style_margin_top_internal, +static PyMethodDef py_lv_obj_set_parent_def = { + "lv_obj_set_parent", + (PyCFunction)py_lv_obj_set_parent, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7334,30 +7248,29 @@ static PyMethodDef py_lv_obj_get_style_margin_top_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_bottom_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_swap(lv_obj_t *obj1, lv_obj_t *obj2) */ -static PyObject *py_lv_obj_get_style_margin_bottom_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_swap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + PyObject *obj2_py; + if (!PyArg_ParseTuple(py_args, "O", &obj2_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj1 = mp_to_lv(self); + lv_obj_t *obj2 = mp_to_lv(obj2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_bottom_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_obj_swap)(obj1, obj2); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_margin_bottom_internal_def = { - "lv_obj_get_style_margin_bottom_internal", - (PyCFunction)py_lv_obj_get_style_margin_bottom_internal, +static PyMethodDef py_lv_obj_swap_def = { + "lv_obj_swap", + (PyCFunction)py_lv_obj_swap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7365,30 +7278,29 @@ static PyMethodDef py_lv_obj_get_style_margin_bottom_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_left_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) */ -static PyObject *py_lv_obj_get_style_margin_left_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_move_to_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t index = (int32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_left_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_move_to_index)(obj, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_margin_left_internal_def = { - "lv_obj_get_style_margin_left_internal", - (PyCFunction)py_lv_obj_get_style_margin_left_internal, +static PyMethodDef py_lv_obj_move_to_index_def = { + "lv_obj_move_to_index", + (PyCFunction)py_lv_obj_move_to_index, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -7396,82 +7308,84 @@ static PyMethodDef py_lv_obj_get_style_margin_left_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_margin_right_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_margin_right_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_screen(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_right_internal)(obj, part); + _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_obj_get_screen)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_margin_right_internal_def = { - "lv_obj_get_style_margin_right_internal", - (PyCFunction)py_lv_obj_get_style_margin_right_internal, +static PyMethodDef py_lv_obj_get_screen_def = { + "lv_obj_get_screen", + (PyCFunction)py_lv_obj_get_screen, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_color_t (CPython) + * Struct lv_image_header_t (CPython) */ -extern PyMethodDef py_lv_color_t_methods[]; +extern PyMethodDef py_lv_image_header_t_methods[]; -static PyObject *py_lv_color_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_image_header_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_t *data = (lv_color_t*)inst->data; + lv_image_header_t *data = (lv_image_header_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "blue") == 0) return mp_obj_new_int_from_uint(data->blue); - if (strcmp(attr, "green") == 0) return mp_obj_new_int_from_uint(data->green); - if (strcmp(attr, "red") == 0) return mp_obj_new_int_from_uint(data->red); - for (PyMethodDef *m = py_lv_color_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "magic") == 0) return mp_obj_new_int_from_uint(data->magic); + if (strcmp(attr, "cf") == 0) return mp_obj_new_int_from_uint(data->cf); + if (strcmp(attr, "flags") == 0) return mp_obj_new_int_from_uint(data->flags); + if (strcmp(attr, "w") == 0) return mp_obj_new_int_from_uint(data->w); + if (strcmp(attr, "h") == 0) return mp_obj_new_int_from_uint(data->h); + if (strcmp(attr, "stride") == 0) return mp_obj_new_int_from_uint(data->stride); + if (strcmp(attr, "reserved_2") == 0) return mp_obj_new_int_from_uint(data->reserved_2); + for (PyMethodDef *m = py_lv_image_header_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_color_t_field_names[] = {"blue", "green", "red", NULL}; +static const char *const py_lv_image_header_t_field_names[] = {"magic", "cf", "flags", "w", "h", "stride", "reserved_2", NULL}; -static PyObject *py_lv_color_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_image_header_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_color_t_field_names, py_lv_color_t_methods); + return lvpy_struct_dir(self, py_lv_image_header_t_field_names, py_lv_image_header_t_methods); } -static PyMethodDef py_lv_color_t_type_methods[] = { - {"__dir__", py_lv_color_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_image_header_t_type_methods[] = { + {"__dir__", py_lv_image_header_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_color_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_image_header_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_t *data = (lv_color_t*)inst->data; + lv_image_header_t *data = (lv_image_header_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -7479,444 +7393,227 @@ static int py_lv_color_t_setattro(PyObject *self, PyObject *name, PyObject *valu const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_color_t saved; + lv_image_header_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "blue") == 0) { data->blue = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "green") == 0) { data->green = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "red") == 0) { data->red = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "magic") == 0) { data->magic = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "cf") == 0) { data->cf = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "flags") == 0) { data->flags = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "w") == 0) { data->w = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "h") == 0) { data->h = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "stride") == 0) { data->stride = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "reserved_2") == 0) { data->reserved_2 = (uint32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_color_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_image_header_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_color_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_image_header_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_color_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_image_header_t)); } -static void py_lv_color_t_dealloc(py_lv_struct_t *self) +static void py_lv_image_header_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_color_t_type = { +PyTypeObject py_lv_image_header_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_color_t", + .tp_name = "lvgl.lv_image_header_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_color_t_dealloc, - .tp_getattro = (getter)py_lv_color_t_getattro, - .tp_setattro = (setter)py_lv_color_t_setattro, - .tp_new = py_lv_color_t_new, - .tp_methods = py_lv_color_t_type_methods, + .tp_dealloc = (destructor)py_lv_image_header_t_dealloc, + .tp_getattro = (getter)py_lv_image_header_t_getattro, + .tp_setattro = (setter)py_lv_image_header_t_setattro, + .tp_new = py_lv_image_header_t_new, + .tp_methods = py_lv_image_header_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_color_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_image_header_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_color_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_image_header_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_header_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_color_t*)self->data; + return (lv_image_header_t*)self->data; } -static lv_color_t mp_write_scratch_lv_color_t; +static lv_image_header_t mp_write_scratch_lv_image_header_t; -static inline void* mp_write_value_ptr_lv_color_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_image_header_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_header_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_color_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_t)); + memcpy(&mp_write_scratch_lv_image_header_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_header_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_color_t; + return &mp_write_scratch_lv_image_header_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_color_t(value); + void *p = mp_write_ptr_lv_image_header_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_header_t or dict, got None"); } - memset(&mp_write_scratch_lv_color_t, 0, sizeof(lv_color_t)); - return &mp_write_scratch_lv_color_t; -} - -#define mp_write_lv_color_t(struct_obj) (*((lv_color_t*)mp_write_value_ptr_lv_color_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_color_t(void *field) -{ - return lv_to_mp_struct(&py_lv_color_t_type, field); + memset(&mp_write_scratch_lv_image_header_t, 0, sizeof(lv_image_header_t)); + return &mp_write_scratch_lv_image_header_t; } -#define mp_read_lv_color_t(field) lv_to_mp_struct_own(&py_lv_color_t_type, copy_buffer(&field, sizeof(lv_color_t))) -#define mp_read_byref_lv_color_t(field) mp_read_ptr_lv_color_t(&field) - +#define mp_write_lv_image_header_t(struct_obj) (*((lv_image_header_t*)mp_write_value_ptr_lv_image_header_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_image_header_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp_struct(&py_lv_image_header_t_type, field); } -static PyMethodDef py_lv_obj_get_style_bg_color_internal_def = { - "lv_obj_get_style_bg_color_internal", - (PyCFunction)py_lv_obj_get_style_bg_color_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_read_lv_image_header_t(field) lv_to_mp_struct_own(&py_lv_image_header_t_type, copy_buffer(&field, sizeof(lv_image_header_t))) +#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); -} +#define funcptr_lv_draw_buf_malloc_cb_t NULL -static PyMethodDef py_lv_obj_get_style_bg_color_filtered_internal_def = { - "lv_obj_get_style_bg_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_bg_color_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_opa_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_malloc_cb' + * lv_draw_buf_malloc_cb_t buf_malloc_cb */ -static PyObject *py_lv_obj_get_style_bg_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} +#define funcptr_lv_draw_buf_free_cb_t NULL -static PyMethodDef py_lv_obj_get_style_bg_opa_internal_def = { - "lv_obj_get_style_bg_opa_internal", - (PyCFunction)py_lv_obj_get_style_bg_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_grad_color_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_free_cb' + * lv_draw_buf_free_cb_t buf_free_cb */ -static PyObject *py_lv_obj_get_style_bg_grad_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); -} +#define funcptr_lv_draw_buf_copy_cb_t NULL -static PyMethodDef py_lv_obj_get_style_bg_grad_color_internal_def = { - "lv_obj_get_style_bg_grad_color_internal", - (PyCFunction)py_lv_obj_get_style_bg_grad_color_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_grad_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_copy_cb' + * lv_draw_buf_copy_cb_t buf_copy_cb */ -static PyObject *py_lv_obj_get_style_bg_grad_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); -} +#define funcptr_lv_draw_buf_align_cb_t NULL -static PyMethodDef py_lv_obj_get_style_bg_grad_color_filtered_internal_def = { - "lv_obj_get_style_bg_grad_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static lv_grad_dir_t lv_obj_get_style_bg_grad_dir_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_align_pointer_cb' + * lv_draw_buf_align_cb_t align_pointer_cb */ -static PyObject *py_lv_obj_get_style_bg_grad_dir_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_grad_dir_t _res; - lvpy_lock(); - _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_dir_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} +#define funcptr_lv_draw_buf_cache_operation_cb_t NULL -static PyMethodDef py_lv_obj_get_style_bg_grad_dir_internal_def = { - "lv_obj_get_style_bg_grad_dir_internal", - (PyCFunction)py_lv_obj_get_style_bg_grad_dir_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_bg_main_stop_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_invalidate_cache_cb' + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb */ -static PyObject *py_lv_obj_get_style_bg_main_stop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_stop_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_bg_main_stop_internal_def = { - "lv_obj_get_style_bg_main_stop_internal", - (PyCFunction)py_lv_obj_get_style_bg_main_stop_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_bg_grad_stop_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_flush_cache_cb' + * lv_draw_buf_cache_operation_cb_t flush_cache_cb */ -static PyObject *py_lv_obj_get_style_bg_grad_stop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_stop_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} +#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL -static PyMethodDef py_lv_obj_get_style_bg_grad_stop_internal_def = { - "lv_obj_get_style_bg_grad_stop_internal", - (PyCFunction)py_lv_obj_get_style_bg_grad_stop_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_main_opa_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_width_to_stride_cb' + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb */ -static PyObject *py_lv_obj_get_style_bg_main_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} +#define funcptr_lv_draw_buf_clear_cb_t NULL -static PyMethodDef py_lv_obj_get_style_bg_main_opa_internal_def = { - "lv_obj_get_style_bg_main_opa_internal", - (PyCFunction)py_lv_obj_get_style_bg_main_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_grad_opa_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_clear_cb' + * lv_draw_buf_clear_cb_t buf_clear_cb */ -static PyObject *py_lv_obj_get_style_bg_grad_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} - -static PyMethodDef py_lv_obj_get_style_bg_grad_opa_internal_def = { - "lv_obj_get_style_bg_grad_opa_internal", - (PyCFunction)py_lv_obj_get_style_bg_grad_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* - * Struct lv_grad_stop_t (CPython) + * Struct lv_draw_buf_handlers_t (CPython) */ -extern PyMethodDef py_lv_grad_stop_t_methods[]; +extern PyMethodDef py_lv_draw_buf_handlers_t_methods[]; -static PyObject *py_lv_grad_stop_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_buf_handlers_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_stop_t *data = (lv_grad_stop_t*)inst->data; + lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "frac") == 0) return mp_obj_new_int_from_uint(data->frac); - for (PyMethodDef *m = py_lv_grad_stop_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "buf_malloc_cb") == 0) return mp_lv_funcptr(NULL, data->buf_malloc_cb, NULL, "lv_draw_buf_handlers_t_buf_malloc_cb", NULL); + if (strcmp(attr, "buf_free_cb") == 0) return mp_lv_funcptr(NULL, data->buf_free_cb, NULL, "lv_draw_buf_handlers_t_buf_free_cb", NULL); + if (strcmp(attr, "buf_copy_cb") == 0) return mp_lv_funcptr(NULL, data->buf_copy_cb, NULL, "lv_draw_buf_handlers_t_buf_copy_cb", NULL); + if (strcmp(attr, "align_pointer_cb") == 0) return mp_lv_funcptr(NULL, data->align_pointer_cb, NULL, "lv_draw_buf_handlers_t_align_pointer_cb", NULL); + if (strcmp(attr, "invalidate_cache_cb") == 0) return mp_lv_funcptr(NULL, data->invalidate_cache_cb, NULL, "lv_draw_buf_handlers_t_invalidate_cache_cb", NULL); + if (strcmp(attr, "flush_cache_cb") == 0) return mp_lv_funcptr(NULL, data->flush_cache_cb, NULL, "lv_draw_buf_handlers_t_flush_cache_cb", NULL); + if (strcmp(attr, "width_to_stride_cb") == 0) return mp_lv_funcptr(NULL, data->width_to_stride_cb, NULL, "lv_draw_buf_handlers_t_width_to_stride_cb", NULL); + if (strcmp(attr, "buf_clear_cb") == 0) return mp_lv_funcptr(NULL, data->buf_clear_cb, NULL, "lv_draw_buf_handlers_t_buf_clear_cb", NULL); + for (PyMethodDef *m = py_lv_draw_buf_handlers_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_grad_stop_t_field_names[] = {"color", "opa", "frac", NULL}; +static const char *const py_lv_draw_buf_handlers_t_field_names[] = {"buf_malloc_cb", "buf_free_cb", "buf_copy_cb", "align_pointer_cb", "invalidate_cache_cb", "flush_cache_cb", "width_to_stride_cb", "buf_clear_cb", NULL}; -static PyObject *py_lv_grad_stop_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_buf_handlers_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_grad_stop_t_field_names, py_lv_grad_stop_t_methods); + return lvpy_struct_dir(self, py_lv_draw_buf_handlers_t_field_names, py_lv_draw_buf_handlers_t_methods); } -static PyMethodDef py_lv_grad_stop_t_type_methods[] = { - {"__dir__", py_lv_grad_stop_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_buf_handlers_t_type_methods[] = { + {"__dir__", py_lv_draw_buf_handlers_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_grad_stop_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_buf_handlers_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_stop_t *data = (lv_grad_stop_t*)inst->data; + lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -7924,135 +7621,141 @@ static int py_lv_grad_stop_t_setattro(PyObject *self, PyObject *name, PyObject * const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_grad_stop_t saved; + lv_draw_buf_handlers_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "frac") == 0) { data->frac = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "buf_malloc_cb") == 0) { data->buf_malloc_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_malloc_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "buf_free_cb") == 0) { data->buf_free_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_free_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "buf_copy_cb") == 0) { data->buf_copy_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_copy_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "align_pointer_cb") == 0) { data->align_pointer_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_align_pointer_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "invalidate_cache_cb") == 0) { data->invalidate_cache_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_invalidate_cache_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "flush_cache_cb") == 0) { data->flush_cache_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_flush_cache_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "width_to_stride_cb") == 0) { data->width_to_stride_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_width_to_stride_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "buf_clear_cb") == 0) { data->buf_clear_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_clear_cb", NULL, NULL, NULL, NULL); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_grad_stop_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_buf_handlers_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_grad_stop_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_buf_handlers_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_stop_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_buf_handlers_t)); } -static void py_lv_grad_stop_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_buf_handlers_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_grad_stop_t_type = { +PyTypeObject py_lv_draw_buf_handlers_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_grad_stop_t", + .tp_name = "lvgl.lv_draw_buf_handlers_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_grad_stop_t_dealloc, - .tp_getattro = (getter)py_lv_grad_stop_t_getattro, - .tp_setattro = (setter)py_lv_grad_stop_t_setattro, - .tp_new = py_lv_grad_stop_t_new, - .tp_methods = py_lv_grad_stop_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_buf_handlers_t_dealloc, + .tp_getattro = (getter)py_lv_draw_buf_handlers_t_getattro, + .tp_setattro = (setter)py_lv_draw_buf_handlers_t_setattro, + .tp_new = py_lv_draw_buf_handlers_t_new, + .tp_methods = py_lv_draw_buf_handlers_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_grad_stop_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_buf_handlers_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_grad_stop_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_stop_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_buf_handlers_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_buf_handlers_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_grad_stop_t*)self->data; + return (lv_draw_buf_handlers_t*)self->data; } -static lv_grad_stop_t mp_write_scratch_lv_grad_stop_t; +static lv_draw_buf_handlers_t mp_write_scratch_lv_draw_buf_handlers_t; -static inline void* mp_write_value_ptr_lv_grad_stop_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_buf_handlers_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_stop_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_buf_handlers_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_grad_stop_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_stop_t)); + memcpy(&mp_write_scratch_lv_draw_buf_handlers_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_buf_handlers_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_grad_stop_t; + return &mp_write_scratch_lv_draw_buf_handlers_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_grad_stop_t(value); + void *p = mp_write_ptr_lv_draw_buf_handlers_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_stop_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_buf_handlers_t or dict, got None"); } - memset(&mp_write_scratch_lv_grad_stop_t, 0, sizeof(lv_grad_stop_t)); - return &mp_write_scratch_lv_grad_stop_t; + memset(&mp_write_scratch_lv_draw_buf_handlers_t, 0, sizeof(lv_draw_buf_handlers_t)); + return &mp_write_scratch_lv_draw_buf_handlers_t; } -#define mp_write_lv_grad_stop_t(struct_obj) (*((lv_grad_stop_t*)mp_write_value_ptr_lv_grad_stop_t(struct_obj))) +#define mp_write_lv_draw_buf_handlers_t(struct_obj) (*((lv_draw_buf_handlers_t*)mp_write_value_ptr_lv_draw_buf_handlers_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_grad_stop_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_buf_handlers_t(void *field) { - return lv_to_mp_struct(&py_lv_grad_stop_t_type, field); + return lv_to_mp_struct(&py_lv_draw_buf_handlers_t_type, field); } -#define mp_read_lv_grad_stop_t(field) lv_to_mp_struct_own(&py_lv_grad_stop_t_type, copy_buffer(&field, sizeof(lv_grad_stop_t))) -#define mp_read_byref_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(&field) +#define mp_read_lv_draw_buf_handlers_t(field) lv_to_mp_struct_own(&py_lv_draw_buf_handlers_t_type, copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) +#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) -typedef __typeof__( ((lv_grad_dsc_t*)(0))->params ) lv_grad_dsc_params_t; -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->linear ) lv_grad_dsc_params_linear_t; /* - * Struct lv_point_t (CPython) + * Struct lv_draw_buf_t (CPython) */ -extern PyMethodDef py_lv_point_t_methods[]; +extern PyMethodDef py_lv_draw_buf_t_methods[]; -static PyObject *py_lv_point_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_buf_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_point_t *data = (lv_point_t*)inst->data; + lv_draw_buf_t *data = (lv_draw_buf_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "x") == 0) return mp_obj_new_int(data->x); - if (strcmp(attr, "y") == 0) return mp_obj_new_int(data->y); - for (PyMethodDef *m = py_lv_point_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); + if (strcmp(attr, "data_size") == 0) return mp_obj_new_int_from_uint(data->data_size); + if (strcmp(attr, "data") == 0) return mp_array_from_u8ptr((void*)data->data); + if (strcmp(attr, "unaligned_data") == 0) return ptr_to_mp((void*)data->unaligned_data); + if (strcmp(attr, "handlers") == 0) return mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); + for (PyMethodDef *m = py_lv_draw_buf_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_point_t_field_names[] = {"x", "y", NULL}; +static const char *const py_lv_draw_buf_t_field_names[] = {"header", "data_size", "data", "unaligned_data", "handlers", NULL}; -static PyObject *py_lv_point_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_buf_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_point_t_field_names, py_lv_point_t_methods); + return lvpy_struct_dir(self, py_lv_draw_buf_t_field_names, py_lv_draw_buf_t_methods); } -static PyMethodDef py_lv_point_t_type_methods[] = { - {"__dir__", py_lv_point_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_buf_t_type_methods[] = { + {"__dir__", py_lv_draw_buf_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_point_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_buf_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_point_t *data = (lv_point_t*)inst->data; + lv_draw_buf_t *data = (lv_draw_buf_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -8060,132 +7763,152 @@ static int py_lv_point_t_setattro(PyObject *self, PyObject *name, PyObject *valu const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_point_t saved; + lv_draw_buf_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "x") == 0) { data->x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y") == 0) { data->y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } + if (strcmp(attr, "data_size") == 0) { data->data_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "data") == 0) { data->data = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "unaligned_data") == 0) { data->unaligned_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "handlers") == 0) { data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_point_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_buf_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_point_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_buf_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_point_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_buf_t)); } -static void py_lv_point_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_buf_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_point_t_type = { +PyTypeObject py_lv_draw_buf_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_point_t", + .tp_name = "lvgl.lv_draw_buf_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_point_t_dealloc, - .tp_getattro = (getter)py_lv_point_t_getattro, - .tp_setattro = (setter)py_lv_point_t_setattro, - .tp_new = py_lv_point_t_new, - .tp_methods = py_lv_point_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_buf_t_dealloc, + .tp_getattro = (getter)py_lv_draw_buf_t_getattro, + .tp_setattro = (setter)py_lv_draw_buf_t_setattro, + .tp_new = py_lv_draw_buf_t_new, + .tp_methods = py_lv_draw_buf_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_point_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_buf_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_point_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_point_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_buf_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_buf_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_point_t*)self->data; + return (lv_draw_buf_t*)self->data; } -static lv_point_t mp_write_scratch_lv_point_t; +static lv_draw_buf_t mp_write_scratch_lv_draw_buf_t; -static inline void* mp_write_value_ptr_lv_point_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_buf_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_point_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_buf_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_point_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_point_t)); + memcpy(&mp_write_scratch_lv_draw_buf_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_buf_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_point_t; + return &mp_write_scratch_lv_draw_buf_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_point_t(value); + void *p = mp_write_ptr_lv_draw_buf_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_point_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_buf_t or dict, got None"); } - memset(&mp_write_scratch_lv_point_t, 0, sizeof(lv_point_t)); - return &mp_write_scratch_lv_point_t; + memset(&mp_write_scratch_lv_draw_buf_t, 0, sizeof(lv_draw_buf_t)); + return &mp_write_scratch_lv_draw_buf_t; } -#define mp_write_lv_point_t(struct_obj) (*((lv_point_t*)mp_write_value_ptr_lv_point_t(struct_obj))) +#define mp_write_lv_draw_buf_t(struct_obj) (*((lv_draw_buf_t*)mp_write_value_ptr_lv_draw_buf_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_point_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_buf_t(void *field) { - return lv_to_mp_struct(&py_lv_point_t_type, field); + return lv_to_mp_struct(&py_lv_draw_buf_t_type, field); } -#define mp_read_lv_point_t(field) lv_to_mp_struct_own(&py_lv_point_t_type, copy_buffer(&field, sizeof(lv_point_t))) -#define mp_read_byref_lv_point_t(field) mp_read_ptr_lv_point_t(&field) +#define mp_read_lv_draw_buf_t(field) lv_to_mp_struct_own(&py_lv_draw_buf_t_type, copy_buffer(&field, sizeof(lv_draw_buf_t))) +#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) +#define funcptr_lv_display_flush_cb_t NULL -/* - * Struct lv_grad_dsc_params_linear_t (CPython) - */ +static inline PyObject *mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -extern PyMethodDef py_lv_grad_dsc_params_linear_t_methods[]; +static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); +#define funcptr_lv_display_flush_wait_cb_t NULL -static PyObject *py_lv_grad_dsc_params_linear_t_getattro(PyObject *self, PyObject *name) +static inline PyObject *mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); +#define funcptr_lv_display_sync_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); +static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); + +/* + * Struct lv_ll_t (CPython) + */ + +extern PyMethodDef py_lv_ll_t_methods[]; + +static PyObject *py_lv_ll_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)inst->data; + lv_ll_t *data = (lv_ll_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "start") == 0) return mp_read_byref_lv_point_t(data->start); - if (strcmp(attr, "end") == 0) return mp_read_byref_lv_point_t(data->end); - for (PyMethodDef *m = py_lv_grad_dsc_params_linear_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "n_size") == 0) return mp_obj_new_int_from_uint(data->n_size); + if (strcmp(attr, "head") == 0) return ptr_to_mp((void*)data->head); + if (strcmp(attr, "tail") == 0) return ptr_to_mp((void*)data->tail); + for (PyMethodDef *m = py_lv_ll_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_grad_dsc_params_linear_t_field_names[] = {"start", "end", NULL}; +static const char *const py_lv_ll_t_field_names[] = {"n_size", "head", "tail", NULL}; -static PyObject *py_lv_grad_dsc_params_linear_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_ll_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_grad_dsc_params_linear_t_field_names, py_lv_grad_dsc_params_linear_t_methods); + return lvpy_struct_dir(self, py_lv_ll_t_field_names, py_lv_ll_t_methods); } -static PyMethodDef py_lv_grad_dsc_params_linear_t_type_methods[] = { - {"__dir__", py_lv_grad_dsc_params_linear_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_ll_t_type_methods[] = { + {"__dir__", py_lv_ll_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_grad_dsc_params_linear_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_ll_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)inst->data; + lv_ll_t *data = (lv_ll_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -8193,135 +7916,135 @@ static int py_lv_grad_dsc_params_linear_t_setattro(PyObject *self, PyObject *nam const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_grad_dsc_params_linear_t saved; + lv_ll_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "start") == 0) { data->start = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "end") == 0) { data->end = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "n_size") == 0) { data->n_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "head") == 0) { data->head = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "tail") == 0) { data->tail = (void*)mp_to_ptr(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_linear_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_ll_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_grad_dsc_params_linear_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_ll_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_linear_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_ll_t)); } -static void py_lv_grad_dsc_params_linear_t_dealloc(py_lv_struct_t *self) +static void py_lv_ll_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_grad_dsc_params_linear_t_type = { +PyTypeObject py_lv_ll_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_grad_dsc_params_linear_t", + .tp_name = "lvgl.lv_ll_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_grad_dsc_params_linear_t_dealloc, - .tp_getattro = (getter)py_lv_grad_dsc_params_linear_t_getattro, - .tp_setattro = (setter)py_lv_grad_dsc_params_linear_t_setattro, - .tp_new = py_lv_grad_dsc_params_linear_t_new, - .tp_methods = py_lv_grad_dsc_params_linear_t_type_methods, + .tp_dealloc = (destructor)py_lv_ll_t_dealloc, + .tp_getattro = (getter)py_lv_ll_t_getattro, + .tp_setattro = (setter)py_lv_ll_t_setattro, + .tp_new = py_lv_ll_t_new, + .tp_methods = py_lv_ll_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_grad_dsc_params_linear_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_ll_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_linear_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_linear_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_ll_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_ll_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_grad_dsc_params_linear_t*)self->data; + return (lv_ll_t*)self->data; } -static lv_grad_dsc_params_linear_t mp_write_scratch_lv_grad_dsc_params_linear_t; +static lv_ll_t mp_write_scratch_lv_ll_t; -static inline void* mp_write_value_ptr_lv_grad_dsc_params_linear_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_ll_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_linear_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_ll_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_grad_dsc_params_linear_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_linear_t)); + memcpy(&mp_write_scratch_lv_ll_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_ll_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_grad_dsc_params_linear_t; + return &mp_write_scratch_lv_ll_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_grad_dsc_params_linear_t(value); + void *p = mp_write_ptr_lv_ll_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_linear_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_ll_t or dict, got None"); } - memset(&mp_write_scratch_lv_grad_dsc_params_linear_t, 0, sizeof(lv_grad_dsc_params_linear_t)); - return &mp_write_scratch_lv_grad_dsc_params_linear_t; + memset(&mp_write_scratch_lv_ll_t, 0, sizeof(lv_ll_t)); + return &mp_write_scratch_lv_ll_t; } -#define mp_write_lv_grad_dsc_params_linear_t(struct_obj) (*((lv_grad_dsc_params_linear_t*)mp_write_value_ptr_lv_grad_dsc_params_linear_t(struct_obj))) +#define mp_write_lv_ll_t(struct_obj) (*((lv_ll_t*)mp_write_value_ptr_lv_ll_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_grad_dsc_params_linear_t(void *field) +static inline PyObject *mp_read_ptr_lv_ll_t(void *field) { - return lv_to_mp_struct(&py_lv_grad_dsc_params_linear_t_type, field); + return lv_to_mp_struct(&py_lv_ll_t_type, field); } -#define mp_read_lv_grad_dsc_params_linear_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_linear_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_linear_t))) -#define mp_read_byref_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(&field) +#define mp_read_lv_ll_t(field) lv_to_mp_struct_own(&py_lv_ll_t_type, copy_buffer(&field, sizeof(lv_ll_t))) +#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->radial ) lv_grad_dsc_params_radial_t; /* - * Struct lv_grad_dsc_params_radial_t (CPython) + * Struct lv_area_t (CPython) */ -extern PyMethodDef py_lv_grad_dsc_params_radial_t_methods[]; +extern PyMethodDef py_lv_area_t_methods[]; -static PyObject *py_lv_grad_dsc_params_radial_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_area_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)inst->data; + lv_area_t *data = (lv_area_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "focal") == 0) return mp_read_byref_lv_point_t(data->focal); - if (strcmp(attr, "focal_extent") == 0) return mp_read_byref_lv_point_t(data->focal_extent); - if (strcmp(attr, "end") == 0) return mp_read_byref_lv_point_t(data->end); - if (strcmp(attr, "end_extent") == 0) return mp_read_byref_lv_point_t(data->end_extent); - for (PyMethodDef *m = py_lv_grad_dsc_params_radial_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "x1") == 0) return mp_obj_new_int(data->x1); + if (strcmp(attr, "y1") == 0) return mp_obj_new_int(data->y1); + if (strcmp(attr, "x2") == 0) return mp_obj_new_int(data->x2); + if (strcmp(attr, "y2") == 0) return mp_obj_new_int(data->y2); + for (PyMethodDef *m = py_lv_area_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_grad_dsc_params_radial_t_field_names[] = {"focal", "focal_extent", "end", "end_extent", NULL}; +static const char *const py_lv_area_t_field_names[] = {"x1", "y1", "x2", "y2", NULL}; -static PyObject *py_lv_grad_dsc_params_radial_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_area_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_grad_dsc_params_radial_t_field_names, py_lv_grad_dsc_params_radial_t_methods); + return lvpy_struct_dir(self, py_lv_area_t_field_names, py_lv_area_t_methods); } -static PyMethodDef py_lv_grad_dsc_params_radial_t_type_methods[] = { - {"__dir__", py_lv_grad_dsc_params_radial_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_area_t_type_methods[] = { + {"__dir__", py_lv_area_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_grad_dsc_params_radial_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_area_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)inst->data; + lv_area_t *data = (lv_area_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -8329,136 +8052,191 @@ static int py_lv_grad_dsc_params_radial_t_setattro(PyObject *self, PyObject *nam const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_grad_dsc_params_radial_t saved; + lv_area_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "focal") == 0) { data->focal = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "focal_extent") == 0) { data->focal_extent = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "end") == 0) { data->end = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "end_extent") == 0) { data->end_extent = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "x1") == 0) { data->x1 = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y1") == 0) { data->y1 = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x2") == 0) { data->x2 = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y2") == 0) { data->y2 = (int32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_radial_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_area_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_grad_dsc_params_radial_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_area_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_radial_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_area_t)); } -static void py_lv_grad_dsc_params_radial_t_dealloc(py_lv_struct_t *self) +static void py_lv_area_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_grad_dsc_params_radial_t_type = { +PyTypeObject py_lv_area_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_grad_dsc_params_radial_t", + .tp_name = "lvgl.lv_area_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_grad_dsc_params_radial_t_dealloc, - .tp_getattro = (getter)py_lv_grad_dsc_params_radial_t_getattro, - .tp_setattro = (setter)py_lv_grad_dsc_params_radial_t_setattro, - .tp_new = py_lv_grad_dsc_params_radial_t_new, - .tp_methods = py_lv_grad_dsc_params_radial_t_type_methods, + .tp_dealloc = (destructor)py_lv_area_t_dealloc, + .tp_getattro = (getter)py_lv_area_t_getattro, + .tp_setattro = (setter)py_lv_area_t_setattro, + .tp_new = py_lv_area_t_new, + .tp_methods = py_lv_area_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_grad_dsc_params_radial_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_area_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_radial_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_radial_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_area_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_area_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_grad_dsc_params_radial_t*)self->data; + return (lv_area_t*)self->data; } -static lv_grad_dsc_params_radial_t mp_write_scratch_lv_grad_dsc_params_radial_t; +static lv_area_t mp_write_scratch_lv_area_t; -static inline void* mp_write_value_ptr_lv_grad_dsc_params_radial_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_area_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_radial_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_area_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_grad_dsc_params_radial_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_radial_t)); + memcpy(&mp_write_scratch_lv_area_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_area_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_grad_dsc_params_radial_t; + return &mp_write_scratch_lv_area_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_grad_dsc_params_radial_t(value); + void *p = mp_write_ptr_lv_area_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_radial_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_area_t or dict, got None"); } - memset(&mp_write_scratch_lv_grad_dsc_params_radial_t, 0, sizeof(lv_grad_dsc_params_radial_t)); - return &mp_write_scratch_lv_grad_dsc_params_radial_t; + memset(&mp_write_scratch_lv_area_t, 0, sizeof(lv_area_t)); + return &mp_write_scratch_lv_area_t; } -#define mp_write_lv_grad_dsc_params_radial_t(struct_obj) (*((lv_grad_dsc_params_radial_t*)mp_write_value_ptr_lv_grad_dsc_params_radial_t(struct_obj))) +#define mp_write_lv_area_t(struct_obj) (*((lv_area_t*)mp_write_value_ptr_lv_area_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_grad_dsc_params_radial_t(void *field) +static inline PyObject *mp_read_ptr_lv_area_t(void *field) { - return lv_to_mp_struct(&py_lv_grad_dsc_params_radial_t_type, field); + return lv_to_mp_struct(&py_lv_area_t_type, field); } -#define mp_read_lv_grad_dsc_params_radial_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_radial_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_radial_t))) -#define mp_read_byref_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(&field) +#define mp_read_lv_area_t(field) lv_to_mp_struct_own(&py_lv_area_t_type, copy_buffer(&field, sizeof(lv_area_t))) +#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) + +#define funcptr_dispatch_cb NULL + +static inline PyObject *mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->conical ) lv_grad_dsc_params_conical_t; /* - * Struct lv_grad_dsc_params_conical_t (CPython) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_unit_t_dispatch_cb' + * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) */ + +#define funcptr_evaluate_cb NULL -extern PyMethodDef py_lv_grad_dsc_params_conical_t_methods[]; +static inline PyObject *mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -static PyObject *py_lv_grad_dsc_params_conical_t_getattro(PyObject *self, PyObject *name) + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_unit_t_evaluate_cb' + * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + */ + +#define funcptr_wait_for_finish_cb NULL + +static inline PyObject *mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_unit_t_wait_for_finish_cb' + * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) + */ + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_unit_t_delete_cb' + * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) + */ + +#define funcptr_event_cb NULL + +static inline PyObject *mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + + +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_draw_unit_t_event_cb' + * void (*event_cb)(lv_event_t *event) + */ + + +/* + * Struct lv_draw_unit_t (CPython) + */ + +extern PyMethodDef py_lv_draw_unit_t_methods[]; + +static PyObject *py_lv_draw_unit_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)inst->data; + lv_draw_unit_t *data = (lv_draw_unit_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "center") == 0) return mp_read_byref_lv_point_t(data->center); - if (strcmp(attr, "start_angle") == 0) return mp_obj_new_int(data->start_angle); - if (strcmp(attr, "end_angle") == 0) return mp_obj_new_int(data->end_angle); - for (PyMethodDef *m = py_lv_grad_dsc_params_conical_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "next") == 0) return ptr_to_mp((void*)data->next); + if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); + if (strcmp(attr, "idx") == 0) return mp_obj_new_int(data->idx); + if (strcmp(attr, "dispatch_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dispatch_cb, NULL, "lv_draw_unit_t_dispatch_cb", NULL); + if (strcmp(attr, "evaluate_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->evaluate_cb, NULL, "lv_draw_unit_t_evaluate_cb", NULL); + if (strcmp(attr, "wait_for_finish_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->wait_for_finish_cb, NULL, "lv_draw_unit_t_wait_for_finish_cb", NULL); + if (strcmp(attr, "delete_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->delete_cb, NULL, "lv_draw_unit_t_delete_cb", NULL); + if (strcmp(attr, "event_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->event_cb, NULL, "lv_draw_unit_t_event_cb", NULL); + for (PyMethodDef *m = py_lv_draw_unit_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_grad_dsc_params_conical_t_field_names[] = {"center", "start_angle", "end_angle", NULL}; +static const char *const py_lv_draw_unit_t_field_names[] = {"next", "name", "idx", "dispatch_cb", "evaluate_cb", "wait_for_finish_cb", "delete_cb", "event_cb", NULL}; -static PyObject *py_lv_grad_dsc_params_conical_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_unit_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_grad_dsc_params_conical_t_field_names, py_lv_grad_dsc_params_conical_t_methods); + return lvpy_struct_dir(self, py_lv_draw_unit_t_field_names, py_lv_draw_unit_t_methods); } -static PyMethodDef py_lv_grad_dsc_params_conical_t_type_methods[] = { - {"__dir__", py_lv_grad_dsc_params_conical_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_unit_t_type_methods[] = { + {"__dir__", py_lv_draw_unit_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_grad_dsc_params_conical_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_unit_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)inst->data; + lv_draw_unit_t *data = (lv_draw_unit_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -8466,134 +8244,148 @@ static int py_lv_grad_dsc_params_conical_t_setattro(PyObject *self, PyObject *na const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_grad_dsc_params_conical_t saved; + lv_draw_unit_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "center") == 0) { data->center = mp_write_lv_point_t(value); result = 0; } - if (strcmp(attr, "start_angle") == 0) { data->start_angle = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "end_angle") == 0) { data->end_angle = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "next") == 0) { data->next = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "idx") == 0) { data->idx = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dispatch_cb") == 0) { data->dispatch_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_dispatch_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "evaluate_cb") == 0) { data->evaluate_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_evaluate_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "wait_for_finish_cb") == 0) { data->wait_for_finish_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_wait_for_finish_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "delete_cb") == 0) { data->delete_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_delete_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "event_cb") == 0) { data->event_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_event_cb", NULL, NULL, NULL, NULL); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_conical_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_unit_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_grad_dsc_params_conical_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_unit_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_conical_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_unit_t)); } -static void py_lv_grad_dsc_params_conical_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_unit_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_grad_dsc_params_conical_t_type = { +PyTypeObject py_lv_draw_unit_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_grad_dsc_params_conical_t", + .tp_name = "lvgl.lv_draw_unit_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_grad_dsc_params_conical_t_dealloc, - .tp_getattro = (getter)py_lv_grad_dsc_params_conical_t_getattro, - .tp_setattro = (setter)py_lv_grad_dsc_params_conical_t_setattro, - .tp_new = py_lv_grad_dsc_params_conical_t_new, - .tp_methods = py_lv_grad_dsc_params_conical_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_unit_t_dealloc, + .tp_getattro = (getter)py_lv_draw_unit_t_getattro, + .tp_setattro = (setter)py_lv_draw_unit_t_setattro, + .tp_new = py_lv_draw_unit_t_new, + .tp_methods = py_lv_draw_unit_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_grad_dsc_params_conical_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_unit_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_conical_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_conical_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_unit_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_unit_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_grad_dsc_params_conical_t*)self->data; + return (lv_draw_unit_t*)self->data; } -static lv_grad_dsc_params_conical_t mp_write_scratch_lv_grad_dsc_params_conical_t; +static lv_draw_unit_t mp_write_scratch_lv_draw_unit_t; -static inline void* mp_write_value_ptr_lv_grad_dsc_params_conical_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_unit_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_conical_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_unit_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_grad_dsc_params_conical_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_conical_t)); + memcpy(&mp_write_scratch_lv_draw_unit_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_unit_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_grad_dsc_params_conical_t; + return &mp_write_scratch_lv_draw_unit_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_grad_dsc_params_conical_t(value); + void *p = mp_write_ptr_lv_draw_unit_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_conical_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_unit_t or dict, got None"); } - memset(&mp_write_scratch_lv_grad_dsc_params_conical_t, 0, sizeof(lv_grad_dsc_params_conical_t)); - return &mp_write_scratch_lv_grad_dsc_params_conical_t; + memset(&mp_write_scratch_lv_draw_unit_t, 0, sizeof(lv_draw_unit_t)); + return &mp_write_scratch_lv_draw_unit_t; } -#define mp_write_lv_grad_dsc_params_conical_t(struct_obj) (*((lv_grad_dsc_params_conical_t*)mp_write_value_ptr_lv_grad_dsc_params_conical_t(struct_obj))) +#define mp_write_lv_draw_unit_t(struct_obj) (*((lv_draw_unit_t*)mp_write_value_ptr_lv_draw_unit_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_grad_dsc_params_conical_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_unit_t(void *field) { - return lv_to_mp_struct(&py_lv_grad_dsc_params_conical_t_type, field); + return lv_to_mp_struct(&py_lv_draw_unit_t_type, field); } -#define mp_read_lv_grad_dsc_params_conical_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_conical_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_conical_t))) -#define mp_read_byref_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(&field) +#define mp_read_lv_draw_unit_t(field) lv_to_mp_struct_own(&py_lv_draw_unit_t_type, copy_buffer(&field, sizeof(lv_draw_unit_t))) +#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) /* - * Struct lv_grad_dsc_params_t (CPython) + * Struct lv_draw_task_t (CPython) */ -extern PyMethodDef py_lv_grad_dsc_params_t_methods[]; +extern PyMethodDef py_lv_draw_task_t_methods[]; -static PyObject *py_lv_grad_dsc_params_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_draw_task_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)inst->data; + lv_draw_task_t *data = (lv_draw_task_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "linear") == 0) return mp_read_byref_lv_grad_dsc_params_linear_t(data->linear); - if (strcmp(attr, "radial") == 0) return mp_read_byref_lv_grad_dsc_params_radial_t(data->radial); - if (strcmp(attr, "conical") == 0) return mp_read_byref_lv_grad_dsc_params_conical_t(data->conical); - for (PyMethodDef *m = py_lv_grad_dsc_params_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "next") == 0) return ptr_to_mp((void*)data->next); + if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); + if (strcmp(attr, "area") == 0) return mp_read_byref_lv_area_t(data->area); + if (strcmp(attr, "_real_area") == 0) return mp_read_byref_lv_area_t(data->_real_area); + if (strcmp(attr, "clip_area") == 0) return mp_read_byref_lv_area_t(data->clip_area); + if (strcmp(attr, "target_layer") == 0) return ptr_to_mp((void*)data->target_layer); + if (strcmp(attr, "draw_unit") == 0) return mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); + if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); + if (strcmp(attr, "draw_dsc") == 0) return ptr_to_mp((void*)data->draw_dsc); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "preferred_draw_unit_id") == 0) return mp_obj_new_int_from_uint(data->preferred_draw_unit_id); + if (strcmp(attr, "preference_score") == 0) return mp_obj_new_int_from_uint(data->preference_score); + for (PyMethodDef *m = py_lv_draw_task_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_grad_dsc_params_t_field_names[] = {"linear", "radial", "conical", NULL}; +static const char *const py_lv_draw_task_t_field_names[] = {"next", "type", "area", "_real_area", "clip_area", "target_layer", "draw_unit", "state", "draw_dsc", "opa", "preferred_draw_unit_id", "preference_score", NULL}; -static PyObject *py_lv_grad_dsc_params_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_draw_task_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_grad_dsc_params_t_field_names, py_lv_grad_dsc_params_t_methods); + return lvpy_struct_dir(self, py_lv_draw_task_t_field_names, py_lv_draw_task_t_methods); } -static PyMethodDef py_lv_grad_dsc_params_t_type_methods[] = { - {"__dir__", py_lv_grad_dsc_params_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_draw_task_t_type_methods[] = { + {"__dir__", py_lv_draw_task_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_grad_dsc_params_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_draw_task_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)inst->data; + lv_draw_task_t *data = (lv_draw_task_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -8601,137 +8393,144 @@ static int py_lv_grad_dsc_params_t_setattro(PyObject *self, PyObject *name, PyOb const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_grad_dsc_params_t saved; + lv_draw_task_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "linear") == 0) { data->linear = mp_write_lv_grad_dsc_params_linear_t(value); result = 0; } - if (strcmp(attr, "radial") == 0) { data->radial = mp_write_lv_grad_dsc_params_radial_t(value); result = 0; } - if (strcmp(attr, "conical") == 0) { data->conical = mp_write_lv_grad_dsc_params_conical_t(value); result = 0; } + if (strcmp(attr, "next") == 0) { data->next = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "area") == 0) { data->area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "_real_area") == 0) { data->_real_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "clip_area") == 0) { data->clip_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "target_layer") == 0) { data->target_layer = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "draw_unit") == 0) { data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(value); result = 0; } + if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "draw_dsc") == 0) { data->draw_dsc = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "preferred_draw_unit_id") == 0) { data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "preference_score") == 0) { data->preference_score = (uint8_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_draw_task_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_grad_dsc_params_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_draw_task_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_task_t)); } -static void py_lv_grad_dsc_params_t_dealloc(py_lv_struct_t *self) +static void py_lv_draw_task_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_grad_dsc_params_t_type = { +PyTypeObject py_lv_draw_task_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_grad_dsc_params_t", + .tp_name = "lvgl.lv_draw_task_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_grad_dsc_params_t_dealloc, - .tp_getattro = (getter)py_lv_grad_dsc_params_t_getattro, - .tp_setattro = (setter)py_lv_grad_dsc_params_t_setattro, - .tp_new = py_lv_grad_dsc_params_t_new, - .tp_methods = py_lv_grad_dsc_params_t_type_methods, + .tp_dealloc = (destructor)py_lv_draw_task_t_dealloc, + .tp_getattro = (getter)py_lv_draw_task_t_getattro, + .tp_setattro = (setter)py_lv_draw_task_t_setattro, + .tp_new = py_lv_draw_task_t_new, + .tp_methods = py_lv_draw_task_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_grad_dsc_params_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_draw_task_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_draw_task_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_task_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_grad_dsc_params_t*)self->data; + return (lv_draw_task_t*)self->data; } -static lv_grad_dsc_params_t mp_write_scratch_lv_grad_dsc_params_t; +static lv_draw_task_t mp_write_scratch_lv_draw_task_t; -static inline void* mp_write_value_ptr_lv_grad_dsc_params_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_draw_task_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_task_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_grad_dsc_params_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_t)); + memcpy(&mp_write_scratch_lv_draw_task_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_task_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_grad_dsc_params_t; + return &mp_write_scratch_lv_draw_task_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_grad_dsc_params_t(value); + void *p = mp_write_ptr_lv_draw_task_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_task_t or dict, got None"); } - memset(&mp_write_scratch_lv_grad_dsc_params_t, 0, sizeof(lv_grad_dsc_params_t)); - return &mp_write_scratch_lv_grad_dsc_params_t; + memset(&mp_write_scratch_lv_draw_task_t, 0, sizeof(lv_draw_task_t)); + return &mp_write_scratch_lv_draw_task_t; } -#define mp_write_lv_grad_dsc_params_t(struct_obj) (*((lv_grad_dsc_params_t*)mp_write_value_ptr_lv_grad_dsc_params_t(struct_obj))) +#define mp_write_lv_draw_task_t(struct_obj) (*((lv_draw_task_t*)mp_write_value_ptr_lv_draw_task_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_grad_dsc_params_t(void *field) +static inline PyObject *mp_read_ptr_lv_draw_task_t(void *field) { - return lv_to_mp_struct(&py_lv_grad_dsc_params_t_type, field); + return lv_to_mp_struct(&py_lv_draw_task_t_type, field); } -#define mp_read_lv_grad_dsc_params_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_t))) -#define mp_read_byref_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(&field) +#define mp_read_lv_draw_task_t(field) lv_to_mp_struct_own(&py_lv_draw_task_t_type, copy_buffer(&field, sizeof(lv_draw_task_t))) +#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) /* - * Struct lv_grad_dsc_t (CPython) + * Struct lv_color32_t (CPython) */ -extern PyMethodDef py_lv_grad_dsc_t_methods[]; +extern PyMethodDef py_lv_color32_t_methods[]; -static PyObject *py_lv_grad_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_color32_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_t *data = (lv_grad_dsc_t*)inst->data; + lv_color32_t *data = (lv_color32_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "stops") == 0) return lvpy_struct_array_new(self, data->stops, 2, sizeof(lv_grad_stop_t), mp_read_ptr_lv_grad_stop_t, mp_write_value_ptr_lv_grad_stop_t); - if (strcmp(attr, "stops_count") == 0) return mp_obj_new_int_from_uint(data->stops_count); - if (strcmp(attr, "dir") == 0) return mp_obj_new_int(data->dir); - if (strcmp(attr, "extend") == 0) return mp_obj_new_int(data->extend); - if (strcmp(attr, "params") == 0) return mp_read_byref_lv_grad_dsc_params_t(data->params); - if (strcmp(attr, "state") == 0) return ptr_to_mp((void*)data->state); - for (PyMethodDef *m = py_lv_grad_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "blue") == 0) return mp_obj_new_int_from_uint(data->blue); + if (strcmp(attr, "green") == 0) return mp_obj_new_int_from_uint(data->green); + if (strcmp(attr, "red") == 0) return mp_obj_new_int_from_uint(data->red); + if (strcmp(attr, "alpha") == 0) return mp_obj_new_int_from_uint(data->alpha); + for (PyMethodDef *m = py_lv_color32_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_grad_dsc_t_field_names[] = {"stops", "stops_count", "dir", "extend", "params", "state", NULL}; +static const char *const py_lv_color32_t_field_names[] = {"blue", "green", "red", "alpha", NULL}; -static PyObject *py_lv_grad_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_color32_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_grad_dsc_t_field_names, py_lv_grad_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_color32_t_field_names, py_lv_color32_t_methods); } -static PyMethodDef py_lv_grad_dsc_t_type_methods[] = { - {"__dir__", py_lv_grad_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_color32_t_type_methods[] = { + {"__dir__", py_lv_color32_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_grad_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_color32_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_grad_dsc_t *data = (lv_grad_dsc_t*)inst->data; + lv_color32_t *data = (lv_color32_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -8739,1035 +8538,895 @@ static int py_lv_grad_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *v const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_grad_dsc_t saved; + lv_color32_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "stops") == 0) { lvpy_struct_array_assign(data->stops, 2, sizeof(lv_grad_stop_t), mp_write_value_ptr_lv_grad_stop_t, value); result = 0; } - if (strcmp(attr, "stops_count") == 0) { data->stops_count = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "dir") == 0) { data->dir = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "extend") == 0) { data->extend = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "params") == 0) { data->params = mp_write_lv_grad_dsc_params_t(value); result = 0; } - if (strcmp(attr, "state") == 0) { data->state = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "blue") == 0) { data->blue = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "green") == 0) { data->green = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "red") == 0) { data->red = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "alpha") == 0) { data->alpha = (uint8_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_color32_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_grad_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_color32_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_color32_t)); } -static void py_lv_grad_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_color32_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_grad_dsc_t_type = { +PyTypeObject py_lv_color32_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_grad_dsc_t", + .tp_name = "lvgl.lv_color32_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_grad_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_grad_dsc_t_getattro, - .tp_setattro = (setter)py_lv_grad_dsc_t_setattro, - .tp_new = py_lv_grad_dsc_t_new, - .tp_methods = py_lv_grad_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_color32_t_dealloc, + .tp_getattro = (getter)py_lv_color32_t_getattro, + .tp_setattro = (setter)py_lv_color32_t_setattro, + .tp_new = py_lv_color32_t_new, + .tp_methods = py_lv_color32_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_grad_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_color32_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_color32_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color32_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_grad_dsc_t*)self->data; + return (lv_color32_t*)self->data; } -static lv_grad_dsc_t mp_write_scratch_lv_grad_dsc_t; +static lv_color32_t mp_write_scratch_lv_color32_t; -static inline void* mp_write_value_ptr_lv_grad_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_color32_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color32_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_grad_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_t)); + memcpy(&mp_write_scratch_lv_color32_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color32_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_grad_dsc_t; + return &mp_write_scratch_lv_color32_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_grad_dsc_t(value); + void *p = mp_write_ptr_lv_color32_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color32_t or dict, got None"); } - memset(&mp_write_scratch_lv_grad_dsc_t, 0, sizeof(lv_grad_dsc_t)); - return &mp_write_scratch_lv_grad_dsc_t; + memset(&mp_write_scratch_lv_color32_t, 0, sizeof(lv_color32_t)); + return &mp_write_scratch_lv_color32_t; } -#define mp_write_lv_grad_dsc_t(struct_obj) (*((lv_grad_dsc_t*)mp_write_value_ptr_lv_grad_dsc_t(struct_obj))) +#define mp_write_lv_color32_t(struct_obj) (*((lv_color32_t*)mp_write_value_ptr_lv_color32_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_grad_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_color32_t(void *field) { - return lv_to_mp_struct(&py_lv_grad_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_color32_t_type, field); } -#define mp_read_lv_grad_dsc_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_t))) -#define mp_read_byref_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(&field) +#define mp_read_lv_color32_t(field) lv_to_mp_struct_own(&py_lv_color32_t_type, copy_buffer(&field, sizeof(lv_color32_t))) +#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) /* - * lvgl extension definition for: - * inline static const lv_grad_dsc_t *lv_obj_get_style_bg_grad_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_layer_t (CPython) */ -static PyObject *py_lv_obj_get_style_bg_grad_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_layer_t_methods[]; + +static PyObject *py_lv_layer_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const lv_grad_dsc_t * _res; - lvpy_lock(); - _res = ((const lv_grad_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_ptr_lv_grad_dsc_t((void*)_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_layer_t *data = (lv_layer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "draw_buf") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->draw_buf); + if (strcmp(attr, "draw_task_head") == 0) return mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); + if (strcmp(attr, "display") == 0) return ptr_to_mp((void*)data->display); + if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); + if (strcmp(attr, "next") == 0) return ptr_to_mp((void*)data->next); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "buf_area") == 0) return mp_read_byref_lv_area_t(data->buf_area); + if (strcmp(attr, "phy_clip_area") == 0) return mp_read_byref_lv_area_t(data->phy_clip_area); + if (strcmp(attr, "_clip_area") == 0) return mp_read_byref_lv_area_t(data->_clip_area); + if (strcmp(attr, "partial_y_offset") == 0) return mp_obj_new_int(data->partial_y_offset); + if (strcmp(attr, "recolor") == 0) return mp_read_byref_lv_color32_t(data->recolor); + if (strcmp(attr, "color_format") == 0) return mp_obj_new_int(data->color_format); + if (strcmp(attr, "all_tasks_added") == 0) return convert_to_bool(data->all_tasks_added); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "buffer_owned") == 0) return convert_to_bool(data->buffer_owned); + for (PyMethodDef *m = py_lv_layer_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_bg_grad_internal_def = { - "lv_obj_get_style_bg_grad_internal", - (PyCFunction)py_lv_obj_get_style_bg_grad_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_layer_t_field_names[] = {"draw_buf", "draw_task_head", "display", "parent", "next", "user_data", "buf_area", "phy_clip_area", "_clip_area", "partial_y_offset", "recolor", "color_format", "all_tasks_added", "opa", "buffer_owned", NULL}; -/* - * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bg_image_src_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_image_src_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const void * _res; - lvpy_lock(); - _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_src_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_layer_t_field_names, py_lv_layer_t_methods); } -static PyMethodDef py_lv_obj_get_style_bg_image_src_internal_def = { - "lv_obj_get_style_bg_image_src_internal", - (PyCFunction)py_lv_obj_get_style_bg_image_src_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_layer_t_type_methods[] = { + {"__dir__", py_lv_layer_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_image_opa_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_image_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_layer_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_layer_t *data = (lv_layer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_layer_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "draw_buf") == 0) { data->draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "draw_task_head") == 0) { data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(value); result = 0; } + if (strcmp(attr, "display") == 0) { data->display = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "next") == 0) { data->next = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "buf_area") == 0) { data->buf_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "phy_clip_area") == 0) { data->phy_clip_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "_clip_area") == 0) { data->_clip_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "partial_y_offset") == 0) { data->partial_y_offset = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "recolor") == 0) { data->recolor = mp_write_lv_color32_t(value); result = 0; } + if (strcmp(attr, "color_format") == 0) { data->color_format = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "all_tasks_added") == 0) { data->all_tasks_added = mp_obj_is_true(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "buffer_owned") == 0) { data->buffer_owned = mp_obj_is_true(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_layer_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_obj_get_style_bg_image_opa_internal_def = { - "lv_obj_get_style_bg_image_opa_internal", - (PyCFunction)py_lv_obj_get_style_bg_image_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_layer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_layer_t)); +} -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_image_recolor_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_image_recolor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_layer_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_bg_image_recolor_internal_def = { - "lv_obj_get_style_bg_image_recolor_internal", - (PyCFunction)py_lv_obj_get_style_bg_image_recolor_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_layer_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_layer_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_layer_t_dealloc, + .tp_getattro = (getter)py_lv_layer_t_getattro, + .tp_setattro = (setter)py_lv_layer_t_setattro, + .tp_new = py_lv_layer_t_new, + .tp_methods = py_lv_layer_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_bg_image_recolor_filtered_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_image_recolor_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_layer_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_layer_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_layer_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_layer_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_bg_image_recolor_filtered_internal_def = { - "lv_obj_get_style_bg_image_recolor_filtered_internal", - (PyCFunction)py_lv_obj_get_style_bg_image_recolor_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_layer_t mp_write_scratch_lv_layer_t; -/* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_bg_image_recolor_opa_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_image_recolor_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_layer_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_recolor_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_layer_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_layer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_layer_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_layer_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_layer_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_layer_t or dict, got None"); + } + memset(&mp_write_scratch_lv_layer_t, 0, sizeof(lv_layer_t)); + return &mp_write_scratch_lv_layer_t; } -static PyMethodDef py_lv_obj_get_style_bg_image_recolor_opa_internal_def = { - "lv_obj_get_style_bg_image_recolor_opa_internal", - (PyCFunction)py_lv_obj_get_style_bg_image_recolor_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_layer_t(struct_obj) (*((lv_layer_t*)mp_write_value_ptr_lv_layer_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static bool lv_obj_get_style_bg_image_tiled_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_image_tiled_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_layer_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_image_tiled_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp_struct(&py_lv_layer_t_type, field); } -static PyMethodDef py_lv_obj_get_style_bg_image_tiled_internal_def = { - "lv_obj_get_style_bg_image_tiled_internal", - (PyCFunction)py_lv_obj_get_style_bg_image_tiled_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_layer_t(field) lv_to_mp_struct_own(&py_lv_layer_t_type, copy_buffer(&field, sizeof(lv_layer_t))) +#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) /* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_border_color_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_array_t (CPython) */ -static PyObject *py_lv_obj_get_style_border_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_array_t_methods[]; + +static PyObject *py_lv_array_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_array_t *data = (lv_array_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "data") == 0) return mp_array_from_u8ptr((void*)data->data); + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + if (strcmp(attr, "capacity") == 0) return mp_obj_new_int_from_uint(data->capacity); + if (strcmp(attr, "element_size") == 0) return mp_obj_new_int_from_uint(data->element_size); + if (strcmp(attr, "inner_alloc") == 0) return convert_to_bool(data->inner_alloc); + for (PyMethodDef *m = py_lv_array_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_border_color_internal_def = { - "lv_obj_get_style_border_color_internal", - (PyCFunction)py_lv_obj_get_style_border_color_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_array_t_field_names[] = {"data", "size", "capacity", "element_size", "inner_alloc", NULL}; -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_border_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_border_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_color_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_array_t_field_names, py_lv_array_t_methods); } -static PyMethodDef py_lv_obj_get_style_border_color_filtered_internal_def = { - "lv_obj_get_style_border_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_border_color_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_array_t_type_methods[] = { + {"__dir__", py_lv_array_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_border_opa_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_border_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_array_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_array_t *data = (lv_array_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_array_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "data") == 0) { data->data = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "capacity") == 0) { data->capacity = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "element_size") == 0) { data->element_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "inner_alloc") == 0) { data->inner_alloc = mp_obj_is_true(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_array_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_obj_get_style_border_opa_internal_def = { - "lv_obj_get_style_border_opa_internal", - (PyCFunction)py_lv_obj_get_style_border_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_array_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_array_t)); +} -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_border_width_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_border_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_array_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_width_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_border_width_internal_def = { - "lv_obj_get_style_border_width_internal", - (PyCFunction)py_lv_obj_get_style_border_width_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_array_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_array_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_array_t_dealloc, + .tp_getattro = (getter)py_lv_array_t_getattro, + .tp_setattro = (setter)py_lv_array_t_setattro, + .tp_new = py_lv_array_t_new, + .tp_methods = py_lv_array_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; +static inline void* mp_write_ptr_lv_array_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_array_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_array_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_array_t*)self->data; +} -/* - * lvgl extension definition for: - * inline static lv_border_side_t lv_obj_get_style_border_side_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_border_side_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static lv_array_t mp_write_scratch_lv_array_t; + +static inline void* mp_write_value_ptr_lv_array_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_border_side_t _res; - lvpy_lock(); - _res = ((lv_border_side_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_side_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_array_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_array_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_array_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_array_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_array_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_array_t or dict, got None"); + } + memset(&mp_write_scratch_lv_array_t, 0, sizeof(lv_array_t)); + return &mp_write_scratch_lv_array_t; } -static PyMethodDef py_lv_obj_get_style_border_side_internal_def = { - "lv_obj_get_style_border_side_internal", - (PyCFunction)py_lv_obj_get_style_border_side_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_array_t(struct_obj) (*((lv_array_t*)mp_write_value_ptr_lv_array_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static bool lv_obj_get_style_border_post_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_border_post_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_array_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_border_post_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp_struct(&py_lv_array_t_type, field); } -static PyMethodDef py_lv_obj_get_style_border_post_internal_def = { - "lv_obj_get_style_border_post_internal", - (PyCFunction)py_lv_obj_get_style_border_post_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_array_t(field) lv_to_mp_struct_own(&py_lv_array_t_type, copy_buffer(&field, sizeof(lv_array_t))) +#define mp_read_byref_lv_array_t(field) mp_read_ptr_lv_array_t(&field) /* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_outline_width_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_event_list_t (CPython) */ -static PyObject *py_lv_obj_get_style_outline_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_event_list_t_methods[]; + +static PyObject *py_lv_event_list_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_width_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_event_list_t *data = (lv_event_list_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "array") == 0) return mp_read_byref_lv_array_t(data->array); + if (strcmp(attr, "is_traversing") == 0) return mp_obj_new_int_from_uint(data->is_traversing); + if (strcmp(attr, "has_marked_deleting") == 0) return mp_obj_new_int_from_uint(data->has_marked_deleting); + for (PyMethodDef *m = py_lv_event_list_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_outline_width_internal_def = { - "lv_obj_get_style_outline_width_internal", - (PyCFunction)py_lv_obj_get_style_outline_width_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_event_list_t_field_names[] = {"array", "is_traversing", "has_marked_deleting", NULL}; -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_outline_color_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_outline_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_list_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_event_list_t_field_names, py_lv_event_list_t_methods); } -static PyMethodDef py_lv_obj_get_style_outline_color_internal_def = { - "lv_obj_get_style_outline_color_internal", - (PyCFunction)py_lv_obj_get_style_outline_color_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_event_list_t_type_methods[] = { + {"__dir__", py_lv_event_list_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_event_list_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_event_list_t *data = (lv_event_list_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_event_list_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "array") == 0) { data->array = mp_write_lv_array_t(value); result = 0; } + if (strcmp(attr, "is_traversing") == 0) { data->is_traversing = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "has_marked_deleting") == 0) { data->has_marked_deleting = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_event_list_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_event_list_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_event_list_t)); +} -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_outline_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_outline_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_event_list_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_color_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_outline_color_filtered_internal_def = { - "lv_obj_get_style_outline_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_outline_color_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_event_list_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_event_list_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_event_list_t_dealloc, + .tp_getattro = (getter)py_lv_event_list_t_getattro, + .tp_setattro = (setter)py_lv_event_list_t_setattro, + .tp_new = py_lv_event_list_t_new, + .tp_methods = py_lv_event_list_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_outline_opa_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_outline_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_event_list_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_event_list_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_event_list_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_event_list_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_outline_opa_internal_def = { - "lv_obj_get_style_outline_opa_internal", - (PyCFunction)py_lv_obj_get_style_outline_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_event_list_t mp_write_scratch_lv_event_list_t; + +static inline void* mp_write_value_ptr_lv_event_list_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_event_list_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_event_list_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_event_list_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_event_list_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_event_list_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_event_list_t or dict, got None"); + } + memset(&mp_write_scratch_lv_event_list_t, 0, sizeof(lv_event_list_t)); + return &mp_write_scratch_lv_event_list_t; +} +#define mp_write_lv_event_list_t(struct_obj) (*((lv_event_list_t*)mp_write_value_ptr_lv_event_list_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_outline_pad_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_outline_pad_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_event_list_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_outline_pad_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_event_list_t_type, field); } -static PyMethodDef py_lv_obj_get_style_outline_pad_internal_def = { - "lv_obj_get_style_outline_pad_internal", - (PyCFunction)py_lv_obj_get_style_outline_pad_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_event_list_t(field) lv_to_mp_struct_own(&py_lv_event_list_t_type, copy_buffer(&field, sizeof(lv_event_list_t))) +#define mp_read_byref_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(&field) +#define funcptr_lv_theme_apply_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_theme_apply_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); /* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_width_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_color_t (CPython) */ -static PyObject *py_lv_obj_get_style_shadow_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_color_t_methods[]; + +static PyObject *py_lv_color_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_width_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_t *data = (lv_color_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "blue") == 0) return mp_obj_new_int_from_uint(data->blue); + if (strcmp(attr, "green") == 0) return mp_obj_new_int_from_uint(data->green); + if (strcmp(attr, "red") == 0) return mp_obj_new_int_from_uint(data->red); + for (PyMethodDef *m = py_lv_color_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_shadow_width_internal_def = { - "lv_obj_get_style_shadow_width_internal", - (PyCFunction)py_lv_obj_get_style_shadow_width_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_color_t_field_names[] = {"blue", "green", "red", NULL}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_offset_x_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_shadow_offset_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_x_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_color_t_field_names, py_lv_color_t_methods); } -static PyMethodDef py_lv_obj_get_style_shadow_offset_x_internal_def = { - "lv_obj_get_style_shadow_offset_x_internal", - (PyCFunction)py_lv_obj_get_style_shadow_offset_x_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_color_t_type_methods[] = { + {"__dir__", py_lv_color_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_color_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_t *data = (lv_color_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_color_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "blue") == 0) { data->blue = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "green") == 0) { data->green = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "red") == 0) { data->red = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_color_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_offset_y_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_shadow_offset_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_offset_y_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return make_new_lv_struct(type, args, kwds, sizeof(lv_color_t)); } -static PyMethodDef py_lv_obj_get_style_shadow_offset_y_internal_def = { - "lv_obj_get_style_shadow_offset_y_internal", - (PyCFunction)py_lv_obj_get_style_shadow_offset_y_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static void py_lv_color_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} +PyTypeObject py_lv_color_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_color_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_color_t_dealloc, + .tp_getattro = (getter)py_lv_color_t_getattro, + .tp_setattro = (setter)py_lv_color_t_setattro, + .tp_new = py_lv_color_t_new, + .tp_methods = py_lv_color_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_shadow_spread_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_shadow_spread_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_color_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_spread_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_color_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_color_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_shadow_spread_internal_def = { - "lv_obj_get_style_shadow_spread_internal", - (PyCFunction)py_lv_obj_get_style_shadow_spread_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_color_t mp_write_scratch_lv_color_t; + +static inline void* mp_write_value_ptr_lv_color_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_color_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_color_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_color_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_t or dict, got None"); + } + memset(&mp_write_scratch_lv_color_t, 0, sizeof(lv_color_t)); + return &mp_write_scratch_lv_color_t; +} +#define mp_write_lv_color_t(struct_obj) (*((lv_color_t*)mp_write_value_ptr_lv_color_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_shadow_color_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_shadow_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_color_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp_struct(&py_lv_color_t_type, field); } -static PyMethodDef py_lv_obj_get_style_shadow_color_internal_def = { - "lv_obj_get_style_shadow_color_internal", - (PyCFunction)py_lv_obj_get_style_shadow_color_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_color_t(field) lv_to_mp_struct_own(&py_lv_color_t_type, copy_buffer(&field, sizeof(lv_color_t))) +#define mp_read_byref_lv_color_t(field) mp_read_ptr_lv_color_t(&field) + +#define funcptr_get_glyph_dsc NULL + +static inline PyObject *mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); +#define funcptr_get_glyph_bitmap NULL + +static inline PyObject *mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_shadow_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_font_t_get_glyph_bitmap' + * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_obj_get_style_shadow_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_color_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); -} +#define funcptr_release_glyph NULL -static PyMethodDef py_lv_obj_get_style_shadow_color_filtered_internal_def = { - "lv_obj_get_style_shadow_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_shadow_color_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); /* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_shadow_opa_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_font_t (CPython) */ -static PyObject *py_lv_obj_get_style_shadow_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_shadow_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} -static PyMethodDef py_lv_obj_get_style_shadow_opa_internal_def = { - "lv_obj_get_style_shadow_opa_internal", - (PyCFunction)py_lv_obj_get_style_shadow_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +extern PyMethodDef py_lv_font_t_methods[]; + +static PyObject *py_lv_font_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_t *data = (lv_font_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "dsc") == 0) return ptr_to_mp((void*)data->dsc); + if (strcmp(attr, "fallback") == 0) return ptr_to_mp((void*)data->fallback); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "get_glyph_dsc") == 0) return mp_lv_funcptr(NULL, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback, "lv_font_t_get_glyph_dsc", data->user_data); + if (strcmp(attr, "get_glyph_bitmap") == 0) return mp_lv_funcptr(NULL, (void*)data->get_glyph_bitmap, NULL, "lv_font_t_get_glyph_bitmap", NULL); + if (strcmp(attr, "release_glyph") == 0) return mp_lv_funcptr(NULL, (void*)data->release_glyph, lv_font_t_release_glyph_callback, "lv_font_t_release_glyph", data->user_data); + if (strcmp(attr, "line_height") == 0) return mp_obj_new_int(data->line_height); + if (strcmp(attr, "base_line") == 0) return mp_obj_new_int(data->base_line); + if (strcmp(attr, "cap_height") == 0) return mp_obj_new_int(data->cap_height); + if (strcmp(attr, "x_height") == 0) return mp_obj_new_int(data->x_height); + if (strcmp(attr, "subpx") == 0) return mp_obj_new_int_from_uint(data->subpx); + if (strcmp(attr, "kerning") == 0) return mp_obj_new_int_from_uint(data->kerning); + if (strcmp(attr, "static_bitmap") == 0) return mp_obj_new_int_from_uint(data->static_bitmap); + if (strcmp(attr, "underline_position") == 0) return mp_obj_new_int(data->underline_position); + if (strcmp(attr, "underline_thickness") == 0) return mp_obj_new_int(data->underline_thickness); + for (PyMethodDef *m = py_lv_font_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} +static const char *const py_lv_font_t_field_names[] = {"dsc", "fallback", "user_data", "get_glyph_dsc", "get_glyph_bitmap", "release_glyph", "line_height", "base_line", "cap_height", "x_height", "subpx", "kerning", "static_bitmap", "underline_position", "underline_thickness", NULL}; -/* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_image_opa_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_image_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_font_t_field_names, py_lv_font_t_methods); } -static PyMethodDef py_lv_obj_get_style_image_opa_internal_def = { - "lv_obj_get_style_image_opa_internal", - (PyCFunction)py_lv_obj_get_style_image_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_font_t_type_methods[] = { + {"__dir__", py_lv_font_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_font_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_font_t *data = (lv_font_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_font_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "dsc") == 0) { data->dsc = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "fallback") == 0) { data->fallback = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "get_glyph_dsc") == 0) { data->get_glyph_dsc = (void*)mp_lv_callback(value, lv_font_t_get_glyph_dsc_callback, "lv_font_t_get_glyph_dsc", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "get_glyph_bitmap") == 0) { data->get_glyph_bitmap = (void*)mp_lv_callback(value, NULL, "lv_font_t_get_glyph_bitmap", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "release_glyph") == 0) { data->release_glyph = (void*)mp_lv_callback(value, lv_font_t_release_glyph_callback, "lv_font_t_release_glyph", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "line_height") == 0) { data->line_height = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "base_line") == 0) { data->base_line = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "cap_height") == 0) { data->cap_height = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x_height") == 0) { data->x_height = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "subpx") == 0) { data->subpx = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "kerning") == 0) { data->kerning = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "static_bitmap") == 0) { data->static_bitmap = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "underline_position") == 0) { data->underline_position = (int8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "underline_thickness") == 0) { data->underline_thickness = (int8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_font_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_image_recolor_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_image_recolor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return make_new_lv_struct(type, args, kwds, sizeof(lv_font_t)); } -static PyMethodDef py_lv_obj_get_style_image_recolor_internal_def = { - "lv_obj_get_style_image_recolor_internal", - (PyCFunction)py_lv_obj_get_style_image_recolor_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static void py_lv_font_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} +PyTypeObject py_lv_font_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_font_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_font_t_dealloc, + .tp_getattro = (getter)py_lv_font_t_getattro, + .tp_setattro = (setter)py_lv_font_t_setattro, + .tp_new = py_lv_font_t_new, + .tp_methods = py_lv_font_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_image_recolor_filtered_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_image_recolor_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_font_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_font_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_font_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_image_recolor_filtered_internal_def = { - "lv_obj_get_style_image_recolor_filtered_internal", - (PyCFunction)py_lv_obj_get_style_image_recolor_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_font_t mp_write_scratch_lv_font_t; + +static inline void* mp_write_value_ptr_lv_font_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_font_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_font_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_font_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_t or dict, got None"); + } + memset(&mp_write_scratch_lv_font_t, 0, sizeof(lv_font_t)); + return &mp_write_scratch_lv_font_t; +} +#define mp_write_lv_font_t(struct_obj) (*((lv_font_t*)mp_write_value_ptr_lv_font_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_image_recolor_opa_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_image_recolor_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_font_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_recolor_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp_struct(&py_lv_font_t_type, field); } -static PyMethodDef py_lv_obj_get_style_image_recolor_opa_internal_def = { - "lv_obj_get_style_image_recolor_opa_internal", - (PyCFunction)py_lv_obj_get_style_image_recolor_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_font_t(field) lv_to_mp_struct_own(&py_lv_font_t_type, copy_buffer(&field, sizeof(lv_font_t))) +#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) /* - * Struct lv_image_colorkey_t (CPython) + * Struct lv_theme_t (CPython) */ -extern PyMethodDef py_lv_image_colorkey_t_methods[]; +extern PyMethodDef py_lv_theme_t_methods[]; -static PyObject *py_lv_image_colorkey_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_theme_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_colorkey_t *data = (lv_image_colorkey_t*)inst->data; + lv_theme_t *data = (lv_theme_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "low") == 0) return mp_read_byref_lv_color_t(data->low); - if (strcmp(attr, "high") == 0) return mp_read_byref_lv_color_t(data->high); - for (PyMethodDef *m = py_lv_image_colorkey_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "apply_cb") == 0) return mp_lv_funcptr(NULL, data->apply_cb, lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", data->user_data); + if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "disp") == 0) return ptr_to_mp((void*)data->disp); + if (strcmp(attr, "color_primary") == 0) return mp_read_byref_lv_color_t(data->color_primary); + if (strcmp(attr, "color_secondary") == 0) return mp_read_byref_lv_color_t(data->color_secondary); + if (strcmp(attr, "font_small") == 0) return mp_read_ptr_lv_font_t((void*)data->font_small); + if (strcmp(attr, "font_normal") == 0) return mp_read_ptr_lv_font_t((void*)data->font_normal); + if (strcmp(attr, "font_large") == 0) return mp_read_ptr_lv_font_t((void*)data->font_large); + if (strcmp(attr, "flags") == 0) return mp_obj_new_int_from_uint(data->flags); + for (PyMethodDef *m = py_lv_theme_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_image_colorkey_t_field_names[] = {"low", "high", NULL}; +static const char *const py_lv_theme_t_field_names[] = {"apply_cb", "parent", "user_data", "disp", "color_primary", "color_secondary", "font_small", "font_normal", "font_large", "flags", NULL}; -static PyObject *py_lv_image_colorkey_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_theme_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_image_colorkey_t_field_names, py_lv_image_colorkey_t_methods); + return lvpy_struct_dir(self, py_lv_theme_t_field_names, py_lv_theme_t_methods); } -static PyMethodDef py_lv_image_colorkey_t_type_methods[] = { - {"__dir__", py_lv_image_colorkey_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_theme_t_type_methods[] = { + {"__dir__", py_lv_theme_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_image_colorkey_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_theme_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_colorkey_t *data = (lv_image_colorkey_t*)inst->data; + lv_theme_t *data = (lv_theme_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -9775,546 +9434,505 @@ static int py_lv_image_colorkey_t_setattro(PyObject *self, PyObject *name, PyObj const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_image_colorkey_t saved; + lv_theme_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "low") == 0) { data->low = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "high") == 0) { data->high = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "apply_cb") == 0) { data->apply_cb = mp_lv_callback(value, lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "disp") == 0) { data->disp = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "color_primary") == 0) { data->color_primary = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "color_secondary") == 0) { data->color_secondary = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "font_small") == 0) { data->font_small = (void*)mp_write_ptr_lv_font_t(value); result = 0; } + if (strcmp(attr, "font_normal") == 0) { data->font_normal = (void*)mp_write_ptr_lv_font_t(value); result = 0; } + if (strcmp(attr, "font_large") == 0) { data->font_large = (void*)mp_write_ptr_lv_font_t(value); result = 0; } + if (strcmp(attr, "flags") == 0) { data->flags = (uint32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_image_colorkey_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_theme_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_image_colorkey_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_theme_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_image_colorkey_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_theme_t)); } -static void py_lv_image_colorkey_t_dealloc(py_lv_struct_t *self) +static void py_lv_theme_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_image_colorkey_t_type = { +PyTypeObject py_lv_theme_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_image_colorkey_t", + .tp_name = "lvgl.lv_theme_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_image_colorkey_t_dealloc, - .tp_getattro = (getter)py_lv_image_colorkey_t_getattro, - .tp_setattro = (setter)py_lv_image_colorkey_t_setattro, - .tp_new = py_lv_image_colorkey_t_new, - .tp_methods = py_lv_image_colorkey_t_type_methods, + .tp_dealloc = (destructor)py_lv_theme_t_dealloc, + .tp_getattro = (getter)py_lv_theme_t_getattro, + .tp_setattro = (setter)py_lv_theme_t_setattro, + .tp_new = py_lv_theme_t_new, + .tp_methods = py_lv_theme_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_image_colorkey_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_theme_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_image_colorkey_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_colorkey_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_theme_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_theme_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_image_colorkey_t*)self->data; + return (lv_theme_t*)self->data; } -static lv_image_colorkey_t mp_write_scratch_lv_image_colorkey_t; +static lv_theme_t mp_write_scratch_lv_theme_t; -static inline void* mp_write_value_ptr_lv_image_colorkey_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_theme_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_colorkey_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_theme_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_image_colorkey_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_colorkey_t)); + memcpy(&mp_write_scratch_lv_theme_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_theme_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_image_colorkey_t; + return &mp_write_scratch_lv_theme_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_image_colorkey_t(value); + void *p = mp_write_ptr_lv_theme_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_colorkey_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_theme_t or dict, got None"); } - memset(&mp_write_scratch_lv_image_colorkey_t, 0, sizeof(lv_image_colorkey_t)); - return &mp_write_scratch_lv_image_colorkey_t; + memset(&mp_write_scratch_lv_theme_t, 0, sizeof(lv_theme_t)); + return &mp_write_scratch_lv_theme_t; } -#define mp_write_lv_image_colorkey_t(struct_obj) (*((lv_image_colorkey_t*)mp_write_value_ptr_lv_image_colorkey_t(struct_obj))) +#define mp_write_lv_theme_t(struct_obj) (*((lv_theme_t*)mp_write_value_ptr_lv_theme_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_image_colorkey_t(void *field) +static inline PyObject *mp_read_ptr_lv_theme_t(void *field) { - return lv_to_mp_struct(&py_lv_image_colorkey_t_type, field); + return lv_to_mp_struct(&py_lv_theme_t_type, field); } -#define mp_read_lv_image_colorkey_t(field) lv_to_mp_struct_own(&py_lv_image_colorkey_t_type, copy_buffer(&field, sizeof(lv_image_colorkey_t))) -#define mp_read_byref_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(&field) +#define mp_read_lv_theme_t(field) lv_to_mp_struct_own(&py_lv_theme_t_type, copy_buffer(&field, sizeof(lv_theme_t))) +#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) + +#define funcptr_lv_timer_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static void lv_timer_t_timer_cb_callback(lv_timer_t *); /* - * lvgl extension definition for: - * inline static const lv_image_colorkey_t *lv_obj_get_style_image_colorkey_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_timer_t (CPython) */ -static PyObject *py_lv_obj_get_style_image_colorkey_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_timer_t_methods[]; + +static PyObject *py_lv_timer_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const lv_image_colorkey_t * _res; - lvpy_lock(); - _res = ((const lv_image_colorkey_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_image_colorkey_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_ptr_lv_image_colorkey_t((void*)_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_timer_t *data = (lv_timer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "period") == 0) return mp_obj_new_int_from_uint(data->period); + if (strcmp(attr, "last_run") == 0) return mp_obj_new_int_from_uint(data->last_run); + if (strcmp(attr, "timer_cb") == 0) return mp_lv_funcptr(NULL, data->timer_cb, lv_timer_t_timer_cb_callback, "lv_timer_t_timer_cb", data->user_data); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "repeat_count") == 0) return mp_obj_new_int(data->repeat_count); + if (strcmp(attr, "paused") == 0) return mp_obj_new_int(data->paused); + if (strcmp(attr, "auto_delete") == 0) return mp_obj_new_int_from_uint(data->auto_delete); + for (PyMethodDef *m = py_lv_timer_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_image_colorkey_internal_def = { - "lv_obj_get_style_image_colorkey_internal", - (PyCFunction)py_lv_obj_get_style_image_colorkey_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_timer_t_field_names[] = {"period", "last_run", "timer_cb", "user_data", "repeat_count", "paused", "auto_delete", NULL}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_line_width_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_line_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_width_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_timer_t_field_names, py_lv_timer_t_methods); } -static PyMethodDef py_lv_obj_get_style_line_width_internal_def = { - "lv_obj_get_style_line_width_internal", - (PyCFunction)py_lv_obj_get_style_line_width_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_timer_t_type_methods[] = { + {"__dir__", py_lv_timer_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_line_dash_width_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_line_dash_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_timer_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_width_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_timer_t *data = (lv_timer_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_timer_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "period") == 0) { data->period = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_run") == 0) { data->last_run = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "timer_cb") == 0) { data->timer_cb = mp_lv_callback(value, lv_timer_t_timer_cb_callback, "lv_timer_t_timer_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "repeat_count") == 0) { data->repeat_count = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "paused") == 0) { data->paused = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "auto_delete") == 0) { data->auto_delete = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_timer_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_obj_get_style_line_dash_width_internal_def = { - "lv_obj_get_style_line_dash_width_internal", - (PyCFunction)py_lv_obj_get_style_line_dash_width_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_timer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_timer_t)); +} -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_line_dash_gap_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_line_dash_gap_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_timer_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_dash_gap_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_line_dash_gap_internal_def = { - "lv_obj_get_style_line_dash_gap_internal", - (PyCFunction)py_lv_obj_get_style_line_dash_gap_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_timer_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_timer_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_timer_t_dealloc, + .tp_getattro = (getter)py_lv_timer_t_getattro, + .tp_setattro = (setter)py_lv_timer_t_setattro, + .tp_new = py_lv_timer_t_new, + .tp_methods = py_lv_timer_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * inline static bool lv_obj_get_style_line_rounded_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_line_rounded_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_timer_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_rounded_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_timer_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_timer_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_timer_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_line_rounded_internal_def = { - "lv_obj_get_style_line_rounded_internal", - (PyCFunction)py_lv_obj_get_style_line_rounded_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_timer_t mp_write_scratch_lv_timer_t; -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_line_color_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_line_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_timer_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_timer_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_timer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_timer_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_timer_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_timer_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_timer_t or dict, got None"); + } + memset(&mp_write_scratch_lv_timer_t, 0, sizeof(lv_timer_t)); + return &mp_write_scratch_lv_timer_t; } -static PyMethodDef py_lv_obj_get_style_line_color_internal_def = { - "lv_obj_get_style_line_color_internal", - (PyCFunction)py_lv_obj_get_style_line_color_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_timer_t(struct_obj) (*((lv_timer_t*)mp_write_value_ptr_lv_timer_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_line_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_line_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_timer_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_color_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp_struct(&py_lv_timer_t_type, field); } -static PyMethodDef py_lv_obj_get_style_line_color_filtered_internal_def = { - "lv_obj_get_style_line_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_line_color_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_timer_t(field) lv_to_mp_struct_own(&py_lv_timer_t_type, copy_buffer(&field, sizeof(lv_timer_t))) +#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) /* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_line_opa_internal(const lv_obj_t *obj, lv_part_t part) + * Struct lv_display_t (CPython) */ -static PyObject *py_lv_obj_get_style_line_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_display_t_methods[]; + +static PyObject *py_lv_display_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_line_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_display_t *data = (lv_display_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "hor_res") == 0) return mp_obj_new_int(data->hor_res); + if (strcmp(attr, "ver_res") == 0) return mp_obj_new_int(data->ver_res); + if (strcmp(attr, "physical_hor_res") == 0) return mp_obj_new_int(data->physical_hor_res); + if (strcmp(attr, "physical_ver_res") == 0) return mp_obj_new_int(data->physical_ver_res); + if (strcmp(attr, "offset_x") == 0) return mp_obj_new_int(data->offset_x); + if (strcmp(attr, "offset_y") == 0) return mp_obj_new_int(data->offset_y); + if (strcmp(attr, "dpi") == 0) return mp_obj_new_int_from_uint(data->dpi); + if (strcmp(attr, "buf_1") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_1); + if (strcmp(attr, "buf_2") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_2); + if (strcmp(attr, "buf_3") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_3); + if (strcmp(attr, "buf_act") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_act); + if (strcmp(attr, "flush_cb") == 0) return mp_lv_funcptr(NULL, data->flush_cb, lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", data->user_data); + if (strcmp(attr, "flush_wait_cb") == 0) return mp_lv_funcptr(NULL, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback, "lv_display_t_flush_wait_cb", data->user_data); + if (strcmp(attr, "flushing") == 0) return mp_obj_new_int(data->flushing); + if (strcmp(attr, "flushing_last") == 0) return mp_obj_new_int(data->flushing_last); + if (strcmp(attr, "last_area") == 0) return mp_obj_new_int_from_uint(data->last_area); + if (strcmp(attr, "last_part") == 0) return mp_obj_new_int_from_uint(data->last_part); + if (strcmp(attr, "sync_cb") == 0) return mp_lv_funcptr(NULL, data->sync_cb, lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", data->user_data); + if (strcmp(attr, "sync_wait_cb") == 0) return mp_lv_funcptr(NULL, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback, "lv_display_t_sync_wait_cb", data->user_data); + if (strcmp(attr, "syncing") == 0) return mp_obj_new_int(data->syncing); + if (strcmp(attr, "syncing_last") == 0) return mp_obj_new_int(data->syncing_last); + if (strcmp(attr, "sync_areas") == 0) return mp_read_byref_lv_ll_t(data->sync_areas); + if (strcmp(attr, "render_mode") == 0) return mp_obj_new_int(data->render_mode); + if (strcmp(attr, "antialiasing") == 0) return mp_obj_new_int_from_uint(data->antialiasing); + if (strcmp(attr, "tile_cnt") == 0) return mp_obj_new_int_from_uint(data->tile_cnt); + if (strcmp(attr, "stride_is_auto") == 0) return mp_obj_new_int_from_uint(data->stride_is_auto); + if (strcmp(attr, "rendering_in_progress") == 0) return mp_obj_new_int_from_uint(data->rendering_in_progress); + if (strcmp(attr, "color_format") == 0) return mp_obj_new_int(data->color_format); + if (strcmp(attr, "inv_areas") == 0) return lvpy_struct_array_new(self, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_value_ptr_lv_area_t); + if (strcmp(attr, "inv_area_joined") == 0) return ptr_to_mp(data->inv_area_joined); + if (strcmp(attr, "inv_p") == 0) return mp_obj_new_int_from_uint(data->inv_p); + if (strcmp(attr, "inv_en_cnt") == 0) return mp_obj_new_int(data->inv_en_cnt); + if (strcmp(attr, "_static_buf1") == 0) return mp_read_byref_lv_draw_buf_t(data->_static_buf1); + if (strcmp(attr, "_static_buf2") == 0) return mp_read_byref_lv_draw_buf_t(data->_static_buf2); + if (strcmp(attr, "layer_head") == 0) return mp_read_ptr_lv_layer_t((void*)data->layer_head); + if (strcmp(attr, "screens") == 0) return ptr_to_mp((void*)data->screens); + if (strcmp(attr, "sys_layer") == 0) return lv_to_mp((void*)data->sys_layer); + if (strcmp(attr, "top_layer") == 0) return lv_to_mp((void*)data->top_layer); + if (strcmp(attr, "act_scr") == 0) return lv_to_mp((void*)data->act_scr); + if (strcmp(attr, "bottom_layer") == 0) return lv_to_mp((void*)data->bottom_layer); + if (strcmp(attr, "prev_scr") == 0) return lv_to_mp((void*)data->prev_scr); + if (strcmp(attr, "scr_to_load") == 0) return lv_to_mp((void*)data->scr_to_load); + if (strcmp(attr, "screen_cnt") == 0) return mp_obj_new_int_from_uint(data->screen_cnt); + if (strcmp(attr, "draw_prev_over_act") == 0) return mp_obj_new_int_from_uint(data->draw_prev_over_act); + if (strcmp(attr, "del_prev") == 0) return mp_obj_new_int_from_uint(data->del_prev); + if (strcmp(attr, "driver_data") == 0) return ptr_to_mp((void*)data->driver_data); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "event_list") == 0) return mp_read_byref_lv_event_list_t(data->event_list); + if (strcmp(attr, "rotation") == 0) return mp_obj_new_int_from_uint(data->rotation); + if (strcmp(attr, "matrix_rotation") == 0) return mp_obj_new_int_from_uint(data->matrix_rotation); + if (strcmp(attr, "theme") == 0) return mp_read_ptr_lv_theme_t((void*)data->theme); + if (strcmp(attr, "refr_timer") == 0) return mp_read_ptr_lv_timer_t((void*)data->refr_timer); + if (strcmp(attr, "last_activity_time") == 0) return mp_obj_new_int_from_uint(data->last_activity_time); + if (strcmp(attr, "refreshed_area") == 0) return mp_read_byref_lv_area_t(data->refreshed_area); + if (strcmp(attr, "vsync_count") == 0) return mp_obj_new_int_from_uint(data->vsync_count); + for (PyMethodDef *m = py_lv_display_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_line_opa_internal_def = { - "lv_obj_get_style_line_opa_internal", - (PyCFunction)py_lv_obj_get_style_line_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_display_t_field_names[] = {"hor_res", "ver_res", "physical_hor_res", "physical_ver_res", "offset_x", "offset_y", "dpi", "buf_1", "buf_2", "buf_3", "buf_act", "flush_cb", "flush_wait_cb", "flushing", "flushing_last", "last_area", "last_part", "sync_cb", "sync_wait_cb", "syncing", "syncing_last", "sync_areas", "render_mode", "antialiasing", "tile_cnt", "stride_is_auto", "rendering_in_progress", "color_format", "inv_areas", "inv_area_joined", "inv_p", "inv_en_cnt", "_static_buf1", "_static_buf2", "layer_head", "screens", "sys_layer", "top_layer", "act_scr", "bottom_layer", "prev_scr", "scr_to_load", "screen_cnt", "draw_prev_over_act", "del_prev", "driver_data", "user_data", "event_list", "rotation", "matrix_rotation", "theme", "refr_timer", "last_activity_time", "refreshed_area", "vsync_count", NULL}; -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_arc_width_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_arc_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_width_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_display_t_field_names, py_lv_display_t_methods); } -static PyMethodDef py_lv_obj_get_style_arc_width_internal_def = { - "lv_obj_get_style_arc_width_internal", - (PyCFunction)py_lv_obj_get_style_arc_width_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_display_t_type_methods[] = { + {"__dir__", py_lv_display_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * inline static bool lv_obj_get_style_arc_rounded_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_arc_rounded_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_display_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_rounded_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_display_t *data = (lv_display_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_display_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "hor_res") == 0) { data->hor_res = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ver_res") == 0) { data->ver_res = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "physical_hor_res") == 0) { data->physical_hor_res = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "physical_ver_res") == 0) { data->physical_ver_res = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "offset_x") == 0) { data->offset_x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "offset_y") == 0) { data->offset_y = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dpi") == 0) { data->dpi = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "buf_1") == 0) { data->buf_1 = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "buf_2") == 0) { data->buf_2 = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "buf_3") == 0) { data->buf_3 = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "buf_act") == 0) { data->buf_act = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "flush_cb") == 0) { data->flush_cb = mp_lv_callback(value, lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "flush_wait_cb") == 0) { data->flush_wait_cb = mp_lv_callback(value, lv_display_t_flush_wait_cb_callback, "lv_display_t_flush_wait_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "flushing") == 0) { data->flushing = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "flushing_last") == 0) { data->flushing_last = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_area") == 0) { data->last_area = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "last_part") == 0) { data->last_part = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "sync_cb") == 0) { data->sync_cb = mp_lv_callback(value, lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "sync_wait_cb") == 0) { data->sync_wait_cb = mp_lv_callback(value, lv_display_t_sync_wait_cb_callback, "lv_display_t_sync_wait_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "syncing") == 0) { data->syncing = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "syncing_last") == 0) { data->syncing_last = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "sync_areas") == 0) { data->sync_areas = mp_write_lv_ll_t(value); result = 0; } + if (strcmp(attr, "render_mode") == 0) { data->render_mode = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "antialiasing") == 0) { data->antialiasing = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "tile_cnt") == 0) { data->tile_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "stride_is_auto") == 0) { data->stride_is_auto = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "rendering_in_progress") == 0) { data->rendering_in_progress = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color_format") == 0) { data->color_format = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "inv_areas") == 0) { lvpy_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_value_ptr_lv_area_t, value); result = 0; } + if (strcmp(attr, "inv_area_joined") == 0) { memcpy((void*)&data->inv_area_joined, mp_to_ptr(value), sizeof(uint8_t)*32); result = 0; } + if (strcmp(attr, "inv_p") == 0) { data->inv_p = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "inv_en_cnt") == 0) { data->inv_en_cnt = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "_static_buf1") == 0) { data->_static_buf1 = mp_write_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "_static_buf2") == 0) { data->_static_buf2 = mp_write_lv_draw_buf_t(value); result = 0; } + if (strcmp(attr, "layer_head") == 0) { data->layer_head = (void*)mp_write_ptr_lv_layer_t(value); result = 0; } + if (strcmp(attr, "screens") == 0) { data->screens = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "sys_layer") == 0) { data->sys_layer = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "top_layer") == 0) { data->top_layer = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "act_scr") == 0) { data->act_scr = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "bottom_layer") == 0) { data->bottom_layer = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "prev_scr") == 0) { data->prev_scr = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "scr_to_load") == 0) { data->scr_to_load = (void*)mp_to_lv(value); result = 0; } + if (strcmp(attr, "screen_cnt") == 0) { data->screen_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "draw_prev_over_act") == 0) { data->draw_prev_over_act = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "del_prev") == 0) { data->del_prev = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "driver_data") == 0) { data->driver_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "event_list") == 0) { data->event_list = mp_write_lv_event_list_t(value); result = 0; } + if (strcmp(attr, "rotation") == 0) { data->rotation = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "matrix_rotation") == 0) { data->matrix_rotation = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "theme") == 0) { data->theme = (void*)mp_write_ptr_lv_theme_t(value); result = 0; } + if (strcmp(attr, "refr_timer") == 0) { data->refr_timer = (void*)mp_write_ptr_lv_timer_t(value); result = 0; } + if (strcmp(attr, "last_activity_time") == 0) { data->last_activity_time = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "refreshed_area") == 0) { data->refreshed_area = mp_write_lv_area_t(value); result = 0; } + if (strcmp(attr, "vsync_count") == 0) { data->vsync_count = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_display_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_obj_get_style_arc_rounded_internal_def = { - "lv_obj_get_style_arc_rounded_internal", - (PyCFunction)py_lv_obj_get_style_arc_rounded_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_display_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_display_t)); +} -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_arc_color_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_arc_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_display_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_arc_color_internal_def = { - "lv_obj_get_style_arc_color_internal", - (PyCFunction)py_lv_obj_get_style_arc_color_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_display_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_display_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_display_t_dealloc, + .tp_getattro = (getter)py_lv_display_t_getattro, + .tp_setattro = (setter)py_lv_display_t_setattro, + .tp_new = py_lv_display_t_new, + .tp_methods = py_lv_display_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_arc_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_arc_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_display_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_color_filtered_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_display_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_display_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_display_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_arc_color_filtered_internal_def = { - "lv_obj_get_style_arc_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_arc_color_filtered_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_display_t mp_write_scratch_lv_display_t; -/* - * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_arc_opa_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_arc_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_display_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_opa_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_display_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_display_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_display_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_display_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_display_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_display_t or dict, got None"); + } + memset(&mp_write_scratch_lv_display_t, 0, sizeof(lv_display_t)); + return &mp_write_scratch_lv_display_t; } -static PyMethodDef py_lv_obj_get_style_arc_opa_internal_def = { - "lv_obj_get_style_arc_opa_internal", - (PyCFunction)py_lv_obj_get_style_arc_opa_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_display_t(struct_obj) (*((lv_display_t*)mp_write_value_ptr_lv_display_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static const void *lv_obj_get_style_arc_image_src_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_arc_image_src_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_display_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const void * _res; - lvpy_lock(); - _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_arc_image_src_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return lv_to_mp_struct(&py_lv_display_t_type, field); } -static PyMethodDef py_lv_obj_get_style_arc_image_src_internal_def = { - "lv_obj_get_style_arc_image_src_internal", - (PyCFunction)py_lv_obj_get_style_arc_image_src_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_display_t(field) lv_to_mp_struct_own(&py_lv_display_t_type, copy_buffer(&field, sizeof(lv_display_t))) +#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_color_internal(const lv_obj_t *obj, lv_part_t part) + * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_text_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_display(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_display_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color_internal)(obj, part); + _res = ((lv_display_t *(*)(const lv_obj_t *))lv_obj_get_display)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_obj_get_style_text_color_internal_def = { - "lv_obj_get_style_text_color_internal", - (PyCFunction)py_lv_obj_get_style_text_color_internal, +static PyMethodDef py_lv_obj_get_display_def = { + "lv_obj_get_display", + (PyCFunction)py_lv_obj_get_display, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10322,30 +9940,28 @@ static PyMethodDef py_lv_obj_get_style_text_color_internal_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_parent(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_text_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_parent(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_color_filtered_internal)(obj, part); + _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_obj_get_parent)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_text_color_filtered_internal_def = { - "lv_obj_get_style_text_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_text_color_filtered_internal, +static PyMethodDef py_lv_obj_get_parent_def = { + "lv_obj_get_parent", + (PyCFunction)py_lv_obj_get_parent, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10353,115 +9969,102 @@ static PyMethodDef py_lv_obj_get_style_text_color_filtered_internal_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_text_opa_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) */ -static PyObject *py_lv_obj_get_style_text_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_child(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long idx_val; + if (!PyArg_ParseTuple(py_args, "l", &idx_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t idx = (int32_t)idx_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_opa_internal)(obj, part); + _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_obj_get_child)(obj, idx); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_text_opa_internal_def = { - "lv_obj_get_style_text_opa_internal", - (PyCFunction)py_lv_obj_get_style_text_opa_internal, +static PyMethodDef py_lv_obj_get_child_def = { + "lv_obj_get_child", + (PyCFunction)py_lv_obj_get_child, METH_VARARGS | METH_KEYWORDS, NULL }; -#define funcptr_get_glyph_dsc NULL - -static inline PyObject *mp_lv_funcptr_get_glyph_dsc(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next); -#define funcptr_get_glyph_bitmap NULL - -static inline PyObject *mp_lv_funcptr_get_glyph_bitmap(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +#define funcptr_constructor_cb NULL +static inline PyObject *mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_font_t_get_glyph_bitmap' - * const void *(*get_glyph_bitmap)(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) - */ - -#define funcptr_release_glyph NULL +static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); +#define funcptr_event_cb_1 NULL -static inline PyObject *mp_lv_funcptr_release_glyph(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static inline PyObject *mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -static void lv_font_t_release_glyph_callback(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc); +static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); /* - * Struct lv_font_t (CPython) + * Struct lv_obj_class_t (CPython) */ -extern PyMethodDef py_lv_font_t_methods[]; +extern PyMethodDef py_lv_obj_class_t_methods[]; -static PyObject *py_lv_font_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_class_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_t *data = (lv_font_t*)inst->data; + lv_obj_class_t *data = (lv_obj_class_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "dsc") == 0) return ptr_to_mp((void*)data->dsc); - if (strcmp(attr, "fallback") == 0) return ptr_to_mp((void*)data->fallback); + if (strcmp(attr, "base_class") == 0) return ptr_to_mp((void*)data->base_class); + if (strcmp(attr, "constructor_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback, "lv_obj_class_t_constructor_cb", data->user_data); + if (strcmp(attr, "destructor_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback, "lv_obj_class_t_destructor_cb", data->user_data); + if (strcmp(attr, "event_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->event_cb, lv_obj_class_t_event_cb_callback, "lv_obj_class_t_event_cb", data->user_data); if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "get_glyph_dsc") == 0) return mp_lv_funcptr(NULL, (void*)data->get_glyph_dsc, lv_font_t_get_glyph_dsc_callback, "lv_font_t_get_glyph_dsc", data->user_data); - if (strcmp(attr, "get_glyph_bitmap") == 0) return mp_lv_funcptr(NULL, (void*)data->get_glyph_bitmap, NULL, "lv_font_t_get_glyph_bitmap", NULL); - if (strcmp(attr, "release_glyph") == 0) return mp_lv_funcptr(NULL, (void*)data->release_glyph, lv_font_t_release_glyph_callback, "lv_font_t_release_glyph", data->user_data); - if (strcmp(attr, "line_height") == 0) return mp_obj_new_int(data->line_height); - if (strcmp(attr, "base_line") == 0) return mp_obj_new_int(data->base_line); - if (strcmp(attr, "cap_height") == 0) return mp_obj_new_int(data->cap_height); - if (strcmp(attr, "x_height") == 0) return mp_obj_new_int(data->x_height); - if (strcmp(attr, "subpx") == 0) return mp_obj_new_int_from_uint(data->subpx); - if (strcmp(attr, "kerning") == 0) return mp_obj_new_int_from_uint(data->kerning); - if (strcmp(attr, "static_bitmap") == 0) return mp_obj_new_int_from_uint(data->static_bitmap); - if (strcmp(attr, "underline_position") == 0) return mp_obj_new_int(data->underline_position); - if (strcmp(attr, "underline_thickness") == 0) return mp_obj_new_int(data->underline_thickness); - for (PyMethodDef *m = py_lv_font_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); + if (strcmp(attr, "width_def") == 0) return mp_obj_new_int(data->width_def); + if (strcmp(attr, "height_def") == 0) return mp_obj_new_int(data->height_def); + if (strcmp(attr, "editable") == 0) return mp_obj_new_int_from_uint(data->editable); + if (strcmp(attr, "group_def") == 0) return mp_obj_new_int_from_uint(data->group_def); + if (strcmp(attr, "instance_size") == 0) return mp_obj_new_int_from_uint(data->instance_size); + if (strcmp(attr, "theme_inheritable") == 0) return mp_obj_new_int_from_uint(data->theme_inheritable); + for (PyMethodDef *m = py_lv_obj_class_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_font_t_field_names[] = {"dsc", "fallback", "user_data", "get_glyph_dsc", "get_glyph_bitmap", "release_glyph", "line_height", "base_line", "cap_height", "x_height", "subpx", "kerning", "static_bitmap", "underline_position", "underline_thickness", NULL}; +static const char *const py_lv_obj_class_t_field_names[] = {"base_class", "constructor_cb", "destructor_cb", "event_cb", "user_data", "name", "width_def", "height_def", "editable", "group_def", "instance_size", "theme_inheritable", NULL}; -static PyObject *py_lv_font_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_obj_class_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_font_t_field_names, py_lv_font_t_methods); + return lvpy_struct_dir(self, py_lv_obj_class_t_field_names, py_lv_obj_class_t_methods); } -static PyMethodDef py_lv_font_t_type_methods[] = { - {"__dir__", py_lv_font_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_obj_class_t_type_methods[] = { + {"__dir__", py_lv_obj_class_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_font_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_obj_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_font_t *data = (lv_font_t*)inst->data; + lv_obj_class_t *data = (lv_obj_class_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -10469,125 +10072,123 @@ static int py_lv_font_t_setattro(PyObject *self, PyObject *name, PyObject *value const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_font_t saved; + lv_obj_class_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "dsc") == 0) { data->dsc = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "fallback") == 0) { data->fallback = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "base_class") == 0) { data->base_class = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "constructor_cb") == 0) { data->constructor_cb = (void*)mp_lv_callback(value, lv_obj_class_t_constructor_cb_callback, "lv_obj_class_t_constructor_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "destructor_cb") == 0) { data->destructor_cb = (void*)mp_lv_callback(value, lv_obj_class_t_destructor_cb_callback, "lv_obj_class_t_destructor_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "event_cb") == 0) { data->event_cb = (void*)mp_lv_callback(value, lv_obj_class_t_event_cb_callback, "lv_obj_class_t_event_cb", &data->user_data, data, NULL, NULL); result = 0; } if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "get_glyph_dsc") == 0) { data->get_glyph_dsc = (void*)mp_lv_callback(value, lv_font_t_get_glyph_dsc_callback, "lv_font_t_get_glyph_dsc", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "get_glyph_bitmap") == 0) { data->get_glyph_bitmap = (void*)mp_lv_callback(value, NULL, "lv_font_t_get_glyph_bitmap", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "release_glyph") == 0) { data->release_glyph = (void*)mp_lv_callback(value, lv_font_t_release_glyph_callback, "lv_font_t_release_glyph", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "line_height") == 0) { data->line_height = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "base_line") == 0) { data->base_line = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "cap_height") == 0) { data->cap_height = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "x_height") == 0) { data->x_height = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "subpx") == 0) { data->subpx = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "kerning") == 0) { data->kerning = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "static_bitmap") == 0) { data->static_bitmap = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "underline_position") == 0) { data->underline_position = (int8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "underline_thickness") == 0) { data->underline_thickness = (int8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } + if (strcmp(attr, "width_def") == 0) { data->width_def = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "height_def") == 0) { data->height_def = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "editable") == 0) { data->editable = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "group_def") == 0) { data->group_def = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "instance_size") == 0) { data->instance_size = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "theme_inheritable") == 0) { data->theme_inheritable = (uint32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_font_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_obj_class_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_font_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_obj_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_font_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_obj_class_t)); } -static void py_lv_font_t_dealloc(py_lv_struct_t *self) +static void py_lv_obj_class_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_font_t_type = { +PyTypeObject py_lv_obj_class_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_font_t", + .tp_name = "lvgl.lv_obj_class_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_font_t_dealloc, - .tp_getattro = (getter)py_lv_font_t_getattro, - .tp_setattro = (setter)py_lv_font_t_setattro, - .tp_new = py_lv_font_t_new, - .tp_methods = py_lv_font_t_type_methods, + .tp_dealloc = (destructor)py_lv_obj_class_t_dealloc, + .tp_getattro = (getter)py_lv_obj_class_t_getattro, + .tp_setattro = (setter)py_lv_obj_class_t_setattro, + .tp_new = py_lv_obj_class_t_new, + .tp_methods = py_lv_obj_class_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_font_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_obj_class_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_font_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_font_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_obj_class_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_obj_class_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_font_t*)self->data; + return (lv_obj_class_t*)self->data; } -static lv_font_t mp_write_scratch_lv_font_t; +static lv_obj_class_t mp_write_scratch_lv_obj_class_t; -static inline void* mp_write_value_ptr_lv_font_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_obj_class_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_font_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_obj_class_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_font_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_font_t)); + memcpy(&mp_write_scratch_lv_obj_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_obj_class_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_font_t; + return &mp_write_scratch_lv_obj_class_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_font_t(value); + void *p = mp_write_ptr_lv_obj_class_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_font_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_obj_class_t or dict, got None"); } - memset(&mp_write_scratch_lv_font_t, 0, sizeof(lv_font_t)); - return &mp_write_scratch_lv_font_t; + memset(&mp_write_scratch_lv_obj_class_t, 0, sizeof(lv_obj_class_t)); + return &mp_write_scratch_lv_obj_class_t; } -#define mp_write_lv_font_t(struct_obj) (*((lv_font_t*)mp_write_value_ptr_lv_font_t(struct_obj))) +#define mp_write_lv_obj_class_t(struct_obj) (*((lv_obj_class_t*)mp_write_value_ptr_lv_obj_class_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_font_t(void *field) +static inline PyObject *mp_read_ptr_lv_obj_class_t(void *field) { - return lv_to_mp_struct(&py_lv_font_t_type, field); + return lv_to_mp_struct(&py_lv_obj_class_t_type, field); } -#define mp_read_lv_font_t(field) lv_to_mp_struct_own(&py_lv_font_t_type, copy_buffer(&field, sizeof(lv_font_t))) -#define mp_read_byref_lv_font_t(field) mp_read_ptr_lv_font_t(&field) +#define mp_read_lv_obj_class_t(field) lv_to_mp_struct_own(&py_lv_obj_class_t_type, copy_buffer(&field, sizeof(lv_obj_class_t))) +#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) /* * lvgl extension definition for: - * inline static const lv_font_t *lv_obj_get_style_text_font_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) */ -static PyObject *py_lv_obj_get_style_text_font_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_child_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long idx_val; PyObject *class_p_py; + if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &class_p_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t idx = (int32_t)idx_val; + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_font_internal)(obj, part); + _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_obj_get_child_by_type)(obj, idx, class_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_text_font_internal_def = { - "lv_obj_get_style_text_font_internal", - (PyCFunction)py_lv_obj_get_style_text_font_internal, +static PyMethodDef py_lv_obj_get_child_by_type_def = { + "lv_obj_get_child_by_type", + (PyCFunction)py_lv_obj_get_child_by_type, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10595,30 +10196,30 @@ static PyMethodDef py_lv_obj_get_style_text_font_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_text_letter_space_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_sibling(const lv_obj_t *obj, int32_t idx) */ -static PyObject *py_lv_obj_get_style_text_letter_space_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_sibling(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long idx_val; + if (!PyArg_ParseTuple(py_args, "l", &idx_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t idx = (int32_t)idx_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_letter_space_internal)(obj, part); + _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_obj_get_sibling)(obj, idx); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_text_letter_space_internal_def = { - "lv_obj_get_style_text_letter_space_internal", - (PyCFunction)py_lv_obj_get_style_text_letter_space_internal, +static PyMethodDef py_lv_obj_get_sibling_def = { + "lv_obj_get_sibling", + (PyCFunction)py_lv_obj_get_sibling, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10626,30 +10227,31 @@ static PyMethodDef py_lv_obj_get_style_text_letter_space_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_text_line_space_internal(const lv_obj_t *obj, lv_part_t part) + * lv_obj_t *lv_obj_get_sibling_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) */ -static PyObject *py_lv_obj_get_style_text_line_space_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_sibling_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long idx_val; PyObject *class_p_py; + if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &class_p_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t idx = (int32_t)idx_val; + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_line_space_internal)(obj, part); + _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_obj_get_sibling_by_type)(obj, idx, class_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_obj_get_style_text_line_space_internal_def = { - "lv_obj_get_style_text_line_space_internal", - (PyCFunction)py_lv_obj_get_style_text_line_space_internal, +static PyMethodDef py_lv_obj_get_sibling_by_type_def = { + "lv_obj_get_sibling_by_type", + (PyCFunction)py_lv_obj_get_sibling_by_type, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10657,30 +10259,28 @@ static PyMethodDef py_lv_obj_get_style_text_line_space_internal_def = { /* * lvgl extension definition for: - * inline static lv_text_decor_t lv_obj_get_style_text_decor_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_text_decor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_child_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_text_decor_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_text_decor_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_decor_internal)(obj, part); + _res = ((uint32_t (*)(const lv_obj_t *))lv_obj_get_child_count)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_text_decor_internal_def = { - "lv_obj_get_style_text_decor_internal", - (PyCFunction)py_lv_obj_get_style_text_decor_internal, +static PyMethodDef py_lv_obj_get_child_count_def = { + "lv_obj_get_child_count", + (PyCFunction)py_lv_obj_get_child_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10688,30 +10288,30 @@ static PyMethodDef py_lv_obj_get_style_text_decor_internal_def = { /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_get_style_text_align_internal(const lv_obj_t *obj, lv_part_t part) + * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static PyObject *py_lv_obj_get_style_text_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_child_count_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *class_p_py; + if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_text_align_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_align_internal)(obj, part); + _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_get_child_count_by_type)(obj, class_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_text_align_internal_def = { - "lv_obj_get_style_text_align_internal", - (PyCFunction)py_lv_obj_get_style_text_align_internal, +static PyMethodDef py_lv_obj_get_child_count_by_type_def = { + "lv_obj_get_child_count_by_type", + (PyCFunction)py_lv_obj_get_child_count_by_type, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10719,30 +10319,28 @@ static PyMethodDef py_lv_obj_get_style_text_align_internal_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_outline_stroke_color_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_index(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_index)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_internal_def = { - "lv_obj_get_style_text_outline_stroke_color_internal", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_internal, +static PyMethodDef py_lv_obj_get_index_def = { + "lv_obj_get_index", + (PyCFunction)py_lv_obj_get_index, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10750,61 +10348,96 @@ static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_internal_def = /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_text_outline_stroke_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_index_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *class_p_py; + if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_color_filtered_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_get_index_by_type)(obj, class_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_color_filtered_internal_def = { - "lv_obj_get_style_text_outline_stroke_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_filtered_internal, +static PyMethodDef py_lv_obj_get_index_by_type_def = { + "lv_obj_get_index_by_type", + (PyCFunction)py_lv_obj_get_index_by_type, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_obj_tree_walk_cb (CPython) + * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) + */ +static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_tree_walk_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } + lv_obj_tree_walk_res_t _c_res = (int)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_text_outline_stroke_width_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_width_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_tree_walk(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + PyObject *cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *start_obj = mp_to_lv(self); + void *user_data = mp_to_ptr(user_data_py); + void *cb = mp_lv_callback(cb_py, &lv_obj_tree_walk_cb_callback, "lv_obj_tree_walk_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_width_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_obj_tree_walk)(start_obj, cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_width_internal_def = { - "lv_obj_get_style_text_outline_stroke_width_internal", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_width_internal, +static PyMethodDef py_lv_obj_tree_walk_def = { + "lv_obj_tree_walk", + (PyCFunction)py_lv_obj_tree_walk, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10812,30 +10445,27 @@ static PyMethodDef py_lv_obj_get_style_text_outline_stroke_width_internal_def = /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_text_outline_stroke_opa_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_dump_tree(lv_obj_t *start_obj) */ -static PyObject *py_lv_obj_get_style_text_outline_stroke_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_dump_tree(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + + lv_obj_t *start_obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_outline_stroke_opa_internal)(obj, part); + ((void (*)(lv_obj_t *))lv_obj_dump_tree)(start_obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_text_outline_stroke_opa_internal_def = { - "lv_obj_get_style_text_outline_stroke_opa_internal", - (PyCFunction)py_lv_obj_get_style_text_outline_stroke_opa_internal, +static PyMethodDef py_lv_obj_dump_tree_def = { + "lv_obj_dump_tree", + (PyCFunction)py_lv_obj_dump_tree, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10843,30 +10473,30 @@ static PyMethodDef py_lv_obj_get_style_text_outline_stroke_opa_internal_def = { /* * lvgl extension definition for: - * inline static lv_text_leading_trim_t lv_obj_get_style_text_leading_trim_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) */ -static PyObject *py_lv_obj_get_style_text_leading_trim_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_text_leading_trim_t _res; lvpy_lock(); - _res = ((lv_text_leading_trim_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_text_leading_trim_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_obj_set_pos)(obj, x, y); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_text_leading_trim_internal_def = { - "lv_obj_get_style_text_leading_trim_internal", - (PyCFunction)py_lv_obj_get_style_text_leading_trim_internal, +static PyMethodDef py_lv_obj_set_pos_def = { + "lv_obj_set_pos", + (PyCFunction)py_lv_obj_set_pos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10874,30 +10504,29 @@ static PyMethodDef py_lv_obj_get_style_text_leading_trim_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_blur_radius_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_x(lv_obj_t *obj, int32_t x) */ -static PyObject *py_lv_obj_get_style_blur_radius_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t x = (int32_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_radius_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_x)(obj, x); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_blur_radius_internal_def = { - "lv_obj_get_style_blur_radius_internal", - (PyCFunction)py_lv_obj_get_style_blur_radius_internal, +static PyMethodDef py_lv_obj_set_x_def = { + "lv_obj_set_x", + (PyCFunction)py_lv_obj_set_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10905,30 +10534,29 @@ static PyMethodDef py_lv_obj_get_style_blur_radius_internal_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_blur_backdrop_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_y(lv_obj_t *obj, int32_t y) */ -static PyObject *py_lv_obj_get_style_blur_backdrop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long y_val; + if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_backdrop_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_y)(obj, y); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_blur_backdrop_internal_def = { - "lv_obj_get_style_blur_backdrop_internal", - (PyCFunction)py_lv_obj_get_style_blur_backdrop_internal, +static PyMethodDef py_lv_obj_set_y_def = { + "lv_obj_set_y", + (PyCFunction)py_lv_obj_set_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10936,30 +10564,30 @@ static PyMethodDef py_lv_obj_get_style_blur_backdrop_internal_def = { /* * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_blur_quality_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_size(lv_obj_t *obj, int32_t w, int32_t h) */ -static PyObject *py_lv_obj_get_style_blur_quality_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long w_val; long h_val; + if (!PyArg_ParseTuple(py_args, "ll", &w_val, &h_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t w = (int32_t)w_val; + int32_t h = (int32_t)h_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_blur_quality_t _res; lvpy_lock(); - _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blur_quality_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_obj_set_size)(obj, w, h); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_blur_quality_internal_def = { - "lv_obj_get_style_blur_quality_internal", - (PyCFunction)py_lv_obj_get_style_blur_quality_internal, +static PyMethodDef py_lv_obj_set_size_def = { + "lv_obj_set_size", + (PyCFunction)py_lv_obj_set_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10967,30 +10595,28 @@ static PyMethodDef py_lv_obj_get_style_blur_quality_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_drop_shadow_radius_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_refr_size(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_drop_shadow_radius_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_refr_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_radius_internal)(obj, part); + _res = ((bool (*)(lv_obj_t *))lv_obj_refr_size)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_radius_internal_def = { - "lv_obj_get_style_drop_shadow_radius_internal", - (PyCFunction)py_lv_obj_get_style_drop_shadow_radius_internal, +static PyMethodDef py_lv_obj_refr_size_def = { + "lv_obj_refr_size", + (PyCFunction)py_lv_obj_refr_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -10998,30 +10624,29 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_radius_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_drop_shadow_offset_x_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_width(lv_obj_t *obj, int32_t w) */ -static PyObject *py_lv_obj_get_style_drop_shadow_offset_x_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long w_val; + if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t w = (int32_t)w_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_x_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_width)(obj, w); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_x_internal_def = { - "lv_obj_get_style_drop_shadow_offset_x_internal", - (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_x_internal, +static PyMethodDef py_lv_obj_set_width_def = { + "lv_obj_set_width", + (PyCFunction)py_lv_obj_set_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11029,30 +10654,29 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_x_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_drop_shadow_offset_y_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_height(lv_obj_t *obj, int32_t h) */ -static PyObject *py_lv_obj_get_style_drop_shadow_offset_y_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long h_val; + if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t h = (int32_t)h_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_offset_y_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_height)(obj, h); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_y_internal_def = { - "lv_obj_get_style_drop_shadow_offset_y_internal", - (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_y_internal, +static PyMethodDef py_lv_obj_set_height_def = { + "lv_obj_set_height", + (PyCFunction)py_lv_obj_set_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11060,30 +10684,29 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_offset_y_internal_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_drop_shadow_color_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_content_width(lv_obj_t *obj, int32_t w) */ -static PyObject *py_lv_obj_get_style_drop_shadow_color_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_content_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long w_val; + if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t w = (int32_t)w_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_content_width)(obj, w); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_drop_shadow_color_internal_def = { - "lv_obj_get_style_drop_shadow_color_internal", - (PyCFunction)py_lv_obj_get_style_drop_shadow_color_internal, +static PyMethodDef py_lv_obj_set_content_width_def = { + "lv_obj_set_content_width", + (PyCFunction)py_lv_obj_set_content_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11091,30 +10714,29 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_color_internal_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_drop_shadow_color_filtered_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_content_height(lv_obj_t *obj, int32_t h) */ -static PyObject *py_lv_obj_get_style_drop_shadow_color_filtered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_content_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long h_val; + if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t h = (int32_t)h_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_color_filtered_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_content_height)(obj, h); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_drop_shadow_color_filtered_internal_def = { - "lv_obj_get_style_drop_shadow_color_filtered_internal", - (PyCFunction)py_lv_obj_get_style_drop_shadow_color_filtered_internal, +static PyMethodDef py_lv_obj_set_content_height_def = { + "lv_obj_set_content_height", + (PyCFunction)py_lv_obj_set_content_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11122,30 +10744,29 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_color_filtered_internal_def = /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_drop_shadow_opa_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_layout(lv_obj_t *obj, uint32_t layout) */ -static PyObject *py_lv_obj_get_style_drop_shadow_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long layout_val; + if (!PyArg_ParseTuple(py_args, "l", &layout_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + uint32_t layout = (uint32_t)layout_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_opa_internal)(obj, part); + ((void (*)(lv_obj_t *, uint32_t))lv_obj_set_layout)(obj, layout); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_drop_shadow_opa_internal_def = { - "lv_obj_get_style_drop_shadow_opa_internal", - (PyCFunction)py_lv_obj_get_style_drop_shadow_opa_internal, +static PyMethodDef py_lv_obj_set_layout_def = { + "lv_obj_set_layout", + (PyCFunction)py_lv_obj_set_layout, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11153,30 +10774,28 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_opa_internal_def = { /* * lvgl extension definition for: - * inline static lv_blur_quality_t lv_obj_get_style_drop_shadow_quality_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_drop_shadow_quality_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_is_layout_positioned(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_blur_quality_t _res; + bool _res; lvpy_lock(); - _res = ((lv_blur_quality_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_drop_shadow_quality_internal)(obj, part); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_layout_positioned)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_drop_shadow_quality_internal_def = { - "lv_obj_get_style_drop_shadow_quality_internal", - (PyCFunction)py_lv_obj_get_style_drop_shadow_quality_internal, +static PyMethodDef py_lv_obj_is_layout_positioned_def = { + "lv_obj_is_layout_positioned", + (PyCFunction)py_lv_obj_is_layout_positioned, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11184,30 +10803,27 @@ static PyMethodDef py_lv_obj_get_style_drop_shadow_quality_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_radius_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_mark_layout_as_dirty(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_radius_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_mark_layout_as_dirty(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radius_internal)(obj, part); + ((void (*)(lv_obj_t *))lv_obj_mark_layout_as_dirty)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_radius_internal_def = { - "lv_obj_get_style_radius_internal", - (PyCFunction)py_lv_obj_get_style_radius_internal, +static PyMethodDef py_lv_obj_mark_layout_as_dirty_def = { + "lv_obj_mark_layout_as_dirty", + (PyCFunction)py_lv_obj_mark_layout_as_dirty, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11215,30 +10831,27 @@ static PyMethodDef py_lv_obj_get_style_radius_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_radial_offset_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_update_layout(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_radial_offset_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_update_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_radial_offset_internal)(obj, part); + ((void (*)(const lv_obj_t *))lv_obj_update_layout)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_radial_offset_internal_def = { - "lv_obj_get_style_radial_offset_internal", - (PyCFunction)py_lv_obj_get_style_radial_offset_internal, +static PyMethodDef py_lv_obj_update_layout_def = { + "lv_obj_update_layout", + (PyCFunction)py_lv_obj_update_layout, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11246,30 +10859,29 @@ static PyMethodDef py_lv_obj_get_style_radial_offset_internal_def = { /* * lvgl extension definition for: - * inline static bool lv_obj_get_style_clip_corner_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) */ -static PyObject *py_lv_obj_get_style_clip_corner_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_align_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_clip_corner_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_align_t))lv_obj_set_align)(obj, align); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_clip_corner_internal_def = { - "lv_obj_get_style_clip_corner_internal", - (PyCFunction)py_lv_obj_get_style_clip_corner_internal, +static PyMethodDef py_lv_obj_set_align_def = { + "lv_obj_set_align", + (PyCFunction)py_lv_obj_set_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11277,30 +10889,31 @@ static PyMethodDef py_lv_obj_get_style_clip_corner_internal_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_opa_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) */ -static PyObject *py_lv_obj_get_style_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *align_py; long x_ofs_val; long y_ofs_val; + if (!PyArg_ParseTuple(py_args, "Oll", &align_py, &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_align_t align = (int)mp_obj_get_int(align_py); + int32_t x_ofs = (int32_t)x_ofs_val; + int32_t y_ofs = (int32_t)y_ofs_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_obj_align)(obj, align, x_ofs, y_ofs); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_opa_internal_def = { - "lv_obj_get_style_opa_internal", - (PyCFunction)py_lv_obj_get_style_opa_internal, +static PyMethodDef py_lv_obj_align_def = { + "lv_obj_align", + (PyCFunction)py_lv_obj_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11308,86 +10921,110 @@ static PyMethodDef py_lv_obj_get_style_opa_internal_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_opa_layered_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) */ -static PyObject *py_lv_obj_get_style_opa_layered_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_align_to(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *base_py; PyObject *align_py; long x_ofs_val; long y_ofs_val; + if (!PyArg_ParseTuple(py_args, "OOll", &base_py, &align_py, &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(base_py); + lv_align_t align = (int)mp_obj_get_int(align_py); + int32_t x_ofs = (int32_t)x_ofs_val; + int32_t y_ofs = (int32_t)y_ofs_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_opa_layered_internal)(obj, part); + ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_obj_align_to)(obj, base, align, x_ofs, y_ofs); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_opa_layered_internal_def = { - "lv_obj_get_style_opa_layered_internal", - (PyCFunction)py_lv_obj_get_style_opa_layered_internal, +static PyMethodDef py_lv_obj_align_to_def = { + "lv_obj_align_to", + (PyCFunction)py_lv_obj_align_to, METH_VARARGS | METH_KEYWORDS, NULL }; -#define funcptr_lv_color_filter_cb_t NULL -static inline PyObject *mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +/* + * lvgl extension definition for: + * void lv_obj_center(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_center(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_center)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_center_def = { + "lv_obj_center", + (PyCFunction)py_lv_obj_center, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); /* - * Struct lv_color_filter_dsc_t (CPython) + * Struct lv_matrix_t (CPython) */ -extern PyMethodDef py_lv_color_filter_dsc_t_methods[]; +extern PyMethodDef py_lv_matrix_t_methods[]; -static PyObject *py_lv_color_filter_dsc_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_matrix_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)inst->data; + lv_matrix_t *data = (lv_matrix_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "filter_cb") == 0) return mp_lv_funcptr(NULL, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback, "lv_color_filter_dsc_t_filter_cb", data->user_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - for (PyMethodDef *m = py_lv_color_filter_dsc_t_methods; m->ml_name != NULL; m++) { + (void)attr; + for (PyMethodDef *m = py_lv_matrix_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_color_filter_dsc_t_field_names[] = {"filter_cb", "user_data", NULL}; +static const char *const py_lv_matrix_t_field_names[] = {NULL}; -static PyObject *py_lv_color_filter_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_matrix_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_color_filter_dsc_t_field_names, py_lv_color_filter_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_matrix_t_field_names, py_lv_matrix_t_methods); } -static PyMethodDef py_lv_color_filter_dsc_t_type_methods[] = { - {"__dir__", py_lv_color_filter_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_matrix_t_type_methods[] = { + {"__dir__", py_lv_matrix_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_color_filter_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_matrix_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)inst->data; + lv_matrix_t *data = (lv_matrix_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -11395,112 +11032,116 @@ static int py_lv_color_filter_dsc_t_setattro(PyObject *self, PyObject *name, PyO const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_color_filter_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "filter_cb") == 0) { data->filter_cb = mp_lv_callback(value, lv_color_filter_dsc_t_filter_cb_callback, "lv_color_filter_dsc_t_filter_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + + (void)value; if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); + return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_color_filter_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_matrix_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_color_filter_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_matrix_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_color_filter_dsc_t)); + return make_new_lv_struct(type, args, kwds, 0); } -static void py_lv_color_filter_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_matrix_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_color_filter_dsc_t_type = { +PyTypeObject py_lv_matrix_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_color_filter_dsc_t", + .tp_name = "lvgl.lv_matrix_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_color_filter_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_color_filter_dsc_t_getattro, - .tp_setattro = (setter)py_lv_color_filter_dsc_t_setattro, - .tp_new = py_lv_color_filter_dsc_t_new, - .tp_methods = py_lv_color_filter_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_matrix_t_dealloc, + .tp_getattro = (getter)py_lv_matrix_t_getattro, + .tp_setattro = (setter)py_lv_matrix_t_setattro, + .tp_new = py_lv_matrix_t_new, + .tp_methods = py_lv_matrix_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_color_filter_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_matrix_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_color_filter_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_filter_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_matrix_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_matrix_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_color_filter_dsc_t*)self->data; + return (lv_matrix_t*)self->data; } -static lv_color_filter_dsc_t mp_write_scratch_lv_color_filter_dsc_t; +#define mp_write_lv_matrix_t(struct_obj) (*((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj))) -static inline void* mp_write_value_ptr_lv_color_filter_dsc_t(PyObject *value) +static inline PyObject *mp_read_ptr_lv_matrix_t(void *field) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_filter_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_color_filter_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_filter_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_color_filter_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_color_filter_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_filter_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_color_filter_dsc_t, 0, sizeof(lv_color_filter_dsc_t)); - return &mp_write_scratch_lv_color_filter_dsc_t; + return lv_to_mp_struct(&py_lv_matrix_t_type, field); } -#define mp_write_lv_color_filter_dsc_t(struct_obj) (*((lv_color_filter_dsc_t*)mp_write_value_ptr_lv_color_filter_dsc_t(struct_obj))) +#define mp_read_lv_matrix_t(field) lv_to_mp_struct_own(&py_lv_matrix_t_type, copy_buffer(&field, sizeof(lv_matrix_t))) +#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) -static inline PyObject *mp_read_ptr_lv_color_filter_dsc_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) + */ +static PyObject *py_lv_obj_set_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_color_filter_dsc_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *matrix_py; + if (!PyArg_ParseTuple(py_args, "O", &matrix_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(matrix_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_obj_set_transform)(obj, matrix); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_color_filter_dsc_t(field) lv_to_mp_struct_own(&py_lv_color_filter_dsc_t_type, copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) -#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) +static PyMethodDef py_lv_obj_set_transform_def = { + "lv_obj_set_transform", + (PyCFunction)py_lv_obj_set_transform, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * inline static const lv_color_filter_dsc_t *lv_obj_get_style_color_filter_dsc_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_reset_transform(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_color_filter_dsc_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_reset_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_color_filter_dsc_t * _res; lvpy_lock(); - _res = ((const lv_color_filter_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_dsc_internal)(obj, part); + ((void (*)(lv_obj_t *))lv_obj_reset_transform)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_color_filter_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_color_filter_dsc_internal_def = { - "lv_obj_get_style_color_filter_dsc_internal", - (PyCFunction)py_lv_obj_get_style_color_filter_dsc_internal, +static PyMethodDef py_lv_obj_reset_transform_def = { + "lv_obj_reset_transform", + (PyCFunction)py_lv_obj_reset_transform, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11508,30 +11149,29 @@ static PyMethodDef py_lv_obj_get_style_color_filter_dsc_internal_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_color_filter_opa_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) */ -static PyObject *py_lv_obj_get_style_color_filter_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_coords(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "O", &coords_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_area_t *coords = mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_color_filter_opa_internal)(obj, part); + ((void (*)(const lv_obj_t *, lv_area_t *))lv_obj_get_coords)(obj, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_color_filter_opa_internal_def = { - "lv_obj_get_style_color_filter_opa_internal", - (PyCFunction)py_lv_obj_get_style_color_filter_opa_internal, +static PyMethodDef py_lv_obj_get_coords_def = { + "lv_obj_get_coords", + (PyCFunction)py_lv_obj_get_coords, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11539,30 +11179,28 @@ static PyMethodDef py_lv_obj_get_style_color_filter_opa_internal_def = { /* * lvgl extension definition for: - * inline static lv_color_t lv_obj_get_style_recolor_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_x(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_recolor_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_x)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_recolor_internal_def = { - "lv_obj_get_style_recolor_internal", - (PyCFunction)py_lv_obj_get_style_recolor_internal, +static PyMethodDef py_lv_obj_get_x_def = { + "lv_obj_get_x", + (PyCFunction)py_lv_obj_get_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -11570,542 +11208,464 @@ static PyMethodDef py_lv_obj_get_style_recolor_internal_def = { /* * lvgl extension definition for: - * inline static lv_opa_t lv_obj_get_style_recolor_opa_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_x2(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_recolor_opa_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_x2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_opa_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_recolor_opa_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_x2)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_recolor_opa_internal_def = { - "lv_obj_get_style_recolor_opa_internal", - (PyCFunction)py_lv_obj_get_style_recolor_opa_internal, +static PyMethodDef py_lv_obj_get_x2_def = { + "lv_obj_get_x2", + (PyCFunction)py_lv_obj_get_x2, METH_VARARGS | METH_KEYWORDS, NULL }; -#define funcptr_lv_anim_exec_xcb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_anim_exec_xcb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_anim_t_exec_cb' - * lv_anim_exec_xcb_t exec_cb + * lvgl extension definition for: + * int32_t lv_obj_get_y(const lv_obj_t *obj) */ +static PyObject *py_lv_obj_get_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_anim_custom_exec_cb_t NULL + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_y)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -static inline PyObject *mp_lv_funcptr_lv_anim_custom_exec_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_get_y_def = { + "lv_obj_get_y", + (PyCFunction)py_lv_obj_get_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *, int32_t); -#define funcptr_lv_anim_start_cb_t NULL -static inline PyObject *mp_lv_funcptr_lv_anim_start_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +/* + * lvgl extension definition for: + * int32_t lv_obj_get_y2(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_y2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static void lv_anim_t_start_cb_callback(lv_anim_t *); -static void lv_anim_t_completed_cb_callback(lv_anim_t *); -static void lv_anim_t_deleted_cb_callback(lv_anim_t *); -#define funcptr_lv_anim_get_value_cb_t NULL + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_y2)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -static inline PyObject *mp_lv_funcptr_lv_anim_get_value_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_get_y2_def = { + "lv_obj_get_y2", + (PyCFunction)py_lv_obj_get_y2, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *); -static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *); -typedef __typeof__( ((lv_anim_t*)(0))->parameter ) lv_anim_parameter_t; /* - * Struct lv_anim_bezier3_para_t (CPython) + * lvgl extension definition for: + * int32_t lv_obj_get_x_aligned(const lv_obj_t *obj) */ - -extern PyMethodDef py_lv_anim_bezier3_para_t_methods[]; - -static PyObject *py_lv_anim_bezier3_para_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_get_x_aligned(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "x1") == 0) return mp_obj_new_int(data->x1); - if (strcmp(attr, "y1") == 0) return mp_obj_new_int(data->y1); - if (strcmp(attr, "x2") == 0) return mp_obj_new_int(data->x2); - if (strcmp(attr, "y2") == 0) return mp_obj_new_int(data->y2); - for (PyMethodDef *m = py_lv_anim_bezier3_para_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_anim_bezier3_para_t_field_names[] = {"x1", "y1", "x2", "y2", NULL}; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static PyObject *py_lv_anim_bezier3_para_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_anim_bezier3_para_t_field_names, py_lv_anim_bezier3_para_t_methods); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_x_aligned)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_bezier3_para_t_type_methods[] = { - {"__dir__", py_lv_anim_bezier3_para_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_x_aligned_def = { + "lv_obj_get_x_aligned", + (PyCFunction)py_lv_obj_get_x_aligned, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_anim_bezier3_para_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_bezier3_para_t *data = (lv_anim_bezier3_para_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_anim_bezier3_para_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "x1") == 0) { data->x1 = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y1") == 0) { data->y1 = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "x2") == 0) { data->x2 = (int16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y2") == 0) { data->y2 = (int16_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_anim_bezier3_para_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_anim_bezier3_para_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_y_aligned(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_y_aligned(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_bezier3_para_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static void py_lv_anim_bezier3_para_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_y_aligned)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_anim_bezier3_para_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_anim_bezier3_para_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_anim_bezier3_para_t_dealloc, - .tp_getattro = (getter)py_lv_anim_bezier3_para_t_getattro, - .tp_setattro = (setter)py_lv_anim_bezier3_para_t_setattro, - .tp_new = py_lv_anim_bezier3_para_t_new, - .tp_methods = py_lv_anim_bezier3_para_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_y_aligned_def = { + "lv_obj_get_y_aligned", + (PyCFunction)py_lv_obj_get_y_aligned, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_anim_bezier3_para_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_anim_bezier3_para_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_bezier3_para_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_anim_bezier3_para_t*)self->data; -} - -static lv_anim_bezier3_para_t mp_write_scratch_lv_anim_bezier3_para_t; -static inline void* mp_write_value_ptr_lv_anim_bezier3_para_t(PyObject *value) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_width(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_bezier3_para_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_anim_bezier3_para_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_bezier3_para_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_anim_bezier3_para_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_anim_bezier3_para_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_bezier3_para_t or dict, got None"); - } - memset(&mp_write_scratch_lv_anim_bezier3_para_t, 0, sizeof(lv_anim_bezier3_para_t)); - return &mp_write_scratch_lv_anim_bezier3_para_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_width)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_anim_bezier3_para_t(struct_obj) (*((lv_anim_bezier3_para_t*)mp_write_value_ptr_lv_anim_bezier3_para_t(struct_obj))) +static PyMethodDef py_lv_obj_get_width_def = { + "lv_obj_get_width", + (PyCFunction)py_lv_obj_get_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_anim_bezier3_para_t(void *field) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_height(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_anim_bezier3_para_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_height)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_anim_bezier3_para_t(field) lv_to_mp_struct_own(&py_lv_anim_bezier3_para_t_type, copy_buffer(&field, sizeof(lv_anim_bezier3_para_t))) -#define mp_read_byref_lv_anim_bezier3_para_t(field) mp_read_ptr_lv_anim_bezier3_para_t(&field) +static PyMethodDef py_lv_obj_get_height_def = { + "lv_obj_get_height", + (PyCFunction)py_lv_obj_get_height, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_anim_parameter_t (CPython) + * lvgl extension definition for: + * int32_t lv_obj_get_content_width(const lv_obj_t *obj) */ - -extern PyMethodDef py_lv_anim_parameter_t_methods[]; - -static PyObject *py_lv_anim_parameter_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_get_content_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_parameter_t *data = (lv_anim_parameter_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "bezier3") == 0) return mp_read_byref_lv_anim_bezier3_para_t(data->bezier3); - for (PyMethodDef *m = py_lv_anim_parameter_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_anim_parameter_t_field_names[] = {"bezier3", NULL}; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static PyObject *py_lv_anim_parameter_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_anim_parameter_t_field_names, py_lv_anim_parameter_t_methods); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_content_width)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_parameter_t_type_methods[] = { - {"__dir__", py_lv_anim_parameter_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_content_width_def = { + "lv_obj_get_content_width", + (PyCFunction)py_lv_obj_get_content_width, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_anim_parameter_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_parameter_t *data = (lv_anim_parameter_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_anim_parameter_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "bezier3") == 0) { data->bezier3 = mp_write_lv_anim_bezier3_para_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_anim_parameter_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_anim_parameter_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_content_height(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_content_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_parameter_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static void py_lv_anim_parameter_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_content_height)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_anim_parameter_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_anim_parameter_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_anim_parameter_t_dealloc, - .tp_getattro = (getter)py_lv_anim_parameter_t_getattro, - .tp_setattro = (setter)py_lv_anim_parameter_t_setattro, - .tp_new = py_lv_anim_parameter_t_new, - .tp_methods = py_lv_anim_parameter_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_content_height_def = { + "lv_obj_get_content_height", + (PyCFunction)py_lv_obj_get_content_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_anim_parameter_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_anim_parameter_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_parameter_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_anim_parameter_t*)self->data; -} - -static lv_anim_parameter_t mp_write_scratch_lv_anim_parameter_t; -static inline void* mp_write_value_ptr_lv_anim_parameter_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_obj_get_content_coords(const lv_obj_t *obj, lv_area_t *area) + */ +static PyObject *py_lv_obj_get_content_coords(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_parameter_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_anim_parameter_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_parameter_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_anim_parameter_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_anim_parameter_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_parameter_t or dict, got None"); - } - memset(&mp_write_scratch_lv_anim_parameter_t, 0, sizeof(lv_anim_parameter_t)); - return &mp_write_scratch_lv_anim_parameter_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(const lv_obj_t *, lv_area_t *))lv_obj_get_content_coords)(obj, area); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_anim_parameter_t(struct_obj) (*((lv_anim_parameter_t*)mp_write_value_ptr_lv_anim_parameter_t(struct_obj))) +static PyMethodDef py_lv_obj_get_content_coords_def = { + "lv_obj_get_content_coords", + (PyCFunction)py_lv_obj_get_content_coords, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_anim_parameter_t(void *field) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_self_width(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_self_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_anim_parameter_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_self_width)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_anim_parameter_t(field) lv_to_mp_struct_own(&py_lv_anim_parameter_t_type, copy_buffer(&field, sizeof(lv_anim_parameter_t))) -#define mp_read_byref_lv_anim_parameter_t(field) mp_read_ptr_lv_anim_parameter_t(&field) +static PyMethodDef py_lv_obj_get_self_width_def = { + "lv_obj_get_self_width", + (PyCFunction)py_lv_obj_get_self_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_anim_t (CPython) + * lvgl extension definition for: + * int32_t lv_obj_get_self_height(const lv_obj_t *obj) */ - -extern PyMethodDef py_lv_anim_t_methods[]; - -static PyObject *py_lv_anim_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_get_self_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_t *data = (lv_anim_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "var") == 0) return ptr_to_mp((void*)data->var); - if (strcmp(attr, "exec_cb") == 0) return mp_lv_funcptr(NULL, data->exec_cb, NULL, "lv_anim_t_exec_cb", NULL); - if (strcmp(attr, "custom_exec_cb") == 0) return mp_lv_funcptr(NULL, data->custom_exec_cb, lv_anim_t_custom_exec_cb_callback, "lv_anim_t_custom_exec_cb", data->user_data); - if (strcmp(attr, "start_cb") == 0) return mp_lv_funcptr(NULL, data->start_cb, lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", data->user_data); - if (strcmp(attr, "completed_cb") == 0) return mp_lv_funcptr(NULL, data->completed_cb, lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", data->user_data); - if (strcmp(attr, "deleted_cb") == 0) return mp_lv_funcptr(NULL, data->deleted_cb, lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", data->user_data); - if (strcmp(attr, "get_value_cb") == 0) return mp_lv_funcptr(NULL, data->get_value_cb, lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", data->user_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "path_cb") == 0) return mp_lv_funcptr(NULL, data->path_cb, lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", data->user_data); - if (strcmp(attr, "start_value") == 0) return mp_obj_new_int(data->start_value); - if (strcmp(attr, "current_value") == 0) return mp_obj_new_int(data->current_value); - if (strcmp(attr, "end_value") == 0) return mp_obj_new_int(data->end_value); - if (strcmp(attr, "duration") == 0) return mp_obj_new_int(data->duration); - if (strcmp(attr, "act_time") == 0) return mp_obj_new_int(data->act_time); - if (strcmp(attr, "reverse_delay") == 0) return mp_obj_new_int_from_uint(data->reverse_delay); - if (strcmp(attr, "reverse_duration") == 0) return mp_obj_new_int_from_uint(data->reverse_duration); - if (strcmp(attr, "repeat_delay") == 0) return mp_obj_new_int_from_uint(data->repeat_delay); - if (strcmp(attr, "repeat_cnt") == 0) return mp_obj_new_int_from_uint(data->repeat_cnt); - if (strcmp(attr, "parameter") == 0) return mp_read_byref_lv_anim_parameter_t(data->parameter); - if (strcmp(attr, "last_timer_run") == 0) return mp_obj_new_int_from_uint(data->last_timer_run); - if (strcmp(attr, "pause_time") == 0) return mp_obj_new_int_from_uint(data->pause_time); - if (strcmp(attr, "pause_duration") == 0) return mp_obj_new_int_from_uint(data->pause_duration); - if (strcmp(attr, "is_paused") == 0) return mp_obj_new_int_from_uint(data->is_paused); - if (strcmp(attr, "reverse_play_in_progress") == 0) return mp_obj_new_int_from_uint(data->reverse_play_in_progress); - if (strcmp(attr, "run_round") == 0) return mp_obj_new_int_from_uint(data->run_round); - if (strcmp(attr, "start_cb_called") == 0) return mp_obj_new_int_from_uint(data->start_cb_called); - if (strcmp(attr, "early_apply") == 0) return mp_obj_new_int_from_uint(data->early_apply); - for (PyMethodDef *m = py_lv_anim_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_anim_t_field_names[] = {"var", "exec_cb", "custom_exec_cb", "start_cb", "completed_cb", "deleted_cb", "get_value_cb", "user_data", "path_cb", "start_value", "current_value", "end_value", "duration", "act_time", "reverse_delay", "reverse_duration", "repeat_delay", "repeat_cnt", "parameter", "last_timer_run", "pause_time", "pause_duration", "is_paused", "reverse_play_in_progress", "run_round", "start_cb_called", "early_apply", NULL}; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static PyObject *py_lv_anim_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_anim_t_field_names, py_lv_anim_t_methods); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_self_height)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_t_type_methods[] = { - {"__dir__", py_lv_anim_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_self_height_def = { + "lv_obj_get_self_height", + (PyCFunction)py_lv_obj_get_self_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_anim_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_anim_t *data = (lv_anim_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_anim_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "var") == 0) { data->var = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "exec_cb") == 0) { data->exec_cb = mp_lv_callback(value, NULL, "lv_anim_t_exec_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "custom_exec_cb") == 0) { data->custom_exec_cb = mp_lv_callback(value, lv_anim_t_custom_exec_cb_callback, "lv_anim_t_custom_exec_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "start_cb") == 0) { data->start_cb = mp_lv_callback(value, lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "completed_cb") == 0) { data->completed_cb = mp_lv_callback(value, lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "deleted_cb") == 0) { data->deleted_cb = mp_lv_callback(value, lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "get_value_cb") == 0) { data->get_value_cb = mp_lv_callback(value, lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "path_cb") == 0) { data->path_cb = mp_lv_callback(value, lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "start_value") == 0) { data->start_value = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "current_value") == 0) { data->current_value = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "end_value") == 0) { data->end_value = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "duration") == 0) { data->duration = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "act_time") == 0) { data->act_time = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "reverse_delay") == 0) { data->reverse_delay = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "reverse_duration") == 0) { data->reverse_duration = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "repeat_delay") == 0) { data->repeat_delay = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "repeat_cnt") == 0) { data->repeat_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "parameter") == 0) { data->parameter = mp_write_lv_anim_parameter_t(value); result = 0; } - if (strcmp(attr, "last_timer_run") == 0) { data->last_timer_run = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pause_time") == 0) { data->pause_time = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "pause_duration") == 0) { data->pause_duration = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "is_paused") == 0) { data->is_paused = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "reverse_play_in_progress") == 0) { data->reverse_play_in_progress = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "run_round") == 0) { data->run_round = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "start_cb_called") == 0) { data->start_cb_called = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "early_apply") == 0) { data->early_apply = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_anim_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_anim_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_style_clamped_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_anim_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; -static void py_lv_anim_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_obj_get_style_clamped_width)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_anim_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_anim_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_anim_t_dealloc, - .tp_getattro = (getter)py_lv_anim_t_getattro, - .tp_setattro = (setter)py_lv_anim_t_setattro, - .tp_new = py_lv_anim_t_new, - .tp_methods = py_lv_anim_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_style_clamped_width_def = { + "lv_obj_get_style_clamped_width", + (PyCFunction)py_lv_obj_get_style_clamped_width, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_anim_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_anim_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_anim_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_anim_t*)self->data; -} - -static lv_anim_t mp_write_scratch_lv_anim_t; -static inline void* mp_write_value_ptr_lv_anim_t(PyObject *value) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_clamped_height(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_style_clamped_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_anim_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_anim_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_anim_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_anim_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_anim_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_anim_t or dict, got None"); - } - memset(&mp_write_scratch_lv_anim_t, 0, sizeof(lv_anim_t)); - return &mp_write_scratch_lv_anim_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(lv_obj_t *))lv_obj_get_style_clamped_height)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_anim_t(struct_obj) (*((lv_anim_t*)mp_write_value_ptr_lv_anim_t(struct_obj))) +static PyMethodDef py_lv_obj_get_style_clamped_height_def = { + "lv_obj_get_style_clamped_height", + (PyCFunction)py_lv_obj_get_style_clamped_height, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_anim_t(void *field) + +/* + * lvgl extension definition for: + * bool lv_obj_is_style_any_width_content(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_style_any_width_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_anim_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_style_any_width_content)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -#define mp_read_lv_anim_t(field) lv_to_mp_struct_own(&py_lv_anim_t_type, copy_buffer(&field, sizeof(lv_anim_t))) -#define mp_read_byref_lv_anim_t(field) mp_read_ptr_lv_anim_t(&field) +static PyMethodDef py_lv_obj_is_style_any_width_content_def = { + "lv_obj_is_style_any_width_content", + (PyCFunction)py_lv_obj_is_style_any_width_content, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * inline static const lv_anim_t *lv_obj_get_style_anim_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_is_style_any_height_content(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_anim_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_is_style_any_height_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_anim_t * _res; + bool _res; lvpy_lock(); - _res = ((const lv_anim_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim_internal)(obj, part); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_style_any_height_content)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_anim_internal_def = { - "lv_obj_get_style_anim_internal", - (PyCFunction)py_lv_obj_get_style_anim_internal, +static PyMethodDef py_lv_obj_is_style_any_height_content_def = { + "lv_obj_is_style_any_height_content", + (PyCFunction)py_lv_obj_is_style_any_height_content, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12113,91 +11673,315 @@ static PyMethodDef py_lv_obj_get_style_anim_internal_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_anim_duration_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_is_width_min(lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_anim_duration_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_is_width_min(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_anim_duration_internal)(obj, part); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_width_min)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_anim_duration_internal_def = { - "lv_obj_get_style_anim_duration_internal", - (PyCFunction)py_lv_obj_get_style_anim_duration_internal, +static PyMethodDef py_lv_obj_is_width_min_def = { + "lv_obj_is_width_min", + (PyCFunction)py_lv_obj_is_width_min, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_style_transition_dsc_t_path_xcb' - * lv_anim_path_cb_t path_xcb + * lvgl extension definition for: + * bool lv_obj_is_height_min(lv_obj_t *obj) */ +static PyObject *py_lv_obj_is_height_min(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_height_min)(obj); + lvpy_unlock(); + PyGILState_Release(gstate); + return convert_to_bool(_res); +} -/* - * Struct lv_style_transition_dsc_t (CPython) - */ +static PyMethodDef py_lv_obj_is_height_min_def = { + "lv_obj_is_height_min", + (PyCFunction)py_lv_obj_is_height_min, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -extern PyMethodDef py_lv_style_transition_dsc_t_methods[]; -static PyObject *py_lv_style_transition_dsc_t_getattro(PyObject *self, PyObject *name) +/* + * lvgl extension definition for: + * bool lv_obj_is_width_max(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_width_max(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "props") == 0) return ptr_to_mp((void*)data->props); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "path_xcb") == 0) return mp_lv_funcptr(NULL, data->path_xcb, NULL, "lv_style_transition_dsc_t_path_xcb", NULL); - if (strcmp(attr, "time") == 0) return mp_obj_new_int_from_uint(data->time); - if (strcmp(attr, "delay") == 0) return mp_obj_new_int_from_uint(data->delay); - for (PyMethodDef *m = py_lv_style_transition_dsc_t_methods; m->ml_name != NULL; m++) { + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_width_max)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_width_max_def = { + "lv_obj_is_width_max", + (PyCFunction)py_lv_obj_is_width_max, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_is_height_max(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_is_height_max(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_obj_is_height_max)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_is_height_max_def = { + "lv_obj_is_height_max", + (PyCFunction)py_lv_obj_is_height_max, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * bool lv_obj_refresh_self_size(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_refresh_self_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *))lv_obj_refresh_self_size)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_refresh_self_size_def = { + "lv_obj_refresh_self_size", + (PyCFunction)py_lv_obj_refresh_self_size, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_refr_pos(lv_obj_t *obj) + */ +static PyObject *py_lv_obj_refr_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_refr_pos)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_refr_pos_def = { + "lv_obj_refr_pos", + (PyCFunction)py_lv_obj_refr_pos, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_move_to(lv_obj_t *obj, int32_t x, int32_t y) + */ +static PyObject *py_lv_obj_move_to(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, int32_t))lv_obj_move_to)(obj, x, y); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_move_to_def = { + "lv_obj_move_to", + (PyCFunction)py_lv_obj_move_to, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) + */ +static PyObject *py_lv_obj_move_children_by(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long x_diff_val; long y_diff_val; long ignore_floating_val; + if (!PyArg_ParseTuple(py_args, "lll", &x_diff_val, &y_diff_val, &ignore_floating_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + int32_t x_diff = (int32_t)x_diff_val; + int32_t y_diff = (int32_t)y_diff_val; + bool ignore_floating = (ignore_floating_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_obj_move_children_by)(obj, x_diff, y_diff, ignore_floating); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_move_children_by_def = { + "lv_obj_move_children_by", + (PyCFunction)py_lv_obj_move_children_by, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) + */ +static PyObject *py_lv_obj_get_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + const lv_matrix_t * _res; + lvpy_lock(); + _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_obj_get_transform)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_ptr_lv_matrix_t((void*)_res); +} + +static PyMethodDef py_lv_obj_get_transform_def = { + "lv_obj_get_transform", + (PyCFunction)py_lv_obj_get_transform, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_point_t (CPython) + */ + +extern PyMethodDef py_lv_point_t_methods[]; + +static PyObject *py_lv_point_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_point_t *data = (lv_point_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "x") == 0) return mp_obj_new_int(data->x); + if (strcmp(attr, "y") == 0) return mp_obj_new_int(data->y); + for (PyMethodDef *m = py_lv_point_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_style_transition_dsc_t_field_names[] = {"props", "user_data", "path_xcb", "time", "delay", NULL}; +static const char *const py_lv_point_t_field_names[] = {"x", "y", NULL}; -static PyObject *py_lv_style_transition_dsc_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_point_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_style_transition_dsc_t_field_names, py_lv_style_transition_dsc_t_methods); + return lvpy_struct_dir(self, py_lv_point_t_field_names, py_lv_point_t_methods); } -static PyMethodDef py_lv_style_transition_dsc_t_type_methods[] = { - {"__dir__", py_lv_style_transition_dsc_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_point_t_type_methods[] = { + {"__dir__", py_lv_point_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_style_transition_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_point_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)inst->data; + lv_point_t *data = (lv_point_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -12205,115 +11989,112 @@ static int py_lv_style_transition_dsc_t_setattro(PyObject *self, PyObject *name, const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_style_transition_dsc_t saved; + lv_point_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "props") == 0) { data->props = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "path_xcb") == 0) { data->path_xcb = mp_lv_callback(value, NULL, "lv_style_transition_dsc_t_path_xcb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "time") == 0) { data->time = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "delay") == 0) { data->delay = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "x") == 0) { data->x = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "y") == 0) { data->y = (int32_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_style_transition_dsc_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_point_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_style_transition_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_point_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_style_transition_dsc_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_point_t)); } -static void py_lv_style_transition_dsc_t_dealloc(py_lv_struct_t *self) +static void py_lv_point_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_style_transition_dsc_t_type = { +PyTypeObject py_lv_point_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_style_transition_dsc_t", + .tp_name = "lvgl.lv_point_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_style_transition_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_style_transition_dsc_t_getattro, - .tp_setattro = (setter)py_lv_style_transition_dsc_t_setattro, - .tp_new = py_lv_style_transition_dsc_t_new, - .tp_methods = py_lv_style_transition_dsc_t_type_methods, + .tp_dealloc = (destructor)py_lv_point_t_dealloc, + .tp_getattro = (getter)py_lv_point_t_getattro, + .tp_setattro = (setter)py_lv_point_t_setattro, + .tp_new = py_lv_point_t_new, + .tp_methods = py_lv_point_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_style_transition_dsc_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_point_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_style_transition_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_style_transition_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_point_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_point_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_style_transition_dsc_t*)self->data; + return (lv_point_t*)self->data; } -static lv_style_transition_dsc_t mp_write_scratch_lv_style_transition_dsc_t; +static lv_point_t mp_write_scratch_lv_point_t; -static inline void* mp_write_value_ptr_lv_style_transition_dsc_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_point_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_style_transition_dsc_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_point_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_style_transition_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_style_transition_dsc_t)); + memcpy(&mp_write_scratch_lv_point_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_point_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_style_transition_dsc_t; + return &mp_write_scratch_lv_point_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_style_transition_dsc_t(value); + void *p = mp_write_ptr_lv_point_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_style_transition_dsc_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_point_t or dict, got None"); } - memset(&mp_write_scratch_lv_style_transition_dsc_t, 0, sizeof(lv_style_transition_dsc_t)); - return &mp_write_scratch_lv_style_transition_dsc_t; + memset(&mp_write_scratch_lv_point_t, 0, sizeof(lv_point_t)); + return &mp_write_scratch_lv_point_t; } -#define mp_write_lv_style_transition_dsc_t(struct_obj) (*((lv_style_transition_dsc_t*)mp_write_value_ptr_lv_style_transition_dsc_t(struct_obj))) +#define mp_write_lv_point_t(struct_obj) (*((lv_point_t*)mp_write_value_ptr_lv_point_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_style_transition_dsc_t(void *field) +static inline PyObject *mp_read_ptr_lv_point_t(void *field) { - return lv_to_mp_struct(&py_lv_style_transition_dsc_t_type, field); + return lv_to_mp_struct(&py_lv_point_t_type, field); } -#define mp_read_lv_style_transition_dsc_t(field) lv_to_mp_struct_own(&py_lv_style_transition_dsc_t_type, copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) -#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) +#define mp_read_lv_point_t(field) lv_to_mp_struct_own(&py_lv_point_t_type, copy_buffer(&field, sizeof(lv_point_t))) +#define mp_read_byref_lv_point_t(field) mp_read_ptr_lv_point_t(&field) /* * lvgl extension definition for: - * inline static const lv_style_transition_dsc_t *lv_obj_get_style_transition_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) */ -static PyObject *py_lv_obj_get_style_transition_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_transform_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *p_py; PyObject *flags_py; + if (!PyArg_ParseTuple(py_args, "OO", &p_py, &flags_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_point_t *p = mp_write_ptr_lv_point_t(p_py); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(flags_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_style_transition_dsc_t * _res; lvpy_lock(); - _res = ((const lv_style_transition_dsc_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transition_internal)(obj, part); + ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_obj_transform_point)(obj, p, flags); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_style_transition_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_transition_internal_def = { - "lv_obj_get_style_transition_internal", - (PyCFunction)py_lv_obj_get_style_transition_internal, +static PyMethodDef py_lv_obj_transform_point_def = { + "lv_obj_transform_point", + (PyCFunction)py_lv_obj_transform_point, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12321,30 +12102,31 @@ static PyMethodDef py_lv_obj_get_style_transition_internal_def = { /* * lvgl extension definition for: - * inline static lv_blend_mode_t lv_obj_get_style_blend_mode_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) */ -static PyObject *py_lv_obj_get_style_blend_mode_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_transform_point_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *points_py; long count_val; PyObject *flags_py; + if (!PyArg_ParseTuple(py_args, "OlO", &points_py, &count_val, &flags_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_point_t *points = mp_to_ptr(points_py); + size_t count = (size_t)count_val; + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(flags_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_blend_mode_t _res; lvpy_lock(); - _res = ((lv_blend_mode_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_blend_mode_internal)(obj, part); + ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_obj_transform_point_array)(obj, points, count, flags); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_blend_mode_internal_def = { - "lv_obj_get_style_blend_mode_internal", - (PyCFunction)py_lv_obj_get_style_blend_mode_internal, +static PyMethodDef py_lv_obj_transform_point_array_def = { + "lv_obj_transform_point_array", + (PyCFunction)py_lv_obj_transform_point_array, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12352,30 +12134,30 @@ static PyMethodDef py_lv_obj_get_style_blend_mode_internal_def = { /* * lvgl extension definition for: - * inline static uint16_t lv_obj_get_style_layout_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) */ -static PyObject *py_lv_obj_get_style_layout_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_transformed_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *area_py; PyObject *flags_py; + if (!PyArg_ParseTuple(py_args, "OO", &area_py, &flags_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(flags_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_layout_internal)(obj, part); + ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_obj_get_transformed_area)(obj, area, flags); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_layout_internal_def = { - "lv_obj_get_style_layout_internal", - (PyCFunction)py_lv_obj_get_style_layout_internal, +static PyMethodDef py_lv_obj_get_transformed_area_def = { + "lv_obj_get_transformed_area", + (PyCFunction)py_lv_obj_get_transformed_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12383,30 +12165,30 @@ static PyMethodDef py_lv_obj_get_style_layout_internal_def = { /* * lvgl extension definition for: - * inline static lv_base_dir_t lv_obj_get_style_base_dir_internal(const lv_obj_t *obj, lv_part_t part) + * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) */ -static PyObject *py_lv_obj_get_style_base_dir_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_invalidate_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_base_dir_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_base_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_base_dir_internal)(obj, part); + _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_obj_invalidate_area)(obj, area); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_base_dir_internal_def = { - "lv_obj_get_style_base_dir_internal", - (PyCFunction)py_lv_obj_get_style_base_dir_internal, +static PyMethodDef py_lv_obj_invalidate_area_def = { + "lv_obj_invalidate_area", + (PyCFunction)py_lv_obj_invalidate_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12414,30 +12196,28 @@ static PyMethodDef py_lv_obj_get_style_base_dir_internal_def = { /* * lvgl extension definition for: - * inline static const void *lv_obj_get_style_bitmap_mask_src_internal(const lv_obj_t *obj, lv_part_t part) + * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_bitmap_mask_src_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_invalidate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const void * _res; + lv_result_t _res; lvpy_lock(); - _res = ((const void *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bitmap_mask_src_internal)(obj, part); + _res = ((lv_result_t (*)(const lv_obj_t *))lv_obj_invalidate)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_bitmap_mask_src_internal_def = { - "lv_obj_get_style_bitmap_mask_src_internal", - (PyCFunction)py_lv_obj_get_style_bitmap_mask_src_internal, +static PyMethodDef py_lv_obj_invalidate_def = { + "lv_obj_invalidate", + (PyCFunction)py_lv_obj_invalidate, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12445,30 +12225,30 @@ static PyMethodDef py_lv_obj_get_style_bitmap_mask_src_internal_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_obj_get_style_rotary_sensitivity_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) */ -static PyObject *py_lv_obj_get_style_rotary_sensitivity_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_area_is_visible(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_rotary_sensitivity_internal)(obj, part); + _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_obj_area_is_visible)(obj, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_rotary_sensitivity_internal_def = { - "lv_obj_get_style_rotary_sensitivity_internal", - (PyCFunction)py_lv_obj_get_style_rotary_sensitivity_internal, +static PyMethodDef py_lv_obj_area_is_visible_def = { + "lv_obj_area_is_visible", + (PyCFunction)py_lv_obj_area_is_visible, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12476,30 +12256,28 @@ static PyMethodDef py_lv_obj_get_style_rotary_sensitivity_internal_def = { /* * lvgl extension definition for: - * inline static lv_flex_flow_t lv_obj_get_style_flex_flow_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_is_visible(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_flex_flow_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_is_visible(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_flex_flow_t _res; + bool _res; lvpy_lock(); - _res = ((lv_flex_flow_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_flow_internal)(obj, part); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_visible)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_flex_flow_internal_def = { - "lv_obj_get_style_flex_flow_internal", - (PyCFunction)py_lv_obj_get_style_flex_flow_internal, +static PyMethodDef py_lv_obj_is_visible_def = { + "lv_obj_is_visible", + (PyCFunction)py_lv_obj_is_visible, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12507,30 +12285,29 @@ static PyMethodDef py_lv_obj_get_style_flex_flow_internal_def = { /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_main_place_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_ext_click_area(lv_obj_t *obj, int32_t size) */ -static PyObject *py_lv_obj_get_style_flex_main_place_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_ext_click_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + int32_t size = (int32_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_flex_align_t _res; lvpy_lock(); - _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_main_place_internal)(obj, part); + ((void (*)(lv_obj_t *, int32_t))lv_obj_set_ext_click_area)(obj, size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_flex_main_place_internal_def = { - "lv_obj_get_style_flex_main_place_internal", - (PyCFunction)py_lv_obj_get_style_flex_main_place_internal, +static PyMethodDef py_lv_obj_set_ext_click_area_def = { + "lv_obj_set_ext_click_area", + (PyCFunction)py_lv_obj_set_ext_click_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12538,30 +12315,29 @@ static PyMethodDef py_lv_obj_get_style_flex_main_place_internal_def = { /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_cross_place_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_get_click_area(const lv_obj_t *obj, lv_area_t *area) */ -static PyObject *py_lv_obj_get_style_flex_cross_place_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_click_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_flex_align_t _res; lvpy_lock(); - _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_cross_place_internal)(obj, part); + ((void (*)(const lv_obj_t *, lv_area_t *))lv_obj_get_click_area)(obj, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_flex_cross_place_internal_def = { - "lv_obj_get_style_flex_cross_place_internal", - (PyCFunction)py_lv_obj_get_style_flex_cross_place_internal, +static PyMethodDef py_lv_obj_get_click_area_def = { + "lv_obj_get_click_area", + (PyCFunction)py_lv_obj_get_click_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12569,30 +12345,30 @@ static PyMethodDef py_lv_obj_get_style_flex_cross_place_internal_def = { /* * lvgl extension definition for: - * inline static lv_flex_align_t lv_obj_get_style_flex_track_place_internal(const lv_obj_t *obj, lv_part_t part) + * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) */ -static PyObject *py_lv_obj_get_style_flex_track_place_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_hit_test(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_flex_align_t _res; + bool _res; lvpy_lock(); - _res = ((lv_flex_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_track_place_internal)(obj, part); + _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_obj_hit_test)(obj, point); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_get_style_flex_track_place_internal_def = { - "lv_obj_get_style_flex_track_place_internal", - (PyCFunction)py_lv_obj_get_style_flex_track_place_internal, +static PyMethodDef py_lv_obj_hit_test_def = { + "lv_obj_hit_test", + (PyCFunction)py_lv_obj_hit_test, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12600,30 +12376,30 @@ static PyMethodDef py_lv_obj_get_style_flex_track_place_internal_def = { /* * lvgl extension definition for: - * inline static uint8_t lv_obj_get_style_flex_grow_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) */ -static PyObject *py_lv_obj_get_style_flex_grow_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_calc_dynamic_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint8_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_flex_grow_internal)(obj, part); + _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_obj_calc_dynamic_width)(obj, prop); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_flex_grow_internal_def = { - "lv_obj_get_style_flex_grow_internal", - (PyCFunction)py_lv_obj_get_style_flex_grow_internal, +static PyMethodDef py_lv_obj_calc_dynamic_width_def = { + "lv_obj_calc_dynamic_width", + (PyCFunction)py_lv_obj_calc_dynamic_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12631,30 +12407,30 @@ static PyMethodDef py_lv_obj_get_style_flex_grow_internal_def = { /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_column_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_calc_dynamic_height(lv_obj_t *obj, lv_style_prop_t prop) */ -static PyObject *py_lv_obj_get_style_grid_column_dsc_array_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_calc_dynamic_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const int32_t * _res; + int32_t _res; lvpy_lock(); - _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_dsc_array_internal)(obj, part); + _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_obj_calc_dynamic_height)(obj, prop); lvpy_unlock(); PyGILState_Release(gstate); - return mp_array_from_i32ptr((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_column_dsc_array_internal_def = { - "lv_obj_get_style_grid_column_dsc_array_internal", - (PyCFunction)py_lv_obj_get_style_grid_column_dsc_array_internal, +static PyMethodDef py_lv_obj_calc_dynamic_height_def = { + "lv_obj_calc_dynamic_height", + (PyCFunction)py_lv_obj_calc_dynamic_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12662,30 +12438,29 @@ static PyMethodDef py_lv_obj_get_style_grid_column_dsc_array_internal_def = { /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_column_align_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) */ -static PyObject *py_lv_obj_get_style_grid_column_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_scrollbar_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *mode_py; + if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_grid_align_t _res; lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_column_align_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_obj_set_scrollbar_mode)(obj, mode); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_grid_column_align_internal_def = { - "lv_obj_get_style_grid_column_align_internal", - (PyCFunction)py_lv_obj_get_style_grid_column_align_internal, +static PyMethodDef py_lv_obj_set_scrollbar_mode_def = { + "lv_obj_set_scrollbar_mode", + (PyCFunction)py_lv_obj_set_scrollbar_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12693,30 +12468,29 @@ static PyMethodDef py_lv_obj_get_style_grid_column_align_internal_def = { /* * lvgl extension definition for: - * inline static const int32_t *lv_obj_get_style_grid_row_dsc_array_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) */ -static PyObject *py_lv_obj_get_style_grid_row_dsc_array_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_scroll_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *dir_py; + if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_dir_t dir = (int)mp_obj_get_int(dir_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const int32_t * _res; lvpy_lock(); - _res = ((const int32_t *(*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_dsc_array_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_dir_t))lv_obj_set_scroll_dir)(obj, dir); lvpy_unlock(); PyGILState_Release(gstate); - return mp_array_from_i32ptr((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_grid_row_dsc_array_internal_def = { - "lv_obj_get_style_grid_row_dsc_array_internal", - (PyCFunction)py_lv_obj_get_style_grid_row_dsc_array_internal, +static PyMethodDef py_lv_obj_set_scroll_dir_def = { + "lv_obj_set_scroll_dir", + (PyCFunction)py_lv_obj_set_scroll_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12724,30 +12498,29 @@ static PyMethodDef py_lv_obj_get_style_grid_row_dsc_array_internal_def = { /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_row_align_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) */ -static PyObject *py_lv_obj_get_style_grid_row_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_scroll_snap_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_scroll_snap_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_grid_align_t _res; lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_row_align_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_obj_set_scroll_snap_x)(obj, align); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_grid_row_align_internal_def = { - "lv_obj_get_style_grid_row_align_internal", - (PyCFunction)py_lv_obj_get_style_grid_row_align_internal, +static PyMethodDef py_lv_obj_set_scroll_snap_x_def = { + "lv_obj_set_scroll_snap_x", + (PyCFunction)py_lv_obj_set_scroll_snap_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12755,30 +12528,29 @@ static PyMethodDef py_lv_obj_get_style_grid_row_align_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_column_pos_internal(const lv_obj_t *obj, lv_part_t part) + * void lv_obj_set_scroll_snap_y(lv_obj_t *obj, lv_scroll_snap_t align) */ -static PyObject *py_lv_obj_get_style_grid_cell_column_pos_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_set_scroll_snap_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *align_py; + if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); + lv_scroll_snap_t align = (int)mp_obj_get_int(align_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_pos_internal)(obj, part); + ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_obj_set_scroll_snap_y)(obj, align); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_style_grid_cell_column_pos_internal_def = { - "lv_obj_get_style_grid_cell_column_pos_internal", - (PyCFunction)py_lv_obj_get_style_grid_cell_column_pos_internal, +static PyMethodDef py_lv_obj_set_scroll_snap_y_def = { + "lv_obj_set_scroll_snap_y", + (PyCFunction)py_lv_obj_set_scroll_snap_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12786,61 +12558,28 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_column_pos_internal_def = { /* * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_cell_x_align_internal(const lv_obj_t *obj, lv_part_t part) + * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_grid_cell_x_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scrollbar_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_grid_align_t _res; - lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_x_align_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_grid_cell_x_align_internal_def = { - "lv_obj_get_style_grid_cell_x_align_internal", - (PyCFunction)py_lv_obj_get_style_grid_cell_x_align_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - -/* - * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_column_span_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_grid_cell_column_span_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_scrollbar_mode_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_column_span_internal)(obj, part); + _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_obj_get_scrollbar_mode)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_column_span_internal_def = { - "lv_obj_get_style_grid_cell_column_span_internal", - (PyCFunction)py_lv_obj_get_style_grid_cell_column_span_internal, +static PyMethodDef py_lv_obj_get_scrollbar_mode_def = { + "lv_obj_get_scrollbar_mode", + (PyCFunction)py_lv_obj_get_scrollbar_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12848,61 +12587,28 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_column_span_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_row_pos_internal(const lv_obj_t *obj, lv_part_t part) + * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_grid_cell_row_pos_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_pos_internal)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_grid_cell_row_pos_internal_def = { - "lv_obj_get_style_grid_cell_row_pos_internal", - (PyCFunction)py_lv_obj_get_style_grid_cell_row_pos_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - -/* - * lvgl extension definition for: - * inline static lv_grid_align_t lv_obj_get_style_grid_cell_y_align_internal(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_grid_cell_y_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_grid_align_t _res; + lv_dir_t _res; lvpy_lock(); - _res = ((lv_grid_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_y_align_internal)(obj, part); + _res = ((lv_dir_t (*)(const lv_obj_t *))lv_obj_get_scroll_dir)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_y_align_internal_def = { - "lv_obj_get_style_grid_cell_y_align_internal", - (PyCFunction)py_lv_obj_get_style_grid_cell_y_align_internal, +static PyMethodDef py_lv_obj_get_scroll_dir_def = { + "lv_obj_get_scroll_dir", + (PyCFunction)py_lv_obj_get_scroll_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12910,30 +12616,28 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_y_align_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_grid_cell_row_span_internal(const lv_obj_t *obj, lv_part_t part) + * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_grid_cell_row_span_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_snap_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_scroll_snap_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_grid_cell_row_span_internal)(obj, part); + _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_obj_get_scroll_snap_x)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_grid_cell_row_span_internal_def = { - "lv_obj_get_style_grid_cell_row_span_internal", - (PyCFunction)py_lv_obj_get_style_grid_cell_row_span_internal, +static PyMethodDef py_lv_obj_get_scroll_snap_x_def = { + "lv_obj_get_scroll_snap_x", + (PyCFunction)py_lv_obj_get_scroll_snap_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12941,31 +12645,28 @@ static PyMethodDef py_lv_obj_get_style_grid_cell_row_span_internal_def = { /* * lvgl extension definition for: - * inline static lv_text_align_t lv_obj_calculate_style_text_align_internal(const lv_obj_t *obj, lv_part_t part, const char *txt) + * lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_calculate_style_text_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_snap_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_text_align_t _res; + lv_scroll_snap_t _res; lvpy_lock(); - _res = ((lv_text_align_t (*)(const lv_obj_t *, lv_part_t, const char *))lv_obj_calculate_style_text_align_internal)(obj, part, txt); + _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_obj_get_scroll_snap_y)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_calculate_style_text_align_internal_def = { - "lv_obj_calculate_style_text_align_internal", - (PyCFunction)py_lv_obj_calculate_style_text_align_internal, +static PyMethodDef py_lv_obj_get_scroll_snap_y_def = { + "lv_obj_get_scroll_snap_y", + (PyCFunction)py_lv_obj_get_scroll_snap_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -12973,30 +12674,28 @@ static PyMethodDef py_lv_obj_calculate_style_text_align_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_left_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_scroll_x(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_space_left_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_left_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_x)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_space_left_internal_def = { - "lv_obj_get_style_space_left_internal", - (PyCFunction)py_lv_obj_get_style_space_left_internal, +static PyMethodDef py_lv_obj_get_scroll_x_def = { + "lv_obj_get_scroll_x", + (PyCFunction)py_lv_obj_get_scroll_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13004,30 +12703,28 @@ static PyMethodDef py_lv_obj_get_style_space_left_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_right_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_scroll_y(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_space_right_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_right_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_y)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_space_right_internal_def = { - "lv_obj_get_style_space_right_internal", - (PyCFunction)py_lv_obj_get_style_space_right_internal, +static PyMethodDef py_lv_obj_get_scroll_y_def = { + "lv_obj_get_scroll_y", + (PyCFunction)py_lv_obj_get_scroll_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13035,30 +12732,28 @@ static PyMethodDef py_lv_obj_get_style_space_right_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_top_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_scroll_top(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_space_top_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_top_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_top)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_space_top_internal_def = { - "lv_obj_get_style_space_top_internal", - (PyCFunction)py_lv_obj_get_style_space_top_internal, +static PyMethodDef py_lv_obj_get_scroll_top_def = { + "lv_obj_get_scroll_top", + (PyCFunction)py_lv_obj_get_scroll_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13066,30 +12761,28 @@ static PyMethodDef py_lv_obj_get_style_space_top_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_space_bottom_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_scroll_bottom(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_space_bottom_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_space_bottom_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_bottom)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_space_bottom_internal_def = { - "lv_obj_get_style_space_bottom_internal", - (PyCFunction)py_lv_obj_get_style_space_bottom_internal, +static PyMethodDef py_lv_obj_get_scroll_bottom_def = { + "lv_obj_get_scroll_bottom", + (PyCFunction)py_lv_obj_get_scroll_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13097,30 +12790,28 @@ static PyMethodDef py_lv_obj_get_style_space_bottom_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_x_safe_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_scroll_left(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_transform_scale_x_safe_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x_safe_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_left)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_scale_x_safe_internal_def = { - "lv_obj_get_style_transform_scale_x_safe_internal", - (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe_internal, +static PyMethodDef py_lv_obj_get_scroll_left_def = { + "lv_obj_get_scroll_left", + (PyCFunction)py_lv_obj_get_scroll_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13128,30 +12819,28 @@ static PyMethodDef py_lv_obj_get_style_transform_scale_x_safe_internal_def = { /* * lvgl extension definition for: - * inline static int32_t lv_obj_get_style_transform_scale_y_safe_internal(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_scroll_right(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_get_style_transform_scale_y_safe_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y_safe_internal)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_right)(obj); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_scale_y_safe_internal_def = { - "lv_obj_get_style_transform_scale_y_safe_internal", - (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe_internal, +static PyMethodDef py_lv_obj_get_scroll_right_def = { + "lv_obj_get_scroll_right", + (PyCFunction)py_lv_obj_get_scroll_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13159,29 +12848,29 @@ static PyMethodDef py_lv_obj_get_style_transform_scale_y_safe_internal_def = { /* * lvgl extension definition for: - * void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow) + * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) */ -static PyObject *py_lv_obj_set_flex_flow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scroll_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flow_py; - if (!PyArg_ParseTuple(py_args, "O", &flow_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *end_py; + if (!PyArg_ParseTuple(py_args, "O", &end_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_flex_flow_t flow = (int)mp_obj_get_int(flow_py); + lv_point_t *end = mp_write_ptr_lv_point_t(end_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_flow_t))lv_obj_set_flex_flow)(obj, flow); + ((void (*)(lv_obj_t *, lv_point_t *))lv_obj_get_scroll_end)(obj, end); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_flex_flow_def = { - "lv_obj_set_flex_flow", - (PyCFunction)py_lv_obj_set_flex_flow, +static PyMethodDef py_lv_obj_get_scroll_end_def = { + "lv_obj_get_scroll_end", + (PyCFunction)py_lv_obj_get_scroll_end, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13189,31 +12878,31 @@ static PyMethodDef py_lv_obj_set_flex_flow_def = { /* * lvgl extension definition for: - * void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place) + * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_set_flex_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scroll_by(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *main_place_py; PyObject *cross_place_py; PyObject *track_cross_place_py; - if (!PyArg_ParseTuple(py_args, "OOO", &main_place_py, &cross_place_py, &track_cross_place_py)) { PyGILState_Release(gstate); return NULL; } + long dx_val; long dy_val; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "llO", &dx_val, &dy_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_flex_align_t main_place = (int)mp_obj_get_int(main_place_py); - lv_flex_align_t cross_place = (int)mp_obj_get_int(cross_place_py); - lv_flex_align_t track_cross_place = (int)mp_obj_get_int(track_cross_place_py); + int32_t dx = (int32_t)dx_val; + int32_t dy = (int32_t)dy_val; + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_flex_align_t, lv_flex_align_t, lv_flex_align_t))lv_obj_set_flex_align)(obj, main_place, cross_place, track_cross_place); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_obj_scroll_by)(obj, dx, dy, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_flex_align_def = { - "lv_obj_set_flex_align", - (PyCFunction)py_lv_obj_set_flex_align, +static PyMethodDef py_lv_obj_scroll_by_def = { + "lv_obj_scroll_by", + (PyCFunction)py_lv_obj_scroll_by, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13221,29 +12910,31 @@ static PyMethodDef py_lv_obj_set_flex_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow) + * void lv_obj_scroll_by_bounded(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_set_flex_grow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scroll_by_bounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long grow_val; - if (!PyArg_ParseTuple(py_args, "l", &grow_val)) { PyGILState_Release(gstate); return NULL; } + long dx_val; long dy_val; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "llO", &dx_val, &dy_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint8_t grow = (uint8_t)grow_val; + int32_t dx = (int32_t)dx_val; + int32_t dy = (int32_t)dy_val; + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, uint8_t))lv_obj_set_flex_grow)(obj, grow); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_obj_scroll_by_bounded)(obj, dx, dy, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_flex_grow_def = { - "lv_obj_set_flex_grow", - (PyCFunction)py_lv_obj_set_flex_grow, +static PyMethodDef py_lv_obj_scroll_by_bounded_def = { + "lv_obj_scroll_by_bounded", + (PyCFunction)py_lv_obj_scroll_by_bounded, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13251,30 +12942,31 @@ static PyMethodDef py_lv_obj_set_flex_grow_def = { /* * lvgl extension definition for: - * void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[]) + * void lv_obj_scroll_to(lv_obj_t *obj, int32_t x, int32_t y, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_set_grid_dsc_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scroll_to(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *col_dsc_py; PyObject *row_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &col_dsc_py, &row_dsc_py)) { PyGILState_Release(gstate); return NULL; } + long x_val; long y_val; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "llO", &x_val, &y_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - const int32_t *col_dsc = (const int32_t *)mp_to_ptr(col_dsc_py); - const int32_t *row_dsc = (const int32_t *)mp_to_ptr(row_dsc_py); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, const int32_t [], const int32_t []))lv_obj_set_grid_dsc_array)(obj, col_dsc, row_dsc); + ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_obj_scroll_to)(obj, x, y, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_grid_dsc_array_def = { - "lv_obj_set_grid_dsc_array", - (PyCFunction)py_lv_obj_set_grid_dsc_array, +static PyMethodDef py_lv_obj_scroll_to_def = { + "lv_obj_scroll_to", + (PyCFunction)py_lv_obj_scroll_to, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13282,30 +12974,30 @@ static PyMethodDef py_lv_obj_set_grid_dsc_array_def = { /* * lvgl extension definition for: - * void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align) + * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_set_grid_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scroll_to_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *column_align_py; PyObject *row_align_py; - if (!PyArg_ParseTuple(py_args, "OO", &column_align_py, &row_align_py)) { PyGILState_Release(gstate); return NULL; } + long x_val; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "lO", &x_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); - lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); + int32_t x = (int32_t)x_val; + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grid_align_t, lv_grid_align_t))lv_obj_set_grid_align)(obj, column_align, row_align); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_obj_scroll_to_x)(obj, x, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_grid_align_def = { - "lv_obj_set_grid_align", - (PyCFunction)py_lv_obj_set_grid_align, +static PyMethodDef py_lv_obj_scroll_to_x_def = { + "lv_obj_scroll_to_x", + (PyCFunction)py_lv_obj_scroll_to_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13313,34 +13005,30 @@ static PyMethodDef py_lv_obj_set_grid_align_def = { /* * lvgl extension definition for: - * void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) + * void lv_obj_scroll_to_y(lv_obj_t *obj, int32_t y, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_set_grid_cell(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scroll_to_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *column_align_py; long col_pos_val; long col_span_val; PyObject *row_align_py; long row_pos_val; long row_span_val; - if (!PyArg_ParseTuple(py_args, "OllOll", &column_align_py, &col_pos_val, &col_span_val, &row_align_py, &row_pos_val, &row_span_val)) { PyGILState_Release(gstate); return NULL; } + long y_val; PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "lO", &y_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_grid_align_t column_align = (int)mp_obj_get_int(column_align_py); - int32_t col_pos = (int32_t)col_pos_val; - int32_t col_span = (int32_t)col_span_val; - lv_grid_align_t row_align = (int)mp_obj_get_int(row_align_py); - int32_t row_pos = (int32_t)row_pos_val; - int32_t row_span = (int32_t)row_span_val; + int32_t y = (int32_t)y_val; + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_grid_align_t, int32_t, int32_t, lv_grid_align_t, int32_t, int32_t))lv_obj_set_grid_cell)(obj, column_align, col_pos, col_span, row_align, row_pos, row_span); + ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_obj_scroll_to_y)(obj, y, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_grid_cell_def = { - "lv_obj_set_grid_cell", - (PyCFunction)py_lv_obj_set_grid_cell, +static PyMethodDef py_lv_obj_scroll_to_y_def = { + "lv_obj_scroll_to_y", + (PyCFunction)py_lv_obj_scroll_to_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13348,27 +13036,29 @@ static PyMethodDef py_lv_obj_set_grid_cell_def = { /* * lvgl extension definition for: - * void lv_obj_delete(lv_obj_t *obj) + * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scroll_to_view(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_delete)(obj); + ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_scroll_to_view)(obj, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_delete_def = { - "lv_obj_delete", - (PyCFunction)py_lv_obj_delete, +static PyMethodDef py_lv_obj_scroll_to_view_def = { + "lv_obj_scroll_to_view", + (PyCFunction)py_lv_obj_scroll_to_view, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13376,27 +13066,29 @@ static PyMethodDef py_lv_obj_delete_def = { /* * lvgl extension definition for: - * void lv_obj_clean(lv_obj_t *obj) + * void lv_obj_scroll_to_view_recursive(lv_obj_t *obj, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_clean(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scroll_to_view_recursive(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_clean)(obj); + ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_scroll_to_view_recursive)(obj, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_clean_def = { - "lv_obj_clean", - (PyCFunction)py_lv_obj_clean, +static PyMethodDef py_lv_obj_scroll_to_view_recursive_def = { + "lv_obj_scroll_to_view_recursive", + (PyCFunction)py_lv_obj_scroll_to_view_recursive, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13404,59 +13096,28 @@ static PyMethodDef py_lv_obj_clean_def = { /* * lvgl extension definition for: - * void lv_obj_delete_delayed(lv_obj_t *obj, uint32_t delay_ms) + * bool lv_obj_is_scrolling(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_delete_delayed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_is_scrolling(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_ms_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_ms_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t delay_ms = (uint32_t)delay_ms_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_obj_delete_delayed)(obj, delay_ms); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_delete_delayed_def = { - "lv_obj_delete_delayed", - (PyCFunction)py_lv_obj_delete_delayed, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - -/* - * lvgl extension definition for: - * void lv_obj_delete_anim_completed_cb(lv_anim_t *a) - */ -static PyObject *py_lv_obj_delete_anim_completed_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *a_py; - if (!PyArg_ParseTuple(py_args, "O", &a_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = mp_write_ptr_lv_anim_t(a_py); + lv_obj_t *obj = mp_to_lv(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_anim_t *))lv_obj_delete_anim_completed_cb)(a); + _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scrolling)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_obj_delete_anim_completed_cb_def = { - "lv_obj_delete_anim_completed_cb", - (PyCFunction)py_lv_obj_delete_anim_completed_cb, +static PyMethodDef py_lv_obj_is_scrolling_def = { + "lv_obj_is_scrolling", + (PyCFunction)py_lv_obj_is_scrolling, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13464,9 +13125,9 @@ static PyMethodDef py_lv_obj_delete_anim_completed_cb_def = { /* * lvgl extension definition for: - * void lv_obj_delete_async(lv_obj_t *obj) + * void lv_obj_stop_scroll_anim(const lv_obj_t *obj) */ -static PyObject *py_lv_obj_delete_async(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_stop_scroll_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -13475,16 +13136,16 @@ static PyObject *py_lv_obj_delete_async(PyObject *self, PyObject *py_args, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_delete_async)(obj); + ((void (*)(const lv_obj_t *))lv_obj_stop_scroll_anim)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_delete_async_def = { - "lv_obj_delete_async", - (PyCFunction)py_lv_obj_delete_async, +static PyMethodDef py_lv_obj_stop_scroll_anim_def = { + "lv_obj_stop_scroll_anim", + (PyCFunction)py_lv_obj_stop_scroll_anim, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13492,29 +13153,29 @@ static PyMethodDef py_lv_obj_delete_async_def = { /* * lvgl extension definition for: - * void lv_obj_set_parent(lv_obj_t *obj, lv_obj_t *parent) + * void lv_obj_update_snap(lv_obj_t *obj, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_set_parent(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_update_snap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - lv_obj_t *parent = mp_to_lv(parent_py); + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_obj_set_parent)(obj, parent); + ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_update_snap)(obj, anim_en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_set_parent_def = { - "lv_obj_set_parent", - (PyCFunction)py_lv_obj_set_parent, +static PyMethodDef py_lv_obj_update_snap_def = { + "lv_obj_update_snap", + (PyCFunction)py_lv_obj_update_snap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13522,29 +13183,30 @@ static PyMethodDef py_lv_obj_set_parent_def = { /* * lvgl extension definition for: - * void lv_obj_swap(lv_obj_t *obj1, lv_obj_t *obj2) + * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) */ -static PyObject *py_lv_obj_swap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_scrollbar_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *obj2_py; - if (!PyArg_ParseTuple(py_args, "O", &obj2_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj1 = mp_to_lv(self); - lv_obj_t *obj2 = mp_to_lv(obj2_py); + PyObject *hor_area_py; PyObject *ver_area_py; + if (!PyArg_ParseTuple(py_args, "OO", &hor_area_py, &ver_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_area_t *hor_area = mp_write_ptr_lv_area_t(hor_area_py); + lv_area_t *ver_area = mp_write_ptr_lv_area_t(ver_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_obj_swap)(obj1, obj2); + ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_obj_get_scrollbar_area)(obj, hor_area, ver_area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_swap_def = { - "lv_obj_swap", - (PyCFunction)py_lv_obj_swap, +static PyMethodDef py_lv_obj_get_scrollbar_area_def = { + "lv_obj_get_scrollbar_area", + (PyCFunction)py_lv_obj_get_scrollbar_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13552,29 +13214,27 @@ static PyMethodDef py_lv_obj_swap_def = { /* * lvgl extension definition for: - * void lv_obj_move_to_index(lv_obj_t *obj, int32_t index) + * void lv_obj_scrollbar_invalidate(lv_obj_t *obj) */ -static PyObject *py_lv_obj_move_to_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_scrollbar_invalidate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); - int32_t index = (int32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_move_to_index)(obj, index); + ((void (*)(lv_obj_t *))lv_obj_scrollbar_invalidate)(obj); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_move_to_index_def = { - "lv_obj_move_to_index", - (PyCFunction)py_lv_obj_move_to_index, +static PyMethodDef py_lv_obj_scrollbar_invalidate_def = { + "lv_obj_scrollbar_invalidate", + (PyCFunction)py_lv_obj_scrollbar_invalidate, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -13582,84 +13242,81 @@ static PyMethodDef py_lv_obj_move_to_index_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_obj_get_screen(const lv_obj_t *obj) + * void lv_obj_readjust_scroll(lv_obj_t *obj, lv_anim_enable_t anim_en) */ -static PyObject *py_lv_obj_get_screen(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_readjust_scroll(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *anim_en_py; + if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); + lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_obj_get_screen)(obj); + ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_readjust_scroll)(obj, anim_en); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_obj_get_screen_def = { - "lv_obj_get_screen", - (PyCFunction)py_lv_obj_get_screen, +static PyMethodDef py_lv_obj_readjust_scroll_def = { + "lv_obj_readjust_scroll", + (PyCFunction)py_lv_obj_readjust_scroll, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_image_header_t (CPython) + * Struct lv_style_t (CPython) */ -extern PyMethodDef py_lv_image_header_t_methods[]; +extern PyMethodDef py_lv_style_t_methods[]; -static PyObject *py_lv_image_header_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_style_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_header_t *data = (lv_image_header_t*)inst->data; + lv_style_t *data = (lv_style_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "magic") == 0) return mp_obj_new_int_from_uint(data->magic); - if (strcmp(attr, "cf") == 0) return mp_obj_new_int_from_uint(data->cf); - if (strcmp(attr, "flags") == 0) return mp_obj_new_int_from_uint(data->flags); - if (strcmp(attr, "w") == 0) return mp_obj_new_int_from_uint(data->w); - if (strcmp(attr, "h") == 0) return mp_obj_new_int_from_uint(data->h); - if (strcmp(attr, "stride") == 0) return mp_obj_new_int_from_uint(data->stride); - if (strcmp(attr, "reserved_2") == 0) return mp_obj_new_int_from_uint(data->reserved_2); - for (PyMethodDef *m = py_lv_image_header_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "values_and_props") == 0) return ptr_to_mp((void*)data->values_and_props); + if (strcmp(attr, "has_group") == 0) return mp_obj_new_int_from_uint(data->has_group); + if (strcmp(attr, "prop_cnt") == 0) return mp_obj_new_int_from_uint(data->prop_cnt); + for (PyMethodDef *m = py_lv_style_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_image_header_t_field_names[] = {"magic", "cf", "flags", "w", "h", "stride", "reserved_2", NULL}; +static const char *const py_lv_style_t_field_names[] = {"values_and_props", "has_group", "prop_cnt", NULL}; -static PyObject *py_lv_image_header_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_style_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_image_header_t_field_names, py_lv_image_header_t_methods); + return lvpy_struct_dir(self, py_lv_style_t_field_names, py_lv_style_t_methods); } -static PyMethodDef py_lv_image_header_t_type_methods[] = { - {"__dir__", py_lv_image_header_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_style_t_type_methods[] = { + {"__dir__", py_lv_style_t_dir, METH_NOARGS, NULL}, + {NULL} }; -static int py_lv_image_header_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_style_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_image_header_t *data = (lv_image_header_t*)inst->data; + lv_style_t *data = (lv_style_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -13667,227 +13324,506 @@ static int py_lv_image_header_t_setattro(PyObject *self, PyObject *name, PyObjec const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_image_header_t saved; + lv_style_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "magic") == 0) { data->magic = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "cf") == 0) { data->cf = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "flags") == 0) { data->flags = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "w") == 0) { data->w = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "h") == 0) { data->h = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "stride") == 0) { data->stride = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "reserved_2") == 0) { data->reserved_2 = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "values_and_props") == 0) { data->values_and_props = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "has_group") == 0) { data->has_group = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "prop_cnt") == 0) { data->prop_cnt = (uint8_t)mp_obj_get_int(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_image_header_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_style_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_image_header_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_style_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_image_header_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_style_t)); } -static void py_lv_image_header_t_dealloc(py_lv_struct_t *self) +static void py_lv_style_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_image_header_t_type = { +PyTypeObject py_lv_style_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_image_header_t", + .tp_name = "lvgl.lv_style_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_image_header_t_dealloc, - .tp_getattro = (getter)py_lv_image_header_t_getattro, - .tp_setattro = (setter)py_lv_image_header_t_setattro, - .tp_new = py_lv_image_header_t_new, - .tp_methods = py_lv_image_header_t_type_methods, + .tp_dealloc = (destructor)py_lv_style_t_dealloc, + .tp_getattro = (getter)py_lv_style_t_getattro, + .tp_setattro = (setter)py_lv_style_t_setattro, + .tp_new = py_lv_style_t_new, + .tp_methods = py_lv_style_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_image_header_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_style_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_image_header_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_header_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_style_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_style_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_image_header_t*)self->data; + return (lv_style_t*)self->data; } -static lv_image_header_t mp_write_scratch_lv_image_header_t; +static lv_style_t mp_write_scratch_lv_style_t; -static inline void* mp_write_value_ptr_lv_image_header_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_style_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_header_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_style_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_image_header_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_header_t)); + memcpy(&mp_write_scratch_lv_style_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_style_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_image_header_t; + return &mp_write_scratch_lv_style_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_image_header_t(value); + void *p = mp_write_ptr_lv_style_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_header_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_style_t or dict, got None"); } - memset(&mp_write_scratch_lv_image_header_t, 0, sizeof(lv_image_header_t)); - return &mp_write_scratch_lv_image_header_t; + memset(&mp_write_scratch_lv_style_t, 0, sizeof(lv_style_t)); + return &mp_write_scratch_lv_style_t; } -#define mp_write_lv_image_header_t(struct_obj) (*((lv_image_header_t*)mp_write_value_ptr_lv_image_header_t(struct_obj))) +#define mp_write_lv_style_t(struct_obj) (*((lv_style_t*)mp_write_value_ptr_lv_style_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_image_header_t(void *field) +static inline PyObject *mp_read_ptr_lv_style_t(void *field) { - return lv_to_mp_struct(&py_lv_image_header_t_type, field); + return lv_to_mp_struct(&py_lv_style_t_type, field); } -#define mp_read_lv_image_header_t(field) lv_to_mp_struct_own(&py_lv_image_header_t_type, copy_buffer(&field, sizeof(lv_image_header_t))) -#define mp_read_byref_lv_image_header_t(field) mp_read_ptr_lv_image_header_t(&field) +#define mp_read_lv_style_t(field) lv_to_mp_struct_own(&py_lv_style_t_type, copy_buffer(&field, sizeof(lv_style_t))) +#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) -#define funcptr_lv_draw_buf_malloc_cb_t NULL -static inline PyObject *mp_lv_funcptr_lv_draw_buf_malloc_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +/* + * lvgl extension definition for: + * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_add_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_add_style)(obj, style, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_add_style_def = { + "lv_obj_add_style", + (PyCFunction)py_lv_obj_add_style, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_malloc_cb' - * lv_draw_buf_malloc_cb_t buf_malloc_cb + * lvgl extension definition for: + * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) */ +static PyObject *py_lv_obj_replace_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *old_style_py; PyObject *new_style_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OOO", &old_style_py, &new_style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(old_style_py); + const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(new_style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_draw_buf_free_cb_t NULL + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_obj_replace_style)(obj, old_style, new_style, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} -static inline PyObject *mp_lv_funcptr_lv_draw_buf_free_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_replace_style_def = { + "lv_obj_replace_style", + (PyCFunction)py_lv_obj_replace_style, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_free_cb' - * lv_draw_buf_free_cb_t buf_free_cb + * lvgl extension definition for: + * void lv_obj_remove_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ +static PyObject *py_lv_obj_remove_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_draw_buf_copy_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_remove_style)(obj, style, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_draw_buf_copy_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_remove_style_def = { + "lv_obj_remove_style", + (PyCFunction)py_lv_obj_remove_style, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_copy_cb' - * lv_draw_buf_copy_cb_t buf_copy_cb + * lvgl extension definition for: + * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) */ +static PyObject *py_lv_obj_remove_theme(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "O", &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_draw_buf_align_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_style_selector_t))lv_obj_remove_theme)(obj, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_draw_buf_align_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_remove_theme_def = { + "lv_obj_remove_theme", + (PyCFunction)py_lv_obj_remove_theme, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_align_pointer_cb' - * lv_draw_buf_align_cb_t align_pointer_cb + * lvgl extension definition for: + * void lv_obj_remove_style_all(lv_obj_t *obj) */ +static PyObject *py_lv_obj_remove_style_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_obj_t *obj = mp_to_lv(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_draw_buf_cache_operation_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *))lv_obj_remove_style_all)(obj); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_draw_buf_cache_operation_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_remove_style_all_def = { + "lv_obj_remove_style_all", + (PyCFunction)py_lv_obj_remove_style_all, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_invalidate_cache_cb' - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + * lvgl extension definition for: + * void lv_obj_report_style_change(lv_style_t *style) */ +static PyObject *py_lv_obj_report_style_change(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + PyObject *style_py; + if (!PyArg_ParseTuple(py_args, "O", &style_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_t *style = mp_write_ptr_lv_style_t(style_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lvpy_lock(); + ((void (*)(lv_style_t *))lv_obj_report_style_change)(style); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_report_style_change_def = { + "lv_obj_report_style_change", + (PyCFunction)py_lv_obj_report_style_change, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_flush_cache_cb' - * lv_draw_buf_cache_operation_cb_t flush_cache_cb + * lvgl extension definition for: + * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ +static PyObject *py_lv_obj_refresh_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_draw_buf_width_to_stride_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_obj_refresh_style)(obj, part, prop); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_draw_buf_width_to_stride_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_refresh_style_def = { + "lv_obj_refresh_style", + (PyCFunction)py_lv_obj_refresh_style, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_width_to_stride_cb' - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + * lvgl extension definition for: + * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) */ +static PyObject *py_lv_obj_set_style_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; long en_val; + if (!PyArg_ParseTuple(py_args, "OOl", &style_py, &selector_py, &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_lv_draw_buf_clear_cb_t NULL + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_obj_set_style_enabled)(obj, style, selector, en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static inline PyObject *mp_lv_funcptr_lv_draw_buf_clear_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_set_style_enabled_def = { + "lv_obj_set_style_enabled", + (PyCFunction)py_lv_obj_set_style_enabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_buf_handlers_t_buf_clear_cb' - * lv_draw_buf_clear_cb_t buf_clear_cb + * lvgl extension definition for: + * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) */ +static PyObject *py_lv_obj_get_style_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_get_style_enabled)(obj, style, selector); + lvpy_unlock(); + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_get_style_enabled_def = { + "lv_obj_get_style_enabled", + (PyCFunction)py_lv_obj_get_style_enabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* - * Struct lv_draw_buf_handlers_t (CPython) + * lvgl extension definition for: + * void lv_obj_style_set_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool dis) */ +static PyObject *py_lv_obj_style_set_disabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; long dis_val; + if (!PyArg_ParseTuple(py_args, "OOl", &style_py, &selector_py, &dis_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + bool dis = (dis_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_obj_style_set_disabled)(obj, style, selector, dis); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -extern PyMethodDef py_lv_draw_buf_handlers_t_methods[]; +static PyMethodDef py_lv_obj_style_set_disabled_def = { + "lv_obj_style_set_disabled", + (PyCFunction)py_lv_obj_style_set_disabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_buf_handlers_t_getattro(PyObject *self, PyObject *name) + +/* + * lvgl extension definition for: + * bool lv_obj_style_get_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_style_get_disabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *style_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_style_get_disabled)(obj, style, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); +} + +static PyMethodDef py_lv_obj_style_get_disabled_def = { + "lv_obj_style_get_disabled", + (PyCFunction)py_lv_obj_style_get_disabled, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_obj_enable_style_refresh(bool en) + */ +static PyObject *py_lv_obj_enable_style_refresh(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + bool en = (en_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(bool))lv_obj_enable_style_refresh)(en); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_obj_enable_style_refresh_def = { + "lv_obj_enable_style_refresh", + (PyCFunction)py_lv_obj_enable_style_refresh, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * Struct lv_style_value_t (CPython) + */ + +extern PyMethodDef py_lv_style_value_t_methods[]; + +static PyObject *py_lv_style_value_t_getattro(PyObject *self, PyObject *name) { py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)inst->data; + lv_style_value_t *data = (lv_style_value_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return NULL; } const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return NULL; - if (strcmp(attr, "buf_malloc_cb") == 0) return mp_lv_funcptr(NULL, data->buf_malloc_cb, NULL, "lv_draw_buf_handlers_t_buf_malloc_cb", NULL); - if (strcmp(attr, "buf_free_cb") == 0) return mp_lv_funcptr(NULL, data->buf_free_cb, NULL, "lv_draw_buf_handlers_t_buf_free_cb", NULL); - if (strcmp(attr, "buf_copy_cb") == 0) return mp_lv_funcptr(NULL, data->buf_copy_cb, NULL, "lv_draw_buf_handlers_t_buf_copy_cb", NULL); - if (strcmp(attr, "align_pointer_cb") == 0) return mp_lv_funcptr(NULL, data->align_pointer_cb, NULL, "lv_draw_buf_handlers_t_align_pointer_cb", NULL); - if (strcmp(attr, "invalidate_cache_cb") == 0) return mp_lv_funcptr(NULL, data->invalidate_cache_cb, NULL, "lv_draw_buf_handlers_t_invalidate_cache_cb", NULL); - if (strcmp(attr, "flush_cache_cb") == 0) return mp_lv_funcptr(NULL, data->flush_cache_cb, NULL, "lv_draw_buf_handlers_t_flush_cache_cb", NULL); - if (strcmp(attr, "width_to_stride_cb") == 0) return mp_lv_funcptr(NULL, data->width_to_stride_cb, NULL, "lv_draw_buf_handlers_t_width_to_stride_cb", NULL); - if (strcmp(attr, "buf_clear_cb") == 0) return mp_lv_funcptr(NULL, data->buf_clear_cb, NULL, "lv_draw_buf_handlers_t_buf_clear_cb", NULL); - for (PyMethodDef *m = py_lv_draw_buf_handlers_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, "num") == 0) return mp_obj_new_int(data->num); + if (strcmp(attr, "ptr") == 0) return ptr_to_mp((void*)data->ptr); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + for (PyMethodDef *m = py_lv_style_value_t_methods; m->ml_name != NULL; m++) { if (strcmp(attr, m->ml_name) == 0) return PyCFunction_NewEx(m, self, NULL); } return PyObject_GenericGetAttr((PyObject *)self, name); } -static const char *const py_lv_draw_buf_handlers_t_field_names[] = {"buf_malloc_cb", "buf_free_cb", "buf_copy_cb", "align_pointer_cb", "invalidate_cache_cb", "flush_cache_cb", "width_to_stride_cb", "buf_clear_cb", NULL}; +static const char *const py_lv_style_value_t_field_names[] = {"num", "ptr", "color", NULL}; -static PyObject *py_lv_draw_buf_handlers_t_dir(PyObject *self, PyObject *unused) +static PyObject *py_lv_style_value_t_dir(PyObject *self, PyObject *unused) { (void)unused; - return lvpy_struct_dir(self, py_lv_draw_buf_handlers_t_field_names, py_lv_draw_buf_handlers_t_methods); + return lvpy_struct_dir(self, py_lv_style_value_t_field_names, py_lv_style_value_t_methods); } -static PyMethodDef py_lv_draw_buf_handlers_t_type_methods[] = { - {"__dir__", py_lv_draw_buf_handlers_t_dir, METH_NOARGS, NULL}, +static PyMethodDef py_lv_style_value_t_type_methods[] = { + {"__dir__", py_lv_style_value_t_dir, METH_NOARGS, NULL}, {NULL} }; -static int py_lv_draw_buf_handlers_t_setattro(PyObject *self, PyObject *name, PyObject *value) +static int py_lv_style_value_t_setattro(PyObject *self, PyObject *name, PyObject *value) { if (value == NULL) { PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_buf_handlers_t *data = (lv_draw_buf_handlers_t*)inst->data; + lv_style_value_t *data = (lv_style_value_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -13895,6005 +13831,864 @@ static int py_lv_draw_buf_handlers_t_setattro(PyObject *self, PyObject *name, Py const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_draw_buf_handlers_t saved; + lv_style_value_t saved; memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "buf_malloc_cb") == 0) { data->buf_malloc_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_malloc_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "buf_free_cb") == 0) { data->buf_free_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_free_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "buf_copy_cb") == 0) { data->buf_copy_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_copy_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "align_pointer_cb") == 0) { data->align_pointer_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_align_pointer_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "invalidate_cache_cb") == 0) { data->invalidate_cache_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_invalidate_cache_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "flush_cache_cb") == 0) { data->flush_cache_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_flush_cache_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "width_to_stride_cb") == 0) { data->width_to_stride_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_width_to_stride_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "buf_clear_cb") == 0) { data->buf_clear_cb = mp_lv_callback(value, NULL, "lv_draw_buf_handlers_t_buf_clear_cb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "num") == 0) { data->num = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "ptr") == 0) { data->ptr = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_buf_handlers_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_style_value_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_draw_buf_handlers_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_style_value_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_buf_handlers_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_style_value_t)); } -static void py_lv_draw_buf_handlers_t_dealloc(py_lv_struct_t *self) +static void py_lv_style_value_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_draw_buf_handlers_t_type = { +PyTypeObject py_lv_style_value_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_buf_handlers_t", + .tp_name = "lvgl.lv_style_value_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_buf_handlers_t_dealloc, - .tp_getattro = (getter)py_lv_draw_buf_handlers_t_getattro, - .tp_setattro = (setter)py_lv_draw_buf_handlers_t_setattro, - .tp_new = py_lv_draw_buf_handlers_t_new, - .tp_methods = py_lv_draw_buf_handlers_t_type_methods, + .tp_dealloc = (destructor)py_lv_style_value_t_dealloc, + .tp_getattro = (getter)py_lv_style_value_t_getattro, + .tp_setattro = (setter)py_lv_style_value_t_setattro, + .tp_new = py_lv_style_value_t_new, + .tp_methods = py_lv_style_value_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_draw_buf_handlers_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_style_value_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_buf_handlers_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_buf_handlers_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_style_value_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_style_value_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_buf_handlers_t*)self->data; + return (lv_style_value_t*)self->data; } -static lv_draw_buf_handlers_t mp_write_scratch_lv_draw_buf_handlers_t; +static lv_style_value_t mp_write_scratch_lv_style_value_t; -static inline void* mp_write_value_ptr_lv_draw_buf_handlers_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_style_value_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_buf_handlers_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_style_value_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_buf_handlers_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_buf_handlers_t)); + memcpy(&mp_write_scratch_lv_style_value_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_style_value_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_buf_handlers_t; + return &mp_write_scratch_lv_style_value_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_buf_handlers_t(value); + void *p = mp_write_ptr_lv_style_value_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_buf_handlers_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_style_value_t or dict, got None"); } - memset(&mp_write_scratch_lv_draw_buf_handlers_t, 0, sizeof(lv_draw_buf_handlers_t)); - return &mp_write_scratch_lv_draw_buf_handlers_t; + memset(&mp_write_scratch_lv_style_value_t, 0, sizeof(lv_style_value_t)); + return &mp_write_scratch_lv_style_value_t; } -#define mp_write_lv_draw_buf_handlers_t(struct_obj) (*((lv_draw_buf_handlers_t*)mp_write_value_ptr_lv_draw_buf_handlers_t(struct_obj))) +#define mp_write_lv_style_value_t(struct_obj) (*((lv_style_value_t*)mp_write_value_ptr_lv_style_value_t(struct_obj))) -static inline PyObject *mp_read_ptr_lv_draw_buf_handlers_t(void *field) +static inline PyObject *mp_read_ptr_lv_style_value_t(void *field) { - return lv_to_mp_struct(&py_lv_draw_buf_handlers_t_type, field); + return lv_to_mp_struct(&py_lv_style_value_t_type, field); } -#define mp_read_lv_draw_buf_handlers_t(field) lv_to_mp_struct_own(&py_lv_draw_buf_handlers_t_type, copy_buffer(&field, sizeof(lv_draw_buf_handlers_t))) -#define mp_read_byref_lv_draw_buf_handlers_t(field) mp_read_ptr_lv_draw_buf_handlers_t(&field) +#define mp_read_lv_style_value_t(field) lv_to_mp_struct_own(&py_lv_style_value_t_type, copy_buffer(&field, sizeof(lv_style_value_t))) +#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) /* - * Struct lv_draw_buf_t (CPython) + * lvgl extension definition for: + * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) */ - -extern PyMethodDef py_lv_draw_buf_t_methods[]; - -static PyObject *py_lv_draw_buf_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_get_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_buf_t *data = (lv_draw_buf_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "header") == 0) return mp_read_byref_lv_image_header_t(data->header); - if (strcmp(attr, "data_size") == 0) return mp_obj_new_int_from_uint(data->data_size); - if (strcmp(attr, "data") == 0) return mp_array_from_u8ptr((void*)data->data); - if (strcmp(attr, "unaligned_data") == 0) return ptr_to_mp((void*)data->unaligned_data); - if (strcmp(attr, "handlers") == 0) return mp_read_ptr_lv_draw_buf_handlers_t((void*)data->handlers); - for (PyMethodDef *m = py_lv_draw_buf_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_style_value_t _res; + lvpy_lock(); + _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_obj_get_style_prop)(obj, part, prop); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_lv_style_value_t(_res); } -static const char *const py_lv_draw_buf_t_field_names[] = {"header", "data_size", "data", "unaligned_data", "handlers", NULL}; +static PyMethodDef py_lv_obj_get_style_prop_def = { + "lv_obj_get_style_prop", + (PyCFunction)py_lv_obj_get_style_prop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_draw_buf_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) + */ +static PyObject *py_lv_obj_has_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_buf_t_field_names, py_lv_draw_buf_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *selector_py; PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "OO", &selector_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_obj_has_style_prop)(obj, selector, prop); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_t_type_methods[] = { - {"__dir__", py_lv_draw_buf_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_has_style_prop_def = { + "lv_obj_has_style_prop", + (PyCFunction)py_lv_obj_has_style_prop, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_draw_buf_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_buf_t *data = (lv_draw_buf_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_buf_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "header") == 0) { data->header = mp_write_lv_image_header_t(value); result = 0; } - if (strcmp(attr, "data_size") == 0) { data->data_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "data") == 0) { data->data = (void*)mp_array_to_u8ptr(value); result = 0; } - if (strcmp(attr, "unaligned_data") == 0) { data->unaligned_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "handlers") == 0) { data->handlers = (void*)mp_write_ptr_lv_draw_buf_handlers_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_buf_t' object has no attribute '%s'", attr); - } - return result; -} -static PyObject *py_lv_draw_buf_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +/* + * lvgl extension definition for: + * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_set_local_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_buf_t)); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *prop_py; PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OOO", &prop_py, &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_style_value_t value = mp_write_lv_style_value_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_obj_set_local_style_prop)(obj, prop, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -static void py_lv_draw_buf_t_dealloc(py_lv_struct_t *self) +static PyMethodDef py_lv_obj_set_local_style_prop_def = { + "lv_obj_set_local_style_prop", + (PyCFunction)py_lv_obj_set_local_style_prop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_get_local_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *prop_py; PyObject *value_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OOO", &prop_py, &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_style_value_t *value = mp_write_ptr_lv_style_value_t(value_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_style_res_t _res; + lvpy_lock(); + _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_obj_get_local_style_prop)(obj, prop, value, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_draw_buf_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_buf_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_buf_t_dealloc, - .tp_getattro = (getter)py_lv_draw_buf_t_getattro, - .tp_setattro = (setter)py_lv_draw_buf_t_setattro, - .tp_new = py_lv_draw_buf_t_new, - .tp_methods = py_lv_draw_buf_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_local_style_prop_def = { + "lv_obj_get_local_style_prop", + (PyCFunction)py_lv_obj_get_local_style_prop, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_draw_buf_t(PyObject *self_in) + +/* + * lvgl extension definition for: + * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) + */ +static PyObject *py_lv_obj_remove_local_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_buf_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_buf_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_buf_t*)self->data; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *prop_py; PyObject *selector_py; + if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_obj_remove_local_style_prop)(obj, prop, selector); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -static lv_draw_buf_t mp_write_scratch_lv_draw_buf_t; +static PyMethodDef py_lv_obj_remove_local_style_prop_def = { + "lv_obj_remove_local_style_prop", + (PyCFunction)py_lv_obj_remove_local_style_prop, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline void* mp_write_value_ptr_lv_draw_buf_t(PyObject *value) + +/* + * lvgl extension definition for: + * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) + */ +static PyObject *py_lv_obj_style_apply_color_filter(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_buf_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_buf_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_buf_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_buf_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_buf_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_buf_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_buf_t, 0, sizeof(lv_draw_buf_t)); - return &mp_write_scratch_lv_draw_buf_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; PyObject *v_py; + if (!PyArg_ParseTuple(py_args, "OO", &part_py, &v_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + lv_style_value_t v = mp_write_lv_style_value_t(v_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_style_value_t _res; + lvpy_lock(); + _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_obj_style_apply_color_filter)(obj, part, v); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_lv_style_value_t(_res); } -#define mp_write_lv_draw_buf_t(struct_obj) (*((lv_draw_buf_t*)mp_write_value_ptr_lv_draw_buf_t(struct_obj))) +static PyMethodDef py_lv_obj_style_apply_color_filter_def = { + "lv_obj_style_apply_color_filter", + (PyCFunction)py_lv_obj_style_apply_color_filter, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_draw_buf_t(void *field) + +/* + * lvgl extension definition for: + * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) + */ +static PyObject *py_lv_obj_fade_in(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_draw_buf_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long time_val; long delay_val; + if (!PyArg_ParseTuple(py_args, "ll", &time_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t time = (uint32_t)time_val; + uint32_t delay = (uint32_t)delay_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_obj_fade_in)(obj, time, delay); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_read_lv_draw_buf_t(field) lv_to_mp_struct_own(&py_lv_draw_buf_t_type, copy_buffer(&field, sizeof(lv_draw_buf_t))) -#define mp_read_byref_lv_draw_buf_t(field) mp_read_ptr_lv_draw_buf_t(&field) +static PyMethodDef py_lv_obj_fade_in_def = { + "lv_obj_fade_in", + (PyCFunction)py_lv_obj_fade_in, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -#define funcptr_lv_display_flush_cb_t NULL -static inline PyObject *mp_lv_funcptr_lv_display_flush_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +/* + * lvgl extension definition for: + * void lv_obj_fade_out(lv_obj_t *obj, uint32_t time, uint32_t delay) + */ +static PyObject *py_lv_obj_fade_out(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long time_val; long delay_val; + if (!PyArg_ParseTuple(py_args, "ll", &time_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + uint32_t time = (uint32_t)time_val; + uint32_t delay = (uint32_t)delay_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_obj_fade_out)(obj, time, delay); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} -static void lv_display_t_flush_cb_callback(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map); -#define funcptr_lv_display_flush_wait_cb_t NULL +static PyMethodDef py_lv_obj_fade_out_def = { + "lv_obj_fade_out", + (PyCFunction)py_lv_obj_fade_out, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_lv_funcptr_lv_display_flush_wait_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } -static void lv_display_t_flush_wait_cb_callback(lv_display_t *disp); -#define funcptr_lv_display_sync_cb_t NULL +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_width)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -static inline PyObject *mp_lv_funcptr_lv_display_sync_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_get_style_width_def = { + "lv_obj_get_style_width", + (PyCFunction)py_lv_obj_get_style_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static void lv_display_t_sync_cb_callback(lv_display_t *disp, const lv_area_t *area); -static void lv_display_t_sync_wait_cb_callback(lv_display_t *disp); /* - * Struct lv_ll_t (CPython) + * lvgl extension definition for: + * int32_t lv_obj_get_style_min_width(const lv_obj_t *obj, lv_part_t part) */ +static PyObject *py_lv_obj_get_style_min_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_width)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -extern PyMethodDef py_lv_ll_t_methods[]; +static PyMethodDef py_lv_obj_get_style_min_width_def = { + "lv_obj_get_style_min_width", + (PyCFunction)py_lv_obj_get_style_min_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_ll_t_getattro(PyObject *self, PyObject *name) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_max_width(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_max_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_ll_t *data = (lv_ll_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "n_size") == 0) return mp_obj_new_int_from_uint(data->n_size); - if (strcmp(attr, "head") == 0) return ptr_to_mp((void*)data->head); - if (strcmp(attr, "tail") == 0) return ptr_to_mp((void*)data->tail); - for (PyMethodDef *m = py_lv_ll_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_width)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_ll_t_field_names[] = {"n_size", "head", "tail", NULL}; +static PyMethodDef py_lv_obj_get_style_max_width_def = { + "lv_obj_get_style_max_width", + (PyCFunction)py_lv_obj_get_style_max_width, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_ll_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_height(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_ll_t_field_names, py_lv_ll_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_height)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_ll_t_type_methods[] = { - {"__dir__", py_lv_ll_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_style_height_def = { + "lv_obj_get_style_height", + (PyCFunction)py_lv_obj_get_style_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_ll_t_setattro(PyObject *self, PyObject *name, PyObject *value) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_min_height(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_min_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_ll_t *data = (lv_ll_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_ll_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "n_size") == 0) { data->n_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "head") == 0) { data->head = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "tail") == 0) { data->tail = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_ll_t' object has no attribute '%s'", attr); - } - return result; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_height)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyObject *py_lv_ll_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_ll_t)); -} +static PyMethodDef py_lv_obj_get_style_min_height_def = { + "lv_obj_get_style_min_height", + (PyCFunction)py_lv_obj_get_style_min_height, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static void py_lv_ll_t_dealloc(py_lv_struct_t *self) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_max_height(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_max_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_height)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_ll_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_ll_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_ll_t_dealloc, - .tp_getattro = (getter)py_lv_ll_t_getattro, - .tp_setattro = (setter)py_lv_ll_t_setattro, - .tp_new = py_lv_ll_t_new, - .tp_methods = py_lv_ll_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_style_max_height_def = { + "lv_obj_get_style_max_height", + (PyCFunction)py_lv_obj_get_style_max_height, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_ll_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_ll_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_ll_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_ll_t*)self->data; -} - -static lv_ll_t mp_write_scratch_lv_ll_t; -static inline void* mp_write_value_ptr_lv_ll_t(PyObject *value) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_length(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_ll_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_ll_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_ll_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_ll_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_ll_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_ll_t or dict, got None"); - } - memset(&mp_write_scratch_lv_ll_t, 0, sizeof(lv_ll_t)); - return &mp_write_scratch_lv_ll_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_length)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_ll_t(struct_obj) (*((lv_ll_t*)mp_write_value_ptr_lv_ll_t(struct_obj))) +static PyMethodDef py_lv_obj_get_style_length_def = { + "lv_obj_get_style_length", + (PyCFunction)py_lv_obj_get_style_length, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_ll_t(void *field) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_x(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_ll_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_x)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_ll_t(field) lv_to_mp_struct_own(&py_lv_ll_t_type, copy_buffer(&field, sizeof(lv_ll_t))) -#define mp_read_byref_lv_ll_t(field) mp_read_ptr_lv_ll_t(&field) +static PyMethodDef py_lv_obj_get_style_x_def = { + "lv_obj_get_style_x", + (PyCFunction)py_lv_obj_get_style_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Struct lv_area_t (CPython) + * lvgl extension definition for: + * int32_t lv_obj_get_style_y(const lv_obj_t *obj, lv_part_t part) */ - -extern PyMethodDef py_lv_area_t_methods[]; - -static PyObject *py_lv_area_t_getattro(PyObject *self, PyObject *name) +static PyObject *py_lv_obj_get_style_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_area_t *data = (lv_area_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "x1") == 0) return mp_obj_new_int(data->x1); - if (strcmp(attr, "y1") == 0) return mp_obj_new_int(data->y1); - if (strcmp(attr, "x2") == 0) return mp_obj_new_int(data->x2); - if (strcmp(attr, "y2") == 0) return mp_obj_new_int(data->y2); - for (PyMethodDef *m = py_lv_area_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_y)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static const char *const py_lv_area_t_field_names[] = {"x1", "y1", "x2", "y2", NULL}; +static PyMethodDef py_lv_obj_get_style_y_def = { + "lv_obj_get_style_y", + (PyCFunction)py_lv_obj_get_style_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static PyObject *py_lv_area_t_dir(PyObject *self, PyObject *unused) + +/* + * lvgl extension definition for: + * lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - (void)unused; - return lvpy_struct_dir(self, py_lv_area_t_field_names, py_lv_area_t_methods); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_align_t _res; + lvpy_lock(); + _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_align)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_area_t_type_methods[] = { - {"__dir__", py_lv_area_t_dir, METH_NOARGS, NULL}, - {NULL} +static PyMethodDef py_lv_obj_get_style_align_def = { + "lv_obj_get_style_align", + (PyCFunction)py_lv_obj_get_style_align, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static int py_lv_area_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_area_t *data = (lv_area_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_area_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "x1") == 0) { data->x1 = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y1") == 0) { data->y1 = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "x2") == 0) { data->x2 = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "y2") == 0) { data->y2 = (int32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_area_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_area_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_area_t)); -} -static void py_lv_area_t_dealloc(py_lv_struct_t *self) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_transform_width(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_transform_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - py_lv_struct_dealloc(self); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_width)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -PyTypeObject py_lv_area_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_area_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_area_t_dealloc, - .tp_getattro = (getter)py_lv_area_t_getattro, - .tp_setattro = (setter)py_lv_area_t_setattro, - .tp_new = py_lv_area_t_new, - .tp_methods = py_lv_area_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +static PyMethodDef py_lv_obj_get_style_transform_width_def = { + "lv_obj_get_style_transform_width", + (PyCFunction)py_lv_obj_get_style_transform_width, + METH_VARARGS | METH_KEYWORDS, + NULL }; -static inline void* mp_write_ptr_lv_area_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_area_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_area_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_area_t*)self->data; -} - -static lv_area_t mp_write_scratch_lv_area_t; -static inline void* mp_write_value_ptr_lv_area_t(PyObject *value) +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_transform_height(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_transform_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_area_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_area_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_area_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_area_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_area_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_area_t or dict, got None"); - } - memset(&mp_write_scratch_lv_area_t, 0, sizeof(lv_area_t)); - return &mp_write_scratch_lv_area_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_height)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_write_lv_area_t(struct_obj) (*((lv_area_t*)mp_write_value_ptr_lv_area_t(struct_obj))) +static PyMethodDef py_lv_obj_get_style_transform_height_def = { + "lv_obj_get_style_transform_height", + (PyCFunction)py_lv_obj_get_style_transform_height, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_area_t(void *field) + +/* + * lvgl extension definition for: + * int32_t lv_obj_get_style_translate_x(const lv_obj_t *obj, lv_part_t part) + */ +static PyObject *py_lv_obj_get_style_translate_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_area_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_x)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } -#define mp_read_lv_area_t(field) lv_to_mp_struct_own(&py_lv_area_t_type, copy_buffer(&field, sizeof(lv_area_t))) -#define mp_read_byref_lv_area_t(field) mp_read_ptr_lv_area_t(&field) - -#define funcptr_dispatch_cb NULL - -static inline PyObject *mp_lv_funcptr_dispatch_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_get_style_translate_x_def = { + "lv_obj_get_style_translate_x", + (PyCFunction)py_lv_obj_get_style_translate_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_unit_t_dispatch_cb' - * int32_t (*dispatch_cb)(lv_draw_unit_t *draw_unit, lv_layer_t *layer) + * lvgl extension definition for: + * int32_t lv_obj_get_style_translate_y(const lv_obj_t *obj, lv_part_t part) */ +static PyObject *py_lv_obj_get_style_translate_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_evaluate_cb NULL + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_y)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -static inline PyObject *mp_lv_funcptr_evaluate_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_get_style_translate_y_def = { + "lv_obj_get_style_translate_y", + (PyCFunction)py_lv_obj_get_style_translate_y, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_unit_t_evaluate_cb' - * int32_t (*evaluate_cb)(lv_draw_unit_t *draw_unit, lv_draw_task_t *task) + * lvgl extension definition for: + * int32_t lv_obj_get_style_translate_radial(const lv_obj_t *obj, lv_part_t part) */ +static PyObject *py_lv_obj_get_style_translate_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } -#define funcptr_wait_for_finish_cb NULL + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_radial)(obj, part); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -static inline PyObject *mp_lv_funcptr_wait_for_finish_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } +static PyMethodDef py_lv_obj_get_style_translate_radial_def = { + "lv_obj_get_style_translate_radial", + (PyCFunction)py_lv_obj_get_style_translate_radial, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_unit_t_wait_for_finish_cb' - * int32_t (*wait_for_finish_cb)(lv_draw_unit_t *draw_unit) + * lvgl extension definition for: + * int32_t lv_obj_get_style_transform_scale_x(const lv_obj_t *obj, lv_part_t part) */ +static PyObject *py_lv_obj_get_style_transform_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(self); + lv_part_t part = (int)mp_obj_get_int(part_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_unit_t_delete_cb' - * int32_t (*delete_cb)(lv_draw_unit_t *draw_unit) - */ + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x)(obj, part); + lvpy_unlock(); -#define funcptr_event_cb NULL + PyGILState_Release(gstate); + return mp_obj_new_int(_res); +} -static inline PyObject *mp_lv_funcptr_event_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_draw_unit_t_event_cb' - * void (*event_cb)(lv_event_t *event) - */ - - -/* - * Struct lv_draw_unit_t (CPython) - */ - -extern PyMethodDef py_lv_draw_unit_t_methods[]; - -static PyObject *py_lv_draw_unit_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_unit_t *data = (lv_draw_unit_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "next") == 0) return ptr_to_mp((void*)data->next); - if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); - if (strcmp(attr, "idx") == 0) return mp_obj_new_int(data->idx); - if (strcmp(attr, "dispatch_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->dispatch_cb, NULL, "lv_draw_unit_t_dispatch_cb", NULL); - if (strcmp(attr, "evaluate_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->evaluate_cb, NULL, "lv_draw_unit_t_evaluate_cb", NULL); - if (strcmp(attr, "wait_for_finish_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->wait_for_finish_cb, NULL, "lv_draw_unit_t_wait_for_finish_cb", NULL); - if (strcmp(attr, "delete_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->delete_cb, NULL, "lv_draw_unit_t_delete_cb", NULL); - if (strcmp(attr, "event_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->event_cb, NULL, "lv_draw_unit_t_event_cb", NULL); - for (PyMethodDef *m = py_lv_draw_unit_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_unit_t_field_names[] = {"next", "name", "idx", "dispatch_cb", "evaluate_cb", "wait_for_finish_cb", "delete_cb", "event_cb", NULL}; - -static PyObject *py_lv_draw_unit_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_unit_t_field_names, py_lv_draw_unit_t_methods); -} - -static PyMethodDef py_lv_draw_unit_t_type_methods[] = { - {"__dir__", py_lv_draw_unit_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_draw_unit_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_unit_t *data = (lv_draw_unit_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_unit_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "next") == 0) { data->next = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } - if (strcmp(attr, "idx") == 0) { data->idx = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "dispatch_cb") == 0) { data->dispatch_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_dispatch_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "evaluate_cb") == 0) { data->evaluate_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_evaluate_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "wait_for_finish_cb") == 0) { data->wait_for_finish_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_wait_for_finish_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "delete_cb") == 0) { data->delete_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_delete_cb", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "event_cb") == 0) { data->event_cb = (void*)mp_lv_callback(value, NULL, "lv_draw_unit_t_event_cb", NULL, NULL, NULL, NULL); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_unit_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_unit_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_unit_t)); -} - -static void py_lv_draw_unit_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_draw_unit_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_unit_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_unit_t_dealloc, - .tp_getattro = (getter)py_lv_draw_unit_t_getattro, - .tp_setattro = (setter)py_lv_draw_unit_t_setattro, - .tp_new = py_lv_draw_unit_t_new, - .tp_methods = py_lv_draw_unit_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_draw_unit_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_unit_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_unit_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_unit_t*)self->data; -} - -static lv_draw_unit_t mp_write_scratch_lv_draw_unit_t; - -static inline void* mp_write_value_ptr_lv_draw_unit_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_unit_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_unit_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_unit_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_unit_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_unit_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_unit_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_unit_t, 0, sizeof(lv_draw_unit_t)); - return &mp_write_scratch_lv_draw_unit_t; -} - -#define mp_write_lv_draw_unit_t(struct_obj) (*((lv_draw_unit_t*)mp_write_value_ptr_lv_draw_unit_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_draw_unit_t(void *field) -{ - return lv_to_mp_struct(&py_lv_draw_unit_t_type, field); -} - -#define mp_read_lv_draw_unit_t(field) lv_to_mp_struct_own(&py_lv_draw_unit_t_type, copy_buffer(&field, sizeof(lv_draw_unit_t))) -#define mp_read_byref_lv_draw_unit_t(field) mp_read_ptr_lv_draw_unit_t(&field) - - -/* - * Struct lv_draw_task_t (CPython) - */ - -extern PyMethodDef py_lv_draw_task_t_methods[]; - -static PyObject *py_lv_draw_task_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_task_t *data = (lv_draw_task_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "next") == 0) return ptr_to_mp((void*)data->next); - if (strcmp(attr, "type") == 0) return mp_obj_new_int(data->type); - if (strcmp(attr, "area") == 0) return mp_read_byref_lv_area_t(data->area); - if (strcmp(attr, "_real_area") == 0) return mp_read_byref_lv_area_t(data->_real_area); - if (strcmp(attr, "clip_area") == 0) return mp_read_byref_lv_area_t(data->clip_area); - if (strcmp(attr, "target_layer") == 0) return ptr_to_mp((void*)data->target_layer); - if (strcmp(attr, "draw_unit") == 0) return mp_read_ptr_lv_draw_unit_t((void*)data->draw_unit); - if (strcmp(attr, "state") == 0) return mp_obj_new_int(data->state); - if (strcmp(attr, "draw_dsc") == 0) return ptr_to_mp((void*)data->draw_dsc); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "preferred_draw_unit_id") == 0) return mp_obj_new_int_from_uint(data->preferred_draw_unit_id); - if (strcmp(attr, "preference_score") == 0) return mp_obj_new_int_from_uint(data->preference_score); - for (PyMethodDef *m = py_lv_draw_task_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_task_t_field_names[] = {"next", "type", "area", "_real_area", "clip_area", "target_layer", "draw_unit", "state", "draw_dsc", "opa", "preferred_draw_unit_id", "preference_score", NULL}; - -static PyObject *py_lv_draw_task_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_task_t_field_names, py_lv_draw_task_t_methods); -} - -static PyMethodDef py_lv_draw_task_t_type_methods[] = { - {"__dir__", py_lv_draw_task_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_draw_task_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_task_t *data = (lv_draw_task_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_task_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "next") == 0) { data->next = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "type") == 0) { data->type = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "area") == 0) { data->area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "_real_area") == 0) { data->_real_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "clip_area") == 0) { data->clip_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "target_layer") == 0) { data->target_layer = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "draw_unit") == 0) { data->draw_unit = (void*)mp_write_ptr_lv_draw_unit_t(value); result = 0; } - if (strcmp(attr, "state") == 0) { data->state = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "draw_dsc") == 0) { data->draw_dsc = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "preferred_draw_unit_id") == 0) { data->preferred_draw_unit_id = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "preference_score") == 0) { data->preference_score = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_task_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_task_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_task_t)); -} - -static void py_lv_draw_task_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_draw_task_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_task_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_task_t_dealloc, - .tp_getattro = (getter)py_lv_draw_task_t_getattro, - .tp_setattro = (setter)py_lv_draw_task_t_setattro, - .tp_new = py_lv_draw_task_t_new, - .tp_methods = py_lv_draw_task_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_draw_task_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_task_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_task_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_task_t*)self->data; -} - -static lv_draw_task_t mp_write_scratch_lv_draw_task_t; - -static inline void* mp_write_value_ptr_lv_draw_task_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_task_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_task_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_task_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_task_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_task_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_task_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_task_t, 0, sizeof(lv_draw_task_t)); - return &mp_write_scratch_lv_draw_task_t; -} - -#define mp_write_lv_draw_task_t(struct_obj) (*((lv_draw_task_t*)mp_write_value_ptr_lv_draw_task_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_draw_task_t(void *field) -{ - return lv_to_mp_struct(&py_lv_draw_task_t_type, field); -} - -#define mp_read_lv_draw_task_t(field) lv_to_mp_struct_own(&py_lv_draw_task_t_type, copy_buffer(&field, sizeof(lv_draw_task_t))) -#define mp_read_byref_lv_draw_task_t(field) mp_read_ptr_lv_draw_task_t(&field) - - -/* - * Struct lv_color32_t (CPython) - */ - -extern PyMethodDef py_lv_color32_t_methods[]; - -static PyObject *py_lv_color32_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color32_t *data = (lv_color32_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "blue") == 0) return mp_obj_new_int_from_uint(data->blue); - if (strcmp(attr, "green") == 0) return mp_obj_new_int_from_uint(data->green); - if (strcmp(attr, "red") == 0) return mp_obj_new_int_from_uint(data->red); - if (strcmp(attr, "alpha") == 0) return mp_obj_new_int_from_uint(data->alpha); - for (PyMethodDef *m = py_lv_color32_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_color32_t_field_names[] = {"blue", "green", "red", "alpha", NULL}; - -static PyObject *py_lv_color32_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_color32_t_field_names, py_lv_color32_t_methods); -} - -static PyMethodDef py_lv_color32_t_type_methods[] = { - {"__dir__", py_lv_color32_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_color32_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color32_t *data = (lv_color32_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_color32_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "blue") == 0) { data->blue = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "green") == 0) { data->green = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "red") == 0) { data->red = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "alpha") == 0) { data->alpha = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_color32_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_color32_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_color32_t)); -} - -static void py_lv_color32_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_color32_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_color32_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_color32_t_dealloc, - .tp_getattro = (getter)py_lv_color32_t_getattro, - .tp_setattro = (setter)py_lv_color32_t_setattro, - .tp_new = py_lv_color32_t_new, - .tp_methods = py_lv_color32_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_color32_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_color32_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color32_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_color32_t*)self->data; -} - -static lv_color32_t mp_write_scratch_lv_color32_t; - -static inline void* mp_write_value_ptr_lv_color32_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color32_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_color32_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color32_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_color32_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_color32_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color32_t or dict, got None"); - } - memset(&mp_write_scratch_lv_color32_t, 0, sizeof(lv_color32_t)); - return &mp_write_scratch_lv_color32_t; -} - -#define mp_write_lv_color32_t(struct_obj) (*((lv_color32_t*)mp_write_value_ptr_lv_color32_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_color32_t(void *field) -{ - return lv_to_mp_struct(&py_lv_color32_t_type, field); -} - -#define mp_read_lv_color32_t(field) lv_to_mp_struct_own(&py_lv_color32_t_type, copy_buffer(&field, sizeof(lv_color32_t))) -#define mp_read_byref_lv_color32_t(field) mp_read_ptr_lv_color32_t(&field) - - -/* - * Struct lv_layer_t (CPython) - */ - -extern PyMethodDef py_lv_layer_t_methods[]; - -static PyObject *py_lv_layer_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_layer_t *data = (lv_layer_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "draw_buf") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->draw_buf); - if (strcmp(attr, "draw_task_head") == 0) return mp_read_ptr_lv_draw_task_t((void*)data->draw_task_head); - if (strcmp(attr, "display") == 0) return ptr_to_mp((void*)data->display); - if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); - if (strcmp(attr, "next") == 0) return ptr_to_mp((void*)data->next); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "buf_area") == 0) return mp_read_byref_lv_area_t(data->buf_area); - if (strcmp(attr, "phy_clip_area") == 0) return mp_read_byref_lv_area_t(data->phy_clip_area); - if (strcmp(attr, "_clip_area") == 0) return mp_read_byref_lv_area_t(data->_clip_area); - if (strcmp(attr, "partial_y_offset") == 0) return mp_obj_new_int(data->partial_y_offset); - if (strcmp(attr, "recolor") == 0) return mp_read_byref_lv_color32_t(data->recolor); - if (strcmp(attr, "color_format") == 0) return mp_obj_new_int(data->color_format); - if (strcmp(attr, "all_tasks_added") == 0) return convert_to_bool(data->all_tasks_added); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "buffer_owned") == 0) return convert_to_bool(data->buffer_owned); - for (PyMethodDef *m = py_lv_layer_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_layer_t_field_names[] = {"draw_buf", "draw_task_head", "display", "parent", "next", "user_data", "buf_area", "phy_clip_area", "_clip_area", "partial_y_offset", "recolor", "color_format", "all_tasks_added", "opa", "buffer_owned", NULL}; - -static PyObject *py_lv_layer_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_layer_t_field_names, py_lv_layer_t_methods); -} - -static PyMethodDef py_lv_layer_t_type_methods[] = { - {"__dir__", py_lv_layer_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_layer_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_layer_t *data = (lv_layer_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_layer_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "draw_buf") == 0) { data->draw_buf = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "draw_task_head") == 0) { data->draw_task_head = (void*)mp_write_ptr_lv_draw_task_t(value); result = 0; } - if (strcmp(attr, "display") == 0) { data->display = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "next") == 0) { data->next = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "buf_area") == 0) { data->buf_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "phy_clip_area") == 0) { data->phy_clip_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "_clip_area") == 0) { data->_clip_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "partial_y_offset") == 0) { data->partial_y_offset = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "recolor") == 0) { data->recolor = mp_write_lv_color32_t(value); result = 0; } - if (strcmp(attr, "color_format") == 0) { data->color_format = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "all_tasks_added") == 0) { data->all_tasks_added = mp_obj_is_true(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "buffer_owned") == 0) { data->buffer_owned = mp_obj_is_true(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_layer_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_layer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_layer_t)); -} - -static void py_lv_layer_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_layer_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_layer_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_layer_t_dealloc, - .tp_getattro = (getter)py_lv_layer_t_getattro, - .tp_setattro = (setter)py_lv_layer_t_setattro, - .tp_new = py_lv_layer_t_new, - .tp_methods = py_lv_layer_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_layer_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_layer_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_layer_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_layer_t*)self->data; -} - -static lv_layer_t mp_write_scratch_lv_layer_t; - -static inline void* mp_write_value_ptr_lv_layer_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_layer_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_layer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_layer_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_layer_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_layer_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_layer_t or dict, got None"); - } - memset(&mp_write_scratch_lv_layer_t, 0, sizeof(lv_layer_t)); - return &mp_write_scratch_lv_layer_t; -} - -#define mp_write_lv_layer_t(struct_obj) (*((lv_layer_t*)mp_write_value_ptr_lv_layer_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_layer_t(void *field) -{ - return lv_to_mp_struct(&py_lv_layer_t_type, field); -} - -#define mp_read_lv_layer_t(field) lv_to_mp_struct_own(&py_lv_layer_t_type, copy_buffer(&field, sizeof(lv_layer_t))) -#define mp_read_byref_lv_layer_t(field) mp_read_ptr_lv_layer_t(&field) - - -/* - * Struct lv_array_t (CPython) - */ - -extern PyMethodDef py_lv_array_t_methods[]; - -static PyObject *py_lv_array_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_array_t *data = (lv_array_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "data") == 0) return mp_array_from_u8ptr((void*)data->data); - if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); - if (strcmp(attr, "capacity") == 0) return mp_obj_new_int_from_uint(data->capacity); - if (strcmp(attr, "element_size") == 0) return mp_obj_new_int_from_uint(data->element_size); - if (strcmp(attr, "inner_alloc") == 0) return convert_to_bool(data->inner_alloc); - for (PyMethodDef *m = py_lv_array_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_array_t_field_names[] = {"data", "size", "capacity", "element_size", "inner_alloc", NULL}; - -static PyObject *py_lv_array_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_array_t_field_names, py_lv_array_t_methods); -} - -static PyMethodDef py_lv_array_t_type_methods[] = { - {"__dir__", py_lv_array_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_array_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_array_t *data = (lv_array_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_array_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "data") == 0) { data->data = (void*)mp_array_to_u8ptr(value); result = 0; } - if (strcmp(attr, "size") == 0) { data->size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "capacity") == 0) { data->capacity = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "element_size") == 0) { data->element_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "inner_alloc") == 0) { data->inner_alloc = mp_obj_is_true(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_array_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_array_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_array_t)); -} - -static void py_lv_array_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_array_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_array_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_array_t_dealloc, - .tp_getattro = (getter)py_lv_array_t_getattro, - .tp_setattro = (setter)py_lv_array_t_setattro, - .tp_new = py_lv_array_t_new, - .tp_methods = py_lv_array_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_array_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_array_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_array_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_array_t*)self->data; -} - -static lv_array_t mp_write_scratch_lv_array_t; - -static inline void* mp_write_value_ptr_lv_array_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_array_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_array_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_array_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_array_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_array_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_array_t or dict, got None"); - } - memset(&mp_write_scratch_lv_array_t, 0, sizeof(lv_array_t)); - return &mp_write_scratch_lv_array_t; -} - -#define mp_write_lv_array_t(struct_obj) (*((lv_array_t*)mp_write_value_ptr_lv_array_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_array_t(void *field) -{ - return lv_to_mp_struct(&py_lv_array_t_type, field); -} - -#define mp_read_lv_array_t(field) lv_to_mp_struct_own(&py_lv_array_t_type, copy_buffer(&field, sizeof(lv_array_t))) -#define mp_read_byref_lv_array_t(field) mp_read_ptr_lv_array_t(&field) - - -/* - * Struct lv_event_list_t (CPython) - */ - -extern PyMethodDef py_lv_event_list_t_methods[]; - -static PyObject *py_lv_event_list_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_event_list_t *data = (lv_event_list_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "array") == 0) return mp_read_byref_lv_array_t(data->array); - if (strcmp(attr, "is_traversing") == 0) return mp_obj_new_int_from_uint(data->is_traversing); - if (strcmp(attr, "has_marked_deleting") == 0) return mp_obj_new_int_from_uint(data->has_marked_deleting); - for (PyMethodDef *m = py_lv_event_list_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_event_list_t_field_names[] = {"array", "is_traversing", "has_marked_deleting", NULL}; - -static PyObject *py_lv_event_list_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_event_list_t_field_names, py_lv_event_list_t_methods); -} - -static PyMethodDef py_lv_event_list_t_type_methods[] = { - {"__dir__", py_lv_event_list_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_event_list_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_event_list_t *data = (lv_event_list_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_event_list_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "array") == 0) { data->array = mp_write_lv_array_t(value); result = 0; } - if (strcmp(attr, "is_traversing") == 0) { data->is_traversing = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "has_marked_deleting") == 0) { data->has_marked_deleting = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_event_list_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_event_list_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_event_list_t)); -} - -static void py_lv_event_list_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_event_list_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_event_list_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_event_list_t_dealloc, - .tp_getattro = (getter)py_lv_event_list_t_getattro, - .tp_setattro = (setter)py_lv_event_list_t_setattro, - .tp_new = py_lv_event_list_t_new, - .tp_methods = py_lv_event_list_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_event_list_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_event_list_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_event_list_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_event_list_t*)self->data; -} - -static lv_event_list_t mp_write_scratch_lv_event_list_t; - -static inline void* mp_write_value_ptr_lv_event_list_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_event_list_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_event_list_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_event_list_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_event_list_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_event_list_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_event_list_t or dict, got None"); - } - memset(&mp_write_scratch_lv_event_list_t, 0, sizeof(lv_event_list_t)); - return &mp_write_scratch_lv_event_list_t; -} - -#define mp_write_lv_event_list_t(struct_obj) (*((lv_event_list_t*)mp_write_value_ptr_lv_event_list_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_event_list_t(void *field) -{ - return lv_to_mp_struct(&py_lv_event_list_t_type, field); -} - -#define mp_read_lv_event_list_t(field) lv_to_mp_struct_own(&py_lv_event_list_t_type, copy_buffer(&field, sizeof(lv_event_list_t))) -#define mp_read_byref_lv_event_list_t(field) mp_read_ptr_lv_event_list_t(&field) - -#define funcptr_lv_theme_apply_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_theme_apply_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_theme_t_apply_cb_callback(lv_theme_t *, lv_obj_t *); - -/* - * Struct lv_theme_t (CPython) - */ - -extern PyMethodDef py_lv_theme_t_methods[]; - -static PyObject *py_lv_theme_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_theme_t *data = (lv_theme_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "apply_cb") == 0) return mp_lv_funcptr(NULL, data->apply_cb, lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", data->user_data); - if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "disp") == 0) return ptr_to_mp((void*)data->disp); - if (strcmp(attr, "color_primary") == 0) return mp_read_byref_lv_color_t(data->color_primary); - if (strcmp(attr, "color_secondary") == 0) return mp_read_byref_lv_color_t(data->color_secondary); - if (strcmp(attr, "font_small") == 0) return mp_read_ptr_lv_font_t((void*)data->font_small); - if (strcmp(attr, "font_normal") == 0) return mp_read_ptr_lv_font_t((void*)data->font_normal); - if (strcmp(attr, "font_large") == 0) return mp_read_ptr_lv_font_t((void*)data->font_large); - if (strcmp(attr, "flags") == 0) return mp_obj_new_int_from_uint(data->flags); - for (PyMethodDef *m = py_lv_theme_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_theme_t_field_names[] = {"apply_cb", "parent", "user_data", "disp", "color_primary", "color_secondary", "font_small", "font_normal", "font_large", "flags", NULL}; - -static PyObject *py_lv_theme_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_theme_t_field_names, py_lv_theme_t_methods); -} - -static PyMethodDef py_lv_theme_t_type_methods[] = { - {"__dir__", py_lv_theme_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_theme_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_theme_t *data = (lv_theme_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_theme_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "apply_cb") == 0) { data->apply_cb = mp_lv_callback(value, lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "disp") == 0) { data->disp = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "color_primary") == 0) { data->color_primary = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "color_secondary") == 0) { data->color_secondary = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "font_small") == 0) { data->font_small = (void*)mp_write_ptr_lv_font_t(value); result = 0; } - if (strcmp(attr, "font_normal") == 0) { data->font_normal = (void*)mp_write_ptr_lv_font_t(value); result = 0; } - if (strcmp(attr, "font_large") == 0) { data->font_large = (void*)mp_write_ptr_lv_font_t(value); result = 0; } - if (strcmp(attr, "flags") == 0) { data->flags = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_theme_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_theme_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_theme_t)); -} - -static void py_lv_theme_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_theme_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_theme_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_theme_t_dealloc, - .tp_getattro = (getter)py_lv_theme_t_getattro, - .tp_setattro = (setter)py_lv_theme_t_setattro, - .tp_new = py_lv_theme_t_new, - .tp_methods = py_lv_theme_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_theme_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_theme_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_theme_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_theme_t*)self->data; -} - -static lv_theme_t mp_write_scratch_lv_theme_t; - -static inline void* mp_write_value_ptr_lv_theme_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_theme_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_theme_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_theme_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_theme_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_theme_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_theme_t or dict, got None"); - } - memset(&mp_write_scratch_lv_theme_t, 0, sizeof(lv_theme_t)); - return &mp_write_scratch_lv_theme_t; -} - -#define mp_write_lv_theme_t(struct_obj) (*((lv_theme_t*)mp_write_value_ptr_lv_theme_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_theme_t(void *field) -{ - return lv_to_mp_struct(&py_lv_theme_t_type, field); -} - -#define mp_read_lv_theme_t(field) lv_to_mp_struct_own(&py_lv_theme_t_type, copy_buffer(&field, sizeof(lv_theme_t))) -#define mp_read_byref_lv_theme_t(field) mp_read_ptr_lv_theme_t(&field) - -#define funcptr_lv_timer_cb_t NULL - -static inline PyObject *mp_lv_funcptr_lv_timer_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_timer_t_timer_cb_callback(lv_timer_t *); - -/* - * Struct lv_timer_t (CPython) - */ - -extern PyMethodDef py_lv_timer_t_methods[]; - -static PyObject *py_lv_timer_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_timer_t *data = (lv_timer_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "period") == 0) return mp_obj_new_int_from_uint(data->period); - if (strcmp(attr, "last_run") == 0) return mp_obj_new_int_from_uint(data->last_run); - if (strcmp(attr, "timer_cb") == 0) return mp_lv_funcptr(NULL, data->timer_cb, lv_timer_t_timer_cb_callback, "lv_timer_t_timer_cb", data->user_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "repeat_count") == 0) return mp_obj_new_int(data->repeat_count); - if (strcmp(attr, "paused") == 0) return mp_obj_new_int(data->paused); - if (strcmp(attr, "auto_delete") == 0) return mp_obj_new_int_from_uint(data->auto_delete); - for (PyMethodDef *m = py_lv_timer_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_timer_t_field_names[] = {"period", "last_run", "timer_cb", "user_data", "repeat_count", "paused", "auto_delete", NULL}; - -static PyObject *py_lv_timer_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_timer_t_field_names, py_lv_timer_t_methods); -} - -static PyMethodDef py_lv_timer_t_type_methods[] = { - {"__dir__", py_lv_timer_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_timer_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_timer_t *data = (lv_timer_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_timer_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "period") == 0) { data->period = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_run") == 0) { data->last_run = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "timer_cb") == 0) { data->timer_cb = mp_lv_callback(value, lv_timer_t_timer_cb_callback, "lv_timer_t_timer_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "repeat_count") == 0) { data->repeat_count = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "paused") == 0) { data->paused = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "auto_delete") == 0) { data->auto_delete = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_timer_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_timer_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_timer_t)); -} - -static void py_lv_timer_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_timer_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_timer_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_timer_t_dealloc, - .tp_getattro = (getter)py_lv_timer_t_getattro, - .tp_setattro = (setter)py_lv_timer_t_setattro, - .tp_new = py_lv_timer_t_new, - .tp_methods = py_lv_timer_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_timer_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_timer_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_timer_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_timer_t*)self->data; -} - -static lv_timer_t mp_write_scratch_lv_timer_t; - -static inline void* mp_write_value_ptr_lv_timer_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_timer_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_timer_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_timer_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_timer_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_timer_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_timer_t or dict, got None"); - } - memset(&mp_write_scratch_lv_timer_t, 0, sizeof(lv_timer_t)); - return &mp_write_scratch_lv_timer_t; -} - -#define mp_write_lv_timer_t(struct_obj) (*((lv_timer_t*)mp_write_value_ptr_lv_timer_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_timer_t(void *field) -{ - return lv_to_mp_struct(&py_lv_timer_t_type, field); -} - -#define mp_read_lv_timer_t(field) lv_to_mp_struct_own(&py_lv_timer_t_type, copy_buffer(&field, sizeof(lv_timer_t))) -#define mp_read_byref_lv_timer_t(field) mp_read_ptr_lv_timer_t(&field) - - -/* - * Struct lv_display_t (CPython) - */ - -extern PyMethodDef py_lv_display_t_methods[]; - -static PyObject *py_lv_display_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_display_t *data = (lv_display_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "hor_res") == 0) return mp_obj_new_int(data->hor_res); - if (strcmp(attr, "ver_res") == 0) return mp_obj_new_int(data->ver_res); - if (strcmp(attr, "physical_hor_res") == 0) return mp_obj_new_int(data->physical_hor_res); - if (strcmp(attr, "physical_ver_res") == 0) return mp_obj_new_int(data->physical_ver_res); - if (strcmp(attr, "offset_x") == 0) return mp_obj_new_int(data->offset_x); - if (strcmp(attr, "offset_y") == 0) return mp_obj_new_int(data->offset_y); - if (strcmp(attr, "dpi") == 0) return mp_obj_new_int_from_uint(data->dpi); - if (strcmp(attr, "buf_1") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_1); - if (strcmp(attr, "buf_2") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_2); - if (strcmp(attr, "buf_3") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_3); - if (strcmp(attr, "buf_act") == 0) return mp_read_ptr_lv_draw_buf_t((void*)data->buf_act); - if (strcmp(attr, "flush_cb") == 0) return mp_lv_funcptr(NULL, data->flush_cb, lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", data->user_data); - if (strcmp(attr, "flush_wait_cb") == 0) return mp_lv_funcptr(NULL, data->flush_wait_cb, lv_display_t_flush_wait_cb_callback, "lv_display_t_flush_wait_cb", data->user_data); - if (strcmp(attr, "flushing") == 0) return mp_obj_new_int(data->flushing); - if (strcmp(attr, "flushing_last") == 0) return mp_obj_new_int(data->flushing_last); - if (strcmp(attr, "last_area") == 0) return mp_obj_new_int_from_uint(data->last_area); - if (strcmp(attr, "last_part") == 0) return mp_obj_new_int_from_uint(data->last_part); - if (strcmp(attr, "sync_cb") == 0) return mp_lv_funcptr(NULL, data->sync_cb, lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", data->user_data); - if (strcmp(attr, "sync_wait_cb") == 0) return mp_lv_funcptr(NULL, data->sync_wait_cb, lv_display_t_sync_wait_cb_callback, "lv_display_t_sync_wait_cb", data->user_data); - if (strcmp(attr, "syncing") == 0) return mp_obj_new_int(data->syncing); - if (strcmp(attr, "syncing_last") == 0) return mp_obj_new_int(data->syncing_last); - if (strcmp(attr, "sync_areas") == 0) return mp_read_byref_lv_ll_t(data->sync_areas); - if (strcmp(attr, "render_mode") == 0) return mp_obj_new_int(data->render_mode); - if (strcmp(attr, "antialiasing") == 0) return mp_obj_new_int_from_uint(data->antialiasing); - if (strcmp(attr, "tile_cnt") == 0) return mp_obj_new_int_from_uint(data->tile_cnt); - if (strcmp(attr, "stride_is_auto") == 0) return mp_obj_new_int_from_uint(data->stride_is_auto); - if (strcmp(attr, "rendering_in_progress") == 0) return mp_obj_new_int_from_uint(data->rendering_in_progress); - if (strcmp(attr, "color_format") == 0) return mp_obj_new_int(data->color_format); - if (strcmp(attr, "inv_areas") == 0) return lvpy_struct_array_new(self, data->inv_areas, 32, sizeof(lv_area_t), mp_read_ptr_lv_area_t, mp_write_value_ptr_lv_area_t); - if (strcmp(attr, "inv_area_joined") == 0) return ptr_to_mp(data->inv_area_joined); - if (strcmp(attr, "inv_p") == 0) return mp_obj_new_int_from_uint(data->inv_p); - if (strcmp(attr, "inv_en_cnt") == 0) return mp_obj_new_int(data->inv_en_cnt); - if (strcmp(attr, "_static_buf1") == 0) return mp_read_byref_lv_draw_buf_t(data->_static_buf1); - if (strcmp(attr, "_static_buf2") == 0) return mp_read_byref_lv_draw_buf_t(data->_static_buf2); - if (strcmp(attr, "layer_head") == 0) return mp_read_ptr_lv_layer_t((void*)data->layer_head); - if (strcmp(attr, "screens") == 0) return ptr_to_mp((void*)data->screens); - if (strcmp(attr, "sys_layer") == 0) return lv_to_mp((void*)data->sys_layer); - if (strcmp(attr, "top_layer") == 0) return lv_to_mp((void*)data->top_layer); - if (strcmp(attr, "act_scr") == 0) return lv_to_mp((void*)data->act_scr); - if (strcmp(attr, "bottom_layer") == 0) return lv_to_mp((void*)data->bottom_layer); - if (strcmp(attr, "prev_scr") == 0) return lv_to_mp((void*)data->prev_scr); - if (strcmp(attr, "scr_to_load") == 0) return lv_to_mp((void*)data->scr_to_load); - if (strcmp(attr, "screen_cnt") == 0) return mp_obj_new_int_from_uint(data->screen_cnt); - if (strcmp(attr, "draw_prev_over_act") == 0) return mp_obj_new_int_from_uint(data->draw_prev_over_act); - if (strcmp(attr, "del_prev") == 0) return mp_obj_new_int_from_uint(data->del_prev); - if (strcmp(attr, "driver_data") == 0) return ptr_to_mp((void*)data->driver_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "event_list") == 0) return mp_read_byref_lv_event_list_t(data->event_list); - if (strcmp(attr, "rotation") == 0) return mp_obj_new_int_from_uint(data->rotation); - if (strcmp(attr, "matrix_rotation") == 0) return mp_obj_new_int_from_uint(data->matrix_rotation); - if (strcmp(attr, "theme") == 0) return mp_read_ptr_lv_theme_t((void*)data->theme); - if (strcmp(attr, "refr_timer") == 0) return mp_read_ptr_lv_timer_t((void*)data->refr_timer); - if (strcmp(attr, "last_activity_time") == 0) return mp_obj_new_int_from_uint(data->last_activity_time); - if (strcmp(attr, "refreshed_area") == 0) return mp_read_byref_lv_area_t(data->refreshed_area); - if (strcmp(attr, "vsync_count") == 0) return mp_obj_new_int_from_uint(data->vsync_count); - for (PyMethodDef *m = py_lv_display_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_display_t_field_names[] = {"hor_res", "ver_res", "physical_hor_res", "physical_ver_res", "offset_x", "offset_y", "dpi", "buf_1", "buf_2", "buf_3", "buf_act", "flush_cb", "flush_wait_cb", "flushing", "flushing_last", "last_area", "last_part", "sync_cb", "sync_wait_cb", "syncing", "syncing_last", "sync_areas", "render_mode", "antialiasing", "tile_cnt", "stride_is_auto", "rendering_in_progress", "color_format", "inv_areas", "inv_area_joined", "inv_p", "inv_en_cnt", "_static_buf1", "_static_buf2", "layer_head", "screens", "sys_layer", "top_layer", "act_scr", "bottom_layer", "prev_scr", "scr_to_load", "screen_cnt", "draw_prev_over_act", "del_prev", "driver_data", "user_data", "event_list", "rotation", "matrix_rotation", "theme", "refr_timer", "last_activity_time", "refreshed_area", "vsync_count", NULL}; - -static PyObject *py_lv_display_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_display_t_field_names, py_lv_display_t_methods); -} - -static PyMethodDef py_lv_display_t_type_methods[] = { - {"__dir__", py_lv_display_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_display_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_display_t *data = (lv_display_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_display_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "hor_res") == 0) { data->hor_res = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ver_res") == 0) { data->ver_res = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "physical_hor_res") == 0) { data->physical_hor_res = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "physical_ver_res") == 0) { data->physical_ver_res = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "offset_x") == 0) { data->offset_x = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "offset_y") == 0) { data->offset_y = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "dpi") == 0) { data->dpi = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "buf_1") == 0) { data->buf_1 = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "buf_2") == 0) { data->buf_2 = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "buf_3") == 0) { data->buf_3 = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "buf_act") == 0) { data->buf_act = (void*)mp_write_ptr_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "flush_cb") == 0) { data->flush_cb = mp_lv_callback(value, lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "flush_wait_cb") == 0) { data->flush_wait_cb = mp_lv_callback(value, lv_display_t_flush_wait_cb_callback, "lv_display_t_flush_wait_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "flushing") == 0) { data->flushing = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "flushing_last") == 0) { data->flushing_last = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_area") == 0) { data->last_area = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "last_part") == 0) { data->last_part = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "sync_cb") == 0) { data->sync_cb = mp_lv_callback(value, lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "sync_wait_cb") == 0) { data->sync_wait_cb = mp_lv_callback(value, lv_display_t_sync_wait_cb_callback, "lv_display_t_sync_wait_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "syncing") == 0) { data->syncing = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "syncing_last") == 0) { data->syncing_last = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "sync_areas") == 0) { data->sync_areas = mp_write_lv_ll_t(value); result = 0; } - if (strcmp(attr, "render_mode") == 0) { data->render_mode = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "antialiasing") == 0) { data->antialiasing = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "tile_cnt") == 0) { data->tile_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "stride_is_auto") == 0) { data->stride_is_auto = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "rendering_in_progress") == 0) { data->rendering_in_progress = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color_format") == 0) { data->color_format = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "inv_areas") == 0) { lvpy_struct_array_assign(data->inv_areas, 32, sizeof(lv_area_t), mp_write_value_ptr_lv_area_t, value); result = 0; } - if (strcmp(attr, "inv_area_joined") == 0) { memcpy((void*)&data->inv_area_joined, mp_to_ptr(value), sizeof(uint8_t)*32); result = 0; } - if (strcmp(attr, "inv_p") == 0) { data->inv_p = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "inv_en_cnt") == 0) { data->inv_en_cnt = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "_static_buf1") == 0) { data->_static_buf1 = mp_write_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "_static_buf2") == 0) { data->_static_buf2 = mp_write_lv_draw_buf_t(value); result = 0; } - if (strcmp(attr, "layer_head") == 0) { data->layer_head = (void*)mp_write_ptr_lv_layer_t(value); result = 0; } - if (strcmp(attr, "screens") == 0) { data->screens = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "sys_layer") == 0) { data->sys_layer = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "top_layer") == 0) { data->top_layer = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "act_scr") == 0) { data->act_scr = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "bottom_layer") == 0) { data->bottom_layer = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "prev_scr") == 0) { data->prev_scr = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "scr_to_load") == 0) { data->scr_to_load = (void*)mp_to_lv(value); result = 0; } - if (strcmp(attr, "screen_cnt") == 0) { data->screen_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "draw_prev_over_act") == 0) { data->draw_prev_over_act = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "del_prev") == 0) { data->del_prev = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "driver_data") == 0) { data->driver_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "event_list") == 0) { data->event_list = mp_write_lv_event_list_t(value); result = 0; } - if (strcmp(attr, "rotation") == 0) { data->rotation = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "matrix_rotation") == 0) { data->matrix_rotation = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "theme") == 0) { data->theme = (void*)mp_write_ptr_lv_theme_t(value); result = 0; } - if (strcmp(attr, "refr_timer") == 0) { data->refr_timer = (void*)mp_write_ptr_lv_timer_t(value); result = 0; } - if (strcmp(attr, "last_activity_time") == 0) { data->last_activity_time = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "refreshed_area") == 0) { data->refreshed_area = mp_write_lv_area_t(value); result = 0; } - if (strcmp(attr, "vsync_count") == 0) { data->vsync_count = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_display_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_display_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_display_t)); -} - -static void py_lv_display_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_display_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_display_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_display_t_dealloc, - .tp_getattro = (getter)py_lv_display_t_getattro, - .tp_setattro = (setter)py_lv_display_t_setattro, - .tp_new = py_lv_display_t_new, - .tp_methods = py_lv_display_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_display_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_display_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_display_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_display_t*)self->data; -} - -static lv_display_t mp_write_scratch_lv_display_t; - -static inline void* mp_write_value_ptr_lv_display_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_display_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_display_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_display_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_display_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_display_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_display_t or dict, got None"); - } - memset(&mp_write_scratch_lv_display_t, 0, sizeof(lv_display_t)); - return &mp_write_scratch_lv_display_t; -} - -#define mp_write_lv_display_t(struct_obj) (*((lv_display_t*)mp_write_value_ptr_lv_display_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_display_t(void *field) -{ - return lv_to_mp_struct(&py_lv_display_t_type, field); -} - -#define mp_read_lv_display_t(field) lv_to_mp_struct_own(&py_lv_display_t_type, copy_buffer(&field, sizeof(lv_display_t))) -#define mp_read_byref_lv_display_t(field) mp_read_ptr_lv_display_t(&field) - - -/* - * lvgl extension definition for: - * lv_display_t *lv_obj_get_display(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_display(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_display_t * _res; - lvpy_lock(); - _res = ((lv_display_t *(*)(const lv_obj_t *))lv_obj_get_display)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); -} - -static PyMethodDef py_lv_obj_get_display_def = { - "lv_obj_get_display", - (PyCFunction)py_lv_obj_get_display, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_parent(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_parent(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *))lv_obj_get_parent)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} - -static PyMethodDef py_lv_obj_get_parent_def = { - "lv_obj_get_parent", - (PyCFunction)py_lv_obj_get_parent, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child(const lv_obj_t *obj, int32_t idx) - */ -static PyObject *py_lv_obj_get_child(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long idx_val; - if (!PyArg_ParseTuple(py_args, "l", &idx_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t idx = (int32_t)idx_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_obj_get_child)(obj, idx); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} - -static PyMethodDef py_lv_obj_get_child_def = { - "lv_obj_get_child", - (PyCFunction)py_lv_obj_get_child, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - -#define funcptr_constructor_cb NULL - -static inline PyObject *mp_lv_funcptr_constructor_cb(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_obj_class_t_constructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -static void lv_obj_class_t_destructor_cb_callback(const lv_obj_class_t *class_p, lv_obj_t *obj); -#define funcptr_event_cb_1 NULL - -static inline PyObject *mp_lv_funcptr_event_cb_1(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - -static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *class_p, lv_event_t *e); - -/* - * Struct lv_obj_class_t (CPython) - */ - -extern PyMethodDef py_lv_obj_class_t_methods[]; - -static PyObject *py_lv_obj_class_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_obj_class_t *data = (lv_obj_class_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "base_class") == 0) return ptr_to_mp((void*)data->base_class); - if (strcmp(attr, "constructor_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->constructor_cb, lv_obj_class_t_constructor_cb_callback, "lv_obj_class_t_constructor_cb", data->user_data); - if (strcmp(attr, "destructor_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->destructor_cb, lv_obj_class_t_destructor_cb_callback, "lv_obj_class_t_destructor_cb", data->user_data); - if (strcmp(attr, "event_cb") == 0) return mp_lv_funcptr(NULL, (void*)data->event_cb, lv_obj_class_t_event_cb_callback, "lv_obj_class_t_event_cb", data->user_data); - if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); - if (strcmp(attr, "name") == 0) return convert_to_str((void*)data->name); - if (strcmp(attr, "width_def") == 0) return mp_obj_new_int(data->width_def); - if (strcmp(attr, "height_def") == 0) return mp_obj_new_int(data->height_def); - if (strcmp(attr, "editable") == 0) return mp_obj_new_int_from_uint(data->editable); - if (strcmp(attr, "group_def") == 0) return mp_obj_new_int_from_uint(data->group_def); - if (strcmp(attr, "instance_size") == 0) return mp_obj_new_int_from_uint(data->instance_size); - if (strcmp(attr, "theme_inheritable") == 0) return mp_obj_new_int_from_uint(data->theme_inheritable); - for (PyMethodDef *m = py_lv_obj_class_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_obj_class_t_field_names[] = {"base_class", "constructor_cb", "destructor_cb", "event_cb", "user_data", "name", "width_def", "height_def", "editable", "group_def", "instance_size", "theme_inheritable", NULL}; - -static PyObject *py_lv_obj_class_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_obj_class_t_field_names, py_lv_obj_class_t_methods); -} - -static PyMethodDef py_lv_obj_class_t_type_methods[] = { - {"__dir__", py_lv_obj_class_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_obj_class_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_obj_class_t *data = (lv_obj_class_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_obj_class_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "base_class") == 0) { data->base_class = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "constructor_cb") == 0) { data->constructor_cb = (void*)mp_lv_callback(value, lv_obj_class_t_constructor_cb_callback, "lv_obj_class_t_constructor_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "destructor_cb") == 0) { data->destructor_cb = (void*)mp_lv_callback(value, lv_obj_class_t_destructor_cb_callback, "lv_obj_class_t_destructor_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "event_cb") == 0) { data->event_cb = (void*)mp_lv_callback(value, lv_obj_class_t_event_cb_callback, "lv_obj_class_t_event_cb", &data->user_data, data, NULL, NULL); result = 0; } - if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "name") == 0) { data->name = (void*)(char*)convert_from_str(value); result = 0; } - if (strcmp(attr, "width_def") == 0) { data->width_def = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "height_def") == 0) { data->height_def = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "editable") == 0) { data->editable = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "group_def") == 0) { data->group_def = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "instance_size") == 0) { data->instance_size = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "theme_inheritable") == 0) { data->theme_inheritable = (uint32_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_obj_class_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_obj_class_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_obj_class_t)); -} - -static void py_lv_obj_class_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_obj_class_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_obj_class_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_obj_class_t_dealloc, - .tp_getattro = (getter)py_lv_obj_class_t_getattro, - .tp_setattro = (setter)py_lv_obj_class_t_setattro, - .tp_new = py_lv_obj_class_t_new, - .tp_methods = py_lv_obj_class_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_obj_class_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_obj_class_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_obj_class_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_obj_class_t*)self->data; -} - -static lv_obj_class_t mp_write_scratch_lv_obj_class_t; - -static inline void* mp_write_value_ptr_lv_obj_class_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_obj_class_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_obj_class_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_obj_class_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_obj_class_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_obj_class_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_obj_class_t or dict, got None"); - } - memset(&mp_write_scratch_lv_obj_class_t, 0, sizeof(lv_obj_class_t)); - return &mp_write_scratch_lv_obj_class_t; -} - -#define mp_write_lv_obj_class_t(struct_obj) (*((lv_obj_class_t*)mp_write_value_ptr_lv_obj_class_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_obj_class_t(void *field) -{ - return lv_to_mp_struct(&py_lv_obj_class_t_type, field); -} - -#define mp_read_lv_obj_class_t(field) lv_to_mp_struct_own(&py_lv_obj_class_t_type, copy_buffer(&field, sizeof(lv_obj_class_t))) -#define mp_read_byref_lv_obj_class_t(field) mp_read_ptr_lv_obj_class_t(&field) - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_child_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) - */ -static PyObject *py_lv_obj_get_child_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long idx_val; PyObject *class_p_py; - if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &class_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t idx = (int32_t)idx_val; - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_obj_get_child_by_type)(obj, idx, class_p); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} - -static PyMethodDef py_lv_obj_get_child_by_type_def = { - "lv_obj_get_child_by_type", - (PyCFunction)py_lv_obj_get_child_by_type, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_sibling(const lv_obj_t *obj, int32_t idx) - */ -static PyObject *py_lv_obj_get_sibling(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long idx_val; - if (!PyArg_ParseTuple(py_args, "l", &idx_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t idx = (int32_t)idx_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t))lv_obj_get_sibling)(obj, idx); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} - -static PyMethodDef py_lv_obj_get_sibling_def = { - "lv_obj_get_sibling", - (PyCFunction)py_lv_obj_get_sibling, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_obj_t *lv_obj_get_sibling_by_type(const lv_obj_t *obj, int32_t idx, const lv_obj_class_t *class_p) - */ -static PyObject *py_lv_obj_get_sibling_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long idx_val; PyObject *class_p_py; - if (!PyArg_ParseTuple(py_args, "lO", &idx_val, &class_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t idx = (int32_t)idx_val; - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_obj_t * _res; - lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_obj_t *, int32_t, const lv_obj_class_t *))lv_obj_get_sibling_by_type)(obj, idx, class_p); - lvpy_unlock(); - - PyGILState_Release(gstate); - return lv_to_mp((void*)_res); -} - -static PyMethodDef py_lv_obj_get_sibling_by_type_def = { - "lv_obj_get_sibling_by_type", - (PyCFunction)py_lv_obj_get_sibling_by_type, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * uint32_t lv_obj_get_child_count(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_child_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *))lv_obj_get_child_count)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} - -static PyMethodDef py_lv_obj_get_child_count_def = { - "lv_obj_get_child_count", - (PyCFunction)py_lv_obj_get_child_count, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * uint32_t lv_obj_get_child_count_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) - */ -static PyObject *py_lv_obj_get_child_count_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *class_p_py; - if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_get_child_count_by_type)(obj, class_p); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} - -static PyMethodDef py_lv_obj_get_child_count_by_type_def = { - "lv_obj_get_child_count_by_type", - (PyCFunction)py_lv_obj_get_child_count_by_type, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_index(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_index)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_index_def = { - "lv_obj_get_index", - (PyCFunction)py_lv_obj_get_index, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_index_by_type(const lv_obj_t *obj, const lv_obj_class_t *class_p) - */ -static PyObject *py_lv_obj_get_index_by_type(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *class_p_py; - if (!PyArg_ParseTuple(py_args, "O", &class_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_obj_class_t *class_p = (const lv_obj_class_t *)mp_write_ptr_lv_obj_class_t(class_p_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, const lv_obj_class_t *))lv_obj_get_index_by_type)(obj, class_p); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_index_by_type_def = { - "lv_obj_get_index_by_type", - (PyCFunction)py_lv_obj_get_index_by_type, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * Callback function lv_obj_tree_walk_cb (CPython) - * lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_t(lv_obj_t *, void *) - */ -static lv_obj_tree_walk_res_t lv_obj_tree_walk_cb_callback(lv_obj_t *arg0, void *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_obj_tree_walk_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = lv_to_mp((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_obj_tree_walk_res_t){0}; } - lv_obj_tree_walk_res_t _c_res = (int)mp_obj_get_int(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - -/* - * lvgl extension definition for: - * void lv_obj_tree_walk(lv_obj_t *start_obj, lv_obj_tree_walk_cb_t cb, void *user_data) - */ -static PyObject *py_lv_obj_tree_walk(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *start_obj = mp_to_lv(self); - void *user_data = mp_to_ptr(user_data_py); - void *cb = mp_lv_callback(cb_py, &lv_obj_tree_walk_cb_callback, "lv_obj_tree_walk_cb", &user_data, NULL, (NULL), (NULL)); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_tree_walk_cb_t, void *))lv_obj_tree_walk)(start_obj, cb, user_data); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_tree_walk_def = { - "lv_obj_tree_walk", - (PyCFunction)py_lv_obj_tree_walk, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_dump_tree(lv_obj_t *start_obj) - */ -static PyObject *py_lv_obj_dump_tree(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *start_obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_dump_tree)(start_obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_dump_tree_def = { - "lv_obj_dump_tree", - (PyCFunction)py_lv_obj_dump_tree, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_pos(lv_obj_t *obj, int32_t x, int32_t y) - */ -static PyObject *py_lv_obj_set_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_obj_set_pos)(obj, x, y); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_pos_def = { - "lv_obj_set_pos", - (PyCFunction)py_lv_obj_set_pos, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_x(lv_obj_t *obj, int32_t x) - */ -static PyObject *py_lv_obj_set_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_set_x)(obj, x); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_x_def = { - "lv_obj_set_x", - (PyCFunction)py_lv_obj_set_x, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_y(lv_obj_t *obj, int32_t y) - */ -static PyObject *py_lv_obj_set_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long y_val; - if (!PyArg_ParseTuple(py_args, "l", &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t y = (int32_t)y_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_set_y)(obj, y); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_y_def = { - "lv_obj_set_y", - (PyCFunction)py_lv_obj_set_y, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_size(lv_obj_t *obj, int32_t w, int32_t h) - */ -static PyObject *py_lv_obj_set_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long w_val; long h_val; - if (!PyArg_ParseTuple(py_args, "ll", &w_val, &h_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t w = (int32_t)w_val; - int32_t h = (int32_t)h_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_obj_set_size)(obj, w, h); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_size_def = { - "lv_obj_set_size", - (PyCFunction)py_lv_obj_set_size, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_refr_size(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_refr_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_refr_size)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_refr_size_def = { - "lv_obj_refr_size", - (PyCFunction)py_lv_obj_refr_size, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_width(lv_obj_t *obj, int32_t w) - */ -static PyObject *py_lv_obj_set_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long w_val; - if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t w = (int32_t)w_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_set_width)(obj, w); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_width_def = { - "lv_obj_set_width", - (PyCFunction)py_lv_obj_set_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_height(lv_obj_t *obj, int32_t h) - */ -static PyObject *py_lv_obj_set_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long h_val; - if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t h = (int32_t)h_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_set_height)(obj, h); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_height_def = { - "lv_obj_set_height", - (PyCFunction)py_lv_obj_set_height, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_content_width(lv_obj_t *obj, int32_t w) - */ -static PyObject *py_lv_obj_set_content_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long w_val; - if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t w = (int32_t)w_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_set_content_width)(obj, w); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_content_width_def = { - "lv_obj_set_content_width", - (PyCFunction)py_lv_obj_set_content_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_content_height(lv_obj_t *obj, int32_t h) - */ -static PyObject *py_lv_obj_set_content_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long h_val; - if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t h = (int32_t)h_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_set_content_height)(obj, h); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_content_height_def = { - "lv_obj_set_content_height", - (PyCFunction)py_lv_obj_set_content_height, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_layout(lv_obj_t *obj, uint32_t layout) - */ -static PyObject *py_lv_obj_set_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long layout_val; - if (!PyArg_ParseTuple(py_args, "l", &layout_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - uint32_t layout = (uint32_t)layout_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t))lv_obj_set_layout)(obj, layout); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_layout_def = { - "lv_obj_set_layout", - (PyCFunction)py_lv_obj_set_layout, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_layout_positioned(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_layout_positioned(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_obj_is_layout_positioned)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_layout_positioned_def = { - "lv_obj_is_layout_positioned", - (PyCFunction)py_lv_obj_is_layout_positioned, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_mark_layout_as_dirty(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_mark_layout_as_dirty(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_mark_layout_as_dirty)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_mark_layout_as_dirty_def = { - "lv_obj_mark_layout_as_dirty", - (PyCFunction)py_lv_obj_mark_layout_as_dirty, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_update_layout(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_update_layout(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *))lv_obj_update_layout)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_update_layout_def = { - "lv_obj_update_layout", - (PyCFunction)py_lv_obj_update_layout, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_align(lv_obj_t *obj, lv_align_t align) - */ -static PyObject *py_lv_obj_set_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_align_t align = (int)mp_obj_get_int(align_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_align_t))lv_obj_set_align)(obj, align); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_align_def = { - "lv_obj_set_align", - (PyCFunction)py_lv_obj_set_align, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_align(lv_obj_t *obj, lv_align_t align, int32_t x_ofs, int32_t y_ofs) - */ -static PyObject *py_lv_obj_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *align_py; long x_ofs_val; long y_ofs_val; - if (!PyArg_ParseTuple(py_args, "Oll", &align_py, &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_align_t align = (int)mp_obj_get_int(align_py); - int32_t x_ofs = (int32_t)x_ofs_val; - int32_t y_ofs = (int32_t)y_ofs_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_align_t, int32_t, int32_t))lv_obj_align)(obj, align, x_ofs, y_ofs); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_align_def = { - "lv_obj_align", - (PyCFunction)py_lv_obj_align, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_align_to(lv_obj_t *obj, const lv_obj_t *base, lv_align_t align, int32_t x_ofs, int32_t y_ofs) - */ -static PyObject *py_lv_obj_align_to(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *base_py; PyObject *align_py; long x_ofs_val; long y_ofs_val; - if (!PyArg_ParseTuple(py_args, "OOll", &base_py, &align_py, &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_obj_t *base = (const lv_obj_t *)mp_to_lv(base_py); - lv_align_t align = (int)mp_obj_get_int(align_py); - int32_t x_ofs = (int32_t)x_ofs_val; - int32_t y_ofs = (int32_t)y_ofs_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_obj_t *, lv_align_t, int32_t, int32_t))lv_obj_align_to)(obj, base, align, x_ofs, y_ofs); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_align_to_def = { - "lv_obj_align_to", - (PyCFunction)py_lv_obj_align_to, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_center(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_center(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_center)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_center_def = { - "lv_obj_center", - (PyCFunction)py_lv_obj_center, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * Struct lv_matrix_t (CPython) - */ - -extern PyMethodDef py_lv_matrix_t_methods[]; - -static PyObject *py_lv_matrix_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_matrix_t *data = (lv_matrix_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - (void)attr; - for (PyMethodDef *m = py_lv_matrix_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_matrix_t_field_names[] = {NULL}; - -static PyObject *py_lv_matrix_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_matrix_t_field_names, py_lv_matrix_t_methods); -} - -static PyMethodDef py_lv_matrix_t_type_methods[] = { - {"__dir__", py_lv_matrix_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_matrix_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_matrix_t *data = (lv_matrix_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - - (void)value; - if (PyErr_Occurred()) { - - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_matrix_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_matrix_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, 0); -} - -static void py_lv_matrix_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_matrix_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_matrix_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_matrix_t_dealloc, - .tp_getattro = (getter)py_lv_matrix_t_getattro, - .tp_setattro = (setter)py_lv_matrix_t_setattro, - .tp_new = py_lv_matrix_t_new, - .tp_methods = py_lv_matrix_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_matrix_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_matrix_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_matrix_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_matrix_t*)self->data; -} - -#define mp_write_lv_matrix_t(struct_obj) (*((lv_matrix_t*)mp_write_ptr_lv_matrix_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_matrix_t(void *field) -{ - return lv_to_mp_struct(&py_lv_matrix_t_type, field); -} - -#define mp_read_lv_matrix_t(field) lv_to_mp_struct_own(&py_lv_matrix_t_type, copy_buffer(&field, sizeof(lv_matrix_t))) -#define mp_read_byref_lv_matrix_t(field) mp_read_ptr_lv_matrix_t(&field) - - -/* - * lvgl extension definition for: - * void lv_obj_set_transform(lv_obj_t *obj, const lv_matrix_t *matrix) - */ -static PyObject *py_lv_obj_set_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *matrix_py; - if (!PyArg_ParseTuple(py_args, "O", &matrix_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_matrix_t *matrix = (const lv_matrix_t *)mp_write_ptr_lv_matrix_t(matrix_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_matrix_t *))lv_obj_set_transform)(obj, matrix); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_transform_def = { - "lv_obj_set_transform", - (PyCFunction)py_lv_obj_set_transform, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_reset_transform(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_reset_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_reset_transform)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_reset_transform_def = { - "lv_obj_reset_transform", - (PyCFunction)py_lv_obj_reset_transform, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_get_coords(const lv_obj_t *obj, lv_area_t *coords) - */ -static PyObject *py_lv_obj_get_coords(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "O", &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_area_t *coords = mp_write_ptr_lv_area_t(coords_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_area_t *))lv_obj_get_coords)(obj, coords); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_get_coords_def = { - "lv_obj_get_coords", - (PyCFunction)py_lv_obj_get_coords, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_x(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_x)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_x_def = { - "lv_obj_get_x", - (PyCFunction)py_lv_obj_get_x, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_x2(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_x2(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_x2)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_x2_def = { - "lv_obj_get_x2", - (PyCFunction)py_lv_obj_get_x2, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_y(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_y)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_y_def = { - "lv_obj_get_y", - (PyCFunction)py_lv_obj_get_y, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_y2(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_y2(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_y2)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_y2_def = { - "lv_obj_get_y2", - (PyCFunction)py_lv_obj_get_y2, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_x_aligned(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_x_aligned(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_x_aligned)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_x_aligned_def = { - "lv_obj_get_x_aligned", - (PyCFunction)py_lv_obj_get_x_aligned, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_y_aligned(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_y_aligned(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_y_aligned)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_y_aligned_def = { - "lv_obj_get_y_aligned", - (PyCFunction)py_lv_obj_get_y_aligned, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_width(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_width)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_width_def = { - "lv_obj_get_width", - (PyCFunction)py_lv_obj_get_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_height(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_height)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_height_def = { - "lv_obj_get_height", - (PyCFunction)py_lv_obj_get_height, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_content_width(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_content_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_content_width)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_content_width_def = { - "lv_obj_get_content_width", - (PyCFunction)py_lv_obj_get_content_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_content_height(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_content_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_content_height)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_content_height_def = { - "lv_obj_get_content_height", - (PyCFunction)py_lv_obj_get_content_height, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_get_content_coords(const lv_obj_t *obj, lv_area_t *area) - */ -static PyObject *py_lv_obj_get_content_coords(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_area_t *))lv_obj_get_content_coords)(obj, area); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_get_content_coords_def = { - "lv_obj_get_content_coords", - (PyCFunction)py_lv_obj_get_content_coords, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_self_width(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_self_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_self_width)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_self_width_def = { - "lv_obj_get_self_width", - (PyCFunction)py_lv_obj_get_self_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_self_height(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_self_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_self_height)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_self_height_def = { - "lv_obj_get_self_height", - (PyCFunction)py_lv_obj_get_self_height, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_clamped_width(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_style_clamped_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_obj_get_style_clamped_width)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_clamped_width_def = { - "lv_obj_get_style_clamped_width", - (PyCFunction)py_lv_obj_get_style_clamped_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_clamped_height(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_style_clamped_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *))lv_obj_get_style_clamped_height)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_clamped_height_def = { - "lv_obj_get_style_clamped_height", - (PyCFunction)py_lv_obj_get_style_clamped_height, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_style_any_width_content(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_style_any_width_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_style_any_width_content)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_style_any_width_content_def = { - "lv_obj_is_style_any_width_content", - (PyCFunction)py_lv_obj_is_style_any_width_content, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_style_any_height_content(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_style_any_height_content(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_style_any_height_content)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_style_any_height_content_def = { - "lv_obj_is_style_any_height_content", - (PyCFunction)py_lv_obj_is_style_any_height_content, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_width_min(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_width_min(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_width_min)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_width_min_def = { - "lv_obj_is_width_min", - (PyCFunction)py_lv_obj_is_width_min, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_height_min(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_height_min(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_height_min)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_height_min_def = { - "lv_obj_is_height_min", - (PyCFunction)py_lv_obj_is_height_min, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_width_max(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_width_max(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_width_max)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_width_max_def = { - "lv_obj_is_width_max", - (PyCFunction)py_lv_obj_is_width_max, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_height_max(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_height_max(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_is_height_max)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_height_max_def = { - "lv_obj_is_height_max", - (PyCFunction)py_lv_obj_is_height_max, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_refresh_self_size(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_refresh_self_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *))lv_obj_refresh_self_size)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_refresh_self_size_def = { - "lv_obj_refresh_self_size", - (PyCFunction)py_lv_obj_refresh_self_size, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_refr_pos(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_refr_pos(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_refr_pos)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_refr_pos_def = { - "lv_obj_refr_pos", - (PyCFunction)py_lv_obj_refr_pos, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_move_to(lv_obj_t *obj, int32_t x, int32_t y) - */ -static PyObject *py_lv_obj_move_to(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t))lv_obj_move_to)(obj, x, y); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_move_to_def = { - "lv_obj_move_to", - (PyCFunction)py_lv_obj_move_to, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_move_children_by(lv_obj_t *obj, int32_t x_diff, int32_t y_diff, bool ignore_floating) - */ -static PyObject *py_lv_obj_move_children_by(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long x_diff_val; long y_diff_val; long ignore_floating_val; - if (!PyArg_ParseTuple(py_args, "lll", &x_diff_val, &y_diff_val, &ignore_floating_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t x_diff = (int32_t)x_diff_val; - int32_t y_diff = (int32_t)y_diff_val; - bool ignore_floating = (ignore_floating_val != 0); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t, bool))lv_obj_move_children_by)(obj, x_diff, y_diff, ignore_floating); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_move_children_by_def = { - "lv_obj_move_children_by", - (PyCFunction)py_lv_obj_move_children_by, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * const lv_matrix_t *lv_obj_get_transform(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const lv_matrix_t * _res; - lvpy_lock(); - _res = ((const lv_matrix_t *(*)(const lv_obj_t *))lv_obj_get_transform)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_ptr_lv_matrix_t((void*)_res); -} - -static PyMethodDef py_lv_obj_get_transform_def = { - "lv_obj_get_transform", - (PyCFunction)py_lv_obj_get_transform, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_transform_point(const lv_obj_t *obj, lv_point_t *p, lv_obj_point_transform_flag_t flags) - */ -static PyObject *py_lv_obj_transform_point(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *p_py; PyObject *flags_py; - if (!PyArg_ParseTuple(py_args, "OO", &p_py, &flags_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_point_t *p = mp_write_ptr_lv_point_t(p_py); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(flags_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_point_t *, lv_obj_point_transform_flag_t))lv_obj_transform_point)(obj, p, flags); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_transform_point_def = { - "lv_obj_transform_point", - (PyCFunction)py_lv_obj_transform_point, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_transform_point_array(const lv_obj_t *obj, lv_point_t points[], size_t count, lv_obj_point_transform_flag_t flags) - */ -static PyObject *py_lv_obj_transform_point_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *points_py; long count_val; PyObject *flags_py; - if (!PyArg_ParseTuple(py_args, "OlO", &points_py, &count_val, &flags_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_point_t *points = mp_to_ptr(points_py); - size_t count = (size_t)count_val; - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(flags_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_point_t [], size_t, lv_obj_point_transform_flag_t))lv_obj_transform_point_array)(obj, points, count, flags); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_transform_point_array_def = { - "lv_obj_transform_point_array", - (PyCFunction)py_lv_obj_transform_point_array, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_get_transformed_area(const lv_obj_t *obj, lv_area_t *area, lv_obj_point_transform_flag_t flags) - */ -static PyObject *py_lv_obj_get_transformed_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *area_py; PyObject *flags_py; - if (!PyArg_ParseTuple(py_args, "OO", &area_py, &flags_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); - lv_obj_point_transform_flag_t flags = (int)mp_obj_get_int(flags_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_area_t *, lv_obj_point_transform_flag_t))lv_obj_get_transformed_area)(obj, area, flags); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_get_transformed_area_def = { - "lv_obj_get_transformed_area", - (PyCFunction)py_lv_obj_get_transformed_area, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate_area(const lv_obj_t *obj, const lv_area_t *area) - */ -static PyObject *py_lv_obj_invalidate_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(const lv_obj_t *, const lv_area_t *))lv_obj_invalidate_area)(obj, area); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_invalidate_area_def = { - "lv_obj_invalidate_area", - (PyCFunction)py_lv_obj_invalidate_area, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_result_t lv_obj_invalidate(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_invalidate(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(const lv_obj_t *))lv_obj_invalidate)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_invalidate_def = { - "lv_obj_invalidate", - (PyCFunction)py_lv_obj_invalidate, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_area_is_visible(const lv_obj_t *obj, lv_area_t *area) - */ -static PyObject *py_lv_obj_area_is_visible(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_area_t *))lv_obj_area_is_visible)(obj, area); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_area_is_visible_def = { - "lv_obj_area_is_visible", - (PyCFunction)py_lv_obj_area_is_visible, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_visible(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_visible(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_obj_is_visible)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_visible_def = { - "lv_obj_is_visible", - (PyCFunction)py_lv_obj_is_visible, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_ext_click_area(lv_obj_t *obj, int32_t size) - */ -static PyObject *py_lv_obj_set_ext_click_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t size = (int32_t)size_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t))lv_obj_set_ext_click_area)(obj, size); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_ext_click_area_def = { - "lv_obj_set_ext_click_area", - (PyCFunction)py_lv_obj_set_ext_click_area, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_get_click_area(const lv_obj_t *obj, lv_area_t *area) - */ -static PyObject *py_lv_obj_get_click_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *, lv_area_t *))lv_obj_get_click_area)(obj, area); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_get_click_area_def = { - "lv_obj_get_click_area", - (PyCFunction)py_lv_obj_get_click_area, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_hit_test(lv_obj_t *obj, const lv_point_t *point) - */ -static PyObject *py_lv_obj_hit_test(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, const lv_point_t *))lv_obj_hit_test)(obj, point); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_hit_test_def = { - "lv_obj_hit_test", - (PyCFunction)py_lv_obj_hit_test, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_calc_dynamic_width(lv_obj_t *obj, lv_style_prop_t prop) - */ -static PyObject *py_lv_obj_calc_dynamic_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_obj_calc_dynamic_width)(obj, prop); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_calc_dynamic_width_def = { - "lv_obj_calc_dynamic_width", - (PyCFunction)py_lv_obj_calc_dynamic_width, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_calc_dynamic_height(lv_obj_t *obj, lv_style_prop_t prop) - */ -static PyObject *py_lv_obj_calc_dynamic_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(lv_obj_t *, lv_style_prop_t))lv_obj_calc_dynamic_height)(obj, prop); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_calc_dynamic_height_def = { - "lv_obj_calc_dynamic_height", - (PyCFunction)py_lv_obj_calc_dynamic_height, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_scrollbar_mode(lv_obj_t *obj, lv_scrollbar_mode_t mode) - */ -static PyObject *py_lv_obj_set_scrollbar_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *mode_py; - if (!PyArg_ParseTuple(py_args, "O", &mode_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_scrollbar_mode_t mode = (int)mp_obj_get_int(mode_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scrollbar_mode_t))lv_obj_set_scrollbar_mode)(obj, mode); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_scrollbar_mode_def = { - "lv_obj_set_scrollbar_mode", - (PyCFunction)py_lv_obj_set_scrollbar_mode, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_scroll_dir(lv_obj_t *obj, lv_dir_t dir) - */ -static PyObject *py_lv_obj_set_scroll_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *dir_py; - if (!PyArg_ParseTuple(py_args, "O", &dir_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_dir_t dir = (int)mp_obj_get_int(dir_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_dir_t))lv_obj_set_scroll_dir)(obj, dir); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_scroll_dir_def = { - "lv_obj_set_scroll_dir", - (PyCFunction)py_lv_obj_set_scroll_dir, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_scroll_snap_x(lv_obj_t *obj, lv_scroll_snap_t align) - */ -static PyObject *py_lv_obj_set_scroll_snap_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_scroll_snap_t align = (int)mp_obj_get_int(align_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_obj_set_scroll_snap_x)(obj, align); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_scroll_snap_x_def = { - "lv_obj_set_scroll_snap_x", - (PyCFunction)py_lv_obj_set_scroll_snap_x, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_scroll_snap_y(lv_obj_t *obj, lv_scroll_snap_t align) - */ -static PyObject *py_lv_obj_set_scroll_snap_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *align_py; - if (!PyArg_ParseTuple(py_args, "O", &align_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_scroll_snap_t align = (int)mp_obj_get_int(align_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_scroll_snap_t))lv_obj_set_scroll_snap_y)(obj, align); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_scroll_snap_y_def = { - "lv_obj_set_scroll_snap_y", - (PyCFunction)py_lv_obj_set_scroll_snap_y, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_scrollbar_mode_t lv_obj_get_scrollbar_mode(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scrollbar_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_scrollbar_mode_t _res; - lvpy_lock(); - _res = ((lv_scrollbar_mode_t (*)(const lv_obj_t *))lv_obj_get_scrollbar_mode)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scrollbar_mode_def = { - "lv_obj_get_scrollbar_mode", - (PyCFunction)py_lv_obj_get_scrollbar_mode, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_dir_t lv_obj_get_scroll_dir(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_dir_t _res; - lvpy_lock(); - _res = ((lv_dir_t (*)(const lv_obj_t *))lv_obj_get_scroll_dir)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_dir_def = { - "lv_obj_get_scroll_dir", - (PyCFunction)py_lv_obj_get_scroll_dir, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_scroll_snap_t lv_obj_get_scroll_snap_x(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_snap_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_scroll_snap_t _res; - lvpy_lock(); - _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_obj_get_scroll_snap_x)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_snap_x_def = { - "lv_obj_get_scroll_snap_x", - (PyCFunction)py_lv_obj_get_scroll_snap_x, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_scroll_snap_t lv_obj_get_scroll_snap_y(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_snap_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_scroll_snap_t _res; - lvpy_lock(); - _res = ((lv_scroll_snap_t (*)(const lv_obj_t *))lv_obj_get_scroll_snap_y)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_snap_y_def = { - "lv_obj_get_scroll_snap_y", - (PyCFunction)py_lv_obj_get_scroll_snap_y, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_scroll_x(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_x)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_x_def = { - "lv_obj_get_scroll_x", - (PyCFunction)py_lv_obj_get_scroll_x, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_scroll_y(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_y)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_y_def = { - "lv_obj_get_scroll_y", - (PyCFunction)py_lv_obj_get_scroll_y, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_scroll_top(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_top)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_top_def = { - "lv_obj_get_scroll_top", - (PyCFunction)py_lv_obj_get_scroll_top, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_scroll_bottom(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_bottom)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_bottom_def = { - "lv_obj_get_scroll_bottom", - (PyCFunction)py_lv_obj_get_scroll_bottom, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_scroll_left(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_left)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_left_def = { - "lv_obj_get_scroll_left", - (PyCFunction)py_lv_obj_get_scroll_left, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_scroll_right(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_get_scroll_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *))lv_obj_get_scroll_right)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_scroll_right_def = { - "lv_obj_get_scroll_right", - (PyCFunction)py_lv_obj_get_scroll_right, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_get_scroll_end(lv_obj_t *obj, lv_point_t *end) - */ -static PyObject *py_lv_obj_get_scroll_end(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *end_py; - if (!PyArg_ParseTuple(py_args, "O", &end_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_point_t *end = mp_write_ptr_lv_point_t(end_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_point_t *))lv_obj_get_scroll_end)(obj, end); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_get_scroll_end_def = { - "lv_obj_get_scroll_end", - (PyCFunction)py_lv_obj_get_scroll_end, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_by(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_scroll_by(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long dx_val; long dy_val; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "llO", &dx_val, &dy_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t dx = (int32_t)dx_val; - int32_t dy = (int32_t)dy_val; - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_obj_scroll_by)(obj, dx, dy, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scroll_by_def = { - "lv_obj_scroll_by", - (PyCFunction)py_lv_obj_scroll_by, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_by_bounded(lv_obj_t *obj, int32_t dx, int32_t dy, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_scroll_by_bounded(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long dx_val; long dy_val; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "llO", &dx_val, &dy_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t dx = (int32_t)dx_val; - int32_t dy = (int32_t)dy_val; - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_obj_scroll_by_bounded)(obj, dx, dy, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scroll_by_bounded_def = { - "lv_obj_scroll_by_bounded", - (PyCFunction)py_lv_obj_scroll_by_bounded, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_to(lv_obj_t *obj, int32_t x, int32_t y, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_scroll_to(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long x_val; long y_val; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "llO", &x_val, &y_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, int32_t, lv_anim_enable_t))lv_obj_scroll_to)(obj, x, y, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scroll_to_def = { - "lv_obj_scroll_to", - (PyCFunction)py_lv_obj_scroll_to, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_to_x(lv_obj_t *obj, int32_t x, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_scroll_to_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long x_val; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "lO", &x_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t x = (int32_t)x_val; - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_obj_scroll_to_x)(obj, x, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scroll_to_x_def = { - "lv_obj_scroll_to_x", - (PyCFunction)py_lv_obj_scroll_to_x, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_to_y(lv_obj_t *obj, int32_t y, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_scroll_to_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - long y_val; PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "lO", &y_val, &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - int32_t y = (int32_t)y_val; - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, int32_t, lv_anim_enable_t))lv_obj_scroll_to_y)(obj, y, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scroll_to_y_def = { - "lv_obj_scroll_to_y", - (PyCFunction)py_lv_obj_scroll_to_y, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_to_view(lv_obj_t *obj, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_scroll_to_view(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_scroll_to_view)(obj, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scroll_to_view_def = { - "lv_obj_scroll_to_view", - (PyCFunction)py_lv_obj_scroll_to_view, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scroll_to_view_recursive(lv_obj_t *obj, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_scroll_to_view_recursive(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_scroll_to_view_recursive)(obj, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scroll_to_view_recursive_def = { - "lv_obj_scroll_to_view_recursive", - (PyCFunction)py_lv_obj_scroll_to_view_recursive, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_is_scrolling(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_is_scrolling(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *))lv_obj_is_scrolling)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_is_scrolling_def = { - "lv_obj_is_scrolling", - (PyCFunction)py_lv_obj_is_scrolling, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_stop_scroll_anim(const lv_obj_t *obj) - */ -static PyObject *py_lv_obj_stop_scroll_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(const lv_obj_t *))lv_obj_stop_scroll_anim)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_stop_scroll_anim_def = { - "lv_obj_stop_scroll_anim", - (PyCFunction)py_lv_obj_stop_scroll_anim, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_update_snap(lv_obj_t *obj, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_update_snap(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_update_snap)(obj, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_update_snap_def = { - "lv_obj_update_snap", - (PyCFunction)py_lv_obj_update_snap, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_get_scrollbar_area(lv_obj_t *obj, lv_area_t *hor_area, lv_area_t *ver_area) - */ -static PyObject *py_lv_obj_get_scrollbar_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *hor_area_py; PyObject *ver_area_py; - if (!PyArg_ParseTuple(py_args, "OO", &hor_area_py, &ver_area_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_area_t *hor_area = mp_write_ptr_lv_area_t(hor_area_py); - lv_area_t *ver_area = mp_write_ptr_lv_area_t(ver_area_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_area_t *, lv_area_t *))lv_obj_get_scrollbar_area)(obj, hor_area, ver_area); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_get_scrollbar_area_def = { - "lv_obj_get_scrollbar_area", - (PyCFunction)py_lv_obj_get_scrollbar_area, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_scrollbar_invalidate(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_scrollbar_invalidate(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_scrollbar_invalidate)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_scrollbar_invalidate_def = { - "lv_obj_scrollbar_invalidate", - (PyCFunction)py_lv_obj_scrollbar_invalidate, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_readjust_scroll(lv_obj_t *obj, lv_anim_enable_t anim_en) - */ -static PyObject *py_lv_obj_readjust_scroll(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *anim_en_py; - if (!PyArg_ParseTuple(py_args, "O", &anim_en_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_anim_enable_t anim_en = mp_obj_is_true(anim_en_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_anim_enable_t))lv_obj_readjust_scroll)(obj, anim_en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_readjust_scroll_def = { - "lv_obj_readjust_scroll", - (PyCFunction)py_lv_obj_readjust_scroll, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * Struct lv_style_t (CPython) - */ - -extern PyMethodDef py_lv_style_t_methods[]; - -static PyObject *py_lv_style_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_style_t *data = (lv_style_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "values_and_props") == 0) return ptr_to_mp((void*)data->values_and_props); - if (strcmp(attr, "has_group") == 0) return mp_obj_new_int_from_uint(data->has_group); - if (strcmp(attr, "prop_cnt") == 0) return mp_obj_new_int_from_uint(data->prop_cnt); - for (PyMethodDef *m = py_lv_style_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_style_t_field_names[] = {"values_and_props", "has_group", "prop_cnt", NULL}; - -static PyObject *py_lv_style_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_style_t_field_names, py_lv_style_t_methods); -} - -static PyMethodDef py_lv_style_t_type_methods[] = { - {"__dir__", py_lv_style_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_style_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_style_t *data = (lv_style_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_style_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "values_and_props") == 0) { data->values_and_props = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "has_group") == 0) { data->has_group = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "prop_cnt") == 0) { data->prop_cnt = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_style_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_style_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_style_t)); -} - -static void py_lv_style_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_style_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_style_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_style_t_dealloc, - .tp_getattro = (getter)py_lv_style_t_getattro, - .tp_setattro = (setter)py_lv_style_t_setattro, - .tp_new = py_lv_style_t_new, - .tp_methods = py_lv_style_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_style_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_style_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_style_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_style_t*)self->data; -} - -static lv_style_t mp_write_scratch_lv_style_t; - -static inline void* mp_write_value_ptr_lv_style_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_style_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_style_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_style_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_style_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_style_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_style_t or dict, got None"); - } - memset(&mp_write_scratch_lv_style_t, 0, sizeof(lv_style_t)); - return &mp_write_scratch_lv_style_t; -} - -#define mp_write_lv_style_t(struct_obj) (*((lv_style_t*)mp_write_value_ptr_lv_style_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_style_t(void *field) -{ - return lv_to_mp_struct(&py_lv_style_t_type, field); -} - -#define mp_read_lv_style_t(field) lv_to_mp_struct_own(&py_lv_style_t_type, copy_buffer(&field, sizeof(lv_style_t))) -#define mp_read_byref_lv_style_t(field) mp_read_ptr_lv_style_t(&field) - - -/* - * lvgl extension definition for: - * void lv_obj_add_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_add_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *style_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_add_style)(obj, style, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_add_style_def = { - "lv_obj_add_style", - (PyCFunction)py_lv_obj_add_style, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_replace_style(lv_obj_t *obj, const lv_style_t *old_style, const lv_style_t *new_style, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_replace_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *old_style_py; PyObject *new_style_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OOO", &old_style_py, &new_style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *old_style = (const lv_style_t *)mp_write_ptr_lv_style_t(old_style_py); - const lv_style_t *new_style = (const lv_style_t *)mp_write_ptr_lv_style_t(new_style_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, const lv_style_t *, const lv_style_t *, lv_style_selector_t))lv_obj_replace_style)(obj, old_style, new_style, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_replace_style_def = { - "lv_obj_replace_style", - (PyCFunction)py_lv_obj_replace_style, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_remove_style(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_remove_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *style_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_remove_style)(obj, style, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_remove_style_def = { - "lv_obj_remove_style", - (PyCFunction)py_lv_obj_remove_style, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_remove_theme(lv_obj_t *obj, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_remove_theme(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "O", &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_style_selector_t))lv_obj_remove_theme)(obj, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_remove_theme_def = { - "lv_obj_remove_theme", - (PyCFunction)py_lv_obj_remove_theme, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_remove_style_all(lv_obj_t *obj) - */ -static PyObject *py_lv_obj_remove_style_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - - lv_obj_t *obj = mp_to_lv(self); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *))lv_obj_remove_style_all)(obj); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_remove_style_all_def = { - "lv_obj_remove_style_all", - (PyCFunction)py_lv_obj_remove_style_all, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_report_style_change(lv_style_t *style) - */ -static PyObject *py_lv_obj_report_style_change(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *style_py; - if (!PyArg_ParseTuple(py_args, "O", &style_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_t *style = mp_write_ptr_lv_style_t(style_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_style_t *))lv_obj_report_style_change)(style); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_report_style_change_def = { - "lv_obj_report_style_change", - (PyCFunction)py_lv_obj_report_style_change, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_refresh_style(lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) - */ -static PyObject *py_lv_obj_refresh_style(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_part_t, lv_style_prop_t))lv_obj_refresh_style)(obj, part, prop); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_refresh_style_def = { - "lv_obj_refresh_style", - (PyCFunction)py_lv_obj_refresh_style, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool en) - */ -static PyObject *py_lv_obj_set_style_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *style_py; PyObject *selector_py; long en_val; - if (!PyArg_ParseTuple(py_args, "OOl", &style_py, &selector_py, &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - bool en = (en_val != 0); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_obj_set_style_enabled)(obj, style, selector, en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_style_enabled_def = { - "lv_obj_set_style_enabled", - (PyCFunction)py_lv_obj_set_style_enabled, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_get_style_enabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_get_style_enabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *style_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_get_style_enabled)(obj, style, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_get_style_enabled_def = { - "lv_obj_get_style_enabled", - (PyCFunction)py_lv_obj_get_style_enabled, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_style_set_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector, bool dis) - */ -static PyObject *py_lv_obj_style_set_disabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *style_py; PyObject *selector_py; long dis_val; - if (!PyArg_ParseTuple(py_args, "OOl", &style_py, &selector_py, &dis_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - bool dis = (dis_val != 0); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t, bool))lv_obj_style_set_disabled)(obj, style, selector, dis); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_style_set_disabled_def = { - "lv_obj_style_set_disabled", - (PyCFunction)py_lv_obj_style_set_disabled, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_style_get_disabled(lv_obj_t *obj, const lv_style_t *style, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_style_get_disabled(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *style_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &style_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - const lv_style_t *style = (const lv_style_t *)mp_write_ptr_lv_style_t(style_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, const lv_style_t *, lv_style_selector_t))lv_obj_style_get_disabled)(obj, style, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_style_get_disabled_def = { - "lv_obj_style_get_disabled", - (PyCFunction)py_lv_obj_style_get_disabled, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_enable_style_refresh(bool en) - */ -static PyObject *py_lv_obj_enable_style_refresh(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - bool en = (en_val != 0); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(bool))lv_obj_enable_style_refresh)(en); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_enable_style_refresh_def = { - "lv_obj_enable_style_refresh", - (PyCFunction)py_lv_obj_enable_style_refresh, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * Struct lv_style_value_t (CPython) - */ - -extern PyMethodDef py_lv_style_value_t_methods[]; - -static PyObject *py_lv_style_value_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_style_value_t *data = (lv_style_value_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "num") == 0) return mp_obj_new_int(data->num); - if (strcmp(attr, "ptr") == 0) return ptr_to_mp((void*)data->ptr); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - for (PyMethodDef *m = py_lv_style_value_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_style_value_t_field_names[] = {"num", "ptr", "color", NULL}; - -static PyObject *py_lv_style_value_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_style_value_t_field_names, py_lv_style_value_t_methods); -} - -static PyMethodDef py_lv_style_value_t_type_methods[] = { - {"__dir__", py_lv_style_value_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_style_value_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_style_value_t *data = (lv_style_value_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_style_value_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "num") == 0) { data->num = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "ptr") == 0) { data->ptr = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_style_value_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_style_value_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_style_value_t)); -} - -static void py_lv_style_value_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_style_value_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_style_value_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_style_value_t_dealloc, - .tp_getattro = (getter)py_lv_style_value_t_getattro, - .tp_setattro = (setter)py_lv_style_value_t_setattro, - .tp_new = py_lv_style_value_t_new, - .tp_methods = py_lv_style_value_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_style_value_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_style_value_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_style_value_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_style_value_t*)self->data; -} - -static lv_style_value_t mp_write_scratch_lv_style_value_t; - -static inline void* mp_write_value_ptr_lv_style_value_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_style_value_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_style_value_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_style_value_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_style_value_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_style_value_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_style_value_t or dict, got None"); - } - memset(&mp_write_scratch_lv_style_value_t, 0, sizeof(lv_style_value_t)); - return &mp_write_scratch_lv_style_value_t; -} - -#define mp_write_lv_style_value_t(struct_obj) (*((lv_style_value_t*)mp_write_value_ptr_lv_style_value_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_style_value_t(void *field) -{ - return lv_to_mp_struct(&py_lv_style_value_t_type, field); -} - -#define mp_read_lv_style_value_t(field) lv_to_mp_struct_own(&py_lv_style_value_t_type, copy_buffer(&field, sizeof(lv_style_value_t))) -#define mp_read_byref_lv_style_value_t(field) mp_read_ptr_lv_style_value_t(&field) +static PyMethodDef py_lv_obj_get_style_transform_scale_x_def = { + "lv_obj_get_style_transform_scale_x", + (PyCFunction)py_lv_obj_get_style_transform_scale_x, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * lv_style_value_t lv_obj_get_style_prop(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) + * int32_t lv_obj_get_style_transform_scale_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); lv_part_t part = (int)mp_obj_get_int(part_py); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_style_value_t _res; - lvpy_lock(); - _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_obj_get_style_prop)(obj, part, prop); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_style_value_t(_res); -} - -static PyMethodDef py_lv_obj_get_style_prop_def = { - "lv_obj_get_style_prop", - (PyCFunction)py_lv_obj_get_style_prop, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_has_style_prop(const lv_obj_t *obj, lv_style_selector_t selector, lv_style_prop_t prop) - */ -static PyObject *py_lv_obj_has_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *selector_py; PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "OO", &selector_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_obj_t *, lv_style_selector_t, lv_style_prop_t))lv_obj_has_style_prop)(obj, selector, prop); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_has_style_prop_def = { - "lv_obj_has_style_prop", - (PyCFunction)py_lv_obj_has_style_prop, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * void lv_obj_set_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t value, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_set_local_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *prop_py; PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OOO", &prop_py, &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - lv_style_value_t value = mp_write_lv_style_value_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t, lv_style_selector_t))lv_obj_set_local_style_prop)(obj, prop, value, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_obj_set_local_style_prop_def = { - "lv_obj_set_local_style_prop", - (PyCFunction)py_lv_obj_set_local_style_prop, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_style_res_t lv_obj_get_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_value_t *value, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_get_local_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *prop_py; PyObject *value_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OOO", &prop_py, &value_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - lv_style_value_t *value = mp_write_ptr_lv_style_value_t(value_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_res_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_style_res_t (*)(lv_obj_t *, lv_style_prop_t, lv_style_value_t *, lv_style_selector_t))lv_obj_get_local_style_prop)(obj, prop, value, selector); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_local_style_prop_def = { - "lv_obj_get_local_style_prop", - (PyCFunction)py_lv_obj_get_local_style_prop, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * bool lv_obj_remove_local_style_prop(lv_obj_t *obj, lv_style_prop_t prop, lv_style_selector_t selector) - */ -static PyObject *py_lv_obj_remove_local_style_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *prop_py; PyObject *selector_py; - if (!PyArg_ParseTuple(py_args, "OO", &prop_py, &selector_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - lv_style_selector_t selector = (uint32_t)mp_obj_get_int(selector_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, lv_style_prop_t, lv_style_selector_t))lv_obj_remove_local_style_prop)(obj, prop, selector); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_obj_remove_local_style_prop_def = { - "lv_obj_remove_local_style_prop", - (PyCFunction)py_lv_obj_remove_local_style_prop, +static PyMethodDef py_lv_obj_get_style_transform_scale_y_def = { + "lv_obj_get_style_transform_scale_y", + (PyCFunction)py_lv_obj_get_style_transform_scale_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19901,31 +14696,30 @@ static PyMethodDef py_lv_obj_remove_local_style_prop_def = { /* * lvgl extension definition for: - * lv_style_value_t lv_obj_style_apply_color_filter(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) + * int32_t lv_obj_get_style_transform_rotation(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_style_apply_color_filter(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *part_py; PyObject *v_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &v_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); lv_part_t part = (int)mp_obj_get_int(part_py); - lv_style_value_t v = mp_write_lv_style_value_t(v_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_value_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_obj_style_apply_color_filter)(obj, part, v); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_rotation)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_style_value_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_style_apply_color_filter_def = { - "lv_obj_style_apply_color_filter", - (PyCFunction)py_lv_obj_style_apply_color_filter, +static PyMethodDef py_lv_obj_get_style_transform_rotation_def = { + "lv_obj_get_style_transform_rotation", + (PyCFunction)py_lv_obj_get_style_transform_rotation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19933,30 +14727,30 @@ static PyMethodDef py_lv_obj_style_apply_color_filter_def = { /* * lvgl extension definition for: - * void lv_obj_fade_in(lv_obj_t *obj, uint32_t time, uint32_t delay) + * int32_t lv_obj_get_style_transform_pivot_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_fade_in(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long time_val; long delay_val; - if (!PyArg_ParseTuple(py_args, "ll", &time_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t time = (uint32_t)time_val; - uint32_t delay = (uint32_t)delay_val; + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_obj_fade_in)(obj, time, delay); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_fade_in_def = { - "lv_obj_fade_in", - (PyCFunction)py_lv_obj_fade_in, +static PyMethodDef py_lv_obj_get_style_transform_pivot_x_def = { + "lv_obj_get_style_transform_pivot_x", + (PyCFunction)py_lv_obj_get_style_transform_pivot_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19964,30 +14758,30 @@ static PyMethodDef py_lv_obj_fade_in_def = { /* * lvgl extension definition for: - * void lv_obj_fade_out(lv_obj_t *obj, uint32_t time, uint32_t delay) + * int32_t lv_obj_get_style_transform_pivot_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_fade_out(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long time_val; long delay_val; - if (!PyArg_ParseTuple(py_args, "ll", &time_val, &delay_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *part_py; + if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } lv_obj_t *obj = mp_to_lv(self); - uint32_t time = (uint32_t)time_val; - uint32_t delay = (uint32_t)delay_val; + lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, uint32_t, uint32_t))lv_obj_fade_out)(obj, time, delay); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_fade_out_def = { - "lv_obj_fade_out", - (PyCFunction)py_lv_obj_fade_out, +static PyMethodDef py_lv_obj_get_style_transform_pivot_y_def = { + "lv_obj_get_style_transform_pivot_y", + (PyCFunction)py_lv_obj_get_style_transform_pivot_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -19995,9 +14789,9 @@ static PyMethodDef py_lv_obj_fade_out_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_width(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_transform_skew_x(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_skew_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20009,16 +14803,16 @@ static PyObject *py_lv_obj_get_style_width(PyObject *self, PyObject *py_args, Py int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_x)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_width_def = { - "lv_obj_get_style_width", - (PyCFunction)py_lv_obj_get_style_width, +static PyMethodDef py_lv_obj_get_style_transform_skew_x_def = { + "lv_obj_get_style_transform_skew_x", + (PyCFunction)py_lv_obj_get_style_transform_skew_x, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20026,9 +14820,9 @@ static PyMethodDef py_lv_obj_get_style_width_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_min_width(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_transform_skew_y(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_min_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_transform_skew_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20040,16 +14834,16 @@ static PyObject *py_lv_obj_get_style_min_width(PyObject *self, PyObject *py_args int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_y)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_min_width_def = { - "lv_obj_get_style_min_width", - (PyCFunction)py_lv_obj_get_style_min_width, +static PyMethodDef py_lv_obj_get_style_transform_skew_y_def = { + "lv_obj_get_style_transform_skew_y", + (PyCFunction)py_lv_obj_get_style_transform_skew_y, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20057,9 +14851,9 @@ static PyMethodDef py_lv_obj_get_style_min_width_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_max_width(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_pad_top(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_max_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20071,16 +14865,16 @@ static PyObject *py_lv_obj_get_style_max_width(PyObject *self, PyObject *py_args int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_top)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_max_width_def = { - "lv_obj_get_style_max_width", - (PyCFunction)py_lv_obj_get_style_max_width, +static PyMethodDef py_lv_obj_get_style_pad_top_def = { + "lv_obj_get_style_pad_top", + (PyCFunction)py_lv_obj_get_style_pad_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20088,9 +14882,9 @@ static PyMethodDef py_lv_obj_get_style_max_width_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_height(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_pad_bottom(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20102,16 +14896,16 @@ static PyObject *py_lv_obj_get_style_height(PyObject *self, PyObject *py_args, P int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_bottom)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_height_def = { - "lv_obj_get_style_height", - (PyCFunction)py_lv_obj_get_style_height, +static PyMethodDef py_lv_obj_get_style_pad_bottom_def = { + "lv_obj_get_style_pad_bottom", + (PyCFunction)py_lv_obj_get_style_pad_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20119,9 +14913,9 @@ static PyMethodDef py_lv_obj_get_style_height_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_min_height(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_pad_left(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_min_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20133,16 +14927,16 @@ static PyObject *py_lv_obj_get_style_min_height(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_min_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_left)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_min_height_def = { - "lv_obj_get_style_min_height", - (PyCFunction)py_lv_obj_get_style_min_height, +static PyMethodDef py_lv_obj_get_style_pad_left_def = { + "lv_obj_get_style_pad_left", + (PyCFunction)py_lv_obj_get_style_pad_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20150,9 +14944,9 @@ static PyMethodDef py_lv_obj_get_style_min_height_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_max_height(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_pad_right(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_max_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20164,16 +14958,16 @@ static PyObject *py_lv_obj_get_style_max_height(PyObject *self, PyObject *py_arg int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_max_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_right)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_max_height_def = { - "lv_obj_get_style_max_height", - (PyCFunction)py_lv_obj_get_style_max_height, +static PyMethodDef py_lv_obj_get_style_pad_right_def = { + "lv_obj_get_style_pad_right", + (PyCFunction)py_lv_obj_get_style_pad_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20181,9 +14975,9 @@ static PyMethodDef py_lv_obj_get_style_max_height_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_length(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_pad_row(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_length(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_row(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20195,16 +14989,16 @@ static PyObject *py_lv_obj_get_style_length(PyObject *self, PyObject *py_args, P int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_length)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_row)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_length_def = { - "lv_obj_get_style_length", - (PyCFunction)py_lv_obj_get_style_length, +static PyMethodDef py_lv_obj_get_style_pad_row_def = { + "lv_obj_get_style_pad_row", + (PyCFunction)py_lv_obj_get_style_pad_row, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20212,9 +15006,9 @@ static PyMethodDef py_lv_obj_get_style_length_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_x(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_pad_column(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_column(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20226,16 +15020,16 @@ static PyObject *py_lv_obj_get_style_x(PyObject *self, PyObject *py_args, PyObje int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_column)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_x_def = { - "lv_obj_get_style_x", - (PyCFunction)py_lv_obj_get_style_x, +static PyMethodDef py_lv_obj_get_style_pad_column_def = { + "lv_obj_get_style_pad_column", + (PyCFunction)py_lv_obj_get_style_pad_column, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20243,9 +15037,9 @@ static PyMethodDef py_lv_obj_get_style_x_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_y(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_pad_radial(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_pad_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20257,16 +15051,16 @@ static PyObject *py_lv_obj_get_style_y(PyObject *self, PyObject *py_args, PyObje int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_radial)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_y_def = { - "lv_obj_get_style_y", - (PyCFunction)py_lv_obj_get_style_y, +static PyMethodDef py_lv_obj_get_style_pad_radial_def = { + "lv_obj_get_style_pad_radial", + (PyCFunction)py_lv_obj_get_style_pad_radial, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20274,9 +15068,9 @@ static PyMethodDef py_lv_obj_get_style_y_def = { /* * lvgl extension definition for: - * lv_align_t lv_obj_get_style_align(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_margin_top(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20286,18 +15080,18 @@ static PyObject *py_lv_obj_get_style_align(PyObject *self, PyObject *py_args, Py lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_align_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_align_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_align)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_top)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_align_def = { - "lv_obj_get_style_align", - (PyCFunction)py_lv_obj_get_style_align, +static PyMethodDef py_lv_obj_get_style_margin_top_def = { + "lv_obj_get_style_margin_top", + (PyCFunction)py_lv_obj_get_style_margin_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20305,9 +15099,9 @@ static PyMethodDef py_lv_obj_get_style_align_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_width(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_margin_bottom(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20319,16 +15113,16 @@ static PyObject *py_lv_obj_get_style_transform_width(PyObject *self, PyObject *p int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_width)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_bottom)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_width_def = { - "lv_obj_get_style_transform_width", - (PyCFunction)py_lv_obj_get_style_transform_width, +static PyMethodDef py_lv_obj_get_style_margin_bottom_def = { + "lv_obj_get_style_margin_bottom", + (PyCFunction)py_lv_obj_get_style_margin_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20336,9 +15130,9 @@ static PyMethodDef py_lv_obj_get_style_transform_width_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_height(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_margin_left(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20350,16 +15144,16 @@ static PyObject *py_lv_obj_get_style_transform_height(PyObject *self, PyObject * int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_height)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_left)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_obj_get_style_transform_height_def = { - "lv_obj_get_style_transform_height", - (PyCFunction)py_lv_obj_get_style_transform_height, +} + +static PyMethodDef py_lv_obj_get_style_margin_left_def = { + "lv_obj_get_style_margin_left", + (PyCFunction)py_lv_obj_get_style_margin_left, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20367,9 +15161,9 @@ static PyMethodDef py_lv_obj_get_style_transform_height_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_translate_x(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_margin_right(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_translate_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_margin_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20381,16 +15175,16 @@ static PyObject *py_lv_obj_get_style_translate_x(PyObject *self, PyObject *py_ar int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_right)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_translate_x_def = { - "lv_obj_get_style_translate_x", - (PyCFunction)py_lv_obj_get_style_translate_x, +static PyMethodDef py_lv_obj_get_style_margin_right_def = { + "lv_obj_get_style_margin_right", + (PyCFunction)py_lv_obj_get_style_margin_right, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20398,9 +15192,9 @@ static PyMethodDef py_lv_obj_get_style_translate_x_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_translate_y(const lv_obj_t *obj, lv_part_t part) + * lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_translate_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20410,18 +15204,18 @@ static PyObject *py_lv_obj_get_style_translate_y(PyObject *self, PyObject *py_ar lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_y)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_translate_y_def = { - "lv_obj_get_style_translate_y", - (PyCFunction)py_lv_obj_get_style_translate_y, +static PyMethodDef py_lv_obj_get_style_bg_color_def = { + "lv_obj_get_style_bg_color", + (PyCFunction)py_lv_obj_get_style_bg_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20429,9 +15223,9 @@ static PyMethodDef py_lv_obj_get_style_translate_y_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_translate_radial(const lv_obj_t *obj, lv_part_t part) + * lv_color_t lv_obj_get_style_bg_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_translate_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20441,18 +15235,18 @@ static PyObject *py_lv_obj_get_style_translate_radial(PyObject *self, PyObject * lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_translate_radial)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_translate_radial_def = { - "lv_obj_get_style_translate_radial", - (PyCFunction)py_lv_obj_get_style_translate_radial, +static PyMethodDef py_lv_obj_get_style_bg_color_filtered_def = { + "lv_obj_get_style_bg_color_filtered", + (PyCFunction)py_lv_obj_get_style_bg_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20460,9 +15254,9 @@ static PyMethodDef py_lv_obj_get_style_translate_radial_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_scale_x(const lv_obj_t *obj, lv_part_t part) + * lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_scale_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20472,18 +15266,18 @@ static PyObject *py_lv_obj_get_style_transform_scale_x(PyObject *self, PyObject lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_opa_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_x)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_transform_scale_x_def = { - "lv_obj_get_style_transform_scale_x", - (PyCFunction)py_lv_obj_get_style_transform_scale_x, +static PyMethodDef py_lv_obj_get_style_bg_opa_def = { + "lv_obj_get_style_bg_opa", + (PyCFunction)py_lv_obj_get_style_bg_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20491,9 +15285,9 @@ static PyMethodDef py_lv_obj_get_style_transform_scale_x_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_scale_y(const lv_obj_t *obj, lv_part_t part) + * lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_scale_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20503,18 +15297,18 @@ static PyObject *py_lv_obj_get_style_transform_scale_y(PyObject *self, PyObject lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_scale_y)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_transform_scale_y_def = { - "lv_obj_get_style_transform_scale_y", - (PyCFunction)py_lv_obj_get_style_transform_scale_y, +static PyMethodDef py_lv_obj_get_style_bg_grad_color_def = { + "lv_obj_get_style_bg_grad_color", + (PyCFunction)py_lv_obj_get_style_bg_grad_color, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20522,9 +15316,9 @@ static PyMethodDef py_lv_obj_get_style_transform_scale_y_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_rotation(const lv_obj_t *obj, lv_part_t part) + * lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_rotation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20534,18 +15328,18 @@ static PyObject *py_lv_obj_get_style_transform_rotation(PyObject *self, PyObject lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_rotation)(obj, part); + _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_filtered)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_obj_get_style_transform_rotation_def = { - "lv_obj_get_style_transform_rotation", - (PyCFunction)py_lv_obj_get_style_transform_rotation, +static PyMethodDef py_lv_obj_get_style_bg_grad_color_filtered_def = { + "lv_obj_get_style_bg_grad_color_filtered", + (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20553,9 +15347,9 @@ static PyMethodDef py_lv_obj_get_style_transform_rotation_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_pivot_x(const lv_obj_t *obj, lv_part_t part) + * lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_pivot_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20565,18 +15359,18 @@ static PyObject *py_lv_obj_get_style_transform_pivot_x(PyObject *self, PyObject lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_grad_dir_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_x)(obj, part); + _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_dir)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_pivot_x_def = { - "lv_obj_get_style_transform_pivot_x", - (PyCFunction)py_lv_obj_get_style_transform_pivot_x, +static PyMethodDef py_lv_obj_get_style_bg_grad_dir_def = { + "lv_obj_get_style_bg_grad_dir", + (PyCFunction)py_lv_obj_get_style_bg_grad_dir, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20584,9 +15378,9 @@ static PyMethodDef py_lv_obj_get_style_transform_pivot_x_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_pivot_y(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_bg_main_stop(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_pivot_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_main_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20598,16 +15392,16 @@ static PyObject *py_lv_obj_get_style_transform_pivot_y(PyObject *self, PyObject int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_pivot_y)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_stop)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_pivot_y_def = { - "lv_obj_get_style_transform_pivot_y", - (PyCFunction)py_lv_obj_get_style_transform_pivot_y, +static PyMethodDef py_lv_obj_get_style_bg_main_stop_def = { + "lv_obj_get_style_bg_main_stop", + (PyCFunction)py_lv_obj_get_style_bg_main_stop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20615,9 +15409,9 @@ static PyMethodDef py_lv_obj_get_style_transform_pivot_y_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_skew_x(const lv_obj_t *obj, lv_part_t part) + * int32_t lv_obj_get_style_bg_grad_stop(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_skew_x(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20629,16 +15423,16 @@ static PyObject *py_lv_obj_get_style_transform_skew_x(PyObject *self, PyObject * int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_x)(obj, part); + _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_stop)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_obj_get_style_transform_skew_x_def = { - "lv_obj_get_style_transform_skew_x", - (PyCFunction)py_lv_obj_get_style_transform_skew_x, +static PyMethodDef py_lv_obj_get_style_bg_grad_stop_def = { + "lv_obj_get_style_bg_grad_stop", + (PyCFunction)py_lv_obj_get_style_bg_grad_stop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20646,9 +15440,9 @@ static PyMethodDef py_lv_obj_get_style_transform_skew_x_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_transform_skew_y(const lv_obj_t *obj, lv_part_t part) + * lv_opa_t lv_obj_get_style_bg_main_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_transform_skew_y(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_main_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20658,18 +15452,18 @@ static PyObject *py_lv_obj_get_style_transform_skew_y(PyObject *self, PyObject * lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_opa_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_transform_skew_y)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_transform_skew_y_def = { - "lv_obj_get_style_transform_skew_y", - (PyCFunction)py_lv_obj_get_style_transform_skew_y, +static PyMethodDef py_lv_obj_get_style_bg_main_opa_def = { + "lv_obj_get_style_bg_main_opa", + (PyCFunction)py_lv_obj_get_style_bg_main_opa, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -20677,9 +15471,9 @@ static PyMethodDef py_lv_obj_get_style_transform_skew_y_def = { /* * lvgl extension definition for: - * int32_t lv_obj_get_style_pad_top(const lv_obj_t *obj, lv_part_t part) + * lv_opa_t lv_obj_get_style_bg_grad_opa(const lv_obj_t *obj, lv_part_t part) */ -static PyObject *py_lv_obj_get_style_pad_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_obj_get_style_bg_grad_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -20689,641 +15483,841 @@ static PyObject *py_lv_obj_get_style_pad_top(PyObject *self, PyObject *py_args, lv_part_t part = (int)mp_obj_get_int(part_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_opa_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_top)(obj, part); + _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_opa)(obj, part); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_obj_get_style_pad_top_def = { - "lv_obj_get_style_pad_top", - (PyCFunction)py_lv_obj_get_style_pad_top, +static PyMethodDef py_lv_obj_get_style_bg_grad_opa_def = { + "lv_obj_get_style_bg_grad_opa", + (PyCFunction)py_lv_obj_get_style_bg_grad_opa, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_pad_bottom(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +/* + * Struct lv_grad_stop_t (CPython) + */ + +extern PyMethodDef py_lv_grad_stop_t_methods[]; + +static PyObject *py_lv_grad_stop_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_stop_t *data = (lv_grad_stop_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "frac") == 0) return mp_obj_new_int_from_uint(data->frac); + for (PyMethodDef *m = py_lv_grad_stop_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_grad_stop_t_field_names[] = {"color", "opa", "frac", NULL}; + +static PyObject *py_lv_grad_stop_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_grad_stop_t_field_names, py_lv_grad_stop_t_methods); +} + +static PyMethodDef py_lv_grad_stop_t_type_methods[] = { + {"__dir__", py_lv_grad_stop_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_grad_stop_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_stop_t *data = (lv_grad_stop_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_grad_stop_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "frac") == 0) { data->frac = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_grad_stop_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_grad_stop_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_stop_t)); +} + +static void py_lv_grad_stop_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_grad_stop_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_grad_stop_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_grad_stop_t_dealloc, + .tp_getattro = (getter)py_lv_grad_stop_t_getattro, + .tp_setattro = (setter)py_lv_grad_stop_t_setattro, + .tp_new = py_lv_grad_stop_t_new, + .tp_methods = py_lv_grad_stop_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_grad_stop_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_grad_stop_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_stop_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_grad_stop_t*)self->data; +} + +static lv_grad_stop_t mp_write_scratch_lv_grad_stop_t; + +static inline void* mp_write_value_ptr_lv_grad_stop_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_stop_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_grad_stop_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_stop_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_grad_stop_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_grad_stop_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_stop_t or dict, got None"); + } + memset(&mp_write_scratch_lv_grad_stop_t, 0, sizeof(lv_grad_stop_t)); + return &mp_write_scratch_lv_grad_stop_t; +} + +#define mp_write_lv_grad_stop_t(struct_obj) (*((lv_grad_stop_t*)mp_write_value_ptr_lv_grad_stop_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_grad_stop_t(void *field) +{ + return lv_to_mp_struct(&py_lv_grad_stop_t_type, field); +} + +#define mp_read_lv_grad_stop_t(field) lv_to_mp_struct_own(&py_lv_grad_stop_t_type, copy_buffer(&field, sizeof(lv_grad_stop_t))) +#define mp_read_byref_lv_grad_stop_t(field) mp_read_ptr_lv_grad_stop_t(&field) + +typedef __typeof__( ((lv_grad_dsc_t*)(0))->params ) lv_grad_dsc_params_t; +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->linear ) lv_grad_dsc_params_linear_t; + +/* + * Struct lv_grad_dsc_params_linear_t (CPython) + */ + +extern PyMethodDef py_lv_grad_dsc_params_linear_t_methods[]; + +static PyObject *py_lv_grad_dsc_params_linear_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "start") == 0) return mp_read_byref_lv_point_t(data->start); + if (strcmp(attr, "end") == 0) return mp_read_byref_lv_point_t(data->end); + for (PyMethodDef *m = py_lv_grad_dsc_params_linear_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_grad_dsc_params_linear_t_field_names[] = {"start", "end", NULL}; + +static PyObject *py_lv_grad_dsc_params_linear_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_grad_dsc_params_linear_t_field_names, py_lv_grad_dsc_params_linear_t_methods); +} + +static PyMethodDef py_lv_grad_dsc_params_linear_t_type_methods[] = { + {"__dir__", py_lv_grad_dsc_params_linear_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_grad_dsc_params_linear_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_linear_t *data = (lv_grad_dsc_params_linear_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_grad_dsc_params_linear_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "start") == 0) { data->start = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "end") == 0) { data->end = mp_write_lv_point_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_linear_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_grad_dsc_params_linear_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_linear_t)); +} + +static void py_lv_grad_dsc_params_linear_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_grad_dsc_params_linear_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_grad_dsc_params_linear_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_grad_dsc_params_linear_t_dealloc, + .tp_getattro = (getter)py_lv_grad_dsc_params_linear_t_getattro, + .tp_setattro = (setter)py_lv_grad_dsc_params_linear_t_setattro, + .tp_new = py_lv_grad_dsc_params_linear_t_new, + .tp_methods = py_lv_grad_dsc_params_linear_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_grad_dsc_params_linear_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_linear_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_linear_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_grad_dsc_params_linear_t*)self->data; +} + +static lv_grad_dsc_params_linear_t mp_write_scratch_lv_grad_dsc_params_linear_t; + +static inline void* mp_write_value_ptr_lv_grad_dsc_params_linear_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_linear_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_grad_dsc_params_linear_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_linear_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_grad_dsc_params_linear_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_grad_dsc_params_linear_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_linear_t or dict, got None"); + } + memset(&mp_write_scratch_lv_grad_dsc_params_linear_t, 0, sizeof(lv_grad_dsc_params_linear_t)); + return &mp_write_scratch_lv_grad_dsc_params_linear_t; +} + +#define mp_write_lv_grad_dsc_params_linear_t(struct_obj) (*((lv_grad_dsc_params_linear_t*)mp_write_value_ptr_lv_grad_dsc_params_linear_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_grad_dsc_params_linear_t(void *field) +{ + return lv_to_mp_struct(&py_lv_grad_dsc_params_linear_t_type, field); +} + +#define mp_read_lv_grad_dsc_params_linear_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_linear_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_linear_t))) +#define mp_read_byref_lv_grad_dsc_params_linear_t(field) mp_read_ptr_lv_grad_dsc_params_linear_t(&field) + +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->radial ) lv_grad_dsc_params_radial_t; + +/* + * Struct lv_grad_dsc_params_radial_t (CPython) + */ + +extern PyMethodDef py_lv_grad_dsc_params_radial_t_methods[]; + +static PyObject *py_lv_grad_dsc_params_radial_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "focal") == 0) return mp_read_byref_lv_point_t(data->focal); + if (strcmp(attr, "focal_extent") == 0) return mp_read_byref_lv_point_t(data->focal_extent); + if (strcmp(attr, "end") == 0) return mp_read_byref_lv_point_t(data->end); + if (strcmp(attr, "end_extent") == 0) return mp_read_byref_lv_point_t(data->end_extent); + for (PyMethodDef *m = py_lv_grad_dsc_params_radial_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_grad_dsc_params_radial_t_field_names[] = {"focal", "focal_extent", "end", "end_extent", NULL}; + +static PyObject *py_lv_grad_dsc_params_radial_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_grad_dsc_params_radial_t_field_names, py_lv_grad_dsc_params_radial_t_methods); +} + +static PyMethodDef py_lv_grad_dsc_params_radial_t_type_methods[] = { + {"__dir__", py_lv_grad_dsc_params_radial_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_grad_dsc_params_radial_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_radial_t *data = (lv_grad_dsc_params_radial_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_grad_dsc_params_radial_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "focal") == 0) { data->focal = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "focal_extent") == 0) { data->focal_extent = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "end") == 0) { data->end = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "end_extent") == 0) { data->end_extent = mp_write_lv_point_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_radial_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_grad_dsc_params_radial_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_radial_t)); +} + +static void py_lv_grad_dsc_params_radial_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_bottom)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_pad_bottom_def = { - "lv_obj_get_style_pad_bottom", - (PyCFunction)py_lv_obj_get_style_pad_bottom, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_grad_dsc_params_radial_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_grad_dsc_params_radial_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_grad_dsc_params_radial_t_dealloc, + .tp_getattro = (getter)py_lv_grad_dsc_params_radial_t_getattro, + .tp_setattro = (setter)py_lv_grad_dsc_params_radial_t_setattro, + .tp_new = py_lv_grad_dsc_params_radial_t_new, + .tp_methods = py_lv_grad_dsc_params_radial_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_pad_left(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_grad_dsc_params_radial_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_left)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_radial_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_radial_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_grad_dsc_params_radial_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_pad_left_def = { - "lv_obj_get_style_pad_left", - (PyCFunction)py_lv_obj_get_style_pad_left, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static lv_grad_dsc_params_radial_t mp_write_scratch_lv_grad_dsc_params_radial_t; -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_pad_right(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_value_ptr_lv_grad_dsc_params_radial_t(PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_right)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_radial_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_grad_dsc_params_radial_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_radial_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_grad_dsc_params_radial_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_grad_dsc_params_radial_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_radial_t or dict, got None"); + } + memset(&mp_write_scratch_lv_grad_dsc_params_radial_t, 0, sizeof(lv_grad_dsc_params_radial_t)); + return &mp_write_scratch_lv_grad_dsc_params_radial_t; } -static PyMethodDef py_lv_obj_get_style_pad_right_def = { - "lv_obj_get_style_pad_right", - (PyCFunction)py_lv_obj_get_style_pad_right, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_grad_dsc_params_radial_t(struct_obj) (*((lv_grad_dsc_params_radial_t*)mp_write_value_ptr_lv_grad_dsc_params_radial_t(struct_obj))) -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_pad_row(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_row(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_grad_dsc_params_radial_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_row)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_grad_dsc_params_radial_t_type, field); } -static PyMethodDef py_lv_obj_get_style_pad_row_def = { - "lv_obj_get_style_pad_row", - (PyCFunction)py_lv_obj_get_style_pad_row, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_grad_dsc_params_radial_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_radial_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_radial_t))) +#define mp_read_byref_lv_grad_dsc_params_radial_t(field) mp_read_ptr_lv_grad_dsc_params_radial_t(&field) +typedef __typeof__( ((lv_grad_dsc_params_t*)(0))->conical ) lv_grad_dsc_params_conical_t; /* - * lvgl extension definition for: - * int32_t lv_obj_get_style_pad_column(const lv_obj_t *obj, lv_part_t part) + * Struct lv_grad_dsc_params_conical_t (CPython) */ -static PyObject *py_lv_obj_get_style_pad_column(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_grad_dsc_params_conical_t_methods[]; + +static PyObject *py_lv_grad_dsc_params_conical_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_column)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "center") == 0) return mp_read_byref_lv_point_t(data->center); + if (strcmp(attr, "start_angle") == 0) return mp_obj_new_int(data->start_angle); + if (strcmp(attr, "end_angle") == 0) return mp_obj_new_int(data->end_angle); + for (PyMethodDef *m = py_lv_grad_dsc_params_conical_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_pad_column_def = { - "lv_obj_get_style_pad_column", - (PyCFunction)py_lv_obj_get_style_pad_column, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_grad_dsc_params_conical_t_field_names[] = {"center", "start_angle", "end_angle", NULL}; -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_pad_radial(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_pad_radial(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_dsc_params_conical_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_pad_radial)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_grad_dsc_params_conical_t_field_names, py_lv_grad_dsc_params_conical_t_methods); } -static PyMethodDef py_lv_obj_get_style_pad_radial_def = { - "lv_obj_get_style_pad_radial", - (PyCFunction)py_lv_obj_get_style_pad_radial, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_grad_dsc_params_conical_t_type_methods[] = { + {"__dir__", py_lv_grad_dsc_params_conical_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_grad_dsc_params_conical_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_conical_t *data = (lv_grad_dsc_params_conical_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_grad_dsc_params_conical_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "center") == 0) { data->center = mp_write_lv_point_t(value); result = 0; } + if (strcmp(attr, "start_angle") == 0) { data->start_angle = (int16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "end_angle") == 0) { data->end_angle = (int16_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_conical_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_grad_dsc_params_conical_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_conical_t)); +} -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_margin_top(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_margin_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_grad_dsc_params_conical_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_top)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_margin_top_def = { - "lv_obj_get_style_margin_top", - (PyCFunction)py_lv_obj_get_style_margin_top, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_grad_dsc_params_conical_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_grad_dsc_params_conical_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_grad_dsc_params_conical_t_dealloc, + .tp_getattro = (getter)py_lv_grad_dsc_params_conical_t_getattro, + .tp_setattro = (setter)py_lv_grad_dsc_params_conical_t_setattro, + .tp_new = py_lv_grad_dsc_params_conical_t_new, + .tp_methods = py_lv_grad_dsc_params_conical_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_margin_bottom(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_margin_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_grad_dsc_params_conical_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_bottom)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_conical_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_conical_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_grad_dsc_params_conical_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_margin_bottom_def = { - "lv_obj_get_style_margin_bottom", - (PyCFunction)py_lv_obj_get_style_margin_bottom, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_grad_dsc_params_conical_t mp_write_scratch_lv_grad_dsc_params_conical_t; + +static inline void* mp_write_value_ptr_lv_grad_dsc_params_conical_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_conical_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_grad_dsc_params_conical_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_conical_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_grad_dsc_params_conical_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_grad_dsc_params_conical_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_conical_t or dict, got None"); + } + memset(&mp_write_scratch_lv_grad_dsc_params_conical_t, 0, sizeof(lv_grad_dsc_params_conical_t)); + return &mp_write_scratch_lv_grad_dsc_params_conical_t; +} +#define mp_write_lv_grad_dsc_params_conical_t(struct_obj) (*((lv_grad_dsc_params_conical_t*)mp_write_value_ptr_lv_grad_dsc_params_conical_t(struct_obj))) -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_margin_left(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_margin_left(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_grad_dsc_params_conical_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_left)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_grad_dsc_params_conical_t_type, field); } -static PyMethodDef py_lv_obj_get_style_margin_left_def = { - "lv_obj_get_style_margin_left", - (PyCFunction)py_lv_obj_get_style_margin_left, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_grad_dsc_params_conical_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_conical_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_conical_t))) +#define mp_read_byref_lv_grad_dsc_params_conical_t(field) mp_read_ptr_lv_grad_dsc_params_conical_t(&field) /* - * lvgl extension definition for: - * int32_t lv_obj_get_style_margin_right(const lv_obj_t *obj, lv_part_t part) + * Struct lv_grad_dsc_params_t (CPython) */ -static PyObject *py_lv_obj_get_style_margin_right(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_grad_dsc_params_t_methods[]; + +static PyObject *py_lv_grad_dsc_params_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_margin_right)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "linear") == 0) return mp_read_byref_lv_grad_dsc_params_linear_t(data->linear); + if (strcmp(attr, "radial") == 0) return mp_read_byref_lv_grad_dsc_params_radial_t(data->radial); + if (strcmp(attr, "conical") == 0) return mp_read_byref_lv_grad_dsc_params_conical_t(data->conical); + for (PyMethodDef *m = py_lv_grad_dsc_params_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_margin_right_def = { - "lv_obj_get_style_margin_right", - (PyCFunction)py_lv_obj_get_style_margin_right, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_grad_dsc_params_t_field_names[] = {"linear", "radial", "conical", NULL}; -/* - * lvgl extension definition for: - * lv_color_t lv_obj_get_style_bg_color(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_dsc_params_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_grad_dsc_params_t_field_names, py_lv_grad_dsc_params_t_methods); } -static PyMethodDef py_lv_obj_get_style_bg_color_def = { - "lv_obj_get_style_bg_color", - (PyCFunction)py_lv_obj_get_style_bg_color, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_grad_dsc_params_t_type_methods[] = { + {"__dir__", py_lv_grad_dsc_params_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * lv_color_t lv_obj_get_style_bg_color_filtered(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_grad_dsc_params_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_color_filtered)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_params_t *data = (lv_grad_dsc_params_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_grad_dsc_params_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "linear") == 0) { data->linear = mp_write_lv_grad_dsc_params_linear_t(value); result = 0; } + if (strcmp(attr, "radial") == 0) { data->radial = mp_write_lv_grad_dsc_params_radial_t(value); result = 0; } + if (strcmp(attr, "conical") == 0) { data->conical = mp_write_lv_grad_dsc_params_conical_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_params_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_obj_get_style_bg_color_filtered_def = { - "lv_obj_get_style_bg_color_filtered", - (PyCFunction)py_lv_obj_get_style_bg_color_filtered, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_grad_dsc_params_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_params_t)); +} -/* - * lvgl extension definition for: - * lv_opa_t lv_obj_get_style_bg_opa(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_grad_dsc_params_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_opa)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_obj_get_style_bg_opa_def = { - "lv_obj_get_style_bg_opa", - (PyCFunction)py_lv_obj_get_style_bg_opa, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_grad_dsc_params_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_grad_dsc_params_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_grad_dsc_params_t_dealloc, + .tp_getattro = (getter)py_lv_grad_dsc_params_t_getattro, + .tp_setattro = (setter)py_lv_grad_dsc_params_t_setattro, + .tp_new = py_lv_grad_dsc_params_t_new, + .tp_methods = py_lv_grad_dsc_params_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * lv_color_t lv_obj_get_style_bg_grad_color(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_grad_color(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_grad_dsc_params_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_params_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_grad_dsc_params_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_bg_grad_color_def = { - "lv_obj_get_style_bg_grad_color", - (PyCFunction)py_lv_obj_get_style_bg_grad_color, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_grad_dsc_params_t mp_write_scratch_lv_grad_dsc_params_t; + +static inline void* mp_write_value_ptr_lv_grad_dsc_params_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_params_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_grad_dsc_params_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_params_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_grad_dsc_params_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_grad_dsc_params_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_params_t or dict, got None"); + } + memset(&mp_write_scratch_lv_grad_dsc_params_t, 0, sizeof(lv_grad_dsc_params_t)); + return &mp_write_scratch_lv_grad_dsc_params_t; +} +#define mp_write_lv_grad_dsc_params_t(struct_obj) (*((lv_grad_dsc_params_t*)mp_write_value_ptr_lv_grad_dsc_params_t(struct_obj))) -/* - * lvgl extension definition for: - * lv_color_t lv_obj_get_style_bg_grad_color_filtered(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_grad_color_filtered(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_grad_dsc_params_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_color_t _res; - lvpy_lock(); - _res = ((lv_color_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_color_filtered)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return lv_to_mp_struct(&py_lv_grad_dsc_params_t_type, field); } -static PyMethodDef py_lv_obj_get_style_bg_grad_color_filtered_def = { - "lv_obj_get_style_bg_grad_color_filtered", - (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_grad_dsc_params_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_params_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_params_t))) +#define mp_read_byref_lv_grad_dsc_params_t(field) mp_read_ptr_lv_grad_dsc_params_t(&field) /* - * lvgl extension definition for: - * lv_grad_dir_t lv_obj_get_style_bg_grad_dir(const lv_obj_t *obj, lv_part_t part) + * Struct lv_grad_dsc_t (CPython) */ -static PyObject *py_lv_obj_get_style_bg_grad_dir(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_grad_dsc_t_methods[]; + +static PyObject *py_lv_grad_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_grad_dir_t _res; - lvpy_lock(); - _res = ((lv_grad_dir_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_dir)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_t *data = (lv_grad_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "stops") == 0) return lvpy_struct_array_new(self, data->stops, 2, sizeof(lv_grad_stop_t), mp_read_ptr_lv_grad_stop_t, mp_write_value_ptr_lv_grad_stop_t); + if (strcmp(attr, "stops_count") == 0) return mp_obj_new_int_from_uint(data->stops_count); + if (strcmp(attr, "dir") == 0) return mp_obj_new_int(data->dir); + if (strcmp(attr, "extend") == 0) return mp_obj_new_int(data->extend); + if (strcmp(attr, "params") == 0) return mp_read_byref_lv_grad_dsc_params_t(data->params); + if (strcmp(attr, "state") == 0) return ptr_to_mp((void*)data->state); + for (PyMethodDef *m = py_lv_grad_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_obj_get_style_bg_grad_dir_def = { - "lv_obj_get_style_bg_grad_dir", - (PyCFunction)py_lv_obj_get_style_bg_grad_dir, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_grad_dsc_t_field_names[] = {"stops", "stops_count", "dir", "extend", "params", "state", NULL}; -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_bg_main_stop(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_main_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_dsc_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_stop)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_grad_dsc_t_field_names, py_lv_grad_dsc_t_methods); } -static PyMethodDef py_lv_obj_get_style_bg_main_stop_def = { - "lv_obj_get_style_bg_main_stop", - (PyCFunction)py_lv_obj_get_style_bg_main_stop, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_grad_dsc_t_type_methods[] = { + {"__dir__", py_lv_grad_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_grad_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_grad_dsc_t *data = (lv_grad_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_grad_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "stops") == 0) { lvpy_struct_array_assign(data->stops, 2, sizeof(lv_grad_stop_t), mp_write_value_ptr_lv_grad_stop_t, value); result = 0; } + if (strcmp(attr, "stops_count") == 0) { data->stops_count = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "dir") == 0) { data->dir = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "extend") == 0) { data->extend = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "params") == 0) { data->params = mp_write_lv_grad_dsc_params_t(value); result = 0; } + if (strcmp(attr, "state") == 0) { data->state = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_grad_dsc_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * int32_t lv_obj_get_style_bg_grad_stop(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_grad_stop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grad_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_stop)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return make_new_lv_struct(type, args, kwds, sizeof(lv_grad_dsc_t)); } -static PyMethodDef py_lv_obj_get_style_bg_grad_stop_def = { - "lv_obj_get_style_bg_grad_stop", - (PyCFunction)py_lv_obj_get_style_bg_grad_stop, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static void py_lv_grad_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} +PyTypeObject py_lv_grad_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_grad_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_grad_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_grad_dsc_t_getattro, + .tp_setattro = (setter)py_lv_grad_dsc_t_setattro, + .tp_new = py_lv_grad_dsc_t_new, + .tp_methods = py_lv_grad_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; -/* - * lvgl extension definition for: - * lv_opa_t lv_obj_get_style_bg_main_opa(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_main_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_grad_dsc_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_main_opa)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_grad_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_grad_dsc_t*)self->data; } -static PyMethodDef py_lv_obj_get_style_bg_main_opa_def = { - "lv_obj_get_style_bg_main_opa", - (PyCFunction)py_lv_obj_get_style_bg_main_opa, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_grad_dsc_t mp_write_scratch_lv_grad_dsc_t; +static inline void* mp_write_value_ptr_lv_grad_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_grad_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_grad_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_grad_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_grad_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_grad_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_grad_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_grad_dsc_t, 0, sizeof(lv_grad_dsc_t)); + return &mp_write_scratch_lv_grad_dsc_t; +} -/* - * lvgl extension definition for: - * lv_opa_t lv_obj_get_style_bg_grad_opa(const lv_obj_t *obj, lv_part_t part) - */ -static PyObject *py_lv_obj_get_style_bg_grad_opa(PyObject *self, PyObject *py_args, PyObject *py_kwds) +#define mp_write_lv_grad_dsc_t(struct_obj) (*((lv_grad_dsc_t*)mp_write_value_ptr_lv_grad_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_grad_dsc_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; - if (!PyArg_ParseTuple(py_args, "O", &part_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_opa_t _res; - lvpy_lock(); - _res = ((lv_opa_t (*)(const lv_obj_t *, lv_part_t))lv_obj_get_style_bg_grad_opa)(obj, part); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp_struct(&py_lv_grad_dsc_t_type, field); } -static PyMethodDef py_lv_obj_get_style_bg_grad_opa_def = { - "lv_obj_get_style_bg_grad_opa", - (PyCFunction)py_lv_obj_get_style_bg_grad_opa, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_grad_dsc_t(field) lv_to_mp_struct_own(&py_lv_grad_dsc_t_type, copy_buffer(&field, sizeof(lv_grad_dsc_t))) +#define mp_read_byref_lv_grad_dsc_t(field) mp_read_ptr_lv_grad_dsc_t(&field) /* @@ -22225,6 +17219,139 @@ static PyMethodDef py_lv_obj_get_style_image_recolor_opa_def = { }; +/* + * Struct lv_image_colorkey_t (CPython) + */ + +extern PyMethodDef py_lv_image_colorkey_t_methods[]; + +static PyObject *py_lv_image_colorkey_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_colorkey_t *data = (lv_image_colorkey_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "low") == 0) return mp_read_byref_lv_color_t(data->low); + if (strcmp(attr, "high") == 0) return mp_read_byref_lv_color_t(data->high); + for (PyMethodDef *m = py_lv_image_colorkey_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_image_colorkey_t_field_names[] = {"low", "high", NULL}; + +static PyObject *py_lv_image_colorkey_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_image_colorkey_t_field_names, py_lv_image_colorkey_t_methods); +} + +static PyMethodDef py_lv_image_colorkey_t_type_methods[] = { + {"__dir__", py_lv_image_colorkey_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_image_colorkey_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_image_colorkey_t *data = (lv_image_colorkey_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_image_colorkey_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "low") == 0) { data->low = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "high") == 0) { data->high = mp_write_lv_color_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_image_colorkey_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_image_colorkey_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_image_colorkey_t)); +} + +static void py_lv_image_colorkey_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_image_colorkey_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_image_colorkey_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_image_colorkey_t_dealloc, + .tp_getattro = (getter)py_lv_image_colorkey_t_getattro, + .tp_setattro = (setter)py_lv_image_colorkey_t_setattro, + .tp_new = py_lv_image_colorkey_t_new, + .tp_methods = py_lv_image_colorkey_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_image_colorkey_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_image_colorkey_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_image_colorkey_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_image_colorkey_t*)self->data; +} + +static lv_image_colorkey_t mp_write_scratch_lv_image_colorkey_t; + +static inline void* mp_write_value_ptr_lv_image_colorkey_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_image_colorkey_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_image_colorkey_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_image_colorkey_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_image_colorkey_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_image_colorkey_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_image_colorkey_t or dict, got None"); + } + memset(&mp_write_scratch_lv_image_colorkey_t, 0, sizeof(lv_image_colorkey_t)); + return &mp_write_scratch_lv_image_colorkey_t; +} + +#define mp_write_lv_image_colorkey_t(struct_obj) (*((lv_image_colorkey_t*)mp_write_value_ptr_lv_image_colorkey_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_image_colorkey_t(void *field) +{ + return lv_to_mp_struct(&py_lv_image_colorkey_t_type, field); +} + +#define mp_read_lv_image_colorkey_t(field) lv_to_mp_struct_own(&py_lv_image_colorkey_t_type, copy_buffer(&field, sizeof(lv_image_colorkey_t))) +#define mp_read_byref_lv_image_colorkey_t(field) mp_read_ptr_lv_image_colorkey_t(&field) + + /* * lvgl extension definition for: * const lv_image_colorkey_t *lv_obj_get_style_image_colorkey(const lv_obj_t *obj, lv_part_t part) @@ -23526,6 +18653,144 @@ static PyMethodDef py_lv_obj_get_style_opa_layered_def = { NULL }; +#define funcptr_lv_color_filter_cb_t NULL + +static inline PyObject *mp_lv_funcptr_lv_color_filter_cb_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } + +static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t); + +/* + * Struct lv_color_filter_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_color_filter_dsc_t_methods[]; + +static PyObject *py_lv_color_filter_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "filter_cb") == 0) return mp_lv_funcptr(NULL, data->filter_cb, lv_color_filter_dsc_t_filter_cb_callback, "lv_color_filter_dsc_t_filter_cb", data->user_data); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + for (PyMethodDef *m = py_lv_color_filter_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_color_filter_dsc_t_field_names[] = {"filter_cb", "user_data", NULL}; + +static PyObject *py_lv_color_filter_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_color_filter_dsc_t_field_names, py_lv_color_filter_dsc_t_methods); +} + +static PyMethodDef py_lv_color_filter_dsc_t_type_methods[] = { + {"__dir__", py_lv_color_filter_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_color_filter_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_filter_dsc_t *data = (lv_color_filter_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_color_filter_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "filter_cb") == 0) { data->filter_cb = mp_lv_callback(value, lv_color_filter_dsc_t_filter_cb_callback, "lv_color_filter_dsc_t_filter_cb", &data->user_data, data, NULL, NULL); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_color_filter_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_color_filter_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_color_filter_dsc_t)); +} + +static void py_lv_color_filter_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_color_filter_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_color_filter_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_color_filter_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_color_filter_dsc_t_getattro, + .tp_setattro = (setter)py_lv_color_filter_dsc_t_setattro, + .tp_new = py_lv_color_filter_dsc_t_new, + .tp_methods = py_lv_color_filter_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_color_filter_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_color_filter_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_filter_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_color_filter_dsc_t*)self->data; +} + +static lv_color_filter_dsc_t mp_write_scratch_lv_color_filter_dsc_t; + +static inline void* mp_write_value_ptr_lv_color_filter_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_filter_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_color_filter_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_filter_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_color_filter_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_color_filter_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_filter_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_color_filter_dsc_t, 0, sizeof(lv_color_filter_dsc_t)); + return &mp_write_scratch_lv_color_filter_dsc_t; +} + +#define mp_write_lv_color_filter_dsc_t(struct_obj) (*((lv_color_filter_dsc_t*)mp_write_value_ptr_lv_color_filter_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_color_filter_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_color_filter_dsc_t_type, field); +} + +#define mp_read_lv_color_filter_dsc_t(field) lv_to_mp_struct_own(&py_lv_color_filter_dsc_t_type, copy_buffer(&field, sizeof(lv_color_filter_dsc_t))) +#define mp_read_byref_lv_color_filter_dsc_t(field) mp_read_ptr_lv_color_filter_dsc_t(&field) + /* * lvgl extension definition for: @@ -23713,6 +18978,152 @@ static PyMethodDef py_lv_obj_get_style_anim_duration_def = { }; +/* + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_style_transition_dsc_t_path_xcb' + * lv_anim_path_cb_t path_xcb + */ + + +/* + * Struct lv_style_transition_dsc_t (CPython) + */ + +extern PyMethodDef py_lv_style_transition_dsc_t_methods[]; + +static PyObject *py_lv_style_transition_dsc_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "props") == 0) return mp_array_from_u8ptr((void*)data->props); + if (strcmp(attr, "user_data") == 0) return ptr_to_mp((void*)data->user_data); + if (strcmp(attr, "path_xcb") == 0) return mp_lv_funcptr(NULL, data->path_xcb, NULL, "lv_style_transition_dsc_t_path_xcb", NULL); + if (strcmp(attr, "time") == 0) return mp_obj_new_int_from_uint(data->time); + if (strcmp(attr, "delay") == 0) return mp_obj_new_int_from_uint(data->delay); + for (PyMethodDef *m = py_lv_style_transition_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_style_transition_dsc_t_field_names[] = {"props", "user_data", "path_xcb", "time", "delay", NULL}; + +static PyObject *py_lv_style_transition_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_style_transition_dsc_t_field_names, py_lv_style_transition_dsc_t_methods); +} + +static PyMethodDef py_lv_style_transition_dsc_t_type_methods[] = { + {"__dir__", py_lv_style_transition_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_style_transition_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_style_transition_dsc_t *data = (lv_style_transition_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_style_transition_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "props") == 0) { data->props = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "user_data") == 0) { data->user_data = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "path_xcb") == 0) { data->path_xcb = mp_lv_callback(value, NULL, "lv_style_transition_dsc_t_path_xcb", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "time") == 0) { data->time = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "delay") == 0) { data->delay = (uint32_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_style_transition_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_style_transition_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_style_transition_dsc_t)); +} + +static void py_lv_style_transition_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_style_transition_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_style_transition_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_style_transition_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_style_transition_dsc_t_getattro, + .tp_setattro = (setter)py_lv_style_transition_dsc_t_setattro, + .tp_new = py_lv_style_transition_dsc_t_new, + .tp_methods = py_lv_style_transition_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_style_transition_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_style_transition_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_style_transition_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_style_transition_dsc_t*)self->data; +} + +static lv_style_transition_dsc_t mp_write_scratch_lv_style_transition_dsc_t; + +static inline void* mp_write_value_ptr_lv_style_transition_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_style_transition_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_style_transition_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_style_transition_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_style_transition_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_style_transition_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_style_transition_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_style_transition_dsc_t, 0, sizeof(lv_style_transition_dsc_t)); + return &mp_write_scratch_lv_style_transition_dsc_t; +} + +#define mp_write_lv_style_transition_dsc_t(struct_obj) (*((lv_style_transition_dsc_t*)mp_write_value_ptr_lv_style_transition_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_style_transition_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_style_transition_dsc_t_type, field); +} + +#define mp_read_lv_style_transition_dsc_t(field) lv_to_mp_struct_own(&py_lv_style_transition_dsc_t_type, copy_buffer(&field, sizeof(lv_style_transition_dsc_t))) +#define mp_read_byref_lv_style_transition_dsc_t(field) mp_read_ptr_lv_style_transition_dsc_t(&field) + + /* * lvgl extension definition for: * const lv_style_transition_dsc_t *lv_obj_get_style_transition(const lv_obj_t *obj, lv_part_t part) @@ -37792,70 +33203,6 @@ static PyMethodDef py_lv_obj_update_layer_type_def = { }; -/* - * lvgl extension definition for: - * lv_style_value_t lv_obj_get_style_prop_internal(const lv_obj_t *obj, lv_part_t part, lv_style_prop_t prop) - */ -static PyObject *py_lv_obj_get_style_prop_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_style_value_t _res; - lvpy_lock(); - _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_prop_t))lv_obj_get_style_prop_internal)(obj, part, prop); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_style_value_t(_res); -} - -static PyMethodDef py_lv_obj_get_style_prop_internal_def = { - "lv_obj_get_style_prop_internal", - (PyCFunction)py_lv_obj_get_style_prop_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * lv_style_value_t lv_obj_style_apply_color_filter_internal(const lv_obj_t *obj, lv_part_t part, lv_style_value_t v) - */ -static PyObject *py_lv_obj_style_apply_color_filter_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *part_py; PyObject *v_py; - if (!PyArg_ParseTuple(py_args, "OO", &part_py, &v_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(self); - lv_part_t part = (int)mp_obj_get_int(part_py); - lv_style_value_t v = mp_write_lv_style_value_t(v_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_style_value_t _res; - lvpy_lock(); - _res = ((lv_style_value_t (*)(const lv_obj_t *, lv_part_t, lv_style_value_t))lv_obj_style_apply_color_filter_internal)(obj, part, v); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_read_lv_style_value_t(_res); -} - -static PyMethodDef py_lv_obj_style_apply_color_filter_internal_def = { - "lv_obj_style_apply_color_filter_internal", - (PyCFunction)py_lv_obj_style_apply_color_filter_internal, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - /* * lvgl extension definition for: * void lv_obj_update_blur_status(lv_obj_t *obj) @@ -37974,154 +33321,6 @@ static PyMethodDef py_lv_obj_methods[] = { {"style_get_selector_part", (PyCFunction)py_lv_obj_style_get_selector_part, METH_VARARGS | METH_KEYWORDS, NULL}, {"move_foreground", (PyCFunction)py_lv_obj_move_foreground, METH_VARARGS | METH_KEYWORDS, NULL}, {"move_background", (PyCFunction)py_lv_obj_move_background, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_width_internal", (PyCFunction)py_lv_obj_get_style_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_min_width_internal", (PyCFunction)py_lv_obj_get_style_min_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_max_width_internal", (PyCFunction)py_lv_obj_get_style_max_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_height_internal", (PyCFunction)py_lv_obj_get_style_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_min_height_internal", (PyCFunction)py_lv_obj_get_style_min_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_max_height_internal", (PyCFunction)py_lv_obj_get_style_max_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_length_internal", (PyCFunction)py_lv_obj_get_style_length_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_x_internal", (PyCFunction)py_lv_obj_get_style_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_y_internal", (PyCFunction)py_lv_obj_get_style_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_align_internal", (PyCFunction)py_lv_obj_get_style_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_width_internal", (PyCFunction)py_lv_obj_get_style_transform_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_height_internal", (PyCFunction)py_lv_obj_get_style_transform_height_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_translate_x_internal", (PyCFunction)py_lv_obj_get_style_translate_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_translate_y_internal", (PyCFunction)py_lv_obj_get_style_translate_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_translate_radial_internal", (PyCFunction)py_lv_obj_get_style_translate_radial_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_scale_x_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_scale_y_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_rotation_internal", (PyCFunction)py_lv_obj_get_style_transform_rotation_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_pivot_x_internal", (PyCFunction)py_lv_obj_get_style_transform_pivot_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_pivot_y_internal", (PyCFunction)py_lv_obj_get_style_transform_pivot_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_skew_x_internal", (PyCFunction)py_lv_obj_get_style_transform_skew_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_skew_y_internal", (PyCFunction)py_lv_obj_get_style_transform_skew_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_pad_top_internal", (PyCFunction)py_lv_obj_get_style_pad_top_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_pad_bottom_internal", (PyCFunction)py_lv_obj_get_style_pad_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_pad_left_internal", (PyCFunction)py_lv_obj_get_style_pad_left_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_pad_right_internal", (PyCFunction)py_lv_obj_get_style_pad_right_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_pad_row_internal", (PyCFunction)py_lv_obj_get_style_pad_row_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_pad_column_internal", (PyCFunction)py_lv_obj_get_style_pad_column_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_pad_radial_internal", (PyCFunction)py_lv_obj_get_style_pad_radial_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_margin_top_internal", (PyCFunction)py_lv_obj_get_style_margin_top_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_margin_bottom_internal", (PyCFunction)py_lv_obj_get_style_margin_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_margin_left_internal", (PyCFunction)py_lv_obj_get_style_margin_left_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_margin_right_internal", (PyCFunction)py_lv_obj_get_style_margin_right_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_color_internal", (PyCFunction)py_lv_obj_get_style_bg_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_bg_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_grad_color_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_grad_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_grad_dir_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_dir_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_main_stop_internal", (PyCFunction)py_lv_obj_get_style_bg_main_stop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_grad_stop_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_stop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_main_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_main_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_grad_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_grad_internal", (PyCFunction)py_lv_obj_get_style_bg_grad_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_image_src_internal", (PyCFunction)py_lv_obj_get_style_bg_image_src_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_image_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_image_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_image_recolor_internal", (PyCFunction)py_lv_obj_get_style_bg_image_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_image_recolor_filtered_internal", (PyCFunction)py_lv_obj_get_style_bg_image_recolor_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_image_recolor_opa_internal", (PyCFunction)py_lv_obj_get_style_bg_image_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bg_image_tiled_internal", (PyCFunction)py_lv_obj_get_style_bg_image_tiled_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_border_color_internal", (PyCFunction)py_lv_obj_get_style_border_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_border_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_border_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_border_opa_internal", (PyCFunction)py_lv_obj_get_style_border_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_border_width_internal", (PyCFunction)py_lv_obj_get_style_border_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_border_side_internal", (PyCFunction)py_lv_obj_get_style_border_side_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_border_post_internal", (PyCFunction)py_lv_obj_get_style_border_post_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_outline_width_internal", (PyCFunction)py_lv_obj_get_style_outline_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_outline_color_internal", (PyCFunction)py_lv_obj_get_style_outline_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_outline_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_outline_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_outline_opa_internal", (PyCFunction)py_lv_obj_get_style_outline_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_outline_pad_internal", (PyCFunction)py_lv_obj_get_style_outline_pad_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_shadow_width_internal", (PyCFunction)py_lv_obj_get_style_shadow_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_shadow_offset_x_internal", (PyCFunction)py_lv_obj_get_style_shadow_offset_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_shadow_offset_y_internal", (PyCFunction)py_lv_obj_get_style_shadow_offset_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_shadow_spread_internal", (PyCFunction)py_lv_obj_get_style_shadow_spread_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_shadow_color_internal", (PyCFunction)py_lv_obj_get_style_shadow_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_shadow_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_shadow_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_shadow_opa_internal", (PyCFunction)py_lv_obj_get_style_shadow_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_image_opa_internal", (PyCFunction)py_lv_obj_get_style_image_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_image_recolor_internal", (PyCFunction)py_lv_obj_get_style_image_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_image_recolor_filtered_internal", (PyCFunction)py_lv_obj_get_style_image_recolor_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_image_recolor_opa_internal", (PyCFunction)py_lv_obj_get_style_image_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_image_colorkey_internal", (PyCFunction)py_lv_obj_get_style_image_colorkey_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_line_width_internal", (PyCFunction)py_lv_obj_get_style_line_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_line_dash_width_internal", (PyCFunction)py_lv_obj_get_style_line_dash_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_line_dash_gap_internal", (PyCFunction)py_lv_obj_get_style_line_dash_gap_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_line_rounded_internal", (PyCFunction)py_lv_obj_get_style_line_rounded_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_line_color_internal", (PyCFunction)py_lv_obj_get_style_line_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_line_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_line_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_line_opa_internal", (PyCFunction)py_lv_obj_get_style_line_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_arc_width_internal", (PyCFunction)py_lv_obj_get_style_arc_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_arc_rounded_internal", (PyCFunction)py_lv_obj_get_style_arc_rounded_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_arc_color_internal", (PyCFunction)py_lv_obj_get_style_arc_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_arc_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_arc_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_arc_opa_internal", (PyCFunction)py_lv_obj_get_style_arc_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_arc_image_src_internal", (PyCFunction)py_lv_obj_get_style_arc_image_src_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_color_internal", (PyCFunction)py_lv_obj_get_style_text_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_text_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_opa_internal", (PyCFunction)py_lv_obj_get_style_text_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_font_internal", (PyCFunction)py_lv_obj_get_style_text_font_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_letter_space_internal", (PyCFunction)py_lv_obj_get_style_text_letter_space_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_line_space_internal", (PyCFunction)py_lv_obj_get_style_text_line_space_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_decor_internal", (PyCFunction)py_lv_obj_get_style_text_decor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_align_internal", (PyCFunction)py_lv_obj_get_style_text_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_outline_stroke_color_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_outline_stroke_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_outline_stroke_width_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_width_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_outline_stroke_opa_internal", (PyCFunction)py_lv_obj_get_style_text_outline_stroke_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_text_leading_trim_internal", (PyCFunction)py_lv_obj_get_style_text_leading_trim_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_blur_radius_internal", (PyCFunction)py_lv_obj_get_style_blur_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_blur_backdrop_internal", (PyCFunction)py_lv_obj_get_style_blur_backdrop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_blur_quality_internal", (PyCFunction)py_lv_obj_get_style_blur_quality_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_drop_shadow_radius_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_drop_shadow_offset_x_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_x_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_drop_shadow_offset_y_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_offset_y_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_drop_shadow_color_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_color_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_drop_shadow_color_filtered_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_color_filtered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_drop_shadow_opa_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_drop_shadow_quality_internal", (PyCFunction)py_lv_obj_get_style_drop_shadow_quality_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_radius_internal", (PyCFunction)py_lv_obj_get_style_radius_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_radial_offset_internal", (PyCFunction)py_lv_obj_get_style_radial_offset_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_clip_corner_internal", (PyCFunction)py_lv_obj_get_style_clip_corner_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_opa_internal", (PyCFunction)py_lv_obj_get_style_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_opa_layered_internal", (PyCFunction)py_lv_obj_get_style_opa_layered_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_color_filter_dsc_internal", (PyCFunction)py_lv_obj_get_style_color_filter_dsc_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_color_filter_opa_internal", (PyCFunction)py_lv_obj_get_style_color_filter_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_recolor_internal", (PyCFunction)py_lv_obj_get_style_recolor_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_recolor_opa_internal", (PyCFunction)py_lv_obj_get_style_recolor_opa_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_anim_internal", (PyCFunction)py_lv_obj_get_style_anim_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_anim_duration_internal", (PyCFunction)py_lv_obj_get_style_anim_duration_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transition_internal", (PyCFunction)py_lv_obj_get_style_transition_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_blend_mode_internal", (PyCFunction)py_lv_obj_get_style_blend_mode_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_layout_internal", (PyCFunction)py_lv_obj_get_style_layout_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_base_dir_internal", (PyCFunction)py_lv_obj_get_style_base_dir_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_bitmap_mask_src_internal", (PyCFunction)py_lv_obj_get_style_bitmap_mask_src_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_rotary_sensitivity_internal", (PyCFunction)py_lv_obj_get_style_rotary_sensitivity_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_flex_flow_internal", (PyCFunction)py_lv_obj_get_style_flex_flow_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_flex_main_place_internal", (PyCFunction)py_lv_obj_get_style_flex_main_place_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_flex_cross_place_internal", (PyCFunction)py_lv_obj_get_style_flex_cross_place_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_flex_track_place_internal", (PyCFunction)py_lv_obj_get_style_flex_track_place_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_flex_grow_internal", (PyCFunction)py_lv_obj_get_style_flex_grow_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_column_dsc_array_internal", (PyCFunction)py_lv_obj_get_style_grid_column_dsc_array_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_column_align_internal", (PyCFunction)py_lv_obj_get_style_grid_column_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_row_dsc_array_internal", (PyCFunction)py_lv_obj_get_style_grid_row_dsc_array_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_row_align_internal", (PyCFunction)py_lv_obj_get_style_grid_row_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_cell_column_pos_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_column_pos_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_cell_x_align_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_x_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_cell_column_span_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_column_span_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_cell_row_pos_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_row_pos_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_cell_y_align_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_y_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_grid_cell_row_span_internal", (PyCFunction)py_lv_obj_get_style_grid_cell_row_span_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"calculate_style_text_align_internal", (PyCFunction)py_lv_obj_calculate_style_text_align_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_left_internal", (PyCFunction)py_lv_obj_get_style_space_left_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_right_internal", (PyCFunction)py_lv_obj_get_style_space_right_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_top_internal", (PyCFunction)py_lv_obj_get_style_space_top_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_space_bottom_internal", (PyCFunction)py_lv_obj_get_style_space_bottom_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_scale_x_safe_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_x_safe_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_transform_scale_y_safe_internal", (PyCFunction)py_lv_obj_get_style_transform_scale_y_safe_internal, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_flex_flow", (PyCFunction)py_lv_obj_set_flex_flow, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_flex_align", (PyCFunction)py_lv_obj_set_flex_align, METH_VARARGS | METH_KEYWORDS, NULL}, {"set_flex_grow", (PyCFunction)py_lv_obj_set_flex_grow, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -38712,8 +33911,6 @@ static PyMethodDef py_lv_obj_methods[] = { {"style_create_transition", (PyCFunction)py_lv_obj_style_create_transition, METH_VARARGS | METH_KEYWORDS, NULL}, {"style_state_compare", (PyCFunction)py_lv_obj_style_state_compare, METH_VARARGS | METH_KEYWORDS, NULL}, {"update_layer_type", (PyCFunction)py_lv_obj_update_layer_type, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_style_prop_internal", (PyCFunction)py_lv_obj_get_style_prop_internal, METH_VARARGS | METH_KEYWORDS, NULL}, - {"style_apply_color_filter_internal", (PyCFunction)py_lv_obj_style_apply_color_filter_internal, METH_VARARGS | METH_KEYWORDS, NULL}, {"update_blur_status", (PyCFunction)py_lv_obj_update_blur_status, METH_VARARGS | METH_KEYWORDS, NULL}, {"refr", (PyCFunction)py_lv_obj_refr, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL, NULL, 0, NULL} @@ -69083,429 +64280,7 @@ static int py_lv_rb_node_t_setattro(PyObject *self, PyObject *name, PyObject *va return -1; } py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_rb_node_t *data = (lv_rb_node_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_rb_node_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "left") == 0) { data->left = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "right") == 0) { data->right = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "data") == 0) { data->data = (void*)mp_to_ptr(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_rb_node_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_rb_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_node_t)); -} - -static void py_lv_rb_node_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_rb_node_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_rb_node_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_rb_node_t_dealloc, - .tp_getattro = (getter)py_lv_rb_node_t_getattro, - .tp_setattro = (setter)py_lv_rb_node_t_setattro, - .tp_new = py_lv_rb_node_t_new, - .tp_methods = py_lv_rb_node_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_rb_node_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_rb_node_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_node_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_rb_node_t*)self->data; -} - -static lv_rb_node_t mp_write_scratch_lv_rb_node_t; - -static inline void* mp_write_value_ptr_lv_rb_node_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_node_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_rb_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_node_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_rb_node_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_rb_node_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_node_t or dict, got None"); - } - memset(&mp_write_scratch_lv_rb_node_t, 0, sizeof(lv_rb_node_t)); - return &mp_write_scratch_lv_rb_node_t; -} - -#define mp_write_lv_rb_node_t(struct_obj) (*((lv_rb_node_t*)mp_write_value_ptr_lv_rb_node_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_rb_node_t(void *field) -{ - return lv_to_mp_struct(&py_lv_rb_node_t_type, field); -} - -#define mp_read_lv_rb_node_t(field) lv_to_mp_struct_own(&py_lv_rb_node_t_type, copy_buffer(&field, sizeof(lv_rb_node_t))) -#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) - -#define funcptr_lv_rb_compare_t NULL - -static inline PyObject *mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } - - -/* - * Function NOT generated: - * Missing 'user_data' field for callback 'lv_rb_t_compare' - * lv_rb_compare_t compare - */ - - -/* - * Struct lv_rb_t (CPython) - */ - -extern PyMethodDef py_lv_rb_t_methods[]; - -static PyObject *py_lv_rb_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_rb_t *data = (lv_rb_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "root") == 0) return mp_read_ptr_lv_rb_node_t((void*)data->root); - if (strcmp(attr, "compare") == 0) return mp_lv_funcptr(NULL, data->compare, NULL, "lv_rb_t_compare", NULL); - if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); - for (PyMethodDef *m = py_lv_rb_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_rb_t_field_names[] = {"root", "compare", "size", NULL}; - -static PyObject *py_lv_rb_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_rb_t_field_names, py_lv_rb_t_methods); -} - -static PyMethodDef py_lv_rb_t_type_methods[] = { - {"__dir__", py_lv_rb_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_rb_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_rb_t *data = (lv_rb_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_rb_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "root") == 0) { data->root = (void*)mp_write_ptr_lv_rb_node_t(value); result = 0; } - if (strcmp(attr, "compare") == 0) { data->compare = mp_lv_callback(value, NULL, "lv_rb_t_compare", NULL, NULL, NULL, NULL); result = 0; } - if (strcmp(attr, "size") == 0) { data->size = (size_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_rb_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_rb_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_t)); -} - -static void py_lv_rb_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_rb_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_rb_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_rb_t_dealloc, - .tp_getattro = (getter)py_lv_rb_t_getattro, - .tp_setattro = (setter)py_lv_rb_t_setattro, - .tp_new = py_lv_rb_t_new, - .tp_methods = py_lv_rb_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_rb_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_rb_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_rb_t*)self->data; -} - -static lv_rb_t mp_write_scratch_lv_rb_t; - -static inline void* mp_write_value_ptr_lv_rb_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_rb_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_rb_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_rb_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_t or dict, got None"); - } - memset(&mp_write_scratch_lv_rb_t, 0, sizeof(lv_rb_t)); - return &mp_write_scratch_lv_rb_t; -} - -#define mp_write_lv_rb_t(struct_obj) (*((lv_rb_t*)mp_write_value_ptr_lv_rb_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_rb_t(void *field) -{ - return lv_to_mp_struct(&py_lv_rb_t_type, field); -} - -#define mp_read_lv_rb_t(field) lv_to_mp_struct_own(&py_lv_rb_t_type, copy_buffer(&field, sizeof(lv_rb_t))) -#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) - - -/* - * Struct lv_text_attributes_t (CPython) - */ - -extern PyMethodDef py_lv_text_attributes_t_methods[]; - -static PyObject *py_lv_text_attributes_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "letter_space") == 0) return mp_obj_new_int(data->letter_space); - if (strcmp(attr, "line_space") == 0) return mp_obj_new_int(data->line_space); - if (strcmp(attr, "max_width") == 0) return mp_obj_new_int(data->max_width); - if (strcmp(attr, "text_flags") == 0) return mp_obj_new_int(data->text_flags); - for (PyMethodDef *m = py_lv_text_attributes_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_text_attributes_t_field_names[] = {"letter_space", "line_space", "max_width", "text_flags", NULL}; - -static PyObject *py_lv_text_attributes_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_text_attributes_t_field_names, py_lv_text_attributes_t_methods); -} - -static PyMethodDef py_lv_text_attributes_t_type_methods[] = { - {"__dir__", py_lv_text_attributes_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_text_attributes_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_text_attributes_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "letter_space") == 0) { data->letter_space = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "line_space") == 0) { data->line_space = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "max_width") == 0) { data->max_width = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "text_flags") == 0) { data->text_flags = (int)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_text_attributes_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_text_attributes_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_text_attributes_t)); -} - -static void py_lv_text_attributes_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_text_attributes_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_text_attributes_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_text_attributes_t_dealloc, - .tp_getattro = (getter)py_lv_text_attributes_t_getattro, - .tp_setattro = (setter)py_lv_text_attributes_t_setattro, - .tp_new = py_lv_text_attributes_t_new, - .tp_methods = py_lv_text_attributes_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_text_attributes_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_text_attributes_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_text_attributes_t*)self->data; -} - -static lv_text_attributes_t mp_write_scratch_lv_text_attributes_t; - -static inline void* mp_write_value_ptr_lv_text_attributes_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_text_attributes_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_text_attributes_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_text_attributes_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_text_attributes_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_text_attributes_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t or dict, got None"); - } - memset(&mp_write_scratch_lv_text_attributes_t, 0, sizeof(lv_text_attributes_t)); - return &mp_write_scratch_lv_text_attributes_t; -} - -#define mp_write_lv_text_attributes_t(struct_obj) (*((lv_text_attributes_t*)mp_write_value_ptr_lv_text_attributes_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_text_attributes_t(void *field) -{ - return lv_to_mp_struct(&py_lv_text_attributes_t_type, field); -} - -#define mp_read_lv_text_attributes_t(field) lv_to_mp_struct_own(&py_lv_text_attributes_t_type, copy_buffer(&field, sizeof(lv_text_attributes_t))) -#define mp_read_byref_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(&field) - - -/* - * Struct lv_tree_node_t (CPython) - */ - -extern PyMethodDef py_lv_tree_node_t_methods[]; - -static PyObject *py_lv_tree_node_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_tree_node_t *data = (lv_tree_node_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); - if (strcmp(attr, "children") == 0) return ptr_to_mp((void*)data->children); - if (strcmp(attr, "child_cnt") == 0) return mp_obj_new_int_from_uint(data->child_cnt); - if (strcmp(attr, "child_cap") == 0) return mp_obj_new_int_from_uint(data->child_cap); - if (strcmp(attr, "class_p") == 0) return mp_read_ptr_lv_tree_class_t((void*)data->class_p); - for (PyMethodDef *m = py_lv_tree_node_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_tree_node_t_field_names[] = {"parent", "children", "child_cnt", "child_cap", "class_p", NULL}; - -static PyObject *py_lv_tree_node_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_tree_node_t_field_names, py_lv_tree_node_t_methods); -} - -static PyMethodDef py_lv_tree_node_t_type_methods[] = { - {"__dir__", py_lv_tree_node_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_tree_node_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_tree_node_t *data = (lv_tree_node_t*)inst->data; + lv_rb_node_t *data = (lv_rb_node_t*)inst->data; if (data == NULL) { PyErr_SetString(PyLvReferenceError, "struct data is NULL"); return -1; @@ -69513,1059 +64288,544 @@ static int py_lv_tree_node_t_setattro(PyObject *self, PyObject *name, PyObject * const char *attr = PyUnicode_AsUTF8(name); if (attr == NULL) return -1; int result = -1; - lv_tree_node_t saved; + lv_rb_node_t saved; memcpy(&saved, data, sizeof(saved)); if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "children") == 0) { data->children = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "child_cnt") == 0) { data->child_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "child_cap") == 0) { data->child_cap = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "class_p") == 0) { data->class_p = (void*)mp_write_ptr_lv_tree_class_t(value); result = 0; } + if (strcmp(attr, "left") == 0) { data->left = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "right") == 0) { data->right = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "data") == 0) { data->data = (void*)mp_to_ptr(value); result = 0; } if (PyErr_Occurred()) { memcpy(data, &saved, sizeof(saved)); return -1; } if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_tree_node_t' object has no attribute '%s'", attr); + PyErr_Format(PyExc_AttributeError, "'lv_rb_node_t' object has no attribute '%s'", attr); } return result; } -static PyObject *py_lv_tree_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_rb_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_tree_node_t)); + return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_node_t)); } -static void py_lv_tree_node_t_dealloc(py_lv_struct_t *self) +static void py_lv_rb_node_t_dealloc(py_lv_struct_t *self) { py_lv_struct_dealloc(self); } -PyTypeObject py_lv_tree_node_t_type = { +PyTypeObject py_lv_rb_node_t_type = { PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_tree_node_t", + .tp_name = "lvgl.lv_rb_node_t", .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_tree_node_t_dealloc, - .tp_getattro = (getter)py_lv_tree_node_t_getattro, - .tp_setattro = (setter)py_lv_tree_node_t_setattro, - .tp_new = py_lv_tree_node_t_new, - .tp_methods = py_lv_tree_node_t_type_methods, + .tp_dealloc = (destructor)py_lv_rb_node_t_dealloc, + .tp_getattro = (getter)py_lv_rb_node_t_getattro, + .tp_setattro = (setter)py_lv_rb_node_t_setattro, + .tp_new = py_lv_rb_node_t_new, + .tp_methods = py_lv_rb_node_t_type_methods, .tp_base = &py_lv_base_struct_type, .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; -static inline void* mp_write_ptr_lv_tree_node_t(PyObject *self_in) +static inline void* mp_write_ptr_lv_rb_node_t(PyObject *self_in) { if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_tree_node_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_tree_node_t, got '%s'", Py_TYPE(self_in)->tp_name); + if (!PyObject_TypeCheck(self_in, &py_lv_rb_node_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_node_t, got '%s'", Py_TYPE(self_in)->tp_name); return NULL; } py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_tree_node_t*)self->data; + return (lv_rb_node_t*)self->data; } -static lv_tree_node_t mp_write_scratch_lv_tree_node_t; +static lv_rb_node_t mp_write_scratch_lv_rb_node_t; -static inline void* mp_write_value_ptr_lv_tree_node_t(PyObject *value) +static inline void* mp_write_value_ptr_lv_rb_node_t(PyObject *value) { if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_tree_node_t_type, value); + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_node_t_type, value); if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_tree_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_tree_node_t)); + memcpy(&mp_write_scratch_lv_rb_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_node_t)); Py_DECREF(tmp); - return &mp_write_scratch_lv_tree_node_t; + return &mp_write_scratch_lv_rb_node_t; } } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_tree_node_t(value); + void *p = mp_write_ptr_lv_rb_node_t(value); if (p != NULL) return p; } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_tree_node_t or dict, got None"); + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_node_t or dict, got None"); } - memset(&mp_write_scratch_lv_tree_node_t, 0, sizeof(lv_tree_node_t)); - return &mp_write_scratch_lv_tree_node_t; -} - -#define mp_write_lv_tree_node_t(struct_obj) (*((lv_tree_node_t*)mp_write_value_ptr_lv_tree_node_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_tree_node_t(void *field) -{ - return lv_to_mp_struct(&py_lv_tree_node_t_type, field); -} - -#define mp_read_lv_tree_node_t(field) lv_to_mp_struct_own(&py_lv_tree_node_t_type, copy_buffer(&field, sizeof(lv_tree_node_t))) -#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) - - -/* - * - * Global Module Functions - * - */ - - -/* - * lvgl extension definition for: - * inline static int32_t lv_sqr(int32_t x) - */ -static PyObject *py_lv_sqr(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int32_t _res; - lvpy_lock(); - _res = ((int32_t (*)(int32_t))lv_sqr)(x); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_sqr_def = { - "lv_sqr", - (PyCFunction)py_lv_sqr, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static uint16_t lv_color_swap_16(uint16_t c) - */ -static PyObject *py_lv_color_swap_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t c = (uint16_t)c_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint16_t _res; - lvpy_lock(); - _res = ((uint16_t (*)(uint16_t))lv_color_swap_16)(c); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} - -static PyMethodDef py_lv_color_swap_16_def = { - "lv_color_swap_16", - (PyCFunction)py_lv_color_swap_16, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static void lv_memzero(void *dst, size_t len) - */ -static PyObject *py_lv_memzero(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *dst_py; long len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &dst_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - size_t len = (size_t)len_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(void *, size_t))lv_memzero)(dst, len); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; -} - -static PyMethodDef py_lv_memzero_def = { - "lv_memzero", - (PyCFunction)py_lv_memzero, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static bool lv_streq(const char *s1, const char *s2) - */ -static PyObject *py_lv_streq(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *s1_py; PyObject *s2_py; - if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } - const char *s1 = (const char *)(char*)convert_from_str(s1_py); - const char *s2 = (const char *)(char*)convert_from_str(s2_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const char *, const char *))lv_streq)(s1, s2); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_streq_def = { - "lv_streq", - (PyCFunction)py_lv_streq, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) - */ -static PyObject *py_lv_style_get_prop_group(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - _res = ((uint32_t (*)(lv_style_prop_t))lv_style_get_prop_group)(prop); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} - -static PyMethodDef py_lv_style_get_prop_group_def = { - "lv_style_get_prop_group", - (PyCFunction)py_lv_style_get_prop_group, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) - */ -static PyObject *py_lv_style_prop_has_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *prop_py; long flag_val; - if (!PyArg_ParseTuple(py_args, "Ol", &prop_py, &flag_val)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); - uint8_t flag = (uint8_t)flag_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_style_prop_has_flag)(prop, flag); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_style_prop_has_flag_def = { - "lv_style_prop_has_flag", - (PyCFunction)py_lv_style_prop_has_flag, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static uint32_t lv_task_handler(void) - */ -static PyObject *py_lv_task_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - - - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint32_t _res; - lvpy_lock(); - Py_BEGIN_ALLOW_THREADS - _res = ((uint32_t (*)(void))lv_task_handler)(); - Py_END_ALLOW_THREADS - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} - -static PyMethodDef py_lv_task_handler_def = { - "lv_task_handler", - (PyCFunction)py_lv_task_handler, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static int lv_version_major(void) - */ -static PyObject *py_lv_version_major(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - - - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int _res; - lvpy_lock(); - _res = ((int (*)(void))lv_version_major)(); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + memset(&mp_write_scratch_lv_rb_node_t, 0, sizeof(lv_rb_node_t)); + return &mp_write_scratch_lv_rb_node_t; } -static PyMethodDef py_lv_version_major_def = { - "lv_version_major", - (PyCFunction)py_lv_version_major, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +#define mp_write_lv_rb_node_t(struct_obj) (*((lv_rb_node_t*)mp_write_value_ptr_lv_rb_node_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static int lv_version_minor(void) - */ -static PyObject *py_lv_version_minor(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_rb_node_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - - - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int _res; - lvpy_lock(); - _res = ((int (*)(void))lv_version_minor)(); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_rb_node_t_type, field); } -static PyMethodDef py_lv_version_minor_def = { - "lv_version_minor", - (PyCFunction)py_lv_version_minor, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * lvgl extension definition for: - * inline static int lv_version_patch(void) - */ -static PyObject *py_lv_version_patch(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; +#define mp_read_lv_rb_node_t(field) lv_to_mp_struct_own(&py_lv_rb_node_t_type, copy_buffer(&field, sizeof(lv_rb_node_t))) +#define mp_read_byref_lv_rb_node_t(field) mp_read_ptr_lv_rb_node_t(&field) - - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - int _res; - lvpy_lock(); - _res = ((int (*)(void))lv_version_patch)(); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} +#define funcptr_lv_rb_compare_t NULL -static PyMethodDef py_lv_version_patch_def = { - "lv_version_patch", - (PyCFunction)py_lv_version_patch, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static inline PyObject *mp_lv_funcptr_lv_rb_compare_t(void *func){ return mp_lv_funcptr(NULL, func, NULL, "", NULL); } /* - * lvgl extension definition for: - * inline static const char *lv_version_info(void) + * Function NOT generated: + * Missing 'user_data' field for callback 'lv_rb_t_compare' + * lv_rb_compare_t compare */ -static PyObject *py_lv_version_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - - - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - const char * _res; - lvpy_lock(); - _res = ((const char *(*)(void))lv_version_info)(); - lvpy_unlock(); - PyGILState_Release(gstate); - return convert_to_str((void*)_res); -} - -static PyMethodDef py_lv_version_info_def = { - "lv_version_info", - (PyCFunction)py_lv_version_info, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - - -/* - * Callback function lv_thread_init_callback (CPython) - * void callback(void *) - */ -static void lv_thread_init_callback_callback(void *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_thread_init_callback"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - /* - * lvgl extension definition for: - * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) + * Struct lv_rb_t (CPython) */ -static PyObject *py_lv_thread_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *thread_py; PyObject *name_py; PyObject *prio_py; PyObject *callback_py; long stack_size_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOOOlO", &thread_py, &name_py, &prio_py, &callback_py, &stack_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - lv_thread_t *thread = mp_to_ptr(thread_py); - const char * const name = (const char * const)(char*)convert_from_str(name_py); - lv_thread_prio_t prio = (int)mp_obj_get_int(prio_py); - size_t stack_size = (size_t)stack_size_val; - void *callback = mp_lv_callback(callback_py, &lv_thread_init_callback_callback, "lv_thread_init_callback", &user_data, NULL, (NULL), (NULL)); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_thread_init)(thread, name, prio, callback, stack_size, user_data); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); -} - -static PyMethodDef py_lv_thread_init_def = { - "lv_thread_init", - (PyCFunction)py_lv_thread_init, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +extern PyMethodDef py_lv_rb_t_methods[]; -/* - * lvgl extension definition for: - * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) - */ -static PyObject *py_lv_thread_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *thread_py; - if (!PyArg_ParseTuple(py_args, "O", &thread_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_t *thread = mp_to_ptr(thread_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_t *))lv_thread_delete)(thread); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_rb_t *data = (lv_rb_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "root") == 0) return mp_read_ptr_lv_rb_node_t((void*)data->root); + if (strcmp(attr, "compare") == 0) return mp_lv_funcptr(NULL, data->compare, NULL, "lv_rb_t_compare", NULL); + if (strcmp(attr, "size") == 0) return mp_obj_new_int_from_uint(data->size); + for (PyMethodDef *m = py_lv_rb_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_thread_delete_def = { - "lv_thread_delete", - (PyCFunction)py_lv_thread_delete, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_rb_t_field_names[] = {"root", "compare", "size", NULL}; -/* - * lvgl extension definition for: - * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) - */ -static PyObject *py_lv_mutex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rb_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_init)(mutex); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_rb_t_field_names, py_lv_rb_t_methods); } -static PyMethodDef py_lv_mutex_init_def = { - "lv_mutex_init", - (PyCFunction)py_lv_mutex_init, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_rb_t_type_methods[] = { + {"__dir__", py_lv_rb_t_dir, METH_NOARGS, NULL}, + {NULL} }; - -/* - * lvgl extension definition for: - * inline static lv_result_t lv_mutex_lock(lv_mutex_t *mutex) - */ -static PyObject *py_lv_mutex_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static int py_lv_rb_t_setattro(PyObject *self, PyObject *name, PyObject *value) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock)(mutex); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_rb_t *data = (lv_rb_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_rb_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "root") == 0) { data->root = (void*)mp_write_ptr_lv_rb_node_t(value); result = 0; } + if (strcmp(attr, "compare") == 0) { data->compare = mp_lv_callback(value, NULL, "lv_rb_t_compare", NULL, NULL, NULL, NULL); result = 0; } + if (strcmp(attr, "size") == 0) { data->size = (size_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_rb_t' object has no attribute '%s'", attr); + } + return result; } -static PyMethodDef py_lv_mutex_lock_def = { - "lv_mutex_lock", - (PyCFunction)py_lv_mutex_lock, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static PyObject *py_lv_rb_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_rb_t)); +} -/* - * lvgl extension definition for: - * inline static lv_result_t lv_mutex_lock_isr(lv_mutex_t *mutex) - */ -static PyObject *py_lv_mutex_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_rb_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock_isr)(mutex); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_mutex_lock_isr_def = { - "lv_mutex_lock_isr", - (PyCFunction)py_lv_mutex_lock_isr, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_rb_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_rb_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_rb_t_dealloc, + .tp_getattro = (getter)py_lv_rb_t_getattro, + .tp_setattro = (setter)py_lv_rb_t_setattro, + .tp_new = py_lv_rb_t_new, + .tp_methods = py_lv_rb_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * inline static lv_result_t lv_mutex_unlock(lv_mutex_t *mutex) - */ -static PyObject *py_lv_mutex_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_rb_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_unlock)(mutex); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_rb_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_rb_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_rb_t*)self->data; } -static PyMethodDef py_lv_mutex_unlock_def = { - "lv_mutex_unlock", - (PyCFunction)py_lv_mutex_unlock, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_rb_t mp_write_scratch_lv_rb_t; + +static inline void* mp_write_value_ptr_lv_rb_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_rb_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_rb_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_rb_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_rb_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_rb_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_rb_t or dict, got None"); + } + memset(&mp_write_scratch_lv_rb_t, 0, sizeof(lv_rb_t)); + return &mp_write_scratch_lv_rb_t; +} +#define mp_write_lv_rb_t(struct_obj) (*((lv_rb_t*)mp_write_value_ptr_lv_rb_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static lv_result_t lv_mutex_delete(lv_mutex_t *mutex) - */ -static PyObject *py_lv_mutex_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_rb_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *mutex_py; - if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } - lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_delete)(mutex); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_rb_t_type, field); } -static PyMethodDef py_lv_mutex_delete_def = { - "lv_mutex_delete", - (PyCFunction)py_lv_mutex_delete, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_rb_t(field) lv_to_mp_struct_own(&py_lv_rb_t_type, copy_buffer(&field, sizeof(lv_rb_t))) +#define mp_read_byref_lv_rb_t(field) mp_read_ptr_lv_rb_t(&field) /* - * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) + * Struct lv_text_attributes_t (CPython) */ -static PyObject *py_lv_thread_sync_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_text_attributes_t_methods[]; + +static PyObject *py_lv_text_attributes_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_init)(sync); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "letter_space") == 0) return mp_obj_new_int(data->letter_space); + if (strcmp(attr, "line_space") == 0) return mp_obj_new_int(data->line_space); + if (strcmp(attr, "max_width") == 0) return mp_obj_new_int(data->max_width); + if (strcmp(attr, "text_flags") == 0) return mp_obj_new_int(data->text_flags); + for (PyMethodDef *m = py_lv_text_attributes_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_thread_sync_init_def = { - "lv_thread_sync_init", - (PyCFunction)py_lv_thread_sync_init, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - +static const char *const py_lv_text_attributes_t_field_names[] = {"letter_space", "line_space", "max_width", "text_flags", NULL}; -/* - * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_wait(lv_thread_sync_t *sync) - */ -static PyObject *py_lv_thread_sync_wait(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_attributes_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_wait)(sync); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + (void)unused; + return lvpy_struct_dir(self, py_lv_text_attributes_t_field_names, py_lv_text_attributes_t_methods); } -static PyMethodDef py_lv_thread_sync_wait_def = { - "lv_thread_sync_wait", - (PyCFunction)py_lv_thread_sync_wait, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_text_attributes_t_type_methods[] = { + {"__dir__", py_lv_text_attributes_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_text_attributes_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_text_attributes_t *data = (lv_text_attributes_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_text_attributes_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "letter_space") == 0) { data->letter_space = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "line_space") == 0) { data->line_space = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "max_width") == 0) { data->max_width = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "text_flags") == 0) { data->text_flags = (int)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_text_attributes_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_text_attributes_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_text_attributes_t)); +} -/* - * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_signal(lv_thread_sync_t *sync) - */ -static PyObject *py_lv_thread_sync_signal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void py_lv_text_attributes_t_dealloc(py_lv_struct_t *self) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal)(sync); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + py_lv_struct_dealloc(self); } -static PyMethodDef py_lv_thread_sync_signal_def = { - "lv_thread_sync_signal", - (PyCFunction)py_lv_thread_sync_signal, - METH_VARARGS | METH_KEYWORDS, - NULL +PyTypeObject py_lv_text_attributes_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_text_attributes_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_text_attributes_t_dealloc, + .tp_getattro = (getter)py_lv_text_attributes_t_getattro, + .tp_setattro = (setter)py_lv_text_attributes_t_setattro, + .tp_new = py_lv_text_attributes_t_new, + .tp_methods = py_lv_text_attributes_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; - -/* - * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_signal_isr(lv_thread_sync_t *sync) - */ -static PyObject *py_lv_thread_sync_signal_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_text_attributes_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal_isr)(sync); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_text_attributes_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_text_attributes_t*)self->data; } -static PyMethodDef py_lv_thread_sync_signal_isr_def = { - "lv_thread_sync_signal_isr", - (PyCFunction)py_lv_thread_sync_signal_isr, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_text_attributes_t mp_write_scratch_lv_text_attributes_t; + +static inline void* mp_write_value_ptr_lv_text_attributes_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_text_attributes_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_text_attributes_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_text_attributes_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_text_attributes_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_text_attributes_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_text_attributes_t or dict, got None"); + } + memset(&mp_write_scratch_lv_text_attributes_t, 0, sizeof(lv_text_attributes_t)); + return &mp_write_scratch_lv_text_attributes_t; +} +#define mp_write_lv_text_attributes_t(struct_obj) (*((lv_text_attributes_t*)mp_write_value_ptr_lv_text_attributes_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static lv_result_t lv_thread_sync_delete(lv_thread_sync_t *sync) - */ -static PyObject *py_lv_thread_sync_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_text_attributes_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *sync_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } - lv_thread_sync_t *sync = mp_to_ptr(sync_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_result_t _res; - lvpy_lock(); - _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_delete)(sync); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp_struct(&py_lv_text_attributes_t_type, field); } -static PyMethodDef py_lv_thread_sync_delete_def = { - "lv_thread_sync_delete", - (PyCFunction)py_lv_thread_sync_delete, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_text_attributes_t(field) lv_to_mp_struct_own(&py_lv_text_attributes_t_type, copy_buffer(&field, sizeof(lv_text_attributes_t))) +#define mp_read_byref_lv_text_attributes_t(field) mp_read_ptr_lv_text_attributes_t(&field) /* - * lvgl extension definition for: - * inline static uint16_t lv_color_16_16_mix_inlined(uint16_t c1, uint16_t c2, uint8_t mix) + * Struct lv_tree_node_t (CPython) */ -static PyObject *py_lv_color_16_16_mix_inlined(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long c1_val; long c2_val; long mix_val; - if (!PyArg_ParseTuple(py_args, "lll", &c1_val, &c2_val, &mix_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t c1 = (uint16_t)c1_val; - uint16_t c2 = (uint16_t)c2_val; - uint8_t mix = (uint8_t)mix_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - uint16_t _res; - lvpy_lock(); - _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_color_16_16_mix_inlined)(c1, c2, mix); - lvpy_unlock(); - - PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); -} -static PyMethodDef py_lv_color_16_16_mix_inlined_def = { - "lv_color_16_16_mix_inlined", - (PyCFunction)py_lv_color_16_16_mix_inlined, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +extern PyMethodDef py_lv_tree_node_t_methods[]; + +static PyObject *py_lv_tree_node_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_tree_node_t *data = (lv_tree_node_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "parent") == 0) return ptr_to_mp((void*)data->parent); + if (strcmp(attr, "children") == 0) return ptr_to_mp((void*)data->children); + if (strcmp(attr, "child_cnt") == 0) return mp_obj_new_int_from_uint(data->child_cnt); + if (strcmp(attr, "child_cap") == 0) return mp_obj_new_int_from_uint(data->child_cap); + if (strcmp(attr, "class_p") == 0) return mp_read_ptr_lv_tree_class_t((void*)data->class_p); + for (PyMethodDef *m = py_lv_tree_node_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} +static const char *const py_lv_tree_node_t_field_names[] = {"parent", "children", "child_cnt", "child_cap", "class_p", NULL}; -/* - * lvgl extension definition for: - * inline static void lv_bidi_calculate_align_internal(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) - */ -static PyObject *py_lv_bidi_calculate_align_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tree_node_t_dir(PyObject *self, PyObject *unused) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *align_py; PyObject *base_dir_py; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "OOO", &align_py, &base_dir_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_text_align_t *align = mp_array_to_i32ptr(align_py); - lv_base_dir_t *base_dir = mp_array_to_i32ptr(base_dir_py); - const char *txt = (const char *)(char*)convert_from_str(txt_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_bidi_calculate_align_internal)(align, base_dir, txt); - lvpy_unlock(); - - PyGILState_Release(gstate); - Py_RETURN_NONE; + (void)unused; + return lvpy_struct_dir(self, py_lv_tree_node_t_field_names, py_lv_tree_node_t_methods); } -static PyMethodDef py_lv_bidi_calculate_align_internal_def = { - "lv_bidi_calculate_align_internal", - (PyCFunction)py_lv_bidi_calculate_align_internal, - METH_VARARGS | METH_KEYWORDS, - NULL +static PyMethodDef py_lv_tree_node_t_type_methods[] = { + {"__dir__", py_lv_tree_node_t_dir, METH_NOARGS, NULL}, + {NULL} }; +static int py_lv_tree_node_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_tree_node_t *data = (lv_tree_node_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_tree_node_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "parent") == 0) { data->parent = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "children") == 0) { data->children = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "child_cnt") == 0) { data->child_cnt = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "child_cap") == 0) { data->child_cap = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "class_p") == 0) { data->class_p = (void*)mp_write_ptr_lv_tree_class_t(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_tree_node_t' object has no attribute '%s'", attr); + } + return result; +} -/* - * lvgl extension definition for: - * inline static bool lv_text_is_break_char(uint32_t letter) - */ -static PyObject *py_lv_text_is_break_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tree_node_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t letter = (uint32_t)letter_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(uint32_t))lv_text_is_break_char)(letter); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + return make_new_lv_struct(type, args, kwds, sizeof(lv_tree_node_t)); } -static PyMethodDef py_lv_text_is_break_char_def = { - "lv_text_is_break_char", - (PyCFunction)py_lv_text_is_break_char, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static void py_lv_tree_node_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} +PyTypeObject py_lv_tree_node_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_tree_node_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_tree_node_t_dealloc, + .tp_getattro = (getter)py_lv_tree_node_t_getattro, + .tp_setattro = (setter)py_lv_tree_node_t_setattro, + .tp_new = py_lv_tree_node_t_new, + .tp_methods = py_lv_tree_node_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; -/* - * lvgl extension definition for: - * inline static bool lv_text_is_hanging_space(uint32_t letter) - */ -static PyObject *py_lv_text_is_hanging_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline void* mp_write_ptr_lv_tree_node_t(PyObject *self_in) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t letter = (uint32_t)letter_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(uint32_t))lv_text_is_hanging_space)(letter); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_tree_node_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_tree_node_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_tree_node_t*)self->data; } -static PyMethodDef py_lv_text_is_hanging_space_def = { - "lv_text_is_hanging_space", - (PyCFunction)py_lv_text_is_hanging_space, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +static lv_tree_node_t mp_write_scratch_lv_tree_node_t; + +static inline void* mp_write_value_ptr_lv_tree_node_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_tree_node_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_tree_node_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_tree_node_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_tree_node_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_tree_node_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_tree_node_t or dict, got None"); + } + memset(&mp_write_scratch_lv_tree_node_t, 0, sizeof(lv_tree_node_t)); + return &mp_write_scratch_lv_tree_node_t; +} +#define mp_write_lv_tree_node_t(struct_obj) (*((lv_tree_node_t*)mp_write_value_ptr_lv_tree_node_t(struct_obj))) -/* - * lvgl extension definition for: - * inline static bool lv_text_is_a_word(uint32_t letter) - */ -static PyObject *py_lv_text_is_a_word(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static inline PyObject *mp_read_ptr_lv_tree_node_t(void *field) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t letter = (uint32_t)letter_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(uint32_t))lv_text_is_a_word)(letter); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + return lv_to_mp_struct(&py_lv_tree_node_t_type, field); } -static PyMethodDef py_lv_text_is_a_word_def = { - "lv_text_is_a_word", - (PyCFunction)py_lv_text_is_a_word, - METH_VARARGS | METH_KEYWORDS, - NULL -}; +#define mp_read_lv_tree_node_t(field) lv_to_mp_struct_own(&py_lv_tree_node_t_type, copy_buffer(&field, sizeof(lv_tree_node_t))) +#define mp_read_byref_lv_tree_node_t(field) mp_read_ptr_lv_tree_node_t(&field) /* - * lvgl extension definition for: - * inline static bool lv_text_is_marker(uint32_t letter) + * + * Global Module Functions + * */ -static PyObject *py_lv_text_is_marker(PyObject *self, PyObject *py_args, PyObject *py_kwds) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t letter = (uint32_t)letter_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(uint32_t))lv_text_is_marker)(letter); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); -} - -static PyMethodDef py_lv_text_is_marker_def = { - "lv_text_is_marker", - (PyCFunction)py_lv_text_is_marker, - METH_VARARGS | METH_KEYWORDS, - NULL -}; /* * lvgl extension definition for: - * inline static uint32_t lv_swap_bytes_32(uint32_t x) + * inline static int32_t lv_sqr(int32_t x) */ -static PyObject *py_lv_swap_bytes_32(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_sqr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; long x_val; if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t x = (uint32_t)x_val; + int32_t x = (int32_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_swap_bytes_32)(x); + _res = ((int32_t (*)(int32_t))lv_sqr)(x); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_swap_bytes_32_def = { - "lv_swap_bytes_32", - (PyCFunction)py_lv_swap_bytes_32, +static PyMethodDef py_lv_sqr_def = { + "lv_sqr", + (PyCFunction)py_lv_sqr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70573,30 +64833,30 @@ static PyMethodDef py_lv_swap_bytes_32_def = { /* * lvgl extension definition for: - * inline static uint16_t lv_swap_bytes_16(uint16_t x) + * inline static uint16_t lv_color_swap_16(uint16_t c) */ -static PyObject *py_lv_swap_bytes_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_swap_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t x = (uint16_t)x_val; + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t c = (uint16_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(uint16_t))lv_swap_bytes_16)(x); + _res = ((uint16_t (*)(uint16_t))lv_color_swap_16)(c); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_swap_bytes_16_def = { - "lv_swap_bytes_16", - (PyCFunction)py_lv_swap_bytes_16, +static PyMethodDef py_lv_color_swap_16_def = { + "lv_color_swap_16", + (PyCFunction)py_lv_color_swap_16, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70604,30 +64864,30 @@ static PyMethodDef py_lv_swap_bytes_16_def = { /* * lvgl extension definition for: - * int32_t lv_trigo_sin(int16_t angle) + * inline static void lv_memzero(void *dst, size_t len) */ -static PyObject *py_lv_trigo_sin(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memzero(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long angle_val; - if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } - int16_t angle = (int16_t)angle_val; + PyObject *dst_py; long len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &dst_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int16_t))lv_trigo_sin)(angle); + ((void (*)(void *, size_t))lv_memzero)(dst, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_trigo_sin_def = { - "lv_trigo_sin", - (PyCFunction)py_lv_trigo_sin, +static PyMethodDef py_lv_memzero_def = { + "lv_memzero", + (PyCFunction)py_lv_memzero, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70635,30 +64895,31 @@ static PyMethodDef py_lv_trigo_sin_def = { /* * lvgl extension definition for: - * int32_t lv_trigo_cos(int16_t angle) + * inline static bool lv_streq(const char *s1, const char *s2) */ -static PyObject *py_lv_trigo_cos(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_streq(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long angle_val; - if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } - int16_t angle = (int16_t)angle_val; + PyObject *s1_py; PyObject *s2_py; + if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } + const char *s1 = (const char *)(char*)convert_from_str(s1_py); + const char *s2 = (const char *)(char*)convert_from_str(s2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(int16_t))lv_trigo_cos)(angle); + _res = ((bool (*)(const char *, const char *))lv_streq)(s1, s2); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_trigo_cos_def = { - "lv_trigo_cos", - (PyCFunction)py_lv_trigo_cos, +static PyMethodDef py_lv_streq_def = { + "lv_streq", + (PyCFunction)py_lv_streq, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70666,34 +64927,30 @@ static PyMethodDef py_lv_trigo_cos_def = { /* * lvgl extension definition for: - * int32_t lv_cubic_bezier(int32_t x, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + * inline static uint32_t lv_style_get_prop_group(lv_style_prop_t prop) */ -static PyObject *py_lv_cubic_bezier(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_get_prop_group(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long x1_val; long y1_val; long x2_val; long y2_val; - if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; - int32_t x1 = (int32_t)x1_val; - int32_t y1 = (int32_t)y1_val; - int32_t x2 = (int32_t)x2_val; - int32_t y2 = (int32_t)y2_val; + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_cubic_bezier)(x, x1, y1, x2, y2); + _res = ((uint32_t (*)(lv_style_prop_t))lv_style_get_prop_group)(prop); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_cubic_bezier_def = { - "lv_cubic_bezier", - (PyCFunction)py_lv_cubic_bezier, +static PyMethodDef py_lv_style_get_prop_group_def = { + "lv_style_get_prop_group", + (PyCFunction)py_lv_style_get_prop_group, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70701,34 +64958,31 @@ static PyMethodDef py_lv_cubic_bezier_def = { /* * lvgl extension definition for: - * int32_t lv_bezier3(int32_t t, int32_t u0, uint32_t u1, int32_t u2, int32_t u3) + * inline static bool lv_style_prop_has_flag(lv_style_prop_t prop, uint8_t flag) */ -static PyObject *py_lv_bezier3(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_prop_has_flag(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long t_val; long u0_val; long u1_val; long u2_val; long u3_val; - if (!PyArg_ParseTuple(py_args, "lllll", &t_val, &u0_val, &u1_val, &u2_val, &u3_val)) { PyGILState_Release(gstate); return NULL; } - int32_t t = (int32_t)t_val; - int32_t u0 = (int32_t)u0_val; - uint32_t u1 = (uint32_t)u1_val; - int32_t u2 = (int32_t)u2_val; - int32_t u3 = (int32_t)u3_val; + PyObject *prop_py; long flag_val; + if (!PyArg_ParseTuple(py_args, "Ol", &prop_py, &flag_val)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + uint8_t flag = (uint8_t)flag_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, uint32_t, int32_t, int32_t))lv_bezier3)(t, u0, u1, u2, u3); + _res = ((bool (*)(lv_style_prop_t, uint8_t))lv_style_prop_has_flag)(prop, flag); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_bezier3_def = { - "lv_bezier3", - (PyCFunction)py_lv_bezier3, +static PyMethodDef py_lv_style_prop_has_flag_def = { + "lv_style_prop_has_flag", + (PyCFunction)py_lv_style_prop_has_flag, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70736,196 +64990,61 @@ static PyMethodDef py_lv_bezier3_def = { /* * lvgl extension definition for: - * uint16_t lv_atan2(int x, int y) + * inline static uint32_t lv_task_handler(void) */ -static PyObject *py_lv_atan2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_task_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - int x = (int)x_val; - int y = (int)y_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + uint32_t _res; lvpy_lock(); - _res = ((uint16_t (*)(int, int))lv_atan2)(x, y); + Py_BEGIN_ALLOW_THREADS + _res = ((uint32_t (*)(void))lv_task_handler)(); + Py_END_ALLOW_THREADS lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_atan2_def = { - "lv_atan2", - (PyCFunction)py_lv_atan2, +static PyMethodDef py_lv_task_handler_def = { + "lv_task_handler", + (PyCFunction)py_lv_task_handler, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Struct lv_sqrt_res_t (CPython) - */ - -extern PyMethodDef py_lv_sqrt_res_t_methods[]; - -static PyObject *py_lv_sqrt_res_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "i") == 0) return mp_obj_new_int_from_uint(data->i); - if (strcmp(attr, "f") == 0) return mp_obj_new_int_from_uint(data->f); - for (PyMethodDef *m = py_lv_sqrt_res_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_sqrt_res_t_field_names[] = {"i", "f", NULL}; - -static PyObject *py_lv_sqrt_res_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_sqrt_res_t_field_names, py_lv_sqrt_res_t_methods); -} - -static PyMethodDef py_lv_sqrt_res_t_type_methods[] = { - {"__dir__", py_lv_sqrt_res_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_sqrt_res_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_sqrt_res_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "i") == 0) { data->i = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "f") == 0) { data->f = (uint16_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_sqrt_res_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_sqrt_res_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_sqrt_res_t)); -} - -static void py_lv_sqrt_res_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_sqrt_res_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_sqrt_res_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_sqrt_res_t_dealloc, - .tp_getattro = (getter)py_lv_sqrt_res_t_getattro, - .tp_setattro = (setter)py_lv_sqrt_res_t_setattro, - .tp_new = py_lv_sqrt_res_t_new, - .tp_methods = py_lv_sqrt_res_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_sqrt_res_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_sqrt_res_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_sqrt_res_t*)self->data; -} - -static lv_sqrt_res_t mp_write_scratch_lv_sqrt_res_t; - -static inline void* mp_write_value_ptr_lv_sqrt_res_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_sqrt_res_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_sqrt_res_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_sqrt_res_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_sqrt_res_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_sqrt_res_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t or dict, got None"); - } - memset(&mp_write_scratch_lv_sqrt_res_t, 0, sizeof(lv_sqrt_res_t)); - return &mp_write_scratch_lv_sqrt_res_t; -} - -#define mp_write_lv_sqrt_res_t(struct_obj) (*((lv_sqrt_res_t*)mp_write_value_ptr_lv_sqrt_res_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_sqrt_res_t(void *field) -{ - return lv_to_mp_struct(&py_lv_sqrt_res_t_type, field); -} - -#define mp_read_lv_sqrt_res_t(field) lv_to_mp_struct_own(&py_lv_sqrt_res_t_type, copy_buffer(&field, sizeof(lv_sqrt_res_t))) -#define mp_read_byref_lv_sqrt_res_t(field) mp_read_ptr_lv_sqrt_res_t(&field) - - /* * lvgl extension definition for: - * void lv_sqrt(uint32_t x, lv_sqrt_res_t *q, uint32_t mask) + * inline static int lv_version_major(void) */ -static PyObject *py_lv_sqrt(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_version_major(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; PyObject *q_py; long mask_val; - if (!PyArg_ParseTuple(py_args, "lOl", &x_val, &q_py, &mask_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t x = (uint32_t)x_val; - lv_sqrt_res_t *q = mp_write_ptr_lv_sqrt_res_t(q_py); - uint32_t mask = (uint32_t)mask_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int _res; lvpy_lock(); - ((void (*)(uint32_t, lv_sqrt_res_t *, uint32_t))lv_sqrt)(x, q, mask); + _res = ((int (*)(void))lv_version_major)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_sqrt_def = { - "lv_sqrt", - (PyCFunction)py_lv_sqrt, +static PyMethodDef py_lv_version_major_def = { + "lv_version_major", + (PyCFunction)py_lv_version_major, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70933,30 +65052,29 @@ static PyMethodDef py_lv_sqrt_def = { /* * lvgl extension definition for: - * int32_t lv_sqrt32(uint32_t x) + * inline static int lv_version_minor(void) */ -static PyObject *py_lv_sqrt32(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_version_minor(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t x = (uint32_t)x_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + int _res; lvpy_lock(); - _res = ((int32_t (*)(uint32_t))lv_sqrt32)(x); + _res = ((int (*)(void))lv_version_minor)(); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_sqrt32_def = { - "lv_sqrt32", - (PyCFunction)py_lv_sqrt32, +static PyMethodDef py_lv_version_minor_def = { + "lv_version_minor", + (PyCFunction)py_lv_version_minor, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70964,31 +65082,29 @@ static PyMethodDef py_lv_sqrt32_def = { /* * lvgl extension definition for: - * int64_t lv_pow(int64_t base, int8_t exp) + * inline static int lv_version_patch(void) */ -static PyObject *py_lv_pow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_version_patch(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long base_val; long exp_val; - if (!PyArg_ParseTuple(py_args, "ll", &base_val, &exp_val)) { PyGILState_Release(gstate); return NULL; } - int64_t base = (int64_t)base_val; - int8_t exp = (int8_t)exp_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int64_t _res; + int _res; lvpy_lock(); - _res = ((int64_t (*)(int64_t, int8_t))lv_pow)(base, exp); + _res = ((int (*)(void))lv_version_patch)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_ll(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_pow_def = { - "lv_pow", - (PyCFunction)py_lv_pow, +static PyMethodDef py_lv_version_patch_def = { + "lv_version_patch", + (PyCFunction)py_lv_version_patch, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -70996,64 +65112,96 @@ static PyMethodDef py_lv_pow_def = { /* * lvgl extension definition for: - * int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out) + * inline static const char *lv_version_info(void) */ -static PyObject *py_lv_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_version_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long min_in_val; long max_in_val; long min_out_val; long max_out_val; - if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &min_in_val, &max_in_val, &min_out_val, &max_out_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; - int32_t min_in = (int32_t)min_in_val; - int32_t max_in = (int32_t)max_in_val; - int32_t min_out = (int32_t)min_out_val; - int32_t max_out = (int32_t)max_out_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + const char * _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_map)(x, min_in, max_in, min_out, max_out); + _res = ((const char *(*)(void))lv_version_info)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_map_def = { - "lv_map", - (PyCFunction)py_lv_map, +static PyMethodDef py_lv_version_info_def = { + "lv_version_info", + (PyCFunction)py_lv_version_info, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_thread_init_callback (CPython) + * void callback(void *) + */ +static void lv_thread_init_callback_callback(void *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_thread_init_callback"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_rand_set_seed(uint32_t seed) + * inline static lv_result_t lv_thread_init(lv_thread_t *thread, const char * const name, lv_thread_prio_t prio, void (*callback)(void *), size_t stack_size, void *user_data) */ -static PyObject *py_lv_rand_set_seed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_thread_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long seed_val; - if (!PyArg_ParseTuple(py_args, "l", &seed_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t seed = (uint32_t)seed_val; + PyObject *thread_py; PyObject *name_py; PyObject *prio_py; PyObject *callback_py; long stack_size_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOOOlO", &thread_py, &name_py, &prio_py, &callback_py, &stack_size_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + lv_thread_t *thread = mp_to_ptr(thread_py); + const char * const name = (const char * const)(char*)convert_from_str(name_py); + lv_thread_prio_t prio = (int)mp_obj_get_int(prio_py); + size_t stack_size = (size_t)stack_size_val; + void *callback = mp_lv_callback(callback_py, &lv_thread_init_callback_callback, "lv_thread_init_callback", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(uint32_t))lv_rand_set_seed)(seed); + _res = ((lv_result_t (*)(lv_thread_t *, const char * const, lv_thread_prio_t, void (*)(void *), size_t, void *))lv_thread_init)(thread, name, prio, callback, stack_size, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_rand_set_seed_def = { - "lv_rand_set_seed", - (PyCFunction)py_lv_rand_set_seed, +static PyMethodDef py_lv_thread_init_def = { + "lv_thread_init", + (PyCFunction)py_lv_thread_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71061,70 +65209,61 @@ static PyMethodDef py_lv_rand_set_seed_def = { /* * lvgl extension definition for: - * uint32_t lv_rand(uint32_t min, uint32_t max) + * inline static lv_result_t lv_thread_delete(lv_thread_t *thread) */ -static PyObject *py_lv_rand(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_thread_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long min_val; long max_val; - if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t min = (uint32_t)min_val; - uint32_t max = (uint32_t)max_val; + PyObject *thread_py; + if (!PyArg_ParseTuple(py_args, "O", &thread_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_t *thread = mp_to_ptr(thread_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, uint32_t))lv_rand)(min, max); + _res = ((lv_result_t (*)(lv_thread_t *))lv_thread_delete)(thread); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_rand_def = { - "lv_rand", - (PyCFunction)py_lv_rand, +static PyMethodDef py_lv_thread_delete_def = { + "lv_thread_delete", + (PyCFunction)py_lv_thread_delete, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) - * lv_anim_exec_xcb_t exec_cb - */ - - /* * lvgl extension definition for: - * bool lv_anim_delete(void *var, lv_anim_exec_xcb_t exec_cb) + * inline static lv_result_t lv_mutex_init(lv_mutex_t *mutex) */ -static PyObject *py_lv_anim_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mutex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *var_py; PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - void *var = mp_to_ptr(var_py); - void *exec_cb = NULL; + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_result_t _res; lvpy_lock(); - _res = ((bool (*)(void *, lv_anim_exec_xcb_t))lv_anim_delete)(var, exec_cb); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_init)(mutex); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_delete_def = { - "lv_anim_delete", - (PyCFunction)py_lv_anim_delete, +static PyMethodDef py_lv_mutex_init_def = { + "lv_mutex_init", + (PyCFunction)py_lv_mutex_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71132,67 +65271,61 @@ static PyMethodDef py_lv_anim_delete_def = { /* * lvgl extension definition for: - * void lv_anim_delete_all(void) + * inline static lv_result_t lv_mutex_lock(lv_mutex_t *mutex) */ -static PyObject *py_lv_anim_delete_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mutex_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(void))lv_anim_delete_all)(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock)(mutex); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_delete_all_def = { - "lv_anim_delete_all", - (PyCFunction)py_lv_anim_delete_all, +static PyMethodDef py_lv_mutex_lock_def = { + "lv_mutex_lock", + (PyCFunction)py_lv_mutex_lock, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) - * lv_anim_exec_xcb_t exec_cb - */ - - /* * lvgl extension definition for: - * lv_anim_t *lv_anim_get(void *var, lv_anim_exec_xcb_t exec_cb) + * inline static lv_result_t lv_mutex_lock_isr(lv_mutex_t *mutex) */ -static PyObject *py_lv_anim_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mutex_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *var_py; PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - void *var = mp_to_ptr(var_py); - void *exec_cb = NULL; + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(void *, lv_anim_exec_xcb_t))lv_anim_get)(var, exec_cb); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_lock_isr)(mutex); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_get_def = { - "lv_anim_get", - (PyCFunction)py_lv_anim_get, +static PyMethodDef py_lv_mutex_lock_isr_def = { + "lv_mutex_lock_isr", + (PyCFunction)py_lv_mutex_lock_isr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71200,29 +65333,30 @@ static PyMethodDef py_lv_anim_get_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_anim_get_timer(void) + * inline static lv_result_t lv_mutex_unlock(lv_mutex_t *mutex) */ -static PyObject *py_lv_anim_get_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mutex_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(void))lv_anim_get_timer)(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_unlock)(mutex); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_get_timer_def = { - "lv_anim_get_timer", - (PyCFunction)py_lv_anim_get_timer, +static PyMethodDef py_lv_mutex_unlock_def = { + "lv_mutex_unlock", + (PyCFunction)py_lv_mutex_unlock, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71230,29 +65364,30 @@ static PyMethodDef py_lv_anim_get_timer_def = { /* * lvgl extension definition for: - * uint16_t lv_anim_count_running(void) + * inline static lv_result_t lv_mutex_delete(lv_mutex_t *mutex) */ -static PyObject *py_lv_anim_count_running(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mutex_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *mutex_py; + if (!PyArg_ParseTuple(py_args, "O", &mutex_py)) { PyGILState_Release(gstate); return NULL; } + lv_mutex_t *mutex = mp_array_to_i32ptr(mutex_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint16_t (*)(void))lv_anim_count_running)(); + _res = ((lv_result_t (*)(lv_mutex_t *))lv_mutex_delete)(mutex); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_count_running_def = { - "lv_anim_count_running", - (PyCFunction)py_lv_anim_count_running, +static PyMethodDef py_lv_mutex_delete_def = { + "lv_mutex_delete", + (PyCFunction)py_lv_mutex_delete, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71260,30 +65395,30 @@ static PyMethodDef py_lv_anim_count_running_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_speed(uint32_t speed) + * inline static lv_result_t lv_thread_sync_init(lv_thread_sync_t *sync) */ -static PyObject *py_lv_anim_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_thread_sync_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_val; - if (!PyArg_ParseTuple(py_args, "l", &speed_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed = (uint32_t)speed_val; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_anim_speed)(speed); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_init)(sync); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_speed_def = { - "lv_anim_speed", - (PyCFunction)py_lv_anim_speed, +static PyMethodDef py_lv_thread_sync_init_def = { + "lv_thread_sync_init", + (PyCFunction)py_lv_thread_sync_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71291,32 +65426,30 @@ static PyMethodDef py_lv_anim_speed_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_speed_clamped(uint32_t speed, uint32_t min_time, uint32_t max_time) + * inline static lv_result_t lv_thread_sync_wait(lv_thread_sync_t *sync) */ -static PyObject *py_lv_anim_speed_clamped(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_thread_sync_wait(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_val; long min_time_val; long max_time_val; - if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &min_time_val, &max_time_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed = (uint32_t)speed_val; - uint32_t min_time = (uint32_t)min_time_val; - uint32_t max_time = (uint32_t)max_time_val; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, uint32_t, uint32_t))lv_anim_speed_clamped)(speed, min_time, max_time); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_wait)(sync); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_speed_clamped_def = { - "lv_anim_speed_clamped", - (PyCFunction)py_lv_anim_speed_clamped, +static PyMethodDef py_lv_thread_sync_wait_def = { + "lv_thread_sync_wait", + (PyCFunction)py_lv_thread_sync_wait, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71324,32 +65457,30 @@ static PyMethodDef py_lv_anim_speed_clamped_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_resolve_speed(uint32_t speed_or_time, int32_t start, int32_t end) + * inline static lv_result_t lv_thread_sync_signal(lv_thread_sync_t *sync) */ -static PyObject *py_lv_anim_resolve_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_thread_sync_signal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_or_time_val; long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "lll", &speed_or_time_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed_or_time = (uint32_t)speed_or_time_val; - int32_t start = (int32_t)start_val; - int32_t end = (int32_t)end_val; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_resolve_speed)(speed_or_time, start, end); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal)(sync); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_resolve_speed_def = { - "lv_anim_resolve_speed", - (PyCFunction)py_lv_anim_resolve_speed, +static PyMethodDef py_lv_thread_sync_signal_def = { + "lv_thread_sync_signal", + (PyCFunction)py_lv_thread_sync_signal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71357,32 +65488,30 @@ static PyMethodDef py_lv_anim_resolve_speed_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_speed_to_time(uint32_t speed, int32_t start, int32_t end) + * inline static lv_result_t lv_thread_sync_signal_isr(lv_thread_sync_t *sync) */ -static PyObject *py_lv_anim_speed_to_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_thread_sync_signal_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long speed_val; long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t speed = (uint32_t)speed_val; - int32_t start = (int32_t)start_val; - int32_t end = (int32_t)end_val; + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_speed_to_time)(speed, start, end); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_signal_isr)(sync); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_speed_to_time_def = { - "lv_anim_speed_to_time", - (PyCFunction)py_lv_anim_speed_to_time, +static PyMethodDef py_lv_thread_sync_signal_isr_def = { + "lv_thread_sync_signal_isr", + (PyCFunction)py_lv_thread_sync_signal_isr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71390,28 +65519,30 @@ static PyMethodDef py_lv_anim_speed_to_time_def = { /* * lvgl extension definition for: - * void lv_anim_refr_now(void) + * inline static lv_result_t lv_thread_sync_delete(lv_thread_sync_t *sync) */ -static PyObject *py_lv_anim_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_thread_sync_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *sync_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_py)) { PyGILState_Release(gstate); return NULL; } + lv_thread_sync_t *sync = mp_to_ptr(sync_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(void))lv_anim_refr_now)(); + _res = ((lv_result_t (*)(lv_thread_sync_t *))lv_thread_sync_delete)(sync); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_refr_now_def = { - "lv_anim_refr_now", - (PyCFunction)py_lv_anim_refr_now, +static PyMethodDef py_lv_thread_sync_delete_def = { + "lv_thread_sync_delete", + (PyCFunction)py_lv_thread_sync_delete, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71419,29 +65550,32 @@ static PyMethodDef py_lv_anim_refr_now_def = { /* * lvgl extension definition for: - * lv_anim_timeline_t *lv_anim_timeline_create(void) + * inline static uint16_t lv_color_16_16_mix_inlined(uint16_t c1, uint16_t c2, uint8_t mix) */ -static PyObject *py_lv_anim_timeline_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_16_16_mix_inlined(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long c1_val; long c2_val; long mix_val; + if (!PyArg_ParseTuple(py_args, "lll", &c1_val, &c2_val, &mix_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t c1 = (uint16_t)c1_val; + uint16_t c2 = (uint16_t)c2_val; + uint8_t mix = (uint8_t)mix_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_timeline_t * _res; + uint16_t _res; lvpy_lock(); - _res = ((lv_anim_timeline_t *(*)(void))lv_anim_timeline_create)(); + _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_color_16_16_mix_inlined)(c1, c2, mix); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_timeline_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_timeline_create_def = { - "lv_anim_timeline_create", - (PyCFunction)py_lv_anim_timeline_create, +static PyMethodDef py_lv_color_16_16_mix_inlined_def = { + "lv_color_16_16_mix_inlined", + (PyCFunction)py_lv_color_16_16_mix_inlined, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71449,30 +65583,30 @@ static PyMethodDef py_lv_anim_timeline_create_def = { /* * lvgl extension definition for: - * int32_t lv_pct(int32_t x) + * inline static bool lv_text_is_break_char(uint32_t letter) */ -static PyObject *py_lv_pct(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_is_break_char(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t))lv_pct)(x); + _res = ((bool (*)(uint32_t))lv_text_is_break_char)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_pct_def = { - "lv_pct", - (PyCFunction)py_lv_pct, +static PyMethodDef py_lv_text_is_break_char_def = { + "lv_text_is_break_char", + (PyCFunction)py_lv_text_is_break_char, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71480,31 +65614,30 @@ static PyMethodDef py_lv_pct_def = { /* * lvgl extension definition for: - * int32_t lv_pct_to_px(int32_t v, int32_t base) + * inline static bool lv_text_is_hanging_space(uint32_t letter) */ -static PyObject *py_lv_pct_to_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_is_hanging_space(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long v_val; long base_val; - if (!PyArg_ParseTuple(py_args, "ll", &v_val, &base_val)) { PyGILState_Release(gstate); return NULL; } - int32_t v = (int32_t)v_val; - int32_t base = (int32_t)base_val; + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t))lv_pct_to_px)(v, base); + _res = ((bool (*)(uint32_t))lv_text_is_hanging_space)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_pct_to_px_def = { - "lv_pct_to_px", - (PyCFunction)py_lv_pct_to_px, +static PyMethodDef py_lv_text_is_hanging_space_def = { + "lv_text_is_hanging_space", + (PyCFunction)py_lv_text_is_hanging_space, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71512,29 +65645,30 @@ static PyMethodDef py_lv_pct_to_px_def = { /* * lvgl extension definition for: - * uint32_t lv_event_register_id(void) + * inline static bool lv_text_is_a_word(uint32_t letter) */ -static PyObject *py_lv_event_register_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_is_a_word(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_event_register_id)(); + _res = ((bool (*)(uint32_t))lv_text_is_a_word)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_event_register_id_def = { - "lv_event_register_id", - (PyCFunction)py_lv_event_register_id, +static PyMethodDef py_lv_text_is_a_word_def = { + "lv_text_is_a_word", + (PyCFunction)py_lv_text_is_a_word, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71542,30 +65676,30 @@ static PyMethodDef py_lv_event_register_id_def = { /* * lvgl extension definition for: - * const char *lv_event_code_get_name(lv_event_code_t code) + * inline static bool lv_text_is_marker(uint32_t letter) */ -static PyObject *py_lv_event_code_get_name(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_is_marker(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *code_py; - if (!PyArg_ParseTuple(py_args, "O", &code_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_code_t code = (int)mp_obj_get_int(code_py); + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t letter = (uint32_t)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + bool _res; lvpy_lock(); - _res = ((const char *(*)(lv_event_code_t))lv_event_code_get_name)(code); + _res = ((bool (*)(uint32_t))lv_text_is_marker)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return convert_to_bool(_res); } - -static PyMethodDef py_lv_event_code_get_name_def = { - "lv_event_code_get_name", - (PyCFunction)py_lv_event_code_get_name, + +static PyMethodDef py_lv_text_is_marker_def = { + "lv_text_is_marker", + (PyCFunction)py_lv_text_is_marker, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71573,29 +65707,30 @@ static PyMethodDef py_lv_event_code_get_name_def = { /* * lvgl extension definition for: - * lv_group_t *lv_group_create(void) + * inline static uint32_t lv_swap_bytes_32(uint32_t x) */ -static PyObject *py_lv_group_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_swap_bytes_32(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t x = (uint32_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_group_t *(*)(void))lv_group_create)(); + _res = ((uint32_t (*)(uint32_t))lv_swap_bytes_32)(x); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_create_def = { - "lv_group_create", - (PyCFunction)py_lv_group_create, +static PyMethodDef py_lv_swap_bytes_32_def = { + "lv_swap_bytes_32", + (PyCFunction)py_lv_swap_bytes_32, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71603,29 +65738,30 @@ static PyMethodDef py_lv_group_create_def = { /* * lvgl extension definition for: - * lv_group_t *lv_group_get_default(void) + * inline static uint16_t lv_swap_bytes_16(uint16_t x) */ -static PyObject *py_lv_group_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_swap_bytes_16(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t x = (uint16_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; + uint16_t _res; lvpy_lock(); - _res = ((lv_group_t *(*)(void))lv_group_get_default)(); + _res = ((uint16_t (*)(uint16_t))lv_swap_bytes_16)(x); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_get_default_def = { - "lv_group_get_default", - (PyCFunction)py_lv_group_get_default, +static PyMethodDef py_lv_swap_bytes_16_def = { + "lv_swap_bytes_16", + (PyCFunction)py_lv_swap_bytes_16, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71633,30 +65769,30 @@ static PyMethodDef py_lv_group_get_default_def = { /* * lvgl extension definition for: - * void lv_group_swap_obj(lv_obj_t *obj1, lv_obj_t *obj2) + * int32_t lv_trigo_sin(int16_t angle) */ -static PyObject *py_lv_group_swap_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_trigo_sin(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj1_py; PyObject *obj2_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj1_py, &obj2_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj1 = mp_to_lv(obj1_py); - lv_obj_t *obj2 = mp_to_lv(obj2_py); + long angle_val; + if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } + int16_t angle = (int16_t)angle_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_obj_t *))lv_group_swap_obj)(obj1, obj2); + _res = ((int32_t (*)(int16_t))lv_trigo_sin)(angle); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_group_swap_obj_def = { - "lv_group_swap_obj", - (PyCFunction)py_lv_group_swap_obj, +static PyMethodDef py_lv_trigo_sin_def = { + "lv_trigo_sin", + (PyCFunction)py_lv_trigo_sin, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71664,29 +65800,30 @@ static PyMethodDef py_lv_group_swap_obj_def = { /* * lvgl extension definition for: - * void lv_group_remove_obj(lv_obj_t *obj) + * int32_t lv_trigo_cos(int16_t angle) */ -static PyObject *py_lv_group_remove_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_trigo_cos(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + long angle_val; + if (!PyArg_ParseTuple(py_args, "l", &angle_val)) { PyGILState_Release(gstate); return NULL; } + int16_t angle = (int16_t)angle_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_group_remove_obj)(obj); + _res = ((int32_t (*)(int16_t))lv_trigo_cos)(angle); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_group_remove_obj_def = { - "lv_group_remove_obj", - (PyCFunction)py_lv_group_remove_obj, +static PyMethodDef py_lv_trigo_cos_def = { + "lv_trigo_cos", + (PyCFunction)py_lv_trigo_cos, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71694,29 +65831,34 @@ static PyMethodDef py_lv_group_remove_obj_def = { /* * lvgl extension definition for: - * void lv_group_focus_obj(lv_obj_t *obj) + * int32_t lv_cubic_bezier(int32_t x, int32_t x1, int32_t y1, int32_t x2, int32_t y2) */ -static PyObject *py_lv_group_focus_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cubic_bezier(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + long x_val; long x1_val; long y1_val; long x2_val; long y2_val; + if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + int32_t x1 = (int32_t)x1_val; + int32_t y1 = (int32_t)y1_val; + int32_t x2 = (int32_t)x2_val; + int32_t y2 = (int32_t)y2_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_group_focus_obj)(obj); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_cubic_bezier)(x, x1, y1, x2, y2); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_group_focus_obj_def = { - "lv_group_focus_obj", - (PyCFunction)py_lv_group_focus_obj, +static PyMethodDef py_lv_cubic_bezier_def = { + "lv_cubic_bezier", + (PyCFunction)py_lv_cubic_bezier, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71724,29 +65866,34 @@ static PyMethodDef py_lv_group_focus_obj_def = { /* * lvgl extension definition for: - * uint32_t lv_group_get_count(void) + * int32_t lv_bezier3(int32_t t, int32_t u0, uint32_t u1, int32_t u2, int32_t u3) */ -static PyObject *py_lv_group_get_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bezier3(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long t_val; long u0_val; long u1_val; long u2_val; long u3_val; + if (!PyArg_ParseTuple(py_args, "lllll", &t_val, &u0_val, &u1_val, &u2_val, &u3_val)) { PyGILState_Release(gstate); return NULL; } + int32_t t = (int32_t)t_val; + int32_t u0 = (int32_t)u0_val; + uint32_t u1 = (uint32_t)u1_val; + int32_t u2 = (int32_t)u2_val; + int32_t u3 = (int32_t)u3_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_group_get_count)(); + _res = ((int32_t (*)(int32_t, int32_t, uint32_t, int32_t, int32_t))lv_bezier3)(t, u0, u1, u2, u3); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_group_get_count_def = { - "lv_group_get_count", - (PyCFunction)py_lv_group_get_count, +static PyMethodDef py_lv_bezier3_def = { + "lv_bezier3", + (PyCFunction)py_lv_bezier3, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71754,59 +65901,196 @@ static PyMethodDef py_lv_group_get_count_def = { /* * lvgl extension definition for: - * lv_group_t *lv_group_by_index(uint32_t index) + * uint16_t lv_atan2(int x, int y) */ -static PyObject *py_lv_group_by_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_atan2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t index = (uint32_t)index_val; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + int x = (int)x_val; + int y = (int)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_group_t * _res; + uint16_t _res; lvpy_lock(); - _res = ((lv_group_t *(*)(uint32_t))lv_group_by_index)(index); + _res = ((uint16_t (*)(int, int))lv_atan2)(x, y); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_group_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_by_index_def = { - "lv_group_by_index", - (PyCFunction)py_lv_group_by_index, +static PyMethodDef py_lv_atan2_def = { + "lv_atan2", + (PyCFunction)py_lv_atan2, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Struct lv_sqrt_res_t (CPython) + */ + +extern PyMethodDef py_lv_sqrt_res_t_methods[]; + +static PyObject *py_lv_sqrt_res_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "i") == 0) return mp_obj_new_int_from_uint(data->i); + if (strcmp(attr, "f") == 0) return mp_obj_new_int_from_uint(data->f); + for (PyMethodDef *m = py_lv_sqrt_res_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_sqrt_res_t_field_names[] = {"i", "f", NULL}; + +static PyObject *py_lv_sqrt_res_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_sqrt_res_t_field_names, py_lv_sqrt_res_t_methods); +} + +static PyMethodDef py_lv_sqrt_res_t_type_methods[] = { + {"__dir__", py_lv_sqrt_res_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_sqrt_res_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_sqrt_res_t *data = (lv_sqrt_res_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_sqrt_res_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "i") == 0) { data->i = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "f") == 0) { data->f = (uint16_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_sqrt_res_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_sqrt_res_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_sqrt_res_t)); +} + +static void py_lv_sqrt_res_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_sqrt_res_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_sqrt_res_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_sqrt_res_t_dealloc, + .tp_getattro = (getter)py_lv_sqrt_res_t_getattro, + .tp_setattro = (setter)py_lv_sqrt_res_t_setattro, + .tp_new = py_lv_sqrt_res_t_new, + .tp_methods = py_lv_sqrt_res_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_sqrt_res_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_sqrt_res_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_sqrt_res_t*)self->data; +} + +static lv_sqrt_res_t mp_write_scratch_lv_sqrt_res_t; + +static inline void* mp_write_value_ptr_lv_sqrt_res_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_sqrt_res_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_sqrt_res_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_sqrt_res_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_sqrt_res_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_sqrt_res_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_sqrt_res_t or dict, got None"); + } + memset(&mp_write_scratch_lv_sqrt_res_t, 0, sizeof(lv_sqrt_res_t)); + return &mp_write_scratch_lv_sqrt_res_t; +} + +#define mp_write_lv_sqrt_res_t(struct_obj) (*((lv_sqrt_res_t*)mp_write_value_ptr_lv_sqrt_res_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_sqrt_res_t(void *field) +{ + return lv_to_mp_struct(&py_lv_sqrt_res_t_type, field); +} + +#define mp_read_lv_sqrt_res_t(field) lv_to_mp_struct_own(&py_lv_sqrt_res_t_type, copy_buffer(&field, sizeof(lv_sqrt_res_t))) +#define mp_read_byref_lv_sqrt_res_t(field) mp_read_ptr_lv_sqrt_res_t(&field) + + /* * lvgl extension definition for: - * void lv_init(void) + * void lv_sqrt(uint32_t x, lv_sqrt_res_t *q, uint32_t mask) */ -static PyObject *py_lv_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_sqrt(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long x_val; PyObject *q_py; long mask_val; + if (!PyArg_ParseTuple(py_args, "lOl", &x_val, &q_py, &mask_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t x = (uint32_t)x_val; + lv_sqrt_res_t *q = mp_write_ptr_lv_sqrt_res_t(q_py); + uint32_t mask = (uint32_t)mask_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_init)(); + ((void (*)(uint32_t, lv_sqrt_res_t *, uint32_t))lv_sqrt)(x, q, mask); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_init_def = { - "lv_init", - (PyCFunction)py_lv_init, +static PyMethodDef py_lv_sqrt_def = { + "lv_sqrt", + (PyCFunction)py_lv_sqrt, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71814,28 +66098,30 @@ static PyMethodDef py_lv_init_def = { /* * lvgl extension definition for: - * void lv_deinit(void) + * int32_t lv_sqrt32(uint32_t x) */ -static PyObject *py_lv_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_sqrt32(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t x = (uint32_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(void))lv_deinit)(); + _res = ((int32_t (*)(uint32_t))lv_sqrt32)(x); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_deinit_def = { - "lv_deinit", - (PyCFunction)py_lv_deinit, +static PyMethodDef py_lv_sqrt32_def = { + "lv_sqrt32", + (PyCFunction)py_lv_sqrt32, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71843,29 +66129,31 @@ static PyMethodDef py_lv_deinit_def = { /* * lvgl extension definition for: - * bool lv_is_initialized(void) + * int64_t lv_pow(int64_t base, int8_t exp) */ -static PyObject *py_lv_is_initialized(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long base_val; long exp_val; + if (!PyArg_ParseTuple(py_args, "ll", &base_val, &exp_val)) { PyGILState_Release(gstate); return NULL; } + int64_t base = (int64_t)base_val; + int8_t exp = (int8_t)exp_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int64_t _res; lvpy_lock(); - _res = ((bool (*)(void))lv_is_initialized)(); + _res = ((int64_t (*)(int64_t, int8_t))lv_pow)(base, exp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_ll(_res); } -static PyMethodDef py_lv_is_initialized_def = { - "lv_is_initialized", - (PyCFunction)py_lv_is_initialized, +static PyMethodDef py_lv_pow_def = { + "lv_pow", + (PyCFunction)py_lv_pow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71873,28 +66161,34 @@ static PyMethodDef py_lv_is_initialized_def = { /* * lvgl extension definition for: - * void lv_mem_init(void) + * int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out) */ -static PyObject *py_lv_mem_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_map(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long x_val; long min_in_val; long max_in_val; long min_out_val; long max_out_val; + if (!PyArg_ParseTuple(py_args, "lllll", &x_val, &min_in_val, &max_in_val, &min_out_val, &max_out_val)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + int32_t min_in = (int32_t)min_in_val; + int32_t max_in = (int32_t)max_in_val; + int32_t min_out = (int32_t)min_out_val; + int32_t max_out = (int32_t)max_out_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(void))lv_mem_init)(); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t, int32_t))lv_map)(x, min_in, max_in, min_out, max_out); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_mem_init_def = { - "lv_mem_init", - (PyCFunction)py_lv_mem_init, +static PyMethodDef py_lv_map_def = { + "lv_map", + (PyCFunction)py_lv_map, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71902,28 +66196,29 @@ static PyMethodDef py_lv_mem_init_def = { /* * lvgl extension definition for: - * void lv_mem_deinit(void) + * void lv_rand_set_seed(uint32_t seed) */ -static PyObject *py_lv_mem_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rand_set_seed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long seed_val; + if (!PyArg_ParseTuple(py_args, "l", &seed_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t seed = (uint32_t)seed_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_mem_deinit)(); + ((void (*)(uint32_t))lv_rand_set_seed)(seed); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_mem_deinit_def = { - "lv_mem_deinit", - (PyCFunction)py_lv_mem_deinit, +static PyMethodDef py_lv_rand_set_seed_def = { + "lv_rand_set_seed", + (PyCFunction)py_lv_rand_set_seed, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71931,61 +66226,70 @@ static PyMethodDef py_lv_mem_deinit_def = { /* * lvgl extension definition for: - * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) + * uint32_t lv_rand(uint32_t min, uint32_t max) */ -static PyObject *py_lv_mem_add_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_rand(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *mem_py; long bytes_val; - if (!PyArg_ParseTuple(py_args, "Ol", &mem_py, &bytes_val)) { PyGILState_Release(gstate); return NULL; } - void *mem = mp_to_ptr(mem_py); - size_t bytes = (size_t)bytes_val; + long min_val; long max_val; + if (!PyArg_ParseTuple(py_args, "ll", &min_val, &max_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t min = (uint32_t)min_val; + uint32_t max = (uint32_t)max_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_mem_pool_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_mem_pool_t (*)(void *, size_t))lv_mem_add_pool)(mem, bytes); + _res = ((uint32_t (*)(uint32_t, uint32_t))lv_rand)(min, max); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_mem_add_pool_def = { - "lv_mem_add_pool", - (PyCFunction)py_lv_mem_add_pool, +static PyMethodDef py_lv_rand_def = { + "lv_rand", + (PyCFunction)py_lv_rand, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) + * lv_anim_exec_xcb_t exec_cb + */ + + /* * lvgl extension definition for: - * void lv_mem_remove_pool(lv_mem_pool_t pool) + * bool lv_anim_delete(void *var, lv_anim_exec_xcb_t exec_cb) */ -static PyObject *py_lv_mem_remove_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *pool_py; - if (!PyArg_ParseTuple(py_args, "O", &pool_py)) { PyGILState_Release(gstate); return NULL; } - lv_mem_pool_t pool = mp_to_ptr(pool_py); + PyObject *var_py; PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + void *var = mp_to_ptr(var_py); + void *exec_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_mem_pool_t))lv_mem_remove_pool)(pool); + _res = ((bool (*)(void *, lv_anim_exec_xcb_t))lv_anim_delete)(var, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_mem_remove_pool_def = { - "lv_mem_remove_pool", - (PyCFunction)py_lv_mem_remove_pool, +static PyMethodDef py_lv_anim_delete_def = { + "lv_anim_delete", + (PyCFunction)py_lv_anim_delete, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -71993,62 +66297,67 @@ static PyMethodDef py_lv_mem_remove_pool_def = { /* * lvgl extension definition for: - * void *lv_malloc(size_t size) + * void lv_anim_delete_all(void) */ -static PyObject *py_lv_malloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_delete_all(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_malloc)(size); + ((void (*)(void))lv_anim_delete_all)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_malloc_def = { - "lv_malloc", - (PyCFunction)py_lv_malloc, +static PyMethodDef py_lv_anim_delete_all_def = { + "lv_anim_delete_all", + (PyCFunction)py_lv_anim_delete_all, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) + * lv_anim_exec_xcb_t exec_cb + */ + + /* * lvgl extension definition for: - * void *lv_calloc(size_t num, size_t size) + * lv_anim_t *lv_anim_get(void *var, lv_anim_exec_xcb_t exec_cb) */ -static PyObject *py_lv_calloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long num_val; long size_val; - if (!PyArg_ParseTuple(py_args, "ll", &num_val, &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t num = (size_t)num_val; - size_t size = (size_t)size_val; + PyObject *var_py; PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &var_py, &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + void *var = mp_to_ptr(var_py); + void *exec_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_anim_t * _res; lvpy_lock(); - _res = ((void *(*)(size_t, size_t))lv_calloc)(num, size); + _res = ((lv_anim_t *(*)(void *, lv_anim_exec_xcb_t))lv_anim_get)(var, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_anim_t((void*)_res); } -static PyMethodDef py_lv_calloc_def = { - "lv_calloc", - (PyCFunction)py_lv_calloc, +static PyMethodDef py_lv_anim_get_def = { + "lv_anim_get", + (PyCFunction)py_lv_anim_get, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72056,30 +66365,29 @@ static PyMethodDef py_lv_calloc_def = { /* * lvgl extension definition for: - * void *lv_zalloc(size_t size) + * lv_timer_t *lv_anim_get_timer(void) */ -static PyObject *py_lv_zalloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_timer_t * _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_zalloc)(size); + _res = ((lv_timer_t *(*)(void))lv_anim_get_timer)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_zalloc_def = { - "lv_zalloc", - (PyCFunction)py_lv_zalloc, +static PyMethodDef py_lv_anim_get_timer_def = { + "lv_anim_get_timer", + (PyCFunction)py_lv_anim_get_timer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72087,30 +66395,29 @@ static PyMethodDef py_lv_zalloc_def = { /* * lvgl extension definition for: - * void *lv_malloc_zeroed(size_t size) + * uint16_t lv_anim_count_running(void) */ -static PyObject *py_lv_malloc_zeroed(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_count_running(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint16_t _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_malloc_zeroed)(size); + _res = ((uint16_t (*)(void))lv_anim_count_running)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_malloc_zeroed_def = { - "lv_malloc_zeroed", - (PyCFunction)py_lv_malloc_zeroed, +static PyMethodDef py_lv_anim_count_running_def = { + "lv_anim_count_running", + (PyCFunction)py_lv_anim_count_running, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72118,29 +66425,30 @@ static PyMethodDef py_lv_malloc_zeroed_def = { /* * lvgl extension definition for: - * void lv_free(void *data) + * uint32_t lv_anim_speed(uint32_t speed) */ -static PyObject *py_lv_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } - void *data = mp_to_ptr(data_py); + long speed_val; + if (!PyArg_ParseTuple(py_args, "l", &speed_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed = (uint32_t)speed_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void *))lv_free)(data); + _res = ((uint32_t (*)(uint32_t))lv_anim_speed)(speed); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_free_def = { - "lv_free", - (PyCFunction)py_lv_free, +static PyMethodDef py_lv_anim_speed_def = { + "lv_anim_speed", + (PyCFunction)py_lv_anim_speed, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72148,31 +66456,32 @@ static PyMethodDef py_lv_free_def = { /* * lvgl extension definition for: - * void *lv_realloc(void *data_p, size_t new_size) + * uint32_t lv_anim_speed_clamped(uint32_t speed, uint32_t min_time, uint32_t max_time) */ -static PyObject *py_lv_realloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_speed_clamped(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *data_p_py; long new_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } - void *data_p = mp_to_ptr(data_p_py); - size_t new_size = (size_t)new_size_val; + long speed_val; long min_time_val; long max_time_val; + if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &min_time_val, &max_time_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed = (uint32_t)speed_val; + uint32_t min_time = (uint32_t)min_time_val; + uint32_t max_time = (uint32_t)max_time_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(void *, size_t))lv_realloc)(data_p, new_size); + _res = ((uint32_t (*)(uint32_t, uint32_t, uint32_t))lv_anim_speed_clamped)(speed, min_time, max_time); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_realloc_def = { - "lv_realloc", - (PyCFunction)py_lv_realloc, +static PyMethodDef py_lv_anim_speed_clamped_def = { + "lv_anim_speed_clamped", + (PyCFunction)py_lv_anim_speed_clamped, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72180,31 +66489,32 @@ static PyMethodDef py_lv_realloc_def = { /* * lvgl extension definition for: - * void *lv_reallocf(void *data_p, size_t new_size) + * uint32_t lv_anim_resolve_speed(uint32_t speed_or_time, int32_t start, int32_t end) */ -static PyObject *py_lv_reallocf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_resolve_speed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *data_p_py; long new_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } - void *data_p = mp_to_ptr(data_p_py); - size_t new_size = (size_t)new_size_val; + long speed_or_time_val; long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "lll", &speed_or_time_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed_or_time = (uint32_t)speed_or_time_val; + int32_t start = (int32_t)start_val; + int32_t end = (int32_t)end_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(void *, size_t))lv_reallocf)(data_p, new_size); + _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_resolve_speed)(speed_or_time, start, end); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_reallocf_def = { - "lv_reallocf", - (PyCFunction)py_lv_reallocf, +static PyMethodDef py_lv_anim_resolve_speed_def = { + "lv_anim_resolve_speed", + (PyCFunction)py_lv_anim_resolve_speed, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72212,30 +66522,32 @@ static PyMethodDef py_lv_reallocf_def = { /* * lvgl extension definition for: - * void *lv_malloc_core(size_t size) + * uint32_t lv_anim_speed_to_time(uint32_t speed, int32_t start, int32_t end) */ -static PyObject *py_lv_malloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_speed_to_time(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + long speed_val; long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "lll", &speed_val, &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t speed = (uint32_t)speed_val; + int32_t start = (int32_t)start_val; + int32_t end = (int32_t)end_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_malloc_core)(size); + _res = ((uint32_t (*)(uint32_t, int32_t, int32_t))lv_anim_speed_to_time)(speed, start, end); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_malloc_core_def = { - "lv_malloc_core", - (PyCFunction)py_lv_malloc_core, +static PyMethodDef py_lv_anim_speed_to_time_def = { + "lv_anim_speed_to_time", + (PyCFunction)py_lv_anim_speed_to_time, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72243,29 +66555,28 @@ static PyMethodDef py_lv_malloc_core_def = { /* * lvgl extension definition for: - * void lv_free_core(void *p) + * void lv_anim_refr_now(void) */ -static PyObject *py_lv_free_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } - void *p = mp_to_ptr(p_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void *))lv_free_core)(p); + ((void (*)(void))lv_anim_refr_now)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_free_core_def = { - "lv_free_core", - (PyCFunction)py_lv_free_core, +static PyMethodDef py_lv_anim_refr_now_def = { + "lv_anim_refr_now", + (PyCFunction)py_lv_anim_refr_now, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72273,31 +66584,29 @@ static PyMethodDef py_lv_free_core_def = { /* * lvgl extension definition for: - * void *lv_realloc_core(void *p, size_t new_size) + * lv_anim_timeline_t *lv_anim_timeline_create(void) */ -static PyObject *py_lv_realloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_timeline_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; long new_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } - void *p = mp_to_ptr(p_py); - size_t new_size = (size_t)new_size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_anim_timeline_t * _res; lvpy_lock(); - _res = ((void *(*)(void *, size_t))lv_realloc_core)(p, new_size); + _res = ((lv_anim_timeline_t *(*)(void))lv_anim_timeline_create)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_anim_timeline_t((void*)_res); } -static PyMethodDef py_lv_realloc_core_def = { - "lv_realloc_core", - (PyCFunction)py_lv_realloc_core, +static PyMethodDef py_lv_anim_timeline_create_def = { + "lv_anim_timeline_create", + (PyCFunction)py_lv_anim_timeline_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72305,29 +66614,30 @@ static PyMethodDef py_lv_realloc_core_def = { /* * lvgl extension definition for: - * lv_result_t lv_mem_test_core(void) + * int32_t lv_pct(int32_t x) */ -static PyObject *py_lv_mem_test_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pct(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(void))lv_mem_test_core)(); + _res = ((int32_t (*)(int32_t))lv_pct)(x); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_mem_test_core_def = { - "lv_mem_test_core", - (PyCFunction)py_lv_mem_test_core, +static PyMethodDef py_lv_pct_def = { + "lv_pct", + (PyCFunction)py_lv_pct, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72335,29 +66645,31 @@ static PyMethodDef py_lv_mem_test_core_def = { /* * lvgl extension definition for: - * lv_result_t lv_mem_test(void) + * int32_t lv_pct_to_px(int32_t v, int32_t base) */ -static PyObject *py_lv_mem_test(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pct_to_px(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long v_val; long base_val; + if (!PyArg_ParseTuple(py_args, "ll", &v_val, &base_val)) { PyGILState_Release(gstate); return NULL; } + int32_t v = (int32_t)v_val; + int32_t base = (int32_t)base_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(void))lv_mem_test)(); + _res = ((int32_t (*)(int32_t, int32_t))lv_pct_to_px)(v, base); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_mem_test_def = { - "lv_mem_test", - (PyCFunction)py_lv_mem_test, +static PyMethodDef py_lv_pct_to_px_def = { + "lv_pct_to_px", + (PyCFunction)py_lv_pct_to_px, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72365,30 +66677,29 @@ static PyMethodDef py_lv_mem_test_def = { /* * lvgl extension definition for: - * uint8_t lv_color_format_get_bpp(lv_color_format_t cf) + * uint32_t lv_event_register_id(void) */ -static PyObject *py_lv_color_format_get_bpp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_register_id(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + uint32_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_bpp)(cf); + _res = ((uint32_t (*)(void))lv_event_register_id)(); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_color_format_get_bpp_def = { - "lv_color_format_get_bpp", - (PyCFunction)py_lv_color_format_get_bpp, +static PyMethodDef py_lv_event_register_id_def = { + "lv_event_register_id", + (PyCFunction)py_lv_event_register_id, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72396,30 +66707,30 @@ static PyMethodDef py_lv_color_format_get_bpp_def = { /* * lvgl extension definition for: - * uint8_t lv_color_format_get_size(lv_color_format_t cf) + * const char *lv_event_code_get_name(lv_event_code_t code) */ -static PyObject *py_lv_color_format_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_code_get_name(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + PyObject *code_py; + if (!PyArg_ParseTuple(py_args, "O", &code_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_code_t code = (int)mp_obj_get_int(code_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + const char * _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_size)(cf); + _res = ((const char *(*)(lv_event_code_t))lv_event_code_get_name)(code); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_color_format_get_size_def = { - "lv_color_format_get_size", - (PyCFunction)py_lv_color_format_get_size, +static PyMethodDef py_lv_event_code_get_name_def = { + "lv_event_code_get_name", + (PyCFunction)py_lv_event_code_get_name, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72427,30 +66738,29 @@ static PyMethodDef py_lv_color_format_get_size_def = { /* * lvgl extension definition for: - * bool lv_color_format_has_alpha(lv_color_format_t src_cf) + * lv_group_t *lv_group_create(void) */ -static PyObject *py_lv_color_format_has_alpha(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *src_cf_py; - if (!PyArg_ParseTuple(py_args, "O", &src_cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t src_cf = (int)mp_obj_get_int(src_cf_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_group_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_color_format_t))lv_color_format_has_alpha)(src_cf); + _res = ((lv_group_t *(*)(void))lv_group_create)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_ptr_lv_group_t((void*)_res); } -static PyMethodDef py_lv_color_format_has_alpha_def = { - "lv_color_format_has_alpha", - (PyCFunction)py_lv_color_format_has_alpha, +static PyMethodDef py_lv_group_create_def = { + "lv_group_create", + (PyCFunction)py_lv_group_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72458,30 +66768,29 @@ static PyMethodDef py_lv_color_format_has_alpha_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_hex(uint32_t c) + * lv_group_t *lv_group_get_default(void) */ -static PyObject *py_lv_color_hex(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t c = (uint32_t)c_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_group_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint32_t))lv_color_hex)(c); + _res = ((lv_group_t *(*)(void))lv_group_get_default)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_group_t((void*)_res); } -static PyMethodDef py_lv_color_hex_def = { - "lv_color_hex", - (PyCFunction)py_lv_color_hex, +static PyMethodDef py_lv_group_get_default_def = { + "lv_group_get_default", + (PyCFunction)py_lv_group_get_default, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72489,32 +66798,30 @@ static PyMethodDef py_lv_color_hex_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_make(uint8_t r, uint8_t g, uint8_t b) + * void lv_group_swap_obj(lv_obj_t *obj1, lv_obj_t *obj2) */ -static PyObject *py_lv_color_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_swap_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long r_val; long g_val; long b_val; - if (!PyArg_ParseTuple(py_args, "lll", &r_val, &g_val, &b_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t r = (uint8_t)r_val; - uint8_t g = (uint8_t)g_val; - uint8_t b = (uint8_t)b_val; + PyObject *obj1_py; PyObject *obj2_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj1_py, &obj2_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj1 = mp_to_lv(obj1_py); + lv_obj_t *obj2 = mp_to_lv(obj2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint8_t, uint8_t, uint8_t))lv_color_make)(r, g, b); + ((void (*)(lv_obj_t *, lv_obj_t *))lv_group_swap_obj)(obj1, obj2); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_make_def = { - "lv_color_make", - (PyCFunction)py_lv_color_make, +static PyMethodDef py_lv_group_swap_obj_def = { + "lv_group_swap_obj", + (PyCFunction)py_lv_group_swap_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72522,33 +66829,29 @@ static PyMethodDef py_lv_color_make_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color32_make(uint8_t r, uint8_t g, uint8_t b, uint8_t a) + * void lv_group_remove_obj(lv_obj_t *obj) */ -static PyObject *py_lv_color32_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_remove_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long r_val; long g_val; long b_val; long a_val; - if (!PyArg_ParseTuple(py_args, "llll", &r_val, &g_val, &b_val, &a_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t r = (uint8_t)r_val; - uint8_t g = (uint8_t)g_val; - uint8_t b = (uint8_t)b_val; - uint8_t a = (uint8_t)a_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(uint8_t, uint8_t, uint8_t, uint8_t))lv_color32_make)(r, g, b, a); + ((void (*)(lv_obj_t *))lv_group_remove_obj)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color32_make_def = { - "lv_color32_make", - (PyCFunction)py_lv_color32_make, +static PyMethodDef py_lv_group_remove_obj_def = { + "lv_group_remove_obj", + (PyCFunction)py_lv_group_remove_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72556,30 +66859,29 @@ static PyMethodDef py_lv_color32_make_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_hex3(uint32_t c) + * void lv_group_focus_obj(lv_obj_t *obj) */ -static PyObject *py_lv_color_hex3(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_focus_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long c_val; - if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t c = (uint32_t)c_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint32_t))lv_color_hex3)(c); + ((void (*)(lv_obj_t *))lv_group_focus_obj)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_hex3_def = { - "lv_color_hex3", - (PyCFunction)py_lv_color_hex3, +static PyMethodDef py_lv_group_focus_obj_def = { + "lv_group_focus_obj", + (PyCFunction)py_lv_group_focus_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72587,32 +66889,29 @@ static PyMethodDef py_lv_color_hex3_def = { /* * lvgl extension definition for: - * uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix) + * uint32_t lv_group_get_count(void) */ -static PyObject *py_lv_color_16_16_mix(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_get_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long c1_val; long c2_val; long mix_val; - if (!PyArg_ParseTuple(py_args, "lll", &c1_val, &c2_val, &mix_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t c1 = (uint16_t)c1_val; - uint16_t c2 = (uint16_t)c2_val; - uint8_t mix = (uint8_t)mix_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + uint32_t _res; lvpy_lock(); - _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_color_16_16_mix)(c1, c2, mix); + _res = ((uint32_t (*)(void))lv_group_get_count)(); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_color_16_16_mix_def = { - "lv_color_16_16_mix", - (PyCFunction)py_lv_color_16_16_mix, +static PyMethodDef py_lv_group_get_count_def = { + "lv_group_get_count", + (PyCFunction)py_lv_group_get_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72620,200 +66919,147 @@ static PyMethodDef py_lv_color_16_16_mix_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) + * lv_group_t *lv_group_by_index(uint32_t index) */ -static PyObject *py_lv_color_hsv_to_rgb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_by_index(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long h_val; long s_val; long v_val; - if (!PyArg_ParseTuple(py_args, "lll", &h_val, &s_val, &v_val)) { PyGILState_Release(gstate); return NULL; } - uint16_t h = (uint16_t)h_val; - uint8_t s = (uint8_t)s_val; - uint8_t v = (uint8_t)v_val; + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_group_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(uint16_t, uint8_t, uint8_t))lv_color_hsv_to_rgb)(h, s, v); + _res = ((lv_group_t *(*)(uint32_t))lv_group_by_index)(index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_group_t((void*)_res); } -static PyMethodDef py_lv_color_hsv_to_rgb_def = { - "lv_color_hsv_to_rgb", - (PyCFunction)py_lv_color_hsv_to_rgb, +static PyMethodDef py_lv_group_by_index_def = { + "lv_group_by_index", + (PyCFunction)py_lv_group_by_index, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Struct lv_color_hsv_t (CPython) + * lvgl extension definition for: + * void lv_init(void) */ - -extern PyMethodDef py_lv_color_hsv_t_methods[]; - -static PyObject *py_lv_color_hsv_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "h") == 0) return mp_obj_new_int_from_uint(data->h); - if (strcmp(attr, "s") == 0) return mp_obj_new_int_from_uint(data->s); - if (strcmp(attr, "v") == 0) return mp_obj_new_int_from_uint(data->v); - for (PyMethodDef *m = py_lv_color_hsv_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_color_hsv_t_field_names[] = {"h", "s", "v", NULL}; - -static PyObject *py_lv_color_hsv_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_color_hsv_t_field_names, py_lv_color_hsv_t_methods); -} - -static PyMethodDef py_lv_color_hsv_t_type_methods[] = { - {"__dir__", py_lv_color_hsv_t_dir, METH_NOARGS, NULL}, - {NULL} -}; - -static int py_lv_color_hsv_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_color_hsv_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "h") == 0) { data->h = (uint16_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "s") == 0) { data->s = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "v") == 0) { data->v = (uint8_t)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_color_hsv_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_color_hsv_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +static PyObject *py_lv_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return make_new_lv_struct(type, args, kwds, sizeof(lv_color_hsv_t)); -} + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; -static void py_lv_color_hsv_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_init)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -PyTypeObject py_lv_color_hsv_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_color_hsv_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_color_hsv_t_dealloc, - .tp_getattro = (getter)py_lv_color_hsv_t_getattro, - .tp_setattro = (setter)py_lv_color_hsv_t_setattro, - .tp_new = py_lv_color_hsv_t_new, - .tp_methods = py_lv_color_hsv_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_color_hsv_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_color_hsv_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_color_hsv_t*)self->data; -} +static PyMethodDef py_lv_init_def = { + "lv_init", + (PyCFunction)py_lv_init, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static lv_color_hsv_t mp_write_scratch_lv_color_hsv_t; -static inline void* mp_write_value_ptr_lv_color_hsv_t(PyObject *value) +/* + * lvgl extension definition for: + * void lv_deinit(void) + */ +static PyObject *py_lv_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_hsv_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_color_hsv_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_hsv_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_color_hsv_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_color_hsv_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t or dict, got None"); - } - memset(&mp_write_scratch_lv_color_hsv_t, 0, sizeof(lv_color_hsv_t)); - return &mp_write_scratch_lv_color_hsv_t; + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(void))lv_deinit)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; } -#define mp_write_lv_color_hsv_t(struct_obj) (*((lv_color_hsv_t*)mp_write_value_ptr_lv_color_hsv_t(struct_obj))) +static PyMethodDef py_lv_deinit_def = { + "lv_deinit", + (PyCFunction)py_lv_deinit, + METH_VARARGS | METH_KEYWORDS, + NULL +}; -static inline PyObject *mp_read_ptr_lv_color_hsv_t(void *field) + +/* + * lvgl extension definition for: + * bool lv_is_initialized(void) + */ +static PyObject *py_lv_is_initialized(PyObject *self, PyObject *py_args, PyObject *py_kwds) { - return lv_to_mp_struct(&py_lv_color_hsv_t_type, field); + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; + (void)py_kwds; + + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + bool _res; + lvpy_lock(); + _res = ((bool (*)(void))lv_is_initialized)(); + lvpy_unlock(); + + PyGILState_Release(gstate); + return convert_to_bool(_res); } -#define mp_read_lv_color_hsv_t(field) lv_to_mp_struct_own(&py_lv_color_hsv_t_type, copy_buffer(&field, sizeof(lv_color_hsv_t))) -#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) +static PyMethodDef py_lv_is_initialized_def = { + "lv_is_initialized", + (PyCFunction)py_lv_is_initialized, + METH_VARARGS | METH_KEYWORDS, + NULL +}; /* * lvgl extension definition for: - * lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8) + * void lv_mem_init(void) */ -static PyObject *py_lv_color_rgb_to_hsv(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long r8_val; long g8_val; long b8_val; - if (!PyArg_ParseTuple(py_args, "lll", &r8_val, &g8_val, &b8_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t r8 = (uint8_t)r8_val; - uint8_t g8 = (uint8_t)g8_val; - uint8_t b8 = (uint8_t)b8_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_hsv_t _res; lvpy_lock(); - _res = ((lv_color_hsv_t (*)(uint8_t, uint8_t, uint8_t))lv_color_rgb_to_hsv)(r8, g8, b8); + ((void (*)(void))lv_mem_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_hsv_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_rgb_to_hsv_def = { - "lv_color_rgb_to_hsv", - (PyCFunction)py_lv_color_rgb_to_hsv, +static PyMethodDef py_lv_mem_init_def = { + "lv_mem_init", + (PyCFunction)py_lv_mem_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72821,9 +67067,9 @@ static PyMethodDef py_lv_color_rgb_to_hsv_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_white(void) + * void lv_mem_deinit(void) */ -static PyObject *py_lv_color_white(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -72832,18 +67078,17 @@ static PyObject *py_lv_color_white(PyObject *self, PyObject *py_args, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(void))lv_color_white)(); + ((void (*)(void))lv_mem_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_white_def = { - "lv_color_white", - (PyCFunction)py_lv_color_white, +static PyMethodDef py_lv_mem_deinit_def = { + "lv_mem_deinit", + (PyCFunction)py_lv_mem_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72851,29 +67096,31 @@ static PyMethodDef py_lv_color_white_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_black(void) + * lv_mem_pool_t lv_mem_add_pool(void *mem, size_t bytes) */ -static PyObject *py_lv_color_black(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_add_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *mem_py; long bytes_val; + if (!PyArg_ParseTuple(py_args, "Ol", &mem_py, &bytes_val)) { PyGILState_Release(gstate); return NULL; } + void *mem = mp_to_ptr(mem_py); + size_t bytes = (size_t)bytes_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_mem_pool_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(void))lv_color_black)(); + _res = ((lv_mem_pool_t (*)(void *, size_t))lv_mem_add_pool)(mem, bytes); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return ptr_to_mp(_res); } -static PyMethodDef py_lv_color_black_def = { - "lv_color_black", - (PyCFunction)py_lv_color_black, +static PyMethodDef py_lv_mem_add_pool_def = { + "lv_mem_add_pool", + (PyCFunction)py_lv_mem_add_pool, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72881,30 +67128,29 @@ static PyMethodDef py_lv_color_black_def = { /* * lvgl extension definition for: - * uint8_t lv_color24_luminance(const uint8_t *c) + * void lv_mem_remove_pool(lv_mem_pool_t pool) */ -static PyObject *py_lv_color24_luminance(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_remove_pool(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *c_py; - if (!PyArg_ParseTuple(py_args, "O", &c_py)) { PyGILState_Release(gstate); return NULL; } - const uint8_t *c = (const uint8_t *)mp_array_to_u8ptr(c_py); + PyObject *pool_py; + if (!PyArg_ParseTuple(py_args, "O", &pool_py)) { PyGILState_Release(gstate); return NULL; } + lv_mem_pool_t pool = mp_to_ptr(pool_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(const uint8_t *))lv_color24_luminance)(c); + ((void (*)(lv_mem_pool_t))lv_mem_remove_pool)(pool); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color24_luminance_def = { - "lv_color24_luminance", - (PyCFunction)py_lv_color24_luminance, +static PyMethodDef py_lv_mem_remove_pool_def = { + "lv_mem_remove_pool", + (PyCFunction)py_lv_mem_remove_pool, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72912,30 +67158,30 @@ static PyMethodDef py_lv_color24_luminance_def = { /* * lvgl extension definition for: - * lv_color_t lv_palette_main(lv_palette_t p) + * void *lv_malloc(size_t size) */ -static PyObject *py_lv_palette_main(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_malloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } - lv_palette_t p = (int)mp_obj_get_int(p_py); + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + void * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_palette_t))lv_palette_main)(p); + _res = ((void *(*)(size_t))lv_malloc)(size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_palette_main_def = { - "lv_palette_main", - (PyCFunction)py_lv_palette_main, +static PyMethodDef py_lv_malloc_def = { + "lv_malloc", + (PyCFunction)py_lv_malloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72943,31 +67189,31 @@ static PyMethodDef py_lv_palette_main_def = { /* * lvgl extension definition for: - * lv_color_t lv_palette_lighten(lv_palette_t p, uint8_t lvl) + * void *lv_calloc(size_t num, size_t size) */ -static PyObject *py_lv_palette_lighten(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_calloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; long lvl_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_palette_t p = (int)mp_obj_get_int(p_py); - uint8_t lvl = (uint8_t)lvl_val; + long num_val; long size_val; + if (!PyArg_ParseTuple(py_args, "ll", &num_val, &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t num = (size_t)num_val; + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + void * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_lighten)(p, lvl); + _res = ((void *(*)(size_t, size_t))lv_calloc)(num, size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_palette_lighten_def = { - "lv_palette_lighten", - (PyCFunction)py_lv_palette_lighten, +static PyMethodDef py_lv_calloc_def = { + "lv_calloc", + (PyCFunction)py_lv_calloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -72975,31 +67221,30 @@ static PyMethodDef py_lv_palette_lighten_def = { /* * lvgl extension definition for: - * lv_color_t lv_palette_darken(lv_palette_t p, uint8_t lvl) + * void *lv_zalloc(size_t size) */ -static PyObject *py_lv_palette_darken(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_zalloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; long lvl_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_palette_t p = (int)mp_obj_get_int(p_py); - uint8_t lvl = (uint8_t)lvl_val; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + void * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_darken)(p, lvl); + _res = ((void *(*)(size_t))lv_zalloc)(size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_palette_darken_def = { - "lv_palette_darken", - (PyCFunction)py_lv_palette_darken, +static PyMethodDef py_lv_zalloc_def = { + "lv_zalloc", + (PyCFunction)py_lv_zalloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73007,32 +67252,30 @@ static PyMethodDef py_lv_palette_darken_def = { /* * lvgl extension definition for: - * void *lv_memcpy(void *dst, const void *src, size_t len) + * void *lv_malloc_zeroed(size_t size) */ -static PyObject *py_lv_memcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_malloc_zeroed(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - const void *src = (const void *)mp_to_ptr(src_py); - size_t len = (size_t)len_val; + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } void * _res; lvpy_lock(); - _res = ((void *(*)(void *, const void *, size_t))lv_memcpy)(dst, src, len); + _res = ((void *(*)(size_t))lv_malloc_zeroed)(size); lvpy_unlock(); PyGILState_Release(gstate); return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_memcpy_def = { - "lv_memcpy", - (PyCFunction)py_lv_memcpy, +static PyMethodDef py_lv_malloc_zeroed_def = { + "lv_malloc_zeroed", + (PyCFunction)py_lv_malloc_zeroed, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73040,31 +67283,29 @@ static PyMethodDef py_lv_memcpy_def = { /* * lvgl extension definition for: - * void lv_memset(void *dst, uint8_t v, size_t len) + * void lv_free(void *data) */ -static PyObject *py_lv_memset(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; long v_val; long len_val; - if (!PyArg_ParseTuple(py_args, "Oll", &dst_py, &v_val, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - uint8_t v = (uint8_t)v_val; - size_t len = (size_t)len_val; + PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "O", &data_py)) { PyGILState_Release(gstate); return NULL; } + void *data = mp_to_ptr(data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void *, uint8_t, size_t))lv_memset)(dst, v, len); + ((void (*)(void *))lv_free)(data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_memset_def = { - "lv_memset", - (PyCFunction)py_lv_memset, +static PyMethodDef py_lv_free_def = { + "lv_free", + (PyCFunction)py_lv_free, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73072,32 +67313,31 @@ static PyMethodDef py_lv_memset_def = { /* * lvgl extension definition for: - * void *lv_memmove(void *dst, const void *src, size_t len) + * void *lv_realloc(void *data_p, size_t new_size) */ -static PyObject *py_lv_memmove(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_realloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - void *dst = mp_to_ptr(dst_py); - const void *src = (const void *)mp_to_ptr(src_py); - size_t len = (size_t)len_val; + PyObject *data_p_py; long new_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } + void *data_p = mp_to_ptr(data_p_py); + size_t new_size = (size_t)new_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } void * _res; lvpy_lock(); - _res = ((void *(*)(void *, const void *, size_t))lv_memmove)(dst, src, len); + _res = ((void *(*)(void *, size_t))lv_realloc)(data_p, new_size); lvpy_unlock(); PyGILState_Release(gstate); return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_memmove_def = { - "lv_memmove", - (PyCFunction)py_lv_memmove, +static PyMethodDef py_lv_realloc_def = { + "lv_realloc", + (PyCFunction)py_lv_realloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73105,32 +67345,31 @@ static PyMethodDef py_lv_memmove_def = { /* * lvgl extension definition for: - * int lv_memcmp(const void *p1, const void *p2, size_t len) + * void *lv_reallocf(void *data_p, size_t new_size) */ -static PyObject *py_lv_memcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_reallocf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p1_py; PyObject *p2_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &p1_py, &p2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - const void *p1 = (const void *)mp_to_ptr(p1_py); - const void *p2 = (const void *)mp_to_ptr(p2_py); - size_t len = (size_t)len_val; + PyObject *data_p_py; long new_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &data_p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } + void *data_p = mp_to_ptr(data_p_py); + size_t new_size = (size_t)new_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + void * _res; lvpy_lock(); - _res = ((int (*)(const void *, const void *, size_t))lv_memcmp)(p1, p2, len); + _res = ((void *(*)(void *, size_t))lv_reallocf)(data_p, new_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_memcmp_def = { - "lv_memcmp", - (PyCFunction)py_lv_memcmp, +static PyMethodDef py_lv_reallocf_def = { + "lv_reallocf", + (PyCFunction)py_lv_reallocf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73138,30 +67377,30 @@ static PyMethodDef py_lv_memcmp_def = { /* * lvgl extension definition for: - * size_t lv_strlen(const char *str) + * void *lv_malloc_core(size_t size) */ -static PyObject *py_lv_strlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_malloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *str_py; - if (!PyArg_ParseTuple(py_args, "O", &str_py)) { PyGILState_Release(gstate); return NULL; } - const char *str = (const char *)(char*)convert_from_str(str_py); + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; + void * _res; lvpy_lock(); - _res = ((size_t (*)(const char *))lv_strlen)(str); + _res = ((void *(*)(size_t))lv_malloc_core)(size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_strlen_def = { - "lv_strlen", - (PyCFunction)py_lv_strlen, +static PyMethodDef py_lv_malloc_core_def = { + "lv_malloc_core", + (PyCFunction)py_lv_malloc_core, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73169,31 +67408,29 @@ static PyMethodDef py_lv_strlen_def = { /* * lvgl extension definition for: - * size_t lv_strnlen(const char *str, size_t max_len) + * void lv_free_core(void *p) */ -static PyObject *py_lv_strnlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_free_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *str_py; long max_len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } - const char *str = (const char *)(char*)convert_from_str(str_py); - size_t max_len = (size_t)max_len_val; + PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } + void *p = mp_to_ptr(p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; lvpy_lock(); - _res = ((size_t (*)(const char *, size_t))lv_strnlen)(str, max_len); + ((void (*)(void *))lv_free_core)(p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_strnlen_def = { - "lv_strnlen", - (PyCFunction)py_lv_strnlen, +static PyMethodDef py_lv_free_core_def = { + "lv_free_core", + (PyCFunction)py_lv_free_core, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73201,32 +67438,31 @@ static PyMethodDef py_lv_strnlen_def = { /* * lvgl extension definition for: - * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) + * void *lv_realloc_core(void *p, size_t new_size) */ -static PyObject *py_lv_strlcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_realloc_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long dst_size_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dst_size_val)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t dst_size = (size_t)dst_size_val; + PyObject *p_py; long new_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &new_size_val)) { PyGILState_Release(gstate); return NULL; } + void *p = mp_to_ptr(p_py); + size_t new_size = (size_t)new_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - size_t _res; + void * _res; lvpy_lock(); - _res = ((size_t (*)(char *, const char *, size_t))lv_strlcpy)(dst, src, dst_size); + _res = ((void *(*)(void *, size_t))lv_realloc_core)(p, new_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_strlcpy_def = { - "lv_strlcpy", - (PyCFunction)py_lv_strlcpy, +static PyMethodDef py_lv_realloc_core_def = { + "lv_realloc_core", + (PyCFunction)py_lv_realloc_core, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73234,32 +67470,29 @@ static PyMethodDef py_lv_strlcpy_def = { /* * lvgl extension definition for: - * char *lv_strncpy(char *dst, const char *src, size_t dest_size) + * lv_result_t lv_mem_test_core(void) */ -static PyObject *py_lv_strncpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_test_core(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long dest_size_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dest_size_val)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t dest_size = (size_t)dest_size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_result_t _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *, size_t))lv_strncpy)(dst, src, dest_size); + _res = ((lv_result_t (*)(void))lv_mem_test_core)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_strncpy_def = { - "lv_strncpy", - (PyCFunction)py_lv_strncpy, +static PyMethodDef py_lv_mem_test_core_def = { + "lv_mem_test_core", + (PyCFunction)py_lv_mem_test_core, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73267,31 +67500,29 @@ static PyMethodDef py_lv_strncpy_def = { /* * lvgl extension definition for: - * char *lv_strcpy(char *dst, const char *src) + * lv_result_t lv_mem_test(void) */ -static PyObject *py_lv_strcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_mem_test(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_result_t _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *))lv_strcpy)(dst, src); + _res = ((lv_result_t (*)(void))lv_mem_test)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_strcpy_def = { - "lv_strcpy", - (PyCFunction)py_lv_strcpy, +static PyMethodDef py_lv_mem_test_def = { + "lv_mem_test", + (PyCFunction)py_lv_mem_test, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73299,31 +67530,30 @@ static PyMethodDef py_lv_strcpy_def = { /* * lvgl extension definition for: - * int lv_strcmp(const char *s1, const char *s2) + * uint8_t lv_color_format_get_bpp(lv_color_format_t cf) */ -static PyObject *py_lv_strcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_format_get_bpp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *s1_py; PyObject *s2_py; - if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } - const char *s1 = (const char *)(char*)convert_from_str(s1_py); - const char *s2 = (const char *)(char*)convert_from_str(s2_py); + PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + uint8_t _res; lvpy_lock(); - _res = ((int (*)(const char *, const char *))lv_strcmp)(s1, s2); + _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_bpp)(cf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_strcmp_def = { - "lv_strcmp", - (PyCFunction)py_lv_strcmp, +static PyMethodDef py_lv_color_format_get_bpp_def = { + "lv_color_format_get_bpp", + (PyCFunction)py_lv_color_format_get_bpp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73331,32 +67561,30 @@ static PyMethodDef py_lv_strcmp_def = { /* * lvgl extension definition for: - * int lv_strncmp(const char *s1, const char *s2, size_t len) + * uint8_t lv_color_format_get_size(lv_color_format_t cf) */ -static PyObject *py_lv_strncmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_format_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *s1_py; PyObject *s2_py; long len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &s1_py, &s2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } - const char *s1 = (const char *)(char*)convert_from_str(s1_py); - const char *s2 = (const char *)(char*)convert_from_str(s2_py); - size_t len = (size_t)len_val; + PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "O", &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + uint8_t _res; lvpy_lock(); - _res = ((int (*)(const char *, const char *, size_t))lv_strncmp)(s1, s2, len); + _res = ((uint8_t (*)(lv_color_format_t))lv_color_format_get_size)(cf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_strncmp_def = { - "lv_strncmp", - (PyCFunction)py_lv_strncmp, +static PyMethodDef py_lv_color_format_get_size_def = { + "lv_color_format_get_size", + (PyCFunction)py_lv_color_format_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73364,30 +67592,30 @@ static PyMethodDef py_lv_strncmp_def = { /* * lvgl extension definition for: - * char *lv_strdup(const char *src) + * bool lv_color_format_has_alpha(lv_color_format_t src_cf) */ -static PyObject *py_lv_strdup(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_format_has_alpha(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - const char *src = (const char *)(char*)convert_from_str(src_py); + PyObject *src_cf_py; + if (!PyArg_ParseTuple(py_args, "O", &src_cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t src_cf = (int)mp_obj_get_int(src_cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + bool _res; lvpy_lock(); - _res = ((char *(*)(const char *))lv_strdup)(src); + _res = ((bool (*)(lv_color_format_t))lv_color_format_has_alpha)(src_cf); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_strdup_def = { - "lv_strdup", - (PyCFunction)py_lv_strdup, +static PyMethodDef py_lv_color_format_has_alpha_def = { + "lv_color_format_has_alpha", + (PyCFunction)py_lv_color_format_has_alpha, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73395,31 +67623,30 @@ static PyMethodDef py_lv_strdup_def = { /* * lvgl extension definition for: - * char *lv_strndup(const char *src, size_t max_len) + * lv_color_t lv_color_hex(uint32_t c) */ -static PyObject *py_lv_strndup(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_hex(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *src_py; long max_len_val; - if (!PyArg_ParseTuple(py_args, "Ol", &src_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t max_len = (size_t)max_len_val; + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t c = (uint32_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_color_t _res; lvpy_lock(); - _res = ((char *(*)(const char *, size_t))lv_strndup)(src, max_len); + _res = ((lv_color_t (*)(uint32_t))lv_color_hex)(c); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_strndup_def = { - "lv_strndup", - (PyCFunction)py_lv_strndup, +static PyMethodDef py_lv_color_hex_def = { + "lv_color_hex", + (PyCFunction)py_lv_color_hex, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73427,31 +67654,32 @@ static PyMethodDef py_lv_strndup_def = { /* * lvgl extension definition for: - * char *lv_strcat(char *dst, const char *src) + * lv_color_t lv_color_make(uint8_t r, uint8_t g, uint8_t b) */ -static PyObject *py_lv_strcat(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); + long r_val; long g_val; long b_val; + if (!PyArg_ParseTuple(py_args, "lll", &r_val, &g_val, &b_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t r = (uint8_t)r_val; + uint8_t g = (uint8_t)g_val; + uint8_t b = (uint8_t)b_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_color_t _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *))lv_strcat)(dst, src); + _res = ((lv_color_t (*)(uint8_t, uint8_t, uint8_t))lv_color_make)(r, g, b); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_strcat_def = { - "lv_strcat", - (PyCFunction)py_lv_strcat, +static PyMethodDef py_lv_color_make_def = { + "lv_color_make", + (PyCFunction)py_lv_color_make, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73459,32 +67687,33 @@ static PyMethodDef py_lv_strcat_def = { /* * lvgl extension definition for: - * char *lv_strncat(char *dst, const char *src, size_t src_len) + * lv_color32_t lv_color32_make(uint8_t r, uint8_t g, uint8_t b, uint8_t a) */ -static PyObject *py_lv_strncat(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_make(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dst_py; PyObject *src_py; long src_len_val; - if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &src_len_val)) { PyGILState_Release(gstate); return NULL; } - char *dst = (char*)convert_from_str(dst_py); - const char *src = (const char *)(char*)convert_from_str(src_py); - size_t src_len = (size_t)src_len_val; + long r_val; long g_val; long b_val; long a_val; + if (!PyArg_ParseTuple(py_args, "llll", &r_val, &g_val, &b_val, &a_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t r = (uint8_t)r_val; + uint8_t g = (uint8_t)g_val; + uint8_t b = (uint8_t)b_val; + uint8_t a = (uint8_t)a_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((char *(*)(char *, const char *, size_t))lv_strncat)(dst, src, src_len); + _res = ((lv_color32_t (*)(uint8_t, uint8_t, uint8_t, uint8_t))lv_color32_make)(r, g, b, a); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_strncat_def = { - "lv_strncat", - (PyCFunction)py_lv_strncat, +static PyMethodDef py_lv_color32_make_def = { + "lv_color32_make", + (PyCFunction)py_lv_color32_make, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73492,31 +67721,30 @@ static PyMethodDef py_lv_strncat_def = { /* * lvgl extension definition for: - * char *lv_strchr(const char *str, int c) + * lv_color_t lv_color_hex3(uint32_t c) */ -static PyObject *py_lv_strchr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_hex3(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *str_py; long c_val; - if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &c_val)) { PyGILState_Release(gstate); return NULL; } - const char *str = (const char *)(char*)convert_from_str(str_py); - int c = (int)c_val; + long c_val; + if (!PyArg_ParseTuple(py_args, "l", &c_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t c = (uint32_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_color_t _res; lvpy_lock(); - _res = ((char *(*)(const char *, int))lv_strchr)(str, c); + _res = ((lv_color_t (*)(uint32_t))lv_color_hex3)(c); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_strchr_def = { - "lv_strchr", - (PyCFunction)py_lv_strchr, +static PyMethodDef py_lv_color_hex3_def = { + "lv_color_hex3", + (PyCFunction)py_lv_color_hex3, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73524,29 +67752,32 @@ static PyMethodDef py_lv_strchr_def = { /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) + * uint16_t lv_color_16_16_mix(uint16_t c1, uint16_t c2, uint8_t mix) */ -static PyObject *py_lv_draw_buf_get_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_16_16_mix(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long c1_val; long c2_val; long mix_val; + if (!PyArg_ParseTuple(py_args, "lll", &c1_val, &c2_val, &mix_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t c1 = (uint16_t)c1_val; + uint16_t c2 = (uint16_t)c2_val; + uint8_t mix = (uint8_t)mix_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t * _res; + uint16_t _res; lvpy_lock(); - _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_handlers)(); + _res = ((uint16_t (*)(uint16_t, uint16_t, uint8_t))lv_color_16_16_mix)(c1, c2, mix); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_buf_get_handlers_def = { - "lv_draw_buf_get_handlers", - (PyCFunction)py_lv_draw_buf_get_handlers, +static PyMethodDef py_lv_color_16_16_mix_def = { + "lv_color_16_16_mix", + (PyCFunction)py_lv_color_16_16_mix, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73554,59 +67785,200 @@ static PyMethodDef py_lv_draw_buf_get_handlers_def = { /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_font_handlers(void) + * lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v) */ -static PyObject *py_lv_draw_buf_get_font_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_hsv_to_rgb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long h_val; long s_val; long v_val; + if (!PyArg_ParseTuple(py_args, "lll", &h_val, &s_val, &v_val)) { PyGILState_Release(gstate); return NULL; } + uint16_t h = (uint16_t)h_val; + uint8_t s = (uint8_t)s_val; + uint8_t v = (uint8_t)v_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t * _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_font_handlers)(); + _res = ((lv_color_t (*)(uint16_t, uint8_t, uint8_t))lv_color_hsv_to_rgb)(h, s, v); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_draw_buf_get_font_handlers_def = { - "lv_draw_buf_get_font_handlers", - (PyCFunction)py_lv_draw_buf_get_font_handlers, +static PyMethodDef py_lv_color_hsv_to_rgb_def = { + "lv_color_hsv_to_rgb", + (PyCFunction)py_lv_color_hsv_to_rgb, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Struct lv_color_hsv_t (CPython) + */ + +extern PyMethodDef py_lv_color_hsv_t_methods[]; + +static PyObject *py_lv_color_hsv_t_getattro(PyObject *self, PyObject *name) +{ + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "h") == 0) return mp_obj_new_int_from_uint(data->h); + if (strcmp(attr, "s") == 0) return mp_obj_new_int_from_uint(data->s); + if (strcmp(attr, "v") == 0) return mp_obj_new_int_from_uint(data->v); + for (PyMethodDef *m = py_lv_color_hsv_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); +} + +static const char *const py_lv_color_hsv_t_field_names[] = {"h", "s", "v", NULL}; + +static PyObject *py_lv_color_hsv_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_color_hsv_t_field_names, py_lv_color_hsv_t_methods); +} + +static PyMethodDef py_lv_color_hsv_t_type_methods[] = { + {"__dir__", py_lv_color_hsv_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_color_hsv_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_color_hsv_t *data = (lv_color_hsv_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_color_hsv_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "h") == 0) { data->h = (uint16_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "s") == 0) { data->s = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "v") == 0) { data->v = (uint8_t)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_color_hsv_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_color_hsv_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_color_hsv_t)); +} + +static void py_lv_color_hsv_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_color_hsv_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_color_hsv_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_color_hsv_t_dealloc, + .tp_getattro = (getter)py_lv_color_hsv_t_getattro, + .tp_setattro = (setter)py_lv_color_hsv_t_setattro, + .tp_new = py_lv_color_hsv_t_new, + .tp_methods = py_lv_color_hsv_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, +}; + +static inline void* mp_write_ptr_lv_color_hsv_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_color_hsv_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_color_hsv_t*)self->data; +} + +static lv_color_hsv_t mp_write_scratch_lv_color_hsv_t; + +static inline void* mp_write_value_ptr_lv_color_hsv_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_color_hsv_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_color_hsv_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_color_hsv_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_color_hsv_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_color_hsv_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_color_hsv_t or dict, got None"); + } + memset(&mp_write_scratch_lv_color_hsv_t, 0, sizeof(lv_color_hsv_t)); + return &mp_write_scratch_lv_color_hsv_t; +} + +#define mp_write_lv_color_hsv_t(struct_obj) (*((lv_color_hsv_t*)mp_write_value_ptr_lv_color_hsv_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_color_hsv_t(void *field) +{ + return lv_to_mp_struct(&py_lv_color_hsv_t_type, field); +} + +#define mp_read_lv_color_hsv_t(field) lv_to_mp_struct_own(&py_lv_color_hsv_t_type, copy_buffer(&field, sizeof(lv_color_hsv_t))) +#define mp_read_byref_lv_color_hsv_t(field) mp_read_ptr_lv_color_hsv_t(&field) + + /* * lvgl extension definition for: - * lv_draw_buf_handlers_t *lv_draw_buf_get_image_handlers(void) + * lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r8, uint8_t g8, uint8_t b8) */ -static PyObject *py_lv_draw_buf_get_image_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_rgb_to_hsv(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long r8_val; long g8_val; long b8_val; + if (!PyArg_ParseTuple(py_args, "lll", &r8_val, &g8_val, &b8_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t r8 = (uint8_t)r8_val; + uint8_t g8 = (uint8_t)g8_val; + uint8_t b8 = (uint8_t)b8_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t * _res; + lv_color_hsv_t _res; lvpy_lock(); - _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_image_handlers)(); + _res = ((lv_color_hsv_t (*)(uint8_t, uint8_t, uint8_t))lv_color_rgb_to_hsv)(r8, g8, b8); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); + return mp_read_lv_color_hsv_t(_res); } -static PyMethodDef py_lv_draw_buf_get_image_handlers_def = { - "lv_draw_buf_get_image_handlers", - (PyCFunction)py_lv_draw_buf_get_image_handlers, +static PyMethodDef py_lv_color_rgb_to_hsv_def = { + "lv_color_rgb_to_hsv", + (PyCFunction)py_lv_color_rgb_to_hsv, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73614,31 +67986,29 @@ static PyMethodDef py_lv_draw_buf_get_image_handlers_def = { /* * lvgl extension definition for: - * void *lv_draw_buf_align(void *buf, lv_color_format_t color_format) + * lv_color_t lv_color_white(void) */ -static PyObject *py_lv_draw_buf_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_white(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_color_t _res; lvpy_lock(); - _res = ((void *(*)(void *, lv_color_format_t))lv_draw_buf_align)(buf, color_format); + _res = ((lv_color_t (*)(void))lv_color_white)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_draw_buf_align_def = { - "lv_draw_buf_align", - (PyCFunction)py_lv_draw_buf_align, +static PyMethodDef py_lv_color_white_def = { + "lv_color_white", + (PyCFunction)py_lv_color_white, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73646,31 +68016,29 @@ static PyMethodDef py_lv_draw_buf_align_def = { /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format) + * lv_color_t lv_color_black(void) */ -static PyObject *py_lv_draw_buf_width_to_stride(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_black(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long w_val; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - uint32_t w = (uint32_t)w_val; - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride)(w, color_format); + _res = ((lv_color_t (*)(void))lv_color_black)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_draw_buf_width_to_stride_def = { - "lv_draw_buf_width_to_stride", - (PyCFunction)py_lv_draw_buf_width_to_stride, +static PyMethodDef py_lv_color_black_def = { + "lv_color_black", + (PyCFunction)py_lv_color_black, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73678,33 +68046,30 @@ static PyMethodDef py_lv_draw_buf_width_to_stride_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * uint8_t lv_color24_luminance(const uint8_t *c) */ -static PyObject *py_lv_draw_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color24_luminance(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long w_val; long h_val; PyObject *cf_py; long stride_val; - if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t stride = (uint32_t)stride_val; + PyObject *c_py; + if (!PyArg_ParseTuple(py_args, "O", &c_py)) { PyGILState_Release(gstate); return NULL; } + const uint8_t *c = (const uint8_t *)mp_array_to_u8ptr(c_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + uint8_t _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create)(w, h, cf, stride); + _res = ((uint8_t (*)(const uint8_t *))lv_color24_luminance)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_buf_create_def = { - "lv_draw_buf_create", - (PyCFunction)py_lv_draw_buf_create, +static PyMethodDef py_lv_color24_luminance_def = { + "lv_color24_luminance", + (PyCFunction)py_lv_color24_luminance, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73712,29 +68077,30 @@ static PyMethodDef py_lv_draw_buf_create_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_font_get_default(void) + * lv_color_t lv_palette_main(lv_palette_t p) */ -static PyObject *py_lv_font_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_palette_main(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } + lv_palette_t p = (int)mp_obj_get_int(p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; + lv_color_t _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(void))lv_font_get_default)(); + _res = ((lv_color_t (*)(lv_palette_t))lv_palette_main)(p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_font_get_default_def = { - "lv_font_get_default", - (PyCFunction)py_lv_font_get_default, +static PyMethodDef py_lv_palette_main_def = { + "lv_palette_main", + (PyCFunction)py_lv_palette_main, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73742,35 +68108,31 @@ static PyMethodDef py_lv_font_get_default_def = { /* * lvgl extension definition for: - * void lv_text_get_size(lv_point_t *size_res, const char *text, const lv_font_t *font, int32_t letter_space, int32_t line_space, int32_t max_width, lv_text_flag_t flag) + * lv_color_t lv_palette_lighten(lv_palette_t p, uint8_t lvl) */ -static PyObject *py_lv_text_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_palette_lighten(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *size_res_py; PyObject *text_py; PyObject *font_py; long letter_space_val; long line_space_val; long max_width_val; PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "OOOlllO", &size_res_py, &text_py, &font_py, &letter_space_val, &line_space_val, &max_width_val, &flag_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); - const char *text = (const char *)(char*)convert_from_str(text_py); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - int32_t letter_space = (int32_t)letter_space_val; - int32_t line_space = (int32_t)line_space_val; - int32_t max_width = (int32_t)max_width_val; - lv_text_flag_t flag = (int)mp_obj_get_int(flag_py); + PyObject *p_py; long lvl_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_palette_t p = (int)mp_obj_get_int(p_py); + uint8_t lvl = (uint8_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_point_t *, const char *, const lv_font_t *, int32_t, int32_t, int32_t, lv_text_flag_t))lv_text_get_size)(size_res, text, font, letter_space, line_space, max_width, flag); + _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_lighten)(p, lvl); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_text_get_size_def = { - "lv_text_get_size", - (PyCFunction)py_lv_text_get_size, +static PyMethodDef py_lv_palette_lighten_def = { + "lv_palette_lighten", + (PyCFunction)py_lv_palette_lighten, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73778,96 +68140,64 @@ static PyMethodDef py_lv_text_get_size_def = { /* * lvgl extension definition for: - * void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) + * lv_color_t lv_palette_darken(lv_palette_t p, uint8_t lvl) */ -static PyObject *py_lv_bidi_calculate_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_palette_darken(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *align_py; PyObject *base_dir_py; PyObject *txt_py; - if (!PyArg_ParseTuple(py_args, "OOO", &align_py, &base_dir_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } - lv_text_align_t *align = mp_array_to_i32ptr(align_py); - lv_base_dir_t *base_dir = mp_array_to_i32ptr(base_dir_py); - const char *txt = (const char *)(char*)convert_from_str(txt_py); + PyObject *p_py; long lvl_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_py, &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_palette_t p = (int)mp_obj_get_int(p_py); + uint8_t lvl = (uint8_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_bidi_calculate_align)(align, base_dir, txt); + _res = ((lv_color_t (*)(lv_palette_t, uint8_t))lv_palette_darken)(p, lvl); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_bidi_calculate_align_def = { - "lv_bidi_calculate_align", - (PyCFunction)py_lv_bidi_calculate_align, +static PyMethodDef py_lv_palette_darken_def = { + "lv_palette_darken", + (PyCFunction)py_lv_palette_darken, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_layout_register_cb (CPython) - * void lv_layout_update_cb_t(lv_obj_t *, void *user_data) - */ -static void lv_layout_register_cb_callback(lv_obj_t *arg0, void *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg1); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_layout_register_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = lv_to_mp((void*)arg0); - PyObject *py_arg1 = ptr_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * uint32_t lv_layout_register(lv_layout_update_cb_t cb, void *user_data) + * void *lv_memcpy(void *dst, const void *src, size_t len) */ -static PyObject *py_lv_layout_register(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - void *cb = mp_lv_callback(cb_py, &lv_layout_register_cb_callback, "lv_layout_register_cb", &user_data, NULL, (NULL), (NULL)); + PyObject *dst_py; PyObject *src_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + const void *src = (const void *)mp_to_ptr(src_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + void * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_layout_update_cb_t, void *))lv_layout_register)(cb, user_data); + _res = ((void *(*)(void *, const void *, size_t))lv_memcpy)(dst, src, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_layout_register_def = { - "lv_layout_register", - (PyCFunction)py_lv_layout_register, +static PyMethodDef py_lv_memcpy_def = { + "lv_memcpy", + (PyCFunction)py_lv_memcpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73875,28 +68205,31 @@ static PyMethodDef py_lv_layout_register_def = { /* * lvgl extension definition for: - * void lv_flex_init(void) + * void lv_memset(void *dst, uint8_t v, size_t len) */ -static PyObject *py_lv_flex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memset(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dst_py; long v_val; long len_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dst_py, &v_val, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + uint8_t v = (uint8_t)v_val; + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_flex_init)(); + ((void (*)(void *, uint8_t, size_t))lv_memset)(dst, v, len); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_flex_init_def = { - "lv_flex_init", - (PyCFunction)py_lv_flex_init, +static PyMethodDef py_lv_memset_def = { + "lv_memset", + (PyCFunction)py_lv_memset, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73904,28 +68237,32 @@ static PyMethodDef py_lv_flex_init_def = { /* * lvgl extension definition for: - * void lv_grid_init(void) + * void *lv_memmove(void *dst, const void *src, size_t len) */ -static PyObject *py_lv_grid_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memmove(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dst_py; PyObject *src_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + void *dst = mp_to_ptr(dst_py); + const void *src = (const void *)mp_to_ptr(src_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(void))lv_grid_init)(); + _res = ((void *(*)(void *, const void *, size_t))lv_memmove)(dst, src, len); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_grid_init_def = { - "lv_grid_init", - (PyCFunction)py_lv_grid_init, +static PyMethodDef py_lv_memmove_def = { + "lv_memmove", + (PyCFunction)py_lv_memmove, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73933,30 +68270,32 @@ static PyMethodDef py_lv_grid_init_def = { /* * lvgl extension definition for: - * int32_t lv_grid_fr(uint8_t x) + * int lv_memcmp(const void *p1, const void *p2, size_t len) */ -static PyObject *py_lv_grid_fr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_memcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; - if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t x = (uint8_t)x_val; + PyObject *p1_py; PyObject *p2_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &p1_py, &p2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + const void *p1 = (const void *)mp_to_ptr(p1_py); + const void *p2 = (const void *)mp_to_ptr(p2_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + int _res; lvpy_lock(); - _res = ((int32_t (*)(uint8_t))lv_grid_fr)(x); + _res = ((int (*)(const void *, const void *, size_t))lv_memcmp)(p1, p2, len); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_grid_fr_def = { - "lv_grid_fr", - (PyCFunction)py_lv_grid_fr, +static PyMethodDef py_lv_memcmp_def = { + "lv_memcmp", + (PyCFunction)py_lv_memcmp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73964,30 +68303,30 @@ static PyMethodDef py_lv_grid_fr_def = { /* * lvgl extension definition for: - * lv_style_prop_t lv_style_register_prop(uint8_t flag) + * size_t lv_strlen(const char *str) */ -static PyObject *py_lv_style_register_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long flag_val; - if (!PyArg_ParseTuple(py_args, "l", &flag_val)) { PyGILState_Release(gstate); return NULL; } - uint8_t flag = (uint8_t)flag_val; + PyObject *str_py; + if (!PyArg_ParseTuple(py_args, "O", &str_py)) { PyGILState_Release(gstate); return NULL; } + const char *str = (const char *)(char*)convert_from_str(str_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t _res; + size_t _res; lvpy_lock(); - _res = ((lv_style_prop_t (*)(uint8_t))lv_style_register_prop)(flag); + _res = ((size_t (*)(const char *))lv_strlen)(str); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_style_register_prop_def = { - "lv_style_register_prop", - (PyCFunction)py_lv_style_register_prop, +static PyMethodDef py_lv_strlen_def = { + "lv_strlen", + (PyCFunction)py_lv_strlen, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -73995,29 +68334,31 @@ static PyMethodDef py_lv_style_register_prop_def = { /* * lvgl extension definition for: - * lv_style_prop_t lv_style_get_num_custom_props(void) + * size_t lv_strnlen(const char *str, size_t max_len) */ -static PyObject *py_lv_style_get_num_custom_props(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strnlen(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *str_py; long max_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } + const char *str = (const char *)(char*)convert_from_str(str_py); + size_t max_len = (size_t)max_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t _res; + size_t _res; lvpy_lock(); - _res = ((lv_style_prop_t (*)(void))lv_style_get_num_custom_props)(); + _res = ((size_t (*)(const char *, size_t))lv_strnlen)(str, max_len); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_style_get_num_custom_props_def = { - "lv_style_get_num_custom_props", - (PyCFunction)py_lv_style_get_num_custom_props, +static PyMethodDef py_lv_strnlen_def = { + "lv_strnlen", + (PyCFunction)py_lv_strnlen, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74025,30 +68366,32 @@ static PyMethodDef py_lv_style_get_num_custom_props_def = { /* * lvgl extension definition for: - * lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop) + * size_t lv_strlcpy(char *dst, const char *src, size_t dst_size) */ -static PyObject *py_lv_style_prop_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strlcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + PyObject *dst_py; PyObject *src_py; long dst_size_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dst_size_val)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t dst_size = (size_t)dst_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_style_value_t _res; + size_t _res; lvpy_lock(); - _res = ((lv_style_value_t (*)(lv_style_prop_t))lv_style_prop_get_default)(prop); + _res = ((size_t (*)(char *, const char *, size_t))lv_strlcpy)(dst, src, dst_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_style_value_t(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_style_prop_get_default_def = { - "lv_style_prop_get_default", - (PyCFunction)py_lv_style_prop_get_default, +static PyMethodDef py_lv_strlcpy_def = { + "lv_strlcpy", + (PyCFunction)py_lv_strlcpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74056,30 +68399,32 @@ static PyMethodDef py_lv_style_prop_get_default_def = { /* * lvgl extension definition for: - * uint8_t lv_style_prop_lookup_flags(lv_style_prop_t prop) + * char *lv_strncpy(char *dst, const char *src, size_t dest_size) */ -static PyObject *py_lv_style_prop_lookup_flags(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strncpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *prop_py; - if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); + PyObject *dst_py; PyObject *src_py; long dest_size_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &dest_size_val)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t dest_size = (size_t)dest_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + char * _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_style_prop_t))lv_style_prop_lookup_flags)(prop); + _res = ((char *(*)(char *, const char *, size_t))lv_strncpy)(dst, src, dest_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_style_prop_lookup_flags_def = { - "lv_style_prop_lookup_flags", - (PyCFunction)py_lv_style_prop_lookup_flags, +static PyMethodDef py_lv_strncpy_def = { + "lv_strncpy", + (PyCFunction)py_lv_strncpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74087,29 +68432,31 @@ static PyMethodDef py_lv_style_prop_lookup_flags_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_handler(void) + * char *lv_strcpy(char *dst, const char *src) */ -static PyObject *py_lv_timer_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strcpy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dst_py; PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + char * _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_timer_handler)(); + _res = ((char *(*)(char *, const char *))lv_strcpy)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_timer_handler_def = { - "lv_timer_handler", - (PyCFunction)py_lv_timer_handler, +static PyMethodDef py_lv_strcpy_def = { + "lv_strcpy", + (PyCFunction)py_lv_strcpy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74117,30 +68464,31 @@ static PyMethodDef py_lv_timer_handler_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_handler_run_in_period(uint32_t period) + * int lv_strcmp(const char *s1, const char *s2) */ -static PyObject *py_lv_timer_handler_run_in_period(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strcmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long period_val; - if (!PyArg_ParseTuple(py_args, "l", &period_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t period = (uint32_t)period_val; + PyObject *s1_py; PyObject *s2_py; + if (!PyArg_ParseTuple(py_args, "OO", &s1_py, &s2_py)) { PyGILState_Release(gstate); return NULL; } + const char *s1 = (const char *)(char*)convert_from_str(s1_py); + const char *s2 = (const char *)(char*)convert_from_str(s2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_timer_handler_run_in_period)(period); + _res = ((int (*)(const char *, const char *))lv_strcmp)(s1, s2); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_timer_handler_run_in_period_def = { - "lv_timer_handler_run_in_period", - (PyCFunction)py_lv_timer_handler_run_in_period, +static PyMethodDef py_lv_strcmp_def = { + "lv_strcmp", + (PyCFunction)py_lv_strcmp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74148,29 +68496,32 @@ static PyMethodDef py_lv_timer_handler_run_in_period_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_get_time_to_next(void) + * int lv_strncmp(const char *s1, const char *s2, size_t len) */ -static PyObject *py_lv_timer_get_time_to_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strncmp(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *s1_py; PyObject *s2_py; long len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &s1_py, &s2_py, &len_val)) { PyGILState_Release(gstate); return NULL; } + const char *s1 = (const char *)(char*)convert_from_str(s1_py); + const char *s2 = (const char *)(char*)convert_from_str(s2_py); + size_t len = (size_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_timer_get_time_to_next)(); + _res = ((int (*)(const char *, const char *, size_t))lv_strncmp)(s1, s2, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_timer_get_time_to_next_def = { - "lv_timer_get_time_to_next", - (PyCFunction)py_lv_timer_get_time_to_next, +static PyMethodDef py_lv_strncmp_def = { + "lv_strncmp", + (PyCFunction)py_lv_strncmp, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74178,66 +68529,62 @@ static PyMethodDef py_lv_timer_get_time_to_next_def = { /* * lvgl extension definition for: - * void lv_timer_periodic_handler(void) + * char *lv_strdup(const char *src) */ -static PyObject *py_lv_timer_periodic_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strdup(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + const char *src = (const char *)(char*)convert_from_str(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + char * _res; lvpy_lock(); - ((void (*)(void))lv_timer_periodic_handler)(); + _res = ((char *(*)(const char *))lv_strdup)(src); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_timer_periodic_handler_def = { - "lv_timer_periodic_handler", - (PyCFunction)py_lv_timer_periodic_handler, +static PyMethodDef py_lv_strdup_def = { + "lv_strdup", + (PyCFunction)py_lv_strdup, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback cannot be the first argument - * lv_timer_handler_resume_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) + * char *lv_strndup(const char *src, size_t max_len) */ -static PyObject *py_lv_timer_handler_set_resume_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strndup(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; PyObject *data_py; - if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &data_py)) { PyGILState_Release(gstate); return NULL; } - void *data = mp_to_ptr(data_py); - void *cb = NULL; + PyObject *src_py; long max_len_val; + if (!PyArg_ParseTuple(py_args, "Ol", &src_py, &max_len_val)) { PyGILState_Release(gstate); return NULL; } + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t max_len = (size_t)max_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + char * _res; lvpy_lock(); - ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_timer_handler_set_resume_cb)(cb, data); + _res = ((char *(*)(const char *, size_t))lv_strndup)(src, max_len); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_timer_handler_set_resume_cb_def = { - "lv_timer_handler_set_resume_cb", - (PyCFunction)py_lv_timer_handler_set_resume_cb, +static PyMethodDef py_lv_strndup_def = { + "lv_strndup", + (PyCFunction)py_lv_strndup, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74245,93 +68592,64 @@ static PyMethodDef py_lv_timer_handler_set_resume_cb_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create_basic(void) + * char *lv_strcat(char *dst, const char *src) */ -static PyObject *py_lv_timer_create_basic(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strcat(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dst_py; PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "OO", &dst_py, &src_py)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; + char * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(void))lv_timer_create_basic)(); + _res = ((char *(*)(char *, const char *))lv_strcat)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_timer_create_basic_def = { - "lv_timer_create_basic", - (PyCFunction)py_lv_timer_create_basic, +static PyMethodDef py_lv_strcat_def = { + "lv_strcat", + (PyCFunction)py_lv_strcat, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_timer_create_timer_xcb (CPython) - * void lv_timer_cb_t(lv_timer_t *) - */ -static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_timer_create_timer_xcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_timer_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) + * char *lv_strncat(char *dst, const char *src, size_t src_len) */ -static PyObject *py_lv_timer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strncat(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *timer_xcb_py; long period_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OlO", &timer_xcb_py, &period_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - uint32_t period = (uint32_t)period_val; - void *timer_xcb = mp_lv_callback(timer_xcb_py, &lv_timer_create_timer_xcb_callback, "lv_timer_create_timer_xcb", &user_data, NULL, (NULL), (NULL)); + PyObject *dst_py; PyObject *src_py; long src_len_val; + if (!PyArg_ParseTuple(py_args, "OOl", &dst_py, &src_py, &src_len_val)) { PyGILState_Release(gstate); return NULL; } + char *dst = (char*)convert_from_str(dst_py); + const char *src = (const char *)(char*)convert_from_str(src_py); + size_t src_len = (size_t)src_len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; + char * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_timer_create)(timer_xcb, period, user_data); + _res = ((char *(*)(char *, const char *, size_t))lv_strncat)(dst, src, src_len); lvpy_unlock(); - lvpy_timer_bind(_res); + PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_timer_create_def = { - "lv_timer_create", - (PyCFunction)py_lv_timer_create, +static PyMethodDef py_lv_strncat_def = { + "lv_strncat", + (PyCFunction)py_lv_strncat, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74339,29 +68657,31 @@ static PyMethodDef py_lv_timer_create_def = { /* * lvgl extension definition for: - * void lv_timer_enable(bool en) + * char *lv_strchr(const char *str, int c) */ -static PyObject *py_lv_timer_enable(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_strchr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - bool en = (en_val != 0); + PyObject *str_py; long c_val; + if (!PyArg_ParseTuple(py_args, "Ol", &str_py, &c_val)) { PyGILState_Release(gstate); return NULL; } + const char *str = (const char *)(char*)convert_from_str(str_py); + int c = (int)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + char * _res; lvpy_lock(); - ((void (*)(bool))lv_timer_enable)(en); + _res = ((char *(*)(const char *, int))lv_strchr)(str, c); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_timer_enable_def = { - "lv_timer_enable", - (PyCFunction)py_lv_timer_enable, +static PyMethodDef py_lv_strchr_def = { + "lv_strchr", + (PyCFunction)py_lv_strchr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74369,9 +68689,9 @@ static PyMethodDef py_lv_timer_enable_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_get_idle(void) + * lv_draw_buf_handlers_t *lv_draw_buf_get_handlers(void) */ -static PyObject *py_lv_timer_get_idle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_get_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -74380,18 +68700,18 @@ static PyObject *py_lv_timer_get_idle(PyObject *self, PyObject *py_args, PyObjec if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_timer_get_idle)(); + _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static PyMethodDef py_lv_timer_get_idle_def = { - "lv_timer_get_idle", - (PyCFunction)py_lv_timer_get_idle, +static PyMethodDef py_lv_draw_buf_get_handlers_def = { + "lv_draw_buf_get_handlers", + (PyCFunction)py_lv_draw_buf_get_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74399,9 +68719,9 @@ static PyMethodDef py_lv_timer_get_idle_def = { /* * lvgl extension definition for: - * uint32_t lv_timer_get_time_until_next(void) + * lv_draw_buf_handlers_t *lv_draw_buf_get_font_handlers(void) */ -static PyObject *py_lv_timer_get_time_until_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_get_font_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -74410,18 +68730,18 @@ static PyObject *py_lv_timer_get_time_until_next(PyObject *self, PyObject *py_ar if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_timer_get_time_until_next)(); + _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_font_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static PyMethodDef py_lv_timer_get_time_until_next_def = { - "lv_timer_get_time_until_next", - (PyCFunction)py_lv_timer_get_time_until_next, +static PyMethodDef py_lv_draw_buf_get_font_handlers_def = { + "lv_draw_buf_get_font_handlers", + (PyCFunction)py_lv_draw_buf_get_font_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74429,31 +68749,29 @@ static PyMethodDef py_lv_timer_get_time_until_next_def = { /* * lvgl extension definition for: - * lv_display_t *lv_display_create(int32_t hor_res, int32_t ver_res) + * lv_draw_buf_handlers_t *lv_draw_buf_get_image_handlers(void) */ -static PyObject *py_lv_display_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_get_image_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long hor_res_val; long ver_res_val; - if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } - int32_t hor_res = (int32_t)hor_res_val; - int32_t ver_res = (int32_t)ver_res_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; + lv_draw_buf_handlers_t * _res; lvpy_lock(); - _res = ((lv_display_t *(*)(int32_t, int32_t))lv_display_create)(hor_res, ver_res); + _res = ((lv_draw_buf_handlers_t *(*)(void))lv_draw_buf_get_image_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + return mp_read_ptr_lv_draw_buf_handlers_t((void*)_res); } -static PyMethodDef py_lv_display_create_def = { - "lv_display_create", - (PyCFunction)py_lv_display_create, +static PyMethodDef py_lv_draw_buf_get_image_handlers_def = { + "lv_draw_buf_get_image_handlers", + (PyCFunction)py_lv_draw_buf_get_image_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74461,29 +68779,31 @@ static PyMethodDef py_lv_display_create_def = { /* * lvgl extension definition for: - * lv_display_t *lv_display_get_default(void) + * void *lv_draw_buf_align(void *buf, lv_color_format_t color_format) */ -static PyObject *py_lv_display_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *buf_py; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_display_t *(*)(void))lv_display_get_default)(); + _res = ((void *(*)(void *, lv_color_format_t))lv_draw_buf_align)(buf, color_format); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_default_def = { - "lv_display_get_default", - (PyCFunction)py_lv_display_get_default, +static PyMethodDef py_lv_draw_buf_align_def = { + "lv_draw_buf_align", + (PyCFunction)py_lv_draw_buf_align, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74491,29 +68811,31 @@ static PyMethodDef py_lv_display_get_default_def = { /* * lvgl extension definition for: - * void lv_screen_load(lv_obj_t *scr) + * uint32_t lv_draw_buf_width_to_stride(uint32_t w, lv_color_format_t color_format) */ -static PyObject *py_lv_screen_load(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_width_to_stride(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *scr_py; - if (!PyArg_ParseTuple(py_args, "O", &scr_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scr = mp_to_lv(scr_py); + long w_val; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + uint32_t w = (uint32_t)w_val; + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_obj_t *))lv_screen_load)(scr); + _res = ((uint32_t (*)(uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride)(w, color_format); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_screen_load_def = { - "lv_screen_load", - (PyCFunction)py_lv_screen_load, +static PyMethodDef py_lv_draw_buf_width_to_stride_def = { + "lv_draw_buf_width_to_stride", + (PyCFunction)py_lv_draw_buf_width_to_stride, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74521,33 +68843,33 @@ static PyMethodDef py_lv_screen_load_def = { /* * lvgl extension definition for: - * void lv_screen_load_anim(lv_obj_t *scr, lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay, bool auto_del) + * lv_draw_buf_t *lv_draw_buf_create(uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static PyObject *py_lv_screen_load_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *scr_py; PyObject *anim_type_py; long time_val; long delay_val; long auto_del_val; - if (!PyArg_ParseTuple(py_args, "OOlll", &scr_py, &anim_type_py, &time_val, &delay_val, &auto_del_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *scr = mp_to_lv(scr_py); - lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); - uint32_t time = (uint32_t)time_val; - uint32_t delay = (uint32_t)delay_val; - bool auto_del = (auto_del_val != 0); + long w_val; long h_val; PyObject *cf_py; long stride_val; + if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t * _res; lvpy_lock(); - ((void (*)(lv_obj_t *, lv_screen_load_anim_t, uint32_t, uint32_t, bool))lv_screen_load_anim)(scr, anim_type, time, delay, auto_del); + _res = ((lv_draw_buf_t *(*)(uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create)(w, h, cf, stride); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_screen_load_anim_def = { - "lv_screen_load_anim", - (PyCFunction)py_lv_screen_load_anim, +static PyMethodDef py_lv_draw_buf_create_def = { + "lv_draw_buf_create", + (PyCFunction)py_lv_draw_buf_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74555,9 +68877,9 @@ static PyMethodDef py_lv_screen_load_anim_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_screen_active(void) + * const lv_font_t *lv_font_get_default(void) */ -static PyObject *py_lv_screen_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -74566,18 +68888,18 @@ static PyObject *py_lv_screen_active(PyObject *self, PyObject *py_args, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + const lv_font_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_screen_active)(); + _res = ((const lv_font_t *(*)(void))lv_font_get_default)(); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_screen_active_def = { - "lv_screen_active", - (PyCFunction)py_lv_screen_active, +static PyMethodDef py_lv_font_get_default_def = { + "lv_font_get_default", + (PyCFunction)py_lv_font_get_default, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74585,29 +68907,35 @@ static PyMethodDef py_lv_screen_active_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_layer_top(void) + * void lv_text_get_size(lv_point_t *size_res, const char *text, const lv_font_t *font, int32_t letter_space, int32_t line_space, int32_t max_width, lv_text_flag_t flag) */ -static PyObject *py_lv_layer_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *size_res_py; PyObject *text_py; PyObject *font_py; long letter_space_val; long line_space_val; long max_width_val; PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "OOOlllO", &size_res_py, &text_py, &font_py, &letter_space_val, &line_space_val, &max_width_val, &flag_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); + const char *text = (const char *)(char*)convert_from_str(text_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + int32_t letter_space = (int32_t)letter_space_val; + int32_t line_space = (int32_t)line_space_val; + int32_t max_width = (int32_t)max_width_val; + lv_text_flag_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_layer_top)(); + ((void (*)(lv_point_t *, const char *, const lv_font_t *, int32_t, int32_t, int32_t, lv_text_flag_t))lv_text_get_size)(size_res, text, font, letter_space, line_space, max_width, flag); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } - -static PyMethodDef py_lv_layer_top_def = { - "lv_layer_top", - (PyCFunction)py_lv_layer_top, + +static PyMethodDef py_lv_text_get_size_def = { + "lv_text_get_size", + (PyCFunction)py_lv_text_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74615,59 +68943,96 @@ static PyMethodDef py_lv_layer_top_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_layer_sys(void) + * void lv_bidi_calculate_align(lv_text_align_t *align, lv_base_dir_t *base_dir, const char *txt) */ -static PyObject *py_lv_layer_sys(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bidi_calculate_align(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *align_py; PyObject *base_dir_py; PyObject *txt_py; + if (!PyArg_ParseTuple(py_args, "OOO", &align_py, &base_dir_py, &txt_py)) { PyGILState_Release(gstate); return NULL; } + lv_text_align_t *align = mp_array_to_i32ptr(align_py); + lv_base_dir_t *base_dir = mp_array_to_i32ptr(base_dir_py); + const char *txt = (const char *)(char*)convert_from_str(txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_layer_sys)(); + ((void (*)(lv_text_align_t *, lv_base_dir_t *, const char *))lv_bidi_calculate_align)(align, base_dir, txt); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_layer_sys_def = { - "lv_layer_sys", - (PyCFunction)py_lv_layer_sys, +static PyMethodDef py_lv_bidi_calculate_align_def = { + "lv_bidi_calculate_align", + (PyCFunction)py_lv_bidi_calculate_align, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_layout_register_cb (CPython) + * void lv_layout_update_cb_t(lv_obj_t *, void *user_data) + */ +static void lv_layout_register_cb_callback(lv_obj_t *arg0, void *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg1); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_layout_register_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = lv_to_mp((void*)arg0); + PyObject *py_arg1 = ptr_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_obj_t *lv_layer_bottom(void) + * uint32_t lv_layout_register(lv_layout_update_cb_t cb, void *user_data) */ -static PyObject *py_lv_layer_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_register(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + void *cb = mp_lv_callback(cb_py, &lv_layout_register_cb_callback, "lv_layout_register_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_layer_bottom)(); + _res = ((uint32_t (*)(lv_layout_update_cb_t, void *))lv_layout_register)(cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_layer_bottom_def = { - "lv_layer_bottom", - (PyCFunction)py_lv_layer_bottom, +static PyMethodDef py_lv_layout_register_def = { + "lv_layout_register", + (PyCFunction)py_lv_layout_register, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74675,30 +69040,28 @@ static PyMethodDef py_lv_layer_bottom_def = { /* * lvgl extension definition for: - * int32_t lv_dpx(int32_t n) + * void lv_flex_init(void) */ -static PyObject *py_lv_dpx(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_flex_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long n_val; - if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } - int32_t n = (int32_t)n_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t))lv_dpx)(n); + ((void (*)(void))lv_flex_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_dpx_def = { - "lv_dpx", - (PyCFunction)py_lv_dpx, +static PyMethodDef py_lv_flex_init_def = { + "lv_flex_init", + (PyCFunction)py_lv_flex_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74706,33 +69069,28 @@ static PyMethodDef py_lv_dpx_def = { /* * lvgl extension definition for: - * int32_t lv_clamp_width(int32_t width, int32_t min_width, int32_t max_width, int32_t ref_width) + * void lv_grid_init(void) */ -static PyObject *py_lv_clamp_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grid_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long width_val; long min_width_val; long max_width_val; long ref_width_val; - if (!PyArg_ParseTuple(py_args, "llll", &width_val, &min_width_val, &max_width_val, &ref_width_val)) { PyGILState_Release(gstate); return NULL; } - int32_t width = (int32_t)width_val; - int32_t min_width = (int32_t)min_width_val; - int32_t max_width = (int32_t)max_width_val; - int32_t ref_width = (int32_t)ref_width_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_width)(width, min_width, max_width, ref_width); + ((void (*)(void))lv_grid_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_clamp_width_def = { - "lv_clamp_width", - (PyCFunction)py_lv_clamp_width, +static PyMethodDef py_lv_grid_init_def = { + "lv_grid_init", + (PyCFunction)py_lv_grid_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74740,33 +69098,30 @@ static PyMethodDef py_lv_clamp_width_def = { /* * lvgl extension definition for: - * int32_t lv_clamp_height(int32_t height, int32_t min_height, int32_t max_height, int32_t ref_height) + * int32_t lv_grid_fr(uint8_t x) */ -static PyObject *py_lv_clamp_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_grid_fr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long height_val; long min_height_val; long max_height_val; long ref_height_val; - if (!PyArg_ParseTuple(py_args, "llll", &height_val, &min_height_val, &max_height_val, &ref_height_val)) { PyGILState_Release(gstate); return NULL; } - int32_t height = (int32_t)height_val; - int32_t min_height = (int32_t)min_height_val; - int32_t max_height = (int32_t)max_height_val; - int32_t ref_height = (int32_t)ref_height_val; + long x_val; + if (!PyArg_ParseTuple(py_args, "l", &x_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t x = (uint8_t)x_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_height)(height, min_height, max_height, ref_height); + _res = ((int32_t (*)(uint8_t))lv_grid_fr)(x); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_clamp_height_def = { - "lv_clamp_height", - (PyCFunction)py_lv_clamp_height, +static PyMethodDef py_lv_grid_fr_def = { + "lv_grid_fr", + (PyCFunction)py_lv_grid_fr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74774,28 +69129,30 @@ static PyMethodDef py_lv_clamp_height_def = { /* * lvgl extension definition for: - * void lv_draw_init(void) + * lv_style_prop_t lv_style_register_prop(uint8_t flag) */ -static PyObject *py_lv_draw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_register_prop(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long flag_val; + if (!PyArg_ParseTuple(py_args, "l", &flag_val)) { PyGILState_Release(gstate); return NULL; } + uint8_t flag = (uint8_t)flag_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_init)(); + _res = ((lv_style_prop_t (*)(uint8_t))lv_style_register_prop)(flag); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_init_def = { - "lv_draw_init", - (PyCFunction)py_lv_draw_init, +static PyMethodDef py_lv_style_register_prop_def = { + "lv_style_register_prop", + (PyCFunction)py_lv_style_register_prop, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74803,9 +69160,9 @@ static PyMethodDef py_lv_draw_init_def = { /* * lvgl extension definition for: - * void lv_draw_deinit(void) + * lv_style_prop_t lv_style_get_num_custom_props(void) */ -static PyObject *py_lv_draw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_get_num_custom_props(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -74814,17 +69171,18 @@ static PyObject *py_lv_draw_deinit(PyObject *self, PyObject *py_args, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_deinit)(); + _res = ((lv_style_prop_t (*)(void))lv_style_get_num_custom_props)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_deinit_def = { - "lv_draw_deinit", - (PyCFunction)py_lv_draw_deinit, +static PyMethodDef py_lv_style_get_num_custom_props_def = { + "lv_style_get_num_custom_props", + (PyCFunction)py_lv_style_get_num_custom_props, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74832,30 +69190,30 @@ static PyMethodDef py_lv_draw_deinit_def = { /* * lvgl extension definition for: - * void *lv_draw_create_unit(size_t size) + * lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop) */ -static PyObject *py_lv_draw_create_unit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_prop_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long size_val; - if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } - size_t size = (size_t)size_val; + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_style_value_t _res; lvpy_lock(); - _res = ((void *(*)(size_t))lv_draw_create_unit)(size); + _res = ((lv_style_value_t (*)(lv_style_prop_t))lv_style_prop_get_default)(prop); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_lv_style_value_t(_res); } -static PyMethodDef py_lv_draw_create_unit_def = { - "lv_draw_create_unit", - (PyCFunction)py_lv_draw_create_unit, +static PyMethodDef py_lv_style_prop_get_default_def = { + "lv_style_prop_get_default", + (PyCFunction)py_lv_style_prop_get_default, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74863,32 +69221,30 @@ static PyMethodDef py_lv_draw_create_unit_def = { /* * lvgl extension definition for: - * lv_draw_task_t *lv_draw_add_task(lv_layer_t *layer, const lv_area_t *coords, lv_draw_task_type_t type) + * uint8_t lv_style_prop_lookup_flags(lv_style_prop_t prop) */ -static PyObject *py_lv_draw_add_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_style_prop_lookup_flags(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *coords_py; PyObject *type_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &coords_py, &type_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - lv_draw_task_type_t type = (int)mp_obj_get_int(type_py); + PyObject *prop_py; + if (!PyArg_ParseTuple(py_args, "O", &prop_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_prop_t prop = (uint8_t)mp_obj_get_int(prop_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t * _res; + uint8_t _res; lvpy_lock(); - _res = ((lv_draw_task_t *(*)(lv_layer_t *, const lv_area_t *, lv_draw_task_type_t))lv_draw_add_task)(layer, coords, type); + _res = ((uint8_t (*)(lv_style_prop_t))lv_style_prop_lookup_flags)(prop); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_task_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_add_task_def = { - "lv_draw_add_task", - (PyCFunction)py_lv_draw_add_task, +static PyMethodDef py_lv_style_prop_lookup_flags_def = { + "lv_style_prop_lookup_flags", + (PyCFunction)py_lv_style_prop_lookup_flags, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74896,30 +69252,29 @@ static PyMethodDef py_lv_draw_add_task_def = { /* * lvgl extension definition for: - * void lv_draw_finalize_task_creation(lv_layer_t *layer, lv_draw_task_t *t) + * uint32_t lv_timer_handler(void) */ -static PyObject *py_lv_draw_finalize_task_creation(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *t_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &t_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(t_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_layer_t *, lv_draw_task_t *))lv_draw_finalize_task_creation)(layer, t); + _res = ((uint32_t (*)(void))lv_timer_handler)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_finalize_task_creation_def = { - "lv_draw_finalize_task_creation", - (PyCFunction)py_lv_draw_finalize_task_creation, +static PyMethodDef py_lv_timer_handler_def = { + "lv_timer_handler", + (PyCFunction)py_lv_timer_handler, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74927,28 +69282,30 @@ static PyMethodDef py_lv_draw_finalize_task_creation_def = { /* * lvgl extension definition for: - * void lv_draw_dispatch(void) + * uint32_t lv_timer_handler_run_in_period(uint32_t period) */ -static PyObject *py_lv_draw_dispatch(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_handler_run_in_period(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long period_val; + if (!PyArg_ParseTuple(py_args, "l", &period_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t period = (uint32_t)period_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_dispatch)(); + _res = ((uint32_t (*)(uint32_t))lv_timer_handler_run_in_period)(period); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_dispatch_def = { - "lv_draw_dispatch", - (PyCFunction)py_lv_draw_dispatch, +static PyMethodDef py_lv_timer_handler_run_in_period_def = { + "lv_timer_handler_run_in_period", + (PyCFunction)py_lv_timer_handler_run_in_period, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74956,9 +69313,9 @@ static PyMethodDef py_lv_draw_dispatch_def = { /* * lvgl extension definition for: - * void lv_draw_dispatch_wait_for_request(void) + * uint32_t lv_timer_get_time_to_next(void) */ -static PyObject *py_lv_draw_dispatch_wait_for_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_time_to_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -74967,17 +69324,18 @@ static PyObject *py_lv_draw_dispatch_wait_for_request(PyObject *self, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_dispatch_wait_for_request)(); + _res = ((uint32_t (*)(void))lv_timer_get_time_to_next)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_dispatch_wait_for_request_def = { - "lv_draw_dispatch_wait_for_request", - (PyCFunction)py_lv_draw_dispatch_wait_for_request, +static PyMethodDef py_lv_timer_get_time_to_next_def = { + "lv_timer_get_time_to_next", + (PyCFunction)py_lv_timer_get_time_to_next, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -74985,9 +69343,9 @@ static PyMethodDef py_lv_draw_dispatch_wait_for_request_def = { /* * lvgl extension definition for: - * void lv_draw_wait_for_finish(void) + * void lv_timer_periodic_handler(void) */ -static PyObject *py_lv_draw_wait_for_finish(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_periodic_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -74997,45 +69355,54 @@ static PyObject *py_lv_draw_wait_for_finish(PyObject *self, PyObject *py_args, P if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_wait_for_finish)(); + ((void (*)(void))lv_timer_periodic_handler)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_wait_for_finish_def = { - "lv_draw_wait_for_finish", - (PyCFunction)py_lv_draw_wait_for_finish, +static PyMethodDef py_lv_timer_periodic_handler_def = { + "lv_timer_periodic_handler", + (PyCFunction)py_lv_timer_periodic_handler, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback cannot be the first argument + * lv_timer_handler_resume_cb_t cb + */ + + /* * lvgl extension definition for: - * void lv_draw_dispatch_request(void) + * void lv_timer_handler_set_resume_cb(lv_timer_handler_resume_cb_t cb, void *data) */ -static PyObject *py_lv_draw_dispatch_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_handler_set_resume_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *cb_py; PyObject *data_py; + if (!PyArg_ParseTuple(py_args, "OO", &cb_py, &data_py)) { PyGILState_Release(gstate); return NULL; } + void *data = mp_to_ptr(data_py); + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_dispatch_request)(); + ((void (*)(lv_timer_handler_resume_cb_t, void *))lv_timer_handler_set_resume_cb)(cb, data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_dispatch_request_def = { - "lv_draw_dispatch_request", - (PyCFunction)py_lv_draw_dispatch_request, +static PyMethodDef py_lv_timer_handler_set_resume_cb_def = { + "lv_timer_handler_set_resume_cb", + (PyCFunction)py_lv_timer_handler_set_resume_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75043,9 +69410,9 @@ static PyMethodDef py_lv_draw_dispatch_request_def = { /* * lvgl extension definition for: - * uint32_t lv_draw_get_unit_count(void) + * lv_timer_t *lv_timer_create_basic(void) */ -static PyObject *py_lv_draw_get_unit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_create_basic(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -75054,84 +69421,82 @@ static PyObject *py_lv_draw_get_unit_count(PyObject *self, PyObject *py_args, Py if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_timer_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_draw_get_unit_count)(); + _res = ((lv_timer_t *(*)(void))lv_timer_create_basic)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_draw_get_unit_count_def = { - "lv_draw_get_unit_count", - (PyCFunction)py_lv_draw_get_unit_count, +static PyMethodDef py_lv_timer_create_basic_def = { + "lv_timer_create_basic", + (PyCFunction)py_lv_timer_create_basic, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * lv_draw_task_t *lv_draw_get_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) + * Callback function lv_timer_create_timer_xcb (CPython) + * void lv_timer_cb_t(lv_timer_t *) */ -static PyObject *py_lv_draw_get_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_timer_create_timer_xcb_callback(lv_timer_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; - if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); - uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lv_draw_task_t * _res; - lvpy_lock(); - _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_available_task)(layer, t_prev, draw_unit_id); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_timer_create_timer_xcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_timer_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_draw_get_available_task_def = { - "lv_draw_get_available_task", - (PyCFunction)py_lv_draw_get_available_task, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * lv_draw_task_t *lv_draw_get_next_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) + * lv_timer_t *lv_timer_create(lv_timer_cb_t timer_xcb, uint32_t period, void *user_data) */ -static PyObject *py_lv_draw_get_next_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; - if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); - uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; + PyObject *timer_xcb_py; long period_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OlO", &timer_xcb_py, &period_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + uint32_t period = (uint32_t)period_val; + void *timer_xcb = mp_lv_callback(timer_xcb_py, &lv_timer_create_timer_xcb_callback, "lv_timer_create_timer_xcb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t * _res; + lv_timer_t * _res; lvpy_lock(); - _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_next_available_task)(layer, t_prev, draw_unit_id); + _res = ((lv_timer_t *(*)(lv_timer_cb_t, uint32_t, void *))lv_timer_create)(timer_xcb, period, user_data); lvpy_unlock(); - + lvpy_timer_bind(_res); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_task_t((void*)_res); + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_draw_get_next_available_task_def = { - "lv_draw_get_next_available_task", - (PyCFunction)py_lv_draw_get_next_available_task, +static PyMethodDef py_lv_timer_create_def = { + "lv_timer_create", + (PyCFunction)py_lv_timer_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75139,31 +69504,29 @@ static PyMethodDef py_lv_draw_get_next_available_task_def = { /* * lvgl extension definition for: - * void lv_draw_unit_send_event(const char *name, lv_event_code_t code, void *param) + * void lv_timer_enable(bool en) */ -static PyObject *py_lv_draw_unit_send_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_enable(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *name_py; PyObject *code_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OOO", &name_py, &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } - const char *name = (const char *)(char*)convert_from_str(name_py); - lv_event_code_t code = (int)mp_obj_get_int(code_py); - void *param = mp_to_ptr(param_py); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const char *, lv_event_code_t, void *))lv_draw_unit_send_event)(name, code, param); + ((void (*)(bool))lv_timer_enable)(en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_unit_send_event_def = { - "lv_draw_unit_send_event", - (PyCFunction)py_lv_draw_unit_send_event, +static PyMethodDef py_lv_timer_enable_def = { + "lv_timer_enable", + (PyCFunction)py_lv_timer_enable, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75171,32 +69534,29 @@ static PyMethodDef py_lv_draw_unit_send_event_def = { /* * lvgl extension definition for: - * lv_layer_t *lv_draw_layer_create(lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + * uint32_t lv_timer_get_idle(void) */ -static PyObject *py_lv_draw_layer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_idle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_layer_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_layer_t *(*)(lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_create)(parent_layer, color_format, area); + _res = ((uint32_t (*)(void))lv_timer_get_idle)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_layer_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_layer_create_def = { - "lv_draw_layer_create", - (PyCFunction)py_lv_draw_layer_create, +static PyMethodDef py_lv_timer_get_idle_def = { + "lv_timer_get_idle", + (PyCFunction)py_lv_timer_get_idle, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75204,32 +69564,29 @@ static PyMethodDef py_lv_draw_layer_create_def = { /* * lvgl extension definition for: - * void lv_draw_layer_init(lv_layer_t *layer, lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) + * uint32_t lv_timer_get_time_until_next(void) */ -static PyObject *py_lv_draw_layer_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_get_time_until_next(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &layer_py, &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_layer_t *, lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_init)(layer, parent_layer, color_format, area); + _res = ((uint32_t (*)(void))lv_timer_get_time_until_next)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_layer_init_def = { - "lv_draw_layer_init", - (PyCFunction)py_lv_draw_layer_init, +static PyMethodDef py_lv_timer_get_time_until_next_def = { + "lv_timer_get_time_until_next", + (PyCFunction)py_lv_timer_get_time_until_next, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75237,30 +69594,31 @@ static PyMethodDef py_lv_draw_layer_init_def = { /* * lvgl extension definition for: - * void *lv_draw_layer_alloc_buf(lv_layer_t *layer) + * lv_display_t *lv_display_create(int32_t hor_res, int32_t ver_res) */ -static PyObject *py_lv_draw_layer_alloc_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + long hor_res_val; long ver_res_val; + if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + int32_t hor_res = (int32_t)hor_res_val; + int32_t ver_res = (int32_t)ver_res_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_display_t * _res; lvpy_lock(); - _res = ((void *(*)(lv_layer_t *))lv_draw_layer_alloc_buf)(layer); + _res = ((lv_display_t *(*)(int32_t, int32_t))lv_display_create)(hor_res, ver_res); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_draw_layer_alloc_buf_def = { - "lv_draw_layer_alloc_buf", - (PyCFunction)py_lv_draw_layer_alloc_buf, +static PyMethodDef py_lv_display_create_def = { + "lv_display_create", + (PyCFunction)py_lv_display_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75268,32 +69626,29 @@ static PyMethodDef py_lv_draw_layer_alloc_buf_def = { /* * lvgl extension definition for: - * void *lv_draw_layer_go_to_xy(lv_layer_t *layer, int32_t x, int32_t y) + * lv_display_t *lv_display_get_default(void) */ -static PyObject *py_lv_draw_layer_go_to_xy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_default(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "Oll", &layer_py, &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_display_t * _res; lvpy_lock(); - _res = ((void *(*)(lv_layer_t *, int32_t, int32_t))lv_draw_layer_go_to_xy)(layer, x, y); + _res = ((lv_display_t *(*)(void))lv_display_get_default)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_draw_layer_go_to_xy_def = { - "lv_draw_layer_go_to_xy", - (PyCFunction)py_lv_draw_layer_go_to_xy, +static PyMethodDef py_lv_display_get_default_def = { + "lv_display_get_default", + (PyCFunction)py_lv_display_get_default, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75301,32 +69656,29 @@ static PyMethodDef py_lv_draw_layer_go_to_xy_def = { /* * lvgl extension definition for: - * lv_layer_t *lv_draw_layer_create_drop_shadow(lv_layer_t *parent_layer, const lv_draw_dsc_base_t *base, const lv_area_t *area) + * void lv_screen_load(lv_obj_t *scr) */ -static PyObject *py_lv_draw_layer_create_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_screen_load(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *parent_layer_py; PyObject *base_py; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &base_py, &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); - const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + PyObject *scr_py; + if (!PyArg_ParseTuple(py_args, "O", &scr_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scr = mp_to_lv(scr_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_layer_t * _res; lvpy_lock(); - _res = ((lv_layer_t *(*)(lv_layer_t *, const lv_draw_dsc_base_t *, const lv_area_t *))lv_draw_layer_create_drop_shadow)(parent_layer, base, area); + ((void (*)(lv_obj_t *))lv_screen_load)(scr); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_layer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_layer_create_drop_shadow_def = { - "lv_draw_layer_create_drop_shadow", - (PyCFunction)py_lv_draw_layer_create_drop_shadow, +static PyMethodDef py_lv_screen_load_def = { + "lv_screen_load", + (PyCFunction)py_lv_screen_load, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75334,30 +69686,33 @@ static PyMethodDef py_lv_draw_layer_create_drop_shadow_def = { /* * lvgl extension definition for: - * void lv_draw_layer_finish_drop_shadow(lv_layer_t *drop_shadow_layer, const lv_draw_dsc_base_t *base) + * void lv_screen_load_anim(lv_obj_t *scr, lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay, bool auto_del) */ -static PyObject *py_lv_draw_layer_finish_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_screen_load_anim(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *drop_shadow_layer_py; PyObject *base_py; - if (!PyArg_ParseTuple(py_args, "OO", &drop_shadow_layer_py, &base_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *drop_shadow_layer = mp_write_ptr_lv_layer_t(drop_shadow_layer_py); - const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); + PyObject *scr_py; PyObject *anim_type_py; long time_val; long delay_val; long auto_del_val; + if (!PyArg_ParseTuple(py_args, "OOlll", &scr_py, &anim_type_py, &time_val, &delay_val, &auto_del_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *scr = mp_to_lv(scr_py); + lv_screen_load_anim_t anim_type = (int)mp_obj_get_int(anim_type_py); + uint32_t time = (uint32_t)time_val; + uint32_t delay = (uint32_t)delay_val; + bool auto_del = (auto_del_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_dsc_base_t *))lv_draw_layer_finish_drop_shadow)(drop_shadow_layer, base); + ((void (*)(lv_obj_t *, lv_screen_load_anim_t, uint32_t, uint32_t, bool))lv_screen_load_anim)(scr, anim_type, time, delay, auto_del); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_layer_finish_drop_shadow_def = { - "lv_draw_layer_finish_drop_shadow", - (PyCFunction)py_lv_draw_layer_finish_drop_shadow, +static PyMethodDef py_lv_screen_load_anim_def = { + "lv_screen_load_anim", + (PyCFunction)py_lv_screen_load_anim, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75365,29 +69720,29 @@ static PyMethodDef py_lv_draw_layer_finish_drop_shadow_def = { /* * lvgl extension definition for: - * void lv_draw_layer_dealloc_buf(lv_layer_t *layer) + * lv_obj_t *lv_screen_active(void) */ -static PyObject *py_lv_draw_layer_dealloc_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_screen_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_layer_t *))lv_draw_layer_dealloc_buf)(layer); + _res = ((lv_obj_t *(*)(void))lv_screen_active)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_layer_dealloc_buf_def = { - "lv_draw_layer_dealloc_buf", - (PyCFunction)py_lv_draw_layer_dealloc_buf, +static PyMethodDef py_lv_screen_active_def = { + "lv_screen_active", + (PyCFunction)py_lv_screen_active, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75395,29 +69750,29 @@ static PyMethodDef py_lv_draw_layer_dealloc_buf_def = { /* * lvgl extension definition for: - * void lv_draw_layer_deinit(lv_layer_t *layer) + * lv_obj_t *lv_layer_top(void) */ -static PyObject *py_lv_draw_layer_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_top(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_layer_t *))lv_draw_layer_deinit)(layer); + _res = ((lv_obj_t *(*)(void))lv_layer_top)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_layer_deinit_def = { - "lv_draw_layer_deinit", - (PyCFunction)py_lv_draw_layer_deinit, +static PyMethodDef py_lv_layer_top_def = { + "lv_layer_top", + (PyCFunction)py_lv_layer_top, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75425,29 +69780,29 @@ static PyMethodDef py_lv_draw_layer_deinit_def = { /* * lvgl extension definition for: - * void lv_draw_layer_delete(lv_layer_t *layer) + * lv_obj_t *lv_layer_sys(void) */ -static PyObject *py_lv_draw_layer_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_sys(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_layer_t *))lv_draw_layer_delete)(layer); + _res = ((lv_obj_t *(*)(void))lv_layer_sys)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_layer_delete_def = { - "lv_draw_layer_delete", - (PyCFunction)py_lv_draw_layer_delete, +static PyMethodDef py_lv_layer_sys_def = { + "lv_layer_sys", + (PyCFunction)py_lv_layer_sys, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75455,31 +69810,29 @@ static PyMethodDef py_lv_draw_layer_delete_def = { /* * lvgl extension definition for: - * void lv_draw_fill(lv_layer_t *layer, const lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * lv_obj_t *lv_layer_bottom(void) */ -static PyObject *py_lv_draw_fill(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_bottom(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_fill_dsc_t *dsc = (const lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_fill)(layer, dsc, coords); + _res = ((lv_obj_t *(*)(void))lv_layer_bottom)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_fill_def = { - "lv_draw_fill", - (PyCFunction)py_lv_draw_fill, +static PyMethodDef py_lv_layer_bottom_def = { + "lv_layer_bottom", + (PyCFunction)py_lv_layer_bottom, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75487,31 +69840,30 @@ static PyMethodDef py_lv_draw_fill_def = { /* * lvgl extension definition for: - * void lv_draw_border(lv_layer_t *layer, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * int32_t lv_dpx(int32_t n) */ -static PyObject *py_lv_draw_border(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_dpx(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long n_val; + if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } + int32_t n = (int32_t)n_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_border)(layer, dsc, coords); + _res = ((int32_t (*)(int32_t))lv_dpx)(n); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_border_def = { - "lv_draw_border", - (PyCFunction)py_lv_draw_border, +static PyMethodDef py_lv_dpx_def = { + "lv_dpx", + (PyCFunction)py_lv_dpx, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75519,31 +69871,33 @@ static PyMethodDef py_lv_draw_border_def = { /* * lvgl extension definition for: - * void lv_draw_box_shadow(lv_layer_t *layer, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * int32_t lv_clamp_width(int32_t width, int32_t min_width, int32_t max_width, int32_t ref_width) */ -static PyObject *py_lv_draw_box_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_clamp_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long width_val; long min_width_val; long max_width_val; long ref_width_val; + if (!PyArg_ParseTuple(py_args, "llll", &width_val, &min_width_val, &max_width_val, &ref_width_val)) { PyGILState_Release(gstate); return NULL; } + int32_t width = (int32_t)width_val; + int32_t min_width = (int32_t)min_width_val; + int32_t max_width = (int32_t)max_width_val; + int32_t ref_width = (int32_t)ref_width_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_box_shadow)(layer, dsc, coords); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_width)(width, min_width, max_width, ref_width); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_box_shadow_def = { - "lv_draw_box_shadow", - (PyCFunction)py_lv_draw_box_shadow, +static PyMethodDef py_lv_clamp_width_def = { + "lv_clamp_width", + (PyCFunction)py_lv_clamp_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75551,31 +69905,33 @@ static PyMethodDef py_lv_draw_box_shadow_def = { /* * lvgl extension definition for: - * void lv_draw_rect(lv_layer_t *layer, const lv_draw_rect_dsc_t *dsc, const lv_area_t *coords) + * int32_t lv_clamp_height(int32_t height, int32_t min_height, int32_t max_height, int32_t ref_height) */ -static PyObject *py_lv_draw_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_clamp_height(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_rect_dsc_t *dsc = (const lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long height_val; long min_height_val; long max_height_val; long ref_height_val; + if (!PyArg_ParseTuple(py_args, "llll", &height_val, &min_height_val, &max_height_val, &ref_height_val)) { PyGILState_Release(gstate); return NULL; } + int32_t height = (int32_t)height_val; + int32_t min_height = (int32_t)min_height_val; + int32_t max_height = (int32_t)max_height_val; + int32_t ref_height = (int32_t)ref_height_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_rect_dsc_t *, const lv_area_t *))lv_draw_rect)(layer, dsc, coords); + _res = ((int32_t (*)(int32_t, int32_t, int32_t, int32_t))lv_clamp_height)(height, min_height, max_height, ref_height); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_rect_def = { - "lv_draw_rect", - (PyCFunction)py_lv_draw_rect, +static PyMethodDef py_lv_clamp_height_def = { + "lv_clamp_height", + (PyCFunction)py_lv_clamp_height, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75583,31 +69939,28 @@ static PyMethodDef py_lv_draw_rect_def = { /* * lvgl extension definition for: - * void lv_draw_label(lv_layer_t *layer, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_init(void) */ -static PyObject *py_lv_draw_label(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_label)(layer, dsc, coords); + ((void (*)(void))lv_draw_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_label_def = { - "lv_draw_label", - (PyCFunction)py_lv_draw_label, +static PyMethodDef py_lv_draw_init_def = { + "lv_draw_init", + (PyCFunction)py_lv_draw_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75615,32 +69968,28 @@ static PyMethodDef py_lv_draw_label_def = { /* * lvgl extension definition for: - * void lv_draw_character(lv_layer_t *layer, lv_draw_label_dsc_t *dsc, const lv_point_t *point, uint32_t unicode_letter) + * void lv_draw_deinit(void) */ -static PyObject *py_lv_draw_character(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; long unicode_letter_val; - if (!PyArg_ParseTuple(py_args, "OOOl", &layer_py, &dsc_py, &point_py, &unicode_letter_val)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_label_dsc_t *dsc = mp_write_ptr_lv_draw_label_dsc_t(dsc_py); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); - uint32_t unicode_letter = (uint32_t)unicode_letter_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, lv_draw_label_dsc_t *, const lv_point_t *, uint32_t))lv_draw_character)(layer, dsc, point, unicode_letter); + ((void (*)(void))lv_draw_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_character_def = { - "lv_draw_character", - (PyCFunction)py_lv_draw_character, +static PyMethodDef py_lv_draw_deinit_def = { + "lv_draw_deinit", + (PyCFunction)py_lv_draw_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75648,31 +69997,30 @@ static PyMethodDef py_lv_draw_character_def = { /* * lvgl extension definition for: - * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) + * void *lv_draw_create_unit(size_t size) */ -static PyObject *py_lv_draw_letter(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_create_unit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); - const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); + long size_val; + if (!PyArg_ParseTuple(py_args, "l", &size_val)) { PyGILState_Release(gstate); return NULL; } + size_t size = (size_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_draw_letter)(layer, dsc, point); + _res = ((void *(*)(size_t))lv_draw_create_unit)(size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_letter_def = { - "lv_draw_letter", - (PyCFunction)py_lv_draw_letter, +static PyMethodDef py_lv_draw_create_unit_def = { + "lv_draw_create_unit", + (PyCFunction)py_lv_draw_create_unit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75680,30 +70028,32 @@ static PyMethodDef py_lv_draw_letter_def = { /* * lvgl extension definition for: - * lv_fs_drv_t *lv_fs_get_drv(char letter) + * lv_draw_task_t *lv_draw_add_task(lv_layer_t *layer, const lv_area_t *coords, lv_draw_task_type_t type) */ -static PyObject *py_lv_fs_get_drv(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_add_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - char letter = (char)letter_val; + PyObject *layer_py; PyObject *coords_py; PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &coords_py, &type_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + lv_draw_task_type_t type = (int)mp_obj_get_int(type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_drv_t * _res; + lv_draw_task_t * _res; lvpy_lock(); - _res = ((lv_fs_drv_t *(*)(char))lv_fs_get_drv)(letter); + _res = ((lv_draw_task_t *(*)(lv_layer_t *, const lv_area_t *, lv_draw_task_type_t))lv_draw_add_task)(layer, coords, type); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_fs_drv_t((void*)_res); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_fs_get_drv_def = { - "lv_fs_get_drv", - (PyCFunction)py_lv_fs_get_drv, +static PyMethodDef py_lv_draw_add_task_def = { + "lv_draw_add_task", + (PyCFunction)py_lv_draw_add_task, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75711,29 +70061,30 @@ static PyMethodDef py_lv_fs_get_drv_def = { /* * lvgl extension definition for: - * void lv_fs_remove_drive(char letter) + * void lv_draw_finalize_task_creation(lv_layer_t *layer, lv_draw_task_t *t) */ -static PyObject *py_lv_fs_remove_drive(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_finalize_task_creation(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - char letter = (char)letter_val; + PyObject *layer_py; PyObject *t_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &t_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_task_t *t = mp_write_ptr_lv_draw_task_t(t_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(char))lv_fs_remove_drive)(letter); + ((void (*)(lv_layer_t *, lv_draw_task_t *))lv_draw_finalize_task_creation)(layer, t); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_remove_drive_def = { - "lv_fs_remove_drive", - (PyCFunction)py_lv_fs_remove_drive, +static PyMethodDef py_lv_draw_finalize_task_creation_def = { + "lv_draw_finalize_task_creation", + (PyCFunction)py_lv_draw_finalize_task_creation, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75741,30 +70092,28 @@ static PyMethodDef py_lv_fs_remove_drive_def = { /* * lvgl extension definition for: - * bool lv_fs_is_ready(char letter) + * void lv_draw_dispatch(void) */ -static PyObject *py_lv_fs_is_ready(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long letter_val; - if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } - char letter = (char)letter_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(char))lv_fs_is_ready)(letter); + ((void (*)(void))lv_draw_dispatch)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_is_ready_def = { - "lv_fs_is_ready", - (PyCFunction)py_lv_fs_is_ready, +static PyMethodDef py_lv_draw_dispatch_def = { + "lv_draw_dispatch", + (PyCFunction)py_lv_draw_dispatch, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75772,31 +70121,28 @@ static PyMethodDef py_lv_fs_is_ready_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_path_get_size(const char *path, uint32_t *size_res) + * void lv_draw_dispatch_wait_for_request(void) */ -static PyObject *py_lv_fs_path_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch_wait_for_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; PyObject *size_res_py; - if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_res_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); - uint32_t *size_res = mp_array_to_u32ptr(size_res_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(const char *, uint32_t *))lv_fs_path_get_size)(path, size_res); + ((void (*)(void))lv_draw_dispatch_wait_for_request)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_path_get_size_def = { - "lv_fs_path_get_size", - (PyCFunction)py_lv_fs_path_get_size, +static PyMethodDef py_lv_draw_dispatch_wait_for_request_def = { + "lv_draw_dispatch_wait_for_request", + (PyCFunction)py_lv_draw_dispatch_wait_for_request, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75804,32 +70150,28 @@ static PyMethodDef py_lv_fs_path_get_size_def = { /* * lvgl extension definition for: - * lv_fs_res_t lv_fs_load_to_buf(void *buf, uint32_t buf_size, const char *path) + * void lv_draw_wait_for_finish(void) */ -static PyObject *py_lv_fs_load_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_wait_for_finish(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_val; PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &buf_size_val, &path_py)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; - const char *path = (const char *)(char*)convert_from_str(path_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_fs_res_t (*)(void *, uint32_t, const char *))lv_fs_load_to_buf)(buf, buf_size, path); + ((void (*)(void))lv_draw_wait_for_finish)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_load_to_buf_def = { - "lv_fs_load_to_buf", - (PyCFunction)py_lv_fs_load_to_buf, +static PyMethodDef py_lv_draw_wait_for_finish_def = { + "lv_draw_wait_for_finish", + (PyCFunction)py_lv_draw_wait_for_finish, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75837,31 +70179,28 @@ static PyMethodDef py_lv_fs_load_to_buf_def = { /* * lvgl extension definition for: - * void *lv_fs_load_with_alloc(const char *path, uint32_t *size) + * void lv_draw_dispatch_request(void) */ -static PyObject *py_lv_fs_load_with_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch_request(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; PyObject *size_py; - if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); - uint32_t *size = mp_array_to_u32ptr(size_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const char *, uint32_t *))lv_fs_load_with_alloc)(path, size); + ((void (*)(void))lv_draw_dispatch_request)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_load_with_alloc_def = { - "lv_fs_load_with_alloc", - (PyCFunction)py_lv_fs_load_with_alloc, +static PyMethodDef py_lv_draw_dispatch_request_def = { + "lv_draw_dispatch_request", + (PyCFunction)py_lv_draw_dispatch_request, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75869,30 +70208,29 @@ static PyMethodDef py_lv_fs_load_with_alloc_def = { /* * lvgl extension definition for: - * char *lv_fs_get_letters(char *buf) + * uint32_t lv_draw_get_unit_count(void) */ -static PyObject *py_lv_fs_get_letters(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_unit_count(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; - if (!PyArg_ParseTuple(py_args, "O", &buf_py)) { PyGILState_Release(gstate); return NULL; } - char *buf = (char*)convert_from_str(buf_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + uint32_t _res; lvpy_lock(); - _res = ((char *(*)(char *))lv_fs_get_letters)(buf); + _res = ((uint32_t (*)(void))lv_draw_get_unit_count)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_fs_get_letters_def = { - "lv_fs_get_letters", - (PyCFunction)py_lv_fs_get_letters, +static PyMethodDef py_lv_draw_get_unit_count_def = { + "lv_draw_get_unit_count", + (PyCFunction)py_lv_draw_get_unit_count, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75900,30 +70238,32 @@ static PyMethodDef py_lv_fs_get_letters_def = { /* * lvgl extension definition for: - * const char *lv_fs_get_ext(const char *fn) + * lv_draw_task_t *lv_draw_get_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) */ -static PyObject *py_lv_fs_get_ext(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *fn_py; - if (!PyArg_ParseTuple(py_args, "O", &fn_py)) { PyGILState_Release(gstate); return NULL; } - const char *fn = (const char *)(char*)convert_from_str(fn_py); + PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; + if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); + uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; + lv_draw_task_t * _res; lvpy_lock(); - _res = ((const char *(*)(const char *))lv_fs_get_ext)(fn); + _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_available_task)(layer, t_prev, draw_unit_id); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_fs_get_ext_def = { - "lv_fs_get_ext", - (PyCFunction)py_lv_fs_get_ext, +static PyMethodDef py_lv_draw_get_available_task_def = { + "lv_draw_get_available_task", + (PyCFunction)py_lv_draw_get_available_task, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75931,30 +70271,32 @@ static PyMethodDef py_lv_fs_get_ext_def = { /* * lvgl extension definition for: - * char *lv_fs_up(char *path) + * lv_draw_task_t *lv_draw_get_next_available_task(lv_layer_t *layer, lv_draw_task_t *t_prev, uint8_t draw_unit_id) */ -static PyObject *py_lv_fs_up(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_next_available_task(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - char *path = (char*)convert_from_str(path_py); + PyObject *layer_py; PyObject *t_prev_py; long draw_unit_id_val; + if (!PyArg_ParseTuple(py_args, "OOl", &layer_py, &t_prev_py, &draw_unit_id_val)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_task_t *t_prev = mp_write_ptr_lv_draw_task_t(t_prev_py); + uint8_t draw_unit_id = (uint8_t)draw_unit_id_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - char * _res; + lv_draw_task_t * _res; lvpy_lock(); - _res = ((char *(*)(char *))lv_fs_up)(path); + _res = ((lv_draw_task_t *(*)(lv_layer_t *, lv_draw_task_t *, uint8_t))lv_draw_get_next_available_task)(layer, t_prev, draw_unit_id); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + return mp_read_ptr_lv_draw_task_t((void*)_res); } -static PyMethodDef py_lv_fs_up_def = { - "lv_fs_up", - (PyCFunction)py_lv_fs_up, +static PyMethodDef py_lv_draw_get_next_available_task_def = { + "lv_draw_get_next_available_task", + (PyCFunction)py_lv_draw_get_next_available_task, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75962,30 +70304,31 @@ static PyMethodDef py_lv_fs_up_def = { /* * lvgl extension definition for: - * const char *lv_fs_get_last(const char *path) + * void lv_draw_unit_send_event(const char *name, lv_event_code_t code, void *param) */ -static PyObject *py_lv_fs_get_last(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_unit_send_event(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); + PyObject *name_py; PyObject *code_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OOO", &name_py, &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + const char *name = (const char *)(char*)convert_from_str(name_py); + lv_event_code_t code = (int)mp_obj_get_int(code_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const char * _res; lvpy_lock(); - _res = ((const char *(*)(const char *))lv_fs_get_last)(path); + ((void (*)(const char *, lv_event_code_t, void *))lv_draw_unit_send_event)(name, code, param); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_str((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_get_last_def = { - "lv_fs_get_last", - (PyCFunction)py_lv_fs_get_last, +static PyMethodDef py_lv_draw_unit_send_event_def = { + "lv_draw_unit_send_event", + (PyCFunction)py_lv_draw_unit_send_event, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -75993,33 +70336,32 @@ static PyMethodDef py_lv_fs_get_last_def = { /* * lvgl extension definition for: - * int lv_fs_path_join(char *buf, size_t buf_sz, const char *base, const char *end) + * lv_layer_t *lv_draw_layer_create(lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) */ -static PyObject *py_lv_fs_path_join(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long buf_sz_val; PyObject *base_py; PyObject *end_py; - if (!PyArg_ParseTuple(py_args, "OlOO", &buf_py, &buf_sz_val, &base_py, &end_py)) { PyGILState_Release(gstate); return NULL; } - char *buf = (char*)convert_from_str(buf_py); - size_t buf_sz = (size_t)buf_sz_val; - const char *base = (const char *)(char*)convert_from_str(base_py); - const char *end = (const char *)(char*)convert_from_str(end_py); + PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int _res; + lv_layer_t * _res; lvpy_lock(); - _res = ((int (*)(char *, size_t, const char *, const char *))lv_fs_path_join)(buf, buf_sz, base, end); + _res = ((lv_layer_t *(*)(lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_create)(parent_layer, color_format, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_layer_t((void*)_res); } -static PyMethodDef py_lv_fs_path_join_def = { - "lv_fs_path_join", - (PyCFunction)py_lv_fs_path_join, +static PyMethodDef py_lv_draw_layer_create_def = { + "lv_draw_layer_create", + (PyCFunction)py_lv_draw_layer_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76027,31 +70369,32 @@ static PyMethodDef py_lv_fs_path_join_def = { /* * lvgl extension definition for: - * void lv_draw_image(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_layer_init(lv_layer_t *layer, lv_layer_t *parent_layer, lv_color_format_t color_format, const lv_area_t *area) */ -static PyObject *py_lv_draw_image(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *layer_py; PyObject *parent_layer_py; PyObject *color_format_py; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &layer_py, &parent_layer_py, &color_format_py, &area_py)) { PyGILState_Release(gstate); return NULL; } lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_image)(layer, dsc, coords); + ((void (*)(lv_layer_t *, lv_layer_t *, lv_color_format_t, const lv_area_t *))lv_draw_layer_init)(layer, parent_layer, color_format, area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_image_def = { - "lv_draw_image", - (PyCFunction)py_lv_draw_image, +static PyMethodDef py_lv_draw_layer_init_def = { + "lv_draw_layer_init", + (PyCFunction)py_lv_draw_layer_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76059,31 +70402,30 @@ static PyMethodDef py_lv_draw_image_def = { /* * lvgl extension definition for: - * void lv_draw_layer(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) + * void *lv_draw_layer_alloc_buf(lv_layer_t *layer) */ -static PyObject *py_lv_draw_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_alloc_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_layer)(layer, dsc, coords); + _res = ((void *(*)(lv_layer_t *))lv_draw_layer_alloc_buf)(layer); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_layer_def = { - "lv_draw_layer", - (PyCFunction)py_lv_draw_layer, +static PyMethodDef py_lv_draw_layer_alloc_buf_def = { + "lv_draw_layer_alloc_buf", + (PyCFunction)py_lv_draw_layer_alloc_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76091,30 +70433,32 @@ static PyMethodDef py_lv_draw_layer_def = { /* * lvgl extension definition for: - * void lv_draw_line(lv_layer_t *layer, const lv_draw_line_dsc_t *dsc) + * void *lv_draw_layer_go_to_xy(lv_layer_t *layer, int32_t x, int32_t y) */ -static PyObject *py_lv_draw_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_go_to_xy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *layer_py; long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "Oll", &layer_py, &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_line_dsc_t *))lv_draw_line)(layer, dsc); + _res = ((void *(*)(lv_layer_t *, int32_t, int32_t))lv_draw_layer_go_to_xy)(layer, x, y); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_line_def = { - "lv_draw_line", - (PyCFunction)py_lv_draw_line, +static PyMethodDef py_lv_draw_layer_go_to_xy_def = { + "lv_draw_layer_go_to_xy", + (PyCFunction)py_lv_draw_layer_go_to_xy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76122,30 +70466,32 @@ static PyMethodDef py_lv_draw_line_def = { /* * lvgl extension definition for: - * void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc) + * lv_layer_t *lv_draw_layer_create_drop_shadow(lv_layer_t *parent_layer, const lv_draw_dsc_base_t *base, const lv_area_t *area) */ -static PyObject *py_lv_draw_arc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_create_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); + PyObject *parent_layer_py; PyObject *base_py; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "OOO", &parent_layer_py, &base_py, &area_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *parent_layer = mp_write_ptr_lv_layer_t(parent_layer_py); + const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_layer_t * _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_arc_dsc_t *))lv_draw_arc)(layer, dsc); + _res = ((lv_layer_t *(*)(lv_layer_t *, const lv_draw_dsc_base_t *, const lv_area_t *))lv_draw_layer_create_drop_shadow)(parent_layer, base, area); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_layer_t((void*)_res); } -static PyMethodDef py_lv_draw_arc_def = { - "lv_draw_arc", - (PyCFunction)py_lv_draw_arc, +static PyMethodDef py_lv_draw_layer_create_drop_shadow_def = { + "lv_draw_layer_create_drop_shadow", + (PyCFunction)py_lv_draw_layer_create_drop_shadow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76153,36 +70499,30 @@ static PyMethodDef py_lv_draw_arc_def = { /* * lvgl extension definition for: - * void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area) + * void lv_draw_layer_finish_drop_shadow(lv_layer_t *drop_shadow_layer, const lv_draw_dsc_base_t *base) */ -static PyObject *py_lv_draw_arc_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_finish_drop_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long x_val; long y_val; long radius_val; PyObject *start_angle_py; PyObject *end_angle_py; long w_val; long rounded_val; PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "lllOOllO", &x_val, &y_val, &radius_val, &start_angle_py, &end_angle_py, &w_val, &rounded_val, &area_py)) { PyGILState_Release(gstate); return NULL; } - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; - uint16_t radius = (uint16_t)radius_val; - lv_value_precise_t start_angle = (float)mp_obj_get_float(start_angle_py); - lv_value_precise_t end_angle = (float)mp_obj_get_float(end_angle_py); - int32_t w = (int32_t)w_val; - bool rounded = (rounded_val != 0); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + PyObject *drop_shadow_layer_py; PyObject *base_py; + if (!PyArg_ParseTuple(py_args, "OO", &drop_shadow_layer_py, &base_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *drop_shadow_layer = mp_write_ptr_lv_layer_t(drop_shadow_layer_py); + const lv_draw_dsc_base_t *base = (const lv_draw_dsc_base_t *)mp_write_ptr_lv_draw_dsc_base_t(base_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(int32_t, int32_t, uint16_t, lv_value_precise_t, lv_value_precise_t, int32_t, bool, lv_area_t *))lv_draw_arc_get_area)(x, y, radius, start_angle, end_angle, w, rounded, area); + ((void (*)(lv_layer_t *, const lv_draw_dsc_base_t *))lv_draw_layer_finish_drop_shadow)(drop_shadow_layer, base); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_arc_get_area_def = { - "lv_draw_arc_get_area", - (PyCFunction)py_lv_draw_arc_get_area, +static PyMethodDef py_lv_draw_layer_finish_drop_shadow_def = { + "lv_draw_layer_finish_drop_shadow", + (PyCFunction)py_lv_draw_layer_finish_drop_shadow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76190,30 +70530,29 @@ static PyMethodDef py_lv_draw_arc_get_area_def = { /* * lvgl extension definition for: - * void lv_draw_triangle(lv_layer_t *layer, const lv_draw_triangle_dsc_t *draw_dsc) + * void lv_draw_layer_dealloc_buf(lv_layer_t *layer) */ -static PyObject *py_lv_draw_triangle(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_dealloc_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *draw_dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_triangle_dsc_t *draw_dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(draw_dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_triangle_dsc_t *))lv_draw_triangle)(layer, draw_dsc); + ((void (*)(lv_layer_t *))lv_draw_layer_dealloc_buf)(layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_triangle_def = { - "lv_draw_triangle", - (PyCFunction)py_lv_draw_triangle, +static PyMethodDef py_lv_draw_layer_dealloc_buf_def = { + "lv_draw_layer_dealloc_buf", + (PyCFunction)py_lv_draw_layer_dealloc_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76221,31 +70560,29 @@ static PyMethodDef py_lv_draw_triangle_def = { /* * lvgl extension definition for: - * void lv_draw_blur(lv_layer_t *layer, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * void lv_draw_layer_deinit(lv_layer_t *layer) */ -static PyObject *py_lv_draw_blur(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_blur)(layer, dsc, coords); + ((void (*)(lv_layer_t *))lv_draw_layer_deinit)(layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_blur_def = { - "lv_draw_blur", - (PyCFunction)py_lv_draw_blur, +static PyMethodDef py_lv_draw_layer_deinit_def = { + "lv_draw_layer_deinit", + (PyCFunction)py_lv_draw_layer_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76253,29 +70590,29 @@ static PyMethodDef py_lv_draw_blur_def = { /* * lvgl extension definition for: - * lv_indev_t *lv_indev_create(void) + * void lv_draw_layer_delete(lv_layer_t *layer) */ -static PyObject *py_lv_indev_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer_delete(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_t * _res; lvpy_lock(); - _res = ((lv_indev_t *(*)(void))lv_indev_create)(); + ((void (*)(lv_layer_t *))lv_draw_layer_delete)(layer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_indev_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_create_def = { - "lv_indev_create", - (PyCFunction)py_lv_indev_create, +static PyMethodDef py_lv_draw_layer_delete_def = { + "lv_draw_layer_delete", + (PyCFunction)py_lv_draw_layer_delete, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76283,29 +70620,31 @@ static PyMethodDef py_lv_indev_create_def = { /* * lvgl extension definition for: - * void lv_indev_read_timer_cb(lv_timer_t *timer) + * void lv_draw_fill(lv_layer_t *layer, const lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_indev_read_timer_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_fill(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *timer_py; - if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_fill_dsc_t *dsc = (const lv_draw_fill_dsc_t *)mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_indev_read_timer_cb)(timer); + ((void (*)(lv_layer_t *, const lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_fill)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_read_timer_cb_def = { - "lv_indev_read_timer_cb", - (PyCFunction)py_lv_indev_read_timer_cb, +static PyMethodDef py_lv_draw_fill_def = { + "lv_draw_fill", + (PyCFunction)py_lv_draw_fill, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76313,29 +70652,31 @@ static PyMethodDef py_lv_indev_read_timer_cb_def = { /* * lvgl extension definition for: - * lv_indev_t *lv_indev_active(void) + * void lv_draw_border(lv_layer_t *layer, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_indev_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_border(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_indev_t * _res; lvpy_lock(); - _res = ((lv_indev_t *(*)(void))lv_indev_active)(); + ((void (*)(lv_layer_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_border)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_indev_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_active_def = { - "lv_indev_active", - (PyCFunction)py_lv_indev_active, +static PyMethodDef py_lv_draw_border_def = { + "lv_draw_border", + (PyCFunction)py_lv_draw_border, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76343,29 +70684,31 @@ static PyMethodDef py_lv_indev_active_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_indev_get_active_obj(void) + * void lv_draw_box_shadow(lv_layer_t *layer, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_indev_get_active_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_box_shadow(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(void))lv_indev_get_active_obj)(); + ((void (*)(lv_layer_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_box_shadow)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_get_active_obj_def = { - "lv_indev_get_active_obj", - (PyCFunction)py_lv_indev_get_active_obj, +static PyMethodDef py_lv_draw_box_shadow_def = { + "lv_draw_box_shadow", + (PyCFunction)py_lv_draw_box_shadow, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76373,31 +70716,31 @@ static PyMethodDef py_lv_indev_get_active_obj_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) + * void lv_draw_rect(lv_layer_t *layer, const lv_draw_rect_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_indev_search_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_rect_dsc_t *dsc = (const lv_draw_rect_dsc_t *)mp_write_ptr_lv_draw_rect_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_indev_search_obj)(obj, point); + ((void (*)(lv_layer_t *, const lv_draw_rect_dsc_t *, const lv_area_t *))lv_draw_rect)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_search_obj_def = { - "lv_indev_search_obj", - (PyCFunction)py_lv_indev_search_obj, +static PyMethodDef py_lv_draw_rect_def = { + "lv_draw_rect", + (PyCFunction)py_lv_draw_rect, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76405,30 +70748,31 @@ static PyMethodDef py_lv_indev_search_obj_def = { /* * lvgl extension definition for: - * lv_subject_t *lv_subject_create(lv_subject_type_t type) + * void lv_draw_label(lv_layer_t *layer, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_subject_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_label(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *type_py; - if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } - lv_subject_type_t type = (int)mp_obj_get_int(type_py); + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_subject_t * _res; lvpy_lock(); - _res = ((lv_subject_t *(*)(lv_subject_type_t))lv_subject_create)(type); + ((void (*)(lv_layer_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_label)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_subject_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_subject_create_def = { - "lv_subject_create", - (PyCFunction)py_lv_subject_create, +static PyMethodDef py_lv_draw_label_def = { + "lv_draw_label", + (PyCFunction)py_lv_draw_label, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76436,29 +70780,32 @@ static PyMethodDef py_lv_subject_create_def = { /* * lvgl extension definition for: - * void lv_refr_now(lv_display_t *disp) + * void lv_draw_character(lv_layer_t *layer, lv_draw_label_dsc_t *dsc, const lv_point_t *point, uint32_t unicode_letter) */ -static PyObject *py_lv_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_character(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *disp_py; - if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; long unicode_letter_val; + if (!PyArg_ParseTuple(py_args, "OOOl", &layer_py, &dsc_py, &point_py, &unicode_letter_val)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_label_dsc_t *dsc = mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); + uint32_t unicode_letter = (uint32_t)unicode_letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_refr_now)(disp); + ((void (*)(lv_layer_t *, lv_draw_label_dsc_t *, const lv_point_t *, uint32_t))lv_draw_character)(layer, dsc, point, unicode_letter); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_now_def = { - "lv_refr_now", - (PyCFunction)py_lv_refr_now, +static PyMethodDef py_lv_draw_character_def = { + "lv_draw_character", + (PyCFunction)py_lv_draw_character, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76466,29 +70813,31 @@ static PyMethodDef py_lv_refr_now_def = { /* * lvgl extension definition for: - * void lv_display_refr_timer(lv_timer_t *timer) + * void lv_draw_letter(lv_layer_t *layer, lv_draw_letter_dsc_t *dsc, const lv_point_t *point) */ -static PyObject *py_lv_display_refr_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_letter(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *timer_py; - if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } - lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); + PyObject *layer_py; PyObject *dsc_py; PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + lv_draw_letter_dsc_t *dsc = mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); + const lv_point_t *point = (const lv_point_t *)mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_timer_t *))lv_display_refr_timer)(timer); + ((void (*)(lv_layer_t *, lv_draw_letter_dsc_t *, const lv_point_t *))lv_draw_letter)(layer, dsc, point); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_refr_timer_def = { - "lv_display_refr_timer", - (PyCFunction)py_lv_display_refr_timer, +static PyMethodDef py_lv_draw_letter_def = { + "lv_draw_letter", + (PyCFunction)py_lv_draw_letter, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76496,30 +70845,30 @@ static PyMethodDef py_lv_display_refr_timer_def = { /* * lvgl extension definition for: - * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) + * lv_fs_drv_t *lv_fs_get_drv(char letter) */ -static PyObject *py_lv_draw_mask_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_drv(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *layer_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + char letter = (char)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_fs_drv_t * _res; lvpy_lock(); - ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_mask_rect)(layer, dsc); + _res = ((lv_fs_drv_t *(*)(char))lv_fs_get_drv)(letter); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_fs_drv_t((void*)_res); } -static PyMethodDef py_lv_draw_mask_rect_def = { - "lv_draw_mask_rect", - (PyCFunction)py_lv_draw_mask_rect, +static PyMethodDef py_lv_fs_get_drv_def = { + "lv_fs_get_drv", + (PyCFunction)py_lv_fs_get_drv, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76527,31 +70876,29 @@ static PyMethodDef py_lv_draw_mask_rect_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) + * void lv_fs_remove_drive(char letter) */ -static PyObject *py_lv_snapshot_take(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_remove_drive(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + char letter = (char)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_take)(obj, cf); + ((void (*)(char))lv_fs_remove_drive)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_snapshot_take_def = { - "lv_snapshot_take", - (PyCFunction)py_lv_snapshot_take, +static PyMethodDef py_lv_fs_remove_drive_def = { + "lv_fs_remove_drive", + (PyCFunction)py_lv_fs_remove_drive, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76559,31 +70906,30 @@ static PyMethodDef py_lv_snapshot_take_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_snapshot_create_draw_buf(lv_obj_t *obj, lv_color_format_t cf) + * bool lv_fs_is_ready(char letter) */ -static PyObject *py_lv_snapshot_create_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_is_ready(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + long letter_val; + if (!PyArg_ParseTuple(py_args, "l", &letter_val)) { PyGILState_Release(gstate); return NULL; } + char letter = (char)letter_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_create_draw_buf)(obj, cf); + _res = ((bool (*)(char))lv_fs_is_ready)(letter); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_snapshot_create_draw_buf_def = { - "lv_snapshot_create_draw_buf", - (PyCFunction)py_lv_snapshot_create_draw_buf, +static PyMethodDef py_lv_fs_is_ready_def = { + "lv_fs_is_ready", + (PyCFunction)py_lv_fs_is_ready, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76591,31 +70937,31 @@ static PyMethodDef py_lv_snapshot_create_draw_buf_def = { /* * lvgl extension definition for: - * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) + * lv_fs_res_t lv_fs_path_get_size(const char *path, uint32_t *size_res) */ -static PyObject *py_lv_snapshot_reshape_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_path_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); + PyObject *path_py; PyObject *size_res_py; + if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_res_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); + uint32_t *size_res = mp_array_to_u32ptr(size_res_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_snapshot_reshape_draw_buf)(obj, draw_buf); + _res = ((lv_fs_res_t (*)(const char *, uint32_t *))lv_fs_path_get_size)(path, size_res); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_snapshot_reshape_draw_buf_def = { - "lv_snapshot_reshape_draw_buf", - (PyCFunction)py_lv_snapshot_reshape_draw_buf, +static PyMethodDef py_lv_fs_path_get_size_def = { + "lv_fs_path_get_size", + (PyCFunction)py_lv_fs_path_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76623,32 +70969,32 @@ static PyMethodDef py_lv_snapshot_reshape_draw_buf_def = { /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) + * lv_fs_res_t lv_fs_load_to_buf(void *buf, uint32_t buf_size, const char *path) */ -static PyObject *py_lv_snapshot_take_to_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_load_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "OOO", &obj_py, &cf_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); + PyObject *buf_py; long buf_size_val; PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "OlO", &buf_py, &buf_size_val, &path_py)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_fs_res_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_snapshot_take_to_draw_buf)(obj, cf, draw_buf); + _res = ((lv_fs_res_t (*)(void *, uint32_t, const char *))lv_fs_load_to_buf)(buf, buf_size, path); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_snapshot_take_to_draw_buf_def = { - "lv_snapshot_take_to_draw_buf", - (PyCFunction)py_lv_snapshot_take_to_draw_buf, +static PyMethodDef py_lv_fs_load_to_buf_def = { + "lv_fs_load_to_buf", + (PyCFunction)py_lv_fs_load_to_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76656,29 +71002,31 @@ static PyMethodDef py_lv_snapshot_take_to_draw_buf_def = { /* * lvgl extension definition for: - * void lv_snapshot_free(lv_image_dsc_t *dsc) + * void *lv_fs_load_with_alloc(const char *path, uint32_t *size) */ -static PyObject *py_lv_snapshot_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_load_with_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); + PyObject *path_py; PyObject *size_py; + if (!PyArg_ParseTuple(py_args, "OO", &path_py, &size_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); + uint32_t *size = mp_array_to_u32ptr(size_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_image_dsc_t *))lv_snapshot_free)(dsc); + _res = ((void *(*)(const char *, uint32_t *))lv_fs_load_with_alloc)(path, size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_snapshot_free_def = { - "lv_snapshot_free", - (PyCFunction)py_lv_snapshot_free, +static PyMethodDef py_lv_fs_load_with_alloc_def = { + "lv_fs_load_with_alloc", + (PyCFunction)py_lv_fs_load_with_alloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76686,34 +71034,30 @@ static PyMethodDef py_lv_snapshot_free_def = { /* * lvgl extension definition for: - * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) + * char *lv_fs_get_letters(char *buf) */ -static PyObject *py_lv_snapshot_take_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_letters(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *cf_py; PyObject *dsc_py; PyObject *buf_py; long buf_size_val; - if (!PyArg_ParseTuple(py_args, "OOOOl", &obj_py, &cf_py, &dsc_py, &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; + PyObject *buf_py; + if (!PyArg_ParseTuple(py_args, "O", &buf_py)) { PyGILState_Release(gstate); return NULL; } + char *buf = (char*)convert_from_str(buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + char * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_snapshot_take_to_buf)(obj, cf, dsc, buf, buf_size); + _res = ((char *(*)(char *))lv_fs_get_letters)(buf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_snapshot_take_to_buf_def = { - "lv_snapshot_take_to_buf", - (PyCFunction)py_lv_snapshot_take_to_buf, +static PyMethodDef py_lv_fs_get_letters_def = { + "lv_fs_get_letters", + (PyCFunction)py_lv_fs_get_letters, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76721,36 +71065,30 @@ static PyMethodDef py_lv_snapshot_take_to_buf_def = { /* * lvgl extension definition for: - * void lv_draw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) + * const char *lv_fs_get_ext(const char *fn) */ -static PyObject *py_lv_draw_i1_to_argb8888(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_ext(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_i1_py; PyObject *buf_argb8888_py; long width_val; long height_val; long buf_i1_stride_val; long buf_argb8888_stride_val; long index0_color_val; long index1_color_val; - if (!PyArg_ParseTuple(py_args, "OOllllll", &buf_i1_py, &buf_argb8888_py, &width_val, &height_val, &buf_i1_stride_val, &buf_argb8888_stride_val, &index0_color_val, &index1_color_val)) { PyGILState_Release(gstate); return NULL; } - const void *buf_i1 = (const void *)mp_to_ptr(buf_i1_py); - void *buf_argb8888 = mp_to_ptr(buf_argb8888_py); - uint32_t width = (uint32_t)width_val; - uint32_t height = (uint32_t)height_val; - uint32_t buf_i1_stride = (uint32_t)buf_i1_stride_val; - uint32_t buf_argb8888_stride = (uint32_t)buf_argb8888_stride_val; - uint32_t index0_color = (uint32_t)index0_color_val; - uint32_t index1_color = (uint32_t)index1_color_val; + PyObject *fn_py; + if (!PyArg_ParseTuple(py_args, "O", &fn_py)) { PyGILState_Release(gstate); return NULL; } + const char *fn = (const char *)(char*)convert_from_str(fn_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_draw_i1_to_argb8888)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); + _res = ((const char *(*)(const char *))lv_fs_get_ext)(fn); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_draw_i1_to_argb8888_def = { - "lv_draw_i1_to_argb8888", - (PyCFunction)py_lv_draw_i1_to_argb8888, +static PyMethodDef py_lv_fs_get_ext_def = { + "lv_fs_get_ext", + (PyCFunction)py_lv_fs_get_ext, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76758,30 +71096,30 @@ static PyMethodDef py_lv_draw_i1_to_argb8888_def = { /* * lvgl extension definition for: - * void lv_draw_rgb565_swap(void *buf, uint32_t buf_size_px) + * char *lv_fs_up(char *path) */ -static PyObject *py_lv_draw_rgb565_swap(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_up(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_px_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_px_val)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size_px = (uint32_t)buf_size_px_val; + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + char *path = (char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + char * _res; lvpy_lock(); - ((void (*)(void *, uint32_t))lv_draw_rgb565_swap)(buf, buf_size_px); + _res = ((char *(*)(char *))lv_fs_up)(path); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_draw_rgb565_swap_def = { - "lv_draw_rgb565_swap", - (PyCFunction)py_lv_draw_rgb565_swap, +static PyMethodDef py_lv_fs_up_def = { + "lv_fs_up", + (PyCFunction)py_lv_fs_up, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76789,30 +71127,30 @@ static PyMethodDef py_lv_draw_rgb565_swap_def = { /* * lvgl extension definition for: - * void lv_draw_i1_invert(void *buf, uint32_t buf_size) + * const char *lv_fs_get_last(const char *path) */ -static PyObject *py_lv_draw_i1_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_get_last(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const char * _res; lvpy_lock(); - ((void (*)(void *, uint32_t))lv_draw_i1_invert)(buf, buf_size); + _res = ((const char *(*)(const char *))lv_fs_get_last)(path); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_str((void*)_res); } -static PyMethodDef py_lv_draw_i1_invert_def = { - "lv_draw_i1_invert", - (PyCFunction)py_lv_draw_i1_invert, +static PyMethodDef py_lv_fs_get_last_def = { + "lv_fs_get_last", + (PyCFunction)py_lv_fs_get_last, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76820,35 +71158,33 @@ static PyMethodDef py_lv_draw_i1_invert_def = { /* * lvgl extension definition for: - * void lv_draw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) + * int lv_fs_path_join(char *buf, size_t buf_sz, const char *base, const char *end) */ -static PyObject *py_lv_draw_i1_convert_to_vtiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_path_join(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long buf_size_val; long width_val; long height_val; PyObject *out_buf_py; long out_buf_size_val; long bit_order_lsb_val; - if (!PyArg_ParseTuple(py_args, "OlllOll", &buf_py, &buf_size_val, &width_val, &height_val, &out_buf_py, &out_buf_size_val, &bit_order_lsb_val)) { PyGILState_Release(gstate); return NULL; } - const void *buf = (const void *)mp_to_ptr(buf_py); - uint32_t buf_size = (uint32_t)buf_size_val; - uint32_t width = (uint32_t)width_val; - uint32_t height = (uint32_t)height_val; - void *out_buf = mp_to_ptr(out_buf_py); - uint32_t out_buf_size = (uint32_t)out_buf_size_val; - bool bit_order_lsb = (bit_order_lsb_val != 0); + PyObject *buf_py; long buf_sz_val; PyObject *base_py; PyObject *end_py; + if (!PyArg_ParseTuple(py_args, "OlOO", &buf_py, &buf_sz_val, &base_py, &end_py)) { PyGILState_Release(gstate); return NULL; } + char *buf = (char*)convert_from_str(buf_py); + size_t buf_sz = (size_t)buf_sz_val; + const char *base = (const char *)(char*)convert_from_str(base_py); + const char *end = (const char *)(char*)convert_from_str(end_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int _res; lvpy_lock(); - ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_draw_i1_convert_to_vtiled)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); + _res = ((int (*)(char *, size_t, const char *, const char *))lv_fs_path_join)(buf, buf_sz, base, end); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_i1_convert_to_vtiled_def = { - "lv_draw_i1_convert_to_vtiled", - (PyCFunction)py_lv_draw_i1_convert_to_vtiled, +static PyMethodDef py_lv_fs_path_join_def = { + "lv_fs_path_join", + (PyCFunction)py_lv_fs_path_join, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76856,36 +71192,31 @@ static PyMethodDef py_lv_draw_i1_convert_to_vtiled_def = { /* * lvgl extension definition for: - * void lv_draw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) + * void lv_draw_image(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_draw_rotate(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_image(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *src_py; PyObject *dest_py; long src_width_val; long src_height_val; long src_stride_val; long dest_stride_val; PyObject *rotation_py; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "OOllllOO", &src_py, &dest_py, &src_width_val, &src_height_val, &src_stride_val, &dest_stride_val, &rotation_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - const void *src = (const void *)mp_to_ptr(src_py); - void *dest = mp_to_ptr(dest_py); - int32_t src_width = (int32_t)src_width_val; - int32_t src_height = (int32_t)src_height_val; - int32_t src_stride = (int32_t)src_stride_val; - int32_t dest_stride = (int32_t)dest_stride_val; - lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_draw_rotate)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); + ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_image)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_rotate_def = { - "lv_draw_rotate", - (PyCFunction)py_lv_draw_rotate, +static PyMethodDef py_lv_draw_image_def = { + "lv_draw_image", + (PyCFunction)py_lv_draw_image, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76893,30 +71224,31 @@ static PyMethodDef py_lv_draw_rotate_def = { /* * lvgl extension definition for: - * lv_font_t *lv_binfont_create(const char *path) + * void lv_draw_layer(lv_layer_t *layer, const lv_draw_image_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_binfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_layer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - const char *path = (const char *)(char*)convert_from_str(path_py); + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_image_dsc_t *dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_font_t * _res; lvpy_lock(); - _res = ((lv_font_t *(*)(const char *))lv_binfont_create)(path); + ((void (*)(lv_layer_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_layer)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_binfont_create_def = { - "lv_binfont_create", - (PyCFunction)py_lv_binfont_create, +static PyMethodDef py_lv_draw_layer_def = { + "lv_draw_layer", + (PyCFunction)py_lv_draw_layer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76924,31 +71256,30 @@ static PyMethodDef py_lv_binfont_create_def = { /* * lvgl extension definition for: - * lv_font_t *lv_binfont_create_from_buffer(void *buffer, uint32_t size) + * void lv_draw_line(lv_layer_t *layer, const lv_draw_line_dsc_t *dsc) */ -static PyObject *py_lv_binfont_create_from_buffer(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buffer_py; long size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &buffer_py, &size_val)) { PyGILState_Release(gstate); return NULL; } - void *buffer = mp_to_ptr(buffer_py); - uint32_t size = (uint32_t)size_val; + PyObject *layer_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_font_t * _res; lvpy_lock(); - _res = ((lv_font_t *(*)(void *, uint32_t))lv_binfont_create_from_buffer)(buffer, size); + ((void (*)(lv_layer_t *, const lv_draw_line_dsc_t *))lv_draw_line)(layer, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_binfont_create_from_buffer_def = { - "lv_binfont_create_from_buffer", - (PyCFunction)py_lv_binfont_create_from_buffer, +static PyMethodDef py_lv_draw_line_def = { + "lv_draw_line", + (PyCFunction)py_lv_draw_line, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -76956,103 +71287,67 @@ static PyMethodDef py_lv_binfont_create_from_buffer_def = { /* * lvgl extension definition for: - * void lv_binfont_destroy(lv_font_t *font) + * void lv_draw_arc(lv_layer_t *layer, const lv_draw_arc_dsc_t *dsc) */ -static PyObject *py_lv_binfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_arc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *font_py; - if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_t *font = mp_write_ptr_lv_font_t(font_py); + PyObject *layer_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_font_t *))lv_binfont_destroy)(font); + ((void (*)(lv_layer_t *, const lv_draw_arc_dsc_t *))lv_draw_arc)(layer, dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_binfont_destroy_def = { - "lv_binfont_destroy", - (PyCFunction)py_lv_binfont_destroy, +static PyMethodDef py_lv_draw_arc_def = { + "lv_draw_arc", + (PyCFunction)py_lv_draw_arc, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_imgfont_create_path_cb (CPython) - * const void *lv_imgfont_get_path_cb_t(const lv_font_t *font, uint32_t unicode, uint32_t unicode_next, int32_t *offset_y, void *user_data) - */ -static const void * lv_imgfont_create_path_cb_callback(const lv_font_t *arg0, uint32_t arg1, uint32_t arg2, int32_t *arg3, void *arg4) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg4); - if (!callbacks) { PyGILState_Release(gstate); return NULL; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_imgfont_create_path_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return NULL; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); - PyObject *py_arg1 = mp_obj_new_int_from_uint(arg1); - PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); - PyObject *py_arg3 = mp_array_from_i32ptr((void*)arg3); - PyObject *py_arg4 = ptr_to_mp((void*)arg4); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3 && py_arg4) ? PyTuple_Pack(5, py_arg0, py_arg1, py_arg2, py_arg3, py_arg4) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - Py_XDECREF(py_arg3); - Py_XDECREF(py_arg4); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return NULL; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return NULL; } - const void * _c_res = mp_to_ptr(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * lvgl extension definition for: - * lv_font_t *lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void *user_data) + * void lv_draw_arc_get_area(int32_t x, int32_t y, uint16_t radius, lv_value_precise_t start_angle, lv_value_precise_t end_angle, int32_t w, bool rounded, lv_area_t *area) */ -static PyObject *py_lv_imgfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_arc_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long height_val; PyObject *path_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "lOO", &height_val, &path_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - uint16_t height = (uint16_t)height_val; - void *path_cb = mp_lv_callback(path_cb_py, &lv_imgfont_create_path_cb_callback, "lv_imgfont_create_path_cb", &user_data, NULL, (NULL), (NULL)); + long x_val; long y_val; long radius_val; PyObject *start_angle_py; PyObject *end_angle_py; long w_val; long rounded_val; PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "lllOOllO", &x_val, &y_val, &radius_val, &start_angle_py, &end_angle_py, &w_val, &rounded_val, &area_py)) { PyGILState_Release(gstate); return NULL; } + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + uint16_t radius = (uint16_t)radius_val; + lv_value_precise_t start_angle = (float)mp_obj_get_float(start_angle_py); + lv_value_precise_t end_angle = (float)mp_obj_get_float(end_angle_py); + int32_t w = (int32_t)w_val; + bool rounded = (rounded_val != 0); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_font_t * _res; lvpy_lock(); - _res = ((lv_font_t *(*)(uint16_t, lv_imgfont_get_path_cb_t, void *))lv_imgfont_create)(height, path_cb, user_data); + ((void (*)(int32_t, int32_t, uint16_t, lv_value_precise_t, lv_value_precise_t, int32_t, bool, lv_area_t *))lv_draw_arc_get_area)(x, y, radius, start_angle, end_angle, w, rounded, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_imgfont_create_def = { - "lv_imgfont_create", - (PyCFunction)py_lv_imgfont_create, +static PyMethodDef py_lv_draw_arc_get_area_def = { + "lv_draw_arc_get_area", + (PyCFunction)py_lv_draw_arc_get_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77060,29 +71355,30 @@ static PyMethodDef py_lv_imgfont_create_def = { /* * lvgl extension definition for: - * void lv_imgfont_destroy(lv_font_t *font) + * void lv_draw_triangle(lv_layer_t *layer, const lv_draw_triangle_dsc_t *draw_dsc) */ -static PyObject *py_lv_imgfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_triangle(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *font_py; - if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_t *font = mp_write_ptr_lv_font_t(font_py); + PyObject *layer_py; PyObject *draw_dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &draw_dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_triangle_dsc_t *draw_dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(draw_dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_font_t *))lv_imgfont_destroy)(font); + ((void (*)(lv_layer_t *, const lv_draw_triangle_dsc_t *))lv_draw_triangle)(layer, draw_dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_imgfont_destroy_def = { - "lv_imgfont_destroy", - (PyCFunction)py_lv_imgfont_destroy, +static PyMethodDef py_lv_draw_triangle_def = { + "lv_draw_triangle", + (PyCFunction)py_lv_draw_triangle, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77090,28 +71386,31 @@ static PyMethodDef py_lv_imgfont_destroy_def = { /* * lvgl extension definition for: - * void lv_fs_memfs_init(void) + * void lv_draw_blur(lv_layer_t *layer, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_fs_memfs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_blur(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *layer_py; PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OOO", &layer_py, &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_fs_memfs_init)(); + ((void (*)(lv_layer_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_blur)(layer, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_memfs_init_def = { - "lv_fs_memfs_init", - (PyCFunction)py_lv_fs_memfs_init, +static PyMethodDef py_lv_draw_blur_def = { + "lv_draw_blur", + (PyCFunction)py_lv_draw_blur, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77119,9 +71418,9 @@ static PyMethodDef py_lv_fs_memfs_init_def = { /* * lvgl extension definition for: - * void lv_bin_decoder_init(void) + * lv_indev_t *lv_indev_create(void) */ -static PyObject *py_lv_bin_decoder_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -77130,17 +71429,18 @@ static PyObject *py_lv_bin_decoder_init(PyObject *self, PyObject *py_args, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_indev_t * _res; lvpy_lock(); - ((void (*)(void))lv_bin_decoder_init)(); + _res = ((lv_indev_t *(*)(void))lv_indev_create)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_indev_t((void*)_res); } -static PyMethodDef py_lv_bin_decoder_init_def = { - "lv_bin_decoder_init", - (PyCFunction)py_lv_bin_decoder_init, +static PyMethodDef py_lv_indev_create_def = { + "lv_indev_create", + (PyCFunction)py_lv_indev_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77148,32 +71448,29 @@ static PyMethodDef py_lv_bin_decoder_init_def = { /* * lvgl extension definition for: - * lv_result_t lv_bin_decoder_info(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) + * void lv_indev_read_timer_cb(lv_timer_t *timer) */ -static PyObject *py_lv_bin_decoder_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_read_timer_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; PyObject *header_py; - if (!PyArg_ParseTuple(py_args, "OOO", &decoder_py, &dsc_py, &header_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); - lv_image_header_t *header = mp_write_ptr_lv_image_header_t(header_py); + PyObject *timer_py; + if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, lv_image_header_t *))lv_bin_decoder_info)(decoder, dsc, header); + ((void (*)(lv_timer_t *))lv_indev_read_timer_cb)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_bin_decoder_info_def = { - "lv_bin_decoder_info", - (PyCFunction)py_lv_bin_decoder_info, +static PyMethodDef py_lv_indev_read_timer_cb_def = { + "lv_indev_read_timer_cb", + (PyCFunction)py_lv_indev_read_timer_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77181,33 +71478,29 @@ static PyMethodDef py_lv_bin_decoder_info_def = { /* * lvgl extension definition for: - * lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) + * lv_indev_t *lv_indev_active(void) */ -static PyObject *py_lv_bin_decoder_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_active(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; PyObject *full_area_py; PyObject *decoded_area_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &decoder_py, &dsc_py, &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); - const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); - lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_indev_t * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_bin_decoder_get_area)(decoder, dsc, full_area, decoded_area); + _res = ((lv_indev_t *(*)(void))lv_indev_active)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_indev_t((void*)_res); } -static PyMethodDef py_lv_bin_decoder_get_area_def = { - "lv_bin_decoder_get_area", - (PyCFunction)py_lv_bin_decoder_get_area, +static PyMethodDef py_lv_indev_active_def = { + "lv_indev_active", + (PyCFunction)py_lv_indev_active, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77215,31 +71508,29 @@ static PyMethodDef py_lv_bin_decoder_get_area_def = { /* * lvgl extension definition for: - * lv_result_t lv_bin_decoder_open(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + * lv_obj_t *lv_indev_get_active_obj(void) */ -static PyObject *py_lv_bin_decoder_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_get_active_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_open)(decoder, dsc); + _res = ((lv_obj_t *(*)(void))lv_indev_get_active_obj)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_bin_decoder_open_def = { - "lv_bin_decoder_open", - (PyCFunction)py_lv_bin_decoder_open, +static PyMethodDef py_lv_indev_get_active_obj_def = { + "lv_indev_get_active_obj", + (PyCFunction)py_lv_indev_get_active_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77247,30 +71538,31 @@ static PyMethodDef py_lv_bin_decoder_open_def = { /* * lvgl extension definition for: - * void lv_bin_decoder_close(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) + * lv_obj_t *lv_indev_search_obj(lv_obj_t *obj, lv_point_t *point) */ -static PyObject *py_lv_bin_decoder_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_search_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *decoder_py; PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); - lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + PyObject *obj_py; PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &point_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_close)(decoder, dsc); + _res = ((lv_obj_t *(*)(lv_obj_t *, lv_point_t *))lv_indev_search_obj)(obj, point); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_bin_decoder_close_def = { - "lv_bin_decoder_close", - (PyCFunction)py_lv_bin_decoder_close, +static PyMethodDef py_lv_indev_search_obj_def = { + "lv_indev_search_obj", + (PyCFunction)py_lv_indev_search_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77278,28 +71570,30 @@ static PyMethodDef py_lv_bin_decoder_close_def = { /* * lvgl extension definition for: - * void lv_lodepng_init(void) + * lv_subject_t *lv_subject_create(lv_subject_type_t type) */ -static PyObject *py_lv_lodepng_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *type_py; + if (!PyArg_ParseTuple(py_args, "O", &type_py)) { PyGILState_Release(gstate); return NULL; } + lv_subject_type_t type = (int)mp_obj_get_int(type_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_subject_t * _res; lvpy_lock(); - ((void (*)(void))lv_lodepng_init)(); + _res = ((lv_subject_t *(*)(lv_subject_type_t))lv_subject_create)(type); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_subject_t((void*)_res); } -static PyMethodDef py_lv_lodepng_init_def = { - "lv_lodepng_init", - (PyCFunction)py_lv_lodepng_init, +static PyMethodDef py_lv_subject_create_def = { + "lv_subject_create", + (PyCFunction)py_lv_subject_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77307,154 +71601,122 @@ static PyMethodDef py_lv_lodepng_init_def = { /* * lvgl extension definition for: - * void lv_lodepng_deinit(void) + * void lv_refr_now(lv_display_t *disp) */ -static PyObject *py_lv_lodepng_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_now(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *disp_py; + if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_lodepng_deinit)(); + ((void (*)(lv_display_t *))lv_refr_now)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_lodepng_deinit_def = { - "lv_lodepng_deinit", - (PyCFunction)py_lv_lodepng_deinit, +static PyMethodDef py_lv_refr_now_def = { + "lv_refr_now", + (PyCFunction)py_lv_refr_now, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_async_call_async_xcb (CPython) - * void lv_async_cb_t(void *) - */ -static void lv_async_call_async_xcb_callback(void *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_async_xcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) + * void lv_display_refr_timer(lv_timer_t *timer) */ -static PyObject *py_lv_async_call(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_refr_timer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *async_xcb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_async_xcb_callback, "lv_async_call_async_xcb", &user_data, NULL, (NULL), (NULL)); + PyObject *timer_py; + if (!PyArg_ParseTuple(py_args, "O", &timer_py)) { PyGILState_Release(gstate); return NULL; } + lv_timer_t *timer = mp_write_ptr_lv_timer_t(timer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call)(async_xcb, user_data); + ((void (*)(lv_timer_t *))lv_display_refr_timer)(timer); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_async_call_def = { - "lv_async_call", - (PyCFunction)py_lv_async_call, +static PyMethodDef py_lv_display_refr_timer_def = { + "lv_display_refr_timer", + (PyCFunction)py_lv_display_refr_timer, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_async_call_cancel_async_xcb (CPython) - * void lv_async_cb_t(void *) + * lvgl extension definition for: + * void lv_draw_mask_rect(lv_layer_t *layer, const lv_draw_mask_rect_dsc_t *dsc) */ -static void lv_async_call_cancel_async_xcb_callback(void *arg0) +static PyObject *py_lv_draw_mask_rect(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_cancel_async_xcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = ptr_to_mp((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)self; + (void)py_kwds; + PyObject *layer_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &layer_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_layer_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_mask_rect)(layer, dsc); + lvpy_unlock(); + PyGILState_Release(gstate); + Py_RETURN_NONE; } +static PyMethodDef py_lv_draw_mask_rect_def = { + "lv_draw_mask_rect", + (PyCFunction)py_lv_draw_mask_rect, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * lv_result_t lv_async_call_cancel(lv_async_cb_t async_xcb, void *user_data) + * lv_draw_buf_t *lv_snapshot_take(lv_obj_t *obj, lv_color_format_t cf) */ -static PyObject *py_lv_async_call_cancel(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_take(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *async_xcb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - void *user_data = mp_to_ptr(user_data_py); - void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_cancel_async_xcb_callback, "lv_async_call_cancel_async_xcb", &user_data, NULL, (NULL), (NULL)); + PyObject *obj_py; PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call_cancel)(async_xcb, user_data); + _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_take)(obj, cf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_async_call_cancel_def = { - "lv_async_call_cancel", - (PyCFunction)py_lv_async_call_cancel, +static PyMethodDef py_lv_snapshot_take_def = { + "lv_snapshot_take", + (PyCFunction)py_lv_snapshot_take, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77462,28 +71724,31 @@ static PyMethodDef py_lv_async_call_cancel_def = { /* * lvgl extension definition for: - * void lv_lock(void) + * lv_draw_buf_t *lv_snapshot_create_draw_buf(lv_obj_t *obj, lv_color_format_t cf) */ -static PyObject *py_lv_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_create_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *obj_py; PyObject *cf_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t * _res; lvpy_lock(); - ((void (*)(void))lv_lock)(); + _res = ((lv_draw_buf_t *(*)(lv_obj_t *, lv_color_format_t))lv_snapshot_create_draw_buf)(obj, cf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_lock_def = { - "lv_lock", - (PyCFunction)py_lv_lock, +static PyMethodDef py_lv_snapshot_create_draw_buf_def = { + "lv_snapshot_create_draw_buf", + (PyCFunction)py_lv_snapshot_create_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77491,29 +71756,31 @@ static PyMethodDef py_lv_lock_def = { /* * lvgl extension definition for: - * lv_result_t lv_lock_isr(void) + * lv_result_t lv_snapshot_reshape_draw_buf(lv_obj_t *obj, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_reshape_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *obj_py; PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(void))lv_lock_isr)(); + _res = ((lv_result_t (*)(lv_obj_t *, lv_draw_buf_t *))lv_snapshot_reshape_draw_buf)(obj, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_lock_isr_def = { - "lv_lock_isr", - (PyCFunction)py_lv_lock_isr, +static PyMethodDef py_lv_snapshot_reshape_draw_buf_def = { + "lv_snapshot_reshape_draw_buf", + (PyCFunction)py_lv_snapshot_reshape_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77521,28 +71788,32 @@ static PyMethodDef py_lv_lock_isr_def = { /* * lvgl extension definition for: - * void lv_unlock(void) + * lv_result_t lv_snapshot_take_to_draw_buf(lv_obj_t *obj, lv_color_format_t cf, lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_take_to_draw_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *obj_py; PyObject *cf_py; PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "OOO", &obj_py, &cf_py, &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + lv_draw_buf_t *draw_buf = mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(void))lv_unlock)(); + _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_draw_buf_t *))lv_snapshot_take_to_draw_buf)(obj, cf, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_unlock_def = { - "lv_unlock", - (PyCFunction)py_lv_unlock, +static PyMethodDef py_lv_snapshot_take_to_draw_buf_def = { + "lv_snapshot_take_to_draw_buf", + (PyCFunction)py_lv_snapshot_take_to_draw_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77550,29 +71821,29 @@ static PyMethodDef py_lv_unlock_def = { /* * lvgl extension definition for: - * void lv_sleep_ms(uint32_t ms) + * void lv_snapshot_free(lv_image_dsc_t *dsc) */ -static PyObject *py_lv_sleep_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_free(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long ms_val; - if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t ms = (uint32_t)ms_val; + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(uint32_t))lv_sleep_ms)(ms); + ((void (*)(lv_image_dsc_t *))lv_snapshot_free)(dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_sleep_ms_def = { - "lv_sleep_ms", - (PyCFunction)py_lv_sleep_ms, +static PyMethodDef py_lv_snapshot_free_def = { + "lv_snapshot_free", + (PyCFunction)py_lv_snapshot_free, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77580,29 +71851,34 @@ static PyMethodDef py_lv_sleep_ms_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_create(void) + * lv_result_t lv_snapshot_take_to_buf(lv_obj_t *obj, lv_color_format_t cf, lv_image_dsc_t *dsc, void *buf, uint32_t buf_size) */ -static PyObject *py_lv_theme_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_snapshot_take_to_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *obj_py; PyObject *cf_py; PyObject *dsc_py; PyObject *buf_py; long buf_size_val; + if (!PyArg_ParseTuple(py_args, "OOOOl", &obj_py, &cf_py, &dsc_py, &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + lv_image_dsc_t *dsc = mp_write_ptr_lv_image_dsc_t(dsc_py); + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(void))lv_theme_create)(); + _res = ((lv_result_t (*)(lv_obj_t *, lv_color_format_t, lv_image_dsc_t *, void *, uint32_t))lv_snapshot_take_to_buf)(obj, cf, dsc, buf, buf_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_theme_create_def = { - "lv_theme_create", - (PyCFunction)py_lv_theme_create, +static PyMethodDef py_lv_snapshot_take_to_buf_def = { + "lv_snapshot_take_to_buf", + (PyCFunction)py_lv_snapshot_take_to_buf, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77610,30 +71886,36 @@ static PyMethodDef py_lv_theme_create_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) + * void lv_draw_i1_to_argb8888(const void *buf_i1, void *buf_argb8888, uint32_t width, uint32_t height, uint32_t buf_i1_stride, uint32_t buf_argb8888_stride, uint32_t index0_color, uint32_t index1_color) */ -static PyObject *py_lv_theme_get_from_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_i1_to_argb8888(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *buf_i1_py; PyObject *buf_argb8888_py; long width_val; long height_val; long buf_i1_stride_val; long buf_argb8888_stride_val; long index0_color_val; long index1_color_val; + if (!PyArg_ParseTuple(py_args, "OOllllll", &buf_i1_py, &buf_argb8888_py, &width_val, &height_val, &buf_i1_stride_val, &buf_argb8888_stride_val, &index0_color_val, &index1_color_val)) { PyGILState_Release(gstate); return NULL; } + const void *buf_i1 = (const void *)mp_to_ptr(buf_i1_py); + void *buf_argb8888 = mp_to_ptr(buf_argb8888_py); + uint32_t width = (uint32_t)width_val; + uint32_t height = (uint32_t)height_val; + uint32_t buf_i1_stride = (uint32_t)buf_i1_stride_val; + uint32_t buf_argb8888_stride = (uint32_t)buf_argb8888_stride_val; + uint32_t index0_color = (uint32_t)index0_color_val; + uint32_t index1_color = (uint32_t)index1_color_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(lv_obj_t *))lv_theme_get_from_obj)(obj); + ((void (*)(const void *, void *, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t))lv_draw_i1_to_argb8888)(buf_i1, buf_argb8888, width, height, buf_i1_stride, buf_argb8888_stride, index0_color, index1_color); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_from_obj_def = { - "lv_theme_get_from_obj", - (PyCFunction)py_lv_theme_get_from_obj, +static PyMethodDef py_lv_draw_i1_to_argb8888_def = { + "lv_draw_i1_to_argb8888", + (PyCFunction)py_lv_draw_i1_to_argb8888, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77641,29 +71923,30 @@ static PyMethodDef py_lv_theme_get_from_obj_def = { /* * lvgl extension definition for: - * void lv_theme_apply(lv_obj_t *obj) + * void lv_draw_rgb565_swap(void *buf, uint32_t buf_size_px) */ -static PyObject *py_lv_theme_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_rgb565_swap(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *buf_py; long buf_size_px_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_px_val)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size_px = (uint32_t)buf_size_px_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_theme_apply)(obj); + ((void (*)(void *, uint32_t))lv_draw_rgb565_swap)(buf, buf_size_px); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_apply_def = { - "lv_theme_apply", - (PyCFunction)py_lv_theme_apply, +static PyMethodDef py_lv_draw_rgb565_swap_def = { + "lv_draw_rgb565_swap", + (PyCFunction)py_lv_draw_rgb565_swap, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77671,30 +71954,30 @@ static PyMethodDef py_lv_theme_apply_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) + * void lv_draw_i1_invert(void *buf, uint32_t buf_size) */ -static PyObject *py_lv_theme_get_font_small(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_i1_invert(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *buf_py; long buf_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buf_py, &buf_size_val)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_small)(obj); + ((void (*)(void *, uint32_t))lv_draw_i1_invert)(buf, buf_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_font_small_def = { - "lv_theme_get_font_small", - (PyCFunction)py_lv_theme_get_font_small, +static PyMethodDef py_lv_draw_i1_invert_def = { + "lv_draw_i1_invert", + (PyCFunction)py_lv_draw_i1_invert, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77702,30 +71985,35 @@ static PyMethodDef py_lv_theme_get_font_small_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_normal(lv_obj_t *obj) + * void lv_draw_i1_convert_to_vtiled(const void *buf, uint32_t buf_size, uint32_t width, uint32_t height, void *out_buf, uint32_t out_buf_size, bool bit_order_lsb) */ -static PyObject *py_lv_theme_get_font_normal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_i1_convert_to_vtiled(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *buf_py; long buf_size_val; long width_val; long height_val; PyObject *out_buf_py; long out_buf_size_val; long bit_order_lsb_val; + if (!PyArg_ParseTuple(py_args, "OlllOll", &buf_py, &buf_size_val, &width_val, &height_val, &out_buf_py, &out_buf_size_val, &bit_order_lsb_val)) { PyGILState_Release(gstate); return NULL; } + const void *buf = (const void *)mp_to_ptr(buf_py); + uint32_t buf_size = (uint32_t)buf_size_val; + uint32_t width = (uint32_t)width_val; + uint32_t height = (uint32_t)height_val; + void *out_buf = mp_to_ptr(out_buf_py); + uint32_t out_buf_size = (uint32_t)out_buf_size_val; + bool bit_order_lsb = (bit_order_lsb_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_normal)(obj); + ((void (*)(const void *, uint32_t, uint32_t, uint32_t, void *, uint32_t, bool))lv_draw_i1_convert_to_vtiled)(buf, buf_size, width, height, out_buf, out_buf_size, bit_order_lsb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_font_normal_def = { - "lv_theme_get_font_normal", - (PyCFunction)py_lv_theme_get_font_normal, +static PyMethodDef py_lv_draw_i1_convert_to_vtiled_def = { + "lv_draw_i1_convert_to_vtiled", + (PyCFunction)py_lv_draw_i1_convert_to_vtiled, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77733,30 +72021,36 @@ static PyMethodDef py_lv_theme_get_font_normal_def = { /* * lvgl extension definition for: - * const lv_font_t *lv_theme_get_font_large(lv_obj_t *obj) + * void lv_draw_rotate(const void *src, void *dest, int32_t src_width, int32_t src_height, int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation, lv_color_format_t color_format) */ -static PyObject *py_lv_theme_get_font_large(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_rotate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *src_py; PyObject *dest_py; long src_width_val; long src_height_val; long src_stride_val; long dest_stride_val; PyObject *rotation_py; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "OOllllOO", &src_py, &dest_py, &src_width_val, &src_height_val, &src_stride_val, &dest_stride_val, &rotation_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + const void *src = (const void *)mp_to_ptr(src_py); + void *dest = mp_to_ptr(dest_py); + int32_t src_width = (int32_t)src_width_val; + int32_t src_height = (int32_t)src_height_val; + int32_t src_stride = (int32_t)src_stride_val; + int32_t dest_stride = (int32_t)dest_stride_val; + lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - const lv_font_t * _res; lvpy_lock(); - _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_large)(obj); + ((void (*)(const void *, void *, int32_t, int32_t, int32_t, int32_t, lv_display_rotation_t, lv_color_format_t))lv_draw_rotate)(src, dest, src_width, src_height, src_stride, dest_stride, rotation, color_format); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_font_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_get_font_large_def = { - "lv_theme_get_font_large", - (PyCFunction)py_lv_theme_get_font_large, +static PyMethodDef py_lv_draw_rotate_def = { + "lv_draw_rotate", + (PyCFunction)py_lv_draw_rotate, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77764,30 +72058,30 @@ static PyMethodDef py_lv_theme_get_font_large_def = { /* * lvgl extension definition for: - * lv_color_t lv_theme_get_color_primary(lv_obj_t *obj) + * lv_font_t *lv_binfont_create(const char *path) */ -static PyObject *py_lv_theme_get_color_primary(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_binfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_font_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_primary)(obj); + _res = ((lv_font_t *(*)(const char *))lv_binfont_create)(path); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_theme_get_color_primary_def = { - "lv_theme_get_color_primary", - (PyCFunction)py_lv_theme_get_color_primary, +static PyMethodDef py_lv_binfont_create_def = { + "lv_binfont_create", + (PyCFunction)py_lv_binfont_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77795,30 +72089,31 @@ static PyMethodDef py_lv_theme_get_color_primary_def = { /* * lvgl extension definition for: - * lv_color_t lv_theme_get_color_secondary(lv_obj_t *obj) + * lv_font_t *lv_binfont_create_from_buffer(void *buffer, uint32_t size) */ -static PyObject *py_lv_theme_get_color_secondary(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_binfont_create_from_buffer(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + PyObject *buffer_py; long size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &buffer_py, &size_val)) { PyGILState_Release(gstate); return NULL; } + void *buffer = mp_to_ptr(buffer_py); + uint32_t size = (uint32_t)size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_font_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_secondary)(obj); + _res = ((lv_font_t *(*)(void *, uint32_t))lv_binfont_create_from_buffer)(buffer, size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_theme_get_color_secondary_def = { - "lv_theme_get_color_secondary", - (PyCFunction)py_lv_theme_get_color_secondary, +static PyMethodDef py_lv_binfont_create_from_buffer_def = { + "lv_binfont_create_from_buffer", + (PyCFunction)py_lv_binfont_create_from_buffer, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77826,64 +72121,103 @@ static PyMethodDef py_lv_theme_get_color_secondary_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) + * void lv_binfont_destroy(lv_font_t *font) */ -static PyObject *py_lv_theme_default_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_binfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *disp_py; PyObject *color_primary_py; PyObject *color_secondary_py; long dark_val; PyObject *font_py; - if (!PyArg_ParseTuple(py_args, "OOOlO", &disp_py, &color_primary_py, &color_secondary_py, &dark_val, &font_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); - lv_color_t color_primary = mp_write_lv_color_t(color_primary_py); - lv_color_t color_secondary = mp_write_lv_color_t(color_secondary_py); - bool dark = (dark_val != 0); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + PyObject *font_py; + if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_t *font = mp_write_ptr_lv_font_t(font_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_theme_default_init)(disp, color_primary, color_secondary, dark, font); + ((void (*)(lv_font_t *))lv_binfont_destroy)(font); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_default_init_def = { - "lv_theme_default_init", - (PyCFunction)py_lv_theme_default_init, +static PyMethodDef py_lv_binfont_destroy_def = { + "lv_binfont_destroy", + (PyCFunction)py_lv_binfont_destroy, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_imgfont_create_path_cb (CPython) + * const void *lv_imgfont_get_path_cb_t(const lv_font_t *font, uint32_t unicode, uint32_t unicode_next, int32_t *offset_y, void *user_data) + */ +static const void * lv_imgfont_create_path_cb_callback(const lv_font_t *arg0, uint32_t arg1, uint32_t arg2, int32_t *arg3, void *arg4) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg4); + if (!callbacks) { PyGILState_Release(gstate); return NULL; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_imgfont_create_path_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return NULL; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); + PyObject *py_arg1 = mp_obj_new_int_from_uint(arg1); + PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); + PyObject *py_arg3 = mp_array_from_i32ptr((void*)arg3); + PyObject *py_arg4 = ptr_to_mp((void*)arg4); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3 && py_arg4) ? PyTuple_Pack(5, py_arg0, py_arg1, py_arg2, py_arg3, py_arg4) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + Py_XDECREF(py_arg3); + Py_XDECREF(py_arg4); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return NULL; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return NULL; } + const void * _c_res = mp_to_ptr(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * lvgl extension definition for: - * bool lv_theme_default_is_inited(void) + * lv_font_t *lv_imgfont_create(uint16_t height, lv_imgfont_get_path_cb_t path_cb, void *user_data) */ -static PyObject *py_lv_theme_default_is_inited(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imgfont_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long height_val; PyObject *path_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "lOO", &height_val, &path_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + uint16_t height = (uint16_t)height_val; + void *path_cb = mp_lv_callback(path_cb_py, &lv_imgfont_create_path_cb_callback, "lv_imgfont_create_path_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_font_t * _res; lvpy_lock(); - _res = ((bool (*)(void))lv_theme_default_is_inited)(); + _res = ((lv_font_t *(*)(uint16_t, lv_imgfont_get_path_cb_t, void *))lv_imgfont_create)(height, path_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_theme_default_is_inited_def = { - "lv_theme_default_is_inited", - (PyCFunction)py_lv_theme_default_is_inited, +static PyMethodDef py_lv_imgfont_create_def = { + "lv_imgfont_create", + (PyCFunction)py_lv_imgfont_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77891,29 +72225,29 @@ static PyMethodDef py_lv_theme_default_is_inited_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_theme_default_get(void) + * void lv_imgfont_destroy(lv_font_t *font) */ -static PyObject *py_lv_theme_default_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_imgfont_destroy(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *font_py; + if (!PyArg_ParseTuple(py_args, "O", &font_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_t *font = mp_write_ptr_lv_font_t(font_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(void))lv_theme_default_get)(); + ((void (*)(lv_font_t *))lv_imgfont_destroy)(font); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_default_get_def = { - "lv_theme_default_get", - (PyCFunction)py_lv_theme_default_get, +static PyMethodDef py_lv_imgfont_destroy_def = { + "lv_imgfont_destroy", + (PyCFunction)py_lv_imgfont_destroy, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77921,9 +72255,9 @@ static PyMethodDef py_lv_theme_default_get_def = { /* * lvgl extension definition for: - * void lv_theme_default_deinit(void) + * void lv_fs_memfs_init(void) */ -static PyObject *py_lv_theme_default_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_memfs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -77933,16 +72267,16 @@ static PyObject *py_lv_theme_default_deinit(PyObject *self, PyObject *py_args, P if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_theme_default_deinit)(); + ((void (*)(void))lv_fs_memfs_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_theme_default_deinit_def = { - "lv_theme_default_deinit", - (PyCFunction)py_lv_theme_default_deinit, +static PyMethodDef py_lv_fs_memfs_init_def = { + "lv_fs_memfs_init", + (PyCFunction)py_lv_fs_memfs_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77950,31 +72284,28 @@ static PyMethodDef py_lv_theme_default_deinit_def = { /* * lvgl extension definition for: - * void lv_tick_inc(uint32_t tick_period) + * void lv_bin_decoder_init(void) */ -static PyObject *py_lv_tick_inc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long tick_period_val; - if (!PyArg_ParseTuple(py_args, "l", &tick_period_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t tick_period = (uint32_t)tick_period_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - Py_BEGIN_ALLOW_THREADS - ((void (*)(uint32_t))lv_tick_inc)(tick_period); - Py_END_ALLOW_THREADS + ((void (*)(void))lv_bin_decoder_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_tick_inc_def = { - "lv_tick_inc", - (PyCFunction)py_lv_tick_inc, +static PyMethodDef py_lv_bin_decoder_init_def = { + "lv_bin_decoder_init", + (PyCFunction)py_lv_bin_decoder_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -77982,29 +72313,32 @@ static PyMethodDef py_lv_tick_inc_def = { /* * lvgl extension definition for: - * uint32_t lv_tick_get(void) + * lv_result_t lv_bin_decoder_info(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, lv_image_header_t *header) */ -static PyObject *py_lv_tick_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_info(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *decoder_py; PyObject *dsc_py; PyObject *header_py; + if (!PyArg_ParseTuple(py_args, "OOO", &decoder_py, &dsc_py, &header_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + lv_image_header_t *header = mp_write_ptr_lv_image_header_t(header_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_tick_get)(); + _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, lv_image_header_t *))lv_bin_decoder_info)(decoder, dsc, header); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_tick_get_def = { - "lv_tick_get", - (PyCFunction)py_lv_tick_get, +static PyMethodDef py_lv_bin_decoder_info_def = { + "lv_bin_decoder_info", + (PyCFunction)py_lv_bin_decoder_info, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78012,30 +72346,33 @@ static PyMethodDef py_lv_tick_get_def = { /* * lvgl extension definition for: - * uint32_t lv_tick_elaps(uint32_t prev_tick) + * lv_result_t lv_bin_decoder_get_area(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc, const lv_area_t *full_area, lv_area_t *decoded_area) */ -static PyObject *py_lv_tick_elaps(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_get_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long prev_tick_val; - if (!PyArg_ParseTuple(py_args, "l", &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t prev_tick = (uint32_t)prev_tick_val; + PyObject *decoder_py; PyObject *dsc_py; PyObject *full_area_py; PyObject *decoded_area_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &decoder_py, &dsc_py, &full_area_py, &decoded_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); + const lv_area_t *full_area = (const lv_area_t *)mp_write_ptr_lv_area_t(full_area_py); + lv_area_t *decoded_area = mp_write_ptr_lv_area_t(decoded_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t))lv_tick_elaps)(prev_tick); + _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *, const lv_area_t *, lv_area_t *))lv_bin_decoder_get_area)(decoder, dsc, full_area, decoded_area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_tick_elaps_def = { - "lv_tick_elaps", - (PyCFunction)py_lv_tick_elaps, +static PyMethodDef py_lv_bin_decoder_get_area_def = { + "lv_bin_decoder_get_area", + (PyCFunction)py_lv_bin_decoder_get_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78043,31 +72380,31 @@ static PyMethodDef py_lv_tick_elaps_def = { /* * lvgl extension definition for: - * uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick) + * lv_result_t lv_bin_decoder_open(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) */ -static PyObject *py_lv_tick_diff(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_open(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long tick_val; long prev_tick_val; - if (!PyArg_ParseTuple(py_args, "ll", &tick_val, &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t tick = (uint32_t)tick_val; - uint32_t prev_tick = (uint32_t)prev_tick_val; + PyObject *decoder_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(uint32_t, uint32_t))lv_tick_diff)(tick, prev_tick); + _res = ((lv_result_t (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_open)(decoder, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_tick_diff_def = { - "lv_tick_diff", - (PyCFunction)py_lv_tick_diff, +static PyMethodDef py_lv_bin_decoder_open_def = { + "lv_bin_decoder_open", + (PyCFunction)py_lv_bin_decoder_open, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78075,162 +72412,214 @@ static PyMethodDef py_lv_tick_diff_def = { /* * lvgl extension definition for: - * void lv_delay_ms(uint32_t ms) + * void lv_bin_decoder_close(lv_image_decoder_t *decoder, lv_image_decoder_dsc_t *dsc) */ -static PyObject *py_lv_delay_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_bin_decoder_close(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long ms_val; - if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t ms = (uint32_t)ms_val; + PyObject *decoder_py; PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "OO", &decoder_py, &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_image_decoder_t *decoder = mp_write_ptr_lv_image_decoder_t(decoder_py); + lv_image_decoder_dsc_t *dsc = mp_write_ptr_lv_image_decoder_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(uint32_t))lv_delay_ms)(ms); + ((void (*)(lv_image_decoder_t *, lv_image_decoder_dsc_t *))lv_bin_decoder_close)(decoder, dsc); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_delay_ms_def = { - "lv_delay_ms", - (PyCFunction)py_lv_delay_ms, +static PyMethodDef py_lv_bin_decoder_close_def = { + "lv_bin_decoder_close", + (PyCFunction)py_lv_bin_decoder_close, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback cannot be the first argument - * lv_delay_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_delay_set_cb(lv_delay_cb_t cb) + * void lv_lodepng_init(void) */ -static PyObject *py_lv_delay_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lodepng_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } - void *cb = NULL; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_delay_cb_t))lv_delay_set_cb)(cb); + ((void (*)(void))lv_lodepng_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_delay_set_cb_def = { - "lv_delay_set_cb", - (PyCFunction)py_lv_delay_set_cb, +static PyMethodDef py_lv_lodepng_init_def = { + "lv_lodepng_init", + (PyCFunction)py_lv_lodepng_init, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback cannot be the first argument - * lv_tick_get_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_tick_set_cb(lv_tick_get_cb_t cb) + * void lv_lodepng_deinit(void) */ -static PyObject *py_lv_tick_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lodepng_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } - void *cb = NULL; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_tick_get_cb_t))lv_tick_set_cb)(cb); + ((void (*)(void))lv_lodepng_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_tick_set_cb_def = { - "lv_tick_set_cb", - (PyCFunction)py_lv_tick_set_cb, +static PyMethodDef py_lv_lodepng_deinit_def = { + "lv_lodepng_deinit", + (PyCFunction)py_lv_lodepng_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_async_call_async_xcb (CPython) + * void lv_async_cb_t(void *) + */ +static void lv_async_call_async_xcb_callback(void *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_async_xcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_tick_get_cb_t lv_tick_get_cb(void) + * lv_result_t lv_async_call(lv_async_cb_t async_xcb, void *user_data) */ -static PyObject *py_lv_tick_get_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_async_call(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *async_xcb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_async_xcb_callback, "lv_async_call_async_xcb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_tick_get_cb_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_tick_get_cb_t (*)(void))lv_tick_get_cb)(); + _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call)(async_xcb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_tick_get_cb_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_tick_get_cb_def = { - "lv_tick_get_cb", - (PyCFunction)py_lv_tick_get_cb, +static PyMethodDef py_lv_async_call_def = { + "lv_async_call", + (PyCFunction)py_lv_async_call, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_async_call_cancel_async_xcb (CPython) + * void lv_async_cb_t(void *) + */ +static void lv_async_call_cancel_async_xcb_callback(void *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_async_call_cancel_async_xcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = ptr_to_mp((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_span_stack_init(void) + * lv_result_t lv_async_call_cancel(lv_async_cb_t async_xcb, void *user_data) */ -static PyObject *py_lv_span_stack_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_async_call_cancel(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *async_xcb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &async_xcb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + void *user_data = mp_to_ptr(user_data_py); + void *async_xcb = mp_lv_callback(async_xcb_py, &lv_async_call_cancel_async_xcb_callback, "lv_async_call_cancel_async_xcb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(void))lv_span_stack_init)(); + _res = ((lv_result_t (*)(lv_async_cb_t, void *))lv_async_call_cancel)(async_xcb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_span_stack_init_def = { - "lv_span_stack_init", - (PyCFunction)py_lv_span_stack_init, +static PyMethodDef py_lv_async_call_cancel_def = { + "lv_async_call_cancel", + (PyCFunction)py_lv_async_call_cancel, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78238,9 +72627,9 @@ static PyMethodDef py_lv_span_stack_init_def = { /* * lvgl extension definition for: - * void lv_span_stack_deinit(void) + * void lv_lock(void) */ -static PyObject *py_lv_span_stack_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78250,16 +72639,16 @@ static PyObject *py_lv_span_stack_deinit(PyObject *self, PyObject *py_args, PyOb if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_span_stack_deinit)(); + ((void (*)(void))lv_lock)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_span_stack_deinit_def = { - "lv_span_stack_deinit", - (PyCFunction)py_lv_span_stack_deinit, +static PyMethodDef py_lv_lock_def = { + "lv_lock", + (PyCFunction)py_lv_lock, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78267,9 +72656,9 @@ static PyMethodDef py_lv_span_stack_deinit_def = { /* * lvgl extension definition for: - * void lv_os_init(void) + * lv_result_t lv_lock_isr(void) */ -static PyObject *py_lv_os_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lock_isr(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78278,17 +72667,18 @@ static PyObject *py_lv_os_init(PyObject *self, PyObject *py_args, PyObject *py_k if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(void))lv_os_init)(); + _res = ((lv_result_t (*)(void))lv_lock_isr)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_os_init_def = { - "lv_os_init", - (PyCFunction)py_lv_os_init, +static PyMethodDef py_lv_lock_isr_def = { + "lv_lock_isr", + (PyCFunction)py_lv_lock_isr, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78296,9 +72686,9 @@ static PyMethodDef py_lv_os_init_def = { /* * lvgl extension definition for: - * uint32_t lv_os_get_idle_percent(void) + * void lv_unlock(void) */ -static PyObject *py_lv_os_get_idle_percent(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_unlock(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78307,59 +72697,47 @@ static PyObject *py_lv_os_get_idle_percent(PyObject *self, PyObject *py_args, Py if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(void))lv_os_get_idle_percent)(); + ((void (*)(void))lv_unlock)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_os_get_idle_percent_def = { - "lv_os_get_idle_percent", - (PyCFunction)py_lv_os_get_idle_percent, +static PyMethodDef py_lv_unlock_def = { + "lv_unlock", + (PyCFunction)py_lv_unlock, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) - * lv_iter_next_cb next_cb - */ - - /* * lvgl extension definition for: - * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) + * void lv_sleep_ms(uint32_t ms) */ -static PyObject *py_lv_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_sleep_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *instance_py; long elem_size_val; long context_size_val; PyObject *next_cb_py; - if (!PyArg_ParseTuple(py_args, "OllO", &instance_py, &elem_size_val, &context_size_val, &next_cb_py)) { PyGILState_Release(gstate); return NULL; } - void *instance = mp_to_ptr(instance_py); - uint32_t elem_size = (uint32_t)elem_size_val; - uint32_t context_size = (uint32_t)context_size_val; - void *next_cb = NULL; + long ms_val; + if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t ms = (uint32_t)ms_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_iter_t * _res; lvpy_lock(); - _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_iter_create)(instance, elem_size, context_size, next_cb); + ((void (*)(uint32_t))lv_sleep_ms)(ms); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_iter_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_iter_create_def = { - "lv_iter_create", - (PyCFunction)py_lv_iter_create, +static PyMethodDef py_lv_sleep_ms_def = { + "lv_sleep_ms", + (PyCFunction)py_lv_sleep_ms, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78367,31 +72745,29 @@ static PyMethodDef py_lv_iter_create_def = { /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) + * lv_theme_t *lv_theme_create(void) */ -static PyObject *py_lv_cache_entry_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long node_size_val; PyObject *cache_py; - if (!PyArg_ParseTuple(py_args, "lO", &node_size_val, &cache_py)) { PyGILState_Release(gstate); return NULL; } - const uint32_t node_size = (const uint32_t)node_size_val; - const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_cache_entry_alloc)(node_size, cache); + _res = ((lv_theme_t *(*)(void))lv_theme_create)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_cache_entry_alloc_def = { - "lv_cache_entry_alloc", - (PyCFunction)py_lv_cache_entry_alloc, +static PyMethodDef py_lv_theme_create_def = { + "lv_theme_create", + (PyCFunction)py_lv_theme_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78399,30 +72775,30 @@ static PyMethodDef py_lv_cache_entry_alloc_def = { /* * lvgl extension definition for: - * uint32_t lv_cache_entry_get_size(const uint32_t node_size) + * lv_theme_t *lv_theme_get_from_obj(lv_obj_t *obj) */ -static PyObject *py_lv_cache_entry_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_from_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long node_size_val; - if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } - const uint32_t node_size = (const uint32_t)node_size_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const uint32_t))lv_cache_entry_get_size)(node_size); + _res = ((lv_theme_t *(*)(lv_obj_t *))lv_theme_get_from_obj)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_cache_entry_get_size_def = { - "lv_cache_entry_get_size", - (PyCFunction)py_lv_cache_entry_get_size, +static PyMethodDef py_lv_theme_get_from_obj_def = { + "lv_theme_get_from_obj", + (PyCFunction)py_lv_theme_get_from_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78430,31 +72806,29 @@ static PyMethodDef py_lv_cache_entry_get_size_def = { /* * lvgl extension definition for: - * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) + * void lv_theme_apply(lv_obj_t *obj) */ -static PyObject *py_lv_cache_entry_get_entry(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *data_py; long node_size_val; - if (!PyArg_ParseTuple(py_args, "Ol", &data_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } - void *data = mp_to_ptr(data_py); - const uint32_t node_size = (const uint32_t)node_size_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_cache_entry_t * _res; lvpy_lock(); - _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_cache_entry_get_entry)(data, node_size); + ((void (*)(lv_obj_t *))lv_theme_apply)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_cache_entry_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_cache_entry_get_entry_def = { - "lv_cache_entry_get_entry", - (PyCFunction)py_lv_cache_entry_get_entry, +static PyMethodDef py_lv_theme_apply_def = { + "lv_theme_apply", + (PyCFunction)py_lv_theme_apply, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78462,28 +72836,30 @@ static PyMethodDef py_lv_cache_entry_get_entry_def = { /* * lvgl extension definition for: - * void lv_draw_sw_init(void) + * const lv_font_t *lv_theme_get_font_small(lv_obj_t *obj) */ -static PyObject *py_lv_draw_sw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_font_small(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_font_t * _res; lvpy_lock(); - ((void (*)(void))lv_draw_sw_init)(); + _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_small)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_init_def = { - "lv_draw_sw_init", - (PyCFunction)py_lv_draw_sw_init, +static PyMethodDef py_lv_theme_get_font_small_def = { + "lv_theme_get_font_small", + (PyCFunction)py_lv_theme_get_font_small, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78491,28 +72867,30 @@ static PyMethodDef py_lv_draw_sw_init_def = { /* * lvgl extension definition for: - * void lv_draw_sw_deinit(void) + * const lv_font_t *lv_theme_get_font_normal(lv_obj_t *obj) */ -static PyObject *py_lv_draw_sw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_font_normal(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_font_t * _res; lvpy_lock(); - ((void (*)(void))lv_draw_sw_deinit)(); + _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_normal)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_deinit_def = { - "lv_draw_sw_deinit", - (PyCFunction)py_lv_draw_sw_deinit, +static PyMethodDef py_lv_theme_get_font_normal_def = { + "lv_theme_get_font_normal", + (PyCFunction)py_lv_theme_get_font_normal, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78520,37 +72898,30 @@ static PyMethodDef py_lv_draw_sw_deinit_def = { /* * lvgl extension definition for: - * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t src_cf, void *dest_buf) + * const lv_font_t *lv_theme_get_font_large(lv_obj_t *obj) */ -static PyObject *py_lv_draw_sw_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_font_large(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dest_area_py; PyObject *src_buf_py; long src_w_val; long src_h_val; long src_stride_val; PyObject *draw_dsc_py; PyObject *sup_py; PyObject *src_cf_py; PyObject *dest_buf_py; - if (!PyArg_ParseTuple(py_args, "OOlllOOOO", &dest_area_py, &src_buf_py, &src_w_val, &src_h_val, &src_stride_val, &draw_dsc_py, &sup_py, &src_cf_py, &dest_buf_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); - const void *src_buf = (const void *)mp_to_ptr(src_buf_py); - int32_t src_w = (int32_t)src_w_val; - int32_t src_h = (int32_t)src_h_val; - int32_t src_stride = (int32_t)src_stride_val; - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(sup_py); - lv_color_format_t src_cf = (int)mp_obj_get_int(src_cf_py); - void *dest_buf = mp_to_ptr(dest_buf_py); + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + const lv_font_t * _res; lvpy_lock(); - ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_draw_sw_transform)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, src_cf, dest_buf); + _res = ((const lv_font_t *(*)(lv_obj_t *))lv_theme_get_font_large)(obj); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_font_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_transform_def = { - "lv_draw_sw_transform", - (PyCFunction)py_lv_draw_sw_transform, +static PyMethodDef py_lv_theme_get_font_large_def = { + "lv_theme_get_font_large", + (PyCFunction)py_lv_theme_get_font_large, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78558,30 +72929,30 @@ static PyMethodDef py_lv_draw_sw_transform_def = { /* * lvgl extension definition for: - * bool lv_draw_sw_unregister_blend_handler(lv_color_format_t dest_cf) + * lv_color_t lv_theme_get_color_primary(lv_obj_t *obj) */ -static PyObject *py_lv_draw_sw_unregister_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_color_primary(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dest_cf_py; - if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_color_t _res; lvpy_lock(); - _res = ((bool (*)(lv_color_format_t))lv_draw_sw_unregister_blend_handler)(dest_cf); + _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_primary)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_draw_sw_unregister_blend_handler_def = { - "lv_draw_sw_unregister_blend_handler", - (PyCFunction)py_lv_draw_sw_unregister_blend_handler, +static PyMethodDef py_lv_theme_get_color_primary_def = { + "lv_theme_get_color_primary", + (PyCFunction)py_lv_theme_get_color_primary, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78589,30 +72960,30 @@ static PyMethodDef py_lv_draw_sw_unregister_blend_handler_def = { /* * lvgl extension definition for: - * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) + * lv_color_t lv_theme_get_color_secondary(lv_obj_t *obj) */ -static PyObject *py_lv_draw_sw_get_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_color_secondary(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dest_cf_py; - if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_blend_handler_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_draw_sw_get_blend_handler)(dest_cf); + _res = ((lv_color_t (*)(lv_obj_t *))lv_theme_get_color_secondary)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_draw_sw_get_blend_handler_def = { - "lv_draw_sw_get_blend_handler", - (PyCFunction)py_lv_draw_sw_get_blend_handler, +static PyMethodDef py_lv_theme_get_color_secondary_def = { + "lv_theme_get_color_secondary", + (PyCFunction)py_lv_theme_get_color_secondary, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78620,28 +72991,34 @@ static PyMethodDef py_lv_draw_sw_get_blend_handler_def = { /* * lvgl extension definition for: - * void lv_timer_core_init(void) + * lv_theme_t *lv_theme_default_init(lv_display_t *disp, lv_color_t color_primary, lv_color_t color_secondary, bool dark, const lv_font_t *font) */ -static PyObject *py_lv_timer_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *disp_py; PyObject *color_primary_py; PyObject *color_secondary_py; long dark_val; PyObject *font_py; + if (!PyArg_ParseTuple(py_args, "OOOlO", &disp_py, &color_primary_py, &color_secondary_py, &dark_val, &font_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + lv_color_t color_primary = mp_write_lv_color_t(color_primary_py); + lv_color_t color_secondary = mp_write_lv_color_t(color_secondary_py); + bool dark = (dark_val != 0); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_theme_t * _res; lvpy_lock(); - ((void (*)(void))lv_timer_core_init)(); + _res = ((lv_theme_t *(*)(lv_display_t *, lv_color_t, lv_color_t, bool, const lv_font_t *))lv_theme_default_init)(disp, color_primary, color_secondary, dark, font); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_timer_core_init_def = { - "lv_timer_core_init", - (PyCFunction)py_lv_timer_core_init, +static PyMethodDef py_lv_theme_default_init_def = { + "lv_theme_default_init", + (PyCFunction)py_lv_theme_default_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78649,9 +73026,9 @@ static PyMethodDef py_lv_timer_core_init_def = { /* * lvgl extension definition for: - * void lv_timer_core_deinit(void) + * bool lv_theme_default_is_inited(void) */ -static PyObject *py_lv_timer_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_is_inited(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78660,17 +73037,18 @@ static PyObject *py_lv_timer_core_deinit(PyObject *self, PyObject *py_args, PyOb if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(void))lv_timer_core_deinit)(); + _res = ((bool (*)(void))lv_theme_default_is_inited)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_timer_core_deinit_def = { - "lv_timer_core_deinit", - (PyCFunction)py_lv_timer_core_deinit, +static PyMethodDef py_lv_theme_default_is_inited_def = { + "lv_theme_default_is_inited", + (PyCFunction)py_lv_theme_default_is_inited, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78678,9 +73056,9 @@ static PyMethodDef py_lv_timer_core_deinit_def = { /* * lvgl extension definition for: - * void lv_anim_core_init(void) + * lv_theme_t *lv_theme_default_get(void) */ -static PyObject *py_lv_anim_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78689,17 +73067,18 @@ static PyObject *py_lv_anim_core_init(PyObject *self, PyObject *py_args, PyObjec if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_theme_t * _res; lvpy_lock(); - ((void (*)(void))lv_anim_core_init)(); + _res = ((lv_theme_t *(*)(void))lv_theme_default_get)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_anim_core_init_def = { - "lv_anim_core_init", - (PyCFunction)py_lv_anim_core_init, +static PyMethodDef py_lv_theme_default_get_def = { + "lv_theme_default_get", + (PyCFunction)py_lv_theme_default_get, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78707,9 +73086,9 @@ static PyMethodDef py_lv_anim_core_init_def = { /* * lvgl extension definition for: - * void lv_anim_core_deinit(void) + * void lv_theme_default_deinit(void) */ -static PyObject *py_lv_anim_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_default_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78719,16 +73098,16 @@ static PyObject *py_lv_anim_core_deinit(PyObject *self, PyObject *py_args, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_anim_core_deinit)(); + ((void (*)(void))lv_theme_default_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_core_deinit_def = { - "lv_anim_core_deinit", - (PyCFunction)py_lv_anim_core_deinit, +static PyMethodDef py_lv_theme_default_deinit_def = { + "lv_theme_default_deinit", + (PyCFunction)py_lv_theme_default_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78736,29 +73115,31 @@ static PyMethodDef py_lv_anim_core_deinit_def = { /* * lvgl extension definition for: - * void lv_anim_enable_vsync_mode(bool enable) + * void lv_tick_inc(uint32_t tick_period) */ -static PyObject *py_lv_anim_enable_vsync_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_inc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long enable_val; - if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } - bool enable = (enable_val != 0); + long tick_period_val; + if (!PyArg_ParseTuple(py_args, "l", &tick_period_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t tick_period = (uint32_t)tick_period_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(bool))lv_anim_enable_vsync_mode)(enable); + Py_BEGIN_ALLOW_THREADS + ((void (*)(uint32_t))lv_tick_inc)(tick_period); + Py_END_ALLOW_THREADS lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_enable_vsync_mode_def = { - "lv_anim_enable_vsync_mode", - (PyCFunction)py_lv_anim_enable_vsync_mode, +static PyMethodDef py_lv_tick_inc_def = { + "lv_tick_inc", + (PyCFunction)py_lv_tick_inc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78766,9 +73147,9 @@ static PyMethodDef py_lv_anim_enable_vsync_mode_def = { /* * lvgl extension definition for: - * void lv_draw_buf_init_handlers(void) + * uint32_t lv_tick_get(void) */ -static PyObject *py_lv_draw_buf_init_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78777,17 +73158,18 @@ static PyObject *py_lv_draw_buf_init_handlers(PyObject *self, PyObject *py_args, if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_buf_init_handlers)(); + _res = ((uint32_t (*)(void))lv_tick_get)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_buf_init_handlers_def = { - "lv_draw_buf_init_handlers", - (PyCFunction)py_lv_draw_buf_init_handlers, +static PyMethodDef py_lv_tick_get_def = { + "lv_tick_get", + (PyCFunction)py_lv_tick_get, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78795,28 +73177,30 @@ static PyMethodDef py_lv_draw_buf_init_handlers_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_init(void) + * uint32_t lv_tick_elaps(uint32_t prev_tick) */ -static PyObject *py_lv_draw_sw_mask_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_elaps(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long prev_tick_val; + if (!PyArg_ParseTuple(py_args, "l", &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t prev_tick = (uint32_t)prev_tick_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_sw_mask_init)(); + _res = ((uint32_t (*)(uint32_t))lv_tick_elaps)(prev_tick); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_mask_init_def = { - "lv_draw_sw_mask_init", - (PyCFunction)py_lv_draw_sw_mask_init, +static PyMethodDef py_lv_tick_elaps_def = { + "lv_tick_elaps", + (PyCFunction)py_lv_tick_elaps, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78824,28 +73208,31 @@ static PyMethodDef py_lv_draw_sw_mask_init_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_deinit(void) + * uint32_t lv_tick_diff(uint32_t tick, uint32_t prev_tick) */ -static PyObject *py_lv_draw_sw_mask_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_diff(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long tick_val; long prev_tick_val; + if (!PyArg_ParseTuple(py_args, "ll", &tick_val, &prev_tick_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t tick = (uint32_t)tick_val; + uint32_t prev_tick = (uint32_t)prev_tick_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_draw_sw_mask_deinit)(); + _res = ((uint32_t (*)(uint32_t, uint32_t))lv_tick_diff)(tick, prev_tick); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_mask_deinit_def = { - "lv_draw_sw_mask_deinit", - (PyCFunction)py_lv_draw_sw_mask_deinit, +static PyMethodDef py_lv_tick_diff_def = { + "lv_tick_diff", + (PyCFunction)py_lv_tick_diff, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78853,93 +73240,103 @@ static PyMethodDef py_lv_draw_sw_mask_deinit_def = { /* * lvgl extension definition for: - * lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void *masks[], lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len) + * void lv_delay_ms(uint32_t ms) */ -static PyObject *py_lv_draw_sw_mask_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_delay_ms(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *masks_py; PyObject *mask_buf_py; long abs_x_val; long abs_y_val; long len_val; - if (!PyArg_ParseTuple(py_args, "OOlll", &masks_py, &mask_buf_py, &abs_x_val, &abs_y_val, &len_val)) { PyGILState_Release(gstate); return NULL; } - void **masks = mp_to_ptr(masks_py); - lv_opa_t *mask_buf = mp_array_to_u8ptr(mask_buf_py); - int32_t abs_x = (int32_t)abs_x_val; - int32_t abs_y = (int32_t)abs_y_val; - int32_t len = (int32_t)len_val; + long ms_val; + if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t ms = (uint32_t)ms_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_mask_res_t _res; lvpy_lock(); - _res = ((lv_draw_sw_mask_res_t (*)(void *[], lv_opa_t *, int32_t, int32_t, int32_t))lv_draw_sw_mask_apply)(masks, mask_buf, abs_x, abs_y, len); + ((void (*)(uint32_t))lv_delay_ms)(ms); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_apply_def = { - "lv_draw_sw_mask_apply", - (PyCFunction)py_lv_draw_sw_mask_apply, +static PyMethodDef py_lv_delay_ms_def = { + "lv_delay_ms", + (PyCFunction)py_lv_delay_ms, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback cannot be the first argument + * lv_delay_cb_t cb + */ + + /* * lvgl extension definition for: - * void lv_draw_sw_mask_free_param(void *p) + * void lv_delay_set_cb(lv_delay_cb_t cb) */ -static PyObject *py_lv_draw_sw_mask_free_param(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_delay_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } - void *p = mp_to_ptr(p_py); + PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void *))lv_draw_sw_mask_free_param)(p); + ((void (*)(lv_delay_cb_t))lv_delay_set_cb)(cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_free_param_def = { - "lv_draw_sw_mask_free_param", - (PyCFunction)py_lv_draw_sw_mask_free_param, +static PyMethodDef py_lv_delay_set_cb_def = { + "lv_delay_set_cb", + (PyCFunction)py_lv_delay_set_cb, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback cannot be the first argument + * lv_tick_get_cb_t cb + */ + + /* * lvgl extension definition for: - * void lv_draw_sw_mask_cleanup(void) + * void lv_tick_set_cb(lv_tick_get_cb_t cb) */ -static PyObject *py_lv_draw_sw_mask_cleanup(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_set_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_draw_sw_mask_cleanup)(); + ((void (*)(lv_tick_get_cb_t))lv_tick_set_cb)(cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_mask_cleanup_def = { - "lv_draw_sw_mask_cleanup", - (PyCFunction)py_lv_draw_sw_mask_cleanup, +static PyMethodDef py_lv_tick_set_cb_def = { + "lv_tick_set_cb", + (PyCFunction)py_lv_tick_set_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78947,9 +73344,9 @@ static PyMethodDef py_lv_draw_sw_mask_cleanup_def = { /* * lvgl extension definition for: - * void lv_layout_init(void) + * lv_tick_get_cb_t lv_tick_get_cb(void) */ -static PyObject *py_lv_layout_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_tick_get_cb(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78958,17 +73355,18 @@ static PyObject *py_lv_layout_init(PyObject *self, PyObject *py_args, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_tick_get_cb_t _res; lvpy_lock(); - ((void (*)(void))lv_layout_init)(); + _res = ((lv_tick_get_cb_t (*)(void))lv_tick_get_cb)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_lv_funcptr_lv_tick_get_cb_t(_res); } -static PyMethodDef py_lv_layout_init_def = { - "lv_layout_init", - (PyCFunction)py_lv_layout_init, +static PyMethodDef py_lv_tick_get_cb_def = { + "lv_tick_get_cb", + (PyCFunction)py_lv_tick_get_cb, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -78976,9 +73374,9 @@ static PyMethodDef py_lv_layout_init_def = { /* * lvgl extension definition for: - * void lv_layout_deinit(void) + * void lv_span_stack_init(void) */ -static PyObject *py_lv_layout_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_stack_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -78988,16 +73386,16 @@ static PyObject *py_lv_layout_deinit(PyObject *self, PyObject *py_args, PyObject if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_layout_deinit)(); + ((void (*)(void))lv_span_stack_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_layout_deinit_def = { - "lv_layout_deinit", - (PyCFunction)py_lv_layout_deinit, +static PyMethodDef py_lv_span_stack_init_def = { + "lv_span_stack_init", + (PyCFunction)py_lv_span_stack_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79005,32 +73403,28 @@ static PyMethodDef py_lv_layout_deinit_def = { /* * lvgl extension definition for: - * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) + * void lv_span_stack_deinit(void) */ -static PyObject *py_lv_layout_get_min_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_span_stack_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; PyObject *size_py; long width_val; - if (!PyArg_ParseTuple(py_args, "OOl", &obj_py, &size_py, &width_val)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - int32_t *size = mp_array_to_i32ptr(size_py); - bool width = (width_val != 0); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_layout_get_min_size)(obj, size, width); + ((void (*)(void))lv_span_stack_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_layout_get_min_size_def = { - "lv_layout_get_min_size", - (PyCFunction)py_lv_layout_get_min_size, +static PyMethodDef py_lv_span_stack_deinit_def = { + "lv_span_stack_deinit", + (PyCFunction)py_lv_span_stack_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79038,29 +73432,28 @@ static PyMethodDef py_lv_layout_get_min_size_def = { /* * lvgl extension definition for: - * void lv_layout_apply(lv_obj_t *obj) + * void lv_os_init(void) */ -static PyObject *py_lv_layout_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_os_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *))lv_layout_apply)(obj); + ((void (*)(void))lv_os_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_layout_apply_def = { - "lv_layout_apply", - (PyCFunction)py_lv_layout_apply, +static PyMethodDef py_lv_os_init_def = { + "lv_os_init", + (PyCFunction)py_lv_os_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79068,9 +73461,9 @@ static PyMethodDef py_lv_layout_apply_def = { /* * lvgl extension definition for: - * void lv_group_init(void) + * uint32_t lv_os_get_idle_percent(void) */ -static PyObject *py_lv_group_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_os_get_idle_percent(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -79079,46 +73472,59 @@ static PyObject *py_lv_group_init(PyObject *self, PyObject *py_args, PyObject *p if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_group_init)(); + _res = ((uint32_t (*)(void))lv_os_get_idle_percent)(); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_group_init_def = { - "lv_group_init", - (PyCFunction)py_lv_group_init, +static PyMethodDef py_lv_os_get_idle_percent_def = { + "lv_os_get_idle_percent", + (PyCFunction)py_lv_os_get_idle_percent, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! lv_result_t lv_iter_next_cb(void *instance, void *context, void *elem) + * lv_iter_next_cb next_cb + */ + + /* * lvgl extension definition for: - * void lv_group_deinit(void) + * lv_iter_t *lv_iter_create(void *instance, uint32_t elem_size, uint32_t context_size, lv_iter_next_cb next_cb) */ -static PyObject *py_lv_group_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_iter_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *instance_py; long elem_size_val; long context_size_val; PyObject *next_cb_py; + if (!PyArg_ParseTuple(py_args, "OllO", &instance_py, &elem_size_val, &context_size_val, &next_cb_py)) { PyGILState_Release(gstate); return NULL; } + void *instance = mp_to_ptr(instance_py); + uint32_t elem_size = (uint32_t)elem_size_val; + uint32_t context_size = (uint32_t)context_size_val; + void *next_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_iter_t * _res; lvpy_lock(); - ((void (*)(void))lv_group_deinit)(); + _res = ((lv_iter_t *(*)(void *, uint32_t, uint32_t, lv_iter_next_cb))lv_iter_create)(instance, elem_size, context_size, next_cb); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_iter_t((void*)_res); } -static PyMethodDef py_lv_group_deinit_def = { - "lv_group_deinit", - (PyCFunction)py_lv_group_deinit, +static PyMethodDef py_lv_iter_create_def = { + "lv_iter_create", + (PyCFunction)py_lv_iter_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79126,29 +73532,31 @@ static PyMethodDef py_lv_group_deinit_def = { /* * lvgl extension definition for: - * void lv_event_mark_deleted(void *target) + * lv_cache_entry_t *lv_cache_entry_alloc(const uint32_t node_size, const lv_cache_t *cache) */ -static PyObject *py_lv_event_mark_deleted(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_alloc(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *target_py; - if (!PyArg_ParseTuple(py_args, "O", &target_py)) { PyGILState_Release(gstate); return NULL; } - void *target = mp_to_ptr(target_py); + long node_size_val; PyObject *cache_py; + if (!PyArg_ParseTuple(py_args, "lO", &node_size_val, &cache_py)) { PyGILState_Release(gstate); return NULL; } + const uint32_t node_size = (const uint32_t)node_size_val; + const lv_cache_t *cache = (const lv_cache_t *)mp_write_ptr_lv_cache_t(cache_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t * _res; lvpy_lock(); - ((void (*)(void *))lv_event_mark_deleted)(target); + _res = ((lv_cache_entry_t *(*)(const uint32_t, const lv_cache_t *))lv_cache_entry_alloc)(node_size, cache); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_event_mark_deleted_def = { - "lv_event_mark_deleted", - (PyCFunction)py_lv_event_mark_deleted, +static PyMethodDef py_lv_cache_entry_alloc_def = { + "lv_cache_entry_alloc", + (PyCFunction)py_lv_cache_entry_alloc, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79156,28 +73564,30 @@ static PyMethodDef py_lv_event_mark_deleted_def = { /* * lvgl extension definition for: - * void lv_subject_global_init(void) + * uint32_t lv_cache_entry_get_size(const uint32_t node_size) */ -static PyObject *py_lv_subject_global_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long node_size_val; + if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } + const uint32_t node_size = (const uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(void))lv_subject_global_init)(); + _res = ((uint32_t (*)(const uint32_t))lv_cache_entry_get_size)(node_size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_subject_global_init_def = { - "lv_subject_global_init", - (PyCFunction)py_lv_subject_global_init, +static PyMethodDef py_lv_cache_entry_get_size_def = { + "lv_cache_entry_get_size", + (PyCFunction)py_lv_cache_entry_get_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79185,28 +73595,31 @@ static PyMethodDef py_lv_subject_global_init_def = { /* * lvgl extension definition for: - * void lv_subject_global_deinit(void) + * lv_cache_entry_t *lv_cache_entry_get_entry(void *data, const uint32_t node_size) */ -static PyObject *py_lv_subject_global_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_cache_entry_get_entry(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *data_py; long node_size_val; + if (!PyArg_ParseTuple(py_args, "Ol", &data_py, &node_size_val)) { PyGILState_Release(gstate); return NULL; } + void *data = mp_to_ptr(data_py); + const uint32_t node_size = (const uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_cache_entry_t * _res; lvpy_lock(); - ((void (*)(void))lv_subject_global_deinit)(); + _res = ((lv_cache_entry_t *(*)(void *, const uint32_t))lv_cache_entry_get_entry)(data, node_size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_cache_entry_t((void*)_res); } -static PyMethodDef py_lv_subject_global_deinit_def = { - "lv_subject_global_deinit", - (PyCFunction)py_lv_subject_global_deinit, +static PyMethodDef py_lv_cache_entry_get_entry_def = { + "lv_cache_entry_get_entry", + (PyCFunction)py_lv_cache_entry_get_entry, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79214,9 +73627,9 @@ static PyMethodDef py_lv_subject_global_deinit_def = { /* * lvgl extension definition for: - * void lv_refr_init(void) + * void lv_draw_sw_init(void) */ -static PyObject *py_lv_refr_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -79226,16 +73639,16 @@ static PyObject *py_lv_refr_init(PyObject *self, PyObject *py_args, PyObject *py if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_refr_init)(); + ((void (*)(void))lv_draw_sw_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_init_def = { - "lv_refr_init", - (PyCFunction)py_lv_refr_init, +static PyMethodDef py_lv_draw_sw_init_def = { + "lv_draw_sw_init", + (PyCFunction)py_lv_draw_sw_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79243,9 +73656,9 @@ static PyMethodDef py_lv_refr_init_def = { /* * lvgl extension definition for: - * void lv_refr_deinit(void) + * void lv_draw_sw_deinit(void) */ -static PyObject *py_lv_refr_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -79255,16 +73668,16 @@ static PyObject *py_lv_refr_deinit(PyObject *self, PyObject *py_args, PyObject * if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_refr_deinit)(); + ((void (*)(void))lv_draw_sw_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_deinit_def = { - "lv_refr_deinit", - (PyCFunction)py_lv_refr_deinit, +static PyMethodDef py_lv_draw_sw_deinit_def = { + "lv_draw_sw_deinit", + (PyCFunction)py_lv_draw_sw_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79272,31 +73685,37 @@ static PyMethodDef py_lv_refr_deinit_def = { /* * lvgl extension definition for: - * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) + * void lv_draw_sw_transform(const lv_area_t *dest_area, const void *src_buf, int32_t src_w, int32_t src_h, int32_t src_stride, const lv_draw_image_dsc_t *draw_dsc, const lv_draw_image_sup_t *sup, lv_color_format_t src_cf, void *dest_buf) */ -static PyObject *py_lv_inv_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_transform(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *disp_py; PyObject *area_p_py; - if (!PyArg_ParseTuple(py_args, "OO", &disp_py, &area_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); + PyObject *dest_area_py; PyObject *src_buf_py; long src_w_val; long src_h_val; long src_stride_val; PyObject *draw_dsc_py; PyObject *sup_py; PyObject *src_cf_py; PyObject *dest_buf_py; + if (!PyArg_ParseTuple(py_args, "OOlllOOOO", &dest_area_py, &src_buf_py, &src_w_val, &src_h_val, &src_stride_val, &draw_dsc_py, &sup_py, &src_cf_py, &dest_buf_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); + const void *src_buf = (const void *)mp_to_ptr(src_buf_py); + int32_t src_w = (int32_t)src_w_val; + int32_t src_h = (int32_t)src_h_val; + int32_t src_stride = (int32_t)src_stride_val; + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_draw_image_sup_t *sup = (const lv_draw_image_sup_t *)mp_write_ptr_lv_draw_image_sup_t(sup_py); + lv_color_format_t src_cf = (int)mp_obj_get_int(src_cf_py); + void *dest_buf = mp_to_ptr(dest_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_inv_area)(disp, area_p); + ((void (*)(const lv_area_t *, const void *, int32_t, int32_t, int32_t, const lv_draw_image_dsc_t *, const lv_draw_image_sup_t *, lv_color_format_t, void *))lv_draw_sw_transform)(dest_area, src_buf, src_w, src_h, src_stride, draw_dsc, sup, src_cf, dest_buf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_inv_area_def = { - "lv_inv_area", - (PyCFunction)py_lv_inv_area, +static PyMethodDef py_lv_draw_sw_transform_def = { + "lv_draw_sw_transform", + (PyCFunction)py_lv_draw_sw_transform, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79304,29 +73723,30 @@ static PyMethodDef py_lv_inv_area_def = { /* * lvgl extension definition for: - * lv_display_t *lv_refr_get_disp_refreshing(void) + * bool lv_draw_sw_unregister_blend_handler(lv_color_format_t dest_cf) */ -static PyObject *py_lv_refr_get_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_unregister_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + PyObject *dest_cf_py; + if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; + bool _res; lvpy_lock(); - _res = ((lv_display_t *(*)(void))lv_refr_get_disp_refreshing)(); + _res = ((bool (*)(lv_color_format_t))lv_draw_sw_unregister_blend_handler)(dest_cf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_refr_get_disp_refreshing_def = { - "lv_refr_get_disp_refreshing", - (PyCFunction)py_lv_refr_get_disp_refreshing, +static PyMethodDef py_lv_draw_sw_unregister_blend_handler_def = { + "lv_draw_sw_unregister_blend_handler", + (PyCFunction)py_lv_draw_sw_unregister_blend_handler, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79334,29 +73754,30 @@ static PyMethodDef py_lv_refr_get_disp_refreshing_def = { /* * lvgl extension definition for: - * void lv_refr_set_disp_refreshing(lv_display_t *disp) + * lv_draw_sw_blend_handler_t lv_draw_sw_get_blend_handler(lv_color_format_t dest_cf) */ -static PyObject *py_lv_refr_set_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_get_blend_handler(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *disp_py; - if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + PyObject *dest_cf_py; + if (!PyArg_ParseTuple(py_args, "O", &dest_cf_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t dest_cf = (int)mp_obj_get_int(dest_cf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_sw_blend_handler_t _res; lvpy_lock(); - ((void (*)(lv_display_t *))lv_refr_set_disp_refreshing)(disp); + _res = ((lv_draw_sw_blend_handler_t (*)(lv_color_format_t))lv_draw_sw_get_blend_handler)(dest_cf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_lv_funcptr_lv_draw_sw_blend_handler_t(_res); } -static PyMethodDef py_lv_refr_set_disp_refreshing_def = { - "lv_refr_set_disp_refreshing", - (PyCFunction)py_lv_refr_set_disp_refreshing, +static PyMethodDef py_lv_draw_sw_get_blend_handler_def = { + "lv_draw_sw_get_blend_handler", + (PyCFunction)py_lv_draw_sw_get_blend_handler, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79364,31 +73785,28 @@ static PyMethodDef py_lv_refr_set_disp_refreshing_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) + * void lv_timer_core_init(void) */ -static PyObject *py_lv_refr_get_top_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *area_p_py; PyObject *obj_py; - if (!PyArg_ParseTuple(py_args, "OO", &area_p_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); - lv_obj_t *obj = mp_to_lv(obj_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_refr_get_top_obj)(area_p, obj); + ((void (*)(void))lv_timer_core_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_refr_get_top_obj_def = { - "lv_refr_get_top_obj", - (PyCFunction)py_lv_refr_get_top_obj, +static PyMethodDef py_lv_timer_core_init_def = { + "lv_timer_core_init", + (PyCFunction)py_lv_timer_core_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79396,33 +73814,28 @@ static PyMethodDef py_lv_refr_get_top_obj_def = { /* * lvgl extension definition for: - * void lv_draw_sw_grad_color_calculate(const lv_grad_dsc_t *dsc, int32_t range, int32_t frac, lv_color_t *color_out, lv_opa_t *opa_out) + * void lv_timer_core_deinit(void) */ -static PyObject *py_lv_draw_sw_grad_color_calculate(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_timer_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *dsc_py; long range_val; long frac_val; PyObject *color_out_py; PyObject *opa_out_py; - if (!PyArg_ParseTuple(py_args, "OllOO", &dsc_py, &range_val, &frac_val, &color_out_py, &opa_out_py)) { PyGILState_Release(gstate); return NULL; } - const lv_grad_dsc_t *dsc = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(dsc_py); - int32_t range = (int32_t)range_val; - int32_t frac = (int32_t)frac_val; - lv_color_t *color_out = mp_write_ptr_lv_color_t(color_out_py); - lv_opa_t *opa_out = mp_array_to_u8ptr(opa_out_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_grad_dsc_t *, int32_t, int32_t, lv_color_t *, lv_opa_t *))lv_draw_sw_grad_color_calculate)(dsc, range, frac, color_out, opa_out); + ((void (*)(void))lv_timer_core_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_grad_color_calculate_def = { - "lv_draw_sw_grad_color_calculate", - (PyCFunction)py_lv_draw_sw_grad_color_calculate, +static PyMethodDef py_lv_timer_core_deinit_def = { + "lv_timer_core_deinit", + (PyCFunction)py_lv_timer_core_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79430,32 +73843,28 @@ static PyMethodDef py_lv_draw_sw_grad_color_calculate_def = { /* * lvgl extension definition for: - * lv_draw_sw_grad_calc_t *lv_draw_sw_grad_get(const lv_grad_dsc_t *gradient, int32_t w, int32_t h) + * void lv_anim_core_init(void) */ -static PyObject *py_lv_draw_sw_grad_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_core_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *gradient_py; long w_val; long h_val; - if (!PyArg_ParseTuple(py_args, "Oll", &gradient_py, &w_val, &h_val)) { PyGILState_Release(gstate); return NULL; } - const lv_grad_dsc_t *gradient = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(gradient_py); - int32_t w = (int32_t)w_val; - int32_t h = (int32_t)h_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_sw_grad_calc_t * _res; lvpy_lock(); - _res = ((lv_draw_sw_grad_calc_t *(*)(const lv_grad_dsc_t *, int32_t, int32_t))lv_draw_sw_grad_get)(gradient, w, h); + ((void (*)(void))lv_anim_core_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_sw_grad_calc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_grad_get_def = { - "lv_draw_sw_grad_get", - (PyCFunction)py_lv_draw_sw_grad_get, +static PyMethodDef py_lv_anim_core_init_def = { + "lv_anim_core_init", + (PyCFunction)py_lv_anim_core_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79463,9 +73872,9 @@ static PyMethodDef py_lv_draw_sw_grad_get_def = { /* * lvgl extension definition for: - * void lv_fs_init(void) + * void lv_anim_core_deinit(void) */ -static PyObject *py_lv_fs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_core_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; @@ -79475,16 +73884,16 @@ static PyObject *py_lv_fs_init(PyObject *self, PyObject *py_args, PyObject *py_k if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_fs_init)(); + ((void (*)(void))lv_anim_core_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_init_def = { - "lv_fs_init", - (PyCFunction)py_lv_fs_init, +static PyMethodDef py_lv_anim_core_deinit_def = { + "lv_anim_core_deinit", + (PyCFunction)py_lv_anim_core_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79492,28 +73901,29 @@ static PyMethodDef py_lv_fs_init_def = { /* * lvgl extension definition for: - * void lv_fs_deinit(void) + * void lv_anim_enable_vsync_mode(bool enable) */ -static PyObject *py_lv_fs_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_enable_vsync_mode(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - - + long enable_val; + if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + bool enable = (enable_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(void))lv_fs_deinit)(); + ((void (*)(bool))lv_anim_enable_vsync_mode)(enable); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_fs_deinit_def = { - "lv_fs_deinit", - (PyCFunction)py_lv_fs_deinit, +static PyMethodDef py_lv_anim_enable_vsync_mode_def = { + "lv_anim_enable_vsync_mode", + (PyCFunction)py_lv_anim_enable_vsync_mode, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79521,30 +73931,28 @@ static PyMethodDef py_lv_fs_deinit_def = { /* * lvgl extension definition for: - * void lv_indev_scroll_get_snap_dist(lv_obj_t *obj, lv_point_t *p) + * void lv_draw_buf_init_handlers(void) */ -static PyObject *py_lv_indev_scroll_get_snap_dist(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_init_handlers(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; - (void)py_kwds; - PyObject *obj_py; PyObject *p_py; - if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &p_py)) { PyGILState_Release(gstate); return NULL; } - lv_obj_t *obj = mp_to_lv(obj_py); - lv_point_t *p = mp_write_ptr_lv_point_t(p_py); + (void)self; + (void)py_kwds; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_obj_t *, lv_point_t *))lv_indev_scroll_get_snap_dist)(obj, p); + ((void (*)(void))lv_draw_buf_init_handlers)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_indev_scroll_get_snap_dist_def = { - "lv_indev_scroll_get_snap_dist", - (PyCFunction)py_lv_indev_scroll_get_snap_dist, +static PyMethodDef py_lv_draw_buf_init_handlers_def = { + "lv_draw_buf_init_handlers", + (PyCFunction)py_lv_draw_buf_init_handlers, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79552,31 +73960,28 @@ static PyMethodDef py_lv_indev_scroll_get_snap_dist_def = { /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) + * void lv_draw_sw_mask_init(void) */ -static PyObject *py_lv_circle_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t * _res; lvpy_lock(); - _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_circle_buf_create)(capacity, element_size); + ((void (*)(void))lv_draw_sw_mask_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_create_def = { - "lv_circle_buf_create", - (PyCFunction)py_lv_circle_buf_create, +static PyMethodDef py_lv_draw_sw_mask_init_def = { + "lv_draw_sw_mask_init", + (PyCFunction)py_lv_draw_sw_mask_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79584,32 +73989,28 @@ static PyMethodDef py_lv_circle_buf_create_def = { /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) + * void lv_draw_sw_mask_deinit(void) */ -static PyObject *py_lv_circle_buf_create_from_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *buf_py; long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - void *buf = mp_to_ptr(buf_py); - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t * _res; lvpy_lock(); - _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_circle_buf_create_from_buf)(buf, capacity, element_size); + ((void (*)(void))lv_draw_sw_mask_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_circle_buf_create_from_buf_def = { - "lv_circle_buf_create_from_buf", - (PyCFunction)py_lv_circle_buf_create_from_buf, +static PyMethodDef py_lv_draw_sw_mask_deinit_def = { + "lv_draw_sw_mask_deinit", + (PyCFunction)py_lv_draw_sw_mask_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79617,78 +74018,64 @@ static PyMethodDef py_lv_circle_buf_create_from_buf_def = { /* * lvgl extension definition for: - * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) + * lv_draw_sw_mask_res_t lv_draw_sw_mask_apply(void *masks[], lv_opa_t *mask_buf, int32_t abs_x, int32_t abs_y, int32_t len) */ -static PyObject *py_lv_circle_buf_create_from_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *array_py; - if (!PyArg_ParseTuple(py_args, "O", &array_py)) { PyGILState_Release(gstate); return NULL; } - const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(array_py); + PyObject *masks_py; PyObject *mask_buf_py; long abs_x_val; long abs_y_val; long len_val; + if (!PyArg_ParseTuple(py_args, "OOlll", &masks_py, &mask_buf_py, &abs_x_val, &abs_y_val, &len_val)) { PyGILState_Release(gstate); return NULL; } + void **masks = mp_to_ptr(masks_py); + lv_opa_t *mask_buf = mp_array_to_u8ptr(mask_buf_py); + int32_t abs_x = (int32_t)abs_x_val; + int32_t abs_y = (int32_t)abs_y_val; + int32_t len = (int32_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_circle_buf_t * _res; + lv_draw_sw_mask_res_t _res; lvpy_lock(); - _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_circle_buf_create_from_array)(array); + _res = ((lv_draw_sw_mask_res_t (*)(void *[], lv_opa_t *, int32_t, int32_t, int32_t))lv_draw_sw_mask_apply)(masks, mask_buf, abs_x, abs_y, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_circle_buf_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_circle_buf_create_from_array_def = { - "lv_circle_buf_create_from_array", - (PyCFunction)py_lv_circle_buf_create_from_array, +static PyMethodDef py_lv_draw_sw_mask_apply_def = { + "lv_draw_sw_mask_apply", + (PyCFunction)py_lv_draw_sw_mask_apply, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) - * lv_lru_free_cb_t value_free - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) - * lv_lru_free_cb_t key_free - */ - - /* * lvgl extension definition for: - * lv_lru_t *lv_lru_create(size_t cache_size, size_t average_length, lv_lru_free_cb_t value_free, lv_lru_free_cb_t key_free) + * void lv_draw_sw_mask_free_param(void *p) */ -static PyObject *py_lv_lru_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_free_param(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long cache_size_val; long average_length_val; PyObject *value_free_py; PyObject *key_free_py; - if (!PyArg_ParseTuple(py_args, "llOO", &cache_size_val, &average_length_val, &value_free_py, &key_free_py)) { PyGILState_Release(gstate); return NULL; } - size_t cache_size = (size_t)cache_size_val; - size_t average_length = (size_t)average_length_val; - void *value_free = NULL; - void *key_free = NULL; + PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "O", &p_py)) { PyGILState_Release(gstate); return NULL; } + void *p = mp_to_ptr(p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_lru_t * _res; lvpy_lock(); - _res = ((lv_lru_t *(*)(size_t, size_t, lv_lru_free_cb_t, lv_lru_free_cb_t))lv_lru_create)(cache_size, average_length, value_free, key_free); + ((void (*)(void *))lv_draw_sw_mask_free_param)(p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_lru_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_lru_create_def = { - "lv_lru_create", - (PyCFunction)py_lv_lru_create, +static PyMethodDef py_lv_draw_sw_mask_free_param_def = { + "lv_draw_sw_mask_free_param", + (PyCFunction)py_lv_draw_sw_mask_free_param, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79696,31 +74083,28 @@ static PyMethodDef py_lv_lru_create_def = { /* * lvgl extension definition for: - * lv_pending_t *lv_pending_create(size_t obj_size, uint32_t capacity_default) + * void lv_draw_sw_mask_cleanup(void) */ -static PyObject *py_lv_pending_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_cleanup(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - long obj_size_val; long capacity_default_val; - if (!PyArg_ParseTuple(py_args, "ll", &obj_size_val, &capacity_default_val)) { PyGILState_Release(gstate); return NULL; } - size_t obj_size = (size_t)obj_size_val; - uint32_t capacity_default = (uint32_t)capacity_default_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_pending_t * _res; lvpy_lock(); - _res = ((lv_pending_t *(*)(size_t, uint32_t))lv_pending_create)(obj_size, capacity_default); + ((void (*)(void))lv_draw_sw_mask_cleanup)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_pending_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_pending_create_def = { - "lv_pending_create", - (PyCFunction)py_lv_pending_create, +static PyMethodDef py_lv_draw_sw_mask_cleanup_def = { + "lv_draw_sw_mask_cleanup", + (PyCFunction)py_lv_draw_sw_mask_cleanup, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79728,32 +74112,28 @@ static PyMethodDef py_lv_pending_create_def = { /* * lvgl extension definition for: - * void lv_text_get_size_attributes(lv_point_t *size_res, const char *text, const lv_font_t *font, lv_text_attributes_t *attributes) + * void lv_layout_init(void) */ -static PyObject *py_lv_text_get_size_attributes(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *size_res_py; PyObject *text_py; PyObject *font_py; PyObject *attributes_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &size_res_py, &text_py, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); - const char *text = (const char *)(char*)convert_from_str(text_py); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, const char *, const lv_font_t *, lv_text_attributes_t *))lv_text_get_size_attributes)(size_res, text, font, attributes); + ((void (*)(void))lv_layout_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_get_size_attributes_def = { - "lv_text_get_size_attributes", - (PyCFunction)py_lv_text_get_size_attributes, +static PyMethodDef py_lv_layout_init_def = { + "lv_layout_init", + (PyCFunction)py_lv_layout_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79761,33 +74141,28 @@ static PyMethodDef py_lv_text_get_size_attributes_def = { /* * lvgl extension definition for: - * int32_t lv_text_get_width(const char *txt, uint32_t length, const lv_font_t *font, const lv_text_attributes_t *attributes) + * void lv_layout_deinit(void) */ -static PyObject *py_lv_text_get_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *txt_py; long length_val; PyObject *font_py; PyObject *attributes_py; - if (!PyArg_ParseTuple(py_args, "OlOO", &txt_py, &length_val, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } - const char *txt = (const char *)(char*)convert_from_str(txt_py); - uint32_t length = (uint32_t)length_val; - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - const lv_text_attributes_t *attributes = (const lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(attributes_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const char *, uint32_t, const lv_font_t *, const lv_text_attributes_t *))lv_text_get_width)(txt, length, font, attributes); + ((void (*)(void))lv_layout_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_text_get_width_def = { - "lv_text_get_width", - (PyCFunction)py_lv_text_get_width, +static PyMethodDef py_lv_layout_deinit_def = { + "lv_layout_deinit", + (PyCFunction)py_lv_layout_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79795,33 +74170,32 @@ static PyMethodDef py_lv_text_get_width_def = { /* * lvgl extension definition for: - * int32_t lv_text_get_line_width(const char *txt, uint32_t length, const lv_font_t *font, const lv_text_attributes_t *attributes) + * bool lv_layout_get_min_size(lv_obj_t *obj, int32_t *size, bool width) */ -static PyObject *py_lv_text_get_line_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_get_min_size(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *txt_py; long length_val; PyObject *font_py; PyObject *attributes_py; - if (!PyArg_ParseTuple(py_args, "OlOO", &txt_py, &length_val, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } - const char *txt = (const char *)(char*)convert_from_str(txt_py); - uint32_t length = (uint32_t)length_val; - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - const lv_text_attributes_t *attributes = (const lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(attributes_py); + PyObject *obj_py; PyObject *size_py; long width_val; + if (!PyArg_ParseTuple(py_args, "OOl", &obj_py, &size_py, &width_val)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + int32_t *size = mp_array_to_i32ptr(size_py); + bool width = (width_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const char *, uint32_t, const lv_font_t *, const lv_text_attributes_t *))lv_text_get_line_width)(txt, length, font, attributes); + _res = ((bool (*)(lv_obj_t *, int32_t *, bool))lv_layout_get_min_size)(obj, size, width); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_text_get_line_width_def = { - "lv_text_get_line_width", - (PyCFunction)py_lv_text_get_line_width, +static PyMethodDef py_lv_layout_get_min_size_def = { + "lv_layout_get_min_size", + (PyCFunction)py_lv_layout_get_min_size, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79829,31 +74203,29 @@ static PyMethodDef py_lv_text_get_line_width_def = { /* * lvgl extension definition for: - * bool lv_text_is_cmd(lv_text_cmd_state_t *state, uint32_t c) + * void lv_layout_apply(lv_obj_t *obj) */ -static PyObject *py_lv_text_is_cmd(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layout_apply(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *state_py; long c_val; - if (!PyArg_ParseTuple(py_args, "Ol", &state_py, &c_val)) { PyGILState_Release(gstate); return NULL; } - lv_text_cmd_state_t *state = mp_to_ptr(state_py); - uint32_t c = (uint32_t)c_val; + PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "O", &obj_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_text_cmd_state_t *, uint32_t))lv_text_is_cmd)(state, c); + ((void (*)(lv_obj_t *))lv_layout_apply)(obj); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_text_is_cmd_def = { - "lv_text_is_cmd", - (PyCFunction)py_lv_text_is_cmd, +static PyMethodDef py_lv_layout_apply_def = { + "lv_layout_apply", + (PyCFunction)py_lv_layout_apply, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79861,34 +74233,28 @@ static PyMethodDef py_lv_text_is_cmd_def = { /* * lvgl extension definition for: - * uint32_t lv_text_get_next_line(const char *txt, uint32_t len, const lv_font_t *font, int32_t *used_width, lv_text_attributes_t *attributes) + * void lv_group_init(void) */ -static PyObject *py_lv_text_get_next_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *txt_py; long len_val; PyObject *font_py; PyObject *used_width_py; PyObject *attributes_py; - if (!PyArg_ParseTuple(py_args, "OlOOO", &txt_py, &len_val, &font_py, &used_width_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } - const char *txt = (const char *)(char*)convert_from_str(txt_py); - uint32_t len = (uint32_t)len_val; - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - int32_t *used_width = mp_array_to_i32ptr(used_width_py); - lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const char *, uint32_t, const lv_font_t *, int32_t *, lv_text_attributes_t *))lv_text_get_next_line)(txt, len, font, used_width, attributes); + ((void (*)(void))lv_group_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_text_get_next_line_def = { - "lv_text_get_next_line", - (PyCFunction)py_lv_text_get_next_line, +static PyMethodDef py_lv_group_init_def = { + "lv_group_init", + (PyCFunction)py_lv_group_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79896,31 +74262,28 @@ static PyMethodDef py_lv_text_get_next_line_def = { /* * lvgl extension definition for: - * void lv_text_ins(char *txt_buf, uint32_t pos, const char *ins_txt) + * void lv_group_deinit(void) */ -static PyObject *py_lv_text_ins(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_group_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *txt_buf_py; long pos_val; PyObject *ins_txt_py; - if (!PyArg_ParseTuple(py_args, "OlO", &txt_buf_py, &pos_val, &ins_txt_py)) { PyGILState_Release(gstate); return NULL; } - char *txt_buf = (char*)convert_from_str(txt_buf_py); - uint32_t pos = (uint32_t)pos_val; - const char *ins_txt = (const char *)(char*)convert_from_str(ins_txt_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(char *, uint32_t, const char *))lv_text_ins)(txt_buf, pos, ins_txt); + ((void (*)(void))lv_group_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_ins_def = { - "lv_text_ins", - (PyCFunction)py_lv_text_ins, +static PyMethodDef py_lv_group_deinit_def = { + "lv_group_deinit", + (PyCFunction)py_lv_group_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79928,31 +74291,29 @@ static PyMethodDef py_lv_text_ins_def = { /* * lvgl extension definition for: - * void lv_text_cut(char *txt, uint32_t pos, uint32_t len) + * void lv_event_mark_deleted(void *target) */ -static PyObject *py_lv_text_cut(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_mark_deleted(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *txt_py; long pos_val; long len_val; - if (!PyArg_ParseTuple(py_args, "Oll", &txt_py, &pos_val, &len_val)) { PyGILState_Release(gstate); return NULL; } - char *txt = (char*)convert_from_str(txt_py); - uint32_t pos = (uint32_t)pos_val; - uint32_t len = (uint32_t)len_val; + PyObject *target_py; + if (!PyArg_ParseTuple(py_args, "O", &target_py)) { PyGILState_Release(gstate); return NULL; } + void *target = mp_to_ptr(target_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(char *, uint32_t, uint32_t))lv_text_cut)(txt, pos, len); + ((void (*)(void *))lv_event_mark_deleted)(target); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_cut_def = { - "lv_text_cut", - (PyCFunction)py_lv_text_cut, +static PyMethodDef py_lv_event_mark_deleted_def = { + "lv_event_mark_deleted", + (PyCFunction)py_lv_event_mark_deleted, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79960,32 +74321,28 @@ static PyMethodDef py_lv_text_cut_def = { /* * lvgl extension definition for: - * void lv_text_encoded_letter_next_2(const char *txt, uint32_t *letter, uint32_t *letter_next, uint32_t *ofs) + * void lv_subject_global_init(void) */ -static PyObject *py_lv_text_encoded_letter_next_2(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_global_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *txt_py; PyObject *letter_py; PyObject *letter_next_py; PyObject *ofs_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &txt_py, &letter_py, &letter_next_py, &ofs_py)) { PyGILState_Release(gstate); return NULL; } - const char *txt = (const char *)(char*)convert_from_str(txt_py); - uint32_t *letter = mp_array_to_u32ptr(letter_py); - uint32_t *letter_next = mp_array_to_u32ptr(letter_next_py); - uint32_t *ofs = mp_array_to_u32ptr(ofs_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const char *, uint32_t *, uint32_t *, uint32_t *))lv_text_encoded_letter_next_2)(txt, letter, letter_next, ofs); + ((void (*)(void))lv_subject_global_init)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_encoded_letter_next_2_def = { - "lv_text_encoded_letter_next_2", - (PyCFunction)py_lv_text_encoded_letter_next_2, +static PyMethodDef py_lv_subject_global_init_def = { + "lv_subject_global_init", + (PyCFunction)py_lv_subject_global_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -79993,77 +74350,57 @@ static PyMethodDef py_lv_text_encoded_letter_next_2_def = { /* * lvgl extension definition for: - * void lv_text_get_size_internal(lv_point_t *size_res, const char *text, const lv_font_t *font, int32_t letter_space, int32_t line_space, int32_t max_width, lv_text_flag_t flag) + * void lv_subject_global_deinit(void) */ -static PyObject *py_lv_text_get_size_internal(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_subject_global_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *size_res_py; PyObject *text_py; PyObject *font_py; long letter_space_val; long line_space_val; long max_width_val; PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "OOOlllO", &size_res_py, &text_py, &font_py, &letter_space_val, &line_space_val, &max_width_val, &flag_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); - const char *text = (const char *)(char*)convert_from_str(text_py); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - int32_t letter_space = (int32_t)letter_space_val; - int32_t line_space = (int32_t)line_space_val; - int32_t max_width = (int32_t)max_width_val; - lv_text_flag_t flag = (int)mp_obj_get_int(flag_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, const char *, const lv_font_t *, int32_t, int32_t, int32_t, lv_text_flag_t))lv_text_get_size_internal)(size_res, text, font, letter_space, line_space, max_width, flag); + ((void (*)(void))lv_subject_global_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_text_get_size_internal_def = { - "lv_text_get_size_internal", - (PyCFunction)py_lv_text_get_size_internal, +static PyMethodDef py_lv_subject_global_deinit_def = { + "lv_subject_global_deinit", + (PyCFunction)py_lv_subject_global_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! int cmp(const void *pRef, const void *pElement) - * int (*cmp)(const void *pRef, const void *pElement) - */ - - /* * lvgl extension definition for: - * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) + * void lv_refr_init(void) */ -static PyObject *py_lv_utils_bsearch(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)self; (void)py_kwds; - PyObject *key_py; PyObject *base_py; long n_val; long size_val; PyObject *cmp_py; - if (!PyArg_ParseTuple(py_args, "OOllO", &key_py, &base_py, &n_val, &size_val, &cmp_py)) { PyGILState_Release(gstate); return NULL; } - const void *key = (const void *)mp_to_ptr(key_py); - const void *base = (const void *)mp_to_ptr(base_py); - size_t n = (size_t)n_val; - size_t size = (size_t)size_val; - void *cmp = NULL; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_utils_bsearch)(key, base, n, size, cmp); + ((void (*)(void))lv_refr_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_utils_bsearch_def = { - "lv_utils_bsearch", - (PyCFunction)py_lv_utils_bsearch, +static PyMethodDef py_lv_refr_init_def = { + "lv_refr_init", + (PyCFunction)py_lv_refr_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80071,31 +74408,28 @@ static PyMethodDef py_lv_utils_bsearch_def = { /* * lvgl extension definition for: - * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) + * void lv_refr_deinit(void) */ -static PyObject *py_lv_color_is_in_range_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *l_color_py; PyObject *h_color_py; - if (!PyArg_ParseTuple(py_args, "OO", &l_color_py, &h_color_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } - lv_color_t l_color = mp_write_lv_color_t(l_color_py); - lv_color_t h_color = mp_write_lv_color_t(h_color_py); + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_color_is_in_range)(color, l_color, h_color); + ((void (*)(void))lv_refr_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_is_in_range_struct_method_def = { - "lv_color_is_in_range", - (PyCFunction)py_lv_color_is_in_range_struct_method, +static PyMethodDef py_lv_refr_deinit_def = { + "lv_refr_deinit", + (PyCFunction)py_lv_refr_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80103,30 +74437,31 @@ static PyMethodDef py_lv_color_is_in_range_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) + * lv_result_t lv_inv_area(lv_display_t *disp, const lv_area_t *area_p) */ -static PyObject *py_lv_color_to_32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_inv_area(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long opa_val; - if (!PyArg_ParseTuple(py_args, "l", &opa_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } - lv_opa_t opa = (lv_opa_t)opa_val; + PyObject *disp_py; PyObject *area_p_py; + if (!PyArg_ParseTuple(py_args, "OO", &disp_py, &area_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_color_to_32)(color, opa); + _res = ((lv_result_t (*)(lv_display_t *, const lv_area_t *))lv_inv_area)(disp, area_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_to_32_struct_method_def = { - "lv_color_to_32", - (PyCFunction)py_lv_color_to_32_struct_method, +static PyMethodDef py_lv_inv_area_def = { + "lv_inv_area", + (PyCFunction)py_lv_inv_area, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80134,28 +74469,29 @@ static PyMethodDef py_lv_color_to_32_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_color_to_int(lv_color_t c) + * lv_display_t *lv_refr_get_disp_refreshing(void) */ -static PyObject *py_lv_color_to_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_get_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_display_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_color_t))lv_color_to_int)(c); + _res = ((lv_display_t *(*)(void))lv_refr_get_disp_refreshing)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_color_to_int_struct_method_def = { - "lv_color_to_int", - (PyCFunction)py_lv_color_to_int_struct_method, +static PyMethodDef py_lv_refr_get_disp_refreshing_def = { + "lv_refr_get_disp_refreshing", + (PyCFunction)py_lv_refr_get_disp_refreshing, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80163,30 +74499,29 @@ static PyMethodDef py_lv_color_to_int_struct_method_def = { /* * lvgl extension definition for: - * bool lv_color_eq(lv_color_t c1, lv_color_t c2) + * void lv_refr_set_disp_refreshing(lv_display_t *disp) */ -static PyObject *py_lv_color_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_set_disp_refreshing(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *c2_py; - if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } - lv_color_t c2 = mp_write_lv_color_t(c2_py); + PyObject *disp_py; + if (!PyArg_ParseTuple(py_args, "O", &disp_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = mp_write_ptr_lv_display_t(disp_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_color_t, lv_color_t))lv_color_eq)(c1, c2); + ((void (*)(lv_display_t *))lv_refr_set_disp_refreshing)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_eq_struct_method_def = { - "lv_color_eq", - (PyCFunction)py_lv_color_eq_struct_method, +static PyMethodDef py_lv_refr_set_disp_refreshing_def = { + "lv_refr_set_disp_refreshing", + (PyCFunction)py_lv_refr_set_disp_refreshing, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80194,28 +74529,31 @@ static PyMethodDef py_lv_color_eq_struct_method_def = { /* * lvgl extension definition for: - * uint16_t lv_color_to_u16(lv_color_t color) + * lv_obj_t *lv_refr_get_top_obj(const lv_area_t *area_p, lv_obj_t *obj) */ -static PyObject *py_lv_color_to_u16_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_refr_get_top_obj(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + PyObject *area_p_py; PyObject *obj_py; + if (!PyArg_ParseTuple(py_args, "OO", &area_p_py, &obj_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *area_p = (const lv_area_t *)mp_write_ptr_lv_area_t(area_p_py); + lv_obj_t *obj = mp_to_lv(obj_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((uint16_t (*)(lv_color_t))lv_color_to_u16)(color); + _res = ((lv_obj_t *(*)(const lv_area_t *, lv_obj_t *))lv_refr_get_top_obj)(area_p, obj); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_color_to_u16_struct_method_def = { - "lv_color_to_u16", - (PyCFunction)py_lv_color_to_u16_struct_method, +static PyMethodDef py_lv_refr_get_top_obj_def = { + "lv_refr_get_top_obj", + (PyCFunction)py_lv_refr_get_top_obj, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80223,28 +74561,33 @@ static PyMethodDef py_lv_color_to_u16_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_color_to_u32(lv_color_t color) + * void lv_draw_sw_grad_color_calculate(const lv_grad_dsc_t *dsc, int32_t range, int32_t frac, lv_color_t *color_out, lv_opa_t *opa_out) */ -static PyObject *py_lv_color_to_u32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_grad_color_calculate(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + PyObject *dsc_py; long range_val; long frac_val; PyObject *color_out_py; PyObject *opa_out_py; + if (!PyArg_ParseTuple(py_args, "OllOO", &dsc_py, &range_val, &frac_val, &color_out_py, &opa_out_py)) { PyGILState_Release(gstate); return NULL; } + const lv_grad_dsc_t *dsc = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(dsc_py); + int32_t range = (int32_t)range_val; + int32_t frac = (int32_t)frac_val; + lv_color_t *color_out = mp_write_ptr_lv_color_t(color_out_py); + lv_opa_t *opa_out = mp_array_to_u8ptr(opa_out_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_color_t))lv_color_to_u32)(color); + ((void (*)(const lv_grad_dsc_t *, int32_t, int32_t, lv_color_t *, lv_opa_t *))lv_draw_sw_grad_color_calculate)(dsc, range, frac, color_out, opa_out); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_to_u32_struct_method_def = { - "lv_color_to_u32", - (PyCFunction)py_lv_color_to_u32_struct_method, +static PyMethodDef py_lv_draw_sw_grad_color_calculate_def = { + "lv_draw_sw_grad_color_calculate", + (PyCFunction)py_lv_draw_sw_grad_color_calculate, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80252,30 +74595,32 @@ static PyMethodDef py_lv_color_to_u32_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) + * lv_draw_sw_grad_calc_t *lv_draw_sw_grad_get(const lv_grad_dsc_t *gradient, int32_t w, int32_t h) */ -static PyObject *py_lv_color_lighten_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_grad_get(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long lvl_val; - if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } - lv_opa_t lvl = (lv_opa_t)lvl_val; + PyObject *gradient_py; long w_val; long h_val; + if (!PyArg_ParseTuple(py_args, "Oll", &gradient_py, &w_val, &h_val)) { PyGILState_Release(gstate); return NULL; } + const lv_grad_dsc_t *gradient = (const lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(gradient_py); + int32_t w = (int32_t)w_val; + int32_t h = (int32_t)h_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_draw_sw_grad_calc_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_lighten)(c, lvl); + _res = ((lv_draw_sw_grad_calc_t *(*)(const lv_grad_dsc_t *, int32_t, int32_t))lv_draw_sw_grad_get)(gradient, w, h); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_draw_sw_grad_calc_t((void*)_res); } -static PyMethodDef py_lv_color_lighten_struct_method_def = { - "lv_color_lighten", - (PyCFunction)py_lv_color_lighten_struct_method, +static PyMethodDef py_lv_draw_sw_grad_get_def = { + "lv_draw_sw_grad_get", + (PyCFunction)py_lv_draw_sw_grad_get, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80283,30 +74628,28 @@ static PyMethodDef py_lv_color_lighten_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_darken(lv_color_t c, lv_opa_t lvl) + * void lv_fs_init(void) */ -static PyObject *py_lv_color_darken_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_init(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long lvl_val; - if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } - lv_opa_t lvl = (lv_opa_t)lvl_val; + + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_darken)(c, lvl); + ((void (*)(void))lv_fs_init)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_darken_struct_method_def = { - "lv_color_darken", - (PyCFunction)py_lv_color_darken_struct_method, +static PyMethodDef py_lv_fs_init_def = { + "lv_fs_init", + (PyCFunction)py_lv_fs_init, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80314,28 +74657,28 @@ static PyMethodDef py_lv_color_darken_struct_method_def = { /* * lvgl extension definition for: - * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) + * void lv_fs_deinit(void) */ -static PyObject *py_lv_color_to_hsv_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_fs_deinit(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_hsv_t _res; lvpy_lock(); - _res = ((lv_color_hsv_t (*)(lv_color_t))lv_color_to_hsv)(color); + ((void (*)(void))lv_fs_deinit)(); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_hsv_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_to_hsv_struct_method_def = { - "lv_color_to_hsv", - (PyCFunction)py_lv_color_to_hsv_struct_method, +static PyMethodDef py_lv_fs_deinit_def = { + "lv_fs_deinit", + (PyCFunction)py_lv_fs_deinit, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80343,28 +74686,30 @@ static PyMethodDef py_lv_color_to_hsv_struct_method_def = { /* * lvgl extension definition for: - * uint8_t lv_color_luminance(lv_color_t c) + * void lv_indev_scroll_get_snap_dist(lv_obj_t *obj, lv_point_t *p) */ -static PyObject *py_lv_color_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_indev_scroll_get_snap_dist(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + PyObject *obj_py; PyObject *p_py; + if (!PyArg_ParseTuple(py_args, "OO", &obj_py, &p_py)) { PyGILState_Release(gstate); return NULL; } + lv_obj_t *obj = mp_to_lv(obj_py); + lv_point_t *p = mp_write_ptr_lv_point_t(p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_t))lv_color_luminance)(c); + ((void (*)(lv_obj_t *, lv_point_t *))lv_indev_scroll_get_snap_dist)(obj, p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_luminance_struct_method_def = { - "lv_color_luminance", - (PyCFunction)py_lv_color_luminance_struct_method, +static PyMethodDef py_lv_indev_scroll_get_snap_dist_def = { + "lv_indev_scroll_get_snap_dist", + (PyCFunction)py_lv_indev_scroll_get_snap_dist, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80372,31 +74717,31 @@ static PyMethodDef py_lv_color_luminance_struct_method_def = { /* * lvgl extension definition for: - * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) + * lv_circle_buf_t *lv_circle_buf_create(uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_color_mix_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *c2_py; long mix_val; - if (!PyArg_ParseTuple(py_args, "Ol", &c2_py, &mix_val)) { PyGILState_Release(gstate); return NULL; } - lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } - lv_color_t c2 = mp_write_lv_color_t(c2_py); - uint8_t mix = (uint8_t)mix_val; + long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_t _res; + lv_circle_buf_t * _res; lvpy_lock(); - _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_color_mix)(c1, c2, mix); + _res = ((lv_circle_buf_t *(*)(uint32_t, uint32_t))lv_circle_buf_create)(capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color_t(_res); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static PyMethodDef py_lv_color_mix_struct_method_def = { - "lv_color_mix", - (PyCFunction)py_lv_color_mix_struct_method, +static PyMethodDef py_lv_circle_buf_create_def = { + "lv_circle_buf_create", + (PyCFunction)py_lv_circle_buf_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80404,106 +74749,111 @@ static PyMethodDef py_lv_color_mix_struct_method_def = { /* * lvgl extension definition for: - * uint8_t lv_color_brightness(lv_color_t c) + * lv_circle_buf_t *lv_circle_buf_create_from_buf(void *buf, uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_color_brightness_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_create_from_buf(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + PyObject *buf_py; long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + void *buf = mp_to_ptr(buf_py); + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + lv_circle_buf_t * _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color_t))lv_color_brightness)(c); + _res = ((lv_circle_buf_t *(*)(void *, uint32_t, uint32_t))lv_circle_buf_create_from_buf)(buf, capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static PyMethodDef py_lv_color_brightness_struct_method_def = { - "lv_color_brightness", - (PyCFunction)py_lv_color_brightness_struct_method, +static PyMethodDef py_lv_circle_buf_create_from_buf_def = { + "lv_circle_buf_create_from_buf", + (PyCFunction)py_lv_circle_buf_create_from_buf, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_color_t_methods[] = { - {"is_in_range", (PyCFunction)py_lv_color_is_in_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_32", (PyCFunction)py_lv_color_to_32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_int", (PyCFunction)py_lv_color_to_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"eq", (PyCFunction)py_lv_color_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_u16", (PyCFunction)py_lv_color_to_u16_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_u32", (PyCFunction)py_lv_color_to_u32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"lighten", (PyCFunction)py_lv_color_lighten_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"darken", (PyCFunction)py_lv_color_darken_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_hsv", (PyCFunction)py_lv_color_to_hsv_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"luminance", (PyCFunction)py_lv_color_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"mix", (PyCFunction)py_lv_color_mix_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"brightness", (PyCFunction)py_lv_color_brightness_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) + * lv_circle_buf_t *lv_circle_buf_create_from_array(const lv_array_t *array) */ -static PyObject *py_lv_grad_init_stops_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_circle_buf_create_from_array(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *colors_py; PyObject *opa_py; PyObject *fracs_py; long num_stops_val; - if (!PyArg_ParseTuple(py_args, "OOOl", &colors_py, &opa_py, &fracs_py, &num_stops_val)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *grad = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - const lv_color_t *colors = (const lv_color_t *)lvpy_struct_arr_arg(self, colors_py, "lv_grad_init_stops:colors", sizeof(lv_color_t), mp_write_value_ptr_lv_color_t); - const lv_opa_t *opa = (const lv_opa_t *)mp_to_ptr(opa_py); - const uint8_t *fracs = (const uint8_t *)mp_to_ptr(fracs_py); - int num_stops = (int)num_stops_val; + PyObject *array_py; + if (!PyArg_ParseTuple(py_args, "O", &array_py)) { PyGILState_Release(gstate); return NULL; } + const lv_array_t *array = (const lv_array_t *)mp_write_ptr_lv_array_t(array_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_circle_buf_t * _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_grad_init_stops)(grad, colors, opa, fracs, num_stops); + _res = ((lv_circle_buf_t *(*)(const lv_array_t *))lv_circle_buf_create_from_array)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_circle_buf_t((void*)_res); } -static PyMethodDef py_lv_grad_init_stops_struct_method_def = { - "lv_grad_init_stops", - (PyCFunction)py_lv_grad_init_stops_struct_method, +static PyMethodDef py_lv_circle_buf_create_from_array_def = { + "lv_circle_buf_create_from_array", + (PyCFunction)py_lv_circle_buf_create_from_array, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * lv_lru_free_cb_t value_free + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_lru_free_cb_t(void *v) + * lv_lru_free_cb_t key_free + */ + + /* * lvgl extension definition for: - * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) + * lv_lru_t *lv_lru_create(size_t cache_size, size_t average_length, lv_lru_free_cb_t value_free, lv_lru_free_cb_t key_free) */ -static PyObject *py_lv_grad_horizontal_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_lru_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + long cache_size_val; long average_length_val; PyObject *value_free_py; PyObject *key_free_py; + if (!PyArg_ParseTuple(py_args, "llOO", &cache_size_val, &average_length_val, &value_free_py, &key_free_py)) { PyGILState_Release(gstate); return NULL; } + size_t cache_size = (size_t)cache_size_val; + size_t average_length = (size_t)average_length_val; + void *value_free = NULL; + void *key_free = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_lru_t * _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *))lv_grad_horizontal_init)(dsc); + _res = ((lv_lru_t *(*)(size_t, size_t, lv_lru_free_cb_t, lv_lru_free_cb_t))lv_lru_create)(cache_size, average_length, value_free, key_free); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_lru_t((void*)_res); } -static PyMethodDef py_lv_grad_horizontal_init_struct_method_def = { - "lv_grad_horizontal_init", - (PyCFunction)py_lv_grad_horizontal_init_struct_method, +static PyMethodDef py_lv_lru_create_def = { + "lv_lru_create", + (PyCFunction)py_lv_lru_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80511,27 +74861,31 @@ static PyMethodDef py_lv_grad_horizontal_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_vertical_init(lv_grad_dsc_t *dsc) + * lv_pending_t *lv_pending_create(size_t obj_size, uint32_t capacity_default) */ -static PyObject *py_lv_grad_vertical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_pending_create(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + long obj_size_val; long capacity_default_val; + if (!PyArg_ParseTuple(py_args, "ll", &obj_size_val, &capacity_default_val)) { PyGILState_Release(gstate); return NULL; } + size_t obj_size = (size_t)obj_size_val; + uint32_t capacity_default = (uint32_t)capacity_default_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_pending_t * _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *))lv_grad_vertical_init)(dsc); + _res = ((lv_pending_t *(*)(size_t, uint32_t))lv_pending_create)(obj_size, capacity_default); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_pending_t((void*)_res); } -static PyMethodDef py_lv_grad_vertical_init_struct_method_def = { - "lv_grad_vertical_init", - (PyCFunction)py_lv_grad_vertical_init_struct_method, +static PyMethodDef py_lv_pending_create_def = { + "lv_pending_create", + (PyCFunction)py_lv_pending_create, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80539,33 +74893,32 @@ static PyMethodDef py_lv_grad_vertical_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + * void lv_text_get_size_attributes(lv_point_t *size_res, const char *text, const lv_font_t *font, lv_text_attributes_t *attributes) */ -static PyObject *py_lv_grad_linear_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_size_attributes(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long from_x_val; long from_y_val; long to_x_val; long to_y_val; PyObject *extend_py; - if (!PyArg_ParseTuple(py_args, "llllO", &from_x_val, &from_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t from_x = (int32_t)from_x_val; - int32_t from_y = (int32_t)from_y_val; - int32_t to_x = (int32_t)to_x_val; - int32_t to_y = (int32_t)to_y_val; - lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + PyObject *size_res_py; PyObject *text_py; PyObject *font_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &size_res_py, &text_py, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *size_res = mp_write_ptr_lv_point_t(size_res_py); + const char *text = (const char *)(char*)convert_from_str(text_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_linear_init)(dsc, from_x, from_y, to_x, to_y, extend); + ((void (*)(lv_point_t *, const char *, const lv_font_t *, lv_text_attributes_t *))lv_text_get_size_attributes)(size_res, text, font, attributes); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_grad_linear_init_struct_method_def = { - "lv_grad_linear_init", - (PyCFunction)py_lv_grad_linear_init_struct_method, +static PyMethodDef py_lv_text_get_size_attributes_def = { + "lv_text_get_size_attributes", + (PyCFunction)py_lv_text_get_size_attributes, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80573,33 +74926,33 @@ static PyMethodDef py_lv_grad_linear_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_radial_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + * int32_t lv_text_get_width(const char *txt, uint32_t length, const lv_font_t *font, const lv_text_attributes_t *attributes) */ -static PyObject *py_lv_grad_radial_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long center_x_val; long center_y_val; long to_x_val; long to_y_val; PyObject *extend_py; - if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t center_x = (int32_t)center_x_val; - int32_t center_y = (int32_t)center_y_val; - int32_t to_x = (int32_t)to_x_val; - int32_t to_y = (int32_t)to_y_val; - lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + PyObject *txt_py; long length_val; PyObject *font_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OlOO", &txt_py, &length_val, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t length = (uint32_t)length_val; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + const lv_text_attributes_t *attributes = (const lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_radial_init)(dsc, center_x, center_y, to_x, to_y, extend); + _res = ((int32_t (*)(const char *, uint32_t, const lv_font_t *, const lv_text_attributes_t *))lv_text_get_width)(txt, length, font, attributes); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_grad_radial_init_struct_method_def = { - "lv_grad_radial_init", - (PyCFunction)py_lv_grad_radial_init_struct_method, +static PyMethodDef py_lv_text_get_width_def = { + "lv_text_get_width", + (PyCFunction)py_lv_text_get_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80607,31 +74960,33 @@ static PyMethodDef py_lv_grad_radial_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) + * int32_t lv_text_get_line_width(const char *txt, uint32_t length, const lv_font_t *font, const lv_text_attributes_t *attributes) */ -static PyObject *py_lv_grad_radial_set_focal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_line_width(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long center_x_val; long center_y_val; long radius_val; - if (!PyArg_ParseTuple(py_args, "lll", ¢er_x_val, ¢er_y_val, &radius_val)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t center_x = (int32_t)center_x_val; - int32_t center_y = (int32_t)center_y_val; - int32_t radius = (int32_t)radius_val; + PyObject *txt_py; long length_val; PyObject *font_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OlOO", &txt_py, &length_val, &font_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t length = (uint32_t)length_val; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + const lv_text_attributes_t *attributes = (const lv_text_attributes_t *)mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_grad_radial_set_focal)(dsc, center_x, center_y, radius); + _res = ((int32_t (*)(const char *, uint32_t, const lv_font_t *, const lv_text_attributes_t *))lv_text_get_line_width)(txt, length, font, attributes); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_grad_radial_set_focal_struct_method_def = { - "lv_grad_radial_set_focal", - (PyCFunction)py_lv_grad_radial_set_focal_struct_method, +static PyMethodDef py_lv_text_get_line_width_def = { + "lv_text_get_line_width", + (PyCFunction)py_lv_text_get_line_width, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80639,82 +74994,66 @@ static PyMethodDef py_lv_grad_radial_set_focal_struct_method_def = { /* * lvgl extension definition for: - * void lv_grad_conical_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t start_angle, int32_t end_angle, lv_grad_extend_t extend) + * bool lv_text_is_cmd(lv_text_cmd_state_t *state, uint32_t c) */ -static PyObject *py_lv_grad_conical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_is_cmd(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long center_x_val; long center_y_val; long start_angle_val; long end_angle_val; PyObject *extend_py; - if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &start_angle_val, &end_angle_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } - lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); - int32_t center_x = (int32_t)center_x_val; - int32_t center_y = (int32_t)center_y_val; - int32_t start_angle = (int32_t)start_angle_val; - int32_t end_angle = (int32_t)end_angle_val; - lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + PyObject *state_py; long c_val; + if (!PyArg_ParseTuple(py_args, "Ol", &state_py, &c_val)) { PyGILState_Release(gstate); return NULL; } + lv_text_cmd_state_t *state = mp_to_ptr(state_py); + uint32_t c = (uint32_t)c_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_conical_init)(dsc, center_x, center_y, start_angle, end_angle, extend); + _res = ((bool (*)(lv_text_cmd_state_t *, uint32_t))lv_text_is_cmd)(state, c); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_grad_conical_init_struct_method_def = { - "lv_grad_conical_init", - (PyCFunction)py_lv_grad_conical_init_struct_method, +static PyMethodDef py_lv_text_is_cmd_def = { + "lv_text_is_cmd", + (PyCFunction)py_lv_text_is_cmd, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_grad_dsc_t_methods[] = { - {"init_stops", (PyCFunction)py_lv_grad_init_stops_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"horizontal_init", (PyCFunction)py_lv_grad_horizontal_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"vertical_init", (PyCFunction)py_lv_grad_vertical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"linear_init", (PyCFunction)py_lv_grad_linear_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"radial_init", (PyCFunction)py_lv_grad_radial_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"radial_set_focal", (PyCFunction)py_lv_grad_radial_set_focal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"conical_init", (PyCFunction)py_lv_grad_conical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_grad_stop_t_methods[] = {{NULL}}; -PyMethodDef py_lv_grad_dsc_params_t_methods[] = {{NULL}}; -PyMethodDef py_lv_grad_dsc_params_linear_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + * uint32_t lv_text_get_next_line(const char *txt, uint32_t len, const lv_font_t *font, int32_t *used_width, lv_text_attributes_t *attributes) */ -static PyObject *py_lv_point_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_get_next_line(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; - if (!PyArg_ParseTuple(py_args, "lllOl", &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *point = (lv_point_t *)mp_write_ptr_lv_point_t(self); - int32_t angle = (int32_t)angle_val; - int32_t scale_x = (int32_t)scale_x_val; - int32_t scale_y = (int32_t)scale_y_val; - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); - bool zoom_first = (zoom_first_val != 0); + PyObject *txt_py; long len_val; PyObject *font_py; PyObject *used_width_py; PyObject *attributes_py; + if (!PyArg_ParseTuple(py_args, "OlOOO", &txt_py, &len_val, &font_py, &used_width_py, &attributes_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t len = (uint32_t)len_val; + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + int32_t *used_width = mp_array_to_i32ptr(used_width_py); + lv_text_attributes_t *attributes = mp_write_ptr_lv_text_attributes_t(attributes_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_transform)(point, angle, scale_x, scale_y, pivot, zoom_first); + _res = ((uint32_t (*)(const char *, uint32_t, const lv_font_t *, int32_t *, lv_text_attributes_t *))lv_text_get_next_line)(txt, len, font, used_width, attributes); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_point_transform_struct_method_def = { - "lv_point_transform", - (PyCFunction)py_lv_point_transform_struct_method, +static PyMethodDef py_lv_text_get_next_line_def = { + "lv_text_get_next_line", + (PyCFunction)py_lv_text_get_next_line, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80722,34 +75061,31 @@ static PyMethodDef py_lv_point_transform_struct_method_def = { /* * lvgl extension definition for: - * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + * void lv_text_ins(char *txt_buf, uint32_t pos, const char *ins_txt) */ -static PyObject *py_lv_point_array_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_ins(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long count_val; long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; - if (!PyArg_ParseTuple(py_args, "llllOl", &count_val, &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *points = (lv_point_t *)mp_write_ptr_lv_point_t(self); - size_t count = (size_t)count_val; - int32_t angle = (int32_t)angle_val; - int32_t scale_x = (int32_t)scale_x_val; - int32_t scale_y = (int32_t)scale_y_val; - const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); - bool zoom_first = (zoom_first_val != 0); + PyObject *txt_buf_py; long pos_val; PyObject *ins_txt_py; + if (!PyArg_ParseTuple(py_args, "OlO", &txt_buf_py, &pos_val, &ins_txt_py)) { PyGILState_Release(gstate); return NULL; } + char *txt_buf = (char*)convert_from_str(txt_buf_py); + uint32_t pos = (uint32_t)pos_val; + const char *ins_txt = (const char *)(char*)convert_from_str(ins_txt_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_array_transform)(points, count, angle, scale_x, scale_y, pivot, zoom_first); + ((void (*)(char *, uint32_t, const char *))lv_text_ins)(txt_buf, pos, ins_txt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_point_array_transform_struct_method_def = { - "lv_point_array_transform", - (PyCFunction)py_lv_point_array_transform_struct_method, +static PyMethodDef py_lv_text_ins_def = { + "lv_text_ins", + (PyCFunction)py_lv_text_ins, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80757,28 +75093,31 @@ static PyMethodDef py_lv_point_array_transform_struct_method_def = { /* * lvgl extension definition for: - * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) + * void lv_text_cut(char *txt, uint32_t pos, uint32_t len) */ -static PyObject *py_lv_point_to_precise_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_cut(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - - const lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); + PyObject *txt_py; long pos_val; long len_val; + if (!PyArg_ParseTuple(py_args, "Oll", &txt_py, &pos_val, &len_val)) { PyGILState_Release(gstate); return NULL; } + char *txt = (char*)convert_from_str(txt_py); + uint32_t pos = (uint32_t)pos_val; + uint32_t len = (uint32_t)len_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_point_precise_t _res; lvpy_lock(); - _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_point_to_precise)(p); + ((void (*)(char *, uint32_t, uint32_t))lv_text_cut)(txt, pos, len); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_point_precise_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_point_to_precise_struct_method_def = { - "lv_point_to_precise", - (PyCFunction)py_lv_point_to_precise_struct_method, +static PyMethodDef py_lv_text_cut_def = { + "lv_text_cut", + (PyCFunction)py_lv_text_cut, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80786,102 +75125,102 @@ static PyMethodDef py_lv_point_to_precise_struct_method_def = { /* * lvgl extension definition for: - * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) + * void lv_text_encoded_letter_next_2(const char *txt, uint32_t *letter, uint32_t *letter_next, uint32_t *ofs) */ -static PyObject *py_lv_point_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_text_encoded_letter_next_2(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + PyObject *txt_py; PyObject *letter_py; PyObject *letter_next_py; PyObject *ofs_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &txt_py, &letter_py, &letter_next_py, &ofs_py)) { PyGILState_Release(gstate); return NULL; } + const char *txt = (const char *)(char*)convert_from_str(txt_py); + uint32_t *letter = mp_array_to_u32ptr(letter_py); + uint32_t *letter_next = mp_array_to_u32ptr(letter_next_py); + uint32_t *ofs = mp_array_to_u32ptr(ofs_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_point_t *, int32_t, int32_t))lv_point_set)(p, x, y); + ((void (*)(const char *, uint32_t *, uint32_t *, uint32_t *))lv_text_encoded_letter_next_2)(txt, letter, letter_next, ofs); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_point_set_struct_method_def = { - "lv_point_set", - (PyCFunction)py_lv_point_set_struct_method, +static PyMethodDef py_lv_text_encoded_letter_next_2_def = { + "lv_text_encoded_letter_next_2", + (PyCFunction)py_lv_text_encoded_letter_next_2, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! int cmp(const void *pRef, const void *pElement) + * int (*cmp)(const void *pRef, const void *pElement) + */ + + /* * lvgl extension definition for: - * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) + * void *lv_utils_bsearch(const void *key, const void *base, size_t n, size_t size, int (*cmp)(const void *pRef, const void *pElement)) */ -static PyObject *py_lv_point_swap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_utils_bsearch(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *p2_py; - if (!PyArg_ParseTuple(py_args, "O", &p2_py)) { PyGILState_Release(gstate); return NULL; } - lv_point_t *p1 = (lv_point_t *)mp_write_ptr_lv_point_t(self); - lv_point_t *p2 = mp_write_ptr_lv_point_t(p2_py); + PyObject *key_py; PyObject *base_py; long n_val; long size_val; PyObject *cmp_py; + if (!PyArg_ParseTuple(py_args, "OOllO", &key_py, &base_py, &n_val, &size_val, &cmp_py)) { PyGILState_Release(gstate); return NULL; } + const void *key = (const void *)mp_to_ptr(key_py); + const void *base = (const void *)mp_to_ptr(base_py); + size_t n = (size_t)n_val; + size_t size = (size_t)size_val; + void *cmp = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_point_t *, lv_point_t *))lv_point_swap)(p1, p2); + _res = ((void *(*)(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)))lv_utils_bsearch)(key, base, n, size, cmp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_point_swap_struct_method_def = { - "lv_point_swap", - (PyCFunction)py_lv_point_swap_struct_method, +static PyMethodDef py_lv_utils_bsearch_def = { + "lv_utils_bsearch", + (PyCFunction)py_lv_utils_bsearch, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_point_t_methods[] = { - {"transform", (PyCFunction)py_lv_point_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"array_transform", (PyCFunction)py_lv_point_array_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_precise", (PyCFunction)py_lv_point_to_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set", (PyCFunction)py_lv_point_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"swap", (PyCFunction)py_lv_point_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_grad_dsc_params_radial_t_methods[] = {{NULL}}; -PyMethodDef py_lv_grad_dsc_params_conical_t_methods[] = {{NULL}}; -PyMethodDef py_lv_image_colorkey_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) + * void lv_anim_init(lv_anim_t *a) */ -static PyObject *py_lv_font_get_line_height_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_font_t *))lv_font_get_line_height_internal)(font); + ((void (*)(lv_anim_t *))lv_anim_init)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_line_height_internal_struct_method_def = { - "lv_font_get_line_height_internal", - (PyCFunction)py_lv_font_get_line_height_internal_struct_method, +static PyMethodDef py_lv_anim_init_struct_method_def = { + "lv_anim_init", + (PyCFunction)py_lv_anim_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80889,59 +75228,66 @@ static PyMethodDef py_lv_font_get_line_height_internal_struct_method_def = { /* * lvgl extension definition for: - * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) + * void lv_anim_set_var(lv_anim_t *a, void *var) */ -static PyObject *py_lv_font_has_static_bitmap_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_var_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + PyObject *var_py; + if (!PyArg_ParseTuple(py_args, "O", &var_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *var = mp_to_ptr(var_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *))lv_font_has_static_bitmap_internal)(font); + ((void (*)(lv_anim_t *, void *))lv_anim_set_var)(a, var); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_has_static_bitmap_internal_struct_method_def = { - "lv_font_has_static_bitmap_internal", - (PyCFunction)py_lv_font_has_static_bitmap_internal_struct_method, +static PyMethodDef py_lv_anim_set_var_struct_method_def = { + "lv_anim_set_var", + (PyCFunction)py_lv_anim_set_var_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) + * lv_anim_exec_xcb_t exec_cb + */ + + /* * lvgl extension definition for: - * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) + * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) */ -static PyObject *py_lv_font_get_bottom_trim_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *trim_py; - if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *exec_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_bottom_trim_internal)(font, trim); + ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_anim_set_exec_cb)(a, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_bottom_trim_internal_struct_method_def = { - "lv_font_get_bottom_trim_internal", - (PyCFunction)py_lv_font_get_bottom_trim_internal_struct_method, +static PyMethodDef py_lv_anim_set_exec_cb_struct_method_def = { + "lv_anim_set_exec_cb", + (PyCFunction)py_lv_anim_set_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80949,30 +75295,29 @@ static PyMethodDef py_lv_font_get_bottom_trim_internal_struct_method_def = { /* * lvgl extension definition for: - * inline static int32_t lv_font_get_top_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) + * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) */ -static PyObject *py_lv_font_get_top_trim_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *trim_py; - if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t duration = (uint32_t)duration_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_top_trim_internal)(font, trim); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_duration)(a, duration); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_top_trim_internal_struct_method_def = { - "lv_font_get_top_trim_internal", - (PyCFunction)py_lv_font_get_top_trim_internal_struct_method, +static PyMethodDef py_lv_anim_set_duration_struct_method_def = { + "lv_anim_set_duration", + (PyCFunction)py_lv_anim_set_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -80980,32 +75325,29 @@ static PyMethodDef py_lv_font_get_top_trim_internal_struct_method_def = { /* * lvgl extension definition for: - * bool lv_font_get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) + * void lv_anim_set_delay(lv_anim_t *a, uint32_t delay) */ -static PyObject *py_lv_font_get_glyph_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_out_py; long letter_val; long letter_next_val; - if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); - uint32_t letter = (uint32_t)letter_val; - uint32_t letter_next = (uint32_t)letter_next_val; + long delay_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t delay = (uint32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc)(font, dsc_out, letter, letter_next); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_delay)(a, delay); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_dsc_struct_method_def = { - "lv_font_get_glyph_dsc", - (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, +static PyMethodDef py_lv_anim_set_delay_struct_method_def = { + "lv_anim_set_delay", + (PyCFunction)py_lv_anim_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81013,31 +75355,27 @@ static PyMethodDef py_lv_font_get_glyph_dsc_struct_method_def = { /* * lvgl extension definition for: - * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) + * void lv_anim_resume(lv_anim_t *a) */ -static PyObject *py_lv_font_get_glyph_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_resume_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long letter_val; long letter_next_val; - if (!PyArg_ParseTuple(py_args, "ll", &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - uint32_t letter = (uint32_t)letter_val; - uint32_t letter_next = (uint32_t)letter_next_val; + + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_font_get_glyph_width)(font, letter, letter_next); + ((void (*)(lv_anim_t *))lv_anim_resume)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_width_struct_method_def = { - "lv_font_get_glyph_width", - (PyCFunction)py_lv_font_get_glyph_width_struct_method, +static PyMethodDef py_lv_anim_resume_struct_method_def = { + "lv_anim_resume", + (PyCFunction)py_lv_anim_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81045,28 +75383,27 @@ static PyMethodDef py_lv_font_get_glyph_width_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_font_get_line_height(const lv_font_t *font) + * void lv_anim_pause(lv_anim_t *a) */ -static PyObject *py_lv_font_get_line_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_font_t *))lv_font_get_line_height)(font); + ((void (*)(lv_anim_t *))lv_anim_pause)(a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_line_height_struct_method_def = { - "lv_font_get_line_height", - (PyCFunction)py_lv_font_get_line_height_struct_method, +static PyMethodDef py_lv_anim_pause_struct_method_def = { + "lv_anim_pause", + (PyCFunction)py_lv_anim_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81074,29 +75411,29 @@ static PyMethodDef py_lv_font_get_line_height_struct_method_def = { /* * lvgl extension definition for: - * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) + * void lv_anim_pause_for(lv_anim_t *a, uint32_t ms) */ -static PyObject *py_lv_font_set_kerning_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_pause_for_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *kerning_py; - if (!PyArg_ParseTuple(py_args, "O", &kerning_py)) { PyGILState_Release(gstate); return NULL; } - lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_font_kerning_t kerning = (int)mp_obj_get_int(kerning_py); + long ms_val; + if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t ms = (uint32_t)ms_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_font_t *, lv_font_kerning_t))lv_font_set_kerning)(font, kerning); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_pause_for)(a, ms); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_font_set_kerning_struct_method_def = { - "lv_font_set_kerning", - (PyCFunction)py_lv_font_set_kerning_struct_method, +static PyMethodDef py_lv_anim_pause_for_struct_method_def = { + "lv_anim_pause_for", + (PyCFunction)py_lv_anim_pause_for_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81104,28 +75441,28 @@ static PyMethodDef py_lv_font_set_kerning_struct_method_def = { /* * lvgl extension definition for: - * bool lv_font_has_static_bitmap(const lv_font_t *font) + * bool lv_anim_is_paused(lv_anim_t *a) */ -static PyObject *py_lv_font_has_static_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_is_paused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *))lv_font_has_static_bitmap)(font); + _res = ((bool (*)(lv_anim_t *))lv_anim_is_paused)(a); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_font_has_static_bitmap_struct_method_def = { - "lv_font_has_static_bitmap", - (PyCFunction)py_lv_font_has_static_bitmap_struct_method, +static PyMethodDef py_lv_anim_is_paused_struct_method_def = { + "lv_anim_is_paused", + (PyCFunction)py_lv_anim_is_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81133,205 +75470,364 @@ static PyMethodDef py_lv_font_has_static_bitmap_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_font_get_top_trim(const lv_font_t *font, lv_text_leading_trim_t trim) + * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) */ -static PyObject *py_lv_font_get_top_trim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_values_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *trim_py; - if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); + long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + int32_t start = (int32_t)start_val; + int32_t end = (int32_t)end_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_top_trim)(font, trim); + ((void (*)(lv_anim_t *, int32_t, int32_t))lv_anim_set_values)(a, start, end); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_top_trim_struct_method_def = { - "lv_font_get_top_trim", - (PyCFunction)py_lv_font_get_top_trim_struct_method, +static PyMethodDef py_lv_anim_set_values_struct_method_def = { + "lv_anim_set_values", + (PyCFunction)py_lv_anim_set_values_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_anim_t_exec_cb (CPython) + * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + */ +static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_exec_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_arg1 = mp_obj_new_int(arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * int32_t lv_font_get_bottom_trim(const lv_font_t *font, lv_text_leading_trim_t trim) + * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static PyObject *py_lv_font_get_bottom_trim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_custom_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *trim_py; - if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_bottom_trim)(font, trim); + ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_set_custom_exec_cb)(a, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_bottom_trim_struct_method_def = { - "lv_font_get_bottom_trim", - (PyCFunction)py_lv_font_get_bottom_trim_struct_method, +static PyMethodDef py_lv_anim_set_custom_exec_cb_struct_method_def = { + "lv_anim_set_custom_exec_cb", + (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_anim_t_path_cb (CPython) + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ +static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_path_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } + int32_t _c_res = (int32_t)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * lvgl extension definition for: - * bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next) + * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) */ -static PyObject *py_lv_font_get_glyph_dsc_fmt_txt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_path_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_out_py; long unicode_letter_val; long unicode_letter_next_val; - if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &unicode_letter_val, &unicode_letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); - uint32_t unicode_letter = (uint32_t)unicode_letter_val; - uint32_t unicode_letter_next = (uint32_t)unicode_letter_next_val; + PyObject *path_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &path_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *path_cb = mp_lv_callback(path_cb_py, &lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc_fmt_txt)(font, dsc_out, unicode_letter, unicode_letter_next); + ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_anim_set_path_cb)(a, path_cb); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_dsc_fmt_txt_struct_method_def = { - "lv_font_get_glyph_dsc_fmt_txt", - (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, +static PyMethodDef py_lv_anim_set_path_cb_struct_method_def = { + "lv_anim_set_path_cb", + (PyCFunction)py_lv_anim_set_path_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_anim_t_start_cb (CPython) + * void lv_anim_start_cb_t(lv_anim_t *) + */ +static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_start_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * bool lv_font_get_glyph_dsc_internal(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) + * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) */ -static PyObject *py_lv_font_get_glyph_dsc_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_start_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_out_py; long letter_val; long letter_next_val; - if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); - uint32_t letter = (uint32_t)letter_val; - uint32_t letter_next = (uint32_t)letter_next_val; + PyObject *start_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &start_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *start_cb = mp_lv_callback(start_cb_py, &lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc_internal)(font, dsc_out, letter, letter_next); + ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_anim_set_start_cb)(a, start_cb); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_dsc_internal_struct_method_def = { - "lv_font_get_glyph_dsc_internal", - (PyCFunction)py_lv_font_get_glyph_dsc_internal_struct_method, +static PyMethodDef py_lv_anim_set_start_cb_struct_method_def = { + "lv_anim_set_start_cb", + (PyCFunction)py_lv_anim_set_start_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_anim_t_get_value_cb (CPython) + * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + */ +static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_get_value_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } + int32_t _c_res = (int32_t)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * lvgl extension definition for: - * uint16_t lv_font_get_glyph_width_internal(const lv_font_t *font, uint32_t letter, uint32_t letter_next) + * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) */ -static PyObject *py_lv_font_get_glyph_width_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_get_value_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long letter_val; long letter_next_val; - if (!PyArg_ParseTuple(py_args, "ll", &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } - const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); - uint32_t letter = (uint32_t)letter_val; - uint32_t letter_next = (uint32_t)letter_next_val; + PyObject *get_value_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &get_value_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *get_value_cb = mp_lv_callback(get_value_cb_py, &lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint16_t _res; lvpy_lock(); - _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_font_get_glyph_width_internal)(font, letter, letter_next); + ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_anim_set_get_value_cb)(a, get_value_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_font_get_glyph_width_internal_struct_method_def = { - "lv_font_get_glyph_width_internal", - (PyCFunction)py_lv_font_get_glyph_width_internal_struct_method, +static PyMethodDef py_lv_anim_set_get_value_cb_struct_method_def = { + "lv_anim_set_get_value_cb", + (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_font_t_methods[] = { - {"get_line_height_internal", (PyCFunction)py_lv_font_get_line_height_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_static_bitmap_internal", (PyCFunction)py_lv_font_has_static_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_bottom_trim_internal", (PyCFunction)py_lv_font_get_bottom_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_top_trim_internal", (PyCFunction)py_lv_font_get_top_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_dsc", (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_width", (PyCFunction)py_lv_font_get_glyph_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_line_height", (PyCFunction)py_lv_font_get_line_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_kerning", (PyCFunction)py_lv_font_set_kerning_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_static_bitmap", (PyCFunction)py_lv_font_has_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_top_trim", (PyCFunction)py_lv_font_get_top_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_bottom_trim", (PyCFunction)py_lv_font_get_bottom_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_dsc_fmt_txt", (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_dsc_internal", (PyCFunction)py_lv_font_get_glyph_dsc_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_glyph_width_internal", (PyCFunction)py_lv_font_get_glyph_width_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} +/* + * Callback function lv_anim_t_completed_cb (CPython) + * void lv_anim_completed_cb_t(lv_anim_t *) + */ +static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_completed_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + +/* + * lvgl extension definition for: + * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) + */ +static PyObject *py_lv_anim_set_completed_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *completed_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &completed_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *completed_cb = mp_lv_callback(completed_cb_py, &lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", &a->user_data, a, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_anim_set_completed_cb)(a, completed_cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_anim_set_completed_cb_struct_method_def = { + "lv_anim_set_completed_cb", + (PyCFunction)py_lv_anim_set_completed_cb_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL }; /* - * Callback function lv_color_filter_dsc_t_cb (CPython) - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + * Callback function lv_anim_t_deleted_cb (CPython) + * void lv_anim_deleted_cb_t(lv_anim_t *) */ -static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_color_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_color_filter_dsc_t_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_color_t){0}; } + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_deleted_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - PyObject *py_arg1 = mp_read_lv_color_t(arg1); - PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_color_t){0}; } + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); PyObject *result = PyObject_CallObject(py_cb, py_args); @@ -81339,73 +75835,67 @@ static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filte Py_DECREF(py_cb); lvpy_nesting_dec(); lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_color_t){0}; } - lv_color_t _c_res = mp_write_lv_color_t(result); - Py_DECREF(result); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - return _c_res; } /* * lvgl extension definition for: - * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) + * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) */ -static PyObject *py_lv_color_filter_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_deleted_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_color_filter_dsc_t *dsc = (lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(self); - void *cb = mp_lv_callback(cb_py, &lv_color_filter_dsc_t_cb_callback, "lv_color_filter_dsc_t_cb", &dsc->user_data, dsc, (NULL), (NULL)); + PyObject *deleted_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &deleted_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *deleted_cb = mp_lv_callback(deleted_cb_py, &lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_color_filter_dsc_init)(dsc, cb); + ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_anim_set_deleted_cb)(a, deleted_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_color_filter_dsc_init_struct_method_def = { - "lv_color_filter_dsc_init", - (PyCFunction)py_lv_color_filter_dsc_init_struct_method, +static PyMethodDef py_lv_anim_set_deleted_cb_struct_method_def = { + "lv_anim_set_deleted_cb", + (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_color_filter_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_color_filter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_anim_init(lv_anim_t *a) + * void lv_anim_set_reverse_duration(lv_anim_t *a, uint32_t duration) */ -static PyObject *py_lv_anim_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_reverse_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + uint32_t duration = (uint32_t)duration_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *))lv_anim_init)(a); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_duration)(a, duration); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_init_struct_method_def = { - "lv_anim_init", - (PyCFunction)py_lv_anim_init_struct_method, +static PyMethodDef py_lv_anim_set_reverse_duration_struct_method_def = { + "lv_anim_set_reverse_duration", + (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81413,66 +75903,59 @@ static PyMethodDef py_lv_anim_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_var(lv_anim_t *a, void *var) + * void lv_anim_set_reverse_time(lv_anim_t *a, uint32_t duration) */ -static PyObject *py_lv_anim_set_var_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_reverse_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *var_py; - if (!PyArg_ParseTuple(py_args, "O", &var_py)) { PyGILState_Release(gstate); return NULL; } + long duration_val; + if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *var = mp_to_ptr(var_py); + uint32_t duration = (uint32_t)duration_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, void *))lv_anim_set_var)(a, var); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_time)(a, duration); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_var_struct_method_def = { - "lv_anim_set_var", - (PyCFunction)py_lv_anim_set_var_struct_method, +static PyMethodDef py_lv_anim_set_reverse_time_struct_method_def = { + "lv_anim_set_reverse_time", + (PyCFunction)py_lv_anim_set_reverse_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_anim_exec_xcb_t(void *, int32_t) - * lv_anim_exec_xcb_t exec_cb - */ - - /* * lvgl extension definition for: - * void lv_anim_set_exec_cb(lv_anim_t *a, lv_anim_exec_xcb_t exec_cb) + * void lv_anim_set_reverse_delay(lv_anim_t *a, uint32_t delay) */ -static PyObject *py_lv_anim_set_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_reverse_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + long delay_val; + if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = NULL; + uint32_t delay = (uint32_t)delay_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_exec_xcb_t))lv_anim_set_exec_cb)(a, exec_cb); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_delay)(a, delay); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_exec_cb_struct_method_def = { - "lv_anim_set_exec_cb", - (PyCFunction)py_lv_anim_set_exec_cb_struct_method, +static PyMethodDef py_lv_anim_set_reverse_delay_struct_method_def = { + "lv_anim_set_reverse_delay", + (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81480,29 +75963,29 @@ static PyMethodDef py_lv_anim_set_exec_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_duration(lv_anim_t *a, uint32_t duration) + * void lv_anim_set_repeat_count(lv_anim_t *a, uint32_t cnt) */ -static PyObject *py_lv_anim_set_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } + long cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t duration = (uint32_t)duration_val; + uint32_t cnt = (uint32_t)cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_duration)(a, duration); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_count)(a, cnt); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_duration_struct_method_def = { - "lv_anim_set_duration", - (PyCFunction)py_lv_anim_set_duration_struct_method, +static PyMethodDef py_lv_anim_set_repeat_count_struct_method_def = { + "lv_anim_set_repeat_count", + (PyCFunction)py_lv_anim_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81510,9 +75993,9 @@ static PyMethodDef py_lv_anim_set_duration_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_delay(lv_anim_t *a, uint32_t delay) + * void lv_anim_set_repeat_delay(lv_anim_t *a, uint32_t delay) */ -static PyObject *py_lv_anim_set_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -81523,16 +76006,16 @@ static PyObject *py_lv_anim_set_delay_struct_method(PyObject *self, PyObject *py if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_delay)(a, delay); + ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_delay)(a, delay); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_delay_struct_method_def = { - "lv_anim_set_delay", - (PyCFunction)py_lv_anim_set_delay_struct_method, +static PyMethodDef py_lv_anim_set_repeat_delay_struct_method_def = { + "lv_anim_set_repeat_delay", + (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81540,27 +76023,29 @@ static PyMethodDef py_lv_anim_set_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_resume(lv_anim_t *a) + * void lv_anim_set_early_apply(lv_anim_t *a, bool en) */ -static PyObject *py_lv_anim_resume_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_early_apply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *))lv_anim_resume)(a); + ((void (*)(lv_anim_t *, bool))lv_anim_set_early_apply)(a, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_resume_struct_method_def = { - "lv_anim_resume", - (PyCFunction)py_lv_anim_resume_struct_method, +static PyMethodDef py_lv_anim_set_early_apply_struct_method_def = { + "lv_anim_set_early_apply", + (PyCFunction)py_lv_anim_set_early_apply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81568,27 +76053,29 @@ static PyMethodDef py_lv_anim_resume_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_pause(lv_anim_t *a) + * void lv_anim_set_user_data(lv_anim_t *a, void *user_data) */ -static PyObject *py_lv_anim_pause_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *))lv_anim_pause)(a); + ((void (*)(lv_anim_t *, void *))lv_anim_set_user_data)(a, user_data); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_pause_struct_method_def = { - "lv_anim_pause", - (PyCFunction)py_lv_anim_pause_struct_method, +static PyMethodDef py_lv_anim_set_user_data_struct_method_def = { + "lv_anim_set_user_data", + (PyCFunction)py_lv_anim_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81596,29 +76083,32 @@ static PyMethodDef py_lv_anim_pause_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_pause_for(lv_anim_t *a, uint32_t ms) + * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) */ -static PyObject *py_lv_anim_pause_for_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_set_bezier3_param_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long ms_val; - if (!PyArg_ParseTuple(py_args, "l", &ms_val)) { PyGILState_Release(gstate); return NULL; } + long x1_val; long y1_val; long x2_val; long y2_val; + if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t ms = (uint32_t)ms_val; + int16_t x1 = (int16_t)x1_val; + int16_t y1 = (int16_t)y1_val; + int16_t x2 = (int16_t)x2_val; + int16_t y2 = (int16_t)y2_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_pause_for)(a, ms); + ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_anim_set_bezier3_param)(a, x1, y1, x2, y2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_pause_for_struct_method_def = { - "lv_anim_pause_for", - (PyCFunction)py_lv_anim_pause_for_struct_method, +static PyMethodDef py_lv_anim_set_bezier3_param_struct_method_def = { + "lv_anim_set_bezier3_param", + (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81626,28 +76116,57 @@ static PyMethodDef py_lv_anim_pause_for_struct_method_def = { /* * lvgl extension definition for: - * bool lv_anim_is_paused(lv_anim_t *a) + * lv_anim_t *lv_anim_start(const lv_anim_t *a) */ -static PyObject *py_lv_anim_is_paused_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_start_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_anim_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_anim_t *))lv_anim_is_paused)(a); + _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_anim_start)(a); + lvpy_unlock(); + lvpy_anim_bind(_res); + PyGILState_Release(gstate); + return mp_read_ptr_lv_anim_t((void*)_res); +} + +static PyMethodDef py_lv_anim_start_struct_method_def = { + "lv_anim_start", + (PyCFunction)py_lv_anim_start_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * uint32_t lv_anim_get_delay(const lv_anim_t *a) + */ +static PyObject *py_lv_anim_get_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_delay)(a); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_is_paused_struct_method_def = { - "lv_anim_is_paused", - (PyCFunction)py_lv_anim_is_paused_struct_method, +static PyMethodDef py_lv_anim_get_delay_struct_method_def = { + "lv_anim_get_delay", + (PyCFunction)py_lv_anim_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -81655,402 +76174,351 @@ static PyMethodDef py_lv_anim_is_paused_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_values(lv_anim_t *a, int32_t start, int32_t end) + * uint32_t lv_anim_get_playtime(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_values_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_playtime_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - int32_t start = (int32_t)start_val; - int32_t end = (int32_t)end_val; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, int32_t, int32_t))lv_anim_set_values)(a, start, end); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_playtime)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_set_values_struct_method_def = { - "lv_anim_set_values", - (PyCFunction)py_lv_anim_set_values_struct_method, +static PyMethodDef py_lv_anim_get_playtime_struct_method_def = { + "lv_anim_get_playtime", + (PyCFunction)py_lv_anim_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_exec_cb (CPython) - * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) + * lvgl extension definition for: + * uint32_t lv_anim_get_time(const lv_anim_t *a) */ -static void lv_anim_t_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) +static PyObject *py_lv_anim_get_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_exec_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_arg1 = mp_obj_new_int(arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint32_t _res; + lvpy_lock(); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_time)(a); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); } +static PyMethodDef py_lv_anim_get_time_struct_method_def = { + "lv_anim_get_time", + (PyCFunction)py_lv_anim_get_time_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_custom_exec_cb(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * uint32_t lv_anim_get_repeat_count(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_custom_exec_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_get_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_set_custom_exec_cb)(a, exec_cb); + _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_repeat_count)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_anim_set_custom_exec_cb_struct_method_def = { - "lv_anim_set_custom_exec_cb", - (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, +static PyMethodDef py_lv_anim_get_repeat_count_struct_method_def = { + "lv_anim_get_repeat_count", + (PyCFunction)py_lv_anim_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_path_cb (CPython) - * int32_t lv_anim_path_cb_t(const lv_anim_t *) + * lvgl extension definition for: + * void *lv_anim_get_user_data(const lv_anim_t *a) */ -static int32_t lv_anim_t_path_cb_callback(const lv_anim_t *arg0) +static PyObject *py_lv_anim_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_path_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } - int32_t _c_res = (int32_t)mp_obj_get_int(result); - Py_DECREF(result); + (void)py_kwds; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(const lv_anim_t *))lv_anim_get_user_data)(a); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + return ptr_to_mp((void*)_res); } +static PyMethodDef py_lv_anim_get_user_data_struct_method_def = { + "lv_anim_get_user_data", + (PyCFunction)py_lv_anim_get_user_data_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_path_cb(lv_anim_t *a, lv_anim_path_cb_t path_cb) + * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static PyObject *py_lv_anim_set_path_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_custom_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *path_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &path_cb_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *path_cb = mp_lv_callback(path_cb_py, &lv_anim_t_path_cb_callback, "lv_anim_t_path_cb", &a->user_data, a, (NULL), (NULL)); + void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_path_cb_t))lv_anim_set_path_cb)(a, path_cb); + _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_delete)(a, exec_cb); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_set_path_cb_struct_method_def = { - "lv_anim_set_path_cb", - (PyCFunction)py_lv_anim_set_path_cb_struct_method, +static PyMethodDef py_lv_anim_custom_delete_struct_method_def = { + "lv_anim_custom_delete", + (PyCFunction)py_lv_anim_custom_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_start_cb (CPython) - * void lv_anim_start_cb_t(lv_anim_t *) + * lvgl extension definition for: + * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) */ -static void lv_anim_t_start_cb_callback(lv_anim_t *arg0) +static PyObject *py_lv_anim_custom_get_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_start_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + PyObject *exec_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_anim_t * _res; + lvpy_lock(); + _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_get)(a, exec_cb); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_read_ptr_lv_anim_t((void*)_res); } +static PyMethodDef py_lv_anim_custom_get_struct_method_def = { + "lv_anim_custom_get", + (PyCFunction)py_lv_anim_custom_get_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_start_cb(lv_anim_t *a, lv_anim_start_cb_t start_cb) + * int32_t lv_anim_path_linear(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_start_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_linear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *start_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &start_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *start_cb = mp_lv_callback(start_cb_py, &lv_anim_t_start_cb_callback, "lv_anim_t_start_cb", &a->user_data, a, (NULL), (NULL)); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_start_cb_t))lv_anim_set_start_cb)(a, start_cb); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_linear)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_start_cb_struct_method_def = { - "lv_anim_set_start_cb", - (PyCFunction)py_lv_anim_set_start_cb_struct_method, +static PyMethodDef py_lv_anim_path_linear_struct_method_def = { + "lv_anim_path_linear", + (PyCFunction)py_lv_anim_path_linear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_get_value_cb (CPython) - * int32_t lv_anim_get_value_cb_t(lv_anim_t *) + * lvgl extension definition for: + * int32_t lv_anim_path_ease_in(const lv_anim_t *a) */ -static int32_t lv_anim_t_get_value_cb_callback(lv_anim_t *arg0) +static PyObject *py_lv_anim_path_ease_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_get_value_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } - int32_t _c_res = (int32_t)mp_obj_get_int(result); - Py_DECREF(result); + (void)py_kwds; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in)(a); + lvpy_unlock(); + PyGILState_Release(gstate); - return _c_res; + return mp_obj_new_int(_res); } +static PyMethodDef py_lv_anim_path_ease_in_struct_method_def = { + "lv_anim_path_ease_in", + (PyCFunction)py_lv_anim_path_ease_in_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_get_value_cb(lv_anim_t *a, lv_anim_get_value_cb_t get_value_cb) + * int32_t lv_anim_path_ease_out(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_get_value_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_ease_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *get_value_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &get_value_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *get_value_cb = mp_lv_callback(get_value_cb_py, &lv_anim_t_get_value_cb_callback, "lv_anim_t_get_value_cb", &a->user_data, a, (NULL), (NULL)); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_get_value_cb_t))lv_anim_set_get_value_cb)(a, get_value_cb); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_out)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_get_value_cb_struct_method_def = { - "lv_anim_set_get_value_cb", - (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, +static PyMethodDef py_lv_anim_path_ease_out_struct_method_def = { + "lv_anim_path_ease_out", + (PyCFunction)py_lv_anim_path_ease_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_anim_t_completed_cb (CPython) - * void lv_anim_completed_cb_t(lv_anim_t *) - */ -static void lv_anim_t_completed_cb_callback(lv_anim_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_completed_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_anim_set_completed_cb(lv_anim_t *a, lv_anim_completed_cb_t completed_cb) + * int32_t lv_anim_path_ease_in_out(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_completed_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_ease_in_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *completed_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &completed_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *completed_cb = mp_lv_callback(completed_cb_py, &lv_anim_t_completed_cb_callback, "lv_anim_t_completed_cb", &a->user_data, a, (NULL), (NULL)); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_completed_cb_t))lv_anim_set_completed_cb)(a, completed_cb); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in_out)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_completed_cb_struct_method_def = { - "lv_anim_set_completed_cb", - (PyCFunction)py_lv_anim_set_completed_cb_struct_method, +static PyMethodDef py_lv_anim_path_ease_in_out_struct_method_def = { + "lv_anim_path_ease_in_out", + (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_anim_t_deleted_cb (CPython) - * void lv_anim_deleted_cb_t(lv_anim_t *) + * lvgl extension definition for: + * int32_t lv_anim_path_overshoot(const lv_anim_t *a) */ -static void lv_anim_t_deleted_cb_callback(lv_anim_t *arg0) +static PyObject *py_lv_anim_path_overshoot_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_anim_t_deleted_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + int32_t _res; + lvpy_lock(); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_overshoot)(a); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } +static PyMethodDef py_lv_anim_path_overshoot_struct_method_def = { + "lv_anim_path_overshoot", + (PyCFunction)py_lv_anim_path_overshoot_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_anim_set_deleted_cb(lv_anim_t *a, lv_anim_deleted_cb_t deleted_cb) + * int32_t lv_anim_path_bounce(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_deleted_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_bounce_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *deleted_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &deleted_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *deleted_cb = mp_lv_callback(deleted_cb_py, &lv_anim_t_deleted_cb_callback, "lv_anim_t_deleted_cb", &a->user_data, a, (NULL), (NULL)); + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, lv_anim_deleted_cb_t))lv_anim_set_deleted_cb)(a, deleted_cb); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_bounce)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_deleted_cb_struct_method_def = { - "lv_anim_set_deleted_cb", - (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, +static PyMethodDef py_lv_anim_path_bounce_struct_method_def = { + "lv_anim_path_bounce", + (PyCFunction)py_lv_anim_path_bounce_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82058,29 +76526,28 @@ static PyMethodDef py_lv_anim_set_deleted_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_reverse_duration(lv_anim_t *a, uint32_t duration) + * int32_t lv_anim_path_step(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_reverse_duration_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_step_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t duration = (uint32_t)duration_val; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_duration)(a, duration); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_step)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_reverse_duration_struct_method_def = { - "lv_anim_set_reverse_duration", - (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, +static PyMethodDef py_lv_anim_path_step_struct_method_def = { + "lv_anim_path_step", + (PyCFunction)py_lv_anim_path_step_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82088,59 +76555,103 @@ static PyMethodDef py_lv_anim_set_reverse_duration_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_reverse_time(lv_anim_t *a, uint32_t duration) + * int32_t lv_anim_path_custom_bezier3(const lv_anim_t *a) */ -static PyObject *py_lv_anim_set_reverse_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_anim_path_custom_bezier3_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long duration_val; - if (!PyArg_ParseTuple(py_args, "l", &duration_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t duration = (uint32_t)duration_val; + + const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_time)(a, duration); + _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_custom_bezier3)(a); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_set_reverse_time_struct_method_def = { - "lv_anim_set_reverse_time", - (PyCFunction)py_lv_anim_set_reverse_time_struct_method, +static PyMethodDef py_lv_anim_path_custom_bezier3_struct_method_def = { + "lv_anim_path_custom_bezier3", + (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_anim_t_methods[] = { + {"init", (PyCFunction)py_lv_anim_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_var", (PyCFunction)py_lv_anim_set_var_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_exec_cb", (PyCFunction)py_lv_anim_set_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_duration", (PyCFunction)py_lv_anim_set_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_delay", (PyCFunction)py_lv_anim_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"resume", (PyCFunction)py_lv_anim_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pause", (PyCFunction)py_lv_anim_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"pause_for", (PyCFunction)py_lv_anim_pause_for_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_paused", (PyCFunction)py_lv_anim_is_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_values", (PyCFunction)py_lv_anim_set_values_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_custom_exec_cb", (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_path_cb", (PyCFunction)py_lv_anim_set_path_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_start_cb", (PyCFunction)py_lv_anim_set_start_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_get_value_cb", (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_completed_cb", (PyCFunction)py_lv_anim_set_completed_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_deleted_cb", (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_duration", (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_time", (PyCFunction)py_lv_anim_set_reverse_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_reverse_delay", (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_count", (PyCFunction)py_lv_anim_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_repeat_delay", (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_early_apply", (PyCFunction)py_lv_anim_set_early_apply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_anim_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_bezier3_param", (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"start", (PyCFunction)py_lv_anim_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_delay", (PyCFunction)py_lv_anim_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_playtime", (PyCFunction)py_lv_anim_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_time", (PyCFunction)py_lv_anim_get_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_repeat_count", (PyCFunction)py_lv_anim_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_anim_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"custom_delete", (PyCFunction)py_lv_anim_custom_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"custom_get", (PyCFunction)py_lv_anim_custom_get_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_linear", (PyCFunction)py_lv_anim_path_linear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_ease_in", (PyCFunction)py_lv_anim_path_ease_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_ease_out", (PyCFunction)py_lv_anim_path_ease_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_ease_in_out", (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_overshoot", (PyCFunction)py_lv_anim_path_overshoot_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_bounce", (PyCFunction)py_lv_anim_path_bounce_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_step", (PyCFunction)py_lv_anim_path_step_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"path_custom_bezier3", (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_anim_parameter_t_methods[] = {{NULL}}; +PyMethodDef py_lv_anim_bezier3_para_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * void lv_anim_set_reverse_delay(lv_anim_t *a, uint32_t delay) + * void lv_display_delete(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_reverse_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t delay = (uint32_t)delay_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_reverse_delay)(a, delay); + ((void (*)(lv_display_t *))lv_display_delete)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_reverse_delay_struct_method_def = { - "lv_anim_set_reverse_delay", - (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, +static PyMethodDef py_lv_display_delete_struct_method_def = { + "lv_display_delete", + (PyCFunction)py_lv_display_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82148,29 +76659,27 @@ static PyMethodDef py_lv_anim_set_reverse_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_repeat_count(lv_anim_t *a, uint32_t cnt) + * void lv_display_set_default(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_default_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t cnt = (uint32_t)cnt_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_count)(a, cnt); + ((void (*)(lv_display_t *))lv_display_set_default)(disp); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_repeat_count_struct_method_def = { - "lv_anim_set_repeat_count", - (PyCFunction)py_lv_anim_set_repeat_count_struct_method, +static PyMethodDef py_lv_display_set_default_struct_method_def = { + "lv_display_set_default", + (PyCFunction)py_lv_display_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82178,29 +76687,28 @@ static PyMethodDef py_lv_anim_set_repeat_count_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_repeat_delay(lv_anim_t *a, uint32_t delay) + * lv_display_t *lv_display_get_next(lv_display_t *disp) */ -static PyObject *py_lv_anim_set_repeat_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long delay_val; - if (!PyArg_ParseTuple(py_args, "l", &delay_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - uint32_t delay = (uint32_t)delay_val; + + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_display_t * _res; lvpy_lock(); - ((void (*)(lv_anim_t *, uint32_t))lv_anim_set_repeat_delay)(a, delay); + _res = ((lv_display_t *(*)(lv_display_t *))lv_display_get_next)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_display_t((void*)_res); } -static PyMethodDef py_lv_anim_set_repeat_delay_struct_method_def = { - "lv_anim_set_repeat_delay", - (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, +static PyMethodDef py_lv_display_get_next_struct_method_def = { + "lv_display_get_next", + (PyCFunction)py_lv_display_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82208,29 +76716,30 @@ static PyMethodDef py_lv_anim_set_repeat_delay_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_early_apply(lv_anim_t *a, bool en) + * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) */ -static PyObject *py_lv_anim_set_early_apply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - bool en = (en_val != 0); + long hor_res_val; long ver_res_val; + if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t hor_res = (int32_t)hor_res_val; + int32_t ver_res = (int32_t)ver_res_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, bool))lv_anim_set_early_apply)(a, en); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_resolution)(disp, hor_res, ver_res); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_early_apply_struct_method_def = { - "lv_anim_set_early_apply", - (PyCFunction)py_lv_anim_set_early_apply_struct_method, +static PyMethodDef py_lv_display_set_resolution_struct_method_def = { + "lv_display_set_resolution", + (PyCFunction)py_lv_display_set_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82238,29 +76747,30 @@ static PyMethodDef py_lv_anim_set_early_apply_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_user_data(lv_anim_t *a, void *user_data) + * void lv_display_set_physical_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) */ -static PyObject *py_lv_anim_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_physical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *user_data = mp_to_ptr(user_data_py); + long hor_res_val; long ver_res_val; + if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t hor_res = (int32_t)hor_res_val; + int32_t ver_res = (int32_t)ver_res_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, void *))lv_anim_set_user_data)(a, user_data); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_physical_resolution)(disp, hor_res, ver_res); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_user_data_struct_method_def = { - "lv_anim_set_user_data", - (PyCFunction)py_lv_anim_set_user_data_struct_method, +static PyMethodDef py_lv_display_set_physical_resolution_struct_method_def = { + "lv_display_set_physical_resolution", + (PyCFunction)py_lv_display_set_physical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82268,32 +76778,30 @@ static PyMethodDef py_lv_anim_set_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_anim_set_bezier3_param(lv_anim_t *a, int16_t x1, int16_t y1, int16_t x2, int16_t y2) + * void lv_display_set_offset(lv_display_t *disp, int32_t x, int32_t y) */ -static PyObject *py_lv_anim_set_bezier3_param_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_offset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x1_val; long y1_val; long x2_val; long y2_val; - if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - int16_t x1 = (int16_t)x1_val; - int16_t y1 = (int16_t)y1_val; - int16_t x2 = (int16_t)x2_val; - int16_t y2 = (int16_t)y2_val; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_anim_t *, int16_t, int16_t, int16_t, int16_t))lv_anim_set_bezier3_param)(a, x1, y1, x2, y2); + ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_offset)(disp, x, y); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_set_bezier3_param_struct_method_def = { - "lv_anim_set_bezier3_param", - (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, +static PyMethodDef py_lv_display_set_offset_struct_method_def = { + "lv_display_set_offset", + (PyCFunction)py_lv_display_set_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82301,28 +76809,29 @@ static PyMethodDef py_lv_anim_set_bezier3_param_struct_method_def = { /* * lvgl extension definition for: - * lv_anim_t *lv_anim_start(const lv_anim_t *a) + * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) */ -static PyObject *py_lv_anim_start_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *rotation_py; + if (!PyArg_ParseTuple(py_args, "O", &rotation_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(const lv_anim_t *))lv_anim_start)(a); + ((void (*)(lv_display_t *, lv_display_rotation_t))lv_display_set_rotation)(disp, rotation); lvpy_unlock(); - lvpy_anim_bind(_res); + PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_start_struct_method_def = { - "lv_anim_start", - (PyCFunction)py_lv_anim_start_struct_method, +static PyMethodDef py_lv_display_set_rotation_struct_method_def = { + "lv_display_set_rotation", + (PyCFunction)py_lv_display_set_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82330,28 +76839,29 @@ static PyMethodDef py_lv_anim_start_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_delay(const lv_anim_t *a) + * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) */ -static PyObject *py_lv_anim_get_delay_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + long enable_val; + if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + bool enable = (enable_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_delay)(a); + ((void (*)(lv_display_t *, bool))lv_display_set_matrix_rotation)(disp, enable); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_get_delay_struct_method_def = { - "lv_anim_get_delay", - (PyCFunction)py_lv_anim_get_delay_struct_method, +static PyMethodDef py_lv_display_set_matrix_rotation_struct_method_def = { + "lv_display_set_matrix_rotation", + (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82359,28 +76869,29 @@ static PyMethodDef py_lv_anim_get_delay_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_playtime(const lv_anim_t *a) + * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) */ -static PyObject *py_lv_anim_get_playtime_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + long dpi_val; + if (!PyArg_ParseTuple(py_args, "l", &dpi_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t dpi = (int32_t)dpi_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_playtime)(a); + ((void (*)(lv_display_t *, int32_t))lv_display_set_dpi)(disp, dpi); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_get_playtime_struct_method_def = { - "lv_anim_get_playtime", - (PyCFunction)py_lv_anim_get_playtime_struct_method, +static PyMethodDef py_lv_display_set_dpi_struct_method_def = { + "lv_display_set_dpi", + (PyCFunction)py_lv_display_set_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82388,28 +76899,28 @@ static PyMethodDef py_lv_anim_get_playtime_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_time(const lv_anim_t *a) + * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_anim_get_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_time)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_horizontal_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_get_time_struct_method_def = { - "lv_anim_get_time", - (PyCFunction)py_lv_anim_get_time_struct_method, +static PyMethodDef py_lv_display_get_horizontal_resolution_struct_method_def = { + "lv_display_get_horizontal_resolution", + (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82417,28 +76928,28 @@ static PyMethodDef py_lv_anim_get_time_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_anim_get_repeat_count(const lv_anim_t *a) + * int32_t lv_display_get_vertical_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_anim_get_repeat_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + int32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_anim_t *))lv_anim_get_repeat_count)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_vertical_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_get_repeat_count_struct_method_def = { - "lv_anim_get_repeat_count", - (PyCFunction)py_lv_anim_get_repeat_count_struct_method, +static PyMethodDef py_lv_display_get_vertical_resolution_struct_method_def = { + "lv_display_get_vertical_resolution", + (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82446,28 +76957,28 @@ static PyMethodDef py_lv_anim_get_repeat_count_struct_method_def = { /* * lvgl extension definition for: - * void *lv_anim_get_user_data(const lv_anim_t *a) + * int32_t lv_display_get_original_horizontal_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_anim_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_original_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + int32_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_anim_t *))lv_anim_get_user_data)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_horizontal_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_get_user_data_struct_method_def = { - "lv_anim_get_user_data", - (PyCFunction)py_lv_anim_get_user_data_struct_method, +static PyMethodDef py_lv_display_get_original_horizontal_resolution_struct_method_def = { + "lv_display_get_original_horizontal_resolution", + (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82475,30 +76986,28 @@ static PyMethodDef py_lv_anim_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * bool lv_anim_custom_delete(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * int32_t lv_display_get_original_vertical_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_anim_custom_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_original_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_delete)(a, exec_cb); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_vertical_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_custom_delete_struct_method_def = { - "lv_anim_custom_delete", - (PyCFunction)py_lv_anim_custom_delete_struct_method, +static PyMethodDef py_lv_display_get_original_vertical_resolution_struct_method_def = { + "lv_display_get_original_vertical_resolution", + (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82506,30 +77015,28 @@ static PyMethodDef py_lv_anim_custom_delete_struct_method_def = { /* * lvgl extension definition for: - * lv_anim_t *lv_anim_custom_get(lv_anim_t *a, lv_anim_custom_exec_cb_t exec_cb) + * int32_t lv_display_get_physical_horizontal_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_anim_custom_get_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_physical_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *exec_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &exec_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); - void *exec_cb = mp_lv_callback(exec_cb_py, &lv_anim_t_exec_cb_callback, "lv_anim_t_exec_cb", &a->user_data, a, (NULL), (NULL)); + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_anim_t * _res; + int32_t _res; lvpy_lock(); - _res = ((lv_anim_t *(*)(lv_anim_t *, lv_anim_custom_exec_cb_t))lv_anim_custom_get)(a, exec_cb); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_horizontal_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_anim_t((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_custom_get_struct_method_def = { - "lv_anim_custom_get", - (PyCFunction)py_lv_anim_custom_get_struct_method, +static PyMethodDef py_lv_display_get_physical_horizontal_resolution_struct_method_def = { + "lv_display_get_physical_horizontal_resolution", + (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82537,28 +77044,28 @@ static PyMethodDef py_lv_anim_custom_get_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_linear(const lv_anim_t *a) + * int32_t lv_display_get_physical_vertical_resolution(const lv_display_t *disp) */ -static PyObject *py_lv_anim_path_linear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_physical_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_linear)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_vertical_resolution)(disp); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_path_linear_struct_method_def = { - "lv_anim_path_linear", - (PyCFunction)py_lv_anim_path_linear_struct_method, +static PyMethodDef py_lv_display_get_physical_vertical_resolution_struct_method_def = { + "lv_display_get_physical_vertical_resolution", + (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82566,28 +77073,28 @@ static PyMethodDef py_lv_anim_path_linear_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_ease_in(const lv_anim_t *a) + * int32_t lv_display_get_offset_x(const lv_display_t *disp) */ -static PyObject *py_lv_anim_path_ease_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_x)(disp); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_path_ease_in_struct_method_def = { - "lv_anim_path_ease_in", - (PyCFunction)py_lv_anim_path_ease_in_struct_method, +static PyMethodDef py_lv_display_get_offset_x_struct_method_def = { + "lv_display_get_offset_x", + (PyCFunction)py_lv_display_get_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82595,28 +77102,28 @@ static PyMethodDef py_lv_anim_path_ease_in_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_ease_out(const lv_anim_t *a) + * int32_t lv_display_get_offset_y(const lv_display_t *disp) */ -static PyObject *py_lv_anim_path_ease_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_out)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_y)(disp); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_path_ease_out_struct_method_def = { - "lv_anim_path_ease_out", - (PyCFunction)py_lv_anim_path_ease_out_struct_method, +static PyMethodDef py_lv_display_get_offset_y_struct_method_def = { + "lv_display_get_offset_y", + (PyCFunction)py_lv_display_get_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82624,28 +77131,28 @@ static PyMethodDef py_lv_anim_path_ease_out_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_ease_in_out(const lv_anim_t *a) + * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) */ -static PyObject *py_lv_anim_path_ease_in_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_display_rotation_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_ease_in_out)(a); + _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_display_get_rotation)(disp); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_path_ease_in_out_struct_method_def = { - "lv_anim_path_ease_in_out", - (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, +static PyMethodDef py_lv_display_get_rotation_struct_method_def = { + "lv_display_get_rotation", + (PyCFunction)py_lv_display_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82653,28 +77160,28 @@ static PyMethodDef py_lv_anim_path_ease_in_out_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_overshoot(const lv_anim_t *a) + * bool lv_display_get_matrix_rotation(lv_display_t *disp) */ -static PyObject *py_lv_anim_path_overshoot_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_overshoot)(a); + _res = ((bool (*)(lv_display_t *))lv_display_get_matrix_rotation)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_anim_path_overshoot_struct_method_def = { - "lv_anim_path_overshoot", - (PyCFunction)py_lv_anim_path_overshoot_struct_method, +static PyMethodDef py_lv_display_get_matrix_rotation_struct_method_def = { + "lv_display_get_matrix_rotation", + (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82682,28 +77189,28 @@ static PyMethodDef py_lv_anim_path_overshoot_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_bounce(const lv_anim_t *a) + * int32_t lv_display_get_dpi(const lv_display_t *disp) */ -static PyObject *py_lv_anim_path_bounce_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_bounce)(a); + _res = ((int32_t (*)(const lv_display_t *))lv_display_get_dpi)(disp); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_anim_path_bounce_struct_method_def = { - "lv_anim_path_bounce", - (PyCFunction)py_lv_anim_path_bounce_struct_method, +static PyMethodDef py_lv_display_get_dpi_struct_method_def = { + "lv_display_get_dpi", + (PyCFunction)py_lv_display_get_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82711,28 +77218,32 @@ static PyMethodDef py_lv_anim_path_bounce_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_step(const lv_anim_t *a) + * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) */ -static PyObject *py_lv_anim_path_step_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; PyObject *render_mode_py; + if (!PyArg_ParseTuple(py_args, "OOlO", &buf1_py, &buf2_py, &buf_size_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *buf1 = mp_to_ptr(buf1_py); + void *buf2 = mp_to_ptr(buf2_py); + uint32_t buf_size = (uint32_t)buf_size_val; + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_step)(a); + ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_display_set_buffers)(disp, buf1, buf2, buf_size, render_mode); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_path_step_struct_method_def = { - "lv_anim_path_step", - (PyCFunction)py_lv_anim_path_step_struct_method, +static PyMethodDef py_lv_display_set_buffers_struct_method_def = { + "lv_display_set_buffers", + (PyCFunction)py_lv_display_set_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82740,176 +77251,94 @@ static PyMethodDef py_lv_anim_path_step_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_anim_path_custom_bezier3(const lv_anim_t *a) + * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) */ -static PyObject *py_lv_anim_path_custom_bezier3_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_buffers_with_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_anim_t *a = (lv_anim_t *)mp_write_ptr_lv_anim_t(self); + PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; long stride_val; PyObject *render_mode_py; + if (!PyArg_ParseTuple(py_args, "OOllO", &buf1_py, &buf2_py, &buf_size_val, &stride_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *buf1 = mp_to_ptr(buf1_py); + void *buf2 = mp_to_ptr(buf2_py); + uint32_t buf_size = (uint32_t)buf_size_val; + uint32_t stride = (uint32_t)stride_val; + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_anim_t *))lv_anim_path_custom_bezier3)(a); + ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_display_set_buffers_with_stride)(disp, buf1, buf2, buf_size, stride, render_mode); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_anim_path_custom_bezier3_struct_method_def = { - "lv_anim_path_custom_bezier3", - (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, +static PyMethodDef py_lv_display_set_buffers_with_stride_struct_method_def = { + "lv_display_set_buffers_with_stride", + (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_anim_t_methods[] = { - {"init", (PyCFunction)py_lv_anim_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_var", (PyCFunction)py_lv_anim_set_var_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_exec_cb", (PyCFunction)py_lv_anim_set_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_duration", (PyCFunction)py_lv_anim_set_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_delay", (PyCFunction)py_lv_anim_set_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"resume", (PyCFunction)py_lv_anim_resume_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pause", (PyCFunction)py_lv_anim_pause_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"pause_for", (PyCFunction)py_lv_anim_pause_for_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_paused", (PyCFunction)py_lv_anim_is_paused_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_values", (PyCFunction)py_lv_anim_set_values_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_custom_exec_cb", (PyCFunction)py_lv_anim_set_custom_exec_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_path_cb", (PyCFunction)py_lv_anim_set_path_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_start_cb", (PyCFunction)py_lv_anim_set_start_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_get_value_cb", (PyCFunction)py_lv_anim_set_get_value_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_completed_cb", (PyCFunction)py_lv_anim_set_completed_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_deleted_cb", (PyCFunction)py_lv_anim_set_deleted_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_duration", (PyCFunction)py_lv_anim_set_reverse_duration_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_time", (PyCFunction)py_lv_anim_set_reverse_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_reverse_delay", (PyCFunction)py_lv_anim_set_reverse_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_count", (PyCFunction)py_lv_anim_set_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_repeat_delay", (PyCFunction)py_lv_anim_set_repeat_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_early_apply", (PyCFunction)py_lv_anim_set_early_apply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_anim_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_bezier3_param", (PyCFunction)py_lv_anim_set_bezier3_param_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"start", (PyCFunction)py_lv_anim_start_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_delay", (PyCFunction)py_lv_anim_get_delay_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_playtime", (PyCFunction)py_lv_anim_get_playtime_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_time", (PyCFunction)py_lv_anim_get_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_repeat_count", (PyCFunction)py_lv_anim_get_repeat_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_anim_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"custom_delete", (PyCFunction)py_lv_anim_custom_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"custom_get", (PyCFunction)py_lv_anim_custom_get_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_linear", (PyCFunction)py_lv_anim_path_linear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_ease_in", (PyCFunction)py_lv_anim_path_ease_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_ease_out", (PyCFunction)py_lv_anim_path_ease_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_ease_in_out", (PyCFunction)py_lv_anim_path_ease_in_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_overshoot", (PyCFunction)py_lv_anim_path_overshoot_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_bounce", (PyCFunction)py_lv_anim_path_bounce_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_step", (PyCFunction)py_lv_anim_path_step_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"path_custom_bezier3", (PyCFunction)py_lv_anim_path_custom_bezier3_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_anim_parameter_t_methods[] = {{NULL}}; -PyMethodDef py_lv_anim_bezier3_para_t_methods[] = {{NULL}}; - -/* - * Callback function lv_style_transition_dsc_init_path_cb (CPython) - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ -static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_style_transition_dsc_init_path_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } - int32_t _c_res = (int32_t)mp_obj_get_int(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * lvgl extension definition for: - * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) + * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) */ -static PyObject *py_lv_style_transition_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_draw_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *props_py; PyObject *path_cb_py; long time_val; long delay_val; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOllO", &props_py, &path_cb_py, &time_val, &delay_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_style_transition_dsc_t *tr = (lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(self); - void *user_data = mp_to_ptr(user_data_py); - const lv_style_prop_t *props = (const lv_style_prop_t *)mp_to_ptr(props_py); - uint32_t time = (uint32_t)time_val; - uint32_t delay = (uint32_t)delay_val; - void *path_cb = mp_lv_callback(path_cb_py, &lv_style_transition_dsc_init_path_cb_callback, "lv_style_transition_dsc_init_path_cb", &user_data, NULL, (NULL), (NULL)); + PyObject *buf1_py; PyObject *buf2_py; + if (!PyArg_ParseTuple(py_args, "OO", &buf1_py, &buf2_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(buf1_py); + lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(buf2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_style_transition_dsc_init)(tr, props, path_cb, time, delay, user_data); + ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_display_set_draw_buffers)(disp, buf1, buf2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_style_transition_dsc_init_struct_method_def = { - "lv_style_transition_dsc_init", - (PyCFunction)py_lv_style_transition_dsc_init_struct_method, +static PyMethodDef py_lv_display_set_draw_buffers_struct_method_def = { + "lv_display_set_draw_buffers", + (PyCFunction)py_lv_display_set_draw_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_style_transition_dsc_t_methods[] = { - {"init", (PyCFunction)py_lv_style_transition_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_display_delete(lv_display_t *disp) + * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) */ -static PyObject *py_lv_display_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_3rd_draw_buffer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *buf3_py; + if (!PyArg_ParseTuple(py_args, "O", &buf3_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(buf3_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_delete)(disp); + ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_display_set_3rd_draw_buffer)(disp, buf3); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_delete_struct_method_def = { - "lv_display_delete", - (PyCFunction)py_lv_display_delete_struct_method, +static PyMethodDef py_lv_display_set_3rd_draw_buffer_struct_method_def = { + "lv_display_set_3rd_draw_buffer", + (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82917,56 +77346,94 @@ static PyMethodDef py_lv_display_delete_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_default(lv_display_t *disp) + * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) */ -static PyObject *py_lv_display_set_default_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *render_mode_py; + if (!PyArg_ParseTuple(py_args, "O", &render_mode_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_set_default)(disp); + ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_display_set_render_mode)(disp, render_mode); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_default_struct_method_def = { - "lv_display_set_default", - (PyCFunction)py_lv_display_set_default_struct_method, +static PyMethodDef py_lv_display_set_render_mode_struct_method_def = { + "lv_display_set_render_mode", + (PyCFunction)py_lv_display_set_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_display_t_flush_cb (CPython) + * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) + */ +static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_flush_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_area_t((void*)arg1); + PyObject *py_arg2 = mp_array_from_u8ptr((void*)arg2); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_display_t *lv_display_get_next(lv_display_t *disp) + * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) */ -static PyObject *py_lv_display_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_flush_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *flush_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &flush_cb_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *flush_cb = mp_lv_callback(flush_cb_py, &lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", &disp->user_data, disp, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_t * _res; lvpy_lock(); - _res = ((lv_display_t *(*)(lv_display_t *))lv_display_get_next)(disp); + ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_display_set_flush_cb)(disp, flush_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_display_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_next_struct_method_def = { - "lv_display_get_next", - (PyCFunction)py_lv_display_get_next_struct_method, +static PyMethodDef py_lv_display_set_flush_cb_struct_method_def = { + "lv_display_set_flush_cb", + (PyCFunction)py_lv_display_set_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -82974,92 +77441,152 @@ static PyMethodDef py_lv_display_get_next_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) + * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) */ -static PyObject *py_lv_display_set_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_flush_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long hor_res_val; long ver_res_val; - if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t hor_res = (int32_t)hor_res_val; - int32_t ver_res = (int32_t)ver_res_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_display_flush_cb_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_resolution)(disp, hor_res, ver_res); + _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_display_get_flush_cb)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_lv_funcptr_lv_display_flush_cb_t(_res); } -static PyMethodDef py_lv_display_set_resolution_struct_method_def = { - "lv_display_set_resolution", - (PyCFunction)py_lv_display_set_resolution_struct_method, +static PyMethodDef py_lv_display_get_flush_cb_struct_method_def = { + "lv_display_get_flush_cb", + (PyCFunction)py_lv_display_get_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_display_t_wait_cb (CPython) + * void lv_display_flush_wait_cb_t(lv_display_t *disp) + */ +static void lv_display_t_wait_cb_callback(lv_display_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_wait_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_display_set_physical_resolution(lv_display_t *disp, int32_t hor_res, int32_t ver_res) + * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) */ -static PyObject *py_lv_display_set_physical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_flush_wait_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long hor_res_val; long ver_res_val; - if (!PyArg_ParseTuple(py_args, "ll", &hor_res_val, &ver_res_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *wait_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &wait_cb_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t hor_res = (int32_t)hor_res_val; - int32_t ver_res = (int32_t)ver_res_val; + void *wait_cb = mp_lv_callback(wait_cb_py, &lv_display_t_wait_cb_callback, "lv_display_t_wait_cb", &disp->user_data, disp, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_physical_resolution)(disp, hor_res, ver_res); + ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_display_set_flush_wait_cb)(disp, wait_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_physical_resolution_struct_method_def = { - "lv_display_set_physical_resolution", - (PyCFunction)py_lv_display_set_physical_resolution_struct_method, +static PyMethodDef py_lv_display_set_flush_wait_cb_struct_method_def = { + "lv_display_set_flush_wait_cb", + (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_display_t_sync_cb (CPython) + * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) + */ +static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_sync_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_area_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_display_set_offset(lv_display_t *disp, int32_t x, int32_t y) + * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) */ -static PyObject *py_lv_display_set_offset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_sync_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *sync_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &sync_cb_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + void *sync_cb = mp_lv_callback(sync_cb_py, &lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", &disp->user_data, disp, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, int32_t, int32_t))lv_display_set_offset)(disp, x, y); + ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_display_set_sync_cb)(disp, sync_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_offset_struct_method_def = { - "lv_display_set_offset", - (PyCFunction)py_lv_display_set_offset_struct_method, +static PyMethodDef py_lv_display_set_sync_cb_struct_method_def = { + "lv_display_set_sync_cb", + (PyCFunction)py_lv_display_set_sync_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83067,29 +77594,29 @@ static PyMethodDef py_lv_display_set_offset_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_rotation(lv_display_t *disp, lv_display_rotation_t rotation) + * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) */ -static PyObject *py_lv_display_set_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_sync_wait_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *rotation_py; - if (!PyArg_ParseTuple(py_args, "O", &rotation_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *wait_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &wait_cb_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_display_rotation_t rotation = (int)mp_obj_get_int(rotation_py); + void *wait_cb = mp_lv_callback(wait_cb_py, &lv_display_t_wait_cb_callback, "lv_display_t_wait_cb", &disp->user_data, disp, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_rotation_t))lv_display_set_rotation)(disp, rotation); + ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_display_set_sync_wait_cb)(disp, wait_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_rotation_struct_method_def = { - "lv_display_set_rotation", - (PyCFunction)py_lv_display_set_rotation_struct_method, +static PyMethodDef py_lv_display_set_sync_wait_cb_struct_method_def = { + "lv_display_set_sync_wait_cb", + (PyCFunction)py_lv_display_set_sync_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83097,29 +77624,29 @@ static PyMethodDef py_lv_display_set_rotation_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_matrix_rotation(lv_display_t *disp, bool enable) + * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) */ -static PyObject *py_lv_display_set_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long enable_val; - if (!PyArg_ParseTuple(py_args, "l", &enable_val)) { PyGILState_Release(gstate); return NULL; } + PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "O", &color_format_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - bool enable = (enable_val != 0); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, bool))lv_display_set_matrix_rotation)(disp, enable); + ((void (*)(lv_display_t *, lv_color_format_t))lv_display_set_color_format)(disp, color_format); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_matrix_rotation_struct_method_def = { - "lv_display_set_matrix_rotation", - (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, +static PyMethodDef py_lv_display_set_color_format_struct_method_def = { + "lv_display_set_color_format", + (PyCFunction)py_lv_display_set_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83127,29 +77654,28 @@ static PyMethodDef py_lv_display_set_matrix_rotation_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_dpi(lv_display_t *disp, int32_t dpi) + * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) */ -static PyObject *py_lv_display_set_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long dpi_val; - if (!PyArg_ParseTuple(py_args, "l", &dpi_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t dpi = (int32_t)dpi_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_format_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, int32_t))lv_display_set_dpi)(disp, dpi); + _res = ((lv_color_format_t (*)(lv_display_t *))lv_display_get_color_format)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_set_dpi_struct_method_def = { - "lv_display_set_dpi", - (PyCFunction)py_lv_display_set_dpi_struct_method, +static PyMethodDef py_lv_display_get_color_format_struct_method_def = { + "lv_display_get_color_format", + (PyCFunction)py_lv_display_get_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83157,28 +77683,29 @@ static PyMethodDef py_lv_display_set_dpi_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_horizontal_resolution(const lv_display_t *disp) + * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) */ -static PyObject *py_lv_display_get_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long tile_cnt_val; + if (!PyArg_ParseTuple(py_args, "l", &tile_cnt_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + uint32_t tile_cnt = (uint32_t)tile_cnt_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_horizontal_resolution)(disp); + ((void (*)(lv_display_t *, uint32_t))lv_display_set_tile_cnt)(disp, tile_cnt); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_horizontal_resolution_struct_method_def = { - "lv_display_get_horizontal_resolution", - (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, +static PyMethodDef py_lv_display_set_tile_cnt_struct_method_def = { + "lv_display_set_tile_cnt", + (PyCFunction)py_lv_display_set_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83186,28 +77713,28 @@ static PyMethodDef py_lv_display_get_horizontal_resolution_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_vertical_resolution(const lv_display_t *disp) + * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) */ -static PyObject *py_lv_display_get_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + uint32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_vertical_resolution)(disp); + _res = ((uint32_t (*)(lv_display_t *))lv_display_get_tile_cnt)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_vertical_resolution_struct_method_def = { - "lv_display_get_vertical_resolution", - (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, +static PyMethodDef py_lv_display_get_tile_cnt_struct_method_def = { + "lv_display_get_tile_cnt", + (PyCFunction)py_lv_display_get_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83215,28 +77742,29 @@ static PyMethodDef py_lv_display_get_vertical_resolution_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_original_horizontal_resolution(const lv_display_t *disp) + * void lv_display_set_antialiasing(lv_display_t *disp, bool en) */ -static PyObject *py_lv_display_get_original_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + long en_val; + if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + bool en = (en_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_horizontal_resolution)(disp); + ((void (*)(lv_display_t *, bool))lv_display_set_antialiasing)(disp, en); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_original_horizontal_resolution_struct_method_def = { - "lv_display_get_original_horizontal_resolution", - (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, +static PyMethodDef py_lv_display_set_antialiasing_struct_method_def = { + "lv_display_set_antialiasing", + (PyCFunction)py_lv_display_set_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83244,28 +77772,28 @@ static PyMethodDef py_lv_display_get_original_horizontal_resolution_struct_metho /* * lvgl extension definition for: - * int32_t lv_display_get_original_vertical_resolution(const lv_display_t *disp) + * bool lv_display_get_antialiasing(lv_display_t *disp) */ -static PyObject *py_lv_display_get_original_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_original_vertical_resolution)(disp); + _res = ((bool (*)(lv_display_t *))lv_display_get_antialiasing)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_get_original_vertical_resolution_struct_method_def = { - "lv_display_get_original_vertical_resolution", - (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, +static PyMethodDef py_lv_display_get_antialiasing_struct_method_def = { + "lv_display_get_antialiasing", + (PyCFunction)py_lv_display_get_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83273,28 +77801,27 @@ static PyMethodDef py_lv_display_get_original_vertical_resolution_struct_method_ /* * lvgl extension definition for: - * int32_t lv_display_get_physical_horizontal_resolution(const lv_display_t *disp) + * void lv_display_flush_ready(lv_display_t *disp) */ -static PyObject *py_lv_display_get_physical_horizontal_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_flush_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_horizontal_resolution)(disp); + ((void (*)(lv_display_t *))lv_display_flush_ready)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_physical_horizontal_resolution_struct_method_def = { - "lv_display_get_physical_horizontal_resolution", - (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, +static PyMethodDef py_lv_display_flush_ready_struct_method_def = { + "lv_display_flush_ready", + (PyCFunction)py_lv_display_flush_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83302,28 +77829,28 @@ static PyMethodDef py_lv_display_get_physical_horizontal_resolution_struct_metho /* * lvgl extension definition for: - * int32_t lv_display_get_physical_vertical_resolution(const lv_display_t *disp) + * bool lv_display_flush_is_last(lv_display_t *disp) */ -static PyObject *py_lv_display_get_physical_vertical_resolution_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_flush_is_last_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_physical_vertical_resolution)(disp); + _res = ((bool (*)(lv_display_t *))lv_display_flush_is_last)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_get_physical_vertical_resolution_struct_method_def = { - "lv_display_get_physical_vertical_resolution", - (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, +static PyMethodDef py_lv_display_flush_is_last_struct_method_def = { + "lv_display_flush_is_last", + (PyCFunction)py_lv_display_flush_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83331,28 +77858,27 @@ static PyMethodDef py_lv_display_get_physical_vertical_resolution_struct_method_ /* * lvgl extension definition for: - * int32_t lv_display_get_offset_x(const lv_display_t *disp) + * void lv_display_sync_ready(lv_display_t *disp) */ -static PyObject *py_lv_display_get_offset_x_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_sync_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_x)(disp); + ((void (*)(lv_display_t *))lv_display_sync_ready)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_offset_x_struct_method_def = { - "lv_display_get_offset_x", - (PyCFunction)py_lv_display_get_offset_x_struct_method, +static PyMethodDef py_lv_display_sync_ready_struct_method_def = { + "lv_display_sync_ready", + (PyCFunction)py_lv_display_sync_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83360,28 +77886,28 @@ static PyMethodDef py_lv_display_get_offset_x_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_offset_y(const lv_display_t *disp) + * bool lv_display_sync_is_last(lv_display_t *disp) */ -static PyObject *py_lv_display_get_offset_y_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_sync_is_last_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + bool _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_offset_y)(disp); + _res = ((bool (*)(lv_display_t *))lv_display_sync_is_last)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_get_offset_y_struct_method_def = { - "lv_display_get_offset_y", - (PyCFunction)py_lv_display_get_offset_y_struct_method, +static PyMethodDef py_lv_display_sync_is_last_struct_method_def = { + "lv_display_sync_is_last", + (PyCFunction)py_lv_display_sync_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83389,9 +77915,9 @@ static PyMethodDef py_lv_display_get_offset_y_struct_method_def = { /* * lvgl extension definition for: - * lv_display_rotation_t lv_display_get_rotation(lv_display_t *disp) + * bool lv_display_is_double_buffered(lv_display_t *disp) */ -static PyObject *py_lv_display_get_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_is_double_buffered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -83399,18 +77925,18 @@ static PyObject *py_lv_display_get_rotation_struct_method(PyObject *self, PyObje lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_rotation_t _res; + bool _res; lvpy_lock(); - _res = ((lv_display_rotation_t (*)(lv_display_t *))lv_display_get_rotation)(disp); + _res = ((bool (*)(lv_display_t *))lv_display_is_double_buffered)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_get_rotation_struct_method_def = { - "lv_display_get_rotation", - (PyCFunction)py_lv_display_get_rotation_struct_method, +static PyMethodDef py_lv_display_is_double_buffered_struct_method_def = { + "lv_display_is_double_buffered", + (PyCFunction)py_lv_display_is_double_buffered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83418,9 +77944,9 @@ static PyMethodDef py_lv_display_get_rotation_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_get_matrix_rotation(lv_display_t *disp) + * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) */ -static PyObject *py_lv_display_get_matrix_rotation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -83428,18 +77954,18 @@ static PyObject *py_lv_display_get_matrix_rotation_struct_method(PyObject *self, lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_display_render_mode_t _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_get_matrix_rotation)(disp); + _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_display_get_render_mode)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_matrix_rotation_struct_method_def = { - "lv_display_get_matrix_rotation", - (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, +static PyMethodDef py_lv_display_get_render_mode_struct_method_def = { + "lv_display_get_render_mode", + (PyCFunction)py_lv_display_get_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83447,28 +77973,28 @@ static PyMethodDef py_lv_display_get_matrix_rotation_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_display_get_dpi(const lv_display_t *disp) + * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) */ -static PyObject *py_lv_display_get_dpi_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_screen_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_obj_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *))lv_display_get_dpi)(disp); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_active)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_dpi_struct_method_def = { - "lv_display_get_dpi", - (PyCFunction)py_lv_display_get_dpi_struct_method, +static PyMethodDef py_lv_display_get_screen_active_struct_method_def = { + "lv_display_get_screen_active", + (PyCFunction)py_lv_display_get_screen_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83476,32 +78002,28 @@ static PyMethodDef py_lv_display_get_dpi_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_buffers(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, lv_display_render_mode_t render_mode) + * lv_obj_t *lv_display_get_screen_prev(lv_display_t *disp) */ -static PyObject *py_lv_display_set_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_screen_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; PyObject *render_mode_py; - if (!PyArg_ParseTuple(py_args, "OOlO", &buf1_py, &buf2_py, &buf_size_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *buf1 = mp_to_ptr(buf1_py); - void *buf2 = mp_to_ptr(buf2_py); - uint32_t buf_size = (uint32_t)buf_size_val; - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, void *, void *, uint32_t, lv_display_render_mode_t))lv_display_set_buffers)(disp, buf1, buf2, buf_size, render_mode); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_prev)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_display_set_buffers_struct_method_def = { - "lv_display_set_buffers", - (PyCFunction)py_lv_display_set_buffers_struct_method, +static PyMethodDef py_lv_display_get_screen_prev_struct_method_def = { + "lv_display_get_screen_prev", + (PyCFunction)py_lv_display_get_screen_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83509,33 +78031,28 @@ static PyMethodDef py_lv_display_set_buffers_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_buffers_with_stride(lv_display_t *disp, void *buf1, void *buf2, uint32_t buf_size, uint32_t stride, lv_display_render_mode_t render_mode) + * lv_obj_t *lv_display_get_screen_loading(lv_display_t *disp) */ -static PyObject *py_lv_display_set_buffers_with_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_screen_loading_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf1_py; PyObject *buf2_py; long buf_size_val; long stride_val; PyObject *render_mode_py; - if (!PyArg_ParseTuple(py_args, "OOllO", &buf1_py, &buf2_py, &buf_size_val, &stride_val, &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *buf1 = mp_to_ptr(buf1_py); - void *buf2 = mp_to_ptr(buf2_py); - uint32_t buf_size = (uint32_t)buf_size_val; - uint32_t stride = (uint32_t)stride_val; - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, void *, void *, uint32_t, uint32_t, lv_display_render_mode_t))lv_display_set_buffers_with_stride)(disp, buf1, buf2, buf_size, stride, render_mode); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_loading)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_display_set_buffers_with_stride_struct_method_def = { - "lv_display_set_buffers_with_stride", - (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, +static PyMethodDef py_lv_display_get_screen_loading_struct_method_def = { + "lv_display_get_screen_loading", + (PyCFunction)py_lv_display_get_screen_loading_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83543,30 +78060,28 @@ static PyMethodDef py_lv_display_set_buffers_with_stride_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_draw_buffers(lv_display_t *disp, lv_draw_buf_t *buf1, lv_draw_buf_t *buf2) + * lv_obj_t *lv_display_get_layer_top(lv_display_t *disp) */ -static PyObject *py_lv_display_set_draw_buffers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_layer_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf1_py; PyObject *buf2_py; - if (!PyArg_ParseTuple(py_args, "OO", &buf1_py, &buf2_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_draw_buf_t *buf1 = mp_write_ptr_lv_draw_buf_t(buf1_py); - lv_draw_buf_t *buf2 = mp_write_ptr_lv_draw_buf_t(buf2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_draw_buf_t *, lv_draw_buf_t *))lv_display_set_draw_buffers)(disp, buf1, buf2); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_top)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_display_set_draw_buffers_struct_method_def = { - "lv_display_set_draw_buffers", - (PyCFunction)py_lv_display_set_draw_buffers_struct_method, +static PyMethodDef py_lv_display_get_layer_top_struct_method_def = { + "lv_display_get_layer_top", + (PyCFunction)py_lv_display_get_layer_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83574,29 +78089,28 @@ static PyMethodDef py_lv_display_set_draw_buffers_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_3rd_draw_buffer(lv_display_t *disp, lv_draw_buf_t *buf3) + * lv_obj_t *lv_display_get_layer_sys(lv_display_t *disp) */ -static PyObject *py_lv_display_set_3rd_draw_buffer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_layer_sys_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf3_py; - if (!PyArg_ParseTuple(py_args, "O", &buf3_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_draw_buf_t *buf3 = mp_write_ptr_lv_draw_buf_t(buf3_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_draw_buf_t *))lv_display_set_3rd_draw_buffer)(disp, buf3); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_sys)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_display_set_3rd_draw_buffer_struct_method_def = { - "lv_display_set_3rd_draw_buffer", - (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, +static PyMethodDef py_lv_display_get_layer_sys_struct_method_def = { + "lv_display_get_layer_sys", + (PyCFunction)py_lv_display_get_layer_sys_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83604,55 +78118,50 @@ static PyMethodDef py_lv_display_set_3rd_draw_buffer_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_render_mode(lv_display_t *disp, lv_display_render_mode_t render_mode) + * lv_obj_t *lv_display_get_layer_bottom(lv_display_t *disp) */ -static PyObject *py_lv_display_set_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_layer_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *render_mode_py; - if (!PyArg_ParseTuple(py_args, "O", &render_mode_py)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_display_render_mode_t render_mode = (int)mp_obj_get_int(render_mode_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_obj_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_render_mode_t))lv_display_set_render_mode)(disp, render_mode); + _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_bottom)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return lv_to_mp((void*)_res); } -static PyMethodDef py_lv_display_set_render_mode_struct_method_def = { - "lv_display_set_render_mode", - (PyCFunction)py_lv_display_set_render_mode_struct_method, +static PyMethodDef py_lv_display_get_layer_bottom_struct_method_def = { + "lv_display_get_layer_bottom", + (PyCFunction)py_lv_display_get_layer_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_display_t_flush_cb (CPython) - * void lv_display_flush_cb_t(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) + * Callback function lv_display_add_event_cb_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) */ -static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t *arg1, uint8_t *arg2) +static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_flush_cb"); + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_add_event_cb_event_cb"); if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_area_t((void*)arg1); - PyObject *py_arg2 = mp_array_from_u8ptr((void*)arg2); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); @@ -83669,29 +78178,32 @@ static void lv_display_t_flush_cb_callback(lv_display_t *arg0, const lv_area_t * /* * lvgl extension definition for: - * void lv_display_set_flush_cb(lv_display_t *disp, lv_display_flush_cb_t flush_cb) + * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) */ -static PyObject *py_lv_display_set_flush_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_add_event_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flush_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &flush_cb_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *flush_cb = mp_lv_callback(flush_cb_py, &lv_display_t_flush_cb_callback, "lv_display_t_flush_cb", &disp->user_data, disp, (NULL), (NULL)); + void *user_data = mp_to_ptr(user_data_py); + lv_event_code_t filter = (int)mp_obj_get_int(filter_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_add_event_cb_event_cb_callback, "lv_display_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_event_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_flush_cb_t))lv_display_set_flush_cb)(disp, flush_cb); + _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_display_add_event_cb)(disp, event_cb, filter, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_display_set_flush_cb_struct_method_def = { - "lv_display_set_flush_cb", - (PyCFunction)py_lv_display_set_flush_cb_struct_method, +static PyMethodDef py_lv_display_add_event_cb_struct_method_def = { + "lv_display_add_event_cb", + (PyCFunction)py_lv_display_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83699,9 +78211,9 @@ static PyMethodDef py_lv_display_set_flush_cb_struct_method_def = { /* * lvgl extension definition for: - * lv_display_flush_cb_t lv_display_get_flush_cb(lv_display_t *disp) + * uint32_t lv_display_get_event_count(lv_display_t *disp) */ -static PyObject *py_lv_display_get_flush_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_event_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -83709,103 +78221,102 @@ static PyObject *py_lv_display_get_flush_cb_struct_method(PyObject *self, PyObje lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_flush_cb_t _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_display_flush_cb_t (*)(lv_display_t *))lv_display_get_flush_cb)(disp); + _res = ((uint32_t (*)(lv_display_t *))lv_display_get_event_count)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_lv_funcptr_lv_display_flush_cb_t(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_flush_cb_struct_method_def = { - "lv_display_get_flush_cb", - (PyCFunction)py_lv_display_get_flush_cb_struct_method, +static PyMethodDef py_lv_display_get_event_count_struct_method_def = { + "lv_display_get_event_count", + (PyCFunction)py_lv_display_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_display_t_wait_cb (CPython) - * void lv_display_flush_wait_cb_t(lv_display_t *disp) + * lvgl extension definition for: + * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) */ -static void lv_display_t_wait_cb_callback(lv_display_t *arg0) +static PyObject *py_lv_display_get_event_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_wait_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + uint32_t index = (uint32_t)index_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_event_dsc_t * _res; + lvpy_lock(); + _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_display_get_event_dsc)(disp, index); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_read_ptr_lv_event_dsc_t((void*)_res); } +static PyMethodDef py_lv_display_get_event_dsc_struct_method_def = { + "lv_display_get_event_dsc", + (PyCFunction)py_lv_display_get_event_dsc_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_display_set_flush_wait_cb(lv_display_t *disp, lv_display_flush_wait_cb_t wait_cb) + * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) */ -static PyObject *py_lv_display_set_flush_wait_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_remove_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *wait_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &wait_cb_py)) { PyGILState_Release(gstate); return NULL; } + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *wait_cb = mp_lv_callback(wait_cb_py, &lv_display_t_wait_cb_callback, "lv_display_t_wait_cb", &disp->user_data, disp, (NULL), (NULL)); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_flush_wait_cb_t))lv_display_set_flush_wait_cb)(disp, wait_cb); + _res = ((bool (*)(lv_display_t *, uint32_t))lv_display_remove_event)(disp, index); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_set_flush_wait_cb_struct_method_def = { - "lv_display_set_flush_wait_cb", - (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, +static PyMethodDef py_lv_display_remove_event_struct_method_def = { + "lv_display_remove_event", + (PyCFunction)py_lv_display_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_display_t_sync_cb (CPython) - * void lv_display_sync_cb_t(lv_display_t *disp, const lv_area_t *area) + * Callback function lv_display_remove_event_cb_with_user_data_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) */ -static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *arg1) +static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_t_sync_cb"); + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_remove_event_cb_with_user_data_event_cb"); if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } /* Hold the callback for the whole call: it may replace or remove its * own registration while it runs. */ Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_display_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_area_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } lvpy_release_lock_for_python(); lvpy_nesting_inc(); @@ -83822,29 +78333,31 @@ static void lv_display_t_sync_cb_callback(lv_display_t *arg0, const lv_area_t *a /* * lvgl extension definition for: - * void lv_display_set_sync_cb(lv_display_t *disp, lv_display_sync_cb_t sync_cb) + * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static PyObject *py_lv_display_set_sync_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_remove_event_cb_with_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *sync_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &sync_cb_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *sync_cb = mp_lv_callback(sync_cb_py, &lv_display_t_sync_cb_callback, "lv_display_t_sync_cb", &disp->user_data, disp, (NULL), (NULL)); + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_remove_event_cb_with_user_data_event_cb_callback, "lv_display_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_sync_cb_t))lv_display_set_sync_cb)(disp, sync_cb); + _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_remove_event_cb_with_user_data)(disp, event_cb, user_data); lvpy_unlock(); - + if (_res > 0) lvpy_release_callback_user_data(user_data); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_set_sync_cb_struct_method_def = { - "lv_display_set_sync_cb", - (PyCFunction)py_lv_display_set_sync_cb_struct_method, +static PyMethodDef py_lv_display_remove_event_cb_with_user_data_struct_method_def = { + "lv_display_remove_event_cb_with_user_data", + (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83852,29 +78365,31 @@ static PyMethodDef py_lv_display_set_sync_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_sync_wait_cb(lv_display_t *disp, lv_display_sync_wait_cb_t wait_cb) + * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) */ -static PyObject *py_lv_display_set_sync_wait_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_send_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *wait_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &wait_cb_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *code_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OO", &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *wait_cb = mp_lv_callback(wait_cb_py, &lv_display_t_wait_cb_callback, "lv_display_t_wait_cb", &disp->user_data, disp, (NULL), (NULL)); + lv_event_code_t code = (int)mp_obj_get_int(code_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_display_sync_wait_cb_t))lv_display_set_sync_wait_cb)(disp, wait_cb); + _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_display_send_event)(disp, code, param); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_set_sync_wait_cb_struct_method_def = { - "lv_display_set_sync_wait_cb", - (PyCFunction)py_lv_display_set_sync_wait_cb_struct_method, +static PyMethodDef py_lv_display_send_event_struct_method_def = { + "lv_display_send_event", + (PyCFunction)py_lv_display_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83882,29 +78397,29 @@ static PyMethodDef py_lv_display_set_sync_wait_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_color_format(lv_display_t *disp, lv_color_format_t color_format) + * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) */ -static PyObject *py_lv_display_set_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "O", &color_format_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *th_py; + if (!PyArg_ParseTuple(py_args, "O", &th_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + lv_theme_t *th = mp_write_ptr_lv_theme_t(th_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_color_format_t))lv_display_set_color_format)(disp, color_format); + ((void (*)(lv_display_t *, lv_theme_t *))lv_display_set_theme)(disp, th); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_color_format_struct_method_def = { - "lv_display_set_color_format", - (PyCFunction)py_lv_display_set_color_format_struct_method, +static PyMethodDef py_lv_display_set_theme_struct_method_def = { + "lv_display_set_theme", + (PyCFunction)py_lv_display_set_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83912,9 +78427,9 @@ static PyMethodDef py_lv_display_set_color_format_struct_method_def = { /* * lvgl extension definition for: - * lv_color_format_t lv_display_get_color_format(lv_display_t *disp) + * lv_theme_t *lv_display_get_theme(lv_display_t *disp) */ -static PyObject *py_lv_display_get_color_format_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -83922,18 +78437,18 @@ static PyObject *py_lv_display_get_color_format_struct_method(PyObject *self, Py lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color_format_t _res; + lv_theme_t * _res; lvpy_lock(); - _res = ((lv_color_format_t (*)(lv_display_t *))lv_display_get_color_format)(disp); + _res = ((lv_theme_t *(*)(lv_display_t *))lv_display_get_theme)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_theme_t((void*)_res); } -static PyMethodDef py_lv_display_get_color_format_struct_method_def = { - "lv_display_get_color_format", - (PyCFunction)py_lv_display_get_color_format_struct_method, +static PyMethodDef py_lv_display_get_theme_struct_method_def = { + "lv_display_get_theme", + (PyCFunction)py_lv_display_get_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83941,29 +78456,28 @@ static PyMethodDef py_lv_display_get_color_format_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_tile_cnt(lv_display_t *disp, uint32_t tile_cnt) + * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) */ -static PyObject *py_lv_display_set_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_inactive_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long tile_cnt_val; - if (!PyArg_ParseTuple(py_args, "l", &tile_cnt_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t tile_cnt = (uint32_t)tile_cnt_val; + + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, uint32_t))lv_display_set_tile_cnt)(disp, tile_cnt); + _res = ((uint32_t (*)(const lv_display_t *))lv_display_get_inactive_time)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_set_tile_cnt_struct_method_def = { - "lv_display_set_tile_cnt", - (PyCFunction)py_lv_display_set_tile_cnt_struct_method, +static PyMethodDef py_lv_display_get_inactive_time_struct_method_def = { + "lv_display_get_inactive_time", + (PyCFunction)py_lv_display_get_inactive_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -83971,9 +78485,9 @@ static PyMethodDef py_lv_display_set_tile_cnt_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_tile_cnt(lv_display_t *disp) + * void lv_display_trigger_activity(lv_display_t *disp) */ -static PyObject *py_lv_display_get_tile_cnt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_trigger_activity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -83981,18 +78495,17 @@ static PyObject *py_lv_display_get_tile_cnt_struct_method(PyObject *self, PyObje lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *))lv_display_get_tile_cnt)(disp); + ((void (*)(lv_display_t *))lv_display_trigger_activity)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_tile_cnt_struct_method_def = { - "lv_display_get_tile_cnt", - (PyCFunction)py_lv_display_get_tile_cnt_struct_method, +static PyMethodDef py_lv_display_trigger_activity_struct_method_def = { + "lv_display_trigger_activity", + (PyCFunction)py_lv_display_trigger_activity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84000,9 +78513,9 @@ static PyMethodDef py_lv_display_get_tile_cnt_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_antialiasing(lv_display_t *disp, bool en) + * void lv_display_enable_invalidation(lv_display_t *disp, bool en) */ -static PyObject *py_lv_display_set_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_enable_invalidation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84013,16 +78526,16 @@ static PyObject *py_lv_display_set_antialiasing_struct_method(PyObject *self, Py if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, bool))lv_display_set_antialiasing)(disp, en); + ((void (*)(lv_display_t *, bool))lv_display_enable_invalidation)(disp, en); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_antialiasing_struct_method_def = { - "lv_display_set_antialiasing", - (PyCFunction)py_lv_display_set_antialiasing_struct_method, +static PyMethodDef py_lv_display_enable_invalidation_struct_method_def = { + "lv_display_enable_invalidation", + (PyCFunction)py_lv_display_enable_invalidation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84030,9 +78543,9 @@ static PyMethodDef py_lv_display_set_antialiasing_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_get_antialiasing(lv_display_t *disp) + * bool lv_display_is_invalidation_enabled(lv_display_t *disp) */ -static PyObject *py_lv_display_get_antialiasing_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_is_invalidation_enabled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84042,16 +78555,16 @@ static PyObject *py_lv_display_get_antialiasing_struct_method(PyObject *self, Py bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_get_antialiasing)(disp); + _res = ((bool (*)(lv_display_t *))lv_display_is_invalidation_enabled)(disp); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_display_get_antialiasing_struct_method_def = { - "lv_display_get_antialiasing", - (PyCFunction)py_lv_display_get_antialiasing_struct_method, +static PyMethodDef py_lv_display_is_invalidation_enabled_struct_method_def = { + "lv_display_is_invalidation_enabled", + (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84059,9 +78572,9 @@ static PyMethodDef py_lv_display_get_antialiasing_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_flush_ready(lv_display_t *disp) + * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) */ -static PyObject *py_lv_display_flush_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84069,17 +78582,18 @@ static PyObject *py_lv_display_flush_ready_struct_method(PyObject *self, PyObjec lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_timer_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_flush_ready)(disp); + _res = ((lv_timer_t *(*)(lv_display_t *))lv_display_get_refr_timer)(disp); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_timer_t((void*)_res); } -static PyMethodDef py_lv_display_flush_ready_struct_method_def = { - "lv_display_flush_ready", - (PyCFunction)py_lv_display_flush_ready_struct_method, +static PyMethodDef py_lv_display_get_refr_timer_struct_method_def = { + "lv_display_get_refr_timer", + (PyCFunction)py_lv_display_get_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84087,9 +78601,9 @@ static PyMethodDef py_lv_display_flush_ready_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_flush_is_last(lv_display_t *disp) + * void lv_display_delete_refr_timer(lv_display_t *disp) */ -static PyObject *py_lv_display_flush_is_last_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_delete_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84097,75 +78611,143 @@ static PyObject *py_lv_display_flush_is_last_struct_method(PyObject *self, PyObj lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_flush_is_last)(disp); + ((void (*)(lv_display_t *))lv_display_delete_refr_timer)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_flush_is_last_struct_method_def = { - "lv_display_flush_is_last", - (PyCFunction)py_lv_display_flush_is_last_struct_method, +static PyMethodDef py_lv_display_delete_refr_timer_struct_method_def = { + "lv_display_delete_refr_timer", + (PyCFunction)py_lv_display_delete_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_display_register_vsync_event_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_register_vsync_event_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * void lv_display_sync_ready(lv_display_t *disp) + * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static PyObject *py_lv_display_sync_ready_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_register_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_register_vsync_event_event_cb_callback, "lv_display_register_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_sync_ready)(disp); + _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_register_vsync_event)(disp, event_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_sync_ready_struct_method_def = { - "lv_display_sync_ready", - (PyCFunction)py_lv_display_sync_ready_struct_method, +static PyMethodDef py_lv_display_register_vsync_event_struct_method_def = { + "lv_display_register_vsync_event", + (PyCFunction)py_lv_display_register_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_display_unregister_vsync_event_event_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) + */ +static void lv_display_unregister_vsync_event_event_cb_callback(lv_event_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_unregister_vsync_event_event_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * bool lv_display_sync_is_last(lv_display_t *disp) + * bool lv_display_unregister_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) */ -static PyObject *py_lv_display_sync_is_last_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_unregister_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *event_cb_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *user_data = mp_to_ptr(user_data_py); + void *event_cb = mp_lv_callback(event_cb_py, &lv_display_unregister_vsync_event_event_cb_callback, "lv_display_unregister_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_sync_is_last)(disp); + _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_unregister_vsync_event)(disp, event_cb, user_data); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_display_sync_is_last_struct_method_def = { - "lv_display_sync_is_last", - (PyCFunction)py_lv_display_sync_is_last_struct_method, +static PyMethodDef py_lv_display_unregister_vsync_event_struct_method_def = { + "lv_display_unregister_vsync_event", + (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84173,28 +78755,30 @@ static PyMethodDef py_lv_display_sync_is_last_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_is_double_buffered(lv_display_t *disp) + * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) */ -static PyObject *py_lv_display_is_double_buffered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_send_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "O", ¶m_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_result_t _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_is_double_buffered)(disp); + _res = ((lv_result_t (*)(lv_display_t *, void *))lv_display_send_vsync_event)(disp, param); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_is_double_buffered_struct_method_def = { - "lv_display_is_double_buffered", - (PyCFunction)py_lv_display_is_double_buffered_struct_method, +static PyMethodDef py_lv_display_send_vsync_event_struct_method_def = { + "lv_display_send_vsync_event", + (PyCFunction)py_lv_display_send_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84202,28 +78786,29 @@ static PyMethodDef py_lv_display_is_double_buffered_struct_method_def = { /* * lvgl extension definition for: - * lv_display_render_mode_t lv_display_get_render_mode(lv_display_t *disp) + * void lv_display_set_user_data(lv_display_t *disp, void *user_data) */ -static PyObject *py_lv_display_get_render_mode_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_display_render_mode_t _res; lvpy_lock(); - _res = ((lv_display_render_mode_t (*)(lv_display_t *))lv_display_get_render_mode)(disp); + ((void (*)(lv_display_t *, void *))lv_display_set_user_data)(disp, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_render_mode_struct_method_def = { - "lv_display_get_render_mode", - (PyCFunction)py_lv_display_get_render_mode_struct_method, +static PyMethodDef py_lv_display_set_user_data_struct_method_def = { + "lv_display_set_user_data", + (PyCFunction)py_lv_display_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84231,28 +78816,29 @@ static PyMethodDef py_lv_display_get_render_mode_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_active(lv_display_t *disp) + * void lv_display_set_driver_data(lv_display_t *disp, void *driver_data) */ -static PyObject *py_lv_display_get_screen_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *driver_data_py; + if (!PyArg_ParseTuple(py_args, "O", &driver_data_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + void *driver_data = mp_to_ptr(driver_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_active)(disp); + ((void (*)(lv_display_t *, void *))lv_display_set_driver_data)(disp, driver_data); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_screen_active_struct_method_def = { - "lv_display_get_screen_active", - (PyCFunction)py_lv_display_get_screen_active_struct_method, +static PyMethodDef py_lv_display_set_driver_data_struct_method_def = { + "lv_display_set_driver_data", + (PyCFunction)py_lv_display_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84260,9 +78846,9 @@ static PyMethodDef py_lv_display_get_screen_active_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_prev(lv_display_t *disp) + * void *lv_display_get_user_data(lv_display_t *disp) */ -static PyObject *py_lv_display_get_screen_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84270,18 +78856,18 @@ static PyObject *py_lv_display_get_screen_prev_struct_method(PyObject *self, PyO lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_prev)(disp); + _res = ((void *(*)(lv_display_t *))lv_display_get_user_data)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_screen_prev_struct_method_def = { - "lv_display_get_screen_prev", - (PyCFunction)py_lv_display_get_screen_prev_struct_method, +static PyMethodDef py_lv_display_get_user_data_struct_method_def = { + "lv_display_get_user_data", + (PyCFunction)py_lv_display_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84289,9 +78875,9 @@ static PyMethodDef py_lv_display_get_screen_prev_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_screen_loading(lv_display_t *disp) + * void *lv_display_get_driver_data(lv_display_t *disp) */ -static PyObject *py_lv_display_get_screen_loading_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84299,18 +78885,18 @@ static PyObject *py_lv_display_get_screen_loading_struct_method(PyObject *self, lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_screen_loading)(disp); + _res = ((void *(*)(lv_display_t *))lv_display_get_driver_data)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_display_get_screen_loading_struct_method_def = { - "lv_display_get_screen_loading", - (PyCFunction)py_lv_display_get_screen_loading_struct_method, +static PyMethodDef py_lv_display_get_driver_data_struct_method_def = { + "lv_display_get_driver_data", + (PyCFunction)py_lv_display_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84318,9 +78904,9 @@ static PyMethodDef py_lv_display_get_screen_loading_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_layer_top(lv_display_t *disp) + * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) */ -static PyObject *py_lv_display_get_layer_top_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_buf_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84328,18 +78914,18 @@ static PyObject *py_lv_display_get_layer_top_struct_method(PyObject *self, PyObj lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_top)(disp); + _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_display_get_buf_active)(disp); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_get_layer_top_struct_method_def = { - "lv_display_get_layer_top", - (PyCFunction)py_lv_display_get_layer_top_struct_method, +static PyMethodDef py_lv_display_get_buf_active_struct_method_def = { + "lv_display_get_buf_active", + (PyCFunction)py_lv_display_get_buf_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84347,28 +78933,29 @@ static PyMethodDef py_lv_display_get_layer_top_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_layer_sys(lv_display_t *disp) + * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) */ -static PyObject *py_lv_display_get_layer_sys_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_rotate_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_sys)(disp); + ((void (*)(lv_display_t *, lv_area_t *))lv_display_rotate_area)(disp, area); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_layer_sys_struct_method_def = { - "lv_display_get_layer_sys", - (PyCFunction)py_lv_display_get_layer_sys_struct_method, +static PyMethodDef py_lv_display_rotate_area_struct_method_def = { + "lv_display_rotate_area", + (PyCFunction)py_lv_display_rotate_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84376,92 +78963,59 @@ static PyMethodDef py_lv_display_get_layer_sys_struct_method_def = { /* * lvgl extension definition for: - * lv_obj_t *lv_display_get_layer_bottom(lv_display_t *disp) + * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) */ -static PyObject *py_lv_display_get_layer_bottom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_rotate_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_obj_t * _res; lvpy_lock(); - _res = ((lv_obj_t *(*)(lv_display_t *))lv_display_get_layer_bottom)(disp); + ((void (*)(lv_display_t *, lv_point_t *))lv_display_rotate_point)(disp, point); lvpy_unlock(); PyGILState_Release(gstate); - return lv_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_layer_bottom_struct_method_def = { - "lv_display_get_layer_bottom", - (PyCFunction)py_lv_display_get_layer_bottom_struct_method, +static PyMethodDef py_lv_display_rotate_point_struct_method_def = { + "lv_display_rotate_point", + (PyCFunction)py_lv_display_rotate_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_add_event_cb_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_display_add_event_cb_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_add_event_cb_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * lv_event_dsc_t *lv_display_add_event_cb(lv_display_t *disp, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data) + * void lv_display_rotate_point_ccw(lv_display_t *disp, lv_point_t *point) */ -static PyObject *py_lv_display_add_event_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_rotate_point_ccw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *filter_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &event_cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *point_py; + if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - lv_event_code_t filter = (int)mp_obj_get_int(filter_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_add_event_cb_event_cb_callback, "lv_display_add_event_cb_event_cb", &user_data, NULL, (NULL), (NULL)); + lv_point_t *point = mp_write_ptr_lv_point_t(point_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_display_t *, lv_event_cb_t, lv_event_code_t, void *))lv_display_add_event_cb)(disp, event_cb, filter, user_data); + ((void (*)(lv_display_t *, lv_point_t *))lv_display_rotate_point_ccw)(disp, point); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_add_event_cb_struct_method_def = { - "lv_display_add_event_cb", - (PyCFunction)py_lv_display_add_event_cb_struct_method, +static PyMethodDef py_lv_display_rotate_point_ccw_struct_method_def = { + "lv_display_rotate_point_ccw", + (PyCFunction)py_lv_display_rotate_point_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84469,9 +79023,9 @@ static PyMethodDef py_lv_display_add_event_cb_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_event_count(lv_display_t *disp) + * uint32_t lv_display_get_draw_buf_size(lv_display_t *disp) */ -static PyObject *py_lv_display_get_event_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -84481,16 +79035,16 @@ static PyObject *py_lv_display_get_event_count_struct_method(PyObject *self, PyO uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *))lv_display_get_event_count)(disp); + _res = ((uint32_t (*)(lv_display_t *))lv_display_get_draw_buf_size)(disp); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_event_count_struct_method_def = { - "lv_display_get_event_count", - (PyCFunction)py_lv_display_get_event_count_struct_method, +static PyMethodDef py_lv_display_get_draw_buf_size_struct_method_def = { + "lv_display_get_draw_buf_size", + (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84498,30 +79052,31 @@ static PyMethodDef py_lv_display_get_event_count_struct_method_def = { /* * lvgl extension definition for: - * lv_event_dsc_t *lv_display_get_event_dsc(lv_display_t *disp, uint32_t index) + * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) */ -static PyObject *py_lv_display_get_event_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_get_invalidated_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + long width_val; long height_val; + if (!PyArg_ParseTuple(py_args, "ll", &width_val, &height_val)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t index = (uint32_t)index_val; + uint32_t width = (uint32_t)width_val; + uint32_t height = (uint32_t)height_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; + uint32_t _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_display_t *, uint32_t))lv_display_get_event_dsc)(disp, index); + _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_display_get_invalidated_draw_buf_size)(disp, width, height); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_get_event_dsc_struct_method_def = { - "lv_display_get_event_dsc", - (PyCFunction)py_lv_display_get_event_dsc_struct_method, +static PyMethodDef py_lv_display_get_invalidated_draw_buf_size_struct_method_def = { + "lv_display_get_invalidated_draw_buf_size", + (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84529,93 +79084,61 @@ static PyMethodDef py_lv_display_get_event_dsc_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_remove_event(lv_display_t *disp, uint32_t index) + * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) */ -static PyObject *py_lv_display_remove_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_dpx_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t index = (uint32_t)index_val; + long n_val; + if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } + const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + int32_t n = (int32_t)n_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + int32_t _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, uint32_t))lv_display_remove_event)(disp, index); + _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_display_dpx)(disp, n); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_remove_event_struct_method_def = { - "lv_display_remove_event", - (PyCFunction)py_lv_display_remove_event_struct_method, +static PyMethodDef py_lv_display_dpx_struct_method_def = { + "lv_display_dpx", + (PyCFunction)py_lv_display_dpx_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_remove_event_cb_with_user_data_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_display_remove_event_cb_with_user_data_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_remove_event_cb_with_user_data_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * uint32_t lv_display_remove_event_cb_with_user_data(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) */ -static PyObject *py_lv_display_remove_event_cb_with_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_dispatch_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_remove_event_cb_with_user_data_event_cb_callback, "lv_display_remove_event_cb_with_user_data_event_cb", &user_data, NULL, (NULL), (NULL)); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_remove_event_cb_with_user_data)(disp, event_cb, user_data); + _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_draw_dispatch_layer)(disp, layer); lvpy_unlock(); - if (_res > 0) lvpy_release_callback_user_data(user_data); + PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_remove_event_cb_with_user_data_struct_method_def = { - "lv_display_remove_event_cb_with_user_data", - (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, +static PyMethodDef py_lv_draw_dispatch_layer_struct_method_def = { + "lv_draw_dispatch_layer", + (PyCFunction)py_lv_draw_dispatch_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84623,61 +79146,142 @@ static PyMethodDef py_lv_display_remove_event_cb_with_user_data_struct_method_de /* * lvgl extension definition for: - * lv_result_t lv_display_send_event(lv_display_t *disp, lv_event_code_t code, void *param) + * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) */ -static PyObject *py_lv_display_send_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_display_set_draw_buf_handlers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *code_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OO", &code_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *handlers_py; + if (!PyArg_ParseTuple(py_args, "O", &handlers_py)) { PyGILState_Release(gstate); return NULL; } lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_event_code_t code = (int)mp_obj_get_int(code_py); - void *param = mp_to_ptr(param_py); + const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(handlers_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_display_t *, lv_event_code_t, void *))lv_display_send_event)(disp, code, param); + ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_display_set_draw_buf_handlers)(disp, handlers); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_send_event_struct_method_def = { - "lv_display_send_event", - (PyCFunction)py_lv_display_send_event_struct_method, +static PyMethodDef py_lv_display_set_draw_buf_handlers_struct_method_def = { + "lv_display_set_draw_buf_handlers", + (PyCFunction)py_lv_display_set_draw_buf_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_display_t_methods[] = { + {"delete", (PyCFunction)py_lv_display_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_default", (PyCFunction)py_lv_display_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_next", (PyCFunction)py_lv_display_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_resolution", (PyCFunction)py_lv_display_set_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_physical_resolution", (PyCFunction)py_lv_display_set_physical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_offset", (PyCFunction)py_lv_display_set_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_rotation", (PyCFunction)py_lv_display_set_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_matrix_rotation", (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_dpi", (PyCFunction)py_lv_display_set_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_horizontal_resolution", (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_vertical_resolution", (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_original_horizontal_resolution", (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_original_vertical_resolution", (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_physical_horizontal_resolution", (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_physical_vertical_resolution", (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_offset_x", (PyCFunction)py_lv_display_get_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_offset_y", (PyCFunction)py_lv_display_get_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_rotation", (PyCFunction)py_lv_display_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_matrix_rotation", (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dpi", (PyCFunction)py_lv_display_get_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_buffers", (PyCFunction)py_lv_display_set_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_buffers_with_stride", (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_draw_buffers", (PyCFunction)py_lv_display_set_draw_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_3rd_draw_buffer", (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_render_mode", (PyCFunction)py_lv_display_set_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flush_cb", (PyCFunction)py_lv_display_set_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_flush_cb", (PyCFunction)py_lv_display_get_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flush_wait_cb", (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_sync_cb", (PyCFunction)py_lv_display_set_sync_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_sync_wait_cb", (PyCFunction)py_lv_display_set_sync_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_color_format", (PyCFunction)py_lv_display_set_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_color_format", (PyCFunction)py_lv_display_get_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_tile_cnt", (PyCFunction)py_lv_display_set_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tile_cnt", (PyCFunction)py_lv_display_get_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_antialiasing", (PyCFunction)py_lv_display_set_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_antialiasing", (PyCFunction)py_lv_display_get_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"flush_ready", (PyCFunction)py_lv_display_flush_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"flush_is_last", (PyCFunction)py_lv_display_flush_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sync_ready", (PyCFunction)py_lv_display_sync_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sync_is_last", (PyCFunction)py_lv_display_sync_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_double_buffered", (PyCFunction)py_lv_display_is_double_buffered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_render_mode", (PyCFunction)py_lv_display_get_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_screen_active", (PyCFunction)py_lv_display_get_screen_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_screen_prev", (PyCFunction)py_lv_display_get_screen_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_screen_loading", (PyCFunction)py_lv_display_get_screen_loading_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer_top", (PyCFunction)py_lv_display_get_layer_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer_sys", (PyCFunction)py_lv_display_get_layer_sys_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_layer_bottom", (PyCFunction)py_lv_display_get_layer_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add_event_cb", (PyCFunction)py_lv_display_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_event_count", (PyCFunction)py_lv_display_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_event_dsc", (PyCFunction)py_lv_display_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_event", (PyCFunction)py_lv_display_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_event_cb_with_user_data", (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"send_event", (PyCFunction)py_lv_display_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_theme", (PyCFunction)py_lv_display_set_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_theme", (PyCFunction)py_lv_display_get_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_inactive_time", (PyCFunction)py_lv_display_get_inactive_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"trigger_activity", (PyCFunction)py_lv_display_trigger_activity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"enable_invalidation", (PyCFunction)py_lv_display_enable_invalidation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_invalidation_enabled", (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_refr_timer", (PyCFunction)py_lv_display_get_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete_refr_timer", (PyCFunction)py_lv_display_delete_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"register_vsync_event", (PyCFunction)py_lv_display_register_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"unregister_vsync_event", (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"send_vsync_event", (PyCFunction)py_lv_display_send_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_display_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_driver_data", (PyCFunction)py_lv_display_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_display_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_driver_data", (PyCFunction)py_lv_display_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_buf_active", (PyCFunction)py_lv_display_get_buf_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"rotate_area", (PyCFunction)py_lv_display_rotate_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"rotate_point", (PyCFunction)py_lv_display_rotate_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"rotate_point_ccw", (PyCFunction)py_lv_display_rotate_point_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_draw_buf_size", (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_invalidated_draw_buf_size", (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dpx", (PyCFunction)py_lv_display_dpx_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"draw_dispatch_layer", (PyCFunction)py_lv_draw_dispatch_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_draw_buf_handlers", (PyCFunction)py_lv_display_set_draw_buf_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_display_set_theme(lv_display_t *disp, lv_theme_t *th) + * void lv_draw_buf_invalidate_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ -static PyObject *py_lv_display_set_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_invalidate_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *th_py; - if (!PyArg_ParseTuple(py_args, "O", &th_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_theme_t *th = mp_write_ptr_lv_theme_t(th_py); + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_theme_t *))lv_display_set_theme)(disp, th); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_invalidate_cache)(draw_buf, area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_theme_struct_method_def = { - "lv_display_set_theme", - (PyCFunction)py_lv_display_set_theme_struct_method, +static PyMethodDef py_lv_draw_buf_invalidate_cache_struct_method_def = { + "lv_draw_buf_invalidate_cache", + (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84685,28 +79289,29 @@ static PyMethodDef py_lv_display_set_theme_struct_method_def = { /* * lvgl extension definition for: - * lv_theme_t *lv_display_get_theme(lv_display_t *disp) + * void lv_draw_buf_flush_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) */ -static PyObject *py_lv_display_get_theme_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_flush_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_theme_t * _res; lvpy_lock(); - _res = ((lv_theme_t *(*)(lv_display_t *))lv_display_get_theme)(disp); + ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_flush_cache)(draw_buf, area); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_theme_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_theme_struct_method_def = { - "lv_display_get_theme", - (PyCFunction)py_lv_display_get_theme_struct_method, +static PyMethodDef py_lv_draw_buf_flush_cache_struct_method_def = { + "lv_draw_buf_flush_cache", + (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84714,28 +79319,29 @@ static PyMethodDef py_lv_display_get_theme_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_inactive_time(const lv_display_t *disp) + * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) */ -static PyObject *py_lv_display_get_inactive_time_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *a_py; + if (!PyArg_ParseTuple(py_args, "O", &a_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(a_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_display_t *))lv_display_get_inactive_time)(disp); + ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_clear)(draw_buf, a); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_inactive_time_struct_method_def = { - "lv_display_get_inactive_time", - (PyCFunction)py_lv_display_get_inactive_time_struct_method, +static PyMethodDef py_lv_draw_buf_clear_struct_method_def = { + "lv_draw_buf_clear", + (PyCFunction)py_lv_draw_buf_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84743,27 +79349,28 @@ static PyMethodDef py_lv_display_get_inactive_time_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_trigger_activity(lv_display_t *disp) + * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_trigger_activity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_dup_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t * _res; lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_trigger_activity)(disp); + _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_draw_buf_dup)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_trigger_activity_struct_method_def = { - "lv_display_trigger_activity", - (PyCFunction)py_lv_display_trigger_activity_struct_method, +static PyMethodDef py_lv_draw_buf_dup_struct_method_def = { + "lv_draw_buf_dup", + (PyCFunction)py_lv_draw_buf_dup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84771,29 +79378,35 @@ static PyMethodDef py_lv_display_trigger_activity_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_enable_invalidation(lv_display_t *disp, bool en) + * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) */ -static PyObject *py_lv_display_enable_invalidation_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long en_val; - if (!PyArg_ParseTuple(py_args, "l", &en_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - bool en = (en_val != 0); + long w_val; long h_val; PyObject *cf_py; long stride_val; PyObject *data_py; long data_size_val; + if (!PyArg_ParseTuple(py_args, "llOlOl", &w_val, &h_val, &cf_py, &stride_val, &data_py, &data_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t stride = (uint32_t)stride_val; + void *data = mp_to_ptr(data_py); + uint32_t data_size = (uint32_t)data_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, bool))lv_display_enable_invalidation)(disp, en); + _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_draw_buf_init)(draw_buf, w, h, cf, stride, data, data_size); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_enable_invalidation_struct_method_def = { - "lv_display_enable_invalidation", - (PyCFunction)py_lv_display_enable_invalidation_struct_method, +static PyMethodDef py_lv_draw_buf_init_struct_method_def = { + "lv_draw_buf_init", + (PyCFunction)py_lv_draw_buf_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84801,28 +79414,33 @@ static PyMethodDef py_lv_display_enable_invalidation_struct_method_def = { /* * lvgl extension definition for: - * bool lv_display_is_invalidation_enabled(lv_display_t *disp) + * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) */ -static PyObject *py_lv_display_is_invalidation_enabled_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_reshape_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *cf_py; long w_val; long h_val; long stride_val; + if (!PyArg_ParseTuple(py_args, "Olll", &cf_py, &w_val, &h_val, &stride_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_draw_buf_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *))lv_display_is_invalidation_enabled)(disp); + _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_draw_buf_reshape)(draw_buf, cf, w, h, stride); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_display_is_invalidation_enabled_struct_method_def = { - "lv_display_is_invalidation_enabled", - (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, +static PyMethodDef py_lv_draw_buf_reshape_struct_method_def = { + "lv_draw_buf_reshape", + (PyCFunction)py_lv_draw_buf_reshape_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84830,28 +79448,27 @@ static PyMethodDef py_lv_display_is_invalidation_enabled_struct_method_def = { /* * lvgl extension definition for: - * lv_timer_t *lv_display_get_refr_timer(lv_display_t *disp) + * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_get_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_timer_t * _res; lvpy_lock(); - _res = ((lv_timer_t *(*)(lv_display_t *))lv_display_get_refr_timer)(disp); + ((void (*)(lv_draw_buf_t *))lv_draw_buf_destroy)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_timer_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_refr_timer_struct_method_def = { - "lv_display_get_refr_timer", - (PyCFunction)py_lv_display_get_refr_timer_struct_method, +static PyMethodDef py_lv_draw_buf_destroy_struct_method_def = { + "lv_draw_buf_destroy", + (PyCFunction)py_lv_draw_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -84859,153 +79476,126 @@ static PyMethodDef py_lv_display_get_refr_timer_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_delete_refr_timer(lv_display_t *disp) + * void lv_draw_buf_copy(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) */ -static PyObject *py_lv_display_delete_refr_timer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *dest_area_py; PyObject *src_py; PyObject *src_area_py; + if (!PyArg_ParseTuple(py_args, "OOO", &dest_area_py, &src_py, &src_area_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *dest = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); + const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(src_py); + const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(src_area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *))lv_display_delete_refr_timer)(disp); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_copy)(dest, dest_area, src, src_area); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_delete_refr_timer_struct_method_def = { - "lv_display_delete_refr_timer", - (PyCFunction)py_lv_display_delete_refr_timer_struct_method, +static PyMethodDef py_lv_draw_buf_copy_struct_method_def = { + "lv_draw_buf_copy", + (PyCFunction)py_lv_draw_buf_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_display_register_vsync_event_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static void lv_display_register_vsync_event_event_cb_callback(lv_event_t *arg0) +static PyObject *py_lv_draw_buf_goto_xy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_register_vsync_event_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t x = (uint32_t)x_val; + uint32_t y = (uint32_t)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + void * _res; + lvpy_lock(); + _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_draw_buf_goto_xy)(buf, x, y); + lvpy_unlock(); + PyGILState_Release(gstate); + return ptr_to_mp((void*)_res); } +static PyMethodDef py_lv_draw_buf_goto_xy_struct_method_def = { + "lv_draw_buf_goto_xy", + (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * bool lv_display_register_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) */ -static PyObject *py_lv_display_register_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_is_position_valid_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_register_vsync_event_event_cb_callback, "lv_display_register_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t x = (uint32_t)x_val; + uint32_t y = (uint32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_register_vsync_event)(disp, event_cb, user_data); + _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_draw_buf_is_position_valid)(buf, x, y); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_display_register_vsync_event_struct_method_def = { - "lv_display_register_vsync_event", - (PyCFunction)py_lv_display_register_vsync_event_struct_method, +static PyMethodDef py_lv_draw_buf_is_position_valid_struct_method_def = { + "lv_draw_buf_is_position_valid", + (PyCFunction)py_lv_draw_buf_is_position_valid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_display_unregister_vsync_event_event_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) - */ -static void lv_display_unregister_vsync_event_event_cb_callback(lv_event_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_display_unregister_vsync_event_event_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * bool lv_display_unregister_vsync_event(lv_display_t *disp, lv_event_cb_t event_cb, void *user_data) + * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) */ -static PyObject *py_lv_display_unregister_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_adjust_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *event_cb_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OO", &event_cb_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); - void *event_cb = mp_lv_callback(event_cb_py, &lv_display_unregister_vsync_event_event_cb_callback, "lv_display_unregister_vsync_event_event_cb", &user_data, NULL, (NULL), (NULL)); + long stride_val; + if (!PyArg_ParseTuple(py_args, "l", &stride_val)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *src = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_result_t _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, lv_event_cb_t, void *))lv_display_unregister_vsync_event)(disp, event_cb, user_data); + _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_draw_buf_adjust_stride)(src, stride); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_unregister_vsync_event_struct_method_def = { - "lv_display_unregister_vsync_event", - (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, +static PyMethodDef py_lv_draw_buf_adjust_stride_struct_method_def = { + "lv_draw_buf_adjust_stride", + (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85013,30 +79603,28 @@ static PyMethodDef py_lv_display_unregister_vsync_event_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_display_send_vsync_event(lv_display_t *disp, void *param) + * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_send_vsync_event_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "O", ¶m_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *param = mp_to_ptr(param_py); + + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_display_t *, void *))lv_display_send_vsync_event)(disp, param); + _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_draw_buf_premultiply)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_send_vsync_event_struct_method_def = { - "lv_display_send_vsync_event", - (PyCFunction)py_lv_display_send_vsync_event_struct_method, +static PyMethodDef py_lv_draw_buf_premultiply_struct_method_def = { + "lv_draw_buf_premultiply", + (PyCFunction)py_lv_draw_buf_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85044,29 +79632,30 @@ static PyMethodDef py_lv_display_send_vsync_event_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_user_data(lv_display_t *disp, void *user_data) + * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static PyObject *py_lv_display_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_has_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *user_data = mp_to_ptr(user_data_py); + PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_display_t *, void *))lv_display_set_user_data)(disp, user_data); + _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_has_flag)(draw_buf, flag); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_display_set_user_data_struct_method_def = { - "lv_display_set_user_data", - (PyCFunction)py_lv_display_set_user_data_struct_method, +static PyMethodDef py_lv_draw_buf_has_flag_struct_method_def = { + "lv_draw_buf_has_flag", + (PyCFunction)py_lv_draw_buf_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85074,29 +79663,29 @@ static PyMethodDef py_lv_display_set_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_driver_data(lv_display_t *disp, void *driver_data) + * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static PyObject *py_lv_display_set_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_set_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *driver_data_py; - if (!PyArg_ParseTuple(py_args, "O", &driver_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - void *driver_data = mp_to_ptr(driver_data_py); + PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, void *))lv_display_set_driver_data)(disp, driver_data); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_set_flag)(draw_buf, flag); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_set_driver_data_struct_method_def = { - "lv_display_set_driver_data", - (PyCFunction)py_lv_display_set_driver_data_struct_method, +static PyMethodDef py_lv_draw_buf_set_flag_struct_method_def = { + "lv_draw_buf_set_flag", + (PyCFunction)py_lv_draw_buf_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85104,28 +79693,29 @@ static PyMethodDef py_lv_display_set_driver_data_struct_method_def = { /* * lvgl extension definition for: - * void *lv_display_get_user_data(lv_display_t *disp) + * void lv_draw_buf_clear_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) */ -static PyObject *py_lv_display_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_clear_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *flag_py; + if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_display_t *))lv_display_get_user_data)(disp); + ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_clear_flag)(draw_buf, flag); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_user_data_struct_method_def = { - "lv_display_get_user_data", - (PyCFunction)py_lv_display_get_user_data_struct_method, +static PyMethodDef py_lv_draw_buf_clear_flag_struct_method_def = { + "lv_draw_buf_clear_flag", + (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85133,28 +79723,30 @@ static PyMethodDef py_lv_display_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * void *lv_display_get_driver_data(lv_display_t *disp) + * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) */ -static PyObject *py_lv_display_get_driver_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_from_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *img_py; + if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(img_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_result_t _res; lvpy_lock(); - _res = ((void *(*)(lv_display_t *))lv_display_get_driver_data)(disp); + _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_draw_buf_from_image)(buf, img); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_driver_data_struct_method_def = { - "lv_display_get_driver_data", - (PyCFunction)py_lv_display_get_driver_data_struct_method, +static PyMethodDef py_lv_draw_buf_from_image_struct_method_def = { + "lv_draw_buf_from_image", + (PyCFunction)py_lv_draw_buf_from_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85162,28 +79754,29 @@ static PyMethodDef py_lv_display_get_driver_data_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_display_get_buf_active(lv_display_t *disp) + * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) */ -static PyObject *py_lv_display_get_buf_active_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_to_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *img_py; + if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(img_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_display_t *))lv_display_get_buf_active)(disp); + ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_draw_buf_to_image)(buf, img); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_buf_active_struct_method_def = { - "lv_display_get_buf_active", - (PyCFunction)py_lv_display_get_buf_active_struct_method, +static PyMethodDef py_lv_draw_buf_to_image_struct_method_def = { + "lv_draw_buf_to_image", + (PyCFunction)py_lv_draw_buf_to_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85191,29 +79784,30 @@ static PyMethodDef py_lv_display_get_buf_active_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_rotate_area(lv_display_t *disp, lv_area_t *area) + * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) */ -static PyObject *py_lv_display_rotate_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_set_palette_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + long index_val; PyObject *color_py; + if (!PyArg_ParseTuple(py_args, "lO", &index_val, &color_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + uint8_t index = (uint8_t)index_val; + lv_color32_t color = mp_write_lv_color32_t(color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_area_t *))lv_display_rotate_area)(disp, area); + ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_draw_buf_set_palette)(draw_buf, index, color); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_rotate_area_struct_method_def = { - "lv_display_rotate_area", - (PyCFunction)py_lv_display_rotate_area_struct_method, +static PyMethodDef py_lv_draw_buf_set_palette_struct_method_def = { + "lv_draw_buf_set_palette", + (PyCFunction)py_lv_draw_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85221,29 +79815,30 @@ static PyMethodDef py_lv_display_rotate_area_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_rotate_point(lv_display_t *disp, lv_point_t *point) + * void lv_draw_buf_clear_ex(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) */ -static PyObject *py_lv_display_rotate_point_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_clear_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + PyObject *a_py; PyObject *layer_py; + if (!PyArg_ParseTuple(py_args, "OO", &a_py, &layer_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(a_py); + lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_display_t *, lv_point_t *))lv_display_rotate_point)(disp, point); + ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_draw_buf_clear_ex)(draw_buf, a, layer); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_display_rotate_point_struct_method_def = { - "lv_display_rotate_point", - (PyCFunction)py_lv_display_rotate_point_struct_method, +static PyMethodDef py_lv_draw_buf_clear_ex_struct_method_def = { + "lv_draw_buf_clear_ex", + (PyCFunction)py_lv_draw_buf_clear_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85251,29 +79846,28 @@ static PyMethodDef py_lv_display_rotate_point_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_rotate_point_ccw(lv_display_t *disp, lv_point_t *point) + * lv_result_t lv_draw_buf_convert_premultiply(lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_display_rotate_point_ccw_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_convert_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *point_py; - if (!PyArg_ParseTuple(py_args, "O", &point_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_point_t *point = mp_write_ptr_lv_point_t(point_py); + + lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, lv_point_t *))lv_display_rotate_point_ccw)(disp, point); + _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_draw_buf_convert_premultiply)(draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_rotate_point_ccw_struct_method_def = { - "lv_display_rotate_point_ccw", - (PyCFunction)py_lv_display_rotate_point_ccw_struct_method, +static PyMethodDef py_lv_draw_buf_convert_premultiply_struct_method_def = { + "lv_draw_buf_convert_premultiply", + (PyCFunction)py_lv_draw_buf_convert_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85281,91 +79875,170 @@ static PyMethodDef py_lv_display_rotate_point_ccw_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_display_get_draw_buf_size(lv_display_t *disp) + * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) */ -static PyObject *py_lv_display_get_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_save_to_file_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); + PyObject *path_py; + if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const char *path = (const char *)(char*)convert_from_str(path_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *))lv_display_get_draw_buf_size)(disp); + _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_draw_buf_save_to_file)(draw_buf, path); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_display_get_draw_buf_size_struct_method_def = { - "lv_display_get_draw_buf_size", - (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, +static PyMethodDef py_lv_draw_buf_save_to_file_struct_method_def = { + "lv_draw_buf_save_to_file", + (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_buf_t_methods[] = { + {"invalidate_cache", (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"flush_cache", (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear", (PyCFunction)py_lv_draw_buf_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dup", (PyCFunction)py_lv_draw_buf_dup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_draw_buf_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reshape", (PyCFunction)py_lv_draw_buf_reshape_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"destroy", (PyCFunction)py_lv_draw_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy", (PyCFunction)py_lv_draw_buf_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"goto_xy", (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_position_valid", (PyCFunction)py_lv_draw_buf_is_position_valid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"adjust_stride", (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"premultiply", (PyCFunction)py_lv_draw_buf_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_flag", (PyCFunction)py_lv_draw_buf_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_flag", (PyCFunction)py_lv_draw_buf_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_flag", (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"from_image", (PyCFunction)py_lv_draw_buf_from_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_image", (PyCFunction)py_lv_draw_buf_to_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_palette", (PyCFunction)py_lv_draw_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_ex", (PyCFunction)py_lv_draw_buf_clear_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"convert_premultiply", (PyCFunction)py_lv_draw_buf_convert_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"save_to_file", (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_image_header_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * uint32_t lv_display_get_invalidated_draw_buf_size(lv_display_t *disp, uint32_t width, uint32_t height) + * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) */ -static PyObject *py_lv_display_get_invalidated_draw_buf_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_init_with_default_handlers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long width_val; long height_val; - if (!PyArg_ParseTuple(py_args, "ll", &width_val, &height_val)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - uint32_t width = (uint32_t)width_val; - uint32_t height = (uint32_t)height_val; + + lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_display_t *, uint32_t, uint32_t))lv_display_get_invalidated_draw_buf_size)(disp, width, height); + ((void (*)(lv_draw_buf_handlers_t *))lv_draw_buf_init_with_default_handlers)(handlers); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_get_invalidated_draw_buf_size_struct_method_def = { - "lv_display_get_invalidated_draw_buf_size", - (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, +static PyMethodDef py_lv_draw_buf_init_with_default_handlers_struct_method_def = { + "lv_draw_buf_init_with_default_handlers", + (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) + * lv_draw_buf_malloc_cb_t buf_malloc_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_free_cb_t(void *draw_buf) + * lv_draw_buf_free_cb_t buf_free_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * lv_draw_buf_copy_cb_t buf_copy_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) + * lv_draw_buf_align_cb_t align_pointer_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * lv_draw_buf_cache_operation_cb_t flush_cache_cb + */ + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) + * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb + */ + + /* * lvgl extension definition for: - * int32_t lv_display_dpx(const lv_display_t *disp, int32_t n) + * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) */ -static PyObject *py_lv_display_dpx_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_handlers_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long n_val; - if (!PyArg_ParseTuple(py_args, "l", &n_val)) { PyGILState_Release(gstate); return NULL; } - const lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - int32_t n = (int32_t)n_val; + PyObject *buf_malloc_cb_py; PyObject *buf_free_cb_py; PyObject *buf_copy_cb_py; PyObject *align_pointer_cb_py; PyObject *invalidate_cache_cb_py; PyObject *flush_cache_cb_py; PyObject *width_to_stride_cb_py; + if (!PyArg_ParseTuple(py_args, "OOOOOOO", &buf_malloc_cb_py, &buf_free_cb_py, &buf_copy_cb_py, &align_pointer_cb_py, &invalidate_cache_cb_py, &flush_cache_cb_py, &width_to_stride_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + void *buf_malloc_cb = NULL; + void *buf_free_cb = NULL; + void *buf_copy_cb = NULL; + void *align_pointer_cb = NULL; + void *invalidate_cache_cb = NULL; + void *flush_cache_cb = NULL; + void *width_to_stride_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_display_t *, int32_t))lv_display_dpx)(disp, n); + ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_draw_buf_handlers_init)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_display_dpx_struct_method_def = { - "lv_display_dpx", - (PyCFunction)py_lv_display_dpx_struct_method, +static PyMethodDef py_lv_draw_buf_handlers_init_struct_method_def = { + "lv_draw_buf_handlers_init", + (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85373,30 +80046,31 @@ static PyMethodDef py_lv_display_dpx_struct_method_def = { /* * lvgl extension definition for: - * bool lv_draw_dispatch_layer(lv_display_t *disp, lv_layer_t *layer) + * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) */ -static PyObject *py_lv_draw_dispatch_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_align_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "O", &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + PyObject *buf_py; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + void *buf = mp_to_ptr(buf_py); + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + void * _res; lvpy_lock(); - _res = ((bool (*)(lv_display_t *, lv_layer_t *))lv_draw_dispatch_layer)(disp, layer); + _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_draw_buf_align_ex)(handlers, buf, color_format); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_dispatch_layer_struct_method_def = { - "lv_draw_dispatch_layer", - (PyCFunction)py_lv_draw_dispatch_layer_struct_method, +static PyMethodDef py_lv_draw_buf_align_ex_struct_method_def = { + "lv_draw_buf_align_ex", + (PyCFunction)py_lv_draw_buf_align_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85404,142 +80078,65 @@ static PyMethodDef py_lv_draw_dispatch_layer_struct_method_def = { /* * lvgl extension definition for: - * void lv_display_set_draw_buf_handlers(lv_display_t *disp, const lv_draw_buf_handlers_t *handlers) + * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) */ -static PyObject *py_lv_display_set_draw_buf_handlers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_width_to_stride_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *handlers_py; - if (!PyArg_ParseTuple(py_args, "O", &handlers_py)) { PyGILState_Release(gstate); return NULL; } - lv_display_t *disp = (lv_display_t *)mp_write_ptr_lv_display_t(self); - const lv_draw_buf_handlers_t *handlers = (const lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(handlers_py); + long w_val; PyObject *color_format_py; + if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + uint32_t w = (uint32_t)w_val; + lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_display_t *, const lv_draw_buf_handlers_t *))lv_display_set_draw_buf_handlers)(disp, handlers); + _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride_ex)(handlers, w, color_format); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_display_set_draw_buf_handlers_struct_method_def = { - "lv_display_set_draw_buf_handlers", - (PyCFunction)py_lv_display_set_draw_buf_handlers_struct_method, +static PyMethodDef py_lv_draw_buf_width_to_stride_ex_struct_method_def = { + "lv_draw_buf_width_to_stride_ex", + (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_display_t_methods[] = { - {"delete", (PyCFunction)py_lv_display_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_default", (PyCFunction)py_lv_display_set_default_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_next", (PyCFunction)py_lv_display_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_resolution", (PyCFunction)py_lv_display_set_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_physical_resolution", (PyCFunction)py_lv_display_set_physical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_offset", (PyCFunction)py_lv_display_set_offset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_rotation", (PyCFunction)py_lv_display_set_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_matrix_rotation", (PyCFunction)py_lv_display_set_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_dpi", (PyCFunction)py_lv_display_set_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_horizontal_resolution", (PyCFunction)py_lv_display_get_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_vertical_resolution", (PyCFunction)py_lv_display_get_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_original_horizontal_resolution", (PyCFunction)py_lv_display_get_original_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_original_vertical_resolution", (PyCFunction)py_lv_display_get_original_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_physical_horizontal_resolution", (PyCFunction)py_lv_display_get_physical_horizontal_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_physical_vertical_resolution", (PyCFunction)py_lv_display_get_physical_vertical_resolution_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_offset_x", (PyCFunction)py_lv_display_get_offset_x_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_offset_y", (PyCFunction)py_lv_display_get_offset_y_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_rotation", (PyCFunction)py_lv_display_get_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_matrix_rotation", (PyCFunction)py_lv_display_get_matrix_rotation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dpi", (PyCFunction)py_lv_display_get_dpi_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_buffers", (PyCFunction)py_lv_display_set_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_buffers_with_stride", (PyCFunction)py_lv_display_set_buffers_with_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_draw_buffers", (PyCFunction)py_lv_display_set_draw_buffers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_3rd_draw_buffer", (PyCFunction)py_lv_display_set_3rd_draw_buffer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_render_mode", (PyCFunction)py_lv_display_set_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flush_cb", (PyCFunction)py_lv_display_set_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_flush_cb", (PyCFunction)py_lv_display_get_flush_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flush_wait_cb", (PyCFunction)py_lv_display_set_flush_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_sync_cb", (PyCFunction)py_lv_display_set_sync_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_sync_wait_cb", (PyCFunction)py_lv_display_set_sync_wait_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_color_format", (PyCFunction)py_lv_display_set_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_color_format", (PyCFunction)py_lv_display_get_color_format_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_tile_cnt", (PyCFunction)py_lv_display_set_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tile_cnt", (PyCFunction)py_lv_display_get_tile_cnt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_antialiasing", (PyCFunction)py_lv_display_set_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_antialiasing", (PyCFunction)py_lv_display_get_antialiasing_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"flush_ready", (PyCFunction)py_lv_display_flush_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"flush_is_last", (PyCFunction)py_lv_display_flush_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sync_ready", (PyCFunction)py_lv_display_sync_ready_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sync_is_last", (PyCFunction)py_lv_display_sync_is_last_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_double_buffered", (PyCFunction)py_lv_display_is_double_buffered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_render_mode", (PyCFunction)py_lv_display_get_render_mode_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_screen_active", (PyCFunction)py_lv_display_get_screen_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_screen_prev", (PyCFunction)py_lv_display_get_screen_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_screen_loading", (PyCFunction)py_lv_display_get_screen_loading_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer_top", (PyCFunction)py_lv_display_get_layer_top_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer_sys", (PyCFunction)py_lv_display_get_layer_sys_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_layer_bottom", (PyCFunction)py_lv_display_get_layer_bottom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add_event_cb", (PyCFunction)py_lv_display_add_event_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_event_count", (PyCFunction)py_lv_display_get_event_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_event_dsc", (PyCFunction)py_lv_display_get_event_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_event", (PyCFunction)py_lv_display_remove_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_event_cb_with_user_data", (PyCFunction)py_lv_display_remove_event_cb_with_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"send_event", (PyCFunction)py_lv_display_send_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_theme", (PyCFunction)py_lv_display_set_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_theme", (PyCFunction)py_lv_display_get_theme_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_inactive_time", (PyCFunction)py_lv_display_get_inactive_time_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"trigger_activity", (PyCFunction)py_lv_display_trigger_activity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"enable_invalidation", (PyCFunction)py_lv_display_enable_invalidation_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_invalidation_enabled", (PyCFunction)py_lv_display_is_invalidation_enabled_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_refr_timer", (PyCFunction)py_lv_display_get_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete_refr_timer", (PyCFunction)py_lv_display_delete_refr_timer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"register_vsync_event", (PyCFunction)py_lv_display_register_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"unregister_vsync_event", (PyCFunction)py_lv_display_unregister_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"send_vsync_event", (PyCFunction)py_lv_display_send_vsync_event_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_display_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_driver_data", (PyCFunction)py_lv_display_set_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_display_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_driver_data", (PyCFunction)py_lv_display_get_driver_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_buf_active", (PyCFunction)py_lv_display_get_buf_active_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"rotate_area", (PyCFunction)py_lv_display_rotate_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"rotate_point", (PyCFunction)py_lv_display_rotate_point_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"rotate_point_ccw", (PyCFunction)py_lv_display_rotate_point_ccw_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_draw_buf_size", (PyCFunction)py_lv_display_get_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_invalidated_draw_buf_size", (PyCFunction)py_lv_display_get_invalidated_draw_buf_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dpx", (PyCFunction)py_lv_display_dpx_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"draw_dispatch_layer", (PyCFunction)py_lv_draw_dispatch_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_draw_buf_handlers", (PyCFunction)py_lv_display_set_draw_buf_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_draw_buf_invalidate_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) */ -static PyObject *py_lv_draw_buf_invalidate_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_create_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + long w_val; long h_val; PyObject *cf_py; long stride_val; + if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + uint32_t w = (uint32_t)w_val; + uint32_t h = (uint32_t)h_val; + lv_color_format_t cf = (int)mp_obj_get_int(cf_py); + uint32_t stride = (uint32_t)stride_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t * _res; lvpy_lock(); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_invalidate_cache)(draw_buf, area); + _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create_ex)(handlers, w, h, cf, stride); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_invalidate_cache_struct_method_def = { - "lv_draw_buf_invalidate_cache", - (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, +static PyMethodDef py_lv_draw_buf_create_ex_struct_method_def = { + "lv_draw_buf_create_ex", + (PyCFunction)py_lv_draw_buf_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85547,59 +80144,71 @@ static PyMethodDef py_lv_draw_buf_invalidate_cache_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_flush_cache(const lv_draw_buf_t *draw_buf, const lv_area_t *area) + * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) */ -static PyObject *py_lv_draw_buf_flush_cache_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_buf_dup_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *area = (const lv_area_t *)mp_write_ptr_lv_area_t(area_py); + PyObject *draw_buf_py; + if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(draw_buf_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_buf_t * _res; lvpy_lock(); - ((void (*)(const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_flush_cache)(draw_buf, area); + _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_draw_buf_dup_ex)(handlers, draw_buf); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_buf_t((void*)_res); } -static PyMethodDef py_lv_draw_buf_flush_cache_struct_method_def = { - "lv_draw_buf_flush_cache", - (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, +static PyMethodDef py_lv_draw_buf_dup_ex_struct_method_def = { + "lv_draw_buf_dup_ex", + (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_buf_handlers_t_methods[] = { + {"init_with_default_handlers", (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"align_ex", (PyCFunction)py_lv_draw_buf_align_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"width_to_stride_ex", (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"create_ex", (PyCFunction)py_lv_draw_buf_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"dup_ex", (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_draw_buf_clear(lv_draw_buf_t *draw_buf, const lv_area_t *a) + * void lv_ll_init(lv_ll_t *ll_p, uint32_t node_size) */ -static PyObject *py_lv_draw_buf_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a_py; - if (!PyArg_ParseTuple(py_args, "O", &a_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(a_py); + long node_size_val; + if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + uint32_t node_size = (uint32_t)node_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_clear)(draw_buf, a); + ((void (*)(lv_ll_t *, uint32_t))lv_ll_init)(ll_p, node_size); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_clear_struct_method_def = { - "lv_draw_buf_clear", - (PyCFunction)py_lv_draw_buf_clear_struct_method, +static PyMethodDef py_lv_ll_init_struct_method_def = { + "lv_ll_init", + (PyCFunction)py_lv_ll_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85607,28 +80216,28 @@ static PyMethodDef py_lv_draw_buf_clear_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup(const lv_draw_buf_t *draw_buf) + * void *lv_ll_ins_head(lv_ll_t *ll_p) */ -static PyObject *py_lv_draw_buf_dup_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_ins_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_t *))lv_draw_buf_dup)(draw_buf); + _res = ((void *(*)(lv_ll_t *))lv_ll_ins_head)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_dup_struct_method_def = { - "lv_draw_buf_dup", - (PyCFunction)py_lv_draw_buf_dup_struct_method, +static PyMethodDef py_lv_ll_ins_head_struct_method_def = { + "lv_ll_ins_head", + (PyCFunction)py_lv_ll_ins_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85636,35 +80245,30 @@ static PyMethodDef py_lv_draw_buf_dup_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_init(lv_draw_buf_t *draw_buf, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride, void *data, uint32_t data_size) + * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) */ -static PyObject *py_lv_draw_buf_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_ins_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; long h_val; PyObject *cf_py; long stride_val; PyObject *data_py; long data_size_val; - if (!PyArg_ParseTuple(py_args, "llOlOl", &w_val, &h_val, &cf_py, &stride_val, &data_py, &data_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t stride = (uint32_t)stride_val; - void *data = mp_to_ptr(data_py); - uint32_t data_size = (uint32_t)data_size_val; + PyObject *n_act_py; + if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *n_act = mp_to_ptr(n_act_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + void * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t, void *, uint32_t))lv_draw_buf_init)(draw_buf, w, h, cf, stride, data, data_size); + _res = ((void *(*)(lv_ll_t *, void *))lv_ll_ins_prev)(ll_p, n_act); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_init_struct_method_def = { - "lv_draw_buf_init", - (PyCFunction)py_lv_draw_buf_init_struct_method, +static PyMethodDef py_lv_ll_ins_prev_struct_method_def = { + "lv_ll_ins_prev", + (PyCFunction)py_lv_ll_ins_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85672,33 +80276,28 @@ static PyMethodDef py_lv_draw_buf_init_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_reshape(lv_draw_buf_t *draw_buf, lv_color_format_t cf, uint32_t w, uint32_t h, uint32_t stride) + * void *lv_ll_ins_tail(lv_ll_t *ll_p) */ -static PyObject *py_lv_draw_buf_reshape_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_ins_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cf_py; long w_val; long h_val; long stride_val; - if (!PyArg_ParseTuple(py_args, "Olll", &cf_py, &w_val, &h_val, &stride_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - uint32_t stride = (uint32_t)stride_val; + + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(lv_draw_buf_t *, lv_color_format_t, uint32_t, uint32_t, uint32_t))lv_draw_buf_reshape)(draw_buf, cf, w, h, stride); + _res = ((void *(*)(lv_ll_t *))lv_ll_ins_tail)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_reshape_struct_method_def = { - "lv_draw_buf_reshape", - (PyCFunction)py_lv_draw_buf_reshape_struct_method, +static PyMethodDef py_lv_ll_ins_tail_struct_method_def = { + "lv_ll_ins_tail", + (PyCFunction)py_lv_ll_ins_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85706,59 +80305,66 @@ static PyMethodDef py_lv_draw_buf_reshape_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_destroy(lv_draw_buf_t *draw_buf) + * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) */ -static PyObject *py_lv_draw_buf_destroy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + PyObject *node_p_py; + if (!PyArg_ParseTuple(py_args, "O", &node_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *node_p = mp_to_ptr(node_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_t *))lv_draw_buf_destroy)(draw_buf); + ((void (*)(lv_ll_t *, void *))lv_ll_remove)(ll_p, node_p); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_destroy_struct_method_def = { - "lv_draw_buf_destroy", - (PyCFunction)py_lv_draw_buf_destroy_struct_method, +static PyMethodDef py_lv_ll_remove_struct_method_def = { + "lv_ll_remove", + (PyCFunction)py_lv_ll_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void cleanup(void *) + * void (*cleanup)(void *) + */ + + /* * lvgl extension definition for: - * void lv_draw_buf_copy(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) + * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) */ -static PyObject *py_lv_draw_buf_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_clear_custom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dest_area_py; PyObject *src_py; PyObject *src_area_py; - if (!PyArg_ParseTuple(py_args, "OOO", &dest_area_py, &src_py, &src_area_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *dest = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *dest_area = (const lv_area_t *)mp_write_ptr_lv_area_t(dest_area_py); - const lv_draw_buf_t *src = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(src_py); - const lv_area_t *src_area = (const lv_area_t *)mp_write_ptr_lv_area_t(src_area_py); + PyObject *cleanup_py; + if (!PyArg_ParseTuple(py_args, "O", &cleanup_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *cleanup = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, const lv_draw_buf_t *, const lv_area_t *))lv_draw_buf_copy)(dest, dest_area, src, src_area); + ((void (*)(lv_ll_t *, void (*)(void *)))lv_ll_clear_custom)(ll_p, cleanup); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_copy_struct_method_def = { - "lv_draw_buf_copy", - (PyCFunction)py_lv_draw_buf_copy_struct_method, +static PyMethodDef py_lv_ll_clear_custom_struct_method_def = { + "lv_ll_clear_custom", + (PyCFunction)py_lv_ll_clear_custom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85766,31 +80372,27 @@ static PyMethodDef py_lv_draw_buf_copy_struct_method_def = { /* * lvgl extension definition for: - * void *lv_draw_buf_goto_xy(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * void lv_ll_clear(lv_ll_t *ll_p) */ -static PyObject *py_lv_draw_buf_goto_xy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint32_t x = (uint32_t)x_val; - uint32_t y = (uint32_t)y_val; + + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_draw_buf_goto_xy)(buf, x, y); + ((void (*)(lv_ll_t *))lv_ll_clear)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_goto_xy_struct_method_def = { - "lv_draw_buf_goto_xy", - (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, +static PyMethodDef py_lv_ll_clear_struct_method_def = { + "lv_ll_clear", + (PyCFunction)py_lv_ll_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85798,31 +80400,31 @@ static PyMethodDef py_lv_draw_buf_goto_xy_struct_method_def = { /* * lvgl extension definition for: - * bool lv_draw_buf_is_position_valid(const lv_draw_buf_t *buf, uint32_t x, uint32_t y) + * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) */ -static PyObject *py_lv_draw_buf_is_position_valid_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_chg_list_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint32_t x = (uint32_t)x_val; - uint32_t y = (uint32_t)y_val; + PyObject *ll_new_p_py; PyObject *node_py; long head_val; + if (!PyArg_ParseTuple(py_args, "OOl", &ll_new_p_py, &node_py, &head_val)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_ori_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(ll_new_p_py); + void *node = mp_to_ptr(node_py); + bool head = (head_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_draw_buf_t *, uint32_t, uint32_t))lv_draw_buf_is_position_valid)(buf, x, y); + ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_ll_chg_list)(ll_ori_p, ll_new_p, node, head); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_is_position_valid_struct_method_def = { - "lv_draw_buf_is_position_valid", - (PyCFunction)py_lv_draw_buf_is_position_valid_struct_method, +static PyMethodDef py_lv_ll_chg_list_struct_method_def = { + "lv_ll_chg_list", + (PyCFunction)py_lv_ll_chg_list_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85830,30 +80432,28 @@ static PyMethodDef py_lv_draw_buf_is_position_valid_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_adjust_stride(lv_draw_buf_t *src, uint32_t stride) + * void *lv_ll_get_head(const lv_ll_t *ll_p) */ -static PyObject *py_lv_draw_buf_adjust_stride_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long stride_val; - if (!PyArg_ParseTuple(py_args, "l", &stride_val)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *src = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint32_t stride = (uint32_t)stride_val; + + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + void * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *, uint32_t))lv_draw_buf_adjust_stride)(src, stride); + _res = ((void *(*)(const lv_ll_t *))lv_ll_get_head)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_adjust_stride_struct_method_def = { - "lv_draw_buf_adjust_stride", - (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, +static PyMethodDef py_lv_ll_get_head_struct_method_def = { + "lv_ll_get_head", + (PyCFunction)py_lv_ll_get_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85861,28 +80461,28 @@ static PyMethodDef py_lv_draw_buf_adjust_stride_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_premultiply(lv_draw_buf_t *draw_buf) + * void *lv_ll_get_tail(const lv_ll_t *ll_p) */ -static PyObject *py_lv_draw_buf_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + void * _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_draw_buf_premultiply)(draw_buf); + _res = ((void *(*)(const lv_ll_t *))lv_ll_get_tail)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_premultiply_struct_method_def = { - "lv_draw_buf_premultiply", - (PyCFunction)py_lv_draw_buf_premultiply_struct_method, +static PyMethodDef py_lv_ll_get_tail_struct_method_def = { + "lv_ll_get_tail", + (PyCFunction)py_lv_ll_get_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85890,30 +80490,30 @@ static PyMethodDef py_lv_draw_buf_premultiply_struct_method_def = { /* * lvgl extension definition for: - * bool lv_draw_buf_has_flag(const lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) */ -static PyObject *py_lv_draw_buf_has_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); + PyObject *n_act_py; + if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + const void *n_act = (const void *)mp_to_ptr(n_act_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + void * _res; lvpy_lock(); - _res = ((bool (*)(const lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_has_flag)(draw_buf, flag); + _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_next)(ll_p, n_act); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_has_flag_struct_method_def = { - "lv_draw_buf_has_flag", - (PyCFunction)py_lv_draw_buf_has_flag_struct_method, +static PyMethodDef py_lv_ll_get_next_struct_method_def = { + "lv_ll_get_next", + (PyCFunction)py_lv_ll_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85921,29 +80521,30 @@ static PyMethodDef py_lv_draw_buf_has_flag_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_set_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * void *lv_ll_get_prev(const lv_ll_t *ll_p, const void *n_act) */ -static PyObject *py_lv_draw_buf_set_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); + PyObject *n_act_py; + if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + const void *n_act = (const void *)mp_to_ptr(n_act_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_set_flag)(draw_buf, flag); + _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_prev)(ll_p, n_act); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_buf_set_flag_struct_method_def = { - "lv_draw_buf_set_flag", - (PyCFunction)py_lv_draw_buf_set_flag_struct_method, +static PyMethodDef py_lv_ll_get_prev_struct_method_def = { + "lv_ll_get_prev", + (PyCFunction)py_lv_ll_get_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85951,29 +80552,28 @@ static PyMethodDef py_lv_draw_buf_set_flag_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_clear_flag(lv_draw_buf_t *draw_buf, lv_image_flags_t flag) + * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) */ -static PyObject *py_lv_draw_buf_clear_flag_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_get_len_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *flag_py; - if (!PyArg_ParseTuple(py_args, "O", &flag_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_flags_t flag = (int)mp_obj_get_int(flag_py); + + const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_draw_buf_t *, lv_image_flags_t))lv_draw_buf_clear_flag)(draw_buf, flag); + _res = ((uint32_t (*)(const lv_ll_t *))lv_ll_get_len)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_buf_clear_flag_struct_method_def = { - "lv_draw_buf_clear_flag", - (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, +static PyMethodDef py_lv_ll_get_len_struct_method_def = { + "lv_ll_get_len", + (PyCFunction)py_lv_ll_get_len_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -85981,30 +80581,30 @@ static PyMethodDef py_lv_draw_buf_clear_flag_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_from_image(lv_draw_buf_t *buf, const lv_image_dsc_t *img) + * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) */ -static PyObject *py_lv_draw_buf_from_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_move_before_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *img_py; - if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_image_dsc_t *img = (const lv_image_dsc_t *)mp_write_ptr_lv_image_dsc_t(img_py); + PyObject *n_act_py; PyObject *n_after_py; + if (!PyArg_ParseTuple(py_args, "OO", &n_act_py, &n_after_py)) { PyGILState_Release(gstate); return NULL; } + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + void *n_act = mp_to_ptr(n_act_py); + void *n_after = mp_to_ptr(n_after_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *, const lv_image_dsc_t *))lv_draw_buf_from_image)(buf, img); + ((void (*)(lv_ll_t *, void *, void *))lv_ll_move_before)(ll_p, n_act, n_after); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_from_image_struct_method_def = { - "lv_draw_buf_from_image", - (PyCFunction)py_lv_draw_buf_from_image_struct_method, +static PyMethodDef py_lv_ll_move_before_struct_method_def = { + "lv_ll_move_before", + (PyCFunction)py_lv_ll_move_before_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86012,60 +80612,81 @@ static PyMethodDef py_lv_draw_buf_from_image_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_to_image(const lv_draw_buf_t *buf, lv_image_dsc_t *img) + * bool lv_ll_is_empty(lv_ll_t *ll_p) */ -static PyObject *py_lv_draw_buf_to_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_ll_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *img_py; - if (!PyArg_ParseTuple(py_args, "O", &img_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - lv_image_dsc_t *img = mp_write_ptr_lv_image_dsc_t(img_py); + + lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(const lv_draw_buf_t *, lv_image_dsc_t *))lv_draw_buf_to_image)(buf, img); + _res = ((bool (*)(lv_ll_t *))lv_ll_is_empty)(ll_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_buf_to_image_struct_method_def = { - "lv_draw_buf_to_image", - (PyCFunction)py_lv_draw_buf_to_image_struct_method, +static PyMethodDef py_lv_ll_is_empty_struct_method_def = { + "lv_ll_is_empty", + (PyCFunction)py_lv_ll_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_ll_t_methods[] = { + {"init", (PyCFunction)py_lv_ll_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ins_head", (PyCFunction)py_lv_ll_ins_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ins_prev", (PyCFunction)py_lv_ll_ins_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"ins_tail", (PyCFunction)py_lv_ll_ins_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_ll_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear_custom", (PyCFunction)py_lv_ll_clear_custom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear", (PyCFunction)py_lv_ll_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"chg_list", (PyCFunction)py_lv_ll_chg_list_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_head", (PyCFunction)py_lv_ll_get_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_tail", (PyCFunction)py_lv_ll_get_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_next", (PyCFunction)py_lv_ll_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_prev", (PyCFunction)py_lv_ll_get_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_len", (PyCFunction)py_lv_ll_get_len_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move_before", (PyCFunction)py_lv_ll_move_before_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_empty", (PyCFunction)py_lv_ll_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_draw_buf_set_palette(lv_draw_buf_t *draw_buf, uint8_t index, lv_color32_t color) + * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) */ -static PyObject *py_lv_draw_buf_set_palette_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; PyObject *color_py; - if (!PyArg_ParseTuple(py_args, "lO", &index_val, &color_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - uint8_t index = (uint8_t)index_val; - lv_color32_t color = mp_write_lv_color32_t(color_py); + long x1_val; long y1_val; long x2_val; long y2_val; + if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t x1 = (int32_t)x1_val; + int32_t y1 = (int32_t)y1_val; + int32_t x2 = (int32_t)x2_val; + int32_t y2 = (int32_t)y2_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_t *, uint8_t, lv_color32_t))lv_draw_buf_set_palette)(draw_buf, index, color); + ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_area_set)(area_p, x1, y1, x2, y2); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_set_palette_struct_method_def = { - "lv_draw_buf_set_palette", - (PyCFunction)py_lv_draw_buf_set_palette_struct_method, +static PyMethodDef py_lv_area_set_struct_method_def = { + "lv_area_set", + (PyCFunction)py_lv_area_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86073,30 +80694,29 @@ static PyMethodDef py_lv_draw_buf_set_palette_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_buf_clear_ex(lv_draw_buf_t *draw_buf, const lv_area_t *a, lv_layer_t *layer) + * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) */ -static PyObject *py_lv_draw_buf_clear_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a_py; PyObject *layer_py; - if (!PyArg_ParseTuple(py_args, "OO", &a_py, &layer_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const lv_area_t *a = (const lv_area_t *)mp_write_ptr_lv_area_t(a_py); - lv_layer_t *layer = mp_write_ptr_lv_layer_t(layer_py); + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *dest = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_t *, const lv_area_t *, lv_layer_t *))lv_draw_buf_clear_ex)(draw_buf, a, layer); + ((void (*)(lv_area_t *, const lv_area_t *))lv_area_copy)(dest, src); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_clear_ex_struct_method_def = { - "lv_draw_buf_clear_ex", - (PyCFunction)py_lv_draw_buf_clear_ex_struct_method, +static PyMethodDef py_lv_area_copy_struct_method_def = { + "lv_area_copy", + (PyCFunction)py_lv_area_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86104,28 +80724,28 @@ static PyMethodDef py_lv_draw_buf_clear_ex_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_convert_premultiply(lv_draw_buf_t *draw_buf) + * int32_t lv_area_get_width(const lv_area_t *area_p) */ -static PyObject *py_lv_draw_buf_convert_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_get_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); + const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_draw_buf_t *))lv_draw_buf_convert_premultiply)(draw_buf); + _res = ((int32_t (*)(const lv_area_t *))lv_area_get_width)(area_p); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_buf_convert_premultiply_struct_method_def = { - "lv_draw_buf_convert_premultiply", - (PyCFunction)py_lv_draw_buf_convert_premultiply_struct_method, +static PyMethodDef py_lv_area_get_width_struct_method_def = { + "lv_area_get_width", + (PyCFunction)py_lv_area_get_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86133,170 +80753,88 @@ static PyMethodDef py_lv_draw_buf_convert_premultiply_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_draw_buf_save_to_file(const lv_draw_buf_t *draw_buf, const char *path) + * int32_t lv_area_get_height(const lv_area_t *area_p) */ -static PyObject *py_lv_draw_buf_save_to_file_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_get_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *path_py; - if (!PyArg_ParseTuple(py_args, "O", &path_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_t *draw_buf = (lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(self); - const char *path = (const char *)(char*)convert_from_str(path_py); + + const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(const lv_draw_buf_t *, const char *))lv_draw_buf_save_to_file)(draw_buf, path); + _res = ((int32_t (*)(const lv_area_t *))lv_area_get_height)(area_p); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_buf_save_to_file_struct_method_def = { - "lv_draw_buf_save_to_file", - (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, +static PyMethodDef py_lv_area_get_height_struct_method_def = { + "lv_area_get_height", + (PyCFunction)py_lv_area_get_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_buf_t_methods[] = { - {"invalidate_cache", (PyCFunction)py_lv_draw_buf_invalidate_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"flush_cache", (PyCFunction)py_lv_draw_buf_flush_cache_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear", (PyCFunction)py_lv_draw_buf_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dup", (PyCFunction)py_lv_draw_buf_dup_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_draw_buf_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reshape", (PyCFunction)py_lv_draw_buf_reshape_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"destroy", (PyCFunction)py_lv_draw_buf_destroy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy", (PyCFunction)py_lv_draw_buf_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"goto_xy", (PyCFunction)py_lv_draw_buf_goto_xy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_position_valid", (PyCFunction)py_lv_draw_buf_is_position_valid_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"adjust_stride", (PyCFunction)py_lv_draw_buf_adjust_stride_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"premultiply", (PyCFunction)py_lv_draw_buf_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"has_flag", (PyCFunction)py_lv_draw_buf_has_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_flag", (PyCFunction)py_lv_draw_buf_set_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_flag", (PyCFunction)py_lv_draw_buf_clear_flag_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"from_image", (PyCFunction)py_lv_draw_buf_from_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"to_image", (PyCFunction)py_lv_draw_buf_to_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_palette", (PyCFunction)py_lv_draw_buf_set_palette_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_ex", (PyCFunction)py_lv_draw_buf_clear_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"convert_premultiply", (PyCFunction)py_lv_draw_buf_convert_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"save_to_file", (PyCFunction)py_lv_draw_buf_save_to_file_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_image_header_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * void lv_draw_buf_init_with_default_handlers(lv_draw_buf_handlers_t *handlers) + * void lv_area_set_width(lv_area_t *area_p, int32_t w) */ -static PyObject *py_lv_draw_buf_init_with_default_handlers_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); + long w_val; + if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t w = (int32_t)w_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_handlers_t *))lv_draw_buf_init_with_default_handlers)(handlers); + ((void (*)(lv_area_t *, int32_t))lv_area_set_width)(area_p, w); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_init_with_default_handlers_struct_method_def = { - "lv_draw_buf_init_with_default_handlers", - (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, +static PyMethodDef py_lv_area_set_width_struct_method_def = { + "lv_area_set_width", + (PyCFunction)py_lv_area_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) - * lv_draw_buf_malloc_cb_t buf_malloc_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_free_cb_t(void *draw_buf) - * lv_draw_buf_free_cb_t buf_free_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_copy_cb_t(lv_draw_buf_t *dest, const lv_area_t *dest_area, const lv_draw_buf_t *src, const lv_area_t *src_area) - * lv_draw_buf_copy_cb_t buf_copy_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void *lv_draw_buf_align_cb_t(void *buf, lv_color_format_t color_format) - * lv_draw_buf_align_cb_t align_pointer_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - * lv_draw_buf_cache_operation_cb_t invalidate_cache_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_buf_cache_operation_cb_t(const lv_draw_buf_t *draw_buf, const lv_area_t *area) - * lv_draw_buf_cache_operation_cb_t flush_cache_cb - */ - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! uint32_t lv_draw_buf_width_to_stride_cb_t(uint32_t w, lv_color_format_t color_format) - * lv_draw_buf_width_to_stride_cb_t width_to_stride_cb - */ - - /* * lvgl extension definition for: - * void lv_draw_buf_handlers_init(lv_draw_buf_handlers_t *handlers, lv_draw_buf_malloc_cb_t buf_malloc_cb, lv_draw_buf_free_cb_t buf_free_cb, lv_draw_buf_copy_cb_t buf_copy_cb, lv_draw_buf_align_cb_t align_pointer_cb, lv_draw_buf_cache_operation_cb_t invalidate_cache_cb, lv_draw_buf_cache_operation_cb_t flush_cache_cb, lv_draw_buf_width_to_stride_cb_t width_to_stride_cb) + * void lv_area_set_height(lv_area_t *area_p, int32_t h) */ -static PyObject *py_lv_draw_buf_handlers_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_malloc_cb_py; PyObject *buf_free_cb_py; PyObject *buf_copy_cb_py; PyObject *align_pointer_cb_py; PyObject *invalidate_cache_cb_py; PyObject *flush_cache_cb_py; PyObject *width_to_stride_cb_py; - if (!PyArg_ParseTuple(py_args, "OOOOOOO", &buf_malloc_cb_py, &buf_free_cb_py, &buf_copy_cb_py, &align_pointer_cb_py, &invalidate_cache_cb_py, &flush_cache_cb_py, &width_to_stride_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - void *buf_malloc_cb = NULL; - void *buf_free_cb = NULL; - void *buf_copy_cb = NULL; - void *align_pointer_cb = NULL; - void *invalidate_cache_cb = NULL; - void *flush_cache_cb = NULL; - void *width_to_stride_cb = NULL; + long h_val; + if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t h = (int32_t)h_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_buf_handlers_t *, lv_draw_buf_malloc_cb_t, lv_draw_buf_free_cb_t, lv_draw_buf_copy_cb_t, lv_draw_buf_align_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_cache_operation_cb_t, lv_draw_buf_width_to_stride_cb_t))lv_draw_buf_handlers_init)(handlers, buf_malloc_cb, buf_free_cb, buf_copy_cb, align_pointer_cb, invalidate_cache_cb, flush_cache_cb, width_to_stride_cb); + ((void (*)(lv_area_t *, int32_t))lv_area_set_height)(area_p, h); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_handlers_init_struct_method_def = { - "lv_draw_buf_handlers_init", - (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, +static PyMethodDef py_lv_area_set_height_struct_method_def = { + "lv_area_set_height", + (PyCFunction)py_lv_area_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86304,31 +80842,28 @@ static PyMethodDef py_lv_draw_buf_handlers_init_struct_method_def = { /* * lvgl extension definition for: - * void *lv_draw_buf_align_ex(const lv_draw_buf_handlers_t *handlers, void *buf, lv_color_format_t color_format) + * uint32_t lv_area_get_size(const lv_area_t *area_p) */ -static PyObject *py_lv_draw_buf_align_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "OO", &buf_py, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - void *buf = mp_to_ptr(buf_py); - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + + const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_draw_buf_handlers_t *, void *, lv_color_format_t))lv_draw_buf_align_ex)(handlers, buf, color_format); + _res = ((uint32_t (*)(const lv_area_t *))lv_area_get_size)(area_p); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_buf_align_ex_struct_method_def = { - "lv_draw_buf_align_ex", - (PyCFunction)py_lv_draw_buf_align_ex_struct_method, +static PyMethodDef py_lv_area_get_size_struct_method_def = { + "lv_area_get_size", + (PyCFunction)py_lv_area_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86336,31 +80871,30 @@ static PyMethodDef py_lv_draw_buf_align_ex_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_draw_buf_width_to_stride_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, lv_color_format_t color_format) + * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) */ -static PyObject *py_lv_draw_buf_width_to_stride_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_increase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; PyObject *color_format_py; - if (!PyArg_ParseTuple(py_args, "lO", &w_val, &color_format_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - uint32_t w = (uint32_t)w_val; - lv_color_format_t color_format = (int)mp_obj_get_int(color_format_py); + long w_extra_val; long h_extra_val; + if (!PyArg_ParseTuple(py_args, "ll", &w_extra_val, &h_extra_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t w_extra = (int32_t)w_extra_val; + int32_t h_extra = (int32_t)h_extra_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_draw_buf_handlers_t *, uint32_t, lv_color_format_t))lv_draw_buf_width_to_stride_ex)(handlers, w, color_format); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_increase)(area, w_extra, h_extra); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_width_to_stride_ex_struct_method_def = { - "lv_draw_buf_width_to_stride_ex", - (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, +static PyMethodDef py_lv_area_increase_struct_method_def = { + "lv_area_increase", + (PyCFunction)py_lv_area_increase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86368,33 +80902,30 @@ static PyMethodDef py_lv_draw_buf_width_to_stride_ex_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_create_ex(const lv_draw_buf_handlers_t *handlers, uint32_t w, uint32_t h, lv_color_format_t cf, uint32_t stride) + * void lv_area_move(lv_area_t *area, int32_t x_ofs, int32_t y_ofs) */ -static PyObject *py_lv_draw_buf_create_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_move_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; long h_val; PyObject *cf_py; long stride_val; - if (!PyArg_ParseTuple(py_args, "llOl", &w_val, &h_val, &cf_py, &stride_val)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - uint32_t w = (uint32_t)w_val; - uint32_t h = (uint32_t)h_val; - lv_color_format_t cf = (int)mp_obj_get_int(cf_py); - uint32_t stride = (uint32_t)stride_val; + long x_ofs_val; long y_ofs_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t x_ofs = (int32_t)x_ofs_val; + int32_t y_ofs = (int32_t)y_ofs_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, uint32_t, uint32_t, lv_color_format_t, uint32_t))lv_draw_buf_create_ex)(handlers, w, h, cf, stride); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_move)(area, x_ofs, y_ofs); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_create_ex_struct_method_def = { - "lv_draw_buf_create_ex", - (PyCFunction)py_lv_draw_buf_create_ex_struct_method, +static PyMethodDef py_lv_area_move_struct_method_def = { + "lv_area_move", + (PyCFunction)py_lv_area_move_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86402,71 +80933,63 @@ static PyMethodDef py_lv_draw_buf_create_ex_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_buf_t *lv_draw_buf_dup_ex(const lv_draw_buf_handlers_t *handlers, const lv_draw_buf_t *draw_buf) + * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) */ -static PyObject *py_lv_draw_buf_dup_ex_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_buf_py; - if (!PyArg_ParseTuple(py_args, "O", &draw_buf_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_buf_handlers_t *handlers = (lv_draw_buf_handlers_t *)mp_write_ptr_lv_draw_buf_handlers_t(self); - const lv_draw_buf_t *draw_buf = (const lv_draw_buf_t *)mp_write_ptr_lv_draw_buf_t(draw_buf_py); + PyObject *to_align_py; PyObject *align_py; long ofs_x_val; long ofs_y_val; + if (!PyArg_ParseTuple(py_args, "OOll", &to_align_py, &align_py, &ofs_x_val, &ofs_y_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *base = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_area_t *to_align = mp_write_ptr_lv_area_t(to_align_py); + lv_align_t align = (int)mp_obj_get_int(align_py); + int32_t ofs_x = (int32_t)ofs_x_val; + int32_t ofs_y = (int32_t)ofs_y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_buf_t * _res; lvpy_lock(); - _res = ((lv_draw_buf_t *(*)(const lv_draw_buf_handlers_t *, const lv_draw_buf_t *))lv_draw_buf_dup_ex)(handlers, draw_buf); + ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_area_align)(base, to_align, align, ofs_x, ofs_y); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_buf_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_buf_dup_ex_struct_method_def = { - "lv_draw_buf_dup_ex", - (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, +static PyMethodDef py_lv_area_align_struct_method_def = { + "lv_area_align", + (PyCFunction)py_lv_area_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_buf_handlers_t_methods[] = { - {"init_with_default_handlers", (PyCFunction)py_lv_draw_buf_init_with_default_handlers_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_draw_buf_handlers_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"align_ex", (PyCFunction)py_lv_draw_buf_align_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"width_to_stride_ex", (PyCFunction)py_lv_draw_buf_width_to_stride_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"create_ex", (PyCFunction)py_lv_draw_buf_create_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"dup_ex", (PyCFunction)py_lv_draw_buf_dup_ex_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_ll_init(lv_ll_t *ll_p, uint32_t node_size) + * void lv_area_set_pos(lv_area_t *area_p, int32_t x, int32_t y) */ -static PyObject *py_lv_ll_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_set_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long node_size_val; - if (!PyArg_ParseTuple(py_args, "l", &node_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - uint32_t node_size = (uint32_t)node_size_val; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_ll_t *, uint32_t))lv_ll_init)(ll_p, node_size); + ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_set_pos)(area_p, x, y); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_init_struct_method_def = { - "lv_ll_init", - (PyCFunction)py_lv_ll_init_struct_method, +static PyMethodDef py_lv_area_set_pos_struct_method_def = { + "lv_area_set_pos", + (PyCFunction)py_lv_area_set_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86474,28 +80997,31 @@ static PyMethodDef py_lv_ll_init_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_ins_head(lv_ll_t *ll_p) + * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_ll_ins_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_intersect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *a1_p_py; PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + bool _res; lvpy_lock(); - _res = ((void *(*)(lv_ll_t *))lv_ll_ins_head)(ll_p); + _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_intersect)(res_p, a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_ll_ins_head_struct_method_def = { - "lv_ll_ins_head", - (PyCFunction)py_lv_ll_ins_head_struct_method, +static PyMethodDef py_lv_area_intersect_struct_method_def = { + "lv_area_intersect", + (PyCFunction)py_lv_area_intersect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86503,30 +81029,32 @@ static PyMethodDef py_lv_ll_ins_head_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_ins_prev(lv_ll_t *ll_p, void *n_act) + * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_ll_ins_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_diff_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); + (void)self; (void)py_kwds; - PyObject *n_act_py; - if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *n_act = mp_to_ptr(n_act_py); + PyObject *res_p_py; PyObject *a1_p_py; PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "OOO", &res_p_py, &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *res_p = mp_to_ptr(res_p_py); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + int8_t _res; lvpy_lock(); - _res = ((void *(*)(lv_ll_t *, void *))lv_ll_ins_prev)(ll_p, n_act); + _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_area_diff)(res_p, a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_ll_ins_prev_struct_method_def = { - "lv_ll_ins_prev", - (PyCFunction)py_lv_ll_ins_prev_struct_method, +static PyMethodDef py_lv_area_diff_struct_method_def = { + "lv_area_diff", + (PyCFunction)py_lv_area_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86534,28 +81062,30 @@ static PyMethodDef py_lv_ll_ins_prev_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_ins_tail(lv_ll_t *ll_p) + * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_ll_ins_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_join_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *a1_p_py; PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + lv_area_t *a_res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(lv_ll_t *))lv_ll_ins_tail)(ll_p); + ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_join)(a_res_p, a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_ins_tail_struct_method_def = { - "lv_ll_ins_tail", - (PyCFunction)py_lv_ll_ins_tail_struct_method, +static PyMethodDef py_lv_area_join_struct_method_def = { + "lv_area_join", + (PyCFunction)py_lv_area_join_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86563,66 +81093,62 @@ static PyMethodDef py_lv_ll_ins_tail_struct_method_def = { /* * lvgl extension definition for: - * void lv_ll_remove(lv_ll_t *ll_p, void *node_p) + * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) */ -static PyObject *py_lv_ll_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_point_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *node_p_py; - if (!PyArg_ParseTuple(py_args, "O", &node_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *node_p = mp_to_ptr(node_p_py); + PyObject *p_p_py; long radius_val; + if (!PyArg_ParseTuple(py_args, "Ol", &p_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *a_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(p_p_py); + int32_t radius = (int32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_ll_t *, void *))lv_ll_remove)(ll_p, node_p); + _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_area_is_point_on)(a_p, p_p, radius); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_ll_remove_struct_method_def = { - "lv_ll_remove", - (PyCFunction)py_lv_ll_remove_struct_method, +static PyMethodDef py_lv_area_is_point_on_struct_method_def = { + "lv_area_is_point_on", + (PyCFunction)py_lv_area_is_point_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void cleanup(void *) - * void (*cleanup)(void *) - */ - - /* * lvgl extension definition for: - * void lv_ll_clear_custom(lv_ll_t *ll_p, void (*cleanup)(void *)) + * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) */ -static PyObject *py_lv_ll_clear_custom_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cleanup_py; - if (!PyArg_ParseTuple(py_args, "O", &cleanup_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *cleanup = NULL; + PyObject *a2_p_py; + if (!PyArg_ParseTuple(py_args, "O", &a2_p_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *a1_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_ll_t *, void (*)(void *)))lv_ll_clear_custom)(ll_p, cleanup); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_on)(a1_p, a2_p); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_ll_clear_custom_struct_method_def = { - "lv_ll_clear_custom", - (PyCFunction)py_lv_ll_clear_custom_struct_method, +static PyMethodDef py_lv_area_is_on_struct_method_def = { + "lv_area_is_on", + (PyCFunction)py_lv_area_is_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86630,27 +81156,31 @@ static PyMethodDef py_lv_ll_clear_custom_struct_method_def = { /* * lvgl extension definition for: - * void lv_ll_clear(lv_ll_t *ll_p) + * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) */ -static PyObject *py_lv_ll_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *aholder_p_py; long radius_val; + if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *ain_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); + int32_t radius = (int32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_ll_t *))lv_ll_clear)(ll_p); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_in)(ain_p, aholder_p, radius); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_ll_clear_struct_method_def = { - "lv_ll_clear", - (PyCFunction)py_lv_ll_clear_struct_method, +static PyMethodDef py_lv_area_is_in_struct_method_def = { + "lv_area_is_in", + (PyCFunction)py_lv_area_is_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86658,31 +81188,31 @@ static PyMethodDef py_lv_ll_clear_struct_method_def = { /* * lvgl extension definition for: - * void lv_ll_chg_list(lv_ll_t *ll_ori_p, lv_ll_t *ll_new_p, void *node, bool head) + * bool lv_area_is_out(const lv_area_t *aout_p, const lv_area_t *aholder_p, int32_t radius) */ -static PyObject *py_lv_ll_chg_list_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *ll_new_p_py; PyObject *node_py; long head_val; - if (!PyArg_ParseTuple(py_args, "OOl", &ll_new_p_py, &node_py, &head_val)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_ori_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - lv_ll_t *ll_new_p = mp_write_ptr_lv_ll_t(ll_new_p_py); - void *node = mp_to_ptr(node_py); - bool head = (head_val != 0); + PyObject *aholder_p_py; long radius_val; + if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *aout_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); + int32_t radius = (int32_t)radius_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_ll_t *, lv_ll_t *, void *, bool))lv_ll_chg_list)(ll_ori_p, ll_new_p, node, head); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_out)(aout_p, aholder_p, radius); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_ll_chg_list_struct_method_def = { - "lv_ll_chg_list", - (PyCFunction)py_lv_ll_chg_list_struct_method, +static PyMethodDef py_lv_area_is_out_struct_method_def = { + "lv_area_is_out", + (PyCFunction)py_lv_area_is_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86690,57 +81220,82 @@ static PyMethodDef py_lv_ll_chg_list_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_get_head(const lv_ll_t *ll_p) + * bool lv_area_is_equal(const lv_area_t *a, const lv_area_t *b) */ -static PyObject *py_lv_ll_get_head_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_area_is_equal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *b_py; + if (!PyArg_ParseTuple(py_args, "O", &b_py)) { PyGILState_Release(gstate); return NULL; } + const lv_area_t *a = (lv_area_t *)mp_write_ptr_lv_area_t(self); + const lv_area_t *b = (const lv_area_t *)mp_write_ptr_lv_area_t(b_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + bool _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *))lv_ll_get_head)(ll_p); + _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_equal)(a, b); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_ll_get_head_struct_method_def = { - "lv_ll_get_head", - (PyCFunction)py_lv_ll_get_head_struct_method, +static PyMethodDef py_lv_area_is_equal_struct_method_def = { + "lv_area_is_equal", + (PyCFunction)py_lv_area_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_area_t_methods[] = { + {"set", (PyCFunction)py_lv_area_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy", (PyCFunction)py_lv_area_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_width", (PyCFunction)py_lv_area_get_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_height", (PyCFunction)py_lv_area_get_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_width", (PyCFunction)py_lv_area_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_height", (PyCFunction)py_lv_area_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_size", (PyCFunction)py_lv_area_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"increase", (PyCFunction)py_lv_area_increase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"move", (PyCFunction)py_lv_area_move_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"align", (PyCFunction)py_lv_area_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_pos", (PyCFunction)py_lv_area_set_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"intersect", (PyCFunction)py_lv_area_intersect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"diff", (PyCFunction)py_lv_area_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"join", (PyCFunction)py_lv_area_join_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_point_on", (PyCFunction)py_lv_area_is_point_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_on", (PyCFunction)py_lv_area_is_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_in", (PyCFunction)py_lv_area_is_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_out", (PyCFunction)py_lv_area_is_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_equal", (PyCFunction)py_lv_area_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void *lv_ll_get_tail(const lv_ll_t *ll_p) + * void lv_layer_init(lv_layer_t *layer) */ -static PyObject *py_lv_ll_get_tail_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *))lv_ll_get_tail)(ll_p); + ((void (*)(lv_layer_t *))lv_layer_init)(layer); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_get_tail_struct_method_def = { - "lv_ll_get_tail", - (PyCFunction)py_lv_ll_get_tail_struct_method, +static PyMethodDef py_lv_layer_init_struct_method_def = { + "lv_layer_init", + (PyCFunction)py_lv_layer_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86748,61 +81303,63 @@ static PyMethodDef py_lv_ll_get_tail_struct_method_def = { /* * lvgl extension definition for: - * void *lv_ll_get_next(const lv_ll_t *ll_p, const void *n_act) + * void lv_layer_reset(lv_layer_t *layer) */ -static PyObject *py_lv_ll_get_next_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_layer_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *n_act_py; - if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - const void *n_act = (const void *)mp_to_ptr(n_act_py); + + lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_next)(ll_p, n_act); + ((void (*)(lv_layer_t *))lv_layer_reset)(layer); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_get_next_struct_method_def = { - "lv_ll_get_next", - (PyCFunction)py_lv_ll_get_next_struct_method, +static PyMethodDef py_lv_layer_reset_struct_method_def = { + "lv_layer_reset", + (PyCFunction)py_lv_layer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_layer_t_methods[] = { + {"init", (PyCFunction)py_lv_layer_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"reset", (PyCFunction)py_lv_layer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void *lv_ll_get_prev(const lv_ll_t *ll_p, const void *n_act) + * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) */ -static PyObject *py_lv_ll_get_prev_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_get_dependent_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *n_act_py; - if (!PyArg_ParseTuple(py_args, "O", &n_act_py)) { PyGILState_Release(gstate); return NULL; } - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - const void *n_act = (const void *)mp_to_ptr(n_act_py); + + lv_draw_task_t *t_check = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_ll_t *, const void *))lv_ll_get_prev)(ll_p, n_act); + _res = ((uint32_t (*)(lv_draw_task_t *))lv_draw_get_dependent_count)(t_check); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_ll_get_prev_struct_method_def = { - "lv_ll_get_prev", - (PyCFunction)py_lv_ll_get_prev_struct_method, +static PyMethodDef py_lv_draw_get_dependent_count_struct_method_def = { + "lv_draw_get_dependent_count", + (PyCFunction)py_lv_draw_get_dependent_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86810,28 +81367,28 @@ static PyMethodDef py_lv_ll_get_prev_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_ll_get_len(const lv_ll_t *ll_p) + * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) */ -static PyObject *py_lv_ll_get_len_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_draw_task_type_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_ll_t *))lv_ll_get_len)(ll_p); + _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_draw_task_get_type)(t); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_ll_get_len_struct_method_def = { - "lv_ll_get_len", - (PyCFunction)py_lv_ll_get_len_struct_method, +static PyMethodDef py_lv_draw_task_get_type_struct_method_def = { + "lv_draw_task_get_type", + (PyCFunction)py_lv_draw_task_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86839,30 +81396,28 @@ static PyMethodDef py_lv_ll_get_len_struct_method_def = { /* * lvgl extension definition for: - * void lv_ll_move_before(lv_ll_t *ll_p, void *n_act, void *n_after) + * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) */ -static PyObject *py_lv_ll_move_before_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_draw_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *n_act_py; PyObject *n_after_py; - if (!PyArg_ParseTuple(py_args, "OO", &n_act_py, &n_after_py)) { PyGILState_Release(gstate); return NULL; } - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); - void *n_act = mp_to_ptr(n_act_py); - void *n_after = mp_to_ptr(n_after_py); + + const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_ll_t *, void *, void *))lv_ll_move_before)(ll_p, n_act, n_after); + _res = ((void *(*)(const lv_draw_task_t *))lv_draw_task_get_draw_dsc)(t); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_ll_move_before_struct_method_def = { - "lv_ll_move_before", - (PyCFunction)py_lv_ll_move_before_struct_method, +static PyMethodDef py_lv_draw_task_get_draw_dsc_struct_method_def = { + "lv_draw_task_get_draw_dsc", + (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86870,81 +81425,58 @@ static PyMethodDef py_lv_ll_move_before_struct_method_def = { /* * lvgl extension definition for: - * bool lv_ll_is_empty(lv_ll_t *ll_p) + * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) */ -static PyObject *py_lv_ll_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_ll_t *ll_p = (lv_ll_t *)mp_write_ptr_lv_ll_t(self); + PyObject *area_py; + if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } + const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_area_t *area = mp_write_ptr_lv_area_t(area_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_ll_t *))lv_ll_is_empty)(ll_p); + ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_draw_task_get_area)(t, area); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_ll_is_empty_struct_method_def = { - "lv_ll_is_empty", - (PyCFunction)py_lv_ll_is_empty_struct_method, +static PyMethodDef py_lv_draw_task_get_area_struct_method_def = { + "lv_draw_task_get_area", + (PyCFunction)py_lv_draw_task_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_ll_t_methods[] = { - {"init", (PyCFunction)py_lv_ll_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ins_head", (PyCFunction)py_lv_ll_ins_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ins_prev", (PyCFunction)py_lv_ll_ins_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"ins_tail", (PyCFunction)py_lv_ll_ins_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove", (PyCFunction)py_lv_ll_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear_custom", (PyCFunction)py_lv_ll_clear_custom_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear", (PyCFunction)py_lv_ll_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"chg_list", (PyCFunction)py_lv_ll_chg_list_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_head", (PyCFunction)py_lv_ll_get_head_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_tail", (PyCFunction)py_lv_ll_get_tail_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_next", (PyCFunction)py_lv_ll_get_next_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_prev", (PyCFunction)py_lv_ll_get_prev_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_len", (PyCFunction)py_lv_ll_get_len_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move_before", (PyCFunction)py_lv_ll_move_before_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_empty", (PyCFunction)py_lv_ll_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_area_set(lv_area_t *area_p, int32_t x1, int32_t y1, int32_t x2, int32_t y2) + * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_fill_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x1_val; long y1_val; long x2_val; long y2_val; - if (!PyArg_ParseTuple(py_args, "llll", &x1_val, &y1_val, &x2_val, &y2_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t x1 = (int32_t)x1_val; - int32_t y1 = (int32_t)y1_val; - int32_t x2 = (int32_t)x2_val; - int32_t y2 = (int32_t)y2_val; + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_fill_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t, int32_t, int32_t))lv_area_set)(area_p, x1, y1, x2, y2); + _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_fill_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_set_struct_method_def = { - "lv_area_set", - (PyCFunction)py_lv_area_set_struct_method, +static PyMethodDef py_lv_draw_task_get_fill_dsc_struct_method_def = { + "lv_draw_task_get_fill_dsc", + (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86952,29 +81484,28 @@ static PyMethodDef py_lv_area_set_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_copy(lv_area_t *dest, const lv_area_t *src) + * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_border_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *dest = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *src = (const lv_area_t *)mp_write_ptr_lv_area_t(src_py); + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_border_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_area_t *, const lv_area_t *))lv_area_copy)(dest, src); + _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_border_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_copy_struct_method_def = { - "lv_area_copy", - (PyCFunction)py_lv_area_copy_struct_method, +static PyMethodDef py_lv_draw_task_get_border_dsc_struct_method_def = { + "lv_draw_task_get_border_dsc", + (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -86982,28 +81513,28 @@ static PyMethodDef py_lv_area_copy_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_area_get_width(const lv_area_t *area_p) + * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_get_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_box_shadow_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_draw_box_shadow_dsc_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_area_t *))lv_area_get_width)(area_p); + _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_box_shadow_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_get_width_struct_method_def = { - "lv_area_get_width", - (PyCFunction)py_lv_area_get_width_struct_method, +static PyMethodDef py_lv_draw_task_get_box_shadow_dsc_struct_method_def = { + "lv_draw_task_get_box_shadow_dsc", + (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87011,88 +81542,108 @@ static PyMethodDef py_lv_area_get_width_struct_method_def = { /* * lvgl extension definition for: - * int32_t lv_area_get_height(const lv_area_t *area_p) + * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_get_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_label_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int32_t _res; + lv_draw_label_dsc_t * _res; lvpy_lock(); - _res = ((int32_t (*)(const lv_area_t *))lv_area_get_height)(area_p); + _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_label_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_get_height_struct_method_def = { - "lv_area_get_height", - (PyCFunction)py_lv_area_get_height_struct_method, +static PyMethodDef py_lv_draw_task_get_label_dsc_struct_method_def = { + "lv_draw_task_get_label_dsc", + (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * lv_draw_glyph_cb_t cb + */ + + /* * lvgl extension definition for: - * void lv_area_set_width(lv_area_t *area_p, int32_t w) + * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) */ -static PyObject *py_lv_area_set_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_label_iterate_characters_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_val; - if (!PyArg_ParseTuple(py_args, "l", &w_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t w = (int32_t)w_val; + PyObject *dsc_py; PyObject *coords_py; PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "OOO", &dsc_py, &coords_py, &cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t))lv_area_set_width)(area_p, w); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_draw_label_iterate_characters)(t, dsc, coords, cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_set_width_struct_method_def = { - "lv_area_set_width", - (PyCFunction)py_lv_area_set_width_struct_method, +static PyMethodDef py_lv_draw_label_iterate_characters_struct_method_def = { + "lv_draw_label_iterate_characters", + (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) + * lv_draw_glyph_cb_t cb + */ + + /* * lvgl extension definition for: - * void lv_area_set_height(lv_area_t *area_p, int32_t h) + * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static PyObject *py_lv_area_set_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_unit_draw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long h_val; - if (!PyArg_ParseTuple(py_args, "l", &h_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t h = (int32_t)h_val; + PyObject *dsc_py; PyObject *pos_py; PyObject *font_py; long letter_val; PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "OOOlO", &dsc_py, &pos_py, &font_py, &letter_val, &cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(dsc_py); + const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(pos_py); + const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); + uint32_t letter = (uint32_t)letter_val; + void *cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t))lv_area_set_height)(area_p, h); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_draw_unit_draw_letter)(t, dsc, pos, font, letter, cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_set_height_struct_method_def = { - "lv_area_set_height", - (PyCFunction)py_lv_area_set_height_struct_method, +static PyMethodDef py_lv_draw_unit_draw_letter_struct_method_def = { + "lv_draw_unit_draw_letter", + (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87100,28 +81651,28 @@ static PyMethodDef py_lv_area_set_height_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_area_get_size(const lv_area_t *area_p) + * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_get_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_image_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_draw_image_dsc_t * _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_area_t *))lv_area_get_size)(area_p); + _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_image_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_get_size_struct_method_def = { - "lv_area_get_size", - (PyCFunction)py_lv_area_get_size_struct_method, +static PyMethodDef py_lv_draw_task_get_image_dsc_struct_method_def = { + "lv_draw_task_get_image_dsc", + (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87129,61 +81680,66 @@ static PyMethodDef py_lv_area_get_size_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_increase(lv_area_t *area, int32_t w_extra, int32_t h_extra) + * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_increase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_line_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long w_extra_val; long h_extra_val; - if (!PyArg_ParseTuple(py_args, "ll", &w_extra_val, &h_extra_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t w_extra = (int32_t)w_extra_val; - int32_t h_extra = (int32_t)h_extra_val; + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_line_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_increase)(area, w_extra, h_extra); + _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_line_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_increase_struct_method_def = { - "lv_area_increase", - (PyCFunction)py_lv_area_increase_struct_method, +static PyMethodDef py_lv_draw_task_get_line_dsc_struct_method_def = { + "lv_draw_task_get_line_dsc", + (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + */ + + /* * lvgl extension definition for: - * void lv_area_move(lv_area_t *area, int32_t x_ofs, int32_t y_ofs) + * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) */ -static PyObject *py_lv_area_move_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_line_iterate_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_ofs_val; long y_ofs_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_ofs_val, &y_ofs_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t x_ofs = (int32_t)x_ofs_val; - int32_t y_ofs = (int32_t)y_ofs_val; + PyObject *dsc_py; PyObject *draw_line_cb_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &draw_line_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(dsc_py); + void *draw_line_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_move)(area, x_ofs, y_ofs); + ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_draw_line_iterate)(t, dsc, draw_line_cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_move_struct_method_def = { - "lv_area_move", - (PyCFunction)py_lv_area_move_struct_method, +static PyMethodDef py_lv_draw_line_iterate_struct_method_def = { + "lv_draw_line_iterate", + (PyCFunction)py_lv_draw_line_iterate_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87191,32 +81747,28 @@ static PyMethodDef py_lv_area_move_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_align(const lv_area_t *base, lv_area_t *to_align, lv_align_t align, int32_t ofs_x, int32_t ofs_y) + * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_align_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_arc_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *to_align_py; PyObject *align_py; long ofs_x_val; long ofs_y_val; - if (!PyArg_ParseTuple(py_args, "OOll", &to_align_py, &align_py, &ofs_x_val, &ofs_y_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *base = (lv_area_t *)mp_write_ptr_lv_area_t(self); - lv_area_t *to_align = mp_write_ptr_lv_area_t(to_align_py); - lv_align_t align = (int)mp_obj_get_int(align_py); - int32_t ofs_x = (int32_t)ofs_x_val; - int32_t ofs_y = (int32_t)ofs_y_val; + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_arc_dsc_t * _res; lvpy_lock(); - ((void (*)(const lv_area_t *, lv_area_t *, lv_align_t, int32_t, int32_t))lv_area_align)(base, to_align, align, ofs_x, ofs_y); + _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_arc_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_align_struct_method_def = { - "lv_area_align", - (PyCFunction)py_lv_area_align_struct_method, +static PyMethodDef py_lv_draw_task_get_arc_dsc_struct_method_def = { + "lv_draw_task_get_arc_dsc", + (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87224,30 +81776,28 @@ static PyMethodDef py_lv_area_align_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_set_pos(lv_area_t *area_p, int32_t x, int32_t y) + * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_set_pos_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_triangle_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long x_val; long y_val; - if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *area_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - int32_t x = (int32_t)x_val; - int32_t y = (int32_t)y_val; + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_draw_triangle_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_area_t *, int32_t, int32_t))lv_area_set_pos)(area_p, x, y); + _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_triangle_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_set_pos_struct_method_def = { - "lv_area_set_pos", - (PyCFunction)py_lv_area_set_pos_struct_method, +static PyMethodDef py_lv_draw_task_get_triangle_dsc_struct_method_def = { + "lv_draw_task_get_triangle_dsc", + (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87255,31 +81805,28 @@ static PyMethodDef py_lv_area_set_pos_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_intersect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_blur_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a1_p_py; PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + lv_draw_blur_dsc_t * _res; lvpy_lock(); - _res = ((bool (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_intersect)(res_p, a1_p, a2_p); + _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_blur_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_intersect_struct_method_def = { - "lv_area_intersect", - (PyCFunction)py_lv_area_intersect_struct_method, +static PyMethodDef py_lv_draw_task_get_blur_dsc_struct_method_def = { + "lv_draw_task_get_blur_dsc", + (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87287,32 +81834,28 @@ static PyMethodDef py_lv_area_intersect_struct_method_def = { /* * lvgl extension definition for: - * int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p) + * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) */ -static PyObject *py_lv_area_diff_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_task_get_mask_rect_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)self; (void)py_kwds; - PyObject *res_p_py; PyObject *a1_p_py; PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "OOO", &res_p_py, &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *res_p = mp_to_ptr(res_p_py); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + + lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - int8_t _res; + lv_draw_mask_rect_dsc_t * _res; lvpy_lock(); - _res = ((int8_t (*)(lv_area_t [], const lv_area_t *, const lv_area_t *))lv_area_diff)(res_p, a1_p, a2_p); + _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_mask_rect_dsc)(task); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); } -static PyMethodDef py_lv_area_diff_struct_method_def = { - "lv_area_diff", - (PyCFunction)py_lv_area_diff_struct_method, +static PyMethodDef py_lv_draw_task_get_mask_rect_dsc_struct_method_def = { + "lv_draw_task_get_mask_rect_dsc", + (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87320,93 +81863,210 @@ static PyMethodDef py_lv_area_diff_struct_method_def = { /* * lvgl extension definition for: - * void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_cleanup_task(lv_draw_task_t *t) */ -static PyObject *py_lv_area_join_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_cleanup_task_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a1_p_py; PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "OO", &a1_p_py, &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - lv_area_t *a_res_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *a1_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a1_p_py); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_area_t *, const lv_area_t *, const lv_area_t *))lv_area_join)(a_res_p, a1_p, a2_p); + ((void (*)(lv_draw_task_t *))lv_draw_cleanup_task)(t); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_area_join_struct_method_def = { - "lv_area_join", - (PyCFunction)py_lv_area_join_struct_method, +static PyMethodDef py_lv_draw_cleanup_task_struct_method_def = { + "lv_draw_cleanup_task", + (PyCFunction)py_lv_draw_cleanup_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius) + * Struct lv_draw_sw_blend_dsc_t (CPython) */ -static PyObject *py_lv_area_is_point_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) + +extern PyMethodDef py_lv_draw_sw_blend_dsc_t_methods[]; + +static PyObject *py_lv_draw_sw_blend_dsc_t_getattro(PyObject *self, PyObject *name) { - PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *p_p_py; long radius_val; - if (!PyArg_ParseTuple(py_args, "Ol", &p_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *a_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_point_t *p_p = (const lv_point_t *)mp_write_ptr_lv_point_t(p_p_py); - int32_t radius = (int32_t)radius_val; - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - bool _res; - lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_point_t *, int32_t))lv_area_is_point_on)(a_p, p_p, radius); - lvpy_unlock(); - - PyGILState_Release(gstate); - return convert_to_bool(_res); + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return NULL; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return NULL; + if (strcmp(attr, "blend_area") == 0) return mp_read_ptr_lv_area_t((void*)data->blend_area); + if (strcmp(attr, "src_buf") == 0) return ptr_to_mp((void*)data->src_buf); + if (strcmp(attr, "src_stride") == 0) return mp_obj_new_int_from_uint(data->src_stride); + if (strcmp(attr, "src_color_format") == 0) return mp_obj_new_int(data->src_color_format); + if (strcmp(attr, "src_area") == 0) return mp_read_ptr_lv_area_t((void*)data->src_area); + if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); + if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); + if (strcmp(attr, "mask_buf") == 0) return mp_array_from_u8ptr((void*)data->mask_buf); + if (strcmp(attr, "mask_res") == 0) return mp_obj_new_int(data->mask_res); + if (strcmp(attr, "mask_area") == 0) return mp_read_ptr_lv_area_t((void*)data->mask_area); + if (strcmp(attr, "mask_stride") == 0) return mp_obj_new_int(data->mask_stride); + if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); + for (PyMethodDef *m = py_lv_draw_sw_blend_dsc_t_methods; m->ml_name != NULL; m++) { + if (strcmp(attr, m->ml_name) == 0) + return PyCFunction_NewEx(m, self, NULL); + } + return PyObject_GenericGetAttr((PyObject *)self, name); } -static PyMethodDef py_lv_area_is_point_on_struct_method_def = { - "lv_area_is_point_on", - (PyCFunction)py_lv_area_is_point_on_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL +static const char *const py_lv_draw_sw_blend_dsc_t_field_names[] = {"blend_area", "src_buf", "src_stride", "src_color_format", "src_area", "opa", "color", "mask_buf", "mask_res", "mask_area", "mask_stride", "blend_mode", NULL}; + +static PyObject *py_lv_draw_sw_blend_dsc_t_dir(PyObject *self, PyObject *unused) +{ + (void)unused; + return lvpy_struct_dir(self, py_lv_draw_sw_blend_dsc_t_field_names, py_lv_draw_sw_blend_dsc_t_methods); +} + +static PyMethodDef py_lv_draw_sw_blend_dsc_t_type_methods[] = { + {"__dir__", py_lv_draw_sw_blend_dsc_t_dir, METH_NOARGS, NULL}, + {NULL} +}; + +static int py_lv_draw_sw_blend_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) +{ + if (value == NULL) { + PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); + return -1; + } + py_lv_struct_t *inst = (py_lv_struct_t *)self; + lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; + if (data == NULL) { + PyErr_SetString(PyLvReferenceError, "struct data is NULL"); + return -1; + } + const char *attr = PyUnicode_AsUTF8(name); + if (attr == NULL) return -1; + int result = -1; + lv_draw_sw_blend_dsc_t saved; + memcpy(&saved, data, sizeof(saved)); + if (strcmp(attr, "blend_area") == 0) { data->blend_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "src_buf") == 0) { data->src_buf = (void*)mp_to_ptr(value); result = 0; } + if (strcmp(attr, "src_stride") == 0) { data->src_stride = (uint32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "src_color_format") == 0) { data->src_color_format = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "src_area") == 0) { data->src_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } + if (strcmp(attr, "mask_buf") == 0) { data->mask_buf = (void*)mp_array_to_u8ptr(value); result = 0; } + if (strcmp(attr, "mask_res") == 0) { data->mask_res = (int)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "mask_area") == 0) { data->mask_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } + if (strcmp(attr, "mask_stride") == 0) { data->mask_stride = (int32_t)mp_obj_get_int(value); result = 0; } + if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } + if (PyErr_Occurred()) { + memcpy(data, &saved, sizeof(saved)); + return -1; + } + if (result < 0) { + PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_blend_dsc_t' object has no attribute '%s'", attr); + } + return result; +} + +static PyObject *py_lv_draw_sw_blend_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_blend_dsc_t)); +} + +static void py_lv_draw_sw_blend_dsc_t_dealloc(py_lv_struct_t *self) +{ + py_lv_struct_dealloc(self); +} + +PyTypeObject py_lv_draw_sw_blend_dsc_t_type = { + PyVarObject_HEAD_INIT(NULL, 0) + .tp_name = "lvgl.lv_draw_sw_blend_dsc_t", + .tp_basicsize = sizeof(py_lv_struct_t), + .tp_dealloc = (destructor)py_lv_draw_sw_blend_dsc_t_dealloc, + .tp_getattro = (getter)py_lv_draw_sw_blend_dsc_t_getattro, + .tp_setattro = (setter)py_lv_draw_sw_blend_dsc_t_setattro, + .tp_new = py_lv_draw_sw_blend_dsc_t_new, + .tp_methods = py_lv_draw_sw_blend_dsc_t_type_methods, + .tp_base = &py_lv_base_struct_type, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, }; +static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(PyObject *self_in) +{ + if (!self_in || self_in == Py_None) return NULL; + if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_blend_dsc_t_type)) { + PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); + return NULL; + } + py_lv_struct_t *self = (py_lv_struct_t *)self_in; + return (lv_draw_sw_blend_dsc_t*)self->data; +} + +static lv_draw_sw_blend_dsc_t mp_write_scratch_lv_draw_sw_blend_dsc_t; + +static inline void* mp_write_value_ptr_lv_draw_sw_blend_dsc_t(PyObject *value) +{ + if (value != NULL && PyDict_Check(value)) { + PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_blend_dsc_t_type, value); + if (tmp != NULL) { + memcpy(&mp_write_scratch_lv_draw_sw_blend_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_blend_dsc_t)); + Py_DECREF(tmp); + return &mp_write_scratch_lv_draw_sw_blend_dsc_t; + } + } else if (value != NULL && value != Py_None) { + void *p = mp_write_ptr_lv_draw_sw_blend_dsc_t(value); + if (p != NULL) return p; + } else { + PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t or dict, got None"); + } + memset(&mp_write_scratch_lv_draw_sw_blend_dsc_t, 0, sizeof(lv_draw_sw_blend_dsc_t)); + return &mp_write_scratch_lv_draw_sw_blend_dsc_t; +} + +#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) (*((lv_draw_sw_blend_dsc_t*)mp_write_value_ptr_lv_draw_sw_blend_dsc_t(struct_obj))) + +static inline PyObject *mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) +{ + return lv_to_mp_struct(&py_lv_draw_sw_blend_dsc_t_type, field); +} + +#define mp_read_lv_draw_sw_blend_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_blend_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) +#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) + /* * lvgl extension definition for: - * bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p) + * void lv_draw_sw_blend(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) */ -static PyObject *py_lv_area_is_on_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blend_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *a2_p_py; - if (!PyArg_ParseTuple(py_args, "O", &a2_p_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *a1_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *a2_p = (const lv_area_t *)mp_write_ptr_lv_area_t(a2_p_py); + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_on)(a1_p, a2_p); + ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_draw_sw_blend)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_on_struct_method_def = { - "lv_area_is_on", - (PyCFunction)py_lv_area_is_on_struct_method, +static PyMethodDef py_lv_draw_sw_blend_struct_method_def = { + "lv_draw_sw_blend", + (PyCFunction)py_lv_draw_sw_blend_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87414,31 +82074,30 @@ static PyMethodDef py_lv_area_is_on_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius) + * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_is_in_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_fill_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *aholder_p_py; long radius_val; - if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *ain_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); - int32_t radius = (int32_t)radius_val; + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_in)(ain_p, aholder_p, radius); + ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_sw_fill)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_in_struct_method_def = { - "lv_area_is_in", - (PyCFunction)py_lv_area_is_in_struct_method, +static PyMethodDef py_lv_draw_sw_fill_struct_method_def = { + "lv_draw_sw_fill", + (PyCFunction)py_lv_draw_sw_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87446,31 +82105,30 @@ static PyMethodDef py_lv_area_is_in_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_out(const lv_area_t *aout_p, const lv_area_t *aholder_p, int32_t radius) + * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_is_out_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_border_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *aholder_p_py; long radius_val; - if (!PyArg_ParseTuple(py_args, "Ol", &aholder_p_py, &radius_val)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *aout_p = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *aholder_p = (const lv_area_t *)mp_write_ptr_lv_area_t(aholder_p_py); - int32_t radius = (int32_t)radius_val; + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *, int32_t))lv_area_is_out)(aout_p, aholder_p, radius); + ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_sw_border)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_out_struct_method_def = { - "lv_area_is_out", - (PyCFunction)py_lv_area_is_out_struct_method, +static PyMethodDef py_lv_draw_sw_border_struct_method_def = { + "lv_draw_sw_border", + (PyCFunction)py_lv_draw_sw_border_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87478,82 +82136,61 @@ static PyMethodDef py_lv_area_is_out_struct_method_def = { /* * lvgl extension definition for: - * bool lv_area_is_equal(const lv_area_t *a, const lv_area_t *b) + * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_area_is_equal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_box_shadow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *b_py; - if (!PyArg_ParseTuple(py_args, "O", &b_py)) { PyGILState_Release(gstate); return NULL; } - const lv_area_t *a = (lv_area_t *)mp_write_ptr_lv_area_t(self); - const lv_area_t *b = (const lv_area_t *)mp_write_ptr_lv_area_t(b_py); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_area_t *, const lv_area_t *))lv_area_is_equal)(a, b); + ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_sw_box_shadow)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_area_is_equal_struct_method_def = { - "lv_area_is_equal", - (PyCFunction)py_lv_area_is_equal_struct_method, +static PyMethodDef py_lv_draw_sw_box_shadow_struct_method_def = { + "lv_draw_sw_box_shadow", + (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_area_t_methods[] = { - {"set", (PyCFunction)py_lv_area_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy", (PyCFunction)py_lv_area_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_width", (PyCFunction)py_lv_area_get_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_height", (PyCFunction)py_lv_area_get_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_width", (PyCFunction)py_lv_area_set_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_height", (PyCFunction)py_lv_area_set_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_size", (PyCFunction)py_lv_area_get_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"increase", (PyCFunction)py_lv_area_increase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"move", (PyCFunction)py_lv_area_move_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"align", (PyCFunction)py_lv_area_align_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_pos", (PyCFunction)py_lv_area_set_pos_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"intersect", (PyCFunction)py_lv_area_intersect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"diff", (PyCFunction)py_lv_area_diff_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"join", (PyCFunction)py_lv_area_join_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_point_on", (PyCFunction)py_lv_area_is_point_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_on", (PyCFunction)py_lv_area_is_on_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_in", (PyCFunction)py_lv_area_is_in_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_out", (PyCFunction)py_lv_area_is_out_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_equal", (PyCFunction)py_lv_area_is_equal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_layer_init(lv_layer_t *layer) + * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -static PyObject *py_lv_layer_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); + PyObject *draw_dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *))lv_layer_init)(layer); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_image)(t, draw_dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_layer_init_struct_method_def = { - "lv_layer_init", - (PyCFunction)py_lv_layer_init_struct_method, +static PyMethodDef py_lv_draw_sw_image_struct_method_def = { + "lv_draw_sw_image", + (PyCFunction)py_lv_draw_sw_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87561,63 +82198,61 @@ static PyMethodDef py_lv_layer_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_layer_reset(lv_layer_t *layer) + * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_layer_reset_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_layer_t *layer = (lv_layer_t *)mp_write_ptr_lv_layer_t(self); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_layer_t *))lv_layer_reset)(layer); + ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_draw_sw_letter)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_layer_reset_struct_method_def = { - "lv_layer_reset", - (PyCFunction)py_lv_layer_reset_struct_method, +static PyMethodDef py_lv_draw_sw_letter_struct_method_def = { + "lv_draw_sw_letter", + (PyCFunction)py_lv_draw_sw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_layer_t_methods[] = { - {"init", (PyCFunction)py_lv_layer_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"reset", (PyCFunction)py_lv_layer_reset_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * uint32_t lv_draw_get_dependent_count(lv_draw_task_t *t_check) + * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_draw_get_dependent_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_label_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *t_check = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_draw_task_t *))lv_draw_get_dependent_count)(t_check); + ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_sw_label)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_get_dependent_count_struct_method_def = { - "lv_draw_get_dependent_count", - (PyCFunction)py_lv_draw_get_dependent_count_struct_method, +static PyMethodDef py_lv_draw_sw_label_struct_method_def = { + "lv_draw_sw_label", + (PyCFunction)py_lv_draw_sw_label_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87625,28 +82260,30 @@ static PyMethodDef py_lv_draw_get_dependent_count_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_task_type_t lv_draw_task_get_type(const lv_draw_task_t *t) + * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_draw_task_get_type_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_arc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_type_t _res; lvpy_lock(); - _res = ((lv_draw_task_type_t (*)(const lv_draw_task_t *))lv_draw_task_get_type)(t); + ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_draw_sw_arc)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_type_struct_method_def = { - "lv_draw_task_get_type", - (PyCFunction)py_lv_draw_task_get_type_struct_method, +static PyMethodDef py_lv_draw_sw_arc_struct_method_def = { + "lv_draw_sw_arc", + (PyCFunction)py_lv_draw_sw_arc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87654,28 +82291,29 @@ static PyMethodDef py_lv_draw_task_get_type_struct_method_def = { /* * lvgl extension definition for: - * void *lv_draw_task_get_draw_dsc(const lv_draw_task_t *t) + * void lv_draw_sw_line(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) */ -static PyObject *py_lv_draw_task_get_draw_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_line_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_draw_task_t *))lv_draw_task_get_draw_dsc)(t); + ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_draw_sw_line)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_draw_dsc_struct_method_def = { - "lv_draw_task_get_draw_dsc", - (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, +static PyMethodDef py_lv_draw_sw_line_struct_method_def = { + "lv_draw_sw_line", + (PyCFunction)py_lv_draw_sw_line_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87683,29 +82321,30 @@ static PyMethodDef py_lv_draw_task_get_draw_dsc_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_task_get_area(const lv_draw_task_t *t, lv_area_t *area) + * void lv_draw_sw_layer(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) */ -static PyObject *py_lv_draw_task_get_area_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *area_py; - if (!PyArg_ParseTuple(py_args, "O", &area_py)) { PyGILState_Release(gstate); return NULL; } - const lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_area_t *area = mp_write_ptr_lv_area_t(area_py); + PyObject *draw_dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(const lv_draw_task_t *, lv_area_t *))lv_draw_task_get_area)(t, area); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_layer)(t, draw_dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_area_struct_method_def = { - "lv_draw_task_get_area", - (PyCFunction)py_lv_draw_task_get_area_struct_method, +static PyMethodDef py_lv_draw_sw_layer_struct_method_def = { + "lv_draw_sw_layer", + (PyCFunction)py_lv_draw_sw_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87713,28 +82352,29 @@ static PyMethodDef py_lv_draw_task_get_area_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_fill_dsc_t *lv_draw_task_get_fill_dsc(lv_draw_task_t *task) + * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) */ -static PyObject *py_lv_draw_task_get_fill_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_triangle_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_fill_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_fill_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_fill_dsc)(task); + ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_draw_sw_triangle)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_fill_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_fill_dsc_struct_method_def = { - "lv_draw_task_get_fill_dsc", - (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, +static PyMethodDef py_lv_draw_sw_triangle_struct_method_def = { + "lv_draw_sw_triangle", + (PyCFunction)py_lv_draw_sw_triangle_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87742,28 +82382,30 @@ static PyMethodDef py_lv_draw_task_get_fill_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_border_dsc_t *lv_draw_task_get_border_dsc(lv_draw_task_t *task) + * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) */ -static PyObject *py_lv_draw_task_get_border_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_blur_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *dsc_py; PyObject *coords_py; + if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_border_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_border_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_border_dsc)(task); + ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_sw_blur)(t, dsc, coords); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_border_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_border_dsc_struct_method_def = { - "lv_draw_task_get_border_dsc", - (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, +static PyMethodDef py_lv_draw_sw_blur_struct_method_def = { + "lv_draw_sw_blur", + (PyCFunction)py_lv_draw_sw_blur_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87771,57 +82413,69 @@ static PyMethodDef py_lv_draw_task_get_border_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_box_shadow_dsc_t *lv_draw_task_get_box_shadow_dsc(lv_draw_task_t *task) + * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) */ -static PyObject *py_lv_draw_task_get_box_shadow_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_sw_mask_rect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_box_shadow_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_box_shadow_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_box_shadow_dsc)(task); + ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_sw_mask_rect)(t, dsc); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_box_shadow_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_box_shadow_dsc_struct_method_def = { - "lv_draw_task_get_box_shadow_dsc", - (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, +static PyMethodDef py_lv_draw_sw_mask_rect_struct_method_def = { + "lv_draw_sw_mask_rect", + (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_draw_image_core_cb draw_core_cb + */ + + /* * lvgl extension definition for: - * lv_draw_label_dsc_t *lv_draw_task_get_label_dsc(lv_draw_task_t *task) + * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static PyObject *py_lv_draw_task_get_label_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_image_normal_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } + lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); + const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); + void *draw_core_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_label_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_label_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_label_dsc)(task); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_normal_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_label_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_label_dsc_struct_method_def = { - "lv_draw_task_get_label_dsc", - (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, +static PyMethodDef py_lv_draw_image_normal_helper_struct_method_def = { + "lv_draw_image_normal_helper", + (PyCFunction)py_lv_draw_image_normal_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87829,38 +82483,39 @@ static PyMethodDef py_lv_draw_task_get_label_dsc_struct_method_def = { /* * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) - * lv_draw_glyph_cb_t cb + * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) + * lv_draw_image_core_cb draw_core_cb */ /* * lvgl extension definition for: - * void lv_draw_label_iterate_characters(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords, lv_draw_glyph_cb_t cb) + * void lv_draw_image_tiled_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) */ -static PyObject *py_lv_draw_label_iterate_characters_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_image_tiled_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "OOO", &dsc_py, &coords_py, &cb_py)) { PyGILState_Release(gstate); return NULL; } + PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; + if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); + const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - void *cb = NULL; + const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); + void *draw_core_cb = NULL; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *, lv_draw_glyph_cb_t))lv_draw_label_iterate_characters)(t, dsc, coords, cb); + ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_tiled_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_label_iterate_characters_struct_method_def = { - "lv_draw_label_iterate_characters", - (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, +static PyMethodDef py_lv_draw_image_tiled_helper_struct_method_def = { + "lv_draw_image_tiled_helper", + (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87875,9 +82530,9 @@ static PyMethodDef py_lv_draw_label_iterate_characters_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_unit_draw_letter(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) + * void lv_draw_unit_draw_letter_internal(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) */ -static PyObject *py_lv_draw_unit_draw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_draw_unit_draw_letter_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; @@ -87892,45 +82547,85 @@ static PyObject *py_lv_draw_unit_draw_letter_struct_method(PyObject *self, PyObj if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_draw_unit_draw_letter)(t, dsc, pos, font, letter, cb); + ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_draw_unit_draw_letter_internal)(t, dsc, pos, font, letter, cb); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_unit_draw_letter_struct_method_def = { - "lv_draw_unit_draw_letter", - (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, +static PyMethodDef py_lv_draw_unit_draw_letter_internal_struct_method_def = { + "lv_draw_unit_draw_letter_internal", + (PyCFunction)py_lv_draw_unit_draw_letter_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_draw_task_t_methods[] = { + {"get_dependent_count", (PyCFunction)py_lv_draw_get_dependent_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_type", (PyCFunction)py_lv_draw_task_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_draw_dsc", (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_area", (PyCFunction)py_lv_draw_task_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_fill_dsc", (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_border_dsc", (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_box_shadow_dsc", (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_label_dsc", (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"label_iterate_characters", (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"unit_draw_letter", (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_image_dsc", (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_line_dsc", (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"line_iterate", (PyCFunction)py_lv_draw_line_iterate_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_arc_dsc", (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_triangle_dsc", (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_blur_dsc", (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_mask_rect_dsc", (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"cleanup_task", (PyCFunction)py_lv_draw_cleanup_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_blend", (PyCFunction)py_lv_draw_sw_blend_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_fill", (PyCFunction)py_lv_draw_sw_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_border", (PyCFunction)py_lv_draw_sw_border_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_box_shadow", (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_image", (PyCFunction)py_lv_draw_sw_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_letter", (PyCFunction)py_lv_draw_sw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_label", (PyCFunction)py_lv_draw_sw_label_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_arc", (PyCFunction)py_lv_draw_sw_arc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_line", (PyCFunction)py_lv_draw_sw_line_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_layer", (PyCFunction)py_lv_draw_sw_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_triangle", (PyCFunction)py_lv_draw_sw_triangle_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_blur", (PyCFunction)py_lv_draw_sw_blur_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"sw_mask_rect", (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"image_normal_helper", (PyCFunction)py_lv_draw_image_normal_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"image_tiled_helper", (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"unit_draw_letter_internal", (PyCFunction)py_lv_draw_unit_draw_letter_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_draw_unit_t_methods[] = {{NULL}}; + /* * lvgl extension definition for: - * lv_draw_image_dsc_t *lv_draw_task_get_image_dsc(lv_draw_task_t *task) + * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) */ -static PyObject *py_lv_draw_task_get_image_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_unpremultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_image_dsc_t * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((lv_draw_image_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_image_dsc)(task); + _res = ((lv_color32_t (*)(lv_color32_t))lv_color32_unpremultiply)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_image_dsc_t((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_draw_task_get_image_dsc_struct_method_def = { - "lv_draw_task_get_image_dsc", - (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, +static PyMethodDef py_lv_color32_unpremultiply_struct_method_def = { + "lv_color32_unpremultiply", + (PyCFunction)py_lv_color32_unpremultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -87938,66 +82633,123 @@ static PyMethodDef py_lv_draw_task_get_image_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_line_dsc_t *lv_draw_task_get_line_dsc(lv_draw_task_t *task) + * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) */ -static PyObject *py_lv_draw_task_get_line_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_lumi_of_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; + long premultiplied_val; + if (!PyArg_ParseTuple(py_args, "l", &premultiplied_val)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } + bool premultiplied = (premultiplied_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + uint8_t _res; + lvpy_lock(); + _res = ((uint8_t (*)(lv_color32_t, bool))lv_color32_lumi_of)(c, premultiplied); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_obj_new_int_from_uint(_res); +} - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); +static PyMethodDef py_lv_color32_lumi_of_struct_method_def = { + "lv_color32_lumi_of", + (PyCFunction)py_lv_color32_lumi_of_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) + */ +static PyObject *py_lv_color_mix32_inlined_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_line_dsc_t * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((lv_draw_line_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_line_dsc)(task); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_inlined)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_line_dsc_t((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_draw_task_get_line_dsc_struct_method_def = { - "lv_draw_task_get_line_dsc", - (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, +static PyMethodDef py_lv_color_mix32_inlined_struct_method_def = { + "lv_color_mix32_inlined", + (PyCFunction)py_lv_color_mix32_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Function NOT generated: - * Callback: user_data NOT FOUND! void draw_line_cb(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) - * void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * lvgl extension definition for: + * inline static lv_color32_t lv_color_mix32_premultiplied_inlined(lv_color32_t fg, lv_color32_t bg) */ +static PyObject *py_lv_color_mix32_premultiplied_inlined_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; + lvpy_lock(); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_premultiplied_inlined)(fg, bg); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_lv_color32_t(_res); +} + +static PyMethodDef py_lv_color_mix32_premultiplied_inlined_struct_method_def = { + "lv_color_mix32_premultiplied_inlined", + (PyCFunction)py_lv_color_mix32_premultiplied_inlined_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * void lv_draw_line_iterate(lv_draw_task_t *t, lv_draw_line_dsc_t *dsc, void (*draw_line_cb)(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc)) + * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) */ -static PyObject *py_lv_draw_line_iterate_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *draw_line_cb_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &draw_line_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_draw_line_dsc_t *dsc = mp_write_ptr_lv_draw_line_dsc_t(dsc_py); - void *draw_line_cb = NULL; + PyObject *c2_py; + if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t c1 = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c1 = *p_; } + lv_color32_t c2 = mp_write_lv_color32_t(c2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, lv_draw_line_dsc_t *, void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *)))lv_draw_line_iterate)(t, dsc, draw_line_cb); + _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_color32_eq)(c1, c2); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_line_iterate_struct_method_def = { - "lv_draw_line_iterate", - (PyCFunction)py_lv_draw_line_iterate_struct_method, +static PyMethodDef py_lv_color32_eq_struct_method_def = { + "lv_color32_eq", + (PyCFunction)py_lv_color32_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88005,28 +82757,27 @@ static PyMethodDef py_lv_draw_line_iterate_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_arc_dsc_t *lv_draw_task_get_arc_dsc(lv_draw_task_t *task) + * void lv_color_premultiply(lv_color32_t *c) */ -static PyObject *py_lv_draw_task_get_arc_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_color32_t *c = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_arc_dsc_t * _res; lvpy_lock(); - _res = ((lv_draw_arc_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_arc_dsc)(task); + ((void (*)(lv_color32_t *))lv_color_premultiply)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_arc_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_task_get_arc_dsc_struct_method_def = { - "lv_draw_task_get_arc_dsc", - (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, +static PyMethodDef py_lv_color_premultiply_struct_method_def = { + "lv_color_premultiply", + (PyCFunction)py_lv_color_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88034,28 +82785,28 @@ static PyMethodDef py_lv_draw_task_get_arc_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_triangle_dsc_t *lv_draw_task_get_triangle_dsc(lv_draw_task_t *task) + * uint8_t lv_color32_luminance(lv_color32_t c) */ -static PyObject *py_lv_draw_task_get_triangle_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color32_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_triangle_dsc_t * _res; + uint8_t _res; lvpy_lock(); - _res = ((lv_draw_triangle_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_triangle_dsc)(task); + _res = ((uint8_t (*)(lv_color32_t))lv_color32_luminance)(c); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_triangle_dsc_t((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_task_get_triangle_dsc_struct_method_def = { - "lv_draw_task_get_triangle_dsc", - (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, +static PyMethodDef py_lv_color32_luminance_struct_method_def = { + "lv_color32_luminance", + (PyCFunction)py_lv_color32_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88063,28 +82814,30 @@ static PyMethodDef py_lv_draw_task_get_triangle_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_blur_dsc_t *lv_draw_task_get_blur_dsc(lv_draw_task_t *task) + * lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_draw_task_get_blur_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_blur_dsc_t * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((lv_draw_blur_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_blur_dsc)(task); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_blur_dsc_t((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_draw_task_get_blur_dsc_struct_method_def = { - "lv_draw_task_get_blur_dsc", - (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, +static PyMethodDef py_lv_color_mix32_struct_method_def = { + "lv_color_mix32", + (PyCFunction)py_lv_color_mix32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88092,28 +82845,30 @@ static PyMethodDef py_lv_draw_task_get_blur_dsc_struct_method_def = { /* * lvgl extension definition for: - * lv_draw_mask_rect_dsc_t *lv_draw_task_get_mask_rect_dsc(lv_draw_task_t *task) + * lv_color32_t lv_color_mix32_premultiplied(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_draw_task_get_mask_rect_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix32_premultiplied_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *task = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_draw_mask_rect_dsc_t * _res; + lv_color32_t _res; lvpy_lock(); - _res = ((lv_draw_mask_rect_dsc_t *(*)(lv_draw_task_t *))lv_draw_task_get_mask_rect_dsc)(task); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_premultiplied)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_draw_mask_rect_dsc_t((void*)_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_draw_task_get_mask_rect_dsc_struct_method_def = { - "lv_draw_task_get_mask_rect_dsc", - (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, +static PyMethodDef py_lv_color_mix32_premultiplied_struct_method_def = { + "lv_color_mix32_premultiplied", + (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88121,272 +82876,141 @@ static PyMethodDef py_lv_draw_task_get_mask_rect_dsc_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_cleanup_task(lv_draw_task_t *t) + * lv_color32_t lv_color_over32(lv_color32_t fg, lv_color32_t bg) */ -static PyObject *py_lv_draw_cleanup_task_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_over32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); + PyObject *bg_py; + if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } + lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } + lv_color32_t bg = mp_write_lv_color32_t(bg_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color32_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *))lv_draw_cleanup_task)(t); + _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_over32)(fg, bg); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_draw_cleanup_task_struct_method_def = { - "lv_draw_cleanup_task", - (PyCFunction)py_lv_draw_cleanup_task_struct_method, +static PyMethodDef py_lv_color_over32_struct_method_def = { + "lv_color_over32", + (PyCFunction)py_lv_color_over32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Struct lv_draw_sw_blend_dsc_t (CPython) - */ - -extern PyMethodDef py_lv_draw_sw_blend_dsc_t_methods[]; - -static PyObject *py_lv_draw_sw_blend_dsc_t_getattro(PyObject *self, PyObject *name) -{ - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return NULL; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return NULL; - if (strcmp(attr, "blend_area") == 0) return mp_read_ptr_lv_area_t((void*)data->blend_area); - if (strcmp(attr, "src_buf") == 0) return ptr_to_mp((void*)data->src_buf); - if (strcmp(attr, "src_stride") == 0) return mp_obj_new_int_from_uint(data->src_stride); - if (strcmp(attr, "src_color_format") == 0) return mp_obj_new_int(data->src_color_format); - if (strcmp(attr, "src_area") == 0) return mp_read_ptr_lv_area_t((void*)data->src_area); - if (strcmp(attr, "opa") == 0) return mp_obj_new_int_from_uint(data->opa); - if (strcmp(attr, "color") == 0) return mp_read_byref_lv_color_t(data->color); - if (strcmp(attr, "mask_buf") == 0) return mp_array_from_u8ptr((void*)data->mask_buf); - if (strcmp(attr, "mask_res") == 0) return mp_obj_new_int(data->mask_res); - if (strcmp(attr, "mask_area") == 0) return mp_read_ptr_lv_area_t((void*)data->mask_area); - if (strcmp(attr, "mask_stride") == 0) return mp_obj_new_int(data->mask_stride); - if (strcmp(attr, "blend_mode") == 0) return mp_obj_new_int(data->blend_mode); - for (PyMethodDef *m = py_lv_draw_sw_blend_dsc_t_methods; m->ml_name != NULL; m++) { - if (strcmp(attr, m->ml_name) == 0) - return PyCFunction_NewEx(m, self, NULL); - } - return PyObject_GenericGetAttr((PyObject *)self, name); -} - -static const char *const py_lv_draw_sw_blend_dsc_t_field_names[] = {"blend_area", "src_buf", "src_stride", "src_color_format", "src_area", "opa", "color", "mask_buf", "mask_res", "mask_area", "mask_stride", "blend_mode", NULL}; - -static PyObject *py_lv_draw_sw_blend_dsc_t_dir(PyObject *self, PyObject *unused) -{ - (void)unused; - return lvpy_struct_dir(self, py_lv_draw_sw_blend_dsc_t_field_names, py_lv_draw_sw_blend_dsc_t_methods); -} - -static PyMethodDef py_lv_draw_sw_blend_dsc_t_type_methods[] = { - {"__dir__", py_lv_draw_sw_blend_dsc_t_dir, METH_NOARGS, NULL}, +PyMethodDef py_lv_color32_t_methods[] = { + {"unpremultiply", (PyCFunction)py_lv_color32_unpremultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"lumi_of", (PyCFunction)py_lv_color32_lumi_of_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32_inlined", (PyCFunction)py_lv_color_mix32_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32_premultiplied_inlined", (PyCFunction)py_lv_color_mix32_premultiplied_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"eq", (PyCFunction)py_lv_color32_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_premultiply", (PyCFunction)py_lv_color_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"luminance", (PyCFunction)py_lv_color32_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32", (PyCFunction)py_lv_color_mix32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_mix32_premultiplied", (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"color_over32", (PyCFunction)py_lv_color_over32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; -static int py_lv_draw_sw_blend_dsc_t_setattro(PyObject *self, PyObject *name, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_AttributeError, "cannot delete struct fields"); - return -1; - } - py_lv_struct_t *inst = (py_lv_struct_t *)self; - lv_draw_sw_blend_dsc_t *data = (lv_draw_sw_blend_dsc_t*)inst->data; - if (data == NULL) { - PyErr_SetString(PyLvReferenceError, "struct data is NULL"); - return -1; - } - const char *attr = PyUnicode_AsUTF8(name); - if (attr == NULL) return -1; - int result = -1; - lv_draw_sw_blend_dsc_t saved; - memcpy(&saved, data, sizeof(saved)); - if (strcmp(attr, "blend_area") == 0) { data->blend_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "src_buf") == 0) { data->src_buf = (void*)mp_to_ptr(value); result = 0; } - if (strcmp(attr, "src_stride") == 0) { data->src_stride = (uint32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "src_color_format") == 0) { data->src_color_format = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "src_area") == 0) { data->src_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "opa") == 0) { data->opa = (uint8_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "color") == 0) { data->color = mp_write_lv_color_t(value); result = 0; } - if (strcmp(attr, "mask_buf") == 0) { data->mask_buf = (void*)mp_array_to_u8ptr(value); result = 0; } - if (strcmp(attr, "mask_res") == 0) { data->mask_res = (int)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "mask_area") == 0) { data->mask_area = (void*)mp_write_ptr_lv_area_t(value); result = 0; } - if (strcmp(attr, "mask_stride") == 0) { data->mask_stride = (int32_t)mp_obj_get_int(value); result = 0; } - if (strcmp(attr, "blend_mode") == 0) { data->blend_mode = (int)mp_obj_get_int(value); result = 0; } - if (PyErr_Occurred()) { - memcpy(data, &saved, sizeof(saved)); - return -1; - } - if (result < 0) { - PyErr_Format(PyExc_AttributeError, "'lv_draw_sw_blend_dsc_t' object has no attribute '%s'", attr); - } - return result; -} - -static PyObject *py_lv_draw_sw_blend_dsc_t_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - return make_new_lv_struct(type, args, kwds, sizeof(lv_draw_sw_blend_dsc_t)); -} - -static void py_lv_draw_sw_blend_dsc_t_dealloc(py_lv_struct_t *self) -{ - py_lv_struct_dealloc(self); -} - -PyTypeObject py_lv_draw_sw_blend_dsc_t_type = { - PyVarObject_HEAD_INIT(NULL, 0) - .tp_name = "lvgl.lv_draw_sw_blend_dsc_t", - .tp_basicsize = sizeof(py_lv_struct_t), - .tp_dealloc = (destructor)py_lv_draw_sw_blend_dsc_t_dealloc, - .tp_getattro = (getter)py_lv_draw_sw_blend_dsc_t_getattro, - .tp_setattro = (setter)py_lv_draw_sw_blend_dsc_t_setattro, - .tp_new = py_lv_draw_sw_blend_dsc_t_new, - .tp_methods = py_lv_draw_sw_blend_dsc_t_type_methods, - .tp_base = &py_lv_base_struct_type, - .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, -}; - -static inline void* mp_write_ptr_lv_draw_sw_blend_dsc_t(PyObject *self_in) -{ - if (!self_in || self_in == Py_None) return NULL; - if (!PyObject_TypeCheck(self_in, &py_lv_draw_sw_blend_dsc_t_type)) { - PyErr_Format(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t, got '%s'", Py_TYPE(self_in)->tp_name); - return NULL; - } - py_lv_struct_t *self = (py_lv_struct_t *)self_in; - return (lv_draw_sw_blend_dsc_t*)self->data; -} - -static lv_draw_sw_blend_dsc_t mp_write_scratch_lv_draw_sw_blend_dsc_t; - -static inline void* mp_write_value_ptr_lv_draw_sw_blend_dsc_t(PyObject *value) -{ - if (value != NULL && PyDict_Check(value)) { - PyObject *tmp = PyObject_CallOneArg((PyObject *)&py_lv_draw_sw_blend_dsc_t_type, value); - if (tmp != NULL) { - memcpy(&mp_write_scratch_lv_draw_sw_blend_dsc_t, ((py_lv_struct_t *)tmp)->data, sizeof(lv_draw_sw_blend_dsc_t)); - Py_DECREF(tmp); - return &mp_write_scratch_lv_draw_sw_blend_dsc_t; - } - } else if (value != NULL && value != Py_None) { - void *p = mp_write_ptr_lv_draw_sw_blend_dsc_t(value); - if (p != NULL) return p; - } else { - PyErr_SetString(PyExc_TypeError, "Expected lvgl.lv_draw_sw_blend_dsc_t or dict, got None"); - } - memset(&mp_write_scratch_lv_draw_sw_blend_dsc_t, 0, sizeof(lv_draw_sw_blend_dsc_t)); - return &mp_write_scratch_lv_draw_sw_blend_dsc_t; -} - -#define mp_write_lv_draw_sw_blend_dsc_t(struct_obj) (*((lv_draw_sw_blend_dsc_t*)mp_write_value_ptr_lv_draw_sw_blend_dsc_t(struct_obj))) - -static inline PyObject *mp_read_ptr_lv_draw_sw_blend_dsc_t(void *field) -{ - return lv_to_mp_struct(&py_lv_draw_sw_blend_dsc_t_type, field); -} - -#define mp_read_lv_draw_sw_blend_dsc_t(field) lv_to_mp_struct_own(&py_lv_draw_sw_blend_dsc_t_type, copy_buffer(&field, sizeof(lv_draw_sw_blend_dsc_t))) -#define mp_read_byref_lv_draw_sw_blend_dsc_t(field) mp_read_ptr_lv_draw_sw_blend_dsc_t(&field) - /* * lvgl extension definition for: - * void lv_draw_sw_blend(lv_draw_task_t *t, const lv_draw_sw_blend_dsc_t *dsc) + * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) */ -static PyObject *py_lv_draw_sw_blend_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_sw_blend_dsc_t *dsc = (const lv_draw_sw_blend_dsc_t *)mp_write_ptr_lv_draw_sw_blend_dsc_t(dsc_py); + PyObject *e_py; long preprocess_val; + if (!PyArg_ParseTuple(py_args, "Ol", &e_py, &preprocess_val)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + lv_event_t *e = mp_write_ptr_lv_event_t(e_py); + bool preprocess = (preprocess_val != 0); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_sw_blend_dsc_t *))lv_draw_sw_blend)(t, dsc); + _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_event_send)(list, e, preprocess); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_blend_struct_method_def = { - "lv_draw_sw_blend", - (PyCFunction)py_lv_draw_sw_blend_struct_method, +static PyMethodDef py_lv_event_send_struct_method_def = { + "lv_event_send", + (PyCFunction)py_lv_event_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * lvgl extension definition for: - * void lv_draw_sw_fill(lv_draw_task_t *t, lv_draw_fill_dsc_t *dsc, const lv_area_t *coords) + * Callback function lv_event_add_cb (CPython) + * void lv_event_cb_t(lv_event_t *e) */ -static PyObject *py_lv_draw_sw_fill_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static void lv_event_add_cb_callback(lv_event_t *arg0) { PyGILState_STATE gstate = PyGILState_Ensure(); - (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_draw_fill_dsc_t *dsc = mp_write_ptr_lv_draw_fill_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - - lvpy_lock(); - ((void (*)(lv_draw_task_t *, lv_draw_fill_dsc_t *, const lv_area_t *))lv_draw_sw_fill)(t, dsc, coords); - lvpy_unlock(); - + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_event_add_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); PyGILState_Release(gstate); - Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_fill_struct_method_def = { - "lv_draw_sw_fill", - (PyCFunction)py_lv_draw_sw_fill_struct_method, - METH_VARARGS | METH_KEYWORDS, - NULL -}; - /* * lvgl extension definition for: - * void lv_draw_sw_border(lv_draw_task_t *t, const lv_draw_border_dsc_t *dsc, const lv_area_t *coords) + * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) */ -static PyObject *py_lv_draw_sw_border_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_border_dsc_t *dsc = (const lv_draw_border_dsc_t *)mp_write_ptr_lv_draw_border_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + PyObject *cb_py; PyObject *filter_py; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOO", &cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + void *user_data = mp_to_ptr(user_data_py); + lv_event_code_t filter = (int)mp_obj_get_int(filter_py); + void *cb = mp_lv_callback(cb_py, &lv_event_add_cb_callback, "lv_event_add_cb", &user_data, NULL, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_event_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_border_dsc_t *, const lv_area_t *))lv_draw_sw_border)(t, dsc, coords); + _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_event_add)(list, cb, filter, user_data); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_border_struct_method_def = { - "lv_draw_sw_border", - (PyCFunction)py_lv_draw_sw_border_struct_method, +static PyMethodDef py_lv_event_add_struct_method_def = { + "lv_event_add", + (PyCFunction)py_lv_event_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88394,30 +83018,30 @@ static PyMethodDef py_lv_draw_sw_border_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_box_shadow(lv_draw_task_t *t, const lv_draw_box_shadow_dsc_t *dsc, const lv_area_t *coords) + * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) */ -static PyObject *py_lv_draw_sw_box_shadow_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_remove_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_box_shadow_dsc_t *dsc = (const lv_draw_box_shadow_dsc_t *)mp_write_ptr_lv_draw_box_shadow_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + PyObject *dsc_py; + if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(dsc_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_box_shadow_dsc_t *, const lv_area_t *))lv_draw_sw_box_shadow)(t, dsc, coords); + _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_event_remove_dsc)(list, dsc); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_box_shadow_struct_method_def = { - "lv_draw_sw_box_shadow", - (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, +static PyMethodDef py_lv_event_remove_dsc_struct_method_def = { + "lv_event_remove_dsc", + (PyCFunction)py_lv_event_remove_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88425,30 +83049,28 @@ static PyMethodDef py_lv_draw_sw_box_shadow_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_image(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * uint32_t lv_event_get_count(lv_event_list_t *list) */ -static PyObject *py_lv_draw_sw_image_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_image)(t, draw_dsc, coords); + _res = ((uint32_t (*)(lv_event_list_t *))lv_event_get_count)(list); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_image_struct_method_def = { - "lv_draw_sw_image", - (PyCFunction)py_lv_draw_sw_image_struct_method, +static PyMethodDef py_lv_event_get_count_struct_method_def = { + "lv_event_get_count", + (PyCFunction)py_lv_event_get_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88456,30 +83078,30 @@ static PyMethodDef py_lv_draw_sw_image_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_letter(lv_draw_task_t *t, const lv_draw_letter_dsc_t *dsc, const lv_area_t *coords) + * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) */ -static PyObject *py_lv_draw_sw_letter_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_get_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_letter_dsc_t *dsc = (const lv_draw_letter_dsc_t *)mp_write_ptr_lv_draw_letter_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_event_dsc_t * _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_letter_dsc_t *, const lv_area_t *))lv_draw_sw_letter)(t, dsc, coords); + _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_event_get_dsc)(list, index); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_ptr_lv_event_dsc_t((void*)_res); } -static PyMethodDef py_lv_draw_sw_letter_struct_method_def = { - "lv_draw_sw_letter", - (PyCFunction)py_lv_draw_sw_letter_struct_method, +static PyMethodDef py_lv_event_get_dsc_struct_method_def = { + "lv_event_get_dsc", + (PyCFunction)py_lv_event_get_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88487,30 +83109,30 @@ static PyMethodDef py_lv_draw_sw_letter_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_label(lv_draw_task_t *t, const lv_draw_label_dsc_t *dsc, const lv_area_t *coords) + * bool lv_event_remove(lv_event_list_t *list, uint32_t index) */ -static PyObject *py_lv_draw_sw_label_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_label_dsc_t *dsc = (const lv_draw_label_dsc_t *)mp_write_ptr_lv_draw_label_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_label_dsc_t *, const lv_area_t *))lv_draw_sw_label)(t, dsc, coords); + _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_event_remove)(list, index); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_label_struct_method_def = { - "lv_draw_sw_label", - (PyCFunction)py_lv_draw_sw_label_struct_method, +static PyMethodDef py_lv_event_remove_struct_method_def = { + "lv_event_remove", + (PyCFunction)py_lv_event_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88518,30 +83140,27 @@ static PyMethodDef py_lv_draw_sw_label_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_arc(lv_draw_task_t *t, const lv_draw_arc_dsc_t *dsc, const lv_area_t *coords) + * void lv_event_remove_all(lv_event_list_t *list) */ -static PyObject *py_lv_draw_sw_arc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_remove_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_arc_dsc_t *dsc = (const lv_draw_arc_dsc_t *)mp_write_ptr_lv_draw_arc_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_arc_dsc_t *, const lv_area_t *))lv_draw_sw_arc)(t, dsc, coords); + ((void (*)(lv_event_list_t *))lv_event_remove_all)(list); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_sw_arc_struct_method_def = { - "lv_draw_sw_arc", - (PyCFunction)py_lv_draw_sw_arc_struct_method, +static PyMethodDef py_lv_event_remove_all_struct_method_def = { + "lv_event_remove_all", + (PyCFunction)py_lv_event_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88549,60 +83168,74 @@ static PyMethodDef py_lv_draw_sw_arc_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_line(lv_draw_task_t *t, const lv_draw_line_dsc_t *dsc) + * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) */ -static PyObject *py_lv_draw_sw_line_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_event_push_and_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_line_dsc_t *dsc = (const lv_draw_line_dsc_t *)mp_write_ptr_lv_draw_line_dsc_t(dsc_py); + PyObject *code_py; PyObject *original_target_py; PyObject *param_py; + if (!PyArg_ParseTuple(py_args, "OOO", &code_py, &original_target_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } + lv_event_list_t *event_list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + lv_event_code_t code = (int)mp_obj_get_int(code_py); + void *original_target = mp_to_ptr(original_target_py); + void *param = mp_to_ptr(param_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_result_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_line_dsc_t *))lv_draw_sw_line)(t, dsc); + _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_event_push_and_send)(event_list, code, original_target, param); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_draw_sw_line_struct_method_def = { - "lv_draw_sw_line", - (PyCFunction)py_lv_draw_sw_line_struct_method, +static PyMethodDef py_lv_event_push_and_send_struct_method_def = { + "lv_event_push_and_send", + (PyCFunction)py_lv_event_push_and_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_event_list_t_methods[] = { + {"send", (PyCFunction)py_lv_event_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"add", (PyCFunction)py_lv_event_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_dsc", (PyCFunction)py_lv_event_remove_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_count", (PyCFunction)py_lv_event_get_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_dsc", (PyCFunction)py_lv_event_get_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_event_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_all", (PyCFunction)py_lv_event_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"push_and_send", (PyCFunction)py_lv_event_push_and_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_draw_sw_layer(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords) + * inline static uint32_t lv_array_size(const lv_array_t *array) */ -static PyObject *py_lv_draw_sw_layer_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &draw_dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *))lv_draw_sw_layer)(t, draw_dsc, coords); + _res = ((uint32_t (*)(const lv_array_t *))lv_array_size)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_layer_struct_method_def = { - "lv_draw_sw_layer", - (PyCFunction)py_lv_draw_sw_layer_struct_method, +static PyMethodDef py_lv_array_size_struct_method_def = { + "lv_array_size", + (PyCFunction)py_lv_array_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88610,29 +83243,28 @@ static PyMethodDef py_lv_draw_sw_layer_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_triangle(lv_draw_task_t *t, const lv_draw_triangle_dsc_t *dsc) + * inline static uint32_t lv_array_capacity(const lv_array_t *array) */ -static PyObject *py_lv_draw_sw_triangle_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_capacity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_triangle_dsc_t *dsc = (const lv_draw_triangle_dsc_t *)mp_write_ptr_lv_draw_triangle_dsc_t(dsc_py); + + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint32_t _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_triangle_dsc_t *))lv_draw_sw_triangle)(t, dsc); + _res = ((uint32_t (*)(const lv_array_t *))lv_array_capacity)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_draw_sw_triangle_struct_method_def = { - "lv_draw_sw_triangle", - (PyCFunction)py_lv_draw_sw_triangle_struct_method, +static PyMethodDef py_lv_array_capacity_struct_method_def = { + "lv_array_capacity", + (PyCFunction)py_lv_array_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88640,30 +83272,28 @@ static PyMethodDef py_lv_draw_sw_triangle_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_blur(lv_draw_task_t *t, const lv_draw_blur_dsc_t *dsc, const lv_area_t *coords) + * inline static bool lv_array_is_empty(const lv_array_t *array) */ -static PyObject *py_lv_draw_sw_blur_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *coords_py; - if (!PyArg_ParseTuple(py_args, "OO", &dsc_py, &coords_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_blur_dsc_t *dsc = (const lv_draw_blur_dsc_t *)mp_write_ptr_lv_draw_blur_dsc_t(dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); + + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_blur_dsc_t *, const lv_area_t *))lv_draw_sw_blur)(t, dsc, coords); + _res = ((bool (*)(const lv_array_t *))lv_array_is_empty)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_blur_struct_method_def = { - "lv_draw_sw_blur", - (PyCFunction)py_lv_draw_sw_blur_struct_method, +static PyMethodDef py_lv_array_is_empty_struct_method_def = { + "lv_array_is_empty", + (PyCFunction)py_lv_array_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88671,219 +83301,146 @@ static PyMethodDef py_lv_draw_sw_blur_struct_method_def = { /* * lvgl extension definition for: - * void lv_draw_sw_mask_rect(lv_draw_task_t *t, const lv_draw_mask_rect_dsc_t *dsc) + * inline static bool lv_array_is_full(const lv_array_t *array) */ -static PyObject *py_lv_draw_sw_mask_rect_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_is_full_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_mask_rect_dsc_t *dsc = (const lv_draw_mask_rect_dsc_t *)mp_write_ptr_lv_draw_mask_rect_dsc_t(dsc_py); + + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_mask_rect_dsc_t *))lv_draw_sw_mask_rect)(t, dsc); + _res = ((bool (*)(const lv_array_t *))lv_array_is_full)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_draw_sw_mask_rect_struct_method_def = { - "lv_draw_sw_mask_rect", - (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, +static PyMethodDef py_lv_array_is_full_struct_method_def = { + "lv_array_is_full", + (PyCFunction)py_lv_array_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) - * lv_draw_image_core_cb draw_core_cb - */ - - /* * lvgl extension definition for: - * void lv_draw_image_normal_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * inline static void lv_array_clear(lv_array_t *array) */ -static PyObject *py_lv_draw_image_normal_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); - void *draw_core_cb = NULL; + + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_normal_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); + ((void (*)(lv_array_t *))lv_array_clear)(array); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_draw_image_normal_helper_struct_method_def = { - "lv_draw_image_normal_helper", - (PyCFunction)py_lv_draw_image_normal_helper_struct_method, +static PyMethodDef py_lv_array_clear_struct_method_def = { + "lv_array_clear", + (PyCFunction)py_lv_array_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_image_core_cb(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_image_decoder_dsc_t *decoder_dsc, lv_draw_image_sup_t *sup, const lv_area_t *img_coords, const lv_area_t *clipped_img_area) - * lv_draw_image_core_cb draw_core_cb - */ - - /* * lvgl extension definition for: - * void lv_draw_image_tiled_helper(lv_draw_task_t *t, const lv_draw_image_dsc_t *draw_dsc, const lv_area_t *coords, lv_draw_image_core_cb draw_core_cb, const lv_image_decoder_args_t *decoder_args) + * inline static void *lv_array_front(const lv_array_t *array) */ -static PyObject *py_lv_draw_image_tiled_helper_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_front_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *draw_dsc_py; PyObject *coords_py; PyObject *draw_core_cb_py; PyObject *decoder_args_py; - if (!PyArg_ParseTuple(py_args, "OOOO", &draw_dsc_py, &coords_py, &draw_core_cb_py, &decoder_args_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - const lv_draw_image_dsc_t *draw_dsc = (const lv_draw_image_dsc_t *)mp_write_ptr_lv_draw_image_dsc_t(draw_dsc_py); - const lv_area_t *coords = (const lv_area_t *)mp_write_ptr_lv_area_t(coords_py); - const lv_image_decoder_args_t *decoder_args = (const lv_image_decoder_args_t *)mp_write_ptr_lv_image_decoder_args_t(decoder_args_py); - void *draw_core_cb = NULL; + + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, const lv_draw_image_dsc_t *, const lv_area_t *, lv_draw_image_core_cb, const lv_image_decoder_args_t *))lv_draw_image_tiled_helper)(t, draw_dsc, coords, draw_core_cb, decoder_args); + _res = ((void *(*)(const lv_array_t *))lv_array_front)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_image_tiled_helper_struct_method_def = { - "lv_draw_image_tiled_helper", - (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, +static PyMethodDef py_lv_array_front_struct_method_def = { + "lv_array_front", + (PyCFunction)py_lv_array_front_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! void lv_draw_glyph_cb_t(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, lv_draw_fill_dsc_t *fill_dsc, const lv_area_t *fill_area) - * lv_draw_glyph_cb_t cb - */ - - /* * lvgl extension definition for: - * void lv_draw_unit_draw_letter_internal(lv_draw_task_t *t, lv_draw_glyph_dsc_t *dsc, const lv_point_t *pos, const lv_font_t *font, uint32_t letter, lv_draw_glyph_cb_t cb) + * inline static void *lv_array_back(const lv_array_t *array) */ -static PyObject *py_lv_draw_unit_draw_letter_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; PyObject *pos_py; PyObject *font_py; long letter_val; PyObject *cb_py; - if (!PyArg_ParseTuple(py_args, "OOOlO", &dsc_py, &pos_py, &font_py, &letter_val, &cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_draw_task_t *t = (lv_draw_task_t *)mp_write_ptr_lv_draw_task_t(self); - lv_draw_glyph_dsc_t *dsc = mp_write_ptr_lv_draw_glyph_dsc_t(dsc_py); - const lv_point_t *pos = (const lv_point_t *)mp_write_ptr_lv_point_t(pos_py); - const lv_font_t *font = (const lv_font_t *)mp_write_ptr_lv_font_t(font_py); - uint32_t letter = (uint32_t)letter_val; - void *cb = NULL; + + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_draw_task_t *, lv_draw_glyph_dsc_t *, const lv_point_t *, const lv_font_t *, uint32_t, lv_draw_glyph_cb_t))lv_draw_unit_draw_letter_internal)(t, dsc, pos, font, letter, cb); + _res = ((void *(*)(const lv_array_t *))lv_array_back)(array); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_draw_unit_draw_letter_internal_struct_method_def = { - "lv_draw_unit_draw_letter_internal", - (PyCFunction)py_lv_draw_unit_draw_letter_internal_struct_method, +static PyMethodDef py_lv_array_back_struct_method_def = { + "lv_array_back", + (PyCFunction)py_lv_array_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_draw_task_t_methods[] = { - {"get_dependent_count", (PyCFunction)py_lv_draw_get_dependent_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_type", (PyCFunction)py_lv_draw_task_get_type_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_draw_dsc", (PyCFunction)py_lv_draw_task_get_draw_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_area", (PyCFunction)py_lv_draw_task_get_area_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_fill_dsc", (PyCFunction)py_lv_draw_task_get_fill_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_border_dsc", (PyCFunction)py_lv_draw_task_get_border_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_box_shadow_dsc", (PyCFunction)py_lv_draw_task_get_box_shadow_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_label_dsc", (PyCFunction)py_lv_draw_task_get_label_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"label_iterate_characters", (PyCFunction)py_lv_draw_label_iterate_characters_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"unit_draw_letter", (PyCFunction)py_lv_draw_unit_draw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_image_dsc", (PyCFunction)py_lv_draw_task_get_image_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_line_dsc", (PyCFunction)py_lv_draw_task_get_line_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"line_iterate", (PyCFunction)py_lv_draw_line_iterate_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_arc_dsc", (PyCFunction)py_lv_draw_task_get_arc_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_triangle_dsc", (PyCFunction)py_lv_draw_task_get_triangle_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_blur_dsc", (PyCFunction)py_lv_draw_task_get_blur_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_mask_rect_dsc", (PyCFunction)py_lv_draw_task_get_mask_rect_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"cleanup_task", (PyCFunction)py_lv_draw_cleanup_task_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_blend", (PyCFunction)py_lv_draw_sw_blend_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_fill", (PyCFunction)py_lv_draw_sw_fill_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_border", (PyCFunction)py_lv_draw_sw_border_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_box_shadow", (PyCFunction)py_lv_draw_sw_box_shadow_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_image", (PyCFunction)py_lv_draw_sw_image_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_letter", (PyCFunction)py_lv_draw_sw_letter_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_label", (PyCFunction)py_lv_draw_sw_label_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_arc", (PyCFunction)py_lv_draw_sw_arc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_line", (PyCFunction)py_lv_draw_sw_line_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_layer", (PyCFunction)py_lv_draw_sw_layer_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_triangle", (PyCFunction)py_lv_draw_sw_triangle_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_blur", (PyCFunction)py_lv_draw_sw_blur_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"sw_mask_rect", (PyCFunction)py_lv_draw_sw_mask_rect_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"image_normal_helper", (PyCFunction)py_lv_draw_image_normal_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"image_tiled_helper", (PyCFunction)py_lv_draw_image_tiled_helper_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"unit_draw_letter_internal", (PyCFunction)py_lv_draw_unit_draw_letter_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - -PyMethodDef py_lv_draw_unit_t_methods[] = {{NULL}}; - /* * lvgl extension definition for: - * inline static lv_color32_t lv_color32_unpremultiply(lv_color32_t c) + * lv_result_t lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_color32_unpremultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } + long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t))lv_color32_unpremultiply)(c); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_array_init)(array, capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color32_unpremultiply_struct_method_def = { - "lv_color32_unpremultiply", - (PyCFunction)py_lv_color32_unpremultiply_struct_method, +static PyMethodDef py_lv_array_init_struct_method_def = { + "lv_array_init", + (PyCFunction)py_lv_array_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88891,30 +83448,31 @@ static PyMethodDef py_lv_color32_unpremultiply_struct_method_def = { /* * lvgl extension definition for: - * inline static uint8_t lv_color32_lumi_of(lv_color32_t c, bool premultiplied) + * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) */ -static PyObject *py_lv_color32_lumi_of_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_init_from_buf_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long premultiplied_val; - if (!PyArg_ParseTuple(py_args, "l", &premultiplied_val)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } - bool premultiplied = (premultiplied_val != 0); + PyObject *buf_py; long capacity_val; long element_size_val; + if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + void *buf = mp_to_ptr(buf_py); + uint32_t capacity = (uint32_t)capacity_val; + uint32_t element_size = (uint32_t)element_size_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color32_t, bool))lv_color32_lumi_of)(c, premultiplied); + ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_array_init_from_buf)(array, buf, capacity, element_size); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color32_lumi_of_struct_method_def = { - "lv_color32_lumi_of", - (PyCFunction)py_lv_color32_lumi_of_struct_method, +static PyMethodDef py_lv_array_init_from_buf_struct_method_def = { + "lv_array_init_from_buf", + (PyCFunction)py_lv_array_init_from_buf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88922,30 +83480,30 @@ static PyMethodDef py_lv_color32_lumi_of_struct_method_def = { /* * lvgl extension definition for: - * inline static lv_color32_t lv_color_mix32_inlined(lv_color32_t fg, lv_color32_t bg) + * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) */ -static PyObject *py_lv_color_mix32_inlined_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_resize_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + long new_capacity_val; + if (!PyArg_ParseTuple(py_args, "l", &new_capacity_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t new_capacity = (uint32_t)new_capacity_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + bool _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_inlined)(fg, bg); + _res = ((bool (*)(lv_array_t *, uint32_t))lv_array_resize)(array, new_capacity); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_color_mix32_inlined_struct_method_def = { - "lv_color_mix32_inlined", - (PyCFunction)py_lv_color_mix32_inlined_struct_method, +static PyMethodDef py_lv_array_resize_struct_method_def = { + "lv_array_resize", + (PyCFunction)py_lv_array_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88953,30 +83511,27 @@ static PyMethodDef py_lv_color_mix32_inlined_struct_method_def = { /* * lvgl extension definition for: - * inline static lv_color32_t lv_color_mix32_premultiplied_inlined(lv_color32_t fg, lv_color32_t bg) + * void lv_array_deinit(lv_array_t *array) */ -static PyObject *py_lv_color_mix32_premultiplied_inlined_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_deinit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_premultiplied_inlined)(fg, bg); + ((void (*)(lv_array_t *))lv_array_deinit)(array); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color_mix32_premultiplied_inlined_struct_method_def = { - "lv_color_mix32_premultiplied_inlined", - (PyCFunction)py_lv_color_mix32_premultiplied_inlined_struct_method, +static PyMethodDef py_lv_array_deinit_struct_method_def = { + "lv_array_deinit", + (PyCFunction)py_lv_array_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -88984,30 +83539,29 @@ static PyMethodDef py_lv_color_mix32_premultiplied_inlined_struct_method_def = { /* * lvgl extension definition for: - * bool lv_color32_eq(lv_color32_t c1, lv_color32_t c2) + * void lv_array_copy(lv_array_t *target, const lv_array_t *source) */ -static PyObject *py_lv_color32_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *c2_py; - if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t c1 = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c1 = *p_; } - lv_color32_t c2 = mp_write_lv_color32_t(c2_py); + PyObject *source_py; + if (!PyArg_ParseTuple(py_args, "O", &source_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *target = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(source_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_color32_t, lv_color32_t))lv_color32_eq)(c1, c2); + ((void (*)(lv_array_t *, const lv_array_t *))lv_array_copy)(target, source); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_color32_eq_struct_method_def = { - "lv_color32_eq", - (PyCFunction)py_lv_color32_eq_struct_method, +static PyMethodDef py_lv_array_copy_struct_method_def = { + "lv_array_copy", + (PyCFunction)py_lv_array_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89015,27 +83569,27 @@ static PyMethodDef py_lv_color32_eq_struct_method_def = { /* * lvgl extension definition for: - * void lv_color_premultiply(lv_color32_t *c) + * void lv_array_shrink(lv_array_t *array) */ -static PyObject *py_lv_color_premultiply_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_shrink_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_color32_t *c = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lvpy_lock(); - ((void (*)(lv_color32_t *))lv_color_premultiply)(c); + ((void (*)(lv_array_t *))lv_array_shrink)(array); lvpy_unlock(); PyGILState_Release(gstate); Py_RETURN_NONE; } -static PyMethodDef py_lv_color_premultiply_struct_method_def = { - "lv_color_premultiply", - (PyCFunction)py_lv_color_premultiply_struct_method, +static PyMethodDef py_lv_array_shrink_struct_method_def = { + "lv_array_shrink", + (PyCFunction)py_lv_array_shrink_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89043,28 +83597,30 @@ static PyMethodDef py_lv_color_premultiply_struct_method_def = { /* * lvgl extension definition for: - * uint8_t lv_color32_luminance(lv_color32_t c) + * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) */ -static PyObject *py_lv_color32_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_color32_t c = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) c = *p_; } + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint8_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((uint8_t (*)(lv_color32_t))lv_color32_luminance)(c); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove)(array, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color32_luminance_struct_method_def = { - "lv_color32_luminance", - (PyCFunction)py_lv_color32_luminance_struct_method, +static PyMethodDef py_lv_array_remove_struct_method_def = { + "lv_array_remove", + (PyCFunction)py_lv_array_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89072,30 +83628,30 @@ static PyMethodDef py_lv_color32_luminance_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_mix32(lv_color32_t fg, lv_color32_t bg) + * lv_result_t lv_array_remove_unordered(lv_array_t *array, uint32_t index) */ -static PyObject *py_lv_color_mix32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_remove_unordered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32)(fg, bg); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove_unordered)(array, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_mix32_struct_method_def = { - "lv_color_mix32", - (PyCFunction)py_lv_color_mix32_struct_method, +static PyMethodDef py_lv_array_remove_unordered_struct_method_def = { + "lv_array_remove_unordered", + (PyCFunction)py_lv_array_remove_unordered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89103,30 +83659,31 @@ static PyMethodDef py_lv_color_mix32_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_mix32_premultiplied(lv_color32_t fg, lv_color32_t bg) + * lv_result_t lv_array_erase(lv_array_t *array, uint32_t start, uint32_t end) */ -static PyObject *py_lv_color_mix32_premultiplied_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_erase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + long start_val; long end_val; + if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t start = (uint32_t)start_val; + uint32_t end = (uint32_t)end_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_mix32_premultiplied)(fg, bg); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_array_erase)(array, start, end); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_mix32_premultiplied_struct_method_def = { - "lv_color_mix32_premultiplied", - (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, +static PyMethodDef py_lv_array_erase_struct_method_def = { + "lv_array_erase", + (PyCFunction)py_lv_array_erase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89134,172 +83691,179 @@ static PyMethodDef py_lv_color_mix32_premultiplied_struct_method_def = { /* * lvgl extension definition for: - * lv_color32_t lv_color_over32(lv_color32_t fg, lv_color32_t bg) + * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) */ -static PyObject *py_lv_color_over32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_concat_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *bg_py; - if (!PyArg_ParseTuple(py_args, "O", &bg_py)) { PyGILState_Release(gstate); return NULL; } - lv_color32_t fg = {0}; { lv_color32_t *p_ = (lv_color32_t *)mp_write_ptr_lv_color32_t(self); if (p_) fg = *p_; } - lv_color32_t bg = mp_write_lv_color32_t(bg_py); + PyObject *other_py; + if (!PyArg_ParseTuple(py_args, "O", &other_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(other_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_color32_t _res; + lv_result_t _res; lvpy_lock(); - _res = ((lv_color32_t (*)(lv_color32_t, lv_color32_t))lv_color_over32)(fg, bg); + _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_array_concat)(array, other); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_lv_color32_t(_res); + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_color_over32_struct_method_def = { - "lv_color_over32", - (PyCFunction)py_lv_color_over32_struct_method, +static PyMethodDef py_lv_array_concat_struct_method_def = { + "lv_array_concat", + (PyCFunction)py_lv_array_concat_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_color32_t_methods[] = { - {"unpremultiply", (PyCFunction)py_lv_color32_unpremultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"lumi_of", (PyCFunction)py_lv_color32_lumi_of_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_mix32_inlined", (PyCFunction)py_lv_color_mix32_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_mix32_premultiplied_inlined", (PyCFunction)py_lv_color_mix32_premultiplied_inlined_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"eq", (PyCFunction)py_lv_color32_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_premultiply", (PyCFunction)py_lv_color_premultiply_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"luminance", (PyCFunction)py_lv_color32_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_mix32", (PyCFunction)py_lv_color_mix32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_mix32_premultiplied", (PyCFunction)py_lv_color_mix32_premultiplied_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"color_over32", (PyCFunction)py_lv_color_over32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * lv_result_t lv_event_send(lv_event_list_t *list, lv_event_t *e, bool preprocess) + * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) */ -static PyObject *py_lv_event_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_push_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *e_py; long preprocess_val; - if (!PyArg_ParseTuple(py_args, "Ol", &e_py, &preprocess_val)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - lv_event_t *e = mp_write_ptr_lv_event_t(e_py); - bool preprocess = (preprocess_val != 0); + PyObject *element_py; + if (!PyArg_ParseTuple(py_args, "O", &element_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const void *element = (const void *)mp_to_ptr(element_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_t *, bool))lv_event_send)(list, e, preprocess); + _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_array_push_back)(array, element); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_event_send_struct_method_def = { - "lv_event_send", - (PyCFunction)py_lv_event_send_struct_method, +static PyMethodDef py_lv_array_push_back_struct_method_def = { + "lv_array_push_back", + (PyCFunction)py_lv_array_push_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; /* - * Callback function lv_event_add_cb (CPython) - * void lv_event_cb_t(lv_event_t *e) + * lvgl extension definition for: + * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) */ -static void lv_event_add_cb_callback(lv_event_t *arg0) +static PyObject *py_lv_array_assign_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_event_add_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_event_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); + (void)py_kwds; + long index_val; PyObject *value_py; + if (!PyArg_ParseTuple(py_args, "lO", &index_val, &value_py)) { PyGILState_Release(gstate); return NULL; } + lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; + const void *value = (const void *)mp_to_ptr(value_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_result_t _res; + lvpy_lock(); + _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_array_assign)(array, index, value); + lvpy_unlock(); + PyGILState_Release(gstate); + return mp_obj_new_int(_res); } +static PyMethodDef py_lv_array_assign_struct_method_def = { + "lv_array_assign", + (PyCFunction)py_lv_array_assign_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + /* * lvgl extension definition for: - * lv_event_dsc_t *lv_event_add(lv_event_list_t *list, lv_event_cb_t cb, lv_event_code_t filter, void *user_data) + * void *lv_array_at(const lv_array_t *array, uint32_t index) */ -static PyObject *py_lv_event_add_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_array_at_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *cb_py; PyObject *filter_py; PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "OOO", &cb_py, &filter_py, &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - void *user_data = mp_to_ptr(user_data_py); - lv_event_code_t filter = (int)mp_obj_get_int(filter_py); - void *cb = mp_lv_callback(cb_py, &lv_event_add_cb_callback, "lv_event_add_cb", &user_data, NULL, (NULL), (NULL)); + long index_val; + if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } + const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + uint32_t index = (uint32_t)index_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; + void * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, lv_event_cb_t, lv_event_code_t, void *))lv_event_add)(list, cb, filter, user_data); + _res = ((void *(*)(const lv_array_t *, uint32_t))lv_array_at)(array, index); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_event_add_struct_method_def = { - "lv_event_add", - (PyCFunction)py_lv_event_add_struct_method, +static PyMethodDef py_lv_array_at_struct_method_def = { + "lv_array_at", + (PyCFunction)py_lv_array_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_array_t_methods[] = { + {"size", (PyCFunction)py_lv_array_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"capacity", (PyCFunction)py_lv_array_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_empty", (PyCFunction)py_lv_array_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"is_full", (PyCFunction)py_lv_array_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"clear", (PyCFunction)py_lv_array_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"front", (PyCFunction)py_lv_array_front_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"back", (PyCFunction)py_lv_array_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init", (PyCFunction)py_lv_array_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"init_from_buf", (PyCFunction)py_lv_array_init_from_buf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"resize", (PyCFunction)py_lv_array_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"deinit", (PyCFunction)py_lv_array_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"copy", (PyCFunction)py_lv_array_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"shrink", (PyCFunction)py_lv_array_shrink_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove", (PyCFunction)py_lv_array_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"remove_unordered", (PyCFunction)py_lv_array_remove_unordered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"erase", (PyCFunction)py_lv_array_erase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"concat", (PyCFunction)py_lv_array_concat_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"push_back", (PyCFunction)py_lv_array_push_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"assign", (PyCFunction)py_lv_array_assign_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"at", (PyCFunction)py_lv_array_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * bool lv_event_remove_dsc(lv_event_list_t *list, lv_event_dsc_t *dsc) + * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) */ -static PyObject *py_lv_event_remove_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *dsc_py; - if (!PyArg_ParseTuple(py_args, "O", &dsc_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - lv_event_dsc_t *dsc = mp_write_ptr_lv_event_dsc_t(dsc_py); + PyObject *src_py; + if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *dst = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(src_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_event_list_t *, lv_event_dsc_t *))lv_event_remove_dsc)(list, dsc); + ((void (*)(lv_theme_t *, const lv_theme_t *))lv_theme_copy)(dst, src); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_remove_dsc_struct_method_def = { - "lv_event_remove_dsc", - (PyCFunction)py_lv_event_remove_dsc_struct_method, +static PyMethodDef py_lv_theme_copy_struct_method_def = { + "lv_theme_copy", + (PyCFunction)py_lv_theme_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89307,59 +83871,92 @@ static PyMethodDef py_lv_event_remove_dsc_struct_method_def = { /* * lvgl extension definition for: - * uint32_t lv_event_get_count(lv_event_list_t *list) + * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) */ -static PyObject *py_lv_event_get_count_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_set_parent_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + PyObject *parent_py; + if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + lv_theme_t *parent = mp_write_ptr_lv_theme_t(parent_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(lv_event_list_t *))lv_event_get_count)(list); + ((void (*)(lv_theme_t *, lv_theme_t *))lv_theme_set_parent)(theme, parent); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_count_struct_method_def = { - "lv_event_get_count", - (PyCFunction)py_lv_event_get_count_struct_method, +static PyMethodDef py_lv_theme_set_parent_struct_method_def = { + "lv_theme_set_parent", + (PyCFunction)py_lv_theme_set_parent_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +/* + * Callback function lv_theme_t_apply_cb (CPython) + * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) + */ +static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_theme_t_apply_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_theme_t((void*)arg0); + PyObject *py_arg1 = lv_to_mp((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * lvgl extension definition for: - * lv_event_dsc_t *lv_event_get_dsc(lv_event_list_t *list, uint32_t index) + * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) */ -static PyObject *py_lv_event_get_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_set_apply_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - uint32_t index = (uint32_t)index_val; + PyObject *apply_cb_py; + if (!PyArg_ParseTuple(py_args, "O", &apply_cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + void *apply_cb = mp_lv_callback(apply_cb_py, &lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", &theme->user_data, theme, (NULL), (NULL)); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_event_dsc_t * _res; lvpy_lock(); - _res = ((lv_event_dsc_t *(*)(lv_event_list_t *, uint32_t))lv_event_get_dsc)(list, index); + ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_theme_set_apply_cb)(theme, apply_cb); lvpy_unlock(); PyGILState_Release(gstate); - return mp_read_ptr_lv_event_dsc_t((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_get_dsc_struct_method_def = { - "lv_event_get_dsc", - (PyCFunction)py_lv_event_get_dsc_struct_method, +static PyMethodDef py_lv_theme_set_apply_cb_struct_method_def = { + "lv_theme_set_apply_cb", + (PyCFunction)py_lv_theme_set_apply_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89367,30 +83964,29 @@ static PyMethodDef py_lv_event_get_dsc_struct_method_def = { /* * lvgl extension definition for: - * bool lv_event_remove(lv_event_list_t *list, uint32_t index) + * void lv_theme_set_user_data(lv_theme_t *theme, void *user_data) */ -static PyObject *py_lv_event_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - uint32_t index = (uint32_t)index_val; + PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + void *user_data = mp_to_ptr(user_data_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; lvpy_lock(); - _res = ((bool (*)(lv_event_list_t *, uint32_t))lv_event_remove)(list, index); + ((void (*)(lv_theme_t *, void *))lv_theme_set_user_data)(theme, user_data); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_remove_struct_method_def = { - "lv_event_remove", - (PyCFunction)py_lv_event_remove_struct_method, +static PyMethodDef py_lv_theme_set_user_data_struct_method_def = { + "lv_theme_set_user_data", + (PyCFunction)py_lv_theme_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89398,27 +83994,28 @@ static PyMethodDef py_lv_event_remove_struct_method_def = { /* * lvgl extension definition for: - * void lv_event_remove_all(lv_event_list_t *list) + * void *lv_theme_get_user_data(const lv_theme_t *theme) */ -static PyObject *py_lv_event_remove_all_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_event_list_t *list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); + const lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + void * _res; lvpy_lock(); - ((void (*)(lv_event_list_t *))lv_event_remove_all)(list); + _res = ((void *(*)(const lv_theme_t *))lv_theme_get_user_data)(theme); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return ptr_to_mp((void*)_res); } -static PyMethodDef py_lv_event_remove_all_struct_method_def = { - "lv_event_remove_all", - (PyCFunction)py_lv_event_remove_all_struct_method, +static PyMethodDef py_lv_theme_get_user_data_struct_method_def = { + "lv_theme_get_user_data", + (PyCFunction)py_lv_theme_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89426,74 +84023,70 @@ static PyMethodDef py_lv_event_remove_all_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_event_push_and_send(lv_event_list_t *event_list, lv_event_code_t code, void *original_target, void *param) + * void lv_theme_delete(lv_theme_t *theme) */ -static PyObject *py_lv_event_push_and_send_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_theme_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *code_py; PyObject *original_target_py; PyObject *param_py; - if (!PyArg_ParseTuple(py_args, "OOO", &code_py, &original_target_py, ¶m_py)) { PyGILState_Release(gstate); return NULL; } - lv_event_list_t *event_list = (lv_event_list_t *)mp_write_ptr_lv_event_list_t(self); - lv_event_code_t code = (int)mp_obj_get_int(code_py); - void *original_target = mp_to_ptr(original_target_py); - void *param = mp_to_ptr(param_py); + + lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_event_list_t *, lv_event_code_t, void *, void *))lv_event_push_and_send)(event_list, code, original_target, param); + ((void (*)(lv_theme_t *))lv_theme_delete)(theme); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_event_push_and_send_struct_method_def = { - "lv_event_push_and_send", - (PyCFunction)py_lv_event_push_and_send_struct_method, +static PyMethodDef py_lv_theme_delete_struct_method_def = { + "lv_theme_delete", + (PyCFunction)py_lv_theme_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_event_list_t_methods[] = { - {"send", (PyCFunction)py_lv_event_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"add", (PyCFunction)py_lv_event_add_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_dsc", (PyCFunction)py_lv_event_remove_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_count", (PyCFunction)py_lv_event_get_count_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_dsc", (PyCFunction)py_lv_event_get_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove", (PyCFunction)py_lv_event_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_all", (PyCFunction)py_lv_event_remove_all_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"push_and_send", (PyCFunction)py_lv_event_push_and_send_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_theme_t_methods[] = { + {"copy", (PyCFunction)py_lv_theme_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_parent", (PyCFunction)py_lv_theme_set_parent_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_apply_cb", (PyCFunction)py_lv_theme_set_apply_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_user_data", (PyCFunction)py_lv_theme_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_user_data", (PyCFunction)py_lv_theme_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"delete", (PyCFunction)py_lv_theme_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; /* * lvgl extension definition for: - * inline static uint32_t lv_array_size(const lv_array_t *array) + * inline static bool lv_color_is_in_range(lv_color_t color, lv_color_t l_color, lv_color_t h_color) */ -static PyObject *py_lv_array_size_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_is_in_range_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + PyObject *l_color_py; PyObject *h_color_py; + if (!PyArg_ParseTuple(py_args, "OO", &l_color_py, &h_color_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + lv_color_t l_color = mp_write_lv_color_t(l_color_py); + lv_color_t h_color = mp_write_lv_color_t(h_color_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + bool _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_array_t *))lv_array_size)(array); + _res = ((bool (*)(lv_color_t, lv_color_t, lv_color_t))lv_color_is_in_range)(color, l_color, h_color); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_array_size_struct_method_def = { - "lv_array_size", - (PyCFunction)py_lv_array_size_struct_method, +static PyMethodDef py_lv_color_is_in_range_struct_method_def = { + "lv_color_is_in_range", + (PyCFunction)py_lv_color_is_in_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89501,28 +84094,30 @@ static PyMethodDef py_lv_array_size_struct_method_def = { /* * lvgl extension definition for: - * inline static uint32_t lv_array_capacity(const lv_array_t *array) + * lv_color32_t lv_color_to_32(lv_color_t color, lv_opa_t opa) */ -static PyObject *py_lv_array_capacity_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + long opa_val; + if (!PyArg_ParseTuple(py_args, "l", &opa_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } + lv_opa_t opa = (lv_opa_t)opa_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - uint32_t _res; + lv_color32_t _res; lvpy_lock(); - _res = ((uint32_t (*)(const lv_array_t *))lv_array_capacity)(array); + _res = ((lv_color32_t (*)(lv_color_t, lv_opa_t))lv_color_to_32)(color, opa); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int_from_uint(_res); + return mp_read_lv_color32_t(_res); } -static PyMethodDef py_lv_array_capacity_struct_method_def = { - "lv_array_capacity", - (PyCFunction)py_lv_array_capacity_struct_method, +static PyMethodDef py_lv_color_to_32_struct_method_def = { + "lv_color_to_32", + (PyCFunction)py_lv_color_to_32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89530,28 +84125,28 @@ static PyMethodDef py_lv_array_capacity_struct_method_def = { /* * lvgl extension definition for: - * inline static bool lv_array_is_empty(const lv_array_t *array) + * uint32_t lv_color_to_int(lv_color_t c) */ -static PyObject *py_lv_array_is_empty_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_int_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint32_t _res; lvpy_lock(); - _res = ((bool (*)(const lv_array_t *))lv_array_is_empty)(array); + _res = ((uint32_t (*)(lv_color_t))lv_color_to_int)(c); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_array_is_empty_struct_method_def = { - "lv_array_is_empty", - (PyCFunction)py_lv_array_is_empty_struct_method, +static PyMethodDef py_lv_color_to_int_struct_method_def = { + "lv_color_to_int", + (PyCFunction)py_lv_color_to_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89559,28 +84154,30 @@ static PyMethodDef py_lv_array_is_empty_struct_method_def = { /* * lvgl extension definition for: - * inline static bool lv_array_is_full(const lv_array_t *array) + * bool lv_color_eq(lv_color_t c1, lv_color_t c2) */ -static PyObject *py_lv_array_is_full_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_eq_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + PyObject *c2_py; + if (!PyArg_ParseTuple(py_args, "O", &c2_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } + lv_color_t c2 = mp_write_lv_color_t(c2_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } bool _res; lvpy_lock(); - _res = ((bool (*)(const lv_array_t *))lv_array_is_full)(array); + _res = ((bool (*)(lv_color_t, lv_color_t))lv_color_eq)(c1, c2); lvpy_unlock(); PyGILState_Release(gstate); return convert_to_bool(_res); } -static PyMethodDef py_lv_array_is_full_struct_method_def = { - "lv_array_is_full", - (PyCFunction)py_lv_array_is_full_struct_method, +static PyMethodDef py_lv_color_eq_struct_method_def = { + "lv_color_eq", + (PyCFunction)py_lv_color_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89588,27 +84185,28 @@ static PyMethodDef py_lv_array_is_full_struct_method_def = { /* * lvgl extension definition for: - * inline static void lv_array_clear(lv_array_t *array) + * uint16_t lv_color_to_u16(lv_color_t color) */ -static PyObject *py_lv_array_clear_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_u16_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint16_t _res; lvpy_lock(); - ((void (*)(lv_array_t *))lv_array_clear)(array); + _res = ((uint16_t (*)(lv_color_t))lv_color_to_u16)(color); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_array_clear_struct_method_def = { - "lv_array_clear", - (PyCFunction)py_lv_array_clear_struct_method, +static PyMethodDef py_lv_color_to_u16_struct_method_def = { + "lv_color_to_u16", + (PyCFunction)py_lv_color_to_u16_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89616,28 +84214,28 @@ static PyMethodDef py_lv_array_clear_struct_method_def = { /* * lvgl extension definition for: - * inline static void *lv_array_front(const lv_array_t *array) + * uint32_t lv_color_to_u32(lv_color_t color) */ -static PyObject *py_lv_array_front_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_u32_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + uint32_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_array_t *))lv_array_front)(array); + _res = ((uint32_t (*)(lv_color_t))lv_color_to_u32)(color); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_array_front_struct_method_def = { - "lv_array_front", - (PyCFunction)py_lv_array_front_struct_method, +static PyMethodDef py_lv_color_to_u32_struct_method_def = { + "lv_color_to_u32", + (PyCFunction)py_lv_color_to_u32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89645,28 +84243,30 @@ static PyMethodDef py_lv_array_front_struct_method_def = { /* * lvgl extension definition for: - * inline static void *lv_array_back(const lv_array_t *array) + * lv_color_t lv_color_lighten(lv_color_t c, lv_opa_t lvl) */ -static PyObject *py_lv_array_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_lighten_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + long lvl_val; + if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + lv_opa_t lvl = (lv_opa_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + lv_color_t _res; lvpy_lock(); - _res = ((void *(*)(const lv_array_t *))lv_array_back)(array); + _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_lighten)(c, lvl); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_array_back_struct_method_def = { - "lv_array_back", - (PyCFunction)py_lv_array_back_struct_method, +static PyMethodDef py_lv_color_lighten_struct_method_def = { + "lv_color_lighten", + (PyCFunction)py_lv_color_lighten_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89674,31 +84274,30 @@ static PyMethodDef py_lv_array_back_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_init(lv_array_t *array, uint32_t capacity, uint32_t element_size) + * lv_color_t lv_color_darken(lv_color_t c, lv_opa_t lvl) */ -static PyObject *py_lv_array_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_darken_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "ll", &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + long lvl_val; + if (!PyArg_ParseTuple(py_args, "l", &lvl_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } + lv_opa_t lvl = (lv_opa_t)lvl_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + lv_color_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_array_init)(array, capacity, element_size); + _res = ((lv_color_t (*)(lv_color_t, lv_opa_t))lv_color_darken)(c, lvl); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_array_init_struct_method_def = { - "lv_array_init", - (PyCFunction)py_lv_array_init_struct_method, +static PyMethodDef py_lv_color_darken_struct_method_def = { + "lv_color_darken", + (PyCFunction)py_lv_color_darken_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89706,31 +84305,28 @@ static PyMethodDef py_lv_array_init_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_init_from_buf(lv_array_t *array, void *buf, uint32_t capacity, uint32_t element_size) + * lv_color_hsv_t lv_color_to_hsv(lv_color_t color) */ -static PyObject *py_lv_array_init_from_buf_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_to_hsv_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *buf_py; long capacity_val; long element_size_val; - if (!PyArg_ParseTuple(py_args, "Oll", &buf_py, &capacity_val, &element_size_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - void *buf = mp_to_ptr(buf_py); - uint32_t capacity = (uint32_t)capacity_val; - uint32_t element_size = (uint32_t)element_size_val; + + lv_color_t color = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) color = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_hsv_t _res; lvpy_lock(); - ((void (*)(lv_array_t *, void *, uint32_t, uint32_t))lv_array_init_from_buf)(array, buf, capacity, element_size); + _res = ((lv_color_hsv_t (*)(lv_color_t))lv_color_to_hsv)(color); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_hsv_t(_res); } -static PyMethodDef py_lv_array_init_from_buf_struct_method_def = { - "lv_array_init_from_buf", - (PyCFunction)py_lv_array_init_from_buf_struct_method, +static PyMethodDef py_lv_color_to_hsv_struct_method_def = { + "lv_color_to_hsv", + (PyCFunction)py_lv_color_to_hsv_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89738,30 +84334,28 @@ static PyMethodDef py_lv_array_init_from_buf_struct_method_def = { /* * lvgl extension definition for: - * bool lv_array_resize(lv_array_t *array, uint32_t new_capacity) + * uint8_t lv_color_luminance(lv_color_t c) */ -static PyObject *py_lv_array_resize_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_luminance_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long new_capacity_val; - if (!PyArg_ParseTuple(py_args, "l", &new_capacity_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t new_capacity = (uint32_t)new_capacity_val; + + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - bool _res; + uint8_t _res; lvpy_lock(); - _res = ((bool (*)(lv_array_t *, uint32_t))lv_array_resize)(array, new_capacity); + _res = ((uint8_t (*)(lv_color_t))lv_color_luminance)(c); lvpy_unlock(); PyGILState_Release(gstate); - return convert_to_bool(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_array_resize_struct_method_def = { - "lv_array_resize", - (PyCFunction)py_lv_array_resize_struct_method, +static PyMethodDef py_lv_color_luminance_struct_method_def = { + "lv_color_luminance", + (PyCFunction)py_lv_color_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89769,27 +84363,31 @@ static PyMethodDef py_lv_array_resize_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_deinit(lv_array_t *array) + * lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix) */ -static PyObject *py_lv_array_deinit_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_mix_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + PyObject *c2_py; long mix_val; + if (!PyArg_ParseTuple(py_args, "Ol", &c2_py, &mix_val)) { PyGILState_Release(gstate); return NULL; } + lv_color_t c1 = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c1 = *p_; } + lv_color_t c2 = mp_write_lv_color_t(c2_py); + uint8_t mix = (uint8_t)mix_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + lv_color_t _res; lvpy_lock(); - ((void (*)(lv_array_t *))lv_array_deinit)(array); + _res = ((lv_color_t (*)(lv_color_t, lv_color_t, uint8_t))lv_color_mix)(c1, c2, mix); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_read_lv_color_t(_res); } -static PyMethodDef py_lv_array_deinit_struct_method_def = { - "lv_array_deinit", - (PyCFunction)py_lv_array_deinit_struct_method, +static PyMethodDef py_lv_color_mix_struct_method_def = { + "lv_color_mix", + (PyCFunction)py_lv_color_mix_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89797,57 +84395,74 @@ static PyMethodDef py_lv_array_deinit_struct_method_def = { /* * lvgl extension definition for: - * void lv_array_copy(lv_array_t *target, const lv_array_t *source) + * uint8_t lv_color_brightness(lv_color_t c) */ -static PyObject *py_lv_array_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_color_brightness_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *source_py; - if (!PyArg_ParseTuple(py_args, "O", &source_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *target = (lv_array_t *)mp_write_ptr_lv_array_t(self); - const lv_array_t *source = (const lv_array_t *)mp_write_ptr_lv_array_t(source_py); + + lv_color_t c = {0}; { lv_color_t *p_ = (lv_color_t *)mp_write_ptr_lv_color_t(self); if (p_) c = *p_; } if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint8_t _res; lvpy_lock(); - ((void (*)(lv_array_t *, const lv_array_t *))lv_array_copy)(target, source); + _res = ((uint8_t (*)(lv_color_t))lv_color_brightness)(c); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_array_copy_struct_method_def = { - "lv_array_copy", - (PyCFunction)py_lv_array_copy_struct_method, +static PyMethodDef py_lv_color_brightness_struct_method_def = { + "lv_color_brightness", + (PyCFunction)py_lv_color_brightness_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; +PyMethodDef py_lv_color_t_methods[] = { + {"is_in_range", (PyCFunction)py_lv_color_is_in_range_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_32", (PyCFunction)py_lv_color_to_32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_int", (PyCFunction)py_lv_color_to_int_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"eq", (PyCFunction)py_lv_color_eq_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_u16", (PyCFunction)py_lv_color_to_u16_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_u32", (PyCFunction)py_lv_color_to_u32_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"lighten", (PyCFunction)py_lv_color_lighten_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"darken", (PyCFunction)py_lv_color_darken_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_hsv", (PyCFunction)py_lv_color_to_hsv_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"luminance", (PyCFunction)py_lv_color_luminance_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"mix", (PyCFunction)py_lv_color_mix_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"brightness", (PyCFunction)py_lv_color_brightness_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: - * void lv_array_shrink(lv_array_t *array) + * inline static int32_t lv_font_get_line_height_internal(const lv_font_t *font) */ -static PyObject *py_lv_array_shrink_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_line_height_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_array_t *))lv_array_shrink)(array); + _res = ((int32_t (*)(const lv_font_t *))lv_font_get_line_height_internal)(font); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_array_shrink_struct_method_def = { - "lv_array_shrink", - (PyCFunction)py_lv_array_shrink_struct_method, +static PyMethodDef py_lv_font_get_line_height_internal_struct_method_def = { + "lv_font_get_line_height_internal", + (PyCFunction)py_lv_font_get_line_height_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89855,30 +84470,28 @@ static PyMethodDef py_lv_array_shrink_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_remove(lv_array_t *array, uint32_t index) + * inline static bool lv_font_has_static_bitmap_internal(const lv_font_t *font) */ -static PyObject *py_lv_array_remove_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_has_static_bitmap_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; + + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + bool _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove)(array, index); + _res = ((bool (*)(const lv_font_t *))lv_font_has_static_bitmap_internal)(font); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_array_remove_struct_method_def = { - "lv_array_remove", - (PyCFunction)py_lv_array_remove_struct_method, +static PyMethodDef py_lv_font_has_static_bitmap_internal_struct_method_def = { + "lv_font_has_static_bitmap_internal", + (PyCFunction)py_lv_font_has_static_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89886,30 +84499,30 @@ static PyMethodDef py_lv_array_remove_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_remove_unordered(lv_array_t *array, uint32_t index) + * inline static int32_t lv_font_get_bottom_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_array_remove_unordered_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_bottom_trim_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t))lv_array_remove_unordered)(array, index); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_bottom_trim_internal)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_array_remove_unordered_struct_method_def = { - "lv_array_remove_unordered", - (PyCFunction)py_lv_array_remove_unordered_struct_method, +static PyMethodDef py_lv_font_get_bottom_trim_internal_struct_method_def = { + "lv_font_get_bottom_trim_internal", + (PyCFunction)py_lv_font_get_bottom_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89917,31 +84530,30 @@ static PyMethodDef py_lv_array_remove_unordered_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_erase(lv_array_t *array, uint32_t start, uint32_t end) + * inline static int32_t lv_font_get_top_trim_internal(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_array_erase_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_top_trim_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long start_val; long end_val; - if (!PyArg_ParseTuple(py_args, "ll", &start_val, &end_val)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t start = (uint32_t)start_val; - uint32_t end = (uint32_t)end_val; + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t, uint32_t))lv_array_erase)(array, start, end); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_top_trim_internal)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_array_erase_struct_method_def = { - "lv_array_erase", - (PyCFunction)py_lv_array_erase_struct_method, +static PyMethodDef py_lv_font_get_top_trim_internal_struct_method_def = { + "lv_font_get_top_trim_internal", + (PyCFunction)py_lv_font_get_top_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89949,30 +84561,32 @@ static PyMethodDef py_lv_array_erase_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_concat(lv_array_t *array, const lv_array_t *other) + * bool lv_font_get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_array_concat_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_dsc_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *other_py; - if (!PyArg_ParseTuple(py_args, "O", &other_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - const lv_array_t *other = (const lv_array_t *)mp_write_ptr_lv_array_t(other_py); + PyObject *dsc_out_py; long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + bool _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, const lv_array_t *))lv_array_concat)(array, other); + _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc)(font, dsc_out, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_array_concat_struct_method_def = { - "lv_array_concat", - (PyCFunction)py_lv_array_concat_struct_method, +static PyMethodDef py_lv_font_get_glyph_dsc_struct_method_def = { + "lv_font_get_glyph_dsc", + (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -89980,30 +84594,31 @@ static PyMethodDef py_lv_array_concat_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_push_back(lv_array_t *array, const void *element) + * uint16_t lv_font_get_glyph_width(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_array_push_back_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_width_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *element_py; - if (!PyArg_ParseTuple(py_args, "O", &element_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - const void *element = (const void *)mp_to_ptr(element_py); + long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "ll", &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + uint16_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, const void *))lv_array_push_back)(array, element); + _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_font_get_glyph_width)(font, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - return mp_obj_new_int(_res); + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_array_push_back_struct_method_def = { - "lv_array_push_back", - (PyCFunction)py_lv_array_push_back_struct_method, +static PyMethodDef py_lv_font_get_glyph_width_struct_method_def = { + "lv_font_get_glyph_width", + (PyCFunction)py_lv_font_get_glyph_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90011,31 +84626,28 @@ static PyMethodDef py_lv_array_push_back_struct_method_def = { /* * lvgl extension definition for: - * lv_result_t lv_array_assign(lv_array_t *array, uint32_t index, const void *value) + * int32_t lv_font_get_line_height(const lv_font_t *font) */ -static PyObject *py_lv_array_assign_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_line_height_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; PyObject *value_py; - if (!PyArg_ParseTuple(py_args, "lO", &index_val, &value_py)) { PyGILState_Release(gstate); return NULL; } - lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; - const void *value = (const void *)mp_to_ptr(value_py); + + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - lv_result_t _res; + int32_t _res; lvpy_lock(); - _res = ((lv_result_t (*)(lv_array_t *, uint32_t, const void *))lv_array_assign)(array, index, value); + _res = ((int32_t (*)(const lv_font_t *))lv_font_get_line_height)(font); lvpy_unlock(); PyGILState_Release(gstate); return mp_obj_new_int(_res); } -static PyMethodDef py_lv_array_assign_struct_method_def = { - "lv_array_assign", - (PyCFunction)py_lv_array_assign_struct_method, +static PyMethodDef py_lv_font_get_line_height_struct_method_def = { + "lv_font_get_line_height", + (PyCFunction)py_lv_font_get_line_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90043,85 +84655,58 @@ static PyMethodDef py_lv_array_assign_struct_method_def = { /* * lvgl extension definition for: - * void *lv_array_at(const lv_array_t *array, uint32_t index) + * void lv_font_set_kerning(lv_font_t *font, lv_font_kerning_t kerning) */ -static PyObject *py_lv_array_at_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_set_kerning_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - long index_val; - if (!PyArg_ParseTuple(py_args, "l", &index_val)) { PyGILState_Release(gstate); return NULL; } - const lv_array_t *array = (lv_array_t *)mp_write_ptr_lv_array_t(self); - uint32_t index = (uint32_t)index_val; + PyObject *kerning_py; + if (!PyArg_ParseTuple(py_args, "O", &kerning_py)) { PyGILState_Release(gstate); return NULL; } + lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_kerning_t kerning = (int)mp_obj_get_int(kerning_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; lvpy_lock(); - _res = ((void *(*)(const lv_array_t *, uint32_t))lv_array_at)(array, index); + ((void (*)(lv_font_t *, lv_font_kerning_t))lv_font_set_kerning)(font, kerning); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + Py_RETURN_NONE; } -static PyMethodDef py_lv_array_at_struct_method_def = { - "lv_array_at", - (PyCFunction)py_lv_array_at_struct_method, +static PyMethodDef py_lv_font_set_kerning_struct_method_def = { + "lv_font_set_kerning", + (PyCFunction)py_lv_font_set_kerning_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_array_t_methods[] = { - {"size", (PyCFunction)py_lv_array_size_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"capacity", (PyCFunction)py_lv_array_capacity_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_empty", (PyCFunction)py_lv_array_is_empty_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"is_full", (PyCFunction)py_lv_array_is_full_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"clear", (PyCFunction)py_lv_array_clear_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"front", (PyCFunction)py_lv_array_front_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"back", (PyCFunction)py_lv_array_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init", (PyCFunction)py_lv_array_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"init_from_buf", (PyCFunction)py_lv_array_init_from_buf_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"resize", (PyCFunction)py_lv_array_resize_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"deinit", (PyCFunction)py_lv_array_deinit_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"copy", (PyCFunction)py_lv_array_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"shrink", (PyCFunction)py_lv_array_shrink_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove", (PyCFunction)py_lv_array_remove_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"remove_unordered", (PyCFunction)py_lv_array_remove_unordered_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"erase", (PyCFunction)py_lv_array_erase_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"concat", (PyCFunction)py_lv_array_concat_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"push_back", (PyCFunction)py_lv_array_push_back_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"assign", (PyCFunction)py_lv_array_assign_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"at", (PyCFunction)py_lv_array_at_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {NULL} -}; - - /* * lvgl extension definition for: - * void lv_theme_copy(lv_theme_t *dst, const lv_theme_t *src) + * bool lv_font_has_static_bitmap(const lv_font_t *font) */ -static PyObject *py_lv_theme_copy_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_has_static_bitmap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *src_py; - if (!PyArg_ParseTuple(py_args, "O", &src_py)) { PyGILState_Release(gstate); return NULL; } - lv_theme_t *dst = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); - const lv_theme_t *src = (const lv_theme_t *)mp_write_ptr_lv_theme_t(src_py); + + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_theme_t *, const lv_theme_t *))lv_theme_copy)(dst, src); + _res = ((bool (*)(const lv_font_t *))lv_font_has_static_bitmap)(font); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_theme_copy_struct_method_def = { - "lv_theme_copy", - (PyCFunction)py_lv_theme_copy_struct_method, +static PyMethodDef py_lv_font_has_static_bitmap_struct_method_def = { + "lv_font_has_static_bitmap", + (PyCFunction)py_lv_font_has_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90129,92 +84714,61 @@ static PyMethodDef py_lv_theme_copy_struct_method_def = { /* * lvgl extension definition for: - * void lv_theme_set_parent(lv_theme_t *theme, lv_theme_t *parent) + * int32_t lv_font_get_top_trim(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_theme_set_parent_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_top_trim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *parent_py; - if (!PyArg_ParseTuple(py_args, "O", &parent_py)) { PyGILState_Release(gstate); return NULL; } - lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); - lv_theme_t *parent = mp_write_ptr_lv_theme_t(parent_py); + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_theme_t *, lv_theme_t *))lv_theme_set_parent)(theme, parent); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_top_trim)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_theme_set_parent_struct_method_def = { - "lv_theme_set_parent", - (PyCFunction)py_lv_theme_set_parent_struct_method, +static PyMethodDef py_lv_font_get_top_trim_struct_method_def = { + "lv_font_get_top_trim", + (PyCFunction)py_lv_font_get_top_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -/* - * Callback function lv_theme_t_apply_cb (CPython) - * void lv_theme_apply_cb_t(lv_theme_t *, lv_obj_t *) - */ -static void lv_theme_t_apply_cb_callback(lv_theme_t *arg0, lv_obj_t *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_theme_t_apply_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_theme_t((void*)arg0); - PyObject *py_arg1 = lv_to_mp((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - /* * lvgl extension definition for: - * void lv_theme_set_apply_cb(lv_theme_t *theme, lv_theme_apply_cb_t apply_cb) + * int32_t lv_font_get_bottom_trim(const lv_font_t *font, lv_text_leading_trim_t trim) */ -static PyObject *py_lv_theme_set_apply_cb_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_bottom_trim_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *apply_cb_py; - if (!PyArg_ParseTuple(py_args, "O", &apply_cb_py)) { PyGILState_Release(gstate); return NULL; } - lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); - void *apply_cb = mp_lv_callback(apply_cb_py, &lv_theme_t_apply_cb_callback, "lv_theme_t_apply_cb", &theme->user_data, theme, (NULL), (NULL)); + PyObject *trim_py; + if (!PyArg_ParseTuple(py_args, "O", &trim_py)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_text_leading_trim_t trim = (int)mp_obj_get_int(trim_py); if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + int32_t _res; lvpy_lock(); - ((void (*)(lv_theme_t *, lv_theme_apply_cb_t))lv_theme_set_apply_cb)(theme, apply_cb); + _res = ((int32_t (*)(const lv_font_t *, lv_text_leading_trim_t))lv_font_get_bottom_trim)(font, trim); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int(_res); } -static PyMethodDef py_lv_theme_set_apply_cb_struct_method_def = { - "lv_theme_set_apply_cb", - (PyCFunction)py_lv_theme_set_apply_cb_struct_method, +static PyMethodDef py_lv_font_get_bottom_trim_struct_method_def = { + "lv_font_get_bottom_trim", + (PyCFunction)py_lv_font_get_bottom_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90222,29 +84776,32 @@ static PyMethodDef py_lv_theme_set_apply_cb_struct_method_def = { /* * lvgl extension definition for: - * void lv_theme_set_user_data(lv_theme_t *theme, void *user_data) + * bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t unicode_letter, uint32_t unicode_letter_next) */ -static PyObject *py_lv_theme_set_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_dsc_fmt_txt_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - PyObject *user_data_py; - if (!PyArg_ParseTuple(py_args, "O", &user_data_py)) { PyGILState_Release(gstate); return NULL; } - lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); - void *user_data = mp_to_ptr(user_data_py); + PyObject *dsc_out_py; long unicode_letter_val; long unicode_letter_next_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &unicode_letter_val, &unicode_letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); + uint32_t unicode_letter = (uint32_t)unicode_letter_val; + uint32_t unicode_letter_next = (uint32_t)unicode_letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + bool _res; lvpy_lock(); - ((void (*)(lv_theme_t *, void *))lv_theme_set_user_data)(theme, user_data); + _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc_fmt_txt)(font, dsc_out, unicode_letter, unicode_letter_next); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return convert_to_bool(_res); } -static PyMethodDef py_lv_theme_set_user_data_struct_method_def = { - "lv_theme_set_user_data", - (PyCFunction)py_lv_theme_set_user_data_struct_method, +static PyMethodDef py_lv_font_get_glyph_dsc_fmt_txt_struct_method_def = { + "lv_font_get_glyph_dsc_fmt_txt", + (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90252,28 +84809,32 @@ static PyMethodDef py_lv_theme_set_user_data_struct_method_def = { /* * lvgl extension definition for: - * void *lv_theme_get_user_data(const lv_theme_t *theme) + * bool lv_font_get_glyph_dsc_internal(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_theme_get_user_data_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_dsc_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - const lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + PyObject *dsc_out_py; long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "Oll", &dsc_out_py, &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + lv_font_glyph_dsc_t *dsc_out = mp_write_ptr_lv_font_glyph_dsc_t(dsc_out_py); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } - void * _res; + bool _res; lvpy_lock(); - _res = ((void *(*)(const lv_theme_t *))lv_theme_get_user_data)(theme); + _res = ((bool (*)(const lv_font_t *, lv_font_glyph_dsc_t *, uint32_t, uint32_t))lv_font_get_glyph_dsc_internal)(font, dsc_out, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - return ptr_to_mp((void*)_res); + return convert_to_bool(_res); } -static PyMethodDef py_lv_theme_get_user_data_struct_method_def = { - "lv_theme_get_user_data", - (PyCFunction)py_lv_theme_get_user_data_struct_method, +static PyMethodDef py_lv_font_get_glyph_dsc_internal_struct_method_def = { + "lv_font_get_glyph_dsc_internal", + (PyCFunction)py_lv_font_get_glyph_dsc_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; @@ -90281,39 +84842,51 @@ static PyMethodDef py_lv_theme_get_user_data_struct_method_def = { /* * lvgl extension definition for: - * void lv_theme_delete(lv_theme_t *theme) + * uint16_t lv_font_get_glyph_width_internal(const lv_font_t *font, uint32_t letter, uint32_t letter_next) */ -static PyObject *py_lv_theme_delete_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +static PyObject *py_lv_font_get_glyph_width_internal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) { PyGILState_STATE gstate = PyGILState_Ensure(); (void)py_kwds; - - lv_theme_t *theme = (lv_theme_t *)mp_write_ptr_lv_theme_t(self); + long letter_val; long letter_next_val; + if (!PyArg_ParseTuple(py_args, "ll", &letter_val, &letter_next_val)) { PyGILState_Release(gstate); return NULL; } + const lv_font_t *font = (lv_font_t *)mp_write_ptr_lv_font_t(self); + uint32_t letter = (uint32_t)letter_val; + uint32_t letter_next = (uint32_t)letter_next_val; if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + uint16_t _res; lvpy_lock(); - ((void (*)(lv_theme_t *))lv_theme_delete)(theme); + _res = ((uint16_t (*)(const lv_font_t *, uint32_t, uint32_t))lv_font_get_glyph_width_internal)(font, letter, letter_next); lvpy_unlock(); PyGILState_Release(gstate); - Py_RETURN_NONE; + return mp_obj_new_int_from_uint(_res); } -static PyMethodDef py_lv_theme_delete_struct_method_def = { - "lv_theme_delete", - (PyCFunction)py_lv_theme_delete_struct_method, +static PyMethodDef py_lv_font_get_glyph_width_internal_struct_method_def = { + "lv_font_get_glyph_width_internal", + (PyCFunction)py_lv_font_get_glyph_width_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL }; -PyMethodDef py_lv_theme_t_methods[] = { - {"copy", (PyCFunction)py_lv_theme_copy_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_parent", (PyCFunction)py_lv_theme_set_parent_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_apply_cb", (PyCFunction)py_lv_theme_set_apply_cb_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"set_user_data", (PyCFunction)py_lv_theme_set_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"get_user_data", (PyCFunction)py_lv_theme_get_user_data_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, - {"delete", (PyCFunction)py_lv_theme_delete_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, +PyMethodDef py_lv_font_t_methods[] = { + {"get_line_height_internal", (PyCFunction)py_lv_font_get_line_height_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_static_bitmap_internal", (PyCFunction)py_lv_font_has_static_bitmap_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bottom_trim_internal", (PyCFunction)py_lv_font_get_bottom_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_top_trim_internal", (PyCFunction)py_lv_font_get_top_trim_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_dsc", (PyCFunction)py_lv_font_get_glyph_dsc_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_width", (PyCFunction)py_lv_font_get_glyph_width_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_line_height", (PyCFunction)py_lv_font_get_line_height_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set_kerning", (PyCFunction)py_lv_font_set_kerning_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"has_static_bitmap", (PyCFunction)py_lv_font_has_static_bitmap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_top_trim", (PyCFunction)py_lv_font_get_top_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_bottom_trim", (PyCFunction)py_lv_font_get_bottom_trim_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_dsc_fmt_txt", (PyCFunction)py_lv_font_get_glyph_dsc_fmt_txt_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_dsc_internal", (PyCFunction)py_lv_font_get_glyph_dsc_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"get_glyph_width_internal", (PyCFunction)py_lv_font_get_glyph_width_internal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, {NULL} }; @@ -90814,6 +85387,175 @@ PyMethodDef py_lv_obj_class_t_methods[] = { PyMethodDef py_lv_matrix_t_methods[] = {{NULL}}; +/* + * lvgl extension definition for: + * void lv_point_transform(lv_point_t *point, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + */ +static PyObject *py_lv_point_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; + if (!PyArg_ParseTuple(py_args, "lllOl", &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *point = (lv_point_t *)mp_write_ptr_lv_point_t(self); + int32_t angle = (int32_t)angle_val; + int32_t scale_x = (int32_t)scale_x_val; + int32_t scale_y = (int32_t)scale_y_val; + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); + bool zoom_first = (zoom_first_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_point_t *, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_transform)(point, angle, scale_x, scale_y, pivot, zoom_first); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_point_transform_struct_method_def = { + "lv_point_transform", + (PyCFunction)py_lv_point_transform_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_point_array_transform(lv_point_t *points, size_t count, int32_t angle, int32_t scale_x, int32_t scale_y, const lv_point_t *pivot, bool zoom_first) + */ +static PyObject *py_lv_point_array_transform_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long count_val; long angle_val; long scale_x_val; long scale_y_val; PyObject *pivot_py; long zoom_first_val; + if (!PyArg_ParseTuple(py_args, "llllOl", &count_val, &angle_val, &scale_x_val, &scale_y_val, &pivot_py, &zoom_first_val)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *points = (lv_point_t *)mp_write_ptr_lv_point_t(self); + size_t count = (size_t)count_val; + int32_t angle = (int32_t)angle_val; + int32_t scale_x = (int32_t)scale_x_val; + int32_t scale_y = (int32_t)scale_y_val; + const lv_point_t *pivot = (const lv_point_t *)mp_write_ptr_lv_point_t(pivot_py); + bool zoom_first = (zoom_first_val != 0); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_point_t *, size_t, int32_t, int32_t, int32_t, const lv_point_t *, bool))lv_point_array_transform)(points, count, angle, scale_x, scale_y, pivot, zoom_first); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_point_array_transform_struct_method_def = { + "lv_point_array_transform", + (PyCFunction)py_lv_point_array_transform_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * lv_point_precise_t lv_point_to_precise(const lv_point_t *p) + */ +static PyObject *py_lv_point_to_precise_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + const lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lv_point_precise_t _res; + lvpy_lock(); + _res = ((lv_point_precise_t (*)(const lv_point_t *))lv_point_to_precise)(p); + lvpy_unlock(); + + PyGILState_Release(gstate); + return mp_read_lv_point_precise_t(_res); +} + +static PyMethodDef py_lv_point_to_precise_struct_method_def = { + "lv_point_to_precise", + (PyCFunction)py_lv_point_to_precise_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_point_set(lv_point_t *p, int32_t x, int32_t y) + */ +static PyObject *py_lv_point_set_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long x_val; long y_val; + if (!PyArg_ParseTuple(py_args, "ll", &x_val, &y_val)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *p = (lv_point_t *)mp_write_ptr_lv_point_t(self); + int32_t x = (int32_t)x_val; + int32_t y = (int32_t)y_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_point_t *, int32_t, int32_t))lv_point_set)(p, x, y); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_point_set_struct_method_def = { + "lv_point_set", + (PyCFunction)py_lv_point_set_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_point_swap(lv_point_t *p1, lv_point_t *p2) + */ +static PyObject *py_lv_point_swap_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *p2_py; + if (!PyArg_ParseTuple(py_args, "O", &p2_py)) { PyGILState_Release(gstate); return NULL; } + lv_point_t *p1 = (lv_point_t *)mp_write_ptr_lv_point_t(self); + lv_point_t *p2 = mp_write_ptr_lv_point_t(p2_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_point_t *, lv_point_t *))lv_point_swap)(p1, p2); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_point_swap_struct_method_def = { + "lv_point_swap", + (PyCFunction)py_lv_point_swap_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +PyMethodDef py_lv_point_t_methods[] = { + {"transform", (PyCFunction)py_lv_point_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"array_transform", (PyCFunction)py_lv_point_array_transform_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"to_precise", (PyCFunction)py_lv_point_to_precise_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"set", (PyCFunction)py_lv_point_set_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"swap", (PyCFunction)py_lv_point_swap_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: * inline static bool lv_style_is_const_internal(const lv_style_t *style) @@ -95439,6 +90181,393 @@ PyMethodDef py_lv_style_t_methods[] = { PyMethodDef py_lv_style_value_t_methods[] = {{NULL}}; +/* + * lvgl extension definition for: + * void lv_grad_init_stops(lv_grad_dsc_t *grad, const lv_color_t colors[], const lv_opa_t opa[], const uint8_t fracs[], int num_stops) + */ +static PyObject *py_lv_grad_init_stops_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *colors_py; PyObject *opa_py; PyObject *fracs_py; long num_stops_val; + if (!PyArg_ParseTuple(py_args, "OOOl", &colors_py, &opa_py, &fracs_py, &num_stops_val)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *grad = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + const lv_color_t *colors = (const lv_color_t *)lvpy_struct_arr_arg(self, colors_py, "lv_grad_init_stops:colors", sizeof(lv_color_t), mp_write_value_ptr_lv_color_t); + const lv_opa_t *opa = (const lv_opa_t *)mp_to_ptr(opa_py); + const uint8_t *fracs = (const uint8_t *)mp_to_ptr(fracs_py); + int num_stops = (int)num_stops_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_grad_dsc_t *, const lv_color_t [], const lv_opa_t [], const uint8_t [], int))lv_grad_init_stops)(grad, colors, opa, fracs, num_stops); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_grad_init_stops_struct_method_def = { + "lv_grad_init_stops", + (PyCFunction)py_lv_grad_init_stops_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_grad_horizontal_init(lv_grad_dsc_t *dsc) + */ +static PyObject *py_lv_grad_horizontal_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_grad_dsc_t *))lv_grad_horizontal_init)(dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_grad_horizontal_init_struct_method_def = { + "lv_grad_horizontal_init", + (PyCFunction)py_lv_grad_horizontal_init_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_grad_vertical_init(lv_grad_dsc_t *dsc) + */ +static PyObject *py_lv_grad_vertical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_grad_dsc_t *))lv_grad_vertical_init)(dsc); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_grad_vertical_init_struct_method_def = { + "lv_grad_vertical_init", + (PyCFunction)py_lv_grad_vertical_init_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_grad_linear_init(lv_grad_dsc_t *dsc, int32_t from_x, int32_t from_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + */ +static PyObject *py_lv_grad_linear_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long from_x_val; long from_y_val; long to_x_val; long to_y_val; PyObject *extend_py; + if (!PyArg_ParseTuple(py_args, "llllO", &from_x_val, &from_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t from_x = (int32_t)from_x_val; + int32_t from_y = (int32_t)from_y_val; + int32_t to_x = (int32_t)to_x_val; + int32_t to_y = (int32_t)to_y_val; + lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_linear_init)(dsc, from_x, from_y, to_x, to_y, extend); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_grad_linear_init_struct_method_def = { + "lv_grad_linear_init", + (PyCFunction)py_lv_grad_linear_init_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_grad_radial_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t to_x, int32_t to_y, lv_grad_extend_t extend) + */ +static PyObject *py_lv_grad_radial_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long center_x_val; long center_y_val; long to_x_val; long to_y_val; PyObject *extend_py; + if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &to_x_val, &to_y_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t center_x = (int32_t)center_x_val; + int32_t center_y = (int32_t)center_y_val; + int32_t to_x = (int32_t)to_x_val; + int32_t to_y = (int32_t)to_y_val; + lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_radial_init)(dsc, center_x, center_y, to_x, to_y, extend); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_grad_radial_init_struct_method_def = { + "lv_grad_radial_init", + (PyCFunction)py_lv_grad_radial_init_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_grad_radial_set_focal(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t radius) + */ +static PyObject *py_lv_grad_radial_set_focal_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long center_x_val; long center_y_val; long radius_val; + if (!PyArg_ParseTuple(py_args, "lll", ¢er_x_val, ¢er_y_val, &radius_val)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t center_x = (int32_t)center_x_val; + int32_t center_y = (int32_t)center_y_val; + int32_t radius = (int32_t)radius_val; + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t))lv_grad_radial_set_focal)(dsc, center_x, center_y, radius); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_grad_radial_set_focal_struct_method_def = { + "lv_grad_radial_set_focal", + (PyCFunction)py_lv_grad_radial_set_focal_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +/* + * lvgl extension definition for: + * void lv_grad_conical_init(lv_grad_dsc_t *dsc, int32_t center_x, int32_t center_y, int32_t start_angle, int32_t end_angle, lv_grad_extend_t extend) + */ +static PyObject *py_lv_grad_conical_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + long center_x_val; long center_y_val; long start_angle_val; long end_angle_val; PyObject *extend_py; + if (!PyArg_ParseTuple(py_args, "llllO", ¢er_x_val, ¢er_y_val, &start_angle_val, &end_angle_val, &extend_py)) { PyGILState_Release(gstate); return NULL; } + lv_grad_dsc_t *dsc = (lv_grad_dsc_t *)mp_write_ptr_lv_grad_dsc_t(self); + int32_t center_x = (int32_t)center_x_val; + int32_t center_y = (int32_t)center_y_val; + int32_t start_angle = (int32_t)start_angle_val; + int32_t end_angle = (int32_t)end_angle_val; + lv_grad_extend_t extend = (int)mp_obj_get_int(extend_py); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_grad_dsc_t *, int32_t, int32_t, int32_t, int32_t, lv_grad_extend_t))lv_grad_conical_init)(dsc, center_x, center_y, start_angle, end_angle, extend); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_grad_conical_init_struct_method_def = { + "lv_grad_conical_init", + (PyCFunction)py_lv_grad_conical_init_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +PyMethodDef py_lv_grad_dsc_t_methods[] = { + {"init_stops", (PyCFunction)py_lv_grad_init_stops_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"horizontal_init", (PyCFunction)py_lv_grad_horizontal_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"vertical_init", (PyCFunction)py_lv_grad_vertical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"linear_init", (PyCFunction)py_lv_grad_linear_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"radial_init", (PyCFunction)py_lv_grad_radial_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"radial_set_focal", (PyCFunction)py_lv_grad_radial_set_focal_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {"conical_init", (PyCFunction)py_lv_grad_conical_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + +PyMethodDef py_lv_grad_stop_t_methods[] = {{NULL}}; +PyMethodDef py_lv_grad_dsc_params_t_methods[] = {{NULL}}; +PyMethodDef py_lv_grad_dsc_params_linear_t_methods[] = {{NULL}}; +PyMethodDef py_lv_grad_dsc_params_radial_t_methods[] = {{NULL}}; +PyMethodDef py_lv_grad_dsc_params_conical_t_methods[] = {{NULL}}; +PyMethodDef py_lv_image_colorkey_t_methods[] = {{NULL}}; + +/* + * Callback function lv_color_filter_dsc_t_cb (CPython) + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + */ +static lv_color_t lv_color_filter_dsc_t_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (lv_color_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_color_filter_dsc_t_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_color_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + PyObject *py_arg1 = mp_read_lv_color_t(arg1); + PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_color_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_color_t){0}; } + lv_color_t _c_res = mp_write_lv_color_t(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * lvgl extension definition for: + * void lv_color_filter_dsc_init(lv_color_filter_dsc_t *dsc, lv_color_filter_cb_t cb) + */ +static PyObject *py_lv_color_filter_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *cb_py; + if (!PyArg_ParseTuple(py_args, "O", &cb_py)) { PyGILState_Release(gstate); return NULL; } + lv_color_filter_dsc_t *dsc = (lv_color_filter_dsc_t *)mp_write_ptr_lv_color_filter_dsc_t(self); + void *cb = mp_lv_callback(cb_py, &lv_color_filter_dsc_t_cb_callback, "lv_color_filter_dsc_t_cb", &dsc->user_data, dsc, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_color_filter_dsc_t *, lv_color_filter_cb_t))lv_color_filter_dsc_init)(dsc, cb); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_color_filter_dsc_init_struct_method_def = { + "lv_color_filter_dsc_init", + (PyCFunction)py_lv_color_filter_dsc_init_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +PyMethodDef py_lv_color_filter_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_color_filter_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + +/* + * Callback function lv_style_transition_dsc_init_path_cb (CPython) + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ +static int32_t lv_style_transition_dsc_init_path_cb_callback(const lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_style_transition_dsc_init_path_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } + int32_t _c_res = (int32_t)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * lvgl extension definition for: + * void lv_style_transition_dsc_init(lv_style_transition_dsc_t *tr, const lv_style_prop_t props[], lv_anim_path_cb_t path_cb, uint32_t time, uint32_t delay, void *user_data) + */ +static PyObject *py_lv_style_transition_dsc_init_struct_method(PyObject *self, PyObject *py_args, PyObject *py_kwds) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + (void)py_kwds; + PyObject *props_py; PyObject *path_cb_py; long time_val; long delay_val; PyObject *user_data_py; + if (!PyArg_ParseTuple(py_args, "OOllO", &props_py, &path_cb_py, &time_val, &delay_val, &user_data_py)) { PyGILState_Release(gstate); return NULL; } + lv_style_transition_dsc_t *tr = (lv_style_transition_dsc_t *)mp_write_ptr_lv_style_transition_dsc_t(self); + void *user_data = mp_to_ptr(user_data_py); + const lv_style_prop_t *props = (const lv_style_prop_t *)mp_to_ptr(props_py); + uint32_t time = (uint32_t)time_val; + uint32_t delay = (uint32_t)delay_val; + void *path_cb = mp_lv_callback(path_cb_py, &lv_style_transition_dsc_init_path_cb_callback, "lv_style_transition_dsc_init_path_cb", &user_data, NULL, (NULL), (NULL)); + if (PyErr_Occurred()) { PyGILState_Release(gstate); return NULL; } + + lvpy_lock(); + ((void (*)(lv_style_transition_dsc_t *, const lv_style_prop_t [], lv_anim_path_cb_t, uint32_t, uint32_t, void *))lv_style_transition_dsc_init)(tr, props, path_cb, time, delay, user_data); + lvpy_unlock(); + + PyGILState_Release(gstate); + Py_RETURN_NONE; +} + +static PyMethodDef py_lv_style_transition_dsc_init_struct_method_def = { + "lv_style_transition_dsc_init", + (PyCFunction)py_lv_style_transition_dsc_init_struct_method, + METH_VARARGS | METH_KEYWORDS, + NULL +}; + + +PyMethodDef py_lv_style_transition_dsc_t_methods[] = { + {"init", (PyCFunction)py_lv_style_transition_dsc_init_struct_method, METH_VARARGS | METH_KEYWORDS, NULL}, + {NULL} +}; + + /* * lvgl extension definition for: * void lv_observer_delete(lv_observer_t *observer) @@ -107798,6 +102927,154 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_array_clear * lv_array_front * lv_array_back + * lv_obj_get_style_width_internal + * lv_obj_get_style_min_width_internal + * lv_obj_get_style_max_width_internal + * lv_obj_get_style_height_internal + * lv_obj_get_style_min_height_internal + * lv_obj_get_style_max_height_internal + * lv_obj_get_style_length_internal + * lv_obj_get_style_x_internal + * lv_obj_get_style_y_internal + * lv_obj_get_style_align_internal + * lv_obj_get_style_transform_width_internal + * lv_obj_get_style_transform_height_internal + * lv_obj_get_style_translate_x_internal + * lv_obj_get_style_translate_y_internal + * lv_obj_get_style_translate_radial_internal + * lv_obj_get_style_transform_scale_x_internal + * lv_obj_get_style_transform_scale_y_internal + * lv_obj_get_style_transform_rotation_internal + * lv_obj_get_style_transform_pivot_x_internal + * lv_obj_get_style_transform_pivot_y_internal + * lv_obj_get_style_transform_skew_x_internal + * lv_obj_get_style_transform_skew_y_internal + * lv_obj_get_style_pad_top_internal + * lv_obj_get_style_pad_bottom_internal + * lv_obj_get_style_pad_left_internal + * lv_obj_get_style_pad_right_internal + * lv_obj_get_style_pad_row_internal + * lv_obj_get_style_pad_column_internal + * lv_obj_get_style_pad_radial_internal + * lv_obj_get_style_margin_top_internal + * lv_obj_get_style_margin_bottom_internal + * lv_obj_get_style_margin_left_internal + * lv_obj_get_style_margin_right_internal + * lv_obj_get_style_bg_color_internal + * lv_obj_get_style_bg_color_filtered_internal + * lv_obj_get_style_bg_opa_internal + * lv_obj_get_style_bg_grad_color_internal + * lv_obj_get_style_bg_grad_color_filtered_internal + * lv_obj_get_style_bg_grad_dir_internal + * lv_obj_get_style_bg_main_stop_internal + * lv_obj_get_style_bg_grad_stop_internal + * lv_obj_get_style_bg_main_opa_internal + * lv_obj_get_style_bg_grad_opa_internal + * lv_obj_get_style_bg_grad_internal + * lv_obj_get_style_bg_image_src_internal + * lv_obj_get_style_bg_image_opa_internal + * lv_obj_get_style_bg_image_recolor_internal + * lv_obj_get_style_bg_image_recolor_filtered_internal + * lv_obj_get_style_bg_image_recolor_opa_internal + * lv_obj_get_style_bg_image_tiled_internal + * lv_obj_get_style_border_color_internal + * lv_obj_get_style_border_color_filtered_internal + * lv_obj_get_style_border_opa_internal + * lv_obj_get_style_border_width_internal + * lv_obj_get_style_border_side_internal + * lv_obj_get_style_border_post_internal + * lv_obj_get_style_outline_width_internal + * lv_obj_get_style_outline_color_internal + * lv_obj_get_style_outline_color_filtered_internal + * lv_obj_get_style_outline_opa_internal + * lv_obj_get_style_outline_pad_internal + * lv_obj_get_style_shadow_width_internal + * lv_obj_get_style_shadow_offset_x_internal + * lv_obj_get_style_shadow_offset_y_internal + * lv_obj_get_style_shadow_spread_internal + * lv_obj_get_style_shadow_color_internal + * lv_obj_get_style_shadow_color_filtered_internal + * lv_obj_get_style_shadow_opa_internal + * lv_obj_get_style_image_opa_internal + * lv_obj_get_style_image_recolor_internal + * lv_obj_get_style_image_recolor_filtered_internal + * lv_obj_get_style_image_recolor_opa_internal + * lv_obj_get_style_image_colorkey_internal + * lv_obj_get_style_line_width_internal + * lv_obj_get_style_line_dash_width_internal + * lv_obj_get_style_line_dash_gap_internal + * lv_obj_get_style_line_rounded_internal + * lv_obj_get_style_line_color_internal + * lv_obj_get_style_line_color_filtered_internal + * lv_obj_get_style_line_opa_internal + * lv_obj_get_style_arc_width_internal + * lv_obj_get_style_arc_rounded_internal + * lv_obj_get_style_arc_color_internal + * lv_obj_get_style_arc_color_filtered_internal + * lv_obj_get_style_arc_opa_internal + * lv_obj_get_style_arc_image_src_internal + * lv_obj_get_style_text_color_internal + * lv_obj_get_style_text_color_filtered_internal + * lv_obj_get_style_text_opa_internal + * lv_obj_get_style_text_font_internal + * lv_obj_get_style_text_letter_space_internal + * lv_obj_get_style_text_line_space_internal + * lv_obj_get_style_text_decor_internal + * lv_obj_get_style_text_align_internal + * lv_obj_get_style_text_outline_stroke_color_internal + * lv_obj_get_style_text_outline_stroke_color_filtered_internal + * lv_obj_get_style_text_outline_stroke_width_internal + * lv_obj_get_style_text_outline_stroke_opa_internal + * lv_obj_get_style_text_leading_trim_internal + * lv_obj_get_style_blur_radius_internal + * lv_obj_get_style_blur_backdrop_internal + * lv_obj_get_style_blur_quality_internal + * lv_obj_get_style_drop_shadow_radius_internal + * lv_obj_get_style_drop_shadow_offset_x_internal + * lv_obj_get_style_drop_shadow_offset_y_internal + * lv_obj_get_style_drop_shadow_color_internal + * lv_obj_get_style_drop_shadow_color_filtered_internal + * lv_obj_get_style_drop_shadow_opa_internal + * lv_obj_get_style_drop_shadow_quality_internal + * lv_obj_get_style_radius_internal + * lv_obj_get_style_radial_offset_internal + * lv_obj_get_style_clip_corner_internal + * lv_obj_get_style_opa_internal + * lv_obj_get_style_opa_layered_internal + * lv_obj_get_style_color_filter_dsc_internal + * lv_obj_get_style_color_filter_opa_internal + * lv_obj_get_style_recolor_internal + * lv_obj_get_style_recolor_opa_internal + * lv_obj_get_style_anim_internal + * lv_obj_get_style_anim_duration_internal + * lv_obj_get_style_transition_internal + * lv_obj_get_style_blend_mode_internal + * lv_obj_get_style_layout_internal + * lv_obj_get_style_base_dir_internal + * lv_obj_get_style_bitmap_mask_src_internal + * lv_obj_get_style_rotary_sensitivity_internal + * lv_obj_get_style_flex_flow_internal + * lv_obj_get_style_flex_main_place_internal + * lv_obj_get_style_flex_cross_place_internal + * lv_obj_get_style_flex_track_place_internal + * lv_obj_get_style_flex_grow_internal + * lv_obj_get_style_grid_column_dsc_array_internal + * lv_obj_get_style_grid_column_align_internal + * lv_obj_get_style_grid_row_dsc_array_internal + * lv_obj_get_style_grid_row_align_internal + * lv_obj_get_style_grid_cell_column_pos_internal + * lv_obj_get_style_grid_cell_x_align_internal + * lv_obj_get_style_grid_cell_column_span_internal + * lv_obj_get_style_grid_cell_row_pos_internal + * lv_obj_get_style_grid_cell_y_align_internal + * lv_obj_get_style_grid_cell_row_span_internal + * lv_obj_calculate_style_text_align_internal + * lv_obj_get_style_space_left_internal + * lv_obj_get_style_space_right_internal + * lv_obj_get_style_space_top_internal + * lv_obj_get_style_space_bottom_internal + * lv_obj_get_style_transform_scale_x_safe_internal + * lv_obj_get_style_transform_scale_y_safe_internal * lv_color32_unpremultiply * lv_color32_lumi_of * lv_color_mix32_inlined @@ -107806,6 +103083,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_font_has_static_bitmap_internal * lv_style_is_const_internal * lv_style_get_prop_internal + * lv_bidi_calculate_align_internal * lv_font_get_bottom_trim_internal * lv_font_get_top_trim_internal * mp_lv_init_gc @@ -108521,6 +103799,8 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_event_push * lv_event_pop * lv_event_push_and_send + * lv_obj_get_style_prop_internal + * lv_obj_style_apply_color_filter_internal * lv_display_set_draw_buf_handlers * lv_draw_buf_convert_premultiply * lv_draw_image_normal_helper @@ -108614,6 +103894,7 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; * lv_rb_destroy * lv_text_attributes_init * lv_text_set_text_vfmt + * lv_text_get_size_internal * lv_tree_node_create * lv_tree_node_delete * lv_tree_walk @@ -108623,122 +103904,6 @@ PyMethodDef py_lv_color_hsv_t_methods[] = {{NULL}}; -/* - * Callback function lv_font_t_get_glyph_dsc (CPython) - * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) - */ -static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_font_t_get_glyph_dsc"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); - PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); - PyObject *py_arg3 = mp_obj_new_int_from_uint(arg3); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3) ? PyTuple_Pack(4, py_arg0, py_arg1, py_arg2, py_arg3) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - Py_XDECREF(py_arg3); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } - bool _c_res = mp_obj_is_true(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - -/* - * Function NOT generated: - * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) - * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) - */ - - -/* - * Callback function lv_font_t_release_glyph (CPython) - * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) - */ -static void lv_font_t_release_glyph_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_font_t_release_glyph"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); - PyObject *py_arg1 = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); - PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (result) Py_DECREF(result); - else PyErr_Clear(); - PyGILState_Release(gstate); -} - - -/* - * Callback function lv_color_filter_dsc_t_filter_cb (CPython) - * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) - */ -static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (lv_color_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_color_filter_dsc_t_filter_cb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_color_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); - PyObject *py_arg1 = mp_read_lv_color_t(arg1); - PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); - PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; - Py_XDECREF(py_arg0); - Py_XDECREF(py_arg1); - Py_XDECREF(py_arg2); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_color_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_color_t){0}; } - lv_color_t _c_res = mp_write_lv_color_t(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * Callback function lv_anim_t_custom_exec_cb (CPython) * void lv_anim_custom_exec_cb_t(lv_anim_t *, int32_t) @@ -108772,39 +103937,6 @@ static void lv_anim_t_custom_exec_cb_callback(lv_anim_t *arg0, int32_t arg1) } -/* - * Callback function lv_style_transition_dsc_t_path_xcb (CPython) - * int32_t lv_anim_path_cb_t(const lv_anim_t *) - */ -static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) -{ - PyGILState_STATE gstate = PyGILState_Ensure(); - PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); - if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } - PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_style_transition_dsc_t_path_xcb"); - if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } - /* Hold the callback for the whole call: it may replace or remove its - * own registration while it runs. */ - Py_INCREF(py_cb); - PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); - PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; - Py_XDECREF(py_arg0); - if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } - lvpy_release_lock_for_python(); - lvpy_nesting_inc(); - PyObject *result = PyObject_CallObject(py_cb, py_args); - Py_DECREF(py_args); - Py_DECREF(py_cb); - lvpy_nesting_dec(); - lvpy_reacquire_lock_after_python(); - if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } - int32_t _c_res = (int32_t)mp_obj_get_int(result); - Py_DECREF(result); - PyGILState_Release(gstate); - return _c_res; -} - - /* * Function NOT generated: * Callback: user_data NOT FOUND! void *lv_draw_buf_malloc_cb_t(size_t size, lv_color_format_t color_format) @@ -108982,6 +104114,85 @@ static void lv_draw_unit_t_event_cb_callback(lv_event_t *arg0) } +/* + * Callback function lv_font_t_get_glyph_dsc (CPython) + * bool get_glyph_dsc(const lv_font_t *font, lv_font_glyph_dsc_t *dsc_out, uint32_t letter, uint32_t letter_next) + */ +static bool lv_font_t_get_glyph_dsc_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1, uint32_t arg2, uint32_t arg3) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (bool){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_font_t_get_glyph_dsc"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (bool){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); + PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); + PyObject *py_arg3 = mp_obj_new_int_from_uint(arg3); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2 && py_arg3) ? PyTuple_Pack(4, py_arg0, py_arg1, py_arg2, py_arg3) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + Py_XDECREF(py_arg3); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (bool){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (bool){0}; } + bool _c_res = mp_obj_is_true(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * Function NOT generated: + * Callback: user_data NOT FOUND! const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + * const void *get_glyph_bitmap(lv_font_glyph_dsc_t *g_dsc, lv_draw_buf_t *draw_buf) + */ + + +/* + * Callback function lv_font_t_release_glyph (CPython) + * void release_glyph(const lv_font_t *font, lv_font_glyph_dsc_t *g_dsc) + */ +static void lv_font_t_release_glyph_callback(const lv_font_t *arg0, lv_font_glyph_dsc_t *arg1) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_font_t_release_glyph"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_font_t((void*)arg0); + PyObject *py_arg1 = mp_read_ptr_lv_font_glyph_dsc_t((void*)arg1); + PyObject *py_args = (py_arg0 && py_arg1) ? PyTuple_Pack(2, py_arg0, py_arg1) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (result) Py_DECREF(result); + else PyErr_Clear(); + PyGILState_Release(gstate); +} + + /* * Callback function lv_obj_class_t_constructor_cb (CPython) * void constructor_cb(const lv_obj_class_t *class_p, lv_obj_t *obj) @@ -109081,6 +104292,76 @@ static void lv_obj_class_t_event_cb_callback(const lv_obj_class_t *arg0, lv_even } +/* + * Callback function lv_color_filter_dsc_t_filter_cb (CPython) + * lv_color_t lv_color_filter_cb_t(const struct _lv_color_filter_dsc_t *, lv_color_t, lv_opa_t) + */ +static lv_color_t lv_color_filter_dsc_t_filter_cb_callback(const struct _lv_color_filter_dsc_t *arg0, lv_color_t arg1, lv_opa_t arg2) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (lv_color_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_color_filter_dsc_t_filter_cb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (lv_color_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_color_filter_dsc_t((void*)arg0); + PyObject *py_arg1 = mp_read_lv_color_t(arg1); + PyObject *py_arg2 = mp_obj_new_int_from_uint(arg2); + PyObject *py_args = (py_arg0 && py_arg1 && py_arg2) ? PyTuple_Pack(3, py_arg0, py_arg1, py_arg2) : NULL; + Py_XDECREF(py_arg0); + Py_XDECREF(py_arg1); + Py_XDECREF(py_arg2); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (lv_color_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (lv_color_t){0}; } + lv_color_t _c_res = mp_write_lv_color_t(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + +/* + * Callback function lv_style_transition_dsc_t_path_xcb (CPython) + * int32_t lv_anim_path_cb_t(const lv_anim_t *) + */ +static int32_t lv_style_transition_dsc_t_path_xcb_callback(const lv_anim_t *arg0) +{ + PyGILState_STATE gstate = PyGILState_Ensure(); + PyObject *callbacks = get_callback_dict_from_user_data(arg0->user_data); + if (!callbacks) { PyGILState_Release(gstate); return (int32_t){0}; } + PyObject *py_cb = PyDict_GetItemString(callbacks, "lv_style_transition_dsc_t_path_xcb"); + if (!py_cb || !PyCallable_Check(py_cb)) { PyGILState_Release(gstate); return (int32_t){0}; } + /* Hold the callback for the whole call: it may replace or remove its + * own registration while it runs. */ + Py_INCREF(py_cb); + PyObject *py_arg0 = mp_read_ptr_lv_anim_t((void*)arg0); + PyObject *py_args = (py_arg0) ? PyTuple_Pack(1, py_arg0) : NULL; + Py_XDECREF(py_arg0); + if (!py_args) { PyErr_Clear(); Py_DECREF(py_cb); PyGILState_Release(gstate); return (int32_t){0}; } + lvpy_release_lock_for_python(); + lvpy_nesting_inc(); + PyObject *result = PyObject_CallObject(py_cb, py_args); + Py_DECREF(py_args); + Py_DECREF(py_cb); + lvpy_nesting_dec(); + lvpy_reacquire_lock_after_python(); + if (!result) { PyErr_Clear(); PyGILState_Release(gstate); return (int32_t){0}; } + int32_t _c_res = (int32_t)mp_obj_get_int(result); + Py_DECREF(result); + PyGILState_Release(gstate); + return _c_res; +} + + /* * Callback function lv_observer_t_cb (CPython) * void lv_observer_cb_t(lv_observer_t *observer, lv_subject_t *subject) @@ -110229,51 +105510,11 @@ PyMODINIT_FUNC PyInit_lvgl(void) Py_INCREF(PyLvReferenceError); if (PyModule_AddObject(m, "LvReferenceError", PyLvReferenceError) < 0) return NULL; } - if (PyType_Ready(&py_lv_color_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_color_t_type, sizeof(lv_color_t)); - lv_struct_expose_size(&py_lv_color_t_type); - Py_INCREF((PyObject *)&py_lv_color_t_type); - if (PyModule_AddObject(m, "color_t", (PyObject *)&py_lv_color_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_grad_dsc_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_grad_dsc_t_type, sizeof(lv_grad_dsc_t)); - lv_struct_expose_size(&py_lv_grad_dsc_t_type); - Py_INCREF((PyObject *)&py_lv_grad_dsc_t_type); - if (PyModule_AddObject(m, "grad_dsc_t", (PyObject *)&py_lv_grad_dsc_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_grad_stop_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_grad_stop_t_type, sizeof(lv_grad_stop_t)); - lv_struct_expose_size(&py_lv_grad_stop_t_type); - Py_INCREF((PyObject *)&py_lv_grad_stop_t_type); - if (PyModule_AddObject(m, "grad_stop_t", (PyObject *)&py_lv_grad_stop_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_point_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_point_t_type, sizeof(lv_point_t)); - lv_struct_expose_size(&py_lv_point_t_type); - Py_INCREF((PyObject *)&py_lv_point_t_type); - if (PyModule_AddObject(m, "point_t", (PyObject *)&py_lv_point_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_image_colorkey_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_image_colorkey_t_type, sizeof(lv_image_colorkey_t)); - lv_struct_expose_size(&py_lv_image_colorkey_t_type); - Py_INCREF((PyObject *)&py_lv_image_colorkey_t_type); - if (PyModule_AddObject(m, "image_colorkey_t", (PyObject *)&py_lv_image_colorkey_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_font_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_font_t_type, sizeof(lv_font_t)); - lv_struct_expose_size(&py_lv_font_t_type); - Py_INCREF((PyObject *)&py_lv_font_t_type); - if (PyModule_AddObject(m, "font_t", (PyObject *)&py_lv_font_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_color_filter_dsc_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_color_filter_dsc_t_type, sizeof(lv_color_filter_dsc_t)); - lv_struct_expose_size(&py_lv_color_filter_dsc_t_type); - Py_INCREF((PyObject *)&py_lv_color_filter_dsc_t_type); - if (PyModule_AddObject(m, "color_filter_dsc_t", (PyObject *)&py_lv_color_filter_dsc_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_anim_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_anim_t_type, sizeof(lv_anim_t)); lv_struct_expose_size(&py_lv_anim_t_type); Py_INCREF((PyObject *)&py_lv_anim_t_type); if (PyModule_AddObject(m, "anim_t", (PyObject *)&py_lv_anim_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_style_transition_dsc_t_type) < 0) return NULL; - lv_struct_register_size(&py_lv_style_transition_dsc_t_type, sizeof(lv_style_transition_dsc_t)); - lv_struct_expose_size(&py_lv_style_transition_dsc_t_type); - Py_INCREF((PyObject *)&py_lv_style_transition_dsc_t_type); - if (PyModule_AddObject(m, "style_transition_dsc_t", (PyObject *)&py_lv_style_transition_dsc_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_display_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_display_t_type, sizeof(lv_display_t)); lv_struct_expose_size(&py_lv_display_t_type); @@ -110339,6 +105580,16 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_theme_t_type); Py_INCREF((PyObject *)&py_lv_theme_t_type); if (PyModule_AddObject(m, "theme_t", (PyObject *)&py_lv_theme_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_color_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_color_t_type, sizeof(lv_color_t)); + lv_struct_expose_size(&py_lv_color_t_type); + Py_INCREF((PyObject *)&py_lv_color_t_type); + if (PyModule_AddObject(m, "color_t", (PyObject *)&py_lv_color_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_font_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_font_t_type, sizeof(lv_font_t)); + lv_struct_expose_size(&py_lv_font_t_type); + Py_INCREF((PyObject *)&py_lv_font_t_type); + if (PyModule_AddObject(m, "font_t", (PyObject *)&py_lv_font_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_timer_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_timer_t_type, sizeof(lv_timer_t)); lv_struct_expose_size(&py_lv_timer_t_type); @@ -110352,6 +105603,11 @@ PyMODINIT_FUNC PyInit_lvgl(void) if (PyType_Ready(&py_lv_matrix_t_type) < 0) return NULL; Py_INCREF((PyObject *)&py_lv_matrix_t_type); if (PyModule_AddObject(m, "matrix_t", (PyObject *)&py_lv_matrix_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_point_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_point_t_type, sizeof(lv_point_t)); + lv_struct_expose_size(&py_lv_point_t_type); + Py_INCREF((PyObject *)&py_lv_point_t_type); + if (PyModule_AddObject(m, "point_t", (PyObject *)&py_lv_point_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_style_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_style_t_type, sizeof(lv_style_t)); lv_struct_expose_size(&py_lv_style_t_type); @@ -110362,6 +105618,31 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_style_value_t_type); Py_INCREF((PyObject *)&py_lv_style_value_t_type); if (PyModule_AddObject(m, "style_value_t", (PyObject *)&py_lv_style_value_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_grad_dsc_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_grad_dsc_t_type, sizeof(lv_grad_dsc_t)); + lv_struct_expose_size(&py_lv_grad_dsc_t_type); + Py_INCREF((PyObject *)&py_lv_grad_dsc_t_type); + if (PyModule_AddObject(m, "grad_dsc_t", (PyObject *)&py_lv_grad_dsc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_grad_stop_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_grad_stop_t_type, sizeof(lv_grad_stop_t)); + lv_struct_expose_size(&py_lv_grad_stop_t_type); + Py_INCREF((PyObject *)&py_lv_grad_stop_t_type); + if (PyModule_AddObject(m, "grad_stop_t", (PyObject *)&py_lv_grad_stop_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_image_colorkey_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_image_colorkey_t_type, sizeof(lv_image_colorkey_t)); + lv_struct_expose_size(&py_lv_image_colorkey_t_type); + Py_INCREF((PyObject *)&py_lv_image_colorkey_t_type); + if (PyModule_AddObject(m, "image_colorkey_t", (PyObject *)&py_lv_image_colorkey_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_color_filter_dsc_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_color_filter_dsc_t_type, sizeof(lv_color_filter_dsc_t)); + lv_struct_expose_size(&py_lv_color_filter_dsc_t_type); + Py_INCREF((PyObject *)&py_lv_color_filter_dsc_t_type); + if (PyModule_AddObject(m, "color_filter_dsc_t", (PyObject *)&py_lv_color_filter_dsc_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_style_transition_dsc_t_type) < 0) return NULL; + lv_struct_register_size(&py_lv_style_transition_dsc_t_type, sizeof(lv_style_transition_dsc_t)); + lv_struct_expose_size(&py_lv_style_transition_dsc_t_type); + Py_INCREF((PyObject *)&py_lv_style_transition_dsc_t_type); + if (PyModule_AddObject(m, "style_transition_dsc_t", (PyObject *)&py_lv_style_transition_dsc_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_observer_t_type) < 0) return NULL; lv_struct_register_size(&py_lv_observer_t_type, sizeof(lv_observer_t)); lv_struct_expose_size(&py_lv_observer_t_type); @@ -110792,12 +106073,12 @@ PyMODINIT_FUNC PyInit_lvgl(void) lv_struct_expose_size(&py_lv_indev_touch_data_t_type); Py_INCREF((PyObject *)&py_lv_indev_touch_data_t_type); if (PyModule_AddObject(m, "indev_touch_data_t", (PyObject *)&py_lv_indev_touch_data_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_anim_parameter_t_type) < 0) return NULL; + if (PyType_Ready(&py_lv_anim_bezier3_para_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_grad_dsc_params_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_grad_dsc_params_linear_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_grad_dsc_params_radial_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_grad_dsc_params_conical_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_anim_parameter_t_type) < 0) return NULL; - if (PyType_Ready(&py_lv_anim_bezier3_para_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_obj_spec_attr_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_font_glyph_dsc_gid_t_type) < 0) return NULL; if (PyType_Ready(&py_lv_indev_pointer_t_type) < 0) return NULL; @@ -111066,7 +106347,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_thread_sync_signal_isr_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "thread_sync_signal_isr", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_thread_sync_delete_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "thread_sync_delete", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_color_16_16_mix_inlined_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "color_16_16_mix_inlined", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_bidi_calculate_align_internal_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "bidi_calculate_align_internal", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_is_break_char_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_break_char", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_is_hanging_space_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_hanging_space", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_is_a_word_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_is_a_word", fn) < 0) return NULL; } @@ -111356,7 +106636,6 @@ PyMODINIT_FUNC PyInit_lvgl(void) { PyObject *fn = PyCFunction_New(&py_lv_text_ins_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_ins", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_cut_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_cut", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_text_encoded_letter_next_2_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_encoded_letter_next_2", fn) < 0) return NULL; } - { PyObject *fn = PyCFunction_New(&py_lv_text_get_size_internal_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "text_get_size_internal", fn) < 0) return NULL; } { PyObject *fn = PyCFunction_New(&py_lv_utils_bsearch_def, NULL); if (fn == NULL) return NULL; if (PyModule_AddObject(m, "utils_bsearch", fn) < 0) return NULL; } return m; } From fbee4bbd2be8b6596576c975d97cc38faa77b0f6 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:56:17 -0600 Subject: [PATCH 5/7] ci: CircuitPython Unix on 11.0.0-alpha.2 with 4-byte qstr offsets With LVGL 9.6's names, the coverage build's sorted qstr pool is 65,895 bytes, past the 64 KB that 2-byte offsets address. CircuitPython 11.0.0-alpha.2, the release the firmware builds on, can use 4-byte offsets, so the coverage build asks for them. --- .github/workflows/linux-integration.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-integration.yml b/.github/workflows/linux-integration.yml index e8a60b3..98fe02a 100644 --- a/.github/workflows/linux-integration.yml +++ b/.github/workflows/linux-integration.yml @@ -52,12 +52,12 @@ jobs: ref: v1.29.0 path: integration/micropython - - name: Check out CircuitPython 11.0.0-alpha.1 + - name: Check out CircuitPython 11.0.0-alpha.2 if: matrix.runtime == 'circuitpython' uses: actions/checkout@v7 with: repository: adafruit/circuitpython - ref: 11.0.0-alpha.1 + ref: 11.0.0-alpha.2 path: integration/circuitpython - name: Install native build dependencies @@ -95,7 +95,10 @@ jobs: working-directory: integration run: | make -C circuitpython/mpy-cross -j"$(nproc)" + # The coverage build's qstrs, LVGL's included, pass the 64 KB that + # 2-byte qstr offsets can address. make -C circuitpython/ports/unix -j"$(nproc)" VARIANT=coverage \ + CFLAGS_EXTRA=-DMICROPY_QSTR_OFFSET_BYTES=4 \ USER_C_MODULES="$GITHUB_WORKSPACE/integration/omnipython-lvgl/ports/circuitpython" \ FROZEN_MANIFEST="$GITHUB_WORKSPACE/integration/omnipython-lvgl/ports/circuitpython/manifest.py" From 95eba2190660aeaafaf497bf1e10d7f9fda23448 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Wed, 11 Nov 2026 02:00:24 -0600 Subject: [PATCH 6/7] ci: CircuitPython Unix with micropython-pydevices' qstr offset patches Vanilla CircuitPython can't take 4-byte qstr offsets, so the setting alone didn't help: the coverage build's pool was 66,042 bytes. The job now applies the two patches micropython-pydevices builds CircuitPython with (pinned at its commit), which make the offset size a setting for the firmware's pools and mpy-tool's frozen ones. --- .github/workflows/linux-integration.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-integration.yml b/.github/workflows/linux-integration.yml index 98fe02a..ff03b95 100644 --- a/.github/workflows/linux-integration.yml +++ b/.github/workflows/linux-integration.yml @@ -60,6 +60,21 @@ jobs: ref: 11.0.0-alpha.2 path: integration/circuitpython + # CircuitPython addresses a qstr pool with 2-byte offsets, so a pool + # holds 64 KB of names, and LVGL 9.6's push the coverage build's past + # it. micropython-pydevices builds CircuitPython with two patches that + # make the offset size a setting, for the firmware's pools and for + # mpy-tool's frozen ones; ports/circuitpython asks for 4. + - name: Patch CircuitPython for 4-byte qstr offsets + if: matrix.runtime == 'circuitpython' + working-directory: integration/circuitpython + run: | + base=https://raw.githubusercontent.com/PyDevices/micropython-pydevices/9a241aaadd035b912605b5e0d218ee55068abeb1/patches/circuitpython + for p in 0001-qstr-offsets-of-four-bytes-when-a-build-asks.patch \ + 0010-mpy-tool-freezes-qstr-offsets-of-the-width-the-build-asks.patch; do + curl -fsSL "$base/$p" | git apply + done + - name: Install native build dependencies run: | sudo apt-get update @@ -95,8 +110,6 @@ jobs: working-directory: integration run: | make -C circuitpython/mpy-cross -j"$(nproc)" - # The coverage build's qstrs, LVGL's included, pass the 64 KB that - # 2-byte qstr offsets can address. make -C circuitpython/ports/unix -j"$(nproc)" VARIANT=coverage \ CFLAGS_EXTRA=-DMICROPY_QSTR_OFFSET_BYTES=4 \ USER_C_MODULES="$GITHUB_WORKSPACE/integration/omnipython-lvgl/ports/circuitpython" \ From b44df6b61c99421a9fb8303a3f17bc8bf018fd09 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Wed, 11 Nov 2026 02:22:57 -0600 Subject: [PATCH 7/7] binding: keep font.get_glyph_dsc_internal Python can't reach lv_font_get_glyph_dsc: a font's own get_glyph_dsc callback field shadows its name, and that callback doesn't follow the font's fallbacks or placeholders. lv_font_get_glyph_dsc_internal does, so it stays in the API, as the binding's C already had it. --- binding/api_policy.py | 11 +++++++---- generated/api.json | 5 ++--- generated/lvgl.pyi | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/binding/api_policy.py b/binding/api_policy.py index f788dd4..7ffd747 100644 --- a/binding/api_policy.py +++ b/binding/api_policy.py @@ -166,11 +166,14 @@ def function(self, name: str) -> PolicyDecision: return PolicyDecision("private", reason=unsupported.reason) if not name.startswith(self.module_prefix + "_"): return PolicyDecision("private", reason="outside module prefix") - if name.endswith("_internal"): + if name.endswith("_internal") and name != "lv_font_get_glyph_dsc_internal": # Inline helpers from LVGL's private headers (LVGL 9.6 has 164, - # mostly lv_obj_get_style_*_internal). Each one but - # lv_font_get_glyph_dsc_internal backs a public function of the - # same name without the suffix, so binding them only costs flash. + # mostly lv_obj_get_style_*_internal), each behind a public + # function of the same name without the suffix, so binding them + # only costs flash. lv_font_get_glyph_dsc_internal stays: Python + # can't reach the public lv_font_get_glyph_dsc, whose name the + # font's own get_glyph_dsc callback field shadows, and only this + # one follows the font's fallbacks. return PolicyDecision("private", reason="LVGL-internal helper") return PolicyDecision( "public", diff --git a/generated/api.json b/generated/api.json index fab6db0..e9c6581 100644 --- a/generated/api.json +++ b/generated/api.json @@ -1,5 +1,5 @@ { - "api_hash": "af91095e37fe3705cd9a2da008224dcfc665ce05aa9d6622f8e99b6e5f8d349e", + "api_hash": "cee5b09a7b1604c89b90c59186b902c706be97b12cd274042311952e47eee333", "constants": [ { "available_on": [ @@ -59725,7 +59725,6 @@ } } ], - "policy_reason": "LVGL-internal helper", "python_name": "get_glyph_dsc_internal", "receiver": "font_t", "return_type": { @@ -59741,7 +59740,7 @@ "static": false, "storage": [], "variadic": false, - "visibility": "private" + "visibility": "public" }, { "available_on": [ diff --git a/generated/lvgl.pyi b/generated/lvgl.pyi index 38e5d3b..7bfb058 100644 --- a/generated/lvgl.pyi +++ b/generated/lvgl.pyi @@ -1910,6 +1910,7 @@ class font_t(_Struct): underline_thickness: int def get_bottom_trim(self, trim: TEXT_LEADING_TRIM | int) -> int: ... def get_glyph_dsc_fmt_txt(self, dsc_out: font_glyph_dsc_t, unicode_letter: int, unicode_letter_next: int) -> int: ... + def get_glyph_dsc_internal(self, dsc_out: font_glyph_dsc_t, letter: int, letter_next: int) -> int: ... def get_glyph_width(self, letter: int, letter_next: int) -> int: ... def get_line_height(self) -> int: ... def get_top_trim(self, trim: TEXT_LEADING_TRIM | int) -> int: ...